@ones-editor/editor 1.1.47 → 1.1.48

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(`@keyframes ones-editor-blink{0%,to{background-color:transparent}50%{background-color:#0064ff}}*{--link-color: #0064ff;--color-0: #e52727;--color-1: #eb6414;--color-2: #f0a100;--color-3: #24b47e;--color-4: #0064ff;--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: #0064ff;--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: #0064ff;--background-selection: #0064ff1a;--background-code: #cdcdcd40}div.editor-root{color:#2d2d2e;position:relative;box-sizing:border-box;min-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:#0064ff;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{padding:0;position:absolute;opacity:0;pointer-events:none;width:16px;height:20px;font-size:16px;white-space:nowrap;overflow:hidden}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([data-document-title]){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([data-document-title]) 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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion{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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.link{color:#0064ff}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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.link:hover{cursor:pointer;color:#0053cf}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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.style-code{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:var(--background-code);padding:4px;font-size:.8em;font-family: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-sub,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.style-sub{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-super,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.style-super{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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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;pointer-events: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-box][data-box-type=image].image-box span[data-type=box-content]{user-select:none;margin-left:0;margin-right:0}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 #0064ff}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 #0064ff}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:#0064ff;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 #d4d6d9;color:#87888a}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]:not([data-list-level],[block-padding-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="1"]:not(:first-child){margin-top:24px}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="2"]:not(:first-child){margin-top:24px}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="3"]:not(:first-child){margin-top:20px}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="4"]:not(:first-child){margin-top:20px}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="5"]:not(:first-child){margin-top:16px}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="6"]:not(:first-child){margin-top:16px}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.editor-root>div.editor-content>div[data-type=editor-container]>div.container-blocks>div[data-type=editor-block][data-document-title]{font-size:30px;line-height:1.3}div.comment-editor-root div.root.select-all>.container-blocks>div[data-type=editor-block]:first-of-type{background-color:var(--background-selection)}div.comment-editor-root div.root.select-all>.container-blocks>div[data-type=editor-block]:first-of-type div[data-type=block-background]>.editor-selection-background{background-color:transparent!important}.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;color:#2d2d2e}.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:400;outline:none;background-color:#fff;color:#606060;border:1px solid #c7c7c7;padding:4px 8px;border-radius:4px;margin-right:8px;cursor:pointer}.editor-button:disabled{cursor:not-allowed;opacity:.5;background-color:#e8e8e8}.editor-button:not(:disabled):hover{border:1px solid #0064ff;background-color:#eaf3fc;color:#0064ff}.editor-button.primary{font-weight:500;border:1px solid rgba(0,0,0,0);background-color:var(--editor-button-bg-color, #0064ff);color:var(--editor-button-color, #fff)}.editor-button.primary:not(:disabled):hover{background-color:#408cff;border:1px solid rgba(0,0,0,0);color:var(--editor-button-color, #fff)}.editor-button.primary:disabled{cursor:not-allowed;opacity:.5}.editor-button.primary:not(:disabled):active{background-color:#0053cf;color:#fff;border-color:#2872b7}.editor-button:last-child{margin-right:0}.editor-button:not(:disabled):active{background-color:#cfe2ff;color:#0053cf;border-color:#0053cf}@keyframes editorLoadingCircle{0%{transform-origin:50% 50%;transform:rotate(0)}to{transform-origin:50% 50%;transform:rotate(360deg)}}.editor-loading-icon>svg{color:#0064ff;font-size:1em;animation:editorLoadingCircle .8s linear infinite}.editor-checkbox-wrapper{display:flex;height:14px;width:14px;border:none;background-color:transparent;outline:none;padding:0;overflow:visible;box-sizing:border-box;cursor:pointer}.editor-checkbox-wrapper .editor-checkbox{display:block;width:inherit;height:inherit}.editor-checkbox-wrapper .editor-checkbox>.editor-checkbox-inner{display:block;box-sizing:border-box;border:1px solid #c7c7c7;border-radius:3px;height:100%;width:100%;position:relative;left:0;top:0;transition:all .3s}.editor-checkbox-wrapper:not(.checked)>span.editor-checkbox:hover>span.editor-checkbox-inner{border-color:#0064ff}.editor-checkbox-wrapper.checked>.editor-checkbox{position:relative}.editor-checkbox-wrapper.checked>.editor-checkbox:after{animation:editorCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;border:1px solid #0064ff;border-radius:3px;content:"";height:100%;left:0;position:absolute;top:0;width:100%;box-sizing:border-box}.editor-checkbox-wrapper.checked>.editor-checkbox>span.editor-checkbox-inner{border-color:#0064ff;background-color:#0064ff}.editor-checkbox-wrapper.checked>.editor-checkbox>span.editor-checkbox-inner:after{width:5px;height:10px;left:2px;top:5px;border:2px solid #fff;border-left:0;border-top:0;content:" ";display:table;opacity:1;position:absolute;box-sizing:border-box;transform:rotate(45deg) scale(1) translate(-50%,-50%)}.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:#2d2d2e}[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;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:#ffffff}[data-theme=dropdown-list] .filterable-list .list{max-height:60vh;overflow-y:auto;padding:0 0 8px}[data-theme=dropdown-list] .filterable-list .list .list-item{user-select:none;transition:background 20ms ease-in 0s;cursor:pointer;width:100%;border-radius:3px;height:34px;padding:6px 10px;display:flex;justify-content:space-between;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:hover{background:rgba(0,36,90,.04)}[data-theme=dropdown-list] .filterable-list .list .list-item.selected{color:#0064ff}[data-theme=dropdown-list] .filterable-list .list .list-item.disabled{color:#c1c1c1}[data-theme=dropdown-list] .filterable-list .list .list-item.disabled:hover{background:transparent}[data-theme=dropdown-list] .filterable-list .list .list-item .list-item-selected-icon{display:flex;background:transparent;border:none;color:#0064ff}::placeholder{color:#bbb}.ones-editor-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:12000;left:50%;bottom:30px;display:flex;align-items:center;justify-content:space-between;font-size:14px}.ones-editor-toast.show{visibility:visible;animation:toast_fade_in .5s,toast_fade_out .5s 2.5s}.ones-editor-toast.positioned.show{animation:toast_fade_in_positioned .5s,toast_fade_out_positioned .5s 2.5s}.ones-editor-toast.positioned{bottom:unset}.ones-editor-toast>.close{width:24px;height:24px;justify-content:center;display:inline-flex;align-items:center;cursor:pointer}.ones-editor-toast>.close:hover{background-color:#ffffff1a}@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[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-item{cursor:pointer}div.tippy-box[data-theme=menu] .tippy-arrow{z-index:2}div.tippy-box[data-theme=menu] .tippy-arrow:before{content:"";display:block;width:0px;height:0px;position:absolute;top:-16px;border-width:8px;border-bottom-color:#fff}div.tippy-box[data-theme=menu] .tippy-arrow:after{content:" ";display:block;position:absolute;left:2px;top:-5px;box-shadow:-1px -1px 2px #3030300f;width:12px;height:12px;transform:rotate(45deg)}div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar-root,div.tippy-box[data-theme=toolbar] .tippy-content .editor-command-bar-root{box-shadow:0 0 1px #30303040,0 12px 24px #30303026}div.tippy-box[data-theme=toolbar] .tippy-content .editor-command-bar-root{overflow:initial}div.tippy-box button{outline:none}.editor-command-bar-root{display:flex;flex-direction:column;align-items:flex-start;background:#ffffff;border-radius:2px;max-height:50vh;overflow:auto}.editor-command-bar-root.scrollable-bar>.editor-command-bar.menu{overflow-y:auto}.editor-command-bar{pointer-events:all;display:flex;box-sizing:border-box;--text-color: #606060;--primary-color: #0064ff;--selected-color: #f8f8f8;--separator-color: #e8e8e8;--warn-color: #fdf4f4}.editor-command-bar.fixed.toolbar{box-shadow:none}.editor-command-bar.menu{flex:1;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:5px 0}.editor-command-bar.menu .command-item.standard{color:#2d2d2e;user-select:none;transition:background 20ms ease-in 0s;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:#909090}.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.standard.disabled .menu-item-icon{color:#c7c7c7}.editor-command-bar.menu .command-item.separator{height:1px;margin:4px 0;background-color:#dfe1e5;width:100%}.editor-command-bar.menu .command-item.section{font-size:.8em;color:#ccc;padding:5px 5px 5px 10px;cursor:initial;user-select:none}.editor-command-bar.menu .command-item.selected{background-color:#00245a0a}.editor-command-bar.menu .command-item.selected[data-id=delete]:not(.disabled){color:#e52727;background-color:var(--warn-color)}.editor-command-bar.menu .command-item.selected[data-id=delete]:not(.disabled) svg{color:#e52727}.editor-command-bar.menu .command-item.selected.disabled{background-color:transparent}.editor-command-bar.menu .command-item.checked{color:#0064ff}.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:#eb3723}.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:#2d2d2e;height:24px;padding:0;cursor:pointer;border-radius:3px;min-width:24px}.editor-command-bar.toolbar .command-item.selected:not(.disabled){background-color:#00245a0a}.editor-command-bar.toolbar .command-item:active:not(.disabled){background-color:#00245a0f}.editor-command-bar.toolbar .command-item.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.checked{color:#0064ff}.editor-command-bar.toolbar .command-item.checked.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.separator{margin:auto 2px;height:15px;min-width:1px;width:1px;background-color:#dfe1e5;padding:0;pointer-events:none;cursor:default}.editor-command-bar.toolbar .command-item .toolbar-item-name-container{display:flex;flex-direction:row;align-items:center}.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 .command-item[data-button-id=turn-into] .toolbar-item-name-container,.editor-command-bar.toolbar .command-item[data-button-id=align] .toolbar-item-name-container{width:24px;height:24px}.editor-command-bar.toolbar .editor-button+.editor-button{margin-left:5px}.editor-command-bar.footer{width:100%}.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 #c7c7c7;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:#303030;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;line-height:24px}.editor-dropdown:hover{border-color:#0064ff}.editor-dropdown.active{border-color:#0064ff;box-shadow:0 0 0 2px #338fe533}.editor-dropdown.active .dropdown-text{display:none}.editor-dropdown.active .dropdown-icon svg{color:#0064ff;transform:rotate(180deg)}.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:#0064ff;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:8px;display:flex;align-items:center;justify-content:center;cursor:pointer}.editor-dropdown .dropdown-clear-icon{color:#909090}.editor-dropdown .dropdown-clear-icon:hover{color:#0064ff}.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:8px}.editor-dropdown .dropdown-icon svg{transform:rotate(360deg);transition:transform .2s linear}.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 #0064ff;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 #0064ff}.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:#575859;border:1px solid #bebfc2;border-radius:3px;cursor:pointer}.color-palette .clear-button-container .clear-button:hover{color:#0064ff;background:#e3eeff;border:1px solid #0064ff}.color-palette .clear-button-container .clear-button:active{color:#0053cf;background:#cfe2ff;border:1px solid #0053cf}div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-item[data-id=text-color-palette-item]{cursor:default}.editor-input-wrap .editor-input-label{margin-top:8px;margin-bottom:8px;position:relative;font-weight:500}.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;position:relative}.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:#0064ff;box-shadow:0 0 0 2px #338fe533}.editor-input-wrap .editor-input-container .editor-input-suffix{height:100%;position:absolute;top:0px;right:10px;display:flex;align-items:center;color:#87888a;font-size:12px}.editor-input-wrap .editor-input-container .editor-input-suffix+.editor-input{padding-right:50px}.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] .command-item[data-id=link-text]{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=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:0 10px;font-weight:500;font-size:12px;line-height:24px;color:#87888a;background:#F7F8FA;min-height:initial;box-sizing:border-box;margin:5px 0}[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:#87888a}[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}[data-command-bar-id=quick-menu] div.command-item>div.menu-item-name{color:#2d2d2e}[data-command-bar-id=quick-menu] div.command-item>div.menu-item-icon{color:#2d2d2e}[data-command-bar-id=quick-menu] div.command-item.section:first-of-type{margin-top:0}div.tippy-box[data-theme=editor-tooltip]{background-color:#303030;opacity:.8;font-size:12px;border-radius:3px}div.tippy-box[data-theme=editor-tooltip] .editor-tooltip-desc{display:block;margin-top:2px;color:#fff;opacity:.5}div.tippy-box[data-theme=editor-tooltip]>.tippy-arrow:before{transform:scale(.8)}div.tippy-box[data-theme=editor-tooltip]>.tippy-content{padding:4px 10px}:root div.tippy-box[data-theme=editor-tooltip]>.tippy-content{font-weight:500}:root div.tippy-box[data-theme=editor-tooltip]>.tippy-content>div>span:nth-of-type(2){font-weight:400}.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-height:30px;border-radius:3px;font-size:14px;padding:4px 15px}: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 #0064ff}.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 .list-to-mindmap-wrap,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap{display:flex;flex-direction:row;justify-content:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=mention-button]:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=list-to-mindmap]:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=mention-button]:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=list-to-mindmap]:hover{background:rgba(0,36,90,.0392156863);border-radius:3px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=mention-button]:active:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=list-to-mindmap]:active:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=mention-button]:active:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=list-to-mindmap]:active:hover{background:rgba(0,36,90,.0588235294)}.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:center;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}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="1"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="2"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="3"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="4"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="5"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="6"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="7"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="8"]>div.list-container>button.list-marker{font-weight:700}.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-list-type=checked] .list-container .editor-check-list-wrapper,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper{font-feature-settings:"tnum";align-items:baseline;box-sizing:border-box;color:var(--gray-120);display:inline-flex;font-size:14px;font-variant:tabular-nums;line-height:1.5715;line-height:unset;list-style:none;margin:0;padding:0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper>span.editor-check-box>span.editor-check-box-inner,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper>span.editor-check-box>span.editor-check-box-inner{border:1px solid #c7c7c7;border-collapse:initial;border-radius:3px;direction:ltr;display:block;height:14px;left:0;position:relative;top:0;transition:all .3s;width:14px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box{position:relative}@keyframes editorCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box:after,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box:after{animation:editorCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;border:1px solid #0064ff;border-radius:3px;content:"";height:100%;left:0;position:absolute;top:0;width:100%;box-sizing:border-box}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner{border-color:#0064ff;background-color:#0064ff}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner:after,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner:after{width:5px;height:10px;left:2px;top:5px;border:2px solid #fff;border-left:0;border-top:0;content:" ";display:table;opacity:1;position:absolute;box-sizing:border-box;transform:rotate(45deg) scale(1) translate(-50%,-50%)}.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:#0064ff;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 [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=center]{justify-content:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=center]>div[data-type=block-content]{flex-grow:initial}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=right]{justify-content:flex-end}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=right]>div[data-type=block-content]{flex-grow:initial}.editor-root.readonly button[data-button-id=mindmap-close]{display:none}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active .list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover .list-container{cursor:pointer}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=ordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=ordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unchecked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unchecked]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=checked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=checked]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=ordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=ordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unchecked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unchecked]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=checked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=checked]>div[data-type=block-content]{background-color:#f8f8f8}.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:rgba(0,36,90,.04)}.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 .editor-check-list-wrapper:not(.editor-check-list-wrapper-checked)>span.editor-check-box:hover>span.editor-check-box-inner{border-color:#0064ff}.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper,.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper{cursor:pointer}[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:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block].list-block [data-type=block-content][data-content-placeholder]:before{left:2px}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;vertical-align:middle;padding:2px 0;max-width:100%}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.math-box>span[data-type=box-content]{width:100%;overflow-x:auto;display:inline-flex;align-items:center}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{flex-shrink:0}div.editor-root div.editor-content div[data-type=editor-container] .embed-block.selected[data-embed-type=math]>div[data-type=block-content].mathjax-overflow:before{width:var(--mathjax-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}div.editor-root div.editor-content div[data-type=editor-block],.status-box-editor-popup{--orange: #F59300;--orange-bkg: #FFF0D9;--grey: #87888A;--grey-bkg: #EDEFF2;--red: #EB3723;--red-bkg: #FFEAE8;--primary: #0064FF;--primary-bkg: #E3EEFF;--green: #00A865;--green-bkg: #D7F7EA;--purple: #8851ED;--purple-bkg: #F0E8FF}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box span[data-type=box-content]{margin-left:0;margin-right:0;padding-left:2.5px;padding-right:2.5px}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-yellow{background-color:var(--orange-bkg);color:var(--orange)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-yellow-subtle{color:#fff;background-color:var(--orange)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-grey{background-color:var(--grey-bkg);color:var(--grey)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-grey-subtle{color:#fff;background-color:var(--grey)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-red{background-color:var(--red-bkg);color:var(--red)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-red-subtle{color:#fff;background-color:var(--red)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-blue{background-color:var(--primary-bkg);color:var(--primary)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-blue-subtle{color:#fff;background-color:var(--primary)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-green{background-color:var(--green-bkg);color:var(--green)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-green-subtle{color:#fff;background-color:var(--green)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-purple{background-color:var(--purple-bkg);color:var(--purple)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-purple-subtle{color:#fff;background-color:var(--purple)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box>[data-type=box-content]{max-width:100%;display:inline-flex;align-items:center;vertical-align:top;position:relative;top:calc((var(--font-size) * var(--line-height) - 20px) / 2)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common{max-width:100%;line-height:20px;padding:0 5px;border-radius:3px;font-size:12px;height:20px;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;font-weight:500}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common.box-status-empty{color:#87888a}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common:hover{outline:1px solid #408CFF}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.history-deleted-box .box-status-common{text-decoration:line-through}.status-box-editor-popup{width:178px;padding-top:1px}.status-box-editor-popup .status-input input{caret-color:#0064ff}.status-box-editor-popup .scale-border:after,.status-box-editor-popup .status-color-palette .status-box-button.selected:after,.status-box-editor-popup .status-color-palette .status-box-button:hover:after{content:"";outline:1px solid #0064ff;border-radius:3px;position:absolute;left:0;right:0;top:0;bottom:0;transform:scale(1.1)}.status-box-editor-popup .status-color-palette{display:flex;padding:6px 4px 5px}.status-box-editor-popup .status-color-palette .status-box-button+.status-box-button{margin-left:5px}.status-box-editor-popup .status-color-palette .status-box-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;position:relative}.status-box-editor-popup .status-color-palette .status-box-button.selected:after{outline:1px solid var(--primary-color)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=grey]{background-color:var(--grey-bkg);border:1px solid var(--grey)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=blue]{background-color:var(--primary-bkg);border:1px solid var(--primary)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=yellow]{background-color:var(--orange-bkg);border:1px solid var(--orange)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=red]{background-color:var(--red-bkg);border:1px solid var(--red)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=green]{background-color:var(--green-bkg);border:1px solid var(--green)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=purple]{background-color:var(--purple-bkg);border:1px solid var(--purple)}[data-command-bar-id=status-box-popup] .tippy-content{padding-left:6px;padding-right:6px}div.editor-root.readonly div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common{cursor:default}div.editor-root.readonly div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common:hover{outline:none}.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 div[data-type=block-tools] .table-resize-gripper,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=block-tools] .table-resize-gripper>.table-resize-gripper-indicator,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=block-tools] .table-border-bar-container,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=block-tools] .table-border-bar-container.top,div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.top{left:0;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=block-tools] .table-border-bar-container.left,div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.left{top:20px;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=block-tools] .table-border-bar-container .table-border-bar,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=block-tools] .table-border-bar-container .table-border-bar.left,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=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell,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:#dfe1e5;position:relative;flex-grow:0;flex-shrink:0}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.corner,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);height:var(--table-bar-width)}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.top,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=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell:hover,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:#d4d6d9}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.selected,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:#0064ff}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.danger,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=block-tools] .table-border-bar-container .table-border-bar .button-root,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=block-tools] .table-border-bar-container .table-border-bar .button-root.top,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=block-tools] .table-border-bar-container .table-border-bar .button-root.top:last-child,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=block-tools] .table-border-bar-container .table-border-bar .button-root.left,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=block-tools] .table-border-bar-container .table-border-bar .button-root.left:last-child,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container.top,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container.left,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .insert-indicator,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-indicator,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button span.icon,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .drop-marker,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker,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:#0064ff;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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:after,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:2px;background-color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:before,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:2px;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=block-tools] .editor-table-chart,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;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 #dfe1e5;background-color:transparent;background-clip:padding-box}div[data-type=editor-block].table-block div[data-type=table-content]>table tr td.danger{background-color:#fff6f5!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;cursor:pointer;transform:rotate(0);transition:transform .2s;background-color:transparent;color:#575859}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn:hover{background-color:#e8e8e8}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn.active{transform:rotate(180deg);background:#f7f8fa}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child>div.container-blocks>*+*{margin-top:5px}div[data-type=editor-block].table-block div[data-type=table-content] .child{padding:8px}div[data-type=editor-block].table-block div[data-type=table-content] .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] .child div[data-type=editor-block].table-block>div[data-type=block-content] .scroll-container{overflow:hidden}div[data-type=editor-block].table-block div[data-type=table-content] .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:#f7f8fa}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:#f7f8fa}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.full-selected>div[data-type=block-content]>.scroll-container-root>.scroll-container>.scroll-area>div[data-type=table-content]>table td,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 th,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 tr{background-color:transparent}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{cursor:pointer;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:#408cff}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:20px}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[data-type=editor-block].table-block.locked-by-self>[data-type=block-content]:after,div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content]:after{display:none}div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content],div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content] div[data-type=table-content]{position:relative}div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content]:after,div.editor-root:not(.readonly) 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:#2d2d2e;opacity:.3}.editor-root .editor-content div[data-type=editor-block].table-block div[data-type=block-tools] .block-helper{right:calc(100% + 5px);top:35px}[data-command-bar-id=table-row-column-toolbar] .editor-command-bar.toolbar{padding:4px}div.comment-editor-root div[data-type=editor-block].table-block>div[data-type=block-content]{left:0px}div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-rows].selected,div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-columns].selected{background-color:#fff6f5}div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-rows].selected svg,div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-columns].selected svg{color:#eb3723}div[data-command-bar-id=table-cell-menu] .tippy-box .tippy-content .editor-command-bar.menu .command-item.selected[data-id=delete-select-row],div[data-command-bar-id=table-cell-menu] .tippy-box .tippy-content .editor-command-bar.menu .command-item.selected[data-id=delete-select-col]{color:#eb3723;background-color:#fff6f5}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block{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>div[data-type=block-tools] .code-block-header .code-header-button[data-id=caption]{display:none}.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:32px 10px 24px 32px;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,.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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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,.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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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,.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.code-line-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,.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.code-line-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.comment-editor-root [data-type=editor-container].root div[data-type=editor-block].code-block{min-width:0}.editor-root:not(.mobile) [data-type=editor-container].root div[data-type=editor-block].code-block{min-width:360px}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=center] [data-type=block-content][data-content-placeholder]:before{justify-content:center}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=right] [data-type=block-content][data-content-placeholder]:before{justify-content:right}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:#bebfc2}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:#bebfc2;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{pointer-events:none;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}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 #0064ff;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:#0064ff;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:#0064ff;opacity:.1}.editor-root.readonly 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,.editor-root div.editor-content.dragging .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter{visibility:hidden}.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].block-hidden{display:none}.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=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-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 #0064ff}.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:first-child:last-child{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 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:#0064ff}.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:#0064ff}.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 #0064ff}.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:5px;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].block-exclusive:after{content:attr(data-exclusive-tips);position:absolute;top:0px;left:0px;width:100%;background:#F7F8FA;border-radius:var(--editor-border-radius);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:22px;color:#87888a;text-align:center;padding:9px 0;z-index:1000}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self>[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].locked-by-others>[data-type=block-content]{position:relative}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) 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:#2d2d2e;opacity:.3}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self.locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) div[data-type=editor-block].locked-by-others.text-block>[data-type=block-content]:after,.editor-root:not(.readonly) div[data-type=editor-block].locked-by-others.locked-by-self>[data-type=block-content]:after{pointer-events:none}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,.editor-root:not(.readonly) 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.dragging *{cursor:grabbing!important}.editor-root .editor-content.dragging div[data-type=editor-block] iframe{pointer-events:none}.editor-root .editor-content .editor-drop-indicator{position:absolute;background-color:var(--primary-color);pointer-events:none;transition:top .2s linear,left .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:pointer;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[data-type=move]{cursor:grab}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button:hover{background-color:#00245a0a}.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:grid;grid-template-columns:repeat(7,24px);grid-row-gap:10px;grid-column-gap:5px}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon{height:24px;padding:0;margin: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:#0064ff}.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;color:#2d2d2e;font-weight:500;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-container:hover{border:1px solid #0064ff}.editor-find-dialog .editor-find-dialog-input-container:focus{border:1px solid #0064ff;box-shadow:0 0 0 2px #0064ff33}.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:#2d2d2e;background-color:var(--editor-find-dialog-button-border-bg-color);border:none;display:flex;flex-direction:row;align-items:center;padding:0}.editor-find-dialog .editor-find-dialog-icon-button:hover{color:#0064ff}.editor-find-dialog .editor-find-dialog-icon-button:active{color:#0053cf}.editor-find-dialog .editor-find-dialog-button{padding:4px 15px;cursor:pointer;background:#ffffff;border:1px solid #bebfc2;color:#575859;margin:0 4px;font-family:inherit;line-height:20px;border-radius:3px}.editor-find-dialog .editor-find-dialog-button.icon-button{width:32px;height:32px}.editor-find-dialog .editor-find-dialog-button:enabled:hover{color:#0064ff;background:#e3eeff;border:1px solid #0064ff}.editor-find-dialog .editor-find-dialog-button:enabled:active{color:#0053cf;background:#cfe2ff;border:1px solid #0053cf}.editor-find-dialog .editor-find-dialog-button:last-of-type{margin-right:0}.editor-find-dialog .editor-find-dialog-primary-button{color:#fff;background:#0064ff;border:1px solid #0064ff;transition:ease-in .1s}.editor-find-dialog .editor-find-dialog-primary-button:enabled:hover{color:#fff;background:#408cff;border:1px solid #408cff}.editor-find-dialog .editor-find-dialog-primary-button:enabled:active{color:#fff;background:#0053cf;border:1px solid #0053cf}.editor-find-dialog .editor-find-dialog-action{margin:12px 0 20px}.editor-find-dialog .editor-find-dialog-button:disabled{color:#575859;background:#dfe1e5;opacity:.5;border:1px solid #bebfc2;cursor:not-allowed}.editor-find-dialog .editor-find-dialog-primary-button:disabled{color:#fff;background:#0064ff;opacity:.5;border:1px solid #0064ff}.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:#575859;border:var(--editor-find-dialog-button-border);background-color:var(--editor-find-dialog-button-border-bg-color);padding:0;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.editor-find-dialog .editor-find-dialog-icon-button-border:hover{background:#e3eeff;border:1px solid #0064ff}.editor-find-dialog .editor-find-dialog-icon-button-border:active{background:#cfe2ff;border:1px solid #0053cf}.editor-find-dialog .editor-find-dialog-button-close{margin:0 0 0 8px;cursor:pointer;border-radius:4px;color:#2d2d2e;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-button-close:hover{color:#0064ff}.editor-find-dialog .editor-find-dialog-button-close:active{color:#0053cf}.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{pointer-events:none}.editor-find-dialog .editor-highlight .editor-highlight-child{opacity:.1;position:absolute;background-color:#eb3723}.editor-find-dialog .editor-highlight.active .editor-highlight-child{opacity:.3;position:absolute;background-color:#eb3723}.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{pointer-events:none}.editor-highlight .editor-highlight-child{opacity:.1;position:absolute;background-color:#eb3723}.editor-highlight.active .editor-highlight-child{opacity:.3;position:absolute;background-color:#eb3723}.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}body>div.editor-context-menu[data-tippy-root].zh-CN{min-width:200px}body>div.editor-context-menu[data-tippy-root].en-US,body>div.editor-context-menu[data-tippy-root].ja-JP{min-width:200px}body>div.editor-context-menu[data-tippy-root]>div.tippy-box>div.tippy-content{padding:0}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item{cursor:pointer}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item.disabled{cursor:not-allowed}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item.disabled>div.item-subtext{color:#c7c7c7}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item>div.item-subtext{margin-left:10px}.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{max-width:100%;display:inline-block;min-width:calc(100% - 40px);padding-top:2px}.comment-editor-root div.editor-root div.editor-content{padding:0}.comment-editor-root div.editor-root div.editor-content>div[data-type=editor-container].root>div.container-blocks>*+*{margin-top:0}.comment-editor-img{float:right;color:#c1c1c1;padding:0;margin-top:2px;width:24px;height:24px;justify-content:center}.comment-editor-root:not(.comment-editor-readonly) .editor-root .editor-content [data-type=editor-block]:not([data-block-type=text]){width:224px}.comment-editor-editing{border:1px solid #0064ff}.comment-editor-readonly{border:none;padding-left:calc(var(--editor-comment-avatar-width, 22px) + 5px);margin:0}.comment-editor-readonly .comment-editor-img{display:none}.comment-item-root{position:relative}.comment-item-root:not(.last-comment-item):before{content:" ";display:block;position:absolute;left:10px;width:1px;background-color:#dfe1e5;overflow:hidden;opacity:.8;top:21px;bottom:-12px;transform:scaleX(.5)}.comment-item-root .item-head{padding:0;position:relative;display:flex;align-items:center}.comment-item-root .item-head-avatar{margin-right:5px;width:var(--editor-comment-avatar-width, 22px);height:var(--editor-comment-avatar-width, 22px);border-radius:100%}.comment-item-root .item-head-avatar-string{display:flex;align-items:center;justify-content:center;font-size:12px;color:#fff;background-color:var(--comment-avatar-color);flex-shrink:0}.comment-item-root .item-head-username{font-size:var(--editor-comment-username-font-size, 12px);color:#2d2d2e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comment-item-root .item-head-modified{margin-left:10px;font-size:12px;color:#87888a;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{color:#2d2d2e}.comment-item-root .item-head-tools .editor-text-button:hover{color:#0064ff}.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;padding:0 10px}.comment-item-root .item-actions .editor-button{padding:4px 10px;line-height:1}.comment-item-root .item-actions.hidden{display:none}.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{color:#575859;font-size:12px}.comment-quick-reply .quick-reply-button.editor-text-button:hover{color:var(--text-button-color-hover, #0064ff);background-color:var(--text-button-bg-color-hover, transparent)}.comment-quick-reply .quick-reply-button.editor-text-button:active{color:#0053cf;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;padding:0 10px}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button{padding:4px 10px;line-height:1}.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);--editor-comment-quote-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,.editor-root .editor-content div[data-type=editor-block] span[data-type=editor-box].comment{border-bottom:2px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block] span.text.comment.active,.editor-root .editor-content div[data-type=editor-block] span[data-type=editor-box].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:284px;padding:0 10px 10px;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)}.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:29}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head{display:flex;align-items:center;justify-content:space-between}.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:20px;height:20px;color:#87888a;padding-bottom:10px;padding-top:10px;padding-right:12px;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:12px;background-color:#d4d6d9;margin-right:6px;float:left;border-radius:10px;margin-top:4px}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch{display:flex;align-items:center;height:22px;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:#f59300}.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{color:#5587f0;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] span.file-icon svg{width:18px}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;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;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;flex-direction:row;align-items:center;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:24px;height:24px}div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content]{min-width:360px}div.editor-root:not(.mobile) 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{min-width:360px}:root{--editor-version-button-border: black;--editor-bg-color: #ffffff;--editor-version-list-bg-color: white;--editor-version-select-bg-color: #F0F6FF}.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.loading .version-viewer .version-info-container{display:none}.version-dialog .version-loading{display:flex;flex:1;align-items:center;justify-content:center}.version-dialog .version-loading svg{width:28px;height:28px}.version-dialog .version-item-latest{color:#0064ff;background-color:#e3eeff;height:20px;padding:0 5px;border-radius:3px;display:inline-flex;align-items:center;font-size:12px;font-weight:400;margin-left:10px}.version-dialog .version-viewer{flex:1;display:flex;flex-direction:column;width:0;padding:0;min-width:0}.version-dialog .version-viewer .version-dialog-editor{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-right .text-3{color:#909090}.version-dialog .version-viewer .version-info-container .version-info-left{display:flex;align-items:center}.version-dialog .version-viewer .version-info-container .version-info-left .text-1,.version-dialog .version-viewer .version-info-container .version-info-left .text-2{color:#909090}.version-dialog .version-viewer .version-info-container .version-info-left .name{padding-left:5px;padding-right:10px;font-weight:500}.version-dialog .version-viewer .version-info-container .version-info-left .name .version-item-latest{margin-left:5px}.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] [data-type=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-inserted-block[data-type=editor-block]{position:relative}.editor-root.history .history-inserted-block[data-type=editor-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: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: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=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-deleted-block [data-type=block-content]{position:relative}.editor-root.history .history-deleted-block [data-type=block-content]:after,.editor-root.history .history-deleted-block [data-type=block-content]:before{content:" ";position:absolute;display:flex;z-index:2000;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=block-content]:before{transform:rotate(135deg)}.editor-root.history .history-deleted-block{position:relative}.editor-root.history .history-deleted-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:10;font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-deleted-block.history-deleted-box{background-color:unset!important;text-decoration:unset!important}.editor-root.history .history-deleted-block.history-deleted-box:hover:after{opacity:0}.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: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: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:#0064ff}.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:350px;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 6px 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-header .version-list-filter .editor-command-bar.toolbar .command-item{cursor:pointer}.version-list-root .version-list-header .version-list-filter .editor-command-bar.toolbar .command-item .toolbar-item-dropdown-container{margin-left:5px}.version-list-root .version-list-header .version-list-filter .editor-command-bar.toolbar .command-item:not(.disabled):hover{color:#0064ff}.version-list-root .version-list-header .version-list-filter .editor-command-bar.toolbar .command-item.selected:not(.disabled){background-color:transparent}.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:not(:last-child):after{content:"";display:block;position:relative;top:15px;border-bottom:1px solid #e8e8e8}.version-list-root .version-list-content .version-item:not(:last-child):hover:after,.version-list-root .version-list-content .version-item:not(:last-child).active:after{left:-10px;width:106%}.version-list-root .version-list-content .version-item.child{padding-left:32px}.version-list-root .version-list-content .version-item:not(.active):hover{background:#f8f8f8}.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.active .version-item-title .version-item-date{color:#0064ff}.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 #0064ff}.version-list-root .version-list-content .version-item .version-item-restore-from{color:#87888a;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;display:flex;margin-top:5px}.version-list-root .version-list-content .version-item .memo-input.size-limit-textarea textarea{line-height:22px;padding:4px 9px;box-sizing:border-box;font-size:14px}.version-list-root .version-list-content .version-item .version-item-title{display:flex;align-items:center;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;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#2d2d2e}.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 10px;color:#909090}.version-list-root .version-list-content .version-item .version-item-title .version-actions button:hover{color:#0064ff}.version-list-root .version-list-content .version-item .version-item-title .version-actions button.disabled,.version-list-root .version-list-content .version-item .version-item-title .version-actions button.disabled:hover{color:#c7c7c7}.version-list-root .version-list-content .version-item .version-item-title .version-actions .revert-button{border-left:1px solid #e8e8e8;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;margin-top:10px;color:#606060;line-height:22px}.version-list-root .version-list-content .version-item .version-item-author .version-item-author-name{color:#575859}.version-list-root .version-list-content .version-item .version-item-author-mark{width:6px;height:6px;border-radius:3px;margin-right:5px;flex-shrink:0;margin-top:8px}.version-list-root .version-list-content .version-item .version-item-memo{font-size:14px;color:#303030;padding:5px 10px;border-radius:3px;margin-top:5px;line-height:22px}.version-list-root .version-list-content .version-item .version-item-memo:empty{display:none}.versions-dropdown-header{color:var(--text-color);padding:10px;border-bottom:1px solid #f0f0f0}.versions-dropdown-header .versions-dropdown-header-info{font-family:PingFang SC;color:#909090}.versions-dropdown-header .versions-dropdown-header-icon{display:inline-flex;vertical-align:middle;height:19px;padding-left:5px;padding-right:5px;cursor:pointer;color:#909090}.versions-dropdown-header .versions-dropdown-header-icon svg{vertical-align:baseline}.editor-command-bar.menu .command-item.standard[data-id=prev-version]{height:44px}[data-command-bar-id=versions-dropdown-popup]{width:320px;font-family:inherit}[data-command-bar-id=versions-dropdown-popup] .tippy-box{color:var(--text-color);line-height:normal}[data-command-bar-id=versions-dropdown-popup] .tippy-box .version-item-empty{width:100%}[data-command-bar-id=versions-dropdown-popup] .tippy-box .version-item-name{color:var(--text-color)}[data-command-bar-id=versions-dropdown-popup] .tippy-box .editor-command-bar.menu .command-item.standard.disabled{color:#909090}[data-command-bar-id=versions-dropdown-popup] .tippy-box .editor-command-bar{--text-color: #303030}[data-command-bar-id=versions-dropdown-popup] .tippy-box .editor-command-bar.menu .command-item.section{padding:0;font-size:inherit;color:inherit}[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;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[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:#0064ff;background-color:#eaf3fc;height:20px;padding:0 5px;margin-left:10px;border-radius:3px;font-size:12px;display:inline-flex;align-items:center}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-empty{display:flex;height:34px;color:#909090;padding-left:10px;justify-content:left;align-items:center}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item{width:100%}[data-command-bar-id=versions-dropdown-popup] .command-item .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;font-size:12px}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container{height:34px;display:flex;align-items:center;padding-left:10px;color:#303030;cursor:pointer}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container .filter-item-label{cursor:pointer}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container .editor-checkbox-wrapper{margin-right:4px}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container:hover .editor-checkbox-wrapper:not(.checked)>span.editor-checkbox>span.editor-checkbox-inner{border-color:#0064ff}.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] div[data-type=block-tools] .block-helper .block-button~.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:pointer;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;border-radius:3px;box-sizing:content-box}.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:#00245a0a}.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{color:#87888a;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{color:#c7c7c7;cursor:default}.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;text-align:start}.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-icon .mention-user-avatar-string{align-items:center;display:flex;justify-content:center;overflow:hidden;height:100%;width:100%;font-size:12px;color:#fff;flex-shrink:0}[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:#0064ff}.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%}:root .iframe-embed-auth-error-tips{width:100%;height:34px;line-height:34px;background-color:#f7f8fa;text-align:center;color:#bebfc2;z-index:9910;position:fixed;top:0;left:0;box-shadow:0 2px 4px #2d2d2e26,0 0 1px #2d2d2e1a}:root .iframe-embed-auth-error-tips span{cursor:pointer;color:#0064ff;user-select:none}:root .iframe-embed-auth-error-tips.success{background-color:#ebfcf5;color:#008f57}.ones-editor-toast[data-theme=warn]{background-color:#f59300}.ones-editor-toast[data-theme=warn] .toast-message{display:inline-flex;align-items:center}.ones-editor-toast[data-theme=warn] .toast-message svg{margin-right:8px;width:24px;height:24px;fill:#fff}:root{--editor-quoted-color: #7084a4;--editor-drawio-empty-svg: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC43MjAzIDI4LjcwOTdIMjUuOTIzM0MyNS4yMTY1IDI4LjcwOTcgMjQuNjQzNSAyOC4xNDgxIDI0LjY0MzUgMjcuNDU1MlYyNS43MzMzSDIwLjUyODNDMjAuNDk4NiAyNS43Njk2IDIwLjQ2NjkgMjUuODA0MiAyMC40MzMzIDI1LjgzN0wxNS45MTkyIDMwLjI2MjFWMzQuNzU1NkgyNC42NDM1VjMzLjcyNzZDMjQuNjQzNSAzMy4wMzQ4IDI1LjIxNjUgMzIuNDczMiAyNS45MjMzIDMyLjQ3MzJIMzguNzIwM0MzOS40MjcgMzIuNDczMiA0MCAzMy4wMzQ4IDQwIDMzLjcyNzZWMzguNzQ1NUM0MCAzOS40MzgzIDM5LjQyNyA0MCAzOC43MjAzIDQwSDI1LjkyMzNDMjUuMjE2NSA0MCAyNC42NDM1IDM5LjQzODMgMjQuNjQzNSAzOC43NDU1VjM3LjMzMzNIMTQuNjI2M0MxMy45MTIyIDM3LjMzMzMgMTMuMzMzMyAzNi43NTYyIDEzLjMzMzMgMzYuMDQ0NFYzMC42OTQxTDguMzc4NTIgMjUuODM3QzguMTM2MjYgMjUuNjAxNCA4IDI1LjI4MDggOCAyNC45NDYzQzggMjQuNjExOCA4LjEzNjI2IDI0LjI5MTEgOC4zNzg1MiAyNC4wNTU2TDEzLjMzMzMgMTkuMTk4NVYxNS43NzJDMTEuNzc5OCAxNS4yMjI5IDEwLjY2NjcgMTMuNzQxNiAxMC42NjY3IDEyQzEwLjY2NjcgOS43OTA4NSAxMi40NTc1IDggMTQuNjY2NyA4QzE2Ljg3NTggOCAxOC42NjY2IDkuNzkwODUgMTguNjY2NiAxMkMxOC42NjY2IDEzLjcyNjUgMTcuNTU4OCAxNS4yNTgxIDE1LjkxOTEgMTUuNzk4OFYxOS4yODg4QzE1LjkxOTEgMTkuMzkxOCAxNS45MDY4IDE5LjQ5NDMgMTUuODgyMyAxOS41OTQzTDE5LjUxNTEgMjMuMTU1NUgyNC42NDM1VjIyLjQzNzNDMjQuNjQzNSAyMS43NDQ1IDI1LjIxNjUgMjEuMTgyOSAyNS45MjMzIDIxLjE4MjlIMzguNzIwM0MzOS40MjcgMjEuMTgyOSA0MCAyMS43NDQ1IDQwIDIyLjQzNzNWMjcuNDU1MkM0MCAyOC4xNDgxIDM5LjQyNyAyOC43MDk3IDM4LjcyMDMgMjguNzA5N1pNMjcuMjAzIDM3LjQ5MUgzNy40NDA2VjM0Ljk4MjFIMjcuMjAzVjM3LjQ5MVpNMTQuNDA1OSAyOC4xOTU0TDExLjA5MTUgMjQuOTQ2M0wxNC40MDU5IDIxLjY5NzJMMTcuNzIwNCAyNC45NDYzTDE0LjQwNTkgMjguMTk1NFpNMjcuMjAzIDI2LjIwMDhIMzcuNDQwNlYyMy42OTE4SDI3LjIwM1YyNi4yMDA4WiIgZmlsbD0iIzA3MTQyQSIvPgo8L3N2Zz4K)}.flex-center,.editor-drawio-iframe-container.loading: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].drawio-load-error>div[data-type=block-content]{padding:0;min-height:200px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block[data-embed-type=drawio].drawio-load-error>div[data-type=block-content] .editor-drawio-content{width:100%;height:100%;min-height:inherit}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{display:flex;flex-direction:column;align-items:center;justify-content:center}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>div.drawio-error-content{width:100%;height:100%;background-color:#f8f8f8;display:flex;flex-direction:column;justify-content:center;text-align:center;flex:1}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>div.drawio-error-content>div.drawio-error-brand-icon>svg{width:48px;height:48px}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>div.drawio-error-content>div.drawio-error-title{font-weight:500;font-size:18px;line-height:26px;text-align:center;color:#303030;margin:23px 0 5px}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>div.drawio-error-content>div.drawio-error-sub-title{font-size:14px;line-height:22px;text-align:center;color:#606060}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>div.drawio-error-content>div.drawio-error-sub-title>span.drawio-error-retry-button{cursor:pointer;margin-left:4px;color:#0064ff}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] .drawio-empty-content{display:flex;flex-direction:column;align-items:center}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] .drawio-empty-content>span{font-size:14px;line-height:22px;text-align:center;color:#606060;margin-top:23px}.embed-block .editor-drawio-content.editor-embed{width:100%;min-height:80px;display:inline-block;text-align:center}.embed-block .editor-drawio-content.editor-embed .editor-empty-drawio{width:240px;height:400px}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%}.editor-drawio-iframe-container.loading:before{content:attr(data-placeholder);position:absolute;top:0;left:0;background-color:#f7f6f3;z-index:2}:root div[data-command-bar-id=webpage]>div.tippy-box{max-width:500px}:root div[data-command-bar-id=webpage]>div.tippy-box div.tippy-content{width:500px;padding:0}.editor-dialog-container{width:500px}.editor-dialog-container .dialog-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0 20px;height:50px;border-bottom:1px solid #e8e8e8;margin-bottom:20px}.editor-dialog-container .dialog-header .close-icon{display:flex;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:0 20px 20px;border-bottom:1px solid #e8e8e8}.editor-dialog-container .dialog-footer{margin:10px 0;padding:0 20px;text-align:right}.editor-dialog-container .dialog-footer button{min-height:30px;border-radius:3px;font-size:14px;padding:4px 15px}.editor-disable-scroll.editor-disable-scroll-dark{background-color:#00000080}.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 #0064ff;margin-top:16px;margin-bottom:16px}.webpage-content .help-container .help-content{display:flex;align-items:flex-start}.webpage-content .help-container .help-content .help-icon{display:flex;align-items:center;height:20px;color:#0064ff;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:#0064ff;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}.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;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[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=mermaid],.embed-block[data-embed-type=flowchart],.embed-block[data-embed-type=plantuml]{display:flex;flex-direction:row;align-items:center;justify-content:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content],.embed-block[data-embed-type=flowchart] div[data-type=block-content],.embed-block[data-embed-type=plantuml] div[data-type=block-content]{width:100%;position:relative;border:1px solid #e5e5e5;border-radius:3px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .empty-embed,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .empty-embed,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .empty-embed{width:100%;min-height:106px;background-color:#cdcdcd40}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,.embed-block[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[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed){width:100%;height:100px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed) img{display:none}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block[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[data-embed-type=mermaid] div[data-type=block-content] .embed-img-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-img-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-img-content{width:100%;text-align:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .mermaid-embed-img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .mermaid-embed-img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .mermaid-embed-img{max-width:100%;min-width:200px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .editor-plantuml-img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .editor-plantuml-img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .editor-plantuml-img{max-width:100%}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content{width:100%;text-align:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content img{max-width:100%}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed{width:100%}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content{width:100%;height:100%;min-height:200px;background-color:#f8f8f8;display:flex;flex-direction:column;justify-content:center;text-align:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-error-brand-icon>svg{width:48px;height:48px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-title,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-title{font-weight:500;font-size:18px;line-height:26px;text-align:center;color:#2d2d2e;margin:23px 0 5px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title{font-size:14px;line-height:22px;text-align:center;color:#87888a}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title>span.graph-error-retry-button{cursor:pointer;margin-left:4px;color:#0064ff}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content{background-color:#fff}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-brand-icon>svg,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-brand-icon>svg,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-brand-icon>svg{width:48px;height:48px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-empty-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-empty-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-empty-title{font-weight:400;font-size:14px;line-height:22px;text-align:center;color:#606060;margin-top:23px}.hr-transition,.embed-block[data-type=editor-block][data-embed-type=hr] div[data-type=block-content] .editor-embed-container .editor-embed-hr{transition:border-top ease-in-out .4s}.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}.embed-block[data-type=editor-block][data-embed-type=hr]: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{display:flex;align-items:center;width:100%;height:24px;cursor:pointer}.embed-block[data-type=editor-block][data-embed-type=hr] div[data-type=block-content] .editor-embed-container .editor-embed-hr{display:block;width:100%;border:none;margin:0;border-top:2px dashed #cccccc}.embed-block[data-type=editor-block][data-embed-type=hr] div[data-type=block-tools]>div.block-helper{height:100%}: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]{display:flex}.embed-block[data-embed-type=video][data-style-align=left]>div[data-type=block-content]{justify-content:flex-start}.embed-block[data-embed-type=video][data-style-align=center]>div[data-type=block-content]{justify-content:center}.embed-block[data-embed-type=video][data-style-align=right]>div[data-type=block-content]{justify-content:flex-end}.embed-block[data-embed-type=video]>div[data-type=block-content]{border: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].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;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;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:#0064ff}.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:#0064ff;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}.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-others>[data-type=block-content]:after,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content]:after{display:none}.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media,.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content] .media{position:relative}.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media:after,.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media:after,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media:after,.editor-root:not(.readonly) .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:#2d2d2e;opacity:.3}`)),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(`@keyframes ones-editor-blink{0%,to{background-color:transparent}50%{background-color:#0064ff}}*{--link-color: #0064ff;--color-0: #e52727;--color-1: #eb6414;--color-2: #f0a100;--color-3: #24b47e;--color-4: #0064ff;--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: #0064ff;--background-color-12: #9678d3;--background-color-13: #909090;--background-color-14: #e8e8e8;--font-family: ONESSans, -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: #0064ff;--background-selection: #0064ff1a;--background-code: #cdcdcd40}div.editor-root{color:#2d2d2e;position:relative;box-sizing:border-box;min-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:#0064ff;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{padding:0;position:absolute;opacity:0;pointer-events:none;width:16px;height:20px;font-size:16px;white-space:nowrap;overflow:hidden}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([data-document-title]){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([data-document-title]) 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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion{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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.link{color:#0064ff}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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.link:hover{cursor:pointer;color:#0053cf}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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.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,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.style-code{border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;background-color:var(--background-code);padding:4px;font-size:.8em;font-family: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-sub,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.style-sub{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-super,div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion.style-super{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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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"],div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.inputting-insertion[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;pointer-events: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-box][data-box-type=image].image-box span[data-type=box-content]{user-select:none;margin-left:0;margin-right:0}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 #0064ff}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 #0064ff}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:#0064ff;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 #d4d6d9;color:#87888a}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-quoted]:not([data-list-level],[block-padding-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="1"]:not(:first-child){margin-top:24px}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="2"]:not(:first-child){margin-top:24px}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="3"]:not(:first-child){margin-top:20px}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="4"]:not(:first-child){margin-top:20px}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="5"]:not(:first-child){margin-top:16px}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="6"]:not(:first-child){margin-top:16px}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.editor-root>div.editor-content>div[data-type=editor-container]>div.container-blocks>div[data-type=editor-block][data-document-title]{font-size:30px;line-height:1.3}div.comment-editor-root div.root.select-all>.container-blocks>div[data-type=editor-block]:first-of-type{background-color:var(--background-selection)}div.comment-editor-root div.root.select-all>.container-blocks>div[data-type=editor-block]:first-of-type div[data-type=block-background]>.editor-selection-background{background-color:transparent!important}.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;color:#2d2d2e}.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:400;outline:none;background-color:#fff;color:#606060;border:1px solid #c7c7c7;padding:4px 8px;border-radius:4px;margin-right:8px;cursor:pointer}.editor-button:disabled{cursor:not-allowed;opacity:.5;background-color:#e8e8e8}.editor-button:not(:disabled):hover{border:1px solid #0064ff;background-color:#eaf3fc;color:#0064ff}.editor-button.primary{font-weight:500;border:1px solid rgba(0,0,0,0);background-color:var(--editor-button-bg-color, #0064ff);color:var(--editor-button-color, #fff)}.editor-button.primary:not(:disabled):hover{background-color:#408cff;border:1px solid rgba(0,0,0,0);color:var(--editor-button-color, #fff)}.editor-button.primary:disabled{cursor:not-allowed;opacity:.5}.editor-button.primary:not(:disabled):active{background-color:#0053cf;color:#fff;border-color:#2872b7}.editor-button:last-child{margin-right:0}.editor-button:not(:disabled):active{background-color:#cfe2ff;color:#0053cf;border-color:#0053cf}@keyframes editorLoadingCircle{0%{transform-origin:50% 50%;transform:rotate(0)}to{transform-origin:50% 50%;transform:rotate(360deg)}}.editor-loading-icon>svg{color:#0064ff;font-size:1em;animation:editorLoadingCircle .8s linear infinite}.editor-checkbox-wrapper{display:flex;height:14px;width:14px;border:none;background-color:transparent;outline:none;padding:0;overflow:visible;box-sizing:border-box;cursor:pointer}.editor-checkbox-wrapper .editor-checkbox{display:block;width:inherit;height:inherit}.editor-checkbox-wrapper .editor-checkbox>.editor-checkbox-inner{display:block;box-sizing:border-box;border:1px solid #c7c7c7;border-radius:3px;height:100%;width:100%;position:relative;left:0;top:0;transition:all .3s}.editor-checkbox-wrapper:not(.checked)>span.editor-checkbox:hover>span.editor-checkbox-inner{border-color:#0064ff}.editor-checkbox-wrapper.checked>.editor-checkbox{position:relative}.editor-checkbox-wrapper.checked>.editor-checkbox:after{animation:editorCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;border:1px solid #0064ff;border-radius:3px;content:"";height:100%;left:0;position:absolute;top:0;width:100%;box-sizing:border-box}.editor-checkbox-wrapper.checked>.editor-checkbox>span.editor-checkbox-inner{border-color:#0064ff;background-color:#0064ff}.editor-checkbox-wrapper.checked>.editor-checkbox>span.editor-checkbox-inner:after{width:5px;height:10px;left:2px;top:5px;border:2px solid #fff;border-left:0;border-top:0;content:" ";display:table;opacity:1;position:absolute;box-sizing:border-box;transform:rotate(45deg) scale(1) translate(-50%,-50%)}.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:#2d2d2e}[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;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:#ffffff}[data-theme=dropdown-list] .filterable-list .list{max-height:60vh;overflow-y:auto;padding:0 0 8px}[data-theme=dropdown-list] .filterable-list .list .list-item{user-select:none;transition:background 20ms ease-in 0s;cursor:pointer;width:100%;border-radius:3px;height:34px;padding:6px 10px;display:flex;justify-content:space-between;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:hover{background:rgba(0,36,90,.04)}[data-theme=dropdown-list] .filterable-list .list .list-item.selected{color:#0064ff}[data-theme=dropdown-list] .filterable-list .list .list-item.disabled{color:#c1c1c1}[data-theme=dropdown-list] .filterable-list .list .list-item.disabled:hover{background:transparent}[data-theme=dropdown-list] .filterable-list .list .list-item .list-item-selected-icon{display:flex;background:transparent;border:none;color:#0064ff}::placeholder{color:#bbb}.ones-editor-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:12000;left:50%;bottom:30px;display:flex;align-items:center;justify-content:space-between;font-size:14px}.ones-editor-toast.show{visibility:visible;animation:toast_fade_in .5s,toast_fade_out .5s 2.5s}.ones-editor-toast.positioned.show{animation:toast_fade_in_positioned .5s,toast_fade_out_positioned .5s 2.5s}.ones-editor-toast.positioned{bottom:unset}.ones-editor-toast>.close{width:24px;height:24px;justify-content:center;display:inline-flex;align-items:center;cursor:pointer}.ones-editor-toast>.close:hover{background-color:#ffffff1a}@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[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-item{cursor:pointer}div.tippy-box[data-theme=menu] .tippy-arrow{z-index:2}div.tippy-box[data-theme=menu] .tippy-arrow:before{content:"";display:block;width:0px;height:0px;position:absolute;top:-16px;border-width:8px;border-bottom-color:#fff}div.tippy-box[data-theme=menu] .tippy-arrow:after{content:" ";display:block;position:absolute;left:2px;top:-5px;box-shadow:-1px -1px 2px #3030300f;width:12px;height:12px;transform:rotate(45deg)}div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar-root,div.tippy-box[data-theme=toolbar] .tippy-content .editor-command-bar-root{box-shadow:0 0 1px #30303040,0 12px 24px #30303026}div.tippy-box[data-theme=toolbar] .tippy-content .editor-command-bar-root{overflow:initial}div.tippy-box button{outline:none}.editor-command-bar-root{display:flex;flex-direction:column;align-items:flex-start;background:#ffffff;border-radius:2px;max-height:50vh;overflow:auto}.editor-command-bar-root.scrollable-bar>.editor-command-bar.menu{overflow-y:auto}.editor-command-bar{pointer-events:all;display:flex;box-sizing:border-box;--text-color: #606060;--primary-color: #0064ff;--selected-color: #f8f8f8;--separator-color: #e8e8e8;--warn-color: #fdf4f4}.editor-command-bar.fixed.toolbar{box-shadow:none}.editor-command-bar.menu{flex:1;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:5px 0}.editor-command-bar.menu .command-item.standard{color:#2d2d2e;user-select:none;transition:background 20ms ease-in 0s;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:#909090}.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.standard.disabled .menu-item-icon{color:#c7c7c7}.editor-command-bar.menu .command-item.separator{height:1px;margin:4px 0;background-color:#dfe1e5;width:100%}.editor-command-bar.menu .command-item.section{font-size:.8em;color:#ccc;padding:5px 5px 5px 10px;cursor:initial;user-select:none}.editor-command-bar.menu .command-item.selected{background-color:#00245a0a}.editor-command-bar.menu .command-item.selected[data-id=delete]:not(.disabled){color:#e52727;background-color:var(--warn-color)}.editor-command-bar.menu .command-item.selected[data-id=delete]:not(.disabled) svg{color:#e52727}.editor-command-bar.menu .command-item.selected.disabled{background-color:transparent}.editor-command-bar.menu .command-item.checked{color:#0064ff}.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:#eb3723}.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:#2d2d2e;height:24px;padding:0;cursor:pointer;border-radius:3px;min-width:24px}.editor-command-bar.toolbar .command-item.selected:not(.disabled){background-color:#00245a0a}.editor-command-bar.toolbar .command-item:active:not(.disabled){background-color:#00245a0f}.editor-command-bar.toolbar .command-item.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.checked{color:#0064ff}.editor-command-bar.toolbar .command-item.checked.disabled{color:#c7c7c7}.editor-command-bar.toolbar .command-item.separator{margin:auto 2px;height:15px;min-width:1px;width:1px;background-color:#dfe1e5;padding:0;pointer-events:none;cursor:default}.editor-command-bar.toolbar .command-item .toolbar-item-name-container{display:flex;flex-direction:row;align-items:center}.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 .command-item[data-button-id=turn-into] .toolbar-item-name-container,.editor-command-bar.toolbar .command-item[data-button-id=align] .toolbar-item-name-container{width:24px;height:24px}.editor-command-bar.toolbar .editor-button+.editor-button{margin-left:5px}.editor-command-bar.footer{width:100%}.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 #c7c7c7;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:#303030;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;line-height:24px}.editor-dropdown:hover{border-color:#0064ff}.editor-dropdown.active{border-color:#0064ff;box-shadow:0 0 0 2px #338fe533}.editor-dropdown.active .dropdown-text{display:none}.editor-dropdown.active .dropdown-icon svg{color:#0064ff;transform:rotate(180deg)}.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:#0064ff;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:8px;display:flex;align-items:center;justify-content:center;cursor:pointer}.editor-dropdown .dropdown-clear-icon{color:#909090}.editor-dropdown .dropdown-clear-icon:hover{color:#0064ff}.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:8px}.editor-dropdown .dropdown-icon svg{transform:rotate(360deg);transition:transform .2s linear}.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 #0064ff;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 #0064ff}.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:#575859;border:1px solid #bebfc2;border-radius:3px;cursor:pointer}.color-palette .clear-button-container .clear-button:hover{color:#0064ff;background:#e3eeff;border:1px solid #0064ff}.color-palette .clear-button-container .clear-button:active{color:#0053cf;background:#cfe2ff;border:1px solid #0053cf}div.tippy-box[data-theme=menu] .tippy-content .editor-command-bar.menu .menu-item[data-id=text-color-palette-item]{cursor:default}.editor-input-wrap .editor-input-label{margin-top:8px;margin-bottom:8px;position:relative;font-weight:500}.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;position:relative}.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:#0064ff;box-shadow:0 0 0 2px #338fe533}.editor-input-wrap .editor-input-container .editor-input-suffix{height:100%;position:absolute;top:0px;right:10px;display:flex;align-items:center;color:#87888a;font-size:12px}.editor-input-wrap .editor-input-container .editor-input-suffix+.editor-input{padding-right:50px}.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] .command-item[data-id=link-text]{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=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:0 10px;font-weight:500;font-size:12px;line-height:24px;color:#87888a;background:#F7F8FA;min-height:initial;box-sizing:border-box;margin:5px 0}[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:#87888a}[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}[data-command-bar-id=quick-menu] div.command-item>div.menu-item-name{color:#2d2d2e}[data-command-bar-id=quick-menu] div.command-item>div.menu-item-icon{color:#2d2d2e}[data-command-bar-id=quick-menu] div.command-item.section:first-of-type{margin-top:0}div.tippy-box[data-theme=editor-tooltip]{background-color:#303030;opacity:.8;font-size:12px;border-radius:3px}div.tippy-box[data-theme=editor-tooltip] .editor-tooltip-desc{display:block;margin-top:2px;color:#fff;opacity:.5}div.tippy-box[data-theme=editor-tooltip]>.tippy-arrow:before{transform:scale(.8)}div.tippy-box[data-theme=editor-tooltip]>.tippy-content{padding:4px 10px}:root div.tippy-box[data-theme=editor-tooltip]>.tippy-content{font-weight:500}:root div.tippy-box[data-theme=editor-tooltip]>.tippy-content>div>span:nth-of-type(2){font-weight:400}.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-height:30px;border-radius:3px;font-size:14px;padding:4px 15px}: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 #0064ff}.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 .list-to-mindmap-wrap,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap{display:flex;flex-direction:row;justify-content:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=mention-button]:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=list-to-mindmap]:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=mention-button]:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=list-to-mindmap]:hover{background:rgba(0,36,90,.0392156863);border-radius:3px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=mention-button]:active:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .list-to-mindmap-wrap>button.editor-button[data-button-id=list-to-mindmap]:active:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=mention-button]:active:hover,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block .mention-button-wrap>button.editor-button[data-button-id=list-to-mindmap]:active:hover{background:rgba(0,36,90,.0588235294)}.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:center;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}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="1"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="2"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="3"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="4"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="5"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="6"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="7"]>div.list-container>button.list-marker{font-weight:700}div.editor-root div.editor-content div[data-block-type=list][data-style-heading="8"]>div.list-container>button.list-marker{font-weight:700}.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-list-type=checked] .list-container .editor-check-list-wrapper,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper{font-feature-settings:"tnum";align-items:baseline;box-sizing:border-box;color:var(--gray-120);display:inline-flex;font-size:14px;font-variant:tabular-nums;line-height:1.5715;line-height:unset;list-style:none;margin:0;padding:0}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper>span.editor-check-box>span.editor-check-box-inner,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper>span.editor-check-box>span.editor-check-box-inner{border:1px solid #c7c7c7;border-collapse:initial;border-radius:3px;direction:ltr;display:block;height:14px;left:0;position:relative;top:0;transition:all .3s;width:14px}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box{position:relative}@keyframes editorCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box:after,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box:after{animation:editorCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;border:1px solid #0064ff;border-radius:3px;content:"";height:100%;left:0;position:absolute;top:0;width:100%;box-sizing:border-box}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner{border-color:#0064ff;background-color:#0064ff}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner:after,.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper.editor-check-list-wrapper-checked>span.editor-check-box>span.editor-check-box-inner:after{width:5px;height:10px;left:2px;top:5px;border:2px solid #fff;border-left:0;border-top:0;content:" ";display:table;opacity:1;position:absolute;box-sizing:border-box;transform:rotate(45deg) scale(1) translate(-50%,-50%)}.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:#0064ff;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 [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=center]{justify-content:center}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=center]>div[data-type=block-content]{flex-grow:initial}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=right]{justify-content:flex-end}.editor-root [data-type=editor-container].root div[data-type=editor-block].list-block[data-style-align=right]>div[data-type=block-content]{flex-grow:initial}.editor-root.readonly button[data-button-id=mindmap-close]{display:none}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active .list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover .list-container{cursor:pointer}.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=ordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=ordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unchecked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=unchecked]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=checked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.active[data-list-type=checked]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=ordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=ordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unordered]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unordered]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unchecked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=unchecked]>div[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=checked]>div.list-container,.editor-root:not(.readonly) div[data-type=editor-block].list-block.hover[data-list-type=checked]>div[data-type=block-content]{background-color:#f8f8f8}.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:rgba(0,36,90,.04)}.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 .editor-check-list-wrapper:not(.editor-check-list-wrapper-checked)>span.editor-check-box:hover>span.editor-check-box-inner{border-color:#0064ff}.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=checked] .list-container .editor-check-list-wrapper,.editor-root:not(.readonly) div[data-type=editor-block].list-block[data-list-type=unchecked] .list-container .editor-check-list-wrapper{cursor:pointer}[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:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block].list-block [data-type=block-content][data-content-placeholder]:before{left:2px}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;vertical-align:middle;padding:2px 0;max-width:100%}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block] div[data-type=block-content]>span.math-box>span[data-type=box-content]{width:100%;overflow-x:auto;display:inline-flex;align-items:center}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{flex-shrink:0}div.editor-root div.editor-content div[data-type=editor-container] .embed-block.selected[data-embed-type=math]>div[data-type=block-content].mathjax-overflow:before{width:var(--mathjax-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}div.editor-root div.editor-content div[data-type=editor-block],.status-box-editor-popup{--orange: #F59300;--orange-bkg: #FFF0D9;--grey: #87888A;--grey-bkg: #EDEFF2;--red: #EB3723;--red-bkg: #FFEAE8;--primary: #0064FF;--primary-bkg: #E3EEFF;--green: #00A865;--green-bkg: #D7F7EA;--purple: #8851ED;--purple-bkg: #F0E8FF}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box span[data-type=box-content]{margin-left:0;margin-right:0;padding-left:2.5px;padding-right:2.5px}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-yellow{background-color:var(--orange-bkg);color:var(--orange)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-yellow-subtle{color:#fff;background-color:var(--orange)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-grey{background-color:var(--grey-bkg);color:var(--grey)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-grey-subtle{color:#fff;background-color:var(--grey)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-red{background-color:var(--red-bkg);color:var(--red)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-red-subtle{color:#fff;background-color:var(--red)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-blue{background-color:var(--primary-bkg);color:var(--primary)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-blue-subtle{color:#fff;background-color:var(--primary)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-green{background-color:var(--green-bkg);color:var(--green)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-green-subtle{color:#fff;background-color:var(--green)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-purple{background-color:var(--purple-bkg);color:var(--purple)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-purple-subtle{color:#fff;background-color:var(--purple)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box>[data-type=box-content]{max-width:100%;display:inline-flex;align-items:center;vertical-align:top;position:relative;top:calc((var(--font-size) * var(--line-height) - 20px) / 2)}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common{max-width:100%;line-height:20px;padding:0 5px;border-radius:3px;font-size:12px;height:20px;cursor:pointer;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:inline-block;font-weight:500}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common.box-status-empty{color:#87888a}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common:hover{outline:1px solid #408CFF}div.editor-root div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.history-deleted-box .box-status-common{text-decoration:line-through}.status-box-editor-popup{width:178px;padding-top:1px}.status-box-editor-popup .status-input input{caret-color:#0064ff}.status-box-editor-popup .scale-border:after,.status-box-editor-popup .status-color-palette .status-box-button.selected:after,.status-box-editor-popup .status-color-palette .status-box-button:hover:after{content:"";outline:1px solid #0064ff;border-radius:3px;position:absolute;left:0;right:0;top:0;bottom:0;transform:scale(1.1)}.status-box-editor-popup .status-color-palette{display:flex;padding:6px 4px 5px}.status-box-editor-popup .status-color-palette .status-box-button+.status-box-button{margin-left:5px}.status-box-editor-popup .status-color-palette .status-box-button{width:24px;height:24px;border:none;outline:none;cursor:pointer;border-radius:3px;position:relative}.status-box-editor-popup .status-color-palette .status-box-button.selected:after{outline:1px solid var(--primary-color)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=grey]{background-color:var(--grey-bkg);border:1px solid var(--grey)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=blue]{background-color:var(--primary-bkg);border:1px solid var(--primary)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=yellow]{background-color:var(--orange-bkg);border:1px solid var(--orange)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=red]{background-color:var(--red-bkg);border:1px solid var(--red)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=green]{background-color:var(--green-bkg);border:1px solid var(--green)}.status-box-editor-popup .status-color-palette .status-box-button[data-color=purple]{background-color:var(--purple-bkg);border:1px solid var(--purple)}[data-command-bar-id=status-box-popup] .tippy-content{padding-left:6px;padding-right:6px}div.editor-root.readonly div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common{cursor:default}div.editor-root.readonly div.editor-content div[data-type=editor-block] div[data-type=block-content]>span.status-box .box-status-common:hover{outline:none}.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 div[data-type=block-tools] .table-resize-gripper,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=block-tools] .table-resize-gripper>.table-resize-gripper-indicator,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=block-tools] .table-border-bar-container,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=block-tools] .table-border-bar-container.top,div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.top{left:0;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=block-tools] .table-border-bar-container.left,div[data-type=editor-block].table-block div[data-type=table-tools] .table-border-bar-container.left{top:20px;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=block-tools] .table-border-bar-container .table-border-bar,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=block-tools] .table-border-bar-container .table-border-bar.left,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=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell,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:#dfe1e5;position:relative;flex-grow:0;flex-shrink:0}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.corner,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);height:var(--table-bar-width)}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.top,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=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell:hover,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:#d4d6d9}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.selected,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:#0064ff}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .table-border-bar-cell.danger,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=block-tools] .table-border-bar-container .table-border-bar .button-root,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=block-tools] .table-border-bar-container .table-border-bar .button-root.top,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=block-tools] .table-border-bar-container .table-border-bar .button-root.top:last-child,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=block-tools] .table-border-bar-container .table-border-bar .button-root.left,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=block-tools] .table-border-bar-container .table-border-bar .button-root.left:last-child,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container.top,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container.left,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .insert-indicator,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-indicator,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .insert-column-button span.icon,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container:hover .drop-marker,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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker,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:#0064ff;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=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:after,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:2px;background-color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}div[data-type=editor-block].table-block div[data-type=block-tools] .table-border-bar-container .table-border-bar .button-root .button-container .drop-marker:before,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:2px;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=block-tools] .editor-table-chart,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;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 #dfe1e5;background-color:transparent;background-clip:padding-box}div[data-type=editor-block].table-block div[data-type=table-content]>table tr td.danger{background-color:#fff6f5!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;cursor:pointer;transform:rotate(0);transition:transform .2s;background-color:transparent;color:#575859}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn:hover{background-color:#e8e8e8}div[data-type=editor-block].table-block div[data-type=table-content]>table td .table-cell-menu-btn.active{transform:rotate(180deg);background:#f7f8fa}div[data-type=editor-block].table-block div[data-type=table-content]>table td>div[data-type=editor-container].child>div.container-blocks>*+*{margin-top:5px}div[data-type=editor-block].table-block div[data-type=table-content] .child{padding:8px}div[data-type=editor-block].table-block div[data-type=table-content] .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] .child div[data-type=editor-block].table-block>div[data-type=block-content] .scroll-container{overflow:hidden}div[data-type=editor-block].table-block div[data-type=table-content] .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:#f7f8fa}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:#f7f8fa}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.full-selected>div[data-type=block-content]>.scroll-container-root>.scroll-container>.scroll-area>div[data-type=table-content]>table td,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 th,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 tr{background-color:transparent}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{cursor:pointer;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:#408cff}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:20px}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[data-type=editor-block].table-block.locked-by-self>[data-type=block-content]:after,div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content]:after{display:none}div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content],div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-others>[data-type=block-content] div[data-type=table-content]{position:relative}div.editor-root:not(.readonly) div[data-type=editor-block].table-block.locked-by-self>[data-type=block-content] div[data-type=table-content]:after,div.editor-root:not(.readonly) 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:#2d2d2e;opacity:.3}.editor-root .editor-content div[data-type=editor-block].table-block div[data-type=block-tools] .block-helper{right:calc(100% + 5px);top:35px}[data-command-bar-id=table-row-column-toolbar] .editor-command-bar.toolbar{padding:4px}div.comment-editor-root div[data-type=editor-block].table-block>div[data-type=block-content]{left:0px}div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-rows].selected,div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-columns].selected{background-color:#fff6f5}div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-rows].selected svg,div[data-command-bar-id=table-row-column-toolbar] .tippy-box .tippy-content button.command-item[data-id=delete-columns].selected svg{color:#eb3723}div[data-command-bar-id=table-cell-menu] .tippy-box .tippy-content .editor-command-bar.menu .command-item.selected[data-id=delete-select-row],div[data-command-bar-id=table-cell-menu] .tippy-box .tippy-content .editor-command-bar.menu .command-item.selected[data-id=delete-select-col]{color:#eb3723;background-color:#fff6f5}.editor-root [data-type=editor-container].root div[data-type=editor-block].code-block{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>div[data-type=block-tools] .code-block-header .code-header-button[data-id=caption]{display:none}.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:32px 10px 24px 32px;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,.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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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,.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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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,.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.code-line-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.code-line-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.code-line-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,.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.code-line-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.code-line-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,.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.code-line-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,.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.code-line-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.comment-editor-root [data-type=editor-container].root div[data-type=editor-block].code-block{min-width:0}.editor-root:not(.mobile) [data-type=editor-container].root div[data-type=editor-block].code-block{min-width:360px}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=center] [data-type=block-content][data-content-placeholder]:before{justify-content:center}div.editor-root:not(.readonly) div.editor-content div[data-type=editor-container] div[data-type=editor-block][data-style-align=right] [data-type=block-content][data-content-placeholder]:before{justify-content:right}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:#bebfc2}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:#bebfc2;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{pointer-events:none;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}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 #0064ff;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:#0064ff;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:#0064ff;opacity:.1}.editor-root.readonly 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,.editor-root div.editor-content.dragging .embed-block[data-type=editor-block][data-embed-type=image] [data-type=block-content] .images .image-splitter{visibility:hidden}.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].block-hidden{display:none}.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=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-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 #0064ff}.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:first-child:last-child{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 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:#0064ff}.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:#0064ff}.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 #0064ff}.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:5px;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].block-exclusive:after{content:attr(data-exclusive-tips);position:absolute;top:0px;left:0px;width:100%;background:#F7F8FA;border-radius:var(--editor-border-radius);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:14px;line-height:22px;color:#87888a;text-align:center;padding:9px 0;z-index:1000}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self>[data-type=block-content],.editor-root:not(.readonly) div[data-type=editor-block].locked-by-others>[data-type=block-content]{position:relative}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) 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:#2d2d2e;opacity:.3}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self.locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) div[data-type=editor-block].locked-by-others.text-block>[data-type=block-content]:after,.editor-root:not(.readonly) div[data-type=editor-block].locked-by-others.locked-by-self>[data-type=block-content]:after{pointer-events:none}.editor-root:not(.readonly) div[data-type=editor-block].locked-by-self.text-block>[data-type=block-content]:after,.editor-root:not(.readonly) 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.dragging *{cursor:grabbing!important}.editor-root .editor-content.dragging div[data-type=editor-block] iframe{pointer-events:none}.editor-root .editor-content .editor-drop-indicator{position:absolute;background-color:var(--primary-color);pointer-events:none;transition:top .2s linear,left .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:pointer;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[data-type=move]{cursor:grab}.editor-root .editor-content div[data-type=editor-block] div[data-type=block-tools] .block-helper .block-button:hover{background-color:#00245a0a}.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:grid;grid-template-columns:repeat(7,24px);grid-row-gap:10px;grid-column-gap:5px}.editor-command-bar-root .editor-command-bar .command-item.menu-item .text-styles .text-style-section .style-icon{height:24px;padding:0;margin: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:#0064ff}.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;color:#2d2d2e;font-weight:500;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-container:hover{border:1px solid #0064ff}.editor-find-dialog .editor-find-dialog-input-container:focus{border:1px solid #0064ff;box-shadow:0 0 0 2px #0064ff33}.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:#2d2d2e;background-color:var(--editor-find-dialog-button-border-bg-color);border:none;display:flex;flex-direction:row;align-items:center;padding:0}.editor-find-dialog .editor-find-dialog-icon-button:hover{color:#0064ff}.editor-find-dialog .editor-find-dialog-icon-button:active{color:#0053cf}.editor-find-dialog .editor-find-dialog-button{padding:4px 15px;cursor:pointer;background:#ffffff;border:1px solid #bebfc2;color:#575859;margin:0 4px;font-family:inherit;line-height:20px;border-radius:3px}.editor-find-dialog .editor-find-dialog-button.icon-button{width:32px;height:32px}.editor-find-dialog .editor-find-dialog-button:enabled:hover{color:#0064ff;background:#e3eeff;border:1px solid #0064ff}.editor-find-dialog .editor-find-dialog-button:enabled:active{color:#0053cf;background:#cfe2ff;border:1px solid #0053cf}.editor-find-dialog .editor-find-dialog-button:last-of-type{margin-right:0}.editor-find-dialog .editor-find-dialog-primary-button{color:#fff;background:#0064ff;border:1px solid #0064ff;transition:ease-in .1s}.editor-find-dialog .editor-find-dialog-primary-button:enabled:hover{color:#fff;background:#408cff;border:1px solid #408cff}.editor-find-dialog .editor-find-dialog-primary-button:enabled:active{color:#fff;background:#0053cf;border:1px solid #0053cf}.editor-find-dialog .editor-find-dialog-action{margin:12px 0 20px}.editor-find-dialog .editor-find-dialog-button:disabled{color:#575859;background:#dfe1e5;opacity:.5;border:1px solid #bebfc2;cursor:not-allowed}.editor-find-dialog .editor-find-dialog-primary-button:disabled{color:#fff;background:#0064ff;opacity:.5;border:1px solid #0064ff}.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:#575859;border:var(--editor-find-dialog-button-border);background-color:var(--editor-find-dialog-button-border-bg-color);padding:0;width:30px;height:30px;display:flex;justify-content:center;align-items:center}.editor-find-dialog .editor-find-dialog-icon-button-border:hover{background:#e3eeff;border:1px solid #0064ff}.editor-find-dialog .editor-find-dialog-icon-button-border:active{background:#cfe2ff;border:1px solid #0053cf}.editor-find-dialog .editor-find-dialog-button-close{margin:0 0 0 8px;cursor:pointer;border-radius:4px;color:#2d2d2e;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-button-close:hover{color:#0064ff}.editor-find-dialog .editor-find-dialog-button-close:active{color:#0053cf}.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{pointer-events:none}.editor-find-dialog .editor-highlight .editor-highlight-child{opacity:.1;position:absolute;background-color:#eb3723}.editor-find-dialog .editor-highlight.active .editor-highlight-child{opacity:.3;position:absolute;background-color:#eb3723}.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{pointer-events:none}.editor-highlight .editor-highlight-child{opacity:.1;position:absolute;background-color:#eb3723}.editor-highlight.active .editor-highlight-child{opacity:.3;position:absolute;background-color:#eb3723}.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}body>div.editor-context-menu[data-tippy-root].zh-CN{min-width:200px}body>div.editor-context-menu[data-tippy-root].en-US,body>div.editor-context-menu[data-tippy-root].ja-JP{min-width:200px}body>div.editor-context-menu[data-tippy-root]>div.tippy-box>div.tippy-content{padding:0}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item{cursor:pointer}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item.disabled{cursor:not-allowed}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item.disabled>div.item-subtext{color:#c7c7c7}body>div.editor-context-menu[data-tippy-root] .editor-command-bar.menu>div.command-item>div.item-subtext{margin-left:10px}.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{max-width:100%;display:inline-block;min-width:calc(100% - 40px);padding-top:2px}.comment-editor-root div.editor-root div.editor-content{padding:0}.comment-editor-root div.editor-root div.editor-content>div[data-type=editor-container].root>div.container-blocks>*+*{margin-top:0}.comment-editor-img{float:right;color:#c1c1c1;padding:0;margin-top:2px;width:24px;height:24px;justify-content:center}.comment-editor-root:not(.comment-editor-readonly) .editor-root .editor-content [data-type=editor-block]:not([data-block-type=text]){width:224px}.comment-editor-editing{border:1px solid #0064ff}.comment-editor-readonly{border:none;padding-left:calc(var(--editor-comment-avatar-width, 22px) + 5px);margin:0}.comment-editor-readonly .comment-editor-img{display:none}.comment-item-root{position:relative}.comment-item-root:not(.last-comment-item):before{content:" ";display:block;position:absolute;left:10px;width:1px;background-color:#dfe1e5;overflow:hidden;opacity:.8;top:21px;bottom:-12px;transform:scaleX(.5)}.comment-item-root .item-head{padding:0;position:relative;display:flex;align-items:center}.comment-item-root .item-head-avatar{margin-right:5px;width:var(--editor-comment-avatar-width, 22px);height:var(--editor-comment-avatar-width, 22px);border-radius:100%}.comment-item-root .item-head-avatar-string{display:flex;align-items:center;justify-content:center;font-size:12px;color:#fff;background-color:var(--comment-avatar-color);flex-shrink:0}.comment-item-root .item-head-username{font-size:var(--editor-comment-username-font-size, 12px);color:#2d2d2e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.comment-item-root .item-head-modified{margin-left:10px;font-size:12px;color:#87888a;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{color:#2d2d2e}.comment-item-root .item-head-tools .editor-text-button:hover{color:#0064ff}.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;padding:0 10px}.comment-item-root .item-actions .editor-button{padding:4px 10px;line-height:1}.comment-item-root .item-actions.hidden{display:none}.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{color:#575859;font-size:12px}.comment-quick-reply .quick-reply-button.editor-text-button:hover{color:var(--text-button-color-hover, #0064ff);background-color:var(--text-button-bg-color-hover, transparent)}.comment-quick-reply .quick-reply-button.editor-text-button:active{color:#0053cf;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;padding:0 10px}.comment-quick-reply .quick-reply-editor .reply-editor-actions .editor-button{padding:4px 10px;line-height:1}.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);--editor-comment-quote-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,.editor-root .editor-content div[data-type=editor-block] span[data-type=editor-box].comment{border-bottom:2px solid #f8e6ab}.editor-root .editor-content div[data-type=editor-block] span.text.comment.active,.editor-root .editor-content div[data-type=editor-block] span[data-type=editor-box].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:284px;padding:0 10px 10px;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)}.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:29}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head{display:flex;align-items:center;justify-content:space-between}.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:20px;height:20px;color:#87888a;padding-bottom:10px;padding-top:10px;padding-right:12px;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:12px;background-color:#d4d6d9;margin-right:6px;float:left;border-radius:10px;margin-top:4px}.editor-web-comment-root .comment-groups-container .comment-group-item-root .comment-item-head .item-head-switch{display:flex;align-items:center;height:22px;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:#f59300}.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{color:#5587f0;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] span.file-icon svg{width:18px}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;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;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;flex-direction:row;align-items:center;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:24px;height:24px}div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container] div.embed-block[data-type=editor-block][data-embed-type=office] [data-type=block-content]{min-width:360px}div.editor-root:not(.mobile) 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{min-width:360px}:root{--editor-version-button-border: black;--editor-bg-color: #ffffff;--editor-version-list-bg-color: white;--editor-version-select-bg-color: #F0F6FF}.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.loading .version-viewer .version-info-container{display:none}.version-dialog .version-loading{display:flex;flex:1;align-items:center;justify-content:center}.version-dialog .version-loading svg{width:28px;height:28px}.version-dialog .version-item-latest{color:#0064ff;background-color:#e3eeff;height:20px;padding:0 5px;border-radius:3px;display:inline-flex;align-items:center;font-size:12px;font-weight:400;margin-left:10px}.version-dialog .version-viewer{flex:1;display:flex;flex-direction:column;width:0;padding:0;min-width:0}.version-dialog .version-viewer .version-dialog-editor{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-right .text-3{color:#909090}.version-dialog .version-viewer .version-info-container .version-info-left{display:flex;align-items:center}.version-dialog .version-viewer .version-info-container .version-info-left .text-1,.version-dialog .version-viewer .version-info-container .version-info-left .text-2{color:#909090}.version-dialog .version-viewer .version-info-container .version-info-left .name{padding-left:5px;padding-right:10px;font-weight:500}.version-dialog .version-viewer .version-info-container .version-info-left .name .version-item-latest{margin-left:5px}.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] [data-type=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-inserted-block[data-type=editor-block]{position:relative}.editor-root.history .history-inserted-block[data-type=editor-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: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: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=block-content]{border:4px solid var(--op-selected-color)}.editor-root.history .history-deleted-block [data-type=block-content]{position:relative}.editor-root.history .history-deleted-block [data-type=block-content]:after,.editor-root.history .history-deleted-block [data-type=block-content]:before{content:" ";position:absolute;display:flex;z-index:2000;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=block-content]:before{transform:rotate(135deg)}.editor-root.history .history-deleted-block{position:relative}.editor-root.history .history-deleted-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:10;font-size:14px;font-weight:400;white-space:nowrap;border-radius:3px}.editor-root.history .history-deleted-block.history-deleted-box{background-color:unset!important;text-decoration:unset!important}.editor-root.history .history-deleted-block.history-deleted-box:hover:after{opacity:0}.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: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: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:#0064ff}.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:350px;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 6px 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-header .version-list-filter .editor-command-bar.toolbar .command-item{cursor:pointer}.version-list-root .version-list-header .version-list-filter .editor-command-bar.toolbar .command-item .toolbar-item-dropdown-container{margin-left:5px}.version-list-root .version-list-header .version-list-filter .editor-command-bar.toolbar .command-item:not(.disabled):hover{color:#0064ff}.version-list-root .version-list-header .version-list-filter .editor-command-bar.toolbar .command-item.selected:not(.disabled){background-color:transparent}.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:not(:last-child):after{content:"";display:block;position:relative;top:15px;border-bottom:1px solid #e8e8e8}.version-list-root .version-list-content .version-item:not(:last-child):hover:after,.version-list-root .version-list-content .version-item:not(:last-child).active:after{left:-10px;width:106%}.version-list-root .version-list-content .version-item.child{padding-left:32px}.version-list-root .version-list-content .version-item:not(.active):hover{background:#f8f8f8}.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.active .version-item-title .version-item-date{color:#0064ff}.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 #0064ff}.version-list-root .version-list-content .version-item .version-item-restore-from{color:#87888a;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;display:flex;margin-top:5px}.version-list-root .version-list-content .version-item .memo-input.size-limit-textarea textarea{line-height:22px;padding:4px 9px;box-sizing:border-box;font-size:14px}.version-list-root .version-list-content .version-item .version-item-title{display:flex;align-items:center;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;font-weight:500;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#2d2d2e}.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 10px;color:#909090}.version-list-root .version-list-content .version-item .version-item-title .version-actions button:hover{color:#0064ff}.version-list-root .version-list-content .version-item .version-item-title .version-actions button.disabled,.version-list-root .version-list-content .version-item .version-item-title .version-actions button.disabled:hover{color:#c7c7c7}.version-list-root .version-list-content .version-item .version-item-title .version-actions .revert-button{border-left:1px solid #e8e8e8;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;margin-top:10px;color:#606060;line-height:22px}.version-list-root .version-list-content .version-item .version-item-author .version-item-author-name{color:#575859}.version-list-root .version-list-content .version-item .version-item-author-mark{width:6px;height:6px;border-radius:3px;margin-right:5px;flex-shrink:0;margin-top:8px}.version-list-root .version-list-content .version-item .version-item-memo{font-size:14px;color:#303030;padding:5px 10px;border-radius:3px;margin-top:5px;line-height:22px}.version-list-root .version-list-content .version-item .version-item-memo:empty{display:none}.versions-dropdown-header{color:var(--text-color);padding:10px;border-bottom:1px solid #f0f0f0}.versions-dropdown-header .versions-dropdown-header-info{font-family:PingFang SC;color:#909090}.versions-dropdown-header .versions-dropdown-header-icon{display:inline-flex;vertical-align:middle;height:19px;padding-left:5px;padding-right:5px;cursor:pointer;color:#909090}.versions-dropdown-header .versions-dropdown-header-icon svg{vertical-align:baseline}.editor-command-bar.menu .command-item.standard[data-id=prev-version]{height:44px}[data-command-bar-id=versions-dropdown-popup]{width:320px;font-family:inherit}[data-command-bar-id=versions-dropdown-popup] .tippy-box{color:var(--text-color);line-height:normal}[data-command-bar-id=versions-dropdown-popup] .tippy-box .version-item-empty{width:100%}[data-command-bar-id=versions-dropdown-popup] .tippy-box .version-item-name{color:var(--text-color)}[data-command-bar-id=versions-dropdown-popup] .tippy-box .editor-command-bar.menu .command-item.standard.disabled{color:#909090}[data-command-bar-id=versions-dropdown-popup] .tippy-box .editor-command-bar{--text-color: #303030}[data-command-bar-id=versions-dropdown-popup] .tippy-box .editor-command-bar.menu .command-item.section{padding:0;font-size:inherit;color:inherit}[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;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}[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:#0064ff;background-color:#eaf3fc;height:20px;padding:0 5px;margin-left:10px;border-radius:3px;font-size:12px;display:inline-flex;align-items:center}[data-command-bar-id=versions-dropdown-popup] .command-item .version-item-empty{display:flex;height:34px;color:#909090;padding-left:10px;justify-content:left;align-items:center}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item{width:100%}[data-command-bar-id=versions-dropdown-popup] .command-item .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;font-size:12px}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container{height:34px;display:flex;align-items:center;padding-left:10px;color:#303030;cursor:pointer}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container .filter-item-label{cursor:pointer}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container .editor-checkbox-wrapper{margin-right:4px}[data-command-bar-id=versions-dropdown-popup] .command-item .filter-memoed-version-item .filter-item-input-container:hover .editor-checkbox-wrapper:not(.checked)>span.editor-checkbox>span.editor-checkbox-inner{border-color:#0064ff}.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] div[data-type=block-tools] .block-helper .block-button~.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:pointer;margin:0;padding:0;display:flex;align-items:center;justify-content:center;background-color:transparent;border:none;border-radius:3px;box-sizing:content-box}.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:#00245a0a}.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{color:#87888a;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{color:#c7c7c7;cursor:default}.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;text-align:start}.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-icon .mention-user-avatar-string{align-items:center;display:flex;justify-content:center;overflow:hidden;height:100%;width:100%;font-size:12px;color:#fff;flex-shrink:0}[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:#0064ff}.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%}:root .iframe-embed-auth-error-tips{width:100%;height:34px;line-height:34px;background-color:#f7f8fa;text-align:center;color:#bebfc2;z-index:9910;position:fixed;top:0;left:0;box-shadow:0 2px 4px #2d2d2e26,0 0 1px #2d2d2e1a}:root .iframe-embed-auth-error-tips span{cursor:pointer;color:#0064ff;user-select:none}:root .iframe-embed-auth-error-tips.success{background-color:#ebfcf5;color:#008f57}.ones-editor-toast[data-theme=warn]{background-color:#f59300}.ones-editor-toast[data-theme=warn] .toast-message{display:inline-flex;align-items:center}.ones-editor-toast[data-theme=warn] .toast-message svg{margin-right:8px;width:24px;height:24px;fill:#fff}:root{--editor-quoted-color: #7084a4;--editor-drawio-empty-svg: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zOC43MjAzIDI4LjcwOTdIMjUuOTIzM0MyNS4yMTY1IDI4LjcwOTcgMjQuNjQzNSAyOC4xNDgxIDI0LjY0MzUgMjcuNDU1MlYyNS43MzMzSDIwLjUyODNDMjAuNDk4NiAyNS43Njk2IDIwLjQ2NjkgMjUuODA0MiAyMC40MzMzIDI1LjgzN0wxNS45MTkyIDMwLjI2MjFWMzQuNzU1NkgyNC42NDM1VjMzLjcyNzZDMjQuNjQzNSAzMy4wMzQ4IDI1LjIxNjUgMzIuNDczMiAyNS45MjMzIDMyLjQ3MzJIMzguNzIwM0MzOS40MjcgMzIuNDczMiA0MCAzMy4wMzQ4IDQwIDMzLjcyNzZWMzguNzQ1NUM0MCAzOS40MzgzIDM5LjQyNyA0MCAzOC43MjAzIDQwSDI1LjkyMzNDMjUuMjE2NSA0MCAyNC42NDM1IDM5LjQzODMgMjQuNjQzNSAzOC43NDU1VjM3LjMzMzNIMTQuNjI2M0MxMy45MTIyIDM3LjMzMzMgMTMuMzMzMyAzNi43NTYyIDEzLjMzMzMgMzYuMDQ0NFYzMC42OTQxTDguMzc4NTIgMjUuODM3QzguMTM2MjYgMjUuNjAxNCA4IDI1LjI4MDggOCAyNC45NDYzQzggMjQuNjExOCA4LjEzNjI2IDI0LjI5MTEgOC4zNzg1MiAyNC4wNTU2TDEzLjMzMzMgMTkuMTk4NVYxNS43NzJDMTEuNzc5OCAxNS4yMjI5IDEwLjY2NjcgMTMuNzQxNiAxMC42NjY3IDEyQzEwLjY2NjcgOS43OTA4NSAxMi40NTc1IDggMTQuNjY2NyA4QzE2Ljg3NTggOCAxOC42NjY2IDkuNzkwODUgMTguNjY2NiAxMkMxOC42NjY2IDEzLjcyNjUgMTcuNTU4OCAxNS4yNTgxIDE1LjkxOTEgMTUuNzk4OFYxOS4yODg4QzE1LjkxOTEgMTkuMzkxOCAxNS45MDY4IDE5LjQ5NDMgMTUuODgyMyAxOS41OTQzTDE5LjUxNTEgMjMuMTU1NUgyNC42NDM1VjIyLjQzNzNDMjQuNjQzNSAyMS43NDQ1IDI1LjIxNjUgMjEuMTgyOSAyNS45MjMzIDIxLjE4MjlIMzguNzIwM0MzOS40MjcgMjEuMTgyOSA0MCAyMS43NDQ1IDQwIDIyLjQzNzNWMjcuNDU1MkM0MCAyOC4xNDgxIDM5LjQyNyAyOC43MDk3IDM4LjcyMDMgMjguNzA5N1pNMjcuMjAzIDM3LjQ5MUgzNy40NDA2VjM0Ljk4MjFIMjcuMjAzVjM3LjQ5MVpNMTQuNDA1OSAyOC4xOTU0TDExLjA5MTUgMjQuOTQ2M0wxNC40MDU5IDIxLjY5NzJMMTcuNzIwNCAyNC45NDYzTDE0LjQwNTkgMjguMTk1NFpNMjcuMjAzIDI2LjIwMDhIMzcuNDQwNlYyMy42OTE4SDI3LjIwM1YyNi4yMDA4WiIgZmlsbD0iIzA3MTQyQSIvPgo8L3N2Zz4K)}.flex-center,.editor-drawio-iframe-container.loading: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].drawio-load-error>div[data-type=block-content]{padding:0;min-height:200px}div.editor-root div.editor-content div[data-type=editor-container] div[data-type=editor-block].embed-block[data-embed-type=drawio].drawio-load-error>div[data-type=block-content] .editor-drawio-content{width:100%;height:100%;min-height:inherit}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{display:flex;flex-direction:column;align-items:center;justify-content:center}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>div.drawio-error-content{width:100%;height:100%;background-color:#f8f8f8;display:flex;flex-direction:column;justify-content:center;text-align:center;flex:1}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>div.drawio-error-content>div.drawio-error-brand-icon>svg{width:48px;height:48px}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>div.drawio-error-content>div.drawio-error-title{font-weight:500;font-size:18px;line-height:26px;text-align:center;color:#303030;margin:23px 0 5px}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>div.drawio-error-content>div.drawio-error-sub-title{font-size:14px;line-height:22px;text-align:center;color:#606060}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>div.drawio-error-content>div.drawio-error-sub-title>span.drawio-error-retry-button{cursor:pointer;margin-left:4px;color:#0064ff}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] .drawio-empty-content{display:flex;flex-direction:column;align-items:center}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] .drawio-empty-content>span{font-size:14px;line-height:22px;text-align:center;color:#606060;margin-top:23px}.embed-block .editor-drawio-content.editor-embed{width:100%;min-height:80px;display:inline-block;text-align:center}.embed-block .editor-drawio-content.editor-embed .editor-empty-drawio{width:240px;height:400px}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%}.editor-drawio-iframe-container.loading:before{content:attr(data-placeholder);position:absolute;top:0;left:0;background-color:#f7f6f3;z-index:2}:root div[data-command-bar-id=webpage]>div.tippy-box{max-width:500px}:root div[data-command-bar-id=webpage]>div.tippy-box div.tippy-content{width:500px;padding:0}.editor-dialog-container{width:500px}.editor-dialog-container .dialog-header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:0 20px;height:50px;border-bottom:1px solid #e8e8e8;margin-bottom:20px}.editor-dialog-container .dialog-header .close-icon{display:flex;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:0 20px 20px;border-bottom:1px solid #e8e8e8}.editor-dialog-container .dialog-footer{margin:10px 0;padding:0 20px;text-align:right}.editor-dialog-container .dialog-footer button{min-height:30px;border-radius:3px;font-size:14px;padding:4px 15px}.editor-disable-scroll.editor-disable-scroll-dark{background-color:#00000080}.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 #0064ff;margin-top:16px;margin-bottom:16px}.webpage-content .help-container .help-content{display:flex;align-items:flex-start}.webpage-content .help-container .help-content .help-icon{display:flex;align-items:center;height:20px;color:#0064ff;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:#0064ff;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}.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;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[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=mermaid],.embed-block[data-embed-type=flowchart],.embed-block[data-embed-type=plantuml]{display:flex;flex-direction:row;align-items:center;justify-content:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content],.embed-block[data-embed-type=flowchart] div[data-type=block-content],.embed-block[data-embed-type=plantuml] div[data-type=block-content]{width:100%;position:relative;border:1px solid #e5e5e5;border-radius:3px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .empty-embed,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .empty-embed,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .empty-embed{width:100%;min-height:106px;background-color:#cdcdcd40}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .empty-embed:after,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .empty-embed:after,.embed-block[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[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed),.embed-block[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed){width:100%;height:100px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed) img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .invalid-code:not(.empty-embed) img{display:none}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .invalid-code:not(.empty-embed):after,.embed-block[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[data-embed-type=mermaid] div[data-type=block-content] .embed-img-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-img-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-img-content{width:100%;text-align:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .mermaid-embed-img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .mermaid-embed-img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .mermaid-embed-img{max-width:100%;min-width:200px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .editor-plantuml-img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .editor-plantuml-img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .editor-plantuml-img{max-width:100%}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content{width:100%;text-align:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .embed-graph-img-content img,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .embed-graph-img-content img,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .embed-graph-img-content img{max-width:100%}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed{width:100%}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content{width:100%;height:100%;min-height:200px;background-color:#f8f8f8;display:flex;flex-direction:column;justify-content:center;text-align:center}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content>div.graph-error-brand-icon>svg,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-error-brand-icon>svg{width:48px;height:48px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-title,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-title{font-weight:500;font-size:18px;line-height:26px;text-align:center;color:#2d2d2e;margin:23px 0 5px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title{font-size:14px;line-height:22px;text-align:center;color:#87888a}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-error-content div.graph-error-sub-title>span.graph-error-retry-button,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content div.graph-error-sub-title>span.graph-error-retry-button{cursor:pointer;margin-left:4px;color:#0064ff}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content{background-color:#fff}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-brand-icon>svg,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-brand-icon>svg,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-brand-icon>svg{width:48px;height:48px}.embed-block[data-embed-type=mermaid] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-empty-title,.embed-block[data-embed-type=flowchart] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-empty-title,.embed-block[data-embed-type=plantuml] div[data-type=block-content] .graph-embed div.graph-empty-content>div.graph-empty-title{font-weight:400;font-size:14px;line-height:22px;text-align:center;color:#606060;margin-top:23px}.hr-transition,.embed-block[data-type=editor-block][data-embed-type=hr] div[data-type=block-content] .editor-embed-container .editor-embed-hr{transition:border-top ease-in-out .4s}.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}.embed-block[data-type=editor-block][data-embed-type=hr]: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{display:flex;align-items:center;width:100%;height:24px;cursor:pointer}.embed-block[data-type=editor-block][data-embed-type=hr] div[data-type=block-content] .editor-embed-container .editor-embed-hr{display:block;width:100%;border:none;margin:0;border-top:2px dashed #cccccc}.embed-block[data-type=editor-block][data-embed-type=hr] div[data-type=block-tools]>div.block-helper{height:100%}: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]{display:flex}.embed-block[data-embed-type=video][data-style-align=left]>div[data-type=block-content]{justify-content:flex-start}.embed-block[data-embed-type=video][data-style-align=center]>div[data-type=block-content]{justify-content:center}.embed-block[data-embed-type=video][data-style-align=right]>div[data-type=block-content]{justify-content:flex-end}.embed-block[data-embed-type=video]>div[data-type=block-content]{border: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].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;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;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:#0064ff}.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:#0064ff;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}.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-others>[data-type=block-content]:after,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content]:after,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content]:after{display:none}.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media,.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-others>[data-type=block-content] .media{position:relative}.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-self>[data-type=block-content] .media:after,.editor-root:not(.readonly) .embed-block[data-embed-type=video].locked-by-others>[data-type=block-content] .media:after,.editor-root:not(.readonly) .embed-block[data-embed-type=audio].locked-by-self>[data-type=block-content] .media:after,.editor-root:not(.readonly) .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:#2d2d2e;opacity:.3}`)),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
2
  (function(b,vr){typeof exports=="object"&&typeof module<"u"?vr(exports,require("kiwi-intl"),require("lodash.merge"),require("string-template"),require("nanoid"),require("events"),require("query-string"),require("js-base64"),require("snabbdom"),require("blueimp-md5"),require("tiny-typed-emitter"),require("lodash.clonedeep"),require("lodash.isequal"),require("quill-delta"),require("lodash.debounce"),require("lodash.intersection"),require("ot-json1"),require("axios"),require("lodash.findlastindex"),require("reconnecting-websocket"),require("fast-sha256"),require("tippy.js"),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","blueimp-md5","tiny-typed-emitter","lodash.clonedeep","lodash.isequal","quill-delta","lodash.debounce","lodash.intersection","ot-json1","axios","lodash.findlastindex","reconnecting-websocket","fast-sha256","tippy.js","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"],vr):(b=typeof globalThis<"u"?globalThis:b||self,vr(b["oneseditor-editor"]={},b.KiwiIntl,b.merge,b.stringFormat,b.nanoid$1,b.events,b.queryString,b.jsBase64,b.snabbdom,b.md5$1,b.tinyTypedEmitter,b.cloneDeep,b.isEqual,b.Delta,b.debounce,b.intersection,b.json1,b.axios,b.findLastIndex,b.ReconnectingWebSocket,b.sha256,b.tippy$1,b.cssColorConverter,b.markmap,b.throttle$1,b.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,b.mime,b.domToImage,b.turndownPluginGfm,b.TurndownService,b.marked,b.BetterScroll,b.plantumlEncoder,b.docx))})(this,function(b,vr,Jl,q6,X6,Lb,Y6,Cf,Xs,Q6,je,J6,Z6,t9,e9,n9,r9,i9,o9,s9,l9,Sp,Lp,a9,c9,u9,$st,Hst,jst,zst,Gst,Wst,qst,Xst,Yst,Qst,Jst,Zst,tlt,elt,nlt,rlt,ilt,olt,slt,llt,alt,clt,ult,flt,dlt,hlt,mlt,glt,plt,Clt,Elt,Alt,xlt,blt,vlt,Blt,ylt,Tlt,klt,Rlt,wlt,Slt,Llt,Ilt,Dlt,_lt,Mlt,Ult,Olt,Nlt,Plt,Flt,Klt,Vlt,$lt,Hlt,jlt,zlt,Glt,Wlt,qlt,Xlt,Ylt,Qlt,Jlt,Zlt,tat,eat,f9,d9,h9,m9,Ip,g9,p9,yt){"use strict";var Kst=Object.defineProperty;var Vst=(b,vr,Jl)=>vr in b?Kst(b,vr,{enumerable:!0,configurable:!0,writable:!0,value:Jl}):b[vr]=Jl;var m=(b,vr,Jl)=>(Vst(b,typeof vr!="symbol"?vr+"":vr,Jl),Jl);const tn=n=>n&&typeof n=="object"&&"default"in n?n:{default:n};function e0(n){if(n&&n.__esModule)return n;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(t,e,r.get?r:{enumerable:!0,get:()=>n[e]})}}return t.default=n,Object.freeze(t)}const C9=tn(vr),Dp=tn(Jl),E9=tn(q6),_p=tn(Lb),n0=tn(Q6),xt=tn(J6),Ef=tn(Z6),Hn=tn(t9),Pe=tn(e9),Mp=tn(n9),r0=e0(r9),Ib=tn(i9),Db=tn(o9),A9=tn(s9),x9=e0(l9),b9=tn(Sp),v9=e0(Sp),B9=e0(a9),y9=tn(c9),wc=tn(u9),Up=tn(f9),_b=tn(d9),T9=tn(m9),Mb=tn(g9),k9=tn(p9);function R9(n){const t=r=>r<10?`0${String(r)}`:String(r),e=r=>r<10?`00${String(r)}`:r<100?`0${String(r)}`:String(r);return`${n.getFullYear()}-${t(n.getMonth()+1)}-${t(n.getDate())} ${t(n.getHours())}:${t(n.getMinutes())}:${t(n.getSeconds())}.${e(n.getMilliseconds())}`}var zi=(n=>(n.DEBUG="DEBUG",n.INFO="INFO ",n.WARN="WARN ",n.ERROR="ERROR",n))(zi||{});const Ub=new Map,Pu=class{constructor(t){m(this,"times",new Map);this.category=t}shouldLog(t){const e=Object.values(zi).indexOf(t),r=Object.values(zi).indexOf(Pu.level);return e>=r}_log(t,e,r,i){var v;if(!this.shouldLog(t))return;const o=typeof process>"u"?{}:process;let s="";if(typeof e=="object")try{s="message"in e?e.message:JSON.stringify(e,null,4)}catch{s=""}else typeof e=="string"?e&&(s=e):s=JSON.stringify(e);s=i?`${s} - ${i}`:s;const l=`${this.category}`;let c=console.log;t==="WARN "&&(c=console.warn),t==="ERROR"&&(c=console.error);const d=`${R9(new Date)}`,h=t,C=l,E=Pu.extParams?"[{date}] {level}: [{module} {extParams}] - {msg}":"[{date}] {level}: [{module}] - {msg}",A=[E9.default(((v=o.env)==null?void 0:v.LOG_TEMPLATE)||E,{date:d,level:h,module:C,msg:s,extParams:Pu.extParams})];if(typeof e=="object"){const R=e.stack;R&&A.push(R)}if(c===console.error&&Pu.debugMode){const R=new Error().stack;R&&A.push(R)}c(...A),r&&this._log(t,r)}log(t,e){this._log("INFO ",t,void 0,e)}debug(t,e){this._log("DEBUG",t,void 0,e)}info(t,e){this._log("INFO ",t,void 0,e)}warn(t,e,r){this._log("WARN ",t,e,r)}error(t,e,r){this._log("ERROR",t,e,r)}time(t){this.times.set(t,Date.now())}timeEnd(t){this.timeLog(t),this.times.delete(t)}timeLog(t){const e=this.times.get(t);if(!e){this.warn(`no time label: ${t}`);return}this.debug(`${t}: ${Date.now()-e}`)}static setExtParams(t){this.extParams=t}};let Br=Pu;m(Br,"debugMode",!1),m(Br,"level","DEBUG"),m(Br,"extParams","");function D(n){const t=Ub.get(n);if(t)return t;const e=new Br(n);return Ub.set(n,e),e}const w9={name:"ONES Editor",date:{dateFromFuture:"From the 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"},docx:{imageExportFailed:"Failed to load image"}},S9={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"},docx:{imageExportFailed:"\u56FE\u7247\u52A0\u8F7D\u5931\u8D25"}},L9={name:"ONES \u30A8\u30C7\u30A3\u30BF\u30FC",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"},docx:{imageExportFailed:"\u753B\u50CF\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F"}},I9=D("i18n"),D9={"en-US":w9,"zh-CN":S9,"ja-JP":L9},i0=C9.default.init("en-US",D9);let Ob="en-US";function _9(n=void 0){i0.setLang&&(Ob=n||"en-US",i0.setLang(n||"en-US"))}function M9(n){Dp.default(i0.__metas__,n)}function U9(n,t){const e=i0.get(n,t);return e===n&&I9.warn(`no locale value for key ${n}`),e}function O9(){return Ob}const _=Object.freeze(Object.defineProperty({__proto__:null,setLang:_9,mergeLang:M9,t:U9,getCurrentLang:O9},Symbol.toStringTag,{value:"Module"})),nat="";class Nb{constructor(t,e){this.editor=t,this.data=e}getData(){return this.data}getEditor(){return this.editor}destroy(){}}var Pb=function(){if(typeof Map<"u")return Map;function n(t,e){var r=-1;return t.some(function(i,o){return i[0]===e?(r=o,!0):!1}),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(e){var r=n(this.__entries__,e),i=this.__entries__[r];return i&&i[1]},t.prototype.set=function(e,r){var i=n(this.__entries__,e);~i?this.__entries__[i][1]=r:this.__entries__.push([e,r])},t.prototype.delete=function(e){var r=this.__entries__,i=n(r,e);~i&&r.splice(i,1)},t.prototype.has=function(e){return!!~n(this.__entries__,e)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,r){r===void 0&&(r=null);for(var i=0,o=this.__entries__;i<o.length;i++){var s=o[i];e.call(r,s[1],s[0])}},t}()}(),Op=typeof window<"u"&&typeof document<"u"&&window.document===document,o0=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),N9=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(o0):function(n){return setTimeout(function(){return n(Date.now())},1e3/60)}}(),P9=2;function F9(n,t){var e=!1,r=!1,i=0;function o(){e&&(e=!1,n()),r&&l()}function s(){N9(o)}function l(){var c=Date.now();if(e){if(c-i<P9)return;r=!0}else e=!0,r=!1,setTimeout(s,t);i=c}return l}var K9=20,V9=["top","right","bottom","left","width","height","size","weight"],$9=typeof MutationObserver<"u",H9=function(){function n(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=F9(this.refresh.bind(this),K9)}return n.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},n.prototype.removeObserver=function(t){var e=this.observers_,r=e.indexOf(t);~r&&e.splice(r,1),!e.length&&this.connected_&&this.disconnect_()},n.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},n.prototype.updateObservers_=function(){var t=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return t.forEach(function(e){return e.broadcastActive()}),t.length>0},n.prototype.connect_=function(){!Op||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$9?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},n.prototype.disconnect_=function(){!Op||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},n.prototype.onTransitionEnd_=function(t){var e=t.propertyName,r=e===void 0?"":e,i=V9.some(function(o){return!!~r.indexOf(o)});i&&this.refresh()},n.getInstance=function(){return this.instance_||(this.instance_=new n),this.instance_},n.instance_=null,n}(),Fb=function(n,t){for(var e=0,r=Object.keys(t);e<r.length;e++){var i=r[e];Object.defineProperty(n,i,{value:t[i],enumerable:!1,writable:!1,configurable:!0})}return n},Sc=function(n){var t=n&&n.ownerDocument&&n.ownerDocument.defaultView;return t||o0},Kb=l0(0,0,0,0);function s0(n){return parseFloat(n)||0}function Vb(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return t.reduce(function(r,i){var o=n["border-"+i+"-width"];return r+s0(o)},0)}function j9(n){for(var t=["top","right","bottom","left"],e={},r=0,i=t;r<i.length;r++){var o=i[r],s=n["padding-"+o];e[o]=s0(s)}return e}function z9(n){var t=n.getBBox();return l0(0,0,t.width,t.height)}function G9(n){var t=n.clientWidth,e=n.clientHeight;if(!t&&!e)return Kb;var r=Sc(n).getComputedStyle(n),i=j9(r),o=i.left+i.right,s=i.top+i.bottom,l=s0(r.width),c=s0(r.height);if(r.boxSizing==="border-box"&&(Math.round(l+o)!==t&&(l-=Vb(r,"left","right")+o),Math.round(c+s)!==e&&(c-=Vb(r,"top","bottom")+s)),!q9(n)){var d=Math.round(l+o)-t,h=Math.round(c+s)-e;Math.abs(d)!==1&&(l-=d),Math.abs(h)!==1&&(c-=h)}return l0(i.left,i.top,l,c)}var W9=function(){return typeof SVGGraphicsElement<"u"?function(n){return n instanceof Sc(n).SVGGraphicsElement}:function(n){return n instanceof Sc(n).SVGElement&&typeof n.getBBox=="function"}}();function q9(n){return n===Sc(n).document.documentElement}function X9(n){return Op?W9(n)?z9(n):G9(n):Kb}function Y9(n){var t=n.x,e=n.y,r=n.width,i=n.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,s=Object.create(o.prototype);return Fb(s,{x:t,y:e,width:r,height:i,top:e,right:t+r,bottom:i+e,left:t}),s}function l0(n,t,e,r){return{x:n,y:t,width:e,height:r}}var Q9=function(){function n(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=l0(0,0,0,0),this.target=t}return n.prototype.isActive=function(){var t=X9(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},n.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},n}(),J9=function(){function n(t,e){var r=Y9(e);Fb(this,{target:t,contentRect:r})}return n}(),Z9=function(){function n(t,e,r){if(this.activeObservations_=[],this.observations_=new Pb,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=r}return n.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Q9(t)),this.controller_.addObserver(this),this.controller_.refresh())}},n.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof Sc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;!e.has(t)||(e.delete(t),e.size||this.controller_.removeObserver(this))}},n.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},n.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},n.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(r){return new J9(r.target,r.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},n.prototype.clearActive=function(){this.activeObservations_.splice(0)},n.prototype.hasActive=function(){return this.activeObservations_.length>0},n}(),$b=typeof WeakMap<"u"?new WeakMap:new Pb,Hb=function(){function n(t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var e=H9.getInstance(),r=new Z9(t,e,this);$b.set(this,r)}return n}();["observe","unobserve","disconnect"].forEach(function(n){Hb.prototype[n]=function(){var t;return(t=$b.get(this))[n].apply(t,arguments)}});var Zl=function(){return typeof o0.ResizeObserver<"u"?o0.ResizeObserver:Hb}();class tI extends Error{constructor(t){if(super(t),this.code="Assert",this.stack){const e=this.stack.split(`
3
3
  `);if(e.length>1)if(this.lineNumber&&this.columnNumber){const r=e[1].match(/(.*)@(.*):(\d+):(\d+)/);r&&(this.lineNumber=+r[3],this.columnNumber=+r[4],this.fileName=r[2]),e.splice(0,1)}else e.splice(1,1);this.stack=e.join(`
4
4
  `)}}}function p(n,t,e){if(!t)throw n.error(`assert failed: ${e}`),new tI(e)}const eI=X6.customAlphabet("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_",8),jb="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function nI(){return jb[Date.now()%jb.length]}const it=()=>`${nI()}${eI()}`;class zb extends _p.default.EventEmitter{constructor(e=60){super();m(this,"cache",new Map);m(this,"expiredSeconds");this.expiredSeconds=e,this.startAutoClear()}delete(e){const r=this.cache.get(e);r&&this.emit("delete",r.data),this.cache.delete(e)}getSync(e,r){const i=this.cache.get(e),o=Date.now();if(i&&(o-i.lastRead)/1e3<this.expiredSeconds)return i.lastRead=o,i.data;const s=r(e);return this.cache.set(e,{lastRead:o,data:s}),s}async get(e,r){const i=this.cache.get(e),o=Date.now();if(i&&(o-i.lastRead)/1e3<this.expiredSeconds)return i.lastRead=o,i.data;const s=await r(e);return this.cache.set(e,{lastRead:o,data:s}),s}startAutoClear(){setInterval(()=>{const e=Date.now();Array.from(this.cache.entries()).forEach(([r,i])=>{(e-i.lastRead)/1e3>this.expiredSeconds&&this.delete(r)})},10*1e3)}}class Lc{constructor(){m(this,"_callbacks",new Set)}get callbacks(){return Array.from(this._callbacks)}registerCallback(t){this._callbacks.add(t)}unregisterCallback(t){this._callbacks.delete(t)}clearCallbacks(){this._callbacks.clear()}}const rI=D("await-locker");class iI{constructor(){m(this,"_acquired",!1);m(this,"_waitingResolvers",[]);this._acquired=!1,this._waitingResolvers=[]}acquireAsync(t){return this._acquired?new Promise((e,r)=>{this._waitingResolvers.push(e),t&&t>0&&setTimeout(()=>{const i=this._waitingResolvers.indexOf(e);if(i!==-1){this._waitingResolvers.splice(i,1);const o=new Error(`lock timeout: ${t}, waiting resolves: ${this._waitingResolvers.length}`);r(o)}},t)}):(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 t=this._waitingResolvers.shift();p(rI,t,"Resolver missing"),t(void 0)}else this._acquired=!1}acquired(){return this._acquired}debug(){const t=this._waitingResolvers.length;return console.log(`waiting resolves: ${t}`),{waitingCount:t}}}class oI{constructor(){m(this,"_map");this._map=new Map}getLocker(t){let e=this._map.get(t);return e||(e=new iI,this._map.set(t,e)),e}async lock(t,e){await this.getLocker(t).acquireAsync(e)}release(t){this.getLocker(t).release()}remove(t){this.isLocking(t)||this._map.delete(t)}isLocking(t){return this._map.has(t)?this.getLocker(t).acquired():!1}}const No=new oI,Po=navigator.userAgent;function ta(){const n=navigator.userAgent.toLowerCase();return n.indexOf("safari")!==-1&&!(n.indexOf("chrome")>-1)}function Af(){return navigator.userAgent.toLowerCase().indexOf("firefox")>-1}const me={isAndroid:!!Po.match(/Android/i),isIOS:!!Po.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/i),isIPad:!!Po.match(/iPad/i),isIPhone:!!Po.match(/iPhone/i),isLinux:!!Po.match(/Linux/i),isMac:!!Po.match(/Macintosh/i),isMobile:!!Po.match(/AppleWebKit.*Mobile.*/i),isWindows:!!Po.match(/Window/i),isIe:!!Po.match(/msie|trident/i),isSafari:ta(),isFirefox:Af(),isMobileSafari:!1};me.isMobileSafari=me.isMobile&&me.isSafari;const Ic=D("dom-utils");function q(n,...t){n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.add(...t)}function Mt(n,t){return n instanceof HTMLElement?n.classList.contains(t):!1}function ut(n,...t){n&&n.nodeType===Node.ELEMENT_NODE&&n.classList.remove(...t),n.classList.length===0&&n.removeAttribute("class")}function B(n,t,e,r){const i=document.createElement(n);return t&&t.length>0&&q(i,...t),e&&e.appendChild(i),r&&(typeof r=="string"?i.innerText=r.replace(/\r/g," ").replace(/\n/g," "):Kp(i,r)),i}function ea(n,t,e){const r=B("button",t,e);return r.innerHTML=n,r}function Np(n,t,e){const r=B("img",t,e);return r.src=n,r}function Gb(n,t){try{const e=document.createRange();return e.setStart(n,t),e}catch(e){p(Ic,!1,`failed to create range: ${n.childNodes.length}, ${t}, ${e.message}`)}}function a0(n,t,e,r){try{const i=document.createRange();return i.setStart(n,t),i.setEnd(e,r),i}catch(i){p(Ic,!1,`failed to create expanded range: ${n.childNodes.length}, ${t}, ${e.childNodes.length}, ${r}, ${i.message}`)}}function c0(n){const t=n.getClientRects();return p(Ic,t.length>=1,"getFirstClientRect: no rects"),t[0]}function na(n){const t=n.getClientRects();return p(Ic,t.length>=1,"getLastClientRect: no rects"),t[t.length-1]}function Ys(n,t,e){const r=n.left+n.width/2,i=n.top+n.height/2;return(r-t)**2+(i-e)**2}function Pp(n,t){const e=document.querySelectorAll(".editor-disable-scroll");e.forEach(s=>{s.style.display="none"});let r,i=null,o=-1;return document.caretPositionFromPoint?(r=document.caretPositionFromPoint(n,t),r&&(i=r.offsetNode,o=r.offset)):document.caretRangeFromPoint&&(r=document.caretRangeFromPoint(n,t),r&&(i=r.startContainer,o=r.startOffset)),e.forEach(s=>{s.style.display="block"}),{textNode:i,offset:o}}function Wb(n,t,e){const r=Pp(t,e);return r.textNode===n?r.offset:0}function u0(n,t){if(n===t)return 0;if((!n.parentElement||!t.parentElement)&&p(Ic,!1,"invalid dom node to compare"),n.parentElement===t.parentElement){const o=Array.from(n.parentElement.children);return o.indexOf(n)-o.indexOf(t)}const e=o=>{const s=[o];for(;o.parentElement;)s.unshift(o.parentElement),o=o.parentElement;return s},r=e(n),i=e(t);r[0]!==i[0]&&p(Ic,!1,"invalid dom node to compare, different tree");for(let o=1;;o++){const s=r[o],l=i[o];if(s===l)continue;const c=r[o-1],d=Array.from(c.children);return d.indexOf(s)-d.indexOf(l)}}function Fp(n){var i,o;const t=window.getComputedStyle(n),e=(i=Number.parseInt(t.paddingLeft,10))!=null?i:0,r=(o=Number.parseInt(t.paddingRight,10))!=null?o:0;return e+r}function xf(n){return!document.documentElement.contains(n)}function Ae(n,t){let e=t;for(;e;){if(n===e)return!0;e=e.parentNode}return!1}function qb(n,t,e){if(document.getElementById(t)){setTimeout(e);return}const i=document.createElement("script");i.async=!0,i.src=n,i.id=t,document.head.appendChild(i),i.onload=()=>e(),i.onerror=o=>{if(o instanceof Event){const s=o.target;let l="";s&&(l=s.src),e(new URIError(`The script ${l} didn't load correctly.`))}else e(new URIError(`The script ${o} didn't load correctly.`))}}async function ra(n,t){const e=new Promise((r,i)=>{qb(n,t,o=>{o?i(o):r(void 0)})});try{await No.lock(t),await e}finally{No.release(t)}}function Kp(n,t){Object.entries(t).forEach(([e,r])=>{n.dataset[e]=`${r}`})}function f0(n,t){Object.entries(t).forEach(([e,r])=>{n.setAttribute(e,r)})}function Vp(n,t){Object.entries(t).forEach(([e,r])=>{n.style.setProperty(e,r)})}function bf(n){let t=0,e=0,r=n;do t+=r.offsetTop||0,e+=r.offsetLeft||0,r=r.offsetParent;while(r);return{top:t,left:e}}function Dc(n,t){return!n.target||!(n.target instanceof Element)?null:n.target.closest(t)}function Xb(n){return Dc(n,'[data-type="editor-block"]')}function d0(n){if(!n)return!1;const t=window.getComputedStyle(n);return t.display==="none"||t.visibility==="hidden"?!1:n.parentElement?d0(n.parentElement):!0}function Hr(n){let t=n;for(;t;){let e;if(t instanceof HTMLElement?e=t.offsetWidth:e=Number.parseInt(getComputedStyle(n).width,10),e!==0)return t.getBoundingClientRect().width/e;t=t.parentElement}return 1}function h0(n,t){let e=!1;n.addEventListener("compositionstart",()=>{e=!0}),n.addEventListener("compositionend",()=>{ta()?setTimeout(()=>{e=!1},100):e=!1});const r=i=>{t(i,e)};return n.addEventListener("keydown",r),()=>{n.removeEventListener("keydown",r)}}function Fe(n,t,e={noFilter:!1}){return e.noFilter?document.elementFromPoint(n,t)||document.body:document.elementsFromPoint(n,t).find(o=>o instanceof HTMLElement&&!Mt(o,"editor-disable-scroll"))||document.body}class sI{constructor(t){m(this,"element");this.element=t}getClientHeight(){return this.element.clientHeight}getHorizontalScroll(){return this.element.scrollLeft}getVerticalScroll(){return this.element.scrollTop}getMaxHorizontalScroll(){return this.element.scrollWidth-this.element.clientWidth}getMaxVerticalScroll(){return this.element.scrollHeight-this.element.clientHeight}getHorizontalElementScrollOffset(t,e){return bf(t).left*Hr(t)-bf(e).left*Hr(e)}getVerticalElementScrollOffset(t,e){return bf(t).top*Hr(t)-bf(e).top*Hr(e)}scrollTo(t,e){this.element.scrollLeft=t,this.element.scrollTop=e}}class lI{constructor(){m(this,"element",window)}getHorizontalScroll(){return window.scrollX||document.documentElement.scrollLeft}getClientHeight(){return window.innerHeight||document.documentElement.clientHeight}getVerticalScroll(){return window.scrollY||document.documentElement.scrollTop}getMaxHorizontalScroll(){return Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth)-window.innerWidth}getMaxVerticalScroll(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)-window.innerHeight}getHorizontalElementScrollOffset(t){return(window.scrollX||document.documentElement.scrollLeft)+t.getBoundingClientRect().left}getVerticalElementScrollOffset(t){return(window.scrollY||document.documentElement.scrollTop)+t.getBoundingClientRect().top}scrollTo(t,e){window.scrollTo(t,e)}}const Fo={elements:[],cancelMethods:[],add:(n,t)=>{Fo.elements.push(n),Fo.cancelMethods.push(t)},remove:(n,t)=>{const e=Fo.elements.indexOf(n);e>-1&&(t&&Fo.cancelMethods[e](),Fo.elements.splice(e,1),Fo.cancelMethods.splice(e,1))}},Yb=typeof window<"u",aI={cancelOnUserAction:!0,easing:n=>--n*n*n+1,elementToScroll:Yb?window:null,horizontalOffset:0,maxDuration:3e3,minDuration:250,speed:500,verticalOffset:0};async function ia(n,t={}){var nt,Y;if(!Yb)return new Promise(X=>{X(!1)});if(!window.Promise)throw"Browser doesn't support Promises, and animated-scroll-to depends on it, please provide a polyfill.";let e,r,i;const o={...aI,...t},s=o.elementToScroll===window,l=!!o.elementToScroll.nodeName;if(!s&&!l)throw"Element to scroll needs to be either window or DOM element.";const c=s?document.documentElement:o.elementToScroll;getComputedStyle(c).getPropertyValue("scroll-behavior")==="smooth"&&console.warn(`${c.tagName} has "scroll-behavior: smooth" which can mess up with animated-scroll-to's animations`);const h=s?new lI:new sI(o.elementToScroll);if(n instanceof Element){if(i=n,l&&(!o.elementToScroll.contains(i)||o.elementToScroll.isSameNode(i)))throw"options.elementToScroll has to be a parent of scrollToElement";e=h.getHorizontalElementScrollOffset(i,o.elementToScroll),r=h.getVerticalElementScrollOffset(i,o.elementToScroll)}else if(typeof n=="number")e=h.getHorizontalScroll(),r=n;else if(Array.isArray(n)&&n.length===2)e=n[0]===null?h.getHorizontalScroll():n[0],r=n[1]===null?h.getVerticalScroll():n[1];else throw`Wrong function signature. Check documentation.
@@ -613,8 +613,8 @@ ${t}
613
613
  `,x2=`<svg width="1em" height="1em" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">
614
614
  <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7768 15.0001H2.22316C1.45534 15.0001 0.973967 14.1706 1.35491 13.5039L7.63174 2.51949C8.01563 1.84767 8.98433 1.84767 9.36822 2.51949L13.6428 10.0001L15.645 13.5039C16.026 14.1706 15.5446 15.0001 14.7768 15.0001ZM8.99998 6.00006V10.0001H7.99998V6.00006H8.99998ZM8.99998 13.0001V11.0001H7.99998V13.0001H8.99998Z" fill="currentColor"/>
615
615
  </svg>
616
- `,ZO=Object.freeze(Object.defineProperty({__proto__:null,WarningFilledIcon:x2,ClearIcon:i2,CloseIcon:gd,PrevIcon:xT,NextIcon:bT,MoreIcon:tE,TextColorIcon:eE,ArrowDownIcon:xm,ArrowUpIcon:OO,ArrowLeftIcon:NO,ArrowRightIcon:nE,DeleteRowIcon:vT,DeleteColIcon:BT,MergeCellIcon:yT,SplitCellIcon:TT,DeleteTableIcon:kT,Heading1Icon:bm,Heading2Icon:vm,Heading3Icon:Bm,Heading4Icon:ym,Heading5Icon:Tm,Heading6Icon:km,Heading7Icon:Rm,Heading8Icon:wm,HeadingNIcon:PO,OrderedListIcon:RT,UnorderedListIcon:wT,CheckListIcon:ST,BlockquoteIcon:LT,AlignCenterIcon:Lm,AlignLeftIcon:ru,AlignRightIcon:Sm,ImageIcon:IT,ImageMenuIcon:DT,ImageErrorIcon:iE,ImageEmptyIcon:MT,LinkIcon:aE,LinkOffIcon:UT,WarningIcon:rE,PasteSpecialIcon:_T,LaunchIcon:oE,CodeIcon:XT,AudioIcon:zT,GraphIcon:FO,VideoIcon:GT,FileIcon:KO,MathIcon:$O,MathMenuIcon:OT,TableIcon:HO,TableMenuIcon:NT,BilibiliIcon:FT,YoukuIcon:KT,ModaoIcon:$T,FigmaIcon:VT,EditIcon:Im,CommentIcon:Ba,RefreshIcon:PT,HelpIcon:sE,CheckMarkIcon:lE,TextIcon:iu,RightArrowIcon:VO,TencentVideoIcon:HT,WebPageIcon:jT,UmlIcon:WT,DividingLineIcon:qT,HeadingH1Icon:jO,HeadingH2Icon:zO,HeadingH3Icon:GO,HeadingH4Icon:WO,HeadingH5Icon:qO,HeadingH6Icon:XO,HeadingH7Icon:YO,HeadingH8Icon:QO,CheckboxIcon:cE,QuoteIcon:uE,LinkHrefIcon:JO,OrderedIcon:dE,UnorderedIcon:fE,CopyIcon:YT,CutIcon:QT,DeleteIcon:JT,LockBlockIcon:ZT,UnLockBlockIcon:t2,InsertBeforeIcon:e2,InsertAfterIcon:n2,MentionIcon:r2,CircleAddIcon:o2,LoadingIcon:s2,DragIcon:hE,UmlBrandIcon:Dm,OnesLoadingIcon:l2,BoldIcon:a2,ItalicIcon:c2,UnderlineIcon:u2,LineThroughIcon:f2,SubscriptIcon:h2,SuperscriptIcon:m2,InlineCodeIcon:d2,ToMindMapIcon:g2,FitIcon:p2,FullScreenIcon:mE,ExitFullScreenIcon:C2,CaretDownIcon:E2,StatusIcon:A2},Symbol.toStringTag,{value:"Module"}));function b2(){const n=B("span",["editor-loading-icon"],null);return n.innerHTML=l2,n}const aat="";function tN(n,t){const e=B("button",["editor-checkbox-wrapper"],null);e.setAttribute("data-button-id",n),t!=null&&t.includes("checked")&&q(e,"checked"),t!=null&&t.includes("disabled")&&(e.disabled=!0);const r=B("span",["editor-checkbox"],e);return B("span",["editor-checkbox-inner"],r),e}const cat="",ou=D("ui-command-bar-base"),eN={itemElementTag:"div",tippyArrow:!1},Ux=class extends je.TypedEmitter{constructor(e,r,i){var o,s;super();m(this,"content");m(this,"items");m(this,"subBar",null);m(this,"parentItem",null);m(this,"closeable",null);m(this,"closeReason",null);m(this,"options");m(this,"id");m(this,"header",null);m(this,"footer",null);m(this,"handleDocumentKeydown",e=>{var r,i;if(!this.isVisible||e.isComposing||Oc(e.target))return!0;if(this.subBar)return this.subBar.handleDocumentKeydown(e);if(this.items.length===0)return!0;if(e.key==="Escape")return(i=(r=this.options).beforeClose)!=null&&i.call(r)||this.close("cancelBar"),!0;if(e.key==="ArrowUp"){const o=this.getPrevItemIndex(this.getSelectedItemIndex());this.startPauseMouseEnter(),this.selectItem(this.items[o].id),e.preventDefault(),e.stopPropagation()}else if(e.key==="ArrowDown"){const o=this.getNextItemIndex(this.getSelectedItemIndex());this.startPauseMouseEnter(),this.selectItem(this.items[o].id),e.preventDefault(),e.stopPropagation()}else if(e.key==="ArrowRight"){const o=this.getSelectedItem();o&&o.children&&this.showSubCommandBar(o.childrenMenuId)}else if(e.key==="ArrowLeft")this.parentItem&&this.close("switchItem");else if(e.key==="Enter"){const o=this.getSelectedItemIndex();if(o===-1)return!1;const s=this.items[o],l=this.getItemElementById(s.id);l&&this.emit("click",this,s,l)}return!0});m(this,"handleDocumentMouseDown",e=>{var r,i;if(e.target instanceof Element){if((i=(r=this.options).beforeClose)!=null&&i.call(r,e))return;if(!this.isInCommandBar(e.target)){const o=this.listeners("closing");for(let s=0;s<o.length;s++)if(o[s](this,e)===!1)return;this.close("clickBackground")}}});m(this,"handleHidden",()=>{this.closeReason!=="fromHover"&&this.emit("close",this),this.close(null),Yp(this.id)});m(this,"handleShow",()=>{this.popper&&(this.popper.setAttribute("data-command-bar-id",this.id),this.options.classes&&q(this.popper,...this.options.classes),this.options.refuseOverflow&&this.popper.classList.add("reference-hidden")),this.emit("show",this),this.options.disablePageScroll&&Xp(this.id)});m(this,"lastEnterPauseTime",0);m(this,"startPauseMouseEnter",()=>{this.lastEnterPauseTime=Date.now()});m(this,"handleItemMouseEnter",e=>{if(Date.now()-this.lastEnterPauseTime<100)return;const r=this.getParentCommandItemElement(e.target);if(!r)return;const i=this.getItemElementId(r),o=this.getItemById(i);if(o.states&&o.states.indexOf("disabled")!==-1||(this.selectItem(i),o.manualShowChildren))return;const s=o.childrenMenuId||"";this.showSubCommandBar(s)});m(this,"handleItemMouseLeave",e=>{var i,o;const r=this.getParentCommandItemElement(e.target);!r||((o=(i=this.subBar)==null?void 0:i.parentItem)==null?void 0:o.id)!==this.getItemElementId(r)&&(ut(r,"selected"),this.emit("selectionChange",this,""))});m(this,"handleItemClick",e=>{var s,l;const r=this.getParentCommandItemElement(e.target);if(!r)return;const i=this.getItemElementId(r),o=this.items.find(c=>c.id===i);if(!!o&&!(o.states&&o.states.indexOf("disabled")!==-1)){if(o.children&&o.children.length>0&&o.manualShowChildren){this.showSubCommandBar(o.childrenMenuId);return}if(!o.element&&(this.emit("click",this,o,r),this.options.autoClose)){if((l=(s=this.options).beforeClose)!=null&&l.call(s,e))return;this.close("clickItem")}}});m(this,"handleWheel",e=>{if(!this.options.disablePageScroll&&!document.querySelector(".editor-disable-scroll"))return;const r=e.target;if(!r||!(r instanceof Node))return;const i=r instanceof HTMLElement?r:r.parentElement;if(!i)return;const o=pn(i);if(!Ae(this.content,o)){e.stopPropagation(),e.preventDefault();return}e.deltaY<0?o.scrollTop===0&&(e.stopPropagation(),e.preventDefault()):e.deltaY>0&&o.scrollTop+o.clientHeight>=o.scrollHeight&&(e.stopPropagation(),e.preventDefault())});this.id=(o=i==null?void 0:i.id)!=null?o:it(),this.options={...eN,...i},this.items=e,this.parentItem=(s=i==null?void 0:i.parentItem)!=null?s:null,this.closeable=r!=null?r:null,this.content=this.createCommandBarContent(e)}close(e){this.closeReason=e,this.subBar&&this.subBar.close(e),document.removeEventListener("keydown",this.handleDocumentKeydown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}click(e,r){this.emit("click",this,e,r)}createPopperOptions(){var i,o;const e={modifiers:[]},r=this.options.overflowBoundary;return r&&((i=e==null?void 0:e.modifiers)==null||i.push({name:"flip",options:{boundary:r,fallbackPlacements:["top","bottom"]}})),this.options.padding&&((o=e==null?void 0:e.modifiers)==null||o.push({name:"preventOverflow",options:{padding:this.options.padding}})),e}destroy(){var e;this.close(null),this.removeAllListeners(),(e=this.subBar)==null||e.destroy(),this.subBar=null,this.closeable=null,this.content.removeEventListener("wheel",this.handleWheel)}get isSubCommandBar(){return!!this.parentItem}updateItems(e){var i;this.subBar&&e.findIndex(s=>{var l,c;return s.id===((c=(l=this.subBar)==null?void 0:l.parentItem)==null?void 0:c.id)})===-1&&((i=this.subBar)==null||i.destroy(),this.subBar=null),this.items=e;const r=this.createCommandBarContent(e);this.content.innerHTML="",Array.from(r.children).forEach(o=>{this.content.appendChild(o)})}get popper(){return this.content.closest("[data-tippy-root]")}getSelectedItemIndex(){const e=this.getSelectedItem();return e?this.items.indexOf(e):-1}getPrevItemIndex(e){if(e<=0)return this.items.length-1;let r=e-1;for(;;){const i=this.items[r],o=i.type,l=!(i.states&&i.states.indexOf("disabled")!==-1);if(o!=="separator"&&o!=="section"&&l)return r;if(r-=1,r<0)return this.items.length-1}}getNextItemIndex(e){let r=e+1;for(;;){if(!this.items[r])return this.getNextItemIndex(-1);const i=this.items[r],o=i.type,l=!(i.states&&i.states.indexOf("disabled")!==-1);if(o!=="separator"&&o!=="section"&&l)return r;if(r+=1,r>this.items.length-1)return 0}}clearSelectedItem(){const e=this.getSelectedItem();if(!e)return;const r=this.getItemElementById(e.id);r&&ut(r,"selected")}selectItem(e,r="event"){const i=this.getSelectedItem();if(i){if(i.id===e)return;const s=i.id,l=this.getItemElementById(s);l&&ut(l,"selected")}const o=this.getItemElementById(e);o?(q(o,"selected"),this.emit("selectionChange",this,o.getAttribute("data-id")||""),!this.options.disableSelectedScroll&&r==="event"&&o.scrollIntoView({block:"nearest"})):this.emit("selectionChange",this,"")}showSubCommandBar(e){var s,l,c,d;const r=this.getSelectedItem();if(!r||!r.children&&((l=(s=this.subBar)==null?void 0:s.parentItem)==null?void 0:l.manualShowChildren))return;if(this.subBar){if(((c=this.subBar.parentItem)==null?void 0:c.id)===r.id){r.manualShowChildren&&this.subBar.close("switchItem");return}this.subBar.destroy(),this.subBar=null}if(!r.children)return;const i=this.getItemElementById(r.id);if(!i)return;const o=Ux.createSubCommandBar(r,(d=this.closeable)!=null?d:this,e?{id:e}:{});this.subBar=o,this.subBar.on("click",(h,C,E)=>{this.emit("click",h,C,E)}),this.subBar.on("close",()=>{var h;(h=this.subBar)==null||h.destroy(),this.subBar=null,ut(i,"active")}),r.beforePopup&&r.beforePopup(o),this.subBar.manualShow(i,this.getSubBarOptions(r)),q(i,"active")}isInCommandBar(e){if(!e||!(e instanceof Node))return!1;const r=this.getCommandBarRoot();return r&&Ae(r,e)||Ae(this.content,e)?!0:this.subBar?this.subBar.isInCommandBar(e):!1}createCommandItem(e){var o,s,l,c;let r=(o=this.options.itemElementTag)!=null?o:"div";e.element&&(r="div");const i=B(r,["command-item"],null);return i.setAttribute("data-id",e.id),e.type==="separator"?i.classList.add("separator"):e.type==="section"?(i.classList.add("section","text"),e.element&&(typeof e.element=="function"?i.appendChild(e.element(e)):i.appendChild(e.element))):((s=e.states)!=null&&s.includes("selected")&&i.classList.add("selected"),(l=e.states)!=null&&l.includes("checked")&&i.classList.add("checked"),(c=e.states)!=null&&c.includes("disabled")&&i.classList.add("disabled"),i.onclick=this.handleItemClick,i.onmouseenter=this.handleItemMouseEnter,i.onmouseleave=this.handleItemMouseLeave,e.element?typeof e.element=="function"?i.appendChild(e.element(e)):i.appendChild(e.element):i.classList.add("standard")),this.initItemElement(e,i),i}getItemById(e){const r=this.items.find(i=>i.id===e);return p(ou,r,`can not find command item for id: ${e}`),r}getSelectedItem(){const e=this.content.querySelector(":scope >.editor-command-bar >.command-item.selected");if(e){const r=this.getItemElementId(e),i=this.items.find(o=>o.id===r);return p(ou,i,`can not find command item for id: ${r}`),i}return null}getItemElementId(e){const r=e.getAttribute("data-id");return p(ou,r,"no data-id attribute"),r}getItemElementById(e){const r=this.content.querySelector(`:scope >.editor-command-bar > .command-item[data-id="${e}"]`);return p(ou,r,`no exists command item, id=${e}`),r}getParentCommandItemElement(e){if(!e||!(e instanceof Element))return null;if(Mt(e,"command-item"))return e;const r=e.closest(".command-item");return r||null}createCommandBarContent(e){this.content&&this.content.removeEventListener("wheel",this.handleWheel);const r=B("div",["editor-command-bar-root"],null);if(this.options.header){const o=B("div",["editor-command-bar-header"],null);if(this.options.header instanceof Function){const s=this.options.header();s&&o.appendChild(s)}else o.appendChild(this.options.header);this.header=o,this.header&&r.appendChild(this.header)}const i=B("div",["editor-command-bar"],r);if(e.forEach(o=>{var l;const s=this.createCommandItem(o);i.appendChild(s),o.element&&o.setCloseable&&o.setCloseable((l=this.closeable)!=null?l:this)}),this.options.footer){const o=B("div",["menu-item","editor-command-bar","footer"],null);if(this.options.footer instanceof Function){const s=this.options.footer();s&&o.appendChild(s)}else o.appendChild(this.options.footer);this.footer=o,this.footer&&r.appendChild(this.footer)}return(this.options.header||this.options.footer)&&q(r,"scrollable-bar"),this.initCommandBarElement(i),r.addEventListener("wheel",this.handleWheel,{passive:!1}),r}getSubBarOptions(e){var r;return{placement:(r=e.childrenPlacement)!=null?r:"right-start",offset:e.childrenOffset,arrow:e.childArrow}}static registerManualCommandBar(e,r){this.commandBarCreators.set(e,r)}static createSubCommandBar(e,r,i){var l;p(ou,e.children&&e.children.length>0,"no item children");const o=(l=e.childrenType)!=null?l:"menu",s=this.commandBarCreators.get(o);return p(ou,s,`no creator for command type: ${o}`),s(e,r,i)}static hasExistsCommandBar(){return!!document.querySelector("[data-command-bar-id]")}};let ya=Ux;m(ya,"commandBarCreators",new Map),D("ui-command-bar");class _m extends ya{constructor(){super(...arguments);m(this,"tippyInstance",null)}manualShow(e,r){var i,o,s;if(!this.isVisible){if(this.tippyInstance&&(this.tippyInstance.destroy(),this.tippyInstance=null),this.tippyInstance=b9.default(e,{interactive:!0,content:this.content,trigger:"manual",triggerTarget:null,hideOnClick:!1,placement:(i=r==null?void 0:r.placement)!=null?i:"bottom-start",maxWidth:650,arrow:(o=r==null?void 0:r.arrow)!=null?o:this.options.tippyArrow,appendTo:document.body,onShow:this.handleShow,onHidden:this.handleHidden,theme:r==null?void 0:r.theme,getReferenceClientRect:r==null?void 0:r.getReferenceClientRect,offset:(s=r==null?void 0:r.offset)!=null?s:[0,0],popperOptions:this.createPopperOptions()}),r!=null&&r.point){const{x:l,y:c}=r.point;this.tippyInstance.setProps({getReferenceClientRect:()=>new DOMRect(l,c,0,0)})}this.clearSelectedItem(),this.tippyInstance.show(),this.parentItem||(document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("mousedown",this.handleDocumentMouseDown)),this.popper&&this.options.id&&this.popper.setAttribute("data-command-bar-id",this.options.id)}}close(e){var r;super.close(e),this.isVisible&&((r=this.tippyInstance)==null||r.hide())}destroy(){var e;(e=this.tippyInstance)==null||e.destroy(),this.tippyInstance=null,super.destroy()}getCommandBarRoot(){return this.content.closest("[data-tippy-root]")}get isVisible(){var e,r;return(r=(e=this.tippyInstance)==null?void 0:e.state.isVisible)!=null?r:!1}get popper(){return this.content.closest("[data-tippy-root]")}}const v2=D("ui-base");class su extends _m{constructor(t,e){var o;const r=(o=e==null?void 0:e.id)!=null?o:`popup-${it()}`,i=[{id:r,name:"",element:t}];super(i,void 0,{disablePageScroll:!0,id:r,beforeClose:e==null?void 0:e.beforeClose})}initCommandBarElement(t){q(t,"popper")}initItemElement(t,e){}get popupContent(){const t=this.items[0];p(v2,t,"no dialog item");const e=typeof t.element=="function"?t.element(t):t.element;return p(v2,e,"no item element"),e}}const rs=D("filterable-list");function B2(n){var e,r;const t=B("div",["list-item"],null);return t.setAttribute("data-id",n.id),t.appendChild(B("div",["list-item-text"],null,n.name)),(e=n.states)!=null&&e.includes("selected")&&(q(t,"selected"),ea(lE,["list-item-selected-icon"],t)),(r=n.states)!=null&&r.includes("disabled")&&q(t,"disabled"),t}function y2(n){const t=B("div",["list-root"],null);return n.forEach(e=>{t.appendChild(B2(e))}),n.length||t.appendChild(B2({id:"placeholder",states:["disabled"],name:_.t("search.emptyTips")})),t}function T2(n,t){return n.map(e=>({...e,states:t===e.id?["selected"]:[]}))}function nN(n,t){const e=B("div",["filterable-list"],null),r=B("div",["filter"],e),i=B("div",["filter-container"],r),o=B("input",["filter-input"],i);t&&t.placeholder&&(o.placeholder=t.placeholder);const s=B("div",["list"],e),l=y2(T2(n,t==null?void 0:t.initialSelectedId));return s.appendChild(l),e}function k2(n,t,e){const r=n.querySelector(".list");p(rs,r,"no list root");const i=y2(T2(t,e)),o=r.querySelector(".list-root");if(p(rs,o,"no exists menu"),yf(o,i),e){const s=r.querySelector(".list-item.selected");s&&(p(rs,s,"no selected menu item"),s.scrollIntoView({block:"nearest"}))}}class rN{constructor(t,e){m(this,"root");m(this,"visibleItems");m(this,"selectedId");m(this,"filter","");m(this,"onSelected",null);m(this,"handleKeydown",t=>{this.processKeyDown(t)});m(this,"handleInputChanged",()=>{const t=this.root.querySelector(".filter-input");p(rs,t,"no input");const e=t.value.toLocaleLowerCase();this.setFilter(e)});m(this,"handleClick",t=>{this.processClick(t)});var r;this.items=t,this.options=e,this.root=nN(t,e),this.bindEvents(),this.selectedId=(r=e==null?void 0:e.initialSelectedId)!=null?r:"",this.visibleItems=t}bindEvents(){const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.addEventListener("keyup",this.handleInputChanged),t.addEventListener("keydown",this.handleKeydown),this.root.addEventListener("click",this.handleClick)}unbindEvents(){const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.removeEventListener("keyup",this.handleInputChanged),t.removeEventListener("keydown",this.handleKeydown),this.root.removeEventListener("click",this.handleClick)}destroy(){this.unbindEvents(),this.onSelected=null}getSelectedIndex(){return this.selectedId?this.visibleItems.findIndex(t=>t.id===this.selectedId):-1}setSelectedId(t){this.selectedId=t,k2(this.root,this.visibleItems,t)}focus(){const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.focus()}moveSelectedItemIntoView(){const t=this.root.querySelector(".list-item.selected");t&&(p(rs,t,"no selected menu item"),t.scrollIntoView({block:"nearest"}))}reset(){this.setFilter("");const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.value=""}setFilter(t){this.filter!==t&&(this.filter=t,this.visibleItems=this.items.filter(e=>e.name.toLocaleLowerCase().includes(t)),k2(this.root,this.visibleItems,this.selectedId))}processClick(t){var s,l;const e=t.target;if(!(e instanceof HTMLElement))return;const r=e.closest(".list-item");if(!r)return;const i=(s=r.getAttribute("data-id"))!=null?s:"",o=(l=this.visibleItems.find(c=>c.id===i))!=null?l:null;this.onSelected&&this.onSelected(this,o)}processKeyDown(t){var e;if(t.key==="ArrowUp"){let r=this.getSelectedIndex();r===-1?r=this.visibleItems.length-1:r>0&&(r-=1);let i="";r!==-1&&(i=this.visibleItems[r].id),this.setSelectedId(i);return}if(t.key==="ArrowDown"){let r=this.getSelectedIndex();r===-1?r=0:r<this.visibleItems.length-1&&(r+=1);let i="";r!==-1&&(i=this.visibleItems[r].id),this.setSelectedId(i);return}if(t.key==="Enter"){const r=(e=this.visibleItems.find(i=>i.id===this.selectedId))!=null?e:null;this.onSelected&&this.onSelected(this,r)}}}class iN extends rN{constructor(e,r,i){super(e,i);m(this,"popup");m(this,"onShow",null);m(this,"onHide",null);m(this,"custom",null);m(this,"handleShow",()=>{this.onShow&&this.onShow(this)});m(this,"handleHide",()=>{this.onHide&&this.onHide(this)});m(this,"handleShown",()=>{this.focus()});this.popup=new su(this.root)}destroy(){super.destroy(),this.onShow=null,this.onHide=null}show(e){this.reset(),this.popup.manualShow(e,{theme:"dropdown-list"}),this.focus(),this.moveSelectedItemIntoView()}processKeyDown(e){super.processKeyDown(e),(e.key==="Esc"||e.key==="Enter")&&this.popup.close("cancelBar")}processClick(e){super.processClick(e);const r=e.target;!(r instanceof HTMLElement)||!r.closest(".list-item")||this.popup.close("clickItem")}}const uat="",fat="";function R2(n,t){var o;const e=document.createElement("div");e.classList.add("ones-editor-toast","show"),t!=null&&t.theme&&e.setAttribute("data-theme",t.theme),t!=null&&t.id&&e.setAttribute("data-id",t.id),t!=null&&t.html?e.innerHTML=n:e.textContent=n,t!=null&&t.position&&(e.style.left=`${t.position.x}px`,e.style.top=`${t.position.y}px`,e.classList.add("positioned"));const r=()=>{e.classList.remove("show"),setTimeout(()=>{e.remove()},500)};if(!((o=t==null?void 0:t.autoClose)!=null?o:!0)){const s=B("span",["close"],e);s.innerHTML=gd,s.onclick=r}return document.body.appendChild(e),t!=null&&t.autoClose&&setTimeout(()=>r(),(t==null?void 0:t.duration)||3e3),r}function oN(n,t){var e,r;if(q(t,"menu-item"),!n.element){if(n.type==="section"){const i=B("div",["section-name"],null,n.name);t.appendChild(i)}else if(n.type!=="separator"){if(n.icon){const o=B("div",["menu-item-icon"],null);n.icon&&(o.innerHTML=n.icon),t.appendChild(o)}const i=B("div",["menu-item-name","text"],null);if(B("span",[],i,n.name),n.ellipsisTooltip&&(t.setAttribute("data-editor-tooltip-allow-markdown","true"),t.setAttribute("data-editor-tooltip-offset-y","25"),t.setAttribute("data-editor-tooltip-placement","right"),t.setAttribute("data-editor-tooltip-common",`<div style="word-break: break-word;">${n.ellipsisTooltip}</div>`)),((e=n.states)==null?void 0:e.includes("disabled"))&&n.disableReason&&(t.setAttribute("data-editor-tooltip-placement","right"),t.setAttribute("data-editor-tooltip-common",n.disableReason)),t.appendChild(i),n.subText&&B("div",["item-subtext","text"],t,n.subText),n.children&&!n.element){const o=B("div",["menu-item-sub-indicator"],null);o.innerHTML=nE,t.appendChild(o)}if((r=n.states)!=null&&r.includes("checked")){const o=B("div",["menu-item-checked-icon"],null);o.innerHTML=lE,t.appendChild(o)}}}}class dl extends _m{constructor(t,e,r){super(t,e,{autoClose:!0,disablePageScroll:!0,beforeClose:r==null?void 0:r.beforeClose,...r})}manualShow(t,e){const r={theme:"menu",...e};super.manualShow(t,r)}initCommandBarElement(t){q(t,"menu")}initItemElement(t,e){oN(t,e)}}function sN(n,t,e){var r;return new dl((r=n.children)!=null?r:[],t,{...e,parentItem:n})}function w2(n,t,e){t.setAttribute("data-button-id",n.id),e.tooltipId&&n.name&&!n.disableTooltip&&(t.setAttribute(`data-editor-tooltip-${e.tooltipId}`,n.name),n.desc&&t.setAttribute(`data-editor-tooltip-desc-${e.tooltipId}`,n.desc));const r=t;if(!n.element)if(n.icon){const i=B("span",["toolbar-item-icon-container"],r);n.icon.trim().startsWith("<")?i.innerHTML=n.icon:i.innerText=n.icon}else{const i=B("span",["toolbar-item-name-container"],r);i.innerText=n.name}if(n.dropdown){t.setAttribute("data-dropdown","true");const i=B("span",["toolbar-item-dropdown-container"],r);i.innerHTML=xm}n.states&&(n.states.indexOf("checked")!==-1&&q(r,"checked"),n.states.indexOf("disabled")!==-1&&(r.disabled=!0))}class pd extends _m{constructor(t,e,r){super(t,e,{itemElementTag:"button",tippyArrow:!1,...r})}getSubBarOptions(t){var i,o;const e=()=>{const s=this.getItemElementById(t.id),c=this.content.getBoundingClientRect(),d=s.getBoundingClientRect();return new DOMRect(d.left,c.top,d.width,c.height)};return{placement:(i=t.childrenPlacement)!=null?i:"top",getReferenceClientRect:e,offset:(o=t.childrenOffset)!=null?o:[0,4]}}manualShow(t,e){const r={theme:"toolbar",...e};super.manualShow(t,r)}initCommandBarElement(t){q(t,"toolbar")}initItemElement(t,e){w2(t,e,this.options)}}function lN(n,t,e){var r;return new pd((r=n.children)!=null?r:[],t,{...e,parentItem:n})}class aN extends ya{constructor(t,e,r){super(e,void 0,r),t.appendChild(this.content),document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}initCommandBarElement(t){q(t,"toolbar","fixed")}initItemElement(t,e){w2(t,e,this.options)}close(){this.clearSelectedItem(),this.subBar&&(this.subBar.close("cancelBar"),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 dat="";ya.registerManualCommandBar("menu",sN),ya.registerManualCommandBar("toolbar",lN);const hat="",S2=D("ui-base");class Cd extends _m{constructor(e,r){super(Cd.getCommandItems(e,r),void 0,{disablePageScroll:!0,...r});m(this,"handleDocumentMouseDown",e=>{})}initCommandBarElement(e){q(e,"dialog","manual")}initItemElement(e,r){}show(e,r){this.manualShow(e,{...r,theme:"light"})}get dialogContent(){const e=this.items[0];p(S2,e,"no dialog item");const r=e.element;return p(S2,r,"no item element"),r}static getCommandItems(e,r){var s;return[{id:(s=r==null?void 0:r.id)!=null?s:`manual-dialog-${it()}`,name:"",element:e}]}}const mat="",cN=D("ui-base");class L2{constructor(t){m(this,"menu");m(this,"currentText","");m(this,"handleSearchText");m(this,"handleClick",Pe.default((t,e)=>{this.options.onClickItem(this,e)},300,{leading:!0,trailing:!1}));m(this,"handleShow",t=>{});m(this,"handleClose",()=>{var t,e;(e=(t=this.options).onClose)==null||e.call(t)});m(this,"handleKeydown",t=>this.menu.handleDocumentKeydown(t));this.options=t,this.menu=new dl([],void 0,{id:t.id,header:t.header,footer:t.footer,disableSelectedScroll:t.disableSelectedScroll}),this.menu.addListener("click",this.handleClick),this.menu.addListener("close",this.handleClose),this.menu.addListener("show",this.handleShow),this.options.wait?this.handleSearchText=Pe.default(e=>{this.handleSearchTextPure(e)},this.options.wait):this.handleSearchText=this.handleSearchTextPure}setItems(t){if(this.menu.updateItems(t),t.length>0){const e=i=>i.states&&i.states.indexOf("disabled")!==-1?!1:i.type!=="section"&&i.type!=="separator",r=t.find(e);r&&this.menu.selectItem(r.id,"manual")}}async popup(t,e){var i,o;if(!(e!=null&&e.noEvent)&&((o=(i=this.options).onShow)==null?void 0:o.call(i,this))===!1)return;this.menu.manualShow(t),this.options.placeholder&&this.showPlaceholder();const r=await this.options.queryItems(this,"");this.highlightText("",r),this.setItems(r)}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(t){if(this.options.noResultMessage){const e={name:"",id:"placeholder",states:["disabled"]};typeof this.options.noResultMessage=="string"?e.name=this.options.noResultMessage:(this.options.noResultMessage instanceof HTMLElement||typeof this.options.noResultMessage=="function")&&(e.element=this.options.noResultMessage),this.setItems([e])}else this.setItems([{id:"placeholder",name:this.options.emptyPlaceholder||_.t("search.emptyTips"),states:["disabled"]}])}close(){this.menu.close("cancelBar")}get isVisible(){return this.menu.isVisible}destroy(){this.menu.close("cancelBar"),this.menu.removeAllListeners(),this.menu.destroy()}isInCommandBar(t){return this.menu.isInCommandBar(t)}async handleSearchTextPure(t){this.currentText=t;try{this.showLoading();const e=await this.options.queryItems(this,t);if(this.currentText!==t)return;if(e.length===0){this.showNoResultMessage(t);return}this.setItems(e),this.options.highlight&&this.highlightText(t.replace(/^\s+|\s+$/g,""),e)}finally{}}highlightText(t,e){cN.debug(`highlight menu text: ${t}`);const r=this.menu.content,i=(s,l)=>{if(!l)return s;let c="";const d=l.length,h=l.toLocaleLowerCase();let C=0;for(C=0;C<=s.length-d;C){let E=s.substring(C,C+d);if(E.toLocaleLowerCase()===h){C+=d;const A=s.charAt(C);let v=!1;E.endsWith(" ")&&(v=!0,E=E.trimEnd()),c+=`<span class="highlight">${E}${A===" "||v?"&nbsp":""}</span>`}else c+=s.charAt(C),C++}return C<s.length&&(c+=s.substring(C)),c},o=s=>{if(Mt(s,"text")){const l=e==null?void 0:e.find(h=>h.id===s.getAttribute("data-id"));if(l&&l.element)return;const c=s.textContent;if(!c)return;const d=i(c,t);s.innerHTML=d;return}Array.from(s.children).forEach(o)};o(r)}}class gE{constructor(t,e){m(this,"root");m(this,"input");m(this,"text");m(this,"dropdownIcon");m(this,"clearIcon");m(this,"autoSuggest");m(this,"labels");m(this,"items",[]);m(this,"handleClick",()=>{this.autoSuggest.popup(this.root),this.input.focus()});m(this,"handleClickItem",(t,e)=>{var r,i;(i=(r=this.options)==null?void 0:r.onClickItem)==null||i.call(r,e)});m(this,"handleInput",()=>{this.autoSuggest.handleSearchText(this.input.value),this.updatePlaceholder()});m(this,"handleClear",t=>{var e,r;this.clear(),this.autoSuggest.handleSearchText(""),t.preventDefault(),t.stopPropagation(),(r=(e=this.options)==null?void 0:e.onClear)==null||r.call(e)});m(this,"handleQueryItems",async(t,e)=>this.items.filter(i=>{var o;return(o=this.options)!=null&&o.filter?this.options.filter(i,e):!0}));m(this,"handleShow",()=>{q(this.root,"active"),this.input.focus()});m(this,"handleClose",()=>{var t,e;(e=(t=this.options)==null?void 0:t.onClose)==null||e.call(t),ut(this.root,"active")});var c,d,h,C,E;this.options=e,this.labels=(d=(c=this.options)==null?void 0:c.labels)!=null?d:[];const{root:r,input:i,text:o,clearIcon:s,dropdownIcon:l}=gE.createDropdown(t,this.labels);this.root=r,this.input=i,this.text=o,this.clearIcon=s,this.dropdownIcon=l,this.autoSuggest=new L2({id:(e==null?void 0:e.popupId)||"dropdown-auto-suggest",header:(h=this.options)==null?void 0:h.header,onClickItem:this.handleClickItem,queryItems:this.handleQueryItems,onClose:this.handleClose,onShow:this.handleShow,highlight:e==null?void 0:e.highlight,emptyPlaceholder:e==null?void 0:e.emptyPlaceholder,disableSelectedScroll:e==null?void 0:e.disableSelectedScroll}),this.items=(E=(C=this.options)==null?void 0:C.items)!=null?E:[],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(t){this.items=t,this.autoSuggest.handleSearchText("")}setText(t){this.text.innerText=t,this.input.value=t,this.updatePlaceholder()}clear(){this.setText(""),this.setLabels([])}setLabels(t){this.labels=t,this.updateLabels()}static createDropdown(t,e){const r=B("div",["editor-dropdown","empty"],t),i=B("input",["dropdown-input"],r),o=B("div",["dropdown-text"],r),s=B("div",["dropdown-labels"],r);for(let d=0;d<e.length;d+=1){const h=e[d];B("span",["dropdown-label"],s,h)}const l=B("div",["dropdown-clear-icon"],r);l.innerHTML=i2;const c=B("div",["dropdown-icon"],r);return c.innerHTML=xm,{root:r,input:i,text:o,clearIcon:l,dropdownIcon:c}}updateLabels(){const t=this.root.querySelector(".dropdown-labels");if(t){t.innerHTML="";for(let e=0;e<this.labels.length;e+=1){const r=this.labels[e];B("span",["dropdown-label"],t,r)}}}updatePlaceholder(){var t;if(this.input.value===""){const e=(t=this.options)==null?void 0:t.placeholder;e&&(this.input.placeholder=e,this.text.textContent=e),q(this.root,"empty")}else ut(this.root,"empty")}}const uN=[-1,6,0,1,2,3,4,5],fN=[-1,6,0,1,2,3,4,5,14,13,7,8,9,10,11,12],I2=D("color-palette");function D2(n,t,e,r){p(I2,n>0,"no color in palette");const i=t||1;p(I2,i>0,`invalid palette rows: ${i}`);const o=n/i,s=B("div",["palette-container",r],null);for(let l=0;l<i;l++){const c=B("div",["palette-container-row"],s);for(let d=0;d<o;d++){const h=e(l*o+d);c.appendChild(h)}}return s}function dN(n){const t=B("button",["color-button"],null),e=uN[n];return t.setAttribute("data-color-index",`${e}`),t.innerHTML=eE,t}function hN(n){const t=B("button",["background-color-button"],null),e=fN[n];return t.setAttribute("data-color-index",`${e}`),t}function mN(){const n=B("div",["clear-button-container"],null),t=B("button",["clear-button"],n);return t.innerText=_.t("colorPalette.reset"),n}function gN(n){const t=B("div",["color-palette"],null);return n.color!==!1&&(B("div",["bar-desc"],t,_.t("colorPalette.colorDesc")),t.appendChild(D2(8,1,dN,"color"))),n.backgroundColor!==!1&&(B("div",["bar-desc"],t,_.t("colorPalette.backgroundDesc")),t.appendChild(D2(16,2,hN,"background-color"))),n.clearColorButton!==!1&&t.appendChild(mN()),t}function pN(n,t,e){const r=t==="color"?"color":"background-color",i=n.querySelector(`.${r} button.selected`);i&&ut(i,"selected"),e===null&&(e=-1);const o=n.querySelector(`.${r} button[data-color-index="${e}"]`);o&&q(o,"selected")}const gat="",CN={};class EN extends je.TypedEmitter{constructor(e=CN){super();m(this,"root");m(this,"handleClick",e=>{const r=e.target;if(!r||!(r instanceof Element))return;const i=r.closest("button");if(!i)return;if(Mt(i,"clear-button")){this.setColor("backgroundColor",null),this.setColor("color",null),this.emit("onClick","clearColor",0);return}const o=i.getAttribute("data-color-index");if(!o)return;const s=Number.parseInt(o,10);Number.isNaN(s)||(Mt(i,"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=e,this.root=gN(e),this.root.addEventListener("click",this.handleClick)}destroy(){this.removeAllListeners(),this.root.removeEventListener("click",this.handleClick)}setColor(e,r){pN(this.root,e,r)}}class _2{constructor(t,e){m(this,"name","Color Palette");m(this,"element");m(this,"palette");m(this,"closeable",null);this.id=t,this.palette=new EN(e),this.element=this.palette.root}setCloseable(t){this.closeable=t}destroy(){this.palette.destroy(),this.closeable=null}}function AN(){const n=B("button",["color-button"],null);return n.innerHTML=eE,n}function pE(n,t){const[e,r]=t;e===null?n.removeAttribute("data-color"):n.setAttribute("data-color",`${e}`),r===null?n.removeAttribute("data-background-color"):n.setAttribute("data-background-color",`${r}`)}class M2 extends je.TypedEmitter{constructor(e){super();m(this,"id","text-color-item");m(this,"name",_.t("colorPalette.name"));m(this,"dropdown",!0);m(this,"manualShowChildren",!0);m(this,"children",[]);m(this,"element");m(this,"colorPaletteItem");m(this,"latestColors",[null,null]);m(this,"handlePaletteClick",(e,r)=>{this.emit("onClick",e,r)});m(this,"setLatestColors",(e,r)=>{e==="color"||e==="backgroundColor"?e==="color"?this.latestColors[0]=r:this.latestColors[1]=r:this.latestColors=[null,null],pE(this.element,this.latestColors)});m(this,"beforePopup",()=>{this.updatePaletteColor(this.latestColors),this.emit("beforePopup")});this.editor=e,this.colorPaletteItem=new _2("text-color-palette-item"),this.colorPaletteItem.palette.addListener("onClick",this.handlePaletteClick),this.children.push(this.colorPaletteItem),this.element=AN()}destroy(){this.colorPaletteItem.destroy()}updatePaletteColor(e){this.colorPaletteItem.palette.setColor("color",e[0]),this.colorPaletteItem.palette.setColor("backgroundColor",e[1]),this.latestColors=e,pE(this.element,this.latestColors)}updateButtonColor(e){this.latestColors=e,pE(this.element,this.latestColors)}}const pat="";function Mm(n,t){const e=B("div",["editor-input-wrap"],n);if(t!=null&&t.className&&q(e,t==null?void 0:t.className),t.label){const s=B("div",["editor-input-label"],e);B("span",[],s,t.label),t.required&&q(s,"required")}const r=B("div",["editor-input-container"],e),i=B("input",["editor-input"],null);if(t.placeholder&&(i.placeholder=t.placeholder),t.defaultValue&&(i.value=t.defaultValue),t.maxLength&&(i.maxLength=t.maxLength),t.maxLength){const s=B("div",["editor-input-suffix"],r);B("span",[],s,`${i.value.length} / ${t.maxLength}`),i.addEventListener("input",l=>{const c=l.target;s.innerText=`${c.value.length} / ${t.maxLength}`})}r.appendChild(i);const o=B("div",["editor-input-error"],e);return i.addEventListener("input",s=>{var l;(l=t.onChange)==null||l.call(t,s),ut(e,"error")}),h0(i,(s,l)=>{var c;(c=t.onKeyDown)==null||c.call(t,s,l)}),{getField:()=>i,getInputValue:()=>i.value,setFieldError:s=>{q(e,"error"),o.innerText=s},focus:()=>{setTimeout(()=>{i.focus()})}}}function CE(n){if(!document.hasFocus())return!1;const t=document.getSelection();if(!t)return!0;const e=t.focusNode;if(!e)return!0;const r=t.focusOffset,i=e.childNodes[r];if(!i)return!0;if(i instanceof HTMLElement){const o=i.tagName.toLowerCase();if(i===n.input.inputElement)return!0;if(o==="input"||o==="textarea")return!1}return!0}class xN extends L2{constructor(e,r){super(r);m(this,"handleClose",()=>{var e,r;CE(this.editor)&&this.editor.focus(),(r=(e=this.options).onClose)==null||r.call(e)});this.editor=e,this.editorOptions=r}async popupInEditor(e,r,i){var d,h;if(((h=(d=this.editorOptions).onShow)==null?void 0:h.call(d,this,e,r,i))===!1)return;this.options.showLoading&&this.showLoading();const o=this.editor.getBlockByIndex(e,r);if(!Ae(this.editor.rootContainer,o)||At(this.editor,o)<i)return;const s=Vo(this.editor,o,Ie(this.editor,o,i));if(s.length===0)return;const l=s[0],c=jo(this.editor,o,"editor-auto-suggest-menu",l);super.popup(c,{noEvent:!0})}}const EE=D("auto-suggest-menu");class AE{constructor(t,e){m(this,"order",100);m(this,"menu");m(this,"anchor",null);m(this,"close",()=>{this.menu.close()});m(this,"oldCompositingText","");m(this,"handleSelectionChanged",t=>{var r,i;if(!((r=this.menu)!=null&&r.isVisible))return;const e=t.selection.range.start;if(e.isSimple()&&e.blockId===((i=this.anchor)==null?void 0:i.blockId)&&e.offset>=this.anchor.offset){const o=t.getBlockById(e.blockId);if(Re(ar(Jn(t,o),e.offset).left).startsWith(this.anchor.leftText))return}this.menu.close()});m(this,"deleteTrigger",()=>{const t=this.editor,e=t.selection.range.start;if(!e.isSimple()||!this.anchor)return!1;const{blockId:r,offset:i}=e,o=t.getBlockById(r),s=Re(H0(t,o,i));if(p(EE,this.anchor,"no anchor"),!s.startsWith(this.anchor.leftText))return!1;const l=this.anchor.offset-this.anchor.trigger.length,c=i-l;return t.selection.selectBlock(o,l),c&&(t.deleteTextFromBlock(o,l,c),this.anchor.offset-=this.anchor.trigger.length),this.anchor.trigger.length||this.menu.close(),!0});m(this,"onClose",()=>{var t,e;(e=(t=this.options).onClose)==null||e.call(t)});m(this,"onShow",(t,e,r,i)=>{var o;if((o=this.options)!=null&&o.onShow)return this.options.onShow(this,e,r,i)});m(this,"onClickItem",(t,e)=>{!this.anchor||(this.options.autoDeleteTrigger&&this.deleteTrigger(),this.options.onClickItem(this,e,this.anchor))});m(this,"queryItems",(t,e)=>this.options.queryItems(this,e));m(this,"renderMenuItem",(t,e)=>{var i,o;return(o=(i=this.options).renderMenuItem)==null?void 0:o.call(i,this,e)});m(this,"hasExistsMenuThemeCommandBar",()=>!!document.querySelector('div.tippy-box[data-theme="menu"]'));this.editor=t,this.options=e,this.menu=new xN(t,{id:e.id,showLoading:e.showLoading,loadingElement:e.loadingElement,placeholder:e.placeholder,header:e.header,footer:e.footer,wait:e.wait,noResultMessage:e.noResultMessage,highlight:e.highlight,onClose:this.onClose,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems,renderMenuItem:this.renderMenuItem}),t.input.addHandler(this),t.addListener("selectionChanged",this.handleSelectionChanged)}handleBeforeKeyDown(t,e){var r;return!((r=this.menu)!=null&&r.isVisible)||jp(e.key)?!1:av(e)&&!sa(e)?(setTimeout(()=>{this.resetItems()}),!1):p0(e)?(this.menu.close(),!0):zp(e)&&!this.menu.menu.getSelectedItem()?(this.menu.close(),!0):this.menu.handleKeydown(e)}popup(t,e,r,i){this.anchor={blockId:dt(t),offset:e,leftText:r,trigger:i};const o=Et(at(t)),s=Rt(t);this.menu.popupInEditor(o,s,e)}triggerPopup(t,e,r,i,o){var l;const s=t.selection.range.start;if(!s.isSimple())return!1;if(this.options.trigger.indexOf(o)!==-1){const c=t.getBlockByIndex(e,r);if(i>0&&this.options.needSpaceBeforeTrigger&&(((l=t.getBlockData(c).text)==null?void 0:l.reduce((A,v)=>A+v.insert,""))||"")[i-1].trim().length!==0||this.hasExistsMenuThemeCommandBar())return!1;const{offset:d}=s,h=Re(H0(t,c,d));this.popup(c,d,h,o)}return!1}handleAfterInsertText(t,e,r,i,o){var h;const s=t.selection.range.start;if(!s.isSimple())return!1;const l=t.getBlockByIndex(e,r);if(Ko(l))return!1;const{blockId:c,offset:d}=s;return dt(l)!==c?!1:(h=this.menu)!=null&&h.isVisible?(this.resetItems(),!1):this.triggerPopup(t,e,r,i,o)}handleUpdateCompositionText(t,e,r,i,o){var h;const s=t.selection.range.start;if(!s.isSimple())return!1;const{blockId:l}=s,c=t.getBlockByIndex(e,r);if(dt(c)!==l)return!1;if((h=this.menu)!=null&&h.isVisible&&this.resetItems(),!o)return this.oldCompositingText=t.compositingText,!1;const d=this.triggerPopup(t,e,r,i,this.oldCompositingText);return this.oldCompositingText="",d}resetItems(){var l;if(!((l=this.menu)!=null&&l.isVisible))return;const t=this.editor,e=t.selection.range.start;if(!e.isSimple())return;const{blockId:r,offset:i}=e,o=t.getBlockById(r),s=Re(H0(t,o,i));if(p(EE,this.anchor,"no anchor"),s.startsWith(this.anchor.leftText)){const c=s.substring(this.anchor.leftText.length);EE.debug(`search text: ${c}`),this.menu.handleSearchText(c)}}destroy(){var t;this.editor.input.removeHandler(this),this.editor.removeListener("selectionChanged",this.handleSelectionChanged),(t=this.menu)==null||t.destroy()}}function bN(){const n={};for(let t=1;t<=8;t++)n[`heading-${t}`]={shortcut:`/h${t}`};return n}const vN={"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"},...bN()};function tr(n){var t;return(t=vN[n])==null?void 0:t.shortcut}function BN(n){var t;return(t=n.subText)!=null?t:""}const so=D("table-dom");function lo(n){return`${dt(n)}_scroll`}function fn(n){const t=n.querySelector("div[data-type=table-content] >table");return p(so,t instanceof HTMLTableElement,"invalid table"),t}function ao(n,t){const r=n.getCustom(lo(t)).contentElement.firstElementChild;p(so,r instanceof HTMLElement,"invalid table content");let i=r.querySelector(":scope >div[data-type=table-tools]");return i||(i=B("div",[],r),i.setAttribute("data-type","table-tools"),n.domEvents.addEventListener(i,"dblclick",(o,s)=>s.stopPropagation()),n.domEvents.addEventListener(i,"click",(o,s)=>{s.detail===3&&s.stopPropagation()})),p(so,i,"no table tools"),i}function yN(n,t){return n.findCustom(lo(t))?ao(n,t):null}function U2(n){const t=[];return Array.from(n.rows).forEach(e=>{t.push(...Array.from(e.cells))}),t}function Ed(n){const t=n.querySelector(":scope div[data-type=editor-container]");return p(so,t,"no child container in cell"),t}function TN(n){const r=U2(n).map(i=>{const o=Ed(i),s=Et(o),l=i.colSpan,c=i.rowSpan;return`${s}/${l}/${c}`}).join();return Rv(r)}function dn(n){return Ot(n)==="table"}function xE(n){const t=at(n);if(ie(t))return null;const e=et(t);return p(so,e,"no parent block"),dn(e)?t:xE(e)}function is(n){if(dn(n))return n;const t=at(n);if(ie(t))return null;const e=et(t);return p(so,e,"no parent block"),dn(e)?e:is(e)}function kN(n,t){const e=n.querySelector("colgroup");p(so,e,"no colgroup");const r=e.children[t];return p(so,r,"no col"),p(so,r instanceof HTMLTableColElement,`invalid col: ${r.tagName}`),r}function O2(n){try{return fn(n),!0}catch{return!1}}function RN(n){return ve(n).querySelector(":scope > .block-helper")}function N2(n){const t=et(n.contentElement);p(so,t,"no block");const e=RN(t);if(e){const o=Math.min(n.contentElement.offsetLeft+29,n.rootElement.scrollLeft),s=t.getBoundingClientRect().width;e.style.right=`${o+s+5}px`}}function wN(n){const t=n.getComponentOptions("table"),e=t==null?void 0:t.bigTableBoundary;if(!e)return!1;const r=n.rootContainer.querySelectorAll("div[data-type=table-content] >table");let i=!1;return r.forEach(o=>{o.getBoundingClientRect().width>e&&(i=!0)}),i}var bE={exports:{}};(function(n,t){var e=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,l=1/0,c=9007199254740991,d="[object Arguments]",h="[object Array]",C="[object Boolean]",E="[object Date]",A="[object Error]",v="[object Function]",R="[object GeneratorFunction]",S="[object Map]",M="[object Number]",U="[object Object]",V="[object Promise]",nt="[object RegExp]",Y="[object Set]",X="[object String]",ft="[object Symbol]",pt="[object WeakMap]",ct="[object ArrayBuffer]",wt="[object DataView]",Bt="[object Float32Array]",Jt="[object Float64Array]",ce="[object Int8Array]",Oe="[object Int16Array]",pe="[object Int32Array]",ni="[object Uint8Array]",$e="[object Uint8ClampedArray]",bn="[object Uint16Array]",Ir="[object Uint32Array]",nr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nn=/^\w*$/,uh=/^\./,fh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dh=/[\\^$.*+?()[\]{}|]/g,Eo=/\\(\\)?/g,cs=/^\[object .+?Constructor\]$/,us=/^(?:0|[1-9]\d*)$/,ee={};ee[Bt]=ee[Jt]=ee[ce]=ee[Oe]=ee[pe]=ee[ni]=ee[$e]=ee[bn]=ee[Ir]=!0,ee[d]=ee[h]=ee[ct]=ee[C]=ee[wt]=ee[E]=ee[A]=ee[v]=ee[S]=ee[M]=ee[U]=ee[nt]=ee[Y]=ee[X]=ee[pt]=!1;var Gt=typeof Tn=="object"&&Tn&&Tn.Object===Object&&Tn,ri=typeof self=="object"&&self&&self.Object===Object&&self,Pn=Gt||ri||Function("return this")(),fs=t&&!t.nodeType&&t,Oa=fs&&!0&&n&&!n.nodeType&&n,kn=Oa&&Oa.exports===fs,Ao=kn&&Gt.process,Na=function(){try{return Ao&&Ao.binding("util")}catch{}}(),rr=Na&&Na.isTypedArray;function Fu(k,N){var W=k?k.length:0;return!!W&&hs(k,N,0)>-1}function hh(k,N,W){for(var lt=-1,St=k?k.length:0;++lt<St;)if(W(N,k[lt]))return!0;return!1}function ds(k,N){for(var W=-1,lt=k?k.length:0;++W<lt;)if(N(k[W],W,k))return!0;return!1}function Ne(k,N,W,lt){for(var St=k.length,ht=W+(lt?1:-1);lt?ht--:++ht<St;)if(N(k[ht],ht,k))return ht;return-1}function hs(k,N,W){if(N!==N)return Ne(k,ms,W);for(var lt=W-1,St=k.length;++lt<St;)if(k[lt]===N)return lt;return-1}function ms(k){return k!==k}function Ku(k){return function(N){return N==null?void 0:N[k]}}function gs(k,N){for(var W=-1,lt=Array(k);++W<k;)lt[W]=N(W);return lt}function Vu(k){return function(N){return k(N)}}function ps(k,N){return k.has(N)}function xo(k,N){return k==null?void 0:k[N]}function Cs(k){var N=!1;if(k!=null&&typeof k.toString!="function")try{N=!!(k+"")}catch{}return N}function Pa(k){var N=-1,W=Array(k.size);return k.forEach(function(lt,St){W[++N]=[St,lt]}),W}function Fa(k,N){return function(W){return k(N(W))}}function Es(k){var N=-1,W=Array(k.size);return k.forEach(function(lt){W[++N]=lt}),W}var Ka=Array.prototype,Va=Function.prototype,bo=Object.prototype,As=Pn["__core-js_shared__"],Dl=function(){var k=/[^.]+$/.exec(As&&As.keys&&As.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),$u=Va.toString,Dr=bo.hasOwnProperty,vo=bo.toString,Hu=RegExp("^"+$u.call(Dr).replace(dh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$a=Pn.Symbol,ju=Pn.Uint8Array,mh=bo.propertyIsEnumerable,gh=Ka.splice,ph=Fa(Object.keys,Object),_l=So(Pn,"DataView"),xs=So(Pn,"Map"),Ha=So(Pn,"Promise"),Bo=So(Pn,"Set"),bs=So(Pn,"WeakMap"),vs=So(Object,"create"),ja=Ni(_l),Ch=Ni(xs),Eh=Ni(Ha),be=Ni(Bo),Ah=Ni(bs),Ml=$a?$a.prototype:void 0,Ul=Ml?Ml.valueOf:void 0,yo=Ml?Ml.toString:void 0;function Ui(k){var N=-1,W=k?k.length:0;for(this.clear();++N<W;){var lt=k[N];this.set(lt[0],lt[1])}}function Ol(){this.__data__=vs?vs(null):{}}function zu(k){return this.has(k)&&delete this.__data__[k]}function Gu(k){var N=this.__data__;if(vs){var W=N[k];return W===i?void 0:W}return Dr.call(N,k)?N[k]:void 0}function xh(k){var N=this.__data__;return vs?N[k]!==void 0:Dr.call(N,k)}function bh(k,N){var W=this.__data__;return W[k]=vs&&N===void 0?i:N,this}Ui.prototype.clear=Ol,Ui.prototype.delete=zu,Ui.prototype.get=Gu,Ui.prototype.has=xh,Ui.prototype.set=bh;function _r(k){var N=-1,W=k?k.length:0;for(this.clear();++N<W;){var lt=k[N];this.set(lt[0],lt[1])}}function vh(){this.__data__=[]}function Nl(k){var N=this.__data__,W=To(N,k);if(W<0)return!1;var lt=N.length-1;return W==lt?N.pop():gh.call(N,W,1),!0}function Bh(k){var N=this.__data__,W=To(N,k);return W<0?void 0:N[W][1]}function Pl(k){return To(this.__data__,k)>-1}function yh(k,N){var W=this.__data__,lt=To(W,k);return lt<0?W.push([k,N]):W[lt][1]=N,this}_r.prototype.clear=vh,_r.prototype.delete=Nl,_r.prototype.get=Bh,_r.prototype.has=Pl,_r.prototype.set=yh;function Mr(k){var N=-1,W=k?k.length:0;for(this.clear();++N<W;){var lt=k[N];this.set(lt[0],lt[1])}}function Th(){this.__data__={hash:new Ui,map:new(xs||_r),string:new Ui}}function Wu(k){return ks(this,k).delete(k)}function Fl(k){return ks(this,k).get(k)}function qu(k){return ks(this,k).has(k)}function kh(k,N){return ks(this,k).set(k,N),this}Mr.prototype.clear=Th,Mr.prototype.delete=Wu,Mr.prototype.get=Fl,Mr.prototype.has=qu,Mr.prototype.set=kh;function Bs(k){var N=-1,W=k?k.length:0;for(this.__data__=new Mr;++N<W;)this.add(k[N])}function Rh(k){return this.__data__.set(k,i),this}function mr(k){return this.__data__.has(k)}Bs.prototype.add=Bs.prototype.push=Rh,Bs.prototype.has=mr;function Fn(k){this.__data__=new _r(k)}function ii(){this.__data__=new _r}function Ye(k){return this.__data__.delete(k)}function za(k){return this.__data__.get(k)}function wh(k){return this.__data__.has(k)}function Ur(k,N){var W=this.__data__;if(W instanceof _r){var lt=W.__data__;if(!xs||lt.length<e-1)return lt.push([k,N]),this;W=this.__data__=new Mr(lt)}return W.set(k,N),this}Fn.prototype.clear=ii,Fn.prototype.delete=Ye,Fn.prototype.get=za,Fn.prototype.has=wh,Fn.prototype.set=Ur;function Or(k,N){var W=Pi(k)||Za(k)?gs(k.length,String):[],lt=W.length,St=!!lt;for(var ht in k)(N||Dr.call(k,ht))&&!(St&&(ht=="length"||Ju(ht,lt)))&&W.push(ht);return W}function To(k,N){for(var W=k.length;W--;)if(Zu(k[W][0],N))return W;return-1}function ys(k,N){N=Vl(N,k)?[N]:oi(N);for(var W=0,lt=N.length;k!=null&&W<lt;)k=k[$l(N[W++])];return W&&W==lt?k:void 0}function Ga(k){return vo.call(k)}function Oi(k,N){return k!=null&&N in Object(k)}function gr(k,N,W,lt,St){return k===N?!0:k==null||N==null||!ai(k)&&!vn(N)?k!==k&&N!==N:Wa(k,N,gr,W,lt,St)}function Wa(k,N,W,lt,St,ht){var $t=Pi(k),te=Pi(N),ue=h,we=h;$t||(ue=si(k),ue=ue==d?U:ue),te||(we=si(N),we=we==d?U:we);var Se=ue==U&&!Cs(k),De=we==U&&!Cs(N),ne=ue==we;if(ne&&!Se)return ht||(ht=new Fn),$t||ec(k)?Qu(k,N,W,lt,St,ht):Ih(k,N,ue,W,lt,St,ht);if(!(St&s)){var Rn=Se&&Dr.call(k,"__wrapped__"),mn=De&&Dr.call(N,"__wrapped__");if(Rn||mn){var wn=Rn?k.value():k,Sn=mn?N.value():N;return ht||(ht=new Fn),W(wn,Sn,lt,St,ht)}}return ne?(ht||(ht=new Fn),Ya(k,N,W,lt,St,ht)):!1}function qa(k,N,W,lt){var St=W.length,ht=St,$t=!lt;if(k==null)return!ht;for(k=Object(k);St--;){var te=W[St];if($t&&te[2]?te[1]!==k[te[0]]:!(te[0]in k))return!1}for(;++St<ht;){te=W[St];var ue=te[0],we=k[ue],Se=te[1];if($t&&te[2]){if(we===void 0&&!(ue in k))return!1}else{var De=new Fn;if(lt)var ne=lt(we,Se,ue,k,N,De);if(!(ne===void 0?gr(Se,we,lt,o|s,De):ne))return!1}}return!0}function ko(k){if(!ai(k)||_h(k))return!1;var N=li(k)||Cs(k)?Hu:cs;return N.test(Ni(k))}function Xa(k){return vn(k)&&Lo(k.length)&&!!ee[vo.call(k)]}function Ro(k){return typeof k=="function"?k:k==null?Kn:typeof k=="object"?Pi(k)?Sh(k[0],k[1]):Xu(k):qn(k)}function wo(k){if(!Mh(k))return ph(k);var N=[];for(var W in Object(k))Dr.call(k,W)&&W!="constructor"&&N.push(W);return N}function Xu(k){var N=Qa(k);return N.length==1&&N[0][2]?de(N[0][0],N[0][1]):function(W){return W===k||qa(W,k,N)}}function Sh(k,N){return Vl(k)&&Ce(N)?de($l(k),N):function(W){var lt=tf(W,k);return lt===void 0&&lt===N?rc(W,k):gr(N,lt,void 0,o|s)}}function Yu(k){return function(N){return ys(N,k)}}function Ts(k){if(typeof k=="string")return k;if(Rs(k))return yo?yo.call(k):"";var N=k+"";return N=="0"&&1/k==-l?"-0":N}function Kl(k,N,W){var lt=-1,St=Fu,ht=k.length,$t=!0,te=[],ue=te;if(W)$t=!1,St=hh;else if(ht>=e){var we=N?null:Lh(k);if(we)return Es(we);$t=!1,St=ps,ue=new Bs}else ue=N?[]:te;t:for(;++lt<ht;){var Se=k[lt],De=N?N(Se):Se;if(Se=W||Se!==0?Se:0,$t&&De===De){for(var ne=ue.length;ne--;)if(ue[ne]===De)continue t;N&&ue.push(De),te.push(Se)}else St(ue,De,W)||(ue!==te&&ue.push(De),te.push(Se))}return te}function oi(k){return Pi(k)?k:Uh(k)}var Lh=Bo&&1/Es(new Bo([,-0]))[1]==l?function(k){return new Bo(k)}:Nh;function Qu(k,N,W,lt,St,ht){var $t=St&s,te=k.length,ue=N.length;if(te!=ue&&!($t&&ue>te))return!1;var we=ht.get(k);if(we&&ht.get(N))return we==N;var Se=-1,De=!0,ne=St&o?new Bs:void 0;for(ht.set(k,N),ht.set(N,k);++Se<te;){var Rn=k[Se],mn=N[Se];if(lt)var wn=$t?lt(mn,Rn,Se,N,k,ht):lt(Rn,mn,Se,k,N,ht);if(wn!==void 0){if(wn)continue;De=!1;break}if(ne){if(!ds(N,function(Sn,Bn){if(!ne.has(Bn)&&(Rn===Sn||W(Rn,Sn,lt,St,ht)))return ne.add(Bn)})){De=!1;break}}else if(!(Rn===mn||W(Rn,mn,lt,St,ht))){De=!1;break}}return ht.delete(k),ht.delete(N),De}function Ih(k,N,W,lt,St,ht,$t){switch(W){case wt:if(k.byteLength!=N.byteLength||k.byteOffset!=N.byteOffset)return!1;k=k.buffer,N=N.buffer;case ct:return!(k.byteLength!=N.byteLength||!lt(new ju(k),new ju(N)));case C:case E:case M:return Zu(+k,+N);case A:return k.name==N.name&&k.message==N.message;case nt:case X:return k==N+"";case S:var te=Pa;case Y:var ue=ht&s;if(te||(te=Es),k.size!=N.size&&!ue)return!1;var we=$t.get(k);if(we)return we==N;ht|=o,$t.set(k,N);var Se=Qu(te(k),te(N),lt,St,ht,$t);return $t.delete(k),Se;case ft:if(Ul)return Ul.call(k)==Ul.call(N)}return!1}function Ya(k,N,W,lt,St,ht){var $t=St&s,te=ws(k),ue=te.length,we=ws(N),Se=we.length;if(ue!=Se&&!$t)return!1;for(var De=ue;De--;){var ne=te[De];if(!($t?ne in N:Dr.call(N,ne)))return!1}var Rn=ht.get(k);if(Rn&&ht.get(N))return Rn==N;var mn=!0;ht.set(k,N),ht.set(N,k);for(var wn=$t;++De<ue;){ne=te[De];var Sn=k[ne],Bn=N[ne];if(lt)var Ss=$t?lt(Bn,Sn,ne,N,k,ht):lt(Sn,Bn,ne,k,N,ht);if(!(Ss===void 0?Sn===Bn||W(Sn,Bn,lt,St,ht):Ss)){mn=!1;break}wn||(wn=ne=="constructor")}if(mn&&!wn){var Fi=k.constructor,Io=N.constructor;Fi!=Io&&"constructor"in k&&"constructor"in N&&!(typeof Fi=="function"&&Fi instanceof Fi&&typeof Io=="function"&&Io instanceof Io)&&(mn=!1)}return ht.delete(k),ht.delete(N),mn}function ks(k,N){var W=k.__data__;return Dh(N)?W[typeof N=="string"?"string":"hash"]:W.map}function Qa(k){for(var N=ws(k),W=N.length;W--;){var lt=N[W],St=k[lt];N[W]=[lt,St,Ce(St)]}return N}function So(k,N){var W=xo(k,N);return ko(W)?W:void 0}var si=Ga;(_l&&si(new _l(new ArrayBuffer(1)))!=wt||xs&&si(new xs)!=S||Ha&&si(Ha.resolve())!=V||Bo&&si(new Bo)!=Y||bs&&si(new bs)!=pt)&&(si=function(k){var N=vo.call(k),W=N==U?k.constructor:void 0,lt=W?Ni(W):void 0;if(lt)switch(lt){case ja:return wt;case Ch:return S;case Eh:return V;case be:return Y;case Ah:return pt}return N});function Ja(k,N,W){N=Vl(N,k)?[N]:oi(N);for(var lt,St=-1,$t=N.length;++St<$t;){var ht=$l(N[St]);if(!(lt=k!=null&&W(k,ht)))break;k=k[ht]}if(lt)return lt;var $t=k?k.length:0;return!!$t&&Lo($t)&&Ju(ht,$t)&&(Pi(k)||Za(k))}function Ju(k,N){return N=N==null?c:N,!!N&&(typeof k=="number"||us.test(k))&&k>-1&&k%1==0&&k<N}function Vl(k,N){if(Pi(k))return!1;var W=typeof k;return W=="number"||W=="symbol"||W=="boolean"||k==null||Rs(k)?!0:Nn.test(k)||!nr.test(k)||N!=null&&k in Object(N)}function Dh(k){var N=typeof k;return N=="string"||N=="number"||N=="symbol"||N=="boolean"?k!=="__proto__":k===null}function _h(k){return!!Dl&&Dl in k}function Mh(k){var N=k&&k.constructor,W=typeof N=="function"&&N.prototype||bo;return k===W}function Ce(k){return k===k&&!ai(k)}function de(k,N){return function(W){return W==null?!1:W[k]===N&&(N!==void 0||k in Object(W))}}var Uh=Hl(function(k){k=nc(k);var N=[];return uh.test(k)&&N.push(""),k.replace(fh,function(W,lt,St,ht){N.push(St?ht.replace(Eo,"$1"):lt||W)}),N});function $l(k){if(typeof k=="string"||Rs(k))return k;var N=k+"";return N=="0"&&1/k==-l?"-0":N}function Ni(k){if(k!=null){try{return $u.call(k)}catch{}try{return k+""}catch{}}return""}function Oh(k,N){return k&&k.length?Kl(k,Ro(N)):[]}function Hl(k,N){if(typeof k!="function"||N&&typeof N!="function")throw new TypeError(r);var W=function(){var lt=arguments,St=N?N.apply(this,lt):lt[0],ht=W.cache;if(ht.has(St))return ht.get(St);var $t=k.apply(this,lt);return W.cache=ht.set(St,$t),$t};return W.cache=new(Hl.Cache||Mr),W}Hl.Cache=Mr;function Zu(k,N){return k===N||k!==k&&N!==N}function Za(k){return tc(k)&&Dr.call(k,"callee")&&(!mh.call(k,"callee")||vo.call(k)==d)}var Pi=Array.isArray;function Qe(k){return k!=null&&Lo(k.length)&&!li(k)}function tc(k){return vn(k)&&Qe(k)}function li(k){var N=ai(k)?vo.call(k):"";return N==v||N==R}function Lo(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=c}function ai(k){var N=typeof k;return!!k&&(N=="object"||N=="function")}function vn(k){return!!k&&typeof k=="object"}function Rs(k){return typeof k=="symbol"||vn(k)&&vo.call(k)==ft}var ec=rr?Vu(rr):Xa;function nc(k){return k==null?"":Ts(k)}function tf(k,N,W){var lt=k==null?void 0:ys(k,N);return lt===void 0?W:lt}function rc(k,N){return k!=null&&Ja(k,N,Oi)}function ws(k){return Qe(k)?Or(k):wo(k)}function Kn(k){return k}function Nh(){}function qn(k){return Vl(k)?Ku($l(k)):Yu(k)}n.exports=Oh})(bE,bE.exports);const SN=bE.exports,Ri=D("doc-table-grid");class LN{constructor(t){m(this,"_cells",[]);for(let e=0;e<t;e++)this._cells.push(void 0)}cols(){return this._cells.length}setCell(t,e){p(Ri,t>=0&&t<this.cols(),`set cell, invalid col: ${t}`),this._cells[t]=e}getCell(t){p(Ri,t>=0&&t<this.cols(),`get cell, invalid col: ${t}`);const e=this._cells[t];return p(Ri,e,"get cell, no cell"),e}getCellAllowEmpty(t){return p(Ri,t>=0&&t<this.cols(),`get cell, invalid col, ${t}`),this._cells[t]}getNextNonVirtualCell(t){return this._cells.slice(t+1).find(e=>!e.virtual)}forEach(t){this._cells.forEach(t)}}class Um{constructor(t){m(this,"_data");m(this,"_rows");this._data=t,this._rows=[];for(let e=0;e<this.rowCount;e++)this._rows.push(new LN(this.colCount));this.fillGrid()}get rowCount(){return this._data.rows}get colCount(){return this._data.cols}getNextEmptyCell(t,e){let r=t,i=e;for(;;){if(r+=1,r===this.colCount&&(r=0,i+=1),i>=this.rowCount)return null;if(this._rows[i].getCellAllowEmpty(r)===void 0)return{col:r,row:i}}}fillGrid(){const t=this._data.children;p(Ri,t,"no children");let e=0,r=0;t.forEach((i,o)=>{const s=this._data[`${i}_colSpan`]||1,l=this._data[`${i}_rowSpan`]||1,c=this._data[`${i}_background`]||"";for(let h=0;h<l;h++)for(let C=0;C<s;C++){const E={col:e,row:r,containerId:i,virtual:C!==0||h!==0,colSpan:s,rowSpan:l};c&&(E.background=c),this._rows[r+h].setCell(e+C,E)}const d=this.getNextEmptyCell(e,r);d?(e=d.col,r=d.row):p(Ri,o===t.length-1,`invalid table data, no next empty cell: ${JSON.stringify(this._data)}`)}),this._rows.forEach(i=>{i.forEach(o=>{p(Ri,o,"no cell"),p(Ri,o.containerId,"no containerId")})})}getCell(t){const{col:e,row:r}=t,i=this._rows[r];p(Ri,i,`get cell, no row: ${r}`);const o=i.getCell(e);return p(Ri,o,`get cell, no cell: ${e}`),o}getRow(t){const e=this._rows[t];return p(Ri,e,`get row, no row: ${t}`),e}forEach(t){this._rows.forEach(t)}}const Om=D("table-data");function IN(n){for(const t of Array.from(n.classList))if(t.startsWith("style-bg-color-"))return t;return""}function DN(n){const t=n.firstElementChild;return p(Om,t,"no child element for cell"),p(Om,Qs(t),"cell first child is not a container"),p(Om,gi(t),"cell first child is not a container"),t}function _N(n){const t=et(n);p(Om,t,"no parent block for table");const e=[],r={},i={};Array.from(n.rows).forEach(c=>{Array.from(c.cells).forEach(d=>{const h=DN(d),C=Et(h);e.push(C),(d.colSpan>1||d.rowSpan>1)&&(r[`${C}_colSpan`]=d.colSpan,r[`${C}_rowSpan`]=d.rowSpan);const E=IN(d);E&&(i[`${C}_background`]=E)})});const o=n.rows.length,s=Array.from(n.rows[0].cells).map(c=>c.colSpan).reduce((c,d)=>c+d,0);return{id:dt(t),type:Ot(t),rows:o,cols:s,children:e,colsWidth:Array(s).fill(100),...r,...i}}function hl(n){return new Um(n)}function MN(n){return hl(_N(n))}const en=D("table-grid"),UN=60;class ON{constructor(t,e){m(this,"containerId");m(this,"row");m(this,"col");m(this,"colSpan");m(this,"rowSpan");m(this,"background");m(this,"virtual");m(this,"table");this.table=t,this.containerId=e.containerId,this.row=e.row,this.col=e.col,this.colSpan=e.colSpan,this.rowSpan=e.rowSpan,this.virtual=e.virtual,e.background&&(this.background=e.background)}get cell(){const e=this.container.closest("td");return p(en,e,"no parent cell for child container"),e}get container(){const t=o1(this.containerId),e=this.table.querySelectorAll(`#${t}`);p(en,e.length===1,"containers !== 1"),p(en,Qs(e[0]),"not a container");const r=e[0];return p(en,gi(r),"not a child container"),r}}class NN{constructor(t,e){m(this,"_cells",[]);e.forEach(r=>{this._cells.push(new ON(t,r))})}get cells(){return this._cells}getCell(t){return p(en,t<this._cells.length,"get cell, invalid col"),this._cells[t]}getNextNonVirtualCell(t){return this._cells.slice(t+1).find(e=>!e.virtual)}getSpannedCell(){return this._cells.find(t=>t.virtual||t.colSpan>1||t.rowSpan>1)}}const Ox=class{constructor(t){m(this,"_rows",[]);this.table=t,MN(t).forEach(i=>{this._rows.push(new NN(t,i))});const r=this.colCount;this._rows.forEach(i=>{p(en,i.cells.length===r,"row.cells.length !== colCount")})}get rowCount(){return this._rows.length}get colCount(){return this._rows.length===0?0:(p(en,this.rowCount>0,"rowCount <= 0"),this.getRow(0).cells.length)}getRow(t){return this._rows[t]}getCell(t){const e=this.getRow(t.row);return p(en,e,"no row"),e.getCell(t.col)}getCellContainer(t){return this.getCell(t).container}getFirstCellContainer(){return this.getCellContainer({row:0,col:0})}getLastCellContainer(){const t=this.rowCount-1,e=this.colCount-1;return this.getCellContainer({row:t,col:e})}getColumnCells(t){p(en,t>=0&&t<this.colCount,"colIndex out of range");const e=this.rowCount,r=[];for(let i=0;i<e;i++){const o=this.getCell({row:i,col:t});r.push(o)}return r}toRealCells(t){const e=[];return t.forEach(r=>{const i=this.getRealCell(r);e.findIndex(o=>o.containerId===i.containerId)===-1&&e.push(i)}),e}getColumnRealCells(t){const e=this.getColumnCells(t);return this.toRealCells(e)}getRowRealCells(t){const e=this.getRow(t).cells;return this.toRealCells(e)}getFirstSpannedCell(t){p(en,t>=0&&t<this.colCount,"colIndex out of range");const e=this.rowCount;for(let r=0;r<e;r++){const i=this.getCell({row:r,col:t});if(i.virtual||i.colSpan>1||i.rowSpan>1)return i}}getRealCell(t){const e=this.getCell(t);if(!e.virtual)return e;const r=this.getCellById(e.containerId);return p(en,!r.virtual,"found a virtual cell"),r}getColumnSpannedRange(t){const e=this.getColumnRealCells(t);let r=1e5,i=-1;return e.forEach(o=>{r=Math.min(o.col,r),i=Math.max(o.col+o.colSpan-1,i)}),p(en,r<=i,"min > max"),p(en,r>=0,"min < 0"),p(en,i<this.colCount,"max >= colCount"),[r,i]}getRowSpannedRange(t){const e=this.getRowRealCells(t);let r=1e5,i=-1;return e.forEach(o=>{r=Math.min(o.row,r),i=Math.max(o.row+o.rowSpan-1,i)}),p(en,r<=i,"min > max"),p(en,r>=0,"min < 0"),p(en,i<this.rowCount,"max >= rowCount"),[r,i]}getSpannedRange(t,e){const r=Math.min(t.row,e.row),i=Math.max(t.row,e.row),o=Math.min(t.col,e.col),s=Math.max(t.col,e.col),l=[];for(let A=r;A<=i;A++)for(let v=o;v<=s;v++)l.push(this.getCell({row:A,col:v}));const c=this.toRealCells(l);let d=1e4,h=1e4,C=-1,E=-1;return c.forEach(A=>{h=Math.min(A.col,h),d=Math.min(A.row,d),E=Math.max(A.col+A.colSpan-1,E),C=Math.max(A.row+A.rowSpan-1,C)}),[{row:d,col:h},{row:C,col:E}]}getAllCells(){return this.getCells({col:0,row:0},{col:this.colCount-1,row:this.rowCount-1})}sub(t,e){const r=[];for(let i=t.row;i<=e.row;i++){const o=[];for(let s=t.col;s<=e.col;s++){const l=this.getCell({row:i,col:s});o.push(l)}r.push(o)}return r}getAllContainers(){return this.getAllCells().map(e=>e.container)}getCells(t,e){const r=[],i=this.getSpannedRange(t,e),o=i[0],s=i[1],l=Math.min(o.row,s.row),c=Math.max(o.row,s.row),d=Math.min(o.col,s.col),h=Math.max(o.col,s.col);for(let C=l;C<=c;C++)for(let E=d;E<=h;E++){const A=this.getCell({row:C,col:E});A.virtual||r.push(A)}return r}map(t){const e=[];for(let r=0;r<this.rowCount;r++){const i=[];for(let o=0;o<this.colCount;o++){const s=this.getCell({row:r,col:o});i.push(t(s))}e.push(i)}return e}getBottomCell(t){const e=this.rowCount;let r=t,i=t.row;for(;r.containerId===t.containerId;){if(i+=1,i>=e)return null;r=this.getCell({row:i,col:t.col})}return this.getRealCell(r)}getTopCell(t){let e=t,r=t.row;for(;e.containerId===t.containerId;){if(r-=1,r<0)return null;e=this.getCell({row:r,col:t.col})}return this.getRealCell(e)}getLeftCell(t){const e=this.uniqueCells,r=e.findIndex(i=>i.containerId===t.containerId);return p(en,r>=0,"not a valid child container"),r===0?null:e[r-1]}getRightCell(t){const e=this.uniqueCells,r=e.findIndex(i=>i.containerId===t.containerId);return p(en,r>=0,"not a valid child container"),r===e.length-1?null:e[r+1]}get uniqueCells(){return SN(this.cells,"containerId")}get cells(){let t=[];return this._rows.forEach(e=>{t=t.concat(e.cells)}),t}getVirtualCellContainersGrid(){return this.map(t=>t.containerId)}static virtualCellContainersGridToChildren(t){const e=t,r=[];return e.forEach(i=>{i.forEach(o=>{r.indexOf(o)===-1&&r.push(o)})}),r}getCellById(t){const r=this.cells.find(i=>i.containerId===t);return p(en,r,"cell not found"),r}getCellByCellElement(t){const e=Ed(t);return this.getCellByContainerId(Et(e))}getCellByContainerId(t){return this.getCellById(t)}static fromTable(t){const e=TN(t),r=this.caches.getSync(e,()=>(en.debug("create table grid"),new Ox(t)));return r.table!==t?(this.caches.delete(e),this.fromTable(t)):r}static fromBlock(t){return this.fromTable(fn(t))}};let Kt=Ox;m(Kt,"caches",new zb(UN));function Nm(n,t){Object.entries(n).forEach(([e])=>{e.startsWith(`${t}/`)&&delete n[e]})}const PN=D("table-selection-range");function wi(n,t,e){var U,V,nt,Y;const r=Kt.fromBlock(n),i=t,o=e,s=r.getCellByContainerId(i.childContainerId),l=r.getCellByContainerId(o.childContainerId),c=i.custom,d=o.custom,h=(U=c==null?void 0:c.rowIndex)!=null?U:s.row,C=(V=c==null?void 0:c.colIndex)!=null?V:s.col,E=(nt=d==null?void 0:d.rowIndex)!=null?nt:l.row+l.rowSpan-1,A=(Y=d==null?void 0:d.colIndex)!=null?Y:l.col+l.colSpan-1,v=Math.min(h,E),R=Math.max(h,E),S=Math.min(C,A),M=Math.max(C,A);return{fromRow:v,toRow:R,fromCol:S,toCol:M}}function vE(n,t){const e=new Set,r=new Set,i=n.selection.range;if(!i.isSimple()&&i.start.blockId===dt(t)){const o=Kt.fromBlock(t),{start:s,end:l}=i;p(PN,!s.isSimple()&&!l.isSimple(),"invalid range");const{fromCol:c,toCol:d,fromRow:h,toRow:C}=wi(t,s,l);if(h===0&&C===o.rowCount-1)for(let E=c;E<=d;E++)r.add(E);if(c===0&&d===o.colCount-1)for(let E=h;E<=C;E++)e.add(E)}return{selectedRows:e,selectedColumns:r}}function Ad(n,t){let e=null;if(t.isCollapsed()&&t.isSimple()){const r=n.getBlockById(t.start.blockId);if(dn(r)){const i=at(r),o=et(i);o&&(e=is(o))}else e=is(r)}else{const r=n.getBlockById(t.start.blockId),i=is(r),o=n.getBlockById(t.end.blockId),s=is(o);i===s&&(e=i)}return e}const lu=D("delete-columns");function P2(n,t,e){const{start:r,end:i}=e;if(r.blockId!==i.blockId||e.isSimple()||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{fromRow:s,toRow:l}=wi(t,e.start,e.end),c=Kt.fromBlock(t);return s===0&&l===c.rowCount-1}function BE(n){const t=n.getEditor();t.undoManager.runInGroup(()=>{var V,nt;const e=t.getBlockById(n.start.blockId);if(!P2(t,e,n))return;if(n.isSimple()){t.deleteBlock(e);return}const{fromCol:r,toCol:i}=wi(e,n.start,n.end),o=Kt.fromBlock(e);if(r===0&&i===o.colCount-1){t.deleteBlock(e);return}const s=new Set,l=o.map(Y=>Y.containerId);for(let Y=0;Y<l.length;Y++){const X=l[Y];for(let ft=r;ft<=i;ft++){const pt=X[ft];s.add(pt)}X.splice(r,i-r+1)}const c=new Set(l.flat()),d=new Set(Array.from(s).filter(Y=>!c.has(Y))),h=i-r+1,C=new Map,E=new Map;s.forEach(Y=>{if(d.has(Y))return;const X=o.getCellByContainerId(Y);if(p(lu,X.colSpan>1,"invalid effected cell, colSpan === 1"),X.col<r){p(lu,c.has(Y),"invalid effected cell, not exists");let Jt=X.col+X.colSpan-1;Jt>i&&(Jt=i);const ce=Jt-r+1,Oe=X.colSpan-ce;C.set(Y,Oe);return}p(lu,X.col<=i,"invalid effected cell, col > endCol");const ft=X.col,pt=X.col+X.colSpan-1,ct=X.col-r,wt=pt-ft+1-h+ct;p(lu,wt>0,"invalid effected cell, newSpanned <= 0");const Bt=Yo(t.doc);E.set(Y,{newContainerId:Bt,colSpan:wt})});for(let Y=0;Y<l.length;Y++){const X=l[Y];for(let ft=r;ft<X.length;ft++){const pt=X[ft],ct=E.get(pt);ct&&(X[ft]=ct.newContainerId)}}const A=xt.default(t.getBlockData(e));((V=A.colsWidth)!=null?V:new Array(A.cols).fill(0)).splice(r,i-r+1),d.forEach(Y=>{Nm(A,Y)}),C.forEach((Y,X)=>{p(lu,Y>=1,"invalid modified colSpan, colSpan < 1"),Y===1?A[`${X}_colSpan`]=void 0:A[`${X}_colSpan`]=Y}),E.forEach((Y,X)=>{Nm(A,X);const{newContainerId:ft,colSpan:pt}=Y;p(lu,pt>=1,"invalid newContainerData, colSpan < 1"),pt>1&&(A[`${ft}_colSpan`]=pt);const ct=o.getCellByContainerId(X).rowSpan;ct>1&&(A[`${ft}_rowSpan`]=ct)});const R=(nt=l[0][r])!=null?nt:l[0][r-1],S=t.getChildContainerData(R)[0],M=Kt.virtualCellContainersGridToChildren(l),U={...A,cols:A.cols-h,children:M};hl(U),t.updateBlockData(e,U,Ie(t,S.id,0)),t.deleteChildContainers(Array.from(d)),t.deleteChildContainers(Array.from(E.keys()))})}const au=D("delete-rows");function F2(n,t,e){const{start:r,end:i}=e;if(r.blockId!==i.blockId||e.isSimple()||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{fromCol:s,toCol:l}=wi(t,e.start,e.end),c=Kt.fromBlock(t);return s===0&&l===c.colCount-1}function yE(n){const t=n.getEditor();t.undoManager.runInGroup(()=>{const e=t.getBlockById(n.start.blockId);if(!F2(t,e,n))return;if(n.isSimple()){t.deleteBlock(e);return}const{fromRow:r,toRow:i}=wi(e,n.start,n.end),o=Kt.fromBlock(e);if(r===0&&i===o.rowCount-1){t.deleteBlock(e);return}const s=new Set,l=o.map(U=>U.containerId);for(let U=i;U>=r;U--)l[U].forEach(nt=>s.add(nt)),l.splice(U,1);const c=new Set(l.flat()),d=new Set(Array.from(s).filter(U=>!c.has(U))),h=i-r+1,C=new Map,E=new Map;s.forEach(U=>{if(d.has(U))return;const V=o.getCellByContainerId(U);if(p(au,V.rowSpan>1,"invalid effected cell, rowSpan === 1"),V.row<r){p(au,c.has(U),"invalid effected cell, not exists");let ct=V.row+V.rowSpan-1;ct>i&&(ct=i);const wt=ct-r+1,Bt=V.rowSpan-wt;C.set(U,Bt);return}p(au,V.row<=i,"invalid effected cell, col > endCol");const nt=V.row,Y=V.row+V.rowSpan-1,X=V.row-r,ft=Y-nt+1-h+X;p(au,ft>0,"invalid effected cell, newSpanned <= 0");const pt=Yo(t.doc);E.set(U,{newContainerId:pt,rowSpan:ft})});for(let U=r;U<l.length;U++){const V=l[U];for(let nt=0;nt<V.length;nt++){const Y=V[nt],X=E.get(Y);X&&(V[nt]=X.newContainerId)}}const A=xt.default(t.getBlockData(e));d.forEach(U=>{Nm(A,U)}),C.forEach((U,V)=>{p(au,U>=1,"invalid modified rowSpan, rowSpan < 1"),U===1?A[`${V}_rowSpan`]=void 0:A[`${V}_rowSpan`]=U}),E.forEach((U,V)=>{Nm(A,V);const{newContainerId:nt,rowSpan:Y}=U;p(au,Y>=1,"invalid newContainerData, rowSpan < 1"),Y>1&&(A[`${nt}_rowSpan`]=Y);const X=o.getCellByContainerId(V).colSpan;X>1&&(A[`${nt}_colSpan`]=X)});const v=l[r]?l[r][0]:l[r-1][0],R=t.getChildContainerData(v)[0],S=Kt.virtualCellContainersGridToChildren(l),M={...A,rows:A.rows-h,children:S};hl(M),t.updateBlockData(e,M,Ie(t,R.id,0)),t.deleteChildContainers(Array.from(d)),t.deleteChildContainers(Array.from(E.keys()))})}const xd=D("table-range");function Pm(n){p(xd,!n.isSimple(),"must be complex selection range");const{anchor:t,focus:e}=n;p(xd,!t.isSimple(),"invalid start pos type"),p(xd,!e.isSimple(),"invalid end pos type");const r=n.getEditor();p(xd,t.blockId===e.blockId,"invalid range, not same block");const i=r.getBlockById(t.blockId);p(xd,Ot(i)==="table","invalid block type, not a table block");const o=fn(i),s=Kt.fromTable(o),l=s.getCellByContainerId(t.childContainerId),c=s.getCellByContainerId(e.childContainerId),d=Math.min(l.row,c.row),h=Math.max(l.row,c.row),C=Math.min(l.col,c.col),E=Math.max(l.col,c.col),A=s.getCell({row:d,col:C}),v=s.getCell({row:h,col:E});return{editor:r,block:i,table:o,startCell:A,endCell:v,startRow:d,startCol:C,endRow:h,endCol:E}}const TE=D("split-cell");function kE(n,t,e){n.undoManager.runInGroup(()=>{const r=Kt.fromBlock(t),i=r.getRealCell(e);p(TE,!i.virtual,"should not split virtual cell"),p(TE,i.colSpan>1||i.rowSpan>1,"cell does not has span data");const o=r.getVirtualCellContainersGrid(),s=[];for(let A=0;A<i.rowSpan;A++)for(let v=0;v<i.colSpan;v++){if(A===0&&v===0)continue;const R=A+i.row,S=v+i.col,M=Yo(n.doc);o[R][S]=M,s.push(M)}const l=n.getBlockData(t),c=xt.default(l);c[`${i.containerId}_colSpan`]=null,c[`${i.containerId}_rowSpan`]=null;const d=i.background;d&&s.length>0&&s.forEach(A=>{c[`${A}_background`]=d}),c.children=Kt.virtualCellContainersGridToChildren(o);const C=n.getChildContainerData(i.containerId)[0];p(TE,C,"no child block");const E=Ie(n,C.id,0);hl(c),n.updateBlockData(t,c,E)})}function FN(n,t,e){e.forEach(r=>{const i=Kt.fromBlock(t).getCell(r);(i.virtual||i.colSpan>1||i.rowSpan>1)&&kE(n,t,r)})}function K2(n,t,e){if(e.isSimple())return!1;const{start:r,end:i}=e;if(r.blockId!==i.blockId||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{startCell:s,endCell:l}=Pm(e);return!(s.cell!==l.cell||s.colSpan===1&&s.rowSpan===1)}function RE(n){const{editor:t,block:e,startRow:r,startCol:i,endRow:o,endCol:s}=Pm(n),l=[];for(let c=r;c<=o;c++)for(let d=i;d<=s;d++)l.push({row:c,col:d});return FN(t,e,l),!0}const cu=D("merge-cells");function V2(n,t,e){if(e.isSimple())return!1;const{start:r,end:i}=e;if(r.blockId!==i.blockId||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{startCell:s,endCell:l}=Pm(e);return s.cell!==l.cell}function $2(n){const t=Pm(n),e=t.editor;e.undoManager.runInGroup(()=>{const r=t.endCell,i=r.row+r.rowSpan-1,o=r.col+r.colSpan-1,s=dt(t.block);RE(n);const l=e.getBlockById(s),c=fn(l),{startRow:d,startCol:h}=t,C=xt.default(e.getBlockData(l));p(cu,C.children,"no table children");const E=Kt.fromTable(c),A=[];for(let ct=d;ct<=i;ct++)for(let wt=h;wt<=o;wt++){const Bt=E.getCell({row:ct,col:wt});p(cu,!Bt.virtual,"cell is virtual"),A.push(Bt)}p(cu,A.length>0,"no selected cells");const v=A[0],R=A.slice(1),S=E.getCellByContainerId(v.containerId).container,M=[];R.forEach(ct=>{const wt=E.getCellByContainerId(ct.containerId).container,Bt=Et(wt);if(!Of(e,wt)){const Jt=J5(e,Bt);if(Of(e,S)){const ce=ke(S)[0];e.insertDocAt(S,0,Jt),e.deleteBlock(ce)}else e.insertDocAt(S,qi(S),Jt)}M.push(Bt)});const U=Et(S),V=o-h+1,nt=i-d+1;C[`${U}_colSpan`]=V,C[`${U}_rowSpan`]=nt,M.forEach(ct=>{p(cu,C.children,"no table children");const wt=C.children.indexOf(ct);p(cu,wt>0,"no deleted container"),C.children.splice(wt,1)});const Y=C,ft=e.getChildContainerData(U)[0];p(cu,ft,"no child block");const pt=Ie(e,ft.id,0);hl(Y),e.updateBlockData(l,Y,pt),e.deleteChildContainers(M)})}const wE=10,KN=["table/merge-cells","table/split-cell","table/insert-column","table/insert-row","table/delete-rows","table/delete-columns","table/delete"];class Fm{constructor(){m(this,"id","TableBlockCommandProvider")}getAvailableCommands(t,e,r){if(Ot(e)!=="table")return[];const i={blockId:dt(e),blockKind:Ci(t,e),blockType:Ot(e)},o=[];V2(t,e,r)&&o.push({id:"table/merge-cells",name:_.t("table.mergeCell"),icon:yT,groupIndex:wE,...i}),K2(t,e,r)&&o.push({id:"table/split-cell",name:_.t("table.splitCell"),icon:TT,groupIndex:wE,...i});const s=P2(t,e,r),l=F2(t,e,r);return s&&l&&o.push({id:"table/delete",name:_.t("table.deleteTable"),icon:kT,groupIndex:wE,...i}),o}executeCommand(t,e,r,i,o,s){return Ot(e)!=="table"||!new Set(KN).has(i.id)?!1:i.id==="table/merge-cells"?($2(r),!0):i.id==="table/split-cell"?(RE(r),!0):i.id==="table/delete-columns"?(BE(r),!0):i.id==="table/delete-rows"?(yE(r),!0):i.id==="table/delete"?(t.deleteBlock(e),!0):!1}}var H2=(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))(H2||{});const uu=6,bd=20,SE="table-cell-menu-btn";function VN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasColTitle:!0};n.updateBlockData(t,r)}function $N(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasColTitle:!1};n.updateBlockData(t,r)}function HN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasRowTitle:!0};n.updateBlockData(t,r)}function jN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasRowTitle:!1};n.updateBlockData(t,r)}function zN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),isStripeStyle:!0};n.updateBlockData(t,r)}function GN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),isStripeStyle:!1};n.updateBlockData(t,r)}function WN(n,t,e){if(!n.isBlockWritable(t))return;const i={...xt.default(n.getBlockData(t)),noBorder:!e};n.updateBlockData(t,i)}const os=D("table-cell-dom");function qN(n,t,e){let r=n.getBlockById(e);for(;r;){const i=r.closest("td");p(os,i,"no parent cell");const o=et(i);if(p(os,o,"no parent block"),o===t)return i;r=o}return p(os,!1,"filed to get cell by child block id"),null}function ml(n,t,e){if(n.getBlockById(e.blockId)===t&&!e.isSimple())return p(os,e.childContainerId,"block position must have childContainerId attribute"),e;const i=qN(n,t,e.blockId),o=Et(Ed(i));return Ue(t,o)}function LE(n,t){const e=n.selection.range,r=ml(n,t,e.start),i=ml(n,t,e.end);return wi(t,r,i)}function j2(n,t,e,r){p(os,dn(t),"invalid table block");const i=ao(n,t),o=ve(t),s=()=>{const c=i.querySelector(".table-border-bar-container.top");p(os,c,"no top border bar container"),c.querySelectorAll(".table-border-bar-cell.top").forEach(h=>{const C=parseInt(h.getAttribute("data-top-index")||"0",10);r.includes(C)?q(h,"danger"):ut(h,"danger")})},l=()=>{const c=o.querySelector(".table-border-bar-container.left");p(os,c,"no left border bar container"),c.querySelectorAll(".table-border-bar-cell.left").forEach(h=>{const C=parseInt(h.getAttribute("data-left-index")||"0",10);e.includes(C)?q(h,"danger"):ut(h,"danger")})};s(),l()}function gl(n,t,e=!0,r){try{const o=Kt.fromBlock(t).map(h=>h),{fromCol:s,toCol:l,fromRow:c,toRow:d}=LE(n,t);for(let h=0;h<o.length;h++){const C=o[h];for(let E=0;E<C.length;E++){const A=C[E],v=r?E>=s&&E+A.colSpan-1<=l:h>=c&&h+A.rowSpan-1<=d;e&&v?A.virtual||q(A.cell,"danger"):A.virtual||ut(A.cell,"danger")}}}catch(i){os.error("update cells danger status failed: ",i.message)}}function pl(n,t,e=!0,r){try{const i=new Set,o=new Set;if(!e){j2(n,t,Array.from(i),Array.from(o));return}const{fromCol:s,toCol:l,fromRow:c,toRow:d}=LE(n,t);if(r)for(let h=s;h<=l;h++)o.add(h);else for(let h=c;h<=d;h++)i.add(h);j2(n,t,Array.from(i),Array.from(o))}catch(i){os.error("update cell bars danger status failed: ",i.message)}}function z2(n,t,e){const{fromCol:r,toCol:i,fromRow:o,toRow:s}=LE(n,t),l=Kt.fromBlock(t);let c=null,d=null;return e?(c=l.getCell({col:r,row:0}),d=l.getCell({col:i,row:l.rowCount-1}),En(n,{anchor:Ue(t,c.containerId,{colIndex:r,rowIndex:0}),focus:Ue(t,d.containerId,{colIndex:i,rowIndex:l.rowCount-1})})):(c=l.getCell({col:0,row:o}),d=l.getCell({col:l.colCount-1,row:s}),En(n,{anchor:Ue(t,c.containerId,{colIndex:0,rowIndex:o}),focus:Ue(t,d.containerId,{colIndex:l.colCount-1,rowIndex:s})}))}const G2=["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 W2(n){return`style-bg-color-${n}`}function fu(n){return`${n}_background`}function XN(n,t,e){const r=fn(n),s=(e!=null?e:Kt.fromTable(r)).getCell(t).cell;for(let l=0;l<G2.length;l++){const c=G2[l];if(Mt(s,c))return c}}function q2(n,t,e){if(!n.isBlockWritable(t))return;const r=n.selection.range,o={...xt.default(n.getBlockData(t))},s=ml(n,t,r.start),l=ml(n,t,r.end);if(r.isSimple()){const c=s.childContainerId;e===-1?o[fu(c)]=void 0:o[fu(c)]=W2(e)}else{const c=Kt.fromBlock(t),d=wi(t,s,l),h=new Set;for(let C=d.fromRow;C<=d.toRow;C++)for(let E=d.fromCol;E<=d.toCol;E++){const A=c.getCell({row:C,col:E});!h.has(A.containerId)&&A.col>=d.fromCol&&A.row>=d.fromRow&&A.col+A.colSpan-1<=d.toCol&&A.row+A.rowSpan-1<=d.toRow&&(h.add(A.containerId),e===-1?o[fu(A.containerId)]=void 0:o[fu(A.containerId)]=W2(e))}}n.updateBlockData(t,o)}function YN(n,t,e){if(!n.isBlockWritable(t))return;const i={...xt.default(n.getBlockData(t)),chart:e};n.updateBlockData(t,i)}const X2=D("table-chart");function QN(n,t){const e=yN(n,t);if(e){const r=e.querySelector(".editor-table-chart");if(r){const i=r.chartObject;i&&i.destroy(),r.remove()}}}function Km(n){var t;return(t=n.textContent)!=null?t:""}async function JN(n,t){if(!n.contains(t)||!n.isBlockWritable(t))return;if(!!!n.getBlockData(t).chart){QN(n,t);return}const i=[],o=Kt.fromBlock(t),s=["line","bar","pie","radar"],l=o.getCell({row:0,col:0}).container;let c=Km(l).trim().toLowerCase();new Set(s).has(c)||(c=s[0]);const d=[];for(let S=1;S<o.colCount;S++)d.push(Km(o.getCell({row:0,col:S}).container));for(let S=1;S<o.rowCount;S++){const M=o.getCell({row:S,col:0}),U=M.container,V=Km(U),nt=[];for(let ce=1;ce<o.colCount;ce++){const Oe=Km(o.getCell({row:S,col:ce}).container),pe=Number.parseFloat(Oe)||0;nt.push(pe)}let Y;const X=XN(t,M,o);X?Y=window.getComputedStyle(n.rootElement).getPropertyValue(`--${X}`).trim():Y=window.getComputedStyle(n.rootElement).getPropertyValue("--background-color").trim();let[ft,pt,ct,wt]=Y?Lp.fromString(Y).toRgbaArray():[];if(!ft&&!pt&&!ct&&!wt){const ce=(S-1)%n.options.colors.length;Y=n.options.colors[ce],[ft,pt,ct,wt]=Lp.fromString(Y).toRgbaArray()}const Bt=Y,Jt=Lp.fromRgba([ft,pt,ct,wt/3]).toHexString();i.push({label:V,data:nt,borderColor:Bt,backgroundColor:Jt,borderWidth:2})}const h=ao(n,t);let C=null,E=h.querySelector(".editor-table-chart");E?C=E.chartObject:E=B("div",["editor-table-chart"],h);const A=E;p(X2,A,"no chart container");const v=n.getComponentOptions("table"),R=(v==null?void 0:v.chartCdn)||"https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js";try{await ra(R,"editor-chartjs");let S=!1;(C&&C.config.data.datasets.length>i.length||C&&C.config.data.datasets[0].data.length>i[0].data.length)&&(S=!0),C&&(c!==C.config.type||S)&&(C.destroy(),C=null,Array.from(E.querySelectorAll(".editor-chartjs-canvas")).forEach(V=>{V.remove()}));const M=Dp.default({},{type:c,data:{datasets:i,labels:d},options:{onClick:()=>{n.selection.selectBlock(t,0,0)}}});if(C)Dp.default(C.config,M),C.update();else{const V=B("canvas",["editor-chartjs-canvas"],A).getContext("2d");C=new window.Chart(V,M),E.chartObject=C}}catch(S){X2.error(`failed to resolve chart cdn: ${JSON.stringify(S)}`)}}async function Y2(n,t){await No.lock("updateTableChart");try{await JN(n,t)}finally{No.release("updateTableChart")}}const Q2=Pe.default(Y2,1e3);let J2=null;function IE(n,t,e){if(J2!==t&&(Q2.flush(),J2=t),e.updateNow){Y2(n,t);return}Q2(n,t)}function DE(n,t,e){e&&dn(e)&&IE(n,e,{updateNow:!1})}function ZN(n,t){dn(t)&&IE(n,t,{updateNow:!0})}const Zr={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"},Vm={SCROLL_BAR:"container-scrollbar",FIXED:"fixed"},Cl={SCROLL_CONTAINER:"scroll-container",TOOL:"container-scroll-tool",CONTAINER:"scroll-container-root",MAC:"mac",SCROLL_AREA:"scroll-area"};function vd(n,t){return n.containers.get(t)}function Z2(n){return n.closest(`.${Cl.SCROLL_CONTAINER}`)}function Si(n){return n.firstElementChild}function er(n){return n.closest(`.${Cl.CONTAINER}`)}function Bd(n){const t=er(n);let e=t.querySelector(`:scope >.${Cl.TOOL}`);return e||(e=B("div",[Cl.TOOL],t)),e}function tP(n){return er(n).firstElementChild}function eP(n,t){const e=vd(n,er(t));return e!=null&&e.barFloatWindowBottom?typeof e.barFloatWindowBottom=="function"?e.barFloatWindowBottom():e.barFloatWindowBottom:0}function ti(n,t){const e=Hr(n);return t/e}function yd(n){const t=window.getComputedStyle(n),e=Hr(n);return{paddingBottom:parseFloat(t.paddingBottom)*e,paddingTop:parseFloat(t.paddingTop)*e,paddingLeft:parseFloat(t.paddingLeft)*e,paddingRight:parseFloat(t.paddingRight)*e}}function du(n){const t=Hr(n);return{scrollLeft:n.scrollLeft*t,scrollWidth:n.scrollWidth*t,clientWidth:n.clientWidth*t,clientHeight:n.clientHeight*t}}function nP(n,t){const e=Hr(n);return n[t]*e}function _E(n,t){const e=er(t),r=vd(n,e),i=(r==null?void 0:r.safeRightSpace)||0,o=(r==null?void 0:r.safeLeftSpace)||0,l=(r==null?void 0:r.locatingContainer).getBoundingClientRect(),c=e.getBoundingClientRect(),d=c.width;let h=Math.floor(c.left-l.left-o);h<0&&(h=0);let C=l.right;C-=i;let E=C-c.right;return E<0&&(E=0),h=Math.round(h),E=Math.round(E),{originWidth:d,maxLeft:h,maxRight:E}}function rP(n,t){const e=_E(n,t),{maxLeft:r}=e;t.style.marginLeft=`${ti(t,0-r)}px`,t.style.paddingLeft=`${ti(t,r)}px`}function iP(n,t){const e=_E(n,t);t.style.marginRight=`${ti(t,0-e.maxRight)}px`}function oP(n){if(n!==document.documentElement&&n!==document.body)return n.getBoundingClientRect();const t=0,e=0,r=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return new DOMRect(t,e,r,i)}const tk=D("scroll-bar-handle"),sP=2;function hu(n){const t=Bd(n);let e=t.querySelector(`.${Vm.SCROLL_BAR}`);return e||(e=B("div",[Vm.SCROLL_BAR],t),me.isWindows&&me.isFirefox&&(e.style.minHeight="10px")),p(tk,e instanceof HTMLDivElement,"invalid child for container tools"),e.firstElementChild||B("div",[],e),e}function $m(n,t){const e=Z2(t),r=hu(e),{scrollWidth:i,clientWidth:o}=du(e),{paddingLeft:s,paddingRight:l}=yd(t),c=_E(n,e),{originWidth:d,maxRight:h}=c;iP(n,e),rP(n,e);const C=i-o;p(tk,r.firstElementChild instanceof HTMLDivElement,"invalid child for scroll bar"),r.style.width=`${ti(e,d+h-s-l)}px`,r.firstElementChild.style.width=`${ti(e,d+h+C-s-l)}px`}function lP(n,t){const e=Si(n),{paddingLeft:r}=yd(e);if(Mt(t,"fixed")){const o=er(n).getBoundingClientRect();t.style.left=`${ti(n,o.left+r)}px`}else t.style.left=`${ti(n,r)}px`}function mu(n,t){var U;const e=n.getParentScrollContainer(),r=oP(e),i=t.getBoundingClientRect(),o=hu(t),s=o.getBoundingClientRect(),l=vd(n,er(t)),c=eP(n,t),d=Si(t),{paddingTop:h,paddingBottom:C}=yd(d),{scrollWidth:E,clientWidth:A}=du(t),v=document.documentElement.clientHeight-c,R=r.top+du(e).clientHeight-v,S=v+Math.min(0,R);if(E>A&&i.top+h<S-s.height&&i.bottom>S-s.height+C&&!((U=l==null?void 0:l.isSetScale)!=null&&U.call(l))){l!=null&&l.allowScrollBarFixed&&q(o,Vm.FIXED);const V=R>0?c:0;o.style.bottom=`${Math.max(document.documentElement.clientHeight-r.bottom,0)+sP+V}px`}else ut(o,Vm.FIXED),o.style.bottom=`${ti(t,C-s.height)}px`;lP(t,o)}class aP{constructor(t,e){m(this,"intersectionObserver");m(this,"handleIntersection",t=>{t.forEach(e=>{this.containers.get(er(e.target))?(this.handleIntersectionEntry(e),this.callback(e)):this.intersectionObserver.unobserve(e.target)})});m(this,"handleIntersectionEntry",t=>{const e=t.target;mu(this.scrollCore,e);const r=Si(e);$m(this.scrollCore,r)});this.scrollCore=t,this.callback=e;const i={root:this.scrollCore.getParentScrollContainer(),rootMargin:"20px",threshold:0};this.intersectionObserver=new IntersectionObserver(this.handleIntersection,i)}get containers(){return this.scrollCore.containers}bind(t){this.unbind(t),this.intersectionObserver.observe(t)}unbind(t){this.intersectionObserver.unobserve(t)}destroy(){this.intersectionObserver.disconnect()}}const Ta=D("container-scroll-shadow");function ek(n,t,e){const r=n,i=t.getBoundingClientRect(),o=e.getBoundingClientRect(),{paddingTop:s,paddingBottom:l}=yd(e);r.style.top=`${ti(t,o.top-i.top+s)}px`,r.style.bottom=`${ti(t,i.bottom-o.bottom+l)}px`}function nk(n,t){const e=n;t<24?e.style.width=`${(t/3).toFixed(2)}px`:e.style.width=""}function cP(n){const t=Bd(n);p(Ta,t,"no container tools");let e=t.querySelector(`.${Zr.LEFT}`);if(!e){const l=Si(n),c=[Zr.COMMON,Zr.LEFT];e=B("div",c,t),p(Ta,e instanceof HTMLDivElement,"invalid child for container tools"),ek(e,n,l)}p(Ta,e instanceof HTMLElement,"invalid child for container tools");const i=er(n).getBoundingClientRect(),o=n.getBoundingClientRect();e.style.left=`${ti(n,o.left-i.left)}px`;const s=du(n).scrollLeft;p(Ta,e instanceof HTMLDivElement,"invalid child for container tools"),nk(e,s),q(e,Zr.ACTIVE)}function uP(n){const t=Bd(n);let e=t.querySelector(`.${Zr.RIGHT}`);if(!e){const h=Si(n),C=[Zr.COMMON,Zr.RIGHT];e=B("div",C,t),p(Ta,e instanceof HTMLDivElement,"no div, create shadow failed"),ek(e,n,h)}p(Ta,e instanceof HTMLElement,"");const i=er(n).getBoundingClientRect(),o=n.getBoundingClientRect();e.style.right=`${ti(n,i.right-o.right)}px`;const{scrollWidth:s,scrollLeft:l,clientWidth:c}=du(n),d=s-l-c;p(Ta,e instanceof HTMLDivElement,"no shadow element"),nk(e,d),q(e,Zr.ACTIVE)}function fP(n){const e=Bd(n).querySelector(`.${Zr.LEFT}`);e&&ut(e,Zr.ACTIVE)}function dP(n){const e=Bd(n).querySelector(`.${Zr.RIGHT}`);e&&ut(e,Zr.ACTIVE)}function Td(n){const{scrollLeft:t,scrollWidth:e,clientWidth:r}=du(n),i=Si(n),{paddingLeft:o,paddingRight:s}=yd(i),l=nP(i,"offsetLeft");e-o<=r-s||e-o<=t+r-s?dP(n):uP(n),i&&t>=l+o?cP(n):fP(n)}class hP{constructor(t,e){m(this,"resizeObserver");m(this,"handleResizeEntry",t=>{const e=t.target,r=Si(e);Td(e),$m(this.scrollCore,r),mu(this.scrollCore,e),this.callback(e)});m(this,"handleContentResize",t=>{t.forEach(e=>{this.containers.get(er(e.target))?this.handleResizeEntry(e):this.unbind(e.target)})});this.scrollCore=t,this.callback=e,this.resizeObserver=new Zl(this.handleContentResize)}get containers(){return this.scrollCore.containers}bind(t){this.unbind(t),this.resizeObserver.observe(t)}unbind(t){this.resizeObserver.unobserve(t)}destroy(){this.resizeObserver.disconnect()}}const rk=D("container-scroll-observer");class mP{constructor(t,e){m(this,"handleContentScroll",t=>{const e=t.target;p(rk,e instanceof Element,"invalid target for scroll event");const r=hu(e);r.removeEventListener("scroll",this.handleScroll);const i=!0;this.fixScrollXPos(e,e.scrollLeft,i),this.bind(r),Td(e),this.callback(e)});m(this,"handleScroll",t=>{const e=t.target;p(rk,e instanceof HTMLElement,"");const r=e.scrollLeft,i=!1,o=tP(e);this.unbindContentScroll(o),this.fixScrollXPos(o,r,i),this.bindContentScroll(o),Td(o),this.callback(o)});m(this,"handlePrevent",t=>{t.stopPropagation()});m(this,"bindContentScrollCore",t=>{this.unbindContentScroll(t),t.addEventListener("scroll",this.handleContentScroll)});m(this,"unbindContentScroll",t=>{t.removeEventListener("scroll",this.handleContentScroll)});m(this,"bindContentScroll",Pe.default(this.bindContentScrollCore,300));m(this,"bind",Pe.default(this.bindCore,200));this.scrollCore=t,this.callback=e}fixScrollXPos(t,e,r){const i=hu(t);r||(t.scrollLeft=e),r&&i.scrollLeft!==e&&(i.scrollLeft=e)}bindCore(t){this.unbind(t),t.addEventListener("scroll",this.handleScroll),t.addEventListener("mousedown",this.handlePrevent)}unbind(t){t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("mousedown",this.handlePrevent)}}class gP{constructor(t){m(this,"scrollContainers",new Set);m(this,"handleParentContainerScroll",()=>{this.scrollContainers.forEach(t=>{mu(this.scrollCore,t)})});m(this,"bindScrollContainer",t=>{const e=this.scrollContainers.size===0;this.scrollContainers.add(t),e&&this.eventTarget.addEventListener("scroll",this.handleParentContainerScroll)});m(this,"unbindScrollContainer",t=>{let e=!1;this.scrollContainers.has(t)&&(this.scrollContainers.delete(t),e=this.scrollContainers.size===0),e&&this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll)});this.scrollCore=t}get eventTarget(){const t=this.scrollCore.getParentScrollContainer();return t===document.documentElement?document:t}destroy(){this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll),this.scrollContainers.clear()}}const pP=D("scroll-wrap-resize-observer");class CP{constructor(t){m(this,"resizeObserver");m(this,"handleScrollWrapResize",t=>{t.forEach(e=>{this.containers.get(er(e.target))?this.handleScrollWrapResizeEntry(e):this.unbind(e.target)})});m(this,"handleScrollWrapResizeEntry",t=>{const e=t.target;p(pP,e instanceof HTMLElement,"invalid target for observer entry");const r=Z2(e);$m(this.scrollCore,e),Td(r),mu(this.scrollCore,r)});this.scrollCore=t,this.resizeObserver=new Zl(this.handleScrollWrapResize)}get containers(){return this.scrollCore.containers}bind(t){this.unbind(t),this.resizeObserver.observe(t)}unbind(t){this.resizeObserver.unobserve(t)}destroy(){this.resizeObserver.disconnect()}}class EP{constructor(t,e){m(this,"resizeObserver");m(this,"scrollContainersMap",new Map);m(this,"handleResizeEntry",t=>{t==null||t.forEach(e=>{const r=Si(e);Td(e),$m(this.scrollCore,r),mu(this.scrollCore,e),this.callback(e)})});m(this,"handleResize",t=>{t.forEach(e=>{const r=this.scrollContainersMap.get(e.target);r!=null&&r.length&&this.handleResizeEntry(r)})});this.scrollCore=t,this.callback=e,this.resizeObserver=new Zl(this.handleResize)}bind(t){var i,o;const e=er(t),r=(i=vd(this.scrollCore,e))==null?void 0:i.locatingContainer;this.scrollContainersMap.has(r)?(o=this.scrollContainersMap.get(r))==null||o.push(t):(this.scrollContainersMap.set(r,[t]),this.resizeObserver.observe(r))}unbind(t){var o,s;const e=er(t),r=(o=vd(this.scrollCore,e))==null?void 0:o.locatingContainer;if(!r)return;const i=this.scrollContainersMap.get(r);this.scrollContainersMap.set(r,(i==null?void 0:i.filter(l=>l!==t))||[]),(s=this.scrollContainersMap.get(r))!=null&&s.length||(this.resizeObserver.unobserve(r),this.scrollContainersMap.delete(r))}destroy(){this.scrollContainersMap.clear(),this.resizeObserver.disconnect()}}const Cat="";class AP extends je.TypedEmitter{constructor(e){super();m(this,"containerIntersectionObserver",null);m(this,"containerResizeObserver",null);m(this,"containerScrollObserver",null);m(this,"parentContainerScrollObserver",null);m(this,"scrollWrapResizeObserve",null);m(this,"locatingContainerResizeObserver",null);m(this,"isWindowEventBind",!1);m(this,"containers",new Map);m(this,"handleScrollContainerScroll",e=>{this.emit("scroll",this,e)});m(this,"handleResize",e=>{this.emit("resize",this,e)});m(this,"handleIntersection",e=>{const r=e.target,i=Si(r);e.isIntersecting?(this.load(),this.bindCore(r,i)):this.unbindCore(r,i)});m(this,"handleWindowEffect",()=>{var e;(e=this.getScrollContainerInViewable())==null||e.forEach(r=>{mu(this,r)})});this.parentContainer=e}load(){this.containerResizeObserver||(this.containerResizeObserver=new hP(this,this.handleResize)),this.containerScrollObserver||(this.containerScrollObserver=new mP(this,this.handleScrollContainerScroll)),this.parentContainerScrollObserver||(this.parentContainerScrollObserver=new gP(this)),this.scrollWrapResizeObserve||(this.scrollWrapResizeObserve=new CP(this)),this.locatingContainerResizeObserver||(this.locatingContainerResizeObserver=new EP(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 e;return(e=this.parentContainerScrollObserver)==null?void 0:e.scrollContainers}unbindCore(e,r){var o,s,l,c,d,h;const i=hu(e);(o=this.containerScrollObserver)==null||o.unbindContentScroll(e),(s=this.containerScrollObserver)==null||s.unbind(i),(l=this.scrollWrapResizeObserve)==null||l.unbind(r),(c=this.containerResizeObserver)==null||c.unbind(e),(d=this.parentContainerScrollObserver)==null||d.unbindScrollContainer(e),(h=this.locatingContainerResizeObserver)==null||h.unbind(e)}bindCore(e,r){var s,l,c,d,h,C;if(this.unbindCore(e,r),!e.closest("body"))return;const i=hu(e);(s=this.containerScrollObserver)==null||s.bindContentScrollCore(e),(l=this.containerScrollObserver)==null||l.bindCore(i),(c=this.scrollWrapResizeObserve)==null||c.bind(r),(d=this.containerResizeObserver)==null||d.bind(e);const o=this.containers.get(er(e));o!=null&&o.allowScrollBarFixed&&((h=this.parentContainerScrollObserver)==null||h.bindScrollContainer(e)),(C=this.locatingContainerResizeObserver)==null||C.bind(e)}bind(e,r){this.containers.set(e,r);const i=e.firstElementChild;this.containerIntersectionObserver||(this.containerIntersectionObserver=new aP(this,this.handleIntersection)),this.containerIntersectionObserver.bind(i)}unbind(e){var o;const r=e.firstElementChild,i=Si(r);this.unbindCore(r,i),this.containers.delete(e),(o=this.containerIntersectionObserver)==null||o.unbind(r),this.containers.size||this.destroy()}destroy(){var e,r,i,o,s;this.containers.forEach((l,c)=>{this.unbind(c)}),this.containers.clear(),(e=this.parentContainerScrollObserver)==null||e.destroy(),(r=this.containerIntersectionObserver)==null||r.destroy(),(i=this.containerResizeObserver)==null||i.destroy(),(o=this.scrollWrapResizeObserve)==null||o.destroy(),(s=this.locatingContainerResizeObserver)==null||s.destroy(),window.removeEventListener("resize",this.handleWindowEffect),window.removeEventListener("scroll",this.handleWindowEffect)}}const ik=D("scroll-container"),Hm=new Map;class xP extends je.TypedEmitter{constructor(){super(...arguments);m(this,"scrollListener");m(this,"options");m(this,"scrollContainerElement");m(this,"init",e=>{this.options=e;const r=B("div",[Cl.CONTAINER],e.parentElement);me.isMac&&q(r,Cl.MAC);const i=B("div",[Cl.SCROLL_CONTAINER],r),o=B("div",[Cl.SCROLL_AREA],i);o.style.paddingLeft=e.paddingLeft?`${e.paddingLeft}px`:"",o.style.paddingTop=e.paddingTop?`${e.paddingTop}px`:"",o.style.paddingBottom=e.paddingBottom?`${e.paddingBottom}px`:"",o.style.paddingRight=e.paddingRight?`${e.paddingRight}px`:"",o.appendChild(e.childElement);const s=e.parentContainer;this.scrollListener=Hm.get(s),this.scrollListener||(this.scrollListener=new AP(s),Hm.set(s,this.scrollListener)),this.scrollListener.unbind(r),this.scrollListener.bind(r,e),this.scrollListener.on("scroll",this.handleContainerScroll),this.scrollListener.on("resize",this.handleResize),this.scrollContainerElement=i});m(this,"handleContainerScroll",(e,r)=>{r===this.scrollContainerElement&&this.emit("scroll",this)});m(this,"handleResize",(e,r)=>{r===this.scrollContainerElement&&this.emit("scroll",this)})}get rootElement(){return this.scrollContainerElement}get contentElement(){return p(ik,this.scrollContainerElement,"scrollContainerElement cannot be undefined"),Si(this.scrollContainerElement)}get scrollOptions(){return p(ik,this.options,"options cannot be undefined"),{...this.options}}handleBaseListenerDestroy(e){e.destroy()}destroy(){var r;(r=this.scrollListener)==null||r.off("scroll",this.handleContainerScroll);const e=er(this.contentElement);e&&Hm.forEach((i,o)=>{i.unbind(e),i.containers.size===0&&(this.handleBaseListenerDestroy(i),Hm.delete(o))})}}function bP(){return new xP}const ME=D("column-width");function vP(n,t,e){const r=kN(n,t);r.style.width=`${e}px`,r.style.minWidth=`${e}px`}function BP(n){const e=Array.from(n.querySelector("colgroup").children).map(c=>c.getBoundingClientRect().width);if(e[0]!==0)return e;const r=Kt.fromTable(n),i=Array(r.colCount).fill(-1),o=n.getBoundingClientRect().left;r.toRealCells(r.cells).forEach(c=>{const d=c.col+c.colSpan-1;i[d]===-1&&(i[d]=c.cell.getBoundingClientRect().right-o)}),ME.debug(`cellRightOffsets1: ${i.join()}`);for(let c=0;c<i.length;c++){const d=i[c];if(d===-1||c===0)continue;let h=c-1;for(;i[h]===-1&&(h--,h!==-1););const C=h===-1?0:i[h],A=(d-C)/(c-h);for(let v=h+1;v<c;v++)i[v]=C+A*(v-h)}ME.debug(`cellRightOffsets2: ${i.join()}`);const s=[];let l=0;for(let c=0;c<i.length;c++){const d=i[c];s.push(d-l),l=d}return ME.debug(`widths: ${s.join()}`),s}function kd(n){return Array.from(n.querySelector("colgroup").children).map(r=>r.getBoundingClientRect().width||Number.parseInt(r.style.width,10))}const UE=200,yP=40,TP=D("table-resize-gripper"),ok=7,OE=(ok-1)/2,kP=3;function RP(n,t,e){const{rows:r}=n;for(let i=0;i<r.length;i++){const o=r[i],s=Array.from(o.cells);for(let l=0;l<s.length;l++){const c=s[l],d=c.getBoundingClientRect(),h=Math.round(d.right);if(Math.abs(t-h)<=OE&&d.top<=e&&e<=d.bottom)return c}}return null}function wP(n){return!!n.rootContainer.querySelector(".table-resize-gripper")}function NE(n,t){return ao(n,t).querySelector(".table-resize-gripper")}function sk(n,t){const e=NE(n,t);p(TP,!e,"resize gripper has already exists");const r=ao(n,t),i=B("div",["table-resize-gripper","table-indicator"],r);return B("div",["table-resize-gripper-indicator"],i),i}function lk(n,t,e){let r=NE(n,t);r||(r=sk(n,t));const o=fn(t).getBoundingClientRect(),s=e.getBoundingClientRect(),l=0,c=o.height,d=n.getCustom(lo(t)).contentElement.getBoundingClientRect(),h=s.right-d.left;r.style.left=`${h-OE-uu-bd}px`,r.style.top=`${l}px`,r.style.height=`${c}px`,r.style.width=`${ok}px`}function PE(n){n.rootContainer.querySelectorAll(".table-resize-gripper").forEach(t=>{t.remove()})}function SP(n,t,e){const i={...n.getBlockData(t),colsWidth:e};n.updateBlockData(t,i,void 0,{noScroll:!0})}function LP(n,t,e,r){const i=t,o=Kt.fromTable(e),s=o.getCellByCellElement(i),l=s.col+s.colSpan-1,c=kd(e);let d=r;const h=(E,A)=>{const v=A+1,R=E.col+E.colSpan;return c.slice(v,R).reduce((M,U)=>M+U,0)},C=new Set;for(let E=0;E<o.rowCount;E++){const A=o.getCell({row:E,col:l});if(C.has(A.cell))continue;C.add(A.cell);const v=A.cell,R=v.getBoundingClientRect();let S=r-R.left+OE-kP;const M=Ed(v),U=x1(n,M)||yP*A.colSpan,V=h(A,l),nt=U-V;S<nt&&(S=nt);const Y=R.left+S;d=Math.max(d,Y)}return d}const IP=D("table-resize-drag-drop");class DP{constructor(t,e,r,i){m(this,"cursor","col-resize");this.editor=t,this.elem=e,this.data=r,this.onEnd=i}onDragStart(t,e,r){}onDragging(t,e,r,i,o){const{table:s,block:l,draggingRefCell:c}=t.data,h=LP(this.editor,c,s,e.x-t.dragOffsetX)-s.getBoundingClientRect().left;p(IP,c,"no dragging cell");const E=Kt.fromTable(s).getCellByCellElement(c),A=E.col+E.colSpan-1,v=kd(s),R=v.slice(0,A).reduce((M,U)=>M+U,0),S=h-R;if(vP(s,A,S),S){const M=parseFloat(s.style.minWidth);s.style.minWidth=`${M+(S-v[A])}px`}lk(this.editor,l,c),this.editor.selection.caret.update()}onDragEnd(t,e,r,i,o){const s=kd(t.data.table);SP(this.editor,t.data.block,s),PE(this.editor),this.onEnd&&(this.onEnd(e),this.onEnd=null)}}function _P(n,t){const e=Fe(t.x,t.y);if(!e)return null;const r=et(e);return!r||!n.contains(r)||!dn(r)?null:r}D("table-resize");class MP{constructor(t){m(this,"draggingRefCell",null);m(this,"handleMouseMove",(t,e)=>{if(t.readonly||window.isDragging||t.selectionHandler.isSelecting()&&!this.draggingRefCell||this.draggingRefCell)return;const r=e.target;if(!(r instanceof Element))return;const i=et(r);if(!i||Ot(i)!=="table"||r.closest(".table-indicator"))return;const s=e,l=_P(t,s);if(!l||!O2(l)||!t.isBlockWritable(l)){PE(t);return}this.updateGripper(l,s.x,s.y)});this.editor=t,t.domEvents.addEventListener(document,"mousemove",this.handleMouseMove)}destroy(){this.editor.domEvents.removeEventListener(document,"mousemove",this.handleMouseMove)}updateGripper(t,e,r){const i=fn(t),o=RP(i,e,r);if(o){if(!NE(this.editor,t)){if(wP(this.editor))return;const l=sk(this.editor,t),c={block:t,table:i,draggingRefCell:o};$p(new DP(this.editor,l,c,d=>{this.updateGripper(t,d.x,d.y)}))}lk(this.editor,t,o)}else PE(this.editor)}}function ak(n){n.addCustom("table-mouse-event-handler",t=>new MP(t))}const ck=D("table-insert-column");function uk(n,t,e){n.undoManager.runInGroup(()=>{var E;const r=fn(t),i=Kt.fromTable(r),o=i.colCount;p(ck,e>=0&&e<=o,`insert index ${e} is out of range [0, ${o}]`);const s=i.map(A=>A.containerId),l=new Set;n.doc.beginBatchUpdate();for(let A=0;A<s.length;A++){const v=s[A],R=v[e-1],S=v[e];if(e===0||e===v.length||R!==S){const M=Yo(n.doc);v.splice(e,0,M)}else v.splice(e,0,R),l.add(R)}n.doc.endBatchUpdate();const c=xt.default(n.getBlockData(t));l.forEach(A=>{const v=`${A}_colSpan`,R=c[v];p(ck,typeof R=="number"&&R>1,`no colSpan for containerId ${A}, ${R}`),c[v]=R+1});const d=((E=c.colsWidth)==null?void 0:E.concat())||new Array(c.cols).fill(0);d.splice(e,0,UE);const h=Kt.virtualCellContainersGridToChildren(s),C={...c,cols:c.cols+1,children:h,colsWidth:d};hl(C),n.updateBlockData(t,C)})}const jm=D("table-insert-row");function FE(n,t,e){n.undoManager.runInGroup(()=>{const r=fn(t),i=Kt.fromTable(r),o=i.rowCount;p(jm,e>=0&&e<=o,`insert index ${e} is out of range [0, ${o}]`);const s=i.map(E=>E.containerId),l=new Set;n.doc.beginBatchUpdate();const c=[];for(let E=0;E<i.colCount;E++){const A=e>0&&s[e-1][E],v=e<i.rowCount&&s[e][E];if(p(jm,A||v,"no top and bottom cell"),e===0||e===i.rowCount||A!==v){const R=Yo(n.doc);c.push(R)}else p(jm,A,"no top cell"),c.push(A),l.add(A)}n.doc.endBatchUpdate(),s.splice(e,0,c);const d=xt.default(n.getBlockData(t));l.forEach(E=>{const A=`${E}_rowSpan`,v=d[A];p(jm,typeof v=="number"&&v>1,`no rowSpan for containerId ${E}, ${v}`),d[A]=v+1});const h=Kt.virtualCellContainersGridToChildren(s),C={...d,rows:d.rows+1,children:h};hl(C),n.updateBlockData(t,C)})}const KE=D("paste-table-in-table-block");function UP(n,t,e,r,i){let o=Kt.fromBlock(e);const s=t.blocks.root[0];p(KE,s,"no table data"),p(KE,s.type==="table",`table data type is not table, but ${s.type}`);const l=s,c=o.getCellByCellElement(r),d=l.cols,h=l.rows,C=c.col,E=c.row,A=C+d,v=E+h,R=[];for(let S=C;S<A&&S<o.colCount;S++)for(let M=E;M<v&&M<o.rowCount;M++){const U=o.getCell({col:S,row:M});U.virtual?U.virtual&&R.push({col:S,row:M}):(U.colSpan>1||U.rowSpan>1)&&R.push({col:S,row:M})}n.undoManager.runInGroup(()=>{if(n.doc.beginBatchUpdate(),R.forEach(pt=>{const ct=Kt.fromBlock(e).getCell(pt);(ct.colSpan>1||ct.rowSpan>1)&&kE(n,e,pt)}),A>o.colCount)for(let pt=o.colCount;pt<A;pt++)uk(n,e,pt);if(v>o.rowCount)for(let pt=o.rowCount;pt<v;pt++)FE(n,e,pt);o=Kt.fromBlock(e);const S=new Um(l);let M;for(let pt=0;pt<S.colCount;pt++)for(let ct=0;ct<S.rowCount;ct++){const wt=S.getCell({col:pt,row:ct});if(!wt.virtual){const Bt=fC(n.editorBlocks,t,wt.containerId,i),Jt=C+pt,ce=E+ct,Oe={col:Jt,row:ce},pe=o.getCellContainer(Oe);o5(n,pe,Bt,i),M=pe}}const U={},V=[];for(let pt=0;pt<S.colCount;pt++)for(let ct=0;ct<S.rowCount;ct++){const wt=S.getCell({col:pt,row:ct}),Bt=C+pt,Jt=E+ct,ce={col:Bt,row:Jt},pe=o.getCell(ce).containerId;wt.virtual?V.push(pe):(wt.colSpan!==1&&(U[`${pe}_colSpan`]=wt.colSpan),wt.rowSpan!==1&&(U[`${pe}_rowSpan`]=wt.rowSpan),wt.background&&(U[`${pe}_background`]=wt.background))}const nt=n.getBlockData(e);V.length>0&&V.forEach(pt=>{nt.children=nt.children.filter(ct=>ct!==pt)});const Y={...nt,...U};hl(Y),p(KE,M,"no last container");const X=We(M);n.selection.selectBlock(X,At(n,X));const ft=Y;n.updateBlockData(e,ft),n.doc.endBatchUpdate()})}const VE=D("paste-in-table-block");class OP{constructor(t){m(this,"pasteData");this.editor=t,setTimeout(()=>{t.input.addHandler(this)})}destroy(){this.pasteData=void 0}async handleBeforePaste(t,e,r,i){return this.pasteData={doc:r,files:i,event:e},!1}async handleBeforePasteDoc(t,e){var E,A,v,R;if(!t.selection.range.isSimple())return this.pasteData=void 0,!1;if(t.selection.range.start.offset!==0)return this.pasteData=void 0,!1;const i=t.selection.startBlock,o=at(i);if(ie(o))return this.pasteData=void 0,!1;if(!Of(t,o))return this.pasteData=void 0,!1;const s=et(o);if(p(VE,s,"no parent block"),!dn(s))return this.pasteData=void 0,!1;if(e.blocks.root.length!==1)return this.pasteData=void 0,!1;if(e.blocks.root[0].type!=="table")return this.pasteData=void 0,!1;VE.debug("paste child table in table");const d=Kt.fromBlock(s).getCellByContainerId(Et(o)).cell;SC(t,e);const h={blockIdMap:new Map,containerIdMap:new Map,boxIdMap:new Map};UP(t,e,s,d,h),p(VE,this.pasteData,"invalid paste data");const C=[];t.input.forEach(S=>{C.push(S)});for(let S=0;S<C.length&&!await((A=(E=C[S]).handleAfterPasteDoc)==null?void 0:A.call(E,t,e,h));S++);for(let S=0;S<C.length&&!await((R=(v=C[S]).handleAfterPaste)==null?void 0:R.call(v,t,this.pasteData.event,this.pasteData.doc));S++);return this.pasteData=void 0,!0}}function fk(n){n.addCustom("table-block-paste-event",t=>new OP(t))}const $E=D("table-select-columns");function NP(n,t,e,r,i){p($E,dn(t),"is not a table block");const o=Kt.fromBlock(t);p($E,e>=0&&e<o.colCount,"invalid from"),p($E,r>0&&e+r<=o.colCount,"invalid count");const s=o.getCell({row:0,col:e}),l=o.getCell({row:o.rowCount-1,col:e+r-1}),c=Ue(t,s.containerId,{colIndex:e,rowIndex:0}),d=Ue(t,l.containerId,{colIndex:e+r-1,rowIndex:o.rowCount-1});i!=null&&i.reverse?n.selection.setSelection(d,c):n.selection.setSelection(c,d)}const HE=D("table-select-columns");function PP(n,t,e,r,i){p(HE,dn(t),"is not a table block");const o=Kt.fromBlock(t);p(HE,e>=0&&e<o.rowCount,"invalid from"),p(HE,r>0&&e+r<=o.rowCount,"invalid count");const s=o.getCell({row:e,col:0}),l=o.getCell({row:e+r-1,col:o.colCount-1}),c=Ue(t,s.containerId,{rowIndex:e,colIndex:0}),d=Ue(t,l.containerId,{rowIndex:e+r-1,colIndex:o.colCount-1});i!=null&&i.reverse?n.selection.setSelection(d,c):n.selection.setSelection(c,d)}const Eat="",dk=D("get-toolbar-reference-client");function hk(n,t){const e=n.selection.range;if(!e.isSimple()){p(dk,e.start.blockId===e.end.blockId,"invalid selection range");const s=n.getBlockById(e.start.blockId);p(dk,Pt(n,s),"not a complex block");const l=ae(n,s);if(l.getTextToolbarReferenceClient){const c=l.getTextToolbarReferenceClient(n,s);if(c)return c}}const r=e.isReverse()?t.start:t.end,i=En(n,{anchor:r,focus:r}),o=Vo(n,t.block,i);if(o.length!==0)return o[0]}function FP(n){var t,e;if(n.children){let r=!1;const i=[];for(const o of n.children){if((t=o.states)!=null&&t.includes("checked")){r=!0;break}(e=n.defaultCheckedChildren)!=null&&e.includes(o.id)&&i.push(o)}if(!r&&(i==null?void 0:i.length))for(const o of i)Array.isArray(o.states)?o.states.push("checked"):o.states=["checked"]}}function zm(n){const t=(i,o)=>{const s=i.findIndex(c=>c.id===o.id);if(s===-1){i.push(o);return}const l=i[s];if(l.value!==o.value&&delete l.value,!!l.states){if(!o.states){l.states=[];return}l.states=Mp.default(l.states,o.states)}},e=[],r=new Map;return n.forEach(i=>{var o,s;(o=i.children)!=null&&o.length&&(r.has(i.id)?(s=r.get(i.id))==null||s.push(...i.children):r.set(i.id,[...i.children])),t(e,i)}),r.forEach((i,o)=>{const s=e.find(l=>l.id===o);s&&(s.children=zm(i),FP(s))}),e}function Gm(n){return n.findCustom("toolbar-handler")}const Aat="";class KP{constructor(){m(this,"linkPopup",null);m(this,"form",{});m(this,"onFinished",null);m(this,"onClose",null);m(this,"onBeforeFormatUrl",null);m(this,"handleOk",async()=>{var t;try{await this.checkValue();const{linkText:e,linkUrl:r}=this.form,i=r.getInputValue();let o="";this.onBeforeFormatUrl&&this.onBeforeFormatUrl(i)!==!1?o=this.onBeforeFormatUrl(i):o=this.formatUrl(i),(t=this.onFinished)==null||t.call(this,e.getInputValue()||o,o),this._destroy()}catch{}});m(this,"handleClose",()=>{var t;(t=this.onClose)==null||t.call(this),this._destroy()});m(this,"onShow",()=>{setTimeout(()=>{var t;(t=this.form.linkText)==null||t.getField().focus()},400)});m(this,"onChange",()=>{var e;const t=(e=this.linkPopup)==null?void 0:e.content.querySelector('[data-button-id="submit-button"]');t.disabled=!1});m(this,"handleTextKeyboard",(t,e)=>{var r;if(!e){if(t.key==="Enter"){(r=this.form.linkUrl)==null||r.getField().focus(),t.stopPropagation();return}t.key==="Escape"&&this.handleClose()}});m(this,"handleUrlKeyboard",(t,e)=>{if(!e){if(t.key==="Enter"){this.handleOk(),t.preventDefault();return}t.key==="Escape"&&this.handleClose()}})}async checkValue(){const{linkUrl:t}=this.form;if(!t.getInputValue())throw t.setFieldError(_.t("link.urlPlaceholder")),new Error(_.t("link.urlPlaceholder"))}formatUrl(t){if(!t)return"";try{new URL(t)}catch{return`${window.location.protocol}//${t}`}return t}editLink(t){var C,E;const{target:e,linkText:r,linkUrl:i,onFinished:o,onClose:s,onBeforeFormatUrl:l,placement:c="bottom-start"}=t;this.linkPopup=new su(this.createPopupContent(r,i)),this.linkPopup.addListener("show",this.onShow),this.linkPopup.manualShow(e,{theme:"light",placement:c}),this.onFinished=o,s&&(this.onClose=s),l&&(this.onBeforeFormatUrl=l);const d=(C=this.linkPopup)==null?void 0:C.content.querySelector('[data-button-id="submit-button"]'),h=(E=this.linkPopup)==null?void 0:E.content.querySelector('[data-button-id="cancel-button"]');d==null||d.addEventListener("click",this.handleOk),h==null||h.addEventListener("click",this.handleClose)}createPopupContent(t,e){const r=B("div",["link-popup-content"],null);this.form.linkText=Mm(r,{label:_.t("link.textLabel"),required:!1,placeholder:_.t("link.textPlaceholder"),defaultValue:t,onChange:this.onChange,onKeyDown:this.handleTextKeyboard}),this.form.linkUrl=Mm(r,{className:"link-popup-gap",label:_.t("link.urlLabel"),required:!0,placeholder:_.t("link.urlPlaceholder"),defaultValue:e,onChange:this.onChange,onKeyDown:this.handleUrlKeyboard});const i=B("div",["link-popup-footer"],r),o=Jr("cancel-button",_.t("link.cancelText"));i.appendChild(o);const s=Jr("submit-button",_.t("link.submitText"),void 0,["disabled","primary"]);return i.appendChild(s),r}_destroy(){var r,i,o,s;const t=(r=this.linkPopup)==null?void 0:r.content.querySelector('[data-button-id="submit-button"]'),e=(i=this.linkPopup)==null?void 0:i.content.querySelector('[data-button-id="cancel-button"]');t==null||t.removeEventListener("click",this.handleOk),e==null||e.removeEventListener("click",this.handleClose),this.onFinished=null,this.onClose=null,this.form={},(o=this.linkPopup)==null||o.removeAllListeners(),(s=this.linkPopup)==null||s.destroy()}destroy(){this._destroy()}}function Rd(n,t){const e=n.addCustom("link-editor",()=>new KP),r=n.getComponentOptions("link"),i={...t,...r};e.editLink(i)}const VP=D("link-popup");function $P(n){return Mt(n,"link")}function wd(n){var t,e;return(e=(t=n.getAttribute("link"))!=null?t:n.textContent)!=null?e:""}function HP(n,t,e){var i,o,s,l;if(n.isBlockWritable(t)&&e&&yr(e)){const c=e,d=(o=(i=n.editorBoxes.getBoxClass(If(c))).getBoxProperties)==null?void 0:o.call(i,n,c);if(d!=null&&d.boxCommands){const h=(l=(s=d.boxCommands["hovering-toolbar"])==null?void 0:s.commands)!=null?l:[];return{element:e,commands:h}}return{element:null,commands:[]}}if(n.isWritable()&&e&&st(n,t)&&$P(e)){const c=B("a",["link-href-button"],null,wd(e));c.href=wd(e),c.target="_blank",c.rel="noopener noreferrer";const d=[{id:"link-text",name:wd(e),disableTooltip:!0,element:c},{id:"edit-link",name:_.t("link.edit"),icon:Im},{id:"remove-link",name:_.t("link.remove"),icon:UT}];return{element:e,commands:d}}return Jv(n,t,"hovering-toolbar")}function mk(n,t,e){var l;const r=ga(t,e),i=n.getBlockText(t),o={start:0,end:0};let s=(l=e.textContent)!=null?l:"";for(let c=0;c<i.length;c++){const d=i[c];if(o.end+d.insert.length>=r.end){o.end+=d.insert.length,s=d.insert;break}o.start<r.start&&(o.start+=d.insert.length,o.end=o.start)}return[o,s]}function jP(n,t,e){const[r,i]=mk(n,t,e);n.selection.selectBlock(t,r.start,r.end);const o=wd(e),s=(h,C)=>{try{const E=n.getBlockText(t),A=z1(E,r.start,r.end-r.start),v=qo(A,r.start,h,{link:C});n.setBlockText(t,v),n.selection.selectBlock(t,r.start+h.length),n.focus()}catch(E){VP.error(E)}},l=()=>{n.selection.selectBlock(t,r.end),n.focus()},c=Vo(n,t,n.selection.range)[0];if(!c)return;const d=jo(n,t,"link-button-anchor",c);Rd(n,{target:d,linkText:i,linkUrl:o,onFinished:s,onClose:l})}function zP(n,t,e){const[r]=mk(n,t,e),i=n.getBlockText(t),o=wd(e),s=$c(r.start,r.end-r.start,i,"link",o);n.setBlockText(t,s),n.selection.selectBlock(t,r.end)}function GP(n,t,e,r){var s,l,c;if(e){if(n.isBlockWritable(t)&&yr(e)){const h=e,C=(l=(s=n.editorBoxes.getBoxClass(If(h))).getBoxProperties)==null?void 0:l.call(s,n,h);if(C!=null&&C.boxCommands){C.boxCommands["hovering-toolbar"].executeCommand(n,t,h,r);return}return}const d=Gm(n);d==null||d.disableTextToolbar(),d==null||d.hide(),setTimeout(()=>{d==null||d.enableTextToolbar()},400),r.id==="edit-link"?jP(n,t,e):r.id==="remove-link"&&zP(n,t,e);return}const i=Qv(n,t);if(!i)return;const o=(c=i.blockCommands)==null?void 0:c["hovering-toolbar"];!o||o.executeCommand(n,t,r)}function Wm(){let n=8;for(;n>0&&!document.querySelector(`div[data-style-heading='${n}']`);)n--;return n}function ei(n){const e=n.selection.range;if(e.isCollapsed()||e.start.blockId!==e.end.blockId||!e.start.isSimple()||!e.end.isSimple()||e.end.offset-e.start.offset!==1)return!1;const r=n.getBlockById(e.start.blockId);return!(!st(n,r)||$f(n,r,e.start.offset).charType!=="box")}const WP=[bm,vm,Bm,ym,Tm,km,Rm,wm];class qP{constructor(t){m(this,"id","BlockTurnIntoCommandProvider");this.editor=t}getHeadingIndex(){let t=Wm();return t<=4?t=5:t<8&&(t+=1),t}getAvailableCommands(t,e,r){if(!st(t,e))return[];if(ei(t))return[];const i=dt(e),o=Ot(e),s=Ci(t,e),c=t.getBlockData(e).heading,d=[];for(let C=0;C<this.getHeadingIndex();C++)d.push({id:`heading-${C+1}`,name:_.t("commands.heading",{name:`${C+1}`}),icon:WP[C],states:c===C+1?["checked"]:[],value:`${C+1}`});const h=C=>{var A;const E=B("span",["toolbar-item-name-container"],null);for(const v of C.children)if((A=v.states)!=null&&A.includes("checked"))return E.innerHTML=v.icon||iu,E;return E.innerHTML=iu,E};return[{id:"turn-into",name:_.t("commands.headingGroup"),blockId:i,blockType:o,blockKind:s,element:h,groupIndex:200,dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["text"],children:[{id:"text",name:_.t("commands.text"),icon:iu,states:c?[]:["checked"]},...d],childrenType:"menu"}]}applyHeadingStyle(t,e,r){t.updateBlockData(e,{heading:r})}executeCommand(t,e,r,i){if(ei(t))return!1;if(st(t,e)&&(i.id.startsWith("heading-")||i.id==="text")){const o=i.value?Number(i.value):null;return this.applyHeadingStyle(t,e,o),!0}return!1}}const XP=8,qe=D("list-block"),qm=D("list-block");function Ht(n){return Ot(n)==="list"}function nn(n){p(qm,Ht(n),"not a list block")}function wr(n){nn(n);const t=n.getAttribute("data-list-type");return p(qm,t,"no list type"),t}function Xm(n){return Ht(n)&&wr(n)==="text-only"}function Sr(n){var t,e;return nn(n),(e=Number.parseInt((t=n.getAttribute("data-list-start"))!=null?t:"1",10))!=null?e:1}function Un(n){var t,e;return nn(n),(e=Number.parseInt((t=n.getAttribute("data-list-level"))!=null?t:"1",10))!=null?e:1}function gu(n){nn(n);const t=n.getAttribute("data-list-group-id");return p(qm,t,"no group id"),t}function co(n){var o,s,l,c,d;nn(n);const t=(o=n.getAttribute("data-list-type"))!=null?o:"ordered",e=(l=Number.parseInt((s=n.getAttribute("data-list-start"))!=null?s:"1",10))!=null?l:1,r=(d=Number.parseInt((c=n.getAttribute("data-list-level"))!=null?c:"1",10))!=null?d:1,i=n.getAttribute("data-list-group-id");return p(qm,i,"no group id"),{type:t,start:e,level:r,groupId:i}}function Ym(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 YP(n){const t={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 e="",r=n;return Object.entries(t).forEach(([i,o])=>{for(;r>=o;)e+=i,r-=o}),e.toLowerCase()}const QP="abcdefghijklmnopqrstuvwxyz";function gk(n){if(n<=0)return`${n}`;const t=(n-1)%26,e=Math.floor((n-1)/26),r=QP[t];return e?gk(e)+r:r}function JP(n){return`${n}`}const pk=[JP,gk,YP];function ZP(n,t){const e=pk[(n-1)%pk.length];return e(t)}function tF(n){return["\u2022","\u25E6","\u25AA"][(n-1)%3]}function El(n,t){nn(n);const{level:e,groupId:r,type:i}=co(n);let o=Ke(n);for(;o;){if(!Ht(o)){o=Ke(o);continue}const{level:s,groupId:l,type:c}=co(o);if(s<e)return null;if(e===s&&((t==null?void 0:t.ignoreGroupId)||r===l)&&(c==="text-only"||i==="text-only"||i===c))return o;o=Ke(o)}return null}function Ck(n){return El(n,{ignoreGroupId:!0})}function ka(n){nn(n);const{level:t,groupId:e,type:r}=co(n);let i=oe(n);for(;i;){if(Ht(i)){const{level:o,groupId:s,type:l}=co(i);if(t===o&&e===s&&(l==="text-only"||r==="text-only"||r===l))return i;if(o<t)return null}i=oe(i)}return null}function Ek(n){nn(n);const t=[];let e=El(n);for(;e;)t.unshift(e),e=El(e);return t}function pu(n){nn(n);const t=[];let e=ka(n);for(;e;)t.push(e),e=ka(e);return t}function Sd(n){nn(n);let t=El(n);for(;t;){const e=El(t);if(!e)return t;t=e}return n}function eF(n){nn(n);let t=ka(n);for(;t;){const e=ka(t);if(!e)return t;t=e}return null}function Ak(n,t){const e=Ek(n),r=pu(n);return t.withSelf?[...e,n,...r]:[...e,...r]}function Qm(n){nn(n);let t=n;const e=Ek(n);e.length>0&&(t=e[0]);const r=Ke(t);return!r||!Ht(r)?null:Un(r)<Un(t)?r:null}function nF(n,t){nn(n);let e=n;for(;e;){const r=Un(e);if(r===t)return e;if(r>t)e=Qm(e);else if(r<t)return null}return null}function rF(n){let t=Sd(n);for(;;){const e=Qm(t);if(!e)return t;t=Sd(e)}}class iF{constructor(){m(this,"nodeMap",new Map);m(this,"rootNodes",[])}addNode(t,e){const r={block:e,children:[]};if(this.nodeMap.set(e,r),t){const i=this.nodeMap.get(t);p(qe,i,"no parent node"),i.children.push(r)}else this.rootNodes.push(r)}}function xk(n,t){const e=rF(t),r=new iF;r.addNode(null,e);let i=oe(e);for(;i&&Ht(i);){if(Xm(i)){r.addNode(null,i),i=oe(i);continue}if(Un(i)===0&&wr(i)!==wr(e))break;const s=Qm(i);r.addNode(s,i),i=oe(i)}return r.rootNodes}function oF(n){const t=document.fullscreenEnabled||document.mozFullScreenEnabled||document.documentElement.webkitRequestFullScreen,e=r=>{if(r.requestFullscreen)return r.requestFullscreen();if(r.mozRequestFullScreen)return r.mozRequestFullScreen();if(r.webkitRequestFullScreen){try{document.fullscreenElement=n}catch{}return r.webkitRequestFullScreen()}return Promise.resolve(0)};return t?e(n):Promise.resolve(0)}function bk(){const e=(document.exitFullscreen||document.webkitExitFullscreen).bind(document)();try{document.fullscreenElement=null}catch{}return e}function jE(n){return Mt(n,"editor-in-mindmap-first")}function zE(n){if(p(qe,Ht(n),"not a list block"),Mt(n,"editor-in-mindmap-first")||!Zs(n))return!0;const t=n.classList,e="editor-mindmap-root-";return!!Array.from(t).find(i=>{if(i.startsWith(e))return i})}function sF(n,t,e){const r=at(n);if(t){const s=at(t);p(qe,r===s,"invalid block container")}const i=Rt(n);if(t){const s=Rt(t);p(qe,i<=s,"invalid block index")}if(q(n,...e),!t||t===n)return;let o=oe(n);for(;o!==t;)p(qe,o,"no next button"),q(o,...e),o=oe(o);o&&q(o,...e)}function lF(n){const t=`editor-mindmap-root-${n.id}`,r=at(n).querySelectorAll(`.${t}`);return r[r.length-1]}async function aF(n,t,e){const r=ve(t),i=r.querySelector('[data-button-id="mindmap-fullscreen"]');p(qe,i,"no full screen button");const o=()=>{setTimeout(()=>{e.toMindmap(n,t,{},{reset:!0,mindmapTools:e})},300)},s=()=>{ut(r,"fullscreen"),i.innerHTML=mE,i.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,_.t("mindmap.fullScreen")),zE(t)&&setTimeout(()=>{o()},300)};if(document.fullscreenElement===r){try{await bk()}catch(l){qe.error(l)}s()}else{try{q(r,"fullscreen"),await oF(r),o()}catch(l){qe.error(l)}i.innerHTML=C2,i.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,_.t("mindmap.exitFullscreen"))}r.onfullscreenchange=()=>{document.fullscreenElement||s()}}function GE(n,t,e,r,i){if(t.querySelector(`[data-button-id="${e}"]`))return null;const s=Jr(e,r,i,[]);return s.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,r),q(s,"mindmap-button"),t.appendChild(s),s}function WE(n,t){return n.querySelector(`[data-button-id="${t}"]`)}function cF(n){return WE(n,"mindmap-fullscreen")}function uF(n){return WE(n,"mindmap-fit")}function fF(n){return WE(n,"mindmap-close")}function dF(n,t,e,r){const i=GE(n,t,"mindmap-close",_.t("mindmap.close"),gd);!i||n.domEvents.addEventListener(i,"click",()=>{r.closeMindmap(n,e)})}function hF(n,t,e,r){const i=GE(n,t,"mindmap-fit",_.t("mindmap.autoFit"),p2);!i||n.domEvents.addEventListener(i,"click",()=>{r.fitMindmap(n,e)})}function mF(n,t,e,r){if(navigator.userAgent.includes("Mobile")&&!navigator.userAgent.includes("iPad"))return;const o=GE(n,t,"mindmap-fullscreen",_.t("mindmap.fullScreen"),mE);!o||n.domEvents.addEventListener(o,"click",()=>{aF(n,e,r)})}function gF(n,t){const e=y0(t);if(!e)return;const r=uF(e);r&&(r.remove(),n.domEvents.removeAllListeners(r));const i=fF(e);i&&(i.remove(),n.domEvents.removeAllListeners(i));const o=cF(e);o&&(o.remove(),n.domEvents.removeAllListeners(o))}const Cu=new Map;function qE(n,t,e){const r=(s,l)=>{s.forEach(c=>{l?q(c.block,"to-mindmap-highlight"):ut(c.block,"to-mindmap-highlight"),r(c.children,l)})},i=xk(n,t);if(i.length===0)return;const o=i[0].block;if(e){const s=Cu.get(o);s&&(s.forEach(l=>l.cancel()),Cu.delete(o)),r(i,!0)}else{const s=setTimeout(()=>{r(i,!1),Cu.delete(o)},300),l=()=>{clearTimeout(s),Cu.delete(o)},c=Cu.get(o);c?c.push({cancel:l}):Cu.set(o,[{cancel:l}])}}const{Markmap:pF}=B9;function CF(n,t){nn(t);const e=xk(n,t),r=e[0].block,i=d=>({type:"text",content:zt(d.block).textContent,depth:1,children:d.children.length>0?d.children.map(C=>i(C)):void 0});let o=null;e.length>1?o={type:"root",content:"root",depth:0,children:e.length>0?e.map(d=>i(d)):void 0}:o=i(e[0]);const l=d=>{if(d.length===0)return null;const h=d[d.length-1];return h.children&&h.children.length>0?l(h.children):h},c=l(e);return{root:o,block:r,nodes:e,last:c}}function Jm(n,t,e,r){const{root:i,block:o,last:s}=CF(n,t);r.selectBlock&&n.selection.selectBlock(o,0,0),qE(n,o,!1),r.saveData&&n.updateBlockData(o,{viewAsMindmap:!0});const l=ve(o);let c=l.querySelector(".editor-mindmap-svg");if(r.reset&&(c&&c.remove(),c=null),c)c.innerHTML="";else{const M="http://www.w3.org/2000/svg",U=l.getBoundingClientRect(),V=document.fullscreenElement===l,nt=V?`${U.width}`:`${t.getBoundingClientRect().width}`,Y=V?`${U.height}`:"600",X=document.createElementNS(M,"svg");X.setAttributeNS(null,"viewBox",`0 0 ${nt} ${Y}`),X.setAttributeNS(null,"width","100%"),X.setAttributeNS(null,"height",Y),X.style.display="block",X.style.width="100%",X.style.height=`${Y}px`,X.classList.add("editor-mindmap-svg"),l.appendChild(X),c=X}const d=o,C=`editor-mindmap-root-${dt(o)}`;q(d,"editor-in-mindmap-first",C,"readonly"),d.contentEditable="false";const E=oe(o);E&&Rt(E)<=Rt(s.block)&&sF(E,s.block,["block-hidden",C]);const A=(M,U)=>{if(U.length>0){const V=U[0].parentElement;V&&(V.style.width="100vw",V.style.maxWidth="200px")}U.forEach(V=>{q(V,"editor-mindmap-node")})},v=new pF(c,{...e,autoFit:!0});v.viewHooks.transformHtml.tap(A),v.setData(i),v.fit();const R=ve(o);let S=R.querySelector(".mindmap-toolbar");S||(S=B("div",["mindmap-toolbar"],R)),hF(n,S,d,r.mindmapTools),mF(n,S,d,r.mindmapTools),dF(n,S,d,r.mindmapTools),n.domEvents.addEventListener(c,"click",()=>{n.selection.selectBlock(o,0),n.input.focus()}),d.mindMap=v}function EF(n){const t=B("div",["list-to-mindmap-wrap"],null),e=Jr("list-to-mindmap",_.t("mindmap.viewAsMindMap"),g2,[],n.clientId);return t.appendChild(e),t}async function vk(n,t){const e=`editor-mindmap-root-${t.id}`,r=at(t);ke(r).forEach(l=>{Mt(l,e)&&ut(l,e,"editor-in-mindmap-first","block-hidden")});const o=ve(t);document.fullscreenElement===o&&await bk();const s=o.querySelector(".editor-mindmap-svg");!s||(p(qe,s,"no mindmap svg"),s.remove(),n.domEvents.removeAllListeners(s),gF(n,t))}function AF(n){const t=n.classList,e="editor-mindmap-root-";return Array.from(t).find(i=>{if(i.startsWith(e))return i})}async function Bk(n,t){!AF(t)||(n.updateBlockData(t,{viewAsMindmap:null}),vk(n,t),n.selection.selectBlock(t,0))}function xF(n,t){const e=t.mindMap;e&&e.fit()}const Zm={toMindmap:Jm,closeMindmap:Bk,fitMindmap:xF},xat="";class tg{constructor(t){m(this,"toMindmapButton");m(this,"currentBlock",null);m(this,"handleHoveringBlock",t=>{t&&Ht(t)&&wr(t)!=="unchecked"&&wr(t)!=="checked"&&this.editor.isWritable()?ve(t).appendChild(this.toMindmapButton):this.toMindmapButton.remove()});m(this,"handleMouseEnter",()=>{const t=et(this.toMindmapButton);p(qe,t&&Ht(t),"no parent list"),qE(this.editor,t,!0),this.currentBlock=t});m(this,"handleMouseLeave",()=>{this.currentBlock&&(qE(this.editor,this.currentBlock,!1),this.currentBlock=null)});m(this,"handleClick",()=>{const t=et(this.toMindmapButton);p(qe,t&&Ht(t),"no parent list"),Jm(this.editor,t,{},{saveData:!0,selectBlock:!0,mindmapTools:Zm})});this.editor=t,ze.get(this.editor).addListener("change",this.handleHoveringBlock),this.toMindmapButton=EF(t),t.domEvents.addEventListener(this.toMindmapButton,"mouseenter",this.handleMouseEnter),t.domEvents.addEventListener(this.toMindmapButton,"mouseleave",this.handleMouseLeave),t.domEvents.addEventListener(this.toMindmapButton,"click",this.handleClick)}static get(t){return t.findCustomByType(tg)}destroy(){ze.get(this.editor).removeListener("change",this.handleHoveringBlock)}hide(){this.currentBlock&&(this.currentBlock=null),this.toMindmapButton.remove()}}function bF(n,t,e){var r;t==="beginDrag"&&((r=tg.get(n))==null||r.hide())}function Eu(n,t,e,r){var o;const i=(o=r==null?void 0:r.groupId)!=null?o:it();t.forEach(s=>{const l=n.getBlockData(s);if(l.start!==e||(r==null?void 0:r.resetGroupId)){const c={...l,start:e};r!=null&&r.resetGroupId&&(c.groupId=i),n.updateBlockData(s,c)}l.textOnly||(e+=1)})}function XE(n,t,e,r){const i=Ak(t,{withSelf:!0});i.length!==0&&Eu(n,i,e,r)}class Au{constructor(t,e){m(this,"listStart",0);m(this,"listBrother",null);if(this.editor=t,Xm(e))return;const r=Sd(e),i=Sr(r);this.listStart=i,r===e?this.listBrother=ka(r):this.listBrother=r}fix(){if(!!this.listBrother){if(xf(this.listBrother)){this.listBrother=null;return}XE(this.editor,this.listBrother,this.listStart)}}}class Ra{constructor(t,e,r){m(this,"listStart");m(this,"listBrother",null);this.editor=t,this.options=r;const i=Sd(e),o=Sr(i);this.listStart=o,this.listBrother=i,r!=null&&r.resetStart&&(this.listStart=1)}fix(){!this.listBrother||XE(this.editor,this.listBrother,this.listStart,this.options)}}class yk{constructor(t,e,r){m(this,"listStart");m(this,"listNextBrothers",[]);this.editor=t,this.listNextBrothers=pu(e);const{start:i,resetStart:o}=r||{};this.listStart=o?1:i!=null?i:1}fix(){!this.listNextBrothers.length||Eu(this.editor,this.listNextBrothers,this.listStart)}}function vF(n,t,e){n.getBlockData(t).quoted&&(e.quoted=!0)}function YE(n,t,e,r){if(qe.debug("drag a block on a list block"),!st(n,t))return!1;p(qe,Ht(e),"target is not a list block");const{type:i,start:o,level:s,groupId:l}=co(e),c=r==="after"?o+1:o,d=n.getBlockData(t),h={id:it(),type:"list",groupId:l,level:s,start:c,text:d.text,...Ym(i)};vF(n,e,h);let C=Rt(e);const E=at(e);r==="after"&&(C+=1);let A=null;Ht(t)&&(A=new Au(n,t));const v=n.insertBlock(Et(E),C,h,V0(h.id,0));return n.deleteBlock(t),l!==d.groupId&&new Ra(n,v).fix(),A==null||A.fix(),!0}function BF(n,t,e,r){if(qe.debug("drag a list between text blocks"),r==="after"){const d=oe(e);if(d&&Ht(d))return YE(n,t,d,"before")}if(r==="before"){const d=Ke(e);if(d&&Ht(d))return YE(n,t,d,"after")}const o={...n.getBlockData(t),groupId:it(),start:1,level:1};let s=Rt(e);const l=at(e);r==="after"&&(s+=1),n.insertBlock(Et(l),s,o,V0(o.id,0));const c=new Au(n,t);return n.deleteBlock(t),c.fix(),!0}function yF(n,t,e,r,i){if(A0(e))return!1;const{blockId:o}=e,s=n.getBlockById(o);p(qe,s,"no dragged block");const{isSourceBlock:l,targetBlock:c}=i;return!l&&c?(p(qe,t===c,"block !== target block"),p(qe,Ht(c),"target is not a list block"),YE(n,s,c,r)):BF(n,s,c,r)}function Tk(n,t){if(!n.isWritable())return!1;const e=n.selection.range,i=n.editorCommandProviders.getCommands(e,"shortcut").find(o=>o.id===t);return i?(n.editorCommandProviders.executeCommand(e,i,{}),!0):!1}const TF={"Shift+CtrlOrCmd+L":n=>Tk(n,"ordered-list"),"Shift+CtrlOrCmd+U":n=>Tk(n,"unordered-list")};function eg(n){const t=n.getAttribute("block-padding-level");return t?Number(t):null}function kF(n,t){let e;const r=eg(t);if(!r)e=1;else{if(r>=12)return e=12,!1;e=r+1}return n.updateBlockData(t,{...n.getBlockData(t),padding:e}),!0}function kk(n,t){const e=eg(t);if(!e)return!1;const r=n.getBlockData(t);return e>1?(n.updateBlockData(t,{...r,padding:e-1}),!0):(n.updateBlockData(t,{...r,padding:null}),!0)}function QE(n){return n.readonly||!n.isWritable()}function RF(n){return n.selection.range.getSelectedBlocks().forEach(e=>{const r=e.block;st(n,r)&&kF(n,r)}),!0}function wF(n){return n.selection.range.getSelectedBlocks().forEach(e=>{const r=e.block;st(n,r)&&kk(n,r)}),!0}function SF(n){return QE(n)?!1:n.undoManager.runInGroup(()=>(RF(n),!0))}function LF(n){return QE(n)?!1:n.undoManager.runInGroup(()=>(wF(n),!0))}function IF(n){if(QE(n))return!1;if(!n.selection.range.isCollapsed())return;const t=n.selection.focusedBlock;if(!st(n,t))return;const e=n.selection.range.focus;if(!(!e.isSimple()||e.offset!==0||!eg(t)))return kk(n,t),!0}class JE{renderBlock(t,e,r){const{padding:i}=r;return i?{attributes:{"block-padding-level":i}}:{}}}const bat="",DF={Tab:SF,"Shift+Tab":LF,Backspace:IF};function Al(n){return n.textOnly?"text-only":n.checkbox?n.checkbox:n.ordered?"ordered":"unordered"}function _F(n){var e,r;if(n.checkbox)return"";const t=(e=n.level)!=null?e:1;return n.ordered?`${ZP(t,(r=n.start)!=null?r:1)}.`:tF(t)}function Rk(n){const t={id:it(),type:"text",text:n.text},e=["heading","quoted","align"];for(const r of e)n[r]!==void 0&&(t[r]=n[r]);return t}function MF(n,t,e=1){if(!t)return null;let r=Ke(n);for(;r;){const i=r.getAttribute("data-style-heading"),o=Number(r.getAttribute("data-list-level"));if(i){if(i<t)return null;if(i===t&&o===e)return Ht(r)?r:null}r=Ke(r)}return null}function UF(n,t){const e=n.getAttribute("data-style-heading"),r=MF(n,e);if(r)return r;const i=Ke(n);if(i&&Ht(i)&&wr(i)===t)return i;const o=oe(n);return o&&Ht(o)&&wr(o)===t?o:null}function OF(n,t,e){var S,M,U;const r=(S=e.data)!=null?S:{};let i=1;if(Ht(t))i=Un(t);else{const V=eg(t);V&&(i=V+1),i>8&&(i=8)}const o=(M=r.listType)!=null?M:"ordered";if(o==="text-only")return null;const s=n.getBlockData(t);let l=(U=s.text)!=null?U:[],d=Re(l);const h=e.offset||0;h<=jn(l)&&(l=ar(l,h).right,d=d.substring(0,h));let C=1;o==="ordered"&&(C=Number.parseInt(d,10)||1);let E=it();const A=UF(t,o);if(A)if(Un(A)===i){if(Rt(t)>Rt(A))C=Sr(A)+1;else{const V=Sr(A);V>1&&(C=V-1),new yk(n,A,{start:C+1}).fix()}E=gu(A)}else{const V=nF(A,i);V&&(C=Sr(V)+1)}else Ht(t)&&new yk(n,t,{start:1}).fix();const R={...Rk(s),id:it(),type:"list",level:i,start:C,groupId:E,ordered:!1,text:l};return o==="ordered"?R.ordered=!0:(o==="checked"||o==="unchecked")&&(R.checkbox=o),{blockData:R,onConverted:(V,nt)=>{new Ra(V,nt).fix()}}}function ng(n){return n==="checked"||n==="unchecked"}function wk(n,t,e,r){const i=t,{containerId:o,blockIndex:s}=r[r.length-1];if(s===0)return!0;const l=e.blocks[o][s-1];if(l.type!=="list")return!0;const c=Al(i),d=Al(l);return c!==d&&(!ng(c)||!ng(d))||(i.level||1)>(l.level||1)}function Sk(n,t,e,r){const i=t,{containerId:o,blockIndex:s}=r[r.length-1];if(s===e.blocks[o].length-1)return!0;const l=e.blocks[o][s+1];if(l.type!=="list")return!0;const c=Al(i),d=Al(l);return c!==d&&(!ng(c)||!ng(d))||(i.level||1)>(l.level||1)}function NF(n,t,e,r,i){var s,l,c;const o=t;if(r==="text")return((s=ur.convertTo)==null?void 0:s.call(ur,n,t,e,"text",i))||"";if(r==="markdown"){let d=((l=ur.convertTo)==null?void 0:l.call(ur,n,t,e,"markdown",i))||"";o.checkbox==="checked"?d=`[x] ${d}`:o.checkbox==="unchecked"&&(d=`[ ] ${d}`),o.ordered?d=`${o.start}. ${d}`:d=`- ${d}`;const h=o.level||0;return d=(h>0?" ".repeat(h-1):"")+d,wk(n,t,e,i)&&(d=`${d}`),Sk(n,t,e,i)&&(d=`${d}`,h<=1&&(d+=`
617
- `)),d}if(r==="html"){let d=((c=ur.convertTo)==null?void 0:c.call(ur,n,t,e,"html",i))||"";d=d.replace("<p>","").replace("</p>",""),o.checkbox==="checked"?d=`<input type="checkbox" checked="checked" disabled="disabled" /> ${d}`:o.checkbox==="unchecked"&&(d=`<input type="checkbox" disabled="disabled" /> ${d}`);let h="ul",C="";if(o.ordered)switch(d=`<li value="${o.start}">${d}</li>`,h="ol",o.level){case 2:case 5:case 8:C="list-style-type: lower-alpha;";break;case 3:case 6:C="list-style-type: lower-roman;";break}else d=`<li>${d}</li>`;return wk(n,t,e,i)&&(d=`<${h}${C?` style="${C}"`:""}>${d}`),Sk(n,t,e,i)&&(d=`${d}</${h}>`),d}return""}function Lk(n){const t=B("label",["editor-check-list-wrapper"],null);n&&q(t,"editor-check-list-wrapper-checked");const e=B("span",["editor-check-box"],t);return B("span",["editor-check-box-inner"],e),t}function PF(n,t){const e=Al(t);if(e!=="text-only"){if(e==="checked"){n.append(Lk(!0));return}if(e==="unchecked"){n.append(Lk(!1));return}n.innerText=_F(t)}}function FF(n){const t=B("div",["list-container"],null),e=B("button",["list-marker"],t);return PF(e,n),t}function xu(n,t){nn(t);const e=n.getBlockData(t),r=Rk(e),i=at(t),o=Rt(t);n.deleteBlock(t);const s=V0(r.id,0);if(Of(n,i)&&!ie(i)){const l=Me(i);n.insertBlock(Et(i),o,r,s),n.deleteBlock(l)}else n.insertBlock(Et(i),o,r,s)}function KF(n){if(!n.selection.range.isCollapsed())return!1;const t=n.selection.focusedBlock;if(!Ht(t))return!1;const e=n.selection.range.focus;return!e.isSimple()||e.offset!==0?!1:(xu(n,t),!0)}function Ik(n){let t=oe(n);if(!t)return null;const e=ka(n);for(;t!==e;){if(p(qe,t,"no next block"),Ht(t))return Un(t)>Un(n)?t:null;if(t=oe(t),!t)return null}return null}function ZE(n){const t=[];let e=Ik(n);if(!e)return t;for(;e;){const r=ka(e);t.push({block:e,children:ZE(e)}),e=r}return t}function VF(n){const t=(r,i)=>{i.push(r.block),r.children.forEach(o=>t(o,i))},e=[];return n.forEach(r=>t(r,e)),e}function Dk(n,t){return Un(t)!==1}function _k(n,t,e){t.forEach(r=>{const i=n.getBlockData(r.block);n.updateBlockData(r.block,{...i,groupId:e,level:(i.level||1)-1}),r.children.length&&_k(n,r.children,i.groupId)})}function tA(n,t){if(!Dk(n,t))return!1;const e=Un(t);if(e===1)return!1;let r=it(),i=1,o=wr(t);const s=e-1,l=Qm(t);l&&(r=gu(l),i=Sr(l)+1,o!=="text-only"&&(o=wr(l)));const c=ZE(t),d=n.getBlockData(t),h={...d,groupId:r,level:s,start:i,...Ym(o)};n.updateBlockData(t,h),n.doc.beginBatchUpdate(),_k(n,c,d.groupId),n.doc.endBatchUpdate(),new Ra(n,t).fix();const E=Ik(t);return E&&new Ra(n,E,{resetStart:!0,resetGroupId:!0}).fix(),!0}const $F=D("list-block");function HF(n,t,e){p($F,Ht(t),"not a list block");const r={...n.getBlockData(t),id:it()};return e!=null&&e.level&&(r.level=e.level),e!=null&&e.start&&(r.start=e.start),e!=null&&e.keepText||delete r.text,(r==null?void 0:r.checkbox)==="checked"&&(r.checkbox="unchecked"),r}function jF(n){if(nn(n),!Xm(n))return n;let t=El(n);for(;t;){if(!Xm(t))return t;t=El(t)}return null}function zF(n,t,e,r){const i=new Ra(n,r),o=Sr(r)+1;Xc(n,t,e,{forceInsertAfter:!0,newBlockData:HF(n,r,{start:o})}),i.fix()}function GF(n){var s;if(n.selection.range.isCollapsed()){const l=n.selection.focusedBlock;if(Ht(l)&&At(n,l)===0)return Un(l)===1?xu(n,l):tA(n,l),!0}n.clearSelectedContents();const t=n.selection.focusedBlock;if(!Ht(t))return!1;const e=n.selection.range.focus;if(!e.isSimple())return!1;const r=e.offset,o=(s=r===At(n,t)?jF(t):t)!=null?s:t;return zF(n,t,r,o),!0}function Mk(n){p(qe,Ht(n),"not a list block");const{level:t}=co(n);let e=Ke(n);for(;e;){if(Ht(e)){const{level:r}=co(e);if(t===r)return e;if(r<t)return null}e=Ke(e)}return null}function Uk(n,t){return nn(t),Mk(t)?Un(t)<XP:!1}function WF(n,t,e){let r=Ke(t);p(qe,r,"no prev brother");const i=Un(e);for(;r;){if(r===e)return null;if(Ht(r)&&Un(r)===i+1)return r;r=Ke(r)}return null}function Ok(n,t){if(!Uk(n,t))return!1;nn(t);const e=Mk(t);p(qe,e,"no list prev brother");const r=e,i=WF(n,t,r),o=Un(r)+1;let s=it(),l=1,c=wr(t);i&&(s=gu(i),l=Sr(i)+1,c=wr(i));const d=ZE(t),C={...n.getBlockData(t),groupId:s,level:o,start:l,...Ym(c)};return n.updateBlockData(t,C),n.doc.beginBatchUpdate(),VF(d).forEach(A=>{const v=n.getBlockData(A);n.updateBlockData(A,{...v,level:(v.level||1)+1})}),n.doc.endBatchUpdate(),!0}function qF(n,t,e){return t.length===0||!t.every(r=>Ht(r.block))?!1:e==="increase"?Uk(n,t[0].block):Dk(n,t[0].block)}function Nk(n,t,e){if(!qF(n,t,e))return!1;const r=t[0].block,i=Un(r),o=t.filter(d=>Un(d.block)<=i),s=Ak(r,{withSelf:!1}),l=new Set(o.map(d=>d.block)),c=s.filter(d=>!l.has(d));return n.undoManager.runInGroup(()=>{let d=null;c.length>0&&(d=new Ra(n,c[0])),o.forEach(h=>{e==="increase"?Ok(n,h.block):tA(n,h.block)}),d==null||d.fix()}),!0}function XF(n,t){return Ok(n,t)}function YF(n,t){return tA(n,t)}function QF(n){const t=n.selection.range.getSelectedBlocks();if(t.length>1)return Nk(n,t,"increase"),!0;const e=t[0].block;if(!Ht(e))return!1;const r=new Au(n,e);return XF(n,e)&&(r.fix(),new Ra(n,e).fix()),!0}function JF(n){const t=n.selection.range.getSelectedBlocks();if(t.length>1)return Nk(n,t,"decrease"),!0;const e=t[0].block;return Ht(e)?(YF(n,e),!0):!1}class ZF{constructor(t){this.editor=t}handleBeforeKeyDown(t,e){const r=t.selection.range.getSelectedBlocks();if(r.length===0||!r.some(o=>Ht(o.block)))return!1;switch(e.key){case"Enter":return this.handleEnter(e);case"Backspace":return this.handleBackspace();case"Tab":return this.handleTab(e);default:return!1}}handleEnter(t){const e=this.editor.selection.range.getSelectedBlocks()[0];return!e.block||!Ht(e.block)||Gi(t,"Shift+Enter")?!1:this.editor.undoManager.runInGroup(()=>GF(this.editor))}handleBackspace(){return this.editor.undoManager.runInGroup(()=>KF(this.editor))}handleTab(t){return Gi(t,"Shift+Tab")?this.editor.undoManager.runInGroup(()=>JF(this.editor)):this.editor.undoManager.runInGroup(()=>QF(this.editor))}}class tK{constructor(t){m(this,"effectedBlockIds",new Map);m(this,"handleBeforeClearSelection",()=>{this.effectedBlockIds.clear();const t=this.editor.selection.range.getSelectedBlocks();if(t.length===0)return;const e=new Set;t.forEach(i=>{const o=i.block;Ht(o)&&e.add(o)});const r=new Map;Array.from(e.values()).forEach(i=>{var c;const o=Sd(i),{start:s}=co(o);r.set(dt(o),s);const l=(c=eF(i))!=null?c:i;r.set(dt(l),s)}),this.effectedBlockIds=r});m(this,"handleAfterClearSelection",()=>{Array.from(this.effectedBlockIds.entries()).forEach(([t,e])=>{const r=this.editor.findBlockById(t);!r||XE(this.editor,r,e)}),this.effectedBlockIds.clear()});this.editor=t,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 eK=D("customize-list-start-menu");class nK{constructor(t){m(this,"popup");m(this,"block",null);m(this,"show",(t,e)=>{const r=e.querySelector("div.list-container");p(eK,r,"list-block mark does not exist"),this.block=e,this.popup.manualShow(r,{theme:"light"})});m(this,"createDialogContent",()=>{const t=B("div",["customize-start-panel"],null);B("span",["customize-start-panel-title"],t,_.t("list.numberLabel"));const e=this.createNumericInput();t.appendChild(e);const r=B("button",["customize-start-panel-button"],t,_.t("list.confirm"));return this.editor.domEvents.addEventListener(t,"keydown",this.handleKeydown),this.editor.domEvents.addEventListener(r,"click",this.handleOk),t});m(this,"handleDialogShow",()=>{const t=this.block;if(!t)return;const e=this.popup.popupContent,r=e.querySelector("button.customize-start-panel-button"),i=e.querySelector("input.customize-start-panel-input"),o=Sr(t);!r||!i||requestAnimationFrame(()=>{i.focus(),i.value=String(o)})});m(this,"handleOk",()=>{const e=this.popup.popupContent.querySelector("input.customize-start-panel-input"),r=this.block;if(!r)return;const i=Number(e.value);!i||(this.editor.undoManager.runInGroup(()=>{Eu(this.editor,[r,...pu(r)],i,{resetGroupId:!0})}),this.popup.close("clickItem"))});m(this,"handleKeydown",(t,e)=>{const r=e;r.isComposing||(r.key==="Escape"?this.popup.close("cancelBar"):r.key==="Enter"&&this.handleOk())});this.editor=t,this.popup=new su(this.createDialogContent()),this.popup.on("show",this.handleDialogShow)}destroy(){this.popup.destroy()}createNumericInput(){const t=B("input",["customize-start-panel-input"],null);t.type="number",t.min="1";const e=()=>{const i=t.value.replace(/[^\d]/g,"").replace(/^0+/,""),o=parseInt(i,10);o<=0||Number.isNaN(o)?t.value="":t.value=i};return this.editor.domEvents.addEventListener(t,"input",e),t}}function rK(n,t){return gu(n)===gu(t)}function iK(n,t){const e=Ck(t);return e?rK(e,t)?Sr(e)!==Sr(t)-1:!0:!1}function oK(n,t){return El(t)?!0:Sr(t)!==1}function sK(n,t){return nn(t),[{id:"continue-numbering",name:_.t("list.continueList"),states:iK(n,t)?[]:["disabled"]},{id:"start-new-list",name:_.t("list.restartList"),states:oK(n,t)?[]:["disabled"]},{id:"set-numbering-value",name:_.t("list.changeNumber")}]}function lK(n,t,e){var r,i;if(nn(t),e.id==="continue-numbering"){const o=Ck(t);o&&Eu(n,[t,...pu(t)],Sr(o)+1,{resetGroupId:!0,groupId:gu(o)})}if(e.id==="start-new-list"&&n.undoManager.runInGroup(()=>{Eu(n,[t,...pu(t)],1,{resetGroupId:!0})}),e.id==="set-numbering-value"){const o=(r=n.options.componentsOptions)==null?void 0:r.list;if((i=o==null?void 0:o.onChangeStart)!=null&&i.call(o,n,t,e))return;n.addCustom("list-customize-start-dialog",()=>new nK(n)).show(n,t)}}class aK{constructor(t){m(this,"menu");m(this,"handleClick",(t,e)=>{const r=Dc(e,"div.list-container");if(r&&this.editor.isWritable()){const i=et(r);p(qe,i,"no parent block"),nn(i);const o=t.getBlockData(i);if(o&&o.checkbox){t.updateBlockData(i,{...o,checkbox:o.checkbox==="checked"?"unchecked":"checked"});return}if(wr(i)==="unordered")return;this.menu.updateItems(this.getCommandItems(i)),this.menu.manualShow(r),this.activeList(r,!0)}});m(this,"handleMenuClose",()=>{var e;const t=(e=this.menu.tippyInstance)==null?void 0:e.reference;t&&this.activeList(t,!1)});m(this,"handleMenuClick",(t,e)=>{var i;const r=(i=this.menu.tippyInstance)==null?void 0:i.reference;if(r){const o=et(r);o&&lK(this.editor,o,e)}});this.editor=t,this.editor.addListener("click",this.handleClick),this.menu=new dl([]),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(t){return sK(this.editor,t)}activeList(t,e){const r=et(t);!r||(e?(q(t,"active"),q(r,"active")):(ut(t,"active"),ut(r,"active")))}}class cK{constructor(t){this.editor=t}handleBeforeKeyDown(t,e){const r=t.selection.range.getSelectedBlocks();if(r.length===0)return!1;const i=r[0].block;if(!Ht(i)||!zE(i))return!1;if(e.key==="ArrowUp"||e.key==="ArrowLeft"){const o=zr(i);return o&&t.selection.selectBlock(o,At(t,o)),!0}if(e.key==="ArrowDown"||e.key==="ArrowRight"){const o=Gr(i);return o&&t.selection.selectBlock(o,0),!0}return(e.key==="Delete"||e.key==="Backspace"||e.key==="Escape")&&Bk(t,i),!0}}function uK(n,t,e,r,i){IC(n,"list-block-init",()=>{setTimeout(()=>{n.input.addHandler(new cK(n)),n.input.addHandler(new ZF(n)),n.addCustom("list-clear-selection-handler",()=>new tK(n)),n.addCustom("list-marker-menu",()=>new aK(n))})});const o=ur.createBlockContent(n,t,e,r,i),s=i,{level:l,start:c,groupId:d}=s,h=Al(s);r.setAttribute("data-list-level",`${l||1}`),r.setAttribute("data-list-start",`${c||1}`),r.setAttribute("data-list-group-id",`${d}`),r.setAttribute("data-list-type",h);const C=FF(s);return r.insertBefore(C,o),s.viewAsMindmap?setTimeout(()=>{const E=n.findBlockById(i.id);E&&Jm(n,E,{},{mindmapTools:Zm,saveData:!1})}):setTimeout(()=>{const E=n.findBlockById(i.id);E&&vk(n,E)}),o}const fK={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"}},dK={list:{confirm:"Confirm",setStart:"Set number",continueList:"Continue numbering",restartList:"Start a new list",changeNumber:"Set numbering value",numberLabel:"Numbering order",mention:{tooltip:"Mention and notify users"}},mindmap:{viewAsMindMap:"View as MindMap",autoFit:"Auto zoom",fullScreen:"Full screen",close:"Close",exitFullscreen:"Exit full screen"}},hK={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"}};_.mergeLang({"zh-CN":fK,"en-US":dK,"ja-JP":hK});const vat="",mK=D("list-block:paste-handler");class Pk{constructor(){m(this,"fixStartByList",null)}async handleBeforePasteDoc(t,e){const r=new Map,i=new Map;return Object.values(e.blocks).forEach(o=>{o.forEach((s,l)=>{if(s.type==="list"){if(l===0){const d=t.selection.startBlock;if(Ht(d)){const{start:C,groupId:E,level:A,type:v}=co(d),R=Al(s),S=s.groupId;s.groupId=E,s.start=C,s.level=A;const M=Ym(v);Object.assign(s,M),A===s.level&&v===R&&(r.set(S,E),i.set(E,C)),this.fixStartByList=new Au(t,d);return}const h=Ke(d);if(h&&Ht(h)){const{start:C,groupId:E,level:A,type:v}=co(h),R=Al(s);if(A===s.level&&v===R){const S=s.groupId;s.groupId=E,s.start=C+1,s.level=A,r.set(S,E),i.set(E,C+1),this.fixStartByList=new Au(t,h);return}}}const c=r.get(s.groupId);if(c){const d=i.get(c);p(mK,d,"start is null"),s.start=d+1,s.groupId=c,i.set(c,d+1)}else{const d=it();r.set(s.groupId,d),s.groupId=d,s.start=1,i.set(d,1)}}})}),!1}async handleAfterPaste(t){return t.undoManager.runInGroup(()=>{this.fixStartByList&&(this.fixStartByList.fix(),this.fixStartByList=null)}),!1}}const gK=D("list selection to doc");function pK(n){const t={type:"text"};return Object.entries(n).forEach(([e,r])=>{["ordered","unordered","checked","unchecked","text-only","start","level","groupId","type"].includes(e)||(t[e]=r)}),t}function CK(n,t){const e=xt.default(Qo(n,t.block)),r=t.start,i=t.end;p(gK,e.text,"no block text");const o=At(n,t.block);if(i.offset-r.offset===o)return{blocks:{root:[{...e}]},meta:{},comments:{}};const s=pK(e);if(r.offset===i.offset)return{blocks:{root:[{...s,text:[]}]},meta:{},comments:{}};const{middle:l}=an(e.text,r.offset,i.offset-r.offset);return{blocks:{root:[{...s,text:l}]},meta:{},comments:{}}}const Fk={...ur,blockType:"list",createBlockContent:uK,convertFrom:OF,convertTo:NF,handleDrop:yF,notify:bF,handleDeleteBlock:(n,t)=>{if(Ht(t)){const e=new Au(n,t);setTimeout(()=>{e.fix()})}},selectionToDoc:CK},eA=D("paragraph");class EK{constructor(t){m(this,"id","BlockParagraphProvider");this.editor=t}isChecked(t,e){return!!(t[e]||t.level&&(t.ordered===!0&&!t.checkbox&&e==="ordered-list"||t.ordered===!1&&!t.checkbox&&e==="unordered-list")||e==="check-list"&&t.checkbox)}getAvailableCommands(t,e){if(!st(t,e))return[];if(ei(t))return[];const r=[],i={"unordered-list":[_.t("commands.unordered"),gn("CtrlOrCmd+Shift+U"),wT],"ordered-list":[_.t("commands.ordered"),gn("CtrlOrCmd+Shift+L"),RT],"check-list":[_.t("commands.check"),void 0,ST],link:[_.t("commands.link"),gn("CtrlOrCmd+K"),aE],quoted:[_.t("commands.quote"),void 0,LT]},o=dt(e),s=Ot(e),l=Ci(t,e),c=t.getBlockData(e);return Object.entries(i).forEach(([d,[h,C,E]])=>{const A=[];if(this.isChecked(c,d)&&A.push("checked"),d==="link"){if(!t.selection.range.isSimple())return;t.selection.range.getSelectedBlocks().length!==1&&A.push("disabled")}r.push({blockId:o,blockType:s,blockKind:l,id:d,name:h,desc:C,states:A,icon:E,groupIndex:600})}),r}convertLink(t,e,r){p(eA,xi(e.start),""),p(eA,xi(e.start),"");const i="bottom-start",o=e.start.offset,s=e.end.offset,l=(A,v)=>{t.undoManager.runInGroup(()=>{try{const R=t.selection.range.isCollapsed();let S;if(R){S=qo(t.getBlockText(r),s,A,{link:v}),t.setBlockText(r,S);return}S=P0(t.getBlockText(r),o,s,A),S=Ff(o,A.length,S,"link",v),t.setBlockText(r,S),t.selection.selectBlock(r,o+A.length),t.focus()}catch(R){eA.error(R)}})},c=()=>{t.selection.selectBlock(r,s),t.focus()},d=Vo(t,r,e)[0];if(!d)return;const h=jo(t,r,"link-button-anchor",d),C=t.getBlockText(r),E=Hc(C,o);Rd(t,{target:h,linkText:t.getSelectedText(),linkUrl:(E==null?void 0:E.link)||"",onFinished:l,onClose:c,placement:i})}convertToList(t,e,r){const i=k0(t,e,"list",{offset:0,data:{listType:r}});i&&t.undoManager.runInGroup(()=>{const o=Rt(e),s=at(e);t.insertBlock(Et(s),o,i.blockData),t.deleteBlock(e)})}executeCommand(t,e,r,i){var c;if(!st(t,e)||ei(t))return!1;const o=i.id,s=(c=i.states)==null?void 0:c.includes("checked");let l=!1;if(o==="unordered-list"&&(s?xu(t,e):this.convertToList(t,e,"unordered"),l=!0),o==="ordered-list"&&(s?xu(t,e):this.convertToList(t,e,"ordered"),l=!0),o==="check-list"&&(s?xu(t,e):this.convertToList(t,e,"unchecked"),l=!0),o==="quoted"){const h=t.getBlockData(e).quoted;t.updateBlockData(e,{quoted:h?void 0:!0}),l=!0}if(o==="link"){const d=Gm(t);d==null||d.disableTextToolbar(),d==null||d.hide(),setTimeout(()=>{d==null||d.enableTextToolbar()},1e3),this.convertLink(t,r,e),l=!0}return l}}const AK={left:ru,right:Sm,center:Lm};class xK{constructor(t){m(this,"id","BlockAlignProvider");this.editor=t}applyAlignStyle(t,e,r){Object.keys(AK).includes(r)?t.updateBlockData(e,{align:r}):t.updateBlockData(e,{align:null})}isChecked(t,e){return t.align===e}getAvailableCommands(t,e,r){if(!st(t,e))return[];if(ei(t))return[];const i=dt(e),o=Ot(e),s=Ci(t,e),l=t.getBlockData(e),c=d=>{var C;const h=B("span",["toolbar-item-name-container"],null);for(const E of d.children)if((C=E.states)!=null&&C.includes("checked"))return h.innerHTML=E.icon||ru,h;return h.innerHTML=ru,h};return[{id:"align",name:_.t("commands.alignGroup"),blockId:i,blockType:o,blockKind:s,groupIndex:700,dropdown:!0,element:c,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["align-left"],children:[{id:"align-left",name:_.t("commands.alignLeft"),icon:ru,states:this.isChecked(l,"left")?["checked"]:[]},{id:"align-center",name:_.t("commands.alignCenter"),icon:Lm,states:this.isChecked(l,"center")?["checked"]:[]},{id:"align-right",name:_.t("commands.alignRight"),icon:Sm,states:this.isChecked(l,"right")?["checked"]:[]}],childrenType:"menu"}]}executeCommand(t,e,r,i){if(!st(t,e)||ei(t))return!1;if(i.id.startsWith("align")){const o=i.id.replace(/^align-/,"");return this.applyAlignStyle(t,e,o),!0}return!1}}const bK=D("toolbar-handler"),vK={id:"",name:"",type:"separator"};class bu{constructor(t){m(this,"id","editor-toolbar");m(this,"toolbar");m(this,"toolbarType","object");m(this,"mouseDown",!1);m(this,"oldRange",null);m(this,"hoveringBlock",null);m(this,"hoveringTextChild",null);m(this,"_disableTextToolbar",!1);m(this,"_lastClickTime",0);m(this,"isInToolbar",t=>this.toolbar.isInCommandBar(t.target));m(this,"handleButtonClick",(t,e)=>{const r=this.editor.getCustom("editor-tooltip");r.lastClickButtonId=e.id,this.toolbarType==="text"?(this.editor.editorCommandProviders.executeCommand(this.editor.selection.range,e,{}),this.editor.isWritable()&&this.showTextToolbar("click")):Date.now()-this._lastClickTime>200&&(this.toolbar.close("clickItem"),this.hoveringBlock&&GP(this.editor,this.hoveringBlock,this.hoveringTextChild,e)),this._lastClickTime=Date.now()});m(this,"handleClose",()=>{CE(this.editor)&&this.editor.focus({preventScroll:!0})});m(this,"handleClosing",(t,e)=>{if(this.toolbarType==="object"){const r=Xb(e);if(this.hoveringBlock===r)return!1}return!0});m(this,"handleDocumentMouseDown",t=>{t.button===0&&(document.addEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!0)});m(this,"handleDocumentMouseUp",()=>{document.removeEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!1,this.handleSelectionChange(this.editor)});m(this,"handleHoveringBlockChildChange",(t,e,r,i)=>{if(!(this.hoveringBlock===t&&this.hoveringTextChild===e)&&(this.hoveringBlock=t,this.hoveringTextChild=e,!(this.toolbar.isVisible&&this.toolbarType==="text"))){if(!t){this.toolbar.close("fromHover");return}this.showObjectToolbar(i)}});m(this,"handleSelectionChange",Pe.default(t=>{var r;if(p(bK,t===this.editor,"editor mismatch"),t.selection.range.isCollapsed()||this.mouseDown){if(this.toolbarType==="object"){const i=(r=this.toolbar.tippyInstance)==null?void 0:r.reference,o=this.editor.selection.focusedBlock;if(i&&Ae(i,o))return}this.toolbar.close("selectionChange"),this.oldRange=null;return}if(!this.editor.isWritable()){this.toolbar.close("selectionChange"),this.oldRange=null;return}if(t.selection.range.getSelectedBlocks().length===0){this.toolbar.close("selectionChange"),this.oldRange=null;return}this.oldRange&&this.oldRange.isEqual(t.selection.range)||(this.oldRange=t.selection.range,this.showTextToolbar("selectionChange"))},50));this.editor=t;const e=t.options.componentsOptions.popover;this.toolbar=new pd([],void 0,{tooltipId:t.clientId,id:"editor-toolbar",overflowBoundary:e==null?void 0:e.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(),t.addListener("selectionChanged",this.handleSelectionChange),ze.get(t).addListener("childChange",this.handleHoveringBlockChildChange),ze.get(t).addFilter(this),t.editorCommandProviders.registerCommandProvider(new qP(t)),t.editorCommandProviders.registerCommandProvider(new EK(t)),t.editorCommandProviders.registerCommandProvider(new xK(t))}disableTextToolbar(){this._disableTextToolbar=!0}enableTextToolbar(){this._disableTextToolbar=!1}hide(){this.toolbar.close("selectionChange")}destroy(){this.unbindEvents(),this.toolbar.destroy(),this.editor.removeListener("selectionChanged",this.handleSelectionChange),ze.get(this.editor).removeListener("childChange",this.handleHoveringBlockChildChange)}isInBlock(t,e){return t!==this.hoveringBlock?!1:!!(e.target&&e.target instanceof Node&&this.toolbar.popper&&Ae(this.toolbar.popper,e.target))}bindEvents(){document.addEventListener("mousedown",this.handleDocumentMouseDown)}unbindEvents(){document.removeEventListener("mousedown",this.handleDocumentMouseDown)}update(t){!this.editor.isWritable()||this.showTextToolbar(t)}showTextToolbar(t){var R,S;if(this._disableTextToolbar)return;const e=this.editor.selection.range,r=e.getSelectedBlocks();if(r.length===0)return;const i=r[0];if(!i)return;if(r.length===1){if(Le(i.block)){t==="click"&&this.showObjectToolbar(null);return}if(Pt(this.editor,i.block)&&e.isSimple())return}if(Ko(i.block)){this.toolbar.close("selectionChange");return}const o=this.editor.editorCommandProviders.getCommands(this.editor.selection.range,this.id),s=new Map;o.forEach(M=>{const U=M.groupIndex,V=s.get(U);V?V.push(M):s.set(U,[M])});const l=[[]],c=Array.from(s.entries()).sort((M,U)=>M[0]-U[0]);for(let M=0;M<c.length;M++){const[,U]=c[M];if(U.length===0)continue;let V=l[l.length-1];V.length>0&&V[V.length-1].groupIndex!==U[U.length-1].groupIndex&&(V=[],l.push(V)),V.push(...zm(U))}if(l.length===0){this.toolbar.close("selectionChange");return}this.toolbarType="text";const d=[];if(l.forEach((M,U)=>{const V=M.sort((nt,Y)=>{var X,ft;return((X=nt.order)!=null?X:0)-((ft=Y.order)!=null?ft:0)});d.push(...V),U!==l.length-1&&d.push(vK)}),d.length===0){this.toolbar.close("selectionChange");return}this.toolbar.updateItems(d);const h=r[r.length-1],C=!this.editor.selection.range.isReverse()&&h!==i,E=C?h:i,A=hk(this.editor,E),v=jo(this.editor,E.block,"editor-quick-menu",A);this.toolbar.manualShow(v,{placement:C?"bottom":"top",offset:[0,C?5:10]}),(S=(R=this.toolbar.tippyInstance)==null?void 0:R.popperInstance)==null||S.update()}showObjectToolbar(t){var l,c,d;if(!this.hoveringBlock||this.mouseDown)return;const e=this.hoveringBlock,r=this.hoveringTextChild,{commands:i,element:o}=HP(this.editor,e,r);if(!i.length||!o){this.toolbar.close("fromHover");return}this.toolbarType="object",this.toolbar.isVisible&&((c=(l=this.toolbar)==null?void 0:l.tippyInstance)==null?void 0:c.reference)!==o&&this.toolbar.close("fromHover");const s=()=>{let h;const C=o.getClientRects(),E=[];if(Array.from(C).forEach(A=>{const{y:v}=A;E.includes(v)||E.push(v)}),E.length>1){if(h=r?C[C.length-1]:C[0],t)for(let A=0;A<C.length;A++){const v=C[A],R=new DOMRect(v.x-4,v.y-4,v.width+8,v.height+8);if(R.x<t.clientX&&t.clientX<R.right&&R.y<t.clientY&&t.clientY<R.bottom){h=v;break}}}else{if(h=o.getBoundingClientRect(),r){const A=r.getBoundingClientRect();return new DOMRect(A.x,A.y,A.width,A.height)}return new DOMRect(C[0].x,C[0].y,C[0].width,C[0].height)}if(t){const A=h.y,v=t.clientX;return new DOMRect(v,A,10,h.height)}return h};this.toolbar.updateItems(i),this.toolbar.isVisible||(this.toolbar.manualShow(o,{placement:r?"bottom":"top",getReferenceClientRect:s}),(d=this.toolbar.tippyInstance)!=null&&d.popper&&(this.toolbar.tippyInstance.popper.style.paddingTop="10px",this.toolbar.tippyInstance.popper.style.paddingBottom="5px"))}static register(t){return t.addCustom("toolbar-handler",e=>new bu(e))}static get(t){return t.getCustom("toolbar-handler")}}function rg(n,t,e){n.getBlockData(t).heading===e?n.updateBlockData(t,{heading:null}):n.updateBlockData(t,{heading:e})}function Kk(n,t,e){["left","center","right"].includes(e)?n.updateBlockData(t,{align:e}):n.updateBlockData(t,{align:null})}function nA(n,t){const r=n.getBlockData(t).quoted;n.updateBlockData(t,{quoted:r?void 0:!0})}function rA(n,t){return!!(n[t]||n.level&&(n.ordered===!0&&!n.checkbox&&t==="ordered-list"||n.ordered===!1&&!n.checkbox&&t==="unordered-list")||t==="check-list"&&n.checkbox)}function iA(n,t,e){if(!n.selection.range.focus.isSimple())return;const i=n.getBlockData(t);let o;switch(e){case"unordered-list":o=rA(i,"unordered-list")?void 0:"unordered";break;case"ordered-list":o=rA(i,"ordered-list")?void 0:"ordered";break;case"check-list":o=rA(i,"check-list")?void 0:"unchecked";break}if(o){const s=k0(n,t,"list",{offset:0,data:{listType:o}});s&&n.undoManager.runInGroup(()=>{const l=Rt(t),c=at(t);n.deleteBlock(t);const d=n.insertBlock(Et(c),l,s.blockData);s.onConverted&&s.onConverted(n,d)})}else xu(n,t)}const BK=Object.freeze(Object.defineProperty({__proto__:null,applyHeadingStyle:rg,applyAlignStyle:Kk,applyQuoteStyle:nA,applyList:iA},Symbol.toStringTag,{value:"Module"})),yK=[bm,vm,Bm,ym,Tm,km,Rm,wm],TK={Unordered:fE,Ordered:dE,Checkbox:cE,Quote:uE};function Vk(n,t){const e=n;e.blockOptions=t,e.itemType="insert-block",n.children&&n.children.forEach(r=>Vk(r,t))}function kK(){return{name:"basic",insertBlockCommandItems:[{id:"text",icon:iu,name:_.t("commands.text"),order:0,group:"basics",value:"text"}]}}function oA(n=1){var i;const t={name:"basic",insertBlockCommandItems:[]};let e=Wm();e<=4?e=5:e<8&&(e+=1);let r=n;for(;r<=e;){const o=`heading-${r}`;(i=t.insertBlockCommandItems)==null||i.push({id:o,icon:yK[r-1],name:_.t("quickMenu.basic.heading.title",{heading:String(r)}),order:r,group:"basics",value:String(r),subText:tr(o)}),r++}return t}function RK(){const n={name:"basic",insertBlockCommandItems:[]};return["Unordered","Ordered","Checkbox","Quote"].forEach((e,r)=>{var o;const i=`insert-${e.toLocaleLowerCase()}`;(o=n.insertBlockCommandItems)==null||o.push({id:i,name:_.t(`quickMenu.basic.${e.toLocaleLowerCase()}`),icon:TK[e],value:e.toLocaleLowerCase(),group:"basics",order:10+r,subText:tr(i)})}),n}class $k{constructor(t){this.withPlainText=t}getCommands(){const t=kK(),e=oA(),r=RK();return[...this.withPlainText?t.insertBlockCommandItems||[]:[],...e.insertBlockCommandItems||[],...r.insertBlockCommandItems||[]]}updateBlock(t,e,r,i){const{value:o,id:s}=i;return s.startsWith("heading-")?rg(t,r,Number.parseInt(o!=null?o:"1",10)||1):o==="ordered"||o==="unordered"||o==="checkbox"?iA(t,r,{ordered:"ordered-list",unordered:"unordered-list",checkbox:"check-list"}[o]):o==="quote"&&nA(t,r),null}async handleUpdateBlockCore(t,e){const r=t.getBlockByIndex(e.containerId,e.blockIndex);return this.updateBlock(t,e.containerId,r,e.item)}async handleInsertEmptyBlockCore(t,e){const{containerId:r,blockIndex:i}=e,o=t.insertTextBlock(void 0,r,i);return this.updateBlock(t,e.containerId,o,e.item)}async executeCommand(t,e,r){if(r.from==="quick-menu"||r.from==="add-block-menu"){const i=t.getBlockById(r.blockId),o=t.getParentContainer(i),s=Et(o),l=t.getBlockIndex(i);t.undoManager.runInGroup(()=>this.handleUpdateBlockCore(t,{item:e,containerId:s,blockIndex:l})),t.focus()}else r.from==="block-menu"&&(t.undoManager.runInGroup(()=>this.handleInsertEmptyBlockCore(t,{item:e,containerId:r.containerId,blockIndex:r.blockIndex})),t.focus());return null}}const Hk={basics:100,system:200,common:300,thirdParty:400};class sA{constructor(){m(this,"dataUrl","");m(this,"texWidth",null);m(this,"error",null)}destroy(){}setDataUrl(t){this.error=null,this.dataUrl=t}setError(t){this.dataUrl="",this.error=t}setTexWidth(t,e){this.texWidth=[t,e]}}const wK=D("mathjax-converter"),SK="MathJax-script",LK=30,jk=8;async function IK(n){var r;window.MathJax||(window.MathJax={options:{skipHtmlTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml","body"]}});const t=n.getComponentOptions("mathjax"),e=((r=t==null?void 0:t.cdn)==null?void 0:r.mathjax)||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";await ra(e,SK)}function DK(){try{window.MathJax&&window.MathJax.texReset()}catch{}}async function ig(n,t){const e="mathjax2Svg";try{await No.lock(e),DK(),await IK(n);const r=await window.MathJax.tex2svgPromise(t),i=r.querySelector("merror");if(i)throw new Error(i.textContent);return r.querySelector("svg").outerHTML}catch(r){throw wK.error(r),r}finally{No.release(e)}}function zk(n){const t=new DOMParser().parseFromString(n,"image/svg+xml"),e={width:0,height:0};if(t&&t.firstChild){const r=t.firstChild,i=r.getAttribute("height"),o=r.style.minWidth;i&&(e.width=parseInt(o,10)*jk+LK,e.height=parseInt(i,10)*jk)}return e}async function Gk(n,t){const e=await ig(n,t);return e?await qp(e,"image/svg+xml"):""}async function Wk(n,t){const r=await ig(n,t),i=new File([r],"math.svg");return(await n.doc.uploadResource(i)).resourceId}async function _K(n,t){const e=await ig(n,t),r=zk(e),i=e,o=new File([i],"math.svg");return{resourceId:(await n.doc.uploadResource(o)).resourceId,...r}}const qk=D("edit-mathjax");class MK{constructor(){m(this,"editMathjaxPopup",null);m(this,"onChange",null);m(this,"tex","");m(this,"observer",null);m(this,"handleClose",t=>{var r;const e=t.content.querySelector("textarea");if(e){const i=e.value;i!==this.tex&&((r=this.onChange)==null||r.call(this,i,!0))}});m(this,"handleKeyup",t=>{var e;t.isComposing||(t.key==="Escape"&&((e=this.editMathjaxPopup)==null||e.close("cancelBar")),this.handleChange(t.target.value))});m(this,"handleChange",Pe.default(t=>{var e;(e=this.onChange)==null||e.call(this,t,!1)},300))}editMathjax(t,e,r,i){if(!this.editMathjaxPopup)this.editMathjaxPopup=new su(this.createPopupContent(e),{id:"mathjax-popover"});else{const o=this.getTextarea();o.value=e}this.tex=e,this.editMathjaxPopup.manualShow(t,{theme:"light",placement:i==null?void 0:i.placement}),this.editMathjaxPopup.removeAllListeners("close"),this.editMathjaxPopup.addListener("close",this.handleClose),this.onChange=r}createPopupContent(t){const e=B("textarea",["mathjax-editor-textarea"],null);return e.value=t,e.addEventListener("keyup",this.handleKeyup),this.textareaWatcher(e),e}textareaWatcher(t){const e=t;e.onblur=()=>{var i;(i=this.editMathjaxPopup)!=null&&i.isVisible&&t.focus()};const r=()=>{setTimeout(()=>{t.focus()})};this.observer=new IntersectionObserver(r,{}),this.observer.observe(t)}getTextarea(){p(qk,this.editMathjaxPopup,"no exists mathjax editor popup");const t=this.editMathjaxPopup.content.querySelector("textarea");return p(qk,t,"no textarea"),t}destroy(){var t,e;this.onChange=null,(t=this.observer)==null||t.disconnect(),(e=this.editMathjaxPopup)==null||e.removeAllListeners()}}function Xk(n,t,e,r,i){n.addCustom("mathjax-editor",()=>new MK).editMathjax(t,e.trim(),r,i)}function Yk(){return{insert:" ",attributes:{id:it(),box:!0,type:"math",tex:" ",src:"",created:Date.now()}}}function og(n,t){const e=n.getBoxData(t),r=et(t);if(!r)return;const i=ga(r,t);n.selection.selectBlock(r,i.start,i.end);const o=async(s,l)=>{if(!s.trim()){n.updateBoxData({...e,tex:s,src:null});return}try{await No.lock("convertAndUploadMathjax");const c=await Wk(n,s);n.updateBoxData({...e,tex:s,src:c})}catch(c){const d=n.getBoxData(t);n.addCustom(`mathjax-box-${d.id}`,()=>new sA).setError(c),n.updateBoxData({...e,tex:s,src:""})}finally{No.release("convertAndUploadMathjax"),l&&n.focus()}};Xk(n,t,e.tex,o)}const Qk=D("mathjax-box");function lA(n,t){n.selection.updateSelection(null);const e=t.target;!e||!(e instanceof HTMLElement)||n.domEvents.removeEventListener(e,null,lA)}async function UK(n,t,e){try{if(!t.tex.trim())return;const r=await Gk(n,t.tex),i=n.findBoxById(t.id);if(!i)return;const o=f1(i);o.innerHTML="";const s=B("img",["mathjax"],o);s.src=r,e.setDataUrl(r),n.domEvents.addEventListener(s,"load",lA)}catch(r){e.setError(r);const i=n.findBoxById(t.id);if(!i)return;const o=i.querySelector(".mathjax-tex-text");q(o,"mathjax-error"),o.innerText=r.message,n.selection.updateSelection(null)}}function OK(n,t,e,r){const i=r,o=n.addCustom(`mathjax-box-${i.id}`,()=>new sA);if(i.src||o.dataUrl){const c=B("img",["mathjax"],e);c.src=n.doc.buildResourceUrl(i.src||o.dataUrl,{syncNewResources:async(C,E)=>{var v,R;await n.doc.addResources([C]);const A=(R=(v=n.doc).getServerMeta)==null?void 0:R.call(v).appId;if(i.src&&i.src!==E&&A&&i.src.includes(A)){const S=et(e),M=xt.default(i);S&&n.isBlockWritable(S)&&!n.readonly&&(M.src=C,n.updateBoxData(M))}}});const[d,h]=o.texWidth||[];d===i.tex&&h?c.style.width=`${h}px`:ig(n,i.tex).then(C=>{const{width:E}=zk(C);o.setTexWidth(i.tex,E);const A=n.findBoxById(i.id),v=A==null?void 0:A.querySelector("img");v&&(v.style.width=`${E}px`)}),n.domEvents.addEventListener(c,"load",lA);return}const s=["mathjax-tex-text"];let l=i.tex;l.trim()?o.error&&(l=o.error.message,s.push("mathjax-error")):l=_.t("mathjax.emptyText"),B("span",s,e,l),UK(n,i,o)}function NK(n,t){const e={id:it(),box:!0,type:"math",tex:t,src:"",created:Date.now()};return Wk(n,t).then(r=>{if(!n.findBoxById(e.id))return;const o={...e,src:r};n.updateBoxData(o)}).catch(r=>{Qk.error(`failed to convert and upload mathjax: ${JSON.stringify(r)}`)}),e}function PK(n,t,e,r){const i=t;return r==="text"?i.tex:r==="markdown"?` $${i.tex}$ `:i.src?`<img src="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" />`:`<code>$${i.tex}$</code>`}function FK(n,t,e){const r=et(t);p(Qk,r,"failed to get block"),!(n.readonly||!n.isBlockWritable(r))&&og(n,t)}function KK(){return{abstract:`[${_.t("mathjax.abstract")}]`}}const Jk={boxType:"math",updateBoxContent:OK,convertFrom:NK,convertTo:PK,handleClickBox:FK,getBoxProperties:KK};async function VK(n,t,e){try{const r=t.embedData,i=await Gk(n,r.mathjaxText),o=n.findBlockById(t.id);if(!o)return;const s=zt(o);s.innerHTML="";const l=B("img",["mathjax"],s);l.src=i,e.setDataUrl(i)}catch(r){e.setError(r)}}function $K(n,t){if(n.readonly||!t.target||!(t.target instanceof Node))return;const e=et(t.target);if(!e||!Le(e)||ln(e)!=="math")return;const r=zt(e),i=r.querySelector("img")||r.querySelector("span.mathjax-tex-text");if(!i||!Ae(i,t.target))return;const s=n.getBlockData(e).embedData;Xk(n,i,s.mathjaxText,async l=>{const{resourceId:c,width:d,height:h}=await _K(n,l),C={mathjaxText:l,src:c,width:d,height:h};n.updateEmbedData(e,C)},{placement:"bottom"})}function HK(n,t,e){const r=e.embedData,{src:i,width:o}=r,s=n.addCustom(`mathjax-block-${e.id}`,()=>new sA);if(n.domEvents.addEventListener(t,"click",$K),!r.mathjaxText.trim()){B("span",["mathjax-tex-text"],t,_.t("mathjax.emptyText"));return}if(i||s.dataUrl){const l=B("img",["mathjax"],t);l.src=n.doc.buildResourceUrl(i||s.dataUrl,{syncNewResources:async(c,d)=>{var h,C;if(i){await n.doc.addResources([c]);const E=(C=(h=n.doc).getServerMeta)==null?void 0:C.call(h).appId;if(i&&d!==i&&E&&i.includes(E)){const A=et(t);setTimeout(()=>{if(A&&!n.readonly&&n.isBlockWritable(A)){const v=xt.default(e);v.embedData.src=c,n.updateBlockData(A,v)}})}}}}),o&&(l.style.minWidth=`${o}px`,setTimeout(()=>{const c=t.getBoundingClientRect().width;o>c?(q(t,"mathjax-overflow"),t.style.overflow="auto",t.style.setProperty("--mathjax-width",`${o}px`)):(ut(t,"mathjax-overflow"),t.removeAttribute("data-mathjax-width"),t.style.removeProperty("--mathjax-width"))}));return}s.error,B("span",["mathjax-tex-text"],t,r.mathjaxText),VK(n,e,s)}function jK(n,t,e){if(!st(n,t))return null;const r=n.getBlockString(t).trim();if(!r||!r.startsWith("$$")||!r.endsWith("$$"))return null;const i=Hp(r,"$");if(!i)return null;const o={mathjaxText:i,src:""};return{blockData:{id:it(),type:"embed",embedType:"math",embedData:o}}}function zK(n){return{name:"Mathjax"}}function GK(n,t){var r;const e=zt(t);n.domEvents.removeAllListeners(e),n.findCustom("mathjax-editor")&&((r=n.getCustom("mathjax-editor").editMathjaxPopup)==null||r.close("cancelBar"))}function WK(n,t,e,r){const i=t.embedData;return r==="html"?`<img src="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" />`:r==="markdown"?`
616
+ `,ZO=Object.freeze(Object.defineProperty({__proto__:null,WarningFilledIcon:x2,ClearIcon:i2,CloseIcon:gd,PrevIcon:xT,NextIcon:bT,MoreIcon:tE,TextColorIcon:eE,ArrowDownIcon:xm,ArrowUpIcon:OO,ArrowLeftIcon:NO,ArrowRightIcon:nE,DeleteRowIcon:vT,DeleteColIcon:BT,MergeCellIcon:yT,SplitCellIcon:TT,DeleteTableIcon:kT,Heading1Icon:bm,Heading2Icon:vm,Heading3Icon:Bm,Heading4Icon:ym,Heading5Icon:Tm,Heading6Icon:km,Heading7Icon:Rm,Heading8Icon:wm,HeadingNIcon:PO,OrderedListIcon:RT,UnorderedListIcon:wT,CheckListIcon:ST,BlockquoteIcon:LT,AlignCenterIcon:Lm,AlignLeftIcon:ru,AlignRightIcon:Sm,ImageIcon:IT,ImageMenuIcon:DT,ImageErrorIcon:iE,ImageEmptyIcon:MT,LinkIcon:aE,LinkOffIcon:UT,WarningIcon:rE,PasteSpecialIcon:_T,LaunchIcon:oE,CodeIcon:XT,AudioIcon:zT,GraphIcon:FO,VideoIcon:GT,FileIcon:KO,MathIcon:$O,MathMenuIcon:OT,TableIcon:HO,TableMenuIcon:NT,BilibiliIcon:FT,YoukuIcon:KT,ModaoIcon:$T,FigmaIcon:VT,EditIcon:Im,CommentIcon:Ba,RefreshIcon:PT,HelpIcon:sE,CheckMarkIcon:lE,TextIcon:iu,RightArrowIcon:VO,TencentVideoIcon:HT,WebPageIcon:jT,UmlIcon:WT,DividingLineIcon:qT,HeadingH1Icon:jO,HeadingH2Icon:zO,HeadingH3Icon:GO,HeadingH4Icon:WO,HeadingH5Icon:qO,HeadingH6Icon:XO,HeadingH7Icon:YO,HeadingH8Icon:QO,CheckboxIcon:cE,QuoteIcon:uE,LinkHrefIcon:JO,OrderedIcon:dE,UnorderedIcon:fE,CopyIcon:YT,CutIcon:QT,DeleteIcon:JT,LockBlockIcon:ZT,UnLockBlockIcon:t2,InsertBeforeIcon:e2,InsertAfterIcon:n2,MentionIcon:r2,CircleAddIcon:o2,LoadingIcon:s2,DragIcon:hE,UmlBrandIcon:Dm,OnesLoadingIcon:l2,BoldIcon:a2,ItalicIcon:c2,UnderlineIcon:u2,LineThroughIcon:f2,SubscriptIcon:h2,SuperscriptIcon:m2,InlineCodeIcon:d2,ToMindMapIcon:g2,FitIcon:p2,FullScreenIcon:mE,ExitFullScreenIcon:C2,CaretDownIcon:E2,StatusIcon:A2},Symbol.toStringTag,{value:"Module"}));function b2(){const n=B("span",["editor-loading-icon"],null);return n.innerHTML=l2,n}const aat="";function tN(n,t){const e=B("button",["editor-checkbox-wrapper"],null);e.setAttribute("data-button-id",n),t!=null&&t.includes("checked")&&q(e,"checked"),t!=null&&t.includes("disabled")&&(e.disabled=!0);const r=B("span",["editor-checkbox"],e);return B("span",["editor-checkbox-inner"],r),e}const cat="",ou=D("ui-command-bar-base"),eN={itemElementTag:"div",tippyArrow:!1},Ux=class extends je.TypedEmitter{constructor(e,r,i){var o,s;super();m(this,"content");m(this,"items");m(this,"subBar",null);m(this,"parentItem",null);m(this,"closeable",null);m(this,"closeReason",null);m(this,"options");m(this,"id");m(this,"header",null);m(this,"footer",null);m(this,"handleDocumentKeydown",e=>{var r,i;if(!this.isVisible||e.isComposing||Oc(e.target))return!0;if(this.subBar)return this.subBar.handleDocumentKeydown(e);if(this.items.length===0)return!0;if(e.key==="Escape")return(i=(r=this.options).beforeClose)!=null&&i.call(r)||this.close("cancelBar"),!0;if(e.key==="ArrowUp"){const o=this.getPrevItemIndex(this.getSelectedItemIndex());this.startPauseMouseEnter(),this.selectItem(this.items[o].id),e.preventDefault(),e.stopPropagation()}else if(e.key==="ArrowDown"){const o=this.getNextItemIndex(this.getSelectedItemIndex());this.startPauseMouseEnter(),this.selectItem(this.items[o].id),e.preventDefault(),e.stopPropagation()}else if(e.key==="ArrowRight"){const o=this.getSelectedItem();o&&o.children&&this.showSubCommandBar(o.childrenMenuId)}else if(e.key==="ArrowLeft")this.parentItem&&this.close("switchItem");else if(e.key==="Enter"){const o=this.getSelectedItemIndex();if(o===-1)return!1;const s=this.items[o],l=this.getItemElementById(s.id);l&&this.emit("click",this,s,l)}return!0});m(this,"handleDocumentMouseDown",e=>{var r,i;if(e.target instanceof Element){if((i=(r=this.options).beforeClose)!=null&&i.call(r,e))return;if(!this.isInCommandBar(e.target)){const o=this.listeners("closing");for(let s=0;s<o.length;s++)if(o[s](this,e)===!1)return;this.close("clickBackground")}}});m(this,"handleHidden",()=>{this.closeReason!=="fromHover"&&this.emit("close",this),this.close(null),Yp(this.id)});m(this,"handleShow",()=>{this.popper&&(this.popper.setAttribute("data-command-bar-id",this.id),this.options.classes&&q(this.popper,...this.options.classes),this.options.refuseOverflow&&this.popper.classList.add("reference-hidden")),this.emit("show",this),this.options.disablePageScroll&&Xp(this.id)});m(this,"lastEnterPauseTime",0);m(this,"startPauseMouseEnter",()=>{this.lastEnterPauseTime=Date.now()});m(this,"handleItemMouseEnter",e=>{if(Date.now()-this.lastEnterPauseTime<100)return;const r=this.getParentCommandItemElement(e.target);if(!r)return;const i=this.getItemElementId(r),o=this.getItemById(i);if(o.states&&o.states.indexOf("disabled")!==-1||(this.selectItem(i),o.manualShowChildren))return;const s=o.childrenMenuId||"";this.showSubCommandBar(s)});m(this,"handleItemMouseLeave",e=>{var i,o;const r=this.getParentCommandItemElement(e.target);!r||((o=(i=this.subBar)==null?void 0:i.parentItem)==null?void 0:o.id)!==this.getItemElementId(r)&&(ut(r,"selected"),this.emit("selectionChange",this,""))});m(this,"handleItemClick",e=>{var s,l;const r=this.getParentCommandItemElement(e.target);if(!r)return;const i=this.getItemElementId(r),o=this.items.find(c=>c.id===i);if(!!o&&!(o.states&&o.states.indexOf("disabled")!==-1)){if(o.children&&o.children.length>0&&o.manualShowChildren){this.showSubCommandBar(o.childrenMenuId);return}if(!o.element&&(this.emit("click",this,o,r),this.options.autoClose)){if((l=(s=this.options).beforeClose)!=null&&l.call(s,e))return;this.close("clickItem")}}});m(this,"handleWheel",e=>{if(!this.options.disablePageScroll&&!document.querySelector(".editor-disable-scroll"))return;const r=e.target;if(!r||!(r instanceof Node))return;const i=r instanceof HTMLElement?r:r.parentElement;if(!i)return;const o=pn(i);if(!Ae(this.content,o)){e.stopPropagation(),e.preventDefault();return}e.deltaY<0?o.scrollTop===0&&(e.stopPropagation(),e.preventDefault()):e.deltaY>0&&o.scrollTop+o.clientHeight>=o.scrollHeight&&(e.stopPropagation(),e.preventDefault())});this.id=(o=i==null?void 0:i.id)!=null?o:it(),this.options={...eN,...i},this.items=e,this.parentItem=(s=i==null?void 0:i.parentItem)!=null?s:null,this.closeable=r!=null?r:null,this.content=this.createCommandBarContent(e)}close(e){this.closeReason=e,this.subBar&&this.subBar.close(e),document.removeEventListener("keydown",this.handleDocumentKeydown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}click(e,r){this.emit("click",this,e,r)}createPopperOptions(){var i,o;const e={modifiers:[]},r=this.options.overflowBoundary;return r&&((i=e==null?void 0:e.modifiers)==null||i.push({name:"flip",options:{boundary:r,fallbackPlacements:["top","bottom"]}})),this.options.padding&&((o=e==null?void 0:e.modifiers)==null||o.push({name:"preventOverflow",options:{padding:this.options.padding}})),e}destroy(){var e;this.close(null),this.removeAllListeners(),(e=this.subBar)==null||e.destroy(),this.subBar=null,this.closeable=null,this.content.removeEventListener("wheel",this.handleWheel)}get isSubCommandBar(){return!!this.parentItem}updateItems(e){var i;this.subBar&&e.findIndex(s=>{var l,c;return s.id===((c=(l=this.subBar)==null?void 0:l.parentItem)==null?void 0:c.id)})===-1&&((i=this.subBar)==null||i.destroy(),this.subBar=null),this.items=e;const r=this.createCommandBarContent(e);this.content.innerHTML="",Array.from(r.children).forEach(o=>{this.content.appendChild(o)})}get popper(){return this.content.closest("[data-tippy-root]")}getSelectedItemIndex(){const e=this.getSelectedItem();return e?this.items.indexOf(e):-1}getPrevItemIndex(e){if(e<=0)return this.items.length-1;let r=e-1;for(;;){const i=this.items[r],o=i.type,l=!(i.states&&i.states.indexOf("disabled")!==-1);if(o!=="separator"&&o!=="section"&&l)return r;if(r-=1,r<0)return this.items.length-1}}getNextItemIndex(e){let r=e+1;for(;;){if(!this.items[r])return this.getNextItemIndex(-1);const i=this.items[r],o=i.type,l=!(i.states&&i.states.indexOf("disabled")!==-1);if(o!=="separator"&&o!=="section"&&l)return r;if(r+=1,r>this.items.length-1)return 0}}clearSelectedItem(){const e=this.getSelectedItem();if(!e)return;const r=this.getItemElementById(e.id);r&&ut(r,"selected")}selectItem(e,r="event"){const i=this.getSelectedItem();if(i){if(i.id===e)return;const s=i.id,l=this.getItemElementById(s);l&&ut(l,"selected")}const o=this.getItemElementById(e);o?(q(o,"selected"),this.emit("selectionChange",this,o.getAttribute("data-id")||""),!this.options.disableSelectedScroll&&r==="event"&&o.scrollIntoView({block:"nearest"})):this.emit("selectionChange",this,"")}showSubCommandBar(e){var s,l,c,d;const r=this.getSelectedItem();if(!r||!r.children&&((l=(s=this.subBar)==null?void 0:s.parentItem)==null?void 0:l.manualShowChildren))return;if(this.subBar){if(((c=this.subBar.parentItem)==null?void 0:c.id)===r.id){r.manualShowChildren&&this.subBar.close("switchItem");return}this.subBar.destroy(),this.subBar=null}if(!r.children)return;const i=this.getItemElementById(r.id);if(!i)return;const o=Ux.createSubCommandBar(r,(d=this.closeable)!=null?d:this,e?{id:e}:{});this.subBar=o,this.subBar.on("click",(h,C,E)=>{this.emit("click",h,C,E)}),this.subBar.on("close",()=>{var h;(h=this.subBar)==null||h.destroy(),this.subBar=null,ut(i,"active")}),r.beforePopup&&r.beforePopup(o),this.subBar.manualShow(i,this.getSubBarOptions(r)),q(i,"active")}isInCommandBar(e){if(!e||!(e instanceof Node))return!1;const r=this.getCommandBarRoot();return r&&Ae(r,e)||Ae(this.content,e)?!0:this.subBar?this.subBar.isInCommandBar(e):!1}createCommandItem(e){var o,s,l,c;let r=(o=this.options.itemElementTag)!=null?o:"div";e.element&&(r="div");const i=B(r,["command-item"],null);return i.setAttribute("data-id",e.id),e.type==="separator"?i.classList.add("separator"):e.type==="section"?(i.classList.add("section","text"),e.element&&(typeof e.element=="function"?i.appendChild(e.element(e)):i.appendChild(e.element))):((s=e.states)!=null&&s.includes("selected")&&i.classList.add("selected"),(l=e.states)!=null&&l.includes("checked")&&i.classList.add("checked"),(c=e.states)!=null&&c.includes("disabled")&&i.classList.add("disabled"),i.onclick=this.handleItemClick,i.onmouseenter=this.handleItemMouseEnter,i.onmouseleave=this.handleItemMouseLeave,e.element?typeof e.element=="function"?i.appendChild(e.element(e)):i.appendChild(e.element):i.classList.add("standard")),this.initItemElement(e,i),i}getItemById(e){const r=this.items.find(i=>i.id===e);return p(ou,r,`can not find command item for id: ${e}`),r}getSelectedItem(){const e=this.content.querySelector(":scope >.editor-command-bar >.command-item.selected");if(e){const r=this.getItemElementId(e),i=this.items.find(o=>o.id===r);return p(ou,i,`can not find command item for id: ${r}`),i}return null}getItemElementId(e){const r=e.getAttribute("data-id");return p(ou,r,"no data-id attribute"),r}getItemElementById(e){const r=this.content.querySelector(`:scope >.editor-command-bar > .command-item[data-id="${e}"]`);return p(ou,r,`no exists command item, id=${e}`),r}getParentCommandItemElement(e){if(!e||!(e instanceof Element))return null;if(Mt(e,"command-item"))return e;const r=e.closest(".command-item");return r||null}createCommandBarContent(e){this.content&&this.content.removeEventListener("wheel",this.handleWheel);const r=B("div",["editor-command-bar-root"],null);if(this.options.header){const o=B("div",["editor-command-bar-header"],null);if(this.options.header instanceof Function){const s=this.options.header();s&&o.appendChild(s)}else o.appendChild(this.options.header);this.header=o,this.header&&r.appendChild(this.header)}const i=B("div",["editor-command-bar"],r);if(e.forEach(o=>{var l;const s=this.createCommandItem(o);i.appendChild(s),o.element&&o.setCloseable&&o.setCloseable((l=this.closeable)!=null?l:this)}),this.options.footer){const o=B("div",["menu-item","editor-command-bar","footer"],null);if(this.options.footer instanceof Function){const s=this.options.footer();s&&o.appendChild(s)}else o.appendChild(this.options.footer);this.footer=o,this.footer&&r.appendChild(this.footer)}return(this.options.header||this.options.footer)&&q(r,"scrollable-bar"),this.initCommandBarElement(i),r.addEventListener("wheel",this.handleWheel,{passive:!1}),r}getSubBarOptions(e){var r;return{placement:(r=e.childrenPlacement)!=null?r:"right-start",offset:e.childrenOffset,arrow:e.childArrow}}static registerManualCommandBar(e,r){this.commandBarCreators.set(e,r)}static createSubCommandBar(e,r,i){var l;p(ou,e.children&&e.children.length>0,"no item children");const o=(l=e.childrenType)!=null?l:"menu",s=this.commandBarCreators.get(o);return p(ou,s,`no creator for command type: ${o}`),s(e,r,i)}static hasExistsCommandBar(){return!!document.querySelector("[data-command-bar-id]")}};let ya=Ux;m(ya,"commandBarCreators",new Map),D("ui-command-bar");class _m extends ya{constructor(){super(...arguments);m(this,"tippyInstance",null)}manualShow(e,r){var i,o,s;if(!this.isVisible){if(this.tippyInstance&&(this.tippyInstance.destroy(),this.tippyInstance=null),this.tippyInstance=b9.default(e,{interactive:!0,content:this.content,trigger:"manual",triggerTarget:null,hideOnClick:!1,placement:(i=r==null?void 0:r.placement)!=null?i:"bottom-start",maxWidth:650,arrow:(o=r==null?void 0:r.arrow)!=null?o:this.options.tippyArrow,appendTo:document.body,onShow:this.handleShow,onHidden:this.handleHidden,theme:r==null?void 0:r.theme,getReferenceClientRect:r==null?void 0:r.getReferenceClientRect,offset:(s=r==null?void 0:r.offset)!=null?s:[0,0],popperOptions:this.createPopperOptions()}),r!=null&&r.point){const{x:l,y:c}=r.point;this.tippyInstance.setProps({getReferenceClientRect:()=>new DOMRect(l,c,0,0)})}this.clearSelectedItem(),this.tippyInstance.show(),this.parentItem||(document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("mousedown",this.handleDocumentMouseDown)),this.popper&&this.options.id&&this.popper.setAttribute("data-command-bar-id",this.options.id)}}close(e){var r;super.close(e),this.isVisible&&((r=this.tippyInstance)==null||r.hide())}destroy(){var e;(e=this.tippyInstance)==null||e.destroy(),this.tippyInstance=null,super.destroy()}getCommandBarRoot(){return this.content.closest("[data-tippy-root]")}get isVisible(){var e,r;return(r=(e=this.tippyInstance)==null?void 0:e.state.isVisible)!=null?r:!1}get popper(){return this.content.closest("[data-tippy-root]")}}const v2=D("ui-base");class su extends _m{constructor(t,e){var o;const r=(o=e==null?void 0:e.id)!=null?o:`popup-${it()}`,i=[{id:r,name:"",element:t}];super(i,void 0,{disablePageScroll:!0,id:r,beforeClose:e==null?void 0:e.beforeClose})}initCommandBarElement(t){q(t,"popper")}initItemElement(t,e){}get popupContent(){const t=this.items[0];p(v2,t,"no dialog item");const e=typeof t.element=="function"?t.element(t):t.element;return p(v2,e,"no item element"),e}}const rs=D("filterable-list");function B2(n){var e,r;const t=B("div",["list-item"],null);return t.setAttribute("data-id",n.id),t.appendChild(B("div",["list-item-text"],null,n.name)),(e=n.states)!=null&&e.includes("selected")&&(q(t,"selected"),ea(lE,["list-item-selected-icon"],t)),(r=n.states)!=null&&r.includes("disabled")&&q(t,"disabled"),t}function y2(n){const t=B("div",["list-root"],null);return n.forEach(e=>{t.appendChild(B2(e))}),n.length||t.appendChild(B2({id:"placeholder",states:["disabled"],name:_.t("search.emptyTips")})),t}function T2(n,t){return n.map(e=>({...e,states:t===e.id?["selected"]:[]}))}function nN(n,t){const e=B("div",["filterable-list"],null),r=B("div",["filter"],e),i=B("div",["filter-container"],r),o=B("input",["filter-input"],i);t&&t.placeholder&&(o.placeholder=t.placeholder);const s=B("div",["list"],e),l=y2(T2(n,t==null?void 0:t.initialSelectedId));return s.appendChild(l),e}function k2(n,t,e){const r=n.querySelector(".list");p(rs,r,"no list root");const i=y2(T2(t,e)),o=r.querySelector(".list-root");if(p(rs,o,"no exists menu"),yf(o,i),e){const s=r.querySelector(".list-item.selected");s&&(p(rs,s,"no selected menu item"),s.scrollIntoView({block:"nearest"}))}}class rN{constructor(t,e){m(this,"root");m(this,"visibleItems");m(this,"selectedId");m(this,"filter","");m(this,"onSelected",null);m(this,"handleKeydown",t=>{this.processKeyDown(t)});m(this,"handleInputChanged",()=>{const t=this.root.querySelector(".filter-input");p(rs,t,"no input");const e=t.value.toLocaleLowerCase();this.setFilter(e)});m(this,"handleClick",t=>{this.processClick(t)});var r;this.items=t,this.options=e,this.root=nN(t,e),this.bindEvents(),this.selectedId=(r=e==null?void 0:e.initialSelectedId)!=null?r:"",this.visibleItems=t}bindEvents(){const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.addEventListener("keyup",this.handleInputChanged),t.addEventListener("keydown",this.handleKeydown),this.root.addEventListener("click",this.handleClick)}unbindEvents(){const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.removeEventListener("keyup",this.handleInputChanged),t.removeEventListener("keydown",this.handleKeydown),this.root.removeEventListener("click",this.handleClick)}destroy(){this.unbindEvents(),this.onSelected=null}getSelectedIndex(){return this.selectedId?this.visibleItems.findIndex(t=>t.id===this.selectedId):-1}setSelectedId(t){this.selectedId=t,k2(this.root,this.visibleItems,t)}focus(){const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.focus()}moveSelectedItemIntoView(){const t=this.root.querySelector(".list-item.selected");t&&(p(rs,t,"no selected menu item"),t.scrollIntoView({block:"nearest"}))}reset(){this.setFilter("");const t=this.root.querySelector(".filter-input");p(rs,t,"no input"),t.value=""}setFilter(t){this.filter!==t&&(this.filter=t,this.visibleItems=this.items.filter(e=>e.name.toLocaleLowerCase().includes(t)),k2(this.root,this.visibleItems,this.selectedId))}processClick(t){var s,l;const e=t.target;if(!(e instanceof HTMLElement))return;const r=e.closest(".list-item");if(!r)return;const i=(s=r.getAttribute("data-id"))!=null?s:"",o=(l=this.visibleItems.find(c=>c.id===i))!=null?l:null;this.onSelected&&this.onSelected(this,o)}processKeyDown(t){var e;if(t.key==="ArrowUp"){let r=this.getSelectedIndex();r===-1?r=this.visibleItems.length-1:r>0&&(r-=1);let i="";r!==-1&&(i=this.visibleItems[r].id),this.setSelectedId(i);return}if(t.key==="ArrowDown"){let r=this.getSelectedIndex();r===-1?r=0:r<this.visibleItems.length-1&&(r+=1);let i="";r!==-1&&(i=this.visibleItems[r].id),this.setSelectedId(i);return}if(t.key==="Enter"){const r=(e=this.visibleItems.find(i=>i.id===this.selectedId))!=null?e:null;this.onSelected&&this.onSelected(this,r)}}}class iN extends rN{constructor(e,r,i){super(e,i);m(this,"popup");m(this,"onShow",null);m(this,"onHide",null);m(this,"custom",null);m(this,"handleShow",()=>{this.onShow&&this.onShow(this)});m(this,"handleHide",()=>{this.onHide&&this.onHide(this)});m(this,"handleShown",()=>{this.focus()});this.popup=new su(this.root)}destroy(){super.destroy(),this.onShow=null,this.onHide=null}show(e){this.reset(),this.popup.manualShow(e,{theme:"dropdown-list"}),this.focus(),this.moveSelectedItemIntoView()}processKeyDown(e){super.processKeyDown(e),(e.key==="Esc"||e.key==="Enter")&&this.popup.close("cancelBar")}processClick(e){super.processClick(e);const r=e.target;!(r instanceof HTMLElement)||!r.closest(".list-item")||this.popup.close("clickItem")}}const uat="",fat="";function R2(n,t){var o;const e=document.createElement("div");e.classList.add("ones-editor-toast","show"),t!=null&&t.theme&&e.setAttribute("data-theme",t.theme),t!=null&&t.id&&e.setAttribute("data-id",t.id),t!=null&&t.html?e.innerHTML=n:e.textContent=n,t!=null&&t.position&&(e.style.left=`${t.position.x}px`,e.style.top=`${t.position.y}px`,e.classList.add("positioned"));const r=()=>{e.classList.remove("show"),setTimeout(()=>{e.remove()},500)};if(!((o=t==null?void 0:t.autoClose)!=null?o:!0)){const s=B("span",["close"],e);s.innerHTML=gd,s.onclick=r}return document.body.appendChild(e),t!=null&&t.autoClose&&setTimeout(()=>r(),(t==null?void 0:t.duration)||3e3),r}function oN(n,t){var e,r;if(q(t,"menu-item"),!n.element){if(n.type==="section"){const i=B("div",["section-name"],null,n.name);t.appendChild(i)}else if(n.type!=="separator"){if(n.icon){const o=B("div",["menu-item-icon"],null);n.icon&&(o.innerHTML=n.icon),t.appendChild(o)}const i=B("div",["menu-item-name","text"],null);if(B("span",[],i,n.name),n.ellipsisTooltip&&(t.setAttribute("data-editor-tooltip-allow-markdown","true"),t.setAttribute("data-editor-tooltip-offset-y","25"),t.setAttribute("data-editor-tooltip-placement","right"),t.setAttribute("data-editor-tooltip-common",`<div style="word-break: break-word;">${n.ellipsisTooltip}</div>`)),((e=n.states)==null?void 0:e.includes("disabled"))&&n.disableReason&&(t.setAttribute("data-editor-tooltip-placement","right"),t.setAttribute("data-editor-tooltip-common",n.disableReason)),t.appendChild(i),n.subText&&B("div",["item-subtext","text"],t,n.subText),n.children&&!n.element){const o=B("div",["menu-item-sub-indicator"],null);o.innerHTML=nE,t.appendChild(o)}if((r=n.states)!=null&&r.includes("checked")){const o=B("div",["menu-item-checked-icon"],null);o.innerHTML=lE,t.appendChild(o)}}}}class dl extends _m{constructor(t,e,r){super(t,e,{autoClose:!0,disablePageScroll:!0,beforeClose:r==null?void 0:r.beforeClose,...r})}manualShow(t,e){const r={theme:"menu",...e};super.manualShow(t,r)}initCommandBarElement(t){q(t,"menu")}initItemElement(t,e){oN(t,e)}}function sN(n,t,e){var r;return new dl((r=n.children)!=null?r:[],t,{...e,parentItem:n})}function w2(n,t,e){t.setAttribute("data-button-id",n.id),e.tooltipId&&n.name&&!n.disableTooltip&&(t.setAttribute(`data-editor-tooltip-${e.tooltipId}`,n.name),n.desc&&t.setAttribute(`data-editor-tooltip-desc-${e.tooltipId}`,n.desc));const r=t;if(!n.element)if(n.icon){const i=B("span",["toolbar-item-icon-container"],r);n.icon.trim().startsWith("<")?i.innerHTML=n.icon:i.innerText=n.icon}else{const i=B("span",["toolbar-item-name-container"],r);i.innerText=n.name}if(n.dropdown){t.setAttribute("data-dropdown","true");const i=B("span",["toolbar-item-dropdown-container"],r);i.innerHTML=xm}n.states&&(n.states.indexOf("checked")!==-1&&q(r,"checked"),n.states.indexOf("disabled")!==-1&&(r.disabled=!0))}class pd extends _m{constructor(t,e,r){super(t,e,{itemElementTag:"button",tippyArrow:!1,...r})}getSubBarOptions(t){var i,o;const e=()=>{const s=this.getItemElementById(t.id),c=this.content.getBoundingClientRect(),d=s.getBoundingClientRect();return new DOMRect(d.left,c.top,d.width,c.height)};return{placement:(i=t.childrenPlacement)!=null?i:"top",getReferenceClientRect:e,offset:(o=t.childrenOffset)!=null?o:[0,4]}}manualShow(t,e){const r={theme:"toolbar",...e};super.manualShow(t,r)}initCommandBarElement(t){q(t,"toolbar")}initItemElement(t,e){w2(t,e,this.options)}}function lN(n,t,e){var r;return new pd((r=n.children)!=null?r:[],t,{...e,parentItem:n})}class aN extends ya{constructor(t,e,r){super(e,void 0,r),t.appendChild(this.content),document.addEventListener("keydown",this.handleDocumentKeydown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}initCommandBarElement(t){q(t,"toolbar","fixed")}initItemElement(t,e){w2(t,e,this.options)}close(){this.clearSelectedItem(),this.subBar&&(this.subBar.close("cancelBar"),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 dat="";ya.registerManualCommandBar("menu",sN),ya.registerManualCommandBar("toolbar",lN);const hat="",S2=D("ui-base");class Cd extends _m{constructor(e,r){super(Cd.getCommandItems(e,r),void 0,{disablePageScroll:!0,...r});m(this,"handleDocumentMouseDown",e=>{})}initCommandBarElement(e){q(e,"dialog","manual")}initItemElement(e,r){}show(e,r){this.manualShow(e,{...r,theme:"light"})}get dialogContent(){const e=this.items[0];p(S2,e,"no dialog item");const r=e.element;return p(S2,r,"no item element"),r}static getCommandItems(e,r){var s;return[{id:(s=r==null?void 0:r.id)!=null?s:`manual-dialog-${it()}`,name:"",element:e}]}}const mat="",cN=D("ui-base");class L2{constructor(t){m(this,"menu");m(this,"currentText","");m(this,"handleSearchText");m(this,"handleClick",Pe.default((t,e)=>{this.options.onClickItem(this,e)},300,{leading:!0,trailing:!1}));m(this,"handleShow",t=>{});m(this,"handleClose",()=>{var t,e;(e=(t=this.options).onClose)==null||e.call(t)});m(this,"handleKeydown",t=>this.menu.handleDocumentKeydown(t));this.options=t,this.menu=new dl([],void 0,{id:t.id,header:t.header,footer:t.footer,disableSelectedScroll:t.disableSelectedScroll}),this.menu.addListener("click",this.handleClick),this.menu.addListener("close",this.handleClose),this.menu.addListener("show",this.handleShow),this.options.wait?this.handleSearchText=Pe.default(e=>{this.handleSearchTextPure(e)},this.options.wait):this.handleSearchText=this.handleSearchTextPure}setItems(t){if(this.menu.updateItems(t),t.length>0){const e=i=>i.states&&i.states.indexOf("disabled")!==-1?!1:i.type!=="section"&&i.type!=="separator",r=t.find(e);r&&this.menu.selectItem(r.id,"manual")}}async popup(t,e){var i,o;if(!(e!=null&&e.noEvent)&&((o=(i=this.options).onShow)==null?void 0:o.call(i,this))===!1)return;this.menu.manualShow(t),this.options.placeholder&&this.showPlaceholder();const r=await this.options.queryItems(this,"");this.highlightText("",r),this.setItems(r)}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(t){if(this.options.noResultMessage){const e={name:"",id:"placeholder",states:["disabled"]};typeof this.options.noResultMessage=="string"?e.name=this.options.noResultMessage:(this.options.noResultMessage instanceof HTMLElement||typeof this.options.noResultMessage=="function")&&(e.element=this.options.noResultMessage),this.setItems([e])}else this.setItems([{id:"placeholder",name:this.options.emptyPlaceholder||_.t("search.emptyTips"),states:["disabled"]}])}close(){this.menu.close("cancelBar")}get isVisible(){return this.menu.isVisible}destroy(){this.menu.close("cancelBar"),this.menu.removeAllListeners(),this.menu.destroy()}isInCommandBar(t){return this.menu.isInCommandBar(t)}async handleSearchTextPure(t){this.currentText=t;try{this.showLoading();const e=await this.options.queryItems(this,t);if(this.currentText!==t)return;if(e.length===0){this.showNoResultMessage(t);return}this.setItems(e),this.options.highlight&&this.highlightText(t.replace(/^\s+|\s+$/g,""),e)}finally{}}highlightText(t,e){cN.debug(`highlight menu text: ${t}`);const r=this.menu.content,i=(s,l)=>{if(!l)return s;let c="";const d=l.length,h=l.toLocaleLowerCase();let C=0;for(C=0;C<=s.length-d;C){let E=s.substring(C,C+d);if(E.toLocaleLowerCase()===h){C+=d;const A=s.charAt(C);let v=!1;E.endsWith(" ")&&(v=!0,E=E.trimEnd()),c+=`<span class="highlight">${E}${A===" "||v?"&nbsp":""}</span>`}else c+=s.charAt(C),C++}return C<s.length&&(c+=s.substring(C)),c},o=s=>{if(Mt(s,"text")){const l=e==null?void 0:e.find(h=>h.id===s.getAttribute("data-id"));if(l&&l.element)return;const c=s.textContent;if(!c)return;const d=i(c,t);s.innerHTML=d;return}Array.from(s.children).forEach(o)};o(r)}}class gE{constructor(t,e){m(this,"root");m(this,"input");m(this,"text");m(this,"dropdownIcon");m(this,"clearIcon");m(this,"autoSuggest");m(this,"labels");m(this,"items",[]);m(this,"handleClick",()=>{this.autoSuggest.popup(this.root),this.input.focus()});m(this,"handleClickItem",(t,e)=>{var r,i;(i=(r=this.options)==null?void 0:r.onClickItem)==null||i.call(r,e)});m(this,"handleInput",()=>{this.autoSuggest.handleSearchText(this.input.value),this.updatePlaceholder()});m(this,"handleClear",t=>{var e,r;this.clear(),this.autoSuggest.handleSearchText(""),t.preventDefault(),t.stopPropagation(),(r=(e=this.options)==null?void 0:e.onClear)==null||r.call(e)});m(this,"handleQueryItems",async(t,e)=>this.items.filter(i=>{var o;return(o=this.options)!=null&&o.filter?this.options.filter(i,e):!0}));m(this,"handleShow",()=>{q(this.root,"active"),this.input.focus()});m(this,"handleClose",()=>{var t,e;(e=(t=this.options)==null?void 0:t.onClose)==null||e.call(t),ut(this.root,"active")});var c,d,h,C,E;this.options=e,this.labels=(d=(c=this.options)==null?void 0:c.labels)!=null?d:[];const{root:r,input:i,text:o,clearIcon:s,dropdownIcon:l}=gE.createDropdown(t,this.labels);this.root=r,this.input=i,this.text=o,this.clearIcon=s,this.dropdownIcon=l,this.autoSuggest=new L2({id:(e==null?void 0:e.popupId)||"dropdown-auto-suggest",header:(h=this.options)==null?void 0:h.header,onClickItem:this.handleClickItem,queryItems:this.handleQueryItems,onClose:this.handleClose,onShow:this.handleShow,highlight:e==null?void 0:e.highlight,emptyPlaceholder:e==null?void 0:e.emptyPlaceholder,disableSelectedScroll:e==null?void 0:e.disableSelectedScroll}),this.items=(E=(C=this.options)==null?void 0:C.items)!=null?E:[],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(t){this.items=t,this.autoSuggest.handleSearchText("")}setText(t){this.text.innerText=t,this.input.value=t,this.updatePlaceholder()}clear(){this.setText(""),this.setLabels([])}setLabels(t){this.labels=t,this.updateLabels()}static createDropdown(t,e){const r=B("div",["editor-dropdown","empty"],t),i=B("input",["dropdown-input"],r),o=B("div",["dropdown-text"],r),s=B("div",["dropdown-labels"],r);for(let d=0;d<e.length;d+=1){const h=e[d];B("span",["dropdown-label"],s,h)}const l=B("div",["dropdown-clear-icon"],r);l.innerHTML=i2;const c=B("div",["dropdown-icon"],r);return c.innerHTML=xm,{root:r,input:i,text:o,clearIcon:l,dropdownIcon:c}}updateLabels(){const t=this.root.querySelector(".dropdown-labels");if(t){t.innerHTML="";for(let e=0;e<this.labels.length;e+=1){const r=this.labels[e];B("span",["dropdown-label"],t,r)}}}updatePlaceholder(){var t;if(this.input.value===""){const e=(t=this.options)==null?void 0:t.placeholder;e&&(this.input.placeholder=e,this.text.textContent=e),q(this.root,"empty")}else ut(this.root,"empty")}}const uN=[-1,6,0,1,2,3,4,5],fN=[-1,6,0,1,2,3,4,5,14,13,7,8,9,10,11,12],I2=D("color-palette");function D2(n,t,e,r){p(I2,n>0,"no color in palette");const i=t||1;p(I2,i>0,`invalid palette rows: ${i}`);const o=n/i,s=B("div",["palette-container",r],null);for(let l=0;l<i;l++){const c=B("div",["palette-container-row"],s);for(let d=0;d<o;d++){const h=e(l*o+d);c.appendChild(h)}}return s}function dN(n){const t=B("button",["color-button"],null),e=uN[n];return t.setAttribute("data-color-index",`${e}`),t.innerHTML=eE,t}function hN(n){const t=B("button",["background-color-button"],null),e=fN[n];return t.setAttribute("data-color-index",`${e}`),t}function mN(){const n=B("div",["clear-button-container"],null),t=B("button",["clear-button"],n);return t.innerText=_.t("colorPalette.reset"),n}function gN(n){const t=B("div",["color-palette"],null);return n.color!==!1&&(B("div",["bar-desc"],t,_.t("colorPalette.colorDesc")),t.appendChild(D2(8,1,dN,"color"))),n.backgroundColor!==!1&&(B("div",["bar-desc"],t,_.t("colorPalette.backgroundDesc")),t.appendChild(D2(16,2,hN,"background-color"))),n.clearColorButton!==!1&&t.appendChild(mN()),t}function pN(n,t,e){const r=t==="color"?"color":"background-color",i=n.querySelector(`.${r} button.selected`);i&&ut(i,"selected"),e===null&&(e=-1);const o=n.querySelector(`.${r} button[data-color-index="${e}"]`);o&&q(o,"selected")}const gat="",CN={};class EN extends je.TypedEmitter{constructor(e=CN){super();m(this,"root");m(this,"handleClick",e=>{const r=e.target;if(!r||!(r instanceof Element))return;const i=r.closest("button");if(!i)return;if(Mt(i,"clear-button")){this.setColor("backgroundColor",null),this.setColor("color",null),this.emit("onClick","clearColor",0);return}const o=i.getAttribute("data-color-index");if(!o)return;const s=Number.parseInt(o,10);Number.isNaN(s)||(Mt(i,"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=e,this.root=gN(e),this.root.addEventListener("click",this.handleClick)}destroy(){this.removeAllListeners(),this.root.removeEventListener("click",this.handleClick)}setColor(e,r){pN(this.root,e,r)}}class _2{constructor(t,e){m(this,"name","Color Palette");m(this,"element");m(this,"palette");m(this,"closeable",null);this.id=t,this.palette=new EN(e),this.element=this.palette.root}setCloseable(t){this.closeable=t}destroy(){this.palette.destroy(),this.closeable=null}}function AN(){const n=B("button",["color-button"],null);return n.innerHTML=eE,n}function pE(n,t){const[e,r]=t;e===null?n.removeAttribute("data-color"):n.setAttribute("data-color",`${e}`),r===null?n.removeAttribute("data-background-color"):n.setAttribute("data-background-color",`${r}`)}class M2 extends je.TypedEmitter{constructor(e){super();m(this,"id","text-color-item");m(this,"name",_.t("colorPalette.name"));m(this,"dropdown",!0);m(this,"manualShowChildren",!0);m(this,"children",[]);m(this,"element");m(this,"colorPaletteItem");m(this,"latestColors",[null,null]);m(this,"handlePaletteClick",(e,r)=>{this.emit("onClick",e,r)});m(this,"setLatestColors",(e,r)=>{e==="color"||e==="backgroundColor"?e==="color"?this.latestColors[0]=r:this.latestColors[1]=r:this.latestColors=[null,null],pE(this.element,this.latestColors)});m(this,"beforePopup",()=>{this.updatePaletteColor(this.latestColors),this.emit("beforePopup")});this.editor=e,this.colorPaletteItem=new _2("text-color-palette-item"),this.colorPaletteItem.palette.addListener("onClick",this.handlePaletteClick),this.children.push(this.colorPaletteItem),this.element=AN()}destroy(){this.colorPaletteItem.destroy()}updatePaletteColor(e){this.colorPaletteItem.palette.setColor("color",e[0]),this.colorPaletteItem.palette.setColor("backgroundColor",e[1]),this.latestColors=e,pE(this.element,this.latestColors)}updateButtonColor(e){this.latestColors=e,pE(this.element,this.latestColors)}}const pat="";function Mm(n,t){const e=B("div",["editor-input-wrap"],n);if(t!=null&&t.className&&q(e,t==null?void 0:t.className),t.label){const s=B("div",["editor-input-label"],e);B("span",[],s,t.label),t.required&&q(s,"required")}const r=B("div",["editor-input-container"],e),i=B("input",["editor-input"],null);if(t.placeholder&&(i.placeholder=t.placeholder),t.defaultValue&&(i.value=t.defaultValue),t.maxLength&&(i.maxLength=t.maxLength),t.maxLength){const s=B("div",["editor-input-suffix"],r);B("span",[],s,`${i.value.length} / ${t.maxLength}`),i.addEventListener("input",l=>{const c=l.target;s.innerText=`${c.value.length} / ${t.maxLength}`})}r.appendChild(i);const o=B("div",["editor-input-error"],e);return i.addEventListener("input",s=>{var l;(l=t.onChange)==null||l.call(t,s),ut(e,"error")}),h0(i,(s,l)=>{var c;(c=t.onKeyDown)==null||c.call(t,s,l)}),{getField:()=>i,getInputValue:()=>i.value,setFieldError:s=>{q(e,"error"),o.innerText=s},focus:()=>{setTimeout(()=>{i.focus()})}}}function CE(n){if(!document.hasFocus())return!1;const t=document.getSelection();if(!t)return!0;const e=t.focusNode;if(!e)return!0;const r=t.focusOffset,i=e.childNodes[r];if(!i)return!0;if(i instanceof HTMLElement){const o=i.tagName.toLowerCase();if(i===n.input.inputElement)return!0;if(o==="input"||o==="textarea")return!1}return!0}class xN extends L2{constructor(e,r){super(r);m(this,"handleClose",()=>{var e,r;CE(this.editor)&&this.editor.focus(),(r=(e=this.options).onClose)==null||r.call(e)});this.editor=e,this.editorOptions=r}async popupInEditor(e,r,i){var d,h;if(((h=(d=this.editorOptions).onShow)==null?void 0:h.call(d,this,e,r,i))===!1)return;this.options.showLoading&&this.showLoading();const o=this.editor.getBlockByIndex(e,r);if(!Ae(this.editor.rootContainer,o)||At(this.editor,o)<i)return;const s=Vo(this.editor,o,Ie(this.editor,o,i));if(s.length===0)return;const l=s[0],c=jo(this.editor,o,"editor-auto-suggest-menu",l);super.popup(c,{noEvent:!0})}}const EE=D("auto-suggest-menu");class AE{constructor(t,e){m(this,"order",100);m(this,"menu");m(this,"anchor",null);m(this,"close",()=>{this.menu.close()});m(this,"oldCompositingText","");m(this,"handleSelectionChanged",t=>{var r,i;if(!((r=this.menu)!=null&&r.isVisible))return;const e=t.selection.range.start;if(e.isSimple()&&e.blockId===((i=this.anchor)==null?void 0:i.blockId)&&e.offset>=this.anchor.offset){const o=t.getBlockById(e.blockId);if(Re(ar(Jn(t,o),e.offset).left).startsWith(this.anchor.leftText))return}this.menu.close()});m(this,"deleteTrigger",()=>{const t=this.editor,e=t.selection.range.start;if(!e.isSimple()||!this.anchor)return!1;const{blockId:r,offset:i}=e,o=t.getBlockById(r),s=Re(H0(t,o,i));if(p(EE,this.anchor,"no anchor"),!s.startsWith(this.anchor.leftText))return!1;const l=this.anchor.offset-this.anchor.trigger.length,c=i-l;return t.selection.selectBlock(o,l),c&&(t.deleteTextFromBlock(o,l,c),this.anchor.offset-=this.anchor.trigger.length),this.anchor.trigger.length||this.menu.close(),!0});m(this,"onClose",()=>{var t,e;(e=(t=this.options).onClose)==null||e.call(t)});m(this,"onShow",(t,e,r,i)=>{var o;if((o=this.options)!=null&&o.onShow)return this.options.onShow(this,e,r,i)});m(this,"onClickItem",(t,e)=>{!this.anchor||(this.options.autoDeleteTrigger&&this.deleteTrigger(),this.options.onClickItem(this,e,this.anchor))});m(this,"queryItems",(t,e)=>this.options.queryItems(this,e));m(this,"renderMenuItem",(t,e)=>{var i,o;return(o=(i=this.options).renderMenuItem)==null?void 0:o.call(i,this,e)});m(this,"hasExistsMenuThemeCommandBar",()=>!!document.querySelector('div.tippy-box[data-theme="menu"]'));this.editor=t,this.options=e,this.menu=new xN(t,{id:e.id,showLoading:e.showLoading,loadingElement:e.loadingElement,placeholder:e.placeholder,header:e.header,footer:e.footer,wait:e.wait,noResultMessage:e.noResultMessage,highlight:e.highlight,onClose:this.onClose,onShow:this.onShow,onClickItem:this.onClickItem,queryItems:this.queryItems,renderMenuItem:this.renderMenuItem}),t.input.addHandler(this),t.addListener("selectionChanged",this.handleSelectionChanged)}handleBeforeKeyDown(t,e){var r;return!((r=this.menu)!=null&&r.isVisible)||jp(e.key)?!1:av(e)&&!sa(e)?(setTimeout(()=>{this.resetItems()}),!1):p0(e)?(this.menu.close(),!0):zp(e)&&!this.menu.menu.getSelectedItem()?(this.menu.close(),!0):this.menu.handleKeydown(e)}popup(t,e,r,i){this.anchor={blockId:dt(t),offset:e,leftText:r,trigger:i};const o=Et(at(t)),s=Rt(t);this.menu.popupInEditor(o,s,e)}triggerPopup(t,e,r,i,o){var l;const s=t.selection.range.start;if(!s.isSimple())return!1;if(this.options.trigger.indexOf(o)!==-1){const c=t.getBlockByIndex(e,r);if(i>0&&this.options.needSpaceBeforeTrigger&&(((l=t.getBlockData(c).text)==null?void 0:l.reduce((A,v)=>A+v.insert,""))||"")[i-1].trim().length!==0||this.hasExistsMenuThemeCommandBar())return!1;const{offset:d}=s,h=Re(H0(t,c,d));this.popup(c,d,h,o)}return!1}handleAfterInsertText(t,e,r,i,o){var h;const s=t.selection.range.start;if(!s.isSimple())return!1;const l=t.getBlockByIndex(e,r);if(Ko(l))return!1;const{blockId:c,offset:d}=s;return dt(l)!==c?!1:(h=this.menu)!=null&&h.isVisible?(this.resetItems(),!1):this.triggerPopup(t,e,r,i,o)}handleUpdateCompositionText(t,e,r,i,o){var h;const s=t.selection.range.start;if(!s.isSimple())return!1;const{blockId:l}=s,c=t.getBlockByIndex(e,r);if(dt(c)!==l)return!1;if((h=this.menu)!=null&&h.isVisible&&this.resetItems(),!o)return this.oldCompositingText=t.compositingText,!1;const d=this.triggerPopup(t,e,r,i,this.oldCompositingText);return this.oldCompositingText="",d}resetItems(){var l;if(!((l=this.menu)!=null&&l.isVisible))return;const t=this.editor,e=t.selection.range.start;if(!e.isSimple())return;const{blockId:r,offset:i}=e,o=t.getBlockById(r),s=Re(H0(t,o,i));if(p(EE,this.anchor,"no anchor"),s.startsWith(this.anchor.leftText)){const c=s.substring(this.anchor.leftText.length);EE.debug(`search text: ${c}`),this.menu.handleSearchText(c)}}destroy(){var t;this.editor.input.removeHandler(this),this.editor.removeListener("selectionChanged",this.handleSelectionChanged),(t=this.menu)==null||t.destroy()}}function bN(){const n={};for(let t=1;t<=8;t++)n[`heading-${t}`]={shortcut:`/h${t}`};return n}const vN={"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"},...bN()};function tr(n){var t;return(t=vN[n])==null?void 0:t.shortcut}function BN(n){var t;return(t=n.subText)!=null?t:""}const so=D("table-dom");function lo(n){return`${dt(n)}_scroll`}function fn(n){const t=n.querySelector("div[data-type=table-content] >table");return p(so,t instanceof HTMLTableElement,"invalid table"),t}function ao(n,t){const r=n.getCustom(lo(t)).contentElement.firstElementChild;p(so,r instanceof HTMLElement,"invalid table content");let i=r.querySelector(":scope >div[data-type=table-tools]");return i||(i=B("div",[],r),i.setAttribute("data-type","table-tools"),n.domEvents.addEventListener(i,"dblclick",(o,s)=>s.stopPropagation()),n.domEvents.addEventListener(i,"click",(o,s)=>{s.detail===3&&s.stopPropagation()})),p(so,i,"no table tools"),i}function yN(n,t){return n.findCustom(lo(t))?ao(n,t):null}function U2(n){const t=[];return Array.from(n.rows).forEach(e=>{t.push(...Array.from(e.cells))}),t}function Ed(n){const t=n.querySelector(":scope div[data-type=editor-container]");return p(so,t,"no child container in cell"),t}function TN(n){const r=U2(n).map(i=>{const o=Ed(i),s=Et(o),l=i.colSpan,c=i.rowSpan;return`${s}/${l}/${c}`}).join();return Rv(r)}function dn(n){return Ot(n)==="table"}function xE(n){const t=at(n);if(ie(t))return null;const e=et(t);return p(so,e,"no parent block"),dn(e)?t:xE(e)}function is(n){if(dn(n))return n;const t=at(n);if(ie(t))return null;const e=et(t);return p(so,e,"no parent block"),dn(e)?e:is(e)}function kN(n,t){const e=n.querySelector("colgroup");p(so,e,"no colgroup");const r=e.children[t];return p(so,r,"no col"),p(so,r instanceof HTMLTableColElement,`invalid col: ${r.tagName}`),r}function O2(n){try{return fn(n),!0}catch{return!1}}function RN(n){return ve(n).querySelector(":scope > .block-helper")}function N2(n){const t=et(n.contentElement);p(so,t,"no block");const e=RN(t);if(e){const o=Math.min(n.contentElement.offsetLeft+29,n.rootElement.scrollLeft),s=t.getBoundingClientRect().width;e.style.right=`${o+s+5}px`}}function wN(n){const t=n.getComponentOptions("table"),e=t==null?void 0:t.bigTableBoundary;if(!e)return!1;const r=n.rootContainer.querySelectorAll("div[data-type=table-content] >table");let i=!1;return r.forEach(o=>{o.getBoundingClientRect().width>e&&(i=!0)}),i}var bE={exports:{}};(function(n,t){var e=200,r="Expected a function",i="__lodash_hash_undefined__",o=1,s=2,l=1/0,c=9007199254740991,d="[object Arguments]",h="[object Array]",C="[object Boolean]",E="[object Date]",A="[object Error]",v="[object Function]",R="[object GeneratorFunction]",S="[object Map]",M="[object Number]",U="[object Object]",V="[object Promise]",nt="[object RegExp]",Y="[object Set]",X="[object String]",ft="[object Symbol]",pt="[object WeakMap]",ct="[object ArrayBuffer]",wt="[object DataView]",Bt="[object Float32Array]",Jt="[object Float64Array]",ce="[object Int8Array]",Oe="[object Int16Array]",pe="[object Int32Array]",ni="[object Uint8Array]",$e="[object Uint8ClampedArray]",bn="[object Uint16Array]",Ir="[object Uint32Array]",nr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Nn=/^\w*$/,uh=/^\./,fh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dh=/[\\^$.*+?()[\]{}|]/g,Eo=/\\(\\)?/g,cs=/^\[object .+?Constructor\]$/,us=/^(?:0|[1-9]\d*)$/,ee={};ee[Bt]=ee[Jt]=ee[ce]=ee[Oe]=ee[pe]=ee[ni]=ee[$e]=ee[bn]=ee[Ir]=!0,ee[d]=ee[h]=ee[ct]=ee[C]=ee[wt]=ee[E]=ee[A]=ee[v]=ee[S]=ee[M]=ee[U]=ee[nt]=ee[Y]=ee[X]=ee[pt]=!1;var Gt=typeof Tn=="object"&&Tn&&Tn.Object===Object&&Tn,ri=typeof self=="object"&&self&&self.Object===Object&&self,Pn=Gt||ri||Function("return this")(),fs=t&&!t.nodeType&&t,Oa=fs&&!0&&n&&!n.nodeType&&n,kn=Oa&&Oa.exports===fs,Ao=kn&&Gt.process,Na=function(){try{return Ao&&Ao.binding("util")}catch{}}(),rr=Na&&Na.isTypedArray;function Fu(k,N){var W=k?k.length:0;return!!W&&hs(k,N,0)>-1}function hh(k,N,W){for(var lt=-1,St=k?k.length:0;++lt<St;)if(W(N,k[lt]))return!0;return!1}function ds(k,N){for(var W=-1,lt=k?k.length:0;++W<lt;)if(N(k[W],W,k))return!0;return!1}function Ne(k,N,W,lt){for(var St=k.length,ht=W+(lt?1:-1);lt?ht--:++ht<St;)if(N(k[ht],ht,k))return ht;return-1}function hs(k,N,W){if(N!==N)return Ne(k,ms,W);for(var lt=W-1,St=k.length;++lt<St;)if(k[lt]===N)return lt;return-1}function ms(k){return k!==k}function Ku(k){return function(N){return N==null?void 0:N[k]}}function gs(k,N){for(var W=-1,lt=Array(k);++W<k;)lt[W]=N(W);return lt}function Vu(k){return function(N){return k(N)}}function ps(k,N){return k.has(N)}function xo(k,N){return k==null?void 0:k[N]}function Cs(k){var N=!1;if(k!=null&&typeof k.toString!="function")try{N=!!(k+"")}catch{}return N}function Pa(k){var N=-1,W=Array(k.size);return k.forEach(function(lt,St){W[++N]=[St,lt]}),W}function Fa(k,N){return function(W){return k(N(W))}}function Es(k){var N=-1,W=Array(k.size);return k.forEach(function(lt){W[++N]=lt}),W}var Ka=Array.prototype,Va=Function.prototype,bo=Object.prototype,As=Pn["__core-js_shared__"],Dl=function(){var k=/[^.]+$/.exec(As&&As.keys&&As.keys.IE_PROTO||"");return k?"Symbol(src)_1."+k:""}(),$u=Va.toString,Dr=bo.hasOwnProperty,vo=bo.toString,Hu=RegExp("^"+$u.call(Dr).replace(dh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),$a=Pn.Symbol,ju=Pn.Uint8Array,mh=bo.propertyIsEnumerable,gh=Ka.splice,ph=Fa(Object.keys,Object),_l=So(Pn,"DataView"),xs=So(Pn,"Map"),Ha=So(Pn,"Promise"),Bo=So(Pn,"Set"),bs=So(Pn,"WeakMap"),vs=So(Object,"create"),ja=Ni(_l),Ch=Ni(xs),Eh=Ni(Ha),be=Ni(Bo),Ah=Ni(bs),Ml=$a?$a.prototype:void 0,Ul=Ml?Ml.valueOf:void 0,yo=Ml?Ml.toString:void 0;function Ui(k){var N=-1,W=k?k.length:0;for(this.clear();++N<W;){var lt=k[N];this.set(lt[0],lt[1])}}function Ol(){this.__data__=vs?vs(null):{}}function zu(k){return this.has(k)&&delete this.__data__[k]}function Gu(k){var N=this.__data__;if(vs){var W=N[k];return W===i?void 0:W}return Dr.call(N,k)?N[k]:void 0}function xh(k){var N=this.__data__;return vs?N[k]!==void 0:Dr.call(N,k)}function bh(k,N){var W=this.__data__;return W[k]=vs&&N===void 0?i:N,this}Ui.prototype.clear=Ol,Ui.prototype.delete=zu,Ui.prototype.get=Gu,Ui.prototype.has=xh,Ui.prototype.set=bh;function _r(k){var N=-1,W=k?k.length:0;for(this.clear();++N<W;){var lt=k[N];this.set(lt[0],lt[1])}}function vh(){this.__data__=[]}function Nl(k){var N=this.__data__,W=To(N,k);if(W<0)return!1;var lt=N.length-1;return W==lt?N.pop():gh.call(N,W,1),!0}function Bh(k){var N=this.__data__,W=To(N,k);return W<0?void 0:N[W][1]}function Pl(k){return To(this.__data__,k)>-1}function yh(k,N){var W=this.__data__,lt=To(W,k);return lt<0?W.push([k,N]):W[lt][1]=N,this}_r.prototype.clear=vh,_r.prototype.delete=Nl,_r.prototype.get=Bh,_r.prototype.has=Pl,_r.prototype.set=yh;function Mr(k){var N=-1,W=k?k.length:0;for(this.clear();++N<W;){var lt=k[N];this.set(lt[0],lt[1])}}function Th(){this.__data__={hash:new Ui,map:new(xs||_r),string:new Ui}}function Wu(k){return ks(this,k).delete(k)}function Fl(k){return ks(this,k).get(k)}function qu(k){return ks(this,k).has(k)}function kh(k,N){return ks(this,k).set(k,N),this}Mr.prototype.clear=Th,Mr.prototype.delete=Wu,Mr.prototype.get=Fl,Mr.prototype.has=qu,Mr.prototype.set=kh;function Bs(k){var N=-1,W=k?k.length:0;for(this.__data__=new Mr;++N<W;)this.add(k[N])}function Rh(k){return this.__data__.set(k,i),this}function mr(k){return this.__data__.has(k)}Bs.prototype.add=Bs.prototype.push=Rh,Bs.prototype.has=mr;function Fn(k){this.__data__=new _r(k)}function ii(){this.__data__=new _r}function Ye(k){return this.__data__.delete(k)}function za(k){return this.__data__.get(k)}function wh(k){return this.__data__.has(k)}function Ur(k,N){var W=this.__data__;if(W instanceof _r){var lt=W.__data__;if(!xs||lt.length<e-1)return lt.push([k,N]),this;W=this.__data__=new Mr(lt)}return W.set(k,N),this}Fn.prototype.clear=ii,Fn.prototype.delete=Ye,Fn.prototype.get=za,Fn.prototype.has=wh,Fn.prototype.set=Ur;function Or(k,N){var W=Pi(k)||Za(k)?gs(k.length,String):[],lt=W.length,St=!!lt;for(var ht in k)(N||Dr.call(k,ht))&&!(St&&(ht=="length"||Ju(ht,lt)))&&W.push(ht);return W}function To(k,N){for(var W=k.length;W--;)if(Zu(k[W][0],N))return W;return-1}function ys(k,N){N=Vl(N,k)?[N]:oi(N);for(var W=0,lt=N.length;k!=null&&W<lt;)k=k[$l(N[W++])];return W&&W==lt?k:void 0}function Ga(k){return vo.call(k)}function Oi(k,N){return k!=null&&N in Object(k)}function gr(k,N,W,lt,St){return k===N?!0:k==null||N==null||!ai(k)&&!vn(N)?k!==k&&N!==N:Wa(k,N,gr,W,lt,St)}function Wa(k,N,W,lt,St,ht){var $t=Pi(k),te=Pi(N),ue=h,we=h;$t||(ue=si(k),ue=ue==d?U:ue),te||(we=si(N),we=we==d?U:we);var Se=ue==U&&!Cs(k),De=we==U&&!Cs(N),ne=ue==we;if(ne&&!Se)return ht||(ht=new Fn),$t||ec(k)?Qu(k,N,W,lt,St,ht):Ih(k,N,ue,W,lt,St,ht);if(!(St&s)){var Rn=Se&&Dr.call(k,"__wrapped__"),mn=De&&Dr.call(N,"__wrapped__");if(Rn||mn){var wn=Rn?k.value():k,Sn=mn?N.value():N;return ht||(ht=new Fn),W(wn,Sn,lt,St,ht)}}return ne?(ht||(ht=new Fn),Ya(k,N,W,lt,St,ht)):!1}function qa(k,N,W,lt){var St=W.length,ht=St,$t=!lt;if(k==null)return!ht;for(k=Object(k);St--;){var te=W[St];if($t&&te[2]?te[1]!==k[te[0]]:!(te[0]in k))return!1}for(;++St<ht;){te=W[St];var ue=te[0],we=k[ue],Se=te[1];if($t&&te[2]){if(we===void 0&&!(ue in k))return!1}else{var De=new Fn;if(lt)var ne=lt(we,Se,ue,k,N,De);if(!(ne===void 0?gr(Se,we,lt,o|s,De):ne))return!1}}return!0}function ko(k){if(!ai(k)||_h(k))return!1;var N=li(k)||Cs(k)?Hu:cs;return N.test(Ni(k))}function Xa(k){return vn(k)&&Lo(k.length)&&!!ee[vo.call(k)]}function Ro(k){return typeof k=="function"?k:k==null?Kn:typeof k=="object"?Pi(k)?Sh(k[0],k[1]):Xu(k):qn(k)}function wo(k){if(!Mh(k))return ph(k);var N=[];for(var W in Object(k))Dr.call(k,W)&&W!="constructor"&&N.push(W);return N}function Xu(k){var N=Qa(k);return N.length==1&&N[0][2]?de(N[0][0],N[0][1]):function(W){return W===k||qa(W,k,N)}}function Sh(k,N){return Vl(k)&&Ce(N)?de($l(k),N):function(W){var lt=tf(W,k);return lt===void 0&&lt===N?rc(W,k):gr(N,lt,void 0,o|s)}}function Yu(k){return function(N){return ys(N,k)}}function Ts(k){if(typeof k=="string")return k;if(Rs(k))return yo?yo.call(k):"";var N=k+"";return N=="0"&&1/k==-l?"-0":N}function Kl(k,N,W){var lt=-1,St=Fu,ht=k.length,$t=!0,te=[],ue=te;if(W)$t=!1,St=hh;else if(ht>=e){var we=N?null:Lh(k);if(we)return Es(we);$t=!1,St=ps,ue=new Bs}else ue=N?[]:te;t:for(;++lt<ht;){var Se=k[lt],De=N?N(Se):Se;if(Se=W||Se!==0?Se:0,$t&&De===De){for(var ne=ue.length;ne--;)if(ue[ne]===De)continue t;N&&ue.push(De),te.push(Se)}else St(ue,De,W)||(ue!==te&&ue.push(De),te.push(Se))}return te}function oi(k){return Pi(k)?k:Uh(k)}var Lh=Bo&&1/Es(new Bo([,-0]))[1]==l?function(k){return new Bo(k)}:Nh;function Qu(k,N,W,lt,St,ht){var $t=St&s,te=k.length,ue=N.length;if(te!=ue&&!($t&&ue>te))return!1;var we=ht.get(k);if(we&&ht.get(N))return we==N;var Se=-1,De=!0,ne=St&o?new Bs:void 0;for(ht.set(k,N),ht.set(N,k);++Se<te;){var Rn=k[Se],mn=N[Se];if(lt)var wn=$t?lt(mn,Rn,Se,N,k,ht):lt(Rn,mn,Se,k,N,ht);if(wn!==void 0){if(wn)continue;De=!1;break}if(ne){if(!ds(N,function(Sn,Bn){if(!ne.has(Bn)&&(Rn===Sn||W(Rn,Sn,lt,St,ht)))return ne.add(Bn)})){De=!1;break}}else if(!(Rn===mn||W(Rn,mn,lt,St,ht))){De=!1;break}}return ht.delete(k),ht.delete(N),De}function Ih(k,N,W,lt,St,ht,$t){switch(W){case wt:if(k.byteLength!=N.byteLength||k.byteOffset!=N.byteOffset)return!1;k=k.buffer,N=N.buffer;case ct:return!(k.byteLength!=N.byteLength||!lt(new ju(k),new ju(N)));case C:case E:case M:return Zu(+k,+N);case A:return k.name==N.name&&k.message==N.message;case nt:case X:return k==N+"";case S:var te=Pa;case Y:var ue=ht&s;if(te||(te=Es),k.size!=N.size&&!ue)return!1;var we=$t.get(k);if(we)return we==N;ht|=o,$t.set(k,N);var Se=Qu(te(k),te(N),lt,St,ht,$t);return $t.delete(k),Se;case ft:if(Ul)return Ul.call(k)==Ul.call(N)}return!1}function Ya(k,N,W,lt,St,ht){var $t=St&s,te=ws(k),ue=te.length,we=ws(N),Se=we.length;if(ue!=Se&&!$t)return!1;for(var De=ue;De--;){var ne=te[De];if(!($t?ne in N:Dr.call(N,ne)))return!1}var Rn=ht.get(k);if(Rn&&ht.get(N))return Rn==N;var mn=!0;ht.set(k,N),ht.set(N,k);for(var wn=$t;++De<ue;){ne=te[De];var Sn=k[ne],Bn=N[ne];if(lt)var Ss=$t?lt(Bn,Sn,ne,N,k,ht):lt(Sn,Bn,ne,k,N,ht);if(!(Ss===void 0?Sn===Bn||W(Sn,Bn,lt,St,ht):Ss)){mn=!1;break}wn||(wn=ne=="constructor")}if(mn&&!wn){var Fi=k.constructor,Io=N.constructor;Fi!=Io&&"constructor"in k&&"constructor"in N&&!(typeof Fi=="function"&&Fi instanceof Fi&&typeof Io=="function"&&Io instanceof Io)&&(mn=!1)}return ht.delete(k),ht.delete(N),mn}function ks(k,N){var W=k.__data__;return Dh(N)?W[typeof N=="string"?"string":"hash"]:W.map}function Qa(k){for(var N=ws(k),W=N.length;W--;){var lt=N[W],St=k[lt];N[W]=[lt,St,Ce(St)]}return N}function So(k,N){var W=xo(k,N);return ko(W)?W:void 0}var si=Ga;(_l&&si(new _l(new ArrayBuffer(1)))!=wt||xs&&si(new xs)!=S||Ha&&si(Ha.resolve())!=V||Bo&&si(new Bo)!=Y||bs&&si(new bs)!=pt)&&(si=function(k){var N=vo.call(k),W=N==U?k.constructor:void 0,lt=W?Ni(W):void 0;if(lt)switch(lt){case ja:return wt;case Ch:return S;case Eh:return V;case be:return Y;case Ah:return pt}return N});function Ja(k,N,W){N=Vl(N,k)?[N]:oi(N);for(var lt,St=-1,$t=N.length;++St<$t;){var ht=$l(N[St]);if(!(lt=k!=null&&W(k,ht)))break;k=k[ht]}if(lt)return lt;var $t=k?k.length:0;return!!$t&&Lo($t)&&Ju(ht,$t)&&(Pi(k)||Za(k))}function Ju(k,N){return N=N==null?c:N,!!N&&(typeof k=="number"||us.test(k))&&k>-1&&k%1==0&&k<N}function Vl(k,N){if(Pi(k))return!1;var W=typeof k;return W=="number"||W=="symbol"||W=="boolean"||k==null||Rs(k)?!0:Nn.test(k)||!nr.test(k)||N!=null&&k in Object(N)}function Dh(k){var N=typeof k;return N=="string"||N=="number"||N=="symbol"||N=="boolean"?k!=="__proto__":k===null}function _h(k){return!!Dl&&Dl in k}function Mh(k){var N=k&&k.constructor,W=typeof N=="function"&&N.prototype||bo;return k===W}function Ce(k){return k===k&&!ai(k)}function de(k,N){return function(W){return W==null?!1:W[k]===N&&(N!==void 0||k in Object(W))}}var Uh=Hl(function(k){k=nc(k);var N=[];return uh.test(k)&&N.push(""),k.replace(fh,function(W,lt,St,ht){N.push(St?ht.replace(Eo,"$1"):lt||W)}),N});function $l(k){if(typeof k=="string"||Rs(k))return k;var N=k+"";return N=="0"&&1/k==-l?"-0":N}function Ni(k){if(k!=null){try{return $u.call(k)}catch{}try{return k+""}catch{}}return""}function Oh(k,N){return k&&k.length?Kl(k,Ro(N)):[]}function Hl(k,N){if(typeof k!="function"||N&&typeof N!="function")throw new TypeError(r);var W=function(){var lt=arguments,St=N?N.apply(this,lt):lt[0],ht=W.cache;if(ht.has(St))return ht.get(St);var $t=k.apply(this,lt);return W.cache=ht.set(St,$t),$t};return W.cache=new(Hl.Cache||Mr),W}Hl.Cache=Mr;function Zu(k,N){return k===N||k!==k&&N!==N}function Za(k){return tc(k)&&Dr.call(k,"callee")&&(!mh.call(k,"callee")||vo.call(k)==d)}var Pi=Array.isArray;function Qe(k){return k!=null&&Lo(k.length)&&!li(k)}function tc(k){return vn(k)&&Qe(k)}function li(k){var N=ai(k)?vo.call(k):"";return N==v||N==R}function Lo(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=c}function ai(k){var N=typeof k;return!!k&&(N=="object"||N=="function")}function vn(k){return!!k&&typeof k=="object"}function Rs(k){return typeof k=="symbol"||vn(k)&&vo.call(k)==ft}var ec=rr?Vu(rr):Xa;function nc(k){return k==null?"":Ts(k)}function tf(k,N,W){var lt=k==null?void 0:ys(k,N);return lt===void 0?W:lt}function rc(k,N){return k!=null&&Ja(k,N,Oi)}function ws(k){return Qe(k)?Or(k):wo(k)}function Kn(k){return k}function Nh(){}function qn(k){return Vl(k)?Ku($l(k)):Yu(k)}n.exports=Oh})(bE,bE.exports);const SN=bE.exports,Ri=D("doc-table-grid");class LN{constructor(t){m(this,"_cells",[]);for(let e=0;e<t;e++)this._cells.push(void 0)}cols(){return this._cells.length}setCell(t,e){p(Ri,t>=0&&t<this.cols(),`set cell, invalid col: ${t}`),this._cells[t]=e}getCell(t){p(Ri,t>=0&&t<this.cols(),`get cell, invalid col: ${t}`);const e=this._cells[t];return p(Ri,e,"get cell, no cell"),e}getCellAllowEmpty(t){return p(Ri,t>=0&&t<this.cols(),`get cell, invalid col, ${t}`),this._cells[t]}getNextNonVirtualCell(t){return this._cells.slice(t+1).find(e=>!e.virtual)}forEach(t){this._cells.forEach(t)}}class Um{constructor(t){m(this,"_data");m(this,"_rows");this._data=t,this._rows=[];for(let e=0;e<this.rowCount;e++)this._rows.push(new LN(this.colCount));this.fillGrid()}get rowCount(){return this._data.rows}get colCount(){return this._data.cols}getNextEmptyCell(t,e){let r=t,i=e;for(;;){if(r+=1,r===this.colCount&&(r=0,i+=1),i>=this.rowCount)return null;if(this._rows[i].getCellAllowEmpty(r)===void 0)return{col:r,row:i}}}fillGrid(){const t=this._data.children;p(Ri,t,"no children");let e=0,r=0;t.forEach((i,o)=>{const s=this._data[`${i}_colSpan`]||1,l=this._data[`${i}_rowSpan`]||1,c=this._data[`${i}_background`]||"";for(let h=0;h<l;h++)for(let C=0;C<s;C++){const E={col:e,row:r,containerId:i,virtual:C!==0||h!==0,colSpan:s,rowSpan:l};c&&(E.background=c),this._rows[r+h].setCell(e+C,E)}const d=this.getNextEmptyCell(e,r);d?(e=d.col,r=d.row):p(Ri,o===t.length-1,`invalid table data, no next empty cell: ${JSON.stringify(this._data)}`)}),this._rows.forEach(i=>{i.forEach(o=>{p(Ri,o,"no cell"),p(Ri,o.containerId,"no containerId")})})}getCell(t){const{col:e,row:r}=t,i=this._rows[r];p(Ri,i,`get cell, no row: ${r}`);const o=i.getCell(e);return p(Ri,o,`get cell, no cell: ${e}`),o}getRow(t){const e=this._rows[t];return p(Ri,e,`get row, no row: ${t}`),e}forEach(t){this._rows.forEach(t)}}const Om=D("table-data");function IN(n){for(const t of Array.from(n.classList))if(t.startsWith("style-bg-color-"))return t;return""}function DN(n){const t=n.firstElementChild;return p(Om,t,"no child element for cell"),p(Om,Qs(t),"cell first child is not a container"),p(Om,gi(t),"cell first child is not a container"),t}function _N(n){const t=et(n);p(Om,t,"no parent block for table");const e=[],r={},i={};Array.from(n.rows).forEach(c=>{Array.from(c.cells).forEach(d=>{const h=DN(d),C=Et(h);e.push(C),(d.colSpan>1||d.rowSpan>1)&&(r[`${C}_colSpan`]=d.colSpan,r[`${C}_rowSpan`]=d.rowSpan);const E=IN(d);E&&(i[`${C}_background`]=E)})});const o=n.rows.length,s=Array.from(n.rows[0].cells).map(c=>c.colSpan).reduce((c,d)=>c+d,0);return{id:dt(t),type:Ot(t),rows:o,cols:s,children:e,colsWidth:Array(s).fill(100),...r,...i}}function hl(n){return new Um(n)}function MN(n){return hl(_N(n))}const en=D("table-grid"),UN=60;class ON{constructor(t,e){m(this,"containerId");m(this,"row");m(this,"col");m(this,"colSpan");m(this,"rowSpan");m(this,"background");m(this,"virtual");m(this,"table");this.table=t,this.containerId=e.containerId,this.row=e.row,this.col=e.col,this.colSpan=e.colSpan,this.rowSpan=e.rowSpan,this.virtual=e.virtual,e.background&&(this.background=e.background)}get cell(){const e=this.container.closest("td");return p(en,e,"no parent cell for child container"),e}get container(){const t=o1(this.containerId),e=this.table.querySelectorAll(`#${t}`);p(en,e.length===1,"containers !== 1"),p(en,Qs(e[0]),"not a container");const r=e[0];return p(en,gi(r),"not a child container"),r}}class NN{constructor(t,e){m(this,"_cells",[]);e.forEach(r=>{this._cells.push(new ON(t,r))})}get cells(){return this._cells}getCell(t){return p(en,t<this._cells.length,"get cell, invalid col"),this._cells[t]}getNextNonVirtualCell(t){return this._cells.slice(t+1).find(e=>!e.virtual)}getSpannedCell(){return this._cells.find(t=>t.virtual||t.colSpan>1||t.rowSpan>1)}}const Ox=class{constructor(t){m(this,"_rows",[]);this.table=t,MN(t).forEach(i=>{this._rows.push(new NN(t,i))});const r=this.colCount;this._rows.forEach(i=>{p(en,i.cells.length===r,"row.cells.length !== colCount")})}get rowCount(){return this._rows.length}get colCount(){return this._rows.length===0?0:(p(en,this.rowCount>0,"rowCount <= 0"),this.getRow(0).cells.length)}getRow(t){return this._rows[t]}getCell(t){const e=this.getRow(t.row);return p(en,e,"no row"),e.getCell(t.col)}getCellContainer(t){return this.getCell(t).container}getFirstCellContainer(){return this.getCellContainer({row:0,col:0})}getLastCellContainer(){const t=this.rowCount-1,e=this.colCount-1;return this.getCellContainer({row:t,col:e})}getColumnCells(t){p(en,t>=0&&t<this.colCount,"colIndex out of range");const e=this.rowCount,r=[];for(let i=0;i<e;i++){const o=this.getCell({row:i,col:t});r.push(o)}return r}toRealCells(t){const e=[];return t.forEach(r=>{const i=this.getRealCell(r);e.findIndex(o=>o.containerId===i.containerId)===-1&&e.push(i)}),e}getColumnRealCells(t){const e=this.getColumnCells(t);return this.toRealCells(e)}getRowRealCells(t){const e=this.getRow(t).cells;return this.toRealCells(e)}getFirstSpannedCell(t){p(en,t>=0&&t<this.colCount,"colIndex out of range");const e=this.rowCount;for(let r=0;r<e;r++){const i=this.getCell({row:r,col:t});if(i.virtual||i.colSpan>1||i.rowSpan>1)return i}}getRealCell(t){const e=this.getCell(t);if(!e.virtual)return e;const r=this.getCellById(e.containerId);return p(en,!r.virtual,"found a virtual cell"),r}getColumnSpannedRange(t){const e=this.getColumnRealCells(t);let r=1e5,i=-1;return e.forEach(o=>{r=Math.min(o.col,r),i=Math.max(o.col+o.colSpan-1,i)}),p(en,r<=i,"min > max"),p(en,r>=0,"min < 0"),p(en,i<this.colCount,"max >= colCount"),[r,i]}getRowSpannedRange(t){const e=this.getRowRealCells(t);let r=1e5,i=-1;return e.forEach(o=>{r=Math.min(o.row,r),i=Math.max(o.row+o.rowSpan-1,i)}),p(en,r<=i,"min > max"),p(en,r>=0,"min < 0"),p(en,i<this.rowCount,"max >= rowCount"),[r,i]}getSpannedRange(t,e){const r=Math.min(t.row,e.row),i=Math.max(t.row,e.row),o=Math.min(t.col,e.col),s=Math.max(t.col,e.col),l=[];for(let A=r;A<=i;A++)for(let v=o;v<=s;v++)l.push(this.getCell({row:A,col:v}));const c=this.toRealCells(l);let d=1e4,h=1e4,C=-1,E=-1;return c.forEach(A=>{h=Math.min(A.col,h),d=Math.min(A.row,d),E=Math.max(A.col+A.colSpan-1,E),C=Math.max(A.row+A.rowSpan-1,C)}),[{row:d,col:h},{row:C,col:E}]}getAllCells(){return this.getCells({col:0,row:0},{col:this.colCount-1,row:this.rowCount-1})}sub(t,e){const r=[];for(let i=t.row;i<=e.row;i++){const o=[];for(let s=t.col;s<=e.col;s++){const l=this.getCell({row:i,col:s});o.push(l)}r.push(o)}return r}getAllContainers(){return this.getAllCells().map(e=>e.container)}getCells(t,e){const r=[],i=this.getSpannedRange(t,e),o=i[0],s=i[1],l=Math.min(o.row,s.row),c=Math.max(o.row,s.row),d=Math.min(o.col,s.col),h=Math.max(o.col,s.col);for(let C=l;C<=c;C++)for(let E=d;E<=h;E++){const A=this.getCell({row:C,col:E});A.virtual||r.push(A)}return r}map(t){const e=[];for(let r=0;r<this.rowCount;r++){const i=[];for(let o=0;o<this.colCount;o++){const s=this.getCell({row:r,col:o});i.push(t(s))}e.push(i)}return e}getBottomCell(t){const e=this.rowCount;let r=t,i=t.row;for(;r.containerId===t.containerId;){if(i+=1,i>=e)return null;r=this.getCell({row:i,col:t.col})}return this.getRealCell(r)}getTopCell(t){let e=t,r=t.row;for(;e.containerId===t.containerId;){if(r-=1,r<0)return null;e=this.getCell({row:r,col:t.col})}return this.getRealCell(e)}getLeftCell(t){const e=this.uniqueCells,r=e.findIndex(i=>i.containerId===t.containerId);return p(en,r>=0,"not a valid child container"),r===0?null:e[r-1]}getRightCell(t){const e=this.uniqueCells,r=e.findIndex(i=>i.containerId===t.containerId);return p(en,r>=0,"not a valid child container"),r===e.length-1?null:e[r+1]}get uniqueCells(){return SN(this.cells,"containerId")}get cells(){let t=[];return this._rows.forEach(e=>{t=t.concat(e.cells)}),t}getVirtualCellContainersGrid(){return this.map(t=>t.containerId)}static virtualCellContainersGridToChildren(t){const e=t,r=[];return e.forEach(i=>{i.forEach(o=>{r.indexOf(o)===-1&&r.push(o)})}),r}getCellById(t){const r=this.cells.find(i=>i.containerId===t);return p(en,r,"cell not found"),r}getCellByCellElement(t){const e=Ed(t);return this.getCellByContainerId(Et(e))}getCellByContainerId(t){return this.getCellById(t)}static fromTable(t){const e=TN(t),r=this.caches.getSync(e,()=>(en.debug("create table grid"),new Ox(t)));return r.table!==t?(this.caches.delete(e),this.fromTable(t)):r}static fromBlock(t){return this.fromTable(fn(t))}};let Kt=Ox;m(Kt,"caches",new zb(UN));function Nm(n,t){Object.entries(n).forEach(([e])=>{e.startsWith(`${t}/`)&&delete n[e]})}const PN=D("table-selection-range");function wi(n,t,e){var U,V,nt,Y;const r=Kt.fromBlock(n),i=t,o=e,s=r.getCellByContainerId(i.childContainerId),l=r.getCellByContainerId(o.childContainerId),c=i.custom,d=o.custom,h=(U=c==null?void 0:c.rowIndex)!=null?U:s.row,C=(V=c==null?void 0:c.colIndex)!=null?V:s.col,E=(nt=d==null?void 0:d.rowIndex)!=null?nt:l.row+l.rowSpan-1,A=(Y=d==null?void 0:d.colIndex)!=null?Y:l.col+l.colSpan-1,v=Math.min(h,E),R=Math.max(h,E),S=Math.min(C,A),M=Math.max(C,A);return{fromRow:v,toRow:R,fromCol:S,toCol:M}}function vE(n,t){const e=new Set,r=new Set,i=n.selection.range;if(!i.isSimple()&&i.start.blockId===dt(t)){const o=Kt.fromBlock(t),{start:s,end:l}=i;p(PN,!s.isSimple()&&!l.isSimple(),"invalid range");const{fromCol:c,toCol:d,fromRow:h,toRow:C}=wi(t,s,l);if(h===0&&C===o.rowCount-1)for(let E=c;E<=d;E++)r.add(E);if(c===0&&d===o.colCount-1)for(let E=h;E<=C;E++)e.add(E)}return{selectedRows:e,selectedColumns:r}}function Ad(n,t){let e=null;if(t.isCollapsed()&&t.isSimple()){const r=n.getBlockById(t.start.blockId);if(dn(r)){const i=at(r),o=et(i);o&&(e=is(o))}else e=is(r)}else{const r=n.getBlockById(t.start.blockId),i=is(r),o=n.getBlockById(t.end.blockId),s=is(o);i===s&&(e=i)}return e}const lu=D("delete-columns");function P2(n,t,e){const{start:r,end:i}=e;if(r.blockId!==i.blockId||e.isSimple()||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{fromRow:s,toRow:l}=wi(t,e.start,e.end),c=Kt.fromBlock(t);return s===0&&l===c.rowCount-1}function BE(n){const t=n.getEditor();t.undoManager.runInGroup(()=>{var V,nt;const e=t.getBlockById(n.start.blockId);if(!P2(t,e,n))return;if(n.isSimple()){t.deleteBlock(e);return}const{fromCol:r,toCol:i}=wi(e,n.start,n.end),o=Kt.fromBlock(e);if(r===0&&i===o.colCount-1){t.deleteBlock(e);return}const s=new Set,l=o.map(Y=>Y.containerId);for(let Y=0;Y<l.length;Y++){const X=l[Y];for(let ft=r;ft<=i;ft++){const pt=X[ft];s.add(pt)}X.splice(r,i-r+1)}const c=new Set(l.flat()),d=new Set(Array.from(s).filter(Y=>!c.has(Y))),h=i-r+1,C=new Map,E=new Map;s.forEach(Y=>{if(d.has(Y))return;const X=o.getCellByContainerId(Y);if(p(lu,X.colSpan>1,"invalid effected cell, colSpan === 1"),X.col<r){p(lu,c.has(Y),"invalid effected cell, not exists");let Jt=X.col+X.colSpan-1;Jt>i&&(Jt=i);const ce=Jt-r+1,Oe=X.colSpan-ce;C.set(Y,Oe);return}p(lu,X.col<=i,"invalid effected cell, col > endCol");const ft=X.col,pt=X.col+X.colSpan-1,ct=X.col-r,wt=pt-ft+1-h+ct;p(lu,wt>0,"invalid effected cell, newSpanned <= 0");const Bt=Yo(t.doc);E.set(Y,{newContainerId:Bt,colSpan:wt})});for(let Y=0;Y<l.length;Y++){const X=l[Y];for(let ft=r;ft<X.length;ft++){const pt=X[ft],ct=E.get(pt);ct&&(X[ft]=ct.newContainerId)}}const A=xt.default(t.getBlockData(e));((V=A.colsWidth)!=null?V:new Array(A.cols).fill(0)).splice(r,i-r+1),d.forEach(Y=>{Nm(A,Y)}),C.forEach((Y,X)=>{p(lu,Y>=1,"invalid modified colSpan, colSpan < 1"),Y===1?A[`${X}_colSpan`]=void 0:A[`${X}_colSpan`]=Y}),E.forEach((Y,X)=>{Nm(A,X);const{newContainerId:ft,colSpan:pt}=Y;p(lu,pt>=1,"invalid newContainerData, colSpan < 1"),pt>1&&(A[`${ft}_colSpan`]=pt);const ct=o.getCellByContainerId(X).rowSpan;ct>1&&(A[`${ft}_rowSpan`]=ct)});const R=(nt=l[0][r])!=null?nt:l[0][r-1],S=t.getChildContainerData(R)[0],M=Kt.virtualCellContainersGridToChildren(l),U={...A,cols:A.cols-h,children:M};hl(U),t.updateBlockData(e,U,Ie(t,S.id,0)),t.deleteChildContainers(Array.from(d)),t.deleteChildContainers(Array.from(E.keys()))})}const au=D("delete-rows");function F2(n,t,e){const{start:r,end:i}=e;if(r.blockId!==i.blockId||e.isSimple()||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{fromCol:s,toCol:l}=wi(t,e.start,e.end),c=Kt.fromBlock(t);return s===0&&l===c.colCount-1}function yE(n){const t=n.getEditor();t.undoManager.runInGroup(()=>{const e=t.getBlockById(n.start.blockId);if(!F2(t,e,n))return;if(n.isSimple()){t.deleteBlock(e);return}const{fromRow:r,toRow:i}=wi(e,n.start,n.end),o=Kt.fromBlock(e);if(r===0&&i===o.rowCount-1){t.deleteBlock(e);return}const s=new Set,l=o.map(U=>U.containerId);for(let U=i;U>=r;U--)l[U].forEach(nt=>s.add(nt)),l.splice(U,1);const c=new Set(l.flat()),d=new Set(Array.from(s).filter(U=>!c.has(U))),h=i-r+1,C=new Map,E=new Map;s.forEach(U=>{if(d.has(U))return;const V=o.getCellByContainerId(U);if(p(au,V.rowSpan>1,"invalid effected cell, rowSpan === 1"),V.row<r){p(au,c.has(U),"invalid effected cell, not exists");let ct=V.row+V.rowSpan-1;ct>i&&(ct=i);const wt=ct-r+1,Bt=V.rowSpan-wt;C.set(U,Bt);return}p(au,V.row<=i,"invalid effected cell, col > endCol");const nt=V.row,Y=V.row+V.rowSpan-1,X=V.row-r,ft=Y-nt+1-h+X;p(au,ft>0,"invalid effected cell, newSpanned <= 0");const pt=Yo(t.doc);E.set(U,{newContainerId:pt,rowSpan:ft})});for(let U=r;U<l.length;U++){const V=l[U];for(let nt=0;nt<V.length;nt++){const Y=V[nt],X=E.get(Y);X&&(V[nt]=X.newContainerId)}}const A=xt.default(t.getBlockData(e));d.forEach(U=>{Nm(A,U)}),C.forEach((U,V)=>{p(au,U>=1,"invalid modified rowSpan, rowSpan < 1"),U===1?A[`${V}_rowSpan`]=void 0:A[`${V}_rowSpan`]=U}),E.forEach((U,V)=>{Nm(A,V);const{newContainerId:nt,rowSpan:Y}=U;p(au,Y>=1,"invalid newContainerData, rowSpan < 1"),Y>1&&(A[`${nt}_rowSpan`]=Y);const X=o.getCellByContainerId(V).colSpan;X>1&&(A[`${nt}_colSpan`]=X)});const v=l[r]?l[r][0]:l[r-1][0],R=t.getChildContainerData(v)[0],S=Kt.virtualCellContainersGridToChildren(l),M={...A,rows:A.rows-h,children:S};hl(M),t.updateBlockData(e,M,Ie(t,R.id,0)),t.deleteChildContainers(Array.from(d)),t.deleteChildContainers(Array.from(E.keys()))})}const xd=D("table-range");function Pm(n){p(xd,!n.isSimple(),"must be complex selection range");const{anchor:t,focus:e}=n;p(xd,!t.isSimple(),"invalid start pos type"),p(xd,!e.isSimple(),"invalid end pos type");const r=n.getEditor();p(xd,t.blockId===e.blockId,"invalid range, not same block");const i=r.getBlockById(t.blockId);p(xd,Ot(i)==="table","invalid block type, not a table block");const o=fn(i),s=Kt.fromTable(o),l=s.getCellByContainerId(t.childContainerId),c=s.getCellByContainerId(e.childContainerId),d=Math.min(l.row,c.row),h=Math.max(l.row,c.row),C=Math.min(l.col,c.col),E=Math.max(l.col,c.col),A=s.getCell({row:d,col:C}),v=s.getCell({row:h,col:E});return{editor:r,block:i,table:o,startCell:A,endCell:v,startRow:d,startCol:C,endRow:h,endCol:E}}const TE=D("split-cell");function kE(n,t,e){n.undoManager.runInGroup(()=>{const r=Kt.fromBlock(t),i=r.getRealCell(e);p(TE,!i.virtual,"should not split virtual cell"),p(TE,i.colSpan>1||i.rowSpan>1,"cell does not has span data");const o=r.getVirtualCellContainersGrid(),s=[];for(let A=0;A<i.rowSpan;A++)for(let v=0;v<i.colSpan;v++){if(A===0&&v===0)continue;const R=A+i.row,S=v+i.col,M=Yo(n.doc);o[R][S]=M,s.push(M)}const l=n.getBlockData(t),c=xt.default(l);c[`${i.containerId}_colSpan`]=null,c[`${i.containerId}_rowSpan`]=null;const d=i.background;d&&s.length>0&&s.forEach(A=>{c[`${A}_background`]=d}),c.children=Kt.virtualCellContainersGridToChildren(o);const C=n.getChildContainerData(i.containerId)[0];p(TE,C,"no child block");const E=Ie(n,C.id,0);hl(c),n.updateBlockData(t,c,E)})}function FN(n,t,e){e.forEach(r=>{const i=Kt.fromBlock(t).getCell(r);(i.virtual||i.colSpan>1||i.rowSpan>1)&&kE(n,t,r)})}function K2(n,t,e){if(e.isSimple())return!1;const{start:r,end:i}=e;if(r.blockId!==i.blockId||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{startCell:s,endCell:l}=Pm(e);return!(s.cell!==l.cell||s.colSpan===1&&s.rowSpan===1)}function RE(n){const{editor:t,block:e,startRow:r,startCol:i,endRow:o,endCol:s}=Pm(n),l=[];for(let c=r;c<=o;c++)for(let d=i;d<=s;d++)l.push({row:c,col:d});return FN(t,e,l),!0}const cu=D("merge-cells");function V2(n,t,e){if(e.isSimple())return!1;const{start:r,end:i}=e;if(r.blockId!==i.blockId||n.getBlockById(r.blockId)!==t||Ot(t)!=="table")return!1;const{startCell:s,endCell:l}=Pm(e);return s.cell!==l.cell}function $2(n){const t=Pm(n),e=t.editor;e.undoManager.runInGroup(()=>{const r=t.endCell,i=r.row+r.rowSpan-1,o=r.col+r.colSpan-1,s=dt(t.block);RE(n);const l=e.getBlockById(s),c=fn(l),{startRow:d,startCol:h}=t,C=xt.default(e.getBlockData(l));p(cu,C.children,"no table children");const E=Kt.fromTable(c),A=[];for(let ct=d;ct<=i;ct++)for(let wt=h;wt<=o;wt++){const Bt=E.getCell({row:ct,col:wt});p(cu,!Bt.virtual,"cell is virtual"),A.push(Bt)}p(cu,A.length>0,"no selected cells");const v=A[0],R=A.slice(1),S=E.getCellByContainerId(v.containerId).container,M=[];R.forEach(ct=>{const wt=E.getCellByContainerId(ct.containerId).container,Bt=Et(wt);if(!Of(e,wt)){const Jt=J5(e,Bt);if(Of(e,S)){const ce=ke(S)[0];e.insertDocAt(S,0,Jt),e.deleteBlock(ce)}else e.insertDocAt(S,qi(S),Jt)}M.push(Bt)});const U=Et(S),V=o-h+1,nt=i-d+1;C[`${U}_colSpan`]=V,C[`${U}_rowSpan`]=nt,M.forEach(ct=>{p(cu,C.children,"no table children");const wt=C.children.indexOf(ct);p(cu,wt>0,"no deleted container"),C.children.splice(wt,1)});const Y=C,ft=e.getChildContainerData(U)[0];p(cu,ft,"no child block");const pt=Ie(e,ft.id,0);hl(Y),e.updateBlockData(l,Y,pt),e.deleteChildContainers(M)})}const wE=10,KN=["table/merge-cells","table/split-cell","table/insert-column","table/insert-row","table/delete-rows","table/delete-columns","table/delete"];class Fm{constructor(){m(this,"id","TableBlockCommandProvider")}getAvailableCommands(t,e,r){if(Ot(e)!=="table")return[];const i={blockId:dt(e),blockKind:Ci(t,e),blockType:Ot(e)},o=[];V2(t,e,r)&&o.push({id:"table/merge-cells",name:_.t("table.mergeCell"),icon:yT,groupIndex:wE,...i}),K2(t,e,r)&&o.push({id:"table/split-cell",name:_.t("table.splitCell"),icon:TT,groupIndex:wE,...i});const s=P2(t,e,r),l=F2(t,e,r);return s&&l&&o.push({id:"table/delete",name:_.t("table.deleteTable"),icon:kT,groupIndex:wE,...i}),o}executeCommand(t,e,r,i,o,s){return Ot(e)!=="table"||!new Set(KN).has(i.id)?!1:i.id==="table/merge-cells"?($2(r),!0):i.id==="table/split-cell"?(RE(r),!0):i.id==="table/delete-columns"?(BE(r),!0):i.id==="table/delete-rows"?(yE(r),!0):i.id==="table/delete"?(t.deleteBlock(e),!0):!1}}var H2=(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))(H2||{});const uu=6,bd=20,SE="table-cell-menu-btn";function VN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasColTitle:!0};n.updateBlockData(t,r)}function $N(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasColTitle:!1};n.updateBlockData(t,r)}function HN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasRowTitle:!0};n.updateBlockData(t,r)}function jN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),hasRowTitle:!1};n.updateBlockData(t,r)}function zN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),isStripeStyle:!0};n.updateBlockData(t,r)}function GN(n,t){if(!n.isBlockWritable(t))return;const r={...xt.default(n.getBlockData(t)),isStripeStyle:!1};n.updateBlockData(t,r)}function WN(n,t,e){if(!n.isBlockWritable(t))return;const i={...xt.default(n.getBlockData(t)),noBorder:!e};n.updateBlockData(t,i)}const os=D("table-cell-dom");function qN(n,t,e){let r=n.getBlockById(e);for(;r;){const i=r.closest("td");p(os,i,"no parent cell");const o=et(i);if(p(os,o,"no parent block"),o===t)return i;r=o}return p(os,!1,"filed to get cell by child block id"),null}function ml(n,t,e){if(n.getBlockById(e.blockId)===t&&!e.isSimple())return p(os,e.childContainerId,"block position must have childContainerId attribute"),e;const i=qN(n,t,e.blockId),o=Et(Ed(i));return Ue(t,o)}function LE(n,t){const e=n.selection.range,r=ml(n,t,e.start),i=ml(n,t,e.end);return wi(t,r,i)}function j2(n,t,e,r){p(os,dn(t),"invalid table block");const i=ao(n,t),o=ve(t),s=()=>{const c=i.querySelector(".table-border-bar-container.top");p(os,c,"no top border bar container"),c.querySelectorAll(".table-border-bar-cell.top").forEach(h=>{const C=parseInt(h.getAttribute("data-top-index")||"0",10);r.includes(C)?q(h,"danger"):ut(h,"danger")})},l=()=>{const c=o.querySelector(".table-border-bar-container.left");p(os,c,"no left border bar container"),c.querySelectorAll(".table-border-bar-cell.left").forEach(h=>{const C=parseInt(h.getAttribute("data-left-index")||"0",10);e.includes(C)?q(h,"danger"):ut(h,"danger")})};s(),l()}function gl(n,t,e=!0,r){try{const o=Kt.fromBlock(t).map(h=>h),{fromCol:s,toCol:l,fromRow:c,toRow:d}=LE(n,t);for(let h=0;h<o.length;h++){const C=o[h];for(let E=0;E<C.length;E++){const A=C[E],v=r?E>=s&&E+A.colSpan-1<=l:h>=c&&h+A.rowSpan-1<=d;e&&v?A.virtual||q(A.cell,"danger"):A.virtual||ut(A.cell,"danger")}}}catch(i){os.error("update cells danger status failed: ",i.message)}}function pl(n,t,e=!0,r){try{const i=new Set,o=new Set;if(!e){j2(n,t,Array.from(i),Array.from(o));return}const{fromCol:s,toCol:l,fromRow:c,toRow:d}=LE(n,t);if(r)for(let h=s;h<=l;h++)o.add(h);else for(let h=c;h<=d;h++)i.add(h);j2(n,t,Array.from(i),Array.from(o))}catch(i){os.error("update cell bars danger status failed: ",i.message)}}function z2(n,t,e){const{fromCol:r,toCol:i,fromRow:o,toRow:s}=LE(n,t),l=Kt.fromBlock(t);let c=null,d=null;return e?(c=l.getCell({col:r,row:0}),d=l.getCell({col:i,row:l.rowCount-1}),En(n,{anchor:Ue(t,c.containerId,{colIndex:r,rowIndex:0}),focus:Ue(t,d.containerId,{colIndex:i,rowIndex:l.rowCount-1})})):(c=l.getCell({col:0,row:o}),d=l.getCell({col:l.colCount-1,row:s}),En(n,{anchor:Ue(t,c.containerId,{colIndex:0,rowIndex:o}),focus:Ue(t,d.containerId,{colIndex:l.colCount-1,rowIndex:s})}))}const G2=["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 W2(n){return`style-bg-color-${n}`}function fu(n){return`${n}_background`}function XN(n,t,e){const r=fn(n),s=(e!=null?e:Kt.fromTable(r)).getCell(t).cell;for(let l=0;l<G2.length;l++){const c=G2[l];if(Mt(s,c))return c}}function q2(n,t,e){if(!n.isBlockWritable(t))return;const r=n.selection.range,o={...xt.default(n.getBlockData(t))},s=ml(n,t,r.start),l=ml(n,t,r.end);if(r.isSimple()){const c=s.childContainerId;e===-1?o[fu(c)]=void 0:o[fu(c)]=W2(e)}else{const c=Kt.fromBlock(t),d=wi(t,s,l),h=new Set;for(let C=d.fromRow;C<=d.toRow;C++)for(let E=d.fromCol;E<=d.toCol;E++){const A=c.getCell({row:C,col:E});!h.has(A.containerId)&&A.col>=d.fromCol&&A.row>=d.fromRow&&A.col+A.colSpan-1<=d.toCol&&A.row+A.rowSpan-1<=d.toRow&&(h.add(A.containerId),e===-1?o[fu(A.containerId)]=void 0:o[fu(A.containerId)]=W2(e))}}n.updateBlockData(t,o)}function YN(n,t,e){if(!n.isBlockWritable(t))return;const i={...xt.default(n.getBlockData(t)),chart:e};n.updateBlockData(t,i)}const X2=D("table-chart");function QN(n,t){const e=yN(n,t);if(e){const r=e.querySelector(".editor-table-chart");if(r){const i=r.chartObject;i&&i.destroy(),r.remove()}}}function Km(n){var t;return(t=n.textContent)!=null?t:""}async function JN(n,t){if(!n.contains(t)||!n.isBlockWritable(t))return;if(!!!n.getBlockData(t).chart){QN(n,t);return}const i=[],o=Kt.fromBlock(t),s=["line","bar","pie","radar"],l=o.getCell({row:0,col:0}).container;let c=Km(l).trim().toLowerCase();new Set(s).has(c)||(c=s[0]);const d=[];for(let S=1;S<o.colCount;S++)d.push(Km(o.getCell({row:0,col:S}).container));for(let S=1;S<o.rowCount;S++){const M=o.getCell({row:S,col:0}),U=M.container,V=Km(U),nt=[];for(let ce=1;ce<o.colCount;ce++){const Oe=Km(o.getCell({row:S,col:ce}).container),pe=Number.parseFloat(Oe)||0;nt.push(pe)}let Y;const X=XN(t,M,o);X?Y=window.getComputedStyle(n.rootElement).getPropertyValue(`--${X}`).trim():Y=window.getComputedStyle(n.rootElement).getPropertyValue("--background-color").trim();let[ft,pt,ct,wt]=Y?Lp.fromString(Y).toRgbaArray():[];if(!ft&&!pt&&!ct&&!wt){const ce=(S-1)%n.options.colors.length;Y=n.options.colors[ce],[ft,pt,ct,wt]=Lp.fromString(Y).toRgbaArray()}const Bt=Y,Jt=Lp.fromRgba([ft,pt,ct,wt/3]).toHexString();i.push({label:V,data:nt,borderColor:Bt,backgroundColor:Jt,borderWidth:2})}const h=ao(n,t);let C=null,E=h.querySelector(".editor-table-chart");E?C=E.chartObject:E=B("div",["editor-table-chart"],h);const A=E;p(X2,A,"no chart container");const v=n.getComponentOptions("table"),R=(v==null?void 0:v.chartCdn)||"https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js";try{await ra(R,"editor-chartjs");let S=!1;(C&&C.config.data.datasets.length>i.length||C&&C.config.data.datasets[0].data.length>i[0].data.length)&&(S=!0),C&&(c!==C.config.type||S)&&(C.destroy(),C=null,Array.from(E.querySelectorAll(".editor-chartjs-canvas")).forEach(V=>{V.remove()}));const M=Dp.default({},{type:c,data:{datasets:i,labels:d},options:{onClick:()=>{n.selection.selectBlock(t,0,0)}}});if(C)Dp.default(C.config,M),C.update();else{const V=B("canvas",["editor-chartjs-canvas"],A).getContext("2d");C=new window.Chart(V,M),E.chartObject=C}}catch(S){X2.error(`failed to resolve chart cdn: ${JSON.stringify(S)}`)}}async function Y2(n,t){await No.lock("updateTableChart");try{await JN(n,t)}finally{No.release("updateTableChart")}}const Q2=Pe.default(Y2,1e3);let J2=null;function IE(n,t,e){if(J2!==t&&(Q2.flush(),J2=t),e.updateNow){Y2(n,t);return}Q2(n,t)}function DE(n,t,e){e&&dn(e)&&IE(n,e,{updateNow:!1})}function ZN(n,t){dn(t)&&IE(n,t,{updateNow:!0})}const Zr={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"},Vm={SCROLL_BAR:"container-scrollbar",FIXED:"fixed"},Cl={SCROLL_CONTAINER:"scroll-container",TOOL:"container-scroll-tool",CONTAINER:"scroll-container-root",MAC:"mac",SCROLL_AREA:"scroll-area"};function vd(n,t){return n.containers.get(t)}function Z2(n){return n.closest(`.${Cl.SCROLL_CONTAINER}`)}function Si(n){return n.firstElementChild}function er(n){return n.closest(`.${Cl.CONTAINER}`)}function Bd(n){const t=er(n);let e=t.querySelector(`:scope >.${Cl.TOOL}`);return e||(e=B("div",[Cl.TOOL],t)),e}function tP(n){return er(n).firstElementChild}function eP(n,t){const e=vd(n,er(t));return e!=null&&e.barFloatWindowBottom?typeof e.barFloatWindowBottom=="function"?e.barFloatWindowBottom():e.barFloatWindowBottom:0}function ti(n,t){const e=Hr(n);return t/e}function yd(n){const t=window.getComputedStyle(n),e=Hr(n);return{paddingBottom:parseFloat(t.paddingBottom)*e,paddingTop:parseFloat(t.paddingTop)*e,paddingLeft:parseFloat(t.paddingLeft)*e,paddingRight:parseFloat(t.paddingRight)*e}}function du(n){const t=Hr(n);return{scrollLeft:n.scrollLeft*t,scrollWidth:n.scrollWidth*t,clientWidth:n.clientWidth*t,clientHeight:n.clientHeight*t}}function nP(n,t){const e=Hr(n);return n[t]*e}function _E(n,t){const e=er(t),r=vd(n,e),i=(r==null?void 0:r.safeRightSpace)||0,o=(r==null?void 0:r.safeLeftSpace)||0,l=(r==null?void 0:r.locatingContainer).getBoundingClientRect(),c=e.getBoundingClientRect(),d=c.width;let h=Math.floor(c.left-l.left-o);h<0&&(h=0);let C=l.right;C-=i;let E=C-c.right;return E<0&&(E=0),h=Math.round(h),E=Math.round(E),{originWidth:d,maxLeft:h,maxRight:E}}function rP(n,t){const e=_E(n,t),{maxLeft:r}=e;t.style.marginLeft=`${ti(t,0-r)}px`,t.style.paddingLeft=`${ti(t,r)}px`}function iP(n,t){const e=_E(n,t);t.style.marginRight=`${ti(t,0-e.maxRight)}px`}function oP(n){if(n!==document.documentElement&&n!==document.body)return n.getBoundingClientRect();const t=0,e=0,r=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return new DOMRect(t,e,r,i)}const tk=D("scroll-bar-handle"),sP=2;function hu(n){const t=Bd(n);let e=t.querySelector(`.${Vm.SCROLL_BAR}`);return e||(e=B("div",[Vm.SCROLL_BAR],t),me.isWindows&&me.isFirefox&&(e.style.minHeight="10px")),p(tk,e instanceof HTMLDivElement,"invalid child for container tools"),e.firstElementChild||B("div",[],e),e}function $m(n,t){const e=Z2(t),r=hu(e),{scrollWidth:i,clientWidth:o}=du(e),{paddingLeft:s,paddingRight:l}=yd(t),c=_E(n,e),{originWidth:d,maxRight:h}=c;iP(n,e),rP(n,e);const C=i-o;p(tk,r.firstElementChild instanceof HTMLDivElement,"invalid child for scroll bar"),r.style.width=`${ti(e,d+h-s-l)}px`,r.firstElementChild.style.width=`${ti(e,d+h+C-s-l)}px`}function lP(n,t){const e=Si(n),{paddingLeft:r}=yd(e);if(Mt(t,"fixed")){const o=er(n).getBoundingClientRect();t.style.left=`${ti(n,o.left+r)}px`}else t.style.left=`${ti(n,r)}px`}function mu(n,t){var U;const e=n.getParentScrollContainer(),r=oP(e),i=t.getBoundingClientRect(),o=hu(t),s=o.getBoundingClientRect(),l=vd(n,er(t)),c=eP(n,t),d=Si(t),{paddingTop:h,paddingBottom:C}=yd(d),{scrollWidth:E,clientWidth:A}=du(t),v=document.documentElement.clientHeight-c,R=r.top+du(e).clientHeight-v,S=v+Math.min(0,R);if(E>A&&i.top+h<S-s.height&&i.bottom>S-s.height+C&&!((U=l==null?void 0:l.isSetScale)!=null&&U.call(l))){l!=null&&l.allowScrollBarFixed&&q(o,Vm.FIXED);const V=R>0?c:0;o.style.bottom=`${Math.max(document.documentElement.clientHeight-r.bottom,0)+sP+V}px`}else ut(o,Vm.FIXED),o.style.bottom=`${ti(t,C-s.height)}px`;lP(t,o)}class aP{constructor(t,e){m(this,"intersectionObserver");m(this,"handleIntersection",t=>{t.forEach(e=>{this.containers.get(er(e.target))?(this.handleIntersectionEntry(e),this.callback(e)):this.intersectionObserver.unobserve(e.target)})});m(this,"handleIntersectionEntry",t=>{const e=t.target;mu(this.scrollCore,e);const r=Si(e);$m(this.scrollCore,r)});this.scrollCore=t,this.callback=e;const i={root:this.scrollCore.getParentScrollContainer(),rootMargin:"20px",threshold:0};this.intersectionObserver=new IntersectionObserver(this.handleIntersection,i)}get containers(){return this.scrollCore.containers}bind(t){this.unbind(t),this.intersectionObserver.observe(t)}unbind(t){this.intersectionObserver.unobserve(t)}destroy(){this.intersectionObserver.disconnect()}}const Ta=D("container-scroll-shadow");function ek(n,t,e){const r=n,i=t.getBoundingClientRect(),o=e.getBoundingClientRect(),{paddingTop:s,paddingBottom:l}=yd(e);r.style.top=`${ti(t,o.top-i.top+s)}px`,r.style.bottom=`${ti(t,i.bottom-o.bottom+l)}px`}function nk(n,t){const e=n;t<24?e.style.width=`${(t/3).toFixed(2)}px`:e.style.width=""}function cP(n){const t=Bd(n);p(Ta,t,"no container tools");let e=t.querySelector(`.${Zr.LEFT}`);if(!e){const l=Si(n),c=[Zr.COMMON,Zr.LEFT];e=B("div",c,t),p(Ta,e instanceof HTMLDivElement,"invalid child for container tools"),ek(e,n,l)}p(Ta,e instanceof HTMLElement,"invalid child for container tools");const i=er(n).getBoundingClientRect(),o=n.getBoundingClientRect();e.style.left=`${ti(n,o.left-i.left)}px`;const s=du(n).scrollLeft;p(Ta,e instanceof HTMLDivElement,"invalid child for container tools"),nk(e,s),q(e,Zr.ACTIVE)}function uP(n){const t=Bd(n);let e=t.querySelector(`.${Zr.RIGHT}`);if(!e){const h=Si(n),C=[Zr.COMMON,Zr.RIGHT];e=B("div",C,t),p(Ta,e instanceof HTMLDivElement,"no div, create shadow failed"),ek(e,n,h)}p(Ta,e instanceof HTMLElement,"");const i=er(n).getBoundingClientRect(),o=n.getBoundingClientRect();e.style.right=`${ti(n,i.right-o.right)}px`;const{scrollWidth:s,scrollLeft:l,clientWidth:c}=du(n),d=s-l-c;p(Ta,e instanceof HTMLDivElement,"no shadow element"),nk(e,d),q(e,Zr.ACTIVE)}function fP(n){const e=Bd(n).querySelector(`.${Zr.LEFT}`);e&&ut(e,Zr.ACTIVE)}function dP(n){const e=Bd(n).querySelector(`.${Zr.RIGHT}`);e&&ut(e,Zr.ACTIVE)}function Td(n){const{scrollLeft:t,scrollWidth:e,clientWidth:r}=du(n),i=Si(n),{paddingLeft:o,paddingRight:s}=yd(i),l=nP(i,"offsetLeft");e-o<=r-s||e-o<=t+r-s?dP(n):uP(n),i&&t>=l+o?cP(n):fP(n)}class hP{constructor(t,e){m(this,"resizeObserver");m(this,"handleResizeEntry",t=>{const e=t.target,r=Si(e);Td(e),$m(this.scrollCore,r),mu(this.scrollCore,e),this.callback(e)});m(this,"handleContentResize",t=>{t.forEach(e=>{this.containers.get(er(e.target))?this.handleResizeEntry(e):this.unbind(e.target)})});this.scrollCore=t,this.callback=e,this.resizeObserver=new Zl(this.handleContentResize)}get containers(){return this.scrollCore.containers}bind(t){this.unbind(t),this.resizeObserver.observe(t)}unbind(t){this.resizeObserver.unobserve(t)}destroy(){this.resizeObserver.disconnect()}}const rk=D("container-scroll-observer");class mP{constructor(t,e){m(this,"handleContentScroll",t=>{const e=t.target;p(rk,e instanceof Element,"invalid target for scroll event");const r=hu(e);r.removeEventListener("scroll",this.handleScroll);const i=!0;this.fixScrollXPos(e,e.scrollLeft,i),this.bind(r),Td(e),this.callback(e)});m(this,"handleScroll",t=>{const e=t.target;p(rk,e instanceof HTMLElement,"");const r=e.scrollLeft,i=!1,o=tP(e);this.unbindContentScroll(o),this.fixScrollXPos(o,r,i),this.bindContentScroll(o),Td(o),this.callback(o)});m(this,"handlePrevent",t=>{t.stopPropagation()});m(this,"bindContentScrollCore",t=>{this.unbindContentScroll(t),t.addEventListener("scroll",this.handleContentScroll)});m(this,"unbindContentScroll",t=>{t.removeEventListener("scroll",this.handleContentScroll)});m(this,"bindContentScroll",Pe.default(this.bindContentScrollCore,300));m(this,"bind",Pe.default(this.bindCore,200));this.scrollCore=t,this.callback=e}fixScrollXPos(t,e,r){const i=hu(t);r||(t.scrollLeft=e),r&&i.scrollLeft!==e&&(i.scrollLeft=e)}bindCore(t){this.unbind(t),t.addEventListener("scroll",this.handleScroll),t.addEventListener("mousedown",this.handlePrevent)}unbind(t){t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("mousedown",this.handlePrevent)}}class gP{constructor(t){m(this,"scrollContainers",new Set);m(this,"handleParentContainerScroll",()=>{this.scrollContainers.forEach(t=>{mu(this.scrollCore,t)})});m(this,"bindScrollContainer",t=>{const e=this.scrollContainers.size===0;this.scrollContainers.add(t),e&&this.eventTarget.addEventListener("scroll",this.handleParentContainerScroll)});m(this,"unbindScrollContainer",t=>{let e=!1;this.scrollContainers.has(t)&&(this.scrollContainers.delete(t),e=this.scrollContainers.size===0),e&&this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll)});this.scrollCore=t}get eventTarget(){const t=this.scrollCore.getParentScrollContainer();return t===document.documentElement?document:t}destroy(){this.eventTarget.removeEventListener("scroll",this.handleParentContainerScroll),this.scrollContainers.clear()}}const pP=D("scroll-wrap-resize-observer");class CP{constructor(t){m(this,"resizeObserver");m(this,"handleScrollWrapResize",t=>{t.forEach(e=>{this.containers.get(er(e.target))?this.handleScrollWrapResizeEntry(e):this.unbind(e.target)})});m(this,"handleScrollWrapResizeEntry",t=>{const e=t.target;p(pP,e instanceof HTMLElement,"invalid target for observer entry");const r=Z2(e);$m(this.scrollCore,e),Td(r),mu(this.scrollCore,r)});this.scrollCore=t,this.resizeObserver=new Zl(this.handleScrollWrapResize)}get containers(){return this.scrollCore.containers}bind(t){this.unbind(t),this.resizeObserver.observe(t)}unbind(t){this.resizeObserver.unobserve(t)}destroy(){this.resizeObserver.disconnect()}}class EP{constructor(t,e){m(this,"resizeObserver");m(this,"scrollContainersMap",new Map);m(this,"handleResizeEntry",t=>{t==null||t.forEach(e=>{const r=Si(e);Td(e),$m(this.scrollCore,r),mu(this.scrollCore,e),this.callback(e)})});m(this,"handleResize",t=>{t.forEach(e=>{const r=this.scrollContainersMap.get(e.target);r!=null&&r.length&&this.handleResizeEntry(r)})});this.scrollCore=t,this.callback=e,this.resizeObserver=new Zl(this.handleResize)}bind(t){var i,o;const e=er(t),r=(i=vd(this.scrollCore,e))==null?void 0:i.locatingContainer;this.scrollContainersMap.has(r)?(o=this.scrollContainersMap.get(r))==null||o.push(t):(this.scrollContainersMap.set(r,[t]),this.resizeObserver.observe(r))}unbind(t){var o,s;const e=er(t),r=(o=vd(this.scrollCore,e))==null?void 0:o.locatingContainer;if(!r)return;const i=this.scrollContainersMap.get(r);this.scrollContainersMap.set(r,(i==null?void 0:i.filter(l=>l!==t))||[]),(s=this.scrollContainersMap.get(r))!=null&&s.length||(this.resizeObserver.unobserve(r),this.scrollContainersMap.delete(r))}destroy(){this.scrollContainersMap.clear(),this.resizeObserver.disconnect()}}const Cat="";class AP extends je.TypedEmitter{constructor(e){super();m(this,"containerIntersectionObserver",null);m(this,"containerResizeObserver",null);m(this,"containerScrollObserver",null);m(this,"parentContainerScrollObserver",null);m(this,"scrollWrapResizeObserve",null);m(this,"locatingContainerResizeObserver",null);m(this,"isWindowEventBind",!1);m(this,"containers",new Map);m(this,"handleScrollContainerScroll",e=>{this.emit("scroll",this,e)});m(this,"handleResize",e=>{this.emit("resize",this,e)});m(this,"handleIntersection",e=>{const r=e.target,i=Si(r);e.isIntersecting?(this.load(),this.bindCore(r,i)):this.unbindCore(r,i)});m(this,"handleWindowEffect",()=>{var e;(e=this.getScrollContainerInViewable())==null||e.forEach(r=>{mu(this,r)})});this.parentContainer=e}load(){this.containerResizeObserver||(this.containerResizeObserver=new hP(this,this.handleResize)),this.containerScrollObserver||(this.containerScrollObserver=new mP(this,this.handleScrollContainerScroll)),this.parentContainerScrollObserver||(this.parentContainerScrollObserver=new gP(this)),this.scrollWrapResizeObserve||(this.scrollWrapResizeObserve=new CP(this)),this.locatingContainerResizeObserver||(this.locatingContainerResizeObserver=new EP(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 e;return(e=this.parentContainerScrollObserver)==null?void 0:e.scrollContainers}unbindCore(e,r){var o,s,l,c,d,h;const i=hu(e);(o=this.containerScrollObserver)==null||o.unbindContentScroll(e),(s=this.containerScrollObserver)==null||s.unbind(i),(l=this.scrollWrapResizeObserve)==null||l.unbind(r),(c=this.containerResizeObserver)==null||c.unbind(e),(d=this.parentContainerScrollObserver)==null||d.unbindScrollContainer(e),(h=this.locatingContainerResizeObserver)==null||h.unbind(e)}bindCore(e,r){var s,l,c,d,h,C;if(this.unbindCore(e,r),!e.closest("body"))return;const i=hu(e);(s=this.containerScrollObserver)==null||s.bindContentScrollCore(e),(l=this.containerScrollObserver)==null||l.bindCore(i),(c=this.scrollWrapResizeObserve)==null||c.bind(r),(d=this.containerResizeObserver)==null||d.bind(e);const o=this.containers.get(er(e));o!=null&&o.allowScrollBarFixed&&((h=this.parentContainerScrollObserver)==null||h.bindScrollContainer(e)),(C=this.locatingContainerResizeObserver)==null||C.bind(e)}bind(e,r){this.containers.set(e,r);const i=e.firstElementChild;this.containerIntersectionObserver||(this.containerIntersectionObserver=new aP(this,this.handleIntersection)),this.containerIntersectionObserver.bind(i)}unbind(e){var o;const r=e.firstElementChild,i=Si(r);this.unbindCore(r,i),this.containers.delete(e),(o=this.containerIntersectionObserver)==null||o.unbind(r),this.containers.size||this.destroy()}destroy(){var e,r,i,o,s;this.containers.forEach((l,c)=>{this.unbind(c)}),this.containers.clear(),(e=this.parentContainerScrollObserver)==null||e.destroy(),(r=this.containerIntersectionObserver)==null||r.destroy(),(i=this.containerResizeObserver)==null||i.destroy(),(o=this.scrollWrapResizeObserve)==null||o.destroy(),(s=this.locatingContainerResizeObserver)==null||s.destroy(),window.removeEventListener("resize",this.handleWindowEffect),window.removeEventListener("scroll",this.handleWindowEffect)}}const ik=D("scroll-container"),Hm=new Map;class xP extends je.TypedEmitter{constructor(){super(...arguments);m(this,"scrollListener");m(this,"options");m(this,"scrollContainerElement");m(this,"init",e=>{this.options=e;const r=B("div",[Cl.CONTAINER],e.parentElement);me.isMac&&q(r,Cl.MAC);const i=B("div",[Cl.SCROLL_CONTAINER],r),o=B("div",[Cl.SCROLL_AREA],i);o.style.paddingLeft=e.paddingLeft?`${e.paddingLeft}px`:"",o.style.paddingTop=e.paddingTop?`${e.paddingTop}px`:"",o.style.paddingBottom=e.paddingBottom?`${e.paddingBottom}px`:"",o.style.paddingRight=e.paddingRight?`${e.paddingRight}px`:"",o.appendChild(e.childElement);const s=e.parentContainer;this.scrollListener=Hm.get(s),this.scrollListener||(this.scrollListener=new AP(s),Hm.set(s,this.scrollListener)),this.scrollListener.unbind(r),this.scrollListener.bind(r,e),this.scrollListener.on("scroll",this.handleContainerScroll),this.scrollListener.on("resize",this.handleResize),this.scrollContainerElement=i});m(this,"handleContainerScroll",(e,r)=>{r===this.scrollContainerElement&&this.emit("scroll",this)});m(this,"handleResize",(e,r)=>{r===this.scrollContainerElement&&this.emit("scroll",this)})}get rootElement(){return this.scrollContainerElement}get contentElement(){return p(ik,this.scrollContainerElement,"scrollContainerElement cannot be undefined"),Si(this.scrollContainerElement)}get scrollOptions(){return p(ik,this.options,"options cannot be undefined"),{...this.options}}handleBaseListenerDestroy(e){e.destroy()}destroy(){var r;(r=this.scrollListener)==null||r.off("scroll",this.handleContainerScroll);const e=er(this.contentElement);e&&Hm.forEach((i,o)=>{i.unbind(e),i.containers.size===0&&(this.handleBaseListenerDestroy(i),Hm.delete(o))})}}function bP(){return new xP}const ME=D("column-width");function vP(n,t,e){const r=kN(n,t);r.style.width=`${e}px`,r.style.minWidth=`${e}px`}function BP(n){const e=Array.from(n.querySelector("colgroup").children).map(c=>c.getBoundingClientRect().width);if(e[0]!==0)return e;const r=Kt.fromTable(n),i=Array(r.colCount).fill(-1),o=n.getBoundingClientRect().left;r.toRealCells(r.cells).forEach(c=>{const d=c.col+c.colSpan-1;i[d]===-1&&(i[d]=c.cell.getBoundingClientRect().right-o)}),ME.debug(`cellRightOffsets1: ${i.join()}`);for(let c=0;c<i.length;c++){const d=i[c];if(d===-1||c===0)continue;let h=c-1;for(;i[h]===-1&&(h--,h!==-1););const C=h===-1?0:i[h],A=(d-C)/(c-h);for(let v=h+1;v<c;v++)i[v]=C+A*(v-h)}ME.debug(`cellRightOffsets2: ${i.join()}`);const s=[];let l=0;for(let c=0;c<i.length;c++){const d=i[c];s.push(d-l),l=d}return ME.debug(`widths: ${s.join()}`),s}function kd(n){return Array.from(n.querySelector("colgroup").children).map(r=>r.getBoundingClientRect().width||Number.parseInt(r.style.width,10))}const UE=200,yP=40,TP=D("table-resize-gripper"),ok=7,OE=(ok-1)/2,kP=3;function RP(n,t,e){const{rows:r}=n;for(let i=0;i<r.length;i++){const o=r[i],s=Array.from(o.cells);for(let l=0;l<s.length;l++){const c=s[l],d=c.getBoundingClientRect(),h=Math.round(d.right);if(Math.abs(t-h)<=OE&&d.top<=e&&e<=d.bottom)return c}}return null}function wP(n){return!!n.rootContainer.querySelector(".table-resize-gripper")}function NE(n,t){return ao(n,t).querySelector(".table-resize-gripper")}function sk(n,t){const e=NE(n,t);p(TP,!e,"resize gripper has already exists");const r=ao(n,t),i=B("div",["table-resize-gripper","table-indicator"],r);return B("div",["table-resize-gripper-indicator"],i),i}function lk(n,t,e){let r=NE(n,t);r||(r=sk(n,t));const o=fn(t).getBoundingClientRect(),s=e.getBoundingClientRect(),l=0,c=o.height,d=n.getCustom(lo(t)).contentElement.getBoundingClientRect(),h=s.right-d.left;r.style.left=`${h-OE-uu-bd}px`,r.style.top=`${l}px`,r.style.height=`${c}px`,r.style.width=`${ok}px`}function PE(n){n.rootContainer.querySelectorAll(".table-resize-gripper").forEach(t=>{t.remove()})}function SP(n,t,e){const i={...n.getBlockData(t),colsWidth:e};n.updateBlockData(t,i,void 0,{noScroll:!0})}function LP(n,t,e,r){const i=t,o=Kt.fromTable(e),s=o.getCellByCellElement(i),l=s.col+s.colSpan-1,c=kd(e);let d=r;const h=(E,A)=>{const v=A+1,R=E.col+E.colSpan;return c.slice(v,R).reduce((M,U)=>M+U,0)},C=new Set;for(let E=0;E<o.rowCount;E++){const A=o.getCell({row:E,col:l});if(C.has(A.cell))continue;C.add(A.cell);const v=A.cell,R=v.getBoundingClientRect();let S=r-R.left+OE-kP;const M=Ed(v),U=x1(n,M)||yP*A.colSpan,V=h(A,l),nt=U-V;S<nt&&(S=nt);const Y=R.left+S;d=Math.max(d,Y)}return d}const IP=D("table-resize-drag-drop");class DP{constructor(t,e,r,i){m(this,"cursor","col-resize");this.editor=t,this.elem=e,this.data=r,this.onEnd=i}onDragStart(t,e,r){}onDragging(t,e,r,i,o){const{table:s,block:l,draggingRefCell:c}=t.data,h=LP(this.editor,c,s,e.x-t.dragOffsetX)-s.getBoundingClientRect().left;p(IP,c,"no dragging cell");const E=Kt.fromTable(s).getCellByCellElement(c),A=E.col+E.colSpan-1,v=kd(s),R=v.slice(0,A).reduce((M,U)=>M+U,0),S=h-R;if(vP(s,A,S),S){const M=parseFloat(s.style.minWidth);s.style.minWidth=`${M+(S-v[A])}px`}lk(this.editor,l,c),this.editor.selection.caret.update()}onDragEnd(t,e,r,i,o){const s=kd(t.data.table);SP(this.editor,t.data.block,s),PE(this.editor),this.onEnd&&(this.onEnd(e),this.onEnd=null)}}function _P(n,t){const e=Fe(t.x,t.y);if(!e)return null;const r=et(e);return!r||!n.contains(r)||!dn(r)?null:r}D("table-resize");class MP{constructor(t){m(this,"draggingRefCell",null);m(this,"handleMouseMove",(t,e)=>{if(t.readonly||window.isDragging||t.selectionHandler.isSelecting()&&!this.draggingRefCell||this.draggingRefCell)return;const r=e.target;if(!(r instanceof Element))return;const i=et(r);if(!i||Ot(i)!=="table"||r.closest(".table-indicator"))return;const s=e,l=_P(t,s);if(!l||!O2(l)||!t.isBlockWritable(l)){PE(t);return}this.updateGripper(l,s.x,s.y)});this.editor=t,t.domEvents.addEventListener(document,"mousemove",this.handleMouseMove)}destroy(){this.editor.domEvents.removeEventListener(document,"mousemove",this.handleMouseMove)}updateGripper(t,e,r){const i=fn(t),o=RP(i,e,r);if(o){if(!NE(this.editor,t)){if(wP(this.editor))return;const l=sk(this.editor,t),c={block:t,table:i,draggingRefCell:o};$p(new DP(this.editor,l,c,d=>{this.updateGripper(t,d.x,d.y)}))}lk(this.editor,t,o)}else PE(this.editor)}}function ak(n){n.addCustom("table-mouse-event-handler",t=>new MP(t))}const ck=D("table-insert-column");function uk(n,t,e){n.undoManager.runInGroup(()=>{var E;const r=fn(t),i=Kt.fromTable(r),o=i.colCount;p(ck,e>=0&&e<=o,`insert index ${e} is out of range [0, ${o}]`);const s=i.map(A=>A.containerId),l=new Set;n.doc.beginBatchUpdate();for(let A=0;A<s.length;A++){const v=s[A],R=v[e-1],S=v[e];if(e===0||e===v.length||R!==S){const M=Yo(n.doc);v.splice(e,0,M)}else v.splice(e,0,R),l.add(R)}n.doc.endBatchUpdate();const c=xt.default(n.getBlockData(t));l.forEach(A=>{const v=`${A}_colSpan`,R=c[v];p(ck,typeof R=="number"&&R>1,`no colSpan for containerId ${A}, ${R}`),c[v]=R+1});const d=((E=c.colsWidth)==null?void 0:E.concat())||new Array(c.cols).fill(0);d.splice(e,0,UE);const h=Kt.virtualCellContainersGridToChildren(s),C={...c,cols:c.cols+1,children:h,colsWidth:d};hl(C),n.updateBlockData(t,C)})}const jm=D("table-insert-row");function FE(n,t,e){n.undoManager.runInGroup(()=>{const r=fn(t),i=Kt.fromTable(r),o=i.rowCount;p(jm,e>=0&&e<=o,`insert index ${e} is out of range [0, ${o}]`);const s=i.map(E=>E.containerId),l=new Set;n.doc.beginBatchUpdate();const c=[];for(let E=0;E<i.colCount;E++){const A=e>0&&s[e-1][E],v=e<i.rowCount&&s[e][E];if(p(jm,A||v,"no top and bottom cell"),e===0||e===i.rowCount||A!==v){const R=Yo(n.doc);c.push(R)}else p(jm,A,"no top cell"),c.push(A),l.add(A)}n.doc.endBatchUpdate(),s.splice(e,0,c);const d=xt.default(n.getBlockData(t));l.forEach(E=>{const A=`${E}_rowSpan`,v=d[A];p(jm,typeof v=="number"&&v>1,`no rowSpan for containerId ${E}, ${v}`),d[A]=v+1});const h=Kt.virtualCellContainersGridToChildren(s),C={...d,rows:d.rows+1,children:h};hl(C),n.updateBlockData(t,C)})}const KE=D("paste-table-in-table-block");function UP(n,t,e,r,i){let o=Kt.fromBlock(e);const s=t.blocks.root[0];p(KE,s,"no table data"),p(KE,s.type==="table",`table data type is not table, but ${s.type}`);const l=s,c=o.getCellByCellElement(r),d=l.cols,h=l.rows,C=c.col,E=c.row,A=C+d,v=E+h,R=[];for(let S=C;S<A&&S<o.colCount;S++)for(let M=E;M<v&&M<o.rowCount;M++){const U=o.getCell({col:S,row:M});U.virtual?U.virtual&&R.push({col:S,row:M}):(U.colSpan>1||U.rowSpan>1)&&R.push({col:S,row:M})}n.undoManager.runInGroup(()=>{if(n.doc.beginBatchUpdate(),R.forEach(pt=>{const ct=Kt.fromBlock(e).getCell(pt);(ct.colSpan>1||ct.rowSpan>1)&&kE(n,e,pt)}),A>o.colCount)for(let pt=o.colCount;pt<A;pt++)uk(n,e,pt);if(v>o.rowCount)for(let pt=o.rowCount;pt<v;pt++)FE(n,e,pt);o=Kt.fromBlock(e);const S=new Um(l);let M;for(let pt=0;pt<S.colCount;pt++)for(let ct=0;ct<S.rowCount;ct++){const wt=S.getCell({col:pt,row:ct});if(!wt.virtual){const Bt=fC(n.editorBlocks,t,wt.containerId,i),Jt=C+pt,ce=E+ct,Oe={col:Jt,row:ce},pe=o.getCellContainer(Oe);o5(n,pe,Bt,i),M=pe}}const U={},V=[];for(let pt=0;pt<S.colCount;pt++)for(let ct=0;ct<S.rowCount;ct++){const wt=S.getCell({col:pt,row:ct}),Bt=C+pt,Jt=E+ct,ce={col:Bt,row:Jt},pe=o.getCell(ce).containerId;wt.virtual?V.push(pe):(wt.colSpan!==1&&(U[`${pe}_colSpan`]=wt.colSpan),wt.rowSpan!==1&&(U[`${pe}_rowSpan`]=wt.rowSpan),wt.background&&(U[`${pe}_background`]=wt.background))}const nt=n.getBlockData(e);V.length>0&&V.forEach(pt=>{nt.children=nt.children.filter(ct=>ct!==pt)});const Y={...nt,...U};hl(Y),p(KE,M,"no last container");const X=We(M);n.selection.selectBlock(X,At(n,X));const ft=Y;n.updateBlockData(e,ft),n.doc.endBatchUpdate()})}const VE=D("paste-in-table-block");class OP{constructor(t){m(this,"pasteData");this.editor=t,setTimeout(()=>{t.input.addHandler(this)})}destroy(){this.pasteData=void 0}async handleBeforePaste(t,e,r,i){return this.pasteData={doc:r,files:i,event:e},!1}async handleBeforePasteDoc(t,e){var E,A,v,R;if(!t.selection.range.isSimple())return this.pasteData=void 0,!1;if(t.selection.range.start.offset!==0)return this.pasteData=void 0,!1;const i=t.selection.startBlock,o=at(i);if(ie(o))return this.pasteData=void 0,!1;if(!Of(t,o))return this.pasteData=void 0,!1;const s=et(o);if(p(VE,s,"no parent block"),!dn(s))return this.pasteData=void 0,!1;if(e.blocks.root.length!==1)return this.pasteData=void 0,!1;if(e.blocks.root[0].type!=="table")return this.pasteData=void 0,!1;VE.debug("paste child table in table");const d=Kt.fromBlock(s).getCellByContainerId(Et(o)).cell;SC(t,e);const h={blockIdMap:new Map,containerIdMap:new Map,boxIdMap:new Map};UP(t,e,s,d,h),p(VE,this.pasteData,"invalid paste data");const C=[];t.input.forEach(S=>{C.push(S)});for(let S=0;S<C.length&&!await((A=(E=C[S]).handleAfterPasteDoc)==null?void 0:A.call(E,t,e,h));S++);for(let S=0;S<C.length&&!await((R=(v=C[S]).handleAfterPaste)==null?void 0:R.call(v,t,this.pasteData.event,this.pasteData.doc));S++);return this.pasteData=void 0,!0}}function fk(n){n.addCustom("table-block-paste-event",t=>new OP(t))}const $E=D("table-select-columns");function NP(n,t,e,r,i){p($E,dn(t),"is not a table block");const o=Kt.fromBlock(t);p($E,e>=0&&e<o.colCount,"invalid from"),p($E,r>0&&e+r<=o.colCount,"invalid count");const s=o.getCell({row:0,col:e}),l=o.getCell({row:o.rowCount-1,col:e+r-1}),c=Ue(t,s.containerId,{colIndex:e,rowIndex:0}),d=Ue(t,l.containerId,{colIndex:e+r-1,rowIndex:o.rowCount-1});i!=null&&i.reverse?n.selection.setSelection(d,c,{noScroll:i.noScroll}):n.selection.setSelection(c,d,{noScroll:i==null?void 0:i.noScroll})}const HE=D("table-select-columns");function PP(n,t,e,r,i){p(HE,dn(t),"is not a table block");const o=Kt.fromBlock(t);p(HE,e>=0&&e<o.rowCount,"invalid from"),p(HE,r>0&&e+r<=o.rowCount,"invalid count");const s=o.getCell({row:e,col:0}),l=o.getCell({row:e+r-1,col:o.colCount-1}),c=Ue(t,s.containerId,{rowIndex:e,colIndex:0}),d=Ue(t,l.containerId,{rowIndex:e+r-1,colIndex:o.colCount-1});i!=null&&i.reverse?n.selection.setSelection(d,c,{noScroll:i.noScroll}):n.selection.setSelection(c,d,{noScroll:i==null?void 0:i.noScroll})}const Eat="",dk=D("get-toolbar-reference-client");function hk(n,t){const e=n.selection.range;if(!e.isSimple()){p(dk,e.start.blockId===e.end.blockId,"invalid selection range");const s=n.getBlockById(e.start.blockId);p(dk,Pt(n,s),"not a complex block");const l=ae(n,s);if(l.getTextToolbarReferenceClient){const c=l.getTextToolbarReferenceClient(n,s);if(c)return c}}const r=e.isReverse()?t.start:t.end,i=En(n,{anchor:r,focus:r}),o=Vo(n,t.block,i);if(o.length!==0)return o[0]}function FP(n){var t,e;if(n.children){let r=!1;const i=[];for(const o of n.children){if((t=o.states)!=null&&t.includes("checked")){r=!0;break}(e=n.defaultCheckedChildren)!=null&&e.includes(o.id)&&i.push(o)}if(!r&&(i==null?void 0:i.length))for(const o of i)Array.isArray(o.states)?o.states.push("checked"):o.states=["checked"]}}function zm(n){const t=(i,o)=>{const s=i.findIndex(c=>c.id===o.id);if(s===-1){i.push(o);return}const l=i[s];if(l.value!==o.value&&delete l.value,!!l.states){if(!o.states){l.states=[];return}l.states=Mp.default(l.states,o.states)}},e=[],r=new Map;return n.forEach(i=>{var o,s;(o=i.children)!=null&&o.length&&(r.has(i.id)?(s=r.get(i.id))==null||s.push(...i.children):r.set(i.id,[...i.children])),t(e,i)}),r.forEach((i,o)=>{const s=e.find(l=>l.id===o);s&&(s.children=zm(i),FP(s))}),e}function Gm(n){return n.findCustom("toolbar-handler")}const Aat="";class KP{constructor(){m(this,"linkPopup",null);m(this,"form",{});m(this,"onFinished",null);m(this,"onClose",null);m(this,"onBeforeFormatUrl",null);m(this,"handleOk",async()=>{var t;try{await this.checkValue();const{linkText:e,linkUrl:r}=this.form,i=r.getInputValue();let o="";this.onBeforeFormatUrl&&this.onBeforeFormatUrl(i)!==!1?o=this.onBeforeFormatUrl(i):o=this.formatUrl(i),(t=this.onFinished)==null||t.call(this,e.getInputValue()||o,o),this._destroy()}catch{}});m(this,"handleClose",()=>{var t;(t=this.onClose)==null||t.call(this),this._destroy()});m(this,"onShow",()=>{setTimeout(()=>{var t;(t=this.form.linkText)==null||t.getField().focus()},400)});m(this,"onChange",()=>{var e;const t=(e=this.linkPopup)==null?void 0:e.content.querySelector('[data-button-id="submit-button"]');t.disabled=!1});m(this,"handleTextKeyboard",(t,e)=>{var r;if(!e){if(t.key==="Enter"){(r=this.form.linkUrl)==null||r.getField().focus(),t.stopPropagation();return}t.key==="Escape"&&this.handleClose()}});m(this,"handleUrlKeyboard",(t,e)=>{if(!e){if(t.key==="Enter"){this.handleOk(),t.preventDefault();return}t.key==="Escape"&&this.handleClose()}})}async checkValue(){const{linkUrl:t}=this.form;if(!t.getInputValue())throw t.setFieldError(_.t("link.urlPlaceholder")),new Error(_.t("link.urlPlaceholder"))}formatUrl(t){if(!t)return"";try{new URL(t)}catch{return`${window.location.protocol}//${t}`}return t}editLink(t){var C,E;const{target:e,linkText:r,linkUrl:i,onFinished:o,onClose:s,onBeforeFormatUrl:l,placement:c="bottom-start"}=t;this.linkPopup=new su(this.createPopupContent(r,i)),this.linkPopup.addListener("show",this.onShow),this.linkPopup.manualShow(e,{theme:"light",placement:c}),this.onFinished=o,s&&(this.onClose=s),l&&(this.onBeforeFormatUrl=l);const d=(C=this.linkPopup)==null?void 0:C.content.querySelector('[data-button-id="submit-button"]'),h=(E=this.linkPopup)==null?void 0:E.content.querySelector('[data-button-id="cancel-button"]');d==null||d.addEventListener("click",this.handleOk),h==null||h.addEventListener("click",this.handleClose)}createPopupContent(t,e){const r=B("div",["link-popup-content"],null);this.form.linkText=Mm(r,{label:_.t("link.textLabel"),required:!1,placeholder:_.t("link.textPlaceholder"),defaultValue:t,onChange:this.onChange,onKeyDown:this.handleTextKeyboard}),this.form.linkUrl=Mm(r,{className:"link-popup-gap",label:_.t("link.urlLabel"),required:!0,placeholder:_.t("link.urlPlaceholder"),defaultValue:e,onChange:this.onChange,onKeyDown:this.handleUrlKeyboard});const i=B("div",["link-popup-footer"],r),o=Jr("cancel-button",_.t("link.cancelText"));i.appendChild(o);const s=Jr("submit-button",_.t("link.submitText"),void 0,["disabled","primary"]);return i.appendChild(s),r}_destroy(){var r,i,o,s;const t=(r=this.linkPopup)==null?void 0:r.content.querySelector('[data-button-id="submit-button"]'),e=(i=this.linkPopup)==null?void 0:i.content.querySelector('[data-button-id="cancel-button"]');t==null||t.removeEventListener("click",this.handleOk),e==null||e.removeEventListener("click",this.handleClose),this.onFinished=null,this.onClose=null,this.form={},(o=this.linkPopup)==null||o.removeAllListeners(),(s=this.linkPopup)==null||s.destroy()}destroy(){this._destroy()}}function Rd(n,t){const e=n.addCustom("link-editor",()=>new KP),r=n.getComponentOptions("link"),i={...t,...r};e.editLink(i)}const VP=D("link-popup");function $P(n){return Mt(n,"link")}function wd(n){var t,e;return(e=(t=n.getAttribute("link"))!=null?t:n.textContent)!=null?e:""}function HP(n,t,e){var i,o,s,l;if(n.isBlockWritable(t)&&e&&yr(e)){const c=e,d=(o=(i=n.editorBoxes.getBoxClass(If(c))).getBoxProperties)==null?void 0:o.call(i,n,c);if(d!=null&&d.boxCommands){const h=(l=(s=d.boxCommands["hovering-toolbar"])==null?void 0:s.commands)!=null?l:[];return{element:e,commands:h}}return{element:null,commands:[]}}if(n.isWritable()&&e&&st(n,t)&&$P(e)){const c=B("a",["link-href-button"],null,wd(e));c.href=wd(e),c.target="_blank",c.rel="noopener noreferrer";const d=[{id:"link-text",name:wd(e),disableTooltip:!0,element:c},{id:"edit-link",name:_.t("link.edit"),icon:Im},{id:"remove-link",name:_.t("link.remove"),icon:UT}];return{element:e,commands:d}}return Jv(n,t,"hovering-toolbar")}function mk(n,t,e){var l;const r=ga(t,e),i=n.getBlockText(t),o={start:0,end:0};let s=(l=e.textContent)!=null?l:"";for(let c=0;c<i.length;c++){const d=i[c];if(o.end+d.insert.length>=r.end){o.end+=d.insert.length,s=d.insert;break}o.start<r.start&&(o.start+=d.insert.length,o.end=o.start)}return[o,s]}function jP(n,t,e){const[r,i]=mk(n,t,e);n.selection.selectBlock(t,r.start,r.end);const o=wd(e),s=(h,C)=>{try{const E=n.getBlockText(t),A=z1(E,r.start,r.end-r.start),v=qo(A,r.start,h,{link:C});n.setBlockText(t,v),n.selection.selectBlock(t,r.start+h.length),n.focus()}catch(E){VP.error(E)}},l=()=>{n.selection.selectBlock(t,r.end),n.focus()},c=Vo(n,t,n.selection.range)[0];if(!c)return;const d=jo(n,t,"link-button-anchor",c);Rd(n,{target:d,linkText:i,linkUrl:o,onFinished:s,onClose:l})}function zP(n,t,e){const[r]=mk(n,t,e),i=n.getBlockText(t),o=wd(e),s=$c(r.start,r.end-r.start,i,"link",o);n.setBlockText(t,s),n.selection.selectBlock(t,r.end)}function GP(n,t,e,r){var s,l,c;if(e){if(n.isBlockWritable(t)&&yr(e)){const h=e,C=(l=(s=n.editorBoxes.getBoxClass(If(h))).getBoxProperties)==null?void 0:l.call(s,n,h);if(C!=null&&C.boxCommands){C.boxCommands["hovering-toolbar"].executeCommand(n,t,h,r);return}return}const d=Gm(n);d==null||d.disableTextToolbar(),d==null||d.hide(),setTimeout(()=>{d==null||d.enableTextToolbar()},400),r.id==="edit-link"?jP(n,t,e):r.id==="remove-link"&&zP(n,t,e);return}const i=Qv(n,t);if(!i)return;const o=(c=i.blockCommands)==null?void 0:c["hovering-toolbar"];!o||o.executeCommand(n,t,r)}function Wm(){let n=8;for(;n>0&&!document.querySelector(`div[data-style-heading='${n}']`);)n--;return n}function ei(n){const e=n.selection.range;if(e.isCollapsed()||e.start.blockId!==e.end.blockId||!e.start.isSimple()||!e.end.isSimple()||e.end.offset-e.start.offset!==1)return!1;const r=n.getBlockById(e.start.blockId);return!(!st(n,r)||$f(n,r,e.start.offset).charType!=="box")}const WP=[bm,vm,Bm,ym,Tm,km,Rm,wm];class qP{constructor(t){m(this,"id","BlockTurnIntoCommandProvider");this.editor=t}getHeadingIndex(){let t=Wm();return t<=4?t=5:t<8&&(t+=1),t}getAvailableCommands(t,e,r){if(!st(t,e))return[];if(ei(t))return[];const i=dt(e),o=Ot(e),s=Ci(t,e),c=t.getBlockData(e).heading,d=[];for(let C=0;C<this.getHeadingIndex();C++)d.push({id:`heading-${C+1}`,name:_.t("commands.heading",{name:`${C+1}`}),icon:WP[C],states:c===C+1?["checked"]:[],value:`${C+1}`});const h=C=>{var A;const E=B("span",["toolbar-item-name-container"],null);for(const v of C.children)if((A=v.states)!=null&&A.includes("checked"))return E.innerHTML=v.icon||iu,E;return E.innerHTML=iu,E};return[{id:"turn-into",name:_.t("commands.headingGroup"),blockId:i,blockType:o,blockKind:s,element:h,groupIndex:200,dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["text"],children:[{id:"text",name:_.t("commands.text"),icon:iu,states:c?[]:["checked"]},...d],childrenType:"menu"}]}applyHeadingStyle(t,e,r){t.updateBlockData(e,{heading:r})}executeCommand(t,e,r,i){if(ei(t))return!1;if(st(t,e)&&(i.id.startsWith("heading-")||i.id==="text")){const o=i.value?Number(i.value):null;return this.applyHeadingStyle(t,e,o),!0}return!1}}const XP=8,qe=D("list-block"),qm=D("list-block");function Ht(n){return Ot(n)==="list"}function nn(n){p(qm,Ht(n),"not a list block")}function wr(n){nn(n);const t=n.getAttribute("data-list-type");return p(qm,t,"no list type"),t}function Xm(n){return Ht(n)&&wr(n)==="text-only"}function Sr(n){var t,e;return nn(n),(e=Number.parseInt((t=n.getAttribute("data-list-start"))!=null?t:"1",10))!=null?e:1}function Un(n){var t,e;return nn(n),(e=Number.parseInt((t=n.getAttribute("data-list-level"))!=null?t:"1",10))!=null?e:1}function gu(n){nn(n);const t=n.getAttribute("data-list-group-id");return p(qm,t,"no group id"),t}function co(n){var o,s,l,c,d;nn(n);const t=(o=n.getAttribute("data-list-type"))!=null?o:"ordered",e=(l=Number.parseInt((s=n.getAttribute("data-list-start"))!=null?s:"1",10))!=null?l:1,r=(d=Number.parseInt((c=n.getAttribute("data-list-level"))!=null?c:"1",10))!=null?d:1,i=n.getAttribute("data-list-group-id");return p(qm,i,"no group id"),{type:t,start:e,level:r,groupId:i}}function Ym(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 YP(n){const t={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 e="",r=n;return Object.entries(t).forEach(([i,o])=>{for(;r>=o;)e+=i,r-=o}),e.toLowerCase()}const QP="abcdefghijklmnopqrstuvwxyz";function gk(n){if(n<=0)return`${n}`;const t=(n-1)%26,e=Math.floor((n-1)/26),r=QP[t];return e?gk(e)+r:r}function JP(n){return`${n}`}const pk=[JP,gk,YP];function ZP(n,t){const e=pk[(n-1)%pk.length];return e(t)}function tF(n){return["\u2022","\u25E6","\u25AA"][(n-1)%3]}function El(n,t){nn(n);const{level:e,groupId:r,type:i}=co(n);let o=Ke(n);for(;o;){if(!Ht(o)){o=Ke(o);continue}const{level:s,groupId:l,type:c}=co(o);if(s<e)return null;if(e===s&&((t==null?void 0:t.ignoreGroupId)||r===l)&&(c==="text-only"||i==="text-only"||i===c))return o;o=Ke(o)}return null}function Ck(n){return El(n,{ignoreGroupId:!0})}function ka(n){nn(n);const{level:t,groupId:e,type:r}=co(n);let i=oe(n);for(;i;){if(Ht(i)){const{level:o,groupId:s,type:l}=co(i);if(t===o&&e===s&&(l==="text-only"||r==="text-only"||r===l))return i;if(o<t)return null}i=oe(i)}return null}function Ek(n){nn(n);const t=[];let e=El(n);for(;e;)t.unshift(e),e=El(e);return t}function pu(n){nn(n);const t=[];let e=ka(n);for(;e;)t.push(e),e=ka(e);return t}function Sd(n){nn(n);let t=El(n);for(;t;){const e=El(t);if(!e)return t;t=e}return n}function eF(n){nn(n);let t=ka(n);for(;t;){const e=ka(t);if(!e)return t;t=e}return null}function Ak(n,t){const e=Ek(n),r=pu(n);return t.withSelf?[...e,n,...r]:[...e,...r]}function Qm(n){nn(n);let t=n;const e=Ek(n);e.length>0&&(t=e[0]);const r=Ke(t);return!r||!Ht(r)?null:Un(r)<Un(t)?r:null}function nF(n,t){nn(n);let e=n;for(;e;){const r=Un(e);if(r===t)return e;if(r>t)e=Qm(e);else if(r<t)return null}return null}function rF(n){let t=Sd(n);for(;;){const e=Qm(t);if(!e)return t;t=Sd(e)}}class iF{constructor(){m(this,"nodeMap",new Map);m(this,"rootNodes",[])}addNode(t,e){const r={block:e,children:[]};if(this.nodeMap.set(e,r),t){const i=this.nodeMap.get(t);p(qe,i,"no parent node"),i.children.push(r)}else this.rootNodes.push(r)}}function xk(n,t){const e=rF(t),r=new iF;r.addNode(null,e);let i=oe(e);for(;i&&Ht(i);){if(Xm(i)){r.addNode(null,i),i=oe(i);continue}if(Un(i)===0&&wr(i)!==wr(e))break;const s=Qm(i);r.addNode(s,i),i=oe(i)}return r.rootNodes}function oF(n){const t=document.fullscreenEnabled||document.mozFullScreenEnabled||document.documentElement.webkitRequestFullScreen,e=r=>{if(r.requestFullscreen)return r.requestFullscreen();if(r.mozRequestFullScreen)return r.mozRequestFullScreen();if(r.webkitRequestFullScreen){try{document.fullscreenElement=n}catch{}return r.webkitRequestFullScreen()}return Promise.resolve(0)};return t?e(n):Promise.resolve(0)}function bk(){const e=(document.exitFullscreen||document.webkitExitFullscreen).bind(document)();try{document.fullscreenElement=null}catch{}return e}function jE(n){return Mt(n,"editor-in-mindmap-first")}function zE(n){if(p(qe,Ht(n),"not a list block"),Mt(n,"editor-in-mindmap-first")||!Zs(n))return!0;const t=n.classList,e="editor-mindmap-root-";return!!Array.from(t).find(i=>{if(i.startsWith(e))return i})}function sF(n,t,e){const r=at(n);if(t){const s=at(t);p(qe,r===s,"invalid block container")}const i=Rt(n);if(t){const s=Rt(t);p(qe,i<=s,"invalid block index")}if(q(n,...e),!t||t===n)return;let o=oe(n);for(;o!==t;)p(qe,o,"no next button"),q(o,...e),o=oe(o);o&&q(o,...e)}function lF(n){const t=`editor-mindmap-root-${n.id}`,r=at(n).querySelectorAll(`.${t}`);return r[r.length-1]}async function aF(n,t,e){const r=ve(t),i=r.querySelector('[data-button-id="mindmap-fullscreen"]');p(qe,i,"no full screen button");const o=()=>{setTimeout(()=>{e.toMindmap(n,t,{},{reset:!0,mindmapTools:e})},300)},s=()=>{ut(r,"fullscreen"),i.innerHTML=mE,i.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,_.t("mindmap.fullScreen")),zE(t)&&setTimeout(()=>{o()},300)};if(document.fullscreenElement===r){try{await bk()}catch(l){qe.error(l)}s()}else{try{q(r,"fullscreen"),await oF(r),o()}catch(l){qe.error(l)}i.innerHTML=C2,i.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,_.t("mindmap.exitFullscreen"))}r.onfullscreenchange=()=>{document.fullscreenElement||s()}}function GE(n,t,e,r,i){if(t.querySelector(`[data-button-id="${e}"]`))return null;const s=Jr(e,r,i,[]);return s.setAttribute(`data-editor-tooltip-${n.clientId}-dynamic`,r),q(s,"mindmap-button"),t.appendChild(s),s}function WE(n,t){return n.querySelector(`[data-button-id="${t}"]`)}function cF(n){return WE(n,"mindmap-fullscreen")}function uF(n){return WE(n,"mindmap-fit")}function fF(n){return WE(n,"mindmap-close")}function dF(n,t,e,r){const i=GE(n,t,"mindmap-close",_.t("mindmap.close"),gd);!i||n.domEvents.addEventListener(i,"click",()=>{r.closeMindmap(n,e)})}function hF(n,t,e,r){const i=GE(n,t,"mindmap-fit",_.t("mindmap.autoFit"),p2);!i||n.domEvents.addEventListener(i,"click",()=>{r.fitMindmap(n,e)})}function mF(n,t,e,r){if(navigator.userAgent.includes("Mobile")&&!navigator.userAgent.includes("iPad"))return;const o=GE(n,t,"mindmap-fullscreen",_.t("mindmap.fullScreen"),mE);!o||n.domEvents.addEventListener(o,"click",()=>{aF(n,e,r)})}function gF(n,t){const e=y0(t);if(!e)return;const r=uF(e);r&&(r.remove(),n.domEvents.removeAllListeners(r));const i=fF(e);i&&(i.remove(),n.domEvents.removeAllListeners(i));const o=cF(e);o&&(o.remove(),n.domEvents.removeAllListeners(o))}const Cu=new Map;function qE(n,t,e){const r=(s,l)=>{s.forEach(c=>{l?q(c.block,"to-mindmap-highlight"):ut(c.block,"to-mindmap-highlight"),r(c.children,l)})},i=xk(n,t);if(i.length===0)return;const o=i[0].block;if(e){const s=Cu.get(o);s&&(s.forEach(l=>l.cancel()),Cu.delete(o)),r(i,!0)}else{const s=setTimeout(()=>{r(i,!1),Cu.delete(o)},300),l=()=>{clearTimeout(s),Cu.delete(o)},c=Cu.get(o);c?c.push({cancel:l}):Cu.set(o,[{cancel:l}])}}const{Markmap:pF}=B9;function CF(n,t){nn(t);const e=xk(n,t),r=e[0].block,i=d=>({type:"text",content:zt(d.block).textContent,depth:1,children:d.children.length>0?d.children.map(C=>i(C)):void 0});let o=null;e.length>1?o={type:"root",content:"root",depth:0,children:e.length>0?e.map(d=>i(d)):void 0}:o=i(e[0]);const l=d=>{if(d.length===0)return null;const h=d[d.length-1];return h.children&&h.children.length>0?l(h.children):h},c=l(e);return{root:o,block:r,nodes:e,last:c}}function Jm(n,t,e,r){const{root:i,block:o,last:s}=CF(n,t);r.selectBlock&&n.selection.selectBlock(o,0,0),qE(n,o,!1),r.saveData&&n.updateBlockData(o,{viewAsMindmap:!0});const l=ve(o);let c=l.querySelector(".editor-mindmap-svg");if(r.reset&&(c&&c.remove(),c=null),c)c.innerHTML="";else{const M="http://www.w3.org/2000/svg",U=l.getBoundingClientRect(),V=document.fullscreenElement===l,nt=V?`${U.width}`:`${t.getBoundingClientRect().width}`,Y=V?`${U.height}`:"600",X=document.createElementNS(M,"svg");X.setAttributeNS(null,"viewBox",`0 0 ${nt} ${Y}`),X.setAttributeNS(null,"width","100%"),X.setAttributeNS(null,"height",Y),X.style.display="block",X.style.width="100%",X.style.height=`${Y}px`,X.classList.add("editor-mindmap-svg"),l.appendChild(X),c=X}const d=o,C=`editor-mindmap-root-${dt(o)}`;q(d,"editor-in-mindmap-first",C,"readonly"),d.contentEditable="false";const E=oe(o);E&&Rt(E)<=Rt(s.block)&&sF(E,s.block,["block-hidden",C]);const A=(M,U)=>{if(U.length>0){const V=U[0].parentElement;V&&(V.style.width="100vw",V.style.maxWidth="200px")}U.forEach(V=>{q(V,"editor-mindmap-node")})},v=new pF(c,{...e,autoFit:!0});v.viewHooks.transformHtml.tap(A),v.setData(i),v.fit();const R=ve(o);let S=R.querySelector(".mindmap-toolbar");S||(S=B("div",["mindmap-toolbar"],R)),hF(n,S,d,r.mindmapTools),mF(n,S,d,r.mindmapTools),dF(n,S,d,r.mindmapTools),n.domEvents.addEventListener(c,"click",()=>{n.selection.selectBlock(o,0),n.input.focus()}),d.mindMap=v}function EF(n){const t=B("div",["list-to-mindmap-wrap"],null),e=Jr("list-to-mindmap",_.t("mindmap.viewAsMindMap"),g2,[],n.clientId);return t.appendChild(e),t}async function vk(n,t){const e=`editor-mindmap-root-${t.id}`,r=at(t);ke(r).forEach(l=>{Mt(l,e)&&ut(l,e,"editor-in-mindmap-first","block-hidden")});const o=ve(t);document.fullscreenElement===o&&await bk();const s=o.querySelector(".editor-mindmap-svg");!s||(p(qe,s,"no mindmap svg"),s.remove(),n.domEvents.removeAllListeners(s),gF(n,t))}function AF(n){const t=n.classList,e="editor-mindmap-root-";return Array.from(t).find(i=>{if(i.startsWith(e))return i})}async function Bk(n,t){!AF(t)||(n.updateBlockData(t,{viewAsMindmap:null}),vk(n,t),n.selection.selectBlock(t,0))}function xF(n,t){const e=t.mindMap;e&&e.fit()}const Zm={toMindmap:Jm,closeMindmap:Bk,fitMindmap:xF},xat="";class tg{constructor(t){m(this,"toMindmapButton");m(this,"currentBlock",null);m(this,"handleHoveringBlock",t=>{t&&Ht(t)&&wr(t)!=="unchecked"&&wr(t)!=="checked"&&this.editor.isWritable()?ve(t).appendChild(this.toMindmapButton):this.toMindmapButton.remove()});m(this,"handleMouseEnter",()=>{const t=et(this.toMindmapButton);p(qe,t&&Ht(t),"no parent list"),qE(this.editor,t,!0),this.currentBlock=t});m(this,"handleMouseLeave",()=>{this.currentBlock&&(qE(this.editor,this.currentBlock,!1),this.currentBlock=null)});m(this,"handleClick",()=>{const t=et(this.toMindmapButton);p(qe,t&&Ht(t),"no parent list"),Jm(this.editor,t,{},{saveData:!0,selectBlock:!0,mindmapTools:Zm})});this.editor=t,ze.get(this.editor).addListener("change",this.handleHoveringBlock),this.toMindmapButton=EF(t),t.domEvents.addEventListener(this.toMindmapButton,"mouseenter",this.handleMouseEnter),t.domEvents.addEventListener(this.toMindmapButton,"mouseleave",this.handleMouseLeave),t.domEvents.addEventListener(this.toMindmapButton,"click",this.handleClick)}static get(t){return t.findCustomByType(tg)}destroy(){ze.get(this.editor).removeListener("change",this.handleHoveringBlock)}hide(){this.currentBlock&&(this.currentBlock=null),this.toMindmapButton.remove()}}function bF(n,t,e){var r;t==="beginDrag"&&((r=tg.get(n))==null||r.hide())}function Eu(n,t,e,r){var o;const i=(o=r==null?void 0:r.groupId)!=null?o:it();t.forEach(s=>{const l=n.getBlockData(s);if(l.start!==e||(r==null?void 0:r.resetGroupId)){const c={...l,start:e};r!=null&&r.resetGroupId&&(c.groupId=i),n.updateBlockData(s,c)}l.textOnly||(e+=1)})}function XE(n,t,e,r){const i=Ak(t,{withSelf:!0});i.length!==0&&Eu(n,i,e,r)}class Au{constructor(t,e){m(this,"listStart",0);m(this,"listBrother",null);if(this.editor=t,Xm(e))return;const r=Sd(e),i=Sr(r);this.listStart=i,r===e?this.listBrother=ka(r):this.listBrother=r}fix(){if(!!this.listBrother){if(xf(this.listBrother)){this.listBrother=null;return}XE(this.editor,this.listBrother,this.listStart)}}}class Ra{constructor(t,e,r){m(this,"listStart");m(this,"listBrother",null);this.editor=t,this.options=r;const i=Sd(e),o=Sr(i);this.listStart=o,this.listBrother=i,r!=null&&r.resetStart&&(this.listStart=1)}fix(){!this.listBrother||XE(this.editor,this.listBrother,this.listStart,this.options)}}class yk{constructor(t,e,r){m(this,"listStart");m(this,"listNextBrothers",[]);this.editor=t,this.listNextBrothers=pu(e);const{start:i,resetStart:o}=r||{};this.listStart=o?1:i!=null?i:1}fix(){!this.listNextBrothers.length||Eu(this.editor,this.listNextBrothers,this.listStart)}}function vF(n,t,e){n.getBlockData(t).quoted&&(e.quoted=!0)}function YE(n,t,e,r){if(qe.debug("drag a block on a list block"),!st(n,t))return!1;p(qe,Ht(e),"target is not a list block");const{type:i,start:o,level:s,groupId:l}=co(e),c=r==="after"?o+1:o,d=n.getBlockData(t),h={id:it(),type:"list",groupId:l,level:s,start:c,text:d.text,...Ym(i)};vF(n,e,h);let C=Rt(e);const E=at(e);r==="after"&&(C+=1);let A=null;Ht(t)&&(A=new Au(n,t));const v=n.insertBlock(Et(E),C,h,V0(h.id,0));return n.deleteBlock(t),l!==d.groupId&&new Ra(n,v).fix(),A==null||A.fix(),!0}function BF(n,t,e,r){if(qe.debug("drag a list between text blocks"),r==="after"){const d=oe(e);if(d&&Ht(d))return YE(n,t,d,"before")}if(r==="before"){const d=Ke(e);if(d&&Ht(d))return YE(n,t,d,"after")}const o={...n.getBlockData(t),groupId:it(),start:1,level:1};let s=Rt(e);const l=at(e);r==="after"&&(s+=1),n.insertBlock(Et(l),s,o,V0(o.id,0));const c=new Au(n,t);return n.deleteBlock(t),c.fix(),!0}function yF(n,t,e,r,i){if(A0(e))return!1;const{blockId:o}=e,s=n.getBlockById(o);p(qe,s,"no dragged block");const{isSourceBlock:l,targetBlock:c}=i;return!l&&c?(p(qe,t===c,"block !== target block"),p(qe,Ht(c),"target is not a list block"),YE(n,s,c,r)):BF(n,s,c,r)}function Tk(n,t){if(!n.isWritable())return!1;const e=n.selection.range,i=n.editorCommandProviders.getCommands(e,"shortcut").find(o=>o.id===t);return i?(n.editorCommandProviders.executeCommand(e,i,{}),!0):!1}const TF={"Shift+CtrlOrCmd+L":n=>Tk(n,"ordered-list"),"Shift+CtrlOrCmd+U":n=>Tk(n,"unordered-list")};function eg(n){const t=n.getAttribute("block-padding-level");return t?Number(t):null}function kF(n,t){let e;const r=eg(t);if(!r)e=1;else{if(r>=12)return e=12,!1;e=r+1}return n.updateBlockData(t,{...n.getBlockData(t),padding:e}),!0}function kk(n,t){const e=eg(t);if(!e)return!1;const r=n.getBlockData(t);return e>1?(n.updateBlockData(t,{...r,padding:e-1}),!0):(n.updateBlockData(t,{...r,padding:null}),!0)}function QE(n){return n.readonly||!n.isWritable()}function RF(n){return n.selection.range.getSelectedBlocks().forEach(e=>{const r=e.block;st(n,r)&&kF(n,r)}),!0}function wF(n){return n.selection.range.getSelectedBlocks().forEach(e=>{const r=e.block;st(n,r)&&kk(n,r)}),!0}function SF(n){return QE(n)?!1:n.undoManager.runInGroup(()=>(RF(n),!0))}function LF(n){return QE(n)?!1:n.undoManager.runInGroup(()=>(wF(n),!0))}function IF(n){if(QE(n))return!1;if(!n.selection.range.isCollapsed())return;const t=n.selection.focusedBlock;if(!st(n,t))return;const e=n.selection.range.focus;if(!(!e.isSimple()||e.offset!==0||!eg(t)))return kk(n,t),!0}class JE{renderBlock(t,e,r){const{padding:i}=r;return i?{attributes:{"block-padding-level":i}}:{}}}const bat="",DF={Tab:SF,"Shift+Tab":LF,Backspace:IF};function Al(n){return n.textOnly?"text-only":n.checkbox?n.checkbox:n.ordered?"ordered":"unordered"}function _F(n){var e,r;if(n.checkbox)return"";const t=(e=n.level)!=null?e:1;return n.ordered?`${ZP(t,(r=n.start)!=null?r:1)}.`:tF(t)}function Rk(n){const t={id:it(),type:"text",text:n.text},e=["heading","quoted","align"];for(const r of e)n[r]!==void 0&&(t[r]=n[r]);return t}function MF(n,t,e=1){if(!t)return null;let r=Ke(n);for(;r;){const i=r.getAttribute("data-style-heading"),o=Number(r.getAttribute("data-list-level"));if(i){if(i<t)return null;if(i===t&&o===e)return Ht(r)?r:null}r=Ke(r)}return null}function UF(n,t){const e=n.getAttribute("data-style-heading"),r=MF(n,e);if(r)return r;const i=Ke(n);if(i&&Ht(i)&&wr(i)===t)return i;const o=oe(n);return o&&Ht(o)&&wr(o)===t?o:null}function OF(n,t,e){var S,M,U;const r=(S=e.data)!=null?S:{};let i=1;if(Ht(t))i=Un(t);else{const V=eg(t);V&&(i=V+1),i>8&&(i=8)}const o=(M=r.listType)!=null?M:"ordered";if(o==="text-only")return null;const s=n.getBlockData(t);let l=(U=s.text)!=null?U:[],d=Re(l);const h=e.offset||0;h<=jn(l)&&(l=ar(l,h).right,d=d.substring(0,h));let C=1;o==="ordered"&&(C=Number.parseInt(d,10)||1);let E=it();const A=UF(t,o);if(A)if(Un(A)===i){if(Rt(t)>Rt(A))C=Sr(A)+1;else{const V=Sr(A);V>1&&(C=V-1),new yk(n,A,{start:C+1}).fix()}E=gu(A)}else{const V=nF(A,i);V&&(C=Sr(V)+1)}else Ht(t)&&new yk(n,t,{start:1}).fix();const R={...Rk(s),id:it(),type:"list",level:i,start:C,groupId:E,ordered:!1,text:l};return o==="ordered"?R.ordered=!0:(o==="checked"||o==="unchecked")&&(R.checkbox=o),{blockData:R,onConverted:(V,nt)=>{new Ra(V,nt).fix()}}}function ng(n){return n==="checked"||n==="unchecked"}function wk(n,t,e,r){const i=t,{containerId:o,blockIndex:s}=r[r.length-1];if(s===0)return!0;const l=e.blocks[o][s-1];if(l.type!=="list")return!0;const c=Al(i),d=Al(l);return c!==d&&(!ng(c)||!ng(d))||(i.level||1)>(l.level||1)}function Sk(n,t,e,r){const i=t,{containerId:o,blockIndex:s}=r[r.length-1];if(s===e.blocks[o].length-1)return!0;const l=e.blocks[o][s+1];if(l.type!=="list")return!0;const c=Al(i),d=Al(l);return c!==d&&(!ng(c)||!ng(d))||(i.level||1)>(l.level||1)}function NF(n,t,e,r,i){var s,l,c;const o=t;if(r==="text")return((s=ur.convertTo)==null?void 0:s.call(ur,n,t,e,"text",i))||"";if(r==="markdown"){let d=((l=ur.convertTo)==null?void 0:l.call(ur,n,t,e,"markdown",i))||"";o.checkbox==="checked"?d=`[x] ${d}`:o.checkbox==="unchecked"&&(d=`[ ] ${d}`),o.ordered?d=`${o.start}. ${d}`:d=`- ${d}`;const h=o.level||0;return d=(h>0?" ".repeat(h-1):"")+d,wk(n,t,e,i)&&(d=`${d}`),Sk(n,t,e,i)&&(d=`${d}`,h<=1&&(d+=`
617
+ `)),d}if(r==="html"){let d=((c=ur.convertTo)==null?void 0:c.call(ur,n,t,e,"html",i))||"";d=d.replace("<p>","").replace("</p>",""),o.checkbox==="checked"?d=`<input type="checkbox" checked="checked" disabled="disabled" /> ${d}`:o.checkbox==="unchecked"&&(d=`<input type="checkbox" disabled="disabled" /> ${d}`);let h="ul",C="";if(o.ordered)switch(d=`<li value="${o.start}">${d}</li>`,h="ol",o.level){case 2:case 5:case 8:C="list-style-type: lower-alpha;";break;case 3:case 6:C="list-style-type: lower-roman;";break}else d=`<li>${d}</li>`;return wk(n,t,e,i)&&(d=`<${h}${C?` style="${C}"`:""}>${d}`),Sk(n,t,e,i)&&(d=`${d}</${h}>`),d}return""}function Lk(n){const t=B("label",["editor-check-list-wrapper"],null);n&&q(t,"editor-check-list-wrapper-checked");const e=B("span",["editor-check-box"],t);return B("span",["editor-check-box-inner"],e),t}function PF(n,t){const e=Al(t);if(e!=="text-only"){if(e==="checked"){n.append(Lk(!0));return}if(e==="unchecked"){n.append(Lk(!1));return}n.innerText=_F(t)}}function FF(n){const t=B("div",["list-container"],null),e=B("button",["list-marker"],t);return PF(e,n),t}function xu(n,t){nn(t);const e=n.getBlockData(t),r=Rk(e),i=at(t),o=Rt(t);n.deleteBlock(t);const s=V0(r.id,0);if(Of(n,i)&&!ie(i)){const l=Me(i);n.insertBlock(Et(i),o,r,s),n.deleteBlock(l)}else n.insertBlock(Et(i),o,r,s)}function KF(n){if(!n.selection.range.isCollapsed())return!1;const t=n.selection.focusedBlock;if(!Ht(t))return!1;const e=n.selection.range.focus;return!e.isSimple()||e.offset!==0?!1:(xu(n,t),!0)}function Ik(n){let t=oe(n);if(!t)return null;const e=ka(n);for(;t!==e;){if(p(qe,t,"no next block"),Ht(t))return Un(t)>Un(n)?t:null;if(t=oe(t),!t)return null}return null}function ZE(n){const t=[];let e=Ik(n);if(!e)return t;for(;e;){const r=ka(e);t.push({block:e,children:ZE(e)}),e=r}return t}function VF(n){const t=(r,i)=>{i.push(r.block),r.children.forEach(o=>t(o,i))},e=[];return n.forEach(r=>t(r,e)),e}function Dk(n,t){return Un(t)!==1}function _k(n,t,e){t.forEach(r=>{const i=n.getBlockData(r.block);n.updateBlockData(r.block,{...i,groupId:e,level:(i.level||1)-1}),r.children.length&&_k(n,r.children,i.groupId)})}function tA(n,t){if(!Dk(n,t))return!1;const e=Un(t);if(e===1)return!1;let r=it(),i=1,o=wr(t);const s=e-1,l=Qm(t);l&&(r=gu(l),i=Sr(l)+1,o!=="text-only"&&(o=wr(l)));const c=ZE(t),d=n.getBlockData(t),h={...d,groupId:r,level:s,start:i,...Ym(o)};n.updateBlockData(t,h),n.doc.beginBatchUpdate(),_k(n,c,d.groupId),n.doc.endBatchUpdate(),new Ra(n,t).fix();const E=Ik(t);return E&&new Ra(n,E,{resetStart:!0,resetGroupId:!0}).fix(),!0}const $F=D("list-block");function HF(n,t,e){p($F,Ht(t),"not a list block");const r={...n.getBlockData(t),id:it()};return e!=null&&e.level&&(r.level=e.level),e!=null&&e.start&&(r.start=e.start),e!=null&&e.keepText||delete r.text,(r==null?void 0:r.checkbox)==="checked"&&(r.checkbox="unchecked"),r}function jF(n){if(nn(n),!Xm(n))return n;let t=El(n);for(;t;){if(!Xm(t))return t;t=El(t)}return null}function zF(n,t,e,r){const i=new Ra(n,r),o=Sr(r)+1;Xc(n,t,e,{forceInsertAfter:!0,newBlockData:HF(n,r,{start:o})}),i.fix()}function GF(n){var s;if(n.selection.range.isCollapsed()){const l=n.selection.focusedBlock;if(Ht(l)&&At(n,l)===0)return Un(l)===1?xu(n,l):tA(n,l),!0}n.clearSelectedContents();const t=n.selection.focusedBlock;if(!Ht(t))return!1;const e=n.selection.range.focus;if(!e.isSimple())return!1;const r=e.offset,o=(s=r===At(n,t)?jF(t):t)!=null?s:t;return zF(n,t,r,o),!0}function Mk(n){p(qe,Ht(n),"not a list block");const{level:t}=co(n);let e=Ke(n);for(;e;){if(Ht(e)){const{level:r}=co(e);if(t===r)return e;if(r<t)return null}e=Ke(e)}return null}function Uk(n,t){return nn(t),Mk(t)?Un(t)<XP:!1}function WF(n,t,e){let r=Ke(t);p(qe,r,"no prev brother");const i=Un(e);for(;r;){if(r===e)return null;if(Ht(r)&&Un(r)===i+1)return r;r=Ke(r)}return null}function Ok(n,t){if(!Uk(n,t))return!1;nn(t);const e=Mk(t);p(qe,e,"no list prev brother");const r=e,i=WF(n,t,r),o=Un(r)+1;let s=it(),l=1,c=wr(t);i&&(s=gu(i),l=Sr(i)+1,c=wr(i));const d=ZE(t),C={...n.getBlockData(t),groupId:s,level:o,start:l,...Ym(c)};return n.updateBlockData(t,C),n.doc.beginBatchUpdate(),VF(d).forEach(A=>{const v=n.getBlockData(A);n.updateBlockData(A,{...v,level:(v.level||1)+1})}),n.doc.endBatchUpdate(),!0}function qF(n,t,e){return t.length===0||!t.every(r=>Ht(r.block))?!1:e==="increase"?Uk(n,t[0].block):Dk(n,t[0].block)}function Nk(n,t,e){if(!qF(n,t,e))return!1;const r=t[0].block,i=Un(r),o=t.filter(d=>Un(d.block)<=i),s=Ak(r,{withSelf:!1}),l=new Set(o.map(d=>d.block)),c=s.filter(d=>!l.has(d));return n.undoManager.runInGroup(()=>{let d=null;c.length>0&&(d=new Ra(n,c[0])),o.forEach(h=>{e==="increase"?Ok(n,h.block):tA(n,h.block)}),d==null||d.fix()}),!0}function XF(n,t){return Ok(n,t)}function YF(n,t){return tA(n,t)}function QF(n){const t=n.selection.range.getSelectedBlocks();if(t.length>1)return Nk(n,t,"increase"),!0;const e=t[0].block;if(!Ht(e))return!1;const r=new Au(n,e);return XF(n,e)&&(r.fix(),new Ra(n,e).fix()),!0}function JF(n){const t=n.selection.range.getSelectedBlocks();if(t.length>1)return Nk(n,t,"decrease"),!0;const e=t[0].block;return Ht(e)?(YF(n,e),!0):!1}class ZF{constructor(t){this.editor=t}handleBeforeKeyDown(t,e){const r=t.selection.range.getSelectedBlocks();if(r.length===0||!r.some(o=>Ht(o.block)))return!1;switch(e.key){case"Enter":return this.handleEnter(e);case"Backspace":return this.handleBackspace();case"Tab":return this.handleTab(e);default:return!1}}handleEnter(t){const e=this.editor.selection.range.getSelectedBlocks()[0];return!e.block||!Ht(e.block)||Gi(t,"Shift+Enter")?!1:this.editor.undoManager.runInGroup(()=>GF(this.editor))}handleBackspace(){return this.editor.undoManager.runInGroup(()=>KF(this.editor))}handleTab(t){return Gi(t,"Shift+Tab")?this.editor.undoManager.runInGroup(()=>JF(this.editor)):this.editor.undoManager.runInGroup(()=>QF(this.editor))}}class tK{constructor(t){m(this,"effectedBlockIds",new Map);m(this,"handleBeforeClearSelection",()=>{this.effectedBlockIds.clear();const t=this.editor.selection.range.getSelectedBlocks();if(t.length===0)return;const e=new Set;t.forEach(i=>{const o=i.block;Ht(o)&&e.add(o)});const r=new Map;Array.from(e.values()).forEach(i=>{var c;const o=Sd(i),{start:s}=co(o);r.set(dt(o),s);const l=(c=eF(i))!=null?c:i;r.set(dt(l),s)}),this.effectedBlockIds=r});m(this,"handleAfterClearSelection",()=>{Array.from(this.effectedBlockIds.entries()).forEach(([t,e])=>{const r=this.editor.findBlockById(t);!r||XE(this.editor,r,e)}),this.effectedBlockIds.clear()});this.editor=t,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 eK=D("customize-list-start-menu");class nK{constructor(t){m(this,"popup");m(this,"block",null);m(this,"show",(t,e)=>{const r=e.querySelector("div.list-container");p(eK,r,"list-block mark does not exist"),this.block=e,this.popup.manualShow(r,{theme:"light"})});m(this,"createDialogContent",()=>{const t=B("div",["customize-start-panel"],null);B("span",["customize-start-panel-title"],t,_.t("list.numberLabel"));const e=this.createNumericInput();t.appendChild(e);const r=B("button",["customize-start-panel-button"],t,_.t("list.confirm"));return this.editor.domEvents.addEventListener(t,"keydown",this.handleKeydown),this.editor.domEvents.addEventListener(r,"click",this.handleOk),t});m(this,"handleDialogShow",()=>{const t=this.block;if(!t)return;const e=this.popup.popupContent,r=e.querySelector("button.customize-start-panel-button"),i=e.querySelector("input.customize-start-panel-input"),o=Sr(t);!r||!i||requestAnimationFrame(()=>{i.focus(),i.value=String(o)})});m(this,"handleOk",()=>{const e=this.popup.popupContent.querySelector("input.customize-start-panel-input"),r=this.block;if(!r)return;const i=Number(e.value);!i||(this.editor.undoManager.runInGroup(()=>{Eu(this.editor,[r,...pu(r)],i,{resetGroupId:!0})}),this.popup.close("clickItem"))});m(this,"handleKeydown",(t,e)=>{const r=e;r.isComposing||(r.key==="Escape"?this.popup.close("cancelBar"):r.key==="Enter"&&this.handleOk())});this.editor=t,this.popup=new su(this.createDialogContent()),this.popup.on("show",this.handleDialogShow)}destroy(){this.popup.destroy()}createNumericInput(){const t=B("input",["customize-start-panel-input"],null);t.type="number",t.min="1";const e=()=>{const i=t.value.replace(/[^\d]/g,"").replace(/^0+/,""),o=parseInt(i,10);o<=0||Number.isNaN(o)?t.value="":t.value=i};return this.editor.domEvents.addEventListener(t,"input",e),t}}function rK(n,t){return gu(n)===gu(t)}function iK(n,t){const e=Ck(t);return e?rK(e,t)?Sr(e)!==Sr(t)-1:!0:!1}function oK(n,t){return El(t)?!0:Sr(t)!==1}function sK(n,t){return nn(t),[{id:"continue-numbering",name:_.t("list.continueList"),states:iK(n,t)?[]:["disabled"]},{id:"start-new-list",name:_.t("list.restartList"),states:oK(n,t)?[]:["disabled"]},{id:"set-numbering-value",name:_.t("list.changeNumber")}]}function lK(n,t,e){var r,i;if(nn(t),e.id==="continue-numbering"){const o=Ck(t);o&&Eu(n,[t,...pu(t)],Sr(o)+1,{resetGroupId:!0,groupId:gu(o)})}if(e.id==="start-new-list"&&n.undoManager.runInGroup(()=>{Eu(n,[t,...pu(t)],1,{resetGroupId:!0})}),e.id==="set-numbering-value"){const o=(r=n.options.componentsOptions)==null?void 0:r.list;if((i=o==null?void 0:o.onChangeStart)!=null&&i.call(o,n,t,e))return;n.addCustom("list-customize-start-dialog",()=>new nK(n)).show(n,t)}}class aK{constructor(t){m(this,"menu");m(this,"handleClick",(t,e)=>{const r=Dc(e,"div.list-container");if(r&&this.editor.isWritable()){const i=et(r);p(qe,i,"no parent block"),nn(i);const o=t.getBlockData(i);if(o&&o.checkbox){t.updateBlockData(i,{...o,checkbox:o.checkbox==="checked"?"unchecked":"checked"});return}if(wr(i)==="unordered")return;this.menu.updateItems(this.getCommandItems(i)),this.menu.manualShow(r),this.activeList(r,!0)}});m(this,"handleMenuClose",()=>{var e;const t=(e=this.menu.tippyInstance)==null?void 0:e.reference;t&&this.activeList(t,!1)});m(this,"handleMenuClick",(t,e)=>{var i;const r=(i=this.menu.tippyInstance)==null?void 0:i.reference;if(r){const o=et(r);o&&lK(this.editor,o,e)}});this.editor=t,this.editor.addListener("click",this.handleClick),this.menu=new dl([]),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(t){return sK(this.editor,t)}activeList(t,e){const r=et(t);!r||(e?(q(t,"active"),q(r,"active")):(ut(t,"active"),ut(r,"active")))}}class cK{constructor(t){this.editor=t}handleBeforeKeyDown(t,e){const r=t.selection.range.getSelectedBlocks();if(r.length===0)return!1;const i=r[0].block;if(!Ht(i)||!zE(i))return!1;if(e.key==="ArrowUp"||e.key==="ArrowLeft"){const o=zr(i);return o&&t.selection.selectBlock(o,At(t,o)),!0}if(e.key==="ArrowDown"||e.key==="ArrowRight"){const o=Gr(i);return o&&t.selection.selectBlock(o,0),!0}return(e.key==="Delete"||e.key==="Backspace"||e.key==="Escape")&&Bk(t,i),!0}}function uK(n,t,e,r,i){IC(n,"list-block-init",()=>{setTimeout(()=>{n.input.addHandler(new cK(n)),n.input.addHandler(new ZF(n)),n.addCustom("list-clear-selection-handler",()=>new tK(n)),n.addCustom("list-marker-menu",()=>new aK(n))})});const o=ur.createBlockContent(n,t,e,r,i),s=i,{level:l,start:c,groupId:d}=s,h=Al(s);r.setAttribute("data-list-level",`${l||1}`),r.setAttribute("data-list-start",`${c||1}`),r.setAttribute("data-list-group-id",`${d}`),r.setAttribute("data-list-type",h);const C=FF(s);return r.insertBefore(C,o),s.viewAsMindmap?setTimeout(()=>{const E=n.findBlockById(i.id);E&&Jm(n,E,{},{mindmapTools:Zm,saveData:!1})}):setTimeout(()=>{const E=n.findBlockById(i.id);E&&vk(n,E)}),o}const fK={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"}},dK={list:{confirm:"Confirm",setStart:"Set number",continueList:"Continue numbering",restartList:"Start a new list",changeNumber:"Set numbering value",numberLabel:"Numbering order",mention:{tooltip:"Mention and notify users"}},mindmap:{viewAsMindMap:"View as MindMap",autoFit:"Auto zoom",fullScreen:"Full screen",close:"Close",exitFullscreen:"Exit full screen"}},hK={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"}};_.mergeLang({"zh-CN":fK,"en-US":dK,"ja-JP":hK});const vat="",mK=D("list-block:paste-handler");class Pk{constructor(){m(this,"fixStartByList",null)}async handleBeforePasteDoc(t,e){const r=new Map,i=new Map;return Object.values(e.blocks).forEach(o=>{o.forEach((s,l)=>{if(s.type==="list"){if(l===0){const d=t.selection.startBlock;if(Ht(d)){const{start:C,groupId:E,level:A,type:v}=co(d),R=Al(s),S=s.groupId;s.groupId=E,s.start=C,s.level=A;const M=Ym(v);Object.assign(s,M),A===s.level&&v===R&&(r.set(S,E),i.set(E,C)),this.fixStartByList=new Au(t,d);return}const h=Ke(d);if(h&&Ht(h)){const{start:C,groupId:E,level:A,type:v}=co(h),R=Al(s);if(A===s.level&&v===R){const S=s.groupId;s.groupId=E,s.start=C+1,s.level=A,r.set(S,E),i.set(E,C+1),this.fixStartByList=new Au(t,h);return}}}const c=r.get(s.groupId);if(c){const d=i.get(c);p(mK,d,"start is null"),s.start=d+1,s.groupId=c,i.set(c,d+1)}else{const d=it();r.set(s.groupId,d),s.groupId=d,s.start=1,i.set(d,1)}}})}),!1}async handleAfterPaste(t){return t.undoManager.runInGroup(()=>{this.fixStartByList&&(this.fixStartByList.fix(),this.fixStartByList=null)}),!1}}const gK=D("list selection to doc");function pK(n){const t={type:"text"};return Object.entries(n).forEach(([e,r])=>{["ordered","unordered","checked","unchecked","text-only","start","level","groupId","type"].includes(e)||(t[e]=r)}),t}function CK(n,t){const e=xt.default(Qo(n,t.block)),r=t.start,i=t.end;p(gK,e.text,"no block text");const o=At(n,t.block);if(i.offset-r.offset===o)return{blocks:{root:[{...e}]},meta:{},comments:{}};const s=pK(e);if(r.offset===i.offset)return{blocks:{root:[{...s,text:[]}]},meta:{},comments:{}};const{middle:l}=an(e.text,r.offset,i.offset-r.offset);return{blocks:{root:[{...s,text:l}]},meta:{},comments:{}}}const Fk={...ur,blockType:"list",createBlockContent:uK,convertFrom:OF,convertTo:NF,handleDrop:yF,notify:bF,handleDeleteBlock:(n,t)=>{if(Ht(t)){const e=new Au(n,t);setTimeout(()=>{e.fix()})}},selectionToDoc:CK},eA=D("paragraph");class EK{constructor(t){m(this,"id","BlockParagraphProvider");this.editor=t}isChecked(t,e){return!!(t[e]||t.level&&(t.ordered===!0&&!t.checkbox&&e==="ordered-list"||t.ordered===!1&&!t.checkbox&&e==="unordered-list")||e==="check-list"&&t.checkbox)}getAvailableCommands(t,e){if(!st(t,e))return[];if(ei(t))return[];const r=[],i={"unordered-list":[_.t("commands.unordered"),gn("CtrlOrCmd+Shift+U"),wT],"ordered-list":[_.t("commands.ordered"),gn("CtrlOrCmd+Shift+L"),RT],"check-list":[_.t("commands.check"),void 0,ST],link:[_.t("commands.link"),gn("CtrlOrCmd+K"),aE],quoted:[_.t("commands.quote"),void 0,LT]},o=dt(e),s=Ot(e),l=Ci(t,e),c=t.getBlockData(e);return Object.entries(i).forEach(([d,[h,C,E]])=>{const A=[];if(this.isChecked(c,d)&&A.push("checked"),d==="link"){if(!t.selection.range.isSimple())return;t.selection.range.getSelectedBlocks().length!==1&&A.push("disabled")}r.push({blockId:o,blockType:s,blockKind:l,id:d,name:h,desc:C,states:A,icon:E,groupIndex:600})}),r}convertLink(t,e,r){p(eA,xi(e.start),""),p(eA,xi(e.start),"");const i="bottom-start",o=e.start.offset,s=e.end.offset,l=(A,v)=>{t.undoManager.runInGroup(()=>{try{const R=t.selection.range.isCollapsed();let S;if(R){S=qo(t.getBlockText(r),s,A,{link:v}),t.setBlockText(r,S);return}S=P0(t.getBlockText(r),o,s,A),S=Ff(o,A.length,S,"link",v),t.setBlockText(r,S),t.selection.selectBlock(r,o+A.length),t.focus()}catch(R){eA.error(R)}})},c=()=>{t.selection.selectBlock(r,s),t.focus()},d=Vo(t,r,e)[0];if(!d)return;const h=jo(t,r,"link-button-anchor",d),C=t.getBlockText(r),E=Hc(C,o);Rd(t,{target:h,linkText:t.getSelectedText(),linkUrl:(E==null?void 0:E.link)||"",onFinished:l,onClose:c,placement:i})}convertToList(t,e,r){const i=k0(t,e,"list",{offset:0,data:{listType:r}});i&&t.undoManager.runInGroup(()=>{const o=Rt(e),s=at(e);t.insertBlock(Et(s),o,i.blockData),t.deleteBlock(e)})}executeCommand(t,e,r,i){var c;if(!st(t,e)||ei(t))return!1;const o=i.id,s=(c=i.states)==null?void 0:c.includes("checked");let l=!1;if(o==="unordered-list"&&(s?xu(t,e):this.convertToList(t,e,"unordered"),l=!0),o==="ordered-list"&&(s?xu(t,e):this.convertToList(t,e,"ordered"),l=!0),o==="check-list"&&(s?xu(t,e):this.convertToList(t,e,"unchecked"),l=!0),o==="quoted"){const h=t.getBlockData(e).quoted;t.updateBlockData(e,{quoted:h?void 0:!0}),l=!0}if(o==="link"){const d=Gm(t);d==null||d.disableTextToolbar(),d==null||d.hide(),setTimeout(()=>{d==null||d.enableTextToolbar()},1e3),this.convertLink(t,r,e),l=!0}return l}}const AK={left:ru,right:Sm,center:Lm};class xK{constructor(t){m(this,"id","BlockAlignProvider");this.editor=t}applyAlignStyle(t,e,r){Object.keys(AK).includes(r)?t.updateBlockData(e,{align:r}):t.updateBlockData(e,{align:null})}isChecked(t,e){return t.align===e}getAvailableCommands(t,e,r){if(!st(t,e))return[];if(ei(t))return[];const i=dt(e),o=Ot(e),s=Ci(t,e),l=t.getBlockData(e),c=d=>{var C;const h=B("span",["toolbar-item-name-container"],null);for(const E of d.children)if((C=E.states)!=null&&C.includes("checked"))return h.innerHTML=E.icon||ru,h;return h.innerHTML=ru,h};return[{id:"align",name:_.t("commands.alignGroup"),blockId:i,blockType:o,blockKind:s,groupIndex:700,dropdown:!0,element:c,manualShowChildren:!0,childrenPlacement:"bottom-start",defaultCheckedChildren:["align-left"],children:[{id:"align-left",name:_.t("commands.alignLeft"),icon:ru,states:this.isChecked(l,"left")?["checked"]:[]},{id:"align-center",name:_.t("commands.alignCenter"),icon:Lm,states:this.isChecked(l,"center")?["checked"]:[]},{id:"align-right",name:_.t("commands.alignRight"),icon:Sm,states:this.isChecked(l,"right")?["checked"]:[]}],childrenType:"menu"}]}executeCommand(t,e,r,i){if(!st(t,e)||ei(t))return!1;if(i.id.startsWith("align")){const o=i.id.replace(/^align-/,"");return this.applyAlignStyle(t,e,o),!0}return!1}}const bK=D("toolbar-handler"),vK={id:"",name:"",type:"separator"};class bu{constructor(t){m(this,"id","editor-toolbar");m(this,"toolbar");m(this,"toolbarType","object");m(this,"mouseDown",!1);m(this,"oldRange",null);m(this,"hoveringBlock",null);m(this,"hoveringTextChild",null);m(this,"_disableTextToolbar",!1);m(this,"_lastClickTime",0);m(this,"isInToolbar",t=>this.toolbar.isInCommandBar(t.target));m(this,"handleButtonClick",(t,e)=>{const r=this.editor.getCustom("editor-tooltip");r.lastClickButtonId=e.id,this.toolbarType==="text"?(this.editor.editorCommandProviders.executeCommand(this.editor.selection.range,e,{}),this.editor.isWritable()&&this.showTextToolbar("click")):Date.now()-this._lastClickTime>200&&(this.toolbar.close("clickItem"),this.hoveringBlock&&GP(this.editor,this.hoveringBlock,this.hoveringTextChild,e)),this._lastClickTime=Date.now()});m(this,"handleClose",()=>{CE(this.editor)&&this.editor.focus({preventScroll:!0})});m(this,"handleClosing",(t,e)=>{if(this.toolbarType==="object"){const r=Xb(e);if(this.hoveringBlock===r)return!1}return!0});m(this,"handleDocumentMouseDown",t=>{t.button===0&&(document.addEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!0)});m(this,"handleDocumentMouseUp",()=>{document.removeEventListener("mouseup",this.handleDocumentMouseUp),this.mouseDown=!1,this.handleSelectionChange(this.editor)});m(this,"handleHoveringBlockChildChange",(t,e,r,i)=>{if(!(this.hoveringBlock===t&&this.hoveringTextChild===e)&&(this.hoveringBlock=t,this.hoveringTextChild=e,!(this.toolbar.isVisible&&this.toolbarType==="text"))){if(!t){this.toolbar.close("fromHover");return}this.showObjectToolbar(i)}});m(this,"handleSelectionChange",Pe.default(t=>{var r;if(p(bK,t===this.editor,"editor mismatch"),t.selection.range.isCollapsed()||this.mouseDown){if(this.toolbarType==="object"){const i=(r=this.toolbar.tippyInstance)==null?void 0:r.reference,o=this.editor.selection.focusedBlock;if(i&&Ae(i,o))return}this.toolbar.close("selectionChange"),this.oldRange=null;return}if(!this.editor.isWritable()){this.toolbar.close("selectionChange"),this.oldRange=null;return}if(t.selection.range.getSelectedBlocks().length===0){this.toolbar.close("selectionChange"),this.oldRange=null;return}this.oldRange&&this.oldRange.isEqual(t.selection.range)||(this.oldRange=t.selection.range,this.showTextToolbar("selectionChange"))},50));this.editor=t;const e=t.options.componentsOptions.popover;this.toolbar=new pd([],void 0,{tooltipId:t.clientId,id:"editor-toolbar",overflowBoundary:e==null?void 0:e.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(),t.addListener("selectionChanged",this.handleSelectionChange),ze.get(t).addListener("childChange",this.handleHoveringBlockChildChange),ze.get(t).addFilter(this),t.editorCommandProviders.registerCommandProvider(new qP(t)),t.editorCommandProviders.registerCommandProvider(new EK(t)),t.editorCommandProviders.registerCommandProvider(new xK(t))}disableTextToolbar(){this._disableTextToolbar=!0}enableTextToolbar(){this._disableTextToolbar=!1}hide(){this.toolbar.close("selectionChange")}destroy(){this.unbindEvents(),this.toolbar.destroy(),this.editor.removeListener("selectionChanged",this.handleSelectionChange),ze.get(this.editor).removeListener("childChange",this.handleHoveringBlockChildChange)}isInBlock(t,e){return t!==this.hoveringBlock?!1:!!(e.target&&e.target instanceof Node&&this.toolbar.popper&&Ae(this.toolbar.popper,e.target))}bindEvents(){document.addEventListener("mousedown",this.handleDocumentMouseDown)}unbindEvents(){document.removeEventListener("mousedown",this.handleDocumentMouseDown)}update(t){!this.editor.isWritable()||this.showTextToolbar(t)}showTextToolbar(t){var R,S;if(this._disableTextToolbar)return;const e=this.editor.selection.range,r=e.getSelectedBlocks();if(r.length===0)return;const i=r[0];if(!i)return;if(r.length===1){if(Le(i.block)){t==="click"&&this.showObjectToolbar(null);return}if(Pt(this.editor,i.block)&&e.isSimple())return}if(Ko(i.block)){this.toolbar.close("selectionChange");return}const o=this.editor.editorCommandProviders.getCommands(this.editor.selection.range,this.id),s=new Map;o.forEach(M=>{const U=M.groupIndex,V=s.get(U);V?V.push(M):s.set(U,[M])});const l=[[]],c=Array.from(s.entries()).sort((M,U)=>M[0]-U[0]);for(let M=0;M<c.length;M++){const[,U]=c[M];if(U.length===0)continue;let V=l[l.length-1];V.length>0&&V[V.length-1].groupIndex!==U[U.length-1].groupIndex&&(V=[],l.push(V)),V.push(...zm(U))}if(l.length===0){this.toolbar.close("selectionChange");return}this.toolbarType="text";const d=[];if(l.forEach((M,U)=>{const V=M.sort((nt,Y)=>{var X,ft;return((X=nt.order)!=null?X:0)-((ft=Y.order)!=null?ft:0)});d.push(...V),U!==l.length-1&&d.push(vK)}),d.length===0){this.toolbar.close("selectionChange");return}this.toolbar.updateItems(d);const h=r[r.length-1],C=!this.editor.selection.range.isReverse()&&h!==i,E=C?h:i,A=hk(this.editor,E),v=jo(this.editor,E.block,"editor-quick-menu",A);this.toolbar.manualShow(v,{placement:C?"bottom":"top",offset:[0,C?5:10]}),(S=(R=this.toolbar.tippyInstance)==null?void 0:R.popperInstance)==null||S.update()}showObjectToolbar(t){var l,c,d;if(!this.hoveringBlock||this.mouseDown)return;const e=this.hoveringBlock,r=this.hoveringTextChild,{commands:i,element:o}=HP(this.editor,e,r);if(!i.length||!o){this.toolbar.close("fromHover");return}this.toolbarType="object",this.toolbar.isVisible&&((c=(l=this.toolbar)==null?void 0:l.tippyInstance)==null?void 0:c.reference)!==o&&this.toolbar.close("fromHover");const s=()=>{let h;const C=o.getClientRects(),E=[];if(Array.from(C).forEach(A=>{const{y:v}=A;E.includes(v)||E.push(v)}),E.length>1){if(h=r?C[C.length-1]:C[0],t)for(let A=0;A<C.length;A++){const v=C[A],R=new DOMRect(v.x-4,v.y-4,v.width+8,v.height+8);if(R.x<t.clientX&&t.clientX<R.right&&R.y<t.clientY&&t.clientY<R.bottom){h=v;break}}}else{if(h=o.getBoundingClientRect(),r){const A=r.getBoundingClientRect();return new DOMRect(A.x,A.y+2,A.width,A.height)}return new DOMRect(C[0].x,C[0].y,C[0].width,C[0].height)}if(t){const A=h.y,v=t.clientX;return new DOMRect(v,A,10,h.height)}return h};this.toolbar.updateItems(i),this.toolbar.isVisible||(this.toolbar.manualShow(o,{placement:r?"bottom":"top",getReferenceClientRect:s}),(d=this.toolbar.tippyInstance)!=null&&d.popper&&(this.toolbar.tippyInstance.popper.style.paddingTop="10px",this.toolbar.tippyInstance.popper.style.paddingBottom="5px"))}static register(t){return t.addCustom("toolbar-handler",e=>new bu(e))}static get(t){return t.getCustom("toolbar-handler")}}function rg(n,t,e){n.getBlockData(t).heading===e?n.updateBlockData(t,{heading:null}):n.updateBlockData(t,{heading:e})}function Kk(n,t,e){["left","center","right"].includes(e)?n.updateBlockData(t,{align:e}):n.updateBlockData(t,{align:null})}function nA(n,t){const r=n.getBlockData(t).quoted;n.updateBlockData(t,{quoted:r?void 0:!0})}function rA(n,t){return!!(n[t]||n.level&&(n.ordered===!0&&!n.checkbox&&t==="ordered-list"||n.ordered===!1&&!n.checkbox&&t==="unordered-list")||t==="check-list"&&n.checkbox)}function iA(n,t,e){if(!n.selection.range.focus.isSimple())return;const i=n.getBlockData(t);let o;switch(e){case"unordered-list":o=rA(i,"unordered-list")?void 0:"unordered";break;case"ordered-list":o=rA(i,"ordered-list")?void 0:"ordered";break;case"check-list":o=rA(i,"check-list")?void 0:"unchecked";break}if(o){const s=k0(n,t,"list",{offset:0,data:{listType:o}});s&&n.undoManager.runInGroup(()=>{const l=Rt(t),c=at(t);n.deleteBlock(t);const d=n.insertBlock(Et(c),l,s.blockData);s.onConverted&&s.onConverted(n,d)})}else xu(n,t)}const BK=Object.freeze(Object.defineProperty({__proto__:null,applyHeadingStyle:rg,applyAlignStyle:Kk,applyQuoteStyle:nA,applyList:iA},Symbol.toStringTag,{value:"Module"})),yK=[bm,vm,Bm,ym,Tm,km,Rm,wm],TK={Unordered:fE,Ordered:dE,Checkbox:cE,Quote:uE};function Vk(n,t){const e=n;e.blockOptions=t,e.itemType="insert-block",n.children&&n.children.forEach(r=>Vk(r,t))}function kK(){return{name:"basic",insertBlockCommandItems:[{id:"text",icon:iu,name:_.t("commands.text"),order:0,group:"basics",value:"text"}]}}function oA(n=1){var i;const t={name:"basic",insertBlockCommandItems:[]};let e=Wm();e<=4?e=5:e<8&&(e+=1);let r=n;for(;r<=e;){const o=`heading-${r}`;(i=t.insertBlockCommandItems)==null||i.push({id:o,icon:yK[r-1],name:_.t("quickMenu.basic.heading.title",{heading:String(r)}),order:r,group:"basics",value:String(r),subText:tr(o)}),r++}return t}function RK(){const n={name:"basic",insertBlockCommandItems:[]};return["Unordered","Ordered","Checkbox","Quote"].forEach((e,r)=>{var o;const i=`insert-${e.toLocaleLowerCase()}`;(o=n.insertBlockCommandItems)==null||o.push({id:i,name:_.t(`quickMenu.basic.${e.toLocaleLowerCase()}`),icon:TK[e],value:e.toLocaleLowerCase(),group:"basics",order:10+r,subText:tr(i)})}),n}class $k{constructor(t){this.withPlainText=t}getCommands(){const t=kK(),e=oA(),r=RK();return[...this.withPlainText?t.insertBlockCommandItems||[]:[],...e.insertBlockCommandItems||[],...r.insertBlockCommandItems||[]]}updateBlock(t,e,r,i){const{value:o,id:s}=i;return s.startsWith("heading-")?rg(t,r,Number.parseInt(o!=null?o:"1",10)||1):o==="ordered"||o==="unordered"||o==="checkbox"?iA(t,r,{ordered:"ordered-list",unordered:"unordered-list",checkbox:"check-list"}[o]):o==="quote"&&nA(t,r),null}async handleUpdateBlockCore(t,e){const r=t.getBlockByIndex(e.containerId,e.blockIndex);return this.updateBlock(t,e.containerId,r,e.item)}async handleInsertEmptyBlockCore(t,e){const{containerId:r,blockIndex:i}=e,o=t.insertTextBlock(void 0,r,i);return this.updateBlock(t,e.containerId,o,e.item)}async executeCommand(t,e,r){if(r.from==="quick-menu"||r.from==="add-block-menu"){const i=t.getBlockById(r.blockId),o=t.getParentContainer(i),s=Et(o),l=t.getBlockIndex(i);t.undoManager.runInGroup(()=>this.handleUpdateBlockCore(t,{item:e,containerId:s,blockIndex:l})),t.focus()}else r.from==="block-menu"&&(t.undoManager.runInGroup(()=>this.handleInsertEmptyBlockCore(t,{item:e,containerId:r.containerId,blockIndex:r.blockIndex})),t.focus());return null}}const Hk={basics:100,system:200,common:300,thirdParty:400};class sA{constructor(){m(this,"dataUrl","");m(this,"texWidth",null);m(this,"error",null)}destroy(){}setDataUrl(t){this.error=null,this.dataUrl=t}setError(t){this.dataUrl="",this.error=t}setTexWidth(t,e){this.texWidth=[t,e]}}const wK=D("mathjax-converter"),SK="MathJax-script",LK=30,jk=8;async function IK(n){var r;window.MathJax||(window.MathJax={options:{skipHtmlTags:["script","noscript","style","textarea","pre","code","annotation","annotation-xml","body"]}});const t=n.getComponentOptions("mathjax"),e=((r=t==null?void 0:t.cdn)==null?void 0:r.mathjax)||"https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js";await ra(e,SK)}function DK(){try{window.MathJax&&window.MathJax.texReset()}catch{}}async function ig(n,t){const e="mathjax2Svg";try{await No.lock(e),DK(),await IK(n);const r=await window.MathJax.tex2svgPromise(t),i=r.querySelector("merror");if(i)throw new Error(i.textContent);return r.querySelector("svg").outerHTML}catch(r){throw wK.error(r),r}finally{No.release(e)}}function zk(n){const t=new DOMParser().parseFromString(n,"image/svg+xml"),e={width:0,height:0};if(t&&t.firstChild){const r=t.firstChild,i=r.getAttribute("height"),o=r.style.minWidth;i&&(e.width=parseInt(o,10)*jk+LK,e.height=parseInt(i,10)*jk)}return e}async function Gk(n,t){const e=await ig(n,t);return e?await qp(e,"image/svg+xml"):""}async function Wk(n,t){const r=await ig(n,t),i=new File([r],"math.svg");return(await n.doc.uploadResource(i)).resourceId}async function _K(n,t){const e=await ig(n,t),r=zk(e),i=e,o=new File([i],"math.svg");return{resourceId:(await n.doc.uploadResource(o)).resourceId,...r}}const qk=D("edit-mathjax");class MK{constructor(){m(this,"editMathjaxPopup",null);m(this,"onChange",null);m(this,"tex","");m(this,"observer",null);m(this,"handleClose",t=>{var r;const e=t.content.querySelector("textarea");if(e){const i=e.value;i!==this.tex&&((r=this.onChange)==null||r.call(this,i,!0))}});m(this,"handleKeyup",t=>{var e;t.isComposing||(t.key==="Escape"&&((e=this.editMathjaxPopup)==null||e.close("cancelBar")),this.handleChange(t.target.value))});m(this,"handleChange",Pe.default(t=>{var e;(e=this.onChange)==null||e.call(this,t,!1)},300))}editMathjax(t,e,r,i){if(!this.editMathjaxPopup)this.editMathjaxPopup=new su(this.createPopupContent(e),{id:"mathjax-popover"});else{const o=this.getTextarea();o.value=e}this.tex=e,this.editMathjaxPopup.manualShow(t,{theme:"light",placement:i==null?void 0:i.placement}),this.editMathjaxPopup.removeAllListeners("close"),this.editMathjaxPopup.addListener("close",this.handleClose),this.onChange=r}createPopupContent(t){const e=B("textarea",["mathjax-editor-textarea"],null);return e.value=t,e.addEventListener("keyup",this.handleKeyup),this.textareaWatcher(e),e}textareaWatcher(t){const e=t;e.onblur=()=>{var i;(i=this.editMathjaxPopup)!=null&&i.isVisible&&t.focus()};const r=()=>{setTimeout(()=>{t.focus()})};this.observer=new IntersectionObserver(r,{}),this.observer.observe(t)}getTextarea(){p(qk,this.editMathjaxPopup,"no exists mathjax editor popup");const t=this.editMathjaxPopup.content.querySelector("textarea");return p(qk,t,"no textarea"),t}destroy(){var t,e;this.onChange=null,(t=this.observer)==null||t.disconnect(),(e=this.editMathjaxPopup)==null||e.removeAllListeners()}}function Xk(n,t,e,r,i){n.addCustom("mathjax-editor",()=>new MK).editMathjax(t,e.trim(),r,i)}function Yk(){return{insert:" ",attributes:{id:it(),box:!0,type:"math",tex:" ",src:"",created:Date.now()}}}function og(n,t){const e=n.getBoxData(t),r=et(t);if(!r)return;const i=ga(r,t);n.selection.selectBlock(r,i.start,i.end);const o=async(s,l)=>{if(!s.trim()){n.updateBoxData({...e,tex:s,src:null});return}try{await No.lock("convertAndUploadMathjax");const c=await Wk(n,s);n.updateBoxData({...e,tex:s,src:c})}catch(c){const d=n.getBoxData(t);n.addCustom(`mathjax-box-${d.id}`,()=>new sA).setError(c),n.updateBoxData({...e,tex:s,src:""})}finally{No.release("convertAndUploadMathjax"),l&&n.focus()}};Xk(n,t,e.tex,o)}const Qk=D("mathjax-box");function lA(n,t){n.selection.updateSelection(null);const e=t.target;!e||!(e instanceof HTMLElement)||n.domEvents.removeEventListener(e,null,lA)}async function UK(n,t,e){try{if(!t.tex.trim())return;const r=await Gk(n,t.tex),i=n.findBoxById(t.id);if(!i)return;const o=f1(i);o.innerHTML="";const s=B("img",["mathjax"],o);s.src=r,e.setDataUrl(r),n.domEvents.addEventListener(s,"load",lA)}catch(r){e.setError(r);const i=n.findBoxById(t.id);if(!i)return;const o=i.querySelector(".mathjax-tex-text");q(o,"mathjax-error"),o.innerText=r.message,n.selection.updateSelection(null)}}function OK(n,t,e,r){const i=r,o=n.addCustom(`mathjax-box-${i.id}`,()=>new sA);if(i.src||o.dataUrl){const c=B("img",["mathjax"],e);c.src=n.doc.buildResourceUrl(i.src||o.dataUrl,{syncNewResources:async(C,E)=>{var v,R;await n.doc.addResources([C]);const A=(R=(v=n.doc).getServerMeta)==null?void 0:R.call(v).appId;if(i.src&&i.src!==E&&A&&i.src.includes(A)){const S=et(e),M=xt.default(i);S&&n.isBlockWritable(S)&&!n.readonly&&(M.src=C,n.updateBoxData(M))}}});const[d,h]=o.texWidth||[];d===i.tex&&h?c.style.width=`${h}px`:ig(n,i.tex).then(C=>{const{width:E}=zk(C);o.setTexWidth(i.tex,E);const A=n.findBoxById(i.id),v=A==null?void 0:A.querySelector("img");v&&(v.style.width=`${E}px`)}),n.domEvents.addEventListener(c,"load",lA);return}const s=["mathjax-tex-text"];let l=i.tex;l.trim()?o.error&&(l=o.error.message,s.push("mathjax-error")):l=_.t("mathjax.emptyText"),B("span",s,e,l),UK(n,i,o)}function NK(n,t){const e={id:it(),box:!0,type:"math",tex:t,src:"",created:Date.now()};return Wk(n,t).then(r=>{if(!n.findBoxById(e.id))return;const o={...e,src:r};n.updateBoxData(o)}).catch(r=>{Qk.error(`failed to convert and upload mathjax: ${JSON.stringify(r)}`)}),e}function PK(n,t,e,r){const i=t;return r==="text"?i.tex:r==="markdown"?` $${i.tex}$ `:i.src?`<img src="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" />`:`<code>$${i.tex}$</code>`}function FK(n,t,e){const r=et(t);p(Qk,r,"failed to get block"),!(n.readonly||!n.isBlockWritable(r))&&og(n,t)}function KK(){return{abstract:`[${_.t("mathjax.abstract")}]`}}const Jk={boxType:"math",updateBoxContent:OK,convertFrom:NK,convertTo:PK,handleClickBox:FK,getBoxProperties:KK};async function VK(n,t,e){try{const r=t.embedData,i=await Gk(n,r.mathjaxText),o=n.findBlockById(t.id);if(!o)return;const s=zt(o);s.innerHTML="";const l=B("img",["mathjax"],s);l.src=i,e.setDataUrl(i)}catch(r){e.setError(r)}}function $K(n,t){if(n.readonly||!t.target||!(t.target instanceof Node))return;const e=et(t.target);if(!e||!Le(e)||ln(e)!=="math")return;const r=zt(e),i=r.querySelector("img")||r.querySelector("span.mathjax-tex-text");if(!i||!Ae(i,t.target))return;const s=n.getBlockData(e).embedData;Xk(n,i,s.mathjaxText,async l=>{const{resourceId:c,width:d,height:h}=await _K(n,l),C={mathjaxText:l,src:c,width:d,height:h};n.updateEmbedData(e,C)},{placement:"bottom"})}function HK(n,t,e){const r=e.embedData,{src:i,width:o}=r,s=n.addCustom(`mathjax-block-${e.id}`,()=>new sA);if(n.domEvents.addEventListener(t,"click",$K),!r.mathjaxText.trim()){B("span",["mathjax-tex-text"],t,_.t("mathjax.emptyText"));return}if(i||s.dataUrl){const l=B("img",["mathjax"],t);l.src=n.doc.buildResourceUrl(i||s.dataUrl,{syncNewResources:async(c,d)=>{var h,C;if(i){await n.doc.addResources([c]);const E=(C=(h=n.doc).getServerMeta)==null?void 0:C.call(h).appId;if(i&&d!==i&&E&&i.includes(E)){const A=et(t);setTimeout(()=>{if(A&&!n.readonly&&n.isBlockWritable(A)){const v=xt.default(e);v.embedData.src=c,n.updateBlockData(A,v)}})}}}}),o&&(l.style.minWidth=`${o}px`,setTimeout(()=>{const c=t.getBoundingClientRect().width;o>c?(q(t,"mathjax-overflow"),t.style.overflow="auto",t.style.setProperty("--mathjax-width",`${o}px`)):(ut(t,"mathjax-overflow"),t.removeAttribute("data-mathjax-width"),t.style.removeProperty("--mathjax-width"))}));return}s.error,B("span",["mathjax-tex-text"],t,r.mathjaxText),VK(n,e,s)}function jK(n,t,e){if(!st(n,t))return null;const r=n.getBlockString(t).trim();if(!r||!r.startsWith("$$")||!r.endsWith("$$"))return null;const i=Hp(r,"$");if(!i)return null;const o={mathjaxText:i,src:""};return{blockData:{id:it(),type:"embed",embedType:"math",embedData:o}}}function zK(n){return{name:"Mathjax"}}function GK(n,t){var r;const e=zt(t);n.domEvents.removeAllListeners(e),n.findCustom("mathjax-editor")&&((r=n.getCustom("mathjax-editor").editMathjaxPopup)==null||r.close("cancelBar"))}function WK(n,t,e,r){const i=t.embedData;return r==="html"?`<img src="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" />`:r==="markdown"?`
618
618
  $$${i.mathjaxText}$$
619
619
  `:i.mathjaxText}function qK(){return{abstract:_.t("mathjax.abstract")}}const XK={embedType:"math",createEmbedContent:HK,getOptions:zK,convertFrom:jK,handleDeleteBlock:GK,convertTo:WK,getBlockProperties:qK},Bat="",YK={mathjax:{emptyText:"\u7A7A\u7684\u516C\u5F0F",abstract:"\u516C\u5F0F"}},QK={mathjax:{emptyText:"Empty formula",abstract:"Formula"}},JK={mathjax:{emptyText:"\u6570\u5F0F\u306A\u3057",abstract:"\u6570\u5F0F"}};_.mergeLang({"zh-CN":YK,"en-US":QK,"ja-JP":JK});function ZK(n,t,e,r){const i=n.getBlockByIndex(t,e),o=n.getBlockText(i),{left:s}=ar(o,r);if(!Re(s).endsWith("$$$$"))return!1;const c=r-4,d=r,h={id:it(),box:!0,type:"math",tex:" ",src:"",created:Date.now()};return n.undoManager.runInGroup(()=>{n.deleteTextFromBlock(i,c,d-c),n.insertBoxToBlock(i,c,h),setTimeout(()=>{const C=n.getBoxById(h.id);og(n,C)})}),!0}class tV{handleAfterInsertText(t,e,r,i,o){return!!(o===" "&&ZK(t,e,r,i))}}var Li={exports:{}};/**
620
620
  * @license
@@ -642,7 +642,7 @@ __p += '`),re&&(ot+=`' +
642
642
  function print() { __p += __j.call(arguments, '') }
643
643
  `:`;
644
644
  `)+ot+`return __p
645
- }`;var Wt=z6(function(){return se(L,kt+"return "+ot).apply(e,P)});if(Wt.source=ot,Ab(Wt))throw Wt;return Wt}function Wot(a){return Ee(a).toLowerCase()}function qot(a){return Ee(a).toUpperCase()}function Xot(a,u,g){if(a=Ee(a),a&&(g||u===e))return Ls(a);if(!a||!(u=Fr(u)))return a;var x=Pr(a),y=Pr(u),L=sc(x,y),P=Ph(x,y)+1;return Yl(x,L,P).join("")}function Yot(a,u,g){if(a=Ee(a),a&&(g||u===e))return a.slice(0,lf(a)+1);if(!a||!(u=Fr(u)))return a;var x=Pr(a),y=Ph(x,Pr(u))+1;return Yl(x,0,y).join("")}function Qot(a,u,g){if(a=Ee(a),a&&(g||u===e))return a.replace(ja,"");if(!a||!(u=Fr(u)))return a;var x=Pr(a),y=sc(x,Pr(u));return Yl(x,y).join("")}function Jot(a,u){var g=wt,x=Bt;if(Ge(u)){var y="separator"in u?u.separator:y;g="length"in u?jt(u.length):g,x="omission"in u?Fr(u.omission):x}a=Ee(a);var L=a.length;if(Is(a)){var P=Pr(a);L=P.length}if(g>=L)return a;var K=g-zl(x);if(K<1)return x;var H=P?Yl(P,0,K).join(""):a.slice(0,K);if(y===e)return H+x;if(P&&(K+=H.length-K),xb(y)){if(a.slice(K).search(y)){var Z,tt=H;for(y.global||(y=ff(y.source,Ee(Ol.exec(y))+"g")),y.lastIndex=0;Z=y.exec(tt);)var ot=Z.index;H=H.slice(0,ot===e?K:ot)}}else if(a.indexOf(Fr(y),K)!=K){var bt=H.lastIndexOf(y);bt>-1&&(H=H.slice(0,bt))}return H+x}function Zot(a){return a=Ee(a),a&&ju.test(a)?a.replace(Hu,af):a}var tst=hf(function(a,u,g){return a+(g?" ":"")+u.toUpperCase()}),Bb=GL("toUpperCase");function j6(a,u,g){return a=Ee(a),u=g?e:u,u===e?rf(a)?Jg(a):ne(a):a.match(u)||[]}var z6=qt(function(a,u){try{return Kn(a,e,u)}catch(g){return Ab(g)?g:new Nt(g)}}),est=js(function(a,u){return qn(u,function(g){g=Oo(g),$s(a,g,Cb(a[g],a))}),a});function nst(a){var u=a==null?0:a.length,g=It();return a=u?ht(a,function(x){if(typeof x[1]!="function")throw new ir(s);return[g(x[0]),x[1]]}):[],qt(function(x){for(var y=-1;++y<u;){var L=a[y];if(Kn(L[0],this,x))return Kn(L[1],this,x)}})}function rst(a){return Ret(fi(a,C))}function yb(a){return function(){return a}}function ist(a,u){return a==null||a!==a?u:a}var ost=qL(),sst=qL(!0);function br(a){return a}function Tb(a){return yL(typeof a=="function"?a:fi(a,C))}function lst(a){return kL(fi(a,C))}function ast(a,u){return RL(a,fi(u,C))}var cst=qt(function(a,u){return function(g){return qh(g,a,u)}}),ust=qt(function(a,u){return function(g){return qh(a,g,u)}});function kb(a,u,g){var x=Ln(u),y=cp(u,x);g==null&&!(Ge(u)&&(y.length||!x.length))&&(g=u,u=a,a=this,y=cp(u,Ln(u)));var L=!(Ge(g)&&"chain"in g)||!!g.chain,P=Gs(a);return qn(y,function(K){var H=u[K];a[K]=H,P&&(a.prototype[K]=function(){var Z=this.__chain__;if(L||Z){var tt=a(this.__wrapped__),ot=tt.__actions__=Er(this.__actions__);return ot.push({func:H,args:arguments,thisArg:a}),tt.__chain__=Z,tt}return H.apply(a,$t([this.value()],arguments))})}),a}function fst(){return Qe._===this&&(Qe._=tp),this}function Rb(){}function dst(a){return a=jt(a),qt(function(u){return wL(u,a)})}var hst=ib(ht),mst=ib(N),gst=ib(we);function G6(a){return fb(a)?Fi(Oo(a)):zet(a)}function pst(a){return function(u){return a==null?e:yc(a,u)}}var Cst=YL(),Est=YL(!0);function wb(){return[]}function Sb(){return!1}function Ast(){return{}}function xst(){return""}function bst(){return!0}function vst(a,u){if(a=jt(a),a<1||a>bn)return[];var g=Nn,x=O(a,Nn);u=It(u),a-=Nn;for(var y=nf(x,u);++g<a;)u(g);return y}function Bst(a){return Vt(a)?ht(a,Oo):Kr(a)?[a]:Er(d6(Ee(a)))}function yst(a){var u=++Zg;return Ee(a)+u}var Tst=gp(function(a,u){return a+u},0),kst=ob("ceil"),Rst=gp(function(a,u){return a/u},1),wst=ob("floor");function Sst(a){return a&&a.length?ap(a,br,jx):e}function Lst(a,u){return a&&a.length?ap(a,It(u,2),jx):e}function Ist(a){return Ss(a,br)}function Dst(a,u){return Ss(a,It(u,2))}function _st(a){return a&&a.length?ap(a,br,qx):e}function Mst(a,u){return a&&a.length?ap(a,It(u,2),qx):e}var Ust=gp(function(a,u){return a*u},1),Ost=ob("round"),Nst=gp(function(a,u){return a-u},0);function Pst(a){return a&&a.length?ef(a,br):0}function Fst(a,u){return a&&a.length?ef(a,It(u,2)):0}return w.after=lit,w.ary=B6,w.assign=qit,w.assignIn=N6,w.assignInWith=wp,w.assignWith=Xit,w.at=Yit,w.before=y6,w.bind=Cb,w.bindAll=est,w.bindKey=T6,w.castArray=Ait,w.chain=x6,w.chunk=wnt,w.compact=Snt,w.concat=Lnt,w.cond=nst,w.conforms=rst,w.constant=yb,w.countBy=Prt,w.create=Qit,w.curry=k6,w.curryRight=R6,w.debounce=w6,w.defaults=Jit,w.defaultsDeep=Zit,w.defer=ait,w.delay=cit,w.difference=Int,w.differenceBy=Dnt,w.differenceWith=_nt,w.drop=Mnt,w.dropRight=Unt,w.dropRightWhile=Ont,w.dropWhile=Nnt,w.fill=Pnt,w.filter=Krt,w.flatMap=Hrt,w.flatMapDeep=jrt,w.flatMapDepth=zrt,w.flatten=p6,w.flattenDeep=Fnt,w.flattenDepth=Knt,w.flip=uit,w.flow=ost,w.flowRight=sst,w.fromPairs=Vnt,w.functions=sot,w.functionsIn=lot,w.groupBy=Grt,w.initial=Hnt,w.intersection=jnt,w.intersectionBy=znt,w.intersectionWith=Gnt,w.invert=cot,w.invertBy=uot,w.invokeMap=qrt,w.iteratee=Tb,w.keyBy=Xrt,w.keys=Ln,w.keysIn=xr,w.map=vp,w.mapKeys=dot,w.mapValues=hot,w.matches=lst,w.matchesProperty=ast,w.memoize=yp,w.merge=mot,w.mergeWith=P6,w.method=cst,w.methodOf=ust,w.mixin=kb,w.negate=Tp,w.nthArg=dst,w.omit=got,w.omitBy=pot,w.once=fit,w.orderBy=Yrt,w.over=hst,w.overArgs=dit,w.overEvery=mst,w.overSome=gst,w.partial=Eb,w.partialRight=S6,w.partition=Qrt,w.pick=Cot,w.pickBy=F6,w.property=G6,w.propertyOf=pst,w.pull=Ynt,w.pullAll=E6,w.pullAllBy=Qnt,w.pullAllWith=Jnt,w.pullAt=Znt,w.range=Cst,w.rangeRight=Est,w.rearg=hit,w.reject=tit,w.remove=trt,w.rest=mit,w.reverse=gb,w.sampleSize=nit,w.set=Aot,w.setWith=xot,w.shuffle=rit,w.slice=ert,w.sortBy=sit,w.sortedUniq=art,w.sortedUniqBy=crt,w.split=Hot,w.spread=git,w.tail=urt,w.take=frt,w.takeRight=drt,w.takeRightWhile=hrt,w.takeWhile=mrt,w.tap=Srt,w.throttle=pit,w.thru=bp,w.toArray=M6,w.toPairs=K6,w.toPairsIn=V6,w.toPath=Bst,w.toPlainObject=O6,w.transform=bot,w.unary=Cit,w.union=grt,w.unionBy=prt,w.unionWith=Crt,w.uniq=Ert,w.uniqBy=Art,w.uniqWith=xrt,w.unset=vot,w.unzip=pb,w.unzipWith=A6,w.update=Bot,w.updateWith=yot,w.values=pf,w.valuesIn=Tot,w.without=brt,w.words=j6,w.wrap=Eit,w.xor=vrt,w.xorBy=Brt,w.xorWith=yrt,w.zip=Trt,w.zipObject=krt,w.zipObjectDeep=Rrt,w.zipWith=wrt,w.entries=K6,w.entriesIn=V6,w.extend=N6,w.extendWith=wp,kb(w,w),w.add=Tst,w.attempt=z6,w.camelCase=Sot,w.capitalize=$6,w.ceil=kst,w.clamp=kot,w.clone=xit,w.cloneDeep=vit,w.cloneDeepWith=Bit,w.cloneWith=bit,w.conformsTo=yit,w.deburr=H6,w.defaultTo=ist,w.divide=Rst,w.endsWith=Lot,w.eq=Hi,w.escape=Iot,w.escapeRegExp=Dot,w.every=Frt,w.find=Vrt,w.findIndex=m6,w.findKey=tot,w.findLast=$rt,w.findLastIndex=g6,w.findLastKey=eot,w.floor=wst,w.forEach=b6,w.forEachRight=v6,w.forIn=not,w.forInRight=rot,w.forOwn=iot,w.forOwnRight=oot,w.get=bb,w.gt=Tit,w.gte=kit,w.has=aot,w.hasIn=vb,w.head=C6,w.identity=br,w.includes=Wrt,w.indexOf=$nt,w.inRange=Rot,w.invoke=fot,w.isArguments=Rc,w.isArray=Vt,w.isArrayBuffer=Rit,w.isArrayLike=Ar,w.isArrayLikeObject=on,w.isBoolean=wit,w.isBuffer=Ql,w.isDate=Sit,w.isElement=Lit,w.isEmpty=Iit,w.isEqual=Dit,w.isEqualWith=_it,w.isError=Ab,w.isFinite=Mit,w.isFunction=Gs,w.isInteger=L6,w.isLength=kp,w.isMap=I6,w.isMatch=Uit,w.isMatchWith=Oit,w.isNaN=Nit,w.isNative=Pit,w.isNil=Kit,w.isNull=Fit,w.isNumber=D6,w.isObject=Ge,w.isObjectLike=Ze,w.isPlainObject=t0,w.isRegExp=xb,w.isSafeInteger=Vit,w.isSet=_6,w.isString=Rp,w.isSymbol=Kr,w.isTypedArray=gf,w.isUndefined=$it,w.isWeakMap=Hit,w.isWeakSet=jit,w.join=Wnt,w.kebabCase=_ot,w.last=hi,w.lastIndexOf=qnt,w.lowerCase=Mot,w.lowerFirst=Uot,w.lt=zit,w.lte=Git,w.max=Sst,w.maxBy=Lst,w.mean=Ist,w.meanBy=Dst,w.min=_st,w.minBy=Mst,w.stubArray=wb,w.stubFalse=Sb,w.stubObject=Ast,w.stubString=xst,w.stubTrue=bst,w.multiply=Ust,w.nth=Xnt,w.noConflict=fst,w.noop=Rb,w.now=Bp,w.pad=Oot,w.padEnd=Not,w.padStart=Pot,w.parseInt=Fot,w.random=wot,w.reduce=Jrt,w.reduceRight=Zrt,w.repeat=Kot,w.replace=Vot,w.result=Eot,w.round=Ost,w.runInContext=$,w.sample=eit,w.size=iit,w.snakeCase=$ot,w.some=oit,w.sortedIndex=nrt,w.sortedIndexBy=rrt,w.sortedIndexOf=irt,w.sortedLastIndex=ort,w.sortedLastIndexBy=srt,w.sortedLastIndexOf=lrt,w.startCase=jot,w.startsWith=zot,w.subtract=Nst,w.sum=Pst,w.sumBy=Fst,w.template=Got,w.times=vst,w.toFinite=Ws,w.toInteger=jt,w.toLength=U6,w.toLower=Wot,w.toNumber=mi,w.toSafeInteger=Wit,w.toString=Ee,w.toUpper=qot,w.trim=Xot,w.trimEnd=Yot,w.trimStart=Qot,w.truncate=Jot,w.unescape=Zot,w.uniqueId=yst,w.upperCase=tst,w.upperFirst=Bb,w.each=b6,w.eachRight=v6,w.first=C6,kb(w,function(){var a={};return Mo(w,function(u,g){le.call(w.prototype,g)||(a[g]=u)}),a}(),{chain:!1}),w.VERSION=r,qn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){w[a].placeholder=w}),qn(["drop","take"],function(a,u){Yt.prototype[a]=function(g){g=g===e?1:I(jt(g),0);var x=this.__filtered__&&!u?new Yt(this):this.clone();return x.__filtered__?x.__takeCount__=O(g,x.__takeCount__):x.__views__.push({size:O(g,Nn),type:a+(x.__dir__<0?"Right":"")}),x},Yt.prototype[a+"Right"]=function(g){return this.reverse()[a](g).reverse()}}),qn(["filter","map","takeWhile"],function(a,u){var g=u+1,x=g==Oe||g==ni;Yt.prototype[a]=function(y){var L=this.clone();return L.__iteratees__.push({iteratee:It(y,3),type:g}),L.__filtered__=L.__filtered__||x,L}}),qn(["head","last"],function(a,u){var g="take"+(u?"Right":"");Yt.prototype[a]=function(){return this[g](1).value()[0]}}),qn(["initial","tail"],function(a,u){var g="drop"+(u?"":"Right");Yt.prototype[a]=function(){return this.__filtered__?new Yt(this):this[g](1)}}),Yt.prototype.compact=function(){return this.filter(br)},Yt.prototype.find=function(a){return this.filter(a).head()},Yt.prototype.findLast=function(a){return this.reverse().find(a)},Yt.prototype.invokeMap=qt(function(a,u){return typeof a=="function"?new Yt(this):this.map(function(g){return qh(g,a,u)})}),Yt.prototype.reject=function(a){return this.filter(Tp(It(a)))},Yt.prototype.slice=function(a,u){a=jt(a);var g=this;return g.__filtered__&&(a>0||u<0)?new Yt(g):(a<0?g=g.takeRight(-a):a&&(g=g.drop(a)),u!==e&&(u=jt(u),g=u<0?g.dropRight(-u):g.take(u-a)),g)},Yt.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Yt.prototype.toArray=function(){return this.take(Nn)},Mo(Yt.prototype,function(a,u){var g=/^(?:filter|find|map|reject)|While$/.test(u),x=/^(?:head|last)$/.test(u),y=w[x?"take"+(u=="last"?"Right":""):u],L=x||/^find/.test(u);!y||(w.prototype[u]=function(){var P=this.__wrapped__,K=x?[1]:arguments,H=P instanceof Yt,Z=K[0],tt=H||Vt(P),ot=function(Zt){var re=y.apply(w,$t([Zt],K));return x&&bt?re[0]:re};tt&&g&&typeof Z=="function"&&Z.length!=1&&(H=tt=!1);var bt=this.__chain__,kt=!!this.__actions__.length,Dt=L&&!bt,Wt=H&&!kt;if(!L&&tt){P=Wt?P:new Yt(this);var _t=a.apply(P,K);return _t.__actions__.push({func:bp,args:[ot],thisArg:e}),new Cr(_t,bt)}return Dt&&Wt?a.apply(this,K):(_t=this.thru(ot),Dt?x?_t.value()[0]:_t.value():_t)})}),qn(["pop","push","shift","sort","splice","unshift"],function(a){var u=uc[a],g=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",x=/^(?:pop|shift)$/.test(a);w.prototype[a]=function(){var y=arguments;if(x&&!this.__chain__){var L=this.value();return u.apply(Vt(L)?L:[],y)}return this[g](function(P){return u.apply(Vt(P)?P:[],y)})}}),Mo(Yt.prototype,function(a,u){var g=w[u];if(g){var x=g.name+"";le.call(Vn,x)||(Vn[x]=[]),Vn[x].push({name:u,func:g})}}),Vn[mp(e,M).name]=[{name:"wrapper",func:e}],Yt.prototype.clone=Qtt,Yt.prototype.reverse=Jtt,Yt.prototype.value=Ztt,w.prototype.at=Lrt,w.prototype.chain=Irt,w.prototype.commit=Drt,w.prototype.next=_rt,w.prototype.plant=Urt,w.prototype.reverse=Ort,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=Nrt,w.prototype.first=w.prototype.head,Cc&&(w.prototype[Cc]=Mrt),w},Ms=uf();li?((li.exports=Ms)._=Ms,tc._=Ms):Qe._=Ms}).call(Tn)})(Li,Li.exports);function eV(n,t,e,r){Mm(n,{className:"status-input",defaultValue:t,onChange:e,onKeyDown:r,maxLength:32})}const Zk=["Blue","Grey","Yellow","Red","Green","Purple"];function nV(){const n=B("div",["status-color-palette"],null);for(const t of Zk){const e=B("button",["status-box-button"],null);e.setAttribute("data-color",Li.exports.lowerCase(t)),e.setAttribute("title",_.t(`status.color.${Li.exports.lowerCase(t)}`)),n.appendChild(e)}return n}class rV{constructor(){m(this,"root",nV());m(this,"changeColor",t=>{for(const r of Array.from(this.root.querySelectorAll(":scope > button")))r.classList.remove("selected");const e=this.root.querySelector(`button[data-color="${Li.exports.lowerCase(t)}"]`);e==null||e.classList.add("selected")})}}function tR(n){localStorage.setItem(`statusBox.lastColor.${Li.exports.lowerCase(n.color)}`,n.title)}function eR(n){var t;return(t=localStorage.getItem(`statusBox.lastColor.${Li.exports.lowerCase(n)}`))!=null?t:_.t(`status.colorDefaultTitle.${Li.exports.lowerCase(n)}`)}function nR(){var i;const n=Zk[0],t=(i=eR(n))!=null?i:_.t(`status.colorDefaultTitle.${Li.exports.lowerCase(n)}`);return{insert:" ",attributes:{id:it(),type:"status",box:!0,title:t,subtle:!0,created:Date.now(),color:n}}}const sg=D("StatusBoxEditor");class rR{constructor(t){m(this,"linkPopup",null);m(this,"boxElement");m(this,"statusPalette",new rV);m(this,"isEditing",!1);m(this,"editorStatus",t=>{if(!this.editor.isWritable())return;const e=this.editor.getBoxData(t);this.linkPopup=new su(this.createPopupContent(e.title,e.color,e.subtle),{id:"status-box-popup"}),this.linkPopup.on("show",this.handleShow),this.linkPopup.on("close",this.handClose),this.linkPopup.manualShow(t,{theme:"light",placement:"bottom-start",offset:[5,5]}),this.boxElement=t});m(this,"handleShow",()=>{this.focus()});m(this,"handClose",()=>{var r;p(sg,this.boxElement,"boxElement not found");const t=this.editor.getBoxData(this.boxElement),e=et(this.boxElement);if(p(sg,e,"block not found"),t.title)if(t.title.length>32){const i=t.title.slice(0,32),o={...t,title:i};this.editor.updateBoxData(o,{noFocus:!0}),tR(o)}else tR(t);else{const i=ga(e,this.boxElement);this.editor.deleteTextFromBlock(e,i.start,1)}this.editor.focus(),(r=this.linkPopup)==null||r.destroy(),this.linkPopup=null,this.boxElement=void 0,this.isEditing=!1});m(this,"handleKeyDown",(t,e)=>{var r;e||t.key==="Enter"&&((r=this.linkPopup)==null||r.close(null))});m(this,"onColorChange",t=>{var o,s;if(!(t.target instanceof HTMLElement)||t.target.closest("[data-color]")===null)return;const e=Li.exports.capitalize(t.target.getAttribute("data-color"));p(sg,this.boxElement,"boxElement not found");const r=this.editor.getBoxData(this.boxElement);this.statusPalette.changeColor(e);const i={...r,color:e};if(!this.isEditing){const l=(s=(o=this.linkPopup)==null?void 0:o.popper)==null?void 0:s.querySelector("input"),c=eR(e);l&&(l.value=c),i.title=c}this.editor.updateBoxData(i,{noFocus:!0}),this.focus()});m(this,"onTitleChange",t=>{const e=t.target.value;p(sg,this.boxElement,"boxElement not found");const i={...this.editor.getBoxData(this.boxElement),title:e.trim()};this.editor.updateBoxData(i,{noFocus:!0}),this.isEditing=!0});this.editor=t,this.statusPalette.root.addEventListener("click",this.onColorChange)}focus(){setTimeout(()=>{var t,e,r,i,o,s;(r=(e=(t=this.linkPopup)==null?void 0:t.popper)==null?void 0:e.querySelector("input"))==null||r.focus(),(s=(o=(i=this.linkPopup)==null?void 0:i.popper)==null?void 0:o.querySelector("input"))==null||s.select()},100)}createPopupContent(t,e,r){const i=B("div",["status-box-editor-popup"],null);return eV(i,t,this.onTitleChange,this.handleKeyDown),this.isEditing=!1,i.appendChild(this.statusPalette.root),this.statusPalette.changeColor(e),i}destroy(){var t;(t=this.linkPopup)==null||t.destroy()}}const yat="",iV=D("status-box-command");class Ld{static get commands(){return[{id:this.id,name:_.t("status.command.name"),icon:A2,order:650,group:"common",subText:"/status"}]}static insertStatus(t,e,r){var c;const i=t.getBlockByIndex(e,r),o=nR(),{start:s}=t.selection.range;p(iV,xi(s),"invalid block position"),t.insertBoxToBlock(i,s.offset,o.attributes);const l=t.getBoxById((c=o.attributes)==null?void 0:c.id);t.addCustom("status-box",d=>new rR(d)).editorStatus(l)}static insertEmptyBlockStatus(t,e,r){var l;let i=t.getBlockByIndex(e,r);(!i||!Be(t,i))&&(i=t.insertTextBlock([],e,r));const o=nR();t.setBlockText(i,[o]);const s=t.getBoxById((l=o.attributes)==null?void 0:l.id);return t.addCustom("status-box",c=>new rR(c)).editorStatus(s),i}}m(Ld,"id","insert-status");const oV={"en-US":{status:{empty:"Set status",command:{name:"Status"},color:{red:"Red",yellow:"Yellow",green:"Green",blue:"Blue",purple:"Purple",grey:"Gray"},colorDefaultTitle:{red:"Delayed",yellow:"In progress",green:"Done",blue:"Not started",purple:"To be confirmed",grey:"Paused"}}},"zh-CN":{status:{empty:"\u8BBE\u7F6E\u72B6\u6001",command:{name:"\u72B6\u6001"},color:{red:"\u7EA2\u8272",yellow:"\u9EC4\u8272",green:"\u7EFF\u8272",blue:"\u84DD\u8272",purple:"\u7D2B\u8272",grey:"\u7070\u8272"},colorDefaultTitle:{red:"\u5DF2\u5EF6\u671F",yellow:"\u8FDB\u884C\u4E2D",green:"\u5DF2\u5B8C\u6210",blue:"\u672A\u5F00\u59CB",purple:"\u5F85\u786E\u8BA4",grey:"\u5DF2\u6682\u505C"}}},"ja-JP":{status:{empty:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8A2D\u5B9A",command:{name:"\u30B9\u30C6\u30FC\u30BF\u30B9"},color:{red:"\u8D64",yellow:"\u9EC4",green:"\u7EFF",blue:"\u9752",purple:"\u7D2B",grey:"\u7070"},colorDefaultTitle:{red:"\u9045\u5EF6",yellow:"\u9032\u884C\u4E2D",green:"\u5B8C\u4E86",blue:"\u672A\u7740\u624B",purple:"\u672A\u78BA\u8A8D",grey:"\u4E00\u6642\u505C\u6B62"}}}};_.mergeLang(oV);const wa=D("inline-box-items");function sV(n,t,e){return n.undoManager.runInGroup(()=>{var s;let r=n.findBlockByIndex(t,e);(!r||!Be(n,r))&&(r=n.insertTextBlock([],t,e));const i=Yk();n.setBlockText(r,[i]);const o=(s=i.attributes)==null?void 0:s.id;return p(wa,o,"mathjax box id is empty"),setTimeout(()=>{const l=n.getBoxById(o);og(n,l)},100),r})}function lV(n,t,e){let r=n.findBlockByIndex(t,e),i="bottom-start";return(!r||!Be(n,r))&&(i="top-start",r=n.insertTextBlock([],t,e)),Rd(n,{target:r,linkText:"",linkUrl:"",onFinished:(l,c)=>{n.undoManager.runInGroup(()=>{try{p(wa,r,"block not found"),Be(n,r)||(r=n.insertTextBlock([],t,e));const d=Xr(l,{link:c}),h=Xr(" ",null),C=[d,h];n.insertTextToBlock(r,0,C),n.selection.selectBlock(r,jn(C)),n.focus()}catch(d){wa.error(d)}})},onClose:()=>{n.focus()},placement:i}),r}function aV(n,t,e){return n.undoManager.runInGroup(()=>{var l;const r=n.getBlockByIndex(t,e),i=n.selection.range;p(wa,xi(i.start),"invalid block position");const o=Yk();n.insertBoxToBlock(r,i.start.offset,o.attributes);const s=(l=o.attributes)==null?void 0:l.id;return p(wa,s,"mathjax box id is empty"),setTimeout(()=>{const c=n.getBoxById(s);og(n,c)},100),r})}function cV(n,t,e){const r=n.getBlockByIndex(t,e),i=n.selection.range;p(wa,xi(i.start),"invalid block position");const o=Vo(n,r,i);if(o.length===0)return;const s=o[0],l=jo(n,r,"quick-menu-inline-link",s);Rd(n,{target:l,linkText:"",linkUrl:"",onFinished:(h,C)=>{n.undoManager.runInGroup(()=>{try{const E=n.getBlockText(r),A=qo(E,i.start.offset,h,{link:C});n.setBlockText(r,A),n.selection.selectBlock(r,i.start.offset+h.length),n.focus()}catch(E){wa.error(E)}})},onClose:()=>{n.focus()},placement:"bottom-start"})}class iR{getCommands(){return[{id:"insert-math",name:_.t("quickMenu.inlineBox.math"),icon:OT,order:900,group:"common",subText:tr("insert-math")},{id:"insert-link",name:_.t("quickMenu.inlineBox.link"),icon:aE,order:400,group:"common",subText:tr("insert-link")}]}async handleUpdateBlockCore(t,e){switch(e.item.id){case"insert-math":return aV(t,e.containerId,e.blockIndex);case"insert-link":return cV(t,e.containerId,e.blockIndex);case Ld.id:return Ld.insertStatus(t,e.containerId,e.blockIndex);default:return null}}async handleInsertEmptyBlockCore(t,e){switch(e.item.id){case"insert-math":return sV(t,e.containerId,e.blockIndex);case"insert-link":return lV(t,e.containerId,e.blockIndex);case Ld.id:return Ld.insertEmptyBlockStatus(t,e.containerId,e.blockIndex);default:return null}}async executeCommand(t,e,r){if(r.from==="quick-menu"||r.from==="add-block-menu"){const i=t.getBlockById(r.blockId),o=t.getParentContainer(i),s=Et(o),l=t.getBlockIndex(i);t.undoManager.runInGroup(()=>this.handleUpdateBlockCore(t,{item:e,containerId:s,blockIndex:l}))}else r.from==="block-menu"&&t.undoManager.runInGroup(()=>this.handleInsertEmptyBlockCore(t,{item:e,containerId:r.containerId,blockIndex:r.blockIndex}));return null}}const oR=(n,t)=>{var e;return(e=n.children)==null?void 0:e.map(r=>({...r,itemType:"insert-block",commandProvider:t,children:oR(r,t)}))};function uV(n,t){var o,s;const{withPlainText:e}=t,r=(s=(o=n.options.componentsOptions)==null?void 0:o.quickMenu)==null?void 0:s.commandProviders;if(!r)return[];const i=[];return[...r,new $k(e),new iR].forEach(l=>{const c=l.getCommands(n,t);i.push(...c.map(d=>({...d,itemType:"insert-block",commandProvider:l,children:oR(d,l)})))}),i}function fV(n,t){const e=[];return n.editorBlocks.forEach(r=>{if(!r.getOptions)return;const i=r.getOptions(n);!i.insertBlockCommandItems||(i.insertBlockCommandItems.forEach(o=>{Vk(o,i)}),e.push(...i.insertBlockCommandItems))}),e.push(...uV(n,t)),e}function aA(n,t={withPlainText:!1,from:"block-menu"}){const e=fV(n,t),r=new Map;e.forEach(s=>{var d,h;const l=(d=s.group)!=null?d:"";let c=r.get(l);c?c.items.push(s):(c={group:l,order:s.groupOrder||Hk[l]||1e3,items:[s],hide:(h=s.hideGroupItem)!=null?h:!1},r.set(l,c))});const i=Array.from(r.values());i.sort((s,l)=>s.order-l.order),i.forEach(s=>{s.items.sort((l,c)=>{var d,h;return((d=l.order)!=null?d:0)-((h=c.order)!=null?h:0)})});const o=[];return i.forEach((s,l)=>{const c=`blockMenu.section.${s.group||"common"}`,d=_.t(c),h=d===c?s.group:d;s.hide||o.push({id:`section-${l}`,name:h,type:"section",group:s.group,itemType:"insert-block"}),o.push(...s.items.map(C=>({...C})))}),o}function dV(n,t,e){const r=n.getFocusedBlock();if(!r)return;const i=n.getParentContainer(r),o=Et(i);let l=n.getBlockIndex(r);Be(n,r)||(l+=1);const c=e.trigger?"quick-menu":"add-block-menu";if(t.commandProvider){n.emit("beforeExecCommand",n,t,{source:c}),t.commandProvider.executeCommand(n,t,{from:c,...e});return}!t.blockOptions||!t.blockOptions.handleInsertEmptyBlock||(n.emit("beforeExecCommand",n,t,{source:c}),t.blockOptions.handleInsertEmptyBlock(n,{containerId:o,blockIndex:l,item:t,from:c}))}const sR=D("quick-menu"),hV={id:"quick-menu",trigger:["/"]},mV=5;class lg{constructor(t,e=hV){m(this,"suggest");m(this,"items");m(this,"maxHeading");m(this,"firstEmptyOffset",-1);m(this,"queryItems",async(t,e)=>{if(this.initMenuItems(),this.refreshMenuItems(),e){const r=new Set,i=e.toLocaleLowerCase().replace(/^\s+|\s+$/g,""),o=this.items.filter(s=>{if(s.type==="section")return!0;if(s.name.toLocaleLowerCase().indexOf(i)!==-1||BN(s).toLocaleLowerCase().indexOf(i)!==-1)return r.add(s.group),!0;const l=`blockMenu.section.${s.group||"common"}`,c=_.t(l),d=c===l?s.group:c;return(d==null?void 0:d.toLocaleLowerCase().indexOf(i))!==-1?(r.add(s.group),!0):!1}).filter(s=>s.type==="section"?r.has(s.group):!0);return o.length?this.firstEmptyOffset=-1:this.handleEmptySearch(),o}return this.items});m(this,"onClose",()=>{this.firstEmptyOffset=-1,this.menu.closeReason==="clickBackground"&&this.editor.focus()});m(this,"onShow",(t,e,r,i)=>{const o=this.editor.getBlockByIndex(e,r);if(!Wr(o)){const s=et(at(o));if(s&&Ot(s)==="code")return!1}return!0});m(this,"onClickItem",(t,e)=>{const r=e;r.itemType==="insert-block"&&(p(sR,r.blockOptions||r.commandProvider,"invalid quick item, no block options or command provider"),p(sR,this.suggest.anchor,"invalid suggest, no anchor"),this.options.id==="empty-block-menu"&&this.editor.focus(),dV(this.editor,r,this.suggest.anchor))});this.editor=t,this.options=e,this.items=[],this.maxHeading=Wm(),this.suggest=new AE(t,{id:e.id||"quick-menu",trigger:e.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(){var r;const t=((r=this.suggest.anchor)==null?void 0:r.trigger)==="/"?"quick-menu":"block-menu",e=aA(this.editor,{withPlainText:!1,from:t});this.items=e}refreshMenuItems(){let t=null,e=0;const r=Wm();if(r!==this.maxHeading){const i=new $k,s=i.getCommands().map(l=>({...l,itemType:"insert-block",commandProvider:i}));for(let l=0;l<this.items.length;l++)this.items[l].group==="basics"&&(t||(t=l),t&&e++);t&&e&&this.items.splice(t,e,...s),this.maxHeading=r}}handleEmptySearch(){const t=this.editor.selection.getFocusedPos();if(this.firstEmptyOffset===-1){if(t.isSimple()){const{offset:e}=t;this.firstEmptyOffset=e-1}}else if(t.isSimple()){const{offset:e}=t;e-this.firstEmptyOffset>mV&&(this.suggest.close(),this.firstEmptyOffset=-1)}}}class ag{constructor(t){m(this,"instance");m(this,"mousedown",!1);m(this,"currentInstance",null);m(this,"attributeName",[]);m(this,"attributeDesc","");m(this,"_lastClickButtonId","");m(this,"observer",null);m(this,"observerCallback",null);m(this,"createContent",t=>{let e="",r=0;for(;r<this.attributeName.length&&!e;)t.hasAttribute(this.attributeName[r])&&(e=t.getAttribute(this.attributeName[r])||""),r++;const i=t.getAttribute(this.attributeDesc);if(!i)return e;const o=B("div",[],null);return B("span",[],o,e),i&&B("span",["editor-tooltip-desc"],o,i),o});m(this,"handleDocumentMouseDown",()=>{this.mousedown=!0,this.editor.domEvents.addEventListener(document,"mouseup",this.handleDocumentMouseUp)});m(this,"handleDocumentMouseUp",()=>{this.mousedown=!1,this.editor.domEvents.removeEventListener(document,"mouseup",this.handleDocumentMouseUp)});m(this,"handleShown",t=>{this.currentInstance&&this.hide(),this.currentInstance=t,this.createObserver()});m(this,"handleHidden",()=>{this.destroyObserver(),this.currentInstance=null});m(this,"handleShow",t=>{var i;const e=t.reference;if(!e||!Ae(document.body,e)||window.isDragging||this.mousedown)return!1;const r=Number.parseInt((i=e.getAttribute("data-tooltip-hide-at"))!=null?i:"",10);if(r&&Date.now()-r<1e3)return!1;if(this._lastClickButtonId===e.getAttribute("data-button-id"))return this._lastClickButtonId="",!1;if(this.attributeName.every(o=>!e.hasAttribute(o)))return!1;if(t.reference){const o={};if(t.reference.hasAttribute("data-editor-tooltip-placement")&&(o.placement=t.reference.getAttribute("data-editor-tooltip-placement")||"top"),t.reference.hasAttribute("data-editor-tooltip-offset-x")||t.reference.hasAttribute("data-editor-tooltip-offset-y")){const l=t.reference.getAttribute("data-editor-tooltip-offset-x"),c=t.reference.getAttribute("data-editor-tooltip-offset-y");o.offset=[l?Number.parseInt(l,10):0,c?Number.parseInt(c,10):0]}t.reference.hasAttribute("data-editor-tooltip-maxwidth")&&(o.maxWidth=Number.parseInt(t.reference.getAttribute("data-editor-tooltip-maxwidth")||"350",10)),t.reference.hasAttribute("data-editor-tooltip-allow-markdown")&&(o.allowHTML=!0);const s=document.body;if(o.appendTo=this.fixContainerForFullscreen(s),Object.keys(o).length&&t.setProps(o),t.reference.hasAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`)){const l=t.reference.getAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`);t.setContent(l||"")}}return!0});this.editor=t;const e=t.clientId;this.attributeName=[`data-editor-tooltip-${e}`,`data-editor-tooltip-${e}-dynamic`,"data-editor-tooltip-common"],this.attributeDesc=`data-editor-tooltip-desc-${e}`,this.instance=Sp.delegate(document.body,{theme:"editor-tooltip",maxWidth:400,delay:200,target:this.attributeName.map(r=>`[${r}]`).join(","),content:this.createContent,onShow:this.handleShow,onShown:this.handleShown,onHide:this.handleHidden,hideOnClick:!1}),t.domEvents.addEventListener(document,"mousedown",this.handleDocumentMouseDown)}set lastClickButtonId(t){this._lastClickButtonId=t,t&&setTimeout(()=>{this._lastClickButtonId===t&&(this._lastClickButtonId="")},500)}visible(){var t;return(t=this.currentInstance)==null?void 0:t.state.isVisible}hide(){var t;(t=this.currentInstance)!=null&&t.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 t=this.currentInstance;if(!t||!t.reference)return;this.observerCallback=Pe.default(()=>{t.reference.closest("body")||(t.hide(),this.destroyObserver())},200),this.observer=new MutationObserver(this.observerCallback);const e=document.body,r={childList:!0,attributes:!1,subtree:!0};this.observer.observe(e,r)}destroyObserver(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observerCallback&&(this.observerCallback.cancel(),this.observerCallback=null)}fixContainerForFullscreen(t){return t.closest("body")&&document.fullscreenElement&&!document.fullscreenElement.contains(t)?document.fullscreenElement:t}}class cg{constructor(t){m(this,"onMouseOver",t=>{const e=t.target;if(e.hasAttribute("data-editor-overflow-tooltip"))if(this.check(e)){const r=e.getAttribute("data-editor-overflow-tooltip");e.setAttribute(`data-editor-tooltip-${this.editor.clientId}`,r)}else e.removeAttribute(`data-editor-tooltip-${this.editor.clientId}`)});m(this,"create",(t,e,r,i)=>{const o=B(t,e,r,this.replaceTitleSpace(i));return o.setAttribute("data-editor-overflow-tooltip",this.replaceTitleSpace(i)),o});m(this,"replaceTitleSpace",t=>t.replace(/\s/g,"\xA0"));this.editor=t,this.editor.scrollContainer.addEventListener("mouseover",this.onMouseOver)}check(t){return t.scrollWidth>t.offsetWidth}destroy(){this.editor.scrollContainer.removeEventListener("mouseover",this.onMouseOver)}static get(t){return t.addCustom("overflow-tooltip-helper",()=>new cg(t))}}const gV={"text/style-bold":"bold","text/style-italic":"italic","text/style-underline":"underline","text/style-strikethrough":"line-through","text/style-code":"code","text/style-sub":"subscript","text/style-super":"superscript",link:"link"};function pV(n,t){const e=new Set(Object.keys(gV)),r=t.filter(o=>e.has(o.id));return zm(r)}function Id(n,t){if(!n.isWritable()||ei(n))return!1;const e=n.selection.range,r=n.editorCommandProviders.getCommands(e,"shortcut"),o=pV(n,r).find(s=>s.id===`text/${t}`||s.id==="link");return o?(n.editorCommandProviders.executeCommand(e,o,{}),bu.get(n).update("selectionChange"),!0):!1}function CV(n,t){const e=n.selection.focusedBlock;if(!n.isWritable()||!st(n,e))return!1;const r=n.getBlockData(e).heading,i={id:t===0?"text":`heading-${t}`,source:"shortcut",value:t===0?null:String(t),group:"BlockTurnIntoCommandProvider"};return Number(r)===t&&(i.id="text",i.value=null),n.editorCommandProviders.executeCommand(n.selection.range,i,{}),!0}const cA={"CtrlOrCmd+B":n=>Id(n,"style-bold"),"CtrlOrCmd+I":n=>Id(n,"style-italic"),"CtrlOrCmd+U":n=>Id(n,"style-underline"),"CtrlOrCmd+D":n=>Id(n,"style-strikethrough"),"CtrlOrCmd+K":n=>Id(n,"link"),...(()=>{const n={};for(let t=0;t<=8;t++)n[`CtrlOrCmd+Alt+Digit${t}`]=e=>CV(e,t);return n})()},EV={quickMenu:{basic:{heading:{title:"\u6807\u9898 {heading}",space:"{markdown}\u7A7A\u683C"},unordered:"\u65E0\u5E8F\u5217\u8868",ordered:"\u6709\u5E8F\u5217\u8868",checkbox:"\u5F85\u529E\u5217\u8868",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"}},AV={quickMenu:{basic:{heading:{title:"Heading {heading}",space:"{markdown}space"},unordered:"Bulleted list",ordered:"Numbered list",checkbox:"To-do list",quote:"Quote"},inlineBox:{math:"Formula",link:"Link"}},link:{textLabel:"Text",urlLabel:"Link address",textPlaceholder:"Please enter text",urlPlaceholder:"Please enter link",submitText:"Confirm",cancelText:"Cancel",edit:"Edit",remove:"Remove link"},commands:{unordered:"Bulleted list",ordered:"Numberer list",check:"To-do list",link:"Link",quote:"Quote",alignLeft:"Align left",alignRight:"Align right",alignCenter:"Center text",alignGroup:"Alignment",heading:"Heading {name}",headingGroup:"Text style",text:"Text"}},xV={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:"\u30C6\u30AD\u30B9\u30C8",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:"\u7DE8\u96C6",remove:"\u30EA\u30F3\u30AF\u3092\u89E3\u9664"},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"}};_.mergeLang({"zh-CN":EV,"en-US":AV,"ja-JP":xV});const Sat="";function Sa(n,...t){const e=Jr(...t);return e.classList.remove("editor-button"),e.classList.add("editor-text-button"),n.append(e),e}function lR(n){const t=Gm(n);t==null||t.hide();const e=n.findCustom("table-border-bar");e==null||e.closeToolbar()}function bV(n){return B("div",["insert-column-button","drop-marker"],n)}const vV=D("row-height");function aR(n){const t=Kt.fromTable(n),e=n.rows;p(vV,e.length===t.rowCount,"row count mismatch");const r=Array(t.rowCount).fill(0);for(let i=0;i<e.length;){let o=1,l=e[i].getBoundingClientRect().height,c=i+1;for(;c<e.length;){const d=e[c];if(d.cells.length!==0)break;o++,c++,l+=d.getBoundingClientRect().height}for(let d=0;d<o;d++)r[i+d]=l/o;i=c}return r}const BV=D("table-border-bar-dom");function cR(n){var c;const t=et(n.contentElement);p(BV,t,"no block");const r=ve(t).querySelector(".table-border-bar-container.left"),o=zt(t).offsetLeft-uu,s=((c=n.scrollOptions.paddingLeft)!=null?c:0)+o,l=Math.min(n.contentElement.offsetLeft-o,n.rootElement.scrollLeft-s);r&&(r.style.left=`${-l}px`)}const xl=D("table-border-bar-dom");function vu(n,t){p(xl,dn(t),"invalid table block");const e=fn(t),r=ao(n,t),i=ve(t),o=(C,E,A)=>{const v=B("div",["button-root",E],C),R=B("div",["button-container",E],v);v.setAttribute(`data-${E}-index`,`${A}`),R.setAttribute(`data-editor-tooltip-${n.clientId}`,E==="left"?_.t("table.insertRow"):_.t("table.insertCol")),B("span",["insert-indicator"],R),bV(R)},{selectedRows:s,selectedColumns:l}=vE(n,t),c=()=>{const C=r.querySelector(".table-border-bar-container.top");p(xl,C,"no top border bar container");const E=B("div",["table-border-bar-container","top"],null),A=B("div",["table-border-bar","top"],E),v=BP(e),S=Kt.fromTable(e).colCount;n.selection.range.isSimple()&&o(A,"top",0);for(let M=0;M<S;M++){const U=M===S-1?v[M]+2:v[M],V=B("span",["table-border-bar-cell","top"],A);l.has(M)&&V.classList.add("selected"),V.setAttribute("data-top-index",`${M}`),V.style.width=`${U}px`,n.selection.range.isSimple()&&o(A,"top",M+1)}yf(C,E)},d=()=>{const C=i.querySelector(".table-border-bar-container.left");p(xl,C,"no left border bar container");const E=B("div",["table-border-bar-container","left"],null),A=B("div",["table-border-bar","left"],E);B("span",["table-border-bar-cell","corner"],A);const v=aR(e);n.selection.range.isSimple()&&o(A,"left",0),Array.from(e.rows).forEach((R,S,M)=>{const U=B("span",["table-border-bar-cell","left"],A);s.has(S)&&U.classList.add("selected"),U.setAttribute("data-left-index",`${S}`);const V=S===M.length-1?v[S]+2:v[S];U.style.height=`${V}px`,n.selection.range.isSimple()&&o(A,"left",S+1)}),yf(C,E)};c(),d();const h=n.findCustom(lo(t));h&&cR(h)}function uR(n,t){const e=t.target;if(!(e instanceof Element))return;const r=et(e);p(xl,r&&dn(r),"invalid table block"),vu(n,r),n.selection.caret.update()}function ug(n,t){const e=t.target;if(!(e instanceof Element))return;const r=et(e);p(xl,r&&dn(r),"invalid table block");const i=e.closest(".button-root");if(i){if(i.classList.contains("top")){const o=parseInt(i.getAttribute("data-top-index")||"0",10);uk(n,r,o),vu(n,r)}else if(i.classList.contains("left")){const o=parseInt(i.getAttribute("data-left-index")||"0",10);FE(n,r,o),vu(n,r)}}}function fg(n,t){var s;lR(n),t.preventDefault(),t.stopPropagation();let e=null,r,i;const o=l=>{var c;if(l.target instanceof HTMLElement&&r&&e&&i!==void 0){const d=et(l.target),h=l.target.closest(".table-border-bar");if(d===e&&h){const C=parseInt((c=l.target.getAttribute(`data-${r}-index`))!=null?c:"0",10),E=Math.min(i,C),A=Math.abs(i-C)+1;Mt(l.target,"top")&&r==="top"?NP(n,d,E,A,{reverse:!0}):Mt(l.target,"left")&&r==="left"&&PP(n,d,E,A,{reverse:!0})}}l.type==="mouseup"&&(e=null,i=void 0,r=void 0,document.body.removeEventListener("mousemove",o),document.body.removeEventListener("mouseup",o))};t.target instanceof HTMLElement&&Mt(t.target,"table-border-bar-cell")&&(e=et(t.target),Mt(t.target,"top")?r="top":Mt(t.target,"left")&&(r="left"),r&&e&&(i=parseInt((s=t.target.getAttribute(`data-${r}-index`))!=null?s:"0",10),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",o)))}function fR(n){const t=n.selection.range,e=Ad(n,t);e&&vu(n,e)}function yV(n,t){p(xl,dn(t),"invalid table block");const e=ao(n,t),r=ve(t),i=B("div",["table-border-bar-container","top"],e),o=B("div",["table-border-bar-container","left"],r);vu(n,t),n.domEvents.addEventListener(zt(t),"scroll",uR),n.domEvents.addEventListener(i,"click",ug),n.domEvents.addEventListener(o,"click",ug),n.domEvents.addEventListener(i,"mousedown",fg),n.domEvents.addEventListener(o,"mousedown",fg),n.addListener("afterClearSelection",fR)}function dR(n,t){if(!n.isWritable())return;if(ao(n,t).querySelector(".table-border-bar-container")){vu(n,t);return}yV(n,t)}function hR(n,t){p(xl,dn(t),"invalid table block");const e=ao(n,t),r=ve(t),i=e.querySelectorAll(".table-border-bar-container"),o=r.querySelectorAll(".table-border-bar-container");i.forEach(s=>{n.domEvents.removeEventListener(s,"click",ug),n.domEvents.removeEventListener(s,"mousedown",fg),s.remove()}),o.forEach(s=>{n.domEvents.removeEventListener(s,"click",ug),n.domEvents.removeEventListener(s,"mousedown",fg),s.remove()}),n.domEvents.removeEventListener(zt(t),"scroll",uR),n.addListener("afterClearSelection",fR)}function TV(n,t){p(xl,dn(t),"invalid table block");const r=ao(n,t).querySelector(".table-border-bar-container.top");return r?r.getBoundingClientRect().height:0}class kV{constructor(t,e){m(this,"toolbar");m(this,"handleSelectionChange",(t,e)=>{!t.isVisible||(e==="delete-columns"?(gl(this.editor,this.tableBlock,!0,!0),pl(this.editor,this.tableBlock,!0,!0)):e==="delete-rows"?(gl(this.editor,this.tableBlock,!0,!1),pl(this.editor,this.tableBlock,!0,!1)):(gl(this.editor,this.tableBlock,!1),pl(this.editor,this.tableBlock,!1)))});m(this,"handleClick",(t,e,r)=>{e.id==="delete-columns"?BE(this.editor.selection.range):e.id==="delete-rows"&&yE(this.editor.selection.range)});m(this,"handleToolbarClose",()=>{this.tableBlock&&Ad(this.editor,this.editor.selection.range)===this.tableBlock&&(gl(this.editor,this.tableBlock,!1),pl(this.editor,this.tableBlock,!1))});this.editor=t,this.tableBlock=e;const r=t.options.componentsOptions.popover;this.toolbar=new pd([],void 0,{id:"table-row-column-toolbar",overflowBoundary:r==null?void 0:r.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("cancelBar")}update(){var i,o,s;const{selectedColumns:t,selectedRows:e}=vE(this.editor,this.tableBlock);if(!this.editor.isWritable())return;if(t.size>0&&e.size>0){this.toolbar.close("cancelBar");return}if(t.size===0&&e.size===0){this.toolbar.close("cancelBar");return}const r=Vo(this.editor,this.tableBlock,this.editor.selection.range)[0];if(!r){this.toolbar.close("cancelBar");return}if(t.size>0){const l={id:"delete-columns",name:_.t("table.deleteSelectCol"),icon:BT};this.toolbar.updateItems([l]);const c=jo(this.editor,this.tableBlock,"table-row-column-delete",r);this.toolbar.manualShow(c,{placement:"top",offset:[0,5]})}else{const l={id:"delete-rows",name:_.t("table.deleteSelectRow"),icon:vT};this.toolbar.updateItems([l]);const h=ve(this.tableBlock).querySelector(".table-border-bar-container.left").getBoundingClientRect(),C=new DOMRect(Math.max(h.left,r.left-uu),r.top,uu,r.height),E=jo(this.editor,this.tableBlock,"table-row-column-delete",C);this.toolbar.manualShow(E,{placement:"left",offset:[0,5]});const A=this.editor.options.componentsOptions.popover;(i=this.toolbar.tippyInstance)==null||i.setProps({popperOptions:{modifiers:[{name:"flip",options:{boundary:A==null?void 0:A.overflowBoundary,fallbackPlacements:["left","right"]}}]}})}(s=(o=this.toolbar.tippyInstance)==null?void 0:o.popperInstance)==null||s.update()}destroy(){this.toolbar.destroy(),this.toolbar.removeAllListeners()}}const uA=D("table-border-bar");class RV{constructor(t,e){m(this,"toolbar");m(this,"resizeObserver",null);m(this,"handleReadonlyChanged",t=>{t.isWritable()?this.update():hR(this.editor,this.tableBlock)});m(this,"handleBlockUpdated",()=>{var t;(t=this.resizeObserver)==null||t.disconnect(),setTimeout(()=>{var r;const e=this.editor.getBlockById(dt(this.tableBlock));(r=this.resizeObserver)==null||r.observe(fn(e))})});m(this,"handleScroll",()=>{var t;(t=this.toolbar)==null||t.update()});m(this,"handleTableResize",()=>{!this.editor.isWritable()||this.update()});this.editor=t,this.tableBlock=e,p(uA,this.tableBlock,"no table block"),uA.debug("create table border bar"),dR(this.editor,this.tableBlock),this.resizeObserver=new Zl(this.handleTableResize),this.resizeObserver.observe(fn(this.tableBlock));const r=t.getComponentOptions("table");r!=null&&r.hideToolbar||(this.toolbar=new kV(this.editor,this.tableBlock)),this.editor.addListener("readonlyChanged",this.handleReadonlyChanged)}close(){var t;(t=this.toolbar)==null||t.close()}destroy(){var t,e;uA.debug("destroy table border bar"),(t=this.resizeObserver)==null||t.disconnect(),this.resizeObserver=null,hR(this.editor,this.tableBlock),(e=this.toolbar)==null||e.destroy(),this.editor.removeListener("readonlyChanged",this.handleReadonlyChanged)}update(){var t;dR(this.editor,this.tableBlock),(t=this.toolbar)==null||t.update()}}const wV=D("table-border-bar");class SV{constructor(t){m(this,"activeTableBar",null);m(this,"handleBlockDeleted",(t,e)=>{!this.activeTableBar||(e===this.activeTableBar.tableBlock||Ae(e,this.activeTableBar.tableBlock))&&(this.activeTableBar.destroy(),this.activeTableBar=null)});m(this,"handleSelectionChanged",t=>{setTimeout(()=>{var i;const e=t.selection.range,r=Ad(t,e);((i=this.activeTableBar)==null?void 0:i.tableBlock)!==r&&this.activeTableBar&&this.hide(),r&&this.show(r)})});m(this,"handleScroll",()=>{var t;(t=this.activeTableBar)==null||t.handleScroll()});m(this,"isInBlock",(t,e)=>!!(e.target instanceof Element&&e.target.closest('[data-command-bar-id="table-row-column-toolbar"]')));this.editor=t,this.editor.addListener("blockDeleted",this.handleBlockDeleted),this.editor.addListener("selectionChanged",this.handleSelectionChanged),ze.get(t).addFilter(this)}destroy(){var t;this.editor.removeListener("blockDeleted",this.handleBlockDeleted),this.editor.removeListener("selectionChanged",this.handleSelectionChanged),(t=this.activeTableBar)==null||t.destroy()}show(t){this.activeTableBar?(this.activeTableBar.tableBlock!==t&&this.hide(),this.activeTableBar.update()):this.activeTableBar=new RV(this.editor,t)}update(){var t;(t=this.activeTableBar)==null||t.handleBlockUpdated()}closeToolbar(){var t;(t=this.activeTableBar)==null||t.close()}hide(){!this.activeTableBar||(p(wV,this.activeTableBar,"no active table bar"),this.activeTableBar.destroy(),this.activeTableBar=null)}}function mR(n,t){const e=n.addCustom("table-border-bar",r=>new SV(r));t==="update"&&e.update()}const hr=D("table-cell-menu"),LV="style-bg-color-";class IV{constructor(t){m(this,"activeTableBlock",null);m(this,"targetButton",null);m(this,"manualMenu",null);m(this,"colorPaletteItem",null);m(this,"markedRowAsDanger",!1);m(this,"markedColAsDanger",!1);m(this,"resetAsDangerMarked",()=>{this.markedColAsDanger=!1,this.markedRowAsDanger=!1});m(this,"handlePrevent",(t,e)=>{e.stopPropagation()});m(this,"handleReadonlyChanged",t=>{t.isWritable()||this.hide()});m(this,"handleSelectionChanged",t=>{const e=t.selection.range,r=Ad(t,e);if(this.hide(),this.activeTableBlock!==r&&(this.activeTableBlock=r),this.activeTableBlock){const i=Kt.fromBlock(this.activeTableBlock),o=e.isReverse()?e.start:e.end;let s=null;o instanceof Ai?t.getBlockById(o.blockId)===this.activeTableBlock?s=i.getCellByContainerId(o.childContainerId):s=this.getCellByChildBlockId(i,o.blockId):o.blockId!==this.activeTableBlock.id&&(s=this.getCellByChildBlockId(i,o.blockId)),s&&this.editor.isWritable()&&this.showCellMenuButton(s)}});m(this,"handleBeforePopupPalette",()=>{var e;const t=this.getSelectedBkgColorIndex();(e=this.colorPaletteItem)==null||e.palette.setColor("backgroundColor",t)});m(this,"createBkgColorItem",()=>{const t=B("div",["cell-background-color-item"],null);B("span",[],t,_.t("table.cellBackground"));const e=this.getSelectedBkgColorIndex();B("button",["item-button"],t).setAttribute("data-color-index",`${e}`);const i=B("span",["item-sub-indicator"],t);return i.innerHTML=nE,t});m(this,"handleCommand",t=>{var i;p(hr,this.activeTableBlock,"no target table block");const e=((i=t.states)==null?void 0:i.includes("checked"))||!1,r=t.value;switch(t.id){case"delete-select-row":yE(z2(this.editor,this.activeTableBlock,!1));break;case"delete-select-col":BE(z2(this.editor,this.activeTableBlock,!0));break;case"merge-cell":$2(this.editor.selection.range);break;case"split-cell":this.handleSplitCell();break;case"row-title":this.handleRowTitle(e);break;case"col-title":this.handleColTitle(e);break;case"stripe-style":this.handleStripeStyle(e);break;case"hide-border":WN(this.editor,this.activeTableBlock,r==="show-border");break;case"show-chart":YN(this.editor,this.activeTableBlock,r==="show-chart"),IE(this.editor,this.activeTableBlock,{updateNow:!0});break}});m(this,"handleToolbarClose",()=>{this.targetButton&&ut(this.targetButton,"active"),(this.markedRowAsDanger||this.markedColAsDanger)&&this.activeTableBlock&&Ad(this.editor,this.editor.selection.range)===this.activeTableBlock&&(gl(this.editor,this.activeTableBlock,!1),pl(this.editor,this.activeTableBlock,!1),this.resetAsDangerMarked()),this.editor.focus()});m(this,"handleSelectionChange",(t,e)=>{if(!!t.isVisible)if(p(hr,this.activeTableBlock,"no target table block"),e==="cell-background-color"&&this.handleBeforePopupPalette(),e==="delete-select-row"){if(this.markedRowAsDanger)return;gl(this.editor,this.activeTableBlock,!0,!1),pl(this.editor,this.activeTableBlock,!0,!1),this.resetAsDangerMarked(),this.markedRowAsDanger=!0}else if(e==="delete-select-col"){if(this.markedColAsDanger)return;gl(this.editor,this.activeTableBlock,!0,!0),pl(this.editor,this.activeTableBlock,!0,!0),this.resetAsDangerMarked(),this.markedColAsDanger=!0}else gl(this.editor,this.activeTableBlock,!1),pl(this.editor,this.activeTableBlock,!1),this.resetAsDangerMarked()});m(this,"handleClick",(t,e)=>{var r;p(hr,this.activeTableBlock,"no target table block"),p(hr,this.targetButton,"no target button"),lR(this.editor),Mt(this.targetButton,"active")?(ut(this.targetButton,"active"),(r=this.manualMenu)==null||r.close("clickItem")):(q(this.targetButton,"active"),this.manualMenu?this.manualMenu.updateItems(this.createCommandMenu()):(this.manualMenu=new dl(this.createCommandMenu(),void 0,{id:"table-cell-menu"}),this.manualMenu.on("click",(i,o)=>{var s;this.handleCommand(o),(s=this.manualMenu)==null||s.close("clickItem")}),this.manualMenu.on("selectionChange",this.handleSelectionChange),this.manualMenu.on("close",this.handleToolbarClose)),this.manualMenu.manualShow(this.targetButton,{placement:"right-start"})),e.stopPropagation(),t.focus()});this.editor=t,this.editor.addListener("selectionChanged",this.handleSelectionChanged),this.editor.addListener("readonlyChanged",this.handleReadonlyChanged)}destroy(){var t,e;this.activeTableBlock=null,this.targetButton=null,this.editor.removeListener("selectionChanged",this.handleSelectionChanged),this.editor.removeListener("readonlyChanged",this.handleReadonlyChanged),(t=this.manualMenu)==null||t.destroy(),(e=this.colorPaletteItem)==null||e.destroy()}hide(){var t;(t=this.manualMenu)==null||t.close("cancelBar"),this.targetButton&&(ut(this.targetButton,"active"),this.targetButton.style.display="none")}getCellByChildBlockId(t,e){let r=this.editor.getBlockById(e);for(;r;){const i=r.closest("td");p(hr,i,"no parent cell");const o=et(i);if(p(hr,o,"no parent block"),fn(o)===t.table)return t.getCellByCellElement(i);r=o}return p(hr,!1,"filed to get cell by child block id"),null}createTargetButton(t){this.targetButton?t.querySelector(`:scope > .${SE}`)||t.appendChild(this.targetButton):(this.targetButton=B("button",[SE],t),this.targetButton.innerHTML=xm,this.editor.domEvents.addEventListener(this.targetButton,"click",this.handleClick),this.editor.domEvents.addEventListener(this.targetButton,"mousedown",this.handlePrevent),this.editor.domEvents.addEventListener(this.targetButton,"dblclick",this.handlePrevent))}showCellMenuButton(t){this.createTargetButton(t.cell),p(hr,this.targetButton,"no target button"),this.targetButton.style.display="inline-block"}handleSplitCell(){if(this.activeTableBlock){const t=Kt.fromBlock(this.activeTableBlock),e=this.editor.selection.range;if(e.isSimple()){const{col:r,row:i}=this.getCellByChildBlockId(t,e.start.blockId);kE(this.editor,this.activeTableBlock,{col:r,row:i})}else RE(this.editor.selection.range)}}getSelectedBkgColorIndex(){var s;p(hr,this.activeTableBlock,"no target table block");const t=this.editor.selection.range,e=ml(this.editor,this.activeTableBlock,t.focus),r=this.editor.getBlockData(this.activeTableBlock),i=e.childContainerId,o=r[`${i}_background`];return o?Number.parseInt((s=o.substring(LV.length))!=null?s:"0",10):-1}createCommandMenu(){p(hr,this.activeTableBlock,"no target table block");const t=this.editor.getBlockData(this.activeTableBlock),e=V2(this.editor,this.activeTableBlock,this.editor.selection.range);let r=this.editor.selection.range;if(r.isSimple()){const h=ml(this.editor,this.activeTableBlock,r.start);r=En(this.editor,{anchor:h,focus:h})}const i=K2(this.editor,this.activeTableBlock,r),o=t.hasRowTitle,s=t.hasColTitle,l=t.isStripeStyle,c=t.noBorder,d=t.chart;return this.colorPaletteItem=new _2("cell-background-color",{color:!1}),this.colorPaletteItem.palette.on("onClick",(h,C)=>{var E;switch(p(hr,this.activeTableBlock,"no target table block"),h){case"clearColor":q2(this.editor,this.activeTableBlock,-1);break;case"backgroundColor":q2(this.editor,this.activeTableBlock,C);break}(E=this.manualMenu)==null||E.close("clickItem")}),[{id:"cell-background-color",name:_.t("table.cellBackground"),element:this.createBkgColorItem(),children:[this.colorPaletteItem]},{id:"separator",name:"",type:"separator"},{id:"merge-cell",name:_.t("table.mergeCell"),states:e?[]:["disabled"]},{id:"split-cell",name:_.t("table.splitCell"),states:i?[]:["disabled"]},{id:"separator",name:"",type:"separator"},{id:"delete-select-row",name:_.t("table.deleteSelectRow")},{id:"delete-select-col",name:_.t("table.deleteSelectCol")},{id:"separator",name:"",type:"separator"},{id:"table-config",name:_.t("table.tableConfigKey"),children:[{id:"row-title",name:_.t("table.tableConfig.rowTitle"),states:o?["checked"]:[]},{id:"col-title",name:_.t("table.tableConfig.colTitle"),states:s?["checked"]:[]},{id:"stripe-style",name:_.t("table.tableConfig.stripeStyle"),states:l?["checked"]:[]},{id:"hide-border",name:c?_.t("table.tableConfig.showBorder"):_.t("table.tableConfig.hideBorder"),value:c?"show-border":"hide-border"},{id:"show-chart",name:d?_.t("table.tableConfig.hideChart"):_.t("table.tableConfig.showChart"),value:d?"hide-chart":"show-chart"}]}]}handleRowTitle(t){p(hr,this.activeTableBlock,"no target table block"),t?jN(this.editor,this.activeTableBlock):HN(this.editor,this.activeTableBlock)}handleColTitle(t){p(hr,this.activeTableBlock,"no target table block"),t?$N(this.editor,this.activeTableBlock):VN(this.editor,this.activeTableBlock)}handleStripeStyle(t){p(hr,this.activeTableBlock,"no target table block"),t?GN(this.editor,this.activeTableBlock):zN(this.editor,this.activeTableBlock)}}function gR(n){n.addCustom("table-cell-menu",t=>new IV(t))}const pR=D("table-container");function fA(n){const t=n.closest("td");return p(pR,t,"no parent cell for a table cell container"),t}function CR(n){const t=fn(n);return Array.from(t.querySelectorAll(':scope > tbody > tr > td > [data-type="editor-container"].child'))}function dA(n,t,e,r){const i=Kt.fromBlock(n),o=i.getCellByContainerId(Et(t));if(e==="ArrowDown"){const s=i.getBottomCell(o);return s?s.container:null}if(e==="ArrowUp"){const s=i.getTopCell(o);return s?s.container:null}if(e==="ArrowLeft"){const s=i.getLeftCell(o);if(!s)return null;const l=s.container;return r!=null&&r.noWrap&&s.row!==o.row?null:l}if(e==="ArrowRight"){const s=i.getRightCell(o);if(!s)return null;const l=s.container;return r!=null&&r.noWrap&&s.row!==o.row?null:l}p(pR,!1,`invalid navigation type: ${e}`)}const DV=12,_V=90,dg=23,ER=2;class MV{constructor(t){m(this,"scrollTableBlock",null);m(this,"autoScrollDir",null);m(this,"autoScrollTimer",null);m(this,"handleMouseDown",t=>{const e=Fe(t.clientX,t.clientY,{noFilter:!0});if(e&&e instanceof HTMLElement){const r=et(e);if(r&&Ae(this.editor.rootContainer,r)){const i=is(r);i&&(this.scrollTableBlock=i,document.addEventListener("mousemove",this.handleAutoScroll))}}});m(this,"handleAutoScroll",y9.default(t=>{if(this.scrollTableBlock){const e=this.editor.getCustom(lo(this.scrollTableBlock)),r=e.rootElement,i=e.scrollOptions.parentContainer,o=r.getBoundingClientRect(),s=window.innerHeight-this.getBarFloatWindowBottom(e),l=i.getBoundingClientRect(),c=Math.min(l.bottom,s),d=Math.max(l.top,0);o.bottom>c&&t.clientY>=c?this.setAutoScroll("bottom"):o.top<d&&t.clientY<=d?this.setAutoScroll("top"):r.scrollLeft>0&&t.clientX<o.left?this.setAutoScroll("left"):r.scrollLeft<r.scrollWidth-r.offsetWidth&&t.clientX>o.right?this.setAutoScroll("right"):this.clearAutoScroll()}},15));m(this,"handleMouseUp",()=>{document.removeEventListener("mousemove",this.handleAutoScroll),setTimeout(()=>{this.scrollTableBlock=null})});m(this,"handleSelectionChanged",t=>{const e=t.selection.range;if(e.isCollapsed()&&e.isSimple()){const r=t.getBlockById(e.start.blockId),i=is(r);if(i){const o=t.getCustom(lo(i)),s=o.rootElement.getBoundingClientRect(),l=tl(t,r,e.start);if(s.left>l.left){const c=e.start.offset===0?DV:ER;o.rootElement.scrollLeft-=s.left-l.left+c}else if(l.right>s.right){const c=e.start.offset===0?_V:ER;o.rootElement.scrollLeft+=l.right-s.right+c}}}else{const r=t.getBlockById(e.start.blockId),i=is(r),o=t.getBlockById(e.end.blockId),s=is(o);if(i&&i===s){const l=t.getCustom(lo(i)),c=l.rootElement.getBoundingClientRect();let d=null;if(e.isSimple())d=e.isReverse()?tl(t,r,e.start):tl(t,o,e.end);else{const h=fA(pi(t,e.start.childContainerId)),C=fA(pi(t,e.end.childContainerId));d=e.isReverse()?h.getBoundingClientRect():C.getBoundingClientRect()}c.left>d.left&&e.isReverse()?l.rootElement.scrollLeft-=c.left-d.left:c.right<d.right&&!e.isReverse()&&(l.rootElement.scrollLeft+=d.right-c.right)}}});m(this,"handleScroll",t=>{N2(t),this.editor.selection.caret.update()});m(this,"handleReset",t=>{N2(t),this.editor.selection.caret.update();const e=this.editor.findCustom("table-border-bar");e&&e.handleScroll(),cR(t)});this.editor=t,this.editor.addListener("selectionChanged",this.handleSelectionChanged),document.addEventListener("mousedown",this.handleMouseDown),document.addEventListener("mouseup",this.handleMouseUp)}getBarFloatWindowBottom(t){return t.scrollOptions.barFloatWindowBottom?typeof t.scrollOptions.barFloatWindowBottom=="number"?t.scrollOptions.barFloatWindowBottom:t.scrollOptions.barFloatWindowBottom():0}clearAutoScroll(){this.autoScrollTimer&&(clearInterval(this.autoScrollTimer),this.autoScrollTimer=null,this.autoScrollDir=null)}setAutoScroll(t){this.autoScrollDir&&this.autoScrollDir!==t&&this.clearAutoScroll(),this.autoScrollTimer||(this.autoScrollDir=t,this.autoScrollTimer=window.setInterval(()=>{if(this.scrollTableBlock){const e=this.editor.getCustom(lo(this.scrollTableBlock)),r=e.rootElement,i=e.scrollOptions.parentContainer,o=r.getBoundingClientRect(),s=i===document.documentElement?window.innerHeight:i.offsetHeight,l=window.innerHeight-this.getBarFloatWindowBottom(e),c=i.getBoundingClientRect(),d=Math.min(c.bottom,l),h=Math.max(c.top,0);this.autoScrollDir==="left"&&(r.scrollLeft-=dg,r.scrollLeft<=0&&this.clearAutoScroll()),this.autoScrollDir==="right"&&(r.scrollLeft+=dg,r.scrollLeft>=r.scrollWidth-r.offsetWidth&&this.clearAutoScroll()),this.autoScrollDir==="bottom"&&(i.scrollTop+=dg,(i.scrollTop>=i.scrollHeight-s||o.bottom<=d)&&this.clearAutoScroll()),this.autoScrollDir==="top"&&(i.scrollTop-=dg,(i.scrollTop<=0||o.top>=h)&&this.clearAutoScroll())}},100))}destroy(){document.removeEventListener("mousedown",this.handleMouseDown),document.removeEventListener("mouseup",this.handleMouseUp),this.editor.removeListener("selectionChanged",this.handleSelectionChanged)}}function AR(n){return n.addCustom("table-scroll-events",t=>new MV(t))}const UV=D("table-doc-change-handler");class OV{constructor(t){this.editor=t,this.editor.addListener("docChanged",this.handleDocChanged)}handleDocChanged(t,e){if(!e){const{start:r,end:i}=t.selection.range;if(!t.findBlockById(r.blockId)||!t.findBlockById(i.blockId)){t.selection.selectBlock(t.getBlockByIndex("root",0),0);return}if(ha(r)){const o=t.getBlockById(r.blockId);if(!dn(o))return;if(p(UV,ha(i),"invalid range"),!wf(t,r.childContainerId)||!wf(t,i.childContainerId)){t.selection.selectBlock(o,0);return}let s=null,l=null;const c=(d,h)=>{const C=h.getCellById(d.childContainerId),{colIndex:E=0,rowIndex:A=0}=d.custom;let v=-1,R=-1;return(C.col>E||C.col+C.colSpan-1<E)&&(v=C.col),(C.row>A||C.row+C.rowSpan-1<A)&&(R=C.row),v!==-1||R!==-1?Ue(o,d.childContainerId,{colIndex:v===-1?E:v,rowIndex:R===-1?A:R}):null};if(r.custom){const d=Kt.fromBlock(o);s=c(r,d),l=c(i,d)}(s!==null||l!==null)&&(t.selection.range.isReverse()?t.selection.setSelection(l!=null?l:i,s!=null?s:r):t.selection.setSelection(s!=null?s:r,l!=null?l:i))}}}destroy(){this.editor.removeListener("docChanged",this.handleDocChanged)}}function xR(n){n.addCustom("table-doc-change-handler",t=>new OV(t))}const uo=D("create-content");function bR(n,t,e){var C;const r=new Um(e),i=e.rows,o=e.cols;p(uo,i>=1,`invalid rows: ${i}`),p(uo,o>=1,`invalid cols: ${o}`),p(uo,e.children,"no table children");const s=B("table",[],null),l=(C=e.colsWidth)!=null?C:new Array(e.cols).fill(0),c=B("colgroup",[],s);for(let E=0;E<r.colCount;E++){const A=B("col",[],c);l[E]&&(A.style.width=`${l[E]}px`,A.style.minWidth=`${l[E]}px`)}const d=B("tbody",[],s);let h=0;for(let E=0;E<i;E++){const A=B("tr",[],d);for(let v=0;v<o;v++){const R=r.getCell({col:v,row:E});if(R.virtual)p(uo,R.colSpan>1||R.rowSpan>1,"virtual cell should have colSpan or rowSpan");else{const S=e.children[h],M=B("td",[],A);R.colSpan>1&&(M.colSpan=R.colSpan),R.rowSpan>1&&(M.rowSpan=R.rowSpan);const U=e[fu(S)];U&&q(M,U),v===0&&e.hasColTitle&&q(M,H2.COL_TITLE_ITEM),n.createChildContainer(t,M,S),h+=1}}}return p(uo,h===e.children.length,"container count mismatch"),s.style.minWidth=`${l.reduce((E,A)=>A+E,0)}px`,e.noBorder&&q(s,"no-border"),e.chart&&q(s,"editor-table-chart"),e.isStripeStyle&&q(s,"stripe"),e.hasRowTitle&&q(s,"row-title"),e.hasColTitle&&q(s,"col-title"),s}function NV(n,t,e,r,i){p(uo,i.type==="table","not table data"),p(uo,Et(e)===t[t.length-1].containerId,"invalid path");const o=i,s=fa(r,"div");try{const l=B("div",[],null);l.setAttribute("data-type","table-content");const c=bR(n,t,o);c.classList.add("drag-preview-element"),l.appendChild(c);const d=n.getComponentOptions("table");ak(n),fk(n),mR(n,"create"),xR(n),d!=null&&d.hideCellMenu||gR(n),ET(n,DE);const h=n.addCustom(lo(r),()=>bP());h.init({parentElement:s,childElement:l,safeRightSpace:50,safeLeftSpace:40,parentContainer:ie(e)?n.scrollContainer:e,locatingContainer:ie(e)?(d==null?void 0:d.locatingContainer)||n.parent:e,paddingLeft:uu+bd,paddingTop:uu+bd,paddingBottom:bd/2,paddingRight:bd/2,barFloatWindowBottom:d==null?void 0:d.barFloatWindowBottom,allowScrollBarFixed:d==null?void 0:d.allowScrollBarFixed,isSetScale:d==null?void 0:d.isSetScale});const C=AR(n);h.on("scroll",C.handleReset),h.on("resize",C.handleReset),setTimeout(()=>{ZN(n,r)})}catch{const c=`invalid table data: ${JSON.stringify(o)}`;uo.error(c);const d=B("div",["error"],s);d.innerText=c}return s}function PV(n,t,e){p(uo,e.type==="table","not table data");const r=e,i=zt(t);try{const o=fn(t),s=el(t),l=bR(n,s,r);l.classList.add("drag-preview-element"),o.insertAdjacentElement("afterend",l),o.remove();const c=n.getComponentOptions("table");ak(n),fk(n),mR(n,"update"),xR(n),c!=null&&c.hideCellMenu||gR(n),DE(n,void 0,t)}catch{const s=`invalid table data: ${JSON.stringify(r)}`;uo.error(s);const l=B("div",["error"],i);l.innerText=s}}function FV(n,t){let e,r,i=!1;if([...t].every(E=>E==="|")?(r=t.length,e=Array(r).fill(""),i=!0):(e=Hp(t,"|").split("|"),r=e.length),r<2)return null;const o=3,s=r,l=[];for(let E=0;E<3;E++)e.forEach(A=>{l.push(Yo(n.doc,E===0?A:""))});const c=Array(s).fill(UE),d=l[i?0:s],h=n.doc.getContainerBlocks(d)[0].id;return{blockData:{id:it(),type:"table",rows:o,cols:s,children:l,colsWidth:c},focusBlockId:h}}function KV(n,t){const e=t.rows,r=t.cols;if(e<1||r<1)return null;const i=[];for(let d=0;d<e;d++)for(let h=0;h<r;h++)i.push(Yo(n.doc));const o=Array(r).fill(UE),s=i[0],l=n.doc.getContainerBlocks(s)[0].id;return{blockData:{id:it(),type:"table",rows:e,cols:r,children:i,colsWidth:o},focusBlockId:l}}const hA=D("get-selected-containers");function vR(n,t,e,r){p(hA,e.blockId===r.blockId,"only allow select in single table block"),p(hA,dt(t)===e.blockId,"only allow select in single table block");const i=Kt.fromBlock(t),o=i.getCellByContainerId(e.childContainerId),s=i.getCellByContainerId(r.childContainerId);if(e.custom===void 0||r.custom===void 0)return i.getCells(o,s).map(S=>i.getCellContainer(S));const{fromCol:l,toCol:c,fromRow:d,toRow:h}=wi(t,e,r),C=new Set,E=[];return i.sub({row:d,col:l},{row:h,col:c}).forEach(v=>{v.forEach(R=>{const S=i.getCellByContainerId(R.containerId);S.col<l||S.row<d||S.col+S.colSpan-1>c||S.row+S.rowSpan-1>h||C.has(R.containerId)||(C.add(R.containerId),E.push(S.container))})}),E}function VV(n,t,e){p(hA,t.blockId===e.blockId,"only allow select in single table block");const r=n.getBlockById(t.blockId);return vR(n,r,t,e)}const BR=D("table-selection-to-doc");function $V(n,t){return t.reduce((e,r)=>{const i=fu(r);return n[i]&&(e[i]=n[i]),e},{})}function HV(n,t){const{start:e,end:r,block:i}=t,o=Ot(i);p(BR,o==="table",`invalid block type: ${o}`);const s=n.getBlockData(i);if(e.isSimple()&&r.isSimple())return ol(n.editorBlocks,n.doc.toJSON(),s);p(BR,!e.isSimple()&&!r.isSimple(),"invalid block pos type");const l=Kt.fromBlock(i),{fromCol:c,toCol:d,fromRow:h,toRow:C}=wi(i,e,r),E={},A=[],v=n.doc.toJSON();let R={};l.sub({row:h,col:c},{row:C,col:d}).forEach((ft,pt)=>{ft.forEach((ct,wt)=>{const Bt=ct.containerId;if(A.indexOf(Bt)!==-1)return;A.push(Bt);let Jt;if(ct.virtual){const pe=l.getCellByContainerId(ct.containerId),ni=c+wt;let $e=pe.col+pe.colSpan-1;$e>d&&($e=d);const bn=$e-ni+1;bn>1&&(E[`${Bt}_colSpan`]=bn);const Ir=h+pt;let nr=pe.row+pe.rowSpan-1;nr>C&&(nr=C);const Nn=nr-Ir+1;Nn>1&&(E[`${Bt}_rowSpan`]=Nn),Jt=Xo()}else{if(Jt=fC(n.editorBlocks,v,Bt),ct.col+ct.colSpan>d+1){const pe=d-ct.col+1;pe>1&&(E[`${Bt}_colSpan`]=pe)}else ct.colSpan>1&&(E[`${Bt}_colSpan`]=ct.colSpan);if(ct.row+ct.rowSpan>C+1){const pe=C-ct.row+1;pe>1&&(E[`${Bt}_rowSpan`]=pe)}else ct.rowSpan>1&&(E[`${Bt}_rowSpan`]=ct.rowSpan)}const{root:ce,...Oe}=Jt.blocks;R={...R,...Oe,[Bt]:ce}})});const M=kd(fn(i)).slice(c,d+1),U=it(),V=o,nt=$V(s,A);return{blocks:{root:[{id:U,type:V,children:A,colsWidth:M,rows:C-h+1,cols:d-c+1,...nt,...E}],...R},meta:{},comments:{}}}const jV=D("ajust-selection-pos");function zV(n,t){if(t.top===0)return!0;for(let e=t.left;e<=t.right;e++)if(n[t.top-1][e]===n[t.top][e])return!1;return!0}function GV(n,t){if(t.left===0)return!0;for(let e=t.top;e<=t.bottom;e++)if(n[e][t.left-1]===n[e][t.left])return!1;return!0}function WV(n,t){if(t.bottom===n.length-1)return!0;for(let e=t.left;e<=t.right;e++)if(n[t.bottom][e]===n[t.bottom+1][e])return!1;return!0}function qV(n,t){if(t.right===n[0].length-1)return!0;for(let e=t.top;e<=t.bottom;e++)if(n[e][t.right]===n[e][t.right+1])return!1;return!0}function XV(n,t,e){const r=t.col,i=t.row,o=e.col,s=e.row,l={left:r,top:i,right:o,bottom:s};let c=!1;do{if(c=!1,!zV(n,l)){l.top--,c=!0;continue}if(!GV(n,l)){l.left--,c=!0;continue}if(!WV(n,l)){l.bottom++,c=!0;continue}if(!qV(n,l)){l.right++,c=!0;continue}}while(c);return l}function YV(n,t,e,r){if(e.custom!==void 0||r.custom!==void 0)return{anchor:e,focus:r};const i=Kt.fromBlock(t),o=i.map(V=>V.containerId),s=i.getCellByContainerId(e.childContainerId),l=i.getCellByContainerId(r.childContainerId),c=Math.min(s.row,l.row),d=Math.max(s.row,l.row),h=Math.min(s.col,l.col),C=Math.max(s.col,l.col),E=XV(o,{row:c,col:h},{row:d,col:C}),A=i.getCell({row:E.top,col:E.left}),v=i.getCell({row:E.bottom,col:E.right}),R=i.getCell({row:E.top,col:E.right}),S=i.getCell({row:E.bottom,col:E.left});let M,U;return s.row<=l.row?s.col<=l.col?(M=A,U=v):(M=R,U=S):s.col<l.col?(M=S,U=R):(M=v,U=A),jV.debug(`move ${M.col}, ${M.row}, -> ${U.col}, ${U.row}`),{anchor:Ue(t,M.containerId),focus:Ue(t,U.containerId)}}function yR(n,t,e){if(e.isSimple())return[fn(t).getBoundingClientRect()];const r=fn(t),i=r.getBoundingClientRect(),{fromCol:o,fromRow:s,toCol:l,toRow:c}=wi(t,e.start,e.end),d=kd(r),h=d.slice(0,o).reduce((R,S)=>R+S,0),C=h+d.slice(o,l+1).reduce((R,S)=>R+S,0),E=aR(r);let A=E.slice(0,s).reduce((R,S)=>R+S,0);const v=A+E.slice(s,c+1).reduce((R,S)=>R+S,0);if(s===0){const R=TV(n,t);A-=R}return[new DOMRect(i.left+h,i.top+A,C-h,v-A)]}D("table-size");const QV=40;function hg(n){const t=n.querySelector("td");if(!t)return 0;const e=window.getComputedStyle(t),r=Number.parseInt(e.borderLeft,10),i=Number.parseInt(e.borderRight,10);return(r+i)/2}function JV(n,t,e){const r=x1(n,e.container);return r!==void 0?r+hg(t):QV*e.colSpan-hg(t)}function ZV(n,t,e,r){let i=0;const o=e.colCount;for(let s=0;s<o;s++){const l=e.getCell({col:s,row:r});if(l.virtual)continue;let c=JV(n,t,l);const d=f3(l.container,{withPadding:!0});d&&d>c&&(c=d),i+=c+hg(t)}return i}function t$(n,t){const e=fn(t),r=Kt.fromTable(e);let i=0;for(let s=0;s<r.rowCount;s++)i=Math.max(i,ZV(n,e,r,s));const o=hg(e);return i+=o,i}const ss=D("table-creator");async function e$(n,t){return n.undoManager.runInGroup(()=>{var d,h;const e=t.item,r=(d=e.colCount)!=null?d:5,i=(h=e.rowCount)!=null?h:3,o=KV(n,{cols:r,rows:i});if(!o)return null;const{blockData:s,focusBlockId:l}=o,c=n.insertBlock(t.containerId,t.blockIndex,s,Ie(n,l,0));return n.focus(),c})}class n${constructor(){m(this,"id","insert-table");m(this,"name","Create table");m(this,"element");m(this,"closeable",null);m(this,"colCount");m(this,"rowCount");m(this,"setCloseable",t=>{this.closeable=t});m(this,"destroy",()=>{this.closeable=null});m(this,"getTableCreatorCellId",(t,e)=>`table-creator-cell-${t}-${e}`);m(this,"handleTableCreatorClick",t=>{var E,A;t.preventDefault(),t.stopPropagation();const e=t.target;p(ss,e instanceof HTMLElement,"invalid event target");const r=e.closest(".table-creator");p(ss,r,"no table creator");const i=r.querySelectorAll(".active");if(i.length===0)return;const s=i[i.length-1].id;p(ss,s,"no cell id");const l="table-creator-cell-";if(!s.startsWith(l))return;const d=s.substring(l.length).split("-");p(ss,d.length===2,"invalid cell id");const h=Number.parseInt(d[0],10)+1,C=Number.parseInt(d[1],10)+1;ss.debug(`${h}, ${C}`),this.colCount=C,this.rowCount=h,(E=this.closeable)==null||E.click(this,this.element),(A=this.closeable)==null||A.close("clickItem"),this.handleTableCreatorLeave()});m(this,"handleTableCreatorLeave",()=>{for(let t=0;t<9;t++)for(let e=0;e<9;e++){const r=this.getTableCreatorCellId(t,e),i=document.getElementById(r);i&&ut(i,"active")}});m(this,"handleTableCreatorCellEnter",t=>{const e=t.target;p(ss,e instanceof HTMLElement,"invalid event target");const r=e.id,i="table-creator-cell-";p(ss,r.startsWith(i),"invalid cell id");const s=r.substring(i.length).split("-");p(ss,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 d=0;d<9;d++)for(let h=0;h<9;h++){const C=this.getTableCreatorCellId(d,h),E=document.getElementById(C);p(ss,E,"no cell"),d<=l&&h<=c?q(E,"active"):ut(E,"active")}});this.element=this.createTableCreatorElement()}createTableCreatorElement(){const t=B("div",["table-creator"],null),e=(r,i,o)=>{const s=B("div",["table-creator-cell"],r);return s.id=this.getTableCreatorCellId(i,o),s};t.addEventListener("click",this.handleTableCreatorClick),t.addEventListener("mouseleave",this.handleTableCreatorLeave);for(let r=0;r<9;r++){const i=B("div",["table-creator-row"],t);for(let o=0;o<9;o++)e(i,r,o).addEventListener("mouseenter",this.handleTableCreatorCellEnter)}return t}}function r$(){return new n$}function i$(n){const t=/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/g,e=n.match(t);return e?e.length:0}function TR(n){const t=i$(n);return n.length+t}function o$(n,t,e=[]){let r=0;if(!e||e.length===0)return r;for(let i=n;i<n+t;i+=1)r+=e[i]||0;return r}function s$(n,t){const e=TR(n),r=t-e;return r>0?n+" ".repeat(r):n}function l$(n,t,e,r,i){var l;const o=t,s=new Um(o);if(r==="markdown"||r==="text"){const c=M=>e.blocks[M].map((nt,Y)=>r==="markdown"?W0(n,nt,e,[...i,{containerId:M,blockIndex:Y}]):G0(n,nt,e,[...i,{containerId:M,blockIndex:Y}])),d=M=>c(M).join(" ").replace(/\n/g," ").trim(),h=new Map,C=new Map;for(let M=0;M<s.colCount;M++){let U=0;for(let V=0;V<s.rowCount;V++){const nt=s.getCell({row:V,col:M});let Y="";nt.virtual||(Y=d(nt.containerId)),h.set(`${V},${M}`,Y),U=Math.max(U,TR(Y))}C.set(M,U)}const E=M=>{const U=h.get(`${M.row},${M.col}`)||"",V=C.get(M.col)||0;return s$(U,V)};if(r==="text"){const M=[];for(let U=0;U<s.colCount;U++){const V=E({row:0,col:U});M.push(V)}for(let U=1;U<s.rowCount;U++)for(let V=0;V<s.colCount;V++){const nt=E({row:U,col:V});M.push(nt)}return M.join(`
645
+ }`;var Wt=z6(function(){return se(L,kt+"return "+ot).apply(e,P)});if(Wt.source=ot,Ab(Wt))throw Wt;return Wt}function Wot(a){return Ee(a).toLowerCase()}function qot(a){return Ee(a).toUpperCase()}function Xot(a,u,g){if(a=Ee(a),a&&(g||u===e))return Ls(a);if(!a||!(u=Fr(u)))return a;var x=Pr(a),y=Pr(u),L=sc(x,y),P=Ph(x,y)+1;return Yl(x,L,P).join("")}function Yot(a,u,g){if(a=Ee(a),a&&(g||u===e))return a.slice(0,lf(a)+1);if(!a||!(u=Fr(u)))return a;var x=Pr(a),y=Ph(x,Pr(u))+1;return Yl(x,0,y).join("")}function Qot(a,u,g){if(a=Ee(a),a&&(g||u===e))return a.replace(ja,"");if(!a||!(u=Fr(u)))return a;var x=Pr(a),y=sc(x,Pr(u));return Yl(x,y).join("")}function Jot(a,u){var g=wt,x=Bt;if(Ge(u)){var y="separator"in u?u.separator:y;g="length"in u?jt(u.length):g,x="omission"in u?Fr(u.omission):x}a=Ee(a);var L=a.length;if(Is(a)){var P=Pr(a);L=P.length}if(g>=L)return a;var K=g-zl(x);if(K<1)return x;var H=P?Yl(P,0,K).join(""):a.slice(0,K);if(y===e)return H+x;if(P&&(K+=H.length-K),xb(y)){if(a.slice(K).search(y)){var Z,tt=H;for(y.global||(y=ff(y.source,Ee(Ol.exec(y))+"g")),y.lastIndex=0;Z=y.exec(tt);)var ot=Z.index;H=H.slice(0,ot===e?K:ot)}}else if(a.indexOf(Fr(y),K)!=K){var bt=H.lastIndexOf(y);bt>-1&&(H=H.slice(0,bt))}return H+x}function Zot(a){return a=Ee(a),a&&ju.test(a)?a.replace(Hu,af):a}var tst=hf(function(a,u,g){return a+(g?" ":"")+u.toUpperCase()}),Bb=GL("toUpperCase");function j6(a,u,g){return a=Ee(a),u=g?e:u,u===e?rf(a)?Jg(a):ne(a):a.match(u)||[]}var z6=qt(function(a,u){try{return Kn(a,e,u)}catch(g){return Ab(g)?g:new Nt(g)}}),est=js(function(a,u){return qn(u,function(g){g=Oo(g),$s(a,g,Cb(a[g],a))}),a});function nst(a){var u=a==null?0:a.length,g=It();return a=u?ht(a,function(x){if(typeof x[1]!="function")throw new ir(s);return[g(x[0]),x[1]]}):[],qt(function(x){for(var y=-1;++y<u;){var L=a[y];if(Kn(L[0],this,x))return Kn(L[1],this,x)}})}function rst(a){return Ret(fi(a,C))}function yb(a){return function(){return a}}function ist(a,u){return a==null||a!==a?u:a}var ost=qL(),sst=qL(!0);function br(a){return a}function Tb(a){return yL(typeof a=="function"?a:fi(a,C))}function lst(a){return kL(fi(a,C))}function ast(a,u){return RL(a,fi(u,C))}var cst=qt(function(a,u){return function(g){return qh(g,a,u)}}),ust=qt(function(a,u){return function(g){return qh(a,g,u)}});function kb(a,u,g){var x=Ln(u),y=cp(u,x);g==null&&!(Ge(u)&&(y.length||!x.length))&&(g=u,u=a,a=this,y=cp(u,Ln(u)));var L=!(Ge(g)&&"chain"in g)||!!g.chain,P=Gs(a);return qn(y,function(K){var H=u[K];a[K]=H,P&&(a.prototype[K]=function(){var Z=this.__chain__;if(L||Z){var tt=a(this.__wrapped__),ot=tt.__actions__=Er(this.__actions__);return ot.push({func:H,args:arguments,thisArg:a}),tt.__chain__=Z,tt}return H.apply(a,$t([this.value()],arguments))})}),a}function fst(){return Qe._===this&&(Qe._=tp),this}function Rb(){}function dst(a){return a=jt(a),qt(function(u){return wL(u,a)})}var hst=ib(ht),mst=ib(N),gst=ib(we);function G6(a){return fb(a)?Fi(Oo(a)):zet(a)}function pst(a){return function(u){return a==null?e:yc(a,u)}}var Cst=YL(),Est=YL(!0);function wb(){return[]}function Sb(){return!1}function Ast(){return{}}function xst(){return""}function bst(){return!0}function vst(a,u){if(a=jt(a),a<1||a>bn)return[];var g=Nn,x=O(a,Nn);u=It(u),a-=Nn;for(var y=nf(x,u);++g<a;)u(g);return y}function Bst(a){return Vt(a)?ht(a,Oo):Kr(a)?[a]:Er(d6(Ee(a)))}function yst(a){var u=++Zg;return Ee(a)+u}var Tst=gp(function(a,u){return a+u},0),kst=ob("ceil"),Rst=gp(function(a,u){return a/u},1),wst=ob("floor");function Sst(a){return a&&a.length?ap(a,br,jx):e}function Lst(a,u){return a&&a.length?ap(a,It(u,2),jx):e}function Ist(a){return Ss(a,br)}function Dst(a,u){return Ss(a,It(u,2))}function _st(a){return a&&a.length?ap(a,br,qx):e}function Mst(a,u){return a&&a.length?ap(a,It(u,2),qx):e}var Ust=gp(function(a,u){return a*u},1),Ost=ob("round"),Nst=gp(function(a,u){return a-u},0);function Pst(a){return a&&a.length?ef(a,br):0}function Fst(a,u){return a&&a.length?ef(a,It(u,2)):0}return w.after=lit,w.ary=B6,w.assign=qit,w.assignIn=N6,w.assignInWith=wp,w.assignWith=Xit,w.at=Yit,w.before=y6,w.bind=Cb,w.bindAll=est,w.bindKey=T6,w.castArray=Ait,w.chain=x6,w.chunk=wnt,w.compact=Snt,w.concat=Lnt,w.cond=nst,w.conforms=rst,w.constant=yb,w.countBy=Prt,w.create=Qit,w.curry=k6,w.curryRight=R6,w.debounce=w6,w.defaults=Jit,w.defaultsDeep=Zit,w.defer=ait,w.delay=cit,w.difference=Int,w.differenceBy=Dnt,w.differenceWith=_nt,w.drop=Mnt,w.dropRight=Unt,w.dropRightWhile=Ont,w.dropWhile=Nnt,w.fill=Pnt,w.filter=Krt,w.flatMap=Hrt,w.flatMapDeep=jrt,w.flatMapDepth=zrt,w.flatten=p6,w.flattenDeep=Fnt,w.flattenDepth=Knt,w.flip=uit,w.flow=ost,w.flowRight=sst,w.fromPairs=Vnt,w.functions=sot,w.functionsIn=lot,w.groupBy=Grt,w.initial=Hnt,w.intersection=jnt,w.intersectionBy=znt,w.intersectionWith=Gnt,w.invert=cot,w.invertBy=uot,w.invokeMap=qrt,w.iteratee=Tb,w.keyBy=Xrt,w.keys=Ln,w.keysIn=xr,w.map=vp,w.mapKeys=dot,w.mapValues=hot,w.matches=lst,w.matchesProperty=ast,w.memoize=yp,w.merge=mot,w.mergeWith=P6,w.method=cst,w.methodOf=ust,w.mixin=kb,w.negate=Tp,w.nthArg=dst,w.omit=got,w.omitBy=pot,w.once=fit,w.orderBy=Yrt,w.over=hst,w.overArgs=dit,w.overEvery=mst,w.overSome=gst,w.partial=Eb,w.partialRight=S6,w.partition=Qrt,w.pick=Cot,w.pickBy=F6,w.property=G6,w.propertyOf=pst,w.pull=Ynt,w.pullAll=E6,w.pullAllBy=Qnt,w.pullAllWith=Jnt,w.pullAt=Znt,w.range=Cst,w.rangeRight=Est,w.rearg=hit,w.reject=tit,w.remove=trt,w.rest=mit,w.reverse=gb,w.sampleSize=nit,w.set=Aot,w.setWith=xot,w.shuffle=rit,w.slice=ert,w.sortBy=sit,w.sortedUniq=art,w.sortedUniqBy=crt,w.split=Hot,w.spread=git,w.tail=urt,w.take=frt,w.takeRight=drt,w.takeRightWhile=hrt,w.takeWhile=mrt,w.tap=Srt,w.throttle=pit,w.thru=bp,w.toArray=M6,w.toPairs=K6,w.toPairsIn=V6,w.toPath=Bst,w.toPlainObject=O6,w.transform=bot,w.unary=Cit,w.union=grt,w.unionBy=prt,w.unionWith=Crt,w.uniq=Ert,w.uniqBy=Art,w.uniqWith=xrt,w.unset=vot,w.unzip=pb,w.unzipWith=A6,w.update=Bot,w.updateWith=yot,w.values=pf,w.valuesIn=Tot,w.without=brt,w.words=j6,w.wrap=Eit,w.xor=vrt,w.xorBy=Brt,w.xorWith=yrt,w.zip=Trt,w.zipObject=krt,w.zipObjectDeep=Rrt,w.zipWith=wrt,w.entries=K6,w.entriesIn=V6,w.extend=N6,w.extendWith=wp,kb(w,w),w.add=Tst,w.attempt=z6,w.camelCase=Sot,w.capitalize=$6,w.ceil=kst,w.clamp=kot,w.clone=xit,w.cloneDeep=vit,w.cloneDeepWith=Bit,w.cloneWith=bit,w.conformsTo=yit,w.deburr=H6,w.defaultTo=ist,w.divide=Rst,w.endsWith=Lot,w.eq=Hi,w.escape=Iot,w.escapeRegExp=Dot,w.every=Frt,w.find=Vrt,w.findIndex=m6,w.findKey=tot,w.findLast=$rt,w.findLastIndex=g6,w.findLastKey=eot,w.floor=wst,w.forEach=b6,w.forEachRight=v6,w.forIn=not,w.forInRight=rot,w.forOwn=iot,w.forOwnRight=oot,w.get=bb,w.gt=Tit,w.gte=kit,w.has=aot,w.hasIn=vb,w.head=C6,w.identity=br,w.includes=Wrt,w.indexOf=$nt,w.inRange=Rot,w.invoke=fot,w.isArguments=Rc,w.isArray=Vt,w.isArrayBuffer=Rit,w.isArrayLike=Ar,w.isArrayLikeObject=on,w.isBoolean=wit,w.isBuffer=Ql,w.isDate=Sit,w.isElement=Lit,w.isEmpty=Iit,w.isEqual=Dit,w.isEqualWith=_it,w.isError=Ab,w.isFinite=Mit,w.isFunction=Gs,w.isInteger=L6,w.isLength=kp,w.isMap=I6,w.isMatch=Uit,w.isMatchWith=Oit,w.isNaN=Nit,w.isNative=Pit,w.isNil=Kit,w.isNull=Fit,w.isNumber=D6,w.isObject=Ge,w.isObjectLike=Ze,w.isPlainObject=t0,w.isRegExp=xb,w.isSafeInteger=Vit,w.isSet=_6,w.isString=Rp,w.isSymbol=Kr,w.isTypedArray=gf,w.isUndefined=$it,w.isWeakMap=Hit,w.isWeakSet=jit,w.join=Wnt,w.kebabCase=_ot,w.last=hi,w.lastIndexOf=qnt,w.lowerCase=Mot,w.lowerFirst=Uot,w.lt=zit,w.lte=Git,w.max=Sst,w.maxBy=Lst,w.mean=Ist,w.meanBy=Dst,w.min=_st,w.minBy=Mst,w.stubArray=wb,w.stubFalse=Sb,w.stubObject=Ast,w.stubString=xst,w.stubTrue=bst,w.multiply=Ust,w.nth=Xnt,w.noConflict=fst,w.noop=Rb,w.now=Bp,w.pad=Oot,w.padEnd=Not,w.padStart=Pot,w.parseInt=Fot,w.random=wot,w.reduce=Jrt,w.reduceRight=Zrt,w.repeat=Kot,w.replace=Vot,w.result=Eot,w.round=Ost,w.runInContext=$,w.sample=eit,w.size=iit,w.snakeCase=$ot,w.some=oit,w.sortedIndex=nrt,w.sortedIndexBy=rrt,w.sortedIndexOf=irt,w.sortedLastIndex=ort,w.sortedLastIndexBy=srt,w.sortedLastIndexOf=lrt,w.startCase=jot,w.startsWith=zot,w.subtract=Nst,w.sum=Pst,w.sumBy=Fst,w.template=Got,w.times=vst,w.toFinite=Ws,w.toInteger=jt,w.toLength=U6,w.toLower=Wot,w.toNumber=mi,w.toSafeInteger=Wit,w.toString=Ee,w.toUpper=qot,w.trim=Xot,w.trimEnd=Yot,w.trimStart=Qot,w.truncate=Jot,w.unescape=Zot,w.uniqueId=yst,w.upperCase=tst,w.upperFirst=Bb,w.each=b6,w.eachRight=v6,w.first=C6,kb(w,function(){var a={};return Mo(w,function(u,g){le.call(w.prototype,g)||(a[g]=u)}),a}(),{chain:!1}),w.VERSION=r,qn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){w[a].placeholder=w}),qn(["drop","take"],function(a,u){Yt.prototype[a]=function(g){g=g===e?1:I(jt(g),0);var x=this.__filtered__&&!u?new Yt(this):this.clone();return x.__filtered__?x.__takeCount__=O(g,x.__takeCount__):x.__views__.push({size:O(g,Nn),type:a+(x.__dir__<0?"Right":"")}),x},Yt.prototype[a+"Right"]=function(g){return this.reverse()[a](g).reverse()}}),qn(["filter","map","takeWhile"],function(a,u){var g=u+1,x=g==Oe||g==ni;Yt.prototype[a]=function(y){var L=this.clone();return L.__iteratees__.push({iteratee:It(y,3),type:g}),L.__filtered__=L.__filtered__||x,L}}),qn(["head","last"],function(a,u){var g="take"+(u?"Right":"");Yt.prototype[a]=function(){return this[g](1).value()[0]}}),qn(["initial","tail"],function(a,u){var g="drop"+(u?"":"Right");Yt.prototype[a]=function(){return this.__filtered__?new Yt(this):this[g](1)}}),Yt.prototype.compact=function(){return this.filter(br)},Yt.prototype.find=function(a){return this.filter(a).head()},Yt.prototype.findLast=function(a){return this.reverse().find(a)},Yt.prototype.invokeMap=qt(function(a,u){return typeof a=="function"?new Yt(this):this.map(function(g){return qh(g,a,u)})}),Yt.prototype.reject=function(a){return this.filter(Tp(It(a)))},Yt.prototype.slice=function(a,u){a=jt(a);var g=this;return g.__filtered__&&(a>0||u<0)?new Yt(g):(a<0?g=g.takeRight(-a):a&&(g=g.drop(a)),u!==e&&(u=jt(u),g=u<0?g.dropRight(-u):g.take(u-a)),g)},Yt.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Yt.prototype.toArray=function(){return this.take(Nn)},Mo(Yt.prototype,function(a,u){var g=/^(?:filter|find|map|reject)|While$/.test(u),x=/^(?:head|last)$/.test(u),y=w[x?"take"+(u=="last"?"Right":""):u],L=x||/^find/.test(u);!y||(w.prototype[u]=function(){var P=this.__wrapped__,K=x?[1]:arguments,H=P instanceof Yt,Z=K[0],tt=H||Vt(P),ot=function(Zt){var re=y.apply(w,$t([Zt],K));return x&&bt?re[0]:re};tt&&g&&typeof Z=="function"&&Z.length!=1&&(H=tt=!1);var bt=this.__chain__,kt=!!this.__actions__.length,Dt=L&&!bt,Wt=H&&!kt;if(!L&&tt){P=Wt?P:new Yt(this);var _t=a.apply(P,K);return _t.__actions__.push({func:bp,args:[ot],thisArg:e}),new Cr(_t,bt)}return Dt&&Wt?a.apply(this,K):(_t=this.thru(ot),Dt?x?_t.value()[0]:_t.value():_t)})}),qn(["pop","push","shift","sort","splice","unshift"],function(a){var u=uc[a],g=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",x=/^(?:pop|shift)$/.test(a);w.prototype[a]=function(){var y=arguments;if(x&&!this.__chain__){var L=this.value();return u.apply(Vt(L)?L:[],y)}return this[g](function(P){return u.apply(Vt(P)?P:[],y)})}}),Mo(Yt.prototype,function(a,u){var g=w[u];if(g){var x=g.name+"";le.call(Vn,x)||(Vn[x]=[]),Vn[x].push({name:u,func:g})}}),Vn[mp(e,M).name]=[{name:"wrapper",func:e}],Yt.prototype.clone=Qtt,Yt.prototype.reverse=Jtt,Yt.prototype.value=Ztt,w.prototype.at=Lrt,w.prototype.chain=Irt,w.prototype.commit=Drt,w.prototype.next=_rt,w.prototype.plant=Urt,w.prototype.reverse=Ort,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=Nrt,w.prototype.first=w.prototype.head,Cc&&(w.prototype[Cc]=Mrt),w},Ms=uf();li?((li.exports=Ms)._=Ms,tc._=Ms):Qe._=Ms}).call(Tn)})(Li,Li.exports);function eV(n,t,e,r){Mm(n,{className:"status-input",defaultValue:t,onChange:e,onKeyDown:r,maxLength:32})}const Zk=["Blue","Grey","Yellow","Red","Green","Purple"];function nV(){const n=B("div",["status-color-palette"],null);for(const t of Zk){const e=B("button",["status-box-button"],null);e.setAttribute("data-color",Li.exports.lowerCase(t)),e.setAttribute("title",_.t(`status.color.${Li.exports.lowerCase(t)}`)),n.appendChild(e)}return n}class rV{constructor(){m(this,"root",nV());m(this,"changeColor",t=>{for(const r of Array.from(this.root.querySelectorAll(":scope > button")))r.classList.remove("selected");const e=this.root.querySelector(`button[data-color="${Li.exports.lowerCase(t)}"]`);e==null||e.classList.add("selected")})}}function tR(n){localStorage.setItem(`statusBox.lastColor.${Li.exports.lowerCase(n.color)}`,n.title)}function eR(n){var t;return(t=localStorage.getItem(`statusBox.lastColor.${Li.exports.lowerCase(n)}`))!=null?t:_.t(`status.colorDefaultTitle.${Li.exports.lowerCase(n)}`)}function nR(){var i;const n=Zk[0],t=(i=eR(n))!=null?i:_.t(`status.colorDefaultTitle.${Li.exports.lowerCase(n)}`);return{insert:" ",attributes:{id:it(),type:"status",box:!0,title:t,subtle:!0,created:Date.now(),color:n}}}const sg=D("StatusBoxEditor");class rR{constructor(t){m(this,"linkPopup",null);m(this,"boxElement");m(this,"statusPalette",new rV);m(this,"isEditing",!1);m(this,"editorStatus",t=>{if(!this.editor.isWritable())return;const e=this.editor.getBoxData(t);this.linkPopup=new su(this.createPopupContent(e.title,e.color,e.subtle),{id:"status-box-popup"}),this.linkPopup.on("show",this.handleShow),this.linkPopup.on("close",this.handClose),this.linkPopup.manualShow(t,{theme:"light",placement:"bottom-start",offset:[5,5]}),this.boxElement=t});m(this,"handleShow",()=>{this.focus()});m(this,"handClose",()=>{var r;p(sg,this.boxElement,"boxElement not found");const t=this.editor.getBoxData(this.boxElement),e=et(this.boxElement);if(p(sg,e,"block not found"),t.title)if(t.title.length>32){const i=t.title.slice(0,32),o={...t,title:i};this.editor.updateBoxData(o,{noFocus:!0}),tR(o)}else tR(t);else{const i=ga(e,this.boxElement);this.editor.deleteTextFromBlock(e,i.start,1)}this.editor.focus(),(r=this.linkPopup)==null||r.destroy(),this.linkPopup=null,this.boxElement=void 0,this.isEditing=!1});m(this,"handleKeyDown",(t,e)=>{var r;e||t.key==="Enter"&&((r=this.linkPopup)==null||r.close(null))});m(this,"onColorChange",t=>{var o,s;if(!(t.target instanceof HTMLElement)||t.target.closest("[data-color]")===null)return;const e=Li.exports.capitalize(t.target.getAttribute("data-color"));p(sg,this.boxElement,"boxElement not found");const r=this.editor.getBoxData(this.boxElement);this.statusPalette.changeColor(e);const i={...r,color:e};if(!this.isEditing){const l=(s=(o=this.linkPopup)==null?void 0:o.popper)==null?void 0:s.querySelector("input"),c=eR(e);l&&(l.value=c),i.title=c}this.editor.updateBoxData(i,{noFocus:!0}),this.focus()});m(this,"onTitleChange",t=>{const e=t.target.value;p(sg,this.boxElement,"boxElement not found");const i={...this.editor.getBoxData(this.boxElement),title:e.trim()};this.editor.updateBoxData(i,{noFocus:!0}),this.isEditing=!0});this.editor=t,this.statusPalette.root.addEventListener("click",this.onColorChange)}focus(){setTimeout(()=>{var t,e,r,i,o,s;(r=(e=(t=this.linkPopup)==null?void 0:t.popper)==null?void 0:e.querySelector("input"))==null||r.focus(),(s=(o=(i=this.linkPopup)==null?void 0:i.popper)==null?void 0:o.querySelector("input"))==null||s.select()},100)}createPopupContent(t,e,r){const i=B("div",["status-box-editor-popup"],null);return eV(i,t,this.onTitleChange,this.handleKeyDown),this.isEditing=!1,i.appendChild(this.statusPalette.root),this.statusPalette.changeColor(e),i}destroy(){var t;(t=this.linkPopup)==null||t.destroy()}}const yat="",iV=D("status-box-command");class Ld{static get commands(){return[{id:this.id,name:_.t("status.command.name"),icon:A2,order:650,group:"common",subText:"/status"}]}static insertStatus(t,e,r){var c;const i=t.getBlockByIndex(e,r),o=nR(),{start:s}=t.selection.range;p(iV,xi(s),"invalid block position"),t.insertBoxToBlock(i,s.offset,o.attributes);const l=t.getBoxById((c=o.attributes)==null?void 0:c.id);t.addCustom("status-box",d=>new rR(d)).editorStatus(l)}static insertEmptyBlockStatus(t,e,r){var l;let i=t.getBlockByIndex(e,r);(!i||!Be(t,i))&&(i=t.insertTextBlock([],e,r));const o=nR();t.setBlockText(i,[o]);const s=t.getBoxById((l=o.attributes)==null?void 0:l.id);return t.addCustom("status-box",c=>new rR(c)).editorStatus(s),i}}m(Ld,"id","insert-status");const oV={"en-US":{status:{empty:"Set status",command:{name:"Status"},color:{red:"Red",yellow:"Yellow",green:"Green",blue:"Blue",purple:"Purple",grey:"Gray"},colorDefaultTitle:{red:"Delayed",yellow:"In progress",green:"Done",blue:"Not started",purple:"To be confirmed",grey:"Paused"}}},"zh-CN":{status:{empty:"\u8BBE\u7F6E\u72B6\u6001",command:{name:"\u72B6\u6001"},color:{red:"\u7EA2\u8272",yellow:"\u9EC4\u8272",green:"\u7EFF\u8272",blue:"\u84DD\u8272",purple:"\u7D2B\u8272",grey:"\u7070\u8272"},colorDefaultTitle:{red:"\u5DF2\u5EF6\u671F",yellow:"\u8FDB\u884C\u4E2D",green:"\u5DF2\u5B8C\u6210",blue:"\u672A\u5F00\u59CB",purple:"\u5F85\u786E\u8BA4",grey:"\u5DF2\u6682\u505C"}}},"ja-JP":{status:{empty:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8A2D\u5B9A",command:{name:"\u30B9\u30C6\u30FC\u30BF\u30B9"},color:{red:"\u8D64",yellow:"\u9EC4",green:"\u7EFF",blue:"\u9752",purple:"\u7D2B",grey:"\u7070"},colorDefaultTitle:{red:"\u9045\u5EF6",yellow:"\u9032\u884C\u4E2D",green:"\u5B8C\u4E86",blue:"\u672A\u7740\u624B",purple:"\u672A\u78BA\u8A8D",grey:"\u4E00\u6642\u505C\u6B62"}}}};_.mergeLang(oV);const wa=D("inline-box-items");function sV(n,t,e){return n.undoManager.runInGroup(()=>{var s;let r=n.findBlockByIndex(t,e);(!r||!Be(n,r))&&(r=n.insertTextBlock([],t,e));const i=Yk();n.setBlockText(r,[i]);const o=(s=i.attributes)==null?void 0:s.id;return p(wa,o,"mathjax box id is empty"),setTimeout(()=>{const l=n.getBoxById(o);og(n,l)},100),r})}function lV(n,t,e){let r=n.findBlockByIndex(t,e),i="bottom-start";return(!r||!Be(n,r))&&(i="top-start",r=n.insertTextBlock([],t,e)),Rd(n,{target:r,linkText:"",linkUrl:"",onFinished:(l,c)=>{n.undoManager.runInGroup(()=>{try{p(wa,r,"block not found"),Be(n,r)||(r=n.insertTextBlock([],t,e));const d=Xr(l,{link:c}),h=Xr(" ",null),C=[d,h];n.insertTextToBlock(r,0,C),n.selection.selectBlock(r,jn(C)),n.focus()}catch(d){wa.error(d)}})},onClose:()=>{n.focus()},placement:i}),r}function aV(n,t,e){return n.undoManager.runInGroup(()=>{var l;const r=n.getBlockByIndex(t,e),i=n.selection.range;p(wa,xi(i.start),"invalid block position");const o=Yk();n.insertBoxToBlock(r,i.start.offset,o.attributes);const s=(l=o.attributes)==null?void 0:l.id;return p(wa,s,"mathjax box id is empty"),setTimeout(()=>{const c=n.getBoxById(s);og(n,c)},100),r})}function cV(n,t,e){const r=n.getBlockByIndex(t,e),i=n.selection.range;p(wa,xi(i.start),"invalid block position");const o=Vo(n,r,i);if(o.length===0)return;const s=o[0],l=jo(n,r,"quick-menu-inline-link",s);Rd(n,{target:l,linkText:"",linkUrl:"",onFinished:(h,C)=>{n.undoManager.runInGroup(()=>{try{const E=n.getBlockText(r),A=qo(E,i.start.offset,h,{link:C});n.setBlockText(r,A),n.selection.selectBlock(r,i.start.offset+h.length),n.focus()}catch(E){wa.error(E)}})},onClose:()=>{n.focus()},placement:"bottom-start"})}class iR{getCommands(){return[{id:"insert-math",name:_.t("quickMenu.inlineBox.math"),icon:OT,order:900,group:"common",subText:tr("insert-math")},{id:"insert-link",name:_.t("quickMenu.inlineBox.link"),icon:aE,order:400,group:"common",subText:tr("insert-link")}]}async handleUpdateBlockCore(t,e){switch(e.item.id){case"insert-math":return aV(t,e.containerId,e.blockIndex);case"insert-link":return cV(t,e.containerId,e.blockIndex);case Ld.id:return Ld.insertStatus(t,e.containerId,e.blockIndex);default:return null}}async handleInsertEmptyBlockCore(t,e){switch(e.item.id){case"insert-math":return sV(t,e.containerId,e.blockIndex);case"insert-link":return lV(t,e.containerId,e.blockIndex);case Ld.id:return Ld.insertEmptyBlockStatus(t,e.containerId,e.blockIndex);default:return null}}async executeCommand(t,e,r){if(r.from==="quick-menu"||r.from==="add-block-menu"){const i=t.getBlockById(r.blockId),o=t.getParentContainer(i),s=Et(o),l=t.getBlockIndex(i);t.undoManager.runInGroup(()=>this.handleUpdateBlockCore(t,{item:e,containerId:s,blockIndex:l}))}else r.from==="block-menu"&&t.undoManager.runInGroup(()=>this.handleInsertEmptyBlockCore(t,{item:e,containerId:r.containerId,blockIndex:r.blockIndex}));return null}}const oR=(n,t)=>{var e;return(e=n.children)==null?void 0:e.map(r=>({...r,itemType:"insert-block",commandProvider:t,children:oR(r,t)}))};function uV(n,t){var o,s;const{withPlainText:e}=t,r=(s=(o=n.options.componentsOptions)==null?void 0:o.quickMenu)==null?void 0:s.commandProviders;if(!r)return[];const i=[];return[...r,new $k(e),new iR].forEach(l=>{const c=l.getCommands(n,t);i.push(...c.map(d=>({...d,itemType:"insert-block",commandProvider:l,children:oR(d,l)})))}),i}function fV(n,t){const e=[];return n.editorBlocks.forEach(r=>{if(!r.getOptions)return;const i=r.getOptions(n);!i.insertBlockCommandItems||(i.insertBlockCommandItems.forEach(o=>{Vk(o,i)}),e.push(...i.insertBlockCommandItems))}),e.push(...uV(n,t)),e}function aA(n,t={withPlainText:!1,from:"block-menu"}){const e=fV(n,t),r=new Map;e.forEach(s=>{var d,h;const l=(d=s.group)!=null?d:"";let c=r.get(l);c?c.items.push(s):(c={group:l,order:s.groupOrder||Hk[l]||1e3,items:[s],hide:(h=s.hideGroupItem)!=null?h:!1},r.set(l,c))});const i=Array.from(r.values());i.sort((s,l)=>s.order-l.order),i.forEach(s=>{s.items.sort((l,c)=>{var d,h;return((d=l.order)!=null?d:0)-((h=c.order)!=null?h:0)})});const o=[];return i.forEach((s,l)=>{const c=`blockMenu.section.${s.group||"common"}`,d=_.t(c),h=d===c?s.group:d;s.hide||o.push({id:`section-${l}`,name:h,type:"section",group:s.group,itemType:"insert-block"}),o.push(...s.items.map(C=>({...C})))}),o}function dV(n,t,e){const r=n.getFocusedBlock();if(!r)return;const i=n.getParentContainer(r),o=Et(i);let l=n.getBlockIndex(r);Be(n,r)||(l+=1);const c=e.trigger?"quick-menu":"add-block-menu";if(t.commandProvider){n.emit("beforeExecCommand",n,t,{source:c}),t.commandProvider.executeCommand(n,t,{from:c,...e});return}!t.blockOptions||!t.blockOptions.handleInsertEmptyBlock||(n.emit("beforeExecCommand",n,t,{source:c}),t.blockOptions.handleInsertEmptyBlock(n,{containerId:o,blockIndex:l,item:t,from:c}))}const sR=D("quick-menu"),hV={id:"quick-menu",trigger:["/"]},mV=5;class lg{constructor(t,e=hV){m(this,"suggest");m(this,"items");m(this,"maxHeading");m(this,"firstEmptyOffset",-1);m(this,"queryItems",async(t,e)=>{if(this.initMenuItems(),this.refreshMenuItems(),e){const r=new Set,i=e.toLocaleLowerCase().replace(/^\s+|\s+$/g,""),o=this.items.filter(s=>{if(s.type==="section")return!0;if(s.name.toLocaleLowerCase().indexOf(i)!==-1||BN(s).toLocaleLowerCase().indexOf(i)!==-1)return r.add(s.group),!0;const l=`blockMenu.section.${s.group||"common"}`,c=_.t(l),d=c===l?s.group:c;return(d==null?void 0:d.toLocaleLowerCase().indexOf(i))!==-1?(r.add(s.group),!0):!1}).filter(s=>s.type==="section"?r.has(s.group):!0);return o.length?this.firstEmptyOffset=-1:this.handleEmptySearch(),o}return this.items});m(this,"onClose",()=>{this.firstEmptyOffset=-1,this.menu.closeReason==="clickBackground"&&this.editor.focus()});m(this,"onShow",(t,e,r,i)=>{const o=this.editor.getBlockByIndex(e,r);if(!Wr(o)){const s=et(at(o));if(s&&Ot(s)==="code")return!1}return!0});m(this,"onClickItem",(t,e)=>{const r=e;r.itemType==="insert-block"&&(p(sR,r.blockOptions||r.commandProvider,"invalid quick item, no block options or command provider"),p(sR,this.suggest.anchor,"invalid suggest, no anchor"),this.options.id==="empty-block-menu"&&this.editor.focus(),dV(this.editor,r,this.suggest.anchor))});this.editor=t,this.options=e,this.items=[],this.maxHeading=Wm(),this.suggest=new AE(t,{id:e.id||"quick-menu",trigger:e.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(){var r;const t=((r=this.suggest.anchor)==null?void 0:r.trigger)==="/"?"quick-menu":"block-menu",e=aA(this.editor,{withPlainText:!1,from:t});this.items=e}refreshMenuItems(){let t=null,e=0;const r=Wm();if(r!==this.maxHeading){const i=new $k,s=i.getCommands().map(l=>({...l,itemType:"insert-block",commandProvider:i}));for(let l=0;l<this.items.length;l++)this.items[l].group==="basics"&&(t||(t=l),t&&e++);t&&e&&this.items.splice(t,e,...s),this.maxHeading=r}}handleEmptySearch(){const t=this.editor.selection.getFocusedPos();if(this.firstEmptyOffset===-1){if(t.isSimple()){const{offset:e}=t;this.firstEmptyOffset=e-1}}else if(t.isSimple()){const{offset:e}=t;e-this.firstEmptyOffset>mV&&(this.suggest.close(),this.firstEmptyOffset=-1)}}}class ag{constructor(t){m(this,"instance");m(this,"mousedown",!1);m(this,"currentInstance",null);m(this,"attributeName",[]);m(this,"attributeDesc","");m(this,"_lastClickButtonId","");m(this,"observer",null);m(this,"observerCallback",null);m(this,"createContent",t=>{let e="",r=0;for(;r<this.attributeName.length&&!e;)t.hasAttribute(this.attributeName[r])&&(e=t.getAttribute(this.attributeName[r])||""),r++;const i=t.getAttribute(this.attributeDesc);if(!i)return e;const o=B("div",[],null);return B("span",[],o,e),i&&B("span",["editor-tooltip-desc"],o,i),o});m(this,"handleDocumentMouseDown",()=>{this.mousedown=!0,this.editor.domEvents.addEventListener(document,"mouseup",this.handleDocumentMouseUp)});m(this,"handleDocumentMouseUp",()=>{this.mousedown=!1,this.editor.domEvents.removeEventListener(document,"mouseup",this.handleDocumentMouseUp)});m(this,"handleShown",t=>{this.currentInstance&&this.hide(),this.currentInstance=t,this.createObserver()});m(this,"handleHidden",()=>{this.destroyObserver(),this.currentInstance=null});m(this,"handleShow",t=>{var i;const e=t.reference;if(!e||!Ae(document.body,e)||window.isDragging||this.mousedown)return!1;const r=Number.parseInt((i=e.getAttribute("data-tooltip-hide-at"))!=null?i:"",10);if(r&&Date.now()-r<1e3)return!1;if(this._lastClickButtonId===e.getAttribute("data-button-id"))return this._lastClickButtonId="",!1;if(this.attributeName.every(o=>!e.hasAttribute(o)))return!1;if(t.reference){const o={};if(t.reference.hasAttribute("data-editor-tooltip-placement")&&(o.placement=t.reference.getAttribute("data-editor-tooltip-placement")||"top"),t.reference.hasAttribute("data-editor-tooltip-offset-x")||t.reference.hasAttribute("data-editor-tooltip-offset-y")){const l=t.reference.getAttribute("data-editor-tooltip-offset-x"),c=t.reference.getAttribute("data-editor-tooltip-offset-y");o.offset=[l?Number.parseInt(l,10):0,c?Number.parseInt(c,10):0]}t.reference.hasAttribute("data-editor-tooltip-maxwidth")&&(o.maxWidth=Number.parseInt(t.reference.getAttribute("data-editor-tooltip-maxwidth")||"350",10)),t.reference.hasAttribute("data-editor-tooltip-allow-markdown")&&(o.allowHTML=!0);const s=document.body;if(o.appendTo=this.fixContainerForFullscreen(s),Object.keys(o).length&&t.setProps(o),t.reference.hasAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`)){const l=t.reference.getAttribute(`data-editor-tooltip-${this.editor.clientId}-dynamic`);t.setContent(l||"")}}return!0});this.editor=t;const e=t.clientId;this.attributeName=[`data-editor-tooltip-${e}`,`data-editor-tooltip-${e}-dynamic`,"data-editor-tooltip-common"],this.attributeDesc=`data-editor-tooltip-desc-${e}`,this.instance=Sp.delegate(document.body,{theme:"editor-tooltip",maxWidth:400,delay:200,target:this.attributeName.map(r=>`[${r}]`).join(","),content:this.createContent,onShow:this.handleShow,onShown:this.handleShown,onHide:this.handleHidden,hideOnClick:!1}),t.domEvents.addEventListener(document,"mousedown",this.handleDocumentMouseDown)}set lastClickButtonId(t){this._lastClickButtonId=t,t&&setTimeout(()=>{this._lastClickButtonId===t&&(this._lastClickButtonId="")},500)}visible(){var t;return(t=this.currentInstance)==null?void 0:t.state.isVisible}hide(){var t;(t=this.currentInstance)!=null&&t.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 t=this.currentInstance;if(!t||!t.reference)return;this.observerCallback=Pe.default(()=>{t.reference.closest("body")||(t.hide(),this.destroyObserver())},200),this.observer=new MutationObserver(this.observerCallback);const e=document.body,r={childList:!0,attributes:!1,subtree:!0};this.observer.observe(e,r)}destroyObserver(){this.observer&&(this.observer.disconnect(),this.observer=null),this.observerCallback&&(this.observerCallback.cancel(),this.observerCallback=null)}fixContainerForFullscreen(t){return t.closest("body")&&document.fullscreenElement&&!document.fullscreenElement.contains(t)?document.fullscreenElement:t}}class cg{constructor(t){m(this,"onMouseOver",t=>{const e=t.target;if(e.hasAttribute("data-editor-overflow-tooltip"))if(this.check(e)){const r=e.getAttribute("data-editor-overflow-tooltip");e.setAttribute(`data-editor-tooltip-${this.editor.clientId}`,r)}else e.removeAttribute(`data-editor-tooltip-${this.editor.clientId}`)});m(this,"create",(t,e,r,i)=>{const o=B(t,e,r,this.replaceTitleSpace(i));return o.setAttribute("data-editor-overflow-tooltip",this.replaceTitleSpace(i)),o});m(this,"replaceTitleSpace",t=>t.replace(/\s/g,"\xA0"));this.editor=t,this.editor.scrollContainer.addEventListener("mouseover",this.onMouseOver)}check(t){return t.scrollWidth>t.offsetWidth}destroy(){this.editor.scrollContainer.removeEventListener("mouseover",this.onMouseOver)}static get(t){return t.addCustom("overflow-tooltip-helper",()=>new cg(t))}}const gV={"text/style-bold":"bold","text/style-italic":"italic","text/style-underline":"underline","text/style-strikethrough":"line-through","text/style-code":"code","text/style-sub":"subscript","text/style-super":"superscript",link:"link"};function pV(n,t){const e=new Set(Object.keys(gV)),r=t.filter(o=>e.has(o.id));return zm(r)}function Id(n,t){if(!n.isWritable()||ei(n))return!1;const e=n.selection.range,r=n.editorCommandProviders.getCommands(e,"shortcut"),o=pV(n,r).find(s=>s.id===`text/${t}`||s.id==="link");return o?(n.editorCommandProviders.executeCommand(e,o,{}),bu.get(n).update("selectionChange"),!0):!1}function CV(n,t){const e=n.selection.focusedBlock;if(!n.isWritable()||!st(n,e))return!1;const r=n.getBlockData(e).heading,i={id:t===0?"text":`heading-${t}`,source:"shortcut",value:t===0?null:String(t),group:"BlockTurnIntoCommandProvider"};return Number(r)===t&&(i.id="text",i.value=null),n.editorCommandProviders.executeCommand(n.selection.range,i,{}),!0}const cA={"CtrlOrCmd+B":n=>Id(n,"style-bold"),"CtrlOrCmd+I":n=>Id(n,"style-italic"),"CtrlOrCmd+U":n=>Id(n,"style-underline"),"CtrlOrCmd+D":n=>Id(n,"style-strikethrough"),"CtrlOrCmd+K":n=>Id(n,"link"),...(()=>{const n={};for(let t=0;t<=8;t++)n[`CtrlOrCmd+Alt+Digit${t}`]=e=>CV(e,t);return n})()},EV={quickMenu:{basic:{heading:{title:"\u6807\u9898 {heading}",space:"{markdown}\u7A7A\u683C"},unordered:"\u65E0\u5E8F\u5217\u8868",ordered:"\u6709\u5E8F\u5217\u8868",checkbox:"\u5F85\u529E\u5217\u8868",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"}},AV={quickMenu:{basic:{heading:{title:"Heading {heading}",space:"{markdown}space"},unordered:"Bulleted list",ordered:"Numbered list",checkbox:"To-do list",quote:"Quote"},inlineBox:{math:"Formula",link:"Link"}},link:{textLabel:"Text",urlLabel:"Link address",textPlaceholder:"Please enter text",urlPlaceholder:"Please enter link",submitText:"Confirm",cancelText:"Cancel",edit:"Edit",remove:"Remove link"},commands:{unordered:"Bulleted list",ordered:"Numberer list",check:"To-do list",link:"Link",quote:"Quote",alignLeft:"Align left",alignRight:"Align right",alignCenter:"Center text",alignGroup:"Alignment",heading:"Heading {name}",headingGroup:"Text style",text:"Text"}},xV={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:"\u30C6\u30AD\u30B9\u30C8",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:"\u7DE8\u96C6",remove:"\u30EA\u30F3\u30AF\u3092\u89E3\u9664"},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"}};_.mergeLang({"zh-CN":EV,"en-US":AV,"ja-JP":xV});const Sat="";function Sa(n,...t){const e=Jr(...t);return e.classList.remove("editor-button"),e.classList.add("editor-text-button"),n.append(e),e}function lR(n){const t=Gm(n);t==null||t.hide();const e=n.findCustom("table-border-bar");e==null||e.closeToolbar()}function bV(n){return B("div",["insert-column-button","drop-marker"],n)}const vV=D("row-height");function aR(n){const t=Kt.fromTable(n),e=n.rows;p(vV,e.length===t.rowCount,"row count mismatch");const r=Array(t.rowCount).fill(0);for(let i=0;i<e.length;){let o=1,l=e[i].getBoundingClientRect().height,c=i+1;for(;c<e.length;){const d=e[c];if(d.cells.length!==0)break;o++,c++,l+=d.getBoundingClientRect().height}for(let d=0;d<o;d++)r[i+d]=l/o;i=c}return r}const BV=D("table-border-bar-dom");function cR(n){var c;const t=et(n.contentElement);p(BV,t,"no block");const r=ve(t).querySelector(".table-border-bar-container.left"),o=zt(t).offsetLeft-uu,s=((c=n.scrollOptions.paddingLeft)!=null?c:0)+o,l=Math.min(n.contentElement.offsetLeft-o,n.rootElement.scrollLeft-s);r&&(r.style.left=`${-l}px`)}const xl=D("table-border-bar-dom");function vu(n,t){p(xl,dn(t),"invalid table block");const e=fn(t),r=ao(n,t),i=ve(t),o=(C,E,A)=>{const v=B("div",["button-root",E],C),R=B("div",["button-container",E],v);v.setAttribute(`data-${E}-index`,`${A}`),R.setAttribute(`data-editor-tooltip-${n.clientId}`,E==="left"?_.t("table.insertRow"):_.t("table.insertCol")),B("span",["insert-indicator"],R),bV(R)},{selectedRows:s,selectedColumns:l}=vE(n,t),c=()=>{const C=r.querySelector(".table-border-bar-container.top");p(xl,C,"no top border bar container");const E=B("div",["table-border-bar-container","top"],null),A=B("div",["table-border-bar","top"],E),v=BP(e),S=Kt.fromTable(e).colCount;n.selection.range.isSimple()&&o(A,"top",0);for(let M=0;M<S;M++){const U=M===S-1?v[M]+2:v[M],V=B("span",["table-border-bar-cell","top"],A);l.has(M)&&V.classList.add("selected"),V.setAttribute("data-top-index",`${M}`),V.style.width=`${U}px`,n.selection.range.isSimple()&&o(A,"top",M+1)}yf(C,E)},d=()=>{const C=i.querySelector(".table-border-bar-container.left");p(xl,C,"no left border bar container");const E=B("div",["table-border-bar-container","left"],null),A=B("div",["table-border-bar","left"],E);B("span",["table-border-bar-cell","corner"],A);const v=aR(e);n.selection.range.isSimple()&&o(A,"left",0),Array.from(e.rows).forEach((R,S,M)=>{const U=B("span",["table-border-bar-cell","left"],A);s.has(S)&&U.classList.add("selected"),U.setAttribute("data-left-index",`${S}`);const V=S===M.length-1?v[S]+2:v[S];U.style.height=`${V}px`,n.selection.range.isSimple()&&o(A,"left",S+1)}),yf(C,E)};c(),d();const h=n.findCustom(lo(t));h&&cR(h)}function uR(n,t){const e=t.target;if(!(e instanceof Element))return;const r=et(e);p(xl,r&&dn(r),"invalid table block"),vu(n,r),n.selection.caret.update()}function ug(n,t){const e=t.target;if(!(e instanceof Element))return;const r=et(e);p(xl,r&&dn(r),"invalid table block");const i=e.closest(".button-root");if(i){if(i.classList.contains("top")){const o=parseInt(i.getAttribute("data-top-index")||"0",10);uk(n,r,o),vu(n,r)}else if(i.classList.contains("left")){const o=parseInt(i.getAttribute("data-left-index")||"0",10);FE(n,r,o),vu(n,r)}}}function fg(n,t){var s;lR(n),t.preventDefault(),t.stopPropagation();let e=null,r,i;const o=l=>{var c;if(l.target instanceof HTMLElement&&r&&e&&i!==void 0){const d=et(l.target),h=l.target.closest(".table-border-bar");if(d===e&&h){const C=parseInt((c=l.target.getAttribute(`data-${r}-index`))!=null?c:"0",10),E=Math.min(i,C),A=Math.abs(i-C)+1;Mt(l.target,"top")&&r==="top"?NP(n,d,E,A,{reverse:!0,noScroll:!0}):Mt(l.target,"left")&&r==="left"&&PP(n,d,E,A,{reverse:!0,noScroll:!0})}}l.type==="mouseup"&&(e=null,i=void 0,r=void 0,document.body.removeEventListener("mousemove",o),document.body.removeEventListener("mouseup",o))};t.target instanceof HTMLElement&&Mt(t.target,"table-border-bar-cell")&&(e=et(t.target),Mt(t.target,"top")?r="top":Mt(t.target,"left")&&(r="left"),r&&e&&(i=parseInt((s=t.target.getAttribute(`data-${r}-index`))!=null?s:"0",10),document.body.addEventListener("mousemove",o),document.body.addEventListener("mouseup",o)))}function fR(n){const t=n.selection.range,e=Ad(n,t);e&&vu(n,e)}function yV(n,t){p(xl,dn(t),"invalid table block");const e=ao(n,t),r=ve(t),i=B("div",["table-border-bar-container","top"],e),o=B("div",["table-border-bar-container","left"],r);vu(n,t),n.domEvents.addEventListener(zt(t),"scroll",uR),n.domEvents.addEventListener(i,"click",ug),n.domEvents.addEventListener(o,"click",ug),n.domEvents.addEventListener(i,"mousedown",fg),n.domEvents.addEventListener(o,"mousedown",fg),n.addListener("afterClearSelection",fR)}function dR(n,t){if(!n.isWritable())return;if(ao(n,t).querySelector(".table-border-bar-container")){vu(n,t);return}yV(n,t)}function hR(n,t){p(xl,dn(t),"invalid table block");const e=ao(n,t),r=ve(t),i=e.querySelectorAll(".table-border-bar-container"),o=r.querySelectorAll(".table-border-bar-container");i.forEach(s=>{n.domEvents.removeEventListener(s,"click",ug),n.domEvents.removeEventListener(s,"mousedown",fg),s.remove()}),o.forEach(s=>{n.domEvents.removeEventListener(s,"click",ug),n.domEvents.removeEventListener(s,"mousedown",fg),s.remove()}),n.domEvents.removeEventListener(zt(t),"scroll",uR),n.addListener("afterClearSelection",fR)}function TV(n,t){p(xl,dn(t),"invalid table block");const r=ao(n,t).querySelector(".table-border-bar-container.top");return r?r.getBoundingClientRect().height:0}class kV{constructor(t,e){m(this,"toolbar");m(this,"handleSelectionChange",(t,e)=>{!t.isVisible||(e==="delete-columns"?(gl(this.editor,this.tableBlock,!0,!0),pl(this.editor,this.tableBlock,!0,!0)):e==="delete-rows"?(gl(this.editor,this.tableBlock,!0,!1),pl(this.editor,this.tableBlock,!0,!1)):(gl(this.editor,this.tableBlock,!1),pl(this.editor,this.tableBlock,!1)))});m(this,"handleClick",(t,e,r)=>{e.id==="delete-columns"?BE(this.editor.selection.range):e.id==="delete-rows"&&yE(this.editor.selection.range)});m(this,"handleToolbarClose",()=>{this.tableBlock&&Ad(this.editor,this.editor.selection.range)===this.tableBlock&&(gl(this.editor,this.tableBlock,!1),pl(this.editor,this.tableBlock,!1))});this.editor=t,this.tableBlock=e;const r=t.options.componentsOptions.popover;this.toolbar=new pd([],void 0,{id:"table-row-column-toolbar",overflowBoundary:r==null?void 0:r.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("cancelBar")}update(){var i,o,s;const{selectedColumns:t,selectedRows:e}=vE(this.editor,this.tableBlock);if(!this.editor.isWritable())return;if(t.size>0&&e.size>0){this.toolbar.close("cancelBar");return}if(t.size===0&&e.size===0){this.toolbar.close("cancelBar");return}const r=Vo(this.editor,this.tableBlock,this.editor.selection.range)[0];if(!r){this.toolbar.close("cancelBar");return}if(t.size>0){const l={id:"delete-columns",name:_.t("table.deleteSelectCol"),icon:BT};this.toolbar.updateItems([l]);const c=jo(this.editor,this.tableBlock,"table-row-column-delete",r);this.toolbar.manualShow(c,{placement:"top",offset:[0,5]})}else{const l={id:"delete-rows",name:_.t("table.deleteSelectRow"),icon:vT};this.toolbar.updateItems([l]);const h=ve(this.tableBlock).querySelector(".table-border-bar-container.left").getBoundingClientRect(),C=new DOMRect(Math.max(h.left,r.left-uu),r.top,uu,r.height),E=jo(this.editor,this.tableBlock,"table-row-column-delete",C);this.toolbar.manualShow(E,{placement:"left",offset:[0,5]});const A=this.editor.options.componentsOptions.popover;(i=this.toolbar.tippyInstance)==null||i.setProps({popperOptions:{modifiers:[{name:"flip",options:{boundary:A==null?void 0:A.overflowBoundary,fallbackPlacements:["left","right"]}}]}})}(s=(o=this.toolbar.tippyInstance)==null?void 0:o.popperInstance)==null||s.update()}destroy(){this.toolbar.destroy(),this.toolbar.removeAllListeners()}}const uA=D("table-border-bar");class RV{constructor(t,e){m(this,"toolbar");m(this,"resizeObserver",null);m(this,"handleReadonlyChanged",t=>{t.isWritable()?this.update():hR(this.editor,this.tableBlock)});m(this,"handleBlockUpdated",()=>{var t;(t=this.resizeObserver)==null||t.disconnect(),setTimeout(()=>{var r;const e=this.editor.getBlockById(dt(this.tableBlock));(r=this.resizeObserver)==null||r.observe(fn(e))})});m(this,"handleScroll",()=>{var t;(t=this.toolbar)==null||t.update()});m(this,"handleTableResize",()=>{!this.editor.isWritable()||this.update()});this.editor=t,this.tableBlock=e,p(uA,this.tableBlock,"no table block"),uA.debug("create table border bar"),dR(this.editor,this.tableBlock),this.resizeObserver=new Zl(this.handleTableResize),this.resizeObserver.observe(fn(this.tableBlock));const r=t.getComponentOptions("table");r!=null&&r.hideToolbar||(this.toolbar=new kV(this.editor,this.tableBlock)),this.editor.addListener("readonlyChanged",this.handleReadonlyChanged)}close(){var t;(t=this.toolbar)==null||t.close()}destroy(){var t,e;uA.debug("destroy table border bar"),(t=this.resizeObserver)==null||t.disconnect(),this.resizeObserver=null,hR(this.editor,this.tableBlock),(e=this.toolbar)==null||e.destroy(),this.editor.removeListener("readonlyChanged",this.handleReadonlyChanged)}update(){var t;dR(this.editor,this.tableBlock),(t=this.toolbar)==null||t.update()}}const wV=D("table-border-bar");class SV{constructor(t){m(this,"activeTableBar",null);m(this,"handleBlockDeleted",(t,e)=>{!this.activeTableBar||(e===this.activeTableBar.tableBlock||Ae(e,this.activeTableBar.tableBlock))&&(this.activeTableBar.destroy(),this.activeTableBar=null)});m(this,"handleSelectionChanged",t=>{setTimeout(()=>{var i;const e=t.selection.range,r=Ad(t,e);((i=this.activeTableBar)==null?void 0:i.tableBlock)!==r&&this.activeTableBar&&this.hide(),r&&this.show(r)})});m(this,"handleScroll",()=>{var t;(t=this.activeTableBar)==null||t.handleScroll()});m(this,"isInBlock",(t,e)=>!!(e.target instanceof Element&&e.target.closest('[data-command-bar-id="table-row-column-toolbar"]')));this.editor=t,this.editor.addListener("blockDeleted",this.handleBlockDeleted),this.editor.addListener("selectionChanged",this.handleSelectionChanged),ze.get(t).addFilter(this)}destroy(){var t;this.editor.removeListener("blockDeleted",this.handleBlockDeleted),this.editor.removeListener("selectionChanged",this.handleSelectionChanged),(t=this.activeTableBar)==null||t.destroy()}show(t){this.activeTableBar?(this.activeTableBar.tableBlock!==t&&this.hide(),this.activeTableBar.update()):this.activeTableBar=new RV(this.editor,t)}update(){var t;(t=this.activeTableBar)==null||t.handleBlockUpdated()}closeToolbar(){var t;(t=this.activeTableBar)==null||t.close()}hide(){!this.activeTableBar||(p(wV,this.activeTableBar,"no active table bar"),this.activeTableBar.destroy(),this.activeTableBar=null)}}function mR(n,t){const e=n.addCustom("table-border-bar",r=>new SV(r));t==="update"&&e.update()}const hr=D("table-cell-menu"),LV="style-bg-color-";class IV{constructor(t){m(this,"activeTableBlock",null);m(this,"targetButton",null);m(this,"manualMenu",null);m(this,"colorPaletteItem",null);m(this,"markedRowAsDanger",!1);m(this,"markedColAsDanger",!1);m(this,"resetAsDangerMarked",()=>{this.markedColAsDanger=!1,this.markedRowAsDanger=!1});m(this,"handlePrevent",(t,e)=>{e.stopPropagation()});m(this,"handleReadonlyChanged",t=>{t.isWritable()||this.hide()});m(this,"handleSelectionChanged",t=>{const e=t.selection.range,r=Ad(t,e);if(this.hide(),this.activeTableBlock!==r&&(this.activeTableBlock=r),this.activeTableBlock){const i=Kt.fromBlock(this.activeTableBlock),o=e.isReverse()?e.start:e.end;let s=null;o instanceof Ai?t.getBlockById(o.blockId)===this.activeTableBlock?s=i.getCellByContainerId(o.childContainerId):s=this.getCellByChildBlockId(i,o.blockId):o.blockId!==this.activeTableBlock.id&&(s=this.getCellByChildBlockId(i,o.blockId)),s&&this.editor.isWritable()&&this.showCellMenuButton(s)}});m(this,"handleBeforePopupPalette",()=>{var e;const t=this.getSelectedBkgColorIndex();(e=this.colorPaletteItem)==null||e.palette.setColor("backgroundColor",t)});m(this,"createBkgColorItem",()=>{const t=B("div",["cell-background-color-item"],null);B("span",[],t,_.t("table.cellBackground"));const e=this.getSelectedBkgColorIndex();B("button",["item-button"],t).setAttribute("data-color-index",`${e}`);const i=B("span",["item-sub-indicator"],t);return i.innerHTML=nE,t});m(this,"handleCommand",t=>{var i;p(hr,this.activeTableBlock,"no target table block");const e=((i=t.states)==null?void 0:i.includes("checked"))||!1,r=t.value;switch(t.id){case"delete-select-row":yE(z2(this.editor,this.activeTableBlock,!1));break;case"delete-select-col":BE(z2(this.editor,this.activeTableBlock,!0));break;case"merge-cell":$2(this.editor.selection.range);break;case"split-cell":this.handleSplitCell();break;case"row-title":this.handleRowTitle(e);break;case"col-title":this.handleColTitle(e);break;case"stripe-style":this.handleStripeStyle(e);break;case"hide-border":WN(this.editor,this.activeTableBlock,r==="show-border");break;case"show-chart":YN(this.editor,this.activeTableBlock,r==="show-chart"),IE(this.editor,this.activeTableBlock,{updateNow:!0});break}});m(this,"handleToolbarClose",()=>{this.targetButton&&ut(this.targetButton,"active"),(this.markedRowAsDanger||this.markedColAsDanger)&&this.activeTableBlock&&Ad(this.editor,this.editor.selection.range)===this.activeTableBlock&&(gl(this.editor,this.activeTableBlock,!1),pl(this.editor,this.activeTableBlock,!1),this.resetAsDangerMarked()),this.editor.focus({preventScroll:!0})});m(this,"handleSelectionChange",(t,e)=>{if(!!t.isVisible)if(p(hr,this.activeTableBlock,"no target table block"),e==="cell-background-color"&&this.handleBeforePopupPalette(),e==="delete-select-row"){if(this.markedRowAsDanger)return;gl(this.editor,this.activeTableBlock,!0,!1),pl(this.editor,this.activeTableBlock,!0,!1),this.resetAsDangerMarked(),this.markedRowAsDanger=!0}else if(e==="delete-select-col"){if(this.markedColAsDanger)return;gl(this.editor,this.activeTableBlock,!0,!0),pl(this.editor,this.activeTableBlock,!0,!0),this.resetAsDangerMarked(),this.markedColAsDanger=!0}else gl(this.editor,this.activeTableBlock,!1),pl(this.editor,this.activeTableBlock,!1),this.resetAsDangerMarked()});m(this,"handleClick",(t,e)=>{var r;p(hr,this.activeTableBlock,"no target table block"),p(hr,this.targetButton,"no target button"),lR(this.editor),Mt(this.targetButton,"active")?(ut(this.targetButton,"active"),(r=this.manualMenu)==null||r.close("clickItem")):(q(this.targetButton,"active"),this.manualMenu?this.manualMenu.updateItems(this.createCommandMenu()):(this.manualMenu=new dl(this.createCommandMenu(),void 0,{id:"table-cell-menu"}),this.manualMenu.on("click",(i,o)=>{var s;this.handleCommand(o),(s=this.manualMenu)==null||s.close("clickItem")}),this.manualMenu.on("selectionChange",this.handleSelectionChange),this.manualMenu.on("close",this.handleToolbarClose)),this.manualMenu.manualShow(this.targetButton,{placement:"right-start"})),e.stopPropagation(),t.focus({preventScroll:!0})});this.editor=t,this.editor.addListener("selectionChanged",this.handleSelectionChanged),this.editor.addListener("readonlyChanged",this.handleReadonlyChanged)}destroy(){var t,e;this.activeTableBlock=null,this.targetButton=null,this.editor.removeListener("selectionChanged",this.handleSelectionChanged),this.editor.removeListener("readonlyChanged",this.handleReadonlyChanged),(t=this.manualMenu)==null||t.destroy(),(e=this.colorPaletteItem)==null||e.destroy()}hide(){var t;(t=this.manualMenu)==null||t.close("cancelBar"),this.targetButton&&(ut(this.targetButton,"active"),this.targetButton.style.display="none")}getCellByChildBlockId(t,e){let r=this.editor.getBlockById(e);for(;r;){const i=r.closest("td");p(hr,i,"no parent cell");const o=et(i);if(p(hr,o,"no parent block"),fn(o)===t.table)return t.getCellByCellElement(i);r=o}return p(hr,!1,"filed to get cell by child block id"),null}createTargetButton(t){this.targetButton?t.querySelector(`:scope > .${SE}`)||t.appendChild(this.targetButton):(this.targetButton=B("button",[SE],t),this.targetButton.innerHTML=xm,this.editor.domEvents.addEventListener(this.targetButton,"click",this.handleClick),this.editor.domEvents.addEventListener(this.targetButton,"mousedown",this.handlePrevent),this.editor.domEvents.addEventListener(this.targetButton,"dblclick",this.handlePrevent))}showCellMenuButton(t){this.createTargetButton(t.cell),p(hr,this.targetButton,"no target button"),this.targetButton.style.display="inline-block"}handleSplitCell(){if(this.activeTableBlock){const t=Kt.fromBlock(this.activeTableBlock),e=this.editor.selection.range;if(e.isSimple()){const{col:r,row:i}=this.getCellByChildBlockId(t,e.start.blockId);kE(this.editor,this.activeTableBlock,{col:r,row:i})}else RE(this.editor.selection.range)}}getSelectedBkgColorIndex(){var s;p(hr,this.activeTableBlock,"no target table block");const t=this.editor.selection.range,e=ml(this.editor,this.activeTableBlock,t.focus),r=this.editor.getBlockData(this.activeTableBlock),i=e.childContainerId,o=r[`${i}_background`];return o?Number.parseInt((s=o.substring(LV.length))!=null?s:"0",10):-1}createCommandMenu(){p(hr,this.activeTableBlock,"no target table block");const t=this.editor.getBlockData(this.activeTableBlock),e=V2(this.editor,this.activeTableBlock,this.editor.selection.range);let r=this.editor.selection.range;if(r.isSimple()){const h=ml(this.editor,this.activeTableBlock,r.start);r=En(this.editor,{anchor:h,focus:h})}const i=K2(this.editor,this.activeTableBlock,r),o=t.hasRowTitle,s=t.hasColTitle,l=t.isStripeStyle,c=t.noBorder,d=t.chart;return this.colorPaletteItem=new _2("cell-background-color",{color:!1}),this.colorPaletteItem.palette.on("onClick",(h,C)=>{var E;switch(p(hr,this.activeTableBlock,"no target table block"),h){case"clearColor":q2(this.editor,this.activeTableBlock,-1);break;case"backgroundColor":q2(this.editor,this.activeTableBlock,C);break}(E=this.manualMenu)==null||E.close("clickItem")}),[{id:"cell-background-color",name:_.t("table.cellBackground"),element:this.createBkgColorItem(),children:[this.colorPaletteItem]},{id:"separator",name:"",type:"separator"},{id:"merge-cell",name:_.t("table.mergeCell"),states:e?[]:["disabled"]},{id:"split-cell",name:_.t("table.splitCell"),states:i?[]:["disabled"]},{id:"separator",name:"",type:"separator"},{id:"delete-select-row",name:_.t("table.deleteSelectRow")},{id:"delete-select-col",name:_.t("table.deleteSelectCol")},{id:"separator",name:"",type:"separator"},{id:"table-config",name:_.t("table.tableConfigKey"),children:[{id:"row-title",name:_.t("table.tableConfig.rowTitle"),states:o?["checked"]:[]},{id:"col-title",name:_.t("table.tableConfig.colTitle"),states:s?["checked"]:[]},{id:"stripe-style",name:_.t("table.tableConfig.stripeStyle"),states:l?["checked"]:[]},{id:"hide-border",name:c?_.t("table.tableConfig.showBorder"):_.t("table.tableConfig.hideBorder"),value:c?"show-border":"hide-border"},{id:"show-chart",name:d?_.t("table.tableConfig.hideChart"):_.t("table.tableConfig.showChart"),value:d?"hide-chart":"show-chart"}]}]}handleRowTitle(t){p(hr,this.activeTableBlock,"no target table block"),t?jN(this.editor,this.activeTableBlock):HN(this.editor,this.activeTableBlock)}handleColTitle(t){p(hr,this.activeTableBlock,"no target table block"),t?$N(this.editor,this.activeTableBlock):VN(this.editor,this.activeTableBlock)}handleStripeStyle(t){p(hr,this.activeTableBlock,"no target table block"),t?GN(this.editor,this.activeTableBlock):zN(this.editor,this.activeTableBlock)}}function gR(n){n.addCustom("table-cell-menu",t=>new IV(t))}const pR=D("table-container");function fA(n){const t=n.closest("td");return p(pR,t,"no parent cell for a table cell container"),t}function CR(n){const t=fn(n);return Array.from(t.querySelectorAll(':scope > tbody > tr > td > [data-type="editor-container"].child'))}function dA(n,t,e,r){const i=Kt.fromBlock(n),o=i.getCellByContainerId(Et(t));if(e==="ArrowDown"){const s=i.getBottomCell(o);return s?s.container:null}if(e==="ArrowUp"){const s=i.getTopCell(o);return s?s.container:null}if(e==="ArrowLeft"){const s=i.getLeftCell(o);if(!s)return null;const l=s.container;return r!=null&&r.noWrap&&s.row!==o.row?null:l}if(e==="ArrowRight"){const s=i.getRightCell(o);if(!s)return null;const l=s.container;return r!=null&&r.noWrap&&s.row!==o.row?null:l}p(pR,!1,`invalid navigation type: ${e}`)}const DV=12,_V=90,dg=23,ER=2;class MV{constructor(t){m(this,"scrollTableBlock",null);m(this,"autoScrollDir",null);m(this,"autoScrollTimer",null);m(this,"handleMouseDown",t=>{const e=Fe(t.clientX,t.clientY,{noFilter:!0});if(e&&e instanceof HTMLElement){const r=et(e);if(r&&Ae(this.editor.rootContainer,r)){const i=is(r);i&&(this.scrollTableBlock=i,document.addEventListener("mousemove",this.handleAutoScroll))}}});m(this,"handleAutoScroll",y9.default(t=>{if(this.scrollTableBlock){const e=this.editor.getCustom(lo(this.scrollTableBlock)),r=e.rootElement,i=e.scrollOptions.parentContainer,o=r.getBoundingClientRect(),s=window.innerHeight-this.getBarFloatWindowBottom(e),l=i.getBoundingClientRect(),c=Math.min(l.bottom,s),d=Math.max(l.top,0);o.bottom>c&&t.clientY>=c?this.setAutoScroll("bottom"):o.top<d&&t.clientY<=d?this.setAutoScroll("top"):r.scrollLeft>0&&t.clientX<o.left?this.setAutoScroll("left"):r.scrollLeft<r.scrollWidth-r.offsetWidth&&t.clientX>o.right?this.setAutoScroll("right"):this.clearAutoScroll()}},15));m(this,"handleMouseUp",()=>{document.removeEventListener("mousemove",this.handleAutoScroll),setTimeout(()=>{this.scrollTableBlock=null})});m(this,"handleSelectionChanged",t=>{const e=t.selection.range;if(e.isCollapsed()&&e.isSimple()){const r=t.getBlockById(e.start.blockId),i=is(r);if(i){const o=t.getCustom(lo(i)),s=o.rootElement.getBoundingClientRect(),l=tl(t,r,e.start);if(s.left>l.left){const c=e.start.offset===0?DV:ER;o.rootElement.scrollLeft-=s.left-l.left+c}else if(l.right>s.right){const c=e.start.offset===0?_V:ER;o.rootElement.scrollLeft+=l.right-s.right+c}}}else{const r=t.getBlockById(e.start.blockId),i=is(r),o=t.getBlockById(e.end.blockId),s=is(o);if(i&&i===s){const l=t.getCustom(lo(i)),c=l.rootElement.getBoundingClientRect();let d=null;if(e.isSimple())d=e.isReverse()?tl(t,r,e.start):tl(t,o,e.end);else{const h=fA(pi(t,e.start.childContainerId)),C=fA(pi(t,e.end.childContainerId));d=e.isReverse()?h.getBoundingClientRect():C.getBoundingClientRect()}c.left>d.left&&e.isReverse()?l.rootElement.scrollLeft-=c.left-d.left:c.right<d.right&&!e.isReverse()&&(l.rootElement.scrollLeft+=d.right-c.right)}}});m(this,"handleScroll",t=>{N2(t),this.editor.selection.caret.update()});m(this,"handleReset",t=>{N2(t),this.editor.selection.caret.update();const e=this.editor.findCustom("table-border-bar");e&&e.handleScroll(),cR(t)});this.editor=t,this.editor.addListener("selectionChanged",this.handleSelectionChanged),document.addEventListener("mousedown",this.handleMouseDown),document.addEventListener("mouseup",this.handleMouseUp)}getBarFloatWindowBottom(t){return t.scrollOptions.barFloatWindowBottom?typeof t.scrollOptions.barFloatWindowBottom=="number"?t.scrollOptions.barFloatWindowBottom:t.scrollOptions.barFloatWindowBottom():0}clearAutoScroll(){this.autoScrollTimer&&(clearInterval(this.autoScrollTimer),this.autoScrollTimer=null,this.autoScrollDir=null)}setAutoScroll(t){this.autoScrollDir&&this.autoScrollDir!==t&&this.clearAutoScroll(),this.autoScrollTimer||(this.autoScrollDir=t,this.autoScrollTimer=window.setInterval(()=>{if(this.scrollTableBlock){const e=this.editor.getCustom(lo(this.scrollTableBlock)),r=e.rootElement,i=e.scrollOptions.parentContainer,o=r.getBoundingClientRect(),s=i===document.documentElement?window.innerHeight:i.offsetHeight,l=window.innerHeight-this.getBarFloatWindowBottom(e),c=i.getBoundingClientRect(),d=Math.min(c.bottom,l),h=Math.max(c.top,0);this.autoScrollDir==="left"&&(r.scrollLeft-=dg,r.scrollLeft<=0&&this.clearAutoScroll()),this.autoScrollDir==="right"&&(r.scrollLeft+=dg,r.scrollLeft>=r.scrollWidth-r.offsetWidth&&this.clearAutoScroll()),this.autoScrollDir==="bottom"&&(i.scrollTop+=dg,(i.scrollTop>=i.scrollHeight-s||o.bottom<=d)&&this.clearAutoScroll()),this.autoScrollDir==="top"&&(i.scrollTop-=dg,(i.scrollTop<=0||o.top>=h)&&this.clearAutoScroll())}},100))}destroy(){document.removeEventListener("mousedown",this.handleMouseDown),document.removeEventListener("mouseup",this.handleMouseUp),this.editor.removeListener("selectionChanged",this.handleSelectionChanged)}}function AR(n){return n.addCustom("table-scroll-events",t=>new MV(t))}const UV=D("table-doc-change-handler");class OV{constructor(t){this.editor=t,this.editor.addListener("docChanged",this.handleDocChanged)}handleDocChanged(t,e){if(!e){const{start:r,end:i}=t.selection.range;if(!t.findBlockById(r.blockId)||!t.findBlockById(i.blockId)){t.selection.selectBlock(t.getBlockByIndex("root",0),0);return}if(ha(r)){const o=t.getBlockById(r.blockId);if(!dn(o))return;if(p(UV,ha(i),"invalid range"),!wf(t,r.childContainerId)||!wf(t,i.childContainerId)){t.selection.selectBlock(o,0);return}let s=null,l=null;const c=(d,h)=>{const C=h.getCellById(d.childContainerId),{colIndex:E=0,rowIndex:A=0}=d.custom;let v=-1,R=-1;return(C.col>E||C.col+C.colSpan-1<E)&&(v=C.col),(C.row>A||C.row+C.rowSpan-1<A)&&(R=C.row),v!==-1||R!==-1?Ue(o,d.childContainerId,{colIndex:v===-1?E:v,rowIndex:R===-1?A:R}):null};if(r.custom){const d=Kt.fromBlock(o);s=c(r,d),l=c(i,d)}(s!==null||l!==null)&&(t.selection.range.isReverse()?t.selection.setSelection(l!=null?l:i,s!=null?s:r):t.selection.setSelection(s!=null?s:r,l!=null?l:i))}}}destroy(){this.editor.removeListener("docChanged",this.handleDocChanged)}}function xR(n){n.addCustom("table-doc-change-handler",t=>new OV(t))}const uo=D("create-content");function bR(n,t,e){var C;const r=new Um(e),i=e.rows,o=e.cols;p(uo,i>=1,`invalid rows: ${i}`),p(uo,o>=1,`invalid cols: ${o}`),p(uo,e.children,"no table children");const s=B("table",[],null),l=(C=e.colsWidth)!=null?C:new Array(e.cols).fill(0),c=B("colgroup",[],s);for(let E=0;E<r.colCount;E++){const A=B("col",[],c);l[E]&&(A.style.width=`${l[E]}px`,A.style.minWidth=`${l[E]}px`)}const d=B("tbody",[],s);let h=0;for(let E=0;E<i;E++){const A=B("tr",[],d);for(let v=0;v<o;v++){const R=r.getCell({col:v,row:E});if(R.virtual)p(uo,R.colSpan>1||R.rowSpan>1,"virtual cell should have colSpan or rowSpan");else{const S=e.children[h],M=B("td",[],A);R.colSpan>1&&(M.colSpan=R.colSpan),R.rowSpan>1&&(M.rowSpan=R.rowSpan);const U=e[fu(S)];U&&q(M,U),v===0&&e.hasColTitle&&q(M,H2.COL_TITLE_ITEM),n.createChildContainer(t,M,S),h+=1}}}return p(uo,h===e.children.length,"container count mismatch"),s.style.minWidth=`${l.reduce((E,A)=>A+E,0)}px`,e.noBorder&&q(s,"no-border"),e.chart&&q(s,"editor-table-chart"),e.isStripeStyle&&q(s,"stripe"),e.hasRowTitle&&q(s,"row-title"),e.hasColTitle&&q(s,"col-title"),s}function NV(n,t,e,r,i){p(uo,i.type==="table","not table data"),p(uo,Et(e)===t[t.length-1].containerId,"invalid path");const o=i,s=fa(r,"div");try{const l=B("div",[],null);l.setAttribute("data-type","table-content");const c=bR(n,t,o);c.classList.add("drag-preview-element"),l.appendChild(c);const d=n.getComponentOptions("table");ak(n),fk(n),mR(n,"create"),xR(n),d!=null&&d.hideCellMenu||gR(n),ET(n,DE);const h=n.addCustom(lo(r),()=>bP());h.init({parentElement:s,childElement:l,safeRightSpace:50,safeLeftSpace:40,parentContainer:ie(e)?n.scrollContainer:e,locatingContainer:ie(e)?(d==null?void 0:d.locatingContainer)||n.parent:e,paddingLeft:uu+bd,paddingTop:uu+bd,paddingBottom:bd/2,paddingRight:bd/2,barFloatWindowBottom:d==null?void 0:d.barFloatWindowBottom,allowScrollBarFixed:d==null?void 0:d.allowScrollBarFixed,isSetScale:d==null?void 0:d.isSetScale});const C=AR(n);h.on("scroll",C.handleReset),h.on("resize",C.handleReset),setTimeout(()=>{ZN(n,r)})}catch{const c=`invalid table data: ${JSON.stringify(o)}`;uo.error(c);const d=B("div",["error"],s);d.innerText=c}return s}function PV(n,t,e){p(uo,e.type==="table","not table data");const r=e,i=zt(t);try{const o=fn(t),s=el(t),l=bR(n,s,r);l.classList.add("drag-preview-element"),o.insertAdjacentElement("afterend",l),o.remove();const c=n.getComponentOptions("table");ak(n),fk(n),mR(n,"update"),xR(n),c!=null&&c.hideCellMenu||gR(n),DE(n,void 0,t)}catch{const s=`invalid table data: ${JSON.stringify(r)}`;uo.error(s);const l=B("div",["error"],i);l.innerText=s}}function FV(n,t){let e,r,i=!1;if([...t].every(E=>E==="|")?(r=t.length,e=Array(r).fill(""),i=!0):(e=Hp(t,"|").split("|"),r=e.length),r<2)return null;const o=3,s=r,l=[];for(let E=0;E<3;E++)e.forEach(A=>{l.push(Yo(n.doc,E===0?A:""))});const c=Array(s).fill(UE),d=l[i?0:s],h=n.doc.getContainerBlocks(d)[0].id;return{blockData:{id:it(),type:"table",rows:o,cols:s,children:l,colsWidth:c},focusBlockId:h}}function KV(n,t){const e=t.rows,r=t.cols;if(e<1||r<1)return null;const i=[];for(let d=0;d<e;d++)for(let h=0;h<r;h++)i.push(Yo(n.doc));const o=Array(r).fill(UE),s=i[0],l=n.doc.getContainerBlocks(s)[0].id;return{blockData:{id:it(),type:"table",rows:e,cols:r,children:i,colsWidth:o},focusBlockId:l}}const hA=D("get-selected-containers");function vR(n,t,e,r){p(hA,e.blockId===r.blockId,"only allow select in single table block"),p(hA,dt(t)===e.blockId,"only allow select in single table block");const i=Kt.fromBlock(t),o=i.getCellByContainerId(e.childContainerId),s=i.getCellByContainerId(r.childContainerId);if(e.custom===void 0||r.custom===void 0)return i.getCells(o,s).map(S=>i.getCellContainer(S));const{fromCol:l,toCol:c,fromRow:d,toRow:h}=wi(t,e,r),C=new Set,E=[];return i.sub({row:d,col:l},{row:h,col:c}).forEach(v=>{v.forEach(R=>{const S=i.getCellByContainerId(R.containerId);S.col<l||S.row<d||S.col+S.colSpan-1>c||S.row+S.rowSpan-1>h||C.has(R.containerId)||(C.add(R.containerId),E.push(S.container))})}),E}function VV(n,t,e){p(hA,t.blockId===e.blockId,"only allow select in single table block");const r=n.getBlockById(t.blockId);return vR(n,r,t,e)}const BR=D("table-selection-to-doc");function $V(n,t){return t.reduce((e,r)=>{const i=fu(r);return n[i]&&(e[i]=n[i]),e},{})}function HV(n,t){const{start:e,end:r,block:i}=t,o=Ot(i);p(BR,o==="table",`invalid block type: ${o}`);const s=n.getBlockData(i);if(e.isSimple()&&r.isSimple())return ol(n.editorBlocks,n.doc.toJSON(),s);p(BR,!e.isSimple()&&!r.isSimple(),"invalid block pos type");const l=Kt.fromBlock(i),{fromCol:c,toCol:d,fromRow:h,toRow:C}=wi(i,e,r),E={},A=[],v=n.doc.toJSON();let R={};l.sub({row:h,col:c},{row:C,col:d}).forEach((ft,pt)=>{ft.forEach((ct,wt)=>{const Bt=ct.containerId;if(A.indexOf(Bt)!==-1)return;A.push(Bt);let Jt;if(ct.virtual){const pe=l.getCellByContainerId(ct.containerId),ni=c+wt;let $e=pe.col+pe.colSpan-1;$e>d&&($e=d);const bn=$e-ni+1;bn>1&&(E[`${Bt}_colSpan`]=bn);const Ir=h+pt;let nr=pe.row+pe.rowSpan-1;nr>C&&(nr=C);const Nn=nr-Ir+1;Nn>1&&(E[`${Bt}_rowSpan`]=Nn),Jt=Xo()}else{if(Jt=fC(n.editorBlocks,v,Bt),ct.col+ct.colSpan>d+1){const pe=d-ct.col+1;pe>1&&(E[`${Bt}_colSpan`]=pe)}else ct.colSpan>1&&(E[`${Bt}_colSpan`]=ct.colSpan);if(ct.row+ct.rowSpan>C+1){const pe=C-ct.row+1;pe>1&&(E[`${Bt}_rowSpan`]=pe)}else ct.rowSpan>1&&(E[`${Bt}_rowSpan`]=ct.rowSpan)}const{root:ce,...Oe}=Jt.blocks;R={...R,...Oe,[Bt]:ce}})});const M=kd(fn(i)).slice(c,d+1),U=it(),V=o,nt=$V(s,A);return{blocks:{root:[{id:U,type:V,children:A,colsWidth:M,rows:C-h+1,cols:d-c+1,...nt,...E}],...R},meta:{},comments:{}}}const jV=D("ajust-selection-pos");function zV(n,t){if(t.top===0)return!0;for(let e=t.left;e<=t.right;e++)if(n[t.top-1][e]===n[t.top][e])return!1;return!0}function GV(n,t){if(t.left===0)return!0;for(let e=t.top;e<=t.bottom;e++)if(n[e][t.left-1]===n[e][t.left])return!1;return!0}function WV(n,t){if(t.bottom===n.length-1)return!0;for(let e=t.left;e<=t.right;e++)if(n[t.bottom][e]===n[t.bottom+1][e])return!1;return!0}function qV(n,t){if(t.right===n[0].length-1)return!0;for(let e=t.top;e<=t.bottom;e++)if(n[e][t.right]===n[e][t.right+1])return!1;return!0}function XV(n,t,e){const r=t.col,i=t.row,o=e.col,s=e.row,l={left:r,top:i,right:o,bottom:s};let c=!1;do{if(c=!1,!zV(n,l)){l.top--,c=!0;continue}if(!GV(n,l)){l.left--,c=!0;continue}if(!WV(n,l)){l.bottom++,c=!0;continue}if(!qV(n,l)){l.right++,c=!0;continue}}while(c);return l}function YV(n,t,e,r){if(e.custom!==void 0||r.custom!==void 0)return{anchor:e,focus:r};const i=Kt.fromBlock(t),o=i.map(V=>V.containerId),s=i.getCellByContainerId(e.childContainerId),l=i.getCellByContainerId(r.childContainerId),c=Math.min(s.row,l.row),d=Math.max(s.row,l.row),h=Math.min(s.col,l.col),C=Math.max(s.col,l.col),E=XV(o,{row:c,col:h},{row:d,col:C}),A=i.getCell({row:E.top,col:E.left}),v=i.getCell({row:E.bottom,col:E.right}),R=i.getCell({row:E.top,col:E.right}),S=i.getCell({row:E.bottom,col:E.left});let M,U;return s.row<=l.row?s.col<=l.col?(M=A,U=v):(M=R,U=S):s.col<l.col?(M=S,U=R):(M=v,U=A),jV.debug(`move ${M.col}, ${M.row}, -> ${U.col}, ${U.row}`),{anchor:Ue(t,M.containerId),focus:Ue(t,U.containerId)}}function yR(n,t,e){if(e.isSimple())return[fn(t).getBoundingClientRect()];const r=fn(t),i=r.getBoundingClientRect(),{fromCol:o,fromRow:s,toCol:l,toRow:c}=wi(t,e.start,e.end),d=kd(r),h=d.slice(0,o).reduce((R,S)=>R+S,0),C=h+d.slice(o,l+1).reduce((R,S)=>R+S,0),E=aR(r);let A=E.slice(0,s).reduce((R,S)=>R+S,0);const v=A+E.slice(s,c+1).reduce((R,S)=>R+S,0);if(s===0){const R=TV(n,t);A-=R}return[new DOMRect(i.left+h,i.top+A,C-h,v-A)]}D("table-size");const QV=40;function hg(n){const t=n.querySelector("td");if(!t)return 0;const e=window.getComputedStyle(t),r=Number.parseInt(e.borderLeft,10),i=Number.parseInt(e.borderRight,10);return(r+i)/2}function JV(n,t,e){const r=x1(n,e.container);return r!==void 0?r+hg(t):QV*e.colSpan-hg(t)}function ZV(n,t,e,r){let i=0;const o=e.colCount;for(let s=0;s<o;s++){const l=e.getCell({col:s,row:r});if(l.virtual)continue;let c=JV(n,t,l);const d=f3(l.container,{withPadding:!0});d&&d>c&&(c=d),i+=c+hg(t)}return i}function t$(n,t){const e=fn(t),r=Kt.fromTable(e);let i=0;for(let s=0;s<r.rowCount;s++)i=Math.max(i,ZV(n,e,r,s));const o=hg(e);return i+=o,i}const ss=D("table-creator");async function e$(n,t){return n.undoManager.runInGroup(()=>{var d,h;const e=t.item,r=(d=e.colCount)!=null?d:5,i=(h=e.rowCount)!=null?h:3,o=KV(n,{cols:r,rows:i});if(!o)return null;const{blockData:s,focusBlockId:l}=o,c=n.insertBlock(t.containerId,t.blockIndex,s,Ie(n,l,0));return n.focus(),c})}class n${constructor(){m(this,"id","insert-table");m(this,"name","Create table");m(this,"element");m(this,"closeable",null);m(this,"colCount");m(this,"rowCount");m(this,"setCloseable",t=>{this.closeable=t});m(this,"destroy",()=>{this.closeable=null});m(this,"getTableCreatorCellId",(t,e)=>`table-creator-cell-${t}-${e}`);m(this,"handleTableCreatorClick",t=>{var E,A;t.preventDefault(),t.stopPropagation();const e=t.target;p(ss,e instanceof HTMLElement,"invalid event target");const r=e.closest(".table-creator");p(ss,r,"no table creator");const i=r.querySelectorAll(".active");if(i.length===0)return;const s=i[i.length-1].id;p(ss,s,"no cell id");const l="table-creator-cell-";if(!s.startsWith(l))return;const d=s.substring(l.length).split("-");p(ss,d.length===2,"invalid cell id");const h=Number.parseInt(d[0],10)+1,C=Number.parseInt(d[1],10)+1;ss.debug(`${h}, ${C}`),this.colCount=C,this.rowCount=h,(E=this.closeable)==null||E.click(this,this.element),(A=this.closeable)==null||A.close("clickItem"),this.handleTableCreatorLeave()});m(this,"handleTableCreatorLeave",()=>{for(let t=0;t<9;t++)for(let e=0;e<9;e++){const r=this.getTableCreatorCellId(t,e),i=document.getElementById(r);i&&ut(i,"active")}});m(this,"handleTableCreatorCellEnter",t=>{const e=t.target;p(ss,e instanceof HTMLElement,"invalid event target");const r=e.id,i="table-creator-cell-";p(ss,r.startsWith(i),"invalid cell id");const s=r.substring(i.length).split("-");p(ss,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 d=0;d<9;d++)for(let h=0;h<9;h++){const C=this.getTableCreatorCellId(d,h),E=document.getElementById(C);p(ss,E,"no cell"),d<=l&&h<=c?q(E,"active"):ut(E,"active")}});this.element=this.createTableCreatorElement()}createTableCreatorElement(){const t=B("div",["table-creator"],null),e=(r,i,o)=>{const s=B("div",["table-creator-cell"],r);return s.id=this.getTableCreatorCellId(i,o),s};t.addEventListener("click",this.handleTableCreatorClick),t.addEventListener("mouseleave",this.handleTableCreatorLeave);for(let r=0;r<9;r++){const i=B("div",["table-creator-row"],t);for(let o=0;o<9;o++)e(i,r,o).addEventListener("mouseenter",this.handleTableCreatorCellEnter)}return t}}function r$(){return new n$}function i$(n){const t=/[\u4e00-\u9fff\u3040-\u309f\u30a0-\u30ff\uac00-\ud7af]/g,e=n.match(t);return e?e.length:0}function TR(n){const t=i$(n);return n.length+t}function o$(n,t,e=[]){let r=0;if(!e||e.length===0)return r;for(let i=n;i<n+t;i+=1)r+=e[i]||0;return r}function s$(n,t){const e=TR(n),r=t-e;return r>0?n+" ".repeat(r):n}function l$(n,t,e,r,i){var l;const o=t,s=new Um(o);if(r==="markdown"||r==="text"){const c=M=>e.blocks[M].map((nt,Y)=>r==="markdown"?W0(n,nt,e,[...i,{containerId:M,blockIndex:Y}]):G0(n,nt,e,[...i,{containerId:M,blockIndex:Y}])),d=M=>c(M).join(" ").replace(/\n/g," ").trim(),h=new Map,C=new Map;for(let M=0;M<s.colCount;M++){let U=0;for(let V=0;V<s.rowCount;V++){const nt=s.getCell({row:V,col:M});let Y="";nt.virtual||(Y=d(nt.containerId)),h.set(`${V},${M}`,Y),U=Math.max(U,TR(Y))}C.set(M,U)}const E=M=>{const U=h.get(`${M.row},${M.col}`)||"",V=C.get(M.col)||0;return s$(U,V)};if(r==="text"){const M=[];for(let U=0;U<s.colCount;U++){const V=E({row:0,col:U});M.push(V)}for(let U=1;U<s.rowCount;U++)for(let V=0;V<s.colCount;V++){const nt=E({row:U,col:V});M.push(nt)}return M.join(`
646
646
  `)}const A=[];let v="|",R="|";for(let M=0;M<s.colCount;M++){const U=E({row:0,col:M});v+=` ${U} |`;const V="-".repeat((C.get(M)||0)+2);R+=`${V}|`}A.push(v),A.push(R);for(let M=1;M<s.rowCount;M++){let U="|";for(let V=0;V<s.colCount;V++){const nt=E({row:M,col:V});U+=` ${nt} |`}A.push(U)}return`${A.join(`
647
647
  `)}
648
648
  `}if(r==="html"){const c=C=>e.blocks[C].map((v,R)=>eC(n,v,e,[...i,{containerId:C,blockIndex:R}])).join(`
@@ -725,7 +725,7 @@ ${s}
725
725
  `}})}class NG{constructor(t){m(this,"_grid",[]);m(this,"_needFixSpanData",!1);Array.from(t.rows).forEach((e,r)=>{Array.from(e.cells).forEach(i=>{this._addCell(r,i)})})}_addCell(t,e){const r=this._getNextColIndex(t),i=e.colSpan,o=e.rowSpan;for(let s=0;s<o;s++)for(let l=0;l<i;l++){const c=t+s,d=r+l;if(this._getCell({row:c,col:d})){this._needFixSpanData=!0,console.warn(`invalid table data, cell data already exists, ${c}, ${d}`);continue}this._setCell({row:c,col:d},{cell:e,virtual:!(l===0&&s===0)})}}_getNextColIndex(t){const e=this._grid[t];if(!e)return 0;let r=0;for(let i=0;i<e.length;i++)if(e[i])r+=1;else return r;return r}_setCell(t,e){if(!(e.cell.colSpan===0||e.cell.rowSpan===0)){for(;this._grid.length<=t.row;)this._grid.push([]);for(let r=0;r<this._grid.length;r++){const i=this._grid[r];for(;i.length<=t.col;)i.push(null)}this._grid[t.row][t.col]=e}}_getCell(t){var r;const e=this._grid[t.row];return e&&(r=e[t.col])!=null?r:null}get rowCount(){return this._grid.length}get colCount(){return this._grid[0].length}getCellData(t){const e=this._getCell(t);return e||null}getCellSpan(t){const e=this._getCell(t);if(!e)return{colSpan:1,rowSpan:1};if(e.virtual)return{colSpan:1,rowSpan:1};const r=()=>{let l=t.col+1;for(;;){const c=this._getCell({row:t.row,col:l});if(!c||c.cell!==e.cell)return l-t.col;l+=1}},i=()=>{let l=t.row+1;for(;;){const c=this._getCell({row:l,col:t.col});if(!c||c.cell!==e.cell)return l-t.row;l+=1}},o=r(),s=i();return o!==e.cell.colSpan&&console.warn(`invalid colSpan: ${o} -> ${e.cell.colSpan}`),s!==e.cell.rowSpan&&console.warn(`invalid rowSpan: ${s} -> ${e.cell.rowSpan}`),{colSpan:o,rowSpan:s}}getColumnWidth(t){const i=Array(this.rowCount).fill(0).map((s,l)=>{const c=this.getCellData({row:l,col:t});if(c&&!c.virtual){const d=c.cell.getAttribute("width")||c.cell.style.width;if(d){if(d.endsWith("%")){const C=d.substr(0,d.length-1),E=Number.parseInt(C,10);if(E>0&&E<=100)return Math.floor(720*E/100)}const h=Number.parseInt(d,10);if(h)return h}return c.cell.getBoundingClientRect().width}return 1e9}),o=Math.min(...i);return o===1e9||Number.isNaN(o)||o<30?0:o}}function PG(n){return new NG(n)}function Lw(n,t){var c;const e=PG(n),r=[],i={},o=e.rowCount,s=e.colCount,l=Array(s).fill(100);for(let d=0;d<o;d++)for(let h=0;h<s;h++){let C;const E=e.getCellData({row:d,col:h});if(E&&E.virtual)continue;E&&!E.virtual&&(C=t.htmlToBlocks(E.cell.innerHTML.trim(),t)),(!C||C.length===0)&&(C=[{id:it(),type:"text",text:[]}]);const A=it();r.push(A);const{colSpan:v,rowSpan:R}=e.getCellSpan({row:d,col:h});R>1&&(i[`${A}_rowSpan`]=R),v>1&&(i[`${A}_colSpan`]=v),t.doc.blocks[A]=C,E&&!E.virtual&&(l[h]=Math.max(l[h],Rw((c=t.font)!=null?c:"",C)))}for(let d=0;d<e.colCount;d++)l[d]=e.getColumnWidth(d)||l[d];return r.length===0?[]:[{cols:e.colCount,rows:e.rowCount,id:it(),type:"table",children:r,...i,colsWidth:l}]}function Iw(n,t){var e;if(n.tagName==="TABLE"){const r={blocks:{root:[]},meta:{},comments:{}},i=Lw(n,{doc:r,...t});if(i.length===0||((e=i[0].children)==null?void 0:e.length)===0)return;r.blocks.root=i;const o=JSON.stringify(r),s=Wi(o),l=document.createElement("div");l.classList.add("highlight-text-wizdoc");const c=document.createElement("pre");l.appendChild(c),c.innerText=s,n.insertAdjacentElement("beforebegin",l),n.remove();return}Array.from(n.children).forEach(r=>Iw(r,t))}function Dw(n){if(n instanceof HTMLStyleElement){n.remove();return}Array.from(n.children).forEach(Dw)}function _w(n){if(n instanceof HTMLElement){if(n.style.display==="none"){n.remove();return}if(n.style.visibility==="hidden"){n.remove();return}}Array.from(n.children).forEach(_w)}function FG(n,t){const e=C0(n);return e.querySelectorAll("td.js-line-number").forEach(i=>i.remove()),e.querySelectorAll("div.copy-button").forEach(i=>i.remove()),e.querySelectorAll("div.code-copy-button").forEach(i=>i.remove()),e.querySelectorAll("noscript").forEach(i=>i.remove()),Array.from(e.children).forEach(_w),Array.from(e.children).forEach(i=>Iw(i,t)),Array.from(e.children).forEach(Dw),Sw(e),fv(e)}const mo=new T9.default;mo.use(SG),mo.use(LG),mo.use(IG),mo.use(DG),mo.use(_G),mo.use(MG),mo.use(UG),mo.use(OG),mo.use(h9.gfm);function KG(n,t){const e=Mw(n,t);if(!e)return[];const{root:r,...i}=e.blocks;return t.doc.blocks={...t.doc.blocks,...i},r}function Mw(n,t){let e=n;const r=new DOMParser().parseFromString(n,"text/html").querySelectorAll("meta");if(r.length&&Array.from(r).some(o=>o.getAttribute("content")==="PowerPoint.Slide")){const o=n.indexOf("<!--StartFragment-->"),s=n.indexOf("<!--EndFragment-->");o!==-1&&s!==-1&&(e=n.substring(o+20,s))}const i=mo.turndown(e);return zA(i,{htmlToDoc:o=>Uw(o,t)})}function Uw(n,t){const e=FG(n,{font:t==null?void 0:t.font,htmlToBlocks:KG});return Mw(e)}function Ow(n){return n.indexOf('xmlns:o="urn:schemas-microsoft-com:office:office"')!==-1}function GA(n){return["A","B","DEL","I","U","S","SPAN","SUB","SUP","FONT","BR"].indexOf(n.tagName)!==-1}function VG(n){return["P","H1","H2","H3","H4","H5","H6","H7","H8","LI"].indexOf(n.tagName)!==-1}function Nw(n){return n.replace(/\r\n\s*/g,"").replace(/\n\s*/g,"").replace(/\r\s*/g,"")}function $G(n){if(!n.tagName)return!1;if(n.tagName.toLocaleLowerCase()==="img")return!0;const t=n.querySelectorAll("img");for(let e=0;e<t.length;e+=1){const r=t[e];if(!r.src||r.getAttribute("width")==="0"||r.getAttribute("height")==="0")return!1}return t.length}function HG(n){return(n.tagName.toLocaleLowerCase()==="img"?[n]:Array.from(n.querySelectorAll("img"))).map(i=>({id:it(),type:"embed",embedType:"image",embedData:{src:i.src,width:i.width,height:i.height}}))}function Pw(n){var e;return Array.from(((e=n.getAttribute("style"))!=null?e:"").split(" ")).findIndex(r=>r.startsWith("level"))!==-1}function jG(n){var e;const t=Array.from(((e=n.getAttribute("style"))!=null?e:"").split(" "));for(let r=0;r<t.length;r++){const i=t[r];if(i.startsWith("mso-list:"))return i}return""}function Fw(n){var e,r;const t=Array.from(((e=n.getAttribute("style"))!=null?e:"").split(" "));for(let i=0;i<t.length;i++){const o=t[i];if(o.startsWith("level")){const s=(r=Number.parseInt(o.substring(5),10))!=null?r:void 0;if(s)return s}}return 1}function zG(n,t){n.setAttribute("data-group-id",t)}function GG(n){const t={},e=i=>{Array.from(Object.keys(t)).forEach(o=>{Number.parseInt(o,10)>i&&delete t[o]})};let r="";Array.from(n.children).forEach(i=>{if(Pw(i)){const o=jG(i);r!==o&&(e(0),r=o);const s=Fw(i);e(s);let l=t[`${s}`];l||(l=it(),t[`${s}`]=l),zG(i,l)}})}function Kw(n){const t=n.querySelector('[style="mso-list:Ignore"]');if(t){const e=t.innerText;return e&&e.trim()!=="-"}return!0}function WG(n){var r;if(!Kw(n))return 1;const e=n.querySelector('[style^="mso-list:Ignore"]');if(e){const i=e.innerText;if(i)return(r=Number.parseInt(i,10))!=null?r:1}return 1}function Vw(n){if(!Pw(n))return{};const t=Fw(n),e=n.getAttribute("data-group-id")||it();return{start:WG(n),level:t,groupId:e,ordered:Kw(n),type:"list"}}const qG=D("office-list");function $w(n){return n instanceof HTMLOListElement||n instanceof HTMLUListElement}function XG(n,t){p(qG,$w(n),"not list group element");let e=!1,r=1;const i=it();n instanceof HTMLOListElement&&(e=!0,r=n.start);const o=n,s=[];let l=1;return Array.from(o.children).forEach(c=>{if(c instanceof HTMLLIElement){Vw(c);const h=t.textElementToBlocks(c,t),C=h[0];s.push({...C,type:"list",ordered:e,level:l,groupId:i,start:r}),r+=1,s.push(...h.slice(1));return}const d=t.blockElementToBlocks(c,t);s.push(...d)}),s}function Hw(n,t){if(n.nodeName==="META")return[];if(n instanceof HTMLTableElement)return Lw(n,t);if($w(n))return[...XG(n,t)];if($G(n))return[...HG(n)];if(VG(n))return[...t.textElementToBlocks(n,t)];if(!n.children)return[];const e=[];return Array.from(n.children).forEach(r=>{const i=Hw(r,t);e.push(...i)}),e}function jw(n,t){const e=[];return n.forEach(r=>{var i;if(r instanceof Element)if(GA(r)){const o=document.createElement("p");o.appendChild(r);const s=t.blockElementToBlocks(o,t);e.push(...s)}else{const o=t.blockElementToBlocks(r,t);e.push(...o)}else if(r instanceof Text){const o=eo(Nw((i=r.textContent)!=null?i:""));e.push(o)}}),e}function zw(n){return n instanceof Element?GA(n):n.nodeType===Node.TEXT_NODE}function YG(n){var t;return n.nodeType===Node.TEXT_NODE&&((t=n.textContent)==null?void 0:t.trim())===""}function Gw(n){const t=Array.from(n.childNodes);for(let e=0;e<t.length;e++){const r=t[e];if(!zw(r))continue;let i=e+1;for(;i<t.length&&zw(t[i]);)i+=1;if(YG(r)&&i===e+1)continue;const o=document.createElement("p");r instanceof Element?r.insertAdjacentElement("beforebegin",o):n.insertBefore(o,r);for(let s=e;s<i;s++)o.appendChild(t[s]);e=i-1}}function QG(n,t){const e=C0(n);return Gw(e),jw(Array.from(e.childNodes),t)}function JG(n){if(!(n instanceof HTMLElement))return{};const t={};if(n.style.textAlign==="right"?t.align="right":n.style.textAlign==="center"&&(t.align="center"),n.style.marginLeft){const e=Math.ceil(Number.parseInt(n.style.marginLeft,10)/20);e>=1&&e<=12&&(t.padding=e)}return t}function ZG(n,t){return t&&Object.keys(t).length>0?{insert:n,attributes:t}:{insert:n}}function tW(n,t){if(n.nodeName==="B")return{...t,"style-bold":!0};if(n.nodeName==="I")return{...t,"style-italic":!0};if(n.nodeName==="U")return{...t,"style-underline":!0};if(n.nodeName==="S"||n.nodeName==="DEL")return{...t,"style-strikethrough":!0};if(n.nodeName==="SUB")return{...t,"style-sub":!0};if(n.nodeName==="SUP")return{...t,"style-super":!0};if(n.nodeName==="BR")return{...t,created:Date.now(),id:it(),box:!0,type:"br"};if(n.nodeName==="A"&&n.href){const r=n.href;if(r.startsWith("http:")||r.startsWith("https:"))return{...t,link:n.href}}const e={...t};return n instanceof HTMLSpanElement?(n.style.backgroundColor&&(e["inline-style-background-color"]=n.style.backgroundColor),n.style.color&&(e["inline-style-color"]=n.style.color),n.style.fontSize&&(e["inline-style-font-size"]=n.style.fontSize),n.style.fontFamily&&(e["inline-style-font-family"]=n.style.fontFamily),e):t}function Ww(n,t,e){var i;if(n instanceof HTMLSpanElement&&n.getAttribute("style")==="mso-list:Ignore")return;const r=tW(n,t);if(n instanceof Text&&n.nodeValue||n.nodeName==="BR"){const o=Nw((i=n.nodeValue)!=null?i:" ");o&&e.push(ZG(o,r));return}n.childNodes.length>0&&Array.from(n.childNodes).forEach(o=>{Ww(o,r,e)})}function qw(n){return n instanceof Element?GA(n):!0}function WA(n){return!qw(n)}function eW(n){if(n.length===0)return[];if(n.length===1)return[n];const t=[];let e=[n[0]],r=WA(n[0]);for(let i=1;i<n.length;i++){const o=n[i];r===WA(o)?e.push(o):(t.push(e),e=[o],r=WA(o))}return t.push(e),t}function nW(n,t){const e={};if(n.tagName.startsWith("H")){const o=Number.parseInt(n.tagName.substr(1),10);o>=1&&o<=8&&(e.heading=o)}const r=eW(Array.from(n.childNodes)),i=[];return r.forEach((o,s)=>{if(qw(o[0])){const l=[],c={};Array.from(n.childNodes).forEach(h=>{Ww(h,c,l)});let d={};s===0&&(d=Vw(n)),i.push({id:it(),type:"text",text:l,...d,...e,...JG(n)})}o.forEach(l=>{const c=t.blockElementToBlocks(l,t);i.push(...c)})}),i}function rW(n,t){const e=C0(n);GG(e),Gw(e);const r={blocks:{root:[]},meta:{},comments:{}},i={font:t==null?void 0:t.font,doc:r,blockElementToBlocks:Hw,textElementToBlocks:nW,htmlToBlocks:QG},o=jw(Array.from(e.children),i);if(o.length!==0)return r.blocks.root=o,r}const iW=D("html-to-doc");function Xw(n,t){if(!n)return null;const e=tG(n);if(e)return e;if(Ow(n)){const r=rW(n,t);if(r)return r}try{return Uw(n,t)}catch(r){iW.error(r)}return null}class oW{async fromData(t,e){const r={},i=e.getData("text/html");if(i){const o=Xw(i,{font:t.rootContainer});o&&(Ow(i)?r["text/office-html"]=o:r["text/html"]=o)}return r}}class sW{async fromData(t,e){const r=e.getData("text/plain");if(!r)return;const i=zA(r,{font:t.rootContainer,htmlToDoc:Xw});if(!!i)return{"text/markdown":i}}}function lW(n){return/^([\d\w\u4e00-\u9fa5\s]*[\u4e00-\u9fa5\s]{1}|)((https|http|ftp)?:\/\/)[^\s]+/.test(n)}function aW(n){const t=[],e=n.split(/https|http|ftp/)[0],r=n.substring(e.length).trim();if(e&&e.length){const o=Xr(e,null);t.push(o,Xr(" ",null))}const i=Xr(r,{link:r});return t.push(i,Xr(" ",null)),t}class cW{async fromData(t,e,r){const{toPlainText:i=!1}=r||{},o={},s=e.getData("text/plain");if(s){const d={blocks:{root:s.replace(/\r\n/g,`
726
726
  `).replace(/\r/g,`
727
727
  `).split(`
728
- `).map(h=>{const C={id:it(),type:"text"};if(lW(h)&&!i)return C.text=aW(h),C;const E=h?[Xr(h,null)]:[];return C.text=E,C})},meta:{},comments:{}};o["text/plain"]=d}return o}}function uW(n){const t=[];for(let e=0;e<n.length;e++){const r=n[e];r.type.toLocaleLowerCase().startsWith("image/")&&t.push(r)}return t}class qA{constructor(t){t.dataConverter.addConverter(new oW),t.dataConverter.addConverter(new cW),t.dataConverter.addConverter(new sW)}async handleBeforePaste(t,e,r,i){if(!e)return!1;const o=e.clipboardData;if(o){if(o.getData("text/html").indexOf("<ones-editor-doc")>0)return!1;const l=uW(i);if(l.length>0&&!r["text/office-html"])return await this.handleInsertImages(t,l),!0}return!1}async handleInsertImages(t,e){const{start:r,end:i}=t.selection.range,o=t.selection.focusedBlock;let s=at(o),c=Rt(o);const d=et(s);if(d&&Ot(d)==="code")return;if(r.blockId===i.blockId&&Le(o))c+=1;else{t.clearSelectedContents();const{blockId:C}=t.selection.range.start,E=t.getBlockById(C);c=Rt(E),s=at(E),Be(t,E)||(c+=1),ie(s)&&c===0&&(c+=1)}const h=Et(s);for(let C=0;C<e.length;C++){const E=e[C],A=await C1(t,"image",h,c+C,{file:E});A&&t3(t,A,"image",{id:"replace-image",name:"Replace image",data:{block:A,image:E}})}}}class fW extends je.TypedEmitter{constructor(t){super(),this.editor=t}onUpdateBlockText(t,e,r){const i=this.editor.getCustom("find-dialog");if(!i||!i.isVisible())return;const o=Js(pi(this.editor,t),e);!st(this.editor,o)||!r.some(l=>l.insert||l.delete)||this.emit("onDocChanged",o)}onInsertBlock(t,e,r,i){const o=this.editor.getCustom("find-dialog");!o||!o.isVisible()||this.emit("onDocInserted")}onDeleteBlock(t,e,r){const i=Js(pi(this.editor,t),e),o=this.editor.getCustom("find-dialog");!o||!o.isVisible()||this.emit("onDocDeleted",i)}}function Yw(n){return me.isSafari&&!!n&&Date.now()-n<100}const Qw=D("highlight-data");class Rg{constructor(t){m(this,"data",new Map);this.editor=t}add(t,e,r){const i={id:it(),blockId:dt(t),oldText:this.editor.getBlockText(t),start:e,end:r};return this.data.set(i.id,i),i}get(t){const e=this.data.get(t);return p(Qw,e,`no highligh data: ${t}`),e}remove(t){this.data.delete(t)}clearBlockData(t){Array.from(this.data.values()).forEach(e=>{e.blockId===t&&this.data.delete(e.id)})}destroy(){}static getData(t){return t.addCustom("highligh-data",()=>new Rg(t))}}function dW(n,t,e,r,i){const s=Rg.getData(n).add(t,e,r);return i.setAttribute("data-highlight-id",s.id),s}function wg(n,t){const e=t.getAttribute("data-highlight-id");return p(Qw,e,"invalid highlight elem, no id"),Rg.getData(n).get(e)}const Ia=D("highligh-dom");function hW(n){return Mt(n,"editor-highlight")}function ls(n){const t=n.rootContainer.querySelectorAll(".editor-highlight");return Array.from(t)}function mW(n,t){p(Ia,t,"invalid block");const e=t.querySelectorAll(".editor-highlight");return Array.from(e)}function gW(n){const t=n.rootContainer.querySelectorAll(".editor-replace-result-highlight");return Array.from(t)}function Sg(n){const t=n.querySelectorAll(".editor-highlight");return Array.from(t)}function pW(n){Sg(n).forEach(t=>{t.remove()})}function Jw(n){return ls(n).length}function kl(n){const t=n.rootContainer.querySelectorAll(".editor-highlight");return Array.from(t).map(r=>{const i=Mt(r,"editor-highlight-box")?"box":"text";return{ele:r,type:i}})}function CW(n,t){p(Ia,t>=0,`invalid highlight index: ${t}`);const e=ls(n);return e.length===0?null:(p(Ia,t<e.length,`invalid highlight index: ${t}/${e.length}`),e[t])}function EW(n,t,{left:e,top:r,width:i,height:o},s){const l=["editor-highlight-child"];s&&l.push("editor-highlight-readonly");const c=B("div",l,n);c.style.top=`${r}px`,c.style.left=`${e}px`,c.style.width=`${i}px`,c.style.height=`${o}px`}function Zw(n,t,e,r,i){p(Ia,r>0,`invalid end: ${r}`);const o=ve(t),s=t.getBoundingClientRect(),l=Vo(n,t,Ie(n,t,e,r)),c=i==="find"?["editor-highlight"]:["editor-replace-result-highlight"],d=Uf(t,r),{prev:h}=d;h||p(Ia,!1,"invalid offset, no prev child at offset"),yr(h)&&c.push("editor-highlight-box");const C=B("div",c,o);l.forEach(E=>{EW(C,t,{left:E.left-s.left,width:E.width,top:E.top-s.top,height:E.height})}),dW(n,t,e,r,C)}function AW(n,t,e,r){return Zw(n,t,e,r,"find")}function t4(n,t,e,r){return Zw(n,t,e,r,"replace")}function Lg(n,t){ls(n).forEach(s=>{Mt(s,"active")&&ut(s,"active")}),q(t,"active"),p(Ia,t.firstChild instanceof HTMLElement,"invalid highligh dom, invalid elem child");const r=t.firstChild;let o=r.getBoundingClientRect().y;o===0&&(o=r.getBoundingClientRect().y),jf(n,r,{animation:!0})}function Qd(n){const t=n.rootContainer.querySelector(".editor-highlight.active");return t||null}function e4(n){return p(Ia,n,"no highlight elem"),Mt(n,"editor-highlight-readonly")}const wu=D("highligh-text");function n4(n){gW(n).forEach(e=>{e.remove()})}function Ig(n,t){ls(n).forEach(r=>{r.remove()}),t!=null&&t.keepReplaceResult||n4(n)}function r4(n,t,e){mW(n,t).forEach(i=>{i.remove()}),e!=null&&e.keepReplaceResult||n4(n)}function Jd(n){const t=Qd(n);if(!t)return-1;const r=ls(n).indexOf(t);return p(wu,r!==-1,`invalid highlight index: ${r}`),r}function xW(n){const t=ls(n);if(t.length===0)return 0;const e=Qd(n);let r=e?t.indexOf(e):-1;!e||r===-1||r===t.length-1?r=0:r+=1;const i=t[r];return Lg(n,i),r}function bW(n){const t=ls(n);if(t.length===0)return 0;const e=Qd(n);let r=e?t.indexOf(e):-1;!e||r===-1||r===0?r=t.length-1:r-=1;const i=t[r];return Lg(n,i),r}function XA(n,t){const e=ls(n);e.length>0&&t<e.length&&Lg(n,e[t])}function vW(n,t,e){const r=Qd(n);if(!r)return!1;const i=et(r);if(p(wu,i,"no parent block"),!n.isBlockWritable(i))return!1;const o=Jw(n);let s=Jd(n);if(!e4(r)&&n.isBlockWritable(i)){const d=wg(n,r),h=n.getBlockText(i),{start:C,end:E}=wg(n,r),[A,v]=zn.transformOffset(d.oldText,h,[C,E]),R=Q3(h,A,v-A);if(Re(R).toLowerCase()!==t.toLowerCase())return!1;const S=P0(h,A,v,e);n.setBlockText(i,S),pW(i),YA(n,i,t),e&&t4(n,i,A,A+e.length)}const l=Jw(n);s>=l?s=0:l>o&&(s+=1);const c=CW(n,s);return c&&Lg(n,c),!0}function BW(n,t,e,r){if(!st(n,t)||!n.isBlockWritable(t))return 0;const i=n.getBlockText(t);p(wu,i,"no block text");const o={count:0},s=X5(n,i,e,r,o);return Re(i)===Re(s)?0:(n.setBlockText(t,s),o.count)}function yW(n,t,e){if(p(wu,hW(t),"not a highlight elem"),e4(t))return;p(wu,e>0,"invalid highlight length");const r=wg(n,t),i=et(t);p(wu,i,"no parent block"),t4(n,i,r.start,r.start+e)}function TW(n,t){kl(n).forEach(r=>{r.type!=="box"&&yW(n,r.ele,t)})}function kW(n,t,e){if(n.readonly)return 0;const r=o=>{let s=0;return ke(o).forEach(c=>{Pt(n,c)?_n(n,c).forEach(h=>{s+=r(h)}):s+=BW(n,c,t,e)}),s},i=r(n.rootContainer);return e.length>0&&TW(n,e.length),i}function RW(n){const t=n.selection.range.end,e=n.getBlockById(t.blockId),r=t.isSimple()?t.offset:1,i=Sg(e);for(let l=0;l<i.length;l++){const c=i[l],{end:d}=wg(n,c);if(d>=r)return c}const o=w1(n,{simpleBlockOnly:!0}),s=o.indexOf(e);if(s===-1)return null;for(let l=s+1;l<o.length;l++){const c=o[l],d=Sg(c);if(d.length>0)return d[0]}return null}function wW(n){const t=ls(n),e=RW(n);return e?t.indexOf(e):0}function YA(n,t,e){if(!!e&&st(n,t)){const r=n.getBlockText(t),i=vC(n,r,e);i.length>0&&i.forEach(({start:o,end:s})=>{AW(n,t,o,s)})}}function i4(n,t){if(Ig(n),!t)return;w1(n,{simpleBlockOnly:!0,visibleOnly:!0}).forEach(r=>{YA(n,r,t)})}class o4{constructor(t){m(this,"dialog",null);m(this,"root");m(this,"oldText","");m(this,"_compositionEndTime",0);m(this,"components");m(this,"handleFindChanged",()=>{this.doSearch({keepReplaceResult:!1,gotoFirstSearchResult:!0})});m(this,"handleCompositionEnd",()=>{this._compositionEndTime=Date.now(),this.handleFindChanged()});m(this,"handleDocChanged",t=>{setTimeout(()=>{if(xf(t))return;r4(this.editor,t),YA(this.editor,t,this.components.findInput.value);const e=kl(this.editor),r=e.length;t.querySelectorAll(".editor-highlight").length===r&&XA(this.editor,0);const i=Jd(this.editor);i!==-1&&this.updateSearchStatus(i,e)})});m(this,"handleDocInserted",()=>{const t=setTimeout(()=>{clearTimeout(t),Ig(this.editor,{keepReplaceResult:!0}),i4(this.editor,this.components.findInput.value);const e=Jd(this.editor);if(e!==-1){const r=kl(this.editor);this.updateSearchStatus(e,r),XA(this.editor,e)}})});m(this,"handleDocDeleted",t=>{const e=setTimeout(()=>{if(!Sg(t).length){clearTimeout(e);return}r4(this.editor,t);const i=Jd(this.editor);if(i!==-1){const o=kl(this.editor);this.updateSearchStatus(i,o)}})});m(this,"handleInput",t=>{if(t.isComposing||Yw(this._compositionEndTime)){this.doSearch.cancel();return}this.handleFindChanged()});m(this,"handleFind",()=>{this.findNext({keepSearchResult:!1})});m(this,"handleReplace",()=>{const t=this.components.findInput.value;if(!t||!Qd(this.editor))return;const r=this.components.replaceInput.value;if(t===r)return;if(vW(this.editor,t,r)){const o=Jd(this.editor),s=kl(this.editor);this.updateSearchStatus(o,s)}r.includes(t)&&this.findNext({keepSearchResult:!0})});m(this,"handleReplaceAll",()=>{const t=this.components.findInput.value;if(!t)return;const e=this.components.replaceInput.value;t!==e&&this.editor.undoManager.runInGroup(()=>{kW(this.editor,t,e)>0&&(this.oldText="",this.doSearchNow({keepReplaceResult:!0,gotoFirstSearchResult:!0}))})});m(this,"doSearch",Pe.default(this.doSearchNow,300));m(this,"handleDocumentKeyDown",t=>{p0(t)&&this.hide()});this.editor=t;const e=B("div",["editor-find-dialog"],null),r=B("div",["editor-find-content"],e),i=B("div",["editor-find-dialog-row"],r),o=ea(gd,["editor-find-dialog-button-close"],e),s=B("label",["editor-find-dialog-label"],i,_.t("find.findLabel"));s.htmlFor="";const l=B("div",["editor-find-dialog-input-container"],i),c=B("input",["editor-find-dialog-input"],l);c.type="text",c.placeholder=_.t("find.findPlaceholder");const d=B("div",["editor-find-dialog-status"],l),h=ea(xT,["editor-find-dialog-icon-button"],d),C=B("div",["editor-find-dialog-curr"],d,"0/0"),E=ea(bT,["editor-find-dialog-icon-button"],d);let A;_.t("find.moreButton")?A=B("button",["editor-find-dialog-button"],i,_.t("find.moreButton")):A=ea(tE,["editor-find-dialog-icon-button-border"],i);const v=B("div",["editor-find-dialog-row"],r),R=B("label",["editor-find-dialog-label"],v,_.t("find.replaceLabel"));R.htmlFor="";const S=B("div",["editor-find-dialog-input-container"],v),M=B("input",["editor-find-dialog-input"],S);M.type="text",M.placeholder=_.t("find.replacePlaceholder");const U=B("div",["editor-find-dialog-row","editor-find-dialog-action"],r);B("div",["editor-find-dialog-space"],U);const V=B("button",["editor-find-dialog-button"],U,_.t("find.findButton")),nt=B("button",["editor-find-dialog-button"],U,_.t("find.replaceButton")),Y=B("button",["editor-find-dialog-button","editor-find-dialog-primary-button"],U,_.t("find.replaceAllButton"));A.onclick=()=>{this.showReplace()},o.onclick=()=>{this.hide()},c.onkeydown=ft=>{if(ft.isComposing||Yw(this._compositionEndTime)){this.doSearch.cancel();return}zp(ft)?(this.doSearch.cancel(),this.doSearchNow({keepReplaceResult:!1,gotoFirstSearchResult:!0})):p0(ft)&&this.hide()},c.oninput=this.handleInput,c.onpaste=this.handleFindChanged,c.oncut=this.handleFindChanged,c.addEventListener("compositionend",this.handleCompositionEnd),c.maxLength=50,V.onclick=this.handleFind,nt.onclick=this.handleReplace,Y.onclick=this.handleReplaceAll,M.maxLength=50,E.onclick=()=>{this.gotoNext()},h.onclick=()=>{this.gotoPrev()},this.components={findInput:c,findPrev:h,findCurrent:C,findNext:E,replaceInput:M,findButton:V,replaceButton:nt,replaceAllButton:Y,closeButton:o,showReplaceButton:A,rowReplace:v,rowActions:U,statusContainer:d},this.root=e;const X=new fW(t);t.doc.registerCallback(X),X.addListener("onDocChanged",this.handleDocChanged),X.addListener("onDocInserted",this.handleDocInserted),X.addListener("onDocDeleted",this.handleDocDeleted)}findNext(t){this.doSearch.cancel(),this.doSearchNow({keepReplaceResult:t.keepSearchResult,gotoFirstSearchResult:!0})}doSearchNow(t){const e=this.components.findInput.value;if(e||this.clearFind(t),this.oldText===e){this.gotoNext();return}this.oldText=e,i4(this.editor,e);const r=kl(this.editor),i=wW(this.editor);t.gotoFirstSearchResult&&XA(this.editor,i),this.updateSearchStatus(i,r)}gotoNext(){const t=xW(this.editor),e=kl(this.editor);this.updateSearchStatus(t,e)}gotoPrev(){const t=bW(this.editor),e=kl(this.editor);this.updateSearchStatus(t,e)}updateSearchStatus(t,e){var s;this.oldText?this.components.statusContainer.style.display="flex":this.components.statusContainer.style.display="none";const r=e.length,i=e.filter(l=>l.type==="box").length,o=((s=e[t])==null?void 0:s.type)==="box";if(r-i<=0)r===0?(this.components.findCurrent.innerText="0 / 0",this.components.findButton.disabled=!0):(this.components.findCurrent.innerText=`${t+1} / ${r}`,this.components.findButton.disabled=!1),this.components.replaceAllButton.disabled=!0,this.components.replaceButton.disabled=!0;else{this.components.findCurrent.innerText=`${t+1} / ${r}`;const l=this.editor.readonly;this.components.replaceAllButton.disabled=l,this.components.replaceButton.disabled=l||o,this.components.findButton.disabled=!1}}clearFind(t){Ig(this.editor),this.updateSearchStatus(0,[])}showFindOnly(){this.components.rowReplace.style.display="none",this.components.rowActions.style.display="none",this.components.showReplaceButton.style.display="flex"}showReplace(){this.components.rowReplace.style.display="flex",this.components.rowActions.style.display="flex",this.components.showReplaceButton.style.display="none",this.components.replaceInput.focus(),this.components.replaceInput.select()}hideSearchResult(){this.components.statusContainer.style.display="none"}showSearchResult(){this.components.statusContainer.style.display="flex"}show(t){document.addEventListener("keydown",this.handleDocumentKeyDown);const e=this.editor.getSelectedText();e.length>0&&e.length<50&&(this.components.findInput.value=e),this.root.style.display="flex",t!=null&&t.showFindAndReplace?(this.showReplace(),this.components.findInput.value&&setTimeout(()=>{this.components.replaceInput.focus()})):this.showFindOnly(),this.hideSearchResult(),this.oldText="",this.doSearchNow({keepReplaceResult:!1,gotoFirstSearchResult:!0});const r=this.editor.readonly,i=this.components.findInput.value;this.components.replaceButton.disabled=r||!i,this.components.replaceAllButton.disabled=r||!i,this.components.replaceInput.disabled=r,this.dialog||(this.dialog=new Cd(this.root,{disablePageScroll:!1}));const o=this.editor.options.componentsOptions.findDialog,s=(o==null?void 0:o.popoverTarget)||this.editor.rootContainer,l=()=>{var E,A,v,R;const c=o==null?void 0:o.getReferenceClientRect;if(c&&((A=(E=this.dialog)==null?void 0:E.tippyInstance)==null?void 0:A.popper))return c(s,(R=(v=this.dialog)==null?void 0:v.tippyInstance)==null?void 0:R.popper);const d=s.getBoundingClientRect(),h=d.top<0?12:d.top+12,C=d.right-this.root.clientWidth-12;return new DOMRect(C,h,0,0)};this.dialog.show(s,{getReferenceClientRect:l}),setTimeout(()=>{this.components.findInput.focus(),this.components.findInput.select()},300)}hide(){var t;(t=this.dialog)==null||t.close("cancelBar"),Ig(this.editor),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.editor.focus()}isVisible(){return this.dialog&&this.dialog.isVisible}research(){this.oldText="",this.doSearch({keepReplaceResult:!0,gotoFirstSearchResult:!1})}destroy(){var t;(t=this.dialog)==null||t.destroy()}}const SW={find:{findLabel:"\u67E5\u627E:",replaceLabel:"\u66FF\u6362:",findButton:"\u67E5\u627E",replaceButton:"\u66FF\u6362",replaceAllButton:"\u5168\u90E8\u66FF\u6362",moreButton:"",findPlaceholder:"\u5728\u6587\u6863\u5185\u67E5\u627E",replacePlaceholder:"\u66FF\u6362\u4E3A"}},LW={find:{findLabel:"Search:",replaceLabel:"Replace:",findButton:"Search",replaceButton:"Replace",replaceAllButton:"Replace all",moreButton:"",findPlaceholder:"Search text in document",replacePlaceholder:"Replace with"}},IW={find:{findLabel:"\u691C\u7D22\uFF1A",replaceLabel:"\u7F6E\u63DB\uFF1A",findButton:"\u691C\u7D22",replaceButton:"\u7F6E\u63DB",replaceAllButton:"\u3059\u3079\u3066\u3092\u7F6E\u63DB",moreButton:"",findPlaceholder:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u691C\u7D22",replacePlaceholder:"\u306B\u7F6E\u63DB"}};_.mergeLang({"zh-CN":SW,"en-US":LW,"ja-JP":IW});function s4(n){const t=n.addCustom("find-dialog",()=>new o4(n));return ei(n)||t.show(),!0}function DW(n){const t=n.addCustom("find-dialog",()=>new o4(n));return ei(n)||t.show({showFindAndReplace:!0}),!0}const l4={"CtrlOrCmd+F":s4,"CtrlOrCmd+Shift+H":DW},jat="";function _W(n){s4(n)}const MW=D("context-menu-utils");async function UW(){try{const n=await navigator.clipboard.readText(),e=(await navigator.clipboard.read())[0].types;return!n.trim()&&e.length===1&&e.includes("text/plain")}catch(n){return MW.warn(`Failed to read clipboard data: ${n}`),!0}}function a4(n,t){const e=document.createElement("a");e.href=n,e.download=t,e.click()}function OW(n){return new Promise((t,e)=>{const r=new FileReader;r.onload=()=>{const i=r.result;t(i)},r.onerror=()=>{e(new Error("Failed to read Blob as string."))},r.readAsText(n)})}function NW(n,t=10){const e=Math.random().toString(36).slice(2,2+t),r=n.split("/")[1];return`${e}.${r}`}async function PW(){const t=(await navigator.clipboard.read())[0],e=t.types,r=new DataTransfer;for(let i=0;i<e.length;i++){const o=e[i],s=await t.getType(o);if(o.startsWith("image/")){const c=NW(o),d=new File([s],c,{type:o});r.items.add(d);continue}const l=await OW(s);r.setData(o,l)}return r}const c4=D("context-menu-actions");async function u4(n){n.inputHandlers.onCopyWithoutEvent()}async function FW(n){n.selection.range.isCollapsed()||wC(n)}async function KW(n){u4(n),J0(n)}function VW(n,t){p(c4,t,"block can not be null"),p(c4,Le(t),"block should be embed type");const e=[],r=n.getBlockData(t),i=r.embedType,o=n.editorEmbeds.getEmbedClass(i);if(o.getResources)o.getResources(n,r).forEach(s=>{e.push(s)});else{const l=r.embedData.src;l&&typeof l=="string"&&e.push(l)}return e}async function $W(n,t){const e=VW(n,t);if(e&&e.length){const r=e[0],i=n.doc.buildResourceUrl(r);a4(i,r)}}function HW(n){PW().then(t=>{const e=new ClipboardEvent("paste",{clipboardData:t,bubbles:!0});n.input.inputElement.dispatchEvent(e)})}const jW=D("context-menu");class zW{constructor(t){m(this,"t",_.t);m(this,"clipboardPermission",{read:"prompt",write:"granted"});m(this,"isSecureContext",window.isSecureContext);m(this,"externalActionHandleMap",new Map);m(this,"handleActionByExternal",t=>{const{data:e}=t;if(e&&e.externalType){const r=e.externalType,i=this.externalActionHandleMap.get(r);if(i)return i(this.editor,this.editor.selection.focusedBlock,t)}return!1});m(this,"getPasteCommandItem",async()=>{const t=this.hasClipboardReadPermission;let e;Af()||ta()?e=!0:e=t?await UW():!1;const r=this.isSecureContext&&this.clipboardPermission.read!=="denied"&&!e,i=this.t("contextMenu.paste"),o=gn("CtrlOrCmd+V");let s=this.isSecureContext?"":this.secureEnvTips(o,i);return!s&&(!t||e)&&(s=this.t("copyCutProperty.limitedEnvTips",{shortCut:o})),{id:"paste",name:i,subText:o,states:r?[]:["disabled"],disableReason:s}});m(this,"getCommandItems",async()=>{const t=await this.getPasteCommandItem(),e=this.editor.readonly?[]:[this.cutCommandItem,t],r=[...this.copyTypeCommandItems,...e];return this.getExternalContextMenuOptions(r),r.push(this.stepItem,...this.selectionCommandItems),r});m(this,"getExternalContextMenuOptions",t=>{const e=this.editor.selection.focusedBlock,r=ae(this.editor,e);if(r&&r.getBlockProperties){const i=r.getBlockProperties(this.editor,e);if(i){const{blockCommands:o}=i;if(o&&o["context-menu"]){const{commands:s,executeCommand:l,group:c}=o["context-menu"];if(s.length){const d=s.map(h=>({...h,data:{...h.data||{},externalType:c}}));t.push(this.stepItem,...d)}this.externalActionHandleMap.set(c,l)}}}});m(this,"isFocusImageBlock",()=>{const t=this.editor.selection,e=t.focusedBlock;return Le(e)&&ln(e)==="image"&&t.range.getSelectedBlocks().length===1});m(this,"isFocusImageTypeEmbed",()=>{const e=this.editor.selection.focusedBlock,r=["mermaid","flowchart","drawio"];return Le(e)&&r.includes(ln(e))});this.editor=t,this.clipboardSupport()}get hasClipboardReadPermission(){return this.clipboardPermission.read==="granted"}get hasClipboardWritePermission(){return this.clipboardPermission.write==="granted"}clipboardSupport(){if(!navigator.clipboard){this.clipboardPermission={write:"denied",read:"denied"};return}if(!navigator.permissions){this.clipboardPermission={write:"granted",read:"denied"};return}try{const t=navigator.permissions.query({name:"clipboard-read"}),e=navigator.permissions.query({name:"clipboard-write"});Promise.all([t,e]).then(r=>{const i=r[0],o=r[1];this.clipboardPermission={read:i.state,write:o.state},i.state!=="granted"&&(i.onchange=s=>{this.clipboardPermission.read=s.target.state}),o.state!=="granted"&&(i.onchange=s=>{this.clipboardPermission.write=s.target.state})}).catch(r=>{this.clipboardPermission.read="denied",jW.log(r)})}catch{this.clipboardPermission={write:"granted",read:"denied"}}}get isRangeCollapsed(){return this.editor.selection.range.isCollapsed()}get imageTypeCommandItems(){const t=this.isSecureContext&&this.hasClipboardWritePermission;return[{id:"copy-image",name:this.t("contextMenu.copyImage"),subText:gn("CtrlOrCmd+C"),states:t?[]:["disabled"],disableReason:this.isSecureContext&&this.hasClipboardWritePermission?"":this.secureEnvTips(this.t("contextMenu.copyImage"),gn("CtrlOrCmd+C"))},{id:"copy-image-url",name:this.t("contextMenu.copyImageUrl"),states:t?[]:["disabled"]},{id:"image-save-as",name:this.t("contextMenu.imageSaveAs")},{id:"new-tab-open-image",name:this.t("contextMenu.newTabOpenImage")}]}get copyTypeCommandItems(){const t=this.isSecureContext&&!this.isRangeCollapsed;if(this.isFocusImageBlock())return this.imageTypeCommandItems;const e=this.t("copyCutProperty.copy"),r=gn("CtrlOrCmd+C"),i=[{id:"copy",name:e,subText:r,states:t?[]:["disabled"],disableReason:this.isSecureContext&&this.hasClipboardWritePermission?"":this.secureEnvTips(r,e)}];this.isFocusImageTypeEmbed()&&i.push({id:"image-save-as",name:this.t("contextMenu.imageSaveAs")});const s=this.t("contextMenu.copyMarkdown"),l=gn("CtrlOrCmd+Shift+C");return i.push({id:"copy-markdown",name:s,subText:l,states:t?[]:["disabled"],disableReason:this.isSecureContext&&this.hasClipboardWritePermission?"":this.secureEnvTips(l,s)}),i}get cutCommandItem(){let t=this.isSecureContext&&!this.isRangeCollapsed;const r=this.editor.selection.range.getSelectedBlocks().some(l=>!this.editor.isBlockWritable(l.block));r&&(t=!1);const i=this.t("copyCutProperty.cut"),o=gn("CtrlOrCmd+X");let s="";return t||(!this.isSecureContext||!this.hasClipboardWritePermission?s=this.secureEnvTips(o,i):r&&(s=this.t("contextMenu.uneditableBlockSelected"))),{id:"cut",name:this.t("copyCutProperty.cut"),subText:gn("CtrlOrCmd+X"),states:t?[]:["disabled"],disableReason:s}}get stepItem(){return{id:"step",name:"",type:"separator"}}get selectionCommandItems(){let t=!1;const e=this.editor.selection;e.range.isCollapsed()&&(t=!0),e.range.start.isSimple()&&e.range.end.isSimple()&&(t=e.range.start.offset>0&&e.range.getSelectedBlocks().length===1);const r=[{id:"select-block",name:this.t("contextMenu.selectBlock"),states:t?[]:["disabled"]}];return r.push({id:"select-all",name:this.t("contextMenu.selectAll")}),r}destroy(){this.externalActionHandleMap.clear()}secureEnvTips(t,e){return this.t("copyCutProperty.unsafeEnvTips",{shortCut:t,operation:e})}}const zat="";class QA{constructor(t){m(this,"contextMenu");m(this,"contextMenuCommandItems");m(this,"destroy",()=>{this.contextMenuCommandItems.destroy(),this.contextMenu.off("show",this.handleContextMenuShown),this.contextMenu.off("click",this.handleContextMenuClick),this.contextMenu.off("close",this.handleContextMenuClose),document.removeEventListener("contextmenu",this.handleContextMenu)});m(this,"updateEditorCaret",t=>{const{x:e,y:r,target:i}=t,o=k1(this.editor,e,r);if(!o)return;const s=this.editor.getBlockById(o.focus.blockId),l=this.editor.selection.range;let c=!1;i instanceof HTMLImageElement&&Ot(s)==="embed"&&ln(s)==="image"?c=!1:l.isSimple()?c=l.getSelectedBlocks().some(d=>Pt(this.editor,d.block)?d.block.contains(s):d.block.id===(o==null?void 0:o.focus.blockId)&&d.start.offset<=o.focus.offset&&d.end.offset>=o.focus.offset):c=l.getSelectedContainers().some(h=>h.contains(s)),c||this.editor.selectionHandler.handleMouseDown(t,{autoScroll:!1})});m(this,"handleContextMenu",t=>{if(me.isMobile||!this.editor.findCustom("editor-context-menu"))return;const r=t.target;if(this.editor.findCustom("toolbar-handler")&&this.editor.getCustom("toolbar-handler").isInToolbar(t)){t.preventDefault();return}if(this.editor.findCustom("block-menu")){const o=this.editor.getCustom("block-menu");if(o.blockMenu.isInMenu(r)||o.emptyBlockMenu.isInMenu(r)){t.preventDefault();return}}if(this.isInEditor(t)){t.preventDefault(),this.updateEditorCaret(t),this.contextMenu.manualShow(document.body,{theme:"light",point:{x:t.clientX,y:t.clientY}});return}this.isInMenu(t)&&t.preventDefault()});m(this,"isInMenu",t=>this.contextMenu.isInCommandBar(t.target));m(this,"isInEditor",t=>{const e=t.target;if(!e)return!1;let r=e.closest("div.editor-root"),i=this.editor.rootElement===r;if(!i&&e.classList.contains("editor-disable-scroll")){const s=Fe(t.x,t.y);r=(s==null?void 0:s.closest("div.editor-root"))||null,i=this.editor.rootElement===r}const o=t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement;return i&&!o});m(this,"handleContextMenuShown",async()=>{this.editor.findCustom("toolbar-handler")&&this.editor.getCustom("toolbar-handler").hide();const t=await this.contextMenuCommandItems.getCommandItems();this.contextMenu.updateItems(t)});m(this,"handleContextMenuClick",(t,e)=>{if(this.contextMenuCommandItems.handleActionByExternal(e))return;const{id:r}=e;switch(r){case"copy":u4(this.editor);break;case"copy-markdown":FW(this.editor);break;case"cut":if(this.handleImageEmbedAction(r))break;KW(this.editor);break;case"paste":HW(this.editor);break;case"copy-image":case"copy-image-url":case"image-save-as":case"new-tab-open-image":this.handleImageEmbedAction(r);break;case"select-all":rm(this.editor,this.editor.rootContainer);break;case"select-block":bC(this.editor);break}});m(this,"handleContextMenuClose",()=>{this.editor.focus()});this.editor=t,this.contextMenu=new dl([],void 0,{id:`right-context-menu-${t.clientId}`,classes:[_.getCurrentLang(),"editor-context-menu"]}),this.contextMenu.on("show",this.handleContextMenuShown),this.contextMenu.on("click",this.handleContextMenuClick),this.contextMenu.on("close",this.handleContextMenuClose),document.addEventListener("contextmenu",this.handleContextMenu),this.contextMenuCommandItems=new zW(t)}handleImageEmbedAction(t){const e=this.editor.selection.focusedBlock;if(Le(e)&&ln(e)==="image"){const r=e,i=Xe.getImageObject(this.editor,r),o=i.getSelectedIndex(),s=i.getImages();if(o!==-1){let l=r.querySelectorAll("img")[o].src;if(l){switch(l=this.editor.doc.buildResourceUrl(l),t){case"cut":Tg(this.editor,null),kg(this.editor);break;case"copy-image":Tg(this.editor,null);break;case"copy-image-url":Tf([{type:"text/plain",data:new Blob([l],{type:"text/plain"})}]);break;case"image-save-as":a4(l,s[o].src);break;case"new-tab-open-image":window.open(l);break}return!0}}}else switch(t){case"image-save-as":$W(this.editor,e);break}return!1}}const GW={contextMenu:{copyMarkdown:"\u590D\u5236\u4E3A Markdown",paste:"\u7C98\u8D34",copyImage:"\u590D\u5236\u56FE\u7247",copyImageUrl:"\u590D\u5236\u56FE\u7247\u5730\u5740",imageSaveAs:"\u56FE\u7247\u53E6\u5B58\u4E3A",newTabOpenImage:"\u65B0\u6807\u7B7E\u9875\u6253\u5F00\u56FE\u7247",selectBlock:"\u9009\u4E2D\u533A\u5757",selectAll:"\u9009\u4E2D\u5168\u6587",uneditableBlockSelected:"\u9009\u4E2D\u533A\u57DF\u5305\u542B\u9501\u5B9A\u533A\u5757\uFF0C\u6682\u4E0D\u652F\u6301\u526A\u5207"}},WW={contextMenu:{copyMarkdown:"Copy as Markdown",paste:"paste",copyImage:"Copy image",copyImageUrl:"Copy image address",imageSaveAs:"Save image as",newTabOpenImage:"Open image in a new tab",selectBlock:"Select the block",selectAll:"Select all",uneditableBlockSelected:"The selected area contains locked blocks, and cutting is not currently supported"}},qW={contextMenu:{copyMarkdown:"Markdown \u3068\u3057\u3066\u30B3\u30D4\u30FC",paste:"\u8CBC\u308A\u4ED8\u3051",copyImage:"\u753B\u50CF\u3092\u30B3\u30D4\u30FC",copyImageUrl:"\u753B\u50CF\u30A2\u30C9\u30EC\u30B9\u3092\u30B3\u30D4\u30FC",imageSaveAs:"\u540D\u524D\u3092\u4ED8\u3051\u3066\u753B\u50CF\u3092\u4FDD\u5B58",newTabOpenImage:"\u65B0\u3057\u3044\u30BF\u30D6\u3067\u753B\u50CF\u3092\u958B\u304F",selectBlock:"\u30D6\u30ED\u30C3\u30AF\u3092\u9078\u629E",selectAll:"\u30C6\u30AD\u30B9\u30C8\u3092\u5168\u9078\u629E",uneditableBlockSelected:"\u9078\u629E\u3057\u305F\u30A8\u30EA\u30A2\u306B\u30ED\u30C3\u30AF\u3055\u308C\u305F\u30D6\u30ED\u30C3\u30AF\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u5207\u308A\u53D6\u308A\u304C\u3067\u304D\u307E\u305B\u3093"}};_.mergeLang({"zh-CN":GW,"en-US":WW,"ja-JP":qW});function JA(n,t){return t.map(e=>{var o,s;const r=ae(n,e),i=(o=r.getBlockProperties)==null?void 0:o.call(r,n,e);return Le(e)||Pt(n,e)?i!=null&&i.abstract?`[${i.abstract}]`:"":(s=i==null?void 0:i.abstract)!=null?s:""}).join(" ")}function Dg(n){const{editor:t,commentGroupId:e,abstract:r="text"}=n,i=it(),o=t.doc.getUser(),s=Date.now(),l=e!=null?e:i;return{id:i,groupId:l,userId:o.userId,displayName:o.displayName,avatarUrl:o.avatarUrl,abstract:r,created:s,modified:s}}function f4(n,t,e){const r=e.id,o=n.getBlockData(t).comments;let s;o?s=[...o,r]:s=[r];const l={comments:s};n.updateBlockData(t,l)}function ZA(n,t,e){const r=JA(n,[t]),i=Dg({editor:n,abstract:r});f4(n,t,i);const o=Xo();return e.localCreateComment(i,o),i}const XW=D("standard-block-actions");class YW{constructor(t,e){m(this,"executeCommand",(t,e,r)=>{const i=r.data;try{this.editorComments.showCommentList();const o=t.getBlockById(i);ZA(t,o,this.provider)}catch(o){XW.error(`failed to execute block command: ${JSON.stringify(o)}`)}});this.provider=t,this.editorComments=e}commands(t,e){const r=dt(e);return{group:"block-comment-actions",commands:[{id:"comment",name:_.t("comment.quickMenuCommand"),data:r,order:100,states:t.readonly?["disabled"]:[]}],executeCommand:this.executeCommand}}}class QW{async handleBeforePasteDoc(t,e){return Object.values(e.blocks).forEach(r=>{r.forEach(i=>{delete i.comments,i.text&&i.text.forEach(o=>{if(o.attributes){const s=o.attributes;Object.keys(s).forEach(l=>{l.startsWith("comment-")&&delete s[l]})}})})}),!1}}var ge=(n=>(n.SwitchUp="switch-up",n.SwitchDown="switch-down",n.CommentItemReply="comment-item-reply",n.CommentItemMore="comment-item-more",n.CommentItemOk="comment-item-ok",n.CommentItemCancel="comment-item-cancel",n.CommentItemDelete="comment-item-delete",n.CommentItemEdit="comment-item-edit",n.QuickReply="quick-reply",n.QuickReplyOk="quick-reply-ok",n.QuickReplyCancel="quick-reply-cancel",n))(ge||{});const tx="group-item-action",d4="last-comment-item",JW="disabled",h4=500;function Su(n){return n.id!==n.groupId}function m4(n,t=".comment-item-root"){return n.querySelectorAll(t).length}function ZW(n){const t=n.closest(".comment-item-root");return t?t.id:null}function as(n,t){n.setAttribute(tx,t)}function tq(n){return n.closest(`[${tx}]`)}function eq(n){var t;return(t=n.getAttribute(tx))!=null?t:""}function nq(n){return n.disabled||n.classList.contains(JW)}function g4(n,t){const e=n.rootContainer.querySelector(`[comment-${t.toLocaleLowerCase()}=${t}]`);if(!e)return null;const r=e.closest('[data-type="editor-block"]');return r?r.id:null}function p4(n){return Array.from(n.attributes).map(e=>e.name).filter(e=>e.startsWith("comment-")).map(e=>e.replace("comment-",""))}const C4=D("doc-comments");function E4(n,t,e,r){if(t.comments){const o=t.comments;Array.isArray(o)&&o.forEach(s=>{r.has(s)||(r.add(s),e.push(s))})}t.text&&t.text.forEach(s=>{if(s.attributes){const l="comment-";Object.entries(s.attributes).forEach(([c,d])=>{if(c.startsWith(l)){const h=d;r.has(h)||(r.add(h),e.push(h))}})}});const i=t.children;!i||i.forEach(o=>{n.blocks[o].forEach(l=>{E4(n,l,e,r)})})}function rq(n){const t=[],e=new Set;n.blocks.root.forEach(i=>{E4(n,i,t,e)});const r=new Map;return t.forEach((i,o)=>r.set(i,o)),r}function iq(n){const t=new Map;n.forEach(i=>{if(Su(i)){const o=t.get(i.groupId);o?o.push(i):t.set(i.groupId,[i])}});const e=[];return n.forEach(i=>{var o;if(!Su(i)){const s=(o=t.get(i.id))!=null?o:[];t.delete(i.id);const l={...i,children:s};e.push(l)}}),Array.from(t.values()).forEach(i=>{const o=i[0],s=i.slice(1),l={...o,children:s};e.push(l)}),e}function Rl(n,t){const e=n.doc.toJSON(),r=rq(e);return iq(t.getComments()).filter(s=>r.has(s.groupId)).sort((s,l)=>{const c=r.get(s.groupId),d=r.get(l.groupId);return p(C4,c!==void 0,`comment not exists in doc, ${s.groupId}`),p(C4,d!==void 0,`comment not exists in doc, ${l.groupId}`),c-d})}function A4(n){const{children:t,...e}=n,r=[e];return t.forEach(i=>{r.push(i)}),r}function oq(n,t){return Rl(n,t).length}function ex(n,t){const e=[],r=n.getBlockById(t.blockId);if(st(n,r)){const o=t.blockId,s=t.offset,l=n.getBlockById(o),c=n.getBlockText(l),d=Hc(c,s);d&&Object.entries(d).forEach(([h,C])=>{h.startsWith("comment-")&&e.push(C)})}const i=r.attributes;for(let o=0;o<i.length;o++){const s=i[o];s.name.startsWith("comment-")&&e.push(s.value)}return e}function x4(n){const t=n.selection.range;if(!t.isSimple())return[];if(t.start.blockId!==t.end.blockId)return[];if(t.isCollapsed())return ex(n,t.start);const{start:e,end:r}=t,i=ex(n,e),o=ex(n,r);return Mp.default(i,o)}const sq=D("active-comments");function b4(n,t){n.rootContainer.querySelectorAll(`span.comment[comment-${t}],[data-type=editor-block].comment[comment-${t}]`).forEach(r=>{ut(r,"active")})}function v4(n,t,e){const r=n.rootContainer.querySelector("span.comment.active,[data-type=editor-block].comment.active");if(!t)r&&p4(r).forEach(o=>b4(n,o));else{const i=t.toLocaleLowerCase();if(r){const s=p4(r);if(s.length===1&&s[0]===i)return;s.forEach(l=>b4(n,l))}const o=n.rootContainer.querySelectorAll(`span.comment[comment-${i}],[data-type=editor-block].comment[comment-${i}]`);if(o.length){o.forEach(l=>{q(l,"active")});const s=o[0];if(ca(s)){const l=mt(s,0,"normal");n.selection.setSelection(l,void 0,{noScroll:e==="next"})}else if(x4(n).indexOf(t)===-1){const c=et(s);p(sq,c,"block not found");const d=ga(c,s),h=mt(c,d.start,"normal");n.selection.setSelection(h,void 0,{noScroll:e==="next"})}if(n.focus(),e==="next"){const l=s.getBoundingClientRect(),c=n.scrollContainer.clientHeight;l.top>c/2&&ia(s,{elementToScroll:n.scrollContainer,verticalOffset:-n.scrollContainer.clientHeight/2})}}}}const Gat="";D("comment-editor");const{t:lq}=_,nx="comment-editor-readonly",Zd="comment-editor-editing";class rx{constructor(t,e,r){m(this,"root");m(this,"components");m(this,"handleEditorBlur",()=>{this.inactiveEditor()});m(this,"handleEditorFocus",()=>{this.editor.readonly||this.activeEditor()});m(this,"activeEditor",()=>{Mt(this.root,Zd)||q(this.root,Zd)});m(this,"inactiveEditor",()=>{ut(this.root,Zd)});m(this,"handleInsertImg",async()=>{const{editor:t}=this.components,e=Et(t.rootContainer),r=await Uc("image/*",{container:this.root});if(!r){t.focus();return}const i={src:"",widthPercent:50},o={id:it(),type:"embed",embedType:"image",embedData:i},s=t.options.componentsOptions.image;s!=null&&s.defaultAlign&&(o.align=s.defaultAlign);const l=t.getFocusedBlock(),c=t.getBlockIndex(l),d=t.insertBlock(e,c+1,o);Xe.getImageObject(t,d).replaceImage(0,r),t.focus()});m(this,"handleReadonlyChange",t=>{t.readonly?(ut(this.root,Zd),q(this.root,nx)):(q(this.root,Zd),ut(this.root,nx))});m(this,"setDoc",t=>{const{components:{editor:e}}=this;e.doc.externalDoc.setDoc(t)});m(this,"getDoc",()=>{const{components:{editor:t}}=this;return t.doc.toJSON()});m(this,"isEmpty",()=>G1(this.getDoc()));m(this,"edit",()=>{const{editor:t}=this.components;t.readonly=!1,AC(t),this.activeEditor(),t.focus()});m(this,"clear",()=>{const t=Xo();this.setDoc(t)});m(this,"readonly",()=>{const{editor:t}=this.components;t.readonly=!0});m(this,"destroy",()=>{const{root:t,components:{editor:e,insertImgButton:r}}=this;r.onclick=null,e.destroy(),t.remove()});this.mainEditor=t,this.commentsProvider=e,this.doc=r,this.root=B("div",["comment-editor",nx],null),this.components=this.createEditor()}createEditor(){const t=B("div",["comment-editor-root"],this.root),{commentsProvider:e,mainEditor:r}=this,i=e.createCommentEditor(t,new LC(this.doc));i.readonly=!0,i.addListener("readonlyChanged",this.handleReadonlyChange),i.addListener("focus",this.handleEditorFocus),i.addListener("blur",this.handleEditorBlur);const o=Sa(this.root,"comment-editor-img",lq("comment.image"),IT,void 0,r.clientId);return o.classList.add("comment-editor-img"),o.onclick=this.handleInsertImg,{editor:i,insertImgButton:o}}get editor(){return this.components.editor}}class aq{constructor(t){m(this,"handleBeforeKeyDown",(t,e)=>{if(Gi(e,"Enter")){const{quickReply:r,updateLastCommentItem:i}=this.groupItem;return r.getReplyEditor().isEmpty()?(r.hideReplyEditor(),!0):(r.reply(),i(),!0)}return!1});this.groupItem=t}}class cq{constructor(t,e,r){m(this,"handleBeforeKeyDown",(t,e)=>{if(Gi(e,"Enter")){const{quickReply:r}=this.groupItem,{comment:i,getCommentEditor:o}=this.commentItem,s=o();if(s.isEmpty())this.commentsProvider.localDeleteComment(i.id);else{const l=s.getDoc();this.commentsProvider.localUpdateComment(i,l),s.readonly()}return r.show(),!0}return!1});this.commentsProvider=t,this.groupItem=e,this.commentItem=r}}const uq=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
728
+ `).map(h=>{const C={id:it(),type:"text"};if(lW(h)&&!i)return C.text=aW(h),C;const E=h?[Xr(h,null)]:[];return C.text=E,C})},meta:{},comments:{}};o["text/plain"]=d}return o}}function uW(n){const t=[];for(let e=0;e<n.length;e++){const r=n[e];r.type.toLocaleLowerCase().startsWith("image/")&&t.push(r)}return t}class qA{constructor(t){t.dataConverter.addConverter(new oW),t.dataConverter.addConverter(new cW),t.dataConverter.addConverter(new sW)}async handleBeforePaste(t,e,r,i){if(!e)return!1;const o=e.clipboardData;if(o){if(o.getData("text/html").indexOf("<ones-editor-doc")>0)return!1;const l=uW(i);if(l.length>0){const c=r["text/office-html"];let d=!!c;if(c&&c.blocks.root.length===1&&c.blocks.root[0].embedType==="image"&&(d=!1),!d)return await this.handleInsertImages(t,l),!0}}return!1}async handleInsertImages(t,e){const{start:r,end:i}=t.selection.range,o=t.selection.focusedBlock;let s=at(o),c=Rt(o);const d=et(s);if(d&&Ot(d)==="code")return;if(r.blockId===i.blockId&&Le(o))c+=1;else{t.clearSelectedContents();const{blockId:C}=t.selection.range.start,E=t.getBlockById(C);c=Rt(E),s=at(E),Be(t,E)||(c+=1),ie(s)&&c===0&&(c+=1)}const h=Et(s);for(let C=0;C<e.length;C++){const E=e[C],A=await C1(t,"image",h,c+C,{file:E});A&&t3(t,A,"image",{id:"replace-image",name:"Replace image",data:{block:A,image:E}})}}}class fW extends je.TypedEmitter{constructor(t){super(),this.editor=t}onUpdateBlockText(t,e,r){const i=this.editor.getCustom("find-dialog");if(!i||!i.isVisible())return;const o=Js(pi(this.editor,t),e);!st(this.editor,o)||!r.some(l=>l.insert||l.delete)||this.emit("onDocChanged",o)}onInsertBlock(t,e,r,i){const o=this.editor.getCustom("find-dialog");!o||!o.isVisible()||this.emit("onDocInserted")}onDeleteBlock(t,e,r){const i=Js(pi(this.editor,t),e),o=this.editor.getCustom("find-dialog");!o||!o.isVisible()||this.emit("onDocDeleted",i)}}function Yw(n){return me.isSafari&&!!n&&Date.now()-n<100}const Qw=D("highlight-data");class Rg{constructor(t){m(this,"data",new Map);this.editor=t}add(t,e,r){const i={id:it(),blockId:dt(t),oldText:this.editor.getBlockText(t),start:e,end:r};return this.data.set(i.id,i),i}get(t){const e=this.data.get(t);return p(Qw,e,`no highligh data: ${t}`),e}remove(t){this.data.delete(t)}clearBlockData(t){Array.from(this.data.values()).forEach(e=>{e.blockId===t&&this.data.delete(e.id)})}destroy(){}static getData(t){return t.addCustom("highligh-data",()=>new Rg(t))}}function dW(n,t,e,r,i){const s=Rg.getData(n).add(t,e,r);return i.setAttribute("data-highlight-id",s.id),s}function wg(n,t){const e=t.getAttribute("data-highlight-id");return p(Qw,e,"invalid highlight elem, no id"),Rg.getData(n).get(e)}const Ia=D("highligh-dom");function hW(n){return Mt(n,"editor-highlight")}function ls(n){const t=n.rootContainer.querySelectorAll(".editor-highlight");return Array.from(t)}function mW(n,t){p(Ia,t,"invalid block");const e=t.querySelectorAll(".editor-highlight");return Array.from(e)}function gW(n){const t=n.rootContainer.querySelectorAll(".editor-replace-result-highlight");return Array.from(t)}function Sg(n){const t=n.querySelectorAll(".editor-highlight");return Array.from(t)}function pW(n){Sg(n).forEach(t=>{t.remove()})}function Jw(n){return ls(n).length}function kl(n){const t=n.rootContainer.querySelectorAll(".editor-highlight");return Array.from(t).map(r=>{const i=Mt(r,"editor-highlight-box")?"box":"text";return{ele:r,type:i}})}function CW(n,t){p(Ia,t>=0,`invalid highlight index: ${t}`);const e=ls(n);return e.length===0?null:(p(Ia,t<e.length,`invalid highlight index: ${t}/${e.length}`),e[t])}function EW(n,t,{left:e,top:r,width:i,height:o},s){const l=["editor-highlight-child"];s&&l.push("editor-highlight-readonly");const c=B("div",l,n);c.style.top=`${r}px`,c.style.left=`${e}px`,c.style.width=`${i}px`,c.style.height=`${o}px`}function Zw(n,t,e,r,i){p(Ia,r>0,`invalid end: ${r}`);const o=ve(t),s=t.getBoundingClientRect(),l=Vo(n,t,Ie(n,t,e,r)),c=i==="find"?["editor-highlight"]:["editor-replace-result-highlight"],d=Uf(t,r),{prev:h}=d;h||p(Ia,!1,"invalid offset, no prev child at offset"),yr(h)&&c.push("editor-highlight-box");const C=B("div",c,o);l.forEach(E=>{EW(C,t,{left:E.left-s.left,width:E.width,top:E.top-s.top,height:E.height})}),dW(n,t,e,r,C)}function AW(n,t,e,r){return Zw(n,t,e,r,"find")}function t4(n,t,e,r){return Zw(n,t,e,r,"replace")}function Lg(n,t){ls(n).forEach(s=>{Mt(s,"active")&&ut(s,"active")}),q(t,"active"),p(Ia,t.firstChild instanceof HTMLElement,"invalid highligh dom, invalid elem child");const r=t.firstChild;let o=r.getBoundingClientRect().y;o===0&&(o=r.getBoundingClientRect().y),jf(n,r,{animation:!0})}function Qd(n){const t=n.rootContainer.querySelector(".editor-highlight.active");return t||null}function e4(n){return p(Ia,n,"no highlight elem"),Mt(n,"editor-highlight-readonly")}const wu=D("highligh-text");function n4(n){gW(n).forEach(e=>{e.remove()})}function Ig(n,t){ls(n).forEach(r=>{r.remove()}),t!=null&&t.keepReplaceResult||n4(n)}function r4(n,t,e){mW(n,t).forEach(i=>{i.remove()}),e!=null&&e.keepReplaceResult||n4(n)}function Jd(n){const t=Qd(n);if(!t)return-1;const r=ls(n).indexOf(t);return p(wu,r!==-1,`invalid highlight index: ${r}`),r}function xW(n){const t=ls(n);if(t.length===0)return 0;const e=Qd(n);let r=e?t.indexOf(e):-1;!e||r===-1||r===t.length-1?r=0:r+=1;const i=t[r];return Lg(n,i),r}function bW(n){const t=ls(n);if(t.length===0)return 0;const e=Qd(n);let r=e?t.indexOf(e):-1;!e||r===-1||r===0?r=t.length-1:r-=1;const i=t[r];return Lg(n,i),r}function XA(n,t){const e=ls(n);e.length>0&&t<e.length&&Lg(n,e[t])}function vW(n,t,e){const r=Qd(n);if(!r)return!1;const i=et(r);if(p(wu,i,"no parent block"),!n.isBlockWritable(i))return!1;const o=Jw(n);let s=Jd(n);if(!e4(r)&&n.isBlockWritable(i)){const d=wg(n,r),h=n.getBlockText(i),{start:C,end:E}=wg(n,r),[A,v]=zn.transformOffset(d.oldText,h,[C,E]),R=Q3(h,A,v-A);if(Re(R).toLowerCase()!==t.toLowerCase())return!1;const S=P0(h,A,v,e);n.setBlockText(i,S),pW(i),YA(n,i,t),e&&t4(n,i,A,A+e.length)}const l=Jw(n);s>=l?s=0:l>o&&(s+=1);const c=CW(n,s);return c&&Lg(n,c),!0}function BW(n,t,e,r){if(!st(n,t)||!n.isBlockWritable(t))return 0;const i=n.getBlockText(t);p(wu,i,"no block text");const o={count:0},s=X5(n,i,e,r,o);return Re(i)===Re(s)?0:(n.setBlockText(t,s),o.count)}function yW(n,t,e){if(p(wu,hW(t),"not a highlight elem"),e4(t))return;p(wu,e>0,"invalid highlight length");const r=wg(n,t),i=et(t);p(wu,i,"no parent block"),t4(n,i,r.start,r.start+e)}function TW(n,t){kl(n).forEach(r=>{r.type!=="box"&&yW(n,r.ele,t)})}function kW(n,t,e){if(n.readonly)return 0;const r=o=>{let s=0;return ke(o).forEach(c=>{Pt(n,c)?_n(n,c).forEach(h=>{s+=r(h)}):s+=BW(n,c,t,e)}),s},i=r(n.rootContainer);return e.length>0&&TW(n,e.length),i}function RW(n){const t=n.selection.range.end,e=n.getBlockById(t.blockId),r=t.isSimple()?t.offset:1,i=Sg(e);for(let l=0;l<i.length;l++){const c=i[l],{end:d}=wg(n,c);if(d>=r)return c}const o=w1(n,{simpleBlockOnly:!0}),s=o.indexOf(e);if(s===-1)return null;for(let l=s+1;l<o.length;l++){const c=o[l],d=Sg(c);if(d.length>0)return d[0]}return null}function wW(n){const t=ls(n),e=RW(n);return e?t.indexOf(e):0}function YA(n,t,e){if(!!e&&st(n,t)){const r=n.getBlockText(t),i=vC(n,r,e);i.length>0&&i.forEach(({start:o,end:s})=>{AW(n,t,o,s)})}}function i4(n,t){if(Ig(n),!t)return;w1(n,{simpleBlockOnly:!0,visibleOnly:!0}).forEach(r=>{YA(n,r,t)})}class o4{constructor(t){m(this,"dialog",null);m(this,"root");m(this,"oldText","");m(this,"_compositionEndTime",0);m(this,"components");m(this,"handleFindChanged",()=>{this.doSearch({keepReplaceResult:!1,gotoFirstSearchResult:!0})});m(this,"handleCompositionEnd",()=>{this._compositionEndTime=Date.now(),this.handleFindChanged()});m(this,"handleDocChanged",t=>{setTimeout(()=>{if(xf(t))return;r4(this.editor,t),YA(this.editor,t,this.components.findInput.value);const e=kl(this.editor),r=e.length;t.querySelectorAll(".editor-highlight").length===r&&XA(this.editor,0);const i=Jd(this.editor);i!==-1&&this.updateSearchStatus(i,e)})});m(this,"handleDocInserted",()=>{const t=setTimeout(()=>{clearTimeout(t),Ig(this.editor,{keepReplaceResult:!0}),i4(this.editor,this.components.findInput.value);const e=Jd(this.editor);if(e!==-1){const r=kl(this.editor);this.updateSearchStatus(e,r),XA(this.editor,e)}})});m(this,"handleDocDeleted",t=>{const e=setTimeout(()=>{if(!Sg(t).length){clearTimeout(e);return}r4(this.editor,t);const i=Jd(this.editor);if(i!==-1){const o=kl(this.editor);this.updateSearchStatus(i,o)}})});m(this,"handleInput",t=>{if(t.isComposing||Yw(this._compositionEndTime)){this.doSearch.cancel();return}this.handleFindChanged()});m(this,"handleFind",()=>{this.findNext({keepSearchResult:!1})});m(this,"handleReplace",()=>{const t=this.components.findInput.value;if(!t||!Qd(this.editor))return;const r=this.components.replaceInput.value;if(t===r)return;if(vW(this.editor,t,r)){const o=Jd(this.editor),s=kl(this.editor);this.updateSearchStatus(o,s)}r.includes(t)&&this.findNext({keepSearchResult:!0})});m(this,"handleReplaceAll",()=>{const t=this.components.findInput.value;if(!t)return;const e=this.components.replaceInput.value;t!==e&&this.editor.undoManager.runInGroup(()=>{kW(this.editor,t,e)>0&&(this.oldText="",this.doSearchNow({keepReplaceResult:!0,gotoFirstSearchResult:!0}))})});m(this,"doSearch",Pe.default(this.doSearchNow,300));m(this,"handleDocumentKeyDown",t=>{p0(t)&&this.hide()});this.editor=t;const e=B("div",["editor-find-dialog"],null),r=B("div",["editor-find-content"],e),i=B("div",["editor-find-dialog-row"],r),o=ea(gd,["editor-find-dialog-button-close"],e),s=B("label",["editor-find-dialog-label"],i,_.t("find.findLabel"));s.htmlFor="";const l=B("div",["editor-find-dialog-input-container"],i),c=B("input",["editor-find-dialog-input"],l);c.type="text",c.placeholder=_.t("find.findPlaceholder");const d=B("div",["editor-find-dialog-status"],l),h=ea(xT,["editor-find-dialog-icon-button"],d),C=B("div",["editor-find-dialog-curr"],d,"0/0"),E=ea(bT,["editor-find-dialog-icon-button"],d);let A;_.t("find.moreButton")?A=B("button",["editor-find-dialog-button"],i,_.t("find.moreButton")):A=ea(tE,["editor-find-dialog-icon-button-border"],i);const v=B("div",["editor-find-dialog-row"],r),R=B("label",["editor-find-dialog-label"],v,_.t("find.replaceLabel"));R.htmlFor="";const S=B("div",["editor-find-dialog-input-container"],v),M=B("input",["editor-find-dialog-input"],S);M.type="text",M.placeholder=_.t("find.replacePlaceholder");const U=B("div",["editor-find-dialog-row","editor-find-dialog-action"],r);B("div",["editor-find-dialog-space"],U);const V=B("button",["editor-find-dialog-button"],U,_.t("find.findButton")),nt=B("button",["editor-find-dialog-button"],U,_.t("find.replaceButton")),Y=B("button",["editor-find-dialog-button","editor-find-dialog-primary-button"],U,_.t("find.replaceAllButton"));A.onclick=()=>{this.showReplace()},o.onclick=()=>{this.hide()},c.onkeydown=ft=>{if(ft.isComposing||Yw(this._compositionEndTime)){this.doSearch.cancel();return}zp(ft)?(this.doSearch.cancel(),this.doSearchNow({keepReplaceResult:!1,gotoFirstSearchResult:!0})):p0(ft)&&this.hide()},c.oninput=this.handleInput,c.onpaste=this.handleFindChanged,c.oncut=this.handleFindChanged,c.addEventListener("compositionend",this.handleCompositionEnd),c.maxLength=50,V.onclick=this.handleFind,nt.onclick=this.handleReplace,Y.onclick=this.handleReplaceAll,M.maxLength=50,E.onclick=()=>{this.gotoNext()},h.onclick=()=>{this.gotoPrev()},this.components={findInput:c,findPrev:h,findCurrent:C,findNext:E,replaceInput:M,findButton:V,replaceButton:nt,replaceAllButton:Y,closeButton:o,showReplaceButton:A,rowReplace:v,rowActions:U,statusContainer:d},this.root=e;const X=new fW(t);t.doc.registerCallback(X),X.addListener("onDocChanged",this.handleDocChanged),X.addListener("onDocInserted",this.handleDocInserted),X.addListener("onDocDeleted",this.handleDocDeleted)}findNext(t){this.doSearch.cancel(),this.doSearchNow({keepReplaceResult:t.keepSearchResult,gotoFirstSearchResult:!0})}doSearchNow(t){const e=this.components.findInput.value;if(e||this.clearFind(t),this.oldText===e){this.gotoNext();return}this.oldText=e,i4(this.editor,e);const r=kl(this.editor),i=wW(this.editor);t.gotoFirstSearchResult&&XA(this.editor,i),this.updateSearchStatus(i,r)}gotoNext(){const t=xW(this.editor),e=kl(this.editor);this.updateSearchStatus(t,e)}gotoPrev(){const t=bW(this.editor),e=kl(this.editor);this.updateSearchStatus(t,e)}updateSearchStatus(t,e){var s;this.oldText?this.components.statusContainer.style.display="flex":this.components.statusContainer.style.display="none";const r=e.length,i=e.filter(l=>l.type==="box").length,o=((s=e[t])==null?void 0:s.type)==="box";if(r-i<=0)r===0?(this.components.findCurrent.innerText="0 / 0",this.components.findButton.disabled=!0):(this.components.findCurrent.innerText=`${t+1} / ${r}`,this.components.findButton.disabled=!1),this.components.replaceAllButton.disabled=!0,this.components.replaceButton.disabled=!0;else{this.components.findCurrent.innerText=`${t+1} / ${r}`;const l=this.editor.readonly;this.components.replaceAllButton.disabled=l,this.components.replaceButton.disabled=l||o,this.components.findButton.disabled=!1}}clearFind(t){Ig(this.editor),this.updateSearchStatus(0,[])}showFindOnly(){this.components.rowReplace.style.display="none",this.components.rowActions.style.display="none",this.components.showReplaceButton.style.display="flex"}showReplace(){this.components.rowReplace.style.display="flex",this.components.rowActions.style.display="flex",this.components.showReplaceButton.style.display="none",this.components.replaceInput.focus(),this.components.replaceInput.select()}hideSearchResult(){this.components.statusContainer.style.display="none"}showSearchResult(){this.components.statusContainer.style.display="flex"}show(t){document.addEventListener("keydown",this.handleDocumentKeyDown);const e=this.editor.getSelectedText();e.length>0&&e.length<50&&(this.components.findInput.value=e),this.root.style.display="flex",t!=null&&t.showFindAndReplace?(this.showReplace(),this.components.findInput.value&&setTimeout(()=>{this.components.replaceInput.focus()})):this.showFindOnly(),this.hideSearchResult(),this.oldText="",this.doSearchNow({keepReplaceResult:!1,gotoFirstSearchResult:!0});const r=this.editor.readonly,i=this.components.findInput.value;this.components.replaceButton.disabled=r||!i,this.components.replaceAllButton.disabled=r||!i,this.components.replaceInput.disabled=r,this.dialog||(this.dialog=new Cd(this.root,{disablePageScroll:!1}));const o=this.editor.options.componentsOptions.findDialog,s=(o==null?void 0:o.popoverTarget)||this.editor.rootContainer,l=()=>{var E,A,v,R;const c=o==null?void 0:o.getReferenceClientRect;if(c&&((A=(E=this.dialog)==null?void 0:E.tippyInstance)==null?void 0:A.popper))return c(s,(R=(v=this.dialog)==null?void 0:v.tippyInstance)==null?void 0:R.popper);const d=s.getBoundingClientRect(),h=d.top<0?12:d.top+12,C=d.right-this.root.clientWidth-12;return new DOMRect(C,h,0,0)};this.dialog.show(s,{getReferenceClientRect:l}),setTimeout(()=>{this.components.findInput.focus(),this.components.findInput.select()},300)}hide(){var t;(t=this.dialog)==null||t.close("cancelBar"),Ig(this.editor),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.editor.focus()}isVisible(){return this.dialog&&this.dialog.isVisible}research(){this.oldText="",this.doSearch({keepReplaceResult:!0,gotoFirstSearchResult:!1})}destroy(){var t;(t=this.dialog)==null||t.destroy()}}const SW={find:{findLabel:"\u67E5\u627E:",replaceLabel:"\u66FF\u6362:",findButton:"\u67E5\u627E",replaceButton:"\u66FF\u6362",replaceAllButton:"\u5168\u90E8\u66FF\u6362",moreButton:"",findPlaceholder:"\u5728\u6587\u6863\u5185\u67E5\u627E",replacePlaceholder:"\u66FF\u6362\u4E3A"}},LW={find:{findLabel:"Search:",replaceLabel:"Replace:",findButton:"Search",replaceButton:"Replace",replaceAllButton:"Replace all",moreButton:"",findPlaceholder:"Search text in document",replacePlaceholder:"Replace with"}},IW={find:{findLabel:"\u691C\u7D22\uFF1A",replaceLabel:"\u7F6E\u63DB\uFF1A",findButton:"\u691C\u7D22",replaceButton:"\u7F6E\u63DB",replaceAllButton:"\u3059\u3079\u3066\u3092\u7F6E\u63DB",moreButton:"",findPlaceholder:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u691C\u7D22",replacePlaceholder:"\u306B\u7F6E\u63DB"}};_.mergeLang({"zh-CN":SW,"en-US":LW,"ja-JP":IW});function s4(n){const t=n.addCustom("find-dialog",()=>new o4(n));return ei(n)||t.show(),!0}function DW(n){const t=n.addCustom("find-dialog",()=>new o4(n));return ei(n)||t.show({showFindAndReplace:!0}),!0}const l4={"CtrlOrCmd+F":s4,"CtrlOrCmd+Shift+H":DW},jat="";function _W(n){s4(n)}const MW=D("context-menu-utils");async function UW(){try{const n=await navigator.clipboard.readText(),e=(await navigator.clipboard.read())[0].types;return!n.trim()&&e.length===1&&e.includes("text/plain")}catch(n){return MW.warn(`Failed to read clipboard data: ${n}`),!0}}function a4(n,t){const e=document.createElement("a");e.href=n,e.download=t,e.click()}function OW(n){return new Promise((t,e)=>{const r=new FileReader;r.onload=()=>{const i=r.result;t(i)},r.onerror=()=>{e(new Error("Failed to read Blob as string."))},r.readAsText(n)})}function NW(n,t=10){const e=Math.random().toString(36).slice(2,2+t),r=n.split("/")[1];return`${e}.${r}`}async function PW(){const t=(await navigator.clipboard.read())[0],e=t.types,r=new DataTransfer;for(let i=0;i<e.length;i++){const o=e[i],s=await t.getType(o);if(o.startsWith("image/")){const c=NW(o),d=new File([s],c,{type:o});r.items.add(d);continue}const l=await OW(s);r.setData(o,l)}return r}const c4=D("context-menu-actions");async function u4(n){n.inputHandlers.onCopyWithoutEvent()}async function FW(n){n.selection.range.isCollapsed()||wC(n)}async function KW(n){u4(n),J0(n)}function VW(n,t){p(c4,t,"block can not be null"),p(c4,Le(t),"block should be embed type");const e=[],r=n.getBlockData(t),i=r.embedType,o=n.editorEmbeds.getEmbedClass(i);if(o.getResources)o.getResources(n,r).forEach(s=>{e.push(s)});else{const l=r.embedData.src;l&&typeof l=="string"&&e.push(l)}return e}async function $W(n,t){const e=VW(n,t);if(e&&e.length){const r=e[0],i=n.doc.buildResourceUrl(r);a4(i,r)}}function HW(n){PW().then(t=>{const e=new ClipboardEvent("paste",{clipboardData:t,bubbles:!0});n.input.inputElement.dispatchEvent(e)})}const jW=D("context-menu");class zW{constructor(t){m(this,"t",_.t);m(this,"clipboardPermission",{read:"prompt",write:"granted"});m(this,"isSecureContext",window.isSecureContext);m(this,"externalActionHandleMap",new Map);m(this,"handleActionByExternal",t=>{const{data:e}=t;if(e&&e.externalType){const r=e.externalType,i=this.externalActionHandleMap.get(r);if(i)return i(this.editor,this.editor.selection.focusedBlock,t)}return!1});m(this,"getPasteCommandItem",async()=>{const t=this.hasClipboardReadPermission;let e;Af()||ta()?e=!0:e=t?await UW():!1;const r=this.isSecureContext&&this.clipboardPermission.read!=="denied"&&!e,i=this.t("contextMenu.paste"),o=gn("CtrlOrCmd+V");let s=this.isSecureContext?"":this.secureEnvTips(o,i);return!s&&(!t||e)&&(s=this.t("copyCutProperty.limitedEnvTips",{shortCut:o})),{id:"paste",name:i,subText:o,states:r?[]:["disabled"],disableReason:s}});m(this,"getCommandItems",async()=>{const t=await this.getPasteCommandItem(),e=this.editor.readonly?[]:[this.cutCommandItem,t],r=[...this.copyTypeCommandItems,...e];return this.getExternalContextMenuOptions(r),r.push(this.stepItem,...this.selectionCommandItems),r});m(this,"getExternalContextMenuOptions",t=>{const e=this.editor.selection.focusedBlock,r=ae(this.editor,e);if(r&&r.getBlockProperties){const i=r.getBlockProperties(this.editor,e);if(i){const{blockCommands:o}=i;if(o&&o["context-menu"]){const{commands:s,executeCommand:l,group:c}=o["context-menu"];if(s.length){const d=s.map(h=>({...h,data:{...h.data||{},externalType:c}}));t.push(this.stepItem,...d)}this.externalActionHandleMap.set(c,l)}}}});m(this,"isFocusImageBlock",()=>{const t=this.editor.selection,e=t.focusedBlock;return Le(e)&&ln(e)==="image"&&t.range.getSelectedBlocks().length===1});m(this,"isFocusImageTypeEmbed",()=>{const e=this.editor.selection.focusedBlock,r=["mermaid","flowchart","drawio"];return Le(e)&&r.includes(ln(e))});this.editor=t,this.clipboardSupport()}get hasClipboardReadPermission(){return this.clipboardPermission.read==="granted"}get hasClipboardWritePermission(){return this.clipboardPermission.write==="granted"}clipboardSupport(){if(!navigator.clipboard){this.clipboardPermission={write:"denied",read:"denied"};return}if(!navigator.permissions){this.clipboardPermission={write:"granted",read:"denied"};return}try{const t=navigator.permissions.query({name:"clipboard-read"}),e=navigator.permissions.query({name:"clipboard-write"});Promise.all([t,e]).then(r=>{const i=r[0],o=r[1];this.clipboardPermission={read:i.state,write:o.state},i.state!=="granted"&&(i.onchange=s=>{this.clipboardPermission.read=s.target.state}),o.state!=="granted"&&(i.onchange=s=>{this.clipboardPermission.write=s.target.state})}).catch(r=>{this.clipboardPermission.read="denied",jW.log(r)})}catch{this.clipboardPermission={write:"granted",read:"denied"}}}get isRangeCollapsed(){return this.editor.selection.range.isCollapsed()}get imageTypeCommandItems(){const t=this.isSecureContext&&this.hasClipboardWritePermission;return[{id:"copy-image",name:this.t("contextMenu.copyImage"),subText:gn("CtrlOrCmd+C"),states:t?[]:["disabled"],disableReason:this.isSecureContext&&this.hasClipboardWritePermission?"":this.secureEnvTips(this.t("contextMenu.copyImage"),gn("CtrlOrCmd+C"))},{id:"copy-image-url",name:this.t("contextMenu.copyImageUrl"),states:t?[]:["disabled"]},{id:"image-save-as",name:this.t("contextMenu.imageSaveAs")},{id:"new-tab-open-image",name:this.t("contextMenu.newTabOpenImage")}]}get copyTypeCommandItems(){const t=this.isSecureContext&&!this.isRangeCollapsed;if(this.isFocusImageBlock())return this.imageTypeCommandItems;const e=this.t("copyCutProperty.copy"),r=gn("CtrlOrCmd+C"),i=[{id:"copy",name:e,subText:r,states:t?[]:["disabled"],disableReason:this.isSecureContext&&this.hasClipboardWritePermission?"":this.secureEnvTips(r,e)}];this.isFocusImageTypeEmbed()&&i.push({id:"image-save-as",name:this.t("contextMenu.imageSaveAs")});const s=this.t("contextMenu.copyMarkdown"),l=gn("CtrlOrCmd+Shift+C");return i.push({id:"copy-markdown",name:s,subText:l,states:t?[]:["disabled"],disableReason:this.isSecureContext&&this.hasClipboardWritePermission?"":this.secureEnvTips(l,s)}),i}get cutCommandItem(){let t=this.isSecureContext&&!this.isRangeCollapsed;const r=this.editor.selection.range.getSelectedBlocks().some(l=>!this.editor.isBlockWritable(l.block));r&&(t=!1);const i=this.t("copyCutProperty.cut"),o=gn("CtrlOrCmd+X");let s="";return t||(!this.isSecureContext||!this.hasClipboardWritePermission?s=this.secureEnvTips(o,i):r&&(s=this.t("contextMenu.uneditableBlockSelected"))),{id:"cut",name:this.t("copyCutProperty.cut"),subText:gn("CtrlOrCmd+X"),states:t?[]:["disabled"],disableReason:s}}get stepItem(){return{id:"step",name:"",type:"separator"}}get selectionCommandItems(){let t=!1;const e=this.editor.selection;e.range.isCollapsed()&&(t=!0),e.range.start.isSimple()&&e.range.end.isSimple()&&(t=e.range.start.offset>0&&e.range.getSelectedBlocks().length===1);const r=[{id:"select-block",name:this.t("contextMenu.selectBlock"),states:t?[]:["disabled"]}];return r.push({id:"select-all",name:this.t("contextMenu.selectAll")}),r}destroy(){this.externalActionHandleMap.clear()}secureEnvTips(t,e){return this.t("copyCutProperty.unsafeEnvTips",{shortCut:t,operation:e})}}const zat="";class QA{constructor(t){m(this,"contextMenu");m(this,"contextMenuCommandItems");m(this,"destroy",()=>{this.contextMenuCommandItems.destroy(),this.contextMenu.off("show",this.handleContextMenuShown),this.contextMenu.off("click",this.handleContextMenuClick),this.contextMenu.off("close",this.handleContextMenuClose),document.removeEventListener("contextmenu",this.handleContextMenu)});m(this,"updateEditorCaret",t=>{const{x:e,y:r,target:i}=t,o=k1(this.editor,e,r);if(!o)return;const s=this.editor.getBlockById(o.focus.blockId),l=this.editor.selection.range;let c=!1;i instanceof HTMLImageElement&&Ot(s)==="embed"&&ln(s)==="image"?c=!1:l.isSimple()?c=l.getSelectedBlocks().some(d=>Pt(this.editor,d.block)?d.block.contains(s):d.block.id===(o==null?void 0:o.focus.blockId)&&d.start.offset<=o.focus.offset&&d.end.offset>=o.focus.offset):c=l.getSelectedContainers().some(h=>h.contains(s)),c||this.editor.selectionHandler.handleMouseDown(t,{autoScroll:!1})});m(this,"handleContextMenu",t=>{if(me.isMobile||!this.editor.findCustom("editor-context-menu"))return;const r=t.target;if(this.editor.findCustom("toolbar-handler")&&this.editor.getCustom("toolbar-handler").isInToolbar(t)){t.preventDefault();return}if(this.editor.findCustom("block-menu")){const o=this.editor.getCustom("block-menu");if(o.blockMenu.isInMenu(r)||o.emptyBlockMenu.isInMenu(r)){t.preventDefault();return}}if(this.isInEditor(t)){t.preventDefault(),this.updateEditorCaret(t),this.contextMenu.manualShow(document.body,{theme:"light",point:{x:t.clientX,y:t.clientY}});return}this.isInMenu(t)&&t.preventDefault()});m(this,"isInMenu",t=>this.contextMenu.isInCommandBar(t.target));m(this,"isInEditor",t=>{const e=t.target;if(!e)return!1;let r=e.closest("div.editor-root"),i=this.editor.rootElement===r;if(!i&&e.classList.contains("editor-disable-scroll")){const s=Fe(t.x,t.y);r=(s==null?void 0:s.closest("div.editor-root"))||null,i=this.editor.rootElement===r}const o=t.target instanceof HTMLInputElement||t.target instanceof HTMLTextAreaElement;return i&&!o});m(this,"handleContextMenuShown",async()=>{this.editor.findCustom("toolbar-handler")&&this.editor.getCustom("toolbar-handler").hide();const t=await this.contextMenuCommandItems.getCommandItems();this.contextMenu.updateItems(t)});m(this,"handleContextMenuClick",(t,e)=>{if(this.contextMenuCommandItems.handleActionByExternal(e))return;const{id:r}=e;switch(r){case"copy":u4(this.editor);break;case"copy-markdown":FW(this.editor);break;case"cut":if(this.handleImageEmbedAction(r))break;KW(this.editor);break;case"paste":HW(this.editor);break;case"copy-image":case"copy-image-url":case"image-save-as":case"new-tab-open-image":this.handleImageEmbedAction(r);break;case"select-all":rm(this.editor,this.editor.rootContainer);break;case"select-block":bC(this.editor);break}});m(this,"handleContextMenuClose",()=>{this.editor.focus()});this.editor=t,this.contextMenu=new dl([],void 0,{id:`right-context-menu-${t.clientId}`,classes:[_.getCurrentLang(),"editor-context-menu"]}),this.contextMenu.on("show",this.handleContextMenuShown),this.contextMenu.on("click",this.handleContextMenuClick),this.contextMenu.on("close",this.handleContextMenuClose),document.addEventListener("contextmenu",this.handleContextMenu),this.contextMenuCommandItems=new zW(t)}handleImageEmbedAction(t){const e=this.editor.selection.focusedBlock;if(Le(e)&&ln(e)==="image"){const r=e,i=Xe.getImageObject(this.editor,r),o=i.getSelectedIndex(),s=i.getImages();if(o!==-1){let l=r.querySelectorAll("img")[o].src;if(l){switch(l=this.editor.doc.buildResourceUrl(l),t){case"cut":Tg(this.editor,null),kg(this.editor);break;case"copy-image":Tg(this.editor,null);break;case"copy-image-url":Tf([{type:"text/plain",data:new Blob([l],{type:"text/plain"})}]);break;case"image-save-as":a4(l,s[o].src);break;case"new-tab-open-image":window.open(l);break}return!0}}}else switch(t){case"image-save-as":$W(this.editor,e);break}return!1}}const GW={contextMenu:{copyMarkdown:"\u590D\u5236\u4E3A Markdown",paste:"\u7C98\u8D34",copyImage:"\u590D\u5236\u56FE\u7247",copyImageUrl:"\u590D\u5236\u56FE\u7247\u5730\u5740",imageSaveAs:"\u56FE\u7247\u53E6\u5B58\u4E3A",newTabOpenImage:"\u65B0\u6807\u7B7E\u9875\u6253\u5F00\u56FE\u7247",selectBlock:"\u9009\u4E2D\u533A\u5757",selectAll:"\u9009\u4E2D\u5168\u6587",uneditableBlockSelected:"\u9009\u4E2D\u533A\u57DF\u5305\u542B\u9501\u5B9A\u533A\u5757\uFF0C\u6682\u4E0D\u652F\u6301\u526A\u5207"}},WW={contextMenu:{copyMarkdown:"Copy as Markdown",paste:"paste",copyImage:"Copy image",copyImageUrl:"Copy image address",imageSaveAs:"Save image as",newTabOpenImage:"Open image in a new tab",selectBlock:"Select the block",selectAll:"Select all",uneditableBlockSelected:"The selected area contains locked blocks, and cutting is not currently supported"}},qW={contextMenu:{copyMarkdown:"Markdown \u3068\u3057\u3066\u30B3\u30D4\u30FC",paste:"\u8CBC\u308A\u4ED8\u3051",copyImage:"\u753B\u50CF\u3092\u30B3\u30D4\u30FC",copyImageUrl:"\u753B\u50CF\u30A2\u30C9\u30EC\u30B9\u3092\u30B3\u30D4\u30FC",imageSaveAs:"\u540D\u524D\u3092\u4ED8\u3051\u3066\u753B\u50CF\u3092\u4FDD\u5B58",newTabOpenImage:"\u65B0\u3057\u3044\u30BF\u30D6\u3067\u753B\u50CF\u3092\u958B\u304F",selectBlock:"\u30D6\u30ED\u30C3\u30AF\u3092\u9078\u629E",selectAll:"\u30C6\u30AD\u30B9\u30C8\u3092\u5168\u9078\u629E",uneditableBlockSelected:"\u9078\u629E\u3057\u305F\u30A8\u30EA\u30A2\u306B\u30ED\u30C3\u30AF\u3055\u308C\u305F\u30D6\u30ED\u30C3\u30AF\u304C\u542B\u307E\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u5207\u308A\u53D6\u308A\u304C\u3067\u304D\u307E\u305B\u3093"}};_.mergeLang({"zh-CN":GW,"en-US":WW,"ja-JP":qW});function JA(n,t){return t.map(e=>{var o,s;const r=ae(n,e),i=(o=r.getBlockProperties)==null?void 0:o.call(r,n,e);return Le(e)||Pt(n,e)?i!=null&&i.abstract?`[${i.abstract}]`:"":(s=i==null?void 0:i.abstract)!=null?s:""}).join(" ")}function Dg(n){const{editor:t,commentGroupId:e,abstract:r="text"}=n,i=it(),o=t.doc.getUser(),s=Date.now(),l=e!=null?e:i;return{id:i,groupId:l,userId:o.userId,displayName:o.displayName,avatarUrl:o.avatarUrl,abstract:r,created:s,modified:s}}function f4(n,t,e){const r=e.id,o=n.getBlockData(t).comments;let s;o?s=[...o,r]:s=[r];const l={comments:s};n.updateBlockData(t,l)}function ZA(n,t,e){const r=JA(n,[t]),i=Dg({editor:n,abstract:r});f4(n,t,i);const o=Xo();return e.localCreateComment(i,o),i}const XW=D("standard-block-actions");class YW{constructor(t,e){m(this,"executeCommand",(t,e,r)=>{const i=r.data;try{this.editorComments.showCommentList();const o=t.getBlockById(i);ZA(t,o,this.provider)}catch(o){XW.error(`failed to execute block command: ${JSON.stringify(o)}`)}});this.provider=t,this.editorComments=e}commands(t,e){const r=dt(e);return{group:"block-comment-actions",commands:[{id:"comment",name:_.t("comment.quickMenuCommand"),data:r,order:100,states:t.readonly?["disabled"]:[]}],executeCommand:this.executeCommand}}}class QW{async handleBeforePasteDoc(t,e){return Object.values(e.blocks).forEach(r=>{r.forEach(i=>{delete i.comments,i.text&&i.text.forEach(o=>{if(o.attributes){const s=o.attributes;Object.keys(s).forEach(l=>{l.startsWith("comment-")&&delete s[l]})}})})}),!1}}var ge=(n=>(n.SwitchUp="switch-up",n.SwitchDown="switch-down",n.CommentItemReply="comment-item-reply",n.CommentItemMore="comment-item-more",n.CommentItemOk="comment-item-ok",n.CommentItemCancel="comment-item-cancel",n.CommentItemDelete="comment-item-delete",n.CommentItemEdit="comment-item-edit",n.QuickReply="quick-reply",n.QuickReplyOk="quick-reply-ok",n.QuickReplyCancel="quick-reply-cancel",n))(ge||{});const tx="group-item-action",d4="last-comment-item",JW="disabled",h4=500;function Su(n){return n.id!==n.groupId}function m4(n,t=".comment-item-root"){return n.querySelectorAll(t).length}function ZW(n){const t=n.closest(".comment-item-root");return t?t.id:null}function as(n,t){n.setAttribute(tx,t)}function tq(n){return n.closest(`[${tx}]`)}function eq(n){var t;return(t=n.getAttribute(tx))!=null?t:""}function nq(n){return n.disabled||n.classList.contains(JW)}function g4(n,t){const e=n.rootContainer.querySelector(`[comment-${t.toLocaleLowerCase()}=${t}]`);if(!e)return null;const r=e.closest('[data-type="editor-block"]');return r?r.id:null}function p4(n){return Array.from(n.attributes).map(e=>e.name).filter(e=>e.startsWith("comment-")).map(e=>e.replace("comment-",""))}const C4=D("doc-comments");function E4(n,t,e,r){if(t.comments){const o=t.comments;Array.isArray(o)&&o.forEach(s=>{r.has(s)||(r.add(s),e.push(s))})}t.text&&t.text.forEach(s=>{if(s.attributes){const l="comment-";Object.entries(s.attributes).forEach(([c,d])=>{if(c.startsWith(l)){const h=d;r.has(h)||(r.add(h),e.push(h))}})}});const i=t.children;!i||i.forEach(o=>{n.blocks[o].forEach(l=>{E4(n,l,e,r)})})}function rq(n){const t=[],e=new Set;n.blocks.root.forEach(i=>{E4(n,i,t,e)});const r=new Map;return t.forEach((i,o)=>r.set(i,o)),r}function iq(n){const t=new Map;n.forEach(i=>{if(Su(i)){const o=t.get(i.groupId);o?o.push(i):t.set(i.groupId,[i])}});const e=[];return n.forEach(i=>{var o;if(!Su(i)){const s=(o=t.get(i.id))!=null?o:[];t.delete(i.id);const l={...i,children:s};e.push(l)}}),Array.from(t.values()).forEach(i=>{const o=i[0],s=i.slice(1),l={...o,children:s};e.push(l)}),e}function Rl(n,t){const e=n.doc.toJSON(),r=rq(e);return iq(t.getComments()).filter(s=>r.has(s.groupId)).sort((s,l)=>{const c=r.get(s.groupId),d=r.get(l.groupId);return p(C4,c!==void 0,`comment not exists in doc, ${s.groupId}`),p(C4,d!==void 0,`comment not exists in doc, ${l.groupId}`),c-d})}function A4(n){const{children:t,...e}=n,r=[e];return t.forEach(i=>{r.push(i)}),r}function oq(n,t){return Rl(n,t).length}function ex(n,t){const e=[],r=n.getBlockById(t.blockId);if(st(n,r)){const o=t.blockId,s=t.offset,l=n.getBlockById(o),c=n.getBlockText(l),d=Hc(c,s);d&&Object.entries(d).forEach(([h,C])=>{h.startsWith("comment-")&&e.push(C)})}const i=r.attributes;for(let o=0;o<i.length;o++){const s=i[o];s.name.startsWith("comment-")&&e.push(s.value)}return e}function x4(n){const t=n.selection.range;if(!t.isSimple())return[];if(t.start.blockId!==t.end.blockId)return[];if(t.isCollapsed())return ex(n,t.start);const{start:e,end:r}=t,i=ex(n,e),o=ex(n,r);return Mp.default(i,o)}const sq=D("active-comments");function b4(n,t){n.rootContainer.querySelectorAll(`span.comment[comment-${t}],[data-type=editor-block].comment[comment-${t}]`).forEach(r=>{ut(r,"active")})}function v4(n,t,e){const r=n.rootContainer.querySelector("span.comment.active,[data-type=editor-block].comment.active");if(!t)r&&p4(r).forEach(o=>b4(n,o));else{const i=t.toLocaleLowerCase();if(r){const s=p4(r);if(s.length===1&&s[0]===i)return;s.forEach(l=>b4(n,l))}const o=n.rootContainer.querySelectorAll(`span.comment[comment-${i}],[data-type=editor-block].comment[comment-${i}]`);if(o.length){o.forEach(l=>{q(l,"active")});const s=o[0];if(ca(s)){const l=mt(s,0,"normal");n.selection.setSelection(l,void 0,{noScroll:e==="next"})}else if(x4(n).indexOf(t)===-1){const c=et(s);p(sq,c,"block not found");const d=ga(c,s),h=mt(c,d.start,"normal");n.selection.setSelection(h,void 0,{noScroll:e==="next"})}if(n.focus(),e==="next"){const l=s.getBoundingClientRect(),c=n.scrollContainer.clientHeight;l.top>c/2&&ia(s,{elementToScroll:n.scrollContainer,verticalOffset:-n.scrollContainer.clientHeight/2})}}}}const Gat="";D("comment-editor");const{t:lq}=_,nx="comment-editor-readonly",Zd="comment-editor-editing";class rx{constructor(t,e,r){m(this,"root");m(this,"components");m(this,"handleEditorBlur",()=>{this.inactiveEditor()});m(this,"handleEditorFocus",()=>{this.editor.readonly||this.activeEditor()});m(this,"activeEditor",()=>{Mt(this.root,Zd)||q(this.root,Zd)});m(this,"inactiveEditor",()=>{ut(this.root,Zd)});m(this,"handleInsertImg",async()=>{const{editor:t}=this.components,e=Et(t.rootContainer),r=await Uc("image/*",{container:this.root});if(!r){t.focus();return}const i={src:"",widthPercent:50},o={id:it(),type:"embed",embedType:"image",embedData:i},s=t.options.componentsOptions.image;s!=null&&s.defaultAlign&&(o.align=s.defaultAlign);const l=t.getFocusedBlock(),c=t.getBlockIndex(l),d=t.insertBlock(e,c+1,o);Xe.getImageObject(t,d).replaceImage(0,r),t.focus()});m(this,"handleReadonlyChange",t=>{t.readonly?(ut(this.root,Zd),q(this.root,nx)):(q(this.root,Zd),ut(this.root,nx))});m(this,"setDoc",t=>{const{components:{editor:e}}=this;e.doc.externalDoc.setDoc(t)});m(this,"getDoc",()=>{const{components:{editor:t}}=this;return t.doc.toJSON()});m(this,"isEmpty",()=>G1(this.getDoc()));m(this,"edit",()=>{const{editor:t}=this.components;t.readonly=!1,AC(t),this.activeEditor(),t.focus()});m(this,"clear",()=>{const t=Xo();this.setDoc(t)});m(this,"readonly",()=>{const{editor:t}=this.components;t.readonly=!0});m(this,"destroy",()=>{const{root:t,components:{editor:e,insertImgButton:r}}=this;r.onclick=null,e.destroy(),t.remove()});this.mainEditor=t,this.commentsProvider=e,this.doc=r,this.root=B("div",["comment-editor",nx],null),this.components=this.createEditor()}createEditor(){const t=B("div",["comment-editor-root"],this.root),{commentsProvider:e,mainEditor:r}=this,i=e.createCommentEditor(t,new LC(this.doc));i.readonly=!0,i.addListener("readonlyChanged",this.handleReadonlyChange),i.addListener("focus",this.handleEditorFocus),i.addListener("blur",this.handleEditorBlur);const o=Sa(this.root,"comment-editor-img",lq("comment.image"),IT,void 0,r.clientId);return o.classList.add("comment-editor-img"),o.onclick=this.handleInsertImg,{editor:i,insertImgButton:o}}get editor(){return this.components.editor}}class aq{constructor(t){m(this,"handleBeforeKeyDown",(t,e)=>{if(Gi(e,"Enter")){const{quickReply:r,updateLastCommentItem:i}=this.groupItem;return r.getReplyEditor().isEmpty()?(r.hideReplyEditor(),!0):(r.reply(),i(),!0)}return!1});this.groupItem=t}}class cq{constructor(t,e,r){m(this,"handleBeforeKeyDown",(t,e)=>{if(Gi(e,"Enter")){const{quickReply:r}=this.groupItem,{comment:i,getCommentEditor:o}=this.commentItem,s=o();if(s.isEmpty())this.commentsProvider.localDeleteComment(i.id);else{const l=s.getDoc();this.commentsProvider.localUpdateComment(i,l),s.readonly()}return r.show(),!0}return!1});this.commentsProvider=t,this.groupItem=e,this.commentItem=r}}const uq=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
729
729
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.65499 6.6665C3.09433 6.6665 2.66699 7.1275 2.66699 7.67617C2.66699 8.2255 3.02633 8.64284 3.65499 8.6645C4.23833 8.6645 4.66399 8.26917 4.66399 7.67617C4.66399 7.1275 4.23899 6.6665 3.65499 6.6665ZM12.9883 6.6665C12.4277 6.6665 12.0003 7.1275 12.0003 7.67617C12.0003 8.2255 12.3597 8.64284 12.9883 8.6645C13.5717 8.6645 13.9973 8.26917 13.9973 7.67617C13.9973 7.1275 13.5723 6.6665 12.9883 6.6665ZM8.32166 6.6665C7.76099 6.6665 7.33399 7.1275 7.33399 7.67617C7.33399 8.2255 7.69299 8.64284 8.32166 8.6645C8.90499 8.6645 9.33066 8.26917 9.33066 7.67617C9.33066 7.1275 8.90566 6.6665 8.32166 6.6665Z" fill="currentColor"></path>
730
730
  </svg>`,fq=`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
731
731
  <path d="M2 4V11C2 11.5523 2.44772 12 3 12H10L12.5528 13.2764C13.2177 13.6088 14 13.1253 14 12.382V4C14 3.44772 13.5523 3 13 3H3C2.44772 3 2 3.44772 2 4Z" stroke="currentColor"/>
@@ -963,4 +963,4 @@ ${o.mermaidText}
963
963
  ${o.flowchartText}
964
964
  \`\`\`\`\`\``}return""}const rZ={embedType:"flowchart",convertFrom:tZ,handleUpdateBlock:ZJ,createEmbedContent:JJ,getBlockProperties:eZ,convertTo:nZ},iZ=D("plantuml-helper");function zS(n,t){var l;let r=((l=(n.getComponentOptions("plantuml")||{}).cdn)==null?void 0:l.plantuml)||UJ;r.endsWith("/")||(r+="/");const i=k9.default.encode(t);p(iZ,i,i),r+=i;const s=new URLSearchParams(document.location.search).get("doc");return Gp(r,{id:`${s}-${it()}`})}async function oZ(n,t){try{const e=await Bx(n,t);return(await n.doc.uploadResource(e)).resourceId}catch{return Promise.resolve(t)}}class Nu extends Lx{constructor(t){super(t,"plantuml","plantumlText")}static get(t,e){return t.addCustom(`plantuml-${e.id}`,()=>new Nu(t))}code2ObjectUrl(t){return Promise.resolve(zS(this.editor,t))}code2ResourceId(t){const e=zS(this.editor,t);return oZ(this.editor,e)}destroy(){}}function sZ(n,t,e){Nu.get(n,e).createEmbedContent(t,e)}function lZ(n,t,e){const r=Nu.get(n,e),i=zt(t);return r.updateEmbedContent(i,e),!0}function aZ(n,t,e){const{data:r}=e,i=n.getBlockString(t).trim();if(!r||r.embedType!=="plantuml"||i!=="```plantuml"||!st(n,t))return null;const o={src:"",plantumlText:""};return{blockData:{id:it(),type:"embed",embedType:"plantuml",embedData:o},onConverted:(c,d)=>{Nu.get(c,c.getBlockData(d)).editGraph(zt(d))}}}function cZ(n,t){return Nu.get(n,n.getBlockData(t)).getBlockProperties(t)}function uZ(n,t,e,r){const{embedData:i}=t,o=i;if(r==="html")return o.src?`<img src="${n.doc.buildResourceUrl(o.src,{withToken:!0})}" />`:o.flowchartText?`<div>${o.flowchartText}</div>`:"<p>[plantuml]</p>";if(r==="markdown"){if(o.src)return`![plantuml](${n.doc.buildResourceUrl(o.src,{withToken:!0})})`;if(o.flowchartText)return`\`\`\`plantuml\`\`\`
965
965
  ${o.flowchartText}
966
- \`\`\`\`\`\``}return""}const fZ={embedType:"plantuml",convertFrom:aZ,handleUpdateBlock:lZ,createEmbedContent:sZ,getBlockProperties:cZ,convertTo:uZ},Ect="",dZ="hr",hZ={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},mZ={dividingLine:{type:"Dividing-Line",abstract:"Dividing-Line"}},gZ={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};_.mergeLang({"zh-CN":hZ,"en-US":mZ,"ja-JP":gZ});function pZ(n,t){const e=B("div",["editor-embed-container"],t);B("hr",["editor-embed-hr"],e)}function CZ(n,t,e,r){return r==="html"?"<hr />":r==="markdown"?"---":"------------"}function EZ(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:_.t("dividingLine.type"),icon:qT,order:500,group:"common",subText:tr("insert-hr")}],handleInsertEmptyEmbed:async(n,t)=>{const{containerId:e,blockIndex:r}=t;return n.insertEmbed(e,r,dZ,{})}}}function AZ(n,t,e){const{data:r}=e;if(!r||r.embedType!=="dividing-line"||!st(n,t))return null;const i={};return{blockData:{id:it(),type:"embed",embedType:"hr",embedData:i}}}function xZ(){return{abstract:_.t("dividingLine.abstract")}}const bZ={embedType:"hr",createEmbedContent:pZ,convertTo:CZ,getOptions:EZ,convertFrom:AZ,getBlockProperties:xZ},Act="",xct="",vZ={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>',maxSizeFailed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6</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"}}},BZ={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>',maxSizeFailed:'<div class="line-1">{name} upload failed</div><div class="line-2">The file size exceeds limit. Please choose another file.</div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},yZ={media:{upload:{failed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>',maxSizeFailed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u30D5\u30A1\u30A4\u30EB\u306E\u30B5\u30A4\u30BA\u304C\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u308B\u305F\u3081\u3001\u4ED6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</div>'},load:{failed:'<div class="line-1">{name}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},audio:{menuItem:"\u97F3\u58F0",abstract:"\u97F3\u58F0"},video:{menuItem:"\u52D5\u753B",abstract:"\u52D5\u753B"}}};_.mergeLang({"zh-CN":vZ,"en-US":BZ,"ja-JP":yZ});var Mi=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Mi||{}),ah=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(ah||{});const GS=10*1024*1024,TZ=["wav","mp3","aac","ogg","webm","flac"],kZ=["ogg","mp4","webm"],RZ=()=>{};function WS(n){var h,C,E,A,v,R;const t=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:e,maxSize:r,callbacks:i}=t,o=(C=e==null?void 0:e.audio)!=null?C:TZ,s=(E=e==null?void 0:e.video)!=null?E:kZ,l=(A=r==null?void 0:r.audio)!=null?A:GS,c=(v=r==null?void 0:r.video)!=null?v:GS,d=(R=i==null?void 0:i.onError)!=null?R:RZ;return{allowedMedias:{audio:o,video:s},maxSize:{audio:l,video:c},callbacks:{onError:d}}}function wZ(n,t){const e=o=>o.map(s=>`.${s}`).join(","),{allowedMedias:r}=WS(n),i=r[t];return i?e(i):"*"}function SZ(n,t,e){const{maxSize:r,callbacks:i,allowedMedias:o}=WS(t),{[e]:s}=r,{[e]:l}=o;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${e}`,i!=null&&i.onError&&(i==null||i.onError(t,d)),d}const c=kf(n.name);if(l&&!l.includes(c.toLowerCase())){const d=new Error(`media file is not allowed: ${c}`);throw d.code="NotAllowedFile",i!=null&&i.onError&&(i==null||i.onError(t,d)),d}}function LZ(n){return n===ah.Empty||n===ah.Error}const xn=D("media");class IZ extends je.TypedEmitter{constructor(e){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(e,r)=>{if(!r.target||!(r.target instanceof Node)||!(r.target instanceof Element?r.target:r.target.parentElement))return;const o=et(r.target);if(!o||!o.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",e,"load_error",dt(o))});m(this,"handleUploadFile",async e=>{p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const{editor:r}=this.options,i=et(this.mediaContainer);p(xn,i,"The block element not exist");const o=r.getBlockData(i);try{const{resourceId:s}=await r.doc.uploadResource(e,{onProgress:C=>{this.renderProgress(C,e)}}),{name:l,type:c,size:d}=e,h={...o,embedData:{...o.embedData,src:s,fileName:l,fileSize:d,fileType:c}};r.updateBlockData(i,h)}catch(s){xn.error(s),this.emit("mediaError",r,"upload_error",o.id),this.renderRetry(e,s)}ut(i,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=e}bindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(e){p(xn,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(e)}renderError(){p(xn,this.abstract,"no abstract");const{editor:e,createMediaElement:r}=this.options,{mediaIcon:i,mediaName:o}=this.abstract;p(xn,this.mediaContainer,"The media element not exist");const s=et(this.mediaContainer);p(xn,s,"The block element not exist");const l=e.getBlockData(s),c=B("div",["media-error","embed-selected-content","embed-hover-content"],null),d=B("span",["media-error-icon"],c);d.innerHTML=i;const h=B("div",[],c);h.innerHTML=_.t("media.load.failed",{name:o}),c.appendChild(h);const C=h.querySelector(".retry-upload");return p(xn,C,"The element not exist"),e.domEvents.addEventListener(C,"click",(E,A)=>{const v=B("div",["media-element"],null),R=this.getResourceUrl(l),S=r(E,v,l,R);this.unbindMediaEvent(),this.media=S,this.bindMediaEvent(),this.updateMediaContent(v)}),this.setFullScreen(),c}renderRetry(e,r){var E,A;p(xn,this.abstract,"no abstract");const{editor:i}=this.options,{mediaIcon:o,mediaName:s}=this.abstract,l=B("div",["media-error","embed-selected-content","embed-hover-content"],null),c=B("span",["media-error-icon"],l);c.innerHTML=o;const d=B("div",[],l);let h=_.t("media.upload.failed",{name:s});(((E=r.response)==null?void 0:E.status)===420||((A=r.response)==null?void 0:A.status)===413)&&(h=_.t("media.upload.maxSizeFailed",{name:s})),d.innerHTML=h,l.appendChild(d);const C=d.querySelector(".retry-upload");C&&i.domEvents.addEventListener(C,"click",()=>{i.readonly||(p(xn,this.abstract,"no abstract"),this.handleUploadFile(e))}),this.updateMediaContent(l),this.setFullScreen()}renderProgress(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope .media-progress"),o=e===-1||e===100?100:e;if(i){const{updateProgressElement:s}=this.options;s(i,o)}else{const{createProgressElement:s}=this.options,l=et(this.mediaContainer);p(xn,l,"The element not exist"),q(l,"media-block-uploading");const c=B("div",["media-progress"],null);s(c,o,r),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:o,updateMediaElement:s,editor:l}=this.options,c=this.getResourceUrl(e,r);if(i){const d=s(l,i,e,c);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent()}else{const d=B("div",["media-element"],null),h=o(l,d,e,c);this.unbindMediaEvent(),this.media=h,this.bindMediaEvent(),this.updateMediaContent(d)}}renderEmpty(e){p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const r=B("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);r.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(r);const{editor:i}=this.options;i.findBlockById(e.id)&&this.emit("mediaError",i,"empty",e.id),this.setFullScreen()}getResourceUrl(e,r){const{src:i}=e.embedData,{editor:o}=this.options;return o.doc.buildResourceUrl(i,{syncNewResources:async(s,l)=>{var d,h;if(!r)return;await o.doc.addResources([s]);const c=(h=(d=o.doc).getServerMeta)==null?void 0:h.call(d).appId;if(l!==e.embedData.src&&c&&e.embedData.src.includes(c)){const C=et(r);if(C&&!o.readonly&&o.isBlockWritable(C)){const E=xt.default(e);E.embedData.src=s,o.updateBlockData(C,E)}}}})}setFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),q(this.mediaContainer,"full-screen")}removeFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),ut(this.mediaContainer,"full-screen")}updateBlockAlign(e,r){const i=et(r);p(xn,i,"The block element not exist");const{align:o}=e;e.embedType==="video"&&(i.hasAttribute("data-style-align")&&i.removeAttribute("data-style-align"),i.setAttribute("data-style-align",o))}render(e,r){const{src:i}=e.embedData;(!this.mediaContainer||!r.contains(this.mediaContainer))&&(this.mediaContainer=B("div",["media"],r)),this.updateBlockAlign(e,r),LZ(i)?i===ah.Empty&&this.renderEmpty(e):this.renderMediaElement(e,r)}setAbstract(e){this.abstract=e}}D("media-embed");const DZ="left";class qS{constructor(){m(this,"handleInsertEmptyEmbed",async(t,e)=>{var C;const{containerId:r,blockIndex:i}=e;let o;(C=e.data)!=null&&C.file&&(o=e.data.file);const s=wZ(t,this.embedType);if(o=o!=null?o:await Uc(s,{}),!o)return null;const{mediaType:l}=this.getAbstract();try{SZ(o,t,l)}catch{return null}const c={id:it(),type:"embed",embedType:this.embedType,embedData:{src:ah.Empty}};l==="video"&&(c.align=DZ);const d=t.insertBlock(r,i,c);return await this.getMedia(t,c.id).handleUploadFile(o),d})}getMedia(t,e){const r=t.addCustom(`media-${e}`,()=>new IZ({editor:t,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return r.setAbstract({...this.getAbstract()}),r}getOptions(){const{menuItem:t,mediaIcon:e,mediaName:r,order:i,group:o}=this.getAbstract();return{name:r,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:t,icon:e,order:i,group:o,subText:tr(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(t,e,r){const{id:i}=r;this.getMedia(t,i).render(r,e)}handleUpdateBlock(t,e,r){const{id:i}=r,o=this.getMedia(t,i),s=zt(e);return o.render(r,s),!0}handleDeleteBlock(t,e){const r=e.id,i=this.getMedia(t,r);i.removeAllListeners(),i.destroy()}convertTo(t,e,r,i){const o=e.embedData,s=t.doc.buildResourceUrl(o.src,{withToken:!0});return i==="html"?`<${o.type} src="${s}" />`:i==="markdown"?`![${o.src}](${s})`:s}}function XS(n,t){const e=B("div",["uploading-progress-mask"],n),r=B("div",["uploading-progress-bar"],e),i=B("div",["uploading-progress-bar-value"],r);i.style.width=`${t}%`}function YS(n,t){const e=n.querySelector(".uploading-progress-bar-value");e&&(e.style.width=`${t}%`)}const _Z=D("media-audio");class MZ extends qS{constructor(){super(...arguments);m(this,"embedType",Mi.AUDIO);m(this,"updateProgressElement",YS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["audio-container","embed-hover-content","embed-selected-content"],r),l=B("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=o,setTimeout(()=>{this.getMedia(e,i.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:zT,mediaName:_.t(`media.${Mi.AUDIO}.menuItem`),menuItem:_.t(`media.${Mi.AUDIO}.menuItem`),order:800,mediaType:Mi.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Mi.AUDIO}.abstract`)}`}}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .audio-container > audio");return p(_Z,s,"The media element not exist"),s.src!==o&&(s.src=o),s}createProgressElement(e,r){const i=B("audio",[],e);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,i.src="about:blank",XS(e,r)}}const UZ=new MZ;D("video-resizer");function QS(n){return n&&Le(n)&&ln(n)==="video"}const OZ=50;class Ix{constructor(t){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(t,e)=>{if(!this.resizing&&!window.isDragging&&(e&&QS(e)&&this.disableBlockResize(e),t&&QS(t)&&this.editor.isBlockWritable(t))){const r=this.getVideoElement(t);if(!r)return;this.enableBlockResize(t,r)}});m(this,"handleResizing",(t,e)=>{if(this.resizing=!0,!this.currentResizableElement)return;const r=t.getBlock();if(!r)return;const i=r.getBoundingClientRect().width,o=Math.min(Math.max(e.width,OZ),i);this.currentResizableElement.style.width=`${o}px`,this.currentResizableElement.style.pointerEvents="none"});m(this,"handleResized",t=>{this.resizing=!1;const e=t.getBlock();if(!this.currentResizableElement||!e)return;const r=this.editor.getBlockData(e),{width:i}=this.currentResizableElement.getBoundingClientRect();this.currentResizableElement.style.pointerEvents="auto",this.editor.updateBlockData(e,{...r,width:i})});this.editor=t,ze.get(t).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,ze.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(t){return zt(t).querySelector(":scope .video-container > video")}updateResizer(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.updateResizer()}disableBlockResize(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.disableResize()}enableBlockResize(t,e){const r=this.editor.addCustom(`${dt(t)}-resizer`,()=>new Pd(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));r.enableResize(t,e),r.removeListener("resizing",this.handleResizing),r.removeListener("resized",this.handleResized),r.addListener("resizing",this.handleResizing),r.addListener("resized",this.handleResized),this.currentResizableElement=e}}const NZ=D("video");class PZ extends qS{constructor(){super(...arguments);m(this,"embedType",Mi.VIDEO);m(this,"updateProgressElement",YS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["video-container","embed-selected-content","drag-preview-element"],r),l=B("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=o,l.addEventListener("canplay",()=>{e.addCustom("video-resizer",()=>new Ix(e)),this.getMedia(e,i.id).removeListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).addListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).removeFullScreen()}),i.width&&(l.style.width=`${i.width}px`),l});m(this,"createProgressElement",(e,r,i)=>{const o=B("video",["progress-video"],e);o.innerHTML="Your browser does not support the <code>audio</code> element.",o.controls=!0,XS(e,r),Mc(i).then(s=>{const l=e.querySelector(".progress-video");l&&h1(e)&&(l.src=s)})})}getAbstract(){return{mediaName:_.t(`media.${Mi.VIDEO}.menuItem`),mediaIcon:GT,menuItem:_.t(`media.${Mi.VIDEO}.menuItem`),order:700,mediaType:Mi.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Mi.VIDEO}.abstract`)}`}}handleMediaError(e,r,i){const o=e.addCustom("video-resizer",()=>new Ix(e)),s=e.getBlockById(i);o.disableBlockResize(s)}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .video-container > video");p(NZ,s,"The media element not exist"),s.src!==o&&(s.src=o),i.width?s.style.width=`${i.width}px`:s.style.width="";const l=e.getBlockById(i.id);return setTimeout(()=>{e.addCustom("video-resizer",()=>new Ix(e)).updateResizer(l)}),s}}const FZ=new PZ,JS=[mA,vA,BA,Fk],Dx=[FS,EJ,qJ,rZ,fZ,XK,bZ,FZ,UZ,Gz,CS,SX],ZS=[Jk,xS,H4];function KZ(n,t,e){var i,o,s,l;Br.level=(i=e.logLevel)!=null?i:zi.DEBUG;const r=td(n,t,{components:{blocks:[...JS,...((o=e==null?void 0:e.components)==null?void 0:o.blocks)||[]],embeds:[...Dx,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[...ZS,...((l=e.components)==null?void 0:l.boxes)||[]],textRenders:[new JE],options:{...e.componentsOptions}}});return r.readonly=!0,r.addCustom("heading-collapse",()=>new gx(r)),r.addCustom("editor-tooltip",()=>new ag(r)),r.addListener("clickLink",(c,d,h)=>{var E;if((E=e==null?void 0:e.events)!=null&&E.onClickLink){e.events.onClickLink(c,d,h);return}const C=h.getAttribute("link");C&&(c.readonly||d.ctrlKey||d.metaKey)&&window.open(C,"_blank")}),r}class tL{constructor(t){this.createOptions=t,t.lang&&_.setLang(t.lang)}createHistoryEditor(t,e){return KZ(t,e,this.createOptions)}}function eL(n,{root:t,childDoc:e,doc:r}){var h,C;e.uploadResource=r.uploadResource.bind(r),e.buildResourceUrl=r.buildResourceUrl.bind(r);const i=n.getComponentOptions("comment"),o={image:{defaultAlign:"left"},table:{locatingContainer:t,hideCellMenu:!0,hideToolbar:!0},...i==null?void 0:i.componentsOptions},s=[];n.editorBlocks.forEach(E=>{E.blockType==="text"||E.blockType==="embed"||s.push(E)});const l=[];n.editorEmbeds.forEach(E=>{l.push(E)});const c=[];n.editorBoxes.forEach(E=>{E.boxType==="text"||E.boxType==="br"||E.boxType==="image"||E.boxType==="anchor"||c.push(E)});const d=td(t,e,{shortcuts:[lm],components:{blocks:s,commandProviders:[new Fm],decorators:[new gg],embeds:l,boxes:c,options:o}});if(d.input.addHandler(new Cg),d.input.addHandler(new VA(d)),d.input.addHandler(new qA(d)),d.input.addHandler(new Fq(d)),d.input.addHandler(new bg),d.addCustom("image-paste-handler",()=>new vw(d)),me.isMobile||d.addCustom("editor-tooltip",()=>new ag(d)),n.options.enableContextMenu!==!1&&d.addCustom("editor-context-menu",E=>new QA(E)),(h=n.options.componentsOptions)!=null&&h.mention){const E=n.options.componentsOptions.mention;d.addCustom("mention",()=>new AS(d,{...E}))}if((C=n.options.componentsOptions)!=null&&C.comment){const E=n.options.componentsOptions.comment;E.onCommentEditorClick&&d.addListener("click",E.onCommentEditorClick)}return d}function VZ(n,t){const e=Array.from(n.rootContainer.querySelectorAll(`[comment-${t.toLocaleLowerCase()}="${t}"]`)),r=new Set;e.forEach(i=>{const o=et(i);o&&r.add(o)}),r.forEach(i=>{Kq(n,i,t)})}class $Z{constructor(t){m(this,"listeners",new Set);m(this,"doc");this.editor=t,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(t){return this.doc.getComment(t)}getCommentDoc(t){return this.doc.getCommentDoc(t)}localCreateComment(t,e){this.doc.localCreateComment(t,e)}localDeleteComment(t){const e=this.getComment(t);this.doc.localDeleteComment(t);const r=e.groupId;this.getComments().filter(o=>o.groupId===r).length===0&&VZ(this.editor,r)}localUpdateComment(t,e){this.doc.localUpdateComment(t,e)}onCreateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onCreateComment(t,e))}onDeleteComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onDeleteComment(t,e))}onUpdateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onUpdateComment(t,e))}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}createCommentEditor(t,e){return eL(this.editor,{root:t,childDoc:e,doc:this.doc})}allowEdit(t){return t.userId===this.doc.getUser().userId}}class HZ{constructor(t,e){m(this,"listeners",new Set);this.editor=t,this.localDoc=e}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(t){return this.doc.comments[t]}getCommentDoc(t){const e=this.doc.comments[t];return YC(e)}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}localCreateComment(t,e){}localDeleteComment(t){}localUpdateComment(t,e){}createCommentEditor(t,e){return eL(this.editor,{root:t,childDoc:e,doc:this.localDoc})}allowEdit(t){return t.userId===this.localDoc.getUser().userId}}const jZ={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}",limitedEnvTips:"\u7531\u4E8E\u6D4F\u89C8\u5668\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528 {shortCut} \u7C98\u8D34"}},zZ={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:"Due to the limitations of the current http access environment, please use the shortcut ({shortCut}) {operation}",limitedEnvTips:"Press {shortCut} to paste due to browser restrictions"}},GZ={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:"\u8907\u88FD",cut:"\u5207\u308B",unsafeEnvTips:"HTTP\u74B0\u5883\u306E\u5236\u7D04\u306B\u3088\u308A\u3001{operation}\u3059\u308B\u306B\u306F\u3001\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8({shortCut}) \u3092\u3054\u4F7F\u7528\u304F\u3060\u3055\u3044",limitedEnvTips:"\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u5236\u9650\u306B\u3088\u308A\u3001\u300C{shortCut}\u300D\u3092\u4F7F\u7528\u3057\u3066\u8CBC\u308A\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044"}};_.mergeLang({"zh-CN":jZ,"en-US":zZ,"ja-JP":GZ});const WZ="UEsDBBQABgAIAAAAIQBk9WPugQEAACkGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtqwzAQRfeF/oPRtsRKuiilxMmij2UbaArdKvI4EdULaZzH33fsJKYUJy5NsjHIM/feowHNcLw2OllCiMrZjA3SPkvASpcrO8/Yx/Sld8+SiMLmQjsLGdtAZOPR9dVwuvEQE1LbmLEFon/gPMoFGBFT58FSpXDBCKRjmHMv5JeYA7/t9++4dBbBYg8rDzYaPkEhSo3J85p+b0kC6MiSx21jlZUx4b1WUiDV+dLmv1J6u4SUlHVPXCgfb6iB8daEqnI4YKd7o9EElUMyEQFfhaEuvnIh57mTpSFletymhdMVhZLQ6Cs3H5yEGGnmRqcIxtMNIDVC2T1/G4csIzrzaTRXpJkE5+PgZJzGtPKDgAqaGR6chS3NDALRn38YjXUnRMSNhnh+gq1vdzwgkuASADvnToQVzN4vRvHDvBOkoNypmGk4P0Zj3QmBtIpg+z39VdQ2xyKps36AtNrCP669312Vuuf/9PKaRLI++X5QrcUc8pZsXi/60TcAAAD//wMAUEsDBBQABgAIAAAAIQAekRq37wAAAE4CAAALAAgCX3JlbHMvLnJlbHMgogQCKKAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArJLBasMwDEDvg/2D0b1R2sEYo04vY9DbGNkHCFtJTBPb2GrX/v082NgCXelhR8vS05PQenOcRnXglF3wGpZVDYq9Cdb5XsNb+7x4AJWFvKUxeNZw4gyb5vZm/cojSSnKg4tZFYrPGgaR+IiYzcAT5SpE9uWnC2kiKc/UYySzo55xVdf3mH4zoJkx1dZqSFt7B6o9Rb6GHbrOGX4KZj+xlzMtkI/C3rJdxFTqk7gyjWop9SwabDAvJZyRYqwKGvC80ep6o7+nxYmFLAmhCYkv+3xmXBJa/ueK5hk/Nu8hWbRf4W8bnF1B8wEAAP//AwBQSwMEFAAGAAgAAAAhADPCW79BAQAA5wQAABwACAF3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzIKIEASigAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArJQxT8MwEIV3JP5D5B07LVAQatoFkDqwQJFYneSSWI3tyL6Q9t9zojRNRYkYPN6z7r1P57Pny62uo09wXlmTsAmPWQQms7kyZcLe189X9yzyKE0ua2sgYTvwbLm4vJi/Qi2RmnylGh+Ri/EJqxCbByF8VoGWntsGDJ0U1mmJVLpSNDLbyBLENI5nwg092OLEM1rlCXOrnPLXuwb+422LQmXwaLNWg8EzEQKpF8hQuhIwYd/lXpxwMmPiPMN1SAaPu5qG2EPs67H4u5DxhTW4lmk9GEMvjUFMQ0KYVqfgaMeOEL00BjEJCZG1Hq3+oLQegvOjKhSCHl2LWUiaipxcrczmSPNj23UdT6XKW55ZLQ7HLzan5KctgjPyT8TbkIgdpG+ASHc0WN+BODarm6BP6BfFQTkgiJPvafEFAAD//wMAUEsDBBQABgAIAAAAIQBOMo6QFgYAAKYkAAARAAAAd29yZC9kb2N1bWVudC54bWzUWttu40QYvkfiHSJfLRKtz4eYTVeOD7uVQKoo+wCuPUmstT3WeNI0XC0XC1wguOBiuWClLgjBE4AEiIdZ0T28BTM+JM6h7cTZkm0vEnv+mW+++eb7/0yc3r13lsSdU4DyCKY9TtwXuA5IAxhG6bDHPfzM2zO4To79NPRjmIIeNwU5d+/g/ffuTswQBuMEpLhDINLcnGRBjxthnJk8nwcjkPj5fhIFCOZwgPcDmPBwMIgCwE8gCnlJEIXiKkMwAHlO5rP99NTPuQouOGNDC5E/IYMpoMIHIx9hcDbHEDcGUfkub6wCSS2AyAolcRVK3hhK4ymrFSClFRBhtYKktkNaszitHZK0iqS3Q5JXkYx2SCt2SlYNDjOQkuAAosTH5BYN+cRHj8bZHgHOfBydRHGEpwRT0GoYP0oftWBERs0QEjncGEHnExiCWA5rFNjjxig1q/F7s/GUulmOr97qEYhl/eUQpyoOxcp5BGKiBUzzUZTNMjxpi0aCoxrk9KpFnCZx3W+SiYzpcll5ckop54As9Cv9k7hkfjWiKDDsCIWYjWChsDhnzSQhLpxP3EqahrgiYwGpAaQVAC0AjAW/xjAqDD6YZyjFiRhTo8Ypd4XiRHNhRcY6tkymAZCDzSDUmkc+TRoryobb2fY+guNsjhZth3Y4L0ITehzYAKuyfzMl8+3IHI/8jNSmJDAPhylE/klMGBEzd4gfO8UO0FeyrfStuARnHVoIuANyfDmB4ZS+ZySimJmP/EPiHEV2dE+3La5oJcUf01a9+iOtJjkqhZ/2OEEQJE1z5FmTAwb+OMY04nUVRRfryFGjqZjwCBVvx3gaE4bmqR/3uAfAp2cukeNpDJVdYj8d1h1AuvfwmEb5KszPkMqX6tqDKc7JoFGUEi7Az7GVR35z4MTEBy/Pv3rz0w+0CZeBZZwrp6ajxIXBlMwaMT2l6wh9lUHMRcnejpjSDYrJoND2GksMGquOY+iu7exIY/m2ayyzaKwaqi4YNNd3obFy2zVWGDTW+7Il296uaoX6LmisMugkKIpouJqwI5202+5FjUFjTfQ8S7OMHWms33aNdQaNJd3qqoq8q5pq3HaNDRaNNcFzRafLoLGtaF2JdlzReDFSaFw1NTTeRMf1XBVLNcSux+KHnXOVBddQLEm6DVxVSxf6nubdPNfFPLNhCCqWdRxBOHARIj3wNCNf1YbIT46xj3CVi6WxA5jmMAb7MRzeWUqQtQhuGi6Mf/H4xxGIY/hhh3xbjMMXj5998BFDrsiSZnuiYjPoZLiC7fV3rVM+zTFI9uEY72eI1KA4baPWnZZyiYYu2oLFlK6u2C3OzqtyLURaytXME8Zvv//+9fOr8y8unj1lWKjqeroraMpWvliMFAutmoq9WDp9aJohGzrLN7o2M7asLrVj6MMbM8/8gBgqQyAH6BRwB5RlZ8l/1HgFrSO0NH29Wws7e5jGUQoa+zvbLgwuQ26YiBGX2SOvn39z8eWT0ik3tbAzvIzMuiuXbkRndSfW+1rRlb7nKExng00SeDuXXcK1qwiWJi99hmme4uiaRfNkJ1wXt2u78+Dr35+8+vPXJTeMSNVGxDuPOsiMyILRYahR/qMoxxBNSREuTbdox+vy4UGNem06MPB+8/0/L7/9ZdluM+JvV6SX539c/P0dg7eFru3alrhUs1VH6kuqPD/gULUcRVAdd51fFiM35m21L3ueJNOJGlwFQ1FFxZ0beQ3Xcrs3WkDV1FjA4qfrx8RZR4QYOSlko3JX0nFS9ozi07juJ8xih2HdVjy65mcDGlmyljCbK5rbf/H109fPf7u6FjfA2R5Rq47sCZq2JL/ueo5o2VfK//8oXf0g8K4rvcf0c4DrGX25v3TElmzV1foiLe47tfrGZf16xWbiLMlTh/yTCmauWA4CfDST+jopimUNjz8nwQnxhSQp9LmgOSLXqqFUWZoNP/EpIoYZaVfKLigajvD89gRiDJP5fQwGjegI+CEg8+oCfSRmDiDEjdvhGBe31XQBjKle1cmE9imaQxjcR/SnOJOeho4iHBCWslYM4ut1F5flD3P8/B+MDv4DAAD//wMAUEsDBBQABgAIAAAAIQC29GeY0gYAAMkgAAAVAAAAd29yZC90aGVtZS90aGVtZTEueG1s7FlLixtHEL4H8h+Guct6zehhrDXSSPJr1zbetYOPvVJrpq2eadHd2rUwhmCfcgkEnJBDDLnlEEIMMcTkkh9jsEmcH5HqHkkzLfXEj12DCbuCVT++qv66qrq6NHPh4v2YOkeYC8KSjls9V3EdnIzYmCRhx719MCy1XEdIlIwRZQnuuAss3Is7n392AZ2XEY6xA/KJOI86biTl7Hy5LEYwjMQ5NsMJzE0Yj5GELg/LY46OQW9My7VKpVGOEUlcJ0ExqL0xmZARdg6USndnpXxA4V8ihRoYUb6vVGNDQmPH06r6EgsRUO4cIdpxYZ0xOz7A96XrUCQkTHTciv5zyzsXymshKgtkc3JD/beUWwqMpzUtx8PDtaDn+V6ju9avAVRu4wbNQWPQWOvTADQawU5TLqbOZi3wltgcKG1adPeb/XrVwOf017fwXV99DLwGpU1vCz8cBpkNc6C06W/h/V671zf1a1DabGzhm5Vu32saeA2KKEmmW+iK36gHq92uIRNGL1vhbd8bNmtLeIYq56IrlU9kUazF6B7jQwBo5yJJEkcuZniCRoALECWHnDi7JIwg8GYoYQKGK7XKsFKH/+rj6Zb2KDqPUU46HRqJrSHFxxEjTmay414FrW4O8urFi5ePnr989PvLx49fPvp1ufa23GWUhHm5Nz9988/TL52/f/vxzZNv7XiRx7/+5avXf/z5X+qlQeu7Z6+fP3v1/dd//fzEAu9ydJiHH5AYC+c6PnZusRg2aFkAH/L3kziIEMlLdJNQoAQpGQt6ICMDfX2BKLLgeti04x0O6cIGvDS/ZxDej/hcEgvwWhQbwD3GaI9x656uqbXyVpgnoX1xPs/jbiF0ZFs72PDyYD6DuCc2lUGEDZo3KbgchTjB0lFzbIqxRewuIYZd98iIM8Em0rlLnB4iVpMckEMjmjKhyyQGvyxsBMHfhm327jg9Rm3q+/jIRMLZQNSmElPDjJfQXKLYyhjFNI/cRTKykdxf8JFhcCHB0yGmzBmMsRA2mRt8YdC9BmnG7vY9uohNJJdkakPuIsbyyD6bBhGKZ1bOJIny2CtiCiGKnJtMWkkw84SoPvgBJYXuvkOw4e63n+3bkIbsAaJm5tx2JDAzz+OCThC2Ke/y2EixXU6s0dGbh0Zo72JM0TEaY+zcvmLDs5lh84z01QiyymVss81VZMaq6idYQK2kihuLY4kwQnYfh6yAz95iI/EsUBIjXqT5+tQMmQFcdbE1XuloaqRSwtWhtZO4IWJjf4Vab0bICCvVF/Z4XXDDf+9yxkDm3gfI4PeWgcT+zrY5QNRYIAuYAwRVhi3dgojh/kxEHSctNrfKTcxDm7mhvFH0xCR5awW0Ufv4H6/2gQrj1Q9PLdjTqXfswJNUOkXJZLO+KcJtVjUB42Py6Rc1fTRPbmK4RyzQs5rmrKb539c0Ref5rJI5q2TOKhm7yEeoZLLiRT8CWj3o0Vriwqc+E0LpvlxQvCt02SPg7I+HMKg7Wmj9kGkWQXO5nIELOdJthzP5BZHRfoRmsExVrxCKpepQODMmoHDSw1bdaoLO4z02Tker1dVzTRBAMhuHwms1DmWaTEcbzewB3lq97oX6QeuKgJJ9HxK5xUwSdQuJ5mrwLST0zk6FRdvCoqXUF7LQX0uvwOXkIPVI3PdSRhBuENJj5adUfuXdU/d0kTHNbdcs22srrqfjaYNELtxMErkwjODy2Bw+ZV+3M5ca9JQptmk0Wx/D1yqJbOQGmpg95xjOXN0HNSM067gT+MkEzXgG+oTKVIiGSccdyaWhPySzzLiQfSSiFKan0v3HRGLuUBJDrOfdQJOMW7XWVHv8RMm1K5+e5fRX3sl4MsEjWTCSdWEuVWKdPSFYddgcSO9H42PnkM75LQSG8ptVZcAxEXJtzTHhueDOrLiRrpZH0Xjfkh1RRGcRWt4o+WSewnV7TSe3D810c1dmf7mZw1A56cS37tuF1EQuaRZcIOrWtOePj3fJ51hled9glabuzVzXXuW6olvi5BdCjlq2mEFNMbZQy0ZNaqdYEOSWW4dm0R1x2rfBZtSqC2JVV+re1ottdngPIr8P1eqcSqGpwq8WjoLVK8k0E+jRVXa5L505Jx33QcXvekHND0qVlj8oeXWvUmr53Xqp6/v16sCvVvq92kMwioziqp+uPYQf+3SxfG+vx7fe3cerUvvciMVlpuvgshbW7+6rteJ39w4Byzxo1IbtervXKLXr3WHJ6/dapXbQ6JX6jaDZH/YDv9UePnSdIw32uvXAawxapUY1CEpeo6Lot9qlplerdb1mtzXwug+Xtoadr75X5tW8dv4FAAD//wMAUEsDBBQABgAIAAAAIQDlI7CA9QMAAKALAAARAAAAd29yZC9zZXR0aW5ncy54bWy0Vttu2zgQfV9g/8HQ8zq6WHZsoU4R3zYp4nZRebHPlETZRHgRSMqu8/U7pETLu3ELp0VeEmrOzJkh53DoDx+/MdrbY6mI4FMvvAm8Hua5KAjfTr2/N6v+2OspjXiBqOB46h2x8j7e/f7bh0OisNbgpnpAwVXC8qm307pKfF/lO8yQuhEV5gCWQjKk4VNufYbkc131c8EqpElGKNFHPwqCkdfSiKlXS560FH1GcimUKLUJSURZkhy3/1yEvCZvE7IQec0w1zajLzGFGgRXO1Ipx8Z+lg3AnSPZ/2gTe0ad3yEMrtjuQcjiFHFNeSagkiLHSkGDGHUFEt4ljl8RnXLfQO52i5YKwsPArs4rH76NIHpFMMrxt7dxjFsOHyLPeUjxNp7RiYd0BxuOfq6YMwKF30YxdHWoI+t2pOg1PW6gJ5JJJJsb1DaY5cnjlguJMgrlQKN70Kuerc78hS2bf3YJOe/gIr8IwXqHpMIyBzXDFAgCzzdABtXBaFiIz0KntZSi5sUDRmD7LrwSQrcwKFCUqUYa8iZbiRjc/amXU4x4Q1/gEtVUb1CWalGB0x7B1m+jNnu+QxLlwJZWKAcdzwXXUlDnV5i0c5gjEmTeRtipYla1wqvlEzqKWp8haTOxgIEjBofznym0FgWMFAiV5PoumgBbTTg8L+H/iQRMWEkKvDFNSfWR4hVsJiUv+J4Xn2qlCTDaWfQLFfyoAMxN5i8go82xwiuMdA3H9k7JbGdWlFRrAqKQj7wAWb1bMlKWWEICAkJbg5yIFAd7zo1S3ysvKOwfcIZbPNiATJ9nQmvBHo7VDs761zpp9e+fyxme50K5xVe4YifXYBEHw8WyqdSgHRJEo9FicAkJV9Eyvr+EjJfBfDW7hMxm0WB+ewmZx6NJNLmILMPJ+GIFCyhiPL+IfHc/q0kc39qe+KcTYYl5dv+SbmWuVY81EXPEMklQb20eZt94ZPJ5RrjDMwzzFJ8jaZ05sN9vAMUQpStosANsc1hSEFUtcGnXdI3ktuNtPeRFK8y8TycuM26x/BMGZ9WgB4mq5ro4lzCO20jC9RNhzq7qLHVRHF6AMwim8Je9tOfUHc8h0SA/O3aekJWx9cW8P/9shIeR0veKoKn3sjOmRvlUpka1eI2qqhF/tg2nHiXbnQ5NmIavAn7S2Y9sG7VYZLGowewHys1mwbtddLbI2c78Bs426Gyxs8Wdbehsw842craRse1g3ElK+DPcQ7c09lJQKg64eOjwVyb3SuUERJAeWdY9PjcNRomCwVDBO6WFdNgfFgvjpBD5o3ls48Y+nIwXy8mg0XY4tO+btrMDjvYrLmdI4aJRt/tpffcvAAAA//8DAFBLAwQUAAYACAAAACEAQMH/8TkBAAAjAwAAFAAAAHdvcmQvd2ViU2V0dGluZ3MueG1snNJfT8IwEADwdxO/w9J36CCykIVBYgzGF2OifoDS3aCx7S294sBP720CYnhhvvT//XLXdrbYOZt8QiCDvhCjYSoS8BpL49eFeH9bDqYioah8qSx6KMQeSCzmtzezJm9g9Qox8klKWPGUO12ITYx1LiXpDThFQ6zB82aFwanI07CWToWPbT3Q6GoVzcpYE/dynKaZODDhGgWrymh4QL114GMXLwNYFtHTxtR01JprtAZDWQfUQMT1OPvjOWX8iRndXUDO6ICEVRxyMYeMOorDR2k3cvYXmPQDxhdApmHXz5geDMmR544p+znZyTHlmfO/ZM4Agn7E5JgH7V1bkdP509pjUCvLEr9RwtecdHDbcrZt1w35+Jx/LdbROPMFSwz3ARuCINtlZS02L8+PPJF/vvb8GwAA//8DAFBLAwQUAAYACAAAACEAOdtFTLkFAAAnWgAAEgAAAHdvcmQvbnVtYmVyaW5nLnhtbOyczW7qRhiG95V6D8j7xP8/oEOOwECV6rQ60knV9WAGsGKPrbGB0FV7Ke266q430EvpDfQWOuOxzZ9DbIMw5MwmDuP5Xs/3zjfDk0nCh48vvtdaQhy5AeoK8r0ktCBygomLZl3hp6fRnSW0ohigCfACBLvCGkbCx4dvv/mw6qCFP4aYdGwRDRR1VqHTFeZxHHZEMXLm0AfRve86OIiCaXzvBL4YTKeuA8VVgCeiIslS8l2IAwdGEdGxAVqCSEjlnJdyahMMViSYCmqiMwc4hi8bDbmyiC62RetQSKkhRDJU5EMptbKUIdJRHQhptYTIqA6U9HpKBckZ9ZSUQyWznpJ6qGTVUzooJ/+wwIMQInJzGmAfxOQlnok+wM+L8I4IhyB2x67nxmuiKRmZDHDRc40RkahcwVcnlRVM0Q8m0FMnmUrQFRYYddL4uzyeDr3D4tNLFoHL5M9CBoGz8CGKk8xFDD3iRYCiuRvmK9yvq0ZuzjOR5bEklr6X9VuFcsnl8tr2NGBWbgTLDD/13/fYyI8rylKJGaESeUSZIew+MxuJT6pw8+Ba1myZK5fcQDIB5UDAcGDJDT/TsFIN0dmsUKrjllwamQ6bFarjboyVS+5j+4PZEohgNQk9G0e09rcyCmenle13OFiEGzX3NLXHzSa0ojxQQSst/+0lGZ02mC9zEJK9yXc6jzMUYDD2yIhIMbdIPbaSGaBfybTSS/ItfGnRjUB4IPwCxlGMgRP/uPBbO68eSQERDiIiHQwJ/GDayFCnN40h7mMInmkXqoIiKt9ZAo+0jJS+ItuKINI7/sKL3U9wCb2ndQizPkmrR1tZr9gPveyeatvSUJE0dsdb0hsuuWTPSsaSdZZZL0JhIz9vHC88D8Z5/BN8yW/9++sfefv3TtbqwWnaPfyM6cVFNB3a3BU0hdrQmQM0S3iQviZ9xbwzTi+jAMURNTFyXFJgP5PelCCjJLpHLNpvcxGRn8ApIG6wx4+Tr25uJWuNfskalCRfMX2mmKSx75J8ukv//F7VJEu7nEkbO2T9bTuU0+3477e/q/ohK8alDDmevnqO9P+snL5hXUf6bJM7Mf2/qqavyNJ1pK83UvyKfrEt83j6RiPFr7QvthkeT99spPhV9Uq2PquR4lfNxrY+cQfg6DOO0p1ch+4Uua1LumWw/KvTXbsvGX1LS+O3p+sMdJc+r/xkXRPblYEZznY7dnC2Oz19znbV0udsx9mOsx1nuwunX5HtlDpsp2rKSB5ItdlOaxu2aitWbms+Xfzk7kIndzXW9OXwjsMchzkOc4Xpc5hroPg5zHGYuwWYU2vBXNvWTcsasvyLYW6+HmN38sMRpDN7pqbpmpabm09a4l0cek5XsI2BNVRNu8Y0hl/itZeP55MbxZ8BBjMMwnnhPH8FJ3y5rZakS0N5dAZ2fl9nfrlBw/5Is4b9s7x5XDM4VrWI7hepRZImtSVJYlUFUQxidwnP9JPGLcPmvkHMsjMbdMs4um8QazmzQbcMrPsGXccSuyKk3TfoOpbYFUHvvkHXscRuB4vpLl4HiwdqXxqw/KufcQ7aQ0Oib/2ZrfmEvv8zTn6ayU8z+WkmP818M31+mtlA8fPTTH6aeQvYRjG3Mrbplq0aZttm+VfHNsM2FG3YTk9Dt6frDNhWY7FybOPYtsmeYxvHNo5tHNsaTZ9jWwPFfzvYRk+8K2ObOVBHqmFpLP/q2NYb9CRTVtL47el679jGIe317DmkNVD6HNI4pHFI45DWaPoc0o5DGv2te3VIG/ZNc9QbsPyrQxrZGwzLlL/Kf/vgZ2sc2zi2cWx7M32ObQ0UP8c2jm1Xgm0owTWUffIKbdphtywjNZVDBWHsDbQwLPmf3VfC2BtPYVj2x+RFYQefD7gJM4+EsY2uMEw7EsY2iMKw5JMEXwljC6swLJvrojBWkIVhGcYlYezKIPrhfwAAAP//AwBQSwMEFAAGAAgAAAAhAPiVyO/8DgAA85kAAA8AAAB3b3JkL3N0eWxlcy54bWzsXd9zo0YSfr+q+x8oPSUPG/+QLTtbcVJr2T67btdxVt5L3eMIRhZnYHSA1uv89TczDAjUDKKHjuu8m6RqLQH9MczXX890A5qffvkSR95nnmahSM5GBz/sjzye+CIIk4ez0af7qzenIy/LWRKwSCT8bPTMs9EvP//9bz89vc3y54hnngRIsrexfzZa5vnq7d5e5i95zLIfxIoncudCpDHL5df0YS9m6eN69cYX8Yrl4TyMwvx573B/fzIyMGkfFLFYhD6/EP465kmu7fdSHklEkWTLcJWVaE990J5EGqxS4fMskxcdRwVezMKkgjk4AkBx6KciE4v8B3kxpkUaSpof7OtPcbQBOMYBHAKAic+/4DBODcaetKzjhAEOZ1LhhEENx60xNYCM4yCOy3Zkz7G6oth/e/OQiJTNI4kkOfJkN3saWP0rW6v+6I/y8J+lwwbCv+ALto7yTH1N71Lz1XzTf65Ekmfe01uW+WF4L9slweNQnuf6XZKFI7mHsyx/l4WsvvPSbFP7l+rAVks/y2ubz8MgHO2pk2Z/yJ2fWXQ2Ojwqt0xVIxrbIpY8lNt48mZ6W2/M2eiPpdk0l7hnI5a+mb1Thnvm2oq/tSteVd+Ko7a6R+pJqmtWiFzu5Yv3wn/kwSyXO85G++pUcuOnm7s0FKkU8tnoxx/NxhmPw+swCHhSOzBZhgH/fcmTTxkPNtt/u9JiNBt8sU7k5/HJRFMWZcHlF5+vlLTl3oSp3rtVBpE6eh1uTq7N/1uCHZg+a7Nfcqbim3ewDaGbj4I4VBZZ7WrbMddb166PQp1o/FInOnqpEx2/1IkmL3Wik5c60elLnUjD/JknCpOAfymECE8DUHfhWNSIxrGIDY1j0RIaxyIVNI5FCWgci6OjcSx+jMaxuCkCJxe+zQtrzj62eHs37u4xwg1395Dghrt7BHDD3R3w3XB3x3c33N3h3A13d/R2w90drPG4xVTLu5EyS/LBKlsIkSci517OvwxHY4nE0kkfDZ4a9HhKcpEEMEVkMwPxYDSf6e+7PUSL1H08z1U25omFtwgf1inPBjecJ595JLN2jwWBxCMETHm+Ti094uLTKV/wlCc+p3RsOtAoTLiXrOM5gW+u2AMZFk8C4u4rEUmCQuXQbJ0vlUhCAqeOmZ+K4U0TjCw+vA+z4X2lQLzzdRRxIqxbGhfTWMNzAw0zPDXQMMMzAw0zPDGocUbVRQaNqKcMGlGHGTSifiv8k6rfDBpRvxk0on4zaMP77T7MIx3i67OOg/61u2kkVJl+cDtm4UPC5ARg+HBjaqbeHUvZQ8pWS0+VkNth69eMPc+5CJ69e4oxrUKimtdrF5nKqw6T9fAObaBRiavCI5JXhUcksApvuMQ+yGmymqBd0+Qzs/U8bxWtRuol2hmL1sWEdrjaWD7cwzYCuArTjEwG7bAEHnyrprOKTorIt2nl8IZtsIbLajsqkTbPQBK0MhL+I00Yvn5e8VSmZY+Dka5EFIknHtAhzvJUFL5Wl/yhpqSX5C/j1ZJloc6VGhD9h/ryBr/3ga0GX9BdxMKEhrfLNzELI49uBnF9/+G9dy9WKs1UHUMDeC7yXMRkmKYS+N3vfP49TQPfySQ4eSa62ndE5SENNg0JBpkCSQRESHKaGSYhyRiq8f7Jn+eCpQEN2l3Ki2dqck6EOGPxqph0EGhLxsUnGX8IZkMa718sDVVdiEpU9yRgtbJhtp7/h/vDQ92t8EgqQ7+uc11/1FNdbU0HN3ya0IAbPkXQbMrhQfkvwcU24IZfbAOO6mKnEcuy0HoL1RmP6nJLPOrrHZ78GTwRiXSxjug6sAQk68ESkKwLRbSOk4zyijUe4QVrPOrrJXQZjUdQktN4/0jDgIwMDUbFhAajokGDUXGgwUgJGP6ETg1s+GM6NbDhz+oUYERTgBoYlZ+RDv9Ed3lqYFR+psGo/EyDUfmZBqPys/GFxxcLOQmmG2JqkFQ+V4OkG2iSnMcrkbL0mQjyMuIPjKBAWqDdpWKhXrYQSfEQNwGkqlFHhJPtAo6K5N/5nKxpCouyXQQVURZFQhDV1jYDjrZsPru2y0y/czG4CXcR8/lSRAFPLddkt5X58mzFfFOmB7f7epU934cPy9ybLatqfx1msr/TskzYG2a7T9jW55PDDrMPPAjXcdlQ+DLFZNzfWHt0w7h856XDeDOTaFge97SE55zsttzMkhuWJz0t4TlPe1pqnTYsu/RwwdLHVkc46fKfKsezON9JlxdVxq2n7XKkyrLNBU+6vKghFe+d76u7BZCdfpqx2/cTj90eoyI7CkZOdpTeurJDdAnsI/8cqpEdEzT1+aqnJ0Dc15PoXpHzt7Uo6vaNG079X+q6kROnJONeK864/42rRpSx92PvcGOH6B137BC9A5AdolckspqjQpIdpXdsskP0DlJ2CHS0giMCLlpBe1y0gvYu0QqiuESrAbMAO0Tv6YAdAi1UCIEW6oCZgh0CJVRg7iRUiIIWKoRACxVCoIUKJ2A4oUJ7nFChvYtQIYqLUCEKWqgQAi1UCIEWKoRACxVCoIXqOLe3mjsJFaKghQoh0EKFEGih6vniAKFCe5xQob2LUCGKi1AhClqoEAItVAiBFiqEQAsVQqCFCiFQQgXmTkKFKGihQgi0UCEEWqjFq4buQoX2OKFCexehQhQXoUIUtFAhBFqoEAItVAiBFiqEQAsVQqCECsydhApR0EKFEGihQgi0UPXNwgFChfY4oUJ7F6FCFBehQhS0UCEEWqgQAi1UCIEWKoRACxVCoIQKzJ2EClHQQoUQaKFCiC7/NLcobY/ZH+CrntYn9vvfujKN+lh/lbsONe4PVbbKjtX/XYRzIR691hcPxzrf6AcSzqNQ6BK15bZ6HVc/EoG68fnrtPsNnzr6wB9dMu9C6HumAPyoryWoqRx1uXzdEiR5R12eXrcEs86jruhbtwTD4FFX0NW6LB9KkcMRMO4KMzXjA4t5V7SumcMu7orRNUPYw12RuWYIO7grHtcMjz0VnLetj3v206R6vhQgdLljDeHEjtDllpCrMhxDYfQlzY7Qlz07Ql8a7QgoPq0weGLtUGiG7VBuVEOZYal2F6odAUs1RHCiGsC4Uw2hnKmGUG5Uw8CIpRoiYKl2D852BCeqAYw71RDKmWoI5UY1HMqwVEMELNUQAUv1wAHZCuNONYRyphpCuVENJ3dYqiEClmqIgKUaIjhRDWDcqYZQzlRDKDeqQZaMphoiYKmGCFiqIYIT1QDGnWoI5Uw1hOqiWldRGlSjGK6Z4yZhNUPcgFwzxAXnmqFDtlSzdsyWagiO2RLkquQcly3VSbMj9GXPjtCXRjsCik8rDJ5YOxSaYTuUG9W4bKmNaneh2hGwVOOyJSvVuGypk2pcttRJNS5bslONy5baqMZlS21UuwdnO4IT1bhsqZNqXLbUSTUuW7JTjcuW2qjGZUttVOOypTaqBw7IVhh3qnHZUifVuGzJTjUuW2qjGpcttVGNy5baqMZlS1aqcdlSJ9W4bKmTaly2ZKcaly21UY3LltqoxmVLbVTjsiUr1bhsqZNqXLbUSTUuW/ogTUKCn4CaxSzNPbrfi7tm2TJnw3+c8FOS8kxEn3ng0V7qe9RV7j01lr9S2Hq1O3l8LvtM/QJ67XWloPgFWAOoD7wJqmWqlLFqiWeW7jKbdYPN7Vr9Oc1kTm2O2d8/Pz8cT43UVsXSZFnxZqk8Rv1a0dloPNGvJKkvH9dqDTS2zoVpvTbZM43Z0fyqweb+8wFo8mbBLN2eOZM99avqYXBBifqxxZbtysnK7eVppkuWFns37l8eYwRu75+Lo/3ji8tG/zxyvrqV59fb1BfJOc/0t03XzdXvlHG1qJoRvyh+/On956gCr/ehZWE4qcRyrTrv3+yaNxaGa92pV4Vr3eNnZ6P7MOaZd8ufvI8iZon3nemkzJvOvje9rv/1VfjYdIP6T2HodeV0aDkbqd+9N0xtFpYrb5TXF5Yb60hTWx/OxVsOrd5i4hiNtxz28JamlP9kB7L7TxlBvir/GZuJQ2NhQr1toP+Mrf5jHgqh8Z/x6/GfUpVfl/9QxJojq6+Y6EbjK0evx1e0Rv5ffSWcFhfk7DPlSDzEZ46tPmMeAKPxmePX4zNaK19DfBnoGcUKs22eYcY6Gs+YvB7P0Ir4yzMeTqyeYTIyGs84eT2eUc70vppxZqCHnFo9xBS3aDzk9PV4iFbGq4gdhyfq/3bPKDfeh2oV8gtDZiPp6ek+vmSO+eYnxy0VIrN0UPXbN3rhoG3HsqwvZHGKchJVlbnafcTe7lzVKTvarOuYnaWtotRp9VrjtrtaKNszjwonkh9uEuXET2aV96KlwRdWQMn9Ux5FH1hxtFjZD434QmlP7j3Y1780ubV/XiyaYLVPdXXdCrDXbEzxtdtPimUUw+K1D2slUZWQW7pbv4M0tKd7+rC/zmTXzNQB2+1rVPS2W2l2egfeJphtRcdWHdhiovFwazy0B7y/KnlIQouim43QQyJCTZ3wmyV0SGkNSWhRBbMROiYi1BTuvl1C/xw1FmUpG3lHROSZ6PLqyXup4hOSxKJOZCPxmIhEU9r6phRITlVRuLFRNSGiygT/v6gaQlVRSbFRdUJElSn+fJOhkZyyorRho+yUiDKTwH9d6nqZAkaj/tXBp17ibptHvbGNvX5Pv5xe7k+vzoujTEFpdR7U0nt9nFoI2qyb9oe6raE+rJhftlD32eapmCr532GrPwPbqjDgdOaybOBwalVSM5eeLasu8iPOCqHVjpZfF2Ek916eXE4u9YNl2heu9MY58x8fUrFOgn43mKciyUTE9O+BbFx8FsaztX4oy3h2/bBWl9aLsFbuHDFdT9QXwZM3n2a0weUmUWXJVpes7cKFFWuRrZ//EnVv0eagCgKJSCof0mHb+JD+DByQ1HVoWNwMCNVTiNuUbfYMZayshbWUGZvMTS8Pfjw1CaxhrjlMHk/G002YNbF32WzoujzaSH1A52weiCyfh9zupJZHJql6a3eNFtd5k/3jy+Mp1iMPLq4uLhzGrKoPVZF08/vy2/2nn87d7G7ru/qgBXtrbFJm1F2XZB0XH8Jo68kfve+msi5Ha2MAwnZPKZafsp//BwAA//8DAFBLAwQUAAYACAAAACEAzJJQVH0BAADxAgAAEQAIAWRvY1Byb3BzL2NvcmUueG1sIKIEASigAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjJLLTsMwEEX3SPxD5H1qJ+WlKE3FQ6yoQKIViJ2xJ60hsS17IPTvcZI2JYgFO4/n+GRy7Xz+VVfRJzivjJ6RZMJIBFoYqfR6RlbL2/iCRB65lrwyGmZkC57Mi+OjXNhMGAcPzlhwqMBHwaR9JuyMbBBtRqkXG6i5nwRCh2ZpXM0xlG5NLRfvfA00ZeyM1oBccuS0FcZ2MJKdUopBaT9c1QmkoFBBDRo9TSYJPbAIrvZ/Hug6P8ha4dbCn+i+OdBfXg1g0zSTZtqhYf6EPi/uHrtfjZVusxJAilyKDBVWUOT0sAwr//H6BgL77aEIa+GAo3HFQglnvCkxui9LJSBaeXAdvSfa7N9h2xgnffCMqoBJ8MIpi+FG+6+MNgJdcY+LcMWlAnm1LS5Pz9OzTvOr0bIOPlX7NoqkI4Yy3wXdDwUyCgFlfZz7ztP0+mZ5S4qUpUnMTuIpW7I0O00zxl7auUbnD8J6N8A/jdOMnYyNe0EfzfiRFt8AAAD//wMAUEsDBBQABgAIAAAAIQAiURHx1QEAAN4DAAAQAAgBZG9jUHJvcHMvYXBwLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJxTwW7bMAy9D9g/GLo3crKh6AJFxZBi6GFDA8Rtz5xMJ8JsSZDYINnXj7YTT9l2mk/vkfTTE0mp+2PXFgeMyXq3EvNZKQp0xtfW7VbiufpycyeKROBqaL3DlThhEvf6/Tu1iT5gJIupYAmXVmJPFJZSJrPHDtKM044zjY8dENO4k75prMEHb946dCQXZXkr8UjoaqxvwiQoRsXlgf5XtPam95deqlNgPa0q7EILhJrOYFZ7Oio5xVXlCdrKdqjnJccnpjaww6TnSo5AvfpYJ724U3JEar2HCIa4h3p++0HJjKvPIbTWAHF39Tdrok++oeJpsFz0/yuZlyi+xhbNW7R00mwjp+qrdaOREbCxCLsIYX92NzG1NdDimhugG2gTKvk7oB4R+uFuwPb+DrQ8oCEfi2R/8ngXovgOCfu2rcQBogVHYiwbyYDbkCjqylLL2hMfYF6WY/uxNzmC68KBDB4YX7sbTkhPDd+N/mF2npsdPIxWMzu5s8sZf6iufRfAcX/lhLjBP9JzqPxDvxrnHl4Hs6m/WtpvA5h+OJ/KfP5ZRm05ijUPdJrJFFCPfIPY9vr8r9thfan5O9Fv1Mv4XHnbZiV/wwpdYrwI0zvSvwAAAP//AwBQSwMEFAAGAAgAAAAhAIg/pb/hAAAAVQEAABgAKABjdXN0b21YbWwvaXRlbVByb3BzMS54bWwgoiQAKKAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnJDBasMwEETvhf6D2bsiObFdEyyHuE4g19JCroq8tgWWZCS5tJT+e2V6So89LbPDzhu2OnzoKXlH55U1HNINgwSNtJ0yA4e31zMpIfFBmE5M1iAHY+FQPz5Und93IggfrMNLQJ3EhYrz0nL4ykvW5E87Rsr2nJLilDXkmKUNKTKWt8fnU8pY8Q1JRJsY4zmMIcx7Sr0cUQu/sTOaaPbWaRGidAO1fa8ktlYuGk2g25hA5RLx+qonqNc+v9cv2Pt7uVZbnPov5aZuk7KDE/P4CbSu6B/Uqu9eUf8AAAD//wMAUEsDBBQABgAIAAAAIQDBJ8sItgAAACEBAAATACgAY3VzdG9tWG1sL2l0ZW0xLnhtbCCiJAAooCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACskE0OgjAQRq9CegCKLlgQfmKiWzEhcV/KAE3aGdIOBm5v1egJXE7mfS/zTdlsziYP8MEQVuKQZiIJrHBQlhAqgSSauuyLjlavISSRxlD0lZiZl0LKoGdwKqS0AMbdSN4pjqOfJI2j0XAmvTpAlscsy2Vvemto8mqZd/GR/UfVgQXNMHS823i2PN1Ondl4vgyGY7P2LWjRGoR0CzYGXuBVuQhHViT37wtyUZfyV7h+AgAA//8DAFBLAwQUAAYACAAAACEAdD85esIAAAAoAQAAHgAIAWN1c3RvbVhtbC9fcmVscy9pdGVtMS54bWwucmVscyCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIzPsYrDMAwG4P3g3sFob5zcUMoRp0spdDtKDroaR0lMY8tYamnfvuamK3ToKIn/+1G7vYVFXTGzp2igqWpQGB0NPk4Gfvv9agOKxcbBLhTRwB0Ztt3nR3vExUoJ8ewTq6JENjCLpG+t2c0YLFeUMJbLSDlYKWOedLLubCfUX3W91vm/Ad2TqQ6DgXwYGlD9PeE7No2jd7gjdwkY5UWFdhcWCqew/GQqjaq3eUIx4AXD36qpigm6a/XTf90DAAD//wMAUEsDBBQABgAIAAAAIQDrgGBMUwMAAI8OAAASAAAAd29yZC9mb250VGFibGUueG1szJbPb9MwFMfvSPwPUU7jwJqkXZdV66Y2WzQk2IEVAUc3cVqL2I7itF3/AA6IE+LI38C4gwb/DNPYf8FznLRZm25LQbBGzY9n+5vnT57f8+7+KQ21MY4F4aytm5uGrmHmcZ+wQVt/0XMf27omEsR8FHKG2/oUC31/7+GD3Ukr4CwRGoxnokW9tj5MkqhVqwlviCkSmzzCDBoDHlOUwGM8qFEUvxlFjz1OI5SQPglJMq1ZhtHUM5n4Lio8CIiHD7g3opgl6fhajENQ5EwMSSRytcld1CY89qOYe1gImDMNlR5FhM1kzMaSECVezAUPkk2YTOZRKgXDTSO9o+FcYKuagLUk0PTwaTUNO9OowciiDvGr6TRnOsQv6KznTEFA4GoSW7kfYkrljKjXejJgPEb9EJTgG2mAWUuF5Rm8lZf0FrrvZfGqTVoMURjwEj62DHKRNkWIcYFNaB2jsK0bW8bST6/Jjt4QxQJLmbRj40CZA0RJOM2tPvbAr4SMsWqNSOIN88Yxion0WTUJMoCGkegb8Fb1q+vKYsJyzN+tLNasT26pX7d4qY6tDGZmMQt94J01BWIJSI9QLLRjPNGec4pYKRYLjqZRBzwN+Ftw1yjFktO6jiVOdasQgaVoWB17e04km9syEfsmIoqH61Yj4qCQ9GOygoSbEpBHAzhYlUiICRGiEomOdNY6TGegSDSkwdjuVosN9bxTkcQBZoNXJAsKFCbHYM19vvz87vLrj2wyS5RMiBcIabhmRyklu1lGCY0SvgakbgFS3XbcbcftLEIym7dAknQrQnqWZy/tNTrCKmwWWF18P/t1/uXq09urbx9WEetCXMl4knGVnisQqx5X6XqyiivM6jhu3dmy1kFmVkS2kHO0jSOM0qSsOSePygAuJqmVDJsZvWyF/oUs5eMAjcLkxoQB+w8eovKSorzaWTNjUO7juMytgJxif/m7HsrSYamMN88XrjOzzPPFzu2Zs2q+OCH0ZFSaLS7O3v88/3gvskU2j0K5tWzbzadfOVv8WbnVNrrcn96PsGc86cUj3JtGeK1lkFcL7SkZDJPVNSNrvw+x8H8rR7bRKPAq226oovBvthuHEkenmD4caWmUbDfukD5u3XhlN2LvNwAAAP//AwBQSwECLQAUAAYACAAAACEAZPVj7oEBAAApBgAAEwAAAAAAAAAAAAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQAekRq37wAAAE4CAAALAAAAAAAAAAAAAAAAALoDAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQAzwlu/QQEAAOcEAAAcAAAAAAAAAAAAAAAAANoGAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAE4yjpAWBgAApiQAABEAAAAAAAAAAAAAAAAAXQkAAHdvcmQvZG9jdW1lbnQueG1sUEsBAi0AFAAGAAgAAAAhALb0Z5jSBgAAySAAABUAAAAAAAAAAAAAAAAAog8AAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFBLAQItABQABgAIAAAAIQDlI7CA9QMAAKALAAARAAAAAAAAAAAAAAAAAKcWAAB3b3JkL3NldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQBAwf/xOQEAACMDAAAUAAAAAAAAAAAAAAAAAMsaAAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQA520VMuQUAACdaAAASAAAAAAAAAAAAAAAAADYcAAB3b3JkL251bWJlcmluZy54bWxQSwECLQAUAAYACAAAACEA+JXI7/wOAADzmQAADwAAAAAAAAAAAAAAAAAfIgAAd29yZC9zdHlsZXMueG1sUEsBAi0AFAAGAAgAAAAhAMySUFR9AQAA8QIAABEAAAAAAAAAAAAAAAAASDEAAGRvY1Byb3BzL2NvcmUueG1sUEsBAi0AFAAGAAgAAAAhACJREfHVAQAA3gMAABAAAAAAAAAAAAAAAAAA/DMAAGRvY1Byb3BzL2FwcC54bWxQSwECLQAUAAYACAAAACEAiD+lv+EAAABVAQAAGAAAAAAAAAAAAAAAAAAHNwAAY3VzdG9tWG1sL2l0ZW1Qcm9wczEueG1sUEsBAi0AFAAGAAgAAAAhAMEnywi2AAAAIQEAABMAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",qZ=()=>Wp(WZ),XZ=D("image-to-docx");async function YZ(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>{t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=e,r.src=n})}async function nL(n,t){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:t};try{const e=await Mc(new File([t],"",{})),r=await YZ(e);return r.width===void 0||r.height===void 0?{width:345,height:230,buffer:t}:n.width||n.height?{width:n.width||r.width*n.height/r.height,height:n.height||r.height*n.width/r.width,buffer:t}:{width:r.width,height:r.height,buffer:t}}catch(e){XZ.error(e);return}}function QZ(n,t){let e=n.filter(s=>s!=null);const r=t-(e.length-1)*20,i=.87,o=e.reduce((s,l)=>s+l.width,0);return o>r&&(e=e.map(s=>({width:s.width*r/o,height:s.height*r/o,buffer:s.buffer}))),e.map(s=>({width:s.width*i,height:s.height*i,buffer:s.buffer}))}function JZ(n,t,e){if(!e||typeof e!="object")return;const r=e,i=n.filter(s=>s!=null),o=t-(i.length-1)*20;i.forEach((s,l)=>{if(i.length===1&&r.widthPercent){const d=r.widthPercent,h=s.width;s.width=o*(d/100),s.height*=s.width/h;return}const c=`${l}_flex`;if(r[c]){const d=r[c],h=s.width;s.width=o*d,s.height*=s.width/h}})}function rL(n=[0,1,2,3,4,5,6,7],t=1){return n.map(e=>{let r;switch(e%3){case 0:r=yt.LevelFormat.DECIMAL;break;case 1:r=yt.LevelFormat.LOWER_LETTER;break;default:r=yt.LevelFormat.LOWER_ROMAN;break}return{level:e,format:r,text:`%${e+1}. `,alignment:yt.AlignmentType.START,start:t,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(e+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function ZZ(){return[0,1,2,3,4,5,6,7].map(n=>{let t;switch(n%3){case 0:t="\u2022";break;case 1:t="\u25E6";break;default:t="\u25AA";break}return{level:n,format:yt.LevelFormat.BULLET,text:t,alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function ttt(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2611",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}function ett(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2610",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}var ch=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(ch||{});const ntt=[{levels:rL(),reference:"number-numbering-reference"},{levels:ZZ(),reference:"number-bullet-reference"},{levels:ttt(),reference:"checked-bullet-reference"},{levels:ett(),reference:"unchecked-bullet-reference"}];function rtt(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 itt(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 ott(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 stt=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function iL(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const t=n.match(stt);if(t){const e=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},r=e(t[1]),i=e(t[2]),o=e(t[3]);return`${r}${i}${o}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function On(n,t){if(n&&n.attributes&&n.attributes[t])return n.attributes[t];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&t==="style-underline")return!0}function oL(n,t,e){for(let r=0;r<=e;++r){const i=`${t}${r}`;if(On(n,i))return i}}function Hg(n,t,e){n.attributes=n.attributes||{},n.attributes[t]=e}function _x(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function sL(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function ltt(n){const t=On(n,"inlineStyle");if(t==null)return;const e=t.split(";");for(const r of e){const i=r.split(":");if(i.length!==2)continue;const o=i[0].trim().toLowerCase(),s=i[1].trim().toLowerCase();o==="font-size"&&Hg(n,"inline-style-font-size",s),o==="color"&&Hg(n,"inline-style-color",s),o==="background-color"&&Hg(n,"inline-style-background-color",s),o==="font-family"&&Hg(n,"inline-style-font-family",s)}}function att(n,t){if(t==null)return n==null?void 0:n.normal;if(n)return n[`heading${t}`]}function ctt(n){const t=`${On(n,"inline-style-font-size")}`;if(t&&t.indexOf("px")>0)return+t.replace(/px/g,"")}function utt(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 ftt(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function dtt(n){return On(n,"inline-style-font-family")}function htt(n){const t=On(n,"inline-style-background-color");return iL(t)}function mtt(n){const t=On(n,"inline-style-color");return iL(t)}function gtt(n){ltt(n);const t=On(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!On(n,"style-code"),link:sL(On(n,"link")),size:ctt(n),text:t?ftt(n):utt(n)||n.insert,bold:!!On(n,"style-bold"),underline:!!On(n,"style-underline"),italics:!!On(n,"style-italic"),strike:!!On(n,"style-strikethrough"),superScript:!!On(n,"style-super"),subScript:!!On(n,"style-sub"),math:On(n,"type")==="math"?On(n,"src"):void 0,mention:t,fontFamily:dtt(n),background:htt(n),color:t?"338fe5":rtt(oL(n,"style-color-",6))||mtt(n),highlight:oL(n,"style-bg-color-",13)}}function ptt(){return[new yt.Paragraph({border:{top:{color:"auto",style:yt.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new yt.Paragraph({spacing:{line:0}})]}function Ctt(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Ett(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Att(n,t){return new yt.Paragraph({children:[new yt.ExternalHyperlink({children:[new yt.TextRun({style:"Hyperlink",text:t||n})],link:n})]})}function lL(n){if(n.heading!=null)return`Heading${n.heading}`}function aL(n){if(n.alignment!=null){if(n.alignment==="center")return yt.AlignmentType.CENTER;if(n.alignment==="right")return yt.AlignmentType.RIGHT;if(n.alignment==="left")return yt.AlignmentType.LEFT}}function xtt(n){if(n.indent)return{left:yt.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:yt.convertInchesToTwip(.3*n.padding)}}function btt(n){return{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function vtt(n){const t=n.split(",");if(t.length!==0)return t[0].trim()}function cL(n,t){var o;let e;e=n.inlineCode?"InlineCode":void 0,e=n.link?"Hyperlink":e;const r=n.size||t,i=r!=null?Math.floor(r*1.5+.5):void 0;return n.text=(o=n.text)==null?void 0:o.replace(/\x00/g," "),new yt.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:yt.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:i,style:e,font:n.fontFamily?vtt(n.fontFamily):void 0,shading:n.background?btt(n.background):void 0,color:n.color,highlight:itt(n.highlight)})}function Btt(n,t){if(n.link)return n.link=n.link.replace(/\x00/g," "),new yt.ExternalHyperlink({children:[cL(n,t)],link:n.link})}async function uL(n,t,e,r,i){const[o]=await i(n,t,e);if(o==null)return;const s=await nL({width:r||0,height:0,src:e},o);return new yt.ImageRun({data:o,transformation:{width:(s==null?void 0:s.width)||100,height:(s==null?void 0:s.height)||20}})}function ytt(n){if(n.heading||n.heading)return n.heading}function Ttt(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function ktt(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function Rtt(n,t){var r;const e=[];if(n.text&&Array.isArray(n.text)){for(let i=0;i<n.text.length;i++){const o=n.text[i];if(((r=o.attributes)==null?void 0:r.box)===!0&&t){const s=await t(o);if(s){n.text.splice(i+1,0,...s);continue}}e.push(gtt(o))}return e}}function wtt(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 Stt(n,t){if(n.type==="embed"&&n.embedType&&_x(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(r=>{const i=t(r),o=n.embedData[`${i}_width`],s=n.embedData[`${i}_height`];return{src:r,width:o,height:s}})}function Ltt(n){if(n.padding)return n.padding}function Itt(n){return!!(n.type==="embed"&&n.embedType&&_x(n.embedType)&&n.embedData&&n.embedData.src)}async function jg(n,t,e){return{quoted:!!n.quoted,heading:ytt(n),alignment:Ttt(n),indent:ktt(n),padding:Ltt(n),texts:await Rtt(n,e),list:wtt(n),images:Stt(n,t),border:Itt(n)}}async function Dtt(n,t,e,r){const i=[];if(!n.children)return[];for(const o of n.children){const s=[];for(const l of t.blocks[o])s.push(await jg(l,e,r));i.push(s)}return i}const _tt=D("to-docx"),zg=200;function Mtt(n,t){return Array(n).fill(0).map(()=>Array(t).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 Utt(n,t,e,r){const i=!!n.hasColTitle,o=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<t;c++)for(let d=0;d<e;d++)(i&&d===0||o&&c===0||s&&c%2===1)&&(r[c][d].color=l)}function Ott(n){p(_tt,n.children,"no table children");const t=n.rows,e=n.cols,r=new Array(n.cols).fill(zg).map((s,l)=>n.colsWidth[l]||s);if(r)for(let s=0;s<r.length;s++)r[s]===0&&(r[s]=zg);const i=Mtt(t,e);let o=0;for(let s=0;s<t;++s)for(let l=0;l<e;++l){if(i[s][l].originalWidth=r?r[l]:void 0,i[s][l].from!==void 0)continue;const c=n.children[o];o+=1,i[s][l].cellId=c,i[s][l].color=ott(n[`${c}_background`]),i[s][l].width=r?r[l]:100,i[s][l].align=n[`${c}_align`];const d=n[`${c}_rowSpan`]||1,h=n[`${c}_colSpan`]||1;if(i[s][l].rowSpan=d,i[s][l].colSpan=h,d>1||h>1){let C=0;for(let E=0;E<d;E++)for(let A=0;A<h;A++)E===0&&(C+=r?r[l+A]:80),!(E===0&&A===0)&&(i[s+E][l+A].from=[s,l]);i[s][l].width=C}}return Utt(n,t,e,i),i}async function Ntt(n,t,e,r,i,o,s,l,c,d){async function h(E){if(l&&E.type!=="_exportVirtualBlock"){const A=await l(i,o,E);if(A){await r.addDoc(n,A,d);return}}if(E.type==="text"||E.textOnly===!0){const A=await jg(E,s,c);await r.addTextBlock(A);return}if(E.type==="code"){const A=await Dtt(E,e,s,c);await r.addCodeBlockObject(A);return}if(E.type==="list"&&E.textOnly!==!0){const A=await jg(E,s,c);await r.addListBlockObject(n,A);return}if(E.type==="embed"&&E.embedType){const A=E,v=A.embedData,R=A.embedType;if(_x(R)){const S=await jg(E,s,c);await r.addImagesBlockObject(E,S,d)}else E.embedType==="hr"?r.addSeparatorBlock():E.embedType==="video"?r.addVideoPlaceholder():E.embedType==="audio"?r.addAudioPlaceholder():E.embedType==="webpage"?r.addHyperlinkParagraph(sL(v.src),v.title):r.addOtherEmbedBlock(R,E.embedData);return}if(E.type==="table"){let A=[];if(E.colsWidth)A=new Array(E.cols).fill(zg).map((R,S)=>E.colsWidth[S]||R);else{const R=E.cols;A=new Array(R);for(let S=0;S<A.length;S++)A[S]=zg;E.colsWidth=A}const v=Ott(E);await r.addTableMatrix(A,v,e),r.addEmptyParagraph()}E.type==="_exportVirtualBlock"&&await r.addVirtualBlock(E.id,e,d)}function C(E){var R;const A=((R=E==null?void 0:E.embedData)==null?void 0:R.exportSpec)||(E==null?void 0:E.exportSpec);if(!A)return[E];const v=[];for(const{type:S,data:M}of A){if(S==="text"){const U={id:it(),text:[{insert:M}],type:"text"};v.push(U);continue}if(S==="image"){const U={id:it(),type:"embed",embedType:"image",align:"left",embedData:{src:M}};v.push(U);continue}if(S==="link"){const U={id:it(),type:"embed",embedType:"webpage",embedData:{src:M.url,title:M.title}};v.push(U);continue}if(S==="block")for(const U of M){if(!e.blocks[U])continue;const nt={id:U,type:"_exportVirtualBlock"};v.push(nt)}}return v}for(const E of t)for(const A of C(E))!A||await h(A)}function Ptt(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const Ftt=D("to-docx");class Ktt{constructor(t,e,r,i,o,s){m(this,"paragraphs");this.appId=t,this.docId=e,this.state=r,this.readImageFunc=i,this.convertBlocksFunc=o,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(t){this.paragraphs.push(new yt.Paragraph({heading:lL(t),alignment:aL(t),children:await this.paragraphsFromBlockTexts(t),indent:xtt(t)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new yt.Paragraph({text:`[${_.t("docx.imageExportFailed")}]`,shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(t){if(t.texts==null)return;const e=att(this.defaultFontSize,t.heading),r=[];for(const i of t.texts){if(i.link){const o=Btt(i,e);o&&r.push(o);continue}if(i.box&&i.box.type&&i.box.type==="br"){r.push(new yt.TextRun({text:"",break:1}));continue}if(i.box&&i.box.type&&i.box.type==="image"){const o=await uL(this.appId,this.docId,i.box.src,i.box.width,this.readImageFunc);o&&r.push(o);continue}if(i.math){const o=await uL(this.appId,this.docId,i.math,0,this.readImageFunc);o&&r.push(o);continue}r.push(cL(i,e))}return r}async addCodeBlockObject(t){for(const e of t)for(const r of e){const i={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new yt.Paragraph({style:"Code",border:{left:{...i},right:{...i},top:{...i},bottom:{...i}},children:await this.paragraphsFromBlockTexts(r)}))}}async addListBlockObject(t,e){if(e.list==null)return;let r;const i=e.list.checkbox?`${t}-${e.list.groupId}-${e.list.checkbox}`:`${t}-${e.list.groupId}`;if(this.state.listInstMap[i])r=this.state.listInstMap[i];else if(r=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[i]=r,e.list.start>0&&e.list.ordered){const s=`number-numbering-reference-${r}`,l=rL([e.list.level-1],e.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:r}),this.state.listRefMap[i]=s}else e.list.ordered?this.state.listRefMap[i]=ch.NUMBERING:e.list.checkbox&&e.list.checkbox==="checked"?this.state.listRefMap[i]=ch.CHECKED:e.list.checkbox&&e.list.checkbox==="unchecked"?this.state.listRefMap[i]=ch.UNCHECKED:this.state.listRefMap[i]=ch.BULLET;const o=lL(e);e.texts&&this.paragraphs.push(new yt.Paragraph({heading:o,children:await this.paragraphsFromBlockTexts(e),numbering:{reference:this.state.listRefMap[i],level:e.list.level-1,instance:r}}))}imageDimWithBufferToImageRun(t){return new yt.ImageRun({data:t.buffer,transformation:{width:t.width,height:t.height}})}async addImagesBlockObject(t,e,r){if(e.images==null){if(t.type==="embed"&&t.embedType==="image"){const{src:c}=t.embedData;c||this.addEmptyImagePlaceHolder()}return}const i=[],o=await Promise.all(e.images.map(async c=>{const[d,h]=await this.readImageFunc(this.appId,this.docId,c.src);if(d){const C=await nL(c,d);if(C)return C}i.push(h)}));JZ(o,r,t.embedData);const s=QZ(o,r),l={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new yt.Paragraph({border:e.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:aL(e)||yt.AlignmentType.CENTER,children:s.map(c=>this.imageDimWithBufferToImageRun(c)).flatMap((c,d,h)=>c==null?[]:h.length-1!==d?[c,new yt.TextRun({text:" "})]:c)})),i.forEach(c=>{this.addHyperlinkParagraph(c)})}addSeparatorBlock(){ptt().forEach(t=>this.paragraphs.push(t))}addEmptyParagraph(){this.paragraphs.push(new yt.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(Ctt())}addAudioPlaceholder(){this.paragraphs.push(Ett())}addHyperlinkParagraph(t,e){t!=null&&this.paragraphs.push(Att(t,e))}async addTableMatrix(t,e,r){const i=t.map(o=>o!==0?o*15:1500);this.paragraphs.push(new yt.Table({rows:await this.generateTableRows(e,r),columnWidths:i}))}async generateRowCells(t,e){const r=[];for(const i of t){const o=i.cellId;if(o===void 0)continue;const s=i.width*.9;r.push(new yt.TableCell({children:await this.convertBlocksFunc(o,e.blocks[o],e,this.appId,this.docId,this.state,s),columnSpan:i.colSpan,rowSpan:i.rowSpan,width:{type:yt.WidthType.DXA,size:i.width*15},shading:i.color?{fill:i.color,type:yt.ShadingType.CLEAR,color:"auto"}:void 0}))}return r}async generateTableRows(t,e){const r=[];for(const i of t)r.push(new yt.TableRow({children:await this.generateRowCells(i,e)}));return r}async addDoc(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks.root,e,this.appId,this.docId,this.state,r);i&&(this.paragraphs=this.paragraphs.concat(i))}async addVirtualBlock(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks[t],e,this.appId,this.docId,this.state,r);this.paragraphs.push(...i)}async addOtherEmbedBlock(){}}class Vtt{constructor(t,e,r,i,o,s,l,c){m(this,"convertBlocks",async(t,e,r,i,o,s,l=720)=>{const c=new Ktt(i,o,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await Ntt(t,e,r,c,i,o,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=t,this.docData=e,this.md5HexFunc=r,this.readImage=i,this.defaultFontSize=o,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(t,e){return this.snapshot2docx(this.docData,t,e)}async snapshot2docx(t,e,r){const i=new yt.ImportDotx,o=this.templateData?await i.extract(this.templateData):void 0,s=t.blocks.root;p(Ftt,s,"data must have blocks");const l=Ptt(),c=await this.convertBlocks("blocks",s,t,e,r,l),d=this.backgroundImageOptions?{default:new yt.Header({children:[new yt.Paragraph({children:[new yt.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new yt.Document({numbering:{config:[...ntt,...l.levelConfigs]},sections:[{headers:d,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:o});return yt.Packer.toBlob(h)}}class fL extends Error{constructor(t){super(t),this.name=this.constructor.name}}const $tt=D("editor-to-docx"),dL="editor-to-docx: read image error";async function Htt(n,t,e,r){try{const i=n.doc.buildResourceUrl(r,{withToken:!0});let o=await RS(i);if(!o)throw new Error(dL);if(o.type.indexOf("/svg")!==-1){const l=await yS(o);l&&(o=new File([l],o.name))}return[await o.arrayBuffer(),i]}catch(i){throw new fL(i.message||dL)}}async function jtt(n,t,e){const r=n.editorBlocks.getBlockClass(e.type);if(r.toStandardDoc)try{return await r.toStandardDoc(n,e,t)}catch(i){$tt.error(`toStandardDoc error: ${JSON.stringify(i)}`);return}}async function ztt(n,t){const e=t.attributes,r=n.editorBoxes.getBoxClass(e.type);if(r.toStandardText)return r.toStandardText(n,e)}async function Gtt(n,t){let{template:e,download:r,backgroundImageOptions:i}=t!=null?t:{};e||(e=qZ());const o=n.doc.toJSON(),s=(C,E,A)=>Htt(n,C,E,A),l=async(C,E,A)=>jtt(n,o,A),c=async C=>ztt(n,C),h=await new Vtt(e,o,n0.default,s,void 0,l,c,i).convert("_appId","_docId");if(r){const C=URL.createObjectURL(h),E=document.createElement("a");E.setAttribute("download",`${kS(n)}.docx`),E.setAttribute("href",`${C}`),E.click(),E.remove()}return h}const Mx=D("create-editor");async function Wtt(n,t){var s,l,c,d,h,C,E,A,v,R,S,M,U,V,nt,Y;p(Mx,n,"app does not exists"),t.lang&&_.setLang(t.lang),Br.level=(s=t.logLevel)!=null?s:zi.DEBUG;const e=t.onReauth?async()=>{var ct;const X=t.user.userId,ft=t.docId,pt=await((ct=t.onReauth)==null?void 0:ct.call(t,X,ft,t.permission));return{userId:X,docId:ft,permission:t.permission,appId:t.appId,token:pt,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl}}:void 0,r={auth:{appId:t.appId,docId:t.docId,userId:t.user.userId,permission:t.permission,token:t.token,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl},serverUrl:t.serverUrl,reauthFunc:e,disableLogout:t.disableLogout,onMaxUsersError:t.onMaxUsersError},i=await md.load(r),o=td(n,i,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,enableComments:t==null?void 0:t.enableComments,enableContextMenu:t==null?void 0:t.enableContextMenu,components:{blocks:[...JS,...((l=t==null?void 0:t.components)==null?void 0:l.blocks)||[]],embeds:[...Dx,...((c=t.components)==null?void 0:c.embeds)||[]],boxes:[...ZS,...((d=t.components)==null?void 0:d.boxes)||[]],commandProviders:[new Fm,...((h=t.components)==null?void 0:h.commandProviders)||[]],decorators:[new gg,new JC],insertions:[J1],blockHooks:[new OA,new gw,...((C=t.components)==null?void 0:C.blockHooks)||[]],textRenders:[new U4,new JE,...((E=t.components)==null?void 0:E.textRenders)||[]],options:{...t.componentsOptions}},shortcuts:[Qq,yH,Oz,gA,l4,DF,cA,UX,lm,TF,...t.shortcuts||[]],colors:["#0064FF","#EB3723","#F59300","#00A865","#F25A0A","#70A310","#009CAD","#0990D9","#8851ED","#D62069"]});if(o.editorCommandProviders.registerCommandProvider(new go(o)),o.input.addHandler(new yY),o.input.addHandler(new Cg),o.input.addHandler(new tV),o.input.addHandler(new wz),o.input.addHandler(new yA(o,{hideTitle:t.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0,applyContentPlaceholder:(A=t.placeholder)==null?void 0:A.applyContentPlaceholder})),o.input.addHandler(new lg(o,(v=t.componentsOptions)==null?void 0:v.quickMenu)),o.input.addHandler(new VA(o)),o.input.addHandler(new qA(o)),o.input.addHandler(new bg),o.input.addHandler(new Pk),o.doc.registerCallback(new TY(o)),o.addCustom("remote-cursor",()=>new mT(o)),o.addCustom("block-menu",X=>new Ew(X)),me.isMobile||o.addCustom("editor-tooltip",()=>new ag(o)),t!=null&&t.enableComments&&o.addCustom("editor-comments",X=>new M4(X,new $Z(X))),t.enableContextMenu!==!1&&o.addCustom("editor-context-menu",X=>new QA(X)),o.addCustom("create-options",()=>new Nb(o,t)),o.addCustom("drop-target",()=>new qd(o)),o.addCustom("list-to-mindmap",()=>new tg(o)),o.addCustom("list-to-mention",()=>new WY(o)),o.addCustom("mobile-helper",()=>new pQ(o)),o.addCustom("code-caret",()=>new xH(o)),o.addCustom("image-paste-handler",()=>new vw(o)),o.addCustom("drawio-paste-handler",()=>new kx(o)),(R=t.componentsOptions)!=null&&R.mention){const X=t.componentsOptions.mention;o.addCustom("mention",()=>new AS(o,X))}if(o.addCustom("heading-collapse",()=>new gx(o)),o.addCustom(lh,X=>new vx(X)),bu.register(o),qd.register(o),Il.register(o),Tl.register(o),o.addListener("clickLink",(X,ft,pt)=>{var wt;if((wt=t==null?void 0:t.events)!=null&&wt.onClickLink){t.events.onClickLink(X,ft,pt);return}const ct=pt.getAttribute("link");ct&&(X.readonly||ft.ctrlKey||ft.metaKey)&&window.open(ct,"_blank")}),(M=(S=t.componentsOptions)==null?void 0:S.remoteCarets)!=null&&M.onUserChanged){const X=(V=(U=t.componentsOptions)==null?void 0:U.remoteCarets)==null?void 0:V.onUserChanged;o.doc.getRemoteUsers().on("change",ft=>{X(o,ft)})}return(Y=(nt=t.componentsOptions)==null?void 0:nt.templates)!=null&&Y.templates.length&&(o.addListener("docChanged",()=>{Vg(o)}),o.addListener("resize",()=>{Vg(o,{reset:!0})}),setTimeout(()=>{Vg(o)},100)),o.doc.registerCallback({onError:async X=>{if(X.code==="ResetDoc"){Mx.error(`reset doc: ${X.message}`);const ft=await md.load(r);o.doc.reset(ft)}}}),o.version="1.1.47",Br.level===zi.DEBUG&&(window.setReauthFail=X=>{window.isReauthError=X},window.reConnect=X=>o.doc.externalDoc.client.connection.reConnect(X)),o}function qtt(n){return n.toJSON!==void 0}async function Xtt(n,t,e){var o,s,l,c,d,h,C,E;p(Mx,n,"app does not exists");const r=qtt(t)?t:new LC(t,{serverUrl:e.serverUrl||""});e.lang&&_.setLang(e.lang),Br.level=(o=e.logLevel)!=null?o:zi.DEBUG;const i=td(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[mA,vA,BA,Fk,...(l=(s=e.components)==null?void 0:s.blocks)!=null?l:[]],commandProviders:[new Fm],decorators:[new gg,new JC],embeds:[...Dx,...((c=e.components)==null?void 0:c.embeds)||[]],boxes:[Jk,xS,H4,...((d=e.components)==null?void 0:d.boxes)||[]],insertions:[J1],blockHooks:[new OA,...((h=e.components)==null?void 0:h.blockHooks)||[]],textRenders:[new U4,new JE,...((C=e.components)==null?void 0:C.textRenders)||[]],options:{...e.componentsOptions}},shortcuts:[gA,l4,cA,lm]});return i.editorCommandProviders.registerCommandProvider(new go(i)),i.input.addHandler(new Cg),i.input.addHandler(new yA(i,{hideTitle:e.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new lg(i,(E=e.componentsOptions)==null?void 0:E.quickMenu)),i.input.addHandler(new VA(i)),i.input.addHandler(new qA(i)),i.input.addHandler(new bg),i.input.addHandler(new Pk),i.addCustom("block-menu",A=>new Ew(A)),i.addCustom("drawio-paste-handler",()=>new kx(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",A=>new M4(A,new HZ(A,r))),e.enableContextMenu!==!1&&i.addCustom("editor-context-menu",A=>new QA(A)),i.addCustom("heading-collapse",()=>new gx(i)),i.addListener("clickLink",(A,v,R)=>{var M;if((M=e==null?void 0:e.events)!=null&&M.onClickLink){e.events.onClickLink(A,v,R);return}const S=R.getAttribute("link");S&&(A.readonly||v.ctrlKey||v.metaKey)&&window.open(S,"_blank")}),i.addCustom(lh,A=>new vx(A)),bu.register(i),i.version="1.1.47",i}async function Ytt(n,t,e){var h;const r=n.doc.externalDoc.client.auth,i=await Am.load({auth:r,serverUrl:e});if(!((h=i.getVersionHelper)==null?void 0:h.call(i)))throw new Error("the editor does not support to show versions");const s=n.getCustom("create-options");if(!s)throw new Error("the editor does not support to show versions");const l=s.getData(),c=new tL(l),d=n.addCustom("version-dialog",()=>new oS(i,c));return d.show(t),d}b.tippy=v9,b.AnchorBox=DB,b.AuthError=dd,b.AuthHeader=va,b.AutoScroll=b0,b.BaseURLHeader=nu,b.BasicCommands=BK,b.BlockExclusiveHook=gw,b.BlockLockerHook=OA,b.BlockLockerPasteHandler=bg,b.BlockResizer=Pd,b.BrBox=wB,b.CodeBlock=vA,b.CodeLineBlock=BA,b.CodeTextDecorator=gg,b.DOC_RE_AUTH_KEYS=lh,b.DefaultShortcuts=lm,b.DocIdError=hO,b.DocReAuthCallbacks=vx,b.DragDrop=ev,b.DrawioEmbed=FS,b.DrawioPasteHandler=kx,b.EditorBlocks=d3,b.EditorBoxes=LB,b.EditorCommandProviders=wy,b.EditorComplexBlockPosition=Ai,b.EditorComplexSelectionRange=Qi,b.EditorDecorators=OB,b.EditorEmbeds=m3,b.EditorInsertions=UB,b.EditorSimpleBlockPosition=Cn,b.EditorSimpleSelectionRange=Dn,b.EmbedBlock=p3,b.EmbedBlockResizer=nh,b.EnforceWithDocumentTitleHandler=yA,b.EventCallbacks=Lc,b.ExportImageError=fL,b.FILL_CHAR=P8,b.FileExtError=mO,b.GroupOrder=Hk,b.HeadingBlockScrollListener=FY,b.ImageBox=IB,b.InlineBoxCommandProvider=iR,b.InputtingInsertion=_B,b.LocalDoc=LC,b.LogLevel=zi,b.Logger=Br,b.MIN_DISTANCE_THRESHOLD=Zb,b.ManualCloseDialog=Cd,b.ManualMenu=dl,b.ManualToolbar=pd,b.MarkdownInputHandler=Cg,b.MaxUserError=HC,b.Mindmap=Zm,b.OnesEditorAutoSuggest=AE,b.OnesEditorCustomDataWrapper=Nb,b.OnesEditorExclusiveBlock=Tl,b.OnesEditorHoveringBlock=ze,b.OnesEditorIcons=ZO,b.OnesEditorQuickMenu=lg,b.OnesEditorToc=sh,b.OnesEditorTocProvider=Il,b.OnesEditorToolbar=bu,b.OnesEditorTooltip=ag,b.OnesEditorVersionsDialog=oS,b.OverflowTooltipHelper=cg,b.PermissionError=Em,b.Popup=su,b.ReAuthToolbar=wS,b.RemoteCarets=mT,b.RemoteCaretsDecorator=JC,b.RemoteCaretsInsertion=J1,b.RemoteUsers=ed,b.RequestReloadError=hd,b.RichText=zn,b.ShareDBDoc=md,b.ShareDBDocVersionsProvider=tL,b.ShareDBServer=Am,b.SimpleCache=zb,b.StandardEmbedBlockCommands=lx,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=I1,b.TEXT_STYLE_COLOR_PREFIX=L1,b.TableBlock=mA,b.TableBlockCommandProvider=Fm,b.TableShortcuts=gA,b.TextBlock=ur,b.TextBox=RB,b.TextColorItem=M2,b.TextStyleShortcuts=cA,b.TocEmbed=CS,b.ZERO_WIDTH_SPACE_CHAR=_c,b.abbreviation=v0,b.addAttribute=I0,b.addClass=q,b.addCommentToBlock=eh,b.addDays=DI,b.addMetaToDoc=Jf,b.addMonths=II,b.animateScrollTo=ia,b.applyPlaceholderToBlock=Od,b.assert=p,b.autoShowHideTemplates=Vg,b.bindKeyDownEvent=h0,b.blockToDoc=yC,b.blockToHtml=eC,b.blockToMarkdown=W0,b.blockToText=G0,b.blocksToDoc=Q5,b.clearAllSelection=Gv,b.clientType=me,b.cloneBlock=ol,b.cloneChildContainer=fC,b.cloneDoc=dC,b.cloneText=EB,b.commentToShareDbComment=QC,b.compareElement=u0,b.comparePosition=v1,b.complexBlockAdjustSelectionPos=w0,b.complexBlockFindNearestChildBlock=L7,b.complexBlockGetAllChildContainers=_n,b.complexBlockGetBottomChildContainers=x3,b.complexBlockGetDeepFirstChild=C3,b.complexBlockGetFirstSimpleChild=y1,b.complexBlockGetLastSimpleChild=Fc,b.complexBlockGetSelectedContainers=Pc,b.complexBlockGetTopChildContainers=A3,b.containerToDoc=J5,b.continuousScroll=Cv,b.convertBlockFrom=k0,b.convertImageFileToPng=yS,b.convertImageSrcToPng=cQ,b.converterIntercept=pg,b.copyBlockAttributes=XB,b.copyResourcesFromDoc=SC,b.createBlockAnchor=jo,b.createBlockCaretAnchor=v3,b.createBlockContentElement=fa,b.createBlockElement=Fv,b.createBlockSimpleDocRange=V0,b.createBlockSimpleRange=Ie,b.createBoxContentElement=$v,b.createBoxElement=Kv,b.createBoxOp=CB,b.createChildContainer=u3,b.createComplexBlockPosition=Ue,b.createComplexDocPos=BB,b.createComplexDocRange=V8,b.createContainer=xB,b.createContainerElement=s1,b.createDeleteOps=hB,b.createEditor=td,b.createEditorSelectionRange=En,b.createElement=B,b.createEmptyContainer=Yo,b.createEmptyDoc=Xo,b.createEmptyTextBlockData=F0,b.createExpandedRange=a0,b.createIconButton=ea,b.createImage=Np,b.createInsertOps=N0,b.createInsertionContentElement=zv,b.createInsertionElement=Hv,b.createLocalEditor=Xtt,b.createOnesEditor=Wtt,b.createRange=Gb,b.createRichText=Ea,b.createRootContainer=c3,b.createSimpleBlockPosition=mt,b.createSimpleDocPos=vB,b.createTextBlockData=eo,b.createTextButton=Sa,b.createTextOp=Xr,b.createTextWithReplaceSoftReturn=H1,b.daysAfter=Zp,b.deleteText=z1,b.diffDays=_I,b.disablePageScroll=Xp,b.docToHtml=jB,b.docToHtmlFragment=zf,b.docToMarkdown=zB,b.docToText=il,b.downloadImageToFile=RS,b.downloadObjectToFile=Bx,b.downloadSvgToString=LS,b.editLink=Rd,b.editorAddComment=$q,b.editorAddTextAttribute=s5,b.editorAutoInsertBlock=YB,b.editorBreakTextBlock=Xc,b.editorClearCompositionText=oC,b.editorClearSelectedContents=J0,b.editorCopyBlock=RC,b.editorCopyDoc=sm,b.editorDeleteBlock=aC,b.editorDeleteBlockText=sC,b.editorDeleteBlockWithoutChildren=Y0,b.editorDeleteChildContainer=P_,b.editorDeleteChildContainers=QB,b.editorFocusToBlock=uC,b.editorFocusToEnd=rM,b.editorGetBlockData=Qo,b.editorGetBlockText=Jn,b.editorGetBlockTextEx=H0,b.editorGetBoxData=TB,b.editorHandleKeyboardEvent=uy,b.editorInsertBlock=qc,b.editorInsertBoxToBlock=WB,b.editorInsertDoc=i5,b.editorInsertDocAt=hC,b.editorInsertText=iC,b.editorInsertTextToBlock=GB,b.editorInsertTextToBlockEx=rC,b.editorMergeTextBlock=JB,b.editorMoveDown=A5,b.editorMoveEnd=AC,b.editorMoveHome=S5,b.editorMoveLeft=p5,b.editorMoveLineEnd=N5,b.editorMoveLineHome=O5,b.editorMovePageDown=H5,b.editorMovePageUp=$5,b.editorMoveRight=C5,b.editorMoveUp=E5,b.editorMoveWordEnd=k5,b.editorMoveWordLeft=T5,b.editorRangeClearColor=a5,b.editorRangeGetColor=c5,b.editorRangeSetColor=l5,b.editorRemoveTextAttribute=$_,b.editorReplaceBlockText=Z0,b.editorReplaceContainer=o5,b.editorRunOnce=IC,b.editorSelectAll=bC,b.editorSelectContainer=rm,b.editorSelectDown=x5,b.editorSelectEnd=xC,b.editorSelectHome=L5,b.editorSelectLeft=b5,b.editorSelectLineEnd=U5,b.editorSelectLineHome=M5,b.editorSelectPageDown=G5,b.editorSelectPageUp=z5,b.editorSelectRight=v5,b.editorSelectUp=B5,b.editorSelectWordEnd=w5,b.editorSelectWordLeft=R5,b.editorSetTextColor=Yc,b.editorShowFindDialog=_W,b.editorToDocx=Gtt,b.editorUpdateBlockData=tm,b.editorUpdateCompositionText=qB,b.editorUpdateEmbedData=n5,b.enablePageScroll=Yp,b.escapeHtmlText=m0,b.escapeRegExp=r1,b.escapeSpace=hI,b.exclusiveBlock=_A,b.executeBlockCommand=e3,b.executeEmbedBlockCommand=t3,b.executeRangeCommand=Ry,b.fileToDataUrl=Mc,b.findAfterOffsetNotType=X1,b.findAllText=vC,b.findBlockByIndex=Iv,b.findEventTargetBlock=Xb,b.findInsertionById=jv,b.findNextOffset=l_,b.findNextVisibleSimpleBlock=Dy,b.findPrevOffset=s_,b.findPrevOffsetNotType=q1,b.findPrevSimpleBlockBeforeChildContainer=E3,b.findPrevVisibleSimpleBlock=Iy,b.findTarget=Dc,b.findWordEnd=Q1,b.findWordLeft=Y1,b.format=Rf,b.formatBytes=Ev,b.formatDate=e1,b.fragmentToHtml=fv,b.fromBase64=Bf,b.fromBase64ToBlob=Wp,b.fromBase64ToUint8Array=yI,b.fromDocRange=nl,b.fromNowString=n1,b.genId=it,b.generateEditorContainerId=o1,b.getAllChildBlocks=w1,b.getAllQuickMenuItems=aA,b.getAllSelectedBlocks=Ji,b.getAttributesAt=Hc,b.getBlockBackground=c1,b.getBlockByIndex=Js,b.getBlockCaretRect=tl,b.getBlockClass=ae,b.getBlockClassByType=aa,b.getBlockClientRects=Vo,b.getBlockCommandsWithHook=p1,b.getBlockContent=zt,b.getBlockHeading=Df,b.getBlockId=dt,b.getBlockIndex=Rt,b.getBlockInfo=Hd,b.getBlockKind=Ci,b.getBlockMinWidth=qv,b.getBlockNearestRangeFromPoint=k1,b.getBlockOptions=GI,b.getBlockPath=el,b.getBlockProperties=Qv,b.getBlockRangeFromPoint=S0,b.getBlockStyles=zI,b.getBlockTextLength=At,b.getBlockTools=ve,b.getBlockType=Ot,b.getBoxContent=f1,b.getBoxId=Vv,b.getBoxTypeFromElement=If,b.getChildBlockCount=qi,b.getChildBlocks=ke,b.getChildOffset=ga,b.getColorFromAttributes=_1,b.getColorFromContent=B0,b.getComplexBlockClass=jr,b.getContainerBlockPath=s3,b.getContainerBlocks=Sv,b.getContainerBlocksElement=Sf,b.getContainerById=pi,b.getContainerId=Et,b.getContainerMinWidth=x1,b.getContainerToolsElement=$I,b.getContainerWidth=f3,b.getDistanceSquare=Ys,b.getElementFromPoint=Fe,b.getElementOffset=bf,b.getElementScale=Hr,b.getEmbedType=ln,b.getExistsBlockTools=y0,b.getExistsContainerById=wf,b.getFileExt=kf,b.getFirstChildBlock=Me,b.getFirstClientRect=c0,b.getHeadingBlockChildren=Nc,b.getHeadingMenuOptions=oA,b.getHorizontalPadding=Fp,b.getInsertionContent=d1,b.getLastChildBlock=We,b.getLastClientRect=na,b.getListAllNextBrothers=pu,b.getLogger=D,b.getNextBlock=oe,b.getNextHiddenBlocks=i3,b.getNextValidOffset=pa,b.getNextVisibleBlock=Gr,b.getOffsetFromPoint=Pp,b.getOffsetInfoAfter=$f,b.getOffsetInfoBefore=j0,b.getOpAt=q3,b.getOpLength=L0,b.getParentBlock=et,b.getParentBlockExcludeSelf=ua,b.getParentBox=u1,b.getParentContainer=at,b.getPrevBlock=Ke,b.getPrevValidOffset=rl,b.getPrevVisibleBlock=zr,b.getRangeCommands=Ty,b.getReferenceClientRect=hk,b.getRootBlock=g1,b.getScrollContainer=pn,b.getSpecialBlockCommands=Jv,b.getStandardEmbedBlockProperties=ax,b.getTextAfterOffset=i_,b.getTextAttributes=nC,b.getTextBeforeOffset=o_,b.getTextBlockChild=Uf,b.getTextBlockClass=_v,b.getTextBlockContentChildTextLength=qr,b.getTextBlockContentChildType=o3,b.getTextBlockContentChildren=Yi,b.getTextLength=jn,b.getTextOpLength=S1,b.getTextWidth=E0,b.getToolbar=Gm,b.handleBlockElementUpdated=Xv,b.hasAltOnly=AI,b.hasClass=Mt,b.hasCtrlOrCmd=lv,b.hasCtrlOrCmdOnly=EI,b.hashCode=Tv,b.hideBlock=Pv,b.hideTemplates=BS,b.htmlToFragment=C0,b.i18n=_,b.includeBigTable=wN,b.injectDocToHtmlFragment=Qf,b.injectStyle=Jb,b.inputActions=BM,b.insertEmptyBlock=XI,b.insertEmptyEmbedBlock=C1,b.insertText=qo,b.intersectionCommands=nU,b.isBackspace=av,b.isBlock=ca,b.isBlockLocked=xg,b.isBlockLockedByOthers=UA,b.isBlockLockedBySelf=jd,b.isBlockTools=Nv,b.isBox=T0,b.isBoxOp=zo,b.isCJK=ov,b.isChildContainer=gi,b.isChildNode=Ae,b.isCodeBlock=Ii,b.isCollapsedHeadingBlock=Xi,b.isCollapsedRange=K8,b.isComplexBlockPosition=ha,b.isComplexKindBlock=Pt,b.isContainer=Qs,b.isContainerSelectedAllChildBlocks=W5,b.isControlEvent=sa,b.isDelete=bI,b.isDraggingFiles=A0,b.isElementVisible=d0,b.isEmbedBlock=Le,b.isEmptyContainer=Of,b.isEmptyDoc=G1,b.isEmptyTextBlock=Be,b.isEmptyTextBlockWithoutCompositionText=Ud,b.isEnterOnly=zp,b.isEscape=p0,b.isExclusiveBlock=$d,b.isExpandedHeadingBlock=r3,b.isFirefox=Af,b.isFirstChildBlockInComplexBlock=S7,b.isHeadingBlock=In,b.isHighSurrogate=cI,b.isInBlock=h1,b.isInBlockTools=Oc,b.isLetter=iv,b.isLowSurrogate=uI,b.isMatchShortcut=Gi,b.isMoveForward=pI,b.isNavigationEvent=gI,b.isNavigationKey=sv,b.isNodeRemoved=xf,b.isNumber=rv,b.isPrintableKey=jp,b.isRootBlock=Wr,b.isRootContainer=ie,b.isSafari=ta,b.isSameDay=t1,b.isSelectBoxOnly=ei,b.isShiftEnter=xI,b.isShiftTab=BI,b.isShortcutEvent=CI,b.isSimpleBlock=jI,b.isSimpleBlockPosition=xi,b.isSimplePos=bB,b.isSimpleRange=K0,b.isSpace=g0,b.isTab=vI,b.isTextBlockContentBoxChild=yr,b.isTextBlockContentChild=_f,b.isTextBlockContentInsertionChild=Ho,b.isTextBlockContentTextChild=Mf,b.isTextKindBlock=st,b.isTextKindBlockType=Lf,b.isTitleBlock=Ko,b.isToday=Av,b.isValidOffset=cr,b.isVisibleBlock=Zs,b.isYesterday=xv,b.loadJs=qb,b.loadJsPromise=ra,b.lockers=No,b.md5=Rv,b.mergeCommands=zm,b.mergeDocs=Aa,b.mergeOps=j1,b.mergeText=O8,b.multiSplitText=Y3,b.overflowText=bv,b.parseShortcut=cv,b.patchNode=yf,b.pointInRect=oa,b.rangeAddAttribute=Ff,b.rangeGetTextColor=rB,b.rangeRemoveAttribute=$c,b.rangeSetTextColor=tB,b.rangeTransformText=J3,b.registerDragDrop=$p,b.removeAttribute=D1,b.removeClass=ut,b.removeLastBr=D8,b.removePlaceholderFromBlock=KR,b.removeStyle=Qb,b.replaceAll=MI,b.replaceAllCaseInsensitive=UI,b.replaceAllText=X5,b.replaceText=P0,b.requestDownload=x0,b.resetListStart=Eu,b.scrollIntoView=jf,b.scrollable=pv,b.selectFile=Uc,b.selectedBlockToDoc=im,b.selectionToDoc=Qc,b.setAttributes=f0,b.setClipboardData=Tf,b.setClipboardDataByEvent=RI,b.setColorToAttributes=eB,b.setDataset=Kp,b.setDefaultCursor=vf,b.setStyles=Vp,b.shareDBCommentToDocObject=YC,b.shareDBDocCommentToComment=dT,b.shortcutToDisplayText=gn,b.showBlock=a1,b.showDocVersions=Ytt,b.showTemplates=xx,b.splitText=ar,b.splitToThree=an,b.stringToDataUrl=qp,b.stringToObjectUrl=Qp,b.subText=Q3,b.textNodeOffsetFromPoint=Wb,b.titleFromEditor=kS,b.toBase64URL=Wi,b.toMindmap=Jm,b.toPlainText=Re,b.toPlainTextKeepLength=W1,b.trimChar=Hp,b.unexclusiveBlock=MA,b.unicodeLength=fI,b.unicodeSubstr=dI,b.updateBlockSelection=Wv,b.updateOpAttributes=AB,b.updateTextBlockContent=r_,b.updateUrl=Gp;for(const n in je)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>je[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
966
+ \`\`\`\`\`\``}return""}const fZ={embedType:"plantuml",convertFrom:aZ,handleUpdateBlock:lZ,createEmbedContent:sZ,getBlockProperties:cZ,convertTo:uZ},Ect="",dZ="hr",hZ={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},mZ={dividingLine:{type:"Dividing-Line",abstract:"Dividing-Line"}},gZ={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};_.mergeLang({"zh-CN":hZ,"en-US":mZ,"ja-JP":gZ});function pZ(n,t){const e=B("div",["editor-embed-container"],t);B("hr",["editor-embed-hr"],e)}function CZ(n,t,e,r){return r==="html"?"<hr />":r==="markdown"?"---":"------------"}function EZ(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:_.t("dividingLine.type"),icon:qT,order:500,group:"common",subText:tr("insert-hr")}],handleInsertEmptyEmbed:async(n,t)=>{const{containerId:e,blockIndex:r}=t;return n.insertEmbed(e,r,dZ,{})}}}function AZ(n,t,e){const{data:r}=e;if(!r||r.embedType!=="dividing-line"||!st(n,t))return null;const i={};return{blockData:{id:it(),type:"embed",embedType:"hr",embedData:i}}}function xZ(){return{abstract:_.t("dividingLine.abstract")}}const bZ={embedType:"hr",createEmbedContent:pZ,convertTo:CZ,getOptions:EZ,convertFrom:AZ,getBlockProperties:xZ},Act="",xct="",vZ={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>',maxSizeFailed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6</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"}}},BZ={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>',maxSizeFailed:'<div class="line-1">{name} upload failed</div><div class="line-2">The file size exceeds limit. Please choose another file.</div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},yZ={media:{upload:{failed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>',maxSizeFailed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u30D5\u30A1\u30A4\u30EB\u306E\u30B5\u30A4\u30BA\u304C\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u308B\u305F\u3081\u3001\u4ED6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</div>'},load:{failed:'<div class="line-1">{name}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},audio:{menuItem:"\u97F3\u58F0",abstract:"\u97F3\u58F0"},video:{menuItem:"\u52D5\u753B",abstract:"\u52D5\u753B"}}};_.mergeLang({"zh-CN":vZ,"en-US":BZ,"ja-JP":yZ});var Mi=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Mi||{}),ah=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(ah||{});const GS=10*1024*1024,TZ=["wav","mp3","aac","ogg","webm","flac"],kZ=["ogg","mp4","webm"],RZ=()=>{};function WS(n){var h,C,E,A,v,R;const t=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:e,maxSize:r,callbacks:i}=t,o=(C=e==null?void 0:e.audio)!=null?C:TZ,s=(E=e==null?void 0:e.video)!=null?E:kZ,l=(A=r==null?void 0:r.audio)!=null?A:GS,c=(v=r==null?void 0:r.video)!=null?v:GS,d=(R=i==null?void 0:i.onError)!=null?R:RZ;return{allowedMedias:{audio:o,video:s},maxSize:{audio:l,video:c},callbacks:{onError:d}}}function wZ(n,t){const e=o=>o.map(s=>`.${s}`).join(","),{allowedMedias:r}=WS(n),i=r[t];return i?e(i):"*"}function SZ(n,t,e){const{maxSize:r,callbacks:i,allowedMedias:o}=WS(t),{[e]:s}=r,{[e]:l}=o;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${e}`,i!=null&&i.onError&&(i==null||i.onError(t,d)),d}const c=kf(n.name);if(l&&!l.includes(c.toLowerCase())){const d=new Error(`media file is not allowed: ${c}`);throw d.code="NotAllowedFile",i!=null&&i.onError&&(i==null||i.onError(t,d)),d}}function LZ(n){return n===ah.Empty||n===ah.Error}const xn=D("media");class IZ extends je.TypedEmitter{constructor(e){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(e,r)=>{if(!r.target||!(r.target instanceof Node)||!(r.target instanceof Element?r.target:r.target.parentElement))return;const o=et(r.target);if(!o||!o.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",e,"load_error",dt(o))});m(this,"handleUploadFile",async e=>{p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const{editor:r}=this.options,i=et(this.mediaContainer);p(xn,i,"The block element not exist");const o=r.getBlockData(i);try{const{resourceId:s}=await r.doc.uploadResource(e,{onProgress:C=>{this.renderProgress(C,e)}}),{name:l,type:c,size:d}=e,h={...o,embedData:{...o.embedData,src:s,fileName:l,fileSize:d,fileType:c}};r.updateBlockData(i,h)}catch(s){xn.error(s),this.emit("mediaError",r,"upload_error",o.id),this.renderRetry(e,s)}ut(i,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=e}bindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(e){p(xn,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(e)}renderError(){p(xn,this.abstract,"no abstract");const{editor:e,createMediaElement:r}=this.options,{mediaIcon:i,mediaName:o}=this.abstract;p(xn,this.mediaContainer,"The media element not exist");const s=et(this.mediaContainer);p(xn,s,"The block element not exist");const l=e.getBlockData(s),c=B("div",["media-error","embed-selected-content","embed-hover-content"],null),d=B("span",["media-error-icon"],c);d.innerHTML=i;const h=B("div",[],c);h.innerHTML=_.t("media.load.failed",{name:o}),c.appendChild(h);const C=h.querySelector(".retry-upload");return p(xn,C,"The element not exist"),e.domEvents.addEventListener(C,"click",(E,A)=>{const v=B("div",["media-element"],null),R=this.getResourceUrl(l),S=r(E,v,l,R);this.unbindMediaEvent(),this.media=S,this.bindMediaEvent(),this.updateMediaContent(v)}),this.setFullScreen(),c}renderRetry(e,r){var E,A;p(xn,this.abstract,"no abstract");const{editor:i}=this.options,{mediaIcon:o,mediaName:s}=this.abstract,l=B("div",["media-error","embed-selected-content","embed-hover-content"],null),c=B("span",["media-error-icon"],l);c.innerHTML=o;const d=B("div",[],l);let h=_.t("media.upload.failed",{name:s});(((E=r.response)==null?void 0:E.status)===420||((A=r.response)==null?void 0:A.status)===413)&&(h=_.t("media.upload.maxSizeFailed",{name:s})),d.innerHTML=h,l.appendChild(d);const C=d.querySelector(".retry-upload");C&&i.domEvents.addEventListener(C,"click",()=>{i.readonly||(p(xn,this.abstract,"no abstract"),this.handleUploadFile(e))}),this.updateMediaContent(l),this.setFullScreen()}renderProgress(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope .media-progress"),o=e===-1||e===100?100:e;if(i){const{updateProgressElement:s}=this.options;s(i,o)}else{const{createProgressElement:s}=this.options,l=et(this.mediaContainer);p(xn,l,"The element not exist"),q(l,"media-block-uploading");const c=B("div",["media-progress"],null);s(c,o,r),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:o,updateMediaElement:s,editor:l}=this.options,c=this.getResourceUrl(e,r);if(i){const d=s(l,i,e,c);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent()}else{const d=B("div",["media-element"],null),h=o(l,d,e,c);this.unbindMediaEvent(),this.media=h,this.bindMediaEvent(),this.updateMediaContent(d)}}renderEmpty(e){p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const r=B("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);r.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(r);const{editor:i}=this.options;i.findBlockById(e.id)&&this.emit("mediaError",i,"empty",e.id),this.setFullScreen()}getResourceUrl(e,r){const{src:i}=e.embedData,{editor:o}=this.options;return o.doc.buildResourceUrl(i,{syncNewResources:async(s,l)=>{var d,h;if(!r)return;await o.doc.addResources([s]);const c=(h=(d=o.doc).getServerMeta)==null?void 0:h.call(d).appId;if(l!==e.embedData.src&&c&&e.embedData.src.includes(c)){const C=et(r);if(C&&!o.readonly&&o.isBlockWritable(C)){const E=xt.default(e);E.embedData.src=s,o.updateBlockData(C,E)}}}})}setFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),q(this.mediaContainer,"full-screen")}removeFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),ut(this.mediaContainer,"full-screen")}updateBlockAlign(e,r){const i=et(r);p(xn,i,"The block element not exist");const{align:o}=e;e.embedType==="video"&&(i.hasAttribute("data-style-align")&&i.removeAttribute("data-style-align"),i.setAttribute("data-style-align",o))}render(e,r){const{src:i}=e.embedData;(!this.mediaContainer||!r.contains(this.mediaContainer))&&(this.mediaContainer=B("div",["media"],r)),this.updateBlockAlign(e,r),LZ(i)?i===ah.Empty&&this.renderEmpty(e):this.renderMediaElement(e,r)}setAbstract(e){this.abstract=e}}D("media-embed");const DZ="left";class qS{constructor(){m(this,"handleInsertEmptyEmbed",async(t,e)=>{var C;const{containerId:r,blockIndex:i}=e;let o;(C=e.data)!=null&&C.file&&(o=e.data.file);const s=wZ(t,this.embedType);if(o=o!=null?o:await Uc(s,{}),!o)return null;const{mediaType:l}=this.getAbstract();try{SZ(o,t,l)}catch{return null}const c={id:it(),type:"embed",embedType:this.embedType,embedData:{src:ah.Empty}};l==="video"&&(c.align=DZ);const d=t.insertBlock(r,i,c);return await this.getMedia(t,c.id).handleUploadFile(o),d})}getMedia(t,e){const r=t.addCustom(`media-${e}`,()=>new IZ({editor:t,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return r.setAbstract({...this.getAbstract()}),r}getOptions(){const{menuItem:t,mediaIcon:e,mediaName:r,order:i,group:o}=this.getAbstract();return{name:r,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:t,icon:e,order:i,group:o,subText:tr(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(t,e,r){const{id:i}=r;this.getMedia(t,i).render(r,e)}handleUpdateBlock(t,e,r){const{id:i}=r,o=this.getMedia(t,i),s=zt(e);return o.render(r,s),!0}handleDeleteBlock(t,e){const r=e.id,i=this.getMedia(t,r);i.removeAllListeners(),i.destroy()}convertTo(t,e,r,i){const o=e.embedData,s=t.doc.buildResourceUrl(o.src,{withToken:!0});return i==="html"?`<${o.type} src="${s}" />`:i==="markdown"?`![${o.src}](${s})`:s}}function XS(n,t){const e=B("div",["uploading-progress-mask"],n),r=B("div",["uploading-progress-bar"],e),i=B("div",["uploading-progress-bar-value"],r);i.style.width=`${t}%`}function YS(n,t){const e=n.querySelector(".uploading-progress-bar-value");e&&(e.style.width=`${t}%`)}const _Z=D("media-audio");class MZ extends qS{constructor(){super(...arguments);m(this,"embedType",Mi.AUDIO);m(this,"updateProgressElement",YS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["audio-container","embed-hover-content","embed-selected-content"],r),l=B("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=o,setTimeout(()=>{this.getMedia(e,i.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:zT,mediaName:_.t(`media.${Mi.AUDIO}.menuItem`),menuItem:_.t(`media.${Mi.AUDIO}.menuItem`),order:800,mediaType:Mi.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Mi.AUDIO}.abstract`)}`}}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .audio-container > audio");return p(_Z,s,"The media element not exist"),s.src!==o&&(s.src=o),s}createProgressElement(e,r){const i=B("audio",[],e);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,i.src="about:blank",XS(e,r)}}const UZ=new MZ;D("video-resizer");function QS(n){return n&&Le(n)&&ln(n)==="video"}const OZ=50;class Ix{constructor(t){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(t,e)=>{if(!this.resizing&&!window.isDragging&&(e&&QS(e)&&this.disableBlockResize(e),t&&QS(t)&&this.editor.isBlockWritable(t))){const r=this.getVideoElement(t);if(!r)return;this.enableBlockResize(t,r)}});m(this,"handleResizing",(t,e)=>{if(this.resizing=!0,!this.currentResizableElement)return;const r=t.getBlock();if(!r)return;const i=r.getBoundingClientRect().width,o=Math.min(Math.max(e.width,OZ),i);this.currentResizableElement.style.width=`${o}px`,this.currentResizableElement.style.pointerEvents="none"});m(this,"handleResized",t=>{this.resizing=!1;const e=t.getBlock();if(!this.currentResizableElement||!e)return;const r=this.editor.getBlockData(e),{width:i}=this.currentResizableElement.getBoundingClientRect();this.currentResizableElement.style.pointerEvents="auto",this.editor.updateBlockData(e,{...r,width:i})});this.editor=t,ze.get(t).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,ze.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(t){return zt(t).querySelector(":scope .video-container > video")}updateResizer(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.updateResizer()}disableBlockResize(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.disableResize()}enableBlockResize(t,e){const r=this.editor.addCustom(`${dt(t)}-resizer`,()=>new Pd(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));r.enableResize(t,e),r.removeListener("resizing",this.handleResizing),r.removeListener("resized",this.handleResized),r.addListener("resizing",this.handleResizing),r.addListener("resized",this.handleResized),this.currentResizableElement=e}}const NZ=D("video");class PZ extends qS{constructor(){super(...arguments);m(this,"embedType",Mi.VIDEO);m(this,"updateProgressElement",YS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["video-container","embed-selected-content","drag-preview-element"],r),l=B("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=o,l.addEventListener("canplay",()=>{e.addCustom("video-resizer",()=>new Ix(e)),this.getMedia(e,i.id).removeListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).addListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).removeFullScreen()}),i.width&&(l.style.width=`${i.width}px`),l});m(this,"createProgressElement",(e,r,i)=>{const o=B("video",["progress-video"],e);o.innerHTML="Your browser does not support the <code>audio</code> element.",o.controls=!0,XS(e,r),Mc(i).then(s=>{const l=e.querySelector(".progress-video");l&&h1(e)&&(l.src=s)})})}getAbstract(){return{mediaName:_.t(`media.${Mi.VIDEO}.menuItem`),mediaIcon:GT,menuItem:_.t(`media.${Mi.VIDEO}.menuItem`),order:700,mediaType:Mi.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Mi.VIDEO}.abstract`)}`}}handleMediaError(e,r,i){const o=e.addCustom("video-resizer",()=>new Ix(e)),s=e.getBlockById(i);o.disableBlockResize(s)}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .video-container > video");p(NZ,s,"The media element not exist"),s.src!==o&&(s.src=o),i.width?s.style.width=`${i.width}px`:s.style.width="";const l=e.getBlockById(i.id);return setTimeout(()=>{e.addCustom("video-resizer",()=>new Ix(e)).updateResizer(l)}),s}}const FZ=new PZ,JS=[mA,vA,BA,Fk],Dx=[FS,EJ,qJ,rZ,fZ,XK,bZ,FZ,UZ,Gz,CS,SX],ZS=[Jk,xS,H4];function KZ(n,t,e){var i,o,s,l;Br.level=(i=e.logLevel)!=null?i:zi.DEBUG;const r=td(n,t,{components:{blocks:[...JS,...((o=e==null?void 0:e.components)==null?void 0:o.blocks)||[]],embeds:[...Dx,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[...ZS,...((l=e.components)==null?void 0:l.boxes)||[]],textRenders:[new JE],options:{...e.componentsOptions}}});return r.readonly=!0,r.addCustom("heading-collapse",()=>new gx(r)),r.addCustom("editor-tooltip",()=>new ag(r)),r.addListener("clickLink",(c,d,h)=>{var E;if((E=e==null?void 0:e.events)!=null&&E.onClickLink){e.events.onClickLink(c,d,h);return}const C=h.getAttribute("link");C&&(c.readonly||d.ctrlKey||d.metaKey)&&window.open(C,"_blank")}),r}class tL{constructor(t){this.createOptions=t,t.lang&&_.setLang(t.lang)}createHistoryEditor(t,e){return KZ(t,e,this.createOptions)}}function eL(n,{root:t,childDoc:e,doc:r}){var h,C;e.uploadResource=r.uploadResource.bind(r),e.buildResourceUrl=r.buildResourceUrl.bind(r);const i=n.getComponentOptions("comment"),o={image:{defaultAlign:"left"},table:{locatingContainer:t,hideCellMenu:!0,hideToolbar:!0},...i==null?void 0:i.componentsOptions},s=[];n.editorBlocks.forEach(E=>{E.blockType==="text"||E.blockType==="embed"||s.push(E)});const l=[];n.editorEmbeds.forEach(E=>{l.push(E)});const c=[];n.editorBoxes.forEach(E=>{E.boxType==="text"||E.boxType==="br"||E.boxType==="image"||E.boxType==="anchor"||c.push(E)});const d=td(t,e,{shortcuts:[lm],components:{blocks:s,commandProviders:[new Fm],decorators:[new gg],embeds:l,boxes:c,options:o}});if(d.input.addHandler(new Cg),d.input.addHandler(new VA(d)),d.input.addHandler(new qA(d)),d.input.addHandler(new Fq(d)),d.input.addHandler(new bg),d.addCustom("image-paste-handler",()=>new vw(d)),me.isMobile||d.addCustom("editor-tooltip",()=>new ag(d)),n.options.enableContextMenu!==!1&&d.addCustom("editor-context-menu",E=>new QA(E)),(h=n.options.componentsOptions)!=null&&h.mention){const E=n.options.componentsOptions.mention;d.addCustom("mention",()=>new AS(d,{...E}))}if((C=n.options.componentsOptions)!=null&&C.comment){const E=n.options.componentsOptions.comment;E.onCommentEditorClick&&d.addListener("click",E.onCommentEditorClick)}return d}function VZ(n,t){const e=Array.from(n.rootContainer.querySelectorAll(`[comment-${t.toLocaleLowerCase()}="${t}"]`)),r=new Set;e.forEach(i=>{const o=et(i);o&&r.add(o)}),r.forEach(i=>{Kq(n,i,t)})}class $Z{constructor(t){m(this,"listeners",new Set);m(this,"doc");this.editor=t,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(t){return this.doc.getComment(t)}getCommentDoc(t){return this.doc.getCommentDoc(t)}localCreateComment(t,e){this.doc.localCreateComment(t,e)}localDeleteComment(t){const e=this.getComment(t);this.doc.localDeleteComment(t);const r=e.groupId;this.getComments().filter(o=>o.groupId===r).length===0&&VZ(this.editor,r)}localUpdateComment(t,e){this.doc.localUpdateComment(t,e)}onCreateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onCreateComment(t,e))}onDeleteComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onDeleteComment(t,e))}onUpdateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onUpdateComment(t,e))}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}createCommentEditor(t,e){return eL(this.editor,{root:t,childDoc:e,doc:this.doc})}allowEdit(t){return t.userId===this.doc.getUser().userId}}class HZ{constructor(t,e){m(this,"listeners",new Set);this.editor=t,this.localDoc=e}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(t){return this.doc.comments[t]}getCommentDoc(t){const e=this.doc.comments[t];return YC(e)}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}localCreateComment(t,e){}localDeleteComment(t){}localUpdateComment(t,e){}createCommentEditor(t,e){return eL(this.editor,{root:t,childDoc:e,doc:this.localDoc})}allowEdit(t){return t.userId===this.localDoc.getUser().userId}}const jZ={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}",limitedEnvTips:"\u7531\u4E8E\u6D4F\u89C8\u5668\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528 {shortCut} \u7C98\u8D34"}},zZ={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:"Due to the limitations of the current http access environment, please use the shortcut ({shortCut}) {operation}",limitedEnvTips:"Press {shortCut} to paste due to browser restrictions"}},GZ={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:"\u8907\u88FD",cut:"\u5207\u308B",unsafeEnvTips:"HTTP\u74B0\u5883\u306E\u5236\u7D04\u306B\u3088\u308A\u3001{operation}\u3059\u308B\u306B\u306F\u3001\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8({shortCut}) \u3092\u3054\u4F7F\u7528\u304F\u3060\u3055\u3044",limitedEnvTips:"\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u5236\u9650\u306B\u3088\u308A\u3001\u300C{shortCut}\u300D\u3092\u4F7F\u7528\u3057\u3066\u8CBC\u308A\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044"}};_.mergeLang({"zh-CN":jZ,"en-US":zZ,"ja-JP":GZ});const WZ="UEsDBBQABgAIAAAAIQBk9WPugQEAACkGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0lMtqwzAQRfeF/oPRtsRKuiilxMmij2UbaArdKvI4EdULaZzH33fsJKYUJy5NsjHIM/feowHNcLw2OllCiMrZjA3SPkvASpcrO8/Yx/Sld8+SiMLmQjsLGdtAZOPR9dVwuvEQE1LbmLEFon/gPMoFGBFT58FSpXDBCKRjmHMv5JeYA7/t9++4dBbBYg8rDzYaPkEhSo3J85p+b0kC6MiSx21jlZUx4b1WUiDV+dLmv1J6u4SUlHVPXCgfb6iB8daEqnI4YKd7o9EElUMyEQFfhaEuvnIh57mTpSFletymhdMVhZLQ6Cs3H5yEGGnmRqcIxtMNIDVC2T1/G4csIzrzaTRXpJkE5+PgZJzGtPKDgAqaGR6chS3NDALRn38YjXUnRMSNhnh+gq1vdzwgkuASADvnToQVzN4vRvHDvBOkoNypmGk4P0Zj3QmBtIpg+z39VdQ2xyKps36AtNrCP669312Vuuf/9PKaRLI++X5QrcUc8pZsXi/60TcAAAD//wMAUEsDBBQABgAIAAAAIQAekRq37wAAAE4CAAALAAgCX3JlbHMvLnJlbHMgogQCKKAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArJLBasMwDEDvg/2D0b1R2sEYo04vY9DbGNkHCFtJTBPb2GrX/v082NgCXelhR8vS05PQenOcRnXglF3wGpZVDYq9Cdb5XsNb+7x4AJWFvKUxeNZw4gyb5vZm/cojSSnKg4tZFYrPGgaR+IiYzcAT5SpE9uWnC2kiKc/UYySzo55xVdf3mH4zoJkx1dZqSFt7B6o9Rb6GHbrOGX4KZj+xlzMtkI/C3rJdxFTqk7gyjWop9SwabDAvJZyRYqwKGvC80ep6o7+nxYmFLAmhCYkv+3xmXBJa/ueK5hk/Nu8hWbRf4W8bnF1B8wEAAP//AwBQSwMEFAAGAAgAAAAhADPCW79BAQAA5wQAABwACAF3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzIKIEASigAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArJQxT8MwEIV3JP5D5B07LVAQatoFkDqwQJFYneSSWI3tyL6Q9t9zojRNRYkYPN6z7r1P57Pny62uo09wXlmTsAmPWQQms7kyZcLe189X9yzyKE0ua2sgYTvwbLm4vJi/Qi2RmnylGh+Ri/EJqxCbByF8VoGWntsGDJ0U1mmJVLpSNDLbyBLENI5nwg092OLEM1rlCXOrnPLXuwb+422LQmXwaLNWg8EzEQKpF8hQuhIwYd/lXpxwMmPiPMN1SAaPu5qG2EPs67H4u5DxhTW4lmk9GEMvjUFMQ0KYVqfgaMeOEL00BjEJCZG1Hq3+oLQegvOjKhSCHl2LWUiaipxcrczmSPNj23UdT6XKW55ZLQ7HLzan5KctgjPyT8TbkIgdpG+ASHc0WN+BODarm6BP6BfFQTkgiJPvafEFAAD//wMAUEsDBBQABgAIAAAAIQBOMo6QFgYAAKYkAAARAAAAd29yZC9kb2N1bWVudC54bWzUWttu40QYvkfiHSJfLRKtz4eYTVeOD7uVQKoo+wCuPUmstT3WeNI0XC0XC1wguOBiuWClLgjBE4AEiIdZ0T28BTM+JM6h7cTZkm0vEnv+mW+++eb7/0yc3r13lsSdU4DyCKY9TtwXuA5IAxhG6bDHPfzM2zO4To79NPRjmIIeNwU5d+/g/ffuTswQBuMEpLhDINLcnGRBjxthnJk8nwcjkPj5fhIFCOZwgPcDmPBwMIgCwE8gCnlJEIXiKkMwAHlO5rP99NTPuQouOGNDC5E/IYMpoMIHIx9hcDbHEDcGUfkub6wCSS2AyAolcRVK3hhK4ymrFSClFRBhtYKktkNaszitHZK0iqS3Q5JXkYx2SCt2SlYNDjOQkuAAosTH5BYN+cRHj8bZHgHOfBydRHGEpwRT0GoYP0oftWBERs0QEjncGEHnExiCWA5rFNjjxig1q/F7s/GUulmOr97qEYhl/eUQpyoOxcp5BGKiBUzzUZTNMjxpi0aCoxrk9KpFnCZx3W+SiYzpcll5ckop54As9Cv9k7hkfjWiKDDsCIWYjWChsDhnzSQhLpxP3EqahrgiYwGpAaQVAC0AjAW/xjAqDD6YZyjFiRhTo8Ypd4XiRHNhRcY6tkymAZCDzSDUmkc+TRoryobb2fY+guNsjhZth3Y4L0ITehzYAKuyfzMl8+3IHI/8jNSmJDAPhylE/klMGBEzd4gfO8UO0FeyrfStuARnHVoIuANyfDmB4ZS+ZySimJmP/EPiHEV2dE+3La5oJcUf01a9+iOtJjkqhZ/2OEEQJE1z5FmTAwb+OMY04nUVRRfryFGjqZjwCBVvx3gaE4bmqR/3uAfAp2cukeNpDJVdYj8d1h1AuvfwmEb5KszPkMqX6tqDKc7JoFGUEi7Az7GVR35z4MTEBy/Pv3rz0w+0CZeBZZwrp6ajxIXBlMwaMT2l6wh9lUHMRcnejpjSDYrJoND2GksMGquOY+iu7exIY/m2ayyzaKwaqi4YNNd3obFy2zVWGDTW+7Il296uaoX6LmisMugkKIpouJqwI5202+5FjUFjTfQ8S7OMHWms33aNdQaNJd3qqoq8q5pq3HaNDRaNNcFzRafLoLGtaF2JdlzReDFSaFw1NTTeRMf1XBVLNcSux+KHnXOVBddQLEm6DVxVSxf6nubdPNfFPLNhCCqWdRxBOHARIj3wNCNf1YbIT46xj3CVi6WxA5jmMAb7MRzeWUqQtQhuGi6Mf/H4xxGIY/hhh3xbjMMXj5998BFDrsiSZnuiYjPoZLiC7fV3rVM+zTFI9uEY72eI1KA4baPWnZZyiYYu2oLFlK6u2C3OzqtyLURaytXME8Zvv//+9fOr8y8unj1lWKjqeroraMpWvliMFAutmoq9WDp9aJohGzrLN7o2M7asLrVj6MMbM8/8gBgqQyAH6BRwB5RlZ8l/1HgFrSO0NH29Wws7e5jGUQoa+zvbLgwuQ26YiBGX2SOvn39z8eWT0ik3tbAzvIzMuiuXbkRndSfW+1rRlb7nKExng00SeDuXXcK1qwiWJi99hmme4uiaRfNkJ1wXt2u78+Dr35+8+vPXJTeMSNVGxDuPOsiMyILRYahR/qMoxxBNSREuTbdox+vy4UGNem06MPB+8/0/L7/9ZdluM+JvV6SX539c/P0dg7eFru3alrhUs1VH6kuqPD/gULUcRVAdd51fFiM35m21L3ueJNOJGlwFQ1FFxZ0beQ3Xcrs3WkDV1FjA4qfrx8RZR4QYOSlko3JX0nFS9ozi07juJ8xih2HdVjy65mcDGlmyljCbK5rbf/H109fPf7u6FjfA2R5Rq47sCZq2JL/ueo5o2VfK//8oXf0g8K4rvcf0c4DrGX25v3TElmzV1foiLe47tfrGZf16xWbiLMlTh/yTCmauWA4CfDST+jopimUNjz8nwQnxhSQp9LmgOSLXqqFUWZoNP/EpIoYZaVfKLigajvD89gRiDJP5fQwGjegI+CEg8+oCfSRmDiDEjdvhGBe31XQBjKle1cmE9imaQxjcR/SnOJOeho4iHBCWslYM4ut1F5flD3P8/B+MDv4DAAD//wMAUEsDBBQABgAIAAAAIQC29GeY0gYAAMkgAAAVAAAAd29yZC90aGVtZS90aGVtZTEueG1s7FlLixtHEL4H8h+Guct6zehhrDXSSPJr1zbetYOPvVJrpq2eadHd2rUwhmCfcgkEnJBDDLnlEEIMMcTkkh9jsEmcH5HqHkkzLfXEj12DCbuCVT++qv66qrq6NHPh4v2YOkeYC8KSjls9V3EdnIzYmCRhx719MCy1XEdIlIwRZQnuuAss3Is7n392AZ2XEY6xA/KJOI86biTl7Hy5LEYwjMQ5NsMJzE0Yj5GELg/LY46OQW9My7VKpVGOEUlcJ0ExqL0xmZARdg6USndnpXxA4V8ihRoYUb6vVGNDQmPH06r6EgsRUO4cIdpxYZ0xOz7A96XrUCQkTHTciv5zyzsXymshKgtkc3JD/beUWwqMpzUtx8PDtaDn+V6ju9avAVRu4wbNQWPQWOvTADQawU5TLqbOZi3wltgcKG1adPeb/XrVwOf017fwXV99DLwGpU1vCz8cBpkNc6C06W/h/V671zf1a1DabGzhm5Vu32saeA2KKEmmW+iK36gHq92uIRNGL1vhbd8bNmtLeIYq56IrlU9kUazF6B7jQwBo5yJJEkcuZniCRoALECWHnDi7JIwg8GYoYQKGK7XKsFKH/+rj6Zb2KDqPUU46HRqJrSHFxxEjTmay414FrW4O8urFi5ePnr989PvLx49fPvp1ufa23GWUhHm5Nz9988/TL52/f/vxzZNv7XiRx7/+5avXf/z5X+qlQeu7Z6+fP3v1/dd//fzEAu9ydJiHH5AYC+c6PnZusRg2aFkAH/L3kziIEMlLdJNQoAQpGQt6ICMDfX2BKLLgeti04x0O6cIGvDS/ZxDej/hcEgvwWhQbwD3GaI9x656uqbXyVpgnoX1xPs/jbiF0ZFs72PDyYD6DuCc2lUGEDZo3KbgchTjB0lFzbIqxRewuIYZd98iIM8Em0rlLnB4iVpMckEMjmjKhyyQGvyxsBMHfhm327jg9Rm3q+/jIRMLZQNSmElPDjJfQXKLYyhjFNI/cRTKykdxf8JFhcCHB0yGmzBmMsRA2mRt8YdC9BmnG7vY9uohNJJdkakPuIsbyyD6bBhGKZ1bOJIny2CtiCiGKnJtMWkkw84SoPvgBJYXuvkOw4e63n+3bkIbsAaJm5tx2JDAzz+OCThC2Ke/y2EixXU6s0dGbh0Zo72JM0TEaY+zcvmLDs5lh84z01QiyymVss81VZMaq6idYQK2kihuLY4kwQnYfh6yAz95iI/EsUBIjXqT5+tQMmQFcdbE1XuloaqRSwtWhtZO4IWJjf4Vab0bICCvVF/Z4XXDDf+9yxkDm3gfI4PeWgcT+zrY5QNRYIAuYAwRVhi3dgojh/kxEHSctNrfKTcxDm7mhvFH0xCR5awW0Ufv4H6/2gQrj1Q9PLdjTqXfswJNUOkXJZLO+KcJtVjUB42Py6Rc1fTRPbmK4RyzQs5rmrKb539c0Ref5rJI5q2TOKhm7yEeoZLLiRT8CWj3o0Vriwqc+E0LpvlxQvCt02SPg7I+HMKg7Wmj9kGkWQXO5nIELOdJthzP5BZHRfoRmsExVrxCKpepQODMmoHDSw1bdaoLO4z02Tker1dVzTRBAMhuHwms1DmWaTEcbzewB3lq97oX6QeuKgJJ9HxK5xUwSdQuJ5mrwLST0zk6FRdvCoqXUF7LQX0uvwOXkIPVI3PdSRhBuENJj5adUfuXdU/d0kTHNbdcs22srrqfjaYNELtxMErkwjODy2Bw+ZV+3M5ca9JQptmk0Wx/D1yqJbOQGmpg95xjOXN0HNSM067gT+MkEzXgG+oTKVIiGSccdyaWhPySzzLiQfSSiFKan0v3HRGLuUBJDrOfdQJOMW7XWVHv8RMm1K5+e5fRX3sl4MsEjWTCSdWEuVWKdPSFYddgcSO9H42PnkM75LQSG8ptVZcAxEXJtzTHhueDOrLiRrpZH0Xjfkh1RRGcRWt4o+WSewnV7TSe3D810c1dmf7mZw1A56cS37tuF1EQuaRZcIOrWtOePj3fJ51hled9glabuzVzXXuW6olvi5BdCjlq2mEFNMbZQy0ZNaqdYEOSWW4dm0R1x2rfBZtSqC2JVV+re1ottdngPIr8P1eqcSqGpwq8WjoLVK8k0E+jRVXa5L505Jx33QcXvekHND0qVlj8oeXWvUmr53Xqp6/v16sCvVvq92kMwioziqp+uPYQf+3SxfG+vx7fe3cerUvvciMVlpuvgshbW7+6rteJ39w4Byzxo1IbtervXKLXr3WHJ6/dapXbQ6JX6jaDZH/YDv9UePnSdIw32uvXAawxapUY1CEpeo6Lot9qlplerdb1mtzXwug+Xtoadr75X5tW8dv4FAAD//wMAUEsDBBQABgAIAAAAIQDlI7CA9QMAAKALAAARAAAAd29yZC9zZXR0aW5ncy54bWy0Vttu2zgQfV9g/8HQ8zq6WHZsoU4R3zYp4nZRebHPlETZRHgRSMqu8/U7pETLu3ELp0VeEmrOzJkh53DoDx+/MdrbY6mI4FMvvAm8Hua5KAjfTr2/N6v+2OspjXiBqOB46h2x8j7e/f7bh0OisNbgpnpAwVXC8qm307pKfF/lO8yQuhEV5gCWQjKk4VNufYbkc131c8EqpElGKNFHPwqCkdfSiKlXS560FH1GcimUKLUJSURZkhy3/1yEvCZvE7IQec0w1zajLzGFGgRXO1Ipx8Z+lg3AnSPZ/2gTe0ad3yEMrtjuQcjiFHFNeSagkiLHSkGDGHUFEt4ljl8RnXLfQO52i5YKwsPArs4rH76NIHpFMMrxt7dxjFsOHyLPeUjxNp7RiYd0BxuOfq6YMwKF30YxdHWoI+t2pOg1PW6gJ5JJJJsb1DaY5cnjlguJMgrlQKN70Kuerc78hS2bf3YJOe/gIr8IwXqHpMIyBzXDFAgCzzdABtXBaFiIz0KntZSi5sUDRmD7LrwSQrcwKFCUqUYa8iZbiRjc/amXU4x4Q1/gEtVUb1CWalGB0x7B1m+jNnu+QxLlwJZWKAcdzwXXUlDnV5i0c5gjEmTeRtipYla1wqvlEzqKWp8haTOxgIEjBofznym0FgWMFAiV5PoumgBbTTg8L+H/iQRMWEkKvDFNSfWR4hVsJiUv+J4Xn2qlCTDaWfQLFfyoAMxN5i8go82xwiuMdA3H9k7JbGdWlFRrAqKQj7wAWb1bMlKWWEICAkJbg5yIFAd7zo1S3ysvKOwfcIZbPNiATJ9nQmvBHo7VDs761zpp9e+fyxme50K5xVe4YifXYBEHw8WyqdSgHRJEo9FicAkJV9Eyvr+EjJfBfDW7hMxm0WB+ewmZx6NJNLmILMPJ+GIFCyhiPL+IfHc/q0kc39qe+KcTYYl5dv+SbmWuVY81EXPEMklQb20eZt94ZPJ5RrjDMwzzFJ8jaZ05sN9vAMUQpStosANsc1hSEFUtcGnXdI3ktuNtPeRFK8y8TycuM26x/BMGZ9WgB4mq5ro4lzCO20jC9RNhzq7qLHVRHF6AMwim8Je9tOfUHc8h0SA/O3aekJWx9cW8P/9shIeR0veKoKn3sjOmRvlUpka1eI2qqhF/tg2nHiXbnQ5NmIavAn7S2Y9sG7VYZLGowewHys1mwbtddLbI2c78Bs426Gyxs8Wdbehsw842craRse1g3ElK+DPcQ7c09lJQKg64eOjwVyb3SuUERJAeWdY9PjcNRomCwVDBO6WFdNgfFgvjpBD5o3ls48Y+nIwXy8mg0XY4tO+btrMDjvYrLmdI4aJRt/tpffcvAAAA//8DAFBLAwQUAAYACAAAACEAQMH/8TkBAAAjAwAAFAAAAHdvcmQvd2ViU2V0dGluZ3MueG1snNJfT8IwEADwdxO/w9J36CCykIVBYgzGF2OifoDS3aCx7S294sBP720CYnhhvvT//XLXdrbYOZt8QiCDvhCjYSoS8BpL49eFeH9bDqYioah8qSx6KMQeSCzmtzezJm9g9Qox8klKWPGUO12ITYx1LiXpDThFQ6zB82aFwanI07CWToWPbT3Q6GoVzcpYE/dynKaZODDhGgWrymh4QL114GMXLwNYFtHTxtR01JprtAZDWQfUQMT1OPvjOWX8iRndXUDO6ICEVRxyMYeMOorDR2k3cvYXmPQDxhdApmHXz5geDMmR544p+znZyTHlmfO/ZM4Agn7E5JgH7V1bkdP509pjUCvLEr9RwtecdHDbcrZt1w35+Jx/LdbROPMFSwz3ARuCINtlZS02L8+PPJF/vvb8GwAA//8DAFBLAwQUAAYACAAAACEAOdtFTLkFAAAnWgAAEgAAAHdvcmQvbnVtYmVyaW5nLnhtbOyczW7qRhiG95V6D8j7xP8/oEOOwECV6rQ60knV9WAGsGKPrbGB0FV7Ke266q430EvpDfQWOuOxzZ9DbIMw5MwmDuP5Xs/3zjfDk0nCh48vvtdaQhy5AeoK8r0ktCBygomLZl3hp6fRnSW0ohigCfACBLvCGkbCx4dvv/mw6qCFP4aYdGwRDRR1VqHTFeZxHHZEMXLm0AfRve86OIiCaXzvBL4YTKeuA8VVgCeiIslS8l2IAwdGEdGxAVqCSEjlnJdyahMMViSYCmqiMwc4hi8bDbmyiC62RetQSKkhRDJU5EMptbKUIdJRHQhptYTIqA6U9HpKBckZ9ZSUQyWznpJ6qGTVUzooJ/+wwIMQInJzGmAfxOQlnok+wM+L8I4IhyB2x67nxmuiKRmZDHDRc40RkahcwVcnlRVM0Q8m0FMnmUrQFRYYddL4uzyeDr3D4tNLFoHL5M9CBoGz8CGKk8xFDD3iRYCiuRvmK9yvq0ZuzjOR5bEklr6X9VuFcsnl8tr2NGBWbgTLDD/13/fYyI8rylKJGaESeUSZIew+MxuJT6pw8+Ba1myZK5fcQDIB5UDAcGDJDT/TsFIN0dmsUKrjllwamQ6bFarjboyVS+5j+4PZEohgNQk9G0e09rcyCmenle13OFiEGzX3NLXHzSa0ojxQQSst/+0lGZ02mC9zEJK9yXc6jzMUYDD2yIhIMbdIPbaSGaBfybTSS/ItfGnRjUB4IPwCxlGMgRP/uPBbO68eSQERDiIiHQwJ/GDayFCnN40h7mMInmkXqoIiKt9ZAo+0jJS+ItuKINI7/sKL3U9wCb2ndQizPkmrR1tZr9gPveyeatvSUJE0dsdb0hsuuWTPSsaSdZZZL0JhIz9vHC88D8Z5/BN8yW/9++sfefv3TtbqwWnaPfyM6cVFNB3a3BU0hdrQmQM0S3iQviZ9xbwzTi+jAMURNTFyXFJgP5PelCCjJLpHLNpvcxGRn8ApIG6wx4+Tr25uJWuNfskalCRfMX2mmKSx75J8ukv//F7VJEu7nEkbO2T9bTuU0+3477e/q/ohK8alDDmevnqO9P+snL5hXUf6bJM7Mf2/qqavyNJ1pK83UvyKfrEt83j6RiPFr7QvthkeT99spPhV9Uq2PquR4lfNxrY+cQfg6DOO0p1ch+4Uua1LumWw/KvTXbsvGX1LS+O3p+sMdJc+r/xkXRPblYEZznY7dnC2Oz19znbV0udsx9mOsx1nuwunX5HtlDpsp2rKSB5ItdlOaxu2aitWbms+Xfzk7kIndzXW9OXwjsMchzkOc4Xpc5hroPg5zHGYuwWYU2vBXNvWTcsasvyLYW6+HmN38sMRpDN7pqbpmpabm09a4l0cek5XsI2BNVRNu8Y0hl/itZeP55MbxZ8BBjMMwnnhPH8FJ3y5rZakS0N5dAZ2fl9nfrlBw/5Is4b9s7x5XDM4VrWI7hepRZImtSVJYlUFUQxidwnP9JPGLcPmvkHMsjMbdMs4um8QazmzQbcMrPsGXccSuyKk3TfoOpbYFUHvvkHXscRuB4vpLl4HiwdqXxqw/KufcQ7aQ0Oib/2ZrfmEvv8zTn6ayU8z+WkmP818M31+mtlA8fPTTH6aeQvYRjG3Mrbplq0aZttm+VfHNsM2FG3YTk9Dt6frDNhWY7FybOPYtsmeYxvHNo5tHNsaTZ9jWwPFfzvYRk+8K2ObOVBHqmFpLP/q2NYb9CRTVtL47el679jGIe317DmkNVD6HNI4pHFI45DWaPoc0o5DGv2te3VIG/ZNc9QbsPyrQxrZGwzLlL/Kf/vgZ2sc2zi2cWx7M32ObQ0UP8c2jm1Xgm0owTWUffIKbdphtywjNZVDBWHsDbQwLPmf3VfC2BtPYVj2x+RFYQefD7gJM4+EsY2uMEw7EsY2iMKw5JMEXwljC6swLJvrojBWkIVhGcYlYezKIPrhfwAAAP//AwBQSwMEFAAGAAgAAAAhAPiVyO/8DgAA85kAAA8AAAB3b3JkL3N0eWxlcy54bWzsXd9zo0YSfr+q+x8oPSUPG/+QLTtbcVJr2T67btdxVt5L3eMIRhZnYHSA1uv89TczDAjUDKKHjuu8m6RqLQH9MczXX890A5qffvkSR95nnmahSM5GBz/sjzye+CIIk4ez0af7qzenIy/LWRKwSCT8bPTMs9EvP//9bz89vc3y54hnngRIsrexfzZa5vnq7d5e5i95zLIfxIoncudCpDHL5df0YS9m6eN69cYX8Yrl4TyMwvx573B/fzIyMGkfFLFYhD6/EP465kmu7fdSHklEkWTLcJWVaE990J5EGqxS4fMskxcdRwVezMKkgjk4AkBx6KciE4v8B3kxpkUaSpof7OtPcbQBOMYBHAKAic+/4DBODcaetKzjhAEOZ1LhhEENx60xNYCM4yCOy3Zkz7G6oth/e/OQiJTNI4kkOfJkN3saWP0rW6v+6I/y8J+lwwbCv+ALto7yTH1N71Lz1XzTf65Ekmfe01uW+WF4L9slweNQnuf6XZKFI7mHsyx/l4WsvvPSbFP7l+rAVks/y2ubz8MgHO2pk2Z/yJ2fWXQ2Ojwqt0xVIxrbIpY8lNt48mZ6W2/M2eiPpdk0l7hnI5a+mb1Thnvm2oq/tSteVd+Ko7a6R+pJqmtWiFzu5Yv3wn/kwSyXO85G++pUcuOnm7s0FKkU8tnoxx/NxhmPw+swCHhSOzBZhgH/fcmTTxkPNtt/u9JiNBt8sU7k5/HJRFMWZcHlF5+vlLTl3oSp3rtVBpE6eh1uTq7N/1uCHZg+a7Nfcqbim3ewDaGbj4I4VBZZ7WrbMddb166PQp1o/FInOnqpEx2/1IkmL3Wik5c60elLnUjD/JknCpOAfymECE8DUHfhWNSIxrGIDY1j0RIaxyIVNI5FCWgci6OjcSx+jMaxuCkCJxe+zQtrzj62eHs37u4xwg1395Dghrt7BHDD3R3w3XB3x3c33N3h3A13d/R2w90drPG4xVTLu5EyS/LBKlsIkSci517OvwxHY4nE0kkfDZ4a9HhKcpEEMEVkMwPxYDSf6e+7PUSL1H08z1U25omFtwgf1inPBjecJ595JLN2jwWBxCMETHm+Ti094uLTKV/wlCc+p3RsOtAoTLiXrOM5gW+u2AMZFk8C4u4rEUmCQuXQbJ0vlUhCAqeOmZ+K4U0TjCw+vA+z4X2lQLzzdRRxIqxbGhfTWMNzAw0zPDXQMMMzAw0zPDGocUbVRQaNqKcMGlGHGTSifiv8k6rfDBpRvxk0on4zaMP77T7MIx3i67OOg/61u2kkVJl+cDtm4UPC5ARg+HBjaqbeHUvZQ8pWS0+VkNth69eMPc+5CJ69e4oxrUKimtdrF5nKqw6T9fAObaBRiavCI5JXhUcksApvuMQ+yGmymqBd0+Qzs/U8bxWtRuol2hmL1sWEdrjaWD7cwzYCuArTjEwG7bAEHnyrprOKTorIt2nl8IZtsIbLajsqkTbPQBK0MhL+I00Yvn5e8VSmZY+Dka5EFIknHtAhzvJUFL5Wl/yhpqSX5C/j1ZJloc6VGhD9h/ryBr/3ga0GX9BdxMKEhrfLNzELI49uBnF9/+G9dy9WKs1UHUMDeC7yXMRkmKYS+N3vfP49TQPfySQ4eSa62ndE5SENNg0JBpkCSQRESHKaGSYhyRiq8f7Jn+eCpQEN2l3Ki2dqck6EOGPxqph0EGhLxsUnGX8IZkMa718sDVVdiEpU9yRgtbJhtp7/h/vDQ92t8EgqQ7+uc11/1FNdbU0HN3ya0IAbPkXQbMrhQfkvwcU24IZfbAOO6mKnEcuy0HoL1RmP6nJLPOrrHZ78GTwRiXSxjug6sAQk68ESkKwLRbSOk4zyijUe4QVrPOrrJXQZjUdQktN4/0jDgIwMDUbFhAajokGDUXGgwUgJGP6ETg1s+GM6NbDhz+oUYERTgBoYlZ+RDv9Ed3lqYFR+psGo/EyDUfmZBqPys/GFxxcLOQmmG2JqkFQ+V4OkG2iSnMcrkbL0mQjyMuIPjKBAWqDdpWKhXrYQSfEQNwGkqlFHhJPtAo6K5N/5nKxpCouyXQQVURZFQhDV1jYDjrZsPru2y0y/czG4CXcR8/lSRAFPLddkt5X58mzFfFOmB7f7epU934cPy9ybLatqfx1msr/TskzYG2a7T9jW55PDDrMPPAjXcdlQ+DLFZNzfWHt0w7h856XDeDOTaFge97SE55zsttzMkhuWJz0t4TlPe1pqnTYsu/RwwdLHVkc46fKfKsezON9JlxdVxq2n7XKkyrLNBU+6vKghFe+d76u7BZCdfpqx2/cTj90eoyI7CkZOdpTeurJDdAnsI/8cqpEdEzT1+aqnJ0Dc15PoXpHzt7Uo6vaNG079X+q6kROnJONeK864/42rRpSx92PvcGOH6B137BC9A5AdolckspqjQpIdpXdsskP0DlJ2CHS0giMCLlpBe1y0gvYu0QqiuESrAbMAO0Tv6YAdAi1UCIEW6oCZgh0CJVRg7iRUiIIWKoRACxVCoIUKJ2A4oUJ7nFChvYtQIYqLUCEKWqgQAi1UCIEWKoRACxVCoIXqOLe3mjsJFaKghQoh0EKFEGih6vniAKFCe5xQob2LUCGKi1AhClqoEAItVAiBFiqEQAsVQqCFCiFQQgXmTkKFKGihQgi0UCEEWqjFq4buQoX2OKFCexehQhQXoUIUtFAhBFqoEAItVAiBFiqEQAsVQqCECsydhApR0EKFEGihQgi0UPXNwgFChfY4oUJ7F6FCFBehQhS0UCEEWqgQAi1UCIEWKoRACxVCoIQKzJ2EClHQQoUQaKFCiC7/NLcobY/ZH+CrntYn9vvfujKN+lh/lbsONe4PVbbKjtX/XYRzIR691hcPxzrf6AcSzqNQ6BK15bZ6HVc/EoG68fnrtPsNnzr6wB9dMu9C6HumAPyoryWoqRx1uXzdEiR5R12eXrcEs86jruhbtwTD4FFX0NW6LB9KkcMRMO4KMzXjA4t5V7SumcMu7orRNUPYw12RuWYIO7grHtcMjz0VnLetj3v206R6vhQgdLljDeHEjtDllpCrMhxDYfQlzY7Qlz07Ql8a7QgoPq0weGLtUGiG7VBuVEOZYal2F6odAUs1RHCiGsC4Uw2hnKmGUG5Uw8CIpRoiYKl2D852BCeqAYw71RDKmWoI5UY1HMqwVEMELNUQAUv1wAHZCuNONYRyphpCuVENJ3dYqiEClmqIgKUaIjhRDWDcqYZQzlRDKDeqQZaMphoiYKmGCFiqIYIT1QDGnWoI5Uw1hOqiWldRGlSjGK6Z4yZhNUPcgFwzxAXnmqFDtlSzdsyWagiO2RLkquQcly3VSbMj9GXPjtCXRjsCik8rDJ5YOxSaYTuUG9W4bKmNaneh2hGwVOOyJSvVuGypk2pcttRJNS5bslONy5baqMZlS21UuwdnO4IT1bhsqZNqXLbUSTUuW7JTjcuW2qjGZUttVOOypTaqBw7IVhh3qnHZUifVuGzJTjUuW2qjGpcttVGNy5baqMZlS1aqcdlSJ9W4bKmTaly2ZKcaly21UY3LltqoxmVLbVTjsiUr1bhsqZNqXLbUSTUuW/ogTUKCn4CaxSzNPbrfi7tm2TJnw3+c8FOS8kxEn3ng0V7qe9RV7j01lr9S2Hq1O3l8LvtM/QJ67XWloPgFWAOoD7wJqmWqlLFqiWeW7jKbdYPN7Vr9Oc1kTm2O2d8/Pz8cT43UVsXSZFnxZqk8Rv1a0dloPNGvJKkvH9dqDTS2zoVpvTbZM43Z0fyqweb+8wFo8mbBLN2eOZM99avqYXBBifqxxZbtysnK7eVppkuWFns37l8eYwRu75+Lo/3ji8tG/zxyvrqV59fb1BfJOc/0t03XzdXvlHG1qJoRvyh+/On956gCr/ehZWE4qcRyrTrv3+yaNxaGa92pV4Vr3eNnZ6P7MOaZd8ufvI8iZon3nemkzJvOvje9rv/1VfjYdIP6T2HodeV0aDkbqd+9N0xtFpYrb5TXF5Yb60hTWx/OxVsOrd5i4hiNtxz28JamlP9kB7L7TxlBvir/GZuJQ2NhQr1toP+Mrf5jHgqh8Z/x6/GfUpVfl/9QxJojq6+Y6EbjK0evx1e0Rv5ffSWcFhfk7DPlSDzEZ46tPmMeAKPxmePX4zNaK19DfBnoGcUKs22eYcY6Gs+YvB7P0Ir4yzMeTqyeYTIyGs84eT2eUc70vppxZqCHnFo9xBS3aDzk9PV4iFbGq4gdhyfq/3bPKDfeh2oV8gtDZiPp6ek+vmSO+eYnxy0VIrN0UPXbN3rhoG3HsqwvZHGKchJVlbnafcTe7lzVKTvarOuYnaWtotRp9VrjtrtaKNszjwonkh9uEuXET2aV96KlwRdWQMn9Ux5FH1hxtFjZD434QmlP7j3Y1780ubV/XiyaYLVPdXXdCrDXbEzxtdtPimUUw+K1D2slUZWQW7pbv4M0tKd7+rC/zmTXzNQB2+1rVPS2W2l2egfeJphtRcdWHdhiovFwazy0B7y/KnlIQouim43QQyJCTZ3wmyV0SGkNSWhRBbMROiYi1BTuvl1C/xw1FmUpG3lHROSZ6PLqyXup4hOSxKJOZCPxmIhEU9r6phRITlVRuLFRNSGiygT/v6gaQlVRSbFRdUJElSn+fJOhkZyyorRho+yUiDKTwH9d6nqZAkaj/tXBp17ibptHvbGNvX5Pv5xe7k+vzoujTEFpdR7U0nt9nFoI2qyb9oe6raE+rJhftlD32eapmCr532GrPwPbqjDgdOaybOBwalVSM5eeLasu8iPOCqHVjpZfF2Ek916eXE4u9YNl2heu9MY58x8fUrFOgn43mKciyUTE9O+BbFx8FsaztX4oy3h2/bBWl9aLsFbuHDFdT9QXwZM3n2a0weUmUWXJVpes7cKFFWuRrZ//EnVv0eagCgKJSCof0mHb+JD+DByQ1HVoWNwMCNVTiNuUbfYMZayshbWUGZvMTS8Pfjw1CaxhrjlMHk/G002YNbF32WzoujzaSH1A52weiCyfh9zupJZHJql6a3eNFtd5k/3jy+Mp1iMPLq4uLhzGrKoPVZF08/vy2/2nn87d7G7ru/qgBXtrbFJm1F2XZB0XH8Jo68kfve+msi5Ha2MAwnZPKZafsp//BwAA//8DAFBLAwQUAAYACAAAACEAzJJQVH0BAADxAgAAEQAIAWRvY1Byb3BzL2NvcmUueG1sIKIEASigAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjJLLTsMwEEX3SPxD5H1qJ+WlKE3FQ6yoQKIViJ2xJ60hsS17IPTvcZI2JYgFO4/n+GRy7Xz+VVfRJzivjJ6RZMJIBFoYqfR6RlbL2/iCRB65lrwyGmZkC57Mi+OjXNhMGAcPzlhwqMBHwaR9JuyMbBBtRqkXG6i5nwRCh2ZpXM0xlG5NLRfvfA00ZeyM1oBccuS0FcZ2MJKdUopBaT9c1QmkoFBBDRo9TSYJPbAIrvZ/Hug6P8ha4dbCn+i+OdBfXg1g0zSTZtqhYf6EPi/uHrtfjZVusxJAilyKDBVWUOT0sAwr//H6BgL77aEIa+GAo3HFQglnvCkxui9LJSBaeXAdvSfa7N9h2xgnffCMqoBJ8MIpi+FG+6+MNgJdcY+LcMWlAnm1LS5Pz9OzTvOr0bIOPlX7NoqkI4Yy3wXdDwUyCgFlfZz7ztP0+mZ5S4qUpUnMTuIpW7I0O00zxl7auUbnD8J6N8A/jdOMnYyNe0EfzfiRFt8AAAD//wMAUEsDBBQABgAIAAAAIQAiURHx1QEAAN4DAAAQAAgBZG9jUHJvcHMvYXBwLnhtbCCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJxTwW7bMAy9D9g/GLo3crKh6AJFxZBi6GFDA8Rtz5xMJ8JsSZDYINnXj7YTT9l2mk/vkfTTE0mp+2PXFgeMyXq3EvNZKQp0xtfW7VbiufpycyeKROBqaL3DlThhEvf6/Tu1iT5gJIupYAmXVmJPFJZSJrPHDtKM044zjY8dENO4k75prMEHb946dCQXZXkr8UjoaqxvwiQoRsXlgf5XtPam95deqlNgPa0q7EILhJrOYFZ7Oio5xVXlCdrKdqjnJccnpjaww6TnSo5AvfpYJ724U3JEar2HCIa4h3p++0HJjKvPIbTWAHF39Tdrok++oeJpsFz0/yuZlyi+xhbNW7R00mwjp+qrdaOREbCxCLsIYX92NzG1NdDimhugG2gTKvk7oB4R+uFuwPb+DrQ8oCEfi2R/8ngXovgOCfu2rcQBogVHYiwbyYDbkCjqylLL2hMfYF6WY/uxNzmC68KBDB4YX7sbTkhPDd+N/mF2npsdPIxWMzu5s8sZf6iufRfAcX/lhLjBP9JzqPxDvxrnHl4Hs6m/WtpvA5h+OJ/KfP5ZRm05ijUPdJrJFFCPfIPY9vr8r9thfan5O9Fv1Mv4XHnbZiV/wwpdYrwI0zvSvwAAAP//AwBQSwMEFAAGAAgAAAAhAIg/pb/hAAAAVQEAABgAKABjdXN0b21YbWwvaXRlbVByb3BzMS54bWwgoiQAKKAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAnJDBasMwEETvhf6D2bsiObFdEyyHuE4g19JCroq8tgWWZCS5tJT+e2V6So89LbPDzhu2OnzoKXlH55U1HNINgwSNtJ0yA4e31zMpIfFBmE5M1iAHY+FQPz5Und93IggfrMNLQJ3EhYrz0nL4ykvW5E87Rsr2nJLilDXkmKUNKTKWt8fnU8pY8Q1JRJsY4zmMIcx7Sr0cUQu/sTOaaPbWaRGidAO1fa8ktlYuGk2g25hA5RLx+qonqNc+v9cv2Pt7uVZbnPov5aZuk7KDE/P4CbSu6B/Uqu9eUf8AAAD//wMAUEsDBBQABgAIAAAAIQDBJ8sItgAAACEBAAATACgAY3VzdG9tWG1sL2l0ZW0xLnhtbCCiJAAooCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACskE0OgjAQRq9CegCKLlgQfmKiWzEhcV/KAE3aGdIOBm5v1egJXE7mfS/zTdlsziYP8MEQVuKQZiIJrHBQlhAqgSSauuyLjlavISSRxlD0lZiZl0LKoGdwKqS0AMbdSN4pjqOfJI2j0XAmvTpAlscsy2Vvemto8mqZd/GR/UfVgQXNMHS823i2PN1Ondl4vgyGY7P2LWjRGoR0CzYGXuBVuQhHViT37wtyUZfyV7h+AgAA//8DAFBLAwQUAAYACAAAACEAdD85esIAAAAoAQAAHgAIAWN1c3RvbVhtbC9fcmVscy9pdGVtMS54bWwucmVscyCiBAEooAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIzPsYrDMAwG4P3g3sFob5zcUMoRp0spdDtKDroaR0lMY8tYamnfvuamK3ToKIn/+1G7vYVFXTGzp2igqWpQGB0NPk4Gfvv9agOKxcbBLhTRwB0Ztt3nR3vExUoJ8ewTq6JENjCLpG+t2c0YLFeUMJbLSDlYKWOedLLubCfUX3W91vm/Ad2TqQ6DgXwYGlD9PeE7No2jd7gjdwkY5UWFdhcWCqew/GQqjaq3eUIx4AXD36qpigm6a/XTf90DAAD//wMAUEsDBBQABgAIAAAAIQDrgGBMUwMAAI8OAAASAAAAd29yZC9mb250VGFibGUueG1szJbPb9MwFMfvSPwPUU7jwJqkXZdV66Y2WzQk2IEVAUc3cVqL2I7itF3/AA6IE+LI38C4gwb/DNPYf8FznLRZm25LQbBGzY9n+5vnT57f8+7+KQ21MY4F4aytm5uGrmHmcZ+wQVt/0XMf27omEsR8FHKG2/oUC31/7+GD3Ukr4CwRGoxnokW9tj5MkqhVqwlviCkSmzzCDBoDHlOUwGM8qFEUvxlFjz1OI5SQPglJMq1ZhtHUM5n4Lio8CIiHD7g3opgl6fhajENQ5EwMSSRytcld1CY89qOYe1gImDMNlR5FhM1kzMaSECVezAUPkk2YTOZRKgXDTSO9o+FcYKuagLUk0PTwaTUNO9OowciiDvGr6TRnOsQv6KznTEFA4GoSW7kfYkrljKjXejJgPEb9EJTgG2mAWUuF5Rm8lZf0FrrvZfGqTVoMURjwEj62DHKRNkWIcYFNaB2jsK0bW8bST6/Jjt4QxQJLmbRj40CZA0RJOM2tPvbAr4SMsWqNSOIN88Yxion0WTUJMoCGkegb8Fb1q+vKYsJyzN+tLNasT26pX7d4qY6tDGZmMQt94J01BWIJSI9QLLRjPNGec4pYKRYLjqZRBzwN+Ftw1yjFktO6jiVOdasQgaVoWB17e04km9syEfsmIoqH61Yj4qCQ9GOygoSbEpBHAzhYlUiICRGiEomOdNY6TGegSDSkwdjuVosN9bxTkcQBZoNXJAsKFCbHYM19vvz87vLrj2wyS5RMiBcIabhmRyklu1lGCY0SvgakbgFS3XbcbcftLEIym7dAknQrQnqWZy/tNTrCKmwWWF18P/t1/uXq09urbx9WEetCXMl4knGVnisQqx5X6XqyiivM6jhu3dmy1kFmVkS2kHO0jSOM0qSsOSePygAuJqmVDJsZvWyF/oUs5eMAjcLkxoQB+w8eovKSorzaWTNjUO7juMytgJxif/m7HsrSYamMN88XrjOzzPPFzu2Zs2q+OCH0ZFSaLS7O3v88/3gvskU2j0K5tWzbzadfOVv8WbnVNrrcn96PsGc86cUj3JtGeK1lkFcL7SkZDJPVNSNrvw+x8H8rR7bRKPAq226oovBvthuHEkenmD4caWmUbDfukD5u3XhlN2LvNwAAAP//AwBQSwECLQAUAAYACAAAACEAZPVj7oEBAAApBgAAEwAAAAAAAAAAAAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQItABQABgAIAAAAIQAekRq37wAAAE4CAAALAAAAAAAAAAAAAAAAALoDAABfcmVscy8ucmVsc1BLAQItABQABgAIAAAAIQAzwlu/QQEAAOcEAAAcAAAAAAAAAAAAAAAAANoGAAB3b3JkL19yZWxzL2RvY3VtZW50LnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAE4yjpAWBgAApiQAABEAAAAAAAAAAAAAAAAAXQkAAHdvcmQvZG9jdW1lbnQueG1sUEsBAi0AFAAGAAgAAAAhALb0Z5jSBgAAySAAABUAAAAAAAAAAAAAAAAAog8AAHdvcmQvdGhlbWUvdGhlbWUxLnhtbFBLAQItABQABgAIAAAAIQDlI7CA9QMAAKALAAARAAAAAAAAAAAAAAAAAKcWAAB3b3JkL3NldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQBAwf/xOQEAACMDAAAUAAAAAAAAAAAAAAAAAMsaAAB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQA520VMuQUAACdaAAASAAAAAAAAAAAAAAAAADYcAAB3b3JkL251bWJlcmluZy54bWxQSwECLQAUAAYACAAAACEA+JXI7/wOAADzmQAADwAAAAAAAAAAAAAAAAAfIgAAd29yZC9zdHlsZXMueG1sUEsBAi0AFAAGAAgAAAAhAMySUFR9AQAA8QIAABEAAAAAAAAAAAAAAAAASDEAAGRvY1Byb3BzL2NvcmUueG1sUEsBAi0AFAAGAAgAAAAhACJREfHVAQAA3gMAABAAAAAAAAAAAAAAAAAA/DMAAGRvY1Byb3BzL2FwcC54bWxQSwECLQAUAAYACAAAACEAiD+lv+EAAABVAQAAGAAAAAAAAAAAAAAAAAAHNwAAY3VzdG9tWG1sL2l0ZW1Qcm9wczEueG1sUEsBAi0AFAAGAAgAAAAhAMEnywi2AAAAIQEAABMAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",qZ=()=>Wp(WZ),XZ=D("image-to-docx");async function YZ(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>{t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=e,r.src=n})}async function nL(n,t){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:t};try{const e=await Mc(new File([t],"",{})),r=await YZ(e);return r.width===void 0||r.height===void 0?{width:345,height:230,buffer:t}:n.width||n.height?{width:n.width||r.width*n.height/r.height,height:n.height||r.height*n.width/r.width,buffer:t}:{width:r.width,height:r.height,buffer:t}}catch(e){XZ.error(e);return}}function QZ(n,t){let e=n.filter(s=>s!=null);const r=t-(e.length-1)*20,i=.87,o=e.reduce((s,l)=>s+l.width,0);return o>r&&(e=e.map(s=>({width:s.width*r/o,height:s.height*r/o,buffer:s.buffer}))),e.map(s=>({width:s.width*i,height:s.height*i,buffer:s.buffer}))}function JZ(n,t,e){if(!e||typeof e!="object")return;const r=e,i=n.filter(s=>s!=null),o=t-(i.length-1)*20;i.forEach((s,l)=>{if(i.length===1&&r.widthPercent){const d=r.widthPercent,h=s.width;s.width=o*(d/100),s.height*=s.width/h;return}const c=`${l}_flex`;if(r[c]){const d=r[c],h=s.width;s.width=o*d,s.height*=s.width/h}})}function rL(n=[0,1,2,3,4,5,6,7],t=1){return n.map(e=>{let r;switch(e%3){case 0:r=yt.LevelFormat.DECIMAL;break;case 1:r=yt.LevelFormat.LOWER_LETTER;break;default:r=yt.LevelFormat.LOWER_ROMAN;break}return{level:e,format:r,text:`%${e+1}. `,alignment:yt.AlignmentType.START,start:t,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(e+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function ZZ(){return[0,1,2,3,4,5,6,7].map(n=>{let t;switch(n%3){case 0:t="\u2022";break;case 1:t="\u25E6";break;default:t="\u25AA";break}return{level:n,format:yt.LevelFormat.BULLET,text:t,alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function ttt(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2611",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}function ett(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2610",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}var ch=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(ch||{});const ntt=[{levels:rL(),reference:"number-numbering-reference"},{levels:ZZ(),reference:"number-bullet-reference"},{levels:ttt(),reference:"checked-bullet-reference"},{levels:ett(),reference:"unchecked-bullet-reference"}];function rtt(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 itt(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 ott(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 stt=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function iL(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const t=n.match(stt);if(t){const e=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},r=e(t[1]),i=e(t[2]),o=e(t[3]);return`${r}${i}${o}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function On(n,t){if(n&&n.attributes&&n.attributes[t])return n.attributes[t];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&t==="style-underline")return!0}function oL(n,t,e){for(let r=0;r<=e;++r){const i=`${t}${r}`;if(On(n,i))return i}}function Hg(n,t,e){n.attributes=n.attributes||{},n.attributes[t]=e}function _x(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function sL(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function ltt(n){const t=On(n,"inlineStyle");if(t==null)return;const e=t.split(";");for(const r of e){const i=r.split(":");if(i.length!==2)continue;const o=i[0].trim().toLowerCase(),s=i[1].trim().toLowerCase();o==="font-size"&&Hg(n,"inline-style-font-size",s),o==="color"&&Hg(n,"inline-style-color",s),o==="background-color"&&Hg(n,"inline-style-background-color",s),o==="font-family"&&Hg(n,"inline-style-font-family",s)}}function att(n,t){if(t==null)return n==null?void 0:n.normal;if(n)return n[`heading${t}`]}function ctt(n){const t=`${On(n,"inline-style-font-size")}`;if(t&&t.indexOf("px")>0)return+t.replace(/px/g,"")}function utt(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 ftt(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function dtt(n){return On(n,"inline-style-font-family")}function htt(n){const t=On(n,"inline-style-background-color");return iL(t)}function mtt(n){const t=On(n,"inline-style-color");return iL(t)}function gtt(n){ltt(n);const t=On(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!On(n,"style-code"),link:sL(On(n,"link")),size:ctt(n),text:t?ftt(n):utt(n)||n.insert,bold:!!On(n,"style-bold"),underline:!!On(n,"style-underline"),italics:!!On(n,"style-italic"),strike:!!On(n,"style-strikethrough"),superScript:!!On(n,"style-super"),subScript:!!On(n,"style-sub"),math:On(n,"type")==="math"?On(n,"src"):void 0,mention:t,fontFamily:dtt(n),background:htt(n),color:t?"338fe5":rtt(oL(n,"style-color-",6))||mtt(n),highlight:oL(n,"style-bg-color-",13)}}function ptt(){return[new yt.Paragraph({border:{top:{color:"auto",style:yt.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new yt.Paragraph({spacing:{line:0}})]}function Ctt(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Ett(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function Att(n,t){return new yt.Paragraph({children:[new yt.ExternalHyperlink({children:[new yt.TextRun({style:"Hyperlink",text:t||n})],link:n})]})}function lL(n){if(n.heading!=null)return`Heading${n.heading}`}function aL(n){if(n.alignment!=null){if(n.alignment==="center")return yt.AlignmentType.CENTER;if(n.alignment==="right")return yt.AlignmentType.RIGHT;if(n.alignment==="left")return yt.AlignmentType.LEFT}}function xtt(n){if(n.indent)return{left:yt.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:yt.convertInchesToTwip(.3*n.padding)}}function btt(n){return{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function vtt(n){const t=n.split(",");if(t.length!==0)return t[0].trim()}function cL(n,t){var o;let e;e=n.inlineCode?"InlineCode":void 0,e=n.link?"Hyperlink":e;const r=n.size||t,i=r!=null?Math.floor(r*1.5+.5):void 0;return n.text=(o=n.text)==null?void 0:o.replace(/\x00/g," "),new yt.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:yt.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:i,style:e,font:n.fontFamily?vtt(n.fontFamily):void 0,shading:n.background?btt(n.background):void 0,color:n.color,highlight:itt(n.highlight)})}function Btt(n,t){if(n.link)return n.link=n.link.replace(/\x00/g," "),new yt.ExternalHyperlink({children:[cL(n,t)],link:n.link})}async function uL(n,t,e,r,i){const[o]=await i(n,t,e);if(o==null)return;const s=await nL({width:r||0,height:0,src:e},o);return new yt.ImageRun({data:o,transformation:{width:(s==null?void 0:s.width)||100,height:(s==null?void 0:s.height)||20}})}function ytt(n){if(n.heading||n.heading)return n.heading}function Ttt(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function ktt(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function Rtt(n,t){var r;const e=[];if(n.text&&Array.isArray(n.text)){for(let i=0;i<n.text.length;i++){const o=n.text[i];if(((r=o.attributes)==null?void 0:r.box)===!0&&t){const s=await t(o);if(s){n.text.splice(i+1,0,...s);continue}}e.push(gtt(o))}return e}}function wtt(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 Stt(n,t){if(n.type==="embed"&&n.embedType&&_x(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(r=>{const i=t(r),o=n.embedData[`${i}_width`],s=n.embedData[`${i}_height`];return{src:r,width:o,height:s}})}function Ltt(n){if(n.padding)return n.padding}function Itt(n){return!!(n.type==="embed"&&n.embedType&&_x(n.embedType)&&n.embedData&&n.embedData.src)}async function jg(n,t,e){return{quoted:!!n.quoted,heading:ytt(n),alignment:Ttt(n),indent:ktt(n),padding:Ltt(n),texts:await Rtt(n,e),list:wtt(n),images:Stt(n,t),border:Itt(n)}}async function Dtt(n,t,e,r){const i=[];if(!n.children)return[];for(const o of n.children){const s=[];for(const l of t.blocks[o])s.push(await jg(l,e,r));i.push(s)}return i}const _tt=D("to-docx"),zg=200;function Mtt(n,t){return Array(n).fill(0).map(()=>Array(t).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 Utt(n,t,e,r){const i=!!n.hasColTitle,o=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<t;c++)for(let d=0;d<e;d++)(i&&d===0||o&&c===0||s&&c%2===1)&&(r[c][d].color=l)}function Ott(n){p(_tt,n.children,"no table children");const t=n.rows,e=n.cols,r=new Array(n.cols).fill(zg).map((s,l)=>n.colsWidth[l]||s);if(r)for(let s=0;s<r.length;s++)r[s]===0&&(r[s]=zg);const i=Mtt(t,e);let o=0;for(let s=0;s<t;++s)for(let l=0;l<e;++l){if(i[s][l].originalWidth=r?r[l]:void 0,i[s][l].from!==void 0)continue;const c=n.children[o];o+=1,i[s][l].cellId=c,i[s][l].color=ott(n[`${c}_background`]),i[s][l].width=r?r[l]:100,i[s][l].align=n[`${c}_align`];const d=n[`${c}_rowSpan`]||1,h=n[`${c}_colSpan`]||1;if(i[s][l].rowSpan=d,i[s][l].colSpan=h,d>1||h>1){let C=0;for(let E=0;E<d;E++)for(let A=0;A<h;A++)E===0&&(C+=r?r[l+A]:80),!(E===0&&A===0)&&(i[s+E][l+A].from=[s,l]);i[s][l].width=C}}return Utt(n,t,e,i),i}async function Ntt(n,t,e,r,i,o,s,l,c,d){async function h(E){if(l&&E.type!=="_exportVirtualBlock"){const A=await l(i,o,E);if(A){await r.addDoc(n,A,d);return}}if(E.type==="text"||E.textOnly===!0){const A=await jg(E,s,c);await r.addTextBlock(A);return}if(E.type==="code"){const A=await Dtt(E,e,s,c);await r.addCodeBlockObject(A);return}if(E.type==="list"&&E.textOnly!==!0){const A=await jg(E,s,c);await r.addListBlockObject(n,A);return}if(E.type==="embed"&&E.embedType){const A=E,v=A.embedData,R=A.embedType;if(_x(R)){const S=await jg(E,s,c);await r.addImagesBlockObject(E,S,d)}else E.embedType==="hr"?r.addSeparatorBlock():E.embedType==="video"?r.addVideoPlaceholder():E.embedType==="audio"?r.addAudioPlaceholder():E.embedType==="webpage"?r.addHyperlinkParagraph(sL(v.src),v.title):r.addOtherEmbedBlock(R,E.embedData);return}if(E.type==="table"){let A=[];if(E.colsWidth)A=new Array(E.cols).fill(zg).map((R,S)=>E.colsWidth[S]||R);else{const R=E.cols;A=new Array(R);for(let S=0;S<A.length;S++)A[S]=zg;E.colsWidth=A}const v=Ott(E);await r.addTableMatrix(A,v,e),r.addEmptyParagraph()}E.type==="_exportVirtualBlock"&&await r.addVirtualBlock(E.id,e,d)}function C(E){var R;const A=((R=E==null?void 0:E.embedData)==null?void 0:R.exportSpec)||(E==null?void 0:E.exportSpec);if(!A)return[E];const v=[];for(const{type:S,data:M}of A){if(S==="text"){const U={id:it(),text:[{insert:M}],type:"text"};v.push(U);continue}if(S==="image"){const U={id:it(),type:"embed",embedType:"image",align:"left",embedData:{src:M}};v.push(U);continue}if(S==="link"){const U={id:it(),type:"embed",embedType:"webpage",embedData:{src:M.url,title:M.title}};v.push(U);continue}if(S==="block")for(const U of M){if(!e.blocks[U])continue;const nt={id:U,type:"_exportVirtualBlock"};v.push(nt)}}return v}for(const E of t)for(const A of C(E))!A||await h(A)}function Ptt(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const Ftt=D("to-docx");class Ktt{constructor(t,e,r,i,o,s){m(this,"paragraphs");this.appId=t,this.docId=e,this.state=r,this.readImageFunc=i,this.convertBlocksFunc=o,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(t){this.paragraphs.push(new yt.Paragraph({heading:lL(t),alignment:aL(t),children:await this.paragraphsFromBlockTexts(t),indent:xtt(t)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new yt.Paragraph({text:`[${_.t("docx.imageExportFailed")}]`,shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(t){if(t.texts==null)return;const e=att(this.defaultFontSize,t.heading),r=[];for(const i of t.texts){if(i.link){const o=Btt(i,e);o&&r.push(o);continue}if(i.box&&i.box.type&&i.box.type==="br"){r.push(new yt.TextRun({text:"",break:1}));continue}if(i.box&&i.box.type&&i.box.type==="image"){const o=await uL(this.appId,this.docId,i.box.src,i.box.width,this.readImageFunc);o&&r.push(o);continue}if(i.math){const o=await uL(this.appId,this.docId,i.math,0,this.readImageFunc);o&&r.push(o);continue}r.push(cL(i,e))}return r}async addCodeBlockObject(t){for(const e of t)for(const r of e){const i={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new yt.Paragraph({style:"Code",border:{left:{...i},right:{...i},top:{...i},bottom:{...i}},children:await this.paragraphsFromBlockTexts(r)}))}}async addListBlockObject(t,e){if(e.list==null)return;let r;const i=e.list.checkbox?`${t}-${e.list.groupId}-${e.list.checkbox}`:`${t}-${e.list.groupId}`;if(this.state.listInstMap[i])r=this.state.listInstMap[i];else if(r=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[i]=r,e.list.start>0&&e.list.ordered){const s=`number-numbering-reference-${r}`,l=rL([e.list.level-1],e.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:r}),this.state.listRefMap[i]=s}else e.list.ordered?this.state.listRefMap[i]=ch.NUMBERING:e.list.checkbox&&e.list.checkbox==="checked"?this.state.listRefMap[i]=ch.CHECKED:e.list.checkbox&&e.list.checkbox==="unchecked"?this.state.listRefMap[i]=ch.UNCHECKED:this.state.listRefMap[i]=ch.BULLET;const o=lL(e);e.texts&&this.paragraphs.push(new yt.Paragraph({heading:o,children:await this.paragraphsFromBlockTexts(e),numbering:{reference:this.state.listRefMap[i],level:e.list.level-1,instance:r}}))}imageDimWithBufferToImageRun(t){return new yt.ImageRun({data:t.buffer,transformation:{width:t.width,height:t.height}})}async addImagesBlockObject(t,e,r){if(e.images==null){if(t.type==="embed"&&t.embedType==="image"){const{src:c}=t.embedData;c||this.addEmptyImagePlaceHolder()}return}const i=[],o=await Promise.all(e.images.map(async c=>{const[d,h]=await this.readImageFunc(this.appId,this.docId,c.src);if(d){const C=await nL(c,d);if(C)return C}i.push(h)}));JZ(o,r,t.embedData);const s=QZ(o,r),l={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new yt.Paragraph({border:e.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:aL(e)||yt.AlignmentType.CENTER,children:s.map(c=>this.imageDimWithBufferToImageRun(c)).flatMap((c,d,h)=>c==null?[]:h.length-1!==d?[c,new yt.TextRun({text:" "})]:c)})),i.forEach(c=>{this.addHyperlinkParagraph(c)})}addSeparatorBlock(){ptt().forEach(t=>this.paragraphs.push(t))}addEmptyParagraph(){this.paragraphs.push(new yt.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(Ctt())}addAudioPlaceholder(){this.paragraphs.push(Ett())}addHyperlinkParagraph(t,e){t!=null&&this.paragraphs.push(Att(t,e))}async addTableMatrix(t,e,r){const i=t.map(o=>o!==0?o*15:1500);this.paragraphs.push(new yt.Table({rows:await this.generateTableRows(e,r),columnWidths:i}))}async generateRowCells(t,e){const r=[];for(const i of t){const o=i.cellId;if(o===void 0)continue;const s=i.width*.9;r.push(new yt.TableCell({children:await this.convertBlocksFunc(o,e.blocks[o],e,this.appId,this.docId,this.state,s),columnSpan:i.colSpan,rowSpan:i.rowSpan,width:{type:yt.WidthType.DXA,size:i.width*15},shading:i.color?{fill:i.color,type:yt.ShadingType.CLEAR,color:"auto"}:void 0}))}return r}async generateTableRows(t,e){const r=[];for(const i of t)r.push(new yt.TableRow({children:await this.generateRowCells(i,e)}));return r}async addDoc(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks.root,e,this.appId,this.docId,this.state,r);i&&(this.paragraphs=this.paragraphs.concat(i))}async addVirtualBlock(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks[t],e,this.appId,this.docId,this.state,r);this.paragraphs.push(...i)}async addOtherEmbedBlock(){}}class Vtt{constructor(t,e,r,i,o,s,l,c){m(this,"convertBlocks",async(t,e,r,i,o,s,l=720)=>{const c=new Ktt(i,o,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await Ntt(t,e,r,c,i,o,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=t,this.docData=e,this.md5HexFunc=r,this.readImage=i,this.defaultFontSize=o,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(t,e){return this.snapshot2docx(this.docData,t,e)}async snapshot2docx(t,e,r){const i=new yt.ImportDotx,o=this.templateData?await i.extract(this.templateData):void 0,s=t.blocks.root;p(Ftt,s,"data must have blocks");const l=Ptt(),c=await this.convertBlocks("blocks",s,t,e,r,l),d=this.backgroundImageOptions?{default:new yt.Header({children:[new yt.Paragraph({children:[new yt.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new yt.Document({numbering:{config:[...ntt,...l.levelConfigs]},sections:[{headers:d,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:o});return yt.Packer.toBlob(h)}}class fL extends Error{constructor(t){super(t),this.name=this.constructor.name}}const $tt=D("editor-to-docx"),dL="editor-to-docx: read image error";async function Htt(n,t,e,r){try{const i=n.doc.buildResourceUrl(r,{withToken:!0});let o=await RS(i);if(!o)throw new Error(dL);if(o.type.indexOf("/svg")!==-1){const l=await yS(o);l&&(o=new File([l],o.name))}return[await o.arrayBuffer(),i]}catch(i){throw new fL(i.message||dL)}}async function jtt(n,t,e){const r=n.editorBlocks.getBlockClass(e.type);if(r.toStandardDoc)try{return await r.toStandardDoc(n,e,t)}catch(i){$tt.error(`toStandardDoc error: ${JSON.stringify(i)}`);return}}async function ztt(n,t){const e=t.attributes,r=n.editorBoxes.getBoxClass(e.type);if(r.toStandardText)return r.toStandardText(n,e)}async function Gtt(n,t){let{template:e,download:r,backgroundImageOptions:i}=t!=null?t:{};e||(e=qZ());const o=n.doc.toJSON(),s=(C,E,A)=>Htt(n,C,E,A),l=async(C,E,A)=>jtt(n,o,A),c=async C=>ztt(n,C),h=await new Vtt(e,o,n0.default,s,void 0,l,c,i).convert("_appId","_docId");if(r){const C=URL.createObjectURL(h),E=document.createElement("a");E.setAttribute("download",`${kS(n)}.docx`),E.setAttribute("href",`${C}`),E.click(),E.remove()}return h}const Mx=D("create-editor");async function Wtt(n,t){var s,l,c,d,h,C,E,A,v,R,S,M,U,V,nt,Y;p(Mx,n,"app does not exists"),t.lang&&_.setLang(t.lang),Br.level=(s=t.logLevel)!=null?s:zi.DEBUG;const e=t.onReauth?async()=>{var ct;const X=t.user.userId,ft=t.docId,pt=await((ct=t.onReauth)==null?void 0:ct.call(t,X,ft,t.permission));return{userId:X,docId:ft,permission:t.permission,appId:t.appId,token:pt,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl}}:void 0,r={auth:{appId:t.appId,docId:t.docId,userId:t.user.userId,permission:t.permission,token:t.token,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl},serverUrl:t.serverUrl,reauthFunc:e,disableLogout:t.disableLogout,onMaxUsersError:t.onMaxUsersError},i=await md.load(r),o=td(n,i,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,enableComments:t==null?void 0:t.enableComments,enableContextMenu:t==null?void 0:t.enableContextMenu,components:{blocks:[...JS,...((l=t==null?void 0:t.components)==null?void 0:l.blocks)||[]],embeds:[...Dx,...((c=t.components)==null?void 0:c.embeds)||[]],boxes:[...ZS,...((d=t.components)==null?void 0:d.boxes)||[]],commandProviders:[new Fm,...((h=t.components)==null?void 0:h.commandProviders)||[]],decorators:[new gg,new JC],insertions:[J1],blockHooks:[new OA,new gw,...((C=t.components)==null?void 0:C.blockHooks)||[]],textRenders:[new U4,new JE,...((E=t.components)==null?void 0:E.textRenders)||[]],options:{...t.componentsOptions}},shortcuts:[Qq,yH,Oz,gA,l4,DF,cA,UX,lm,TF,...t.shortcuts||[]],colors:["#0064FF","#EB3723","#F59300","#00A865","#F25A0A","#70A310","#009CAD","#0990D9","#8851ED","#D62069"]});if(o.editorCommandProviders.registerCommandProvider(new go(o)),o.input.addHandler(new yY),o.input.addHandler(new Cg),o.input.addHandler(new tV),o.input.addHandler(new wz),o.input.addHandler(new yA(o,{hideTitle:t.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0,applyContentPlaceholder:(A=t.placeholder)==null?void 0:A.applyContentPlaceholder})),o.input.addHandler(new lg(o,(v=t.componentsOptions)==null?void 0:v.quickMenu)),o.input.addHandler(new VA(o)),o.input.addHandler(new qA(o)),o.input.addHandler(new bg),o.input.addHandler(new Pk),o.doc.registerCallback(new TY(o)),o.addCustom("remote-cursor",()=>new mT(o)),o.addCustom("block-menu",X=>new Ew(X)),me.isMobile||o.addCustom("editor-tooltip",()=>new ag(o)),t!=null&&t.enableComments&&o.addCustom("editor-comments",X=>new M4(X,new $Z(X))),t.enableContextMenu!==!1&&o.addCustom("editor-context-menu",X=>new QA(X)),o.addCustom("create-options",()=>new Nb(o,t)),o.addCustom("drop-target",()=>new qd(o)),o.addCustom("list-to-mindmap",()=>new tg(o)),o.addCustom("list-to-mention",()=>new WY(o)),o.addCustom("mobile-helper",()=>new pQ(o)),o.addCustom("code-caret",()=>new xH(o)),o.addCustom("image-paste-handler",()=>new vw(o)),o.addCustom("drawio-paste-handler",()=>new kx(o)),(R=t.componentsOptions)!=null&&R.mention){const X=t.componentsOptions.mention;o.addCustom("mention",()=>new AS(o,X))}if(o.addCustom("heading-collapse",()=>new gx(o)),o.addCustom(lh,X=>new vx(X)),bu.register(o),qd.register(o),Il.register(o),Tl.register(o),o.addListener("clickLink",(X,ft,pt)=>{var wt;if((wt=t==null?void 0:t.events)!=null&&wt.onClickLink){t.events.onClickLink(X,ft,pt);return}const ct=pt.getAttribute("link");ct&&(X.readonly||ft.ctrlKey||ft.metaKey)&&window.open(ct,"_blank")}),(M=(S=t.componentsOptions)==null?void 0:S.remoteCarets)!=null&&M.onUserChanged){const X=(V=(U=t.componentsOptions)==null?void 0:U.remoteCarets)==null?void 0:V.onUserChanged;o.doc.getRemoteUsers().on("change",ft=>{X(o,ft)})}return(Y=(nt=t.componentsOptions)==null?void 0:nt.templates)!=null&&Y.templates.length&&(o.addListener("docChanged",()=>{Vg(o)}),o.addListener("resize",()=>{Vg(o,{reset:!0})}),setTimeout(()=>{Vg(o)},100)),o.doc.registerCallback({onError:async X=>{if(X.code==="ResetDoc"){Mx.error(`reset doc: ${X.message}`);const ft=await md.load(r);o.doc.reset(ft)}}}),o.version="1.1.48",Br.level===zi.DEBUG&&(window.setReauthFail=X=>{window.isReauthError=X},window.reConnect=X=>o.doc.externalDoc.client.connection.reConnect(X)),o}function qtt(n){return n.toJSON!==void 0}async function Xtt(n,t,e){var o,s,l,c,d,h,C,E;p(Mx,n,"app does not exists");const r=qtt(t)?t:new LC(t,{serverUrl:e.serverUrl||""});e.lang&&_.setLang(e.lang),Br.level=(o=e.logLevel)!=null?o:zi.DEBUG;const i=td(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[mA,vA,BA,Fk,...(l=(s=e.components)==null?void 0:s.blocks)!=null?l:[]],commandProviders:[new Fm],decorators:[new gg,new JC],embeds:[...Dx,...((c=e.components)==null?void 0:c.embeds)||[]],boxes:[Jk,xS,H4,...((d=e.components)==null?void 0:d.boxes)||[]],insertions:[J1],blockHooks:[new OA,...((h=e.components)==null?void 0:h.blockHooks)||[]],textRenders:[new U4,new JE,...((C=e.components)==null?void 0:C.textRenders)||[]],options:{...e.componentsOptions}},shortcuts:[gA,l4,cA,lm]});return i.editorCommandProviders.registerCommandProvider(new go(i)),i.input.addHandler(new Cg),i.input.addHandler(new yA(i,{hideTitle:e.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new lg(i,(E=e.componentsOptions)==null?void 0:E.quickMenu)),i.input.addHandler(new VA(i)),i.input.addHandler(new qA(i)),i.input.addHandler(new bg),i.input.addHandler(new Pk),i.addCustom("block-menu",A=>new Ew(A)),i.addCustom("drawio-paste-handler",()=>new kx(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",A=>new M4(A,new HZ(A,r))),e.enableContextMenu!==!1&&i.addCustom("editor-context-menu",A=>new QA(A)),i.addCustom("heading-collapse",()=>new gx(i)),i.addListener("clickLink",(A,v,R)=>{var M;if((M=e==null?void 0:e.events)!=null&&M.onClickLink){e.events.onClickLink(A,v,R);return}const S=R.getAttribute("link");S&&(A.readonly||v.ctrlKey||v.metaKey)&&window.open(S,"_blank")}),i.addCustom(lh,A=>new vx(A)),bu.register(i),i.version="1.1.48",i}async function Ytt(n,t,e){var h;const r=n.doc.externalDoc.client.auth,i=await Am.load({auth:r,serverUrl:e});if(!((h=i.getVersionHelper)==null?void 0:h.call(i)))throw new Error("the editor does not support to show versions");const s=n.getCustom("create-options");if(!s)throw new Error("the editor does not support to show versions");const l=s.getData(),c=new tL(l),d=n.addCustom("version-dialog",()=>new oS(i,c));return d.show(t),d}b.tippy=v9,b.AnchorBox=DB,b.AuthError=dd,b.AuthHeader=va,b.AutoScroll=b0,b.BaseURLHeader=nu,b.BasicCommands=BK,b.BlockExclusiveHook=gw,b.BlockLockerHook=OA,b.BlockLockerPasteHandler=bg,b.BlockResizer=Pd,b.BrBox=wB,b.CodeBlock=vA,b.CodeLineBlock=BA,b.CodeTextDecorator=gg,b.DOC_RE_AUTH_KEYS=lh,b.DefaultShortcuts=lm,b.DocIdError=hO,b.DocReAuthCallbacks=vx,b.DragDrop=ev,b.DrawioEmbed=FS,b.DrawioPasteHandler=kx,b.EditorBlocks=d3,b.EditorBoxes=LB,b.EditorCommandProviders=wy,b.EditorComplexBlockPosition=Ai,b.EditorComplexSelectionRange=Qi,b.EditorDecorators=OB,b.EditorEmbeds=m3,b.EditorInsertions=UB,b.EditorSimpleBlockPosition=Cn,b.EditorSimpleSelectionRange=Dn,b.EmbedBlock=p3,b.EmbedBlockResizer=nh,b.EnforceWithDocumentTitleHandler=yA,b.EventCallbacks=Lc,b.ExportImageError=fL,b.FILL_CHAR=P8,b.FileExtError=mO,b.GroupOrder=Hk,b.HeadingBlockScrollListener=FY,b.ImageBox=IB,b.InlineBoxCommandProvider=iR,b.InputtingInsertion=_B,b.LocalDoc=LC,b.LogLevel=zi,b.Logger=Br,b.MIN_DISTANCE_THRESHOLD=Zb,b.ManualCloseDialog=Cd,b.ManualMenu=dl,b.ManualToolbar=pd,b.MarkdownInputHandler=Cg,b.MaxUserError=HC,b.Mindmap=Zm,b.OnesEditorAutoSuggest=AE,b.OnesEditorCustomDataWrapper=Nb,b.OnesEditorExclusiveBlock=Tl,b.OnesEditorHoveringBlock=ze,b.OnesEditorIcons=ZO,b.OnesEditorQuickMenu=lg,b.OnesEditorToc=sh,b.OnesEditorTocProvider=Il,b.OnesEditorToolbar=bu,b.OnesEditorTooltip=ag,b.OnesEditorVersionsDialog=oS,b.OverflowTooltipHelper=cg,b.PermissionError=Em,b.Popup=su,b.ReAuthToolbar=wS,b.RemoteCarets=mT,b.RemoteCaretsDecorator=JC,b.RemoteCaretsInsertion=J1,b.RemoteUsers=ed,b.RequestReloadError=hd,b.RichText=zn,b.ShareDBDoc=md,b.ShareDBDocVersionsProvider=tL,b.ShareDBServer=Am,b.SimpleCache=zb,b.StandardEmbedBlockCommands=lx,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=I1,b.TEXT_STYLE_COLOR_PREFIX=L1,b.TableBlock=mA,b.TableBlockCommandProvider=Fm,b.TableShortcuts=gA,b.TextBlock=ur,b.TextBox=RB,b.TextColorItem=M2,b.TextStyleShortcuts=cA,b.TocEmbed=CS,b.ZERO_WIDTH_SPACE_CHAR=_c,b.abbreviation=v0,b.addAttribute=I0,b.addClass=q,b.addCommentToBlock=eh,b.addDays=DI,b.addMetaToDoc=Jf,b.addMonths=II,b.animateScrollTo=ia,b.applyPlaceholderToBlock=Od,b.assert=p,b.autoShowHideTemplates=Vg,b.bindKeyDownEvent=h0,b.blockToDoc=yC,b.blockToHtml=eC,b.blockToMarkdown=W0,b.blockToText=G0,b.blocksToDoc=Q5,b.clearAllSelection=Gv,b.clientType=me,b.cloneBlock=ol,b.cloneChildContainer=fC,b.cloneDoc=dC,b.cloneText=EB,b.commentToShareDbComment=QC,b.compareElement=u0,b.comparePosition=v1,b.complexBlockAdjustSelectionPos=w0,b.complexBlockFindNearestChildBlock=L7,b.complexBlockGetAllChildContainers=_n,b.complexBlockGetBottomChildContainers=x3,b.complexBlockGetDeepFirstChild=C3,b.complexBlockGetFirstSimpleChild=y1,b.complexBlockGetLastSimpleChild=Fc,b.complexBlockGetSelectedContainers=Pc,b.complexBlockGetTopChildContainers=A3,b.containerToDoc=J5,b.continuousScroll=Cv,b.convertBlockFrom=k0,b.convertImageFileToPng=yS,b.convertImageSrcToPng=cQ,b.converterIntercept=pg,b.copyBlockAttributes=XB,b.copyResourcesFromDoc=SC,b.createBlockAnchor=jo,b.createBlockCaretAnchor=v3,b.createBlockContentElement=fa,b.createBlockElement=Fv,b.createBlockSimpleDocRange=V0,b.createBlockSimpleRange=Ie,b.createBoxContentElement=$v,b.createBoxElement=Kv,b.createBoxOp=CB,b.createChildContainer=u3,b.createComplexBlockPosition=Ue,b.createComplexDocPos=BB,b.createComplexDocRange=V8,b.createContainer=xB,b.createContainerElement=s1,b.createDeleteOps=hB,b.createEditor=td,b.createEditorSelectionRange=En,b.createElement=B,b.createEmptyContainer=Yo,b.createEmptyDoc=Xo,b.createEmptyTextBlockData=F0,b.createExpandedRange=a0,b.createIconButton=ea,b.createImage=Np,b.createInsertOps=N0,b.createInsertionContentElement=zv,b.createInsertionElement=Hv,b.createLocalEditor=Xtt,b.createOnesEditor=Wtt,b.createRange=Gb,b.createRichText=Ea,b.createRootContainer=c3,b.createSimpleBlockPosition=mt,b.createSimpleDocPos=vB,b.createTextBlockData=eo,b.createTextButton=Sa,b.createTextOp=Xr,b.createTextWithReplaceSoftReturn=H1,b.daysAfter=Zp,b.deleteText=z1,b.diffDays=_I,b.disablePageScroll=Xp,b.docToHtml=jB,b.docToHtmlFragment=zf,b.docToMarkdown=zB,b.docToText=il,b.downloadImageToFile=RS,b.downloadObjectToFile=Bx,b.downloadSvgToString=LS,b.editLink=Rd,b.editorAddComment=$q,b.editorAddTextAttribute=s5,b.editorAutoInsertBlock=YB,b.editorBreakTextBlock=Xc,b.editorClearCompositionText=oC,b.editorClearSelectedContents=J0,b.editorCopyBlock=RC,b.editorCopyDoc=sm,b.editorDeleteBlock=aC,b.editorDeleteBlockText=sC,b.editorDeleteBlockWithoutChildren=Y0,b.editorDeleteChildContainer=P_,b.editorDeleteChildContainers=QB,b.editorFocusToBlock=uC,b.editorFocusToEnd=rM,b.editorGetBlockData=Qo,b.editorGetBlockText=Jn,b.editorGetBlockTextEx=H0,b.editorGetBoxData=TB,b.editorHandleKeyboardEvent=uy,b.editorInsertBlock=qc,b.editorInsertBoxToBlock=WB,b.editorInsertDoc=i5,b.editorInsertDocAt=hC,b.editorInsertText=iC,b.editorInsertTextToBlock=GB,b.editorInsertTextToBlockEx=rC,b.editorMergeTextBlock=JB,b.editorMoveDown=A5,b.editorMoveEnd=AC,b.editorMoveHome=S5,b.editorMoveLeft=p5,b.editorMoveLineEnd=N5,b.editorMoveLineHome=O5,b.editorMovePageDown=H5,b.editorMovePageUp=$5,b.editorMoveRight=C5,b.editorMoveUp=E5,b.editorMoveWordEnd=k5,b.editorMoveWordLeft=T5,b.editorRangeClearColor=a5,b.editorRangeGetColor=c5,b.editorRangeSetColor=l5,b.editorRemoveTextAttribute=$_,b.editorReplaceBlockText=Z0,b.editorReplaceContainer=o5,b.editorRunOnce=IC,b.editorSelectAll=bC,b.editorSelectContainer=rm,b.editorSelectDown=x5,b.editorSelectEnd=xC,b.editorSelectHome=L5,b.editorSelectLeft=b5,b.editorSelectLineEnd=U5,b.editorSelectLineHome=M5,b.editorSelectPageDown=G5,b.editorSelectPageUp=z5,b.editorSelectRight=v5,b.editorSelectUp=B5,b.editorSelectWordEnd=w5,b.editorSelectWordLeft=R5,b.editorSetTextColor=Yc,b.editorShowFindDialog=_W,b.editorToDocx=Gtt,b.editorUpdateBlockData=tm,b.editorUpdateCompositionText=qB,b.editorUpdateEmbedData=n5,b.enablePageScroll=Yp,b.escapeHtmlText=m0,b.escapeRegExp=r1,b.escapeSpace=hI,b.exclusiveBlock=_A,b.executeBlockCommand=e3,b.executeEmbedBlockCommand=t3,b.executeRangeCommand=Ry,b.fileToDataUrl=Mc,b.findAfterOffsetNotType=X1,b.findAllText=vC,b.findBlockByIndex=Iv,b.findEventTargetBlock=Xb,b.findInsertionById=jv,b.findNextOffset=l_,b.findNextVisibleSimpleBlock=Dy,b.findPrevOffset=s_,b.findPrevOffsetNotType=q1,b.findPrevSimpleBlockBeforeChildContainer=E3,b.findPrevVisibleSimpleBlock=Iy,b.findTarget=Dc,b.findWordEnd=Q1,b.findWordLeft=Y1,b.format=Rf,b.formatBytes=Ev,b.formatDate=e1,b.fragmentToHtml=fv,b.fromBase64=Bf,b.fromBase64ToBlob=Wp,b.fromBase64ToUint8Array=yI,b.fromDocRange=nl,b.fromNowString=n1,b.genId=it,b.generateEditorContainerId=o1,b.getAllChildBlocks=w1,b.getAllQuickMenuItems=aA,b.getAllSelectedBlocks=Ji,b.getAttributesAt=Hc,b.getBlockBackground=c1,b.getBlockByIndex=Js,b.getBlockCaretRect=tl,b.getBlockClass=ae,b.getBlockClassByType=aa,b.getBlockClientRects=Vo,b.getBlockCommandsWithHook=p1,b.getBlockContent=zt,b.getBlockHeading=Df,b.getBlockId=dt,b.getBlockIndex=Rt,b.getBlockInfo=Hd,b.getBlockKind=Ci,b.getBlockMinWidth=qv,b.getBlockNearestRangeFromPoint=k1,b.getBlockOptions=GI,b.getBlockPath=el,b.getBlockProperties=Qv,b.getBlockRangeFromPoint=S0,b.getBlockStyles=zI,b.getBlockTextLength=At,b.getBlockTools=ve,b.getBlockType=Ot,b.getBoxContent=f1,b.getBoxId=Vv,b.getBoxTypeFromElement=If,b.getChildBlockCount=qi,b.getChildBlocks=ke,b.getChildOffset=ga,b.getColorFromAttributes=_1,b.getColorFromContent=B0,b.getComplexBlockClass=jr,b.getContainerBlockPath=s3,b.getContainerBlocks=Sv,b.getContainerBlocksElement=Sf,b.getContainerById=pi,b.getContainerId=Et,b.getContainerMinWidth=x1,b.getContainerToolsElement=$I,b.getContainerWidth=f3,b.getDistanceSquare=Ys,b.getElementFromPoint=Fe,b.getElementOffset=bf,b.getElementScale=Hr,b.getEmbedType=ln,b.getExistsBlockTools=y0,b.getExistsContainerById=wf,b.getFileExt=kf,b.getFirstChildBlock=Me,b.getFirstClientRect=c0,b.getHeadingBlockChildren=Nc,b.getHeadingMenuOptions=oA,b.getHorizontalPadding=Fp,b.getInsertionContent=d1,b.getLastChildBlock=We,b.getLastClientRect=na,b.getListAllNextBrothers=pu,b.getLogger=D,b.getNextBlock=oe,b.getNextHiddenBlocks=i3,b.getNextValidOffset=pa,b.getNextVisibleBlock=Gr,b.getOffsetFromPoint=Pp,b.getOffsetInfoAfter=$f,b.getOffsetInfoBefore=j0,b.getOpAt=q3,b.getOpLength=L0,b.getParentBlock=et,b.getParentBlockExcludeSelf=ua,b.getParentBox=u1,b.getParentContainer=at,b.getPrevBlock=Ke,b.getPrevValidOffset=rl,b.getPrevVisibleBlock=zr,b.getRangeCommands=Ty,b.getReferenceClientRect=hk,b.getRootBlock=g1,b.getScrollContainer=pn,b.getSpecialBlockCommands=Jv,b.getStandardEmbedBlockProperties=ax,b.getTextAfterOffset=i_,b.getTextAttributes=nC,b.getTextBeforeOffset=o_,b.getTextBlockChild=Uf,b.getTextBlockClass=_v,b.getTextBlockContentChildTextLength=qr,b.getTextBlockContentChildType=o3,b.getTextBlockContentChildren=Yi,b.getTextLength=jn,b.getTextOpLength=S1,b.getTextWidth=E0,b.getToolbar=Gm,b.handleBlockElementUpdated=Xv,b.hasAltOnly=AI,b.hasClass=Mt,b.hasCtrlOrCmd=lv,b.hasCtrlOrCmdOnly=EI,b.hashCode=Tv,b.hideBlock=Pv,b.hideTemplates=BS,b.htmlToFragment=C0,b.i18n=_,b.includeBigTable=wN,b.injectDocToHtmlFragment=Qf,b.injectStyle=Jb,b.inputActions=BM,b.insertEmptyBlock=XI,b.insertEmptyEmbedBlock=C1,b.insertText=qo,b.intersectionCommands=nU,b.isBackspace=av,b.isBlock=ca,b.isBlockLocked=xg,b.isBlockLockedByOthers=UA,b.isBlockLockedBySelf=jd,b.isBlockTools=Nv,b.isBox=T0,b.isBoxOp=zo,b.isCJK=ov,b.isChildContainer=gi,b.isChildNode=Ae,b.isCodeBlock=Ii,b.isCollapsedHeadingBlock=Xi,b.isCollapsedRange=K8,b.isComplexBlockPosition=ha,b.isComplexKindBlock=Pt,b.isContainer=Qs,b.isContainerSelectedAllChildBlocks=W5,b.isControlEvent=sa,b.isDelete=bI,b.isDraggingFiles=A0,b.isElementVisible=d0,b.isEmbedBlock=Le,b.isEmptyContainer=Of,b.isEmptyDoc=G1,b.isEmptyTextBlock=Be,b.isEmptyTextBlockWithoutCompositionText=Ud,b.isEnterOnly=zp,b.isEscape=p0,b.isExclusiveBlock=$d,b.isExpandedHeadingBlock=r3,b.isFirefox=Af,b.isFirstChildBlockInComplexBlock=S7,b.isHeadingBlock=In,b.isHighSurrogate=cI,b.isInBlock=h1,b.isInBlockTools=Oc,b.isLetter=iv,b.isLowSurrogate=uI,b.isMatchShortcut=Gi,b.isMoveForward=pI,b.isNavigationEvent=gI,b.isNavigationKey=sv,b.isNodeRemoved=xf,b.isNumber=rv,b.isPrintableKey=jp,b.isRootBlock=Wr,b.isRootContainer=ie,b.isSafari=ta,b.isSameDay=t1,b.isSelectBoxOnly=ei,b.isShiftEnter=xI,b.isShiftTab=BI,b.isShortcutEvent=CI,b.isSimpleBlock=jI,b.isSimpleBlockPosition=xi,b.isSimplePos=bB,b.isSimpleRange=K0,b.isSpace=g0,b.isTab=vI,b.isTextBlockContentBoxChild=yr,b.isTextBlockContentChild=_f,b.isTextBlockContentInsertionChild=Ho,b.isTextBlockContentTextChild=Mf,b.isTextKindBlock=st,b.isTextKindBlockType=Lf,b.isTitleBlock=Ko,b.isToday=Av,b.isValidOffset=cr,b.isVisibleBlock=Zs,b.isYesterday=xv,b.loadJs=qb,b.loadJsPromise=ra,b.lockers=No,b.md5=Rv,b.mergeCommands=zm,b.mergeDocs=Aa,b.mergeOps=j1,b.mergeText=O8,b.multiSplitText=Y3,b.overflowText=bv,b.parseShortcut=cv,b.patchNode=yf,b.pointInRect=oa,b.rangeAddAttribute=Ff,b.rangeGetTextColor=rB,b.rangeRemoveAttribute=$c,b.rangeSetTextColor=tB,b.rangeTransformText=J3,b.registerDragDrop=$p,b.removeAttribute=D1,b.removeClass=ut,b.removeLastBr=D8,b.removePlaceholderFromBlock=KR,b.removeStyle=Qb,b.replaceAll=MI,b.replaceAllCaseInsensitive=UI,b.replaceAllText=X5,b.replaceText=P0,b.requestDownload=x0,b.resetListStart=Eu,b.scrollIntoView=jf,b.scrollable=pv,b.selectFile=Uc,b.selectedBlockToDoc=im,b.selectionToDoc=Qc,b.setAttributes=f0,b.setClipboardData=Tf,b.setClipboardDataByEvent=RI,b.setColorToAttributes=eB,b.setDataset=Kp,b.setDefaultCursor=vf,b.setStyles=Vp,b.shareDBCommentToDocObject=YC,b.shareDBDocCommentToComment=dT,b.shortcutToDisplayText=gn,b.showBlock=a1,b.showDocVersions=Ytt,b.showTemplates=xx,b.splitText=ar,b.splitToThree=an,b.stringToDataUrl=qp,b.stringToObjectUrl=Qp,b.subText=Q3,b.textNodeOffsetFromPoint=Wb,b.titleFromEditor=kS,b.toBase64URL=Wi,b.toMindmap=Jm,b.toPlainText=Re,b.toPlainTextKeepLength=W1,b.trimChar=Hp,b.unexclusiveBlock=MA,b.unicodeLength=fI,b.unicodeSubstr=dI,b.updateBlockSelection=Wv,b.updateOpAttributes=AB,b.updateTextBlockContent=r_,b.updateUrl=Gp;for(const n in je)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>je[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});