PPTist/js/app.9efa1f08.js

2 lines
628 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(e){function t(t){for(var c,a,r=t[0],i=t[1],s=t[2],u=0,b=[];u<r.length;u++)a=r[u],Object.prototype.hasOwnProperty.call(n,a)&&n[a]&&b.push(n[a][0]),n[a]=0;for(c in i)Object.prototype.hasOwnProperty.call(i,c)&&(e[c]=i[c]);d&&d(t);while(b.length)b.shift()();return o.push.apply(o,s||[]),l()}function l(){for(var e,t=0;t<o.length;t++){for(var l=o[t],c=!0,r=1;r<l.length;r++){var i=l[r];0!==n[i]&&(c=!1)}c&&(o.splice(t--,1),e=a(a.s=l[0]))}return e}var c={},n={app:0},o=[];function a(t){if(c[t])return c[t].exports;var l=c[t]={i:t,l:!1,exports:{}};return e[t].call(l.exports,l,l.exports,a),l.l=!0,l.exports}a.m=e,a.c=c,a.d=function(e,t,l){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(a.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)a.d(l,c,function(t){return e[t]}.bind(null,c));return l},a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],i=r.push.bind(r);r.push=t,r=r.slice();for(var s=0;s<r.length;s++)t(r[s]);var d=i;o.push([1,"chunk-vendors"]),l()})({0:function(e,t){},"00ee":function(e,t,l){},"0491":function(e,t,l){"use strict";l("729c")},"0516":function(e,t,l){"use strict";l("b854")},"0593":function(e,t,l){"use strict";l("4e72")},"05a9":function(e,t,l){"use strict";l("ac68")},"084d":function(e,t,l){},"0d2c":function(e,t,l){},"0d50":function(e,t,l){},"0e5d":function(e,t,l){},"0f64":function(e,t,l){"use strict";l("17bf")},1:function(e,t,l){e.exports=l("cd49")},1126:function(e,t,l){"use strict";l("72c0")},1285:function(e,t,l){},"13b1":function(e,t,l){},1406:function(e,t,l){"use strict";l("a3c1")},1485:function(e,t,l){},"14a3":function(e,t,l){},"152b":function(e,t,l){},1549:function(e,t,l){},"154d":function(e,t,l){},1637:function(e,t,l){},1643:function(e,t,l){},"173e":function(e,t,l){"use strict";l("39c2")},"179a":function(e,t,l){"use strict";l("cb4f")},"17bf":function(e,t,l){},"180d":function(e,t,l){"use strict";l("2797")},"18a5":function(e,t,l){"use strict";l("461f")},"1ebd":function(e,t,l){"use strict";l("1549")},2:function(e,t){},"217f":function(e,t,l){},"22b8":function(e,t,l){},"22e8":function(e,t,l){},"231f":function(e,t,l){},"23e8":function(e,t,l){"use strict";l("4fa8")},2460:function(e,t,l){"use strict";l("ccb8")},"24bc":function(e,t,l){"use strict";l("77cb")},"25f2":function(e,t,l){"use strict";l("af13")},2797:function(e,t,l){},2803:function(e,t,l){"use strict";l("ea69")},"28eb":function(e,t,l){"use strict";l("cd4f")},2937:function(e,t,l){},"2a2b":function(e,t,l){},"2b33":function(e,t,l){},"2d86":function(e,t,l){"use strict";l("c756")},3:function(e,t){},3010:function(e,t,l){"use strict";l("d2a4")},3328:function(e,t,l){"use strict";l("9ce5")},3650:function(e,t,l){"use strict";l("be31")},"36ac":function(e,t,l){},"36e5":function(e,t,l){"use strict";l("c22c")},3836:function(e,t,l){"use strict";l("77f0")},3929:function(e,t,l){"use strict";l("9f9d")},"399d":function(e,t,l){"use strict";l("5a0e")},"39c2":function(e,t,l){},"3a1b":function(e,t,l){"use strict";l("6c17")},"3c08":function(e,t,l){},"3e44":function(e,t,l){},"3ef1":function(e,t,l){"use strict";l("d2a7")},4036:function(e,t,l){"use strict";l("c581")},"417d":function(e,t,l){},4327:function(e,t,l){},"45a0":function(e,t,l){},"45c1":function(e,t,l){},"45c15":function(e,t,l){"use strict";l("b614")},"461f":function(e,t,l){},4672:function(e,t,l){},4731:function(e,t,l){"use strict";l("231f")},4764:function(e,t,l){"use strict";l("b2e0")},"48ac":function(e,t,l){},"4a6b":function(e,t,l){},"4ac4":function(e,t,l){},"4b9a":function(e,t,l){"use strict";l("fa09")},"4c0e":function(e,t,l){"use strict";l("3c08")},"4e72":function(e,t,l){},"4f8b":function(e,t,l){"use strict";l("dcba")},"4fa8":function(e,t,l){},"513b":function(e,t,l){"use strict";l("1285")},5140:function(e,t,l){"use strict";l("2a2b")},"51eb":function(e,t,l){},"51f9":function(e,t,l){},"53c4":function(e,t,l){},5455:function(e,t,l){},"553d":function(e,t,l){},5634:function(e,t,l){"use strict";l("96aa")},5688:function(e,t,l){"use strict";l("2b33")},"573c":function(e,t,l){"use strict";l("0e5d")},"57b2":function(e,t,l){},"58eb":function(e,t,l){"use strict";l("6b80")},5952:function(e,t,l){},5970:function(e,t,l){"use strict";l("553d")},5977:function(e,t,l){"use strict";l("d2a1")},"5a0e":function(e,t,l){},"5a2a":function(e,t,l){},"5a58":function(e,t,l){"use strict";l("48ac")},"5aad":function(e,t,l){},"5c9a":function(e,t,l){},"5ef8":function(e,t,l){},6014:function(e,t,l){},"601c":function(e,t,l){"use strict";l("ec31")},"60d3":function(e,t,l){},6116:function(e,t,l){"use strict";l("eae7")},"614e":function(e,t,l){"use strict";l("51f9")},6237:function(e,t,l){"use strict";l("bd1d")},"624e":function(e,t,l){"use strict";l("0d2c")},"63e4":function(e,t,l){},6429:function(e,t,l){},"652e":function(e,t,l){"use strict";l("0d50")},"679c":function(e,t,l){"use strict";l("92d1")},6877:function(e,t,l){},6878:function(e,t,l){"use strict";l("22b8")},"689b":function(e,t,l){"use strict";l("1643")},"68ae":function(e,t,l){},"68b8":function(e,t,l){"use strict";l("abab")},"68bd":function(e,t,l){},"691a":function(e,t,l){"use strict";l("a7c5")},"6a91":function(e,t,l){"use strict";l("a5fc")},"6b65":function(e,t,l){},"6b80":function(e,t,l){},"6c17":function(e,t,l){},"6fb9":function(e,t,l){"use strict";l("00ee")},"700f":function(e,t,l){"use strict";l("5455")},"729c":function(e,t,l){},"72c0":function(e,t,l){},"74ba":function(e,t,l){},"75e6":function(e,t,l){"use strict";l("60d3")},7630:function(e,t,l){},"77cb":function(e,t,l){},"77f0":function(e,t,l){},"796c":function(e,t,l){"use strict";l("7630")},"79fc":function(e,t,l){},"7a78":function(e,t,l){"use strict";l("4672")},"7aed":function(e,t,l){"use strict";l("bb78")},"7b49":function(e,t,l){"use strict";l("adc6")},"7ce8":function(e,t,l){"use strict";l("f9e0")},"7d40":function(e,t,l){"use strict";l("68ae")},"7f55":function(e,t,l){},"80dc":function(e,t,l){"use strict";l("e611")},8216:function(e,t,l){"use strict";l("eb5e")},"82d5":function(e,t,l){},"862c":function(e,t,l){"use strict";l("ff57")},8683:function(e,t,l){"use strict";l("d422")},"8c56":function(e,t,l){},"8cc5":function(e,t,l){"use strict";l("ccac")},"8ddd":function(e,t,l){},"8def":function(e,t,l){},"8f78":function(e,t,l){"use strict";l("b1c4")},"92d1":function(e,t,l){},9557:function(e,t,l){"use strict";l("154d")},9637:function(e,t,l){"use strict";l("997e")},"96aa":function(e,t,l){},"97ba":function(e,t,l){},9918:function(e,t,l){"use strict";l("d097")},"997e":function(e,t,l){},"99b8":function(e,t,l){"use strict";l("b57f")},"9b4d":function(e,t,l){"use strict";l("14a3")},"9bc1":function(e,t,l){"use strict";l("5a2a")},"9c4e":function(e,t,l){},"9ce5":function(e,t,l){},"9f60":function(e,t,l){},"9f65":function(e,t,l){"use strict";l("13b1")},"9f9d":function(e,t,l){},"9fe7":function(e,t,l){},a060:function(e,t,l){"use strict";l("68bd")},a13f:function(e,t,l){"use strict";l("1637")},a3c1:function(e,t,l){},a5fc:function(e,t,l){},a669:function(e,t,l){"use strict";l("152b")},a697:function(e,t,l){},a785:function(e,t,l){"use strict";l("5ef8")},a7c5:function(e,t,l){},a832:function(e,t,l){},a874:function(e,t,l){"use strict";l("6014")},a8d7:function(e,t,l){"use strict";l("217f")},a8e7:function(e,t,l){"use strict";l("417d")},a9ab:function(e,t,l){"use strict";l("7f55")},a9b0:function(e,t,l){"use strict";l("ca3e")},abab:function(e,t,l){},ac68:function(e,t,l){},adc6:function(e,t,l){},adee:function(e,t,l){},ae3f:function(e,t,l){},ae59:function(e,t,l){"use strict";l("2937")},ae9f:function(e,t,l){"use strict";l("c6f0")},af13:function(e,t,l){},afc8:function(e,t,l){"use strict";l("45a0")},b096:function(e,t,l){"use strict";l("51eb")},b1c4:function(e,t,l){},b2e0:function(e,t,l){},b3b9:function(e,t,l){},b510:function(e,t,l){"use strict";l("6429")},b514:function(e,t,l){"use strict";l("8def")},b57f:function(e,t,l){},b614:function(e,t,l){},b615:function(e,t,l){"use strict";l("3e44")},b7d2:function(e,t,l){"use strict";l("79fc")},b854:function(e,t,l){},b9ba:function(e,t,l){"use strict";l("9c4e")},bad1:function(e,t,l){"use strict";l("4a6b")},bb78:function(e,t,l){},bcf0:function(e,t,l){"use strict";l("f191")},bd05:function(e,t,l){"use strict";l("e4f3")},bd1d:function(e,t,l){},bde5:function(e,t,l){"use strict";l("74ba")},be01:function(e,t,l){"use strict";l("22e8")},be31:function(e,t,l){},bee0:function(e,t,l){"use strict";l("1485")},c22c:function(e,t,l){},c24c9:function(e,t,l){"use strict";l("b3b9")},c3b0:function(e,t,l){"use strict";l("82d5")},c42d:function(e,t,l){},c581:function(e,t,l){},c6c4:function(e,t,l){"use strict";l("57b2")},c6ee:function(e,t,l){},c6f0:function(e,t,l){},c756:function(e,t,l){},c860:function(e,t,l){},ca3c:function(e,t,l){"use strict";l("63e4")},ca3e:function(e,t,l){},cb4f:function(e,t,l){},ccac:function(e,t,l){},ccb8:function(e,t,l){},cd49:function(e,t,l){"use strict";l.r(t);var c,n=l("7a23"),o=l("be92"),a=l("e1bd");(function(e){e["SYMBOL"]="symbol",e["EL_ANIMATION"]="elAnimation",e["EL_STYLE"]="elStyle",e["EL_POSITION"]="elPosition",e["SLIDE_DESIGN"]="slideDesign",e["SLIDE_ANIMATION"]="slideAnimation",e["MULTI_POSITION"]="multiPosition"})(c||(c={}));const r=[{label:"Arial",value:"Arial"},{label:"微软雅黑",value:"Microsoft Yahei"},{label:"宋体",value:"SimSun"},{label:"黑体",value:"SimHei"},{label:"楷体",value:"KaiTi"},{label:"新宋体",value:"NSimSun"},{label:"仿宋",value:"FangSong"},{label:"苹方",value:"PingFang SC"},{label:"华文黑体",value:"STHeiti"},{label:"华文楷体",value:"STKaiti"},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangSong"},{label:"华文中宋",value:"STZhongSong"},{label:"华文琥珀",value:"STHupo"},{label:"华文新魏",value:"STXinwei"},{label:"华文隶书",value:"STLiti"},{label:"华文行楷",value:"STXingkai"},{label:"冬青黑体",value:"Hiragino Sans GB"},{label:"兰亭黑",value:"Lantinghei SC"},{label:"偏偏体",value:"Hanzipen SC"},{label:"手札体",value:"Hannotate SC"},{label:"宋体",value:"Songti SC"},{label:"娃娃体",value:"Wawati SC"},{label:"行楷",value:"Xingkai SC"},{label:"圆体",value:"Yuanti SC"},{label:"华文细黑",value:"STXihei"},{label:"幼圆",value:"YouYuan"},{label:"隶书",value:"LiSu"}],i=[{label:"仓耳小丸子",value:"仓耳小丸子"},{label:"优设标题黑",value:"优设标题黑"},{label:"峰广明锐体",value:"峰广明锐体"},{label:"摄图摩登小方体",value:"摄图摩登小方体"},{label:"站酷快乐体",value:"站酷快乐体"},{label:"字制区喜脉体",value:"字制区喜脉体"},{label:"素材集市康康体",value:"素材集市康康体"},{label:"素材集市酷方体",value:"素材集市酷方体"},{label:"途牛类圆体",value:"途牛类圆体"},{label:"锐字真言体",value:"锐字真言体"}];var s=l("442c");const d=e=>{const{empty:t}=e.state.selection;t&&Object(s["d"])(e.state,e.dispatch)},u=(e,t,l)=>{if(l)e.dispatch(e.state.tr.addMark(l.from,l.to,t));else{const{$from:l,$to:c}=e.state.selection;e.dispatch(e.state.tr.addMark(l.pos,c.pos,t))}},b=(e,t,l,c)=>{let n=t;const o=e=>e.type===c;let a=null,r=null,i=null;while(n<=l){const t=e.nodeAt(n);if(!t||!t.marks)return null;const l=t.marks.find(o);if(!l)return null;if(a&&l!==a)return null;r=r||t,a=a||l,i=t,n++}let s=t,d=l,u=0;n=t-1;while(n>u){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==a)break;s=n,r=t,n--}n=l+1,u=e.nodeSize-2;while(n<u){const t=e.nodeAt(n),l=t&&t.marks.find(o);if(!l||l!==a)break;d=n,i=t,n++}return{mark:a,from:{node:r,pos:s},to:{node:i,pos:d}}},O=(e,t)=>Array.isArray(e)&&e.indexOf(t.type)>-1||t.type===e,m=(e,t)=>{for(let l=e.depth;l>0;l--){const c=e.node(l);if(t(c))return{pos:l>0?e.before(l):0,start:e.start(l),depth:l,node:c}}},p=e=>t=>m(t.$from,e),f=e=>t=>p(t=>O(e,t))(t),j=(e,t)=>{const l=t.schema.nodes[e];return!!f(l)(t.selection)},v=e=>{var t,l;const{selection:c,doc:n}=e.state,{from:o}=c;let a=n.nodeAt(o)||n.nodeAt(o-1);return null!==(t=a)&&void 0!==t&&t.lastChild&&(a=a.lastChild),(null===(l=a)||void 0===l?void 0:l.marks)||[]},h=(e,t,l)=>{for(const c of e)if(c.type.name===t&&c.attrs[l])return c.attrs[l];return null},y=(e,t)=>{for(const l of e)if(l.type.name===t)return!0;return!1},g=(e,t)=>{const{from:l,$from:c,to:n,empty:o}=e.selection;return o?t.isInSet(e.storedMarks||c.marks()):e.doc.rangeHasMark(l,n,t)},x=(e,t)=>{const{selection:l,doc:c}=e.state,{from:n,to:o}=l;let a=!0,r="";return c.nodesBetween(n,o,e=>(a&&e.attrs[t]&&(a=!1,r=e.attrs[t]),a)),r},k={color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",align:"left"},C=(e,t={})=>{const l={...k,...t},c=v(e),n=y(c,"strong"),o=y(c,"em"),a=y(c,"underline"),r=y(c,"strikethrough"),i=y(c,"superscript"),s=y(c,"subscript"),d=y(c,"code"),u=h(c,"forecolor","color")||l.color,b=h(c,"backcolor","backcolor")||l.backcolor,O=h(c,"fontsize","fontsize")||l.fontsize,m=h(c,"fontname","fontname")||l.fontname,p=h(c,"link","href")||"",f=x(e,"align")||l.align,g=j("bullet_list",e.state),C=j("ordered_list",e.state),N=j("blockquote",e.state);return{bold:n,em:o,underline:a,strikethrough:r,superscript:i,subscript:s,code:d,color:u,backcolor:b,fontsize:O,fontname:m,link:p,align:f,bulletList:g,orderedList:C,blockquote:N}},N=e=>{const t=v(e),l=h(t,"fontsize","fontsize")||k.fontsize;return parseInt(l)},E={bold:!1,em:!1,underline:!1,strikethrough:!1,superscript:!1,subscript:!1,code:!1,color:"#000",backcolor:"",fontsize:"20px",fontname:"微软雅黑",link:"",align:"left",bulletList:!1,orderedList:!1,blockquote:!1},w=e=>{if("string"!==typeof e)return!1;const t="Arial";if(e.toLowerCase()===t.toLowerCase())return!0;const l=100,c=100,n=100,o="a",a=document.createElement("canvas"),r=a.getContext("2d");if(!r)return!1;a.width=c,a.height=n,r.textAlign="center",r.fillStyle="black",r.textBaseline="middle";const i=e=>{r.clearRect(0,0,c,n),r.font=`${l}px ${e}, ${t}`,r.fillText(o,c/2,n/2);const a=r.getImageData(0,0,c,n).data;return[].slice.call(a).filter(e=>0!==e)};return i(t).join("")!==i(e).join("")};l("5b81");var V=l("66cb"),I=l.n(V),S=l("2ef0");const L=[{id:"test-slide-1",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"#5b9bd5",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"idn7Mx",left:355,top:65.25,width:585,height:188,lineHeight:1.2,content:"<p><strong><span style='font-size: 112px'>PPTIST</span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"<p><span style='font-size: 24px'>基于 Vue 3.x + TypeScript 的在线演示文稿应用</span></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"#5b9bd5",style:"solid",width:2}],background:{type:"solid",color:"#ffffff"}},{id:"test-slide-2",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处添加副标题</span></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"#5b9bd5",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"#fff"}},{id:"test-slide-3",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"#5b9bd5",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 80px'>感谢观看</span></span></strong></p>",rotate:0,defaultFontName:"Microsoft Yahei",defaultColor:"#333",wordSpace:5}],background:{type:"solid",color:"#fff"}}],B={themeColor:"#5b9bd5",fontColor:"#333",fontName:"Microsoft Yahei",backgroundColor:"#fff"},_=[{id:"template",elements:[{type:"shape",id:"4cbRxp",left:0,top:200,width:546,height:362.5,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,opacity:.7,rotate:0},{type:"shape",id:"ookHrf",left:0,top:0,width:300,height:320,viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z",fill:"{{themeColor}}",fixedRatio:!1,flipV:!0,rotate:0},{type:"text",id:"AkIh3E",left:355,top:95.11111111111111,width:585,height:116,lineHeight:1.2,content:"<p style=''><strong><span style='font-size: 80px'>输入标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:6},{type:"text",id:"7stmVP",left:355,top:253.25,width:585,height:56,content:"<p><span style='font-size: 24px'>请在此处输入副标题</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"FnpZs4",left:361,top:238,start:[0,0],end:[549,0],points:["",""],color:"{{themeColor}}",style:"solid",width:2}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"ptNnUJ",left:145,top:148,width:711,height:77,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"mRHvQN",left:207.50000000000003,top:249.84259259259264,width:585,height:56,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处添加副标题</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"line",id:"7CQDwc",left:323.09259259259267,top:238.33333333333334,start:[0,0],end:[354.8148148148148,0],points:["",""],color:"{{themeColor}}",style:"solid",width:4},{type:"shape",id:"09wqWw",left:-27.648148148148138,top:432.73148148148147,width:1056.2962962962963,height:162.96296296296296,viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"vSheCJ",left:183.5185185185185,top:175.5092592592593,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"Mpwv7x",left:211.29629629629628,top:201.80555555555557,width:605.1851851851851,height:185.18518518518516,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,opacity:.7},{type:"text",id:"WQOTAp",left:304.9074074074074,top:198.10185185185182,width:417.9629629629629,height:140,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 80px'>感谢观看</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:5}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"MZVO1kkj",elements:[{type:"shape",id:"cql0h8",left:0,top:0,width:352.59259259259255,height:562.5,viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0},{type:"shape",id:"_RTaF4",left:171.4814814814814,top:100.13888888888887,width:362.22222222222223,height:362.22222222222223,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"rgba(255,255,255,0)",fixedRatio:!1,rotate:0,outline:{width:10,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"UZfo8N",left:216.66666666666663,top:145.32407407407408,width:271.85185185185185,height:271.85185185185185,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='font-size: 80px'>01</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"ysqtBg",left:561.4814814814814,top:100.1388888888889,width:359.25925925925924,height:80,content:"<p style=''><strong><span style='font-size: 40px'>在此处输入标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"lXsoHa",left:572.5925925925925,top:202.3611111111111,width:257.77777777777777,height:260,content:"<ol><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li><li><p style=''>在此处输入内容</p></li></ol>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",lineHeight:2,fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"EBBnTr",left:360.5996472663139,top:141.8496472663139,width:278.80070546737215,height:278.80070546737215,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:0,color:"{{backgroundColor}}",style:"solid"}},{type:"shape",id:"gDIWDH",left:456.4373897707231,top:98.287037037037,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>1</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"DUWT7E",left:317.037037037037,top:237.68738977072314,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>4</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"pbhn38",left:456.43738977072303,top:377.08774250440916,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>3</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"CvMKrO",left:595.8377425044091,top:237.6873897707231,width:87.12522045855381,height:87.12522045855381,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!0,rotate:0,outline:{width:4,color:"{{backgroundColor}}",style:"solid"},text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>2</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"adudHB",left:402.962962962963,top:39.39814814814815,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"9UpDwg",left:402.962962962963,top:473.1018518518518,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"GERdpB",left:111.48148148148151,top:256.25,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"text",id:"G5qoho",left:691.1111111111111,top:256.25,width:194.07407407407408,height:50,content:"<p style='text-align: center;'>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"},{type:"shape",id:"vdZcI6",left:415.18518518518516,top:196.4351851851852,width:169.62962962962962,height:169.62962962962962,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"tYUmrx",left:156.66666666666683,top:149.02777777777771,width:264.4444444444445,height:264.4444444444445,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'><span style='font-size: 60px'>01</span></span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"shape",id:"0GVHf8",left:342.2222222222223,top:217.17592592592587,width:128.14814814814812,height:128.14814814814812,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{backgroundColor}}",fixedRatio:!1,rotate:0},{type:"text",id:"BO33Sv",left:378.8888888888889,top:235.24999999999994,width:464.4444444444444,height:92,content:"<p style=''><strong><span style='font-size: 48px'>在此处添加标题</span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Hj7ttp",left:69.35185185185185,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 36px'>1.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"FmKMNB",left:69.35185185185185,top:129.28240740740745,width:420,height:384,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"rI7ZeO",left:510.64814814814815,top:49.21759259259262,width:420,height:63,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 36px'>2.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"KspwGc",left:510.64814814814815,top:129.28240740740745,width:420,height:384,content:"<p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 24px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"Rx63Jo",left:69.35185185185179,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>1.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"ulyuzE",left:69.35185185185179,top:131.78240740740745,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"kr35Ca",left:510.6481481481481,top:51.71759259259262,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>2.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"BNQSpC",left:510.6481481481481,top:131.78240740740745,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Vr38Nu",left:69.35185185185185,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>3.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"IwKRSu",left:69.35185185185185,top:381.7824074074074,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"0Opr1v",left:510.64814814814815,top:301.71759259259255,width:420,height:58,lineHeight:1.2,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 32px'>4.请输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{themeColor}}"},{type:"text",id:"4L9Uzz",left:510.64814814814815,top:381.7824074074074,width:420,height:129,content:"<p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p><p style='text-align: center;'><span style='font-size: 22px'>在此处输入内容</span></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"text",id:"GdEGxg",left:134.53703703703704,top:127.25,width:152.77777777777777,height:308,lineHeight:1.8,content:"<p style='text-align: center;'><strong><span style='color: #ffffff;'><span style='font-size: 40px'>请在此处输入标题</span></span></strong></p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",wordSpace:8,fill:"{{themeColor}}"},{type:"text",id:"y5sAfw",left:332.8703703703704,top:127.25,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容1</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"VeuocM",left:332.8703703703704,top:212.0648148148148,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容2</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"RyFWQe",left:332.8703703703704,top:296.8796296296296,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容3</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"text",id:"Q56viI",left:332.8703703703704,top:381.69444444444446,width:532.5925925925926,height:50,content:"<blockquote><p style=''>请在此处输入内容4</p></blockquote>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}},{id:"template",elements:[{type:"shape",id:"SUWirT",left:73.8888888888889,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>1</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"YjzN1M",left:148.70370370370372,top:64.21296296296302,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"fS09I7",left:527.5925925925926,top:64.21296296296302,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>2</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"qCnfB1",left:602.4074074074074,top:64.21296296296302,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"difAAT",left:73.8888888888889,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>3</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"EUlvMo",left:148.70370370370372,top:221.25000000000003,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"US_9jB",left:527.5925925925926,top:221.25000000000003,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>4</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"243MnQ",left:602.4074074074074,top:221.25000000000003,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"Y_KUj0",left:73.8888888888889,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>5</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"9GglMe",left:148.70370370370372,top:378.287037037037,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"},{type:"shape",id:"eSInje",left:527.5925925925926,top:378.287037037037,width:49.629629629629626,height:49.629629629629626,viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z",fill:"{{themeColor}}",fixedRatio:!1,rotate:0,text:{content:"<p style='text-align: center;'><span style='color: #ffffff;'>6</span></p>",defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",align:"middle"}},{type:"text",id:"0S3yUg",left:602.4074074074074,top:378.287037037037,width:323.7037037037037,height:120,content:"<p style=''>在此输入内容</p><p style=''>在此输入内容</p><p style=''>在此输入内容</p>",rotate:0,defaultFontName:"{{fontName}}",defaultColor:"{{fontColor}}",fill:"{{subColor}}"}],background:{type:"solid",color:"{{backgroundColor}}"}}],T=Object(o["b"])("slides",{state:()=>({theme:B,slides:L,slideIndex:0,viewportRatio:.5625}),getters:{currentSlide(e){return e.slides[e.slideIndex]},currentSlideAnimations(e){const t=e.slides[e.slideIndex];if(null===t||void 0===t||!t.animations)return[];const l=t.elements,c=l.map(e=>e.id);return t.animations.filter(e=>c.includes(e.elId))},formatedAnimations(e){const t=e.slides[e.slideIndex];if(null===t||void 0===t||!t.animations)return[];const l=t.elements,c=l.map(e=>e.id),n=t.animations.filter(e=>c.includes(e.elId)),o=[];for(const a of n)if("click"!==a.trigger&&o.length){if("meantime"===a.trigger){const e=o[o.length-1];e.animations=e.animations.filter(e=>e.elId!==a.elId),e.animations.push(a),o[o.length-1]=e}else if("auto"===a.trigger){const e=o[o.length-1];e.autoNext=!0,o[o.length-1]=e,o.push({animations:[a],autoNext:!1})}}else o.push({animations:[a],autoNext:!1});return o},layouts(e){const{themeColor:t,fontColor:l,fontName:c,backgroundColor:n}=e.theme,o=I()(l).isDark()?"rgba(230, 230, 230, 0.5)":"rgba(180, 180, 180, 0.5)",a=JSON.stringify(_).replaceAll("{{themeColor}}",t).replaceAll("{{fontColor}}",l).replaceAll("{{fontName}}",c).replaceAll("{{backgroundColor}}",n).replaceAll("{{subColor}}",o);return JSON.parse(a)}},actions:{setTheme(e){this.theme={...this.theme,...e}},setViewportRatio(e){this.viewportRatio=e},setSlides(e){this.slides=e},addSlide(e){const t=Array.isArray(e)?e:[e],l=this.slideIndex+1;this.slides.splice(l,0,...t),this.slideIndex=l},updateSlide(e){const t=this.slideIndex;this.slides[t]={...this.slides[t],...e}},deleteSlide(e){const t=Array.isArray(e)?e:[e],l=[];for(let o=0;o<t.length;o++){const e=this.slides.findIndex(e=>e.id===t[o]);l.push(e)}let c=Math.min(...l);const n=this.slides.length-t.length-1;c>n&&(c=n),this.slideIndex=c,this.slides=this.slides.filter(e=>!t.includes(e.id))},updateSlideIndex(e){this.slideIndex=e},addElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,c=[...l,...t];this.slides[this.slideIndex].elements=c},deleteElement(e){const t=Array.isArray(e)?e:[e],l=this.slides[this.slideIndex].elements,c=l.filter(e=>!t.includes(e.id));this.slides[this.slideIndex].elements=c},updateElement(e){const{id:t,props:l}=e,c="string"===typeof t?[t]:t,n=this.slideIndex,o=this.slides[n],a=o.elements.map(e=>c.includes(e.id)?{...e,...l}:e);this.slides[n].elements=a},removeElementProps(e){const{id:t,propName:l}=e,c="string"===typeof l?[l]:l,n=this.slideIndex,o=this.slides[n],a=o.elements.map(e=>e.id===t?Object(S["omit"])(e,c):e);this.slides[n].elements=a}}}),M=Object(a["a"])("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),D=M(10),z=Object(o["b"])("main",{state:()=>({activeElementIdList:[],handleElementId:"",activeGroupElementId:"",hiddenElementIdList:[],canvasPercentage:90,canvasScale:1,canvasDragged:!1,thumbnailsFocus:!1,editorAreaFocus:!1,disableHotkeys:!1,gridLineSize:0,showRuler:!1,creatingElement:null,availableFonts:r,toolbarState:c.SLIDE_DESIGN,clipingImageElementId:"",richTextAttrs:E,selectedTableCells:[],isScaling:!1,selectedSlidesIndex:[],dialogForExport:"",databaseId:D,textFormatPainter:null,showSelectPanel:!1}),getters:{activeElementList(e){const t=T(),l=t.currentSlide;return l&&l.elements?l.elements.filter(t=>e.activeElementIdList.includes(t.id)):[]},handleElement(e){const t=T(),l=t.currentSlide;return l&&l.elements&&l.elements.find(t=>e.handleElementId===t.id)||null}},actions:{setActiveElementIdList(e){1===e.length?this.handleElementId=e[0]:this.handleElementId="",this.activeElementIdList=e},setHandleElementId(e){this.handleElementId=e},setActiveGroupElementId(e){this.activeGroupElementId=e},setHiddenElementIdList(e){this.hiddenElementIdList=e},setCanvasPercentage(e){this.canvasPercentage=e},setCanvasScale(e){this.canvasScale=e},setCanvasDragged(e){this.canvasDragged=e},setThumbnailsFocus(e){this.thumbnailsFocus=e},setEditorareaFocus(e){this.editorAreaFocus=e},setDisableHotkeysState(e){this.disableHotkeys=e},setGridLineSize(e){this.gridLineSize=e},setRulerState(e){this.showRuler=e},setCreatingElement(e){this.creatingElement=e},setAvailableFonts(){this.availableFonts=r.filter(e=>w(e.value))},setToolbarState(e){this.toolbarState=e},setClipingImageElementId(e){this.clipingImageElementId=e},setRichtextAttrs(e){this.richTextAttrs=e},setSelectedTableCells(e){this.selectedTableCells=e},setScalingState(e){this.isScaling=e},updateSelectedSlidesIndex(e){this.selectedSlidesIndex=e},setDialogForExport(e){this.dialogForExport=e},setTextFormatPainter(e){this.textFormatPainter=e},setSelectPanelState(e){this.showSelectPanel=e}}});var A=l("fc11"),F=l("4dec");const $="PPTIST_DISCARDED_DB",R="PPTist",P=async()=>{const e=(new Date).getTime(),t=localStorage.getItem($),l=t?JSON.parse(t):[],c=await F["a"].getDatabaseNames(),n=c.filter(t=>{if(-1===t.indexOf(R))return!1;const[c,n,o]=t.split("_");return c!==R||!n||!o||(!!l.includes(n)||e-+o>=432e5)});for(const o of n)F["a"].delete(o);localStorage.removeItem($)};class H extends F["a"]{constructor(){super(`${R}_${D}_${(new Date).getTime()}`),Object(A["a"])(this,"snapshots",void 0),Object(A["a"])(this,"writingBoardImgs",void 0),this.version(1).stores({snapshots:"++id",writingBoardImgs:"++id"}),this.snapshots=this.table("snapshots"),this.writingBoardImgs=this.table("writingBoardImgs")}}const q=new H,U=Object(o["b"])("snapshot",{state:()=>({snapshotCursor:-1,snapshotLength:0}),getters:{canUndo(e){return e.snapshotCursor>0},canRedo(e){return e.snapshotCursor<e.snapshotLength-1}},actions:{setSnapshotCursor(e){this.snapshotCursor=e},setSnapshotLength(e){this.snapshotLength=e},async initSnapshotDatabase(){const e=T(),t={index:e.slideIndex,slides:e.slides};await q.snapshots.add(t),this.setSnapshotCursor(0),this.setSnapshotLength(1)},async addSnapshot(){const e=T(),t=await q.snapshots.orderBy("id").keys();let l=[];this.snapshotCursor>=0&&this.snapshotCursor<t.length-1&&(l=t.slice(this.snapshotCursor+1));const c={index:e.slideIndex,slides:e.slides};await q.snapshots.add(c);let n=t.length-l.length+1;const o=20;n>o&&(l.push(t[0]),n--),n>=2&&q.snapshots.update(t[n-2],{index:e.slideIndex}),await q.snapshots.bulkDelete(l),this.setSnapshotCursor(n-1),this.setSnapshotLength(n)},async unDo(){if(this.snapshotCursor<=0)return;const e=T(),t=z(),l=this.snapshotCursor-1,c=await q.snapshots.orderBy("id").toArray(),n=c[l],{index:o,slides:a}=n,r=o>a.length-1?a.length-1:o;e.setSlides(a),e.updateSlideIndex(r),this.setSnapshotCursor(l),t.setActiveElementIdList([])},async reDo(){if(this.snapshotCursor>=this.snapshotLength-1)return;const e=T(),t=z(),l=this.snapshotCursor+1,c=await q.snapshots.orderBy("id").toArray(),n=c[l],{index:o,slides:a}=n,r=o>a.length-1?a.length-1:o;e.setSlides(a),e.updateSlideIndex(r),this.setSnapshotCursor(l),t.setActiveElementIdList([])}}}),G=Object(o["b"])("keyboard",{state:()=>({ctrlKeyState:!1,shiftKeyState:!1,spaceKeyState:!1}),getters:{ctrlOrShiftKeyActive(e){return e.ctrlKeyState||e.shiftKeyState}},actions:{setCtrlKeyState(e){this.ctrlKeyState=e},setShiftKeyState(e){this.shiftKeyState=e},setSpaceKeyState(e){this.spaceKeyState=e}}}),X=Object(o["b"])("screen",{state:()=>({screening:!1}),actions:{setScreening(e){this.screening=e}}}),Y=(e,t)=>Object(S["padStart"])(""+e,t,"0"),Z=()=>!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|Mobile|BlackBerry|Symbian|Windows Phone)/i);l("cd17");var W,J,K,Q,ee,te,le=l("ed3b");(function(e){e["UP"]="up",e["DOWN"]="down",e["TOP"]="top",e["BOTTOM"]="bottom"})(W||(W={})),function(e){e["TOP"]="top",e["BOTTOM"]="bottom",e["LEFT"]="left",e["RIGHT"]="right",e["VERTICAL"]="vertical",e["HORIZONTAL"]="horizontal",e["CENTER"]="center"}(J||(J={})),function(e){e["T"]="top",e["B"]="bottom",e["L"]="left",e["R"]="right"}(K||(K={})),function(e){e["LEFT_TOP"]="left-top",e["TOP"]="top",e["RIGHT_TOP"]="right-top",e["LEFT"]="left",e["RIGHT"]="right",e["LEFT_BOTTOM"]="left-bottom",e["BOTTOM"]="bottom",e["RIGHT_BOTTOM"]="right-bottom"}(Q||(Q={})),function(e){e["START"]="start",e["END"]="end",e["C"]="ctrl",e["C1"]="ctrl1",e["C2"]="ctrl2"}(ee||(ee={})),function(e){e["C"]="C",e["X"]="X",e["Z"]="Z",e["Y"]="Y",e["A"]="A",e["G"]="G",e["L"]="L",e["F"]="F",e["D"]="D",e["B"]="B",e["P"]="P",e["MINUS"]="-",e["EQUAL"]="=",e["DIGIT_0"]="0",e["DELETE"]="DELETE",e["UP"]="ARROWUP",e["DOWN"]="ARROWDOWN",e["LEFT"]="ARROWLEFT",e["RIGHT"]="ARROWRIGHT",e["ENTER"]="ENTER",e["SPACE"]=" ",e["TAB"]="TAB",e["BACKSPACE"]="BACKSPACE",e["ESC"]="ESCAPE",e["PAGEUP"]="PAGEUP",e["PAGEDOWN"]="PAGEDOWN",e["F5"]="F5"}(te||(te={}));const ce=[{type:"通用",children:[{label:"剪切",value:"Ctrl + X"},{label:"复制",value:"Ctrl + C"},{label:"粘贴",value:"Ctrl + V"},{label:"快速复制粘贴",value:"Ctrl + D"},{label:"全选",value:"Ctrl + A"},{label:"撤销",value:"Ctrl + Z"},{label:"恢复",value:"Ctrl + Y"},{label:"删除",value:"Delete / Backspace"},{label:"多选",value:"按住 Ctrl 或 Shift"},{label:"打印",value:"Ctrl + P"},{label:"关闭弹窗",value:"ESC"}]},{type:"幻灯片放映",children:[{label:"从头开始放映幻灯片",value:"F5"},{label:"从当前开始放映幻灯片",value:"Shift + F5"},{label:"切换上一页",value:"↑ / ← / PgUp"},{label:"切换下一页",value:"↓ / → / PgDown"},{label:"切换下一页",value:"Enter / Space"},{label:"退出放映",value:"ESC"}]},{type:"幻灯片编辑",children:[{label:"新建幻灯片",value:"Enter"},{label:"移动画布",value:"Space + 鼠标拖拽"},{label:"缩放画布",value:"Ctrl + 鼠标滚轮"},{label:"放大画布",value:"Ctrl + ="},{label:"缩小画布",value:"Ctrl + -"},{label:"使画布适应当前屏幕",value:"Ctrl + 0"},{label:"上一页(未选中元素)",value:"↑ / ←"},{label:"下一页(未选中元素)",value:"↓ / →"},{label:"上一页",value:"鼠标上滚 / PgUp"},{label:"下一页",value:"鼠标下滚 / PgDown"}]},{type:"元素操作",children:[{label:"移动",value:"↑ / ← / ↓ / →"},{label:"锁定",value:"Ctrl + L"},{label:"组合",value:"Ctrl + G"},{label:"取消组合",value:"Ctrl + Shift + G"},{label:"置顶层",value:"Alt + F"},{label:"置底层",value:"Alt + B"},{label:"锁定宽高比例",value:"按住 Ctrl 或 Shift"},{label:"创建水平 / 垂直线条",value:"按住 Ctrl 或 Shift"},{label:"切换焦点元素",value:"Tab"},{label:"确认图片裁剪",value:"Enter"}]},{type:"表格编辑",children:[{label:"聚焦到下一个单元格",value:"Tab"},{label:"在上方插入一行",value:"Ctrl + ↑"},{label:"在下方插入一行",value:"Ctrl + ↓"},{label:"在左侧插入一列",value:"Ctrl + ←"},{label:"在右侧插入一列",value:"Ctrl + →"}]},{type:"图表数据编辑",children:[{label:"聚焦到下一行",value:"Enter"}]},{type:"文本编辑",children:[{label:"加粗",value:"Ctrl + B"},{label:"斜体",value:"Ctrl + I"},{label:"下划线",value:"Ctrl + U"},{label:"删除线",value:"Ctrl + D"}]}];l("3b18");var ne=l("f64c"),oe=l("b311"),ae=l.n(oe),re=l("3452"),ie=l.n(re);const se="pptist",de=e=>ie.a.AES.encrypt(e,se).toString(),ue=e=>{const t=ie.a.AES.decrypt(e,se);return t.toString(ie.a.enc.Utf8)},be=e=>new Promise((t,l)=>{const c=document.createElement("button"),n=new ae.a(c,{text:()=>e,action:()=>"copy",container:document.body});n.on("success",e=>{n.destroy(),t(e)}),n.on("error",e=>{n.destroy(),l(e)}),document.body.appendChild(c),c.click(),document.body.removeChild(c)}),Oe=()=>new Promise((e,t)=>{var l;null!==(l=navigator.clipboard)&&void 0!==l&&l.readText?navigator.clipboard.readText().then(l=>(l||t("剪贴板为空或者不包含文本"),e(l))):t("浏览器不支持或禁止访问剪贴板,请使用快捷键 Ctrl + V")}),me=e=>{let t;try{t=JSON.parse(ue(e))}catch{t=e}return t},pe=e=>{const t=e.split("\r\n");""===t[t.length-1]&&t.pop();let l=-1;const c=[];for(const n in t){if(c[n]=t[n].split("\t"),1===c[n].length)return null;if(-1===l)l=c[n].length;else if(l!==c[n].length)return null}return c},fe=e=>{const{left:t,top:l,width:c,height:n,rotate:o=0}=e,a=Math.sqrt(Math.pow(c,2)+Math.pow(n,2))/2,r=180*Math.atan(n/c)/Math.PI,i=(180-o-r)*Math.PI/180,s=(r-o)*Math.PI/180,d=t+c/2,u=l+n/2,b=[d+a*Math.cos(i),d+a*Math.cos(s),d-a*Math.cos(i),d-a*Math.cos(s)],O=[u-a*Math.sin(i),u-a*Math.sin(s),u+a*Math.sin(i),u+a*Math.sin(s)];return{xRange:[Math.min(...b),Math.max(...b)],yRange:[Math.min(...O),Math.max(...O)]}},je=e=>{const{xRange:t,yRange:l}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:0}),{xRange:c,yRange:n}=fe({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});return{offsetX:c[0]-t[0],offsetY:n[0]-l[0]}},ve=e=>{let t,l,c,n;if("line"===e.type)t=e.left,l=e.left+Math.max(e.start[0],e.end[0]),c=e.top,n=e.top+Math.max(e.start[1],e.end[1]);else if("rotate"in e&&e.rotate){const{left:o,top:a,width:r,height:i,rotate:s}=e,{xRange:d,yRange:u}=fe({left:o,top:a,width:r,height:i,rotate:s});t=d[0],l=d[1],c=u[0],n=u[1]}else t=e.left,l=e.left+e.width,c=e.top,n=e.top+e.height;return{minX:t,maxX:l,minY:c,maxY:n}},he=e=>{const t=[],l=[],c=[],n=[];e.forEach(e=>{const{minX:o,maxX:a,minY:r,maxY:i}=ve(e);t.push(o),l.push(r),c.push(a),n.push(i)});const o=Math.min(...t),a=Math.max(...c),r=Math.min(...l),i=Math.max(...n);return{minX:o,maxX:a,minY:r,maxY:i}},ye=e=>{const t=[];return e.forEach(e=>{const l=t.findIndex(t=>t.value===e.value);if(-1===l)t.push(e);else{const c=t[l],n=Math.min(c.range[0],e.range[0]),o=Math.max(c.range[1],e.range[1]),a=[n,o],r={value:e.value,range:a};t[l]=r}}),t},ge=e=>{const t={};for(const l of e)t[l.id]=Object(a["b"])(10);return t},xe=e=>{const t={},l={};for(const c of e){const e=c.groupId;e&&!t[e]&&(t[e]=Object(a["b"])(10)),l[c.id]=Object(a["b"])(10)}return{groupIdMap:t,elIdMap:l}},ke=e=>{const t=I()(e);return[t.setAlpha(.3).toRgbString(),t.setAlpha(.1).toRgbString()]},Ce=e=>{const t=e.start.join(","),l=e.end.join(",");if(e.broken){const c=e.broken.join(",");return`M${t} L${c} L${l}`}if(e.curve){const c=e.curve.join(",");return`M${t} Q${c} ${l}`}if(e.cubic){const[c,n]=e.cubic,o=c.join(","),a=n.join(",");return`M${t} C${o} ${a} ${l}`}return`M${t} L${l}`},Ne=e=>{const t=e.replace(/[\n\r]+/g,"<br>"),l=t.split("<br>");let c="";for(const n of l)n&&(c+=`<div>${n}</div>`);return c},Ee=e=>new Promise(t=>{const l=document.createElement("img");l.src=e,l.style.opacity="0",document.body.appendChild(l),l.onload=()=>{const e=l.clientWidth,c=l.clientHeight;l.onload=null,l.onerror=null,document.body.removeChild(l),t({width:e,height:c})},l.onerror=()=>{l.onload=null,l.onerror=null}}),we=e=>new Promise(t=>{const l=new FileReader;l.addEventListener("load",()=>{t(l.result)}),l.readAsDataURL(e)}),Ve=1e3;var Ie,Se;(function(e){e["ROUND_RECT"]="roundRect",e["ROUND_RECT_DIAGONAL"]="roundRectDiagonal",e["ROUND_RECT_SINGLE"]="roundRectSingle",e["ROUND_RECT_SAMESIDE"]="roundRectSameSide",e["CUT_RECT_DIAGONAL"]="cutRectDiagonal",e["CUT_RECT_SINGLE"]="cutRectSingle",e["CUT_RECT_SAMESIDE"]="cutRectSameSide",e["CUT_ROUND_RECT"]="cutRoundRect",e["MESSAGE"]="message",e["ROUND_MESSAGE"]="roundMessage",e["L"]="L",e["RING_RECT"]="ringRect",e["PLUS"]="plus",e["TRIANGLE"]="triangle",e["PARALLELOGRAM_LEFT"]="parallelogramLeft",e["PARALLELOGRAM_RIGHT"]="parallelogramRight",e["TRAPEZOID"]="trapezoid",e["BULLET"]="bullet",e["INDICATOR"]="indicator"})(Ie||(Ie={})),function(e){e["TEXT"]="text",e["IMAGE"]="image",e["SHAPE"]="shape",e["LINE"]="line",e["CHART"]="chart",e["TABLE"]="table",e["LATEX"]="latex",e["VIDEO"]="video",e["AUDIO"]="audio"}(Se||(Se={}));const Le={[Ie.ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M ${c} 0 L ${e-c} 0 Q ${e} 0 ${e} ${c} L ${e} ${t-c} Q ${e} ${t} ${e-c} ${t} L ${c} ${t} Q 0 ${t} 0 ${t-c} L 0 ${c} Q 0 0 ${c} 0 Z`}},[Ie.CUT_RECT_DIAGONAL]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M 0 ${t-c} L 0 0 L ${e-c} 0 L ${e} ${c} L ${e} ${t} L ${c} ${t} Z`}},[Ie.CUT_RECT_SINGLE]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M 0 ${t} L 0 0 L ${e-c} 0 L ${e} ${c} L ${e} ${t} Z`}},[Ie.CUT_RECT_SAMESIDE]:{editable:!0,defaultValue:.2,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M 0 ${c} L ${c} 0 L ${e-c} 0 L ${e} ${c} L ${e} ${t} L 0 ${t} Z`}},[Ie.ROUND_RECT_DIAGONAL]:{editable:!0,defaultValue:.125,range:[0,1],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M ${c} 0 L ${e} 0 L ${e} ${t-c} Q ${e} ${t} ${e-c} ${t} L 0 ${t} L 0 ${c} Q 0 0 ${c} 0 Z`}},[Ie.ROUND_RECT_SINGLE]:{editable:!0,defaultValue:.125,range:[0,1],relative:"right",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M 0 0 L ${e-c} 0 Q ${e} 0 ${e} ${c} L ${e} ${t} L 0 ${t} L 0 0 Z`}},[Ie.ROUND_RECT_SAMESIDE]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M 0 ${c} Q 0 0 ${c} 0 L ${e-c} 0 Q ${e} 0 ${e} ${c} L ${e} ${t} L 0 ${t} Z`}},[Ie.CUT_ROUND_RECT]:{editable:!0,defaultValue:.125,range:[0,.5],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M ${c} 0 L ${e-c} 0 L ${e} ${c} L ${e} ${t} L 0 ${t} L 0 ${c} Q 0 0 ${c} 0 Z`}},[Ie.MESSAGE]:{formula:(e,t)=>{const l=.2*e,c=.2*t;return`M 0 0 L ${e} 0 L ${e} ${t-c} L ${e/2} ${t-c} L ${e/2-l} ${t} L ${e/2-l} ${t-c} L 0 ${t-c} Z`}},[Ie.ROUND_MESSAGE]:{formula:(e,t)=>{const l=.125*Math.min(e,t),c=.2*e,n=.2*t;return`M 0 ${l} Q 0 0 ${l} 0 L ${e-l} 0 Q ${e} 0 ${e} ${l} L ${e} ${t-l-n} Q ${e} ${t-n} ${e-l} ${t-n} L ${e/2} ${t-n} L ${e/2-c} ${t} L ${e/2-c} ${t-n} L ${l} ${t-n} Q 0 ${t-n} 0 ${t-l-n} L 0 ${l} Z`}},[Ie.L]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M 0 0 L 0 ${t} L ${e} ${t} L ${e} ${t-c} L ${c} ${t-c} L ${c} 0 Z`}},[Ie.RING_RECT]:{editable:!0,defaultValue:.25,range:[.1,.45],relative:"left",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M 0 0 ${e} 0 ${e} ${t} L 0 ${t} L 0 0 Z M ${c} ${c} L ${c} ${t-c} L ${e-c} ${t-c} L ${e-c} ${c} Z`}},[Ie.PLUS]:{editable:!0,defaultValue:.25,range:[.1,.9],relative:"center",getBaseSize:(e,t)=>Math.min(e,t),formula:(e,t,l)=>{const c=Math.min(e,t)*l;return`M ${e/2-c/2} 0 L ${e/2-c/2} ${t/2-c/2} L 0 ${t/2-c/2} L 0 ${t/2+c/2} L ${e/2-c/2} ${t/2+c/2} L ${e/2-c/2} ${t} L ${e/2+c/2} ${t} L ${e/2+c/2} ${t/2+c/2} L ${e} ${t/2+c/2} L ${e} ${t/2-c/2} L ${e/2+c/2} ${t/2-c/2} L ${e/2+c/2} 0 Z`}},[Ie.TRIANGLE]:{editable:!0,defaultValue:.5,range:[0,1],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const c=e*l;return`M ${c} 0 L 0 ${t} L ${e} ${t} Z`}},[Ie.PARALLELOGRAM_LEFT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const c=e*l;return`M ${c} 0 L ${e} 0 L ${e-c} ${t} L 0 ${t} Z`}},[Ie.PARALLELOGRAM_RIGHT]:{editable:!0,defaultValue:.25,range:[0,.9],relative:"right",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const c=e*l;return`M 0 0 L ${e-c} 0 L ${e} ${t} L ${c} ${t} Z`}},[Ie.TRAPEZOID]:{editable:!0,defaultValue:.25,range:[0,.5],relative:"left",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const c=e*l;return`M ${c} 0 L ${e-c} 0 L ${e} ${t} L 0 ${t} Z`}},[Ie.BULLET]:{editable:!0,defaultValue:.2,range:[0,1],relative:"top",getBaseSize:(e,t)=>t,formula:(e,t,l)=>{const c=t*l;return`M ${e/2} 0 L 0 ${c} L 0 ${t} L ${e} ${t} L ${e} ${c} Z`}},[Ie.INDICATOR]:{editable:!0,defaultValue:.2,range:[0,.9],relative:"right",getBaseSize:(e,t)=>e,formula:(e,t,l)=>{const c=e*l;return`M ${e} ${t/2} L ${e-c} 0 L 0 0 L ${c} ${t/2} L 0 ${t} L ${e-c} ${t} Z`}}},Be=[{type:"矩形",children:[{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 Q 200 0 200 50 L 200 150 Q 200 200 150 200 L 50 200 Q 0 200 0 150 L 0 50 Q 0 0 50 0 Z",pathFormula:Ie.ROUND_RECT},{viewBox:[200,200],path:"M 0 200 L 0 0 L 150 0 L 200 50 L 200 200 Z",pathFormula:Ie.CUT_RECT_SINGLE},{viewBox:[200,200],path:"M 0 50 L 50 0 L 150 0 L 200 50 L 200 200 L 0 200 Z",pathFormula:Ie.CUT_RECT_SAMESIDE},{viewBox:[200,200],path:"M 0 150 L 0 0 L 150 0 L 200 50 L 200 200 L 50 200 Z",pathFormula:Ie.CUT_RECT_DIAGONAL},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 50 L 200 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:Ie.CUT_ROUND_RECT},{viewBox:[200,200],path:"M 0 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 L 0 0 Z",pathFormula:Ie.ROUND_RECT_SINGLE},{viewBox:[200,200],path:"M 0 50 Q 0 0 50 0 L 150 0 Q 200 0 200 50 L 200 200 L 0 200 Z",pathFormula:Ie.ROUND_RECT_SAMESIDE},{viewBox:[200,200],path:"M 50 0 L 200 0 L 200 150 Q 200 200 150 200 L 0 200 L 0 50 Q 0 0 50 0 Z",pathFormula:Ie.ROUND_RECT_DIAGONAL}]},{type:"常用形状",children:[{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 200 L 200 200 L 100 0 Z",pathFormula:Ie.TRIANGLE},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 Z"},{viewBox:[200,200],path:"M 70 20 L 0 160 Q 0 200 40 200 L 160 200 Q 200 200 200 160 L 130 20 Q 100 -20 70 20 Z"},{viewBox:[200,200],path:"M 50 0 L 200 0 L 150 200 L 0 200 L 50 0 Z",pathFormula:Ie.PARALLELOGRAM_LEFT},{viewBox:[200,200],path:"M 0 0 L 150 0 L 200 200 L 50 200 L 0 0 Z",pathFormula:Ie.PARALLELOGRAM_RIGHT},{viewBox:[200,200],path:"M 50 0 L 150 0 L 200 200 L 0 200 L 50 0 Z",pathFormula:Ie.TRAPEZOID},{viewBox:[200,200],path:"M 100 0 L 0 100 L 100 200 L 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 50 L 0 200 L 200 200 L 200 50 L 100 0 Z",pathFormula:Ie.BULLET},{viewBox:[200,200],path:"M 200 100 L 150 0 L 0 0 L 50 100 L 0 200 L 150 200 L 200 100 Z",pathFormula:Ie.INDICATOR},{viewBox:[200,200],path:"M 0 0 C 80 20 120 20 200 0 C 180 80 180 120 200 200 C 80 180 120 180 0 200 C 20 120 20 80 0 0 Z"},{viewBox:[200,200],path:"M 10 10 C 60 0 140 0 190 10 C 200 60 200 140 190 190 C 140 200 60 200 10 190 C 0 140 0 60 10 10 Z"},{viewBox:[200,200],path:"M 0 200 A 50 100 0 1 1 200 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 20 A 100 100 0 1 0 200 100 L 100 100 L 40 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 100 L 100 0 Z"},{viewBox:[200,200],path:"M 160 20 A 100 100 0 1 0 200 100 L 100 100 L 160 20 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 A 100 100 102 1 0 200 100 L 200 0 L 100 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 Q 200 200 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 90 L 50 200 L 150 200 L 200 90 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 0 140 L 100 200 L 200 140 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M 60 0 L 140 0 L 200 60 L 200 140 L 140 200 L 60 200 L 0 140 L 0 60 L 60 0 Z"},{viewBox:[200,200],path:"M 75 0 L 125 0 L 175 25 L 200 75 L 200 125 L 175 175 L 125 200 L 75 200 L 25 175 L 0 125 L 0 75 L 25 25 L 75 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 L 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 50 0 A 25 50 0 1 0 50 200 L 150 200 A 25 50 0 1 0 150 0 L 50 0 Z"},{viewBox:[200,200],path:"M 150 0 A 50 100 0 1 1 150 200 L 0 200 A 50 100 0 0 0 0 0 L 150 0 Z"},{viewBox:[200,200],path:"M 200 0 L 200 200 L 0 200 L 0 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 200 200 L 0 200 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 100 0 L 0 100 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 50 0 L 150 0 L 150 50 L 200 50 L 200 150 L 150 150 L 150 200 L 50 200 L 50 150 L 0 150 L 0 50 L 50 50 L 50 0 Z"},{viewBox:[200,200],path:"M 0 0 L 0 200 L 200 200 L 200 140 L 60 140 L 60 0 L 0 0 Z",pathFormula:Ie.L},{viewBox:[200,200],path:"M0 0 L200 0 L200 200 L0 200 L0 0 Z M50 50 L50 150 L150 150 L150 50 Z",pathFormula:Ie.RING_RECT},{viewBox:[200,200],path:"M0 100 A100 100 0 1 1 0 101 Z M150 100 A50 50 0 1 0 150 101 Z"},{viewBox:[200,200],path:"M 70 0 L 70 70 L 0 70 L 0 130 L 70 130 L 70 200 L 130 200 L 130 130 L 200 130 L 200 70 L 130 70 L 130 0 L 70 0 Z",pathFormula:Ie.PLUS},{viewBox:[200,200],path:"M 40 0 L 0 40 L 60 100 L 0 160 L 40 200 L 100 140 L 160 200 L 200 160 L 140 100 L 200 40 L 160 0 L 100 60 L 40 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 160 L 100 160 L 60 200 L 60 160 L 0 160 Z",pathFormula:Ie.MESSAGE},{viewBox:[200,200],path:"M 0 40 Q 0 0 40 0 L 160 0 Q 200 0 200 40 L 200 120 Q 200 160 160 160 L 100 160 L 60 200 L 60 160 L 40 160 Q 0 160 0 120 L 0 40 Z",pathFormula:Ie.ROUND_MESSAGE},{viewBox:[200,200],path:"M 180 160 A 100 100 0 1 0 100 200 L 200 200 L 200 160 L 180 160 Z"},{viewBox:[200,200],path:"M 200 0 L 0 0 L 200 200 L 0 200 L 200 0 Z"},{viewBox:[200,200],path:"M 0 20 C 60 60 140 -40 200 20 L 200 180 C 140 140 60 240 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 0 20 C 40 -40 60 60 100 20 C 140 -40 160 60 200 20 L 200 180 C 140 240 160 140 100 180 C 40 240 60 140 0 180 L 0 20 Z"},{viewBox:[200,200],path:"M 100 0 Q 0 50 0 175 Q 100 225 200 175 Q 200 50 100 0 Z"},{viewBox:[200,200],path:"M 0 100 A 50 50 0 1 1 200 100 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 120 80 L 200 100 L 120 120 L 100 200 L 80 120 L 0 100 L 80 80 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 60 60 L 0 100 L 60 140 L 100 200 L 140 140 L 200 100 L 140 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 140 60 L 200 60 L 160 100 L 200 140 L 140 140 L 100 200 L 60 140 L 0 140 L 40 100 L 0 60 L 60 60 L 100 0 Z"},{viewBox:[200,200],path:"M 100 0 L 80 40 L 20 20 L 40 80 L 0 100 L 40 120 L 20 180 L 80 160 L 100 200 L 120 160 L 180 180 L 160 120 L 200 100 L 160 80 L 180 20 L 120 40 L 100 0 Z"},{viewBox:[200,200],path:"M 200 0 C 80 40 80 160 200 200 C -60 200 -60 0 200 0 Z"}]},{type:"箭头",children:[{viewBox:[200,200],path:"M 100 0 L 0 100 L 50 100 L 50 200 L 150 200 L 150 100 L 200 100 L 100 0 Z"},{viewBox:[200,200],path:"M 100 200 L 200 100 L 150 100 L 150 0 L 50 0 L 50 100 L 0 100 L 100 200 Z"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 0 150 L 100 150 L 100 200 L 200 100 Z"},{viewBox:[200,200],path:"M 100 0 L 0 60 L 60 60 L 60 140 L 0 140 L 100 200 L 200 140 L 140 140 L 140 60 L 200 60 L 100 0 Z"},{viewBox:[200,200],path:"M 0 100 L 60 0 L 60 60 L 140 60 L 140 0 L 200 100 L 140 200 L 140 140 L 60 140 L 60 200 L 0 100 Z"},{viewBox:[200,200],path:"M 100 0 L 60 40 L 80 40 L 80 80 L 40 80 L 40 60 L 0 100 L 40 140 L 40 120 L 80 120 L 80 160 L 60 160 L 100 200 L 140 160 L 120 160 L 120 120 L 160 120 L 160 140 L 200 100 L 160 60 L 160 80 L 120 80 L 120 40 L 140 40 L 100 0 Z"},{viewBox:[200,200],path:"M 0 100 L 100 0 L 100 50 L 200 50 L 150 100 L 200 150 L 100 150 L 100 200 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 100 0 L 100 50 L 0 50 L 50 100 L 0 150 L 100 150 L 100 200 L 200 100 Z"},{viewBox:[200,200],path:"M 0 100 L 80 20 L 80 80 L 120 80 L 120 0 L 200 0 L 200 200 L 120 200 L 120 120 L 80 120 L 80 180 L 0 100 Z"},{viewBox:[200,200],path:"M 200 100 L 120 20 L 120 80 L 80 80 L 80 0 L 0 0 L 0 200 L 80 200 L 80 120 L 120 120 L 120 180 L 200 100 Z"},{viewBox:[200,200],path:"M 0 0 L 120 0 L 200 100 L 120 200 L 0 200 L 80 100 L 0 0 Z"},{viewBox:[200,200],path:"M 80 0 L 200 0 L 120 100 L 200 200 L 80 200 L 0 100 L 80 0 Z"},{viewBox:[200,200],path:"M 0 0 L 140 0 L 200 100 L 140 200 L 0 200 L 0 100 L 0 0 Z"},{viewBox:[200,200],path:"M 60 0 L 200 0 L 200 100 L 200 200 L 60 200 L 0 100 L 60 0 Z"},{viewBox:[200,200],path:"M 0 0 L 200 100 L 0 200 L 60 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 0 100 L 200 200 L 140 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 0 L 80 0 L 200 100 L 80 200 L 0 200 L 120 100 L 0 0 Z"},{viewBox:[200,200],path:"M 200 0 L 120 0 L 0 100 L 120 200 L 200 200 L 80 100 L 200 0 Z"},{viewBox:[200,200],path:"M 0 200 L 180 200 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 160 L 0 160 L 0 200 Z"},{viewBox:[200,200],path:"M 0 200 L 0 20 L 160 20 L 160 0 L 200 40 L 160 80 L 160 60 L 40 60 L 40 200 L 0 200 Z"},{viewBox:[200,200],path:"M 40 180 L 180 180 L 180 40 L 200 40 L 160 0 L 120 40 L 140 40 L 140 140 L 40 140 L 40 120 L 0 160 L 40 200 L 40 180 Z"},{viewBox:[1024,1024],path:"M398.208 302.912V64L0 482.112l398.208 418.176V655.36c284.48 0 483.584 95.552 625.792 304.64-56.896-298.688-227.584-597.312-625.792-657.088z",special:!0},{viewBox:[1024,1024],path:"M625.792 302.912V64L1024 482.112l-398.208 418.176V655.36C341.312 655.36 142.208 750.912 0 960c56.896-298.688 227.584-597.312 625.792-657.088z",special:!0}]},{type:"其他形状",children:[{viewBox:[1024,1024],path:"M995.336 243.4016c-15.7584-36.5736-38.3376-69.26639999-66.91440001-97.37280001-28.5768-27.98879999-61.73999999-49.8624-98.78399999-65.26799998-38.22-15.876-78.6744-23.8728-120.4224-23.87280001-57.97680001 0-114.5424 15.876-163.69919999 45.864-11.76 7.17360001-22.932 15.05279999-33.51600001 23.63760001-10.584-8.5848-21.75600001-16.46400001-33.51600001-23.63760001-49.1568-29.98799999-105.7224-45.86399999-163.69919999-45.864-41.74799999 0-82.2024 7.9968-120.4224 23.87280001-36.9264 15.28799999-70.2072 37.27919999-98.78399999 65.26799998-28.6944 28.10640001-51.156 60.79919999-66.91440001 97.37280001-16.34639999 37.9848-24.696 78.3216-24.696 119.83439999 0 39.1608 7.9968 79.96800001 23.8728 121.48080001 13.28880001 34.692 32.34000001 70.67760001 56.6832 107.016 38.57279999 57.5064 91.61040001 117.4824 157.4664 178.28160001 109.1328 100.78319999 217.2072 170.4024 221.79359999 173.22479998l27.87120001 17.8752c12.348 7.8792 28.224 7.8792 40.572 0l27.87119999-17.8752c4.58639999-2.94 112.54319999-72.44159999 221.79360001-173.22479998 65.85599999-60.79919999 118.89359999-120.7752 157.4664-178.28160001 24.3432-36.33839999 43.512-72.324 56.68319999-107.016 15.876-41.5128 23.8728-82.32 23.87280001-121.48080001 0.1176-41.5128-8.232-81.8496-24.5784-119.83439999z",special:!0},{viewBox:[1024,1024],path:"M985.20746667 343.50079998l-303.32586667-44.08319999L546.28693333 24.5248c-3.70346666-7.5264-9.79626667-13.6192-17.32266665-17.32266668-18.87573334-9.3184-41.81333333-1.55306667-51.25120001 17.32266668L342.1184 299.41759999l-303.32586667 44.08319999c-8.36266667 1.19466667-16.00853333 5.13706667-21.8624 11.11040001-14.69440001 15.17226667-14.45546667 39.30453334 0.71679999 54.1184l219.46026668 213.9648-51.84853333 302.1312c-1.43359999 8.24320001-0.11946667 16.8448 3.82293333 24.25173333 9.79626667 18.6368 32.9728 25.92426667 51.6096 16.00853334L512 822.44266665l271.3088 142.64320001c7.40693333 3.9424 16.00853333 5.25653333 24.25173333 3.82293333 20.78719999-3.584 34.7648-23.296 31.1808-44.0832l-51.84853333-302.1312 219.46026668-213.9648c5.97333334-5.85386666 9.91573333-13.49973334 11.11039999-21.8624 3.2256-20.90666667-11.34933333-40.26026667-32.256-43.36640001z",special:!0},{viewBox:[1024,1024],path:"M852.65066667 405.84533333C800.54044445 268.40177778 667.76177778 170.66666667 512.22755555 170.66666667S223.91466667 268.288 171.80444445 405.73155555C74.29688889 431.33155555 2.27555555 520.07822222 2.27555555 625.77777778c0 125.72444445 101.83111111 227.55555555 227.44177778 227.55555555h564.56533334C919.89333333 853.33333333 1021.72444445 751.50222222 1021.72444445 625.77777778c0-105.472-71.79377778-194.21866667-169.07377778-219.93244445z",special:!0},{viewBox:[1024,1024],path:"M926.25224691 323.7371485H654.6457886L898.88200917 15.14388241c5.05486373-6.53433603 0.49315743-16.02761669-7.76722963-16.02761668H418.30008701c-3.45210206 0-6.78091476 1.84934039-8.50696579 4.93157436L90.35039154 555.76772251c-3.82197013 6.53433603 0.86302552 14.7947231 8.50696578 14.79472311h215.01664245l-110.22068713 440.88274851c-2.34249783 9.61657002 9.24670194 16.39748478 16.39748477 9.49328065L933.03316167 340.62779071c6.41104668-6.0411786 2.09591911-16.8906422-6.78091476-16.89064221z",special:!0},{viewBox:[1024,1024],path:"M878.47822222 463.30311111c-22.18666667-49.83466667-53.93066667-93.98044445-94.32177777-131.072l-33.10933334-30.37866666c-4.89244445-4.32355555-12.62933333-2.38933333-14.79111111 3.75466666l-14.79111111 42.43911111c-9.216 26.624-26.16888889 53.81688889-50.176 80.55466667-1.59288889 1.70666667-3.41333333 2.16177778-4.66488889 2.27555556-1.25155555 0.11377778-3.18577778-0.11377778-4.89244445-1.70666667-1.59288889-1.36533333-2.38933333-3.41333333-2.27555555-5.46133333 4.20977778-68.49422222-16.27022222-145.74933333-61.09866667-229.83111112C561.26577778 124.01777778 509.72444445 69.51822222 445.32622222 31.51644445l-46.99022222-27.648c-6.144-3.64088889-13.99466667 1.13777778-13.65333333 8.30577777l2.50311111 54.61333333c1.70666667 37.31911111-2.61688889 70.31466667-12.85688889 97.73511112-12.51555555 33.56444445-30.49244445 64.73955555-53.47555556 92.72888888-16.15644445 19.56977778-34.24711111 37.20533333-54.04444444 52.45155556-47.90044445 36.75022222-87.38133333 84.65066667-114.11911111 138.24C125.72444445 502.10133333 111.50222222 562.74488889 111.50222222 623.50222222c0 53.70311111 10.58133333 105.69955555 31.51644445 154.73777778 20.25244445 47.21777778 49.152 89.77066667 85.90222222 126.17955555 36.864 36.40888889 79.64444445 65.08088889 127.31733333 84.992C405.61777778 1010.11911111 457.95555555 1020.58666667 512 1020.58666667s106.38222222-10.46755555 155.76177778-31.06133334c47.67288889-19.91111111 90.56711111-48.46933333 127.31733333-84.992 36.864-36.40888889 65.76355555-78.96177778 85.90222222-126.17955555 20.93511111-49.03822222 31.51644445-101.03466667 31.51644445-154.73777778 0-55.52355555-11.37777778-109.45422222-34.01955556-160.31288889z",special:!0},{viewBox:[1024,1024],path:"M968.20337778 20.11591112H705.44042667c-22.17301333 0-41.92483556 15.16430222-47.14951111 37.33731555C642.36202666 124.73685332 582.08711111 173.03324444 512 173.03324444s-130.36202666-48.29639112-146.29091556-115.58001777c-5.22467555-22.17301333-24.84906667-37.33731556-47.14951111-37.33731555H55.79662222c-30.96576 0-56.06968889 25.10392889-56.06968888 56.06968888v321.12639999c0 30.96576 25.10392889 56.06968889 56.06968888 56.06968889h95.57333334v494.43271112c0 30.96576 25.10392889 56.06968889 56.06968889 56.06968888h609.1207111c30.96576 0 56.06968889-25.10392889 56.06968889-56.06968888V453.38168888h95.57333334c30.96576 0 56.06968889-25.10392889 56.06968888-56.06968889V76.1856c0-30.96576-25.10392889-56.06968889-56.06968888-56.06968888z",special:!0},{viewBox:[1024,1024],path:"M980.94648889 239.80714666H523.46880001L373.99210666 96.82944c-1.91146667-1.78403556-4.46008889-2.80348444-7.00871111-2.80348445H43.05351111c-22.55530667 0-40.77795555 18.22264888-40.77795555 40.77795557v754.39217776c0 22.55530667 18.22264888 40.77795555 40.77795555 40.77795557h937.89297778c22.55530667 0 40.77795555-18.22264888 40.77795555-40.77795557V280.58510222c0-22.55530667-18.22264888-40.77795555-40.77795555-40.77795556z",special:!0},{viewBox:[1024,1024],path:"M972.60904597 164.57058577L841.30587843 33.39070759c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480282-29.3428675-26.75379095 0-51.90482023 10.47959553-70.76809219 29.3428675L558.60337778 174.68031322c-18.86327195 18.86327195-29.34286748 44.1375906-29.34286749 70.64480283 0 26.75379095 10.47959553 51.90482023 29.34286749 70.76809218l103.31648301 103.31648302c-24.28800376 53.50758189-57.69942011 101.59043198-99.24793416 143.13894603-41.42522469 41.67180341-89.63136414 75.08321976-143.13894603 99.61780223L316.21649759 558.84995649c-18.86327195-18.86327195-44.1375906-29.34286748-70.64480283-29.34286747-26.75379095 0-51.90482023 10.47959553-70.76809217 29.34286747L33.39070759 700.01627278c-18.86327195 18.86327195-29.34286748 44.1375906-29.3428675 70.76809217 0 26.75379095 10.47959553 51.90482023 29.3428675 70.76809219l131.05658883 131.05658883c30.08260365 30.205893 71.63111769 47.34311394 114.28923598 47.34311394 9.00012323 0 17.63037836-0.73973616 26.13734414-2.21920846 166.19405621-27.37023774 331.03192945-115.76870829 464.06114804-248.67463751C901.84095379 636.27567408 990.11613498 471.56109018 1017.85624079 304.87387654c8.38367642-50.91850535-8.50696579-103.31648302-45.24719482-140.30329077z",special:!0},{viewBox:[1024,1024],path:"M910.60451556 640.96028445c-20.38897778-65.49959112-43.83630221-120.54983112-79.89930667-210.64362666C836.31217778 193.67708444 737.93535999 2.27555556 511.36284444 2.27555556 282.24170667 2.27555556 186.03121778 197.50001778 192.14791111 430.31665779c-36.19043555 90.22122667-59.51032888 144.88917333-79.89930667 210.64362666-43.32657778 139.53706668-29.30915556 197.26336001-18.60494222 198.53767111 22.9376 2.80348444 89.32920888-105.00323556 89.32920889-105.00323556 0 62.44124445 32.11264001 143.86972444 101.69002667 202.61546667-33.64181333 10.32192-109.20846222 38.10190221-91.24067556 68.55793777 14.52714667 24.59420444 250.01984 15.67402668 317.94062222 8.02816 67.92078222 7.64586667 303.41347556 16.56604444 317.94062223-8.02816 17.96778667-30.32860444-57.72629333-58.23601779-91.24067555-68.55793777 69.57738667-58.87317334 101.69002667-140.30165333 101.69002667-202.61546667 0 0 66.39160889 107.80672 89.32920888 105.00323556 10.83164445-1.40174222 24.84906667-59.12803556-18.47751111-198.53767111z",special:!0},{viewBox:[1024,1024],path:"M1016.86992592 199.24764445c-37.13706667 16.01991111-77.55093333 27.54939259-119.17842962 32.03982222 42.96248889-25.60758518 75.60912592-66.02145185 91.02222222-114.08118519-39.68568889 23.66577778-84.58998518 41.02068148-131.31472593 50.00154074C819.53374815 126.79395555 765.76995555 101.79318518 706.18074075 101.79318518c-114.688 0-206.92385185 92.96402963-206.92385186 207.04521482 0 16.01991111 1.94180741 32.03982222 5.09724444 47.45291852-171.72859259-8.98085925-324.88865185-91.02222222-426.71217778-216.63288889-17.96171852 30.82619259-28.15620741 66.02145185-28.1562074 104.49351112 0 71.84687408 36.53025185 135.19834075 92.23585185 172.45677036-33.98162963-1.33499259-66.02145185-10.92266667-93.57084445-26.33576296v2.54862222c0 100.6098963 71.1186963 183.98625185 165.90317037 203.1616-17.3549037 4.49042963-35.92343703 7.03905185-54.49197037 7.03905185-13.47128889 0-26.2144-1.33499259-39.07887407-3.15543704C146.69748148 681.90814815 223.03478518 741.49736297 313.93564445 743.43917037c-71.1186963 55.7056-160.19911111 88.4736-256.9253926 88.4736-17.3549037 0-33.37481482-0.60681482-50.00154074-2.54862222C98.75911111 888.22518518 207.62168889 922.20681482 324.85831111 922.20681482 705.45256297 922.20681482 913.71140741 606.90583703 913.71140741 333.23235555c0-8.98085925 0-17.96171852-0.60681482-26.94257777 40.2925037-29.4912 75.60912592-66.02145185 103.76533333-107.04213333z",special:!0},{viewBox:[1024,1024],path:"M917.96720197 1.08889505H106.03279803C53.56084718 1.08889505 9.37393998 45.27580225 9.37393998 97.74775309v5.52336372c0 19.33177108 8.28504494 41.42522469 22.0934536 55.23363205l331.40179753 392.15879462v325.87843379c0 16.57008987 8.28504494 30.37849854 22.09345359 35.90186098l209.88780469 104.94390299 2.76168121 2.76168121c27.61681602 11.04672615 55.23363335-8.28504494 55.23363335-38.66354218V550.66354348l331.40179753-392.15879462c35.90186097-41.42522469 30.37849854-102.18222047-11.04672616-135.32240022-11.04672615-13.80840865-33.14017975-22.0934536-55.23363335-22.09345359z",special:!0},{viewBox:[1024,1024],path:"M491.70164031 97.48884502a25.89076502 25.89076502 0 0 1 40.59671938 0L745.66415762 367.01171317a25.89076502 25.89076502 0 0 0 30.49932208 7.72839349l208.00640948-89.14190458a25.89076502 25.89076502 0 0 1 35.56096592 29.06238339l-115.18801541 554.96855704A103.56306132 103.56306132 0 0 1 803.14165689 952.14301275H220.85834311a103.56306132 103.56306132 0 0 1-101.4011828-82.51387024l-115.18801541-554.96855704a25.89076502 25.89076502 0 0 1 35.54802012-29.06238339l208.01935528 89.14190458a25.89076502 25.89076502 0 0 0 30.49932208-7.72839349l213.36579793-269.52286815z",special:!0},{viewBox:[1024,1024],path:"M643.02466884 387.7801525c19.85376751-88.69205333 33.718272-152.84087467 41.61900049-192.57389433C704.52292267 95.17283515 652.90057916 2.27555515 550.58614084 2.27555515c-92.26012484 0-138.59407685 45.84971417-165.91530666 137.49816969l-0.70087152 2.67605334c-16.40038399 74.13942085-41.47882668 131.61085116-74.6746315 172.73287031a189.06953915 189.06953915 0 0 1-143.04142182 70.44391902l-26.17434983 0.5606965C77.66380049 387.52529067 27.76177817 438.90551468 27.76177817 501.84374084V881.55022182c0 77.4144 62.25009818 140.17422182 139.05282766 140.17422303h492.82707951c101.23127467 0 191.59267516-63.995904 225.93535999-159.98976l102.37815468-286.22301868c26.04691951-72.82688-11.39234134-153.15945284-83.63303784-179.42300483a138.04612267 138.04612267 0 0 0-47.17499733-8.30850884H643.02466884z",special:!0},{viewBox:[1024,1024],path:"M512 512c140.82958222 0 254.86222222-114.03264 254.86222222-254.86222222S652.82958222 2.27555555 512 2.27555555a254.78940445 254.78940445 0 0 0-254.86222222 254.86222223C257.13777778 397.96736 371.17041778 512 512 512z m0 72.81777778c-170.10232889 0-509.72444445 97.57582222-509.72444445 291.27111111v145.63555556h1019.4488889v-145.63555556c0-193.69528889-339.62211555-291.27111111-509.72444445-291.27111111z",special:!0},{viewBox:[1024,1024],path:"M1019.81297778 564.50161779l-138.89991111-472.51456c-8.66531556-25.99594668-29.43658667-43.45400889-57.21656889-43.45400891s-50.33528889 15.67402668-59.00060446 41.66997334l-92.00526221 274.48661334H351.69166222L259.6864 90.33045333c-8.66531556-25.99594668-31.22062222-41.66997333-59.00060444-41.66997332s-50.33528889 17.33063112-57.2165689 43.45400887L4.69674667 564.50161779c-5.22467555 17.33063112 1.78403556 36.44529778 15.67402667 46.89464887l491.11950221 368.27591113 492.77610666-368.27591113c13.76256-10.32192 20.77127111-29.43658667 15.54659557-46.89464887z",special:!0},{viewBox:[1024,1024],path:"M927.78951111 340.39277037c-12.01493333-47.81700741 12.01493333-124.03294815 89.08041481-150.97552592l-82.40545184-4.36906667s-31.19028148-109.22666667-174.27721483-118.9357037c-143.08693333-9.8304-236.65777778-3.64088889-236.65777777-3.6408889s106.07122963 67.47780741 63.5941926 187.74850371c-31.06891852 63.71555555-79.85682963 116.02299259-132.04290371 175.61220741-1.57771852 1.57771852-3.03407408 3.15543703-4.2477037 4.49042962C278.25493333 624.86755555 7.13007408 934.34311111 7.13007408 934.34311111c298.43152592 78.15774815 498.43768889-7.64586667 616.76657777-110.56165926 24.87940741-0.24272592 43.5693037-0.36408889 56.19105185-0.36408888 164.8109037 0 304.13558518-142.72284445 298.43152593-301.4656-3.88361482-109.1053037-38.71478518-133.74198518-50.72971852-181.5589926z",special:!0},{viewBox:[1024,1024],path:"M997.8886764 504.17210418L537.2729208 43.89182982c-13.97838539-13.97838539-36.56745619-13.97838539-50.5458416 0L26.1113236 504.17210418c-13.41924998 13.41924998-21.02349164 31.64706454-21.02349163 50.65766867 0 39.47496036 32.09437288 71.56933323 71.56933324 71.56933323h48.53295408V954.83524937c0 19.79339373 15.99127289 35.78466661 35.78466663 35.78466662H440.43066677V740.12724968h125.24633315v250.49266631h297.34821416c19.79339373 0 35.78466661-15.99127289 35.78466663-35.78466662V626.39910608h48.53295408c19.01060414 0 37.23841869-7.49241457 50.65766869-21.02349163 27.84494371-27.95677079 27.84494371-73.24673948-0.11182708-101.20351027z",special:!0},{viewBox:[1024,1024],path:"M1009.13013121 349.27572283L674.72427717 14.86986879c-8.82158299-8.82158299-20.35749924-13.16451618-31.89341544-13.16451618s-23.07183245 4.34293316-31.89341547 13.16451618L392.29790453 233.6451272c-16.5574327-1.90003326-33.25058207-2.71433322-49.94373146-2.71433324-99.34459624 0-198.68919249 32.70771543-280.25490606 98.12314628-20.90036589 16.69314938-22.52896582 48.04369819-3.66434987 67.04403081l246.59717401 246.59717401-292.33368895 292.06225564c-3.52863319 3.52863319-5.83581644 8.27871636-6.24296642 13.30023282l-4.61436649 50.48659809c-1.22144996 12.75736619 8.95729967 23.6146991 21.57894918 23.6146991 0.6785833 0 1.35716662 0 2.03574992-0.13571666l50.48659809-4.61436649c5.02151649-0.40714999 9.77159962-2.71433322 13.30023282-6.24296643l292.33368896-292.33368896 246.59717402 246.59717401c8.82158299 8.82158299 20.35749924 13.16451618 31.89341544 13.16451618 13.16451618 0 26.19331567-5.70009979 35.15061536-16.82886604 76.40848044-95.40881307 108.16617924-214.83947521 95.27309638-330.33435417l218.63954175-218.63954173c17.50744934-17.37173267 17.50744934-45.8722316 0-63.51539759z",special:!0},{viewBox:[1024,1024],path:"M976.62005979 160.47737905c-0.39452595-0.39452595-80.35178503 78.64217259-239.47725131 237.50462156l-111.6508437-111.65084369 237.89914752-237.89914752c-125.19623464-75.35445635-286.03131335-56.02268482-390.31767264 48.26367449-81.92988882 81.92988882-112.57140424 200.15616502-83.37648398 310.09739626l2.36715569 8.81107954-372.82702222 372.69551356c-8.15353628 8.15353628-8.15353628 21.56741857 0 29.72095487l185.95323084 185.95323084c8.15353628 8.15353628 21.56741857 8.15353628 29.72095485 0l372.56400493-372.56400493 8.81107953 2.3671557c110.07273989 29.32642892 228.29901608-1.18357785 310.36041356-83.24497533 104.41786795-104.2863593 123.74963948-265.12143802 49.97328693-390.05465535z",special:!0}]},{type:"线性",children:[{viewBox:[1024,1024],path:"M953.5488 832.61667556c-24.08448-57.08913778-58.74574221-108.31644445-102.70947556-152.28017777-43.96373333-43.96373333-95.19104-78.49756444-152.28017777-102.70947558-0.50972445-0.25486222-1.01944888-0.38229333-1.52917334-0.63715555C776.41955556 519.64586667 828.02915556 426.23886221 828.02915556 320.85333332c0-174.58062221-141.44853334-316.02915556-316.02915556-316.02915554S195.97084444 146.27271111 195.97084444 320.85333332c0 105.38552889 51.6096 198.79253333 130.99918223 256.26396447-0.50972445 0.25486222-1.01944888 0.38229333-1.52917334 0.63715555-57.08913778 24.08448-108.31644445 58.61831112-152.28017777 102.70947554-43.96373333 43.96373333-78.49756444 95.19104-102.70947556 152.28017779C46.74901333 888.55893332 34.13333334 947.8144 32.85902222 1008.72647111c-0.12743111 5.7344 4.46008889 10.44935111 10.19448889 10.44935111h76.45866667c5.60696888 0 10.06705778-4.46008889 10.19448889-9.93962666 2.54862221-98.37681778 42.05226667-190.50951112 111.88451555-260.34176001 72.25344-72.25344 168.20906666-112.01194667 270.40881778-112.01194667s198.15537778 39.75850667 270.40881778 112.01194667C852.24106667 818.72668444 891.74471111 910.85937779 894.29333333 1009.23619556c0.12743111 5.60696888 4.58752 9.93962667 10.19448889 9.93962666h76.45866667c5.7344 0 10.32192-4.71495112 10.19448889-10.44935111-1.27431111-60.91207112-13.88999112-120.16753779-37.59217778-176.10979555zM512 540.03484444c-58.49088 0-113.54112-22.81016889-154.95623111-64.22527999S292.81848888 379.34421333 292.81848888 320.85333332c0-58.49088 22.81016889-113.54112 64.22528001-154.9562311S453.50912 101.67182221 512 101.67182221s113.54112 22.81016889 154.95623111 64.22528001S731.18151112 262.36245333 731.18151112 320.85333332c0 58.49088-22.81016889 113.54112-64.22528001 154.95623113S570.49088 540.03484444 512 540.03484444z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 111.50222222H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888889v728.17777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h946.6311111c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V147.91111111c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888889z m-45.5111111 126.06577778V830.57777778H84.19555555V237.568l-31.40266666-24.46222222 44.71466666-57.45777778 48.6968889 37.888h731.70488888l48.69688889-37.888 44.71466667 57.45777778-31.51644444 24.46222222z M877.90933333 193.42222222L512 477.86666667 146.09066667 193.42222222l-48.69688889-37.888-44.71466667 57.45777778 31.40266667 24.46222222 388.66488889 302.19377778c22.98311111 17.86311111 55.18222222 17.86311111 78.16533333 0L939.80444445 237.568l31.40266666-24.46222222-44.71466666-57.45777778-48.58311112 37.77422222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M985.31555555 88.74666667H38.68444445c-20.13866667 0-36.40888889 16.27022222-36.4088889 36.40888888v564.33777778c0 20.13866667 16.27022222 36.40888889 36.4088889 36.40888889h432.35555555v127.43111111H275.34222222c-10.01244445 0-18.20444445 8.192-18.20444444 18.20444445v54.61333333c0 5.00622222 4.096 9.10222222 9.10222222 9.10222222h491.52c5.00622222 0 9.10222222-4.096 9.10222222-9.10222222v-54.61333333c0-10.01244445-8.192-18.20444445-18.20444444-18.20444445H552.96V725.90222222h432.35555555c20.13866667 0 36.40888889-16.27022222 36.4088889-36.40888889V125.15555555c0-20.13866667-16.27022222-36.40888889-36.4088889-36.40888888z m-45.5111111 555.23555555H84.19555555V170.66666667h855.6088889v473.31555555z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M512 2.27555555C230.51377778 2.27555555 2.27555555 230.51377778 2.27555555 512s228.23822222 509.72444445 509.72444445 509.72444445 509.72444445-228.23822222 509.72444445-509.72444445S793.48622222 2.27555555 512 2.27555555z m0 932.97777778c-233.69955555 0-423.25333333-189.55377778-423.25333333-423.25333333 0-101.26222222 35.61244445-194.33244445 95.00444444-267.15022222l595.39911111 595.39911111C706.33244445 899.64088889 613.26222222 935.25333333 512 935.25333333z m328.24888889-156.10311111L244.84977778 183.75111111C317.66755555 124.35911111 410.73777778 88.74666667 512 88.74666667c233.69955555 0 423.25333333 189.55377778 423.25333333 423.25333333 0 101.26222222-35.61244445 194.33244445-95.00444444 267.15022222z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M901.80266667 257.82044445L656.95288889 12.97066667c-6.82666667-6.82666667-16.04266667-10.69511111-25.71377778-10.69511112H147.91111111c-20.13866667 0-36.40888889 16.27022222-36.40888889 36.4088889v946.6311111c0 20.13866667 16.27022222 36.40888889 36.40888889 36.4088889h728.17777778c20.13866667 0 36.40888889-16.27022222 36.40888889-36.4088889V283.648c0-9.67111111-3.86844445-19.00088889-10.69511111-25.82755555zM828.52977778 300.37333333H614.4V86.24355555L828.52977778 300.37333333z m2.048 639.43111112H193.42222222V84.19555555h343.60888889v245.76c0 26.39644445 21.39022222 47.78666667 47.78666667 47.78666667h245.76v562.06222223z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M981.07392 55.79662222H42.92608c-31.22062222 0-50.71758221 34.02410666-35.04355556 61.16693334L304.28728889 620.82616888V927.42542221c0 22.55530667 18.09521779 40.77795555 40.52309333 40.77795557h334.37923556c22.42787556 0 40.52309333-18.22264888 40.52309333-40.77795557V620.82616888L1016.24490667 116.96355556c15.54659555-27.14282666-3.95036444-61.16693333-35.17098667-61.16693334zM628.47203556 876.45297779H395.52796444V677.66044445h233.07150222v198.79253334z m12.23338666-301.50200891l-12.10595556 21.15356445h-233.19893332l-12.10595556-21.15356445L130.59868445 147.54702221h762.8026311L640.70542222 574.95096888z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M980.62285431 4.54099753H654.39920987c-4.2719763 0-7.76722963 3.49525333-7.76722962 7.76722964v72.4941432c0 4.2719763 3.49525333 7.76722963 7.76722962 7.76722963h207.64393877L604.04167111 350.57107753c-64.72691358-49.83972347-143.69374815-76.7661195-226.67365136-76.7661195-99.54999309 0-193.27456395 38.83614815-263.5679921 109.25903012S4.54099753 547.08198717 4.54099753 646.63198025s38.83614815 193.27456395 109.25903012 263.5679921C184.09345581 980.62285431 277.81802667 1019.45900247 377.36801975 1019.45900247s193.27456395-38.83614815 263.5679921-109.25903012C711.35889383 839.90654419 750.19504197 746.18197333 750.19504197 646.63198025c0-82.9799032-26.92639605-161.68783013-76.63666567-226.41474372L931.4304 162.34521283V369.60079013c0 4.2719763 3.49525333 7.76722963 7.76722963 7.76722962h72.4941432c4.2719763 0 7.76722963-3.49525333 7.76722964-7.76722962V43.37714569c0-21.35988148-17.47626667-38.83614815-38.83614816-38.83614816zM377.36801975 921.07409383c-151.33152395 0-274.44211358-123.11058963-274.44211358-274.44211358s123.11058963-274.44211358 274.44211358-274.44211358 274.44211358 123.11058963 274.44211358 274.44211358-123.11058963 274.44211358-274.44211358 274.44211358z",special:!0,outlined:!0},{viewBox:[1024,1024],path:"M591.98717801 512l405.34042913-483.16579151c6.79427767-8.02960089 1.08090782-20.22841761-9.41933951-20.2284176h-123.22349044c-7.25752386 0-14.20621693 3.24272343-18.99309439 8.80167789L511.38233839 415.95362022 177.07299399 17.40746878c-4.63246205-5.55895447-11.58115512-8.80167789-18.99309439-8.80167789H34.85640916c-10.50024731 0-16.21361717 12.19881672-9.41933952 20.2284176L430.77749876 512 25.43706964 995.16579151c-6.79427767 8.02960089-1.08090782 20.22841761 9.41933952 20.2284176h123.22349044c7.25752386 0 14.20621693-3.24272343 18.99309439-8.80167789l334.3093444-398.54615144 334.30934441 398.54615144c4.63246205 5.55895447 11.58115512 8.80167789 18.99309439 8.80167789h123.22349044c10.50024731 0 16.21361717-12.19881672 9.41933951-20.2284176L591.98717801 512z",special:!0,outlined:!0}]}],_e={bar:"bar",horizontalBar:"bar",line:"line",area:"line",scatter:"line",pie:"pie",ring:"pie"};var Te=()=>{const e=U(),t=Object(S["debounce"])((function(){e.addSnapshot()}),300,{trailing:!0}),l=Object(S["throttle"])((function(){e.reDo()}),100,{leading:!0,trailing:!1}),c=Object(S["throttle"])((function(){e.unDo()}),100,{leading:!0,trailing:!1});return{addHistorySnapshot:t,redo:l,undo:c}},Me=()=>{const e=z(),t=T(),{creatingElement:l}=Object(o["c"])(e),{theme:c,viewportRatio:n}=Object(o["c"])(t),{addHistorySnapshot:r}=Te(),i=(c,n)=>{t.addElement(c),e.setActiveElementIdList([c.id]),l.value&&e.setCreatingElement(null),setTimeout(()=>{e.setEditorareaFocus(!0)},0),n&&n(),r()},s=e=>{Ee(e).then(({width:t,height:l})=>{const c=l/t;c<n.value&&t>Ve?(t=Ve,l=t*c):l>Ve*n.value&&(l=Ve*n.value,t=l/c),i({type:"image",id:Object(a["b"])(10),src:e,width:t,height:l,left:(Ve-t)/2,top:(Ve*n.value-l)/2,fixedRatio:!0,rotate:0})})},d=e=>{const t={type:"chart",id:Object(a["b"])(10),chartType:_e[e],left:300,top:81.25,width:400,height:400,rotate:0,themeColor:[c.value.themeColor],gridColor:c.value.fontColor,data:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1"],series:[[12,19,5,2,18]]}};let l={};"horizontalBar"===e?l={horizontalBars:!0}:"area"===e?l={showArea:!0}:"scatter"===e?l={showLine:!1}:"ring"===e&&(l={donut:!0}),i({...t,options:l})},u=(e,t)=>{const l={fontname:c.value.fontName,color:c.value.fontColor},o=[];for(let c=0;c<e;c++){const e=[];for(let c=0;c<t;c++)e.push({id:Object(a["b"])(10),colspan:1,rowspan:1,text:"",style:l});o.push(e)}const r=100,s=36,d=new Array(t).fill(1/t),u=t*r,b=e*s;i({type:"table",id:Object(a["b"])(10),width:u,height:b,colWidths:d,rotate:0,data:o,left:(Ve-u)/2,top:(Ve*n.value-b)/2,outline:{width:2,style:"solid",color:"#eeece1"},theme:{color:c.value.themeColor,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1},cellMinHeight:36})},b=(e,t)=>{const{left:l,top:n,width:o,height:r}=e,s=(null===t||void 0===t?void 0:t.content)||"",d=(null===t||void 0===t?void 0:t.vertical)||!1,u=Object(a["b"])(10);i({type:"text",id:u,left:l,top:n,width:o,height:r,content:s,rotate:0,defaultFontName:c.value.fontName,defaultColor:c.value.fontColor,vertical:d},()=>{setTimeout(()=>{const e=document.querySelector(`#editable-element-${u} .ProseMirror`);e&&e.focus()},0)})},O=(e,t)=>{const{left:l,top:n,width:o,height:r}=e,s={type:"shape",id:Object(a["b"])(10),left:l,top:n,width:o,height:r,viewBox:t.viewBox,path:t.path,fill:c.value.themeColor,fixedRatio:!1,rotate:0};if(t.special&&(s.special=!0),t.pathFormula){s.pathFormula=t.pathFormula,s.viewBox=[o,r];const e=Le[t.pathFormula];"editable"in e?(s.path=e.formula(o,r,e.defaultValue),s.keypoint=e.defaultValue):s.path=e.formula(o,r)}i(s)},m=(e,t)=>{const{left:l,top:n,start:o,end:r}=e,s={type:"line",id:Object(a["b"])(10),left:l,top:n,start:o,end:r,points:t.points,color:c.value.themeColor,style:t.style,width:2};t.isBroken&&(s.broken=[(o[0]+r[0])/2,(o[1]+r[1])/2]),t.isCurve&&(s.curve=[(o[0]+r[0])/2,(o[1]+r[1])/2]),t.isCubic&&(s.cubic=[[(o[0]+r[0])/2,(o[1]+r[1])/2],[(o[0]+r[0])/2,(o[1]+r[1])/2]]),i(s)},p=e=>{i({type:"latex",id:Object(a["b"])(10),width:e.w,height:e.h,rotate:0,left:(Ve-e.w)/2,top:(Ve*n.value-e.h)/2,path:e.path,latex:e.latex,color:c.value.fontColor,strokeWidth:2,viewBox:[e.w,e.h],fixedRatio:!0})},f=e=>{i({type:"video",id:Object(a["b"])(10),width:500,height:300,rotate:0,left:(Ve-500)/2,top:(Ve*n.value-300)/2,src:e})},j=e=>{i({type:"audio",id:Object(a["b"])(10),width:50,height:50,rotate:0,left:(Ve-50)/2,top:(Ve*n.value-50)/2,loop:!1,autoplay:!1,fixedRatio:!0,color:c.value.themeColor,src:e})};return{createImageElement:s,createChartElement:d,createTableElement:u,createTextElement:b,createShapeElement:O,createLineElement:m,createLatexElement:p,createVideoElement:f,createAudioElement:j}},De=()=>{const e=z(),t=T(),{currentSlide:l}=Object(o["c"])(t),{addHistorySnapshot:c}=Te(),n=n=>{const{groupIdMap:o,elIdMap:a}=xe(n),r=l.value.elements.map(e=>e.id);for(const e of n){const t=r.includes(e.id);e.id=a[e.id],t&&(e.left=e.left+10,e.top=e.top+10),e.groupId&&(e.groupId=o[e.groupId])}t.addElement(n),e.setActiveElementIdList(Object.values(a)),c()},r=e=>{const l=ge(e),n=e.map(e=>{const{groupIdMap:t,elIdMap:c}=xe(e.elements);for(const n of e.elements)n.id=c[n.id],n.groupId&&(n.groupId=t[n.groupId]),n.link&&"slide"===n.link.type&&(l[n.link.target]?n.link.target=l[n.link.target]:delete n.link);if(e.animations)for(const l of e.animations)l.id=Object(a["b"])(10),l.elId=c[l.elId];return{...e,id:l[e.id]}});t.addSlide(n),c()};return{addElementsFromData:n,addSlidesFromData:r}},ze=()=>{const{createTextElement:e}=Me(),{addElementsFromData:t,addSlidesFromData:l}=De(),c=t=>{e({left:0,top:0,width:600,height:50},{content:t})},n=(e,n)=>{const o=(null===n||void 0===n?void 0:n.onlySlide)||!1,a=(null===n||void 0===n?void 0:n.onlyElements)||!1,r=me(e);if("object"===typeof r){const{type:e,data:c}=r;"elements"!==e||o?"slides"!==e||a||l(c):t(c)}else if(!a&&!o){const e=Ne(r);c(e)}};return{pasteTextClipboardData:n}},Ae=()=>{const e=z(),t=T(),{selectedSlidesIndex:l,activeElementIdList:c}=Object(o["c"])(e),{currentSlide:r,slides:i,theme:s,slideIndex:d}=Object(o["c"])(t),u=Object(n["computed"])(()=>[...l.value,d.value]),b=Object(n["computed"])(()=>i.value.filter((e,t)=>u.value.includes(t))),O=Object(n["computed"])(()=>b.value.map(e=>e.id)),{pasteTextClipboardData:m}=ze(),{addSlidesFromData:p}=De(),{addHistorySnapshot:f}=Te(),j=()=>{const l={id:Object(a["b"])(10),elements:[],background:{type:"solid",color:s.value.backgroundColor}};t.updateSlideIndex(0),e.setActiveElementIdList([]),t.setSlides([l])},v=l=>{l===te.UP&&d.value>0?(c.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(d.value-1)):l===te.DOWN&&d.value<i.value.length-1&&(c.value.length&&e.setActiveElementIdList([]),t.updateSlideIndex(d.value+1))},h=()=>{const t=de(JSON.stringify({type:"slides",data:b.value}));be(t).then(()=>{e.setThumbnailsFocus(!0)})},y=()=>{Oe().then(e=>{m(e,{onlySlide:!0})}).catch(e=>ne["a"].warning(e))},g=()=>{const l={id:Object(a["b"])(10),elements:[],background:{type:"solid",color:s.value.backgroundColor}};e.setActiveElementIdList([]),t.addSlide(l),f()},x=l=>{const{groupIdMap:c,elIdMap:n}=xe(l.elements);for(const e of l.elements)e.id=n[e.id],e.groupId&&(e.groupId=c[e.groupId]);const o={...l,id:Object(a["b"])(10)};e.setActiveElementIdList([]),t.addSlide(o),f()},k=()=>{const e=JSON.parse(JSON.stringify(r.value));p([e])},C=(l=O.value)=>{i.value.length===l.length?j():t.deleteSlide(l),e.updateSelectedSlidesIndex([]),f()},N=()=>{const e=[...O.value];h(),C(e)},E=()=>{const t=Array.from(Array(i.value.length),(e,t)=>t);e.setActiveElementIdList([]),e.updateSelectedSlidesIndex(t)},w=(e,l)=>{if(l===e)return;const c=JSON.parse(JSON.stringify(i.value)),n=c[l];c.splice(l,1),c.splice(e,0,n),t.setSlides(c),t.updateSlideIndex(e)};return{resetSlides:j,updateSlideIndex:v,copySlide:h,pasteSlide:y,createSlide:g,createSlideByTemplate:x,copyAndPasteSlide:k,deleteSlide:C,cutSlide:N,selectAllSlide:E,sortSlides:w}},Fe=()=>{const e=z(),t=T(),{activeElementIdList:l}=Object(o["c"])(e),{currentSlide:c}=Object(o["c"])(t),{addHistorySnapshot:n}=Te(),a=()=>{const o=JSON.parse(JSON.stringify(c.value.elements));for(const e of o)l.value.includes(e.id)&&(e.lock=!0);t.updateSlide({elements:o}),e.setActiveElementIdList([]),n()},r=l=>{const o=JSON.parse(JSON.stringify(c.value.elements));if(l.groupId){const c=[];for(const e of o)e.groupId===l.groupId&&(e.lock=!1,c.push(e.id));t.updateSlide({elements:o}),e.setActiveElementIdList(c)}else{for(const e of o)if(e.id===l.id){e.lock=!1;break}t.updateSlide({elements:o}),e.setActiveElementIdList([l.id])}n()};return{lockElement:a,unlockElement:r}},$e=()=>{const e=z(),t=T(),{activeElementIdList:l,activeGroupElementId:c}=Object(o["c"])(e),{currentSlide:n}=Object(o["c"])(t),{addHistorySnapshot:a}=Te(),r=()=>{if(!l.value.length)return;let o=[];o=c.value?n.value.elements.filter(e=>e.id!==c.value):n.value.elements.filter(e=>!l.value.includes(e.id)),e.setActiveElementIdList([]),t.updateSlide({elements:o}),a()},i=()=>{n.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),a())};return{deleteElement:r,deleteAllElements:i}},Re=()=>{const e=z(),t=T(),{activeElementIdList:l,activeElementList:c,handleElementId:r}=Object(o["c"])(e),{currentSlide:i}=Object(o["c"])(t),{addHistorySnapshot:s}=Te(),d=Object(n["computed"])(()=>{if(c.value.length<2)return!1;const e=c.value[0].groupId;if(!e)return!0;const t=c.value.every(t=>(t.groupId&&t.groupId)===e);return!t}),u=()=>{if(!c.value.length)return;let e=JSON.parse(JSON.stringify(i.value.elements));const n=Object(a["b"])(10),o=[];for(const t of e)l.value.includes(t.id)&&(t.groupId=n,o.push(t));const r=e.findIndex(e=>e.id===o[o.length-1].id),d=o.map(e=>e.id);e=e.filter(e=>!d.includes(e.id));const u=r-o.length+1;e.splice(u,0,...o),t.updateSlide({elements:e}),s()},b=()=>{if(!c.value.length)return;const n=c.value.some(e=>e.groupId);if(!n)return;const o=JSON.parse(JSON.stringify(i.value.elements));for(const e of o)l.value.includes(e.id)&&e.groupId&&delete e.groupId;t.updateSlide({elements:o});const a=r.value?[r.value]:[];e.setActiveElementIdList(a),s()};return{canCombine:d,combineElements:u,uncombineElements:b}},Pe=()=>{const e=z(),{activeElementIdList:t,activeElementList:l}=Object(o["c"])(e),{pasteTextClipboardData:c}=ze(),{deleteElement:n}=$e(),a=()=>{if(!t.value.length)return;const c=de(JSON.stringify({type:"elements",data:l.value}));be(c).then(()=>{e.setEditorareaFocus(!0)})},r=()=>{a(),n()},i=()=>{Oe().then(e=>{c(e)}).catch(e=>ne["a"].warning(e))},s=()=>{a(),i()};return{copyElement:a,cutElement:r,pasteElement:i,quickCopyElement:s}},He=()=>{const e=z(),{currentSlide:t}=Object(o["c"])(T()),{hiddenElementIdList:l}=Object(o["c"])(e),c=()=>{const c=t.value.elements.filter(e=>!e.lock&&!l.value.includes(e.id)),n=c.map(e=>e.id);e.setActiveElementIdList(n)};return{selectAllElement:c}},qe=()=>{const e=T(),{activeElementIdList:t,activeGroupElementId:l}=Object(o["c"])(z()),{currentSlide:c}=Object(o["c"])(e),{addHistorySnapshot:n}=Te(),a=(o,a=1)=>{let r=[];const i=e=>{let{left:t,top:l}=e;switch(o){case te.LEFT:t-=a;break;case te.RIGHT:t+=a;break;case te.UP:l-=a;break;case te.DOWN:l+=a;break;default:break}return{...e,left:t,top:l}};r=l.value?c.value.elements.map(e=>l.value===e.id?i(e):e):c.value.elements.map(e=>t.value.includes(e.id)?i(e):e),e.updateSlide({elements:r}),n()};return{moveElement:a}},Ue=()=>{const e=T(),{currentSlide:t}=Object(o["c"])(e),{addHistorySnapshot:l}=Te(),c=(e,t)=>({minLevel:e.findIndex(e=>e.id===t[0].id),maxLevel:e.findIndex(e=>e.id===t[t.length-1].id)}),n=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:o,maxLevel:a}=c(e,n);if(a===e.length-1)return;const r=l[a+1],i=l.splice(o,n.length);if(r.groupId){const e=l.filter(e=>e.groupId===r.groupId);l.splice(o+e.length,0,...i)}else l.splice(o+1,0,...i)}else{const c=e.findIndex(e=>e.id===t.id);if(c===e.length-1)return;const n=l[c+1],o=l.splice(c,1)[0];if(n.groupId){const e=l.filter(e=>e.groupId===n.groupId);l.splice(c+e.length,0,o)}else l.splice(c+1,0,o)}return l},a=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:o}=c(e,n);if(0===o)return;const a=l[o-1],r=l.splice(o,n.length);if(a.groupId){const e=l.filter(e=>e.groupId===a.groupId);l.splice(o-e.length,0,...r)}else l.splice(o-1,0,...r)}else{const c=e.findIndex(e=>e.id===t.id);if(0===c)return;const n=l[c-1],o=l.splice(c,1)[0];if(n.groupId){const e=l.filter(e=>e.groupId===n.groupId);l.splice(c-e.length,0,o)}else l.splice(c-1,0,o)}return l},r=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:o,maxLevel:a}=c(e,n);if(a===e.length-1)return null;const r=l.splice(o,n.length);l.push(...r)}else{const c=e.findIndex(e=>e.id===t.id);if(c===e.length-1)return null;l.splice(c,1),l.push(t)}return l},i=(e,t)=>{const l=JSON.parse(JSON.stringify(e));if(t.groupId){const n=l.filter(e=>e.groupId===t.groupId),{minLevel:o}=c(e,n);if(0===o)return;const a=l.splice(o,n.length);l.unshift(...a)}else{const c=e.findIndex(e=>e.id===t.id);if(0===c)return;l.splice(c,1),l.unshift(t)}return l},s=(c,o)=>{let s;o===W.UP?s=n(t.value.elements,c):o===W.DOWN?s=a(t.value.elements,c):o===W.TOP?s=r(t.value.elements,c):o===W.BOTTOM&&(s=i(t.value.elements,c)),s&&(e.updateSlide({elements:s}),l())};return{orderElement:s}};const Ge=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},Xe=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},Ye=()=>{const e=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement;return!!e};var Ze=()=>{const e=X(),t=T(),l=()=>{Ge(),e.setScreening(!0)},c=()=>{t.updateSlideIndex(0),l()},n=()=>{e.setScreening(!1),Ye()&&Xe()};return{enterScreening:l,enterScreeningFromStart:c,exitScreening:n}},We=()=>{const e=z(),{canvasPercentage:t,canvasScale:l,canvasDragged:c}=Object(o["c"])(e),a=Object(n["computed"])(()=>Math.round(100*l.value)+"%"),r=l=>{let c=t.value;const n=5,o=200,a=30;"+"===l&&c<=o&&(c+=n),"-"===l&&c>=a&&(c-=n),e.setCanvasPercentage(c)},i=c=>{const n=Math.round(c/l.value*t.value)/100;e.setCanvasPercentage(n)},s=()=>{e.setCanvasPercentage(90),c&&e.setCanvasDragged(!1)};return{canvasScalePercentage:a,setCanvasScalePercentage:i,scaleCanvas:r,resetCanvas:s}},Je=()=>{const e=z(),t=G(),{activeElementIdList:l,disableHotkeys:c,handleElement:a,handleElementId:r,editorAreaFocus:i,thumbnailsFocus:s}=Object(o["c"])(e),{currentSlide:d}=Object(o["c"])(T()),{ctrlKeyState:u,shiftKeyState:b,spaceKeyState:O}=Object(o["c"])(t),{updateSlideIndex:m,copySlide:p,createSlide:f,deleteSlide:j,cutSlide:v,copyAndPasteSlide:h,selectAllSlide:y}=Ae(),{combineElements:g,uncombineElements:x}=Re(),{deleteElement:k}=$e(),{lockElement:C}=Fe(),{copyElement:N,cutElement:E,quickCopyElement:w}=Pe(),{selectAllElement:V}=He(),{moveElement:I}=qe(),{orderElement:S}=Ue(),{redo:L,undo:B}=Te(),{enterScreening:_,enterScreeningFromStart:M}=Ze(),{scaleCanvas:D,resetCanvas:A}=We(),F=()=>{l.value.length?N():s.value&&p()},$=()=>{l.value.length?E():s.value&&v()},R=()=>{l.value.length?w():s.value&&h()},P=()=>{i.value&&V(),s.value&&y()},H=()=>{i.value&&C()},q=()=>{i.value&&g()},U=()=>{i.value&&x()},X=()=>{l.value.length?k():s.value&&j()},Y=e=>{l.value.length?I(e):e!==te.UP&&e!==te.DOWN||m(e)},Z=e=>{e===te.PAGEUP?m(te.UP):e===te.PAGEDOWN&&m(te.DOWN)},J=e=>{a.value&&S(a.value,e)},K=()=>{s.value&&f()},Q=()=>{if(!d.value.elements.length)return;if(!r.value){const t=d.value.elements[0];return void e.setActiveElementIdList([t.id])}const t=d.value.elements.findIndex(e=>e.id===r.value),l=t>=d.value.elements.length-1?0:t+1,c=d.value.elements[l].id;e.setActiveElementIdList([c])},ee=l=>{const{ctrlKey:n,shiftKey:o,altKey:a,metaKey:r}=l,d=n||r,O=l.key.toUpperCase();if(d&&!u.value&&t.setCtrlKeyState(!0),o&&!b.value&&t.setShiftKeyState(!0),c.value||O!==te.SPACE||t.setSpaceKeyState(!0),d&&O===te.P)return l.preventDefault(),void e.setDialogForExport("pdf");if(o&&O===te.F5)return l.preventDefault(),_(),void t.setShiftKeyState(!1);if(O===te.F5)return l.preventDefault(),void M();if(i.value||s.value){if(d&&O===te.C){if(c.value)return;l.preventDefault(),F()}if(d&&O===te.X){if(c.value)return;l.preventDefault(),$()}if(d&&O===te.D){if(c.value)return;l.preventDefault(),R()}if(d&&O===te.Z){if(c.value)return;l.preventDefault(),B()}if(d&&O===te.Y){if(c.value)return;l.preventDefault(),L()}if(d&&O===te.A){if(c.value)return;l.preventDefault(),P()}if(d&&O===te.L){if(c.value)return;l.preventDefault(),H()}if(!o&&d&&O===te.G){if(c.value)return;l.preventDefault(),q()}if(o&&d&&O===te.G){if(c.value)return;l.preventDefault(),U()}if(a&&O===te.F){if(c.value)return;l.preventDefault(),J(W.TOP)}if(a&&O===te.B){if(c.value)return;l.preventDefault(),J(W.BOTTOM)}if(O===te.DELETE||O===te.BACKSPACE){if(c.value)return;l.preventDefault(),X()}if(O===te.UP){if(c.value)return;l.preventDefault(),Y(te.UP)}if(O===te.DOWN){if(c.value)return;l.preventDefault(),Y(te.DOWN)}if(O===te.LEFT){if(c.value)return;l.preventDefault(),Y(te.LEFT)}if(O===te.RIGHT){if(c.value)return;l.preventDefault(),Y(te.RIGHT)}if(O===te.PAGEUP){if(c.value)return;l.preventDefault(),Z(te.PAGEUP)}if(O===te.PAGEDOWN){if(c.value)return;l.preventDefault(),Z(te.PAGEDOWN)}if(O===te.ENTER){if(c.value)return;l.preventDefault(),K()}if(O===te.MINUS){if(c.value)return;l.preventDefault(),D("-")}if(O===te.EQUAL){if(c.value)return;l.preventDefault(),D("+")}if(O===te.DIGIT_0){if(c.value)return;l.preventDefault(),A()}if(O===te.TAB){if(c.value)return;l.preventDefault(),Q()}}},le=()=>{u.value&&t.setCtrlKeyState(!1),b.value&&t.setShiftKeyState(!1),O.value&&t.setSpaceKeyState(!1)};Object(n["onMounted"])(()=>{document.addEventListener("keydown",ee),document.addEventListener("keyup",le),window.addEventListener("blur",le)}),Object(n["onUnmounted"])(()=>{document.removeEventListener("keydown",ee),document.removeEventListener("keyup",le),window.removeEventListener("blur",le)})},Ke=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:l}=Object(o["c"])(z()),{pasteTextClipboardData:c}=ze(),{createImageElement:a}=Me(),r=e=>{we(e).then(e=>a(e))},i=n=>{if(!e.value&&!t.value)return;if(l.value)return;if(!n.clipboardData)return;const o=n.clipboardData.items,a=o[0];if(a){for(const e of o)if("file"===e.kind&&-1!==e.type.indexOf("image")){const t=e.getAsFile();return void(t&&r(t))}"string"===a.kind&&"text/plain"===a.type&&a.getAsString(e=>c(e))}};Object(n["onMounted"])(()=>{document.addEventListener("paste",i)}),Object(n["onUnmounted"])(()=>{document.removeEventListener("paste",i)})},Qe=(l("6d2a"),l("9571")),et=(l("9a33"),l("f933")),tt=(l("9d5c"),l("a600")),lt=(l("fbd8"),l("55f1")),ct=l("21a6"),nt=l("8f74"),ot=l("e774");const at=["style","script","template"],rt=["html","head","body","p","dt","dd","li","option","thead","th","tbody","tr","td","tfoot","colgroup"],it={li:["ul","ol","menu"],dt:["dl"],dd:["dl"],tbody:["table"],thead:["table"],tfoot:["table"],tr:["table"],td:["table"]},st=["!doctype","area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],dt=(e,t)=>{const l=t-e.position;ut(e,l)},ut=(e,t)=>{e.position=e.position+t},bt=(e,t)=>{const l=!1;while(!l){const l=e.indexOf("<",t);if(-1===l)return l;const c=e.charAt(l+1);if("/"===c||"!"===c||/[A-Za-z0-9]/.test(c))return l;t=l+1}return-1},Ot=e=>{const{str:t}=e;let l=bt(t,e.position);if(l===e.position)return;-1===l&&(l=t.length);const c=t.slice(e.position,l);dt(e,l),e.tokens.push({type:"text",content:c})},mt=e=>{const{str:t}=e;ut(e,4);let l=t.indexOf("--\x3e",e.position),c=l+3;-1===l&&(l=c=t.length);const n=t.slice(e.position,l);dt(e,c),e.tokens.push({type:"comment",content:n})},pt=e=>{const{str:t}=e,l=t.length;let c=e.position;while(c<l){const e=t.charAt(c),l=!(/\s/.test(e)||"/"===e||">"===e);if(l)break;c++}let n=c+1;while(n<l){const e=t.charAt(n),l=!(/\s/.test(e)||"/"===e||">"===e);if(!l)break;n++}dt(e,n);const o=t.slice(c,n);return e.tokens.push({type:"tag",content:o}),o},ft=e=>{const{str:t,tokens:l}=e;let c=e.position,n=null,o=c;const a=[],r=t.length;while(c<r){const e=t.charAt(c);if(n){const t=e===n;t&&(n=null),c++;continue}const l="/"===e||">"===e;if(l){c!==o&&a.push(t.slice(o,c));break}const r=/\s/.test(e);if(r){c!==o&&a.push(t.slice(o,c)),o=c+1,c++;continue}const i="'"===e||'"'===e;i?(n=e,c++):c++}dt(e,c);const i="attribute";for(let s=0;s<a.length;s++){const e=a[s],t=-1===e.indexOf("=");if(t){const t=a[s+1];if(t&&Object(S["startsWith"])(t,"=")){if(t.length>1){const c=e+t;l.push({type:i,content:c}),s+=1;continue}const c=a[s+2];if(s+=1,c){const t=e+"="+c;l.push({type:i,content:t}),s+=1;continue}}}if(Object(S["endsWith"])(e,"=")){const t=a[s+1];if(t&&-1===t.indexOf("=")){const c=e+t;l.push({type:i,content:c}),s+=1;continue}const c=e.slice(0,-1);l.push({type:i,content:c})}else l.push({type:i,content:e})}},jt=(e,t)=>{const{str:l,tokens:c}=t,n=e.toLowerCase(),o=l.length;let a=t.position;while(a<o){const e=l.indexOf("</",a);if(-1===e){Ot(t);break}const o={str:l,position:t.position,tokens:[]};dt(o,e);const r=vt(o);if(n===r.toLowerCase()){if(e!==t.position){const n=t.position;dt(t,e),c.push({type:"text",content:l.slice(n,e)})}c.push(...o.tokens),dt(t,o.position);break}a=o.position}},vt=e=>{const{str:t}=e,l=t.charAt(e.position+1),c="/"===l;ut(e,c?2:1),e.tokens.push({type:"tag-start",close:c});const n=pt(e);ft(e);const o=t.charAt(e.position),a="/"===o;return ut(e,a?2:1),e.tokens.push({type:"tag-end",close:a}),n},ht=e=>{const t=e.str,l=t.length;while(e.position<l){const l=e.position;if(Ot(e),e.position===l){const c=Object(S["startsWith"])(t,"!--",l+1);if(c)mt(e);else{const t=vt(e),l=t.toLowerCase();at.includes(l)&&jt(t,e)}}}},yt=e=>{const t={str:e,position:0,tokens:[]};return ht(t),t.tokens},gt=e=>{const t={tagName:null,children:[]},l={tokens:e,cursor:0,stack:[t]};return Ct(l),t.children},xt=(e,t)=>{const l=it[e];if(l){let c=t.length-1;while(c>=0){const n=t[c].tagName;if(n===e)break;if(l.includes(n))return!0;c--}}return!1},kt=(e,t)=>{e.splice(t)},Ct=e=>{const{stack:t,tokens:l}=e;let{cursor:c}=e,n=t[t.length-1].children;const o=l.length;while(c<o){const e=l[c];if("tag-start"!==e.type){n.push(e),c++;continue}const a=l[++c];c++;const r=a.content.toLowerCase();if(e.close){let e=t.length,n=!1;while(--e>-1)if(t[e].tagName===r){n=!0;break}while(c<o){if("tag-end"!==l[c].type)break;c++}if(n){kt(t,e);break}continue}const i=rt.includes(r);let s=i;if(s&&(s=!xt(r,t)),s){let e=t.length-1;while(e>0){if(r===t[e].tagName){kt(t,e);const l=e-1;n=t[l].children;break}e-=1}}const d=[];let u;while(c<o){const e=l[c];if("tag-end"===e.type){u=e;break}d.push(e.content),c++}if(!u)break;c++;const b=[],O={type:"element",tagName:a.content,attributes:d,children:b};n.push(O);const m=!(u.close||st.includes(r));if(m){t.push({tagName:r,children:b});const e={tokens:l,cursor:c,stack:t};Ct(e),c=e.cursor}}e.cursor=c},Nt=(e,t)=>{const l=e.indexOf(t);return-1===l?[e]:[e.slice(0,l),e.slice(l+t.length)]},Et=e=>{const t=e.charAt(0),l=e.length-1,c='"'===t||"'"===t;return c&&t===e.charAt(l)?e.slice(1,l):e},wt=e=>e.map(e=>{const t=Nt(e.trim(),"="),l=t[0],c="string"===typeof t[1]?Et(t[1]):null;return{key:l,value:c}}),Vt=e=>e.map(e=>{if("element"===e.type){const t=Vt(e.children),l={type:"element",tagName:e.tagName.toLowerCase(),attributes:wt(e.attributes),children:t};return l}const t={type:e.type,content:e.content};return t});l("13d5");const It=e=>{const t=yt(e),l=gt(t);return Vt(l)};var St=l("d01f"),Lt=l("0b89");const Bt={1:"Z",2:"M",4:"H",8:"V",16:"L",32:"C",64:"S",128:"Q",256:"T",512:"A"},_t=e=>{const t=new St["a"](e),l=[];for(const c of t.commands){const e=Bt[c.type];if(2!==c.type&&16!==c.type||l.push({x:c.x,y:c.y,relative:c.relative,type:e}),32===c.type)l.push({x:c.x,y:c.y,curve:{type:"cubic",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},relative:c.relative,type:e});else if(128===c.type)l.push({x:c.x,y:c.y,curve:{type:"quadratic",x1:c.x1,y1:c.y1},relative:c.relative,type:e});else if(512===c.type){const e=l[l.length-1];if(!["M","L","Q","C"].includes(e.type))continue;const t=Object(Lt["a"])({px:e.x,py:e.y,cx:c.x,cy:c.y,rx:c.rX,ry:c.rY,xAxisRotation:c.xRot,largeArcFlag:c.lArcFlag,sweepFlag:c.sweepFlag});for(const c of t)l.push({x:c.x,y:c.y,curve:{type:"cubic",x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},relative:!1,type:"C"})}else{if(1!==c.type)continue;l.push({close:!0,type:e})}}return l},Tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",Mt="data:image/svg+xml;base64,",Dt=e=>{e=e.replace(/\r\n/g,"\n");let t="";for(let l=0;l<e.length;l++){const c=e.charCodeAt(l);c<128?t+=String.fromCharCode(c):c>127&&c<2048?(t+=String.fromCharCode(c>>6|192),t+=String.fromCharCode(63&c|128)):(t+=String.fromCharCode(c>>12|224),t+=String.fromCharCode(c>>6&63|128),t+=String.fromCharCode(63&c|128))}return t},zt=e=>{let t,l,c,n,o,a,r,i="",s=0;e=Dt(e);while(s<e.length)t=e.charCodeAt(s++),l=e.charCodeAt(s++),c=e.charCodeAt(s++),n=t>>2,o=(3&t)<<4|l>>4,a=(15&l)<<2|c>>6,r=63&c,isNaN(l)?a=r=64:isNaN(c)&&(r=64),i=i+Tt.charAt(n)+Tt.charAt(o)+Tt.charAt(a)+Tt.charAt(r);return i},At=e=>{const t=new XMLSerializer,l=t.serializeToString(e);return Mt+zt(l)},Ft=100,$t=.75;var Rt=()=>{const e=T(),{slides:t,theme:l,viewportRatio:c}=Object(o["c"])(e),{addSlidesFromData:a}=De(),r=Object(n["ref"])(!1),i=(e,t,l,c=!0)=>{r.value=!0;const n="png"===t?ot["c"]:ot["b"],o=e.querySelectorAll("foreignObject [xmlns]");o.forEach(e=>e.removeAttribute("xmlns")),setTimeout(()=>{const o={quality:l,width:1600};c&&(o.fontEmbedCSS=""),n(e,o).then(e=>{r.value=!1,Object(ct["saveAs"])(e,"pptist_slides."+t)}).catch(()=>{r.value=!1,ne["a"].error("导出图片失败")})},200)},s=e=>{const t=new Blob([de(JSON.stringify(e))],{type:""});Object(ct["saveAs"])(t,"pptist_slides.pptist")},d=(t,l=!1)=>{const c=t[0],n=new FileReader;n.addEventListener("load",()=>{try{const t=JSON.parse(ue(n.result));l?e.setSlides(t):a(t)}catch{ne["a"].error("无法正确读取 / 解析该文件")}}),n.readAsText(c)},u=()=>{const e=new Blob([JSON.stringify(t.value)],{type:""});Object(ct["saveAs"])(e,"pptist_slides.json")},b=e=>{const t=I()(e),l=t.getAlpha(),c=0===l?"#ffffff":t.setAlpha(1).toHexString();return{alpha:l,color:c}},O=e=>{const t=It(e);let l=!1,c=0;const n=[],o=(e,t={})=>{for(const a of e){const e="tagName"in a&&["div","li","p"].includes(a.tagName);if(e&&n.length){const e=n[n.length-1];e.options||(e.options={}),e.options.breakLine=!0}const r={...t},i="attributes"in a?a.attributes.find(e=>"style"===e.key):null;if(i&&i.value){const e=i.value.split(";");for(const t of e){const[e,l]=t.split(": "),[c,n]=[Object(S["trim"])(e),Object(S["trim"])(l)];c&&n&&(r[c]=n)}}if("tagName"in a){if("em"===a.tagName&&(r["font-style"]="italic"),"strong"===a.tagName&&(r["font-weight"]="bold"),"sup"===a.tagName&&(r["vertical-align"]="super"),"sub"===a.tagName&&(r["vertical-align"]="sub"),"a"===a.tagName){const e=a.attributes.find(e=>"href"===e.key);r["href"]=(null===e||void 0===e?void 0:e.value)||""}if("ul"===a.tagName&&(r["list-type"]="ul"),"ol"===a.tagName&&(r["list-type"]="ol"),"li"===a.tagName&&(l=!0),"p"===a.tagName&&"attributes"in a){const e=a.attributes.find(e=>"data-indent"===e.key);e&&e.value&&(c=+e.value)}}if("tagName"in a&&"br"===a.tagName)n.push({text:"",options:{breakLine:!0}});else if("content"in a){const e=a.content.replace(/&nbsp;/g," ").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/\n/g,""),t={};r["font-size"]&&(t.fontSize=parseInt(r["font-size"])*$t),r["color"]&&(t.color=b(r["color"]).color),r["background-color"]&&(t.highlight=b(r["background-color"]).color),r["text-decoration-line"]&&(-1!==r["text-decoration-line"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==r["text-decoration-line"].indexOf("line-through")&&(t.strike="sngStrike")),r["text-decoration"]&&(-1!==r["text-decoration"].indexOf("underline")&&(t.underline={color:t.color||"#000000",style:"sng"}),-1!==r["text-decoration"].indexOf("line-through")&&(t.strike="sngStrike")),r["vertical-align"]&&("super"===r["vertical-align"]&&(t.superscript=!0),"sub"===r["vertical-align"]&&(t.subscript=!0)),r["text-align"]&&(t.align=r["text-align"]),r["font-weight"]&&(t.bold="bold"===r["font-weight"]),r["font-style"]&&(t.italic="italic"===r["font-style"]),r["font-family"]&&(t.fontFace=r["font-family"]),r["href"]&&(t.hyperlink={url:r["href"]}),l&&"ol"===r["list-type"]&&(t.bullet={type:"number",indent:20*$t},t.paraSpaceBefore=.1,l=!1),l&&"ul"===r["list-type"]&&(t.bullet={indent:20*$t},t.paraSpaceBefore=.1,l=!1),c&&(t.indentLevel=c,c=0),n.push({text:e,options:t})}else"children"in a&&o(a.children,r)}};return o(t),n},m=(e,t={x:1,y:1})=>e.map(e=>{if(void 0!==e.close)return{close:!0};if("M"===e.type)return{x:e.x/Ft*t.x,y:e.y/Ft*t.y,moveTo:!0};if(e.curve){if("cubic"===e.curve.type)return{x:e.x/Ft*t.x,y:e.y/Ft*t.y,curve:{type:"cubic",x1:e.curve.x1/Ft*t.x,y1:e.curve.y1/Ft*t.y,x2:e.curve.x2/Ft*t.x,y2:e.curve.y2/Ft*t.y}};if("quadratic"===e.curve.type)return{x:e.x/Ft*t.x,y:e.y/Ft*t.y,curve:{type:"quadratic",x1:e.curve.x1/Ft*t.x,y1:e.curve.y1/Ft*t.y}}}return{x:e.x/Ft*t.x,y:e.y/Ft*t.y}}),p=e=>{const t=b(e.color),{h:l,v:c}=e;let n=4,o=45;return 0===l&&0===c?(n=4,o=45):0===l?c>0?(n=c,o=90):(n=-c,o=270):0===c?l>0?(n=l,o=1):(n=-l,o=180):l>0&&c>0?(n=Math.max(l,c),o=45):l>0&&c<0?(n=Math.max(l,-c),o=315):l<0&&c>0?(n=Math.max(-l,c),o=135):l<0&&c<0&&(n=Math.max(-l,-c),o=225),{type:"outer",color:t.color.replace("#",""),opacity:t.alpha,blur:e.blur*$t,offset:n,angle:o}},f=e=>{const t=b((null===e||void 0===e?void 0:e.color)||"#000000");return{color:t.color,transparency:100*(1-t.alpha),width:(e.width||1)*$t,dashType:"solid"===e.style?"solid":"dash"}},j=e=>{const{type:l,target:c}=e;if("web"===l)return{url:c};if("slide"===l){const e=t.value.findIndex(e=>e.id===c);if(-1!==e)return{slide:e+1}}return null},v=(e,t)=>{r.value=!0;const n=new nt["a"];if(.625===c.value?n.layout="LAYOUT_16x10":.75===c.value?n.layout="LAYOUT_4x3":.70710678===c.value?(n.defineLayout({name:"A3",width:10,height:7.0710678}),n.layout="A3"):n.layout="LAYOUT_16x9",t){const{color:e,alpha:t}=b(l.value.backgroundColor);n.defineSlideMaster({title:"PPTIST_MASTER",background:{color:e,transparency:100*(1-t)}})}for(const l of e){const e=n.addSlide();if(l.background){const t=l.background;if("image"===t.type&&t.image)e.background={data:t.image};else if("solid"===t.type&&t.color){const l=b(t.color);e.background={color:l.color,transparency:100*(1-l.alpha)}}else if("gradient"===t.type&&t.gradientColor){const[l,c]=t.gradientColor,n=I.a.mix(l,c).toHexString(),o=b(n);e.background={color:o.color,transparency:100*(1-o.alpha)}}}if(l.remark&&e.addNotes(l.remark),l.elements)for(const t of l.elements)if("text"===t.type){var o;const l=O(t.content),c={x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft,fontSize:20*$t,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:10*$t,paraSpaceBefore:5*$t,lineSpacingMultiple:1.2,autoFit:!0};if(t.rotate&&(c.rotate=t.rotate),t.wordSpace&&(c.charSpacing=t.wordSpace*$t),t.lineHeight&&(c.lineSpacingMultiple=t.lineHeight/1.25),t.fill){const e=b(t.fill),l=void 0===t.opacity?1:t.opacity;c.fill={color:e.color,transparency:100*(1-e.alpha*l)}}t.defaultColor&&(c.color=b(t.defaultColor).color),t.defaultFontName&&(c.fontFace=t.defaultFontName),t.shadow&&(c.shadow=p(t.shadow)),null!==(o=t.outline)&&void 0!==o&&o.width&&(c.line=f(t.outline)),void 0!==t.opacity&&(c.transparency=100*(1-t.opacity)),void 0!==t.paragraphSpace&&(c.paraSpaceBefore=t.paragraphSpace*$t),t.vertical&&(c.vert="eaVert"),e.addText(l,c)}else if("image"===t.type){var a,i;const l={path:t.src,x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft};if(t.flipH&&(l.flipH=t.flipH),t.flipV&&(l.flipV=t.flipV),t.rotate&&(l.rotate=t.rotate),t.link){const e=j(t.link);e&&(l.hyperlink=e)}if(null!==(a=t.filters)&&void 0!==a&&a.opacity&&(l.transparency=100-parseInt(null===(i=t.filters)||void 0===i?void 0:i.opacity)),t.clip){"ellipse"===t.clip.shape&&(l.rounding=!0);const[e,c]=t.clip.range,[n,o]=e,[a,r]=c,i=t.width/((a-n)/Ft),s=t.height/((r-o)/Ft);l.w=i/Ft,l.h=s/Ft,l.sizing={type:"crop",x:n/Ft*i/Ft,y:o/Ft*s/Ft,w:(a-n)/Ft*i/Ft,h:(r-o)/Ft*s/Ft}}e.addImage(l)}else if("shape"===t.type){if(t.special){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),c=At(l),n={data:c,x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft};if(t.rotate&&(n.rotate=t.rotate),t.link){const e=j(t.link);e&&(n.hyperlink=e)}e.addImage(n)}else{var s;const l={x:t.width/t.viewBox[0],y:t.height/t.viewBox[1]},c=m(_t(t.path),l),n=b(t.fill),o=void 0===t.opacity?1:t.opacity,a={x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft,fill:{color:n.color,transparency:100*(1-n.alpha*o)},points:c};if(t.flipH&&(a.flipH=t.flipH),t.flipV&&(a.flipV=t.flipV),t.shadow&&(a.shadow=p(t.shadow)),null!==(s=t.outline)&&void 0!==s&&s.width&&(a.line=f(t.outline)),t.link){const e=j(t.link);e&&(a.hyperlink=e)}e.addShape("custGeom",a)}if(t.text){const l=O(t.text.content),c={x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft,fontSize:20*$t,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5*$t,valign:t.text.align};t.rotate&&(c.rotate=t.rotate),t.text.defaultColor&&(c.color=b(t.text.defaultColor).color),t.text.defaultFontName&&(c.fontFace=t.text.defaultFontName),e.addText(l,c)}}else if("line"===t.type){const l=Ce(t),c=m(_t(l)),{minX:n,maxX:o,minY:a,maxY:r}=ve(t),i=b(t.color),s={x:t.left/Ft,y:t.top/Ft,w:(o-n)/Ft,h:(r-a)/Ft,line:{color:i.color,transparency:100*(1-i.alpha),width:t.width*$t,dashType:"solid"===t.style?"solid":"dash",beginArrowType:t.points[0]?"arrow":"none",endArrowType:t.points[1]?"arrow":"none"},points:c};t.shadow&&(s.shadow=p(t.shadow)),e.addShape("custGeom",s)}else if("chart"===t.type){const l=[];for(let e=0;e<t.data.series.length;e++){const c=t.data.series[e];l.push({name:"系列"+(e+1),labels:t.data.labels,values:c})}let c=[];if(10===t.themeColor.length)c=t.themeColor.map(e=>b(e).color);else if(1===t.themeColor.length)c=I()(t.themeColor[0]).analogous(10).map(e=>b(e.toHexString()).color);else{const e=t.themeColor.length,l=I()(t.themeColor[e-1]).analogous(11-e).map(e=>e.toHexString());c=[...t.themeColor.slice(0,e-1),...l].map(e=>b(e).color)}const o={x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft,chartColors:"pie"===t.chartType?c:c.slice(0,t.data.series.length)};t.fill&&(o.plotArea={fill:{color:b(t.fill).color}}),t.legend&&(o.showLegend=!0,o.legendPos="top"===t.legend?"t":"b",o.legendColor=b(t.gridColor||"#000000").color,o.legendFontSize=14*$t);let a=n.ChartType.bar;var d;if("bar"===t.chartType)a=n.ChartType.bar,o.barDir=null!==(d=t.options)&&void 0!==d&&d.horizontalBars?"bar":"col";else if("line"===t.chartType){var u,v,h;null!==(u=t.options)&&void 0!==u&&u.showArea?a=n.ChartType.area:!1===(null===(v=t.options)||void 0===v?void 0:v.showLine)?(a=n.ChartType.scatter,l.unshift({name:"X-Axis",values:Array(t.data.series[0].length).fill(0).map((e,t)=>t)}),o.lineSize=0):a=n.ChartType.line,null!==(h=t.options)&&void 0!==h&&h.lineSmooth&&(o.lineSmooth=!0)}else if("pie"===t.chartType){var y;null!==(y=t.options)&&void 0!==y&&y.donut?(a=n.ChartType.doughnut,o.holeSize=75):a=n.ChartType.pie}e.addChart(a,l,o)}else if("table"===t.type){const l=[];for(let e=0;e<t.data.length;e++){const c=t.data[e];for(let t=0;t<c.length;t++){const n=c[t];if(n.colspan>1||n.rowspan>1)for(let c=e;c<e+n.rowspan;c++)for(let o=c===e?t+1:t;o<t+n.colspan;o++)l.push(`${c}_${o}`)}}const c=[],n=t.theme;let o=null,a=[];n&&(o=b(n.color),a=ke(n.color).map(e=>b(e)));for(let e=0;e<t.data.length;e++){const r=t.data[e],i=[];for(let c=0;c<r.length;c++){var g,x,k,C,N,E,w,V,S;const s=r[c],d={colspan:s.colspan,rowspan:s.rowspan,bold:(null===(g=s.style)||void 0===g?void 0:g.bold)||!1,italic:(null===(x=s.style)||void 0===x?void 0:x.em)||!1,underline:{style:null!==(k=s.style)&&void 0!==k&&k.underline?"sng":"none"},align:(null===(C=s.style)||void 0===C?void 0:C.align)||"left",valign:"middle",fontFace:(null===(N=s.style)||void 0===N?void 0:N.fontname)||"微软雅黑",fontSize:(null!==(E=s.style)&&void 0!==E&&E.fontsize?parseInt(null===(w=s.style)||void 0===w?void 0:w.fontsize):14)*$t};if(n&&o){let l;l=e%2===0?a[1]:a[0],(n.rowHeader&&0===e||n.rowFooter&&e===t.data.length-1||n.colHeader&&0===c||n.colFooter&&c===r.length-1)&&(l=o),d.fill={color:l.color,transparency:100*(1-l.alpha)}}if(null!==(V=s.style)&&void 0!==V&&V.backcolor){const e=b(s.style.backcolor);d.fill={color:e.color,transparency:100*(1-e.alpha)}}null!==(S=s.style)&&void 0!==S&&S.color&&(d.color=b(s.style.color).color),l.includes(`${e}_${c}`)||i.push({text:s.text,options:d})}i.length&&c.push(i)}const r={x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft,colW:t.colWidths.map(e=>t.width*e/Ft)};t.theme&&(r.fill={color:"#ffffff"}),t.outline.width&&t.outline.color&&(r.border={type:"solid"===t.outline.style?"solid":"dash",pt:t.outline.width*$t,color:b(t.outline.color).color}),e.addTable(c,r)}else if("latex"===t.type){const l=document.querySelector(`.thumbnail-list .base-element-${t.id} svg`),c=At(l),n={data:c,x:t.left/Ft,y:t.top/Ft,w:t.width/Ft,h:t.height/Ft};if(t.link){const e=j(t.link);e&&(n.hyperlink=e)}e.addImage(n)}}setTimeout(()=>{n.writeFile({fileName:"pptist.pptx"}).then(()=>r.value=!1).catch(()=>{r.value=!1,ne["a"].error("导出失败")})},200)};return{exporting:r,exportImage:i,exportJSON:u,importSpecificFile:d,exportSpecificFile:s,exportPPTX:v}};const Pt={class:"hotkey-doc"},Ht={class:"title"},qt={class:"label"},Ut={class:"value"};var Gt=Object(n["defineComponent"])({__name:"HotkeyDoc",setup(e){return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Pt,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(ce),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:e.type},[Object(n["createElementVNode"])("div",Ht,Object(n["toDisplayString"])(e.type),1),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.children,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"hotkey-item",key:e.label},[Object(n["createElementVNode"])("div",qt,Object(n["toDisplayString"])(e.label),1),Object(n["createElementVNode"])("div",Ut,Object(n["toDisplayString"])(e.value),1)]))),128))],64))),128))]))}}),Xt=(l("28eb"),l("d959")),Yt=l.n(Xt);const Zt=Yt()(Gt,[["__scopeId","data-v-4b1afc5f"]]);var Wt=Zt;const Jt=["accept"];var Kt=Object(n["defineComponent"])({__name:"FileInput",props:{accept:{type:String,default:"image/*"}},emits:["change"],setup(e,{emit:t}){const l=Object(n["ref"])(),c=()=>{l.value&&(l.value.value="",l.value.click())},o=e=>{const l=e.target.files;l&&t("change",l)};return(t,a)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"file-input",onClick:a[1]||(a[1]=e=>c())},[Object(n["renderSlot"])(t.$slots,"default"),Object(n["createElementVNode"])("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:l,accept:e.accept,onChange:a[0]||(a[0]=e=>o(e))},null,40,Jt)]))}});l("6237");const Qt=Yt()(Kt,[["__scopeId","data-v-cdb026e2"]]);var el=Qt;const tl=e=>(Object(n["pushScopeId"])("data-v-76222f8e"),e=e(),Object(n["popScopeId"])(),e),ll={class:"editor-header"},cl={class:"left"},nl={class:"menu-item"},ol=tl(()=>Object(n["createElementVNode"])("span",{class:"text"},"文件",-1)),al={class:"menu-item"},rl=tl(()=>Object(n["createElementVNode"])("span",{class:"text"},"编辑",-1)),il={class:"menu-item"},sl=tl(()=>Object(n["createElementVNode"])("span",{class:"text"},"演示",-1)),dl={class:"menu-item"},ul=tl(()=>Object(n["createElementVNode"])("span",{class:"text"},"帮助",-1)),bl={class:"right"},Ol={href:"https://github.com/pipipi-pikachu/PPTist",target:"_blank"},ml={class:"menu-item"};var pl=Object(n["defineComponent"])({__name:"index",setup(e){const t=lt["a"].Item,l=z(),{gridLineSize:c,showRuler:a,showSelectPanel:r}=Object(o["c"])(l),{enterScreening:i,enterScreeningFromStart:s}=Ze(),{createSlide:d,deleteSlide:u,resetSlides:b}=Ae(),{redo:O,undo:m}=Te(),{importSpecificFile:p}=Rt(),f=l.setDialogForExport,j=()=>{l.setGridLineSize(c.value?0:50)},v=()=>{l.setRulerState(!a.value)},h=()=>{r.value?l.setSelectPanelState(!1):l.setSelectPanelState(!0)},y=Object(n["ref"])(!1),g=e=>window.open(e);return(e,l)=>{const o=Object(n["resolveComponent"])("IconFolderClose"),x=Object(n["resolveComponent"])("IconEdit"),k=Object(n["resolveComponent"])("IconPpt"),C=Object(n["resolveComponent"])("IconHelpcenter"),N=Object(n["resolveComponent"])("IconShare"),E=Object(n["resolveComponent"])("IconGithub");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ll,[Object(n["createElementVNode"])("div",cl,[Object(n["createVNode"])(Object(n["unref"])(tt["a"]),{trigger:["click"]},{overlay:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(lt["a"]),null,{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(el,{accept:".pptist",onChange:l[0]||(l[0]=e=>Object(n["unref"])(p)(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),null,{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("导入 pptist 文件")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[1]||(l[1]=e=>Object(n["unref"])(f)("pptx"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("导出文件")]),_:1})]),_:1})]),default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",nl,[Object(n["createVNode"])(o),Object(n["createTextVNode"])(),ol])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(tt["a"]),{trigger:["click"]},{overlay:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(lt["a"]),null,{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[2]||(l[2]=e=>Object(n["unref"])(m)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("撤销")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[3]||(l[3]=e=>Object(n["unref"])(O)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("重做")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[4]||(l[4]=e=>Object(n["unref"])(d)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("添加页面")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[5]||(l[5]=e=>Object(n["unref"])(u)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("删除页面")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[6]||(l[6]=e=>j())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(Object(n["unref"])(c)?"关闭网格线":"打开网格线"),1)]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[7]||(l[7]=e=>v())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(Object(n["unref"])(a)?"关闭标尺":"打开标尺"),1)]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[8]||(l[8]=e=>Object(n["unref"])(b)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("重置幻灯片")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[9]||(l[9]=e=>h())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(Object(n["unref"])(r)?"关闭选择面板":"打开选择面板"),1)]),_:1})]),_:1})]),default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",al,[Object(n["createVNode"])(x),Object(n["createTextVNode"])(),rl])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(tt["a"]),{trigger:["click"]},{overlay:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(lt["a"]),null,{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[10]||(l[10]=e=>Object(n["unref"])(s)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("从头开始")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[11]||(l[11]=e=>Object(n["unref"])(i)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("从当前页开始")]),_:1})]),_:1})]),default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",il,[Object(n["createVNode"])(k),Object(n["createTextVNode"])(),sl])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(tt["a"]),{trigger:["click"]},{overlay:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(lt["a"]),null,{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[12]||(l[12]=e=>g("https://github.com/pipipi-pikachu/PPTist/issues"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("意见反馈")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[13]||(l[13]=e=>g("https://github.com/pipipi-pikachu/PPTist/blob/master/doc/Q&A.md"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("常见问题")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{onClick:l[14]||(l[14]=e=>y.value=!0)},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("快捷键")]),_:1})]),_:1})]),default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",dl,[Object(n["createVNode"])(C),Object(n["createTextVNode"])(),ul])]),_:1})]),Object(n["createElementVNode"])("div",bl,[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,title:"导出"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:"menu-item",onClick:l[15]||(l[15]=e=>Object(n["unref"])(f)("pptx"))},[Object(n["createVNode"])(N,{size:"18",fill:"#666"})])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,title:"幻灯片放映"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:"menu-item",onClick:l[16]||(l[16]=e=>Object(n["unref"])(i)())},[Object(n["createVNode"])(k,{size:"19",fill:"#666",style:{"margin-top":"1px"}})])]),_:1}),Object(n["createElementVNode"])("a",Ol,[Object(n["createElementVNode"])("div",ml,[Object(n["createVNode"])(E,{size:"18",fill:"#666"})])])]),Object(n["createVNode"])(Object(n["unref"])(Qe["a"]),{width:"320",placement:"right",closable:!1,visible:y.value,onClose:l[17]||(l[17]=e=>y.value=!1)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Wt)]),_:1},8,["visible"])])}}});l("b7d2");const fl=Yt()(pl,[["__scopeId","data-v-76222f8e"]]);var jl=fl;const vl=Symbol(),hl=Symbol(),yl=()=>{const e=window.getSelection();e&&e.removeAllRanges()};var gl=e=>{const t=Object(n["ref"])(0),l=Object(n["ref"])(0),c=z(),{canvasPercentage:a,canvasDragged:r}=Object(o["c"])(c),{viewportRatio:i}=Object(o["c"])(T()),s=()=>{if(!e.value)return;const n=e.value.clientWidth,o=e.value.clientHeight;if(o/n>i.value){const e=n*(a.value/100);c.setCanvasScale(e/Ve),t.value=(n-e)/2,l.value=(o-e*i.value)/2}else{const e=o*(a.value/100);c.setCanvasScale(e/(Ve*i.value)),t.value=(n-e/i.value)/2,l.value=(o-e)/2}},d=(n,o)=>{if(!e.value)return;const a=e.value.clientWidth,r=e.value.clientHeight,s=a*(n/100),d=a*(o/100),u=r*(n/100),b=r*(o/100);r/a>i.value?c.setCanvasScale(s/Ve):c.setCanvasScale(u/(Ve*i.value)),t.value=t.value-(s-d)/2,l.value=l.value-(u-b)/2};Object(n["watch"])(a,d),Object(n["watch"])(i,s),Object(n["watch"])(r,()=>{r.value||s()});const u=Object(n["computed"])(()=>({width:Ve,height:Ve*i.value,left:t.value,top:l.value})),b=new ResizeObserver(s);Object(n["onMounted"])(()=>{e.value&&b.observe(e.value)}),Object(n["onUnmounted"])(()=>{e.value&&b.unobserve(e.value)});const O=e=>{let n=!0;const o=e.pageX,a=e.pageY,r=t.value,i=l.value;document.onmousemove=e=>{if(!n)return;const c=e.pageX,s=e.pageY;t.value=r+(c-o),l.value=i+(s-a)},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,c.setCanvasDragged(!0)}};return{viewportStyles:u,dragViewport:O}},xl=(e,t)=>{const l=z(),{canvasScale:c,hiddenElementIdList:a}=Object(o["c"])(l),r=Object(n["ref"])(!1),i=Object(n["ref"])(1),s=Object(n["ref"])({top:0,left:0,width:0,height:0}),d=n=>{if(!t.value)return;let o=!0;const d=t.value.getBoundingClientRect(),u=5,b=n.pageX,O=n.pageY,m=(b-d.x)/c.value,p=(O-d.y)/c.value;s.value={top:p,left:m,width:0,height:0},r.value=!1,i.value=4,document.onmousemove=e=>{if(!o)return;const t=e.pageX,l=e.pageY,n=(t-b)/c.value,a=(l-O)/c.value,d=Math.abs(n),m=Math.abs(a);if(d<u||m<u)return;let p=0;n>0&&a>0?p=4:n<0&&a<0?p=1:n>0&&a<0?p=2:n<0&&a>0&&(p=3),s.value={...s.value,width:d,height:m},r.value=!0,i.value=p},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null,o=!1;let t=[];for(let l=0;l<e.value.length;l++){const c=e.value[l],n=s.value.left,o=s.value.top,r=s.value.width,d=s.value.height,{minX:u,maxX:b,minY:O,maxY:m}=ve(c);let p=!1;4===i.value?p=u>n&&b<n+r&&O>o&&m<o+d:1===i.value?p=u>n-r&&b<n-r+r&&O>o-d&&m<o-d+d:2===i.value?p=u>n&&b<n+r&&O>o-d&&m<o-d+d:3===i.value&&(p=u>n-r&&b<n-r+r&&O>o&&m<o+d),!p||c.lock||a.value.includes(c.id)||t.push(c)}t=t.filter(l=>{if(l.groupId){const c=t.map(e=>e.id),n=e.value.filter(e=>e.groupId===l.groupId);return n.every(e=>c.includes(e.id))}return!0});const c=t.map(e=>e.id);l.setActiveElementIdList(c),r.value=!1}};return{mouseSelection:s,mouseSelectionVisible:r,mouseSelectionQuadrant:i,updateMouseSelection:d}},kl=e=>{const{disableHotkeys:t}=Object(o["c"])(z()),{createImageElement:l,createTextElement:c}=Me(),a=e=>{if(!e.dataTransfer||0===e.dataTransfer.items.length)return;const n=e.dataTransfer.items[0];if("file"===n.kind&&-1!==n.type.indexOf("image")){const e=n.getAsFile();e&&we(e).then(e=>l(e))}else"string"===n.kind&&"text/plain"===n.type&&n.getAsString(e=>{if(t.value)return;const l=Ne(e);c({left:0,top:0,width:600,height:50},{content:l})})};Object(n["onMounted"])(()=>{e.value&&e.value.addEventListener("drop",a),document.ondragleave=e=>e.preventDefault(),document.ondrop=e=>e.preventDefault(),document.ondragenter=e=>e.preventDefault(),document.ondragover=e=>e.preventDefault()}),Object(n["onUnmounted"])(()=>{e.value&&e.value.removeEventListener("drop",a),document.ondragleave=null,document.ondrop=null,document.ondragenter=null,document.ondragover=null})};const Cl=(e,t)=>{const l=Math.atan2(e,t),c=180/Math.PI*l;return c};var Nl=(e,t)=>{const l=T(),{canvasScale:c}=Object(o["c"])(z()),{addHistorySnapshot:n}=Te(),a=o=>{let a=!0,r=0;const i=o.rotate||0,s=o.left,d=o.top,u=o.width,b=o.height,O=s+u/2,m=d+b/2;if(!t.value)return;const p=t.value.getBoundingClientRect();document.onmousemove=t=>{if(!a)return;const l=(t.pageX-p.left)/c.value,n=(t.pageY-p.top)/c.value,i=l-O,s=m-n;r=Cl(i,s);const d=5;Math.abs(r)<=d?r=0:r>0&&Math.abs(r-45)<=d?r-=r-45:r<0&&Math.abs(r+45)<=d?r-=r+45:r>0&&Math.abs(r-90)<=d?r-=r-90:r<0&&Math.abs(r+90)<=d?r-=r+90:r>0&&Math.abs(r-135)<=d?r-=r-135:r<0&&Math.abs(r+135)<=d?r-=r+135:r>0&&Math.abs(r-180)<=d?r-=r-180:r<0&&Math.abs(r+180)<=d&&(r-=r+180),e.value=e.value.map(e=>o.id===e.id?{...e,rotate:r}:e)},document.onmouseup=()=>{a=!1,document.onmousemove=null,document.onmouseup=null,i!==r&&(l.updateSlide({elements:e.value}),n())}};return{rotateElement:a}};const El={text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},wl={text:20,image:20,shape:15,chart:200,table:20,video:250,audio:20,latex:20},Vl=(e,t)=>{const{left:l,top:c,width:n,height:o}=e,a=Math.sqrt(Math.pow(n,2)+Math.pow(o,2))/2,r=180*Math.atan(o/n)/Math.PI,i=(180-t-r)*Math.PI/180,s=(r-t)*Math.PI/180,d=(90-t)*Math.PI/180,u=t*Math.PI/180,b=n/2,O=o/2,m=l+b,p=c+O,f={left:m+a*Math.cos(i),top:p-a*Math.sin(i)},j={left:m+O*Math.cos(d),top:p-O*Math.sin(d)},v={left:m+a*Math.cos(s),top:p-a*Math.sin(s)},h={left:m+b*Math.cos(u),top:p+b*Math.sin(u)},y={left:m-a*Math.cos(i),top:p+a*Math.sin(i)},g={left:m-O*Math.sin(u),top:p+O*Math.cos(u)},x={left:m-a*Math.cos(s),top:p+a*Math.sin(s)},k={left:m-b*Math.cos(u),top:p-b*Math.sin(u)};return{leftTopPoint:f,topPoint:j,rightTopPoint:v,rightPoint:h,rightBottomPoint:y,bottomPoint:g,leftBottomPoint:x,leftPoint:k}},Il=(e,t)=>{const l={[Q.RIGHT_BOTTOM]:t.leftTopPoint,[Q.LEFT_BOTTOM]:t.rightTopPoint,[Q.LEFT_TOP]:t.rightBottomPoint,[Q.RIGHT_TOP]:t.leftBottomPoint,[Q.TOP]:t.bottomPoint,[Q.BOTTOM]:t.topPoint,[Q.LEFT]:t.rightPoint,[Q.RIGHT]:t.leftPoint};return l[e]};var Sl,Ll,Bl=(e,t,l)=>{const c=z(),n=T(),{activeElementIdList:a,activeGroupElementId:r}=Object(o["c"])(c),{viewportRatio:i}=Object(o["c"])(n),{ctrlOrShiftKeyActive:s}=Object(o["c"])(G()),{addHistorySnapshot:d}=Te(),u=(o,u,b)=>{const O=!(o instanceof MouseEvent);if(O&&(!o.changedTouches||!o.changedTouches[0]))return;let m=!0;c.setScalingState(!0);const p=u.left,f=u.top,j=u.width,v=u.height,h="table"===u.type?u.cellMinHeight:0,y="rotate"in u&&u.rotate?u.rotate:0,g=Math.PI*y/180,x=s.value||"fixedRatio"in u&&u.fixedRatio,k=j/v,C=O?o.changedTouches[0].pageX:o.pageX,N=O?o.changedTouches[0].pageY:o.pageY,E=wl[u.type]||20,w=e=>e<E?E:e;let V,I=0,S=0,L=[],B=[];if("rotate"in u&&u.rotate){const{left:e,top:t,width:l,height:c}=u;V=Vl({left:e,top:t,width:l,height:c},y);const n=Il(b,V);I=n.left,S=n.top}else{const t=Ve,l=Ve*i.value,c=u.id===r.value;for(const r of e.value){if("rotate"in r&&r.rotate)continue;if("line"===r.type)continue;if(c&&r.id===u.id)continue;if(!c&&a.value.includes(r.id))continue;const e=r.left,t=r.top,l=r.width,n=r.height,o=e+l,i=t+n,s={value:t,range:[e,o]},d={value:i,range:[e,o]},b={value:e,range:[t,i]},O={value:o,range:[t,i]};L.push(s,d),B.push(b,O)}const n={value:0,range:[0,t]},o={value:l,range:[0,t]},s={value:l/2,range:[0,t]},d={value:0,range:[0,l]},b={value:t,range:[0,l]},O={value:t/2,range:[0,l]};L.push(n,o,s),B.push(d,b,O),L=ye(L),B=ye(B)}const _=(e,l)=>{const c=5,n=[];let o=!1,a=!1;const r={offsetX:0,offsetY:0};if(l||0===l)for(let t=0;t<L.length;t++){const{value:o,range:i}=L[t],s=Math.min(...i,e||0),d=Math.max(...i,e||0);Math.abs(l-o)<c&&!a&&(r.offsetY=l-o,a=!0,n.push({type:"horizontal",axis:{x:s-50,y:o},length:d-s+100}))}if(e||0===e)for(let t=0;t<B.length;t++){const{value:a,range:i}=B[t],s=Math.min(...i,l||0),d=Math.max(...i,l||0);Math.abs(e-a)<c&&!o&&(r.offsetX=e-a,o=!0,n.push({type:"vertical",axis:{x:a,y:s-50},length:d-s+100}))}return t.value=n,r},T=t=>{if(!m)return;const c=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,n=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY,o=c-C,a=n-N;let r=j,i=v,s=p,d=f;if(y){const e=(Math.cos(g)*o+Math.sin(g)*a)/l.value;let t=(Math.cos(g)*a-Math.sin(g)*o)/l.value;x&&(b!==Q.RIGHT_BOTTOM&&b!==Q.LEFT_TOP||(t=e/k),b!==Q.LEFT_BOTTOM&&b!==Q.RIGHT_TOP||(t=-e/k)),b===Q.RIGHT_BOTTOM?(r=w(j+e),i=w(v+t)):b===Q.LEFT_BOTTOM?(r=w(j-e),i=w(v+t),s=p-(r-j)):b===Q.LEFT_TOP?(r=w(j-e),i=w(v-t),s=p-(r-j),d=f-(i-v)):b===Q.RIGHT_TOP?(r=w(j+e),i=w(v-t),d=f-(i-v)):b===Q.TOP?(i=w(v-t),d=f-(i-v)):b===Q.BOTTOM?i=w(v+t):b===Q.LEFT?(r=w(j-e),s=p-(r-j)):b===Q.RIGHT&&(r=w(j+e));const c=Vl({width:r,height:i,left:s,top:d},y),n=Il(b,c),u=n.left,O=n.top,m=u-I,h=O-S;s-=m,d-=h}else{let e=o/l.value,t=a/l.value;if(x&&(b!==Q.RIGHT_BOTTOM&&b!==Q.LEFT_TOP||(t=e/k),b!==Q.LEFT_BOTTOM&&b!==Q.RIGHT_TOP||(t=-e/k)),b===Q.RIGHT_BOTTOM){const{offsetX:l,offsetY:c}=_(p+j+e,f+v+t);e-=l,t-=c,x&&(c?e=t*k:t=e/k),r=w(j+e),i=w(v+t)}else if(b===Q.LEFT_BOTTOM){const{offsetX:l,offsetY:c}=_(p+e,f+v+t);e-=l,t-=c,x&&(c?e=-t*k:t=-e/k),r=w(j-e),i=w(v+t),s=p-(r-j)}else if(b===Q.LEFT_TOP){const{offsetX:l,offsetY:c}=_(p+e,f+t);e-=l,t-=c,x&&(c?e=t*k:t=e/k),r=w(j-e),i=w(v-t),s=p-(r-j),d=f-(i-v)}else if(b===Q.RIGHT_TOP){const{offsetX:l,offsetY:c}=_(p+j+e,f+t);e-=l,t-=c,x&&(c?e=-t*k:t=-e/k),r=w(j+e),i=w(v-t),d=f-(i-v)}else if(b===Q.LEFT){const{offsetX:t}=_(p+e,null);e-=t,r=w(j-e),s=p-(r-j)}else if(b===Q.RIGHT){const{offsetX:t}=_(p+j+e,null);e-=t,r=w(j+e)}else if(b===Q.TOP){const{offsetY:e}=_(null,f+t);t-=e,i=w(v-t),d=f-(i-v)}else if(b===Q.BOTTOM){const{offsetY:e}=_(null,f+v+t);t-=e,i=w(v+t)}}e.value=e.value.map(e=>{if(u.id!==e.id)return e;if("shape"===e.type&&"pathFormula"in e&&e.pathFormula){const t=Le[e.pathFormula];let l="";return l="editable"in t?t.formula(r,i,e.keypoint):t.formula(r,i),{...e,left:s,top:d,width:r,height:i,viewBox:[r,i],path:l}}if("table"===e.type){let t=h+(i-v)/e.data.length;return t=t<36?36:t,t===h?{...e,left:s,width:r}:{...e,left:s,top:d,width:r,height:i,cellMinHeight:t<36?36:t}}return{...e,left:s,top:d,width:r,height:i}})},M=l=>{m=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const o=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,a=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;C===o&&N===a||(n.updateSlide({elements:e.value}),c.setScalingState(!1),d())};O?(document.ontouchmove=T,document.ontouchend=M):(document.onmousemove=T,document.onmouseup=M)},b=(t,c,o)=>{let r=!0;const{minX:i,maxX:u,minY:b,maxY:O}=c,m=u-i,p=O-b,f=m/p,j=t.pageX,v=t.pageY,h=JSON.parse(JSON.stringify(e.value));document.onmousemove=t=>{if(!r)return;const c=t.pageX,n=t.pageY,d=(c-j)/l.value;let y=(n-v)/l.value;s.value&&(o!==Q.RIGHT_BOTTOM&&o!==Q.LEFT_TOP||(y=d/f),o!==Q.LEFT_BOTTOM&&o!==Q.RIGHT_TOP||(y=-d/f));let g=i,x=u,k=b,C=O;o===Q.RIGHT_BOTTOM?(x=u+d,C=O+y):o===Q.LEFT_BOTTOM?(g=i+d,C=O+y):o===Q.LEFT_TOP?(g=i+d,k=b+y):o===Q.RIGHT_TOP?(x=u+d,k=b+y):o===Q.TOP?k=b+y:o===Q.BOTTOM?C=O+y:o===Q.LEFT?g=i+d:o===Q.RIGHT&&(x=u+d);const N=x-g,E=C-k;let w=N/m,V=E/p;w<=0&&(w=0),V<=0&&(V=0),e.value=e.value.map(e=>{if(("image"===e.type||"shape"===e.type)&&a.value.includes(e.id)){const t=h.find(t=>t.id===e.id);return{...e,width:t.width*w,height:t.height*V,left:g+(t.left-i)*w,top:k+(t.top-b)*V}}return e})},document.onmouseup=t=>{r=!1,document.onmousemove=null,document.onmouseup=null,j===t.pageX&&v===t.pageY||(n.updateSlide({elements:e.value}),d())}};return{scaleElement:u,scaleMultiElement:b}},_l=(e,t)=>{const l=z(),{activeElementIdList:c,activeGroupElementId:n,handleElementId:a,editorAreaFocus:r}=Object(o["c"])(l),{ctrlOrShiftKeyActive:i}=Object(o["c"])(G()),s=(o,s,d=!0)=>{if(r.value||l.setEditorareaFocus(!0),c.value.includes(s.id)){if(i.value){let t=[];if(s.groupId){const l=[];e.value.forEach(e=>{e.groupId===s.groupId&&l.push(e.id)}),t=c.value.filter(e=>!l.includes(e))}else t=c.value.filter(e=>e!==s.id);t.length>0&&l.setActiveElementIdList(t)}else if(a.value!==s.id)l.setHandleElementId(s.id);else if(n.value!==s.id){const e=o instanceof MouseEvent?o.pageX:o.changedTouches[0].pageX,t=o instanceof MouseEvent?o.pageY:o.changedTouches[0].pageY;o.target.onmouseup=c=>{const n=c.pageX,o=c.pageY;e===n&&t===o&&(l.setActiveGroupElementId(s.id),c.target.onmouseup=null)}}}else{let t=[];if(t=i.value?[...c.value,s.id]:[s.id],s.groupId){const l=[];e.value.forEach(e=>{e.groupId===s.groupId&&l.push(e.id)}),t=[...t,...l]}l.setActiveElementIdList(Object(S["uniq"])(t)),l.setHandleElementId(s.id)}d&&t(o,s)};return{selectElement:s}},Tl=(e,t,l)=>{const c=T(),{activeElementIdList:n,activeGroupElementId:a}=Object(o["c"])(z()),{shiftKeyState:r}=Object(o["c"])(G()),{viewportRatio:i}=Object(o["c"])(c),{addHistorySnapshot:s}=Te(),d=(o,d)=>{const u=!(o instanceof MouseEvent);if(u&&(!o.changedTouches||!o.changedTouches[0]))return;if(!n.value.includes(d.id))return;let b=!0;const O=Ve,m=Ve*i.value,p=5,f=JSON.parse(JSON.stringify(e.value)),j=f.filter(e=>n.value.includes(e.id)),v=d.left,h=d.top,y=d.width,g="height"in d&&d.height?d.height:0,x="rotate"in d&&d.rotate?d.rotate:0,k=u?o.changedTouches[0].pageX:o.pageX,C=u?o.changedTouches[0].pageY:o.pageY;let N=null;const E=d.id===a.value;let w=[],V=[];for(const t of e.value){if("line"===t.type)continue;if(E&&t.id===d.id)continue;if(!E&&n.value.includes(t.id))continue;let e,l,c,o;if("rotate"in t&&t.rotate){const{xRange:n,yRange:a}=fe({left:t.left,top:t.top,width:t.width,height:t.height,rotate:t.rotate});e=n[0],l=a[0],c=n[1]-n[0],o=a[1]-a[0]}else e=t.left,l=t.top,c=t.width,o=t.height;const a=e+c,r=l+o,i=l+o/2,s=e+c/2,u={value:l,range:[e,a]},b={value:r,range:[e,a]},O={value:i,range:[e,a]},m={value:e,range:[l,r]},p={value:a,range:[l,r]},f={value:s,range:[l,r]};w.push(u,b,O),V.push(m,p,f)}const I={value:0,range:[0,O]},S={value:m,range:[0,O]},L={value:m/2,range:[0,O]},B={value:0,range:[0,m]},_={value:O,range:[0,m]},T={value:O/2,range:[0,m]};w.push(I,S,L),V.push(B,_,T),w=ye(w),V=ye(V);const M=c=>{const o=c instanceof MouseEvent?c.pageX:c.changedTouches[0].pageX,a=c instanceof MouseEvent?c.pageY:c.changedTouches[0].pageY;if(!1!==N&&(N=Math.abs(k-o)<p&&Math.abs(C-a)<p),!b||N)return;let i=(o-k)/l.value,s=(a-C)/l.value;r.value&&(Math.abs(i)>Math.abs(s)&&(s=0),Math.abs(i)<Math.abs(s)&&(i=0));let u,O,m,f,I=v+i,S=h+s;if(1===n.value.length||E)if(x){const{xRange:e,yRange:t}=fe({left:I,top:S,width:y,height:g,rotate:x});u=e[0],O=e[1],m=t[0],f=t[1]}else"line"===d.type?(u=I,O=I+Math.max(d.start[0],d.end[0]),m=S,f=S+Math.max(d.start[1],d.end[1])):(u=I,O=I+y,m=S,f=S+g);else{const e=[],t=[],l=[],c=[];for(let n=0;n<j.length;n++){const o=j[n],a=o.left+i,r=o.top+s,d=o.width,u="height"in o&&o.height?o.height:0,b="rotate"in o&&o.rotate?o.rotate:0;if("rotate"in o&&o.rotate){const{xRange:n,yRange:o}=fe({left:a,top:r,width:d,height:u,rotate:b});e.push(n[0]),t.push(o[0]),l.push(n[1]),c.push(o[1])}else"line"===o.type?(e.push(a),t.push(r),l.push(a+Math.max(o.start[0],o.end[0])),c.push(r+Math.max(o.start[1],o.end[1]))):(e.push(a),t.push(r),l.push(a+d),c.push(r+u))}u=Math.min(...e),O=Math.max(...l),m=Math.min(...t),f=Math.max(...c)}const L=u+(O-u)/2,B=m+(f-m)/2,_=[];let T=!1,M=!1;for(let e=0;e<w.length;e++){const{value:t,range:l}=w[e],c=Math.min(...l,u,O),n=Math.max(...l,u,O);Math.abs(m-t)<p&&!M&&(S-=m-t,M=!0,_.push({type:"horizontal",axis:{x:c-50,y:t},length:n-c+100})),Math.abs(f-t)<p&&!M&&(S-=f-t,M=!0,_.push({type:"horizontal",axis:{x:c-50,y:t},length:n-c+100})),Math.abs(B-t)<p&&!M&&(S-=B-t,M=!0,_.push({type:"horizontal",axis:{x:c-50,y:t},length:n-c+100}))}for(let e=0;e<V.length;e++){const{value:t,range:l}=V[e],c=Math.min(...l,m,f),n=Math.max(...l,m,f);Math.abs(u-t)<p&&!T&&(I-=u-t,T=!0,_.push({type:"vertical",axis:{x:t,y:c-50},length:n-c+100})),Math.abs(O-t)<p&&!T&&(I-=O-t,T=!0,_.push({type:"vertical",axis:{x:t,y:c-50},length:n-c+100})),Math.abs(L-t)<p&&!T&&(I-=L-t,T=!0,_.push({type:"vertical",axis:{x:t,y:c-50},length:n-c+100}))}if(t.value=_,1===n.value.length||E)e.value=e.value.map(e=>e.id===d.id?{...e,left:I,top:S}:e);else{const t=e.value.find(e=>e.id===d.id);if(!t)return;e.value=e.value.map(e=>n.value.includes(e.id)?e.id===d.id?{...e,left:I,top:S}:{...e,left:e.left+(I-t.left),top:e.top+(S-t.top)}:e)}},D=l=>{b=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null,t.value=[];const n=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,o=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY;k===n&&C===o||(c.updateSlide({elements:e.value}),s())};u?(document.ontouchmove=M,document.ontouchend=D):(document.onmousemove=M,document.onmouseup=D)};return{dragElement:d}},Ml=e=>{const t=T(),{canvasScale:l}=Object(o["c"])(z()),{addHistorySnapshot:c}=Te(),n=(n,o,a)=>{let r=!0;const i=8,s=n.pageX,d=n.pageY,u=[];for(let t=0;t<e.value.length;t++){const l=e.value[t];if("line"===l.type||l.rotate)continue;const c=l.left,n=l.top,o=l.width,a=l.height,r=c+o,i=n+a,s=n+a/2,d=c+o/2,b={x:d,y:n},O={x:d,y:i},m={x:c,y:s},p={x:r,y:s},f={x:c,y:n},j={x:r,y:n},v={x:c,y:i},h={x:r,y:i};u.push(b,O,m,p,f,j,v,h)}document.onmousemove=t=>{if(!r)return;const c=t.pageX,n=t.pageY,b=(c-s)/l.value,O=(n-d)/l.value;let m=o.left+o.start[0],p=o.top+o.start[1],f=o.left+o.end[0],j=o.top+o.end[1];const v=o.broken||o.curve||[0,0];let h=o.left+v[0],y=o.top+v[1];const[g,x]=o.cubic||[[0,0],[0,0]];let k=o.left+g[0],C=o.top+g[1],N=o.left+x[0],E=o.top+x[1];if(a===ee.START){m+=b,p+=O,Math.abs(m-f)<i&&(m=f),Math.abs(p-j)<i&&(p=j);for(const e of u){const{x:t,y:l}=e;if(Math.abs(t-m)<i&&Math.abs(l-p)<i){m=t,p=l;break}}}else if(a===ee.END){f+=b,j+=O,Math.abs(m-f)<i&&(f=m),Math.abs(p-j)<i&&(j=p);for(const e of u){const{x:t,y:l}=e;if(Math.abs(t-f)<i&&Math.abs(l-j)<i){f=t,j=l;break}}}else a===ee.C?(h+=b,y+=O,Math.abs(h-m)<i&&(h=m),Math.abs(y-p)<i&&(y=p),Math.abs(h-f)<i&&(h=f),Math.abs(y-j)<i&&(y=j),Math.abs(h-(m+f)/2)<i&&Math.abs(y-(p+j)/2)<i&&(h=(m+f)/2,y=(p+j)/2)):a===ee.C1?(k+=b,C+=O,Math.abs(k-m)<i&&(k=m),Math.abs(C-p)<i&&(C=p),Math.abs(k-f)<i&&(k=f),Math.abs(C-j)<i&&(C=j)):a===ee.C2&&(N+=b,E+=O,Math.abs(N-m)<i&&(N=m),Math.abs(E-p)<i&&(E=p),Math.abs(N-f)<i&&(N=f),Math.abs(E-j)<i&&(E=j));const w=Math.min(m,f),V=Math.min(p,j),I=Math.max(m,f),S=Math.max(p,j),L=[0,0],B=[I-w,S-V];m>f&&(L[0]=I-w,B[0]=0),p>j&&(L[1]=S-V,B[1]=0),e.value=e.value.map(e=>{if(e.id===o.id){const t={...e,left:w,top:V,start:L,end:B};return a===ee.START||a===ee.END?(o.broken&&(t.broken=[(L[0]+B[0])/2,(L[1]+B[1])/2]),o.curve&&(t.curve=[(L[0]+B[0])/2,(L[1]+B[1])/2]),o.cubic&&(t.cubic=[[(L[0]+B[0])/2,(L[1]+B[1])/2],[(L[0]+B[0])/2,(L[1]+B[1])/2]])):a===ee.C?(o.broken&&(t.broken=[h-w,y-V]),o.curve&&(t.curve=[h-w,y-V])):o.cubic&&(t.cubic=[[k-w,C-V],[N-w,E-V]]),t}return e})},document.onmouseup=l=>{r=!1,document.onmousemove=null,document.onmouseup=null;const n=l.pageX,o=l.pageY;s===n&&d===o||(t.updateSlide({elements:e.value}),c())}};return{dragLineElement:n}},Dl=(e,t)=>{const l=T(),{addHistorySnapshot:c}=Te(),n=(n,o)=>{const a=!(n instanceof MouseEvent);if(a&&(!n.changedTouches||!n.changedTouches[0]))return;let r=!0;const i=a?n.changedTouches[0].pageX:n.pageX,s=a?n.changedTouches[0].pageY:n.pageY,d=Le[o.pathFormula];let u=null;if("editable"in d){const e=d.getBaseSize(o.width,o.height),t=e*o.keypoint,[l,c]=d.range,n=d.relative;u={baseSize:e,originPos:t,min:l,max:c,relative:n}}const b=l=>{if(!r)return;const c=l instanceof MouseEvent?l.pageX:l.changedTouches[0].pageX,n=l instanceof MouseEvent?l.pageY:l.changedTouches[0].pageY,a=(c-i)/t.value,b=(n-s)/t.value;e.value=e.value.map(e=>{if(e.id===o.id&&u){const{baseSize:t,originPos:l,min:c,max:n,relative:o}=u,r=e;let i=0;return"left"===o&&(i=(l+a)/t),"right"===o&&(i=(l-a)/t),"center"===o&&(i=(l-2*a)/t),"top"===o&&(i=(l+b)/t),"bottom"===o&&(i=(l-b)/t),i<c&&(i=c),i>n&&(i=n),{...e,keypoint:i,path:d.formula(r.width,r.height,i)}}return e})},O=t=>{r=!1,document.ontouchmove=null,document.ontouchend=null,document.onmousemove=null,document.onmouseup=null;const n=t instanceof MouseEvent?t.pageX:t.changedTouches[0].pageX,o=t instanceof MouseEvent?t.pageY:t.changedTouches[0].pageY;i===n&&s===o||(l.updateSlide({elements:e.value}),c())};a?(document.ontouchmove=b,document.ontouchend=O):(document.onmousemove=b,document.onmouseup=O)};return{moveShapeKeypoint:n}},zl=e=>{const t=z(),{canvasScale:l,creatingElement:c}=Object(o["c"])(t),n=t=>{const{start:c,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[a,r]=c,[i,s]=n,d=Math.min(a,i),u=Math.max(a,i),b=Math.min(r,s),O=Math.max(r,s),m=(d-o.x)/l.value,p=(b-o.y)/l.value,f=(u-d)/l.value,j=(O-b)/l.value;return{left:m,top:p,width:f,height:j}},a=t=>{const{start:c,end:n}=t;if(!e.value)return;const o=e.value.getBoundingClientRect(),[a,r]=c,[i,s]=n,d=Math.min(a,i),u=Math.max(a,i),b=Math.min(r,s),O=Math.max(r,s),m=(d-o.x)/l.value,p=(b-o.y)/l.value,f=(u-d)/l.value,j=(O-b)/l.value,v=[a===d?0:f,r===b?0:j],h=[i===d?0:f,s===b?0:j];return{left:m,top:p,start:v,end:h}},{createTextElement:r,createShapeElement:i,createLineElement:s}=Me(),d=e=>{if(!c.value)return;const l=c.value.type;if("text"===l){const t=n(e);t&&r(t,{vertical:c.value.vertical})}else if("shape"===l){const t=n(e);t&&i(t,c.value.data)}else if("line"===l){const t=a(e);t&&s(t,c.value.data)}t.setCreatingElement(null)};return{insertElementFromCreateSelection:d}},Al=()=>{const e=T(),{activeElementIdList:t,activeElementList:l}=Object(o["c"])(z()),{currentSlide:c,viewportRatio:n}=Object(o["c"])(e),{addHistorySnapshot:a}=Te(),r=o=>{const r=Ve,i=Ve*n.value,{minX:s,maxX:d,minY:u,maxY:b}=he(l.value),O=JSON.parse(JSON.stringify(c.value.elements));for(const e of O)if(t.value.includes(e.id)){if(o===J.CENTER){const t=u+(b-u)/2-i/2,l=s+(d-s)/2-r/2;e.top=e.top-t,e.left=e.left-l}if(o===J.TOP){const t=u-0;e.top=e.top-t}else if(o===J.VERTICAL){const t=u+(b-u)/2-i/2;e.top=e.top-t}else if(o===J.BOTTOM){const t=b-i;e.top=e.top-t}else if(o===J.LEFT){const t=s-0;e.left=e.left-t}else if(o===J.HORIZONTAL){const t=s+(d-s)/2-r/2;e.left=e.left-t}else if(o===J.RIGHT){const t=d-r;e.left=e.left-t}}e.updateSlide({elements:O}),a()};return{alignElementToCanvas:r}},Fl=e=>{const t=Object(n["computed"])(()=>{if(e.value){const{h:t,v:l,blur:c,color:n}=e.value;return`${t}px ${l}px ${c}px ${n}`}return""});return{shadowStyle:t}},$l=(e,t)=>{const l=Object(n["computed"])(()=>{let l="";return e.value&&t.value?l="rotateX(180deg) rotateY(180deg)":t.value?l="rotateX(180deg)":e.value&&(l="rotateY(180deg)"),l});return{flipStyle:l}};(function(e){e["RECT"]="rect",e["ELLIPSE"]="ellipse",e["POLYGON"]="polygon"})(Sl||(Sl={})),function(e){e["RECT"]="rect",e["ROUNDRECT"]="roundRect",e["ELLIPSE"]="ellipse",e["TRIANGLE"]="triangle",e["PENTAGON"]="pentagon",e["RHOMBUS"]="rhombus",e["STAR"]="star"}(Ll||(Ll={}));const Rl={rect:{name:"矩形",type:Sl.RECT,radius:"0",style:""},rect2:{name:"矩形2",type:Sl.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:Sl.POLYGON,style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${.8*e} 0 L ${e} ${.2*t} L ${e} ${t} L ${.2*e} ${t} L 0 ${.8*t} Z`},roundRect:{name:"圆角矩形",type:Sl.RECT,radius:"10px",style:"inset(0 0 0 0 round 10px 10px 10px 10px)"},ellipse:{name:"圆形",type:Sl.ELLIPSE,style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:Sl.POLYGON,style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${.5*e} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:Sl.POLYGON,style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${.5*e} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:Sl.POLYGON,style:"polygon(0% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M 0 0 L 0 ${t} L ${e} ${t} Z`},rhombus:{name:"菱形",type:Sl.POLYGON,style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.5*t} L ${.5*e} ${t} L 0 ${.5*t} Z`},pentagon:{name:"五边形",type:Sl.POLYGON,style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${.5*e} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:Sl.POLYGON,style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${.2*e} 0 L ${.8*e} 0 L ${e} ${.5*t} L ${.8*e} ${t} L ${.2*e} ${t} L 0 ${.5*t} Z`},heptagon:{name:"七边形",type:Sl.POLYGON,style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${.5*e} 0 L ${.9*e} ${.2*t} L ${e} ${.6*t} L ${.75*e} ${t} L ${.25*e} ${t} L 0 ${.6*t} L ${.1*e} ${.2*t} Z`},octagon:{name:"八边形",type:Sl.POLYGON,style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${.3*e} 0 L ${.7*e} 0 L ${e} ${.3*t} L ${e} ${.7*t} L ${.7*e} ${t} L ${.3*e} ${t} L 0 ${.7*t} L 0 ${.3*t} Z`},chevron:{name:"V形",type:Sl.POLYGON,style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} L ${.25*e} ${.5*t} L 0 0 Z`},point:{name:"点",type:Sl.POLYGON,style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${.75*e} 0 L ${e} ${.5*t} L ${.75*e} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:Sl.POLYGON,style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${.2*t} L ${.6*e} ${.2*t} L ${.6*e} 0 L ${e} ${.5*t} L ${.6*e} ${t} L ${.6*e} ${.8*t} L 0 ${.8*t} Z`},parallelogram:{name:"平行四边形",type:Sl.POLYGON,style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${.3*e} 0 L ${e} 0 L ${.7*e} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:Sl.POLYGON,style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${.3*e} ${t} L ${e} ${t} L ${.7*e} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:Sl.POLYGON,style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${.25*e} 0 L ${.75*e} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:Sl.POLYGON,style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${.75*e} ${t} L ${.25*e} ${t} Z`}};var Pl=e=>{const t=Object(n["computed"])(()=>{if(!e.value)return Rl.rect;const t=e.value.shape||Sl.RECT;return Rl[t]}),l=Object(n["computed"])(()=>{if(!e.value)return{top:"0",left:"0",width:"100%",height:"100%"};const[t,l]=e.value.range,c=(l[0]-t[0])/100,n=(l[1]-t[1])/100,o=t[0]/c,a=t[1]/n;return{left:-o+"%",top:-a+"%",width:100/c+"%",height:100/n+"%"}});return{clipShape:t,imgPosition:l}},Hl=e=>{const t=Object(n["computed"])(()=>{if(!e.value)return"";let t="";for(const l of Object.keys(e.value))t+=`${l}(${e.value[l]}) `;return t});return{filter:t}},ql=e=>{const t=Object(n["computed"])(()=>{var t,l;return null!==(t=null===(l=e.value)||void 0===l?void 0:l.width)&&void 0!==t?t:0}),l=Object(n["computed"])(()=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.style)||"solid"}),c=Object(n["computed"])(()=>{var t;return(null===(t=e.value)||void 0===t?void 0:t.color)||"#d14424"});return{outlineWidth:t,outlineStyle:l,outlineColor:c}};const Ul=["width","height"],Gl=["rx","ry","width","height","stroke","stroke-width","stroke-dasharray"];var Xl=Object(n["defineComponent"])({__name:"ImageRectOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},radius:{type:String,default:"0"}},setup(e){const t=e,{outlineWidth:l,outlineStyle:c,outlineColor:o}=ql(Object(n["toRef"])(t,"outline"));return(t,a)=>e.outline?(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{key:0,class:"image-rect-outline",overflow:"visible",width:e.width,height:e.height},[Object(n["createElementVNode"])("rect",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",rx:e.radius,ry:e.radius,width:e.width,height:e.height,stroke:Object(n["unref"])(o),"stroke-width":Object(n["unref"])(l),"stroke-dasharray":"dashed"===Object(n["unref"])(c)?"10 6":"0 0"},null,8,Gl)],8,Ul)):Object(n["createCommentVNode"])("",!0)}});l("fef7");const Yl=Yt()(Xl,[["__scopeId","data-v-b5bace06"]]);var Zl=Yl;const Wl=["width","height"],Jl=["cx","cy","rx","ry","stroke","stroke-width","stroke-dasharray"];var Kl=Object(n["defineComponent"])({__name:"ImageEllipseOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:l,outlineStyle:c,outlineColor:o}=ql(Object(n["toRef"])(t,"outline"));return(t,a)=>e.outline?(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{key:0,class:"image-ellipse-outline",overflow:"visible",width:e.width,height:e.height},[Object(n["createElementVNode"])("ellipse",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",cx:e.width/2,cy:e.height/2,rx:e.width/2,ry:e.height/2,stroke:Object(n["unref"])(o),"stroke-width":Object(n["unref"])(l),"stroke-dasharray":"dashed"===Object(n["unref"])(c)?"10 6":"0 0"},null,8,Jl)],8,Wl)):Object(n["createCommentVNode"])("",!0)}});l("45c15");const Ql=Yt()(Kl,[["__scopeId","data-v-71b17928"]]);var ec=Ql;const tc=["width","height"],lc=["d","stroke","stroke-width","stroke-dasharray"];var cc=Object(n["defineComponent"])({__name:"ImagePolygonOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object},createPath:{type:Function,required:!0}},setup(e){const t=e,{outlineWidth:l,outlineStyle:c,outlineColor:o}=ql(Object(n["toRef"])(t,"outline"));return(t,a)=>e.outline?(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{key:0,class:"image-polygon-outline",overflow:"visible",width:e.width,height:e.height},[Object(n["createElementVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:e.createPath(e.width,e.height),stroke:Object(n["unref"])(o),"stroke-width":Object(n["unref"])(l),"stroke-dasharray":"dashed"===Object(n["unref"])(c)?"10 6":"0 0"},null,8,lc)],8,tc)):Object(n["createCommentVNode"])("",!0)}});l("180d");const nc=Yt()(cc,[["__scopeId","data-v-41071294"]]);var oc=nc;const ac={class:"image-outline"};var rc=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>t.elementInfo.clip),{clipShape:c}=Pl(l);return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ac,["rect"===Object(n["unref"])(c).type?(Object(n["openBlock"])(),Object(n["createBlock"])(Zl,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,radius:Object(n["unref"])(c).radius,outline:e.elementInfo.outline},null,8,["width","height","radius","outline"])):"ellipse"===Object(n["unref"])(c).type?(Object(n["openBlock"])(),Object(n["createBlock"])(ec,{key:1,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"])):"polygon"===Object(n["unref"])(c).type?(Object(n["openBlock"])(),Object(n["createBlock"])(oc,{key:2,width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline,createPath:Object(n["unref"])(c).createPath},null,8,["width","height","outline","createPath"])):Object(n["createCommentVNode"])("",!0)]))}});const ic=rc;var sc=ic;const dc=e=>(Object(n["pushScopeId"])("data-v-3e0199ec"),e=e(),Object(n["popScopeId"])(),e),uc=["src"],bc=["src"],Oc=["onMousedown"],mc=dc(()=>Object(n["createElementVNode"])("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[Object(n["createElementVNode"])("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 16 L 4 16 L 4 4 L 16 4 L 16 0 Z"})],-1)),pc=[mc],fc=["onMousedown"],jc=dc(()=>Object(n["createElementVNode"])("svg",{width:"16",height:"16",fill:"#fff",stroke:"#333"},[Object(n["createElementVNode"])("path",{"stroke-width":"0.3","shape-rendering":"crispEdges",d:"M 16 0 L 0 0 L 0 4 L 16 4 Z"})],-1)),vc=[jc];var hc=Object(n["defineComponent"])({__name:"ImageClipHandler",props:{src:{type:String,required:!0},clipData:{type:Object},clipPath:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},top:{type:Number,required:!0},left:{type:Number,required:!0},rotate:{type:Number,required:!0}},emits:["clip"],setup(e,{emit:t}){const l=e,{canvasScale:c}=Object(o["c"])(z()),{ctrlOrShiftKeyActive:a}=Object(o["c"])(G()),r=Object(n["ref"])({top:"0",left:"0"}),i=Object(n["ref"])(!1),s=Object(n["ref"])(null),d=()=>{const[e,t]=l.clipData?l.clipData.range:[[0,0],[100,100]],c=(t[0]-e[0])/100,n=(t[1]-e[1])/100,o=e[0]/c,a=e[1]/n;return{widthScale:c,heightScale:n,left:o,top:a}},u=Object(n["computed"])(()=>{const{widthScale:e,heightScale:t,left:l,top:c}=d();return{left:-l,top:-c,width:100/e,height:100/t}}),b=Object(n["computed"])(()=>({top:u.value.top+"%",left:u.value.left+"%",width:u.value.width+"%",height:u.value.height+"%"})),O=Object(n["ref"])({top:0,left:0,width:0,height:0}),m=Object(n["computed"])(()=>{const{top:e,left:t,width:l,height:c}=O.value;return{top:e+"%",left:t+"%",width:l+"%",height:c+"%"}}),p=Object(n["computed"])(()=>{const e=u.value.width,t=u.value.height,{top:l,left:c,width:n,height:o}=O.value;return{left:100/n*-c+"%",top:100/o*-l+"%",width:e/n*100+"%",height:t/o*100+"%"}}),f=()=>{const{left:e,top:t}=d();O.value={left:e,top:t,width:100,height:100},r.value={top:-t+"%",left:-e+"%"}},j=()=>{if(i.value)return;if(!s.value)return void t("clip",null);const{left:e,top:c}=d(),n={left:(O.value.left-e)/100*l.width,top:(O.value.top-c)/100*l.height,width:(O.value.width-100)/100*l.width,height:(O.value.height-100)/100*l.height},o={range:s.value,position:n};t("clip",o)},v=e=>{const t=e.key.toUpperCase();t===te.ENTER&&j()};Object(n["onMounted"])(()=>{f(),document.addEventListener("keydown",v)}),Object(n["onUnmounted"])(()=>{document.removeEventListener("keydown",v)});const h=()=>{const e={left:parseInt(p.value.left),top:parseInt(p.value.top),width:parseInt(p.value.width),height:parseInt(p.value.height)},t=100/e.width,l=100/e.height,c=[-e.left*t,-e.top*l],n=[100*t+c[0],100*l+c[1]];s.value=[c,n]},y=e=>{i.value=!0;let t=!0;const n=e.pageX,o=e.pageY,a=u.value,r={...O.value};document.onmousemove=e=>{if(!t)return;const i=e.pageX,s=e.pageY;let d=(i-n)/c.value/l.width*100,u=(s-o)/c.value/l.height*100;l.rotate>45&&l.rotate<135&&(d=(s-o)/c.value/l.width*100,u=-(i-n)/c.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(d=-d,u=-u),l.rotate>-135&&l.rotate<-45&&(d=-(s-o)/c.value/l.width*100,u=(i-n)/c.value/l.height*100);let b=r.left+d,m=r.top+u;b<0?b=0:b+r.width>a.width&&(b=a.width-r.width),m<0?m=0:m+r.height>a.height&&(m=a.height-r.height),O.value={...O.value,left:b,top:m}},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null,h(),setTimeout(()=>{i.value=!1},0)}},g=(e,t)=>{i.value=!0;let n=!0;const o=50/l.width*100,r=50/l.height*100,s=e.pageX,d=e.pageY,b=u.value,m={...O.value},p=O.value.width/O.value.height;document.onmousemove=e=>{if(!n)return;const i=e.pageX,u=e.pageY;let f,j,v,h,y=(i-s)/c.value/l.width*100,g=(u-d)/c.value/l.height*100;l.rotate>45&&l.rotate<135&&(y=(u-d)/c.value/l.width*100,g=-(i-s)/c.value/l.height*100),(l.rotate>=135&&l.rotate<=180||l.rotate>=-180&&l.rotate<=-135)&&(y=-y,g=-g),l.rotate>-135&&l.rotate<-45&&(y=-(u-d)/c.value/l.width*100,g=(i-s)/c.value/l.height*100),a.value&&(t!==Q.RIGHT_BOTTOM&&t!==Q.LEFT_TOP||(g=y/p),t!==Q.LEFT_BOTTOM&&t!==Q.RIGHT_TOP||(g=-y/p)),t===Q.LEFT_TOP?(m.left+y<0&&(y=-m.left),m.top+g<0&&(g=-m.top),m.width-y<o&&(y=m.width-o),m.height-g<r&&(g=m.height-r),v=m.width-y,h=m.height-g,f=m.left+y,j=m.top+g):t===Q.RIGHT_TOP?(m.left+m.width+y>b.width&&(y=b.width-(m.left+m.width)),m.top+g<0&&(g=-m.top),m.width+y<o&&(y=o-m.width),m.height-g<r&&(g=m.height-r),v=m.width+y,h=m.height-g,f=m.left,j=m.top+g):t===Q.LEFT_BOTTOM?(m.left+y<0&&(y=-m.left),m.top+m.height+g>b.height&&(g=b.height-(m.top+m.height)),m.width-y<o&&(y=m.width-o),m.height+g<r&&(g=r-m.height),v=m.width-y,h=m.height+g,f=m.left+y,j=m.top):t===Q.RIGHT_BOTTOM?(m.left+m.width+y>b.width&&(y=b.width-(m.left+m.width)),m.top+m.height+g>b.height&&(g=b.height-(m.top+m.height)),m.width+y<o&&(y=o-m.width),m.height+g<r&&(g=r-m.height),v=m.width+y,h=m.height+g,f=m.left,j=m.top):t===Q.TOP?(m.top+g<0&&(g=-m.top),m.height-g<r&&(g=m.height-r),v=m.width,h=m.height-g,f=m.left,j=m.top+g):t===Q.BOTTOM?(m.top+m.height+g>b.height&&(g=b.height-(m.top+m.height)),m.height+g<r&&(g=r-m.height),v=m.width,h=m.height+g,f=m.left,j=m.top):t===Q.LEFT?(m.left+y<0&&(y=-m.left),m.width-y<o&&(y=m.width-o),v=m.width-y,h=m.height,f=m.left+y,j=m.top):(m.left+m.width+y>b.width&&(y=b.width-(m.left+m.width)),m.width+y<o&&(y=o-m.width),h=m.height,v=m.width+y,f=m.left,j=m.top),O.value={left:f,top:j,width:v,height:h}},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,h(),setTimeout(()=>i.value=!1,0)}},x=Object(n["computed"])(()=>{const e="rotate-",t=l.rotate;return t>-22.5&&t<=22.5?e+0:t>22.5&&t<=67.5?e+45:t>67.5&&t<=112.5?e+90:t>112.5&&t<=157.5?e+135:t>157.5||t<=-157.5?e+0:t>-157.5&&t<=-112.5?e+45:t>-112.5&&t<=-67.5?e+90:t>-67.5&&t<=-22.5?e+135:e+0}),k=[Q.LEFT_TOP,Q.RIGHT_TOP,Q.LEFT_BOTTOM,Q.RIGHT_BOTTOM],C=[Q.TOP,Q.BOTTOM,Q.LEFT,Q.RIGHT];return(t,l)=>{const c=Object(n["resolveDirective"])("click-outside");return Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"image-clip-handler",style:Object(n["normalizeStyle"])(r.value)},[Object(n["createElementVNode"])("img",{class:"bottom-img",src:e.src,draggable:!1,alt:"",style:Object(n["normalizeStyle"])(Object(n["unref"])(b))},null,12,uc),Object(n["createElementVNode"])("div",{class:"top-image-content",style:Object(n["normalizeStyle"])({...Object(n["unref"])(m),clipPath:e.clipPath})},[Object(n["createElementVNode"])("img",{class:"top-img",src:e.src,draggable:!1,alt:"",style:Object(n["normalizeStyle"])(Object(n["unref"])(p))},null,12,bc)],4),Object(n["createElementVNode"])("div",{class:"operate",style:Object(n["normalizeStyle"])(Object(n["unref"])(m)),onMousedown:l[0]||(l[0]=Object(n["withModifiers"])(e=>y(e),["stop"]))},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(k,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["clip-point",e,Object(n["unref"])(x)]),key:e,onMousedown:Object(n["withModifiers"])(t=>g(t,e),["stop"])},pc,42,Oc)),64)),(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(C,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["clip-point",e,Object(n["unref"])(x)]),key:e,onMousedown:Object(n["withModifiers"])(t=>g(t,e),["stop"])},vc,42,fc)),64))],36)],4)),[[c,j]])}}});l("5970");const yc=Yt()(hc,[["__scopeId","data-v-3e0199ec"]]);var gc=yc;const xc=["src"];var kc=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=z(),c=T(),{clipingImageElementId:a}=Object(o["c"])(l),r=Object(n["computed"])(()=>a.value===t.elementInfo.id),{addHistorySnapshot:i}=Te(),s=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:d}=Fl(s),u=Object(n["computed"])(()=>t.elementInfo.flipH),b=Object(n["computed"])(()=>t.elementInfo.flipV),{flipStyle:O}=$l(u,b),m=Object(n["computed"])(()=>t.elementInfo.clip),{clipShape:p,imgPosition:f}=Pl(m),j=Object(n["computed"])(()=>t.elementInfo.filters),{filter:v}=Hl(j),h=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},y=e=>{if(l.setClipingImageElementId(""),!e)return;const{range:n,position:o}=e,a=t.elementInfo.clip||{shape:"rect",range:[[0,0],[100,100]]},r=t.elementInfo.left+o.left,s=t.elementInfo.top+o.top,d=t.elementInfo.width+o.width,u=t.elementInfo.height+o.height;let b=0,O=0;if(t.elementInfo.rotate){const e=r+d/2-(t.elementInfo.left+t.elementInfo.width/2),l=-(s+u/2-(t.elementInfo.top+t.elementInfo.height/2)),c=-t.elementInfo.rotate*Math.PI/180,n=e*Math.cos(c)-l*Math.sin(c),o=e*Math.sin(c)+l*Math.cos(c);b=n-e,O=-(o-l)}const m={clip:{...a,range:n},left:r+b,top:s+O,width:d,height:u};c.updateElement({id:t.elementInfo.id,props:m}),i()};return(t,l)=>{const c=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-image",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["unref"])(r)?(Object(n["openBlock"])(),Object(n["createBlock"])(gc,{key:0,src:e.elementInfo.src,clipData:e.elementInfo.clip,width:e.elementInfo.width,height:e.elementInfo.height,top:e.elementInfo.top,left:e.elementInfo.left,rotate:e.elementInfo.rotate,clipPath:Object(n["unref"])(p).style,onClip:l[0]||(l[0]=e=>y(e))},null,8,["src","clipData","width","height","top","left","rotate","clipPath"])):Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:1,class:"element-content",style:Object(n["normalizeStyle"])({filter:Object(n["unref"])(d)?`drop-shadow(${Object(n["unref"])(d)})`:"",transform:Object(n["unref"])(O)}),onMousedown:l[2]||(l[2]=e=>h(e)),onTouchstart:l[3]||(l[3]=e=>h(e))},[Object(n["createVNode"])(sc,{elementInfo:e.elementInfo},null,8,["elementInfo"]),Object(n["createElementVNode"])("div",{class:"image-content",style:Object(n["normalizeStyle"])({clipPath:Object(n["unref"])(p).style})},[Object(n["createElementVNode"])("img",{src:e.elementInfo.src,draggable:!1,style:Object(n["normalizeStyle"])({top:Object(n["unref"])(f).top,left:Object(n["unref"])(f).left,width:Object(n["unref"])(f).width,height:Object(n["unref"])(f).height,filter:Object(n["unref"])(v)}),onDragstart:l[1]||(l[1]=Object(n["withModifiers"])(()=>{},["prevent"])),alt:""},null,44,xc),e.elementInfo.colorMask?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"color-mask",style:Object(n["normalizeStyle"])({backgroundColor:e.elementInfo.colorMask.color,opacity:e.elementInfo.colorMask.opacity})},null,4)):Object(n["createCommentVNode"])("",!0)],4)],36)),[[c,e.contextmenus]])],4)],6)}}});l("bcf0");const Cc=Yt()(kc,[["__scopeId","data-v-963e3dfc"]]);var Nc=Cc;const Ec=["width","height"],wc=["d","stroke","stroke-width","stroke-dasharray"];var Vc=Object(n["defineComponent"])({__name:"ElementOutline",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},outline:{type:Object}},setup(e){const t=e,{outlineWidth:l,outlineStyle:c,outlineColor:o}=ql(Object(n["toRef"])(t,"outline"));return(t,a)=>e.outline?(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{key:0,class:"element-outline",overflow:"visible",width:e.width,height:e.height},[Object(n["createElementVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:"transparent",d:`M0,0 L${e.width},0 L${e.width},${e.height} L0,${e.height} Z`,stroke:Object(n["unref"])(o),"stroke-width":Object(n["unref"])(l),"stroke-dasharray":"dashed"===Object(n["unref"])(c)?"10 6":"0 0"},null,8,wc)],8,Ec)):Object(n["createCommentVNode"])("",!0)}});l("4731");const Ic=Yt()(Vc,[["__scopeId","data-v-61b7d06a"]]);var Sc=Ic,Lc=l("6ffb"),Bc=l("703f"),_c=l("6f27"),Tc=l("e3da"),Mc=l("f201"),Dc=l("a59f"),zc=l("224d"),Ac=l("838c"),Fc=l("72a8");const $c=e=>{const t={},l=(e,l)=>t[e]=l;return l("Alt-ArrowUp",s["c"]),l("Alt-ArrowDown",s["b"]),l("Ctrl-z",Mc["c"]),l("Ctrl-y",Mc["b"]),l("Backspace",Fc["f"]),l("Escape",s["e"]),l("Ctrl-b",Object(s["f"])(e.marks.strong)),l("Ctrl-i",Object(s["f"])(e.marks.em)),l("Ctrl-u",Object(s["f"])(e.marks.underline)),l("Ctrl-d",Object(s["f"])(e.marks.strikethrough)),l("Enter",Object(Ac["d"])(e.nodes.list_item)),l("Mod-[",Object(Ac["a"])(e.nodes.list_item)),l("Mod-]",Object(Ac["c"])(e.nodes.list_item)),t},Rc=e=>Object(Fc["g"])(/^\s*>\s$/,e),Pc=e=>Object(Fc["g"])(/^(\d+)\.\s$/,e,e=>({order:+e[1]}),(e,t)=>t.childCount+t.attrs.order===+e[1]),Hc=e=>Object(Fc["g"])(/^\s*([-+*])\s$/,e),qc=e=>Object(Fc["e"])(/^```$/,e),Uc=e=>{const t=[...Fc["d"],Fc["a"],Fc["b"]];return t.push(Rc(e.nodes.blockquote)),t.push(Pc(e.nodes.ordered_list)),t.push(Hc(e.nodes.bullet_list)),t.push(qc(e.nodes.code_block)),Object(Fc["c"])({rules:t})},Gc=e=>[Uc(e),Object(Tc["b"])($c(e)),Object(Tc["b"])(s["a"]),Object(Dc["a"])(),Object(zc["a"])(),Object(Mc["a"])()];var Xc=l("f899");const Yc={attrs:{order:{default:1},listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ol",getAttrs:e=>{const t=(e.hasAttribute("start")?e.getAttribute("start"):1)||1,l={order:+t},{listStyleType:c}=e.style;return c&&(l["listStyleType"]=c),l}}],toDOM:e=>{const{order:t,listStyleType:l}=e.attrs;let c="";l&&(c+=`list-style-type: ${l};`);const n={style:c};return 1!==t&&(n["start"]=t),["ol",n,0]}},Zc={attrs:{listStyleType:{default:""}},content:"list_item+",group:"block",parseDOM:[{tag:"ul",getAttrs:e=>{const{listStyleType:t}=e.style;return t?{listStyleType:t}:{}}}],toDOM:e=>{const{listStyleType:t}=e.attrs;let l="";return t&&(l+=`list-style-type: ${t};`),["ul",{style:l},0]}},Wc={...Ac["b"],content:"paragraph block*",group:"block"},Jc={attrs:{align:{default:""},indent:{default:0}},content:"inline*",group:"block",parseDOM:[{tag:"p",getAttrs:e=>{const{textAlign:t}=e.style;let l=e.getAttribute("align")||t||"";l=/(left|right|center|justify)/.test(l)?l:"";const c=+(e.getAttribute("data-indent")||0);return{align:l,indent:c}}}],toDOM:e=>{const{align:t,indent:l}=e.attrs;let c="";t&&"left"!==t&&(c+=`text-align: ${t};`);const n={style:c};return l&&(n["data-indent"]=l),["p",n,0]}},{hard_break:Kc,...Qc}=Xc["b"];var en={...Qc,ordered_list:Yc,bullet_list:Zc,list_item:Wc,paragraph:Jc};const tn={excludes:"subscript",parseDOM:[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],toDOM:()=>["sub",0]},ln={excludes:"superscript",parseDOM:[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],toDOM:()=>["sup",0]},cn={parseDOM:[{tag:"strike"},{style:"text-decoration",getAttrs:e=>"line-through"===e&&null},{style:"text-decoration-line",getAttrs:e=>"line-through"===e&&null}],toDOM:()=>["span",{style:"text-decoration-line: line-through"},0]},nn={parseDOM:[{tag:"u"},{style:"text-decoration",getAttrs:e=>"underline"===e&&null},{style:"text-decoration-line",getAttrs:e=>"underline"===e&&null}],toDOM:()=>["span",{style:"text-decoration: underline"},0]},on={attrs:{color:{}},inline:!0,group:"inline",parseDOM:[{style:"color",getAttrs:e=>e?{color:e}:{}}],toDOM:e=>{const{color:t}=e.attrs;let l="";return t&&(l+=`color: ${t};`),["span",{style:l},0]}},an={attrs:{backcolor:{}},inline:!0,group:"inline",parseDOM:[{style:"background-color",getAttrs:e=>e?{backcolor:e}:{}}],toDOM:e=>{const{backcolor:t}=e.attrs;let l="";return t&&(l+=`background-color: ${t};`),["span",{style:l},0]}},rn={attrs:{fontsize:{}},inline:!0,group:"inline",parseDOM:[{style:"font-size",getAttrs:e=>e?{fontsize:e}:{}}],toDOM:e=>{const{fontsize:t}=e.attrs;let l="";return t&&(l+="font-size: "+t),["span",{style:l},0]}},sn={attrs:{fontname:{}},inline:!0,group:"inline",parseDOM:[{style:"font-family",getAttrs:e=>({fontname:e&&"string"===typeof e?e.replace(/[\"\']/g,""):""})}],toDOM:e=>{const{fontname:t}=e.attrs;let l="";return t&&(l+="font-family: "+t),["span",{style:l},0]}},dn={attrs:{href:{},title:{default:null},target:{default:"_blank"}},inclusive:!1,parseDOM:[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href"),l=e.getAttribute("title");return{href:t,title:l}}}],toDOM:e=>["a",e.attrs,0]};var un={...Xc["a"],fontsize:rn,fontname:sn,forecolor:on,backcolor:an,subscript:tn,superscript:ln,strikethrough:cn,underline:nn,link:dn};const bn=en,On=un,mn=new _c["i"]({nodes:bn,marks:On}),pn=e=>{const t=`<div>${e}</div>`,l=new window.DOMParser,c=l.parseFromString(t,"text/html").body.firstElementChild;return _c["a"].fromSchema(mn).parse(c)},fn=(e,t,l={})=>new Bc["c"](e,{state:Lc["b"].create({doc:pn(t),plugins:Gc(mn)}),...l});var jn,vn=l("1344");(function(e){e["RICH_TEXT_COMMAND"]="RICH_TEXT_COMMAND",e["OPEN_CHART_DATA_EDITOR"]="OPEN_CHART_DATA_EDITOR",e["OPEN_LATEX_EDITOR"]="OPEN_LATEX_EDITOR"})(jn||(jn={}));const hn=Object(vn["a"])();var yn=hn;const gn=(e,t,l)=>{const{selection:c,doc:n}=e;if(!c||!n)return e;const{from:o,to:a}=c,{nodes:r}=t,i=r.blockquote,s=r.list_item,d=r.paragraph,u=[];l=l||"";const b=new Set([i,s,d]);return n.nodesBetween(o,a,(e,t)=>{const c=e.type,n=e.attrs.align||"";return n!==l&&b.has(c)&&u.push({node:e,pos:t,nodeType:c}),!0}),u.length?(u.forEach(t=>{const{node:c,pos:n,nodeType:o}=t;let{attrs:a}=c;a=l?{...a,align:l}:{...a,align:null},e=e.setNodeMarkup(n,o,a,c.marks)}),e):e},xn=(e,t)=>{const{state:l}=e,{schema:c,selection:n}=l,o=gn(l.tr.setSelection(n),c,t);e.dispatch(o)},kn=(e,t)=>e.type===t.nodes.bullet_list||e.type===t.nodes.ordered_list,Cn=(e,t,l)=>(c,n)=>{const{schema:o,selection:a}=c,{$from:r,$to:i}=a,s=r.blockRange(i);if(!s)return!1;const d=p(e=>kn(e,o))(a);if(s.depth>=1&&d&&s.depth-d.depth<=1){if(d.node.type===e&&!l)return Object(Ac["a"])(t)(c,n);if(kn(d.node,o)&&e.validContent(d.node.content)){const{tr:t}=c;if(l){const c={...d.node.attrs,listStyleType:l};t.setNodeMarkup(d.pos,e,c)}else t.setNodeMarkup(d.pos,e);return n&&n(t),!1}}return l?Object(Ac["e"])(e,{listStyleType:l})(c,n):Object(Ac["e"])(e)(c,n)};function Nn(e,t,l){if(!e.doc)return e;const c=e.doc.nodeAt(t);if(!c)return e;const n=0,o=7;let a=(c.attrs.indent||0)+l;if(a<n&&(a=n),a>o&&(a=o),a===c.attrs.indent)return e;const r={...c.attrs,indent:a};return e.setNodeMarkup(t,c.type,r,c.marks)}const En=(e,t,l)=>{const{selection:c,doc:n}=e;if(!c||!n)return e;if(!(c instanceof Lc["g"]||c instanceof Lc["a"]))return e;const{from:o,to:a}=c;return n.nodesBetween(o,a,(c,n)=>{const o=c.type;return"paragraph"===o.name||"blockquote"===o.name?(e=Nn(e,n,l),!1):!kn(c,t)}),e},wn=(e,t)=>{const{state:l}=e,{schema:c,selection:n}=l,o=En(l.tr.setSelection(n),c,t);return!!o.docChanged&&(e.dispatch(o),!0)};var Vn=Object(n["defineComponent"])({__name:"ProsemirrorEditor",props:{elementId:{type:String,required:!0},defaultColor:{type:String,required:!0},defaultFontName:{type:String,required:!0},editable:{type:Boolean,default:!1},value:{type:String,required:!0},autoFocus:{type:Boolean,default:!1}},emits:["update","focus","blur","mousedown"],setup(e,{expose:t,emit:l}){const c=e,a=z(),{handleElementId:r,textFormatPainter:i}=Object(o["c"])(a),O=Object(n["ref"])();let m;const p=Object(S["debounce"])((function(){l("update",m.dom.innerHTML)}),300,{trailing:!0}),f=()=>{a.setDisableHotkeysState(!0),l("focus")},j=()=>{a.setDisableHotkeysState(!1),l("blur")},v=Object(S["debounce"])((function(){const e=C(m,{color:c.defaultColor,fontname:c.defaultFontName});a.setRichtextAttrs(e)}),30,{trailing:!0}),h=()=>{p(),v()},y=Object(n["computed"])(()=>c.value);Object(n["watch"])(y,()=>{if(!m)return;if(m.hasFocus())return;const{doc:e,tr:t}=m.state;m.dispatch(t.replaceRangeWith(0,e.content.size,pn(y.value)))}),Object(n["watch"])(()=>c.editable,()=>{m.setProps({editable:()=>c.editable})});const x=()=>m.focus();t({focus:x});const k=({target:e,action:t})=>{if(!e&&r.value!==c.elementId)return;if(e&&e!==c.elementId)return;const l="command"in t?[t]:t;for(const c of l)if("fontname"===c.command&&c.value){const e=m.state.schema.marks.fontname.create({fontname:c.value});d(m),u(m,e)}else if("fontsize"===c.command&&c.value){const e=m.state.schema.marks.fontsize.create({fontsize:c.value});d(m),u(m,e)}else if("fontsize-add"===c.command){const e=c.value?+c.value:2;d(m);const t=N(m)+e+"px",l=m.state.schema.marks.fontsize.create({fontsize:t});u(m,l)}else if("fontsize-reduce"===c.command){const e=c.value?+c.value:2;d(m);let t=N(m)-e;t<12&&(t=12);const l=m.state.schema.marks.fontsize.create({fontsize:t+"px"});u(m,l)}else if("color"===c.command&&c.value){const e=m.state.schema.marks.forecolor.create({color:c.value});d(m),u(m,e)}else if("backcolor"===c.command&&c.value){const e=m.state.schema.marks.backcolor.create({backcolor:c.value});d(m),u(m,e)}else if("bold"===c.command)d(m),Object(s["f"])(m.state.schema.marks.strong)(m.state,m.dispatch);else if("em"===c.command)d(m),Object(s["f"])(m.state.schema.marks.em)(m.state,m.dispatch);else if("underline"===c.command)d(m),Object(s["f"])(m.state.schema.marks.underline)(m.state,m.dispatch);else if("strikethrough"===c.command)d(m),Object(s["f"])(m.state.schema.marks.strikethrough)(m.state,m.dispatch);else if("subscript"===c.command)Object(s["f"])(m.state.schema.marks.subscript)(m.state,m.dispatch);else if("superscript"===c.command)Object(s["f"])(m.state.schema.marks.superscript)(m.state,m.dispatch);else if("blockquote"===c.command)Object(s["g"])(m.state.schema.nodes.blockquote)(m.state,m.dispatch);else if("code"===c.command)Object(s["f"])(m.state.schema.marks.code)(m.state,m.dispatch);else if("align"===c.command&&c.value)xn(m,c.value);else if("indent"===c.command&&c.value)wn(m,+c.value);else if("bulletList"===c.command){const e=c.value||"",{bullet_list:t,list_item:l}=m.state.schema.nodes;Cn(t,l,e)(m.state,m.dispatch)}else if("orderedList"===c.command){const e=c.value||"",{ordered_list:t,list_item:l}=m.state.schema.nodes;Cn(t,l,e)(m.state,m.dispatch)}else if("clear"===c.command){d(m);const{$from:e,$to:t}=m.state.selection;m.dispatch(m.state.tr.removeMark(e.pos,t.pos))}else if("link"===c.command){const e=m.state.schema.marks.link,{from:t,to:l}=m.state.selection,n=b(m.state.doc,t,l,e);if(n)if(c.value){const e=m.state.schema.marks.link.create({href:c.value,title:c.value});u(m,e,{from:n.from.pos,to:n.to.pos+1})}else m.dispatch(m.state.tr.removeMark(n.from.pos,n.to.pos+1,e));else if(g(m.state,e))if(c.value){const e=m.state.schema.marks.link.create({href:c.value,title:c.value});u(m,e)}else Object(s["f"])(e)(m.state,m.dispatch);else c.value&&(d(m),Object(s["f"])(e,{href:c.value,title:c.value})(m.state,m.dispatch))}else"insert"===c.command&&c.value&&m.dispatch(m.state.tr.insertText(c.value));m.focus(),p(),v()},E=()=>{if(!i.value)return;const e=[{command:"clear"}];for(const t of Object.keys(i.value)){const l=t,c=i.value[t];c&&e.push({command:l,value:c})}k({action:e}),a.setTextFormatPainter(null)};return Object(n["onMounted"])(()=>{m=fn(O.value,y.value,{handleDOMEvents:{focus:f,blur:j,keydown:h,click:v,mouseup:E},editable:()=>c.editable}),c.autoFocus&&m.focus()}),Object(n["onUnmounted"])(()=>{m&&m.destroy()}),yn.on(jn.RICH_TEXT_COMMAND,k),Object(n["onUnmounted"])(()=>{yn.off(jn.RICH_TEXT_COMMAND,k)}),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["prosemirror-editor",{"format-painter":Object(n["unref"])(i)}]),ref_key:"editorViewRef",ref:O,onMousedown:t[0]||(t[0]=e=>l("mousedown",e))},null,34))}});l("36e5");const In=Yt()(Vn,[["__scopeId","data-v-76d3203e"]]);var Sn=In;const Ln=e=>(Object(n["pushScopeId"])("data-v-9be58c0a"),e=e(),Object(n["popScopeId"])(),e),Bn=Ln(()=>Object(n["createElementVNode"])("div",{class:"drag-handler top"},null,-1)),_n=Ln(()=>Object(n["createElementVNode"])("div",{class:"drag-handler bottom"},null,-1));var Tn=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=z(),c=T(),{handleElementId:a,isScaling:r}=Object(o["c"])(l),{addHistorySnapshot:i}=Te(),s=Object(n["ref"])(),d=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:u}=Fl(d),b=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},O=Object(n["ref"])(-1),m=Object(n["ref"])(-1);Object(n["watch"])(r,()=>{a.value===t.elementInfo.id&&(r.value||(t.elementInfo.vertical||-1===O.value||(c.updateElement({id:t.elementInfo.id,props:{height:O.value}}),O.value=-1),t.elementInfo.vertical&&-1!==m.value&&(c.updateElement({id:t.elementInfo.id,props:{width:m.value}}),m.value=-1)))});const p=e=>{const l=e[0].contentRect;if(!s.value)return;const n=l.height+20,o=l.width+20;t.elementInfo.vertical||t.elementInfo.height===n||(r.value?O.value=n:c.updateElement({id:t.elementInfo.id,props:{height:n}})),t.elementInfo.vertical&&t.elementInfo.width!==o&&(r.value?m.value=o:c.updateElement({id:t.elementInfo.id,props:{width:o}}))},f=new ResizeObserver(p);Object(n["onMounted"])(()=>{s.value&&f.observe(s.value)}),Object(n["onUnmounted"])(()=>{s.value&&f.unobserve(s.value)});const j=e=>{c.updateElement({id:t.elementInfo.id,props:{content:e}}),i()},v=()=>{const e=t.elementInfo.content.replaceAll(/<[^>]+>/g,"");e||c.deleteElement(t.elementInfo.id)},h=Object(n["computed"])(()=>a.value===t.elementInfo.id);return Object(n["watch"])(h,()=>{h.value||v()}),(t,l)=>{const c=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-text",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"element-content",ref_key:"elementRef",ref:s,style:Object(n["normalizeStyle"])({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:Object(n["unref"])(u),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"}),onMousedown:l[2]||(l[2]=e=>b(e)),onTouchstart:l[3]||(l[3]=e=>b(e))},[Object(n["createVNode"])(Sc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(n["createVNode"])(Sn,{class:"text",elementId:e.elementInfo.id,defaultColor:e.elementInfo.defaultColor,defaultFontName:e.elementInfo.defaultFontName,editable:!e.elementInfo.lock,value:e.elementInfo.content,style:Object(n["normalizeStyle"])({"--textIndent":(e.elementInfo.textIndent||0)+"px","--paragraphSpace":(void 0===e.elementInfo.paragraphSpace?5:e.elementInfo.paragraphSpace)+"px"}),onUpdate:l[0]||(l[0]=e=>j(e)),onMousedown:l[1]||(l[1]=e=>b(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value","style"]),Bn,_n],36)),[[c,e.contextmenus]])],4)],6)}}});l("bad1");const Mn=Yt()(Tn,[["__scopeId","data-v-9be58c0a"]]);var Dn=Mn;const zn=["id","gradientTransform"],An=["stop-color"],Fn=["stop-color"],$n=["id"],Rn=["stop-color"],Pn=["stop-color"];var Hn=Object(n["defineComponent"])({__name:"GradientDefs",props:{id:{type:String,required:!0},type:{type:String},color1:{type:String,required:!0},color2:{type:String,required:!0},rotate:{type:Number,default:0}},setup(e){return(t,l)=>"linear"===e.type?(Object(n["openBlock"])(),Object(n["createElementBlock"])("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[Object(n["createElementVNode"])("stop",{offset:"0%","stop-color":e.color1},null,8,An),Object(n["createElementVNode"])("stop",{offset:"100%","stop-color":e.color2},null,8,Fn)],8,zn)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("radialGradient",{key:1,id:e.id},[Object(n["createElementVNode"])("stop",{offset:"0%","stop-color":e.color1},null,8,Rn),Object(n["createElementVNode"])("stop",{offset:"100%","stop-color":e.color2},null,8,Pn)],8,$n))}});const qn=Hn;var Un=qn;const Gn=["width","height"],Xn={key:0},Yn=["transform"],Zn=["d","fill","stroke","stroke-width","stroke-dasharray"];var Wn=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=z(),c=T(),{handleElementId:a}=Object(o["c"])(l),{addHistorySnapshot:r}=Te(),i=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))},s=Object(n["computed"])(()=>t.elementInfo.outline),{outlineWidth:d,outlineStyle:u,outlineColor:b}=ql(s),O=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:m}=Fl(O),p=Object(n["computed"])(()=>t.elementInfo.flipH),f=Object(n["computed"])(()=>t.elementInfo.flipV),{flipStyle:j}=$l(p,f),v=Object(n["ref"])(!1);Object(n["watch"])(a,()=>{a.value!==t.elementInfo.id&&v.value&&(v.value=!1)});const h=Object(n["computed"])(()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e}),y=e=>{const l={...h.value,content:e};c.updateElement({id:t.elementInfo.id,props:{text:l}}),r()},g=()=>{if(!t.elementInfo.text)return;const e=t.elementInfo.text.content.replaceAll(/<[^>]+>/g,"");e||(c.removeElementProps({id:t.elementInfo.id,propName:"text"}),r())},x=Object(n["ref"])(),k=()=>{v.value=!0,Object(n["nextTick"])(()=>x.value&&x.value.focus())};return(t,l)=>{const c=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-shape",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({opacity:e.elementInfo.opacity,filter:Object(n["unref"])(m)?`drop-shadow(${Object(n["unref"])(m)})`:"",transform:Object(n["unref"])(j),color:Object(n["unref"])(h).defaultColor,fontFamily:Object(n["unref"])(h).defaultFontName}),onMousedown:l[3]||(l[3]=e=>i(e)),onTouchstart:l[4]||(l[4]=e=>i(e)),onDblclick:l[5]||(l[5]=e=>k())},[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?(Object(n["openBlock"])(),Object(n["createElementBlock"])("defs",Xn,[Object(n["createVNode"])(Un,{id:"editabel-gradient-"+e.elementInfo.id,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(n["createElementVNode"])("path",{class:"shape-path","vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#editabel-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:Object(n["unref"])(b),"stroke-width":Object(n["unref"])(d),"stroke-dasharray":"dashed"===Object(n["unref"])(u)?"10 6":"0 0"},null,8,Zn)],8,Yn)],8,Gn)),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["shape-text",[Object(n["unref"])(h).align,{editable:v.value||Object(n["unref"])(h).content}]])},[v.value||Object(n["unref"])(h).content?(Object(n["openBlock"])(),Object(n["createBlock"])(Sn,{key:0,ref_key:"prosemirrorEditorRef",ref:x,elementId:e.elementInfo.id,defaultColor:Object(n["unref"])(h).defaultColor,defaultFontName:Object(n["unref"])(h).defaultFontName,editable:!e.elementInfo.lock,value:Object(n["unref"])(h).content,onUpdate:l[0]||(l[0]=e=>y(e)),onBlur:l[1]||(l[1]=e=>g()),onMousedown:l[2]||(l[2]=e=>i(e,!1))},null,8,["elementId","defaultColor","defaultFontName","editable","value"])):Object(n["createCommentVNode"])("",!0)],2)],36)),[[c,e.contextmenus]])],4)],6)}}});l("afc8");const Jn=Yt()(Wn,[["__scopeId","data-v-486128e0"]]);var Kn=Jn;const Qn=["id","markerWidth","markerHeight","refX","refY"],eo=["d","fill","transform"];var to=Object(n["defineComponent"])({__name:"LinePointMarker",props:{id:{type:String,required:!0},position:{type:String,required:!0},type:{type:String,required:!0},color:{type:String},baseSize:{type:Number,required:!0}},setup(e){const t=e,l={dot:"m0 5a5 5 0 1 0 10 0a5 5 0 1 0 -10 0z",arrow:"M0,0 L10,5 0,10 Z"},c={"arrow-start":180,"arrow-end":0},o=Object(n["computed"])(()=>l[t.type]),a=Object(n["computed"])(()=>c[`${t.type}-${t.position}`]||0),r=Object(n["computed"])(()=>t.baseSize<2?2:t.baseSize);return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("marker",{id:`${e.id}-${e.type}-${e.position}`,markerUnits:"userSpaceOnUse",orient:"auto",markerWidth:3*Object(n["unref"])(r),markerHeight:3*Object(n["unref"])(r),refX:1.5*Object(n["unref"])(r),refY:1.5*Object(n["unref"])(r)},[Object(n["createElementVNode"])("path",{d:Object(n["unref"])(o),fill:e.color,transform:`scale(${.3*Object(n["unref"])(r)}, ${.3*Object(n["unref"])(r)}) rotate(${Object(n["unref"])(a)}, 5, 5)`},null,8,eo)],8,Qn))}});const lo=to;var co=lo;const no=["width","height"],oo=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"],ao=["d"];var ro=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},c=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:o}=Fl(c),a=Object(n["computed"])(()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e}),r=Object(n["computed"])(()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e}),i=Object(n["computed"])(()=>"dashed"===t.elementInfo.style?"10 6":"0 0"),s=Object(n["computed"])(()=>Ce(t.elementInfo));return(t,c)=>{const d=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-shape",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[Object(n["createElementVNode"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({filter:Object(n["unref"])(o)?`drop-shadow(${Object(n["unref"])(o)})`:""}),onMousedown:c[0]||(c[0]=e=>l(e)),onTouchstart:c[1]||(c[1]=e=>l(e))},[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{overflow:"visible",width:Object(n["unref"])(a),height:Object(n["unref"])(r)},[Object(n["createElementVNode"])("defs",null,[e.elementInfo.points[0]?(Object(n["openBlock"])(),Object(n["createBlock"])(co,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(n["createCommentVNode"])("",!0),e.elementInfo.points[1]?(Object(n["openBlock"])(),Object(n["createBlock"])(co,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(n["createCommentVNode"])("",!0)]),Object(n["createElementVNode"])("path",{class:"line-point",d:Object(n["unref"])(s),stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":Object(n["unref"])(i),fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,oo),Object(n["withDirectives"])(Object(n["createElementVNode"])("path",{class:"line-path",d:Object(n["unref"])(s),stroke:"transparent","stroke-width":"20",fill:"none"},null,8,ao),[[d,e.contextmenus]])],8,no))],36)],6)}}});l("bde5");const io=Yt()(ro,[["__scopeId","data-v-6550e504"]]);var so=io,uo=l("b239"),bo=(l("21d9"),Object(n["defineComponent"])({__name:"Chart",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},type:{type:String,required:!0},data:{type:Object,required:!0},options:{type:Object},themeColor:{type:Array,required:!0},legends:{type:Array,required:!0},gridColor:{type:String},legend:{type:String}},setup(e){const t=e,l=Object(n["ref"])(),c=Object(n["inject"])(vl)||Object(n["ref"])(1);let o;const a=Object(n["computed"])(()=>t.legend?t.height-20:t.height),r=()=>({...t.data,series:t.data.series[0]}),i=()=>{const e=t.options||{};return{...e,width:t.width*c.value,height:a.value*c.value}},s=()=>{if(!l.value)return;const e=i();"bar"===t.type&&(o=new uo["a"](l.value,t.data,e)),"line"===t.type&&(o=new uo["b"](l.value,t.data,e)),"pie"===t.type&&(o=new uo["c"](l.value,r(),e))},d=()=>{if(!o)return void s();const e=i(),l="pie"===t.type?r():t.data;o.update(l,e)};Object(n["watch"])([()=>t.width,()=>t.height,()=>t.data,()=>t.options,c],d),Object(n["onMounted"])(s);const u=Object(n["computed"])(()=>{let e=[];if(t.themeColor.length>=10)e=t.themeColor;else if(1===t.themeColor.length)e=I()(t.themeColor[0]).analogous(10).map(e=>e.toHexString());else{const l=t.themeColor.length,c=I()(t.themeColor[l-1]).analogous(11-l).map(e=>e.toHexString());e=[...t.themeColor.slice(0,l-1),...c]}return e}),b=()=>{if(l.value)for(let e=0;e<10;e++)l.value.style.setProperty("--theme-color-"+(e+1),u.value[e])};Object(n["watch"])(u,b),Object(n["onMounted"])(b);const O=()=>{l.value&&t.gridColor&&l.value.style.setProperty("--grid-color",t.gridColor)};return Object(n["watch"])(()=>t.gridColor,O),Object(n["onMounted"])(O),(t,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"chart",style:Object(n["normalizeStyle"])({flexDirection:"top"===e.legend?"column-reverse":"column"})},[Object(n["createElementVNode"])("div",{class:"chart-content",ref_key:"chartRef",ref:l,style:Object(n["normalizeStyle"])({width:e.width+"px",height:Object(n["unref"])(a)+"px",transform:`scale(${1/Object(n["unref"])(c)})`})},null,4),e.legend?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"legends",style:Object(n["normalizeStyle"])({transform:`scale(${1/Object(n["unref"])(c)})`})},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.legends,(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"legend",key:l,style:Object(n["normalizeStyle"])({color:e.gridColor})},[Object(n["createElementVNode"])("div",{class:"block",style:Object(n["normalizeStyle"])({backgroundColor:Object(n["unref"])(u)[l]})},null,4),Object(n["createTextVNode"])(" "+Object(n["toDisplayString"])(t),1)],4))),128))],4)):Object(n["createCommentVNode"])("",!0)],4))}}));l("6116"),l("68b8");const Oo=Yt()(bo,[["__scopeId","data-v-1f8d633e"]]);var mo=Oo,po=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},c=()=>{yn.emit(jn.OPEN_CHART_DATA_EDITOR)};return(t,o)=>{const a=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-chart",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({backgroundColor:e.elementInfo.fill}),onMousedown:o[0]||(o[0]=e=>l(e)),onTouchstart:o[1]||(o[1]=e=>l(e)),onDblclick:o[2]||(o[2]=e=>c())},[Object(n["createVNode"])(Sc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(n["createVNode"])(mo,{width:e.elementInfo.width,height:e.elementInfo.height,type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||""},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend"])],36)),[[a,e.contextmenus]])],4)],6)}}});l("8216");const fo=Yt()(po,[["__scopeId","data-v-f3c03862"]]);var jo=fo;const vo=e=>{if(!e)return{};const{bold:t,em:l,underline:c,strikethrough:n,color:o,backcolor:a,fontsize:r,fontname:i,align:s}=e;let d=`${c?"underline":""} ${n?"line-through":""}`;return" "===d&&(d="none"),{fontWeight:t?"bold":"normal",fontStyle:l?"italic":"normal",textDecoration:d,color:o||"#000",backgroundColor:a||"",fontSize:r||"14px",fontFamily:i||"微软雅黑",textAlign:s||"left"}},ho=e=>e.replace(/\n/g,"</br>").replace(/ /g,"&nbsp;");var yo=e=>{const t=Object(n["computed"])(()=>{const t=[];for(let l=0;l<e.value.length;l++){const c=e.value[l];for(let e=0;e<c.length;e++){const n=c[e];if(n.colspan>1||n.rowspan>1)for(let c=l;c<l+n.rowspan;c++)for(let o=c===l?e+1:e;o<e+n.colspan;o++)t.push(`${c}_${o}`)}}return t});return{hideCells:t}},go=e=>{const t=Object(n["ref"])(["",""]);return Object(n["watch"])(()=>e.value,()=>{e.value&&(t.value=ke(e.value.color))},{immediate:!0}),{subThemeColor:t}};const xo=["innerHTML"];var ko=Object(n["defineComponent"])({__name:"CustomTextarea",props:{value:{type:String,default:""},contenteditable:{type:[Boolean,String],default:!1}},emits:["updateValue","insertExcelData"],setup(e,{emit:t}){const l=e,c=Object(n["ref"])(),o=Object(n["ref"])(""),a=Object(n["ref"])(!1);Object(n["watch"])(()=>l.value,()=>{a.value||(o.value=l.value,c.value&&(c.value.innerHTML=l.value))},{immediate:!0});const r=()=>{if(!c.value)return;const e=c.value.innerHTML;t("updateValue",e)},i=()=>{a.value=!0,c.value&&(c.value.onpaste=e=>{if(e.preventDefault(),!e.clipboardData)return;const l=e.clipboardData.items[0];l&&"string"===l.kind&&"text/plain"===l.type&&l.getAsString(e=>{const l=me(e);if("object"===typeof l)return;const n=pe(e);if(n)return t("insertExcelData",n),void(c.value&&(c.value.innerHTML=n[0][0]));t("updateValue",e),document.execCommand("insertText",!1,e)})})},s=()=>{a.value=!1,c.value&&(c.value.onpaste=null)};return Object(n["onUnmounted"])(()=>{c.value&&(c.value.onpaste=null)}),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"custom-textarea",ref_key:"textareaRef",ref:c,onFocus:i,onBlur:s,onInput:t[0]||(t[0]=e=>r()),innerHTML:o.value},null,40,xo))}});l("80dc");const Co=Yt()(ko,[["__scopeId","data-v-cdb58a1e"]]);var No=Co;const Eo={key:0,class:"handler"},wo=["onMousedown"],Vo=["width"],Io=["rowspan","colspan","data-cell-index","onMousedown","onMouseenter"],So=["innerHTML"];var Lo=Object(n["defineComponent"])({__name:"EditableTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},emits:["change","changeColWidths","changeSelectedCells"],setup(e,{emit:t}){const l=e,{canvasScale:c}=Object(o["c"])(z()),r=Object(n["ref"])(!1),i=Object(n["ref"])([]),s=Object(n["ref"])([]),d=Object(n["computed"])({get(){return l.data},set(e){t("change",e)}}),u=Object(n["computed"])(()=>l.theme),{subThemeColor:b}=go(u),O=Object(n["ref"])([]),m=Object(n["computed"])(()=>O.value.reduce((e,t)=>e+t));Object(n["watch"])([()=>l.colWidths,()=>l.width],()=>{O.value=l.colWidths.map(e=>e*l.width)},{immediate:!0});const p=()=>{i.value=[],s.value=[]};Object(n["watch"])(()=>l.editable,()=>{l.editable||p()});const f=Object(n["computed"])(()=>{const e=[];for(let t=1;t<O.value.length+1;t++){const l=O.value.slice(0,t).reduce((e,t)=>e+t);e.push(l)}return e}),j=Object(n["computed"])(()=>l.data),{hideCells:v}=yo(j),h=Object(n["computed"])(()=>{if(!i.value.length)return[];const[e,t]=i.value;if(!s.value.length)return[`${e}_${t}`];const[l,c]=s.value;if(e===l&&t===c)return[`${e}_${t}`];const n=[],o=Math.min(e,l),a=Math.min(t,c),r=Math.max(e,l),u=Math.max(t,c);for(let i=0;i<d.value.length;i++){const e=d.value[i];for(let t=0;t<e.length;t++)i>=o&&i<=r&&t>=a&&t<=u&&n.push(`${i}_${t}`)}return n});Object(n["watch"])(h,(e,l)=>{Object(S["isEqual"])(e,l)||t("changeSelectedCells",h.value)});const y=Object(n["computed"])(()=>h.value.length>1?null:h.value[0]),g=()=>r.value=!1,x=(e,t,l)=>{0===e.button&&(s.value=[],r.value=!0,i.value=[t,l])},k=(e,t)=>{r.value&&(s.value=[e,t])};Object(n["onMounted"])(()=>{document.addEventListener("mouseup",g)}),Object(n["onUnmounted"])(()=>{document.removeEventListener("mouseup",g)});const C=(e,t)=>v.value.includes(`${e}_${t}`),N=e=>{const t=d.value.length-1;i.value=[0,e],s.value=[t,e]},E=e=>{const t=d.value[e].length-1;i.value=[e,0],s.value=[e,t]},w=()=>{const e=d.value.length-1,t=d.value[e].length-1;i.value=[0,0],s.value=[e,t]},V=e=>{const t=JSON.parse(JSON.stringify(d.value)),l=d.value[e],c=[];for(let n=0;n<l.length;n++)C(e,n)&&c.push(n);for(const n of c)for(let l=e;l>=0;l--)if(!C(l,n)){t[l][n].rowspan=t[l][n].rowspan-1;break}t.splice(e,1),d.value=t},I=e=>{const l=JSON.parse(JSON.stringify(d.value)),c=[];for(let t=0;t<d.value.length;t++)C(t,e)&&c.push(t);for(const t of c)for(let c=e;c>=0;c--)if(!C(t,c)){l[t][c].colspan=l[t][c].colspan-1;break}d.value=l.map(t=>(t.splice(e,1),t)),O.value.splice(e,1),t("changeColWidths",O.value)},L=e=>{const t=JSON.parse(JSON.stringify(d.value)),l=[];for(let c=0;c<t[0].length;c++)l.push({colspan:1,rowspan:1,text:"",id:Object(a["b"])(10)});t.splice(e,0,l),d.value=t},B=e=>{d.value=d.value.map(t=>{const l={colspan:1,rowspan:1,text:"",id:Object(a["b"])(10)};return t.splice(e,0,l),t}),O.value.splice(e,0,100),t("changeColWidths",O.value)},_=(e,l)=>{let c=JSON.parse(JSON.stringify(d.value));const n={colspan:1,rowspan:1,text:""};if(e){const t=[];for(let l=0;l<e;l++){const e=[];for(let t=0;t<c[0].length;t++)e.push({...n,id:Object(a["b"])(10)});t.push(e)}c=[...c,...t]}l&&(c=c.map(e=>{const t=[];for(let c=0;c<l;c++){const e={...n,id:Object(a["b"])(10)};t.push(e)}return[...e,...t]}),O.value=[...O.value,...new Array(l).fill(100)],t("changeColWidths",O.value)),d.value=c},T=()=>{const[e,t]=i.value,[l,c]=s.value,n=Math.min(e,l),o=Math.min(t,c),a=Math.max(e,l),r=Math.max(t,c),u=JSON.parse(JSON.stringify(d.value));u[n][o].rowspan=a-n+1,u[n][o].colspan=r-o+1,d.value=u,p()},M=(e,t)=>{const l=JSON.parse(JSON.stringify(d.value));l[e][t].rowspan=1,l[e][t].colspan=1,d.value=l,p()},D=(e,l)=>{p();let n=!0;const o=O.value[l],a=e.pageX,r=50;document.onmousemove=e=>{if(!n)return;const t=(e.pageX-a)/c.value,i=o+t<r?r:Math.round(o+t);O.value[l]=i},document.onmouseup=()=>{n=!1,document.onmousemove=null,document.onmouseup=null,t("changeColWidths",O.value)}},A=()=>{const e=JSON.parse(JSON.stringify(d.value));for(let t=0;t<e.length;t++)for(let l=0;l<e[t].length;l++)h.value.includes(`${t}_${l}`)&&(e[t][l].text="");d.value=e},F=()=>{const e=(t,l)=>d.value[t]?d.value[t][l]?C(t,l)?e(t,l+1):[t,l]:e(t+1,0):null;s.value=[];const t=i.value[0],l=i.value[1]+1,c=e(t,l);c?i.value=c:(L(t+1),i.value=[t+1,0]),Object(n["nextTick"])(()=>{const e=document.querySelector(".cell-text.active");e&&e.focus()})},$=e=>{if(!l.editable||!h.value.length)return;const t=e.key.toUpperCase();if(h.value.length<2){if(t===te.TAB&&(e.preventDefault(),F()),e.ctrlKey&&t===te.UP){e.preventDefault();const t=+h.value[0].split("_")[0];L(t)}if(e.ctrlKey&&t===te.DOWN){e.preventDefault();const t=+h.value[0].split("_")[0];L(t+1)}if(e.ctrlKey&&t===te.LEFT){e.preventDefault();const t=+h.value[0].split("_")[1];B(t)}if(e.ctrlKey&&t===te.RIGHT){e.preventDefault();const t=+h.value[0].split("_")[1];B(t+1)}}else t===te.DELETE&&A()};Object(n["onMounted"])(()=>{document.addEventListener("keydown",$)}),Object(n["onUnmounted"])(()=>{document.removeEventListener("keydown",$)});const R=Object(S["debounce"])((function(e,l,c){d.value[l][c].text=e,t("change",d.value)}),300,{trailing:!0}),P=(e,l,c)=>{const o=e.length,a=e[0].length;let r=0,i=0;l+o>d.value.length&&(r=l+o-d.value.length),c+a>d.value[0].length&&(i=c+a-d.value[0].length),(r||i)&&_(r,i),Object(n["nextTick"])(()=>{for(let t=0;t<o;t++)for(let n=0;n<a;n++)d.value[l+t][c+n]&&(d.value[l+t][c+n].text=e[t][n]);t("change",d.value)})},H=()=>{const e=[];for(let t=0;t<d.value.length;t++){const l=d.value[t],c=[];for(let e=0;e<l.length;e++)C(t,e)||c.push(l[e]);c.length&&e.push(c)}return e},q=()=>{const e=H(),t=e.length>1,l=e[0].length>1;return{canDeleteRow:t,canDeleteCol:l}},U=(e,t)=>{const l=h.value.length>1,c=d.value[e][t],n=l,o=!l&&(c.rowspan>1||c.colspan>1);return{canMerge:n,canSplit:o}},G=e=>{const t=e.dataset.cellIndex,l=+t.split("_")[0],c=+t.split("_")[1];h.value.includes(`${l}_${c}`)||(i.value=[l,c],s.value=[]);const{canMerge:n,canSplit:o}=U(l,c),{canDeleteRow:a,canDeleteCol:r}=q();return[{text:"插入列",children:[{text:"到左侧",handler:()=>B(c)},{text:"到右侧",handler:()=>B(c+1)}]},{text:"插入行",children:[{text:"到上方",handler:()=>L(l)},{text:"到下方",handler:()=>L(l+1)}]},{text:"删除列",disable:!r,handler:()=>I(c)},{text:"删除行",disable:!a,handler:()=>V(l)},{divider:!0},{text:"合并单元格",disable:!n,handler:T},{text:"取消合并单元格",disable:!o,handler:()=>M(l,c)},{divider:!0},{text:"选中当前列",handler:()=>N(c)},{text:"选中当前行",handler:()=>E(l)},{text:"选中全部单元格",handler:w}]};return(t,l)=>{var c,o,a,r,i;const s=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"editable-table",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(m)+"px"})},[e.editable?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Eo,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(f),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"drag-line",key:t,style:Object(n["normalizeStyle"])({left:e+"px"}),onMousedown:e=>D(e,t)},null,44,wo))),128))])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("table",{class:Object(n["normalizeClass"])({theme:Object(n["unref"])(u),"row-header":null===(c=Object(n["unref"])(u))||void 0===c?void 0:c.rowHeader,"row-footer":null===(o=Object(n["unref"])(u))||void 0===o?void 0:o.rowFooter,"col-header":null===(a=Object(n["unref"])(u))||void 0===a?void 0:a.colHeader,"col-footer":null===(r=Object(n["unref"])(u))||void 0===r?void 0:r.colFooter}),style:Object(n["normalizeStyle"])(`--themeColor: ${null===(i=Object(n["unref"])(u))||void 0===i?void 0:i.color}; --subThemeColor1: ${Object(n["unref"])(b)[0]}; --subThemeColor2: ${Object(n["unref"])(b)[1]}`)},[Object(n["createElementVNode"])("colgroup",null,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(O.value,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("col",{span:"1",key:t,width:e},null,8,Vo))),128))]),Object(n["createElementVNode"])("tbody",null,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(d),(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("tr",{key:l,style:Object(n["normalizeStyle"])({height:e.cellMinHeight+"px"})},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(t,(t,c)=>Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("td",{class:Object(n["normalizeClass"])(["cell",{selected:Object(n["unref"])(h).includes(`${l}_${c}`)&&Object(n["unref"])(h).length>1,active:Object(n["unref"])(y)===`${l}_${c}`}]),style:Object(n["normalizeStyle"])({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...Object(n["unref"])(vo)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan,"data-cell-index":`${l}_${c}`,onMousedown:e=>x(e,l,c),onMouseenter:e=>k(l,c)},[Object(n["unref"])(y)===`${l}_${c}`?(Object(n["openBlock"])(),Object(n["createBlock"])(No,{key:0,class:Object(n["normalizeClass"])(["cell-text",{active:Object(n["unref"])(y)===`${l}_${c}`}]),style:Object(n["normalizeStyle"])({minHeight:e.cellMinHeight-4+"px"}),value:t.text,onUpdateValue:e=>Object(n["unref"])(R)(e,l,c),onInsertExcelData:e=>P(e,l,c)},null,8,["class","style","value","onUpdateValue","onInsertExcelData"])):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:1,class:"cell-text",style:Object(n["normalizeStyle"])({minHeight:e.cellMinHeight-4+"px"}),innerHTML:Object(n["unref"])(ho)(t.text)},null,12,So))],46,Io)),[[n["vShow"],!Object(n["unref"])(v).includes(`${l}_${c}`)],[s,e=>G(e)]])),128))],4))),128))])],6)],4)}}});l("652e");const Bo=Yt()(Lo,[["__scopeId","data-v-a2ef535c"]]);var _o=Bo;const To={class:"element-content"};var Mo=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=z(),c=T(),{canvasScale:a,handleElementId:r,isScaling:i}=Object(o["c"])(l),s=Object(n["ref"])(),{addHistorySnapshot:d}=Te(),u=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},b=Object(n["ref"])(!1);Object(n["watch"])(r,()=>{r.value!==t.elementInfo.id&&(b.value=!1)}),Object(n["watch"])(b,()=>{l.setDisableHotkeysState(b.value)});const O=()=>{t.elementInfo.lock||(b.value=!0)},m=Object(n["ref"])(-1);Object(n["watch"])(i,()=>{r.value===t.elementInfo.id&&(i.value&&(b.value=!1),i.value||-1===m.value||(c.updateElement({id:t.elementInfo.id,props:{height:m.value}}),m.value=-1))});const p=e=>{const l=e[0].contentRect;if(!s.value)return;const n=l.height;t.elementInfo.height!==n&&(i.value?m.value=n:c.updateElement({id:t.elementInfo.id,props:{height:n}}))},f=new ResizeObserver(p);Object(n["onMounted"])(()=>{s.value&&f.observe(s.value)}),Object(n["onUnmounted"])(()=>{s.value&&f.unobserve(s.value)});const j=e=>{c.updateElement({id:t.elementInfo.id,props:{data:e}}),d()},v=e=>{const l=e.reduce((e,t)=>e+t),n=e.map(e=>e/l);c.updateElement({id:t.elementInfo.id,props:{width:l,colWidths:n}}),d()},h=e=>{Object(n["nextTick"])(()=>l.setSelectedTableCells(e))};return(t,l)=>{const c=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-table",{lock:e.elementInfo.lock}]),ref_key:"elementRef",ref:s,style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",To,[Object(n["createVNode"])(_o,{onMousedown:l[0]||(l[0]=Object(n["withModifiers"])(()=>{},["stop"])),data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme,editable:b.value,onChange:l[1]||(l[1]=e=>j(e)),onChangeColWidths:l[2]||(l[2]=e=>v(e)),onChangeSelectedCells:l[3]||(l[3]=e=>h(e))},null,8,["data","width","cellMinHeight","colWidths","outline","theme","editable"]),!b.value||e.elementInfo.lock?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:Object(n["normalizeClass"])(["table-mask",{lock:e.elementInfo.lock}]),onDblclick:l[4]||(l[4]=e=>O()),onMousedown:l[5]||(l[5]=e=>u(e)),onTouchstart:l[6]||(l[6]=e=>u(e))},[Object(n["createElementVNode"])("div",{class:"mask-tip",style:Object(n["normalizeStyle"])({transform:`scale(${1/Object(n["unref"])(a)})`})},"双击编辑",4)],34)):Object(n["createCommentVNode"])("",!0)])),[[c,e.contextmenus]])],4)],6)}}});l("db8d");const Do=Yt()(Mo,[["__scopeId","data-v-0b2b16da"]]);var zo=Do;const Ao=["width","height","stroke","stroke-width"],Fo=["transform"],$o=["d"];var Ro=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,l=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))},c=()=>{yn.emit(jn.OPEN_LATEX_EDITOR)};return(t,o)=>{const a=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-latex",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"element-content",onMousedown:o[0]||(o[0]=e=>l(e)),onTouchstart:o[1]||(o[1]=e=>l(e)),onDblclick:o[2]||(o[2]=e=>c())},[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Object(n["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(n["createElementVNode"])("path",{d:e.elementInfo.path},null,8,$o)],8,Fo)],8,Ao))],32)),[[a,e.contextmenus]])],4)],6)}}});l("0f64");const Po=Yt()(Ro,[["__scopeId","data-v-31390388"]]);var Ho=Po,qo=(e,t)=>{Object(n["onMounted"])(()=>{if(!t.value)return;let l="normal";if(/m3u8(#|\?|$)/i.exec(e)?l="hls":/.flv(#|\?|$)/i.exec(e)&&(l="flv"),t.value&&"hls"===l&&(t.value.canPlayType("application/x-mpegURL")||t.value.canPlayType("application/vnd.apple.mpegURL"))&&(l="normal"),"hls"===l){const l=window.Hls;if(l&&l.isSupported()){const c=new l;c.loadSource(e),c.attachMedia(t.value)}}else if("flv"===l){const l=window.flvjs;if(l&&l.isSupported()){const c=l.createPlayer({type:"flv",url:e});c.attachMediaElement(t.value),c.load()}}})};const Uo=e=>(Object(n["pushScopeId"])("data-v-adfce55e"),e=e(),Object(n["popScopeId"])(),e),Go={key:0,class:"load-error"},Xo=["src","poster"],Yo={class:"bezel"},Zo=Uo(()=>Object(n["createElementVNode"])("div",{class:"controller-mask"},null,-1)),Wo={class:"controller"},Jo={class:"icons icons-left"},Ko={class:"icon-content"},Qo={class:"volume"},ea={class:"icon-content"},ta=Uo(()=>Object(n["createElementVNode"])("span",{class:"thumb"},null,-1)),la=[ta],ca={class:"time"},na={class:"ptime"},oa={class:"dtime"},aa={class:"icons icons-right"},ra={class:"speed"},ia={class:"icon speed-icon"},sa=["onClick"],da={class:"icon-content"},ua={class:"bar"},ba=Uo(()=>Object(n["createElementVNode"])("span",{class:"thumb"},null,-1)),Oa=[ba];var ma=Object(n["defineComponent"])({__name:"index",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},src:{type:String,required:!0},poster:{type:String,default:""},scale:{type:Number,default:1}},setup(e){const t=e,l=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),c=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*c);return(l>0?[l,c,n]:[c,n]).map(t).join(":")},c=e=>e.getBoundingClientRect().left,o=Object(n["ref"])(),a=Object(n["ref"])(),r=Object(n["ref"])(),i=Object(n["ref"])(.5),s=Object(n["ref"])(!0),d=Object(n["ref"])(0),u=Object(n["ref"])(0),b=Object(n["ref"])(0),O=Object(n["ref"])(!1),m=Object(n["ref"])(!1),p=Object(n["ref"])(1),f=Object(n["ref"])(!1),j=Object(n["ref"])("00:00"),v=Object(n["ref"])("0"),h=Object(n["computed"])(()=>l(d.value)),y=Object(n["computed"])(()=>l(u.value)),g=Object(n["computed"])(()=>d.value/u.value*100+"%"),x=Object(n["computed"])(()=>b.value/u.value*100+"%"),k=Object(n["computed"])(()=>100*i.value+"%"),C=Object(n["ref"])(!1),N=[{label:"2x",value:2},{label:"1.5x",value:1.5},{label:"1.25x",value:1.25},{label:"1x",value:1},{label:"0.75x",value:.75},{label:"0.5x",value:.5}],E=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,u.value),o.value.currentTime=e,d.value=e)},w=()=>{o.value&&(s.value=!1,o.value.play(),m.value=!0)},V=()=>{o.value&&(s.value=!0,o.value.pause(),m.value=!0)},I=()=>{s.value?w():V()},S=e=>{o.value&&(e=Math.max(e,0),e=Math.min(e,1),o.value.volume=e,i.value=e,o.value.muted&&0!==e&&(o.value.muted=!1))},L=e=>{o.value&&(o.value.playbackRate=e),p.value=e},B=()=>{var e;u.value=(null===(e=o.value)||void 0===e?void 0:e.duration)||0},_=()=>{var e;d.value=(null===(e=o.value)||void 0===e?void 0:e.currentTime)||0},T=()=>{O.value?(E(0),w()):V()},M=()=>{var e;b.value=null!==(e=o.value)&&void 0!==e&&e.buffered.length?o.value.buffered.end(o.value.buffered.length-1):0},D=Object(n["ref"])(!1),z=()=>D.value=!0,A=e=>{if(!o.value||!a.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-c(a.value))/a.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const n=l*u.value;o.value.currentTime=n,d.value=n},F=e=>{if(!o.value||!a.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-c(a.value))/a.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const n=l*u.value;o.value.currentTime=n,d.value=n,document.removeEventListener("mousemove",A),document.removeEventListener("touchmove",A),document.removeEventListener("mouseup",F),document.removeEventListener("touchend",F)},$=()=>{document.addEventListener("mousemove",A),document.addEventListener("touchmove",A),document.addEventListener("mouseup",F),document.addEventListener("touchend",F)},R=e=>{if(!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-c(r.value))/45;S(l)},P=()=>{document.removeEventListener("mousemove",R),document.removeEventListener("touchmove",R),document.removeEventListener("mouseup",P),document.removeEventListener("touchend",P)},H=()=>{document.addEventListener("mousemove",R),document.addEventListener("touchmove",R),document.addEventListener("mouseup",P),document.addEventListener("touchend",P)},q=e=>{if(!r.value)return;const t=(e.clientX-c(r.value))/45;S(t)},U=e=>{if(u.value&&a.value){const t=a.value.getBoundingClientRect().left,c=e.clientX-t;if(c<0||c>a.value.offsetWidth)return;const n=u.value*(c/a.value.offsetWidth);v.value=c-(n>=3600?25:20)+"px",j.value=l(n),f.value=!0}},G=()=>{o.value&&(o.value.muted?(o.value.muted=!1,S(.5)):(o.value.muted=!0,S(0)))},X=()=>{O.value=!O.value},Y=Object(n["ref"])(-1),Z=Object(n["ref"])(!1),W=()=>{Z.value=!1,clearTimeout(Y.value),Y.value=setTimeout(()=>{var e;null!==(e=o.value)&&void 0!==e&&e.played.length&&(Z.value=!0)},3e3)};return qo(t.src,o),(t,l)=>{const c=Object(n["resolveComponent"])("IconPause"),d=Object(n["resolveComponent"])("IconPlayOne"),u=Object(n["resolveComponent"])("IconVolumeMute"),b=Object(n["resolveComponent"])("IconVolumeNotice"),E=Object(n["resolveComponent"])("IconVolumeSmall");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["video-player",{"hide-controller":Z.value}]),style:Object(n["normalizeStyle"])({width:e.width*e.scale+"px",height:e.height*e.scale+"px",transform:`scale(${1/e.scale})`}),onMousemove:l[22]||(l[22]=e=>W()),onClick:l[23]||(l[23]=e=>W())},[Object(n["createElementVNode"])("div",{class:"video-wrap",onClick:l[8]||(l[8]=e=>I())},[D.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Go,"视频加载失败")):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("video",{class:"video",ref_key:"videoRef",ref:o,src:e.src,poster:e.poster,"webkit-playsinline":"",playsinline:"",onDurationchange:l[0]||(l[0]=e=>B()),onTimeupdate:l[1]||(l[1]=e=>_()),onEnded:l[2]||(l[2]=e=>T()),onProgress:l[3]||(l[3]=e=>M()),onPlay:l[4]||(l[4]=e=>W()),onPause:l[5]||(l[5]=e=>W()),onError:l[6]||(l[6]=e=>z())},null,40,Xo),Object(n["createElementVNode"])("div",Yo,[Object(n["createElementVNode"])("span",{class:Object(n["normalizeClass"])(["bezel-icon",{"bezel-transition":m.value}]),onAnimationend:l[7]||(l[7]=e=>m.value=!1)},[s.value?(Object(n["openBlock"])(),Object(n["createBlock"])(c,{key:0})):(Object(n["openBlock"])(),Object(n["createBlock"])(d,{key:1}))],34)])]),Zo,Object(n["createElementVNode"])("div",Wo,[Object(n["createElementVNode"])("div",Jo,[Object(n["createElementVNode"])("div",{class:"icon play-icon",onClick:l[9]||(l[9]=e=>I())},[Object(n["createElementVNode"])("span",Ko,[s.value?(Object(n["openBlock"])(),Object(n["createBlock"])(d,{key:0})):(Object(n["openBlock"])(),Object(n["createBlock"])(c,{key:1}))])]),Object(n["createElementVNode"])("div",Qo,[Object(n["createElementVNode"])("div",{class:"icon volume-icon",onClick:l[10]||(l[10]=e=>G())},[Object(n["createElementVNode"])("span",ea,[0===i.value?(Object(n["openBlock"])(),Object(n["createBlock"])(u,{key:0})):1===i.value?(Object(n["openBlock"])(),Object(n["createBlock"])(b,{key:1})):(Object(n["openBlock"])(),Object(n["createBlock"])(E,{key:2}))])]),Object(n["createElementVNode"])("div",{class:"volume-bar-wrap",onMousedown:l[11]||(l[11]=e=>H()),onTouchstart:l[12]||(l[12]=e=>H()),onClick:l[13]||(l[13]=e=>q(e))},[Object(n["createElementVNode"])("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:r},[Object(n["createElementVNode"])("div",{class:"volume-bar-inner",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(k)})},la,4)],512)],32)]),Object(n["createElementVNode"])("span",ca,[Object(n["createElementVNode"])("span",na,Object(n["toDisplayString"])(Object(n["unref"])(h)),1),Object(n["createTextVNode"])(" / "),Object(n["createElementVNode"])("span",oa,Object(n["toDisplayString"])(Object(n["unref"])(y)),1)])]),Object(n["createElementVNode"])("div",aa,[Object(n["createElementVNode"])("div",ra,[Object(n["createElementVNode"])("div",ia,[Object(n["createElementVNode"])("span",{class:"icon-content",onClick:l[14]||(l[14]=e=>C.value=!C.value)},Object(n["toDisplayString"])(1===p.value?"倍速":p.value+"x"),1),C.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"speed-menu",onMouseleave:l[15]||(l[15]=e=>C.value=!1)},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(N,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["speed-menu-item",{active:e.value===p.value}]),key:e.label,onClick:t=>L(e.value)},Object(n["toDisplayString"])(e.label),11,sa)),64))],32)):Object(n["createCommentVNode"])("",!0)])]),Object(n["createElementVNode"])("div",{class:"loop",onClick:l[16]||(l[16]=e=>X())},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["icon loop-icon",{active:O.value}])},[Object(n["createElementVNode"])("span",da,"循环"+Object(n["toDisplayString"])(O.value?"开":"关"),1)],2)])]),Object(n["createElementVNode"])("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:a,onMousedown:l[17]||(l[17]=e=>$()),onTouchstart:l[18]||(l[18]=e=>$()),onMousemove:l[19]||(l[19]=e=>U(e)),onMouseenter:l[20]||(l[20]=e=>f.value=!0),onMouseleave:l[21]||(l[21]=e=>f.value=!1)},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["bar-time",{hidden:!f.value}]),style:Object(n["normalizeStyle"])({left:v.value})},Object(n["toDisplayString"])(j.value),7),Object(n["createElementVNode"])("div",ua,[Object(n["createElementVNode"])("div",{class:"loaded",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(x)})},null,4),Object(n["createElementVNode"])("div",{class:"played",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(g)})},Oa,4)])],544)])],38)}}});l("4036");const pa=Yt()(ma,[["__scopeId","data-v-adfce55e"]]);var fa=pa,ja=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l}=Object(o["c"])(z()),c=(e,l=!0)=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo,l))};return(t,o)=>{const a=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-video",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"element-content",onMousedown:o[2]||(o[2]=e=>c(e,!1)),onTouchstart:o[3]||(o[3]=e=>c(e,!1))},[Object(n["createVNode"])(fa,{width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:Object(n["unref"])(l)},null,8,["width","height","src","poster","scale"]),(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(["t","b","l","r"],e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["handler-border",e]),key:e,onMousedown:o[0]||(o[0]=e=>c(e)),onTouchstart:o[1]||(o[1]=e=>c(e))},null,34)),64))],32)),[[a,e.contextmenus]])],4)],6)}}});l("679c");const va=Yt()(ja,[["__scopeId","data-v-9d5469c6"]]);var ha=va;const ya=e=>(Object(n["pushScopeId"])("data-v-121f3d11"),e=e(),Object(n["popScopeId"])(),e),ga=["src","autoplay"],xa={class:"controller"},ka={class:"icons"},Ca={class:"icon-content"},Na={class:"volume"},Ea={class:"icon-content"},wa=ya(()=>Object(n["createElementVNode"])("span",{class:"thumb"},null,-1)),Va=[wa],Ia={class:"time"},Sa={class:"ptime"},La={class:"dtime"},Ba={class:"bar"},_a=ya(()=>Object(n["createElementVNode"])("span",{class:"thumb"},null,-1)),Ta=[_a];var Ma=Object(n["defineComponent"])({__name:"AudioPlayer",props:{src:{type:String,required:!0},loop:{type:Boolean,required:!0},autoplay:{type:Boolean,default:!1},scale:{type:Number,default:1}},setup(e,{expose:t}){const l=e,c=(e=0)=>{if(0===e||isNaN(e))return"00:00";const t=e=>e<10?"0"+e:""+e,l=Math.floor(e/3600),c=Math.floor((e-3600*l)/60),n=Math.floor(e-3600*l-60*c);return(l>0?[l,c,n]:[c,n]).map(t).join(":")},o=e=>e.getBoundingClientRect().left,a=Object(n["ref"])(),r=Object(n["ref"])(),i=Object(n["ref"])(),s=Object(n["ref"])(.5),d=Object(n["ref"])(!0),u=Object(n["ref"])(0),b=Object(n["ref"])(0),O=Object(n["ref"])(0),m=Object(n["ref"])(!1),p=Object(n["ref"])("00:00"),f=Object(n["ref"])("0"),j=Object(n["computed"])(()=>c(u.value)),v=Object(n["computed"])(()=>c(b.value)),h=Object(n["computed"])(()=>u.value/b.value*100+"%"),y=Object(n["computed"])(()=>O.value/b.value*100+"%"),g=Object(n["computed"])(()=>100*s.value+"%"),x=e=>{a.value&&(e=Math.max(e,0),e=Math.min(e,b.value),a.value.currentTime=e,u.value=e)},k=()=>{a.value&&(d.value=!1,a.value.play())},C=()=>{a.value&&(d.value=!0,a.value.pause())},N=()=>{d.value?k():C()},E=e=>{a.value&&(e=Math.max(e,0),e=Math.min(e,1),a.value.volume=e,s.value=e,a.value.muted&&0!==e&&(a.value.muted=!1))},w=()=>{var e;b.value=(null===(e=a.value)||void 0===e?void 0:e.duration)||0},V=()=>{var e;u.value=(null===(e=a.value)||void 0===e?void 0:e.currentTime)||0},I=()=>{d.value=!1},S=()=>{l.loop?(x(0),k()):C()},L=()=>{var e;O.value=null!==(e=a.value)&&void 0!==e&&e.buffered.length?a.value.buffered.end(a.value.buffered.length-1):0},B=()=>ne["a"].error("视频加载失败"),_=e=>{if(!a.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-o(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const c=l*b.value;a.value.currentTime=c,u.value=c},T=e=>{if(!a.value||!r.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX;let l=(t-o(r.value))/r.value.clientWidth;l=Math.max(l,0),l=Math.min(l,1);const c=l*b.value;a.value.currentTime=c,u.value=c,document.removeEventListener("mousemove",_),document.removeEventListener("touchmove",_),document.removeEventListener("mouseup",T),document.removeEventListener("touchend",T)},M=()=>{document.addEventListener("mousemove",_),document.addEventListener("touchmove",_),document.addEventListener("mouseup",T),document.addEventListener("touchend",T)},D=e=>{if(!i.value)return;const t="clientX"in e?e.clientX:e.changedTouches[0].clientX,l=(t-o(i.value))/45;E(l)},z=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("touchmove",D),document.removeEventListener("mouseup",z),document.removeEventListener("touchend",z)},A=()=>{document.addEventListener("mousemove",D),document.addEventListener("touchmove",D),document.addEventListener("mouseup",z),document.addEventListener("touchend",z)},F=e=>{if(!i.value)return;const t=(e.clientX-o(i.value))/45;E(t)},$=e=>{if(b.value&&r.value){const t=r.value.getBoundingClientRect().left,l=e.clientX-t;if(l<0||l>r.value.offsetWidth)return;const n=b.value*(l/r.value.offsetWidth);f.value=l-(n>=3600?25:20)+"px",p.value=c(n),m.value=!0}},R=()=>{a.value&&(a.value.muted?(a.value.muted=!1,E(.5)):(a.value.muted=!0,E(0)))};return t({toggle:N}),(t,l)=>{const c=Object(n["resolveComponent"])("IconPlayOne"),o=Object(n["resolveComponent"])("IconPause"),u=Object(n["resolveComponent"])("IconVolumeMute"),b=Object(n["resolveComponent"])("IconVolumeNotice"),O=Object(n["resolveComponent"])("IconVolumeSmall");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"audio-player",style:Object(n["normalizeStyle"])({transform:`scale(${1/e.scale})`})},[Object(n["createElementVNode"])("audio",{class:"audio",ref_key:"audioRef",ref:a,src:e.src,autoplay:e.autoplay,onDurationchange:l[0]||(l[0]=e=>w()),onTimeupdate:l[1]||(l[1]=e=>V()),onPlay:l[2]||(l[2]=e=>I()),onEnded:l[3]||(l[3]=e=>S()),onProgress:l[4]||(l[4]=e=>L()),onError:l[5]||(l[5]=e=>B())},null,40,ga),Object(n["createElementVNode"])("div",xa,[Object(n["createElementVNode"])("div",ka,[Object(n["createElementVNode"])("div",{class:"icon play-icon",onClick:l[6]||(l[6]=e=>N())},[Object(n["createElementVNode"])("span",Ca,[d.value?(Object(n["openBlock"])(),Object(n["createBlock"])(c,{key:0})):(Object(n["openBlock"])(),Object(n["createBlock"])(o,{key:1}))])]),Object(n["createElementVNode"])("div",Na,[Object(n["createElementVNode"])("div",{class:"icon volume-icon",onClick:l[7]||(l[7]=e=>R())},[Object(n["createElementVNode"])("span",Ea,[0===s.value?(Object(n["openBlock"])(),Object(n["createBlock"])(u,{key:0})):1===s.value?(Object(n["openBlock"])(),Object(n["createBlock"])(b,{key:1})):(Object(n["openBlock"])(),Object(n["createBlock"])(O,{key:2}))])]),Object(n["createElementVNode"])("div",{class:"volume-bar-wrap",onMousedown:l[8]||(l[8]=e=>A()),onTouchstart:l[9]||(l[9]=e=>A()),onClick:l[10]||(l[10]=e=>F(e))},[Object(n["createElementVNode"])("div",{class:"volume-bar",ref_key:"volumeBarRef",ref:i},[Object(n["createElementVNode"])("div",{class:"volume-bar-inner",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(g)})},Va,4)],512)],32)])]),Object(n["createElementVNode"])("span",Ia,[Object(n["createElementVNode"])("span",Sa,Object(n["toDisplayString"])(Object(n["unref"])(j)),1),Object(n["createTextVNode"])(" / "),Object(n["createElementVNode"])("span",La,Object(n["toDisplayString"])(Object(n["unref"])(v)),1)]),Object(n["createElementVNode"])("div",{class:"bar-wrap",ref_key:"playBarWrap",ref:r,onMousedown:l[11]||(l[11]=e=>M()),onTouchstart:l[12]||(l[12]=e=>M()),onMousemove:l[13]||(l[13]=e=>$(e)),onMouseenter:l[14]||(l[14]=e=>m.value=!0),onMouseleave:l[15]||(l[15]=e=>m.value=!1)},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["bar-time",{hidden:!m.value}]),style:Object(n["normalizeStyle"])({left:f.value})},Object(n["toDisplayString"])(p.value),7),Object(n["createElementVNode"])("div",Ba,[Object(n["createElementVNode"])("div",{class:"loaded",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(y)})},null,4),Object(n["createElementVNode"])("div",{class:"played",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(h)})},Ta,4)])],544)])],4)}}});l("3929");const Da=Yt()(Ma,[["__scopeId","data-v-121f3d11"]]);var za=Da,Aa=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},selectElement:{type:Function,required:!0},contextmenus:{type:Function}},setup(e){const t=e,{canvasScale:l,handleElementId:c}=Object(o["c"])(z()),{viewportRatio:a}=Object(o["c"])(T()),r=Object(n["computed"])(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),i=Object(n["computed"])(()=>{const e=Ve,c=Ve*a.value,n=280/l.value,o=50/l.value,r=t.elementInfo.width,i=t.elementInfo.height,s=t.elementInfo.left,d=t.elementInfo.top;let u=0,b=i;return s+n>=e&&(u=r-n),d+i+o>=c&&(b=-o),{left:u+"px",top:b+"px"}}),s=e=>{t.elementInfo.lock||(e.stopPropagation(),t.selectElement(e,t.elementInfo))};return(t,o)=>{const a=Object(n["resolveComponent"])("IconVolumeNotice"),d=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["editable-element-audio",{lock:e.elementInfo.lock}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"element-content",onMousedown:o[1]||(o[1]=e=>s(e)),onTouchstart:o[2]||(o[2]=e=>s(e))},[Object(n["createVNode"])(a,{class:"audio-icon",style:Object(n["normalizeStyle"])({fontSize:Object(n["unref"])(r),color:e.elementInfo.color})},null,8,["style"]),Object(n["unref"])(c)===e.elementInfo.id?(Object(n["openBlock"])(),Object(n["createBlock"])(za,{key:0,class:"audio-player",style:Object(n["normalizeStyle"])({...Object(n["unref"])(i)}),src:e.elementInfo.src,loop:e.elementInfo.loop,scale:Object(n["unref"])(l),onMousedown:o[0]||(o[0]=Object(n["withModifiers"])(()=>{},["stop"]))},null,8,["style","src","loop","scale"])):Object(n["createCommentVNode"])("",!0)],32)),[[d,e.contextmenus]])],4)],6)}}});l("75e6");const Fa=Yt()(Aa,[["__scopeId","data-v-001bfbc4"]]);var $a=Fa;const Ra=["id"];var Pa=Object(n["defineComponent"])({__name:"EditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},isMultiSelect:{type:Boolean,required:!0},selectElement:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>{const e={[Se.IMAGE]:Nc,[Se.TEXT]:Dn,[Se.SHAPE]:Kn,[Se.LINE]:so,[Se.CHART]:jo,[Se.TABLE]:zo,[Se.LATEX]:Ho,[Se.VIDEO]:ha,[Se.AUDIO]:$a};return e[t.elementInfo.type]||null}),{orderElement:c}=Ue(),{alignElementToCanvas:o}=Al(),{combineElements:a,uncombineElements:r}=Re(),{deleteElement:i}=$e(),{lockElement:s,unlockElement:d}=Fe(),{copyElement:u,pasteElement:b,cutElement:O}=Pe(),{selectAllElement:m}=He(),p=()=>t.elementInfo.lock?[{text:"解锁",handler:()=>d(t.elementInfo)}]:[{text:"剪切",subText:"Ctrl + X",handler:O},{text:"复制",subText:"Ctrl + C",handler:u},{text:"粘贴",subText:"Ctrl + V",handler:b},{divider:!0},{text:"水平居中",handler:()=>o(J.HORIZONTAL),children:[{text:"水平垂直居中",handler:()=>o(J.CENTER)},{text:"水平居中",handler:()=>o(J.HORIZONTAL)},{text:"左对齐",handler:()=>o(J.LEFT)},{text:"右对齐",handler:()=>o(J.RIGHT)}]},{text:"垂直居中",handler:()=>o(J.VERTICAL),children:[{text:"水平垂直居中",handler:()=>o(J.CENTER)},{text:"垂直居中",handler:()=>o(J.VERTICAL)},{text:"顶部对齐",handler:()=>o(J.TOP)},{text:"底部对齐",handler:()=>o(J.BOTTOM)}]},{divider:!0},{text:"置于顶层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>c(t.elementInfo,W.TOP),children:[{text:"置于顶层",handler:()=>c(t.elementInfo,W.TOP)},{text:"上移一层",handler:()=>c(t.elementInfo,W.UP)}]},{text:"置于底层",disable:t.isMultiSelect&&!t.elementInfo.groupId,handler:()=>c(t.elementInfo,W.BOTTOM),children:[{text:"置于底层",handler:()=>c(t.elementInfo,W.BOTTOM)},{text:"下移一层",handler:()=>c(t.elementInfo,W.DOWN)}]},{divider:!0},{text:"设置链接",handler:t.openLinkDialog},{text:t.elementInfo.groupId?"取消组合":"组合",subText:"Ctrl + G",handler:t.elementInfo.groupId?r:a,hide:!t.isMultiSelect},{text:"全选",subText:"Ctrl + A",handler:m},{text:"锁定",subText:"Ctrl + L",handler:s},{text:"删除",subText:"Delete",handler:i}];return(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"editable-element",ref:"elementRef",id:"editable-element-"+e.elementInfo.id,style:Object(n["normalizeStyle"])({zIndex:e.elementIndex})},[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(l)),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:p},null,8,["elementInfo","selectElement"]))],12,Ra))}});const Ha=Pa;var qa=Ha,Ua=Object(n["defineComponent"])({__name:"MouseSelection",props:{top:{type:Number,required:!0},left:{type:Number,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0},quadrant:{type:Number,required:!0,validator(e){return[1,2,3,4].includes(e)}}},setup(e){return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])("mouse-selection quadrant-"+e.quadrant),style:Object(n["normalizeStyle"])({top:e.top+"px",left:e.left+"px",width:e.width+"px",height:e.height+"px"})},null,6))}});l("4b9a");const Ga=Yt()(Ua,[["__scopeId","data-v-0d6c0f73"]]);var Xa=Ga;const Ya={class:"grid-lines"},Za=["d","stroke"];var Wa=Object(n["defineComponent"])({__name:"GridLines",setup(e){const{canvasScale:t,gridLineSize:l}=Object(o["c"])(z()),{currentSlide:c,viewportRatio:a}=Object(o["c"])(T()),r=Object(n["computed"])(()=>{var e;return null===(e=c.value)||void 0===e?void 0:e.background}),i=Object(n["computed"])(()=>{var e;const t=(null===(e=r.value)||void 0===e?void 0:e.color)||"#fff",l=["#000","#fff"];return I.a.mostReadable(t,l,{includeFallbackColors:!0}).setAlpha(.5).toRgbString()}),s=Object(n["computed"])(()=>{const e=Ve,t=Ve*a.value;let c="";for(let n=0;n<=Math.floor(t/l.value);n++)c+=`M0 ${n*l.value} L${e} ${n*l.value} `;for(let n=0;n<=Math.floor(e/l.value);n++)c+=`M${n*l.value} 0 L${n*l.value} ${t} `;return c});return(e,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",Ya,[Object(n["createElementVNode"])("path",{style:Object(n["normalizeStyle"])({transform:`scale(${Object(n["unref"])(t)})`}),d:Object(n["unref"])(s),fill:"none",stroke:Object(n["unref"])(i),"stroke-width":"0.3","stroke-dasharray":"5"},null,12,Za)]))}});l("dd7b");const Ja=Yt()(Wa,[["__scopeId","data-v-aebac580"]]);var Ka=Ja,Qa=e=>{const t=Object(n["computed"])(()=>{if(!e.value)return{backgroundColor:"#fff"};const{type:t,color:l,image:c,imageSize:n,gradientColor:o,gradientRotate:a,gradientType:r}=e.value;if("solid"===t)return{backgroundColor:l};if("image"===t)return c?"repeat"===n?{backgroundImage:"url("+c,backgroundRepeat:"repeat",backgroundSize:"contain"}:{backgroundImage:"url("+c,backgroundRepeat:"no-repeat",backgroundSize:n||"cover"}:{backgroundColor:"#fff"};if("gradient"===t){const e=a||0,t=o?o[0]:"#fff",l=o?o[1]:"#fff";return"radial"===r?{backgroundImage:`radial-gradient(${t}, ${l}`}:{backgroundImage:`linear-gradient(${e}deg, ${t}, ${l}`}}return{backgroundColor:"#fff"}});return{backgroundStyle:t}},er=Object(n["defineComponent"])({__name:"ViewportBackground",setup(e){const{gridLineSize:t}=Object(o["c"])(z()),{currentSlide:l}=Object(o["c"])(T()),c=Object(n["computed"])(()=>{var e;return null===(e=l.value)||void 0===e?void 0:e.background}),{backgroundStyle:a}=Qa(c);return(e,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"viewport-background",style:Object(n["normalizeStyle"])(Object(n["unref"])(a))},[Object(n["unref"])(t)?(Object(n["openBlock"])(),Object(n["createBlock"])(Ka,{key:0})):Object(n["createCommentVNode"])("",!0)],4))}});l("5977");const tr=Yt()(er,[["__scopeId","data-v-61c4db4a"]]);var lr=tr,cr=Object(n["defineComponent"])({__name:"AlignmentLine",props:{type:{type:String,required:!0},axis:{type:Object,required:!0},length:{type:Number,required:!0},canvasScale:{type:Number,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>t.axis.x*t.canvasScale+"px"),c=Object(n["computed"])(()=>t.axis.y*t.canvasScale+"px"),o=Object(n["computed"])(()=>"vertical"===t.type?{height:t.length*t.canvasScale+"px"}:{width:t.length*t.canvasScale+"px"});return(t,a)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"alignment-line",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(l),top:Object(n["unref"])(c)})},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["line",e.type]),style:Object(n["normalizeStyle"])(Object(n["unref"])(o))},null,6)],4))}});l("5688");const nr=Yt()(cr,[["__scopeId","data-v-37fa6068"]]);var or=nr;const ar={class:"ruler"};var rr=Object(n["defineComponent"])({__name:"Ruler",props:{viewportStyles:{type:Object,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(o["c"])(z()),c=Object(n["computed"])(()=>t.viewportStyles.width*l.value/10);return(t,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ar,[Object(n["createElementVNode"])("div",{class:"h",style:Object(n["normalizeStyle"])({width:e.viewportStyles.width*Object(n["unref"])(l)+"px",left:e.viewportStyles.left+"px"})},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(20,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["ruler-marker-100",{hide:Object(n["unref"])(c)<36,omit:Object(n["unref"])(c)<72}]),key:"marker-100-"+e},[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e),1)],2)),64))],4),Object(n["createElementVNode"])("div",{class:"v",style:Object(n["normalizeStyle"])({height:e.viewportStyles.height*Object(n["unref"])(l)+"px",top:e.viewportStyles.top+"px"})},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(20,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["ruler-marker-100",{hide:Object(n["unref"])(c)<36,omit:Object(n["unref"])(c)<72}]),key:e,style:Object(n["normalizeStyle"])({height:Object(n["unref"])(c)+"px"})},[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e),1)],6)),64))],4)]))}});l("f126");const ir=Yt()(rr,[["__scopeId","data-v-0f6bb088"]]);var sr=ir;const dr=["width","height"],ur=["d"];var br=Object(n["defineComponent"])({__name:"ElementCreateSelection",emits:["created"],setup(e,{emit:t}){const l=z(),{creatingElement:c}=Object(o["c"])(l),{ctrlOrShiftKeyActive:a}=Object(o["c"])(G()),r=Object(n["ref"])(),i=Object(n["ref"])(),s=Object(n["ref"])(),d=Object(n["ref"])({x:0,y:0});Object(n["onMounted"])(()=>{if(!s.value)return;const{x:e,y:t}=s.value.getBoundingClientRect();d.value={x:e,y:t}});const u=e=>{let n=!0;const o=e.pageX,s=e.pageY;r.value=[o,s],document.onmousemove=e=>{if(!c.value||!n)return;let t=e.pageX,l=e.pageY;if(a.value){const e=t-o,n=l-s,a=Math.abs(e),r=Math.abs(n);if("shape"===c.value.type){const c=n>0&&e<0||n<0&&e>0;a>r?l=c?s-e:s+e:t=c?o-n:o+n}else"line"===c.value.type&&(a>r?l=s:t=o)}i.value=[t,l]},document.onmouseup=e=>{var a,d;if(document.onmousemove=null,document.onmouseup=null,2===e.button)return void setTimeout(()=>l.setCreatingElement(null),0);n=!1;const u=e.pageX,b=e.pageY,O=30;if("line"===(null===(a=c.value)||void 0===a?void 0:a.type)&&(Math.abs(u-o)>=O||Math.abs(b-s)>=O))t("created",{start:r.value,end:i.value});else if("line"!==(null===(d=c.value)||void 0===d?void 0:d.type)&&Math.abs(u-o)>=O&&Math.abs(b-s)>=O)t("created",{start:r.value,end:i.value});else{const e=200,l=Math.min(u,o),c=Math.min(b,s),n=Math.max(u,o),a=Math.max(b,s),r=n-l>=O?n-l:e,i=a-c>=O?a-c:e;t("created",{start:[l,c],end:[l+r,c+i]})}}},b=Object(n["computed"])(()=>{if(!r.value||!i.value)return null;if(!c.value||"line"!==c.value.type)return null;const[e,t]=r.value,[l,n]=i.value,o=Math.min(e,l),a=Math.max(e,l),s=Math.min(t,n),d=Math.max(t,n),u=a-o>=24?a-o:24,b=d-s>=24?d-s:24,O=e===o?0:a-o,m=t===s?0:d-s,p=l===o?0:a-o,f=n===s?0:d-s,j=`M${O}, ${m} L${p}, ${f}`;return{svgWidth:u,svgHeight:b,startX:O,startY:m,endX:p,endY:f,path:j}}),O=Object(n["computed"])(()=>{if(!r.value||!i.value)return{};const[e,t]=r.value,[l,c]=i.value,n=Math.min(e,l),o=Math.max(e,l),a=Math.min(t,c),s=Math.max(t,c),u=o-n,b=s-a;return{left:n-d.value.x+"px",top:a-d.value.y+"px",width:u+"px",height:b+"px"}});return(e,t)=>{var l,o;return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"element-create-selection",ref_key:"selectionRef",ref:s,onMousedown:t[0]||(t[0]=Object(n["withModifiers"])(e=>u(e),["stop"])),onContextmenu:t[1]||(t[1]=Object(n["withModifiers"])(()=>{},["stop","prevent"]))},[r.value&&i.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:Object(n["normalizeClass"])(["selection",null===(l=Object(n["unref"])(c))||void 0===l?void 0:l.type]),style:Object(n["normalizeStyle"])(Object(n["unref"])(O))},["line"===(null===(o=Object(n["unref"])(c))||void 0===o?void 0:o.type)&&Object(n["unref"])(b)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{key:0,overflow:"visible",width:Object(n["unref"])(b).svgWidth,height:Object(n["unref"])(b).svgHeight},[Object(n["createElementVNode"])("path",{d:Object(n["unref"])(b).path,stroke:"#d14424",fill:"none","stroke-width":"2"},null,8,ur)],8,dr)):Object(n["createCommentVNode"])("",!0)],6)):Object(n["createCommentVNode"])("",!0)],544)}}});l("7aed");const Or=Yt()(br,[["__scopeId","data-v-5a941f07"]]);var mr=Or,pr=(e,t)=>{const l=Object(n["computed"])(()=>[{direction:Q.LEFT_TOP,style:{}},{direction:Q.TOP,style:{left:e.value/2+"px"}},{direction:Q.RIGHT_TOP,style:{left:e.value+"px"}},{direction:Q.LEFT,style:{top:t.value/2+"px"}},{direction:Q.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}},{direction:Q.LEFT_BOTTOM,style:{top:t.value+"px"}},{direction:Q.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}},{direction:Q.RIGHT_BOTTOM,style:{left:e.value+"px",top:t.value+"px"}}]),c=Object(n["computed"])(()=>[{direction:Q.LEFT,style:{top:t.value/2+"px"}},{direction:Q.RIGHT,style:{left:e.value+"px",top:t.value/2+"px"}}]),o=Object(n["computed"])(()=>[{direction:Q.TOP,style:{left:e.value/2+"px"}},{direction:Q.BOTTOM,style:{left:e.value/2+"px",top:t.value+"px"}}]),a=Object(n["computed"])(()=>[{type:K.T,style:{width:e.value+"px"}},{type:K.B,style:{top:t.value+"px",width:e.value+"px"}},{type:K.L,style:{height:t.value+"px"}},{type:K.R,style:{left:e.value+"px",height:t.value+"px"}}]);return{resizeHandlers:l,textElementResizeHandlers:c,verticalTextElementResizeHandlers:o,borderLines:a}},fr=Object(n["defineComponent"])({__name:"ResizeHandler",props:{type:{type:String,default:""},rotate:{type:Number,default:0}},setup(e){const t=e,l=Object(n["computed"])(()=>{const e="rotate-",l=t.rotate;return l>-22.5&&l<=22.5?e+0:l>22.5&&l<=67.5?e+45:l>67.5&&l<=112.5?e+90:l>112.5&&l<=157.5?e+135:l>157.5||l<=-157.5?e+0:l>-157.5&&l<=-112.5?e+45:l>-112.5&&l<=-67.5?e+90:l>-67.5&&l<=-22.5?e+135:e+0});return(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["resize-handler",Object(n["unref"])(l),e.type])},null,2))}});l("b510");const jr=Yt()(fr,[["__scopeId","data-v-881ee3f8"]]);var vr=jr,hr=Object(n["defineComponent"])({__name:"BorderLine",props:{type:{type:String,required:!0},isWide:{type:Boolean,default:!1}},setup(e){return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["border-line",e.type,{wide:e.isWide}])},null,2))}});l("2460");const yr=Yt()(hr,[["__scopeId","data-v-7170d1be"]]);var gr=yr,xr=Object(n["defineComponent"])({__name:"MultiSelectOperate",props:{elementList:{type:Array,required:!0},scaleMultiElement:{type:Function,required:!0}},setup(e){const t=e,{activeElementIdList:l,canvasScale:c}=Object(o["c"])(z()),a=Object(n["computed"])(()=>t.elementList.filter(e=>l.value.includes(e.id))),r=Object(n["ref"])({minX:0,maxX:0,minY:0,maxY:0}),i=Object(n["computed"])(()=>(r.value.maxX-r.value.minX)*c.value),s=Object(n["computed"])(()=>(r.value.maxY-r.value.minY)*c.value),{resizeHandlers:d,borderLines:u}=pr(i,s),b=()=>{const{minX:e,maxX:t,minY:l,maxY:c}=he(a.value);r.value={minX:e,maxX:t,minY:l,maxY:c}};Object(n["watchEffect"])(b);const O=Object(n["computed"])(()=>a.value.some(e=>!!("image"!==e.type&&"shape"!==e.type||e.rotate)));return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"multi-select-operate",style:Object(n["normalizeStyle"])({left:r.value.minX*Object(n["unref"])(c)+"px",top:r.value.minY*Object(n["unref"])(c)+"px"})},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(u),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(gr,{key:e.type,type:e.type,style:Object(n["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),Object(n["unref"])(O)?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],{key:0},Object(n["renderList"])(Object(n["unref"])(d),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{key:t.direction,type:t.direction,style:Object(n["normalizeStyle"])(t.style),onMousedown:Object(n["withModifiers"])(l=>e.scaleMultiElement(l,r.value,t.direction),["stop"])},null,8,["type","style","onMousedown"]))),128))],4))}});l("a669");const kr=Yt()(xr,[["__scopeId","data-v-defbd922"]]);var Cr=kr;const Nr={class:"rotate-handler"};function Er(e,t){return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Nr)}l("1ebd");const wr={},Vr=Yt()(wr,[["render",Er],["__scopeId","data-v-b99d8dae"]]);var Ir=Vr;const Sr={inheritAttrs:!1};var Lr=Object(n["defineComponent"])({...Sr,__name:"ImageElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l,clipingImageElementId:c}=Object(o["c"])(z()),a=Object(n["computed"])(()=>c.value===t.elementInfo.id),r=Object(n["computed"])(()=>t.elementInfo.width*l.value),i=Object(n["computed"])(()=>t.elementInfo.height*l.value),{resizeHandlers:s,borderLines:d}=pr(r,i);return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["image-element-operate",{cliping:Object(n["unref"])(a)}])},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(d),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(gr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(n["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(s),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(n["normalizeStyle"])(t.style),onMousedown:Object(n["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(n["createVNode"])(Ir,{class:"operate-rotate-handler",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(r)/2+"px"}),onMousedown:l[0]||(l[0]=Object(n["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"])],64)):Object(n["createCommentVNode"])("",!0)],2))}});l("ae9f");const Br=Yt()(Lr,[["__scopeId","data-v-46b250c2"]]);var _r=Br;const Tr={class:"text-element-operate"},Mr={inheritAttrs:!1};var Dr=Object(n["defineComponent"])({...Mr,__name:"TextElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(o["c"])(z()),c=Object(n["computed"])(()=>t.elementInfo.width*l.value),a=Object(n["computed"])(()=>t.elementInfo.height*l.value),{textElementResizeHandlers:r,verticalTextElementResizeHandlers:i,borderLines:s}=pr(c,a),d=Object(n["computed"])(()=>t.elementInfo.vertical?i.value:r.value);return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Tr,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(s),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(gr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(n["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(d),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(n["normalizeStyle"])(t.style),onMousedown:Object(n["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(n["createVNode"])(Ir,{class:"operate-rotate-handler",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(c)/2+"px"}),onMousedown:l[0]||(l[0]=Object(n["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"])],64)):Object(n["createCommentVNode"])("",!0)]))}});const zr=Dr;var Ar=zr;const Fr={class:"shape-element-operate"},$r={inheritAttrs:!1};var Rr=Object(n["defineComponent"])({...$r,__name:"ShapeElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(o["c"])(z()),c=Object(n["computed"])(()=>t.elementInfo.width*l.value),a=Object(n["computed"])(()=>t.elementInfo.height*l.value),{resizeHandlers:r,borderLines:i}=pr(c,a),s=Object(n["computed"])(()=>{if(!t.elementInfo.pathFormula||!t.elementInfo.keypoint)return{};const e=Le[t.elementInfo.pathFormula];if("editable"in e){const c=e.getBaseSize(t.elementInfo.width,t.elementInfo.height)*t.elementInfo.keypoint;if("left"===e.relative)return{left:c*l.value+"px"};if("right"===e.relative)return{left:(t.elementInfo.width-c)*l.value+"px"};if("center"===e.relative)return{left:(t.elementInfo.width-c)/2*l.value+"px"};if("top"===e.relative)return{top:c*l.value+"px"};if("bottom"===e.relative)return{top:(t.elementInfo.height-c)*l.value+"px"}}return{}});return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Fr,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(gr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(n["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(r),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(n["normalizeStyle"])(t.style),onMousedown:Object(n["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(n["createVNode"])(Ir,{class:"operate-rotate-handler",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(c)/2+"px"}),onMousedown:l[0]||(l[0]=Object(n["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"]),void 0!==e.elementInfo.keypoint?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"operate-keypoint-handler",style:Object(n["normalizeStyle"])(Object(n["unref"])(s)),onMousedown:l[1]||(l[1]=Object(n["withModifiers"])(t=>e.moveShapeKeypoint(t,e.elementInfo),["stop"]))},null,36)):Object(n["createCommentVNode"])("",!0)],64)):Object(n["createCommentVNode"])("",!0)]))}});l("614e");const Pr=Yt()(Rr,[["__scopeId","data-v-fd38df18"]]);var Hr=Pr;const qr={class:"line-element-operate"},Ur=["width","height","stroke"],Gr={key:0},Xr=["x1","y1","x2","y2"],Yr=["x1","y1","x2","y2"],Zr=["x1","y1","x2","y2"],Wr=["x1","y1","x2","y2"],Jr={inheritAttrs:!1};var Kr=Object(n["defineComponent"])({...Jr,__name:"LineElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},dragLineElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(o["c"])(z()),c=Object(n["computed"])(()=>Math.max(t.elementInfo.start[0],t.elementInfo.end[0])),a=Object(n["computed"])(()=>Math.max(t.elementInfo.start[1],t.elementInfo.end[1])),r=Object(n["computed"])(()=>{const e=[{handler:ee.START,style:{left:t.elementInfo.start[0]*l.value+"px",top:t.elementInfo.start[1]*l.value+"px"}},{handler:ee.END,style:{left:t.elementInfo.end[0]*l.value+"px",top:t.elementInfo.end[1]*l.value+"px"}}];if(t.elementInfo.curve||t.elementInfo.broken){const c=t.elementInfo.curve||t.elementInfo.broken;e.push({handler:ee.C,style:{left:c[0]*l.value+"px",top:c[1]*l.value+"px"}})}else if(t.elementInfo.cubic){const[c,n]=t.elementInfo.cubic;e.push({handler:ee.C1,style:{left:c[0]*l.value+"px",top:c[1]*l.value+"px"}}),e.push({handler:ee.C2,style:{left:n[0]*l.value+"px",top:n[1]*l.value+"px"}})}return e});return(t,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",qr,[e.handlerVisible?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(r),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{class:"operate-resize-handler",key:t.handler,style:Object(n["normalizeStyle"])(t.style),onMousedown:Object(n["withModifiers"])(l=>e.dragLineElement(l,e.elementInfo,t.handler),["stop"])},null,8,["style","onMousedown"]))),128)),(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{width:Object(n["unref"])(c)||1,height:Object(n["unref"])(a)||1,stroke:e.elementInfo.color,overflow:"visible",style:Object(n["normalizeStyle"])({transform:`scale(${Object(n["unref"])(l)})`})},[e.elementInfo.curve?(Object(n["openBlock"])(),Object(n["createElementBlock"])("g",Gr,[Object(n["createElementVNode"])("line",{class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,Xr),Object(n["createElementVNode"])("line",{class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:e.elementInfo.curve[0],y2:e.elementInfo.curve[1]},null,8,Yr)])):Object(n["createCommentVNode"])("",!0),e.elementInfo.cubic?(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],{key:1},Object(n["renderList"])(e.elementInfo.cubic,(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("g",{key:l},[0===l?(Object(n["openBlock"])(),Object(n["createElementBlock"])("line",{key:0,class:"anchor-line",x1:e.elementInfo.start[0],y1:e.elementInfo.start[1],x2:t[0],y2:t[1]},null,8,Zr)):Object(n["createCommentVNode"])("",!0),1===l?(Object(n["openBlock"])(),Object(n["createElementBlock"])("line",{key:1,class:"anchor-line",x1:e.elementInfo.end[0],y1:e.elementInfo.end[1],x2:t[0],y2:t[1]},null,8,Wr)):Object(n["createCommentVNode"])("",!0)]))),128)):Object(n["createCommentVNode"])("",!0)],12,Ur))],64)):Object(n["createCommentVNode"])("",!0)]))}});l("fac9");const Qr=Yt()(Kr,[["__scopeId","data-v-4659f395"]]);var ei=Qr;const ti={class:"table-element-operate"},li={inheritAttrs:!1};var ci=Object(n["defineComponent"])({...li,__name:"TableElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(o["c"])(z()),c=Object(n["computed"])(()=>t.elementInfo.outline.width||1),a=Object(n["computed"])(()=>(t.elementInfo.width+c.value)*l.value),r=Object(n["computed"])(()=>t.elementInfo.height*l.value),{resizeHandlers:i,borderLines:s}=pr(a,r);return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ti,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(s),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(gr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(n["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(n["normalizeStyle"])(t.style),onMousedown:Object(n["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(n["createVNode"])(Ir,{class:"operate-rotate-handler",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(a)/2+"px"}),onMousedown:l[0]||(l[0]=Object(n["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"])],64)):Object(n["createCommentVNode"])("",!0)]))}});const ni=ci;var oi=ni;const ai={class:"common-element-operate"},ri={inheritAttrs:!1};var ii=Object(n["defineComponent"])({...ri,__name:"CommonElementOperate",props:{elementInfo:{type:Object,required:!0},handlerVisible:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l}=Object(o["c"])(z()),c=Object(n["computed"])(()=>t.elementInfo.width*l.value),a=Object(n["computed"])(()=>t.elementInfo.height*l.value),{resizeHandlers:r,borderLines:i}=pr(c,a),s=Object(n["computed"])(()=>["video","audio"].includes(t.elementInfo.type));return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ai,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(gr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(n["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),e.handlerVisible?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(r),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(n["normalizeStyle"])(t.style),onMousedown:Object(n["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onMousedown"]))),128)),Object(n["unref"])(s)?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createBlock"])(Ir,{key:0,class:"operate-rotate-handler",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(c)/2+"px"}),onMousedown:l[0]||(l[0]=Object(n["withModifiers"])(t=>e.rotateElement(e.elementInfo),["stop"]))},null,8,["style"]))],64)):Object(n["createCommentVNode"])("",!0)]))}});const si=ii;var di=si,ui=(l("55ec"),l("a79d")),bi=()=>{const e=T(),{addHistorySnapshot:t}=Te(),l=(l,c)=>{const n=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if("web"===c.type&&!n.test(c.target))return ne["a"].error("不是正确的网页链接地址"),!1;if("slide"===c.type&&!c.target)return ne["a"].error("请先选择链接目标"),!1;const o={link:c};return e.updateElement({id:l.id,props:o}),t(),!0},c=l=>{e.removeElementProps({id:l.id,propName:"link"}),t()};return{setLink:l,removeLink:c}};const Oi=["href"],mi={class:"btns"};var pi=Object(n["defineComponent"])({__name:"LinkHandler",props:{elementInfo:{type:Object,required:!0},link:{type:Object,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,l=z(),c=T(),{canvasScale:a}=Object(o["c"])(l),{slides:r}=Object(o["c"])(c),{removeLink:i}=bi(),s=Object(n["computed"])(()=>"line"===t.elementInfo.type?0:t.elementInfo.height),d=e=>{const t=r.value.findIndex(t=>t.id===e);-1!==t&&(l.setActiveElementIdList([]),c.updateSlideIndex(t))};return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"link-handler",style:Object(n["normalizeStyle"])({top:Object(n["unref"])(s)*Object(n["unref"])(a)+10+"px"})},["web"===e.link.type?(Object(n["openBlock"])(),Object(n["createElementBlock"])("a",{key:0,class:"link",href:e.link.target,target:"_blank"},Object(n["toDisplayString"])(e.link.target),9,Oi)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("a",{key:1,class:"link",onClick:l[0]||(l[0]=t=>d(e.link.target))},"幻灯片页面 "+Object(n["toDisplayString"])(e.link.target),1)),Object(n["createElementVNode"])("div",mi,[Object(n["createElementVNode"])("div",{class:"btn",onClick:l[1]||(l[1]=t=>e.openLinkDialog())},"更换"),Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{type:"vertical"}),Object(n["createElementVNode"])("div",{class:"btn",onClick:l[2]||(l[2]=t=>Object(n["unref"])(i)(e.elementInfo))},"移除")])],4))}});l("c6c4");const fi=Yt()(pi,[["__scopeId","data-v-12300fd5"]]);var ji=fi;const vi={key:1,class:"animation-index"};var hi=Object(n["defineComponent"])({__name:"index",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},isActive:{type:Boolean,required:!0},isActiveGroupElement:{type:Boolean,required:!0},isMultiSelect:{type:Boolean,required:!0},rotateElement:{type:Function,required:!0},scaleElement:{type:Function,required:!0},dragLineElement:{type:Function,required:!0},moveShapeKeypoint:{type:Function,required:!0},openLinkDialog:{type:Function,required:!0}},setup(e){const t=e,{canvasScale:l,toolbarState:c}=Object(o["c"])(z()),{formatedAnimations:a}=Object(o["c"])(T()),r=Object(n["computed"])(()=>{const e={[Se.IMAGE]:_r,[Se.TEXT]:Ar,[Se.SHAPE]:Hr,[Se.LINE]:ei,[Se.TABLE]:oi,[Se.CHART]:di,[Se.LATEX]:di,[Se.VIDEO]:di,[Se.AUDIO]:di};return e[t.elementInfo.type]||null}),i=Object(n["computed"])(()=>{const e=[];for(let l=0;l<a.value.length;l++){const c=a.value[l].animations.map(e=>e.elId);c.includes(t.elementInfo.id)&&e.push(l)}return e}),s=Object(n["computed"])(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),d=Object(n["computed"])(()=>"height"in t.elementInfo?t.elementInfo.height:0);return(t,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["operate",{"multi-select":e.isMultiSelect&&!e.isActive}]),style:Object(n["normalizeStyle"])({top:e.elementInfo.top*Object(n["unref"])(l)+"px",left:e.elementInfo.left*Object(n["unref"])(l)+"px",transform:`rotate(${Object(n["unref"])(s)}deg)`,transformOrigin:`${e.elementInfo.width*Object(n["unref"])(l)/2}px ${Object(n["unref"])(d)*Object(n["unref"])(l)/2}px`})},[e.isSelected?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(r)),{key:0,elementInfo:e.elementInfo,handlerVisible:!e.elementInfo.lock&&(e.isActiveGroupElement||!e.isMultiSelect),rotateElement:e.rotateElement,scaleElement:e.scaleElement,dragLineElement:e.dragLineElement,moveShapeKeypoint:e.moveShapeKeypoint},null,8,["elementInfo","handlerVisible","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])):Object(n["createCommentVNode"])("",!0),"elAnimation"===Object(n["unref"])(c)&&Object(n["unref"])(i).length?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",vi,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"index-item",key:e},Object(n["toDisplayString"])(e+1),1))),128))])):Object(n["createCommentVNode"])("",!0),e.isActive&&e.elementInfo.link?(Object(n["openBlock"])(),Object(n["createBlock"])(ji,{key:2,elementInfo:e.elementInfo,link:e.elementInfo.link,openLinkDialog:e.openLinkDialog,onMousedown:o[0]||(o[0]=Object(n["withModifiers"])(()=>{},["stop"]))},null,8,["elementInfo","link","openLinkDialog"])):Object(n["createCommentVNode"])("",!0)],6))}});l("624e");const yi=Yt()(hi,[["__scopeId","data-v-26f9c48a"]]);var gi=yi,xi=(l("6ba6"),l("5efb")),ki=(l("5704"),l("b558")),Ci=(l("2ef0f"),l("9839"));const Ni=["src"];var Ei=Object(n["defineComponent"])({__name:"BaseImageElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:c}=Fl(l),o=Object(n["computed"])(()=>t.elementInfo.flipH),a=Object(n["computed"])(()=>t.elementInfo.flipV),{flipStyle:r}=$l(o,a),i=Object(n["computed"])(()=>t.elementInfo.clip),{clipShape:s,imgPosition:d}=Pl(i),u=Object(n["computed"])(()=>t.elementInfo.filters),{filter:b}=Hl(u);return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-image",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({filter:Object(n["unref"])(c)?`drop-shadow(${Object(n["unref"])(c)})`:"",transform:Object(n["unref"])(r)})},[Object(n["createVNode"])(sc,{elementInfo:e.elementInfo},null,8,["elementInfo"]),Object(n["createElementVNode"])("div",{class:"image-content",style:Object(n["normalizeStyle"])({clipPath:Object(n["unref"])(s).style})},[Object(n["createElementVNode"])("img",{src:e.elementInfo.src,draggable:!1,style:Object(n["normalizeStyle"])({top:Object(n["unref"])(d).top,left:Object(n["unref"])(d).left,width:Object(n["unref"])(d).width,height:Object(n["unref"])(d).height,filter:Object(n["unref"])(b)}),alt:""},null,12,Ni),e.elementInfo.colorMask?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"color-mask",style:Object(n["normalizeStyle"])({backgroundColor:e.elementInfo.colorMask.color,opacity:e.elementInfo.colorMask.opacity})},null,4)):Object(n["createCommentVNode"])("",!0)],4)],4)],4)],4))}});l("4c0e");const wi=Yt()(Ei,[["__scopeId","data-v-c874e65e"]]);var Vi=wi;const Ii=["innerHTML"];var Si=Object(n["defineComponent"])({__name:"BaseTextElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:c}=Fl(l),o=Object(n["computed"])(()=>({"--textIndent":(t.elementInfo.textIndent||0)+"px","--paragraphSpace":(void 0===t.elementInfo.paragraphSpace?5:t.elementInfo.paragraphSpace)+"px"}));return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-text",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({width:e.elementInfo.vertical?"auto":e.elementInfo.width+"px",height:e.elementInfo.vertical?e.elementInfo.height+"px":"auto",backgroundColor:e.elementInfo.fill,opacity:e.elementInfo.opacity,textShadow:Object(n["unref"])(c),lineHeight:e.elementInfo.lineHeight,letterSpacing:(e.elementInfo.wordSpace||0)+"px",color:e.elementInfo.defaultColor,fontFamily:e.elementInfo.defaultFontName,writingMode:e.elementInfo.vertical?"vertical-rl":"horizontal-tb"})},[Object(n["createVNode"])(Sc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(n["createElementVNode"])("div",{class:"text ProseMirror-static",style:Object(n["normalizeStyle"])(Object(n["unref"])(o)),innerHTML:e.elementInfo.content},null,12,Ii)],4)],4)],4))}});l("5140");const Li=Yt()(Si,[["__scopeId","data-v-18d84242"]]);var Bi=Li;const _i=["width","height"],Ti={key:0},Mi=["transform"],Di=["d","fill","stroke","stroke-width","stroke-dasharray"],zi=["innerHTML"];var Ai=Object(n["defineComponent"])({__name:"BaseShapeElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>t.elementInfo.outline),{outlineWidth:c,outlineStyle:o,outlineColor:a}=ql(l),r=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:i}=Fl(r),s=Object(n["computed"])(()=>t.elementInfo.flipH),d=Object(n["computed"])(()=>t.elementInfo.flipV),{flipStyle:u}=$l(s,d),b=Object(n["computed"])(()=>{const e={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"};return t.elementInfo.text?t.elementInfo.text:e});return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-shape",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({opacity:e.elementInfo.opacity,filter:Object(n["unref"])(i)?`drop-shadow(${Object(n["unref"])(i)})`:"",transform:Object(n["unref"])(u),color:Object(n["unref"])(b).defaultColor,fontFamily:Object(n["unref"])(b).defaultFontName})},[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[e.elementInfo.gradient?(Object(n["openBlock"])(),Object(n["createElementBlock"])("defs",Ti,[Object(n["createVNode"])(Un,{id:"base-gradient-"+e.elementInfo.id,type:e.elementInfo.gradient.type,color1:e.elementInfo.gradient.color[0],color2:e.elementInfo.gradient.color[1],rotate:e.elementInfo.gradient.rotate},null,8,["id","type","color1","color2","rotate"])])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(n["createElementVNode"])("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:e.elementInfo.gradient?`url(#base-gradient-${e.elementInfo.id})`:e.elementInfo.fill,stroke:Object(n["unref"])(a),"stroke-width":Object(n["unref"])(c),"stroke-dasharray":"dashed"===Object(n["unref"])(o)?"10 5":"0 0"},null,8,Di)],8,Mi)],8,_i)),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["shape-text",Object(n["unref"])(b).align])},[Object(n["createElementVNode"])("div",{class:"ProseMirror-static",innerHTML:Object(n["unref"])(b).content},null,8,zi)],2)],4)],4)],4))}});l("8683");const Fi=Yt()(Ai,[["__scopeId","data-v-073084bf"]]);var $i=Fi;const Ri=["width","height"],Pi=["d","stroke","stroke-width","stroke-dasharray","marker-start","marker-end"];var Hi=Object(n["defineComponent"])({__name:"BaseLineElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>t.elementInfo.shadow),{shadowStyle:c}=Fl(l),o=Object(n["computed"])(()=>{const e=Math.abs(t.elementInfo.start[0]-t.elementInfo.end[0]);return e<24?24:e}),a=Object(n["computed"])(()=>{const e=Math.abs(t.elementInfo.start[1]-t.elementInfo.end[1]);return e<24?24:e}),r=Object(n["computed"])(()=>"dashed"===t.elementInfo.style?"10, 5":"0, 0"),i=Object(n["computed"])(()=>Ce(t.elementInfo));return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-line",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px"})},[Object(n["createElementVNode"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({filter:Object(n["unref"])(c)?`drop-shadow(${Object(n["unref"])(c)})`:""})},[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{overflow:"visible",width:Object(n["unref"])(o),height:Object(n["unref"])(a)},[Object(n["createElementVNode"])("defs",null,[e.elementInfo.points[0]?(Object(n["openBlock"])(),Object(n["createBlock"])(co,{key:0,id:e.elementInfo.id,position:"start",type:e.elementInfo.points[0],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(n["createCommentVNode"])("",!0),e.elementInfo.points[1]?(Object(n["openBlock"])(),Object(n["createBlock"])(co,{key:1,id:e.elementInfo.id,position:"end",type:e.elementInfo.points[1],color:e.elementInfo.color,baseSize:e.elementInfo.width},null,8,["id","type","color","baseSize"])):Object(n["createCommentVNode"])("",!0)]),Object(n["createElementVNode"])("path",{d:Object(n["unref"])(i),stroke:e.elementInfo.color,"stroke-width":e.elementInfo.width,"stroke-dasharray":Object(n["unref"])(r),fill:"none","marker-start":e.elementInfo.points[0]?`url(#${e.elementInfo.id}-${e.elementInfo.points[0]}-start)`:"","marker-end":e.elementInfo.points[1]?`url(#${e.elementInfo.id}-${e.elementInfo.points[1]}-end)`:""},null,8,Pi)],8,Ri))],4)],4))}});l("fbfe");const qi=Yt()(Hi,[["__scopeId","data-v-340cdee8"]]);var Ui=qi,Gi=Object(n["defineComponent"])({__name:"BaseChartElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=Object(n["inject"])(vl)||Object(n["ref"])(1),l=Object(n["computed"])(()=>t.value<1),c=Object(n["computed"])(()=>l.value?1/t.value:1);return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-chart",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({backgroundColor:e.elementInfo.fill})},[Object(n["createVNode"])(Sc,{width:e.elementInfo.width,height:e.elementInfo.height,outline:e.elementInfo.outline},null,8,["width","height","outline"]),Object(n["createVNode"])(mo,{width:e.elementInfo.width*Object(n["unref"])(c),height:e.elementInfo.height*Object(n["unref"])(c),type:e.elementInfo.chartType,data:e.elementInfo.data,options:e.elementInfo.options,themeColor:e.elementInfo.themeColor,gridColor:e.elementInfo.gridColor,legends:e.elementInfo.data.legends,legend:e.elementInfo.legend||"",style:Object(n["normalizeStyle"])({zoom:1/Object(n["unref"])(c)})},null,8,["width","height","type","data","options","themeColor","gridColor","legends","legend","style"])],4)],4)],4))}});l("9b4d");const Xi=Yt()(Gi,[["__scopeId","data-v-7d2e5c4e"]]);var Yi=Xi;const Zi=["width"],Wi=["rowspan","colspan"],Ji=["innerHTML"];var Ki=Object(n["defineComponent"])({__name:"StaticTable",props:{data:{type:Array,required:!0},width:{type:Number,required:!0},cellMinHeight:{type:Number,required:!0},colWidths:{type:Array,required:!0},outline:{type:Object,required:!0},theme:{type:Object},editable:{type:Boolean,default:!0}},setup(e){const t=e,l=Object(n["ref"])([]),c=Object(n["computed"])(()=>l.value.reduce((e,t)=>e+t));Object(n["watch"])([()=>t.colWidths,()=>t.width],()=>{l.value=t.colWidths.map(e=>e*t.width)},{immediate:!0});const o=Object(n["computed"])(()=>t.data),{hideCells:a}=yo(o),r=Object(n["computed"])(()=>t.theme),{subThemeColor:i}=go(r);return(t,o)=>{var s,d,u,b,O;return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"static-table",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(c)+"px"})},[Object(n["createElementVNode"])("table",{class:Object(n["normalizeClass"])({theme:Object(n["unref"])(r),"row-header":null===(s=Object(n["unref"])(r))||void 0===s?void 0:s.rowHeader,"row-footer":null===(d=Object(n["unref"])(r))||void 0===d?void 0:d.rowFooter,"col-header":null===(u=Object(n["unref"])(r))||void 0===u?void 0:u.colHeader,"col-footer":null===(b=Object(n["unref"])(r))||void 0===b?void 0:b.colFooter}),style:Object(n["normalizeStyle"])(`--themeColor: ${null===(O=Object(n["unref"])(r))||void 0===O?void 0:O.color}; --subThemeColor1: ${Object(n["unref"])(i)[0]}; --subThemeColor2: ${Object(n["unref"])(i)[1]}`)},[Object(n["createElementVNode"])("colgroup",null,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(l.value,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("col",{span:"1",key:t,width:e},null,8,Zi))),128))]),Object(n["createElementVNode"])("tbody",null,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.data,(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("tr",{key:l,style:Object(n["normalizeStyle"])({height:e.cellMinHeight+"px"})},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(t,(t,c)=>Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("td",{class:"cell",style:Object(n["normalizeStyle"])({borderStyle:e.outline.style,borderColor:e.outline.color,borderWidth:e.outline.width+"px",...Object(n["unref"])(vo)(t.style)}),key:t.id,rowspan:t.rowspan,colspan:t.colspan},[Object(n["createElementVNode"])("div",{class:"cell-text",style:Object(n["normalizeStyle"])({minHeight:e.cellMinHeight-4+"px"}),innerHTML:Object(n["unref"])(ho)(t.text)},null,12,Ji)],12,Wi)),[[n["vShow"],!Object(n["unref"])(a).includes(`${l}_${c}`)]])),128))],4))),128))])],6)],4)}}});l("ae59");const Qi=Yt()(Ki,[["__scopeId","data-v-40e73d4e"]]);var es=Qi;const ts={class:"element-content"};var ls=Object(n["defineComponent"])({__name:"BaseTableElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-table",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",ts,[Object(n["createVNode"])(es,{data:e.elementInfo.data,width:e.elementInfo.width,cellMinHeight:e.elementInfo.cellMinHeight,colWidths:e.elementInfo.colWidths,outline:e.elementInfo.outline,theme:e.elementInfo.theme},null,8,["data","width","cellMinHeight","colWidths","outline","theme"])])],4)],4))}});l("eb6d");const cs=Yt()(ls,[["__scopeId","data-v-6b8ce0be"]]);var ns=cs;const os={class:"element-content"},as=["width","height","stroke","stroke-width"],rs=["transform"],is=["d"];var ss=Object(n["defineComponent"])({__name:"BaseLatexElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-latex",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",os,[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height,stroke:e.elementInfo.color,"stroke-width":e.elementInfo.strokeWidth,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Object(n["createElementVNode"])("g",{transform:`scale(${e.elementInfo.width/e.elementInfo.viewBox[0]}, ${e.elementInfo.height/e.elementInfo.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(n["createElementVNode"])("path",{d:e.elementInfo.path},null,8,is)],8,rs)],8,as))])],4)],4))}});l("58eb");const ds=Yt()(ss,[["__scopeId","data-v-9a47b5f4"]]);var us=ds,bs=Object(n["defineComponent"])({__name:"BaseVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>{const c=Object(n["resolveComponent"])("IconPlayOne");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-video",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",{class:"element-content",style:Object(n["normalizeStyle"])({backgroundImage:`url(${e.elementInfo.poster})`})},[Object(n["createVNode"])(c,{class:"icon"})],4)],4)],4)}}});l("5a58");const Os=Yt()(bs,[["__scopeId","data-v-56b7f716"]]);var ms=Os;const ps={class:"element-content"};var fs=Object(n["defineComponent"])({__name:"BaseAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px");return(t,c)=>{const o=Object(n["resolveComponent"])("IconVolumeNotice");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"base-element-audio",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",ps,[Object(n["createVNode"])(o,{class:"audio-icon",style:Object(n["normalizeStyle"])({fontSize:Object(n["unref"])(l),color:e.elementInfo.color})},null,8,["style"])])],4)],4)}}});l("0491");const js=Yt()(fs,[["__scopeId","data-v-5258e03b"]]);var vs=js,hs=Object(n["defineComponent"])({__name:"ThumbnailElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>{const e={[Se.IMAGE]:Vi,[Se.TEXT]:Bi,[Se.SHAPE]:$i,[Se.LINE]:Ui,[Se.CHART]:Yi,[Se.TABLE]:ns,[Se.LATEX]:us,[Se.VIDEO]:ms,[Se.AUDIO]:vs};return e[t.elementInfo.type]||null});return(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["base-element","base-element-"+e.elementInfo.id]),style:Object(n["normalizeStyle"])({zIndex:e.elementIndex})},[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(l)),{elementInfo:e.elementInfo,target:"thumbnail"},null,8,["elementInfo"]))],6))}});const ys=hs;var gs=ys;const xs={key:1,class:"placeholder"};var ks=Object(n["defineComponent"])({__name:"index",props:{slide:{type:Object,required:!0},size:{type:Number,required:!0},visible:{type:Boolean,default:!0}},setup(e){const t=e,{viewportRatio:l}=Object(o["c"])(T()),c=Object(n["computed"])(()=>t.slide.background),{backgroundStyle:a}=Qa(c),r=Object(n["computed"])(()=>t.size/Ve);return Object(n["provide"])(vl,r),(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"thumbnail-slide",style:Object(n["normalizeStyle"])({width:e.size+"px",height:e.size*Object(n["unref"])(l)+"px"})},[e.visible?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"elements",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(Ve)+"px",height:Object(n["unref"])(Ve)*Object(n["unref"])(l)+"px",transform:`scale(${Object(n["unref"])(r)})`})},[Object(n["createElementVNode"])("div",{class:"background",style:Object(n["normalizeStyle"])(Object(n["unref"])(a))},null,4),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.slide.elements,(e,t)=>(Object(n["openBlock"])(),Object(n["createBlock"])(gs,{key:e.id,elementInfo:e,elementIndex:t+1},null,8,["elementInfo","elementIndex"]))),128))],4)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",xs,"加载中 ..."))],4))}});l("689b");const Cs=Yt()(ks,[["__scopeId","data-v-3f5170e8"]]);var Ns=Cs;const Es=e=>(Object(n["pushScopeId"])("data-v-469f9b66"),e=e(),Object(n["popScopeId"])(),e),ws={class:"link-dialog"},Vs={class:"tabs"},Is=["onClick"],Ss={key:2,class:"preview"},Ls=Es(()=>Object(n["createElementVNode"])("div",null,"预览:",-1)),Bs={class:"btns"};var _s=Object(n["defineComponent"])({__name:"LinkDialog",emits:["close"],setup(e,{emit:t}){var l;const c=Ci["a"].Option,{handleElement:a}=Object(o["c"])(z()),{slides:r,currentSlide:i}=Object(o["c"])(T()),s=Object(n["ref"])("web"),d=Object(n["ref"])(""),u=Object(n["ref"])("");u.value=(null===(l=r.value.find(e=>e.id!==i.value.id))||void 0===l?void 0:l.id)||"";const b=Object(n["computed"])(()=>u.value&&r.value.find(e=>e.id===u.value)||null),O=[{key:"web",label:"网页链接"},{key:"slide",label:"幻灯片页面"}],{setLink:m}=bi();Object(n["onMounted"])(()=>{var e;null!==(e=a.value)&&void 0!==e&&e.link&&("web"===a.value.link.type?d.value=a.value.link.target:"slide"===a.value.link.type&&(u.value=a.value.link.target),s.value=a.value.link.type)});const p=()=>{const e={type:s.value,target:"web"===s.value?d.value:u.value};if(a.value){const l=m(a.value,e);l?t("close"):d.value=""}};return(e,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",ws,[Object(n["createElementVNode"])("div",Vs,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(O,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tab",{active:s.value===e.key}]),key:e.key,onClick:t=>s.value=e.key},Object(n["toDisplayString"])(e.label),11,Is)),64))]),"web"===s.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(ki["a"]),{key:0,class:"input",value:d.value,"onUpdate:value":l[0]||(l[0]=e=>d.value=e),placeholder:"请输入网页链接地址"},null,8,["value"])):Object(n["createCommentVNode"])("",!0),"slide"===s.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(Ci["a"]),{key:1,class:"input",value:u.value,"onUpdate:value":l[1]||(l[1]=e=>u.value=e)},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(r),(e,t)=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(c),{key:e.id,value:e.id,disabled:Object(n["unref"])(i).id===e.id},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("幻灯片 "+Object(n["toDisplayString"])(t+1),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["value"])):Object(n["createCommentVNode"])("",!0),"slide"===s.value&&Object(n["unref"])(b)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Ss,[Ls,Object(n["createVNode"])(Ns,{class:"thumbnail",slide:Object(n["unref"])(b),size:490},null,8,["slide"])])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",Bs,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{onClick:l[2]||(l[2]=e=>t("close")),style:{"margin-right":"10px"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("取消")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{type:"primary",onClick:l[3]||(l[3]=e=>p())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("确认")]),_:1})])]))}});l("7b49");const Ts=Yt()(_s,[["__scopeId","data-v-469f9b66"]]);var Ms=Ts;const Ds={class:"operates"},zs={key:1,class:"drag-mask"};var As=Object(n["defineComponent"])({__name:"index",setup(e){const t=z(),{activeElementIdList:l,activeGroupElementId:c,handleElementId:a,hiddenElementIdList:r,editorAreaFocus:i,gridLineSize:s,showRuler:d,showSelectPanel:u,creatingElement:b,canvasScale:O,textFormatPainter:m}=Object(o["c"])(t),{currentSlide:p}=Object(o["c"])(T()),{ctrlKeyState:f,spaceKeyState:j}=Object(o["c"])(G()),v=Object(n["ref"])(),h=Object(n["ref"])([]),y=Object(n["ref"])(!1),g=()=>y.value=!0;Object(n["watch"])(a,()=>{t.setActiveGroupElementId("")});const x=Object(n["ref"])([]),k=()=>{x.value=p.value?JSON.parse(JSON.stringify(p.value.elements)):[]};Object(n["watchEffect"])(k);const C=Object(n["ref"])(),{dragViewport:N,viewportStyles:E}=gl(C);kl(C);const{mouseSelection:w,mouseSelectionVisible:V,mouseSelectionQuadrant:I,updateMouseSelection:L}=xl(x,v),{dragElement:B}=Tl(x,h,O),{dragLineElement:_}=Ml(x),{selectElement:M}=_l(x,B),{scaleElement:D,scaleMultiElement:A}=Bl(x,h,O),{rotateElement:F}=Nl(x,v),{moveShapeKeypoint:$}=Dl(x,O),{selectAllElement:R}=He(),{deleteAllElements:P}=$e(),{pasteElement:H}=Pe(),{enterScreeningFromStart:q}=Ze(),{updateSlideIndex:U}=Ae();Object(n["onMounted"])(()=>{l.value.length&&Object(n["nextTick"])(()=>t.setActiveElementIdList([]))});const X=e=>{l.value.length&&t.setActiveElementIdList([]),j.value?N(e):L(e),i.value||t.setEditorareaFocus(!0),m.value&&t.setTextFormatPainter(null),yl()};Object(n["onUnmounted"])(()=>{m.value&&t.setTextFormatPainter(null)});const Y=()=>{i.value&&t.setEditorareaFocus(!1)},{scaleCanvas:Z}=We(),W=Object(S["throttle"])(Z,100,{leading:!0,trailing:!1}),J=Object(S["throttle"])(U,300,{leading:!0,trailing:!1}),K=e=>{e.preventDefault(),f.value?e.deltaY>0?W("-"):e.deltaY<0&&W("+"):e.deltaY>0?J(te.DOWN):e.deltaY<0&&J(te.UP)},Q=()=>{t.setRulerState(!d.value)},{insertElementFromCreateSelection:ee}=zl(v),ce=()=>[{text:"粘贴",subText:"Ctrl + V",handler:H},{text:"全选",subText:"Ctrl + A",handler:R},{text:"标尺",subText:d.value?"√":"",handler:Q},{text:"网格线",handler:()=>t.setGridLineSize(s.value?0:50),children:[{text:"无",subText:0===s.value?"√":"",handler:()=>t.setGridLineSize(0)},{text:"小",subText:25===s.value?"√":"",handler:()=>t.setGridLineSize(25)},{text:"中",subText:50===s.value?"√":"",handler:()=>t.setGridLineSize(50)},{text:"大",subText:100===s.value?"√":"",handler:()=>t.setGridLineSize(100)}]},{text:u.value?"关闭选择面板":"打开选择面板",handler:()=>{u.value?t.setSelectPanelState(!1):t.setSelectPanelState(!0)}},{text:"重置当前页",handler:P},{divider:!0},{text:"幻灯片放映",subText:"F5",handler:q}];return Object(n["provide"])(vl,O),(e,t)=>{const o=Object(n["resolveDirective"])("contextmenu"),i=Object(n["resolveDirective"])("click-outside");return Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"canvas",ref_key:"canvasRef",ref:C,onWheel:t[3]||(t[3]=e=>K(e)),onMousedown:t[4]||(t[4]=e=>X(e))},[Object(n["unref"])(b)?(Object(n["openBlock"])(),Object(n["createBlock"])(mr,{key:0,onCreated:t[0]||(t[0]=e=>Object(n["unref"])(ee)(e))})):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",{class:"viewport-wrapper",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(E).width*Object(n["unref"])(O)+"px",height:Object(n["unref"])(E).height*Object(n["unref"])(O)+"px",left:Object(n["unref"])(E).left+"px",top:Object(n["unref"])(E).top+"px"})},[Object(n["createElementVNode"])("div",Ds,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(h.value,(e,t)=>(Object(n["openBlock"])(),Object(n["createBlock"])(or,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:Object(n["unref"])(O)},null,8,["type","axis","length","canvasScale"]))),128)),Object(n["unref"])(l).length>1?(Object(n["openBlock"])(),Object(n["createBlock"])(Cr,{key:0,elementList:x.value,scaleMultiElement:Object(n["unref"])(A)},null,8,["elementList","scaleMultiElement"])):Object(n["createCommentVNode"])("",!0),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(x.value,e=>Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createBlock"])(gi,{key:e.id,elementInfo:e,isSelected:Object(n["unref"])(l).includes(e.id),isActive:Object(n["unref"])(a)===e.id,isActiveGroupElement:Object(n["unref"])(c)===e.id,isMultiSelect:Object(n["unref"])(l).length>1,rotateElement:Object(n["unref"])(F),scaleElement:Object(n["unref"])(D),openLinkDialog:g,dragLineElement:Object(n["unref"])(_),moveShapeKeypoint:Object(n["unref"])($)},null,8,["elementInfo","isSelected","isActive","isActiveGroupElement","isMultiSelect","rotateElement","scaleElement","dragLineElement","moveShapeKeypoint"])),[[n["vShow"],!Object(n["unref"])(r).includes(e.id)]])),128)),Object(n["createVNode"])(lr)]),Object(n["createElementVNode"])("div",{class:"viewport",ref_key:"viewportRef",ref:v,style:Object(n["normalizeStyle"])({transform:`scale(${Object(n["unref"])(O)})`})},[Object(n["unref"])(V)?(Object(n["openBlock"])(),Object(n["createBlock"])(Xa,{key:0,top:Object(n["unref"])(w).top,left:Object(n["unref"])(w).left,width:Object(n["unref"])(w).width,height:Object(n["unref"])(w).height,quadrant:Object(n["unref"])(I)},null,8,["top","left","width","height","quadrant"])):Object(n["createCommentVNode"])("",!0),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(x.value,(e,t)=>Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createBlock"])(qa,{key:e.id,elementInfo:e,elementIndex:t+1,isMultiSelect:Object(n["unref"])(l).length>1,selectElement:Object(n["unref"])(M),openLinkDialog:g},null,8,["elementInfo","elementIndex","isMultiSelect","selectElement"])),[[n["vShow"],!Object(n["unref"])(r).includes(e.id)]])),128))],4)],4),Object(n["unref"])(j)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",zs)):Object(n["createCommentVNode"])("",!0),Object(n["unref"])(d)?(Object(n["openBlock"])(),Object(n["createBlock"])(sr,{key:2,viewportStyles:Object(n["unref"])(E)},null,8,["viewportStyles"])):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])(Object(n["unref"])(le["a"]),{visible:y.value,"onUpdate:visible":t[2]||(t[2]=e=>y.value=e),footer:null,centered:"",width:540,destroyOnClose:""},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Ms,{onClose:t[1]||(t[1]=e=>y.value=!1)})]),_:1},8,["visible"])],32)),[[o,ce],[i,Y]])}}});l("8f78");const Fs=Yt()(As,[["__scopeId","data-v-17dcff2c"]]);var $s=Fs,Rs=(l("5136"),l("681b"));const Ps={class:"shape-pool"},Hs={class:"category-name"},qs={class:"shape-list"},Us=["onClick"],Gs={overflow:"visible",width:"18",height:"18"},Xs=["transform"],Ys=["fill","stroke","d"];var Zs=Object(n["defineComponent"])({__name:"ShapePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Ps,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(Be),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"category",key:e.type},[Object(n["createElementVNode"])("div",Hs,Object(n["toDisplayString"])(e.type),1),Object(n["createElementVNode"])("div",qs,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.children,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"shape-item",key:t},[Object(n["createElementVNode"])("div",{class:"shape-content",onClick:t=>l(e)},[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",Gs,[Object(n["createElementVNode"])("g",{transform:`scale(${18/e.viewBox[0]}, ${18/e.viewBox[1]}) translate(0,0) matrix(1,0,0,1,0,0)`},[Object(n["createElementVNode"])("path",{class:Object(n["normalizeClass"])(["shape-path",{outlined:e.outlined}]),"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",fill:e.outlined?"#999":"transparent",stroke:e.outlined?"transparent":"#999","stroke-width":"2",d:e.path},null,10,Ys)],8,Xs)]))],8,Us)]))),128))])]))),128))]))}});l("c24c9");const Ws=Yt()(Zs,[["__scopeId","data-v-5788e0d2"]]);var Js=Ws;const Ks=[{type:"直线",children:[{path:"M 0 0 L 20 20",style:"solid",points:["",""]},{path:"M 0 0 L 20 20",style:"dashed",points:["",""]},{path:"M 0 0 L 20 20",style:"solid",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"dashed",points:["","arrow"]},{path:"M 0 0 L 20 20",style:"solid",points:["","dot"]}]},{type:"折线、曲线",children:[{path:"M 0 0 L 0 20 L 20 20",style:"solid",points:["","arrow"],isBroken:!0},{path:"M 0 0 Q 0 20 20 20",style:"solid",points:["","arrow"],isCurve:!0},{path:"M 0 0 C 20 0 0 20 20 20",style:"solid",points:["","arrow"],isCubic:!0}]}],Qs={class:"line-pool"},ed={class:"category-name"},td={class:"line-list"},ld=["onClick"],cd={overflow:"visible",width:"20",height:"20"},nd=["d","stroke-dasharray","marker-start","marker-end"];var od=Object(n["defineComponent"])({__name:"LinePool",emits:["select"],setup(e,{emit:t}){const l=e=>{t("select",e)};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Qs,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(Ks),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"category",key:e.type},[Object(n["createElementVNode"])("div",ed,Object(n["toDisplayString"])(e.type),1),Object(n["createElementVNode"])("div",td,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.children,(e,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"line-item",key:c},[Object(n["createElementVNode"])("div",{class:"line-content",onClick:t=>l(e)},[(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",cd,[Object(n["createElementVNode"])("defs",null,[e.points[0]?(Object(n["openBlock"])(),Object(n["createBlock"])(co,{key:0,class:"line-marker",id:`preset-line-${t}-${c}`,position:"start",type:e.points[0],color:"currentColor",baseSize:2},null,8,["id","type"])):Object(n["createCommentVNode"])("",!0),e.points[1]?(Object(n["openBlock"])(),Object(n["createBlock"])(co,{key:1,class:"line-marker",id:`preset-line-${t}-${c}`,position:"end",type:e.points[1],color:"currentColor",baseSize:2},null,8,["id","type"])):Object(n["createCommentVNode"])("",!0)]),Object(n["createElementVNode"])("path",{class:"line-path",d:e.path,stroke:"currentColor",fill:"none","stroke-width":"2","stroke-dasharray":"solid"===e.style?"0, 0":"4, 1","marker-start":e.points[0]?`url(#preset-line-${t}-${c}-${e.points[0]}-start)`:"","marker-end":e.points[1]?`url(#preset-line-${t}-${c}-${e.points[1]}-end)`:""},null,8,nd)]))],8,ld)]))),128))])]))),128))]))}});l("3836");const ad=Yt()(od,[["__scopeId","data-v-bca68faa"]]);var rd=ad;const id={class:"chart-pool"},sd=["onClick"];var dd=Object(n["defineComponent"])({__name:"ChartPool",emits:["select"],setup(e,{emit:t}){const l=["bar","horizontalBar","line","area","scatter","pie","ring"],c=e=>{t("select",e)};return(e,t)=>{const o=Object(n["resolveComponent"])("IconChartLine"),a=Object(n["resolveComponent"])("IconChartHistogram"),r=Object(n["resolveComponent"])("IconChartPie"),i=Object(n["resolveComponent"])("IconChartHistogramOne"),s=Object(n["resolveComponent"])("IconChartLineArea"),d=Object(n["resolveComponent"])("IconChartRing"),u=Object(n["resolveComponent"])("IconChartScatter");return Object(n["openBlock"])(),Object(n["createElementBlock"])("ul",id,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(l,(e,t)=>Object(n["createElementVNode"])("li",{class:"chart-item",key:t},[Object(n["createElementVNode"])("div",{class:"chart-content",onClick:t=>c(e)},["line"===e?(Object(n["openBlock"])(),Object(n["createBlock"])(o,{key:0,size:"24"})):"bar"===e?(Object(n["openBlock"])(),Object(n["createBlock"])(a,{key:1,size:"24"})):"pie"===e?(Object(n["openBlock"])(),Object(n["createBlock"])(r,{key:2,size:"24"})):"horizontalBar"===e?(Object(n["openBlock"])(),Object(n["createBlock"])(i,{key:3,size:"24"})):"area"===e?(Object(n["openBlock"])(),Object(n["createBlock"])(s,{key:4,size:"24"})):"ring"===e?(Object(n["openBlock"])(),Object(n["createBlock"])(d,{key:5,size:"24"})):"scatter"===e?(Object(n["openBlock"])(),Object(n["createBlock"])(u,{key:6,size:"24"})):Object(n["createCommentVNode"])("",!0)],8,sd)])),64))])}}});l("24bc");const ud=Yt()(dd,[["__scopeId","data-v-3870b42e"]]);var bd=ud,Od=(l("922d"),l("09d9"));const md=e=>(Object(n["pushScopeId"])("data-v-8fd9f34c"),e=e(),Object(n["popScopeId"])(),e),pd={class:"table-generator"},fd={class:"title"},jd={class:"lef"},vd=["onMouseenter"],hd={key:1,class:"custom"},yd={class:"row"},gd=md(()=>Object(n["createElementVNode"])("div",{class:"label",style:{flex:"1"}},"行数:",-1)),xd={class:"row"},kd=md(()=>Object(n["createElementVNode"])("div",{class:"label",style:{flex:"1"}},"列数:",-1)),Cd={class:"btns"};var Nd=Object(n["defineComponent"])({__name:"TableGenerator",emits:["insert","close"],setup(e,{emit:t}){const l=Object(n["ref"])([]),c=Object(n["ref"])(3),o=Object(n["ref"])(3),a=Object(n["ref"])(!1),r=()=>{if(!l.value.length)return;const[e,c]=l.value;t("insert",{row:e,col:c})},i=()=>c.value<1||c.value>20||o.value<1||o.value>20?ne["a"].warning("行数/列数必须在0~20之间"):(t("insert",{row:c.value,col:o.value}),void(a.value=!1)),s=()=>{t("close"),a.value=!1};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",pd,[Object(n["createElementVNode"])("div",fd,[Object(n["createElementVNode"])("div",jd,"表格 "+Object(n["toDisplayString"])(l.value.length?`${l.value[0]} x ${l.value[1]}`:""),1),Object(n["createElementVNode"])("div",{class:"right",onClick:t[0]||(t[0]=e=>a.value=!a.value)},Object(n["toDisplayString"])(a.value?"返回":"自定义"),1)]),a.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",hd,[Object(n["createElementVNode"])("div",yd,[gd,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{min:1,max:20,value:c.value,"onUpdate:value":t[3]||(t[3]=e=>c.value=e),style:{flex:"3"}},null,8,["value"])]),Object(n["createElementVNode"])("div",xd,[kd,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{min:1,max:20,value:o.value,"onUpdate:value":t[4]||(t[4]=e=>o.value=e),style:{flex:"3"}},null,8,["value"])]),Object(n["createElementVNode"])("div",Cd,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",onClick:t[5]||(t[5]=e=>s())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("取消")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",type:"primary",onClick:t[6]||(t[6]=e=>i())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("确认")]),_:1})])])):(Object(n["openBlock"])(),Object(n["createElementBlock"])("table",{key:0,onMouseleave:t[1]||(t[1]=e=>l.value=[]),onClick:t[2]||(t[2]=e=>r())},[Object(n["createElementVNode"])("tbody",null,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(10,e=>Object(n["createElementVNode"])("tr",{key:e},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(10,t=>Object(n["createElementVNode"])("td",{onMouseenter:c=>l.value=[e,t],key:t},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["cell",{active:l.value.length&&e<=l.value[0]&&t<=l.value[1]}])},null,2)],40,vd)),64))])),64))])],32))]))}});l("b615");const Ed=Yt()(Nd,[["__scopeId","data-v-8fd9f34c"]]);var wd=Ed;const Vd={class:"media-input"},Id={class:"tabs"},Sd=["onClick"],Ld={class:"btns"},Bd={class:"btns"};var _d=Object(n["defineComponent"])({__name:"MediaInput",emits:["insertVideo","insertAudio","close"],setup(e,{emit:t}){const l=Object(n["ref"])("video"),c=Object(n["ref"])("https://mazwai.com/videvo_files/video/free/2019-01/small_watermarked/181004_04_Dolphins-Whale_06_preview.webm"),o=Object(n["ref"])("https://freesound.org/data/previews/614/614107_11861866-lq.mp3"),a=[{key:"video",label:"视频"},{key:"audio",label:"音频"}],r=()=>{if(!c.value)return ne["a"].error("请先输入正确的视频地址");t("insertVideo",c.value)},i=()=>{if(!o.value)return ne["a"].error("请先输入正确的音频地址");t("insertAudio",o.value)};return(e,s)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Vd,[Object(n["createElementVNode"])("div",Id,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(a,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tab",{active:l.value===e.key}]),key:e.key,onClick:t=>l.value=e.key},Object(n["toDisplayString"])(e.label),11,Sd)),64))]),"video"===l.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createVNode"])(Object(n["unref"])(ki["a"]),{value:c.value,"onUpdate:value":s[0]||(s[0]=e=>c.value=e),placeholder:"请输入视频地址e.g. https://xxx.mp4"},null,8,["value"]),Object(n["createElementVNode"])("div",Ld,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{onClick:s[1]||(s[1]=e=>t("close")),style:{"margin-right":"10px"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("取消")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{type:"primary",onClick:s[2]||(s[2]=e=>r())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("确认")]),_:1})])],64)):Object(n["createCommentVNode"])("",!0),"audio"===l.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:1},[Object(n["createVNode"])(Object(n["unref"])(ki["a"]),{value:o.value,"onUpdate:value":s[3]||(s[3]=e=>o.value=e),placeholder:"请输入音频地址e.g. https://xxx.mp3"},null,8,["value"]),Object(n["createElementVNode"])("div",Bd,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{onClick:s[4]||(s[4]=e=>t("close")),style:{"margin-right":"10px"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("取消")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{type:"primary",onClick:s[5]||(s[5]=e=>i())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("确认")]),_:1})])],64)):Object(n["createCommentVNode"])("",!0)]))}});l("e0b6");const Td=Yt()(_d,[["__scopeId","data-v-4e5f883a"]]);var Md=Td,Dd=l("e5ca");Dd["a"].SUB_SUP_SCALE=.5;const zd=[{label:"高斯公式",latex:"\\int\\int\\int _ { \\Omega } \\left( \\frac { \\partial {P} } { \\partial {x} } + \\frac { \\partial {Q} } { \\partial {y} } + \\frac { \\partial {R} }{ \\partial {z} } \\right) \\mathrm { d } V = \\oint _ { \\partial \\Omega } ( P \\cos \\alpha + Q \\cos \\beta + R \\cos \\gamma ) \\mathrm{ d} S"},{label:"傅里叶级数",latex:"f(x) = \\frac {a_0} 2 + \\sum_{n = 1}^\\infty {({a_n}\\cos {nx} + {b_n}\\sin {nx})}"},{label:"泰勒展开式",latex:"e ^ { x } = 1 + \\frac { x } { 1 ! } + \\frac { x ^ { 2 } } { 2 ! } + \\frac { x ^ { 3 } } { 3 ! } + ... , \\quad - \\infty < x < \\infty"},{label:"定积分",latex:"\\lim_ { n \\rightarrow + \\infty } \\sum _ { i = 1 } ^ { n } f \\left[ a + \\frac { i } { n } ( b - a ) \\right] \\frac { b - a } { n } = \\int _ { a } ^ { b } f ( x ) dx"},{label:"三角恒等式1",latex:"\\sin \\alpha \\pm \\sin \\beta = 2 \\sin \\frac { 1 } { 2 } ( \\alpha \\pm \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha \\mp \\beta )"},{label:"三角恒等式2",latex:"\\cos \\alpha + \\cos \\beta = 2 \\cos \\frac { 1 } { 2 } ( \\alpha + \\beta ) \\cos \\frac { 1 } { 2 } ( \\alpha - \\beta )"},{label:"和的展开式",latex:"( 1 + x ) ^ { n } = 1 + \\frac { n x } { 1 ! } + \\frac { n ( n - 1 ) x ^ { 2 } } { 2 ! } + ..."},{label:"欧拉公式",latex:" e^{ix} = \\cos {x} + i\\sin {x}"},{label:"贝努利方程",latex:"\\frac {dy} {dx} + P(x)y = Q(x) y^n ({n} \\not= {0,1})"},{label:"全微分方程",latex:"du(x,y) = P(x,y)dx + Q(x,y)dy = 0"},{label:"非齐次方程",latex:"y = (\\int Q(x) e^{\\int {P(x)dx}}dx + C)e^{-\\int {P(x)dx}}"},{label:"柯西中值定理",latex:"\\frac{{f(b) - f(a)}}{{F(b) - F(a)}} = \\frac{{f'(\\xi )}}{{F'(\\xi )}}"},{label:"拉格朗日中值定理",latex:"f(b) - f(a) = f'(\\xi )(b - a)"},{label:"导数公式",latex:"(\\arcsin x)' = \\frac{1}{{\\sqrt {1 - x^2} }}"},{label:"三角函数积分",latex:"\\int {tgxdx = - \\ln \\left| {\\cos x} \\right| + C}"},{label:"二次曲面",latex:"\\frac{{{x^2}}}{{{a^2}}} + \\frac{{{y^2}}}{{{b^2}}} - \\frac{{{z^2}}}{{{c^2}}} = 1"},{label:"二阶微分",latex:"\\frac {{d^2}y} {dx^2} + P(x) \\frac {dy} {dx} + Q(x)y = f(x)"},{label:"方向导数",latex:"\\frac{{\\partial f}}{{\\partial l}} = \\frac{{\\partial f}}{{\\partial x}}\\cos \\phi + \\frac{{\\partial f}}{{\\partial y}}\\sin \\phi"}],Ad=[{type:"operators",label:"数学",children:[{latex:"\\cdot"},{latex:"\\pm"},{latex:"\\mp"},{latex:"+"},{latex:"-"},{latex:"\\times"},{latex:"\\div"},{latex:"<"},{latex:">"},{latex:"="},{latex:"\\neq\\ne"},{latex:"\\leqq"},{latex:"\\geqq"},{latex:"\\leq"},{latex:"\\geq"},{latex:"\\propto"},{latex:"\\sim"},{latex:"\\equiv"},{latex:"\\dagger"},{latex:"\\ddagger"},{latex:"\\ell"},{latex:"\\#"},{latex:"\\$"},{latex:"\\&"},{latex:"\\%"},{latex:"\\langle\\rangle"},{latex:"()"},{latex:"[]"},{latex:"\\{\\}"},{latex:"||"},{latex:"\\|"},{latex:"\\exists"},{latex:"\\in"},{latex:"\\subset"},{latex:"\\supset"},{latex:"\\cup"},{latex:"\\cap"},{latex:"\\infty"},{latex:"\\partial"},{latex:"\\nabla"},{latex:"\\aleph"},{latex:"\\wp"},{latex:"\\therefore"},{latex:"\\mid"},{latex:"\\sum"},{latex:"\\prod"},{latex:"\\bigoplus"},{latex:"\\bigodot"},{latex:"\\int"},{latex:"\\oint"},{latex:"\\oplus"},{latex:"\\odot"},{latex:"\\perp"},{latex:"\\angle"},{latex:"\\triangle"},{latex:"\\Box"},{latex:"\\rightarrow"},{latex:"\\to"},{latex:"\\leftarrow"},{latex:"\\gets"},{latex:"\\circ"},{latex:"\\bigcirc"},{latex:"\\bullet"},{latex:"\\star"},{latex:"\\diamond"},{latex:"\\ast"},{latex:","},{latex:"."},{latex:";"},{latex:"!"}]},{type:"group",label:"组合",children:[{latex:"\\frac{a}{b}"},{latex:"\\frac{dx}{dx}"},{latex:"\\frac{\\partial a}{\\partial b}"},{latex:"\\sqrt{x}"},{latex:"\\sqrt[n]{x}"},{latex:"x^{n}"},{latex:"x_{n}"},{latex:"x_a^b"},{latex:"\\int_{a}^{b}"},{latex:"\\oint_a^b"},{latex:"\\lim_{a \\rightarrow b}"},{latex:"\\prod_a^b"},{latex:"\\sum_a^b"},{latex:"\\left(\\begin{array}a \\\\ b\\end{array}\\right)"},{latex:"\\begin{bmatrix}a & b \\\\ c & d \\end{bmatrix}"},{latex:"\\begin{cases}a & x = 0 \\\\ b & x > 0\\end{cases}"},{latex:"\\hat{a}"},{latex:"\\breve{a}"},{latex:"\\acute{a}"},{latex:"\\grave{a}"},{latex:"\\tilde{a}"},{latex:"\\bar{a}"},{latex:"\\vec{a}"},{latex:"\\underline{a}"},{latex:"\\overline{a}"},{latex:"\\widehat{ab}"},{latex:"\\overleftarrow{ab}"},{latex:"\\overrightarrow{ab}"}]},{type:"verbatim",label:"函数",children:[{latex:"\\log"},{latex:"\\ln"},{latex:"\\exp"},{latex:"\\mod"},{latex:"\\lim"},{latex:"\\sin"},{latex:"\\cos"},{latex:"\\tan"},{latex:"\\csc"},{latex:"\\sec"},{latex:"\\cot"},{latex:"\\sinh"},{latex:"\\cosh"},{latex:"\\tanh"},{latex:"\\csch"},{latex:"\\sech"},{latex:"\\coth"},{latex:"\\arcsin"},{latex:"\\arccos"},{latex:"\\arctan"},{latex:"\\arccsc"},{latex:"\\arcsec"},{latex:"\\arccot"}]},{type:"greek",label:"希腊字母",children:[{latex:"\\alpha"},{latex:"\\beta"},{latex:"\\gamma"},{latex:"\\delta"},{latex:"\\varepsilon"},{latex:"\\zeta"},{latex:"\\eta"},{latex:"\\vartheta"},{latex:"\\iota"},{latex:"\\kappa"},{latex:"\\lambda"},{latex:"\\mu"},{latex:"\\nu"},{latex:"\\xi"},{latex:"\\omicron"},{latex:"\\pi"},{latex:"\\rho"},{latex:"\\sigma"},{latex:"\\tau"},{latex:"\\upsilon"},{latex:"\\varphi"},{latex:"\\chi"},{latex:"\\psi"},{latex:"\\omega"},{latex:"\\epsilon"},{latex:"\\theta"},{latex:"\\phi"},{latex:"\\varsigma"},{latex:"\\Alpha"},{latex:"\\Beta"},{latex:"\\Gamma"},{latex:"\\Delta"},{latex:"\\Epsilon"},{latex:"\\Zeta"},{latex:"\\Eta"},{latex:"\\Theta"},{latex:"\\Iota"},{latex:"\\Kappa"},{latex:"\\Lambda"},{latex:"\\Mu"},{latex:"\\Nu"},{latex:"\\Xi"},{latex:"\\Omicron"},{latex:"\\Pi"},{latex:"\\Rho"},{latex:"\\Sigma"},{latex:"\\Tau"},{latex:"\\Upsilon"},{latex:"\\Phi"},{latex:"\\Chi"},{latex:"\\Psi"},{latex:"\\Omega"}]}],Fd=["width","height"],$d=["transform"],Rd=["d"];var Pd=Object(n["defineComponent"])({__name:"FormulaContent",props:{latex:{type:String,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(e){const t=e,l=Object(n["ref"])({x:0,y:0,w:0,h:0}),c=Object(n["ref"])("");Object(n["watch"])(()=>t.latex,()=>{const e=new Dd["b"](t.latex);c.value=e.pathd({}),l.value=e.box({})},{immediate:!0});const o=Object(n["computed"])(()=>{const e=l.value.w+32,c=l.value.h+32;return e>t.width||c>t.height?e/c>t.width/t.height?t.width/e:t.height/c:1});return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("svg",{class:"formula-content",overflow:"visible",width:l.value.w+32,height:l.value.h+32,stroke:"#000","stroke-width":"1",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[Object(n["createElementVNode"])("g",{transform:`scale(${Object(n["unref"])(o)}, ${Object(n["unref"])(o)}) translate(0,0) matrix(1,0,0,1,0,0)`,"transform-origin":"0 50%"},[Object(n["createElementVNode"])("path",{d:c.value},null,8,Rd)],8,$d)],8,Fd))}});l("e9df");const Hd=Yt()(Pd,[["__scopeId","data-v-1c41d9fe"]]);var qd=Hd;const Ud=["innerHTML"];var Gd=Object(n["defineComponent"])({__name:"SymbolContent",props:{latex:{type:String,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>{const e=new Dd["b"](t.latex);return e.svg({SCALE_X:10,SCALE_Y:10})});return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"symbol-content",innerHTML:Object(n["unref"])(l)},null,8,Ud))}});const Xd=Gd;var Yd=Xd;const Zd={class:"latex-editor"},Wd={class:"container"},Jd={class:"left"},Kd={class:"input-area"},Qd={class:"preview"},eu={key:0,class:"placeholder"},tu={key:1,class:"preview-content"},lu={class:"right"},cu={class:"tabs"},nu=["onClick"],ou={class:"content"},au={key:0,class:"symbol"},ru={class:"symbol-tabs"},iu=["onClick"],su={class:"symbol-pool"},du=["onClick"],uu={key:1,class:"formula"},bu={class:"formula-title"},Ou=["onClick"],mu={class:"footer"};var pu=Object(n["defineComponent"])({__name:"index",props:{value:{type:String,default:""}},emits:["update","close"],setup(e,{emit:t}){const l=e,c=ki["a"].TextArea,o=[{label:"常用符号",value:"symbol"},{label:"预置公式",value:"formula"}],a=zd,r=Ad,i=Object(n["ref"])(""),s=Object(n["ref"])("symbol"),d=Object(n["ref"])(),u=Object(n["ref"])(Ad[0].type),b=Object(n["computed"])(()=>{const e=Ad.find(e=>e.type===u.value);return(null===e||void 0===e?void 0:e.children)||[]});Object(n["onMounted"])(()=>{l.value&&(i.value=l.value)});const O=()=>{if(!i.value)return ne["a"].error("公式不能为空");const e=new Dd["b"](i.value),l=e.pathd({}),c=e.box({});t("update",{latex:i.value,path:l,w:c.w+32,h:c.h+32})},m=e=>{d.value&&(d.value.focus(),document.execCommand("insertText",!1,e))};return(e,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Zd,[Object(n["createElementVNode"])("div",Wd,[Object(n["createElementVNode"])("div",Jd,[Object(n["createElementVNode"])("div",Kd,[Object(n["createVNode"])(Object(n["unref"])(c),{value:i.value,"onUpdate:value":l[0]||(l[0]=e=>i.value=e),placeholder:"输入 LaTeX 公式",ref_key:"textAreaRef",ref:d},null,8,["value"])]),Object(n["createElementVNode"])("div",Qd,[i.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",tu,[Object(n["createVNode"])(qd,{width:518,height:138,latex:i.value},null,8,["latex"])])):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",eu,"公式预览"))])]),Object(n["createElementVNode"])("div",lu,[Object(n["createElementVNode"])("div",cu,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(o,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tab",{active:e.value===s.value}]),key:e.value,onClick:t=>s.value=e.value},Object(n["toDisplayString"])(e.label),11,nu)),64))]),Object(n["createElementVNode"])("div",ou,["symbol"===s.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",au,[Object(n["createElementVNode"])("div",ru,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(r),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["symbol-tab",{active:u.value===e.type}]),key:e.type,onClick:t=>u.value=e.type},Object(n["toDisplayString"])(e.label),11,iu))),128))]),Object(n["createElementVNode"])("div",su,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(b),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"symbol-item",key:e.latex,onClick:t=>m(e.latex)},[Object(n["createVNode"])(Yd,{latex:e.latex},null,8,["latex"])],8,du))),128))])])):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",uu,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(a),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"formula-item",key:e.label},[Object(n["createElementVNode"])("div",bu,Object(n["toDisplayString"])(e.label),1),Object(n["createElementVNode"])("div",{class:"formula-item-content",onClick:t=>i.value=e.latex},[Object(n["createVNode"])(qd,{width:236,height:60,latex:e.latex},null,8,["latex"])],8,Ou)]))),128))]))])])]),Object(n["createElementVNode"])("div",mu,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",onClick:l[1]||(l[1]=e=>t("close"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("取消")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",type:"primary",onClick:l[2]||(l[2]=e=>O())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("确定")]),_:1})])]))}});l("c3b0");const fu=Yt()(pu,[["__scopeId","data-v-097b396c"]]);var ju=fu;const vu={class:"canvas-tool"},hu={class:"left-handler"},yu={class:"add-element-handler"},gu={class:"handler-item group-btn"},xu={class:"right-handler"},ku={class:"viewport-size-preset"},Cu=["onClick"],Nu={class:"text"};var Eu=Object(n["defineComponent"])({__name:"index",setup(e){const t=z(),{creatingElement:l}=Object(o["c"])(t),{canUndo:c,canRedo:a}=Object(o["c"])(U()),{redo:r,undo:i}=Te(),{scaleCanvas:s,setCanvasScalePercentage:d,resetCanvas:u,canvasScalePercentage:b}=We(),O=[200,150,100,80,50],m=Object(n["ref"])(!1),p=e=>{d(e),m.value=!1},{createImageElement:f,createChartElement:j,createTableElement:v,createLatexElement:h,createVideoElement:y,createAudioElement:g}=Me(),x=e=>{const t=e[0];t&&we(t).then(e=>f(e))},k=Object(n["ref"])(!1),C=Object(n["ref"])(!1),N=Object(n["ref"])(!1),E=Object(n["ref"])(!1),w=Object(n["ref"])(!1),V=Object(n["ref"])(!1),I=Object(n["ref"])(!1),S=(e=!1)=>{t.setCreatingElement({type:"text",vertical:e})},L=e=>{t.setCreatingElement({type:"shape",data:e}),k.value=!1},B=e=>{t.setCreatingElement({type:"line",data:e}),C.value=!1};return(e,t)=>{const o=Object(n["resolveComponent"])("IconBack"),d=Object(n["resolveComponent"])("IconNext"),f=Object(n["resolveComponent"])("IconFontSize"),_=Object(n["resolveComponent"])("IconTextRotationNone"),T=Object(n["resolveComponent"])("IconTextRotationDown"),M=Object(n["resolveComponent"])("IconDown"),D=Object(n["resolveComponent"])("IconPicture"),z=Object(n["resolveComponent"])("IconGraphicDesign"),A=Object(n["resolveComponent"])("IconConnection"),F=Object(n["resolveComponent"])("IconChartProportion"),$=Object(n["resolveComponent"])("IconInsertTable"),R=Object(n["resolveComponent"])("IconFormula"),P=Object(n["resolveComponent"])("IconVideoTwo"),H=Object(n["resolveComponent"])("IconMinus"),q=Object(n["resolveComponent"])("IconPlus"),U=Object(n["resolveComponent"])("IconFullScreen");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",vu,[Object(n["createElementVNode"])("div",hu,[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"撤销"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(o,{class:Object(n["normalizeClass"])(["handler-item",{disable:!Object(n["unref"])(c)}]),onClick:t[0]||(t[0]=e=>Object(n["unref"])(i)())},null,8,["class"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"重做"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(d,{class:Object(n["normalizeClass"])(["handler-item",{disable:!Object(n["unref"])(a)}]),onClick:t[1]||(t[1]=e=>Object(n["unref"])(r)())},null,8,["class"])]),_:1},8,["mouseEnterDelay"])]),Object(n["createElementVNode"])("div",yu,[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入文字"},{default:Object(n["withCtx"])(()=>{var e;return[Object(n["createElementVNode"])("div",gu,[Object(n["createVNode"])(f,{class:Object(n["normalizeClass"])(["icon",{active:"text"===(null===(e=Object(n["unref"])(l))||void 0===e?void 0:e.type)}]),onClick:t[2]||(t[2]=e=>S())},null,8,["class"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:I.value,"onUpdate:visible":t[5]||(t[5]=e=>I.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:"text-type-item",onClick:t[3]||(t[3]=()=>{S(),I.value=!1})},[Object(n["createVNode"])(_),Object(n["createTextVNode"])(" 横向文本框")]),Object(n["createElementVNode"])("div",{class:"text-type-item",onClick:t[4]||(t[4]=()=>{S(!0),I.value=!1})},[Object(n["createVNode"])(T),Object(n["createTextVNode"])(" 竖向文本框")])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(M,{class:"arrow"})]),_:1},8,["visible"])])]}),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(el,{onChange:t[6]||(t[6]=e=>x(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图片"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(D,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:k.value,"onUpdate:visible":t[8]||(t[8]=e=>k.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Js,{onSelect:t[7]||(t[7]=e=>L(e))})]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入形状"},{default:Object(n["withCtx"])(()=>{var e;return[Object(n["createVNode"])(z,{class:Object(n["normalizeClass"])(["handler-item",{active:"shape"===(null===(e=Object(n["unref"])(l))||void 0===e?void 0:e.type)}])},null,8,["class"])]}),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:C.value,"onUpdate:visible":t[10]||(t[10]=e=>C.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(rd,{onSelect:t[9]||(t[9]=e=>B(e))})]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入线条"},{default:Object(n["withCtx"])(()=>{var e;return[Object(n["createVNode"])(A,{class:Object(n["normalizeClass"])(["handler-item",{active:"line"===(null===(e=Object(n["unref"])(l))||void 0===e?void 0:e.type)}])},null,8,["class"])]}),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:N.value,"onUpdate:visible":t[12]||(t[12]=e=>N.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(bd,{onSelect:t[11]||(t[11]=e=>{Object(n["unref"])(j)(e),N.value=!1})})]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入图表"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(F,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:E.value,"onUpdate:visible":t[15]||(t[15]=e=>E.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(wd,{onClose:t[13]||(t[13]=e=>E.value=!1),onInsert:t[14]||(t[14]=({row:e,col:t})=>{Object(n["unref"])(v)(e,t),E.value=!1})})]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入表格"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])($,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入公式"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(R,{class:"handler-item",onClick:t[16]||(t[16]=e=>V.value=!0)})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:w.value,"onUpdate:visible":t[20]||(t[20]=e=>w.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Md,{onClose:t[17]||(t[17]=e=>w.value=!1),onInsertVideo:t[18]||(t[18]=e=>{Object(n["unref"])(y)(e),w.value=!1}),onInsertAudio:t[19]||(t[19]=e=>{Object(n["unref"])(g)(e),w.value=!1})})]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"插入音视频"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(P,{class:"handler-item"})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"])]),Object(n["createElementVNode"])("div",xu,[Object(n["createVNode"])(H,{class:"handler-item viewport-size",onClick:t[21]||(t[21]=e=>Object(n["unref"])(s)("-"))}),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:m.value,"onUpdate:visible":t[22]||(t[22]=e=>m.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",ku,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(O,e=>Object(n["createElementVNode"])("div",{class:"preset-item",key:e,onClick:t=>p(e)},Object(n["toDisplayString"])(e)+"%",9,Cu)),64))])]),default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",Nu,Object(n["toDisplayString"])(Object(n["unref"])(b)),1)]),_:1},8,["visible"]),Object(n["createVNode"])(q,{class:"handler-item viewport-size",onClick:t[23]||(t[23]=e=>Object(n["unref"])(s)("+"))}),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"适应屏幕"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(U,{class:"handler-item viewport-size-adaptation",onClick:t[24]||(t[24]=e=>Object(n["unref"])(u)())})]),_:1},8,["mouseEnterDelay"])]),Object(n["createVNode"])(Object(n["unref"])(le["a"]),{visible:V.value,"onUpdate:visible":t[27]||(t[27]=e=>V.value=e),footer:null,centered:"",width:880,destroyOnClose:""},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ju,{onClose:t[25]||(t[25]=e=>V.value=!1),onUpdate:t[26]||(t[26]=e=>{Object(n["unref"])(h)(e),V.value=!1})})]),_:1},8,["visible"])])}}});l("b514");const wu=Yt()(Eu,[["__scopeId","data-v-7ba4b56c"]]);var Vu=wu,Iu=()=>{const{slides:e}=Object(o["c"])(T()),t=Object(n["ref"])(null),l=Object(n["ref"])(50),c=()=>{e.value.length>l.value?t.value=setTimeout(()=>{l.value=l.value+20,c()},600):l.value=9999};return Object(n["onMounted"])(c),Object(n["onUnmounted"])(()=>{t.value&&clearTimeout(t.value)}),{slidesLoadLimit:l}},Su=l("b76a"),Lu=l.n(Su);const Bu={class:"layout-pool"},_u=["onClick"];var Tu=Object(n["defineComponent"])({__name:"LayoutPool",emits:["select"],setup(e,{emit:t}){const{layouts:l}=Object(o["c"])(T()),c=e=>{t("select",e)};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Bu,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(l),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"layout-item",key:e.id,onClick:t=>c(e)},[Object(n["createVNode"])(Ns,{class:"thumbnail",slide:e,size:180},null,8,["slide"])],8,_u))),128))]))}});l("3328");const Mu=Yt()(Tu,[["__scopeId","data-v-cc6b7dca"]]);var Du=Mu;const zu={class:"add-slide"},Au={class:"select-btn"},Fu=["onMousedown"],$u={class:"page-number"};var Ru=Object(n["defineComponent"])({__name:"index",setup(e){const t=z(),l=T(),c=G(),{selectedSlidesIndex:a,thumbnailsFocus:r}=Object(o["c"])(t),{slides:i,slideIndex:s}=Object(o["c"])(l),{ctrlKeyState:d,shiftKeyState:u}=Object(o["c"])(c),{slidesLoadLimit:b}=Iu(),O=Object(n["computed"])(()=>[...a.value,s.value]),m=Object(n["ref"])(!1),{copySlide:p,pasteSlide:f,createSlide:j,createSlideByTemplate:v,copyAndPasteSlide:h,deleteSlide:y,cutSlide:g,selectAllSlide:x,sortSlides:k}=Ae(),C=e=>{t.setActiveElementIdList([]),s.value!==e&&l.updateSlideIndex(e)},N=(e,l)=>{const c=O.value.length>1;if(!c||!O.value.includes(l)||0===e.button)if(d.value)if(s.value===l){if(!c)return;const e=O.value.filter(e=>e!==l);t.updateSelectedSlidesIndex(e),C(O.value[0])}else if(O.value.includes(l)){const e=O.value.filter(e=>e!==l);t.updateSelectedSlidesIndex(e)}else{const e=[...O.value,l];t.updateSelectedSlidesIndex(e),C(l)}else if(u.value){if(s.value===l&&!c)return;let e=Math.min(...O.value),n=l;l<e&&(n=Math.max(...O.value),e=l);const o=[];for(let t=e;t<=n;t++)o.push(t);t.updateSelectedSlidesIndex(o),C(l)}else t.updateSelectedSlidesIndex([]),C(l)},E=e=>{r.value!==e&&(t.setThumbnailsFocus(e),e||t.updateSelectedSlidesIndex([]))},w=e=>{const{newIndex:t,oldIndex:l}=e;k(t,l)},{enterScreening:V,enterScreeningFromStart:I}=Ze(),S=()=>[{text:"粘贴",subText:"Ctrl + V",handler:f},{text:"全选",subText:"Ctrl + A",handler:x},{text:"新建页面",subText:"Enter",handler:j},{text:"幻灯片放映",subText:"F5",handler:I}],L=()=>[{text:"剪切",subText:"Ctrl + X",handler:g},{text:"复制",subText:"Ctrl + C",handler:p},{text:"粘贴",subText:"Ctrl + V",handler:f},{text:"全选",subText:"Ctrl + A",handler:x},{divider:!0},{text:"新建页面",subText:"Enter",handler:j},{text:"复制页面",subText:"Ctrl + D",handler:h},{text:"删除页面",subText:"Delete",handler:()=>y()},{divider:!0},{text:"从当前放映",subText:"Shift + F5",handler:V}];return(e,t)=>{const l=Object(n["resolveComponent"])("IconPlus"),c=Object(n["resolveComponent"])("IconDown"),o=Object(n["resolveDirective"])("contextmenu"),a=Object(n["resolveDirective"])("click-outside");return Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"thumbnails",onMousedown:t[3]||(t[3]=()=>E(!0))},[Object(n["createElementVNode"])("div",zu,[Object(n["createElementVNode"])("div",{class:"btn",onClick:t[0]||(t[0]=e=>Object(n["unref"])(j)())},[Object(n["createVNode"])(l,{class:"icon"}),Object(n["createTextVNode"])("添加幻灯片")]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",placement:"bottomLeft",visible:m.value,"onUpdate:visible":t[2]||(t[2]=e=>m.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Du,{onSelect:t[1]||(t[1]=e=>{Object(n["unref"])(v)(e),m.value=!1})})]),default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",Au,[Object(n["createVNode"])(c)])]),_:1},8,["visible"])]),Object(n["createVNode"])(Object(n["unref"])(Lu.a),{class:"thumbnail-list",modelValue:Object(n["unref"])(i),animation:300,scroll:!0,scrollSensitivity:50,setData:null,onEnd:w,itemKey:"id"},{item:Object(n["withCtx"])(({element:e,index:t})=>[Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["thumbnail-item",{active:Object(n["unref"])(s)===t,selected:Object(n["unref"])(O).includes(t)}]),onMousedown:e=>N(e,t)},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["label",{"offset-left":t>=99}])},Object(n["toDisplayString"])(Object(n["unref"])(Y)(t+1,2)),3),Object(n["createVNode"])(Ns,{class:"thumbnail",slide:e,size:120,visible:t<Object(n["unref"])(b)},null,8,["slide","visible"])],42,Fu)),[[o,L]])]),_:1},8,["modelValue"]),Object(n["createElementVNode"])("div",$u,"幻灯片 "+Object(n["toDisplayString"])(Object(n["unref"])(s)+1)+" / "+Object(n["toDisplayString"])(Object(n["unref"])(i).length),1)],32)),[[a,()=>E(!1)],[o,S]])}}});l("dc4aa");const Pu=Yt()(Ru,[["__scopeId","data-v-61d61c80"]]);var Hu=Pu,qu=(l("5783"),l("59a5")),Uu=()=>{const e=z(),{richTextAttrs:t,textFormatPainter:l}=Object(o["c"])(e),c=()=>{l.value?e.setTextFormatPainter(null):e.setTextFormatPainter({bold:t.value.bold,em:t.value.em,underline:t.value.underline,strikethrough:t.value.strikethrough,color:t.value.color,backcolor:t.value.backcolor,fontname:t.value.fontname,fontsize:t.value.fontsize,align:t.value.align})};return{toggleFormatPainter:c}},Gu=(l("438c"),l("fbdf"));const Xu=e=>(Object(n["pushScopeId"])("data-v-54aad0f0"),e=e(),Object(n["popScopeId"])(),e),Yu={class:"element-opacity"},Zu={class:"row"},Wu=Xu(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"不透明度:",-1));var Ju=Object(n["defineComponent"])({__name:"ElementOpacity",setup(e){const t=T(),{handleElement:l}=Object(o["c"])(z()),c=Object(n["ref"])(1);Object(n["watch"])(l,()=>{l.value&&(c.value="opacity"in l.value&&void 0!==l.value.opacity?l.value.opacity:1)},{deep:!0,immediate:!0});const{addHistorySnapshot:a}=Te(),r=e=>{if(!l.value)return;const c={opacity:e};t.updateElement({id:l.value.id,props:c}),a()};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Yu,[Object(n["createElementVNode"])("div",Zu,[Wu,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"slider",min:0,max:1,step:.1,value:c.value,onChange:t[0]||(t[0]=e=>r(e))},null,8,["step","value"])])]))}});l("fb4b");const Ku=Yt()(Ju,[["__scopeId","data-v-54aad0f0"]]);var Qu=Ku,eb=(l("fbd6"),l("160c"));const tb={class:"color-block"};var lb=Object(n["defineComponent"])({__name:"ColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,l)=>{const c=Object(n["resolveComponent"])("IconPlatte");return Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(xi["a"]),{class:"color-btn"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",tb,[Object(n["createElementVNode"])("div",{class:"content",style:Object(n["normalizeStyle"])({backgroundColor:e.color})},null,4)]),Object(n["createVNode"])(c,{class:"color-btn-icon"})]),_:1})}}});l("dc8c");const cb=Yt()(lb,[["__scopeId","data-v-3b4a02d8"]]);var nb=cb,ob=Object(n["defineComponent"])({__name:"Checkboard",props:{size:{type:Number,default:8},white:{type:String,default:"#fff"},grey:{type:String,default:"#e6e6e6"}},setup(e){const t=e,l={},c=(e,t,l)=>{const c=document.createElement("canvas");c.width=c.height=2*l;const n=c.getContext("2d");return n?(n.fillStyle=e,n.fillRect(0,0,c.width,c.height),n.fillStyle=t,n.fillRect(0,0,l,l),n.translate(l,l),n.fillRect(0,0,l,l),c.toDataURL()):null},o=(e,t,n)=>{const o=e+","+t+","+n;if(l[o])return l[o];const a=c(e,t,n);return l[o]=a,a},a=Object(n["computed"])(()=>{const e=o(t.white,t.grey,t.size);return{backgroundImage:`url(${e})`}});return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"checkerboard",style:Object(n["normalizeStyle"])(Object(n["unref"])(a))},null,4))}});l("a8d7");const ab=Yt()(ob,[["__scopeId","data-v-7494636c"]]);var rb=ab;const ib=e=>(Object(n["pushScopeId"])("data-v-246b525c"),e=e(),Object(n["popScopeId"])(),e),sb={class:"alpha"},db={class:"alpha-checkboard-wrap"},ub=ib(()=>Object(n["createElementVNode"])("div",{class:"alpha-picker"},null,-1)),bb=[ub];var Ob=Object(n["defineComponent"])({__name:"Alpha",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,c=Object(n["computed"])(()=>l.value),o=Object(n["computed"])(()=>{const e=[c.value.r,c.value.g,c.value.b].join(",");return`linear-gradient(to right, rgba(${e}, 0) 0%, rgba(${e}, 1) 100%)`}),a=Object(n["ref"])(),r=e=>{if(e.preventDefault(),!a.value)return;const l=a.value.clientWidth,n=a.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-n;let r;r=o<0?0:o>l?1:Math.round(100*o/l)/100,c.value.a!==r&&t("colorChange",{r:c.value.r,g:c.value.g,b:c.value.b,a:r})},i=()=>{window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",i)},s=e=>{r(e),window.addEventListener("mousemove",r),window.addEventListener("mouseup",i)};return Object(n["onUnmounted"])(i),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",sb,[Object(n["createElementVNode"])("div",db,[Object(n["createVNode"])(rb)]),Object(n["createElementVNode"])("div",{class:"alpha-gradient",style:Object(n["normalizeStyle"])({background:Object(n["unref"])(o)})},null,4),Object(n["createElementVNode"])("div",{class:"alpha-container",ref_key:"alphaRef",ref:a,onMousedown:t[0]||(t[0]=e=>s(e))},[Object(n["createElementVNode"])("div",{class:"alpha-pointer",style:Object(n["normalizeStyle"])({left:100*Object(n["unref"])(c).a+"%"})},bb,4)],544)]))}});l("e83e");const mb=Yt()(Ob,[["__scopeId","data-v-246b525c"]]);var pb=mb;const fb=e=>(Object(n["pushScopeId"])("data-v-60c3cca1"),e=e(),Object(n["popScopeId"])(),e),jb={class:"hue"},vb=fb(()=>Object(n["createElementVNode"])("div",{class:"hue-picker"},null,-1)),hb=[vb];var yb=Object(n["defineComponent"])({__name:"Hue",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,c=Object(n["ref"])(0),o=Object(n["ref"])(""),a=Object(n["computed"])(()=>{const e=I()(l.value).toHsl();return-1!==l.hue&&(e.h=l.hue),e}),r=Object(n["computed"])(()=>0===a.value.h&&"right"===o.value?"100%":100*a.value.h/360+"%");Object(n["watch"])(()=>l.value,()=>{const e=I()(l.value).toHsl(),t=0===e.s?l.hue:e.h;0!==t&&t-c.value>0&&(o.value="right"),0!==t&&t-c.value<0&&(o.value="left"),c.value=t});const i=Object(n["ref"])(),s=e=>{if(e.preventDefault(),!i.value)return;const c=i.value.clientWidth,n=i.value.getBoundingClientRect().left+window.pageXOffset,o=e.pageX-n;let r,s;o<0?r=0:o>c?r=360:(s=100*o/c,r=360*s/100),-1!==l.hue&&a.value.h===r||t("colorChange",{h:r,l:a.value.l,s:a.value.s,a:a.value.a})},d=()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",d)},u=e=>{s(e),window.addEventListener("mousemove",s),window.addEventListener("mouseup",d)};return Object(n["onUnmounted"])(d),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",jb,[Object(n["createElementVNode"])("div",{class:"hue-container",ref_key:"hueRef",ref:i,onMousedown:t[0]||(t[0]=e=>u(e))},[Object(n["createElementVNode"])("div",{class:"hue-pointer",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(r)})},hb,4)],544)]))}});l("179a");const gb=Yt()(yb,[["__scopeId","data-v-60c3cca1"]]);var xb=gb;const kb=e=>(Object(n["pushScopeId"])("data-v-d230faf4"),e=e(),Object(n["popScopeId"])(),e),Cb=kb(()=>Object(n["createElementVNode"])("div",{class:"saturation-white"},null,-1)),Nb=kb(()=>Object(n["createElementVNode"])("div",{class:"saturation-black"},null,-1)),Eb=kb(()=>Object(n["createElementVNode"])("div",{class:"saturation-circle"},null,-1)),wb=[Eb];var Vb=Object(n["defineComponent"])({__name:"Saturation",props:{value:{type:Object,required:!0},hue:{type:Number,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,c=Object(n["computed"])(()=>{const e=I()(l.value).toHsv();return-1!==l.hue&&(e.h=l.hue),e}),o=Object(n["computed"])(()=>`hsl(${c.value.h}, 100%, 50%)`),a=Object(n["computed"])(()=>-100*c.value.v+1+100+"%"),r=Object(n["computed"])(()=>100*c.value.s+"%"),i=Object(S["throttle"])((function(e){t("colorChange",e)}),20,{leading:!0,trailing:!1}),s=Object(n["ref"])(),d=e=>{if(e.preventDefault(),!s.value)return;const t=s.value.clientWidth,l=s.value.clientHeight,n=s.value.getBoundingClientRect().left+window.pageXOffset,o=s.value.getBoundingClientRect().top+window.pageYOffset,a=Object(S["clamp"])(e.pageX-n,0,t),r=Object(S["clamp"])(e.pageY-o,0,l),d=a/t,u=Object(S["clamp"])(-r/l+1,0,1);i({h:c.value.h,s:d,v:u,a:c.value.a})},u=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",u)},b=e=>{d(e),window.addEventListener("mousemove",d),window.addEventListener("mouseup",u)};return Object(n["onUnmounted"])(u),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"saturation",ref_key:"saturationRef",ref:s,style:Object(n["normalizeStyle"])({background:Object(n["unref"])(o)}),onMousedown:t[0]||(t[0]=e=>b(e))},[Cb,Nb,Object(n["createElementVNode"])("div",{class:"saturation-pointer",style:Object(n["normalizeStyle"])({top:Object(n["unref"])(a),left:Object(n["unref"])(r)})},wb,4)],36))}});l("0516");const Ib=Yt()(Vb,[["__scopeId","data-v-d230faf4"]]);var Sb=Ib;const Lb={class:"editable-input"},Bb=["value"];var _b=Object(n["defineComponent"])({__name:"EditableInput",props:{value:{type:Object,required:!0}},emits:["colorChange"],setup(e,{emit:t}){const l=e,c=Object(n["computed"])(()=>{let e="";return e=l.value.a<1?I()(l.value).toHex8String().toUpperCase():I()(l.value).toHexString().toUpperCase(),e.replace("#","")}),o=e=>{const l=e.target.value;l.length>=6&&t("colorChange",I()(l).toRgb())};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Lb,[Object(n["createElementVNode"])("input",{class:"input-content",value:Object(n["unref"])(c),onInput:t[0]||(t[0]=e=>o(e))},null,40,Bb)]))}});l("a9b0");const Tb=Yt()(_b,[["__scopeId","data-v-2f428dde"]]);var Mb=Tb;const Db={class:"color-picker"},zb={class:"picker-saturation-wrap"},Ab={class:"picker-controls"},Fb={class:"picker-color-wrap"},$b={class:"picker-sliders"},Rb={class:"picker-hue-wrap"},Pb={class:"picker-alpha-wrap"},Hb={class:"picker-field"},qb={class:"picker-presets"},Ub=["onClick"],Gb={class:"picker-gradient-presets"},Xb=["onClick"],Yb={class:"picker-presets"},Zb=["onClick"],Wb={key:0,class:"recent-colors-title"},Jb={class:"picker-presets"},Kb=["onClick"];var Qb=Object(n["defineComponent"])({__name:"index",props:{modelValue:{type:String,default:"#e86b99"}},emits:["update:modelValue"],setup(e,{emit:t}){const l=e,c="RECENT_COLORS",o=[["#7f7f7f","#f2f2f2"],["#0d0d0d","#808080"],["#1c1a10","#ddd8c3"],["#0e243d","#c6d9f0"],["#233f5e","#dae5f0"],["#632623","#f2dbdb"],["#4d602c","#eaf1de"],["#3f3150","#e6e0ec"],["#1e5867","#d9eef3"],["#99490f","#fee9da"]],a=(e,t,l)=>{const c=I()(e).toRgb(),n=I()(t).toRgb(),o=(n.r-c.r)/l,a=(n.g-c.g)/l,r=(n.b-c.b)/l,i=[];for(let s=0;s<l;s++){const e=I()({r:c.r+o*s,g:c.g+a*s,b:c.b+r*s}).toRgbString();i.push(e)}return i},r=()=>{const e=[];for(const t of o)e.push(a(t[1],t[0],5));return e},i=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c"],s=["#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57","#00afee","#0071be","#00215f","#72349d"],d=Object(n["ref"])(-1),u=Object(n["ref"])([]),b=Object(n["computed"])({get(){return I()(l.modelValue).toRgb()},set(e){const l=`rgba(${[e.r,e.g,e.b,e.a].join(",")})`;t("update:modelValue",l)}}),O=r(),m=Object(n["computed"])(()=>`rgba(${[b.value.r,b.value.g,b.value.b,b.value.a].join(",")})`),p=e=>{d.value=I()(e).toHsl().h,t("update:modelValue",e)},f=Object(S["debounce"])((function(){const e=I()(b.value).toRgbString();if(!u.value.includes(e)){u.value=[e,...u.value];const t=10;u.value.length>t&&(u.value=u.value.slice(0,t))}}),300,{trailing:!0});Object(n["onMounted"])(()=>{const e=localStorage.getItem(c);e&&(u.value=JSON.parse(e))}),Object(n["watch"])(u,()=>{const e=JSON.stringify(u.value);localStorage.setItem(c,e)});const j=e=>{"h"in e?(d.value=e.h,b.value=I()(e).toRgb()):(d.value=I()(e).toHsl().h,b.value=e),f()},v=()=>{const e="EyeDropper"in window;e?h():y()},h=()=>{ne["a"].success("按 ESC 键关闭取色吸管");const e=new window.EyeDropper;e.open().then(e=>{const t=I()(e.sRGBHex);d.value=t.toHsl().h,b.value=t.toRgb(),f()}).catch(()=>{ne["a"].success("关闭取色吸管")})},y=()=>{const e=document.querySelector(".canvas");if(!e)return;const t=document.createElement("div");t.style.cssText="position: fixed; top: 0; left: 0; bottom: 0; right: 0; z-index: 9999; cursor: wait;",document.body.appendChild(t);const l=document.createElement("div");l.style.cssText="position: absolute; top: -100px; left: -100px; width: 16px; height: 16px; border: 1px solid #000; z-index: 999",t.appendChild(l);const{left:c,top:n,width:o,height:a}=e.getBoundingClientRect(),r=e=>(!e.tagName||"FOREIGNOBJECT"!==e.tagName.toUpperCase())&&(!e.classList||!e.classList.contains("operate"));Object(ot["a"])(e,{filter:r,fontEmbedCSS:"",width:o,height:a,canvasWidth:o,canvasHeight:a,pixelRatio:1}).then(e=>{e.style.cssText=`position: absolute; top: ${n}px; left: ${c}px; cursor: crosshair;`,t.style.cursor="default",t.appendChild(e);const o=e.getContext("2d");if(!o)return;let a="";const r=e=>{const t=e.x,r=e.y,i=t-c,s=r-n,[d,u,b,O]=o.getImageData(i,s,1,1).data;a=`rgba(${d}, ${u}, ${b}, ${(O/255).toFixed(2)})`,l.style.left=t+10+"px",l.style.top=r+10+"px",l.style.backgroundColor=a},i=()=>{a="",l.style.left="-100px",l.style.top="-100px",l.style.backgroundColor=""},s=l=>{if(a&&0===l.button){const e=I()(a);d.value=e.toHsl().h,b.value=e.toRgb(),f()}document.body.removeChild(t),e.removeEventListener("mousemove",r),e.removeEventListener("mouseleave",i),window.removeEventListener("mousedown",s)};e.addEventListener("mousemove",r),e.addEventListener("mouseleave",i),window.addEventListener("mousedown",s)}).catch(()=>{ne["a"].error("取色吸管初始化失败"),document.body.removeChild(t)})};return(e,t)=>{const l=Object(n["resolveComponent"])("IconNeedle");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Db,[Object(n["createElementVNode"])("div",zb,[Object(n["createVNode"])(Sb,{value:Object(n["unref"])(b),hue:d.value,onColorChange:t[0]||(t[0]=e=>j(e))},null,8,["value","hue"])]),Object(n["createElementVNode"])("div",Ab,[Object(n["createElementVNode"])("div",Fb,[Object(n["createElementVNode"])("div",{class:"picker-current-color",style:Object(n["normalizeStyle"])({background:Object(n["unref"])(m)})},null,4),Object(n["createVNode"])(rb)]),Object(n["createElementVNode"])("div",$b,[Object(n["createElementVNode"])("div",Rb,[Object(n["createVNode"])(xb,{value:Object(n["unref"])(b),hue:d.value,onColorChange:t[1]||(t[1]=e=>j(e))},null,8,["value","hue"])]),Object(n["createElementVNode"])("div",Pb,[Object(n["createVNode"])(pb,{value:Object(n["unref"])(b),onColorChange:t[2]||(t[2]=e=>j(e))},null,8,["value"])])])]),Object(n["createElementVNode"])("div",Hb,[Object(n["createVNode"])(Mb,{class:"input",value:Object(n["unref"])(b),onColorChange:t[3]||(t[3]=e=>j(e))},null,8,["value"]),Object(n["createElementVNode"])("div",{class:"straw",onClick:t[4]||(t[4]=e=>v())},[Object(n["createVNode"])(l)]),Object(n["createElementVNode"])("div",{class:"transparent",onClick:t[5]||(t[5]=e=>p("#00000000"))},[Object(n["createVNode"])(rb)])]),Object(n["createElementVNode"])("div",qb,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(i,e=>Object(n["createElementVNode"])("div",{class:"picker-presets-color",key:e,style:Object(n["normalizeStyle"])({background:e}),onClick:t=>p(e)},null,12,Ub)),64))]),Object(n["createElementVNode"])("div",Gb,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(O),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"picker-gradient-col",key:t},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"picker-gradient-color",key:e,style:Object(n["normalizeStyle"])({background:e}),onClick:t=>p(e)},null,12,Xb))),128))]))),128))]),Object(n["createElementVNode"])("div",Yb,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(s,e=>Object(n["createElementVNode"])("div",{key:e,class:"picker-presets-color",style:Object(n["normalizeStyle"])({background:e}),onClick:t=>p(e)},null,12,Zb)),64))]),u.value.length?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Wb,"最近使用:")):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",Jb,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(u.value,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:e,class:"picker-presets-color alpha",onClick:t=>p(e)},[Object(n["createElementVNode"])("div",{class:"picker-presets-color-content",style:Object(n["normalizeStyle"])({background:e})},null,4)],8,Kb))),128))])])}}});l("bd05");const eO=Yt()(Qb,[["__scopeId","data-v-3d280c42"]]);var tO=eO;const lO=e=>(Object(n["pushScopeId"])("data-v-49642f50"),e=e(),Object(n["popScopeId"])(),e),cO={class:"element-outline"},nO={key:0,class:"row"},oO=lO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"启用边框:",-1)),aO={class:"switch-wrapper",style:{flex:"3"}},rO={class:"row"},iO=lO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"边框样式:",-1)),sO={class:"row"},dO=lO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"边框颜色:",-1)),uO={class:"row"},bO=lO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"边框粗细:",-1));var OO=Object(n["defineComponent"])({__name:"ElementOutline",props:{fixed:{type:Boolean,default:!1}},setup(e){const t=Ci["a"].Option,l=T(),{handleElement:c}=Object(o["c"])(z()),a=Object(n["ref"])(),r=Object(n["ref"])(!1);Object(n["watch"])(c,()=>{c.value&&(a.value="outline"in c.value?c.value.outline:void 0,r.value=!!a.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:i}=Te(),s=e=>{if(!c.value)return;const t={outline:{...a.value,...e}};l.updateElement({id:c.value.id,props:t}),i()},d=e=>{if(c.value){if(e){const e={width:2,color:"#000",style:"solid"};l.updateElement({id:c.value.id,props:{outline:e}})}else l.removeElementProps({id:c.value.id,propName:"outline"});i()}};return(l,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",cO,[e.fixed?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",nO,[oO,Object(n["createElementVNode"])("div",aO,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:r.value,onChange:c[0]||(c[0]=e=>d(e))},null,8,["checked"])])])),r.value&&a.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:1},[Object(n["createElementVNode"])("div",rO,[iO,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:a.value.style,onChange:c[1]||(c[1]=e=>s({style:e}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:"solid"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("实线边框")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"dashed"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("虚线边框")]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",sO,[dO,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:a.value.color,"onUpdate:modelValue":c[2]||(c[2]=e=>s({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:a.value.color||"#000",style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",uO,[bO,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{value:a.value.width,onChange:c[3]||(c[3]=e=>s({width:e})),style:{flex:"3"}},null,8,["value"])])],64)):Object(n["createCommentVNode"])("",!0)]))}});l("a9ab");const mO=Yt()(OO,[["__scopeId","data-v-49642f50"]]);var pO=mO;const fO=e=>(Object(n["pushScopeId"])("data-v-19c233fc"),e=e(),Object(n["popScopeId"])(),e),jO={class:"element-shadow"},vO={class:"row"},hO=fO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"启用阴影:",-1)),yO={class:"switch-wrapper",style:{flex:"3"}},gO={class:"row"},xO=fO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"水平阴影:",-1)),kO={class:"row"},CO=fO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"垂直阴影:",-1)),NO={class:"row"},EO=fO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"模糊距离:",-1)),wO={class:"row"},VO=fO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"阴影颜色:",-1));var IO=Object(n["defineComponent"])({__name:"ElementShadow",setup(e){const t=T(),{handleElement:l}=Object(o["c"])(z()),c=Object(n["ref"])(),a=Object(n["ref"])(!1);Object(n["watch"])(l,()=>{l.value&&(c.value="shadow"in l.value?l.value.shadow:void 0,a.value=!!c.value)},{deep:!0,immediate:!0});const{addHistorySnapshot:r}=Te(),i=e=>{if(!l.value||!c.value)return;const n={...c.value,...e};t.updateElement({id:l.value.id,props:{shadow:n}}),r()},s=e=>{if(l.value){if(e){const e={h:1,v:1,blur:2,color:"#000"};t.updateElement({id:l.value.id,props:{shadow:e}})}else t.removeElementProps({id:l.value.id,propName:"shadow"});r()}};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",jO,[Object(n["createElementVNode"])("div",vO,[hO,Object(n["createElementVNode"])("div",yO,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:a.value,onChange:t[0]||(t[0]=e=>s(e))},null,8,["checked"])])]),a.value&&c.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createElementVNode"])("div",gO,[xO,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"slider",min:-10,max:10,step:1,value:c.value.h,onChange:t[1]||(t[1]=e=>i({h:e}))},null,8,["value"])]),Object(n["createElementVNode"])("div",kO,[CO,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"slider",min:-10,max:10,step:1,value:c.value.v,onChange:t[2]||(t[2]=e=>i({v:e}))},null,8,["value"])]),Object(n["createElementVNode"])("div",NO,[EO,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"slider",min:1,max:20,step:1,value:c.value.blur,onChange:t[3]||(t[3]=e=>i({blur:e}))},null,8,["value"])]),Object(n["createElementVNode"])("div",wO,[VO,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:c.value.color,"onUpdate:modelValue":t[4]||(t[4]=e=>i({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:c.value.color,style:{flex:"3"}},null,8,["color"])]),_:1})])],64)):Object(n["createCommentVNode"])("",!0)]))}});l("513b");const SO=Yt()(IO,[["__scopeId","data-v-19c233fc"]]);var LO=SO;const BO={class:"text-color-block"};var _O=Object(n["defineComponent"])({__name:"TextColorButton",props:{color:{type:String,required:!0}},setup(e){return(t,l)=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(xi["a"]),{class:"text-color-btn"},{default:Object(n["withCtx"])(()=>[Object(n["renderSlot"])(t.$slots,"default"),Object(n["createElementVNode"])("div",BO,[Object(n["createElementVNode"])("div",{class:"text-color-block-content",style:Object(n["normalizeStyle"])({backgroundColor:e.color})},null,4)])]),_:3}))}});l("3ef1");const TO=Yt()(_O,[["__scopeId","data-v-c90c8a28"]]);var MO=TO,DO=Object(n["defineComponent"])({__name:"CheckboxButton",props:{checked:{type:Boolean,default:!1}},setup(e){return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("button",{class:Object(n["normalizeClass"])(["checkbox-button",{checked:e.checked}])},[Object(n["renderSlot"])(t.$slots,"default")],2))}});l("573c");const zO=Yt()(DO,[["__scopeId","data-v-699cf016"]]);var AO=zO;const FO={class:"checkbox-button-group"};function $O(e,t){return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",FO,[Object(n["renderSlot"])(e.$slots,"default",{},void 0,!0)])}l("5634");const RO={},PO=Yt()(RO,[["render",$O],["__scopeId","data-v-b8aa6eac"]]);var HO=PO;const qO=e=>(Object(n["pushScopeId"])("data-v-9b75a3bc"),e=e(),Object(n["popScopeId"])(),e),UO={class:"text-style-panel"},GO={class:"preset-style"},XO=["onClick"],YO={class:"link-popover"},ZO={class:"btns"},WO={class:"row"},JO={class:"list-wrap"},KO=["onClick"],QO=qO(()=>Object(n["createElementVNode"])("span",null,null,-1)),em=[QO],tm=qO(()=>Object(n["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),lm={class:"list-wrap"},cm=["onClick"],nm=qO(()=>Object(n["createElementVNode"])("span",null,null,-1)),om=[nm],am={class:"row"},rm=qO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"行间距:",-1)),im={class:"row"},sm=qO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"段间距:",-1)),dm={class:"row"},um=qO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"字间距:",-1)),bm={class:"row"},Om=qO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"首行缩进:",-1)),mm={class:"row"},pm=qO(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"文本框填充:",-1));var fm=Object(n["defineComponent"])({__name:"TextStylePanel",setup(e){const{Group:t,Button:l}=qu["a"],{OptGroup:c,Option:a}=Ci["a"],r=ki["a"].Group,s=xi["a"].Group,d=[{label:"大标题",style:{fontSize:"26px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"48px"},{command:"align",value:"center"}]},{label:"小标题",style:{fontSize:"22px",fontWeight:700},cmd:[{command:"clear"},{command:"bold"},{command:"fontsize",value:"36px"},{command:"align",value:"center"}]},{label:"正文",style:{fontSize:"20px"},cmd:[{command:"clear"},{command:"fontsize",value:"20px"}]},{label:"正文[小]",style:{fontSize:"18px"},cmd:[{command:"clear"},{command:"fontsize",value:"18px"}]},{label:"注释 1",style:{fontSize:"16px",fontStyle:"italic"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"em"}]},{label:"注释 2",style:{fontSize:"16px",textDecoration:"underline"},cmd:[{command:"clear"},{command:"fontsize",value:"16px"},{command:"underline"}]}],u=z(),b=T(),{handleElement:O,handleElementId:m,richTextAttrs:p,availableFonts:f,textFormatPainter:j}=Object(o["c"])(u),{addHistorySnapshot:v}=Te(),{toggleFormatPainter:h}=Uu(),y=e=>{b.updateElement({id:m.value,props:e}),v()},g=Object(n["ref"])(!1),x=Object(n["ref"])(!1),k=Object(n["ref"])(["disc","circle","square"]),C=Object(n["ref"])(["decimal","lower-roman","upper-roman","lower-alpha","upper-alpha","lower-greek"]),N=Object(n["ref"])("#000"),E=Object(n["ref"])(),w=Object(n["ref"])(),V=Object(n["ref"])(),I=Object(n["ref"])();Object(n["watch"])(O,()=>{O.value&&"text"===O.value.type&&(N.value=O.value.fill||"#fff",E.value=O.value.lineHeight||1.5,w.value=O.value.wordSpace||0,V.value=O.value.textIndent||0,I.value=void 0===O.value.paragraphSpace?5:O.value.paragraphSpace)},{deep:!0,immediate:!0});const S=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],L=[.9,1,1.15,1.2,1.4,1.5,1.8,2,2.5,3],B=[0,1,2,3,4,5,6,8,10],_=[0,48,96,144,192,240,288,336],M=[0,5,10,15,20,25,30,40,50,80],D=e=>{y({lineHeight:e})},A=e=>{y({paragraphSpace:e})},F=e=>{y({wordSpace:e})},$=e=>{y({textIndent:e})},R=e=>{y({fill:e})},P=(e,t)=>{yn.emit(jn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},H=e=>{yn.emit(jn.RICH_TEXT_COMMAND,{action:e})},q=Object(n["ref"])(""),U=Object(n["ref"])(!1);Object(n["watch"])(p,()=>U.value=!1);const G=()=>{q.value=p.value.link,U.value=!0},X=e=>{if(e){const t=/^(https?):\/\/[\w\-]+(\.[\w\-]+)+([\w\-.,@?^=%&:\/~+#]*[\w\-@?^=%&\/~+#])?$/;if(!t.test(e))return ne["a"].error("不是正确的网页链接地址")}P("link",e),U.value=!1};return(e,o)=>{const u=Object(n["resolveComponent"])("IconFontSize"),b=Object(n["resolveComponent"])("IconAddText"),O=Object(n["resolveComponent"])("IconText"),m=Object(n["resolveComponent"])("IconHighLight"),v=Object(n["resolveComponent"])("IconTextBold"),y=Object(n["resolveComponent"])("IconTextItalic"),T=Object(n["resolveComponent"])("IconTextUnderline"),z=Object(n["resolveComponent"])("IconStrikethrough"),Y=Object(n["resolveComponent"])("IconCode"),Z=Object(n["resolveComponent"])("IconQuote"),W=Object(n["resolveComponent"])("IconFormat"),J=Object(n["resolveComponent"])("IconFormatBrush"),K=Object(n["resolveComponent"])("IconLinkOne"),Q=Object(n["resolveComponent"])("IconAlignTextLeft"),ee=Object(n["resolveComponent"])("IconAlignTextCenter"),te=Object(n["resolveComponent"])("IconAlignTextRight"),le=Object(n["resolveComponent"])("IconList"),ce=Object(n["resolveComponent"])("IconDown"),ne=Object(n["resolveComponent"])("IconOrderedList"),oe=Object(n["resolveComponent"])("IconIndentLeft"),ae=Object(n["resolveComponent"])("IconIndentRight"),re=Object(n["resolveComponent"])("IconRowHeight"),ie=Object(n["resolveComponent"])("IconVerticalSpacingBetweenItems"),se=Object(n["resolveComponent"])("IconFullwidth");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",UO,[Object(n["createElementVNode"])("div",GO,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(d,e=>Object(n["createElementVNode"])("div",{class:"preset-style-item",key:e.label,style:Object(n["normalizeStyle"])(e.style),onClick:t=>H(e.cmd)},Object(n["toDisplayString"])(e.label),13,XO)),64))]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Object(n["unref"])(r),{compact:"",class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(p).fontname,onChange:o[0]||(o[0]=e=>P("fontname",e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u)]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{label:"系统字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(f),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(a),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",{style:Object(n["normalizeStyle"])({fontFamily:e.value})},Object(n["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{label:"在线字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(a),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"2"},value:Object(n["unref"])(p).fontsize,onChange:o[1]||(o[1]=e=>P("fontsize",e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(b)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(S,e=>Object(n["createVNode"])(Object(n["unref"])(a),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(s),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(p).color,"onUpdate:modelValue":o[2]||(o[2]=e=>P("color",e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:Object(n["unref"])(p).color,style:{flex:"3"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(p).backcolor,"onUpdate:modelValue":o[3]||(o[3]=e=>P("backcolor",e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:Object(n["unref"])(p).backcolor,style:{flex:"3"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(m)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"font-size-btn",style:{flex:"2"},onClick:o[4]||(o[4]=e=>P("fontsize-add"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u),Object(n["createTextVNode"])("+")]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"font-size-btn",style:{flex:"2"},onClick:o[5]||(o[5]=e=>P("fontsize-reduce"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u),Object(n["createTextVNode"])("-")]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).bold,onClick:o[6]||(o[6]=e=>P("bold"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(v)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).em,onClick:o[7]||(o[7]=e=>P("em"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(y)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).underline,onClick:o[8]||(o[8]=e=>P("underline"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(T)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).strikethrough,onClick:o[9]||(o[9]=e=>P("strikethrough"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(z)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上标"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).superscript,onClick:o[10]||(o[10]=e=>P("superscript"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("A²")]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下标"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).subscript,onClick:o[11]||(o[11]=e=>P("subscript"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("A₂")]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"行内代码"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).code,onClick:o[12]||(o[12]=e=>P("code"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Y)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"引用"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(p).blockquote,onClick:o[13]||(o[13]=e=>P("blockquote"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Z)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"清除格式"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},onClick:o[14]||(o[14]=e=>P("clear"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(W)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"格式刷"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:!!Object(n["unref"])(j),onClick:o[15]||(o[15]=e=>Object(n["unref"])(h)())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(J)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"超链接"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{placement:"bottomRight",trigger:"click",visible:U.value,"onUpdate:visible":o[20]||(o[20]=e=>U.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",YO,[Object(n["createVNode"])(Object(n["unref"])(ki["a"]),{value:q.value,"onUpdate:value":o[16]||(o[16]=e=>q.value=e),placeholder:"请输入超链接"},null,8,["value"]),Object(n["createElementVNode"])("div",ZO,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{size:"small",disabled:!Object(n["unref"])(p).link,onClick:o[17]||(o[17]=e=>X()),style:{"margin-right":"5px"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("移除")]),_:1},8,["disabled"]),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{size:"small",type:"primary",onClick:o[18]||(o[18]=e=>X(q.value))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("确认")]),_:1})])])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:!!Object(n["unref"])(p).link,onClick:o[19]||(o[19]=e=>G())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(K)]),_:1},8,["checked"])]),_:1},8,["visible"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row","button-style":"solid",value:Object(n["unref"])(p).align,onChange:o[21]||(o[21]=e=>P("align",e.target.value))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"left",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Q)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"center",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ee)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"right",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(te)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(n["createElementVNode"])("div",WO,[Object(n["createVNode"])(Object(n["unref"])(s),{style:{flex:"15"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"项目符号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{type:Object(n["unref"])(p).bulletList?"primary":"default",style:{flex:"1"},onClick:o[22]||(o[22]=e=>P("bulletList"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(le)]),_:1},8,["type"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:g.value,"onUpdate:visible":o[23]||(o[23]=e=>g.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",JO,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(k.value,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("ul",{class:"list",key:e,style:Object(n["normalizeStyle"])({listStyleType:e}),onClick:t=>P("bulletList",e)},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(3,e=>Object(n["createElementVNode"])("li",{class:"list-item",key:e},em)),64))],12,KO))),128))])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"popover-btn"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ce)]),_:1})]),_:1},8,["visible"])]),_:1}),tm,Object(n["createVNode"])(Object(n["unref"])(s),{style:{flex:"15"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"编号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{type:Object(n["unref"])(p).orderedList?"primary":"default",style:{flex:"1"},onClick:o[24]||(o[24]=e=>P("orderedList"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ne)]),_:1},8,["type"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:x.value,"onUpdate:visible":o[25]||(o[25]=e=>x.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",lm,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(C.value,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("ul",{class:"list",key:e,style:Object(n["normalizeStyle"])({listStyleType:e}),onClick:t=>P("orderedList",e)},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(3,e=>Object(n["createElementVNode"])("li",{class:"list-item",key:e},om)),64))],12,cm))),128))])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"popover-btn"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ce)]),_:1})]),_:1},8,["visible"])]),_:1})]),Object(n["createVNode"])(Object(n["unref"])(s),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小缩进"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[26]||(o[26]=e=>P("indent","-1"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(oe)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大缩进"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[27]||(o[27]=e=>P("indent","+1"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ae)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",am,[rm,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:E.value,onChange:o[28]||(o[28]=e=>D(e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(re)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(L,e=>Object(n["createVNode"])(Object(n["unref"])(a),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e)+"倍",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",im,[sm,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:I.value,onChange:o[29]||(o[29]=e=>A(e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ie)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(M,e=>Object(n["createVNode"])(Object(n["unref"])(a),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e)+"px",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",dm,[um,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:w.value,onChange:o[30]||(o[30]=e=>F(e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(se)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(B,e=>Object(n["createVNode"])(Object(n["unref"])(a),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e)+"px",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",bm,[Om,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:V.value,onChange:o[31]||(o[31]=e=>$(e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ae)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(_,e=>Object(n["createVNode"])(Object(n["unref"])(a),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e)+"px",1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",mm,[pm,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:N.value,"onUpdate:modelValue":o[32]||(o[32]=e=>R(e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:N.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(pO),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(LO),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Qu)])}}});l("9f65");const jm=Yt()(fm,[["__scopeId","data-v-9b75a3bc"]]);var vm=jm;const hm={class:"element-flip"};var ym=Object(n["defineComponent"])({__name:"ElementFlip",setup(e){const t=T(),{handleElement:l}=Object(o["c"])(z()),c=Object(n["ref"])(!1),a=Object(n["ref"])(!1);Object(n["watch"])(l,()=>{!l.value||"image"!==l.value.type&&"shape"!==l.value.type||(c.value=!!l.value.flipH,a.value=!!l.value.flipV)},{deep:!0,immediate:!0});const{addHistorySnapshot:r}=Te(),i=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())};return(e,t)=>{const l=Object(n["resolveComponent"])("IconFlipVertically"),o=Object(n["resolveComponent"])("IconFlipHorizontally");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",hm,[Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:a.value,onClick:t[0]||(t[0]=e=>i({flipV:!a.value}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(l),Object(n["createTextVNode"])(" 垂直翻转")]),_:1},8,["checked"]),Object(n["createVNode"])(AO,{style:{flex:"1"},checked:c.value,onClick:t[1]||(t[1]=e=>i({flipH:!c.value}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(o),Object(n["createTextVNode"])(" 水平翻转")]),_:1},8,["checked"])]),_:1})])}}});l("a13f");const gm=Yt()(ym,[["__scopeId","data-v-1b5a047e"]]);var xm=gm;const km=e=>(Object(n["pushScopeId"])("data-v-a99ef6ee"),e=e(),Object(n["popScopeId"])(),e),Cm={class:"element-filter"},Nm={class:"row"},Em=km(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"启用滤镜:",-1)),wm={class:"switch-wrapper",style:{flex:"3"}},Vm={key:0,class:"filter"},Im={class:"name"};var Sm=Object(n["defineComponent"])({__name:"ElementFilter",setup(e){const t=[{label:"模糊",key:"blur",default:0,value:0,unit:"px",max:10,step:1},{label:"亮度",key:"brightness",default:100,value:100,unit:"%",max:200,step:5},{label:"对比度",key:"contrast",default:100,value:100,unit:"%",max:200,step:5},{label:"灰度",key:"grayscale",default:0,value:0,unit:"%",max:100,step:5},{label:"饱和度",key:"saturate",default:100,value:100,unit:"%",max:200,step:5},{label:"色相",key:"hue-rotate",default:0,value:0,unit:"deg",max:360,step:10},{label:"不透明度",key:"opacity",default:100,value:100,unit:"%",max:100,step:5}],l=T(),{handleElement:c,handleElementId:a}=Object(o["c"])(z()),r=Object(n["ref"])(JSON.parse(JSON.stringify(t))),i=Object(n["ref"])(!1),{addHistorySnapshot:s}=Te();Object(n["watch"])(c,()=>{if(!c.value||"image"!==c.value.type)return;const e=c.value.filters;e?(r.value=t.map(t=>void 0!==e[t.key]?{...t,value:parseInt(e[t.key])}:t),i.value=!0):(r.value=JSON.parse(JSON.stringify(t)),i.value=!1)},{deep:!0,immediate:!0});const d=(e,t)=>{const n=c.value,o=n.filters||{},r={...o,[e.key]:`${t}${e.unit}`};l.updateElement({id:a.value,props:{filters:r}}),s()},u=e=>{c.value&&(e?l.updateElement({id:c.value.id,props:{filters:{}}}):l.removeElementProps({id:c.value.id,propName:"filters"}),s())};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Cm,[Object(n["createElementVNode"])("div",Nm,[Em,Object(n["createElementVNode"])("div",wm,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:i.value,onChange:t[0]||(t[0]=e=>u(e))},null,8,["checked"])])]),i.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Vm,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(r.value,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"filter-item",key:e.key},[Object(n["createElementVNode"])("div",Im,Object(n["toDisplayString"])(e.label),1),Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"filter-slider",max:e.max,min:0,step:e.step,value:e.value,onChange:t=>d(e,t)},null,8,["max","step","value","onChange"])]))),128))])):Object(n["createCommentVNode"])("",!0)]))}});l("23e8");const Lm=Yt()(Sm,[["__scopeId","data-v-a99ef6ee"]]);var Bm=Lm;const _m=e=>(Object(n["pushScopeId"])("data-v-7e9086fc"),e=e(),Object(n["popScopeId"])(),e),Tm={class:"element-color-mask"},Mm={class:"row"},Dm=_m(()=>Object(n["createElementVNode"])("div",{style:{flex:"1"}},"重新着色(蒙版):",-1)),zm={class:"switch-wrapper",style:{flex:"1"}},Am={class:"row",style:{"margin-top":"15px"}},Fm=_m(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"蒙版颜色:",-1)),$m={class:"row"},Rm=_m(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"不透明度:",-1));var Pm=Object(n["defineComponent"])({__name:"ElementColorMask",setup(e){const t={color:"transparent",opacity:.3},l=T(),{handleElement:c,handleElementId:a}=Object(o["c"])(z()),r=Object(n["ref"])(t),i=Object(n["ref"])(!1),{addHistorySnapshot:s}=Te();Object(n["watch"])(c,()=>{c.value&&"image"===c.value.type&&(c.value.colorMask?(r.value=c.value.colorMask,i.value=!0):i.value=!1)},{deep:!0,immediate:!0});const d=e=>{c.value&&(e?l.updateElement({id:c.value.id,props:{colorMask:t}}):l.removeElementProps({id:c.value.id,propName:"colorMask"}),s())},u=e=>{const t={...r.value,...e};l.updateElement({id:a.value,props:{colorMask:t}}),s()};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Tm,[Object(n["createElementVNode"])("div",Mm,[Dm,Object(n["createElementVNode"])("div",zm,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:i.value,onChange:t[0]||(t[0]=e=>d(e))},null,8,["checked"])])]),i.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createElementVNode"])("div",Am,[Fm,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:r.value.color,"onUpdate:modelValue":t[1]||(t[1]=e=>u({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:r.value.color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",$m,[Rm,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"opacity-slider",max:1,min:0,step:.05,value:r.value.opacity,onChange:t[2]||(t[2]=e=>u({opacity:e}))},null,8,["step","value"])])],64)):Object(n["createCommentVNode"])("",!0)]))}});l("6a91");const Hm=Yt()(Pm,[["__scopeId","data-v-7e9086fc"]]);var qm=Hm;const Um=e=>(Object(n["pushScopeId"])("data-v-105f4640"),e=e(),Object(n["popScopeId"])(),e),Gm={class:"image-style-panel"},Xm={class:"clip"},Ym=Um(()=>Object(n["createElementVNode"])("div",{class:"title"},"按形状:",-1)),Zm={class:"shape-clip"},Wm=["onClick"],Jm={key:0,class:"title"};var Km=Object(n["defineComponent"])({__name:"ImageStylePanel",setup(e){const t=xi["a"].Group,l=Rl,c=[{label:"纵横比(方形)",children:[{key:"1:1",ratio:1}]},{label:"纵横比(纵向)",children:[{key:"2:3",ratio:1.5},{key:"3:4",ratio:4/3},{key:"3:5",ratio:5/3},{key:"4:5",ratio:5/4}]},{label:"纵横比(横向)",children:[{key:"3:2",ratio:2/3},{key:"4:3",ratio:3/4},{key:"5:3",ratio:.6},{key:"5:4",ratio:.8}]},{children:[{key:"16:9",ratio:9/16},{key:"16:10",ratio:.625}]}],a=z(),r=T(),{handleElement:i,handleElementId:s}=Object(o["c"])(a),{currentSlide:d}=Object(o["c"])(r),u=i,b=Object(n["ref"])(!1),{addHistorySnapshot:O}=Te(),m=()=>{a.setClipingImageElementId(s.value),b.value=!1},p=()=>{const e=i.value,t=e.width,l=e.height,c=e.left,n=e.top,o=e.clip?e.clip.range:[[0,0],[100,100]],a=t/((o[1][0]-o[0][0])/100),r=l/((o[1][1]-o[0][1])/100),s=c-a*(o[0][0]/100),d=n-r*(o[0][1]/100);return{originClipRange:o,originWidth:a,originHeight:r,originLeft:s,originTop:d}},f=(e,t=0)=>{const l=i.value,{originClipRange:c,originWidth:n,originHeight:o,originLeft:a,originTop:d}=p();if(t){const c=o/n,i=0,u=100;let b;if(c>t){const e=(1-t/c)/2*100;b=[[i,e],[u,u-e]]}else{const e=(1-c/t)/2*100;b=[[e,i],[u-e,u]]}r.updateElement({id:s.value,props:{clip:{...l.clip,shape:e,range:b},left:a+n*(b[0][0]/100),top:d+o*(b[0][1]/100),width:n*(b[1][0]-b[0][0])/100,height:o*(b[1][1]-b[0][1])/100}})}else r.updateElement({id:s.value,props:{clip:{...l.clip,shape:e,range:c}}});m(),O()},j=e=>{const t=e[0];t&&(we(t).then(e=>{const t={src:e};r.updateElement({id:s.value,props:t})}),O())},v=()=>{const e=i.value;if(e.clip){const{originWidth:e,originHeight:t,originLeft:l,originTop:c}=p();r.updateElement({id:s.value,props:{left:l,top:c,width:e,height:t}})}r.removeElementProps({id:s.value,propName:["clip","outline","flip","shadow","filters","colorMask"]}),O()},h=()=>{const e=i.value,t={...d.value.background,type:"image",image:e.src,imageSize:"cover"};r.updateSlide({background:t}),O()};return(e,o)=>{const a=Object(n["resolveComponent"])("IconTailoring"),r=Object(n["resolveComponent"])("IconDown"),i=Object(n["resolveComponent"])("IconTransform"),s=Object(n["resolveComponent"])("IconUndo"),d=Object(n["resolveComponent"])("IconTheme");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Gm,[Object(n["createElementVNode"])("div",{class:"origin-image",style:Object(n["normalizeStyle"])({backgroundImage:`url(${Object(n["unref"])(u).src})`})},null,4),Object(n["createVNode"])(xm),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"5"},onClick:o[0]||(o[0]=e=>m())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(a,{class:"btn-icon"}),Object(n["createTextVNode"])(" 裁剪图片")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:b.value,"onUpdate:visible":o[1]||(o[1]=e=>b.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",Xm,[Ym,Object(n["createElementVNode"])("div",Zm,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(l),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"shape-clip-item",key:t,onClick:e=>f(t)},[Object(n["createElementVNode"])("div",{class:"shape",style:Object(n["normalizeStyle"])({clipPath:e.style})},null,4)],8,Wm))),128))]),(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(c,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:e.label},[e.label?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Jm,"按"+Object(n["toDisplayString"])(e.label)+"",1)):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.children,e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},key:e.key,onClick:t=>f("rect",e.ratio)},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e.key),1)]),_:2},1032,["onClick"]))),128))]),_:2},1024)],64))),64))])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"no-padding",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(r)]),_:1})]),_:1},8,["visible"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(qm),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Bm),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(pO),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(LO),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(el,{onChange:o[2]||(o[2]=e=>j(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"full-width-btn"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(i,{class:"btn-icon"}),Object(n["createTextVNode"])(" 替换图片")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"full-width-btn",onClick:o[3]||(o[3]=e=>v())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(s,{class:"btn-icon"}),Object(n["createTextVNode"])(" 重置样式")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"full-width-btn",onClick:o[4]||(o[4]=e=>h())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(d,{class:"btn-icon"}),Object(n["createTextVNode"])(" 设为背景")]),_:1})])}}});l("dfe7");const Qm=Yt()(Km,[["__scopeId","data-v-105f4640"]]);var ep=Qm;const tp=e=>(Object(n["pushScopeId"])("data-v-a12155e2"),e=e(),Object(n["popScopeId"])(),e),lp={class:"shape-style-panel"},cp={class:"row"},np=tp(()=>Object(n["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),op={class:"row"},ap=tp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"起点颜色:",-1)),rp={class:"row"},ip=tp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"终点颜色:",-1)),sp={key:0,class:"row"},dp=tp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"渐变角度:",-1));var up=Object(n["defineComponent"])({__name:"ShapeStylePanel",setup(e){const{Group:t,Button:l}=qu["a"],{OptGroup:c,Option:a}=Ci["a"],r=ki["a"].Group,s=xi["a"].Group,d=z(),u=T(),{handleElement:b,handleElementId:O,richTextAttrs:m,availableFonts:p,textFormatPainter:f}=Object(o["c"])(d),j=b,v=Object(n["ref"])("#000"),h=Object(n["ref"])({type:"linear",rotate:0,color:["#fff","#fff"]}),y=Object(n["ref"])("fill"),g=Object(n["ref"])("middle");Object(n["watch"])(b,()=>{var e,t;b.value&&"shape"===b.value.type&&(v.value=b.value.fill||"#fff",h.value=b.value.gradient||{type:"linear",rotate:0,color:[v.value,"#fff"]},y.value=b.value.gradient?"gradient":"fill",g.value=(null===(e=b.value)||void 0===e||null===(t=e.text)||void 0===t?void 0:t.align)||"middle")},{deep:!0,immediate:!0});const{addHistorySnapshot:x}=Te(),{toggleFormatPainter:k}=Uu(),C=e=>{u.updateElement({id:O.value,props:e}),x()},N=e=>{"fill"===e?(u.removeElementProps({id:O.value,propName:"gradient"}),x()):C({gradient:h.value})},E=e=>{if(!h.value)return;const t={...h.value,...e};C({gradient:t})},w=e=>{C({fill:e})},V=e=>{const t=b.value,l={content:"",defaultFontName:"微软雅黑",defaultColor:"#000",align:"middle"},c=t.text||l;C({text:{...c,align:e}})},I=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],S=(e,t)=>{yn.emit(jn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})};return(e,o)=>{var d;const u=Object(n["resolveComponent"])("IconFontSize"),b=Object(n["resolveComponent"])("IconAddText"),O=Object(n["resolveComponent"])("IconText"),x=Object(n["resolveComponent"])("IconHighLight"),C=Object(n["resolveComponent"])("IconTextBold"),L=Object(n["resolveComponent"])("IconTextItalic"),B=Object(n["resolveComponent"])("IconTextUnderline"),_=Object(n["resolveComponent"])("IconStrikethrough"),T=Object(n["resolveComponent"])("IconFormat"),M=Object(n["resolveComponent"])("IconFormatBrush"),D=Object(n["resolveComponent"])("IconAlignTextLeft"),z=Object(n["resolveComponent"])("IconAlignTextCenter"),A=Object(n["resolveComponent"])("IconAlignTextRight"),F=Object(n["resolveComponent"])("IconAlignTextTopOne"),$=Object(n["resolveComponent"])("IconAlignTextMiddleOne"),R=Object(n["resolveComponent"])("IconAlignTextBottomOne");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",lp,[Object(n["createElementVNode"])("div",cp,[Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"10"},value:y.value,onChange:o[0]||(o[0]=e=>N(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(a),{value:"fill"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("纯色填充")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(a),{value:"gradient"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("渐变填充")]),_:1})]),_:1},8,["value"]),np,"fill"===y.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(Rs["a"]),{key:0,trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:v.value,"onUpdate:modelValue":o[1]||(o[1]=e=>w(e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:v.value,style:{flex:"10"}},null,8,["color"])]),_:1})):(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(Ci["a"]),{key:1,style:{flex:"10"},value:h.value.type,onChange:o[2]||(o[2]=e=>E({type:e}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(a),{value:"linear"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("线性渐变")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(a),{value:"radial"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("径向渐变")]),_:1})]),_:1},8,["value"]))]),"gradient"===y.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createElementVNode"])("div",op,[ap,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:h.value.color[0],"onUpdate:modelValue":o[3]||(o[3]=e=>E({color:[e,h.value.color[1]]}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:h.value.color[0],style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",rp,[ip,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:h.value.color[1],"onUpdate:modelValue":o[4]||(o[4]=e=>E({color:[h.value.color[0],e]}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:h.value.color[1],style:{flex:"3"}},null,8,["color"])]),_:1})]),"linear"===h.value.type?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",sp,[dp,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"slider",min:0,max:360,step:15,value:h.value.rotate,onChange:o[5]||(o[5]=e=>E({rotate:e}))},null,8,["value"])])):Object(n["createCommentVNode"])("",!0)],64)):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])(xm),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),null!==(d=Object(n["unref"])(j).text)&&void 0!==d&&d.content?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:1},[Object(n["createVNode"])(Object(n["unref"])(r),{compact:"",class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(m).fontname,onChange:o[6]||(o[6]=e=>S("fontname",e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u)]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{label:"系统字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(p),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(a),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",{style:Object(n["normalizeStyle"])({fontFamily:e.value})},Object(n["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{label:"在线字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(a),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"2"},value:Object(n["unref"])(m).fontsize,onChange:o[7]||(o[7]=e=>S("fontsize",e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(b)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(I,e=>Object(n["createVNode"])(Object(n["unref"])(a),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(s),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(m).color,"onUpdate:modelValue":o[8]||(o[8]=e=>S("color",e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:Object(n["unref"])(m).color,style:{flex:"3"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(m).backcolor,"onUpdate:modelValue":o[9]||(o[9]=e=>S("backcolor",e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:Object(n["unref"])(m).backcolor,style:{flex:"3"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(x)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"font-size-btn",style:{flex:"2"},onClick:o[10]||(o[10]=e=>S("fontsize-add"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u),Object(n["createTextVNode"])("+")]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"font-size-btn",style:{flex:"2"},onClick:o[11]||(o[11]=e=>S("fontsize-reduce"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u),Object(n["createTextVNode"])("-")]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(m).bold,onClick:o[12]||(o[12]=e=>S("bold"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(C)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(m).em,onClick:o[13]||(o[13]=e=>S("em"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(L)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(m).underline,onClick:o[14]||(o[14]=e=>S("underline"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(B)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(m).strikethrough,onClick:o[15]||(o[15]=e=>S("strikethrough"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(_)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"清除格式"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},onClick:o[16]||(o[16]=e=>S("clear"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(T)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"格式刷"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:!!Object(n["unref"])(f),onClick:o[17]||(o[17]=e=>Object(n["unref"])(k)())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(M)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row","button-style":"solid",value:Object(n["unref"])(m).align,onChange:o[18]||(o[18]=e=>S("align",e.target.value))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"left",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(D)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"center",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(z)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"right",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(A)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row","button-style":"solid",value:g.value,onChange:o[19]||(o[19]=e=>V(e.target.value))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"顶对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"top",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(F)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"middle",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])($)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"底对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"bottom",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(R)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(ui["a"]))],64)):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])(pO),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(LO),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Qu)])}}});l("6878");const bp=Yt()(up,[["__scopeId","data-v-a12155e2"]]);var Op=bp;const mp=e=>(Object(n["pushScopeId"])("data-v-0ca152b4"),e=e(),Object(n["popScopeId"])(),e),pp={class:"line-style-panel"},fp={class:"row"},jp=mp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"线条样式:",-1)),vp={class:"row"},hp=mp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"线条颜色:",-1)),yp={class:"row"},gp=mp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"线条宽度:",-1)),xp={class:"row"},kp=mp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"起点样式:",-1)),Cp={class:"row"},Np=mp(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"终点样式:",-1));var Ep=Object(n["defineComponent"])({__name:"LineStylePanel",setup(e){const t=Ci["a"].Option,l=T(),{handleElement:c}=Object(o["c"])(z()),a=c,{addHistorySnapshot:r}=Te(),i=e=>{c.value&&(l.updateElement({id:c.value.id,props:e}),r())};return(e,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",pp,[Object(n["createElementVNode"])("div",fp,[jp,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(a).style,onChange:l[0]||(l[0]=e=>i({style:e}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:"solid"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("实线")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"dashed"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("虚线")]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",vp,[hp,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(a).color,"onUpdate:modelValue":l[1]||(l[1]=e=>i({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(a).color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",yp,[gp,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{value:Object(n["unref"])(a).width,onChange:l[2]||(l[2]=e=>i({width:e})),style:{flex:"3"}},null,8,["value"])]),Object(n["createElementVNode"])("div",xp,[kp,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(a).points[0],onChange:l[3]||(l[3]=e=>i({points:[e,Object(n["unref"])(a).points[1]]}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:""},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("无")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"arrow"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("箭头")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"dot"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("圆点")]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",Cp,[Np,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(a).points[1],onChange:l[4]||(l[4]=e=>i({points:[Object(n["unref"])(a).points[0],e]}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:""},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("无")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"arrow"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("箭头")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"dot"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("圆点")]),_:1})]),_:1},8,["value"])]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(LO)]))}});l("99b8");const wp=Yt()(Ep,[["__scopeId","data-v-0ca152b4"]]);var Vp=wp,Ip=(l("ee00"),l("bb76"));const Sp={class:"chart-data-editor"},Lp={class:"editor-content"},Bp={class:"range-box"},_p=["id","onFocus","onPaste"],Tp={class:"btns"},Mp={class:"left"},Dp={class:"right"};var zp=Object(n["defineComponent"])({__name:"ChartDataEditor",props:{data:{type:Object,required:!0}},emits:["save","close"],setup(e,{emit:t}){const l=e,c=100,o=32,a=Object(n["ref"])([0,0]),r=Object(n["ref"])({width:0,height:0}),i=Object(n["ref"])(null),s=Object(n["computed"])(()=>{const e=a.value[0]*c,t=a.value[1]*o;return[{type:"t",style:{width:e+"px"}},{type:"b",style:{top:t+"px",width:e+"px"}},{type:"l",style:{height:t+"px"}},{type:"r",style:{left:e+"px",height:t+"px"}}]}),d=Object(n["computed"])(()=>{const e=a.value[0]*c,t=a.value[1]*o;return{left:e+"px",top:t+"px"}}),u=()=>{const e=[],{labels:t,legends:c,series:n}=l.data,o=t.length,r=n.length;e.push(["",...c]);for(let l=0;l<o;l++){const c=[t[l]];for(let e=0;e<r;e++)c.push(n[e][l]+"");e.push(c)}for(let l=0;l<o+1;l++)for(let t=0;t<r+1;t++){const c=document.querySelector(`#cell-${l}-${t}`);c&&(c.value=e[l][t]+"")}a.value=[r+1,o+1]};Object(n["onMounted"])(u);const b=()=>{if(!i.value)return;const[e,t]=i.value,l=document.querySelector(`#cell-${e+1}-${t}`);l&&l.focus()},O=e=>{const t=e.key.toUpperCase();t===te.ENTER&&b()};Object(n["onMounted"])(()=>{document.addEventListener("keydown",O)}),Object(n["onUnmounted"])(()=>{document.removeEventListener("keydown",O)});const m=()=>{const[e,l]=a.value,c=[],n=[],o=[];for(let t=1;t<l;t++){let e="类别"+t;const l=document.querySelector(`#cell-${t}-0`);l&&l.value&&(e=l.value),c.push(e)}for(let t=1;t<e;t++){let e="系列"+t;const l=document.querySelector("#cell-0-"+t);l&&l.value&&(e=l.value),n.push(e)}for(let t=1;t<e;t++){const e=[];for(let c=1;c<l;c++){const l=document.querySelector(`#cell-${c}-${t}`);let n=0;l&&l.value&&+l.value&&(n=+l.value),e.push(n)}o.push(e)}t("save",{labels:c,legends:n,series:o})},p=()=>{for(let e=1;e<31;e++)for(let t=1;t<7;t++){const l=document.querySelector(`#cell-${e}-${t}`);l&&(l.value="")}},f=(e,t,l)=>{if(e.preventDefault(),!e.clipboardData)return;const c=e.clipboardData.items[0];c&&"string"===c.kind&&"text/plain"===c.type&&c.getAsString(e=>{const c=me(e);if("object"===typeof c)return;const n=pe(e);if(n){const e=t+n.length,c=l+n[0].length;for(let o=t;o<e;o++)for(let e=l;e<c;e++){const c=document.querySelector(`#cell-${o}-${e}`);c&&(c.value=n[o-t][e-l])}}})},j=()=>t("close"),v=e=>{let t=!0;const l=e.pageX,n=e.pageY,i=a.value[0]*c,s=a.value[1]*o;document.onmousemove=e=>{if(!t)return;const c=e.pageX,o=e.pageY,a=c-l,d=o-n,u=i+a,b=s+d;r.value={width:u,height:b}},document.onmouseup=e=>{t=!1,document.onmousemove=null,document.onmouseup=null;const i=e.pageX,s=e.pageY;if(l===i&&n===s)return;let d=r.value.width,u=r.value.height;d%c>.5*c&&(d+=c-d%c),u%o>.5*o&&(u+=o-u%o);let b=Math.round(u/o),O=Math.round(d/c);b<3&&(b=3),O<2&&(O=2),a.value=[O,b],r.value={width:0,height:0}}};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Sp,[Object(n["createElementVNode"])("div",Lp,[Object(n["createElementVNode"])("div",Bp,[Object(n["createElementVNode"])("div",{class:"temp-range",style:Object(n["normalizeStyle"])({width:r.value.width+"px",height:r.value.height+"px"})},null,4),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(s),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["range-line",e.type]),key:e.type,style:Object(n["normalizeStyle"])(e.style)},null,6))),128)),Object(n["createElementVNode"])("div",{class:"resizable",style:Object(n["normalizeStyle"])(Object(n["unref"])(d)),onMousedown:t[0]||(t[0]=Object(n["withModifiers"])(e=>v(e),["stop"]))},null,36)]),Object(n["createElementVNode"])("table",null,[Object(n["createElementVNode"])("tbody",null,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(31,e=>Object(n["createElementVNode"])("tr",{key:e},[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(7,t=>Object(n["createElementVNode"])("td",{key:t,class:Object(n["normalizeClass"])({head:1===t&&e<=a.value[1]||1===e&&t<=a.value[0]})},[Object(n["createElementVNode"])("input",{class:Object(n["normalizeClass"])(["item",{selected:e<=a.value[1]&&t<=a.value[0]}]),id:`cell-${e-1}-${t-1}`,autocomplete:"off",onFocus:l=>i.value=[e-1,t-1],onPaste:l=>f(l,e-1,t-1)},null,42,_p)],2)),64))])),64))])])]),Object(n["createElementVNode"])("div",Tp,[Object(n["createElementVNode"])("div",Mp,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",onClick:t[1]||(t[1]=e=>p())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("清空")]),_:1})]),Object(n["createElementVNode"])("div",Dp,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",onClick:t[2]||(t[2]=e=>j())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("取消")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{type:"primary",class:"btn",onClick:t[3]||(t[3]=e=>m()),style:{"margin-left":"10px"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("确认")]),_:1})])])]))}});l("18a5");const Ap=Yt()(zp,[["__scopeId","data-v-1eab5a3a"]]);var Fp=Ap;const $p=e=>(Object(n["pushScopeId"])("data-v-73760920"),e=e(),Object(n["popScopeId"])(),e),Rp={class:"chart-style-panel"},Pp={class:"row"},Hp={class:"row"},qp={key:1,class:"row"},Up={key:2,class:"row"},Gp={class:"row"},Xp=$p(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"图例:",-1)),Yp={class:"row"},Zp=$p(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"背景填充:",-1)),Wp={class:"row"},Jp=$p(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"网格颜色:",-1)),Kp={style:{flex:"2"}},Qp={class:"color-btn-wrap",style:{flex:"3"}},ef=["onClick"],tf={class:"preset-themes"},lf=["onClick","onMouseenter"];var cf=Object(n["defineComponent"])({__name:"index",setup(e){const t=xi["a"].Group,l=Ci["a"].Option,c=[["#d87c7c","#919e8b","#d7ab82","#6e7074","#61a0a8","#efa18d"],["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78"],["#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],["#893448","#d95850","#eb8146","#ffb248","#f2d643","#ebdba4"],["#4ea397","#22c3aa","#7bd9a5","#d0648a","#f58db2","#f2b3c9"],["#3fb1e3","#6be6c1","#626c91","#a0a7e6","#c4ebad","#96dee8"],["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb"],["#c1232b","#27727b","#fcce10","#e87c25","#b5c334","#fe8463"],["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3"],["#e01f54","#001852","#f5e8c8","#b8d2c7","#c6b38e","#a4d8c2"],["#c12e34","#e6b600","#0098d9","#2b821d","#005eaa","#339ca8"],["#8a7ca8","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc"]],a=z(),r=T(),{handleElement:i,handleElementId:s}=Object(o["c"])(a),{theme:d}=Object(o["c"])(r),u=i,b=Object(n["ref"])(!1),O=Object(n["ref"])(!1),m=Object(n["ref"])([-1,-1]),{addHistorySnapshot:p}=Te(),f=Object(n["ref"])("#000"),j=Object(n["ref"])([]),v=Object(n["ref"])(""),h=Object(n["ref"])(""),y=Object(n["ref"])(!0),g=Object(n["ref"])(!0),x=Object(n["ref"])(!1),k=Object(n["ref"])(!1),C=Object(n["ref"])(!1),N=Object(n["ref"])(!1);Object(n["watch"])(i,()=>{if(i.value&&"chart"===i.value.type){if(f.value=i.value.fill||"#fff",i.value.options){const{lineSmooth:e,showLine:t,showArea:l,horizontalBars:c,donut:n,stackBars:o}=i.value.options;void 0!==e&&(y.value=e),void 0!==t&&(g.value=t),void 0!==l&&(x.value=l),void 0!==c&&(k.value=c),void 0!==n&&(C.value=n),void 0!==o&&(N.value=o)}j.value=i.value.themeColor,v.value=i.value.gridColor||"#333",h.value=i.value.legend||""}},{deep:!0,immediate:!0});const E=e=>{r.updateElement({id:s.value,props:e}),p()},w=e=>{b.value=!1,E({data:e})},V=e=>{E({fill:e})},I=e=>{const t=i.value,l={...t.options,...e};E({options:l})},S=(e,t)=>{const l={themeColor:j.value.map((l,c)=>c===t?e:l)};E(l)},L=()=>{const e={themeColor:[...j.value,d.value.themeColor]};E(e)},B=(e,t)=>{const l=e.slice(0,t+1);E({themeColor:l}),O.value=!1},_=e=>{const t={themeColor:j.value.filter((t,l)=>l!==e)};E(t)},M=e=>{E({gridColor:e})},D=e=>{E({legend:e})},A=()=>b.value=!0;return yn.on(jn.OPEN_CHART_DATA_EDITOR,A),Object(n["onUnmounted"])(()=>{yn.off(jn.OPEN_CHART_DATA_EDITOR,A)}),(e,o)=>{const a=Object(n["resolveComponent"])("IconEdit"),r=Object(n["resolveComponent"])("IconCloseSmall"),i=Object(n["resolveComponent"])("IconPlus");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Rp,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"full-width-btn",onClick:o[0]||(o[0]=e=>b.value=!0)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(a,{class:"btn-icon"}),Object(n["createTextVNode"])(" 编辑图表数据 ")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),"line"===Object(n["unref"])(u).chartType?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createElementVNode"])("div",Pp,[Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[1]||(o[1]=e=>I({showArea:e.target.checked})),checked:x.value,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("面积图样式")]),_:1},8,["checked"]),Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[2]||(o[2]=e=>I({showLine:!e.target.checked})),checked:!g.value,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("散点图样式")]),_:1},8,["checked"])]),Object(n["createElementVNode"])("div",Hp,[Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[3]||(o[3]=e=>I({lineSmooth:e.target.checked})),checked:y.value},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("使用平滑曲线")]),_:1},8,["checked"])])],64)):Object(n["createCommentVNode"])("",!0),"bar"===Object(n["unref"])(u).chartType?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",qp,[Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[4]||(o[4]=e=>I({horizontalBars:e.target.checked})),checked:k.value},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("条形图样式")]),_:1},8,["checked"]),Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[5]||(o[5]=e=>I({stackBars:e.target.checked})),checked:N.value},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("堆叠样式")]),_:1},8,["checked"])])):Object(n["createCommentVNode"])("",!0),"pie"===Object(n["unref"])(u).chartType?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Up,[Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[6]||(o[6]=e=>I({donut:e.target.checked})),checked:C.value},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("环形图样式")]),_:1},8,["checked"])])):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",Gp,[Xp,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:h.value,onChange:o[7]||(o[7]=e=>D(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:""},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("不显示")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"top"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("显示在上方")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"bottom"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("显示在下方")]),_:1})]),_:1},8,["value"])]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",Yp,[Zp,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:f.value,"onUpdate:modelValue":o[8]||(o[8]=e=>V(e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:f.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",Wp,[Jp,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:v.value,"onUpdate:modelValue":o[9]||(o[9]=e=>M(e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:v.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(j.value,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"row",key:t},[Object(n["createElementVNode"])("div",Kp,Object(n["toDisplayString"])(0===t?"主题配色:":""),1),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:e,"onUpdate:modelValue":e=>S(e,t)},null,8,["modelValue","onUpdate:modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",Qp,[Object(n["createVNode"])(nb,{color:e,style:{width:"100%"}},null,8,["color"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除"},{default:Object(n["withCtx"])(()=>[0!==t?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"delete-color-btn",onClick:Object(n["withModifiers"])(e=>_(t),["stop"])},[Object(n["createVNode"])(r)],8,ef)):Object(n["createCommentVNode"])("",!0)]),_:2},1032,["mouseEnterDelay"])])]),_:2},1024)]))),128)),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:O.value,"onUpdate:visible":o[11]||(o[11]=e=>O.value=e)},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",tf,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(c,(e,t)=>Object(n["createElementVNode"])("div",{class:"preset-theme",key:t},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e,(l,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["preset-theme-color",{select:m.value[0]===t&&c<=m.value[1]}]),key:l,style:Object(n["normalizeStyle"])({backgroundColor:l}),onClick:t=>B(e,c),onMouseenter:e=>m.value=[t,c],onMouseleave:o[10]||(o[10]=e=>m.value=[-1,-1])},null,46,lf))),128))])),64))])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"no-padding",style:{flex:"2"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("推荐主题")]),_:1})]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"no-padding",disabled:j.value.length>=10,style:{flex:"3"},onClick:o[12]||(o[12]=e=>L())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(i,{class:"btn-icon"}),Object(n["createTextVNode"])(" 添加主题色 ")]),_:1},8,["disabled"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(pO),Object(n["createVNode"])(Object(n["unref"])(le["a"]),{visible:b.value,"onUpdate:visible":o[15]||(o[15]=e=>b.value=e),footer:null,centered:"",closable:!1,width:648,destroyOnClose:""},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Fp,{data:Object(n["unref"])(u).data,onClose:o[13]||(o[13]=e=>b.value=!1),onSave:o[14]||(o[14]=e=>w(e))},null,8,["data"])]),_:1},8,["visible"])])}}});l("e818");const nf=Yt()(cf,[["__scopeId","data-v-73760920"]]);var of=nf;const af=e=>(Object(n["pushScopeId"])("data-v-79a422e5"),e=e(),Object(n["popScopeId"])(),e),rf={class:"table-style-panel"},sf={class:"row"},df=af(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"行数:",-1)),uf={class:"set-count",style:{flex:"3"}},bf={class:"count-text"},Of={class:"row"},mf=af(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"列数:",-1)),pf={class:"set-count",style:{flex:"3"}},ff={class:"count-text"},jf={class:"row theme-switch"},vf=af(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"启用主题表格:",-1)),hf={class:"switch-wrapper",style:{flex:"3"}},yf={class:"row"},gf={class:"row"},xf={class:"row"},kf=af(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"主题颜色:",-1));var Cf=Object(n["defineComponent"])({__name:"TableStylePanel",setup(e){const{Group:t,Button:l}=qu["a"],{OptGroup:c,Option:r}=Ci["a"],s=ki["a"].Group,d=xi["a"].Group,u=T(),{handleElement:b,handleElementId:O,selectedTableCells:m,availableFonts:p}=Object(o["c"])(z()),f=Object(n["computed"])(()=>u.theme.themeColor),j=["12px","14px","16px","18px","20px","22px","24px","28px","32px"],v=Object(n["ref"])({bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}),h=Object(n["ref"])(),y=Object(n["ref"])(!1),g=Object(n["ref"])(0),x=Object(n["ref"])(0),k=Object(n["ref"])(0),C=Object(n["ref"])(0);Object(n["watch"])(b,()=>{b.value&&"table"===b.value.type&&(h.value=b.value.theme,y.value=!!h.value,g.value=b.value.data.length,x.value=b.value.data[0].length,k.value=b.value.data.length,C.value=b.value.data[0].length)},{deep:!0,immediate:!0});const{addHistorySnapshot:N}=Te(),E=()=>{if(!b.value||"table"!==b.value.type)return;let e=0,t=0;if(m.value.length){const l=m.value[0];e=+l.split("_")[0],t=+l.split("_")[1]}const l=b.value.data[e][t].style;v.value=l?{bold:!!l.bold,em:!!l.em,underline:!!l.underline,strikethrough:!!l.strikethrough,color:l.color||"#000",backcolor:l.backcolor||"",fontsize:l.fontsize||"12px",fontname:l.fontname||"微软雅黑",align:l.align||"left"}:{bold:!1,em:!1,underline:!1,strikethrough:!1,color:"#000",backcolor:"",fontsize:"12px",fontname:"微软雅黑",align:"left"}};Object(n["onMounted"])(()=>{m.value.length&&E()}),Object(n["watch"])(m,E);const w=e=>{u.updateElement({id:O.value,props:e}),N()},V=e=>{const t=b.value,l=JSON.parse(JSON.stringify(t.data));for(let c=0;c<l.length;c++)for(let t=0;t<l[c].length;t++)if(!m.value.length||m.value.includes(`${c}_${t}`)){const n=l[c][t].style||{};l[c][t].style={...n,...e}}w({data:l}),E()},I=e=>{if(!h.value)return;const t={...h.value,...e};w({theme:t})},S=e=>{if(e){const e={theme:{color:f.value,rowHeader:!0,rowFooter:!1,colHeader:!1,colFooter:!1}};w(e)}else u.removeElementProps({id:O.value,propName:"theme"}),N()},L=e=>{const t=b.value,l=t.data.length;if(e>l){const c=new Array(x.value).fill({id:Object(a["b"])(10),colspan:1,rowspan:1,text:""}),n=new Array(e-l).fill(c),o=JSON.parse(JSON.stringify(t.data));o.push(...n),w({data:o})}else{const l=t.data.slice(0,e);w({data:l})}},B=e=>{const t=b.value,l=t.data[0].length;let c=t.data,n=t.colWidths.map(e=>e*t.width);if(e>l){c=c.map(t=>{const c=new Array(e-l).fill({id:Object(a["b"])(10),colspan:1,rowspan:1,text:""});return t.push(...c),t});const t=new Array(e-l).fill(100);n.push(...t)}else c=c.map(t=>t.slice(0,e)),n=n.slice(0,e);const o=n.reduce((e,t)=>e+t),r=n.map(e=>e/o),i={width:o,data:c,colWidths:r};w(i)};return(e,o)=>{const a=Object(n["resolveComponent"])("IconFontSize"),u=Object(n["resolveComponent"])("IconAddText"),b=Object(n["resolveComponent"])("IconText"),O=Object(n["resolveComponent"])("IconFill"),m=Object(n["resolveComponent"])("IconTextBold"),f=Object(n["resolveComponent"])("IconTextItalic"),k=Object(n["resolveComponent"])("IconTextUnderline"),C=Object(n["resolveComponent"])("IconStrikethrough"),N=Object(n["resolveComponent"])("IconAlignTextLeft"),E=Object(n["resolveComponent"])("IconAlignTextCenter"),w=Object(n["resolveComponent"])("IconAlignTextRight"),_=Object(n["resolveComponent"])("IconMinus"),T=Object(n["resolveComponent"])("IconPlus");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",rf,[Object(n["createVNode"])(Object(n["unref"])(s),{compact:"",class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:v.value.fontname,onChange:o[0]||(o[0]=e=>V({fontname:e}))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(a)]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{label:"系统字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(p),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(r),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",{style:Object(n["normalizeStyle"])({fontFamily:e.value})},Object(n["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{label:"在线字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(r),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"2"},value:v.value.fontsize,onChange:o[1]||(o[1]=e=>V({fontsize:e}))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(j,e=>Object(n["createVNode"])(Object(n["unref"])(r),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(d),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:v.value.color,"onUpdate:modelValue":o[2]||(o[2]=e=>V({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:v.value.color,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(b)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:v.value.backcolor,"onUpdate:modelValue":o[3]||(o[3]=e=>V({backcolor:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"单元格填充"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:v.value.backcolor,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1})]),_:1}),Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"加粗"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:v.value.bold,onClick:o[4]||(o[4]=e=>V({bold:!v.value.bold}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(m)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"斜体"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:v.value.em,onClick:o[5]||(o[5]=e=>V({em:!v.value.em}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(f)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下划线"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:v.value.underline,onClick:o[6]||(o[6]=e=>V({underline:!v.value.underline}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(k)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除线"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:v.value.strikethrough,onClick:o[7]||(o[7]=e=>V({strikethrough:!v.value.strikethrough}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(C)]),_:1},8,["checked"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row","button-style":"solid",value:v.value.align,onChange:o[8]||(o[8]=e=>V({align:e.target.value}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"left",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(N)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"center",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(E)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"right",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(w)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(pO,{fixed:!0}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",sf,[df,Object(n["createElementVNode"])("div",uf,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",disabled:g.value<=1,onClick:o[9]||(o[9]=e=>L(g.value-1))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(_)]),_:1},8,["disabled"]),Object(n["createElementVNode"])("div",bf,Object(n["toDisplayString"])(g.value),1),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",disabled:g.value>=30,onClick:o[10]||(o[10]=e=>L(g.value+1))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(T)]),_:1},8,["disabled"])])]),Object(n["createElementVNode"])("div",Of,[mf,Object(n["createElementVNode"])("div",pf,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",disabled:x.value<=1,onClick:o[11]||(o[11]=e=>B(x.value-1))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(_)]),_:1},8,["disabled"]),Object(n["createElementVNode"])("div",ff,Object(n["toDisplayString"])(x.value),1),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn",disabled:x.value>=30,onClick:o[12]||(o[12]=e=>B(x.value+1))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(T)]),_:1},8,["disabled"])])]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",jf,[vf,Object(n["createElementVNode"])("div",hf,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:y.value,onChange:o[13]||(o[13]=e=>S(e))},null,8,["checked"])])]),h.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createElementVNode"])("div",yf,[Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[14]||(o[14]=e=>I({rowHeader:e.target.checked})),checked:h.value.rowHeader,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("标题行")]),_:1},8,["checked"]),Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[15]||(o[15]=e=>I({rowFooter:e.target.checked})),checked:h.value.rowFooter,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("汇总行")]),_:1},8,["checked"])]),Object(n["createElementVNode"])("div",gf,[Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[16]||(o[16]=e=>I({colHeader:e.target.checked})),checked:h.value.colHeader,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("第一列")]),_:1},8,["checked"]),Object(n["createVNode"])(Object(n["unref"])(Ip["a"]),{onChange:o[17]||(o[17]=e=>I({colFooter:e.target.checked})),checked:h.value.colFooter,style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("最后一列")]),_:1},8,["checked"])]),Object(n["createElementVNode"])("div",xf,[kf,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:h.value.color,"onUpdate:modelValue":o[18]||(o[18]=e=>I({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:h.value.color,style:{flex:"3"}},null,8,["color"])]),_:1})])],64)):Object(n["createCommentVNode"])("",!0)])}}});l("ecba");const Nf=Yt()(Cf,[["__scopeId","data-v-79a422e5"]]);var Ef=Nf;const wf=e=>(Object(n["pushScopeId"])("data-v-79d8ab96"),e=e(),Object(n["popScopeId"])(),e),Vf={class:"latex-style-panel"},If={class:"row"},Sf={class:"row"},Lf=wf(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"颜色:",-1)),Bf={class:"row"},_f=wf(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"粗细:",-1));var Tf=Object(n["defineComponent"])({__name:"LatexStylePanel",setup(e){const t=T(),{handleElement:l}=Object(o["c"])(z()),c=l,a=Object(n["ref"])(!1),{addHistorySnapshot:r}=Te(),i=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),r())},s=e=>{i({path:e.path,latex:e.latex,width:e.w,height:e.h,viewBox:[e.w,e.h]})},d=()=>a.value=!0;return yn.on(jn.OPEN_LATEX_EDITOR,d),Object(n["onUnmounted"])(()=>{yn.off(jn.OPEN_LATEX_EDITOR,d)}),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Vf,[Object(n["createElementVNode"])("div",If,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:t[0]||(t[0]=e=>a.value=!0)},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("编辑 LaTeX")]),_:1})]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",Sf,[Lf,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(c).color,"onUpdate:modelValue":t[1]||(t[1]=e=>i({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(c).color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",Bf,[_f,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{min:1,max:3,value:Object(n["unref"])(c).strokeWidth,onChange:t[2]||(t[2]=e=>i({strokeWidth:e})),style:{flex:"3"}},null,8,["value"])]),Object(n["createVNode"])(Object(n["unref"])(le["a"]),{visible:a.value,"onUpdate:visible":t[5]||(t[5]=e=>a.value=e),footer:null,centered:"",width:880,destroyOnClose:""},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ju,{value:Object(n["unref"])(c).latex,onClose:t[3]||(t[3]=e=>a.value=!1),onUpdate:t[4]||(t[4]=e=>{s(e),a.value=!1})},null,8,["value"])]),_:1},8,["visible"])]))}});l("0593");const Mf=Yt()(Tf,[["__scopeId","data-v-79d8ab96"]]);var Df=Mf;const zf=e=>(Object(n["pushScopeId"])("data-v-802e1e06"),e=e(),Object(n["popScopeId"])(),e),Af={class:"video-style-panel"},Ff=zf(()=>Object(n["createElementVNode"])("div",{class:"title"},"视频预览封面",-1)),$f={class:"background-image-wrapper"},Rf={class:"background-image"},Pf={class:"row"};var Hf=Object(n["defineComponent"])({__name:"VideoStylePanel",setup(e){const t=T(),{handleElement:l}=Object(o["c"])(z()),c=l,{addHistorySnapshot:a}=Te(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),a())},i=e=>{const t=e[0];t&&we(t).then(e=>r({poster:e}))};return(e,t)=>{const l=Object(n["resolveComponent"])("IconPlus");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Af,[Ff,Object(n["createElementVNode"])("div",$f,[Object(n["createVNode"])(el,{onChange:t[0]||(t[0]=e=>i(e))},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",Rf,[Object(n["createElementVNode"])("div",{class:"content",style:Object(n["normalizeStyle"])({backgroundImage:`url(${Object(n["unref"])(c).poster})`})},[Object(n["createVNode"])(l)],4)])]),_:1})]),Object(n["createElementVNode"])("div",Pf,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:t[1]||(t[1]=e=>r({poster:""}))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("重置封面")]),_:1})])])}}});l("e38f");const qf=Yt()(Hf,[["__scopeId","data-v-802e1e06"]]);var Uf=qf;const Gf=e=>(Object(n["pushScopeId"])("data-v-1da06c97"),e=e(),Object(n["popScopeId"])(),e),Xf={class:"audio-style-panel"},Yf={class:"row"},Zf=Gf(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"图标颜色:",-1)),Wf={class:"row switch-row"},Jf=Gf(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"自动播放:",-1)),Kf={class:"switch-wrapper",style:{flex:"3"}},Qf={class:"row switch-row"},ej=Gf(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"循环播放:",-1)),tj={class:"switch-wrapper",style:{flex:"3"}};var lj=Object(n["defineComponent"])({__name:"AudioStylePanel",setup(e){const t=T(),{handleElement:l}=Object(o["c"])(z()),c=l,{addHistorySnapshot:a}=Te(),r=e=>{l.value&&(t.updateElement({id:l.value.id,props:e}),a())};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Xf,[Object(n["createElementVNode"])("div",Yf,[Zf,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(c).color,"onUpdate:modelValue":t[0]||(t[0]=e=>r({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(c).color,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",Wf,[Jf,Object(n["createElementVNode"])("div",Kf,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:Object(n["unref"])(c).autoplay,onChange:t[1]||(t[1]=e=>r({autoplay:e}))},null,8,["checked"])])]),Object(n["createElementVNode"])("div",Qf,[ej,Object(n["createElementVNode"])("div",tj,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:Object(n["unref"])(c).loop,onChange:t[2]||(t[2]=e=>r({loop:e}))},null,8,["checked"])])])]))}});l("796c");const cj=Yt()(lj,[["__scopeId","data-v-1da06c97"]]);var nj=cj;const oj=e=>(Object(n["pushScopeId"])("data-v-de815ffa"),e=e(),Object(n["popScopeId"])(),e),aj={class:"multi-style-panel"},rj={class:"row"},ij=oj(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"填充颜色:",-1)),sj={class:"row"},dj=oj(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"边框样式:",-1)),uj={class:"row"},bj=oj(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"边框颜色:",-1)),Oj={class:"row"},mj=oj(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"边框粗细:",-1));var pj=Object(n["defineComponent"])({__name:"MultiStylePanel",setup(e){const{Button:t,Group:l}=qu["a"],{OptGroup:c,Option:a}=Ci["a"],r=ki["a"].Group,s=xi["a"].Group,d=T(),{richTextAttrs:u,availableFonts:b,activeElementList:O}=Object(o["c"])(z()),{addHistorySnapshot:m}=Te(),p=(e,t)=>{d.updateElement({id:e,props:t}),m()},f=["12px","14px","16px","18px","20px","22px","24px","28px","32px","36px","40px","44px","48px","54px","60px","66px","72px","76px","80px","88px","96px","104px","112px","120px"],j=Object(n["ref"])("#fff"),v=Object(n["ref"])({width:0,color:"#fff",style:"solid"}),h=e=>{for(const t of O.value){if("text"!==t.type&&"shape"!==t.type&&"chart"!==t.type||p(t.id,{fill:e}),"table"===t.type){const l=JSON.parse(JSON.stringify(t.data));for(let t=0;t<l.length;t++)for(let c=0;c<l[t].length;c++){const n=l[t][c].style||{};l[t][c].style={...n,backcolor:e}}p(t.id,{data:l})}"audio"===t.type&&p(t.id,{color:e})}j.value=e},y=e=>{for(const t of O.value){if("text"===t.type||"image"===t.type||"shape"===t.type||"table"===t.type||"chart"===t.type){const l=t.outline||{width:2,color:"#000",style:"solid"},c={outline:{...l,...e}};p(t.id,c)}"line"===t.type&&p(t.id,e)}v.value={...v.value,...e}},g=(e,t)=>{for(const c of O.value){var l;if(("text"===c.type||"shape"===c.type&&null!==(l=c.text)&&void 0!==l&&l.content)&&yn.emit(jn.RICH_TEXT_COMMAND,{target:c.id,action:{command:e,value:t}}),"table"===c.type){const l=JSON.parse(JSON.stringify(c.data));for(let c=0;c<l.length;c++)for(let n=0;n<l[c].length;n++){const o=l[c][n].style||{};l[c][n].style={...o,[e]:t}}p(c.id,{data:l})}"latex"===c.type&&"color"===e&&p(c.id,{color:t})}};return(e,o)=>{const d=Object(n["resolveComponent"])("IconFontSize"),O=Object(n["resolveComponent"])("IconAddText"),m=Object(n["resolveComponent"])("IconText"),p=Object(n["resolveComponent"])("IconHighLight"),x=Object(n["resolveComponent"])("IconAlignTextLeft"),k=Object(n["resolveComponent"])("IconAlignTextCenter"),C=Object(n["resolveComponent"])("IconAlignTextRight");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",aj,[Object(n["createElementVNode"])("div",rj,[ij,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:j.value,"onUpdate:modelValue":o[0]||(o[0]=e=>h(e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:j.value,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",sj,[dj,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:v.value.style,onChange:o[1]||(o[1]=e=>y({style:e}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(a),{value:"solid"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("实线边框")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(a),{value:"dashed"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("虚线边框")]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",uj,[bj,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:v.value.color,"onUpdate:modelValue":o[2]||(o[2]=e=>y({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:v.value.color||"#000",style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",Oj,[mj,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{value:v.value.width,onChange:o[3]||(o[3]=e=>y({width:e})),style:{flex:"3"}},null,8,["value"])]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Object(n["unref"])(r),{compact:"",class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(u).fontname,onChange:o[4]||(o[4]=e=>g("fontname",e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(d)]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{label:"系统字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(b),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(a),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",{style:Object(n["normalizeStyle"])({fontFamily:e.value})},Object(n["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{label:"在线字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(a),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"2"},value:Object(n["unref"])(u).fontsize,onChange:o[5]||(o[5]=e=>g("fontsize",e))},{suffixIcon:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O)]),default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(f,e=>Object(n["createVNode"])(Object(n["unref"])(a),{key:e,value:e},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])(Object(n["toDisplayString"])(e),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(s),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(u).color,"onUpdate:modelValue":o[6]||(o[6]=e=>g("color",e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字颜色"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:Object(n["unref"])(u).color,style:{flex:"3"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(m)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(u).backcolor,"onUpdate:modelValue":o[7]||(o[7]=e=>g("backcolor",e))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"文字高亮"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(MO,{color:Object(n["unref"])(u).backcolor,style:{flex:"3"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(p)]),_:1},8,["color"])]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"增大字号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"font-size-btn",style:{flex:"2"},onClick:o[8]||(o[8]=e=>g("fontsize-add","2"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(d),Object(n["createTextVNode"])("+")]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"减小字号"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"font-size-btn",style:{flex:"2"},onClick:o[9]||(o[9]=e=>g("fontsize-reduce","2"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(d),Object(n["createTextVNode"])("-")]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{class:"row","button-style":"solid",value:Object(n["unref"])(u).align,onChange:o[10]||(o[10]=e=>g("align",e.target.value))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:"left",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(x)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:"center",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(k)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:"right",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(C)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1},8,["value"])])}}});l("173e");const fj=Yt()(pj,[["__scopeId","data-v-de815ffa"]]);var jj=fj;const vj={class:"element-style-panel"};var hj=Object(n["defineComponent"])({__name:"index",setup(e){const t={[Se.TEXT]:vm,[Se.IMAGE]:ep,[Se.SHAPE]:Op,[Se.LINE]:Vp,[Se.CHART]:of,[Se.TABLE]:Ef,[Se.LATEX]:Df,[Se.VIDEO]:Uf,[Se.AUDIO]:nj},{activeElementIdList:l,activeElementList:c,handleElement:a,activeGroupElementId:r}=Object(o["c"])(z()),i=Object(n["computed"])(()=>{if(l.value.length>1){if(!r.value)return jj;const e=c.value.find(e=>e.id===r.value);return e&&t[e.type]||null}return a.value&&t[a.value.type]||null});return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",vj,[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(i))))]))}});const yj=hj;var gj=yj;const xj=e=>(Object(n["pushScopeId"])("data-v-08d61819"),e=e(),Object(n["popScopeId"])(),e),kj={class:"element-positopn-panel"},Cj=xj(()=>Object(n["createElementVNode"])("div",{class:"title"},"层级:",-1)),Nj=xj(()=>Object(n["createElementVNode"])("div",{class:"title"},"对齐:",-1)),Ej={class:"row"},wj=xj(()=>Object(n["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),Vj={key:0,class:"row"},Ij={key:1,style:{flex:"1"}},Sj={class:"row"},Lj=xj(()=>Object(n["createElementVNode"])("div",{style:{flex:"1"}},null,-1));var Bj=Object(n["defineComponent"])({__name:"ElementPositionPanel",setup(e){const t=xi["a"].Group,l=T(),{handleElement:c,handleElementId:a}=Object(o["c"])(z()),r=Object(n["ref"])(0),i=Object(n["ref"])(0),s=Object(n["ref"])(0),d=Object(n["ref"])(0),u=Object(n["ref"])(0),b=Object(n["ref"])(!1),O=Object(n["computed"])(()=>c.value&&wl[c.value.type]||20),m=Object(n["computed"])(()=>{var e;return"text"===(null===(e=c.value)||void 0===e?void 0:e.type)&&!c.value.vertical}),p=Object(n["computed"])(()=>{var e;return"text"===(null===(e=c.value)||void 0===e?void 0:e.type)&&c.value.vertical});Object(n["watch"])(c,()=>{c.value&&(r.value=Object(S["round"])(c.value.left,1),i.value=Object(S["round"])(c.value.top,1),b.value="fixedRatio"in c.value&&!!c.value.fixedRatio,"line"!==c.value.type&&(s.value=Object(S["round"])(c.value.width,1),d.value=Object(S["round"])(c.value.height,1),u.value="rotate"in c.value&&void 0!==c.value.rotate?Object(S["round"])(c.value.rotate,1):0))},{deep:!0,immediate:!0});const{orderElement:f}=Ue(),{alignElementToCanvas:j}=Al(),{addHistorySnapshot:v}=Te(),h=e=>{const t={left:e};l.updateElement({id:a.value,props:t}),v()},y=e=>{const t={top:e};l.updateElement({id:a.value,props:t}),v()},g=(e,t)=>{if(c.value&&"shape"===c.value.type&&"pathFormula"in c.value&&c.value.pathFormula){const l=Le[c.value.pathFormula];let n="";return n="editable"in l?l.formula(e,t,c.value.keypoint):l.formula(e,t),{viewBox:[e,t],path:n}}return null},x=e=>{let t={width:e};const c=g(e,d.value);c&&(t={...t,...c}),l.updateElement({id:a.value,props:t}),v()},k=e=>{let t={height:e};const c=g(s.value,e);c&&(t={...t,...c}),l.updateElement({id:a.value,props:t}),v()},C=e=>{const t={rotate:e};l.updateElement({id:a.value,props:t}),v()},N=e=>{const t={fixedRatio:e};l.updateElement({id:a.value,props:t}),v()},E=e=>{let t=45*Math.floor(u.value/45);"+"===e?t+=45:"-"===e&&(t-=45),t<-180&&(t=-180),t>180&&(t=180);const c={rotate:t};l.updateElement({id:a.value,props:c}),v()};return(e,l)=>{const o=Object(n["resolveComponent"])("IconSendToBack"),a=Object(n["resolveComponent"])("IconBringToFrontOne"),v=Object(n["resolveComponent"])("IconBringToFront"),g=Object(n["resolveComponent"])("IconSentToBack"),w=Object(n["resolveComponent"])("IconAlignLeft"),V=Object(n["resolveComponent"])("IconAlignVertically"),I=Object(n["resolveComponent"])("IconAlignRight"),S=Object(n["resolveComponent"])("IconAlignTop"),L=Object(n["resolveComponent"])("IconAlignHorizontally"),B=Object(n["resolveComponent"])("IconAlignBottom"),_=Object(n["resolveComponent"])("IconLock"),T=Object(n["resolveComponent"])("IconUnlock"),M=Object(n["resolveComponent"])("IconRotate");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",kj,[Cj,Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[0]||(l[0]=e=>Object(n["unref"])(f)(Object(n["unref"])(c),Object(n["unref"])(W).TOP))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(o,{class:"btn-icon"}),Object(n["createTextVNode"])(" 置顶")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[1]||(l[1]=e=>Object(n["unref"])(f)(Object(n["unref"])(c),Object(n["unref"])(W).BOTTOM))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(a,{class:"btn-icon"}),Object(n["createTextVNode"])(" 置底")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[2]||(l[2]=e=>Object(n["unref"])(f)(Object(n["unref"])(c),Object(n["unref"])(W).UP))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(v,{class:"btn-icon"}),Object(n["createTextVNode"])(" 上移")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[3]||(l[3]=e=>Object(n["unref"])(f)(Object(n["unref"])(c),Object(n["unref"])(W).DOWN))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(g,{class:"btn-icon"}),Object(n["createTextVNode"])(" 下移")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Nj,Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[4]||(l[4]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).LEFT))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(w)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[5]||(l[5]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).HORIZONTAL))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(V)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[6]||(l[6]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).RIGHT))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(I)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[7]||(l[7]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).TOP))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(S)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[8]||(l[8]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).VERTICAL))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(L)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[9]||(l[9]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).BOTTOM))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(B)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",Ej,[Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{prefix:"水平:",step:5,value:r.value,onChange:l[10]||(l[10]=e=>h(e)),style:{flex:"4"}},null,8,["value"]),wj,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{prefix:"垂直:",step:5,value:i.value,onChange:l[11]||(l[11]=e=>y(e)),style:{flex:"4"}},null,8,["value"])]),"line"!==Object(n["unref"])(c).type?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Vj,[Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{prefix:"宽度:",min:Object(n["unref"])(O),max:1500,step:5,disabled:Object(n["unref"])(p),value:s.value,onChange:l[12]||(l[12]=e=>x(e)),style:{flex:"4"}},null,8,["min","disabled","value"]),["image","shape","audio"].includes(Object(n["unref"])(c).type)?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[b.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(et["a"]),{key:0,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"解除宽高比锁定"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(_,{style:{flex:"1"},class:"icon-btn",onClick:l[13]||(l[13]=e=>N(!1))})]),_:1},8,["mouseEnterDelay"])):(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(et["a"]),{key:1,mouseLeaveDelay:0,mouseEnterDelay:.5,title:"宽高比锁定"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(T,{style:{flex:"1"},class:"icon-btn",onClick:l[14]||(l[14]=e=>N(!0))})]),_:1},8,["mouseEnterDelay"]))],64)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Ij)),Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{prefix:"高度:",min:Object(n["unref"])(O),max:800,step:5,disabled:Object(n["unref"])(m)||"table"===Object(n["unref"])(c).type,value:d.value,onChange:l[15]||(l[15]=e=>k(e)),style:{flex:"4"}},null,8,["min","disabled","value"])])):Object(n["createCommentVNode"])("",!0),["line","video","audio"].includes(Object(n["unref"])(c).type)?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:1},[Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",Sj,[Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{prefix:"旋转:",min:-180,max:180,step:5,value:u.value,onChange:l[16]||(l[16]=e=>C(e)),style:{flex:"8"}},null,8,["value"]),Lj,Object(n["createElementVNode"])("div",{class:"text-btn",onClick:l[17]||(l[17]=e=>E("-")),style:{flex:"5"}},[Object(n["createVNode"])(M),Object(n["createTextVNode"])(" -45°")]),Object(n["createElementVNode"])("div",{class:"text-btn",onClick:l[18]||(l[18]=e=>E("+")),style:{flex:"5"}},[Object(n["createVNode"])(M,{style:Object(n["normalizeStyle"])({transform:"rotateY(180deg)"})},null,8,["style"]),Object(n["createTextVNode"])(" +45°")])])],64))])}}});l("691a");const _j=Yt()(Bj,[["__scopeId","data-v-08d61819"]]);var Tj=_j;const Mj=1e3,Dj="click",zj="animate__",Aj=[{type:"bounce",name:"弹跳",children:[{name:"弹入",value:"bounceIn"},{name:"向右弹入",value:"bounceInLeft"},{name:"向左弹入",value:"bounceInRight"},{name:"向上弹入",value:"bounceInUp"},{name:"向下弹入",value:"bounceInDown"}]},{type:"fade",name:"浮现",children:[{name:"浮入",value:"fadeIn"},{name:"向下浮入",value:"fadeInDown"},{name:"向下长距浮入",value:"fadeInDownBig"},{name:"向右浮入",value:"fadeInLeft"},{name:"向右长距浮入",value:"fadeInLeftBig"},{name:"向左浮入",value:"fadeInRight"},{name:"向左长距浮入",value:"fadeInRightBig"},{name:"向上浮入",value:"fadeInUp"},{name:"向上长距浮入",value:"fadeInUpBig"},{name:"从左上浮入",value:"fadeInTopLeft"},{name:"从右上浮入",value:"fadeInTopRight"},{name:"从左下浮入",value:"fadeInBottomLeft"},{name:"从右下浮入",value:"fadeInBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转进入",value:"rotateIn"},{name:"绕左下进入",value:"rotateInDownLeft"},{name:"绕右下进入",value:"rotateInDownRight"},{name:"绕左上进入",value:"rotateInUpLeft"},{name:"绕右上进入",value:"rotateInUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"放大进入",value:"zoomIn"},{name:"向下放大进入",value:"zoomInDown"},{name:"从左放大进入",value:"zoomInLeft"},{name:"从右放大进入",value:"zoomInRight"},{name:"向上放大进入",value:"zoomInUp"}]},{type:"slide",name:"滑入",children:[{name:"向下滑入",value:"slideInDown"},{name:"从右滑入",value:"slideInLeft"},{name:"从左滑入",value:"slideInRight"},{name:"向上滑入",value:"slideInUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转进入",value:"flipInX"},{name:"Y轴翻转进入",value:"flipInY"}]},{type:"back",name:"放大滑入",children:[{name:"向下放大滑入",value:"backInDown"},{name:"从左放大滑入",value:"backInLeft"},{name:"从右放大滑入",value:"backInRight"},{name:"向上放大滑入",value:"backInUp"}]},{type:"lightSpeed",name:"飞入",children:[{name:"从右飞入",value:"lightSpeedInRight"},{name:"从左飞入",value:"lightSpeedInLeft"}]}],Fj=[{type:"bounce",name:"弹跳",children:[{name:"弹出",value:"bounceOut"},{name:"向左弹出",value:"bounceOutLeft"},{name:"向右弹出",value:"bounceOutRight"},{name:"向上弹出",value:"bounceOutUp"},{name:"向下弹出",value:"bounceOutDown"}]},{type:"fade",name:"浮现",children:[{name:"浮出",value:"fadeOut"},{name:"向下浮出",value:"fadeOutDown"},{name:"向下长距浮出",value:"fadeOutDownBig"},{name:"向左浮出",value:"fadeOutLeft"},{name:"向左长距浮出",value:"fadeOutLeftBig"},{name:"向右浮出",value:"fadeOutRight"},{name:"向右长距浮出",value:"fadeOutRightBig"},{name:"向上浮出",value:"fadeOutUp"},{name:"向上长距浮出",value:"fadeOutUpBig"},{name:"从左上浮出",value:"fadeOutTopLeft"},{name:"从右上浮出",value:"fadeOutTopRight"},{name:"从左下浮出",value:"fadeOutBottomLeft"},{name:"从右下浮出",value:"fadeOutBottomRight"}]},{type:"rotate",name:"旋转",children:[{name:"旋转退出",value:"rotateOut"},{name:"绕左下退出",value:"rotateOutDownLeft"},{name:"绕右下退出",value:"rotateOutDownRight"},{name:"绕左上退出",value:"rotateOutUpLeft"},{name:"绕右上退出",value:"rotateOutUpRight"}]},{type:"zoom",name:"缩放",children:[{name:"缩小退出",value:"zoomOut"},{name:"向下缩小退出",value:"zoomOutDown"},{name:"从左缩小退出",value:"zoomOutLeft"},{name:"从右缩小退出",value:"zoomOutRight"},{name:"向上缩小退出",value:"zoomOutUp"}]},{type:"slide",name:"滑出",children:[{name:"向下滑出",value:"slideOutDown"},{name:"从左滑出",value:"slideOutLeft"},{name:"从右滑出",value:"slideOutRight"},{name:"向上滑出",value:"slideOutUp"}]},{type:"flip",name:"翻转",children:[{name:"X轴翻转退出",value:"flipOutX"},{name:"Y轴翻转退出",value:"flipOutY"}]},{type:"back",name:"缩小滑出",children:[{name:"向下缩小滑出",value:"backOutDown"},{name:"从左缩小滑出",value:"backOutLeft"},{name:"从右缩小滑出",value:"backOutRight"},{name:"向上缩小滑出",value:"backOutUp"}]},{type:"lightSpeed",name:"飞出",children:[{name:"从右飞出",value:"lightSpeedOutRight"},{name:"从左飞出",value:"lightSpeedOutLeft"}]}],$j=[{type:"shake",name:"晃动",children:[{name:"左右摇晃",value:"shakeX"},{name:"上下摇晃",value:"shakeY"},{name:"摇头",value:"headShake"},{name:"摆动",value:"swing"},{name:"晃动",value:"wobble"},{name:"惊恐",value:"tada"},{name:"果冻",value:"jello"}]},{type:"other",name:"其他",children:[{name:"弹跳",value:"bounce"},{name:"闪烁",value:"flash"},{name:"脉搏",value:"pulse"},{name:"橡皮筋",value:"rubberBand"},{name:"心跳(快)",value:"heartBeat"}]}],Rj=e=>(Object(n["pushScopeId"])("data-v-7a134147"),e=e(),Object(n["popScopeId"])(),e),Pj={class:"element-animation-panel"},Hj={key:0,class:"element-animation"},qj={class:"tabs"},Uj=["onClick"],Gj={class:"type-title"},Xj={class:"pool-item-wrapper"},Yj=["onMouseenter","onClick"],Zj={key:0,class:"mask"},Wj={key:1,class:"tip"},Jj={class:"sequence-content"},Kj={class:"index"},Qj={class:"text"},ev={class:"handler"},tv={key:0,class:"configs"},lv={class:"config-item"},cv=Rj(()=>Object(n["createElementVNode"])("div",{style:{flex:"3"}},"持续时长:",-1)),nv={class:"config-item"},ov=Rj(()=>Object(n["createElementVNode"])("div",{style:{flex:"3"}},"触发方式:",-1)),av={class:"config-item"};var rv=Object(n["defineComponent"])({__name:"ElementAnimationPanel",setup(e){const t=Ci["a"].Option,l={};for(const n of Aj)for(const e of n.children)l[e.value]=e.name;for(const n of Fj)for(const e of n.children)l[e.value]=e.name;for(const n of $j)for(const e of n.children)l[e.value]=e.name;const c=["in","out","attention"],r=T(),{handleElement:i,handleElementId:s}=Object(o["c"])(z()),{currentSlide:d,formatedAnimations:u,currentSlideAnimations:b}=Object(o["c"])(r),O=[{key:"in",label:"入场"},{key:"out",label:"退场"},{key:"attention",label:"强调"}],m=Object(n["ref"])("in");Object(n["watch"])(()=>s.value,()=>{f.value=!1});const p=Object(n["ref"])(""),f=Object(n["ref"])(!1),{addHistorySnapshot:j}=Te(),v=Object(n["computed"])(()=>{const e=[];for(let t=0;t<u.value.length;t++){const c=u.value[t];for(let n=0;n<c.animations.length;n++){const o=c.animations[n],a=d.value.elements.find(e=>e.id===o.elId);if(!a)continue;const r=El[a.type],i=l[o.effect];e.push({...o,index:0===n?t+1:"",elType:r,animationEffect:i})}}return e}),h=Object(n["computed"])(()=>{const e=b.value,t=e.filter(e=>e.elId===s.value);return t||[]}),y=e=>{const t=b.value.filter(t=>t.id!==e);r.updateSlide({animations:t}),j()},g=e=>{const{newIndex:t,oldIndex:l}=e;if(l===t)return;const c=JSON.parse(JSON.stringify(b.value)),n=c[l];c.splice(l,1),c.splice(t,0,n),r.updateSlide({animations:c}),j()},x=(e,t,l)=>{const c=document.querySelector(`#editable-element-${e} [class^=editable-element-]`);if(c){const e=`${zj}${t}`;document.documentElement.style.setProperty("--animate-duration",l+"ms"),c.classList.add(zj+"animated",e);const n=()=>{document.documentElement.style.removeProperty("--animate-duration"),c.classList.remove(zj+"animated",e)};c.addEventListener("animationend",n,{once:!0})}},k=(e,t)=>{if(t<100||t>5e3)return;const l=b.value.map(l=>l.id===e?{...l,duration:t}:l);r.updateSlide({animations:l}),j()},C=(e,t)=>{const l=b.value.map(l=>l.id===e?{...l,trigger:t}:l);r.updateSlide({animations:l}),j()},N=(e,t)=>{const l=b.value.map(l=>l.id===E.value?{...l,type:e,effect:t}:l);r.updateSlide({animations:l}),f.value=!1,j();const c=b.value.find(e=>e.elId===s.value),n=(null===c||void 0===c?void 0:c.duration)||Mj;x(s.value,t,n)},E=Object(n["ref"])(""),w=(e,t)=>{if(E.value)return void N(e,t);const l=JSON.parse(JSON.stringify(b.value));l.push({id:Object(a["b"])(10),elId:s.value,type:e,effect:t,duration:Mj,trigger:Dj}),r.updateSlide({animations:l}),f.value=!1,j(),x(s.value,t,Mj)},V=Object(n["ref"])(!1),I=e=>{e?setTimeout(()=>V.value=!0,600):V.value=!1},S=e=>{f.value=!0,E.value=e,I(!0)},L={in:Aj,out:Fj,attention:$j};return(e,l)=>{const o=Object(n["resolveComponent"])("IconEffects"),a=Object(n["resolveComponent"])("IconClick"),r=Object(n["resolveComponent"])("IconPlayOne"),s=Object(n["resolveComponent"])("IconCloseSmall");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Pj,[Object(n["unref"])(i)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Hj,[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:f.value,"onUpdate:visible":l[2]||(l[2]=e=>f.value=e),onVisibleChange:l[3]||(l[3]=e=>I(e))},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",qj,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(O,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tab",e.key,{active:m.value===e.key}]),key:e.key,onClick:t=>m.value=e.key},Object(n["toDisplayString"])(e.label),11,Uj)),64))]),(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(c,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,[m.value===e?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["animation-pool",e]),key:e},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(L[e],t=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"pool-type",key:t.name},[Object(n["createElementVNode"])("div",Gj,Object(n["toDisplayString"])(t.name)+"",1),Object(n["createElementVNode"])("div",Xj,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(t.children,t=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"pool-item",key:t.name,onMouseenter:e=>p.value=t.value,onMouseleave:l[0]||(l[0]=e=>p.value=""),onClick:l=>w(e,t.value)},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["animation-box",[Object(n["unref"])(zj)+"animated",Object(n["unref"])(zj)+"fast",p.value===t.value&&`${Object(n["unref"])(zj)}${t.value}`]])},Object(n["toDisplayString"])(t.name),3)],40,Yj))),128))])]))),128)),V.value?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Zj))],2)):Object(n["createCommentVNode"])("",!0)],64))),64))]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"element-animation-btn",onClick:l[1]||(l[1]=e=>E.value="")},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(o,{style:{"margin-right":"5px"}}),Object(n["createTextVNode"])(" 添加动画 ")]),_:1})]),_:1},8,["visible"])])):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Wj,[Object(n["createVNode"])(a,{style:{"margin-right":"5px"}}),Object(n["createTextVNode"])(" 选中画布中的元素添加动画")])),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Object(n["unref"])(Lu.a),{class:"animation-sequence",modelValue:Object(n["unref"])(v),animation:300,scroll:!0,scrollSensitivity:50,handle:".sequence-content",onEnd:g,itemKey:"id"},{item:Object(n["withCtx"])(({element:e})=>{var l,c;return[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["sequence-item",[e.type,{active:(null===(l=Object(n["unref"])(i))||void 0===l?void 0:l.id)===e.elId}]])},[Object(n["createElementVNode"])("div",Jj,[Object(n["createElementVNode"])("div",Kj,Object(n["toDisplayString"])(e.index),1),Object(n["createElementVNode"])("div",Qj,"【"+Object(n["toDisplayString"])(e.elType)+"】"+Object(n["toDisplayString"])(e.animationEffect),1),Object(n["createElementVNode"])("div",ev,[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"预览"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(r,{class:"handler-btn",onClick:t=>x(e.elId,e.effect,e.duration)},null,8,["onClick"])]),_:2},1032,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"删除"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(s,{class:"handler-btn",onClick:t=>y(e.id)},null,8,["onClick"])]),_:2},1032,["mouseEnterDelay"])])]),(null===(c=Object(n["unref"])(h)[0])||void 0===c?void 0:c.elId)===e.elId?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",tv,[Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{style:{margin:"16px 0"}}),Object(n["createElementVNode"])("div",lv,[cv,Object(n["createVNode"])(Object(n["unref"])(Od["a"]),{min:500,max:3e3,step:500,value:e.duration,onChange:t=>k(e.id,t),style:{flex:"5"}},null,8,["value","onChange"])]),Object(n["createElementVNode"])("div",nv,[ov,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{value:e.trigger,onChange:t=>C(e.id,t),style:{flex:"5"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{value:"click"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("主动触发")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"meantime"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("与上一动画同时")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{value:"auto"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("上一动画之后")]),_:1})]),_:2},1032,["value","onChange"])]),Object(n["createElementVNode"])("div",av,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:t=>S(e.id)},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("更换动画")]),_:2},1032,["onClick"])])])):Object(n["createCommentVNode"])("",!0)],2)]}),_:1},8,["modelValue"])])}}});l("3650");const iv=Yt()(rv,[["__scopeId","data-v-7a134147"]]);var sv=iv;const dv=[{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#5b9bd5","#ed7d31","#a5a5a5","#ffc000","#4472c4","#70ad47"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#83992a","#3c9670","#44709d","#a23b32","#d87728","#deb340"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#e48312","#bd582c","#865640","#9b8357","#c2bc80","#94a088"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#90c225","#54a121","#e6b91e","#e86618","#c42f19","#918756"]},{background:"#ffffff",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#1cade4","#2683c6","#27ced7","#42ba97","#3e8853","#62a39f"]},{background:"#e9efd6",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#a5300f","#de7e18","#9f8351","#728653","#92aa4c","#6aac91"]},{background:"#17444e",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b01513","#ea6312","#e6b729","#6bab90","#55839a","#9e5d9d"]},{background:"#36234d",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#b31166","#e33d6f","#e45f3c","#e9943a","#9b6bf2","#d63cd0"]},{background:"#247fad",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#052f61","#a50e82","#14967c","#6a9e1f","#e87d37","#c62324"]},{background:"#103f55",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#40aebd","#97e8d5","#a1cf49","#628f3e","#f2df3a","#fcb01c"]},{background:"#242367",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#ac3ec1","#477bd1","#46b298","#90ba4c","#dd9d31","#e25345"]},{background:"#e4b75e",fontColor:"#333333",fontname:"Microsoft Yahei",colors:["#f0a22e","#a5644e","#b58b80","#c3986d","#a19574","#c17529"]},{background:"#333333",fontColor:"#ffffff",fontname:"Microsoft Yahei",colors:["#bdc8df","#003fa9","#f5ba00","#ff7567","#7676d9","#923ffc"]}];var uv=()=>{const e=T(),{slides:t,currentSlide:l,theme:c}=Object(o["c"])(e),{addHistorySnapshot:n}=Te(),a=e=>{const t=[];for(const l of e.elements){if("shape"===l.type&&0!==I()(l.fill).getAlpha()){const e=I()(l.fill).toRgbString();t.includes(e)||t.push(e)}if("text"===l.type&&l.fill&&0!==I()(l.fill).getAlpha()){const e=I()(l.fill).toRgbString();t.includes(e)||t.push(e)}if("table"===l.type&&l.theme&&0!==I()(l.theme.color).getAlpha()){const e=I()(l.theme.color).toRgbString();t.includes(e)||t.push(e)}if("chart"===l.type&&l.fill&&0!==I()(l.fill).getAlpha()){const e=I()(l.fill).toRgbString();t.includes(e)||t.push(e)}if("line"===l.type&&0!==I()(l.color).getAlpha()){const e=I()(l.color).toRgbString();t.includes(e)||t.push(e)}if("audio"===l.type&&0!==I()(l.color).getAlpha()){const e=I()(l.color).toRgbString();t.includes(e)||t.push(e)}}return t},r=(e,t)=>{const l=a(e),c={};if(l.length>t.length){const e=I()(t[0]).analogous(l.length-t.length+10),c=e.map(e=>e.toHexString()).slice(1);t.push(...c)}for(let n=0;n<l.length;n++)c[l[n]]=t[n];return c},i=(e,t)=>{const l=r(e,t.colors);e.background&&"image"===e.background.type||(e.background={type:"solid",color:t.background});for(const c of e.elements){if("shape"===c.type&&(c.fill=l[I()(c.fill).toRgbString()]||c.fill,c.gradient&&delete c.gradient),"text"===c.type&&(c.fill&&(c.fill=l[I()(c.fill).toRgbString()]||c.fill),c.defaultColor=t.fontColor,c.defaultFontName=t.fontname),"table"===c.type){c.theme&&(c.theme.color=l[I()(c.theme.color).toRgbString()]||c.theme.color);for(const e of c.data)for(const l of e)l.style&&(l.style.color=t.fontColor,l.style.fontname=t.fontname)}"chart"===c.type&&(c.themeColor=[l[I()(c.themeColor[0]).toRgbString()]]||!1,c.gridColor=t.fontColor),"line"===c.type&&(c.color=l[I()(c.color).toRgbString()]||c.color),"audio"===c.type&&(c.color=l[I()(c.color).toRgbString()]||c.color),"latex"===c.type&&(c.color=t.fontColor)}},s=t=>{const c=JSON.parse(JSON.stringify(l.value));i(c,t),e.updateSlide({background:c.background,elements:c.elements}),n()},d=l=>{const c=JSON.parse(JSON.stringify(t.value));for(const e of c)i(e,l);e.setTheme({backgroundColor:l.background,themeColor:l.colors[0],fontColor:l.fontColor,fontName:l.fontname}),e.setSlides(c),n()},u=()=>{const l=JSON.parse(JSON.stringify(t.value)),{themeColor:o,backgroundColor:a,fontColor:r,fontName:i}=c.value;for(const e of l){e.background&&"image"===e.background.type||(e.background={type:"solid",color:a});for(const t of e.elements)if("shape"===t.type)t.fill=o;else if("line"===t.type)t.color=o;else if("text"===t.type)t.defaultColor=r,t.defaultFontName=i,t.fill&&(t.fill=o);else if("table"===t.type){t.theme&&(t.theme.color=o);for(const e of t.data)for(const t of e)t.style&&(t.style.color=r,t.style.fontname=i)}else"chart"===t.type?(t.themeColor=[o],t.gridColor=r):"latex"===t.type?t.color=r:"audio"===t.type&&(t.color=o)}e.setSlides(l),n()};return{applyPresetThemeToSingleSlide:s,applyPresetThemeToAllSlides:d,applyThemeToAllSlides:u}};const bv=e=>(Object(n["pushScopeId"])("data-v-41419138"),e=e(),Object(n["popScopeId"])(),e),Ov={class:"slide-design-panel"},mv=bv(()=>Object(n["createElementVNode"])("div",{class:"title"},"背景填充",-1)),pv={class:"row"},fv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"1"}},null,-1)),jv={key:0,class:"background-image-wrapper"},vv={class:"background-image"},hv={key:1,class:"background-gradient-wrapper"},yv={class:"row"},gv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"起点颜色:",-1)),xv={class:"row"},kv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"终点颜色:",-1)),Cv={key:0,class:"row"},Nv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"渐变角度:",-1)),Ev={class:"row"},wv={class:"row"},Vv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"画布尺寸:",-1)),Iv=bv(()=>Object(n["createElementVNode"])("div",{class:"title"},"全局主题",-1)),Sv={class:"row"},Lv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"字体:",-1)),Bv={class:"row"},_v=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"字体颜色:",-1)),Tv={class:"row"},Mv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"背景颜色:",-1)),Dv={class:"row"},zv=bv(()=>Object(n["createElementVNode"])("div",{style:{flex:"2"}},"主题色:",-1)),Av={class:"row"},Fv=bv(()=>Object(n["createElementVNode"])("div",{class:"title"},"预置主题",-1)),$v={class:"theme-list"},Rv={class:"theme-item-content"},Pv={class:"colors"},Hv={class:"btns"},qv=["onClick"],Uv=["onClick"];var Gv=Object(n["defineComponent"])({__name:"SlideDesignPanel",setup(e){const{OptGroup:t,Option:l}=Ci["a"],c=T(),{availableFonts:a}=Object(o["c"])(z()),{slides:r,currentSlide:s,viewportRatio:d,theme:u}=Object(o["c"])(c),b=Object(n["computed"])(()=>s.value.background?s.value.background:{type:"solid",value:"#fff"}),{addHistorySnapshot:O}=Te(),{applyPresetThemeToSingleSlide:m,applyPresetThemeToAllSlides:p,applyThemeToAllSlides:f}=uv(),j=e=>{if("solid"===e){const e={...b.value,type:"solid",color:b.value.color||"#fff"};c.updateSlide({background:e})}else if("image"===e){const e={...b.value,type:"image",image:b.value.image||"",imageSize:b.value.imageSize||"cover"};c.updateSlide({background:e})}else{const e={...b.value,type:"gradient",gradientType:b.value.gradientType||"linear",gradientColor:b.value.gradientColor||["#fff","#fff"],gradientRotate:b.value.gradientRotate||0};c.updateSlide({background:e})}O()},v=e=>{c.updateSlide({background:{...b.value,...e}}),O()},h=e=>{const t=e[0];t&&we(t).then(e=>v({image:e}))},y=()=>{const e=r.value.map(e=>({...e,background:s.value.background}));c.setSlides(e),O()},g=e=>{c.setTheme(e)},x=e=>{c.setViewportRatio(e)};return(e,c)=>{const o=Object(n["resolveComponent"])("IconPlus");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Ov,[mv,Object(n["createElementVNode"])("div",pv,[Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"10"},value:Object(n["unref"])(b).type,onChange:c[0]||(c[0]=e=>j(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"solid"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("纯色填充")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"image"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("图片填充")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"gradient"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("渐变填充")]),_:1})]),_:1},8,["value"]),fv,"solid"===Object(n["unref"])(b).type?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(Rs["a"]),{key:0,trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(b).color,"onUpdate:modelValue":c[1]||(c[1]=e=>v({color:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(b).color||"#fff",style:{flex:"10"}},null,8,["color"])]),_:1})):"image"===Object(n["unref"])(b).type?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(Ci["a"]),{key:1,style:{flex:"10"},value:Object(n["unref"])(b).imageSize||"cover",onChange:c[2]||(c[2]=e=>v({imageSize:e}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"contain"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("缩放")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"repeat"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("拼贴")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"cover"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("缩放铺满")]),_:1})]),_:1},8,["value"])):(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(Ci["a"]),{key:2,style:{flex:"10"},value:Object(n["unref"])(b).gradientType,onChange:c[3]||(c[3]=e=>v({gradientType:e}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"linear"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("线性渐变")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"radial"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("径向渐变")]),_:1})]),_:1},8,["value"]))]),"image"===Object(n["unref"])(b).type?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",jv,[Object(n["createVNode"])(el,{onChange:c[4]||(c[4]=e=>h(e))},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",vv,[Object(n["createElementVNode"])("div",{class:"content",style:Object(n["normalizeStyle"])({backgroundImage:`url(${Object(n["unref"])(b).image})`})},[Object(n["createVNode"])(o)],4)])]),_:1})])):Object(n["createCommentVNode"])("",!0),"gradient"===Object(n["unref"])(b).type?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",hv,[Object(n["createElementVNode"])("div",yv,[gv,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(b).gradientColor[0],"onUpdate:modelValue":c[5]||(c[5]=e=>v({gradientColor:[e,Object(n["unref"])(b).gradientColor[1]]}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(b).gradientColor[0],style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",xv,[kv,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(b).gradientColor[1],"onUpdate:modelValue":c[6]||(c[6]=e=>v({gradientColor:[Object(n["unref"])(b).gradientColor[0],e]}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(b).gradientColor[1],style:{flex:"3"}},null,8,["color"])]),_:1})]),"linear"===Object(n["unref"])(b).gradientType?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Cv,[Nv,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"slider",min:0,max:360,step:15,value:Object(n["unref"])(b).gradientRotate,onChange:c[7]||(c[7]=e=>v({gradientRotate:e}))},null,8,["value"])])):Object(n["createCommentVNode"])("",!0)])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",Ev,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:c[8]||(c[8]=e=>y())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("应用背景到全部")]),_:1})]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createElementVNode"])("div",wv,[Vv,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(d),onChange:c[9]||(c[9]=e=>x(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:.5625},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("宽屏 16 : 9")]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(l),{value:.625},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("宽屏 16 : 10")]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(l),{value:.75},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("标准 4 : 3")]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(l),{value:.70710678},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("纸张 A3 / A4")]),_:1},8,["value"])]),_:1},8,["value"])]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Iv,Object(n["createElementVNode"])("div",Sv,[Lv,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{style:{flex:"3"},value:Object(n["unref"])(u).fontName,onChange:c[10]||(c[10]=e=>g({fontName:e}))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(t),{label:"系统字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(a),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(l),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",{style:Object(n["normalizeStyle"])({fontFamily:e.value})},Object(n["toDisplayString"])(e.label),5)]),_:2},1032,["value"]))),128))]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{label:"在线字体"},{default:Object(n["withCtx"])(()=>[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(i),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(l),{key:e.value,value:e.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(e.label),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",Bv,[_v,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(u).fontColor,"onUpdate:modelValue":c[11]||(c[11]=e=>g({fontColor:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(u).fontColor,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",Tv,[Mv,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(u).backgroundColor,"onUpdate:modelValue":c[12]||(c[12]=e=>g({backgroundColor:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(u).backgroundColor,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",Dv,[zv,Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click"},{content:Object(n["withCtx"])(()=>[Object(n["createVNode"])(tO,{modelValue:Object(n["unref"])(u).themeColor,"onUpdate:modelValue":c[13]||(c[13]=e=>g({themeColor:e}))},null,8,["modelValue"])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(nb,{color:Object(n["unref"])(u).themeColor,style:{flex:"3"}},null,8,["color"])]),_:1})]),Object(n["createElementVNode"])("div",Av,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:c[14]||(c[14]=e=>Object(n["unref"])(f)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("应用主题到全部")]),_:1})]),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Fv,Object(n["createElementVNode"])("div",$v,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(dv),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"theme-item",key:t,style:Object(n["normalizeStyle"])({backgroundColor:e.background,fontFamily:e.fontname})},[Object(n["createElementVNode"])("div",Rv,[Object(n["createElementVNode"])("div",{class:"text",style:Object(n["normalizeStyle"])({color:e.fontColor})},"文字 Aa",4),Object(n["createElementVNode"])("div",Pv,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.colors,(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"color-block",key:t,style:Object(n["normalizeStyle"])({backgroundColor:e})},null,4))),128))]),Object(n["createElementVNode"])("div",Hv,[Object(n["createElementVNode"])("div",{class:"btn",onClick:t=>Object(n["unref"])(m)(e)},"应用",8,qv),Object(n["createElementVNode"])("div",{class:"btn",onClick:t=>Object(n["unref"])(p)(e)},"应用全局",8,Uv)])])],4))),128))])])}}});l("9637");const Xv=Yt()(Gv,[["__scopeId","data-v-41419138"]]);var Yv=Xv;const Zv={class:"slide-animation-panel"},Wv={class:"animation-pool"},Jv=["onClick"],Kv={class:"animation-text"};var Qv=Object(n["defineComponent"])({__name:"SlideAnimationPanel",setup(e){const t=T(),{slides:l,currentSlide:c}=Object(o["c"])(t),a=Object(n["computed"])(()=>c.value.turningMode||"slideY"),r=[{label:"无",value:"no"},{label:"淡入淡出",value:"fade"},{label:"左右推移",value:"slideX"},{label:"上下推移",value:"slideY"}],{addHistorySnapshot:i}=Te(),s=e=>{e!==a.value&&(t.updateSlide({turningMode:e}),i())},d=()=>{const e=l.value.map(e=>({...e,turningMode:c.value.turningMode}));t.setSlides(e),i()};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Zv,[Object(n["createElementVNode"])("div",Wv,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(r,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["animation-item",{active:Object(n["unref"])(a)===e.value}]),key:e.label,onClick:t=>s(e.value)},[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["animation-block",e.value])},null,2),Object(n["createElementVNode"])("div",Kv,Object(n["toDisplayString"])(e.label),1)],10,Jv)),64))]),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{width:"100%"},onClick:t[0]||(t[0]=e=>d())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("应用到全部")]),_:1})]))}});l("7d40");const eh=Yt()(Qv,[["__scopeId","data-v-c4273212"]]);var th=eh,lh=()=>{const e=T(),{activeElementIdList:t,activeElementList:l}=Object(o["c"])(z()),{currentSlide:c}=Object(o["c"])(e),{addHistorySnapshot:n}=Te(),a=o=>{const{minX:a,maxX:r,minY:i,maxY:s}=he(l.value),d=JSON.parse(JSON.stringify(c.value.elements)),u={};for(const e of l.value)if(e.groupId&&!u[e.groupId]){const t=l.value.filter(t=>t.groupId===e.groupId);u[e.groupId]=he(t)}if(o===J.LEFT)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.minX-a;e.left=e.left-l}else if("rotate"in e&&e.rotate){const{offsetX:t}=je({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=a-t}else e.left=a});else if(o===J.RIGHT)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.maxX-r;e.left=e.left-l}else{const t="line"===e.type?Math.max(e.start[0],e.end[0]):e.width;if("rotate"in e&&e.rotate){const{offsetX:l}=je({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=r-t+l}else e.left=r-t}});else if(o===J.TOP)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.minY-i;e.top=e.top-l}else if("rotate"in e&&e.rotate){const{offsetY:t}=je({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=i-t}else e.top=i});else if(o===J.BOTTOM)d.forEach(e=>{if(t.value.includes(e.id))if(e.groupId){const t=u[e.groupId],l=t.maxY-s;e.top=e.top-l}else{const t="line"===e.type?Math.max(e.start[1],e.end[1]):e.height;if("rotate"in e&&e.rotate){const{offsetY:l}=je({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=s-t+l}else e.top=s-t}});else if(o===J.HORIZONTAL){const e=(a+r)/2;d.forEach(l=>{if(t.value.includes(l.id))if(l.groupId){const t=u[l.groupId],c=(t.maxX+t.minX)/2,n=c-e;l.left=l.left-n}else{const t="line"===l.type?Math.max(l.start[0],l.end[0]):l.width;l.left=e-t/2}})}else if(o===J.VERTICAL){const e=(i+s)/2;d.forEach(l=>{if(t.value.includes(l.id))if(l.groupId){const t=u[l.groupId],c=(t.maxY+t.minY)/2,n=c-e;l.top=l.top-n}else{const t="line"===l.type?Math.max(l.start[1],l.end[1]):l.height;l.top=e-t/2}})}e.updateSlide({elements:d}),n()};return{alignActiveElement:a}},ch=()=>{const e=T(),{activeElementIdList:t,activeElementList:l}=Object(o["c"])(z()),{currentSlide:c}=Object(o["c"])(e),{addHistorySnapshot:a}=Te(),r=Object(n["computed"])(()=>{let e=0;const t=[];for(const c of l.value)c.groupId?t.includes(c.groupId)||(t.push(c.groupId),e+=1):e+=1;return e}),i=()=>{const{minX:n,maxX:o}=he(l.value),r=JSON.parse(JSON.stringify(l.value)),i=JSON.parse(JSON.stringify(c.value.elements)),s=[];let d=[];for(const e of r)if(e.groupId){const t=d.find(t=>t.groupId===e.groupId);t?d=d.map(t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t):d.push({groupId:e.groupId,els:[e]})}else{const{minX:t,maxX:l}=ve(e);s.push({min:t,max:l,el:e})}const u=[];for(const e of d){const{minX:t,maxX:l}=he(e.els);u.push({min:t,max:l,els:e.els})}const b=[...s,...u];b.sort((e,t)=>e.min-t.min);let O=0;for(const e of b){const t=e.max-e.min;O+=t}const m=(o-n-O)/(b.length-1),p=[],f=b[0];let j={min:f.min,max:f.max};if("el"in f)p.push({pos:f.min,el:f.el});else for(const e of f.els){const{minX:t}=ve(e);p.push({pos:t,el:e})}for(let e=1;e<b.length;e++){const t=b[e],l=j.max-j.min,c=j.min+l+m,n=t.max-t.min;if(j={min:c,max:c+n},"el"in t)p.push({pos:c,el:t.el});else for(const e of t.els){const{minX:l}=ve(e),n=l-t.min;p.push({pos:c+n,el:e})}}for(const e of i)if(t.value.includes(e.id))for(const t of p)if(t.el.id===e.id)if("rotate"in e&&e.rotate){const{offsetX:l}=je({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.left=t.pos-l}else e.left=t.pos;e.updateSlide({elements:i}),a()},s=()=>{const{minY:n,maxY:o}=he(l.value),r=JSON.parse(JSON.stringify(l.value)),i=JSON.parse(JSON.stringify(c.value.elements)),s=[];let d=[];for(const e of r)if(e.groupId){const t=d.find(t=>t.groupId===e.groupId);t?d=d.map(t=>t.groupId===e.groupId?{...t,els:[...t.els,e]}:t):d.push({groupId:e.groupId,els:[e]})}else{const{minY:t,maxY:l}=ve(e);s.push({min:t,max:l,el:e})}const u=[];for(const e of d){const{minY:t,maxY:l}=he(e.els);u.push({min:t,max:l,els:e.els})}const b=[...s,...u];b.sort((e,t)=>e.min-t.min);let O=0;for(const e of b){const t=e.max-e.min;O+=t}const m=(o-n-O)/(b.length-1),p=[],f=b[0];let j={min:f.min,max:f.max};if("el"in f)p.push({pos:f.min,el:f.el});else for(const e of f.els){const{minY:t}=ve(e);p.push({pos:t,el:e})}for(let e=1;e<b.length;e++){const t=b[e],l=j.max-j.min,c=j.min+l+m,n=t.max-t.min;if(j={min:c,max:c+n},"el"in t)p.push({pos:c,el:t.el});else for(const e of t.els){const{minY:l}=ve(e),n=l-t.min;p.push({pos:c+n,el:e})}}for(const e of i)if(t.value.includes(e.id))for(const t of p)if(t.el.id===e.id)if("rotate"in e&&e.rotate){const{offsetY:l}=je({left:e.left,top:e.top,width:e.width,height:e.height,rotate:e.rotate});e.top=t.pos-l}else e.top=t.pos;e.updateSlide({elements:i}),a()};return{displayItemCount:r,uniformHorizontalDisplay:i,uniformVerticalDisplay:s}};const nh={class:"multi-position-panel"};var oh=Object(n["defineComponent"])({__name:"MultiPositionPanel",setup(e){const t=xi["a"].Group,{canCombine:l,combineElements:c,uncombineElements:o}=Re(),{alignActiveElement:a}=lh(),{alignElementToCanvas:r}=Al(),{displayItemCount:i,uniformHorizontalDisplay:s,uniformVerticalDisplay:d}=ch(),u=e=>{l.value?a(e):r(e)};return(e,a)=>{const r=Object(n["resolveComponent"])("IconAlignLeft"),b=Object(n["resolveComponent"])("IconAlignHorizontally"),O=Object(n["resolveComponent"])("IconAlignRight"),m=Object(n["resolveComponent"])("IconAlignTop"),p=Object(n["resolveComponent"])("IconAlignVertically"),f=Object(n["resolveComponent"])("IconAlignBottom"),j=Object(n["resolveComponent"])("IconGroup"),v=Object(n["resolveComponent"])("IconUngroup");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",nh,[Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"左对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[0]||(a[0]=e=>u(Object(n["unref"])(J).LEFT))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(r)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"水平居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[1]||(a[1]=e=>u(Object(n["unref"])(J).HORIZONTAL))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(b)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"右对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[2]||(a[2]=e=>u(Object(n["unref"])(J).RIGHT))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"上对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[3]||(a[3]=e=>u(Object(n["unref"])(J).TOP))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(m)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"垂直居中"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[4]||(a[4]=e=>u(Object(n["unref"])(J).VERTICAL))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(p)]),_:1})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"下对齐"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[5]||(a[5]=e=>u(Object(n["unref"])(J).BOTTOM))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(f)]),_:1})]),_:1},8,["mouseEnterDelay"])]),_:1}),Object(n["unref"])(i)>2?(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["unref"])(t),{key:0,class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[6]||(a[6]=e=>Object(n["unref"])(s)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("水平均匀分布")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:a[7]||(a[7]=e=>Object(n["unref"])(d)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("垂直均匀分布")]),_:1})]),_:1})):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])(Object(n["unref"])(ui["a"])),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{disabled:!Object(n["unref"])(l),onClick:a[8]||(a[8]=e=>Object(n["unref"])(c)()),style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(j,{style:{"margin-right":"3px"}}),Object(n["createTextVNode"])("组合")]),_:1},8,["disabled"]),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{disabled:Object(n["unref"])(l),onClick:a[9]||(a[9]=e=>Object(n["unref"])(o)()),style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(v,{style:{"margin-right":"3px"}}),Object(n["createTextVNode"])("取消组合")]),_:1},8,["disabled"])]),_:1})])}}});l("9bc1");const ah=Yt()(oh,[["__scopeId","data-v-c88d31ba"]]);var rh=ah;const ih=[{key:"letter",label:"字母",children:["α","β","γ","δ","ϵ","ε","ζ","η","θ","ϑ","ι","κ","λ","μ","ν","ξ","π","ϖ","ρ","ϱ","σ","ς","τ","υ","ϕ","φ","χ","ψ","ω","Γ","Δ","Θ","Λ","Ξ","Π","Σ","Υ","Φ","Ψ","Ω","𝐀","𝐁","𝐂","𝐃","𝐄","𝐅","𝐆","𝐇","𝐈","𝐉","𝐊","𝐋","𝐌","𝐍","𝐎","𝐏","𝐐","𝐑","𝐒","𝐓","𝐔","𝐕","𝐖","𝐗","𝐘","𝐙","𝐚","𝐛","𝐜","𝐝","𝐞","𝐟","𝐠","𝐡","𝐢","𝐣","𝐤","𝐥","𝐦","𝐧","𝐨","𝐩","𝐪","𝐫","𝐬","𝐭","𝐮","𝐯","𝐰","𝐱","𝐲","𝐳","𝓐","𝓑","𝓒","𝓓","𝓔","𝓕","𝓖","𝓗","𝓘","𝓙","𝓚","𝓛","𝓜","𝓝","𝓞","𝓟","𝓠","𝓡","𝓢","𝓣","𝓤","𝓥","𝓦","𝓧","𝓨","𝓩","𝓪","𝓫","𝓬","𝓭","𝓮","𝓯","𝓰","𝓱","𝓲","𝓳","𝓴","𝓵","𝓶","𝓷","𝓸","𝓹","𝓺","𝓻","𝓼","𝓽","𝓾","𝓿","𝔀","𝔁","𝔂","𝔃"]},{key:"number",label:"序号",children:["①","②","③","④","⑤","⑥","⑦","⑧","⑨","⑩","⑪","⑫","⑬","⑭","⑮","⑯","⑰","⑱","⑲","⑳","⑴","⑵","⑶","⑷","⑸","⑹","⑺","⑻","⑼","⑽","⑾","⑿","⒀","⒁","⒂","⒃","⒄","⒅","⒆","⒇","º","¹","²","³","⁴","⁵","⁶","⁷","⁸","⁹","₀","₁","₂","₃","₄","₅","₆","₇","₈","₉","","Ⅱ","Ⅲ","Ⅳ","","Ⅵ","Ⅶ","Ⅷ","Ⅸ","","Ⅺ","Ⅻ","","","","","","ⅱ","ⅲ","ⅳ","","ⅵ","ⅶ","ⅷ","ⅸ","","ⅺ","ⅻ","","","","ⅿ","ↀ","ↁ","ↂ","㊀","㊁","㊂","㊃","㊄","㊅","㊆","㊇","㊈","㊉","㈠","㈡","㈢","㈣","㈤","㈥","㈦","㈧","㈨","㈩","𝟘","𝟙","𝟚","𝟛","𝟜","𝟝","𝟞","𝟟","𝟠","𝟡"]},{key:"math",label:"数学",children:["+","-","×","÷","=","~","¬","±","%","°","ǃ","‰","‱","½","⅓","⅔","¼","¾","<",">","l","o","g","l","g","l","n","⨂","⨁","⨄","⨃","⨅","⨆","√","∛","∜","∝","∞","∟","∠","∡","∢","∧","","∩","","∫","∬","∭","∮","∯","∰","∱","∲","∳","∴","∵","","∽","∾","∿","≃","≄","≅","≆","≇","≈","≊","≋","≌","≍","≎","≏","≐","≑","≒","≓","≔","≕","≤","≥","≦","≧","≨","≩","≪","≫","≺","≻","≼","≽","≾","≿","⊀","⊁","⊂","⊃","⊄","⊅","⊆","⊇","⊈","⊉","⊊","⊋","⊏","⊐","⊑","⊒","⊓","⊔","⊢","⊣","","⊥","⊦","⊧","⊨","⊩","⊪","⊫","⊬","⊭","⊮","⊯","⊲","⊳","⊴","⊵","⋀","","⋂","","⋉","⋊","⋋","⋌","⟨","⟩","⟪","⟫","⟮","⟯","⧼","⧽","⦰"]},{key:"arrow",label:"箭头",children:["←","↑","→","↓","↔","↕","↖","↗","↘","↙","↚","↛","↜","↝","↞","↟","↠","↡","↢","↣","↤","↥","↦","↧","↨","↫","↬","↭","↮","↯","↰","↱","↲","↳","↴","↵","↶","↷","↸","↹","↺","↻","↼","↽","↾","↿","⇀","⇁","⇂","⇃","⇄","⇅","⇆","⇇","⇈","⇉","⇊","⇋","⇌","⇍","⇎","⇏","⇐","⇑","⇒","⇓","⇔","⇕","⇖","⇗","⇘","⇙","⇚","⇛","⇜","⇝","⇞","⇟","⇠","⇡","⇢","⇣","⇤","⇥","⇦","⇧","⇨","⇩","⇪","⇫","⇬","⇭","⇮","⇯","⇰","⇱","⇲","⇳","⇴","⇵","⇶","⇷","⇸","⇹","⇺","⇻","⇼","⇽","⇾","⇿"]},{key:"graph",label:"图形",children:["▢","▣","▤","▥","▦","▧","▨","▩","▭","▮","▯","▰","▱","▲","▷","▼","◁","◈","◉","◍","◐","◑","◒","◓","◔","◕","◧","◨","◩","◪","◫","◬","◭","◮"]}],sh={class:"symbol-panel"},dh={class:"tabs"},uh=["onClick"],bh={class:"pool"},Oh=["onClick"],mh={class:"symbol"};var ph=Object(n["defineComponent"])({__name:"SymbolPanel",setup(e){const t=Object(n["ref"])(ih[0].key),l=Object(n["computed"])(()=>{const e=ih.find(e=>e.key===t.value);return(null===e||void 0===e?void 0:e.children)||[]}),c=e=>{yn.emit(jn.RICH_TEXT_COMMAND,{action:{command:"insert",value:e}})};return(e,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",sh,[Object(n["createElementVNode"])("div",dh,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(ih),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["tab",{active:t.value===e.key}]),key:e.key,onClick:l=>t.value=e.key},Object(n["toDisplayString"])(e.label),11,uh))),128))]),Object(n["createElementVNode"])("div",bh,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(l),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"symbol-item",key:t,onClick:t=>c(e)},[Object(n["createElementVNode"])("div",mh,Object(n["toDisplayString"])(e),1)],8,Oh))),128))])]))}});l("1126");const fh=Yt()(ph,[["__scopeId","data-v-ba0c96fc"]]);var jh=fh;const vh={class:"toolbar"},hh={class:"tabs"},yh=["onClick"],gh={class:"content"};var xh=Object(n["defineComponent"])({__name:"index",setup(e){const t=z(),{activeElementIdList:l,handleElement:a,toolbarState:r}=Object(o["c"])(t),i=Object(n["computed"])(()=>{var e;return"text"===(null===(e=a.value)||void 0===e?void 0:e.type)?[{label:"样式",value:c.EL_STYLE},{label:"符号",value:c.SYMBOL},{label:"位置",value:c.EL_POSITION},{label:"动画",value:c.EL_ANIMATION}]:[{label:"样式",value:c.EL_STYLE},{label:"位置",value:c.EL_POSITION},{label:"动画",value:c.EL_ANIMATION}]}),s=[{label:"设计",value:c.SLIDE_DESIGN},{label:"切换",value:c.SLIDE_ANIMATION},{label:"动画",value:c.EL_ANIMATION}],d=[{label:"样式",value:c.EL_STYLE},{label:"位置",value:c.MULTI_POSITION}],u=e=>{t.setToolbarState(e)},b=Object(n["computed"])(()=>l.value.length?l.value.length>1?d:i.value:s);Object(n["watch"])(b,()=>{const e=b.value.map(e=>e.value);e.includes(r.value)||t.setToolbarState(e[0])});const O=Object(n["computed"])(()=>{const e={[c.EL_STYLE]:gj,[c.EL_POSITION]:Tj,[c.EL_ANIMATION]:sv,[c.SLIDE_DESIGN]:Yv,[c.SLIDE_ANIMATION]:th,[c.MULTI_POSITION]:rh,[c.SYMBOL]:jh};return e[r.value]||null});return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",vh,[Object(n["createElementVNode"])("div",hh,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(b),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["tab",{active:e.value===Object(n["unref"])(r)}]),key:e.value,onClick:t=>u(e.value)},Object(n["toDisplayString"])(e.label),11,yh))),128))]),Object(n["createElementVNode"])("div",gh,[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(O))))])]))}});l("cd7e");const kh=Yt()(xh,[["__scopeId","data-v-5303bd17"]]);var Ch=kh;const Nh={class:"remark"},Eh=["value"];var wh=Object(n["defineComponent"])({__name:"index",props:{height:{type:Number,required:!0}},emits:["update:height"],setup(e,{emit:t}){const l=e,c=T(),{currentSlide:a}=Object(o["c"])(c),r=Object(n["computed"])(()=>{var e;return(null===(e=a.value)||void 0===e?void 0:e.remark)||""}),i=e=>{const t=e.target.value;c.updateSlide({remark:t})},s=e=>{let c=!0;const n=e.pageY,o=l.height;document.onmousemove=e=>{if(!c)return;const l=e.pageY,a=l-n;let r=-a+o;r<40&&(r=40),r>120&&(r=120),t("update:height",r)},document.onmouseup=()=>{c=!1,document.onmousemove=null,document.onmouseup=null}};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Nh,[Object(n["createElementVNode"])("div",{class:"resize-handler",onMousedown:t[0]||(t[0]=e=>s(e))},null,32),Object(n["createElementVNode"])("textarea",{value:Object(n["unref"])(r),placeholder:"点击输入演讲者备注",onInput:t[1]||(t[1]=e=>i(e))},null,40,Eh)]))}});l("ec27");const Vh=Yt()(wh,[["__scopeId","data-v-82b674f6"]]);var Ih=Vh;const Sh=e=>(Object(n["pushScopeId"])("data-v-5a56d59c"),e=e(),Object(n["popScopeId"])(),e),Lh={key:0,class:"fullscreen-spin"},Bh={class:"spin"},_h=Sh(()=>Object(n["createElementVNode"])("div",{class:"spinner"},null,-1)),Th={class:"text"};var Mh=Object(n["defineComponent"])({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},tip:{type:String,default:""}},setup(e){return(t,l)=>e.loading?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Lh,[Object(n["createElementVNode"])("div",Bh,[_h,Object(n["createElementVNode"])("div",Th,Object(n["toDisplayString"])(e.tip),1)])])):Object(n["createCommentVNode"])("",!0)}});l("cf16");const Dh=Yt()(Mh,[["__scopeId","data-v-5a56d59c"]]);var zh=Dh;const Ah=e=>(Object(n["pushScopeId"])("data-v-92a8f63e"),e=e(),Object(n["popScopeId"])(),e),Fh={class:"export-img-dialog"},$h={class:"thumbnails-view"},Rh={class:"configs"},Ph={class:"row"},Hh=Ah(()=>Object(n["createElementVNode"])("div",{class:"title"},"导出格式:",-1)),qh={class:"row"},Uh=Ah(()=>Object(n["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),Gh={key:0,class:"row"},Xh=["data-range"],Yh={class:"row"},Zh=Ah(()=>Object(n["createElementVNode"])("div",{class:"title"},"图片质量:",-1)),Wh={class:"row"},Jh=Ah(()=>Object(n["createElementVNode"])("div",{class:"title"},"忽略在线字体:",-1)),Kh={class:"config-item"},Qh={class:"btns"};var ey=Object(n["defineComponent"])({__name:"ExportImage",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:c}=qu["a"],{slides:a,currentSlide:r}=Object(o["c"])(T()),i=Object(n["ref"])(),s=Object(n["ref"])("all"),d=Object(n["ref"])([1,a.value.length]),u=Object(n["ref"])("jpeg"),b=Object(n["ref"])(1),O=Object(n["ref"])(!0),m=Object(n["computed"])(()=>"all"===s.value?a.value:"current"===s.value?[r.value]:a.value.filter((e,t)=>{const[l,c]=d.value;return t>=l-1&&t<=c-1})),{exportImage:p,exporting:f}=Rt(),j=()=>{i.value&&p(i.value,u.value,b.value,O.value)};return(e,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Fh,[Object(n["createElementVNode"])("div",$h,[Object(n["createElementVNode"])("div",{class:"thumbnails",ref_key:"imageThumbnailsRef",ref:i},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(m),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(Ns,{class:"thumbnail",key:e.id,slide:e,size:1600},null,8,["slide"]))),128))],512)]),Object(n["createElementVNode"])("div",Rh,[Object(n["createElementVNode"])("div",Ph,[Hh,Object(n["createVNode"])(Object(n["unref"])(l),{class:"config-item",value:u.value,"onUpdate:value":o[0]||(o[0]=e=>u.value=e)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"50%"},value:"jpeg"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("JPEG")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"50%"},value:"png"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("PNG")]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",qh,[Uh,Object(n["createVNode"])(Object(n["unref"])(l),{class:"config-item",value:s.value,"onUpdate:value":o[1]||(o[1]=e=>s.value=e)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"all"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("全部")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"current"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("当前页")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"custom"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("自定义")]),_:1})]),_:1},8,["value"])]),"custom"===s.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Gh,[Object(n["createElementVNode"])("div",{class:"title","data-range":`${d.value[0]} ~ ${d.value[1]}`},"自定义范围:",8,Xh),Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"config-item",range:"",min:1,max:Object(n["unref"])(a).length,step:1,value:d.value,"onUpdate:value":o[2]||(o[2]=e=>d.value=e)},null,8,["max","value"])])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",Yh,[Zh,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"config-item",min:0,max:1,step:.1,value:b.value,"onUpdate:value":o[3]||(o[3]=e=>b.value=e)},null,8,["step","value"])]),Object(n["createElementVNode"])("div",Wh,[Jh,Object(n["createElementVNode"])("div",Kh,[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.5,title:"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭【忽略在线字体】选项,但要注意这将会增加导出用时。"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:O.value,"onUpdate:checked":o[4]||(o[4]=e=>O.value=e)},null,8,["checked"])]),_:1},8,["mouseEnterDelay"])])])]),Object(n["createElementVNode"])("div",Qh,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn export",type:"primary",onClick:o[5]||(o[5]=e=>j())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("导出图片")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn close",onClick:o[6]||(o[6]=e=>t("close"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("关闭")]),_:1})]),Object(n["createVNode"])(zh,{loading:Object(n["unref"])(f),tip:"正在导出..."},null,8,["loading"])]))}});l("700f");const ty=Yt()(ey,[["__scopeId","data-v-92a8f63e"]]);var ly=ty;const cy={class:"export-json-dialog"},ny={class:"preview"},oy={class:"btns"};var ay=Object(n["defineComponent"])({__name:"ExportJSON",emits:["close"],setup(e,{emit:t}){const{slides:l}=Object(o["c"])(T()),{exportJSON:c}=Rt();return(e,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",cy,[Object(n["createElementVNode"])("div",ny,[Object(n["createElementVNode"])("pre",null,Object(n["toDisplayString"])(Object(n["unref"])(l)),1)]),Object(n["createElementVNode"])("div",oy,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn export",type:"primary",onClick:o[0]||(o[0]=e=>Object(n["unref"])(c)())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("导出 JSON")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn close",onClick:o[1]||(o[1]=e=>t("close"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("关闭")]),_:1})])]))}});l("862c");const ry=Yt()(ay,[["__scopeId","data-v-0cc0995e"]]);var iy=ry;const sy=()=>{const e=document.createElement("iframe");return e.style.width="0",e.style.height="0",e.style.position="absolute",e.style.right="0",e.style.top="0",e.style.border="0",document.body.appendChild(e),e},dy=(e,t,l)=>{const c="<!DOCTYPE html>";let n="";const o=document.styleSheets;if(o)for(const u of o)if(u.cssRules)for(const e of u.cssRules)n+=e.cssText;const{width:a,height:r,margin:i}=l,s=`\n <head>\n <style type="text/css">\n ${n} \n html, body {\n height: auto;\n overflow: auto;\n }\n @media print {\n @page {\n size: ${a+2*i}px ${r+2*i}px;\n margin: ${i}px;\n }\n }\n </style>\n </head>\n `,d="<body>"+t.innerHTML+"</body>";e.open(),e.write(`\n ${c}\n <html>\n ${s}\n ${d}\n </html>\n `),e.close()},uy=(e,t)=>{const l=sy(),c=l.contentWindow;if(!l.contentDocument||!c)return;dy(l.contentDocument,e,t);const n=()=>{c.focus(),c.print()},o=()=>{l.removeEventListener("load",n),c.removeEventListener("afterprint",o),document.body.removeChild(l)};l.addEventListener("load",n),c.addEventListener("afterprint",o)},by=e=>(Object(n["pushScopeId"])("data-v-527855fb"),e=e(),Object(n["popScopeId"])(),e),Oy={class:"export-pdf-dialog"},my={class:"thumbnails-view"},py={class:"configs"},fy={class:"row"},jy=by(()=>Object(n["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),vy={class:"row"},hy=by(()=>Object(n["createElementVNode"])("div",{class:"title"},"每页数量:",-1)),yy={class:"row"},gy=by(()=>Object(n["createElementVNode"])("div",{class:"title"},"边缘留白:",-1)),xy={class:"config-item"},ky=by(()=>Object(n["createElementVNode"])("div",{class:"tip"}," 注意:若打印预览与实际样式不一致,请在弹出的打印窗口中勾选【背景图形】选项。 ",-1)),Cy={class:"btns"};var Ny=Object(n["defineComponent"])({__name:"ExportPDF",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:c}=qu["a"],a=Ci["a"].Option,{slides:r,currentSlide:i,viewportRatio:s}=Object(o["c"])(T()),d=Object(n["ref"])(),u=Object(n["ref"])("all"),b=Object(n["ref"])(1),O=Object(n["ref"])(!0),m=()=>{if(!d.value)return;const e={width:1600,height:"all"===u.value?1600*s.value*b.value:1600*s.value,margin:O.value?50:0};uy(d.value,e)};return(e,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Oy,[Object(n["createElementVNode"])("div",my,[Object(n["createElementVNode"])("div",{class:"thumbnails",ref_key:"pdfThumbnailsRef",ref:d},["current"===u.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Ns,{key:0,class:"thumbnail",slide:Object(n["unref"])(i),size:1600},null,8,["slide"])):(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],{key:1},Object(n["renderList"])(Object(n["unref"])(r),(e,t)=>(Object(n["openBlock"])(),Object(n["createBlock"])(Ns,{class:Object(n["normalizeClass"])(["thumbnail",{"break-page":(t+1)%b.value===0}]),key:e.id,slide:e,size:1600},null,8,["class","slide"]))),128))],512)]),Object(n["createElementVNode"])("div",py,[Object(n["createElementVNode"])("div",fy,[jy,Object(n["createVNode"])(Object(n["unref"])(l),{class:"config-item",value:u.value,"onUpdate:value":o[0]||(o[0]=e=>u.value=e)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"50%"},value:"all"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("全部幻灯片")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"50%"},value:"current"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("当前幻灯片")]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",vy,[hy,Object(n["createVNode"])(Object(n["unref"])(Ci["a"]),{class:"config-item",value:b.value,"onUpdate:value":o[1]||(o[1]=e=>b.value=e)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(a),{value:1},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("1")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(a),{value:2},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("2")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(a),{value:3},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("3")]),_:1})]),_:1},8,["value"])]),Object(n["createElementVNode"])("div",yy,[gy,Object(n["createElementVNode"])("div",xy,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:O.value,"onUpdate:checked":o[2]||(o[2]=e=>O.value=e)},null,8,["checked"])])]),ky]),Object(n["createElementVNode"])("div",Cy,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn export",type:"primary",onClick:o[3]||(o[3]=e=>m())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("打印 / 导出 PDF")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn close",onClick:o[4]||(o[4]=e=>t("close"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("关闭")]),_:1})])]))}});l("7ce8");const Ey=Yt()(Ny,[["__scopeId","data-v-527855fb"]]);var wy=Ey;const Vy=e=>(Object(n["pushScopeId"])("data-v-018847a8"),e=e(),Object(n["popScopeId"])(),e),Iy={class:"export-pptx-dialog"},Sy={class:"configs"},Ly={class:"row"},By=Vy(()=>Object(n["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),_y={key:0,class:"row"},Ty=["data-range"],My={class:"row"},Dy=Vy(()=>Object(n["createElementVNode"])("div",{class:"title"},"覆盖默认母版:",-1)),zy={class:"config-item"},Ay={class:"btns"};var Fy=Object(n["defineComponent"])({__name:"ExportPPTX",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:c}=qu["a"],{slides:a,currentSlide:r}=Object(o["c"])(T()),{exportPPTX:i,exporting:s}=Rt(),d=Object(n["ref"])("all"),u=Object(n["ref"])([1,a.value.length]),b=Object(n["ref"])(!0),O=Object(n["computed"])(()=>"all"===d.value?a.value:"current"===d.value?[r.value]:a.value.filter((e,t)=>{const[l,c]=u.value;return t>=l-1&&t<=c-1}));return(e,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Iy,[Object(n["createElementVNode"])("div",Sy,[Object(n["createElementVNode"])("div",Ly,[By,Object(n["createVNode"])(Object(n["unref"])(l),{class:"config-item",value:d.value,"onUpdate:value":o[0]||(o[0]=e=>d.value=e)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"all"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("全部")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"current"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("当前页")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"custom"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("自定义")]),_:1})]),_:1},8,["value"])]),"custom"===d.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",_y,[Object(n["createElementVNode"])("div",{class:"title","data-range":`${u.value[0]} ~ ${u.value[1]}`},"自定义范围:",8,Ty),Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"config-item",range:"",min:1,max:Object(n["unref"])(a).length,step:1,value:u.value,"onUpdate:value":o[1]||(o[1]=e=>u.value=e)},null,8,["max","value"])])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",My,[Dy,Object(n["createElementVNode"])("div",zy,[Object(n["createVNode"])(Object(n["unref"])(eb["a"]),{checked:b.value,"onUpdate:checked":o[2]||(o[2]=e=>b.value=e)},null,8,["checked"])])])]),Object(n["createElementVNode"])("div",Ay,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn export",type:"primary",onClick:o[3]||(o[3]=e=>Object(n["unref"])(i)(Object(n["unref"])(O),b.value))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("导出 PPTX")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn close",onClick:o[4]||(o[4]=e=>t("close"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("关闭")]),_:1})]),Object(n["createVNode"])(zh,{loading:Object(n["unref"])(s),tip:"正在导出..."},null,8,["loading"])]))}});l("9918");const $y=Yt()(Fy,[["__scopeId","data-v-018847a8"]]);var Ry=$y;const Py=e=>(Object(n["pushScopeId"])("data-v-40c1ae3a"),e=e(),Object(n["popScopeId"])(),e),Hy={class:"export-pptist-dialog"},qy={class:"configs"},Uy={class:"row"},Gy=Py(()=>Object(n["createElementVNode"])("div",{class:"title"},"导出范围:",-1)),Xy={key:0,class:"row"},Yy=["data-range"],Zy=Py(()=>Object(n["createElementVNode"])("div",{class:"tip"}," 提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。 ",-1)),Wy={class:"btns"};var Jy=Object(n["defineComponent"])({__name:"ExportSpecificFile",emits:["close"],setup(e,{emit:t}){const{Group:l,Button:c}=qu["a"],{slides:a,currentSlide:r}=Object(o["c"])(T()),{exportSpecificFile:i}=Rt(),s=Object(n["ref"])("all"),d=Object(n["ref"])([1,a.value.length]),u=Object(n["computed"])(()=>"all"===s.value?a.value:"current"===s.value?[r.value]:a.value.filter((e,t)=>{const[l,c]=d.value;return t>=l-1&&t<=c-1}));return(e,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Hy,[Object(n["createElementVNode"])("div",qy,[Object(n["createElementVNode"])("div",Uy,[Gy,Object(n["createVNode"])(Object(n["unref"])(l),{class:"config-item",value:s.value,"onUpdate:value":o[0]||(o[0]=e=>s.value=e)},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"all"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("全部")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"current"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("当前页")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{style:{width:"33.33%"},value:"custom"},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("自定义")]),_:1})]),_:1},8,["value"])]),"custom"===s.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Xy,[Object(n["createElementVNode"])("div",{class:"title","data-range":`${d.value[0]} ~ ${d.value[1]}`},"自定义范围:",8,Yy),Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"config-item",range:"",min:1,max:Object(n["unref"])(a).length,step:1,value:d.value,"onUpdate:value":o[1]||(o[1]=e=>d.value=e)},null,8,["max","value"])])):Object(n["createCommentVNode"])("",!0),Zy]),Object(n["createElementVNode"])("div",Wy,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn export",type:"primary",onClick:o[2]||(o[2]=e=>Object(n["unref"])(i)(Object(n["unref"])(u)))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("导出 .pptist 文件")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{class:"btn close",onClick:o[3]||(o[3]=e=>t("close"))},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("关闭")]),_:1})])]))}});l("3a1b");const Ky=Yt()(Jy,[["__scopeId","data-v-40c1ae3a"]]);var Qy=Ky;const eg={class:"export-dialog"},tg={class:"tabs"},lg=["onClick"],cg={class:"content"};var ng=Object(n["defineComponent"])({__name:"index",setup(e){const t=z(),{dialogForExport:l}=Object(o["c"])(t),c=t.setDialogForExport,a=[{key:"pptist",label:"导出 pptist 文件"},{key:"pptx",label:"导出 PPTX"},{key:"image",label:"导出图片"},{key:"json",label:"导出 JSON"},{key:"pdf",label:"打印 / 导出 PDF"}],r=Object(n["computed"])(()=>{const e={image:ly,json:iy,pdf:wy,pptx:Ry,pptist:Qy};return e[l.value]||null});return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",eg,[Object(n["createElementVNode"])("div",tg,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(a,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tab",{active:e.key===Object(n["unref"])(l)}]),key:e.key,onClick:t=>Object(n["unref"])(c)(e.key)},Object(n["toDisplayString"])(e.label),11,lg)),64))]),Object(n["createElementVNode"])("div",cg,[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(r)),{onClose:t[0]||(t[0]=e=>Object(n["unref"])(c)(""))},null,32))])]))}});l("d970");const og=Yt()(ng,[["__scopeId","data-v-1f8f1a8b"]]);var ag=og;const rg={class:"title"},ig={class:"content"};var sg=Object(n["defineComponent"])({__name:"MoveablePanel",props:{width:{type:Number,required:!0},height:{type:Number,required:!0},left:{type:Number,default:10},top:{type:Number,default:10},title:{type:String,default:""},moveable:{type:Boolean,default:!0}},emits:["close"],setup(e,{emit:t}){const l=e,c=Object(n["ref"])(0),o=Object(n["ref"])(0);Object(n["onMounted"])(()=>{l.left>=0?c.value=l.left:c.value=document.body.clientWidth+l.left-l.width,l.top>=0?o.value=l.top:o.value=document.body.clientHeight+l.top-l.height});const a=e=>{if(!l.moveable)return;let t=!0;const n=document.body.clientWidth,a=document.body.clientHeight,r=e.pageX,i=e.pageY,s=c.value,d=o.value;document.onmousemove=e=>{if(!t)return;const u=e.pageX-r,b=e.pageY-i;let O=s+u,m=d+b;O<0&&(O=0),m<0&&(m=0),O+l.width>n&&(O=n-l.width),m+l.height>a&&(m=a-l.height),c.value=O,o.value=m},document.onmouseup=()=>{t=!1,document.onmousemove=null,document.onmouseup=null}};return(l,r)=>{const i=Object(n["resolveComponent"])("IconClose");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"moveable-panel",style:Object(n["normalizeStyle"])({width:e.width+"px",height:e.height+"px",left:c.value+"px",top:o.value+"px"})},[e.title?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createElementVNode"])("div",{class:"header",onMousedown:r[1]||(r[1]=e=>a(e))},[Object(n["createElementVNode"])("div",rg,Object(n["toDisplayString"])(e.title),1),Object(n["createElementVNode"])("div",{class:"close-btn",onClick:r[0]||(r[0]=e=>t("close"))},[Object(n["createVNode"])(i)])],32),Object(n["createElementVNode"])("div",ig,[Object(n["renderSlot"])(l.$slots,"default")])],64)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:1,class:"content",onMousedown:r[2]||(r[2]=e=>a(e))},[Object(n["renderSlot"])(l.$slots,"default")],32))],4)}}});l("1406");const dg=Yt()(sg,[["__scopeId","data-v-68252e2c"]]);var ug=dg;const bg=e=>(Object(n["pushScopeId"])("data-v-64f9ccca"),e=e(),Object(n["popScopeId"])(),e),Og={key:0,class:"handler"},mg={class:"btns"},pg={key:0,class:"icon-btns"},fg={class:"element-list"},jg={key:0,class:"group-els"},vg=bg(()=>Object(n["createElementVNode"])("div",{class:"group-title"},"组合",-1)),hg=["onClick","onDblclick"],yg=["id","value","onBlur","onKeydown"],gg={key:1,class:"name"},xg={class:"icons"},kg=["onClick","onDblclick"],Cg=["id","value","onBlur","onKeydown"],Ng={key:1,class:"name"},Eg={class:"icons"};var wg=Object(n["defineComponent"])({__name:"SelectPanel",setup(e){const t=T(),l=z(),{currentSlide:c}=Object(o["c"])(t),{handleElement:a,handleElementId:r,activeElementIdList:i,activeGroupElementId:s,hiddenElementIdList:d}=Object(o["c"])(l),{orderElement:u}=Ue(),b=Object(n["computed"])(()=>{const e=[];for(const t of c.value.elements)if(t.groupId){const l=e[e.length-1];l&&"group"===l.type&&l.id&&l.id===t.groupId?l.elements.push(t):e.push({type:"group",id:t.groupId,elements:[t]})}else e.push(t);return e}),O=(e,t)=>{if(r.value===t)return;if(d.value.includes(t))return;const c=e.elements.map(e=>e.id);l.setActiveElementIdList(c),l.setHandleElementId(t),Object(n["nextTick"])(()=>l.setActiveGroupElementId(t))},m=e=>{r.value!==e&&(d.value.includes(e)||l.setActiveElementIdList([e]))},p=e=>{d.value.includes(e)?l.setHiddenElementIdList(d.value.filter(t=>t!==e)):l.setHiddenElementIdList([...d.value,e]),i.value.includes(e)&&l.setActiveElementIdList([])},f=()=>{const e=c.value.elements.map(e=>e.id),t=d.value.filter(t=>!e.includes(t));l.setHiddenElementIdList(t)},j=()=>{const e=c.value.elements.map(e=>e.id);l.setHiddenElementIdList([...d.value,...e]),i.value.length&&l.setActiveElementIdList([])},v=Object(n["ref"])(""),h=(e,l)=>{const c=e.target.value;t.updateElement({id:l,props:{name:c}}),v.value=""},y=e=>{v.value=e,Object(n["nextTick"])(()=>{const t=document.querySelector("#input-"+e);t.focus()})},g=()=>{l.setSelectPanelState(!1)};return(e,t)=>{const l=Object(n["resolveComponent"])("IconDown"),o=Object(n["resolveComponent"])("IconUp"),r=Object(n["resolveComponent"])("IconPreviewClose"),x=Object(n["resolveComponent"])("IconPreviewOpen");return Object(n["openBlock"])(),Object(n["createBlock"])(ug,{class:"select-panel",width:200,height:360,title:`选择(${Object(n["unref"])(i).length}/${Object(n["unref"])(c).elements.length}`,left:-270,top:90,onClose:t[4]||(t[4]=e=>g())},{default:Object(n["withCtx"])(()=>[Object(n["unref"])(b).length?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Og,[Object(n["createElementVNode"])("div",mg,[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{size:"small",style:{"margin-right":"5px"},onClick:t[0]||(t[0]=e=>f())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("全部显示")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{size:"small",onClick:t[1]||(t[1]=e=>j())},{default:Object(n["withCtx"])(()=>[Object(n["createTextVNode"])("全部隐藏")]),_:1})]),Object(n["unref"])(a)?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",pg,[Object(n["createVNode"])(l,{class:"icon-btn",onClick:t[2]||(t[2]=e=>Object(n["unref"])(u)(Object(n["unref"])(a),Object(n["unref"])(W).UP))}),Object(n["createVNode"])(o,{class:"icon-btn",onClick:t[3]||(t[3]=e=>Object(n["unref"])(u)(Object(n["unref"])(a),Object(n["unref"])(W).DOWN))})])):Object(n["createCommentVNode"])("",!0)])):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",fg,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(b),e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:e.id},["group"===e.type?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",jg,[vg,(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.elements,t=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["item",{active:Object(n["unref"])(i).includes(t.id),"group-active":Object(n["unref"])(s).includes(t.id)}]),key:t.id,onClick:l=>O(e,t.id),onDblclick:e=>y(t.id)},[v.value===t.id?(Object(n["openBlock"])(),Object(n["createElementBlock"])("input",{key:0,id:"input-"+t.id,value:t.name||Object(n["unref"])(El)[t.type],class:"input",type:"text",onBlur:e=>h(e,t.id),onKeydown:Object(n["withKeys"])(e=>h(e,t.id),["enter"])},null,40,yg)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",gg,Object(n["toDisplayString"])(t.name||Object(n["unref"])(El)[t.type]),1)),Object(n["createElementVNode"])("div",xg,[Object(n["unref"])(d).includes(t.id)?(Object(n["openBlock"])(),Object(n["createBlock"])(r,{key:0,style:{"font-size":"17px"},onClick:Object(n["withModifiers"])(e=>p(t.id),["stop"])},null,8,["onClick"])):(Object(n["openBlock"])(),Object(n["createBlock"])(x,{key:1,style:{"font-size":"17px"},onClick:Object(n["withModifiers"])(e=>p(t.id),["stop"])},null,8,["onClick"]))])],42,hg))),128))])):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:1,class:Object(n["normalizeClass"])(["item",{active:Object(n["unref"])(i).includes(e.id)}]),onClick:t=>m(e.id),onDblclick:t=>y(e.id)},[v.value===e.id?(Object(n["openBlock"])(),Object(n["createElementBlock"])("input",{key:0,id:"input-"+e.id,value:e.name||Object(n["unref"])(El)[e.type],class:"input",type:"text",onBlur:t=>h(t,e.id),onKeydown:Object(n["withKeys"])(t=>h(t,e.id),["enter"])},null,40,Cg)):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Ng,Object(n["toDisplayString"])(e.name||Object(n["unref"])(El)[e.type]),1)),Object(n["createElementVNode"])("div",Eg,[Object(n["unref"])(d).includes(e.id)?(Object(n["openBlock"])(),Object(n["createBlock"])(r,{key:0,style:{"font-size":"17px"},onClick:Object(n["withModifiers"])(t=>p(e.id),["stop"])},null,8,["onClick"])):(Object(n["openBlock"])(),Object(n["createBlock"])(x,{key:1,style:{"font-size":"17px"},onClick:Object(n["withModifiers"])(t=>p(e.id),["stop"])},null,8,["onClick"]))])],42,kg))],64))),128))])]),_:1},8,["title"])}}});l("df7d");const Vg=Yt()(wg,[["__scopeId","data-v-64f9ccca"]]);var Ig=Vg;const Sg={class:"pptist-editor"},Lg={class:"layout-content"},Bg={class:"layout-content-center"};var _g=Object(n["defineComponent"])({__name:"index",setup(e){const t=z(),{dialogForExport:l,showSelectPanel:c}=Object(o["c"])(t),a=()=>t.setDialogForExport(""),r=Object(n["ref"])(40);return Je(),Ke(),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,[Object(n["createElementVNode"])("div",Sg,[Object(n["createVNode"])(jl,{class:"layout-header"}),Object(n["createElementVNode"])("div",Lg,[Object(n["createVNode"])(Hu,{class:"layout-content-left"}),Object(n["createElementVNode"])("div",Bg,[Object(n["createVNode"])(Vu,{class:"center-top"}),Object(n["createVNode"])($s,{class:"center-body",style:Object(n["normalizeStyle"])({height:`calc(100% - ${r.value+40}px)`})},null,8,["style"]),Object(n["createVNode"])(Ih,{class:"center-bottom",height:r.value,"onUpdate:height":t[0]||(t[0]=e=>r.value=e),style:Object(n["normalizeStyle"])({height:r.value+"px"})},null,8,["height","style"])]),Object(n["createVNode"])(Ch,{class:"layout-content-right"})])]),Object(n["unref"])(c)?(Object(n["openBlock"])(),Object(n["createBlock"])(Ig,{key:0})):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])(Object(n["unref"])(le["a"]),{visible:!!Object(n["unref"])(l),footer:null,centered:"",closable:!1,width:680,destroyOnClose:"",onCancel:t[1]||(t[1]=e=>a())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(ag)]),_:1},8,["visible"])],64))}});l("a785");const Tg=Yt()(_g,[["__scopeId","data-v-ed562e98"]]);var Mg=Tg,Dg=()=>{const e=T(),{slides:t,slideIndex:l,formatedAnimations:c}=Object(o["c"])(e),a=Object(n["ref"])(0),r=Object(n["ref"])(!1),i=Object(n["ref"])(l.value),s=()=>{if(r.value)return;const{animations:e,autoNext:t}=c.value[a.value];a.value+=1,r.value=!0;let l=0;for(const c of e){const n=document.querySelector(`#screen-element-${c.elId} [class^=base-element-]`);if(!n){l+=1;continue}const o=`${zj}${c.effect}`;n.style.removeProperty("--animate-duration");for(const e of n.classList)-1!==e.indexOf(zj)&&n.classList.remove(e,zj+"animated");n.style.setProperty("--animate-duration",c.duration+"ms"),n.classList.add(o,zj+"animated");const a=()=>{"out"!==c.type&&(n.style.removeProperty("--animate-duration"),n.classList.remove(o,zj+"animated")),l+=1,l===e.length&&(r.value=!1,t&&s())};n.addEventListener("animationend",a,{once:!0})}},d=()=>{a.value-=1;const{animations:e}=c.value[a.value];for(const t of e){const e=document.querySelector(`#screen-element-${t.elId} [class^=base-element-]`);if(e){e.style.removeProperty("--animate-duration");for(const t of e.classList)-1!==t.indexOf(zj)&&e.classList.remove(t,zj+"animated")}}e.every(e=>"attention"===e.type)&&m()},u=Object(n["ref"])(0),b=()=>{u.value&&(clearInterval(u.value),u.value=0)};Object(n["onUnmounted"])(b);const O=Object(S["throttle"])((function(e){ne["a"].success(e)}),1e3,{leading:!0,trailing:!1}),m=()=>{c.value.length&&a.value>0?d():l.value>0?(e.updateSlideIndex(l.value-1),l.value<i.value?(a.value=0,i.value=l.value):a.value=c.value.length):O("已经是第一页了"),r.value=!1},p=()=>{c.value.length&&a.value<c.value.length?s():l.value<t.value.length-1?(e.updateSlideIndex(l.value+1),a.value=0,r.value=!1):(O("已经是最后一页了"),b(),r.value=!1)},f=()=>{b(),ne["a"].success("开始自动放映"),u.value=setInterval(p,2500)},j=Object(S["throttle"])((function(e){e.deltaY<0?m():e.deltaY>0&&p()}),500,{leading:!0,trailing:!1}),v=Object(n["ref"])(null),h=e=>{v.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},y=e=>{if(!v.value)return;const t=Math.abs(v.value.x-e.changedTouches[0].pageX),l=e.changedTouches[0].pageY-v.value.y;Math.abs(l)>t&&Math.abs(l)>50&&(v.value=null,l>0?m():p())},g=e=>{const t=e.key.toUpperCase();t===te.UP||t===te.LEFT||t===te.PAGEUP?m():t!==te.DOWN&&t!==te.RIGHT&&t!==te.SPACE&&t!==te.ENTER&&t!==te.PAGEDOWN||p()};Object(n["onMounted"])(()=>document.addEventListener("keydown",g)),Object(n["onUnmounted"])(()=>document.removeEventListener("keydown",g));const x=()=>{e.updateSlideIndex(l.value-1),a.value=0},k=()=>{e.updateSlideIndex(l.value+1),a.value=0},C=t=>{e.updateSlideIndex(t),a.value=0},N=l=>{const c=t.value.findIndex(e=>e.id===l);-1!==c&&(e.updateSlideIndex(c),a.value=0)};return{autoPlayTimer:u,autoPlay:f,closeAutoPlay:b,mousewheelListener:j,touchStartListener:h,touchEndListener:y,turnPrevSlide:x,turnNextSlide:k,turnSlideToIndex:C,turnSlideToId:N,execPrev:m,execNext:p,animationIndex:a}},zg=e=>{const t=T(),{viewportRatio:l}=Object(o["c"])(t),c=Object(n["ref"])(0),a=Object(n["ref"])(0),r=()=>{const t=(null===e||void 0===e?void 0:e.value)||document.body,n=t.clientWidth,o=t.clientHeight;let r,i;o/n===l.value?(r=n,i=o):o/n>l.value?(r=n,i=n*l.value):(r=o/l.value,i=o),c.value=r,a.value=i};return Object(n["onMounted"])(()=>{r(),window.addEventListener("resize",r)}),Object(n["onUnmounted"])(()=>{window.removeEventListener("resize",r)}),{slideWidth:c,slideHeight:a}},Ag=()=>{const e=Object(n["ref"])(!0),t=Object(n["ref"])(!0),{exitScreening:l}=Ze(),c=()=>{e.value=Ye(),!e.value&&t.value&&l(),t.value=!0};Object(n["onMounted"])(()=>{e.value=Ye(),document.addEventListener("fullscreenchange",c),document.addEventListener("webkitfullscreenchange",c)}),Object(n["onUnmounted"])(()=>{document.removeEventListener("fullscreenchange",c),document.removeEventListener("webkitfullscreenchange",c)});const o=()=>{e.value&&(t.value=!1,Xe())};return{fullscreenState:e,manualExitFullscreen:o}},Fg=Object(n["defineComponent"])({__name:"ScreenChartElement",props:{elementInfo:{type:Object,required:!0}},setup(e){return(t,l)=>(Object(n["openBlock"])(),Object(n["createBlock"])(Yi,{class:"screen-element-chart",elementInfo:e.elementInfo},null,8,["elementInfo"]))}});const $g=Fg;var Rg=$g;const Pg={class:"element-content"};var Hg=Object(n["defineComponent"])({__name:"ScreenVideoElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const{currentSlide:t}=Object(o["c"])(T()),l=Object(n["inject"])(vl)||Object(n["ref"])(1),c=Object(n["inject"])(hl)||Object(n["ref"])(""),a=Object(n["computed"])(()=>t.value.id===c.value);return(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"screen-element-video",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",Pg,[Object(n["unref"])(a)?(Object(n["openBlock"])(),Object(n["createBlock"])(fa,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,scale:Object(n["unref"])(l)},null,8,["width","height","src","poster","scale"])):Object(n["createCommentVNode"])("",!0)])],4)],4))}});l("7a78");const qg=Yt()(Hg,[["__scopeId","data-v-76457308"]]);var Ug=qg;const Gg={class:"element-content"};var Xg=Object(n["defineComponent"])({__name:"ScreenAudioElement",props:{elementInfo:{type:Object,required:!0}},setup(e){const t=e,{viewportRatio:l,currentSlide:c}=Object(o["c"])(T()),a=Object(n["inject"])(vl)||Object(n["ref"])(1),r=Object(n["inject"])(hl)||Object(n["ref"])(""),i=Object(n["computed"])(()=>c.value.id===r.value),s=Object(n["computed"])(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),d=Object(n["computed"])(()=>{const e=Ve,c=Ve*l.value,n=280/a.value,o=50/a.value,r=t.elementInfo.width,i=t.elementInfo.height,s=t.elementInfo.left,d=t.elementInfo.top;let u=0,b=i;return s+n>=e&&(u=r-n),d+i+o>=c&&(b=-o),{left:u+"px",top:b+"px"}}),u=Object(n["ref"])(),b=()=>{u.value&&u.value.toggle()};return(t,l)=>{const c=Object(n["resolveComponent"])("IconVolumeNotice");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"screen-element-audio",style:Object(n["normalizeStyle"])({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[Object(n["createElementVNode"])("div",{class:"rotate-wrapper",style:Object(n["normalizeStyle"])({transform:`rotate(${e.elementInfo.rotate}deg)`})},[Object(n["createElementVNode"])("div",Gg,[Object(n["createVNode"])(c,{class:"audio-icon",style:Object(n["normalizeStyle"])({fontSize:Object(n["unref"])(s),color:e.elementInfo.color}),onClick:l[0]||(l[0]=e=>b())},null,8,["style"]),Object(n["unref"])(i)?(Object(n["openBlock"])(),Object(n["createBlock"])(za,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:u,style:Object(n["normalizeStyle"])({...Object(n["unref"])(d)}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:Object(n["unref"])(a)},null,8,["style","src","loop","autoplay","scale"])):Object(n["createCommentVNode"])("",!0)])],4)],4)}}});l("3010");const Yg=Yt()(Xg,[["__scopeId","data-v-1172b8ee"]]);var Zg=Yg;const Wg=["id","title"];var Jg=Object(n["defineComponent"])({__name:"ScreenElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>{const e={[Se.IMAGE]:Vi,[Se.TEXT]:Bi,[Se.SHAPE]:$i,[Se.LINE]:Ui,[Se.CHART]:Rg,[Se.TABLE]:ns,[Se.LATEX]:us,[Se.VIDEO]:Ug,[Se.AUDIO]:Zg};return e[t.elementInfo.type]||null}),{formatedAnimations:c,theme:a}=Object(o["c"])(T()),r=Object(n["computed"])(()=>{const e=c.value.findIndex(e=>{const l=e.animations.map(e=>e.elId);return l.includes(t.elementInfo.id)});if(-1===e)return!1;if(e<t.animationIndex)return!1;const l=c.value[e].animations.find(e=>e.elId===t.elementInfo.id);return"in"===(null===l||void 0===l?void 0:l.type)}),i=()=>{const e=t.elementInfo.link;e&&("web"===e.type?(t.manualExitFullscreen(),window.open(e.target)):"slide"===e.type&&t.turnSlideToId(e.target))};return(t,c)=>{var o;return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["screen-element",{link:e.elementInfo.link}]),id:"screen-element-"+e.elementInfo.id,style:Object(n["normalizeStyle"])({zIndex:e.elementIndex,color:Object(n["unref"])(a).fontColor,fontFamily:Object(n["unref"])(a).fontName,visibility:Object(n["unref"])(r)?"hidden":"visible"}),title:(null===(o=e.elementInfo.link)||void 0===o?void 0:o.target)||"",onClick:c[0]||(c[0]=e=>i())},[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(l)),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,Wg)}}});l("d2ee");const Kg=Yt()(Jg,[["__scopeId","data-v-a15cc1d8"]]);var Qg=Kg,ex=Object(n["defineComponent"])({__name:"ScreenSlide",props:{slide:{type:Object,required:!0},scale:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,{viewportRatio:l}=Object(o["c"])(T()),c=Object(n["computed"])(()=>t.slide.background),{backgroundStyle:a}=Qa(c),r=Object(n["computed"])(()=>t.slide.id);return Object(n["provide"])(hl,r),(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"screen-slide",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(Ve)+"px",height:Object(n["unref"])(Ve)*Object(n["unref"])(l)+"px",transform:`scale(${e.scale})`})},[Object(n["createElementVNode"])("div",{class:"background",style:Object(n["normalizeStyle"])({...Object(n["unref"])(a)})},null,4),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.slide.elements,(t,l)=>(Object(n["openBlock"])(),Object(n["createBlock"])(Qg,{key:t.id,elementInfo:t,elementIndex:l+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"]))),128))],4))}});l("a060");const tx=Yt()(ex,[["__scopeId","data-v-7cf7f9e7"]]);var lx=tx;const cx={class:"screen-slide-list"};var nx=Object(n["defineComponent"])({__name:"ScreenSlideList",props:{slideWidth:{type:Number,required:!0},slideHeight:{type:Number,required:!0},animationIndex:{type:Number,required:!0},turnSlideToId:{type:Function,required:!0},manualExitFullscreen:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:c,currentSlide:a}=Object(o["c"])(T()),r=Object(n["computed"])(()=>t.slideWidth/Ve);return Object(n["provide"])(vl,r),(t,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",cx,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(l),(t,l)=>{var o;return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["slide-item","turning-mode-"+(t.turningMode||"slideY"),{current:l===Object(n["unref"])(c),before:l<Object(n["unref"])(c),after:l>Object(n["unref"])(c),hide:(l===Object(n["unref"])(c)-1||l===Object(n["unref"])(c)+1)&&t.turningMode!==Object(n["unref"])(a).turningMode}]),key:t.id},[Math.abs(Object(n["unref"])(c)-l)<2||null!==(o=t.animations)&&void 0!==o&&o.length?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"slide-content",style:Object(n["normalizeStyle"])({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[Object(n["createVNode"])(lx,{slide:t,scale:Object(n["unref"])(r),animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):Object(n["createCommentVNode"])("",!0)],2)}),128))]))}});l("9557");const ox=Yt()(nx,[["__scopeId","data-v-77a3e620"]]);var ax=ox;const rx={class:"slide-thumbnails"},ix={class:"return-button"},sx={class:"slide-thumbnails-content"},dx=["onClick"];var ux=Object(n["defineComponent"])({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function,required:!0}},emits:["close"],setup(e,{emit:t}){const l=e,{slides:c,slideIndex:a}=Object(o["c"])(T()),{slidesLoadLimit:r}=Iu(),i=e=>{l.turnSlideToIndex(e),t("close")};return(e,l)=>{const o=Object(n["resolveComponent"])("IconArrowCircleLeft");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",rx,[Object(n["createElementVNode"])("div",ix,[Object(n["createVNode"])(o,{class:"icon",onClick:l[0]||(l[0]=e=>t("close"))})]),Object(n["createElementVNode"])("div",sx,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(c),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["thumbnail",{active:t===Object(n["unref"])(a)}]),key:e.id,onClick:e=>i(t)},[Object(n["createVNode"])(Ns,{slide:e,size:150,visible:t<Object(n["unref"])(r)},null,8,["slide","visible"])],10,dx))),128))])])}}});l("2803");const bx=Yt()(ux,[["__scopeId","data-v-b7c6c0cc"]]);var Ox=bx;const mx={key:0,class:"blackboard"};var px=Object(n["defineComponent"])({__name:"WritingBoard",props:{color:{type:String,default:"#ffcc00"},model:{type:String,default:"pen"},blackboard:{type:Boolean,default:!1},penSize:{type:Number,default:6},markSize:{type:Number,default:24},rubberSize:{type:Number,default:80}},emits:["end"],setup(e,{expose:t,emit:l}){const c=e;let o=null;const a=Object(n["ref"])(),r=Object(n["ref"])();let i={x:0,y:0},s=!1,d=0,u=-1;const b=Object(n["ref"])({x:0,y:0}),O=Object(n["ref"])(!1),m=Object(n["ref"])(0),p=Object(n["ref"])(0),f=Object(n["computed"])(()=>r.value?m.value/r.value.width:1),j=Object(n["computed"])(()=>r.value?p.value/r.value.height:1),v=()=>{a.value&&(m.value=a.value.clientWidth,p.value=a.value.clientHeight)},h=new ResizeObserver(v);Object(n["onMounted"])(()=>{a.value&&h.observe(a.value)}),Object(n["onUnmounted"])(()=>{a.value&&h.unobserve(a.value)});const y=()=>{r.value&&a.value&&(o=r.value.getContext("2d"),o&&(r.value.width=a.value.clientWidth,r.value.height=a.value.clientHeight,o.lineCap="round",o.lineJoin="round"))};Object(n["onMounted"])(y);const g=()=>{o&&("mark"===c.model?(o.globalCompositeOperation="xor",o.globalAlpha=.5):"pen"===c.model&&(o.globalCompositeOperation="source-over",o.globalAlpha=1))};Object(n["watch"])(()=>c.model,g);const x=(e,t,l)=>{if(!o)return;const n=i.x,a=i.y;o.lineWidth=l,o.strokeStyle=c.color,o.beginPath(),o.moveTo(n,a),o.lineTo(e,t),o.stroke(),o.closePath()},k=(e,t)=>{if(!o||!r.value)return;const l=i.x,n=i.y,a=c.rubberSize/2,s=a*Math.sin(Math.atan((t-n)/(e-l))),d=a*Math.cos(Math.atan((t-n)/(e-l))),u=[l+s,n-d],b=[l-s,n+d],O=[e+s,t-d],m=[e-s,t+d];o.save(),o.beginPath(),o.arc(e,t,a,0,2*Math.PI),o.clip(),o.clearRect(0,0,r.value.width,r.value.height),o.restore(),o.save(),o.beginPath(),o.moveTo(...u),o.lineTo(...O),o.lineTo(...m),o.lineTo(...b),o.closePath(),o.clip(),o.clearRect(0,0,r.value.width,r.value.height),o.restore()},C=(e,t)=>{const l=i.x,c=i.y;return Math.sqrt((e-l)*(e-l)+(t-c)*(t-c))},N=(e,t)=>{const l=10,n=.1,o=c.penSize,a=3,r=e/t;let i;return i=r<=n?o:r>=l?a:o-r/l*o,-1===u?i:1*i/3+2*u/3},E=(e,t)=>{const l=(new Date).getTime();if("pen"===c.model){const c=C(e,t),n=l-d,o=N(c,n);x(e,t,o),u=o}else"mark"===c.model?x(e,t,c.markSize):k(e,t);i={x:e,y:t},d=(new Date).getTime()},w=e=>{if(!r.value)return[0,0];const t=e instanceof MouseEvent?e:e.changedTouches[0],l=r.value.getBoundingClientRect(),c=t.pageX-l.x,n=t.pageY-l.y;return[c,n]},V=e=>{const[t,l]=w(e),c=t/f.value,n=l/j.value;s=!0,i={x:c,y:n},d=(new Date).getTime(),e instanceof MouseEvent||(b.value={x:t,y:l},O.value=!0)},I=e=>{const[t,l]=w(e),c=t/f.value,n=l/j.value;b.value={x:t,y:l},s&&E(c,n)},S=()=>{s&&(s=!1,l("end"))},L=()=>{o&&r.value&&(o.clearRect(0,0,r.value.width,r.value.height),l("end"))},B=()=>{var e;return null===(e=r.value)||void 0===e?void 0:e.toDataURL()},_=e=>{if(o&&r.value&&(o.clearRect(0,0,r.value.width,r.value.height),e)){o.globalCompositeOperation="source-over",o.globalAlpha=1;const t=new Image;t.src=e,t.onload=()=>{o.drawImage(t,0,0),g()}}};return t({clearCanvas:L,getImageDataURL:B,setImageDataURL:_}),(t,l)=>{const c=Object(n["resolveComponent"])("IconWrite"),o=Object(n["resolveComponent"])("IconHighLight");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"writing-board",ref_key:"writingBoardRef",ref:a},[e.blackboard?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",mx)):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("canvas",{class:"canvas",ref_key:"canvasRef",ref:r,style:Object(n["normalizeStyle"])({width:m.value+"px",height:p.value+"px"}),onMousedown:l[0]||(l[0]=e=>V(e)),onMousemove:l[1]||(l[1]=e=>I(e)),onMouseup:l[2]||(l[2]=e=>S()),onTouchstart:l[3]||(l[3]=e=>V(e)),onTouchmove:l[4]||(l[4]=e=>I(e)),onTouchend:l[5]||(l[5]=e=>{S(),O.value=!1}),onMouseleave:l[6]||(l[6]=e=>{S(),O.value=!1}),onMouseenter:l[7]||(l[7]=e=>O.value=!0)},null,36),O.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:1},["eraser"===e.model?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"eraser",style:Object(n["normalizeStyle"])({left:b.value.x-e.rubberSize/2+"px",top:b.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):Object(n["createCommentVNode"])("",!0),"pen"===e.model?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:1,class:"pen",style:Object(n["normalizeStyle"])({left:b.value.x-e.penSize/2+"px",top:b.value.y-6*e.penSize+e.penSize/2+"px",color:e.color})},["pen"===e.model?(Object(n["openBlock"])(),Object(n["createBlock"])(c,{key:0,class:"icon",size:6*e.penSize},null,8,["size"])):Object(n["createCommentVNode"])("",!0)],4)):Object(n["createCommentVNode"])("",!0),"mark"===e.model?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:2,class:"pen",style:Object(n["normalizeStyle"])({left:b.value.x-e.markSize/2+"px",top:b.value.y+"px",color:e.color})},["mark"===e.model?(Object(n["openBlock"])(),Object(n["createBlock"])(o,{key:0,class:"icon",size:1.5*e.markSize},null,8,["size"])):Object(n["createCommentVNode"])("",!0)],4)):Object(n["createCommentVNode"])("",!0)],64)):Object(n["createCommentVNode"])("",!0)],512)}}});l("b9ba");const fx=Yt()(px,[["__scopeId","data-v-3e9669a9"]]);var jx=fx;const vx=e=>(Object(n["pushScopeId"])("data-v-52a2a3a6"),e=e(),Object(n["popScopeId"])(),e),hx={class:"writing-board-tool"},yx={class:"tool-content"},gx={class:"size"},xx=vx(()=>Object(n["createElementVNode"])("div",{class:"label"},"墨迹粗细:",-1)),kx={class:"size"},Cx=vx(()=>Object(n["createElementVNode"])("div",{class:"label"},"墨迹粗细:",-1)),Nx={class:"size"},Ex=vx(()=>Object(n["createElementVNode"])("div",{class:"label"},"橡皮大小:",-1)),wx={class:"colors"},Vx=["onClick"];var Ix=Object(n["defineComponent"])({__name:"WritingBoardTool",props:{slideWidth:{type:Number,required:!0},slideHeight:{type:Number,required:!0},left:{type:Number,default:-5},top:{type:Number,default:-5}},emits:["close"],setup(e,{emit:t}){const l=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],{currentSlide:c}=Object(o["c"])(T()),a=Object(n["ref"])(),r=Object(n["ref"])("#e2534d"),i=Object(n["ref"])("pen"),s=Object(n["ref"])(!1),d=Object(n["ref"])(""),u=Object(n["ref"])(6),b=Object(n["ref"])(24),O=Object(n["ref"])(80),m=e=>{i.value===e?d.value=d.value===e?"":e:(d.value&&(d.value=""),i.value=e)},p=()=>{a.value.clearCanvas()},f=e=>{"eraser"===i.value&&(i.value="pen"),r.value=e},j=()=>{t("close")};Object(n["watch"])(c,()=>{q.writingBoardImgs.where("id").equals(c.value.id).toArray().then(e=>{const t=e[0];a.value.setImageDataURL((null===t||void 0===t?void 0:t.dataURL)||"")})},{immediate:!0});const v=()=>{const e=a.value.getImageDataURL();q.writingBoardImgs.where("id").equals(c.value.id).toArray().then(t=>{const l=t[0];l?q.writingBoardImgs.update(l,{dataURL:e}):q.writingBoardImgs.add({id:c.value.id,dataURL:e})})};return(t,c)=>{const o=Object(n["resolveComponent"])("IconWrite"),h=Object(n["resolveComponent"])("IconHighLight"),y=Object(n["resolveComponent"])("IconErase"),g=Object(n["resolveComponent"])("IconClear"),x=Object(n["resolveComponent"])("IconFill"),k=Object(n["resolveComponent"])("IconClose");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",hx,[Object(n["createElementVNode"])("div",{class:"writing-board-wrap",style:Object(n["normalizeStyle"])({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[Object(n["createVNode"])(jx,{ref_key:"writingBoardRef",ref:a,color:r.value,blackboard:s.value,model:i.value,penSize:u.value,markSize:b.value,rubberSize:O.value,onEnd:c[0]||(c[0]=e=>v())},null,8,["color","blackboard","model","penSize","markSize","rubberSize"])],4),Object(n["createVNode"])(ug,{class:"tools-panel",width:520,height:50,left:e.left,top:e.top,moveable:""===d.value},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:"tools",onMousedown:c[10]||(c[10]=Object(n["withModifiers"])(()=>{},["stop"]))},[Object(n["createElementVNode"])("div",yx,[Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:"pen"===d.value},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",gx,[xx,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"size-slider",min:4,max:10,step:2,value:u.value,"onUpdate:value":c[1]||(c[1]=e=>u.value=e)},null,8,["value"])])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"画笔"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["btn",{active:"pen"===i.value}]),onClick:c[2]||(c[2]=e=>m("pen"))},[Object(n["createVNode"])(o,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:"mark"===d.value},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",kx,[Cx,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"size-slider",min:16,max:40,step:4,value:b.value,"onUpdate:value":c[3]||(c[3]=e=>b.value=e)},null,8,["value"])])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"荧光笔"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["btn",{active:"mark"===i.value}]),onClick:c[4]||(c[4]=e=>m("mark"))},[Object(n["createVNode"])(h,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(Rs["a"]),{trigger:"click",visible:"eraser"===d.value},{content:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",Nx,[Ex,Object(n["createVNode"])(Object(n["unref"])(Gu["a"]),{class:"size-slider",min:20,max:200,step:20,value:O.value,"onUpdate:value":c[5]||(c[5]=e=>O.value=e)},null,8,["value"])])]),default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"橡皮擦"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["btn",{active:"eraser"===i.value}]),onClick:c[6]||(c[6]=e=>m("eraser"))},[Object(n["createVNode"])(y,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"])]),_:1},8,["visible"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"清除墨迹"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:"btn",onClick:c[7]||(c[7]=e=>p())},[Object(n["createVNode"])(g,{class:"icon"})])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"黑板"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["btn",{active:s.value}]),onClick:c[8]||(c[8]=e=>s.value=!s.value)},[Object(n["createVNode"])(x,{class:"icon"})],2)]),_:1},8,["mouseEnterDelay"]),Object(n["createElementVNode"])("div",wx,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(l,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["color",{active:e===r.value}]),key:e,style:Object(n["normalizeStyle"])({backgroundColor:e}),onClick:t=>f(e)},null,14,Vx)),64))])]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"关闭画笔"},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",{class:"btn",onClick:c[9]||(c[9]=e=>j())},[Object(n["createVNode"])(k,{class:"icon"})])]),_:1},8,["mouseEnterDelay"])],32)]),_:1},8,["left","top","moveable"])])}}});l("399d");const Sx=Yt()(Ix,[["__scopeId","data-v-52a2a3a6"]]);var Lx=Sx;const Bx=e=>(Object(n["pushScopeId"])("data-v-5a82de11"),e=e(),Object(n["popScopeId"])(),e),_x={class:"header"},Tx={class:"content"},Mx={class:"timer"},Dx=["value","disabled"],zx=Bx(()=>Object(n["createElementVNode"])("div",{class:"colon"},":",-1)),Ax={class:"timer"},Fx=["value","disabled"];var $x=Object(n["defineComponent"])({__name:"CountdownTimer",props:{left:{type:Number,default:5},top:{type:Number,default:5}},emits:["close"],setup(e,{emit:t}){const l=Object(n["ref"])(null),c=Object(n["ref"])(!1),o=Object(n["ref"])(!1),a=Object(n["ref"])(0),r=Object(n["computed"])(()=>Math.floor(a.value/60)),i=Object(n["computed"])(()=>a.value%60),s=Object(n["computed"])(()=>!o.value||c.value),d=()=>{l.value&&clearInterval(l.value)};Object(n["onUnmounted"])(d);const u=()=>{d(),c.value=!1},b=()=>{d(),c.value=!1,o.value?a.value=600:a.value=0},O=()=>{d(),o.value?l.value=setInterval(()=>{a.value=a.value-1,a.value<=0&&b()},1e3):l.value=setInterval(()=>{a.value=a.value+1,a.value>36e3&&u()},1e3),c.value=!0},m=()=>{c.value?u():O()},p=()=>{o.value=!o.value,b()},f=(e,t)=>{const l=e.target;let c=l.value;const n=/^(\d)+$/.test(c);n?("second"===t&&+c>=60&&(c="59"),a.value="minute"===t?60*+c+i.value:+c+60*r.value):l.value=Y("minute"===t?r.value:i.value,2)};return(l,a)=>{const d=Object(n["resolveComponent"])("IconClose");return Object(n["openBlock"])(),Object(n["createBlock"])(ug,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:Object(n["withCtx"])(()=>[Object(n["createElementVNode"])("div",_x,[Object(n["createElementVNode"])("span",{class:"text-btn",onClick:a[0]||(a[0]=e=>m())},Object(n["toDisplayString"])(c.value?"暂停":"开始"),1),Object(n["createElementVNode"])("span",{class:"text-btn",onClick:a[1]||(a[1]=e=>b())},"重置"),Object(n["createElementVNode"])("span",{class:Object(n["normalizeClass"])(["text-btn",{active:o.value}]),onClick:a[2]||(a[2]=e=>p())},"倒计时",2)]),Object(n["createElementVNode"])("div",Tx,[Object(n["createElementVNode"])("div",Mx,[Object(n["createElementVNode"])("input",{type:"text",value:Object(n["unref"])(Y)(Object(n["unref"])(r),2),maxlength:3,disabled:Object(n["unref"])(s),onMousedown:a[3]||(a[3]=Object(n["withModifiers"])(()=>{},["stop"])),onBlur:a[4]||(a[4]=e=>f(e,"minute")),onKeydown:[a[5]||(a[5]=Object(n["withModifiers"])(()=>{},["stop"])),a[6]||(a[6]=Object(n["withKeys"])(Object(n["withModifiers"])(e=>f(e,"minute"),["stop"]),["enter"]))]},null,40,Dx)]),zx,Object(n["createElementVNode"])("div",Ax,[Object(n["createElementVNode"])("input",{type:"text",value:Object(n["unref"])(Y)(Object(n["unref"])(i),2),maxlength:3,disabled:Object(n["unref"])(s),onMousedown:a[7]||(a[7]=Object(n["withModifiers"])(()=>{},["stop"])),onBlur:a[8]||(a[8]=e=>f(e,"second")),onKeydown:[a[9]||(a[9]=Object(n["withModifiers"])(()=>{},["stop"])),a[10]||(a[10]=Object(n["withKeys"])(Object(n["withModifiers"])(e=>f(e,"second"),["stop"]),["enter"]))]},null,40,Fx)])]),Object(n["createElementVNode"])("div",{class:"close-btn",onClick:a[11]||(a[11]=e=>t("close"))},[Object(n["createVNode"])(d,{class:"icon"})])]),_:1},8,["left","top"])}}});l("a874");const Rx=Yt()($x,[["__scopeId","data-v-5a82de11"]]);var Px=Rx;const Hx={class:"tools-left"},qx={class:"content"};var Ux=Object(n["defineComponent"])({__name:"BaseView",props:{changeViewMode:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:c}=Object(o["c"])(T()),{autoPlayTimer:a,autoPlay:r,closeAutoPlay:i,mousewheelListener:s,touchStartListener:d,touchEndListener:u,turnPrevSlide:b,turnNextSlide:O,turnSlideToIndex:m,turnSlideToId:p,execPrev:f,execNext:j,animationIndex:v}=Dg(),{slideWidth:h,slideHeight:y}=zg(),{exitScreening:g}=Ze(),{fullscreenState:x,manualExitFullscreen:k}=Ag(),C=Object(n["ref"])(!1),N=Object(n["ref"])(!1),E=Object(n["ref"])(!1),w=Object(n["ref"])(!1),V=Object(n["ref"])(!1),I=()=>[{text:"上一页",subText:"↑ ←",disable:c.value<=0,handler:()=>b()},{text:"下一页",subText:"↓ →",disable:c.value>=l.value.length-1,handler:()=>O()},{text:"第一页",disable:0===c.value,handler:()=>m(0)},{text:"最后一页",disable:c.value===l.value.length-1,handler:()=>m(l.value.length-1)},{divider:!0},{text:"显示工具栏",handler:()=>C.value=!0},{text:"查看所有幻灯片",handler:()=>w.value=!0},{text:"画笔工具",handler:()=>N.value=!0},{text:"演讲者视图",handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:a.value?"取消自动放映":"自动放映",handler:a.value?i:r},{text:"结束放映",subText:"ESC",handler:g}];return(t,o)=>{const a=Object(n["resolveComponent"])("IconLeftTwo"),r=Object(n["resolveComponent"])("IconRightTwo"),i=Object(n["resolveComponent"])("IconWrite"),b=Object(n["resolveComponent"])("IconMagic"),O=Object(n["resolveComponent"])("IconStopwatchStart"),S=Object(n["resolveComponent"])("IconListView"),L=Object(n["resolveComponent"])("IconOffScreenOne"),B=Object(n["resolveComponent"])("IconFullScreenOne"),_=Object(n["resolveComponent"])("IconPower"),T=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["base-view",{"laser-pen":V.value}])},[Object(n["withDirectives"])(Object(n["createVNode"])(ax,{slideWidth:Object(n["unref"])(h),slideHeight:Object(n["unref"])(y),animationIndex:Object(n["unref"])(v),turnSlideToId:Object(n["unref"])(p),manualExitFullscreen:Object(n["unref"])(k),onWheel:o[0]||(o[0]=e=>Object(n["unref"])(s)(e)),onTouchstart:o[1]||(o[1]=e=>Object(n["unref"])(d)(e)),onTouchend:o[2]||(o[2]=e=>Object(n["unref"])(u)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[T,I]]),w.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Ox,{key:0,turnSlideToIndex:Object(n["unref"])(m),onClose:o[3]||(o[3]=e=>w.value=!1)},null,8,["turnSlideToIndex"])):Object(n["createCommentVNode"])("",!0),N.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Lx,{key:1,slideWidth:Object(n["unref"])(h),slideHeight:Object(n["unref"])(y),onClose:o[4]||(o[4]=e=>N.value=!1)},null,8,["slideWidth","slideHeight"])):Object(n["createCommentVNode"])("",!0),E.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Px,{key:2,onClose:o[5]||(o[5]=e=>E.value=!1)})):Object(n["createCommentVNode"])("",!0),Object(n["createElementVNode"])("div",Hx,[Object(n["createVNode"])(a,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:o[6]||(o[6]=e=>Object(n["unref"])(f)())}),Object(n["createVNode"])(r,{class:"tool-btn",theme:"two-tone",fill:["#111","#fff"],onClick:o[7]||(o[7]=e=>Object(n["unref"])(j)())})]),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tools-right",{visible:C.value}]),onMouseleave:o[16]||(o[16]=e=>C.value=!1),onMouseenter:o[17]||(o[17]=e=>C.value=!0)},[Object(n["createElementVNode"])("div",qx,[Object(n["createElementVNode"])("div",{class:"tool-btn page-number",onClick:o[8]||(o[8]=e=>w.value=!0)},"幻灯片 "+Object(n["toDisplayString"])(Object(n["unref"])(c)+1)+" / "+Object(n["toDisplayString"])(Object(n["unref"])(l).length),1),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"画笔工具"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(i,{class:"tool-btn",onClick:o[9]||(o[9]=e=>N.value=!0)})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"激光笔"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(b,{class:Object(n["normalizeClass"])(["tool-btn",{active:V.value}]),onClick:o[10]||(o[10]=e=>V.value=!V.value)},null,8,["class"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"计时器"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O,{class:Object(n["normalizeClass"])(["tool-btn",{active:E.value}]),onClick:o[11]||(o[11]=e=>E.value=!E.value)},null,8,["class"])]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"演讲者视图"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(S,{class:"tool-btn",onClick:o[12]||(o[12]=t=>e.changeViewMode("presenter"))})]),_:1},8,["mouseEnterDelay"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:Object(n["unref"])(x)?"退出全屏":"进入全屏"},{default:Object(n["withCtx"])(()=>[Object(n["unref"])(x)?(Object(n["openBlock"])(),Object(n["createBlock"])(L,{key:0,class:"tool-btn",onClick:o[13]||(o[13]=e=>Object(n["unref"])(k)())})):(Object(n["openBlock"])(),Object(n["createBlock"])(B,{key:1,class:"tool-btn",onClick:o[14]||(o[14]=e=>Object(n["unref"])(Ge)())}))]),_:1},8,["mouseEnterDelay","title"]),Object(n["createVNode"])(Object(n["unref"])(et["a"]),{mouseLeaveDelay:0,mouseEnterDelay:.3,title:"结束放映"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(_,{class:"tool-btn",onClick:o[15]||(o[15]=e=>Object(n["unref"])(g)())})]),_:1},8,["mouseEnterDelay"])])],34)],2)}}});l("05a9");const Gx=Yt()(Ux,[["__scopeId","data-v-90ac59d8"]]);var Xx=Gx;const Yx=e=>(Object(n["pushScopeId"])("data-v-f770d810"),e=e(),Object(n["popScopeId"])(),e),Zx={class:"presenter-view"},Wx={class:"toolbar"},Jx=Yx(()=>Object(n["createElementVNode"])("span",null,"普通视图",-1)),Kx=Yx(()=>Object(n["createElementVNode"])("span",null,"画笔",-1)),Qx=Yx(()=>Object(n["createElementVNode"])("span",null,"激光笔",-1)),ek=Yx(()=>Object(n["createElementVNode"])("span",null,"计时器",-1)),tk=Yx(()=>Object(n["createElementVNode"])("span",null,"结束放映",-1)),lk={class:"content"},ck=["onClick"],nk={class:"remark"},ok={class:"header"},ak=Yx(()=>Object(n["createElementVNode"])("span",null,"演讲者备注",-1)),rk=["innerHTML"],ik={class:"remark-scale"};var sk=Object(n["defineComponent"])({__name:"PresenterView",props:{changeViewMode:{type:Function,required:!0}},setup(e){const t=e,{slides:l,slideIndex:c,viewportRatio:a,currentSlide:r}=Object(o["c"])(T()),i=Object(n["ref"])(),s=Object(n["ref"])(),d=Object(n["ref"])(!1),u=Object(n["ref"])(!1),b=Object(n["ref"])(!1),{mousewheelListener:O,touchStartListener:m,touchEndListener:p,turnPrevSlide:f,turnNextSlide:j,turnSlideToIndex:v,turnSlideToId:h,animationIndex:y}=Dg(),{slideWidth:g,slideHeight:x}=zg(i),{exitScreening:k}=Ze(),{slidesLoadLimit:C}=Iu(),{fullscreenState:N,manualExitFullscreen:E}=Ag(),w=Object(n["ref"])(16),V=Object(n["computed"])(()=>Ne(r.value.remark||"无备注")),I=e=>{s.value&&s.value.scrollBy(e.deltaY,0)},S=e=>{e<12||e>40||(w.value=e)};Object(n["watch"])(c,()=>{Object(n["nextTick"])(()=>{if(!s.value)return;const e=s.value.querySelector(".thumbnail.active");if(!e)return;const t=s.value.offsetWidth,l=e.offsetLeft;s.value.scrollTo({left:l-t/2,behavior:"smooth"})})});const L=()=>[{text:"上一页",subText:"↑ ←",disable:c.value<=0,handler:()=>f()},{text:"下一页",subText:"↓ →",disable:c.value>=l.value.length-1,handler:()=>j()},{text:"第一页",disable:0===c.value,handler:()=>v(0)},{text:"最后一页",disable:c.value===l.value.length-1,handler:()=>v(l.value.length-1)},{divider:!0},{text:"画笔工具",handler:()=>d.value=!0},{text:"普通视图",handler:()=>t.changeViewMode("base")},{divider:!0},{text:"结束放映",subText:"ESC",handler:k}];return(t,o)=>{const r=Object(n["resolveComponent"])("IconListView"),f=Object(n["resolveComponent"])("IconWrite"),j=Object(n["resolveComponent"])("IconMagic"),B=Object(n["resolveComponent"])("IconStopwatchStart"),_=Object(n["resolveComponent"])("IconOffScreenOne"),T=Object(n["resolveComponent"])("IconPower"),M=Object(n["resolveComponent"])("IconMinus"),D=Object(n["resolveComponent"])("IconPlus"),z=Object(n["resolveDirective"])("contextmenu");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Zx,[Object(n["createElementVNode"])("div",Wx,[Object(n["createElementVNode"])("div",{class:"tool-btn",onClick:o[0]||(o[0]=t=>e.changeViewMode("base"))},[Object(n["createVNode"])(r,{class:"tool-icon"}),Jx]),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tool-btn",{active:d.value}]),onClick:o[1]||(o[1]=e=>d.value=!d.value)},[Object(n["createVNode"])(f,{class:"tool-icon"}),Kx],2),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tool-btn",{active:b.value}]),onClick:o[2]||(o[2]=e=>b.value=!b.value)},[Object(n["createVNode"])(j,{class:"tool-icon"}),Qx],2),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tool-btn",{active:u.value}]),onClick:o[3]||(o[3]=e=>u.value=!u.value)},[Object(n["createVNode"])(B,{class:"tool-icon"}),ek],2),Object(n["createElementVNode"])("div",{class:"tool-btn",onClick:o[4]||(o[4]=()=>Object(n["unref"])(N)?Object(n["unref"])(E)():Object(n["unref"])(Ge)())},[Object(n["unref"])(N)?(Object(n["openBlock"])(),Object(n["createBlock"])(_,{key:0,class:"tool-icon"})):(Object(n["openBlock"])(),Object(n["createBlock"])(_,{key:1,class:"tool-icon"})),Object(n["createElementVNode"])("span",null,Object(n["toDisplayString"])(Object(n["unref"])(N)?"退出全屏":"全屏"),1)]),Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{class:"divider"}),Object(n["createElementVNode"])("div",{class:"tool-btn",onClick:o[5]||(o[5]=e=>Object(n["unref"])(k)())},[Object(n["createVNode"])(T,{class:"tool-icon"}),tk])]),Object(n["createElementVNode"])("div",lk,[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["slide-list-wrap",{"laser-pen":b.value}]),ref_key:"slideListWrapRef",ref:i},[Object(n["withDirectives"])(Object(n["createVNode"])(ax,{slideWidth:Object(n["unref"])(g),slideHeight:Object(n["unref"])(x),animationIndex:Object(n["unref"])(y),turnSlideToId:Object(n["unref"])(h),manualExitFullscreen:Object(n["unref"])(E),onWheel:o[6]||(o[6]=e=>Object(n["unref"])(O)(e)),onTouchstart:o[7]||(o[7]=e=>Object(n["unref"])(m)(e)),onTouchend:o[8]||(o[8]=e=>Object(n["unref"])(p)(e))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[z,L]]),d.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Lx,{key:0,slideWidth:Object(n["unref"])(g),slideHeight:Object(n["unref"])(x),left:-365,top:-155,onClose:o[9]||(o[9]=e=>d.value=!1)},null,8,["slideWidth","slideHeight"])):Object(n["createCommentVNode"])("",!0),u.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Px,{key:1,left:75,onClose:o[10]||(o[10]=e=>u.value=!1)})):Object(n["createCommentVNode"])("",!0)],2),Object(n["createElementVNode"])("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:s,onWheel:o[11]||(o[11]=Object(n["withModifiers"])(e=>I(e),["prevent"]))},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(l),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["thumbnail",{active:t===Object(n["unref"])(c)}]),key:e.id,onClick:e=>Object(n["unref"])(v)(t)},[Object(n["createVNode"])(Ns,{slide:e,size:120/Object(n["unref"])(a),visible:t<Object(n["unref"])(C)},null,8,["slide","size","visible"])],10,ck))),128))],544)]),Object(n["createElementVNode"])("div",nk,[Object(n["createElementVNode"])("div",ok,[ak,Object(n["createElementVNode"])("span",null,"P "+Object(n["toDisplayString"])(Object(n["unref"])(c)+1)+" / "+Object(n["toDisplayString"])(Object(n["unref"])(l).length),1)]),Object(n["createElementVNode"])("div",{class:"remark-content",style:Object(n["normalizeStyle"])({fontSize:w.value+"px"}),innerHTML:Object(n["unref"])(V)},null,12,rk),Object(n["createElementVNode"])("div",ik,[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["scale-btn",{disable:12===w.value}]),onClick:o[12]||(o[12]=e=>S(w.value-2))},[Object(n["createVNode"])(M)],2),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["scale-btn",{disable:40===w.value}]),onClick:o[13]||(o[13]=e=>S(w.value+2))},[Object(n["createVNode"])(D)],2)])])])}}});l("6fb9");const dk=Yt()(sk,[["__scopeId","data-v-f770d810"]]);var uk=dk;const bk={class:"pptist-screen"};var Ok=Object(n["defineComponent"])({__name:"index",setup(e){const t=Object(n["ref"])("base"),l=e=>{t.value=e},{exitScreening:c}=Ze(),o=e=>{const t=e.key.toUpperCase();t===te.ESC&&c()};return Object(n["onMounted"])(()=>document.addEventListener("keydown",o)),Object(n["onUnmounted"])(()=>document.removeEventListener("keydown",o)),(e,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",bk,["base"===t.value?(Object(n["openBlock"])(),Object(n["createBlock"])(Xx,{key:0,changeViewMode:l})):"presenter"===t.value?(Object(n["openBlock"])(),Object(n["createBlock"])(uk,{key:1,changeViewMode:l})):Object(n["createCommentVNode"])("",!0)]))}});l("4764");const mk=Yt()(Ok,[["__scopeId","data-v-6bf3d190"]]);var pk=mk,fk=Object(n["defineComponent"])({__name:"MobileEditableElement",props:{elementInfo:{type:Object,required:!0},elementIndex:{type:Number,required:!0},selectElement:{type:Function,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>{const e={[Se.IMAGE]:Nc,[Se.TEXT]:Dn,[Se.SHAPE]:Kn,[Se.LINE]:so,[Se.CHART]:jo,[Se.TABLE]:zo,[Se.LATEX]:Ho,[Se.VIDEO]:ha,[Se.AUDIO]:$a};return e[t.elementInfo.type]||null});return(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"mobile-editable-element",style:Object(n["normalizeStyle"])({zIndex:e.elementIndex})},[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(l)),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement","contextmenus"]))],4))}});const jk=fk;var vk=jk,hk=Object(n["defineComponent"])({__name:"MobileOperate",props:{elementInfo:{type:Object,required:!0},isSelected:{type:Boolean,required:!0},canvasScale:{type:Number,required:!0},scaleElement:{type:Function,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),c=Object(n["computed"])(()=>t.elementInfo.width*t.canvasScale),o=Object(n["computed"])(()=>t.elementInfo.height*t.canvasScale),{borderLines:a,resizeHandlers:r,textElementResizeHandlers:i}=pr(c,o),s="text"===t.elementInfo.type||"table"===t.elementInfo.type?i:r;return(t,c)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"mobile-operate",style:Object(n["normalizeStyle"])({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${Object(n["unref"])(l)}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(a),e=>(Object(n["openBlock"])(),Object(n["createBlock"])(gr,{class:"operate-border-line",key:e.type,type:e.type,style:Object(n["normalizeStyle"])(e.style)},null,8,["type","style"]))),128)),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(s),t=>(Object(n["openBlock"])(),Object(n["createBlock"])(vr,{class:"operate-resize-handler",key:t.direction,type:t.direction,rotate:e.elementInfo.rotate,style:Object(n["normalizeStyle"])(t.style),onTouchstart:Object(n["withModifiers"])(l=>e.scaleElement(l,e.elementInfo,t.direction),["stop"])},null,8,["type","rotate","style","onTouchstart"]))),128))],64)):Object(n["createCommentVNode"])("",!0)],4))}});l("dd03");const yk=Yt()(hk,[["__scopeId","data-v-7fdc6c04"]]);var gk=yk;const xk={class:"mobile-thumbnails"},kk=["onClick"],Ck={class:"label"};var Nk=Object(n["defineComponent"])({__name:"MobileThumbnails",setup(e){const t=T(),{slides:l,slideIndex:c}=Object(o["c"])(t),{sortSlides:a}=Ae(),{slidesLoadLimit:r}=Iu(),i=e=>{t.updateSlideIndex(e)},s=e=>{const{newIndex:t,oldIndex:l}=e;a(t,l)};return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",xk,[Object(n["createVNode"])(Object(n["unref"])(Lu.a),{class:"thumbnail-list",modelValue:Object(n["unref"])(l),animation:300,scroll:!0,scrollSensitivity:50,setData:null,itemKey:"id",delayOnTouchOnly:!0,delay:800,onEnd:s},{item:Object(n["withCtx"])(({element:e,index:t})=>[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["thumbnail-item",{active:Object(n["unref"])(c)===t}]),onClick:e=>i(t)},[Object(n["createElementVNode"])("div",Ck,Object(n["toDisplayString"])(t+1),1),Object(n["createVNode"])(Ns,{class:"thumbnail",slide:e,size:120,visible:t<Object(n["unref"])(r)},null,8,["slide","visible"])],10,kk)]),_:1},8,["modelValue"])]))}});l("bee0");const Ek=Yt()(Nk,[["__scopeId","data-v-e594aa30"]]);var wk=Ek;const Vk={class:"slide-toolbar"},Ik={class:"remark"},Sk=["value"],Lk={class:"toolbar"};var Bk=Object(n["defineComponent"])({__name:"SlideToolbar",setup(e){const t=xi["a"].Group,l=T(),{viewportRatio:c,currentSlide:a}=Object(o["c"])(l),{createSlide:r,copyAndPasteSlide:i,deleteSlide:s}=Ae(),{createTextElement:d,createImageElement:u,createShapeElement:b}=Me(),O=()=>{const e=400,t=56;d({left:(Ve-e)/2,top:(Ve*c.value-t)/2,width:e,height:t},{content:"<p>新添加文本</p>"})},m=e=>{e&&e[0]&&we(e[0]).then(e=>u(e))},p=e=>{const t={viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},l={viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"},n={square:t,round:l},o=200;b({left:(Ve-o)/2,top:(Ve*c.value-o)/2,width:o,height:o},n[e])},f=Object(n["computed"])(()=>{var e;return(null===(e=a.value)||void 0===e?void 0:e.remark)||""}),j=e=>{const t=e.target.value;l.updateSlide({remark:t})};return(e,l)=>{const c=Object(n["resolveComponent"])("IconPlus"),o=Object(n["resolveComponent"])("IconCopy"),a=Object(n["resolveComponent"])("IconDelete"),d=Object(n["resolveComponent"])("IconFontSize"),u=Object(n["resolveComponent"])("IconPicture"),b=Object(n["resolveComponent"])("IconSquare"),v=Object(n["resolveComponent"])("IconRound");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Vk,[Object(n["createElementVNode"])("div",Ik,[Object(n["createElementVNode"])("textarea",{value:Object(n["unref"])(f),placeholder:"点击输入演讲者备注",onInput:l[0]||(l[0]=e=>j(e))},null,40,Sk)]),Object(n["createElementVNode"])("div",Lk,[Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[1]||(l[1]=e=>Object(n["unref"])(r)())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(c,{class:"icon"}),Object(n["createTextVNode"])(" 新幻灯片")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[2]||(l[2]=e=>Object(n["unref"])(i)())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(o,{class:"icon"}),Object(n["createTextVNode"])(" 复制")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[3]||(l[3]=e=>Object(n["unref"])(s)())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(a,{class:"icon"}),Object(n["createTextVNode"])(" 删除")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[4]||(l[4]=e=>O())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(d,{class:"icon"}),Object(n["createTextVNode"])(" 文字")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(el,{onChange:l[5]||(l[5]=e=>m(e))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(u,{class:"icon"}),Object(n["createTextVNode"])("图片 ")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[6]||(l[6]=e=>p("square"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(b,{class:"icon"}),Object(n["createTextVNode"])(" 矩形")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:l[7]||(l[7]=e=>p("round"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(v,{class:"icon"}),Object(n["createTextVNode"])(" 圆形")]),_:1})]),_:1})]),Object(n["createVNode"])(wk)])}}});l("25f2");const _k=Yt()(Bk,[["__scopeId","data-v-1e17bcc7"]]);var Tk=_k;const Mk=e=>(Object(n["pushScopeId"])("data-v-2633262b"),e=e(),Object(n["popScopeId"])(),e),Dk={class:"element-toolbar"},zk={class:"tabs"},Ak=["onClick"],Fk={class:"content"},$k={key:0,class:"style"},Rk={class:"row-block"},Pk=Mk(()=>Object(n["createElementVNode"])("div",{class:"label"},"文字颜色:",-1)),Hk={class:"colors"},qk=["onClick"],Uk={class:"row-block"},Gk=Mk(()=>Object(n["createElementVNode"])("div",{class:"label"},"填充色:",-1)),Xk={class:"colors"},Yk=["onClick"],Zk={key:1,class:"common"};var Wk=Object(n["defineComponent"])({__name:"ElementToolbar",setup(e){const{Group:t,Button:l}=qu["a"],c=xi["a"].Group,a=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],r=z(),i=T(),{handleElement:s,handleElementId:d,richTextAttrs:u}=Object(o["c"])(r),{addHistorySnapshot:b}=Te(),O=(e,t)=>{i.updateElement({id:e,props:t}),b()},m=[{key:"style",label:"样式"},{key:"common",label:"布局"}],p=Object(n["ref"])("common"),{orderElement:f}=Ue(),{alignElementToCanvas:j}=Al(),{addElementsFromData:v}=De(),{deleteElement:h}=$e(),y=()=>{const e=JSON.parse(JSON.stringify(s.value));v([e])},g=(e,t)=>{yn.emit(jn.RICH_TEXT_COMMAND,{action:{command:e,value:t}})},x=e=>{var t;if(s.value){if(("text"===s.value.type||"shape"===s.value.type&&null!==(t=s.value.text)&&void 0!==t&&t.content)&&yn.emit(jn.RICH_TEXT_COMMAND,{action:{command:"color",value:e}}),"table"===s.value.type){const t=JSON.parse(JSON.stringify(s.value.data));for(let l=0;l<t.length;l++)for(let c=0;c<t[l].length;c++){const n=t[l][c].style||{};t[l][c].style={...n,color:e}}O(d.value,{data:t})}"latex"===s.value.type&&O(d.value,{color:e})}},k=e=>{if(s.value){if("text"!==s.value.type&&"shape"!==s.value.type&&"chart"!==s.value.type||O(d.value,{fill:e}),"table"===s.value.type){const t=JSON.parse(JSON.stringify(s.value.data));for(let l=0;l<t.length;l++)for(let c=0;c<t[l].length;c++){const n=t[l][c].style||{};t[l][c].style={...n,backcolor:e}}O(d.value,{data:t})}"audio"===s.value.type&&O(d.value,{color:e})}};return(e,o)=>{const r=Object(n["resolveComponent"])("IconTextBold"),i=Object(n["resolveComponent"])("IconTextItalic"),d=Object(n["resolveComponent"])("IconTextUnderline"),b=Object(n["resolveComponent"])("IconStrikethrough"),O=Object(n["resolveComponent"])("IconFontSize"),v=Object(n["resolveComponent"])("IconAlignTextLeft"),C=Object(n["resolveComponent"])("IconAlignTextCenter"),N=Object(n["resolveComponent"])("IconAlignTextRight"),E=Object(n["resolveComponent"])("IconCopy"),w=Object(n["resolveComponent"])("IconDelete"),V=Object(n["resolveComponent"])("IconSendToBack"),I=Object(n["resolveComponent"])("IconBringToFrontOne"),S=Object(n["resolveComponent"])("IconBringToFront"),L=Object(n["resolveComponent"])("IconSentToBack"),B=Object(n["resolveComponent"])("IconAlignLeft"),_=Object(n["resolveComponent"])("IconAlignVertically"),T=Object(n["resolveComponent"])("IconAlignRight"),M=Object(n["resolveComponent"])("IconAlignTop"),D=Object(n["resolveComponent"])("IconAlignHorizontally"),z=Object(n["resolveComponent"])("IconAlignBottom");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Dk,[Object(n["createElementVNode"])("div",zk,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(m,e=>Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["tab",{active:p.value===e.key}]),key:e.key,onClick:t=>p.value=e.key},Object(n["toDisplayString"])(e.label),11,Ak)),64))]),Object(n["createElementVNode"])("div",Fk,["style"===p.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",$k,[Object(n["createVNode"])(HO,{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(u).bold,onClick:o[0]||(o[0]=e=>g("bold"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(r)]),_:1},8,["checked"]),Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(u).em,onClick:o[1]||(o[1]=e=>g("em"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(i)]),_:1},8,["checked"]),Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(u).underline,onClick:o[2]||(o[2]=e=>g("underline"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(d)]),_:1},8,["checked"]),Object(n["createVNode"])(AO,{style:{flex:"1"},checked:Object(n["unref"])(u).strikethrough,onClick:o[3]||(o[3]=e=>g("strikethrough"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(b)]),_:1},8,["checked"])]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"2"},onClick:o[4]||(o[4]=e=>g("fontsize-add"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O),Object(n["createTextVNode"])("+")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"2"},onClick:o[5]||(o[5]=e=>g("fontsize-reduce"))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(O),Object(n["createTextVNode"])("-")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{style:{margin:"20px 0"}}),Object(n["createVNode"])(Object(n["unref"])(t),{class:"row","button-style":"solid",value:Object(n["unref"])(u).align,onChange:o[6]||(o[6]=e=>g("align",e.target.value))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(l),{value:"left",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(v)]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"center",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(C)]),_:1}),Object(n["createVNode"])(Object(n["unref"])(l),{value:"right",style:{flex:"1"}},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(N)]),_:1})]),_:1},8,["value"]),Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{style:{margin:"20px 0"}}),Object(n["createElementVNode"])("div",Rk,[Pk,Object(n["createElementVNode"])("div",Hk,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(a,e=>Object(n["createElementVNode"])("div",{class:"color",key:e,onClick:t=>x(e)},[Object(n["createElementVNode"])("div",{class:"color-block",style:Object(n["normalizeStyle"])({backgroundColor:e})},null,4)],8,qk)),64))])]),Object(n["createElementVNode"])("div",Uk,[Gk,Object(n["createElementVNode"])("div",Xk,[(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(a,e=>Object(n["createElementVNode"])("div",{class:"color",key:e,onClick:t=>k(e)},[Object(n["createElementVNode"])("div",{class:"color-block",style:Object(n["normalizeStyle"])({backgroundColor:e})},null,4)],8,Yk)),64))])])])):Object(n["createCommentVNode"])("",!0),"common"===p.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Zk,[Object(n["createVNode"])(Object(n["unref"])(c),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[7]||(o[7]=e=>y())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(E,{class:"icon"}),Object(n["createTextVNode"])(" 复制")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[8]||(o[8]=e=>Object(n["unref"])(h)())},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(w,{class:"icon"}),Object(n["createTextVNode"])(" 删除")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{style:{margin:"20px 0"}}),Object(n["createVNode"])(Object(n["unref"])(c),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[9]||(o[9]=e=>Object(n["unref"])(f)(Object(n["unref"])(s),Object(n["unref"])(W).TOP))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(V,{class:"icon"}),Object(n["createTextVNode"])(" 置顶")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[10]||(o[10]=e=>Object(n["unref"])(f)(Object(n["unref"])(s),Object(n["unref"])(W).BOTTOM))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(I,{class:"icon"}),Object(n["createTextVNode"])(" 置底")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[11]||(o[11]=e=>Object(n["unref"])(f)(Object(n["unref"])(s),Object(n["unref"])(W).UP))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(S,{class:"icon"}),Object(n["createTextVNode"])(" 上移")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[12]||(o[12]=e=>Object(n["unref"])(f)(Object(n["unref"])(s),Object(n["unref"])(W).DOWN))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(L,{class:"icon"}),Object(n["createTextVNode"])(" 下移")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{style:{margin:"20px 0"}}),Object(n["createVNode"])(Object(n["unref"])(c),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[13]||(o[13]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).LEFT))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(B,{class:"icon"}),Object(n["createTextVNode"])(" 左对齐")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[14]||(o[14]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).HORIZONTAL))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(_,{class:"icon"}),Object(n["createTextVNode"])(" 水平居中")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[15]||(o[15]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).RIGHT))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(T,{class:"icon"}),Object(n["createTextVNode"])(" 右对齐")]),_:1})]),_:1}),Object(n["createVNode"])(Object(n["unref"])(c),{class:"row"},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[16]||(o[16]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).TOP))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(M,{class:"icon"}),Object(n["createTextVNode"])(" 上对齐")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[17]||(o[17]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).VERTICAL))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(D,{class:"icon"}),Object(n["createTextVNode"])(" 垂直居中")]),_:1}),Object(n["createVNode"])(Object(n["unref"])(xi["a"]),{style:{flex:"1"},onClick:o[18]||(o[18]=e=>Object(n["unref"])(j)(Object(n["unref"])(J).BOTTOM))},{default:Object(n["withCtx"])(()=>[Object(n["createVNode"])(z,{class:"icon"}),Object(n["createTextVNode"])(" 下对齐")]),_:1})]),_:1})])):Object(n["createCommentVNode"])("",!0)])])}}});l("a8e7");const Jk=Yt()(Wk,[["__scopeId","data-v-2633262b"]]);var Kk=Jk;const Qk={class:"mobile-editor-header"},eC={class:"history"};var tC=Object(n["defineComponent"])({__name:"Header",props:{changeMode:{type:Function,required:!0}},setup(e){const{canUndo:t,canRedo:l}=Object(o["c"])(U()),{redo:c,undo:a}=Te();return(o,r)=>{const i=Object(n["resolveComponent"])("IconBack"),s=Object(n["resolveComponent"])("IconNext"),d=Object(n["resolveComponent"])("IconLogout");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",Qk,[Object(n["createElementVNode"])("div",eC,[Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["history-item",{disable:!Object(n["unref"])(t)}]),onClick:r[0]||(r[0]=Object(n["withModifiers"])(e=>Object(n["unref"])(a)(),["stop"]))},[Object(n["createVNode"])(i),Object(n["createTextVNode"])(" 撤销")],2),Object(n["createElementVNode"])("div",{class:Object(n["normalizeClass"])(["history-item",{disable:!Object(n["unref"])(l)}]),onClick:r[1]||(r[1]=Object(n["withModifiers"])(e=>Object(n["unref"])(c)(),["stop"]))},[Object(n["createVNode"])(s),Object(n["createTextVNode"])(" 重做")],2)]),Object(n["createElementVNode"])("div",{class:"back",onClick:r[2]||(r[2]=t=>e.changeMode("preview"))},[Object(n["createVNode"])(d),Object(n["createTextVNode"])(" 退出编辑")])])}}});l("601c");const lC=Yt()(tC,[["__scopeId","data-v-8639f30e"]]);var cC=lC;const nC={class:"mobile-editor"};var oC=Object(n["defineComponent"])({__name:"index",props:{changeMode:{type:Function,required:!0}},setup(e){const t=T(),l=z(),{slideIndex:c,currentSlide:a,viewportRatio:r}=Object(o["c"])(t),{activeElementIdList:i,handleElement:s}=Object(o["c"])(l),d=Object(n["ref"])(),u=Object(n["ref"])([]),b=Object(n["computed"])(()=>a.value.background),{backgroundStyle:O}=Qa(b),m=Object(n["computed"])(()=>{if(!d.value)return 1;const e=d.value.clientWidth,t=d.value.clientHeight,l=t/e;return l>=r.value?(e-20)/Ve:(t-20)/r.value/Ve});Object(n["onMounted"])(()=>{i.value.length&&l.setActiveElementIdList([]),0!==c.value&&t.updateSlideIndex(0)});const p=Object(n["computed"])(()=>({width:Ve*m.value+"px",height:Ve*r.value*m.value+"px"})),f=Object(n["ref"])([]),j=()=>{f.value=a.value?JSON.parse(JSON.stringify(a.value.elements)):[]};Object(n["watchEffect"])(j);const{dragElement:v}=Tl(f,u,m),{scaleElement:h}=Bl(f,u,m),y=(e,t,c=!0)=>{i.value.includes(t.id)||(l.setActiveElementIdList([t.id]),l.setHandleElementId(t.id)),c&&v(e,t)},g=()=>{l.setActiveElementIdList([])};return(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",nC,[Object(n["createVNode"])(cC,{changeMode:e.changeMode},null,8,["changeMode"]),Object(n["createElementVNode"])("div",{class:"content",ref_key:"contentRef",ref:d,onTouchstart:l[0]||(l[0]=e=>g())},[Object(n["createElementVNode"])("div",{class:"viewport-wrapper",style:Object(n["normalizeStyle"])(Object(n["unref"])(p))},[Object(n["createElementVNode"])("div",{class:"background",style:Object(n["normalizeStyle"])(Object(n["unref"])(O))},null,4),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(u.value,(e,t)=>(Object(n["openBlock"])(),Object(n["createBlock"])(or,{key:t,type:e.type,axis:e.axis,length:e.length,canvasScale:Object(n["unref"])(m)},null,8,["type","axis","length","canvasScale"]))),128)),(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(f.value,e=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:e.id},["line"!==e.type?(Object(n["openBlock"])(),Object(n["createBlock"])(gk,{key:0,elementInfo:e,isSelected:Object(n["unref"])(i).includes(e.id),canvasScale:Object(n["unref"])(m),scaleElement:Object(n["unref"])(h)},null,8,["elementInfo","isSelected","canvasScale","scaleElement"])):Object(n["createCommentVNode"])("",!0)],64))),128)),Object(n["createElementVNode"])("div",{class:"viewport",style:Object(n["normalizeStyle"])({transform:`scale(${Object(n["unref"])(m)})`})},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(f.value,(e,t)=>(Object(n["openBlock"])(),Object(n["createBlock"])(vk,{key:e.id,elementInfo:e,elementIndex:t+1,selectElement:y},null,8,["elementInfo","elementIndex"]))),128))],4)],4)],544),Object(n["createVNode"])(Tk),Object(n["unref"])(s)?(Object(n["openBlock"])(),Object(n["createBlock"])(Kk,{key:0})):Object(n["createCommentVNode"])("",!0)]))}});l("2d86");const aC=Yt()(oC,[["__scopeId","data-v-8cdcde82"]]);var rC=aC;const iC={class:"header"};var sC=Object(n["defineComponent"])({__name:"MobilePlayer",props:{changeMode:{type:Function,required:!0}},setup(e){const t=T(),{slides:l,slideIndex:c,currentSlide:a,viewportRatio:r}=Object(o["c"])(t),i=Object(n["ref"])(!1),s=Object(n["ref"])({width:0,height:0});Object(n["onMounted"])(()=>{0!==c.value&&t.updateSlideIndex(0),s.value={width:document.body.clientHeight,height:document.body.clientWidth}});const d=Object(n["computed"])(()=>{const e=s.value.height/s.value.width;let t=0,l=0;return e>=r.value?(t=s.value.width,l=t*r.value):(l=s.value.height,t=l/r.value),{width:t,height:l}}),u=Object(n["ref"])(null),b=e=>{u.value={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}},O=e=>{if(!u.value)return;const n=Math.abs(u.value.y-e.changedTouches[0].pageY),o=e.changedTouches[0].pageX-u.value.x;Math.abs(o)>n&&Math.abs(o)>50&&(u.value=null,o<0&&c.value>0&&t.updateSlideIndex(c.value-1),o>0&&c.value<l.value.length-1&&t.updateSlideIndex(c.value+1))};return(t,o)=>{const r=Object(n["resolveComponent"])("IconLogout");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"mobile-player",style:Object(n["normalizeStyle"])({width:s.value.width+"px",height:s.value.height+"px",transform:`rotate(90deg) translateY(-${s.value.height}px)`})},[Object(n["createElementVNode"])("div",{class:"screen-slide-list",onClick:o[0]||(o[0]=e=>i.value=!i.value),onTouchstart:o[1]||(o[1]=e=>b(e)),onTouchend:o[2]||(o[2]=e=>O(e))},[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(l),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:Object(n["normalizeClass"])(["slide-item","turning-mode-"+(e.turningMode||"slideY"),{current:t===Object(n["unref"])(c),before:t<Object(n["unref"])(c),after:t>Object(n["unref"])(c),hide:(t===Object(n["unref"])(c)-1||t===Object(n["unref"])(c)+1)&&e.turningMode!==Object(n["unref"])(a).turningMode}]),key:e.id},[Math.abs(Object(n["unref"])(c)-t)<2?(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:"slide-content",style:Object(n["normalizeStyle"])({width:Object(n["unref"])(d).width+"px",height:Object(n["unref"])(d).height+"px"})},[Object(n["createVNode"])(Ns,{slide:e,size:Object(n["unref"])(d).width},null,8,["slide","size"])],4)):Object(n["createCommentVNode"])("",!0)],2))),128))],32),i.value?(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:0},[Object(n["createElementVNode"])("div",iC,[Object(n["createElementVNode"])("div",{class:"back",onClick:o[3]||(o[3]=t=>e.changeMode("preview"))},[Object(n["createVNode"])(r),Object(n["createTextVNode"])(" 退出播放")])]),Object(n["createVNode"])(wk,{class:"thumbnails"})],64)):Object(n["createCommentVNode"])("",!0)],4)}}});l("4f8b");const dC=Yt()(sC,[["__scopeId","data-v-5293de3b"]]);var uC=dC;const bC={class:"thumbnail-list"},OC={class:"menu"};var mC=Object(n["defineComponent"])({__name:"MobilePreview",props:{changeMode:{type:Function,required:!0}},setup(e){const{slides:t}=Object(o["c"])(T()),{slidesLoadLimit:l}=Iu(),c=Object(n["ref"])(),a=Object(n["ref"])(0);return Object(n["onMounted"])(()=>{c.value&&(a.value=c.value.clientWidth)}),(o,r)=>{const i=Object(n["resolveComponent"])("IconEdit"),s=Object(n["resolveComponent"])("IconFullScreenPlay");return Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"mobile-preview",ref_key:"mobileRef",ref:c},[Object(n["createElementVNode"])("div",bC,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(Object(n["unref"])(t),(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{class:"thumbnail-item",key:e.id},[Object(n["createVNode"])(Ns,{slide:e,size:a.value-20,visible:t<Object(n["unref"])(l)},null,8,["slide","size","visible"])]))),128))]),Object(n["createElementVNode"])("div",OC,[Object(n["createElementVNode"])("div",{class:"menu-item",onClick:r[0]||(r[0]=t=>e.changeMode("editor"))},[Object(n["createVNode"])(i,{class:"icon"}),Object(n["createTextVNode"])(" 编辑")]),Object(n["createVNode"])(Object(n["unref"])(ui["a"]),{type:"vertical",style:{height:"30px"}}),Object(n["createElementVNode"])("div",{class:"menu-item",onClick:r[1]||(r[1]=t=>e.changeMode("player"))},[Object(n["createVNode"])(s,{class:"icon"}),Object(n["createTextVNode"])(" 播放")])])],512)}}});l("d039d");const pC=Yt()(mC,[["__scopeId","data-v-1c8bce03"]]);var fC=pC;const jC={class:"mobile"};var vC=Object(n["defineComponent"])({__name:"index",setup(e){const t=Object(n["ref"])("preview"),l=e=>t.value=e,c=Object(n["computed"])(()=>{const e={editor:rC,player:uC,preview:fC};return e[t.value]||null});return(e,t)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",jC,[(Object(n["openBlock"])(),Object(n["createBlock"])(Object(n["resolveDynamicComponent"])(Object(n["unref"])(c)),{changeMode:l}))]))}});l("be01");const hC=Yt()(vC,[["__scopeId","data-v-1fb24d48"]]);var yC=hC,gC=Object(n["defineComponent"])({__name:"App",setup(e){const t=Z(),l=z(),c=U(),{databaseId:a}=Object(o["c"])(l),{screening:r}=Object(o["c"])(X());return window.onbeforeunload=()=>!1,Object(n["onMounted"])(async()=>{await P(),c.initSnapshotDatabase(),l.setAvailableFonts()}),window.addEventListener("unload",()=>{const e=localStorage.getItem($),t=e?JSON.parse(e):[];t.push(a.value);const l=JSON.stringify(t);localStorage.setItem($,l)}),(e,l)=>Object(n["unref"])(r)?(Object(n["openBlock"])(),Object(n["createBlock"])(pk,{key:0})):Object(n["unref"])(t)?(Object(n["openBlock"])(),Object(n["createBlock"])(Mg,{key:1})):(Object(n["openBlock"])(),Object(n["createBlock"])(yC,{key:2}))}});l("8cc5");const xC=gC;var kC=xC,CC=l("9483");Object(CC["a"])("service-worker.js",{ready(){console.log("App is being served from cache by a service worker.\nFor more details, visit https://goo.gl/AFskqB")},registered(){console.log("Service worker has been registered.")},cached(){console.log("Content has been cached for offline use.")},updatefound(){console.log("New content is downloading.")},updated(){console.log("New content is available; please refresh.")},offline(){console.log("No internet connection found. App is running in offline mode.")},error(e){console.error("Error during service worker registration:",e)}});l("793f"),l("41ed"),l("77ed"),l("5952"),l("c860"),l("ae3f"),l("8c56");var NC=l("ab81"),EC=l("16cf"),wC=l("b6ec"),VC=l("7bf8"),IC=l("3be8"),SC=l("4621"),LC=l("63d0"),BC=l("3962"),_C=l("3bce"),TC=l("f59e"),MC=l("5a81"),DC=l("c24c"),zC=l("0cf2"),AC=l("4a33"),FC=l("b0d0"),$C=l("50f1"),RC=l("7833"),PC=l("f2e7"),HC=l("b9bc"),qC=l("7f4b"),UC=l("36da"),GC=l("cfe0"),XC=l("af8a"),YC=l("d887"),ZC=l("b28e"),WC=l("f914"),JC=l("0e0a"),KC=l("f807"),QC=l("2e67"),eN=l("e792"),tN=l("e483"),lN=l("9312"),cN=l("84e7"),nN=l("500e8"),oN=l("1e27"),aN=l("7312"),rN=l("8845"),iN=l("a3ef"),sN=l("8331"),dN=l("4040"),uN=l("f745"),bN=l("8377"),ON=l("246f"),mN=l("f1d2"),pN=l("ccc7"),fN=l("e3b9"),jN=l("6010"),vN=l("7abc"),hN=l("f259"),yN=l("23fa"),gN=l("1b1c"),xN=l("fd52"),kN=l("bde2"),CN=l("5a28"),NN=l("c53e"),EN=l("e970"),wN=l("1646"),VN=l("40bb"),IN=l("f99d"),SN=l("f3c2"),LN=l("33a2"),BN=l("fdbc"),_N=l("3a3e"),TN=l("500e"),MN=l("d0c6"),DN=l("1fcb"),zN=l("dcc2"),AN=l("a5f1"),FN=l("ce42"),$N=l("fa00"),RN=l("0996"),PN=l("2c06"),HN=l("a5dc"),qN=l("8678"),UN=l("d7fb"),GN=l("b7c8"),XN=l("ae33"),YN=l("8c1a"),ZN=l("b7b3"),WN=l("96be"),JN=l("5a69"),KN=l("f9e5"),QN=l("bbce"),eE=l("d41d"),tE=l("77ad"),lE=l("46cd"),cE=l("df0d"),nE=l("70f2"),oE=l("d16b"),aE=l("4bad"),rE=l("2e2d"),iE=l("e7f4"),sE=l("eb50"),dE=l("0be2"),uE=l("a90c"),bE=l("c90a"),OE=l("9fbc"),mE=l("5b20"),pE=l("69de"),fE=l("fbe7"),jE=l("ea01"),vE=l("74f3"),hE=l("3ee3"),yE=l("5294"),gE=l("eac5"),xE=l("b8af"),kE=l("dde4"),CE=l("cead"),NE=l("114f"),EE=l("bf2c");const wE={IconPlayOne:EE["a"],IconFullScreenPlay:NE["a"],IconLock:CE["a"],IconUnlock:kE["a"],IconPpt:xE["a"],IconFormat:gE["a"],IconPicture:yE["a"],IconFullScreen:hE["a"],IconList:vE["a"],IconOrderedList:jE["a"],IconHelpcenter:fE["a"],IconFlipVertically:pE["a"],IconFlipHorizontally:mE["a"],IconFontSize:OE["a"],IconCode:bE["a"],IconTextBold:uE["a"],IconTextItalic:dE["a"],IconTextUnderline:sE["a"],IconStrikethrough:iE["a"],IconEdit:rE["a"],IconQuote:aE["a"],IconBackgroundColor:oE["a"],IconGroup:nE["a"],IconUngroup:cE["a"],IconBack:lE["a"],IconNext:tE["a"],IconFullwidth:eE["a"],IconAlignTop:QN["a"],IconAlignLeft:KN["a"],IconAlignRight:JN["a"],IconAlignBottom:WN["a"],IconAlignVertically:ZN["a"],IconAlignHorizontally:YN["a"],IconBringToFront:XN["a"],IconSendToBack:GN["a"],IconAlignTextLeft:UN["a"],IconAlignTextRight:qN["a"],IconAlignTextCenter:HN["a"],IconRowHeight:PN["a"],IconWrite:RN["a"],IconInsertTable:$N["a"],IconAddText:FN["a"],IconFill:AN["a"],IconTailoring:zN["a"],IconEffects:DN["a"],IconColorFilter:MN["a"],IconUp:TN["a"],IconDown:_N["a"],IconPlus:BN["a"],IconMinus:LN["a"],IconConnection:SN["a"],IconBringToFrontOne:IN["a"],IconSentToBack:VN["a"],IconGithub:wN["a"],IconChartProportion:EN["a"],IconChartHistogram:NN["a"],IconChartHistogramOne:CN["a"],IconChartLineArea:kN["a"],IconChartRing:xN["a"],IconChartScatter:gN["a"],IconChartLine:yN["a"],IconChartPie:hN["a"],IconText:vN["a"],IconRotate:jN["a"],IconLeftTwo:fN["a"],IconRightTwo:pN["a"],IconPlatte:mN["a"],IconClose:ON["a"],IconCloseSmall:bN["a"],IconUndo:uN["a"],IconTransform:dN["a"],IconClick:sN["a"],IconTheme:iN["a"],IconArrowCircleLeft:rN["a"],IconGraphicDesign:aN["a"],IconLogout:oN["a"],IconErase:nN["a"],IconClear:cN["a"],IconFolderClose:lN["a"],IconAlignTextTopOne:tN["a"],IconAlignTextBottomOne:eN["a"],IconAlignTextMiddleOne:QC["a"],IconPause:KC["a"],IconVolumeMute:JC["a"],IconVolumeNotice:WC["a"],IconVolumeSmall:ZC["a"],IconVideoTwo:YC["a"],IconFormula:XC["a"],IconLinkOne:GC["a"],IconFullScreenOne:UC["a"],IconOffScreenOne:qC["a"],IconPower:HC["a"],IconListView:PC["a"],IconMagic:RC["a"],IconHighLight:$C["a"],IconShare:FC["a"],IconIndentLeft:AC["a"],IconIndentRight:zC["a"],IconVerticalSpacingBetweenItems:DC["a"],IconCopy:MC["a"],IconDelete:TC["a"],IconSquare:_C["a"],IconRound:BC["a"],IconNeedle:LC["a"],IconTextRotationNone:SC["a"],IconTextRotationDown:IC["a"],IconFormatBrush:VC["a"],IconPreviewOpen:wC["a"],IconPreviewClose:EC["a"],IconStopwatchStart:NC["a"]};var VE={install(e){for(const t of Object.keys(wE))e.component(t,wE[t])}};const IE={class:"menu-content"},SE=["onClick"],LE={class:"text"},BE={key:0,class:"sub-text"};var _E=Object(n["defineComponent"])({__name:"MenuContent",props:{menus:{type:Array,required:!0},handleClickMenuItem:{type:Function,required:!0}},setup(e){return(t,l)=>{const c=Object(n["resolveComponent"])("menu-content",!0);return Object(n["openBlock"])(),Object(n["createElementBlock"])("ul",IE,[(Object(n["openBlock"])(!0),Object(n["createElementBlock"])(n["Fragment"],null,Object(n["renderList"])(e.menus,(t,l)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],{key:t.text||l},[t.hide?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("li",{key:0,class:Object(n["normalizeClass"])(["menu-item",{divider:t.divider,disable:t.disable}]),onClick:Object(n["withModifiers"])(l=>e.handleClickMenuItem(t),["stop"])},[t.divider?Object(n["createCommentVNode"])("",!0):(Object(n["openBlock"])(),Object(n["createElementBlock"])("div",{key:0,class:Object(n["normalizeClass"])(["menu-item-content",{"has-children":t.children,"has-handler":t.handler}])},[Object(n["createElementVNode"])("span",LE,Object(n["toDisplayString"])(t.text),1),t.subText&&!t.children?(Object(n["openBlock"])(),Object(n["createElementBlock"])("span",BE,Object(n["toDisplayString"])(t.subText),1)):Object(n["createCommentVNode"])("",!0),t.children&&t.children.length?(Object(n["openBlock"])(),Object(n["createBlock"])(c,{key:1,class:"sub-menu",menus:t.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):Object(n["createCommentVNode"])("",!0)],2))],10,SE))],64))),128))])}}});l("ca3c");const TE=Yt()(_E,[["__scopeId","data-v-e470e712"]]);var ME=TE,DE=Object(n["defineComponent"])({__name:"index",props:{axis:{type:Object,required:!0},el:{type:Object,required:!0},menus:{type:Array,required:!0},removeContextmenu:{type:Function,required:!0}},setup(e){const t=e,l=Object(n["computed"])(()=>{const e=170,l=30,c=11,n=5,{x:o,y:a}=t.axis,r=t.menus.filter(e=>!(e.divider||e.hide)).length,i=t.menus.filter(e=>e.divider).length,s=e,d=r*l+i*c+2*n,u=document.body.clientWidth,b=document.body.clientHeight;return{left:u<=o+s?o-s:o,top:b<=a+d?a-d:a}}),c=e=>{e.disable||e.children&&!e.handler||(e.handler&&e.handler(t.el),t.removeContextmenu())};return(t,o)=>(Object(n["openBlock"])(),Object(n["createElementBlock"])(n["Fragment"],null,[Object(n["createElementVNode"])("div",{class:"mask",onContextmenu:o[0]||(o[0]=Object(n["withModifiers"])(t=>e.removeContextmenu(),["prevent"])),onMousedown:o[1]||(o[1]=t=>e.removeContextmenu())},null,32),Object(n["createElementVNode"])("div",{class:"contextmenu",style:Object(n["normalizeStyle"])({left:Object(n["unref"])(l).left+"px",top:Object(n["unref"])(l).top+"px"}),onContextmenu:o[2]||(o[2]=Object(n["withModifiers"])(()=>{},["prevent"]))},[Object(n["createVNode"])(ME,{menus:e.menus,handleClickMenuItem:c},null,8,["menus"])],36)],64))}});l("b096");const zE=DE;var AE=zE;const FE="CTX_CONTEXTMENU_HANDLER",$E=(e,t,l)=>{t.stopPropagation(),t.preventDefault();const c=l.value(e);if(!c)return;let o=null;const a=()=>{o&&(document.body.removeChild(o),o=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",a),window.removeEventListener("resize",a)},r={axis:{x:t.x,y:t.y},el:e,menus:c,removeContextmenu:a};o=document.createElement("div");const i=Object(n["createVNode"])(AE,r,null);Object(n["render"])(i,o),document.body.appendChild(o),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",a),window.addEventListener("resize",a)},RE={mounted(e,t){e[FE]=l=>$E(e,l,t),e.addEventListener("contextmenu",e[FE])},unmounted(e){e&&e[FE]&&(e.removeEventListener("contextmenu",e[FE]),delete e[FE])}};var PE=RE;const HE="CTX_CLICK_OUTSIDE_HANDLER",qE=(e,t,l)=>{const c=l.value,n=t.composedPath(),o=n?n.indexOf(e)<0:!e.contains(t.target);o&&c(t)},UE={mounted(e,t){e[HE]=l=>qE(e,l,t),setTimeout(()=>{document.addEventListener("click",e[HE])},0)},unmounted(e){e[HE]&&(document.removeEventListener("click",e[HE]),delete e[HE])}};var GE=UE,XE={install(e){e.directive("contextmenu",PE),e.directive("click-outside",GE)}};const YE=Object(n["createApp"])(kC);YE.use(VE),YE.use(XE),YE.use(Object(o["a"])()),YE.mount("#app")},cd4f:function(e,t,l){},cd7e:function(e,t,l){"use strict";l("fb92")},cf16:function(e,t,l){"use strict";l("c6ee")},d039d:function(e,t,l){"use strict";l("adee")},d097:function(e,t,l){},d2a1:function(e,t,l){},d2a4:function(e,t,l){},d2a7:function(e,t,l){},d2ee:function(e,t,l){"use strict";l("36ac")},d31d:function(e,t,l){},d422:function(e,t,l){},d45e:function(e,t,l){},d970:function(e,t,l){"use strict";l("97ba")},db8d:function(e,t,l){"use strict";l("8ddd")},dc4aa:function(e,t,l){"use strict";l("53c4")},dc8c:function(e,t,l){"use strict";l("9fe7")},dcba:function(e,t,l){},dd03:function(e,t,l){"use strict";l("d31d")},dd7b:function(e,t,l){"use strict";l("a832")},df7d:function(e,t,l){"use strict";l("9f60")},dfe7:function(e,t,l){"use strict";l("4ac4")},e0b6:function(e,t,l){"use strict";l("d45e")},e38f:function(e,t,l){"use strict";l("6877")},e394:function(e,t,l){},e4f3:function(e,t,l){},e611:function(e,t,l){},e63b:function(e,t,l){},e818:function(e,t,l){"use strict";l("c42d")},e83e:function(e,t,l){"use strict";l("6b65")},e9df:function(e,t,l){"use strict";l("5c9a")},ea69:function(e,t,l){},eae7:function(e,t,l){},eb5e:function(e,t,l){},eb6d:function(e,t,l){"use strict";l("4327")},ec27:function(e,t,l){"use strict";l("e394")},ec31:function(e,t,l){},ecba:function(e,t,l){"use strict";l("a697")},ef77:function(e,t,l){},f126:function(e,t,l){"use strict";l("e63b")},f191:function(e,t,l){},f9e0:function(e,t,l){},fa09:function(e,t,l){},fac9:function(e,t,l){"use strict";l("45c1")},fb4b:function(e,t,l){"use strict";l("5aad")},fb92:function(e,t,l){},fbfe:function(e,t,l){"use strict";l("ef77")},fef7:function(e,t,l){"use strict";l("084d")},ff57:function(e,t,l){}});
//# sourceMappingURL=app.9efa1f08.js.map