lt-ppt 1.0.47 → 1.0.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ __p += '`),ea&&(bt+=`' +
24
24
  function print() { __p += __j.call(arguments, '') }
25
25
  `:`;
26
26
  `)+bt+`return __p
27
- }`;var Wn=hF(function(){return Fe(Re,zt+"return "+bt).apply(n,Ie)});if(Wn.source=bt,zS(Wn))throw Wn;return Wn}function Xee(x){return Ia(x).toLowerCase()}function i8(x){return Ia(x).toUpperCase()}function yg(x,k,B){if(x=Ia(x),x&&(B||k===n))return Nc(x);if(!x||!(k=vs(k)))return x;var j=Ui(x),se=Ui(k),Re=Wh(j,se),Ie=A2(j,se)+1;return dd(j,Re,Ie).join("")}function bg(x,k,B){if(x=Ia(x),x&&(B||k===n))return x.slice(0,V(x)+1);if(!x||!(k=vs(k)))return x;var j=Ui(x),se=A2(j,Ui(k))+1;return dd(j,0,se).join("")}function s8(x,k,B){if(x=Ia(x),x&&(B||k===n))return x.replace(wa,"");if(!x||!(k=vs(k)))return x;var j=Ui(x),se=Wh(j,Ui(k));return dd(j,se).join("")}function fF(x,k){var B=C,j=E;if(Sr(k)){var se="separator"in k?k.separator:se;B="length"in k?Un(k.length):B,j="omission"in k?vs(k.omission):j}x=Ia(x);var Re=x.length;if(ui(x)){var Ie=Ui(x);Re=Ie.length}if(B>=Re)return x;var Be=B-fi(j);if(Be<1)return j;var He=Ie?dd(Ie,0,Be).join(""):x.slice(0,Be);if(se===n)return He+j;if(Ie&&(Be+=He.length-Be),GS(se)){if(x.slice(Be).search(se)){var ht,pt=He;for(se.global||(se=Ke(se.source,Ia(Th.exec(se))+"g")),se.lastIndex=0;ht=se.exec(pt);)var bt=ht.index;He=He.slice(0,bt===n?Be:bt)}}else if(x.indexOf(vs(se),Be)!=Be){var Ft=He.lastIndexOf(se);Ft>-1&&(He=He.slice(0,Ft))}return He+j}function dF(x){return x=Ia(x),x&&un.test(x)?x.replace(Kt,X):x}var Uee=O0(function(x,k,B){return x+(B?" ":"")+k.toUpperCase()}),l8=vT("toUpperCase");function c8(x,k,B){return x=Ia(x),k=B?n:k,k===n?Cr(x)?ne(x):Xu(x):x.match(k)||[]}var hF=qn(function(x,k){try{return zr(x,n,k)}catch(B){return zS(B)?B:new _e(B)}}),Ag=Fl(function(x,k){return Gr(k,function(B){B=_c(B),zu(x,B,KS(x[B],x))}),x});function Wee(x){var k=x==null?0:x.length,B=sn();return x=k?Xa(x,function(j){if(typeof j[1]!="function")throw new je(i);return[B(j[0]),j[1]]}):[],qn(function(j){for(var se=-1;++se<k;){var Re=x[se];if(zr(Re[0],this,j))return zr(Re[1],this,j)}})}function pF(x){return B_(Js(x,d))}function rw(x){return function(){return x}}function vF(x,k){return x==null||x!==x?k:x}var mF=gT(),gF=gT(!0);function gs(x){return x}function u8(x){return qN(typeof x=="function"?x:Js(x,d))}function Yee(x){return tT(Js(x,d))}function Zee(x,k){return nT(x,Js(k,d))}var yF=qn(function(x,k){return function(B){return zh(B,x,k)}}),bF=qn(function(x,k){return function(B){return zh(x,B,k)}});function ow(x,k,B){var j=mo(k),se=lS(k,j);B==null&&!(Sr(k)&&(se.length||!j.length))&&(B=k,k=x,x=this,se=lS(k,mo(k)));var Re=!(Sr(B)&&"chain"in B)||!!B.chain,Ie=ju(x);return Gr(se,function(Be){var He=k[Be];x[Be]=He,Ie&&(x.prototype[Be]=function(){var ht=this.__chain__;if(Re||ht){var pt=x(this.__wrapped__),bt=pt.__actions__=Wi(this.__actions__);return bt.push({func:He,args:arguments,thisArg:x}),pt.__chain__=ht,pt}return He.apply(x,hs([this.value()],arguments))})}),x}function Kee(){return Qr._===this&&(Qr._=aa),this}function f8(){}function Hee(x){return x=Un(x),qn(function(k){return z_(k,x)})}var AF=wS(Xa),iw=wS(qm),sw=wS(Bh);function eb(x){return OS(x)?td(_c(x)):j_(x)}function RF(x){return function(k){return x==null?n:k0(x,k)}}var lw=bT(),d8=bT(!0);function cw(){return[]}function Rg(){return!1}function xF(){return{}}function uw(){return""}function SF(){return!0}function h8(x,k){if(x=Un(x),x<1||x>W)return[];var B=F,j=hi(x,F);k=sn(k),x-=F;for(var se=Xh(j,k);++B<x;)k(B);return se}function Qee(x){return _n(x)?Xa(x,_c):ms(x)?[x]:Wi(LT(Ia(x)))}function zee(x){var k=++Xt;return Ia(x)+k}var wF=SS(function(x,k){return x+k},0),fw=NS("ceil"),dw=SS(function(x,k){return x/k},1),hw=NS("floor");function MF(x){return x&&x.length?iS(x,gs,cS):n}function NF(x,k){return x&&x.length?iS(x,sn(k,2),cS):n}function pw(x){return R0(x,gs)}function vw(x,k){return R0(x,sn(k,2))}function p8(x){return x&&x.length?iS(x,gs,fg):n}function v8(x,k){return x&&x.length?iS(x,sn(k,2),fg):n}var m8=SS(function(x,k){return x*k},1),tb=NS("round"),xg=SS(function(x,k){return x-k},0);function mw(x){return x&&x.length?tg(x,gs):0}function Gee(x,k){return x&&x.length?tg(x,sn(k,2)):0}return me.after=H7,me.ary=WT,me.assign=CV,me.assignIn=n8,me.assignInWith=Q2,me.assignWith=kV,me.at=LV,me.before=YT,me.bind=KS,me.bindAll=Ag,me.bindKey=ZT,me.castArray=$7,me.chain=BT,me.chunk=MI,me.compact=NI,me.concat=TI,me.cond=Wee,me.conforms=pF,me.constant=rw,me.countBy=S7,me.create=EV,me.curry=KT,me.curryRight=HT,me.debounce=QT,me.defaults=OV,me.defaultsDeep=PV,me.defer=Ea,me.delay=Oa,me.difference=CI,me.differenceBy=kI,me.differenceWith=LI,me.drop=XS,me.dropRight=US,me.dropRightWhile=EI,me.dropWhile=OI,me.fill=PI,me.filter=M7,me.flatMap=C7,me.flatMapDeep=k7,me.flatMapDepth=L7,me.flatten=_T,me.flattenDeep=_I,me.flattenDepth=II,me.flip=ep,me.flow=mF,me.flowRight=gF,me.fromPairs=VI,me.functions=XV,me.functionsIn=UV,me.groupBy=E7,me.initial=DI,me.intersection=BI,me.intersectionBy=XI,me.intersectionWith=UI,me.invert=YV,me.invertBy=ZV,me.invokeMap=P7,me.iteratee=u8,me.keyBy=_7,me.keys=mo,me.keysIn=Zi,me.map=Y2,me.mapKeys=HV,me.mapValues=QV,me.matches=Yee,me.matchesProperty=Zee,me.memoize=Ic,me.merge=zV,me.mergeWith=a8,me.method=yF,me.methodOf=bF,me.mixin=ow,me.negate=_0,me.nthArg=Hee,me.omit=GV,me.omitBy=z2,me.once=HS,me.orderBy=I7,me.over=AF,me.overArgs=zT,me.overEvery=iw,me.overSome=sw,me.partial=QS,me.partialRight=GT,me.partition=V7,me.pick=G2,me.pickBy=J2,me.property=eb,me.propertyOf=RF,me.pull=KI,me.pullAll=VT,me.pullAllBy=HI,me.pullAllWith=QI,me.pullAt=zI,me.range=lw,me.rangeRight=d8,me.rearg=Q7,me.reject=B7,me.remove=xr,me.rest=z7,me.reverse=ur,me.sampleSize=U7,me.set=$S,me.setWith=j2,me.shuffle=W7,me.slice=X2,me.sortBy=K7,me.sortedUniq=GI,me.sortedUniqBy=JI,me.split=Bee,me.spread=G7,me.tail=jI,me.take=qI,me.takeRight=$I,me.takeRightWhile=e7,me.takeWhile=t7,me.tap=m7,me.throttle=J7,me.thru=W2,me.toArray=$T,me.toPairs=ew,me.toPairsIn=r8,me.toPath=Qee,me.toPlainObject=t8,me.transform=JV,me.unary=j7,me.union=n7,me.unionBy=a7,me.unionWith=r7,me.uniq=o7,me.uniqBy=i7,me.uniqWith=s7,me.unset=jV,me.unzip=ZS,me.unzipWith=DT,me.update=qV,me.updateWith=tw,me.values=np,me.valuesIn=$V,me.without=l7,me.words=c8,me.wrap=q7,me.xor=c7,me.xorBy=u7,me.xorWith=f7,me.zip=d7,me.zipObject=h7,me.zipObjectDeep=p7,me.zipWith=v7,me.entries=ew,me.entriesIn=r8,me.extend=n8,me.extendWith=Q2,ow(me,me),me.add=wF,me.attempt=hF,me.camelCase=tF,me.capitalize=o8,me.ceil=fw,me.clamp=_ee,me.clone=eV,me.cloneDeep=nV,me.cloneDeepWith=aV,me.cloneWith=tV,me.conformsTo=rV,me.deburr=q2,me.defaultTo=vF,me.divide=dw,me.endsWith=nF,me.eq=Dl,me.escape=Vee,me.escapeRegExp=gg,me.every=w7,me.find=N7,me.findIndex=OT,me.findKey=_V,me.findLast=T7,me.findLastIndex=PT,me.findLastKey=IV,me.floor=hw,me.forEach=XT,me.forEachRight=UT,me.forIn=VV,me.forInRight=FV,me.forOwn=DV,me.forOwnRight=BV,me.get=JS,me.gt=oV,me.gte=iV,me.has=WV,me.hasIn=jS,me.head=IT,me.identity=gs,me.includes=O7,me.indexOf=FI,me.inRange=Iee,me.invoke=KV,me.isArguments=tp,me.isArray=_n,me.isArrayBuffer=sV,me.isArrayLike=Yi,me.isArrayLikeObject=Br,me.isBoolean=lV,me.isBuffer=hd,me.isDate=cV,me.isElement=uV,me.isEmpty=fV,me.isEqual=dV,me.isEqualWith=hV,me.isError=zS,me.isFinite=pV,me.isFunction=ju,me.isInteger=JT,me.isLength=K2,me.isMap=jT,me.isMatch=vV,me.isMatchWith=mV,me.isNaN=gV,me.isNative=yV,me.isNil=AV,me.isNull=bV,me.isNumber=pd,me.isObject=Sr,me.isObjectLike=kr,me.isPlainObject=Bl,me.isRegExp=GS,me.isSafeInteger=RV,me.isSet=qT,me.isString=H2,me.isSymbol=ms,me.isTypedArray=I0,me.isUndefined=xV,me.isWeakMap=SV,me.isWeakSet=wV,me.join=WI,me.kebabCase=aF,me.last=$s,me.lastIndexOf=YI,me.lowerCase=rF,me.lowerFirst=oF,me.lt=MV,me.lte=NV,me.max=MF,me.maxBy=NF,me.mean=pw,me.meanBy=vw,me.min=p8,me.minBy=v8,me.stubArray=cw,me.stubFalse=Rg,me.stubObject=xF,me.stubString=uw,me.stubTrue=SF,me.multiply=m8,me.nth=ZI,me.noConflict=Kee,me.noop=f8,me.now=Z2,me.pad=nw,me.padEnd=iF,me.padStart=Fee,me.parseInt=sF,me.random=eF,me.reduce=F7,me.reduceRight=D7,me.repeat=$2,me.replace=lF,me.result=qS,me.round=tb,me.runInContext=re,me.sample=X7,me.size=Y7,me.snakeCase=Dee,me.some=Z7,me.sortedIndex=U2,me.sortedIndexBy=Oee,me.sortedIndexOf=Pee,me.sortedLastIndex=WS,me.sortedLastIndexBy=YS,me.sortedLastIndexOf=FT,me.startCase=cF,me.startsWith=aw,me.subtract=xg,me.sum=mw,me.sumBy=Gee,me.template=uF,me.times=h8,me.toFinite=qu,me.toInteger=Un,me.toLength=e8,me.toLower=Xee,me.toNumber=el,me.toSafeInteger=TV,me.toString=Ia,me.toUpper=i8,me.trim=yg,me.trimEnd=bg,me.trimStart=s8,me.truncate=fF,me.unescape=dF,me.uniqueId=zee,me.upperCase=Uee,me.upperFirst=l8,me.each=XT,me.eachRight=UT,me.first=IT,ow(me,function(){var x={};return Lc(me,function(k,B){ct.call(me.prototype,B)||(x[B]=k)}),x}(),{chain:!1}),me.VERSION=a,Gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(x){me[x].placeholder=me}),Gr(["drop","take"],function(x,k){ra.prototype[x]=function(B){B=B===n?1:so(Un(B),0);var j=this.__filtered__&&!k?new ra(this):this.clone();return j.__filtered__?j.__takeCount__=hi(B,j.__takeCount__):j.__views__.push({size:hi(B,F),type:x+(j.__dir__<0?"Right":"")}),j},ra.prototype[x+"Right"]=function(B){return this.reverse()[x](B).reverse()}}),Gr(["filter","map","takeWhile"],function(x,k){var B=k+1,j=B==O||B==I;ra.prototype[x]=function(se){var Re=this.clone();return Re.__iteratees__.push({iteratee:sn(se,3),type:B}),Re.__filtered__=Re.__filtered__||j,Re}}),Gr(["head","last"],function(x,k){var B="take"+(k?"Right":"");ra.prototype[x]=function(){return this[B](1).value()[0]}}),Gr(["initial","tail"],function(x,k){var B="drop"+(k?"":"Right");ra.prototype[x]=function(){return this.__filtered__?new ra(this):this[B](1)}}),ra.prototype.compact=function(){return this.filter(gs)},ra.prototype.find=function(x){return this.filter(x).head()},ra.prototype.findLast=function(x){return this.reverse().find(x)},ra.prototype.invokeMap=qn(function(x,k){return typeof x=="function"?new ra(this):this.map(function(B){return zh(B,x,k)})}),ra.prototype.reject=function(x){return this.filter(_0(sn(x)))},ra.prototype.slice=function(x,k){x=Un(x);var B=this;return B.__filtered__&&(x>0||k<0)?new ra(B):(x<0?B=B.takeRight(-x):x&&(B=B.drop(x)),k!==n&&(k=Un(k),B=k<0?B.dropRight(-k):B.take(k-x)),B)},ra.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},ra.prototype.toArray=function(){return this.take(F)},Lc(ra.prototype,function(x,k){var B=/^(?:filter|find|map|reject)|While$/.test(k),j=/^(?:head|last)$/.test(k),se=me[j?"take"+(k=="last"?"Right":""):k],Re=j||/^find/.test(k);se&&(me.prototype[k]=function(){var Ie=this.__wrapped__,Be=j?[1]:arguments,He=Ie instanceof ra,ht=Be[0],pt=He||_n(Ie),bt=function(zn){var ea=se.apply(me,hs([zn],Be));return j&&Ft?ea[0]:ea};pt&&B&&typeof ht=="function"&&ht.length!=1&&(He=pt=!1);var Ft=this.__chain__,zt=!!this.__actions__.length,ln=Re&&!Ft,Wn=He&&!zt;if(!Re&&pt){Ie=Wn?Ie:new ra(this);var fn=x.apply(Ie,Be);return fn.__actions__.push({func:W2,args:[bt],thisArg:n}),new zs(fn,Ft)}return ln&&Wn?x.apply(this,Be):(fn=this.thru(bt),ln?j?fn.value()[0]:fn.value():fn)})}),Gr(["pop","push","shift","sort","splice","unshift"],function(x){var k=ze[x],B=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",j=/^(?:pop|shift)$/.test(x);me.prototype[x]=function(){var se=arguments;if(j&&!this.__chain__){var Re=this.value();return k.apply(_n(Re)?Re:[],se)}return this[B](function(Ie){return k.apply(_n(Ie)?Ie:[],se)})}}),Lc(ra.prototype,function(x,k){var B=me[k];if(B){var j=B.name+"";ct.call(sd,j)||(sd[j]=[]),sd[j].push({name:k,func:B})}}),sd[O2(n,y).name]=[{name:"wrapper",func:n}],ra.prototype.clone=k_,ra.prototype.reverse=Ku,ra.prototype.value=mee,me.prototype.at=g7,me.prototype.chain=y7,me.prototype.commit=b7,me.prototype.next=A7,me.prototype.plant=vg,me.prototype.reverse=mg,me.prototype.toJSON=me.prototype.valueOf=me.prototype.value=x7,me.prototype.first=me.prototype.head,S0&&(me.prototype[S0]=R7),me},Se=fe();Vu?((Vu.exports=Se)._=Se,Iu._=Se):Qr._=Se}).call(Ht)}(YC,YC.exports);var Ja=YC.exports,ZC=(e=>(e.RECT="rect",e.ELLIPSE="ellipse",e.POLYGON="polygon",e))(ZC||{});const y4={rect:{name:"矩形",type:"rect",radius:"0",style:""},rect2:{name:"矩形2",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L ${e*.2} ${t} L 0 ${t*.8} Z`},roundRect:{name:"圆角矩形",type:"rect",radius:"10px",style:"inset(0 round 10px)"},ellipse:{name:"圆形",type:"ellipse",style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:"polygon",style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${e*.5} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:"polygon",style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${e*.5} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:"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:"polygon",style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${t*.5} L ${e*.5} ${t} L 0 ${t*.5} Z`},pentagon:{name:"五边形",type:"polygon",style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:"polygon",style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.2} 0 L ${e*.8} 0 L ${e} ${t*.5} L ${e*.8} ${t} L ${e*.2} ${t} L 0 ${t*.5} Z`},heptagon:{name:"七边形",type:"polygon",style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e*.9} ${t*.2} L ${e} ${t*.6} L ${e*.75} ${t} L ${e*.25} ${t} L 0 ${t*.6} L ${e*.1} ${t*.2} Z`},octagon:{name:"八边形",type:"polygon",style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e*.7} 0 L ${e} ${t*.3} L ${e} ${t*.7} L ${e*.7} ${t} L ${e*.3} ${t} L 0 ${t*.7} L 0 ${t*.3} Z`},chevron:{name:"V形",type:"polygon",style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} L ${e*.25} ${t*.5} L 0 0 Z`},point:{name:"点",type:"polygon",style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:"polygon",style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${t*.2} L ${e*.6} ${t*.2} L ${e*.6} 0 L ${e} ${t*.5} L ${e*.6} ${t} L ${e*.6} ${t*.8} L 0 ${t*.8} Z`},parallelogram:{name:"平行四边形",type:"polygon",style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e} 0 L ${e*.7} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:"polygon",style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${e*.3} ${t} L ${e} ${t} L ${e*.7} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:"polygon",style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.25} 0 L ${e*.75} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:"polygon",style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${e*.75} ${t} L ${e*.25} ${t} Z`}},b4=Symbol(),yW=Symbol(),cre=Symbol(),ure=Symbol(),A4=Symbol(),fre=Symbol(),MIe={common:{close:"关闭",cancel:"取消",confirm:"确认",save:"保存",delete:"删除",remove:"移除",edit:"编辑",copy:"复制",cut:"剪切",paste:"粘贴",selectAll:"全选",loading:"加载中...",exporting:"正在导出...",importing:"正在导入...",saving:"正在保存...",success:"成功",error:"错误",warning:"警告",info:"提示",untitledPresentation:"未命名演示文稿"},header:{back:"返回",aippt:"AIPPT",aipptSubtitle:"输入一句话,智能生成演示文稿",importFile:"导入文件",pptxTest:"(仅供测试)",pptistFormat:"(专属格式)",exportFile:"导出文件",resetSlides:"重置幻灯片",slideMarkup:"幻灯片类型标注",shortcuts:"快捷操作",feedback:"意见反馈",faq:"常见问题",disclaimer:"注:本站仅作测试/演示,不提供任何形式的服务",slideshow:"幻灯片放映",slideshowF5:"幻灯片放映(F5)",aiGenerate:"AI生成PPT",export:"导出",download:"下载",save:"保存",fromStart:"从头开始",fromCurrent:"从当前页开始"},canvasTool:{undo:"撤销",undoShortcut:"撤销(Ctrl + Z)",redo:"重做",redoShortcut:"重做(Ctrl + Y)",remarkPanel:"批注面板",selectPanel:"选择窗格",searchReplace:"查找/替换(Ctrl + F)",insertText:"插入文字",textbox:"文本框",horizontalText:"横向文本框",verticalText:"竖向文本框",insertShape:"插入形状",shape:"形状",presetShape:"预设形状",freeDraw:"自由绘制",insertImage:"插入图片",image:"图片",uploadImage:"上传图片",uploadLocalImage:"从本地上传",onlineLibrary:"在线图库",insertLine:"插入线条",line:"线条",insertChart:"插入图表",chart:"图表",insertTable:"插入表格",table:"表格",insertFormula:"插入公式",formula:"公式",insertMedia:"插入音视频",media:"音视频",insertVideo:"插入视频",video:"视频",insertSymbol:"插入符号",symbol:"符号",zoomOut:"画布缩小",zoomOutShortcut:"画布缩小(Ctrl + -)",zoomIn:"画布放大",zoomInShortcut:"画布放大(Ctrl + =)",fitScreen:"适应屏幕",fitScreenShortcut:"适应屏幕(Ctrl + 0)"},miniStatus:{pagePrefix:"第",pageUnit:"页",totalPrefix:"共"},exportDialog:{exportPptist:"导出 PPTIST 文件",exportPptx:"导出 PPTX",exportImage:"导出图片",exportJson:"导出 JSON",exportPdf:"打印 / 导出 PDF",exportPdf2:"导出 PDF",exportFormat:"导出格式:",exportRange:"导出范围:",all:"全部",currentPage:"当前页",custom:"自定义",customRange:"自定义范围:",imageQuality:"图片质量:",pdfQuality:"PDF质量:",ignoreOnlineFont:"忽略在线字体:",ignoreOnlineFontTip:"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭「忽略在线字体」选项,但要注意这将会增加导出用时。",exportImageBtn:"导出图片",perPageCount:"每页数量:",marginBlank:"边缘留白:",printTip:"建议:请在弹出的打印窗口中勾选「背景图形」选项,边距选择「默认」。",printExportPdf:"打印 / 导出 PDF",downloadPdf:"导出 PDF",downloadPptist:"导出 PPTIST 文件",downloadPptx:"导出 PPTX",downloadJson:"导出 JSON",copyJson:"复制 JSON",exportMode:"导出模式:",standardMode:"标准版",imageMode:"纯图版",ignoreMedia:"忽略音频/视频:",ignoreMediaTip:"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭「忽略音视频」选项,但要注意这将会大幅增加导出用时。",overwriteMaster:"覆盖默认母版:",mediaTip:"提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。",pptistTip:"提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。"},aiDialog:{step1Prefix:"从下方挑选合适的模板生成PPT,或",step1Link:"使用本地模板生成",step1Tooltip:"上传.pptist格式模板文件",step2:"确认下方内容大纲(点击编辑内容,右键添加/删除大纲项),开始选择模板",step3:"在下方输入您的PPT主题,并适当补充信息,如行业、岗位、学科、用途等",inputPlaceholder:"请输入PPT主题,如:大学生职业生涯规划",language:"语言:",chinese:"中文",english:"英文",japanese:"日文",style:"风格:",general:"通用",academic:"学术风",professional:"职场风",educational:"教育风",marketing:"营销风",model:"模型:",illustration:"配图:",none:"无",mockTest:"模拟测试",aiSearch:"AI搜图",aiGenerate:"AI生图",overwriteSlides:"覆盖已有幻灯片",aiGenerateBtn:"AI 生成",selectTemplate:"选择模板",regenerate:"返回重新生成",generate:"生成",backToOutline:"返回大纲",generating:"AI生成中,请耐心等待 ...",creatingSlides:"演示文稿生成中,请稍等 ...",apiOverload:"该模型API的并发数过高,请更换其他模型重试",templateError:"上传的模板文件数据异常,请重新上传或使用预置模板",inputThemeFirst:"请先输入PPT主题",recommendTopics:{tech2025:"2025科技前沿动态",bigData:"大数据如何改变世界",catering:"餐饮市场调查与研究",aigcEducation:"AIGC在教育领域的应用",socialMedia:"社交媒体与品牌营销",fiveG:"5G技术如何改变我们的生活",workSummary:"年度工作总结与展望",blockchain:"区块链技术及其应用",careerPlan:"大学生职业生涯规划",annualMeeting:"公司年会策划方案"}},thumbnails:{addSlide:"添加幻灯片",inputSectionName:"输入节名称",untitledSection:"无标题节",defaultSection:"默认节",slideOf:"幻灯页",total:"总数",deleteSection:"删除节",deleteSectionAndSlides:"删除节和幻灯片",deleteAllSections:"删除所有节",renameSection:"重命名节",newPage:"新建页面",copyPage:"复制页面",deletePage:"删除页面",addSection:"增加节",playCurrent:"从当前放映"},search:{find:"查找",replace:"替换",inputFindContent:"输入查找内容",inputReplaceContent:"输入替换内容",ignoreCase:"忽略大小写",previous:"上一个",next:"下一个",replaceBtn:"替换",replaceAll:"全部替换"},screen:{penTool:"画笔工具",laserPointer:"激光笔",timer:"计时器",presenterView:"演讲者视图",exitFullscreen:"退出全屏",enterFullscreen:"进入全屏",endShow:"结束放映",slideOf:"幻灯片",previousPage:"上一页",nextPage:"下一页",firstPage:"第一页",lastPage:"最后一页",cancelAutoPlay:"取消自动放映",autoPlay:"自动放映",loopPlay:"循环放映",showToolbar:"显示工具栏",viewAllSlides:"查看所有幻灯片",bottomThumbnails:"触底显示缩略图",seconds:"秒",normalView:"普通视图",fullscreen:"全屏",speakerNotes:"演讲者备注",noNotes:"无备注",pen:"画笔",inkThickness:"墨迹粗细:",shape:"形状",highlighter:"荧光笔",eraser:"橡皮擦",eraserSize:"橡皮大小:",clearInk:"清除墨迹",blackboard:"黑板",closePen:"关闭画笔",pause:"暂停",start:"开始",reset:"重置",countdown:"倒计时"},mobile:{undo:"撤销",redo:"重做",exitEdit:"退出编辑",speakerNotes:"点击输入演讲者备注",newSlide:"新幻灯片",copy:"复制",delete:"删除",text:"文字",image:"图片",rectangle:"矩形",circle:"圆形",newText:"新添加文本",style:"样式",layout:"布局",fontColor:"文字颜色:",fillColor:"填充色:",noAvailableProps:"暂无可用属性",toTop:"置顶",toBottom:"置底",moveUp:"上移",moveDown:"下移",alignLeft:"左对齐",alignHorizontalCenter:"水平居中",alignRight:"右对齐",alignTop:"上对齐",alignVerticalCenter:"垂直居中",alignBottom:"下对齐"},toolbar:{slideDesign:"页面设计",animation:"动画",position:"位置",style:"样式",background:"背景",fillColor:"填充颜色",noFill:"无填充",presetBackground:"预设背景",customColor:"自定义颜色",gradient:"渐变",image:"图片",applyToAll:"应用到全部",slideSize:"页面尺寸",widescreen16_9:"宽屏 16 : 9",widescreen16_10:"宽屏 16 : 10",standard4_3:"标准 4 : 3",customSize:"自定义尺寸",width:"宽度",height:"高度",apply:"应用",ruler:"标尺",showRuler:"显示标尺",remark:"批注",remarkPlaceholder:"输入批注(为选中元素/当前页幻灯片)",replyPlaceholder:"输入回复内容",confirm:"确认",fontFamily:"字体",fontSize:"字号",bold:"加粗",italic:"斜体",underline:"下划线",strikethrough:"删除线",fontColor:"字体颜色",highlight:"文字高亮",alignLeft:"左对齐",alignCenter:"居中",alignRight:"右对齐",alignJustify:"两端对齐",bulletList:"项目符号",numberedList:"编号列表",increaseIndent:"增加缩进",decreaseIndent:"减少缩进",lineSpacing:"行间距",paragraphSpacing:"段间距",clearFormat:"清除格式",format:"格式",colorMask:"色彩蒙版",filter:"滤镜",flip:"翻转",horizontalFlip:"水平翻转",verticalFlip:"垂直翻转",opacity:"透明度",outline:"边框",shadow:"阴影",shadowColor:"阴影颜色",blur:"模糊",offsetX:"X偏移",offsetY:"Y偏移",imageCrop:"裁剪图片",replaceImage:"替换图片",resetImage:"重置图片",setAsBackground:"设为背景图",link:"超链接",linkUrl:"链接地址",linkPlaceholder:"请输入超链接",lineStyle:"线条样式",lineColor:"线条颜色",lineWidth:"线条粗细",startArrow:"起点箭头",endArrow:"终点箭头",chartType:"图表类型",barChart:"柱状图",horizontalBarChart:"条形图",lineChart:"折线图",areaChart:"面积图",scatterChart:"散点图",pieChart:"饼图",doughnutChart:"环形图",radarChart:"雷达图",chartData:"图表数据",themeColors:"主题色",gridLines:"网格线",legend:"图例",legendPosition:"图例位置",top:"上",bottom:"下",left:"左",right:"右",tableStyle:"表格样式",headerRow:"标题行",totalRow:"汇总行",firstColumn:"首列",lastColumn:"末列",bandedRows:"镶边行",bandedColumns:"镶边列",addRow:"添加行",addColumn:"添加列",deleteRow:"删除行",deleteColumn:"删除列",mergeCells:"合并单元格",splitCells:"拆分单元格",videoCover:"视频封面",autoPlay:"自动播放",loop:"循环播放",mute:"静音",latexPlaceholder:"输入LaTeX公式",positionX:"X 位置",positionY:"Y 位置",elementWidth:"宽度",elementHeight:"高度",rotation:"旋转",lock:"锁定",unlock:"解锁",lockRatio:"锁定比例",order:"层级",bringToFront:"置于顶层",sendToBack:"置于底层",bringForward:"上移一层",sendBackward:"下移一层",align:"对齐",alignTop:"顶端对齐",alignMiddle:"垂直居中",alignBottom:"底端对齐",distributeHorizontally:"横向分布",distributeVertically:"纵向分布",group:"组合",ungroup:"取消组合",combine:"合并形状",enterAnimation:"入场动画",exitAnimation:"退场动画",emphasisAnimation:"强调动画",animationDuration:"动画时长",animationDelay:"动画延迟",animationTrigger:"触发方式",onClick:"单击时",withPrevious:"与上一动画同时",afterPrevious:"上一动画之后",addAnimation:"添加动画",removeAnimation:"删除动画",playAnimation:"播放动画",slideAnimation:"切页动画",noAnimation:"无",random:"随机",multiSelect:"(多选)",design:"设计",transition:"切换",backgroundFill:"背景填充",solidFill:"纯色填充",imageFill:"图片填充",gradientFill:"渐变填充",scale:"缩放",tile:"拼贴",scaleFill:"缩放铺满",linearGradient:"线性渐变",radialGradient:"径向渐变",currentColorBlock:"当前色块:",gradientAngle:"渐变角度:",applyBackgroundToAll:"应用背景到全部",paperA3A4:"纸张 A3 / A4",verticalA3A4:"竖向 A3 / A4",canvasSize:"画布尺寸:",globalTheme:"全局主题",more:"更多",font:"字体:",searchFont:"搜索字体",fontColorLabel:"字体颜色:",backgroundColorLabel:"背景颜色:",themeColorLabel:"主题色:",enableOutline:"启用边框",outlineStyle:"边框样式:",outlineColor:"边框颜色:",outlineWidth:"边框粗细:",horizontalShadow:"水平阴影:",verticalShadow:"垂直阴影:",blurDistance:"模糊距离:",shadowColorLabel:"阴影颜色:",applyThemeToAll:"应用主题到全部",unifyFont:"全局统一字体",extractTheme:"从幻灯片提取主题",presetTheme:"预置主题",textAa:"文字 Aa",set:"设置",setAndApply:"设置并应用",appliedToAll:"已应用到全部",layerOrder:"层级:",toTop:"置顶",toBottom:"置底",moveUp:"上移",moveDown:"下移",alignLabel:"对齐:",horizontal:"水平:",vertical:"垂直:",widthLabel:"宽度:",heightLabel:"高度:",unlockRatio:"解除宽高比锁定",lockRatioLabel:"宽高比锁定",rotationLabel:"旋转:",selectElementAddAnimation:"选中画布中的元素添加动画",enter:"入场",exit:"退场",emphasis:"强调",durationLabel:"持续时长:",triggerLabel:"触发方式:",manualTrigger:"主动触发",withPreviousAnimation:"与上一动画同时",afterPreviousAnimation:"上一动画之后",changeAnimation:"更换动画",preview:"预览",delete:"删除",stopPreview:"停止预览",previewAll:"预览全部",enableShadow:"启用阴影",fillColorLabel:"填充颜色:",colorMaskLabel:"着色(蒙版)",maskColor:"蒙版颜色",outlineStyleLabel:"边框样式:",outlineColorLabel:"边框颜色:",outlineWidthLabel:"边框粗细:",textColor:"文字颜色",textHighlight:"文字高亮",increaseFontSize:"增大字号",decreaseFontSize:"减小字号",searchFontSize:"搜索字号",horizontallyCenter:"水平居中",verticallyCenter:"垂直居中",horizontalDistribute:"水平均匀分布",verticalDistribute:"垂直均匀分布",bigTitle:"大标题",smallTitle:"小标题",bodyText:"正文",bodyTextSmall:"正文[小]",annotation1:"注释 1",annotation2:"注释 2",lineHeightLabel:"行间距:",paragraphSpaceLabel:"段间距:",wordSpaceLabel:"字间距:",textboxFill:"文本框填充:",times:"倍",cropImage:"裁剪图片",byShape:"按形状:",aspectRatioSquare:"纵横比(正方形)",aspectRatioPortrait:"纵横比(纵向)",aspectRatioLandscape:"纵横比(横向)",borderRadius:"圆角半径:",quoteToChat:"引用到聊天",replaceImageBtn:"替换图片",resetStyleBtn:"重置样式",setAsBackgroundBtn:"设为背景",clickToReplaceShape:"点击替换形状",solidFillOption:"纯色填充",gradientFillOption:"渐变填充",imageFillOption:"图片填充",linearGradientOption:"线性渐变",radialGradientOption:"径向渐变",alignTopText:"顶对齐",alignCenterText:"居中",alignBottomText:"底对齐",doubleclickContinuousUse:"双击连续使用",shapeFormatPainter:"形状格式刷",lineStyleLabel:"线条样式:",lineColorLabel:"线条颜色:",lineWidthLabel:"线条宽度:",startPointStyle:"起点样式:",endPointStyle:"终点样式:",swapDirection:"交换方向",searchFontLabel:"搜索字体",searchFontSizeLabel:"搜索字号",textColorTooltip:"文字颜色",cellFill:"单元格填充",boldTooltip:"加粗",italicTooltip:"斜体",underlineTooltip:"下划线",strikethroughTooltip:"删除线",alignLeftTooltip:"左对齐",alignCenterTooltip:"居中",alignRightTooltip:"右对齐",alignJustifyTooltip:"两端对齐",rowCount:"行数:",colCount:"列数:",enableThemeTable:"启用主题表格:",headerRowLabel:"标题行",totalRowLabel:"汇总行",firstColumnLabel:"第一列",lastColumnLabel:"最后一列",themeColorLabelTable:"主题颜色:",editChart:"编辑图表",stackedStyle:"堆叠样式",useSmoothCurve:"使用平滑曲线",backgroundFillLabel:"背景填充:",axisAndText:"坐标与文字:",gridColorLabel:"网格颜色:",themeColorScheme:"主题配色:",presetChartThemes:"预置图表主题:",slideTheme:"幻灯片主题:",customColorScheme:"自定义配色",videoPosterCover:"视频预览封面",setFirstFrameAsCover:"设置首帧为封面",resetCover:"重置封面",autoPlayLabel:"自动播放:",iconColorLabel:"图标颜色:",loopPlayLabel:"循环播放:",editLatex:"编辑 LaTeX",colorLabel:"颜色:",strokeWidthLabel:"粗细:",enableFilter:"启用滤镜",filterBlur:"模糊",filterBrightness:"亮度",filterContrast:"对比度",filterGrayscale:"灰度",filterSaturate:"饱和度",filterHueRotate:"色相旋转",filterSepia:"深褐色",filterInvert:"反色",filterOpacity:"透明度",presetBlackWhite:"黑白",presetVintage:"复古",presetSharpen:"锐化",presetSoft:"柔和",presetWarm:"暖色",presetBright:"明亮",presetVivid:"鲜艳",presetBlur:"模糊",presetInvert:"反色",superscript:"上标",subscript:"下标",inlineCode:"行内代码",quote:"引用",aiBeautify:"美化改写",aiExpand:"扩写丰富",aiCondense:"精简提炼",aiAssist:"AI 辅助",formatPainterDoubleClick:"格式刷(双击连续使用)",invalidLinkUrl:"请输入正确的链接地址",decreaseFirstLineIndent:"减少首行缩进",increaseFirstLineIndent:"增加首行缩进",noTextContent:"没有可处理的文本内容",aiModelOverload:"该模型API的并发数过高,请更换其他模型重试",editThemeColors:"编辑主题色",slideThemeColor:"幻灯片主题色",extractFromCurrent:"从当前页中提取",extractFromAll:"从全部幻灯片提取",fontLabel:"字体:",fontColorExtract:"文字颜色:",backgroundColorExtract:"背景颜色:",themeColorExtract:"主题色:",clickToExcludeColor:"(点击色块排除不要的颜色)",selectStyle:"选择",applyToTheme:"应用到主题",saveAsTheme:"将选中配置保存为主题",themeColorLimit:"主题色超出数量限制,已自动选取前6个",chartTypeLabel:"图表类型:",clickToChange:"点击更换",clearData:"清空数据",category:"类别",series:"系列",chartThemeColors:"图表主题配色",themeColorN:"主题配色",addThemeColor:"添加主题色"},element:{text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},contextmenu:{cut:"剪切",copy:"复制",paste:"粘贴",selectAll:"全选",delete:"删除",lock:"锁定",unlock:"解锁",copyStyle:"复制样式",pasteStyle:"粘贴样式",resetStyle:"重置样式",bringToFront:"置于顶层",sendToBack:"置于底层",bringForward:"上移一层",sendBackward:"下移一层",group:"组合",ungroup:"取消组合",combine:"合并形状",union:"联合",intersect:"相交",subtract:"减去",exclude:"排除",setAsBackground:"设为背景",createLink:"创建超链接",editLink:"编辑超链接",removeLink:"移除超链接"},app:{initLoading:"数据初始化中,请稍等 ..."},notesPanel:{title:"幻灯片{index}的批注",reply:"回复",delete:"删除",inputReplyContent:"输入回复内容",cancel:"取消",noNotes:"本页暂无批注",inputNotePlaceholder:"输入批注(为{target})",selectedElement:"选中元素",currentSlide:"当前页幻灯片",clearNotes:"清空本页批注",addNote:"添加批注",testUser:"测试用户"},imageLib:{title:"图片库(来自 pexels.com)",searchPlaceholder:"搜索图片",searching:"搜索中...",noResults:"没有找到相关图片",insert:"插入",all:"全部",landscape:"横向",portrait:"纵向",square:"方形",inputKeyword:"请输入搜索关键词",defaultSearch:"风景"},linkDialog:{title:"插入超链接",linkText:"链接文字",linkUrl:"链接地址",slideLink:"幻灯片链接",webLink:"网页链接",selectSlide:"选择幻灯片",slide:"幻灯片 {n}",webLinkPlaceholder:"请输入网页链接地址",preview:"预览:"},mediaInput:{videoPlaceholder:"请输入视频地址,e.g. https://xxx.mp4",audioPlaceholder:"请输入音频地址,e.g. https://xxx.mp3",video:"视频",audio:"音频",uploadLocalVideo:"上传本地视频",uploadLocalAudio:"上传本地音频",enterVideoUrl:"请先输入正确的视频地址",enterAudioUrl:"请先输入正确的音频地址"},hotkeyDoc:{title:"快捷键说明",general:"通用",editing:"编辑",slideshow:"放映",description:"说明",shortcut:"快捷键",typeGeneral:"通用",typeSlideshow:"幻灯片放映",typeSlideEditing:"幻灯片编辑",typeElementOps:"元素操作",typeTextEditing:"文本编辑",cut:"剪切",copy:"复制",paste:"粘贴",pasteAsPlainText:"粘贴为纯文本",quickCopyPaste:"快速复制粘贴",selectAll:"全选",undo:"撤销",restore:"恢复",delete:"删除",multiSelect:"多选",closeDialog:"关闭弹窗",startFromBeginning:"从头开始放映幻灯片",startFromCurrent:"从当前开始放映幻灯片",prevPage:"切换上一页",nextPage:"切换下一页",exitSlideshow:"退出放映",newSlide:"新建幻灯片",moveCanvas:"移动画布",zoomCanvas:"缩放画布",zoomIn:"放大画布",zoomOut:"缩小画布",fitScreen:"使画布适应当前屏幕",prevPageNoElement:"上一页(未选中元素)",nextPageNoElement:"下一页(未选中元素)",prevPageScroll:"上一页",nextPageScroll:"下一页",quickCreateText:"快速创建文本",quickCreateRect:"快速创建矩形",quickCreateCircle:"快速创建圆形",quickCreateLine:"快速创建线条",exitDraw:"退出绘制状态",move:"移动",lock:"锁定",group:"组合",ungroup:"取消组合",bringToFront:"置顶层",sendToBack:"置底层",lockRatio:"锁定宽高比例",createStraightLine:"创建水平 / 垂直线条",switchFocusElement:"切换焦点元素",confirmCrop:"确认图片裁剪",bold:"加粗",italic:"斜体",underline:"下划线",inlineCode:"行内代码",superscript:"上角标",subscript:"下角标",selectParagraph:"选中段落",holdCtrlOrShift:"按住 Ctrl 或 Shift",spacePlusDrag:"Space + 鼠标拖拽",ctrlPlusMouseWheel:"Ctrl + 鼠标滚轮",doubleClickBlankOrT:"双击空白处 / T",rightMouseClick:"鼠标右键",mouseScrollUpOrPgUp:"鼠标上滚 / PgUp",mouseScrollDownOrPgDown:"鼠标下滚 / PgDown"},symbolPanel:{title:"插入符号",emoji:"表情",arrows:"箭头",math:"数学",special:"特殊符号",emojiCategories:{faces:"表情",gestures:"动作",animals:"动植物",food:"食物",travel:"旅行",activities:"活动",objects:"物品",symbols:"符号"}},selectPanel:{title:"选择窗格",titleWithCount:"选择({active}/{total})",showAll:"全部显示",hideAll:"全部隐藏",group:"组合",noContent:"本页无内容"},markupPanel:{title:"幻灯片类型标注",currentPageType:"当前页面类型:",currentTextType:"当前文本类型:",currentImageType:"当前图片类型:",selectElementHint:"选中图片、文字、带文字的形状,标记类型",unmarkedType:"未标记类型",coverPage:"封面页",contentsPage:"目录页",transitionPage:"过渡页",contentPage:"内容页",endPage:"结束页",titleText:"标题",subtitleText:"副标题",contentText:"正文",itemText:"列表项目",itemTitleText:"列表项标题",notesText:"注释",headerText:"页眉",footerText:"页脚",partNumberText:"节编号",itemNumberText:"项目编号",pageFigure:"页面插图",itemFigure:"项目插图",backgroundImage:"背景图"},remarkEditor:{placeholder:"点击输入演讲者备注"},templatePanel:{title:"模板",blank:"空白幻灯片",preset:"预设模板",all:"全部",cover:"封面",contents:"目录",transition:"过渡",content:"内容",end:"结束",insertAll:"插入全部",insertTemplate:"插入模板"},language:{toggle:"切换语言",zhCN:"中文",en:"English"},canvas:{ruler:"标尺",gridLine:"网格线",gridNone:"无",gridSmall:"小",gridMedium:"中",gridLarge:"大",resetCurrentPage:"重置当前页",slideshow:"幻灯片放映"},editableElement:{horizontalCenter:"水平居中",horizontalVerticalCenter:"水平垂直居中",alignLeft:"左对齐",alignRight:"右对齐",verticalCenter:"垂直居中",alignTop:"顶部对齐",alignBottom:"底部对齐",bringToFront:"置于顶层",moveUp:"上移一层",sendToBack:"置于底层",moveDown:"下移一层",setLink:"设置链接",cancelGroup:"取消组合",group:"组合",slidePage:"幻灯片页面",changeLink:"更换",removeLink:"移除"},shapeCreateCanvas:{drawShapeHint:"点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成"},tableGenerator:{table:"表格",back:"返回",custom:"自定义",rows:"行数:",cols:"列数:",rowColRange:"行数/列数必须在0~20之间!"},elementComponent:{doubleClickEdit:"双击编辑",videoLoadError:"视频加载失败",audioLoadError:"音频加载失败",playbackSpeed:"倍速",loopOn:"循环开",loopOff:"循环关",fontLoadingHint:"字体需要等待加载下载后生效,请稍等",insertCol:"插入列",insertRow:"插入行",toLeft:"到左侧",toRight:"到右侧",toAbove:"到上方",toBelow:"到下方",deleteCol:"删除列",deleteRow:"删除行",mergeCells:"合并单元格",cancelMergeCells:"取消合并单元格",selectCurrentCol:"选中当前列",selectCurrentRow:"选中当前行",selectAllCells:"选中全部单元格"},colorPicker:{recentColors:"最近使用:",pressEscToClose:"按 ESC 键关闭取色吸管",eyeDropperInitFailed:"取色吸管初始化失败"},latexEditor:{inputPlaceholder:"输入 LaTeX 公式",formulaPreview:"公式预览",commonSymbols:"常用符号",presetFormulas:"预置公式",formulaRequired:"公式不能为空"},outlineEditor:{topic:"主题",chapter:"章",section:"节",newChapter:"新的一章",newSection:"新的一节",newItem:"新的一项",addChildChapter:"添加子级大纲(章)",addSiblingChapterAbove:"上方添加同级大纲(章)",addChildSection:"添加子级大纲(节)",deleteChapter:"删除此章",addSiblingSectionAbove:"上方添加同级大纲(节)",addChildItem:"添加子级大纲(项)",deleteSection:"删除此节",addSiblingItemAbove:"上方添加同级大纲(项)",addSiblingItemBelow:"下方添加同级大纲(项)",deleteItem:"删除此项"},select:{search:"搜索"},configs:{animation:{typeBounce:"弹跳",typeFade:"浮现",typeRotate:"旋转",typeZoom:"缩放",typeSlideIn:"滑入",typeFlip:"翻转",typeBackIn:"放大滑入",typeLightSpeed:"飞入",typeShake:"晃动",typeOther:"其他",typeSlideOut:"滑出",typeBackOut:"缩小滑出",typeLightSpeedOut:"飞出",bounceIn:"弹入",bounceInLeft:"向右弹入",bounceInRight:"向左弹入",bounceInUp:"向上弹入",bounceInDown:"向下弹入",fadeIn:"浮入",fadeInDown:"向下浮入",fadeInDownBig:"向下长距浮入",fadeInLeft:"向右浮入",fadeInLeftBig:"向右长距浮入",fadeInRight:"向左浮入",fadeInRightBig:"向左长距浮入",fadeInUp:"向上浮入",fadeInUpBig:"向上长距浮入",fadeInTopLeft:"从左上浮入",fadeInTopRight:"从右上浮入",fadeInBottomLeft:"从左下浮入",fadeInBottomRight:"从右下浮入",rotateIn:"旋转进入",rotateInDownLeft:"绕左下进入",rotateInDownRight:"绕右下进入",rotateInUpLeft:"绕左上进入",rotateInUpRight:"绕右上进入",zoomIn:"放大进入",zoomInDown:"向下放大进入",zoomInLeft:"从左放大进入",zoomInRight:"从右放大进入",zoomInUp:"向上放大进入",slideInDown:"向下滑入",slideInLeft:"从右滑入",slideInRight:"从左滑入",slideInUp:"向上滑入",flipInX:"X轴翻转进入",flipInY:"Y轴翻转进入",backInDown:"向下放大滑入",backInLeft:"从左放大滑入",backInRight:"从右放大滑入",backInUp:"向上放大滑入",lightSpeedInRight:"从右飞入",lightSpeedInLeft:"从左飞入",bounceOut:"弹出",bounceOutLeft:"向左弹出",bounceOutRight:"向右弹出",bounceOutUp:"向上弹出",bounceOutDown:"向下弹出",fadeOut:"浮出",fadeOutDown:"向下浮出",fadeOutDownBig:"向下长距浮出",fadeOutLeft:"向左浮出",fadeOutLeftBig:"向左长距浮出",fadeOutRight:"向右浮出",fadeOutRightBig:"向右长距浮出",fadeOutUp:"向上浮出",fadeOutUpBig:"向上长距浮出",fadeOutTopLeft:"从左上浮出",fadeOutTopRight:"从右上浮出",fadeOutBottomLeft:"从左下浮出",fadeOutBottomRight:"从右下浮出",rotateOut:"旋转退出",rotateOutDownLeft:"绕左下退出",rotateOutDownRight:"绕右下退出",rotateOutUpLeft:"绕左上退出",rotateOutUpRight:"绕右上退出",zoomOut:"缩小退出",zoomOutDown:"向下缩小退出",zoomOutLeft:"从左缩小退出",zoomOutRight:"从右缩小退出",zoomOutUp:"向上缩小退出",slideOutDown:"向下滑出",slideOutLeft:"从左滑出",slideOutRight:"从右滑出",slideOutUp:"向上滑出",flipOutX:"X轴翻转退出",flipOutY:"Y轴翻转退出",backOutDown:"向下缩小滑出",backOutLeft:"从左缩小滑出",backOutRight:"从右缩小滑出",backOutUp:"向上缩小滑出",lightSpeedOutRight:"从右飞出",lightSpeedOutLeft:"从左飞出",shakeX:"左右摇晃",shakeY:"上下摇晃",headShake:"摇头",swing:"摆动",wobble:"晃动",tada:"惊恐",jello:"果冻",bounce:"弹跳",flash:"闪烁",pulse:"脉搏",rubberBand:"橡皮筋",heartBeat:"心跳(快)",turningNo:"无",turningRandom:"随机",turningSlideX:"左右推移",turningSlideY:"上下推移",turningSlideX3D:"左右推移(3D)",turningSlideY3D:"上下推移(3D)",turningFade:"淡入淡出",turningRotate:"旋转",turningScaleY:"上下展开",turningScaleX:"左右展开",turningScale:"放大",turningScaleReverse:"缩小"},chart:{bar:"柱状图",column:"条形图",line:"折线图",area:"面积图",scatter:"散点图",pie:"饼图",ring:"环形图",radar:"雷达图",defaultCategory:"类别",defaultSeries:"系列",defaultCoordinate:"坐标",defaultValue:"值"},lines:{straight:"直线",brokenCurve:"折线、曲线"},imageClip:{rect:"矩形",rect2:"矩形2",rect3:"矩形3",roundRect:"圆角矩形",ellipse:"圆形",triangle:"三角形",triangle2:"三角形2",triangle3:"三角形3",rhombus:"菱形",pentagon:"五边形",hexagon:"六边形",heptagon:"七边形",octagon:"八边形",chevron:"V形",point:"点",arrow:"箭头",parallelogram:"平行四边形",parallelogram2:"平行四边形2",trapezoid:"梯形",trapezoid2:"梯形2"},font:{default:"默认字体"},element:{text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"}}},NIe={common:{close:"Close",cancel:"Cancel",confirm:"Confirm",save:"Save",delete:"Delete",remove:"Remove",edit:"Edit",copy:"Copy",cut:"Cut",paste:"Paste",selectAll:"Select All",loading:"Loading...",exporting:"Exporting...",importing:"Importing...",saving:"Saving...",success:"Success",error:"Error",warning:"Warning",info:"Info",untitledPresentation:"Untitled Presentation"},header:{back:"Back",aippt:"AIPPT",aipptSubtitle:"Enter a sentence to generate presentation intelligently",importFile:"Import File",pptxTest:"(Test Only)",pptistFormat:"(Exclusive Format)",exportFile:"Export File",resetSlides:"Reset Slides",slideMarkup:"Slide Type Markup",shortcuts:"Shortcuts",feedback:"Feedback",faq:"FAQ",disclaimer:"Note: This site is for testing/demo only, no service provided",slideshow:"Slideshow",slideshowF5:"Slideshow (F5)",aiGenerate:"AI Generate PPT",export:"Export",download:"Download",save:"Save",fromStart:"From Beginning",fromCurrent:"From Current Slide"},canvasTool:{undo:"Undo",undoShortcut:"Undo (Ctrl + Z)",redo:"Redo",redoShortcut:"Redo (Ctrl + Y)",remarkPanel:"Comments Panel",selectPanel:"Selection Pane",searchReplace:"Find/Replace (Ctrl + F)",insertText:"Insert Text",textbox:"Text Box",horizontalText:"Horizontal Text Box",verticalText:"Vertical Text Box",insertShape:"Insert Shape",shape:"Shape",presetShape:"Preset Shapes",freeDraw:"Free Draw",insertImage:"Insert Image",image:"Image",uploadImage:"Upload Image",uploadLocalImage:"Upload from device",onlineLibrary:"Online Library",insertLine:"Insert Line",line:"Line",insertChart:"Insert Chart",chart:"Chart",insertTable:"Insert Table",table:"Table",insertFormula:"Insert Formula",formula:"Formula",insertMedia:"Insert Media",media:"Audio/Video",insertVideo:"Insert Video",video:"Video",insertSymbol:"Insert Symbol",symbol:"Symbol",zoomOut:"Zoom Out",zoomOutShortcut:"Zoom Out (Ctrl + -)",zoomIn:"Zoom In",zoomInShortcut:"Zoom In (Ctrl + =)",fitScreen:"Fit Screen",fitScreenShortcut:"Fit Screen (Ctrl + 0)"},miniStatus:{pagePrefix:"Page",pageUnit:"",totalPrefix:"of"},exportDialog:{exportPptist:"Export PPTIST File",exportPptx:"Export PPTX",exportImage:"Export Image",exportJson:"Export JSON",exportPdf:"Print / Export PDF",exportPdf2:"Export PDF",exportFormat:"Export Format:",exportRange:"Export Range:",all:"All",currentPage:"Current",custom:"Custom",customRange:"Custom Range:",imageQuality:"Image Quality:",pdfQuality:"PDF Quality:",ignoreOnlineFont:"Ignore Online Fonts:",ignoreOnlineFontTip:'Online fonts are ignored by default when exporting. If you use online fonts in your slides and want to keep the styles after export, you can turn off the "Ignore Online Fonts" option, but this will increase export time.',exportImageBtn:"Export Image",perPageCount:"Per Page:",marginBlank:"Margin:",printTip:'Tip: Please check "Background Graphics" option in the print dialog and select "Default" for margins.',printExportPdf:"Print / Export PDF",downloadPdf:"Export PDF",downloadPptist:"Export PPTIST File",downloadPptx:"Export PPTX",downloadJson:"Export JSON",copyJson:"Copy JSON",exportMode:"Export Mode:",standardMode:"Standard",imageMode:"Image Only",ignoreMedia:"Ignore Audio/Video:",ignoreMediaTip:'Audio/video are ignored by default when exporting. If your slides contain audio/video elements and you want to export them to PPTX, turn off the "Ignore Audio/Video" option, but this will significantly increase export time.',overwriteMaster:"Overwrite Default Master:",mediaTip:"Note: 1. Supported formats: avi, mp4, mov, wmv, mp3, wav; 2. Cross-origin resources cannot be exported.",pptistTip:"Note: .pptist is the exclusive file extension of this application, supporting importing this type of file back into the app."},aiDialog:{step1Prefix:"Select a suitable template below to generate PPT, or ",step1Link:"use local template",step1Tooltip:"Upload .pptist template file",step2:"Confirm the outline below (click to edit, right-click to add/delete items), then select template",step3:"Enter your PPT topic below, and add relevant info such as industry, position, subject, purpose, etc.",inputPlaceholder:"Enter PPT topic, e.g.: College Student Career Planning",language:"Language:",chinese:"Chinese",english:"English",japanese:"Japanese",style:"Style:",general:"General",academic:"Academic",professional:"Professional",educational:"Educational",marketing:"Marketing",model:"Model:",illustration:"Illustration:",none:"None",mockTest:"Mock Test",aiSearch:"AI Search",aiGenerate:"AI Generate",overwriteSlides:"Overwrite existing slides",aiGenerateBtn:"AI Generate",selectTemplate:"Select Template",regenerate:"Back to Regenerate",generate:"Generate",backToOutline:"Back to Outline",generating:"AI generating, please wait...",creatingSlides:"Creating presentation, please wait...",apiOverload:"The API concurrency for this model is too high, please try another model",templateError:"The uploaded template file data is abnormal, please re-upload or use preset templates",inputThemeFirst:"Please enter PPT topic first",recommendTopics:{tech2025:"2025 Technology Frontiers",bigData:"How Big Data Changes the World",catering:"Catering Market Research",aigcEducation:"AIGC Applications in Education",socialMedia:"Social Media & Brand Marketing",fiveG:"How 5G Changes Our Lives",workSummary:"Annual Work Summary & Outlook",blockchain:"Blockchain Technology & Applications",careerPlan:"College Student Career Planning",annualMeeting:"Company Annual Meeting Planning"}},thumbnails:{addSlide:"Add Slide",inputSectionName:"Enter section name",untitledSection:"Untitled Section",defaultSection:"Default Section",slideOf:"Slide",total:"Total",deleteSection:"Delete Section",deleteSectionAndSlides:"Delete Section and Slides",deleteAllSections:"Delete All Sections",renameSection:"Rename Section",newPage:"New Page",copyPage:"Duplicate Page",deletePage:"Delete Page",addSection:"Add Section",playCurrent:"Play from Current"},search:{find:"Find",replace:"Replace",inputFindContent:"Enter search content",inputReplaceContent:"Enter replacement content",ignoreCase:"Ignore Case",previous:"Previous",next:"Next",replaceBtn:"Replace",replaceAll:"Replace All"},screen:{penTool:"Pen Tool",laserPointer:"Laser Pointer",timer:"Timer",presenterView:"Presenter View",exitFullscreen:"Exit Fullscreen",enterFullscreen:"Enter Fullscreen",endShow:"End Show",slideOf:"Slide",previousPage:"Previous",nextPage:"Next",firstPage:"First",lastPage:"Last",cancelAutoPlay:"Cancel Auto Play",autoPlay:"Auto Play",loopPlay:"Loop Play",showToolbar:"Show Toolbar",viewAllSlides:"View All Slides",bottomThumbnails:"Show Bottom Thumbnails",seconds:"s"},mobile:{undo:"Undo",redo:"Redo",exitEdit:"Exit Edit",speakerNotes:"Click to enter speaker notes",newSlide:"New Slide",copy:"Copy",delete:"Delete",text:"Text",image:"Image",rectangle:"Rectangle",circle:"Circle",newText:"New Text"},toolbar:{slideDesign:"Slide Design",animation:"Animation",position:"Position",style:"Style",background:"Background",fillColor:"Fill Color",noFill:"No Fill",presetBackground:"Preset Background",customColor:"Custom Color",gradient:"Gradient",image:"Image",applyToAll:"Apply to All",slideSize:"Slide Size",widescreen16_9:"Widescreen 16:9",widescreen16_10:"Widescreen 16:10",standard4_3:"Standard 4:3",customSize:"Custom Size",width:"Width",height:"Height",apply:"Apply",ruler:"Ruler",showRuler:"Show Ruler",remark:"Comment",remarkPlaceholder:"Enter comment (for selected element/current slide)",replyPlaceholder:"Enter reply content",confirm:"Confirm",fontFamily:"Font",fontSize:"Font Size",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",fontColor:"Font Color",highlight:"Highlight",alignLeft:"Align Left",alignCenter:"Center",alignRight:"Align Right",alignJustify:"Justify",bulletList:"Bullet List",numberedList:"Numbered List",increaseIndent:"Increase Indent",decreaseIndent:"Decrease Indent",lineSpacing:"Line Spacing",paragraphSpacing:"Paragraph Spacing",clearFormat:"Clear Format",format:"Format",colorMask:"Color Mask",filter:"Filter",flip:"Flip",horizontalFlip:"Horizontal Flip",verticalFlip:"Vertical Flip",opacity:"Opacity",outline:"Outline",shadow:"Shadow",shadowColor:"Shadow Color",blur:"Blur",offsetX:"Offset X",offsetY:"Offset Y",imageCrop:"Crop Image",replaceImage:"Replace Image",resetImage:"Reset Image",setAsBackground:"Set as Background",link:"Hyperlink",linkUrl:"Link URL",linkPlaceholder:"Enter hyperlink",lineStyle:"Line Style",lineColor:"Line Color",lineWidth:"Line Width",startArrow:"Start Arrow",endArrow:"End Arrow",chartType:"Chart Type",barChart:"Bar Chart",horizontalBarChart:"Horizontal Bar",lineChart:"Line Chart",areaChart:"Area Chart",scatterChart:"Scatter Chart",pieChart:"Pie Chart",doughnutChart:"Doughnut Chart",radarChart:"Radar Chart",chartData:"Chart Data",themeColors:"Theme Colors",gridLines:"Grid Lines",legend:"Legend",legendPosition:"Legend Position",top:"Top",bottom:"Bottom",left:"Left",right:"Right",tableStyle:"Table Style",headerRow:"Header Row",totalRow:"Total Row",firstColumn:"First Column",lastColumn:"Last Column",bandedRows:"Banded Rows",bandedColumns:"Banded Columns",addRow:"Add Row",addColumn:"Add Column",deleteRow:"Delete Row",deleteColumn:"Delete Column",mergeCells:"Merge Cells",splitCells:"Split Cells",videoCover:"Video Cover",autoPlay:"Auto Play",loop:"Loop",mute:"Mute",latexPlaceholder:"Enter LaTeX formula",positionX:"X Position",positionY:"Y Position",elementWidth:"Width",elementHeight:"Height",rotation:"Rotation",lock:"Lock",unlock:"Unlock",lockRatio:"Lock Ratio",order:"Order",bringToFront:"Bring to Front",sendToBack:"Send to Back",bringForward:"Bring Forward",sendBackward:"Send Backward",align:"Align",alignTop:"Align Top",alignMiddle:"Align Middle",alignBottom:"Align Bottom",distributeHorizontally:"Distribute Horizontally",distributeVertically:"Distribute Vertically",group:"Group",ungroup:"Ungroup",combine:"Combine Shapes",enterAnimation:"Entrance Animation",exitAnimation:"Exit Animation",emphasisAnimation:"Emphasis Animation",animationDuration:"Duration",animationDelay:"Delay",animationTrigger:"Trigger",onClick:"On Click",withPrevious:"With Previous",afterPrevious:"After Previous",addAnimation:"Add Animation",removeAnimation:"Remove Animation",playAnimation:"Play Animation",slideAnimation:"Slide Transition",noAnimation:"None",random:"Random",multiSelect:" (Multi)",design:"Design",transition:"Transition",backgroundFill:"Background Fill",solidFill:"Solid Fill",imageFill:"Image Fill",gradientFill:"Gradient Fill",scale:"Scale",tile:"Tile",scaleFill:"Scale Fill",linearGradient:"Linear Gradient",radialGradient:"Radial Gradient",currentColorBlock:"Current Color:",gradientAngle:"Gradient Angle:",applyBackgroundToAll:"Apply Background to All",paperA3A4:"Paper A3 / A4",verticalA3A4:"Vertical A3 / A4",canvasSize:"Canvas Size:",globalTheme:"Global Theme",more:"More",font:"Font:",searchFont:"Search Font",fontColorLabel:"Font Color:",backgroundColorLabel:"Background Color:",themeColorLabel:"Theme Color:",enableOutline:"Enable Border",enableShadow:"Enable Shadow",fillColorLabel:"Fill Color:",colorMaskLabel:"Color Mask",maskColor:"Mask Color",outlineStyle:"Outline Style:",outlineColor:"Outline Color:",outlineWidth:"Outline Width:",horizontalShadow:"Horizontal Shadow:",verticalShadow:"Vertical Shadow:",blurDistance:"Blur Distance:",shadowColorLabel:"Shadow Color:",applyThemeToAll:"Apply Theme to All",unifyFont:"Unify Font",extractTheme:"Extract Theme from Slide",presetTheme:"Preset Theme",textAa:"Text Aa",set:"Set",setAndApply:"Set & Apply",appliedToAll:"Applied to All",layerOrder:"Order:",toTop:"To Top",toBottom:"To Bottom",moveUp:"Move Up",moveDown:"Move Down",alignLabel:"Align:",horizontal:"X:",vertical:"Y:",widthLabel:"Width:",heightLabel:"Height:",unlockRatio:"Unlock Aspect Ratio",lockRatioLabel:"Lock Aspect Ratio",rotationLabel:"Rotation:",selectElementAddAnimation:"Select an element to add animation",enter:"Enter",exit:"Exit",emphasis:"Emphasis",durationLabel:"Duration:",triggerLabel:"Trigger:",manualTrigger:"On Click",withPreviousAnimation:"With Previous",afterPreviousAnimation:"After Previous",changeAnimation:"Change Animation",preview:"Preview",delete:"Delete",stopPreview:"Stop Preview",previewAll:"Preview All",outlineStyleLabel:"Outline Style:",outlineColorLabel:"Outline Color:",outlineWidthLabel:"Outline Width:",textColor:"Text Color",textHighlight:"Text Highlight",increaseFontSize:"Increase Font Size",decreaseFontSize:"Decrease Font Size",searchFontSize:"Search Font Size",horizontallyCenter:"Center Horizontally",verticallyCenter:"Center Vertically",horizontalDistribute:"Distribute Horizontally",verticalDistribute:"Distribute Vertically",bigTitle:"Big Title",smallTitle:"Small Title",bodyText:"Body",bodyTextSmall:"Body [Small]",annotation1:"Annotation 1",annotation2:"Annotation 2",lineHeightLabel:"Line Height:",paragraphSpaceLabel:"Paragraph Space:",wordSpaceLabel:"Word Space:",textboxFill:"Text Box Fill:",times:"x",cropImage:"Crop Image",byShape:"By Shape:",aspectRatioSquare:"Aspect Ratio (Square)",aspectRatioPortrait:"Aspect Ratio (Portrait)",aspectRatioLandscape:"Aspect Ratio (Landscape)",borderRadius:"Border Radius:",quoteToChat:"Quote to Chat",replaceImageBtn:"Replace Image",resetStyleBtn:"Reset Style",setAsBackgroundBtn:"Set as Background",clickToReplaceShape:"Click to Replace Shape",solidFillOption:"Solid Fill",gradientFillOption:"Gradient Fill",imageFillOption:"Image Fill",linearGradientOption:"Linear Gradient",radialGradientOption:"Radial Gradient",alignTopText:"Top Align",alignCenterText:"Center",alignBottomText:"Bottom Align",doubleclickContinuousUse:"Double-click for Continuous Use",shapeFormatPainter:"Shape Format Painter",lineStyleLabel:"Line Style:",lineColorLabel:"Line Color:",lineWidthLabel:"Line Width:",startPointStyle:"Start Style:",endPointStyle:"End Style:",swapDirection:"Swap Direction",searchFontLabel:"Search Font",searchFontSizeLabel:"Search Font Size",textColorTooltip:"Text Color",cellFill:"Cell Fill",boldTooltip:"Bold",italicTooltip:"Italic",underlineTooltip:"Underline",strikethroughTooltip:"Strikethrough",alignLeftTooltip:"Align Left",alignCenterTooltip:"Center",alignRightTooltip:"Align Right",alignJustifyTooltip:"Justify",rowCount:"Rows:",colCount:"Columns:",enableThemeTable:"Enable Theme Table:",headerRowLabel:"Header Row",totalRowLabel:"Total Row",firstColumnLabel:"First Column",lastColumnLabel:"Last Column",themeColorLabelTable:"Theme Color:",editChart:"Edit Chart",stackedStyle:"Stacked Style",useSmoothCurve:"Use Smooth Curve",backgroundFillLabel:"Background Fill:",axisAndText:"Axis & Text:",gridColorLabel:"Grid Color:",themeColorScheme:"Theme Colors:",presetChartThemes:"Preset Chart Themes:",slideTheme:"Slide Theme:",customColorScheme:"Custom Colors",videoPosterCover:"Video Poster",setFirstFrameAsCover:"Set First Frame as Cover",resetCover:"Reset Cover",autoPlayLabel:"Auto Play:",iconColorLabel:"Icon Color:",loopPlayLabel:"Loop:",editLatex:"Edit LaTeX",colorLabel:"Color:",strokeWidthLabel:"Stroke Width:",enableFilter:"Enable Filter",filterBlur:"Blur",filterBrightness:"Brightness",filterContrast:"Contrast",filterGrayscale:"Grayscale",filterSaturate:"Saturate",filterHueRotate:"Hue Rotate",filterSepia:"Sepia",filterInvert:"Invert",filterOpacity:"Opacity",presetBlackWhite:"B&W",presetVintage:"Vintage",presetSharpen:"Sharpen",presetSoft:"Soft",presetWarm:"Warm",presetBright:"Bright",presetVivid:"Vivid",presetBlur:"Blur",presetInvert:"Invert",superscript:"Superscript",subscript:"Subscript",inlineCode:"Inline Code",quote:"Quote",aiBeautify:"Beautify",aiExpand:"Expand",aiCondense:"Condense",aiAssist:"AI Assist",formatPainterDoubleClick:"Format Painter (Double-click for continuous use)",invalidLinkUrl:"Please enter a valid link URL",decreaseFirstLineIndent:"Decrease First Line Indent",increaseFirstLineIndent:"Increase First Line Indent",noTextContent:"No text content to process",aiModelOverload:"API concurrency too high, please try another model",editThemeColors:"Edit Theme Colors",slideThemeColor:"Slide Theme Color",extractFromCurrent:"Extract from Current",extractFromAll:"Extract from All Slides",fontLabel:"Font:",fontColorExtract:"Font Color:",backgroundColorExtract:"Background Color:",themeColorExtract:"Theme Color:",clickToExcludeColor:"(Click to exclude colors)",selectStyle:"Select",applyToTheme:"Apply to Theme",saveAsTheme:"Save Selected as Theme",themeColorLimit:"Theme colors exceeded limit, auto-selected first 6",chartTypeLabel:"Chart Type:",clickToChange:"Click to Change",clearData:"Clear Data",category:"Category",series:"Series",chartThemeColors:"Chart Theme Colors",themeColorN:"Theme Color",addThemeColor:"Add Theme Color"},element:{text:"Text",image:"Image",shape:"Shape",line:"Line",chart:"Chart",table:"Table",video:"Video",audio:"Audio",latex:"Formula"},contextmenu:{cut:"Cut",copy:"Copy",paste:"Paste",selectAll:"Select All",delete:"Delete",lock:"Lock",unlock:"Unlock",copyStyle:"Copy Style",pasteStyle:"Paste Style",resetStyle:"Reset Style",bringToFront:"Bring to Front",sendToBack:"Send to Back",bringForward:"Bring Forward",sendBackward:"Send Backward",group:"Group",ungroup:"Ungroup",combine:"Combine Shapes",union:"Union",intersect:"Intersect",subtract:"Subtract",exclude:"Exclude",setAsBackground:"Set as Background",createLink:"Create Hyperlink",editLink:"Edit Hyperlink",removeLink:"Remove Hyperlink"},app:{initLoading:"Initializing data, please wait..."},notes:{title:"Notes",placeholder:"Click to enter speaker notes"},notesPanel:{title:"Notes for Slide {index}",reply:"Reply",delete:"Delete",inputReplyContent:"Enter reply content",cancel:"Cancel",noNotes:"No notes on this page",inputNotePlaceholder:"Enter note (for {target})",selectedElement:"selected element",currentSlide:"current slide",clearNotes:"Clear all notes on this page",addNote:"Add Note",testUser:"Test User"},imageLib:{title:"Image Library (from pexels.com)",searchPlaceholder:"Search images",searching:"Searching...",noResults:"No images found",insert:"Insert",all:"All",landscape:"Landscape",portrait:"Portrait",square:"Square",inputKeyword:"Please enter search keyword",defaultSearch:"landscape"},linkDialog:{title:"Insert Hyperlink",linkText:"Link Text",linkUrl:"Link URL",slideLink:"Slide Link",webLink:"Web Link",selectSlide:"Select Slide",slide:"Slide {n}",webLinkPlaceholder:"Enter web link URL",preview:"Preview:"},mediaInput:{videoPlaceholder:"Enter video URL, e.g. https://xxx.mp4",audioPlaceholder:"Enter audio URL, e.g. https://xxx.mp3",video:"Video",audio:"Audio",uploadLocalVideo:"Upload Local Video",uploadLocalAudio:"Upload Local Audio",enterVideoUrl:"Please enter a valid video URL first",enterAudioUrl:"Please enter a valid audio URL first"},hotkeyDoc:{title:"Keyboard Shortcuts",general:"General",editing:"Editing",slideshow:"Slideshow",description:"Description",shortcut:"Shortcut",typeGeneral:"General",typeSlideshow:"Slideshow",typeSlideEditing:"Slide Editing",typeElementOps:"Element Operations",typeTextEditing:"Text Editing",cut:"Cut",copy:"Copy",paste:"Paste",pasteAsPlainText:"Paste as Plain Text",quickCopyPaste:"Quick Duplicate",selectAll:"Select All",undo:"Undo",restore:"Redo",delete:"Delete",multiSelect:"Multi-select",closeDialog:"Close Dialog",startFromBeginning:"Start Slideshow from Beginning",startFromCurrent:"Start Slideshow from Current",prevPage:"Previous Slide",nextPage:"Next Slide",exitSlideshow:"Exit Slideshow",newSlide:"New Slide",moveCanvas:"Move Canvas",zoomCanvas:"Zoom Canvas",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitScreen:"Fit Canvas to Screen",prevPageNoElement:"Previous Page (No Element Selected)",nextPageNoElement:"Next Page (No Element Selected)",prevPageScroll:"Previous Page",nextPageScroll:"Next Page",quickCreateText:"Quick Create Text",quickCreateRect:"Quick Create Rectangle",quickCreateCircle:"Quick Create Circle",quickCreateLine:"Quick Create Line",exitDraw:"Exit Draw Mode",move:"Move",lock:"Lock",group:"Group",ungroup:"Ungroup",bringToFront:"Bring to Front",sendToBack:"Send to Back",lockRatio:"Lock Aspect Ratio",createStraightLine:"Create Horizontal / Vertical Line",switchFocusElement:"Switch Focus Element",confirmCrop:"Confirm Image Crop",bold:"Bold",italic:"Italic",underline:"Underline",inlineCode:"Inline Code",superscript:"Superscript",subscript:"Subscript",selectParagraph:"Select Paragraph",holdCtrlOrShift:"Hold Ctrl or Shift",spacePlusDrag:"Space + Mouse Drag",ctrlPlusMouseWheel:"Ctrl + Mouse Wheel",doubleClickBlankOrT:"Double-click Blank / T",rightMouseClick:"Right Click",mouseScrollUpOrPgUp:"Mouse Scroll Up / PgUp",mouseScrollDownOrPgDown:"Mouse Scroll Down / PgDown"},symbolPanel:{title:"Insert Symbol",emoji:"Emoji",arrows:"Arrows",math:"Math",special:"Special",emojiCategories:{faces:"Faces",gestures:"Gestures",animals:"Animals & Nature",food:"Food",travel:"Travel",activities:"Activities",objects:"Objects",symbols:"Symbols"}},selectPanel:{title:"Selection Pane",titleWithCount:"Selection ({active}/{total})",showAll:"Show All",hideAll:"Hide All",group:"Group",noContent:"No content on this page"},markupPanel:{title:"Slide Type Markup",currentPageType:"Current Page Type:",currentTextType:"Current Text Type:",currentImageType:"Current Image Type:",selectElementHint:"Select image, text, or shape with text to mark type",unmarkedType:"Unmarked Type",coverPage:"Cover Page",contentsPage:"Contents Page",transitionPage:"Transition Page",contentPage:"Content Page",endPage:"End Page",titleText:"Title",subtitleText:"Subtitle",contentText:"Content",itemText:"List Item",itemTitleText:"List Item Title",notesText:"Notes",headerText:"Header",footerText:"Footer",partNumberText:"Section Number",itemNumberText:"Item Number",pageFigure:"Page Figure",itemFigure:"Item Figure",backgroundImage:"Background Image"},remarkEditor:{placeholder:"Click to enter speaker notes"},templatePanel:{title:"Templates",blank:"Blank Slide",preset:"Preset Templates",all:"All",cover:"Cover",contents:"Contents",transition:"Transition",content:"Content",end:"End",insertAll:"Insert All",insertTemplate:"Insert Template"},language:{toggle:"Switch Language",zhCN:"Chinese",en:"English"},canvas:{ruler:"Ruler",gridLine:"Grid",gridNone:"None",gridSmall:"Small",gridMedium:"Medium",gridLarge:"Large",resetCurrentPage:"Reset Current Page",slideshow:"Slideshow"},editableElement:{horizontalCenter:"Center Horizontally",horizontalVerticalCenter:"Center Both",alignLeft:"Align Left",alignRight:"Align Right",verticalCenter:"Center Vertically",alignTop:"Align Top",alignBottom:"Align Bottom",bringToFront:"Bring to Front",moveUp:"Bring Forward",sendToBack:"Send to Back",moveDown:"Send Backward",setLink:"Set Link",cancelGroup:"Ungroup",group:"Group",slidePage:"Slide Page",changeLink:"Change",removeLink:"Remove"},shapeCreateCanvas:{drawShapeHint:"Click to draw a shape, close path to finish, press ESC or right-click to cancel, press ENTER to finish early"},tableGenerator:{table:"Table",back:"Back",custom:"Custom",rows:"Rows:",cols:"Columns:",rowColRange:"Rows/columns must be between 0 and 20!"},elementComponent:{doubleClickEdit:"Double-click to edit",videoLoadError:"Video load failed",audioLoadError:"Audio load failed",playbackSpeed:"Speed",loopOn:"Loop On",loopOff:"Loop Off",fontLoadingHint:"Font needs to be downloaded, please wait",insertCol:"Insert Column",insertRow:"Insert Row",toLeft:"To Left",toRight:"To Right",toAbove:"To Above",toBelow:"To Below",deleteCol:"Delete Column",deleteRow:"Delete Row",mergeCells:"Merge Cells",cancelMergeCells:"Unmerge Cells",selectCurrentCol:"Select Current Column",selectCurrentRow:"Select Current Row",selectAllCells:"Select All Cells"},colorPicker:{recentColors:"Recent Colors:",pressEscToClose:"Press ESC to close eye dropper",eyeDropperInitFailed:"Eye dropper initialization failed"},latexEditor:{inputPlaceholder:"Enter LaTeX formula",formulaPreview:"Formula Preview",commonSymbols:"Common Symbols",presetFormulas:"Preset Formulas",formulaRequired:"Formula cannot be empty"},outlineEditor:{topic:"Topic",chapter:"Ch",section:"Sec",newChapter:"New Chapter",newSection:"New Section",newItem:"New Item",addChildChapter:"Add Child Outline (Chapter)",addSiblingChapterAbove:"Add Sibling Outline Above (Chapter)",addChildSection:"Add Child Outline (Section)",deleteChapter:"Delete Chapter",addSiblingSectionAbove:"Add Sibling Outline Above (Section)",addChildItem:"Add Child Outline (Item)",deleteSection:"Delete Section",addSiblingItemAbove:"Add Sibling Outline Above (Item)",addSiblingItemBelow:"Add Sibling Outline Below (Item)",deleteItem:"Delete Item"},select:{search:"Search"},configs:{animation:{typeBounce:"Bounce",typeFade:"Fade",typeRotate:"Rotate",typeZoom:"Zoom",typeSlideIn:"Slide In",typeFlip:"Flip",typeBackIn:"Back Slide In",typeLightSpeed:"Fly In",typeShake:"Shake",typeOther:"Other",typeSlideOut:"Slide Out",typeBackOut:"Back Slide Out",typeLightSpeedOut:"Fly Out",bounceIn:"Bounce In",bounceInLeft:"Bounce In Right",bounceInRight:"Bounce In Left",bounceInUp:"Bounce In Up",bounceInDown:"Bounce In Down",fadeIn:"Fade In",fadeInDown:"Fade In Down",fadeInDownBig:"Fade In Down Big",fadeInLeft:"Fade In Right",fadeInLeftBig:"Fade In Right Big",fadeInRight:"Fade In Left",fadeInRightBig:"Fade In Left Big",fadeInUp:"Fade In Up",fadeInUpBig:"Fade In Up Big",fadeInTopLeft:"Fade In Top Left",fadeInTopRight:"Fade In Top Right",fadeInBottomLeft:"Fade In Bottom Left",fadeInBottomRight:"Fade In Bottom Right",rotateIn:"Rotate In",rotateInDownLeft:"Rotate In Down Left",rotateInDownRight:"Rotate In Down Right",rotateInUpLeft:"Rotate In Up Left",rotateInUpRight:"Rotate In Up Right",zoomIn:"Zoom In",zoomInDown:"Zoom In Down",zoomInLeft:"Zoom In Left",zoomInRight:"Zoom In Right",zoomInUp:"Zoom In Up",slideInDown:"Slide In Down",slideInLeft:"Slide In Right",slideInRight:"Slide In Left",slideInUp:"Slide In Up",flipInX:"Flip In X",flipInY:"Flip In Y",backInDown:"Back In Down",backInLeft:"Back In Left",backInRight:"Back In Right",backInUp:"Back In Up",lightSpeedInRight:"Light Speed In Right",lightSpeedInLeft:"Light Speed In Left",bounceOut:"Bounce Out",bounceOutLeft:"Bounce Out Left",bounceOutRight:"Bounce Out Right",bounceOutUp:"Bounce Out Up",bounceOutDown:"Bounce Out Down",fadeOut:"Fade Out",fadeOutDown:"Fade Out Down",fadeOutDownBig:"Fade Out Down Big",fadeOutLeft:"Fade Out Left",fadeOutLeftBig:"Fade Out Left Big",fadeOutRight:"Fade Out Right",fadeOutRightBig:"Fade Out Right Big",fadeOutUp:"Fade Out Up",fadeOutUpBig:"Fade Out Up Big",fadeOutTopLeft:"Fade Out Top Left",fadeOutTopRight:"Fade Out Top Right",fadeOutBottomLeft:"Fade Out Bottom Left",fadeOutBottomRight:"Fade Out Bottom Right",rotateOut:"Rotate Out",rotateOutDownLeft:"Rotate Out Down Left",rotateOutDownRight:"Rotate Out Down Right",rotateOutUpLeft:"Rotate Out Up Left",rotateOutUpRight:"Rotate Out Up Right",zoomOut:"Zoom Out",zoomOutDown:"Zoom Out Down",zoomOutLeft:"Zoom Out Left",zoomOutRight:"Zoom Out Right",zoomOutUp:"Zoom Out Up",slideOutDown:"Slide Out Down",slideOutLeft:"Slide Out Left",slideOutRight:"Slide Out Right",slideOutUp:"Slide Out Up",flipOutX:"Flip Out X",flipOutY:"Flip Out Y",backOutDown:"Back Out Down",backOutLeft:"Back Out Left",backOutRight:"Back Out Right",backOutUp:"Back Out Up",lightSpeedOutRight:"Light Speed Out Right",lightSpeedOutLeft:"Light Speed Out Left",shakeX:"Shake X",shakeY:"Shake Y",headShake:"Head Shake",swing:"Swing",wobble:"Wobble",tada:"Tada",jello:"Jello",bounce:"Bounce",flash:"Flash",pulse:"Pulse",rubberBand:"Rubber Band",heartBeat:"Heart Beat",turningNo:"None",turningRandom:"Random",turningSlideX:"Slide Horizontal",turningSlideY:"Slide Vertical",turningSlideX3D:"Slide Horizontal (3D)",turningSlideY3D:"Slide Vertical (3D)",turningFade:"Fade",turningRotate:"Rotate",turningScaleY:"Scale Vertical",turningScaleX:"Scale Horizontal",turningScale:"Zoom In",turningScaleReverse:"Zoom Out"},chart:{bar:"Bar Chart",column:"Column Chart",line:"Line Chart",area:"Area Chart",scatter:"Scatter Chart",pie:"Pie Chart",ring:"Doughnut Chart",radar:"Radar Chart",defaultCategory:"Category",defaultSeries:"Series",defaultCoordinate:"Coordinate",defaultValue:"Value"},lines:{straight:"Straight Line",brokenCurve:"Broken / Curve"},imageClip:{rect:"Rectangle",rect2:"Rectangle 2",rect3:"Rectangle 3",roundRect:"Round Rectangle",ellipse:"Ellipse",triangle:"Triangle",triangle2:"Triangle 2",triangle3:"Triangle 3",rhombus:"Rhombus",pentagon:"Pentagon",hexagon:"Hexagon",heptagon:"Heptagon",octagon:"Octagon",chevron:"Chevron",point:"Point",arrow:"Arrow",parallelogram:"Parallelogram",parallelogram2:"Parallelogram 2",trapezoid:"Trapezoid",trapezoid2:"Trapezoid 2"},font:{default:"Default Font"},element:{text:"Text",image:"Image",shape:"Shape",line:"Line",chart:"Chart",table:"Table",video:"Video",audio:"Audio",latex:"Formula"}}},dre=Symbol("lt-ppt-i18n"),TIe={"zh-CN":MIe,en:NIe};function hre(e,t=""){return Object.entries(e).reduce((n,[a,r])=>{const o=t?`${t}.${a}`:a;return r&&typeof r=="object"&&!Array.isArray(r)?Object.assign(n,hre(r,o)):n[o]=String(r),n},{})}const _b=Object.fromEntries(Object.entries(TIe).map(([e,t])=>[e,hre(t)]));function In(){const e=l.inject(dre,{locale:l.ref("zh-CN")});return{t:n=>{var a,r;return((a=_b[e.locale.value])==null?void 0:a[n])??((r=_b["zh-CN"])==null?void 0:r[n])??n},locale:e.locale}}function CIe(e){return t=>{var n,a;return((n=_b[e.value])==null?void 0:n[t])??((a=_b["zh-CN"])==null?void 0:a[t])??t}}function kIe(e){const t=l.ref((e==null?void 0:e.locale)??"zh-CN");return{install(){},global:{locale:t,t:a=>{var r,o;return((r=_b[t.value])==null?void 0:r[a])??((o=_b["zh-CN"])==null?void 0:o[a])??a}}}}const pre=4096*4096,vre=8e3,LIe=.2,EIe=l.defineComponent({__name:"LtPPT",props:{initData:{},onUploadFile:{},customImageSources:{},onCustomImageSourceSelect:{},onChange:{},onSave:{},onInitFinished:{},locale:{default:"zh-CN"},width:{default:"100%"},height:{default:"100%"},readonly:{type:Boolean,default:!1},theme:{default:"dark"},mode:{default:"default"},onReturn:{},onImageAIEntryClick:{}},emits:["image-ai-entry-click"],setup(e,{expose:t,emit:n}){const a=e,r=n,o=l.getCurrentInstance(),i=l.ref();let s=null,c=null,u=null,f=null,d=null,h=null,p=null,v=null;const m=new Set;let g=null;const y=new Promise(ge=>{g=ge}),b={save:null,getOnUploadFile:()=>a.onUploadFile,getOnSave:()=>a.onSave,markSaved:ge=>{const he=ge??K();v=he===null?null:JSON.parse(JSON.stringify(he))},hasUnsavedChanges:()=>te(),flushPendingEdits:()=>{for(const ge of m)ge()},registerPendingEdit:ge=>(m.add(ge),()=>m.delete(ge)),waitUntilReady:()=>y,markReady:()=>{g==null||g(),g=null}},R=l.ref(a.locale??"zh-CN"),A=l.ref(a.theme??"dark"),S=l.ref(a.mode??"default"),M={sources:l.computed(()=>a.customImageSources??[]),select:ge=>{var he;return(he=a.onCustomImageSourceSelect)==null?void 0:he.call(a,{name:ge.name,key:ge.key,...ge.icon?{icon:ge.icon}:{}})}},T=l.computed(()=>({width:a.width,height:a.height})),N=()=>{const ge=(o==null?void 0:o.vnode.props)||{};return!!(ge.onImageAIEntryClick||ge.onImageAiEntryClick)},C=l.computed(()=>!!a.onImageAIEntryClick||N()),E=ge=>new Promise(he=>{if(typeof Image>"u"){he(null);return}let ye=!1,Te=null;const Ne=be=>{ye||(ye=!0,Te&&clearTimeout(Te),he(be))};Te=setTimeout(()=>Ne(null),vre);const Ue=new Image;/^https?:\/\//i.test(ge)&&(Ue.crossOrigin="anonymous"),Ue.decoding="sync",Ue.onload=async()=>{var be;try{await((be=Ue.decode)==null?void 0:be.call(Ue))}catch{}Ne(Ue)},Ue.onerror=()=>Ne(null),Ue.src=ge}),L=ge=>{const he=Math.max(1,ge.width||1),ye=Math.max(1,ge.height||1);let Te=Math.min(typeof window>"u"?1:window.devicePixelRatio||1,2);return he*ye*Te*Te>pre&&(Te=Math.sqrt(pre/(he*ye))),{width:Math.max(1,Math.round(he*Te)),height:Math.max(1,Math.round(ye*Te)),scale:Te}},P=(ge,he,ye,Te,Ne,Ue)=>{const be=Math.min(Math.max(Ue,0),Te/2,Ne/2);if(!be){ge.rect(he,ye,Te,Ne);return}ge.moveTo(he+be,ye),ge.lineTo(he+Te-be,ye),ge.quadraticCurveTo(he+Te,ye,he+Te,ye+be),ge.lineTo(he+Te,ye+Ne-be),ge.quadraticCurveTo(he+Te,ye+Ne,he+Te-be,ye+Ne),ge.lineTo(he+be,ye+Ne),ge.quadraticCurveTo(he,ye+Ne,he,ye+Ne-be),ge.lineTo(he,ye+be),ge.quadraticCurveTo(he,ye,he+be,ye)},O=(ge,he,ye,Te,Ne)=>{var Ye;const Ue=y4[((Ye=he.clip)==null?void 0:Ye.shape)||"rect"]||y4.rect;if(Ue.type===ZC.ELLIPSE){ge.beginPath(),ge.ellipse(ye/2,Te/2,ye/2,Te/2,0,0,Math.PI*2),ge.clip();return}if(Ue.type===ZC.POLYGON&&Ue.createPath&&typeof Path2D<"u"){ge.clip(new Path2D(Ue.createPath(ye,Te)));return}const be=Ue.radius!==void 0?(he.radius||Number.parseFloat(Ue.radius)||0)*Ne:0;ge.beginPath(),P(ge,0,0,ye,Te,be),ge.clip()},_=(ge,he,ye)=>{if(!ge.clip)return{left:0,top:0,width:he,height:ye};const[Te,Ne]=ge.clip.range,Ue=Ne[0]-Te[0],be=Ne[1]-Te[1];return!Number.isFinite(Ue)||!Number.isFinite(be)||!Ue||!be?{left:0,top:0,width:he,height:ye}:{left:-Te[0]/Ue*he,top:-Te[1]/be*ye,width:100/Ue*he,height:100/be*ye}},I=ge=>ge.filters?Object.keys(ge.filters).map(he=>{var Te;const ye=(Te=ge.filters)==null?void 0:Te[he];return ye?`${he}(${ye})`:""}).filter(Boolean).join(" "):"",D=async ge=>{if(!ge.src||typeof document>"u")return ge.src;try{const he=await E(ge.src);if(!he)return ge.src;const ye=document.createElement("canvas"),{width:Te,height:Ne,scale:Ue}=L(ge);ye.width=Te,ye.height=Ne;const be=ye.getContext("2d");if(!be)return ge.src;be.save(),(ge.flipH||ge.flipV)&&(be.translate(ge.flipH?Te:0,ge.flipV?Ne:0),be.scale(ge.flipH?-1:1,ge.flipV?-1:1)),O(be,ge,Te,Ne,Ue);const Ye=I(ge);Ye&&(be.filter=Ye);const We=_(ge,Te,Ne);return be.drawImage(he,We.left,We.top,We.width,We.height),ge.colorMask&&(be.filter="none",be.fillStyle=ge.colorMask,be.fillRect(0,0,Te,Ne)),be.restore(),ye.toDataURL("image/png")}catch{return ge.src}},W=async ge=>{var Ne,Ue;const he=(Ne=ge.detail)==null?void 0:Ne.element;if(!he||he.type!=="image")return;const ye=JSON.parse(JSON.stringify(he));ye.clipSrc=await D(he);const Te={element:ye};(Ue=a.onImageAIEntryClick)==null||Ue.call(a,Te),r("image-ai-entry-click",Te)},Y=async()=>{if(!i.value||s)return;const[{createApp:ge},{createPinia:he},{default:ye},{default:Te},Ne]=await Promise.all([import("vue"),Promise.resolve().then(()=>pFe),Promise.resolve().then(()=>gDt),Promise.resolve().then(()=>EDt),Promise.resolve().then(()=>K9e)]);if(!i.value)return;u=Ne.useSlidesStore,f=Ne.useScreenStore,d=Ne.useMainStore,h=Ne.useSnapshotStore;const Ue=document.createElement("div");Ue.style.width="100%",Ue.style.height="100%",i.value.appendChild(Ue),s=ge(ye,{initData:a.initData,onUploadFile:a.onUploadFile,readonly:a.readonly,onChange:a.onChange,onSave:a.onSave,onInitFinished:a.onInitFinished,onReturn:a.onReturn,theme:A.value}),c=he(),s.use(c),s.provide(dre,{locale:R}),s.provide("__lt_ppt_theme__",A),s.provide("__lt_ppt_mode__",S),s.provide("__lt_ppt_image_ai_entry_enabled__",C),s.provide(ure,M),s.provide(A4,b),s.config.globalProperties.$t=CIe(R),s.use(Te),s.mount(Ue)},G=()=>{s&&(s.unmount(),s=null,c=null,b.save=null),i.value&&(i.value.innerHTML="")};l.onMounted(()=>{p=Y()}),l.onBeforeUnmount(()=>{G()}),l.watch(()=>a.locale,ge=>{R.value=ge??"zh-CN"}),l.watch(()=>a.theme,ge=>{A.value=ge??"dark"}),l.watch(()=>a.mode,ge=>{S.value=ge??"default"});const F=ge=>{S.value=ge},Z=()=>!c||!u?null:u(c),Q=()=>!c||!d?null:d(c),H=()=>!c||!h?null:h(c),K=()=>{const ge=Z();if(!ge)return null;const{title:he,theme:ye,slides:Te,viewportSize:Ne,viewportRatio:Ue}=ge.$state;return JSON.parse(JSON.stringify({title:he,theme:ye,slides:Te,width:Ne,height:Ne*Ue}))},te=()=>{b.flushPendingEdits();const ge=K();return ge===null?!1:v===null?!0:!Ja.isEqual(ge,v)},oe=async()=>(!c&&p&&await p,!!c),ue=ge=>new Promise(he=>{if(typeof Image>"u"){he(null);return}let ye=!1;const Te=new Image,Ne=be=>{ye||(ye=!0,clearTimeout(Ue),Te.onload=null,Te.onerror=null,he(be))},Ue=setTimeout(()=>Ne(null),vre);Te.decoding="sync",Te.onload=async()=>{var be;try{await((be=Te.decode)==null?void 0:be.call(Te))}catch{}Ne({width:Te.naturalWidth||Te.width,height:Te.naturalHeight||Te.height})},Te.onerror=()=>Ne(null),Te.src=ge}),ke=(ge,he)=>Number.isFinite(ge)&&ge>0?ge:he,ve=(ge,he,ye,Te,Ne)=>{let Ue=ke(ge.width,(he==null?void 0:he.width)||Ne.width),be=ke(ge.height,(he==null?void 0:he.height)||Ne.height);if(ge.width!==void 0&&ge.height===void 0&&(he!=null&&he.width)&&he.height)be=Ue*he.height/he.width;else if(ge.height!==void 0&&ge.width===void 0&&(he!=null&&he.width)&&he.height)Ue=be*he.width/he.height;else if(ge.width===void 0&&ge.height===void 0&&(he!=null&&he.width)&&he.height){const Ye=Math.min(1,ye/he.width,Te/he.height);Ue=he.width*Ye,be=he.height*Ye}return{width:Ue,height:be}},xe=ge=>new Promise(he=>{if(typeof document>"u"){he(null);return}const ye=document.createElement("video");ye.preload="metadata",ye.muted=!0,ye.onloadedmetadata=()=>{const Te=ye.videoWidth,Ne=ye.videoHeight;ye.onloadedmetadata=null,ye.onerror=null,ye.removeAttribute("src"),ye.load(),he(Te&&Ne?{width:Te,height:Ne}:null)},ye.onerror=()=>{ye.onloadedmetadata=null,ye.onerror=null,ye.removeAttribute("src"),ye.load(),he(null)},ye.src=ge}),Me=(ge,he)=>he.slideId?ge.slides.findIndex(ye=>ye.id===he.slideId):he.slideIndex!==void 0?Number.isInteger(he.slideIndex)&&he.slideIndex>=0&&he.slideIndex<ge.slides.length?he.slideIndex:-1:ge.slideIndex,Oe=async(ge,he,ye,Te,Ne={width:300,height:200})=>{const Ue=await ue(ge);return ve(he,Ue,ye,Te,Ne)},z=async()=>{const ge=H();ge&&await ge.addSnapshot()},ae=async(ge,he)=>{var Kt;if(!ge.src||!await oe())return null;const ye=Z(),Te=Q();if(!ye||!Te||!ye.slides.length)return null;const Ne=Me(ye,ge);if(Ne===-1)return null;const Ue=ye.slides[Ne].id;ye.slideIndex!==Ne&&ye.updateSlideIndex(Ne);const be=ye.viewportSize,Ye=ye.viewportSize*ye.viewportRatio,{width:We,height:rt}=await Oe(ge.src,ge,be,Ye),{nanoid:lt}=await Promise.resolve().then(()=>wie);if(!((Kt=i.value)!=null&&Kt.isConnected)||Z()!==ye)return null;const gt=ye.slides.findIndex(Ge=>Ge.id===Ue);if(gt===-1)return null;const tt={type:"image",id:lt(10),src:ge.src,width:We,height:rt,left:he?he.x-We/2:ge.left??(be-We)/2,top:he?he.y-rt/2:ge.top??(Ye-rt)/2,fixedRatio:ge.fixedRatio??!0,rotate:ge.rotate??0};return ye.addElement(tt,Ue),ge.select!==!1&&ye.slideIndex===gt&&Te.setActiveElementIdList([tt.id]),await z(),JSON.parse(JSON.stringify(tt))},le=ge=>ae(ge),U=ge=>Number.isFinite(ge.left)&&Number.isFinite(ge.top)&&Number.isFinite(ge.width)&&Number.isFinite(ge.height)&&ge.width>0&&ge.height>0,ee=(ge,he,ye)=>ge>=ye.left&&ge<ye.right&&he>=ye.top&&he<ye.bottom,ie=async ge=>{var Ge,un,Hr;const{clientX:he,clientY:ye}=ge,Te=ge.widthRatio??LIe;if(!ge.src||!Number.isFinite(he)||!Number.isFinite(ye)||!Number.isFinite(Te)||Te<=0||!await oe())return null;await l.nextTick();const Ne=Z();if(!Ne||!Ne.slides.length)return null;const Ue=(Ge=i.value)==null?void 0:Ge.querySelector("[data-lt-ppt-slide-viewport]");if(!Ue)return null;const be=Ue.getBoundingClientRect();if(!U(be)||!ee(he,ye,be))return null;const Ye=(un=i.value)==null?void 0:un.getBoundingClientRect();if(!Ye||!U(Ye)||!ee(he,ye,Ye))return null;const We=(Hr=Ue.parentElement)==null?void 0:Hr.getBoundingClientRect();if(We&&(!U(We)||!ee(he,ye,We)))return null;const rt=Ne.viewportSize,lt=rt*Ne.viewportRatio;if(!Number.isFinite(rt)||!Number.isFinite(lt)||rt<=0||lt<=0)return null;const gt=rt*Te;if(!Number.isFinite(gt)||gt<=0)return null;const tt=Ne.slides[Ne.slideIndex];if(!tt)return null;const Kt={x:(he-be.left)*rt/be.width,y:(ye-be.top)*lt/be.height};return ae({src:ge.src,slideId:tt.id,width:gt,fixedRatio:ge.fixedRatio,rotate:ge.rotate,select:ge.select},Kt)},pe=(ge,he,ye)=>{var Ye,We;const Te=!!ye.slideId||ye.slideIndex!==void 0,Ne=Me(ge,ye),Ue=ye.elementId||(he.activeElementIdList.length===1?he.activeElementIdList[0]:he.handleElementId);if(!Ue)return null;if(Te||!ye.elementId){if(Ne===-1)return null;const rt=(Ye=ge.slides[Ne])==null?void 0:Ye.elements.find(lt=>lt.id===Ue);return(rt==null?void 0:rt.type)==="image"?{slideIndex:Ne,element:rt}:null}const be=(We=ge.slides[ge.slideIndex])==null?void 0:We.elements.find(rt=>rt.id===Ue);if((be==null?void 0:be.type)==="image")return{slideIndex:ge.slideIndex,element:be};for(let rt=0;rt<ge.slides.length;rt++){const lt=ge.slides[rt].elements.find(gt=>gt.id===Ue);if((lt==null?void 0:lt.type)==="image")return{slideIndex:rt,element:lt}}return null},ce=async ge=>{if(!ge.src||!await oe())return null;const he=Z(),ye=Q();if(!he||!ye||!he.slides.length)return null;const Te=pe(he,ye,ge);if(!Te)return null;const{slideIndex:Ne,element:Ue}=Te,be={src:ge.src};if(ge.fixedRatio!==void 0&&(be.fixedRatio=ge.fixedRatio),ge.resetClip&&(be.clip=void 0),!(ge.keepSize===!0&&ge.width===void 0&&ge.height===void 0)){const rt=await ue(ge.src),lt=ke(ge.width,Ue.width);let gt=ke(ge.height,Ue.height);ge.height===void 0&&(rt!=null&&rt.width)&&rt.height&&(gt=lt*rt.height/rt.width),be.width=lt,be.height=gt,be.left=Ue.left,be.top=Ue.top,be.clip=void 0}const We=he.slides[Ne].id;return he.updateElement({id:Ue.id,props:be,slideId:We}),he.slideIndex!==Ne&&he.updateSlideIndex(Ne),ge.select!==!1&&ye.setActiveElementIdList([Ue.id]),await z(),JSON.parse(JSON.stringify({...Ue,...be}))},de=async ge=>{if(!ge.src||!await oe())return null;const he=Z(),ye=Q();if(!he||!ye||!he.slides.length)return null;const Te=Me(he,ge);if(Te===-1)return null;he.slideIndex!==Te&&he.updateSlideIndex(Te);const Ne=he.viewportSize,Ue=he.viewportSize*he.viewportRatio,be=await xe(ge.src),{width:Ye,height:We}=ve(ge,be,Ne,Ue,{width:500,height:300}),{nanoid:rt}=await Promise.resolve().then(()=>wie),lt={type:"video",id:rt(10),src:ge.src,width:Ye,height:We,left:ge.left??(Ne-Ye)/2,top:ge.top??(Ue-We)/2,rotate:ge.rotate??0,autoplay:ge.autoplay??!1};return ge.poster!==void 0&&(lt.poster=ge.poster),ge.ext&&(lt.ext=ge.ext),he.addElement(lt),ge.select!==!1&&ye.setActiveElementIdList([lt.id]),await z(),JSON.parse(JSON.stringify(lt))},Pe=(ge,he,ye)=>{var Ye,We;const Te=!!ye.slideId||ye.slideIndex!==void 0,Ne=Me(ge,ye),Ue=ye.elementId||(he.activeElementIdList.length===1?he.activeElementIdList[0]:he.handleElementId);if(!Ue)return null;if(Te||!ye.elementId){if(Ne===-1)return null;const rt=(Ye=ge.slides[Ne])==null?void 0:Ye.elements.find(lt=>lt.id===Ue);return(rt==null?void 0:rt.type)==="video"?{slideIndex:Ne,element:rt}:null}const be=(We=ge.slides[ge.slideIndex])==null?void 0:We.elements.find(rt=>rt.id===Ue);if((be==null?void 0:be.type)==="video")return{slideIndex:ge.slideIndex,element:be};for(let rt=0;rt<ge.slides.length;rt++){const lt=ge.slides[rt].elements.find(gt=>gt.id===Ue);if((lt==null?void 0:lt.type)==="video")return{slideIndex:rt,element:lt}}return null};return t({getSlides:()=>{const ge=Z();return ge?JSON.parse(JSON.stringify(ge.slides)):[]},getSelectedElements:()=>{const ge=Q();return ge?JSON.parse(JSON.stringify(ge.activeElementList)):[]},setSlides:ge=>{const he=Z();he&&he.setSlides(ge)},startScreening:()=>{if(!c||!f)return;f(c).setScreening(!0)},getCurrentIndex:()=>{const ge=Z();return ge?ge.slideIndex:0},hasUnsavedChanges:te,save:async()=>{if(!await oe())throw new Error("lt-ppt editor is not ready");if(await b.waitUntilReady(),!b.save)throw new Error("lt-ppt save is not available");await b.save()},downloadPPT:()=>{const ge=()=>{const he=Q();he==null||he.setDialogForExport("pptx")};if(!c&&p){p.then(ge);return}ge()},generateDeafultPPT:async()=>{if(!await oe()||!c)throw new Error("lt-ppt editor is not ready");const ge=Z();if(!ge)throw new Error("lt-ppt slides store is not ready");const{default:he}=await Promise.resolve().then(()=>EJe),{exportPPTX:ye}=he(ge),Te=await ye(ge.slides,!0,!1,!0);if(!Te)throw new Error("Failed to generate PPTX file");return Te},setMode:F,insertImage:le,insertImageFromDrag:ie,replaceImage:ce,insertVideo:de,replaceVideo:async ge=>{if(!ge.src||!await oe())return null;const he=Z(),ye=Q();if(!he||!ye||!he.slides.length)return null;const Te=Pe(he,ye,ge);if(!Te)return null;const{slideIndex:Ne,element:Ue}=Te,be={src:ge.src};if(ge.autoplay!==void 0&&(be.autoplay=ge.autoplay),ge.poster!==void 0&&(be.poster=ge.poster||void 0),ge.ext!==void 0&&(be.ext=ge.ext||void 0),!(ge.keepSize===!0&&ge.width===void 0&&ge.height===void 0)){const rt=await xe(ge.src),lt=ke(ge.width,Ue.width);let gt=ke(ge.height,Ue.height);ge.height===void 0&&(rt!=null&&rt.width)&&rt.height&&(gt=lt*rt.height/rt.width),be.width=lt,be.height=gt,be.left=Ue.left,be.top=Ue.top}const We=he.slides[Ne].id;return he.updateElement({id:Ue.id,props:be,slideId:We}),he.slideIndex!==Ne&&he.updateSlideIndex(Ne),ge.select!==!1&&ye.setActiveElementIdList([Ue.id]),await z(),JSON.parse(JSON.stringify({...Ue,...be}))}}),(ge,he)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"containerRef",ref:i,class:"lt-ppt-container",style:l.normalizeStyle(T.value),onImageAiEntryClick:W},null,36))}}),et=(e,t)=>{const n=e.__vccOpts||e;for(const[a,r]of t)n[a]=r;return n},OIe=et(EIe,[["__scopeId","data-v-b36d0f8d"]]),PIe=["SourceHanSans","SourceHanSerif","WenDingPLSongTi","AlibabaPuHuiTi","ZhuQueFangSong","LXGWWenKai","WenDingPLKaiTi","DeYiHei","MiSans","CangerXiaowanzi","YousheTitleBlack","FengguangMingrui","ShetuModernSquare","ZcoolHappy","ZizhiQuXiMai","SucaiJishiKangkang","SucaiJishiCoolSquare","TuniuRounded","RuiziZhenyan","SourceSerif4","Inter","JetBrainsMono","Literata","Roboto","OpenSans","Montserrat","SourceSansPro","Merriweather"],_Ie=(e="/fonts")=>{if(typeof document>"u"||!document.head)return;const t=e.replace(/\/$/,""),n=document.createElement("style");n.textContent=PIe.map(a=>`@font-face { font-display: swap; font-family: ${a}; src: url('${t}/${a}.woff2') format('woff2'); }`).join(`
27
+ }`;var Wn=hF(function(){return Fe(Re,zt+"return "+bt).apply(n,Ie)});if(Wn.source=bt,zS(Wn))throw Wn;return Wn}function Xee(x){return Ia(x).toLowerCase()}function i8(x){return Ia(x).toUpperCase()}function yg(x,k,B){if(x=Ia(x),x&&(B||k===n))return Nc(x);if(!x||!(k=vs(k)))return x;var j=Ui(x),se=Ui(k),Re=Wh(j,se),Ie=A2(j,se)+1;return dd(j,Re,Ie).join("")}function bg(x,k,B){if(x=Ia(x),x&&(B||k===n))return x.slice(0,V(x)+1);if(!x||!(k=vs(k)))return x;var j=Ui(x),se=A2(j,Ui(k))+1;return dd(j,0,se).join("")}function s8(x,k,B){if(x=Ia(x),x&&(B||k===n))return x.replace(wa,"");if(!x||!(k=vs(k)))return x;var j=Ui(x),se=Wh(j,Ui(k));return dd(j,se).join("")}function fF(x,k){var B=C,j=E;if(Sr(k)){var se="separator"in k?k.separator:se;B="length"in k?Un(k.length):B,j="omission"in k?vs(k.omission):j}x=Ia(x);var Re=x.length;if(ui(x)){var Ie=Ui(x);Re=Ie.length}if(B>=Re)return x;var Be=B-fi(j);if(Be<1)return j;var He=Ie?dd(Ie,0,Be).join(""):x.slice(0,Be);if(se===n)return He+j;if(Ie&&(Be+=He.length-Be),GS(se)){if(x.slice(Be).search(se)){var ht,pt=He;for(se.global||(se=Ke(se.source,Ia(Th.exec(se))+"g")),se.lastIndex=0;ht=se.exec(pt);)var bt=ht.index;He=He.slice(0,bt===n?Be:bt)}}else if(x.indexOf(vs(se),Be)!=Be){var Ft=He.lastIndexOf(se);Ft>-1&&(He=He.slice(0,Ft))}return He+j}function dF(x){return x=Ia(x),x&&un.test(x)?x.replace(Kt,X):x}var Uee=O0(function(x,k,B){return x+(B?" ":"")+k.toUpperCase()}),l8=vT("toUpperCase");function c8(x,k,B){return x=Ia(x),k=B?n:k,k===n?Cr(x)?ne(x):Xu(x):x.match(k)||[]}var hF=qn(function(x,k){try{return zr(x,n,k)}catch(B){return zS(B)?B:new _e(B)}}),Ag=Fl(function(x,k){return Gr(k,function(B){B=_c(B),zu(x,B,KS(x[B],x))}),x});function Wee(x){var k=x==null?0:x.length,B=sn();return x=k?Xa(x,function(j){if(typeof j[1]!="function")throw new je(i);return[B(j[0]),j[1]]}):[],qn(function(j){for(var se=-1;++se<k;){var Re=x[se];if(zr(Re[0],this,j))return zr(Re[1],this,j)}})}function pF(x){return B_(Js(x,d))}function rw(x){return function(){return x}}function vF(x,k){return x==null||x!==x?k:x}var mF=gT(),gF=gT(!0);function gs(x){return x}function u8(x){return qN(typeof x=="function"?x:Js(x,d))}function Yee(x){return tT(Js(x,d))}function Zee(x,k){return nT(x,Js(k,d))}var yF=qn(function(x,k){return function(B){return zh(B,x,k)}}),bF=qn(function(x,k){return function(B){return zh(x,B,k)}});function ow(x,k,B){var j=mo(k),se=lS(k,j);B==null&&!(Sr(k)&&(se.length||!j.length))&&(B=k,k=x,x=this,se=lS(k,mo(k)));var Re=!(Sr(B)&&"chain"in B)||!!B.chain,Ie=ju(x);return Gr(se,function(Be){var He=k[Be];x[Be]=He,Ie&&(x.prototype[Be]=function(){var ht=this.__chain__;if(Re||ht){var pt=x(this.__wrapped__),bt=pt.__actions__=Wi(this.__actions__);return bt.push({func:He,args:arguments,thisArg:x}),pt.__chain__=ht,pt}return He.apply(x,hs([this.value()],arguments))})}),x}function Kee(){return Qr._===this&&(Qr._=aa),this}function f8(){}function Hee(x){return x=Un(x),qn(function(k){return z_(k,x)})}var AF=wS(Xa),iw=wS(qm),sw=wS(Bh);function eb(x){return OS(x)?td(_c(x)):j_(x)}function RF(x){return function(k){return x==null?n:k0(x,k)}}var lw=bT(),d8=bT(!0);function cw(){return[]}function Rg(){return!1}function xF(){return{}}function uw(){return""}function SF(){return!0}function h8(x,k){if(x=Un(x),x<1||x>W)return[];var B=F,j=hi(x,F);k=sn(k),x-=F;for(var se=Xh(j,k);++B<x;)k(B);return se}function Qee(x){return _n(x)?Xa(x,_c):ms(x)?[x]:Wi(LT(Ia(x)))}function zee(x){var k=++Xt;return Ia(x)+k}var wF=SS(function(x,k){return x+k},0),fw=NS("ceil"),dw=SS(function(x,k){return x/k},1),hw=NS("floor");function MF(x){return x&&x.length?iS(x,gs,cS):n}function NF(x,k){return x&&x.length?iS(x,sn(k,2),cS):n}function pw(x){return R0(x,gs)}function vw(x,k){return R0(x,sn(k,2))}function p8(x){return x&&x.length?iS(x,gs,fg):n}function v8(x,k){return x&&x.length?iS(x,sn(k,2),fg):n}var m8=SS(function(x,k){return x*k},1),tb=NS("round"),xg=SS(function(x,k){return x-k},0);function mw(x){return x&&x.length?tg(x,gs):0}function Gee(x,k){return x&&x.length?tg(x,sn(k,2)):0}return me.after=H7,me.ary=WT,me.assign=CV,me.assignIn=n8,me.assignInWith=Q2,me.assignWith=kV,me.at=LV,me.before=YT,me.bind=KS,me.bindAll=Ag,me.bindKey=ZT,me.castArray=$7,me.chain=BT,me.chunk=MI,me.compact=NI,me.concat=TI,me.cond=Wee,me.conforms=pF,me.constant=rw,me.countBy=S7,me.create=EV,me.curry=KT,me.curryRight=HT,me.debounce=QT,me.defaults=OV,me.defaultsDeep=PV,me.defer=Ea,me.delay=Oa,me.difference=CI,me.differenceBy=kI,me.differenceWith=LI,me.drop=XS,me.dropRight=US,me.dropRightWhile=EI,me.dropWhile=OI,me.fill=PI,me.filter=M7,me.flatMap=C7,me.flatMapDeep=k7,me.flatMapDepth=L7,me.flatten=_T,me.flattenDeep=_I,me.flattenDepth=II,me.flip=ep,me.flow=mF,me.flowRight=gF,me.fromPairs=VI,me.functions=XV,me.functionsIn=UV,me.groupBy=E7,me.initial=DI,me.intersection=BI,me.intersectionBy=XI,me.intersectionWith=UI,me.invert=YV,me.invertBy=ZV,me.invokeMap=P7,me.iteratee=u8,me.keyBy=_7,me.keys=mo,me.keysIn=Zi,me.map=Y2,me.mapKeys=HV,me.mapValues=QV,me.matches=Yee,me.matchesProperty=Zee,me.memoize=Ic,me.merge=zV,me.mergeWith=a8,me.method=yF,me.methodOf=bF,me.mixin=ow,me.negate=_0,me.nthArg=Hee,me.omit=GV,me.omitBy=z2,me.once=HS,me.orderBy=I7,me.over=AF,me.overArgs=zT,me.overEvery=iw,me.overSome=sw,me.partial=QS,me.partialRight=GT,me.partition=V7,me.pick=G2,me.pickBy=J2,me.property=eb,me.propertyOf=RF,me.pull=KI,me.pullAll=VT,me.pullAllBy=HI,me.pullAllWith=QI,me.pullAt=zI,me.range=lw,me.rangeRight=d8,me.rearg=Q7,me.reject=B7,me.remove=xr,me.rest=z7,me.reverse=ur,me.sampleSize=U7,me.set=$S,me.setWith=j2,me.shuffle=W7,me.slice=X2,me.sortBy=K7,me.sortedUniq=GI,me.sortedUniqBy=JI,me.split=Bee,me.spread=G7,me.tail=jI,me.take=qI,me.takeRight=$I,me.takeRightWhile=e7,me.takeWhile=t7,me.tap=m7,me.throttle=J7,me.thru=W2,me.toArray=$T,me.toPairs=ew,me.toPairsIn=r8,me.toPath=Qee,me.toPlainObject=t8,me.transform=JV,me.unary=j7,me.union=n7,me.unionBy=a7,me.unionWith=r7,me.uniq=o7,me.uniqBy=i7,me.uniqWith=s7,me.unset=jV,me.unzip=ZS,me.unzipWith=DT,me.update=qV,me.updateWith=tw,me.values=np,me.valuesIn=$V,me.without=l7,me.words=c8,me.wrap=q7,me.xor=c7,me.xorBy=u7,me.xorWith=f7,me.zip=d7,me.zipObject=h7,me.zipObjectDeep=p7,me.zipWith=v7,me.entries=ew,me.entriesIn=r8,me.extend=n8,me.extendWith=Q2,ow(me,me),me.add=wF,me.attempt=hF,me.camelCase=tF,me.capitalize=o8,me.ceil=fw,me.clamp=_ee,me.clone=eV,me.cloneDeep=nV,me.cloneDeepWith=aV,me.cloneWith=tV,me.conformsTo=rV,me.deburr=q2,me.defaultTo=vF,me.divide=dw,me.endsWith=nF,me.eq=Dl,me.escape=Vee,me.escapeRegExp=gg,me.every=w7,me.find=N7,me.findIndex=OT,me.findKey=_V,me.findLast=T7,me.findLastIndex=PT,me.findLastKey=IV,me.floor=hw,me.forEach=XT,me.forEachRight=UT,me.forIn=VV,me.forInRight=FV,me.forOwn=DV,me.forOwnRight=BV,me.get=JS,me.gt=oV,me.gte=iV,me.has=WV,me.hasIn=jS,me.head=IT,me.identity=gs,me.includes=O7,me.indexOf=FI,me.inRange=Iee,me.invoke=KV,me.isArguments=tp,me.isArray=_n,me.isArrayBuffer=sV,me.isArrayLike=Yi,me.isArrayLikeObject=Br,me.isBoolean=lV,me.isBuffer=hd,me.isDate=cV,me.isElement=uV,me.isEmpty=fV,me.isEqual=dV,me.isEqualWith=hV,me.isError=zS,me.isFinite=pV,me.isFunction=ju,me.isInteger=JT,me.isLength=K2,me.isMap=jT,me.isMatch=vV,me.isMatchWith=mV,me.isNaN=gV,me.isNative=yV,me.isNil=AV,me.isNull=bV,me.isNumber=pd,me.isObject=Sr,me.isObjectLike=kr,me.isPlainObject=Bl,me.isRegExp=GS,me.isSafeInteger=RV,me.isSet=qT,me.isString=H2,me.isSymbol=ms,me.isTypedArray=I0,me.isUndefined=xV,me.isWeakMap=SV,me.isWeakSet=wV,me.join=WI,me.kebabCase=aF,me.last=$s,me.lastIndexOf=YI,me.lowerCase=rF,me.lowerFirst=oF,me.lt=MV,me.lte=NV,me.max=MF,me.maxBy=NF,me.mean=pw,me.meanBy=vw,me.min=p8,me.minBy=v8,me.stubArray=cw,me.stubFalse=Rg,me.stubObject=xF,me.stubString=uw,me.stubTrue=SF,me.multiply=m8,me.nth=ZI,me.noConflict=Kee,me.noop=f8,me.now=Z2,me.pad=nw,me.padEnd=iF,me.padStart=Fee,me.parseInt=sF,me.random=eF,me.reduce=F7,me.reduceRight=D7,me.repeat=$2,me.replace=lF,me.result=qS,me.round=tb,me.runInContext=re,me.sample=X7,me.size=Y7,me.snakeCase=Dee,me.some=Z7,me.sortedIndex=U2,me.sortedIndexBy=Oee,me.sortedIndexOf=Pee,me.sortedLastIndex=WS,me.sortedLastIndexBy=YS,me.sortedLastIndexOf=FT,me.startCase=cF,me.startsWith=aw,me.subtract=xg,me.sum=mw,me.sumBy=Gee,me.template=uF,me.times=h8,me.toFinite=qu,me.toInteger=Un,me.toLength=e8,me.toLower=Xee,me.toNumber=el,me.toSafeInteger=TV,me.toString=Ia,me.toUpper=i8,me.trim=yg,me.trimEnd=bg,me.trimStart=s8,me.truncate=fF,me.unescape=dF,me.uniqueId=zee,me.upperCase=Uee,me.upperFirst=l8,me.each=XT,me.eachRight=UT,me.first=IT,ow(me,function(){var x={};return Lc(me,function(k,B){ct.call(me.prototype,B)||(x[B]=k)}),x}(),{chain:!1}),me.VERSION=a,Gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(x){me[x].placeholder=me}),Gr(["drop","take"],function(x,k){ra.prototype[x]=function(B){B=B===n?1:so(Un(B),0);var j=this.__filtered__&&!k?new ra(this):this.clone();return j.__filtered__?j.__takeCount__=hi(B,j.__takeCount__):j.__views__.push({size:hi(B,F),type:x+(j.__dir__<0?"Right":"")}),j},ra.prototype[x+"Right"]=function(B){return this.reverse()[x](B).reverse()}}),Gr(["filter","map","takeWhile"],function(x,k){var B=k+1,j=B==O||B==I;ra.prototype[x]=function(se){var Re=this.clone();return Re.__iteratees__.push({iteratee:sn(se,3),type:B}),Re.__filtered__=Re.__filtered__||j,Re}}),Gr(["head","last"],function(x,k){var B="take"+(k?"Right":"");ra.prototype[x]=function(){return this[B](1).value()[0]}}),Gr(["initial","tail"],function(x,k){var B="drop"+(k?"":"Right");ra.prototype[x]=function(){return this.__filtered__?new ra(this):this[B](1)}}),ra.prototype.compact=function(){return this.filter(gs)},ra.prototype.find=function(x){return this.filter(x).head()},ra.prototype.findLast=function(x){return this.reverse().find(x)},ra.prototype.invokeMap=qn(function(x,k){return typeof x=="function"?new ra(this):this.map(function(B){return zh(B,x,k)})}),ra.prototype.reject=function(x){return this.filter(_0(sn(x)))},ra.prototype.slice=function(x,k){x=Un(x);var B=this;return B.__filtered__&&(x>0||k<0)?new ra(B):(x<0?B=B.takeRight(-x):x&&(B=B.drop(x)),k!==n&&(k=Un(k),B=k<0?B.dropRight(-k):B.take(k-x)),B)},ra.prototype.takeRightWhile=function(x){return this.reverse().takeWhile(x).reverse()},ra.prototype.toArray=function(){return this.take(F)},Lc(ra.prototype,function(x,k){var B=/^(?:filter|find|map|reject)|While$/.test(k),j=/^(?:head|last)$/.test(k),se=me[j?"take"+(k=="last"?"Right":""):k],Re=j||/^find/.test(k);se&&(me.prototype[k]=function(){var Ie=this.__wrapped__,Be=j?[1]:arguments,He=Ie instanceof ra,ht=Be[0],pt=He||_n(Ie),bt=function(zn){var ea=se.apply(me,hs([zn],Be));return j&&Ft?ea[0]:ea};pt&&B&&typeof ht=="function"&&ht.length!=1&&(He=pt=!1);var Ft=this.__chain__,zt=!!this.__actions__.length,ln=Re&&!Ft,Wn=He&&!zt;if(!Re&&pt){Ie=Wn?Ie:new ra(this);var fn=x.apply(Ie,Be);return fn.__actions__.push({func:W2,args:[bt],thisArg:n}),new zs(fn,Ft)}return ln&&Wn?x.apply(this,Be):(fn=this.thru(bt),ln?j?fn.value()[0]:fn.value():fn)})}),Gr(["pop","push","shift","sort","splice","unshift"],function(x){var k=ze[x],B=/^(?:push|sort|unshift)$/.test(x)?"tap":"thru",j=/^(?:pop|shift)$/.test(x);me.prototype[x]=function(){var se=arguments;if(j&&!this.__chain__){var Re=this.value();return k.apply(_n(Re)?Re:[],se)}return this[B](function(Ie){return k.apply(_n(Ie)?Ie:[],se)})}}),Lc(ra.prototype,function(x,k){var B=me[k];if(B){var j=B.name+"";ct.call(sd,j)||(sd[j]=[]),sd[j].push({name:k,func:B})}}),sd[O2(n,y).name]=[{name:"wrapper",func:n}],ra.prototype.clone=k_,ra.prototype.reverse=Ku,ra.prototype.value=mee,me.prototype.at=g7,me.prototype.chain=y7,me.prototype.commit=b7,me.prototype.next=A7,me.prototype.plant=vg,me.prototype.reverse=mg,me.prototype.toJSON=me.prototype.valueOf=me.prototype.value=x7,me.prototype.first=me.prototype.head,S0&&(me.prototype[S0]=R7),me},Se=fe();Vu?((Vu.exports=Se)._=Se,Iu._=Se):Qr._=Se}).call(Ht)}(YC,YC.exports);var Ja=YC.exports,ZC=(e=>(e.RECT="rect",e.ELLIPSE="ellipse",e.POLYGON="polygon",e))(ZC||{});const y4={rect:{name:"矩形",type:"rect",radius:"0",style:""},rect2:{name:"矩形2",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 0 100%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L 0 ${t} Z`},rect3:{name:"矩形3",type:"polygon",style:"polygon(0% 0%, 80% 0%, 100% 20%, 100% 100%, 20% 100%, 0% 80%)",createPath:(e,t)=>`M 0 0 L ${e*.8} 0 L ${e} ${t*.2} L ${e} ${t} L ${e*.2} ${t} L 0 ${t*.8} Z`},roundRect:{name:"圆角矩形",type:"rect",radius:"10px",style:"inset(0 round 10px)"},ellipse:{name:"圆形",type:"ellipse",style:"ellipse(50% 50% at 50% 50%)"},triangle:{name:"三角形",type:"polygon",style:"polygon(50% 0%, 0% 100%, 100% 100%)",createPath:(e,t)=>`M ${e*.5} 0 L 0 ${t} L ${e} ${t} Z`},triangle2:{name:"三角形2",type:"polygon",style:"polygon(50% 100%, 0% 0%, 100% 0%)",createPath:(e,t)=>`M ${e*.5} ${t} L 0 0 L ${e} 0 Z`},triangle3:{name:"三角形3",type:"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:"polygon",style:"polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${t*.5} L ${e*.5} ${t} L 0 ${t*.5} Z`},pentagon:{name:"五边形",type:"polygon",style:"polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e} ${.38*t} L ${.82*e} ${t} L ${.18*e} ${t} L 0 ${.38*t} Z`},hexagon:{name:"六边形",type:"polygon",style:"polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%)",createPath:(e,t)=>`M ${e*.2} 0 L ${e*.8} 0 L ${e} ${t*.5} L ${e*.8} ${t} L ${e*.2} ${t} L 0 ${t*.5} Z`},heptagon:{name:"七边形",type:"polygon",style:"polygon(50% 0%, 90% 20%, 100% 60%, 75% 100%, 25% 100%, 0% 60%, 10% 20%)",createPath:(e,t)=>`M ${e*.5} 0 L ${e*.9} ${t*.2} L ${e} ${t*.6} L ${e*.75} ${t} L ${e*.25} ${t} L 0 ${t*.6} L ${e*.1} ${t*.2} Z`},octagon:{name:"八边形",type:"polygon",style:"polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e*.7} 0 L ${e} ${t*.3} L ${e} ${t*.7} L ${e*.7} ${t} L ${e*.3} ${t} L 0 ${t*.7} L 0 ${t*.3} Z`},chevron:{name:"V形",type:"polygon",style:"polygon(75% 0%, 100% 50%, 75% 100%, 0% 100%, 25% 50%, 0% 0%)",createPath:(e,t)=>`M ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} L ${e*.25} ${t*.5} L 0 0 Z`},point:{name:"点",type:"polygon",style:"polygon(0% 0%, 75% 0%, 100% 50%, 75% 100%, 0% 100%)",createPath:(e,t)=>`M 0 0 L ${e*.75} 0 L ${e} ${t*.5} L ${e*.75} ${t} L 0 ${t} Z`},arrow:{name:"箭头",type:"polygon",style:"polygon(0% 20%, 60% 20%, 60% 0%, 100% 50%, 60% 100%, 60% 80%, 0% 80%)",createPath:(e,t)=>`M 0 ${t*.2} L ${e*.6} ${t*.2} L ${e*.6} 0 L ${e} ${t*.5} L ${e*.6} ${t} L ${e*.6} ${t*.8} L 0 ${t*.8} Z`},parallelogram:{name:"平行四边形",type:"polygon",style:"polygon(30% 0%, 100% 0%, 70% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.3} 0 L ${e} 0 L ${e*.7} ${t} L 0 ${t} Z`},parallelogram2:{name:"平行四边形2",type:"polygon",style:"polygon(30% 100%, 100% 100%, 70% 0%, 0% 0%)",createPath:(e,t)=>`M ${e*.3} ${t} L ${e} ${t} L ${e*.7} 0 L 0 0 Z`},trapezoid:{name:"梯形",type:"polygon",style:"polygon(25% 0%, 75% 0%, 100% 100%, 0% 100%)",createPath:(e,t)=>`M ${e*.25} 0 L ${e*.75} 0 L ${e} ${t} L 0 ${t} Z`},trapezoid2:{name:"梯形2",type:"polygon",style:"polygon(0% 0%, 100% 0%, 75% 100%, 25% 100%)",createPath:(e,t)=>`M 0 0 L ${e} 0 L ${e*.75} ${t} L ${e*.25} ${t} Z`}},b4=Symbol(),yW=Symbol(),cre=Symbol(),ure=Symbol(),A4=Symbol(),fre=Symbol(),MIe={common:{close:"关闭",cancel:"取消",confirm:"确认",save:"保存",delete:"删除",remove:"移除",edit:"编辑",copy:"复制",cut:"剪切",paste:"粘贴",selectAll:"全选",loading:"加载中...",exporting:"正在导出...",importing:"正在导入...",saving:"正在保存...",success:"成功",error:"错误",warning:"警告",info:"提示",untitledPresentation:"未命名演示文稿"},header:{back:"返回",aippt:"AIPPT",aipptSubtitle:"输入一句话,智能生成演示文稿",importFile:"导入文件",pptxTest:"(仅供测试)",pptistFormat:"(专属格式)",exportFile:"导出文件",resetSlides:"重置幻灯片",slideMarkup:"幻灯片类型标注",shortcuts:"快捷操作",feedback:"意见反馈",faq:"常见问题",disclaimer:"注:本站仅作测试/演示,不提供任何形式的服务",slideshow:"幻灯片放映",slideshowF5:"幻灯片放映(F5)",aiGenerate:"AI生成PPT",export:"导出",download:"下载",save:"保存",fromStart:"从头开始",fromCurrent:"从当前页开始"},canvasTool:{undo:"撤销",undoShortcut:"撤销(Ctrl + Z)",redo:"重做",redoShortcut:"重做(Ctrl + Y)",remarkPanel:"批注面板",selectPanel:"选择窗格",searchReplace:"查找/替换(Ctrl + F)",insertText:"插入文字",textbox:"文本框",horizontalText:"横向文本框",verticalText:"竖向文本框",insertShape:"插入形状",shape:"形状",presetShape:"预设形状",freeDraw:"自由绘制",insertImage:"插入图片",image:"图片",uploadImage:"上传图片",uploadLocalImage:"从本地上传",onlineLibrary:"在线图库",insertLine:"插入线条",line:"线条",insertChart:"插入图表",chart:"图表",insertTable:"插入表格",table:"表格",insertFormula:"插入公式",formula:"公式",insertMedia:"插入音视频",media:"音视频",insertVideo:"插入视频",video:"视频",insertSymbol:"插入符号",symbol:"符号",zoomOut:"画布缩小",zoomOutShortcut:"画布缩小(Ctrl + -)",zoomIn:"画布放大",zoomInShortcut:"画布放大(Ctrl + =)",fitScreen:"适应屏幕",fitScreenShortcut:"适应屏幕(Ctrl + 0)"},miniStatus:{pagePrefix:"第",pageUnit:"页",totalPrefix:"共"},exportDialog:{exportPptist:"导出 PPTIST 文件",exportPptx:"导出 PPTX",exportImage:"导出图片",exportJson:"导出 JSON",exportPdf:"打印 / 导出 PDF",exportPdf2:"导出 PDF",exportFormat:"导出格式:",exportRange:"导出范围:",all:"全部",currentPage:"当前页",custom:"自定义",customRange:"自定义范围:",imageQuality:"图片质量:",pdfQuality:"PDF质量:",ignoreOnlineFont:"忽略在线字体:",ignoreOnlineFontTip:"导出时默认忽略在线字体,若您在幻灯片中使用了在线字体,且希望导出后保留相关样式,可选择关闭「忽略在线字体」选项,但要注意这将会增加导出用时。",exportImageBtn:"导出图片",perPageCount:"每页数量:",marginBlank:"边缘留白:",printTip:"建议:请在弹出的打印窗口中勾选「背景图形」选项,边距选择「默认」。",printExportPdf:"打印 / 导出 PDF",downloadPdf:"导出 PDF",downloadPptist:"导出 PPTIST 文件",downloadPptx:"导出 PPTX",downloadJson:"导出 JSON",copyJson:"复制 JSON",exportMode:"导出模式:",standardMode:"标准版",imageMode:"纯图版",ignoreMedia:"忽略音频/视频:",ignoreMediaTip:"导出时默认忽略音视频,若您的幻灯片中存在音视频元素,且希望将其导出到PPTX文件中,可选择关闭「忽略音视频」选项,但要注意这将会大幅增加导出用时。",overwriteMaster:"覆盖默认母版:",mediaTip:"提示:1. 支持导出格式:avi、mp4、mov、wmv、mp3、wav;2. 跨域资源无法导出。",pptistTip:"提示:.pptist 是本应用的特有文件后缀,支持将该类型的文件导入回应用中。"},aiDialog:{step1Prefix:"从下方挑选合适的模板生成PPT,或",step1Link:"使用本地模板生成",step1Tooltip:"上传.pptist格式模板文件",step2:"确认下方内容大纲(点击编辑内容,右键添加/删除大纲项),开始选择模板",step3:"在下方输入您的PPT主题,并适当补充信息,如行业、岗位、学科、用途等",inputPlaceholder:"请输入PPT主题,如:大学生职业生涯规划",language:"语言:",chinese:"中文",english:"英文",japanese:"日文",style:"风格:",general:"通用",academic:"学术风",professional:"职场风",educational:"教育风",marketing:"营销风",model:"模型:",illustration:"配图:",none:"无",mockTest:"模拟测试",aiSearch:"AI搜图",aiGenerate:"AI生图",overwriteSlides:"覆盖已有幻灯片",aiGenerateBtn:"AI 生成",selectTemplate:"选择模板",regenerate:"返回重新生成",generate:"生成",backToOutline:"返回大纲",generating:"AI生成中,请耐心等待 ...",creatingSlides:"演示文稿生成中,请稍等 ...",apiOverload:"该模型API的并发数过高,请更换其他模型重试",templateError:"上传的模板文件数据异常,请重新上传或使用预置模板",inputThemeFirst:"请先输入PPT主题",recommendTopics:{tech2025:"2025科技前沿动态",bigData:"大数据如何改变世界",catering:"餐饮市场调查与研究",aigcEducation:"AIGC在教育领域的应用",socialMedia:"社交媒体与品牌营销",fiveG:"5G技术如何改变我们的生活",workSummary:"年度工作总结与展望",blockchain:"区块链技术及其应用",careerPlan:"大学生职业生涯规划",annualMeeting:"公司年会策划方案"}},thumbnails:{addSlide:"添加幻灯片",inputSectionName:"输入节名称",untitledSection:"无标题节",defaultSection:"默认节",slideOf:"幻灯页",total:"总数",deleteSection:"删除节",deleteSectionAndSlides:"删除节和幻灯片",deleteAllSections:"删除所有节",renameSection:"重命名节",newPage:"新建页面",copyPage:"复制页面",deletePage:"删除页面",addSection:"增加节",playCurrent:"从当前放映"},search:{find:"查找",replace:"替换",inputFindContent:"输入查找内容",inputReplaceContent:"输入替换内容",ignoreCase:"忽略大小写",previous:"上一个",next:"下一个",replaceBtn:"替换",replaceAll:"全部替换"},screen:{penTool:"画笔工具",laserPointer:"激光笔",timer:"计时器",presenterView:"演讲者视图",exitFullscreen:"退出全屏",enterFullscreen:"进入全屏",endShow:"结束放映",slideOf:"幻灯片",previousPage:"上一页",nextPage:"下一页",firstPage:"第一页",lastPage:"最后一页",cancelAutoPlay:"取消自动放映",autoPlay:"自动放映",loopPlay:"循环放映",showToolbar:"显示工具栏",viewAllSlides:"查看所有幻灯片",bottomThumbnails:"触底显示缩略图",seconds:"秒",normalView:"普通视图",fullscreen:"全屏",speakerNotes:"演讲者备注",noNotes:"无备注",pen:"画笔",inkThickness:"墨迹粗细:",shape:"形状",highlighter:"荧光笔",eraser:"橡皮擦",eraserSize:"橡皮大小:",clearInk:"清除墨迹",blackboard:"黑板",closePen:"关闭画笔",pause:"暂停",start:"开始",reset:"重置",countdown:"倒计时"},mobile:{undo:"撤销",redo:"重做",exitEdit:"退出编辑",speakerNotes:"点击输入演讲者备注",newSlide:"新幻灯片",copy:"复制",delete:"删除",text:"文字",image:"图片",rectangle:"矩形",circle:"圆形",newText:"新添加文本",style:"样式",layout:"布局",fontColor:"文字颜色:",fillColor:"填充色:",noAvailableProps:"暂无可用属性",toTop:"置顶",toBottom:"置底",moveUp:"上移",moveDown:"下移",alignLeft:"左对齐",alignHorizontalCenter:"水平居中",alignRight:"右对齐",alignTop:"上对齐",alignVerticalCenter:"垂直居中",alignBottom:"下对齐"},toolbar:{slideDesign:"页面设计",animation:"动画",position:"位置",style:"样式",background:"背景",fillColor:"填充颜色",noFill:"无填充",presetBackground:"预设背景",customColor:"自定义颜色",gradient:"渐变",image:"图片",applyToAll:"应用到全部",slideSize:"页面尺寸",widescreen16_9:"宽屏 16 : 9",widescreen16_10:"宽屏 16 : 10",standard4_3:"标准 4 : 3",customSize:"自定义尺寸",width:"宽度",height:"高度",apply:"应用",ruler:"标尺",showRuler:"显示标尺",remark:"批注",remarkPlaceholder:"输入批注(为选中元素/当前页幻灯片)",replyPlaceholder:"输入回复内容",confirm:"确认",fontFamily:"字体",fontSize:"字号",bold:"加粗",italic:"斜体",underline:"下划线",strikethrough:"删除线",fontColor:"字体颜色",highlight:"文字高亮",alignLeft:"左对齐",alignCenter:"居中",alignRight:"右对齐",alignJustify:"两端对齐",bulletList:"项目符号",numberedList:"编号列表",increaseIndent:"增加缩进",decreaseIndent:"减少缩进",lineSpacing:"行间距",paragraphSpacing:"段间距",clearFormat:"清除格式",format:"格式",colorMask:"色彩蒙版",filter:"滤镜",flip:"翻转",horizontalFlip:"水平翻转",verticalFlip:"垂直翻转",opacity:"透明度",outline:"边框",shadow:"阴影",shadowColor:"阴影颜色",blur:"模糊",offsetX:"X偏移",offsetY:"Y偏移",imageCrop:"裁剪图片",replaceImage:"替换图片",resetImage:"重置图片",setAsBackground:"设为背景图",link:"超链接",linkUrl:"链接地址",linkPlaceholder:"请输入超链接",lineStyle:"线条样式",lineColor:"线条颜色",lineWidth:"线条粗细",startArrow:"起点箭头",endArrow:"终点箭头",chartType:"图表类型",barChart:"柱状图",horizontalBarChart:"条形图",lineChart:"折线图",areaChart:"面积图",scatterChart:"散点图",pieChart:"饼图",doughnutChart:"环形图",radarChart:"雷达图",chartData:"图表数据",themeColors:"主题色",gridLines:"网格线",legend:"图例",legendPosition:"图例位置",top:"上",bottom:"下",left:"左",right:"右",tableStyle:"表格样式",headerRow:"标题行",totalRow:"汇总行",firstColumn:"首列",lastColumn:"末列",bandedRows:"镶边行",bandedColumns:"镶边列",addRow:"添加行",addColumn:"添加列",deleteRow:"删除行",deleteColumn:"删除列",mergeCells:"合并单元格",splitCells:"拆分单元格",videoCover:"视频封面",autoPlay:"自动播放",loop:"循环播放",mute:"静音",latexPlaceholder:"输入LaTeX公式",positionX:"X 位置",positionY:"Y 位置",elementWidth:"宽度",elementHeight:"高度",rotation:"旋转",lock:"锁定",unlock:"解锁",lockRatio:"锁定比例",order:"层级",bringToFront:"置于顶层",sendToBack:"置于底层",bringForward:"上移一层",sendBackward:"下移一层",align:"对齐",alignTop:"顶端对齐",alignMiddle:"垂直居中",alignBottom:"底端对齐",distributeHorizontally:"横向分布",distributeVertically:"纵向分布",group:"组合",ungroup:"取消组合",combine:"合并形状",enterAnimation:"入场动画",exitAnimation:"退场动画",emphasisAnimation:"强调动画",animationDuration:"动画时长",animationDelay:"动画延迟",animationTrigger:"触发方式",onClick:"单击时",withPrevious:"与上一动画同时",afterPrevious:"上一动画之后",addAnimation:"添加动画",removeAnimation:"删除动画",playAnimation:"播放动画",slideAnimation:"切页动画",noAnimation:"无",random:"随机",multiSelect:"(多选)",design:"设计",transition:"切换",backgroundFill:"背景填充",solidFill:"纯色填充",imageFill:"图片填充",gradientFill:"渐变填充",scale:"缩放",tile:"拼贴",scaleFill:"缩放铺满",linearGradient:"线性渐变",radialGradient:"径向渐变",currentColorBlock:"当前色块:",gradientAngle:"渐变角度:",applyBackgroundToAll:"应用背景到全部",paperA3A4:"纸张 A3 / A4",verticalA3A4:"竖向 A3 / A4",canvasSize:"画布尺寸:",globalTheme:"全局主题",more:"更多",font:"字体:",searchFont:"搜索字体",fontColorLabel:"字体颜色:",backgroundColorLabel:"背景颜色:",themeColorLabel:"主题色:",enableOutline:"启用边框",outlineStyle:"边框样式:",outlineColor:"边框颜色:",outlineWidth:"边框粗细:",horizontalShadow:"水平阴影:",verticalShadow:"垂直阴影:",blurDistance:"模糊距离:",shadowColorLabel:"阴影颜色:",applyThemeToAll:"应用主题到全部",unifyFont:"全局统一字体",extractTheme:"从幻灯片提取主题",presetTheme:"预置主题",textAa:"文字 Aa",set:"设置",setAndApply:"设置并应用",appliedToAll:"已应用到全部",layerOrder:"层级:",toTop:"置顶",toBottom:"置底",moveUp:"上移",moveDown:"下移",alignLabel:"对齐:",horizontal:"水平:",vertical:"垂直:",widthLabel:"宽度:",heightLabel:"高度:",unlockRatio:"解除宽高比锁定",lockRatioLabel:"宽高比锁定",rotationLabel:"旋转:",selectElementAddAnimation:"选中画布中的元素添加动画",enter:"入场",exit:"退场",emphasis:"强调",durationLabel:"持续时长:",triggerLabel:"触发方式:",manualTrigger:"主动触发",withPreviousAnimation:"与上一动画同时",afterPreviousAnimation:"上一动画之后",changeAnimation:"更换动画",preview:"预览",delete:"删除",stopPreview:"停止预览",previewAll:"预览全部",enableShadow:"启用阴影",fillColorLabel:"填充颜色:",colorMaskLabel:"着色(蒙版)",maskColor:"蒙版颜色",outlineStyleLabel:"边框样式:",outlineColorLabel:"边框颜色:",outlineWidthLabel:"边框粗细:",textColor:"文字颜色",textHighlight:"文字高亮",increaseFontSize:"增大字号",decreaseFontSize:"减小字号",searchFontSize:"搜索字号",horizontallyCenter:"水平居中",verticallyCenter:"垂直居中",horizontalDistribute:"水平均匀分布",verticalDistribute:"垂直均匀分布",bigTitle:"大标题",smallTitle:"小标题",bodyText:"正文",bodyTextSmall:"正文[小]",annotation1:"注释 1",annotation2:"注释 2",lineHeightLabel:"行间距:",paragraphSpaceLabel:"段间距:",wordSpaceLabel:"字间距:",textboxFill:"文本框填充:",times:"倍",cropImage:"裁剪图片",byShape:"按形状:",aspectRatioSquare:"纵横比(正方形)",aspectRatioPortrait:"纵横比(纵向)",aspectRatioLandscape:"纵横比(横向)",borderRadius:"圆角半径:",quoteToChat:"引用到聊天",replaceImageBtn:"替换图片",resetStyleBtn:"重置样式",setAsBackgroundBtn:"设为背景",clickToReplaceShape:"点击替换形状",solidFillOption:"纯色填充",gradientFillOption:"渐变填充",imageFillOption:"图片填充",linearGradientOption:"线性渐变",radialGradientOption:"径向渐变",alignTopText:"顶对齐",alignCenterText:"居中",alignBottomText:"底对齐",doubleclickContinuousUse:"双击连续使用",shapeFormatPainter:"形状格式刷",lineStyleLabel:"线条样式:",lineColorLabel:"线条颜色:",lineWidthLabel:"线条宽度:",startPointStyle:"起点样式:",endPointStyle:"终点样式:",swapDirection:"交换方向",searchFontLabel:"搜索字体",searchFontSizeLabel:"搜索字号",textColorTooltip:"文字颜色",cellFill:"单元格填充",boldTooltip:"加粗",italicTooltip:"斜体",underlineTooltip:"下划线",strikethroughTooltip:"删除线",alignLeftTooltip:"左对齐",alignCenterTooltip:"居中",alignRightTooltip:"右对齐",alignJustifyTooltip:"两端对齐",rowCount:"行数:",colCount:"列数:",enableThemeTable:"启用主题表格:",headerRowLabel:"标题行",totalRowLabel:"汇总行",firstColumnLabel:"第一列",lastColumnLabel:"最后一列",themeColorLabelTable:"主题颜色:",editChart:"编辑图表",stackedStyle:"堆叠样式",useSmoothCurve:"使用平滑曲线",backgroundFillLabel:"背景填充:",axisAndText:"坐标与文字:",gridColorLabel:"网格颜色:",themeColorScheme:"主题配色:",presetChartThemes:"预置图表主题:",slideTheme:"幻灯片主题:",customColorScheme:"自定义配色",videoPosterCover:"视频预览封面",setFirstFrameAsCover:"设置首帧为封面",resetCover:"重置封面",autoPlayLabel:"自动播放:",iconColorLabel:"图标颜色:",loopPlayLabel:"循环播放:",editLatex:"编辑 LaTeX",colorLabel:"颜色:",strokeWidthLabel:"粗细:",enableFilter:"启用滤镜",filterBlur:"模糊",filterBrightness:"亮度",filterContrast:"对比度",filterGrayscale:"灰度",filterSaturate:"饱和度",filterHueRotate:"色相旋转",filterSepia:"深褐色",filterInvert:"反色",filterOpacity:"透明度",presetBlackWhite:"黑白",presetVintage:"复古",presetSharpen:"锐化",presetSoft:"柔和",presetWarm:"暖色",presetBright:"明亮",presetVivid:"鲜艳",presetBlur:"模糊",presetInvert:"反色",superscript:"上标",subscript:"下标",inlineCode:"行内代码",quote:"引用",aiBeautify:"美化改写",aiExpand:"扩写丰富",aiCondense:"精简提炼",aiAssist:"AI 辅助",formatPainterDoubleClick:"格式刷(双击连续使用)",invalidLinkUrl:"请输入正确的链接地址",decreaseFirstLineIndent:"减少首行缩进",increaseFirstLineIndent:"增加首行缩进",noTextContent:"没有可处理的文本内容",aiModelOverload:"该模型API的并发数过高,请更换其他模型重试",editThemeColors:"编辑主题色",slideThemeColor:"幻灯片主题色",extractFromCurrent:"从当前页中提取",extractFromAll:"从全部幻灯片提取",fontLabel:"字体:",fontColorExtract:"文字颜色:",backgroundColorExtract:"背景颜色:",themeColorExtract:"主题色:",clickToExcludeColor:"(点击色块排除不要的颜色)",selectStyle:"选择",applyToTheme:"应用到主题",saveAsTheme:"将选中配置保存为主题",themeColorLimit:"主题色超出数量限制,已自动选取前6个",chartTypeLabel:"图表类型:",clickToChange:"点击更换",clearData:"清空数据",category:"类别",series:"系列",chartThemeColors:"图表主题配色",themeColorN:"主题配色",addThemeColor:"添加主题色"},element:{text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"},contextmenu:{cut:"剪切",copy:"复制",paste:"粘贴",selectAll:"全选",delete:"删除",lock:"锁定",unlock:"解锁",copyStyle:"复制样式",pasteStyle:"粘贴样式",resetStyle:"重置样式",bringToFront:"置于顶层",sendToBack:"置于底层",bringForward:"上移一层",sendBackward:"下移一层",group:"组合",ungroup:"取消组合",combine:"合并形状",union:"联合",intersect:"相交",subtract:"减去",exclude:"排除",setAsBackground:"设为背景",createLink:"创建超链接",editLink:"编辑超链接",removeLink:"移除超链接"},app:{initLoading:"数据初始化中,请稍等 ..."},notesPanel:{title:"幻灯片{index}的批注",reply:"回复",delete:"删除",inputReplyContent:"输入回复内容",cancel:"取消",noNotes:"本页暂无批注",inputNotePlaceholder:"输入批注(为{target})",selectedElement:"选中元素",currentSlide:"当前页幻灯片",clearNotes:"清空本页批注",addNote:"添加批注",testUser:"测试用户"},imageLib:{title:"图片库(来自 pexels.com)",searchPlaceholder:"搜索图片",searching:"搜索中...",noResults:"没有找到相关图片",insert:"插入",all:"全部",landscape:"横向",portrait:"纵向",square:"方形",inputKeyword:"请输入搜索关键词",defaultSearch:"风景"},linkDialog:{title:"插入超链接",linkText:"链接文字",linkUrl:"链接地址",slideLink:"幻灯片链接",webLink:"网页链接",selectSlide:"选择幻灯片",slide:"幻灯片 {n}",webLinkPlaceholder:"请输入网页链接地址",preview:"预览:"},mediaInput:{videoPlaceholder:"请输入视频地址,e.g. https://xxx.mp4",audioPlaceholder:"请输入音频地址,e.g. https://xxx.mp3",video:"视频",audio:"音频",uploadLocalVideo:"上传本地视频",uploadLocalAudio:"上传本地音频",enterVideoUrl:"请先输入正确的视频地址",enterAudioUrl:"请先输入正确的音频地址"},hotkeyDoc:{title:"快捷键说明",general:"通用",editing:"编辑",slideshow:"放映",description:"说明",shortcut:"快捷键",typeGeneral:"通用",typeSlideshow:"幻灯片放映",typeSlideEditing:"幻灯片编辑",typeElementOps:"元素操作",typeTextEditing:"文本编辑",cut:"剪切",copy:"复制",paste:"粘贴",pasteAsPlainText:"粘贴为纯文本",quickCopyPaste:"快速复制粘贴",selectAll:"全选",undo:"撤销",restore:"恢复",delete:"删除",multiSelect:"多选",closeDialog:"关闭弹窗",startFromBeginning:"从头开始放映幻灯片",startFromCurrent:"从当前开始放映幻灯片",prevPage:"切换上一页",nextPage:"切换下一页",exitSlideshow:"退出放映",newSlide:"新建幻灯片",moveCanvas:"移动画布",zoomCanvas:"缩放画布",zoomIn:"放大画布",zoomOut:"缩小画布",fitScreen:"使画布适应当前屏幕",prevPageNoElement:"上一页(未选中元素)",nextPageNoElement:"下一页(未选中元素)",prevPageScroll:"上一页",nextPageScroll:"下一页",quickCreateText:"快速创建文本",quickCreateRect:"快速创建矩形",quickCreateCircle:"快速创建圆形",quickCreateLine:"快速创建线条",exitDraw:"退出绘制状态",move:"移动",lock:"锁定",group:"组合",ungroup:"取消组合",bringToFront:"置顶层",sendToBack:"置底层",lockRatio:"锁定宽高比例",createStraightLine:"创建水平 / 垂直线条",switchFocusElement:"切换焦点元素",confirmCrop:"确认图片裁剪",bold:"加粗",italic:"斜体",underline:"下划线",inlineCode:"行内代码",superscript:"上角标",subscript:"下角标",selectParagraph:"选中段落",holdCtrlOrShift:"按住 Ctrl 或 Shift",spacePlusDrag:"Space + 鼠标拖拽",ctrlPlusMouseWheel:"Ctrl + 鼠标滚轮",doubleClickBlankOrT:"双击空白处 / T",rightMouseClick:"鼠标右键",mouseScrollUpOrPgUp:"鼠标上滚 / PgUp",mouseScrollDownOrPgDown:"鼠标下滚 / PgDown"},symbolPanel:{title:"插入符号",emoji:"表情",arrows:"箭头",math:"数学",special:"特殊符号",emojiCategories:{faces:"表情",gestures:"动作",animals:"动植物",food:"食物",travel:"旅行",activities:"活动",objects:"物品",symbols:"符号"}},selectPanel:{title:"选择窗格",titleWithCount:"选择({active}/{total})",showAll:"全部显示",hideAll:"全部隐藏",group:"组合",noContent:"本页无内容"},markupPanel:{title:"幻灯片类型标注",currentPageType:"当前页面类型:",currentTextType:"当前文本类型:",currentImageType:"当前图片类型:",selectElementHint:"选中图片、文字、带文字的形状,标记类型",unmarkedType:"未标记类型",coverPage:"封面页",contentsPage:"目录页",transitionPage:"过渡页",contentPage:"内容页",endPage:"结束页",titleText:"标题",subtitleText:"副标题",contentText:"正文",itemText:"列表项目",itemTitleText:"列表项标题",notesText:"注释",headerText:"页眉",footerText:"页脚",partNumberText:"节编号",itemNumberText:"项目编号",pageFigure:"页面插图",itemFigure:"项目插图",backgroundImage:"背景图"},remarkEditor:{placeholder:"点击输入演讲者备注"},templatePanel:{title:"模板",blank:"空白幻灯片",preset:"预设模板",all:"全部",cover:"封面",contents:"目录",transition:"过渡",content:"内容",end:"结束",insertAll:"插入全部",insertTemplate:"插入模板"},language:{toggle:"切换语言",zhCN:"中文",en:"English"},canvas:{ruler:"标尺",gridLine:"网格线",gridNone:"无",gridSmall:"小",gridMedium:"中",gridLarge:"大",resetCurrentPage:"重置当前页",slideshow:"幻灯片放映"},editableElement:{horizontalCenter:"水平居中",horizontalVerticalCenter:"水平垂直居中",alignLeft:"左对齐",alignRight:"右对齐",verticalCenter:"垂直居中",alignTop:"顶部对齐",alignBottom:"底部对齐",bringToFront:"置于顶层",moveUp:"上移一层",sendToBack:"置于底层",moveDown:"下移一层",setLink:"设置链接",cancelGroup:"取消组合",group:"组合",slidePage:"幻灯片页面",changeLink:"更换",removeLink:"移除"},shapeCreateCanvas:{drawShapeHint:"点击绘制任意形状,首尾闭合完成绘制,按 ESC 键或鼠标右键取消,按 ENTER 键提前完成"},tableGenerator:{table:"表格",back:"返回",custom:"自定义",rows:"行数:",cols:"列数:",rowColRange:"行数/列数必须在0~20之间!"},elementComponent:{doubleClickEdit:"双击编辑",videoLoadError:"视频加载失败",audioLoadError:"音频加载失败",playbackSpeed:"倍速",loopOn:"循环开",loopOff:"循环关",fontLoadingHint:"字体需要等待加载下载后生效,请稍等",insertCol:"插入列",insertRow:"插入行",toLeft:"到左侧",toRight:"到右侧",toAbove:"到上方",toBelow:"到下方",deleteCol:"删除列",deleteRow:"删除行",mergeCells:"合并单元格",cancelMergeCells:"取消合并单元格",selectCurrentCol:"选中当前列",selectCurrentRow:"选中当前行",selectAllCells:"选中全部单元格"},colorPicker:{recentColors:"最近使用:",pressEscToClose:"按 ESC 键关闭取色吸管",eyeDropperInitFailed:"取色吸管初始化失败"},latexEditor:{inputPlaceholder:"输入 LaTeX 公式",formulaPreview:"公式预览",commonSymbols:"常用符号",presetFormulas:"预置公式",formulaRequired:"公式不能为空"},outlineEditor:{topic:"主题",chapter:"章",section:"节",newChapter:"新的一章",newSection:"新的一节",newItem:"新的一项",addChildChapter:"添加子级大纲(章)",addSiblingChapterAbove:"上方添加同级大纲(章)",addChildSection:"添加子级大纲(节)",deleteChapter:"删除此章",addSiblingSectionAbove:"上方添加同级大纲(节)",addChildItem:"添加子级大纲(项)",deleteSection:"删除此节",addSiblingItemAbove:"上方添加同级大纲(项)",addSiblingItemBelow:"下方添加同级大纲(项)",deleteItem:"删除此项"},select:{search:"搜索"},configs:{animation:{typeBounce:"弹跳",typeFade:"浮现",typeRotate:"旋转",typeZoom:"缩放",typeSlideIn:"滑入",typeFlip:"翻转",typeBackIn:"放大滑入",typeLightSpeed:"飞入",typeShake:"晃动",typeOther:"其他",typeSlideOut:"滑出",typeBackOut:"缩小滑出",typeLightSpeedOut:"飞出",bounceIn:"弹入",bounceInLeft:"向右弹入",bounceInRight:"向左弹入",bounceInUp:"向上弹入",bounceInDown:"向下弹入",fadeIn:"浮入",fadeInDown:"向下浮入",fadeInDownBig:"向下长距浮入",fadeInLeft:"向右浮入",fadeInLeftBig:"向右长距浮入",fadeInRight:"向左浮入",fadeInRightBig:"向左长距浮入",fadeInUp:"向上浮入",fadeInUpBig:"向上长距浮入",fadeInTopLeft:"从左上浮入",fadeInTopRight:"从右上浮入",fadeInBottomLeft:"从左下浮入",fadeInBottomRight:"从右下浮入",rotateIn:"旋转进入",rotateInDownLeft:"绕左下进入",rotateInDownRight:"绕右下进入",rotateInUpLeft:"绕左上进入",rotateInUpRight:"绕右上进入",zoomIn:"放大进入",zoomInDown:"向下放大进入",zoomInLeft:"从左放大进入",zoomInRight:"从右放大进入",zoomInUp:"向上放大进入",slideInDown:"向下滑入",slideInLeft:"从右滑入",slideInRight:"从左滑入",slideInUp:"向上滑入",flipInX:"X轴翻转进入",flipInY:"Y轴翻转进入",backInDown:"向下放大滑入",backInLeft:"从左放大滑入",backInRight:"从右放大滑入",backInUp:"向上放大滑入",lightSpeedInRight:"从右飞入",lightSpeedInLeft:"从左飞入",bounceOut:"弹出",bounceOutLeft:"向左弹出",bounceOutRight:"向右弹出",bounceOutUp:"向上弹出",bounceOutDown:"向下弹出",fadeOut:"浮出",fadeOutDown:"向下浮出",fadeOutDownBig:"向下长距浮出",fadeOutLeft:"向左浮出",fadeOutLeftBig:"向左长距浮出",fadeOutRight:"向右浮出",fadeOutRightBig:"向右长距浮出",fadeOutUp:"向上浮出",fadeOutUpBig:"向上长距浮出",fadeOutTopLeft:"从左上浮出",fadeOutTopRight:"从右上浮出",fadeOutBottomLeft:"从左下浮出",fadeOutBottomRight:"从右下浮出",rotateOut:"旋转退出",rotateOutDownLeft:"绕左下退出",rotateOutDownRight:"绕右下退出",rotateOutUpLeft:"绕左上退出",rotateOutUpRight:"绕右上退出",zoomOut:"缩小退出",zoomOutDown:"向下缩小退出",zoomOutLeft:"从左缩小退出",zoomOutRight:"从右缩小退出",zoomOutUp:"向上缩小退出",slideOutDown:"向下滑出",slideOutLeft:"从左滑出",slideOutRight:"从右滑出",slideOutUp:"向上滑出",flipOutX:"X轴翻转退出",flipOutY:"Y轴翻转退出",backOutDown:"向下缩小滑出",backOutLeft:"从左缩小滑出",backOutRight:"从右缩小滑出",backOutUp:"向上缩小滑出",lightSpeedOutRight:"从右飞出",lightSpeedOutLeft:"从左飞出",shakeX:"左右摇晃",shakeY:"上下摇晃",headShake:"摇头",swing:"摆动",wobble:"晃动",tada:"惊恐",jello:"果冻",bounce:"弹跳",flash:"闪烁",pulse:"脉搏",rubberBand:"橡皮筋",heartBeat:"心跳(快)",turningNo:"无",turningRandom:"随机",turningSlideX:"左右推移",turningSlideY:"上下推移",turningSlideX3D:"左右推移(3D)",turningSlideY3D:"上下推移(3D)",turningFade:"淡入淡出",turningRotate:"旋转",turningScaleY:"上下展开",turningScaleX:"左右展开",turningScale:"放大",turningScaleReverse:"缩小"},chart:{bar:"柱状图",column:"条形图",line:"折线图",area:"面积图",scatter:"散点图",pie:"饼图",ring:"环形图",radar:"雷达图",defaultCategory:"类别",defaultSeries:"系列",defaultCoordinate:"坐标",defaultValue:"值"},lines:{straight:"直线",brokenCurve:"折线、曲线"},imageClip:{rect:"矩形",rect2:"矩形2",rect3:"矩形3",roundRect:"圆角矩形",ellipse:"圆形",triangle:"三角形",triangle2:"三角形2",triangle3:"三角形3",rhombus:"菱形",pentagon:"五边形",hexagon:"六边形",heptagon:"七边形",octagon:"八边形",chevron:"V形",point:"点",arrow:"箭头",parallelogram:"平行四边形",parallelogram2:"平行四边形2",trapezoid:"梯形",trapezoid2:"梯形2"},font:{default:"默认字体"},element:{text:"文本",image:"图片",shape:"形状",line:"线条",chart:"图表",table:"表格",video:"视频",audio:"音频",latex:"公式"}}},NIe={common:{close:"Close",cancel:"Cancel",confirm:"Confirm",save:"Save",delete:"Delete",remove:"Remove",edit:"Edit",copy:"Copy",cut:"Cut",paste:"Paste",selectAll:"Select All",loading:"Loading...",exporting:"Exporting...",importing:"Importing...",saving:"Saving...",success:"Success",error:"Error",warning:"Warning",info:"Info",untitledPresentation:"Untitled Presentation"},header:{back:"Back",aippt:"AIPPT",aipptSubtitle:"Enter a sentence to generate presentation intelligently",importFile:"Import File",pptxTest:"(Test Only)",pptistFormat:"(Exclusive Format)",exportFile:"Export File",resetSlides:"Reset Slides",slideMarkup:"Slide Type Markup",shortcuts:"Shortcuts",feedback:"Feedback",faq:"FAQ",disclaimer:"Note: This site is for testing/demo only, no service provided",slideshow:"Slideshow",slideshowF5:"Slideshow (F5)",aiGenerate:"AI Generate PPT",export:"Export",download:"Download",save:"Save",fromStart:"From Beginning",fromCurrent:"From Current Slide"},canvasTool:{undo:"Undo",undoShortcut:"Undo (Ctrl + Z)",redo:"Redo",redoShortcut:"Redo (Ctrl + Y)",remarkPanel:"Comments Panel",selectPanel:"Selection Pane",searchReplace:"Find/Replace (Ctrl + F)",insertText:"Insert Text",textbox:"Text Box",horizontalText:"Horizontal Text Box",verticalText:"Vertical Text Box",insertShape:"Insert Shape",shape:"Shape",presetShape:"Preset Shapes",freeDraw:"Free Draw",insertImage:"Insert Image",image:"Image",uploadImage:"Upload Image",uploadLocalImage:"Upload from device",onlineLibrary:"Online Library",insertLine:"Insert Line",line:"Line",insertChart:"Insert Chart",chart:"Chart",insertTable:"Insert Table",table:"Table",insertFormula:"Insert Formula",formula:"Formula",insertMedia:"Insert Media",media:"Audio/Video",insertVideo:"Insert Video",video:"Video",insertSymbol:"Insert Symbol",symbol:"Symbol",zoomOut:"Zoom Out",zoomOutShortcut:"Zoom Out (Ctrl + -)",zoomIn:"Zoom In",zoomInShortcut:"Zoom In (Ctrl + =)",fitScreen:"Fit Screen",fitScreenShortcut:"Fit Screen (Ctrl + 0)"},miniStatus:{pagePrefix:"Page",pageUnit:"",totalPrefix:"of"},exportDialog:{exportPptist:"Export PPTIST File",exportPptx:"Export PPTX",exportImage:"Export Image",exportJson:"Export JSON",exportPdf:"Print / Export PDF",exportPdf2:"Export PDF",exportFormat:"Export Format:",exportRange:"Export Range:",all:"All",currentPage:"Current",custom:"Custom",customRange:"Custom Range:",imageQuality:"Image Quality:",pdfQuality:"PDF Quality:",ignoreOnlineFont:"Ignore Online Fonts:",ignoreOnlineFontTip:'Online fonts are ignored by default when exporting. If you use online fonts in your slides and want to keep the styles after export, you can turn off the "Ignore Online Fonts" option, but this will increase export time.',exportImageBtn:"Export Image",perPageCount:"Per Page:",marginBlank:"Margin:",printTip:'Tip: Please check "Background Graphics" option in the print dialog and select "Default" for margins.',printExportPdf:"Print / Export PDF",downloadPdf:"Export PDF",downloadPptist:"Export PPTIST File",downloadPptx:"Export PPTX",downloadJson:"Export JSON",copyJson:"Copy JSON",exportMode:"Export Mode:",standardMode:"Standard",imageMode:"Image Only",ignoreMedia:"Ignore Audio/Video:",ignoreMediaTip:'Audio/video are ignored by default when exporting. If your slides contain audio/video elements and you want to export them to PPTX, turn off the "Ignore Audio/Video" option, but this will significantly increase export time.',overwriteMaster:"Overwrite Default Master:",mediaTip:"Note: 1. Supported formats: avi, mp4, mov, wmv, mp3, wav; 2. Cross-origin resources cannot be exported.",pptistTip:"Note: .pptist is the exclusive file extension of this application, supporting importing this type of file back into the app."},aiDialog:{step1Prefix:"Select a suitable template below to generate PPT, or ",step1Link:"use local template",step1Tooltip:"Upload .pptist template file",step2:"Confirm the outline below (click to edit, right-click to add/delete items), then select template",step3:"Enter your PPT topic below, and add relevant info such as industry, position, subject, purpose, etc.",inputPlaceholder:"Enter PPT topic, e.g.: College Student Career Planning",language:"Language:",chinese:"Chinese",english:"English",japanese:"Japanese",style:"Style:",general:"General",academic:"Academic",professional:"Professional",educational:"Educational",marketing:"Marketing",model:"Model:",illustration:"Illustration:",none:"None",mockTest:"Mock Test",aiSearch:"AI Search",aiGenerate:"AI Generate",overwriteSlides:"Overwrite existing slides",aiGenerateBtn:"AI Generate",selectTemplate:"Select Template",regenerate:"Back to Regenerate",generate:"Generate",backToOutline:"Back to Outline",generating:"AI generating, please wait...",creatingSlides:"Creating presentation, please wait...",apiOverload:"The API concurrency for this model is too high, please try another model",templateError:"The uploaded template file data is abnormal, please re-upload or use preset templates",inputThemeFirst:"Please enter PPT topic first",recommendTopics:{tech2025:"2025 Technology Frontiers",bigData:"How Big Data Changes the World",catering:"Catering Market Research",aigcEducation:"AIGC Applications in Education",socialMedia:"Social Media & Brand Marketing",fiveG:"How 5G Changes Our Lives",workSummary:"Annual Work Summary & Outlook",blockchain:"Blockchain Technology & Applications",careerPlan:"College Student Career Planning",annualMeeting:"Company Annual Meeting Planning"}},thumbnails:{addSlide:"Add Slide",inputSectionName:"Enter section name",untitledSection:"Untitled Section",defaultSection:"Default Section",slideOf:"Slide",total:"Total",deleteSection:"Delete Section",deleteSectionAndSlides:"Delete Section and Slides",deleteAllSections:"Delete All Sections",renameSection:"Rename Section",newPage:"New Page",copyPage:"Duplicate Page",deletePage:"Delete Page",addSection:"Add Section",playCurrent:"Play from Current"},search:{find:"Find",replace:"Replace",inputFindContent:"Enter search content",inputReplaceContent:"Enter replacement content",ignoreCase:"Ignore Case",previous:"Previous",next:"Next",replaceBtn:"Replace",replaceAll:"Replace All"},screen:{penTool:"Pen Tool",laserPointer:"Laser Pointer",timer:"Timer",presenterView:"Presenter View",exitFullscreen:"Exit Fullscreen",enterFullscreen:"Enter Fullscreen",endShow:"End Show",slideOf:"Slide",previousPage:"Previous",nextPage:"Next",firstPage:"First",lastPage:"Last",cancelAutoPlay:"Cancel Auto Play",autoPlay:"Auto Play",loopPlay:"Loop Play",showToolbar:"Show Toolbar",viewAllSlides:"View All Slides",bottomThumbnails:"Show Bottom Thumbnails",seconds:"s"},mobile:{undo:"Undo",redo:"Redo",exitEdit:"Exit Edit",speakerNotes:"Click to enter speaker notes",newSlide:"New Slide",copy:"Copy",delete:"Delete",text:"Text",image:"Image",rectangle:"Rectangle",circle:"Circle",newText:"New Text"},toolbar:{slideDesign:"Slide Design",animation:"Animation",position:"Position",style:"Style",background:"Background",fillColor:"Fill Color",noFill:"No Fill",presetBackground:"Preset Background",customColor:"Custom Color",gradient:"Gradient",image:"Image",applyToAll:"Apply to All",slideSize:"Slide Size",widescreen16_9:"Widescreen 16:9",widescreen16_10:"Widescreen 16:10",standard4_3:"Standard 4:3",customSize:"Custom Size",width:"Width",height:"Height",apply:"Apply",ruler:"Ruler",showRuler:"Show Ruler",remark:"Comment",remarkPlaceholder:"Enter comment (for selected element/current slide)",replyPlaceholder:"Enter reply content",confirm:"Confirm",fontFamily:"Font",fontSize:"Font Size",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",fontColor:"Font Color",highlight:"Highlight",alignLeft:"Align Left",alignCenter:"Center",alignRight:"Align Right",alignJustify:"Justify",bulletList:"Bullet List",numberedList:"Numbered List",increaseIndent:"Increase Indent",decreaseIndent:"Decrease Indent",lineSpacing:"Line Spacing",paragraphSpacing:"Paragraph Spacing",clearFormat:"Clear Format",format:"Format",colorMask:"Color Mask",filter:"Filter",flip:"Flip",horizontalFlip:"Horizontal Flip",verticalFlip:"Vertical Flip",opacity:"Opacity",outline:"Outline",shadow:"Shadow",shadowColor:"Shadow Color",blur:"Blur",offsetX:"Offset X",offsetY:"Offset Y",imageCrop:"Crop Image",replaceImage:"Replace Image",resetImage:"Reset Image",setAsBackground:"Set as Background",link:"Hyperlink",linkUrl:"Link URL",linkPlaceholder:"Enter hyperlink",lineStyle:"Line Style",lineColor:"Line Color",lineWidth:"Line Width",startArrow:"Start Arrow",endArrow:"End Arrow",chartType:"Chart Type",barChart:"Bar Chart",horizontalBarChart:"Horizontal Bar",lineChart:"Line Chart",areaChart:"Area Chart",scatterChart:"Scatter Chart",pieChart:"Pie Chart",doughnutChart:"Doughnut Chart",radarChart:"Radar Chart",chartData:"Chart Data",themeColors:"Theme Colors",gridLines:"Grid Lines",legend:"Legend",legendPosition:"Legend Position",top:"Top",bottom:"Bottom",left:"Left",right:"Right",tableStyle:"Table Style",headerRow:"Header Row",totalRow:"Total Row",firstColumn:"First Column",lastColumn:"Last Column",bandedRows:"Banded Rows",bandedColumns:"Banded Columns",addRow:"Add Row",addColumn:"Add Column",deleteRow:"Delete Row",deleteColumn:"Delete Column",mergeCells:"Merge Cells",splitCells:"Split Cells",videoCover:"Video Cover",autoPlay:"Auto Play",loop:"Loop",mute:"Mute",latexPlaceholder:"Enter LaTeX formula",positionX:"X Position",positionY:"Y Position",elementWidth:"Width",elementHeight:"Height",rotation:"Rotation",lock:"Lock",unlock:"Unlock",lockRatio:"Lock Ratio",order:"Order",bringToFront:"Bring to Front",sendToBack:"Send to Back",bringForward:"Bring Forward",sendBackward:"Send Backward",align:"Align",alignTop:"Align Top",alignMiddle:"Align Middle",alignBottom:"Align Bottom",distributeHorizontally:"Distribute Horizontally",distributeVertically:"Distribute Vertically",group:"Group",ungroup:"Ungroup",combine:"Combine Shapes",enterAnimation:"Entrance Animation",exitAnimation:"Exit Animation",emphasisAnimation:"Emphasis Animation",animationDuration:"Duration",animationDelay:"Delay",animationTrigger:"Trigger",onClick:"On Click",withPrevious:"With Previous",afterPrevious:"After Previous",addAnimation:"Add Animation",removeAnimation:"Remove Animation",playAnimation:"Play Animation",slideAnimation:"Slide Transition",noAnimation:"None",random:"Random",multiSelect:" (Multi)",design:"Design",transition:"Transition",backgroundFill:"Background Fill",solidFill:"Solid Fill",imageFill:"Image Fill",gradientFill:"Gradient Fill",scale:"Scale",tile:"Tile",scaleFill:"Scale Fill",linearGradient:"Linear Gradient",radialGradient:"Radial Gradient",currentColorBlock:"Current Color:",gradientAngle:"Gradient Angle:",applyBackgroundToAll:"Apply Background to All",paperA3A4:"Paper A3 / A4",verticalA3A4:"Vertical A3 / A4",canvasSize:"Canvas Size:",globalTheme:"Global Theme",more:"More",font:"Font:",searchFont:"Search Font",fontColorLabel:"Font Color:",backgroundColorLabel:"Background Color:",themeColorLabel:"Theme Color:",enableOutline:"Enable Border",enableShadow:"Enable Shadow",fillColorLabel:"Fill Color:",colorMaskLabel:"Color Mask",maskColor:"Mask Color",outlineStyle:"Outline Style:",outlineColor:"Outline Color:",outlineWidth:"Outline Width:",horizontalShadow:"Horizontal Shadow:",verticalShadow:"Vertical Shadow:",blurDistance:"Blur Distance:",shadowColorLabel:"Shadow Color:",applyThemeToAll:"Apply Theme to All",unifyFont:"Unify Font",extractTheme:"Extract Theme from Slide",presetTheme:"Preset Theme",textAa:"Text Aa",set:"Set",setAndApply:"Set & Apply",appliedToAll:"Applied to All",layerOrder:"Order:",toTop:"To Top",toBottom:"To Bottom",moveUp:"Move Up",moveDown:"Move Down",alignLabel:"Align:",horizontal:"X:",vertical:"Y:",widthLabel:"Width:",heightLabel:"Height:",unlockRatio:"Unlock Aspect Ratio",lockRatioLabel:"Lock Aspect Ratio",rotationLabel:"Rotation:",selectElementAddAnimation:"Select an element to add animation",enter:"Enter",exit:"Exit",emphasis:"Emphasis",durationLabel:"Duration:",triggerLabel:"Trigger:",manualTrigger:"On Click",withPreviousAnimation:"With Previous",afterPreviousAnimation:"After Previous",changeAnimation:"Change Animation",preview:"Preview",delete:"Delete",stopPreview:"Stop Preview",previewAll:"Preview All",outlineStyleLabel:"Outline Style:",outlineColorLabel:"Outline Color:",outlineWidthLabel:"Outline Width:",textColor:"Text Color",textHighlight:"Text Highlight",increaseFontSize:"Increase Font Size",decreaseFontSize:"Decrease Font Size",searchFontSize:"Search Font Size",horizontallyCenter:"Center Horizontally",verticallyCenter:"Center Vertically",horizontalDistribute:"Distribute Horizontally",verticalDistribute:"Distribute Vertically",bigTitle:"Big Title",smallTitle:"Small Title",bodyText:"Body",bodyTextSmall:"Body [Small]",annotation1:"Annotation 1",annotation2:"Annotation 2",lineHeightLabel:"Line Height:",paragraphSpaceLabel:"Paragraph Space:",wordSpaceLabel:"Word Space:",textboxFill:"Text Box Fill:",times:"x",cropImage:"Crop Image",byShape:"By Shape:",aspectRatioSquare:"Aspect Ratio (Square)",aspectRatioPortrait:"Aspect Ratio (Portrait)",aspectRatioLandscape:"Aspect Ratio (Landscape)",borderRadius:"Border Radius:",quoteToChat:"Quote to Chat",replaceImageBtn:"Replace Image",resetStyleBtn:"Reset Style",setAsBackgroundBtn:"Set as Background",clickToReplaceShape:"Click to Replace Shape",solidFillOption:"Solid Fill",gradientFillOption:"Gradient Fill",imageFillOption:"Image Fill",linearGradientOption:"Linear Gradient",radialGradientOption:"Radial Gradient",alignTopText:"Top Align",alignCenterText:"Center",alignBottomText:"Bottom Align",doubleclickContinuousUse:"Double-click for Continuous Use",shapeFormatPainter:"Shape Format Painter",lineStyleLabel:"Line Style:",lineColorLabel:"Line Color:",lineWidthLabel:"Line Width:",startPointStyle:"Start Style:",endPointStyle:"End Style:",swapDirection:"Swap Direction",searchFontLabel:"Search Font",searchFontSizeLabel:"Search Font Size",textColorTooltip:"Text Color",cellFill:"Cell Fill",boldTooltip:"Bold",italicTooltip:"Italic",underlineTooltip:"Underline",strikethroughTooltip:"Strikethrough",alignLeftTooltip:"Align Left",alignCenterTooltip:"Center",alignRightTooltip:"Align Right",alignJustifyTooltip:"Justify",rowCount:"Rows:",colCount:"Columns:",enableThemeTable:"Enable Theme Table:",headerRowLabel:"Header Row",totalRowLabel:"Total Row",firstColumnLabel:"First Column",lastColumnLabel:"Last Column",themeColorLabelTable:"Theme Color:",editChart:"Edit Chart",stackedStyle:"Stacked Style",useSmoothCurve:"Use Smooth Curve",backgroundFillLabel:"Background Fill:",axisAndText:"Axis & Text:",gridColorLabel:"Grid Color:",themeColorScheme:"Theme Colors:",presetChartThemes:"Preset Chart Themes:",slideTheme:"Slide Theme:",customColorScheme:"Custom Colors",videoPosterCover:"Video Poster",setFirstFrameAsCover:"Set First Frame as Cover",resetCover:"Reset Cover",autoPlayLabel:"Auto Play:",iconColorLabel:"Icon Color:",loopPlayLabel:"Loop:",editLatex:"Edit LaTeX",colorLabel:"Color:",strokeWidthLabel:"Stroke Width:",enableFilter:"Enable Filter",filterBlur:"Blur",filterBrightness:"Brightness",filterContrast:"Contrast",filterGrayscale:"Grayscale",filterSaturate:"Saturate",filterHueRotate:"Hue Rotate",filterSepia:"Sepia",filterInvert:"Invert",filterOpacity:"Opacity",presetBlackWhite:"B&W",presetVintage:"Vintage",presetSharpen:"Sharpen",presetSoft:"Soft",presetWarm:"Warm",presetBright:"Bright",presetVivid:"Vivid",presetBlur:"Blur",presetInvert:"Invert",superscript:"Superscript",subscript:"Subscript",inlineCode:"Inline Code",quote:"Quote",aiBeautify:"Beautify",aiExpand:"Expand",aiCondense:"Condense",aiAssist:"AI Assist",formatPainterDoubleClick:"Format Painter (Double-click for continuous use)",invalidLinkUrl:"Please enter a valid link URL",decreaseFirstLineIndent:"Decrease First Line Indent",increaseFirstLineIndent:"Increase First Line Indent",noTextContent:"No text content to process",aiModelOverload:"API concurrency too high, please try another model",editThemeColors:"Edit Theme Colors",slideThemeColor:"Slide Theme Color",extractFromCurrent:"Extract from Current",extractFromAll:"Extract from All Slides",fontLabel:"Font:",fontColorExtract:"Font Color:",backgroundColorExtract:"Background Color:",themeColorExtract:"Theme Color:",clickToExcludeColor:"(Click to exclude colors)",selectStyle:"Select",applyToTheme:"Apply to Theme",saveAsTheme:"Save Selected as Theme",themeColorLimit:"Theme colors exceeded limit, auto-selected first 6",chartTypeLabel:"Chart Type:",clickToChange:"Click to Change",clearData:"Clear Data",category:"Category",series:"Series",chartThemeColors:"Chart Theme Colors",themeColorN:"Theme Color",addThemeColor:"Add Theme Color"},element:{text:"Text",image:"Image",shape:"Shape",line:"Line",chart:"Chart",table:"Table",video:"Video",audio:"Audio",latex:"Formula"},contextmenu:{cut:"Cut",copy:"Copy",paste:"Paste",selectAll:"Select All",delete:"Delete",lock:"Lock",unlock:"Unlock",copyStyle:"Copy Style",pasteStyle:"Paste Style",resetStyle:"Reset Style",bringToFront:"Bring to Front",sendToBack:"Send to Back",bringForward:"Bring Forward",sendBackward:"Send Backward",group:"Group",ungroup:"Ungroup",combine:"Combine Shapes",union:"Union",intersect:"Intersect",subtract:"Subtract",exclude:"Exclude",setAsBackground:"Set as Background",createLink:"Create Hyperlink",editLink:"Edit Hyperlink",removeLink:"Remove Hyperlink"},app:{initLoading:"Initializing data, please wait..."},notes:{title:"Notes",placeholder:"Click to enter speaker notes"},notesPanel:{title:"Notes for Slide {index}",reply:"Reply",delete:"Delete",inputReplyContent:"Enter reply content",cancel:"Cancel",noNotes:"No notes on this page",inputNotePlaceholder:"Enter note (for {target})",selectedElement:"selected element",currentSlide:"current slide",clearNotes:"Clear all notes on this page",addNote:"Add Note",testUser:"Test User"},imageLib:{title:"Image Library (from pexels.com)",searchPlaceholder:"Search images",searching:"Searching...",noResults:"No images found",insert:"Insert",all:"All",landscape:"Landscape",portrait:"Portrait",square:"Square",inputKeyword:"Please enter search keyword",defaultSearch:"landscape"},linkDialog:{title:"Insert Hyperlink",linkText:"Link Text",linkUrl:"Link URL",slideLink:"Slide Link",webLink:"Web Link",selectSlide:"Select Slide",slide:"Slide {n}",webLinkPlaceholder:"Enter web link URL",preview:"Preview:"},mediaInput:{videoPlaceholder:"Enter video URL, e.g. https://xxx.mp4",audioPlaceholder:"Enter audio URL, e.g. https://xxx.mp3",video:"Video",audio:"Audio",uploadLocalVideo:"Upload Local Video",uploadLocalAudio:"Upload Local Audio",enterVideoUrl:"Please enter a valid video URL first",enterAudioUrl:"Please enter a valid audio URL first"},hotkeyDoc:{title:"Keyboard Shortcuts",general:"General",editing:"Editing",slideshow:"Slideshow",description:"Description",shortcut:"Shortcut",typeGeneral:"General",typeSlideshow:"Slideshow",typeSlideEditing:"Slide Editing",typeElementOps:"Element Operations",typeTextEditing:"Text Editing",cut:"Cut",copy:"Copy",paste:"Paste",pasteAsPlainText:"Paste as Plain Text",quickCopyPaste:"Quick Duplicate",selectAll:"Select All",undo:"Undo",restore:"Redo",delete:"Delete",multiSelect:"Multi-select",closeDialog:"Close Dialog",startFromBeginning:"Start Slideshow from Beginning",startFromCurrent:"Start Slideshow from Current",prevPage:"Previous Slide",nextPage:"Next Slide",exitSlideshow:"Exit Slideshow",newSlide:"New Slide",moveCanvas:"Move Canvas",zoomCanvas:"Zoom Canvas",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitScreen:"Fit Canvas to Screen",prevPageNoElement:"Previous Page (No Element Selected)",nextPageNoElement:"Next Page (No Element Selected)",prevPageScroll:"Previous Page",nextPageScroll:"Next Page",quickCreateText:"Quick Create Text",quickCreateRect:"Quick Create Rectangle",quickCreateCircle:"Quick Create Circle",quickCreateLine:"Quick Create Line",exitDraw:"Exit Draw Mode",move:"Move",lock:"Lock",group:"Group",ungroup:"Ungroup",bringToFront:"Bring to Front",sendToBack:"Send to Back",lockRatio:"Lock Aspect Ratio",createStraightLine:"Create Horizontal / Vertical Line",switchFocusElement:"Switch Focus Element",confirmCrop:"Confirm Image Crop",bold:"Bold",italic:"Italic",underline:"Underline",inlineCode:"Inline Code",superscript:"Superscript",subscript:"Subscript",selectParagraph:"Select Paragraph",holdCtrlOrShift:"Hold Ctrl or Shift",spacePlusDrag:"Space + Mouse Drag",ctrlPlusMouseWheel:"Ctrl + Mouse Wheel",doubleClickBlankOrT:"Double-click Blank / T",rightMouseClick:"Right Click",mouseScrollUpOrPgUp:"Mouse Scroll Up / PgUp",mouseScrollDownOrPgDown:"Mouse Scroll Down / PgDown"},symbolPanel:{title:"Insert Symbol",emoji:"Emoji",arrows:"Arrows",math:"Math",special:"Special",emojiCategories:{faces:"Faces",gestures:"Gestures",animals:"Animals & Nature",food:"Food",travel:"Travel",activities:"Activities",objects:"Objects",symbols:"Symbols"}},selectPanel:{title:"Selection Pane",titleWithCount:"Selection ({active}/{total})",showAll:"Show All",hideAll:"Hide All",group:"Group",noContent:"No content on this page"},markupPanel:{title:"Slide Type Markup",currentPageType:"Current Page Type:",currentTextType:"Current Text Type:",currentImageType:"Current Image Type:",selectElementHint:"Select image, text, or shape with text to mark type",unmarkedType:"Unmarked Type",coverPage:"Cover Page",contentsPage:"Contents Page",transitionPage:"Transition Page",contentPage:"Content Page",endPage:"End Page",titleText:"Title",subtitleText:"Subtitle",contentText:"Content",itemText:"List Item",itemTitleText:"List Item Title",notesText:"Notes",headerText:"Header",footerText:"Footer",partNumberText:"Section Number",itemNumberText:"Item Number",pageFigure:"Page Figure",itemFigure:"Item Figure",backgroundImage:"Background Image"},remarkEditor:{placeholder:"Click to enter speaker notes"},templatePanel:{title:"Templates",blank:"Blank Slide",preset:"Preset Templates",all:"All",cover:"Cover",contents:"Contents",transition:"Transition",content:"Content",end:"End",insertAll:"Insert All",insertTemplate:"Insert Template"},language:{toggle:"Switch Language",zhCN:"Chinese",en:"English"},canvas:{ruler:"Ruler",gridLine:"Grid",gridNone:"None",gridSmall:"Small",gridMedium:"Medium",gridLarge:"Large",resetCurrentPage:"Reset Current Page",slideshow:"Slideshow"},editableElement:{horizontalCenter:"Center Horizontally",horizontalVerticalCenter:"Center Both",alignLeft:"Align Left",alignRight:"Align Right",verticalCenter:"Center Vertically",alignTop:"Align Top",alignBottom:"Align Bottom",bringToFront:"Bring to Front",moveUp:"Bring Forward",sendToBack:"Send to Back",moveDown:"Send Backward",setLink:"Set Link",cancelGroup:"Ungroup",group:"Group",slidePage:"Slide Page",changeLink:"Change",removeLink:"Remove"},shapeCreateCanvas:{drawShapeHint:"Click to draw a shape, close path to finish, press ESC or right-click to cancel, press ENTER to finish early"},tableGenerator:{table:"Table",back:"Back",custom:"Custom",rows:"Rows:",cols:"Columns:",rowColRange:"Rows/columns must be between 0 and 20!"},elementComponent:{doubleClickEdit:"Double-click to edit",videoLoadError:"Video load failed",audioLoadError:"Audio load failed",playbackSpeed:"Speed",loopOn:"Loop On",loopOff:"Loop Off",fontLoadingHint:"Font needs to be downloaded, please wait",insertCol:"Insert Column",insertRow:"Insert Row",toLeft:"To Left",toRight:"To Right",toAbove:"To Above",toBelow:"To Below",deleteCol:"Delete Column",deleteRow:"Delete Row",mergeCells:"Merge Cells",cancelMergeCells:"Unmerge Cells",selectCurrentCol:"Select Current Column",selectCurrentRow:"Select Current Row",selectAllCells:"Select All Cells"},colorPicker:{recentColors:"Recent Colors:",pressEscToClose:"Press ESC to close eye dropper",eyeDropperInitFailed:"Eye dropper initialization failed"},latexEditor:{inputPlaceholder:"Enter LaTeX formula",formulaPreview:"Formula Preview",commonSymbols:"Common Symbols",presetFormulas:"Preset Formulas",formulaRequired:"Formula cannot be empty"},outlineEditor:{topic:"Topic",chapter:"Ch",section:"Sec",newChapter:"New Chapter",newSection:"New Section",newItem:"New Item",addChildChapter:"Add Child Outline (Chapter)",addSiblingChapterAbove:"Add Sibling Outline Above (Chapter)",addChildSection:"Add Child Outline (Section)",deleteChapter:"Delete Chapter",addSiblingSectionAbove:"Add Sibling Outline Above (Section)",addChildItem:"Add Child Outline (Item)",deleteSection:"Delete Section",addSiblingItemAbove:"Add Sibling Outline Above (Item)",addSiblingItemBelow:"Add Sibling Outline Below (Item)",deleteItem:"Delete Item"},select:{search:"Search"},configs:{animation:{typeBounce:"Bounce",typeFade:"Fade",typeRotate:"Rotate",typeZoom:"Zoom",typeSlideIn:"Slide In",typeFlip:"Flip",typeBackIn:"Back Slide In",typeLightSpeed:"Fly In",typeShake:"Shake",typeOther:"Other",typeSlideOut:"Slide Out",typeBackOut:"Back Slide Out",typeLightSpeedOut:"Fly Out",bounceIn:"Bounce In",bounceInLeft:"Bounce In Right",bounceInRight:"Bounce In Left",bounceInUp:"Bounce In Up",bounceInDown:"Bounce In Down",fadeIn:"Fade In",fadeInDown:"Fade In Down",fadeInDownBig:"Fade In Down Big",fadeInLeft:"Fade In Right",fadeInLeftBig:"Fade In Right Big",fadeInRight:"Fade In Left",fadeInRightBig:"Fade In Left Big",fadeInUp:"Fade In Up",fadeInUpBig:"Fade In Up Big",fadeInTopLeft:"Fade In Top Left",fadeInTopRight:"Fade In Top Right",fadeInBottomLeft:"Fade In Bottom Left",fadeInBottomRight:"Fade In Bottom Right",rotateIn:"Rotate In",rotateInDownLeft:"Rotate In Down Left",rotateInDownRight:"Rotate In Down Right",rotateInUpLeft:"Rotate In Up Left",rotateInUpRight:"Rotate In Up Right",zoomIn:"Zoom In",zoomInDown:"Zoom In Down",zoomInLeft:"Zoom In Left",zoomInRight:"Zoom In Right",zoomInUp:"Zoom In Up",slideInDown:"Slide In Down",slideInLeft:"Slide In Right",slideInRight:"Slide In Left",slideInUp:"Slide In Up",flipInX:"Flip In X",flipInY:"Flip In Y",backInDown:"Back In Down",backInLeft:"Back In Left",backInRight:"Back In Right",backInUp:"Back In Up",lightSpeedInRight:"Light Speed In Right",lightSpeedInLeft:"Light Speed In Left",bounceOut:"Bounce Out",bounceOutLeft:"Bounce Out Left",bounceOutRight:"Bounce Out Right",bounceOutUp:"Bounce Out Up",bounceOutDown:"Bounce Out Down",fadeOut:"Fade Out",fadeOutDown:"Fade Out Down",fadeOutDownBig:"Fade Out Down Big",fadeOutLeft:"Fade Out Left",fadeOutLeftBig:"Fade Out Left Big",fadeOutRight:"Fade Out Right",fadeOutRightBig:"Fade Out Right Big",fadeOutUp:"Fade Out Up",fadeOutUpBig:"Fade Out Up Big",fadeOutTopLeft:"Fade Out Top Left",fadeOutTopRight:"Fade Out Top Right",fadeOutBottomLeft:"Fade Out Bottom Left",fadeOutBottomRight:"Fade Out Bottom Right",rotateOut:"Rotate Out",rotateOutDownLeft:"Rotate Out Down Left",rotateOutDownRight:"Rotate Out Down Right",rotateOutUpLeft:"Rotate Out Up Left",rotateOutUpRight:"Rotate Out Up Right",zoomOut:"Zoom Out",zoomOutDown:"Zoom Out Down",zoomOutLeft:"Zoom Out Left",zoomOutRight:"Zoom Out Right",zoomOutUp:"Zoom Out Up",slideOutDown:"Slide Out Down",slideOutLeft:"Slide Out Left",slideOutRight:"Slide Out Right",slideOutUp:"Slide Out Up",flipOutX:"Flip Out X",flipOutY:"Flip Out Y",backOutDown:"Back Out Down",backOutLeft:"Back Out Left",backOutRight:"Back Out Right",backOutUp:"Back Out Up",lightSpeedOutRight:"Light Speed Out Right",lightSpeedOutLeft:"Light Speed Out Left",shakeX:"Shake X",shakeY:"Shake Y",headShake:"Head Shake",swing:"Swing",wobble:"Wobble",tada:"Tada",jello:"Jello",bounce:"Bounce",flash:"Flash",pulse:"Pulse",rubberBand:"Rubber Band",heartBeat:"Heart Beat",turningNo:"None",turningRandom:"Random",turningSlideX:"Slide Horizontal",turningSlideY:"Slide Vertical",turningSlideX3D:"Slide Horizontal (3D)",turningSlideY3D:"Slide Vertical (3D)",turningFade:"Fade",turningRotate:"Rotate",turningScaleY:"Scale Vertical",turningScaleX:"Scale Horizontal",turningScale:"Zoom In",turningScaleReverse:"Zoom Out"},chart:{bar:"Bar Chart",column:"Column Chart",line:"Line Chart",area:"Area Chart",scatter:"Scatter Chart",pie:"Pie Chart",ring:"Doughnut Chart",radar:"Radar Chart",defaultCategory:"Category",defaultSeries:"Series",defaultCoordinate:"Coordinate",defaultValue:"Value"},lines:{straight:"Straight Line",brokenCurve:"Broken / Curve"},imageClip:{rect:"Rectangle",rect2:"Rectangle 2",rect3:"Rectangle 3",roundRect:"Round Rectangle",ellipse:"Ellipse",triangle:"Triangle",triangle2:"Triangle 2",triangle3:"Triangle 3",rhombus:"Rhombus",pentagon:"Pentagon",hexagon:"Hexagon",heptagon:"Heptagon",octagon:"Octagon",chevron:"Chevron",point:"Point",arrow:"Arrow",parallelogram:"Parallelogram",parallelogram2:"Parallelogram 2",trapezoid:"Trapezoid",trapezoid2:"Trapezoid 2"},font:{default:"Default Font"},element:{text:"Text",image:"Image",shape:"Shape",line:"Line",chart:"Chart",table:"Table",video:"Video",audio:"Audio",latex:"Formula"}}},dre=Symbol("lt-ppt-i18n"),TIe={"zh-CN":MIe,en:NIe};function hre(e,t=""){return Object.entries(e).reduce((n,[a,r])=>{const o=t?`${t}.${a}`:a;return r&&typeof r=="object"&&!Array.isArray(r)?Object.assign(n,hre(r,o)):n[o]=String(r),n},{})}const _b=Object.fromEntries(Object.entries(TIe).map(([e,t])=>[e,hre(t)]));function In(){const e=l.inject(dre,{locale:l.ref("zh-CN")});return{t:n=>{var a,r;return((a=_b[e.locale.value])==null?void 0:a[n])??((r=_b["zh-CN"])==null?void 0:r[n])??n},locale:e.locale}}function CIe(e){return t=>{var n,a;return((n=_b[e.value])==null?void 0:n[t])??((a=_b["zh-CN"])==null?void 0:a[t])??t}}function kIe(e){const t=l.ref((e==null?void 0:e.locale)??"zh-CN");return{install(){},global:{locale:t,t:a=>{var r,o;return((r=_b[t.value])==null?void 0:r[a])??((o=_b["zh-CN"])==null?void 0:o[a])??a}}}}const pre=4096*4096,vre=8e3,LIe=.2,EIe=l.defineComponent({__name:"LtPPT",props:{initData:{},onUploadFile:{},customImageSources:{},onCustomImageSourceSelect:{},onChange:{},onSave:{},onInitFinished:{},locale:{default:"zh-CN"},width:{default:"100%"},height:{default:"100%"},readonly:{type:Boolean,default:!1},theme:{default:"dark"},mode:{default:"default"},onReturn:{},onImageAIEntryClick:{}},emits:["image-ai-entry-click"],setup(e,{expose:t,emit:n}){const a=e,r=n,o=l.getCurrentInstance(),i=l.ref();let s=null,c=null,u=null,f=null,d=null,h=null,p=null,v=null;const m=new Set;let g=null;const y=new Promise(ge=>{g=ge}),b={save:null,getOnUploadFile:()=>a.onUploadFile,getOnSave:()=>a.onSave,markSaved:ge=>{const he=ge??K();v=he===null?null:JSON.parse(JSON.stringify(he))},hasUnsavedChanges:()=>te(),flushPendingEdits:()=>{for(const ge of m)ge()},registerPendingEdit:ge=>(m.add(ge),()=>m.delete(ge)),waitUntilReady:()=>y,markReady:()=>{g==null||g(),g=null}},R=l.ref(a.locale??"zh-CN"),A=l.ref(a.theme??"dark"),S=l.ref(a.mode??"default"),M={sources:l.computed(()=>a.customImageSources??[]),select:ge=>{var he;return(he=a.onCustomImageSourceSelect)==null?void 0:he.call(a,{name:ge.name,key:ge.key,...ge.icon?{icon:ge.icon}:{}})}},T=l.computed(()=>({width:a.width,height:a.height})),N=()=>{const ge=(o==null?void 0:o.vnode.props)||{};return!!(ge.onImageAIEntryClick||ge.onImageAiEntryClick)},C=l.computed(()=>!!a.onImageAIEntryClick||N()),E=ge=>new Promise(he=>{if(typeof Image>"u"){he(null);return}let ye=!1,Te=null;const Ne=be=>{ye||(ye=!0,Te&&clearTimeout(Te),he(be))};Te=setTimeout(()=>Ne(null),vre);const Ue=new Image;/^https?:\/\//i.test(ge)&&(Ue.crossOrigin="anonymous"),Ue.decoding="sync",Ue.onload=async()=>{var be;try{await((be=Ue.decode)==null?void 0:be.call(Ue))}catch{}Ne(Ue)},Ue.onerror=()=>Ne(null),Ue.src=ge}),L=ge=>{const he=Math.max(1,ge.width||1),ye=Math.max(1,ge.height||1);let Te=Math.min(typeof window>"u"?1:window.devicePixelRatio||1,2);return he*ye*Te*Te>pre&&(Te=Math.sqrt(pre/(he*ye))),{width:Math.max(1,Math.round(he*Te)),height:Math.max(1,Math.round(ye*Te)),scale:Te}},P=(ge,he,ye,Te,Ne,Ue)=>{const be=Math.min(Math.max(Ue,0),Te/2,Ne/2);if(!be){ge.rect(he,ye,Te,Ne);return}ge.moveTo(he+be,ye),ge.lineTo(he+Te-be,ye),ge.quadraticCurveTo(he+Te,ye,he+Te,ye+be),ge.lineTo(he+Te,ye+Ne-be),ge.quadraticCurveTo(he+Te,ye+Ne,he+Te-be,ye+Ne),ge.lineTo(he+be,ye+Ne),ge.quadraticCurveTo(he,ye+Ne,he,ye+Ne-be),ge.lineTo(he,ye+be),ge.quadraticCurveTo(he,ye,he+be,ye)},O=(ge,he,ye,Te,Ne)=>{var Ye;const Ue=y4[((Ye=he.clip)==null?void 0:Ye.shape)||"rect"]||y4.rect;if(Ue.type===ZC.ELLIPSE){ge.beginPath(),ge.ellipse(ye/2,Te/2,ye/2,Te/2,0,0,Math.PI*2),ge.clip();return}if(Ue.type===ZC.POLYGON&&Ue.createPath&&typeof Path2D<"u"){ge.clip(new Path2D(Ue.createPath(ye,Te)));return}const be=Ue.radius!==void 0?(he.radius||Number.parseFloat(Ue.radius)||0)*Ne:0;ge.beginPath(),P(ge,0,0,ye,Te,be),ge.clip()},_=(ge,he,ye)=>{if(!ge.clip)return{left:0,top:0,width:he,height:ye};const[Te,Ne]=ge.clip.range,Ue=Ne[0]-Te[0],be=Ne[1]-Te[1];return!Number.isFinite(Ue)||!Number.isFinite(be)||!Ue||!be?{left:0,top:0,width:he,height:ye}:{left:-Te[0]/Ue*he,top:-Te[1]/be*ye,width:100/Ue*he,height:100/be*ye}},I=ge=>ge.filters?Object.keys(ge.filters).map(he=>{var Te;const ye=(Te=ge.filters)==null?void 0:Te[he];return ye?`${he}(${ye})`:""}).filter(Boolean).join(" "):"",D=async ge=>{if(!ge.src||typeof document>"u")return ge.src;try{const he=await E(ge.src);if(!he)return ge.src;const ye=document.createElement("canvas"),{width:Te,height:Ne,scale:Ue}=L(ge);ye.width=Te,ye.height=Ne;const be=ye.getContext("2d");if(!be)return ge.src;be.save(),(ge.flipH||ge.flipV)&&(be.translate(ge.flipH?Te:0,ge.flipV?Ne:0),be.scale(ge.flipH?-1:1,ge.flipV?-1:1)),O(be,ge,Te,Ne,Ue);const Ye=I(ge);Ye&&(be.filter=Ye);const We=_(ge,Te,Ne);return be.drawImage(he,We.left,We.top,We.width,We.height),ge.colorMask&&(be.filter="none",be.fillStyle=ge.colorMask,be.fillRect(0,0,Te,Ne)),be.restore(),ye.toDataURL("image/png")}catch{return ge.src}},W=async ge=>{var Ne,Ue;const he=(Ne=ge.detail)==null?void 0:Ne.element;if(!he||he.type!=="image")return;const ye=JSON.parse(JSON.stringify(he));ye.clipSrc=await D(he);const Te={element:ye};(Ue=a.onImageAIEntryClick)==null||Ue.call(a,Te),r("image-ai-entry-click",Te)},Y=async()=>{if(!i.value||s)return;const[{createApp:ge},{createPinia:he},{default:ye},{default:Te},Ne]=await Promise.all([import("vue"),Promise.resolve().then(()=>pFe),Promise.resolve().then(()=>gDt),Promise.resolve().then(()=>EDt),Promise.resolve().then(()=>K9e)]);if(!i.value)return;u=Ne.useSlidesStore,f=Ne.useScreenStore,d=Ne.useMainStore,h=Ne.useSnapshotStore;const Ue=document.createElement("div");Ue.style.width="100%",Ue.style.height="100%",i.value.appendChild(Ue),s=ge(ye,{initData:a.initData,onUploadFile:a.onUploadFile,readonly:a.readonly,onChange:a.onChange,onSave:a.onSave,onInitFinished:a.onInitFinished,onReturn:a.onReturn,theme:A.value}),c=he(),s.use(c),s.provide(dre,{locale:R}),s.provide("__lt_ppt_theme__",A),s.provide("__lt_ppt_mode__",S),s.provide("__lt_ppt_image_ai_entry_enabled__",C),s.provide(ure,M),s.provide(A4,b),s.config.globalProperties.$t=CIe(R),s.use(Te),s.mount(Ue)},G=()=>{s&&(s.unmount(),s=null,c=null,b.save=null),i.value&&(i.value.innerHTML="")};l.onMounted(()=>{p=Y()}),l.onBeforeUnmount(()=>{G()}),l.watch(()=>a.locale,ge=>{R.value=ge??"zh-CN"}),l.watch(()=>a.theme,ge=>{A.value=ge??"dark"}),l.watch(()=>a.mode,ge=>{S.value=ge??"default"});const F=ge=>{S.value=ge},Z=()=>!c||!u?null:u(c),Q=()=>!c||!d?null:d(c),H=()=>!c||!h?null:h(c),K=()=>{const ge=Z();if(!ge)return null;const{title:he,theme:ye,slides:Te,viewportSize:Ne,viewportRatio:Ue}=ge.$state;return JSON.parse(JSON.stringify({title:he,theme:ye,slides:Te,width:Ne,height:Ne*Ue}))},te=()=>{b.flushPendingEdits();const ge=K();return ge===null?!1:v===null?!0:!Ja.isEqual(ge,v)},oe=async()=>(!c&&p&&await p,!!c),ue=ge=>new Promise(he=>{if(typeof Image>"u"){he(null);return}let ye=!1;const Te=new Image,Ne=be=>{ye||(ye=!0,clearTimeout(Ue),Te.onload=null,Te.onerror=null,he(be))},Ue=setTimeout(()=>Ne(null),vre);Te.decoding="sync",Te.onload=async()=>{var be;try{await((be=Te.decode)==null?void 0:be.call(Te))}catch{}Ne({width:Te.naturalWidth||Te.width,height:Te.naturalHeight||Te.height})},Te.onerror=()=>Ne(null),Te.src=ge}),ke=(ge,he)=>Number.isFinite(ge)&&ge>0?ge:he,ve=(ge,he,ye,Te,Ne)=>{let Ue=ke(ge.width,(he==null?void 0:he.width)||Ne.width),be=ke(ge.height,(he==null?void 0:he.height)||Ne.height);if(ge.width!==void 0&&ge.height===void 0&&(he!=null&&he.width)&&he.height)be=Ue*he.height/he.width;else if(ge.height!==void 0&&ge.width===void 0&&(he!=null&&he.width)&&he.height)Ue=be*he.width/he.height;else if(ge.width===void 0&&ge.height===void 0&&(he!=null&&he.width)&&he.height){const Ye=Math.min(1,ye/he.width,Te/he.height);Ue=he.width*Ye,be=he.height*Ye}return{width:Ue,height:be}},xe=ge=>new Promise(he=>{if(typeof document>"u"){he(null);return}const ye=document.createElement("video");ye.preload="metadata",ye.muted=!0,ye.onloadedmetadata=()=>{const Te=ye.videoWidth,Ne=ye.videoHeight;ye.onloadedmetadata=null,ye.onerror=null,ye.removeAttribute("src"),ye.load(),he(Te&&Ne?{width:Te,height:Ne}:null)},ye.onerror=()=>{ye.onloadedmetadata=null,ye.onerror=null,ye.removeAttribute("src"),ye.load(),he(null)},ye.src=ge}),Me=(ge,he)=>he.slideId?ge.slides.findIndex(ye=>ye.id===he.slideId):he.slideIndex!==void 0?Number.isInteger(he.slideIndex)&&he.slideIndex>=0&&he.slideIndex<ge.slides.length?he.slideIndex:-1:ge.slideIndex,Oe=async(ge,he,ye,Te,Ne={width:300,height:200})=>{const Ue=await ue(ge);return ve(he,Ue,ye,Te,Ne)},z=async()=>{const ge=H();ge&&await ge.addSnapshot()},ae=async(ge,he)=>{var Kt;if(!ge.src||!await oe())return null;const ye=Z(),Te=Q();if(!ye||!Te||!ye.slides.length)return null;const Ne=Me(ye,ge);if(Ne===-1)return null;const Ue=ye.slides[Ne].id;ye.slideIndex!==Ne&&ye.updateSlideIndex(Ne);const be=ye.viewportSize,Ye=ye.viewportSize*ye.viewportRatio,{width:We,height:rt}=await Oe(ge.src,ge,be,Ye),{nanoid:lt}=await Promise.resolve().then(()=>wie);if(!((Kt=i.value)!=null&&Kt.isConnected)||Z()!==ye)return null;const gt=ye.slides.findIndex(Ge=>Ge.id===Ue);if(gt===-1)return null;const tt={type:"image",id:lt(10),src:ge.src,width:We,height:rt,left:he?he.x-We/2:ge.left??(be-We)/2,top:he?he.y-rt/2:ge.top??(Ye-rt)/2,fixedRatio:ge.fixedRatio??!0,rotate:ge.rotate??0};return ye.addElement(tt,Ue),ge.select!==!1&&ye.slideIndex===gt&&Te.setActiveElementIdList([tt.id]),await z(),JSON.parse(JSON.stringify(tt))},le=ge=>ae(ge),U=ge=>Number.isFinite(ge.left)&&Number.isFinite(ge.top)&&Number.isFinite(ge.width)&&Number.isFinite(ge.height)&&ge.width>0&&ge.height>0,ee=(ge,he,ye)=>ge>=ye.left&&ge<ye.right&&he>=ye.top&&he<ye.bottom,ie=async ge=>{var Ge,un,Hr;const{clientX:he,clientY:ye}=ge,Te=ge.widthRatio??LIe;if(!ge.src||!Number.isFinite(he)||!Number.isFinite(ye)||!Number.isFinite(Te)||Te<=0||!await oe())return null;await l.nextTick();const Ne=Z();if(!Ne||!Ne.slides.length)return null;const Ue=(Ge=i.value)==null?void 0:Ge.querySelector("[data-lt-ppt-slide-viewport]");if(!Ue)return null;const be=Ue.getBoundingClientRect();if(!U(be)||!ee(he,ye,be))return null;const Ye=(un=i.value)==null?void 0:un.getBoundingClientRect();if(!Ye||!U(Ye)||!ee(he,ye,Ye))return null;const We=(Hr=Ue.parentElement)==null?void 0:Hr.getBoundingClientRect();if(We&&(!U(We)||!ee(he,ye,We)))return null;const rt=Ne.viewportSize,lt=rt*Ne.viewportRatio;if(!Number.isFinite(rt)||!Number.isFinite(lt)||rt<=0||lt<=0)return null;const gt=rt*Te;if(!Number.isFinite(gt)||gt<=0)return null;const tt=Ne.slides[Ne.slideIndex];if(!tt)return null;const Kt={x:(he-be.left)*rt/be.width,y:(ye-be.top)*lt/be.height};return ae({src:ge.src,slideId:tt.id,width:gt,fixedRatio:ge.fixedRatio,rotate:ge.rotate,select:ge.select},Kt)},pe=(ge,he,ye)=>{var Ye,We;const Te=!!ye.slideId||ye.slideIndex!==void 0,Ne=Me(ge,ye),Ue=ye.elementId||(he.activeElementIdList.length===1?he.activeElementIdList[0]:he.handleElementId);if(!Ue)return null;if(Te||!ye.elementId){if(Ne===-1)return null;const rt=(Ye=ge.slides[Ne])==null?void 0:Ye.elements.find(lt=>lt.id===Ue);return(rt==null?void 0:rt.type)==="image"?{slideIndex:Ne,element:rt}:null}const be=(We=ge.slides[ge.slideIndex])==null?void 0:We.elements.find(rt=>rt.id===Ue);if((be==null?void 0:be.type)==="image")return{slideIndex:ge.slideIndex,element:be};for(let rt=0;rt<ge.slides.length;rt++){const lt=ge.slides[rt].elements.find(gt=>gt.id===Ue);if((lt==null?void 0:lt.type)==="image")return{slideIndex:rt,element:lt}}return null},ce=async ge=>{if(!ge.src||!await oe())return null;const he=Z(),ye=Q();if(!he||!ye||!he.slides.length)return null;const Te=pe(he,ye,ge);if(!Te)return null;const{slideIndex:Ne,element:Ue}=Te,be={src:ge.src};if(ge.fixedRatio!==void 0&&(be.fixedRatio=ge.fixedRatio),ge.resetClip&&(be.clip=void 0),!(ge.keepSize===!0&&ge.width===void 0&&ge.height===void 0)){const rt=await ue(ge.src),lt=ke(ge.width,Ue.width);let gt=ke(ge.height,Ue.height);ge.height===void 0&&(rt!=null&&rt.width)&&rt.height&&(gt=lt*rt.height/rt.width),be.width=lt,be.height=gt,be.left=Ue.left,be.top=Ue.top,be.clip=void 0}const We=he.slides[Ne].id;return he.updateElement({id:Ue.id,props:be,slideId:We}),he.slideIndex!==Ne&&he.updateSlideIndex(Ne),ge.select!==!1&&ye.setActiveElementIdList([Ue.id]),await z(),JSON.parse(JSON.stringify({...Ue,...be}))},de=async ge=>{if(!ge.src||!await oe())return null;const he=Z(),ye=Q();if(!he||!ye||!he.slides.length)return null;const Te=Me(he,ge);if(Te===-1)return null;he.slideIndex!==Te&&he.updateSlideIndex(Te);const Ne=he.viewportSize,Ue=he.viewportSize*he.viewportRatio,be=await xe(ge.src),{width:Ye,height:We}=ve(ge,be,Ne,Ue,{width:500,height:300}),{nanoid:rt}=await Promise.resolve().then(()=>wie),lt={type:"video",id:rt(10),src:ge.src,width:Ye,height:We,left:ge.left??(Ne-Ye)/2,top:ge.top??(Ue-We)/2,rotate:ge.rotate??0,autoplay:ge.autoplay??!1};return ge.poster!==void 0&&(lt.poster=ge.poster),ge.ext&&(lt.ext=ge.ext),he.addElement(lt),ge.select!==!1&&ye.setActiveElementIdList([lt.id]),await z(),JSON.parse(JSON.stringify(lt))},Pe=(ge,he,ye)=>{var Ye,We;const Te=!!ye.slideId||ye.slideIndex!==void 0,Ne=Me(ge,ye),Ue=ye.elementId||(he.activeElementIdList.length===1?he.activeElementIdList[0]:he.handleElementId);if(!Ue)return null;if(Te||!ye.elementId){if(Ne===-1)return null;const rt=(Ye=ge.slides[Ne])==null?void 0:Ye.elements.find(lt=>lt.id===Ue);return(rt==null?void 0:rt.type)==="video"?{slideIndex:Ne,element:rt}:null}const be=(We=ge.slides[ge.slideIndex])==null?void 0:We.elements.find(rt=>rt.id===Ue);if((be==null?void 0:be.type)==="video")return{slideIndex:ge.slideIndex,element:be};for(let rt=0;rt<ge.slides.length;rt++){const lt=ge.slides[rt].elements.find(gt=>gt.id===Ue);if((lt==null?void 0:lt.type)==="video")return{slideIndex:rt,element:lt}}return null};return t({getSlides:()=>{const ge=Z();return ge?JSON.parse(JSON.stringify(ge.slides)):[]},getSelectedElements:()=>{const ge=Q();return ge?JSON.parse(JSON.stringify(ge.activeElementList)):[]},setSlides:ge=>{const he=Z();he&&he.setSlides(ge)},startScreening:()=>{if(!c||!f)return;f(c).setScreening(!0)},getCurrentIndex:()=>{const ge=Z();return ge?ge.slideIndex:0},hasUnsavedChanges:te,save:async()=>{if(!await oe())throw new Error("lt-ppt editor is not ready");if(await b.waitUntilReady(),!b.save)throw new Error("lt-ppt save is not available");await b.save()},downloadPPT:()=>{const ge=()=>{const he=Q();he==null||he.setDialogForExport("pptx")};if(!c&&p){p.then(ge);return}ge()},generateDefaultPPT:async()=>{if(!await oe()||!c)throw new Error("lt-ppt editor is not ready");const ge=Z();if(!ge)throw new Error("lt-ppt slides store is not ready");const{default:he}=await Promise.resolve().then(()=>EJe),{exportPPTX:ye}=he(ge),Te=await ye(ge.slides,!0,!1,!0);if(!Te)throw new Error("Failed to generate PPTX file");return Te},setMode:F,insertImage:le,insertImageFromDrag:ie,replaceImage:ce,insertVideo:de,replaceVideo:async ge=>{if(!ge.src||!await oe())return null;const he=Z(),ye=Q();if(!he||!ye||!he.slides.length)return null;const Te=Pe(he,ye,ge);if(!Te)return null;const{slideIndex:Ne,element:Ue}=Te,be={src:ge.src};if(ge.autoplay!==void 0&&(be.autoplay=ge.autoplay),ge.poster!==void 0&&(be.poster=ge.poster||void 0),ge.ext!==void 0&&(be.ext=ge.ext||void 0),!(ge.keepSize===!0&&ge.width===void 0&&ge.height===void 0)){const rt=await xe(ge.src),lt=ke(ge.width,Ue.width);let gt=ke(ge.height,Ue.height);ge.height===void 0&&(rt!=null&&rt.width)&&rt.height&&(gt=lt*rt.height/rt.width),be.width=lt,be.height=gt,be.left=Ue.left,be.top=Ue.top}const We=he.slides[Ne].id;return he.updateElement({id:Ue.id,props:be,slideId:We}),he.slideIndex!==Ne&&he.updateSlideIndex(Ne),ge.select!==!1&&ye.setActiveElementIdList([Ue.id]),await z(),JSON.parse(JSON.stringify({...Ue,...be}))}}),(ge,he)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"containerRef",ref:i,class:"lt-ppt-container",style:l.normalizeStyle(T.value),onImageAiEntryClick:W},null,36))}}),et=(e,t)=>{const n=e.__vccOpts||e;for(const[a,r]of t)n[a]=r;return n},OIe=et(EIe,[["__scopeId","data-v-d45f8d4a"]]),PIe=["SourceHanSans","SourceHanSerif","WenDingPLSongTi","AlibabaPuHuiTi","ZhuQueFangSong","LXGWWenKai","WenDingPLKaiTi","DeYiHei","MiSans","CangerXiaowanzi","YousheTitleBlack","FengguangMingrui","ShetuModernSquare","ZcoolHappy","ZizhiQuXiMai","SucaiJishiKangkang","SucaiJishiCoolSquare","TuniuRounded","RuiziZhenyan","SourceSerif4","Inter","JetBrainsMono","Literata","Roboto","OpenSans","Montserrat","SourceSansPro","Merriweather"],_Ie=(e="/fonts")=>{if(typeof document>"u"||!document.head)return;const t=e.replace(/\/$/,""),n=document.createElement("style");n.textContent=PIe.map(a=>`@font-face { font-display: swap; font-family: ${a}; src: url('${t}/${a}.woff2') format('woff2'); }`).join(`
28
28
  `),document.head.appendChild(n)};var IIe=Object.create,mre=Object.defineProperty,VIe=Object.getOwnPropertyDescriptor,bW=Object.getOwnPropertyNames,FIe=Object.getPrototypeOf,DIe=Object.prototype.hasOwnProperty,BIe=(e,t)=>function(){return e&&(t=(0,e[bW(e)[0]])(e=0)),t},XIe=(e,t)=>function(){return t||(0,e[bW(e)[0]])((t={exports:{}}).exports,t),t.exports},UIe=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of bW(t))!DIe.call(e,r)&&r!==n&&mre(e,r,{get:()=>t[r],enumerable:!(a=VIe(t,r))||a.enumerable});return e},WIe=(e,t,n)=>(n=e!=null?IIe(FIe(e)):{},UIe(mre(n,"default",{value:e,enumerable:!0}),e)),R4=BIe({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),YIe=XIe({"../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e,t){R4(),t.exports=a;function n(o){return o instanceof Buffer?Buffer.from(o):new o.constructor(o.buffer.slice(),o.byteOffset,o.length)}function a(o){if(o=o||{},o.circles)return r(o);const i=new Map;if(i.set(Date,d=>new Date(d)),i.set(Map,(d,h)=>new Map(c(Array.from(d),h))),i.set(Set,(d,h)=>new Set(c(Array.from(d),h))),o.constructorHandlers)for(const d of o.constructorHandlers)i.set(d[0],d[1]);let s=null;return o.proto?f:u;function c(d,h){const p=Object.keys(d),v=new Array(p.length);for(let m=0;m<p.length;m++){const g=p[m],y=d[g];typeof y!="object"||y===null?v[g]=y:y.constructor!==Object&&(s=i.get(y.constructor))?v[g]=s(y,h):ArrayBuffer.isView(y)?v[g]=n(y):v[g]=h(y)}return v}function u(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return c(d,u);if(d.constructor!==Object&&(s=i.get(d.constructor)))return s(d,u);const h={};for(const p in d){if(Object.hasOwnProperty.call(d,p)===!1)continue;const v=d[p];typeof v!="object"||v===null?h[p]=v:v.constructor!==Object&&(s=i.get(v.constructor))?h[p]=s(v,u):ArrayBuffer.isView(v)?h[p]=n(v):h[p]=u(v)}return h}function f(d){if(typeof d!="object"||d===null)return d;if(Array.isArray(d))return c(d,f);if(d.constructor!==Object&&(s=i.get(d.constructor)))return s(d,f);const h={};for(const p in d){const v=d[p];typeof v!="object"||v===null?h[p]=v:v.constructor!==Object&&(s=i.get(v.constructor))?h[p]=s(v,f):ArrayBuffer.isView(v)?h[p]=n(v):h[p]=f(v)}return h}}function r(o){const i=[],s=[],c=new Map;if(c.set(Date,p=>new Date(p)),c.set(Map,(p,v)=>new Map(f(Array.from(p),v))),c.set(Set,(p,v)=>new Set(f(Array.from(p),v))),o.constructorHandlers)for(const p of o.constructorHandlers)c.set(p[0],p[1]);let u=null;return o.proto?h:d;function f(p,v){const m=Object.keys(p),g=new Array(m.length);for(let y=0;y<m.length;y++){const b=m[y],R=p[b];if(typeof R!="object"||R===null)g[b]=R;else if(R.constructor!==Object&&(u=c.get(R.constructor)))g[b]=u(R,v);else if(ArrayBuffer.isView(R))g[b]=n(R);else{const A=i.indexOf(R);A!==-1?g[b]=s[A]:g[b]=v(R)}}return g}function d(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return f(p,d);if(p.constructor!==Object&&(u=c.get(p.constructor)))return u(p,d);const v={};i.push(p),s.push(v);for(const m in p){if(Object.hasOwnProperty.call(p,m)===!1)continue;const g=p[m];if(typeof g!="object"||g===null)v[m]=g;else if(g.constructor!==Object&&(u=c.get(g.constructor)))v[m]=u(g,d);else if(ArrayBuffer.isView(g))v[m]=n(g);else{const y=i.indexOf(g);y!==-1?v[m]=s[y]:v[m]=d(g)}}return i.pop(),s.pop(),v}function h(p){if(typeof p!="object"||p===null)return p;if(Array.isArray(p))return f(p,h);if(p.constructor!==Object&&(u=c.get(p.constructor)))return u(p,h);const v={};i.push(p),s.push(v);for(const m in p){const g=p[m];if(typeof g!="object"||g===null)v[m]=g;else if(g.constructor!==Object&&(u=c.get(g.constructor)))v[m]=u(g,h);else if(ArrayBuffer.isView(g))v[m]=n(g);else{const y=i.indexOf(g);y!==-1?v[m]=s[y]:v[m]=h(g)}}return i.pop(),s.pop(),v}}}});R4(),R4(),R4();var gre=typeof navigator<"u",Qt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:typeof global<"u"?global:{};typeof Qt.chrome<"u"&&Qt.chrome.devtools,gre&&(Qt.self,Qt.top);var yre;typeof navigator<"u"&&((yre=navigator.userAgent)==null||yre.toLowerCase().includes("electron")),R4();var ZIe=WIe(YIe()),KIe=/(?:^|[-_/])(\w)/g;function HIe(e,t){return t?t.toUpperCase():""}function QIe(e){return e&&`${e}`.replace(KIe,HIe)}function zIe(e,t){let n=e.replace(/^[a-z]:/i,"").replace(/\\/g,"/");n.endsWith(`index${t}`)&&(n=n.replace(`/index${t}`,t));const a=n.lastIndexOf("/"),r=n.substring(a+1);{const o=r.lastIndexOf(t);return r.substring(0,o)}}var bre=(0,ZIe.default)({circles:!0});const GIe={trailing:!0};function Ib(e,t=25,n={}){if(n={...GIe,...n},!Number.isFinite(t))throw new TypeError("Expected `wait` to be a finite number");let a,r,o=[],i,s;const c=(u,f)=>(i=JIe(e,u,f),i.finally(()=>{if(i=null,n.trailing&&s&&!r){const d=c(u,s);return s=null,d}}),i);return function(...u){return i?(n.trailing&&(s=u),i):new Promise(f=>{const d=!r&&n.leading;clearTimeout(r),r=setTimeout(()=>{r=null;const h=n.leading?a:c(this,u);for(const p of o)p(h);o=[]},t),d?(a=c(this,u),f(a)):o.push(f)})}}async function JIe(e,t,n){return await e.apply(t,n)}function AW(e,t={},n){for(const a in e){const r=e[a],o=n?`${n}:${a}`:a;typeof r=="object"&&r!==null?AW(r,t,o):typeof r=="function"&&(t[o]=r)}return t}const jIe={run:e=>e()},qIe=()=>jIe,Are=typeof console.createTask<"u"?console.createTask:qIe;function $Ie(e,t){const n=t.shift(),a=Are(n);return e.reduce((r,o)=>r.then(()=>a.run(()=>o(...t))),Promise.resolve())}function e7e(e,t){const n=t.shift(),a=Are(n);return Promise.all(e.map(r=>a.run(()=>r(...t))))}function RW(e,t){for(const n of[...e])n(t)}class t7e{constructor(){this._hooks={},this._before=void 0,this._after=void 0,this._deprecatedMessages=void 0,this._deprecatedHooks={},this.hook=this.hook.bind(this),this.callHook=this.callHook.bind(this),this.callHookWith=this.callHookWith.bind(this)}hook(t,n,a={}){if(!t||typeof n!="function")return()=>{};const r=t;let o;for(;this._deprecatedHooks[t];)o=this._deprecatedHooks[t],t=o.to;if(o&&!a.allowDeprecated){let i=o.message;i||(i=`${r} hook has been deprecated`+(o.to?`, please use ${o.to}`:"")),this._deprecatedMessages||(this._deprecatedMessages=new Set),this._deprecatedMessages.has(i)||(console.warn(i),this._deprecatedMessages.add(i))}if(!n.name)try{Object.defineProperty(n,"name",{get:()=>"_"+t.replace(/\W+/g,"_")+"_hook_cb",configurable:!0})}catch{}return this._hooks[t]=this._hooks[t]||[],this._hooks[t].push(n),()=>{n&&(this.removeHook(t,n),n=void 0)}}hookOnce(t,n){let a,r=(...o)=>(typeof a=="function"&&a(),a=void 0,r=void 0,n(...o));return a=this.hook(t,r),a}removeHook(t,n){if(this._hooks[t]){const a=this._hooks[t].indexOf(n);a!==-1&&this._hooks[t].splice(a,1),this._hooks[t].length===0&&delete this._hooks[t]}}deprecateHook(t,n){this._deprecatedHooks[t]=typeof n=="string"?{to:n}:n;const a=this._hooks[t]||[];delete this._hooks[t];for(const r of a)this.hook(t,r)}deprecateHooks(t){Object.assign(this._deprecatedHooks,t);for(const n in t)this.deprecateHook(n,t[n])}addHooks(t){const n=AW(t),a=Object.keys(n).map(r=>this.hook(r,n[r]));return()=>{for(const r of a.splice(0,a.length))r()}}removeHooks(t){const n=AW(t);for(const a in n)this.removeHook(a,n[a])}removeAllHooks(){for(const t in this._hooks)delete this._hooks[t]}callHook(t,...n){return n.unshift(t),this.callHookWith($Ie,t,...n)}callHookParallel(t,...n){return n.unshift(t),this.callHookWith(e7e,t,...n)}callHookWith(t,n,...a){const r=this._before||this._after?{name:n,args:a,context:{}}:void 0;this._before&&RW(this._before,r);const o=t(n in this._hooks?[...this._hooks[n]]:[],a);return o instanceof Promise?o.finally(()=>{this._after&&r&&RW(this._after,r)}):(this._after&&r&&RW(this._after,r),o)}beforeEach(t){return this._before=this._before||[],this._before.push(t),()=>{if(this._before!==void 0){const n=this._before.indexOf(t);n!==-1&&this._before.splice(n,1)}}}afterEach(t){return this._after=this._after||[],this._after.push(t),()=>{if(this._after!==void 0){const n=this._after.indexOf(t);n!==-1&&this._after.splice(n,1)}}}}function Rre(){return new t7e}var n7e=Object.create,xre=Object.defineProperty,a7e=Object.getOwnPropertyDescriptor,xW=Object.getOwnPropertyNames,r7e=Object.getPrototypeOf,o7e=Object.prototype.hasOwnProperty,i7e=(e,t)=>function(){return e&&(t=(0,e[xW(e)[0]])(e=0)),t},Sre=(e,t)=>function(){return t||(0,e[xW(e)[0]])((t={exports:{}}).exports,t),t.exports},s7e=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of xW(t))!o7e.call(e,r)&&r!==n&&xre(e,r,{get:()=>t[r],enumerable:!(a=a7e(t,r))||a.enumerable});return e},l7e=(e,t,n)=>(n=e!=null?n7e(r7e(e)):{},s7e(xre(n,"default",{value:e,enumerable:!0}),e)),xt=i7e({"../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"(){}}),c7e=Sre({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e,t){xt(),function(n){var a={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"Ae",Å:"A",Æ:"AE",Ç:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"Oe",Ő:"O",Ø:"O",Ù:"U",Ú:"U",Û:"U",Ü:"Ue",Ű:"U",Ý:"Y",Þ:"TH",ß:"ss",à:"a",á:"a",â:"a",ã:"a",ä:"ae",å:"a",æ:"ae",ç:"c",è:"e",é:"e",ê:"e",ë:"e",ì:"i",í:"i",î:"i",ï:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"oe",ő:"o",ø:"o",ù:"u",ú:"u",û:"u",ü:"ue",ű:"u",ý:"y",þ:"th",ÿ:"y","ẞ":"SS",ا:"a",أ:"a",إ:"i",آ:"aa",ؤ:"u",ئ:"e",ء:"a",ب:"b",ت:"t",ث:"th",ج:"j",ح:"h",خ:"kh",د:"d",ذ:"th",ر:"r",ز:"z",س:"s",ش:"sh",ص:"s",ض:"dh",ط:"t",ظ:"z",ع:"a",غ:"gh",ف:"f",ق:"q",ك:"k",ل:"l",م:"m",ن:"n",ه:"h",و:"w",ي:"y",ى:"a",ة:"h",ﻻ:"la",ﻷ:"laa",ﻹ:"lai",ﻵ:"laa",گ:"g",چ:"ch",پ:"p",ژ:"zh",ک:"k",ی:"y","َ":"a","ً":"an","ِ":"e","ٍ":"en","ُ":"u","ٌ":"on","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9",က:"k",ခ:"kh",ဂ:"g",ဃ:"ga",င:"ng",စ:"s",ဆ:"sa",ဇ:"z","စျ":"za",ည:"ny",ဋ:"t",ဌ:"ta",ဍ:"d",ဎ:"da",ဏ:"na",တ:"t",ထ:"ta",ဒ:"d",ဓ:"da",န:"n",ပ:"p",ဖ:"pa",ဗ:"b",ဘ:"ba",မ:"m",ယ:"y",ရ:"ya",လ:"l",ဝ:"w",သ:"th",ဟ:"h",ဠ:"la",အ:"a","ြ":"y","ျ":"ya","ွ":"w","ြွ":"yw","ျွ":"ywa","ှ":"h",ဧ:"e","၏":"-e",ဣ:"i",ဤ:"-i",ဉ:"u",ဦ:"-u",ဩ:"aw","သြော":"aw",ဪ:"aw","၀":"0","၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","္":"","့":"","း":"",č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z",ހ:"h",ށ:"sh",ނ:"n",ރ:"r",ބ:"b",ޅ:"lh",ކ:"k",އ:"a",ވ:"v",މ:"m",ފ:"f",ދ:"dh",ތ:"th",ލ:"l",ގ:"g",ޏ:"gn",ސ:"s",ޑ:"d",ޒ:"z",ޓ:"t",ޔ:"y",ޕ:"p",ޖ:"j",ޗ:"ch",ޘ:"tt",ޙ:"hh",ޚ:"kh",ޛ:"th",ޜ:"z",ޝ:"sh",ޞ:"s",ޟ:"d",ޠ:"t",ޡ:"z",ޢ:"a",ޣ:"gh",ޤ:"q",ޥ:"w","ަ":"a","ާ":"aa","ި":"i","ީ":"ee","ު":"u","ޫ":"oo","ެ":"e","ޭ":"ey","ޮ":"o","ޯ":"oa","ް":"",ა:"a",ბ:"b",გ:"g",დ:"d",ე:"e",ვ:"v",ზ:"z",თ:"t",ი:"i",კ:"k",ლ:"l",მ:"m",ნ:"n",ო:"o",პ:"p",ჟ:"zh",რ:"r",ს:"s",ტ:"t",უ:"u",ფ:"p",ქ:"k",ღ:"gh",ყ:"q",შ:"sh",ჩ:"ch",ც:"ts",ძ:"dz",წ:"ts",ჭ:"ch",ხ:"kh",ჯ:"j",ჰ:"h",α:"a",β:"v",γ:"g",δ:"d",ε:"e",ζ:"z",η:"i",θ:"th",ι:"i",κ:"k",λ:"l",μ:"m",ν:"n",ξ:"ks",ο:"o",π:"p",ρ:"r",σ:"s",τ:"t",υ:"y",φ:"f",χ:"x",ψ:"ps",ω:"o",ά:"a",έ:"e",ί:"i",ό:"o",ύ:"y",ή:"i",ώ:"o",ς:"s",ϊ:"i",ΰ:"y",ϋ:"y",ΐ:"i",Α:"A",Β:"B",Γ:"G",Δ:"D",Ε:"E",Ζ:"Z",Η:"I",Θ:"TH",Ι:"I",Κ:"K",Λ:"L",Μ:"M",Ν:"N",Ξ:"KS",Ο:"O",Π:"P",Ρ:"R",Σ:"S",Τ:"T",Υ:"Y",Φ:"F",Χ:"X",Ψ:"PS",Ω:"O",Ά:"A",Έ:"E",Ί:"I",Ό:"O",Ύ:"Y",Ή:"I",Ώ:"O",Ϊ:"I",Ϋ:"Y",ā:"a",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",ū:"u",Ā:"A",Ē:"E",Ģ:"G",Ī:"I",Ķ:"k",Ļ:"L",Ņ:"N",Ū:"U",Ќ:"Kj",ќ:"kj",Љ:"Lj",љ:"lj",Њ:"Nj",њ:"nj",Тс:"Ts",тс:"ts",ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"E",Ł:"L",Ń:"N",Ś:"S",Ź:"Z",Ż:"Z",Є:"Ye",І:"I",Ї:"Yi",Ґ:"G",є:"ye",і:"i",ї:"yi",ґ:"g",ă:"a",Ă:"A",ș:"s",Ș:"S",ț:"t",Ț:"T",ţ:"t",Ţ:"T",а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"i",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"c",ч:"ch",ш:"sh",щ:"sh",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya",А:"A",Б:"B",В:"V",Г:"G",Д:"D",Е:"E",Ё:"Yo",Ж:"Zh",З:"Z",И:"I",Й:"I",К:"K",Л:"L",М:"M",Н:"N",О:"O",П:"P",Р:"R",С:"S",Т:"T",У:"U",Ф:"F",Х:"Kh",Ц:"C",Ч:"Ch",Ш:"Sh",Щ:"Sh",Ъ:"",Ы:"Y",Ь:"",Э:"E",Ю:"Yu",Я:"Ya",ђ:"dj",ј:"j",ћ:"c",џ:"dz",Ђ:"Dj",Ј:"j",Ћ:"C",Џ:"Dz",ľ:"l",ĺ:"l",ŕ:"r",Ľ:"L",Ĺ:"L",Ŕ:"R",ş:"s",Ş:"S",ı:"i",İ:"I",ğ:"g",Ğ:"G",ả:"a",Ả:"A",ẳ:"a",Ẳ:"A",ẩ:"a",Ẩ:"A",đ:"d",Đ:"D",ẹ:"e",Ẹ:"E",ẽ:"e",Ẽ:"E",ẻ:"e",Ẻ:"E",ế:"e",Ế:"E",ề:"e",Ề:"E",ệ:"e",Ệ:"E",ễ:"e",Ễ:"E",ể:"e",Ể:"E",ỏ:"o",ọ:"o",Ọ:"o",ố:"o",Ố:"O",ồ:"o",Ồ:"O",ổ:"o",Ổ:"O",ộ:"o",Ộ:"O",ỗ:"o",Ỗ:"O",ơ:"o",Ơ:"O",ớ:"o",Ớ:"O",ờ:"o",Ờ:"O",ợ:"o",Ợ:"O",ỡ:"o",Ỡ:"O",Ở:"o",ở:"o",ị:"i",Ị:"I",ĩ:"i",Ĩ:"I",ỉ:"i",Ỉ:"i",ủ:"u",Ủ:"U",ụ:"u",Ụ:"U",ũ:"u",Ũ:"U",ư:"u",Ư:"U",ứ:"u",Ứ:"U",ừ:"u",Ừ:"U",ự:"u",Ự:"U",ữ:"u",Ữ:"U",ử:"u",Ử:"ư",ỷ:"y",Ỷ:"y",ỳ:"y",Ỳ:"Y",ỵ:"y",Ỵ:"Y",ỹ:"y",Ỹ:"Y",ạ:"a",Ạ:"A",ấ:"a",Ấ:"A",ầ:"a",Ầ:"A",ậ:"a",Ậ:"A",ẫ:"a",Ẫ:"A",ắ:"a",Ắ:"A",ằ:"a",Ằ:"A",ặ:"a",Ặ:"A",ẵ:"a",Ẵ:"A","⓪":"0","①":"1","②":"2","③":"3","④":"4","⑤":"5","⑥":"6","⑦":"7","⑧":"8","⑨":"9","⑩":"10","⑪":"11","⑫":"12","⑬":"13","⑭":"14","⑮":"15","⑯":"16","⑰":"17","⑱":"18","⑲":"18","⑳":"18","⓵":"1","⓶":"2","⓷":"3","⓸":"4","⓹":"5","⓺":"6","⓻":"7","⓼":"8","⓽":"9","⓾":"10","⓿":"0","⓫":"11","⓬":"12","⓭":"13","⓮":"14","⓯":"15","⓰":"16","⓱":"17","⓲":"18","⓳":"19","⓴":"20","Ⓐ":"A","Ⓑ":"B","Ⓒ":"C","Ⓓ":"D","Ⓔ":"E","Ⓕ":"F","Ⓖ":"G","Ⓗ":"H","Ⓘ":"I","Ⓙ":"J","Ⓚ":"K","Ⓛ":"L","Ⓜ":"M","Ⓝ":"N","Ⓞ":"O","Ⓟ":"P","Ⓠ":"Q","Ⓡ":"R","Ⓢ":"S","Ⓣ":"T","Ⓤ":"U","Ⓥ":"V","Ⓦ":"W","Ⓧ":"X","Ⓨ":"Y","Ⓩ":"Z","ⓐ":"a","ⓑ":"b","ⓒ":"c","ⓓ":"d","ⓔ":"e","ⓕ":"f","ⓖ":"g","ⓗ":"h","ⓘ":"i","ⓙ":"j","ⓚ":"k","ⓛ":"l","ⓜ":"m","ⓝ":"n","ⓞ":"o","ⓟ":"p","ⓠ":"q","ⓡ":"r","ⓢ":"s","ⓣ":"t","ⓤ":"u","ⓦ":"v","ⓥ":"w","ⓧ":"x","ⓨ":"y","ⓩ":"z","“":'"',"”":'"',"‘":"'","’":"'","∂":"d",ƒ:"f","™":"(TM)","©":"(C)",œ:"oe",Œ:"OE","®":"(R)","†":"+","℠":"(SM)","…":"...","˚":"o",º:"o",ª:"a","•":"*","၊":",","။":".",$:"USD","€":"EUR","₢":"BRN","₣":"FRF","£":"GBP","₤":"ITL","₦":"NGN","₧":"ESP","₩":"KRW","₪":"ILS","₫":"VND","₭":"LAK","₮":"MNT","₯":"GRD","₱":"ARS","₲":"PYG","₳":"ARA","₴":"UAH","₵":"GHS","¢":"cent","¥":"CNY",元:"CNY",円:"YEN","﷼":"IRR","₠":"EWE","฿":"THB","₨":"INR","₹":"INR","₰":"PF","₺":"TRY","؋":"AFN","₼":"AZN",лв:"BGN","៛":"KHR","₡":"CRC","₸":"KZT",ден:"MKD",zł:"PLN","₽":"RUB","₾":"GEL"},r=["်","ް"],o={"ာ":"a","ါ":"a","ေ":"e","ဲ":"e","ိ":"i","ီ":"i","ို":"o","ု":"u","ူ":"u","ေါင်":"aung","ော":"aw","ော်":"aw","ေါ":"aw","ေါ်":"aw","်":"်","က်":"et","ိုက်":"aik","ောက်":"auk","င်":"in","ိုင်":"aing","ောင်":"aung","စ်":"it","ည်":"i","တ်":"at","ိတ်":"eik","ုတ်":"ok","ွတ်":"ut","ေတ်":"it","ဒ်":"d","ိုဒ်":"ok","ုဒ်":"ait","န်":"an","ာန်":"an","ိန်":"ein","ုန်":"on","ွန်":"un","ပ်":"at","ိပ်":"eik","ုပ်":"ok","ွပ်":"ut","န်ုပ်":"nub","မ်":"an","ိမ်":"ein","ုမ်":"on","ွမ်":"un","ယ်":"e","ိုလ်":"ol","ဉ်":"in","ံ":"an","ိံ":"ein","ုံ":"on","ައް":"ah","ަށް":"ah"},i={en:{},az:{ç:"c",ə:"e",ğ:"g",ı:"i",ö:"o",ş:"s",ü:"u",Ç:"C",Ə:"E",Ğ:"G",İ:"I",Ö:"O",Ş:"S",Ü:"U"},cs:{č:"c",ď:"d",ě:"e",ň:"n",ř:"r",š:"s",ť:"t",ů:"u",ž:"z",Č:"C",Ď:"D",Ě:"E",Ň:"N",Ř:"R",Š:"S",Ť:"T",Ů:"U",Ž:"Z"},fi:{ä:"a",Ä:"A",ö:"o",Ö:"O"},hu:{ä:"a",Ä:"A",ö:"o",Ö:"O",ü:"u",Ü:"U",ű:"u",Ű:"U"},lt:{ą:"a",č:"c",ę:"e",ė:"e",į:"i",š:"s",ų:"u",ū:"u",ž:"z",Ą:"A",Č:"C",Ę:"E",Ė:"E",Į:"I",Š:"S",Ų:"U",Ū:"U"},lv:{ā:"a",č:"c",ē:"e",ģ:"g",ī:"i",ķ:"k",ļ:"l",ņ:"n",š:"s",ū:"u",ž:"z",Ā:"A",Č:"C",Ē:"E",Ģ:"G",Ī:"i",Ķ:"k",Ļ:"L",Ņ:"N",Š:"S",Ū:"u",Ž:"Z"},pl:{ą:"a",ć:"c",ę:"e",ł:"l",ń:"n",ó:"o",ś:"s",ź:"z",ż:"z",Ą:"A",Ć:"C",Ę:"e",Ł:"L",Ń:"N",Ó:"O",Ś:"S",Ź:"Z",Ż:"Z"},sv:{ä:"a",Ä:"A",ö:"o",Ö:"O"},sk:{ä:"a",Ä:"A"},sr:{љ:"lj",њ:"nj",Љ:"Lj",Њ:"Nj",đ:"dj",Đ:"Dj"},tr:{Ü:"U",Ö:"O",ü:"u",ö:"o"}},s={ar:{"∆":"delta","∞":"la-nihaya","♥":"hob","&":"wa","|":"aw","<":"aqal-men",">":"akbar-men","∑":"majmou","¤":"omla"},az:{},ca:{"∆":"delta","∞":"infinit","♥":"amor","&":"i","|":"o","<":"menys que",">":"mes que","∑":"suma dels","¤":"moneda"},cs:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"nebo","<":"mensi nez",">":"vetsi nez","∑":"soucet","¤":"mena"},de:{"∆":"delta","∞":"unendlich","♥":"Liebe","&":"und","|":"oder","<":"kleiner als",">":"groesser als","∑":"Summe von","¤":"Waehrung"},dv:{"∆":"delta","∞":"kolunulaa","♥":"loabi","&":"aai","|":"noonee","<":"ah vure kuda",">":"ah vure bodu","∑":"jumula","¤":"faisaa"},en:{"∆":"delta","∞":"infinity","♥":"love","&":"and","|":"or","<":"less than",">":"greater than","∑":"sum","¤":"currency"},es:{"∆":"delta","∞":"infinito","♥":"amor","&":"y","|":"u","<":"menos que",">":"mas que","∑":"suma de los","¤":"moneda"},fa:{"∆":"delta","∞":"bi-nahayat","♥":"eshgh","&":"va","|":"ya","<":"kamtar-az",">":"bishtar-az","∑":"majmooe","¤":"vahed"},fi:{"∆":"delta","∞":"aarettomyys","♥":"rakkaus","&":"ja","|":"tai","<":"pienempi kuin",">":"suurempi kuin","∑":"summa","¤":"valuutta"},fr:{"∆":"delta","∞":"infiniment","♥":"Amour","&":"et","|":"ou","<":"moins que",">":"superieure a","∑":"somme des","¤":"monnaie"},ge:{"∆":"delta","∞":"usasruloba","♥":"siqvaruli","&":"da","|":"an","<":"naklebi",">":"meti","∑":"jami","¤":"valuta"},gr:{},hu:{"∆":"delta","∞":"vegtelen","♥":"szerelem","&":"es","|":"vagy","<":"kisebb mint",">":"nagyobb mint","∑":"szumma","¤":"penznem"},it:{"∆":"delta","∞":"infinito","♥":"amore","&":"e","|":"o","<":"minore di",">":"maggiore di","∑":"somma","¤":"moneta"},lt:{"∆":"delta","∞":"begalybe","♥":"meile","&":"ir","|":"ar","<":"maziau nei",">":"daugiau nei","∑":"suma","¤":"valiuta"},lv:{"∆":"delta","∞":"bezgaliba","♥":"milestiba","&":"un","|":"vai","<":"mazak neka",">":"lielaks neka","∑":"summa","¤":"valuta"},my:{"∆":"kwahkhyaet","∞":"asaonasme","♥":"akhyait","&":"nhin","|":"tho","<":"ngethaw",">":"kyithaw","∑":"paungld","¤":"ngwekye"},mk:{},nl:{"∆":"delta","∞":"oneindig","♥":"liefde","&":"en","|":"of","<":"kleiner dan",">":"groter dan","∑":"som","¤":"valuta"},pl:{"∆":"delta","∞":"nieskonczonosc","♥":"milosc","&":"i","|":"lub","<":"mniejsze niz",">":"wieksze niz","∑":"suma","¤":"waluta"},pt:{"∆":"delta","∞":"infinito","♥":"amor","&":"e","|":"ou","<":"menor que",">":"maior que","∑":"soma","¤":"moeda"},ro:{"∆":"delta","∞":"infinit","♥":"dragoste","&":"si","|":"sau","<":"mai mic ca",">":"mai mare ca","∑":"suma","¤":"valuta"},ru:{"∆":"delta","∞":"beskonechno","♥":"lubov","&":"i","|":"ili","<":"menshe",">":"bolshe","∑":"summa","¤":"valjuta"},sk:{"∆":"delta","∞":"nekonecno","♥":"laska","&":"a","|":"alebo","<":"menej ako",">":"viac ako","∑":"sucet","¤":"mena"},sr:{},tr:{"∆":"delta","∞":"sonsuzluk","♥":"ask","&":"ve","|":"veya","<":"kucuktur",">":"buyuktur","∑":"toplam","¤":"para birimi"},uk:{"∆":"delta","∞":"bezkinechnist","♥":"lubov","&":"i","|":"abo","<":"menshe",">":"bilshe","∑":"suma","¤":"valjuta"},vn:{"∆":"delta","∞":"vo cuc","♥":"yeu","&":"va","|":"hoac","<":"nho hon",">":"lon hon","∑":"tong","¤":"tien te"}},c=[";","?",":","@","&","=","+","$",",","/"].join(""),u=[";","?",":","@","&","=","+","$",","].join(""),f=[".","!","~","*","'","(",")"].join(""),d=function(g,y){var b="-",R="",A="",S=!0,w={},M,T,N,C,E,L,P,O,_,I,D,W,Y,G,F="";if(typeof g!="string")return"";if(typeof y=="string"&&(b=y),P=s.en,O=i.en,typeof y=="object"){M=y.maintainCase||!1,w=y.custom&&typeof y.custom=="object"?y.custom:w,N=+y.truncate>1&&y.truncate||!1,C=y.uric||!1,E=y.uricNoSlash||!1,L=y.mark||!1,S=!(y.symbols===!1||y.lang===!1),b=y.separator||b,C&&(F+=c),E&&(F+=u),L&&(F+=f),P=y.lang&&s[y.lang]&&S?s[y.lang]:S?s.en:{},O=y.lang&&i[y.lang]?i[y.lang]:y.lang===!1||y.lang===!0?{}:i.en,y.titleCase&&typeof y.titleCase.length=="number"&&Array.prototype.toString.call(y.titleCase)?(y.titleCase.forEach(function(Z){w[Z+""]=Z+""}),T=!0):T=!!y.titleCase,y.custom&&typeof y.custom.length=="number"&&Array.prototype.toString.call(y.custom)&&y.custom.forEach(function(Z){w[Z+""]=Z+""}),Object.keys(w).forEach(function(Z){var Q;Z.length>1?Q=new RegExp("\\b"+p(Z)+"\\b","gi"):Q=new RegExp(p(Z),"gi"),g=g.replace(Q,w[Z])});for(D in w)F+=D}for(F+=b,F=p(F),g=g.replace(/(^\s+|\s+$)/g,""),Y=!1,G=!1,I=0,W=g.length;I<W;I++)D=g[I],v(D,w)?Y=!1:O[D]?(D=Y&&O[D].match(/[A-Za-z0-9]/)?" "+O[D]:O[D],Y=!1):D in a?(I+1<W&&r.indexOf(g[I+1])>=0?(A+=D,D=""):G===!0?(D=o[A]+a[D],A=""):D=Y&&a[D].match(/[A-Za-z0-9]/)?" "+a[D]:a[D],Y=!1,G=!1):D in o?(A+=D,D="",I===W-1&&(D=o[A]),G=!0):P[D]&&!(C&&c.indexOf(D)!==-1)&&!(E&&u.indexOf(D)!==-1)?(D=Y||R.substr(-1).match(/[A-Za-z0-9]/)?b+P[D]:P[D],D+=g[I+1]!==void 0&&g[I+1].match(/[A-Za-z0-9]/)?b:"",Y=!0):(G===!0?(D=o[A]+D,A="",G=!1):Y&&(/[A-Za-z0-9]/.test(D)||R.substr(-1).match(/A-Za-z0-9]/))&&(D=" "+D),Y=!1),R+=D.replace(new RegExp("[^\\w\\s"+F+"_-]","g"),b);return T&&(R=R.replace(/(\w)(\S*)/g,function(Z,Q,H){var K=Q.toUpperCase()+(H!==null?H:"");return Object.keys(w).indexOf(K.toLowerCase())<0?K:K.toLowerCase()})),R=R.replace(/\s+/g,b).replace(new RegExp("\\"+b+"+","g"),b).replace(new RegExp("(^\\"+b+"+|\\"+b+"+$)","g"),""),N&&R.length>N&&(_=R.charAt(N)===b,R=R.slice(0,N),_||(R=R.slice(0,R.lastIndexOf(b)))),!M&&!T&&(R=R.toLowerCase()),R},h=function(g){return function(b){return d(b,g)}},p=function(g){return g.replace(/[-\\^$*+?.()|[\]{}\/]/g,"\\$&")},v=function(m,g){for(var y in g)if(g[y]===m)return!0};if(typeof t<"u"&&t.exports)t.exports=d,t.exports.createSlug=h;else if(typeof define<"u"&&define.amd)define([],function(){return d});else try{if(n.getSlug||n.createSlug)throw"speakingurl: globals exists /(getSlug|createSlug)/";n.getSlug=d,n.createSlug=h}catch{}}(e)}}),u7e=Sre({"../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e,t){xt(),t.exports=c7e()}});xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt();function f7e(e){var t;const n=e.name||e._componentTag||e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__||e.__name;return n==="index"&&((t=e.__file)!=null&&t.endsWith("index.vue"))?"":n}function d7e(e){const t=e.__file;if(t)return QIe(zIe(t,".vue"))}function wre(e,t){return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__=t,t}function SW(e){if(e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(e.root)return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__}function Mre(e){var t,n;const a=(t=e.subTree)==null?void 0:t.type,r=SW(e);return r?((n=r==null?void 0:r.types)==null?void 0:n.Fragment)===a:!1}function KC(e){var t,n,a;const r=f7e((e==null?void 0:e.type)||{});if(r)return r;if((e==null?void 0:e.root)===e)return"Root";for(const i in(n=(t=e.parent)==null?void 0:t.type)==null?void 0:n.components)if(e.parent.type.components[i]===(e==null?void 0:e.type))return wre(e,i);for(const i in(a=e.appContext)==null?void 0:a.components)if(e.appContext.components[i]===(e==null?void 0:e.type))return wre(e,i);const o=d7e((e==null?void 0:e.type)||{});return o||"Anonymous Component"}function h7e(e){var t,n,a;const r=(a=(n=(t=e==null?void 0:e.appContext)==null?void 0:t.app)==null?void 0:n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__)!=null?a:0,o=e===(e==null?void 0:e.root)?"root":e.uid;return`${r}:${o}`}function wW(e,t){return t=t||`${e.id}:root`,e.instanceMap.get(t)||e.instanceMap.get(":root")}function p7e(){const e={top:0,bottom:0,left:0,right:0,get width(){return e.right-e.left},get height(){return e.bottom-e.top}};return e}var HC;function v7e(e){return HC||(HC=document.createRange()),HC.selectNode(e),HC.getBoundingClientRect()}function m7e(e){const t=p7e();if(!e.children)return t;for(let n=0,a=e.children.length;n<a;n++){const r=e.children[n];let o;if(r.component)o=ty(r.component);else if(r.el){const i=r.el;i.nodeType===1||i.getBoundingClientRect?o=i.getBoundingClientRect():i.nodeType===3&&i.data.trim()&&(o=v7e(i))}o&&g7e(t,o)}return t}function g7e(e,t){return(!e.top||t.top<e.top)&&(e.top=t.top),(!e.bottom||t.bottom>e.bottom)&&(e.bottom=t.bottom),(!e.left||t.left<e.left)&&(e.left=t.left),(!e.right||t.right>e.right)&&(e.right=t.right),e}var Nre={top:0,left:0,right:0,bottom:0,width:0,height:0};function ty(e){const t=e.subTree.el;return typeof window>"u"?Nre:Mre(e)?m7e(e.subTree):(t==null?void 0:t.nodeType)===1?t==null?void 0:t.getBoundingClientRect():e.subTree.component?ty(e.subTree.component):Nre}xt();function MW(e){return Mre(e)?y7e(e.subTree):e.subTree?[e.subTree.el]:[]}function y7e(e){if(!e.children)return[];const t=[];return e.children.forEach(n=>{n.component?t.push(...MW(n.component)):n!=null&&n.el&&t.push(n.el)}),t}var Tre="__vue-devtools-component-inspector__",Cre="__vue-devtools-component-inspector__card__",kre="__vue-devtools-component-inspector__name__",Lre="__vue-devtools-component-inspector__indicator__",Ere={display:"block",zIndex:2147483640,position:"fixed",backgroundColor:"#42b88325",border:"1px solid #42b88350",borderRadius:"5px",transition:"all 0.1s ease-in",pointerEvents:"none"},b7e={fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 8px",borderRadius:"4px",textAlign:"left",position:"absolute",left:0,color:"#e9e9e9",fontSize:"14px",fontWeight:600,lineHeight:"24px",backgroundColor:"#42b883",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},A7e={display:"inline-block",fontWeight:400,fontStyle:"normal",fontSize:"12px",opacity:.7};function Vb(){return document.getElementById(Tre)}function R7e(){return document.getElementById(Cre)}function x7e(){return document.getElementById(Lre)}function S7e(){return document.getElementById(kre)}function NW(e){return{left:`${Math.round(e.left*100)/100}px`,top:`${Math.round(e.top*100)/100}px`,width:`${Math.round(e.width*100)/100}px`,height:`${Math.round(e.height*100)/100}px`}}function TW(e){var t;const n=document.createElement("div");n.id=(t=e.elementId)!=null?t:Tre,Object.assign(n.style,{...Ere,...NW(e.bounds),...e.style});const a=document.createElement("span");a.id=Cre,Object.assign(a.style,{...b7e,top:e.bounds.top<35?0:"-35px"});const r=document.createElement("span");r.id=kre,r.innerHTML=`&lt;${e.name}&gt;&nbsp;&nbsp;`;const o=document.createElement("i");return o.id=Lre,o.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`,Object.assign(o.style,A7e),a.appendChild(r),a.appendChild(o),n.appendChild(a),document.body.appendChild(n),n}function CW(e){const t=Vb(),n=R7e(),a=S7e(),r=x7e();t&&(Object.assign(t.style,{...Ere,...NW(e.bounds)}),Object.assign(n.style,{top:e.bounds.top<35?0:"-35px"}),a.innerHTML=`&lt;${e.name}&gt;&nbsp;&nbsp;`,r.innerHTML=`${Math.round(e.bounds.width*100)/100} x ${Math.round(e.bounds.height*100)/100}`)}function w7e(e){const t=ty(e);if(!t.width&&!t.height)return;const n=KC(e);Vb()?CW({bounds:t,name:n}):TW({bounds:t,name:n})}function Ore(){const e=Vb();e&&(e.style.display="none")}var kW=null;function LW(e){const t=e.target;if(t){const n=t.__vueParentComponent;if(n&&(kW=n,n.vnode.el)){const r=ty(n),o=KC(n);Vb()?CW({bounds:r,name:o}):TW({bounds:r,name:o})}}}function M7e(e,t){if(e.preventDefault(),e.stopPropagation(),kW){const n=h7e(kW);t(n)}}var QC=null;function N7e(){Ore(),window.removeEventListener("mouseover",LW),window.removeEventListener("click",QC,!0),QC=null}function T7e(){return window.addEventListener("mouseover",LW),new Promise(e=>{function t(n){n.preventDefault(),n.stopPropagation(),M7e(n,a=>{window.removeEventListener("click",t,!0),QC=null,window.removeEventListener("mouseover",LW);const r=Vb();r&&(r.style.display="none"),e(JSON.stringify({id:a}))})}QC=t,window.addEventListener("click",t,!0)})}function C7e(e){const t=wW(Ns.value,e.id);if(t){const[n]=MW(t);if(typeof n.scrollIntoView=="function")n.scrollIntoView({behavior:"smooth"});else{const a=ty(t),r=document.createElement("div"),o={...NW(a),position:"absolute"};Object.assign(r.style,o),document.body.appendChild(r),r.scrollIntoView({behavior:"smooth"}),setTimeout(()=>{document.body.removeChild(r)},2e3)}setTimeout(()=>{const a=ty(t);if(a.width||a.height){const r=KC(t),o=Vb();o?CW({...e,name:r,bounds:a}):TW({...e,name:r,bounds:a}),setTimeout(()=>{o&&(o.style.display="none")},1500)}},1200)}}xt();var Pre,_re;(_re=(Pre=Qt).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__)!=null||(Pre.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__=!0);function k7e(e){let t=0;const n=setInterval(()=>{Qt.__VUE_INSPECTOR__&&(clearInterval(n),t+=30,e()),t>=5e3&&clearInterval(n)},30)}function L7e(){const e=Qt.__VUE_INSPECTOR__,t=e.openInEditor;e.openInEditor=async(...n)=>{e.disable(),t(...n)}}function E7e(){return new Promise(e=>{function t(){L7e(),e(Qt.__VUE_INSPECTOR__)}Qt.__VUE_INSPECTOR__?t():k7e(()=>{t()})})}xt(),xt();function O7e(e){return!!(e&&e.__v_isReadonly)}function Ire(e){return O7e(e)?Ire(e.__v_raw):!!(e&&e.__v_isReactive)}function EW(e){return!!(e&&e.__v_isRef===!0)}function x4(e){const t=e&&e.__v_raw;return t?x4(t):e}var P7e=class{constructor(){this.refEditor=new _7e}set(e,t,n,a){const r=Array.isArray(t)?t:t.split(".");for(;r.length>1;){const s=r.shift();e instanceof Map?e=e.get(s):e instanceof Set?e=Array.from(e.values())[s]:e=e[s],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}const o=r[0],i=this.refEditor.get(e)[o];a?a(e,o,n):this.refEditor.isRef(i)?this.refEditor.set(i,n):e[o]=n}get(e,t){const n=Array.isArray(t)?t:t.split(".");for(let a=0;a<n.length;a++)if(e instanceof Map?e=e.get(n[a]):e=e[n[a]],this.refEditor.isRef(e)&&(e=this.refEditor.get(e)),!e)return;return e}has(e,t,n=!1){if(typeof e>"u")return!1;const a=Array.isArray(t)?t.slice():t.split("."),r=n?2:1;for(;e&&a.length>r;){const o=a.shift();e=e[o],this.refEditor.isRef(e)&&(e=this.refEditor.get(e))}return e!=null&&Object.prototype.hasOwnProperty.call(e,a[0])}createDefaultSetCallback(e){return(t,n,a)=>{if((e.remove||e.newKey)&&(Array.isArray(t)?t.splice(n,1):x4(t)instanceof Map?t.delete(n):x4(t)instanceof Set?t.delete(Array.from(t.values())[n]):Reflect.deleteProperty(t,n)),!e.remove){const r=t[e.newKey||n];this.refEditor.isRef(r)?this.refEditor.set(r,a):x4(t)instanceof Map?t.set(e.newKey||n,a):x4(t)instanceof Set?t.add(a):t[e.newKey||n]=a}}}},_7e=class{set(e,t){if(EW(e))e.value=t;else{if(e instanceof Set&&Array.isArray(t)){e.clear(),t.forEach(r=>e.add(r));return}const n=Object.keys(t);if(e instanceof Map){const r=new Set(e.keys());n.forEach(o=>{e.set(o,Reflect.get(t,o)),r.delete(o)}),r.forEach(o=>e.delete(o));return}const a=new Set(Object.keys(e));n.forEach(r=>{Reflect.set(e,r,Reflect.get(t,r)),a.delete(r)}),a.forEach(r=>Reflect.deleteProperty(e,r))}}get(e){return EW(e)?e.value:e}isRef(e){return EW(e)||Ire(e)}};xt(),xt(),xt();var I7e="__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";function V7e(){if(typeof window>"u"||!gre||typeof localStorage>"u"||localStorage===null)return{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""};const e=typeof localStorage.getItem<"u"?localStorage.getItem(I7e):null;return e?JSON.parse(e):{recordingState:!1,mouseEventEnabled:!1,keyboardEventEnabled:!1,componentEventEnabled:!1,performanceEventEnabled:!1,selected:""}}xt(),xt(),xt();var Vre,Fre;(Fre=(Vre=Qt).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS)!=null||(Vre.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS=[]);var F7e=new Proxy(Qt.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS,{get(e,t,n){return Reflect.get(e,t,n)}});function D7e(e,t){Eo.timelineLayersState[t.id]=!1,F7e.push({...e,descriptorId:t.id,appRecord:SW(t.app)})}var Dre,Bre;(Bre=(Dre=Qt).__VUE_DEVTOOLS_KIT_INSPECTOR__)!=null||(Dre.__VUE_DEVTOOLS_KIT_INSPECTOR__=[]);var OW=new Proxy(Qt.__VUE_DEVTOOLS_KIT_INSPECTOR__,{get(e,t,n){return Reflect.get(e,t,n)}}),Xre=Ib(()=>{Db.hooks.callHook("sendInspectorToClient",Ure())});function B7e(e,t){var n,a;OW.push({options:e,descriptor:t,treeFilterPlaceholder:(n=e.treeFilterPlaceholder)!=null?n:"Search tree...",stateFilterPlaceholder:(a=e.stateFilterPlaceholder)!=null?a:"Search state...",treeFilter:"",selectedNodeId:"",appRecord:SW(t.app)}),Xre()}function Ure(){return OW.filter(e=>e.descriptor.app===Ns.value.app).filter(e=>e.descriptor.id!=="components").map(e=>{var t;const n=e.descriptor,a=e.options;return{id:a.id,label:a.label,logo:n.logo,icon:`custom-ic-baseline-${(t=a==null?void 0:a.icon)==null?void 0:t.replace(/_/g,"-")}`,packageName:n.packageName,homepage:n.homepage,pluginId:n.id}})}function zC(e,t){return OW.find(n=>n.options.id===e&&(t?n.descriptor.app===t:!0))}function X7e(){const e=Rre();e.hook("addInspector",({inspector:a,plugin:r})=>{B7e(a,r.descriptor)});const t=Ib(async({inspectorId:a,plugin:r})=>{var o;if(!a||!((o=r==null?void 0:r.descriptor)!=null&&o.app)||Eo.highPerfModeEnabled)return;const i=zC(a,r.descriptor.app),s={app:r.descriptor.app,inspectorId:a,filter:(i==null?void 0:i.treeFilter)||"",rootNodes:[]};await new Promise(c=>{e.callHookWith(async u=>{await Promise.all(u.map(f=>f(s))),c()},"getInspectorTree")}),e.callHookWith(async c=>{await Promise.all(c.map(u=>u({inspectorId:a,rootNodes:s.rootNodes})))},"sendInspectorTreeToClient")},120);e.hook("sendInspectorTree",t);const n=Ib(async({inspectorId:a,plugin:r})=>{var o;if(!a||!((o=r==null?void 0:r.descriptor)!=null&&o.app)||Eo.highPerfModeEnabled)return;const i=zC(a,r.descriptor.app),s={app:r.descriptor.app,inspectorId:a,nodeId:(i==null?void 0:i.selectedNodeId)||"",state:null},c={currentTab:`custom-inspector:${a}`};s.nodeId&&await new Promise(u=>{e.callHookWith(async f=>{await Promise.all(f.map(d=>d(s,c))),u()},"getInspectorState")}),e.callHookWith(async u=>{await Promise.all(u.map(f=>f({inspectorId:a,nodeId:s.nodeId,state:s.state})))},"sendInspectorStateToClient")},120);return e.hook("sendInspectorState",n),e.hook("customInspectorSelectNode",({inspectorId:a,nodeId:r,plugin:o})=>{const i=zC(a,o.descriptor.app);i&&(i.selectedNodeId=r)}),e.hook("timelineLayerAdded",({options:a,plugin:r})=>{D7e(a,r.descriptor)}),e.hook("timelineEventAdded",({options:a,plugin:r})=>{var o;const i=["performance","component-event","keyboard","mouse"];Eo.highPerfModeEnabled||!((o=Eo.timelineLayersState)!=null&&o[r.descriptor.id])&&!i.includes(a.layerId)||e.callHookWith(async s=>{await Promise.all(s.map(c=>c(a)))},"sendTimelineEventToClient")}),e.hook("getComponentInstances",async({app:a})=>{const r=a.__VUE_DEVTOOLS_NEXT_APP_RECORD__;if(!r)return null;const o=r.id.toString();return[...r.instanceMap].filter(([s])=>s.split(":")[0]===o).map(([,s])=>s)}),e.hook("getComponentBounds",async({instance:a})=>ty(a)),e.hook("getComponentName",({instance:a})=>KC(a)),e.hook("componentHighlight",({uid:a})=>{const r=Ns.value.instanceMap.get(a);r&&w7e(r)}),e.hook("componentUnhighlight",()=>{Ore()}),e}var Wre,Yre;(Yre=(Wre=Qt).__VUE_DEVTOOLS_KIT_APP_RECORDS__)!=null||(Wre.__VUE_DEVTOOLS_KIT_APP_RECORDS__=[]);var Zre,Kre;(Kre=(Zre=Qt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__)!=null||(Zre.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__={});var Hre,Qre;(Qre=(Hre=Qt).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__)!=null||(Hre.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__="");var zre,Gre;(Gre=(zre=Qt).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__)!=null||(zre.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__=[]);var Jre,jre;(jre=(Jre=Qt).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__)!=null||(Jre.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__=[]);var ny="__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";function U7e(){return{connected:!1,clientConnected:!1,vitePluginDetected:!0,appRecords:[],activeAppRecordId:"",tabs:[],commands:[],highPerfModeEnabled:!0,devtoolsClientDetected:{},perfUniqueGroupId:0,timelineLayersState:V7e()}}var qre,$re;($re=(qre=Qt)[ny])!=null||(qre[ny]=U7e());var W7e=Ib(e=>{Db.hooks.callHook("devtoolsStateUpdated",{state:e})});Ib((e,t)=>{Db.hooks.callHook("devtoolsConnectedUpdated",{state:e,oldState:t})});var GC=new Proxy(Qt.__VUE_DEVTOOLS_KIT_APP_RECORDS__,{get(e,t,n){return t==="value"?Qt.__VUE_DEVTOOLS_KIT_APP_RECORDS__:Qt.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t]}}),Ns=new Proxy(Qt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__,{get(e,t,n){return t==="value"?Qt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__:t==="id"?Qt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__:Qt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t]}});function eoe(){W7e({...Qt[ny],appRecords:GC.value,activeAppRecordId:Ns.id,tabs:Qt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,commands:Qt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__})}function Y7e(e){Qt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__=e,eoe()}function Z7e(e){Qt.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__=e,eoe()}var Eo=new Proxy(Qt[ny],{get(e,t){return t==="appRecords"?GC:t==="activeAppRecordId"?Ns.id:t==="tabs"?Qt.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__:t==="commands"?Qt.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__:Qt[ny][t]},deleteProperty(e,t){return delete e[t],!0},set(e,t,n){return{...Qt[ny]},e[t]=n,Qt[ny][t]=n,!0}});function K7e(e={}){var t,n,a;const{file:r,host:o,baseUrl:i=window.location.origin,line:s=0,column:c=0}=e;if(r){if(o==="chrome-extension"){const u=r.replace(/\\/g,"\\\\"),f=(n=(t=window.VUE_DEVTOOLS_CONFIG)==null?void 0:t.openInEditorHost)!=null?n:"/";fetch(`${f}__open-in-editor?file=${encodeURI(r)}`).then(d=>{if(!d.ok){const h=`Opening component ${u} failed`;console.log(`%c${h}`,"color:red")}})}else if(Eo.vitePluginDetected){const u=(a=Qt.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__)!=null?a:i;Qt.__VUE_INSPECTOR__.openInEditor(u,r,s,c)}}}xt(),xt(),xt(),xt(),xt();var toe,noe;(noe=(toe=Qt).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__)!=null||(toe.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__=[]);var PW=new Proxy(Qt.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__,{get(e,t,n){return Reflect.get(e,t,n)}});function _W(e){const t={};return Object.keys(e).forEach(n=>{t[n]=e[n].defaultValue}),t}function IW(e){return`__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`}function H7e(e){var t,n,a;const r=(n=(t=PW.find(o=>{var i;return o[0].id===e&&!!((i=o[0])!=null&&i.settings)}))==null?void 0:t[0])!=null?n:null;return(a=r==null?void 0:r.settings)!=null?a:null}function aoe(e,t){var n,a,r;const o=IW(e);if(o){const i=localStorage.getItem(o);if(i)return JSON.parse(i)}if(e){const i=(a=(n=PW.find(s=>s[0].id===e))==null?void 0:n[0])!=null?a:null;return _W((r=i==null?void 0:i.settings)!=null?r:{})}return _W(t)}function Q7e(e,t){const n=IW(e);localStorage.getItem(n)||localStorage.setItem(n,JSON.stringify(_W(t)))}function z7e(e,t,n){const a=IW(e),r=localStorage.getItem(a),o=JSON.parse(r||"{}"),i={...o,[t]:n};localStorage.setItem(a,JSON.stringify(i)),Db.hooks.callHookWith(s=>{s.forEach(c=>c({pluginId:e,key:t,oldValue:o[t],newValue:n,settings:i}))},"setPluginSettings")}xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt();var roe,ooe,Zl=(ooe=(roe=Qt).__VUE_DEVTOOLS_HOOK)!=null?ooe:roe.__VUE_DEVTOOLS_HOOK=Rre(),G7e={vueAppInit(e){Zl.hook("app:init",e)},vueAppUnmount(e){Zl.hook("app:unmount",e)},vueAppConnected(e){Zl.hook("app:connected",e)},componentAdded(e){return Zl.hook("component:added",e)},componentEmit(e){return Zl.hook("component:emit",e)},componentUpdated(e){return Zl.hook("component:updated",e)},componentRemoved(e){return Zl.hook("component:removed",e)},setupDevtoolsPlugin(e){Zl.hook("devtools-plugin:setup",e)},perfStart(e){return Zl.hook("perf:start",e)},perfEnd(e){return Zl.hook("perf:end",e)}},ioe={on:G7e,setupDevToolsPlugin(e,t){return Zl.callHook("devtools-plugin:setup",e,t)}},J7e=class{constructor({plugin:e,ctx:t}){this.hooks=t.hooks,this.plugin=e}get on(){return{visitComponentTree:e=>{this.hooks.hook("visitComponentTree",e)},inspectComponent:e=>{this.hooks.hook("inspectComponent",e)},editComponentState:e=>{this.hooks.hook("editComponentState",e)},getInspectorTree:e=>{this.hooks.hook("getInspectorTree",e)},getInspectorState:e=>{this.hooks.hook("getInspectorState",e)},editInspectorState:e=>{this.hooks.hook("editInspectorState",e)},inspectTimelineEvent:e=>{this.hooks.hook("inspectTimelineEvent",e)},timelineCleared:e=>{this.hooks.hook("timelineCleared",e)},setPluginSettings:e=>{this.hooks.hook("setPluginSettings",e)}}}notifyComponentUpdate(e){var t;if(Eo.highPerfModeEnabled)return;const n=Ure().find(a=>a.packageName===this.plugin.descriptor.packageName);if(n!=null&&n.id){if(e){const a=[e.appContext.app,e.uid,(t=e.parent)==null?void 0:t.uid,e];Zl.callHook("component:updated",...a)}else Zl.callHook("component:updated");this.hooks.callHook("sendInspectorState",{inspectorId:n.id,plugin:this.plugin})}}addInspector(e){this.hooks.callHook("addInspector",{inspector:e,plugin:this.plugin}),this.plugin.descriptor.settings&&Q7e(e.id,this.plugin.descriptor.settings)}sendInspectorTree(e){Eo.highPerfModeEnabled||this.hooks.callHook("sendInspectorTree",{inspectorId:e,plugin:this.plugin})}sendInspectorState(e){Eo.highPerfModeEnabled||this.hooks.callHook("sendInspectorState",{inspectorId:e,plugin:this.plugin})}selectInspectorNode(e,t){this.hooks.callHook("customInspectorSelectNode",{inspectorId:e,nodeId:t,plugin:this.plugin})}visitComponentTree(e){return this.hooks.callHook("visitComponentTree",e)}now(){return Eo.highPerfModeEnabled?0:Date.now()}addTimelineLayer(e){this.hooks.callHook("timelineLayerAdded",{options:e,plugin:this.plugin})}addTimelineEvent(e){Eo.highPerfModeEnabled||this.hooks.callHook("timelineEventAdded",{options:e,plugin:this.plugin})}getSettings(e){return aoe(e??this.plugin.descriptor.id,this.plugin.descriptor.settings)}getComponentInstances(e){return this.hooks.callHook("getComponentInstances",{app:e})}getComponentBounds(e){return this.hooks.callHook("getComponentBounds",{instance:e})}getComponentName(e){return this.hooks.callHook("getComponentName",{instance:e})}highlightElement(e){const t=e.__VUE_DEVTOOLS_NEXT_UID__;return this.hooks.callHook("componentHighlight",{uid:t})}unhighlightElement(){return this.hooks.callHook("componentUnhighlight")}},j7e=J7e;xt(),xt(),xt(),xt();var q7e="__vue_devtool_undefined__",$7e="__vue_devtool_infinity__",eVe="__vue_devtool_negative_infinity__",tVe="__vue_devtool_nan__";xt(),xt();var nVe={[q7e]:"undefined",[tVe]:"NaN",[$7e]:"Infinity",[eVe]:"-Infinity"};Object.entries(nVe).reduce((e,[t,n])=>(e[n]=t,e),{}),xt(),xt(),xt(),xt(),xt();var soe,loe;(loe=(soe=Qt).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__)!=null||(soe.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__=new Set);function coe(e,t){return ioe.setupDevToolsPlugin(e,t)}function aVe(e,t){const[n,a]=e;if(n.app!==t)return;const r=new j7e({plugin:{setupFn:a,descriptor:n},ctx:Db});n.packageName==="vuex"&&r.on.editInspectorState(o=>{r.sendInspectorState(o.inspectorId)}),a(r)}function uoe(e,t){Qt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e)||Eo.highPerfModeEnabled&&!(t!=null&&t.inspectingComponent)||(Qt.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e),PW.forEach(n=>{aVe(n,e)}))}xt(),xt();var S4="__VUE_DEVTOOLS_ROUTER__",Fb="__VUE_DEVTOOLS_ROUTER_INFO__",foe,doe;(doe=(foe=Qt)[Fb])!=null||(foe[Fb]={currentRoute:null,routes:[]});var hoe,poe;(poe=(hoe=Qt)[S4])!=null||(hoe[S4]={}),new Proxy(Qt[Fb],{get(e,t){return Qt[Fb][t]}}),new Proxy(Qt[S4],{get(e,t){if(t==="value")return Qt[S4]}});function rVe(e){const t=new Map;return((e==null?void 0:e.getRoutes())||[]).filter(n=>!t.has(n.path)&&t.set(n.path,1))}function VW(e){return e.map(t=>{let{path:n,name:a,children:r,meta:o}=t;return r!=null&&r.length&&(r=VW(r)),{path:n,name:a,children:r,meta:o}})}function oVe(e){if(e){const{fullPath:t,hash:n,href:a,path:r,name:o,matched:i,params:s,query:c}=e;return{fullPath:t,hash:n,href:a,path:r,name:o,params:s,query:c,matched:VW(i)}}return e}function iVe(e,t){function n(){var a;const r=(a=e.app)==null?void 0:a.config.globalProperties.$router,o=oVe(r==null?void 0:r.currentRoute.value),i=VW(rVe(r)),s=console.warn;console.warn=()=>{},Qt[Fb]={currentRoute:o?bre(o):{},routes:bre(i)},Qt[S4]=r,console.warn=s}n(),ioe.on.componentUpdated(Ib(()=>{var a;((a=t.value)==null?void 0:a.app)===e.app&&(n(),!Eo.highPerfModeEnabled&&Db.hooks.callHook("routerInfoUpdated",{state:Qt[Fb]}))},200))}function sVe(e){return{async getInspectorTree(t){const n={...t,app:Ns.value.app,rootNodes:[]};return await new Promise(a=>{e.callHookWith(async r=>{await Promise.all(r.map(o=>o(n))),a()},"getInspectorTree")}),n.rootNodes},async getInspectorState(t){const n={...t,app:Ns.value.app,state:null},a={currentTab:`custom-inspector:${t.inspectorId}`};return await new Promise(r=>{e.callHookWith(async o=>{await Promise.all(o.map(i=>i(n,a))),r()},"getInspectorState")}),n.state},editInspectorState(t){const n=new P7e,a={...t,app:Ns.value.app,set:(r,o=t.path,i=t.state.value,s)=>{n.set(r,o,i,s||n.createDefaultSetCallback(t.state))}};e.callHookWith(r=>{r.forEach(o=>o(a))},"editInspectorState")},sendInspectorState(t){const n=zC(t);e.callHook("sendInspectorState",{inspectorId:t,plugin:{descriptor:n.descriptor,setupFn:()=>({})}})},inspectComponentInspector(){return T7e()},cancelInspectComponentInspector(){return N7e()},getComponentRenderCode(t){const n=wW(Ns.value,t);if(n)return typeof(n==null?void 0:n.type)!="function"?n.render.toString():n.type.toString()},scrollToComponent(t){return C7e({id:t})},openInEditor:K7e,getVueInspector:E7e,toggleApp(t,n){const a=GC.value.find(r=>r.id===t);a&&(Z7e(t),Y7e(a),iVe(a,Ns),Xre(),uoe(a.app,n))},inspectDOM(t){const n=wW(Ns.value,t);if(n){const[a]=MW(n);a&&(Qt.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__=a)}},updatePluginSettings(t,n,a){z7e(t,n,a)},getPluginSettings(t){return{options:H7e(t),values:aoe(t)}}}}xt();var voe,moe;(moe=(voe=Qt).__VUE_DEVTOOLS_ENV__)!=null||(voe.__VUE_DEVTOOLS_ENV__={vitePluginDetected:!1});var goe=X7e(),yoe,boe;(boe=(yoe=Qt).__VUE_DEVTOOLS_KIT_CONTEXT__)!=null||(yoe.__VUE_DEVTOOLS_KIT_CONTEXT__={hooks:goe,get state(){return{...Eo,activeAppRecordId:Ns.id,activeAppRecord:Ns.value,appRecords:GC.value}},api:sVe(goe)});var Db=Qt.__VUE_DEVTOOLS_KIT_CONTEXT__;xt(),l7e(u7e());var Aoe,Roe;(Roe=(Aoe=Qt).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__)!=null||(Aoe.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__={id:0,appIds:new Set}),xt(),xt();function lVe(e){Eo.highPerfModeEnabled=e??!Eo.highPerfModeEnabled,!e&&Ns.value&&uoe(Ns.value.app)}xt(),xt(),xt();function cVe(e){Eo.devtoolsClientDetected={...Eo.devtoolsClientDetected,...e};const t=Object.values(Eo.devtoolsClientDetected).some(Boolean);lVe(!t)}var xoe,Soe;(Soe=(xoe=Qt).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__)!=null||(xoe.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__=cVe),xt(),xt(),xt(),xt(),xt(),xt(),xt();var uVe=class{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)}getByKey(e){return this.keyToValue.get(e)}getByValue(e){return this.valueToKey.get(e)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}},woe=class{constructor(e){this.generateIdentifier=e,this.kv=new uVe}register(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))}clear(){this.kv.clear()}getIdentifier(e){return this.kv.getByValue(e)}getValue(e){return this.kv.getByKey(e)}},fVe=class extends woe{constructor(){super(e=>e.name),this.classToAllowedProps=new Map}register(e,t){typeof t=="object"?(t.allowProps&&this.classToAllowedProps.set(e,t.allowProps),super.register(e,t.identifier)):super.register(e,t)}getAllowedProps(e){return this.classToAllowedProps.get(e)}};xt(),xt();function dVe(e){if("values"in Object)return Object.values(e);const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function hVe(e,t){const n=dVe(e);if("find"in n)return n.find(t);const a=n;for(let r=0;r<a.length;r++){const o=a[r];if(t(o))return o}}function Bb(e,t){Object.entries(e).forEach(([n,a])=>t(a,n))}function JC(e,t){return e.indexOf(t)!==-1}function Moe(e,t){for(let n=0;n<e.length;n++){const a=e[n];if(t(a))return a}}var pVe=class{constructor(){this.transfomers={}}register(e){this.transfomers[e.name]=e}findApplicable(e){return hVe(this.transfomers,t=>t.isApplicable(e))}findByName(e){return this.transfomers[e]}};xt(),xt();var vVe=e=>Object.prototype.toString.call(e).slice(8,-1),Noe=e=>typeof e>"u",mVe=e=>e===null,w4=e=>typeof e!="object"||e===null||e===Object.prototype?!1:Object.getPrototypeOf(e)===null?!0:Object.getPrototypeOf(e)===Object.prototype,FW=e=>w4(e)&&Object.keys(e).length===0,ev=e=>Array.isArray(e),gVe=e=>typeof e=="string",yVe=e=>typeof e=="number"&&!isNaN(e),bVe=e=>typeof e=="boolean",AVe=e=>e instanceof RegExp,M4=e=>e instanceof Map,N4=e=>e instanceof Set,Toe=e=>vVe(e)==="Symbol",RVe=e=>e instanceof Date&&!isNaN(e.valueOf()),xVe=e=>e instanceof Error,Coe=e=>typeof e=="number"&&isNaN(e),SVe=e=>bVe(e)||mVe(e)||Noe(e)||yVe(e)||gVe(e)||Toe(e),wVe=e=>typeof e=="bigint",MVe=e=>e===1/0||e===-1/0,NVe=e=>ArrayBuffer.isView(e)&&!(e instanceof DataView),TVe=e=>e instanceof URL;xt();var koe=e=>e.replace(/\./g,"\\."),DW=e=>e.map(String).map(koe).join("."),T4=e=>{const t=[];let n="";for(let r=0;r<e.length;r++){let o=e.charAt(r);if(o==="\\"&&e.charAt(r+1)==="."){n+=".",r++;continue}if(o==="."){t.push(n),n="";continue}n+=o}const a=n;return t.push(a),t};xt();function Ad(e,t,n,a){return{isApplicable:e,annotation:t,transform:n,untransform:a}}var Loe=[Ad(Noe,"undefined",()=>null,()=>{}),Ad(wVe,"bigint",e=>e.toString(),e=>typeof BigInt<"u"?BigInt(e):(console.error("Please add a BigInt polyfill."),e)),Ad(RVe,"Date",e=>e.toISOString(),e=>new Date(e)),Ad(xVe,"Error",(e,t)=>{const n={name:e.name,message:e.message};return t.allowedErrorProps.forEach(a=>{n[a]=e[a]}),n},(e,t)=>{const n=new Error(e.message);return n.name=e.name,n.stack=e.stack,t.allowedErrorProps.forEach(a=>{n[a]=e[a]}),n}),Ad(AVe,"regexp",e=>""+e,e=>{const t=e.slice(1,e.lastIndexOf("/")),n=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,n)}),Ad(N4,"set",e=>[...e.values()],e=>new Set(e)),Ad(M4,"map",e=>[...e.entries()],e=>new Map(e)),Ad(e=>Coe(e)||MVe(e),"number",e=>Coe(e)?"NaN":e>0?"Infinity":"-Infinity",Number),Ad(e=>e===0&&1/e===-1/0,"number",()=>"-0",Number),Ad(TVe,"URL",e=>e.toString(),e=>new URL(e))];function jC(e,t,n,a){return{isApplicable:e,annotation:t,transform:n,untransform:a}}var Eoe=jC((e,t)=>Toe(e)?!!t.symbolRegistry.getIdentifier(e):!1,(e,t)=>["symbol",t.symbolRegistry.getIdentifier(e)],e=>e.description,(e,t,n)=>{const a=n.symbolRegistry.getValue(t[1]);if(!a)throw new Error("Trying to deserialize unknown symbol");return a}),CVe=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((e,t)=>(e[t.name]=t,e),{}),Ooe=jC(NVe,e=>["typed-array",e.constructor.name],e=>[...e],(e,t)=>{const n=CVe[t[1]];if(!n)throw new Error("Trying to deserialize unknown typed array");return new n(e)});function Poe(e,t){return e!=null&&e.constructor?!!t.classRegistry.getIdentifier(e.constructor):!1}var _oe=jC(Poe,(e,t)=>["class",t.classRegistry.getIdentifier(e.constructor)],(e,t)=>{const n=t.classRegistry.getAllowedProps(e.constructor);if(!n)return{...e};const a={};return n.forEach(r=>{a[r]=e[r]}),a},(e,t,n)=>{const a=n.classRegistry.getValue(t[1]);if(!a)throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);return Object.assign(Object.create(a.prototype),e)}),Ioe=jC((e,t)=>!!t.customTransformerRegistry.findApplicable(e),(e,t)=>["custom",t.customTransformerRegistry.findApplicable(e).name],(e,t)=>t.customTransformerRegistry.findApplicable(e).serialize(e),(e,t,n)=>{const a=n.customTransformerRegistry.findByName(t[1]);if(!a)throw new Error("Trying to deserialize unknown custom value");return a.deserialize(e)}),kVe=[_oe,Eoe,Ioe,Ooe],Voe=(e,t)=>{const n=Moe(kVe,r=>r.isApplicable(e,t));if(n)return{value:n.transform(e,t),type:n.annotation(e,t)};const a=Moe(Loe,r=>r.isApplicable(e,t));if(a)return{value:a.transform(e,t),type:a.annotation}},Foe={};Loe.forEach(e=>{Foe[e.annotation]=e});var LVe=(e,t,n)=>{if(ev(t))switch(t[0]){case"symbol":return Eoe.untransform(e,t,n);case"class":return _oe.untransform(e,t,n);case"custom":return Ioe.untransform(e,t,n);case"typed-array":return Ooe.untransform(e,t,n);default:throw new Error("Unknown transformation: "+t)}else{const a=Foe[t];if(!a)throw new Error("Unknown transformation: "+t);return a.untransform(e,n)}};xt();var Xb=(e,t)=>{if(t>e.size)throw new Error("index out of bounds");const n=e.keys();for(;t>0;)n.next(),t--;return n.next().value};function Doe(e){if(JC(e,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(JC(e,"prototype"))throw new Error("prototype is not allowed as a property");if(JC(e,"constructor"))throw new Error("constructor is not allowed as a property")}var EVe=(e,t)=>{Doe(t);for(let n=0;n<t.length;n++){const a=t[n];if(N4(e))e=Xb(e,+a);else if(M4(e)){const r=+a,o=+t[++n]==0?"key":"value",i=Xb(e,r);switch(o){case"key":e=i;break;case"value":e=e.get(i);break}}else e=e[a]}return e},BW=(e,t,n)=>{if(Doe(t),t.length===0)return n(e);let a=e;for(let o=0;o<t.length-1;o++){const i=t[o];if(ev(a)){const s=+i;a=a[s]}else if(w4(a))a=a[i];else if(N4(a)){const s=+i;a=Xb(a,s)}else if(M4(a)){if(o===t.length-2)break;const c=+i,u=+t[++o]==0?"key":"value",f=Xb(a,c);switch(u){case"key":a=f;break;case"value":a=a.get(f);break}}}const r=t[t.length-1];if(ev(a)?a[+r]=n(a[+r]):w4(a)&&(a[r]=n(a[r])),N4(a)){const o=Xb(a,+r),i=n(o);o!==i&&(a.delete(o),a.add(i))}if(M4(a)){const o=+t[t.length-2],i=Xb(a,o);switch(+r==0?"key":"value"){case"key":{const c=n(i);a.set(c,a.get(i)),c!==i&&a.delete(i);break}case"value":{a.set(i,n(a.get(i)));break}}}return e};function XW(e,t,n=[]){if(!e)return;if(!ev(e)){Bb(e,(o,i)=>XW(o,t,[...n,...T4(i)]));return}const[a,r]=e;r&&Bb(r,(o,i)=>{XW(o,t,[...n,...T4(i)])}),t(a,n)}function OVe(e,t,n){return XW(t,(a,r)=>{e=BW(e,r,o=>LVe(o,a,n))}),e}function PVe(e,t){function n(a,r){const o=EVe(e,T4(r));a.map(T4).forEach(i=>{e=BW(e,i,()=>o)})}if(ev(t)){const[a,r]=t;a.forEach(o=>{e=BW(e,T4(o),()=>e)}),r&&Bb(r,n)}else Bb(t,n);return e}var _Ve=(e,t)=>w4(e)||ev(e)||M4(e)||N4(e)||Poe(e,t);function IVe(e,t,n){const a=n.get(e);a?a.push(t):n.set(e,[t])}function VVe(e,t){const n={};let a;return e.forEach(r=>{if(r.length<=1)return;t||(r=r.map(s=>s.map(String)).sort((s,c)=>s.length-c.length));const[o,...i]=r;o.length===0?a=i.map(DW):n[DW(o)]=i.map(DW)}),a?FW(n)?[a]:[a,n]:FW(n)?void 0:n}var Boe=(e,t,n,a,r=[],o=[],i=new Map)=>{var s;const c=SVe(e);if(!c){IVe(e,r,t);const v=i.get(e);if(v)return a?{transformedValue:null}:v}if(!_Ve(e,n)){const v=Voe(e,n),m=v?{transformedValue:v.value,annotations:[v.type]}:{transformedValue:e};return c||i.set(e,m),m}if(JC(o,e))return{transformedValue:null};const u=Voe(e,n),f=(s=u==null?void 0:u.value)!=null?s:e,d=ev(f)?[]:{},h={};Bb(f,(v,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")throw new Error(`Detected property ${m}. This is a prototype pollution risk, please remove it from your object.`);const g=Boe(v,t,n,a,[...r,m],[...o,e],i);d[m]=g.transformedValue,ev(g.annotations)?h[m]=g.annotations:w4(g.annotations)&&Bb(g.annotations,(y,b)=>{h[koe(m)+"."+b]=y})});const p=FW(h)?{transformedValue:d,annotations:u?[u.type]:void 0}:{transformedValue:d,annotations:u?[u.type,h]:h};return c||i.set(e,p),p};xt(),xt();function Xoe(e){return Object.prototype.toString.call(e).slice(8,-1)}function Uoe(e){return Xoe(e)==="Array"}function FVe(e){if(Xoe(e)!=="Object")return!1;const t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}function DVe(e,t,n,a,r){const o={}.propertyIsEnumerable.call(a,t)?"enumerable":"nonenumerable";o==="enumerable"&&(e[t]=n),r&&o==="nonenumerable"&&Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}function UW(e,t={}){if(Uoe(e))return e.map(r=>UW(r,t));if(!FVe(e))return e;const n=Object.getOwnPropertyNames(e),a=Object.getOwnPropertySymbols(e);return[...n,...a].reduce((r,o)=>{if(Uoe(t.props)&&!t.props.includes(o))return r;const i=e[o],s=UW(i,t);return DVe(r,o,s,e,t.nonenumerable),r},{})}var mr=class{constructor({dedupe:e=!1}={}){this.classRegistry=new fVe,this.symbolRegistry=new woe(t=>{var n;return(n=t.description)!=null?n:""}),this.customTransformerRegistry=new pVe,this.allowedErrorProps=[],this.dedupe=e}serialize(e){const t=new Map,n=Boe(e,t,this,this.dedupe),a={json:n.transformedValue};n.annotations&&(a.meta={...a.meta,values:n.annotations});const r=VVe(t,this.dedupe);return r&&(a.meta={...a.meta,referentialEqualities:r}),a}deserialize(e){const{json:t,meta:n}=e;let a=UW(t);return n!=null&&n.values&&(a=OVe(a,n.values,this)),n!=null&&n.referentialEqualities&&(a=PVe(a,n.referentialEqualities)),a}stringify(e){return JSON.stringify(this.serialize(e))}parse(e){return this.deserialize(JSON.parse(e))}registerClass(e,t){this.classRegistry.register(e,t)}registerSymbol(e,t){this.symbolRegistry.register(e,t)}registerCustom(e,t){this.customTransformerRegistry.register({name:t,...e})}allowErrorProps(...e){this.allowedErrorProps.push(...e)}};mr.defaultInstance=new mr,mr.serialize=mr.defaultInstance.serialize.bind(mr.defaultInstance),mr.deserialize=mr.defaultInstance.deserialize.bind(mr.defaultInstance),mr.stringify=mr.defaultInstance.stringify.bind(mr.defaultInstance),mr.parse=mr.defaultInstance.parse.bind(mr.defaultInstance),mr.registerClass=mr.defaultInstance.registerClass.bind(mr.defaultInstance),mr.registerSymbol=mr.defaultInstance.registerSymbol.bind(mr.defaultInstance),mr.registerCustom=mr.defaultInstance.registerCustom.bind(mr.defaultInstance),mr.allowErrorProps=mr.defaultInstance.allowErrorProps.bind(mr.defaultInstance),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt(),xt();var Woe,Yoe;(Yoe=(Woe=Qt).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__)!=null||(Woe.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__=[]);var Zoe,Koe;(Koe=(Zoe=Qt).__VUE_DEVTOOLS_KIT_RPC_CLIENT__)!=null||(Zoe.__VUE_DEVTOOLS_KIT_RPC_CLIENT__=null);var Hoe,Qoe;(Qoe=(Hoe=Qt).__VUE_DEVTOOLS_KIT_RPC_SERVER__)!=null||(Hoe.__VUE_DEVTOOLS_KIT_RPC_SERVER__=null);var zoe,Goe;(Goe=(zoe=Qt).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__)!=null||(zoe.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__=null);var Joe,joe;(joe=(Joe=Qt).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__)!=null||(Joe.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__=null);var qoe,$oe;($oe=(qoe=Qt).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__)!=null||(qoe.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__=null),xt(),xt(),xt(),xt(),xt(),xt(),xt();/*!
29
29
  * pinia v3.0.4
30
30
  * (c) 2025 Eduardo San Martin Morote
@@ -281,7 +281,7 @@ end`},nve=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];r
281
281
  `);e.setDefaultAppearance(o)},jGe=function(e,t){var n,a,r,o=ru(t),i=ru(e.acroField),s=t.getRectangle(),c=t.getAppearanceCharacteristics(),u=t.getBorderStyle(),f=(n=u==null?void 0:u.getWidth())!==null&&n!==void 0?n:0,d=Fp(c==null?void 0:c.getRotation()),h=Yy(s,d),p=h.width,v=h.height,m=Iv(En(En({},s),{rotation:d})),g=Qa(0,0,0),y=(a=Ps(c==null?void 0:c.getBorderColor()))!==null&&a!==void 0?a:g,b=Ps(c==null?void 0:c.getBackgroundColor()),R=Ps(c==null?void 0:c.getBackgroundColor(),.8),A=(r=o??i)!==null&&r!==void 0?r:g;ou(o?t:e.acroField,A);var S={x:0+f/2,y:0+f/2,width:p-f,height:v-f,thickness:1.5,borderWidth:f,borderColor:y,markColor:A};return{normal:{on:Ra(m,LE(En(En({},S),{color:b,filled:!0}))),off:Ra(m,LE(En(En({},S),{color:b,filled:!1})))},down:{on:Ra(m,LE(En(En({},S),{color:R,filled:!0}))),off:Ra(m,LE(En(En({},S),{color:R,filled:!1})))}}},qGe=function(e,t){var n,a,r,o=ru(t),i=ru(e.acroField),s=t.getRectangle(),c=t.getAppearanceCharacteristics(),u=t.getBorderStyle(),f=(n=u==null?void 0:u.getWidth())!==null&&n!==void 0?n:0,d=Fp(c==null?void 0:c.getRotation()),h=Yy(s,d),p=h.width,v=h.height,m=Iv(En(En({},s),{rotation:d})),g=Qa(0,0,0),y=(a=Ps(c==null?void 0:c.getBorderColor()))!==null&&a!==void 0?a:g,b=Ps(c==null?void 0:c.getBackgroundColor()),R=Ps(c==null?void 0:c.getBackgroundColor(),.8),A=(r=o??i)!==null&&r!==void 0?r:g;ou(o?t:e.acroField,A);var S={x:p/2,y:v/2,width:p-f,height:v-f,borderWidth:f,borderColor:y,dotColor:A};return{normal:{on:Ra(m,EE(En(En({},S),{color:b,filled:!0}))),off:Ra(m,EE(En(En({},S),{color:b,filled:!1})))},down:{on:Ra(m,EE(En(En({},S),{color:R,filled:!0}))),off:Ra(m,EE(En(En({},S),{color:R,filled:!1})))}}},$Ge=function(e,t,n){var a,r,o,i,s,c=ru(t),u=ru(e.acroField),f=Vv(t),d=Vv(e.acroField),h=t.getRectangle(),p=t.getAppearanceCharacteristics(),v=t.getBorderStyle(),m=p==null?void 0:p.getCaptions(),g=(a=m==null?void 0:m.normal)!==null&&a!==void 0?a:"",y=(o=(r=m==null?void 0:m.down)!==null&&r!==void 0?r:g)!==null&&o!==void 0?o:"",b=(i=v==null?void 0:v.getWidth())!==null&&i!==void 0?i:0,R=Fp(p==null?void 0:p.getRotation()),A=Yy(h,R),S=A.width,w=A.height,M=Iv(En(En({},h),{rotation:R})),T=Qa(0,0,0),N=Ps(p==null?void 0:p.getBorderColor()),C=Ps(p==null?void 0:p.getBackgroundColor()),E=Ps(p==null?void 0:p.getBackgroundColor(),.8),L={x:b,y:b,width:S-b*2,height:w-b*2},P=OE(g,{alignment:Vo.Center,fontSize:f??d,font:n,bounds:L}),O=OE(y,{alignment:Vo.Center,fontSize:f??d,font:n,bounds:L}),_=Math.min(P.fontSize,O.fontSize),I=(s=c??u)!==null&&s!==void 0?s:T;ou(c||f!==void 0?t:e.acroField,I,n,_);var D={x:0+b/2,y:0+b/2,width:S-b,height:w-b,borderWidth:b,borderColor:N,textColor:I,font:n.name,fontSize:_};return{normal:Ra(M,Yve(En(En({},D),{color:C,textLines:[P.line]}))),down:Ra(M,Yve(En(En({},D),{color:E,textLines:[O.line]})))}},eJe=function(e,t,n){var a,r,o,i,s=ru(t),c=ru(e.acroField),u=Vv(t),f=Vv(e.acroField),d=t.getRectangle(),h=t.getAppearanceCharacteristics(),p=t.getBorderStyle(),v=(a=e.getText())!==null&&a!==void 0?a:"",m=(r=p==null?void 0:p.getWidth())!==null&&r!==void 0?r:0,g=Fp(h==null?void 0:h.getRotation()),y=Yy(d,g),b=y.width,R=y.height,A=Iv(En(En({},d),{rotation:g})),S=Qa(0,0,0),w=Ps(h==null?void 0:h.getBorderColor()),M=Ps(h==null?void 0:h.getBackgroundColor()),T,N,C=e.isCombed()?0:1,E={x:m+C,y:m+C,width:b-(m+C)*2,height:R-(m+C)*2};if(e.isMultiline()){var L=Gve(v,{alignment:e.getAlignment(),fontSize:u??f,font:n,bounds:E});T=L.lines,N=L.fontSize}else if(e.isCombed()){var L=zGe(v,{fontSize:u??f,font:n,bounds:E,cellCount:(o=e.getMaxLength())!==null&&o!==void 0?o:0});T=L.cells,N=L.fontSize}else{var L=OE(v,{alignment:e.getAlignment(),fontSize:u??f,font:n,bounds:E});T=[L.line],N=L.fontSize}var P=(i=s??c)!==null&&i!==void 0?i:S;ou(s||u!==void 0?t:e.acroField,P,n,N);var O={x:0+m/2,y:0+m/2,width:b-m,height:R-m,borderWidth:m??0,borderColor:w,textColor:P,font:n.name,fontSize:N,color:M,textLines:T,padding:C};return Ra(A,Zve(O))},tJe=function(e,t,n){var a,r,o,i=ru(t),s=ru(e.acroField),c=Vv(t),u=Vv(e.acroField),f=t.getRectangle(),d=t.getAppearanceCharacteristics(),h=t.getBorderStyle(),p=(a=e.getSelected()[0])!==null&&a!==void 0?a:"",v=(r=h==null?void 0:h.getWidth())!==null&&r!==void 0?r:0,m=Fp(d==null?void 0:d.getRotation()),g=Yy(f,m),y=g.width,b=g.height,R=Iv(En(En({},f),{rotation:m})),A=Qa(0,0,0),S=Ps(d==null?void 0:d.getBorderColor()),w=Ps(d==null?void 0:d.getBackgroundColor()),M=1,T={x:v+M,y:v+M,width:y-(v+M)*2,height:b-(v+M)*2},N=OE(p,{alignment:Vo.Left,fontSize:c??u,font:n,bounds:T}),C=N.line,E=N.fontSize,L=(o=i??s)!==null&&o!==void 0?o:A;ou(i||c!==void 0?t:e.acroField,L,n,E);var P={x:0+v/2,y:0+v/2,width:y-v,height:b-v,borderWidth:v??0,borderColor:S,textColor:L,font:n.name,fontSize:E,color:w,textLines:[C],padding:M};return Ra(R,Zve(P))},nJe=function(e,t,n){var a,r,o=ru(t),i=ru(e.acroField),s=Vv(t),c=Vv(e.acroField),u=t.getRectangle(),f=t.getAppearanceCharacteristics(),d=t.getBorderStyle(),h=(a=d==null?void 0:d.getWidth())!==null&&a!==void 0?a:0,p=Fp(f==null?void 0:f.getRotation()),v=Yy(u,p),m=v.width,g=v.height,y=Iv(En(En({},u),{rotation:p})),b=Qa(0,0,0),R=Ps(f==null?void 0:f.getBorderColor()),A=Ps(f==null?void 0:f.getBackgroundColor()),S=e.getOptions(),w=e.getSelected();e.isSorted()&&S.sort();for(var M="",T=0,N=S.length;T<N;T++)M+=S[T],T<N-1&&(M+=`
282
282
  `);for(var C=1,E={x:h+C,y:h+C,width:m-(h+C)*2,height:g-(h+C)*2},L=Gve(M,{alignment:Vo.Left,fontSize:s??c,font:n,bounds:E}),P=L.lines,O=L.fontSize,_=L.lineHeight,I=[],T=0,N=P.length;T<N;T++){var D=P[T];w.includes(D.text)&&I.push(T)}var W=Qa(153/255,193/255,218/255),Y=(r=o??i)!==null&&r!==void 0?r:b;return ou(o||s!==void 0?t:e.acroField,Y,n,O),Ra(y,_Ge({x:0+h/2,y:0+h/2,width:m-h,height:g-h,borderWidth:h??0,borderColor:R,textColor:Y,font:n.name,fontSize:O,color:A,textLines:P,lineHeight:_,selectedColor:W,selectedLines:I,padding:C}))},Jve=function(){function e(t,n,a){this.alreadyEmbedded=!1,qe(t,"ref",[[Za,"PDFRef"]]),qe(n,"doc",[[Dv,"PDFDocument"]]),qe(a,"embedder",[[fve,"PDFPageEmbedder"]]),this.ref=t,this.doc=n,this.width=a.width,this.height=a.height,this.embedder=a}return e.prototype.scale=function(t){return qe(t,"factor",["number"]),{width:this.width*t,height:this.height*t}},e.prototype.size=function(){return this.scale(1)},e.prototype.embed=function(){return Kn(this,void 0,void 0,function(){return Hn(this,function(t){switch(t.label){case 0:return this.alreadyEmbedded?[3,2]:[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:t.sent(),this.alreadyEmbedded=!0,t.label=2;case 2:return[2]}})})},e.of=function(t,n,a){return new e(t,n,a)},e}(),rc=function(){function e(t,n,a){this.modified=!0,qe(t,"ref",[[Za,"PDFRef"]]),qe(n,"doc",[[Dv,"PDFDocument"]]),qe(a,"embedder",[[hQ,"CustomFontEmbedder"],[oE,"StandardFontEmbedder"]]),this.ref=t,this.doc=n,this.name=a.fontName,this.embedder=a}return e.prototype.encodeText=function(t){return qe(t,"text",["string"]),this.modified=!0,this.embedder.encodeText(t)},e.prototype.widthOfTextAtSize=function(t,n){return qe(t,"text",["string"]),qe(n,"size",["number"]),this.embedder.widthOfTextAtSize(t,n)},e.prototype.heightAtSize=function(t,n){var a;return qe(t,"size",["number"]),Ct(n==null?void 0:n.descender,"options.descender",["boolean"]),this.embedder.heightOfFontAtSize(t,{descender:(a=n==null?void 0:n.descender)!==null&&a!==void 0?a:!0})},e.prototype.sizeAtHeight=function(t){return qe(t,"height",["number"]),this.embedder.sizeOfFontAtHeight(t)},e.prototype.getCharacterSet=function(){return this.embedder instanceof oE?this.embedder.encoding.supportedCodePoints:this.embedder.font.characterSet},e.prototype.embed=function(){return Kn(this,void 0,void 0,function(){return Hn(this,function(t){switch(t.label){case 0:return this.modified?[4,this.embedder.embedIntoContext(this.doc.context,this.ref)]:[3,2];case 1:t.sent(),this.modified=!1,t.label=2;case 2:return[2]}})})},e.of=function(t,n,a){return new e(t,n,a)},e}(),_Q=function(){function e(t,n,a){qe(t,"ref",[[Za,"PDFRef"]]),qe(n,"doc",[[Dv,"PDFDocument"]]),qe(a,"embedder",[[rve,"JpegEmbedder"],[ove,"PngEmbedder"]]),this.ref=t,this.doc=n,this.width=a.width,this.height=a.height,this.embedder=a}return e.prototype.scale=function(t){return qe(t,"factor",["number"]),{width:this.width*t,height:this.height*t}},e.prototype.scaleToFit=function(t,n){qe(t,"width",["number"]),qe(n,"height",["number"]);var a=t/this.width,r=n/this.height,o=Math.min(a,r);return this.scale(o)},e.prototype.size=function(){return this.scale(1)},e.prototype.embed=function(){return Kn(this,void 0,void 0,function(){var t,n,a;return Hn(this,function(r){switch(r.label){case 0:return this.embedder?(this.embedTask||(t=this,n=t.doc,a=t.ref,this.embedTask=this.embedder.embedIntoContext(n.context,a)),[4,this.embedTask]):[2];case 1:return r.sent(),this.embedder=void 0,[2]}})})},e.of=function(t,n,a){return new e(t,n,a)},e}(),Fv;(function(e){e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right"})(Fv||(Fv={}));var nR=function(e){Ct(e==null?void 0:e.x,"options.x",["number"]),Ct(e==null?void 0:e.y,"options.y",["number"]),Ct(e==null?void 0:e.width,"options.width",["number"]),Ct(e==null?void 0:e.height,"options.height",["number"]),Ct(e==null?void 0:e.textColor,"options.textColor",[[Object,"Color"]]),Ct(e==null?void 0:e.backgroundColor,"options.backgroundColor",[[Object,"Color"]]),Ct(e==null?void 0:e.borderColor,"options.borderColor",[[Object,"Color"]]),Ct(e==null?void 0:e.borderWidth,"options.borderWidth",["number"]),Ct(e==null?void 0:e.rotate,"options.rotate",[[Object,"Rotation"]])},Qy=function(){function e(t,n,a){qe(t,"acroField",[[jA,"PDFAcroTerminal"]]),qe(n,"ref",[[Za,"PDFRef"]]),qe(a,"doc",[[Dv,"PDFDocument"]]),this.acroField=t,this.ref=n,this.doc=a}return e.prototype.getName=function(){var t;return(t=this.acroField.getFullyQualifiedName())!==null&&t!==void 0?t:""},e.prototype.isReadOnly=function(){return this.acroField.hasFlag(Mf.ReadOnly)},e.prototype.enableReadOnly=function(){this.acroField.setFlagTo(Mf.ReadOnly,!0)},e.prototype.disableReadOnly=function(){this.acroField.setFlagTo(Mf.ReadOnly,!1)},e.prototype.isRequired=function(){return this.acroField.hasFlag(Mf.Required)},e.prototype.enableRequired=function(){this.acroField.setFlagTo(Mf.Required,!0)},e.prototype.disableRequired=function(){this.acroField.setFlagTo(Mf.Required,!1)},e.prototype.isExported=function(){return!this.acroField.hasFlag(Mf.NoExport)},e.prototype.enableExporting=function(){this.acroField.setFlagTo(Mf.NoExport,!1)},e.prototype.disableExporting=function(){this.acroField.setFlagTo(Mf.NoExport,!0)},e.prototype.needsAppearancesUpdate=function(){throw new eu(this.constructor.name,"needsAppearancesUpdate")},e.prototype.defaultUpdateAppearances=function(t){throw new eu(this.constructor.name,"defaultUpdateAppearances")},e.prototype.markAsDirty=function(){this.doc.getForm().markFieldAsDirty(this.ref)},e.prototype.markAsClean=function(){this.doc.getForm().markFieldAsClean(this.ref)},e.prototype.isDirty=function(){return this.doc.getForm().fieldIsDirty(this.ref)},e.prototype.createWidget=function(t){var n,a=t.textColor,r=t.backgroundColor,o=t.borderColor,i=t.borderWidth,s=Mve(t.rotate),c=t.caption,u=t.x,f=t.y,d=t.width+i,h=t.height+i,p=!!t.hidden,v=t.page;U0e(s,"degreesAngle",90);var m=gQ.create(this.doc.context,this.ref),g=dGe({x:u,y:f,width:d,height:h},i,s);m.setRectangle(g),v&&m.setP(v);var y=m.getOrCreateAppearanceCharacteristics();r&&y.setBackgroundColor(Dve(r)),y.setRotation(s),c&&y.setCaptions({normal:c}),o&&y.setBorderColor(Dve(o));var b=m.getOrCreateBorderStyle();if(i!==void 0&&b.setWidth(i),m.setFlagTo(oM.Print,!0),m.setFlagTo(oM.Hidden,p),m.setFlagTo(oM.Invisible,!1),a){var R=(n=this.acroField.getDefaultAppearance())!==null&&n!==void 0?n:"",A=R+`
283
283
  `+Ky(a).toString();this.acroField.setDefaultAppearance(A)}return m},e.prototype.updateWidgetAppearanceWithFont=function(t,n,a){var r=a.normal,o=a.rollover,i=a.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceStream(t,r,n),rollover:o&&this.createAppearanceStream(t,o,n),down:i&&this.createAppearanceStream(t,i,n)})},e.prototype.updateOnOffWidgetAppearance=function(t,n,a){var r=a.normal,o=a.rollover,i=a.down;this.updateWidgetAppearances(t,{normal:this.createAppearanceDict(t,r,n),rollover:o&&this.createAppearanceDict(t,o,n),down:i&&this.createAppearanceDict(t,i,n)})},e.prototype.updateWidgetAppearances=function(t,n){var a=n.normal,r=n.rollover,o=n.down;t.setNormalAppearance(a),r?t.setRolloverAppearance(r):t.removeRolloverAppearance(),o?t.setDownAppearance(o):t.removeDownAppearance()},e.prototype.createAppearanceStream=function(t,n,a){var r,o=this.acroField.dict.context,i=t.getRectangle(),s=i.width,c=i.height,u=a&&{Font:(r={},r[a.name]=a.ref,r)},f=o.formXObject(n,{Resources:u,BBox:o.obj([0,0,s,c]),Matrix:o.obj([1,0,0,1,0,0])}),d=o.register(f);return d},e.prototype.createImageAppearanceStream=function(t,n,a){var r,o,i=this.acroField.dict.context,s=t.getRectangle(),c=t.getAppearanceCharacteristics(),u=t.getBorderStyle(),f=(o=u==null?void 0:u.getWidth())!==null&&o!==void 0?o:0,d=Fp(c==null?void 0:c.getRotation()),h=Iv(En(En({},s),{rotation:d})),p=Yy(s,d),v=n.scaleToFit(p.width-f*2,p.height-f*2),m={x:f,y:f,width:v.width,height:v.height,rotate:Rn(0),xSkew:Rn(0),ySkew:Rn(0)};a===Fv.Center?(m.x+=(p.width-f*2)/2-v.width/2,m.y+=(p.height-f*2)/2-v.height/2):a===Fv.Right&&(m.x=p.width-f-v.width,m.y=p.height-f-v.height);var g=this.doc.context.addRandomSuffix("Image",10),y=Ra(h,Wve(g,m)),b={XObject:(r={},r[g]=n.ref,r)},R=i.formXObject(y,{Resources:b,BBox:i.obj([0,0,s.width,s.height]),Matrix:i.obj([1,0,0,1,0,0])});return i.register(R)},e.prototype.createAppearanceDict=function(t,n,a){var r=this.acroField.dict.context,o=this.createAppearanceStream(t,n.on),i=this.createAppearanceStream(t,n.off),s=r.obj({});return s.set(a,o),s.set(Ce.of("Off"),i),s},e}(),hM=function(e){kt(t,e);function t(n,a,r){var o=e.call(this,n,a,r)||this;return qe(n,"acroCheckBox",[[cE,"PDFAcroCheckBox"]]),o.acroField=n,o}return t.prototype.check=function(){var n,a=(n=this.acroField.getOnValue())!==null&&n!==void 0?n:Ce.of("Yes");this.markAsDirty(),this.acroField.setValue(a)},t.prototype.uncheck=function(){this.markAsDirty(),this.acroField.setValue(Ce.of("Off"))},t.prototype.isChecked=function(){var n=this.acroField.getOnValue();return!!n&&n===this.acroField.getValue()},t.prototype.addToPage=function(n,a){var r,o,i,s,c,u;qe(n,"page",[[iu,"PDFPage"]]),nR(a),a||(a={}),"textColor"in a||(a.textColor=Qa(0,0,0)),"backgroundColor"in a||(a.backgroundColor=Qa(1,1,1)),"borderColor"in a||(a.borderColor=Qa(0,0,0)),"borderWidth"in a||(a.borderWidth=1);var f=this.createWidget({x:(r=a.x)!==null&&r!==void 0?r:0,y:(o=a.y)!==null&&o!==void 0?o:0,width:(i=a.width)!==null&&i!==void 0?i:50,height:(s=a.height)!==null&&s!==void 0?s:50,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:(c=a.borderWidth)!==null&&c!==void 0?c:0,rotate:(u=a.rotate)!==null&&u!==void 0?u:Rn(0),hidden:a.hidden,page:n.ref}),d=this.doc.context.register(f.dict);this.acroField.addWidget(d),f.setAppearanceState(Ce.of("Off")),this.updateWidgetAppearance(f,Ce.of("Yes")),n.node.addAnnot(d)},t.prototype.needsAppearancesUpdate=function(){for(var n,a=this.acroField.getWidgets(),r=0,o=a.length;r<o;r++){var i=a[r],s=i.getAppearanceState(),c=(n=i.getAppearances())===null||n===void 0?void 0:n.normal;if(!(c instanceof Dn)||s&&!c.has(s))return!0}return!1},t.prototype.defaultUpdateAppearances=function(){this.updateAppearances()},t.prototype.updateAppearances=function(n){var a;Ct(n,"provider",[Function]);for(var r=this.acroField.getWidgets(),o=0,i=r.length;o<i;o++){var s=r[o],c=(a=s.getOnValue())!==null&&a!==void 0?a:Ce.of("Yes");c&&this.updateWidgetAppearance(s,c,n)}this.markAsClean()},t.prototype.updateWidgetAppearance=function(n,a,r){var o=r??jGe,i=tR(o(this,n));this.updateOnOffWidgetAppearance(n,a,i)},t.of=function(n,a,r){return new t(n,a,r)},t}(Qy),PE=function(e){kt(t,e);function t(n,a,r){var o=e.call(this,n,a,r)||this;return qe(n,"acroComboBox",[[uE,"PDFAcroComboBox"]]),o.acroField=n,o}return t.prototype.getOptions=function(){for(var n=this.acroField.getOptions(),a=new Array(n.length),r=0,o=a.length;r<o;r++){var i=n[r],s=i.display,c=i.value;a[r]=(s??c).decodeText()}return a},t.prototype.getSelected=function(){for(var n=this.acroField.getValues(),a=new Array(n.length),r=0,o=n.length;r<o;r++)a[r]=n[r].decodeText();return a},t.prototype.setOptions=function(n){qe(n,"options",[Array]);for(var a=new Array(n.length),r=0,o=n.length;r<o;r++)a[r]={value:gn.fromText(n[r])};this.acroField.setOptions(a)},t.prototype.addOptions=function(n){qe(n,"options",["string",Array]);for(var a=Array.isArray(n)?n:[n],r=this.acroField.getOptions(),o=new Array(a.length),i=0,s=a.length;i<s;i++)o[i]={value:gn.fromText(a[i])};this.acroField.setOptions(r.concat(o))},t.prototype.select=function(n,a){a===void 0&&(a=!1),qe(n,"options",["string",Array]),qe(a,"merge",["boolean"]);var r=Array.isArray(n)?n:[n],o=this.getOptions(),i=r.find(function(d){return!o.includes(d)});i&&this.enableEditing(),this.markAsDirty(),(r.length>1||r.length===1&&a)&&this.enableMultiselect();for(var s=new Array(r.length),c=0,u=r.length;c<u;c++)s[c]=gn.fromText(r[c]);if(a){var f=this.acroField.getValues();this.acroField.setValues(f.concat(s))}else this.acroField.setValues(s)},t.prototype.clear=function(){this.markAsDirty(),this.acroField.setValues([])},t.prototype.setFontSize=function(n){eE(n,"fontSize"),this.acroField.setFontSize(n),this.markAsDirty()},t.prototype.isEditable=function(){return this.acroField.hasFlag(Ha.Edit)},t.prototype.enableEditing=function(){this.acroField.setFlagTo(Ha.Edit,!0)},t.prototype.disableEditing=function(){this.acroField.setFlagTo(Ha.Edit,!1)},t.prototype.isSorted=function(){return this.acroField.hasFlag(Ha.Sort)},t.prototype.enableSorting=function(){this.acroField.setFlagTo(Ha.Sort,!0)},t.prototype.disableSorting=function(){this.acroField.setFlagTo(Ha.Sort,!1)},t.prototype.isMultiselect=function(){return this.acroField.hasFlag(Ha.MultiSelect)},t.prototype.enableMultiselect=function(){this.acroField.setFlagTo(Ha.MultiSelect,!0)},t.prototype.disableMultiselect=function(){this.acroField.setFlagTo(Ha.MultiSelect,!1)},t.prototype.isSpellChecked=function(){return!this.acroField.hasFlag(Ha.DoNotSpellCheck)},t.prototype.enableSpellChecking=function(){this.acroField.setFlagTo(Ha.DoNotSpellCheck,!1)},t.prototype.disableSpellChecking=function(){this.acroField.setFlagTo(Ha.DoNotSpellCheck,!0)},t.prototype.isSelectOnClick=function(){return this.acroField.hasFlag(Ha.CommitOnSelChange)},t.prototype.enableSelectOnClick=function(){this.acroField.setFlagTo(Ha.CommitOnSelChange,!0)},t.prototype.disableSelectOnClick=function(){this.acroField.setFlagTo(Ha.CommitOnSelChange,!1)},t.prototype.addToPage=function(n,a){var r,o,i,s,c,u,f;qe(n,"page",[[iu,"PDFPage"]]),nR(a),a||(a={}),"textColor"in a||(a.textColor=Qa(0,0,0)),"backgroundColor"in a||(a.backgroundColor=Qa(1,1,1)),"borderColor"in a||(a.borderColor=Qa(0,0,0)),"borderWidth"in a||(a.borderWidth=1);var d=this.createWidget({x:(r=a.x)!==null&&r!==void 0?r:0,y:(o=a.y)!==null&&o!==void 0?o:0,width:(i=a.width)!==null&&i!==void 0?i:200,height:(s=a.height)!==null&&s!==void 0?s:50,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:(c=a.borderWidth)!==null&&c!==void 0?c:0,rotate:(u=a.rotate)!==null&&u!==void 0?u:Rn(0),hidden:a.hidden,page:n.ref}),h=this.doc.context.register(d.dict);this.acroField.addWidget(h);var p=(f=a.font)!==null&&f!==void 0?f:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(d,p),n.node.addAnnot(h)},t.prototype.needsAppearancesUpdate=function(){var n;if(this.isDirty())return!0;for(var a=this.acroField.getWidgets(),r=0,o=a.length;r<o;r++){var i=a[r],s=((n=i.getAppearances())===null||n===void 0?void 0:n.normal)instanceof nc;if(!s)return!0}return!1},t.prototype.defaultUpdateAppearances=function(n){qe(n,"font",[[rc,"PDFFont"]]),this.updateAppearances(n)},t.prototype.updateAppearances=function(n,a){qe(n,"font",[[rc,"PDFFont"]]),Ct(a,"provider",[Function]);for(var r=this.acroField.getWidgets(),o=0,i=r.length;o<i;o++){var s=r[o];this.updateWidgetAppearance(s,n,a)}this.markAsClean()},t.prototype.updateWidgetAppearance=function(n,a,r){var o=r??tJe,i=tR(o(this,n,a));this.updateWidgetAppearanceWithFont(n,a,i)},t.of=function(n,a,r){return new t(n,a,r)},t}(Qy),_E=function(e){kt(t,e);function t(n,a,r){var o=e.call(this,n,a,r)||this;return qe(n,"acroListBox",[[vE,"PDFAcroListBox"]]),o.acroField=n,o}return t.prototype.getOptions=function(){for(var n=this.acroField.getOptions(),a=new Array(n.length),r=0,o=a.length;r<o;r++){var i=n[r],s=i.display,c=i.value;a[r]=(s??c).decodeText()}return a},t.prototype.getSelected=function(){for(var n=this.acroField.getValues(),a=new Array(n.length),r=0,o=n.length;r<o;r++)a[r]=n[r].decodeText();return a},t.prototype.setOptions=function(n){qe(n,"options",[Array]),this.markAsDirty();for(var a=new Array(n.length),r=0,o=n.length;r<o;r++)a[r]={value:gn.fromText(n[r])};this.acroField.setOptions(a)},t.prototype.addOptions=function(n){qe(n,"options",["string",Array]),this.markAsDirty();for(var a=Array.isArray(n)?n:[n],r=this.acroField.getOptions(),o=new Array(a.length),i=0,s=a.length;i<s;i++)o[i]={value:gn.fromText(a[i])};this.acroField.setOptions(r.concat(o))},t.prototype.select=function(n,a){a===void 0&&(a=!1),qe(n,"options",["string",Array]),qe(a,"merge",["boolean"]);var r=Array.isArray(n)?n:[n],o=this.getOptions();eze(r,"option",o),this.markAsDirty(),(r.length>1||r.length===1&&a)&&this.enableMultiselect();for(var i=new Array(r.length),s=0,c=r.length;s<c;s++)i[s]=gn.fromText(r[s]);if(a){var u=this.acroField.getValues();this.acroField.setValues(u.concat(i))}else this.acroField.setValues(i)},t.prototype.clear=function(){this.markAsDirty(),this.acroField.setValues([])},t.prototype.setFontSize=function(n){eE(n,"fontSize"),this.acroField.setFontSize(n),this.markAsDirty()},t.prototype.isSorted=function(){return this.acroField.hasFlag(Ha.Sort)},t.prototype.enableSorting=function(){this.acroField.setFlagTo(Ha.Sort,!0)},t.prototype.disableSorting=function(){this.acroField.setFlagTo(Ha.Sort,!1)},t.prototype.isMultiselect=function(){return this.acroField.hasFlag(Ha.MultiSelect)},t.prototype.enableMultiselect=function(){this.acroField.setFlagTo(Ha.MultiSelect,!0)},t.prototype.disableMultiselect=function(){this.acroField.setFlagTo(Ha.MultiSelect,!1)},t.prototype.isSelectOnClick=function(){return this.acroField.hasFlag(Ha.CommitOnSelChange)},t.prototype.enableSelectOnClick=function(){this.acroField.setFlagTo(Ha.CommitOnSelChange,!0)},t.prototype.disableSelectOnClick=function(){this.acroField.setFlagTo(Ha.CommitOnSelChange,!1)},t.prototype.addToPage=function(n,a){var r,o,i,s,c,u,f;qe(n,"page",[[iu,"PDFPage"]]),nR(a),a||(a={}),"textColor"in a||(a.textColor=Qa(0,0,0)),"backgroundColor"in a||(a.backgroundColor=Qa(1,1,1)),"borderColor"in a||(a.borderColor=Qa(0,0,0)),"borderWidth"in a||(a.borderWidth=1);var d=this.createWidget({x:(r=a.x)!==null&&r!==void 0?r:0,y:(o=a.y)!==null&&o!==void 0?o:0,width:(i=a.width)!==null&&i!==void 0?i:200,height:(s=a.height)!==null&&s!==void 0?s:100,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:(c=a.borderWidth)!==null&&c!==void 0?c:0,rotate:(u=a.rotate)!==null&&u!==void 0?u:Rn(0),hidden:a.hidden,page:n.ref}),h=this.doc.context.register(d.dict);this.acroField.addWidget(h);var p=(f=a.font)!==null&&f!==void 0?f:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(d,p),n.node.addAnnot(h)},t.prototype.needsAppearancesUpdate=function(){var n;if(this.isDirty())return!0;for(var a=this.acroField.getWidgets(),r=0,o=a.length;r<o;r++){var i=a[r],s=((n=i.getAppearances())===null||n===void 0?void 0:n.normal)instanceof nc;if(!s)return!0}return!1},t.prototype.defaultUpdateAppearances=function(n){qe(n,"font",[[rc,"PDFFont"]]),this.updateAppearances(n)},t.prototype.updateAppearances=function(n,a){qe(n,"font",[[rc,"PDFFont"]]),Ct(a,"provider",[Function]);for(var r=this.acroField.getWidgets(),o=0,i=r.length;o<i;o++){var s=r[o];this.updateWidgetAppearance(s,n,a)}this.markAsClean()},t.prototype.updateWidgetAppearance=function(n,a,r){var o=r??nJe,i=tR(o(this,n,a));this.updateWidgetAppearanceWithFont(n,a,i)},t.of=function(n,a,r){return new t(n,a,r)},t}(Qy),pM=function(e){kt(t,e);function t(n,a,r){var o=e.call(this,n,a,r)||this;return qe(n,"acroRadioButton",[[pE,"PDFAcroRadioButton"]]),o.acroField=n,o}return t.prototype.getOptions=function(){var n=this.acroField.getExportValues();if(n){for(var a=new Array(n.length),r=0,o=n.length;r<o;r++)a[r]=n[r].decodeText();return a}for(var i=this.acroField.getOnValues(),s=new Array(i.length),r=0,o=s.length;r<o;r++)s[r]=i[r].decodeText();return s},t.prototype.getSelected=function(){var n=this.acroField.getValue();if(n!==Ce.of("Off")){var a=this.acroField.getExportValues();if(a){for(var r=this.acroField.getOnValues(),o=0,i=r.length;o<i;o++)if(r[o]===n)return a[o].decodeText()}return n.decodeText()}},t.prototype.select=function(n){qe(n,"option",["string"]);var a=this.getOptions();Lv(n,"option",a),this.markAsDirty();var r=this.acroField.getOnValues(),o=this.acroField.getExportValues();if(o)for(var i=0,s=o.length;i<s;i++)o[i].decodeText()===n&&this.acroField.setValue(r[i]);else for(var i=0,s=r.length;i<s;i++){var c=r[i];c.decodeText()===n&&this.acroField.setValue(c)}},t.prototype.clear=function(){this.markAsDirty(),this.acroField.setValue(Ce.of("Off"))},t.prototype.isOffToggleable=function(){return!this.acroField.hasFlag(nu.NoToggleToOff)},t.prototype.enableOffToggling=function(){this.acroField.setFlagTo(nu.NoToggleToOff,!1)},t.prototype.disableOffToggling=function(){this.acroField.setFlagTo(nu.NoToggleToOff,!0)},t.prototype.isMutuallyExclusive=function(){return!this.acroField.hasFlag(nu.RadiosInUnison)},t.prototype.enableMutualExclusion=function(){this.acroField.setFlagTo(nu.RadiosInUnison,!1)},t.prototype.disableMutualExclusion=function(){this.acroField.setFlagTo(nu.RadiosInUnison,!0)},t.prototype.addOptionToPage=function(n,a,r){var o,i,s,c,u,f,d,h,p;qe(n,"option",["string"]),qe(a,"page",[[iu,"PDFPage"]]),nR(r);var v=this.createWidget({x:(o=r==null?void 0:r.x)!==null&&o!==void 0?o:0,y:(i=r==null?void 0:r.y)!==null&&i!==void 0?i:0,width:(s=r==null?void 0:r.width)!==null&&s!==void 0?s:50,height:(c=r==null?void 0:r.height)!==null&&c!==void 0?c:50,textColor:(u=r==null?void 0:r.textColor)!==null&&u!==void 0?u:Qa(0,0,0),backgroundColor:(f=r==null?void 0:r.backgroundColor)!==null&&f!==void 0?f:Qa(1,1,1),borderColor:(d=r==null?void 0:r.borderColor)!==null&&d!==void 0?d:Qa(0,0,0),borderWidth:(h=r==null?void 0:r.borderWidth)!==null&&h!==void 0?h:1,rotate:(p=r==null?void 0:r.rotate)!==null&&p!==void 0?p:Rn(0),hidden:r==null?void 0:r.hidden,page:a.ref}),m=this.doc.context.register(v.dict),g=this.acroField.addWidgetWithOpt(m,gn.fromText(n),!this.isMutuallyExclusive());v.setAppearanceState(Ce.of("Off")),this.updateWidgetAppearance(v,g),a.node.addAnnot(m)},t.prototype.needsAppearancesUpdate=function(){for(var n,a=this.acroField.getWidgets(),r=0,o=a.length;r<o;r++){var i=a[r],s=i.getAppearanceState(),c=(n=i.getAppearances())===null||n===void 0?void 0:n.normal;if(!(c instanceof Dn)||s&&!c.has(s))return!0}return!1},t.prototype.defaultUpdateAppearances=function(){this.updateAppearances()},t.prototype.updateAppearances=function(n){Ct(n,"provider",[Function]);for(var a=this.acroField.getWidgets(),r=0,o=a.length;r<o;r++){var i=a[r],s=i.getOnValue();s&&this.updateWidgetAppearance(i,s,n)}},t.prototype.updateWidgetAppearance=function(n,a,r){var o=r??qGe,i=tR(o(this,n));this.updateOnOffWidgetAppearance(n,a,i)},t.of=function(n,a,r){return new t(n,a,r)},t}(Qy),IQ=function(e){kt(t,e);function t(n,a,r){var o=e.call(this,n,a,r)||this;return qe(n,"acroSignature",[[bQ,"PDFAcroSignature"]]),o.acroField=n,o}return t.prototype.needsAppearancesUpdate=function(){return!1},t.of=function(n,a,r){return new t(n,a,r)},t}(Qy),IE=function(e){kt(t,e);function t(n,a,r){var o=e.call(this,n,a,r)||this;return qe(n,"acroText",[[dE,"PDFAcroText"]]),o.acroField=n,o}return t.prototype.getText=function(){var n=this.acroField.getValue();if(!n&&this.isRichFormatted())throw new UGe(this.getName());return n==null?void 0:n.decodeText()},t.prototype.setText=function(n){Ct(n,"text",["string"]);var a=this.getMaxLength();if(a!==void 0&&n&&n.length>a)throw new YGe(n.length,a,this.getName());this.markAsDirty(),this.disableRichFormatting(),n?this.acroField.setValue(gn.fromText(n)):this.acroField.removeValue()},t.prototype.getAlignment=function(){var n=this.acroField.getQuadding();return n===0?Vo.Left:n===1?Vo.Center:n===2?Vo.Right:Vo.Left},t.prototype.setAlignment=function(n){Lv(n,"alignment",Vo),this.markAsDirty(),this.acroField.setQuadding(n)},t.prototype.getMaxLength=function(){return this.acroField.getMaxLength()},t.prototype.setMaxLength=function(n){if(wf(n,"maxLength",0,Number.MAX_SAFE_INTEGER),this.markAsDirty(),n===void 0)this.acroField.removeMaxLength();else{var a=this.getText();if(a&&a.length>n)throw new ZGe(a.length,n,this.getName());this.acroField.setMaxLength(n)}},t.prototype.removeMaxLength=function(){this.markAsDirty(),this.acroField.removeMaxLength()},t.prototype.setImage=function(n){for(var a=this.getAlignment(),r=a===Vo.Center?Fv.Center:a===Vo.Right?Fv.Right:Fv.Left,o=this.acroField.getWidgets(),i=0,s=o.length;i<s;i++){var c=o[i],u=this.createImageAppearanceStream(c,n,r);this.updateWidgetAppearances(c,{normal:u})}this.markAsClean()},t.prototype.setFontSize=function(n){eE(n,"fontSize"),this.acroField.setFontSize(n),this.markAsDirty()},t.prototype.isMultiline=function(){return this.acroField.hasFlag(Wr.Multiline)},t.prototype.enableMultiline=function(){this.markAsDirty(),this.acroField.setFlagTo(Wr.Multiline,!0)},t.prototype.disableMultiline=function(){this.markAsDirty(),this.acroField.setFlagTo(Wr.Multiline,!1)},t.prototype.isPassword=function(){return this.acroField.hasFlag(Wr.Password)},t.prototype.enablePassword=function(){this.acroField.setFlagTo(Wr.Password,!0)},t.prototype.disablePassword=function(){this.acroField.setFlagTo(Wr.Password,!1)},t.prototype.isFileSelector=function(){return this.acroField.hasFlag(Wr.FileSelect)},t.prototype.enableFileSelection=function(){this.acroField.setFlagTo(Wr.FileSelect,!0)},t.prototype.disableFileSelection=function(){this.acroField.setFlagTo(Wr.FileSelect,!1)},t.prototype.isSpellChecked=function(){return!this.acroField.hasFlag(Wr.DoNotSpellCheck)},t.prototype.enableSpellChecking=function(){this.acroField.setFlagTo(Wr.DoNotSpellCheck,!1)},t.prototype.disableSpellChecking=function(){this.acroField.setFlagTo(Wr.DoNotSpellCheck,!0)},t.prototype.isScrollable=function(){return!this.acroField.hasFlag(Wr.DoNotScroll)},t.prototype.enableScrolling=function(){this.acroField.setFlagTo(Wr.DoNotScroll,!1)},t.prototype.disableScrolling=function(){this.acroField.setFlagTo(Wr.DoNotScroll,!0)},t.prototype.isCombed=function(){return this.acroField.hasFlag(Wr.Comb)&&!this.isMultiline()&&!this.isPassword()&&!this.isFileSelector()&&this.getMaxLength()!==void 0},t.prototype.enableCombing=function(){if(this.getMaxLength()===void 0){var n="PDFTextFields must have a max length in order to be combed";console.warn(n)}this.markAsDirty(),this.disableMultiline(),this.disablePassword(),this.disableFileSelection(),this.acroField.setFlagTo(Wr.Comb,!0)},t.prototype.disableCombing=function(){this.markAsDirty(),this.acroField.setFlagTo(Wr.Comb,!1)},t.prototype.isRichFormatted=function(){return this.acroField.hasFlag(Wr.RichText)},t.prototype.enableRichFormatting=function(){this.acroField.setFlagTo(Wr.RichText,!0)},t.prototype.disableRichFormatting=function(){this.acroField.setFlagTo(Wr.RichText,!1)},t.prototype.addToPage=function(n,a){var r,o,i,s,c,u,f;qe(n,"page",[[iu,"PDFPage"]]),nR(a),a||(a={}),"textColor"in a||(a.textColor=Qa(0,0,0)),"backgroundColor"in a||(a.backgroundColor=Qa(1,1,1)),"borderColor"in a||(a.borderColor=Qa(0,0,0)),"borderWidth"in a||(a.borderWidth=1);var d=this.createWidget({x:(r=a.x)!==null&&r!==void 0?r:0,y:(o=a.y)!==null&&o!==void 0?o:0,width:(i=a.width)!==null&&i!==void 0?i:200,height:(s=a.height)!==null&&s!==void 0?s:50,textColor:a.textColor,backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:(c=a.borderWidth)!==null&&c!==void 0?c:0,rotate:(u=a.rotate)!==null&&u!==void 0?u:Rn(0),hidden:a.hidden,page:n.ref}),h=this.doc.context.register(d.dict);this.acroField.addWidget(h);var p=(f=a.font)!==null&&f!==void 0?f:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(d,p),n.node.addAnnot(h)},t.prototype.needsAppearancesUpdate=function(){var n;if(this.isDirty())return!0;for(var a=this.acroField.getWidgets(),r=0,o=a.length;r<o;r++){var i=a[r],s=((n=i.getAppearances())===null||n===void 0?void 0:n.normal)instanceof nc;if(!s)return!0}return!1},t.prototype.defaultUpdateAppearances=function(n){qe(n,"font",[[rc,"PDFFont"]]),this.updateAppearances(n)},t.prototype.updateAppearances=function(n,a){qe(n,"font",[[rc,"PDFFont"]]),Ct(a,"provider",[Function]);for(var r=this.acroField.getWidgets(),o=0,i=r.length;o<i;o++){var s=r[o];this.updateWidgetAppearance(s,n,a)}this.markAsClean()},t.prototype.updateWidgetAppearance=function(n,a,r){var o=r??eJe,i=tR(o(this,n,a));this.updateWidgetAppearanceWithFont(n,a,i)},t.of=function(n,a,r){return new t(n,a,r)},t}(Qy),VE;(function(e){e.Courier="Courier",e.CourierBold="Courier-Bold",e.CourierOblique="Courier-Oblique",e.CourierBoldOblique="Courier-BoldOblique",e.Helvetica="Helvetica",e.HelveticaBold="Helvetica-Bold",e.HelveticaOblique="Helvetica-Oblique",e.HelveticaBoldOblique="Helvetica-BoldOblique",e.TimesRoman="Times-Roman",e.TimesRomanBold="Times-Bold",e.TimesRomanItalic="Times-Italic",e.TimesRomanBoldItalic="Times-BoldItalic",e.Symbol="Symbol",e.ZapfDingbats="ZapfDingbats"})(VE||(VE={}));var aJe=function(){function e(t,n){var a=this;this.embedDefaultFont=function(){return a.doc.embedStandardFont(VE.Helvetica)},qe(t,"acroForm",[[mE,"PDFAcroForm"]]),qe(n,"doc",[[Dv,"PDFDocument"]]),this.acroForm=t,this.doc=n,this.dirtyFields=new Set,this.defaultFontCache=_p.populatedBy(this.embedDefaultFont)}return e.prototype.hasXFA=function(){return this.acroForm.dict.has(Ce.of("XFA"))},e.prototype.deleteXFA=function(){this.acroForm.dict.delete(Ce.of("XFA"))},e.prototype.getFields=function(){for(var t=this.acroForm.getAllFields(),n=[],a=0,r=t.length;a<r;a++){var o=t[a],i=o[0],s=o[1],c=rJe(i,s,this.doc);c&&n.push(c)}return n},e.prototype.getFieldMaybe=function(t){qe(t,"name",["string"]);for(var n=this.getFields(),a=0,r=n.length;a<r;a++){var o=n[a];if(o.getName()===t)return o}},e.prototype.getField=function(t){qe(t,"name",["string"]);var n=this.getFieldMaybe(t);if(n)return n;throw new BGe(t)},e.prototype.getButton=function(t){qe(t,"name",["string"]);var n=this.getField(t);if(n instanceof FE)return n;throw new Hy(t,FE,n)},e.prototype.getCheckBox=function(t){qe(t,"name",["string"]);var n=this.getField(t);if(n instanceof hM)return n;throw new Hy(t,hM,n)},e.prototype.getDropdown=function(t){qe(t,"name",["string"]);var n=this.getField(t);if(n instanceof PE)return n;throw new Hy(t,PE,n)},e.prototype.getOptionList=function(t){qe(t,"name",["string"]);var n=this.getField(t);if(n instanceof _E)return n;throw new Hy(t,_E,n)},e.prototype.getRadioGroup=function(t){qe(t,"name",["string"]);var n=this.getField(t);if(n instanceof pM)return n;throw new Hy(t,pM,n)},e.prototype.getSignature=function(t){qe(t,"name",["string"]);var n=this.getField(t);if(n instanceof IQ)return n;throw new Hy(t,IQ,n)},e.prototype.getTextField=function(t){qe(t,"name",["string"]);var n=this.getField(t);if(n instanceof IE)return n;throw new Hy(t,IE,n)},e.prototype.createButton=function(t){qe(t,"name",["string"]);var n=aR(t),a=this.findOrCreateNonTerminals(n.nonTerminal),r=hE.create(this.doc.context);return r.setPartialName(n.terminal),rR(a,[r,r.ref],n.terminal),FE.of(r,r.ref,this.doc)},e.prototype.createCheckBox=function(t){qe(t,"name",["string"]);var n=aR(t),a=this.findOrCreateNonTerminals(n.nonTerminal),r=cE.create(this.doc.context);return r.setPartialName(n.terminal),rR(a,[r,r.ref],n.terminal),hM.of(r,r.ref,this.doc)},e.prototype.createDropdown=function(t){qe(t,"name",["string"]);var n=aR(t),a=this.findOrCreateNonTerminals(n.nonTerminal),r=uE.create(this.doc.context);return r.setPartialName(n.terminal),rR(a,[r,r.ref],n.terminal),PE.of(r,r.ref,this.doc)},e.prototype.createOptionList=function(t){qe(t,"name",["string"]);var n=aR(t),a=this.findOrCreateNonTerminals(n.nonTerminal),r=vE.create(this.doc.context);return r.setPartialName(n.terminal),rR(a,[r,r.ref],n.terminal),_E.of(r,r.ref,this.doc)},e.prototype.createRadioGroup=function(t){qe(t,"name",["string"]);var n=aR(t),a=this.findOrCreateNonTerminals(n.nonTerminal),r=pE.create(this.doc.context);return r.setPartialName(n.terminal),rR(a,[r,r.ref],n.terminal),pM.of(r,r.ref,this.doc)},e.prototype.createTextField=function(t){qe(t,"name",["string"]);var n=aR(t),a=this.findOrCreateNonTerminals(n.nonTerminal),r=dE.create(this.doc.context);return r.setPartialName(n.terminal),rR(a,[r,r.ref],n.terminal),IE.of(r,r.ref,this.doc)},e.prototype.flatten=function(t){t===void 0&&(t={updateFieldAppearances:!0}),t.updateFieldAppearances&&this.updateFieldAppearances();for(var n=this.getFields(),a=0,r=n.length;a<r;a++){for(var o=n[a],i=o.acroField.getWidgets(),s=0,c=i.length;s<c;s++){var u=i[s],f=this.findWidgetPage(u),d=this.findWidgetAppearanceRef(o,u),h=f.node.newXObject("FlatWidget",d),p=u.getRectangle(),v=Ra([_o(),au(p.x,p.y)],Iv(En(En({},p),{rotation:0})),[CQ(h),Io()]).filter(Boolean);f.pushOperators.apply(f,v)}this.removeField(o)}},e.prototype.removeField=function(t){for(var n=t.acroField.getWidgets(),a=new Set,r=0,o=n.length;r<o;r++){var i=n[r],s=this.findWidgetAppearanceRef(t,i),c=this.findWidgetPage(i);a.add(c),c.node.removeAnnot(s)}a.forEach(function(p){return p.node.removeAnnot(t.ref)}),this.acroForm.removeField(t.acroField);for(var u=t.acroField.normalizedEntries().Kids,f=u.size(),d=0;d<f;d++){var h=u.get(d);h instanceof Za&&this.doc.context.delete(h)}this.doc.context.delete(t.ref)},e.prototype.updateFieldAppearances=function(t){Ct(t,"font",[[rc,"PDFFont"]]),t=t??this.getDefaultFont();for(var n=this.getFields(),a=0,r=n.length;a<r;a++){var o=n[a];o.needsAppearancesUpdate()&&o.defaultUpdateAppearances(t)}},e.prototype.markFieldAsDirty=function(t){Ct(t,"fieldRef",[[Za,"PDFRef"]]),this.dirtyFields.add(t)},e.prototype.markFieldAsClean=function(t){Ct(t,"fieldRef",[[Za,"PDFRef"]]),this.dirtyFields.delete(t)},e.prototype.fieldIsDirty=function(t){return Ct(t,"fieldRef",[[Za,"PDFRef"]]),this.dirtyFields.has(t)},e.prototype.getDefaultFont=function(){return this.defaultFontCache.access()},e.prototype.findWidgetPage=function(t){var n=t.P(),a=this.doc.getPages().find(function(o){return o.ref===n});if(a===void 0){var r=this.doc.context.getObjectRef(t.dict);if(r===void 0)throw new Error("Could not find PDFRef for PDFObject");if(a=this.doc.findPageForAnnotationRef(r),a===void 0)throw new Error("Could not find page for PDFRef "+r)}return a},e.prototype.findWidgetAppearanceRef=function(t,n){var a,r=n.getNormalAppearance();if(r instanceof Dn&&(t instanceof hM||t instanceof pM)){var o=t.acroField.getValue(),i=(a=r.get(o))!==null&&a!==void 0?a:r.get(Ce.of("Off"));i instanceof Za&&(r=i)}if(!(r instanceof Za)){var s=t.getName();throw new Error("Failed to extract appearance ref for: "+s)}return r},e.prototype.findOrCreateNonTerminals=function(t){for(var n=[this.acroForm],a=0,r=t.length;a<r;a++){var o=t[a];if(!o)throw new XGe(o);var i=n[0],s=n[1],c=this.findNonTerminal(o,i);if(c)n=c;else{var u=fE.create(this.doc.context);u.setPartialName(o),u.setParent(s);var f=this.doc.context.register(u.dict);i.addField(f),n=[u,f]}}return n},e.prototype.findNonTerminal=function(t,n){for(var a=n instanceof mE?this.acroForm.getFields():AQ(n.Kids()),r=0,o=a.length;r<o;r++){var i=a[r],s=i[0],c=i[1];if(s.getPartialName()===t){if(s instanceof fE)return[s,c];throw new Kve(t)}}},e.of=function(t,n){return new e(t,n)},e}(),rJe=function(e,t,n){if(e instanceof hE)return FE.of(e,t,n);if(e instanceof cE)return hM.of(e,t,n);if(e instanceof uE)return PE.of(e,t,n);if(e instanceof vE)return _E.of(e,t,n);if(e instanceof dE)return IE.of(e,t,n);if(e instanceof pE)return pM.of(e,t,n);if(e instanceof bQ)return IQ.of(e,t,n)},aR=function(e){if(e.length===0)throw new Error("PDF field names must not be empty strings");for(var t=e.split("."),n=0,a=t.length;n<a;n++)if(t[n]==="")throw new Error('Periods in PDF field names must be separated by at least one character: "'+e+'"');return t.length===1?{nonTerminal:[],terminal:t[0]}:{nonTerminal:t.slice(0,t.length-1),terminal:t[t.length-1]}},rR=function(e,t,n){for(var a=e[0],r=e[1],o=t[0],i=t[1],s=a.normalizedEntries(),c=AQ("Kids"in s?s.Kids:s.Fields),u=0,f=c.length;u<f;u++)if(c[u][0].getPartialName()===n)throw new Kve(n);a.addField(i),o.setParent(r)},oJe={A4:[595.28,841.89]},VQ;(function(e){e[e.Fastest=1/0]="Fastest",e[e.Fast=1500]="Fast",e[e.Medium=500]="Medium",e[e.Slow=100]="Slow"})(VQ||(VQ={}));var iJe=function(){function e(t,n,a){this.alreadyEmbedded=!1,this.ref=t,this.doc=n,this.embedder=a}return e.prototype.embed=function(){return Kn(this,void 0,void 0,function(){var t,n,a,r,o;return Hn(this,function(i){switch(i.label){case 0:return this.alreadyEmbedded?[3,2]:[4,this.embedder.embedIntoContext(this.doc.context,this.ref)];case 1:t=i.sent(),this.doc.catalog.has(Ce.of("Names"))||this.doc.catalog.set(Ce.of("Names"),this.doc.context.obj({})),n=this.doc.catalog.lookup(Ce.of("Names"),Dn),n.has(Ce.of("EmbeddedFiles"))||n.set(Ce.of("EmbeddedFiles"),this.doc.context.obj({})),a=n.lookup(Ce.of("EmbeddedFiles"),Dn),a.has(Ce.of("Names"))||a.set(Ce.of("Names"),this.doc.context.obj([])),r=a.lookup(Ce.of("Names"),Pa),r.push(gn.fromText(this.embedder.fileName)),r.push(t),this.doc.catalog.has(Ce.of("AF"))||this.doc.catalog.set(Ce.of("AF"),this.doc.context.obj([])),o=this.doc.catalog.lookup(Ce.of("AF"),Pa),o.push(t),this.alreadyEmbedded=!0,i.label=2;case 2:return[2]}})})},e.of=function(t,n,a){return new e(t,n,a)},e}(),sJe=function(){function e(t,n,a){this.alreadyEmbedded=!1,this.ref=t,this.doc=n,this.embedder=a}return e.prototype.embed=function(){return Kn(this,void 0,void 0,function(){var t,n,a,r,o,i,s;return Hn(this,function(c){switch(c.label){case 0:return this.alreadyEmbedded?[3,2]:(t=this.doc,n=t.catalog,a=t.context,[4,this.embedder.embedIntoContext(this.doc.context,this.ref)]);case 1:r=c.sent(),n.has(Ce.of("Names"))||n.set(Ce.of("Names"),a.obj({})),o=n.lookup(Ce.of("Names"),Dn),o.has(Ce.of("JavaScript"))||o.set(Ce.of("JavaScript"),a.obj({})),i=o.lookup(Ce.of("JavaScript"),Dn),i.has(Ce.of("Names"))||i.set(Ce.of("Names"),a.obj([])),s=i.lookup(Ce.of("Names"),Pa),s.push(gn.fromText(this.embedder.scriptName)),s.push(r),this.alreadyEmbedded=!0,c.label=2;case 2:return[2]}})})},e.of=function(t,n,a){return new e(t,n,a)},e}(),lJe=function(){function e(t,n){this.script=t,this.scriptName=n}return e.for=function(t,n){return new e(t,n)},e.prototype.embedIntoContext=function(t,n){return Kn(this,void 0,void 0,function(){var a;return Hn(this,function(r){return a=t.obj({Type:"Action",S:"JavaScript",JS:gn.fromText(this.script)}),n?(t.assign(n,a),[2,n]):[2,t.register(a)]})})},e}(),Dv=function(){function e(t,n,a){var r=this;if(this.defaultWordBreaks=[" "],this.computePages=function(){var o=[];return r.catalog.Pages().traverse(function(i,s){if(i instanceof Vp){var c=r.pageMap.get(i);c||(c=iu.of(i,s,r),r.pageMap.set(i,c)),o.push(c)}}),o},this.getOrCreateForm=function(){var o=r.catalog.getOrCreateAcroForm();return aJe.of(o,r)},qe(t,"context",[[fQ,"PDFContext"]]),qe(n,"ignoreEncryption",["boolean"]),this.context=t,this.catalog=t.lookup(t.trailerInfo.Root),this.isEncrypted=!!t.lookup(t.trailerInfo.Encrypt),this.pageCache=_p.populatedBy(this.computePages),this.pageMap=new Map,this.formCache=_p.populatedBy(this.getOrCreateForm),this.fonts=[],this.images=[],this.embeddedPages=[],this.embeddedFiles=[],this.javaScripts=[],!n&&this.isEncrypted)throw new IGe;a&&this.updateInfoDict()}return e.load=function(t,n){return n===void 0&&(n={}),Kn(this,void 0,void 0,function(){var a,r,o,i,s,c,u,f,d,h,p,v;return Hn(this,function(m){switch(m.label){case 0:return a=n.ignoreEncryption,r=a===void 0?!1:a,o=n.parseSpeed,i=o===void 0?VQ.Slow:o,s=n.throwOnInvalidObject,c=s===void 0?!1:s,u=n.updateMetadata,f=u===void 0?!0:u,d=n.capNumbers,h=d===void 0?!1:d,qe(t,"pdf",["string",Uint8Array,ArrayBuffer]),qe(r,"ignoreEncryption",["boolean"]),qe(i,"parseSpeed",["number"]),qe(c,"throwOnInvalidObject",["boolean"]),p=N3(t),[4,uGe.forBytesWithOptions(p,i,c,h).parseDocument()];case 1:return v=m.sent(),[2,new e(v,r,f)]}})})},e.create=function(t){return t===void 0&&(t={}),Kn(this,void 0,void 0,function(){var n,a,r,o,i,s;return Hn(this,function(c){return n=t.updateMetadata,a=n===void 0?!0:n,r=fQ.create(),o=yve.withContext(r),i=r.register(o),s=gve.withContextAndPages(r,i),r.trailerInfo.Root=r.register(s),[2,new e(r,!1,a)]})})},e.prototype.registerFontkit=function(t){this.fontkit=t},e.prototype.getForm=function(){var t=this.formCache.access();return t.hasXFA()&&(console.warn("Removing XFA form data as pdf-lib does not support reading or writing XFA"),t.deleteXFA()),t},e.prototype.getTitle=function(){var t=this.getInfoDict().lookup(Ce.Title);if(t)return Bv(t),t.decodeText()},e.prototype.getAuthor=function(){var t=this.getInfoDict().lookup(Ce.Author);if(t)return Bv(t),t.decodeText()},e.prototype.getSubject=function(){var t=this.getInfoDict().lookup(Ce.Subject);if(t)return Bv(t),t.decodeText()},e.prototype.getKeywords=function(){var t=this.getInfoDict().lookup(Ce.Keywords);if(t)return Bv(t),t.decodeText()},e.prototype.getCreator=function(){var t=this.getInfoDict().lookup(Ce.Creator);if(t)return Bv(t),t.decodeText()},e.prototype.getProducer=function(){var t=this.getInfoDict().lookup(Ce.Producer);if(t)return Bv(t),t.decodeText()},e.prototype.getCreationDate=function(){var t=this.getInfoDict().lookup(Ce.CreationDate);if(t)return Bv(t),t.decodeDate()},e.prototype.getModificationDate=function(){var t=this.getInfoDict().lookup(Ce.ModDate);if(t)return Bv(t),t.decodeDate()},e.prototype.setTitle=function(t,n){qe(t,"title",["string"]);var a=Ce.of("Title");if(this.getInfoDict().set(a,gn.fromText(t)),n!=null&&n.showInWindowTitleBar){var r=this.catalog.getOrCreateViewerPreferences();r.setDisplayDocTitle(!0)}},e.prototype.setAuthor=function(t){qe(t,"author",["string"]);var n=Ce.of("Author");this.getInfoDict().set(n,gn.fromText(t))},e.prototype.setSubject=function(t){qe(t,"author",["string"]);var n=Ce.of("Subject");this.getInfoDict().set(n,gn.fromText(t))},e.prototype.setKeywords=function(t){qe(t,"keywords",[Array]);var n=Ce.of("Keywords");this.getInfoDict().set(n,gn.fromText(t.join(" ")))},e.prototype.setCreator=function(t){qe(t,"creator",["string"]);var n=Ce.of("Creator");this.getInfoDict().set(n,gn.fromText(t))},e.prototype.setProducer=function(t){qe(t,"creator",["string"]);var n=Ce.of("Producer");this.getInfoDict().set(n,gn.fromText(t))},e.prototype.setLanguage=function(t){qe(t,"language",["string"]);var n=Ce.of("Lang");this.catalog.set(n,Ka.of(t))},e.prototype.setCreationDate=function(t){qe(t,"creationDate",[[Date,"Date"]]);var n=Ce.of("CreationDate");this.getInfoDict().set(n,Ka.fromDate(t))},e.prototype.setModificationDate=function(t){qe(t,"modificationDate",[[Date,"Date"]]);var n=Ce.of("ModDate");this.getInfoDict().set(n,Ka.fromDate(t))},e.prototype.getPageCount=function(){return this.pageCount===void 0&&(this.pageCount=this.getPages().length),this.pageCount},e.prototype.getPages=function(){return this.pageCache.access()},e.prototype.getPage=function(t){var n=this.getPages();return tc(t,"index",0,n.length-1),n[t]},e.prototype.getPageIndices=function(){return ZKe(0,this.getPageCount())},e.prototype.removePage=function(t){var n=this.getPageCount();if(this.pageCount===0)throw new DGe;tc(t,"index",0,n-1),this.catalog.removeLeafNode(t),this.pageCount=n-1},e.prototype.addPage=function(t){return qe(t,"page",["undefined",[iu,"PDFPage"],Array]),this.insertPage(this.getPageCount(),t)},e.prototype.insertPage=function(t,n){var a=this.getPageCount();if(tc(t,"index",0,a),qe(n,"page",["undefined",[iu,"PDFPage"],Array]),!n||Array.isArray(n)){var r=Array.isArray(n)?n:oJe.A4;n=iu.create(this),n.setSize.apply(n,r)}else if(n.doc!==this)throw new FGe;var o=this.catalog.insertLeafNode(n.ref,t);return n.node.setParent(o),this.pageMap.set(n.node,n),this.pageCache.invalidate(),this.pageCount=a+1,n},e.prototype.copyPages=function(t,n){return Kn(this,void 0,void 0,function(){var a,r,o,i,s,c,u,f;return Hn(this,function(d){switch(d.label){case 0:return qe(t,"srcDoc",[[e,"PDFDocument"]]),qe(n,"indices",[Array]),[4,t.flush()];case 1:for(d.sent(),a=j0e.for(t.context,this.context),r=t.getPages(),o=new Array(n.length),i=0,s=n.length;i<s;i++)c=r[n[i]],u=a.copy(c.node),f=this.context.register(u),o[i]=iu.of(u,f,this);return[2,o]}})})},e.prototype.copy=function(){return Kn(this,void 0,void 0,function(){var t,n,a,r;return Hn(this,function(o){switch(o.label){case 0:return[4,e.create()];case 1:return t=o.sent(),[4,t.copyPages(this,this.getPageIndices())];case 2:for(n=o.sent(),a=0,r=n.length;a<r;a++)t.addPage(n[a]);return this.getAuthor()!==void 0&&t.setAuthor(this.getAuthor()),this.getCreationDate()!==void 0&&t.setCreationDate(this.getCreationDate()),this.getCreator()!==void 0&&t.setCreator(this.getCreator()),this.getModificationDate()!==void 0&&t.setModificationDate(this.getModificationDate()),this.getProducer()!==void 0&&t.setProducer(this.getProducer()),this.getSubject()!==void 0&&t.setSubject(this.getSubject()),this.getTitle()!==void 0&&t.setTitle(this.getTitle()),t.defaultWordBreaks=this.defaultWordBreaks,[2,t]}})})},e.prototype.addJavaScript=function(t,n){qe(t,"name",["string"]),qe(n,"script",["string"]);var a=lJe.for(n,t),r=this.context.nextRef(),o=sJe.of(r,this,a);this.javaScripts.push(o)},e.prototype.attach=function(t,n,a){return a===void 0&&(a={}),Kn(this,void 0,void 0,function(){var r,o,i,s;return Hn(this,function(c){return qe(t,"attachment",["string",Uint8Array,ArrayBuffer]),qe(n,"name",["string"]),Ct(a.mimeType,"mimeType",["string"]),Ct(a.description,"description",["string"]),Ct(a.creationDate,"options.creationDate",[Date]),Ct(a.modificationDate,"options.modificationDate",[Date]),$c(a.afRelationship,"options.afRelationship",pQ),r=N3(t),o=Vze.for(r,n,a),i=this.context.nextRef(),s=iJe.of(i,this,o),this.embeddedFiles.push(s),[2]})})},e.prototype.embedFont=function(t,n){return n===void 0&&(n={}),Kn(this,void 0,void 0,function(){var a,r,o,i,s,c,u,f,d,h;return Hn(this,function(p){switch(p.label){case 0:return a=n.subset,r=a===void 0?!1:a,o=n.customName,i=n.features,qe(t,"font",["string",Uint8Array,ArrayBuffer]),qe(r,"subset",["boolean"]),D0e(t)?(s=oE.for(t,o),[3,7]):[3,1];case 1:return HKe(t)?(c=N3(t),u=this.assertFontkit(),r?[4,Ize.for(u,c,o,i)]:[3,3]):[3,6];case 2:return f=p.sent(),[3,5];case 3:return[4,hQ.for(u,c,o,i)];case 4:f=p.sent(),p.label=5;case 5:return s=f,[3,7];case 6:throw new TypeError("`font` must be one of `StandardFonts | string | Uint8Array | ArrayBuffer`");case 7:return d=this.context.nextRef(),h=rc.of(d,this,s),this.fonts.push(h),[2,h]}})})},e.prototype.embedStandardFont=function(t,n){if(qe(t,"font",["string"]),!D0e(t))throw new TypeError("`font` must be one of type `StandardFonts`");var a=oE.for(t,n),r=this.context.nextRef(),o=rc.of(r,this,a);return this.fonts.push(o),o},e.prototype.embedJpg=function(t){return Kn(this,void 0,void 0,function(){var n,a,r,o;return Hn(this,function(i){switch(i.label){case 0:return qe(t,"jpg",["string",Uint8Array,ArrayBuffer]),n=N3(t),[4,rve.for(n)];case 1:return a=i.sent(),r=this.context.nextRef(),o=_Q.of(r,this,a),this.images.push(o),[2,o]}})})},e.prototype.embedPng=function(t){return Kn(this,void 0,void 0,function(){var n,a,r,o;return Hn(this,function(i){switch(i.label){case 0:return qe(t,"png",["string",Uint8Array,ArrayBuffer]),n=N3(t),[4,ove.for(n)];case 1:return a=i.sent(),r=this.context.nextRef(),o=_Q.of(r,this,a),this.images.push(o),[2,o]}})})},e.prototype.embedPdf=function(t,n){return n===void 0&&(n=[0]),Kn(this,void 0,void 0,function(){var a,r,o;return Hn(this,function(i){switch(i.label){case 0:return qe(t,"pdf",["string",Uint8Array,ArrayBuffer,[e,"PDFDocument"]]),qe(n,"indices",[Array]),t instanceof e?(r=t,[3,3]):[3,1];case 1:return[4,e.load(t)];case 2:r=i.sent(),i.label=3;case 3:return a=r,o=KKe(a.getPages(),n),[2,this.embedPages(o)]}})})},e.prototype.embedPage=function(t,n,a){return Kn(this,void 0,void 0,function(){var r;return Hn(this,function(o){switch(o.label){case 0:return qe(t,"page",[[iu,"PDFPage"]]),[4,this.embedPages([t],[n],[a])];case 1:return r=o.sent()[0],[2,r]}})})},e.prototype.embedPages=function(t,n,a){return n===void 0&&(n=[]),a===void 0&&(a=[]),Kn(this,void 0,void 0,function(){var u,f,r,o,i,s,c,u,f,d,h,p,v,m,g;return Hn(this,function(y){switch(y.label){case 0:if(t.length===0)return[2,[]];for(u=0,f=t.length-1;u<f;u++)if(r=t[u],o=t[u+1],r.node.context!==o.node.context)throw new lze;i=t[0].node.context,s=i===this.context?function(b){return b}:j0e.for(i,this.context).copy,c=new Array(t.length),u=0,f=t.length,y.label=1;case 1:return u<f?(d=s(t[u].node),h=n[u],p=a[u],[4,fve.for(d,h,p)]):[3,4];case 2:v=y.sent(),m=this.context.nextRef(),c[u]=Jve.of(m,this,v),y.label=3;case 3:return u++,[3,1];case 4:return(g=this.embeddedPages).push.apply(g,c),[2,c]}})})},e.prototype.flush=function(){return Kn(this,void 0,void 0,function(){return Hn(this,function(t){switch(t.label){case 0:return[4,this.embedAll(this.fonts)];case 1:return t.sent(),[4,this.embedAll(this.images)];case 2:return t.sent(),[4,this.embedAll(this.embeddedPages)];case 3:return t.sent(),[4,this.embedAll(this.embeddedFiles)];case 4:return t.sent(),[4,this.embedAll(this.javaScripts)];case 5:return t.sent(),[2]}})})},e.prototype.save=function(t){return t===void 0&&(t={}),Kn(this,void 0,void 0,function(){var n,a,r,o,i,s,c,u,f,d;return Hn(this,function(h){switch(h.label){case 0:return n=t.useObjectStreams,a=n===void 0?!0:n,r=t.addDefaultPage,o=r===void 0?!0:r,i=t.objectsPerTick,s=i===void 0?50:i,c=t.updateFieldAppearances,u=c===void 0?!0:c,qe(a,"useObjectStreams",["boolean"]),qe(o,"addDefaultPage",["boolean"]),qe(s,"objectsPerTick",["number"]),qe(u,"updateFieldAppearances",["boolean"]),o&&this.getPageCount()===0&&this.addPage(),u&&(f=this.formCache.getValue(),f&&f.updateFieldAppearances()),[4,this.flush()];case 1:return h.sent(),d=a?kze:eve,[2,d.forContext(this.context,s).serializeToBuffer()]}})})},e.prototype.saveAsBase64=function(t){return t===void 0&&(t={}),Kn(this,void 0,void 0,function(){var n,a,r,o,i;return Hn(this,function(s){switch(s.label){case 0:return n=t.dataUri,a=n===void 0?!1:n,r=TKe(t,["dataUri"]),qe(a,"dataUri",["boolean"]),[4,this.save(r)];case 1:return o=s.sent(),i=CKe(o),[2,a?"data:application/pdf;base64,"+i:i]}})})},e.prototype.findPageForAnnotationRef=function(t){for(var n=this.getPages(),a=0,r=n.length;a<r;a++){var o=n[a],i=o.node.Annots();if((i==null?void 0:i.indexOf(t))!==void 0)return o}},e.prototype.embedAll=function(t){return Kn(this,void 0,void 0,function(){var n,a;return Hn(this,function(r){switch(r.label){case 0:n=0,a=t.length,r.label=1;case 1:return n<a?[4,t[n].embed()]:[3,4];case 2:r.sent(),r.label=3;case 3:return n++,[3,1];case 4:return[2]}})})},e.prototype.updateInfoDict=function(){var t="pdf-lib (https://github.com/Hopding/pdf-lib)",n=new Date,a=this.getInfoDict();this.setProducer(t),this.setModificationDate(n),a.get(Ce.of("Creator"))||this.setCreator(t),a.get(Ce.of("CreationDate"))||this.setCreationDate(n)},e.prototype.getInfoDict=function(){var t=this.context.lookup(this.context.trailerInfo.Info);if(t instanceof Dn)return t;var n=this.context.obj({});return this.context.trailerInfo.Info=this.context.register(n),n},e.prototype.assertFontkit=function(){if(!this.fontkit)throw new VGe;return this.fontkit},e}();function Bv(e){if(!(e instanceof gn)&&!(e instanceof Ka))throw new nE([gn,Ka],e)}var Dp;(function(e){e.Normal="Normal",e.Multiply="Multiply",e.Screen="Screen",e.Overlay="Overlay",e.Darken="Darken",e.Lighten="Lighten",e.ColorDodge="ColorDodge",e.ColorBurn="ColorBurn",e.HardLight="HardLight",e.SoftLight="SoftLight",e.Difference="Difference",e.Exclusion="Exclusion"})(Dp||(Dp={}));var iu=function(){function e(t,n,a){this.fontSize=24,this.fontColor=Qa(0,0,0),this.lineHeight=24,this.x=0,this.y=0,qe(t,"leafNode",[[Vp,"PDFPageLeaf"]]),qe(n,"ref",[[Za,"PDFRef"]]),qe(a,"doc",[[Dv,"PDFDocument"]]),this.node=t,this.ref=n,this.doc=a}return e.prototype.setRotation=function(t){var n=Mve(t);U0e(n,"degreesAngle",90),this.node.set(Ce.of("Rotate"),this.doc.context.obj(n))},e.prototype.getRotation=function(){var t=this.node.Rotate();return Rn(t?t.asNumber():0)},e.prototype.setSize=function(t,n){qe(t,"width",["number"]),qe(n,"height",["number"]);var a=this.getMediaBox();this.setMediaBox(a.x,a.y,t,n);var r=this.getCropBox(),o=this.getBleedBox(),i=this.getTrimBox(),s=this.getArtBox(),c=this.node.CropBox(),u=this.node.BleedBox(),f=this.node.TrimBox(),d=this.node.ArtBox();c&&$L(r,a)&&this.setCropBox(a.x,a.y,t,n),u&&$L(o,a)&&this.setBleedBox(a.x,a.y,t,n),f&&$L(i,a)&&this.setTrimBox(a.x,a.y,t,n),d&&$L(s,a)&&this.setArtBox(a.x,a.y,t,n)},e.prototype.setWidth=function(t){qe(t,"width",["number"]),this.setSize(t,this.getSize().height)},e.prototype.setHeight=function(t){qe(t,"height",["number"]),this.setSize(this.getSize().width,t)},e.prototype.setMediaBox=function(t,n,a,r){qe(t,"x",["number"]),qe(n,"y",["number"]),qe(a,"width",["number"]),qe(r,"height",["number"]);var o=this.doc.context.obj([t,n,t+a,n+r]);this.node.set(Ce.MediaBox,o)},e.prototype.setCropBox=function(t,n,a,r){qe(t,"x",["number"]),qe(n,"y",["number"]),qe(a,"width",["number"]),qe(r,"height",["number"]);var o=this.doc.context.obj([t,n,t+a,n+r]);this.node.set(Ce.CropBox,o)},e.prototype.setBleedBox=function(t,n,a,r){qe(t,"x",["number"]),qe(n,"y",["number"]),qe(a,"width",["number"]),qe(r,"height",["number"]);var o=this.doc.context.obj([t,n,t+a,n+r]);this.node.set(Ce.BleedBox,o)},e.prototype.setTrimBox=function(t,n,a,r){qe(t,"x",["number"]),qe(n,"y",["number"]),qe(a,"width",["number"]),qe(r,"height",["number"]);var o=this.doc.context.obj([t,n,t+a,n+r]);this.node.set(Ce.TrimBox,o)},e.prototype.setArtBox=function(t,n,a,r){qe(t,"x",["number"]),qe(n,"y",["number"]),qe(a,"width",["number"]),qe(r,"height",["number"]);var o=this.doc.context.obj([t,n,t+a,n+r]);this.node.set(Ce.ArtBox,o)},e.prototype.getSize=function(){var t=this.getMediaBox(),n=t.width,a=t.height;return{width:n,height:a}},e.prototype.getWidth=function(){return this.getSize().width},e.prototype.getHeight=function(){return this.getSize().height},e.prototype.getMediaBox=function(){var t=this.node.MediaBox();return t.asRectangle()},e.prototype.getCropBox=function(){var t,n=this.node.CropBox();return(t=n==null?void 0:n.asRectangle())!==null&&t!==void 0?t:this.getMediaBox()},e.prototype.getBleedBox=function(){var t,n=this.node.BleedBox();return(t=n==null?void 0:n.asRectangle())!==null&&t!==void 0?t:this.getCropBox()},e.prototype.getTrimBox=function(){var t,n=this.node.TrimBox();return(t=n==null?void 0:n.asRectangle())!==null&&t!==void 0?t:this.getCropBox()},e.prototype.getArtBox=function(){var t,n=this.node.ArtBox();return(t=n==null?void 0:n.asRectangle())!==null&&t!==void 0?t:this.getCropBox()},e.prototype.translateContent=function(t,n){qe(t,"x",["number"]),qe(n,"y",["number"]),this.node.normalize(),this.getContentStream();var a=this.createContentStream(_o(),au(t,n)),r=this.doc.context.register(a),o=this.createContentStream(Io()),i=this.doc.context.register(o);this.node.wrapContentStreams(r,i)},e.prototype.scale=function(t,n){qe(t,"x",["number"]),qe(n,"y",["number"]),this.setSize(this.getWidth()*t,this.getHeight()*n),this.scaleContent(t,n),this.scaleAnnotations(t,n)},e.prototype.scaleContent=function(t,n){qe(t,"x",["number"]),qe(n,"y",["number"]),this.node.normalize(),this.getContentStream();var a=this.createContentStream(_o(),sM(t,n)),r=this.doc.context.register(a),o=this.createContentStream(Io()),i=this.doc.context.register(o);this.node.wrapContentStreams(r,i)},e.prototype.scaleAnnotations=function(t,n){qe(t,"x",["number"]),qe(n,"y",["number"]);var a=this.node.Annots();if(a)for(var r=0;r<a.size();r++){var o=a.lookup(r);o instanceof Dn&&this.scaleAnnot(o,t,n)}},e.prototype.resetPosition=function(){this.getContentStream(!1),this.x=0,this.y=0},e.prototype.setFont=function(t){qe(t,"font",[[rc,"PDFFont"]]),this.font=t,this.fontKey=this.node.newFontDictionary(this.font.name,this.font.ref)},e.prototype.setFontSize=function(t){qe(t,"fontSize",["number"]),this.fontSize=t},e.prototype.setFontColor=function(t){qe(t,"fontColor",[[Object,"Color"]]),this.fontColor=t},e.prototype.setLineHeight=function(t){qe(t,"lineHeight",["number"]),this.lineHeight=t},e.prototype.getPosition=function(){return{x:this.x,y:this.y}},e.prototype.getX=function(){return this.x},e.prototype.getY=function(){return this.y},e.prototype.moveTo=function(t,n){qe(t,"x",["number"]),qe(n,"y",["number"]),this.x=t,this.y=n},e.prototype.moveDown=function(t){qe(t,"yDecrease",["number"]),this.y-=t},e.prototype.moveUp=function(t){qe(t,"yIncrease",["number"]),this.y+=t},e.prototype.moveLeft=function(t){qe(t,"xDecrease",["number"]),this.x-=t},e.prototype.moveRight=function(t){qe(t,"xIncrease",["number"]),this.x+=t},e.prototype.pushOperators=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];X0e(t,"operator",[[ha,"PDFOperator"]]);var a=this.getContentStream();a.push.apply(a,t)},e.prototype.drawText=function(t,n){var a,r,o,i,s,c,u;n===void 0&&(n={}),qe(t,"text",["string"]),Ct(n.color,"options.color",[[Object,"Color"]]),wf(n.opacity,"opacity.opacity",0,1),Ct(n.font,"options.font",[[rc,"PDFFont"]]),Ct(n.size,"options.size",["number"]),Ct(n.rotate,"options.rotate",[[Object,"Rotation"]]),Ct(n.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ct(n.ySkew,"options.ySkew",[[Object,"Rotation"]]),Ct(n.x,"options.x",["number"]),Ct(n.y,"options.y",["number"]),Ct(n.lineHeight,"options.lineHeight",["number"]),Ct(n.maxWidth,"options.maxWidth",["number"]),Ct(n.wordBreaks,"options.wordBreaks",[Array]),$c(n.blendMode,"options.blendMode",Dp);for(var f=this.setOrEmbedFont(n.font),d=f.oldFont,h=f.newFont,p=f.newFontKey,v=n.size||this.fontSize,m=n.wordBreaks||this.doc.defaultWordBreaks,g=function(M){return h.widthOfTextAtSize(M,v)},y=n.maxWidth===void 0?Qhe(M3(t)):FKe(t,m,n.maxWidth,g),b=new Array(y.length),R=0,A=y.length;R<A;R++)b[R]=h.encodeText(y[R]);var S=this.maybeEmbedGraphicsState({opacity:n.opacity,blendMode:n.blendMode}),w=this.getContentStream();w.push.apply(w,TGe(b,{color:(a=n.color)!==null&&a!==void 0?a:this.fontColor,font:p,size:v,rotate:(r=n.rotate)!==null&&r!==void 0?r:Rn(0),xSkew:(o=n.xSkew)!==null&&o!==void 0?o:Rn(0),ySkew:(i=n.ySkew)!==null&&i!==void 0?i:Rn(0),x:(s=n.x)!==null&&s!==void 0?s:this.x,y:(c=n.y)!==null&&c!==void 0?c:this.y,lineHeight:(u=n.lineHeight)!==null&&u!==void 0?u:this.lineHeight,graphicsState:S})),n.font&&(d?this.setFont(d):this.resetFont())},e.prototype.drawImage=function(t,n){var a,r,o,i,s,c,u;n===void 0&&(n={}),qe(t,"image",[[_Q,"PDFImage"]]),Ct(n.x,"options.x",["number"]),Ct(n.y,"options.y",["number"]),Ct(n.width,"options.width",["number"]),Ct(n.height,"options.height",["number"]),Ct(n.rotate,"options.rotate",[[Object,"Rotation"]]),Ct(n.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ct(n.ySkew,"options.ySkew",[[Object,"Rotation"]]),wf(n.opacity,"opacity.opacity",0,1),$c(n.blendMode,"options.blendMode",Dp);var f=this.node.newXObject("Image",t.ref),d=this.maybeEmbedGraphicsState({opacity:n.opacity,blendMode:n.blendMode}),h=this.getContentStream();h.push.apply(h,Wve(f,{x:(a=n.x)!==null&&a!==void 0?a:this.x,y:(r=n.y)!==null&&r!==void 0?r:this.y,width:(o=n.width)!==null&&o!==void 0?o:t.size().width,height:(i=n.height)!==null&&i!==void 0?i:t.size().height,rotate:(s=n.rotate)!==null&&s!==void 0?s:Rn(0),xSkew:(c=n.xSkew)!==null&&c!==void 0?c:Rn(0),ySkew:(u=n.ySkew)!==null&&u!==void 0?u:Rn(0),graphicsState:d}))},e.prototype.drawPage=function(t,n){var a,r,o,i,s;n===void 0&&(n={}),qe(t,"embeddedPage",[[Jve,"PDFEmbeddedPage"]]),Ct(n.x,"options.x",["number"]),Ct(n.y,"options.y",["number"]),Ct(n.xScale,"options.xScale",["number"]),Ct(n.yScale,"options.yScale",["number"]),Ct(n.width,"options.width",["number"]),Ct(n.height,"options.height",["number"]),Ct(n.rotate,"options.rotate",[[Object,"Rotation"]]),Ct(n.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ct(n.ySkew,"options.ySkew",[[Object,"Rotation"]]),wf(n.opacity,"opacity.opacity",0,1),$c(n.blendMode,"options.blendMode",Dp);var c=this.node.newXObject("EmbeddedPdfPage",t.ref),u=this.maybeEmbedGraphicsState({opacity:n.opacity,blendMode:n.blendMode}),f=n.width!==void 0?n.width/t.width:n.xScale!==void 0?n.xScale:1,d=n.height!==void 0?n.height/t.height:n.yScale!==void 0?n.yScale:1,h=this.getContentStream();h.push.apply(h,CGe(c,{x:(a=n.x)!==null&&a!==void 0?a:this.x,y:(r=n.y)!==null&&r!==void 0?r:this.y,xScale:f,yScale:d,rotate:(o=n.rotate)!==null&&o!==void 0?o:Rn(0),xSkew:(i=n.xSkew)!==null&&i!==void 0?i:Rn(0),ySkew:(s=n.ySkew)!==null&&s!==void 0?s:Rn(0),graphicsState:u}))},e.prototype.drawSvgPath=function(t,n){var a,r,o,i,s,c,u,f,d;n===void 0&&(n={}),qe(t,"path",["string"]),Ct(n.x,"options.x",["number"]),Ct(n.y,"options.y",["number"]),Ct(n.scale,"options.scale",["number"]),Ct(n.rotate,"options.rotate",[[Object,"Rotation"]]),Ct(n.borderWidth,"options.borderWidth",["number"]),Ct(n.color,"options.color",[[Object,"Color"]]),wf(n.opacity,"opacity.opacity",0,1),Ct(n.borderColor,"options.borderColor",[[Object,"Color"]]),Ct(n.borderDashArray,"options.borderDashArray",[Array]),Ct(n.borderDashPhase,"options.borderDashPhase",["number"]),$c(n.borderLineCap,"options.borderLineCap",$A),wf(n.borderOpacity,"options.borderOpacity",0,1),$c(n.blendMode,"options.blendMode",Dp);var h=this.maybeEmbedGraphicsState({opacity:n.opacity,borderOpacity:n.borderOpacity,blendMode:n.blendMode});!("color"in n)&&!("borderColor"in n)&&(n.borderColor=Qa(0,0,0));var p=this.getContentStream();p.push.apply(p,OGe(t,{x:(a=n.x)!==null&&a!==void 0?a:this.x,y:(r=n.y)!==null&&r!==void 0?r:this.y,scale:n.scale,rotate:(o=n.rotate)!==null&&o!==void 0?o:Rn(0),color:(i=n.color)!==null&&i!==void 0?i:void 0,borderColor:(s=n.borderColor)!==null&&s!==void 0?s:void 0,borderWidth:(c=n.borderWidth)!==null&&c!==void 0?c:0,borderDashArray:(u=n.borderDashArray)!==null&&u!==void 0?u:void 0,borderDashPhase:(f=n.borderDashPhase)!==null&&f!==void 0?f:void 0,borderLineCap:(d=n.borderLineCap)!==null&&d!==void 0?d:void 0,graphicsState:h}))},e.prototype.drawLine=function(t){var n,a,r,o,i;qe(t.start,"options.start",[[Object,"{ x: number, y: number }"]]),qe(t.end,"options.end",[[Object,"{ x: number, y: number }"]]),qe(t.start.x,"options.start.x",["number"]),qe(t.start.y,"options.start.y",["number"]),qe(t.end.x,"options.end.x",["number"]),qe(t.end.y,"options.end.y",["number"]),Ct(t.thickness,"options.thickness",["number"]),Ct(t.color,"options.color",[[Object,"Color"]]),Ct(t.dashArray,"options.dashArray",[Array]),Ct(t.dashPhase,"options.dashPhase",["number"]),$c(t.lineCap,"options.lineCap",$A),wf(t.opacity,"opacity.opacity",0,1),$c(t.blendMode,"options.blendMode",Dp);var s=this.maybeEmbedGraphicsState({borderOpacity:t.opacity,blendMode:t.blendMode});"color"in t||(t.color=Qa(0,0,0));var c=this.getContentStream();c.push.apply(c,kGe({start:t.start,end:t.end,thickness:(n=t.thickness)!==null&&n!==void 0?n:1,color:(a=t.color)!==null&&a!==void 0?a:void 0,dashArray:(r=t.dashArray)!==null&&r!==void 0?r:void 0,dashPhase:(o=t.dashPhase)!==null&&o!==void 0?o:void 0,lineCap:(i=t.lineCap)!==null&&i!==void 0?i:void 0,graphicsState:s}))},e.prototype.drawRectangle=function(t){var n,a,r,o,i,s,c,u,f,d,h,p,v;t===void 0&&(t={}),Ct(t.x,"options.x",["number"]),Ct(t.y,"options.y",["number"]),Ct(t.width,"options.width",["number"]),Ct(t.height,"options.height",["number"]),Ct(t.rotate,"options.rotate",[[Object,"Rotation"]]),Ct(t.xSkew,"options.xSkew",[[Object,"Rotation"]]),Ct(t.ySkew,"options.ySkew",[[Object,"Rotation"]]),Ct(t.borderWidth,"options.borderWidth",["number"]),Ct(t.color,"options.color",[[Object,"Color"]]),wf(t.opacity,"opacity.opacity",0,1),Ct(t.borderColor,"options.borderColor",[[Object,"Color"]]),Ct(t.borderDashArray,"options.borderDashArray",[Array]),Ct(t.borderDashPhase,"options.borderDashPhase",["number"]),$c(t.borderLineCap,"options.borderLineCap",$A),wf(t.borderOpacity,"options.borderOpacity",0,1),$c(t.blendMode,"options.blendMode",Dp);var m=this.maybeEmbedGraphicsState({opacity:t.opacity,borderOpacity:t.borderOpacity,blendMode:t.blendMode});!("color"in t)&&!("borderColor"in t)&&(t.color=Qa(0,0,0));var g=this.getContentStream();g.push.apply(g,eR({x:(n=t.x)!==null&&n!==void 0?n:this.x,y:(a=t.y)!==null&&a!==void 0?a:this.y,width:(r=t.width)!==null&&r!==void 0?r:150,height:(o=t.height)!==null&&o!==void 0?o:100,rotate:(i=t.rotate)!==null&&i!==void 0?i:Rn(0),xSkew:(s=t.xSkew)!==null&&s!==void 0?s:Rn(0),ySkew:(c=t.ySkew)!==null&&c!==void 0?c:Rn(0),borderWidth:(u=t.borderWidth)!==null&&u!==void 0?u:0,color:(f=t.color)!==null&&f!==void 0?f:void 0,borderColor:(d=t.borderColor)!==null&&d!==void 0?d:void 0,borderDashArray:(h=t.borderDashArray)!==null&&h!==void 0?h:void 0,borderDashPhase:(p=t.borderDashPhase)!==null&&p!==void 0?p:void 0,graphicsState:m,borderLineCap:(v=t.borderLineCap)!==null&&v!==void 0?v:void 0}))},e.prototype.drawSquare=function(t){t===void 0&&(t={});var n=t.size;Ct(n,"size",["number"]),this.drawRectangle(En(En({},t),{width:n,height:n}))},e.prototype.drawEllipse=function(t){var n,a,r,o,i,s,c,u,f,d,h;t===void 0&&(t={}),Ct(t.x,"options.x",["number"]),Ct(t.y,"options.y",["number"]),Ct(t.xScale,"options.xScale",["number"]),Ct(t.yScale,"options.yScale",["number"]),Ct(t.rotate,"options.rotate",[[Object,"Rotation"]]),Ct(t.color,"options.color",[[Object,"Color"]]),wf(t.opacity,"opacity.opacity",0,1),Ct(t.borderColor,"options.borderColor",[[Object,"Color"]]),wf(t.borderOpacity,"options.borderOpacity",0,1),Ct(t.borderWidth,"options.borderWidth",["number"]),Ct(t.borderDashArray,"options.borderDashArray",[Array]),Ct(t.borderDashPhase,"options.borderDashPhase",["number"]),$c(t.borderLineCap,"options.borderLineCap",$A),$c(t.blendMode,"options.blendMode",Dp);var p=this.maybeEmbedGraphicsState({opacity:t.opacity,borderOpacity:t.borderOpacity,blendMode:t.blendMode});!("color"in t)&&!("borderColor"in t)&&(t.color=Qa(0,0,0));var v=this.getContentStream();v.push.apply(v,OQ({x:(n=t.x)!==null&&n!==void 0?n:this.x,y:(a=t.y)!==null&&a!==void 0?a:this.y,xScale:(r=t.xScale)!==null&&r!==void 0?r:100,yScale:(o=t.yScale)!==null&&o!==void 0?o:100,rotate:(i=t.rotate)!==null&&i!==void 0?i:void 0,color:(s=t.color)!==null&&s!==void 0?s:void 0,borderColor:(c=t.borderColor)!==null&&c!==void 0?c:void 0,borderWidth:(u=t.borderWidth)!==null&&u!==void 0?u:0,borderDashArray:(f=t.borderDashArray)!==null&&f!==void 0?f:void 0,borderDashPhase:(d=t.borderDashPhase)!==null&&d!==void 0?d:void 0,borderLineCap:(h=t.borderLineCap)!==null&&h!==void 0?h:void 0,graphicsState:p}))},e.prototype.drawCircle=function(t){t===void 0&&(t={});var n=t.size,a=n===void 0?100:n;Ct(a,"size",["number"]),this.drawEllipse(En(En({},t),{xScale:a,yScale:a}))},e.prototype.setOrEmbedFont=function(t){var n=this.font,a=this.fontKey;t?this.setFont(t):this.getFont();var r=this.font,o=this.fontKey;return{oldFont:n,oldFontKey:a,newFont:r,newFontKey:o}},e.prototype.getFont=function(){if(!this.font||!this.fontKey){var t=this.doc.embedStandardFont(VE.Helvetica);this.setFont(t)}return[this.font,this.fontKey]},e.prototype.resetFont=function(){this.font=void 0,this.fontKey=void 0},e.prototype.getContentStream=function(t){return t===void 0&&(t=!0),t&&this.contentStream?this.contentStream:(this.contentStream=this.createContentStream(),this.contentStreamRef=this.doc.context.register(this.contentStream),this.node.addContentStream(this.contentStreamRef),this.contentStream)},e.prototype.createContentStream=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var a=this.doc.context.obj({}),r=J3.of(a,t);return r},e.prototype.maybeEmbedGraphicsState=function(t){var n=t.opacity,a=t.borderOpacity,r=t.blendMode;if(!(n===void 0&&a===void 0&&r===void 0)){var o=this.doc.context.obj({Type:"ExtGState",ca:n,CA:a,BM:r}),i=this.node.newExtGState("GS",o);return i}},e.prototype.scaleAnnot=function(t,n,a){for(var r=["RD","CL","Vertices","QuadPoints","L","Rect"],o=0,i=r.length;o<i;o++){var s=t.lookup(Ce.of(r[o]));s instanceof Pa&&s.scalePDFNumbers(n,a)}var c=t.lookup(Ce.of("InkList"));if(c instanceof Pa)for(var o=0,i=c.size();o<i;o++){var u=c.lookup(o);u instanceof Pa&&u.scalePDFNumbers(n,a)}},e.of=function(t,n,a){return new e(t,n,a)},e.create=function(t){qe(t,"doc",[[Dv,"PDFDocument"]]);var n=Za.of(-1),a=Vp.withContextAndParent(t.context,n),r=t.context.register(a);return new e(a,r,t)},e}(),FE=function(e){kt(t,e);function t(n,a,r){var o=e.call(this,n,a,r)||this;return qe(n,"acroButton",[[hE,"PDFAcroPushButton"]]),o.acroField=n,o}return t.prototype.setImage=function(n,a){a===void 0&&(a=Fv.Center);for(var r=this.acroField.getWidgets(),o=0,i=r.length;o<i;o++){var s=r[o],c=this.createImageAppearanceStream(s,n,a);this.updateWidgetAppearances(s,{normal:c})}this.markAsClean()},t.prototype.setFontSize=function(n){eE(n,"fontSize"),this.acroField.setFontSize(n),this.markAsDirty()},t.prototype.addToPage=function(n,a,r){var o,i,s,c,u,f,d,h,p,v,m;Ct(n,"text",["string"]),Ct(a,"page",[[iu,"PDFPage"]]),nR(r);var g=this.createWidget({x:((o=r==null?void 0:r.x)!==null&&o!==void 0?o:0)-((i=r==null?void 0:r.borderWidth)!==null&&i!==void 0?i:0)/2,y:((s=r==null?void 0:r.y)!==null&&s!==void 0?s:0)-((c=r==null?void 0:r.borderWidth)!==null&&c!==void 0?c:0)/2,width:(u=r==null?void 0:r.width)!==null&&u!==void 0?u:100,height:(f=r==null?void 0:r.height)!==null&&f!==void 0?f:50,textColor:(d=r==null?void 0:r.textColor)!==null&&d!==void 0?d:Qa(0,0,0),backgroundColor:(h=r==null?void 0:r.backgroundColor)!==null&&h!==void 0?h:Qa(.75,.75,.75),borderColor:r==null?void 0:r.borderColor,borderWidth:(p=r==null?void 0:r.borderWidth)!==null&&p!==void 0?p:0,rotate:(v=r==null?void 0:r.rotate)!==null&&v!==void 0?v:Rn(0),caption:n,hidden:r==null?void 0:r.hidden,page:a.ref}),y=this.doc.context.register(g.dict);this.acroField.addWidget(y);var b=(m=r==null?void 0:r.font)!==null&&m!==void 0?m:this.doc.getForm().getDefaultFont();this.updateWidgetAppearance(g,b),a.node.addAnnot(y)},t.prototype.needsAppearancesUpdate=function(){var n;if(this.isDirty())return!0;for(var a=this.acroField.getWidgets(),r=0,o=a.length;r<o;r++){var i=a[r],s=((n=i.getAppearances())===null||n===void 0?void 0:n.normal)instanceof nc;if(!s)return!0}return!1},t.prototype.defaultUpdateAppearances=function(n){qe(n,"font",[[rc,"PDFFont"]]),this.updateAppearances(n)},t.prototype.updateAppearances=function(n,a){qe(n,"font",[[rc,"PDFFont"]]),Ct(a,"provider",[Function]);for(var r=this.acroField.getWidgets(),o=0,i=r.length;o<i;o++){var s=r[o];this.updateWidgetAppearance(s,n,a)}},t.prototype.updateWidgetAppearance=function(n,a,r){var o=r??$Ge,i=tR(o(this,n,a));this.updateWidgetAppearanceWithFont(n,a,i)},t.of=function(n,a,r){return new t(n,a,r)},t}(Qy);const jve="application/vnd.openxmlformats-officedocument.presentationml.presentation",Qd="http://schemas.openxmlformats.org/presentationml/2006/main",zd="http://schemas.openxmlformats.org/drawingml/2006/main",FQ=(e,t,n)=>Math.min(Math.max(e,t),n),cJe=e=>{const t=Number.isFinite(e)?e:0;return Math.round(FQ(t>100?t:t*1e3,0,1e5))},uJe=(e=0,t=0)=>{const n=((e+t)%360+360)%360;return Math.round(n*6e4)},oR=(e,t,n)=>Array.from(e.children).find(a=>a.namespaceURI===t&&a.localName===n),fJe=(e,t,n)=>Array.from(e.children).filter(a=>a.namespaceURI===t&&n.includes(a.localName)),dJe=(e,t,n)=>{let a=e;for(;a;){if(a.namespaceURI===t&&a.localName===n)return a;a=a.parentElement}return null},qve=(e,t,n=0,a=1)=>{const r=e.createElementNS(zd,"a:gradFill"),o=e.createElementNS(zd,"a:gsLst"),i=[...t.colors].sort((c,u)=>c.pos-u.pos),s=FQ(a,0,1);for(const c of i){const u=At(c.color||"#000000"),f=Math.round(FQ(u.getAlpha(),0,1)*s*1e5),d=e.createElementNS(zd,"a:gs"),h=e.createElementNS(zd,"a:srgbClr");if(d.setAttribute("pos",`${cJe(c.pos)}`),h.setAttribute("val",u.isValid()?u.toHex().toUpperCase():"000000"),f<1e5){const p=e.createElementNS(zd,"a:alpha");p.setAttribute("val",`${f}`),h.appendChild(p)}d.appendChild(h),o.appendChild(d)}if(r.appendChild(o),t.type==="radial"){const c=e.createElementNS(zd,"a:path"),u=e.createElementNS(zd,"a:fillToRect");c.setAttribute("path","circle"),u.setAttribute("l","50000"),u.setAttribute("t","50000"),u.setAttribute("r","50000"),u.setAttribute("b","50000"),c.appendChild(u),r.appendChild(c)}else{const c=e.createElementNS(zd,"a:lin");c.setAttribute("ang",`${uJe(t.rotate,n)}`),c.setAttribute("scaled","1"),r.appendChild(c)}return r},$ve=(e,t)=>{const n=fJe(e,zd,["solidFill","gradFill","noFill","blipFill","pattFill","grpFill"]);if(n.length){e.replaceChild(t,n[0]);return}const a=oR(e,zd,"ln");e.insertBefore(t,a||null)},hJe=e=>{const t=e.getElementsByTagNameNS(Qd,"cSld")[0];if(!t)return null;let n=oR(t,Qd,"bg");n||(n=e.createElementNS(Qd,"p:bg"),t.insertBefore(n,oR(t,Qd,"spTree")||t.firstChild));let a=oR(n,Qd,"bgPr");if(!a){const r=oR(n,Qd,"bgRef");r&&n.removeChild(r),a=e.createElementNS(Qd,"p:bgPr"),n.appendChild(a)}return a},pJe=(e,t)=>{if(!t.background&&!t.shapes.length)return e;const n=new DOMParser().parseFromString(e,"application/xml");if(n.getElementsByTagName("parsererror").length)return e;if(t.background){const r=hJe(n);r&&$ve(r,qve(n,t.background,-90))}for(const r of t.shapes){const o=Array.from(n.getElementsByTagNameNS(Qd,"cNvPr")).find(c=>c.getAttribute("name")===r.marker);if(!o)continue;o.setAttribute("name",r.name);const i=dJe(o,Qd,"sp"),s=i?oR(i,Qd,"spPr"):null;s&&$ve(s,qve(n,r.gradient,0,r.opacity))}const a=new XMLSerializer().serializeToString(n);return e.startsWith("<?xml")&&!a.startsWith("<?xml")?`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>${a}`:a},vJe=async(e,t)=>{if(!t.some(r=>r.background||r.shapes.length))return e;const a=await Ak.loadAsync(e);return await Promise.all(t.map(async(r,o)=>{if(!r.background&&!r.shapes.length)return;const i=`ppt/slides/slide${o+1}.xml`,s=a.file(i);if(!s)return;const c=await s.async("string");a.file(i,pJe(c,r))})),a.generateAsync({type:"blob",mimeType:jve})},mJe={class:"element-content"},gJe=["width","height","stroke","stroke-width"],yJe=["transform"],bJe=["d"],DQ=et(l.defineComponent({__name:"BaseLatexElement",props:{elementInfo:{}},setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("div",{class:"base-element-latex",style:l.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[l.createElementVNode("div",{class:"rotate-wrapper",style:l.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[l.createElementVNode("div",mJe,[(l.openBlock(),l.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"},[l.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)`},[l.createElementVNode("path",{d:e.elementInfo.path},null,8,bJe)],8,yJe)],8,gJe))])],4)],4))}}),[["__scopeId","data-v-93374af9"]]),iR=e=>{const t=l.computed(()=>{var o;return((o=e.value)==null?void 0:o.width)??0}),n=l.computed(()=>{var o;return((o=e.value)==null?void 0:o.style)||"solid"}),a=l.computed(()=>{var o;return((o=e.value)==null?void 0:o.color)||"#d14424"}),r=l.computed(()=>{const o=t.value;return n.value==="dashed"?o<=6?`${o*4.5} ${o*2}`:`${o*4} ${o*1.5}`:n.value==="dotted"?o<=6?`${o*1.8} ${o*1.6}`:`${o*1.5} ${o*1.2}`:"0 0"});return{outlineWidth:t,outlineStyle:n,outlineColor:a,strokeDashArray:r}},Xv=e=>({shadowStyle:l.computed(()=>{if(e.value){const{h:n,v:a,blur:r,color:o}=e.value;return`${n}px ${a}px ${r}px ${o}`}return""})}),DE=(e,t)=>({flipStyle:l.computed(()=>{let a="";return e.value&&t.value?a="rotateX(180deg) rotateY(180deg)":t.value?a="rotateX(180deg)":e.value&&(a="rotateY(180deg)"),a})}),eme=(e,t)=>({fill:l.computed(()=>e.value.pattern?`url(#${t}-pattern-${e.value.id})`:e.value.gradient?`url(#${t}-gradient-${e.value.id})`:e.value.fill||"none")}),tme=e=>e===void 0?{top:10,right:10,bottom:10,left:10}:typeof e=="number"?{top:e,right:e,bottom:e,left:e}:e,BE=e=>{const{top:t,right:n,bottom:a,left:r}=tme(e);return`${t}px ${n}px ${a}px ${r}px`},AJe=["id","gradientTransform"],RJe=["offset","stop-color"],xJe=["id"],SJe=["offset","stop-color"],nme=l.defineComponent({__name:"GradientDefs",props:{id:{},type:{},colors:{},rotate:{default:0}},setup(e){return(t,n)=>e.type==="linear"?(l.openBlock(),l.createElementBlock("linearGradient",{key:0,id:e.id,x1:"0%",y1:"0%",x2:"100%",y2:"0%",gradientTransform:`rotate(${e.rotate},0.5,0.5)`},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.colors,(a,r)=>(l.openBlock(),l.createElementBlock("stop",{key:r,offset:`${a.pos}%`,"stop-color":a.color},null,8,RJe))),128))],8,AJe)):(l.openBlock(),l.createElementBlock("radialGradient",{key:1,id:e.id},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.colors,(a,r)=>(l.openBlock(),l.createElementBlock("stop",{key:r,offset:`${a.pos}%`,"stop-color":a.color},null,8,SJe))),128))],8,xJe))}}),wJe=["id"],MJe=["href"],ame=l.defineComponent({__name:"PatternDefs",props:{id:{},src:{}},setup(e){return(t,n)=>(l.openBlock(),l.createElementBlock("pattern",{id:e.id,patternContentUnits:"objectBoundingBox",patternUnits:"objectBoundingBox",width:"1",height:"1"},[l.createElementVNode("image",{href:e.src,width:"1",height:"1",preserveAspectRatio:"xMidYMid slice"},null,8,MJe)],8,wJe))}}),NJe=["width","height"],TJe=["transform"],CJe=["d","fill","stroke","stroke-width","stroke-dasharray"],kJe=["innerHTML"],BQ=et(l.defineComponent({__name:"BaseShapeElement",props:{elementInfo:{}},setup(e){const t=e,{theme:n}=Qe(mt()),a=l.computed(()=>t.elementInfo),{fill:r}=eme(a,"base"),o=l.computed(()=>t.elementInfo.outline),{outlineWidth:i,outlineColor:s,strokeDashArray:c}=iR(o),u=l.computed(()=>t.elementInfo.shadow),{shadowStyle:f}=Xv(u),d=l.computed(()=>t.elementInfo.flipH),h=l.computed(()=>t.elementInfo.flipV),{flipStyle:p}=DE(d,h),v=l.computed(()=>{const m={content:"",align:"middle",defaultFontName:n.value.fontName,defaultColor:n.value.fontColor};return t.elementInfo.text?t.elementInfo.text:m});return(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:"base-element-shape",style:l.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[l.createElementVNode("div",{class:"rotate-wrapper",style:l.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[l.createElementVNode("div",{class:"element-content",style:l.normalizeStyle({opacity:e.elementInfo.opacity,filter:l.unref(f)?`drop-shadow(${l.unref(f)})`:"",transform:l.unref(p),color:v.value.defaultColor,fontFamily:v.value.defaultFontName})},[(l.openBlock(),l.createElementBlock("svg",{overflow:"visible",width:e.elementInfo.width,height:e.elementInfo.height},[l.createElementVNode("defs",null,[e.elementInfo.pattern?(l.openBlock(),l.createBlock(ame,{key:0,id:`base-pattern-${e.elementInfo.id}`,src:e.elementInfo.pattern},null,8,["id","src"])):e.elementInfo.gradient?(l.openBlock(),l.createBlock(nme,{key:1,id:`base-gradient-${e.elementInfo.id}`,type:e.elementInfo.gradient.type,colors:e.elementInfo.gradient.colors,rotate:e.elementInfo.gradient.rotate},null,8,["id","type","colors","rotate"])):l.createCommentVNode("",!0)]),l.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)`},[l.createElementVNode("path",{"vector-effect":"non-scaling-stroke","stroke-linecap":"butt","stroke-miterlimit":"8",d:e.elementInfo.path,fill:l.unref(r),stroke:l.unref(s),"stroke-width":l.unref(i),"stroke-dasharray":l.unref(c)},null,8,CJe)],8,TJe)],8,NJe)),l.createElementVNode("div",{class:l.normalizeClass(["shape-text",[v.value.align,{"no-wrap":v.value.nowrap}]]),style:l.normalizeStyle({padding:l.unref(BE)(v.value.padding),lineHeight:v.value.lineHeight,letterSpacing:(v.value.wordSpace||0)+"px","--paragraphSpace":`${v.value.paragraphSpace===void 0?5:v.value.paragraphSpace}px`})},[l.createElementVNode("div",{class:"ProseMirror-static",innerHTML:v.value.content},null,8,kJe)],6)],4)],4)],4))}}),[["__scopeId","data-v-1f3db92d"]]),LJe="PPTIST_NATIVE_GRADIENT",zy=e=>{const t=mt(),{slides:n,theme:a,viewportRatio:r,title:o,viewportSize:i}=Qe(t),s=16,c=l.computed(()=>96*(i.value/960)),u=l.computed(()=>96/72*(i.value/960)),f=l.ref(!1),d=(E,L,P,O=!0)=>{f.value=!0;const _=L==="png"?pZe:bL;E.querySelectorAll("foreignObject [xmlns]").forEach(D=>D.removeAttribute("xmlns")),setTimeout(()=>{const D={quality:P,width:1600};O&&(D.fontEmbedCSS=""),_(E,D).then(W=>{f.value=!1,AL.saveAs(W,`${o.value}.${L}`)}).catch(()=>{f.value=!1,rn.error("导出图片失败")})},200)},h=(E,L,P,O=!1)=>(f.value=!0,new Promise((_,I)=>{setTimeout(async()=>{const D=await Dv.create(),W={quality:L,width:1600};P&&(W.fontEmbedCSS="");const Y=[];for(const G of E){G.querySelectorAll("foreignObject [xmlns]").forEach(Q=>Q.removeAttribute("xmlns"));const Z=()=>bL(G,W);Y.push(Z)}Promise.all(Y.map(G=>G())).then(async G=>{for(const te of G){const{width:oe,height:ue}=await pL(te),ke=D.addPage([oe,ue]),ve=await ke.doc.embedJpg(te);ke.drawImage(ve,{x:0,y:0,width:oe,height:ue})}D.getPageCount()===0&&D.addPage([800,600]);const F=await D.save({useObjectStreams:!1,addDefaultPage:!1}),Z=F.buffer.slice(F.byteOffset,F.byteOffset+F.byteLength),Q=new Blob([Z],{type:"application/pdf"}),H=`${o.value||`pdf_${+new Date}`}`,K=new File([Q],`${H}.pdf`,{type:"application/pdf"});if(f.value=!1,O)_(K);else{const te=URL.createObjectURL(Q);IWe(te,`${H}.pdf`),_(null)}}).catch(()=>{f.value=!1,rn.error("导出失败"),I(null)})},200)})),p=E=>{f.value=!0,setTimeout(()=>{const L=new Dhe,P={quality:1,width:1600},O=[];for(const _ of E){_.querySelectorAll("foreignObject [xmlns]").forEach(W=>W.removeAttribute("xmlns"));const D=()=>bL(_,P);O.push(D)}Promise.all(O.map(_=>_())).then(_=>{for(const I of _)L.addSlide().addImage({data:I,x:0,y:0,w:i.value/c.value,h:i.value*r.value/c.value});L.writeFile({fileName:`${o.value}.pptx`}).then(()=>f.value=!1)}).catch(()=>{f.value=!1,rn.error("导出失败")})},200)},v=E=>{const L={title:o.value,width:i.value,height:i.value*r.value,theme:a.value,slides:E},P=new Blob([BK(JSON.stringify(L))],{type:""});AL.saveAs(P,`${o.value}.pptist`)},m=()=>{const E={title:o.value,width:i.value,height:i.value*r.value,theme:a.value,slides:n.value},L=new Blob([JSON.stringify(E)],{type:""});AL.saveAs(L,`${o.value}.json`)},g=E=>{if(!E)return{alpha:0,color:"#000000"};const L=At(E),P=L.getAlpha(),O=P===0?"#ffffff":L.setAlpha(1).toHexString();return{alpha:P,color:O}},y=E=>E===void 0?10/u.value:typeof E=="number"?E/u.value:[E.top/u.value,E.right/u.value,E.bottom/u.value,E.left/u.value],b=E=>{const L=SKe(E);let P=!1,O=0;const _=[],I=(D,W={})=>{for(const Y of D){if("tagName"in Y&&["div","li","p"].includes(Y.tagName)&&_.length){const Q=_[_.length-1];Q.options||(Q.options={}),Q.options.breakLine=!0}const F={...W},Z="attributes"in Y?Y.attributes.find(Q=>Q.key==="style"):null;if(Z&&Z.value){const Q=Z.value.split(";");for(const H of Q){const K=H.match(/([^:]+):\s*(.+)/);if(K){const[te,oe]=[K[1].trim(),K[2].trim()];te&&oe&&(F[te]=oe)}}}if("tagName"in Y){if(Y.tagName==="em"&&(F["font-style"]="italic"),Y.tagName==="strong"&&(F["font-weight"]="bold"),Y.tagName==="sup"&&(F["vertical-align"]="super"),Y.tagName==="sub"&&(F["vertical-align"]="sub"),Y.tagName==="a"){const Q=Y.attributes.find(H=>H.key==="href");F.href=(Q==null?void 0:Q.value)||""}if(Y.tagName==="ul"&&(F["list-type"]="ul"),Y.tagName==="ol"&&(F["list-type"]="ol"),Y.tagName==="li"&&(P=!0),Y.tagName==="p"&&"attributes"in Y){const Q=Y.attributes.find(H=>H.key==="data-indent");Q&&Q.value&&(O=+Q.value)}}if("tagName"in Y&&Y.tagName==="br")_.push({text:"",options:{breakLine:!0}});else if("content"in Y){const Q=Y.content.replace(/&nbsp;/g," ").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&").replace(/\n/g,""),H={};F["font-size"]&&(H.fontSize=parseInt(F["font-size"])/u.value),F.color&&(H.color=g(F.color).color),F["background-color"]&&(H.highlight=g(F["background-color"]).color),F["text-decoration-line"]&&(F["text-decoration-line"].indexOf("underline")!==-1&&(H.underline={color:H.color||"#000000",style:"sng"}),F["text-decoration-line"].indexOf("line-through")!==-1&&(H.strike="sngStrike")),F["text-decoration"]&&(F["text-decoration"].indexOf("underline")!==-1&&(H.underline={color:H.color||"#000000",style:"sng"}),F["text-decoration"].indexOf("line-through")!==-1&&(H.strike="sngStrike")),F["vertical-align"]&&(F["vertical-align"]==="super"&&(H.superscript=!0),F["vertical-align"]==="sub"&&(H.subscript=!0)),F["text-align"]&&(H.align=F["text-align"]),F["font-weight"]&&(H.bold=F["font-weight"]==="bold"),F["font-style"]&&(H.italic=F["font-style"]==="italic"),F["font-family"]&&(H.fontFace=F["font-family"]),F.href&&(H.hyperlink={url:F.href}),P&&F["list-type"]==="ol"&&(H.bullet={type:"number",indent:(H.fontSize||s)*1.25},H.paraSpaceBefore=.1,P=!1),P&&F["list-type"]==="ul"&&(H.bullet={indent:(H.fontSize||s)*1.25},H.paraSpaceBefore=.1,P=!1),O&&(H.indentLevel=O,O=0),_.push({text:Q,options:H})}else"children"in Y&&I(Y.children,F)}};return I(L),_},R=(E,L={x:1,y:1})=>E.map(P=>{if(P.close!==void 0)return{close:!0};if(P.type==="M")return{x:P.x/c.value*L.x,y:P.y/c.value*L.y,moveTo:!0};if(P.curve){if(P.curve.type==="cubic")return{x:P.x/c.value*L.x,y:P.y/c.value*L.y,curve:{type:"cubic",x1:P.curve.x1/c.value*L.x,y1:P.curve.y1/c.value*L.y,x2:P.curve.x2/c.value*L.x,y2:P.curve.y2/c.value*L.y}};if(P.curve.type==="quadratic")return{x:P.x/c.value*L.x,y:P.y/c.value*L.y,curve:{type:"quadratic",x1:P.curve.x1/c.value*L.x,y1:P.curve.y1/c.value*L.y}}}return{x:P.x/c.value*L.x,y:P.y/c.value*L.y}}),A=E=>{const L=g(E.color),{h:P,v:O}=E;let _=4,I=45;return P===0&&O===0?(_=4,I=45):P===0?O>0?(_=O,I=90):(_=-O,I=270):O===0?P>0?(_=P,I=1):(_=-P,I=180):P>0&&O>0?(_=Math.max(P,O),I=45):P>0&&O<0?(_=Math.max(P,-O),I=315):P<0&&O>0?(_=Math.max(-P,O),I=135):P<0&&O<0&&(_=Math.max(-P,-O),I=225),{type:"outer",color:L.color.replace("#",""),opacity:L.alpha,blur:E.blur/u.value,offset:_,angle:I}},S={solid:"solid",dashed:"dash",dotted:"sysDot"},w=E=>{const L=g((E==null?void 0:E.color)||"#000000");return{color:L.color,transparency:(1-L.alpha)*100,width:(E.width||1)/u.value,dashType:E.style?S[E.style]:"solid"}},M=E=>{const{type:L,target:P}=E;if(L==="web")return{url:P};if(L==="slide"){const O=n.value.findIndex(_=>_.id===P);if(O!==-1)return{slide:O+1}}return null},T=E=>{const L=/^data:image\/[^;]+;base64,/;return E.match(L)!==null},N=E=>{const L=/^data:image\/svg\+xml;base64,/.test(E),P=/\.svg$/.test(E);return L||P};return{exporting:f,exportImage:d,exportImagePPTX:p,exportImagePDF:h,exportJSON:m,exportSpecificFile:v,exportPPTX:(E,L,P,O=!1)=>{var D,W,Y,G,F,Z,Q,H,K,te,oe,ue,ke,ve,xe,Me;f.value=!0;const _=new Dhe;if(r.value===.625?_.layout="LAYOUT_16x10":r.value===.75?_.layout="LAYOUT_4x3":r.value===.70710678?(_.defineLayout({name:"A3",width:10,height:7.0710678}),_.layout="A3"):r.value===1.41421356?(_.defineLayout({name:"A3_V",width:10,height:14.1421356}),_.layout="A3_V"):_.layout="LAYOUT_16x9",L){const{color:Oe,alpha:z}=g(a.value.backgroundColor);_.defineSlideMaster({title:"PPTIST_MASTER",background:{color:Oe,transparency:(1-z)*100}})}const I=[];for(const[Oe,z]of E.entries()){const ae=_.addSlide(),le={shapes:[]};if(I.push(le),z.background){const U=z.background;if(U.type==="image"&&U.image)N(U.image.src)?ae.addImage({data:U.image.src,x:0,y:0,w:i.value/c.value,h:i.value*r.value/c.value}):T(U.image.src)?ae.background={data:U.image.src}:ae.background={path:U.image.src};else if(U.type==="solid"&&U.color){const ee=g(U.color);ae.background={color:ee.color,transparency:(1-ee.alpha)*100}}else if(U.type==="gradient"&&U.gradient){le.background=U.gradient;const ee=U.gradient.colors,ie=ee[0].color,pe=ee[ee.length-1].color,ce=At.mix(ie,pe).toHexString(),de=g(ce);ae.background={color:de.color,transparency:(1-de.alpha)*100}}}if(z.remark){const ee=new DOMParser().parseFromString(z.remark,"text/html").body.querySelectorAll("p"),ie=[];for(const pe of ee){const ce=pe.textContent;ie.push(ce||"")}ae.addNotes(ie.join(`
284
- `))}if(z.elements){for(const U of z.elements)if(U.type==="text"){const ee=b(U.content),ie={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,fontSize:s/u.value,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:y(U.padding),paraSpaceBefore:5/u.value,lineSpacingMultiple:1.5/1.25,autoFit:!0};if(U.nowrap&&(ie.wrap=!1),U.rotate&&(ie.rotate=U.rotate),U.wordSpace&&(ie.charSpacing=U.wordSpace/u.value),U.lineHeight&&(ie.lineSpacingMultiple=U.lineHeight/1.25),U.fill){const pe=g(U.fill),ce=U.opacity===void 0?1:U.opacity;ie.fill={color:pe.color,transparency:(1-pe.alpha*ce)*100}}U.defaultColor&&(ie.color=g(U.defaultColor).color),U.defaultFontName&&(ie.fontFace=U.defaultFontName),U.shadow&&(ie.shadow=A(U.shadow)),(D=U.outline)!=null&&D.width&&(ie.line=w(U.outline)),U.opacity!==void 0&&(ie.transparency=(1-U.opacity)*100),U.paragraphSpace!==void 0&&(ie.paraSpaceBefore=U.paragraphSpace/u.value),U.vertical&&(ie.vert="eaVert"),ae.addText(ee,ie)}else if(U.type==="image"){const ee={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(T(U.src)?ee.data=U.src:ee.path=U.src,U.flipH&&(ee.flipH=U.flipH),U.flipV&&(ee.flipV=U.flipV),U.rotate&&(ee.rotate=U.rotate),U.link){const ie=M(U.link);ie&&(ee.hyperlink=ie)}if((W=U.filters)!=null&&W.opacity&&(ee.transparency=100-parseInt((Y=U.filters)==null?void 0:Y.opacity)),U.clip){U.clip.shape==="ellipse"&&(ee.rounding=!0);const[ie,pe]=U.clip.range,[ce,de]=ie,[Pe,Xe]=pe,Je=U.width/((Pe-ce)/100),at=U.height/((Xe-de)/100);ee.w=Je/c.value,ee.h=at/c.value,ee.sizing={type:"crop",x:ce/100*Je/c.value,y:de/100*at/c.value,w:(Pe-ce)/100*Je/c.value,h:(Xe-de)/100*at/c.value}}ae.addImage(ee)}else if(U.type==="shape"){if(U.special){const ee=document.createElement("div"),ie=l.createVNode(BQ,{elementInfo:U},null);l.render(ie,ee);const pe=ee.querySelector("svg"),ce=pe?Zhe(pe):"";if(l.render(null,ee),!ce)continue;const de={data:ce,x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(U.rotate&&(de.rotate=U.rotate),U.flipH&&(de.flipH=U.flipH),U.flipV&&(de.flipV=U.flipV),U.link){const Pe=M(U.link);Pe&&(de.hyperlink=Pe)}ae.addImage(de)}else{const ee={x:U.width/U.viewBox[0],y:U.height/U.viewBox[1]},ie=R(ahe(U.path),ee);let pe=g(U.fill);if(U.gradient){const Pe=U.gradient.colors,Xe=Pe[0].color,Je=Pe[Pe.length-1].color,at=At.mix(Xe,Je).toHexString();pe=g(at)}U.pattern&&(pe=g("#00000000"));const ce=U.opacity===void 0?1:U.opacity,de={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,fill:{color:pe.color,transparency:(1-pe.alpha*ce)*100},points:ie};if(U.gradient&&!U.pattern){const Pe=`${LJe}_${Oe}_${le.shapes.length}`;de.objectName=Pe,le.shapes.push({marker:Pe,name:`Shape ${le.shapes.length}`,gradient:U.gradient,opacity:ce})}if(U.flipH&&(de.flipH=U.flipH),U.flipV&&(de.flipV=U.flipV),U.shadow&&(de.shadow=A(U.shadow)),(G=U.outline)!=null&&G.width&&(de.line=w(U.outline)),U.rotate&&(de.rotate=U.rotate),U.link){const Pe=M(U.link);Pe&&(de.hyperlink=Pe)}ae.addShape("custGeom",de)}if(U.text){const ee=b(U.text.content),ie={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,fontSize:s/u.value,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5/u.value,valign:U.text.align,margin:y(U.text.padding)};U.text.nowrap&&(ie.wrap=!1),U.rotate&&(ie.rotate=U.rotate),U.text.defaultColor&&(ie.color=g(U.text.defaultColor).color),U.text.defaultFontName&&(ie.fontFace=U.text.defaultFontName),U.text.wordSpace&&(ie.charSpacing=U.text.wordSpace/u.value),U.text.lineHeight&&(ie.lineSpacingMultiple=U.text.lineHeight/1.25),U.text.paragraphSpace!==void 0&&(ie.paraSpaceBefore=U.text.paragraphSpace/u.value),ae.addText(ee,ie)}if(U.pattern){const ee={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(T(U.pattern)?ee.data=U.pattern:ee.path=U.pattern,U.flipH&&(ee.flipH=U.flipH),U.flipV&&(ee.flipV=U.flipV),U.rotate&&(ee.rotate=U.rotate),U.link){const ie=M(U.link);ie&&(ee.hyperlink=ie)}ae.addImage(ee)}}else if(U.type==="line"){const ee=ZK(U),ie=R(ahe(ee)),{minX:pe,maxX:ce,minY:de,maxY:Pe}=ll(U),Xe=g(U.color),Je={x:U.left/c.value,y:U.top/c.value,w:(ce-pe)/c.value,h:(Pe-de)/c.value,line:{color:Xe.color,transparency:(1-Xe.alpha)*100,width:U.width/u.value,dashType:S[U.style],beginArrowType:U.points[0]?"arrow":"none",endArrowType:U.points[1]?"arrow":"none"},points:ie};U.shadow&&(Je.shadow=A(U.shadow)),ae.addShape("custGeom",Je)}else if(U.type==="chart"){const ee=[];for(let Xe=0;Xe<U.data.series.length;Xe++){const Je=U.data.series[Xe];ee.push({name:`系列${Xe+1}`,labels:U.data.labels,values:Je})}let ie=[];if(U.themeColors.length===10)ie=U.themeColors.map(Xe=>g(Xe).color);else if(U.themeColors.length===1)ie=At(U.themeColors[0]).analogous(10).map(Xe=>g(Xe.toHexString()).color);else{const Xe=U.themeColors.length,Je=At(U.themeColors[Xe-1]).analogous(11-Xe).map(at=>at.toHexString());ie=[...U.themeColors.slice(0,Xe-1),...Je].map(at=>g(at).color)}const pe={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,chartColors:U.chartType==="pie"||U.chartType==="ring"?ie:ie.slice(0,U.data.series.length)},ce=g(U.textColor||"#000000").color;pe.catAxisLabelColor=ce,pe.valAxisLabelColor=ce;const de=14/u.value;if(pe.catAxisLabelFontSize=de,pe.valAxisLabelFontSize=de,U.fill||U.outline){const Xe={};U.fill&&(Xe.fill={color:g(U.fill).color}),U.outline&&(Xe.border={pt:U.outline.width/u.value,color:g(U.outline.color).color}),pe.plotArea=Xe}(U.data.series.length>1&&U.chartType!=="scatter"||U.chartType==="pie"||U.chartType==="ring")&&(pe.showLegend=!0,pe.legendPos="b",pe.legendColor=ce,pe.legendFontSize=de);let Pe=_.ChartType.bar;U.chartType==="bar"?(Pe=_.ChartType.bar,pe.barDir="col",(F=U.options)!=null&&F.stack&&(pe.barGrouping="stacked")):U.chartType==="column"?(Pe=_.ChartType.bar,pe.barDir="bar",(Z=U.options)!=null&&Z.stack&&(pe.barGrouping="stacked")):U.chartType==="line"?(Pe=_.ChartType.line,(Q=U.options)!=null&&Q.lineSmooth&&(pe.lineSmooth=!0)):U.chartType==="area"?Pe=_.ChartType.area:U.chartType==="radar"?Pe=_.ChartType.radar:U.chartType==="scatter"?(Pe=_.ChartType.scatter,pe.lineSize=0):U.chartType==="pie"?Pe=_.ChartType.pie:U.chartType==="ring"&&(Pe=_.ChartType.doughnut,pe.holeSize=60),ae.addChart(Pe,ee,pe)}else if(U.type==="table"){const ee=[];for(let Xe=0;Xe<U.data.length;Xe++){const Je=U.data[Xe];for(let at=0;at<Je.length;at++){const St=Je[at];if(St.colspan>1||St.rowspan>1)for(let ge=Xe;ge<Xe+St.rowspan;ge++)for(let he=ge===Xe?at+1:at;he<at+St.colspan;he++)ee.push(`${ge}_${he}`)}}const ie=[],pe=U.theme;let ce=null,de=[];pe&&(ce=g(pe.color),de=Dde(pe.color).map(Xe=>g(Xe)));for(let Xe=0;Xe<U.data.length;Xe++){const Je=U.data[Xe],at=[];for(let St=0;St<Je.length;St++){const ge=Je[St],he={colspan:ge.colspan,rowspan:ge.rowspan,bold:((H=ge.style)==null?void 0:H.bold)||!1,italic:((K=ge.style)==null?void 0:K.em)||!1,underline:{style:(te=ge.style)!=null&&te.underline?"sng":"none"},align:((oe=ge.style)==null?void 0:oe.align)||"left",valign:"middle",fontFace:((ue=ge.style)==null?void 0:ue.fontname)||"微软雅黑",fontSize:((ke=ge.style)!=null&&ke.fontsize?parseInt((ve=ge.style)==null?void 0:ve.fontsize):14)/u.value};if(pe&&ce){let ye;Xe%2===0?ye=de[1]:ye=de[0],(pe.rowHeader&&Xe===0||pe.rowFooter&&Xe===U.data.length-1||pe.colHeader&&St===0||pe.colFooter&&St===Je.length-1)&&(ye=ce),he.fill={color:ye.color,transparency:(1-ye.alpha)*100}}if((xe=ge.style)!=null&&xe.backcolor){const ye=g(ge.style.backcolor);he.fill={color:ye.color,transparency:(1-ye.alpha)*100}}(Me=ge.style)!=null&&Me.color&&(he.color=g(ge.style.color).color),ee.includes(`${Xe}_${St}`)||at.push({text:ge.text,options:he})}at.length&&ie.push(at)}const Pe={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,colW:U.colWidths.map(Xe=>U.width*Xe/c.value)};U.theme&&(Pe.fill={color:"#ffffff"}),U.outline.width&&U.outline.color&&(Pe.border={type:U.outline.style==="solid"?"solid":"dash",pt:U.outline.width/u.value,color:g(U.outline.color).color}),ae.addTable(ie,Pe)}else if(U.type==="latex"){const ee=document.createElement("div"),ie=l.createVNode(DQ,{elementInfo:U},null);l.render(ie,ee);const pe=ee.querySelector("svg"),ce=pe?Zhe(pe):"";if(l.render(null,ee),!ce)continue;const de={data:ce,x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(U.link){const Pe=M(U.link);Pe&&(de.hyperlink=Pe)}ae.addImage(de)}else if(!P&&(U.type==="video"||U.type==="audio")){const ee={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,path:U.src,type:U.type};U.type==="video"&&U.poster&&(ee.cover=U.poster);const ie=U.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);ie&&ie[1]?ee.extn=ie[1]:U.ext&&(ee.extn=U.ext);const pe=["avi","mp4","m4v","mov","wmv"],ce=["mp3","m4a","mp4","wav","wma"];ee.extn&&[...pe,...ce].includes(ee.extn)&&ae.addMedia(ee)}}}return new Promise((Oe,z)=>{setTimeout(async()=>{const ae=`${o.value||`ppt_${+new Date}`}`;try{const le=await _.write({outputType:"blob"}),U=await vJe(le,I);if(f.value=!1,O){const ee=new File([U],`${ae}.pptx`,{type:jve});Oe(ee)}else AL.saveAs(U,`${ae}.pptx`),Oe(null)}catch{f.value=!1,rn.error(O?"生成失败":"导出失败"),z(null)}},200)})}}},EJe=Object.freeze(Object.defineProperty({__proto__:null,default:zy},Symbol.toStringTag,{value:"Module"})),XE=e=>/^data:.+;base64,/.test(e),rme=e=>{var n,a;const t=[];for(const r of e){if(((n=r.background)==null?void 0:n.type)==="image"&&((a=r.background.image)!=null&&a.src)&&XE(r.background.image.src)){const o=r.background.image;t.push({base64:o.src,setUrl:i=>{o.src=i}})}for(const o of r.elements||[])o.type==="image"&&XE(o.src)&&t.push({base64:o.src,setUrl:i=>{o.src=i}}),o.type==="video"&&o.poster&&XE(o.poster)&&t.push({base64:o.poster,setUrl:i=>{o.poster=i}}),o.type==="shape"&&o.pattern&&XE(o.pattern)&&t.push({base64:o.pattern,setUrl:i=>{o.pattern=i}})}return t},ome=(e={})=>{const t=mt(),{exportPPTX:n}=zy(),a=l.inject("onUploadFile"),r=l.inject("onSave"),o=l.inject(A4,null),i=e.bridge??o,s=(i==null?void 0:i.getOnUploadFile)??(()=>a),c=(i==null?void 0:i.getOnSave)??(()=>r),u=l.ref(!1),f=l.ref(!1),d=l.ref(null),h=l.ref([]);let p=null,v=!1;const m=async S=>{var M,T;h.value=S,f.value=!0,await l.nextTick();const w=[...((M=d.value)==null?void 0:M.querySelectorAll("img"))||[]];await Promise.all(w.map(N=>N.complete?Promise.resolve():new Promise(C=>{const E=()=>{clearTimeout(L),N.removeEventListener("load",E),N.removeEventListener("error",E),C()},L=setTimeout(E,8e3);N.addEventListener("load",E),N.addEventListener("error",E),N.complete&&E()}))),await((T=document.fonts)==null?void 0:T.ready),await new Promise(N=>requestAnimationFrame(()=>N()))},g=async()=>{var S;try{const w=s(),M=(S=d.value)==null?void 0:S.querySelectorAll(".thumbnail-slide");if(!(M!=null&&M.length))return[];const T={quality:.9,width:800,pixelRatio:2,fontEmbedCSS:""},N=[];for(const C of M){C.querySelectorAll("foreignObject [xmlns]").forEach(O=>O.removeAttribute("xmlns"));const L=await bL(C,T),P=w?await w({base64:L}):L;N.push(P)}return N}catch{return[]}},y=()=>{const{title:S,theme:w,slides:M,viewportSize:T,viewportRatio:N}=t.$state;return JSON.parse(JSON.stringify({title:S,theme:w,slides:M,width:T,height:T*N}))},b=async S=>{const w=s(),M=rme(S.slides);if(!M.length)return S;const T=new Map,N=[...new Set(M.map(E=>E.base64))];await Promise.all(N.map(async E=>{const L=w?await w({base64:E}):E;T.set(E,L)}));for(const E of M){const L=T.get(E.base64);L&&E.setUrl(L)}const C=rme(t.slides);for(const E of C){const L=T.get(E.base64);L&&E.setUrl(L)}return S},R=async()=>{i==null||i.flushPendingEdits();const S=await b(y());await m(S.slides);const[w,M]=await Promise.all([g(),n(S.slides,!0,!1,!0)]),T=s(),N=M&&T?await T({file:M}):"",C=c();if(C){const E=JSON.parse(JSON.stringify(S));await C({pptUrl:N,json:S,slideImages:w}),i==null||i.markSaved(E)}};return{saveSlides:h,saving:u,saveRendererVisible:f,offscreenCoverRef:d,savePresentation:()=>(i==null||i.flushPendingEdits(),p?(v=!0,p):(p=(async()=>{u.value=!0;try{await(i==null?void 0:i.waitUntilReady());do v=!1,await R(),i==null||i.flushPendingEdits();while(v&&((i==null?void 0:i.hasUnsavedChanges())??!1))}finally{u.value=!1,f.value=!1,h.value=[],p=null}})(),p))}};var Yr=(e=>(e.UP="up",e.DOWN="down",e.TOP="top",e.BOTTOM="bottom",e))(Yr||{}),Gn=(e=>(e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.CENTER="center",e))(Gn||{}),vM=(e=>(e.T="top",e.B="bottom",e.L="left",e.R="right",e))(vM||{}),Dt=(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",e))(Dt||{}),hl=(e=>(e.START="start",e.END="end",e.C="ctrl",e.C1="ctrl1",e.C2="ctrl2",e))(hl||{});const XQ=()=>{const e=Tt(),t=mt(),{activeElementIdList:n}=Qe(e),{currentSlide:a}=Qe(t),{addHistorySnapshot:r}=mn();return{lockElement:()=>{const s=JSON.parse(JSON.stringify(a.value.elements));for(const c of s)n.value.includes(c.id)&&(c.lock=!0);t.updateSlide({elements:s}),e.setActiveElementIdList([]),r()},unlockElement:s=>{const c=JSON.parse(JSON.stringify(a.value.elements));if(s.groupId){const u=[];for(const f of c)f.groupId===s.groupId&&(f.lock=!1,u.push(f.id));t.updateSlide({elements:c}),e.setActiveElementIdList(u)}else{for(const u of c)if(u.id===s.id){u.lock=!1;break}t.updateSlide({elements:c}),e.setActiveElementIdList([s.id])}r()}}},mM=()=>{const e=Tt(),t=mt(),{activeElementIdList:n,activeGroupElementId:a}=Qe(e),{currentSlide:r}=Qe(t),{addHistorySnapshot:o}=mn();return{deleteElement:()=>{if(!n.value.length)return;let c=[];a.value?c=r.value.elements.filter(u=>u.id!==a.value):c=r.value.elements.filter(u=>!n.value.includes(u.id)),e.setActiveElementIdList([]),t.updateSlide({elements:c}),o()},deleteAllElements:()=>{r.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),o())}}},UQ=()=>{const e=Tt(),t=mt(),{activeElementIdList:n,activeElementList:a,handleElementId:r}=Qe(e),{currentSlide:o}=Qe(t),{addHistorySnapshot:i}=mn();return{canCombine:l.computed(()=>{if(a.value.length<2)return!1;const f=a.value[0].groupId;return f?!a.value.every(h=>(h.groupId&&h.groupId)===f):!0}),combineElements:()=>{if(!a.value.length)return;let f=JSON.parse(JSON.stringify(o.value.elements));const d=an(10),h=[];for(const g of f)n.value.includes(g.id)&&(g.groupId=d,h.push(g));const p=f.findIndex(g=>g.id===h[h.length-1].id),v=h.map(g=>g.id);f=f.filter(g=>!v.includes(g.id));const m=p-h.length+1;f.splice(m,0,...h),t.updateSlide({elements:f}),i()},uncombineElements:()=>{if(!a.value.length||!a.value.some(p=>p.groupId))return;const d=JSON.parse(JSON.stringify(o.value.elements));for(const p of d)n.value.includes(p.id)&&p.groupId&&delete p.groupId;t.updateSlide({elements:d});const h=r.value?[r.value]:[];e.setActiveElementIdList(h),i()}}},WQ=()=>{const e=Tt(),{activeElementIdList:t,activeElementList:n}=Qe(e),{pasteTextClipboardData:a}=zK(),{deleteElement:r}=mM(),o=()=>{if(!t.value.length)return;const u=BK(JSON.stringify({type:"elements",data:n.value}));Ude(u).then(()=>{e.setEditorareaFocus(!0)})},i=()=>{o(),r()},s=()=>{Wde().then(u=>{a(u)}).catch(u=>rn.warning(u))};return{copyElement:o,cutElement:i,pasteElement:s,quickCopyElement:()=>{o(),s()}}},gM=()=>{const e=Tt(),{currentSlide:t}=Qe(mt()),{hiddenElementIdList:n,handleElementId:a}=Qe(e);return{selectAllElements:()=>{const s=t.value.elements.filter(c=>!c.lock&&!n.value.includes(c.id)).map(c=>c.id);e.setActiveElementIdList(s)},selectElement:i=>{a.value===i||n.value.includes(i)||t.value.elements.filter(c=>c.lock).some(c=>c.id===i)||e.setActiveElementIdList([i])}}},OJe=()=>{const e=mt(),{activeElementIdList:t,activeGroupElementId:n}=Qe(Tt()),{currentSlide:a}=Qe(e),{addHistorySnapshot:r}=mn();return{moveElement:(i,s=1)=>{let c=[];const u=f=>{let{left:d,top:h}=f;switch(i){case Vt.LEFT:d=d-s;break;case Vt.RIGHT:d=d+s;break;case Vt.UP:h=h-s;break;case Vt.DOWN:h=h+s;break}return{...f,left:d,top:h}};n.value?c=a.value.elements.map(f=>n.value===f.id?u(f):f):c=a.value.elements.map(f=>t.value.includes(f.id)?u(f):f),e.updateSlide({elements:c}),r()}}},yM=()=>{const e=mt(),{currentSlide:t}=Qe(e),{addHistorySnapshot:n}=mn(),a=(u,f)=>({minLevel:u.findIndex(d=>d.id===f[0].id),maxLevel:u.findIndex(d=>d.id===f[f.length-1].id)}),r=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(y=>y.groupId===f.groupId),{minLevel:p,maxLevel:v}=a(u,h);if(v===u.length-1)return;const m=d[v+1],g=d.splice(p,h.length);if(m.groupId){const y=d.filter(b=>b.groupId===m.groupId);d.splice(p+y.length,0,...g)}else d.splice(p+1,0,...g)}else{const h=u.findIndex(m=>m.id===f.id);if(h===u.length-1)return;const p=d[h+1],v=d.splice(h,1)[0];if(p.groupId){const m=d.filter(g=>g.groupId===p.groupId);d.splice(h+m.length,0,v)}else d.splice(h+1,0,v)}return d},o=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(g=>g.groupId===f.groupId),{minLevel:p}=a(u,h);if(p===0)return;const v=d[p-1],m=d.splice(p,h.length);if(v.groupId){const g=d.filter(y=>y.groupId===v.groupId);d.splice(p-g.length,0,...m)}else d.splice(p-1,0,...m)}else{const h=u.findIndex(m=>m.id===f.id);if(h===0)return;const p=d[h-1],v=d.splice(h,1)[0];if(p.groupId){const m=d.filter(g=>g.groupId===p.groupId);d.splice(h-m.length,0,v)}else d.splice(h-1,0,v)}return d},i=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(g=>g.groupId===f.groupId),{minLevel:p,maxLevel:v}=a(u,h);if(v===u.length-1)return null;const m=d.splice(p,h.length);d.push(...m)}else{const h=u.findIndex(p=>p.id===f.id);if(h===u.length-1)return null;d.splice(h,1),d.push(f)}return d},s=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(m=>m.groupId===f.groupId),{minLevel:p}=a(u,h);if(p===0)return;const v=d.splice(p,h.length);d.unshift(...v)}else{const h=u.findIndex(p=>p.id===f.id);if(h===0)return;d.splice(h,1),d.unshift(f)}return d};return{orderElement:(u,f)=>{let d;f===Yr.UP?d=r(t.value.elements,u):f===Yr.DOWN?d=o(t.value.elements,u):f===Yr.TOP?d=i(t.value.elements,u):f===Yr.BOTTOM&&(d=s(t.value.elements,u)),d&&(e.updateSlide({elements:d}),n())}}},YQ=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},ime=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},ZQ=()=>!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement),Uv=()=>{const e=pY(),t=mt(),n=()=>{YQ(),e.setScreening(!0)};return{enterScreening:n,enterScreeningFromStart:()=>{t.updateSlideIndex(0),n()},exitScreening:()=>{e.setScreening(!1),ZQ()&&ime()}}},UE=()=>{const e=Tt(),{canvasPercentage:t,canvasScale:n,canvasDragged:a}=Qe(e);return{canvasScalePercentage:l.computed(()=>Math.round(n.value*100)+"%"),setCanvasScalePercentage:c=>{const u=Math.round(c/n.value*t.value)/100;e.setCanvasPercentage(u)},scaleCanvas:c=>{let u=t.value;const f=5,d=200,h=30;c==="+"&&u<=d&&(u+=f),c==="-"&&u>=h&&(u-=f),e.setCanvasPercentage(u)},resetCanvas:()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)}}},PJe=()=>{const e=Tt(),t=rl(),{activeElementIdList:n,disableHotkeys:a,handleElement:r,handleElementId:o,editorAreaFocus:i,thumbnailsFocus:s,showSearchPanel:c}=Qe(e),{currentSlide:u}=Qe(mt()),{ctrlKeyState:f,shiftKeyState:d,spaceKeyState:h}=Qe(t),{updateSlideIndex:p,copySlide:v,createSlide:m,deleteSlide:g,cutSlide:y,copyAndPasteSlide:b,selectAllSlide:R}=Vd(),{combineElements:A,uncombineElements:S}=UQ(),{deleteElement:w}=mM(),{lockElement:M}=XQ(),{copyElement:T,cutElement:N,quickCopyElement:C}=WQ(),{selectAllElements:E}=gM(),{moveElement:L}=OJe(),{orderElement:P}=yM(),{redo:O,undo:_}=mn(),{enterScreening:I,enterScreeningFromStart:D}=Uv(),{scaleCanvas:W,resetCanvas:Y}=UE(),G=()=>{n.value.length?T():s.value&&v()},F=()=>{n.value.length?N():s.value&&y()},Z=()=>{n.value.length?C():s.value&&b()},Q=()=>{i.value&&E(),s.value&&R()},H=()=>{i.value&&M()},K=()=>{i.value&&A()},te=()=>{i.value&&S()},oe=()=>{n.value.length?w():s.value&&g()},ue=ae=>{n.value.length?L(ae):(ae===Vt.UP||ae===Vt.DOWN)&&p(ae)},ke=ae=>{ae===Vt.PAGEUP?p(Vt.UP):ae===Vt.PAGEDOWN&&p(Vt.DOWN)},ve=ae=>{r.value&&P(r.value,ae)},xe=()=>{s.value&&m()},Me=()=>{if(!u.value.elements.length)return;if(!o.value){const ee=u.value.elements[0];e.setActiveElementIdList([ee.id]);return}const ae=u.value.elements.findIndex(ee=>ee.id===o.value),le=ae>=u.value.elements.length-1?0:ae+1,U=u.value.elements[le].id;e.setActiveElementIdList([U])},Oe=ae=>{const{ctrlKey:le,shiftKey:U,altKey:ee,metaKey:ie}=ae,pe=le||ie,ce=ae.key.toUpperCase();if(pe&&!f.value&&t.setCtrlKeyState(!0),U&&!d.value&&t.setShiftKeyState(!0),!a.value&&ce===Vt.SPACE&&t.setSpaceKeyState(!0),pe&&ce===Vt.P){ae.preventDefault(),e.setDialogForExport("pdf");return}if(U&&ce===Vt.F5){ae.preventDefault(),I(),t.setShiftKeyState(!1);return}if(ce===Vt.F5){ae.preventDefault(),D();return}if(le&&ce===Vt.F){ae.preventDefault(),e.setSearchPanelState(!c.value);return}if(le&&ce===Vt.MINUS){ae.preventDefault(),W("-");return}if(le&&ce===Vt.EQUAL){ae.preventDefault(),W("+");return}if(le&&ce===Vt.DIGIT_0){ae.preventDefault(),Y();return}if(!(!i.value&&!s.value)){if(pe&&ce===Vt.C){if(a.value)return;ae.preventDefault(),G()}if(pe&&ce===Vt.X){if(a.value)return;ae.preventDefault(),F()}if(pe&&ce===Vt.D){if(a.value)return;ae.preventDefault(),Z()}if(pe&&ce===Vt.Z){if(a.value)return;ae.preventDefault(),_()}if(pe&&ce===Vt.Y){if(a.value)return;ae.preventDefault(),O()}if(pe&&ce===Vt.A){if(a.value)return;ae.preventDefault(),Q()}if(pe&&ce===Vt.L){if(a.value)return;ae.preventDefault(),H()}if(!U&&pe&&ce===Vt.G){if(a.value)return;ae.preventDefault(),K()}if(U&&pe&&ce===Vt.G){if(a.value)return;ae.preventDefault(),te()}if(ee&&ce===Vt.F){if(a.value)return;ae.preventDefault(),ve(Yr.TOP)}if(ee&&ce===Vt.B){if(a.value)return;ae.preventDefault(),ve(Yr.BOTTOM)}if(ce===Vt.DELETE||ce===Vt.BACKSPACE){if(a.value)return;ae.preventDefault(),oe()}if(ce===Vt.UP){if(a.value)return;ae.preventDefault(),ue(Vt.UP)}if(ce===Vt.DOWN){if(a.value)return;ae.preventDefault(),ue(Vt.DOWN)}if(ce===Vt.LEFT){if(a.value)return;ae.preventDefault(),ue(Vt.LEFT)}if(ce===Vt.RIGHT){if(a.value)return;ae.preventDefault(),ue(Vt.RIGHT)}if(ce===Vt.PAGEUP){if(a.value)return;ae.preventDefault(),ke(Vt.PAGEUP)}if(ce===Vt.PAGEDOWN){if(a.value)return;ae.preventDefault(),ke(Vt.PAGEDOWN)}if(ce===Vt.ENTER){if(a.value)return;ae.preventDefault(),xe()}if(ce===Vt.TAB){if(a.value)return;ae.preventDefault(),Me()}i.value&&!U&&!pe&&!a.value&&(ce===Vt.T?e.setCreatingElement({type:"text"}):ce===Vt.R?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"}}):ce===Vt.O?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"}}):ce===Vt.L&&e.setCreatingElement({type:"line",data:{path:"M 0 0 L 20 20",style:"solid",points:["",""]}}))}},z=()=>{f.value&&t.setCtrlKeyState(!1),d.value&&t.setShiftKeyState(!1),h.value&&t.setSpaceKeyState(!1)};l.onMounted(()=>{document.addEventListener("keydown",Oe),document.addEventListener("keyup",z),window.addEventListener("blur",z)}),l.onUnmounted(()=>{document.removeEventListener("keydown",Oe),document.removeEventListener("keyup",z),window.removeEventListener("blur",z)})},WE={"audio/aac":"aac","audio/mpeg":"mp3","audio/ogg":"oga","audio/wav":"wav","audio/webm":"weba","audio/flac":"flac","audio/mp4":"m4a","audio/x-aiff":"aif","audio/x-ms-wma":"wma","audio/midi":"mid","video/mp4":"mp4","video/mpeg":"mpeg","video/ogg":"ogv","video/webm":"webm","video/x-msvideo":"avi","video/quicktime":"mov","video/x-ms-wmv":"wmv","video/x-flv":"flv","video/3gpp":"3gp","video/3gpp2":"3g2"},sme=()=>{const{createImageElement:e,createVideoElement:t,createAudioElement:n}=Id(),{importSpecificFile:a,importPPTXFile:r}=tH();return{pasteDataTransfer:i=>{const s=i.items,c=s[0];let u=!1;for(const f of s)if(f.kind==="file"){if(f.type.indexOf("image")!==-1){const d=f.getAsFile();d&&(_d(d).then(h=>e(h)),u=!0)}else if(f.type.indexOf("video")!==-1){const d=f.getAsFile();if(d){const h=URL.createObjectURL(d),p=WE[d.type]||"";t(h,p),u=!0}}else if(f.type.indexOf("audio")!==-1){const d=f.getAsFile();if(d){const h=URL.createObjectURL(d),p=WE[d.type]||"";n(h,p),u=!0}}}if(!u&&c&&c.kind==="file"){if(!u&&c.type==="application/vnd.openxmlformats-officedocument.presentationml.presentation"){const f=c.getAsFile();f&&(r([f]),u=!0)}else if(!u){const f=c.getAsFile();f&&f.name&&(f.name.split(".").pop()||"")==="pptist"&&(a([f]),u=!0)}}return{isFile:u,dataTransferFirstItem:c}}}},_Je=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:n}=Qe(Tt()),{pasteTextClipboardData:a}=zK(),{pasteDataTransfer:r}=sme(),o=i=>{if(!e.value&&!t.value||n.value||!i.clipboardData)return;const{isFile:s,dataTransferFirstItem:c}=r(i.clipboardData);s||c&&c.kind==="string"&&c.type==="text/plain"&&c.getAsString(u=>a(u))};l.onMounted(()=>{document.addEventListener("paste",o)}),l.onUnmounted(()=>{document.removeEventListener("paste",o)})},IJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function VJe(e,t){return l.openBlock(),l.createElementBlock("svg",IJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M4 8h40"}),l.createElementVNode("path",{d:"M8 8h32v26H8z","clip-rule":"evenodd"}),l.createElementVNode("path",{d:"m22 16l5 5l-5 5m-6 16l8-8l8 8"})],-1)])])}const FJe=l.markRaw({name:"icon-park-outline-ppt",render:VJe}),DJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function BJe(e,t){return l.openBlock(),l.createElementBlock("svg",DJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M6 24.008V42h36V24"}),l.createElementVNode("path",{d:"m33 23l-9 9l-9-9m8.992-17v26"})],-1)])])}const Gy=l.markRaw({name:"icon-park-outline-download",render:BJe}),XJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function UJe(e,t){return l.openBlock(),l.createElementBlock("svg",XJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linejoin":"round",d:"M39.3 6H8.7A2.7 2.7 0 0 0 6 8.7v30.6A2.7 2.7 0 0 0 8.7 42h30.6a2.7 2.7 0 0 0 2.7-2.7V8.7A2.7 2.7 0 0 0 39.3 6Z"}),l.createElementVNode("path",{"stroke-linejoin":"round",d:"M32 6v18H15V6z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M26 13v4M10.997 6H36"})],-1)])])}const WJe=l.markRaw({name:"icon-park-outline-save-one",render:UJe}),YJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function ZJe(e,t){return l.openBlock(),l.createElementBlock("svg",YJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M9.455 14.91h5.454V9.454a5.455 5.455 0 1 0-5.454 5.454Zm0 18.18h5.454v5.455a5.455 5.455 0 1 1-5.454-5.454Z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M14.909 14.909h18.182v18.182H14.909z"}),l.createElementVNode("path",{d:"M38.545 14.91h-5.454V9.454a5.455 5.455 0 1 1 5.454 5.454Zm0 18.18a5.455 5.455 0 1 1-5.454 5.455v-5.454z"})],-1)])])}const KJe=l.markRaw({name:"icon-park-outline-command",render:ZJe}),HJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function QJe(e,t){return l.openBlock(),l.createElementBlock("svg",HJe,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M42 8v16M6 24v16m36-16c0-9.941-8.059-18-18-18a17.95 17.95 0 0 0-12.952 5.5M6 24c0 9.941 8.059 18 18 18a17.94 17.94 0 0 0 12.5-5.048"},null,-1)])])}const zJe=l.markRaw({name:"icon-park-outline-refresh",render:QJe}),GJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function JJe(e,t){return l.openBlock(),l.createElementBlock("svg",GJe,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M31 36L19 24l12-12"},null,-1)])])}const lme=l.markRaw({name:"icon-park-outline-left",render:JJe}),jJe={class:"hotkey-doc"},qJe={class:"title"},$Je={class:"label"},eje={class:"value"},tje={key:1,class:"row"},nje=et(l.defineComponent({__name:"HotkeyDoc",setup(e){const{t}=In(),n=l.computed(()=>eWe(t));return(a,r)=>(l.openBlock(),l.createElementBlock("div",jJe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,o=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:o.type},[l.createElementVNode("div",qJe,l.toDisplayString(o.type),1),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.children,i=>(l.openBlock(),l.createElementBlock("div",{class:"hotkey-item",key:i.label},[i.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",$Je,l.toDisplayString(i.label),1),l.createElementVNode("div",eje,l.toDisplayString(i.value),1)],64)):(l.openBlock(),l.createElementBlock("div",tje,l.toDisplayString(i.label),1))]))),128))],64))),128))]))}}),[["__scopeId","data-v-aada38d1"]]),aje=["accept"],Gd=et(l.defineComponent({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const n=t,a=l.shallowRef(null),r=()=>{a.value&&(a.value.value="",a.value.click())},o=i=>{const s=i.target.files;s&&n("change",s)};return(i,s)=>(l.openBlock(),l.createElementBlock("div",{class:"file-input",onClick:s[2]||(s[2]=c=>r())},[l.renderSlot(i.$slots,"default",{},void 0,!0),l.createElementVNode("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:a,accept:e.accept,onChange:s[0]||(s[0]=c=>o(c)),onClick:s[1]||(s[1]=l.withModifiers(()=>{},["stop"]))},null,40,aje)]))}}),[["__scopeId","data-v-6fb5ec10"]]),rje={class:"spin"},oje={class:"text"},sR=et(l.defineComponent({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},contained:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(t,n)=>e.loading?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["fullscreen-spin",{mask:e.mask,contained:e.contained}])},[l.createElementVNode("div",rje,[n[0]||(n[0]=l.createElementVNode("div",{class:"spinner"},null,-1)),l.createElementVNode("div",oje,l.toDisplayString(e.tip),1)])],2)):l.createCommentVNode("",!0)}}),[["__scopeId","data-v-342095c7"]]),ije={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function sje(e,t){return l.openBlock(),l.createElementBlock("svg",ije,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m8 8l32 32M8 40L40 8"},null,-1)])])}const Jy=l.markRaw({name:"icon-park-outline-close",render:sje}),lje={class:"header"},cje=et(l.defineComponent({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const n=e,a=t,r=l.ref(!1),o=l.computed(()=>({width:n.width+"px",...n.contentStyle||{}}));return(i,s)=>{const c=Jy;return l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[l.createVNode(l.Transition,{name:`drawer-slide-${e.placement}`,onAfterLeave:s[1]||(s[1]=u=>r.value=!1),onBeforeEnter:s[2]||(s[2]=u=>r.value=!0)},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{class:l.normalizeClass(["drawer",e.placement]),style:l.normalizeStyle({width:n.width+"px"})},[l.createElementVNode("div",lje,[l.renderSlot(i.$slots,"title",{},void 0,!0),l.createElementVNode("span",{class:"close-btn",onClick:s[0]||(s[0]=u=>a("update:visible",!1))},[l.createVNode(c)])]),r.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"content",style:l.normalizeStyle(o.value)},[l.renderSlot(i.$slots,"default",{},void 0,!0)],4)):l.createCommentVNode("",!0)],6),[[l.vShow,e.visible]])]),_:3},8,["name"])])}}}),[["__scopeId","data-v-ee4e3f04"]]);var pl="top",su="bottom",lu="right",vl="left",KQ="auto",bM=[pl,su,lu,vl],lR="start",AM="end",uje="clippingParents",cme="viewport",RM="popper",fje="reference",ume=bM.reduce(function(e,t){return e.concat([t+"-"+lR,t+"-"+AM])},[]),fme=[].concat(bM,[KQ]).reduce(function(e,t){return e.concat([t,t+"-"+lR,t+"-"+AM])},[]),dje="beforeRead",hje="read",pje="afterRead",vje="beforeMain",mje="main",gje="afterMain",yje="beforeWrite",bje="write",Aje="afterWrite",Rje=[dje,hje,pje,vje,mje,gje,yje,bje,Aje];function Jd(e){return e?(e.nodeName||"").toLowerCase():null}function oc(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function jy(e){var t=oc(e).Element;return e instanceof t||e instanceof Element}function cu(e){var t=oc(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function HQ(e){if(typeof ShadowRoot>"u")return!1;var t=oc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function xje(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},o=t.elements[n];!cu(o)||!Jd(o)||(Object.assign(o.style,a),Object.keys(r).forEach(function(i){var s=r[i];s===!1?o.removeAttribute(i):o.setAttribute(i,s===!0?"":s)}))})}function Sje(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var r=t.elements[a],o=t.attributes[a]||{},i=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),s=i.reduce(function(c,u){return c[u]="",c},{});!cu(r)||!Jd(r)||(Object.assign(r.style,s),Object.keys(o).forEach(function(c){r.removeAttribute(c)}))})}}const dme={name:"applyStyles",enabled:!0,phase:"write",fn:xje,effect:Sje,requires:["computeStyles"]};function jd(e){return e.split("-")[0]}var qy=Math.max,YE=Math.min,cR=Math.round;function QQ(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function hme(){return!/^((?!chrome|android).)*safari/i.test(QQ())}function uR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var a=e.getBoundingClientRect(),r=1,o=1;t&&cu(e)&&(r=e.offsetWidth>0&&cR(a.width)/e.offsetWidth||1,o=e.offsetHeight>0&&cR(a.height)/e.offsetHeight||1);var i=jy(e)?oc(e):window,s=i.visualViewport,c=!hme()&&n,u=(a.left+(c&&s?s.offsetLeft:0))/r,f=(a.top+(c&&s?s.offsetTop:0))/o,d=a.width/r,h=a.height/o;return{width:d,height:h,top:f,right:u+d,bottom:f+h,left:u,x:u,y:f}}function zQ(e){var t=uR(e),n=e.offsetWidth,a=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:a}}function pme(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&HQ(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Bp(e){return oc(e).getComputedStyle(e)}function wje(e){return["table","td","th"].indexOf(Jd(e))>=0}function Wv(e){return((jy(e)?e.ownerDocument:e.document)||window.document).documentElement}function ZE(e){return Jd(e)==="html"?e:e.assignedSlot||e.parentNode||(HQ(e)?e.host:null)||Wv(e)}function vme(e){return!cu(e)||Bp(e).position==="fixed"?null:e.offsetParent}function Mje(e){var t=/firefox/i.test(QQ()),n=/Trident/i.test(QQ());if(n&&cu(e)){var a=Bp(e);if(a.position==="fixed")return null}var r=ZE(e);for(HQ(r)&&(r=r.host);cu(r)&&["html","body"].indexOf(Jd(r))<0;){var o=Bp(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function xM(e){for(var t=oc(e),n=vme(e);n&&wje(n)&&Bp(n).position==="static";)n=vme(n);return n&&(Jd(n)==="html"||Jd(n)==="body"&&Bp(n).position==="static")?t:n||Mje(e)||t}function GQ(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function SM(e,t,n){return qy(e,YE(t,n))}function Nje(e,t,n){var a=SM(e,t,n);return a>n?n:a}function mme(){return{top:0,right:0,bottom:0,left:0}}function gme(e){return Object.assign({},mme(),e)}function yme(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}var Tje=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,gme(typeof t!="number"?t:yme(t,bM))};function Cje(e){var t,n=e.state,a=e.name,r=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,s=jd(n.placement),c=GQ(s),u=[vl,lu].indexOf(s)>=0,f=u?"height":"width";if(!(!o||!i)){var d=Tje(r.padding,n),h=zQ(o),p=c==="y"?pl:vl,v=c==="y"?su:lu,m=n.rects.reference[f]+n.rects.reference[c]-i[c]-n.rects.popper[f],g=i[c]-n.rects.reference[c],y=xM(o),b=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,R=m/2-g/2,A=d[p],S=b-h[f]-d[v],w=b/2-h[f]/2+R,M=SM(A,w,S),T=c;n.modifiersData[a]=(t={},t[T]=M,t.centerOffset=M-w,t)}}function kje(e){var t=e.state,n=e.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||pme(t.elements.popper,r)&&(t.elements.arrow=r))}const Lje={name:"arrow",enabled:!0,phase:"main",fn:Cje,effect:kje,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fR(e){return e.split("-")[1]}var Eje={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Oje(e,t){var n=e.x,a=e.y,r=t.devicePixelRatio||1;return{x:cR(n*r)/r||0,y:cR(a*r)/r||0}}function bme(e){var t,n=e.popper,a=e.popperRect,r=e.placement,o=e.variation,i=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=e.isFixed,h=i.x,p=h===void 0?0:h,v=i.y,m=v===void 0?0:v,g=typeof f=="function"?f({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),R=vl,A=pl,S=window;if(u){var w=xM(n),M="clientHeight",T="clientWidth";if(w===oc(n)&&(w=Wv(n),Bp(w).position!=="static"&&s==="absolute"&&(M="scrollHeight",T="scrollWidth")),w=w,r===pl||(r===vl||r===lu)&&o===AM){A=su;var N=d&&w===S&&S.visualViewport?S.visualViewport.height:w[M];m-=N-a.height,m*=c?1:-1}if(r===vl||(r===pl||r===su)&&o===AM){R=lu;var C=d&&w===S&&S.visualViewport?S.visualViewport.width:w[T];p-=C-a.width,p*=c?1:-1}}var E=Object.assign({position:s},u&&Eje),L=f===!0?Oje({x:p,y:m},oc(n)):{x:p,y:m};if(p=L.x,m=L.y,c){var P;return Object.assign({},E,(P={},P[A]=b?"0":"",P[R]=y?"0":"",P.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",P))}return Object.assign({},E,(t={},t[A]=b?m+"px":"",t[R]=y?p+"px":"",t.transform="",t))}function Pje(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,o=n.adaptive,i=o===void 0?!0:o,s=n.roundOffsets,c=s===void 0?!0:s,u={placement:jd(t.placement),variation:fR(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,bme(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,bme(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _je={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pje,data:{}};var KE={passive:!0};function Ije(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,o=r===void 0?!0:r,i=a.resize,s=i===void 0?!0:i,c=oc(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(f){f.addEventListener("scroll",n.update,KE)}),s&&c.addEventListener("resize",n.update,KE),function(){o&&u.forEach(function(f){f.removeEventListener("scroll",n.update,KE)}),s&&c.removeEventListener("resize",n.update,KE)}}const Vje={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ije,data:{}};var Fje={left:"right",right:"left",bottom:"top",top:"bottom"};function HE(e){return e.replace(/left|right|bottom|top/g,function(t){return Fje[t]})}var Dje={start:"end",end:"start"};function Ame(e){return e.replace(/start|end/g,function(t){return Dje[t]})}function JQ(e){var t=oc(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function jQ(e){return uR(Wv(e)).left+JQ(e).scrollLeft}function Bje(e,t){var n=oc(e),a=Wv(e),r=n.visualViewport,o=a.clientWidth,i=a.clientHeight,s=0,c=0;if(r){o=r.width,i=r.height;var u=hme();(u||!u&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}return{width:o,height:i,x:s+jQ(e),y:c}}function Xje(e){var t,n=Wv(e),a=JQ(e),r=(t=e.ownerDocument)==null?void 0:t.body,o=qy(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=qy(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-a.scrollLeft+jQ(e),c=-a.scrollTop;return Bp(r||n).direction==="rtl"&&(s+=qy(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:i,x:s,y:c}}function qQ(e){var t=Bp(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Rme(e){return["html","body","#document"].indexOf(Jd(e))>=0?e.ownerDocument.body:cu(e)&&qQ(e)?e:Rme(ZE(e))}function wM(e,t){var n;t===void 0&&(t=[]);var a=Rme(e),r=a===((n=e.ownerDocument)==null?void 0:n.body),o=oc(a),i=r?[o].concat(o.visualViewport||[],qQ(a)?a:[]):a,s=t.concat(i);return r?s:s.concat(wM(ZE(i)))}function $Q(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Uje(e,t){var n=uR(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function xme(e,t,n){return t===cme?$Q(Bje(e,n)):jy(t)?Uje(t,n):$Q(Xje(Wv(e)))}function Wje(e){var t=wM(ZE(e)),n=["absolute","fixed"].indexOf(Bp(e).position)>=0,a=n&&cu(e)?xM(e):e;return jy(a)?t.filter(function(r){return jy(r)&&pme(r,a)&&Jd(r)!=="body"}):[]}function Yje(e,t,n,a){var r=t==="clippingParents"?Wje(e):[].concat(t),o=[].concat(r,[n]),i=o[0],s=o.reduce(function(c,u){var f=xme(e,u,a);return c.top=qy(f.top,c.top),c.right=YE(f.right,c.right),c.bottom=YE(f.bottom,c.bottom),c.left=qy(f.left,c.left),c},xme(e,i,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Sme(e){var t=e.reference,n=e.element,a=e.placement,r=a?jd(a):null,o=a?fR(a):null,i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(r){case pl:c={x:i,y:t.y-n.height};break;case su:c={x:i,y:t.y+t.height};break;case lu:c={x:t.x+t.width,y:s};break;case vl:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var u=r?GQ(r):null;if(u!=null){var f=u==="y"?"height":"width";switch(o){case lR:c[u]=c[u]-(t[f]/2-n[f]/2);break;case AM:c[u]=c[u]+(t[f]/2-n[f]/2);break}}return c}function MM(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,o=n.strategy,i=o===void 0?e.strategy:o,s=n.boundary,c=s===void 0?uje:s,u=n.rootBoundary,f=u===void 0?cme:u,d=n.elementContext,h=d===void 0?RM:d,p=n.altBoundary,v=p===void 0?!1:p,m=n.padding,g=m===void 0?0:m,y=gme(typeof g!="number"?g:yme(g,bM)),b=h===RM?fje:RM,R=e.rects.popper,A=e.elements[v?b:h],S=Yje(jy(A)?A:A.contextElement||Wv(e.elements.popper),c,f,i),w=uR(e.elements.reference),M=Sme({reference:w,element:R,placement:r}),T=$Q(Object.assign({},R,M)),N=h===RM?T:w,C={top:S.top-N.top+y.top,bottom:N.bottom-S.bottom+y.bottom,left:S.left-N.left+y.left,right:N.right-S.right+y.right},E=e.modifiersData.offset;if(h===RM&&E){var L=E[r];Object.keys(C).forEach(function(P){var O=[lu,su].indexOf(P)>=0?1:-1,_=[pl,su].indexOf(P)>=0?"y":"x";C[P]+=L[_]*O})}return C}function Zje(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=n.boundary,o=n.rootBoundary,i=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?fme:c,f=fR(a),d=f?s?ume:ume.filter(function(v){return fR(v)===f}):bM,h=d.filter(function(v){return u.indexOf(v)>=0});h.length===0&&(h=d);var p=h.reduce(function(v,m){return v[m]=MM(e,{placement:m,boundary:r,rootBoundary:o,padding:i})[jd(m)],v},{});return Object.keys(p).sort(function(v,m){return p[v]-p[m]})}function Kje(e){if(jd(e)===KQ)return[];var t=HE(e);return[Ame(e),t,Ame(t)]}function Hje(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,i=n.altAxis,s=i===void 0?!0:i,c=n.fallbackPlacements,u=n.padding,f=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,v=p===void 0?!0:p,m=n.allowedAutoPlacements,g=t.options.placement,y=jd(g),b=y===g,R=c||(b||!v?[HE(g)]:Kje(g)),A=[g].concat(R).reduce(function(H,K){return H.concat(jd(K)===KQ?Zje(t,{placement:K,boundary:f,rootBoundary:d,padding:u,flipVariations:v,allowedAutoPlacements:m}):K)},[]),S=t.rects.reference,w=t.rects.popper,M=new Map,T=!0,N=A[0],C=0;C<A.length;C++){var E=A[C],L=jd(E),P=fR(E)===lR,O=[pl,su].indexOf(L)>=0,_=O?"width":"height",I=MM(t,{placement:E,boundary:f,rootBoundary:d,altBoundary:h,padding:u}),D=O?P?lu:vl:P?su:pl;S[_]>w[_]&&(D=HE(D));var W=HE(D),Y=[];if(o&&Y.push(I[L]<=0),s&&Y.push(I[D]<=0,I[W]<=0),Y.every(function(H){return H})){N=E,T=!1;break}M.set(E,Y)}if(T)for(var G=v?3:1,F=function(K){var te=A.find(function(oe){var ue=M.get(oe);if(ue)return ue.slice(0,K).every(function(ke){return ke})});if(te)return N=te,"break"},Z=G;Z>0;Z--){var Q=F(Z);if(Q==="break")break}t.placement!==N&&(t.modifiersData[a]._skip=!0,t.placement=N,t.reset=!0)}}const Qje={name:"flip",enabled:!0,phase:"main",fn:Hje,requiresIfExists:["offset"],data:{_skip:!1}};function wme(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Mme(e){return[pl,lu,su,vl].some(function(t){return e[t]>=0})}function zje(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=MM(t,{elementContext:"reference"}),s=MM(t,{altBoundary:!0}),c=wme(i,a),u=wme(s,r,o),f=Mme(c),d=Mme(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const Gje={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:zje};function Jje(e,t,n){var a=jd(e),r=[vl,pl].indexOf(a)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=o[0],s=o[1];return i=i||0,s=(s||0)*r,[vl,lu].indexOf(a)>=0?{x:s,y:i}:{x:i,y:s}}function jje(e){var t=e.state,n=e.options,a=e.name,r=n.offset,o=r===void 0?[0,0]:r,i=fme.reduce(function(f,d){return f[d]=Jje(d,t.rects,o),f},{}),s=i[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[a]=i}const qje={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jje};function $je(e){var t=e.state,n=e.name;t.modifiersData[n]=Sme({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const eqe={name:"popperOffsets",enabled:!0,phase:"read",fn:$je,data:{}};function tqe(e){return e==="x"?"y":"x"}function nqe(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,o=r===void 0?!0:r,i=n.altAxis,s=i===void 0?!1:i,c=n.boundary,u=n.rootBoundary,f=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,v=n.tetherOffset,m=v===void 0?0:v,g=MM(t,{boundary:c,rootBoundary:u,padding:d,altBoundary:f}),y=jd(t.placement),b=fR(t.placement),R=!b,A=GQ(y),S=tqe(A),w=t.modifiersData.popperOffsets,M=t.rects.reference,T=t.rects.popper,N=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(w){if(o){var P,O=A==="y"?pl:vl,_=A==="y"?su:lu,I=A==="y"?"height":"width",D=w[A],W=D+g[O],Y=D-g[_],G=p?-T[I]/2:0,F=b===lR?M[I]:T[I],Z=b===lR?-T[I]:-M[I],Q=t.elements.arrow,H=p&&Q?zQ(Q):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:mme(),te=K[O],oe=K[_],ue=SM(0,M[I],H[I]),ke=R?M[I]/2-G-ue-te-C.mainAxis:F-ue-te-C.mainAxis,ve=R?-M[I]/2+G+ue+oe+C.mainAxis:Z+ue+oe+C.mainAxis,xe=t.elements.arrow&&xM(t.elements.arrow),Me=xe?A==="y"?xe.clientTop||0:xe.clientLeft||0:0,Oe=(P=E==null?void 0:E[A])!=null?P:0,z=D+ke-Oe-Me,ae=D+ve-Oe,le=SM(p?YE(W,z):W,D,p?qy(Y,ae):Y);w[A]=le,L[A]=le-D}if(s){var U,ee=A==="x"?pl:vl,ie=A==="x"?su:lu,pe=w[S],ce=S==="y"?"height":"width",de=pe+g[ee],Pe=pe-g[ie],Xe=[pl,vl].indexOf(y)!==-1,Je=(U=E==null?void 0:E[S])!=null?U:0,at=Xe?de:pe-M[ce]-T[ce]-Je+C.altAxis,St=Xe?pe+M[ce]+T[ce]-Je-C.altAxis:Pe,ge=p&&Xe?Nje(at,pe,St):SM(p?at:de,pe,p?St:Pe);w[S]=ge,L[S]=ge-pe}t.modifiersData[a]=L}}const aqe={name:"preventOverflow",enabled:!0,phase:"main",fn:nqe,requiresIfExists:["offset"]};function rqe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function oqe(e){return e===oc(e)||!cu(e)?JQ(e):rqe(e)}function iqe(e){var t=e.getBoundingClientRect(),n=cR(t.width)/e.offsetWidth||1,a=cR(t.height)/e.offsetHeight||1;return n!==1||a!==1}function sqe(e,t,n){n===void 0&&(n=!1);var a=cu(t),r=cu(t)&&iqe(t),o=Wv(t),i=uR(e,r,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!n)&&((Jd(t)!=="body"||qQ(o))&&(s=oqe(t)),cu(t)?(c=uR(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=jQ(o))),{x:i.left+s.scrollLeft-c.x,y:i.top+s.scrollTop-c.y,width:i.width,height:i.height}}function lqe(e){var t=new Map,n=new Set,a=[];e.forEach(function(o){t.set(o.name,o)});function r(o){n.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&r(c)}}),a.push(o)}return e.forEach(function(o){n.has(o.name)||r(o)}),a}function cqe(e){var t=lqe(e);return Rje.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function uqe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function fqe(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var Nme={placement:"bottom",modifiers:[],strategy:"absolute"};function Tme(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function dqe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,o=r===void 0?Nme:r;return function(s,c,u){u===void 0&&(u=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Nme,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},d=[],h=!1,p={state:f,setOptions:function(y){var b=typeof y=="function"?y(f.options):y;m(),f.options=Object.assign({},o,f.options,b),f.scrollParents={reference:jy(s)?wM(s):s.contextElement?wM(s.contextElement):[],popper:wM(c)};var R=cqe(fqe([].concat(a,f.options.modifiers)));return f.orderedModifiers=R.filter(function(A){return A.enabled}),v(),p.update()},forceUpdate:function(){if(!h){var y=f.elements,b=y.reference,R=y.popper;if(Tme(b,R)){f.rects={reference:sqe(b,xM(R),f.options.strategy==="fixed"),popper:zQ(R)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(C){return f.modifiersData[C.name]=Object.assign({},C.data)});for(var A=0;A<f.orderedModifiers.length;A++){if(f.reset===!0){f.reset=!1,A=-1;continue}var S=f.orderedModifiers[A],w=S.fn,M=S.options,T=M===void 0?{}:M,N=S.name;typeof w=="function"&&(f=w({state:f,options:T,name:N,instance:p})||f)}}}},update:uqe(function(){return new Promise(function(g){p.forceUpdate(),g(f)})}),destroy:function(){m(),h=!0}};if(!Tme(s,c))return p;p.setOptions(u).then(function(g){!h&&u.onFirstUpdate&&u.onFirstUpdate(g)});function v(){f.orderedModifiers.forEach(function(g){var y=g.name,b=g.options,R=b===void 0?{}:b,A=g.effect;if(typeof A=="function"){var S=A({state:f,name:y,instance:p,options:R}),w=function(){};d.push(S||w)}})}function m(){d.forEach(function(g){return g()}),d=[]}return p}}var hqe=[Vje,eqe,_je,dme,qje,Qje,aqe,Lje,Gje],pqe=dqe({defaultModifiers:hqe}),vqe="tippy-box",Cme="tippy-content",mqe="tippy-backdrop",kme="tippy-arrow",Lme="tippy-svg-arrow",$y={passive:!0,capture:!0},Eme=function(){return document.body};function gqe(e,t){return{}.hasOwnProperty.call(e,t)}function ez(e,t,n){if(Array.isArray(e)){var a=e[t];return a??(Array.isArray(n)?n[t]:n)}return e}function tz(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Ome(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Pme(e,t){if(t===0)return e;var n;return function(a){clearTimeout(n),n=setTimeout(function(){e(a)},t)}}function yqe(e,t){var n=Object.assign({},e);return t.forEach(function(a){delete n[a]}),n}function bqe(e){return e.split(/\s+/).filter(Boolean)}function dR(e){return[].concat(e)}function _me(e,t){e.indexOf(t)===-1&&e.push(t)}function Aqe(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Rqe(e){return e.split("-")[0]}function QE(e){return[].slice.call(e)}function Ime(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function NM(){return document.createElement("div")}function TM(e){return["Element","Fragment"].some(function(t){return tz(e,t)})}function xqe(e){return tz(e,"NodeList")}function Sqe(e){return tz(e,"MouseEvent")}function wqe(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Mqe(e){return TM(e)?[e]:xqe(e)?QE(e):Array.isArray(e)?e:QE(document.querySelectorAll(e))}function nz(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Vme(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Nqe(e){var t,n=dR(e),a=n[0];return a!=null&&(t=a.ownerDocument)!=null&&t.body?a.ownerDocument:document}function Tqe(e,t){var n=t.clientX,a=t.clientY;return e.every(function(r){var o=r.popperRect,i=r.popperState,s=r.props,c=s.interactiveBorder,u=Rqe(i.placement),f=i.modifiersData.offset;if(!f)return!0;var d=u==="bottom"?f.top.y:0,h=u==="top"?f.bottom.y:0,p=u==="right"?f.left.x:0,v=u==="left"?f.right.x:0,m=o.top-a+d>c,g=a-o.bottom-h>c,y=o.left-n+p>c,b=n-o.right-v>c;return m||g||y||b})}function az(e,t,n){var a=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){e[a](r,n)})}function Fme(e,t){for(var n=t;n;){var a;if(e.contains(n))return!0;n=n.getRootNode==null||(a=n.getRootNode())==null?void 0:a.host}return!1}var qd={isTouch:!1},Dme=0;function Cqe(){qd.isTouch||(qd.isTouch=!0,window.performance&&document.addEventListener("mousemove",Bme))}function Bme(){var e=performance.now();e-Dme<20&&(qd.isTouch=!1,document.removeEventListener("mousemove",Bme)),Dme=e}function kqe(){var e=document.activeElement;if(wqe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Lqe(){document.addEventListener("touchstart",Cqe,$y),window.addEventListener("blur",kqe)}var Eqe=typeof window<"u"&&typeof document<"u",Oqe=Eqe?!!window.msCrypto:!1;function hR(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Xme(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Pqe(e){return Xme(`
284
+ `))}if(z.elements){for(const U of z.elements)if(U.type==="text"){const ee=b(U.content),ie={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,fontSize:s/u.value,fontFace:"微软雅黑",color:"#000000",valign:"top",margin:y(U.padding),paraSpaceBefore:5/u.value,lineSpacingMultiple:1.5/1.25,autoFit:!0};if(U.nowrap&&(ie.wrap=!1),U.rotate&&(ie.rotate=U.rotate),U.wordSpace&&(ie.charSpacing=U.wordSpace/u.value),U.lineHeight&&(ie.lineSpacingMultiple=U.lineHeight/1.25),U.fill){const pe=g(U.fill),ce=U.opacity===void 0?1:U.opacity;ie.fill={color:pe.color,transparency:(1-pe.alpha*ce)*100}}U.defaultColor&&(ie.color=g(U.defaultColor).color),U.defaultFontName&&(ie.fontFace=U.defaultFontName),U.shadow&&(ie.shadow=A(U.shadow)),(D=U.outline)!=null&&D.width&&(ie.line=w(U.outline)),U.opacity!==void 0&&(ie.transparency=(1-U.opacity)*100),U.paragraphSpace!==void 0&&(ie.paraSpaceBefore=U.paragraphSpace/u.value),U.vertical&&(ie.vert="eaVert"),ae.addText(ee,ie)}else if(U.type==="image"){const ee={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(T(U.src)?ee.data=U.src:ee.path=U.src,U.flipH&&(ee.flipH=U.flipH),U.flipV&&(ee.flipV=U.flipV),U.rotate&&(ee.rotate=U.rotate),U.link){const ie=M(U.link);ie&&(ee.hyperlink=ie)}if((W=U.filters)!=null&&W.opacity&&(ee.transparency=100-parseInt((Y=U.filters)==null?void 0:Y.opacity)),U.clip){U.clip.shape==="ellipse"&&(ee.rounding=!0);const[ie,pe]=U.clip.range,[ce,de]=ie,[Pe,Xe]=pe,Je=U.width/((Pe-ce)/100),at=U.height/((Xe-de)/100);ee.w=Je/c.value,ee.h=at/c.value,ee.sizing={type:"crop",x:ce/100*Je/c.value,y:de/100*at/c.value,w:(Pe-ce)/100*Je/c.value,h:(Xe-de)/100*at/c.value}}ae.addImage(ee)}else if(U.type==="shape"){if(U.special){const ee=document.createElement("div"),ie=l.createVNode(BQ,{elementInfo:U},null);l.render(ie,ee);const pe=ee.querySelector("svg"),ce=pe?Zhe(pe):"";if(l.render(null,ee),!ce)continue;const de={data:ce,x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(U.rotate&&(de.rotate=U.rotate),U.flipH&&(de.flipH=U.flipH),U.flipV&&(de.flipV=U.flipV),U.link){const Pe=M(U.link);Pe&&(de.hyperlink=Pe)}ae.addImage(de)}else{const ee={x:U.width/U.viewBox[0],y:U.height/U.viewBox[1]},ie=R(ahe(U.path),ee);let pe=g(U.fill);if(U.gradient){const Pe=U.gradient.colors,Xe=Pe[0].color,Je=Pe[Pe.length-1].color,at=At.mix(Xe,Je).toHexString();pe=g(at)}U.pattern&&(pe=g("#00000000"));const ce=U.opacity===void 0?1:U.opacity,de={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,fill:{color:pe.color,transparency:(1-pe.alpha*ce)*100},points:ie};if(U.gradient&&!U.pattern){const Pe=`${LJe}_${Oe}_${le.shapes.length}`;de.objectName=Pe,le.shapes.push({marker:Pe,name:`Shape ${le.shapes.length}`,gradient:U.gradient,opacity:ce})}if(U.flipH&&(de.flipH=U.flipH),U.flipV&&(de.flipV=U.flipV),U.shadow&&(de.shadow=A(U.shadow)),(G=U.outline)!=null&&G.width&&(de.line=w(U.outline)),U.rotate&&(de.rotate=U.rotate),U.link){const Pe=M(U.link);Pe&&(de.hyperlink=Pe)}ae.addShape("custGeom",de)}if(U.text){const ee=b(U.text.content),ie={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,fontSize:s/u.value,fontFace:"微软雅黑",color:"#000000",paraSpaceBefore:5/u.value,valign:U.text.align,margin:y(U.text.padding)};U.text.nowrap&&(ie.wrap=!1),U.rotate&&(ie.rotate=U.rotate),U.text.defaultColor&&(ie.color=g(U.text.defaultColor).color),U.text.defaultFontName&&(ie.fontFace=U.text.defaultFontName),U.text.wordSpace&&(ie.charSpacing=U.text.wordSpace/u.value),U.text.lineHeight&&(ie.lineSpacingMultiple=U.text.lineHeight/1.25),U.text.paragraphSpace!==void 0&&(ie.paraSpaceBefore=U.text.paragraphSpace/u.value),ae.addText(ee,ie)}if(U.pattern){const ee={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(T(U.pattern)?ee.data=U.pattern:ee.path=U.pattern,U.flipH&&(ee.flipH=U.flipH),U.flipV&&(ee.flipV=U.flipV),U.rotate&&(ee.rotate=U.rotate),U.link){const ie=M(U.link);ie&&(ee.hyperlink=ie)}ae.addImage(ee)}}else if(U.type==="line"){const ee=ZK(U),ie=R(ahe(ee)),{minX:pe,maxX:ce,minY:de,maxY:Pe}=ll(U),Xe=g(U.color),Je={x:U.left/c.value,y:U.top/c.value,w:(ce-pe)/c.value,h:(Pe-de)/c.value,line:{color:Xe.color,transparency:(1-Xe.alpha)*100,width:U.width/u.value,dashType:S[U.style],beginArrowType:U.points[0]?"arrow":"none",endArrowType:U.points[1]?"arrow":"none"},points:ie};U.shadow&&(Je.shadow=A(U.shadow)),ae.addShape("custGeom",Je)}else if(U.type==="chart"){const ee=[];for(let Xe=0;Xe<U.data.series.length;Xe++){const Je=U.data.series[Xe];ee.push({name:`系列${Xe+1}`,labels:U.data.labels,values:Je})}let ie=[];if(U.themeColors.length===10)ie=U.themeColors.map(Xe=>g(Xe).color);else if(U.themeColors.length===1)ie=At(U.themeColors[0]).analogous(10).map(Xe=>g(Xe.toHexString()).color);else{const Xe=U.themeColors.length,Je=At(U.themeColors[Xe-1]).analogous(11-Xe).map(at=>at.toHexString());ie=[...U.themeColors.slice(0,Xe-1),...Je].map(at=>g(at).color)}const pe={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,chartColors:U.chartType==="pie"||U.chartType==="ring"?ie:ie.slice(0,U.data.series.length)},ce=g(U.textColor||"#000000").color;pe.catAxisLabelColor=ce,pe.valAxisLabelColor=ce;const de=14/u.value;if(pe.catAxisLabelFontSize=de,pe.valAxisLabelFontSize=de,U.fill||U.outline){const Xe={};U.fill&&(Xe.fill={color:g(U.fill).color}),U.outline&&(Xe.border={pt:U.outline.width/u.value,color:g(U.outline.color).color}),pe.plotArea=Xe}(U.data.series.length>1&&U.chartType!=="scatter"||U.chartType==="pie"||U.chartType==="ring")&&(pe.showLegend=!0,pe.legendPos="b",pe.legendColor=ce,pe.legendFontSize=de);let Pe=_.ChartType.bar;U.chartType==="bar"?(Pe=_.ChartType.bar,pe.barDir="col",(F=U.options)!=null&&F.stack&&(pe.barGrouping="stacked")):U.chartType==="column"?(Pe=_.ChartType.bar,pe.barDir="bar",(Z=U.options)!=null&&Z.stack&&(pe.barGrouping="stacked")):U.chartType==="line"?(Pe=_.ChartType.line,(Q=U.options)!=null&&Q.lineSmooth&&(pe.lineSmooth=!0)):U.chartType==="area"?Pe=_.ChartType.area:U.chartType==="radar"?Pe=_.ChartType.radar:U.chartType==="scatter"?(Pe=_.ChartType.scatter,pe.lineSize=0):U.chartType==="pie"?Pe=_.ChartType.pie:U.chartType==="ring"&&(Pe=_.ChartType.doughnut,pe.holeSize=60),ae.addChart(Pe,ee,pe)}else if(U.type==="table"){const ee=[];for(let Xe=0;Xe<U.data.length;Xe++){const Je=U.data[Xe];for(let at=0;at<Je.length;at++){const St=Je[at];if(St.colspan>1||St.rowspan>1)for(let ge=Xe;ge<Xe+St.rowspan;ge++)for(let he=ge===Xe?at+1:at;he<at+St.colspan;he++)ee.push(`${ge}_${he}`)}}const ie=[],pe=U.theme;let ce=null,de=[];pe&&(ce=g(pe.color),de=Dde(pe.color).map(Xe=>g(Xe)));for(let Xe=0;Xe<U.data.length;Xe++){const Je=U.data[Xe],at=[];for(let St=0;St<Je.length;St++){const ge=Je[St],he={colspan:ge.colspan,rowspan:ge.rowspan,bold:((H=ge.style)==null?void 0:H.bold)||!1,italic:((K=ge.style)==null?void 0:K.em)||!1,underline:{style:(te=ge.style)!=null&&te.underline?"sng":"none"},align:((oe=ge.style)==null?void 0:oe.align)||"left",valign:"middle",fontFace:((ue=ge.style)==null?void 0:ue.fontname)||"微软雅黑",fontSize:((ke=ge.style)!=null&&ke.fontsize?parseInt((ve=ge.style)==null?void 0:ve.fontsize):14)/u.value};if(pe&&ce){let ye;Xe%2===0?ye=de[1]:ye=de[0],(pe.rowHeader&&Xe===0||pe.rowFooter&&Xe===U.data.length-1||pe.colHeader&&St===0||pe.colFooter&&St===Je.length-1)&&(ye=ce),he.fill={color:ye.color,transparency:(1-ye.alpha)*100}}if((xe=ge.style)!=null&&xe.backcolor){const ye=g(ge.style.backcolor);he.fill={color:ye.color,transparency:(1-ye.alpha)*100}}(Me=ge.style)!=null&&Me.color&&(he.color=g(ge.style.color).color),ee.includes(`${Xe}_${St}`)||at.push({text:ge.text,options:he})}at.length&&ie.push(at)}const Pe={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,colW:U.colWidths.map(Xe=>U.width*Xe/c.value)};U.theme&&(Pe.fill={color:"#ffffff"}),U.outline.width&&U.outline.color&&(Pe.border={type:U.outline.style==="solid"?"solid":"dash",pt:U.outline.width/u.value,color:g(U.outline.color).color}),ae.addTable(ie,Pe)}else if(U.type==="latex"){const ee=document.createElement("div"),ie=l.createVNode(DQ,{elementInfo:U},null);l.render(ie,ee);const pe=ee.querySelector("svg"),ce=pe?Zhe(pe):"";if(l.render(null,ee),!ce)continue;const de={data:ce,x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value};if(U.link){const Pe=M(U.link);Pe&&(de.hyperlink=Pe)}ae.addImage(de)}else if(!P&&(U.type==="video"||U.type==="audio")){const ee={x:U.left/c.value,y:U.top/c.value,w:U.width/c.value,h:U.height/c.value,path:U.src,type:U.type};U.type==="video"&&U.poster&&(ee.cover=U.poster);const ie=U.src.match(/\.([a-zA-Z0-9]+)(?:[\?#]|$)/);ie&&ie[1]?ee.extn=ie[1]:U.ext&&(ee.extn=U.ext);const pe=["avi","mp4","m4v","mov","wmv"],ce=["mp3","m4a","mp4","wav","wma"];ee.extn&&[...pe,...ce].includes(ee.extn)&&ae.addMedia(ee)}}}return new Promise((Oe,z)=>{setTimeout(async()=>{const ae=`${o.value||`ppt_${+new Date}`}`;try{const le=await _.write({outputType:"blob"}),U=await vJe(le,I);if(f.value=!1,O){const ee=new File([U],`${ae}.pptx`,{type:jve});Oe(ee)}else AL.saveAs(U,`${ae}.pptx`),Oe(null)}catch{f.value=!1,rn.error(O?"生成失败":"导出失败"),z(null)}},200)})}}},EJe=Object.freeze(Object.defineProperty({__proto__:null,default:zy},Symbol.toStringTag,{value:"Module"})),XE=e=>/^data:.+;base64,/.test(e),rme=e=>{var n,a;const t=[];for(const r of e){if(((n=r.background)==null?void 0:n.type)==="image"&&((a=r.background.image)!=null&&a.src)&&XE(r.background.image.src)){const o=r.background.image;t.push({base64:o.src,setUrl:i=>{o.src=i}})}for(const o of r.elements||[])o.type==="image"&&XE(o.src)&&t.push({base64:o.src,setUrl:i=>{o.src=i}}),o.type==="video"&&o.poster&&XE(o.poster)&&t.push({base64:o.poster,setUrl:i=>{o.poster=i}}),o.type==="shape"&&o.pattern&&XE(o.pattern)&&t.push({base64:o.pattern,setUrl:i=>{o.pattern=i}})}return t},ome=(e={})=>{const t=mt(),{exportPPTX:n}=zy(),a=l.inject("onUploadFile"),r=l.inject("onSave"),o=l.inject(A4,null),i=e.bridge??o,s=(i==null?void 0:i.getOnUploadFile)??(()=>a),c=(i==null?void 0:i.getOnSave)??(()=>r),u=l.ref(!1),f=l.ref(!1),d=l.ref(null),h=l.ref([]);let p=null,v=!1;const m=async S=>{var M,T;h.value=S,f.value=!0,await l.nextTick();const w=[...((M=d.value)==null?void 0:M.querySelectorAll("img"))||[]];await Promise.all(w.map(N=>N.complete?Promise.resolve():new Promise(C=>{const E=()=>{clearTimeout(L),N.removeEventListener("load",E),N.removeEventListener("error",E),C()},L=setTimeout(E,8e3);N.addEventListener("load",E),N.addEventListener("error",E),N.complete&&E()}))),await((T=document.fonts)==null?void 0:T.ready),await new Promise(N=>requestAnimationFrame(()=>N()))},g=async()=>{var S;try{const w=s(),M=(S=d.value)==null?void 0:S.querySelector(".thumbnail-slide");if(!M)return[];const T={quality:.9,width:800,pixelRatio:2,fontEmbedCSS:""};M.querySelectorAll("foreignObject [xmlns]").forEach(L=>L.removeAttribute("xmlns"));const C=await bL(M,T);return[w?await w({base64:C}):C]}catch{return[]}},y=()=>{const{title:S,theme:w,slides:M,viewportSize:T,viewportRatio:N}=t.$state;return JSON.parse(JSON.stringify({title:S,theme:w,slides:M,width:T,height:T*N}))},b=async S=>{const w=s(),M=rme(S.slides);if(!M.length)return S;const T=new Map,N=[...new Set(M.map(E=>E.base64))];await Promise.all(N.map(async E=>{const L=w?await w({base64:E}):E;T.set(E,L)}));for(const E of M){const L=T.get(E.base64);L&&E.setUrl(L)}const C=rme(t.slides);for(const E of C){const L=T.get(E.base64);L&&E.setUrl(L)}return S},R=async()=>{i==null||i.flushPendingEdits();const S=await b(y());await m(S.slides.slice(0,1));const[w,M]=await Promise.all([g(),n(S.slides,!0,!1,!0)]),T=s(),N=M&&T?await T({file:M}):"",C=c();if(C){const E=JSON.parse(JSON.stringify(S));await C({pptUrl:N,json:S,slideImages:w}),i==null||i.markSaved(E)}};return{saveSlides:h,saving:u,saveRendererVisible:f,offscreenCoverRef:d,savePresentation:()=>(i==null||i.flushPendingEdits(),p?(v=!0,p):(p=(async()=>{u.value=!0;try{await(i==null?void 0:i.waitUntilReady());do v=!1,await R(),i==null||i.flushPendingEdits();while(v&&((i==null?void 0:i.hasUnsavedChanges())??!1))}finally{u.value=!1,f.value=!1,h.value=[],p=null}})(),p))}};var Yr=(e=>(e.UP="up",e.DOWN="down",e.TOP="top",e.BOTTOM="bottom",e))(Yr||{}),Gn=(e=>(e.TOP="top",e.BOTTOM="bottom",e.LEFT="left",e.RIGHT="right",e.VERTICAL="vertical",e.HORIZONTAL="horizontal",e.CENTER="center",e))(Gn||{}),vM=(e=>(e.T="top",e.B="bottom",e.L="left",e.R="right",e))(vM||{}),Dt=(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",e))(Dt||{}),hl=(e=>(e.START="start",e.END="end",e.C="ctrl",e.C1="ctrl1",e.C2="ctrl2",e))(hl||{});const XQ=()=>{const e=Tt(),t=mt(),{activeElementIdList:n}=Qe(e),{currentSlide:a}=Qe(t),{addHistorySnapshot:r}=mn();return{lockElement:()=>{const s=JSON.parse(JSON.stringify(a.value.elements));for(const c of s)n.value.includes(c.id)&&(c.lock=!0);t.updateSlide({elements:s}),e.setActiveElementIdList([]),r()},unlockElement:s=>{const c=JSON.parse(JSON.stringify(a.value.elements));if(s.groupId){const u=[];for(const f of c)f.groupId===s.groupId&&(f.lock=!1,u.push(f.id));t.updateSlide({elements:c}),e.setActiveElementIdList(u)}else{for(const u of c)if(u.id===s.id){u.lock=!1;break}t.updateSlide({elements:c}),e.setActiveElementIdList([s.id])}r()}}},mM=()=>{const e=Tt(),t=mt(),{activeElementIdList:n,activeGroupElementId:a}=Qe(e),{currentSlide:r}=Qe(t),{addHistorySnapshot:o}=mn();return{deleteElement:()=>{if(!n.value.length)return;let c=[];a.value?c=r.value.elements.filter(u=>u.id!==a.value):c=r.value.elements.filter(u=>!n.value.includes(u.id)),e.setActiveElementIdList([]),t.updateSlide({elements:c}),o()},deleteAllElements:()=>{r.value.elements.length&&(e.setActiveElementIdList([]),t.updateSlide({elements:[]}),o())}}},UQ=()=>{const e=Tt(),t=mt(),{activeElementIdList:n,activeElementList:a,handleElementId:r}=Qe(e),{currentSlide:o}=Qe(t),{addHistorySnapshot:i}=mn();return{canCombine:l.computed(()=>{if(a.value.length<2)return!1;const f=a.value[0].groupId;return f?!a.value.every(h=>(h.groupId&&h.groupId)===f):!0}),combineElements:()=>{if(!a.value.length)return;let f=JSON.parse(JSON.stringify(o.value.elements));const d=an(10),h=[];for(const g of f)n.value.includes(g.id)&&(g.groupId=d,h.push(g));const p=f.findIndex(g=>g.id===h[h.length-1].id),v=h.map(g=>g.id);f=f.filter(g=>!v.includes(g.id));const m=p-h.length+1;f.splice(m,0,...h),t.updateSlide({elements:f}),i()},uncombineElements:()=>{if(!a.value.length||!a.value.some(p=>p.groupId))return;const d=JSON.parse(JSON.stringify(o.value.elements));for(const p of d)n.value.includes(p.id)&&p.groupId&&delete p.groupId;t.updateSlide({elements:d});const h=r.value?[r.value]:[];e.setActiveElementIdList(h),i()}}},WQ=()=>{const e=Tt(),{activeElementIdList:t,activeElementList:n}=Qe(e),{pasteTextClipboardData:a}=zK(),{deleteElement:r}=mM(),o=()=>{if(!t.value.length)return;const u=BK(JSON.stringify({type:"elements",data:n.value}));Ude(u).then(()=>{e.setEditorareaFocus(!0)})},i=()=>{o(),r()},s=()=>{Wde().then(u=>{a(u)}).catch(u=>rn.warning(u))};return{copyElement:o,cutElement:i,pasteElement:s,quickCopyElement:()=>{o(),s()}}},gM=()=>{const e=Tt(),{currentSlide:t}=Qe(mt()),{hiddenElementIdList:n,handleElementId:a}=Qe(e);return{selectAllElements:()=>{const s=t.value.elements.filter(c=>!c.lock&&!n.value.includes(c.id)).map(c=>c.id);e.setActiveElementIdList(s)},selectElement:i=>{a.value===i||n.value.includes(i)||t.value.elements.filter(c=>c.lock).some(c=>c.id===i)||e.setActiveElementIdList([i])}}},OJe=()=>{const e=mt(),{activeElementIdList:t,activeGroupElementId:n}=Qe(Tt()),{currentSlide:a}=Qe(e),{addHistorySnapshot:r}=mn();return{moveElement:(i,s=1)=>{let c=[];const u=f=>{let{left:d,top:h}=f;switch(i){case Vt.LEFT:d=d-s;break;case Vt.RIGHT:d=d+s;break;case Vt.UP:h=h-s;break;case Vt.DOWN:h=h+s;break}return{...f,left:d,top:h}};n.value?c=a.value.elements.map(f=>n.value===f.id?u(f):f):c=a.value.elements.map(f=>t.value.includes(f.id)?u(f):f),e.updateSlide({elements:c}),r()}}},yM=()=>{const e=mt(),{currentSlide:t}=Qe(e),{addHistorySnapshot:n}=mn(),a=(u,f)=>({minLevel:u.findIndex(d=>d.id===f[0].id),maxLevel:u.findIndex(d=>d.id===f[f.length-1].id)}),r=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(y=>y.groupId===f.groupId),{minLevel:p,maxLevel:v}=a(u,h);if(v===u.length-1)return;const m=d[v+1],g=d.splice(p,h.length);if(m.groupId){const y=d.filter(b=>b.groupId===m.groupId);d.splice(p+y.length,0,...g)}else d.splice(p+1,0,...g)}else{const h=u.findIndex(m=>m.id===f.id);if(h===u.length-1)return;const p=d[h+1],v=d.splice(h,1)[0];if(p.groupId){const m=d.filter(g=>g.groupId===p.groupId);d.splice(h+m.length,0,v)}else d.splice(h+1,0,v)}return d},o=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(g=>g.groupId===f.groupId),{minLevel:p}=a(u,h);if(p===0)return;const v=d[p-1],m=d.splice(p,h.length);if(v.groupId){const g=d.filter(y=>y.groupId===v.groupId);d.splice(p-g.length,0,...m)}else d.splice(p-1,0,...m)}else{const h=u.findIndex(m=>m.id===f.id);if(h===0)return;const p=d[h-1],v=d.splice(h,1)[0];if(p.groupId){const m=d.filter(g=>g.groupId===p.groupId);d.splice(h-m.length,0,v)}else d.splice(h-1,0,v)}return d},i=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(g=>g.groupId===f.groupId),{minLevel:p,maxLevel:v}=a(u,h);if(v===u.length-1)return null;const m=d.splice(p,h.length);d.push(...m)}else{const h=u.findIndex(p=>p.id===f.id);if(h===u.length-1)return null;d.splice(h,1),d.push(f)}return d},s=(u,f)=>{const d=JSON.parse(JSON.stringify(u));if(f.groupId){const h=d.filter(m=>m.groupId===f.groupId),{minLevel:p}=a(u,h);if(p===0)return;const v=d.splice(p,h.length);d.unshift(...v)}else{const h=u.findIndex(p=>p.id===f.id);if(h===0)return;d.splice(h,1),d.unshift(f)}return d};return{orderElement:(u,f)=>{let d;f===Yr.UP?d=r(t.value.elements,u):f===Yr.DOWN?d=o(t.value.elements,u):f===Yr.TOP?d=i(t.value.elements,u):f===Yr.BOTTOM&&(d=s(t.value.elements,u)),d&&(e.updateSlide({elements:d}),n())}}},YQ=()=>{const e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen?e.webkitRequestFullScreen():e.msRequestFullscreen&&e.msRequestFullscreen()},ime=()=>{document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},ZQ=()=>!!(document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement),Uv=()=>{const e=pY(),t=mt(),n=()=>{YQ(),e.setScreening(!0)};return{enterScreening:n,enterScreeningFromStart:()=>{t.updateSlideIndex(0),n()},exitScreening:()=>{e.setScreening(!1),ZQ()&&ime()}}},UE=()=>{const e=Tt(),{canvasPercentage:t,canvasScale:n,canvasDragged:a}=Qe(e);return{canvasScalePercentage:l.computed(()=>Math.round(n.value*100)+"%"),setCanvasScalePercentage:c=>{const u=Math.round(c/n.value*t.value)/100;e.setCanvasPercentage(u)},scaleCanvas:c=>{let u=t.value;const f=5,d=200,h=30;c==="+"&&u<=d&&(u+=f),c==="-"&&u>=h&&(u-=f),e.setCanvasPercentage(u)},resetCanvas:()=>{e.setCanvasPercentage(90),a&&e.setCanvasDragged(!1)}}},PJe=()=>{const e=Tt(),t=rl(),{activeElementIdList:n,disableHotkeys:a,handleElement:r,handleElementId:o,editorAreaFocus:i,thumbnailsFocus:s,showSearchPanel:c}=Qe(e),{currentSlide:u}=Qe(mt()),{ctrlKeyState:f,shiftKeyState:d,spaceKeyState:h}=Qe(t),{updateSlideIndex:p,copySlide:v,createSlide:m,deleteSlide:g,cutSlide:y,copyAndPasteSlide:b,selectAllSlide:R}=Vd(),{combineElements:A,uncombineElements:S}=UQ(),{deleteElement:w}=mM(),{lockElement:M}=XQ(),{copyElement:T,cutElement:N,quickCopyElement:C}=WQ(),{selectAllElements:E}=gM(),{moveElement:L}=OJe(),{orderElement:P}=yM(),{redo:O,undo:_}=mn(),{enterScreening:I,enterScreeningFromStart:D}=Uv(),{scaleCanvas:W,resetCanvas:Y}=UE(),G=()=>{n.value.length?T():s.value&&v()},F=()=>{n.value.length?N():s.value&&y()},Z=()=>{n.value.length?C():s.value&&b()},Q=()=>{i.value&&E(),s.value&&R()},H=()=>{i.value&&M()},K=()=>{i.value&&A()},te=()=>{i.value&&S()},oe=()=>{n.value.length?w():s.value&&g()},ue=ae=>{n.value.length?L(ae):(ae===Vt.UP||ae===Vt.DOWN)&&p(ae)},ke=ae=>{ae===Vt.PAGEUP?p(Vt.UP):ae===Vt.PAGEDOWN&&p(Vt.DOWN)},ve=ae=>{r.value&&P(r.value,ae)},xe=()=>{s.value&&m()},Me=()=>{if(!u.value.elements.length)return;if(!o.value){const ee=u.value.elements[0];e.setActiveElementIdList([ee.id]);return}const ae=u.value.elements.findIndex(ee=>ee.id===o.value),le=ae>=u.value.elements.length-1?0:ae+1,U=u.value.elements[le].id;e.setActiveElementIdList([U])},Oe=ae=>{const{ctrlKey:le,shiftKey:U,altKey:ee,metaKey:ie}=ae,pe=le||ie,ce=ae.key.toUpperCase();if(pe&&!f.value&&t.setCtrlKeyState(!0),U&&!d.value&&t.setShiftKeyState(!0),!a.value&&ce===Vt.SPACE&&t.setSpaceKeyState(!0),pe&&ce===Vt.P){ae.preventDefault(),e.setDialogForExport("pdf");return}if(U&&ce===Vt.F5){ae.preventDefault(),I(),t.setShiftKeyState(!1);return}if(ce===Vt.F5){ae.preventDefault(),D();return}if(le&&ce===Vt.F){ae.preventDefault(),e.setSearchPanelState(!c.value);return}if(le&&ce===Vt.MINUS){ae.preventDefault(),W("-");return}if(le&&ce===Vt.EQUAL){ae.preventDefault(),W("+");return}if(le&&ce===Vt.DIGIT_0){ae.preventDefault(),Y();return}if(!(!i.value&&!s.value)){if(pe&&ce===Vt.C){if(a.value)return;ae.preventDefault(),G()}if(pe&&ce===Vt.X){if(a.value)return;ae.preventDefault(),F()}if(pe&&ce===Vt.D){if(a.value)return;ae.preventDefault(),Z()}if(pe&&ce===Vt.Z){if(a.value)return;ae.preventDefault(),_()}if(pe&&ce===Vt.Y){if(a.value)return;ae.preventDefault(),O()}if(pe&&ce===Vt.A){if(a.value)return;ae.preventDefault(),Q()}if(pe&&ce===Vt.L){if(a.value)return;ae.preventDefault(),H()}if(!U&&pe&&ce===Vt.G){if(a.value)return;ae.preventDefault(),K()}if(U&&pe&&ce===Vt.G){if(a.value)return;ae.preventDefault(),te()}if(ee&&ce===Vt.F){if(a.value)return;ae.preventDefault(),ve(Yr.TOP)}if(ee&&ce===Vt.B){if(a.value)return;ae.preventDefault(),ve(Yr.BOTTOM)}if(ce===Vt.DELETE||ce===Vt.BACKSPACE){if(a.value)return;ae.preventDefault(),oe()}if(ce===Vt.UP){if(a.value)return;ae.preventDefault(),ue(Vt.UP)}if(ce===Vt.DOWN){if(a.value)return;ae.preventDefault(),ue(Vt.DOWN)}if(ce===Vt.LEFT){if(a.value)return;ae.preventDefault(),ue(Vt.LEFT)}if(ce===Vt.RIGHT){if(a.value)return;ae.preventDefault(),ue(Vt.RIGHT)}if(ce===Vt.PAGEUP){if(a.value)return;ae.preventDefault(),ke(Vt.PAGEUP)}if(ce===Vt.PAGEDOWN){if(a.value)return;ae.preventDefault(),ke(Vt.PAGEDOWN)}if(ce===Vt.ENTER){if(a.value)return;ae.preventDefault(),xe()}if(ce===Vt.TAB){if(a.value)return;ae.preventDefault(),Me()}i.value&&!U&&!pe&&!a.value&&(ce===Vt.T?e.setCreatingElement({type:"text"}):ce===Vt.R?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"}}):ce===Vt.O?e.setCreatingElement({type:"shape",data:{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"}}):ce===Vt.L&&e.setCreatingElement({type:"line",data:{path:"M 0 0 L 20 20",style:"solid",points:["",""]}}))}},z=()=>{f.value&&t.setCtrlKeyState(!1),d.value&&t.setShiftKeyState(!1),h.value&&t.setSpaceKeyState(!1)};l.onMounted(()=>{document.addEventListener("keydown",Oe),document.addEventListener("keyup",z),window.addEventListener("blur",z)}),l.onUnmounted(()=>{document.removeEventListener("keydown",Oe),document.removeEventListener("keyup",z),window.removeEventListener("blur",z)})},WE={"audio/aac":"aac","audio/mpeg":"mp3","audio/ogg":"oga","audio/wav":"wav","audio/webm":"weba","audio/flac":"flac","audio/mp4":"m4a","audio/x-aiff":"aif","audio/x-ms-wma":"wma","audio/midi":"mid","video/mp4":"mp4","video/mpeg":"mpeg","video/ogg":"ogv","video/webm":"webm","video/x-msvideo":"avi","video/quicktime":"mov","video/x-ms-wmv":"wmv","video/x-flv":"flv","video/3gpp":"3gp","video/3gpp2":"3g2"},sme=()=>{const{createImageElement:e,createVideoElement:t,createAudioElement:n}=Id(),{importSpecificFile:a,importPPTXFile:r}=tH();return{pasteDataTransfer:i=>{const s=i.items,c=s[0];let u=!1;for(const f of s)if(f.kind==="file"){if(f.type.indexOf("image")!==-1){const d=f.getAsFile();d&&(_d(d).then(h=>e(h)),u=!0)}else if(f.type.indexOf("video")!==-1){const d=f.getAsFile();if(d){const h=URL.createObjectURL(d),p=WE[d.type]||"";t(h,p),u=!0}}else if(f.type.indexOf("audio")!==-1){const d=f.getAsFile();if(d){const h=URL.createObjectURL(d),p=WE[d.type]||"";n(h,p),u=!0}}}if(!u&&c&&c.kind==="file"){if(!u&&c.type==="application/vnd.openxmlformats-officedocument.presentationml.presentation"){const f=c.getAsFile();f&&(r([f]),u=!0)}else if(!u){const f=c.getAsFile();f&&f.name&&(f.name.split(".").pop()||"")==="pptist"&&(a([f]),u=!0)}}return{isFile:u,dataTransferFirstItem:c}}}},_Je=()=>{const{editorAreaFocus:e,thumbnailsFocus:t,disableHotkeys:n}=Qe(Tt()),{pasteTextClipboardData:a}=zK(),{pasteDataTransfer:r}=sme(),o=i=>{if(!e.value&&!t.value||n.value||!i.clipboardData)return;const{isFile:s,dataTransferFirstItem:c}=r(i.clipboardData);s||c&&c.kind==="string"&&c.type==="text/plain"&&c.getAsString(u=>a(u))};l.onMounted(()=>{document.addEventListener("paste",o)}),l.onUnmounted(()=>{document.removeEventListener("paste",o)})},IJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function VJe(e,t){return l.openBlock(),l.createElementBlock("svg",IJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M4 8h40"}),l.createElementVNode("path",{d:"M8 8h32v26H8z","clip-rule":"evenodd"}),l.createElementVNode("path",{d:"m22 16l5 5l-5 5m-6 16l8-8l8 8"})],-1)])])}const FJe=l.markRaw({name:"icon-park-outline-ppt",render:VJe}),DJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function BJe(e,t){return l.openBlock(),l.createElementBlock("svg",DJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M6 24.008V42h36V24"}),l.createElementVNode("path",{d:"m33 23l-9 9l-9-9m8.992-17v26"})],-1)])])}const Gy=l.markRaw({name:"icon-park-outline-download",render:BJe}),XJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function UJe(e,t){return l.openBlock(),l.createElementBlock("svg",XJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linejoin":"round",d:"M39.3 6H8.7A2.7 2.7 0 0 0 6 8.7v30.6A2.7 2.7 0 0 0 8.7 42h30.6a2.7 2.7 0 0 0 2.7-2.7V8.7A2.7 2.7 0 0 0 39.3 6Z"}),l.createElementVNode("path",{"stroke-linejoin":"round",d:"M32 6v18H15V6z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M26 13v4M10.997 6H36"})],-1)])])}const WJe=l.markRaw({name:"icon-park-outline-save-one",render:UJe}),YJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function ZJe(e,t){return l.openBlock(),l.createElementBlock("svg",YJe,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M9.455 14.91h5.454V9.454a5.455 5.455 0 1 0-5.454 5.454Zm0 18.18h5.454v5.455a5.455 5.455 0 1 1-5.454-5.454Z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M14.909 14.909h18.182v18.182H14.909z"}),l.createElementVNode("path",{d:"M38.545 14.91h-5.454V9.454a5.455 5.455 0 1 1 5.454 5.454Zm0 18.18a5.455 5.455 0 1 1-5.454 5.455v-5.454z"})],-1)])])}const KJe=l.markRaw({name:"icon-park-outline-command",render:ZJe}),HJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function QJe(e,t){return l.openBlock(),l.createElementBlock("svg",HJe,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M42 8v16M6 24v16m36-16c0-9.941-8.059-18-18-18a17.95 17.95 0 0 0-12.952 5.5M6 24c0 9.941 8.059 18 18 18a17.94 17.94 0 0 0 12.5-5.048"},null,-1)])])}const zJe=l.markRaw({name:"icon-park-outline-refresh",render:QJe}),GJe={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function JJe(e,t){return l.openBlock(),l.createElementBlock("svg",GJe,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M31 36L19 24l12-12"},null,-1)])])}const lme=l.markRaw({name:"icon-park-outline-left",render:JJe}),jJe={class:"hotkey-doc"},qJe={class:"title"},$Je={class:"label"},eje={class:"value"},tje={key:1,class:"row"},nje=et(l.defineComponent({__name:"HotkeyDoc",setup(e){const{t}=In(),n=l.computed(()=>eWe(t));return(a,r)=>(l.openBlock(),l.createElementBlock("div",jJe,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.value,o=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:o.type},[l.createElementVNode("div",qJe,l.toDisplayString(o.type),1),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.children,i=>(l.openBlock(),l.createElementBlock("div",{class:"hotkey-item",key:i.label},[i.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",$Je,l.toDisplayString(i.label),1),l.createElementVNode("div",eje,l.toDisplayString(i.value),1)],64)):(l.openBlock(),l.createElementBlock("div",tje,l.toDisplayString(i.label),1))]))),128))],64))),128))]))}}),[["__scopeId","data-v-aada38d1"]]),aje=["accept"],Gd=et(l.defineComponent({__name:"FileInput",props:{accept:{default:"image/*"}},emits:["change"],setup(e,{emit:t}){const n=t,a=l.shallowRef(null),r=()=>{a.value&&(a.value.value="",a.value.click())},o=i=>{const s=i.target.files;s&&n("change",s)};return(i,s)=>(l.openBlock(),l.createElementBlock("div",{class:"file-input",onClick:s[2]||(s[2]=c=>r())},[l.renderSlot(i.$slots,"default",{},void 0,!0),l.createElementVNode("input",{class:"input",type:"file",name:"upload",ref_key:"inputRef",ref:a,accept:e.accept,onChange:s[0]||(s[0]=c=>o(c)),onClick:s[1]||(s[1]=l.withModifiers(()=>{},["stop"]))},null,40,aje)]))}}),[["__scopeId","data-v-6fb5ec10"]]),rje={class:"spin"},oje={class:"text"},sR=et(l.defineComponent({__name:"FullscreenSpin",props:{loading:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},contained:{type:Boolean,default:!1},tip:{default:""}},setup(e){return(t,n)=>e.loading?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["fullscreen-spin",{mask:e.mask,contained:e.contained}])},[l.createElementVNode("div",rje,[n[0]||(n[0]=l.createElementVNode("div",{class:"spinner"},null,-1)),l.createElementVNode("div",oje,l.toDisplayString(e.tip),1)])],2)):l.createCommentVNode("",!0)}}),[["__scopeId","data-v-342095c7"]]),ije={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function sje(e,t){return l.openBlock(),l.createElementBlock("svg",ije,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m8 8l32 32M8 40L40 8"},null,-1)])])}const Jy=l.markRaw({name:"icon-park-outline-close",render:sje}),lje={class:"header"},cje=et(l.defineComponent({__name:"Drawer",props:{visible:{type:Boolean},width:{default:320},contentStyle:{},placement:{default:"right"}},emits:["update:visible"],setup(e,{emit:t}){const n=e,a=t,r=l.ref(!1),o=l.computed(()=>({width:n.width+"px",...n.contentStyle||{}}));return(i,s)=>{const c=Jy;return l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[l.createVNode(l.Transition,{name:`drawer-slide-${e.placement}`,onAfterLeave:s[1]||(s[1]=u=>r.value=!1),onBeforeEnter:s[2]||(s[2]=u=>r.value=!0)},{default:l.withCtx(()=>[l.withDirectives(l.createElementVNode("div",{class:l.normalizeClass(["drawer",e.placement]),style:l.normalizeStyle({width:n.width+"px"})},[l.createElementVNode("div",lje,[l.renderSlot(i.$slots,"title",{},void 0,!0),l.createElementVNode("span",{class:"close-btn",onClick:s[0]||(s[0]=u=>a("update:visible",!1))},[l.createVNode(c)])]),r.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"content",style:l.normalizeStyle(o.value)},[l.renderSlot(i.$slots,"default",{},void 0,!0)],4)):l.createCommentVNode("",!0)],6),[[l.vShow,e.visible]])]),_:3},8,["name"])])}}}),[["__scopeId","data-v-ee4e3f04"]]);var pl="top",su="bottom",lu="right",vl="left",KQ="auto",bM=[pl,su,lu,vl],lR="start",AM="end",uje="clippingParents",cme="viewport",RM="popper",fje="reference",ume=bM.reduce(function(e,t){return e.concat([t+"-"+lR,t+"-"+AM])},[]),fme=[].concat(bM,[KQ]).reduce(function(e,t){return e.concat([t,t+"-"+lR,t+"-"+AM])},[]),dje="beforeRead",hje="read",pje="afterRead",vje="beforeMain",mje="main",gje="afterMain",yje="beforeWrite",bje="write",Aje="afterWrite",Rje=[dje,hje,pje,vje,mje,gje,yje,bje,Aje];function Jd(e){return e?(e.nodeName||"").toLowerCase():null}function oc(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function jy(e){var t=oc(e).Element;return e instanceof t||e instanceof Element}function cu(e){var t=oc(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function HQ(e){if(typeof ShadowRoot>"u")return!1;var t=oc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function xje(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var a=t.styles[n]||{},r=t.attributes[n]||{},o=t.elements[n];!cu(o)||!Jd(o)||(Object.assign(o.style,a),Object.keys(r).forEach(function(i){var s=r[i];s===!1?o.removeAttribute(i):o.setAttribute(i,s===!0?"":s)}))})}function Sje(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(a){var r=t.elements[a],o=t.attributes[a]||{},i=Object.keys(t.styles.hasOwnProperty(a)?t.styles[a]:n[a]),s=i.reduce(function(c,u){return c[u]="",c},{});!cu(r)||!Jd(r)||(Object.assign(r.style,s),Object.keys(o).forEach(function(c){r.removeAttribute(c)}))})}}const dme={name:"applyStyles",enabled:!0,phase:"write",fn:xje,effect:Sje,requires:["computeStyles"]};function jd(e){return e.split("-")[0]}var qy=Math.max,YE=Math.min,cR=Math.round;function QQ(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function hme(){return!/^((?!chrome|android).)*safari/i.test(QQ())}function uR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var a=e.getBoundingClientRect(),r=1,o=1;t&&cu(e)&&(r=e.offsetWidth>0&&cR(a.width)/e.offsetWidth||1,o=e.offsetHeight>0&&cR(a.height)/e.offsetHeight||1);var i=jy(e)?oc(e):window,s=i.visualViewport,c=!hme()&&n,u=(a.left+(c&&s?s.offsetLeft:0))/r,f=(a.top+(c&&s?s.offsetTop:0))/o,d=a.width/r,h=a.height/o;return{width:d,height:h,top:f,right:u+d,bottom:f+h,left:u,x:u,y:f}}function zQ(e){var t=uR(e),n=e.offsetWidth,a=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-a)<=1&&(a=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:a}}function pme(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&HQ(n)){var a=t;do{if(a&&e.isSameNode(a))return!0;a=a.parentNode||a.host}while(a)}return!1}function Bp(e){return oc(e).getComputedStyle(e)}function wje(e){return["table","td","th"].indexOf(Jd(e))>=0}function Wv(e){return((jy(e)?e.ownerDocument:e.document)||window.document).documentElement}function ZE(e){return Jd(e)==="html"?e:e.assignedSlot||e.parentNode||(HQ(e)?e.host:null)||Wv(e)}function vme(e){return!cu(e)||Bp(e).position==="fixed"?null:e.offsetParent}function Mje(e){var t=/firefox/i.test(QQ()),n=/Trident/i.test(QQ());if(n&&cu(e)){var a=Bp(e);if(a.position==="fixed")return null}var r=ZE(e);for(HQ(r)&&(r=r.host);cu(r)&&["html","body"].indexOf(Jd(r))<0;){var o=Bp(r);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return r;r=r.parentNode}return null}function xM(e){for(var t=oc(e),n=vme(e);n&&wje(n)&&Bp(n).position==="static";)n=vme(n);return n&&(Jd(n)==="html"||Jd(n)==="body"&&Bp(n).position==="static")?t:n||Mje(e)||t}function GQ(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function SM(e,t,n){return qy(e,YE(t,n))}function Nje(e,t,n){var a=SM(e,t,n);return a>n?n:a}function mme(){return{top:0,right:0,bottom:0,left:0}}function gme(e){return Object.assign({},mme(),e)}function yme(e,t){return t.reduce(function(n,a){return n[a]=e,n},{})}var Tje=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,gme(typeof t!="number"?t:yme(t,bM))};function Cje(e){var t,n=e.state,a=e.name,r=e.options,o=n.elements.arrow,i=n.modifiersData.popperOffsets,s=jd(n.placement),c=GQ(s),u=[vl,lu].indexOf(s)>=0,f=u?"height":"width";if(!(!o||!i)){var d=Tje(r.padding,n),h=zQ(o),p=c==="y"?pl:vl,v=c==="y"?su:lu,m=n.rects.reference[f]+n.rects.reference[c]-i[c]-n.rects.popper[f],g=i[c]-n.rects.reference[c],y=xM(o),b=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,R=m/2-g/2,A=d[p],S=b-h[f]-d[v],w=b/2-h[f]/2+R,M=SM(A,w,S),T=c;n.modifiersData[a]=(t={},t[T]=M,t.centerOffset=M-w,t)}}function kje(e){var t=e.state,n=e.options,a=n.element,r=a===void 0?"[data-popper-arrow]":a;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||pme(t.elements.popper,r)&&(t.elements.arrow=r))}const Lje={name:"arrow",enabled:!0,phase:"main",fn:Cje,effect:kje,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function fR(e){return e.split("-")[1]}var Eje={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Oje(e,t){var n=e.x,a=e.y,r=t.devicePixelRatio||1;return{x:cR(n*r)/r||0,y:cR(a*r)/r||0}}function bme(e){var t,n=e.popper,a=e.popperRect,r=e.placement,o=e.variation,i=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,d=e.isFixed,h=i.x,p=h===void 0?0:h,v=i.y,m=v===void 0?0:v,g=typeof f=="function"?f({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var y=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),R=vl,A=pl,S=window;if(u){var w=xM(n),M="clientHeight",T="clientWidth";if(w===oc(n)&&(w=Wv(n),Bp(w).position!=="static"&&s==="absolute"&&(M="scrollHeight",T="scrollWidth")),w=w,r===pl||(r===vl||r===lu)&&o===AM){A=su;var N=d&&w===S&&S.visualViewport?S.visualViewport.height:w[M];m-=N-a.height,m*=c?1:-1}if(r===vl||(r===pl||r===su)&&o===AM){R=lu;var C=d&&w===S&&S.visualViewport?S.visualViewport.width:w[T];p-=C-a.width,p*=c?1:-1}}var E=Object.assign({position:s},u&&Eje),L=f===!0?Oje({x:p,y:m},oc(n)):{x:p,y:m};if(p=L.x,m=L.y,c){var P;return Object.assign({},E,(P={},P[A]=b?"0":"",P[R]=y?"0":"",P.transform=(S.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",P))}return Object.assign({},E,(t={},t[A]=b?m+"px":"",t[R]=y?p+"px":"",t.transform="",t))}function Pje(e){var t=e.state,n=e.options,a=n.gpuAcceleration,r=a===void 0?!0:a,o=n.adaptive,i=o===void 0?!0:o,s=n.roundOffsets,c=s===void 0?!0:s,u={placement:jd(t.placement),variation:fR(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,bme(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,bme(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const _je={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Pje,data:{}};var KE={passive:!0};function Ije(e){var t=e.state,n=e.instance,a=e.options,r=a.scroll,o=r===void 0?!0:r,i=a.resize,s=i===void 0?!0:i,c=oc(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(f){f.addEventListener("scroll",n.update,KE)}),s&&c.addEventListener("resize",n.update,KE),function(){o&&u.forEach(function(f){f.removeEventListener("scroll",n.update,KE)}),s&&c.removeEventListener("resize",n.update,KE)}}const Vje={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ije,data:{}};var Fje={left:"right",right:"left",bottom:"top",top:"bottom"};function HE(e){return e.replace(/left|right|bottom|top/g,function(t){return Fje[t]})}var Dje={start:"end",end:"start"};function Ame(e){return e.replace(/start|end/g,function(t){return Dje[t]})}function JQ(e){var t=oc(e),n=t.pageXOffset,a=t.pageYOffset;return{scrollLeft:n,scrollTop:a}}function jQ(e){return uR(Wv(e)).left+JQ(e).scrollLeft}function Bje(e,t){var n=oc(e),a=Wv(e),r=n.visualViewport,o=a.clientWidth,i=a.clientHeight,s=0,c=0;if(r){o=r.width,i=r.height;var u=hme();(u||!u&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}return{width:o,height:i,x:s+jQ(e),y:c}}function Xje(e){var t,n=Wv(e),a=JQ(e),r=(t=e.ownerDocument)==null?void 0:t.body,o=qy(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),i=qy(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-a.scrollLeft+jQ(e),c=-a.scrollTop;return Bp(r||n).direction==="rtl"&&(s+=qy(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:i,x:s,y:c}}function qQ(e){var t=Bp(e),n=t.overflow,a=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+a)}function Rme(e){return["html","body","#document"].indexOf(Jd(e))>=0?e.ownerDocument.body:cu(e)&&qQ(e)?e:Rme(ZE(e))}function wM(e,t){var n;t===void 0&&(t=[]);var a=Rme(e),r=a===((n=e.ownerDocument)==null?void 0:n.body),o=oc(a),i=r?[o].concat(o.visualViewport||[],qQ(a)?a:[]):a,s=t.concat(i);return r?s:s.concat(wM(ZE(i)))}function $Q(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Uje(e,t){var n=uR(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function xme(e,t,n){return t===cme?$Q(Bje(e,n)):jy(t)?Uje(t,n):$Q(Xje(Wv(e)))}function Wje(e){var t=wM(ZE(e)),n=["absolute","fixed"].indexOf(Bp(e).position)>=0,a=n&&cu(e)?xM(e):e;return jy(a)?t.filter(function(r){return jy(r)&&pme(r,a)&&Jd(r)!=="body"}):[]}function Yje(e,t,n,a){var r=t==="clippingParents"?Wje(e):[].concat(t),o=[].concat(r,[n]),i=o[0],s=o.reduce(function(c,u){var f=xme(e,u,a);return c.top=qy(f.top,c.top),c.right=YE(f.right,c.right),c.bottom=YE(f.bottom,c.bottom),c.left=qy(f.left,c.left),c},xme(e,i,a));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Sme(e){var t=e.reference,n=e.element,a=e.placement,r=a?jd(a):null,o=a?fR(a):null,i=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(r){case pl:c={x:i,y:t.y-n.height};break;case su:c={x:i,y:t.y+t.height};break;case lu:c={x:t.x+t.width,y:s};break;case vl:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var u=r?GQ(r):null;if(u!=null){var f=u==="y"?"height":"width";switch(o){case lR:c[u]=c[u]-(t[f]/2-n[f]/2);break;case AM:c[u]=c[u]+(t[f]/2-n[f]/2);break}}return c}function MM(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=a===void 0?e.placement:a,o=n.strategy,i=o===void 0?e.strategy:o,s=n.boundary,c=s===void 0?uje:s,u=n.rootBoundary,f=u===void 0?cme:u,d=n.elementContext,h=d===void 0?RM:d,p=n.altBoundary,v=p===void 0?!1:p,m=n.padding,g=m===void 0?0:m,y=gme(typeof g!="number"?g:yme(g,bM)),b=h===RM?fje:RM,R=e.rects.popper,A=e.elements[v?b:h],S=Yje(jy(A)?A:A.contextElement||Wv(e.elements.popper),c,f,i),w=uR(e.elements.reference),M=Sme({reference:w,element:R,placement:r}),T=$Q(Object.assign({},R,M)),N=h===RM?T:w,C={top:S.top-N.top+y.top,bottom:N.bottom-S.bottom+y.bottom,left:S.left-N.left+y.left,right:N.right-S.right+y.right},E=e.modifiersData.offset;if(h===RM&&E){var L=E[r];Object.keys(C).forEach(function(P){var O=[lu,su].indexOf(P)>=0?1:-1,_=[pl,su].indexOf(P)>=0?"y":"x";C[P]+=L[_]*O})}return C}function Zje(e,t){t===void 0&&(t={});var n=t,a=n.placement,r=n.boundary,o=n.rootBoundary,i=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,u=c===void 0?fme:c,f=fR(a),d=f?s?ume:ume.filter(function(v){return fR(v)===f}):bM,h=d.filter(function(v){return u.indexOf(v)>=0});h.length===0&&(h=d);var p=h.reduce(function(v,m){return v[m]=MM(e,{placement:m,boundary:r,rootBoundary:o,padding:i})[jd(m)],v},{});return Object.keys(p).sort(function(v,m){return p[v]-p[m]})}function Kje(e){if(jd(e)===KQ)return[];var t=HE(e);return[Ame(e),t,Ame(t)]}function Hje(e){var t=e.state,n=e.options,a=e.name;if(!t.modifiersData[a]._skip){for(var r=n.mainAxis,o=r===void 0?!0:r,i=n.altAxis,s=i===void 0?!0:i,c=n.fallbackPlacements,u=n.padding,f=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,v=p===void 0?!0:p,m=n.allowedAutoPlacements,g=t.options.placement,y=jd(g),b=y===g,R=c||(b||!v?[HE(g)]:Kje(g)),A=[g].concat(R).reduce(function(H,K){return H.concat(jd(K)===KQ?Zje(t,{placement:K,boundary:f,rootBoundary:d,padding:u,flipVariations:v,allowedAutoPlacements:m}):K)},[]),S=t.rects.reference,w=t.rects.popper,M=new Map,T=!0,N=A[0],C=0;C<A.length;C++){var E=A[C],L=jd(E),P=fR(E)===lR,O=[pl,su].indexOf(L)>=0,_=O?"width":"height",I=MM(t,{placement:E,boundary:f,rootBoundary:d,altBoundary:h,padding:u}),D=O?P?lu:vl:P?su:pl;S[_]>w[_]&&(D=HE(D));var W=HE(D),Y=[];if(o&&Y.push(I[L]<=0),s&&Y.push(I[D]<=0,I[W]<=0),Y.every(function(H){return H})){N=E,T=!1;break}M.set(E,Y)}if(T)for(var G=v?3:1,F=function(K){var te=A.find(function(oe){var ue=M.get(oe);if(ue)return ue.slice(0,K).every(function(ke){return ke})});if(te)return N=te,"break"},Z=G;Z>0;Z--){var Q=F(Z);if(Q==="break")break}t.placement!==N&&(t.modifiersData[a]._skip=!0,t.placement=N,t.reset=!0)}}const Qje={name:"flip",enabled:!0,phase:"main",fn:Hje,requiresIfExists:["offset"],data:{_skip:!1}};function wme(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Mme(e){return[pl,lu,su,vl].some(function(t){return e[t]>=0})}function zje(e){var t=e.state,n=e.name,a=t.rects.reference,r=t.rects.popper,o=t.modifiersData.preventOverflow,i=MM(t,{elementContext:"reference"}),s=MM(t,{altBoundary:!0}),c=wme(i,a),u=wme(s,r,o),f=Mme(c),d=Mme(u);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":d})}const Gje={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:zje};function Jje(e,t,n){var a=jd(e),r=[vl,pl].indexOf(a)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,i=o[0],s=o[1];return i=i||0,s=(s||0)*r,[vl,lu].indexOf(a)>=0?{x:s,y:i}:{x:i,y:s}}function jje(e){var t=e.state,n=e.options,a=e.name,r=n.offset,o=r===void 0?[0,0]:r,i=fme.reduce(function(f,d){return f[d]=Jje(d,t.rects,o),f},{}),s=i[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[a]=i}const qje={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:jje};function $je(e){var t=e.state,n=e.name;t.modifiersData[n]=Sme({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const eqe={name:"popperOffsets",enabled:!0,phase:"read",fn:$je,data:{}};function tqe(e){return e==="x"?"y":"x"}function nqe(e){var t=e.state,n=e.options,a=e.name,r=n.mainAxis,o=r===void 0?!0:r,i=n.altAxis,s=i===void 0?!1:i,c=n.boundary,u=n.rootBoundary,f=n.altBoundary,d=n.padding,h=n.tether,p=h===void 0?!0:h,v=n.tetherOffset,m=v===void 0?0:v,g=MM(t,{boundary:c,rootBoundary:u,padding:d,altBoundary:f}),y=jd(t.placement),b=fR(t.placement),R=!b,A=GQ(y),S=tqe(A),w=t.modifiersData.popperOffsets,M=t.rects.reference,T=t.rects.popper,N=typeof m=="function"?m(Object.assign({},t.rects,{placement:t.placement})):m,C=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,L={x:0,y:0};if(w){if(o){var P,O=A==="y"?pl:vl,_=A==="y"?su:lu,I=A==="y"?"height":"width",D=w[A],W=D+g[O],Y=D-g[_],G=p?-T[I]/2:0,F=b===lR?M[I]:T[I],Z=b===lR?-T[I]:-M[I],Q=t.elements.arrow,H=p&&Q?zQ(Q):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:mme(),te=K[O],oe=K[_],ue=SM(0,M[I],H[I]),ke=R?M[I]/2-G-ue-te-C.mainAxis:F-ue-te-C.mainAxis,ve=R?-M[I]/2+G+ue+oe+C.mainAxis:Z+ue+oe+C.mainAxis,xe=t.elements.arrow&&xM(t.elements.arrow),Me=xe?A==="y"?xe.clientTop||0:xe.clientLeft||0:0,Oe=(P=E==null?void 0:E[A])!=null?P:0,z=D+ke-Oe-Me,ae=D+ve-Oe,le=SM(p?YE(W,z):W,D,p?qy(Y,ae):Y);w[A]=le,L[A]=le-D}if(s){var U,ee=A==="x"?pl:vl,ie=A==="x"?su:lu,pe=w[S],ce=S==="y"?"height":"width",de=pe+g[ee],Pe=pe-g[ie],Xe=[pl,vl].indexOf(y)!==-1,Je=(U=E==null?void 0:E[S])!=null?U:0,at=Xe?de:pe-M[ce]-T[ce]-Je+C.altAxis,St=Xe?pe+M[ce]+T[ce]-Je-C.altAxis:Pe,ge=p&&Xe?Nje(at,pe,St):SM(p?at:de,pe,p?St:Pe);w[S]=ge,L[S]=ge-pe}t.modifiersData[a]=L}}const aqe={name:"preventOverflow",enabled:!0,phase:"main",fn:nqe,requiresIfExists:["offset"]};function rqe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function oqe(e){return e===oc(e)||!cu(e)?JQ(e):rqe(e)}function iqe(e){var t=e.getBoundingClientRect(),n=cR(t.width)/e.offsetWidth||1,a=cR(t.height)/e.offsetHeight||1;return n!==1||a!==1}function sqe(e,t,n){n===void 0&&(n=!1);var a=cu(t),r=cu(t)&&iqe(t),o=Wv(t),i=uR(e,r,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!n)&&((Jd(t)!=="body"||qQ(o))&&(s=oqe(t)),cu(t)?(c=uR(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=jQ(o))),{x:i.left+s.scrollLeft-c.x,y:i.top+s.scrollTop-c.y,width:i.width,height:i.height}}function lqe(e){var t=new Map,n=new Set,a=[];e.forEach(function(o){t.set(o.name,o)});function r(o){n.add(o.name);var i=[].concat(o.requires||[],o.requiresIfExists||[]);i.forEach(function(s){if(!n.has(s)){var c=t.get(s);c&&r(c)}}),a.push(o)}return e.forEach(function(o){n.has(o.name)||r(o)}),a}function cqe(e){var t=lqe(e);return Rje.reduce(function(n,a){return n.concat(t.filter(function(r){return r.phase===a}))},[])}function uqe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function fqe(e){var t=e.reduce(function(n,a){var r=n[a.name];return n[a.name]=r?Object.assign({},r,a,{options:Object.assign({},r.options,a.options),data:Object.assign({},r.data,a.data)}):a,n},{});return Object.keys(t).map(function(n){return t[n]})}var Nme={placement:"bottom",modifiers:[],strategy:"absolute"};function Tme(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(a){return!(a&&typeof a.getBoundingClientRect=="function")})}function dqe(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,a=n===void 0?[]:n,r=t.defaultOptions,o=r===void 0?Nme:r;return function(s,c,u){u===void 0&&(u=o);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},Nme,o),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},d=[],h=!1,p={state:f,setOptions:function(y){var b=typeof y=="function"?y(f.options):y;m(),f.options=Object.assign({},o,f.options,b),f.scrollParents={reference:jy(s)?wM(s):s.contextElement?wM(s.contextElement):[],popper:wM(c)};var R=cqe(fqe([].concat(a,f.options.modifiers)));return f.orderedModifiers=R.filter(function(A){return A.enabled}),v(),p.update()},forceUpdate:function(){if(!h){var y=f.elements,b=y.reference,R=y.popper;if(Tme(b,R)){f.rects={reference:sqe(b,xM(R),f.options.strategy==="fixed"),popper:zQ(R)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(C){return f.modifiersData[C.name]=Object.assign({},C.data)});for(var A=0;A<f.orderedModifiers.length;A++){if(f.reset===!0){f.reset=!1,A=-1;continue}var S=f.orderedModifiers[A],w=S.fn,M=S.options,T=M===void 0?{}:M,N=S.name;typeof w=="function"&&(f=w({state:f,options:T,name:N,instance:p})||f)}}}},update:uqe(function(){return new Promise(function(g){p.forceUpdate(),g(f)})}),destroy:function(){m(),h=!0}};if(!Tme(s,c))return p;p.setOptions(u).then(function(g){!h&&u.onFirstUpdate&&u.onFirstUpdate(g)});function v(){f.orderedModifiers.forEach(function(g){var y=g.name,b=g.options,R=b===void 0?{}:b,A=g.effect;if(typeof A=="function"){var S=A({state:f,name:y,instance:p,options:R}),w=function(){};d.push(S||w)}})}function m(){d.forEach(function(g){return g()}),d=[]}return p}}var hqe=[Vje,eqe,_je,dme,qje,Qje,aqe,Lje,Gje],pqe=dqe({defaultModifiers:hqe}),vqe="tippy-box",Cme="tippy-content",mqe="tippy-backdrop",kme="tippy-arrow",Lme="tippy-svg-arrow",$y={passive:!0,capture:!0},Eme=function(){return document.body};function gqe(e,t){return{}.hasOwnProperty.call(e,t)}function ez(e,t,n){if(Array.isArray(e)){var a=e[t];return a??(Array.isArray(n)?n[t]:n)}return e}function tz(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Ome(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Pme(e,t){if(t===0)return e;var n;return function(a){clearTimeout(n),n=setTimeout(function(){e(a)},t)}}function yqe(e,t){var n=Object.assign({},e);return t.forEach(function(a){delete n[a]}),n}function bqe(e){return e.split(/\s+/).filter(Boolean)}function dR(e){return[].concat(e)}function _me(e,t){e.indexOf(t)===-1&&e.push(t)}function Aqe(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Rqe(e){return e.split("-")[0]}function QE(e){return[].slice.call(e)}function Ime(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function NM(){return document.createElement("div")}function TM(e){return["Element","Fragment"].some(function(t){return tz(e,t)})}function xqe(e){return tz(e,"NodeList")}function Sqe(e){return tz(e,"MouseEvent")}function wqe(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function Mqe(e){return TM(e)?[e]:xqe(e)?QE(e):Array.isArray(e)?e:QE(document.querySelectorAll(e))}function nz(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function Vme(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Nqe(e){var t,n=dR(e),a=n[0];return a!=null&&(t=a.ownerDocument)!=null&&t.body?a.ownerDocument:document}function Tqe(e,t){var n=t.clientX,a=t.clientY;return e.every(function(r){var o=r.popperRect,i=r.popperState,s=r.props,c=s.interactiveBorder,u=Rqe(i.placement),f=i.modifiersData.offset;if(!f)return!0;var d=u==="bottom"?f.top.y:0,h=u==="top"?f.bottom.y:0,p=u==="right"?f.left.x:0,v=u==="left"?f.right.x:0,m=o.top-a+d>c,g=a-o.bottom-h>c,y=o.left-n+p>c,b=n-o.right-v>c;return m||g||y||b})}function az(e,t,n){var a=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(r){e[a](r,n)})}function Fme(e,t){for(var n=t;n;){var a;if(e.contains(n))return!0;n=n.getRootNode==null||(a=n.getRootNode())==null?void 0:a.host}return!1}var qd={isTouch:!1},Dme=0;function Cqe(){qd.isTouch||(qd.isTouch=!0,window.performance&&document.addEventListener("mousemove",Bme))}function Bme(){var e=performance.now();e-Dme<20&&(qd.isTouch=!1,document.removeEventListener("mousemove",Bme)),Dme=e}function kqe(){var e=document.activeElement;if(wqe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Lqe(){document.addEventListener("touchstart",Cqe,$y),window.addEventListener("blur",kqe)}var Eqe=typeof window<"u"&&typeof document<"u",Oqe=Eqe?!!window.msCrypto:!1;function hR(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Xme(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Pqe(e){return Xme(`
285
285
  %ctippy.js
286
286
 
287
287
  %c`+Xme(e)+`
@@ -437,4 +437,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
437
437
  ${n}
438
438
  ]`}function b(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:-1,G=e[t]==="\\";if(G&&(t++,G=!0),b_(e[t])){const F=N5e(e[t])?N5e:T5e(e[t])?T5e:dee(e[t])?dee:M5e,Z=t,Q=n.length;let H='"';for(t++;;){if(t>=e.length){const K=N(t-1);return!W&&y_(e.charAt(K))?(t=Z,n=n.substring(0,Q),b(!0)):(H=Hf(H,'"'),n+=H,!0)}if(t===Y)return H=Hf(H,'"'),n+=H,!0;if(F(e[t])){const K=t,te=H.length;if(H+='"',t++,n+=H,i(!1),W||t>=e.length||y_(e[t])||b_(e[t])||i2(e[t]))return R(),!0;const oe=N(K-1),ue=e.charAt(oe);if(ue===",")return t=Z,n=n.substring(0,Q),b(!1,oe);if(y_(ue))return t=Z,n=n.substring(0,Q),b(!0);n=n.substring(0,Q),t=K+1,H=`${H.substring(0,te)}\\${H.substring(te)}`}else if(W&&S5e(e[t])){if(e[t-1]===":"&&R5e.test(e.substring(Z+1,t+2)))for(;t<e.length&&x5e.test(e[t]);)H+=e[t],t++;return H=Hf(H,'"'),n+=H,R(),!0}else if(e[t]==="\\"){const K=e.charAt(t+1);if(sVt[K]!==void 0)H+=e.slice(t,t+2),t+=2;else if(K==="u"){let oe=2;for(;oe<6&&q7t(e[t+oe]);)oe++;oe===6?(H+=e.slice(t,t+6),t+=6):t+oe>=e.length?t=e.length:D()}else H+=K,t+=2}else{const K=e.charAt(t);K==='"'&&e[t-1]!=="\\"?(H+=`\\${K}`,t++):tVt(K)?(H+=iVt[K],t++):($7t(K)||L(K),H+=K,t++)}G&&p()}}return!1}function R(){let W=!1;for(i();e[t]==="+";){W=!0,t++,i(),n=_N(n,'"',!0);const Y=n.length;b()?n=rVt(n,Y,1):n=Hf(n,'"')}return W}function A(){const W=t;if(e[t]==="-"){if(t++,C())return E(W),!0;if(!i2(e[t]))return t=W,!1}for(;i2(e[t]);)t++;if(e[t]==="."){if(t++,C())return E(W),!0;if(!i2(e[t]))return t=W,!1;for(;i2(e[t]);)t++}if(e[t]==="e"||e[t]==="E"){if(t++,(e[t]==="-"||e[t]==="+")&&t++,C())return E(W),!0;if(!i2(e[t]))return t=W,!1;for(;i2(e[t]);)t++}if(!C())return t=W,!1;if(t>W){const Y=e.slice(W,t),G=/^0\d/.test(Y);return n+=G?`"${Y}"`:Y,!0}return!1}function S(){return w("true","true")||w("false","false")||w("null","null")||w("True","true")||w("False","false")||w("None","null")}function w(W,Y){return e.slice(t,t+W.length)===W?(n+=Y,t+=W.length,!0):!1}function M(W){const Y=t;if(b5e(e[t])){for(;t<e.length&&A5e(e[t]);)t++;let G=t;for(;s2(e,G);)G++;if(e[G]==="(")return t=G+1,o(),e[t]===")"&&(t++,e[t]===";"&&t++),!0}for(;t<e.length&&!S5e(e[t])&&!b_(e[t])&&(!W||e[t]!==":");)t++;if(e[t-1]===":"&&R5e.test(e.substring(Y,t+2)))for(;t<e.length&&x5e.test(e[t]);)t++;if(t>Y){for(;s2(e,t-1)&&t>0;)t--;const G=e.slice(Y,t);return n+=G==="undefined"?"null":JSON.stringify(G),e[t]==='"'&&t++,!0}}function T(){if(e[t]==="/"){const W=t;for(t++;t<e.length&&(e[t]!=="/"||e[t-1]==="\\");)t++;return t++,n+=JSON.stringify(e.substring(W,t)),!0}}function N(W){let Y=W;for(;Y>0&&s2(e,Y);)Y--;return Y}function C(){return t>=e.length||y_(e[t])||s2(e,t)}function E(W){n+=`${e.slice(W,t)}0`}function L(W){throw new Bx(`Invalid character ${JSON.stringify(W)}`,t)}function P(){throw new Bx(`Unexpected character ${JSON.stringify(e[t])}`,t)}function O(){throw new Bx("Unexpected end of json string",e.length)}function _(){throw new Bx("Object key expected",t)}function I(){throw new Bx("Colon expected",t)}function D(){const W=e.slice(t,t+6);throw new Bx(`Invalid unicode character "${W}"`,t)}}function cVt(e,t){return e[t]==="*"&&e[t+1]==="/"}const uVt=()=>{const e=mt(),{addSlidesFromData:t}=NA(),{isEmptySlide:n}=Vd(),a=l.ref([]),r=l.ref(0),o=l.ref(null),i=(g,y)=>g.type==="text"&&g.textType===y||g.type==="shape"&&g.text&&g.text.type===y,s=(g,y,b)=>{if(y===1){const S=g.filter(w=>{const M=w.elements.filter(C=>i(C,b)),T=w.elements.filter(C=>i(C,"title")),N=w.elements.filter(C=>i(C,"content"));return!M.length&&T.length===1&&N.length===1});if(S.length)return S}let R=null;const A=g.filter(S=>S.elements.filter(M=>i(M,b)).length>=y);if(A.length===0){const S=g.sort((w,M)=>{const T=w.elements.filter(C=>i(C,b)).length,N=M.elements.filter(C=>i(C,b)).length;return T-N});R=S[S.length-1]}else R=A.reduce((S,w)=>{const M=w.elements.filter(N=>i(N,b)).length,T=S.elements.filter(N=>i(N,b)).length;return M-y<=T-y?w:S});return g.filter(S=>{const w=S.elements.filter(T=>i(T,b)).length,M=R.elements.filter(T=>i(T,b)).length;return w===M})},c=({text:g,fontSize:y,fontFamily:b,width:R,height:A,lineHeight:S,maxLine:w})=>{const T=document.createElement("canvas").getContext("2d");let N=y;const C=10;for(;N>=C;){T.font=`${N}px ${b}`;const E=T.measureText(g).width,L=Math.ceil(E/R);if(w>1&&A){const O=Math.max(N,16)*(N<15?1.2:S)*1.2;if(L*O<=A)return N}if(L<=w)return N;const P=N<=22?1:2;N=N-P}return C},u=g=>{const y=/font-size:\s*(\d+(?:\.\d+)?)\s*px/i,b=/font-family:\s*['"]?([^'";]+)['"]?\s*(?=;|>|$)/i,R={fontSize:16,fontFamily:"Microsoft Yahei"},A=g.match(y),S=g.match(b);return{fontSize:A?+A[1].trim():R.fontSize,fontFamily:S?S[1].trim():R.fontFamily}},f=({el:g,text:y,maxLine:b,longestText:R,digitPadding:A})=>{var I;const w=g.width-20-2,M=g.height-10*2-2,T=g.type==="text"?g.lineHeight||1.5:1.2;let N=g.type==="text"?g.content:g.text.content;const C=u(N),E=c({text:R||y,fontSize:C.fontSize,fontFamily:C.fontFamily,width:w,height:M,lineHeight:T,maxLine:b}),P=new DOMParser().parseFromString(N,"text/html"),O=document.createTreeWalker(P.body,NodeFilter.SHOW_TEXT),_=O.nextNode();if(_){A&&_.textContent&&_.textContent.length===2&&y.length===1?_.textContent="0"+y:_.textContent=y;let D;for(;D=O.nextNode();)(I=D.parentNode)==null||I.removeChild(D)}if(P.body.innerHTML.indexOf("font-size")===-1){const D=P.querySelector("p");D&&(D.style.fontSize="16px")}return N=P.body.innerHTML.replace(/font-size:(.+?)px/g,`font-size: ${E}px`),g.type==="text"?{...g,content:N,lineHeight:E<15?1.2:g.lineHeight}:{...g,text:{...g.text,content:N}}},d=g=>{let y=null,b=[];return g.width===g.height?b=a.value.filter(R=>R.width===R.height):g.width>g.height?b=a.value.filter(R=>R.width>R.height):b=a.value.filter(R=>R.width<=R.height),b.length||(b=a.value),y=b[Math.floor(Math.random()*b.length)],a.value=a.value.filter(R=>R.id!==y.id),y},h=g=>{const y=d(g);if(!y)return g;let b=1,R=g.width,A=g.height,S=[[0,0],[0,0]];const w=g.width/g.height;if(y.width/y.height>=w){b=y.height/g.height,R=y.width/b;const C=(R-g.width)/2/R*100;S=[[C,0],[100-C,100]]}else{b=y.width/g.width,A=y.height/b;const C=(A-g.height)/2/A*100;S=[[0,C],[100,100-C]]}const M=g.clip&&g.clip.shape?g.clip.shape:"rect",T={range:S,shape:M},N=y.src;return{...g,src:N,clip:T}};return{presetImgPool:g=>{a.value=g},AIPPT:(g,y,b)=>{e.updateSlideIndex(e.slides.length-1),b&&(a.value=b);const R=[];for(const C of y)if(C.type==="content"){const E=C.data.items;if(E.length===5||E.length===6){const L=E.slice(0,3),P=E.slice(3);R.push({...C,data:{...C.data,items:L}}),R.push({...C,data:{...C.data,items:P},offset:3})}else if(E.length===7||E.length===8){const L=E.slice(0,4),P=E.slice(4);R.push({...C,data:{...C.data,items:L}}),R.push({...C,data:{...C.data,items:P},offset:4})}else if(E.length===9||E.length===10){const L=E.slice(0,3),P=E.slice(3,6),O=E.slice(6);R.push({...C,data:{...C.data,items:L}}),R.push({...C,data:{...C.data,items:P},offset:3}),R.push({...C,data:{...C.data,items:O},offset:6})}else if(E.length>10){const L=E.slice(0,4),P=E.slice(4,8),O=E.slice(8);R.push({...C,data:{...C.data,items:L}}),R.push({...C,data:{...C.data,items:P},offset:4}),R.push({...C,data:{...C.data,items:O},offset:8})}else R.push(C)}else if(C.type==="contents"){const E=C.data.items;if(E.length===11){const L=E.slice(0,6),P=E.slice(6);R.push({...C,data:{...C.data,items:L}}),R.push({...C,data:{...C.data,items:P},offset:6})}else if(E.length>11){const L=E.slice(0,10),P=E.slice(10);R.push({...C,data:{...C.data,items:L}}),R.push({...C,data:{...C.data,items:P},offset:10})}else R.push(C)}else R.push(C);const A=g.filter(C=>C.type==="cover"),S=g.filter(C=>C.type==="contents"),w=g.filter(C=>C.type==="transition"),M=g.filter(C=>C.type==="content"),T=g.filter(C=>C.type==="end");if(!o.value){const C=w[Math.floor(Math.random()*w.length)];o.value=C}const N=[];for(const C of R)if(C.type==="cover"){const E=A[Math.floor(Math.random()*A.length)],L=E.elements.map(P=>P.type==="image"&&P.imageType&&a.value.length?h(P):P.type!=="text"&&P.type!=="shape"?P:i(P,"title")&&C.data.title?f({el:P,text:C.data.title,maxLine:1}):i(P,"content")&&C.data.text?f({el:P,text:C.data.text,maxLine:3}):P);N.push({...E,id:an(10),elements:L})}else if(C.type==="contents"){const E=s(S,C.data.items.length,"item"),L=E[Math.floor(Math.random()*E.length)],P=L.elements.filter(F=>i(F,"itemNumber")),O=P.sort((F,Z)=>{if(P.length>6){let K="",te="";if(F.type==="text"&&(K=F.content),F.type==="shape"&&(K=F.text.content),Z.type==="text"&&(te=Z.content),Z.type==="shape"&&(te=Z.text.content),K&&te){const oe=parseInt(K),ue=parseInt(te);return oe-ue}}const Q=F.left+F.top*2,H=Z.left+Z.top*2;return Q-H}).map(F=>F.id),_=L.elements.filter(F=>i(F,"item")),I=_.sort((F,Z)=>{if(_.length>6){const K=P.find(oe=>oe.groupId===F.groupId),te=P.find(oe=>oe.groupId===Z.groupId);if(K&&te){let oe="",ue="";if(K.type==="text"&&(oe=K.content),K.type==="shape"&&(oe=K.text.content),te.type==="text"&&(ue=te.content),te.type==="shape"&&(ue=te.text.content),oe&&ue){const ke=parseInt(oe),ve=parseInt(ue);return ke-ve}}}const Q=F.left+F.top*2,H=Z.left+Z.top*2;return Q-H}).map(F=>F.id),D=C.data.items.reduce((F,Z)=>Z.length>F.length?Z:F,""),W=[],Y=[],G=L.elements.map(F=>{if(F.type==="image"&&F.imageType&&a.value.length)return h(F);if(F.type!=="text"&&F.type!=="shape")return F;if(i(F,"item")){const Z=I.findIndex(H=>H===F.id),Q=C.data.items[Z];if(Q)return f({el:F,text:Q,maxLine:1,longestText:D});W.push(F.id),F.groupId&&Y.push(F.groupId)}if(i(F,"itemNumber")){const Z=O.findIndex(H=>H===F.id),Q=C.offset||0;return f({el:F,text:Z+Q+1+"",maxLine:1,digitPadding:!0})}return F}).filter(F=>!W.includes(F.id)&&!(F.groupId&&Y.includes(F.groupId)));N.push({...L,id:an(10),elements:G})}else if(C.type==="transition"){r.value=r.value+1;const E=o.value.elements.map(L=>L.type==="image"&&L.imageType&&a.value.length?h(L):L.type!=="text"&&L.type!=="shape"?L:i(L,"title")&&C.data.title?f({el:L,text:C.data.title,maxLine:1}):i(L,"content")&&C.data.text?f({el:L,text:C.data.text,maxLine:3}):i(L,"partNumber")?f({el:L,text:r.value+"",maxLine:1,digitPadding:!0}):L);N.push({...o.value,id:an(10),elements:E})}else if(C.type==="content"){const E=s(M,C.data.items.length,"item"),L=E[Math.floor(Math.random()*E.length)],P=L.elements.filter(F=>i(F,"itemTitle")).sort((F,Z)=>{const Q=F.left+F.top*2,H=Z.left+Z.top*2;return Q-H}).map(F=>F.id),O=L.elements.filter(F=>i(F,"item")).sort((F,Z)=>{const Q=F.left+F.top*2,H=Z.left+Z.top*2;return Q-H}).map(F=>F.id),_=L.elements.filter(F=>i(F,"itemNumber")).sort((F,Z)=>{const Q=F.left+F.top*2,H=Z.left+Z.top*2;return Q-H}).map(F=>F.id),I=[],D=[];for(const F of C.data.items)F.title&&I.push(F.title),F.text&&D.push(F.text);const W=I.reduce((F,Z)=>Z.length>F.length?Z:F,""),Y=D.reduce((F,Z)=>Z.length>F.length?Z:F,""),G=L.elements.map(F=>{if(F.type==="image"&&F.imageType&&a.value.length)return h(F);if(F.type!=="text"&&F.type!=="shape")return F;if(C.data.items.length===1){const Z=C.data.items[0];if(i(F,"content")&&Z.text)return f({el:F,text:Z.text,maxLine:6})}else{if(i(F,"itemTitle")){const Z=P.findIndex(H=>H===F.id),Q=C.data.items[Z];if(Q&&Q.title)return f({el:F,text:Q.title,longestText:W,maxLine:1})}if(i(F,"item")){const Z=O.findIndex(H=>H===F.id),Q=C.data.items[Z];if(Q&&Q.text)return f({el:F,text:Q.text,longestText:Y,maxLine:4})}if(i(F,"itemNumber")){const Z=_.findIndex(H=>H===F.id),Q=C.offset||0;return f({el:F,text:Z+Q+1+"",maxLine:1,digitPadding:!0})}}return i(F,"title")&&C.data.title?f({el:F,text:C.data.title,maxLine:1}):F});N.push({...L,id:an(10),elements:G})}else if(C.type==="end"){const E=T[Math.floor(Math.random()*T.length)],L=E.elements.map(P=>P.type==="image"&&P.imageType&&a.value.length?h(P):P);N.push({...E,id:an(10),elements:L})}n.value?e.setSlides(N):t(N)},getMdContent:g=>{const y=/```markdown([^```]*)```/,b=g.match(y);return b?b[1].trim():g.replace("```markdown","").replace("```","")}}},fVt={class:"pptist-outline-editor"},dVt=["data-lv","data-id"],hVt=["onClick"],pVt={class:"flag"},vVt={key:0,class:"flag-label"},mVt={key:1,class:"flag-label"},gVt={key:2,class:"flag-label"},yVt=l.defineComponent({__name:"OutlineEditor",props:{value:{}},emits:["update:value"],setup(e,{emit:t}){const{t:n}=In(),a=e,r=t,o=l.ref([]),i=l.ref("");l.watch(o,()=>{let v="";const m="#",g="-";for(const y of o.value)y.lv!==1&&(v+=`
439
439
  `),y.title?v+=`${m.repeat(y.lv)} ${y.content}`:v+=`${g} ${y.content}`;r("update:value",v)}),l.onMounted(()=>{const v=a.value.split(`
440
- `),m=[];for(const g of v){if(!g.trim())continue;const y=g.match(/^(#+)\s*(.*)/),b=g.match(/^-\s*(.*)/);if(y){const R=y[1].length,A=y[2];m.push({id:an(),content:A,title:!0,lv:R})}else if(b){const R=b[1];m.push({id:an(),content:R,lv:4})}else m.push({id:an(),content:g.trim(),lv:4})}o.value=m});const s=v=>{i.value=v,l.nextTick(()=>{document.querySelector(".editable-text input").focus()})},c=(v,m)=>{i.value="";const g=v.target.value;o.value=o.value.map(y=>y.id===m.id?{...y,content:g}:y)},u=(v,m)=>{if(v.target.value&&(i.value="",!m.title)){const y=o.value.findIndex(R=>R.id===m.id),b=an();o.value.splice(y+1,0,{id:b,content:"",lv:4}),l.nextTick(()=>{s(b)})}},f=(v,m)=>{m.title||v.target.value||h(m.id)},d=(v,m,g)=>{const y=o.value.findIndex(M=>M.id===v),b=o.value[y];if(!b)return;const R=an();let A=4,S=0,w=!1;m==="prev"?S=y:S=y+1,b.lv===1?A=2:b.lv===2?m==="prev"?A=2:A=3:b.lv===3&&m==="prev"?A=3:A=4,A<4&&(w=!0),o.value.splice(S,0,{id:R,content:g,lv:A,title:w})},h=(v,m)=>{if(m){const g=o.value.findIndex(R=>R.id===v),y=[v],b=o.value[g];for(let R=g+1;R<o.value.length;R++){const A=o.value[R];if(A&&A.lv>b.lv)y.push(A.id);else break}o.value=o.value.filter(R=>!y.includes(R.id))}else o.value=o.value.filter(g=>g.id!==v)},p=v=>{const m=+v.dataset.lv,g=v.dataset.id;return m===1?[{text:n("outlineEditor.addChildChapter"),handler:()=>d(g,"next",n("outlineEditor.newChapter"))}]:m===2?[{text:n("outlineEditor.addSiblingChapterAbove"),handler:()=>d(g,"prev",n("outlineEditor.newChapter"))},{text:n("outlineEditor.addChildSection"),handler:()=>d(g,"next",n("outlineEditor.newSection"))},{text:n("outlineEditor.deleteChapter"),handler:()=>h(g,!0)}]:m===3?[{text:n("outlineEditor.addSiblingSectionAbove"),handler:()=>d(g,"prev",n("outlineEditor.newSection"))},{text:n("outlineEditor.addChildItem"),handler:()=>d(g,"next",n("outlineEditor.newItem"))},{text:n("outlineEditor.deleteSection"),handler:()=>h(g,!0)}]:[{text:n("outlineEditor.addSiblingItemAbove"),handler:()=>d(g,"prev",n("outlineEditor.newItem"))},{text:n("outlineEditor.addSiblingItemBelow"),handler:()=>d(g,"next",n("outlineEditor.newItem"))},{text:n("outlineEditor.deleteItem"),handler:()=>h(g)}]};return(v,m)=>{const g=l.resolveDirective("contextmenu");return l.openBlock(),l.createElementBlock("div",fVt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,y=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["item",[{title:y.title},`lv-${y.lv}`]]),key:y.id,"data-lv":y.lv,"data-id":y.id},[i.value===y.id?(l.openBlock(),l.createBlock(Up,{key:0,class:"editable-text",value:y.content,onBlur:b=>c(b,y),onEnter:b=>u(b,y),onBackspace:b=>f(b,y)},null,8,["value","onBlur","onEnter","onBackspace"])):(l.openBlock(),l.createElementBlock("div",{key:1,class:"text",onClick:b=>s(y.id)},l.toDisplayString(y.content),9,hVt)),l.createElementVNode("div",pVt,[y.lv===1?(l.openBlock(),l.createElementBlock("span",vVt,l.toDisplayString(v.$t("outlineEditor.topic")),1)):y.lv===2?(l.openBlock(),l.createElementBlock("span",mVt,l.toDisplayString(v.$t("outlineEditor.chapter")),1)):y.lv===3?(l.openBlock(),l.createElementBlock("span",gVt,l.toDisplayString(v.$t("outlineEditor.section")),1)):l.createCommentVNode("",!0)])],10,dVt)),[[g,p]])),128))])}}}),bVt={class:"aippt-dialog"},AVt={class:"header"},RVt={key:0,class:"subtite"},xVt={key:1,class:"subtite"},SVt={key:2,class:"subtite"},wVt={class:"count"},MVt={class:"recommends"},NVt=["onClick"],TVt={class:"configs"},CVt={class:"config-item"},kVt={class:"label"},LVt={class:"config-item"},EVt={class:"label"},OVt={class:"config-item"},PVt={class:"label"},_Vt={class:"config-item"},IVt={class:"label"},VVt={key:0,class:"configs"},FVt={class:"config-item"},DVt={key:1,class:"preview"},BVt={key:1,class:"outline-view"},XVt={key:2,class:"btns"},UVt={key:2,class:"select-template"},WVt={class:"templates"},YVt=["onClick"],ZVt=["src","alt"],KVt={class:"btns"},C5e=et(l.defineComponent({__name:"AIPPTDialog",setup(e){const{t}=In(),n=Tt(),a=mt(),{templates:r}=Qe(a),{resetSlides:o,isEmptySlide:i}=Vd(),{AIPPT:s,presetImgPool:c,getMdContent:u}=uVt(),f=l.ref("zh-CN"),d=l.ref("general"),h=l.ref(""),p=l.ref(""),v=l.ref(""),m=l.ref("template_1"),g=l.ref(!1),y=l.ref(!1),b=l.ref(!0),R=l.ref("setup"),A=l.ref("glm-4.7-flash"),S=l.shallowRef(null),w=l.shallowRef(null),M=l.computed(()=>[{label:t("aiDialog.chinese"),value:"zh-CN"},{label:t("aiDialog.english"),value:"English"},{label:t("aiDialog.japanese"),value:"日本語"}]),T=l.computed(()=>[{label:t("aiDialog.general"),value:"通用"},{label:t("aiDialog.academic"),value:"学术风"},{label:t("aiDialog.professional"),value:"职场风"},{label:t("aiDialog.educational"),value:"教育风"},{label:t("aiDialog.marketing"),value:"营销风"}]),N=l.computed(()=>[{label:t("aiDialog.none"),value:""},{label:t("aiDialog.mockTest"),value:"test"},{label:t("aiDialog.aiSearch"),value:"ai-search",disabled:!0},{label:t("aiDialog.aiGenerate"),value:"ai-create",disabled:!0}]),C=l.computed(()=>[t("aiDialog.recommendTopics.tech2025"),t("aiDialog.recommendTopics.bigData"),t("aiDialog.recommendTopics.catering"),t("aiDialog.recommendTopics.aigcEducation"),t("aiDialog.recommendTopics.socialMedia"),t("aiDialog.recommendTopics.fiveG"),t("aiDialog.recommendTopics.workSummary"),t("aiDialog.recommendTopics.blockchain"),t("aiDialog.recommendTopics.careerPlan"),t("aiDialog.recommendTopics.annualMeeting")]);l.onMounted(()=>{setTimeout(()=>{w.value.focus()},500)});const E=_=>{p.value=_,w.value.focus()},L=async()=>{if(!p.value)return rn.error(t("aiDialog.inputThemeFirst"));g.value=!0,y.value=!0;const _=await xx.AIPPT_Outline({content:p.value,language:f.value,model:A.value});if(typeof _=="object"&&_.state===-1)return g.value=!1,rn.error(t("aiDialog.apiOverload"));g.value=!1,R.value="outline";const I=_.body.getReader(),D=new TextDecoder("utf-8"),W=()=>{I.read().then(({done:Y,value:G})=>{if(Y){v.value=u(v.value),v.value=v.value.replace(/<!--[\s\S]*?-->/g,""),y.value=!1;return}const F=D.decode(G,{stream:!0});v.value+=F,S.value&&(S.value.scrollTop=S.value.scrollHeight+20),W()})};W()},P=async _=>{g.value=!0,n.setAIPPTDialogState("running"),rn.loading(t("aiDialog.creatingSlides"),{duration:0}),b.value&&o();const I=await xx.AIPPT({content:v.value,language:f.value,style:d.value,model:A.value});if(typeof I=="object"&&I.state===-1)return g.value=!1,rn.closeAll(),n.setAIPPTDialogState(!0),rn.error(t("aiDialog.apiOverload"));if(h.value==="test"){const H=await xx.getMockData("imgs");c(H)}let D=_;D||(D=await xx.getMockData(m.value));const W=D.slides,Y=D.theme,G=I.body.getReader(),F=new TextDecoder("utf-8"),Z=()=>{G.read().then(({done:H,value:K})=>{if(H){g.value=!1,rn.closeAll(),n.setAIPPTDialogState(!1),a.setTheme(Y);return}const oe=F.decode(K,{stream:!0}).split(/\n+/);for(const ue of oe)ue&&Q(ue);Z()})},Q=H=>{try{const K=H.replace("```jsonl","").replace("```json","").replace("```","").trim();if(K){const te=JSON.parse(lVt(K));s(W,[te])}}catch(K){console.error(K)}};Z()},O=()=>{const _=document.createElement("input");_.type="file",_.accept=".pptist",_.click(),_.addEventListener("change",I=>{var W;const D=(W=I.target.files)==null?void 0:W[0];if(D){const Y=new FileReader;Y.addEventListener("load",()=>{try{const{slides:G,theme:F}=JSON.parse(XK(Y.result));P({slides:G,theme:F})}catch{rn.error(t("aiDialog.templateError"))}}),Y.readAsText(D)}})};return(_,I)=>{const D=Z7t,W=l.resolveDirective("tooltip");return l.openBlock(),l.createElementBlock("div",bVt,[l.createElementVNode("div",AVt,[I[14]||(I[14]=l.createElementVNode("span",{class:"title"},"AIPPT",-1)),R.value==="template"?(l.openBlock(),l.createElementBlock("span",RVt,[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.step1Prefix")),1),l.withDirectives((l.openBlock(),l.createElementBlock("span",{class:"local",onClick:I[0]||(I[0]=Y=>O())},[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.step1Link")),1)])),[[W,_.$t("aiDialog.step1Tooltip")]])])):R.value==="outline"?(l.openBlock(),l.createElementBlock("span",xVt,l.toDisplayString(_.$t("aiDialog.step2")),1)):(l.openBlock(),l.createElementBlock("span",SVt,l.toDisplayString(_.$t("aiDialog.step3")),1))]),R.value==="setup"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(Up,{class:"input",ref_key:"inputRef",ref:w,value:p.value,"onUpdate:value":I[2]||(I[2]=Y=>p.value=Y),maxlength:50,placeholder:_.$t("aiDialog.inputPlaceholder"),onEnter:I[3]||(I[3]=Y=>L())},{suffix:l.withCtx(()=>[l.createElementVNode("span",wVt,l.toDisplayString(p.value.length)+" / 50",1),l.createElementVNode("div",{class:"submit",type:"primary",onClick:I[1]||(I[1]=Y=>L())},[l.createVNode(D,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(_.$t("aiDialog.aiGenerateBtn")),1)])]),_:1},8,["value","placeholder"]),l.createElementVNode("div",MVt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,(Y,G)=>(l.openBlock(),l.createElementBlock("div",{class:"recommend",key:G,onClick:F=>E(Y)},l.toDisplayString(Y),9,NVt))),128))]),l.createElementVNode("div",TVt,[l.createElementVNode("div",CVt,[l.createElementVNode("div",kVt,l.toDisplayString(_.$t("aiDialog.language")),1),l.createVNode(er,{class:"config-content",style:{width:"80px"},value:f.value,"onUpdate:value":I[4]||(I[4]=Y=>f.value=Y),options:M.value},null,8,["value","options"])]),l.createElementVNode("div",LVt,[l.createElementVNode("div",EVt,l.toDisplayString(_.$t("aiDialog.style")),1),l.createVNode(er,{class:"config-content",style:{width:"80px"},value:d.value,"onUpdate:value":I[5]||(I[5]=Y=>d.value=Y),options:T.value},null,8,["value","options"])]),l.createElementVNode("div",OVt,[l.createElementVNode("div",PVt,l.toDisplayString(_.$t("aiDialog.model")),1),l.createVNode(er,{class:"config-content",style:{width:"190px"},value:A.value,"onUpdate:value":I[6]||(I[6]=Y=>A.value=Y),options:[{label:"GLM-4.7-Flash",value:"glm-4.7-flash"},{label:"Doubao-Seed-1.6-Flash",value:"doubao-seed-1.6-flash"}]},null,8,["value"])]),l.createElementVNode("div",_Vt,[l.createElementVNode("div",IVt,l.toDisplayString(_.$t("aiDialog.illustration")),1),l.createVNode(er,{class:"config-content",style:{width:"100px"},value:h.value,"onUpdate:value":I[7]||(I[7]=Y=>h.value=Y),options:N.value},null,8,["value","options"])])]),l.unref(i)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",VVt,[l.createElementVNode("div",FVt,[l.createVNode(a2,{value:b.value,"onUpdate:value":I[8]||(I[8]=Y=>b.value=Y)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.overwriteSlides")),1)]),_:1},8,["value"])])]))],64)):l.createCommentVNode("",!0),R.value==="outline"?(l.openBlock(),l.createElementBlock("div",DVt,[y.value?(l.openBlock(),l.createElementBlock("pre",{key:0,ref_key:"outlineRef",ref:S},l.toDisplayString(v.value),513)):(l.openBlock(),l.createElementBlock("div",BVt,[l.createVNode(yVt,{value:v.value,"onUpdate:value":I[9]||(I[9]=Y=>v.value=Y)},null,8,["value"])])),y.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",XVt,[l.createVNode(vt,{class:"btn",type:"primary",onClick:I[10]||(I[10]=Y=>R.value="template")},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.selectTemplate")),1)]),_:1}),l.createVNode(vt,{class:"btn",onClick:I[11]||(I[11]=Y=>{v.value="",R.value="setup"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.regenerate")),1)]),_:1})]))])):l.createCommentVNode("",!0),R.value==="template"?(l.openBlock(),l.createElementBlock("div",UVt,[l.createElementVNode("div",WVt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),Y=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["template",{selected:m.value===Y.id}]),key:Y.id,onClick:G=>m.value=Y.id},[l.createElementVNode("img",{src:Y.cover,alt:Y.name},null,8,ZVt)],10,YVt))),128))]),l.createElementVNode("div",KVt,[l.createVNode(vt,{class:"btn",type:"primary",onClick:I[12]||(I[12]=Y=>P())},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.generate")),1)]),_:1}),l.createVNode(vt,{class:"btn",onClick:I[13]||(I[13]=Y=>R.value="outline")},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.backToOutline")),1)]),_:1})])])):l.createCommentVNode("",!0),l.createVNode(sR,{loading:g.value,tip:_.$t("aiDialog.generating")},null,8,["loading","tip"])])}}}),[["__scopeId","data-v-1ca7c544"]]),HVt={class:"pptist-editor"},QVt={class:"layout-content-center"},zVt=et(l.defineComponent({__name:"index",props:{saving:{type:Boolean}},setup(e){const t=e,n=Tt(),{dialogForExport:a,showSelectPanel:r,showSearchPanel:o,showNotesPanel:i,showSymbolPanel:s,showMarkupPanel:c,showImageLibPanel:u,showAIPPTDialog:f}=Qe(n),d=()=>n.setDialogForExport(""),h=()=>n.setAIPPTDialogState(!1),p=l.inject(fre,null),v=p?null:ome(),m=p??v.savePresentation,g=(v==null?void 0:v.saveSlides)??l.ref([]),y=(v==null?void 0:v.saving)??l.computed(()=>t.saving??!1),b=(v==null?void 0:v.saveRendererVisible)??l.ref(!1),R=(v==null?void 0:v.offscreenCoverRef)??l.ref(null);l.ref(40);const A=l.inject("__lt_ppt_mode__",l.ref("mini")),S=l.computed(()=>A.value==="mini"),w=l.computed(()=>S.value?"100%":"calc(100% - 40px)");return l.provide("__lt_ppt_mode__",A),l.watch(S,M=>{M&&n.setThumbnailsFocus(!1)},{immediate:!0}),PJe(),_Je(),(M,T)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",HVt,[S.value?(l.openBlock(),l.createBlock(Oht,{key:1,class:"layout-mini-toolbar",onSave:l.unref(m)},null,8,["onSave"])):(l.openBlock(),l.createBlock(Jqe,{key:0,class:"layout-header",onSave:l.unref(m)},null,8,["onSave"])),l.createElementVNode("div",{class:l.normalizeClass(["layout-content",{"is-mini":S.value}])},[S.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock($Rt,{key:0,class:"layout-content-left"})),l.createElementVNode("div",QVt,[S.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Pbt,{key:0,class:"center-top"})),l.createVNode(Z1t,{class:"center-body",style:l.normalizeStyle({height:w.value})},null,8,["style"])]),S.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(xNt,{key:1,class:"layout-content-right"}))],2),S.value?(l.openBlock(),l.createBlock(Yht,{key:2,class:"layout-mini-status"})):l.createCommentVNode("",!0),l.createVNode(sR,{loading:l.unref(y),tip:M.$t("common.saving"),contained:""},null,8,["loading","tip"])]),l.unref(r)?(l.openBlock(),l.createBlock(T8t,{key:0})):l.createCommentVNode("",!0),l.unref(o)?(l.openBlock(),l.createBlock(_8t,{key:1})):l.createCommentVNode("",!0),l.unref(i)?(l.openBlock(),l.createBlock(hCt,{key:2})):l.createCommentVNode("",!0),l.unref(c)?(l.openBlock(),l.createBlock(TCt,{key:3})):l.createCommentVNode("",!0),l.unref(s)?(l.openBlock(),l.createBlock(yCt,{key:4})):l.createCommentVNode("",!0),l.unref(u)?(l.openBlock(),l.createBlock(U7t,{key:5})):l.createCommentVNode("",!0),l.createVNode(yh,{visible:!!l.unref(a),width:680,contentStyle:{maxWidth:"calc(100vw - 72px)"},onClosed:T[0]||(T[0]=N=>d())},{default:l.withCtx(()=>[l.createVNode(qTt)]),_:1},8,["visible"]),l.createVNode(yh,{visible:!!l.unref(f),width:720,closeOnClickMask:!1,closeOnEsc:!1,closeButton:"",wrapStyle:{opacity:l.unref(f)==="running"?0:1},onClosed:T[1]||(T[1]=N=>h())},{default:l.withCtx(()=>[l.createVNode(C5e)]),_:1},8,["visible","wrapStyle"]),l.unref(v)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:6},[l.unref(b)?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"offscreenCoverRef",ref:R,class:"offscreen-cover"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(g),N=>(l.openBlock(),l.createBlock(ns,{key:N.id,slide:N,size:800},null,8,["slide"]))),128))],512)):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-aa8ef6a0"]]),GVt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function JVt(e,t){return l.openBlock(),l.createElementBlock("svg",GVt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M14.5 8a19 19 0 0 0-4.75 3.84C6.794 15.146 5 19.49 5 24.246C5 34.603 13.507 43 24 43s19-8.397 19-18.754c0-4.757-1.794-9.1-4.75-12.406A19 19 0 0 0 33.5 8M24 4v20"},null,-1)])])}const k5e=l.markRaw({name:"icon-park-outline-power",render:JVt}),jVt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function qVt(e,t){return l.openBlock(),l.createElementBlock("svg",jVt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m6 6l10 9.9m-10 26L16 32m26 9.9L32.1 32m9.8-26L32 15.9M33 6h9v9m0 18v9h-9m-18 0H6v-9m0-18V6h9"},null,-1)])])}const L5e=l.markRaw({name:"icon-park-outline-full-screen-one",render:qVt}),$Vt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function eFt(e,t){return l.openBlock(),l.createElementBlock("svg",$Vt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m6 6l10 9.9m-10 26L16 32m26 9.9L32.1 32m9.8-26L32 15.9M32 7v9h9M16 7v9H7m9 25v-9H7m25 9v-9h8.9"},null,-1)])])}const E5e=l.markRaw({name:"icon-park-outline-off-screen-one",render:eFt}),tFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function nFt(e,t){return l.openBlock(),l.createElementBlock("svg",tFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("rect",{width:"40",height:"36",x:"4",y:"6",rx:"3"}),l.createElementVNode("path",{d:"M4 14h40M20 24h16m-16 8h16m-24-8h2m-2 8h2"})],-1)])])}const O5e=l.markRaw({name:"icon-park-outline-list-view",render:nFt}),aFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function rFt(e,t){return l.openBlock(),l.createElementBlock("svg",aFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M24 44c9.389 0 17-7.611 17-17s-7.611-17-17-17S7 17.611 7 27s7.611 17 17 17Z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M18 4h12m-6 15v8m8 0h-8m0-23v4"})],-1)])])}const P5e=l.markRaw({name:"icon-park-outline-stopwatch-start",render:rFt}),oFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function iFt(e,t){return l.openBlock(),l.createElementBlock("svg",oFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m20.1 8.1l4.243 4.243M30 4v6zm9.9 4.1l-4.243 4.243zM44 18h-6zm-4.1 9.9l-4.243-4.243zM30 32v-6zm-9.9-4.1l4.243-4.243zM16 18h6zm13.586.414L5.544 42.456"},null,-1)])])}const _5e=l.markRaw({name:"icon-park-outline-magic",render:iFt}),sFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function lFt(e,t){return l.openBlock(),l.createElementBlock("svg",sFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M5.325 43.5h8.485l31.113-31.113l-8.486-8.485L5.325 35.015z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"m27.952 12.387l8.485 8.485"})],-1)])])}const A_=l.markRaw({name:"icon-park-outline-write",render:lFt}),cFt={class:"i-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"};function uFt(e,t){return l.openBlock(),l.createElementBlock("svg",cFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"#ffffff",stroke:"#111111","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M24 43L42 24L24 5L24 17L6 17V31H24V43Z"},null,-1)])])}const fFt=l.markRaw({name:"custom-right",render:uFt}),dFt={class:"i-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"};function hFt(e,t){return l.openBlock(),l.createElementBlock("svg",dFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"#ffffff",stroke:"#111111","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M24 5L6 24L24 43L24 31L42 31V17H24V5Z"},null,-1)])])}const pFt=l.markRaw({name:"custom-left",render:hFt}),hee=()=>{const e=mt(),{slides:t,slideIndex:n,formatedAnimations:a}=Qe(e),r=l.ref(0),o=l.ref(!1),i=l.ref(n.value),s=()=>{if(o.value)return;const{animations:L,autoNext:P}=a.value[r.value];r.value+=1,o.value=!0;let O=0;for(const _ of L){const I=document.querySelector(`#screen-element-${_.elId} [class^=base-element-]`);if(!I){O+=1;continue}const D=`${bc}${_.effect}`;I.style.removeProperty("--animate-duration");for(const Y of I.classList)Y.indexOf(bc)!==-1&&I.classList.remove(Y,`${bc}animated`);I.style.setProperty("--animate-duration",`${_.duration}ms`),I.classList.add(D,`${bc}animated`);const W=()=>{_.type!=="out"&&(I.style.removeProperty("--animate-duration"),I.classList.remove(D,`${bc}animated`)),O+=1,O===L.length&&(o.value=!1,P&&s())};I.addEventListener("animationend",W,{once:!0})}};l.onMounted(()=>{const L=a.value[0];L&&L.animations.length&&L.animations.every(O=>O.trigger==="auto"||O.trigger==="meantime")&&s()});const c=()=>{r.value-=1;const{animations:L}=a.value[r.value];for(const P of L){const O=document.querySelector(`#screen-element-${P.elId} [class^=base-element-]`);if(O){O.style.removeProperty("--animate-duration");for(const _ of O.classList)_.indexOf(bc)!==-1&&O.classList.remove(_,`${bc}animated`)}}L.every(P=>P.type==="attention")&&v()},u=l.ref(0),f=()=>{u.value&&(clearInterval(u.value),u.value=0)};l.onUnmounted(f);const d=l.ref(!1),h=L=>{d.value=L},p=Ja.throttle(function(L){rn.success(L)},1e3,{leading:!0,trailing:!1}),v=()=>{a.value.length&&r.value>0?c():n.value>0?(e.updateSlideIndex(n.value-1),n.value<i.value?(r.value=0,i.value=n.value):r.value=a.value.length):d.value?C(t.value.length-1):p("已经是第一页了"),o.value=!1},m=()=>{a.value.length&&r.value<a.value.length?s():n.value<t.value.length-1?(e.updateSlideIndex(n.value+1),r.value=0,o.value=!1):(d.value?C(0):(p("已经是最后一页了"),f()),o.value=!1)},g=l.ref(2500),y=()=>{f(),rn.success("开始自动放映"),u.value=setInterval(m,g.value)},b=L=>{f(),g.value=L,y()},R=Ja.throttle(function(L){L.deltaY<0?v():L.deltaY>0&&m()},500,{leading:!0,trailing:!1}),A=l.ref(null),S=L=>{A.value={x:L.changedTouches[0].pageX,y:L.changedTouches[0].pageY}},w=L=>{if(!A.value)return;const P=Math.abs(A.value.x-L.changedTouches[0].pageX),O=L.changedTouches[0].pageY-A.value.y;Math.abs(O)>P&&Math.abs(O)>50&&(A.value=null,O>0?v():m())},M=L=>{const P=L.key.toUpperCase();P===Vt.UP||P===Vt.LEFT||P===Vt.PAGEUP?v():(P===Vt.DOWN||P===Vt.RIGHT||P===Vt.SPACE||P===Vt.ENTER||P===Vt.PAGEDOWN)&&m()};l.onMounted(()=>document.addEventListener("keydown",M)),l.onUnmounted(()=>document.removeEventListener("keydown",M));const T=()=>{e.updateSlideIndex(n.value-1),r.value=0},N=()=>{e.updateSlideIndex(n.value+1),r.value=0},C=L=>{e.updateSlideIndex(L),r.value=0};return{autoPlayTimer:u,autoPlayInterval:g,setAutoPlayInterval:b,autoPlay:y,closeAutoPlay:f,loopPlay:d,setLoopPlay:h,mousewheelListener:R,touchStartListener:S,touchEndListener:w,turnPrevSlide:T,turnNextSlide:N,turnSlideToIndex:C,turnSlideToId:L=>{const P=t.value.findIndex(O=>O.id===L);P!==-1&&(e.updateSlideIndex(P),r.value=0)},execPrev:v,execNext:m,animationIndex:r}},I5e=e=>{const t=mt(),{viewportRatio:n}=Qe(t),a=l.ref(0),r=l.ref(0),o=()=>{const i=(e==null?void 0:e.value)||document.body,s=i.clientWidth,c=i.clientHeight;let u,f;c/s===n.value?(u=s,f=c):c/s>n.value?(u=s,f=s*n.value):(u=c/n.value,f=c),a.value=u,r.value=f};return l.onMounted(()=>{o(),window.addEventListener("resize",o)}),l.onUnmounted(()=>{window.removeEventListener("resize",o)}),{slideWidth:a,slideHeight:r}},V5e=()=>{const e=l.ref(!0),t=l.ref(!0),{exitScreening:n}=Uv(),a=()=>{e.value=ZQ(),!e.value&&t.value&&n(),t.value=!0};return l.onMounted(()=>{e.value=ZQ(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)}),l.onUnmounted(()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}),{fullscreenState:e,manualExitFullscreen:()=>{e.value&&(t.value=!1,ime())}}},F5e=()=>{const{slides:e}=Qe(mt());return{slidesWithTurningMode:l.computed(()=>e.value.map(n=>{let a=n.turningMode;if(a||(a="slideY"),a==="random"){const r=_Mt;a=r[Math.floor(Math.random()*r.length)]}return{...n,turningMode:a}}))}},vFt={class:"element-content"},mFt=et(l.defineComponent({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=Qe(mt()),n=l.inject(b4)||l.ref(1),a=l.inject(yW)||l.ref(""),r=l.computed(()=>t.value.id===a.value);return(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:"base-element-video screen-element-video",style:l.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[l.createElementVNode("div",{class:"rotate-wrapper",style:l.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[l.createElementVNode("div",vFt,[r.value?(l.openBlock(),l.createBlock(b4e,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,autoplay:e.elementInfo.autoplay,scale:l.unref(n)},null,8,["width","height","src","poster","autoplay","scale"])):l.createCommentVNode("",!0)])],4)],4))}}),[["__scopeId","data-v-d9f232b0"]]),gFt={class:"element-content"},yFt=et(l.defineComponent({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:n,currentSlide:a,viewportSize:r}=Qe(mt()),o=l.inject(b4)||l.ref(1),i=l.inject(yW)||l.ref(""),s=l.computed(()=>a.value.id===i.value),c=l.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),u=l.computed(()=>{const h=r.value,p=r.value*n.value,v=280/o.value,m=50/o.value,g=t.elementInfo.width,y=t.elementInfo.height,b=t.elementInfo.left,R=t.elementInfo.top;let A=0,S=y;return b+v>=h&&(A=g-v),R+y+m>=p&&(S=-m),{left:A+"px",top:S+"px"}}),f=l.shallowRef(null),d=()=>{f.value&&f.value.toggle()};return(h,p)=>{const v=z5;return l.openBlock(),l.createElementBlock("div",{class:"base-element-audio screen-element-audio",style:l.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[l.createElementVNode("div",{class:"rotate-wrapper",style:l.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[l.createElementVNode("div",gFt,[l.createVNode(v,{class:"audio-icon",style:l.normalizeStyle({fontSize:c.value,color:e.elementInfo.color}),onClick:p[0]||(p[0]=m=>d())},null,8,["style"]),s.value?(l.openBlock(),l.createBlock(R4e,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:f,style:l.normalizeStyle({...u.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:l.unref(o)},null,8,["style","src","loop","autoplay","scale"])):l.createCommentVNode("",!0)])],4)],4)}}}),[["__scopeId","data-v-20aa863a"]]),bFt=["id","title"],AFt=et(l.defineComponent({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,n=l.computed(()=>({[tn.IMAGE]:age,[tn.TEXT]:rge,[tn.SHAPE]:BQ,[tn.LINE]:oge,[tn.CHART]:ySe,[tn.TABLE]:SSe,[tn.LATEX]:DQ,[tn.VIDEO]:mFt,[tn.AUDIO]:yFt})[t.elementInfo.type]||null),{formatedAnimations:a,theme:r}=Qe(mt()),o=l.computed(()=>{const s=a.value.findIndex(u=>u.animations.map(d=>d.elId).includes(t.elementInfo.id));if(s===-1||s<t.animationIndex)return!1;const c=a.value[s].animations.find(u=>u.elId===t.elementInfo.id);return(c==null?void 0:c.type)==="in"}),i=s=>{if(s.target.tagName==="A"){t.manualExitFullscreen();return}const c=t.elementInfo.link;c&&(c.type==="web"?(t.manualExitFullscreen(),window.open(c.target)):c.type==="slide"&&t.turnSlideToId(c.target))};return(s,c)=>{var u;return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:l.normalizeStyle({zIndex:e.elementIndex,color:l.unref(r).fontColor,fontFamily:l.unref(r).fontName,visibility:o.value?"hidden":"visible"}),title:((u=e.elementInfo.link)==null?void 0:u.target)||"",onClick:c[0]||(c[0]=f=>i(f))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,bFt)}}}),[["__scopeId","data-v-28b05f52"]]),RFt=et(l.defineComponent({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:n,viewportSize:a}=Qe(mt()),r=l.computed(()=>t.slide.background),{backgroundStyle:o}=GE(r),i=l.computed(()=>t.slide.id);return l.provide(yW,i),(s,c)=>(l.openBlock(),l.createElementBlock("div",{class:"screen-slide",style:l.normalizeStyle({width:l.unref(a)+"px",height:l.unref(a)*l.unref(n)+"px",transform:`scale(${e.scale})`})},[l.createElementVNode("div",{class:"background",style:l.normalizeStyle({...l.unref(o)})},null,4),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.slide.elements,(u,f)=>(l.openBlock(),l.createBlock(AFt,{key:u.id,elementInfo:u,elementIndex:f+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"]))),128))],4))}}),[["__scopeId","data-v-54069779"]]),xFt={class:"screen-slide-list"},D5e=et(l.defineComponent({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slideIndex:n,viewportSize:a}=Qe(mt()),{slidesWithTurningMode:r}=F5e(),o=l.computed(()=>t.slideWidth/a.value);return l.provide(b4,o),(i,s)=>(l.openBlock(),l.createElementBlock("div",xFt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(c,u)=>{var f;return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["slide-item",`turning-mode-${c.turningMode}`,{current:u===l.unref(n),before:u<l.unref(n),after:u>l.unref(n),hide:(u===l.unref(n)-1||u===l.unref(n)+1)&&c.turningMode!==l.unref(r)[l.unref(n)].turningMode,last:u===l.unref(n)-1,next:u===l.unref(n)+1}]),key:c.id},[Math.abs(l.unref(n)-u)<2||(f=c.animations)!=null&&f.length?(l.openBlock(),l.createElementBlock("div",{key:0,class:"slide-content",style:l.normalizeStyle({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[l.createVNode(RFt,{slide:c,scale:o.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):l.createCommentVNode("",!0)],2)}),128))]))}}),[["__scopeId","data-v-557dcca0"]]),SFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function wFt(e,t){return l.openBlock(),l.createElementBlock("svg",SFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M32.492 24.5h-18m9-9l-9 9l9 9"})],-1)])])}const MFt=l.markRaw({name:"icon-park-outline-arrow-circle-left",render:wFt}),NFt={class:"slide-thumbnails"},TFt={class:"return-button"},CFt={class:"slide-thumbnails-content"},kFt=["onClick"],LFt=et(l.defineComponent({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const n=e,a=t,{slides:r,slideIndex:o}=Qe(mt()),{slidesLoadLimit:i}=e1(),s=c=>{n.turnSlideToIndex(c),a("close")};return(c,u)=>{const f=MFt;return l.openBlock(),l.createElementBlock("div",NFt,[l.createElementVNode("div",TFt,[l.createVNode(f,{class:"icon",onClick:u[0]||(u[0]=d=>a("close"))})]),l.createElementVNode("div",CFt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(d,h)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["thumbnail",{active:h===l.unref(o)}]),key:d.id,onClick:p=>s(h)},[l.createVNode(ns,{slide:d,size:150,visible:h<l.unref(i)},null,8,["slide","visible"])],10,kFt))),128))])])}}}),[["__scopeId","data-v-fe435b88"]]),EFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function OFt(e,t){return l.openBlock(),l.createElementBlock("svg",EFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linecap":"round",d:"M20 5.914h8v8h15v8H5v-8h15z","clip-rule":"evenodd"}),l.createElementVNode("path",{d:"M8 40h32V22H8z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M16 39.898v-5.984m8 5.984v-6m8 6v-5.984M12 40h24"})],-1)])])}const PFt=l.markRaw({name:"icon-park-outline-clear",render:OFt}),_Ft={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function IFt(e,t){return l.openBlock(),l.createElementBlock("svg",_Ft,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M4 42h40M31 4L7 28l6 6h8l20-20z"},null,-1)])])}const VFt=l.markRaw({name:"icon-park-outline-erase",render:IFt}),FFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function DFt(e,t){return l.openBlock(),l.createElementBlock("svg",FFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M42 24H6m24-12l12 12l-12 12"},null,-1)])])}const BFt=l.markRaw({name:"icon-park-outline-arrow-right",render:DFt}),XFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function UFt(e,t){return l.openBlock(),l.createElementBlock("svg",XFt,[...t[0]||(t[0]=[l.createElementVNode("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor","stroke-width":"4"},null,-1)])])}const B5e=l.markRaw({name:"icon-park-outline-round",render:UFt}),WFt={key:0,class:"blackboard"},YFt=et(l.defineComponent({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},shapeType:{default:"rect"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80},shapeSize:{default:4}},emits:["end"],setup(e,{expose:t,emit:n}){const a=e,r=n;let o=null;const i=l.shallowRef(null),s=l.shallowRef(null);let c={x:0,y:0},u=!1,f=0,d=-1,h=null;const p=l.ref({x:0,y:0}),v=l.ref(!1),m=l.ref(0),g=l.ref(0),y=l.computed(()=>s.value?m.value/s.value.width:1),b=l.computed(()=>s.value?g.value/s.value.height:1),R=()=>{i.value&&(m.value=i.value.clientWidth,g.value=i.value.clientHeight)},A=new ResizeObserver(R);l.onMounted(()=>{i.value&&A.observe(i.value)}),l.onUnmounted(()=>{i.value&&A.unobserve(i.value)});const S=()=>{!s.value||!i.value||(o=s.value.getContext("2d"),o&&(s.value.width=i.value.clientWidth,s.value.height=i.value.clientHeight,o.lineCap="round",o.lineJoin="round"))};l.onMounted(S);const w=()=>{o&&(a.model==="mark"?(o.globalCompositeOperation="xor",o.globalAlpha=.5):(a.model==="pen"||a.model==="shape")&&(o.globalCompositeOperation="source-over",o.globalAlpha=1))};l.watch(()=>a.model,w);const M=(G,F,Z)=>{if(!o)return;const Q=c.x,H=c.y;o.lineWidth=Z,o.strokeStyle=a.color,o.beginPath(),o.moveTo(Q,H),o.lineTo(G,F),o.stroke(),o.closePath()},T=(G,F)=>{if(!o||!s.value)return;const Z=c.x,Q=c.y,H=a.rubberSize/2,K=H*Math.sin(Math.atan((F-Q)/(G-Z))),te=H*Math.cos(Math.atan((F-Q)/(G-Z))),oe=[Z+K,Q-te],ue=[Z-K,Q+te],ke=[G+K,F-te],ve=[G-K,F+te];o.save(),o.beginPath(),o.arc(G,F,H,0,Math.PI*2),o.clip(),o.clearRect(0,0,s.value.width,s.value.height),o.restore(),o.save(),o.beginPath(),o.moveTo(...oe),o.lineTo(...ke),o.lineTo(...ve),o.lineTo(...ue),o.closePath(),o.clip(),o.clearRect(0,0,s.value.width,s.value.height),o.restore()},N=(G,F)=>{const Z=c.x,Q=c.y;return Math.sqrt((G-Z)*(G-Z)+(F-Q)*(F-Q))},C=(G,F)=>{const H=a.penSize,K=3,te=G/F;let oe;return te<=.1?oe=H:te>=10?oe=K:oe=H-te/10*H,d===-1?oe:oe*1/3+d*2/3},E=(G,F)=>{if(!o||!h)return;o.putImageData(h,0,0);const Z=c.x,Q=c.y;if(o.save(),o.lineCap="butt",o.lineJoin="miter",o.beginPath(),a.shapeType==="rect"){const H=G-Z,K=F-Q;o.rect(Z,Q,H,K)}else if(a.shapeType==="circle"){const H=G-Z,K=F-Q,te=Z+H/2,oe=Q+K/2,ue=Math.abs(H)/2,ke=Math.abs(K)/2;o.ellipse(te,oe,Math.abs(ue),Math.abs(ke),0,0,Math.PI*2)}else if(a.shapeType==="arrow"){const H=G-Z,K=F-Q,te=Math.atan2(K,H),oe=Math.max(a.shapeSize,4)*2,ue=G-Math.cos(te)*oe,ke=F-Math.sin(te)*oe;o.moveTo(Z,Q),o.lineTo(ue,ke)}if(o.strokeStyle=a.color,o.lineWidth=a.shapeSize,o.stroke(),o.restore(),a.shapeType==="arrow"){const H=G-Z,K=F-Q,te=Math.atan2(K,H),oe=Math.max(a.shapeSize,4)*2.6,ue=Math.max(a.shapeSize,4)*1.6,ke=G-Math.cos(te)*oe,ve=F-Math.sin(te)*oe;o.save(),o.beginPath(),o.moveTo(G,F);const xe=ke+ue*Math.cos(te+Math.PI/2),Me=ve+ue*Math.sin(te+Math.PI/2),Oe=ke+ue*Math.cos(te-Math.PI/2),z=ve+ue*Math.sin(te-Math.PI/2);o.lineTo(xe,Me),o.lineTo(Oe,z),o.closePath(),o.fillStyle=a.color,o.fill(),o.restore()}},L=(G,F)=>{const Z=new Date().getTime();if(a.model==="pen"){const Q=N(G,F),H=Z-f,K=C(Q,H);M(G,F,K),d=K,c={x:G,y:F},f=new Date().getTime()}else a.model==="mark"?(M(G,F,a.markSize),c={x:G,y:F}):a.model==="eraser"?(T(G,F),c={x:G,y:F}):a.model==="shape"&&E(G,F)},P=G=>{if(!s.value)return[0,0];const F=G instanceof MouseEvent?G:G.changedTouches[0],Z=s.value.getBoundingClientRect(),Q=F.pageX-Z.x,H=F.pageY-Z.y;return[Q,H]},O=G=>{const[F,Z]=P(G),Q=F/y.value,H=Z/b.value;a.model==="shape"&&(h=o.getImageData(0,0,s.value.width,s.value.height)),u=!0,c={x:Q,y:H},f=new Date().getTime(),G instanceof MouseEvent||(p.value={x:F,y:Z},v.value=!0)},_=G=>{const[F,Z]=P(G),Q=F/y.value,H=Z/b.value;p.value={x:F,y:Z},u&&L(Q,H)},I=()=>{u&&(u=!1,r("end"))};return t({clearCanvas:()=>{!o||!s.value||(o.clearRect(0,0,s.value.width,s.value.height),r("end"))},getImageDataURL:()=>{var G;return(G=s.value)==null?void 0:G.toDataURL()},setImageDataURL:G=>{if(!(!o||!s.value)&&(o.clearRect(0,0,s.value.width,s.value.height),G)){o.globalCompositeOperation="source-over",o.globalAlpha=1;const F=new Image;F.src=G,F.onload=()=>{o.drawImage(F,0,0),w()}}}}),(G,F)=>{const Z=A_,Q=i_,H=Df;return l.openBlock(),l.createElementBlock("div",{class:"writing-board",ref_key:"writingBoardRef",ref:i},[e.blackboard?(l.openBlock(),l.createElementBlock("div",WFt)):l.createCommentVNode("",!0),l.createElementVNode("canvas",{class:"canvas",ref_key:"canvasRef",ref:s,style:l.normalizeStyle({width:m.value+"px",height:g.value+"px"}),onMousedown:F[0]||(F[0]=K=>O(K)),onMousemove:F[1]||(F[1]=K=>_(K)),onMouseup:F[2]||(F[2]=K=>I()),onTouchstart:F[3]||(F[3]=K=>O(K)),onTouchmove:F[4]||(F[4]=K=>_(K)),onTouchend:F[5]||(F[5]=K=>{I(),v.value=!1}),onMouseleave:F[6]||(F[6]=K=>{I(),v.value=!1}),onMouseenter:F[7]||(F[7]=K=>v.value=!0)},null,36),v.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.model==="eraser"?(l.openBlock(),l.createElementBlock("div",{key:0,class:"eraser",style:l.normalizeStyle({left:p.value.x-e.rubberSize/2+"px",top:p.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):l.createCommentVNode("",!0),e.model==="pen"?(l.openBlock(),l.createElementBlock("div",{key:1,class:"pen",style:l.normalizeStyle({left:p.value.x-e.penSize/2+"px",top:p.value.y-e.penSize*6+e.penSize/2+"px",color:e.color})},[l.createVNode(Z,{class:"icon",style:l.normalizeStyle({fontSize:e.penSize*6+"px"})},null,8,["style"])],4)):l.createCommentVNode("",!0),e.model==="mark"?(l.openBlock(),l.createElementBlock("div",{key:2,class:"pen",style:l.normalizeStyle({left:p.value.x-e.markSize/2+"px",top:p.value.y+"px",color:e.color})},[l.createVNode(Q,{class:"icon",style:l.normalizeStyle({fontSize:e.markSize*1.5+"px"})},null,8,["style"])],4)):l.createCommentVNode("",!0),e.model==="shape"?(l.openBlock(),l.createElementBlock("div",{key:3,class:"pen",style:l.normalizeStyle({left:p.value.x-20+"px",top:p.value.y-20+"px",color:e.color})},[l.createVNode(H,{class:"icon",style:{fontSize:"40px"}})],4)):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)],512)}}}),[["__scopeId","data-v-eb93051d"]]),ZFt={class:"writing-board-tool"},KFt={class:"tool-content"},HFt={class:"setting"},QFt={class:"label"},zFt={class:"setting shape"},GFt={class:"shapes"},JFt={class:"label"},jFt={class:"setting"},qFt={class:"label"},$Ft={class:"setting"},e9t={class:"label"},t9t={class:"colors"},n9t=["onClick"],X5e=et(l.defineComponent({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const n=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],a=t,{currentSlide:r}=Qe(mt());In();const o=l.shallowRef(null),i=l.ref("#e2534d"),s=l.ref("pen"),c=l.ref(!1),u=l.ref(""),f=l.ref("rect"),d=l.ref(6),h=l.ref(24),p=l.ref(80),v=l.ref(4),m=A=>{s.value=A,u.value=u.value===A?"":A},g=()=>{o.value.clearCanvas()},y=A=>{s.value==="eraser"&&(s.value="pen"),i.value=A},b=()=>{a("close")};l.watch(r,()=>{al.writingBoardImgs.where("id").equals(r.value.id).toArray().then(A=>{const S=A[0];o.value.setImageDataURL((S==null?void 0:S.dataURL)||"")})},{immediate:!0});const R=()=>{const A=o.value.getImageDataURL();A&&al.writingBoardImgs.where("id").equals(r.value.id).toArray().then(S=>{const w=S[0];w?al.writingBoardImgs.update(w,{dataURL:A}):al.writingBoardImgs.add({id:r.value.id,dataURL:A})})};return(A,S)=>{const w=A_,M=cz,T=B5e,N=BFt,C=k4e,E=i_,L=VFt,P=PFt,O=tMe,_=Jy,I=l.resolveDirective("tooltip");return l.openBlock(),l.createElementBlock("div",ZFt,[l.createElementVNode("div",{class:"writing-board-wrap",style:l.normalizeStyle({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[l.createVNode(YFt,{ref_key:"writingBoardRef",ref:o,color:i.value,blackboard:c.value,model:s.value,penSize:d.value,markSize:h.value,rubberSize:p.value,shapeSize:v.value,shapeType:f.value,onEnd:S[0]||(S[0]=D=>R())},null,8,["color","blackboard","model","penSize","markSize","rubberSize","shapeSize","shapeType"])],4),l.createVNode(Xm,{class:"tools-panel",width:510,height:50,left:e.left,top:e.top},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"tools",onMousedown:S[19]||(S[19]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("div",KFt,[l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="pen",onHide:S[3]||(S[3]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",HFt,[l.createElementVNode("div",QFt,l.toDisplayString(A.$t("screen.inkThickness")),1),l.createVNode(Fi,{class:"size-slider",min:4,max:10,step:2,value:d.value,"onUpdate:value":S[1]||(S[1]=D=>d.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="pen"}]),onClick:S[2]||(S[2]=D=>m("pen"))},[l.createVNode(w,{class:"icon"})],2)),[[I,A.$t("screen.pen")]])]),_:1},8,["value"]),l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="shape",onHide:S[9]||(S[9]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",zFt,[l.createElementVNode("div",GFt,[l.createVNode(M,{class:l.normalizeClass(["icon",{active:f.value==="rect"}]),onClick:S[4]||(S[4]=D=>f.value="rect")},null,8,["class"]),l.createVNode(T,{class:l.normalizeClass(["icon",{active:f.value==="circle"}]),onClick:S[5]||(S[5]=D=>f.value="circle")},null,8,["class"]),l.createVNode(N,{class:l.normalizeClass(["icon",{active:f.value==="arrow"}]),onClick:S[6]||(S[6]=D=>f.value="arrow")},null,8,["class"])]),l.createVNode(Ln,{type:"vertical"}),l.createElementVNode("div",JFt,l.toDisplayString(A.$t("screen.inkThickness")),1),l.createVNode(Fi,{class:"size-slider",min:2,max:8,step:2,value:v.value,"onUpdate:value":S[7]||(S[7]=D=>v.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="shape"}]),onClick:S[8]||(S[8]=D=>m("shape"))},[l.createVNode(C,{class:"icon"})],2)),[[I,A.$t("screen.shape")]])]),_:1},8,["value"]),l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="mark",onHide:S[12]||(S[12]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",jFt,[l.createElementVNode("div",qFt,l.toDisplayString(A.$t("screen.inkThickness")),1),l.createVNode(Fi,{class:"size-slider",min:16,max:40,step:4,value:h.value,"onUpdate:value":S[10]||(S[10]=D=>h.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="mark"}]),onClick:S[11]||(S[11]=D=>m("mark"))},[l.createVNode(E,{class:"icon"})],2)),[[I,A.$t("screen.highlighter")]])]),_:1},8,["value"]),l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="eraser",onHide:S[15]||(S[15]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",$Ft,[l.createElementVNode("div",e9t,l.toDisplayString(A.$t("screen.eraserSize")),1),l.createVNode(Fi,{class:"size-slider",min:20,max:200,step:20,value:p.value,"onUpdate:value":S[13]||(S[13]=D=>p.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="eraser"}]),onClick:S[14]||(S[14]=D=>m("eraser"))},[l.createVNode(L,{class:"icon"})],2)),[[I,A.$t("screen.eraser")]])]),_:1},8,["value"]),l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"btn",onClick:S[16]||(S[16]=D=>g())},[l.createVNode(P,{class:"icon"})])),[[I,A.$t("screen.clearInk")]]),l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:c.value}]),onClick:S[17]||(S[17]=D=>c.value=!c.value)},[l.createVNode(O,{class:"icon"})],2)),[[I,A.$t("screen.blackboard")]]),l.createElementVNode("div",t9t,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(n,D=>l.createElementVNode("div",{class:l.normalizeClass(["color",{active:D===i.value,white:D==="#ffffff"}]),key:D,style:l.normalizeStyle({backgroundColor:D}),onClick:W=>y(D)},null,14,n9t)),64))])]),l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"btn close",onClick:S[18]||(S[18]=D=>b())},[l.createVNode(_,{class:"icon"})])),[[I,A.$t("screen.closePen")]])],32)]),_:1},8,["left","top"])])}}}),[["__scopeId","data-v-9290bd6a"]]),a9t={class:"header"},r9t={class:"content"},o9t={class:"timer"},i9t=["value","disabled"],s9t={class:"timer"},l9t=["value","disabled"],U5e=et(l.defineComponent({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const n=t;In();const a=l.ref(null),r=l.ref(!1),o=l.ref(!1),i=l.ref(0),s=l.computed(()=>Math.floor(i.value/60)),c=l.computed(()=>i.value%60),u=l.computed(()=>!o.value||r.value),f=()=>{a.value&&clearInterval(a.value)};l.onUnmounted(f);const d=()=>{f(),r.value=!1},h=()=>{f(),r.value=!1,o.value?i.value=600:i.value=0},p=()=>{f(),o.value?a.value=setInterval(()=>{i.value=i.value-1,i.value<=0&&h()},1e3):a.value=setInterval(()=>{i.value=i.value+1,i.value>36e3&&d()},1e3),r.value=!0},v=()=>{r.value?d():p()},m=()=>{o.value=!o.value,h()},g=(y,b)=>{const R=y.target;let A=R.value;/^(\d)+$/.test(A)?(b==="second"&&+A>=60&&(A="59"),i.value=b==="minute"?+A*60+c.value:+A+s.value*60):R.value=B4(b==="minute"?s.value:c.value,2)};return(y,b)=>{const R=Jy;return l.openBlock(),l.createBlock(Xm,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:l.withCtx(()=>[l.createElementVNode("div",a9t,[l.createElementVNode("span",{class:"text-btn",onClick:b[0]||(b[0]=A=>v())},l.toDisplayString(r.value?y.$t("screen.pause"):y.$t("screen.start")),1),l.createElementVNode("span",{class:"text-btn",onClick:b[1]||(b[1]=A=>h())},l.toDisplayString(y.$t("screen.reset")),1),l.createElementVNode("span",{class:l.normalizeClass(["text-btn",{active:o.value}]),onClick:b[2]||(b[2]=A=>m())},l.toDisplayString(y.$t("screen.countdown")),3)]),l.createElementVNode("div",r9t,[l.createElementVNode("div",o9t,[l.createElementVNode("input",{type:"text",value:l.unref(B4)(s.value,2),maxlength:3,disabled:u.value,onMousedown:b[3]||(b[3]=l.withModifiers(()=>{},["stop"])),onBlur:b[4]||(b[4]=A=>g(A,"minute")),onKeydown:[b[5]||(b[5]=l.withModifiers(()=>{},["stop"])),b[6]||(b[6]=l.withKeys(l.withModifiers(A=>g(A,"minute"),["stop"]),["enter"]))]},null,40,i9t)]),b[12]||(b[12]=l.createElementVNode("div",{class:"colon"},":",-1)),l.createElementVNode("div",s9t,[l.createElementVNode("input",{type:"text",value:l.unref(B4)(c.value,2),maxlength:3,disabled:u.value,onMousedown:b[7]||(b[7]=l.withModifiers(()=>{},["stop"])),onBlur:b[8]||(b[8]=A=>g(A,"second")),onKeydown:[b[9]||(b[9]=l.withModifiers(()=>{},["stop"])),b[10]||(b[10]=l.withKeys(l.withModifiers(A=>g(A,"second"),["stop"]),["enter"]))]},null,40,l9t)])]),l.createElementVNode("div",{class:"close-btn",onClick:b[11]||(b[11]=A=>n("close"))},[l.createVNode(R,{class:"icon"})])]),_:1},8,["left","top"])}}}),[["__scopeId","data-v-94c36bab"]]),c9t={class:"bottom-thumbnails"},u9t=["onClick"],f9t=et(l.defineComponent({__name:"BottomThumbnails",setup(e){const{slides:t,slideIndex:n,viewportRatio:a}=Qe(mt()),r=l.shallowRef(null),{turnSlideToIndex:o}=hee(),{slidesLoadLimit:i}=e1(),s=c=>{r.value&&r.value.scrollBy(c.deltaY,0)};return l.watch(n,()=>{l.nextTick(()=>{if(!r.value)return;const c=r.value.querySelector(".thumbnail.active");if(!c)return;const u=r.value.offsetWidth,f=c.offsetLeft+c.clientWidth/2;r.value.scrollTo({left:f-u/2,behavior:"smooth"})})}),(c,u)=>(l.openBlock(),l.createElementBlock("div",c9t,[l.createElementVNode("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:r,onWheel:u[0]||(u[0]=l.withModifiers(f=>s(f),["prevent"]))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(t),(f,d)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["thumbnail",{active:d===l.unref(n)}]),key:f.id,onClick:h=>l.unref(o)(d)},[l.createVNode(ns,{slide:f,size:100/l.unref(a),visible:d<l.unref(i)},null,8,["slide","size","visible"])],10,u9t))),128))],544)]))}}),[["__scopeId","data-v-b7e0789e"]]),d9t={class:"tools-left"},h9t={class:"content"},p9t=et(l.defineComponent({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{t:n}=In(),{slides:a,slideIndex:r}=Qe(mt()),{autoPlayTimer:o,autoPlay:i,closeAutoPlay:s,autoPlayInterval:c,setAutoPlayInterval:u,loopPlay:f,setLoopPlay:d,mousewheelListener:h,touchStartListener:p,touchEndListener:v,turnPrevSlide:m,turnNextSlide:g,turnSlideToIndex:y,turnSlideToId:b,execPrev:R,execNext:A,animationIndex:S}=hee(),{slideWidth:w,slideHeight:M}=I5e(),{exitScreening:T}=Uv(),{fullscreenState:N,manualExitFullscreen:C}=V5e(),E=l.ref(!1),L=l.ref(!1),P=l.ref(!1),O=l.ref(!1),_=l.ref(!1),I=l.ref(!1),D=()=>[{text:n("screen.previousPage"),subText:"↑ ←",disable:r.value<=0,handler:()=>m()},{text:n("screen.nextPage"),subText:"↓ →",disable:r.value>=a.value.length-1,handler:()=>g()},{text:n("screen.firstPage"),disable:r.value===0,handler:()=>y(0)},{text:n("screen.lastPage"),disable:r.value===a.value.length-1,handler:()=>y(a.value.length-1)},{divider:!0},{text:o.value?n("screen.cancelAutoPlay"):n("screen.autoPlay"),handler:o.value?s:i,children:[{text:`2.5${n("screen.seconds")}`,subText:c.value===2500?"√":"",handler:()=>u(2500)},{text:`5${n("screen.seconds")}`,subText:c.value===5e3?"√":"",handler:()=>u(5e3)},{text:`7.5${n("screen.seconds")}`,subText:c.value===7500?"√":"",handler:()=>u(7500)},{text:`10${n("screen.seconds")}`,subText:c.value===1e4?"√":"",handler:()=>u(1e4)}]},{text:n("screen.loopPlay"),subText:f.value?"√":"",handler:()=>d(!f.value)},{divider:!0},{text:n("screen.showToolbar"),handler:()=>E.value=!0},{text:n("screen.viewAllSlides"),handler:()=>O.value=!0},{text:n("screen.bottomThumbnails"),subText:_.value?"√":"",handler:()=>_.value=!_.value},{text:n("screen.penTool"),handler:()=>L.value=!0},{text:n("screen.presenterView"),handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:n("screen.endShow"),subText:"ESC",handler:T}];return(W,Y)=>{const G=pFt,F=fFt,Z=A_,Q=_5e,H=P5e,K=O5e,te=E5e,oe=L5e,ue=k5e,ke=l.resolveDirective("contextmenu"),ve=l.resolveDirective("tooltip");return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["base-view",{"laser-pen":I.value}])},[l.withDirectives(l.createVNode(D5e,{slideWidth:l.unref(w),slideHeight:l.unref(M),animationIndex:l.unref(S),turnSlideToId:l.unref(b),manualExitFullscreen:l.unref(C),onWheel:Y[0]||(Y[0]=xe=>l.unref(h)(xe)),onTouchstart:Y[1]||(Y[1]=xe=>l.unref(p)(xe)),onTouchend:Y[2]||(Y[2]=xe=>l.unref(v)(xe))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[ke,D]]),O.value?(l.openBlock(),l.createBlock(LFt,{key:0,turnSlideToIndex:l.unref(y),onClose:Y[3]||(Y[3]=xe=>O.value=!1)},null,8,["turnSlideToIndex"])):l.createCommentVNode("",!0),L.value?(l.openBlock(),l.createBlock(X5e,{key:1,slideWidth:l.unref(w),slideHeight:l.unref(M),onClose:Y[4]||(Y[4]=xe=>L.value=!1)},null,8,["slideWidth","slideHeight"])):l.createCommentVNode("",!0),P.value?(l.openBlock(),l.createBlock(U5e,{key:2,onClose:Y[5]||(Y[5]=xe=>P.value=!1)})):l.createCommentVNode("",!0),l.createElementVNode("div",d9t,[l.createVNode(G,{class:"tool-btn",onClick:Y[6]||(Y[6]=xe=>l.unref(R)())}),l.createVNode(F,{class:"tool-btn",onClick:Y[7]||(Y[7]=xe=>l.unref(A)())})]),l.createElementVNode("div",{class:l.normalizeClass(["tools-right",{visible:E.value}]),onMouseleave:Y[16]||(Y[16]=xe=>E.value=!1),onMouseenter:Y[17]||(Y[17]=xe=>E.value=!0)},[l.createElementVNode("div",h9t,[l.createElementVNode("div",{class:"tool-btn page-number",onClick:Y[8]||(Y[8]=xe=>O.value=!0)},l.toDisplayString(W.$t("screen.slideOf"))+" "+l.toDisplayString(l.unref(r)+1)+" / "+l.toDisplayString(l.unref(a).length),1),l.withDirectives(l.createVNode(Z,{class:"tool-btn",onClick:Y[9]||(Y[9]=xe=>L.value=!0)},null,512),[[ve,W.$t("screen.penTool")]]),l.withDirectives(l.createVNode(Q,{class:l.normalizeClass(["tool-btn",{active:I.value}]),onClick:Y[10]||(Y[10]=xe=>I.value=!I.value)},null,8,["class"]),[[ve,W.$t("screen.laserPointer")]]),l.withDirectives(l.createVNode(H,{class:l.normalizeClass(["tool-btn",{active:P.value}]),onClick:Y[11]||(Y[11]=xe=>P.value=!P.value)},null,8,["class"]),[[ve,W.$t("screen.timer")]]),l.withDirectives(l.createVNode(K,{class:"tool-btn",onClick:Y[12]||(Y[12]=xe=>e.changeViewMode("presenter"))},null,512),[[ve,W.$t("screen.presenterView")]]),l.unref(N)?l.withDirectives((l.openBlock(),l.createBlock(te,{key:0,class:"tool-btn",onClick:Y[13]||(Y[13]=xe=>l.unref(C)())},null,512)),[[ve,W.$t("screen.exitFullscreen")]]):l.withDirectives((l.openBlock(),l.createBlock(oe,{key:1,class:"tool-btn",onClick:Y[14]||(Y[14]=xe=>l.unref(YQ)())},null,512)),[[ve,W.$t("screen.enterFullscreen")]]),l.withDirectives(l.createVNode(ue,{class:"tool-btn",onClick:Y[15]||(Y[15]=xe=>l.unref(T)())},null,512),[[ve,W.$t("screen.endShow")]])])],34),_.value?(l.openBlock(),l.createBlock(f9t,{key:3})):l.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-f6de68cc"]]),v9t={class:"presenter-view"},m9t={class:"toolbar"},g9t={class:"content"},y9t=["onClick"],b9t={class:"remark"},A9t={class:"header"},R9t=["innerHTML"],x9t={class:"remark-scale"},S9t=et(l.defineComponent({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:n,slideIndex:a,viewportRatio:r,currentSlide:o}=Qe(mt()),{t:i}=In(),s=l.shallowRef(null),c=l.shallowRef(null),u=l.ref(!1),f=l.ref(!1),d=l.ref(!1),{mousewheelListener:h,touchStartListener:p,touchEndListener:v,turnPrevSlide:m,turnNextSlide:g,turnSlideToIndex:y,turnSlideToId:b,animationIndex:R}=hee(),{slideWidth:A,slideHeight:S}=I5e(s),{exitScreening:w}=Uv(),{slidesLoadLimit:M}=e1(),{fullscreenState:T,manualExitFullscreen:N}=V5e(),C=l.ref(16),E=l.computed(()=>o.value.remark?hL(o.value.remark):""),L=_=>{c.value&&c.value.scrollBy(_.deltaY,0)},P=_=>{_<12||_>40||(C.value=_)};l.watch(a,()=>{l.nextTick(()=>{if(!c.value)return;const _=c.value.querySelector(".thumbnail.active");if(!_)return;const I=c.value.offsetWidth,D=_.offsetLeft+_.clientWidth/2;c.value.scrollTo({left:D-I/2,behavior:"smooth"})})});const O=()=>[{text:i("screen.previousPage"),subText:"↑ ←",disable:a.value<=0,handler:()=>m()},{text:i("screen.nextPage"),subText:"↓ →",disable:a.value>=n.value.length-1,handler:()=>g()},{text:i("screen.firstPage"),disable:a.value===0,handler:()=>y(0)},{text:i("screen.lastPage"),disable:a.value===n.value.length-1,handler:()=>y(n.value.length-1)},{divider:!0},{text:i("screen.penTool"),handler:()=>u.value=!0},{text:i("screen.normalView"),handler:()=>t.changeViewMode("base")},{divider:!0},{text:i("screen.endShow"),subText:"ESC",handler:w}];return(_,I)=>{const D=O5e,W=A_,Y=_5e,G=P5e,F=E5e,Z=L5e,Q=k5e,H=f6,K=Df,te=l.resolveDirective("contextmenu");return l.openBlock(),l.createElementBlock("div",v9t,[l.createElementVNode("div",m9t,[l.createElementVNode("div",{class:"tool-btn",onClick:I[0]||(I[0]=oe=>e.changeViewMode("base"))},[l.createVNode(D,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.normalView")),1)]),l.createElementVNode("div",{class:l.normalizeClass(["tool-btn",{active:u.value}]),onClick:I[1]||(I[1]=oe=>u.value=!u.value)},[l.createVNode(W,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.pen")),1)],2),l.createElementVNode("div",{class:l.normalizeClass(["tool-btn",{active:d.value}]),onClick:I[2]||(I[2]=oe=>d.value=!d.value)},[l.createVNode(Y,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.laserPointer")),1)],2),l.createElementVNode("div",{class:l.normalizeClass(["tool-btn",{active:f.value}]),onClick:I[3]||(I[3]=oe=>f.value=!f.value)},[l.createVNode(G,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.timer")),1)],2),l.createElementVNode("div",{class:"tool-btn",onClick:I[4]||(I[4]=()=>l.unref(T)?l.unref(N)():l.unref(YQ)())},[l.unref(T)?(l.openBlock(),l.createBlock(F,{key:0,class:"tool-icon"})):(l.openBlock(),l.createBlock(Z,{key:1,class:"tool-icon"})),l.createElementVNode("span",null,l.toDisplayString(l.unref(T)?_.$t("screen.exitFullscreen"):_.$t("screen.fullscreen")),1)]),l.createVNode(Ln,{class:"divider"}),l.createElementVNode("div",{class:"tool-btn",onClick:I[5]||(I[5]=oe=>l.unref(w)())},[l.createVNode(Q,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.endShow")),1)])]),l.createElementVNode("div",g9t,[l.createElementVNode("div",{class:l.normalizeClass(["slide-list-wrap",{"laser-pen":d.value}]),ref_key:"slideListWrapRef",ref:s},[l.withDirectives(l.createVNode(D5e,{slideWidth:l.unref(A),slideHeight:l.unref(S),animationIndex:l.unref(R),turnSlideToId:l.unref(b),manualExitFullscreen:l.unref(N),onWheel:I[6]||(I[6]=oe=>l.unref(h)(oe)),onTouchstart:I[7]||(I[7]=oe=>l.unref(p)(oe)),onTouchend:I[8]||(I[8]=oe=>l.unref(v)(oe))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[te,O]]),u.value?(l.openBlock(),l.createBlock(X5e,{key:0,slideWidth:l.unref(A),slideHeight:l.unref(S),left:-365,top:-155,onClose:I[9]||(I[9]=oe=>u.value=!1)},null,8,["slideWidth","slideHeight"])):l.createCommentVNode("",!0),f.value?(l.openBlock(),l.createBlock(U5e,{key:1,left:75,onClose:I[10]||(I[10]=oe=>f.value=!1)})):l.createCommentVNode("",!0)],2),l.createElementVNode("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:c,onWheel:I[11]||(I[11]=l.withModifiers(oe=>L(oe),["prevent"]))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(n),(oe,ue)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["thumbnail",{active:ue===l.unref(a)}]),key:oe.id,onClick:ke=>l.unref(y)(ue)},[l.createVNode(ns,{slide:oe,size:120/l.unref(r),visible:ue<l.unref(M)},null,8,["slide","size","visible"])],10,y9t))),128))],544)]),l.createElementVNode("div",b9t,[l.createElementVNode("div",A9t,[l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.speakerNotes")),1),l.createElementVNode("span",null,"P "+l.toDisplayString(l.unref(a)+1)+" / "+l.toDisplayString(l.unref(n).length),1)]),l.createElementVNode("div",{class:l.normalizeClass(["remark-content ProseMirror-static",{empty:!E.value}]),style:l.normalizeStyle({fontSize:C.value+"px"}),innerHTML:E.value||_.$t("screen.noNotes")},null,14,R9t),l.createElementVNode("div",x9t,[l.createElementVNode("div",{class:l.normalizeClass(["scale-btn",{disable:C.value===12}]),onClick:I[12]||(I[12]=oe=>P(C.value-2))},[l.createVNode(H,{class:"icon"})],2),l.createElementVNode("div",{class:l.normalizeClass(["scale-btn",{disable:C.value===40}]),onClick:I[13]||(I[13]=oe=>P(C.value+2))},[l.createVNode(K,{class:"icon"})],2)])])])}}}),[["__scopeId","data-v-4fc0abe0"]]),w9t={class:"pptist-screen"},M9t=et(l.defineComponent({__name:"index",setup(e){const t=l.ref("base"),n=o=>{t.value=o},{exitScreening:a}=Uv(),r=o=>{o.key.toUpperCase()===Vt.ESC&&a()};return l.onMounted(()=>document.addEventListener("keydown",r)),l.onUnmounted(()=>document.removeEventListener("keydown",r)),(o,i)=>(l.openBlock(),l.createElementBlock("div",w9t,[t.value==="base"?(l.openBlock(),l.createBlock(p9t,{key:0,changeViewMode:n})):t.value==="presenter"?(l.openBlock(),l.createBlock(S9t,{key:1,changeViewMode:n})):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-2f0dc4b8"]]),N9t=l.defineComponent({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,n=l.computed(()=>({[tn.IMAGE]:OSe,[tn.TEXT]:f4e,[tn.SHAPE]:d4e,[tn.LINE]:h4e,[tn.CHART]:p4e,[tn.TABLE]:v4e,[tn.LATEX]:m4e,[tn.VIDEO]:A4e,[tn.AUDIO]:x4e})[t.elementInfo.type]||null);return(a,r)=>(l.openBlock(),l.createElementBlock("div",{class:"mobile-editable-element",style:l.normalizeStyle({zIndex:e.elementIndex})},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}}),T9t=et(l.defineComponent({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,n=l.computed(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),a=l.computed(()=>t.elementInfo.width*t.canvasScale),r=l.computed(()=>t.elementInfo.height*t.canvasScale),{borderLines:o,resizeHandlers:i,textElementResizeHandlers:s}=z1(a,r),c=t.elementInfo.type==="text"||t.elementInfo.type==="table"?s:i,u=l.computed(()=>["chart","video","audio"].includes(t.elementInfo.type));return(f,d)=>(l.openBlock(),l.createElementBlock("div",{class:"mobile-operate",style:l.normalizeStyle({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${n.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),h=>(l.openBlock(),l.createBlock(G1,{class:"operate-border-line",key:h.type,type:h.type,style:l.normalizeStyle(h.style)},null,8,["type","style"]))),128)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c),h=>(l.openBlock(),l.createBlock(Om,{class:"operate-resize-handler",key:h.direction,type:h.direction,rotate:e.elementInfo.rotate,style:l.normalizeStyle(h.style),onTouchstart:l.withModifiers(p=>e.scaleElement(p,e.elementInfo,h.direction),["stop"])},null,8,["type","rotate","style","onTouchstart"]))),128)),u.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(mx,{key:0,class:"operate-rotate-handler",style:l.normalizeStyle({left:a.value/2+"px"}),onTouchstart:d[0]||(d[0]=l.withModifiers(h=>e.rotateElement(h,e.elementInfo),["stop"]))},null,8,["style"]))],64)):l.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-4b96e2bb"]]),C9t={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function k9t(e,t){return l.openBlock(),l.createElementBlock("svg",C9t,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linecap":"round",d:"M13 12.432v-4.62A2.813 2.813 0 0 1 15.813 5h24.374A2.813 2.813 0 0 1 43 7.813v24.375A2.813 2.813 0 0 1 40.188 35h-4.672"}),l.createElementVNode("path",{d:"M32.188 13H7.811A2.813 2.813 0 0 0 5 15.813v24.374A2.813 2.813 0 0 0 7.813 43h24.375A2.813 2.813 0 0 0 35 40.188V15.811A2.813 2.813 0 0 0 32.188 13Z"})],-1)])])}const W5e=l.markRaw({name:"icon-park-outline-copy",render:k9t}),L9t=["onClick"],E9t={class:"label"},Y5e=et(l.defineComponent({__name:"MobileThumbnails",setup(e){const t=mt(),{slides:n,slideIndex:a}=Qe(t),{sortSlides:r}=Vd(),{slidesLoadLimit:o}=e1(),i=c=>{t.updateSlideIndex(c)},s=c=>{const{newIndex:u,oldIndex:f}=c;u===void 0||f===void 0||u===f||r(u,f)};return(c,u)=>(l.openBlock(),l.createBlock(l.unref(a_),{class:"mobile-thumbnails",modelValue:l.unref(n),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:s},{item:l.withCtx(({element:f,index:d})=>[l.createElementVNode("div",{class:l.normalizeClass(["thumbnail-item",{active:l.unref(a)===d}]),onClick:h=>i(d)},[l.createElementVNode("div",E9t,l.toDisplayString(d+1),1),l.createVNode(ns,{class:"thumbnail",slide:f,size:120,visible:d<l.unref(o)},null,8,["slide","visible"])],10,L9t)]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-2fd38eb8"]]),O9t={class:"slide-toolbar"},P9t={class:"remark"},_9t=["value","placeholder"],I9t={class:"toolbar"},V9t=et(l.defineComponent({__name:"SlideToolbar",setup(e){const t=mt(),{viewportRatio:n,currentSlide:a,viewportSize:r}=Qe(t),{t:o}=In(),{createSlide:i,copyAndPasteSlide:s,deleteSlide:c}=Vd(),{createTextElement:u,createImageElement:f,createShapeElement:d}=Id(),h=()=>{u({left:(r.value-400)/2,top:(r.value*n.value-56)/2,width:400,height:56},{content:`<p>${o("mobile.newText")}</p>`})},p=y=>{!y||!y[0]||_d(y[0]).then(b=>f(b))},v=y=>{const A={square:{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},round:{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"}},S=200;d({left:(r.value-S)/2,top:(r.value*n.value-S)/2,width:S,height:S},A[y])},m=l.computed(()=>{var y;return((y=a.value)==null?void 0:y.remark)||""}),g=y=>{const b=y.target.value;t.updateSlide({remark:b})};return(y,b)=>{const R=Df,A=W5e,S=J$,w=yx,M=LM,T=cz,N=B5e;return l.openBlock(),l.createElementBlock("div",O9t,[l.createElementVNode("div",P9t,[l.createElementVNode("textarea",{value:m.value,placeholder:y.$t("mobile.speakerNotes"),onInput:b[0]||(b[0]=C=>g(C))},null,40,_9t)]),l.createElementVNode("div",I9t,[l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:b[1]||(b[1]=C=>l.unref(i)())},{default:l.withCtx(()=>[l.createVNode(R,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.newSlide")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[2]||(b[2]=C=>l.unref(s)())},{default:l.withCtx(()=>[l.createVNode(A,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.copy")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[3]||(b[3]=C=>l.unref(c)())},{default:l.withCtx(()=>[l.createVNode(S,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.delete")),1)]),_:1})]),_:1}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:b[4]||(b[4]=C=>h())},{default:l.withCtx(()=>[l.createVNode(w,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.text")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(Gd,{onChange:b[5]||(b[5]=C=>p(C))},{default:l.withCtx(()=>[l.createVNode(M,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.image")),1)]),_:1})]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[6]||(b[6]=C=>v("square"))},{default:l.withCtx(()=>[l.createVNode(T,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.rectangle")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[7]||(b[7]=C=>v("round"))},{default:l.withCtx(()=>[l.createVNode(N,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.circle")),1)]),_:1})]),_:1})]),l.createVNode(Y5e)])}}}),[["__scopeId","data-v-99069ef4"]]),F9t={class:"element-toolbar"},D9t={class:"content"},B9t={key:0,class:"style"},X9t={key:1,class:"row-block"},U9t={class:"label"},W9t={class:"colors"},Y9t=["onClick"],Z9t={class:"color custom"},K9t={key:2,class:"row-block"},H9t={class:"label"},Q9t={class:"colors"},z9t=["onClick"],G9t={class:"color custom"},J9t={key:3,class:"tip"},j9t={key:1,class:"common"},q9t=et(l.defineComponent({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],n=Tt(),a=mt(),{handleElement:r,handleElementId:o,richTextAttrs:i}=Qe(n),{t:s}=In(),{addHistorySnapshot:c}=mn(),u=(N,C)=>{a.updateElement({id:N,props:C}),c()},f=l.computed(()=>[{key:"style",label:s("mobile.style")},{key:"common",label:s("mobile.layout")}]),d=l.ref("common"),h=l.computed(()=>{var N;return r.value?!!(r.value.type==="text"||r.value.type==="shape"&&((N=r.value.text)!=null&&N.content)):!1}),p=l.computed(()=>{var N;return r.value?!!(r.value.type==="text"||r.value.type==="table"||r.value.type==="latex"||r.value.type==="shape"&&((N=r.value.text)!=null&&N.content)):!1}),v=l.computed(()=>r.value?r.value.type==="text"||r.value.type==="shape"||r.value.type==="chart"||r.value.type==="table"||r.value.type==="line"||r.value.type==="audio":!1),{orderElement:m}=yM(),{alignElementToCanvas:g}=d6(),{addElementsFromData:y}=NA(),{deleteElement:b}=mM(),R=()=>{const N=JSON.parse(JSON.stringify(r.value));y([N])},A=(N,C)=>{Wo.emit(No.RICH_TEXT_COMMAND,{action:{command:N,value:C}})},S=l.computed(()=>{var N,C;return r.value?r.value.type==="text"||r.value.type==="shape"&&((N=r.value.text)!=null&&N.content)?i.value.color:r.value.type==="table"?(C=JSON.parse(JSON.stringify(r.value.data))[0][0].style)==null?void 0:C.color:r.value.type==="latex"?r.value.color:"#fff":"#fff"}),w=N=>{var C;if(r.value){if((r.value.type==="text"||r.value.type==="shape"&&((C=r.value.text)!=null&&C.content))&&Wo.emit(No.RICH_TEXT_COMMAND,{action:{command:"color",value:N}}),r.value.type==="table"){const E=JSON.parse(JSON.stringify(r.value.data));for(let L=0;L<E.length;L++)for(let P=0;P<E[L].length;P++){const O=E[L][P].style||{};E[L][P].style={...O,color:N}}u(o.value,{data:E})}r.value.type==="latex"&&u(o.value,{color:N})}},M=l.computed(()=>{var N;return r.value?r.value.type==="text"||r.value.type==="shape"||r.value.type==="chart"?r.value.fill:r.value.type==="table"?(N=JSON.parse(JSON.stringify(r.value.data))[0][0].style)==null?void 0:N.backcolor:r.value.type==="audio"||r.value.type==="line"?r.value.color:"#fff":"#fff"}),T=N=>{if(r.value){if((r.value.type==="text"||r.value.type==="shape"||r.value.type==="chart")&&u(o.value,{fill:N}),r.value.type==="table"){const C=JSON.parse(JSON.stringify(r.value.data));for(let E=0;E<C.length;E++)for(let L=0;L<C[E].length;L++){const P=C[E][L].style||{};C[E][L].style={...P,backcolor:N}}u(o.value,{data:C})}(r.value.type==="audio"||r.value.type==="line")&&u(o.value,{color:N})}};return(N,C)=>{const E=N6,L=B$,P=D$,O=F$,_=yx,I=sN,D=iN,W=oN,Y=W5e,G=J$,F=iMe,Z=oMe,Q=rMe,H=aMe,K=z$,te=Q$,oe=H$,ue=K$,ke=Z$,ve=Y$;return l.openBlock(),l.createElementBlock("div",F9t,[l.createVNode(Tf,{tabs:f.value,value:d.value,"onUpdate:value":C[0]||(C[0]=xe=>d.value=xe),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["tabs","value"]),l.createElementVNode("div",D9t,[d.value==="style"?(l.openBlock(),l.createElementBlock("div",B9t,[h.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).bold,onClick:C[1]||(C[1]=xe=>A("bold"))},{default:l.withCtx(()=>[l.createVNode(E)]),_:1},8,["checked"]),l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).em,onClick:C[2]||(C[2]=xe=>A("em"))},{default:l.withCtx(()=>[l.createVNode(L)]),_:1},8,["checked"]),l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).underline,onClick:C[3]||(C[3]=xe=>A("underline"))},{default:l.withCtx(()=>[l.createVNode(P)]),_:1},8,["checked"]),l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).strikethrough,onClick:C[4]||(C[4]=xe=>A("strikethrough"))},{default:l.withCtx(()=>[l.createVNode(O)]),_:1},8,["checked"])]),_:1}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[5]||(C[5]=xe=>A("fontsize-add"))},{default:l.withCtx(()=>[l.createVNode(_),C[22]||(C[22]=l.createTextVNode("+",-1))]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[6]||(C[6]=xe=>A("fontsize-reduce"))},{default:l.withCtx(()=>[l.createVNode(_),C[23]||(C[23]=l.createTextVNode("-",-1))]),_:1})]),_:1}),l.createVNode(Kf,{class:"row","button-style":"solid",value:l.unref(i).align,"onUpdate:value":C[7]||(C[7]=xe=>A("align",xe))},{default:l.withCtx(()=>[l.createVNode(La,{value:"left",style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(I)]),_:1}),l.createVNode(La,{value:"center",style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(D)]),_:1}),l.createVNode(La,{value:"right",style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(W)]),_:1})]),_:1},8,["value"])],64)):l.createCommentVNode("",!0),p.value?(l.openBlock(),l.createElementBlock("div",X9t,[l.createElementVNode("div",U9t,l.toDisplayString(N.$t("mobile.fontColor")),1),l.createElementVNode("div",W9t,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(t,xe=>l.createElementVNode("div",{class:"color",key:xe,onClick:Me=>w(xe)},[l.createElementVNode("div",{class:"color-block",style:l.normalizeStyle({backgroundColor:xe})},null,4)],8,Y9t)),64)),l.createElementVNode("div",Z9t,[l.createVNode(nn,{trigger:"click"},{content:l.withCtx(()=>[l.createVNode(cr,{modelValue:S.value,"onUpdate:modelValue":C[8]||(C[8]=xe=>w(xe))},null,8,["modelValue"])]),default:l.withCtx(()=>[C[24]||(C[24]=l.createElementVNode("div",{class:"color-block"},null,-1))]),_:1})])])])):l.createCommentVNode("",!0),v.value?(l.openBlock(),l.createElementBlock("div",K9t,[l.createElementVNode("div",H9t,l.toDisplayString(N.$t("mobile.fillColor")),1),l.createElementVNode("div",Q9t,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(t,xe=>l.createElementVNode("div",{class:"color",key:xe,onClick:Me=>T(xe)},[l.createElementVNode("div",{class:"color-block",style:l.normalizeStyle({backgroundColor:xe})},null,4)],8,z9t)),64)),l.createElementVNode("div",G9t,[l.createVNode(nn,{trigger:"click"},{content:l.withCtx(()=>[l.createVNode(cr,{modelValue:M.value,"onUpdate:modelValue":C[9]||(C[9]=xe=>T(xe))},null,8,["modelValue"])]),default:l.withCtx(()=>[C[25]||(C[25]=l.createElementVNode("div",{class:"color-block"},null,-1))]),_:1})])])])):l.createCommentVNode("",!0),!h.value&&!p.value&&!v.value?(l.openBlock(),l.createElementBlock("div",J9t,l.toDisplayString(N.$t("mobile.noAvailableProps")),1)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0),d.value==="common"?(l.openBlock(),l.createElementBlock("div",j9t,[l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[10]||(C[10]=xe=>R())},{default:l.withCtx(()=>[l.createVNode(Y,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.copy")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[11]||(C[11]=xe=>l.unref(b)())},{default:l.withCtx(()=>[l.createVNode(G,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.delete")),1)]),_:1})]),_:1}),l.createVNode(Ln,{margin:20}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[12]||(C[12]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).TOP))},{default:l.withCtx(()=>[l.createVNode(F,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.toTop")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[13]||(C[13]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).BOTTOM))},{default:l.withCtx(()=>[l.createVNode(Z,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.toBottom")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[14]||(C[14]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).UP))},{default:l.withCtx(()=>[l.createVNode(Q,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.moveUp")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[15]||(C[15]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).DOWN))},{default:l.withCtx(()=>[l.createVNode(H,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.moveDown")),1)]),_:1})]),_:1}),l.createVNode(Ln,{margin:20}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[16]||(C[16]=xe=>l.unref(g)(l.unref(Gn).LEFT))},{default:l.withCtx(()=>[l.createVNode(K,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignLeft")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[17]||(C[17]=xe=>l.unref(g)(l.unref(Gn).HORIZONTAL))},{default:l.withCtx(()=>[l.createVNode(te,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignHorizontalCenter")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[18]||(C[18]=xe=>l.unref(g)(l.unref(Gn).RIGHT))},{default:l.withCtx(()=>[l.createVNode(oe,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignRight")),1)]),_:1})]),_:1}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[19]||(C[19]=xe=>l.unref(g)(l.unref(Gn).TOP))},{default:l.withCtx(()=>[l.createVNode(ue,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignTop")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[20]||(C[20]=xe=>l.unref(g)(l.unref(Gn).VERTICAL))},{default:l.withCtx(()=>[l.createVNode(ke,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignVerticalCenter")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[21]||(C[21]=xe=>l.unref(g)(l.unref(Gn).BOTTOM))},{default:l.withCtx(()=>[l.createVNode(ve,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignBottom")),1)]),_:1})]),_:1})])):l.createCommentVNode("",!0)])])}}}),[["__scopeId","data-v-ed2d28f4"]]),$9t={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function eDt(e,t){return l.openBlock(),l.createElementBlock("svg",$9t,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M23.992 6H6v36h18m9-9l9-9l-9-9m-17 8.992h26"},null,-1)])])}const Z5e=l.markRaw({name:"icon-park-outline-logout",render:eDt}),tDt={class:"mobile-editor-header"},nDt={class:"history"},aDt=et(l.defineComponent({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:n}=Qe(eA()),{redo:a,undo:r}=mn();return(o,i)=>{const s=O4e,c=E4e,u=Z5e;return l.openBlock(),l.createElementBlock("div",tDt,[l.createElementVNode("div",nDt,[l.createElementVNode("div",{class:l.normalizeClass(["history-item",{disable:!l.unref(t)}]),onClick:i[0]||(i[0]=l.withModifiers(f=>l.unref(r)(),["stop"]))},[l.createVNode(s),l.createTextVNode(" "+l.toDisplayString(o.$t("mobile.undo")),1)],2),l.createElementVNode("div",{class:l.normalizeClass(["history-item",{disable:!l.unref(n)}]),onClick:i[1]||(i[1]=l.withModifiers(f=>l.unref(a)(),["stop"]))},[l.createVNode(c),l.createTextVNode(" "+l.toDisplayString(o.$t("mobile.redo")),1)],2)]),l.createElementVNode("div",{class:"back",onClick:i[2]||(i[2]=f=>e.changeMode("preview"))},[l.createVNode(u),l.createTextVNode(" "+l.toDisplayString(o.$t("mobile.exitEdit")),1)])])}}}),[["__scopeId","data-v-33a4cccb"]]),rDt={class:"mobile-editor"},oDt=et(l.defineComponent({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=mt(),n=Tt(),{slideIndex:a,currentSlide:r,viewportRatio:o,viewportSize:i}=Qe(t),{activeElementIdList:s,handleElement:c}=Qe(n),u=l.shallowRef(null),f=l.shallowRef(null),d=l.ref([]),h=l.computed(()=>r.value.background),{backgroundStyle:p}=GE(h),v=l.computed(()=>{if(!u.value)return 1;const M=u.value.clientWidth,T=u.value.clientHeight;return T/M>=o.value?(M-20)/i.value:(T-20)/o.value/i.value});l.onMounted(()=>{s.value.length&&n.setActiveElementIdList([]),a.value!==0&&t.updateSlideIndex(0)});const m=l.computed(()=>({width:i.value*v.value+"px",height:i.value*o.value*v.value+"px"})),g=l.ref([]),y=()=>{g.value=r.value?JSON.parse(JSON.stringify(r.value.elements)):[]};l.watchEffect(y);const{dragElement:b}=ESe(g,d,v),{scaleElement:R}=LSe(g,d,v),{rotateElement:A}=MSe(g,f,v),S=(M,T,N=!0)=>{s.value.includes(T.id)||(n.setActiveElementIdList([T.id]),n.setHandleElementId(T.id)),N&&b(M,T)},w=()=>{n.setActiveElementIdList([])};return(M,T)=>(l.openBlock(),l.createElementBlock("div",rDt,[l.createVNode(aDt,{changeMode:e.changeMode},null,8,["changeMode"]),l.createElementVNode("div",{class:"content",ref_key:"contentRef",ref:u,onTouchstart:T[0]||(T[0]=N=>w())},[l.createElementVNode("div",{class:"viewport-wrapper","data-lt-ppt-slide-viewport":"",style:l.normalizeStyle(m.value)},[l.createElementVNode("div",{class:"background",style:l.normalizeStyle(l.unref(p))},null,4),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.value,(N,C)=>(l.openBlock(),l.createBlock(S4e,{key:C,type:N.type,axis:N.axis,length:N.length,canvasScale:v.value},null,8,["type","axis","length","canvasScale"]))),128)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,N=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:N.id},[N.type!=="line"?(l.openBlock(),l.createBlock(T9t,{key:0,elementInfo:N,isSelected:l.unref(s).includes(N.id),canvasScale:v.value,scaleElement:l.unref(R),rotateElement:l.unref(A)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):l.createCommentVNode("",!0)],64))),128)),l.createElementVNode("div",{class:"viewport",ref_key:"viewportRef",ref:f,style:l.normalizeStyle({transform:`scale(${v.value})`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,(N,C)=>(l.openBlock(),l.createBlock(N9t,{key:N.id,elementInfo:N,elementIndex:C+1,selectElement:S},null,8,["elementInfo","elementIndex"]))),128))],4)],4)],544),l.createVNode(V9t),l.unref(c)?(l.openBlock(),l.createBlock(q9t,{key:0})):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-fa1d4bca"]]),iDt={class:"header"},sDt=et(l.defineComponent({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=mt(),{slides:n,slideIndex:a,viewportRatio:r}=Qe(t),{slidesWithTurningMode:o}=F5e(),i=l.ref(!1),s=l.ref({width:0,height:0});l.onMounted(()=>{a.value!==0&&t.updateSlideIndex(0),s.value={width:document.body.clientHeight,height:document.body.clientWidth}});const c=l.computed(()=>{const h=s.value.height/s.value.width;let p=0,v=0;return h>=r.value?(p=s.value.width,v=p*r.value):(v=s.value.height,p=v/r.value),{width:p,height:v}}),u=l.ref(null),f=h=>{u.value={x:h.changedTouches[0].pageX,y:h.changedTouches[0].pageY}},d=h=>{if(!u.value)return;const p=h.changedTouches[0].pageX-u.value.x,v=h.changedTouches[0].pageY-u.value.y,m=Math.abs(p),g=Math.abs(v);m>g&&m>50&&(p<0&&a.value>0&&t.updateSlideIndex(a.value-1),p>0&&a.value<n.value.length-1&&t.updateSlideIndex(a.value+1)),g>m&&g>50&&(v>0&&a.value>0&&t.updateSlideIndex(a.value-1),v<0&&a.value<n.value.length-1&&t.updateSlideIndex(a.value+1))};return(h,p)=>{const v=Z5e;return l.openBlock(),l.createElementBlock("div",{class:"mobile-player",style:l.normalizeStyle({width:s.value.width+"px",height:s.value.height+"px",transform:`rotate(90deg) translateY(-${s.value.height}px)`})},[l.createElementVNode("div",{class:"screen-slide-list",onClick:p[0]||(p[0]=m=>i.value=!i.value),onTouchstart:p[1]||(p[1]=m=>f(m)),onTouchend:p[2]||(p[2]=m=>d(m))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["slide-item",`turning-mode-${m.turningMode||"slideY"}`,{current:g===l.unref(a),before:g<l.unref(a),after:g>l.unref(a),hide:(g===l.unref(a)-1||g===l.unref(a)+1)&&m.turningMode!==l.unref(o)[l.unref(a)].turningMode,last:g===l.unref(a)-1,next:g===l.unref(a)+1}]),key:m.id},[Math.abs(l.unref(a)-g)<2?(l.openBlock(),l.createElementBlock("div",{key:0,class:"slide-content",style:l.normalizeStyle({width:c.value.width+"px",height:c.value.height+"px"})},[l.createVNode(ns,{slide:m,size:c.value.width},null,8,["slide","size"])],4)):l.createCommentVNode("",!0)],2))),128))],32),i.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",iDt,[l.createElementVNode("div",{class:"back",onClick:p[3]||(p[3]=m=>e.changeMode("preview"))},[l.createVNode(v),l.createTextVNode(" "+l.toDisplayString(h.$t("screen.endShow")),1)])]),l.createVNode(Y5e,{class:"thumbnails"})],64)):l.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-932eff7a"]]),lDt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function cDt(e,t){return l.openBlock(),l.createElementBlock("svg",lDt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linecap":"round",d:"M16 40H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v6"}),l.createElementVNode("path",{d:"M42 24H26a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V26a2 2 0 0 0-2-2Z"})],-1)])])}const uDt=l.markRaw({name:"icon-park-outline-full-screen-play",render:cDt}),fDt={class:"thumbnail-list"},dDt={class:"menu"},hDt=et(l.defineComponent({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=Qe(mt()),{slidesLoadLimit:n}=e1(),a=Tt(),{showAIPPTDialog:r}=Qe(a),o=()=>a.setAIPPTDialogState(!0),i=()=>a.setAIPPTDialogState(!1),s=l.shallowRef(null),c=l.ref(0),u=l.ref(400);return l.onMounted(()=>{s.value&&(c.value=s.value.clientWidth,u.value=document.body.clientWidth-20)}),(f,d)=>{const h=W$,p=uDt;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"mobile-preview",ref_key:"mobileRef",ref:s},[l.createElementVNode("div",fDt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(t),(v,m)=>(l.openBlock(),l.createElementBlock("div",{class:"thumbnail-item",key:v.id},[l.createVNode(ns,{slide:v,size:c.value-20,visible:m<l.unref(n)},null,8,["slide","size","visible"])]))),128))]),l.createElementVNode("div",dDt,[l.createElementVNode("div",{class:"menu-item",onClick:d[0]||(d[0]=v=>e.changeMode("editor"))},[l.createVNode(h,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(f.$t("common.edit")),1)]),l.createVNode(Ln,{type:"vertical",style:{height:"30px"}}),l.createElementVNode("div",{class:"menu-item",onClick:d[1]||(d[1]=v=>e.changeMode("player"))},[l.createVNode(p,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(f.$t("header.slideshow")),1)]),l.createVNode(Ln,{type:"vertical",style:{height:"30px"}}),l.createElementVNode("div",{class:"menu-item ai",onClick:d[2]||(d[2]=v=>o())},"AIPPT")])],512),l.createVNode(yh,{visible:!!l.unref(r),closeOnClickMask:!1,closeOnEsc:!1,width:u.value,closeButton:"",wrapStyle:{opacity:l.unref(r)==="running"?0:1},onClosed:d[3]||(d[3]=v=>i())},{default:l.withCtx(()=>[l.createVNode(C5e)]),_:1},8,["visible","width","wrapStyle"])],64)}}}),[["__scopeId","data-v-74fa7018"]]),pDt={class:"mobile"},vDt=et(l.defineComponent({__name:"index",setup(e){const t=l.ref("preview"),n=r=>t.value=r,a=l.computed(()=>({editor:oDt,player:sDt,preview:hDt})[t.value]||null);return(r,o)=>(l.openBlock(),l.createElementBlock("div",pDt,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.value),{changeMode:n}))]))}}),[["__scopeId","data-v-d02011cb"]]),mDt={class:"lt-ppt-inner",style:{height:"100%"}},gDt=Object.freeze(Object.defineProperty({__proto__:null,default:l.defineComponent({__name:"InnerApp",props:{initData:{},onUploadFile:{type:Function},readonly:{type:Boolean},onChange:{type:Function},onSave:{type:Function},onInitFinished:{type:Function},onReturn:{type:Function}},setup(e){const t=e,n=H9e(),a=l.inject("__lt_ppt_theme__",l.ref("dark")),r=b=>{const R=document.documentElement;R.classList.remove("lt-ppt-theme-dark","lt-ppt-theme-light"),R.classList.add(`lt-ppt-theme-${b}`)};r(a.value),l.watch(a,b=>r(b));const o=mt(),i=eA(),s=l.inject(A4,null),{screening:c}=Qe(pY()),{slides:u}=Qe(o),{importJSONData:f,importPPTXFromUrl:d}=tH(),{saveSlides:h,saving:p,saveRendererVisible:v,offscreenCoverRef:m,savePresentation:g}=ome({bridge:s});s&&(s.save=g),l.provide(fre,g);const y={id:an(10),elements:[],background:{type:"solid",color:"#fff"}};return o.setSlides([y]),t.initData||(s==null||s.markSaved(),s==null||s.markReady()),l.provide("onUploadFile",t.onUploadFile),l.provide("onSave",t.onSave),l.provide("onReturn",t.onReturn),l.onMounted(async()=>{var A;const b=await i.initSnapshotDatabase().then(()=>!0).catch(()=>!1);if(!t.initData)return;let R=!1;try{t.initData.json?f(t.initData.json,!0):t.initData.pptUrl&&await d(t.initData.pptUrl,{cover:!0}),await l.nextTick(),await new Promise(S=>requestAnimationFrame(()=>S())),s==null||s.markSaved(),R=!0,b&&(await new Promise(S=>setTimeout(S,400)),await i.resetSnapshotDatabase())}finally{s==null||s.markReady(),R&&((A=t.onInitFinished)==null||A.call(t))}}),l.watch(u,b=>{t.onChange&&t.onChange(JSON.parse(JSON.stringify(b)))},{deep:!0}),(b,R)=>(l.openBlock(),l.createElementBlock("div",mDt,[l.unref(c)?(l.openBlock(),l.createBlock(M9t,{key:0})):l.unref(n)?(l.openBlock(),l.createBlock(zVt,{key:1,saving:l.unref(p)},null,8,["saving"])):(l.openBlock(),l.createBlock(vDt,{key:2})),l.unref(v)?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"offscreenCoverRef",ref:m,class:"offscreen-cover"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),A=>(l.openBlock(),l.createBlock(ns,{key:A.id,slide:A,size:800},null,8,["slide"]))),128))],512)):l.createCommentVNode("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),yDt={class:"menu-content"},bDt=["onClick"],ADt={class:"text"},RDt={key:0,class:"sub-text"},xDt=et(l.defineComponent({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(t,n)=>{const a=l.resolveComponent("menu-content",!0);return l.openBlock(),l.createElementBlock("ul",yDt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.menus,(r,o)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:r.text||o},[r.hide?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:l.normalizeClass(["menu-item",{divider:r.divider,disable:r.disable}]),onClick:l.withModifiers(i=>e.handleClickMenuItem(r),["stop"])},[r.divider?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["menu-item-content",{"has-children":r.children,"has-handler":r.handler}])},[l.createElementVNode("span",ADt,l.toDisplayString(r.text),1),r.subText&&!r.children?(l.openBlock(),l.createElementBlock("span",RDt,l.toDisplayString(r.subText),1)):l.createCommentVNode("",!0),r.children&&r.children.length?(l.openBlock(),l.createBlock(a,{key:1,class:"sub-menu",menus:r.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):l.createCommentVNode("",!0)],2))],10,bDt))],64))),128))])}}}),[["__scopeId","data-v-124d579c"]]),SDt=l.defineComponent({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,n=l.computed(()=>{const{x:c,y:u}=t.axis,f=t.menus.filter(g=>!(g.divider||g.hide)).length,d=t.menus.filter(g=>g.divider).length,h=180,p=f*30+d*11+5*2,v=document.body.clientWidth,m=document.body.clientHeight;return{left:v<=c+h?c-h:c,top:m<=u+p?u-p:u}}),a=r=>{r.disable||r.children&&!r.handler||(r.handler&&r.handler(t.el),t.removeContextmenu())};return(r,o)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"pptist-contextmenu-mask",onContextmenu:o[0]||(o[0]=l.withModifiers(i=>e.removeContextmenu(),["prevent"])),onMousedown:o[1]||(o[1]=l.withModifiers(i=>e.removeContextmenu(),["left"]))},null,32),l.createElementVNode("div",{class:"pptist-contextmenu",style:l.normalizeStyle({left:n.value.left+"px",top:n.value.top+"px"}),onContextmenu:o[2]||(o[2]=l.withModifiers(()=>{},["prevent"]))},[l.createVNode(xDt,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}}),IN="CTX_CONTEXTMENU_HANDLER",wDt=(e,t,n)=>{t.stopPropagation(),t.preventDefault();const a=n.value(e);if(!a)return;let r=null;const o=()=>{r&&(document.body.removeChild(r),r=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",o),window.removeEventListener("resize",o)},i={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:o};r=document.createElement("div");const s=l.createVNode(SDt,i,null);l.render(s,r),document.body.appendChild(r),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",o),window.addEventListener("resize",o)},MDt={mounted(e,t){e[IN]=n=>wDt(e,n,t),e.addEventListener("contextmenu",e[IN])},unmounted(e){e&&e[IN]&&(e.removeEventListener("contextmenu",e[IN]),delete e[IN])}},VN="CTX_CLICK_OUTSIDE_HANDLER",NDt=(e,t,n)=>{const a=n.value,r=t.composedPath();(r?r.indexOf(e)<0:!e.contains(t.target))&&a(t)},TDt={mounted(e,t){e[VN]=n=>NDt(e,n,t),setTimeout(()=>{document.addEventListener("click",e[VN])},0)},unmounted(e){e[VN]&&(document.removeEventListener("click",e[VN]),delete e[VN])}},FN="TOOLTIP_INSTANCE",CDt={mounted(e,t){let n="",a="top",r=[300,0];typeof t.value=="string"?n=t.value:(n=t.value.content,t.value.placement!==void 0&&(a=t.value.placement),t.value.delay!==void 0&&(r=t.value.delay)),e[FN]=pR(e,{content:n,theme:"pptist-tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:r})},updated(e,t){let n="";typeof t.value=="string"?n=t.value:n=t.value.content,e[FN]&&e[FN].setContent(n)},unmounted(e){e[FN]&&e[FN].destroy()}},kDt={mounted(e,t){K5e(e,t.value)},updated(e,t){K5e(e,t.value)},unmounted(e){LDt(e)}},LDt=e=>{const t=e.querySelector(".directive-loading-overlay");t&&t.remove(),e._vLoadingAddedPosition&&(e.style.removeProperty("position"),delete e._vLoadingAddedPosition)},K5e=(e,t)=>{let n=!1,a="";typeof t=="boolean"?n=t:(t.text&&(a=t.text),n=t.state);let r=e.querySelector(".directive-loading-overlay");n?(getComputedStyle(e).position==="static"&&(e.style.position="relative",e._vLoadingAddedPosition=!0),r||(r=document.createElement("div"),r.className="directive-loading-overlay",e.appendChild(r)),a?(r.classList.add("has-text"),r.style.setProperty("--directive-loading-text",`"${a}"`)):(r.classList.remove("has-text"),r.style.removeProperty("--directive-loading-text"))):(r&&r.remove(),e._vLoadingAddedPosition&&(e.style.removeProperty("position"),delete e._vLoadingAddedPosition))},EDt=Object.freeze(Object.defineProperty({__proto__:null,default:{install(e){e.directive("contextmenu",MDt),e.directive("click-outside",TDt),e.directive("tooltip",CDt),e.directive("loading",kDt)}}},Symbol.toStringTag,{value:"Module"}));tl.LtPPT=OIe,tl.loadFonts=_Ie,Object.defineProperty(tl,Symbol.toStringTag,{value:"Module"})});
440
+ `),m=[];for(const g of v){if(!g.trim())continue;const y=g.match(/^(#+)\s*(.*)/),b=g.match(/^-\s*(.*)/);if(y){const R=y[1].length,A=y[2];m.push({id:an(),content:A,title:!0,lv:R})}else if(b){const R=b[1];m.push({id:an(),content:R,lv:4})}else m.push({id:an(),content:g.trim(),lv:4})}o.value=m});const s=v=>{i.value=v,l.nextTick(()=>{document.querySelector(".editable-text input").focus()})},c=(v,m)=>{i.value="";const g=v.target.value;o.value=o.value.map(y=>y.id===m.id?{...y,content:g}:y)},u=(v,m)=>{if(v.target.value&&(i.value="",!m.title)){const y=o.value.findIndex(R=>R.id===m.id),b=an();o.value.splice(y+1,0,{id:b,content:"",lv:4}),l.nextTick(()=>{s(b)})}},f=(v,m)=>{m.title||v.target.value||h(m.id)},d=(v,m,g)=>{const y=o.value.findIndex(M=>M.id===v),b=o.value[y];if(!b)return;const R=an();let A=4,S=0,w=!1;m==="prev"?S=y:S=y+1,b.lv===1?A=2:b.lv===2?m==="prev"?A=2:A=3:b.lv===3&&m==="prev"?A=3:A=4,A<4&&(w=!0),o.value.splice(S,0,{id:R,content:g,lv:A,title:w})},h=(v,m)=>{if(m){const g=o.value.findIndex(R=>R.id===v),y=[v],b=o.value[g];for(let R=g+1;R<o.value.length;R++){const A=o.value[R];if(A&&A.lv>b.lv)y.push(A.id);else break}o.value=o.value.filter(R=>!y.includes(R.id))}else o.value=o.value.filter(g=>g.id!==v)},p=v=>{const m=+v.dataset.lv,g=v.dataset.id;return m===1?[{text:n("outlineEditor.addChildChapter"),handler:()=>d(g,"next",n("outlineEditor.newChapter"))}]:m===2?[{text:n("outlineEditor.addSiblingChapterAbove"),handler:()=>d(g,"prev",n("outlineEditor.newChapter"))},{text:n("outlineEditor.addChildSection"),handler:()=>d(g,"next",n("outlineEditor.newSection"))},{text:n("outlineEditor.deleteChapter"),handler:()=>h(g,!0)}]:m===3?[{text:n("outlineEditor.addSiblingSectionAbove"),handler:()=>d(g,"prev",n("outlineEditor.newSection"))},{text:n("outlineEditor.addChildItem"),handler:()=>d(g,"next",n("outlineEditor.newItem"))},{text:n("outlineEditor.deleteSection"),handler:()=>h(g,!0)}]:[{text:n("outlineEditor.addSiblingItemAbove"),handler:()=>d(g,"prev",n("outlineEditor.newItem"))},{text:n("outlineEditor.addSiblingItemBelow"),handler:()=>d(g,"next",n("outlineEditor.newItem"))},{text:n("outlineEditor.deleteItem"),handler:()=>h(g)}]};return(v,m)=>{const g=l.resolveDirective("contextmenu");return l.openBlock(),l.createElementBlock("div",fVt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(o.value,y=>l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["item",[{title:y.title},`lv-${y.lv}`]]),key:y.id,"data-lv":y.lv,"data-id":y.id},[i.value===y.id?(l.openBlock(),l.createBlock(Up,{key:0,class:"editable-text",value:y.content,onBlur:b=>c(b,y),onEnter:b=>u(b,y),onBackspace:b=>f(b,y)},null,8,["value","onBlur","onEnter","onBackspace"])):(l.openBlock(),l.createElementBlock("div",{key:1,class:"text",onClick:b=>s(y.id)},l.toDisplayString(y.content),9,hVt)),l.createElementVNode("div",pVt,[y.lv===1?(l.openBlock(),l.createElementBlock("span",vVt,l.toDisplayString(v.$t("outlineEditor.topic")),1)):y.lv===2?(l.openBlock(),l.createElementBlock("span",mVt,l.toDisplayString(v.$t("outlineEditor.chapter")),1)):y.lv===3?(l.openBlock(),l.createElementBlock("span",gVt,l.toDisplayString(v.$t("outlineEditor.section")),1)):l.createCommentVNode("",!0)])],10,dVt)),[[g,p]])),128))])}}}),bVt={class:"aippt-dialog"},AVt={class:"header"},RVt={key:0,class:"subtite"},xVt={key:1,class:"subtite"},SVt={key:2,class:"subtite"},wVt={class:"count"},MVt={class:"recommends"},NVt=["onClick"],TVt={class:"configs"},CVt={class:"config-item"},kVt={class:"label"},LVt={class:"config-item"},EVt={class:"label"},OVt={class:"config-item"},PVt={class:"label"},_Vt={class:"config-item"},IVt={class:"label"},VVt={key:0,class:"configs"},FVt={class:"config-item"},DVt={key:1,class:"preview"},BVt={key:1,class:"outline-view"},XVt={key:2,class:"btns"},UVt={key:2,class:"select-template"},WVt={class:"templates"},YVt=["onClick"],ZVt=["src","alt"],KVt={class:"btns"},C5e=et(l.defineComponent({__name:"AIPPTDialog",setup(e){const{t}=In(),n=Tt(),a=mt(),{templates:r}=Qe(a),{resetSlides:o,isEmptySlide:i}=Vd(),{AIPPT:s,presetImgPool:c,getMdContent:u}=uVt(),f=l.ref("zh-CN"),d=l.ref("general"),h=l.ref(""),p=l.ref(""),v=l.ref(""),m=l.ref("template_1"),g=l.ref(!1),y=l.ref(!1),b=l.ref(!0),R=l.ref("setup"),A=l.ref("glm-4.7-flash"),S=l.shallowRef(null),w=l.shallowRef(null),M=l.computed(()=>[{label:t("aiDialog.chinese"),value:"zh-CN"},{label:t("aiDialog.english"),value:"English"},{label:t("aiDialog.japanese"),value:"日本語"}]),T=l.computed(()=>[{label:t("aiDialog.general"),value:"通用"},{label:t("aiDialog.academic"),value:"学术风"},{label:t("aiDialog.professional"),value:"职场风"},{label:t("aiDialog.educational"),value:"教育风"},{label:t("aiDialog.marketing"),value:"营销风"}]),N=l.computed(()=>[{label:t("aiDialog.none"),value:""},{label:t("aiDialog.mockTest"),value:"test"},{label:t("aiDialog.aiSearch"),value:"ai-search",disabled:!0},{label:t("aiDialog.aiGenerate"),value:"ai-create",disabled:!0}]),C=l.computed(()=>[t("aiDialog.recommendTopics.tech2025"),t("aiDialog.recommendTopics.bigData"),t("aiDialog.recommendTopics.catering"),t("aiDialog.recommendTopics.aigcEducation"),t("aiDialog.recommendTopics.socialMedia"),t("aiDialog.recommendTopics.fiveG"),t("aiDialog.recommendTopics.workSummary"),t("aiDialog.recommendTopics.blockchain"),t("aiDialog.recommendTopics.careerPlan"),t("aiDialog.recommendTopics.annualMeeting")]);l.onMounted(()=>{setTimeout(()=>{w.value.focus()},500)});const E=_=>{p.value=_,w.value.focus()},L=async()=>{if(!p.value)return rn.error(t("aiDialog.inputThemeFirst"));g.value=!0,y.value=!0;const _=await xx.AIPPT_Outline({content:p.value,language:f.value,model:A.value});if(typeof _=="object"&&_.state===-1)return g.value=!1,rn.error(t("aiDialog.apiOverload"));g.value=!1,R.value="outline";const I=_.body.getReader(),D=new TextDecoder("utf-8"),W=()=>{I.read().then(({done:Y,value:G})=>{if(Y){v.value=u(v.value),v.value=v.value.replace(/<!--[\s\S]*?-->/g,""),y.value=!1;return}const F=D.decode(G,{stream:!0});v.value+=F,S.value&&(S.value.scrollTop=S.value.scrollHeight+20),W()})};W()},P=async _=>{g.value=!0,n.setAIPPTDialogState("running"),rn.loading(t("aiDialog.creatingSlides"),{duration:0}),b.value&&o();const I=await xx.AIPPT({content:v.value,language:f.value,style:d.value,model:A.value});if(typeof I=="object"&&I.state===-1)return g.value=!1,rn.closeAll(),n.setAIPPTDialogState(!0),rn.error(t("aiDialog.apiOverload"));if(h.value==="test"){const H=await xx.getMockData("imgs");c(H)}let D=_;D||(D=await xx.getMockData(m.value));const W=D.slides,Y=D.theme,G=I.body.getReader(),F=new TextDecoder("utf-8"),Z=()=>{G.read().then(({done:H,value:K})=>{if(H){g.value=!1,rn.closeAll(),n.setAIPPTDialogState(!1),a.setTheme(Y);return}const oe=F.decode(K,{stream:!0}).split(/\n+/);for(const ue of oe)ue&&Q(ue);Z()})},Q=H=>{try{const K=H.replace("```jsonl","").replace("```json","").replace("```","").trim();if(K){const te=JSON.parse(lVt(K));s(W,[te])}}catch(K){console.error(K)}};Z()},O=()=>{const _=document.createElement("input");_.type="file",_.accept=".pptist",_.click(),_.addEventListener("change",I=>{var W;const D=(W=I.target.files)==null?void 0:W[0];if(D){const Y=new FileReader;Y.addEventListener("load",()=>{try{const{slides:G,theme:F}=JSON.parse(XK(Y.result));P({slides:G,theme:F})}catch{rn.error(t("aiDialog.templateError"))}}),Y.readAsText(D)}})};return(_,I)=>{const D=Z7t,W=l.resolveDirective("tooltip");return l.openBlock(),l.createElementBlock("div",bVt,[l.createElementVNode("div",AVt,[I[14]||(I[14]=l.createElementVNode("span",{class:"title"},"AIPPT",-1)),R.value==="template"?(l.openBlock(),l.createElementBlock("span",RVt,[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.step1Prefix")),1),l.withDirectives((l.openBlock(),l.createElementBlock("span",{class:"local",onClick:I[0]||(I[0]=Y=>O())},[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.step1Link")),1)])),[[W,_.$t("aiDialog.step1Tooltip")]])])):R.value==="outline"?(l.openBlock(),l.createElementBlock("span",xVt,l.toDisplayString(_.$t("aiDialog.step2")),1)):(l.openBlock(),l.createElementBlock("span",SVt,l.toDisplayString(_.$t("aiDialog.step3")),1))]),R.value==="setup"?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(Up,{class:"input",ref_key:"inputRef",ref:w,value:p.value,"onUpdate:value":I[2]||(I[2]=Y=>p.value=Y),maxlength:50,placeholder:_.$t("aiDialog.inputPlaceholder"),onEnter:I[3]||(I[3]=Y=>L())},{suffix:l.withCtx(()=>[l.createElementVNode("span",wVt,l.toDisplayString(p.value.length)+" / 50",1),l.createElementVNode("div",{class:"submit",type:"primary",onClick:I[1]||(I[1]=Y=>L())},[l.createVNode(D,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(_.$t("aiDialog.aiGenerateBtn")),1)])]),_:1},8,["value","placeholder"]),l.createElementVNode("div",MVt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(C.value,(Y,G)=>(l.openBlock(),l.createElementBlock("div",{class:"recommend",key:G,onClick:F=>E(Y)},l.toDisplayString(Y),9,NVt))),128))]),l.createElementVNode("div",TVt,[l.createElementVNode("div",CVt,[l.createElementVNode("div",kVt,l.toDisplayString(_.$t("aiDialog.language")),1),l.createVNode(er,{class:"config-content",style:{width:"80px"},value:f.value,"onUpdate:value":I[4]||(I[4]=Y=>f.value=Y),options:M.value},null,8,["value","options"])]),l.createElementVNode("div",LVt,[l.createElementVNode("div",EVt,l.toDisplayString(_.$t("aiDialog.style")),1),l.createVNode(er,{class:"config-content",style:{width:"80px"},value:d.value,"onUpdate:value":I[5]||(I[5]=Y=>d.value=Y),options:T.value},null,8,["value","options"])]),l.createElementVNode("div",OVt,[l.createElementVNode("div",PVt,l.toDisplayString(_.$t("aiDialog.model")),1),l.createVNode(er,{class:"config-content",style:{width:"190px"},value:A.value,"onUpdate:value":I[6]||(I[6]=Y=>A.value=Y),options:[{label:"GLM-4.7-Flash",value:"glm-4.7-flash"},{label:"Doubao-Seed-1.6-Flash",value:"doubao-seed-1.6-flash"}]},null,8,["value"])]),l.createElementVNode("div",_Vt,[l.createElementVNode("div",IVt,l.toDisplayString(_.$t("aiDialog.illustration")),1),l.createVNode(er,{class:"config-content",style:{width:"100px"},value:h.value,"onUpdate:value":I[7]||(I[7]=Y=>h.value=Y),options:N.value},null,8,["value","options"])])]),l.unref(i)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",VVt,[l.createElementVNode("div",FVt,[l.createVNode(a2,{value:b.value,"onUpdate:value":I[8]||(I[8]=Y=>b.value=Y)},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.overwriteSlides")),1)]),_:1},8,["value"])])]))],64)):l.createCommentVNode("",!0),R.value==="outline"?(l.openBlock(),l.createElementBlock("div",DVt,[y.value?(l.openBlock(),l.createElementBlock("pre",{key:0,ref_key:"outlineRef",ref:S},l.toDisplayString(v.value),513)):(l.openBlock(),l.createElementBlock("div",BVt,[l.createVNode(yVt,{value:v.value,"onUpdate:value":I[9]||(I[9]=Y=>v.value=Y)},null,8,["value"])])),y.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",XVt,[l.createVNode(vt,{class:"btn",type:"primary",onClick:I[10]||(I[10]=Y=>R.value="template")},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.selectTemplate")),1)]),_:1}),l.createVNode(vt,{class:"btn",onClick:I[11]||(I[11]=Y=>{v.value="",R.value="setup"})},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.regenerate")),1)]),_:1})]))])):l.createCommentVNode("",!0),R.value==="template"?(l.openBlock(),l.createElementBlock("div",UVt,[l.createElementVNode("div",WVt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),Y=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["template",{selected:m.value===Y.id}]),key:Y.id,onClick:G=>m.value=Y.id},[l.createElementVNode("img",{src:Y.cover,alt:Y.name},null,8,ZVt)],10,YVt))),128))]),l.createElementVNode("div",KVt,[l.createVNode(vt,{class:"btn",type:"primary",onClick:I[12]||(I[12]=Y=>P())},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.generate")),1)]),_:1}),l.createVNode(vt,{class:"btn",onClick:I[13]||(I[13]=Y=>R.value="outline")},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(_.$t("aiDialog.backToOutline")),1)]),_:1})])])):l.createCommentVNode("",!0),l.createVNode(sR,{loading:g.value,tip:_.$t("aiDialog.generating")},null,8,["loading","tip"])])}}}),[["__scopeId","data-v-1ca7c544"]]),HVt={class:"pptist-editor"},QVt={class:"layout-content-center"},zVt=et(l.defineComponent({__name:"index",props:{saving:{type:Boolean}},setup(e){const t=e,n=Tt(),{dialogForExport:a,showSelectPanel:r,showSearchPanel:o,showNotesPanel:i,showSymbolPanel:s,showMarkupPanel:c,showImageLibPanel:u,showAIPPTDialog:f}=Qe(n),d=()=>n.setDialogForExport(""),h=()=>n.setAIPPTDialogState(!1),p=l.inject(fre,null),v=p?null:ome(),m=p??v.savePresentation,g=(v==null?void 0:v.saveSlides)??l.ref([]),y=(v==null?void 0:v.saving)??l.computed(()=>t.saving??!1),b=(v==null?void 0:v.saveRendererVisible)??l.ref(!1),R=(v==null?void 0:v.offscreenCoverRef)??l.ref(null);l.ref(40);const A=l.inject("__lt_ppt_mode__",l.ref("default")),S=l.computed(()=>A.value==="mini"),w=l.computed(()=>S.value?"100%":"calc(100% - 40px)");return l.provide("__lt_ppt_mode__",A),l.watch(S,M=>{M&&n.setThumbnailsFocus(!1)},{immediate:!0}),PJe(),_Je(),(M,T)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",HVt,[S.value?(l.openBlock(),l.createBlock(Oht,{key:1,class:"layout-mini-toolbar",onSave:l.unref(m)},null,8,["onSave"])):(l.openBlock(),l.createBlock(Jqe,{key:0,class:"layout-header",onSave:l.unref(m)},null,8,["onSave"])),l.createElementVNode("div",{class:l.normalizeClass(["layout-content",{"is-mini":S.value}])},[S.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock($Rt,{key:0,class:"layout-content-left"})),l.createElementVNode("div",QVt,[S.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Pbt,{key:0,class:"center-top"})),l.createVNode(Z1t,{class:"center-body",style:l.normalizeStyle({height:w.value})},null,8,["style"])]),S.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(xNt,{key:1,class:"layout-content-right"}))],2),S.value?(l.openBlock(),l.createBlock(Yht,{key:2,class:"layout-mini-status"})):l.createCommentVNode("",!0),l.createVNode(sR,{loading:l.unref(y),tip:M.$t("common.saving"),contained:""},null,8,["loading","tip"])]),l.unref(r)?(l.openBlock(),l.createBlock(T8t,{key:0})):l.createCommentVNode("",!0),l.unref(o)?(l.openBlock(),l.createBlock(_8t,{key:1})):l.createCommentVNode("",!0),l.unref(i)?(l.openBlock(),l.createBlock(hCt,{key:2})):l.createCommentVNode("",!0),l.unref(c)?(l.openBlock(),l.createBlock(TCt,{key:3})):l.createCommentVNode("",!0),l.unref(s)?(l.openBlock(),l.createBlock(yCt,{key:4})):l.createCommentVNode("",!0),l.unref(u)?(l.openBlock(),l.createBlock(U7t,{key:5})):l.createCommentVNode("",!0),l.createVNode(yh,{visible:!!l.unref(a),width:680,contentStyle:{maxWidth:"calc(100vw - 72px)"},onClosed:T[0]||(T[0]=N=>d())},{default:l.withCtx(()=>[l.createVNode(qTt)]),_:1},8,["visible"]),l.createVNode(yh,{visible:!!l.unref(f),width:720,closeOnClickMask:!1,closeOnEsc:!1,closeButton:"",wrapStyle:{opacity:l.unref(f)==="running"?0:1},onClosed:T[1]||(T[1]=N=>h())},{default:l.withCtx(()=>[l.createVNode(C5e)]),_:1},8,["visible","wrapStyle"]),l.unref(v)?(l.openBlock(),l.createElementBlock(l.Fragment,{key:6},[l.unref(b)?(l.openBlock(),l.createElementBlock("div",{key:0,ref_key:"offscreenCoverRef",ref:R,class:"offscreen-cover"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(g),N=>(l.openBlock(),l.createBlock(ns,{key:N.id,slide:N,size:800},null,8,["slide"]))),128))],512)):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-2e3eb613"]]),GVt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function JVt(e,t){return l.openBlock(),l.createElementBlock("svg",GVt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M14.5 8a19 19 0 0 0-4.75 3.84C6.794 15.146 5 19.49 5 24.246C5 34.603 13.507 43 24 43s19-8.397 19-18.754c0-4.757-1.794-9.1-4.75-12.406A19 19 0 0 0 33.5 8M24 4v20"},null,-1)])])}const k5e=l.markRaw({name:"icon-park-outline-power",render:JVt}),jVt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function qVt(e,t){return l.openBlock(),l.createElementBlock("svg",jVt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m6 6l10 9.9m-10 26L16 32m26 9.9L32.1 32m9.8-26L32 15.9M33 6h9v9m0 18v9h-9m-18 0H6v-9m0-18V6h9"},null,-1)])])}const L5e=l.markRaw({name:"icon-park-outline-full-screen-one",render:qVt}),$Vt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function eFt(e,t){return l.openBlock(),l.createElementBlock("svg",$Vt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m6 6l10 9.9m-10 26L16 32m26 9.9L32.1 32m9.8-26L32 15.9M32 7v9h9M16 7v9H7m9 25v-9H7m25 9v-9h8.9"},null,-1)])])}const E5e=l.markRaw({name:"icon-park-outline-off-screen-one",render:eFt}),tFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function nFt(e,t){return l.openBlock(),l.createElementBlock("svg",tFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("rect",{width:"40",height:"36",x:"4",y:"6",rx:"3"}),l.createElementVNode("path",{d:"M4 14h40M20 24h16m-16 8h16m-24-8h2m-2 8h2"})],-1)])])}const O5e=l.markRaw({name:"icon-park-outline-list-view",render:nFt}),aFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function rFt(e,t){return l.openBlock(),l.createElementBlock("svg",aFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M24 44c9.389 0 17-7.611 17-17s-7.611-17-17-17S7 17.611 7 27s7.611 17 17 17Z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M18 4h12m-6 15v8m8 0h-8m0-23v4"})],-1)])])}const P5e=l.markRaw({name:"icon-park-outline-stopwatch-start",render:rFt}),oFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function iFt(e,t){return l.openBlock(),l.createElementBlock("svg",oFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"m20.1 8.1l4.243 4.243M30 4v6zm9.9 4.1l-4.243 4.243zM44 18h-6zm-4.1 9.9l-4.243-4.243zM30 32v-6zm-9.9-4.1l4.243-4.243zM16 18h6zm13.586.414L5.544 42.456"},null,-1)])])}const _5e=l.markRaw({name:"icon-park-outline-magic",render:iFt}),sFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function lFt(e,t){return l.openBlock(),l.createElementBlock("svg",sFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M5.325 43.5h8.485l31.113-31.113l-8.486-8.485L5.325 35.015z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"m27.952 12.387l8.485 8.485"})],-1)])])}const A_=l.markRaw({name:"icon-park-outline-write",render:lFt}),cFt={class:"i-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"};function uFt(e,t){return l.openBlock(),l.createElementBlock("svg",cFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"#ffffff",stroke:"#111111","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M24 43L42 24L24 5L24 17L6 17V31H24V43Z"},null,-1)])])}const fFt=l.markRaw({name:"custom-right",render:uFt}),dFt={class:"i-icon",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 48 48"};function hFt(e,t){return l.openBlock(),l.createElementBlock("svg",dFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"#ffffff",stroke:"#111111","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M24 5L6 24L24 43L24 31L42 31V17H24V5Z"},null,-1)])])}const pFt=l.markRaw({name:"custom-left",render:hFt}),hee=()=>{const e=mt(),{slides:t,slideIndex:n,formatedAnimations:a}=Qe(e),r=l.ref(0),o=l.ref(!1),i=l.ref(n.value),s=()=>{if(o.value)return;const{animations:L,autoNext:P}=a.value[r.value];r.value+=1,o.value=!0;let O=0;for(const _ of L){const I=document.querySelector(`#screen-element-${_.elId} [class^=base-element-]`);if(!I){O+=1;continue}const D=`${bc}${_.effect}`;I.style.removeProperty("--animate-duration");for(const Y of I.classList)Y.indexOf(bc)!==-1&&I.classList.remove(Y,`${bc}animated`);I.style.setProperty("--animate-duration",`${_.duration}ms`),I.classList.add(D,`${bc}animated`);const W=()=>{_.type!=="out"&&(I.style.removeProperty("--animate-duration"),I.classList.remove(D,`${bc}animated`)),O+=1,O===L.length&&(o.value=!1,P&&s())};I.addEventListener("animationend",W,{once:!0})}};l.onMounted(()=>{const L=a.value[0];L&&L.animations.length&&L.animations.every(O=>O.trigger==="auto"||O.trigger==="meantime")&&s()});const c=()=>{r.value-=1;const{animations:L}=a.value[r.value];for(const P of L){const O=document.querySelector(`#screen-element-${P.elId} [class^=base-element-]`);if(O){O.style.removeProperty("--animate-duration");for(const _ of O.classList)_.indexOf(bc)!==-1&&O.classList.remove(_,`${bc}animated`)}}L.every(P=>P.type==="attention")&&v()},u=l.ref(0),f=()=>{u.value&&(clearInterval(u.value),u.value=0)};l.onUnmounted(f);const d=l.ref(!1),h=L=>{d.value=L},p=Ja.throttle(function(L){rn.success(L)},1e3,{leading:!0,trailing:!1}),v=()=>{a.value.length&&r.value>0?c():n.value>0?(e.updateSlideIndex(n.value-1),n.value<i.value?(r.value=0,i.value=n.value):r.value=a.value.length):d.value?C(t.value.length-1):p("已经是第一页了"),o.value=!1},m=()=>{a.value.length&&r.value<a.value.length?s():n.value<t.value.length-1?(e.updateSlideIndex(n.value+1),r.value=0,o.value=!1):(d.value?C(0):(p("已经是最后一页了"),f()),o.value=!1)},g=l.ref(2500),y=()=>{f(),rn.success("开始自动放映"),u.value=setInterval(m,g.value)},b=L=>{f(),g.value=L,y()},R=Ja.throttle(function(L){L.deltaY<0?v():L.deltaY>0&&m()},500,{leading:!0,trailing:!1}),A=l.ref(null),S=L=>{A.value={x:L.changedTouches[0].pageX,y:L.changedTouches[0].pageY}},w=L=>{if(!A.value)return;const P=Math.abs(A.value.x-L.changedTouches[0].pageX),O=L.changedTouches[0].pageY-A.value.y;Math.abs(O)>P&&Math.abs(O)>50&&(A.value=null,O>0?v():m())},M=L=>{const P=L.key.toUpperCase();P===Vt.UP||P===Vt.LEFT||P===Vt.PAGEUP?v():(P===Vt.DOWN||P===Vt.RIGHT||P===Vt.SPACE||P===Vt.ENTER||P===Vt.PAGEDOWN)&&m()};l.onMounted(()=>document.addEventListener("keydown",M)),l.onUnmounted(()=>document.removeEventListener("keydown",M));const T=()=>{e.updateSlideIndex(n.value-1),r.value=0},N=()=>{e.updateSlideIndex(n.value+1),r.value=0},C=L=>{e.updateSlideIndex(L),r.value=0};return{autoPlayTimer:u,autoPlayInterval:g,setAutoPlayInterval:b,autoPlay:y,closeAutoPlay:f,loopPlay:d,setLoopPlay:h,mousewheelListener:R,touchStartListener:S,touchEndListener:w,turnPrevSlide:T,turnNextSlide:N,turnSlideToIndex:C,turnSlideToId:L=>{const P=t.value.findIndex(O=>O.id===L);P!==-1&&(e.updateSlideIndex(P),r.value=0)},execPrev:v,execNext:m,animationIndex:r}},I5e=e=>{const t=mt(),{viewportRatio:n}=Qe(t),a=l.ref(0),r=l.ref(0),o=()=>{const i=(e==null?void 0:e.value)||document.body,s=i.clientWidth,c=i.clientHeight;let u,f;c/s===n.value?(u=s,f=c):c/s>n.value?(u=s,f=s*n.value):(u=c/n.value,f=c),a.value=u,r.value=f};return l.onMounted(()=>{o(),window.addEventListener("resize",o)}),l.onUnmounted(()=>{window.removeEventListener("resize",o)}),{slideWidth:a,slideHeight:r}},V5e=()=>{const e=l.ref(!0),t=l.ref(!0),{exitScreening:n}=Uv(),a=()=>{e.value=ZQ(),!e.value&&t.value&&n(),t.value=!0};return l.onMounted(()=>{e.value=ZQ(),document.addEventListener("fullscreenchange",a),document.addEventListener("webkitfullscreenchange",a)}),l.onUnmounted(()=>{document.removeEventListener("fullscreenchange",a),document.removeEventListener("webkitfullscreenchange",a)}),{fullscreenState:e,manualExitFullscreen:()=>{e.value&&(t.value=!1,ime())}}},F5e=()=>{const{slides:e}=Qe(mt());return{slidesWithTurningMode:l.computed(()=>e.value.map(n=>{let a=n.turningMode;if(a||(a="slideY"),a==="random"){const r=_Mt;a=r[Math.floor(Math.random()*r.length)]}return{...n,turningMode:a}}))}},vFt={class:"element-content"},mFt=et(l.defineComponent({__name:"ScreenVideoElement",props:{elementInfo:{}},setup(e){const{currentSlide:t}=Qe(mt()),n=l.inject(b4)||l.ref(1),a=l.inject(yW)||l.ref(""),r=l.computed(()=>t.value.id===a.value);return(o,i)=>(l.openBlock(),l.createElementBlock("div",{class:"base-element-video screen-element-video",style:l.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[l.createElementVNode("div",{class:"rotate-wrapper",style:l.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[l.createElementVNode("div",vFt,[r.value?(l.openBlock(),l.createBlock(b4e,{key:0,width:e.elementInfo.width,height:e.elementInfo.height,src:e.elementInfo.src,poster:e.elementInfo.poster,autoplay:e.elementInfo.autoplay,scale:l.unref(n)},null,8,["width","height","src","poster","autoplay","scale"])):l.createCommentVNode("",!0)])],4)],4))}}),[["__scopeId","data-v-d9f232b0"]]),gFt={class:"element-content"},yFt=et(l.defineComponent({__name:"ScreenAudioElement",props:{elementInfo:{}},setup(e){const t=e,{viewportRatio:n,currentSlide:a,viewportSize:r}=Qe(mt()),o=l.inject(b4)||l.ref(1),i=l.inject(yW)||l.ref(""),s=l.computed(()=>a.value.id===i.value),c=l.computed(()=>Math.min(t.elementInfo.width,t.elementInfo.height)+"px"),u=l.computed(()=>{const h=r.value,p=r.value*n.value,v=280/o.value,m=50/o.value,g=t.elementInfo.width,y=t.elementInfo.height,b=t.elementInfo.left,R=t.elementInfo.top;let A=0,S=y;return b+v>=h&&(A=g-v),R+y+m>=p&&(S=-m),{left:A+"px",top:S+"px"}}),f=l.shallowRef(null),d=()=>{f.value&&f.value.toggle()};return(h,p)=>{const v=z5;return l.openBlock(),l.createElementBlock("div",{class:"base-element-audio screen-element-audio",style:l.normalizeStyle({top:e.elementInfo.top+"px",left:e.elementInfo.left+"px",width:e.elementInfo.width+"px",height:e.elementInfo.height+"px"})},[l.createElementVNode("div",{class:"rotate-wrapper",style:l.normalizeStyle({transform:`rotate(${e.elementInfo.rotate}deg)`})},[l.createElementVNode("div",gFt,[l.createVNode(v,{class:"audio-icon",style:l.normalizeStyle({fontSize:c.value,color:e.elementInfo.color}),onClick:p[0]||(p[0]=m=>d())},null,8,["style"]),s.value?(l.openBlock(),l.createBlock(R4e,{key:0,class:"audio-player",ref_key:"audioPlayerRef",ref:f,style:l.normalizeStyle({...u.value}),src:e.elementInfo.src,loop:e.elementInfo.loop,autoplay:e.elementInfo.autoplay,scale:l.unref(o)},null,8,["style","src","loop","autoplay","scale"])):l.createCommentVNode("",!0)])],4)],4)}}}),[["__scopeId","data-v-20aa863a"]]),bFt=["id","title"],AFt=et(l.defineComponent({__name:"ScreenElement",props:{elementInfo:{},elementIndex:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,n=l.computed(()=>({[tn.IMAGE]:age,[tn.TEXT]:rge,[tn.SHAPE]:BQ,[tn.LINE]:oge,[tn.CHART]:ySe,[tn.TABLE]:SSe,[tn.LATEX]:DQ,[tn.VIDEO]:mFt,[tn.AUDIO]:yFt})[t.elementInfo.type]||null),{formatedAnimations:a,theme:r}=Qe(mt()),o=l.computed(()=>{const s=a.value.findIndex(u=>u.animations.map(d=>d.elId).includes(t.elementInfo.id));if(s===-1||s<t.animationIndex)return!1;const c=a.value[s].animations.find(u=>u.elId===t.elementInfo.id);return(c==null?void 0:c.type)==="in"}),i=s=>{if(s.target.tagName==="A"){t.manualExitFullscreen();return}const c=t.elementInfo.link;c&&(c.type==="web"?(t.manualExitFullscreen(),window.open(c.target)):c.type==="slide"&&t.turnSlideToId(c.target))};return(s,c)=>{var u;return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["screen-element",{link:e.elementInfo.link}]),id:`screen-element-${e.elementInfo.id}`,style:l.normalizeStyle({zIndex:e.elementIndex,color:l.unref(r).fontColor,fontFamily:l.unref(r).fontName,visibility:o.value?"hidden":"visible"}),title:((u=e.elementInfo.link)==null?void 0:u.target)||"",onClick:c[0]||(c[0]=f=>i(f))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.value),{elementInfo:e.elementInfo},null,8,["elementInfo"]))],14,bFt)}}}),[["__scopeId","data-v-28b05f52"]]),RFt=et(l.defineComponent({__name:"ScreenSlide",props:{slide:{},scale:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{viewportRatio:n,viewportSize:a}=Qe(mt()),r=l.computed(()=>t.slide.background),{backgroundStyle:o}=GE(r),i=l.computed(()=>t.slide.id);return l.provide(yW,i),(s,c)=>(l.openBlock(),l.createElementBlock("div",{class:"screen-slide",style:l.normalizeStyle({width:l.unref(a)+"px",height:l.unref(a)*l.unref(n)+"px",transform:`scale(${e.scale})`})},[l.createElementVNode("div",{class:"background",style:l.normalizeStyle({...l.unref(o)})},null,4),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.slide.elements,(u,f)=>(l.openBlock(),l.createBlock(AFt,{key:u.id,elementInfo:u,elementIndex:f+1,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["elementInfo","elementIndex","animationIndex","turnSlideToId","manualExitFullscreen"]))),128))],4))}}),[["__scopeId","data-v-54069779"]]),xFt={class:"screen-slide-list"},D5e=et(l.defineComponent({__name:"ScreenSlideList",props:{slideWidth:{},slideHeight:{},animationIndex:{},turnSlideToId:{type:Function},manualExitFullscreen:{type:Function}},setup(e){const t=e,{slideIndex:n,viewportSize:a}=Qe(mt()),{slidesWithTurningMode:r}=F5e(),o=l.computed(()=>t.slideWidth/a.value);return l.provide(b4,o),(i,s)=>(l.openBlock(),l.createElementBlock("div",xFt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(c,u)=>{var f;return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["slide-item",`turning-mode-${c.turningMode}`,{current:u===l.unref(n),before:u<l.unref(n),after:u>l.unref(n),hide:(u===l.unref(n)-1||u===l.unref(n)+1)&&c.turningMode!==l.unref(r)[l.unref(n)].turningMode,last:u===l.unref(n)-1,next:u===l.unref(n)+1}]),key:c.id},[Math.abs(l.unref(n)-u)<2||(f=c.animations)!=null&&f.length?(l.openBlock(),l.createElementBlock("div",{key:0,class:"slide-content",style:l.normalizeStyle({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[l.createVNode(RFt,{slide:c,scale:o.value,animationIndex:e.animationIndex,turnSlideToId:e.turnSlideToId,manualExitFullscreen:e.manualExitFullscreen},null,8,["slide","scale","animationIndex","turnSlideToId","manualExitFullscreen"])],4)):l.createCommentVNode("",!0)],2)}),128))]))}}),[["__scopeId","data-v-557dcca0"]]),SFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function wFt(e,t){return l.openBlock(),l.createElementBlock("svg",SFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{d:"M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4S4 12.954 4 24s8.954 20 20 20Z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M32.492 24.5h-18m9-9l-9 9l9 9"})],-1)])])}const MFt=l.markRaw({name:"icon-park-outline-arrow-circle-left",render:wFt}),NFt={class:"slide-thumbnails"},TFt={class:"return-button"},CFt={class:"slide-thumbnails-content"},kFt=["onClick"],LFt=et(l.defineComponent({__name:"SlideThumbnails",props:{turnSlideToIndex:{type:Function}},emits:["close"],setup(e,{emit:t}){const n=e,a=t,{slides:r,slideIndex:o}=Qe(mt()),{slidesLoadLimit:i}=e1(),s=c=>{n.turnSlideToIndex(c),a("close")};return(c,u)=>{const f=MFt;return l.openBlock(),l.createElementBlock("div",NFt,[l.createElementVNode("div",TFt,[l.createVNode(f,{class:"icon",onClick:u[0]||(u[0]=d=>a("close"))})]),l.createElementVNode("div",CFt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(r),(d,h)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["thumbnail",{active:h===l.unref(o)}]),key:d.id,onClick:p=>s(h)},[l.createVNode(ns,{slide:d,size:150,visible:h<l.unref(i)},null,8,["slide","visible"])],10,kFt))),128))])])}}}),[["__scopeId","data-v-fe435b88"]]),EFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function OFt(e,t){return l.openBlock(),l.createElementBlock("svg",EFt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linecap":"round",d:"M20 5.914h8v8h15v8H5v-8h15z","clip-rule":"evenodd"}),l.createElementVNode("path",{d:"M8 40h32V22H8z"}),l.createElementVNode("path",{"stroke-linecap":"round",d:"M16 39.898v-5.984m8 5.984v-6m8 6v-5.984M12 40h24"})],-1)])])}const PFt=l.markRaw({name:"icon-park-outline-clear",render:OFt}),_Ft={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function IFt(e,t){return l.openBlock(),l.createElementBlock("svg",_Ft,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M4 42h40M31 4L7 28l6 6h8l20-20z"},null,-1)])])}const VFt=l.markRaw({name:"icon-park-outline-erase",render:IFt}),FFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function DFt(e,t){return l.openBlock(),l.createElementBlock("svg",FFt,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M42 24H6m24-12l12 12l-12 12"},null,-1)])])}const BFt=l.markRaw({name:"icon-park-outline-arrow-right",render:DFt}),XFt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function UFt(e,t){return l.openBlock(),l.createElementBlock("svg",XFt,[...t[0]||(t[0]=[l.createElementVNode("circle",{cx:"24",cy:"24",r:"20",fill:"none",stroke:"currentColor","stroke-width":"4"},null,-1)])])}const B5e=l.markRaw({name:"icon-park-outline-round",render:UFt}),WFt={key:0,class:"blackboard"},YFt=et(l.defineComponent({__name:"WritingBoard",props:{color:{default:"#ffcc00"},model:{default:"pen"},shapeType:{default:"rect"},blackboard:{type:Boolean,default:!1},penSize:{default:6},markSize:{default:24},rubberSize:{default:80},shapeSize:{default:4}},emits:["end"],setup(e,{expose:t,emit:n}){const a=e,r=n;let o=null;const i=l.shallowRef(null),s=l.shallowRef(null);let c={x:0,y:0},u=!1,f=0,d=-1,h=null;const p=l.ref({x:0,y:0}),v=l.ref(!1),m=l.ref(0),g=l.ref(0),y=l.computed(()=>s.value?m.value/s.value.width:1),b=l.computed(()=>s.value?g.value/s.value.height:1),R=()=>{i.value&&(m.value=i.value.clientWidth,g.value=i.value.clientHeight)},A=new ResizeObserver(R);l.onMounted(()=>{i.value&&A.observe(i.value)}),l.onUnmounted(()=>{i.value&&A.unobserve(i.value)});const S=()=>{!s.value||!i.value||(o=s.value.getContext("2d"),o&&(s.value.width=i.value.clientWidth,s.value.height=i.value.clientHeight,o.lineCap="round",o.lineJoin="round"))};l.onMounted(S);const w=()=>{o&&(a.model==="mark"?(o.globalCompositeOperation="xor",o.globalAlpha=.5):(a.model==="pen"||a.model==="shape")&&(o.globalCompositeOperation="source-over",o.globalAlpha=1))};l.watch(()=>a.model,w);const M=(G,F,Z)=>{if(!o)return;const Q=c.x,H=c.y;o.lineWidth=Z,o.strokeStyle=a.color,o.beginPath(),o.moveTo(Q,H),o.lineTo(G,F),o.stroke(),o.closePath()},T=(G,F)=>{if(!o||!s.value)return;const Z=c.x,Q=c.y,H=a.rubberSize/2,K=H*Math.sin(Math.atan((F-Q)/(G-Z))),te=H*Math.cos(Math.atan((F-Q)/(G-Z))),oe=[Z+K,Q-te],ue=[Z-K,Q+te],ke=[G+K,F-te],ve=[G-K,F+te];o.save(),o.beginPath(),o.arc(G,F,H,0,Math.PI*2),o.clip(),o.clearRect(0,0,s.value.width,s.value.height),o.restore(),o.save(),o.beginPath(),o.moveTo(...oe),o.lineTo(...ke),o.lineTo(...ve),o.lineTo(...ue),o.closePath(),o.clip(),o.clearRect(0,0,s.value.width,s.value.height),o.restore()},N=(G,F)=>{const Z=c.x,Q=c.y;return Math.sqrt((G-Z)*(G-Z)+(F-Q)*(F-Q))},C=(G,F)=>{const H=a.penSize,K=3,te=G/F;let oe;return te<=.1?oe=H:te>=10?oe=K:oe=H-te/10*H,d===-1?oe:oe*1/3+d*2/3},E=(G,F)=>{if(!o||!h)return;o.putImageData(h,0,0);const Z=c.x,Q=c.y;if(o.save(),o.lineCap="butt",o.lineJoin="miter",o.beginPath(),a.shapeType==="rect"){const H=G-Z,K=F-Q;o.rect(Z,Q,H,K)}else if(a.shapeType==="circle"){const H=G-Z,K=F-Q,te=Z+H/2,oe=Q+K/2,ue=Math.abs(H)/2,ke=Math.abs(K)/2;o.ellipse(te,oe,Math.abs(ue),Math.abs(ke),0,0,Math.PI*2)}else if(a.shapeType==="arrow"){const H=G-Z,K=F-Q,te=Math.atan2(K,H),oe=Math.max(a.shapeSize,4)*2,ue=G-Math.cos(te)*oe,ke=F-Math.sin(te)*oe;o.moveTo(Z,Q),o.lineTo(ue,ke)}if(o.strokeStyle=a.color,o.lineWidth=a.shapeSize,o.stroke(),o.restore(),a.shapeType==="arrow"){const H=G-Z,K=F-Q,te=Math.atan2(K,H),oe=Math.max(a.shapeSize,4)*2.6,ue=Math.max(a.shapeSize,4)*1.6,ke=G-Math.cos(te)*oe,ve=F-Math.sin(te)*oe;o.save(),o.beginPath(),o.moveTo(G,F);const xe=ke+ue*Math.cos(te+Math.PI/2),Me=ve+ue*Math.sin(te+Math.PI/2),Oe=ke+ue*Math.cos(te-Math.PI/2),z=ve+ue*Math.sin(te-Math.PI/2);o.lineTo(xe,Me),o.lineTo(Oe,z),o.closePath(),o.fillStyle=a.color,o.fill(),o.restore()}},L=(G,F)=>{const Z=new Date().getTime();if(a.model==="pen"){const Q=N(G,F),H=Z-f,K=C(Q,H);M(G,F,K),d=K,c={x:G,y:F},f=new Date().getTime()}else a.model==="mark"?(M(G,F,a.markSize),c={x:G,y:F}):a.model==="eraser"?(T(G,F),c={x:G,y:F}):a.model==="shape"&&E(G,F)},P=G=>{if(!s.value)return[0,0];const F=G instanceof MouseEvent?G:G.changedTouches[0],Z=s.value.getBoundingClientRect(),Q=F.pageX-Z.x,H=F.pageY-Z.y;return[Q,H]},O=G=>{const[F,Z]=P(G),Q=F/y.value,H=Z/b.value;a.model==="shape"&&(h=o.getImageData(0,0,s.value.width,s.value.height)),u=!0,c={x:Q,y:H},f=new Date().getTime(),G instanceof MouseEvent||(p.value={x:F,y:Z},v.value=!0)},_=G=>{const[F,Z]=P(G),Q=F/y.value,H=Z/b.value;p.value={x:F,y:Z},u&&L(Q,H)},I=()=>{u&&(u=!1,r("end"))};return t({clearCanvas:()=>{!o||!s.value||(o.clearRect(0,0,s.value.width,s.value.height),r("end"))},getImageDataURL:()=>{var G;return(G=s.value)==null?void 0:G.toDataURL()},setImageDataURL:G=>{if(!(!o||!s.value)&&(o.clearRect(0,0,s.value.width,s.value.height),G)){o.globalCompositeOperation="source-over",o.globalAlpha=1;const F=new Image;F.src=G,F.onload=()=>{o.drawImage(F,0,0),w()}}}}),(G,F)=>{const Z=A_,Q=i_,H=Df;return l.openBlock(),l.createElementBlock("div",{class:"writing-board",ref_key:"writingBoardRef",ref:i},[e.blackboard?(l.openBlock(),l.createElementBlock("div",WFt)):l.createCommentVNode("",!0),l.createElementVNode("canvas",{class:"canvas",ref_key:"canvasRef",ref:s,style:l.normalizeStyle({width:m.value+"px",height:g.value+"px"}),onMousedown:F[0]||(F[0]=K=>O(K)),onMousemove:F[1]||(F[1]=K=>_(K)),onMouseup:F[2]||(F[2]=K=>I()),onTouchstart:F[3]||(F[3]=K=>O(K)),onTouchmove:F[4]||(F[4]=K=>_(K)),onTouchend:F[5]||(F[5]=K=>{I(),v.value=!1}),onMouseleave:F[6]||(F[6]=K=>{I(),v.value=!1}),onMouseenter:F[7]||(F[7]=K=>v.value=!0)},null,36),v.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[e.model==="eraser"?(l.openBlock(),l.createElementBlock("div",{key:0,class:"eraser",style:l.normalizeStyle({left:p.value.x-e.rubberSize/2+"px",top:p.value.y-e.rubberSize/2+"px",width:e.rubberSize+"px",height:e.rubberSize+"px"})},null,4)):l.createCommentVNode("",!0),e.model==="pen"?(l.openBlock(),l.createElementBlock("div",{key:1,class:"pen",style:l.normalizeStyle({left:p.value.x-e.penSize/2+"px",top:p.value.y-e.penSize*6+e.penSize/2+"px",color:e.color})},[l.createVNode(Z,{class:"icon",style:l.normalizeStyle({fontSize:e.penSize*6+"px"})},null,8,["style"])],4)):l.createCommentVNode("",!0),e.model==="mark"?(l.openBlock(),l.createElementBlock("div",{key:2,class:"pen",style:l.normalizeStyle({left:p.value.x-e.markSize/2+"px",top:p.value.y+"px",color:e.color})},[l.createVNode(Q,{class:"icon",style:l.normalizeStyle({fontSize:e.markSize*1.5+"px"})},null,8,["style"])],4)):l.createCommentVNode("",!0),e.model==="shape"?(l.openBlock(),l.createElementBlock("div",{key:3,class:"pen",style:l.normalizeStyle({left:p.value.x-20+"px",top:p.value.y-20+"px",color:e.color})},[l.createVNode(H,{class:"icon",style:{fontSize:"40px"}})],4)):l.createCommentVNode("",!0)],64)):l.createCommentVNode("",!0)],512)}}}),[["__scopeId","data-v-eb93051d"]]),ZFt={class:"writing-board-tool"},KFt={class:"tool-content"},HFt={class:"setting"},QFt={class:"label"},zFt={class:"setting shape"},GFt={class:"shapes"},JFt={class:"label"},jFt={class:"setting"},qFt={class:"label"},$Ft={class:"setting"},e9t={class:"label"},t9t={class:"colors"},n9t=["onClick"],X5e=et(l.defineComponent({__name:"WritingBoardTool",props:{slideWidth:{},slideHeight:{},left:{default:-5},top:{default:-5}},emits:["close"],setup(e,{emit:t}){const n=["#000000","#ffffff","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#f9974c","#ffff3a"],a=t,{currentSlide:r}=Qe(mt());In();const o=l.shallowRef(null),i=l.ref("#e2534d"),s=l.ref("pen"),c=l.ref(!1),u=l.ref(""),f=l.ref("rect"),d=l.ref(6),h=l.ref(24),p=l.ref(80),v=l.ref(4),m=A=>{s.value=A,u.value=u.value===A?"":A},g=()=>{o.value.clearCanvas()},y=A=>{s.value==="eraser"&&(s.value="pen"),i.value=A},b=()=>{a("close")};l.watch(r,()=>{al.writingBoardImgs.where("id").equals(r.value.id).toArray().then(A=>{const S=A[0];o.value.setImageDataURL((S==null?void 0:S.dataURL)||"")})},{immediate:!0});const R=()=>{const A=o.value.getImageDataURL();A&&al.writingBoardImgs.where("id").equals(r.value.id).toArray().then(S=>{const w=S[0];w?al.writingBoardImgs.update(w,{dataURL:A}):al.writingBoardImgs.add({id:r.value.id,dataURL:A})})};return(A,S)=>{const w=A_,M=cz,T=B5e,N=BFt,C=k4e,E=i_,L=VFt,P=PFt,O=tMe,_=Jy,I=l.resolveDirective("tooltip");return l.openBlock(),l.createElementBlock("div",ZFt,[l.createElementVNode("div",{class:"writing-board-wrap",style:l.normalizeStyle({width:e.slideWidth+"px",height:e.slideHeight+"px"})},[l.createVNode(YFt,{ref_key:"writingBoardRef",ref:o,color:i.value,blackboard:c.value,model:s.value,penSize:d.value,markSize:h.value,rubberSize:p.value,shapeSize:v.value,shapeType:f.value,onEnd:S[0]||(S[0]=D=>R())},null,8,["color","blackboard","model","penSize","markSize","rubberSize","shapeSize","shapeType"])],4),l.createVNode(Xm,{class:"tools-panel",width:510,height:50,left:e.left,top:e.top},{default:l.withCtx(()=>[l.createElementVNode("div",{class:"tools",onMousedown:S[19]||(S[19]=l.withModifiers(()=>{},["stop"]))},[l.createElementVNode("div",KFt,[l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="pen",onHide:S[3]||(S[3]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",HFt,[l.createElementVNode("div",QFt,l.toDisplayString(A.$t("screen.inkThickness")),1),l.createVNode(Fi,{class:"size-slider",min:4,max:10,step:2,value:d.value,"onUpdate:value":S[1]||(S[1]=D=>d.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="pen"}]),onClick:S[2]||(S[2]=D=>m("pen"))},[l.createVNode(w,{class:"icon"})],2)),[[I,A.$t("screen.pen")]])]),_:1},8,["value"]),l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="shape",onHide:S[9]||(S[9]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",zFt,[l.createElementVNode("div",GFt,[l.createVNode(M,{class:l.normalizeClass(["icon",{active:f.value==="rect"}]),onClick:S[4]||(S[4]=D=>f.value="rect")},null,8,["class"]),l.createVNode(T,{class:l.normalizeClass(["icon",{active:f.value==="circle"}]),onClick:S[5]||(S[5]=D=>f.value="circle")},null,8,["class"]),l.createVNode(N,{class:l.normalizeClass(["icon",{active:f.value==="arrow"}]),onClick:S[6]||(S[6]=D=>f.value="arrow")},null,8,["class"])]),l.createVNode(Ln,{type:"vertical"}),l.createElementVNode("div",JFt,l.toDisplayString(A.$t("screen.inkThickness")),1),l.createVNode(Fi,{class:"size-slider",min:2,max:8,step:2,value:v.value,"onUpdate:value":S[7]||(S[7]=D=>v.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="shape"}]),onClick:S[8]||(S[8]=D=>m("shape"))},[l.createVNode(C,{class:"icon"})],2)),[[I,A.$t("screen.shape")]])]),_:1},8,["value"]),l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="mark",onHide:S[12]||(S[12]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",jFt,[l.createElementVNode("div",qFt,l.toDisplayString(A.$t("screen.inkThickness")),1),l.createVNode(Fi,{class:"size-slider",min:16,max:40,step:4,value:h.value,"onUpdate:value":S[10]||(S[10]=D=>h.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="mark"}]),onClick:S[11]||(S[11]=D=>m("mark"))},[l.createVNode(E,{class:"icon"})],2)),[[I,A.$t("screen.highlighter")]])]),_:1},8,["value"]),l.createVNode(nn,{placement:"top",trigger:"manual",value:u.value==="eraser",onHide:S[15]||(S[15]=D=>u.value="")},{content:l.withCtx(()=>[l.createElementVNode("div",$Ft,[l.createElementVNode("div",e9t,l.toDisplayString(A.$t("screen.eraserSize")),1),l.createVNode(Fi,{class:"size-slider",min:20,max:200,step:20,value:p.value,"onUpdate:value":S[13]||(S[13]=D=>p.value=D)},null,8,["value"])])]),default:l.withCtx(()=>[l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:s.value==="eraser"}]),onClick:S[14]||(S[14]=D=>m("eraser"))},[l.createVNode(L,{class:"icon"})],2)),[[I,A.$t("screen.eraser")]])]),_:1},8,["value"]),l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"btn",onClick:S[16]||(S[16]=D=>g())},[l.createVNode(P,{class:"icon"})])),[[I,A.$t("screen.clearInk")]]),l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["btn",{active:c.value}]),onClick:S[17]||(S[17]=D=>c.value=!c.value)},[l.createVNode(O,{class:"icon"})],2)),[[I,A.$t("screen.blackboard")]]),l.createElementVNode("div",t9t,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(n,D=>l.createElementVNode("div",{class:l.normalizeClass(["color",{active:D===i.value,white:D==="#ffffff"}]),key:D,style:l.normalizeStyle({backgroundColor:D}),onClick:W=>y(D)},null,14,n9t)),64))])]),l.withDirectives((l.openBlock(),l.createElementBlock("div",{class:"btn close",onClick:S[18]||(S[18]=D=>b())},[l.createVNode(_,{class:"icon"})])),[[I,A.$t("screen.closePen")]])],32)]),_:1},8,["left","top"])])}}}),[["__scopeId","data-v-9290bd6a"]]),a9t={class:"header"},r9t={class:"content"},o9t={class:"timer"},i9t=["value","disabled"],s9t={class:"timer"},l9t=["value","disabled"],U5e=et(l.defineComponent({__name:"CountdownTimer",props:{left:{default:5},top:{default:5}},emits:["close"],setup(e,{emit:t}){const n=t;In();const a=l.ref(null),r=l.ref(!1),o=l.ref(!1),i=l.ref(0),s=l.computed(()=>Math.floor(i.value/60)),c=l.computed(()=>i.value%60),u=l.computed(()=>!o.value||r.value),f=()=>{a.value&&clearInterval(a.value)};l.onUnmounted(f);const d=()=>{f(),r.value=!1},h=()=>{f(),r.value=!1,o.value?i.value=600:i.value=0},p=()=>{f(),o.value?a.value=setInterval(()=>{i.value=i.value-1,i.value<=0&&h()},1e3):a.value=setInterval(()=>{i.value=i.value+1,i.value>36e3&&d()},1e3),r.value=!0},v=()=>{r.value?d():p()},m=()=>{o.value=!o.value,h()},g=(y,b)=>{const R=y.target;let A=R.value;/^(\d)+$/.test(A)?(b==="second"&&+A>=60&&(A="59"),i.value=b==="minute"?+A*60+c.value:+A+s.value*60):R.value=B4(b==="minute"?s.value:c.value,2)};return(y,b)=>{const R=Jy;return l.openBlock(),l.createBlock(Xm,{class:"countdown-timer",width:180,height:110,left:e.left,top:e.top},{default:l.withCtx(()=>[l.createElementVNode("div",a9t,[l.createElementVNode("span",{class:"text-btn",onClick:b[0]||(b[0]=A=>v())},l.toDisplayString(r.value?y.$t("screen.pause"):y.$t("screen.start")),1),l.createElementVNode("span",{class:"text-btn",onClick:b[1]||(b[1]=A=>h())},l.toDisplayString(y.$t("screen.reset")),1),l.createElementVNode("span",{class:l.normalizeClass(["text-btn",{active:o.value}]),onClick:b[2]||(b[2]=A=>m())},l.toDisplayString(y.$t("screen.countdown")),3)]),l.createElementVNode("div",r9t,[l.createElementVNode("div",o9t,[l.createElementVNode("input",{type:"text",value:l.unref(B4)(s.value,2),maxlength:3,disabled:u.value,onMousedown:b[3]||(b[3]=l.withModifiers(()=>{},["stop"])),onBlur:b[4]||(b[4]=A=>g(A,"minute")),onKeydown:[b[5]||(b[5]=l.withModifiers(()=>{},["stop"])),b[6]||(b[6]=l.withKeys(l.withModifiers(A=>g(A,"minute"),["stop"]),["enter"]))]},null,40,i9t)]),b[12]||(b[12]=l.createElementVNode("div",{class:"colon"},":",-1)),l.createElementVNode("div",s9t,[l.createElementVNode("input",{type:"text",value:l.unref(B4)(c.value,2),maxlength:3,disabled:u.value,onMousedown:b[7]||(b[7]=l.withModifiers(()=>{},["stop"])),onBlur:b[8]||(b[8]=A=>g(A,"second")),onKeydown:[b[9]||(b[9]=l.withModifiers(()=>{},["stop"])),b[10]||(b[10]=l.withKeys(l.withModifiers(A=>g(A,"second"),["stop"]),["enter"]))]},null,40,l9t)])]),l.createElementVNode("div",{class:"close-btn",onClick:b[11]||(b[11]=A=>n("close"))},[l.createVNode(R,{class:"icon"})])]),_:1},8,["left","top"])}}}),[["__scopeId","data-v-94c36bab"]]),c9t={class:"bottom-thumbnails"},u9t=["onClick"],f9t=et(l.defineComponent({__name:"BottomThumbnails",setup(e){const{slides:t,slideIndex:n,viewportRatio:a}=Qe(mt()),r=l.shallowRef(null),{turnSlideToIndex:o}=hee(),{slidesLoadLimit:i}=e1(),s=c=>{r.value&&r.value.scrollBy(c.deltaY,0)};return l.watch(n,()=>{l.nextTick(()=>{if(!r.value)return;const c=r.value.querySelector(".thumbnail.active");if(!c)return;const u=r.value.offsetWidth,f=c.offsetLeft+c.clientWidth/2;r.value.scrollTo({left:f-u/2,behavior:"smooth"})})}),(c,u)=>(l.openBlock(),l.createElementBlock("div",c9t,[l.createElementVNode("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:r,onWheel:u[0]||(u[0]=l.withModifiers(f=>s(f),["prevent"]))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(t),(f,d)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["thumbnail",{active:d===l.unref(n)}]),key:f.id,onClick:h=>l.unref(o)(d)},[l.createVNode(ns,{slide:f,size:100/l.unref(a),visible:d<l.unref(i)},null,8,["slide","size","visible"])],10,u9t))),128))],544)]))}}),[["__scopeId","data-v-b7e0789e"]]),d9t={class:"tools-left"},h9t={class:"content"},p9t=et(l.defineComponent({__name:"BaseView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{t:n}=In(),{slides:a,slideIndex:r}=Qe(mt()),{autoPlayTimer:o,autoPlay:i,closeAutoPlay:s,autoPlayInterval:c,setAutoPlayInterval:u,loopPlay:f,setLoopPlay:d,mousewheelListener:h,touchStartListener:p,touchEndListener:v,turnPrevSlide:m,turnNextSlide:g,turnSlideToIndex:y,turnSlideToId:b,execPrev:R,execNext:A,animationIndex:S}=hee(),{slideWidth:w,slideHeight:M}=I5e(),{exitScreening:T}=Uv(),{fullscreenState:N,manualExitFullscreen:C}=V5e(),E=l.ref(!1),L=l.ref(!1),P=l.ref(!1),O=l.ref(!1),_=l.ref(!1),I=l.ref(!1),D=()=>[{text:n("screen.previousPage"),subText:"↑ ←",disable:r.value<=0,handler:()=>m()},{text:n("screen.nextPage"),subText:"↓ →",disable:r.value>=a.value.length-1,handler:()=>g()},{text:n("screen.firstPage"),disable:r.value===0,handler:()=>y(0)},{text:n("screen.lastPage"),disable:r.value===a.value.length-1,handler:()=>y(a.value.length-1)},{divider:!0},{text:o.value?n("screen.cancelAutoPlay"):n("screen.autoPlay"),handler:o.value?s:i,children:[{text:`2.5${n("screen.seconds")}`,subText:c.value===2500?"√":"",handler:()=>u(2500)},{text:`5${n("screen.seconds")}`,subText:c.value===5e3?"√":"",handler:()=>u(5e3)},{text:`7.5${n("screen.seconds")}`,subText:c.value===7500?"√":"",handler:()=>u(7500)},{text:`10${n("screen.seconds")}`,subText:c.value===1e4?"√":"",handler:()=>u(1e4)}]},{text:n("screen.loopPlay"),subText:f.value?"√":"",handler:()=>d(!f.value)},{divider:!0},{text:n("screen.showToolbar"),handler:()=>E.value=!0},{text:n("screen.viewAllSlides"),handler:()=>O.value=!0},{text:n("screen.bottomThumbnails"),subText:_.value?"√":"",handler:()=>_.value=!_.value},{text:n("screen.penTool"),handler:()=>L.value=!0},{text:n("screen.presenterView"),handler:()=>t.changeViewMode("presenter")},{divider:!0},{text:n("screen.endShow"),subText:"ESC",handler:T}];return(W,Y)=>{const G=pFt,F=fFt,Z=A_,Q=_5e,H=P5e,K=O5e,te=E5e,oe=L5e,ue=k5e,ke=l.resolveDirective("contextmenu"),ve=l.resolveDirective("tooltip");return l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["base-view",{"laser-pen":I.value}])},[l.withDirectives(l.createVNode(D5e,{slideWidth:l.unref(w),slideHeight:l.unref(M),animationIndex:l.unref(S),turnSlideToId:l.unref(b),manualExitFullscreen:l.unref(C),onWheel:Y[0]||(Y[0]=xe=>l.unref(h)(xe)),onTouchstart:Y[1]||(Y[1]=xe=>l.unref(p)(xe)),onTouchend:Y[2]||(Y[2]=xe=>l.unref(v)(xe))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[ke,D]]),O.value?(l.openBlock(),l.createBlock(LFt,{key:0,turnSlideToIndex:l.unref(y),onClose:Y[3]||(Y[3]=xe=>O.value=!1)},null,8,["turnSlideToIndex"])):l.createCommentVNode("",!0),L.value?(l.openBlock(),l.createBlock(X5e,{key:1,slideWidth:l.unref(w),slideHeight:l.unref(M),onClose:Y[4]||(Y[4]=xe=>L.value=!1)},null,8,["slideWidth","slideHeight"])):l.createCommentVNode("",!0),P.value?(l.openBlock(),l.createBlock(U5e,{key:2,onClose:Y[5]||(Y[5]=xe=>P.value=!1)})):l.createCommentVNode("",!0),l.createElementVNode("div",d9t,[l.createVNode(G,{class:"tool-btn",onClick:Y[6]||(Y[6]=xe=>l.unref(R)())}),l.createVNode(F,{class:"tool-btn",onClick:Y[7]||(Y[7]=xe=>l.unref(A)())})]),l.createElementVNode("div",{class:l.normalizeClass(["tools-right",{visible:E.value}]),onMouseleave:Y[16]||(Y[16]=xe=>E.value=!1),onMouseenter:Y[17]||(Y[17]=xe=>E.value=!0)},[l.createElementVNode("div",h9t,[l.createElementVNode("div",{class:"tool-btn page-number",onClick:Y[8]||(Y[8]=xe=>O.value=!0)},l.toDisplayString(W.$t("screen.slideOf"))+" "+l.toDisplayString(l.unref(r)+1)+" / "+l.toDisplayString(l.unref(a).length),1),l.withDirectives(l.createVNode(Z,{class:"tool-btn",onClick:Y[9]||(Y[9]=xe=>L.value=!0)},null,512),[[ve,W.$t("screen.penTool")]]),l.withDirectives(l.createVNode(Q,{class:l.normalizeClass(["tool-btn",{active:I.value}]),onClick:Y[10]||(Y[10]=xe=>I.value=!I.value)},null,8,["class"]),[[ve,W.$t("screen.laserPointer")]]),l.withDirectives(l.createVNode(H,{class:l.normalizeClass(["tool-btn",{active:P.value}]),onClick:Y[11]||(Y[11]=xe=>P.value=!P.value)},null,8,["class"]),[[ve,W.$t("screen.timer")]]),l.withDirectives(l.createVNode(K,{class:"tool-btn",onClick:Y[12]||(Y[12]=xe=>e.changeViewMode("presenter"))},null,512),[[ve,W.$t("screen.presenterView")]]),l.unref(N)?l.withDirectives((l.openBlock(),l.createBlock(te,{key:0,class:"tool-btn",onClick:Y[13]||(Y[13]=xe=>l.unref(C)())},null,512)),[[ve,W.$t("screen.exitFullscreen")]]):l.withDirectives((l.openBlock(),l.createBlock(oe,{key:1,class:"tool-btn",onClick:Y[14]||(Y[14]=xe=>l.unref(YQ)())},null,512)),[[ve,W.$t("screen.enterFullscreen")]]),l.withDirectives(l.createVNode(ue,{class:"tool-btn",onClick:Y[15]||(Y[15]=xe=>l.unref(T)())},null,512),[[ve,W.$t("screen.endShow")]])])],34),_.value?(l.openBlock(),l.createBlock(f9t,{key:3})):l.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-f6de68cc"]]),v9t={class:"presenter-view"},m9t={class:"toolbar"},g9t={class:"content"},y9t=["onClick"],b9t={class:"remark"},A9t={class:"header"},R9t=["innerHTML"],x9t={class:"remark-scale"},S9t=et(l.defineComponent({__name:"PresenterView",props:{changeViewMode:{type:Function}},setup(e){const t=e,{slides:n,slideIndex:a,viewportRatio:r,currentSlide:o}=Qe(mt()),{t:i}=In(),s=l.shallowRef(null),c=l.shallowRef(null),u=l.ref(!1),f=l.ref(!1),d=l.ref(!1),{mousewheelListener:h,touchStartListener:p,touchEndListener:v,turnPrevSlide:m,turnNextSlide:g,turnSlideToIndex:y,turnSlideToId:b,animationIndex:R}=hee(),{slideWidth:A,slideHeight:S}=I5e(s),{exitScreening:w}=Uv(),{slidesLoadLimit:M}=e1(),{fullscreenState:T,manualExitFullscreen:N}=V5e(),C=l.ref(16),E=l.computed(()=>o.value.remark?hL(o.value.remark):""),L=_=>{c.value&&c.value.scrollBy(_.deltaY,0)},P=_=>{_<12||_>40||(C.value=_)};l.watch(a,()=>{l.nextTick(()=>{if(!c.value)return;const _=c.value.querySelector(".thumbnail.active");if(!_)return;const I=c.value.offsetWidth,D=_.offsetLeft+_.clientWidth/2;c.value.scrollTo({left:D-I/2,behavior:"smooth"})})});const O=()=>[{text:i("screen.previousPage"),subText:"↑ ←",disable:a.value<=0,handler:()=>m()},{text:i("screen.nextPage"),subText:"↓ →",disable:a.value>=n.value.length-1,handler:()=>g()},{text:i("screen.firstPage"),disable:a.value===0,handler:()=>y(0)},{text:i("screen.lastPage"),disable:a.value===n.value.length-1,handler:()=>y(n.value.length-1)},{divider:!0},{text:i("screen.penTool"),handler:()=>u.value=!0},{text:i("screen.normalView"),handler:()=>t.changeViewMode("base")},{divider:!0},{text:i("screen.endShow"),subText:"ESC",handler:w}];return(_,I)=>{const D=O5e,W=A_,Y=_5e,G=P5e,F=E5e,Z=L5e,Q=k5e,H=f6,K=Df,te=l.resolveDirective("contextmenu");return l.openBlock(),l.createElementBlock("div",v9t,[l.createElementVNode("div",m9t,[l.createElementVNode("div",{class:"tool-btn",onClick:I[0]||(I[0]=oe=>e.changeViewMode("base"))},[l.createVNode(D,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.normalView")),1)]),l.createElementVNode("div",{class:l.normalizeClass(["tool-btn",{active:u.value}]),onClick:I[1]||(I[1]=oe=>u.value=!u.value)},[l.createVNode(W,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.pen")),1)],2),l.createElementVNode("div",{class:l.normalizeClass(["tool-btn",{active:d.value}]),onClick:I[2]||(I[2]=oe=>d.value=!d.value)},[l.createVNode(Y,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.laserPointer")),1)],2),l.createElementVNode("div",{class:l.normalizeClass(["tool-btn",{active:f.value}]),onClick:I[3]||(I[3]=oe=>f.value=!f.value)},[l.createVNode(G,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.timer")),1)],2),l.createElementVNode("div",{class:"tool-btn",onClick:I[4]||(I[4]=()=>l.unref(T)?l.unref(N)():l.unref(YQ)())},[l.unref(T)?(l.openBlock(),l.createBlock(F,{key:0,class:"tool-icon"})):(l.openBlock(),l.createBlock(Z,{key:1,class:"tool-icon"})),l.createElementVNode("span",null,l.toDisplayString(l.unref(T)?_.$t("screen.exitFullscreen"):_.$t("screen.fullscreen")),1)]),l.createVNode(Ln,{class:"divider"}),l.createElementVNode("div",{class:"tool-btn",onClick:I[5]||(I[5]=oe=>l.unref(w)())},[l.createVNode(Q,{class:"tool-icon"}),l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.endShow")),1)])]),l.createElementVNode("div",g9t,[l.createElementVNode("div",{class:l.normalizeClass(["slide-list-wrap",{"laser-pen":d.value}]),ref_key:"slideListWrapRef",ref:s},[l.withDirectives(l.createVNode(D5e,{slideWidth:l.unref(A),slideHeight:l.unref(S),animationIndex:l.unref(R),turnSlideToId:l.unref(b),manualExitFullscreen:l.unref(N),onWheel:I[6]||(I[6]=oe=>l.unref(h)(oe)),onTouchstart:I[7]||(I[7]=oe=>l.unref(p)(oe)),onTouchend:I[8]||(I[8]=oe=>l.unref(v)(oe))},null,8,["slideWidth","slideHeight","animationIndex","turnSlideToId","manualExitFullscreen"]),[[te,O]]),u.value?(l.openBlock(),l.createBlock(X5e,{key:0,slideWidth:l.unref(A),slideHeight:l.unref(S),left:-365,top:-155,onClose:I[9]||(I[9]=oe=>u.value=!1)},null,8,["slideWidth","slideHeight"])):l.createCommentVNode("",!0),f.value?(l.openBlock(),l.createBlock(U5e,{key:1,left:75,onClose:I[10]||(I[10]=oe=>f.value=!1)})):l.createCommentVNode("",!0)],2),l.createElementVNode("div",{class:"thumbnails",ref_key:"thumbnailsRef",ref:c,onWheel:I[11]||(I[11]=l.withModifiers(oe=>L(oe),["prevent"]))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(n),(oe,ue)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["thumbnail",{active:ue===l.unref(a)}]),key:oe.id,onClick:ke=>l.unref(y)(ue)},[l.createVNode(ns,{slide:oe,size:120/l.unref(r),visible:ue<l.unref(M)},null,8,["slide","size","visible"])],10,y9t))),128))],544)]),l.createElementVNode("div",b9t,[l.createElementVNode("div",A9t,[l.createElementVNode("span",null,l.toDisplayString(_.$t("screen.speakerNotes")),1),l.createElementVNode("span",null,"P "+l.toDisplayString(l.unref(a)+1)+" / "+l.toDisplayString(l.unref(n).length),1)]),l.createElementVNode("div",{class:l.normalizeClass(["remark-content ProseMirror-static",{empty:!E.value}]),style:l.normalizeStyle({fontSize:C.value+"px"}),innerHTML:E.value||_.$t("screen.noNotes")},null,14,R9t),l.createElementVNode("div",x9t,[l.createElementVNode("div",{class:l.normalizeClass(["scale-btn",{disable:C.value===12}]),onClick:I[12]||(I[12]=oe=>P(C.value-2))},[l.createVNode(H,{class:"icon"})],2),l.createElementVNode("div",{class:l.normalizeClass(["scale-btn",{disable:C.value===40}]),onClick:I[13]||(I[13]=oe=>P(C.value+2))},[l.createVNode(K,{class:"icon"})],2)])])])}}}),[["__scopeId","data-v-4fc0abe0"]]),w9t={class:"pptist-screen"},M9t=et(l.defineComponent({__name:"index",setup(e){const t=l.ref("base"),n=o=>{t.value=o},{exitScreening:a}=Uv(),r=o=>{o.key.toUpperCase()===Vt.ESC&&a()};return l.onMounted(()=>document.addEventListener("keydown",r)),l.onUnmounted(()=>document.removeEventListener("keydown",r)),(o,i)=>(l.openBlock(),l.createElementBlock("div",w9t,[t.value==="base"?(l.openBlock(),l.createBlock(p9t,{key:0,changeViewMode:n})):t.value==="presenter"?(l.openBlock(),l.createBlock(S9t,{key:1,changeViewMode:n})):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-2f0dc4b8"]]),N9t=l.defineComponent({__name:"MobileEditableElement",props:{elementInfo:{},elementIndex:{},selectElement:{type:Function}},setup(e){const t=e,n=l.computed(()=>({[tn.IMAGE]:OSe,[tn.TEXT]:f4e,[tn.SHAPE]:d4e,[tn.LINE]:h4e,[tn.CHART]:p4e,[tn.TABLE]:v4e,[tn.LATEX]:m4e,[tn.VIDEO]:A4e,[tn.AUDIO]:x4e})[t.elementInfo.type]||null);return(a,r)=>(l.openBlock(),l.createElementBlock("div",{class:"mobile-editable-element",style:l.normalizeStyle({zIndex:e.elementIndex})},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.value),{elementInfo:e.elementInfo,selectElement:e.selectElement,contextmenus:()=>null},null,8,["elementInfo","selectElement"]))],4))}}),T9t=et(l.defineComponent({__name:"MobileOperate",props:{elementInfo:{},isSelected:{type:Boolean},canvasScale:{},scaleElement:{type:Function},rotateElement:{type:Function}},setup(e){const t=e,n=l.computed(()=>"rotate"in t.elementInfo?t.elementInfo.rotate:0),a=l.computed(()=>t.elementInfo.width*t.canvasScale),r=l.computed(()=>t.elementInfo.height*t.canvasScale),{borderLines:o,resizeHandlers:i,textElementResizeHandlers:s}=z1(a,r),c=t.elementInfo.type==="text"||t.elementInfo.type==="table"?s:i,u=l.computed(()=>["chart","video","audio"].includes(t.elementInfo.type));return(f,d)=>(l.openBlock(),l.createElementBlock("div",{class:"mobile-operate",style:l.normalizeStyle({top:e.elementInfo.top*e.canvasScale+"px",left:e.elementInfo.left*e.canvasScale+"px",transform:`rotate(${n.value}deg)`,transformOrigin:`${e.elementInfo.width*e.canvasScale/2}px ${e.elementInfo.height*e.canvasScale/2}px`})},[e.isSelected?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),h=>(l.openBlock(),l.createBlock(G1,{class:"operate-border-line",key:h.type,type:h.type,style:l.normalizeStyle(h.style)},null,8,["type","style"]))),128)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c),h=>(l.openBlock(),l.createBlock(Om,{class:"operate-resize-handler",key:h.direction,type:h.direction,rotate:e.elementInfo.rotate,style:l.normalizeStyle(h.style),onTouchstart:l.withModifiers(p=>e.scaleElement(p,e.elementInfo,h.direction),["stop"])},null,8,["type","rotate","style","onTouchstart"]))),128)),u.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(mx,{key:0,class:"operate-rotate-handler",style:l.normalizeStyle({left:a.value/2+"px"}),onTouchstart:d[0]||(d[0]=l.withModifiers(h=>e.rotateElement(h,e.elementInfo),["stop"]))},null,8,["style"]))],64)):l.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-4b96e2bb"]]),C9t={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function k9t(e,t){return l.openBlock(),l.createElementBlock("svg",C9t,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linecap":"round",d:"M13 12.432v-4.62A2.813 2.813 0 0 1 15.813 5h24.374A2.813 2.813 0 0 1 43 7.813v24.375A2.813 2.813 0 0 1 40.188 35h-4.672"}),l.createElementVNode("path",{d:"M32.188 13H7.811A2.813 2.813 0 0 0 5 15.813v24.374A2.813 2.813 0 0 0 7.813 43h24.375A2.813 2.813 0 0 0 35 40.188V15.811A2.813 2.813 0 0 0 32.188 13Z"})],-1)])])}const W5e=l.markRaw({name:"icon-park-outline-copy",render:k9t}),L9t=["onClick"],E9t={class:"label"},Y5e=et(l.defineComponent({__name:"MobileThumbnails",setup(e){const t=mt(),{slides:n,slideIndex:a}=Qe(t),{sortSlides:r}=Vd(),{slidesLoadLimit:o}=e1(),i=c=>{t.updateSlideIndex(c)},s=c=>{const{newIndex:u,oldIndex:f}=c;u===void 0||f===void 0||u===f||r(u,f)};return(c,u)=>(l.openBlock(),l.createBlock(l.unref(a_),{class:"mobile-thumbnails",modelValue:l.unref(n),animation:200,scroll:!0,scrollSensitivity:50,delayOnTouchOnly:!0,delay:800,itemKey:"id",onEnd:s},{item:l.withCtx(({element:f,index:d})=>[l.createElementVNode("div",{class:l.normalizeClass(["thumbnail-item",{active:l.unref(a)===d}]),onClick:h=>i(d)},[l.createElementVNode("div",E9t,l.toDisplayString(d+1),1),l.createVNode(ns,{class:"thumbnail",slide:f,size:120,visible:d<l.unref(o)},null,8,["slide","visible"])],10,L9t)]),_:1},8,["modelValue"]))}}),[["__scopeId","data-v-2fd38eb8"]]),O9t={class:"slide-toolbar"},P9t={class:"remark"},_9t=["value","placeholder"],I9t={class:"toolbar"},V9t=et(l.defineComponent({__name:"SlideToolbar",setup(e){const t=mt(),{viewportRatio:n,currentSlide:a,viewportSize:r}=Qe(t),{t:o}=In(),{createSlide:i,copyAndPasteSlide:s,deleteSlide:c}=Vd(),{createTextElement:u,createImageElement:f,createShapeElement:d}=Id(),h=()=>{u({left:(r.value-400)/2,top:(r.value*n.value-56)/2,width:400,height:56},{content:`<p>${o("mobile.newText")}</p>`})},p=y=>{!y||!y[0]||_d(y[0]).then(b=>f(b))},v=y=>{const A={square:{viewBox:[200,200],path:"M 0 0 L 200 0 L 200 200 L 0 200 Z"},round:{viewBox:[200,200],path:"M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z"}},S=200;d({left:(r.value-S)/2,top:(r.value*n.value-S)/2,width:S,height:S},A[y])},m=l.computed(()=>{var y;return((y=a.value)==null?void 0:y.remark)||""}),g=y=>{const b=y.target.value;t.updateSlide({remark:b})};return(y,b)=>{const R=Df,A=W5e,S=J$,w=yx,M=LM,T=cz,N=B5e;return l.openBlock(),l.createElementBlock("div",O9t,[l.createElementVNode("div",P9t,[l.createElementVNode("textarea",{value:m.value,placeholder:y.$t("mobile.speakerNotes"),onInput:b[0]||(b[0]=C=>g(C))},null,40,_9t)]),l.createElementVNode("div",I9t,[l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:b[1]||(b[1]=C=>l.unref(i)())},{default:l.withCtx(()=>[l.createVNode(R,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.newSlide")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[2]||(b[2]=C=>l.unref(s)())},{default:l.withCtx(()=>[l.createVNode(A,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.copy")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[3]||(b[3]=C=>l.unref(c)())},{default:l.withCtx(()=>[l.createVNode(S,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.delete")),1)]),_:1})]),_:1}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:b[4]||(b[4]=C=>h())},{default:l.withCtx(()=>[l.createVNode(w,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.text")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(Gd,{onChange:b[5]||(b[5]=C=>p(C))},{default:l.withCtx(()=>[l.createVNode(M,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.image")),1)]),_:1})]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[6]||(b[6]=C=>v("square"))},{default:l.withCtx(()=>[l.createVNode(T,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.rectangle")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:b[7]||(b[7]=C=>v("round"))},{default:l.withCtx(()=>[l.createVNode(N,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(y.$t("mobile.circle")),1)]),_:1})]),_:1})]),l.createVNode(Y5e)])}}}),[["__scopeId","data-v-99069ef4"]]),F9t={class:"element-toolbar"},D9t={class:"content"},B9t={key:0,class:"style"},X9t={key:1,class:"row-block"},U9t={class:"label"},W9t={class:"colors"},Y9t=["onClick"],Z9t={class:"color custom"},K9t={key:2,class:"row-block"},H9t={class:"label"},Q9t={class:"colors"},z9t=["onClick"],G9t={class:"color custom"},J9t={key:3,class:"tip"},j9t={key:1,class:"common"},q9t=et(l.defineComponent({__name:"ElementToolbar",setup(e){const t=["#000000","#ffffff","#eeece1","#1e497b","#4e81bb","#e2534d","#9aba60","#8165a0","#47acc5","#c21401","#ff1e02","#ffc12a","#ffff3a","#90cf5b","#00af57"],n=Tt(),a=mt(),{handleElement:r,handleElementId:o,richTextAttrs:i}=Qe(n),{t:s}=In(),{addHistorySnapshot:c}=mn(),u=(N,C)=>{a.updateElement({id:N,props:C}),c()},f=l.computed(()=>[{key:"style",label:s("mobile.style")},{key:"common",label:s("mobile.layout")}]),d=l.ref("common"),h=l.computed(()=>{var N;return r.value?!!(r.value.type==="text"||r.value.type==="shape"&&((N=r.value.text)!=null&&N.content)):!1}),p=l.computed(()=>{var N;return r.value?!!(r.value.type==="text"||r.value.type==="table"||r.value.type==="latex"||r.value.type==="shape"&&((N=r.value.text)!=null&&N.content)):!1}),v=l.computed(()=>r.value?r.value.type==="text"||r.value.type==="shape"||r.value.type==="chart"||r.value.type==="table"||r.value.type==="line"||r.value.type==="audio":!1),{orderElement:m}=yM(),{alignElementToCanvas:g}=d6(),{addElementsFromData:y}=NA(),{deleteElement:b}=mM(),R=()=>{const N=JSON.parse(JSON.stringify(r.value));y([N])},A=(N,C)=>{Wo.emit(No.RICH_TEXT_COMMAND,{action:{command:N,value:C}})},S=l.computed(()=>{var N,C;return r.value?r.value.type==="text"||r.value.type==="shape"&&((N=r.value.text)!=null&&N.content)?i.value.color:r.value.type==="table"?(C=JSON.parse(JSON.stringify(r.value.data))[0][0].style)==null?void 0:C.color:r.value.type==="latex"?r.value.color:"#fff":"#fff"}),w=N=>{var C;if(r.value){if((r.value.type==="text"||r.value.type==="shape"&&((C=r.value.text)!=null&&C.content))&&Wo.emit(No.RICH_TEXT_COMMAND,{action:{command:"color",value:N}}),r.value.type==="table"){const E=JSON.parse(JSON.stringify(r.value.data));for(let L=0;L<E.length;L++)for(let P=0;P<E[L].length;P++){const O=E[L][P].style||{};E[L][P].style={...O,color:N}}u(o.value,{data:E})}r.value.type==="latex"&&u(o.value,{color:N})}},M=l.computed(()=>{var N;return r.value?r.value.type==="text"||r.value.type==="shape"||r.value.type==="chart"?r.value.fill:r.value.type==="table"?(N=JSON.parse(JSON.stringify(r.value.data))[0][0].style)==null?void 0:N.backcolor:r.value.type==="audio"||r.value.type==="line"?r.value.color:"#fff":"#fff"}),T=N=>{if(r.value){if((r.value.type==="text"||r.value.type==="shape"||r.value.type==="chart")&&u(o.value,{fill:N}),r.value.type==="table"){const C=JSON.parse(JSON.stringify(r.value.data));for(let E=0;E<C.length;E++)for(let L=0;L<C[E].length;L++){const P=C[E][L].style||{};C[E][L].style={...P,backcolor:N}}u(o.value,{data:C})}(r.value.type==="audio"||r.value.type==="line")&&u(o.value,{color:N})}};return(N,C)=>{const E=N6,L=B$,P=D$,O=F$,_=yx,I=sN,D=iN,W=oN,Y=W5e,G=J$,F=iMe,Z=oMe,Q=rMe,H=aMe,K=z$,te=Q$,oe=H$,ue=K$,ke=Z$,ve=Y$;return l.openBlock(),l.createElementBlock("div",F9t,[l.createVNode(Tf,{tabs:f.value,value:d.value,"onUpdate:value":C[0]||(C[0]=xe=>d.value=xe),tabsStyle:{marginBottom:"8px"},tabStyle:{width:"30%",margin:"0 10%"}},null,8,["tabs","value"]),l.createElementVNode("div",D9t,[d.value==="style"?(l.openBlock(),l.createElementBlock("div",B9t,[h.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).bold,onClick:C[1]||(C[1]=xe=>A("bold"))},{default:l.withCtx(()=>[l.createVNode(E)]),_:1},8,["checked"]),l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).em,onClick:C[2]||(C[2]=xe=>A("em"))},{default:l.withCtx(()=>[l.createVNode(L)]),_:1},8,["checked"]),l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).underline,onClick:C[3]||(C[3]=xe=>A("underline"))},{default:l.withCtx(()=>[l.createVNode(P)]),_:1},8,["checked"]),l.createVNode(Cl,{style:{flex:"1"},checked:l.unref(i).strikethrough,onClick:C[4]||(C[4]=xe=>A("strikethrough"))},{default:l.withCtx(()=>[l.createVNode(O)]),_:1},8,["checked"])]),_:1}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[5]||(C[5]=xe=>A("fontsize-add"))},{default:l.withCtx(()=>[l.createVNode(_),C[22]||(C[22]=l.createTextVNode("+",-1))]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[6]||(C[6]=xe=>A("fontsize-reduce"))},{default:l.withCtx(()=>[l.createVNode(_),C[23]||(C[23]=l.createTextVNode("-",-1))]),_:1})]),_:1}),l.createVNode(Kf,{class:"row","button-style":"solid",value:l.unref(i).align,"onUpdate:value":C[7]||(C[7]=xe=>A("align",xe))},{default:l.withCtx(()=>[l.createVNode(La,{value:"left",style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(I)]),_:1}),l.createVNode(La,{value:"center",style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(D)]),_:1}),l.createVNode(La,{value:"right",style:{flex:"1"}},{default:l.withCtx(()=>[l.createVNode(W)]),_:1})]),_:1},8,["value"])],64)):l.createCommentVNode("",!0),p.value?(l.openBlock(),l.createElementBlock("div",X9t,[l.createElementVNode("div",U9t,l.toDisplayString(N.$t("mobile.fontColor")),1),l.createElementVNode("div",W9t,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(t,xe=>l.createElementVNode("div",{class:"color",key:xe,onClick:Me=>w(xe)},[l.createElementVNode("div",{class:"color-block",style:l.normalizeStyle({backgroundColor:xe})},null,4)],8,Y9t)),64)),l.createElementVNode("div",Z9t,[l.createVNode(nn,{trigger:"click"},{content:l.withCtx(()=>[l.createVNode(cr,{modelValue:S.value,"onUpdate:modelValue":C[8]||(C[8]=xe=>w(xe))},null,8,["modelValue"])]),default:l.withCtx(()=>[C[24]||(C[24]=l.createElementVNode("div",{class:"color-block"},null,-1))]),_:1})])])])):l.createCommentVNode("",!0),v.value?(l.openBlock(),l.createElementBlock("div",K9t,[l.createElementVNode("div",H9t,l.toDisplayString(N.$t("mobile.fillColor")),1),l.createElementVNode("div",Q9t,[(l.openBlock(),l.createElementBlock(l.Fragment,null,l.renderList(t,xe=>l.createElementVNode("div",{class:"color",key:xe,onClick:Me=>T(xe)},[l.createElementVNode("div",{class:"color-block",style:l.normalizeStyle({backgroundColor:xe})},null,4)],8,z9t)),64)),l.createElementVNode("div",G9t,[l.createVNode(nn,{trigger:"click"},{content:l.withCtx(()=>[l.createVNode(cr,{modelValue:M.value,"onUpdate:modelValue":C[9]||(C[9]=xe=>T(xe))},null,8,["modelValue"])]),default:l.withCtx(()=>[C[25]||(C[25]=l.createElementVNode("div",{class:"color-block"},null,-1))]),_:1})])])])):l.createCommentVNode("",!0),!h.value&&!p.value&&!v.value?(l.openBlock(),l.createElementBlock("div",J9t,l.toDisplayString(N.$t("mobile.noAvailableProps")),1)):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0),d.value==="common"?(l.openBlock(),l.createElementBlock("div",j9t,[l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[10]||(C[10]=xe=>R())},{default:l.withCtx(()=>[l.createVNode(Y,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.copy")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[11]||(C[11]=xe=>l.unref(b)())},{default:l.withCtx(()=>[l.createVNode(G,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.delete")),1)]),_:1})]),_:1}),l.createVNode(Ln,{margin:20}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[12]||(C[12]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).TOP))},{default:l.withCtx(()=>[l.createVNode(F,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.toTop")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[13]||(C[13]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).BOTTOM))},{default:l.withCtx(()=>[l.createVNode(Z,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.toBottom")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[14]||(C[14]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).UP))},{default:l.withCtx(()=>[l.createVNode(Q,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.moveUp")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[15]||(C[15]=xe=>l.unref(m)(l.unref(r),l.unref(Yr).DOWN))},{default:l.withCtx(()=>[l.createVNode(H,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.moveDown")),1)]),_:1})]),_:1}),l.createVNode(Ln,{margin:20}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[16]||(C[16]=xe=>l.unref(g)(l.unref(Gn).LEFT))},{default:l.withCtx(()=>[l.createVNode(K,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignLeft")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[17]||(C[17]=xe=>l.unref(g)(l.unref(Gn).HORIZONTAL))},{default:l.withCtx(()=>[l.createVNode(te,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignHorizontalCenter")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[18]||(C[18]=xe=>l.unref(g)(l.unref(Gn).RIGHT))},{default:l.withCtx(()=>[l.createVNode(oe,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignRight")),1)]),_:1})]),_:1}),l.createVNode(Mr,{class:"row"},{default:l.withCtx(()=>[l.createVNode(vt,{style:{flex:"1"},onClick:C[19]||(C[19]=xe=>l.unref(g)(l.unref(Gn).TOP))},{default:l.withCtx(()=>[l.createVNode(ue,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignTop")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[20]||(C[20]=xe=>l.unref(g)(l.unref(Gn).VERTICAL))},{default:l.withCtx(()=>[l.createVNode(ke,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignVerticalCenter")),1)]),_:1}),l.createVNode(vt,{style:{flex:"1"},onClick:C[21]||(C[21]=xe=>l.unref(g)(l.unref(Gn).BOTTOM))},{default:l.withCtx(()=>[l.createVNode(ve,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(N.$t("mobile.alignBottom")),1)]),_:1})]),_:1})])):l.createCommentVNode("",!0)])])}}}),[["__scopeId","data-v-ed2d28f4"]]),$9t={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function eDt(e,t){return l.openBlock(),l.createElementBlock("svg",$9t,[...t[0]||(t[0]=[l.createElementVNode("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"4",d:"M23.992 6H6v36h18m9-9l9-9l-9-9m-17 8.992h26"},null,-1)])])}const Z5e=l.markRaw({name:"icon-park-outline-logout",render:eDt}),tDt={class:"mobile-editor-header"},nDt={class:"history"},aDt=et(l.defineComponent({__name:"Header",props:{changeMode:{type:Function}},setup(e){const{canUndo:t,canRedo:n}=Qe(eA()),{redo:a,undo:r}=mn();return(o,i)=>{const s=O4e,c=E4e,u=Z5e;return l.openBlock(),l.createElementBlock("div",tDt,[l.createElementVNode("div",nDt,[l.createElementVNode("div",{class:l.normalizeClass(["history-item",{disable:!l.unref(t)}]),onClick:i[0]||(i[0]=l.withModifiers(f=>l.unref(r)(),["stop"]))},[l.createVNode(s),l.createTextVNode(" "+l.toDisplayString(o.$t("mobile.undo")),1)],2),l.createElementVNode("div",{class:l.normalizeClass(["history-item",{disable:!l.unref(n)}]),onClick:i[1]||(i[1]=l.withModifiers(f=>l.unref(a)(),["stop"]))},[l.createVNode(c),l.createTextVNode(" "+l.toDisplayString(o.$t("mobile.redo")),1)],2)]),l.createElementVNode("div",{class:"back",onClick:i[2]||(i[2]=f=>e.changeMode("preview"))},[l.createVNode(u),l.createTextVNode(" "+l.toDisplayString(o.$t("mobile.exitEdit")),1)])])}}}),[["__scopeId","data-v-33a4cccb"]]),rDt={class:"mobile-editor"},oDt=et(l.defineComponent({__name:"index",props:{changeMode:{type:Function}},setup(e){const t=mt(),n=Tt(),{slideIndex:a,currentSlide:r,viewportRatio:o,viewportSize:i}=Qe(t),{activeElementIdList:s,handleElement:c}=Qe(n),u=l.shallowRef(null),f=l.shallowRef(null),d=l.ref([]),h=l.computed(()=>r.value.background),{backgroundStyle:p}=GE(h),v=l.computed(()=>{if(!u.value)return 1;const M=u.value.clientWidth,T=u.value.clientHeight;return T/M>=o.value?(M-20)/i.value:(T-20)/o.value/i.value});l.onMounted(()=>{s.value.length&&n.setActiveElementIdList([]),a.value!==0&&t.updateSlideIndex(0)});const m=l.computed(()=>({width:i.value*v.value+"px",height:i.value*o.value*v.value+"px"})),g=l.ref([]),y=()=>{g.value=r.value?JSON.parse(JSON.stringify(r.value.elements)):[]};l.watchEffect(y);const{dragElement:b}=ESe(g,d,v),{scaleElement:R}=LSe(g,d,v),{rotateElement:A}=MSe(g,f,v),S=(M,T,N=!0)=>{s.value.includes(T.id)||(n.setActiveElementIdList([T.id]),n.setHandleElementId(T.id)),N&&b(M,T)},w=()=>{n.setActiveElementIdList([])};return(M,T)=>(l.openBlock(),l.createElementBlock("div",rDt,[l.createVNode(aDt,{changeMode:e.changeMode},null,8,["changeMode"]),l.createElementVNode("div",{class:"content",ref_key:"contentRef",ref:u,onTouchstart:T[0]||(T[0]=N=>w())},[l.createElementVNode("div",{class:"viewport-wrapper","data-lt-ppt-slide-viewport":"",style:l.normalizeStyle(m.value)},[l.createElementVNode("div",{class:"background",style:l.normalizeStyle(l.unref(p))},null,4),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.value,(N,C)=>(l.openBlock(),l.createBlock(S4e,{key:C,type:N.type,axis:N.axis,length:N.length,canvasScale:v.value},null,8,["type","axis","length","canvasScale"]))),128)),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,N=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:N.id},[N.type!=="line"?(l.openBlock(),l.createBlock(T9t,{key:0,elementInfo:N,isSelected:l.unref(s).includes(N.id),canvasScale:v.value,scaleElement:l.unref(R),rotateElement:l.unref(A)},null,8,["elementInfo","isSelected","canvasScale","scaleElement","rotateElement"])):l.createCommentVNode("",!0)],64))),128)),l.createElementVNode("div",{class:"viewport",ref_key:"viewportRef",ref:f,style:l.normalizeStyle({transform:`scale(${v.value})`})},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(g.value,(N,C)=>(l.openBlock(),l.createBlock(N9t,{key:N.id,elementInfo:N,elementIndex:C+1,selectElement:S},null,8,["elementInfo","elementIndex"]))),128))],4)],4)],544),l.createVNode(V9t),l.unref(c)?(l.openBlock(),l.createBlock(q9t,{key:0})):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-fa1d4bca"]]),iDt={class:"header"},sDt=et(l.defineComponent({__name:"MobilePlayer",props:{changeMode:{type:Function}},setup(e){const t=mt(),{slides:n,slideIndex:a,viewportRatio:r}=Qe(t),{slidesWithTurningMode:o}=F5e(),i=l.ref(!1),s=l.ref({width:0,height:0});l.onMounted(()=>{a.value!==0&&t.updateSlideIndex(0),s.value={width:document.body.clientHeight,height:document.body.clientWidth}});const c=l.computed(()=>{const h=s.value.height/s.value.width;let p=0,v=0;return h>=r.value?(p=s.value.width,v=p*r.value):(v=s.value.height,p=v/r.value),{width:p,height:v}}),u=l.ref(null),f=h=>{u.value={x:h.changedTouches[0].pageX,y:h.changedTouches[0].pageY}},d=h=>{if(!u.value)return;const p=h.changedTouches[0].pageX-u.value.x,v=h.changedTouches[0].pageY-u.value.y,m=Math.abs(p),g=Math.abs(v);m>g&&m>50&&(p<0&&a.value>0&&t.updateSlideIndex(a.value-1),p>0&&a.value<n.value.length-1&&t.updateSlideIndex(a.value+1)),g>m&&g>50&&(v>0&&a.value>0&&t.updateSlideIndex(a.value-1),v<0&&a.value<n.value.length-1&&t.updateSlideIndex(a.value+1))};return(h,p)=>{const v=Z5e;return l.openBlock(),l.createElementBlock("div",{class:"mobile-player",style:l.normalizeStyle({width:s.value.width+"px",height:s.value.height+"px",transform:`rotate(90deg) translateY(-${s.value.height}px)`})},[l.createElementVNode("div",{class:"screen-slide-list",onClick:p[0]||(p[0]=m=>i.value=!i.value),onTouchstart:p[1]||(p[1]=m=>f(m)),onTouchend:p[2]||(p[2]=m=>d(m))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(m,g)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["slide-item",`turning-mode-${m.turningMode||"slideY"}`,{current:g===l.unref(a),before:g<l.unref(a),after:g>l.unref(a),hide:(g===l.unref(a)-1||g===l.unref(a)+1)&&m.turningMode!==l.unref(o)[l.unref(a)].turningMode,last:g===l.unref(a)-1,next:g===l.unref(a)+1}]),key:m.id},[Math.abs(l.unref(a)-g)<2?(l.openBlock(),l.createElementBlock("div",{key:0,class:"slide-content",style:l.normalizeStyle({width:c.value.width+"px",height:c.value.height+"px"})},[l.createVNode(ns,{slide:m,size:c.value.width},null,8,["slide","size"])],4)):l.createCommentVNode("",!0)],2))),128))],32),i.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",iDt,[l.createElementVNode("div",{class:"back",onClick:p[3]||(p[3]=m=>e.changeMode("preview"))},[l.createVNode(v),l.createTextVNode(" "+l.toDisplayString(h.$t("screen.endShow")),1)])]),l.createVNode(Y5e,{class:"thumbnails"})],64)):l.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-932eff7a"]]),lDt={class:"i-icon",viewBox:"0 0 48 48",width:"1em",height:"1em"};function cDt(e,t){return l.openBlock(),l.createElementBlock("svg",lDt,[...t[0]||(t[0]=[l.createElementVNode("g",{fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"4"},[l.createElementVNode("path",{"stroke-linecap":"round",d:"M16 40H6a2 2 0 0 1-2-2V10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v6"}),l.createElementVNode("path",{d:"M42 24H26a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V26a2 2 0 0 0-2-2Z"})],-1)])])}const uDt=l.markRaw({name:"icon-park-outline-full-screen-play",render:cDt}),fDt={class:"thumbnail-list"},dDt={class:"menu"},hDt=et(l.defineComponent({__name:"MobilePreview",props:{changeMode:{type:Function}},setup(e){const{slides:t}=Qe(mt()),{slidesLoadLimit:n}=e1(),a=Tt(),{showAIPPTDialog:r}=Qe(a),o=()=>a.setAIPPTDialogState(!0),i=()=>a.setAIPPTDialogState(!1),s=l.shallowRef(null),c=l.ref(0),u=l.ref(400);return l.onMounted(()=>{s.value&&(c.value=s.value.clientWidth,u.value=document.body.clientWidth-20)}),(f,d)=>{const h=W$,p=uDt;return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"mobile-preview",ref_key:"mobileRef",ref:s},[l.createElementVNode("div",fDt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(t),(v,m)=>(l.openBlock(),l.createElementBlock("div",{class:"thumbnail-item",key:v.id},[l.createVNode(ns,{slide:v,size:c.value-20,visible:m<l.unref(n)},null,8,["slide","size","visible"])]))),128))]),l.createElementVNode("div",dDt,[l.createElementVNode("div",{class:"menu-item",onClick:d[0]||(d[0]=v=>e.changeMode("editor"))},[l.createVNode(h,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(f.$t("common.edit")),1)]),l.createVNode(Ln,{type:"vertical",style:{height:"30px"}}),l.createElementVNode("div",{class:"menu-item",onClick:d[1]||(d[1]=v=>e.changeMode("player"))},[l.createVNode(p,{class:"icon"}),l.createTextVNode(" "+l.toDisplayString(f.$t("header.slideshow")),1)]),l.createVNode(Ln,{type:"vertical",style:{height:"30px"}}),l.createElementVNode("div",{class:"menu-item ai",onClick:d[2]||(d[2]=v=>o())},"AIPPT")])],512),l.createVNode(yh,{visible:!!l.unref(r),closeOnClickMask:!1,closeOnEsc:!1,width:u.value,closeButton:"",wrapStyle:{opacity:l.unref(r)==="running"?0:1},onClosed:d[3]||(d[3]=v=>i())},{default:l.withCtx(()=>[l.createVNode(C5e)]),_:1},8,["visible","width","wrapStyle"])],64)}}}),[["__scopeId","data-v-74fa7018"]]),pDt={class:"mobile"},vDt=et(l.defineComponent({__name:"index",setup(e){const t=l.ref("preview"),n=r=>t.value=r,a=l.computed(()=>({editor:oDt,player:sDt,preview:hDt})[t.value]||null);return(r,o)=>(l.openBlock(),l.createElementBlock("div",pDt,[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(a.value),{changeMode:n}))]))}}),[["__scopeId","data-v-d02011cb"]]),mDt={class:"lt-ppt-inner",style:{height:"100%"}},gDt=Object.freeze(Object.defineProperty({__proto__:null,default:l.defineComponent({__name:"InnerApp",props:{initData:{},onUploadFile:{type:Function},readonly:{type:Boolean},onChange:{type:Function},onSave:{type:Function},onInitFinished:{type:Function},onReturn:{type:Function}},setup(e){const t=e,n=H9e(),a=l.inject("__lt_ppt_theme__",l.ref("dark")),r=b=>{const R=document.documentElement;R.classList.remove("lt-ppt-theme-dark","lt-ppt-theme-light"),R.classList.add(`lt-ppt-theme-${b}`)};r(a.value),l.watch(a,b=>r(b));const o=mt(),i=eA(),s=l.inject(A4,null),{screening:c}=Qe(pY()),{slides:u}=Qe(o),{importJSONData:f,importPPTXFromUrl:d}=tH(),{saveSlides:h,saving:p,saveRendererVisible:v,offscreenCoverRef:m,savePresentation:g}=ome({bridge:s});s&&(s.save=g),l.provide(fre,g);const y={id:an(10),elements:[],background:{type:"solid",color:"#fff"}};return o.setSlides([y]),t.initData||(s==null||s.markSaved(),s==null||s.markReady()),l.provide("onUploadFile",t.onUploadFile),l.provide("onSave",t.onSave),l.provide("onReturn",t.onReturn),l.onMounted(async()=>{var A;const b=await i.initSnapshotDatabase().then(()=>!0).catch(()=>!1);if(!t.initData)return;let R=!1;try{t.initData.json?f(t.initData.json,!0):t.initData.pptUrl&&await d(t.initData.pptUrl,{cover:!0}),await l.nextTick(),await new Promise(S=>requestAnimationFrame(()=>S())),s==null||s.markSaved(),R=!0,b&&(await new Promise(S=>setTimeout(S,400)),await i.resetSnapshotDatabase())}finally{s==null||s.markReady(),R&&((A=t.onInitFinished)==null||A.call(t))}}),l.watch(u,b=>{t.onChange&&t.onChange(JSON.parse(JSON.stringify(b)))},{deep:!0}),(b,R)=>(l.openBlock(),l.createElementBlock("div",mDt,[l.unref(c)?(l.openBlock(),l.createBlock(M9t,{key:0})):l.unref(n)?(l.openBlock(),l.createBlock(zVt,{key:1,saving:l.unref(p)},null,8,["saving"])):(l.openBlock(),l.createBlock(vDt,{key:2})),l.unref(v)?(l.openBlock(),l.createElementBlock("div",{key:3,ref_key:"offscreenCoverRef",ref:m,class:"offscreen-cover"},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),A=>(l.openBlock(),l.createBlock(ns,{key:A.id,slide:A,size:800},null,8,["slide"]))),128))],512)):l.createCommentVNode("",!0)]))}})},Symbol.toStringTag,{value:"Module"})),yDt={class:"menu-content"},bDt=["onClick"],ADt={class:"text"},RDt={key:0,class:"sub-text"},xDt=et(l.defineComponent({__name:"MenuContent",props:{menus:{},handleClickMenuItem:{type:Function}},setup(e){return(t,n)=>{const a=l.resolveComponent("menu-content",!0);return l.openBlock(),l.createElementBlock("ul",yDt,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.menus,(r,o)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:r.text||o},[r.hide?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("li",{key:0,class:l.normalizeClass(["menu-item",{divider:r.divider,disable:r.disable}]),onClick:l.withModifiers(i=>e.handleClickMenuItem(r),["stop"])},[r.divider?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["menu-item-content",{"has-children":r.children,"has-handler":r.handler}])},[l.createElementVNode("span",ADt,l.toDisplayString(r.text),1),r.subText&&!r.children?(l.openBlock(),l.createElementBlock("span",RDt,l.toDisplayString(r.subText),1)):l.createCommentVNode("",!0),r.children&&r.children.length?(l.openBlock(),l.createBlock(a,{key:1,class:"sub-menu",menus:r.children,handleClickMenuItem:e.handleClickMenuItem},null,8,["menus","handleClickMenuItem"])):l.createCommentVNode("",!0)],2))],10,bDt))],64))),128))])}}}),[["__scopeId","data-v-124d579c"]]),SDt=l.defineComponent({__name:"index",props:{axis:{},el:{},menus:{},removeContextmenu:{type:Function}},setup(e){const t=e,n=l.computed(()=>{const{x:c,y:u}=t.axis,f=t.menus.filter(g=>!(g.divider||g.hide)).length,d=t.menus.filter(g=>g.divider).length,h=180,p=f*30+d*11+5*2,v=document.body.clientWidth,m=document.body.clientHeight;return{left:v<=c+h?c-h:c,top:m<=u+p?u-p:u}}),a=r=>{r.disable||r.children&&!r.handler||(r.handler&&r.handler(t.el),t.removeContextmenu())};return(r,o)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",{class:"pptist-contextmenu-mask",onContextmenu:o[0]||(o[0]=l.withModifiers(i=>e.removeContextmenu(),["prevent"])),onMousedown:o[1]||(o[1]=l.withModifiers(i=>e.removeContextmenu(),["left"]))},null,32),l.createElementVNode("div",{class:"pptist-contextmenu",style:l.normalizeStyle({left:n.value.left+"px",top:n.value.top+"px"}),onContextmenu:o[2]||(o[2]=l.withModifiers(()=>{},["prevent"]))},[l.createVNode(xDt,{menus:e.menus,handleClickMenuItem:a},null,8,["menus"])],36)],64))}}),IN="CTX_CONTEXTMENU_HANDLER",wDt=(e,t,n)=>{t.stopPropagation(),t.preventDefault();const a=n.value(e);if(!a)return;let r=null;const o=()=>{r&&(document.body.removeChild(r),r=null),e.classList.remove("contextmenu-active"),document.body.removeEventListener("scroll",o),window.removeEventListener("resize",o)},i={axis:{x:t.x,y:t.y},el:e,menus:a,removeContextmenu:o};r=document.createElement("div");const s=l.createVNode(SDt,i,null);l.render(s,r),document.body.appendChild(r),e.classList.add("contextmenu-active"),document.body.addEventListener("scroll",o),window.addEventListener("resize",o)},MDt={mounted(e,t){e[IN]=n=>wDt(e,n,t),e.addEventListener("contextmenu",e[IN])},unmounted(e){e&&e[IN]&&(e.removeEventListener("contextmenu",e[IN]),delete e[IN])}},VN="CTX_CLICK_OUTSIDE_HANDLER",NDt=(e,t,n)=>{const a=n.value,r=t.composedPath();(r?r.indexOf(e)<0:!e.contains(t.target))&&a(t)},TDt={mounted(e,t){e[VN]=n=>NDt(e,n,t),setTimeout(()=>{document.addEventListener("click",e[VN])},0)},unmounted(e){e[VN]&&(document.removeEventListener("click",e[VN]),delete e[VN])}},FN="TOOLTIP_INSTANCE",CDt={mounted(e,t){let n="",a="top",r=[300,0];typeof t.value=="string"?n=t.value:(n=t.value.content,t.value.placement!==void 0&&(a=t.value.placement),t.value.delay!==void 0&&(r=t.value.delay)),e[FN]=pR(e,{content:n,theme:"pptist-tooltip",duration:100,animation:"scale",allowHTML:!0,placement:a,delay:r})},updated(e,t){let n="";typeof t.value=="string"?n=t.value:n=t.value.content,e[FN]&&e[FN].setContent(n)},unmounted(e){e[FN]&&e[FN].destroy()}},kDt={mounted(e,t){K5e(e,t.value)},updated(e,t){K5e(e,t.value)},unmounted(e){LDt(e)}},LDt=e=>{const t=e.querySelector(".directive-loading-overlay");t&&t.remove(),e._vLoadingAddedPosition&&(e.style.removeProperty("position"),delete e._vLoadingAddedPosition)},K5e=(e,t)=>{let n=!1,a="";typeof t=="boolean"?n=t:(t.text&&(a=t.text),n=t.state);let r=e.querySelector(".directive-loading-overlay");n?(getComputedStyle(e).position==="static"&&(e.style.position="relative",e._vLoadingAddedPosition=!0),r||(r=document.createElement("div"),r.className="directive-loading-overlay",e.appendChild(r)),a?(r.classList.add("has-text"),r.style.setProperty("--directive-loading-text",`"${a}"`)):(r.classList.remove("has-text"),r.style.removeProperty("--directive-loading-text"))):(r&&r.remove(),e._vLoadingAddedPosition&&(e.style.removeProperty("position"),delete e._vLoadingAddedPosition))},EDt=Object.freeze(Object.defineProperty({__proto__:null,default:{install(e){e.directive("contextmenu",MDt),e.directive("click-outside",TDt),e.directive("tooltip",CDt),e.directive("loading",kDt)}}},Symbol.toStringTag,{value:"Module"}));tl.LtPPT=OIe,tl.loadFonts=_Ie,Object.defineProperty(tl,Symbol.toStringTag,{value:"Module"})});