@creatorsn/powereditor3 0.1.5 → 0.1.6
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/powereditor3.js +29 -8
- package/dist/powereditor3.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/powereditor3.js
CHANGED
|
@@ -57063,7 +57063,13 @@ const xr = (n, e = "en") => {
|
|
|
57063
57063
|
let t = hbe[n];
|
|
57064
57064
|
return t ? t[e] : n;
|
|
57065
57065
|
}, fbe = {
|
|
57066
|
-
emits: [
|
|
57066
|
+
emits: [
|
|
57067
|
+
"container-dblclick",
|
|
57068
|
+
"container-click",
|
|
57069
|
+
"update:width",
|
|
57070
|
+
"update:alignCenter",
|
|
57071
|
+
"update:caption"
|
|
57072
|
+
],
|
|
57067
57073
|
props: {
|
|
57068
57074
|
width: {
|
|
57069
57075
|
default: 100
|
|
@@ -57169,7 +57175,10 @@ const xr = (n, e = "en") => {
|
|
|
57169
57175
|
}));
|
|
57170
57176
|
},
|
|
57171
57177
|
newline() {
|
|
57172
|
-
this.editor.isEditable && (this.editor.commands.focus(), this.editor.commands.insertContentAt(
|
|
57178
|
+
this.editor.isEditable && (this.editor.commands.focus(), this.editor.commands.insertContentAt(
|
|
57179
|
+
this.getPos() + this.node.nodeSize - 1,
|
|
57180
|
+
"<br>"
|
|
57181
|
+
));
|
|
57173
57182
|
}
|
|
57174
57183
|
},
|
|
57175
57184
|
beforeUnmount() {
|
|
@@ -57191,7 +57200,10 @@ function bbe(n, e, t, r, i, o) {
|
|
|
57191
57200
|
}, e[19] || (e[19] = [
|
|
57192
57201
|
ne("i", null, null, -1)
|
|
57193
57202
|
]), 544), [
|
|
57194
|
-
[
|
|
57203
|
+
[
|
|
57204
|
+
an,
|
|
57205
|
+
t.alignCenter && (t.editor.isEditable || t.editor.storage.defaultStorage.showControlOnReadonly)
|
|
57206
|
+
]
|
|
57195
57207
|
]),
|
|
57196
57208
|
ne("div", {
|
|
57197
57209
|
class: "power-editor-media-slot-container",
|
|
@@ -57211,7 +57223,10 @@ function bbe(n, e, t, r, i, o) {
|
|
|
57211
57223
|
}, e[21] || (e[21] = [
|
|
57212
57224
|
ne("i", null, null, -1)
|
|
57213
57225
|
]), 544), [
|
|
57214
|
-
[
|
|
57226
|
+
[
|
|
57227
|
+
an,
|
|
57228
|
+
t.editor.isEditable || t.editor.storage.defaultStorage.showControlOnReadonly
|
|
57229
|
+
]
|
|
57215
57230
|
]),
|
|
57216
57231
|
nn(ne("div", {
|
|
57217
57232
|
draggable: "true",
|
|
@@ -57272,7 +57287,10 @@ function bbe(n, e, t, r, i, o) {
|
|
|
57272
57287
|
__: [25]
|
|
57273
57288
|
}, 8, ["background", "theme", "title"])
|
|
57274
57289
|
], 512), [
|
|
57275
|
-
[
|
|
57290
|
+
[
|
|
57291
|
+
an,
|
|
57292
|
+
t.editor.isEditable || t.editor.storage.defaultStorage.showControlOnReadonly
|
|
57293
|
+
]
|
|
57276
57294
|
]),
|
|
57277
57295
|
nn(ne("div", mbe, [
|
|
57278
57296
|
fe(s, {
|
|
@@ -57315,9 +57333,12 @@ function bbe(n, e, t, r, i, o) {
|
|
|
57315
57333
|
"is-box-shadow": !0,
|
|
57316
57334
|
"border-color": "rgba(200, 200, 200, 0.1)",
|
|
57317
57335
|
"focus-border-color": t.foreground,
|
|
57318
|
-
onKeyup: e[18] || (e[18] = Co(
|
|
57319
|
-
|
|
57320
|
-
|
|
57336
|
+
onKeyup: e[18] || (e[18] = Co(
|
|
57337
|
+
() => {
|
|
57338
|
+
i.show.captionBox = !1, o.newline();
|
|
57339
|
+
},
|
|
57340
|
+
["enter"]
|
|
57341
|
+
))
|
|
57321
57342
|
}, null, 8, ["modelValue", "theme", "placeholder", "focus-border-color"]), [
|
|
57322
57343
|
[an, i.show.captionBox]
|
|
57323
57344
|
])
|
|
@@ -174,7 +174,7 @@ ${t}</tr>`}},table(r,e){return{prefix:`
|
|
|
174
174
|
</table>
|
|
175
175
|
`}},mentionItem(r,e){return`\`@${r.attrs.value}\``},embedblock(r,e){return`
|
|
176
176
|
<video src="${r.attrs.src}" width="800px" height="600px" controls="controls"></video>
|
|
177
|
-
`},text(r,e){let t=r.text,n=r.marks;Array.isArray(n)||(n=[]);for(let i of n)this[i.type]?t=this[i.type](t,i):console.warn(`Unknown mark type: ${i.type}`);return t},bold(r){return`**${r}**`},italic(r){return`*${r}*`},strike(r){return`~~${r}~~`},subscript(r){return`~${r}~`},superscript(r){return`^${r}^`},link(r,e){return`[${r}](${e.attrs.href})`},highlight(r){return`==${r}==`},code(r){return`\`${r}\``}};class zD{constructor(e={},t={}){this.flags={inline:!1,inlineWrapper:!1,heading:!1,bulletList:!1,orderedList:!1,blockquote:!1,powerTaskItem:!1,powerTaskList:!1,tableHeader:!1,tableCell:!1,tableRow:!1,table:!1},this.flags=Object.assign(this.flags,t),this.DecNodeFuncs=FD;for(let n in e)this.DecNodeFuncs.hasOwnProperty(n)&&console.warn(`Decoder already has a function named ${n}, the function will be overwritten.`),this.DecNodeFuncs[n]=e[n]}decode(e){e=JSON.parse(JSON.stringify(e));let t="";Array.isArray(e.content)||(e.content=[]);for(let n of e.content)t+=this.renderNode(n);return t}renderNode(e){e.parent?e.flags=Object.assign({},e.parent.flags):e.flags=Object.assign({},this.flags);let t=e.type;if(t==="text")return this.DecNodeFuncs.text(e);e.flags.hasOwnProperty(t)&&(e.flags[t]!==!1?e.flags[t]+=1:e.flags[t]=1),t==="paragraph"&&(e.flags.inlineWrapper=!0,e.flags.inline=!0);let n="",i=e.content;Array.isArray(i)||(i=[]);for(let s of i)s.parent=e,s.childIdx=i.indexOf(s),n+=this.renderNode(s);if(!this.DecNodeFuncs.hasOwnProperty(t))return console.warn(`Unknown node type: ${t}`),n;let o=this.DecNodeFuncs[t](e,e.flags);return typeof o=="string"?o+n:o.prefix+n+o.suffix}}let qD={Bold:{en:"Bold",cn:"粗体"},Italic:{en:"Italic",cn:"斜体"},Strikethrough:{en:"Strikethrough",cn:"删除线"},Underline:{en:"Underline",cn:"下划线"},"Block Quote":{en:"Block Quote",cn:"引用"},"Horizontal Rule":{en:"Horizontal Rule",cn:"水平线"},Header:{en:"Header",cn:"标题"},Task:{en:"Task",cn:"任务清单"},ClearFormatting:{en:"Clear Formatting",cn:"清除格式"},BulletedList:{en:"Bulleted List",cn:"项目符号"},NumberedList:{en:"Numbered List",cn:"编号"},DetailsList:{en:"Details List",cn:"详细列表"},AlignLeft:{en:"Align Left",cn:"左对齐"},AlignCenter:{en:"Align Center",cn:"居中"},AlignRight:{en:"Align Right",cn:"右对齐"},AlignJustify:{en:"Align Justify",cn:"两端对齐"},IncreaseIndent:{en:"Increase Indent",cn:"增加缩进"},DecreaseIndent:{en:"Decrease Indent",cn:"减少缩进"},Color:{en:"Color",cn:"颜色"},Draw:{en:"Draw",cn:"绘图"},Emoji:{en:"Emoji",cn:"表情"},Table:{en:"Table",cn:"表格"},Code:{en:"Code",cn:"代码"},"Code Block":{en:"Code Block",cn:"代码块"},Equation:{en:"Equation",cn:"公式"},Image:{en:"Image",cn:"图片"},Link:{en:"Link",cn:"链接"},Embed:{en:"Embed",cn:"嵌入"},Undo:{en:"Undo",cn:"撤销"},Redo:{en:"Redo",cn:"重做"},Save:{en:"Save",cn:"保存"},Cancel:{en:"Cancel",cn:"取消"},TextField:{en:"Text Field",cn:"文本框"},"Write a caption...":{en:"Write a caption...",cn:"输入标题..."},removeColor:{en:"Remove Color",cn:"清除颜色"},removeHighlight:{en:"Remove Highlight",cn:"清除高亮"},Row:{en:"Row",cn:"行"},Column:{en:"Column",cn:"列"},"Delete Column":{en:"Delete Column",cn:"删除列"},"Delete Row":{en:"Delete Row",cn:"删除行"},"Add Row Before":{en:"Add Row Before",cn:"在上方插入行"},"Add Row After":{en:"Add Row After",cn:"在下方插入行"},"Add Column Before":{en:"Add Column Before",cn:"在左侧插入列"},"Add Column After":{en:"Add Column After",cn:"在右侧插入列"},"Merge Cells":{en:"Merge Cells",cn:"合并单元格"},"Split Cell":{en:"Split Cell",cn:"拆分单元格"},Headers:{en:"Headers",cn:"标题"},Heading:{en:"Heading",cn:"标题"},"Text Color":{en:"Text Color",cn:"文本颜色"},Foreground:{en:"Foreground",cn:"前景色"},"Highlight Background":{en:"Highlight Background",cn:"高亮色"},purple:{en:"purple",cn:"紫色"},red:{en:"red",cn:"红色"},orange:{en:"orange",cn:"橙色"},yellow:{en:"yellow",cn:"黄色"},blue:{en:"blue",cn:"蓝色"},teal:{en:"teal",cn:"青色"},green:{en:"green",cn:"绿色"},Random:{en:"Random",cn:"随机"},"People and Fantasy":{en:"People and Fantasy",cn:"人物与范例"},"Animals & Nature":{en:"Animals & Nature",cn:"动物与自然"},"Food & Drink":{en:"Food & Drink",cn:"食物与饮料"},"Activity and Sports":{en:"Activity and Sports",cn:"活动与体育"},"Travel & Places":{en:"Travel & Places",cn:"旅行与地点"},Objects:{en:"Objects",cn:"物件"},Symbols:{en:"Symbols",cn:"符号"},Flags:{en:"Flags",cn:"旗帜"},"Fill the Form":{en:"Fill the Form",cn:"填写表单"},Caption:{en:"Caption",cn:"标题"},"Insert Embed Url...":{en:"Insert Embed Url...",cn:"插入嵌入链接..."},Insert:{en:"Insert",cn:"插入"},"Insert Embed":{en:"Insert Embed",cn:"插入嵌入"},"Insert Image":{en:"Insert Image",cn:"插入图片"},Method:{en:"Method",cn:"方法"},"Choose Local Image as Base64 (multiple).":{en:"Choose Local Image as Base64 (multiple).",cn:"选择本地图片为Base64 (支持多个)"},"Insert Image Url.":{en:"Insert Image Url.",cn:"插入图片链接"},"Insert Link Url...":{en:"Insert Link Url...",cn:"插入链接..."},"Insert Link":{en:"Insert Link",cn:"插入链接"},Newline:{en:"Newline",cn:"换行"},"Format Painter":{en:"Format Painter",cn:"格式刷"},Done:{en:"Done",cn:"完成"},gray:{en:"Gray",cn:"灰色"},pink:{en:"Pink",cn:"粉色"},rose:{en:"Rose",cn:"玫瑰色"},fresh_blue:{en:"Fresh Blue",cn:"鲜艳蓝"},ice_blue:{en:"Ice Blue",cn:"冰蓝色"},dark_blue:{en:"Dark Blue",cn:"深蓝色"},fresh_green:{en:"Fresh Green",cn:"鲜艳绿"},light_green:{en:"Light Green",cn:"浅绿色"},light_yellow:{en:"Light Yellow",cn:"浅黄色"},light_red:{en:"Light Red",cn:"浅红色"},light_purple:{en:"Light Purple",cn:"浅紫色"},light_orange:{en:"Light Orange",cn:"浅橙色"}};const on=(r,e="en")=>{let t=qD[r];return t?t[e]:r},HD={emits:["container-dblclick","container-click","update:width","update:alignCenter","update:caption"],props:{width:{default:100},editor:{default:()=>({})},caption:{default:""},alignCenter:{default:!0},foreground:{default:""},node:{default:()=>({})},getPos:{default:()=>{}},theme:{default:"light"}},data(){return{thisCaption:this.caption?this.caption.toString():"",thisAlignCenter:this.alignCenter,elWidthStart:0,elWidthEnd:0,ppi:0,active:!1,moveable:!1,direction:1,disX:0,currentWidth:this.width,outsideEvent:r=>{let e=r.target,t=!1;for(;e&&e.tagName&&e.tagName.toLowerCase()!="body";){if(e==this.$el){t=!0;break}e=e.parentNode}t||(this.show.captionBox=!1)},show:{captionBox:!1}}},watch:{width(r){this.currentWidth=r},currentWidth(r){this.$emit("update:width",r)},alignCenter(r){this.thisAlignCenter=r},thisAlignCenter(r){this.$emit("update:alignCenter",r)},caption(r){this.thisCaption=r?r.toString():""},thisCaption(r){this.$emit("update:caption",r)}},mounted(){this.Init(),this.outSideClickInit()},methods:{Init(){let r=e=>(e.clientX-this.disX)*this.direction+this.elWidthStart*1;window.addEventListener("mousemove",e=>{this.moveable&&(this.elWidthEnd=r(e))}),window.addEventListener("touchmove",e=>{e=e.targetTouches[0],this.moveable&&(this.elWidthEnd=r(e))}),window.addEventListener("mouseup",e=>(this.active=!1,this.moveable&&this.stop(),e)),window.addEventListener("touchup",e=>(this.active=!1,this.moveable&&this.stop(),e))},forward(r,e=1){this.active=!0,this.moveable=!0,this.disX=r.clientX,this.direction=e,this.elWidthStart=this.$el.clientWidth,this.elWidthEnd=this.elWidthStart,this.ppi=(this.currentWidth>100?100:this.currentWidth)/this.elWidthStart},stop(){this.active=!1,this.moveable=!1,this.elWidthEnd<50&&(this.elWidthEnd=50),this.currentWidth=this.elWidthEnd*this.ppi,this.currentWidth>100&&(this.currentWidth=100)},outSideClickInit(){window.addEventListener("click",this.outsideEvent)},getTitle(r){return on(r,this.editor.storage.defaultStorage.language)},showCaptionBox(){this.editor.isEditable&&(this.show.captionBox=!0,this.$nextTick(()=>{this.$refs.caption.focus()}))},newline(){this.editor.isEditable&&(this.editor.commands.focus(),this.editor.commands.insertContentAt(this.getPos()+this.node.nodeSize,"<br>"))}},beforeUnmount(){window.removeEventListener("click",this.outsideEvent)}},VD={class:"power-editor-media-control-btn-block"},UD={class:"power-editor-media-control-btn-block bottom"},GD={class:"power-editor-media-mask-block"};function $D(r,e,t,n,i,o){const s=y.resolveComponent("fv-button"),a=y.resolveComponent("fv-text-box");return y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(["power-editor-media-container",[{dark:t.theme==="dark"},{"active-effects":i.active}]]),style:y.normalizeStyle({width:i.moveable?`${i.elWidthEnd}px`:`${i.currentWidth}%`})},[y.withDirectives(y.createElementVNode("div",{class:"power-editor-media-control-resize-block",onMousedown:e[0]||(e[0]=l=>o.forward(l,-1)),onMouseup:e[1]||(e[1]=(...l)=>o.stop&&o.stop(...l)),onTouchstart:e[2]||(e[2]=l=>o.forward(l.targetTouches[0],-1)),onTouchend:e[3]||(e[3]=(...l)=>o.stop&&o.stop(...l))},e[19]||(e[19]=[y.createElementVNode("i",null,null,-1)]),544),[[y.vShow,t.alignCenter&&(t.editor.isEditable||t.editor.storage.defaultStorage.showControlOnReadonly)]]),y.createElementVNode("div",{class:"power-editor-media-slot-container",onDblclick:e[4]||(e[4]=l=>r.$emit("container-dblclick",l)),onClick:e[5]||(e[5]=l=>r.$emit("container-click",l))},[y.renderSlot(r.$slots,"default",{},()=>[e[20]||(e[20]=y.createTextVNode(" Media Container "))])],32),y.withDirectives(y.createElementVNode("div",{class:"power-editor-media-control-resize-block sec",onMousedown:e[6]||(e[6]=(...l)=>o.forward&&o.forward(...l)),onMouseup:e[7]||(e[7]=(...l)=>o.stop&&o.stop(...l)),onTouchstart:e[8]||(e[8]=l=>o.forward(l.targetTouches[0])),onTouchend:e[9]||(e[9]=(...l)=>o.stop&&o.stop(...l))},e[21]||(e[21]=[y.createElementVNode("i",null,null,-1)]),544),[[y.vShow,t.editor.isEditable||t.editor.storage.defaultStorage.showControlOnReadonly]]),y.withDirectives(y.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:"power-editor-media-drag-btn",onMousedown:e[10]||(e[10]=l=>i.active=!0),onMouseup:e[11]||(e[11]=l=>i.active=!1),onTouchstart:e[12]||(e[12]=l=>i.active=!0),onTouchend:e[13]||(e[13]=l=>i.active=!1)},e[22]||(e[22]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--GripperDotsVertical"},null,-1)]),544),[[y.vShow,t.editor.isEditable]]),y.withDirectives(y.createElementVNode("div",VD,[y.withDirectives(y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,fontSize:"10",title:o.getTitle("Caption"),onClick:o.showCaptionBox},{default:y.withCtx(()=>e[23]||(e[23]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--TextField"},null,-1)])),_:1,__:[23]},8,["background","theme","title","onClick"]),[[y.vShow,t.editor.isEditable]]),y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,fontSize:"10",title:o.getTitle("AlignLeft"),onClick:e[14]||(e[14]=l=>i.thisAlignCenter=!1)},{default:y.withCtx(()=>e[24]||(e[24]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--AlignLeft"},null,-1)])),_:1,__:[24]},8,["background","theme","title"]),y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,fontSize:"10",title:o.getTitle("AlignCenter"),onClick:e[15]||(e[15]=l=>i.thisAlignCenter=!0)},{default:y.withCtx(()=>e[25]||(e[25]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--AlignCenter"},null,-1)])),_:1,__:[25]},8,["background","theme","title"])],512),[[y.vShow,t.editor.isEditable||t.editor.storage.defaultStorage.showControlOnReadonly]]),y.withDirectives(y.createElementVNode("div",UD,[y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,icon:"ReturnKeySm",fontSize:"10",title:o.getTitle("TextField"),style:{width:"60px"},onClick:o.newline},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(o.getTitle("Newline")),1)]),_:1},8,["background","theme","title","onClick"])],512),[[y.vShow,t.editor.isEditable]]),y.withDirectives(y.createElementVNode("div",GD,null,512),[[y.vShow,i.active]]),y.withDirectives(y.createElementVNode("p",{class:"power-editor-media-container-caption",onClick:e[16]||(e[16]=(...l)=>o.showCaptionBox&&o.showCaptionBox(...l))},y.toDisplayString(i.thisCaption),513),[[y.vShow,i.thisCaption!==""&&!i.show.captionBox]]),y.withDirectives(y.createVNode(a,{modelValue:i.thisCaption,"onUpdate:modelValue":e[17]||(e[17]=l=>i.thisCaption=l),theme:t.theme,class:"power-editor-media-caption-block",placeholder:o.getTitle("Write a caption..."),ref:"caption",background:"transparent",underline:"","border-width":2,"is-box-shadow":!0,"border-color":"rgba(200, 200, 200, 0.1)","focus-border-color":t.foreground,onKeyup:e[18]||(e[18]=y.withKeys(()=>{i.show.captionBox=!1,o.newline()},["enter"]))},null,8,["modelValue","theme","placeholder","focus-border-color"]),[[y.vShow,i.show.captionBox]])],6)}const Rf=sr(HD,[["render",$D]]),WD={components:{NodeViewWrapper:io,mediaContainer:Rf},props:{editor:{type:Object},node:{type:Object},decorations:{type:Array},selected:{type:Boolean},extension:{type:Object},getPos:{type:Function},updateAttributes:{type:Function},deleteNode:{type:Function}},data(){return{statusInfo:{show:!1,progress:0,loading:!1,info:"",tmpSrc:"",tmpHeight:0,lock:!0},previewImg:{scalePercent:"100",show:!1},thisTheme:this.editor.storage.defaultStorage.theme,thisLazyLoad:this.editor.storage.defaultStorage.imgLazyLoad,thisForeground:this.editor.storage.defaultStorage.foreground,thisImgPreview:this.editor.storage.defaultStorage.imgPreview,imgInterceptor:this.editor.storage.defaultStorage.imgInterceptor}},watch:{"node.attrs.src"(){this.imgInterceptorFunc()},"editor.storage.defaultStorage.theme"(r){this.thisTheme=r},"editor.storage.defaultStorage.imgLazyLoad"(r){this.thisLazyLoad=r},"editor.storage.defaultStorage.imgPreview"(r){this.thisImgPreview=r},"editor.storage.defaultStorage.foreground"(r){this.thisForeground=r},"editor.storage.defaultStorage.imgInterceptor"(r){this.imgInterceptor=r,this.imgInterceptorFunc()}},mounted(){this.imgInterceptorFunc()},methods:{showStatus(r){this.statusInfo.show=r},updateStatus(r,e,t=""){this.statusInfo.loading=r,this.statusInfo.progress=e,this.statusInfo.info=t},getImage(){return this.node.attrs.src},interceptImage(r=""){return this.statusInfo.tmpSrc=this.node.attrs.src,this.statusInfo.tmpHeight=this.$refs.image.$el.clientHeight,this.updateAttributes({src:r}),this.statusInfo.tmpSrc},updateImage(r){this.updateAttributes({src:r})},updateLock(r){this.statusInfo.lock=r},imgInterceptorFunc(){let r={node:this.node,extension:this.extension,getPos:this.getPos,updateAttributes:this.updateAttributes,deleteNode:this.deleteNode,showStatus:this.showStatus,updateStatus:this.updateStatus,getImage:this.getImage,interceptImage:this.interceptImage,updateImage:this.updateImage,updateLock:this.updateLock};this.imgInterceptor&&this.imgInterceptor(r)},preview(r="readonly"){this.editor.isEditable&&r!=="editable"||!this.editor.isEditable&&r!=="readonly"||this.node.attrs.src&&this.thisImgPreview&&(this.previewImg.show=!0)},scale(r,e){r.stopPropagation&&r.stopPropagation();let t=parseInt(this.previewImg.scalePercent);t+=e,t<50?t=50:t>200&&(t=200),this.previewImg.scalePercent=t.toString()},setScale(r,e){r.stopPropagation&&r.stopPropagation(),e<50?e=50:e>200&&(e=200),this.previewImg.scalePercent=e.toString()}}},KD={class:"power-editor-image-status-container"},jD={class:"power-editor-preview-img-container"};function QD(r,e,t,n,i,o){const s=y.resolveComponent("fv-image"),a=y.resolveComponent("fv-progress-ring"),l=y.resolveComponent("media-container"),c=y.resolveComponent("fv-img"),u=y.resolveComponent("fv-button"),h=y.resolveComponent("fv-text-box"),g=y.resolveComponent("node-view-wrapper");return t.node?(y.openBlock(),y.createBlock(g,{key:0,class:y.normalizeClass(["power-editor-image-container",[{dark:i.thisTheme==="dark"}]]),style:y.normalizeStyle({"justify-content":t.node.attrs.alignCenter?"center":"flex-start"})},{default:y.withCtx(()=>[y.createVNode(l,{width:t.node.attrs.width,caption:t.node.attrs.caption,alignCenter:t.node.attrs.alignCenter,editor:t.editor,theme:i.thisTheme,foreground:i.thisForeground,node:t.node,getPos:t.getPos,"onUpdate:caption":e[1]||(e[1]=b=>t.updateAttributes({caption:b})),onContainerDblclick:e[2]||(e[2]=b=>o.preview("editable")),onContainerClick:e[3]||(e[3]=b=>o.preview("readonly"))},{default:y.withCtx(()=>[y.createVNode(s,{src:t.node.attrs.src?t.node.attrs.src:i.statusInfo.tmpSrc?i.statusInfo.tmpSrc:"",ref:"image",onlazy:i.thisLazyLoad,style:y.normalizeStyle([{width:"100%",height:"auto"},{height:!t.node.attrs.src&&i.statusInfo.show?i.statusInfo.tmpHeight+"px":""}])},null,8,["src","onlazy","style"]),y.withDirectives(y.createElementVNode("div",KD,[y.createVNode(a,{modelValue:i.statusInfo.progress,"onUpdate:modelValue":e[0]||(e[0]=b=>i.statusInfo.progress=b),loading:i.statusInfo.loading,r:"20",borderWidth:"3",color:i.thisTheme==="dark"?"white":"black",background:i.thisTheme==="dark"?"rgba(0, 0, 0, 0.3)":"rgba(255, 255, 255, 0.3)"},null,8,["modelValue","loading","color","background"]),y.withDirectives(y.createElementVNode("p",{class:"power-editor-image-status-title"},y.toDisplayString(i.statusInfo.info),513),[[y.vShow,i.statusInfo.info]])],512),[[y.vShow,i.statusInfo.show]]),y.createElementVNode("div",{class:y.normalizeClass(["power-editor-image-selection-mask",[{selected:t.selected}]]),style:y.normalizeStyle({"--selected-bg":i.thisForeground})},null,6)]),_:1},8,["width","caption","alignCenter","editor","theme","foreground","node","getPos"]),y.createVNode(y.Transition,{name:"show-preview"},{default:y.withCtx(()=>[y.withDirectives(y.createElementVNode("div",{class:"power-editor-image-preview-block",onClick:e[10]||(e[10]=b=>i.previewImg.show=!1)},[y.createElementVNode("div",jD,[y.createVNode(c,{src:t.node.attrs.src,class:"power-editor-preview-img",style:y.normalizeStyle({scale:i.previewImg.scalePercent+"%",cursor:i.previewImg.scalePercent<150?"zoom-in":"zoom-out"}),onClick:e[4]||(e[4]=b=>i.previewImg.scalePercent<100?o.setScale(b,100):i.previewImg.scalePercent<150?o.setScale(b,150):o.setScale(b,100))},null,8,["src","style"])]),y.createElementVNode("div",{class:"power-editor-preview-tool-bar",onClick:e[9]||(e[9]=b=>b.stopPropagation())},[y.createVNode(u,{class:"power-editor-preview-img-btn",theme:"dark",disabled:i.previewImg.scalePercent<=50,background:"rgba(36, 36, 36, 0.3)",onClick:e[5]||(e[5]=b=>o.scale(b,-50))},{default:y.withCtx(()=>e[11]||(e[11]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--CalculatorSubtract"},null,-1)])),_:1,__:[11]},8,["disabled"]),y.createVNode(h,{modelValue:i.previewImg.scalePercent,theme:"dark",underline:"","border-color":"rgba(120, 120, 120, 0.1)","focus-border-color":i.thisForeground,"border-width":2,"is-box-shadow":!0,suffix:"%",style:{width:"80px",height:"35px"},onDebounceInput:e[6]||(e[6]=b=>o.setScale(b,b))},null,8,["modelValue","focus-border-color"]),y.createVNode(u,{class:"power-editor-preview-img-btn",theme:"dark",disabled:i.previewImg.scalePercent>=200,background:"rgba(36, 36, 36, 0.3)","border-color":"transparent",onClick:e[7]||(e[7]=b=>o.scale(b,50))},{default:y.withCtx(()=>e[12]||(e[12]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--CalculatorAddition"},null,-1)])),_:1,__:[12]},8,["disabled"]),y.createVNode(u,{class:"power-editor-preview-img-btn",theme:"dark",background:"rgba(36, 36, 36, 0.3)",onClick:e[8]||(e[8]=b=>i.previewImg.show=!1)},{default:y.withCtx(()=>e[13]||(e[13]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--BackToWindow"},null,-1)])),_:1,__:[13]})])],512),[[y.vShow,i.previewImg.show]])]),_:1})]),_:1},8,["class","style"])):y.createCommentVNode("",!0)}const YD=sr(WD,[["render",QD]]),ZD=qr.create({name:"imageblock",group:"block",draggable:!0,atom:!0,addAttributes(){return{src:{default:""},width:{default:100},caption:{default:""},alignCenter:{default:!0}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:r}){return["img",jt(this.options.HTMLAttributes,r)]},addNodeView(){return vi(YD)}}),XD={components:{NodeViewWrapper:io,mediaContainer:Rf},props:{editor:{type:Object},node:{type:Object},decorations:{type:Array},selected:{type:Boolean},extension:{type:Object},getPos:{type:Function},updateAttributes:{type:Function},deleteNode:{type:Function}},data(){return{width:0,thisTheme:this.editor.storage.defaultStorage.theme,thisForeground:this.editor.storage.defaultStorage.foreground,timer:{}}},watch:{"editor.storage.defaultStorage.theme"(r){this.thisTheme=r},"editor.storage.defaultStorage.foreground"(r){this.thisForeground=r}},mounted(){this.timerInit()},methods:{timerInit(){this.timer=setInterval(()=>{this.width=this.$refs.media.$el.clientWidth},300)}},beforeUnmount(){clearInterval(this.timer)}},JD=["src"];function eR(r,e,t,n,i,o){const s=y.resolveComponent("media-container"),a=y.resolveComponent("node-view-wrapper");return t.node?(y.openBlock(),y.createBlock(a,{key:0,class:"power-editor-embed-container",style:y.normalizeStyle({"justify-content":t.node.attrs.alignCenter?"center":"flex-start"})},{default:y.withCtx(()=>[y.createVNode(s,{width:t.node.attrs.width,caption:t.node.attrs.caption,alignCenter:t.node.attrs.alignCenter,editor:t.editor,theme:i.thisTheme,foreground:i.thisForeground,node:t.node,getPos:t.getPos,ref:"media","onUpdate:caption":e[0]||(e[0]=l=>t.updateAttributes({caption:l}))},{default:y.withCtx(()=>[y.createElementVNode("iframe",{src:t.node.attrs.src,frameborder:"0",allowfullscreen:"",style:y.normalizeStyle([{width:"100%",height:"auto"},{height:`${i.width/1.778}px`}])},null,12,JD)]),_:1},8,["width","caption","alignCenter","editor","theme","foreground","node","getPos"])]),_:1},8,["style"])):y.createCommentVNode("",!0)}const tR=sr(XD,[["render",eR]]),rR=qr.create({name:"embedblock",group:"block",draggable:!0,atom:!0,addAttributes(){return{src:{default:""},width:{default:100},caption:{default:""},alignCenter:{default:!0}}},parseHTML(){return[{tag:"embed-block"}]},renderHTML({HTMLAttributes:r}){return["embed-block",jt(r)]},addNodeView(){return vi(tR)}});function Lc({find:r,type:e,getAttributes:t}){return new W1({find:r,handler({match:n,chain:i,range:o}){const s=et(t,void 0,n);if(s===!1||s===null)return null;if(n.input){const{from:a,to:l}=o;s.powerContent?i().deleteRange(o).insertContentAt(a,[{type:e.name,attrs:s,content:s.powerContent}]):i().deleteRange(o).insertContentAt(a,[{type:e.name,attrs:s}])}}})}const nR=/^-(\[([ |x])\])\s$/,iR=/^-(\s*)(\[([ |x])\])\s+(.*)/g,oR=qr.create({name:"powerTaskList",group:"block list",content:"powerTaskItem+",parseHTML(){return[{tag:'ul[data-type="powerTaskList"]',priority:51}]},renderHTML({HTMLAttributes:r}){return["ul",jt(r,{"data-type":this.name}),0]},addCommands(){return{togglePowerTaskList:()=>({commands:r})=>r.toggleList("powerTaskList","powerTaskItem"),setPowerTaskList:()=>({editor:r,commands:e})=>{if(!r.isActive("powerTaskList"))return e.toggleList("powerTaskList","powerTaskItem")}}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.togglePowerTaskList()}},addInputRules(){return[sb({find:nR,type:this.type,getAttributes:r=>({checked:r[r.length-1]==="x",theme:this.editor.storage.defaultStorage.theme})})]},addPasteRules(){return[Lc({find:iR,type:this.type,getAttributes:r=>({powerContent:[{type:"powerTaskItem",content:[{type:"paragraph",content:[{type:"text",text:r[4]}]}],attrs:{checked:r[3]==="x",theme:this.editor.storage.defaultStorage.theme}}]})})]}}),sR={components:{NodeViewWrapper:io,NodeViewContent:Xb},props:{editor:{type:Object},node:{type:Object},decorations:{type:Array},selected:{type:Boolean},extension:{type:Object},getPos:{type:Function},updateAttributes:{type:Function},deleteNode:{type:Function}},data(){return{thisTheme:this.editor.storage.defaultStorage.theme,thisForeground:this.editor.storage.defaultStorage.foreground,timer:{}}},watch:{"editor.storage.defaultStorage.theme"(r){this.thisTheme=r},"editor.storage.defaultStorage.foreground"(r){this.thisForeground=r}},mounted(){},methods:{preventEnter(r){console.log(r)},updateValue(r){this.updateAttributes({checked:r})}},beforeUnmount(){clearInterval(this.timer)}};function aR(r,e,t,n,i,o){const s=y.resolveComponent("fv-check-box"),a=y.resolveComponent("node-view-content"),l=y.resolveComponent("node-view-wrapper");return t.node?(y.openBlock(),y.createBlock(l,{key:0,as:"li",class:"power-editor-task-item-container"},{default:y.withCtx(()=>[y.createVNode(s,{modelValue:t.node.attrs.checked,"onUpdate:modelValue":e[0]||(e[0]=c=>t.node.attrs.checked=c),theme:i.thisTheme,disabled:!t.editor.isEditable,background:i.thisForeground,contenteditable:"false",onClick:o.updateValue},null,8,["modelValue","theme","disabled","background","onClick"]),y.createVNode(a,{ref:"n",class:"power-editor-task-item-content"},null,512)]),_:1})):y.createCommentVNode("",!0)}const lR=sr(sR,[["render",aR]]),cR=/^\s*(\[([ |x])\])\s$/,uR=/^(\s*)(\[([ |x])\])\s+(.*)/g,dR=qr.create({name:"powerTaskItem",group:"block",content:"paragraph block*",draggable:!0,addAttributes(){return{value:{default:""},checked:{default:!1},placeholder:{default:"To-Do"}}},parseHTML(){return[{tag:'li[data-type="powerTaskItem"]',priority:51}]},renderHTML({HTMLAttributes:r}){return["li",jt(this.options.HTMLAttributes,r,{"data-type":"powerTaskItem"}),0]},addKeyboardShortcuts(){const r={Enter:()=>this.editor.commands.splitListItem("powerTaskItem"),"Shift-Tab":()=>this.editor.commands.liftListItem("powerTaskItem")};return this.options.nested?{...r,Tab:()=>this.editor.commands.sinkListItem("powerTaskItem")}:r},addNodeView(){return vi(lR)},addInputRules(){return[sb({find:cR,type:this.type,getAttributes:r=>({checked:r[r.length-1]==="x",theme:this.editor.storage.defaultStorage.theme})})]},addPasteRules(){return[Lc({find:uR,type:this.type,getAttributes:r=>({powerContent:[{type:"paragraph",content:[{type:"text",text:r[4]}]}],checked:r[3]==="x",theme:this.editor.storage.defaultStorage.theme})})]}});var Of,o2;function hR(){if(o2)return Of;o2=1;var r=[],e=function(a){return typeof a>"u"},t=/\s*(\.\d+|\d+(?:\.\d+)?)(%|deg)?\s*/,n=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,i=new RegExp("^(rgb|hsl|hsv)a?\\("+t.source+"[, ]"+t.source+"[, ]"+t.source+"(?:[,/]"+t.source+")?\\)$","i");function o(a,l,c){if(a==="%")return 100;if(a==="deg"||c&&l===0)return 360;if(!a)return 255}function s(a){if(Array.isArray(a)){if(typeof a[0]=="string"&&typeof s[a[0]]=="function")return new s[a[0]](a.slice(1,a.length));if(a.length===4)return new s.RGB(a[0]/255,a[1]/255,a[2]/255,a[3]/255)}else if(typeof a=="string"){var l=a.toLowerCase();s.namedColors[l]&&(a="#"+s.namedColors[l]),l==="transparent"&&(a="rgba(0,0,0,0)");var c=a.match(i);if(c){var u=c[1].toUpperCase(),h=u[0]==="H";if(e(s[u]))throw new Error("color."+u+" is not installed.");let p=e(c[8])?1:void 0;return p===void 0&&(c[9]==="%"?p=parseFloat(c[8])/100:p=parseFloat(c[8])),new s[u](parseFloat(c[2])/o(c[3],0,h),parseFloat(c[4])/o(c[5],1,h),parseFloat(c[6])/o(c[7],2,h),p)}a.length<6&&(a=a.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,"$1$1$2$2$3$3$4$4"));var g=a.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])?$/i);if(g)return new s.RGB(parseInt(g[1],16)/255,parseInt(g[2],16)/255,parseInt(g[3],16)/255,g[4]?parseInt(g[4],16)/255:1);if(s.CMYK){var b=a.match(new RegExp("^cmyk\\("+n.source+","+n.source+","+n.source+","+n.source+"\\)$","i"));if(b)return new s.CMYK(parseFloat(b[1])/100,parseFloat(b[2])/100,parseFloat(b[3])/100,parseFloat(b[4])/100)}}else if(typeof a=="object"&&a.isColor)return a;return!1}return s.namedColors={},s.installColorSpace=function(a,l,c){s[a]=function(p){var v=Array.isArray(p)?p:arguments;l.forEach(function(w,S){var C=v[S];if(w==="alpha")this._alpha=isNaN(C)||C>1?1:C<0?0:C;else{if(isNaN(C))throw new Error("["+a+"]: Invalid color: ("+l.join(",")+")");w==="hue"?this._hue=C<0?C-Math.floor(C):C%1:this["_"+w]=C<0?0:C>1?1:C}},this)},s[a].propertyNames=l;var u=s[a].prototype;["valueOf","hex","hexa","css","cssa"].forEach(function(p){u[p]=u[p]||(a==="RGB"?u.hex:function(){return this.rgb()[p]()})}),u.isColor=!0,u.equals=function(p,v){e(v)&&(v=1e-10),p=p[a.toLowerCase()]();for(var w=0;w<l.length;w=w+1)if(Math.abs(this["_"+l[w]]-p["_"+l[w]])>v)return!1;return!0},u.toJSON=function(){return[a].concat(l.map(function(p){return this["_"+p]},this))};for(var h in c)if(Object.prototype.hasOwnProperty.call(c,h)){var g=h.match(/^from(.*)$/);g?s[g[1].toUpperCase()].prototype[a.toLowerCase()]=c[h]:u[h]=c[h]}u[a.toLowerCase()]=function(){return this},u.toString=function(){return"["+a+" "+l.map(function(p){return this["_"+p]},this).join(", ")+"]"},l.forEach(function(p){var v=p==="black"?"k":p.charAt(0);u[p]=u[v]=function(w,S){return typeof w>"u"?this["_"+p]:S?new this.constructor(l.map(function(C){return this["_"+C]+(p===C?w:0)},this)):new this.constructor(l.map(function(C){return p===C?w:this["_"+C]},this))}});function b(p,v){var w={};w[v.toLowerCase()]=function(){return this.rgb()[v.toLowerCase()]()},s[v].propertyNames.forEach(function(C){var E=C==="black"?"k":C.charAt(0);w[C]=w[E]=function(A,R){return this[v.toLowerCase()]()[C](A,R)}});for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&s[p].prototype[S]===void 0&&(s[p].prototype[S]=w[S])}return r.forEach(function(p){b(a,p),b(p,a)}),r.push(a),s},s.pluginList=[],s.use=function(a){return s.pluginList.indexOf(a)===-1&&(this.pluginList.push(a),a(s)),s},s.installMethod=function(a,l){return r.forEach(function(c){s[c].prototype[a]=l}),this},s.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var a=(Math.round(255*this._red)*65536+Math.round(255*this._green)*256+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-a.length)+a},hexa:function(){var a=Math.round(this._alpha*255).toString(16);return this.hex()+"00".substr(0,2-a.length)+a},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}}),Of=s,Of}var If,s2;function a2(){return s2||(s2=1,If=function(e){e.installColorSpace("XYZ",["x","y","z","alpha"],{fromRgb:function(){var t=function(s){return s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92},n=t(this._red),i=t(this._green),o=t(this._blue);return new e.XYZ(n*.4124564+i*.3575761+o*.1804375,n*.2126729+i*.7151522+o*.072175,n*.0193339+i*.119192+o*.9503041,this._alpha)},rgb:function(){var t=this._x,n=this._y,i=this._z,o=function(s){return s>.0031308?1.055*Math.pow(s,1/2.4)-.055:12.92*s};return new e.RGB(o(t*3.2404542+n*-1.5371385+i*-.4985314),o(t*-.969266+n*1.8760108+i*.041556),o(t*.0556434+n*-.2040259+i*1.0572252),this._alpha)},lab:function(){var t=function(s){return s>.008856?Math.pow(s,.3333333333333333):7.787037*s+.13793103448275862},n=t(this._x/95.047),i=t(this._y/100),o=t(this._z/108.883);return new e.LAB(116*i-16,500*(n-i),200*(i-o),this._alpha)}})}),If}var Lf,l2;function fR(){return l2||(l2=1,Lf=function(e){e.use(a2()),e.installColorSpace("LAB",["l","a","b","alpha"],{fromRgb:function(){return this.xyz().lab()},rgb:function(){return this.xyz().rgb()},xyz:function(){var t=function(s){var a=Math.pow(s,3);return a>.008856?a:(s-.13793103448275862)/7.87},n=(this._l+16)/116,i=this._a/500+n,o=n-this._b/200;return new e.XYZ(t(i)*95.047,t(n)*100,t(o)*108.883,this._alpha)}})}),Lf}var Bf,c2;function u2(){return c2||(c2=1,Bf=function(e){e.installColorSpace("HSV",["hue","saturation","value","alpha"],{rgb:function(){var t=this._hue,n=this._saturation,i=this._value,o=Math.min(5,Math.floor(t*6)),s=t*6-o,a=i*(1-n),l=i*(1-s*n),c=i*(1-(1-s)*n),u,h,g;switch(o){case 0:u=i,h=c,g=a;break;case 1:u=l,h=i,g=a;break;case 2:u=a,h=i,g=c;break;case 3:u=a,h=l,g=i;break;case 4:u=c,h=a,g=i;break;case 5:u=i,h=a,g=l;break}return new e.RGB(u,h,g,this._alpha)},hsl:function(){var t=(2-this._saturation)*this._value,n=this._saturation*this._value,i=t<=1?t:2-t,o;return i<1e-9?o=0:o=n/i,new e.HSL(this._hue,o,t/2,this._alpha)},fromRgb:function(){var t=this._red,n=this._green,i=this._blue,o=Math.max(t,n,i),s=Math.min(t,n,i),a=o-s,l,c=o===0?0:a/o,u=o;if(a===0)l=0;else switch(o){case t:l=(n-i)/a/6+(n<i?1:0);break;case n:l=(i-t)/a/6+1/3;break;case i:l=(t-n)/a/6+2/3;break}return new e.HSV(l,c,u,this._alpha)}})}),Bf}var Pf,d2;function Xo(){return d2||(d2=1,Pf=function(e){e.use(u2()),e.installColorSpace("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var t=this._lightness*2,n=this._saturation*(t<=1?t:2-t),i;return t+n<1e-9?i=0:i=2*n/(t+n),new e.HSV(this._hue,i,(t+n)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}})}),Pf}var Ff,h2;function pR(){return h2||(h2=1,Ff=function(e){e.installColorSpace("CMYK",["cyan","magenta","yellow","black","alpha"],{rgb:function(){return new e.RGB(1-this._cyan*(1-this._black)-this._black,1-this._magenta*(1-this._black)-this._black,1-this._yellow*(1-this._black)-this._black,this._alpha)},fromRgb:function(){var t=this._red,n=this._green,i=this._blue,o=1-t,s=1-n,a=1-i,l=1;return t||n||i?(l=Math.min(o,Math.min(s,a)),o=(o-l)/(1-l),s=(s-l)/(1-l),a=(a-l)/(1-l)):l=1,new e.CMYK(o,s,a,l,this._alpha)}})}),Ff}var zf,f2;function mR(){return f2||(f2=1,zf=function(e){e.namedColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"}}),zf}var qf,p2;function gR(){return p2||(p2=1,qf=function(e){e.installMethod("clearer",function(t){return this.alpha(isNaN(t)?-.1:-t,!0)})}),qf}var Hf,m2;function g2(){return m2||(m2=1,Hf=function(e){function t(n){return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}e.installMethod("luminance",function(){var n=this.rgb();return .2126*t(n._red)+.7152*t(n._green)+.0722*t(n._blue)})}),Hf}var Vf,b2;function bR(){return b2||(b2=1,Vf=function(e){e.use(g2()),e.installMethod("contrast",function(t){var n=this.luminance(),i=t.luminance();return n>i?(n+.05)/(i+.05):(i+.05)/(n+.05)})}),Vf}var Uf,_2;function _R(){return _2||(_2=1,Uf=function(e){e.use(Xo()),e.installMethod("darken",function(t){return this.lightness(isNaN(t)?-.1:-t,!0)})}),Uf}var Gf,y2;function yR(){return y2||(y2=1,Gf=function(e){e.use(Xo()),e.installMethod("desaturate",function(t){return this.saturation(isNaN(t)?-.1:-t,!0)})}),Gf}var $f,v2;function vR(){return v2||(v2=1,$f=function(e){function t(){var n=this.rgb(),i=n._red*.3+n._green*.59+n._blue*.11;return new e.RGB(i,i,i,n._alpha)}e.installMethod("greyscale",t).installMethod("grayscale",t)}),$f}var Wf,w2;function x2(){return w2||(w2=1,Wf=function(e){e.installMethod("isDark",function(){var t=this.rgb(),n=(t._red*255*299+t._green*255*587+t._blue*255*114)/1e3;return n<128})}),Wf}var Kf,k2;function wR(){return k2||(k2=1,Kf=function(e){e.use(x2()),e.installMethod("isLight",function(){return!this.isDark()})}),Kf}var jf,S2;function xR(){return S2||(S2=1,jf=function(e){e.use(Xo()),e.installMethod("lighten",function(t){return this.lightness(isNaN(t)?.1:t,!0)})}),jf}var Qf,E2;function kR(){return E2||(E2=1,Qf=function(e){e.installMethod("mix",function(t,n){t=e(t).rgb(),n=1-(isNaN(n)?.5:n);var i=n*2-1,o=this._alpha-t._alpha,s=((i*o===-1?i:(i+o)/(1+i*o))+1)/2,a=1-s,l=this.rgb();return new e.RGB(l._red*s+t._red*a,l._green*s+t._green*a,l._blue*s+t._blue*a,l._alpha*n+t._alpha*(1-n))})}),Qf}var Yf,C2;function SR(){return C2||(C2=1,Yf=function(e){e.installMethod("negate",function(){var t=this.rgb();return new e.RGB(1-t._red,1-t._green,1-t._blue,this._alpha)})}),Yf}var Zf,T2;function ER(){return T2||(T2=1,Zf=function(e){e.installMethod("opaquer",function(t){return this.alpha(isNaN(t)?.1:t,!0)})}),Zf}var Xf,A2;function CR(){return A2||(A2=1,Xf=function(e){e.use(Xo()),e.installMethod("rotate",function(t){return this.hue((t||0)/360,!0)})}),Xf}var Jf,M2;function TR(){return M2||(M2=1,Jf=function(e){e.use(Xo()),e.installMethod("saturate",function(t){return this.saturation(isNaN(t)?.1:t,!0)})}),Jf}var ep,N2;function AR(){return N2||(N2=1,ep=function(e){e.installMethod("toAlpha",function(t){var n=this.rgb(),i=t(t).rgb(),o=1e-10,s=new t.RGB(0,0,0,n._alpha),a=["_red","_green","_blue"];return a.forEach(function(l){n[l]<o?s[l]=n[l]:n[l]>i[l]?s[l]=(n[l]-i[l])/(1-i[l]):n[l]>i[l]?s[l]=(i[l]-n[l])/i[l]:s[l]=0}),s._red>s._green?s._red>s._blue?n._alpha=s._red:n._alpha=s._blue:s._green>s._blue?n._alpha=s._green:n._alpha=s._blue,n._alpha<o||(a.forEach(function(l){n[l]=(n[l]-i[l])/n._alpha+i[l]}),n._alpha*=s._alpha),n})}),ep}var tp,D2;function MR(){return D2||(D2=1,tp=hR().use(a2()).use(fR()).use(u2()).use(Xo()).use(pR()).use(mR()).use(gR()).use(bR()).use(_R()).use(yR()).use(vR()).use(x2()).use(wR()).use(xR()).use(g2()).use(kR()).use(SR()).use(ER()).use(CR()).use(TR()).use(AR())),tp}var NR=MR();const Bc=Nn(NR);var Pc={exports:{}},DR=Pc.exports,R2;function RR(){return R2||(R2=1,function(r,e){(function(n,i){r.exports=i()})(typeof self<"u"?self:DR,function(){return function(){var t={};(function(){t.d=function(M,d){for(var f in d)t.o(d,f)&&!t.o(M,f)&&Object.defineProperty(M,f,{enumerable:!0,get:d[f]})}})(),function(){t.o=function(M,d){return Object.prototype.hasOwnProperty.call(M,d)}}();var n={};t.d(n,{default:function(){return JF}});var i=function M(d,f){this.position=void 0;var m="KaTeX parse error: "+d,_,x=f&&f.loc;if(x&&x.start<=x.end){var T=x.lexer.input;_=x.start;var I=x.end;_===T.length?m+=" at end of input: ":m+=" at position "+(_+1)+": ";var B=T.slice(_,I).replace(/[^]/g,"$&̲"),z;_>15?z="…"+T.slice(_-15,_):z=T.slice(0,_);var G;I+15<T.length?G=T.slice(I,I+15)+"…":G=T.slice(I),m+=z+B+G}var te=new Error(m);return te.name="ParseError",te.__proto__=M.prototype,te.position=_,te};i.prototype.__proto__=Error.prototype;var o=i,s=function(d,f){return d.indexOf(f)!==-1},a=function(d,f){return d===void 0?f:d},l=/([A-Z])/g,c=function(d){return d.replace(l,"-$1").toLowerCase()},u={"&":"&",">":">","<":"<",'"':""","'":"'"},h=/[&><"']/g;function g(M){return String(M).replace(h,function(d){return u[d]})}var b=function M(d){return d.type==="ordgroup"||d.type==="color"?d.body.length===1?M(d.body[0]):d:d.type==="font"?M(d.body):d},p=function(d){var f=b(d);return f.type==="mathord"||f.type==="textord"||f.type==="atom"},v=function(d){if(!d)throw new Error("Expected non-null, but got "+String(d));return d},w=function(d){var f=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(d);return f!=null?f[1]:"_relative"},S={contains:s,deflt:a,escape:g,hyphenate:c,getBaseElem:b,isCharacterBox:p,protocolFromUrl:w},C=function(){function M(f){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,f=f||{},this.displayMode=S.deflt(f.displayMode,!1),this.output=S.deflt(f.output,"htmlAndMathml"),this.leqno=S.deflt(f.leqno,!1),this.fleqn=S.deflt(f.fleqn,!1),this.throwOnError=S.deflt(f.throwOnError,!0),this.errorColor=S.deflt(f.errorColor,"#cc0000"),this.macros=f.macros||{},this.minRuleThickness=Math.max(0,S.deflt(f.minRuleThickness,0)),this.colorIsTextColor=S.deflt(f.colorIsTextColor,!1),this.strict=S.deflt(f.strict,"warn"),this.trust=S.deflt(f.trust,!1),this.maxSize=Math.max(0,S.deflt(f.maxSize,1/0)),this.maxExpand=Math.max(0,S.deflt(f.maxExpand,1e3)),this.globalGroup=S.deflt(f.globalGroup,!1)}var d=M.prototype;return d.reportNonstrict=function(m,_,x){var T=this.strict;if(typeof T=="function"&&(T=T(m,_,x)),!(!T||T==="ignore")){if(T===!0||T==="error")throw new o("LaTeX-incompatible input and strict mode is set to 'error': "+(_+" ["+m+"]"),x);T==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(_+" ["+m+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+T+"': "+_+" ["+m+"]"))}},d.useStrictBehavior=function(m,_,x){var T=this.strict;if(typeof T=="function")try{T=T(m,_,x)}catch{T="error"}return!T||T==="ignore"?!1:T===!0||T==="error"?!0:T==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(_+" ["+m+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+T+"': "+_+" ["+m+"]")),!1)},d.isTrusted=function(m){m.url&&!m.protocol&&(m.protocol=S.protocolFromUrl(m.url));var _=typeof this.trust=="function"?this.trust(m):this.trust;return!!_},M}(),E=function(){function M(f,m,_){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=f,this.size=m,this.cramped=_}var d=M.prototype;return d.sup=function(){return X[oe[this.id]]},d.sub=function(){return X[K[this.id]]},d.fracNum=function(){return X[ee[this.id]]},d.fracDen=function(){return X[$[this.id]]},d.cramp=function(){return X[Q[this.id]]},d.text=function(){return X[ie[this.id]]},d.isTight=function(){return this.size>=2},M}(),A=0,R=1,O=2,H=3,q=4,U=5,F=6,Y=7,X=[new E(A,0,!1),new E(R,0,!0),new E(O,1,!1),new E(H,1,!0),new E(q,2,!1),new E(U,2,!0),new E(F,3,!1),new E(Y,3,!0)],oe=[q,U,q,U,F,Y,F,Y],K=[U,U,U,U,Y,Y,Y,Y],ee=[O,H,q,U,F,Y,F,Y],$=[H,H,U,U,Y,Y,Y,Y],Q=[R,R,H,H,U,U,Y,Y],ie=[A,R,O,H,O,H,O,H],Z={DISPLAY:X[A],TEXT:X[O],SCRIPT:X[q],SCRIPTSCRIPT:X[F]},J=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function ue(M){for(var d=0;d<J.length;d++)for(var f=J[d],m=0;m<f.blocks.length;m++){var _=f.blocks[m];if(M>=_[0]&&M<=_[1])return f.name}return null}var fe=[];J.forEach(function(M){return M.blocks.forEach(function(d){return fe.push.apply(fe,d)})});function ke(M){for(var d=0;d<fe.length;d+=2)if(M>=fe[d]&&M<=fe[d+1])return!0;return!1}var Te=80,Ke=function(d,f){return"M95,"+(622+d+f)+`
|
|
177
|
+
`},text(r,e){let t=r.text,n=r.marks;Array.isArray(n)||(n=[]);for(let i of n)this[i.type]?t=this[i.type](t,i):console.warn(`Unknown mark type: ${i.type}`);return t},bold(r){return`**${r}**`},italic(r){return`*${r}*`},strike(r){return`~~${r}~~`},subscript(r){return`~${r}~`},superscript(r){return`^${r}^`},link(r,e){return`[${r}](${e.attrs.href})`},highlight(r){return`==${r}==`},code(r){return`\`${r}\``}};class zD{constructor(e={},t={}){this.flags={inline:!1,inlineWrapper:!1,heading:!1,bulletList:!1,orderedList:!1,blockquote:!1,powerTaskItem:!1,powerTaskList:!1,tableHeader:!1,tableCell:!1,tableRow:!1,table:!1},this.flags=Object.assign(this.flags,t),this.DecNodeFuncs=FD;for(let n in e)this.DecNodeFuncs.hasOwnProperty(n)&&console.warn(`Decoder already has a function named ${n}, the function will be overwritten.`),this.DecNodeFuncs[n]=e[n]}decode(e){e=JSON.parse(JSON.stringify(e));let t="";Array.isArray(e.content)||(e.content=[]);for(let n of e.content)t+=this.renderNode(n);return t}renderNode(e){e.parent?e.flags=Object.assign({},e.parent.flags):e.flags=Object.assign({},this.flags);let t=e.type;if(t==="text")return this.DecNodeFuncs.text(e);e.flags.hasOwnProperty(t)&&(e.flags[t]!==!1?e.flags[t]+=1:e.flags[t]=1),t==="paragraph"&&(e.flags.inlineWrapper=!0,e.flags.inline=!0);let n="",i=e.content;Array.isArray(i)||(i=[]);for(let s of i)s.parent=e,s.childIdx=i.indexOf(s),n+=this.renderNode(s);if(!this.DecNodeFuncs.hasOwnProperty(t))return console.warn(`Unknown node type: ${t}`),n;let o=this.DecNodeFuncs[t](e,e.flags);return typeof o=="string"?o+n:o.prefix+n+o.suffix}}let qD={Bold:{en:"Bold",cn:"粗体"},Italic:{en:"Italic",cn:"斜体"},Strikethrough:{en:"Strikethrough",cn:"删除线"},Underline:{en:"Underline",cn:"下划线"},"Block Quote":{en:"Block Quote",cn:"引用"},"Horizontal Rule":{en:"Horizontal Rule",cn:"水平线"},Header:{en:"Header",cn:"标题"},Task:{en:"Task",cn:"任务清单"},ClearFormatting:{en:"Clear Formatting",cn:"清除格式"},BulletedList:{en:"Bulleted List",cn:"项目符号"},NumberedList:{en:"Numbered List",cn:"编号"},DetailsList:{en:"Details List",cn:"详细列表"},AlignLeft:{en:"Align Left",cn:"左对齐"},AlignCenter:{en:"Align Center",cn:"居中"},AlignRight:{en:"Align Right",cn:"右对齐"},AlignJustify:{en:"Align Justify",cn:"两端对齐"},IncreaseIndent:{en:"Increase Indent",cn:"增加缩进"},DecreaseIndent:{en:"Decrease Indent",cn:"减少缩进"},Color:{en:"Color",cn:"颜色"},Draw:{en:"Draw",cn:"绘图"},Emoji:{en:"Emoji",cn:"表情"},Table:{en:"Table",cn:"表格"},Code:{en:"Code",cn:"代码"},"Code Block":{en:"Code Block",cn:"代码块"},Equation:{en:"Equation",cn:"公式"},Image:{en:"Image",cn:"图片"},Link:{en:"Link",cn:"链接"},Embed:{en:"Embed",cn:"嵌入"},Undo:{en:"Undo",cn:"撤销"},Redo:{en:"Redo",cn:"重做"},Save:{en:"Save",cn:"保存"},Cancel:{en:"Cancel",cn:"取消"},TextField:{en:"Text Field",cn:"文本框"},"Write a caption...":{en:"Write a caption...",cn:"输入标题..."},removeColor:{en:"Remove Color",cn:"清除颜色"},removeHighlight:{en:"Remove Highlight",cn:"清除高亮"},Row:{en:"Row",cn:"行"},Column:{en:"Column",cn:"列"},"Delete Column":{en:"Delete Column",cn:"删除列"},"Delete Row":{en:"Delete Row",cn:"删除行"},"Add Row Before":{en:"Add Row Before",cn:"在上方插入行"},"Add Row After":{en:"Add Row After",cn:"在下方插入行"},"Add Column Before":{en:"Add Column Before",cn:"在左侧插入列"},"Add Column After":{en:"Add Column After",cn:"在右侧插入列"},"Merge Cells":{en:"Merge Cells",cn:"合并单元格"},"Split Cell":{en:"Split Cell",cn:"拆分单元格"},Headers:{en:"Headers",cn:"标题"},Heading:{en:"Heading",cn:"标题"},"Text Color":{en:"Text Color",cn:"文本颜色"},Foreground:{en:"Foreground",cn:"前景色"},"Highlight Background":{en:"Highlight Background",cn:"高亮色"},purple:{en:"purple",cn:"紫色"},red:{en:"red",cn:"红色"},orange:{en:"orange",cn:"橙色"},yellow:{en:"yellow",cn:"黄色"},blue:{en:"blue",cn:"蓝色"},teal:{en:"teal",cn:"青色"},green:{en:"green",cn:"绿色"},Random:{en:"Random",cn:"随机"},"People and Fantasy":{en:"People and Fantasy",cn:"人物与范例"},"Animals & Nature":{en:"Animals & Nature",cn:"动物与自然"},"Food & Drink":{en:"Food & Drink",cn:"食物与饮料"},"Activity and Sports":{en:"Activity and Sports",cn:"活动与体育"},"Travel & Places":{en:"Travel & Places",cn:"旅行与地点"},Objects:{en:"Objects",cn:"物件"},Symbols:{en:"Symbols",cn:"符号"},Flags:{en:"Flags",cn:"旗帜"},"Fill the Form":{en:"Fill the Form",cn:"填写表单"},Caption:{en:"Caption",cn:"标题"},"Insert Embed Url...":{en:"Insert Embed Url...",cn:"插入嵌入链接..."},Insert:{en:"Insert",cn:"插入"},"Insert Embed":{en:"Insert Embed",cn:"插入嵌入"},"Insert Image":{en:"Insert Image",cn:"插入图片"},Method:{en:"Method",cn:"方法"},"Choose Local Image as Base64 (multiple).":{en:"Choose Local Image as Base64 (multiple).",cn:"选择本地图片为Base64 (支持多个)"},"Insert Image Url.":{en:"Insert Image Url.",cn:"插入图片链接"},"Insert Link Url...":{en:"Insert Link Url...",cn:"插入链接..."},"Insert Link":{en:"Insert Link",cn:"插入链接"},Newline:{en:"Newline",cn:"换行"},"Format Painter":{en:"Format Painter",cn:"格式刷"},Done:{en:"Done",cn:"完成"},gray:{en:"Gray",cn:"灰色"},pink:{en:"Pink",cn:"粉色"},rose:{en:"Rose",cn:"玫瑰色"},fresh_blue:{en:"Fresh Blue",cn:"鲜艳蓝"},ice_blue:{en:"Ice Blue",cn:"冰蓝色"},dark_blue:{en:"Dark Blue",cn:"深蓝色"},fresh_green:{en:"Fresh Green",cn:"鲜艳绿"},light_green:{en:"Light Green",cn:"浅绿色"},light_yellow:{en:"Light Yellow",cn:"浅黄色"},light_red:{en:"Light Red",cn:"浅红色"},light_purple:{en:"Light Purple",cn:"浅紫色"},light_orange:{en:"Light Orange",cn:"浅橙色"}};const on=(r,e="en")=>{let t=qD[r];return t?t[e]:r},HD={emits:["container-dblclick","container-click","update:width","update:alignCenter","update:caption"],props:{width:{default:100},editor:{default:()=>({})},caption:{default:""},alignCenter:{default:!0},foreground:{default:""},node:{default:()=>({})},getPos:{default:()=>{}},theme:{default:"light"}},data(){return{thisCaption:this.caption?this.caption.toString():"",thisAlignCenter:this.alignCenter,elWidthStart:0,elWidthEnd:0,ppi:0,active:!1,moveable:!1,direction:1,disX:0,currentWidth:this.width,outsideEvent:r=>{let e=r.target,t=!1;for(;e&&e.tagName&&e.tagName.toLowerCase()!="body";){if(e==this.$el){t=!0;break}e=e.parentNode}t||(this.show.captionBox=!1)},show:{captionBox:!1}}},watch:{width(r){this.currentWidth=r},currentWidth(r){this.$emit("update:width",r)},alignCenter(r){this.thisAlignCenter=r},thisAlignCenter(r){this.$emit("update:alignCenter",r)},caption(r){this.thisCaption=r?r.toString():""},thisCaption(r){this.$emit("update:caption",r)}},mounted(){this.Init(),this.outSideClickInit()},methods:{Init(){let r=e=>(e.clientX-this.disX)*this.direction+this.elWidthStart*1;window.addEventListener("mousemove",e=>{this.moveable&&(this.elWidthEnd=r(e))}),window.addEventListener("touchmove",e=>{e=e.targetTouches[0],this.moveable&&(this.elWidthEnd=r(e))}),window.addEventListener("mouseup",e=>(this.active=!1,this.moveable&&this.stop(),e)),window.addEventListener("touchup",e=>(this.active=!1,this.moveable&&this.stop(),e))},forward(r,e=1){this.active=!0,this.moveable=!0,this.disX=r.clientX,this.direction=e,this.elWidthStart=this.$el.clientWidth,this.elWidthEnd=this.elWidthStart,this.ppi=(this.currentWidth>100?100:this.currentWidth)/this.elWidthStart},stop(){this.active=!1,this.moveable=!1,this.elWidthEnd<50&&(this.elWidthEnd=50),this.currentWidth=this.elWidthEnd*this.ppi,this.currentWidth>100&&(this.currentWidth=100)},outSideClickInit(){window.addEventListener("click",this.outsideEvent)},getTitle(r){return on(r,this.editor.storage.defaultStorage.language)},showCaptionBox(){this.editor.isEditable&&(this.show.captionBox=!0,this.$nextTick(()=>{this.$refs.caption.focus()}))},newline(){this.editor.isEditable&&(this.editor.commands.focus(),this.editor.commands.insertContentAt(this.getPos()+this.node.nodeSize-1,"<br>"))}},beforeUnmount(){window.removeEventListener("click",this.outsideEvent)}},VD={class:"power-editor-media-control-btn-block"},UD={class:"power-editor-media-control-btn-block bottom"},GD={class:"power-editor-media-mask-block"};function $D(r,e,t,n,i,o){const s=y.resolveComponent("fv-button"),a=y.resolveComponent("fv-text-box");return y.openBlock(),y.createElementBlock("div",{class:y.normalizeClass(["power-editor-media-container",[{dark:t.theme==="dark"},{"active-effects":i.active}]]),style:y.normalizeStyle({width:i.moveable?`${i.elWidthEnd}px`:`${i.currentWidth}%`})},[y.withDirectives(y.createElementVNode("div",{class:"power-editor-media-control-resize-block",onMousedown:e[0]||(e[0]=l=>o.forward(l,-1)),onMouseup:e[1]||(e[1]=(...l)=>o.stop&&o.stop(...l)),onTouchstart:e[2]||(e[2]=l=>o.forward(l.targetTouches[0],-1)),onTouchend:e[3]||(e[3]=(...l)=>o.stop&&o.stop(...l))},e[19]||(e[19]=[y.createElementVNode("i",null,null,-1)]),544),[[y.vShow,t.alignCenter&&(t.editor.isEditable||t.editor.storage.defaultStorage.showControlOnReadonly)]]),y.createElementVNode("div",{class:"power-editor-media-slot-container",onDblclick:e[4]||(e[4]=l=>r.$emit("container-dblclick",l)),onClick:e[5]||(e[5]=l=>r.$emit("container-click",l))},[y.renderSlot(r.$slots,"default",{},()=>[e[20]||(e[20]=y.createTextVNode(" Media Container "))])],32),y.withDirectives(y.createElementVNode("div",{class:"power-editor-media-control-resize-block sec",onMousedown:e[6]||(e[6]=(...l)=>o.forward&&o.forward(...l)),onMouseup:e[7]||(e[7]=(...l)=>o.stop&&o.stop(...l)),onTouchstart:e[8]||(e[8]=l=>o.forward(l.targetTouches[0])),onTouchend:e[9]||(e[9]=(...l)=>o.stop&&o.stop(...l))},e[21]||(e[21]=[y.createElementVNode("i",null,null,-1)]),544),[[y.vShow,t.editor.isEditable||t.editor.storage.defaultStorage.showControlOnReadonly]]),y.withDirectives(y.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:"power-editor-media-drag-btn",onMousedown:e[10]||(e[10]=l=>i.active=!0),onMouseup:e[11]||(e[11]=l=>i.active=!1),onTouchstart:e[12]||(e[12]=l=>i.active=!0),onTouchend:e[13]||(e[13]=l=>i.active=!1)},e[22]||(e[22]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--GripperDotsVertical"},null,-1)]),544),[[y.vShow,t.editor.isEditable]]),y.withDirectives(y.createElementVNode("div",VD,[y.withDirectives(y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,fontSize:"10",title:o.getTitle("Caption"),onClick:o.showCaptionBox},{default:y.withCtx(()=>e[23]||(e[23]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--TextField"},null,-1)])),_:1,__:[23]},8,["background","theme","title","onClick"]),[[y.vShow,t.editor.isEditable]]),y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,fontSize:"10",title:o.getTitle("AlignLeft"),onClick:e[14]||(e[14]=l=>i.thisAlignCenter=!1)},{default:y.withCtx(()=>e[24]||(e[24]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--AlignLeft"},null,-1)])),_:1,__:[24]},8,["background","theme","title"]),y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,fontSize:"10",title:o.getTitle("AlignCenter"),onClick:e[15]||(e[15]=l=>i.thisAlignCenter=!0)},{default:y.withCtx(()=>e[25]||(e[25]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--AlignCenter"},null,-1)])),_:1,__:[25]},8,["background","theme","title"])],512),[[y.vShow,t.editor.isEditable||t.editor.storage.defaultStorage.showControlOnReadonly]]),y.withDirectives(y.createElementVNode("div",UD,[y.createVNode(s,{class:"power-editor-media-cmd-btn",background:t.theme==="dark"?"rgba(0, 0, 0, 0.8)":"rgba(255, 255, 255, 0.3)",theme:t.theme,icon:"ReturnKeySm",fontSize:"10",title:o.getTitle("TextField"),style:{width:"60px"},onClick:o.newline},{default:y.withCtx(()=>[y.createTextVNode(y.toDisplayString(o.getTitle("Newline")),1)]),_:1},8,["background","theme","title","onClick"])],512),[[y.vShow,t.editor.isEditable]]),y.withDirectives(y.createElementVNode("div",GD,null,512),[[y.vShow,i.active]]),y.withDirectives(y.createElementVNode("p",{class:"power-editor-media-container-caption",onClick:e[16]||(e[16]=(...l)=>o.showCaptionBox&&o.showCaptionBox(...l))},y.toDisplayString(i.thisCaption),513),[[y.vShow,i.thisCaption!==""&&!i.show.captionBox]]),y.withDirectives(y.createVNode(a,{modelValue:i.thisCaption,"onUpdate:modelValue":e[17]||(e[17]=l=>i.thisCaption=l),theme:t.theme,class:"power-editor-media-caption-block",placeholder:o.getTitle("Write a caption..."),ref:"caption",background:"transparent",underline:"","border-width":2,"is-box-shadow":!0,"border-color":"rgba(200, 200, 200, 0.1)","focus-border-color":t.foreground,onKeyup:e[18]||(e[18]=y.withKeys(()=>{i.show.captionBox=!1,o.newline()},["enter"]))},null,8,["modelValue","theme","placeholder","focus-border-color"]),[[y.vShow,i.show.captionBox]])],6)}const Rf=sr(HD,[["render",$D]]),WD={components:{NodeViewWrapper:io,mediaContainer:Rf},props:{editor:{type:Object},node:{type:Object},decorations:{type:Array},selected:{type:Boolean},extension:{type:Object},getPos:{type:Function},updateAttributes:{type:Function},deleteNode:{type:Function}},data(){return{statusInfo:{show:!1,progress:0,loading:!1,info:"",tmpSrc:"",tmpHeight:0,lock:!0},previewImg:{scalePercent:"100",show:!1},thisTheme:this.editor.storage.defaultStorage.theme,thisLazyLoad:this.editor.storage.defaultStorage.imgLazyLoad,thisForeground:this.editor.storage.defaultStorage.foreground,thisImgPreview:this.editor.storage.defaultStorage.imgPreview,imgInterceptor:this.editor.storage.defaultStorage.imgInterceptor}},watch:{"node.attrs.src"(){this.imgInterceptorFunc()},"editor.storage.defaultStorage.theme"(r){this.thisTheme=r},"editor.storage.defaultStorage.imgLazyLoad"(r){this.thisLazyLoad=r},"editor.storage.defaultStorage.imgPreview"(r){this.thisImgPreview=r},"editor.storage.defaultStorage.foreground"(r){this.thisForeground=r},"editor.storage.defaultStorage.imgInterceptor"(r){this.imgInterceptor=r,this.imgInterceptorFunc()}},mounted(){this.imgInterceptorFunc()},methods:{showStatus(r){this.statusInfo.show=r},updateStatus(r,e,t=""){this.statusInfo.loading=r,this.statusInfo.progress=e,this.statusInfo.info=t},getImage(){return this.node.attrs.src},interceptImage(r=""){return this.statusInfo.tmpSrc=this.node.attrs.src,this.statusInfo.tmpHeight=this.$refs.image.$el.clientHeight,this.updateAttributes({src:r}),this.statusInfo.tmpSrc},updateImage(r){this.updateAttributes({src:r})},updateLock(r){this.statusInfo.lock=r},imgInterceptorFunc(){let r={node:this.node,extension:this.extension,getPos:this.getPos,updateAttributes:this.updateAttributes,deleteNode:this.deleteNode,showStatus:this.showStatus,updateStatus:this.updateStatus,getImage:this.getImage,interceptImage:this.interceptImage,updateImage:this.updateImage,updateLock:this.updateLock};this.imgInterceptor&&this.imgInterceptor(r)},preview(r="readonly"){this.editor.isEditable&&r!=="editable"||!this.editor.isEditable&&r!=="readonly"||this.node.attrs.src&&this.thisImgPreview&&(this.previewImg.show=!0)},scale(r,e){r.stopPropagation&&r.stopPropagation();let t=parseInt(this.previewImg.scalePercent);t+=e,t<50?t=50:t>200&&(t=200),this.previewImg.scalePercent=t.toString()},setScale(r,e){r.stopPropagation&&r.stopPropagation(),e<50?e=50:e>200&&(e=200),this.previewImg.scalePercent=e.toString()}}},KD={class:"power-editor-image-status-container"},jD={class:"power-editor-preview-img-container"};function QD(r,e,t,n,i,o){const s=y.resolveComponent("fv-image"),a=y.resolveComponent("fv-progress-ring"),l=y.resolveComponent("media-container"),c=y.resolveComponent("fv-img"),u=y.resolveComponent("fv-button"),h=y.resolveComponent("fv-text-box"),g=y.resolveComponent("node-view-wrapper");return t.node?(y.openBlock(),y.createBlock(g,{key:0,class:y.normalizeClass(["power-editor-image-container",[{dark:i.thisTheme==="dark"}]]),style:y.normalizeStyle({"justify-content":t.node.attrs.alignCenter?"center":"flex-start"})},{default:y.withCtx(()=>[y.createVNode(l,{width:t.node.attrs.width,caption:t.node.attrs.caption,alignCenter:t.node.attrs.alignCenter,editor:t.editor,theme:i.thisTheme,foreground:i.thisForeground,node:t.node,getPos:t.getPos,"onUpdate:caption":e[1]||(e[1]=b=>t.updateAttributes({caption:b})),onContainerDblclick:e[2]||(e[2]=b=>o.preview("editable")),onContainerClick:e[3]||(e[3]=b=>o.preview("readonly"))},{default:y.withCtx(()=>[y.createVNode(s,{src:t.node.attrs.src?t.node.attrs.src:i.statusInfo.tmpSrc?i.statusInfo.tmpSrc:"",ref:"image",onlazy:i.thisLazyLoad,style:y.normalizeStyle([{width:"100%",height:"auto"},{height:!t.node.attrs.src&&i.statusInfo.show?i.statusInfo.tmpHeight+"px":""}])},null,8,["src","onlazy","style"]),y.withDirectives(y.createElementVNode("div",KD,[y.createVNode(a,{modelValue:i.statusInfo.progress,"onUpdate:modelValue":e[0]||(e[0]=b=>i.statusInfo.progress=b),loading:i.statusInfo.loading,r:"20",borderWidth:"3",color:i.thisTheme==="dark"?"white":"black",background:i.thisTheme==="dark"?"rgba(0, 0, 0, 0.3)":"rgba(255, 255, 255, 0.3)"},null,8,["modelValue","loading","color","background"]),y.withDirectives(y.createElementVNode("p",{class:"power-editor-image-status-title"},y.toDisplayString(i.statusInfo.info),513),[[y.vShow,i.statusInfo.info]])],512),[[y.vShow,i.statusInfo.show]]),y.createElementVNode("div",{class:y.normalizeClass(["power-editor-image-selection-mask",[{selected:t.selected}]]),style:y.normalizeStyle({"--selected-bg":i.thisForeground})},null,6)]),_:1},8,["width","caption","alignCenter","editor","theme","foreground","node","getPos"]),y.createVNode(y.Transition,{name:"show-preview"},{default:y.withCtx(()=>[y.withDirectives(y.createElementVNode("div",{class:"power-editor-image-preview-block",onClick:e[10]||(e[10]=b=>i.previewImg.show=!1)},[y.createElementVNode("div",jD,[y.createVNode(c,{src:t.node.attrs.src,class:"power-editor-preview-img",style:y.normalizeStyle({scale:i.previewImg.scalePercent+"%",cursor:i.previewImg.scalePercent<150?"zoom-in":"zoom-out"}),onClick:e[4]||(e[4]=b=>i.previewImg.scalePercent<100?o.setScale(b,100):i.previewImg.scalePercent<150?o.setScale(b,150):o.setScale(b,100))},null,8,["src","style"])]),y.createElementVNode("div",{class:"power-editor-preview-tool-bar",onClick:e[9]||(e[9]=b=>b.stopPropagation())},[y.createVNode(u,{class:"power-editor-preview-img-btn",theme:"dark",disabled:i.previewImg.scalePercent<=50,background:"rgba(36, 36, 36, 0.3)",onClick:e[5]||(e[5]=b=>o.scale(b,-50))},{default:y.withCtx(()=>e[11]||(e[11]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--CalculatorSubtract"},null,-1)])),_:1,__:[11]},8,["disabled"]),y.createVNode(h,{modelValue:i.previewImg.scalePercent,theme:"dark",underline:"","border-color":"rgba(120, 120, 120, 0.1)","focus-border-color":i.thisForeground,"border-width":2,"is-box-shadow":!0,suffix:"%",style:{width:"80px",height:"35px"},onDebounceInput:e[6]||(e[6]=b=>o.setScale(b,b))},null,8,["modelValue","focus-border-color"]),y.createVNode(u,{class:"power-editor-preview-img-btn",theme:"dark",disabled:i.previewImg.scalePercent>=200,background:"rgba(36, 36, 36, 0.3)","border-color":"transparent",onClick:e[7]||(e[7]=b=>o.scale(b,50))},{default:y.withCtx(()=>e[12]||(e[12]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--CalculatorAddition"},null,-1)])),_:1,__:[12]},8,["disabled"]),y.createVNode(u,{class:"power-editor-preview-img-btn",theme:"dark",background:"rgba(36, 36, 36, 0.3)",onClick:e[8]||(e[8]=b=>i.previewImg.show=!1)},{default:y.withCtx(()=>e[13]||(e[13]=[y.createElementVNode("i",{class:"ms-Icon ms-Icon--BackToWindow"},null,-1)])),_:1,__:[13]})])],512),[[y.vShow,i.previewImg.show]])]),_:1})]),_:1},8,["class","style"])):y.createCommentVNode("",!0)}const YD=sr(WD,[["render",QD]]),ZD=qr.create({name:"imageblock",group:"block",draggable:!0,atom:!0,addAttributes(){return{src:{default:""},width:{default:100},caption:{default:""},alignCenter:{default:!0}}},parseHTML(){return[{tag:"img[src]"}]},renderHTML({HTMLAttributes:r}){return["img",jt(this.options.HTMLAttributes,r)]},addNodeView(){return vi(YD)}}),XD={components:{NodeViewWrapper:io,mediaContainer:Rf},props:{editor:{type:Object},node:{type:Object},decorations:{type:Array},selected:{type:Boolean},extension:{type:Object},getPos:{type:Function},updateAttributes:{type:Function},deleteNode:{type:Function}},data(){return{width:0,thisTheme:this.editor.storage.defaultStorage.theme,thisForeground:this.editor.storage.defaultStorage.foreground,timer:{}}},watch:{"editor.storage.defaultStorage.theme"(r){this.thisTheme=r},"editor.storage.defaultStorage.foreground"(r){this.thisForeground=r}},mounted(){this.timerInit()},methods:{timerInit(){this.timer=setInterval(()=>{this.width=this.$refs.media.$el.clientWidth},300)}},beforeUnmount(){clearInterval(this.timer)}},JD=["src"];function eR(r,e,t,n,i,o){const s=y.resolveComponent("media-container"),a=y.resolveComponent("node-view-wrapper");return t.node?(y.openBlock(),y.createBlock(a,{key:0,class:"power-editor-embed-container",style:y.normalizeStyle({"justify-content":t.node.attrs.alignCenter?"center":"flex-start"})},{default:y.withCtx(()=>[y.createVNode(s,{width:t.node.attrs.width,caption:t.node.attrs.caption,alignCenter:t.node.attrs.alignCenter,editor:t.editor,theme:i.thisTheme,foreground:i.thisForeground,node:t.node,getPos:t.getPos,ref:"media","onUpdate:caption":e[0]||(e[0]=l=>t.updateAttributes({caption:l}))},{default:y.withCtx(()=>[y.createElementVNode("iframe",{src:t.node.attrs.src,frameborder:"0",allowfullscreen:"",style:y.normalizeStyle([{width:"100%",height:"auto"},{height:`${i.width/1.778}px`}])},null,12,JD)]),_:1},8,["width","caption","alignCenter","editor","theme","foreground","node","getPos"])]),_:1},8,["style"])):y.createCommentVNode("",!0)}const tR=sr(XD,[["render",eR]]),rR=qr.create({name:"embedblock",group:"block",draggable:!0,atom:!0,addAttributes(){return{src:{default:""},width:{default:100},caption:{default:""},alignCenter:{default:!0}}},parseHTML(){return[{tag:"embed-block"}]},renderHTML({HTMLAttributes:r}){return["embed-block",jt(r)]},addNodeView(){return vi(tR)}});function Lc({find:r,type:e,getAttributes:t}){return new W1({find:r,handler({match:n,chain:i,range:o}){const s=et(t,void 0,n);if(s===!1||s===null)return null;if(n.input){const{from:a,to:l}=o;s.powerContent?i().deleteRange(o).insertContentAt(a,[{type:e.name,attrs:s,content:s.powerContent}]):i().deleteRange(o).insertContentAt(a,[{type:e.name,attrs:s}])}}})}const nR=/^-(\[([ |x])\])\s$/,iR=/^-(\s*)(\[([ |x])\])\s+(.*)/g,oR=qr.create({name:"powerTaskList",group:"block list",content:"powerTaskItem+",parseHTML(){return[{tag:'ul[data-type="powerTaskList"]',priority:51}]},renderHTML({HTMLAttributes:r}){return["ul",jt(r,{"data-type":this.name}),0]},addCommands(){return{togglePowerTaskList:()=>({commands:r})=>r.toggleList("powerTaskList","powerTaskItem"),setPowerTaskList:()=>({editor:r,commands:e})=>{if(!r.isActive("powerTaskList"))return e.toggleList("powerTaskList","powerTaskItem")}}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.togglePowerTaskList()}},addInputRules(){return[sb({find:nR,type:this.type,getAttributes:r=>({checked:r[r.length-1]==="x",theme:this.editor.storage.defaultStorage.theme})})]},addPasteRules(){return[Lc({find:iR,type:this.type,getAttributes:r=>({powerContent:[{type:"powerTaskItem",content:[{type:"paragraph",content:[{type:"text",text:r[4]}]}],attrs:{checked:r[3]==="x",theme:this.editor.storage.defaultStorage.theme}}]})})]}}),sR={components:{NodeViewWrapper:io,NodeViewContent:Xb},props:{editor:{type:Object},node:{type:Object},decorations:{type:Array},selected:{type:Boolean},extension:{type:Object},getPos:{type:Function},updateAttributes:{type:Function},deleteNode:{type:Function}},data(){return{thisTheme:this.editor.storage.defaultStorage.theme,thisForeground:this.editor.storage.defaultStorage.foreground,timer:{}}},watch:{"editor.storage.defaultStorage.theme"(r){this.thisTheme=r},"editor.storage.defaultStorage.foreground"(r){this.thisForeground=r}},mounted(){},methods:{preventEnter(r){console.log(r)},updateValue(r){this.updateAttributes({checked:r})}},beforeUnmount(){clearInterval(this.timer)}};function aR(r,e,t,n,i,o){const s=y.resolveComponent("fv-check-box"),a=y.resolveComponent("node-view-content"),l=y.resolveComponent("node-view-wrapper");return t.node?(y.openBlock(),y.createBlock(l,{key:0,as:"li",class:"power-editor-task-item-container"},{default:y.withCtx(()=>[y.createVNode(s,{modelValue:t.node.attrs.checked,"onUpdate:modelValue":e[0]||(e[0]=c=>t.node.attrs.checked=c),theme:i.thisTheme,disabled:!t.editor.isEditable,background:i.thisForeground,contenteditable:"false",onClick:o.updateValue},null,8,["modelValue","theme","disabled","background","onClick"]),y.createVNode(a,{ref:"n",class:"power-editor-task-item-content"},null,512)]),_:1})):y.createCommentVNode("",!0)}const lR=sr(sR,[["render",aR]]),cR=/^\s*(\[([ |x])\])\s$/,uR=/^(\s*)(\[([ |x])\])\s+(.*)/g,dR=qr.create({name:"powerTaskItem",group:"block",content:"paragraph block*",draggable:!0,addAttributes(){return{value:{default:""},checked:{default:!1},placeholder:{default:"To-Do"}}},parseHTML(){return[{tag:'li[data-type="powerTaskItem"]',priority:51}]},renderHTML({HTMLAttributes:r}){return["li",jt(this.options.HTMLAttributes,r,{"data-type":"powerTaskItem"}),0]},addKeyboardShortcuts(){const r={Enter:()=>this.editor.commands.splitListItem("powerTaskItem"),"Shift-Tab":()=>this.editor.commands.liftListItem("powerTaskItem")};return this.options.nested?{...r,Tab:()=>this.editor.commands.sinkListItem("powerTaskItem")}:r},addNodeView(){return vi(lR)},addInputRules(){return[sb({find:cR,type:this.type,getAttributes:r=>({checked:r[r.length-1]==="x",theme:this.editor.storage.defaultStorage.theme})})]},addPasteRules(){return[Lc({find:uR,type:this.type,getAttributes:r=>({powerContent:[{type:"paragraph",content:[{type:"text",text:r[4]}]}],checked:r[3]==="x",theme:this.editor.storage.defaultStorage.theme})})]}});var Of,o2;function hR(){if(o2)return Of;o2=1;var r=[],e=function(a){return typeof a>"u"},t=/\s*(\.\d+|\d+(?:\.\d+)?)(%|deg)?\s*/,n=/\s*(\.\d+|100|\d?\d(?:\.\d+)?)%\s*/,i=new RegExp("^(rgb|hsl|hsv)a?\\("+t.source+"[, ]"+t.source+"[, ]"+t.source+"(?:[,/]"+t.source+")?\\)$","i");function o(a,l,c){if(a==="%")return 100;if(a==="deg"||c&&l===0)return 360;if(!a)return 255}function s(a){if(Array.isArray(a)){if(typeof a[0]=="string"&&typeof s[a[0]]=="function")return new s[a[0]](a.slice(1,a.length));if(a.length===4)return new s.RGB(a[0]/255,a[1]/255,a[2]/255,a[3]/255)}else if(typeof a=="string"){var l=a.toLowerCase();s.namedColors[l]&&(a="#"+s.namedColors[l]),l==="transparent"&&(a="rgba(0,0,0,0)");var c=a.match(i);if(c){var u=c[1].toUpperCase(),h=u[0]==="H";if(e(s[u]))throw new Error("color."+u+" is not installed.");let p=e(c[8])?1:void 0;return p===void 0&&(c[9]==="%"?p=parseFloat(c[8])/100:p=parseFloat(c[8])),new s[u](parseFloat(c[2])/o(c[3],0,h),parseFloat(c[4])/o(c[5],1,h),parseFloat(c[6])/o(c[7],2,h),p)}a.length<6&&(a=a.replace(/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])?$/i,"$1$1$2$2$3$3$4$4"));var g=a.match(/^#?([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])?$/i);if(g)return new s.RGB(parseInt(g[1],16)/255,parseInt(g[2],16)/255,parseInt(g[3],16)/255,g[4]?parseInt(g[4],16)/255:1);if(s.CMYK){var b=a.match(new RegExp("^cmyk\\("+n.source+","+n.source+","+n.source+","+n.source+"\\)$","i"));if(b)return new s.CMYK(parseFloat(b[1])/100,parseFloat(b[2])/100,parseFloat(b[3])/100,parseFloat(b[4])/100)}}else if(typeof a=="object"&&a.isColor)return a;return!1}return s.namedColors={},s.installColorSpace=function(a,l,c){s[a]=function(p){var v=Array.isArray(p)?p:arguments;l.forEach(function(w,S){var C=v[S];if(w==="alpha")this._alpha=isNaN(C)||C>1?1:C<0?0:C;else{if(isNaN(C))throw new Error("["+a+"]: Invalid color: ("+l.join(",")+")");w==="hue"?this._hue=C<0?C-Math.floor(C):C%1:this["_"+w]=C<0?0:C>1?1:C}},this)},s[a].propertyNames=l;var u=s[a].prototype;["valueOf","hex","hexa","css","cssa"].forEach(function(p){u[p]=u[p]||(a==="RGB"?u.hex:function(){return this.rgb()[p]()})}),u.isColor=!0,u.equals=function(p,v){e(v)&&(v=1e-10),p=p[a.toLowerCase()]();for(var w=0;w<l.length;w=w+1)if(Math.abs(this["_"+l[w]]-p["_"+l[w]])>v)return!1;return!0},u.toJSON=function(){return[a].concat(l.map(function(p){return this["_"+p]},this))};for(var h in c)if(Object.prototype.hasOwnProperty.call(c,h)){var g=h.match(/^from(.*)$/);g?s[g[1].toUpperCase()].prototype[a.toLowerCase()]=c[h]:u[h]=c[h]}u[a.toLowerCase()]=function(){return this},u.toString=function(){return"["+a+" "+l.map(function(p){return this["_"+p]},this).join(", ")+"]"},l.forEach(function(p){var v=p==="black"?"k":p.charAt(0);u[p]=u[v]=function(w,S){return typeof w>"u"?this["_"+p]:S?new this.constructor(l.map(function(C){return this["_"+C]+(p===C?w:0)},this)):new this.constructor(l.map(function(C){return p===C?w:this["_"+C]},this))}});function b(p,v){var w={};w[v.toLowerCase()]=function(){return this.rgb()[v.toLowerCase()]()},s[v].propertyNames.forEach(function(C){var E=C==="black"?"k":C.charAt(0);w[C]=w[E]=function(A,R){return this[v.toLowerCase()]()[C](A,R)}});for(var S in w)Object.prototype.hasOwnProperty.call(w,S)&&s[p].prototype[S]===void 0&&(s[p].prototype[S]=w[S])}return r.forEach(function(p){b(a,p),b(p,a)}),r.push(a),s},s.pluginList=[],s.use=function(a){return s.pluginList.indexOf(a)===-1&&(this.pluginList.push(a),a(s)),s},s.installMethod=function(a,l){return r.forEach(function(c){s[c].prototype[a]=l}),this},s.installColorSpace("RGB",["red","green","blue","alpha"],{hex:function(){var a=(Math.round(255*this._red)*65536+Math.round(255*this._green)*256+Math.round(255*this._blue)).toString(16);return"#"+"00000".substr(0,6-a.length)+a},hexa:function(){var a=Math.round(this._alpha*255).toString(16);return this.hex()+"00".substr(0,2-a.length)+a},css:function(){return"rgb("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+")"},cssa:function(){return"rgba("+Math.round(255*this._red)+","+Math.round(255*this._green)+","+Math.round(255*this._blue)+","+this._alpha+")"}}),Of=s,Of}var If,s2;function a2(){return s2||(s2=1,If=function(e){e.installColorSpace("XYZ",["x","y","z","alpha"],{fromRgb:function(){var t=function(s){return s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92},n=t(this._red),i=t(this._green),o=t(this._blue);return new e.XYZ(n*.4124564+i*.3575761+o*.1804375,n*.2126729+i*.7151522+o*.072175,n*.0193339+i*.119192+o*.9503041,this._alpha)},rgb:function(){var t=this._x,n=this._y,i=this._z,o=function(s){return s>.0031308?1.055*Math.pow(s,1/2.4)-.055:12.92*s};return new e.RGB(o(t*3.2404542+n*-1.5371385+i*-.4985314),o(t*-.969266+n*1.8760108+i*.041556),o(t*.0556434+n*-.2040259+i*1.0572252),this._alpha)},lab:function(){var t=function(s){return s>.008856?Math.pow(s,.3333333333333333):7.787037*s+.13793103448275862},n=t(this._x/95.047),i=t(this._y/100),o=t(this._z/108.883);return new e.LAB(116*i-16,500*(n-i),200*(i-o),this._alpha)}})}),If}var Lf,l2;function fR(){return l2||(l2=1,Lf=function(e){e.use(a2()),e.installColorSpace("LAB",["l","a","b","alpha"],{fromRgb:function(){return this.xyz().lab()},rgb:function(){return this.xyz().rgb()},xyz:function(){var t=function(s){var a=Math.pow(s,3);return a>.008856?a:(s-.13793103448275862)/7.87},n=(this._l+16)/116,i=this._a/500+n,o=n-this._b/200;return new e.XYZ(t(i)*95.047,t(n)*100,t(o)*108.883,this._alpha)}})}),Lf}var Bf,c2;function u2(){return c2||(c2=1,Bf=function(e){e.installColorSpace("HSV",["hue","saturation","value","alpha"],{rgb:function(){var t=this._hue,n=this._saturation,i=this._value,o=Math.min(5,Math.floor(t*6)),s=t*6-o,a=i*(1-n),l=i*(1-s*n),c=i*(1-(1-s)*n),u,h,g;switch(o){case 0:u=i,h=c,g=a;break;case 1:u=l,h=i,g=a;break;case 2:u=a,h=i,g=c;break;case 3:u=a,h=l,g=i;break;case 4:u=c,h=a,g=i;break;case 5:u=i,h=a,g=l;break}return new e.RGB(u,h,g,this._alpha)},hsl:function(){var t=(2-this._saturation)*this._value,n=this._saturation*this._value,i=t<=1?t:2-t,o;return i<1e-9?o=0:o=n/i,new e.HSL(this._hue,o,t/2,this._alpha)},fromRgb:function(){var t=this._red,n=this._green,i=this._blue,o=Math.max(t,n,i),s=Math.min(t,n,i),a=o-s,l,c=o===0?0:a/o,u=o;if(a===0)l=0;else switch(o){case t:l=(n-i)/a/6+(n<i?1:0);break;case n:l=(i-t)/a/6+1/3;break;case i:l=(t-n)/a/6+2/3;break}return new e.HSV(l,c,u,this._alpha)}})}),Bf}var Pf,d2;function Xo(){return d2||(d2=1,Pf=function(e){e.use(u2()),e.installColorSpace("HSL",["hue","saturation","lightness","alpha"],{hsv:function(){var t=this._lightness*2,n=this._saturation*(t<=1?t:2-t),i;return t+n<1e-9?i=0:i=2*n/(t+n),new e.HSV(this._hue,i,(t+n)/2,this._alpha)},rgb:function(){return this.hsv().rgb()},fromRgb:function(){return this.hsv().hsl()}})}),Pf}var Ff,h2;function pR(){return h2||(h2=1,Ff=function(e){e.installColorSpace("CMYK",["cyan","magenta","yellow","black","alpha"],{rgb:function(){return new e.RGB(1-this._cyan*(1-this._black)-this._black,1-this._magenta*(1-this._black)-this._black,1-this._yellow*(1-this._black)-this._black,this._alpha)},fromRgb:function(){var t=this._red,n=this._green,i=this._blue,o=1-t,s=1-n,a=1-i,l=1;return t||n||i?(l=Math.min(o,Math.min(s,a)),o=(o-l)/(1-l),s=(s-l)/(1-l),a=(a-l)/(1-l)):l=1,new e.CMYK(o,s,a,l,this._alpha)}})}),Ff}var zf,f2;function mR(){return f2||(f2=1,zf=function(e){e.namedColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"639",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"}}),zf}var qf,p2;function gR(){return p2||(p2=1,qf=function(e){e.installMethod("clearer",function(t){return this.alpha(isNaN(t)?-.1:-t,!0)})}),qf}var Hf,m2;function g2(){return m2||(m2=1,Hf=function(e){function t(n){return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}e.installMethod("luminance",function(){var n=this.rgb();return .2126*t(n._red)+.7152*t(n._green)+.0722*t(n._blue)})}),Hf}var Vf,b2;function bR(){return b2||(b2=1,Vf=function(e){e.use(g2()),e.installMethod("contrast",function(t){var n=this.luminance(),i=t.luminance();return n>i?(n+.05)/(i+.05):(i+.05)/(n+.05)})}),Vf}var Uf,_2;function _R(){return _2||(_2=1,Uf=function(e){e.use(Xo()),e.installMethod("darken",function(t){return this.lightness(isNaN(t)?-.1:-t,!0)})}),Uf}var Gf,y2;function yR(){return y2||(y2=1,Gf=function(e){e.use(Xo()),e.installMethod("desaturate",function(t){return this.saturation(isNaN(t)?-.1:-t,!0)})}),Gf}var $f,v2;function vR(){return v2||(v2=1,$f=function(e){function t(){var n=this.rgb(),i=n._red*.3+n._green*.59+n._blue*.11;return new e.RGB(i,i,i,n._alpha)}e.installMethod("greyscale",t).installMethod("grayscale",t)}),$f}var Wf,w2;function x2(){return w2||(w2=1,Wf=function(e){e.installMethod("isDark",function(){var t=this.rgb(),n=(t._red*255*299+t._green*255*587+t._blue*255*114)/1e3;return n<128})}),Wf}var Kf,k2;function wR(){return k2||(k2=1,Kf=function(e){e.use(x2()),e.installMethod("isLight",function(){return!this.isDark()})}),Kf}var jf,S2;function xR(){return S2||(S2=1,jf=function(e){e.use(Xo()),e.installMethod("lighten",function(t){return this.lightness(isNaN(t)?.1:t,!0)})}),jf}var Qf,E2;function kR(){return E2||(E2=1,Qf=function(e){e.installMethod("mix",function(t,n){t=e(t).rgb(),n=1-(isNaN(n)?.5:n);var i=n*2-1,o=this._alpha-t._alpha,s=((i*o===-1?i:(i+o)/(1+i*o))+1)/2,a=1-s,l=this.rgb();return new e.RGB(l._red*s+t._red*a,l._green*s+t._green*a,l._blue*s+t._blue*a,l._alpha*n+t._alpha*(1-n))})}),Qf}var Yf,C2;function SR(){return C2||(C2=1,Yf=function(e){e.installMethod("negate",function(){var t=this.rgb();return new e.RGB(1-t._red,1-t._green,1-t._blue,this._alpha)})}),Yf}var Zf,T2;function ER(){return T2||(T2=1,Zf=function(e){e.installMethod("opaquer",function(t){return this.alpha(isNaN(t)?.1:t,!0)})}),Zf}var Xf,A2;function CR(){return A2||(A2=1,Xf=function(e){e.use(Xo()),e.installMethod("rotate",function(t){return this.hue((t||0)/360,!0)})}),Xf}var Jf,M2;function TR(){return M2||(M2=1,Jf=function(e){e.use(Xo()),e.installMethod("saturate",function(t){return this.saturation(isNaN(t)?.1:t,!0)})}),Jf}var ep,N2;function AR(){return N2||(N2=1,ep=function(e){e.installMethod("toAlpha",function(t){var n=this.rgb(),i=t(t).rgb(),o=1e-10,s=new t.RGB(0,0,0,n._alpha),a=["_red","_green","_blue"];return a.forEach(function(l){n[l]<o?s[l]=n[l]:n[l]>i[l]?s[l]=(n[l]-i[l])/(1-i[l]):n[l]>i[l]?s[l]=(i[l]-n[l])/i[l]:s[l]=0}),s._red>s._green?s._red>s._blue?n._alpha=s._red:n._alpha=s._blue:s._green>s._blue?n._alpha=s._green:n._alpha=s._blue,n._alpha<o||(a.forEach(function(l){n[l]=(n[l]-i[l])/n._alpha+i[l]}),n._alpha*=s._alpha),n})}),ep}var tp,D2;function MR(){return D2||(D2=1,tp=hR().use(a2()).use(fR()).use(u2()).use(Xo()).use(pR()).use(mR()).use(gR()).use(bR()).use(_R()).use(yR()).use(vR()).use(x2()).use(wR()).use(xR()).use(g2()).use(kR()).use(SR()).use(ER()).use(CR()).use(TR()).use(AR())),tp}var NR=MR();const Bc=Nn(NR);var Pc={exports:{}},DR=Pc.exports,R2;function RR(){return R2||(R2=1,function(r,e){(function(n,i){r.exports=i()})(typeof self<"u"?self:DR,function(){return function(){var t={};(function(){t.d=function(M,d){for(var f in d)t.o(d,f)&&!t.o(M,f)&&Object.defineProperty(M,f,{enumerable:!0,get:d[f]})}})(),function(){t.o=function(M,d){return Object.prototype.hasOwnProperty.call(M,d)}}();var n={};t.d(n,{default:function(){return JF}});var i=function M(d,f){this.position=void 0;var m="KaTeX parse error: "+d,_,x=f&&f.loc;if(x&&x.start<=x.end){var T=x.lexer.input;_=x.start;var I=x.end;_===T.length?m+=" at end of input: ":m+=" at position "+(_+1)+": ";var B=T.slice(_,I).replace(/[^]/g,"$&̲"),z;_>15?z="…"+T.slice(_-15,_):z=T.slice(0,_);var G;I+15<T.length?G=T.slice(I,I+15)+"…":G=T.slice(I),m+=z+B+G}var te=new Error(m);return te.name="ParseError",te.__proto__=M.prototype,te.position=_,te};i.prototype.__proto__=Error.prototype;var o=i,s=function(d,f){return d.indexOf(f)!==-1},a=function(d,f){return d===void 0?f:d},l=/([A-Z])/g,c=function(d){return d.replace(l,"-$1").toLowerCase()},u={"&":"&",">":">","<":"<",'"':""","'":"'"},h=/[&><"']/g;function g(M){return String(M).replace(h,function(d){return u[d]})}var b=function M(d){return d.type==="ordgroup"||d.type==="color"?d.body.length===1?M(d.body[0]):d:d.type==="font"?M(d.body):d},p=function(d){var f=b(d);return f.type==="mathord"||f.type==="textord"||f.type==="atom"},v=function(d){if(!d)throw new Error("Expected non-null, but got "+String(d));return d},w=function(d){var f=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(d);return f!=null?f[1]:"_relative"},S={contains:s,deflt:a,escape:g,hyphenate:c,getBaseElem:b,isCharacterBox:p,protocolFromUrl:w},C=function(){function M(f){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,f=f||{},this.displayMode=S.deflt(f.displayMode,!1),this.output=S.deflt(f.output,"htmlAndMathml"),this.leqno=S.deflt(f.leqno,!1),this.fleqn=S.deflt(f.fleqn,!1),this.throwOnError=S.deflt(f.throwOnError,!0),this.errorColor=S.deflt(f.errorColor,"#cc0000"),this.macros=f.macros||{},this.minRuleThickness=Math.max(0,S.deflt(f.minRuleThickness,0)),this.colorIsTextColor=S.deflt(f.colorIsTextColor,!1),this.strict=S.deflt(f.strict,"warn"),this.trust=S.deflt(f.trust,!1),this.maxSize=Math.max(0,S.deflt(f.maxSize,1/0)),this.maxExpand=Math.max(0,S.deflt(f.maxExpand,1e3)),this.globalGroup=S.deflt(f.globalGroup,!1)}var d=M.prototype;return d.reportNonstrict=function(m,_,x){var T=this.strict;if(typeof T=="function"&&(T=T(m,_,x)),!(!T||T==="ignore")){if(T===!0||T==="error")throw new o("LaTeX-incompatible input and strict mode is set to 'error': "+(_+" ["+m+"]"),x);T==="warn"?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(_+" ["+m+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+T+"': "+_+" ["+m+"]"))}},d.useStrictBehavior=function(m,_,x){var T=this.strict;if(typeof T=="function")try{T=T(m,_,x)}catch{T="error"}return!T||T==="ignore"?!1:T===!0||T==="error"?!0:T==="warn"?(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(_+" ["+m+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+T+"': "+_+" ["+m+"]")),!1)},d.isTrusted=function(m){m.url&&!m.protocol&&(m.protocol=S.protocolFromUrl(m.url));var _=typeof this.trust=="function"?this.trust(m):this.trust;return!!_},M}(),E=function(){function M(f,m,_){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=f,this.size=m,this.cramped=_}var d=M.prototype;return d.sup=function(){return X[oe[this.id]]},d.sub=function(){return X[K[this.id]]},d.fracNum=function(){return X[ee[this.id]]},d.fracDen=function(){return X[$[this.id]]},d.cramp=function(){return X[Q[this.id]]},d.text=function(){return X[ie[this.id]]},d.isTight=function(){return this.size>=2},M}(),A=0,R=1,O=2,H=3,q=4,U=5,F=6,Y=7,X=[new E(A,0,!1),new E(R,0,!0),new E(O,1,!1),new E(H,1,!0),new E(q,2,!1),new E(U,2,!0),new E(F,3,!1),new E(Y,3,!0)],oe=[q,U,q,U,F,Y,F,Y],K=[U,U,U,U,Y,Y,Y,Y],ee=[O,H,q,U,F,Y,F,Y],$=[H,H,U,U,Y,Y,Y,Y],Q=[R,R,H,H,U,U,Y,Y],ie=[A,R,O,H,O,H,O,H],Z={DISPLAY:X[A],TEXT:X[O],SCRIPT:X[q],SCRIPTSCRIPT:X[F]},J=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function ue(M){for(var d=0;d<J.length;d++)for(var f=J[d],m=0;m<f.blocks.length;m++){var _=f.blocks[m];if(M>=_[0]&&M<=_[1])return f.name}return null}var fe=[];J.forEach(function(M){return M.blocks.forEach(function(d){return fe.push.apply(fe,d)})});function ke(M){for(var d=0;d<fe.length;d+=2)if(M>=fe[d]&&M<=fe[d+1])return!0;return!1}var Te=80,Ke=function(d,f){return"M95,"+(622+d+f)+`
|
|
178
178
|
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
|
|
179
179
|
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
|
|
180
180
|
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
|