@ones-editor/editor 1.1.34 → 1.1.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -666,7 +666,7 @@ ${s}
666
666
  Click to open the menu`,insertTips:"Click to add block"}}},Qj={blockMenu:{section:{basics:"\u4E00\u822C",system:"\u30B7\u30B9\u30C6\u30E0",styles:"\u30B9\u30BF\u30A4\u30EB",common:"\u4E00\u822C",actions:"\u64CD\u4F5C",thirdParty:"\u5916\u90E8\u30B3\u30F3\u30C6\u30F3\u30C4"},command:{insertAbove:"\u4E0A\u306B\u633F\u5165",insertAfter:"\u4E0B\u306B\u633F\u5165",copy:"\u8907\u88FD",cut:"\u5207\u308B",delete:"\u524A\u9664"},button:{searchPlaceholder:"\u30AD\u30FC\u30EF\u30FC\u30C9\u3067\u691C\u7D22",tips:`\u30DE\u30A6\u30B9\u306E\u30DC\u30BF\u30F3\u3092\u62BC\u3057\u306A\u304C\u3089\u30C9\u30E9\u30C3\u30B0\u3059\u308B
667
667
  \u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30E1\u30CB\u30E5\u30FC\u3092\u8868\u793A\u3059\u308B`,insertTips:"\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30D6\u30ED\u30C3\u30AF\u3092\u8FFD\u52A0"}}};_.mergeLang({"zh-CN":Xj,"en-US":Yj,"ja-JP":Qj});const Uat="";class Jj{constructor(){m(this,"dragObject",null)}setData(t){this.dragObject=t}getData(){return this.dragObject}clearData(){this.dragObject=null}destroy(){}}function xg(n){return n.addCustom("drag-data",()=>new Jj)}function OA(n,t){if(!t)return null;const e=xg(n).getData();return!e||e.editorId!==n.id?null:e}function gw(n,t){const e=OA(n,t);return e?n.findBlockById(e.blockId):null}function Zj(n,t,e){if(!t.dataTransfer)return;const i=at(e),o=Et(i),s=dt(e),l={type:"block",editorId:n.id,containerId:o,blockId:s};xg(n).setData(l)}function tz(n,t,e,r,i){if(!t.dataTransfer)return;const s=at(e),l=Et(s),c=dt(e),d={type:"custom",customType:r,editorId:n.id,containerId:l,blockId:c,data:i};xg(n).setData(d)}function Gd(n){xg(n).clearData()}const ez=D("drop-indicator"),Wd=2;class nz{constructor(t){m(this,"indicator");m(this,"target",null);this.editor=t,this.indicator=B("div",["editor-drop-indicator"],this.editor.contentElement)}show(t,e){const r=this.getIndicatorRect(t,e),i=this.editor.rootElement.getBoundingClientRect(),o=r.top-i.top,s=r.left-i.left;this.indicator.style.top=`${o}px`,this.indicator.style.left=`${s}px`,this.indicator.style.width=`${r.width}px`,this.indicator.style.height=`${r.height}px`,this.indicator.style.display="",this.target={block:t,insertPos:e}}hide(){this.indicator.style.display="none",this.target=null}getIndicatorRect(t,e){if(typeof e!="string")return e.rect;if(e==="before"){const l=zr(t);if(!l){p(ez,pi(at(t)),"block does not in a child container");const C=t.getBoundingClientRect(),E=this.getViewRect(t);return new DOMRect(E.x,C.y,E.width,Wd)}const c=l.getBoundingClientRect(),d=t.getBoundingClientRect(),h=this.getViewRect(t);return new DOMRect(h.x,(c.bottom+d.top)/2,h.width,Wd)}const r=Gr(t);if(!r){const l=t.getBoundingClientRect(),c=this.getViewRect(t);return new DOMRect(c.x,l.bottom,c.width,Wd)}const i=t.getBoundingClientRect(),o=r.getBoundingClientRect(),s=this.getViewRect(t);return new DOMRect(s.x,(i.bottom+o.top)/2,s.width,Wd)}getViewRect(t){const e=pn(t,{horizontal:!0}),r=t.getBoundingClientRect(),i=e.getBoundingClientRect(),o=Math.max(i.x-r.x,0),s=Math.max(r.right-i.right,0);return new DOMRect(r.x+o,r.y,Math.max(r.width-o-s,0),Wd)}}const rz=D("find-drop-target");function iz(n,t){const e=Fe(n,t);if(!e)return null;if(Qs(e)&&pi(e))return e;const r=e.firstElementChild;return r&&Qs(r)&&pi(r)?r:null}function oz(n,t,e){const c=e,d=t;for(let h=0;h<2;h++){const C=d+h*50;for(let E=0;E<5;E++){const A=c+E*8,v=Fe(C,A);if(v){const U=et(v);if(U){if(!Pt(n,U))return U;const M=U.getBoundingClientRect();if(e-M.top<40||M.bottom-e<40)return U}}if(E===0)continue;const w=c-E*8,S=Fe(C,w);if(S){const U=et(S);if(U){if(!Pt(n,U))return U;const M=U.getBoundingClientRect();if(e-M.top<40||M.bottom-e<40)return U}}}}return null}function sz(n,t,e){const r=Fe(t,e);if(r){const h=et(r);if(h&&!Pt(n,h))return h}const i=new Set,o=iz(t,e);if(o){const h=o.getBoundingClientRect();e<h.top+h.height/2?i.add(Me(o)):i.add(We(o))}const s=oz(n,t,e);s&&i.add(s);const l=Array.from(i),c=h=>{for(let C=0;C<l.length;C++){const E=l[C];if(h!==E&&Ae(h,E))return!0}return!1},d=l.filter(h=>!c(h));return d.length>0?d[0]:null}function NA(n,t){if(n.readonly)return!1;const e=at(t);if(ie(e))return!0;const r=et(e);return p(rz,r,"no parent block"),n.isBlockWritable(r)?NA(n,r):!1}const lz=D("drop-target");function az(n,t){let e={};return/image/.test(t.type)?e=n.editorEmbeds.getEmbedClass("image"):/audio/.test(t.type)?e=n.editorEmbeds.getEmbedClass("audio"):/video/.test(t.type)&&(e=n.editorEmbeds.getEmbedClass("video")),p(lz,e,`unSupport file type ${t.type}`),e}async function pw(n,t,e,r){var o,s;let i=r;for(const l of t){const c=az(n,l);c.getOptions&&await((s=(o=c.getOptions(n)).handleInsertEmptyEmbed)==null?void 0:s.call(o,n,{containerId:e,blockIndex:i,data:{file:l}}))&&(i+=1)}}class cz{constructor(t){m(this,"handleDrop",(t,e,r,i)=>{if(Array.isArray(e)){const o=e;if(o.length>0){const s=Et(r);return pw(t,o,s,i),!0}}return!1});this.editor=t}}class qd{constructor(t){m(this,"indicator");m(this,"lastDropOverResult");m(this,"handlers",[]);m(this,"handleDragOver",t=>{if(!this.editor.isWritable())return;const e=o=>{var d,h,C,E;const s=OA(this.editor,o.dataTransfer),l=gw(this.editor,o.dataTransfer);if(((d=o.dataTransfer)==null?void 0:d.types.length)&&!((h=o.dataTransfer)!=null&&h.types.includes("Files")))return"none";const c=this.findTargetBlock(l,o.x,o.y);if(c&&Ae(this.editor.rootContainer,c)){const A=this.findInsertPos(l,c,o.x,o.y,(E=s!=null?s:(C=o.dataTransfer)==null?void 0:C.items)!=null?E:null);if(A)return this.indicator.show(c,A),"move"}return this.indicator.hide(),"none"},r=(o,s)=>{o.dataTransfer&&(o.dataTransfer.dropEffect=s),s==="move"&&o.preventDefault()};if(this.lastDropOverResult&&t.x===this.lastDropOverResult.x&&t.y===this.lastDropOverResult.y){const o=this.lastDropOverResult.dropEffect;r(t,o);return}const i=e(t);r(t,i),this.lastDropOverResult={x:t.x,y:t.y,dropEffect:i}});m(this,"handleDrop",t=>{var o,s;t.stopPropagation(),setTimeout(()=>{this.indicator.hide()});const e=OA(this.editor,t.dataTransfer),r=Array.from((s=(o=t.dataTransfer)==null?void 0:o.files)!=null?s:[]);if(!e&&r.length===0){t.dataTransfer&&(t.dataTransfer.dropEffect="none"),Gd(this.editor);return}const i=this.indicator.target;if(i){const{block:l,insertPos:c}=i,d=gw(this.editor,t.dataTransfer);this.editor.undoManager.runInGroup(()=>{const h=le(this.editor,l);if(h.handleDrop&&h.handleDrop(this.editor,l,e!=null?e:r,c,{isSourceBlock:!1,targetBlock:l})){t.preventDefault(),this.editor.focus(),Gd(this.editor);return}if(d){const C=le(this.editor,d);if(C.handleDrop&&C.handleDrop(this.editor,d,e!=null?e:r,c,{isSourceBlock:!0,targetBlock:l})){t.preventDefault(),this.editor.focus(),Gd(this.editor);return}}if(typeof c=="string"){const C=at(l);let E=Rt(l);if(c==="after"){E+=1;let A=ae(l);for(;A&&!Zs(A);)E+=1,A=ae(A)}t.preventDefault();for(let A=0;A<this.handlers.length;A++)if(this.handlers[A].handleDrop(this.editor,d!=null?d:r,C,E)){this.editor.focus(),Gd(this.editor);return}if(d){const A=this.editor.getBlockData(d),v=sl(this.editor.editorBlocks,this.editor.doc.toJSON(),A),[w]=this.editor.insertDocAt(C,E,v);this.editor.selection.selectBlock(w,0),zd.get(this.editor).highlightBlock(w),this.editor.deleteBlock(d),this.editor.focus()}}})}Gd(this.editor)});m(this,"handleDragLeave",()=>{this.indicator.hide()});this.editor=t,this.indicator=new nz(this.editor),this.handlers.push(new cz(this.editor)),this.editor.contentElement.addEventListener("dragover",this.handleDragOver),this.editor.contentElement.addEventListener("dragleave",this.handleDragLeave),this.editor.contentElement.addEventListener("drop",this.handleDrop)}destroy(){this.editor.contentElement.removeEventListener("dragover",this.handleDragOver),this.editor.contentElement.removeEventListener("dragleave",this.handleDragLeave),this.editor.contentElement.removeEventListener("drop",this.handleDrop),this.handlers=[]}addHandler(t){this.handlers.push(t)}static register(t){return t.addCustom("drop-target",()=>new qd(t))}static get(t){return t.getCustom("drop-target")}static find(t){return t.findCustom("drop-target")}canInsertAfter(t,e){return!(this.editor.readonly||Gr(e)===t&&t||!NA(this.editor,e))}canInsertBefore(t,e){return!(this.editor.readonly||zr(e)===t&&t||!NA(this.editor,e)||ie(at(e))&&Rt(e)===0)}canDrop(t,e){return t===null||t===e?!0:!Ae(t,e)}findTargetBlock(t,e,r){let i=sz(this.editor,e,r);if(!i||!Ae(this.editor.rootContainer,i))return null;const o=at(i),s=et(o);return s&&Ot(s)==="code"&&(i=s),this.canDrop(t,i)?i:null}findInsertPos(t,e,r,i,o){let s=e;for(;s;){const c=le(this.editor,s);if(c.handleDropOver){const d=c.handleDropOver(this.editor,s,o,r,i);if(d)return d;if(d===!1)return null}s=fa(s)}if(t===e)return"";const l=e.getBoundingClientRect();if(l.top<=i&&i<=l.bottom){if(i<l.top+l.height/2){if(this.canInsertBefore(t,e))return"before";if(this.canInsertAfter(t,e))return"after"}else{if(this.canInsertAfter(t,e))return"after";if(this.canInsertBefore(t,e))return"before"}return""}return i<l.top&&this.canInsertBefore(t,e)?"before":l.bottom<i&&this.canInsertAfter(t,e)?"after":""}}function Cw(n,t,e){const r=Xe.getImageObject(n,t),i=xt.default(r.getImages());if(i.length===1){n.deleteBlock(t);return}if(e===-1||e>=i.length)return;const o=XH(i);if(i.splice(e,1),i.length===1){const l=i[0],c=100*(l.flex/o);l.flex=1;const d=Gn([l],c);n.updateEmbedData(t,d);return}i[0].flex=NaN,Tu(i);const s=Gn(i,r.getWidthPercent());n.updateEmbedData(t,s)}function uz(n,t,e,r){if(t.length===0||r==="after"||r==="before")return!1;let i=r.data;const o=Xe.getImageObject(n,e),s=xt.default(o.getImages()),l=[],c=[];t.forEach(C=>{rw(C.type)&&s.length+l.length<6?l.push(C):c.push(C)}),l.forEach(C=>{try{nw(n,C)}catch{return}const E={src:"",flex:1,width:0,height:0,virtualSize:!0};s.splice(i,0,E);const A=Gn(s,o.getWidthPercent());n.updateEmbedData(e,A),o.replaceImage(i,C),i+=1});const d=n.getBlockIndex(e)+1,h=Et(at(e));return pw(n,c,h,d),!0}function fz(n,t,e,r,i){var s,l,c;if(Am(e))return uz(n,e,t,r);if(e.type!=="custom"||e.customType!=="image"||!e.data)return;const o=e.data;if(i.isSourceBlock){const d=i.targetBlock,h=at(d);let C=Rt(d);r==="after"&&(C+=1);const A=100*(o.boundingRect.width/n.rootContainer.getBoundingClientRect().width),v=Gn([o.image],A),w={id:it(),type:"embed",embedType:"image",embedData:v},S=(l=(s=n.options.componentsOptions)==null?void 0:s.image)==null?void 0:l.defaultAlign;S&&(w.align=S),n.insertBlock(Et(h),C,w),Cw(n,t,o.index),(c=n.findCustom("drag-handler"))==null||c.handleDragEnd()}else{if(typeof r=="string")return;const d=t;let h=r.data;const C=Xe.getImageObject(n,d),E=xt.default(C.getImages());h>E.length&&(h=E.length),n.undoManager.runInGroup(()=>{var v,w;C.setAutoFix(!0);const A=n.getBlockById(e.blockId);if(A===d){const S=o.index,U=h,M=o.image;if(S===U||U===S+1)return;let V=U;S<U?(E.splice(U,0,M),E.splice(S,1),V-=1):(E.splice(S,1),E.splice(U,0,M));const rt=Gn(E,C.getWidthPercent());n.updateEmbedData(d,rt),C.setSelectedIndex(V),(v=n.findCustom("drag-handler"))==null||v.handleDragEnd()}else{E.splice(h,0,o.image),E[0].flex=NaN,Tu(E);const S=Gn(E,C.getWidthPercent());n.updateEmbedData(d,S),Cw(n,A,o.index),(w=n.findCustom("drag-handler"))==null||w.handleDragEnd(),C.setSelectedIndex(h),n.selection.selectBlock(d,0)}})}return!0}const dz=2;function bg(n,t,e){const r=mo(t);if(e<=0){const s=r[0].getBoundingClientRect();return new DOMRect(s.left-4,s.top,2,s.height)}if(e===r.length){const s=r[e-1].getBoundingClientRect();return new DOMRect(s.right+2,s.top,2,s.height)}const i=r[e-1].getBoundingClientRect(),o=r[e].getBoundingClientRect();return new DOMRect((o.left+i.right)/2-1,i.top,dz,i.height)}function hz(n,t,e,r,i){for(let o=0;o<e.length;o++){const l=e[o].getBoundingClientRect();if(r<=l.right)return r<=l.left+l.width/2?{rect:bg(n,t,o),data:o}:{rect:bg(n,t,o+1),data:o+1}}return r>e[e.length-1].getBoundingClientRect().right?{rect:bg(n,t,e.length),data:e.length}:{rect:bg(n,t,e.length),data:0}}function mz(n,t,e,r,i){const o=mo(t);if(e instanceof DataTransferItemList){if(!Array.from(e).some(s=>rw(s.type))||o.length>=6)return}else{if((e==null?void 0:e.type)==="block"||o.length>=6&&(e==null?void 0:e.blockId)!==dt(t))return;const s=dt(t);if(o.length===1&&s===(e==null?void 0:e.blockId))return}return hz(n,t,o,r)}async function gz(n){return await Ib.default.toSvg(n)}function PA(n,t){return new DragEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,dataTransfer:new DataTransfer,clientX:n.clientX,clientY:n.clientY})}class pz{constructor(t){m(this,"img");m(this,"dragContainer",null);m(this,"autoScroll",null);m(this,"imageContainer",null);m(this,"startPosition",null);m(this,"handleMouseDown",t=>{const e=t.target;if(!e||!(e instanceof HTMLImageElement)||t.button!==0)return;const r=et(e);if(!r||!_i(r)||!this.editor.isBlockWritable(r)||this.editor.readonly)return;const i=Xe.getImageObject(this.editor,r);if(this.imageContainer=kA(t.target),!this.imageContainer)return;const s=QR(t.target).indexOf(this.imageContainer);if(s===-1)return;const l=i.getImages()[s];if(!l)return;const{x:c,y:d}=t;this.startPosition={x:c,y:d};const h={image:l,index:s,boundingRect:this.imageContainer.getBoundingClientRect()},C=PA(t,"dragstart");tz(this.editor,C,r,"image",h),document.addEventListener("mouseup",this.handleDragEnd),this.editor.contentElement.addEventListener("mousemove",this.handleDrag),t.preventDefault()});m(this,"handleDragStart",async t=>{if(!this.imageContainer)return;const e=et(this.imageContainer);if(!e)return;const{x:r,y:i}=t,{width:o,height:s}=t.target.getBoundingClientRect(),l=ve(e),c=B("div",["drag-container"],l);c.style.left=`${r-o/4}px`,c.style.top=`${i-s/4}px`,c.style.width=`${Math.max(o/2,16)}px`,c.style.height=`${s/2}px`,this.dragContainer=c,q(this.editor.contentElement,"dragging");const d=pn(e);this.autoScroll=new bm({scrollElement:d,trackMouseEvent:"mousemove",edge:{top:50,bottom:50}}),this.autoScroll.active();const h=B("img",["drag-target"],c),E=await gz(this.imageContainer);E&&(h.src=E)});m(this,"handleDrag",t=>{var o;const{x:e,y:r}=t;if(((o=this.startPosition)==null?void 0:o.x)===e&&this.startPosition.y===r)return;if(window.isDragging||(window.isDragging=!0,this.handleDragStart(t)),this.startPosition&&this.dragContainer){const{x:s,y:l}=t;if(s===0&&l===0){this.dragContainer.style.transform="",this.dragContainer.style.opacity="0";return}const{x:c,y:d}=this.startPosition,h=s-c,C=l-d;this.dragContainer.style.transform=`translate(${h}px, ${C}px)`,this.dragContainer.style.opacity="0.5"}const i=PA(t,"dragover");this.editor.contentElement.dispatchEvent(i)});m(this,"handleDragEnd",t=>{var e;if(window.isDragging=!1,this.dragContainer&&this.dragContainer.remove(),this.dragContainer=null,this.startPosition=null,this.imageContainer=null,(e=this.autoScroll)==null||e.inactive(),ut(this.editor.contentElement,"dragging"),document.removeEventListener("mouseup",this.handleDragEnd),this.editor.contentElement.removeEventListener("mousemove",this.handleDrag),t){const r=PA(t,"drop");this.editor.contentElement.dispatchEvent(r)}});this.editor=t,this.editor.rootContainer.addEventListener("mousedown",this.handleMouseDown),this.img=new Image,this.img.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"}destroy(){this.editor.rootContainer.removeEventListener("mousedown",this.handleMouseDown)}}class Cz{constructor(t){m(this,"handleFocusBlockChanged",(t,e,r)=>{const o=this.editor.getFocusedBlock();if(o&&_i(o)){const s=Xe.getImageObject(this.editor,o);s.getImages().length>0&&s.getSelectedIndex()===-1&&s.setSelectedIndex(0)}r&&_i(r)&&t.findCustom(`image-${r.id}`)&&Xe.getImageObject(this.editor,r).blockResizer.disableResize()});this.editor=t,this.editor.addListener("focusBlockChanged",this.handleFocusBlockChanged)}destroy(){this.editor.removeListener("focusBlockChanged",this.handleFocusBlockChanged)}}class Ez{constructor(t){m(this,"currentResizer",null);m(this,"handleHoveringBlockChange",(t,e)=>{window.isDragging||(e&&this.disable(e),t&&(this.currentResizer=t,this.enable(t)))});this.editor=t,je.get(t).addListener("change",this.handleHoveringBlockChange)}destroy(){je.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}disable(t){_i(t)&&Xe.getImageObject(this.editor,t).disableResizer()}enable(t){if(_i(t)){const e=Xe.getImageObject(this.editor,t);this.editor.isBlockWritable(t)&&e.tryEnableResizer()}}}const Az={image:{title:"\u56FE\u7247",upload:{failed:'<div class="line-1">\u56FE\u7247\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <a href="" class="retry-upload">\u91CD\u8BD5</a></div>'},load:{failed:'<div class="line-1">\u56FE\u7247\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <a href="" class="retry-upload">\u91CD\u8BD5</a></div>',remote:{failed:'<div class="line-1">\u56FE\u7247\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u8BE5\u56FE\u7247\u6765\u81EA\u5916\u90E8\u94FE\u63A5\uFF0C\u5916\u90E8\u94FE\u63A5\u5DF2\u5931\u6548</div><div class="line-3">\u8BF7\u5C06\u539F\u56FE\u4FDD\u5B58\u5230\u672C\u5730\u540E\u4E0A\u4F20\uFF0C <a href="" class="retry-upload">\u6253\u5F00\u56FE\u7247\u94FE\u63A5</a></div>',tooltip:"\u8BE5\u56FE\u7247\u6765\u81EA\u5916\u90E8\u94FE\u63A5\uFF0C\u5982\u679C\u94FE\u63A5\u5931\u6548\u56FE\u7247\u5C06\u65E0\u6CD5\u67E5\u770B\uFF0C\u5EFA\u8BAE\u4FDD\u5B58\u5230\u672C\u5730\u540E\u6DFB\u52A0\u5230\u9875\u9762\u4E2D"}},abstract:"\u56FE\u7247"}},xz={image:{title:"Image",upload:{failed:'<div class="line-1">Image upload failed</div><div class="line-2">Network error, you can <a href="" class="retry-upload">Retry</a></div>'},load:{failed:'<div class="line-1">Image failed to load</div><div class="line-2">Network error, you can <a href="" class="retry-upload">Retry</a></div>',remote:{failed:'<div class="line-1">Failed to load image</div><div class="line-2">This picture is from an expired external link</div><div class="line-3">Please save the original image to local drives and upload it. <a href="" class="retry-upload">Open image link</a></div>',tooltip:"This picture is from an external link. If the link expires, the picture will not be available. It's recommended to save it to local drives and add it to the page."}},abstract:"Image"}},bz={image:{title:"\u753B\u50CF",upload:{failed:'<div class="line-1">\u753B\u50CF\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <a href="" class="retry-upload">\u518D\u8A66\u884C</a></div>'},load:{failed:'<div class="line-1">\u753B\u50CF\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <a href="" class="retry-upload">\u518D\u8A66\u884C</a></div>',remote:{failed:'<div class="line-1">\u753B\u50CF\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u3053\u306E\u753B\u50CF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u3044\u308B URL \u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u306E\u3067\u3001\u8868\u793A\u3067\u304D\u307E\u305B\u3093</div><div class="line-3">\u753B\u50CF\u3092\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u3066\u30A2\u30C3\u30D7\u30ED\u30FC\u30C0\u3057\u3066\u304F\u3060\u3055\u3044 <a href="" class="retry-upload">\u753B\u50CF\u30EA\u30F3\u30AF\u3092\u958B\u304F</a></div>',tooltip:"\u3053\u306E\u753B\u50CF\u306F\u5916\u90E8\u306B\u30EA\u30F3\u30AF\u3057\u3066\u3044\u308B\u305F\u3081\u3001\u30EA\u30F3\u30AF\u304C\u7121\u52B9\u306B\u306A\u308B\u3068\u3001\u8868\u793A\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3059\u306E\u3067\u3001\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u3001\u30DA\u30FC\u30B8\u306B\u633F\u5165\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059"}},abstract:"\u753B\u50CF"}};_.mergeLang({"zh-CN":Az,"en-US":xz,"ja-JP":bz});function vz(n,t,e,r){const i=n.getBlockByIndex(t,e),o=n.getBlockText(i),{left:s}=ar(o,r),l=Re(s);let c=r;if(l.endsWith("![]()"))c-=5;else if(l.endsWith("![]"))c-=3;else return!1;const d=r;return Uc("image/*").then(h=>{!h||n.undoManager.runInGroup(()=>{n.deleteTextFromBlock(i,c,d-c);let C=e+1;Re(n.getBlockText(i)).trim()?(Xc(n,i,c,{forceInsertAfter:!0}),c===0&&(n.deleteBlock(i),C--)):(n.deleteBlock(i),C--),h1(n,"image",t,C,{file:h})})}),!0}class Bz{handleAfterInsertText(t,e,r,i,o){if(o===" "){if(hg(t,e))return!1;if(vz(t,e,r,i))return!0}return!1}}const yz=D("copy-image");function Tz(n,t,e,r){const i=e.getImages()[r],o=e.getImages().length===1?e.getWidthPercent():i.flex*100,s=Gn([i],o),l={id:it(),type:"embed",embedType:"image",embedData:s},c=n.options.componentsOptions.image;c!=null&&c.defaultAlign&&(l.align=c.defaultAlign);const d={blocks:{root:[l]},comments:{},meta:{}},h=document.createElement("canvas");h.width=t.naturalWidth,h.height=t.naturalHeight;const C=h.getContext("2d");if(!C)return;const E={},A={};try{C.drawImage(t,0,0,h.width,h.height);const V=h.toDataURL("image/png").replace(/^data:image\/(png|jpg);base64,/,""),rt=Hp(V),Y=new File([rt],`${Date.now()}.png`,{type:"image/png"});E["image/png"]=Y}catch(M){yz.error(M)}Jf(n,d);const w=`<img src="${n.doc.buildResourceUrl(i.src,{withToken:!0})}" />`,S=Qf(w,d),U=new Blob([S],{type:"text/html"});return E["text/html"]=U,A["text/html"]=S,[E,A]}function kz(n,t,e,r,i){const o=Tz(n,t,e,r);if(!o)return;const[s,l]=o;if(s){const c=Object.entries(s).map(([d,h])=>({type:d,data:h}));return Tf(c).then(d=>{if(!d&&i){const h=i.clipboardData;h&&(h.setData("text/plain",l["text/plain"]),h.setData("text/html",l["text/html"]))}}),!0}}function vg(n,t){const e=n.selection.range;if(e.start.blockId!==e.end.blockId)return;const i=n.getFocusedBlock();if(i&&_i(i)){const o=Xe.getImageObject(n,i);if(o.getImages().length>0){const l=o.getSelectedIndex();if(l!==-1){const d=mo(i)[l].querySelector("img");if(d)return kz(n,d,o,l,t)}}}}function Rz(n){const t=n.getFocusedBlock(),e=Gr(t);if(e&&_i(e)){n.selection.selectBlock(e,0);const r=Xe.getImageObject(n,e);return r.getImages().length>0&&r.setSelectedIndex(0),!0}}function wz(n){const t=n.getFocusedBlock(),e=zr(t);if(e&&_i(e)){n.selection.selectBlock(e,0);const r=Xe.getImageObject(n,e);return r.getImages().length>0&&r.setSelectedIndex(0),!0}}function Sz(n){const e=n.getFocusedBlock();if(e&&_i(e)){const r=Xe.getImageObject(n,e),i=r.getImages();if(i.length>0){const o=r.getSelectedIndex();if(o===-1)return r.setSelectedIndex(i.length-1),!0;if(o>0)return r.setSelectedIndex(o-1),!0}}}function Lz(n){const e=n.getFocusedBlock();if(e&&_i(e)){const r=Xe.getImageObject(n,e),i=r.getImages();if(i.length>0){const o=r.getSelectedIndex();if(o===-1)return r.setSelectedIndex(0),!0;if(o<i.length-1)return r.setSelectedIndex(o+1),!0}}}function Bg(n){const e=n.getFocusedBlock();if(e&&_i(e)){const r=Xe.getImageObject(n,e);if(r.getImages().length>0){const o=r.getSelectedIndex();if(o!==-1)return r.removeImage(o),!0}}}const Iz={ArrowLeft:Sz,ArrowRight:Lz,ArrowUp:wz,ArrowDown:Rz,Delete:Bg,Backspace:Bg};class Dz{constructor(t){this.editor=t,setTimeout(()=>{this.editor.input.addHandler(this)})}handleBeforeCopy(t,e,r){if(!window.isSecureContext)return;if(vg(t,e))return!0}handleBeforeCut(t,e){if(vg(t,e))return Bg(t),!0}destroy(){}}class FA{constructor(t){this.editor=t,setTimeout(()=>{this.editor.input.addHandler(this)})}async handleAfterPasteDoc(t,e,r){return Object.values(e.blocks).forEach(i=>{i.forEach(o=>{if(o.type==="embed"&&o.embedType==="image"){const s=o.embedData;if(Array.isArray(s.src))return;let l=r.blockIdMap.get(o.id);for(;l&&r.blockIdMap.get(l);)l=r.blockIdMap.get(l);l&&Tl(t,l).setAutoFix(!0)}})}),!1}destroy(){}}const _z=D("image-embed");function Mz(n,t,e,r,i,o){Xe.create(n,e).createContent(i,o,t),n.addCustom("image-select-handler",()=>new Cz(n)),n.addCustom("image-copy-handler",()=>new Dz(n)),setTimeout(()=>{n.addCustom("drag-handler",()=>new pz(n));const l=n.addCustom("image-resizer",()=>new Ez(n)),c=e.embedData;yu(c)?l.disable(o):l.currentResizer===o&&l.enable(o)})}function Uz(n,t,e,r){const i=t.embedData,o=ku(i);return r==="html"?o.map(s=>`<img src="${n.doc.buildResourceUrl(s.src,{withToken:!0})}">`).join(""):r==="markdown"?`${o.map(l=>`![img](${n.doc.buildResourceUrl(l.src,{withToken:!0})})`).join(`
668
668
  `)}
669
- `:""}class Oz{constructor(){m(this,"group","image");m(this,"commands",[])}executeCommand(t,e,r){if(r.id==="replace-image"){const{block:i,image:o}=r.data;Xe.getImageObject(t,i).replaceImage(0,o)}}}function Nz(){return{blockCommands:{image:new Oz},abstract:`${_.t("image.abstract")}`}}function Pz(){return{name:"Image",insertEmbedCommandItems:[{id:"insert-image",name:_.t("image.abstract"),icon:DT,group:"common",subText:"/image",order:100}],handleInsertEmptyEmbed:async(n,t)=>{var A;let e;(A=t.data)!=null&&A.file&&(e=t.data.file);const r=ew(n);if(e=e!=null?e:await Uc(r),!e)return null;try{nw(n,e)}catch{return null}let i={width:Nd,height:VR};try{i=await HH(e)}catch(v){_z.error(v)}const o=n.rootContainer.clientWidth,s=i.width<o?Math.min(100,i.width/o*100):100,l={src:"",width:i.width,height:i.height,flex:1,virtualSize:!1},c=Gn([l],s),d={id:it(),type:"embed",embedType:"image",embedData:c},h=n.options.componentsOptions.image;h!=null&&h.defaultAlign&&(d.align=h.defaultAlign);const C=n.insertBlock(t.containerId,t.blockIndex,d);return Xe.getImageObject(n,C).replaceImage(0,e),C}}}function Fz(n,t,e){var h;const{data:r}=e,i=n.getBlockString(t).trim();if(!r||r.embedType!=="image"||!st(n,t))return null;const o=i.match(/^!\[[^\]]*\]\((?<filename>.*?)(?="|\))(?<optionalPart>".*")?\)/),s=(h=o==null?void 0:o.groups)==null?void 0:h.filename;if(!s)return null;const l={src:s},c={id:it(),type:"embed",embedType:"image",embedData:l};Xe.create(n,c).setAutoFix(!0);const d=n.options.componentsOptions.image.defaultAlign;return d&&(c.align=d),{blockData:c}}function Kz(n,t){const e=dt(t);n.destroyCustom(`image-${e}`)}const Vz={embedType:"image",createEmbedContent:Mz,convertTo:Uz,convertFrom:Fz,getBlockProperties:Nz,getOptions:Pz,handleDrop:fz,handleDropOver:mz,handleDeleteBlock:Kz};class $z{constructor(t,e){m(this,"toolbar");m(this,"anchor",null);m(this,"item");m(this,"docs",null);m(this,"checkedId");m(this,"handlePasteSpecial",(t,e)=>{!e.data||(this.checkedId===e.id?this.checkedId=void 0:this.checkedId=e.id,this.onPasteSpecial(this.cleaningDoc(e)),setTimeout(()=>{this.docs&&this.show(this.docs),this.editor.focus()}))});m(this,"handleClose",()=>{this.editor.focus()});m(this,"handleSelectionChange",()=>{this.toolbar.isVisible&&this.handleClose()});this.editor=t,this.onPasteSpecial=e,this.item={id:"paste-special",name:"",icon:_T,dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",childrenOffset:[-4,4],children:[]},this.toolbar=new gd([this.item],void 0,{id:"paste-special-button",tooltipId:this.editor.clientId,refuseOverflow:!0}),this.toolbar.addListener("click",this.handlePasteSpecial),this.toolbar.addListener("close",this.handleClose)}show(t){this.docs=t;const e=this.editor,r=e.selection.range;if(!r.isCollapsed())return;const i=e.getBlockById(r.start.blockId);if(!st(e,i))return;const o=Vo(e,i,r)[0];if(!o)return;this.anchor&&this.anchor.remove(),this.anchor=jo(e,i,"paste-special-button-anchor",o);const s=this.getCommandItems(t);this.item.children=s,this.toolbar.manualShow(this.anchor)}cleaningDoc(t){const e=t.id,r=t.data;return e!=="text/plain"||Object.values(r.blocks).forEach(i=>{i.forEach(o=>{o.text&&o.text.forEach(s=>{if(s.attributes){const l=s.attributes;Object.keys(l).forEach(c=>{c==="link"&&delete l[c]})}})})}),r}hide(){this.toolbar.close("selectionChange")}clearCheckedState(){this.checkedId=void 0}destroy(){this.toolbar.destroy()}getCommandItems(t){const e=o=>({id:o,states:this.checkedId===o?["checked"]:void 0,name:_.t("pasteSpecial.originFormats"),data:t[o]}),r=[];let i=!0;return t["text/x-ones-editor-doc"]?r.push(e("text/x-ones-editor-doc")):t["text/office-html"]?r.push(e("text/office-html")):t["text/html"]?r.push(e("text/html")):t["text/plain"]&&(r.push(e("text/plain")),i=!1),t["text/plain"]&&(i&&r.push({id:"text/plain",states:this.checkedId==="text/plain"?["checked"]:void 0,name:_.t("pasteSpecial.plainText"),data:t["text/plain"]}),r.push({id:"text/markdown",states:this.checkedId==="text/markdown"?["checked"]:void 0,name:_.t("pasteSpecial.markdown"),data:t["text/markdown"]})),r}}const Hz=D("paste-special");class KA{constructor(t){m(this,"button");m(this,"lastUndoAction",null);m(this,"lastPos",null);m(this,"event",null);m(this,"handlePasteSpecial",t=>{this.editor.undoManager.runInGroup(()=>{this.editor.undoManager.undoTo(this.lastUndoAction),this.editor.pasteDoc(t)})});this.editor=t,this.button=new $z(t,this.handlePasteSpecial)}destroy(){this.event=null,this.button.destroy()}handleChanged(t,e){this.event=null,this.button.hide()}async handleBeforePaste(t,e){return Hz.debug("before paste"),this.lastUndoAction=t.undoManager.lastAction(),this.lastPos=t.selection.range.start,!1}async handleAfterPaste(t,e,r){if(Object.keys(r).length<=1)return!1;const i=t.selection.range;if(i.isCollapsed()){const o=t.getBlockById(i.start.blockId);if(!st(t,o))return!1;if(this.lastPos&&bi(this.lastPos)){const s=t.findBlockById(this.lastPos.blockId);if(s&&Ko(s))return!1}this.button.clearCheckedState(),this.button.show(r),this.event=e}return!1}}const jz={pasteSpecial:{originFormats:"\u4FDD\u6301\u539F\u6837\u5F0F",plainText:"\u7C98\u8D34\u7EAF\u6587\u672C",markdown:"\u7C98\u8D34\u4E3A Markdown"}},zz={pasteSpecial:{originFormats:"Keep origin formats",plainText:"Paste as plain text",markdown:"Paste as markdown"}},Gz={pasteSpecial:{originFormats:"\u5143\u306E\u30B9\u30BF\u30A4\u30EB\u3092\u7DAD\u6301\u3059\u308B",plainText:"\u30D7\u30EC\u30FC\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8CBC\u308A\u4ED8\u3051\u308B",markdown:"Markdown \u3068\u3057\u3066\u8CBC\u308A\u4ED8\u3051"}};_.mergeLang({"zh-CN":jz,"en-US":zz,"ja-JP":Gz});const Oat="",Wz=D("html-to-doc");function qz(n){const t=/(<span data-editor-doc=")[\s\S]*( id="ones-editor-doc"\s?>)/g;let e=n;ea()&&(e=n.replace(/style="(.*)"/,""));let r=e.match(t);if(!r||!r.length)return null;r=r.map(l=>l.replace(/(<span data-editor-doc=")/g,"").replace(/(" id="ones-editor-doc"\s?>)/g,""));const i=r[0],o=Bf(i);return JSON.parse(o)}function Xz(n){const t="ones-editor-doc::",e="::ones-editor-doc";let r=n.indexOf(t);if(r!==-1){r+=t.length;const o=n.indexOf(e,r);if(o!==-1){const s=n.substr(r,o-r);try{const l=Bf(s);return JSON.parse(l)}catch(l){Wz.error(`invalid doc data: ${l}, ${s}`)}}}const i=qz(n);return i||null}const Ew="latex-b172fea480b",Yz=n=>({name:"latex-block",level:"block",start(t){var e,r;return(r=(e=t.match(/\$\$[^\$]/))==null?void 0:e.index)!=null?r:-1},tokenizer(t,e){const r=/^\$\$([^\$]+)\$\$/.exec(t);return r?{type:"latex-block",raw:r[0],formula:r[1]}:void 0},renderer(t){return n.lazy?`<span class="${Ew}" block>${t.formula}</span>`:n.render(t.formula,!0)}}),Qz=n=>({name:"latex",level:"inline",start(t){var e,r;return(r=(e=t.match(/\$[^\$]/))==null?void 0:e.index)!=null?r:-1},tokenizer(t,e){const r=/^\$([^\$]+)\$/.exec(t);return r?{type:"latex",raw:r[0],formula:r[1]}:void 0},renderer(t){return n.lazy?`<span class="${Ew}">${t.formula}</span>`:n.render(t.formula,!1)}});var Jz=(n={})=>(n.lazy&&n.env!=="test"&&new IntersectionObserver((t,e)=>{for(const r of t){if(!r.isIntersecting)continue;const i=r.target;e.unobserve(i),Promise.resolve(n.render(i.innerText,i.hasAttribute("block"))).then(o=>{i.innerHTML=o}),i.classList.add("latex-rendered")}},{threshold:1}),{extensions:[Yz(n),Qz(n)]});function Ru(n){const t=n.type;if(t==="link")return!!n.tokens.some(Ru);switch(t){case"code":case"table":case"hr":case"blockquote":case"list":case"list_item":case"image":case"paragraph":return!0;default:return!1}}function Zz(n){return!Ru(n)}function tG(n){if(n.length===0)return[];if(n.length===1)return[n];const t=[];let e=[n[0]],r=Ru(n[0]);for(let i=1;i<n.length;i++){const o=n[i];r===Ru(o)?e.push(o):(t.push(e),e=[o],r=Ru(o))}return t.push(e),t}const Aw=D("token-to-text"),eG=n=>{p(Aw,n.blocks.root.length>0,"doc.blocks.root.length > 0");const t=n.blocks.root[0];return p(Aw,Array.isArray(t.text)&&t.text.length!==0,"first block text is not empty"),t.text.map(e=>e.insert).join("")},xw=n=>{var o,s;let t=n;const e=(o=t.match(/^(http|https):\/\//))==null?void 0:o[0],r=t.substring((s=e==null?void 0:e.length)!=null?s:0);if(!e)return n;const i=jA(r);return i&&(t=e+eG(i)),t};function nG(n,t,e){let r=xw(n.href);r.startsWith("mailto:")&&(r=r.substring(7));let i=e.tokensToText(n.tokens,t,e);return i.forEach(o=>{o.insert=xw(o.insert)}),i.length===0&&(i=Ea(r,t)),i=Im(i,"link",r),i}let Xd;function VA(n){Xd||(Xd=document.createElement("textarea")),Xd.innerHTML=n;const t=Xd.childNodes.length===0?"":Xd.childNodes[0].nodeValue;return t!=null?t:""}function rG(n,t){const e=VA(n.text);return[Xr(e,{...t,"style-code":!0})]}function iG(n,t,e){const i=n.tokens;return i?e.tokensToText(i,t,e):F1(VA(n.text),t)}const oG=D("token-to-text");function $A(n,t,e){return n.map(i=>i.type==="text"?iG(i,t,e):i.type==="strong"?e.tokensToText(i.tokens,{...t,"style-bold":!0},e):i.type==="em"?e.tokensToText(i.tokens,{...t,"style-italic":!0},e):i.type==="del"?e.tokensToText(i.tokens,{...t,"style-strikethrough":!0},e):i.type==="link"?nG(i,t,e):i.type==="codespan"?rG(i,t):i.type==="br"?[{insert:" ",attributes:{id:it(),created:Date.now(),box:!0,type:"br"}}]:i.type==="escape"?F1(VA(i.text),t):i.type==="latex"?[{insert:" ",attributes:{id:it(),created:Date.now(),box:!0,type:"math",tex:i.formula}}]:(oG.warn(`unknown token in text: ${JSON.stringify(i)}`),[])).flat()}function sG(n,t){const e=$A(n.tokens,{},t);return[{id:it(),type:"text",text:e,heading:n.depth}]}function lG(n,t){const{text:e,children:r}=t.tokensToTextWithChildren(n.tokens,t),i=[];return e.length>0&&i.push({id:it(),type:"text",text:e}),i.push(...r),i}function aG(n,t){const{text:e,children:r}=t.tokensToTextWithChildren([n],t),i=[];return e.length>0&&i.push({id:it(),type:"text",text:e}),i.push(...r),i}function cG(n,t){const e=typeof n.start=="number"?n.start:1,r=n.ordered,i=it(),o=[];return n.items.forEach((l,c)=>{const d={...t,listLevel:t.listLevel+1},{text:h,children:C}=t.tokensToTextWithChildren(l.tokens,d);let E;typeof l.checked=="boolean"&&(E=l.checked?"checked":"unchecked");const A={id:it(),type:"list",groupId:i,ordered:r,checkbox:E,start:e+c,text:h,level:t.listLevel};o.push(A),o.push(...C)}),o}function uG(n,t){const e=t.tokensToBlocks(n.tokens,t);return e.forEach(r=>{r.quoted=!0}),e}const bw=100,fG=20,dG=600;function hG(n,t){const e=t.text;if(e){const r=Re(e);return Math.min(Em(r,n)+fG,dG)}return bw}function vw(n,t){let e=bw;return t.forEach(r=>{e=Math.max(e,hG(n,r))}),e}function mG(n,t){var l,c;const e=n.header.length,r=n.rows.length+1,i=[],o=Array(e).fill(100);for(let d=0;d<r;d++){let h;d===0?h=n.header:h=n.rows[d-1];for(let C=0;C<e;C++){const E=h[C],A=(l=E==null?void 0:E.tokens)!=null?l:[],v=it();i.push(v);let w;if(A.length===0)w=[Fm()];else if(Ru(A[0]))w=t.tokensToBlocks(E.tokens,t),w.length===0&&w.push(Fm());else{const{text:S,children:U}=t.tokensToTextWithChildren(E.tokens,t);w=[{id:it(),type:"text",text:S},...U]}t.doc.blocks[v]=w,o[C]=Math.max(o[C],vw((c=t.font)!=null?c:"",w))}}return[{id:it(),type:"table",cols:e,rows:r,colsWidth:o,children:i}]}function gG(n){return[{id:it(),type:"embed",embedType:"hr",embedData:{}}]}function pG(n,t){const e=n.text;if(!e)return[];try{const c=n.text,d=Bf(c),h=JSON.parse(d);if(h){const{root:C,...E}=h.blocks;return t.doc.blocks={...t.doc.blocks,...E},C}}catch{}const r=_.t("code.plainText");if(r==="mermaid")return[{id:it(),type:"embed",embedType:"mermaid",embedData:{mermaidText:e}}];if(r==="plantuml")return[{id:it(),type:"embed",embedType:"plantuml",embedData:{plantumlText:e}}];if(r==="flow"||r==="flowchart")return[{id:it(),type:"embed",embedType:"flowchart",embedData:{flowchartText:e}}];const o=e.split(`
669
+ `:""}class Oz{constructor(){m(this,"group","image");m(this,"commands",[])}executeCommand(t,e,r){if(r.id==="replace-image"){const{block:i,image:o}=r.data;Xe.getImageObject(t,i).replaceImage(0,o)}}}function Nz(){return{blockCommands:{image:new Oz},abstract:`${_.t("image.abstract")}`}}function Pz(){return{name:"Image",insertEmbedCommandItems:[{id:"insert-image",name:_.t("image.abstract"),icon:DT,group:"common",subText:"/image",order:100}],handleInsertEmptyEmbed:async(n,t)=>{var A;let e;(A=t.data)!=null&&A.file&&(e=t.data.file);const r=ew(n);if(e=e!=null?e:await Uc(r),!e)return null;try{nw(n,e)}catch{return null}let i={width:Nd,height:VR};try{i=await HH(e)}catch(v){_z.error(v)}const o=n.rootContainer.clientWidth,s=i.width<o?Math.min(100,i.width/o*100):100,l={src:"",width:i.width,height:i.height,flex:1,virtualSize:!1},c=Gn([l],s),d={id:it(),type:"embed",embedType:"image",embedData:c},h=n.options.componentsOptions.image;h!=null&&h.defaultAlign&&(d.align=h.defaultAlign);const C=n.insertBlock(t.containerId,t.blockIndex,d);return Xe.getImageObject(n,C).replaceImage(0,e),C}}}function Fz(n,t,e){var h;const{data:r}=e,i=n.getBlockString(t).trim();if(!r||r.embedType!=="image"||!st(n,t))return null;const o=i.match(/^!\[[^\]]*\]\((?<filename>.*?)(?="|\))(?<optionalPart>".*")?\)/),s=(h=o==null?void 0:o.groups)==null?void 0:h.filename;if(!s)return null;const l={src:s},c={id:it(),type:"embed",embedType:"image",embedData:l};Xe.create(n,c).setAutoFix(!0);const d=n.options.componentsOptions.image.defaultAlign;return d&&(c.align=d),{blockData:c}}function Kz(n,t){const e=dt(t);n.destroyCustom(`image-${e}`)}const Vz={embedType:"image",createEmbedContent:Mz,convertTo:Uz,convertFrom:Fz,getBlockProperties:Nz,getOptions:Pz,handleDrop:fz,handleDropOver:mz,handleDeleteBlock:Kz};class $z{constructor(t,e){m(this,"toolbar");m(this,"anchor",null);m(this,"item");m(this,"docs",null);m(this,"checkedId");m(this,"handlePasteSpecial",(t,e)=>{!e.data||(this.checkedId===e.id?this.checkedId=void 0:this.checkedId=e.id,this.onPasteSpecial(this.cleaningDoc(e)),setTimeout(()=>{this.docs&&this.show(this.docs),this.editor.focus()}))});m(this,"handleClose",()=>{this.editor.focus()});m(this,"handleSelectionChange",()=>{this.toolbar.isVisible&&this.handleClose()});this.editor=t,this.onPasteSpecial=e,this.item={id:"paste-special",name:"",icon:_T,dropdown:!0,manualShowChildren:!0,childrenPlacement:"bottom-start",childrenOffset:[-4,4],children:[]},this.toolbar=new gd([this.item],void 0,{id:"paste-special-button",tooltipId:this.editor.clientId,refuseOverflow:!0}),this.toolbar.addListener("click",this.handlePasteSpecial),this.toolbar.addListener("close",this.handleClose)}show(t){this.docs=t;const e=this.editor,r=e.selection.range;if(!r.isCollapsed())return;const i=e.getBlockById(r.start.blockId);if(!st(e,i))return;const o=Vo(e,i,r)[0];if(!o)return;this.anchor&&this.anchor.remove(),this.anchor=jo(e,i,"paste-special-button-anchor",o);const s=this.getCommandItems(t);this.item.children=s,this.toolbar.manualShow(this.anchor)}cleaningDoc(t){const e=t.id,r=t.data;return e!=="text/plain"||Object.values(r.blocks).forEach(i=>{i.forEach(o=>{o.text&&o.text.forEach(s=>{if(s.attributes){const l=s.attributes;Object.keys(l).forEach(c=>{c==="link"&&delete l[c]})}})})}),r}hide(){this.toolbar.close("selectionChange")}clearCheckedState(){this.checkedId=void 0}destroy(){this.toolbar.destroy()}getCommandItems(t){const e=o=>({id:o,states:this.checkedId===o?["checked"]:void 0,name:_.t("pasteSpecial.originFormats"),data:t[o]}),r=[];let i=!0;return t["text/x-ones-editor-doc"]?r.push(e("text/x-ones-editor-doc")):t["text/office-html"]?r.push(e("text/office-html")):t["text/html"]?r.push(e("text/html")):t["text/plain"]&&(r.push(e("text/plain")),i=!1),t["text/plain"]&&(i&&r.push({id:"text/plain",states:this.checkedId==="text/plain"?["checked"]:void 0,name:_.t("pasteSpecial.plainText"),data:t["text/plain"]}),r.push({id:"text/markdown",states:this.checkedId==="text/markdown"?["checked"]:void 0,name:_.t("pasteSpecial.markdown"),data:t["text/markdown"]})),r}}const Hz=D("paste-special");class KA{constructor(t){m(this,"button");m(this,"lastUndoAction",null);m(this,"lastPos",null);m(this,"event",null);m(this,"handlePasteSpecial",t=>{this.editor.undoManager.runInGroup(()=>{this.editor.undoManager.undoTo(this.lastUndoAction),this.editor.pasteDoc(t)})});this.editor=t,this.button=new $z(t,this.handlePasteSpecial)}destroy(){this.event=null,this.button.destroy()}handleChanged(t,e){this.event=null,this.button.hide()}async handleBeforePaste(t,e){return Hz.debug("before paste"),this.lastUndoAction=t.undoManager.lastAction(),this.lastPos=t.selection.range.start,!1}async handleAfterPaste(t,e,r){if(Object.keys(r).length<=1)return!1;const i=t.selection.range;if(i.isCollapsed()){const o=t.getBlockById(i.start.blockId);if(!st(t,o))return!1;if(this.lastPos&&bi(this.lastPos)){const s=t.findBlockById(this.lastPos.blockId);if(s&&Ko(s))return!1}this.button.clearCheckedState(),this.button.show(r),this.event=e}return!1}}const jz={pasteSpecial:{originFormats:"\u4FDD\u6301\u539F\u6837\u5F0F",plainText:"\u7C98\u8D34\u7EAF\u6587\u672C",markdown:"\u7C98\u8D34\u4E3A Markdown"}},zz={pasteSpecial:{originFormats:"Keep origin formats",plainText:"Paste as plain text",markdown:"Paste as markdown"}},Gz={pasteSpecial:{originFormats:"\u5143\u306E\u30B9\u30BF\u30A4\u30EB\u3092\u7DAD\u6301\u3059\u308B",plainText:"\u30D7\u30EC\u30FC\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u8CBC\u308A\u4ED8\u3051\u308B",markdown:"Markdown \u3068\u3057\u3066\u8CBC\u308A\u4ED8\u3051"}};_.mergeLang({"zh-CN":jz,"en-US":zz,"ja-JP":Gz});const Oat="",Wz=D("html-to-doc");function qz(n){const t=/(<span data-editor-doc=")[\s\S]*( id="ones-editor-doc"\s?>)/g;let e=n;ea()&&(e=n.replace(/style="(.*)"/,""));let r=e.match(t);if(!r||!r.length)return null;r=r.map(l=>l.replace(/(<span data-editor-doc=")/g,"").replace(/(" id="ones-editor-doc"\s?>)/g,""));const i=r[0],o=Bf(i);return JSON.parse(o)}function Xz(n){const t="ones-editor-doc::",e="::ones-editor-doc";let r=n.indexOf(t);if(r!==-1){r+=t.length;const o=n.indexOf(e,r);if(o!==-1){const s=n.substr(r,o-r);try{const l=Bf(s);return JSON.parse(l)}catch(l){Wz.error(`invalid doc data: ${l}, ${s}`)}}}const i=qz(n);return i||null}const Ew="latex-b172fea480b",Yz=n=>({name:"latex-block",level:"block",start(t){var e,r;return(r=(e=t.match(/\$\$[^\$]/))==null?void 0:e.index)!=null?r:-1},tokenizer(t,e){const r=/^\$\$([^\$]+)\$\$/.exec(t);return r?{type:"latex-block",raw:r[0],formula:r[1]}:void 0},renderer(t){return n.lazy?`<span class="${Ew}" block>${t.formula}</span>`:n.render(t.formula,!0)}}),Qz=n=>({name:"latex",level:"inline",start(t){var e,r;return(r=(e=t.match(/\$[^\$]/))==null?void 0:e.index)!=null?r:-1},tokenizer(t,e){const r=/^\$([^\$]+)\$/.exec(t);return r?{type:"latex",raw:r[0],formula:r[1]}:void 0},renderer(t){return n.lazy?`<span class="${Ew}">${t.formula}</span>`:n.render(t.formula,!1)}});var Jz=(n={})=>(n.lazy&&n.env!=="test"&&new IntersectionObserver((t,e)=>{for(const r of t){if(!r.isIntersecting)continue;const i=r.target;e.unobserve(i),Promise.resolve(n.render(i.innerText,i.hasAttribute("block"))).then(o=>{i.innerHTML=o}),i.classList.add("latex-rendered")}},{threshold:1}),{extensions:[Yz(n),Qz(n)]});function Ru(n){const t=n.type;if(t==="link")return!!n.tokens.some(Ru);switch(t){case"code":case"table":case"hr":case"blockquote":case"list":case"list_item":case"image":case"paragraph":return!0;default:return!1}}function Zz(n){return!Ru(n)}function tG(n){if(n.length===0)return[];if(n.length===1)return[n];const t=[];let e=[n[0]],r=Ru(n[0]);for(let i=1;i<n.length;i++){const o=n[i];r===Ru(o)?e.push(o):(t.push(e),e=[o],r=Ru(o))}return t.push(e),t}const Aw=D("token-to-text"),eG=n=>{p(Aw,n.blocks.root.length>0,"doc.blocks.root.length > 0");const t=n.blocks.root[0];return p(Aw,Array.isArray(t.text)&&t.text.length!==0,"first block text is not empty"),t.text.map(e=>e.insert).join("")},xw=n=>{var o,s;let t=n;const e=(o=t==null?void 0:t.match(/^(http|https):\/\/[^/]+/))==null?void 0:o[0],r=t.substring((s=e==null?void 0:e.length)!=null?s:0);if(!e||!r)return n;const i=jA(r);return i&&(t=e+eG(i)),t};function nG(n,t,e){let r=xw(n.href);r.startsWith("mailto:")&&(r=r.substring(7));let i=e.tokensToText(n.tokens,t,e);return i.forEach(o=>{o.insert=xw(o.insert)}),i.length===0&&(i=Ea(r,t)),i=Im(i,"link",r),i}let Xd;function VA(n){Xd||(Xd=document.createElement("textarea")),Xd.innerHTML=n;const t=Xd.childNodes.length===0?"":Xd.childNodes[0].nodeValue;return t!=null?t:""}function rG(n,t){const e=VA(n.text);return[Xr(e,{...t,"style-code":!0})]}function iG(n,t,e){const i=n.tokens;return i?e.tokensToText(i,t,e):F1(VA(n.text),t)}const oG=D("token-to-text");function $A(n,t,e){return n.map(i=>i.type==="text"?iG(i,t,e):i.type==="strong"?e.tokensToText(i.tokens,{...t,"style-bold":!0},e):i.type==="em"?e.tokensToText(i.tokens,{...t,"style-italic":!0},e):i.type==="del"?e.tokensToText(i.tokens,{...t,"style-strikethrough":!0},e):i.type==="link"?nG(i,t,e):i.type==="codespan"?rG(i,t):i.type==="br"?[{insert:" ",attributes:{id:it(),created:Date.now(),box:!0,type:"br"}}]:i.type==="escape"?F1(VA(i.text),t):i.type==="latex"?[{insert:" ",attributes:{id:it(),created:Date.now(),box:!0,type:"math",tex:i.formula}}]:(oG.warn(`unknown token in text: ${JSON.stringify(i)}`),[])).flat()}function sG(n,t){const e=$A(n.tokens,{},t);return[{id:it(),type:"text",text:e,heading:n.depth}]}function lG(n,t){const{text:e,children:r}=t.tokensToTextWithChildren(n.tokens,t),i=[];return e.length>0&&i.push({id:it(),type:"text",text:e}),i.push(...r),i}function aG(n,t){const{text:e,children:r}=t.tokensToTextWithChildren([n],t),i=[];return e.length>0&&i.push({id:it(),type:"text",text:e}),i.push(...r),i}function cG(n,t){const e=typeof n.start=="number"?n.start:1,r=n.ordered,i=it(),o=[];return n.items.forEach((l,c)=>{const d={...t,listLevel:t.listLevel+1},{text:h,children:C}=t.tokensToTextWithChildren(l.tokens,d);let E;typeof l.checked=="boolean"&&(E=l.checked?"checked":"unchecked");const A={id:it(),type:"list",groupId:i,ordered:r,checkbox:E,start:e+c,text:h,level:t.listLevel};o.push(A),o.push(...C)}),o}function uG(n,t){const e=t.tokensToBlocks(n.tokens,t);return e.forEach(r=>{r.quoted=!0}),e}const bw=100,fG=20,dG=600;function hG(n,t){const e=t.text;if(e){const r=Re(e);return Math.min(Em(r,n)+fG,dG)}return bw}function vw(n,t){let e=bw;return t.forEach(r=>{e=Math.max(e,hG(n,r))}),e}function mG(n,t){var l,c;const e=n.header.length,r=n.rows.length+1,i=[],o=Array(e).fill(100);for(let d=0;d<r;d++){let h;d===0?h=n.header:h=n.rows[d-1];for(let C=0;C<e;C++){const E=h[C],A=(l=E==null?void 0:E.tokens)!=null?l:[],v=it();i.push(v);let w;if(A.length===0)w=[Fm()];else if(Ru(A[0]))w=t.tokensToBlocks(E.tokens,t),w.length===0&&w.push(Fm());else{const{text:S,children:U}=t.tokensToTextWithChildren(E.tokens,t);w=[{id:it(),type:"text",text:S},...U]}t.doc.blocks[v]=w,o[C]=Math.max(o[C],vw((c=t.font)!=null?c:"",w))}}return[{id:it(),type:"table",cols:e,rows:r,colsWidth:o,children:i}]}function gG(n){return[{id:it(),type:"embed",embedType:"hr",embedData:{}}]}function pG(n,t){const e=n.text;if(!e)return[];try{const c=n.text,d=Bf(c),h=JSON.parse(d);if(h){const{root:C,...E}=h.blocks;return t.doc.blocks={...t.doc.blocks,...E},C}}catch{}const r=_.t("code.plainText");if(r==="mermaid")return[{id:it(),type:"embed",embedType:"mermaid",embedData:{mermaidText:e}}];if(r==="plantuml")return[{id:it(),type:"embed",embedType:"plantuml",embedData:{plantumlText:e}}];if(r==="flow"||r==="flowchart")return[{id:it(),type:"embed",embedType:"flowchart",embedData:{flowchartText:e}}];const o=e.split(`
670
670
  `).map(c=>({id:it(),type:"text",text:Ea(c)})),s=t.doc,l=it();return s.blocks[l]=o,[{id:it(),type:"code",language:r,children:[l]}]}function CG(n){return[{id:it(),type:"embed",embedType:"image",embedData:{src:n.href,title:n.title}}]}function EG(n,t){const{text:e,children:r}=t.tokensToTextWithChildren(n.tokens,t),i=[];return e.length>0&&i.push({id:it(),type:"text",text:e}),i.push(...r),i}function AG(n){const t=n.formula;return t?[{id:it(),type:"embed",embedType:"math",embedData:{mathjaxText:t}}]:[]}const Bw=D("markdown-to-doc");function xG(n,t){var e;if(n.type==="heading")return sG(n,t);if(n.type==="paragraph")return lG(n,t);if(n.type==="list")return cG(n,t);if(n.type==="blockquote")return uG(n,t);if(n.type==="table")return mG(n,t);if(n.type==="hr")return gG();if(n.type==="code")return pG(n,t);if(n.type==="image")return CG(n);if(n.type==="link")return EG(n,t);if(n.type==="latex-block")return AG(n);if(n.type==="text")return aG(n,t);if(n.type==="space"){const r=n.raw.replaceAll(" ",""),i=Math.floor(r.split(`
671
671
  `).length/2)-1;return i>0?new Array(i).fill("").map(()=>({type:"text",id:it(),text:[]})):[]}if(n.type==="html"){const r=(e=t.htmlToDoc)==null?void 0:e.call(t,n.text);if(!r)return Bw.warn(`failed to convert html to doc: ${JSON.stringify(n)}`),[];const{root:i,...o}=r.blocks;return t.doc.blocks={...t.doc.blocks,...o},i}return Bw.warn(`unknown block token: ${JSON.stringify(n)}`),[]}function HA(n,t){const e=[];return n.forEach(r=>{const i=xG(r,t);e.push(...i)}),e}D("markdown-to-doc");function bG(n,t){const e={text:[],children:[]};return tG(n).forEach((i,o)=>{const s=i[0];if(o===0&&Zz(s)){e.text=$A(i,{},t);return}e.children.push(...HA(i,t))}),e}const vG={render:(n,t)=>""};wp.marked.use(Jz(vG)),wp.marked.use({mangle:!1});function jA(n,t){const r=new wp.marked.Lexer().lex(n),i={blocks:{root:[]},meta:{},comments:{}},o={font:t==null?void 0:t.font,doc:i,tokensToText:$A,tokensToBlocks:HA,tokensToTextWithChildren:bG,htmlToDoc:t==null?void 0:t.htmlToDoc,listLevel:1},s=HA(r,o);return s.length===0?null:(i.blocks.root.push(...s),i)}function BG(n){if(n.nodeName!=="DIV")return!1;const t=n;return Array.from(t.childNodes).every(e=>e.nodeName==="SPAN"||e instanceof Text)?!!t.querySelector(":scope > .hljs-function, :scope > .hljs-params, :scope > .hljs-string, :scope > .hljs-keyword, :scope > .hljs-attr"):!1}function yw(n){if(BG(n)){const t=n,e=t.parentNode,r=document.createElement("pre");Array.from(t.childNodes).forEach(i=>r.appendChild(i)),e==null||e.insertBefore(r,t);return}n.childNodes.forEach(t=>yw(t))}function Yd(n){var t;if(n instanceof HTMLBRElement){const e=document.createTextNode(`
672
672
  `);(t=n.parentNode)==null||t.insertBefore(e,n),n.remove();return}n.childNodes.forEach(Yd)}function yG(n){n.addRule("codeListToCode",{filter:t=>t.nodeName!=="OL"?!1:Array.from(t.childNodes).every(e=>e.nodeName==="LI"&&e.childNodes.length===1&&e.childNodes[0].nodeName==="CODE"),replacement:(t,e,r)=>{Yd(e);const i=Array.from(e.children).map(o=>o.textContent).join(`
@@ -960,4 +960,4 @@ ${o.mermaidText}
960
960
  ${o.flowchartText}
961
961
  \`\`\`\`\`\``}return""}const YJ={embedType:"flowchart",convertFrom:WJ,handleUpdateBlock:GJ,createEmbedContent:zJ,getBlockProperties:qJ,convertTo:XJ},QJ=D("plantuml-helper");function KS(n,t){var l;let r=((l=(n.getComponentOptions("plantuml")||{}).cdn)==null?void 0:l.plantuml)||wJ;r.endsWith("/")||(r+="/");const i=A9.default.encode(t);p(QJ,i,i),r+=i;const s=new URLSearchParams(document.location.search).get("doc");return $p(r,{id:`${s}-${it()}`})}async function JJ(n,t){try{const e=await yx(n,t);return(await n.doc.uploadResource(e)).resourceId}catch{return Promise.resolve(t)}}class Nu extends wx{constructor(t){super(t,"plantuml","plantumlText")}static get(t,e){return t.addCustom(`plantuml-${e.id}`,()=>new Nu(t))}code2ObjectUrl(t){return Promise.resolve(KS(this.editor,t))}code2ResourceId(t){const e=KS(this.editor,t);return JJ(this.editor,e)}destroy(){}}function ZJ(n,t,e){Nu.get(n,e).createEmbedContent(t,e)}function tZ(n,t,e){const r=Nu.get(n,e),i=zt(t);return r.updateEmbedContent(i,e),!0}function eZ(n,t,e){const{data:r}=e,i=n.getBlockString(t).trim();if(!r||r.embedType!=="plantuml"||i!=="```plantuml"||!st(n,t))return null;const o={src:"",plantumlText:""};return{blockData:{id:it(),type:"embed",embedType:"plantuml",embedData:o},onConverted:(c,d)=>{Nu.get(c,c.getBlockData(d)).editGraph(zt(d))}}}function nZ(n,t){return Nu.get(n,n.getBlockData(t)).getBlockProperties(t)}function rZ(n,t,e,r){const{embedData:i}=t,o=i;if(r==="html")return o.src?`<img src="${n.doc.buildResourceUrl(o.src,{withToken:!0})}" />`:o.flowchartText?`<div>${o.flowchartText}</div>`:"<p>[plantuml]</p>";if(r==="markdown"){if(o.src)return`![plantuml](${n.doc.buildResourceUrl(o.src,{withToken:!0})})`;if(o.flowchartText)return`\`\`\`plantuml\`\`\`
962
962
  ${o.flowchartText}
963
- \`\`\`\`\`\``}return""}const iZ={embedType:"plantuml",convertFrom:eZ,handleUpdateBlock:tZ,createEmbedContent:ZJ,getBlockProperties:nZ,convertTo:rZ},uct="",oZ="hr",sZ={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},lZ={dividingLine:{type:"Dividing-Line",abstract:"Dividing-Line"}},aZ={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};_.mergeLang({"zh-CN":sZ,"en-US":lZ,"ja-JP":aZ});function cZ(n,t){const e=B("div",["editor-embed-container"],t);B("hr",["editor-embed-hr"],e)}function uZ(n,t,e,r){return r==="html"?"<hr />":r==="markdown"?"---":"------------"}function fZ(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:_.t("dividingLine.type"),icon:qT,order:500,group:"common",subText:tr("insert-hr")}],handleInsertEmptyEmbed:async(n,t)=>{const{containerId:e,blockIndex:r}=t;return n.insertEmbed(e,r,oZ,{})}}}function dZ(n,t,e){const{data:r}=e;if(!r||r.embedType!=="dividing-line"||!st(n,t))return null;const i={};return{blockData:{id:it(),type:"embed",embedType:"hr",embedData:i}}}function hZ(){return{abstract:_.t("dividingLine.abstract")}}const mZ={embedType:"hr",createEmbedContent:cZ,convertTo:uZ,getOptions:fZ,convertFrom:dZ,getBlockProperties:hZ},fct="",dct="",gZ={media:{upload:{failed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>',maxSizeFailed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6</div>'},load:{failed:'<div class="line-1">{name}\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},audio:{menuItem:"\u97F3\u9891",abstract:"\u97F3\u9891"},video:{menuItem:"\u89C6\u9891",abstract:"\u89C6\u9891"}}},pZ={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>',maxSizeFailed:'<div class="line-1">{name} upload failed</div><div class="line-2">The file size exceeds limit. Please choose another file.</div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},CZ={media:{upload:{failed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>',maxSizeFailed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u30D5\u30A1\u30A4\u30EB\u306E\u30B5\u30A4\u30BA\u304C\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u308B\u305F\u3081\u3001\u4ED6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</div>'},load:{failed:'<div class="line-1">{name}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},audio:{menuItem:"\u97F3\u58F0",abstract:"\u97F3\u58F0"},video:{menuItem:"\u52D5\u753B",abstract:"\u52D5\u753B"}}};_.mergeLang({"zh-CN":gZ,"en-US":pZ,"ja-JP":CZ});var Ui=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Ui||{}),ah=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(ah||{});const VS=10*1024*1024,EZ=["wav","mp3","aac","ogg","webm","flac"],AZ=["ogg","mp4","webm"],xZ=()=>{};function $S(n){var h,C,E,A,v,w;const t=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:e,maxSize:r,callbacks:i}=t,o=(C=e==null?void 0:e.audio)!=null?C:EZ,s=(E=e==null?void 0:e.video)!=null?E:AZ,l=(A=r==null?void 0:r.audio)!=null?A:VS,c=(v=r==null?void 0:r.video)!=null?v:VS,d=(w=i==null?void 0:i.onError)!=null?w:xZ;return{allowedMedias:{audio:o,video:s},maxSize:{audio:l,video:c},callbacks:{onError:d}}}function bZ(n,t){const e=o=>o.map(s=>`.${s}`).join(","),{allowedMedias:r}=$S(n),i=r[t];return i?e(i):"*"}function vZ(n,t,e){const{maxSize:r,callbacks:i,allowedMedias:o}=$S(t),{[e]:s}=r,{[e]:l}=o;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${e}`,i!=null&&i.onError&&(i==null||i.onError(t,d)),d}const c=kf(n.name);if(l&&!l.includes(c.toLowerCase())){const d=new Error(`media file is not allowed: ${c}`);throw d.code="NotAllowedFile",i!=null&&i.onError&&(i==null||i.onError(t,d)),d}}function BZ(n){return n===ah.Empty||n===ah.Error}const xn=D("media");class yZ extends He.TypedEmitter{constructor(e){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(e,r)=>{if(!r.target||!(r.target instanceof Node)||!(r.target instanceof Element?r.target:r.target.parentElement))return;const o=et(r.target);if(!o||!o.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",e,"load_error",dt(o))});m(this,"handleUploadFile",async e=>{p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const{editor:r}=this.options,i=et(this.mediaContainer);p(xn,i,"The block element not exist");const o=r.getBlockData(i);try{const{resourceId:s}=await r.doc.uploadResource(e,{onProgress:C=>{this.renderProgress(C,e)}}),{name:l,type:c,size:d}=e,h={...o,embedData:{...o.embedData,src:s,fileName:l,fileSize:d,fileType:c}};r.updateBlockData(i,h)}catch(s){xn.error(s),this.emit("mediaError",r,"upload_error",o.id),this.renderRetry(e,s)}ut(i,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=e}bindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(e){p(xn,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(e)}renderError(){p(xn,this.abstract,"no abstract");const{editor:e,createMediaElement:r}=this.options,{mediaIcon:i,mediaName:o}=this.abstract;p(xn,this.mediaContainer,"The media element not exist");const s=et(this.mediaContainer);p(xn,s,"The block element not exist");const l=e.getBlockData(s),c=B("div",["media-error","embed-selected-content","embed-hover-content"],null),d=B("span",["media-error-icon"],c);d.innerHTML=i;const h=B("div",[],c);h.innerHTML=_.t("media.load.failed",{name:o}),c.appendChild(h);const C=h.querySelector(".retry-upload");return p(xn,C,"The element not exist"),e.domEvents.addEventListener(C,"click",(E,A)=>{const v=B("div",["media-element"],null),w=this.getResourceUrl(l),S=r(E,v,l,w);this.unbindMediaEvent(),this.media=S,this.bindMediaEvent(),this.updateMediaContent(v)}),this.setFullScreen(),c}renderRetry(e,r){var E,A;p(xn,this.abstract,"no abstract");const{editor:i}=this.options,{mediaIcon:o,mediaName:s}=this.abstract,l=B("div",["media-error","embed-selected-content","embed-hover-content"],null),c=B("span",["media-error-icon"],l);c.innerHTML=o;const d=B("div",[],l);let h=_.t("media.upload.failed",{name:s});(((E=r.response)==null?void 0:E.status)===420||((A=r.response)==null?void 0:A.status)===413)&&(h=_.t("media.upload.maxSizeFailed",{name:s})),d.innerHTML=h,l.appendChild(d);const C=d.querySelector(".retry-upload");C&&i.domEvents.addEventListener(C,"click",()=>{i.readonly||(p(xn,this.abstract,"no abstract"),this.handleUploadFile(e))}),this.updateMediaContent(l),this.setFullScreen()}renderProgress(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope .media-progress"),o=e===-1||e===100?100:e;if(i){const{updateProgressElement:s}=this.options;s(i,o)}else{const{createProgressElement:s}=this.options,l=et(this.mediaContainer);p(xn,l,"The element not exist"),q(l,"media-block-uploading");const c=B("div",["media-progress"],null);s(c,o,r),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:o,updateMediaElement:s,editor:l}=this.options,c=this.getResourceUrl(e,r);if(i){const d=s(l,i,e,c);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent()}else{const d=B("div",["media-element"],null),h=o(l,d,e,c);this.unbindMediaEvent(),this.media=h,this.bindMediaEvent(),this.updateMediaContent(d)}}renderEmpty(e){p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const r=B("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);r.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(r);const{editor:i}=this.options;i.findBlockById(e.id)&&this.emit("mediaError",i,"empty",e.id),this.setFullScreen()}getResourceUrl(e,r){const{src:i}=e.embedData,{editor:o}=this.options;return o.doc.buildResourceUrl(i,{syncNewResources:async(s,l)=>{var d,h;if(!r)return;await o.doc.addResources([s]);const c=(h=(d=o.doc).getServerMeta)==null?void 0:h.call(d).appId;if(l!==e.embedData.src&&c&&e.embedData.src.includes(c)){const C=et(r);if(C&&!o.readonly&&o.isBlockWritable(C)){const E=xt.default(e);E.embedData.src=s,o.updateBlockData(C,E)}}}})}setFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),q(this.mediaContainer,"full-screen")}removeFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),ut(this.mediaContainer,"full-screen")}updateBlockAlign(e,r){const i=et(r);p(xn,i,"The block element not exist");const{align:o}=e;e.embedType==="video"&&(i.hasAttribute("data-style-align")&&i.removeAttribute("data-style-align"),i.setAttribute("data-style-align",o))}render(e,r){const{src:i}=e.embedData;(!this.mediaContainer||!r.contains(this.mediaContainer))&&(this.mediaContainer=B("div",["media"],r)),this.updateBlockAlign(e,r),BZ(i)?i===ah.Empty&&this.renderEmpty(e):this.renderMediaElement(e,r)}setAbstract(e){this.abstract=e}}D("media-embed");const TZ="left";class HS{constructor(){m(this,"handleInsertEmptyEmbed",async(t,e)=>{var C;const{containerId:r,blockIndex:i}=e;let o;(C=e.data)!=null&&C.file&&(o=e.data.file);const s=bZ(t,this.embedType);if(o=o!=null?o:await Uc(s,{}),!o)return null;const{mediaType:l}=this.getAbstract();try{vZ(o,t,l)}catch{return null}const c={id:it(),type:"embed",embedType:this.embedType,embedData:{src:ah.Empty}};l==="video"&&(c.align=TZ);const d=t.insertBlock(r,i,c);return await this.getMedia(t,c.id).handleUploadFile(o),d})}getMedia(t,e){const r=t.addCustom(`media-${e}`,()=>new yZ({editor:t,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return r.setAbstract({...this.getAbstract()}),r}getOptions(){const{menuItem:t,mediaIcon:e,mediaName:r,order:i,group:o}=this.getAbstract();return{name:r,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:t,icon:e,order:i,group:o,subText:tr(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(t,e,r){const{id:i}=r;this.getMedia(t,i).render(r,e)}handleUpdateBlock(t,e,r){const{id:i}=r,o=this.getMedia(t,i),s=zt(e);return o.render(r,s),!0}handleDeleteBlock(t,e){const r=e.id,i=this.getMedia(t,r);i.removeAllListeners(),i.destroy()}convertTo(t,e,r,i){const o=e.embedData,s=t.doc.buildResourceUrl(o.src,{withToken:!0});return i==="html"?`<${o.type} src="${s}" />`:i==="markdown"?`![${o.src}](${s})`:s}}function jS(n,t){const e=B("div",["uploading-progress-mask"],n),r=B("div",["uploading-progress-bar"],e),i=B("div",["uploading-progress-bar-value"],r);i.style.width=`${t}%`}function zS(n,t){const e=n.querySelector(".uploading-progress-bar-value");e&&(e.style.width=`${t}%`)}const kZ=D("media-audio");class RZ extends HS{constructor(){super(...arguments);m(this,"embedType",Ui.AUDIO);m(this,"updateProgressElement",zS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["audio-container","embed-hover-content","embed-selected-content"],r),l=B("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=o,setTimeout(()=>{this.getMedia(e,i.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:zT,mediaName:_.t(`media.${Ui.AUDIO}.menuItem`),menuItem:_.t(`media.${Ui.AUDIO}.menuItem`),order:800,mediaType:Ui.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Ui.AUDIO}.abstract`)}`}}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .audio-container > audio");return p(kZ,s,"The media element not exist"),s.src!==o&&(s.src=o),s}createProgressElement(e,r){const i=B("audio",[],e);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,i.src="about:blank",jS(e,r)}}const wZ=new RZ;D("video-resizer");function GS(n){return n&&Le(n)&&ln(n)==="video"}const SZ=50;class Sx{constructor(t){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(t,e)=>{if(!this.resizing&&!window.isDragging&&(e&&GS(e)&&this.disableBlockResize(e),t&&GS(t)&&this.editor.isBlockWritable(t))){const r=this.getVideoElement(t);if(!r)return;this.enableBlockResize(t,r)}});m(this,"handleResizing",(t,e)=>{if(this.resizing=!0,!this.currentResizableElement)return;const r=t.getBlock();if(!r)return;const i=r.getBoundingClientRect().width,o=Math.min(Math.max(e.width,SZ),i);this.currentResizableElement.style.width=`${o}px`,this.currentResizableElement.style.pointerEvents="none"});m(this,"handleResized",t=>{this.resizing=!1;const e=t.getBlock();if(!this.currentResizableElement||!e)return;const r=this.editor.getBlockData(e),{width:i}=this.currentResizableElement.getBoundingClientRect();this.currentResizableElement.style.pointerEvents="auto",this.editor.updateBlockData(e,{...r,width:i})});this.editor=t,je.get(t).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,je.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(t){return zt(t).querySelector(":scope .video-container > video")}updateResizer(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.updateResizer()}disableBlockResize(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.disableResize()}enableBlockResize(t,e){const r=this.editor.addCustom(`${dt(t)}-resizer`,()=>new Pd(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));r.enableResize(t,e),r.removeListener("resizing",this.handleResizing),r.removeListener("resized",this.handleResized),r.addListener("resizing",this.handleResizing),r.addListener("resized",this.handleResized),this.currentResizableElement=e}}const LZ=D("video");class IZ extends HS{constructor(){super(...arguments);m(this,"embedType",Ui.VIDEO);m(this,"updateProgressElement",zS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["video-container","embed-selected-content","drag-preview-element"],r),l=B("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=o,l.addEventListener("canplay",()=>{e.addCustom("video-resizer",()=>new Sx(e)),this.getMedia(e,i.id).removeListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).addListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).removeFullScreen()}),i.width&&(l.style.width=`${i.width}px`),l});m(this,"createProgressElement",(e,r,i)=>{const o=B("video",["progress-video"],e);o.innerHTML="Your browser does not support the <code>audio</code> element.",o.controls=!0,jS(e,r),Mc(i).then(s=>{const l=e.querySelector(".progress-video");l&&c1(e)&&(l.src=s)})})}getAbstract(){return{mediaName:_.t(`media.${Ui.VIDEO}.menuItem`),mediaIcon:GT,menuItem:_.t(`media.${Ui.VIDEO}.menuItem`),order:700,mediaType:Ui.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Ui.VIDEO}.abstract`)}`}}handleMediaError(e,r,i){const o=e.addCustom("video-resizer",()=>new Sx(e)),s=e.getBlockById(i);o.disableBlockResize(s)}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .video-container > video");p(LZ,s,"The media element not exist"),s.src!==o&&(s.src=o),i.width?s.style.width=`${i.width}px`:s.style.width="";const l=e.getBlockById(i.id);return setTimeout(()=>{e.addCustom("video-resizer",()=>new Sx(e)).updateResizer(l)}),s}}const DZ=new IZ,WS=[dA,xA,bA,Ok],Lx=[OS,DQ,VJ,YJ,iZ,jK,mZ,DZ,wZ,Vz,dS,yX],qS=[qk,gS,P4];function _Z(n,t,e){var i,o,s,l;Br.level=(i=e.logLevel)!=null?i:Gi.DEBUG;const r=td(n,t,{components:{blocks:[...WS,...((o=e==null?void 0:e.components)==null?void 0:o.blocks)||[]],embeds:[...Lx,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[...qS,...((l=e.components)==null?void 0:l.boxes)||[]],textRenders:[new XE],options:{...e.componentsOptions}}});return r.readonly=!0,r.addCustom("heading-collapse",()=>new mx(r)),r.addCustom("editor-tooltip",()=>new Ld(r)),r.addListener("clickLink",(c,d,h)=>{var E;if((E=e==null?void 0:e.events)!=null&&E.onClickLink){e.events.onClickLink(c,d,h);return}const C=h.getAttribute("link");C&&(c.readonly||d.ctrlKey||d.metaKey)&&window.open(C,"_blank")}),r}class XS{constructor(t){this.createOptions=t,t.lang&&_.setLang(t.lang)}createHistoryEditor(t,e){return _Z(t,e,this.createOptions)}}function YS(n,{root:t,childDoc:e,doc:r}){var h,C;e.uploadResource=r.uploadResource.bind(r),e.buildResourceUrl=r.buildResourceUrl.bind(r);const i=n.getComponentOptions("comment"),o={image:{defaultAlign:"left"},table:{locatingContainer:t,hideCellMenu:!0,hideToolbar:!0},...i==null?void 0:i.componentsOptions},s=[];n.editorBlocks.forEach(E=>{E.blockType==="text"||E.blockType==="embed"||s.push(E)});const l=[];n.editorEmbeds.forEach(E=>{l.push(E)});const c=[];n.editorBoxes.forEach(E=>{E.boxType==="text"||E.boxType==="br"||E.boxType==="image"||E.boxType==="anchor"||c.push(E)});const d=td(t,e,{shortcuts:[s0],components:{blocks:s,commandProviders:[new F0],decorators:[new dg],embeds:l,boxes:c,options:o}});if(d.input.addHandler(new mg),d.input.addHandler(new KA(d)),d.input.addHandler(new WA(d)),d.input.addHandler(new Mq(d)),d.input.addHandler(new Eg),d.addCustom("image-paste-handler",()=>new FA(d)),de.isMobile||d.addCustom("editor-tooltip",()=>new Ld(d)),n.options.enableContextMenu!==!1&&d.addCustom("editor-context-menu",E=>new YA(E)),(h=n.options.componentsOptions)!=null&&h.mention){const E=n.options.componentsOptions.mention;d.addCustom("mention",()=>new mS(d,{...E}))}if((C=n.options.componentsOptions)!=null&&C.comment){const E=n.options.componentsOptions.comment;E.onCommentEditorClick&&d.addListener("click",E.onCommentEditorClick)}return d}function MZ(n,t){const e=Array.from(n.rootContainer.querySelectorAll(`[comment-${t.toLocaleLowerCase()}="${t}"]`)),r=new Set;e.forEach(i=>{const o=et(i);o&&r.add(o)}),r.forEach(i=>{Uq(n,i,t)})}class UZ{constructor(t){m(this,"listeners",new Set);m(this,"doc");this.editor=t,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(t){return this.doc.getComment(t)}getCommentDoc(t){return this.doc.getCommentDoc(t)}localCreateComment(t,e){this.doc.localCreateComment(t,e)}localDeleteComment(t){const e=this.getComment(t);this.doc.localDeleteComment(t);const r=e.groupId;this.getComments().filter(o=>o.groupId===r).length===0&&MZ(this.editor,r)}localUpdateComment(t,e){this.doc.localUpdateComment(t,e)}onCreateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onCreateComment(t,e))}onDeleteComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onDeleteComment(t,e))}onUpdateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onUpdateComment(t,e))}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}createCommentEditor(t,e){return YS(this.editor,{root:t,childDoc:e,doc:this.doc})}allowEdit(t){return t.userId===this.doc.getUser().userId}}class OZ{constructor(t,e){m(this,"listeners",new Set);this.editor=t,this.localDoc=e}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(t){return this.doc.comments[t]}getCommentDoc(t){const e=this.doc.comments[t];return WC(e)}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}localCreateComment(t,e){}localDeleteComment(t){}localUpdateComment(t,e){}createCommentEditor(t,e){return YS(this.editor,{root:t,childDoc:e,doc:this.localDoc})}allowEdit(t){return t.userId===this.localDoc.getUser().userId}}const NZ={placeholder:{common:{title:"\u8BF7\u8F93\u5165\u6807\u9898",readonlyTitle:"\u8BF7\u8F93\u5165\u6807\u9898",content:"\u70B9\u51FB + \uFF0C\u6216\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6",contentInTable:"\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6"},local:{readonlyTitle:"\u672A\u547D\u540D"}},copyCutProperty:{copy:"\u590D\u5236",cut:"\u526A\u5207",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}",limitedEnvTips:"\u7531\u4E8E\u6D4F\u89C8\u5668\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528 {shortCut} \u7C98\u8D34"}},PZ={placeholder:{common:{title:"Enter a title",readonlyTitle:"Enter a title",content:'Click "+", or enter "/" to insert components quickly',contentInTable:'Enter "/" to insert components quickly'},local:{readonlyTitle:"Untitled"}},copyCutProperty:{copy:"Copy",cut:"Cut",unsafeEnvTips:"Due to the limitations of the current http access environment, please use the shortcut ({shortCut}) {operation}",limitedEnvTips:"Press {shortCut} to paste due to browser restrictions"}},FZ={placeholder:{common:{title:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",readonlyTitle:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",content:"\u300C+\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u304B\u3001\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059",contentInTable:"\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059"},local:{readonlyTitle:"\u7121\u984C"}},copyCutProperty:{copy:"\u8907\u88FD",cut:"\u5207\u308B",unsafeEnvTips:"HTTP\u74B0\u5883\u306E\u5236\u7D04\u306B\u3088\u308A\u3001{operation}\u3059\u308B\u306B\u306F\u3001\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8({shortCut}) \u3092\u3054\u4F7F\u7528\u304F\u3060\u3055\u3044",limitedEnvTips:"\u30D6\u30E9\u30A6\u30B6\u30FC\u306E\u5236\u9650\u306B\u3088\u308A\u3001\u300C{shortCut}\u300D\u3092\u4F7F\u7528\u3057\u3066\u8CBC\u308A\u4ED8\u3051\u3066\u304F\u3060\u3055\u3044"}};_.mergeLang({"zh-CN":NZ,"en-US":PZ,"ja-JP":FZ});const KZ="UEsDBBQABgAIAAAAIQBk9WPugQEAACkGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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cmluZy54bWxQSwECLQAUAAYACAAAACEA+JXI7/wOAADzmQAADwAAAAAAAAAAAAAAAAAfIgAAd29yZC9zdHlsZXMueG1sUEsBAi0AFAAGAAgAAAAhAMySUFR9AQAA8QIAABEAAAAAAAAAAAAAAAAASDEAAGRvY1Byb3BzL2NvcmUueG1sUEsBAi0AFAAGAAgAAAAhACJREfHVAQAA3gMAABAAAAAAAAAAAAAAAAAA/DMAAGRvY1Byb3BzL2FwcC54bWxQSwECLQAUAAYACAAAACEAiD+lv+EAAABVAQAAGAAAAAAAAAAAAAAAAAAHNwAAY3VzdG9tWG1sL2l0ZW1Qcm9wczEueG1sUEsBAi0AFAAGAAgAAAAhAMEnywi2AAAAIQEAABMAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",VZ=()=>Hp(KZ),$Z=D("image-to-docx");async function HZ(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>{t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=e,r.src=n})}async function QS(n,t){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:t};try{const e=await Mc(new File([t],"",{})),r=await HZ(e);return r.width===void 0||r.height===void 0?{width:345,height:230,buffer:t}:n.width||n.height?{width:n.width||r.width*n.height/r.height,height:n.height||r.height*n.width/r.width,buffer:t}:{width:r.width,height:r.height,buffer:t}}catch(e){$Z.error(e);return}}function jZ(n,t){let e=n.filter(s=>s!=null);const r=t-(e.length-1)*20,i=.87,o=e.reduce((s,l)=>s+l.width,0);return o>r&&(e=e.map(s=>({width:s.width*r/o,height:s.height*r/o,buffer:s.buffer}))),e.map(s=>({width:s.width*i,height:s.height*i,buffer:s.buffer}))}function zZ(n,t,e){if(!e||typeof e!="object")return;const r=e,i=n.filter(s=>s!=null),o=t-(i.length-1)*20;i.forEach((s,l)=>{if(i.length===1&&r.widthPercent){const d=r.widthPercent,h=s.width;s.width=o*(d/100),s.height*=s.width/h;return}const c=`${l}_flex`;if(r[c]){const d=r[c],h=s.width;s.width=o*d,s.height*=s.width/h}})}function JS(n=[0,1,2,3,4,5,6,7],t=1){return n.map(e=>{let r;switch(e%3){case 0:r=yt.LevelFormat.DECIMAL;break;case 1:r=yt.LevelFormat.LOWER_LETTER;break;default:r=yt.LevelFormat.LOWER_ROMAN;break}return{level:e,format:r,text:`%${e+1}. `,alignment:yt.AlignmentType.START,start:t,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(e+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function GZ(){return[0,1,2,3,4,5,6,7].map(n=>{let t;switch(n%3){case 0:t="\u2022";break;case 1:t="\u25E6";break;default:t="\u25AA";break}return{level:n,format:yt.LevelFormat.BULLET,text:t,alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function WZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2611",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}function qZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2610",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}var ch=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(ch||{});const XZ=[{levels:JS(),reference:"number-numbering-reference"},{levels:GZ(),reference:"number-bullet-reference"},{levels:WZ(),reference:"checked-bullet-reference"},{levels:qZ(),reference:"unchecked-bullet-reference"}];function YZ(n){switch(n){case"style-color-0":return"d83931";case"style-color-1":return"de7802";case"style-color-2":return"dc9b04";case"style-color-3":return"2ea121";case"style-color-4":return"245bdb";case"style-color-5":return"6425d0";case"style-color-6":return"8f959e";default:return}}function QZ(n){switch(n){case"style-bg-color-1":case"style-bg-color-2":case"style-bg-color-8":case"style-bg-color-9":return"yellow";case"style-bg-color-0":case"style-bg-color-5":return"magenta";case"style-bg-color-3":return"green";case"style-bg-color-4":case"style-bg-color-11":return"blue";case"style-bg-color-6":return"lightGray";case"style-bg-color-7":return"red";case"style-bg-color-10":return"darkGreen";case"style-bg-color-12":return"darkMagenta";case"style-bg-color-13":return"darkGray";default:return}}function JZ(n){switch(n){case"style-bg-color-0":return"fbbab6";case"style-bg-color-1":return"ffdcb0";case"style-bg-color-2":return"fff7a0";case"style-bg-color-3":return"ceefc5";case"style-bg-color-4":return"d1ddfb";case"style-bg-color-5":return"d9cbf8";case"style-bg-color-6":return"eaeaea";case"style-bg-color-7":return"fe837c";case"style-bg-color-8":return"ffbd6a";case"style-bg-color-9":return"ffe662";case"style-bg-color-10":return"a8f393";case"style-bg-color-11":return"98b5ff";case"style-bg-color-12":return"b394f8";case"style-bg-color-13":return"b1b1b1";default:return}}const ZZ=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function ZS(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const t=n.match(ZZ);if(t){const e=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},r=e(t[1]),i=e(t[2]),o=e(t[3]);return`${r}${i}${o}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function On(n,t){if(n&&n.attributes&&n.attributes[t])return n.attributes[t];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&t==="style-underline")return!0}function tL(n,t,e){for(let r=0;r<=e;++r){const i=`${t}${r}`;if(On(n,i))return i}}function Kg(n,t,e){n.attributes=n.attributes||{},n.attributes[t]=e}function Ix(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function eL(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function ttt(n){const t=On(n,"inlineStyle");if(t==null)return;const e=t.split(";");for(const r of e){const i=r.split(":");if(i.length!==2)continue;const o=i[0].trim().toLowerCase(),s=i[1].trim().toLowerCase();o==="font-size"&&Kg(n,"inline-style-font-size",s),o==="color"&&Kg(n,"inline-style-color",s),o==="background-color"&&Kg(n,"inline-style-background-color",s),o==="font-family"&&Kg(n,"inline-style-font-family",s)}}function ett(n,t){if(t==null)return n==null?void 0:n.normal;if(n)return n[`heading${t}`]}function ntt(n){const t=`${On(n,"inline-style-font-size")}`;if(t&&t.indexOf("px")>0)return+t.replace(/px/g,"")}function rtt(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` ${n.attributes.text} `;if(n.attributes&&n.attributes.box&&n.attributes.inputType)return n.attributes.value?`${n.attributes.value}`:" "}function itt(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function ott(n){return On(n,"inline-style-font-family")}function stt(n){const t=On(n,"inline-style-background-color");return ZS(t)}function ltt(n){const t=On(n,"inline-style-color");return ZS(t)}function att(n){ttt(n);const t=On(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!On(n,"style-code"),link:eL(On(n,"link")),size:ntt(n),text:t?itt(n):rtt(n)||n.insert,bold:!!On(n,"style-bold"),underline:!!On(n,"style-underline"),italics:!!On(n,"style-italic"),strike:!!On(n,"style-strikethrough"),superScript:!!On(n,"style-super"),subScript:!!On(n,"style-sub"),math:On(n,"type")==="math"?On(n,"src"):void 0,mention:t,fontFamily:ott(n),background:stt(n),color:t?"338fe5":YZ(tL(n,"style-color-",6))||ltt(n),highlight:tL(n,"style-bg-color-",13)}}function ctt(){return[new yt.Paragraph({border:{top:{color:"auto",style:yt.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new yt.Paragraph({spacing:{line:0}})]}function utt(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function ftt(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function dtt(n,t){return new yt.Paragraph({children:[new yt.ExternalHyperlink({children:[new yt.TextRun({style:"Hyperlink",text:t||n})],link:n})]})}function nL(n){if(n.heading!=null)return`Heading${n.heading}`}function rL(n){if(n.alignment!=null){if(n.alignment==="center")return yt.AlignmentType.CENTER;if(n.alignment==="right")return yt.AlignmentType.RIGHT;if(n.alignment==="left")return yt.AlignmentType.LEFT}}function htt(n){if(n.indent)return{left:yt.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:yt.convertInchesToTwip(.3*n.padding)}}function mtt(n){return{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function gtt(n){const t=n.split(",");if(t.length!==0)return t[0].trim()}function iL(n,t){var o;let e;e=n.inlineCode?"InlineCode":void 0,e=n.link?"Hyperlink":e;const r=n.size||t,i=r!=null?Math.floor(r*1.5+.5):void 0;return n.text=(o=n.text)==null?void 0:o.replace(/\x00/g," "),new yt.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:yt.UnderlineType.SINGLE}:void 0,italics:n.italics||void 0,strike:n.strike||void 0,superScript:n.superScript||void 0,subScript:n.subScript||void 0,size:i,style:e,font:n.fontFamily?gtt(n.fontFamily):void 0,shading:n.background?mtt(n.background):void 0,color:n.color,highlight:QZ(n.highlight)})}function ptt(n,t){if(n.link)return n.link=n.link.replace(/\x00/g," "),new yt.ExternalHyperlink({children:[iL(n,t)],link:n.link})}async function oL(n,t,e,r,i){const[o]=await i(n,t,e);if(o==null)return;const s=await QS({width:r||0,height:0,src:e},o);return new yt.ImageRun({data:o,transformation:{width:(s==null?void 0:s.width)||100,height:(s==null?void 0:s.height)||20}})}function Ctt(n){if(n.heading||n.heading)return n.heading}function Ett(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function Att(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function xtt(n,t){var r;const e=[];if(n.text&&Array.isArray(n.text)){for(let i=0;i<n.text.length;i++){const o=n.text[i];if(((r=o.attributes)==null?void 0:r.box)===!0&&t){const s=await t(o);if(s){n.text.splice(i+1,0,...s);continue}}e.push(att(o))}return e}}function btt(n){if(n.type==="list"&&n.textOnly!==!0)return{checkbox:n.checkbox,groupId:n.groupId,ordered:!!n.ordered,level:n.level||1,start:n.start||0}}function vtt(n,t){if(n.type==="embed"&&n.embedType&&Ix(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(r=>{const i=t(r),o=n.embedData[`${i}_width`],s=n.embedData[`${i}_height`];return{src:r,width:o,height:s}})}function Btt(n){if(n.padding)return n.padding}function ytt(n){return!!(n.type==="embed"&&n.embedType&&Ix(n.embedType)&&n.embedData&&n.embedData.src)}async function Vg(n,t,e){return{quoted:!!n.quoted,heading:Ctt(n),alignment:Ett(n),indent:Att(n),padding:Btt(n),texts:await xtt(n,e),list:btt(n),images:vtt(n,t),border:ytt(n)}}async function Ttt(n,t,e,r){const i=[];if(!n.children)return[];for(const o of n.children){const s=[];for(const l of t.blocks[o])s.push(await Vg(l,e,r));i.push(s)}return i}const ktt=D("to-docx"),$g=200;function Rtt(n,t){return Array(n).fill(0).map(()=>Array(t).fill(0).map(()=>({cellId:void 0,color:void 0,from:void 0,rowSpan:1,colSpan:1,width:0,originalWidth:void 0,align:void 0})))}function wtt(n,t,e,r){const i=!!n.hasColTitle,o=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<t;c++)for(let d=0;d<e;d++)(i&&d===0||o&&c===0||s&&c%2===1)&&(r[c][d].color=l)}function Stt(n){p(ktt,n.children,"no table children");const t=n.rows,e=n.cols,r=new Array(n.cols).fill($g).map((s,l)=>n.colsWidth[l]||s);if(r)for(let s=0;s<r.length;s++)r[s]===0&&(r[s]=$g);const i=Rtt(t,e);let o=0;for(let s=0;s<t;++s)for(let l=0;l<e;++l){if(i[s][l].originalWidth=r?r[l]:void 0,i[s][l].from!==void 0)continue;const c=n.children[o];o+=1,i[s][l].cellId=c,i[s][l].color=JZ(n[`${c}_background`]),i[s][l].width=r?r[l]:100,i[s][l].align=n[`${c}_align`];const d=n[`${c}_rowSpan`]||1,h=n[`${c}_colSpan`]||1;if(i[s][l].rowSpan=d,i[s][l].colSpan=h,d>1||h>1){let C=0;for(let E=0;E<d;E++)for(let A=0;A<h;A++)E===0&&(C+=r?r[l+A]:80),!(E===0&&A===0)&&(i[s+E][l+A].from=[s,l]);i[s][l].width=C}}return wtt(n,t,e,i),i}async function Ltt(n,t,e,r,i,o,s,l,c,d){async function h(E){if(l&&E.type!=="_exportVirtualBlock"){const A=await l(i,o,E);if(A){await r.addDoc(n,A,d);return}}if(E.type==="text"||E.textOnly===!0){const A=await Vg(E,s,c);await r.addTextBlock(A);return}if(E.type==="code"){const A=await Ttt(E,e,s,c);await r.addCodeBlockObject(A);return}if(E.type==="list"&&E.textOnly!==!0){const A=await Vg(E,s,c);await r.addListBlockObject(n,A);return}if(E.type==="embed"&&E.embedType){const A=E,v=A.embedData,w=A.embedType;if(Ix(w)){const S=await Vg(E,s,c);await r.addImagesBlockObject(E,S,d)}else E.embedType==="hr"?r.addSeparatorBlock():E.embedType==="video"?r.addVideoPlaceholder():E.embedType==="audio"?r.addAudioPlaceholder():E.embedType==="webpage"?r.addHyperlinkParagraph(eL(v.src),v.title):r.addOtherEmbedBlock(w,E.embedData);return}if(E.type==="table"){let A=[];if(E.colsWidth)A=new Array(E.cols).fill($g).map((w,S)=>E.colsWidth[S]||w);else{const w=E.cols;A=new Array(w);for(let S=0;S<A.length;S++)A[S]=$g;E.colsWidth=A}const v=Stt(E);await r.addTableMatrix(A,v,e),r.addEmptyParagraph()}E.type==="_exportVirtualBlock"&&await r.addVirtualBlock(E.id,e,d)}function C(E){var w;const A=((w=E==null?void 0:E.embedData)==null?void 0:w.exportSpec)||(E==null?void 0:E.exportSpec);if(!A)return[E];const v=[];for(const{type:S,data:U}of A){if(S==="text"){const M={id:it(),text:[{insert:U}],type:"text"};v.push(M);continue}if(S==="image"){const M={id:it(),type:"embed",embedType:"image",align:"left",embedData:{src:U}};v.push(M);continue}if(S==="link"){const M={id:it(),type:"embed",embedType:"webpage",embedData:{src:U.url,title:U.title}};v.push(M);continue}if(S==="block")for(const M of U){if(!e.blocks[M])continue;const rt={id:M,type:"_exportVirtualBlock"};v.push(rt)}}return v}for(const E of t)for(const A of C(E))!A||await h(A)}function Itt(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const Dtt=D("to-docx");class _tt{constructor(t,e,r,i,o,s){m(this,"paragraphs");this.appId=t,this.docId=e,this.state=r,this.readImageFunc=i,this.convertBlocksFunc=o,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(t){this.paragraphs.push(new yt.Paragraph({heading:nL(t),alignment:rL(t),children:await this.paragraphsFromBlockTexts(t),indent:htt(t)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new yt.Paragraph({text:`[${_.t("docx.imageExportFailed")}]`,shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(t){if(t.texts==null)return;const e=ett(this.defaultFontSize,t.heading),r=[];for(const i of t.texts){if(i.link){const o=ptt(i,e);o&&r.push(o);continue}if(i.box&&i.box.type&&i.box.type==="br"){r.push(new yt.TextRun({text:"",break:1}));continue}if(i.box&&i.box.type&&i.box.type==="image"){const o=await oL(this.appId,this.docId,i.box.src,i.box.width,this.readImageFunc);o&&r.push(o);continue}if(i.math){const o=await oL(this.appId,this.docId,i.math,0,this.readImageFunc);o&&r.push(o);continue}r.push(iL(i,e))}return r}async addCodeBlockObject(t){for(const e of t)for(const r of e){const i={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new yt.Paragraph({style:"Code",border:{left:{...i},right:{...i},top:{...i},bottom:{...i}},children:await this.paragraphsFromBlockTexts(r)}))}}async addListBlockObject(t,e){if(e.list==null)return;let r;const i=e.list.checkbox?`${t}-${e.list.groupId}-${e.list.checkbox}`:`${t}-${e.list.groupId}`;if(this.state.listInstMap[i])r=this.state.listInstMap[i];else if(r=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[i]=r,e.list.start>0&&e.list.ordered){const s=`number-numbering-reference-${r}`,l=JS([e.list.level-1],e.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:r}),this.state.listRefMap[i]=s}else e.list.ordered?this.state.listRefMap[i]=ch.NUMBERING:e.list.checkbox&&e.list.checkbox==="checked"?this.state.listRefMap[i]=ch.CHECKED:e.list.checkbox&&e.list.checkbox==="unchecked"?this.state.listRefMap[i]=ch.UNCHECKED:this.state.listRefMap[i]=ch.BULLET;const o=nL(e);e.texts&&this.paragraphs.push(new yt.Paragraph({heading:o,children:await this.paragraphsFromBlockTexts(e),numbering:{reference:this.state.listRefMap[i],level:e.list.level-1,instance:r}}))}imageDimWithBufferToImageRun(t){return new yt.ImageRun({data:t.buffer,transformation:{width:t.width,height:t.height}})}async addImagesBlockObject(t,e,r){if(e.images==null){if(t.type==="embed"&&t.embedType==="image"){const{src:c}=t.embedData;c||this.addEmptyImagePlaceHolder()}return}const i=[],o=await Promise.all(e.images.map(async c=>{const[d,h]=await this.readImageFunc(this.appId,this.docId,c.src);if(d){const C=await QS(c,d);if(C)return C}i.push(h)}));zZ(o,r,t.embedData);const s=jZ(o,r),l={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new yt.Paragraph({border:e.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:rL(e)||yt.AlignmentType.CENTER,children:s.map(c=>this.imageDimWithBufferToImageRun(c)).flatMap((c,d,h)=>c==null?[]:h.length-1!==d?[c,new yt.TextRun({text:" "})]:c)})),i.forEach(c=>{this.addHyperlinkParagraph(c)})}addSeparatorBlock(){ctt().forEach(t=>this.paragraphs.push(t))}addEmptyParagraph(){this.paragraphs.push(new yt.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(utt())}addAudioPlaceholder(){this.paragraphs.push(ftt())}addHyperlinkParagraph(t,e){t!=null&&this.paragraphs.push(dtt(t,e))}async addTableMatrix(t,e,r){const i=t.map(o=>o!==0?o*15:1500);this.paragraphs.push(new yt.Table({rows:await this.generateTableRows(e,r),columnWidths:i}))}async generateRowCells(t,e){const r=[];for(const i of t){const o=i.cellId;if(o===void 0)continue;const s=i.width*.9;r.push(new yt.TableCell({children:await this.convertBlocksFunc(o,e.blocks[o],e,this.appId,this.docId,this.state,s),columnSpan:i.colSpan,rowSpan:i.rowSpan,width:{type:yt.WidthType.DXA,size:i.width*15},shading:i.color?{fill:i.color,type:yt.ShadingType.CLEAR,color:"auto"}:void 0}))}return r}async generateTableRows(t,e){const r=[];for(const i of t)r.push(new yt.TableRow({children:await this.generateRowCells(i,e)}));return r}async addDoc(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks.root,e,this.appId,this.docId,this.state,r);i&&(this.paragraphs=this.paragraphs.concat(i))}async addVirtualBlock(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks[t],e,this.appId,this.docId,this.state,r);this.paragraphs.push(...i)}async addOtherEmbedBlock(){}}class Mtt{constructor(t,e,r,i,o,s,l,c){m(this,"convertBlocks",async(t,e,r,i,o,s,l=720)=>{const c=new _tt(i,o,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await Ltt(t,e,r,c,i,o,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=t,this.docData=e,this.md5HexFunc=r,this.readImage=i,this.defaultFontSize=o,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(t,e){return this.snapshot2docx(this.docData,t,e)}async snapshot2docx(t,e,r){const i=new yt.ImportDotx,o=this.templateData?await i.extract(this.templateData):void 0,s=t.blocks.root;p(Dtt,s,"data must have blocks");const l=Itt(),c=await this.convertBlocks("blocks",s,t,e,r,l),d=this.backgroundImageOptions?{default:new yt.Header({children:[new yt.Paragraph({children:[new yt.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new yt.Document({numbering:{config:[...XZ,...l.levelConfigs]},sections:[{headers:d,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:o});return yt.Packer.toBlob(h)}}const Utt=D("editor-to-docx");async function Ott(n,t,e,r){const i=n.doc.buildResourceUrl(r,{withToken:!0});let o=await vS(i);if(!o)return[void 0,i];if(o.type.indexOf("/svg")!==-1){const l=await AS(o);l&&(o=new File([l],o.name))}return[await o.arrayBuffer(),i]}async function Ntt(n,t,e){const r=n.editorBlocks.getBlockClass(e.type);if(r.toStandardDoc)try{return await r.toStandardDoc(n,e,t)}catch(i){Utt.error(`toStandardDoc error: ${JSON.stringify(i)}`);return}}async function Ptt(n,t){const e=t.attributes,r=n.editorBoxes.getBoxClass(e.type);if(r.toStandardText)return r.toStandardText(n,e)}async function Ftt(n,t){let{template:e,download:r,backgroundImageOptions:i}=t!=null?t:{};e||(e=VZ());const o=n.doc.toJSON(),s=(C,E,A)=>Ott(n,C,E,A),l=async(C,E,A)=>Ntt(n,o,A),c=async C=>Ptt(n,C),h=await new Mtt(e,o,nm.default,s,void 0,l,c,i).convert("_appId","_docId");if(r){const C=URL.createObjectURL(h),E=document.createElement("a");E.setAttribute("download",`${bS(n)}.docx`),E.setAttribute("href",`${C}`),E.click(),E.remove()}return h}const Dx=D("create-editor");async function Ktt(n,t){var s,l,c,d,h,C,E,A,v,w,S,U,M,V,rt,Y;p(Dx,n,"app does not exists"),t.lang&&_.setLang(t.lang),Br.level=(s=t.logLevel)!=null?s:Gi.DEBUG;const e=t.onReauth?async()=>{var ct;const X=t.user.userId,ft=t.docId,pt=await((ct=t.onReauth)==null?void 0:ct.call(t,X,ft,t.permission));return{userId:X,docId:ft,permission:t.permission,appId:t.appId,token:pt,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl}}:void 0,r={auth:{appId:t.appId,docId:t.docId,userId:t.user.userId,permission:t.permission,token:t.token,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl},serverUrl:t.serverUrl,reauthFunc:e,disableLogout:t.disableLogout,onMaxUsersError:t.onMaxUsersError},i=await md.load(r),o=td(n,i,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,enableComments:t==null?void 0:t.enableComments,enableContextMenu:t==null?void 0:t.enableContextMenu,components:{blocks:[...WS,...((l=t==null?void 0:t.components)==null?void 0:l.blocks)||[]],embeds:[...Lx,...((c=t.components)==null?void 0:c.embeds)||[]],boxes:[...qS,...((d=t.components)==null?void 0:d.boxes)||[]],commandProviders:[new F0,...((h=t.components)==null?void 0:h.commandProviders)||[]],decorators:[new dg,new XC],insertions:[q1],blockHooks:[new MA,new fw,...((C=t.components)==null?void 0:C.blockHooks)||[]],textRenders:[new L4,new XE,...((E=t.components)==null?void 0:E.textRenders)||[]],options:{...t.componentsOptions}},shortcuts:[Gq,AH,Iz,hA,n4,kF,lA,LX,s0,AF,...t.shortcuts||[]],colors:["#0064FF","#EB3723","#F59300","#00A865","#F25A0A","#70A310","#009CAD","#0990D9","#8851ED","#D62069"]});if(o.editorCommandProviders.registerCommandProvider(new po(o)),o.input.addHandler(new AY),o.input.addHandler(new mg),o.input.addHandler(new XK),o.input.addHandler(new Bz),o.input.addHandler(new vA(o,{hideTitle:t.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0,applyContentPlaceholder:(A=t.placeholder)==null?void 0:A.applyContentPlaceholder})),o.input.addHandler(new sg(o,(v=t.componentsOptions)==null?void 0:v.quickMenu)),o.input.addHandler(new KA(o)),o.input.addHandler(new WA(o)),o.input.addHandler(new Eg),o.input.addHandler(new Uk),o.doc.registerCallback(new xY(o)),o.addCustom("remote-cursor",()=>new mT(o)),o.addCustom("block-menu",X=>new mw(X)),de.isMobile||o.addCustom("editor-tooltip",()=>new Ld(o)),t!=null&&t.enableComments&&o.addCustom("editor-comments",X=>new S4(X,new UZ(X))),t.enableContextMenu!==!1&&o.addCustom("editor-context-menu",X=>new YA(X)),o.addCustom("create-options",()=>new Ub(o,t)),o.addCustom("drop-target",()=>new qd(o)),o.addCustom("list-to-mindmap",()=>new tg(o)),o.addCustom("list-to-mention",()=>new VY(o)),o.addCustom("mobile-helper",()=>new uQ(o)),o.addCustom("code-caret",()=>new gH(o)),o.addCustom("image-paste-handler",()=>new FA(o)),(w=t.componentsOptions)!=null&&w.mention){const X=t.componentsOptions.mention;o.addCustom("mention",()=>new mS(o,X))}if(o.addCustom("heading-collapse",()=>new mx(o)),o.addCustom(lh,X=>new bx(X)),bu.register(o),qd.register(o),Dl.register(o),kl.register(o),o.addListener("clickLink",(X,ft,pt)=>{var wt;if((wt=t==null?void 0:t.events)!=null&&wt.onClickLink){t.events.onClickLink(X,ft,pt);return}const ct=pt.getAttribute("link");ct&&(X.readonly||ft.ctrlKey||ft.metaKey)&&window.open(ct,"_blank")}),(U=(S=t.componentsOptions)==null?void 0:S.remoteCarets)!=null&&U.onUserChanged){const X=(V=(M=t.componentsOptions)==null?void 0:M.remoteCarets)==null?void 0:V.onUserChanged;o.doc.getRemoteUsers().on("change",ft=>{X(o,ft)})}return(Y=(rt=t.componentsOptions)==null?void 0:rt.templates)!=null&&Y.templates.length&&(o.addListener("docChanged",()=>{Pg(o)}),o.addListener("resize",()=>{Pg(o,{reset:!0})}),setTimeout(()=>{Pg(o)},100)),o.doc.registerCallback({onError:async X=>{if(X.code==="ResetDoc"){Dx.error(`reset doc: ${X.message}`);const ft=await md.load(r);o.doc.reset(ft)}}}),o.version="1.1.34",Br.level===Gi.DEBUG&&(window.setReauthFail=X=>{window.isReauthError=X},window.reConnect=X=>o.doc.externalDoc.client.connection.reConnect(X)),o}function Vtt(n){return n.toJSON!==void 0}async function $tt(n,t,e){var o,s,l,c,d,h,C,E;p(Dx,n,"app does not exists");const r=Vtt(t)?t:new RC(t,{serverUrl:e.serverUrl||""});e.lang&&_.setLang(e.lang),Br.level=(o=e.logLevel)!=null?o:Gi.DEBUG;const i=td(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[dA,xA,bA,Ok,...(l=(s=e.components)==null?void 0:s.blocks)!=null?l:[]],commandProviders:[new F0],decorators:[new dg,new XC],embeds:[...Lx,...((c=e.components)==null?void 0:c.embeds)||[]],boxes:[qk,gS,P4,...((d=e.components)==null?void 0:d.boxes)||[]],insertions:[q1],blockHooks:[new MA,...((h=e.components)==null?void 0:h.blockHooks)||[]],textRenders:[new L4,new XE,...((C=e.components)==null?void 0:C.textRenders)||[]],options:{...e.componentsOptions}},shortcuts:[hA,n4,lA,s0]});return i.editorCommandProviders.registerCommandProvider(new po(i)),i.input.addHandler(new mg),i.input.addHandler(new vA(i,{hideTitle:e.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new sg(i,(E=e.componentsOptions)==null?void 0:E.quickMenu)),i.input.addHandler(new KA(i)),i.input.addHandler(new WA(i)),i.input.addHandler(new Eg),i.input.addHandler(new Uk),i.addCustom("block-menu",A=>new mw(A)),de.isMobile||i.addCustom("editor-tooltip",()=>new Ld(i)),i.addCustom("image-paste-handler",()=>new FA(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",A=>new S4(A,new OZ(A,r))),e.enableContextMenu!==!1&&i.addCustom("editor-context-menu",A=>new YA(A)),i.addCustom("heading-collapse",()=>new mx(i)),i.addListener("clickLink",(A,v,w)=>{var U;if((U=e==null?void 0:e.events)!=null&&U.onClickLink){e.events.onClickLink(A,v,w);return}const S=w.getAttribute("link");S&&(A.readonly||v.ctrlKey||v.metaKey)&&window.open(S,"_blank")}),i.addCustom(lh,A=>new bx(A)),bu.register(i),i.version="1.1.34",i}async function Htt(n,t,e){var h;const r=n.doc.externalDoc.client.auth,i=await E0.load({auth:r,serverUrl:e});if(!((h=i.getVersionHelper)==null?void 0:h.call(i)))throw new Error("the editor does not support to show versions");const s=n.getCustom("create-options");if(!s)throw new Error("the editor does not support to show versions");const l=s.getData(),c=new XS(l),d=n.addCustom("version-dialog",()=>new tS(i,c));return d.show(t),d}b.tippy=g9,b.AnchorBox=DB,b.AuthError=dd,b.AuthHeader=va,b.AutoScroll=bm,b.BaseURLHeader=nu,b.BasicCommands=CK,b.BlockExclusiveHook=fw,b.BlockLockerHook=MA,b.BlockLockerPasteHandler=Eg,b.BlockResizer=Pd,b.BrBox=wB,b.CodeBlock=xA,b.CodeLineBlock=bA,b.CodeTextDecorator=dg,b.DOC_RE_AUTH_KEYS=lh,b.DefaultShortcuts=s0,b.DocIdError=sO,b.DocReAuthCallbacks=bx,b.DragDrop=Zb,b.DrawioEmbed=OS,b.EditorBlocks=f3,b.EditorBoxes=LB,b.EditorCommandProviders=wy,b.EditorComplexBlockPosition=xi,b.EditorComplexSelectionRange=Ji,b.EditorDecorators=OB,b.EditorEmbeds=h3,b.EditorInsertions=UB,b.EditorSimpleBlockPosition=Cn,b.EditorSimpleSelectionRange=yn,b.EmbedBlock=g3,b.EmbedBlockResizer=nh,b.EnforceWithDocumentTitleHandler=vA,b.EventCallbacks=Lc,b.FILL_CHAR=I8,b.FileExtError=lO,b.GroupOrder=Kk,b.HeadingBlockScrollListener=MY,b.ImageBox=IB,b.InlineBoxCommandProvider=tR,b.InputtingInsertion=_B,b.LocalDoc=RC,b.LogLevel=Gi,b.Logger=Br,b.MIN_DISTANCE_THRESHOLD=Qb,b.ManualCloseDialog=pd,b.ManualMenu=hl,b.ManualToolbar=gd,b.MarkdownInputHandler=mg,b.MaxUserError=KC,b.Mindmap=Z0,b.OnesEditorAutoSuggest=pE,b.OnesEditorCustomDataWrapper=Ub,b.OnesEditorExclusiveBlock=kl,b.OnesEditorHoveringBlock=je,b.OnesEditorIcons=GO,b.OnesEditorQuickMenu=sg,b.OnesEditorToc=sh,b.OnesEditorTocProvider=Dl,b.OnesEditorToolbar=bu,b.OnesEditorTooltip=Ld,b.OnesEditorVersionsDialog=tS,b.PermissionError=C0,b.Popup=su,b.ReAuthToolbar=BS,b.RemoteCarets=mT,b.RemoteCaretsDecorator=XC,b.RemoteCaretsInsertion=q1,b.RemoteUsers=ed,b.RequestReloadError=hd,b.RichText=zn,b.ShareDBDoc=md,b.ShareDBDocVersionsProvider=XS,b.ShareDBServer=E0,b.SimpleCache=Hb,b.StandardEmbedBlockCommands=sx,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=R1,b.TEXT_STYLE_COLOR_PREFIX=k1,b.TableBlock=dA,b.TableBlockCommandProvider=F0,b.TableShortcuts=hA,b.TextBlock=ur,b.TextBox=RB,b.TextColorItem=D2,b.TextStyleShortcuts=lA,b.TocEmbed=dS,b.ZERO_WIDTH_SPACE_CHAR=_c,b.abbreviation=vm,b.addAttribute=Im,b.addClass=q,b.addCommentToBlock=eh,b.addDays=TI,b.addMetaToDoc=Jf,b.addMonths=yI,b.animateScrollTo=oa,b.applyPlaceholderToBlock=Od,b.assert=p,b.autoShowHideTemplates=Pg,b.bindKeyDownEvent=hm,b.blockToDoc=bC,b.blockToHtml=Q1,b.blockToMarkdown=Wm,b.blockToText=Gm,b.blocksToDoc=Q5,b.clearAllSelection=zv,b.clientType=de,b.cloneBlock=sl,b.cloneChildContainer=lC,b.cloneDoc=aC,b.cloneText=EB,b.commentToShareDbComment=qC,b.compareElement=um,b.comparePosition=E1,b.complexBlockAdjustSelectionPos=wm,b.complexBlockFindNearestChildBlock=B7,b.complexBlockGetAllChildContainers=_n,b.complexBlockGetBottomChildContainers=A3,b.complexBlockGetDeepFirstChild=p3,b.complexBlockGetFirstSimpleChild=x1,b.complexBlockGetLastSimpleChild=Fc,b.complexBlockGetSelectedContainers=Pc,b.complexBlockGetTopChildContainers=E3,b.containerToDoc=J5,b.continuousScroll=pv,b.convertBlockFrom=km,b.convertImageFileToPng=AS,b.convertImageSrcToPng=rQ,b.converterIntercept=hg,b.copyBlockAttributes=XB,b.copyResourcesFromDoc=kC,b.createBlockAnchor=jo,b.createBlockCaretAnchor=b3,b.createBlockContentElement=da,b.createBlockElement=Pv,b.createBlockSimpleDocRange=Vm,b.createBlockSimpleRange=Ie,b.createBoxContentElement=Vv,b.createBoxElement=Fv,b.createBoxOp=CB,b.createChildContainer=c3,b.createComplexBlockPosition=Ue,b.createComplexDocPos=BB,b.createComplexDocRange=M8,b.createContainer=xB,b.createContainerElement=n1,b.createDeleteOps=hB,b.createEditor=td,b.createEditorSelectionRange=En,b.createElement=B,b.createEmptyContainer=Yo,b.createEmptyDoc=Xo,b.createEmptyTextBlockData=Fm,b.createExpandedRange=am,b.createIconButton=na,b.createImage=Mp,b.createInsertOps=Nm,b.createInsertionContentElement=jv,b.createInsertionElement=$v,b.createLocalEditor=$tt,b.createOnesEditor=Ktt,b.createRange=jb,b.createRichText=Ea,b.createRootContainer=a3,b.createSimpleBlockPosition=mt,b.createSimpleDocPos=vB,b.createTextBlockData=no,b.createTextButton=Sa,b.createTextOp=Xr,b.createTextWithReplaceSoftReturn=F1,b.daysAfter=Xp,b.deleteText=V1,b.diffDays=kI,b.disablePageScroll=zp,b.docToHtml=jB,b.docToHtmlFragment=zf,b.docToMarkdown=zB,b.docToText=ol,b.downloadImageToFile=vS,b.downloadObjectToFile=yx,b.downloadSvgToString=RS,b.editLink=kd,b.editorAddComment=Nq,b.editorAddTextAttribute=s5,b.editorAutoInsertBlock=YB,b.editorBreakTextBlock=Xc,b.editorClearCompositionText=eC,b.editorClearSelectedContents=Jm,b.editorCopyBlock=yC,b.editorCopyDoc=o0,b.editorDeleteBlock=iC,b.editorDeleteBlockText=nC,b.editorDeleteBlockWithoutChildren=Ym,b.editorDeleteChildContainer=I_,b.editorDeleteChildContainers=QB,b.editorFocusToBlock=sC,b.editorFocusToEnd=Y_,b.editorGetBlockData=Qo,b.editorGetBlockText=Jn,b.editorGetBlockTextEx=Hm,b.editorGetBoxData=TB,b.editorHandleKeyboardEvent=uy,b.editorInsertBlock=qc,b.editorInsertBoxToBlock=WB,b.editorInsertDoc=i5,b.editorInsertDocAt=cC,b.editorInsertText=tC,b.editorInsertTextToBlock=GB,b.editorInsertTextToBlockEx=Z1,b.editorMergeTextBlock=JB,b.editorMoveDown=A5,b.editorMoveEnd=pC,b.editorMoveHome=S5,b.editorMoveLeft=p5,b.editorMoveLineEnd=N5,b.editorMoveLineHome=O5,b.editorMovePageDown=H5,b.editorMovePageUp=$5,b.editorMoveRight=C5,b.editorMoveUp=E5,b.editorMoveWordEnd=k5,b.editorMoveWordLeft=T5,b.editorRangeClearColor=a5,b.editorRangeGetColor=c5,b.editorRangeSetColor=l5,b.editorRemoveTextAttribute=U_,b.editorReplaceBlockText=Zm,b.editorReplaceContainer=o5,b.editorRunOnce=wC,b.editorSelectAll=EC,b.editorSelectContainer=n0,b.editorSelectDown=x5,b.editorSelectEnd=CC,b.editorSelectHome=L5,b.editorSelectLeft=b5,b.editorSelectLineEnd=U5,b.editorSelectLineHome=M5,b.editorSelectPageDown=G5,b.editorSelectPageUp=z5,b.editorSelectRight=v5,b.editorSelectUp=B5,b.editorSelectWordEnd=w5,b.editorSelectWordLeft=R5,b.editorSetTextColor=Yc,b.editorShowFindDialog=wW,b.editorToDocx=Ftt,b.editorUpdateBlockData=t0,b.editorUpdateCompositionText=qB,b.editorUpdateEmbedData=n5,b.enablePageScroll=Gp,b.escapeHtmlText=mm,b.escapeRegExp=Zp,b.escapeSpace=sI,b.exclusiveBlock=IA,b.executeBlockCommand=t3,b.executeEmbedBlockCommand=Zv,b.executeRangeCommand=Ry,b.fileToDataUrl=Mc,b.findAfterOffsetNotType=z1,b.findAllText=AC,b.findBlockByIndex=Lv,b.findEventTargetBlock=Wb,b.findInsertionById=Hv,b.findNextOffset=t_,b.findNextVisibleSimpleBlock=Dy,b.findPrevOffset=Z8,b.findPrevOffsetNotType=j1,b.findPrevSimpleBlockBeforeChildContainer=C3,b.findPrevVisibleSimpleBlock=Iy,b.findTarget=Dc,b.findWordEnd=W1,b.findWordLeft=G1,b.format=Rf,b.formatBytes=Cv,b.formatDate=Qp,b.fragmentToHtml=uv,b.fromBase64=Bf,b.fromBase64ToBlob=Hp,b.fromBase64ToUint8Array=CI,b.fromDocRange=nl,b.fromNowString=Jp,b.genId=it,b.generateEditorContainerId=e1,b.getAllChildBlocks=y1,b.getAllQuickMenuItems=sA,b.getAllSelectedBlocks=Zi,b.getAttributesAt=Hc,b.getBlockBackground=o1,b.getBlockByIndex=Js,b.getBlockCaretRect=tl,b.getBlockClass=le,b.getBlockClassByType=ca,b.getBlockClientRects=Vo,b.getBlockCommandsWithHook=d1,b.getBlockContent=zt,b.getBlockHeading=Df,b.getBlockId=dt,b.getBlockIndex=Rt,b.getBlockInfo=Hd,b.getBlockKind=Ei,b.getBlockMinWidth=Wv,b.getBlockNearestRangeFromPoint=v1,b.getBlockOptions=FI,b.getBlockPath=el,b.getBlockProperties=Yv,b.getBlockRangeFromPoint=Sm,b.getBlockStyles=PI,b.getBlockTextLength=At,b.getBlockTools=ve,b.getBlockType=Ot,b.getBoxContent=l1,b.getBoxId=Kv,b.getBoxTypeFromElement=If,b.getChildBlockCount=Xi,b.getChildBlocks=ke,b.getChildOffset=rl,b.getColorFromAttributes=S1,b.getColorFromContent=Bm,b.getComplexBlockClass=jr,b.getContainerBlockPath=o3,b.getContainerBlocks=wv,b.getContainerBlocksElement=Sf,b.getContainerById=Ci,b.getContainerId=Et,b.getContainerMinWidth=p1,b.getContainerToolsElement=UI,b.getContainerWidth=u3,b.getDistanceSquare=Ys,b.getElementFromPoint=Fe,b.getElementOffset=bf,b.getElementScale=Hr,b.getEmbedType=ln,b.getExistsBlockTools=ym,b.getExistsContainerById=wf,b.getFileExt=kf,b.getFirstChildBlock=Me,b.getFirstClientRect=cm,b.getHeadingBlockChildren=Nc,b.getHeadingMenuOptions=nA,b.getHorizontalPadding=Op,b.getInsertionContent=a1,b.getLastChildBlock=We,b.getLastClientRect=ra,b.getListAllNextBrothers=pu,b.getLogger=D,b.getNextBlock=ae,b.getNextHiddenBlocks=r3,b.getNextValidOffset=pa,b.getNextVisibleBlock=Gr,b.getOffsetFromPoint=Up,b.getOffsetInfoAfter=$f,b.getOffsetInfoBefore=jm,b.getOpAt=W3,b.getOpLength=Lm,b.getParentBlock=et,b.getParentBlockExcludeSelf=fa,b.getParentBox=s1,b.getParentContainer=at,b.getPrevBlock=ze,b.getPrevValidOffset=il,b.getPrevVisibleBlock=zr,b.getRangeCommands=Ty,b.getReferenceClientRect=fk,b.getRootBlock=f1,b.getScrollContainer=pn,b.getSpecialBlockCommands=Qv,b.getStandardEmbedBlockProperties=lx,b.getTextAfterOffset=Q8,b.getTextAttributes=J1,b.getTextBeforeOffset=J8,b.getTextBlockChild=Uf,b.getTextBlockClass=Dv,b.getTextBlockContentChildTextLength=qr,b.getTextBlockContentChildType=i3,b.getTextBlockContentChildren=Qi,b.getTextLength=jn,b.getTextOpLength=T1,b.getTextWidth=Em,b.getToolbar=G0,b.handleBlockElementUpdated=qv,b.hasAltOnly=dI,b.hasClass=Mt,b.hasCtrlOrCmd=ov,b.hasCtrlOrCmdOnly=fI,b.hashCode=yv,b.hideBlock=Nv,b.hideTemplates=ES,b.htmlToFragment=Cm,b.i18n=_,b.includeBigTable=vN,b.injectDocToHtmlFragment=Qf,b.injectStyle=Yb,b.inputActions=pM,b.insertEmptyBlock=$I,b.insertEmptyEmbedBlock=h1,b.insertText=qo,b.intersectionCommands=XM,b.isBackspace=lv,b.isBlock=ua,b.isBlockLocked=Cg,b.isBlockLockedByOthers=_A,b.isBlockLockedBySelf=jd,b.isBlockTools=Ov,b.isBox=Tm,b.isBoxOp=zo,b.isCJK=rv,b.isChildContainer=pi,b.isChildNode=Ae,b.isCodeBlock=Di,b.isCollapsedHeadingBlock=Yi,b.isCollapsedRange=_8,b.isComplexBlockPosition=ma,b.isComplexKindBlock=Pt,b.isContainer=Qs,b.isContainerSelectedAllChildBlocks=W5,b.isControlEvent=la,b.isDelete=mI,b.isDraggingFiles=Am,b.isElementVisible=dm,b.isEmbedBlock=Le,b.isEmptyContainer=Of,b.isEmptyDoc=$1,b.isEmptyTextBlock=Be,b.isEmptyTextBlockWithoutCompositionText=Ud,b.isEnterOnly=sv,b.isEscape=pm,b.isExclusiveBlock=$d,b.isExpandedHeadingBlock=n3,b.isFirefox=Af,b.isFirstChildBlockInComplexBlock=v7,b.isHeadingBlock=Dn,b.isHighSurrogate=nI,b.isInBlock=c1,b.isInBlockTools=Oc,b.isLetter=nv,b.isLowSurrogate=rI,b.isMatchShortcut=Wi,b.isMoveForward=cI,b.isNavigationEvent=aI,b.isNavigationKey=iv,b.isNodeRemoved=xf,b.isNumber=ev,b.isPrintableKey=Vp,b.isRootBlock=Wr,b.isRootContainer=ie,b.isSafari=ea,b.isSameDay=Yp,b.isSelectBoxOnly=ei,b.isShiftEnter=hI,b.isShiftTab=pI,b.isShortcutEvent=uI,b.isSimpleBlock=NI,b.isSimpleBlockPosition=bi,b.isSimplePos=bB,b.isSimpleRange=Km,b.isSpace=gm,b.isTab=gI,b.isTextBlockContentBoxChild=yr,b.isTextBlockContentChild=_f,b.isTextBlockContentInsertionChild=Ho,b.isTextBlockContentTextChild=Mf,b.isTextKindBlock=st,b.isTextKindBlockType=Lf,b.isTitleBlock=Ko,b.isToday=Ev,b.isValidOffset=cr,b.isVisibleBlock=Zs,b.isYesterday=Av,b.loadJs=Gb,b.loadJsPromise=ia,b.lockers=gi,b.md5=kv,b.mergeCommands=z0,b.mergeDocs=Aa,b.mergeOps=K1,b.mergeText=S8,b.multiSplitText=X3,b.overflowText=xv,b.parseShortcut=av,b.patchNode=yf,b.pointInRect=sa,b.rangeAddAttribute=Ff,b.rangeGetTextColor=nB,b.rangeRemoveAttribute=$c,b.rangeSetTextColor=Z3,b.rangeTransformText=Q3,b.registerDragDrop=Fp,b.removeAttribute=w1,b.removeClass=ut,b.removeLastBr=T8,b.removePlaceholderFromBlock=OR,b.removeStyle=Xb,b.replaceAll=RI,b.replaceAllCaseInsensitive=wI,b.replaceAllText=X5,b.replaceText=Pm,b.requestDownload=xm,b.resetListStart=Eu,b.scrollIntoView=jf,b.scrollable=gv,b.selectFile=Uc,b.selectedBlockToDoc=r0,b.selectionToDoc=Qc,b.setAttributes=fm,b.setClipboardData=Tf,b.setClipboardDataByEvent=xI,b.setColorToAttributes=tB,b.setDataset=Np,b.setDefaultCursor=vf,b.setStyles=Pp,b.shareDBCommentToDocObject=WC,b.shareDBDocCommentToComment=dT,b.shortcutToDisplayText=gn,b.showBlock=i1,b.showDocVersions=Htt,b.showTemplates=Ax,b.splitText=ar,b.splitToThree=an,b.stringToDataUrl=jp,b.stringToObjectUrl=Wp,b.subText=Y3,b.textNodeOffsetFromPoint=zb,b.titleFromEditor=bS,b.toBase64URL=qi,b.toMindmap=J0,b.toPlainText=Re,b.toPlainTextKeepLength=H1,b.trimChar=Kp,b.unexclusiveBlock=DA,b.unicodeLength=iI,b.unicodeSubstr=oI,b.updateBlockSelection=Gv,b.updateOpAttributes=AB,b.updateTextBlockContent=Y8,b.updateUrl=$p;for(const n in He)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>He[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
963
+ \`\`\`\`\`\``}return""}const iZ={embedType:"plantuml",convertFrom:eZ,handleUpdateBlock:tZ,createEmbedContent:ZJ,getBlockProperties:nZ,convertTo:rZ},uct="",oZ="hr",sZ={dividingLine:{type:"\u5206\u5272\u7EBF",abstract:"\u5206\u5272\u7EBF"}},lZ={dividingLine:{type:"Dividing-Line",abstract:"Dividing-Line"}},aZ={dividingLine:{type:"\u533A\u5207\u308A\u7DDA",abstract:"\u533A\u5207\u308A\u7DDA"}};_.mergeLang({"zh-CN":sZ,"en-US":lZ,"ja-JP":aZ});function cZ(n,t){const e=B("div",["editor-embed-container"],t);B("hr",["editor-embed-hr"],e)}function uZ(n,t,e,r){return r==="html"?"<hr />":r==="markdown"?"---":"------------"}function fZ(){return{name:"hr",insertEmbedCommandItems:[{id:"insert-hr",name:_.t("dividingLine.type"),icon:qT,order:500,group:"common",subText:tr("insert-hr")}],handleInsertEmptyEmbed:async(n,t)=>{const{containerId:e,blockIndex:r}=t;return n.insertEmbed(e,r,oZ,{})}}}function dZ(n,t,e){const{data:r}=e;if(!r||r.embedType!=="dividing-line"||!st(n,t))return null;const i={};return{blockData:{id:it(),type:"embed",embedType:"hr",embedData:i}}}function hZ(){return{abstract:_.t("dividingLine.abstract")}}const mZ={embedType:"hr",createEmbedContent:cZ,convertTo:uZ,getOptions:fZ,convertFrom:dZ,getBlockProperties:hZ},fct="",dct="",gZ={media:{upload:{failed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>',maxSizeFailed:'<div class="line-1">{name}\u4E0A\u4F20\u5931\u8D25</div><div class="line-2">\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u9650\u5236\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u6587\u4EF6</div>'},load:{failed:'<div class="line-1">{name}\u52A0\u8F7D\u5931\u8D25</div><div class="line-2">\u7F51\u7EDC\u670D\u52A1\u5F02\u5E38\uFF0C\u4F60\u53EF\u4EE5 <span class="retry-upload">\u91CD\u8BD5</span></div>'},audio:{menuItem:"\u97F3\u9891",abstract:"\u97F3\u9891"},video:{menuItem:"\u89C6\u9891",abstract:"\u89C6\u9891"}}},pZ={media:{upload:{failed:'<div class="line-1">{name} upload failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>',maxSizeFailed:'<div class="line-1">{name} upload failed</div><div class="line-2">The file size exceeds limit. Please choose another file.</div>'},load:{failed:'<div class="line-1">{name} loading failed</div><div class="line-2">Network error, you can <span class="retry-upload">Retry</span></div>'},audio:{menuItem:"Audio",abstract:"Audio"},video:{menuItem:"Video",abstract:"Video"}}},CZ={media:{upload:{failed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>',maxSizeFailed:'<div class="line-1">{name}\u306E\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F</div><div class="line-2">\u30D5\u30A1\u30A4\u30EB\u306E\u30B5\u30A4\u30BA\u304C\u4E0A\u9650\u3092\u8D85\u3048\u3066\u3044\u308B\u305F\u3081\u3001\u4ED6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044</div>'},load:{failed:'<div class="line-1">{name}\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F</div><div class="line-2">\u304A\u4F7F\u3044\u306E\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u63A5\u7D9A\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u6B21\u306E\u64CD\u4F5C\u3092\u884C\u3063\u3066\u304F\u3060\u3055\u3044\u3002 <span class="retry-upload">\u518D\u8A66\u884C</span></div>'},audio:{menuItem:"\u97F3\u58F0",abstract:"\u97F3\u58F0"},video:{menuItem:"\u52D5\u753B",abstract:"\u52D5\u753B"}}};_.mergeLang({"zh-CN":gZ,"en-US":pZ,"ja-JP":CZ});var Ui=(n=>(n.AUDIO="audio",n.VIDEO="video",n))(Ui||{}),ah=(n=>(n.Empty="empty",n.Progress="progress",n.Error="error",n))(ah||{});const VS=10*1024*1024,EZ=["wav","mp3","aac","ogg","webm","flac"],AZ=["ogg","mp4","webm"],xZ=()=>{};function $S(n){var h,C,E,A,v,w;const t=(h=n.getComponentOptions("media"))!=null?h:{},{allowedMedias:e,maxSize:r,callbacks:i}=t,o=(C=e==null?void 0:e.audio)!=null?C:EZ,s=(E=e==null?void 0:e.video)!=null?E:AZ,l=(A=r==null?void 0:r.audio)!=null?A:VS,c=(v=r==null?void 0:r.video)!=null?v:VS,d=(w=i==null?void 0:i.onError)!=null?w:xZ;return{allowedMedias:{audio:o,video:s},maxSize:{audio:l,video:c},callbacks:{onError:d}}}function bZ(n,t){const e=o=>o.map(s=>`.${s}`).join(","),{allowedMedias:r}=$S(n),i=r[t];return i?e(i):"*"}function vZ(n,t,e){const{maxSize:r,callbacks:i,allowedMedias:o}=$S(t),{[e]:s}=r,{[e]:l}=o;if(s&&n.size>s){const d=new Error("media is too large");throw d.code=`MaxMediaSize-${e}`,i!=null&&i.onError&&(i==null||i.onError(t,d)),d}const c=kf(n.name);if(l&&!l.includes(c.toLowerCase())){const d=new Error(`media file is not allowed: ${c}`);throw d.code="NotAllowedFile",i!=null&&i.onError&&(i==null||i.onError(t,d)),d}}function BZ(n){return n===ah.Empty||n===ah.Error}const xn=D("media");class yZ extends He.TypedEmitter{constructor(e){super();m(this,"mediaContainer",null);m(this,"media",null);m(this,"abstract",null);m(this,"handleMediaLoadError",(e,r)=>{if(!r.target||!(r.target instanceof Node)||!(r.target instanceof Element?r.target:r.target.parentElement))return;const o=et(r.target);if(!o||!o.contains(this.mediaContainer))return;const s=this.renderError();this.updateMediaContent(s),this.emit("mediaError",e,"load_error",dt(o))});m(this,"handleUploadFile",async e=>{p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const{editor:r}=this.options,i=et(this.mediaContainer);p(xn,i,"The block element not exist");const o=r.getBlockData(i);try{const{resourceId:s}=await r.doc.uploadResource(e,{onProgress:C=>{this.renderProgress(C,e)}}),{name:l,type:c,size:d}=e,h={...o,embedData:{...o.embedData,src:s,fileName:l,fileSize:d,fileType:c}};r.updateBlockData(i,h)}catch(s){xn.error(s),this.emit("mediaError",r,"upload_error",o.id),this.renderRetry(e,s)}ut(i,"media-block-uploading")});m(this,"destroy",()=>{this.mediaContainer=null});this.options=e}bindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.addEventListener(this.media,"error",this.handleMediaLoadError)}unbindMediaEvent(){const{editor:e}=this.options;this.media&&e.domEvents.removeEventListener(this.media,"error",this.handleMediaLoadError)}updateMediaContent(e){p(xn,this.mediaContainer,"The media element not exist"),this.mediaContainer.innerHTML="",this.mediaContainer.append(e)}renderError(){p(xn,this.abstract,"no abstract");const{editor:e,createMediaElement:r}=this.options,{mediaIcon:i,mediaName:o}=this.abstract;p(xn,this.mediaContainer,"The media element not exist");const s=et(this.mediaContainer);p(xn,s,"The block element not exist");const l=e.getBlockData(s),c=B("div",["media-error","embed-selected-content","embed-hover-content"],null),d=B("span",["media-error-icon"],c);d.innerHTML=i;const h=B("div",[],c);h.innerHTML=_.t("media.load.failed",{name:o}),c.appendChild(h);const C=h.querySelector(".retry-upload");return p(xn,C,"The element not exist"),e.domEvents.addEventListener(C,"click",(E,A)=>{const v=B("div",["media-element"],null),w=this.getResourceUrl(l),S=r(E,v,l,w);this.unbindMediaEvent(),this.media=S,this.bindMediaEvent(),this.updateMediaContent(v)}),this.setFullScreen(),c}renderRetry(e,r){var E,A;p(xn,this.abstract,"no abstract");const{editor:i}=this.options,{mediaIcon:o,mediaName:s}=this.abstract,l=B("div",["media-error","embed-selected-content","embed-hover-content"],null),c=B("span",["media-error-icon"],l);c.innerHTML=o;const d=B("div",[],l);let h=_.t("media.upload.failed",{name:s});(((E=r.response)==null?void 0:E.status)===420||((A=r.response)==null?void 0:A.status)===413)&&(h=_.t("media.upload.maxSizeFailed",{name:s})),d.innerHTML=h,l.appendChild(d);const C=d.querySelector(".retry-upload");C&&i.domEvents.addEventListener(C,"click",()=>{i.readonly||(p(xn,this.abstract,"no abstract"),this.handleUploadFile(e))}),this.updateMediaContent(l),this.setFullScreen()}renderProgress(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope .media-progress"),o=e===-1||e===100?100:e;if(i){const{updateProgressElement:s}=this.options;s(i,o)}else{const{createProgressElement:s}=this.options,l=et(this.mediaContainer);p(xn,l,"The element not exist"),q(l,"media-block-uploading");const c=B("div",["media-progress"],null);s(c,o,r),this.updateMediaContent(c)}this.setFullScreen()}renderMediaElement(e,r){p(xn,this.mediaContainer,"The media element not exist");const i=this.mediaContainer.querySelector(":scope > .media-element"),{createMediaElement:o,updateMediaElement:s,editor:l}=this.options,c=this.getResourceUrl(e,r);if(i){const d=s(l,i,e,c);this.unbindMediaEvent(),this.media=d,this.bindMediaEvent()}else{const d=B("div",["media-element"],null),h=o(l,d,e,c);this.unbindMediaEvent(),this.media=h,this.bindMediaEvent(),this.updateMediaContent(d)}}renderEmpty(e){p(xn,this.abstract,"no abstract"),p(xn,this.mediaContainer,"The media element not exist");const r=B("div",["media-empty","embed-selected-content","embed-hover-content"],this.mediaContainer);r.innerHTML=this.abstract.mediaIcon,this.updateMediaContent(r);const{editor:i}=this.options;i.findBlockById(e.id)&&this.emit("mediaError",i,"empty",e.id),this.setFullScreen()}getResourceUrl(e,r){const{src:i}=e.embedData,{editor:o}=this.options;return o.doc.buildResourceUrl(i,{syncNewResources:async(s,l)=>{var d,h;if(!r)return;await o.doc.addResources([s]);const c=(h=(d=o.doc).getServerMeta)==null?void 0:h.call(d).appId;if(l!==e.embedData.src&&c&&e.embedData.src.includes(c)){const C=et(r);if(C&&!o.readonly&&o.isBlockWritable(C)){const E=xt.default(e);E.embedData.src=s,o.updateBlockData(C,E)}}}})}setFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),q(this.mediaContainer,"full-screen")}removeFullScreen(){p(xn,this.mediaContainer,"The media element not exist"),ut(this.mediaContainer,"full-screen")}updateBlockAlign(e,r){const i=et(r);p(xn,i,"The block element not exist");const{align:o}=e;e.embedType==="video"&&(i.hasAttribute("data-style-align")&&i.removeAttribute("data-style-align"),i.setAttribute("data-style-align",o))}render(e,r){const{src:i}=e.embedData;(!this.mediaContainer||!r.contains(this.mediaContainer))&&(this.mediaContainer=B("div",["media"],r)),this.updateBlockAlign(e,r),BZ(i)?i===ah.Empty&&this.renderEmpty(e):this.renderMediaElement(e,r)}setAbstract(e){this.abstract=e}}D("media-embed");const TZ="left";class HS{constructor(){m(this,"handleInsertEmptyEmbed",async(t,e)=>{var C;const{containerId:r,blockIndex:i}=e;let o;(C=e.data)!=null&&C.file&&(o=e.data.file);const s=bZ(t,this.embedType);if(o=o!=null?o:await Uc(s,{}),!o)return null;const{mediaType:l}=this.getAbstract();try{vZ(o,t,l)}catch{return null}const c={id:it(),type:"embed",embedType:this.embedType,embedData:{src:ah.Empty}};l==="video"&&(c.align=TZ);const d=t.insertBlock(r,i,c);return await this.getMedia(t,c.id).handleUploadFile(o),d})}getMedia(t,e){const r=t.addCustom(`media-${e}`,()=>new yZ({editor:t,createMediaElement:this.createMediaElement,updateMediaElement:this.updateMediaElement,createProgressElement:this.createProgressElement,updateProgressElement:this.updateProgressElement}));return r.setAbstract({...this.getAbstract()}),r}getOptions(){const{menuItem:t,mediaIcon:e,mediaName:r,order:i,group:o}=this.getAbstract();return{name:r,insertEmbedCommandItems:[{id:`insert-${this.embedType}`,name:t,icon:e,order:i,group:o,subText:tr(`insert-${this.embedType}`)}],handleInsertEmptyEmbed:this.handleInsertEmptyEmbed}}createEmbedContent(t,e,r){const{id:i}=r;this.getMedia(t,i).render(r,e)}handleUpdateBlock(t,e,r){const{id:i}=r,o=this.getMedia(t,i),s=zt(e);return o.render(r,s),!0}handleDeleteBlock(t,e){const r=e.id,i=this.getMedia(t,r);i.removeAllListeners(),i.destroy()}convertTo(t,e,r,i){const o=e.embedData,s=t.doc.buildResourceUrl(o.src,{withToken:!0});return i==="html"?`<${o.type} src="${s}" />`:i==="markdown"?`![${o.src}](${s})`:s}}function jS(n,t){const e=B("div",["uploading-progress-mask"],n),r=B("div",["uploading-progress-bar"],e),i=B("div",["uploading-progress-bar-value"],r);i.style.width=`${t}%`}function zS(n,t){const e=n.querySelector(".uploading-progress-bar-value");e&&(e.style.width=`${t}%`)}const kZ=D("media-audio");class RZ extends HS{constructor(){super(...arguments);m(this,"embedType",Ui.AUDIO);m(this,"updateProgressElement",zS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["audio-container","embed-hover-content","embed-selected-content"],r),l=B("audio",[],s);return l.innerHTML="Your browser does not support the <code>audio</code> element.",l.controls=!0,l.src=o,setTimeout(()=>{this.getMedia(e,i.id).setFullScreen()}),l})}getAbstract(){return{mediaIcon:zT,mediaName:_.t(`media.${Ui.AUDIO}.menuItem`),menuItem:_.t(`media.${Ui.AUDIO}.menuItem`),order:800,mediaType:Ui.AUDIO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Ui.AUDIO}.abstract`)}`}}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .audio-container > audio");return p(kZ,s,"The media element not exist"),s.src!==o&&(s.src=o),s}createProgressElement(e,r){const i=B("audio",[],e);i.innerHTML="Your browser does not support the <code>audio</code> element.",i.controls=!0,i.src="about:blank",jS(e,r)}}const wZ=new RZ;D("video-resizer");function GS(n){return n&&Le(n)&&ln(n)==="video"}const SZ=50;class Sx{constructor(t){m(this,"currentResizableElement",null);m(this,"resizing",!1);m(this,"handleHoveringBlockChange",(t,e)=>{if(!this.resizing&&!window.isDragging&&(e&&GS(e)&&this.disableBlockResize(e),t&&GS(t)&&this.editor.isBlockWritable(t))){const r=this.getVideoElement(t);if(!r)return;this.enableBlockResize(t,r)}});m(this,"handleResizing",(t,e)=>{if(this.resizing=!0,!this.currentResizableElement)return;const r=t.getBlock();if(!r)return;const i=r.getBoundingClientRect().width,o=Math.min(Math.max(e.width,SZ),i);this.currentResizableElement.style.width=`${o}px`,this.currentResizableElement.style.pointerEvents="none"});m(this,"handleResized",t=>{this.resizing=!1;const e=t.getBlock();if(!this.currentResizableElement||!e)return;const r=this.editor.getBlockData(e),{width:i}=this.currentResizableElement.getBoundingClientRect();this.currentResizableElement.style.pointerEvents="auto",this.editor.updateBlockData(e,{...r,width:i})});this.editor=t,je.get(t).addListener("change",this.handleHoveringBlockChange)}destroy(){this.currentResizableElement=null,je.get(this.editor).removeListener("change",this.handleHoveringBlockChange)}getVideoElement(t){return zt(t).querySelector(":scope .video-container > video")}updateResizer(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.updateResizer()}disableBlockResize(t){const e=this.editor.findCustom(`${dt(t)}-resizer`);e&&e.disableResize()}enableBlockResize(t,e){const r=this.editor.addCustom(`${dt(t)}-resizer`,()=>new Pd(this.editor,{resize:["top-left","top-right","bottom-left","bottom-right"]}));r.enableResize(t,e),r.removeListener("resizing",this.handleResizing),r.removeListener("resized",this.handleResized),r.addListener("resizing",this.handleResizing),r.addListener("resized",this.handleResized),this.currentResizableElement=e}}const LZ=D("video");class IZ extends HS{constructor(){super(...arguments);m(this,"embedType",Ui.VIDEO);m(this,"updateProgressElement",zS);m(this,"createMediaElement",(e,r,i,o)=>{const s=B("div",["video-container","embed-selected-content","drag-preview-element"],r),l=B("video",[],s);return l.innerHTML="Your browser does not support the <code>video</code> element.",l.controls=!0,l.src=o,l.addEventListener("canplay",()=>{e.addCustom("video-resizer",()=>new Sx(e)),this.getMedia(e,i.id).removeListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).addListener("mediaError",this.handleMediaError),this.getMedia(e,i.id).removeFullScreen()}),i.width&&(l.style.width=`${i.width}px`),l});m(this,"createProgressElement",(e,r,i)=>{const o=B("video",["progress-video"],e);o.innerHTML="Your browser does not support the <code>audio</code> element.",o.controls=!0,jS(e,r),Mc(i).then(s=>{const l=e.querySelector(".progress-video");l&&c1(e)&&(l.src=s)})})}getAbstract(){return{mediaName:_.t(`media.${Ui.VIDEO}.menuItem`),mediaIcon:GT,menuItem:_.t(`media.${Ui.VIDEO}.menuItem`),order:700,mediaType:Ui.VIDEO,group:"common"}}getBlockProperties(){return{abstract:`${_.t(`media.${Ui.VIDEO}.abstract`)}`}}handleMediaError(e,r,i){const o=e.addCustom("video-resizer",()=>new Sx(e)),s=e.getBlockById(i);o.disableBlockResize(s)}updateMediaElement(e,r,i,o){const s=r.querySelector(":scope .video-container > video");p(LZ,s,"The media element not exist"),s.src!==o&&(s.src=o),i.width?s.style.width=`${i.width}px`:s.style.width="";const l=e.getBlockById(i.id);return setTimeout(()=>{e.addCustom("video-resizer",()=>new Sx(e)).updateResizer(l)}),s}}const DZ=new IZ,WS=[dA,xA,bA,Ok],Lx=[OS,DQ,VJ,YJ,iZ,jK,mZ,DZ,wZ,Vz,dS,yX],qS=[qk,gS,P4];function _Z(n,t,e){var i,o,s,l;Br.level=(i=e.logLevel)!=null?i:Gi.DEBUG;const r=td(n,t,{components:{blocks:[...WS,...((o=e==null?void 0:e.components)==null?void 0:o.blocks)||[]],embeds:[...Lx,...((s=e.components)==null?void 0:s.embeds)||[]],boxes:[...qS,...((l=e.components)==null?void 0:l.boxes)||[]],textRenders:[new XE],options:{...e.componentsOptions}}});return r.readonly=!0,r.addCustom("heading-collapse",()=>new mx(r)),r.addCustom("editor-tooltip",()=>new Ld(r)),r.addListener("clickLink",(c,d,h)=>{var E;if((E=e==null?void 0:e.events)!=null&&E.onClickLink){e.events.onClickLink(c,d,h);return}const C=h.getAttribute("link");C&&(c.readonly||d.ctrlKey||d.metaKey)&&window.open(C,"_blank")}),r}class XS{constructor(t){this.createOptions=t,t.lang&&_.setLang(t.lang)}createHistoryEditor(t,e){return _Z(t,e,this.createOptions)}}function YS(n,{root:t,childDoc:e,doc:r}){var h,C;e.uploadResource=r.uploadResource.bind(r),e.buildResourceUrl=r.buildResourceUrl.bind(r);const i=n.getComponentOptions("comment"),o={image:{defaultAlign:"left"},table:{locatingContainer:t,hideCellMenu:!0,hideToolbar:!0},...i==null?void 0:i.componentsOptions},s=[];n.editorBlocks.forEach(E=>{E.blockType==="text"||E.blockType==="embed"||s.push(E)});const l=[];n.editorEmbeds.forEach(E=>{l.push(E)});const c=[];n.editorBoxes.forEach(E=>{E.boxType==="text"||E.boxType==="br"||E.boxType==="image"||E.boxType==="anchor"||c.push(E)});const d=td(t,e,{shortcuts:[s0],components:{blocks:s,commandProviders:[new F0],decorators:[new dg],embeds:l,boxes:c,options:o}});if(d.input.addHandler(new mg),d.input.addHandler(new KA(d)),d.input.addHandler(new WA(d)),d.input.addHandler(new Mq(d)),d.input.addHandler(new Eg),d.addCustom("image-paste-handler",()=>new FA(d)),de.isMobile||d.addCustom("editor-tooltip",()=>new Ld(d)),n.options.enableContextMenu!==!1&&d.addCustom("editor-context-menu",E=>new YA(E)),(h=n.options.componentsOptions)!=null&&h.mention){const E=n.options.componentsOptions.mention;d.addCustom("mention",()=>new mS(d,{...E}))}if((C=n.options.componentsOptions)!=null&&C.comment){const E=n.options.componentsOptions.comment;E.onCommentEditorClick&&d.addListener("click",E.onCommentEditorClick)}return d}function MZ(n,t){const e=Array.from(n.rootContainer.querySelectorAll(`[comment-${t.toLocaleLowerCase()}="${t}"]`)),r=new Set;e.forEach(i=>{const o=et(i);o&&r.add(o)}),r.forEach(i=>{Uq(n,i,t)})}class UZ{constructor(t){m(this,"listeners",new Set);m(this,"doc");this.editor=t,this.doc=this.editor.doc.externalDoc,this.doc.registerCallback(this)}getComments(){return this.doc.getComments()}getComment(t){return this.doc.getComment(t)}getCommentDoc(t){return this.doc.getCommentDoc(t)}localCreateComment(t,e){this.doc.localCreateComment(t,e)}localDeleteComment(t){const e=this.getComment(t);this.doc.localDeleteComment(t);const r=e.groupId;this.getComments().filter(o=>o.groupId===r).length===0&&MZ(this.editor,r)}localUpdateComment(t,e){this.doc.localUpdateComment(t,e)}onCreateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onCreateComment(t,e))}onDeleteComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onDeleteComment(t,e))}onUpdateComment(t,e){Array.from(this.listeners.values()).forEach(r=>r.onUpdateComment(t,e))}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}createCommentEditor(t,e){return YS(this.editor,{root:t,childDoc:e,doc:this.doc})}allowEdit(t){return t.userId===this.doc.getUser().userId}}class OZ{constructor(t,e){m(this,"listeners",new Set);this.editor=t,this.localDoc=e}get doc(){return this.localDoc.toJSON()}getComments(){return Object.values(this.doc.comments)}getComment(t){return this.doc.comments[t]}getCommentDoc(t){const e=this.doc.comments[t];return WC(e)}addListener(t){this.listeners.add(t)}removeListener(t){this.listeners.delete(t)}localCreateComment(t,e){}localDeleteComment(t){}localUpdateComment(t,e){}createCommentEditor(t,e){return YS(this.editor,{root:t,childDoc:e,doc:this.localDoc})}allowEdit(t){return t.userId===this.localDoc.getUser().userId}}const NZ={placeholder:{common:{title:"\u8BF7\u8F93\u5165\u6807\u9898",readonlyTitle:"\u8BF7\u8F93\u5165\u6807\u9898",content:"\u70B9\u51FB + \uFF0C\u6216\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6",contentInTable:"\u8F93\u5165 / \u5FEB\u6377\u63D2\u5165\u7EC4\u4EF6"},local:{readonlyTitle:"\u672A\u547D\u540D"}},copyCutProperty:{copy:"\u590D\u5236",cut:"\u526A\u5207",unsafeEnvTips:"\u7531\u4E8E\u5F53\u524D http \u8BBF\u95EE\u73AF\u5883\u4E0B\u7684\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528\u5FEB\u6377\u952E({shortCut}) {operation}",limitedEnvTips:"\u7531\u4E8E\u6D4F\u89C8\u5668\u9650\u5236\uFF0C\u8BF7\u4F7F\u7528 {shortCut} \u7C98\u8D34"}},PZ={placeholder:{common:{title:"Enter a title",readonlyTitle:"Enter a title",content:'Click "+", or enter "/" to insert components quickly',contentInTable:'Enter "/" to insert components quickly'},local:{readonlyTitle:"Untitled"}},copyCutProperty:{copy:"Copy",cut:"Cut",unsafeEnvTips:"Due to the limitations of the current http access environment, please use the shortcut ({shortCut}) {operation}",limitedEnvTips:"Press {shortCut} to paste due to browser restrictions"}},FZ={placeholder:{common:{title:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",readonlyTitle:"\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",content:"\u300C+\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u304B\u3001\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059",contentInTable:"\u300C/\u300D\u3092\u5165\u529B\u3059\u308B\u3068\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u304C\u7D20\u65E9\u304F\u633F\u5165\u3067\u304D\u307E\u3059"},local:{readonlyTitle:"\u7121\u984C"}},copyCutProperty:{copy:"\u8907\u88FD",cut:"\u5207\u308B",unsafeEnvTips:"HTTP\u74B0\u5883\u306E\u5236\u7D04\u306B\u3088\u308A\u3001{operation}\u3059\u308B\u306B\u306F\u3001\u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8({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3BzL2FwcC54bWxQSwECLQAUAAYACAAAACEAiD+lv+EAAABVAQAAGAAAAAAAAAAAAAAAAAAHNwAAY3VzdG9tWG1sL2l0ZW1Qcm9wczEueG1sUEsBAi0AFAAGAAgAAAAhAMEnywi2AAAAIQEAABMAAAAAAAAAAAAAAAAARjgAAGN1c3RvbVhtbC9pdGVtMS54bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAABVOQAAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhAOuAYExTAwAAjw4AABIAAAAAAAAAAAAAAAAAWzsAAHdvcmQvZm9udFRhYmxlLnhtbFBLBQYAAAAADwAPANQDAADePgAAAAA=",VZ=()=>Hp(KZ),$Z=D("image-to-docx");async function HZ(n){return new Promise((t,e)=>{const r=new Image;r.onload=()=>{t({width:r.naturalWidth,height:r.naturalHeight})},r.onerror=e,r.src=n})}async function QS(n,t){if(n.width&&n.height)return{width:n.width,height:n.height,buffer:t};try{const e=await Mc(new File([t],"",{})),r=await HZ(e);return r.width===void 0||r.height===void 0?{width:345,height:230,buffer:t}:n.width||n.height?{width:n.width||r.width*n.height/r.height,height:n.height||r.height*n.width/r.width,buffer:t}:{width:r.width,height:r.height,buffer:t}}catch(e){$Z.error(e);return}}function jZ(n,t){let e=n.filter(s=>s!=null);const r=t-(e.length-1)*20,i=.87,o=e.reduce((s,l)=>s+l.width,0);return o>r&&(e=e.map(s=>({width:s.width*r/o,height:s.height*r/o,buffer:s.buffer}))),e.map(s=>({width:s.width*i,height:s.height*i,buffer:s.buffer}))}function zZ(n,t,e){if(!e||typeof e!="object")return;const r=e,i=n.filter(s=>s!=null),o=t-(i.length-1)*20;i.forEach((s,l)=>{if(i.length===1&&r.widthPercent){const d=r.widthPercent,h=s.width;s.width=o*(d/100),s.height*=s.width/h;return}const c=`${l}_flex`;if(r[c]){const d=r[c],h=s.width;s.width=o*d,s.height*=s.width/h}})}function JS(n=[0,1,2,3,4,5,6,7],t=1){return n.map(e=>{let r;switch(e%3){case 0:r=yt.LevelFormat.DECIMAL;break;case 1:r=yt.LevelFormat.LOWER_LETTER;break;default:r=yt.LevelFormat.LOWER_ROMAN;break}return{level:e,format:r,text:`%${e+1}. `,alignment:yt.AlignmentType.START,start:t,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(e+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function GZ(){return[0,1,2,3,4,5,6,7].map(n=>{let t;switch(n%3){case 0:t="\u2022";break;case 1:t="\u25E6";break;default:t="\u25AA";break}return{level:n,format:yt.LevelFormat.BULLET,text:t,alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}})}function WZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2611",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}function qZ(){return[0,1,2,3,4,5,6,7].map(n=>({level:n,format:yt.LevelFormat.BULLET,text:"\u2610",alignment:yt.AlignmentType.START,style:{paragraph:{indent:{left:yt.convertInchesToTwip(.3*(n+1)),hanging:yt.convertInchesToTwip(.2)}}}}))}var ch=(n=>(n.NUMBERING="number-numbering-reference",n.BULLET="number-bullet-reference",n.CHECKED="checked-bullet-reference",n.UNCHECKED="unchecked-bullet-reference",n))(ch||{});const XZ=[{levels:JS(),reference:"number-numbering-reference"},{levels:GZ(),reference:"number-bullet-reference"},{levels:WZ(),reference:"checked-bullet-reference"},{levels:qZ(),reference:"unchecked-bullet-reference"}];function YZ(n){switch(n){case"style-color-0":return"d83931";case"style-color-1":return"de7802";case"style-color-2":return"dc9b04";case"style-color-3":return"2ea121";case"style-color-4":return"245bdb";case"style-color-5":return"6425d0";case"style-color-6":return"8f959e";default:return}}function QZ(n){switch(n){case"style-bg-color-1":case"style-bg-color-2":case"style-bg-color-8":case"style-bg-color-9":return"yellow";case"style-bg-color-0":case"style-bg-color-5":return"magenta";case"style-bg-color-3":return"green";case"style-bg-color-4":case"style-bg-color-11":return"blue";case"style-bg-color-6":return"lightGray";case"style-bg-color-7":return"red";case"style-bg-color-10":return"darkGreen";case"style-bg-color-12":return"darkMagenta";case"style-bg-color-13":return"darkGray";default:return}}function JZ(n){switch(n){case"style-bg-color-0":return"fbbab6";case"style-bg-color-1":return"ffdcb0";case"style-bg-color-2":return"fff7a0";case"style-bg-color-3":return"ceefc5";case"style-bg-color-4":return"d1ddfb";case"style-bg-color-5":return"d9cbf8";case"style-bg-color-6":return"eaeaea";case"style-bg-color-7":return"fe837c";case"style-bg-color-8":return"ffbd6a";case"style-bg-color-9":return"ffe662";case"style-bg-color-10":return"a8f393";case"style-bg-color-11":return"98b5ff";case"style-bg-color-12":return"b394f8";case"style-bg-color-13":return"b1b1b1";default:return}}const ZZ=/rgb\((\d+),\s*(\d+),\s*(\d+)\)/;function ZS(n){if(typeof n=="string"&&n.length>0){if(n[0]==="#")return n.substring(1);const t=n.match(ZZ);if(t){const e=s=>{let l=Number(s).toString(16);return l.length<2&&(l=`0${l}`),l},r=e(t[1]),i=e(t[2]),o=e(t[3]);return`${r}${i}${o}`}if(n==="red")return"FF0000";if(n==="green")return"00FF00";if(n==="blue")return"0000FF"}}function On(n,t){if(n&&n.attributes&&n.attributes[t])return n.attributes[t];if(n&&n.attributes&&n.attributes.box&&n.attributes.inputType&&t==="style-underline")return!0}function tL(n,t,e){for(let r=0;r<=e;++r){const i=`${t}${r}`;if(On(n,i))return i}}function Kg(n,t,e){n.attributes=n.attributes||{},n.attributes[t]=e}function Ix(n){return n==="image"||n==="drawio"||n==="plantuml"||n==="mermaid"||n==="flowchart"}function eL(n){return n&&n.startsWith("//")?`https:${n}`:n&&!n.startsWith("http://")&&!n.startsWith("https://")?`https://${n}`:n}function ttt(n){const t=On(n,"inlineStyle");if(t==null)return;const e=t.split(";");for(const r of e){const i=r.split(":");if(i.length!==2)continue;const o=i[0].trim().toLowerCase(),s=i[1].trim().toLowerCase();o==="font-size"&&Kg(n,"inline-style-font-size",s),o==="color"&&Kg(n,"inline-style-color",s),o==="background-color"&&Kg(n,"inline-style-background-color",s),o==="font-family"&&Kg(n,"inline-style-font-family",s)}}function ett(n,t){if(t==null)return n==null?void 0:n.normal;if(n)return n[`heading${t}`]}function ntt(n){const t=`${On(n,"inline-style-font-size")}`;if(t&&t.indexOf("px")>0)return+t.replace(/px/g,"")}function rtt(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` ${n.attributes.text} `;if(n.attributes&&n.attributes.box&&n.attributes.inputType)return n.attributes.value?`${n.attributes.value}`:" "}function itt(n){if(n.attributes&&n.attributes.box&&n.attributes.text)return` @${n.attributes.text} `}function ott(n){return On(n,"inline-style-font-family")}function stt(n){const t=On(n,"inline-style-background-color");return ZS(t)}function ltt(n){const t=On(n,"inline-style-color");return ZS(t)}function att(n){ttt(n);const t=On(n,"type")==="mention";return{box:n.attributes&&n.attributes.box?n.attributes:void 0,inlineCode:!!On(n,"style-code"),link:eL(On(n,"link")),size:ntt(n),text:t?itt(n):rtt(n)||n.insert,bold:!!On(n,"style-bold"),underline:!!On(n,"style-underline"),italics:!!On(n,"style-italic"),strike:!!On(n,"style-strikethrough"),superScript:!!On(n,"style-super"),subScript:!!On(n,"style-sub"),math:On(n,"type")==="math"?On(n,"src"):void 0,mention:t,fontFamily:ott(n),background:stt(n),color:t?"338fe5":YZ(tL(n,"style-color-",6))||ltt(n),highlight:tL(n,"style-bg-color-",13)}}function ctt(){return[new yt.Paragraph({border:{top:{color:"auto",style:yt.BorderStyle.DASHED,size:4,space:1}},spacing:{before:300}}),new yt.Paragraph({spacing:{line:0}})]}function utt(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u89C6\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function ftt(){return new yt.Paragraph({children:[new yt.TextRun({text:"[\u97F3\u9891\u6682\u4E0D\u652F\u6301\u5BFC\u51FA]",shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}})]})}function dtt(n,t){return new yt.Paragraph({children:[new yt.ExternalHyperlink({children:[new yt.TextRun({style:"Hyperlink",text:t||n})],link:n})]})}function nL(n){if(n.heading!=null)return`Heading${n.heading}`}function rL(n){if(n.alignment!=null){if(n.alignment==="center")return yt.AlignmentType.CENTER;if(n.alignment==="right")return yt.AlignmentType.RIGHT;if(n.alignment==="left")return yt.AlignmentType.LEFT}}function htt(n){if(n.indent)return{left:yt.convertInchesToTwip(.3*n.indent-.2)};if(n.padding)return{left:yt.convertInchesToTwip(.3*n.padding)}}function mtt(n){return{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:n}}function gtt(n){const t=n.split(",");if(t.length!==0)return t[0].trim()}function iL(n,t){var o;let e;e=n.inlineCode?"InlineCode":void 0,e=n.link?"Hyperlink":e;const r=n.size||t,i=r!=null?Math.floor(r*1.5+.5):void 0;return n.text=(o=n.text)==null?void 0:o.replace(/\x00/g," "),new yt.TextRun({text:n.text,bold:n.bold||void 0,underline:n.underline?{type:yt.UnderlineType.SINGLE}:void 0,italics:n.italics||void 0,strike:n.strike||void 0,superScript:n.superScript||void 0,subScript:n.subScript||void 0,size:i,style:e,font:n.fontFamily?gtt(n.fontFamily):void 0,shading:n.background?mtt(n.background):void 0,color:n.color,highlight:QZ(n.highlight)})}function ptt(n,t){if(n.link)return n.link=n.link.replace(/\x00/g," "),new yt.ExternalHyperlink({children:[iL(n,t)],link:n.link})}async function oL(n,t,e,r,i){const[o]=await i(n,t,e);if(o==null)return;const s=await QS({width:r||0,height:0,src:e},o);return new yt.ImageRun({data:o,transformation:{width:(s==null?void 0:s.width)||100,height:(s==null?void 0:s.height)||20}})}function Ctt(n){if(n.heading||n.heading)return n.heading}function Ett(n){if(n.align&&(n.align==="center"||n.align==="right"||n.align==="left"))return n.align}function Att(n){if(n.textOnly===!0&&n.level!=null)return n.level}async function xtt(n,t){var r;const e=[];if(n.text&&Array.isArray(n.text)){for(let i=0;i<n.text.length;i++){const o=n.text[i];if(((r=o.attributes)==null?void 0:r.box)===!0&&t){const s=await t(o);if(s){n.text.splice(i+1,0,...s);continue}}e.push(att(o))}return e}}function btt(n){if(n.type==="list"&&n.textOnly!==!0)return{checkbox:n.checkbox,groupId:n.groupId,ordered:!!n.ordered,level:n.level||1,start:n.start||0}}function vtt(n,t){if(n.type==="embed"&&n.embedType&&Ix(n.embedType)&&n.embedData&&n.embedData.src)return n.embedData.src.split("|").map(r=>{const i=t(r),o=n.embedData[`${i}_width`],s=n.embedData[`${i}_height`];return{src:r,width:o,height:s}})}function Btt(n){if(n.padding)return n.padding}function ytt(n){return!!(n.type==="embed"&&n.embedType&&Ix(n.embedType)&&n.embedData&&n.embedData.src)}async function Vg(n,t,e){return{quoted:!!n.quoted,heading:Ctt(n),alignment:Ett(n),indent:Att(n),padding:Btt(n),texts:await xtt(n,e),list:btt(n),images:vtt(n,t),border:ytt(n)}}async function Ttt(n,t,e,r){const i=[];if(!n.children)return[];for(const o of n.children){const s=[];for(const l of t.blocks[o])s.push(await Vg(l,e,r));i.push(s)}return i}const ktt=D("to-docx"),$g=200;function Rtt(n,t){return Array(n).fill(0).map(()=>Array(t).fill(0).map(()=>({cellId:void 0,color:void 0,from:void 0,rowSpan:1,colSpan:1,width:0,originalWidth:void 0,align:void 0})))}function wtt(n,t,e,r){const i=!!n.hasColTitle,o=!!n.hasRowTitle,s=!!n.isStripeStyle,l="F5F8FB";for(let c=0;c<t;c++)for(let d=0;d<e;d++)(i&&d===0||o&&c===0||s&&c%2===1)&&(r[c][d].color=l)}function Stt(n){p(ktt,n.children,"no table children");const t=n.rows,e=n.cols,r=new Array(n.cols).fill($g).map((s,l)=>n.colsWidth[l]||s);if(r)for(let s=0;s<r.length;s++)r[s]===0&&(r[s]=$g);const i=Rtt(t,e);let o=0;for(let s=0;s<t;++s)for(let l=0;l<e;++l){if(i[s][l].originalWidth=r?r[l]:void 0,i[s][l].from!==void 0)continue;const c=n.children[o];o+=1,i[s][l].cellId=c,i[s][l].color=JZ(n[`${c}_background`]),i[s][l].width=r?r[l]:100,i[s][l].align=n[`${c}_align`];const d=n[`${c}_rowSpan`]||1,h=n[`${c}_colSpan`]||1;if(i[s][l].rowSpan=d,i[s][l].colSpan=h,d>1||h>1){let C=0;for(let E=0;E<d;E++)for(let A=0;A<h;A++)E===0&&(C+=r?r[l+A]:80),!(E===0&&A===0)&&(i[s+E][l+A].from=[s,l]);i[s][l].width=C}}return wtt(n,t,e,i),i}async function Ltt(n,t,e,r,i,o,s,l,c,d){async function h(E){if(l&&E.type!=="_exportVirtualBlock"){const A=await l(i,o,E);if(A){await r.addDoc(n,A,d);return}}if(E.type==="text"||E.textOnly===!0){const A=await Vg(E,s,c);await r.addTextBlock(A);return}if(E.type==="code"){const A=await Ttt(E,e,s,c);await r.addCodeBlockObject(A);return}if(E.type==="list"&&E.textOnly!==!0){const A=await Vg(E,s,c);await r.addListBlockObject(n,A);return}if(E.type==="embed"&&E.embedType){const A=E,v=A.embedData,w=A.embedType;if(Ix(w)){const S=await Vg(E,s,c);await r.addImagesBlockObject(E,S,d)}else E.embedType==="hr"?r.addSeparatorBlock():E.embedType==="video"?r.addVideoPlaceholder():E.embedType==="audio"?r.addAudioPlaceholder():E.embedType==="webpage"?r.addHyperlinkParagraph(eL(v.src),v.title):r.addOtherEmbedBlock(w,E.embedData);return}if(E.type==="table"){let A=[];if(E.colsWidth)A=new Array(E.cols).fill($g).map((w,S)=>E.colsWidth[S]||w);else{const w=E.cols;A=new Array(w);for(let S=0;S<A.length;S++)A[S]=$g;E.colsWidth=A}const v=Stt(E);await r.addTableMatrix(A,v,e),r.addEmptyParagraph()}E.type==="_exportVirtualBlock"&&await r.addVirtualBlock(E.id,e,d)}function C(E){var w;const A=((w=E==null?void 0:E.embedData)==null?void 0:w.exportSpec)||(E==null?void 0:E.exportSpec);if(!A)return[E];const v=[];for(const{type:S,data:U}of A){if(S==="text"){const M={id:it(),text:[{insert:U}],type:"text"};v.push(M);continue}if(S==="image"){const M={id:it(),type:"embed",embedType:"image",align:"left",embedData:{src:U}};v.push(M);continue}if(S==="link"){const M={id:it(),type:"embed",embedType:"webpage",embedData:{src:U.url,title:U.title}};v.push(M);continue}if(S==="block")for(const M of U){if(!e.blocks[M])continue;const rt={id:M,type:"_exportVirtualBlock"};v.push(rt)}}return v}for(const E of t)for(const A of C(E))!A||await h(A)}function Itt(){return{listMaxInst:1,listInstMap:{},listRefMap:{},levelConfigs:[]}}const Dtt=D("to-docx");class _tt{constructor(t,e,r,i,o,s){m(this,"paragraphs");this.appId=t,this.docId=e,this.state=r,this.readImageFunc=i,this.convertBlocksFunc=o,this.defaultFontSize=s,this.paragraphs=[]}async addTextBlock(t){this.paragraphs.push(new yt.Paragraph({heading:nL(t),alignment:rL(t),children:await this.paragraphsFromBlockTexts(t),indent:htt(t)}))}async addEmptyImagePlaceHolder(){this.paragraphs.push(new yt.Paragraph({text:`[${_.t("docx.imageExportFailed")}]`,shading:{type:yt.ShadingType.CLEAR,color:"FFFFFF",fill:"CCCCCC"}}))}async paragraphsFromBlockTexts(t){if(t.texts==null)return;const e=ett(this.defaultFontSize,t.heading),r=[];for(const i of t.texts){if(i.link){const o=ptt(i,e);o&&r.push(o);continue}if(i.box&&i.box.type&&i.box.type==="br"){r.push(new yt.TextRun({text:"",break:1}));continue}if(i.box&&i.box.type&&i.box.type==="image"){const o=await oL(this.appId,this.docId,i.box.src,i.box.width,this.readImageFunc);o&&r.push(o);continue}if(i.math){const o=await oL(this.appId,this.docId,i.math,0,this.readImageFunc);o&&r.push(o);continue}r.push(iL(i,e))}return r}async addCodeBlockObject(t){for(const e of t)for(const r of e){const i={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};this.paragraphs.push(new yt.Paragraph({style:"Code",border:{left:{...i},right:{...i},top:{...i},bottom:{...i}},children:await this.paragraphsFromBlockTexts(r)}))}}async addListBlockObject(t,e){if(e.list==null)return;let r;const i=e.list.checkbox?`${t}-${e.list.groupId}-${e.list.checkbox}`:`${t}-${e.list.groupId}`;if(this.state.listInstMap[i])r=this.state.listInstMap[i];else if(r=this.state.listMaxInst,this.state.listMaxInst+=1,this.state.listInstMap[i]=r,e.list.start>0&&e.list.ordered){const s=`number-numbering-reference-${r}`,l=JS([e.list.level-1],e.list.start);this.state.levelConfigs.push({levels:l,reference:s,inst:r}),this.state.listRefMap[i]=s}else e.list.ordered?this.state.listRefMap[i]=ch.NUMBERING:e.list.checkbox&&e.list.checkbox==="checked"?this.state.listRefMap[i]=ch.CHECKED:e.list.checkbox&&e.list.checkbox==="unchecked"?this.state.listRefMap[i]=ch.UNCHECKED:this.state.listRefMap[i]=ch.BULLET;const o=nL(e);e.texts&&this.paragraphs.push(new yt.Paragraph({heading:o,children:await this.paragraphsFromBlockTexts(e),numbering:{reference:this.state.listRefMap[i],level:e.list.level-1,instance:r}}))}imageDimWithBufferToImageRun(t){return new yt.ImageRun({data:t.buffer,transformation:{width:t.width,height:t.height}})}async addImagesBlockObject(t,e,r){if(e.images==null){if(t.type==="embed"&&t.embedType==="image"){const{src:c}=t.embedData;c||this.addEmptyImagePlaceHolder()}return}const i=[],o=await Promise.all(e.images.map(async c=>{const[d,h]=await this.readImageFunc(this.appId,this.docId,c.src);if(d){const C=await QS(c,d);if(C)return C}i.push(h)}));zZ(o,r,t.embedData);const s=jZ(o,r),l={style:yt.BorderStyle.SINGLE,color:"#DEDEDE"};s.length&&this.paragraphs.push(new yt.Paragraph({border:e.border?{left:{...l},right:{...l},top:{...l},bottom:{...l}}:void 0,alignment:rL(e)||yt.AlignmentType.CENTER,children:s.map(c=>this.imageDimWithBufferToImageRun(c)).flatMap((c,d,h)=>c==null?[]:h.length-1!==d?[c,new yt.TextRun({text:" "})]:c)})),i.forEach(c=>{this.addHyperlinkParagraph(c)})}addSeparatorBlock(){ctt().forEach(t=>this.paragraphs.push(t))}addEmptyParagraph(){this.paragraphs.push(new yt.Paragraph(""))}addVideoPlaceholder(){this.paragraphs.push(utt())}addAudioPlaceholder(){this.paragraphs.push(ftt())}addHyperlinkParagraph(t,e){t!=null&&this.paragraphs.push(dtt(t,e))}async addTableMatrix(t,e,r){const i=t.map(o=>o!==0?o*15:1500);this.paragraphs.push(new yt.Table({rows:await this.generateTableRows(e,r),columnWidths:i}))}async generateRowCells(t,e){const r=[];for(const i of t){const o=i.cellId;if(o===void 0)continue;const s=i.width*.9;r.push(new yt.TableCell({children:await this.convertBlocksFunc(o,e.blocks[o],e,this.appId,this.docId,this.state,s),columnSpan:i.colSpan,rowSpan:i.rowSpan,width:{type:yt.WidthType.DXA,size:i.width*15},shading:i.color?{fill:i.color,type:yt.ShadingType.CLEAR,color:"auto"}:void 0}))}return r}async generateTableRows(t,e){const r=[];for(const i of t)r.push(new yt.TableRow({children:await this.generateRowCells(i,e)}));return r}async addDoc(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks.root,e,this.appId,this.docId,this.state,r);i&&(this.paragraphs=this.paragraphs.concat(i))}async addVirtualBlock(t,e,r){const i=await this.convertBlocksFunc(t,e.blocks[t],e,this.appId,this.docId,this.state,r);this.paragraphs.push(...i)}async addOtherEmbedBlock(){}}class Mtt{constructor(t,e,r,i,o,s,l,c){m(this,"convertBlocks",async(t,e,r,i,o,s,l=720)=>{const c=new _tt(i,o,s,this.readImage,this.convertBlocks,this.defaultFontSize);return await Ltt(t,e,r,c,i,o,this.md5HexFunc,this.getDocByBlock,this.getTextsByBox,l||720),c.paragraphs});this.templateData=t,this.docData=e,this.md5HexFunc=r,this.readImage=i,this.defaultFontSize=o,this.getDocByBlock=s,this.getTextsByBox=l,this.backgroundImageOptions=c}async convert(t,e){return this.snapshot2docx(this.docData,t,e)}async snapshot2docx(t,e,r){const i=new yt.ImportDotx,o=this.templateData?await i.extract(this.templateData):void 0,s=t.blocks.root;p(Dtt,s,"data must have blocks");const l=Itt(),c=await this.convertBlocks("blocks",s,t,e,r,l),d=this.backgroundImageOptions?{default:new yt.Header({children:[new yt.Paragraph({children:[new yt.ImageRun(this.backgroundImageOptions)]})]})}:{},h=new yt.Document({numbering:{config:[...XZ,...l.levelConfigs]},sections:[{headers:d,children:c,properties:{page:{size:{width:12240,height:15840},margin:{top:1440,bottom:1440,left:1440,right:1440}}}}]},{template:o});return yt.Packer.toBlob(h)}}const Utt=D("editor-to-docx");async function Ott(n,t,e,r){const i=n.doc.buildResourceUrl(r,{withToken:!0});let o=await vS(i);if(!o)return[void 0,i];if(o.type.indexOf("/svg")!==-1){const l=await AS(o);l&&(o=new File([l],o.name))}return[await o.arrayBuffer(),i]}async function Ntt(n,t,e){const r=n.editorBlocks.getBlockClass(e.type);if(r.toStandardDoc)try{return await r.toStandardDoc(n,e,t)}catch(i){Utt.error(`toStandardDoc error: ${JSON.stringify(i)}`);return}}async function Ptt(n,t){const e=t.attributes,r=n.editorBoxes.getBoxClass(e.type);if(r.toStandardText)return r.toStandardText(n,e)}async function Ftt(n,t){let{template:e,download:r,backgroundImageOptions:i}=t!=null?t:{};e||(e=VZ());const o=n.doc.toJSON(),s=(C,E,A)=>Ott(n,C,E,A),l=async(C,E,A)=>Ntt(n,o,A),c=async C=>Ptt(n,C),h=await new Mtt(e,o,nm.default,s,void 0,l,c,i).convert("_appId","_docId");if(r){const C=URL.createObjectURL(h),E=document.createElement("a");E.setAttribute("download",`${bS(n)}.docx`),E.setAttribute("href",`${C}`),E.click(),E.remove()}return h}const Dx=D("create-editor");async function Ktt(n,t){var s,l,c,d,h,C,E,A,v,w,S,U,M,V,rt,Y;p(Dx,n,"app does not exists"),t.lang&&_.setLang(t.lang),Br.level=(s=t.logLevel)!=null?s:Gi.DEBUG;const e=t.onReauth?async()=>{var ct;const X=t.user.userId,ft=t.docId,pt=await((ct=t.onReauth)==null?void 0:ct.call(t,X,ft,t.permission));return{userId:X,docId:ft,permission:t.permission,appId:t.appId,token:pt,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl}}:void 0,r={auth:{appId:t.appId,docId:t.docId,userId:t.user.userId,permission:t.permission,token:t.token,displayName:t.user.displayName,avatarUrl:t.user.avatarUrl},serverUrl:t.serverUrl,reauthFunc:e,disableLogout:t.disableLogout,onMaxUsersError:t.onMaxUsersError},i=await md.load(r),o=td(n,i,{id:t.id,scrollContainer:t==null?void 0:t.scrollContainer,enableComments:t==null?void 0:t.enableComments,enableContextMenu:t==null?void 0:t.enableContextMenu,components:{blocks:[...WS,...((l=t==null?void 0:t.components)==null?void 0:l.blocks)||[]],embeds:[...Lx,...((c=t.components)==null?void 0:c.embeds)||[]],boxes:[...qS,...((d=t.components)==null?void 0:d.boxes)||[]],commandProviders:[new F0,...((h=t.components)==null?void 0:h.commandProviders)||[]],decorators:[new dg,new XC],insertions:[q1],blockHooks:[new MA,new fw,...((C=t.components)==null?void 0:C.blockHooks)||[]],textRenders:[new L4,new XE,...((E=t.components)==null?void 0:E.textRenders)||[]],options:{...t.componentsOptions}},shortcuts:[Gq,AH,Iz,hA,n4,kF,lA,LX,s0,AF,...t.shortcuts||[]],colors:["#0064FF","#EB3723","#F59300","#00A865","#F25A0A","#70A310","#009CAD","#0990D9","#8851ED","#D62069"]});if(o.editorCommandProviders.registerCommandProvider(new po(o)),o.input.addHandler(new AY),o.input.addHandler(new mg),o.input.addHandler(new XK),o.input.addHandler(new Bz),o.input.addHandler(new vA(o,{hideTitle:t.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.common.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0,applyContentPlaceholder:(A=t.placeholder)==null?void 0:A.applyContentPlaceholder})),o.input.addHandler(new sg(o,(v=t.componentsOptions)==null?void 0:v.quickMenu)),o.input.addHandler(new KA(o)),o.input.addHandler(new WA(o)),o.input.addHandler(new Eg),o.input.addHandler(new Uk),o.doc.registerCallback(new xY(o)),o.addCustom("remote-cursor",()=>new mT(o)),o.addCustom("block-menu",X=>new mw(X)),de.isMobile||o.addCustom("editor-tooltip",()=>new Ld(o)),t!=null&&t.enableComments&&o.addCustom("editor-comments",X=>new S4(X,new UZ(X))),t.enableContextMenu!==!1&&o.addCustom("editor-context-menu",X=>new YA(X)),o.addCustom("create-options",()=>new Ub(o,t)),o.addCustom("drop-target",()=>new qd(o)),o.addCustom("list-to-mindmap",()=>new tg(o)),o.addCustom("list-to-mention",()=>new VY(o)),o.addCustom("mobile-helper",()=>new uQ(o)),o.addCustom("code-caret",()=>new gH(o)),o.addCustom("image-paste-handler",()=>new FA(o)),(w=t.componentsOptions)!=null&&w.mention){const X=t.componentsOptions.mention;o.addCustom("mention",()=>new mS(o,X))}if(o.addCustom("heading-collapse",()=>new mx(o)),o.addCustom(lh,X=>new bx(X)),bu.register(o),qd.register(o),Dl.register(o),kl.register(o),o.addListener("clickLink",(X,ft,pt)=>{var wt;if((wt=t==null?void 0:t.events)!=null&&wt.onClickLink){t.events.onClickLink(X,ft,pt);return}const ct=pt.getAttribute("link");ct&&(X.readonly||ft.ctrlKey||ft.metaKey)&&window.open(ct,"_blank")}),(U=(S=t.componentsOptions)==null?void 0:S.remoteCarets)!=null&&U.onUserChanged){const X=(V=(M=t.componentsOptions)==null?void 0:M.remoteCarets)==null?void 0:V.onUserChanged;o.doc.getRemoteUsers().on("change",ft=>{X(o,ft)})}return(Y=(rt=t.componentsOptions)==null?void 0:rt.templates)!=null&&Y.templates.length&&(o.addListener("docChanged",()=>{Pg(o)}),o.addListener("resize",()=>{Pg(o,{reset:!0})}),setTimeout(()=>{Pg(o)},100)),o.doc.registerCallback({onError:async X=>{if(X.code==="ResetDoc"){Dx.error(`reset doc: ${X.message}`);const ft=await md.load(r);o.doc.reset(ft)}}}),o.version="1.1.35",Br.level===Gi.DEBUG&&(window.setReauthFail=X=>{window.isReauthError=X},window.reConnect=X=>o.doc.externalDoc.client.connection.reConnect(X)),o}function Vtt(n){return n.toJSON!==void 0}async function $tt(n,t,e){var o,s,l,c,d,h,C,E;p(Dx,n,"app does not exists");const r=Vtt(t)?t:new RC(t,{serverUrl:e.serverUrl||""});e.lang&&_.setLang(e.lang),Br.level=(o=e.logLevel)!=null?o:Gi.DEBUG;const i=td(n,r,{id:e.id,scrollContainer:e==null?void 0:e.scrollContainer,components:{blocks:[dA,xA,bA,Ok,...(l=(s=e.components)==null?void 0:s.blocks)!=null?l:[]],commandProviders:[new F0],decorators:[new dg,new XC],embeds:[...Lx,...((c=e.components)==null?void 0:c.embeds)||[]],boxes:[qk,gS,P4,...((d=e.components)==null?void 0:d.boxes)||[]],insertions:[q1],blockHooks:[new MA,...((h=e.components)==null?void 0:h.blockHooks)||[]],textRenders:[new L4,new XE,...((C=e.components)==null?void 0:C.textRenders)||[]],options:{...e.componentsOptions}},shortcuts:[hA,n4,lA,s0]});return i.editorCommandProviders.registerCommandProvider(new po(i)),i.input.addHandler(new mg),i.input.addHandler(new vA(i,{hideTitle:e.hideTitle,headingLevel:1,titlePlaceholder:_.t("placeholder.common.title"),contentPlaceholder:_.t("placeholder.common.content"),readonlyTitlePlaceholder:_.t("placeholder.local.readonlyTitle"),addPlaceholderToAllCurrentEmptyBlock:!0})),i.input.addHandler(new sg(i,(E=e.componentsOptions)==null?void 0:E.quickMenu)),i.input.addHandler(new KA(i)),i.input.addHandler(new WA(i)),i.input.addHandler(new Eg),i.input.addHandler(new Uk),i.addCustom("block-menu",A=>new mw(A)),de.isMobile||i.addCustom("editor-tooltip",()=>new Ld(i)),i.addCustom("image-paste-handler",()=>new FA(i)),e!=null&&e.enableComments&&i.addCustom("editor-comments",A=>new S4(A,new OZ(A,r))),e.enableContextMenu!==!1&&i.addCustom("editor-context-menu",A=>new YA(A)),i.addCustom("heading-collapse",()=>new mx(i)),i.addListener("clickLink",(A,v,w)=>{var U;if((U=e==null?void 0:e.events)!=null&&U.onClickLink){e.events.onClickLink(A,v,w);return}const S=w.getAttribute("link");S&&(A.readonly||v.ctrlKey||v.metaKey)&&window.open(S,"_blank")}),i.addCustom(lh,A=>new bx(A)),bu.register(i),i.version="1.1.35",i}async function Htt(n,t,e){var h;const r=n.doc.externalDoc.client.auth,i=await E0.load({auth:r,serverUrl:e});if(!((h=i.getVersionHelper)==null?void 0:h.call(i)))throw new Error("the editor does not support to show versions");const s=n.getCustom("create-options");if(!s)throw new Error("the editor does not support to show versions");const l=s.getData(),c=new XS(l),d=n.addCustom("version-dialog",()=>new tS(i,c));return d.show(t),d}b.tippy=g9,b.AnchorBox=DB,b.AuthError=dd,b.AuthHeader=va,b.AutoScroll=bm,b.BaseURLHeader=nu,b.BasicCommands=CK,b.BlockExclusiveHook=fw,b.BlockLockerHook=MA,b.BlockLockerPasteHandler=Eg,b.BlockResizer=Pd,b.BrBox=wB,b.CodeBlock=xA,b.CodeLineBlock=bA,b.CodeTextDecorator=dg,b.DOC_RE_AUTH_KEYS=lh,b.DefaultShortcuts=s0,b.DocIdError=sO,b.DocReAuthCallbacks=bx,b.DragDrop=Zb,b.DrawioEmbed=OS,b.EditorBlocks=f3,b.EditorBoxes=LB,b.EditorCommandProviders=wy,b.EditorComplexBlockPosition=xi,b.EditorComplexSelectionRange=Ji,b.EditorDecorators=OB,b.EditorEmbeds=h3,b.EditorInsertions=UB,b.EditorSimpleBlockPosition=Cn,b.EditorSimpleSelectionRange=yn,b.EmbedBlock=g3,b.EmbedBlockResizer=nh,b.EnforceWithDocumentTitleHandler=vA,b.EventCallbacks=Lc,b.FILL_CHAR=I8,b.FileExtError=lO,b.GroupOrder=Kk,b.HeadingBlockScrollListener=MY,b.ImageBox=IB,b.InlineBoxCommandProvider=tR,b.InputtingInsertion=_B,b.LocalDoc=RC,b.LogLevel=Gi,b.Logger=Br,b.MIN_DISTANCE_THRESHOLD=Qb,b.ManualCloseDialog=pd,b.ManualMenu=hl,b.ManualToolbar=gd,b.MarkdownInputHandler=mg,b.MaxUserError=KC,b.Mindmap=Z0,b.OnesEditorAutoSuggest=pE,b.OnesEditorCustomDataWrapper=Ub,b.OnesEditorExclusiveBlock=kl,b.OnesEditorHoveringBlock=je,b.OnesEditorIcons=GO,b.OnesEditorQuickMenu=sg,b.OnesEditorToc=sh,b.OnesEditorTocProvider=Dl,b.OnesEditorToolbar=bu,b.OnesEditorTooltip=Ld,b.OnesEditorVersionsDialog=tS,b.PermissionError=C0,b.Popup=su,b.ReAuthToolbar=BS,b.RemoteCarets=mT,b.RemoteCaretsDecorator=XC,b.RemoteCaretsInsertion=q1,b.RemoteUsers=ed,b.RequestReloadError=hd,b.RichText=zn,b.ShareDBDoc=md,b.ShareDBDocVersionsProvider=XS,b.ShareDBServer=E0,b.SimpleCache=Hb,b.StandardEmbedBlockCommands=sx,b.TEXT_STYLE_BACKGROUND_COLOR_PREFIX=R1,b.TEXT_STYLE_COLOR_PREFIX=k1,b.TableBlock=dA,b.TableBlockCommandProvider=F0,b.TableShortcuts=hA,b.TextBlock=ur,b.TextBox=RB,b.TextColorItem=D2,b.TextStyleShortcuts=lA,b.TocEmbed=dS,b.ZERO_WIDTH_SPACE_CHAR=_c,b.abbreviation=vm,b.addAttribute=Im,b.addClass=q,b.addCommentToBlock=eh,b.addDays=TI,b.addMetaToDoc=Jf,b.addMonths=yI,b.animateScrollTo=oa,b.applyPlaceholderToBlock=Od,b.assert=p,b.autoShowHideTemplates=Pg,b.bindKeyDownEvent=hm,b.blockToDoc=bC,b.blockToHtml=Q1,b.blockToMarkdown=Wm,b.blockToText=Gm,b.blocksToDoc=Q5,b.clearAllSelection=zv,b.clientType=de,b.cloneBlock=sl,b.cloneChildContainer=lC,b.cloneDoc=aC,b.cloneText=EB,b.commentToShareDbComment=qC,b.compareElement=um,b.comparePosition=E1,b.complexBlockAdjustSelectionPos=wm,b.complexBlockFindNearestChildBlock=B7,b.complexBlockGetAllChildContainers=_n,b.complexBlockGetBottomChildContainers=A3,b.complexBlockGetDeepFirstChild=p3,b.complexBlockGetFirstSimpleChild=x1,b.complexBlockGetLastSimpleChild=Fc,b.complexBlockGetSelectedContainers=Pc,b.complexBlockGetTopChildContainers=E3,b.containerToDoc=J5,b.continuousScroll=pv,b.convertBlockFrom=km,b.convertImageFileToPng=AS,b.convertImageSrcToPng=rQ,b.converterIntercept=hg,b.copyBlockAttributes=XB,b.copyResourcesFromDoc=kC,b.createBlockAnchor=jo,b.createBlockCaretAnchor=b3,b.createBlockContentElement=da,b.createBlockElement=Pv,b.createBlockSimpleDocRange=Vm,b.createBlockSimpleRange=Ie,b.createBoxContentElement=Vv,b.createBoxElement=Fv,b.createBoxOp=CB,b.createChildContainer=c3,b.createComplexBlockPosition=Ue,b.createComplexDocPos=BB,b.createComplexDocRange=M8,b.createContainer=xB,b.createContainerElement=n1,b.createDeleteOps=hB,b.createEditor=td,b.createEditorSelectionRange=En,b.createElement=B,b.createEmptyContainer=Yo,b.createEmptyDoc=Xo,b.createEmptyTextBlockData=Fm,b.createExpandedRange=am,b.createIconButton=na,b.createImage=Mp,b.createInsertOps=Nm,b.createInsertionContentElement=jv,b.createInsertionElement=$v,b.createLocalEditor=$tt,b.createOnesEditor=Ktt,b.createRange=jb,b.createRichText=Ea,b.createRootContainer=a3,b.createSimpleBlockPosition=mt,b.createSimpleDocPos=vB,b.createTextBlockData=no,b.createTextButton=Sa,b.createTextOp=Xr,b.createTextWithReplaceSoftReturn=F1,b.daysAfter=Xp,b.deleteText=V1,b.diffDays=kI,b.disablePageScroll=zp,b.docToHtml=jB,b.docToHtmlFragment=zf,b.docToMarkdown=zB,b.docToText=ol,b.downloadImageToFile=vS,b.downloadObjectToFile=yx,b.downloadSvgToString=RS,b.editLink=kd,b.editorAddComment=Nq,b.editorAddTextAttribute=s5,b.editorAutoInsertBlock=YB,b.editorBreakTextBlock=Xc,b.editorClearCompositionText=eC,b.editorClearSelectedContents=Jm,b.editorCopyBlock=yC,b.editorCopyDoc=o0,b.editorDeleteBlock=iC,b.editorDeleteBlockText=nC,b.editorDeleteBlockWithoutChildren=Ym,b.editorDeleteChildContainer=I_,b.editorDeleteChildContainers=QB,b.editorFocusToBlock=sC,b.editorFocusToEnd=Y_,b.editorGetBlockData=Qo,b.editorGetBlockText=Jn,b.editorGetBlockTextEx=Hm,b.editorGetBoxData=TB,b.editorHandleKeyboardEvent=uy,b.editorInsertBlock=qc,b.editorInsertBoxToBlock=WB,b.editorInsertDoc=i5,b.editorInsertDocAt=cC,b.editorInsertText=tC,b.editorInsertTextToBlock=GB,b.editorInsertTextToBlockEx=Z1,b.editorMergeTextBlock=JB,b.editorMoveDown=A5,b.editorMoveEnd=pC,b.editorMoveHome=S5,b.editorMoveLeft=p5,b.editorMoveLineEnd=N5,b.editorMoveLineHome=O5,b.editorMovePageDown=H5,b.editorMovePageUp=$5,b.editorMoveRight=C5,b.editorMoveUp=E5,b.editorMoveWordEnd=k5,b.editorMoveWordLeft=T5,b.editorRangeClearColor=a5,b.editorRangeGetColor=c5,b.editorRangeSetColor=l5,b.editorRemoveTextAttribute=U_,b.editorReplaceBlockText=Zm,b.editorReplaceContainer=o5,b.editorRunOnce=wC,b.editorSelectAll=EC,b.editorSelectContainer=n0,b.editorSelectDown=x5,b.editorSelectEnd=CC,b.editorSelectHome=L5,b.editorSelectLeft=b5,b.editorSelectLineEnd=U5,b.editorSelectLineHome=M5,b.editorSelectPageDown=G5,b.editorSelectPageUp=z5,b.editorSelectRight=v5,b.editorSelectUp=B5,b.editorSelectWordEnd=w5,b.editorSelectWordLeft=R5,b.editorSetTextColor=Yc,b.editorShowFindDialog=wW,b.editorToDocx=Ftt,b.editorUpdateBlockData=t0,b.editorUpdateCompositionText=qB,b.editorUpdateEmbedData=n5,b.enablePageScroll=Gp,b.escapeHtmlText=mm,b.escapeRegExp=Zp,b.escapeSpace=sI,b.exclusiveBlock=IA,b.executeBlockCommand=t3,b.executeEmbedBlockCommand=Zv,b.executeRangeCommand=Ry,b.fileToDataUrl=Mc,b.findAfterOffsetNotType=z1,b.findAllText=AC,b.findBlockByIndex=Lv,b.findEventTargetBlock=Wb,b.findInsertionById=Hv,b.findNextOffset=t_,b.findNextVisibleSimpleBlock=Dy,b.findPrevOffset=Z8,b.findPrevOffsetNotType=j1,b.findPrevSimpleBlockBeforeChildContainer=C3,b.findPrevVisibleSimpleBlock=Iy,b.findTarget=Dc,b.findWordEnd=W1,b.findWordLeft=G1,b.format=Rf,b.formatBytes=Cv,b.formatDate=Qp,b.fragmentToHtml=uv,b.fromBase64=Bf,b.fromBase64ToBlob=Hp,b.fromBase64ToUint8Array=CI,b.fromDocRange=nl,b.fromNowString=Jp,b.genId=it,b.generateEditorContainerId=e1,b.getAllChildBlocks=y1,b.getAllQuickMenuItems=sA,b.getAllSelectedBlocks=Zi,b.getAttributesAt=Hc,b.getBlockBackground=o1,b.getBlockByIndex=Js,b.getBlockCaretRect=tl,b.getBlockClass=le,b.getBlockClassByType=ca,b.getBlockClientRects=Vo,b.getBlockCommandsWithHook=d1,b.getBlockContent=zt,b.getBlockHeading=Df,b.getBlockId=dt,b.getBlockIndex=Rt,b.getBlockInfo=Hd,b.getBlockKind=Ei,b.getBlockMinWidth=Wv,b.getBlockNearestRangeFromPoint=v1,b.getBlockOptions=FI,b.getBlockPath=el,b.getBlockProperties=Yv,b.getBlockRangeFromPoint=Sm,b.getBlockStyles=PI,b.getBlockTextLength=At,b.getBlockTools=ve,b.getBlockType=Ot,b.getBoxContent=l1,b.getBoxId=Kv,b.getBoxTypeFromElement=If,b.getChildBlockCount=Xi,b.getChildBlocks=ke,b.getChildOffset=rl,b.getColorFromAttributes=S1,b.getColorFromContent=Bm,b.getComplexBlockClass=jr,b.getContainerBlockPath=o3,b.getContainerBlocks=wv,b.getContainerBlocksElement=Sf,b.getContainerById=Ci,b.getContainerId=Et,b.getContainerMinWidth=p1,b.getContainerToolsElement=UI,b.getContainerWidth=u3,b.getDistanceSquare=Ys,b.getElementFromPoint=Fe,b.getElementOffset=bf,b.getElementScale=Hr,b.getEmbedType=ln,b.getExistsBlockTools=ym,b.getExistsContainerById=wf,b.getFileExt=kf,b.getFirstChildBlock=Me,b.getFirstClientRect=cm,b.getHeadingBlockChildren=Nc,b.getHeadingMenuOptions=nA,b.getHorizontalPadding=Op,b.getInsertionContent=a1,b.getLastChildBlock=We,b.getLastClientRect=ra,b.getListAllNextBrothers=pu,b.getLogger=D,b.getNextBlock=ae,b.getNextHiddenBlocks=r3,b.getNextValidOffset=pa,b.getNextVisibleBlock=Gr,b.getOffsetFromPoint=Up,b.getOffsetInfoAfter=$f,b.getOffsetInfoBefore=jm,b.getOpAt=W3,b.getOpLength=Lm,b.getParentBlock=et,b.getParentBlockExcludeSelf=fa,b.getParentBox=s1,b.getParentContainer=at,b.getPrevBlock=ze,b.getPrevValidOffset=il,b.getPrevVisibleBlock=zr,b.getRangeCommands=Ty,b.getReferenceClientRect=fk,b.getRootBlock=f1,b.getScrollContainer=pn,b.getSpecialBlockCommands=Qv,b.getStandardEmbedBlockProperties=lx,b.getTextAfterOffset=Q8,b.getTextAttributes=J1,b.getTextBeforeOffset=J8,b.getTextBlockChild=Uf,b.getTextBlockClass=Dv,b.getTextBlockContentChildTextLength=qr,b.getTextBlockContentChildType=i3,b.getTextBlockContentChildren=Qi,b.getTextLength=jn,b.getTextOpLength=T1,b.getTextWidth=Em,b.getToolbar=G0,b.handleBlockElementUpdated=qv,b.hasAltOnly=dI,b.hasClass=Mt,b.hasCtrlOrCmd=ov,b.hasCtrlOrCmdOnly=fI,b.hashCode=yv,b.hideBlock=Nv,b.hideTemplates=ES,b.htmlToFragment=Cm,b.i18n=_,b.includeBigTable=vN,b.injectDocToHtmlFragment=Qf,b.injectStyle=Yb,b.inputActions=pM,b.insertEmptyBlock=$I,b.insertEmptyEmbedBlock=h1,b.insertText=qo,b.intersectionCommands=XM,b.isBackspace=lv,b.isBlock=ua,b.isBlockLocked=Cg,b.isBlockLockedByOthers=_A,b.isBlockLockedBySelf=jd,b.isBlockTools=Ov,b.isBox=Tm,b.isBoxOp=zo,b.isCJK=rv,b.isChildContainer=pi,b.isChildNode=Ae,b.isCodeBlock=Di,b.isCollapsedHeadingBlock=Yi,b.isCollapsedRange=_8,b.isComplexBlockPosition=ma,b.isComplexKindBlock=Pt,b.isContainer=Qs,b.isContainerSelectedAllChildBlocks=W5,b.isControlEvent=la,b.isDelete=mI,b.isDraggingFiles=Am,b.isElementVisible=dm,b.isEmbedBlock=Le,b.isEmptyContainer=Of,b.isEmptyDoc=$1,b.isEmptyTextBlock=Be,b.isEmptyTextBlockWithoutCompositionText=Ud,b.isEnterOnly=sv,b.isEscape=pm,b.isExclusiveBlock=$d,b.isExpandedHeadingBlock=n3,b.isFirefox=Af,b.isFirstChildBlockInComplexBlock=v7,b.isHeadingBlock=Dn,b.isHighSurrogate=nI,b.isInBlock=c1,b.isInBlockTools=Oc,b.isLetter=nv,b.isLowSurrogate=rI,b.isMatchShortcut=Wi,b.isMoveForward=cI,b.isNavigationEvent=aI,b.isNavigationKey=iv,b.isNodeRemoved=xf,b.isNumber=ev,b.isPrintableKey=Vp,b.isRootBlock=Wr,b.isRootContainer=ie,b.isSafari=ea,b.isSameDay=Yp,b.isSelectBoxOnly=ei,b.isShiftEnter=hI,b.isShiftTab=pI,b.isShortcutEvent=uI,b.isSimpleBlock=NI,b.isSimpleBlockPosition=bi,b.isSimplePos=bB,b.isSimpleRange=Km,b.isSpace=gm,b.isTab=gI,b.isTextBlockContentBoxChild=yr,b.isTextBlockContentChild=_f,b.isTextBlockContentInsertionChild=Ho,b.isTextBlockContentTextChild=Mf,b.isTextKindBlock=st,b.isTextKindBlockType=Lf,b.isTitleBlock=Ko,b.isToday=Ev,b.isValidOffset=cr,b.isVisibleBlock=Zs,b.isYesterday=Av,b.loadJs=Gb,b.loadJsPromise=ia,b.lockers=gi,b.md5=kv,b.mergeCommands=z0,b.mergeDocs=Aa,b.mergeOps=K1,b.mergeText=S8,b.multiSplitText=X3,b.overflowText=xv,b.parseShortcut=av,b.patchNode=yf,b.pointInRect=sa,b.rangeAddAttribute=Ff,b.rangeGetTextColor=nB,b.rangeRemoveAttribute=$c,b.rangeSetTextColor=Z3,b.rangeTransformText=Q3,b.registerDragDrop=Fp,b.removeAttribute=w1,b.removeClass=ut,b.removeLastBr=T8,b.removePlaceholderFromBlock=OR,b.removeStyle=Xb,b.replaceAll=RI,b.replaceAllCaseInsensitive=wI,b.replaceAllText=X5,b.replaceText=Pm,b.requestDownload=xm,b.resetListStart=Eu,b.scrollIntoView=jf,b.scrollable=gv,b.selectFile=Uc,b.selectedBlockToDoc=r0,b.selectionToDoc=Qc,b.setAttributes=fm,b.setClipboardData=Tf,b.setClipboardDataByEvent=xI,b.setColorToAttributes=tB,b.setDataset=Np,b.setDefaultCursor=vf,b.setStyles=Pp,b.shareDBCommentToDocObject=WC,b.shareDBDocCommentToComment=dT,b.shortcutToDisplayText=gn,b.showBlock=i1,b.showDocVersions=Htt,b.showTemplates=Ax,b.splitText=ar,b.splitToThree=an,b.stringToDataUrl=jp,b.stringToObjectUrl=Wp,b.subText=Y3,b.textNodeOffsetFromPoint=zb,b.titleFromEditor=bS,b.toBase64URL=qi,b.toMindmap=J0,b.toPlainText=Re,b.toPlainTextKeepLength=H1,b.trimChar=Kp,b.unexclusiveBlock=DA,b.unicodeLength=iI,b.unicodeSubstr=oI,b.updateBlockSelection=Gv,b.updateOpAttributes=AB,b.updateTextBlockContent=Y8,b.updateUrl=$p;for(const n in He)n!=="default"&&!b.hasOwnProperty(n)&&Object.defineProperty(b,n,{enumerable:!0,get:()=>He[n]});Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ones-editor/editor",
3
- "version": "1.1.34",
3
+ "version": "1.1.35",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",