!function(e){const t=e["zh-cn"]=e["zh-cn"]||{};t.dictionary=Object.assign(t.dictionary||{},{"(may require Fn)":"(可能需要用到 Fn键)","%0 of %1":"第 %0 步,共 %1 步",Accept:"接受",Accessibility:"可访问性","Accessibility help":"无障碍辅助功能帮助","Align cell text to the bottom":"使单元格文本对齐到底部","Align cell text to the center":"使单元格文本水平居中","Align cell text to the left":"使单元格文本左对齐","Align cell text to the middle":"使单元格文本垂直居中","Align cell text to the right":"使单元格文本右对齐","Align cell text to the top":"使单元格文本对齐到顶部","Align center":"居中对齐","Align left":"左对齐","Align right":"右对齐","Align table to the left":"使表格左对齐","Align table to the right":"使表格右对齐",Alignment:"对齐",Aquamarine:"海蓝色",Background:"背景","Below, you can find a list of keyboard shortcuts that can be used in the editor.":"您可以在下方找到可在编辑器中使用的键盘快捷键列表。",Big:"大",Black:"黑色","Block quote":"块引用",Blue:"蓝色",Bold:"加粗","Bold text":"加粗字体",Border:"边框","Break text":"文字断行","Bulleted List":"项目符号列表","Bulleted list styles toolbar":"项目符号列表样式工具条",Cancel:"取消","Caption for image: %0":"图片说明:%0","Caption for the image":"图片说明:","Cell properties":"单元格属性","Center table":"表格居中","Centered image":"图片居中","Change image text alternative":"更改图片替换文本","Choose heading":"标题类型",Circle:"空心圆点",Clear:"清除","Click to edit block":"单击以编辑块",Close:"关闭","Close contextual balloons, dropdowns, and dialogs":"关闭上下文气泡框、下拉菜单和对话框",Code:"代码",Color:"颜色","Color picker":"颜色选择器",Column:"列","Content editing keystrokes":"内容编辑按键","Copy selected content":"复制选定的内容","Create link":"创建链接",Dashed:"虚线",Decimal:"阿拉伯数字","Decimal with leading zero":"前导零阿拉伯数字","Decrease indent":"减少缩进","Decrease list item indent":"减少列表项的缩进",Default:"默认","Delete column":"删除本列","Delete row":"删除本行","Dim grey":"暗灰色",Dimensions:"尺寸",Disc:"实心圆点","Document colors":"文档中的颜色",Dotted:"点状虚线",Double:"双线",Downloadable:"可下载","Drag to move":"拖拽以移动","Dropdown toolbar":"下拉工具栏","Edit block":"编辑框","Edit link":"修改链接","Editor block content toolbar":"编辑器块内容工具栏","Editor contextual toolbar":"编辑器上下文工具栏","Editor dialog":"编辑器对话框","Editor editing area: %0":"编辑器编辑区域:%0","Editor menu bar":"编辑器菜单栏","Editor toolbar":"编辑器工具栏","Enter image caption":"输入图片标题","Enter table caption":"输入表标题","Execute the currently focused button. Executing buttons that interact with the editor content moves the focus back to the content.":"执行当前聚焦的按钮。执行与编辑器内容交互的按钮将焦点返回到内容。","Font Background Color":"字体背景色","Font Color":"字体颜色","Font Family":"字体","Font Size":"字体大小","Full size image":"全尺寸图片",Green:"绿色",Grey:"灰色",Groove:"凹槽边框","Header column":"标题列","Header row":"标题行",Heading:"标题","Heading 1":"标题 1","Heading 2":"标题 2","Heading 3":"标题 3","Heading 4":"标题 4","Heading 5":"标题 5","Heading 6":"标题 6",Height:"高度","Help Contents. To close this dialog press ESC.":"帮助内容。要关闭此对话框,请按 ESC 键。",HEX:"十六进制","Horizontal line":"水平线","Horizontal text alignment toolbar":"水平文本对齐工具栏","HTML object":"HTML对象",Huge:"极大","Image from computer":"从计算机中选择图片","Image resize list":"图片大小列表","Image toolbar":"图片工具栏","image widget":"图片组件","In line":"行内","Increase indent":"增加缩进","Increase list item indent":"增加列表项的缩进",Insert:"插入","Insert a hard break (a new paragraph)":"插入硬换行(新段落)","Insert a new paragraph directly after a widget":"直接在小组件之后插入新段落","Insert a new paragraph directly before a widget":"直接在小组件之前插入新段落","Insert a new table row (when in the last cell of a table)":"插入新的表格行(当位于表格的最后一个单元格时)","Insert a soft break (a <br>
element)":"插入软换行(一个<br>
元素)","Insert column left":"左侧插入列","Insert column right":"右侧插入列","Insert image":"插入图像","Insert image via URL":"通过URL地址插入图片","Insert paragraph after block":"在后面插入段落","Insert paragraph before block":"在前面插入段落","Insert row above":"在上面插入一行","Insert row below":"在下面插入一行","Insert table":"插入表格",Inset:"凹边框","Invalid start index value.":"无效的起始索引值。",Italic:"倾斜","Italic text":"斜体文本",Justify:"两端对齐","Justify cell text":"对齐单元格文本","Keystrokes that can be used in a list":"可在列表中使用的按键","Keystrokes that can be used in a table cell":"可在表格单元格中使用的按键","Keystrokes that can be used when a widget is selected (for example: image, table, etc.)":"当小组件被选中时(例如:图片、表格等)可以使用的按键","Left aligned image":"图片左侧对齐","Light blue":"浅蓝色","Light green":"浅绿色","Light grey":"浅灰色",Link:"超链接","Link image":"链接图片","Link URL":"链接网址","List properties":"列表属性","Lower-latin":"小写拉丁字母","Lower–roman":"小写罗马数字",MENU_BAR_MENU_EDIT:"编辑",MENU_BAR_MENU_FILE:"文件",MENU_BAR_MENU_FONT:"字体",MENU_BAR_MENU_FORMAT:"格式",MENU_BAR_MENU_HELP:"帮助",MENU_BAR_MENU_INSERT:"插入",MENU_BAR_MENU_TEXT:"文本",MENU_BAR_MENU_TOOLS:"工具",MENU_BAR_MENU_VIEW:"查看","Merge cell down":"向下合并单元格","Merge cell left":"向左合并单元格","Merge cell right":"向右合并单元格","Merge cell up":"向上合并单元格","Merge cells":"合并单元格","Move focus between form fields (inputs, buttons, etc.)":"在表单字段(输入、按钮等)之间移动焦点","Move focus in and out of an active dialog window":"将焦点移入或移出活跃的对话框窗口","Move focus to the menu bar, navigate between menu bars":"将焦点移到菜单栏,在菜单栏之间导航","Move focus to the toolbar, navigate between toolbars":"将焦点移至工具栏,在工具栏之间导览","Move out of a link":"移出链接","Move out of an inline code style":"摆脱内联代码风格","Move the caret to allow typing directly after a widget":"移动插入符,以允许在小组件之后直接输入文字","Move the caret to allow typing directly before a widget":"移动插入符,以允许在小组件之前直接输入文字","Move the selection to the next cell":"将所选内容移动到下一个单元格","Move the selection to the previous cell":"将所选内容移至上一个单元格","Navigate through the table":"在表格中进行导览","Navigate through the toolbar or menu bar":"通过工具栏或菜单栏进行导航",Next:"下一步","No results found":"未找到结果","No searchable items":"没有可搜索的项目",None:"无","Numbered List":"项目编号列表","Numbered list styles toolbar":"项目编号列表样式工具条","Open in a new tab":"在新标签页中打开","Open link in new tab":"在新标签页中打开链接","Open the accessibility help dialog":"打开“无障碍辅助功能帮助”对话框",Orange:"橙色",Original:"原始大小",Outset:"凸边框",Padding:"内边距",Paragraph:"段落","Paste content":"粘贴内容","Paste content as plain text":"将内容粘贴为纯文本","Press %0 for help.":"按 %0 获取帮助。","Press Enter to type after or press Shift + Enter to type before the widget":"按下“Enter”键,在小组件后输入;按下“Shift+Enter”键,在小组件前输入",Previous:"上一步",Purple:"紫色",Red:"红色",Redo:"重做","Remove color":"移除颜色","Remove Format":"移除格式","Replace from computer":"从电脑替换","Replace image":"替换图片","Replace image from computer":"从电脑替换图片","Resize image":"调整图像大小","Resize image to %0":"调整图像大小为%0","Resize image to the original size":"调整图像大小为原始大小","Restore default":"恢复默认","Reversed order":"顺序反转","Revert autoformatting action":"恢复自动格式化操作","Rich Text Editor":"富文本编辑器",Ridge:"垄状边框","Right aligned image":"图片右侧对齐",Row:"行",Save:"保存","Select all":"全选","Select column":"选择列","Select row":"选择行","Show more items":"显示更多","Show source":"显示源代码","Side image":"图片侧边显示",Small:"小",Solid:"实线",Source:"源代码","Split cell horizontally":"横向拆分单元格","Split cell vertically":"纵向拆分单元格",Square:"实心方块","Start at":"起始编号","Start index must be greater than 0.":"起始编号必须大于0。",Strikethrough:"删除线","Strikethrough text":"给文本添加删除线",Style:"样式",Subscript:"下标",Superscript:"上标",Table:"表格","Table alignment toolbar":"表格对齐工具栏","Table cell text alignment":"表格单元格中的文本水平对齐","Table properties":"表格属性","Table toolbar":"表格工具栏","Text alignment":"对齐","Text alignment toolbar":"对齐工具栏","Text alternative":"替换文本",'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".':'颜色无效。尝试使用"#FF0000"、"rgb(255,0,0)"或者"red"。','The value is invalid. Try "10px" or "2em" or simply "2".':"无效值。尝试使用“10px”、“2ex”或者只写“2”。","These keyboard shortcuts allow for quick access to content editing features.":"这些键盘快捷键允许快速访问内容编辑功能。","This link has no URL":"此链接没有设置网址",Tiny:"极小","To-do List":"待办列表","Toggle caption off":"关闭表标题","Toggle caption on":"打开表标题","Toggle the circle list style":"切换空心原点列表样式","Toggle the decimal list style":"切换阿拉伯数字列表样式","Toggle the decimal with leading zero list style":"切换前导零阿拉伯数字列表样式","Toggle the disc list style":"切换实心原点列表样式","Toggle the lower–latin list style":"切换小写拉丁字母列表样式","Toggle the lower–roman list style":"切换小写罗马数字列表样式","Toggle the square list style":"切换实心方块列表样式","Toggle the upper–latin list style":"切换大写拉丁字母列表样式","Toggle the upper–roman list style":"切换大写罗马数字列表样式",Turquoise:"青色","Type or paste your content here.":"在这里输入或粘贴内容","Type your title":"输入标题",Underline:"下划线","Underline text":"给文本添加下划线",Undo:"撤销",Unlink:"取消超链接",Update:"更新","Update image URL":"更新图片URL地址","Upload failed":"上传失败","Upload from computer":"从电脑上传","Upload image from computer":"从电脑上传图片","Upload in progress":"正在上传","Upper-latin":"大写拉丁字母","Upper-roman":"大写罗马数字","Use the following keystrokes for more efficient navigation in the CKEditor 5 user interface.":"使用以下按键可以在 CKEditor 5 用户界面中进行更有效地导览。","User interface and content navigation keystrokes":"用户界面和内容导航按键","Vertical text alignment toolbar":"垂直文本对齐工具栏",White:"白色","Widget toolbar":"小部件工具栏",Width:"宽度","Wrap text":"文字环绕",Yellow:"黄色"}),t.getPluralForm=function(e){return 0}}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*! For licensing, see https://gitee.com/zoujingli/think-admin-editor */
/*!
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md.
*/
function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClassicEditor=t():e.ClassicEditor=t()}(self,(()=>(()=>{var e,t,i={659:(e,t,i)=>{const n=i(156),s={};for(const e of Object.keys(n))s[n[e]]=e;const o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};e.exports=o;for(const e of Object.keys(o)){if(!("channels"in o[e]))throw new Error("missing channels property: "+e);if(!("labels"in o[e]))throw new Error("missing channel labels property: "+e);if(o[e].labels.length!==o[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:i}=o[e];delete o[e].channels,delete o[e].labels,Object.defineProperty(o[e],"channels",{value:t}),Object.defineProperty(o[e],"labels",{value:i})}o.rgb.hsl=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.min(t,i,n),o=Math.max(t,i,n),r=o-s;let a,l;o===s?a=0:t===o?a=(i-n)/r:i===o?a=2+(n-t)/r:n===o&&(a=4+(t-i)/r),a=Math.min(60*a,360),a<0&&(a+=360);const c=(s+o)/2;return l=o===s?0:c<=.5?r/(o+s):r/(2-o-s),[a,100*l,100*c]},o.rgb.hsv=function(e){let t,i,n,s,o;const r=e[0]/255,a=e[1]/255,l=e[2]/255,c=Math.max(r,a,l),d=c-Math.min(r,a,l),h=function(e){return(c-e)/6/d+.5};return 0===d?(s=0,o=0):(o=d/c,t=h(r),i=h(a),n=h(l),r===c?s=n-i:a===c?s=1/3+t-n:l===c&&(s=2/3+i-t),s<0?s+=1:s>1&&(s-=1)),[360*s,100*o,100*c]},o.rgb.hwb=function(e){const t=e[0],i=e[1];let n=e[2];const s=o.rgb.hsl(e)[0],r=1/255*Math.min(t,Math.min(i,n));return n=1-1/255*Math.max(t,Math.max(i,n)),[s,100*r,100*n]},o.rgb.cmyk=function(e){const t=e[0]/255,i=e[1]/255,n=e[2]/255,s=Math.min(1-t,1-i,1-n);return[100*((1-t-s)/(1-s)||0),100*((1-i-s)/(1-s)||0),100*((1-n-s)/(1-s)||0),100*s]},o.rgb.keyword=function(e){const t=s[e];if(t)return t;let i,o=1/0;for(const t of Object.keys(n)){const s=n[t],l=(a=s,((r=e)[0]-a[0])**2+(r[1]-a[1])**2+(r[2]-a[2])**2);l1===e?0:1),c=a[r];if("string"==typeof c)return c;return c[Number(l(i))]}Mn.window.CKEDITOR_TRANSLATIONS||(Mn.window.CKEDITOR_TRANSLATIONS={});const Us=["ar","ara","dv","div","fa","per","fas","he","heb","ku","kur","ug","uig"];function qs(e){return Us.includes(e)?"rtl":"ltr"}class Gs{constructor({uiLanguage:e="en",contentLanguage:t,translations:i}={}){this.uiLanguage=e,this.contentLanguage=t||this.uiLanguage,this.uiLanguageDirection=qs(this.uiLanguage),this.contentLanguageDirection=qs(this.contentLanguage),this.translations=function(e){return Array.isArray(e)?e.reduce(((e,t)=>Ws(e,t))):e}(i),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=Cs(t),"string"==typeof e&&(e={string:e});const i=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,i)=>it===e));return Array.isArray(t)}set(e,t){if(L(e))for(const[t,i]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,i,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=or(e);Xo(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this.getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!L(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this.getStylesEntries().map((([e])=>e))}clear(){this._styles={}}getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const i of t)e.push(...this._styleProcessor.getReducedForm(i,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const i=t.splice(0,t.length-1).join("."),n=er(this._styles,i);if(!n)return;!Object.keys(n).length&&this.remove(i)}}class sr{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,i){if(L(t))rr(i,or(e),t);else if(this._normalizers.has(e)){const n=this._normalizers.get(e),{path:s,value:o}=n(t);rr(i,s,o)}else rr(i,e,t)}getNormalized(e,t){if(!e)return Ws({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const i=this._extractors.get(e);if("string"==typeof i)return er(t,i);const n=i(e,t);if(n)return n}return er(t,or(e))}getReducedForm(e,t){const i=this.getNormalized(e,t);if(void 0===i)return[];if(this._reducers.has(e)){return this._reducers.get(e)(i)}return[[e,i]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const i=this.getNormalized(t,e);return i&&"object"==typeof i?Object.keys(i).length:i})),i=new Set([...t,...Object.keys(e)]);return Array.from(i)}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const i of t)this._mapStyleNames(i,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function or(e){return e.replace("-",".")}function rr(e,t,i){let n=i;L(i)&&(n=Ws({},er(e,t),i)),ir(e,t,n)}class ar extends Ao{constructor(e,t,i,n){if(super(e),this._unsafeAttributesToRender=[],this._customProperties=new Map,this.name=t,this._attrs=function(e){const t=Ys(e);for(const[e,i]of t)null===i?t.delete(e):"string"!=typeof i&&t.set(e,String(i));return t}(i),this._children=[],n&&this._insertChild(0,n),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");lr(this._classes,e),this._attrs.delete("class")}this._styles=new nr(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style"))}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof ar))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,i]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==i)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new To(...e);let i=this.parent;for(;i&&!i.is("documentFragment");){if(t.match(i))return i;i=i.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),i=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==i?"":` ${i}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const i of this.getChildren())t.push(i._clone(e));const i=new this.constructor(this.document,this.name,this._attrs,t);return i._classes=new Set(this._classes),i._styles.set(this._styles.getNormalized()),i._customProperties=new Map(this._customProperties),i.getFillerOffset=this.getFillerOffset,i._unsafeAttributesToRender=this._unsafeAttributesToRender,i}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let i=0;const n=function(e,t){if("string"==typeof t)return[new xo(e,t)];ie(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new xo(e,t):t instanceof Eo?new xo(e,t.data):t))}(this.document,t);for(const t of n)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,i++;return i}_removeChildren(e,t=1){this._fireChange("children",this);for(let i=e;is?(e.nodesToHandle=n-s,e.offset=s):e.nodesToHandle=0);if("remove"==i.type&&e.offset<br>
element)"),keystroke:"Shift+Enter"}]})}}class tw extends ro{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.model,i=t.schema,n=t.document.selection,s=Array.from(n.getSelectedBlocks()),o=void 0===e.forceValue?!this.value:e.forceValue;t.change((e=>{if(o){const t=s.filter((e=>iw(e)||sw(i,e)));this._applyQuote(e,t)}else this._removeQuote(e,s.filter(iw))}))}_getValue(){const e=Zs(this.editor.model.document.selection.getSelectedBlocks());return!(!e||!iw(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.model.document.selection,t=this.editor.model.schema,i=Zs(e.getSelectedBlocks());return!!i&&sw(t,i)}_removeQuote(e,t){nw(e,t).reverse().forEach((t=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const i=e.createPositionBefore(t.start.parent);return void e.move(t,i)}t.end.isAtEnd||e.split(t.end);const i=e.createPositionAfter(t.end.parent);e.move(t,i)}))}_applyQuote(e,t){const i=[];nw(e,t).reverse().forEach((t=>{let n=iw(t.start);n||(n=e.createElement("blockQuote"),e.wrap(t,n)),i.push(n)})),i.reverse().reduce(((t,i)=>t.nextSibling==i?(e.merge(e.createPositionAfter(t)),t):i))}}function iw(e){return"blockQuote"==e.parent.name?e.parent:null}function nw(e,t){let i,n=0;const s=[];for(;n
").replace(/\r?\n/g,"
").replace(/\t/g," ").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ")).includes("
")||o.includes("
"))&&(o=`
${o}
`),e=o),s=this.editor.data.htmlProcessor.toView(e)}var o;const r=new f(this,"inputTransformation");this.fire(r,{content:s,dataTransfer:n,targetRanges:t.targetRanges,method:t.method}),r.stop.called&&e.stop(),i.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,i)=>{if(i.content.isEmpty)return;const n=this.editor.data.toModel(i.content,"$clipboardHolder");0!=n.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:n,method:i.method,dataTransfer:i.dataTransfer,targetRanges:i.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,t)=>{t.resultRange=s._pasteFragmentWithMarkers(t.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,i=e.editing.view.document,n=(e,i)=>{const n=i.dataTransfer;i.preventDefault(),this._fireOutputTransformationEvent(n,t.selection,e.name)};this.listenTo(i,"copy",n,{priority:"low"}),this.listenTo(i,"cut",((t,i)=>{e.model.canEditAt(e.model.document.selection)?n(t,i):i.preventDefault()}),{priority:"low"}),this.listenTo(this,"outputTransformation",((t,n)=>{const s=e.data.toView(n.content);i.fire("clipboardOutput",{dataTransfer:n.dataTransfer,content:s,method:n.method})}),{priority:"low"}),this.listenTo(i,"clipboardOutput",((i,n)=>{n.content.isEmpty||(n.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(n.content)),n.dataTransfer.setData("text/plain",dw(n.content))),"cut"==n.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}class Pw extends(V()){constructor(){super(...arguments),this._stack=[]}add(e,t){const i=this._stack,n=i[0];this._insertDescriptor(e);const s=i[0];n===s||Iw(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:t})}remove(e,t){const i=this._stack,n=i[0];this._removeDescriptor(e);const s=i[0];n===s||Iw(n,s)||this.fire("change:top",{oldDescriptor:n,newDescriptor:s,writer:t})}_insertDescriptor(e){const t=this._stack,i=t.findIndex((t=>t.id===e.id));if(Iw(e,t[i]))return;i>-1&&t.splice(i,1);let n=0;for(;t[n]&&Vw(t[n],e);)n++;t.splice(n,0,e)}_removeDescriptor(e){const t=this._stack,i=t.findIndex((t=>t.id===e));i>-1&&t.splice(i,1)}}function Iw(e,t){return e&&t&&e.priority==t.priority&&Rw(e.classes)==Rw(t.classes)}function Vw(e,t){return e.priority>t.priority||!(e.priority