pptx-vanilla-viewer 2.0.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ ${chunkR2NUNRIB_cjs.yh}`,(e.head??e.documentElement).appendChild(t);}function un
|
|
|
4
4
|
`),p.appendChild(h);}p.append(d,u),g&&p.appendChild(g);for(let h of x)p.appendChild(h);n.appendChild(p);let v=false,f=()=>{v||(v=true,clearTimeout(b),p.remove(),e.onDone());},b=setTimeout(f,Math.max(0,s)+50);return f}function di(e,t){e.style.background="none",e.style.backgroundColor="transparent";let n=new Set(t),o=new Set;for(let r of e.querySelectorAll("[data-element-id]")){let i=r.dataset.elementId;if(!(i===void 0||!n.has(i))){for(let a=r;a&&a!==e;)o.add(a),a=a.parentElement;for(let a of r.querySelectorAll("[data-element-id]"))o.add(a);}}for(let r of [...e.querySelectorAll("[data-element-id]")])o.has(r)||r.remove();return e}function xn(e,t,n,o,r){let i=e.createElement("div");return i.className="pptxv-transition-layer",i.dataset.pptxTransitionLayer=r,i.style.position="absolute",i.style.inset="0",i.style.overflow="hidden",i.style.zIndex=String(n),i.style.willChange="transform, opacity, clip-path, filter",o!=="none"&&(i.style.animation=o),i.appendChild(t),i}var pt=null;function gn(e,t=false){mi(),!(typeof Audio>"u")&&(pt=new Audio(e),pt.loop=t,pt.play().catch(()=>{}));}function mi(){pt&&(pt.pause(),pt.currentTime=0,pt=null);}function hw(e,t){for(let n of e.steps){if(n.command){let o=n.command,r=window.setTimeout(()=>{chunkR2NUNRIB_cjs.vb(o,t.frameRoot);},Math.max(0,n.delayMs));t.timers.push(r);continue}n.stopSound?mi():n.soundPath&&(t.onPlayActionSound??gn)(n.soundPath);}t.setStates(n=>{let o=new Map(n);for(let r of e.steps){if(r.command)continue;let i=o.get(r.elementId)??{visible:true},a=r.presetClass==="exit"?i.visible:true;o.set(r.elementId,{visible:a,cssAnimation:r.cssAnimation,animatesFill:r.colorTargets?.includes("fill")?true:void 0,animatesStroke:r.colorTargets?.includes("stroke")?true:void 0});}return o});for(let n of e.steps){if(n.command)continue;let o=window.setTimeout(()=>{t.setStates(r=>{let i=new Map(r),a=i.get(n.elementId)??{visible:true},s=n.presetClass==="exit"||n.hideAfterEffect?false:a.visible;return i.set(n.elementId,{visible:s,cssAnimation:n.holdEndState?n.cssAnimation:void 0}),i});},Math.max(0,n.delayMs+n.durationMs+8));t.timers.push(o);}}function ui(e){e.current!==null&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e.current),e.current=null;}function yw(e,t,n){ui(n.buildHandle);let o=chunkR2NUNRIB_cjs.ub.collectBuildStepIds(t);if(o.length===0||typeof requestAnimationFrame!="function")return;let r=performance.now(),i=()=>{let a=performance.now()-r,s=e.computeStatesFor(o,{elapsedMs:a});n.setStates(l=>{let d=new Map(l);for(let u of o){let m=s.get(u)?.build;if(!m)continue;let g=d.get(u)??{visible:true,cssAnimation:void 0};d.set(u,{...g,build:m});}return d});let p=false;for(let l of o){let d=s.get(l)?.build;if(d&&d.progress<1){p=true;break}}n.buildHandle.current=p?requestAnimationFrame(i):null;};i();}function Ut(e,t,n){hw(t,n),yw(e,t,n);}function bn(e,t){if(!e.shouldAutoAdvance())return;let n=e.peekNext();if(!n)return;let o=e.getAutoAdvanceDelay()+(n.autoAdvanceDelayMs??0),r=window.setTimeout(()=>{let i=e.advance();i&&(Ut(e,i,t),bn(e,t));},Math.max(0,o));t.timers.push(r);}function xi(e){if(e instanceof Element)return e.closest("[data-element-id]")?.dataset.elementId}function zb(e,t){e.addEventListener("click",n=>{let o=t.getController(),r=xi(n.target);if(!r||!o?.hasInteractiveSequence(r))return;let i=o.advanceInteractive(r);i&&(n.stopPropagation(),t.play(o,i));}),e.addEventListener("mouseover",n=>{let o=t.getController(),r=xi(n.target);if(!r||!o?.hasHoverSequence(r))return;o.resetHover(r);let i=o.advanceHover(r);i&&t.play(o,i);}),e.addEventListener("mouseout",n=>{let o=t.getController(),r=xi(n.target);r&&o?.hasHoverSequence(r)&&o.resetHover(r);});}function gi(){let e=new Map,t=[],n={current:null},o=null,r=null,i=null,a=-1,s=false,p=null,l=new Map,d=null,u=false,m,g=()=>o?.interactiveTriggerShapeIds??new Set,x=()=>o?.hoverTriggerShapeIds??new Set,v=y=>{e.clear();for(let[w,C]of y)e.set(w,C);b();},f=()=>{let y=new Set;for(let[w,C]of e){(C.build||C.animatesFill||C.animatesStroke)&&y.add(w);let A=w.indexOf("::");A>0&&y.add(w.slice(0,A));}return Array.from(y)},b=()=>{if(!r)return;let y=f();y.length>0&&d?.(y),li(r,e,g(),x());},h={setStates:y=>{v(y(new Map(e)));},timers:t,buildHandle:n,onPlayActionSound:y=>{gn(l.get(y)??y);},frameRoot:()=>r},S=()=>{p&&(p(),p=null);},E=()=>{for(let y of t)window.clearTimeout(y);t.length=0,ui(n);},T=()=>{S(),E(),o=null,e.clear(),r=null,i=null;},k=(y,w,C=false)=>{if(o=chunkR2NUNRIB_cjs.ub.fromSlide(y),un(w,o.keyframesCss),v(o.computeStates()),u=false,C){u=o.hasMoreSteps(),o.completeAll(),v(o.computeStates());return}if(o.hasMoreSteps()){let A=o.peekNext();if(A?.autoAdvance){let P=o,I=window.setTimeout(()=>{let L=P.advance();L&&(Ut(P,L,h),bn(P,h));},A.autoAdvanceDelayMs??0);t.push(I);}}};return {elementStates:e,advance(){if(!o||!o.hasMoreSteps())return false;let y=o.advance();return y?(Ut(o,y,h),bn(o,h),true):false},isComplete(){return !o||!o.hasMoreSteps()},isSeededCompleted(){return u},replayCurrentSlide(y){m&&(E(),k(m,y));},syncStage(y){S();let w=y.showWithAnimation!==false;if(!y.presenting||!y.slide||!w){E(),o=null,e.clear(),un(y.doc,""),r=y.presenting?y.stage:null,i=y.presenting?y.stage:null,a=y.slideIndex,s=y.presenting;return}st(y.doc),l=y.mediaDataUrls??new Map,d=y.reRenderElements??null,r=y.stage;let C=!s,A=y.slideIndex!==a,P=m;m=y.slide,C||A||!o?(E(),k(y.slide,y.doc,y.seedCompleted===true)):b();let I=y.slide.transition;if(!C&&A&&i&&I&&I.type&&I.type!=="none"){let L=y.stage.cloneNode(true);p=ci({doc:y.doc,stageWrap:y.stageWrap,outgoing:i,incoming:L,transition:I,outgoingSlide:P,incomingSlide:y.slide,onDone:()=>{p=null;}});}zb(y.stage,{getController:()=>o,play:(L,D)=>{Ut(L,D,h);}}),i=y.stage,a=y.slideIndex,s=true;},reset(){T(),a=-1,s=false;}}}var _b=["fromTop","fromBottom","fromLeft","fromRight"],Gb=[{value:"ease",labelKey:"pptx.animation.timingCurve.ease"},{value:"ease-in",labelKey:"pptx.animation.timingCurve.easeIn"},{value:"ease-out",labelKey:"pptx.animation.timingCurve.easeOut"},{value:"linear",labelKey:"pptx.animation.timingCurve.linear"}],Ub=["none","untilNextClick","untilEndOfSlide"];function vn(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-anim-field"),r=chunkR2NUNRIB_cjs.Ok(e,"span");return r.textContent=t,o.appendChild(r),n.appendChild(o),o}function lt(e,t,n,o,r){let i=vn(e,t,r),a=e.createElement("select");a.setAttribute("aria-label",t);for(let s of n){let p=e.createElement("option");p.value=s.value,p.textContent=s.label,a.appendChild(p);}return a.addEventListener("change",()=>o(a.value)),i.appendChild(a),a}function fn(e,t,n,o,r){let i=vn(e,t,r),a=e.createElement("input");return a.type="number",a.min=String(n.min),a.max=String(n.max),a.step=String(n.step),a.addEventListener("change",()=>o(a.valueAsNumber)),i.appendChild(a),a}function bi(e){return chunkR2NUNRIB_cjs.c(e)&&e.text?e.text.slice(0,24):e.type}function $b(e,t){let n=t.find(o=>o.id===e.elementId);return n?bi(n):e.elementId.slice(0,8)}function Sw(e){return e.entrance?"entrance":e.emphasis?"emphasis":e.exit?"exit":"none"}function Wb(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.cb(o);n.replaceChildren(...o.map((s,p)=>{let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-anim-bar-seg");l.classList.add(`is-${Sw(s)}`),l.classList.toggle("is-selected",s.elementId===i),l.style.left=`${a[p].leftPercent}%`,l.style.width=`${a[p].widthPercent}%`;let d=chunkR2NUNRIB_cjs.db(s,t);return l.title=`${$b(s,r)} - ${d} (${s.durationMs??500}ms)`,l}));}function Kb(e,t,n,o,r,i,a,s,p){let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline-row");l.classList.toggle("is-selected",n.elementId===a);let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-animation-timeline-name");d.textContent=`${o+1}. ${$b(n,i)}`;let u=(m,g,x)=>{let v=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-btn");return v.type="button",v.textContent=g,v.setAttribute("aria-label",t(m==="up"?"pptx.animation.moveUp":"pptx.animation.moveDown")),v.disabled=x,v.addEventListener("click",()=>p(n.elementId,m)),v};return l.append(d,u("up","\u2191",!s||o===0),u("down","\u2193",!s||o===r-1)),l}function qb(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-motion-path-row"),r=chunkR2NUNRIB_cjs.Ok(e,"span");r.textContent=t("pptx.animation.motionPath.label");let i=e.createElement("select");i.setAttribute("aria-label",t("pptx.animation.motionPath.label"));let a=e.createElement("option");a.value="none",a.textContent=t("pptx.animation.motionPath.none"),i.appendChild(a);let s=e.createElement("option");s.value="custom",s.textContent=t("pptx.animation.motionPath.custom");for(let l of chunkR2NUNRIB_cjs.jb){let d=e.createElement("optgroup");d.label=t(chunkR2NUNRIB_cjs.kb(l));for(let u of chunkR2NUNRIB_cjs.mb(l)){let m=e.createElement("option");m.value=u.id,m.textContent=t(chunkR2NUNRIB_cjs.lb(u.id)),d.appendChild(m);}i.appendChild(d);}i.addEventListener("change",()=>n(i.value));let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-motion-path-hint");return p.textContent=t("pptx.animation.motionPath.editHint"),p.hidden=true,o.append(r,i,p),{el:o,update(l){let d=chunkR2NUNRIB_cjs.nb(l.motionPath),u=!!l.motionPath&&!d;u?s.parentElement!==i&&i.insertBefore(s,a.nextSibling):s.remove(),i.value=u?"custom":d??"none",i.disabled=!l.editable,p.hidden=!l.motionPath;}}}function jb(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-animation");o.setAttribute("data-pptx-animation-panel","");let r={selectedElementId:void 0,animations:[]},i=()=>r.animations.find(M=>M.elementId===r.selectedElementId),a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-anim-header"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-section-title");s.textContent=t("pptx.animation.title");let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-anim-preview-btn");p.type="button",p.textContent=t("pptx.animation.preview"),p.addEventListener("click",()=>Gt(e,i())),a.append(s,p),o.appendChild(a);let l=(M,O,B)=>lt(e,t(O),[{value:"none",label:t("pptx.animation.none")},...B.map(V=>({value:V,label:t(`pptx.animation.preset.${V}`)}))],V=>n.setAnimationEffect(M,V),o),d=l("entrance","pptx.animation.entrance",chunkR2NUNRIB_cjs.Ha),u=l("emphasis","pptx.animation.emphasis",chunkR2NUNRIB_cjs.Ja),m=l("exit","pptx.animation.exit",chunkR2NUNRIB_cjs.Ia),g=qb(e,t,M=>n.applyMotionPath(M));o.appendChild(g.el);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-anim-options");o.appendChild(x);let v=M=>{r.selectedElementId&&n.setAnimationTiming(r.selectedElementId,M);},f=vn(e,t("pptx.animation.direction"),x);f.classList.add("pptxv-anim-direction");let b=_b.map(M=>{let O=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-anim-direction-btn");return O.type="button",O.textContent=t(`pptx.animation.direction.${M}`),O.addEventListener("click",()=>v({direction:M})),f.appendChild(O),{value:M,btn:O}}),h=lt(e,t("pptx.animation.sequence"),chunkR2NUNRIB_cjs.La.map(M=>({value:M,label:t(`pptx.animation.sequence.${M}`)})),M=>v({sequence:M}),x),S=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-section-title");S.textContent=t("pptx.animation.timing"),x.appendChild(S);let E=lt(e,t("pptx.animation.trigger"),chunkR2NUNRIB_cjs.Ka.map(M=>({value:M,label:t(`pptx.animation.trigger.${M}`)})),M=>v({trigger:M,triggerShapeId:""}),x),T=lt(e,t("pptx.animation.trigger.shapeLabel"),[],M=>v({triggerShapeId:M}),x),k=T.parentElement,y=fn(e,t("pptx.animation.duration"),{min:100,max:1e4,step:50},M=>v({durationMs:M}),x),w=fn(e,t("pptx.animation.delay"),{min:0,max:1e4,step:50},M=>v({delayMs:M}),x),C=lt(e,t("pptx.animation.timingCurve"),Gb.map(M=>({value:M.value,label:t(M.labelKey)})),M=>v({timingCurve:M}),x),A=fn(e,t("pptx.animation.repeatCount"),{min:1,max:100,step:1},M=>v({repeatCount:M}),x),P=lt(e,t("pptx.animation.repeatUntil"),Ub.map(M=>({value:M,label:t(`pptx.animation.repeatUntil.${M}`)})),M=>v({repeatMode:M}),x),I=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-anim-timeline"),L=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-section-title");L.textContent=t("pptx.animation.timelineBar");let D=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-anim-bar"),R=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-section-title");R.textContent=t("pptx.animation.timeline");let F=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline-list");return I.append(L,D,R,F),o.appendChild(I),{el:o,update(M){if(r=M,o.hidden=!M.selectedElementId,o.hidden)return;let O=i(),B=!!(O?.entrance||O?.emphasis||O?.exit||O?.motionPath);d.value=O?.entrance??"none",u.value=O?.emphasis??"none",m.value=O?.exit??"none",g.update({motionPath:O?.motionPath,editable:M.editable}),p.hidden=!B,x.hidden=!B;let V=chunkR2NUNRIB_cjs.Ma.has(O?.entrance??"")||chunkR2NUNRIB_cjs.Ma.has(O?.exit??"");f.hidden=!V;for(let{value:N,btn:_}of b)_.classList.toggle("is-active",O?.direction===N),_.disabled=!M.editable;h.value=O?.sequence??"asOne",E.value=O?.trigger??"onClick",k.hidden=E.value!=="onShapeClick",T.replaceChildren(...[{id:"",label:t("pptx.animation.trigger.selectShape")},...M.elements.filter(N=>N.id!==M.selectedElementId).map(N=>({id:N.id,label:bi(N)}))].map(N=>{let _=e.createElement("option");return _.value=N.id,_.textContent=N.label,_})),T.value=O?.triggerShapeId??"",y.value=String(O?.durationMs??450),w.value=String(O?.delayMs??0),C.value=O?.timingCurve??"ease",A.value=String(O?.repeatCount??1),P.value=O?.repeatMode??"none";for(let N of [d,u,m,h,E,T,C,P])N.disabled=!M.editable;y.disabled=w.disabled=A.disabled=!M.editable;let z=[...M.animations].sort((N,_)=>(N.order??0)-(_.order??0));I.hidden=z.length===0,Wb(e,t,D,z,M.elements,M.selectedElementId),F.replaceChildren(...z.map((N,_)=>Kb(e,t,N,_,z.length,M.elements,M.selectedElementId,M.editable,n.reorderAnimation)));}}}function hn(e,t,n){let o=e.createElement("label");return o.textContent=t,n.setAttribute("aria-label",t),o.appendChild(n),{label:o,control:n}}function Xe(e,t){return hn(e,t,e.createElement("input"))}function re(e,t){let n=Xe(e,t);return n.control.type="number",n}function Le(e,t){let n=Xe(e,t);return n.control.type="color",n}function pe(e,t){let n=Xe(e,t);return n.control.type="checkbox",n}function Ct(e,t,n){let o=e.createElement("select");return Ge(e,o,n.map(r=>[r,r])),hn(e,t,o)}function Ze(e,t,n,o){let r=e.createElement("select");return Ge(e,r,n.map(i=>[i.value,o(i.labelKey)])),hn(e,t,r)}function _e(e,t,n,o,r){let i=e.createElement("select");return Ge(e,i,n.map(a=>[a,chunkR2NUNRIB_cjs.pa(o,a,r)])),hn(e,t,i)}function Ge(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let a=e.createElement("option");return a.value=r,a.textContent=i,a})),t.value=o;}function le(e){return e.value===""?void 0:e.valueAsNumber}function de(e,t){e.value=t===void 0?"":String(t);}function vi(e){return e.split(",").map(Number).filter(Number.isFinite)}function Et(e,t){let{label:n,control:o}=re(e,t("pptx.chart.dataPointIndex"));return o.min="1",o.value="1",{label:n,control:o,selected:()=>Math.max(0,(o.valueAsNumber||1)-1),subscribe:r=>o.addEventListener("change",r),setSelected:r=>{o.value=String(Math.max(0,r)+1);}}}function Yb(e,t,n,o=Et(e,t)){let r=e.createElement("div");r.className="pptxv-chart-advanced";let i=Ct(e,t("pptx.chart.axis"),[]),a=re(e,t("pptx.chart.axisMinimum")),s=re(e,t("pptx.chart.axisMaximum")),p=re(e,t("pptx.chart.majorUnit")),l=Ze(e,t("pptx.chart.displayUnits"),chunkR2NUNRIB_cjs.ka,t),d=pe(e,t("pptx.chart.logScale")),u=pe(e,t("pptx.chart.reverseOrder")),m=pe(e,t("pptx.chart.majorGridlines")),g=Ct(e,t("pptx.chart.series"),[]),x=Ze(e,t("pptx.chart.trendlines"),chunkR2NUNRIB_cjs.la,t),v=pe(e,t("pptx.chart.trendlineEquation")),f=pe(e,t("pptx.chart.trendlineRSquared")),b=Ze(e,t("pptx.chart.errorBars"),chunkR2NUNRIB_cjs.ma,t),h=re(e,t("pptx.chart.errorBarAmount")),S=_e(e,t("pptx.chart.marker"),["none","auto","circle","diamond","square","star","triangle","x","plus"],chunkR2NUNRIB_cjs.xa,t),E=re(e,t("pptx.chart.markerSize")),T=Le(e,t("pptx.chart.seriesColor")),k=Le(e,t("pptx.chart.dataPointColor")),y=re(e,t("pptx.chart.pointExplosion"));r.append(i.label,a.label,s.label,p.label,l.label,d.label,u.label,m.label,g.label,x.label,v.label,f.label,b.label,h.label,S.label,E.label,T.label,o.label,k.label,y.label);let w,C=()=>Math.max(0,i.control.selectedIndex),A=()=>Math.max(0,g.control.selectedIndex),P=()=>{if(!w)return;let D=[...w.axes??[]],R=D[C()]??{axisType:"valAx"};D[C()]={...R,min:le(a.control),max:le(s.control),majorUnit:le(p.control),displayUnits:l.control.value||void 0,logScale:d.control.checked,orientation:u.control.checked?"maxMin":"minMax",majorGridlines:m.control.checked},n({...w,axes:D});},I=()=>{if(!w?.series[A()])return;let D=[...w.series],R=D[A()],F=x.control.value,M=b.control.value,O=o.selected(),B=R.dataPoints?.find(({idx:z})=>z===O),V=chunkR2NUNRIB_cjs.ha(R.dataPoints,{...B??{idx:O},spPr:{...B?.spPr,fillColor:k.control.value},explosion:le(y.control)});D[A()]={...R,color:T.control.value,trendlines:F?[{trendlineType:F,displayEq:v.control.checked,displayRSq:f.control.checked}]:[],errBars:M?[{direction:"y",barType:"both",valType:M,val:le(h.control)}]:[],marker:{symbol:S.control.value,size:le(E.control)},dataPoints:V},n({...w,series:D});};for(let D of [a.control,s.control,p.control,l.control,d.control,u.control,m.control])D.addEventListener("change",P);for(let D of [x.control,v.control,f.control,b.control,h.control,S.control,E.control,T.control,k.control,y.control])D.addEventListener("change",I);i.control.addEventListener("change",()=>w&&L(w)),g.control.addEventListener("change",()=>w&&L(w)),o.subscribe(()=>w&&L(w));let L=D=>{w=D,Ge(e,i.control,(D.axes??[]).map((O,B)=>[String(B),O.titleText??chunkR2NUNRIB_cjs.pa(chunkR2NUNRIB_cjs.va,O.axisType,t)])),Ge(e,g.control,D.series.map((O,B)=>[String(B),O.name]));let R=D.axes?.[C()];de(a.control,R?.min),de(s.control,R?.max),de(p.control,R?.majorUnit),l.control.value=R?.displayUnits??"",d.control.checked=R?.logScale??false,u.control.checked=R?.orientation==="maxMin",m.control.checked=R?.majorGridlines??false;let F=D.series[A()];x.control.value=F?.trendlines?.[0]?.trendlineType??"",v.control.checked=F?.trendlines?.[0]?.displayEq??false,f.control.checked=F?.trendlines?.[0]?.displayRSq??false,b.control.value=F?.errBars?.[0]?.valType??"",de(h.control,F?.errBars?.[0]?.val),S.control.value=F?.marker?.symbol??"none",de(E.control,F?.marker?.size),T.control.value=F?.color??"#4472c4";let M=F?.dataPoints?.find(({idx:O})=>O===o.selected());k.control.value=M?.spPr?.fillColor??F?.color??"#4472c4",de(y.control,M?.explosion);};return {el:r,update:L}}var fi="pptxv-chart-grid-cell-highlight";function Xb(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-chart-grid"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-chart-grid-toolbar"),i=e.createElement("table");i.className="pptxv-chart-grid-table";let a=(b,h,S)=>{let E=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-chart-grid-btn");return E.type="button",E.textContent=`+ ${b}`,E.title=h,E.setAttribute("aria-label",h),E.addEventListener("click",S),E},s,p=b=>{b&&n(b);},l=a(t("pptx.chart.cat"),t("pptx.chart.addCategory"),()=>{s&&p(chunkR2NUNRIB_cjs.Ca(s));}),d=a(t("pptx.chart.seriesShort"),t("pptx.chart.addSeries"),()=>{s&&p(chunkR2NUNRIB_cjs.Aa(s));});r.append(l,d),o.append(r,i);let u=(b,h,S,E)=>{let T=e.createElement("input");return T.type=b,T.className="pptxv-chart-grid-cell",T.value=h,T.setAttribute("aria-label",S),T.addEventListener("change",()=>E(T.value)),T.addEventListener("keydown",k=>k.stopPropagation()),T},m=(b,h)=>{let S=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-chart-grid-remove");return S.type="button",S.textContent="\xD7",S.title=b,S.setAttribute("aria-label",b),S.addEventListener("click",h),S},g=(b,h,S)=>{let E=[...b.series[h].values];for(;E.length<=S;)E.push(0);return {...b,series:b.series.map((T,k)=>k===h?{...T,values:E}:T)}},x=(b,h)=>{let S=e.createElement("thead"),E=e.createElement("tr"),T=e.createElement("th");return T.setAttribute("aria-label",t("pptx.chart.categories")),E.appendChild(T),b.series.forEach((k,y)=>{let w=e.createElement("th"),C=u("text",k.name,t("pptx.chart.seriesShort"),A=>n({...b,series:b.series.map((P,I)=>I===y?{...P,name:A}:P)}));h?.seriesIndex===y&&h.pointIndex===void 0&&C.classList.add(fi),w.appendChild(C),b.series.length>1&&w.appendChild(m(t("pptx.chart.removeSeries"),()=>p(chunkR2NUNRIB_cjs.Ba(b,y)))),E.appendChild(w);}),S.appendChild(E),S},v=(b,h)=>{let S=e.createElement("tbody");return b.categories.forEach((E,T)=>{let k=e.createElement("tr"),y=e.createElement("td");y.appendChild(u("text",E,t("pptx.chart.categories"),w=>p(chunkR2NUNRIB_cjs.Ea(b,T,w)))),b.categories.length>1&&y.appendChild(m(t("pptx.chart.removeCategory"),()=>p(chunkR2NUNRIB_cjs.Da(b,T)))),k.appendChild(y),b.series.forEach((w,C)=>{let A=e.createElement("td"),P=u("number",String(w.values[T]??0),`${w.name} value ${T+1}`,I=>{let L=T>=w.values.length?g(b,C,T):b;p(chunkR2NUNRIB_cjs.Fa(L,C,T,I));});h?.seriesIndex===C&&h.pointIndex===T&&P.classList.add(fi),A.appendChild(P),k.appendChild(A);}),S.appendChild(k);}),S},f=null;return {el:o,update(b,h=null){if(s=b,o.hidden=!b,!b)return;i.textContent="",i.append(x(b,h),v(b,h));let S=h?`${h.seriesIndex}:${h.pointIndex??""}`:null;S!==null&&S!==f&&i.querySelector(`.${fi}`)?.scrollIntoView?.({block:"nearest",inline:"nearest"}),f=S;},setDisabled(b){l.disabled=b,d.disabled=b;for(let h of i.querySelectorAll("input"))h.disabled=b;}}}var ww=chunkR2NUNRIB_cjs.oa.filter(e=>e.value!=="");function Zb(e,t){let n=Ct(e,t("pptx.chart.series"),[]),o=_e(e,t("pptx.chart.seriesType"),["bar","line","area","scatter","bubble","radar"],chunkR2NUNRIB_cjs.ta,t),r=pe(e,t("pptx.chart.secondaryAxis")),i=_e(e,t("pptx.chart.dataLabelPosition"),["bestFit","b","ctr","inBase","inEnd","l","outEnd","r","t"],chunkR2NUNRIB_cjs.wa,t),a=pe(e,t("pptx.chart.showValue")),s=pe(e,t("pptx.chart.showCategory")),p=pe(e,t("pptx.chart.showSeriesName")),l=pe(e,t("pptx.chart.showPercentage")),d=pe(e,t("pptx.chart.showLeaderLines")),u=re(e,t("pptx.chart.trendlineOrder")),m=re(e,t("pptx.chart.trendlinePeriod")),g=re(e,t("pptx.chart.forecastForward")),x=re(e,t("pptx.chart.forecastBackward")),v=re(e,t("pptx.chart.trendlineIntercept")),f=Le(e,t("pptx.chart.trendlineColor")),b=_e(e,t("pptx.chart.errorBarDirection"),["x","y"],chunkR2NUNRIB_cjs.ya,t),h=Ze(e,t("pptx.chart.errorBarType"),chunkR2NUNRIB_cjs.na,t),S=Le(e,t("pptx.chart.errorBarColor")),E=pe(e,t("pptx.chart.noEndCap")),T=Xe(e,t("pptx.chart.customPlus")),k=Xe(e,t("pptx.chart.customMinus")),y=Le(e,t("pptx.chart.markerFill")),w=Le(e,t("pptx.chart.markerOutline")),C=Ze(e,t("pptx.chart.dataPointMarker"),ww,t),A=re(e,t("pptx.chart.markerSize")),P=pe(e,t("pptx.chart.invertIfNegative")),I=Ct(e,t("pptx.chart.axis"),[]),L=Xe(e,t("pptx.chart.axisTitle")),D=re(e,t("pptx.chart.minorUnit")),R=pe(e,t("pptx.chart.minorGridlines")),F=Xe(e,t("pptx.chart.numberFormat")),M=Ze(e,t("pptx.chart.tickLabelPosition"),chunkR2NUNRIB_cjs.ja,t),O=Le(e,t("pptx.chart.axisColor")),B=Le(e,t("pptx.chart.axisFontColor")),V=re(e,t("pptx.chart.axisFontSize"));return {series:n,axis:I,comboType:o,secondaryAxis:r,labelPosition:i,showValue:a,showCategory:s,showSeries:p,showPercent:l,leaderLines:d,trendOrder:u,trendPeriod:m,trendForward:g,trendBackward:x,trendIntercept:v,trendColor:f,errorDirection:b,errorBarType:h,errorColor:S,noEndCap:E,customPlus:T,customMinus:k,markerFill:y,markerLine:w,pointMarker:C,pointMarkerSize:A,pointInvert:P,axisTitle:L,minorUnit:D,minorGridlines:R,numberFormat:F,tickPosition:M,axisColor:O,axisFontColor:B,axisFontSize:V,seriesFields:[o,r,i,a,s,p,l,d,u,m,g,x,v,f,b,h,S,E,T,k,y,w,C,A,P],axisFields:[L,D,R,F,M,O,B,V]}}function Qb(e,t,n,o){let r=e.createElement("div");r.className="pptxv-chart-exhaustive";let{series:i,axis:a,comboType:s,secondaryAxis:p,labelPosition:l,showValue:d,showCategory:u,showSeries:m,showPercent:g,leaderLines:x,trendOrder:v,trendPeriod:f,trendForward:b,trendBackward:h,trendIntercept:S,trendColor:E,errorDirection:T,errorBarType:k,errorColor:y,noEndCap:w,customPlus:C,customMinus:A,markerFill:P,markerLine:I,pointMarker:L,pointMarkerSize:D,pointInvert:R,axisTitle:F,minorUnit:M,minorGridlines:O,numberFormat:B,tickPosition:V,axisColor:z,axisFontColor:N,axisFontSize:_,seriesFields:K,axisFields:$}=Zb(e,t),he=o===void 0,be=o??Et(e,t);r.append(i.label,...he?[be.label]:[],...K.map(({label:W})=>W),a.label,...$.map(({label:W})=>W));let J,ye=()=>Math.max(0,i.control.selectedIndex),qe=()=>Math.max(0,a.control.selectedIndex),mt=()=>{let W=J?.series[ye()];if(!J||!W)return;let ue=[...J.series],Oe=W.trendlines?.[0],Fe=W.errBars?.[0],Be=be.selected(),ut=W.dataPoints?.find(({idx:xe})=>xe===Be);ue[ye()]={...W,seriesChartType:s.control.value,axisId:p.control.checked?J.axes?.find(xe=>xe.axPos==="r")?.axisId:J.axes?.find(xe=>xe.axPos==="l")?.axisId,trendlines:Oe?[{...Oe,order:le(v.control),period:le(f.control),forward:le(b.control),backward:le(h.control),intercept:le(S.control),color:E.control.value}]:[],errBars:Fe?[{...Fe,direction:T.control.value,barType:k.control.value,color:y.control.value,noEndCap:w.control.checked,customPlus:vi(C.control.value),customMinus:vi(A.control.value)}]:[],marker:{...W.marker??{symbol:"auto"},spPr:{fillColor:P.control.value,strokeColor:I.control.value}},dataPoints:chunkR2NUNRIB_cjs.ha(W.dataPoints,{...ut??{idx:Be},invertIfNegative:R.control.checked,marker:{...ut?.marker,symbol:L.control.value,size:le(D.control)}})},n({...J,series:ue,style:{...J.style,hasDataLabels:true,dataLabels:{...J.style?.dataLabels,position:l.control.value,showValue:d.control.checked,showCategory:u.control.checked,showSeriesName:m.control.checked,showPercent:g.control.checked,showLeaderLines:x.control.checked}}});},no=()=>{let W=J?.axes?.[qe()];if(!J||!W)return;let ue=[...J.axes??[]];ue[qe()]={...W,titleText:F.control.value,minorUnit:le(M.control),minorGridlines:O.control.checked,numFmt:{formatCode:B.control.value},tickLblPos:V.control.value,spPr:{...W.spPr,strokeColor:z.control.value},fontColor:N.control.value,fontSize:le(_.control)},n({...J,axes:ue});};for(let W of K)W.control.addEventListener("change",mt);for(let W of $)W.control.addEventListener("change",no);i.control.addEventListener("change",()=>J&&rt(J)),a.control.addEventListener("change",()=>J&&rt(J)),be.subscribe(()=>J&&rt(J));let rt=W=>{J=W,Ge(e,i.control,W.series.map((je,Qn)=>[String(Qn),je.name])),Ge(e,a.control,(W.axes??[]).map((je,Qn)=>[String(Qn),je.titleText??chunkR2NUNRIB_cjs.pa(chunkR2NUNRIB_cjs.va,je.axisType,t)]));let ue=W.series[ye()],Oe=ue?.trendlines?.[0],Fe=ue?.errBars?.[0];s.control.value=ue?.seriesChartType??W.chartType,p.control.checked=!!(ue?.axisId&&W.axes?.find(je=>je.axisId===ue.axisId)?.axPos==="r");let Be=W.style?.dataLabels;l.control.value=Be?.position??"bestFit",d.control.checked=Be?.showValue??false,u.control.checked=Be?.showCategory??false,m.control.checked=Be?.showSeriesName??false,g.control.checked=Be?.showPercent??false,x.control.checked=Be?.showLeaderLines??false,de(v.control,Oe?.order),de(f.control,Oe?.period),de(b.control,Oe?.forward),de(h.control,Oe?.backward),de(S.control,Oe?.intercept),E.control.value=Oe?.color??"#4472c4",T.control.value=Fe?.direction??"y",k.control.value=Fe?.barType??"both",y.control.value=Fe?.color??"#000000",w.control.checked=Fe?.noEndCap??false,C.control.value=Fe?.customPlus?.join(", ")??"",A.control.value=Fe?.customMinus?.join(", ")??"",P.control.value=ue?.marker?.spPr?.fillColor??"#4472c4",I.control.value=ue?.marker?.spPr?.strokeColor??"#000000";let ut=ue?.dataPoints?.find(({idx:je})=>je===be.selected());L.control.value=ut?.marker?.symbol??"none",de(D.control,ut?.marker?.size),R.control.checked=ut?.invertIfNegative??false;let xe=W.axes?.[qe()];F.control.value=xe?.titleText??"",de(M.control,xe?.minorUnit),O.control.checked=xe?.minorGridlines??false,B.control.value=xe?.numFmt?.formatCode??"",V.control.value=xe?.tickLblPos??"nextTo",z.control.value=xe?.spPr?.strokeColor??"#000000",N.control.value=xe?.fontColor??"#000000",de(_.control,xe?.fontSize);};return {el:r,update:rt}}var Cw=chunkR2NUNRIB_cjs.ia.map(e=>e.value),Ew=["clustered","stacked","percentStacked"];function ev(e,t,n,o){let r=n(t("pptx.chart.data")),i=tv(e,"text",t("pptx.chart.title")),a=_e(e,t("pptx.chart.type"),Cw,chunkR2NUNRIB_cjs.ta,t),s=_e(e,t("pptx.chart.grouping"),Ew,chunkR2NUNRIB_cjs.ua,t),p=Xb(e,t,f=>o.setChartData(f)),l=Jb(e,t("pptx.chart.showLegend")),d=Jb(e,t("pptx.chart.dataLabels")),u=Et(e,t),m=Yb(e,t,f=>o.setChartData(f),u),g=Qb(e,t,f=>o.setChartData(f),u);r.append(i.label,a.label,s.label,p.el,l.label,d.label,m.el,g.el);let x,v=()=>{x&&o.setChartData({...x,title:i.control.value,chartType:a.control.value,grouping:s.control.value,style:{...x.style,hasTitle:i.control.value.trim().length>0,hasLegend:l.control.checked,hasDataLabels:d.control.checked}});};for(let f of [i.control,a.control,s.control,l.control,d.control])f.addEventListener("change",v);return {el:r,update(f){r.hidden=!f.isChart,x=f.chartData,x&&(i.control.value=x.title??"",a.control.value=x.chartType,s.control.value=x.grouping??"clustered",f.chartHighlightCell?.pointIndex!==void 0&&u.setSelected(f.chartHighlightCell.pointIndex),p.update(x,f.chartHighlightCell??null),l.control.checked=x.style?.hasLegend??false,d.control.checked=x.style?.hasDataLabels??false,m.update(x),g.update(x));}}}function tv(e,t,n){let o=e.createElement("label");o.textContent=n;let r=e.createElement("input");return r.type=t,o.appendChild(r),{label:o,control:r}}function Jb(e,t){return tv(e,"checkbox",t)}function ov(e,t,n){e.textContent="";let o=e.ownerDocument,r=chunkR2NUNRIB_cjs.Yh(t,n);if(r.length===0)return e.textContent=t,e;for(let i of r){if(i.kind!=="mention"){e.appendChild(o.createTextNode(i.text));continue}let a=o.createElement("span");a.className=chunkR2NUNRIB_cjs.Xh,a.setAttribute(chunkR2NUNRIB_cjs.Wh,i.personId||""),i.authorName&&(a.title=i.authorName),a.textContent=i.text,e.appendChild(a);}return e}function yn(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-list"),r=null,i="",a=null,s="",p=new Set,l=[],d=false,u=()=>{o.replaceChildren(...l.map(S=>h(S,d,0)));},m=(S,E)=>{let T=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-inspector-comment-action");return T.type="button",T.textContent=S,T.addEventListener("click",E),T},g=(S,E,T)=>{let k=e.createElement("textarea");return k.className="pptxv-inspector-comment-input",k.rows=2,k.value=S,k.placeholder=E,k.addEventListener("input",()=>T(k.value)),k},x=S=>{let E=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-edit"),T=g(i,"",y=>{i=y;});T.setAttribute("aria-label",t("pptx.comments.edit"));let k=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-actions");return k.append(m(t("pptx.comments.save"),()=>{i.trim()&&n.editComment(S.id,i.trim()),r=null,u();}),m(t("pptx.comments.cancel"),()=>{r=null,u();})),E.append(T,k),E},v=S=>{let E=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-reply-form"),T=g(s,t("pptx.comments.replyPlaceholder",{author:S.author||t("pptx.comments.unknownAuthor")}),y=>{s=y;});T.setAttribute("aria-label",t("pptx.comments.reply"));let k=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-actions");return k.append(m(t("pptx.comments.addReply"),()=>{s.trim()&&n.addCommentReply(S.id,s.trim()),a=null,s="",u();}),m(t("pptx.comments.cancel"),()=>{a=null,u();})),E.append(T,k),E},f=(S,E)=>{let T=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-actions");return T.appendChild(m(t("pptx.comments.edit"),()=>{r=S.id,i=S.text,u();})),E===0&&T.appendChild(m(t("pptx.comments.reply"),()=>{a=S.id,s="",u();})),T.append(m(t(S.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>n.toggleCommentResolved(S.id)),m(t("pptx.comments.delete"),()=>n.deleteComment(S.id))),T},b=(S,E,T)=>{let k=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-replies-wrap"),y=S.replies??[],w=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-inspector-comment-replies-toggle");if(w.type="button",w.textContent=t("pptx.comments.repliesCount",{count:y.length}),w.setAttribute("aria-expanded",String(!p.has(S.id))),w.addEventListener("click",()=>{p.has(S.id)?p.delete(S.id):p.add(S.id),u();}),k.appendChild(w),!p.has(S.id)){let C=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-replies");C.append(...y.map(A=>h(A,E,T+1))),k.appendChild(C);}return k};function h(S,E,T){let k=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment");k.classList.toggle("is-resolved",S.resolved===true),k.classList.toggle("is-reply",T>0);let y=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-meta");if(y.textContent=S.author||t("pptx.comments.unknownAuthor"),S.resolved){let w=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-comment-badge");w.textContent=t("pptx.comments.resolved"),y.appendChild(w);}if(k.appendChild(y),r===S.id)k.appendChild(x(S));else {let w=chunkR2NUNRIB_cjs.Ok(e,"p","pptxv-inspector-comment-text");ov(w,S.text,S.mentions),k.appendChild(w),E&&k.appendChild(f(S,T));}return (S.replies??[]).length>0&&k.appendChild(b(S,E,T)),a===S.id&&k.appendChild(v(S)),k}return {el:o,update(S,E){l=S,d=E,u();}}}function nv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comments"),r=yn(e,t,n);o.appendChild(r.el);let i=chunkR2NUNRIB_cjs.Ok(e,"p","pptxv-inspector-empty");i.textContent=t("pptx.comments.noComments"),o.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-comment-add"),s=e.createElement("textarea");s.className="pptxv-inspector-comment-input",s.rows=2,s.placeholder=t("pptx.comments.addCommentPlaceholder"),s.setAttribute("aria-label",t("pptx.comments.addComment"));let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-inspector-deck-btn");return p.type="button",p.textContent=t("pptx.comments.addComment"),p.addEventListener("click",()=>{let l=s.value.trim();l&&(n.addComment(l),s.value="");}),a.append(s,p),o.appendChild(a),{el:o,update(l){i.hidden=l.comments.length>0,a.hidden=!l.editable,r.update(l.comments,l.editable);}}}function ie(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-section"),o=chunkR2NUNRIB_cjs.Ok(e,"h4","pptxv-inspector-section-title");o.textContent=t,n.appendChild(o);let r=chunkR2NUNRIB_cjs.Ok(e,"div");return n.appendChild(r),{el:n,body:r}}function Qe(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-row"),o=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-label");o.textContent=t;let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-value");return n.append(o,r),{el:n,value:r}}function De(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-inspector-deck-btn");return o.type="button",o.textContent=t,o.addEventListener("click",n),o}function ce(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-field-select"),o=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=e.createElement("select");r.className="pptxv-field-select-input",r.setAttribute("aria-label",t.label);for(let i of t.options){let a=e.createElement("option");a.value=i.value,a.textContent=i.label,r.appendChild(a);}return r.addEventListener("change",()=>t.onChange(r.value)),n.appendChild(r),{el:n,setValue(i){r.value=i;},setDisabled(i){r.disabled=i;}}}function Y(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-field-checkbox"),o=e.createElement("input");o.type="checkbox",o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>t.onChange(o.checked));let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");return r.textContent=t.label,n.append(o,r),{el:n,setValue(i){o.checked=i;},setDisabled(i){o.disabled=i;}}}function ve(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-field-range"),o=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-range-row"),i=e.createElement("input");i.type="range",i.min=String(t.min),i.max=String(t.max),i.step=String(t.step??1),i.setAttribute("aria-label",t.label);let a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-range-readout"),s=t.formatValue??(l=>String(l)),p=()=>{a.textContent=s(Number.parseFloat(i.value));};return i.addEventListener("input",()=>{p(),t.onInput?.(Number.parseFloat(i.value));}),i.addEventListener("change",()=>t.onCommit(Number.parseFloat(i.value))),r.append(i,a),n.appendChild(r),{el:n,setValue(l){e.activeElement!==i&&(i.value=String(l),p());},setDisabled(l){i.disabled=l;}}}function rv(e,t,n){let{el:o,body:r}=ie(e,t("pptx.slideInspector.presentation")),i,a=ce(e,{label:t("pptx.presentationSettings.showType"),options:[{value:"presented",label:t("pptx.presentationSettings.showTypePresented")},{value:"browsed",label:t("pptx.presentationSettings.showTypeBrowsed")},{value:"kiosk",label:t("pptx.presentationSettings.showTypeKiosk")}],onChange:g=>n.updatePresentationSettings({showType:g})}),s=Y(e,{label:t("pptx.presentationSettings.loopContinuously"),onChange:g=>n.updatePresentationSettings({loopContinuously:g})}),p=Y(e,{label:t("pptx.presentationSettings.showNarration"),onChange:g=>n.updatePresentationSettings({showWithNarration:g})}),l=Y(e,{label:t("pptx.presentationSettings.showAnimation"),onChange:g=>n.updatePresentationSettings({showWithAnimation:g})}),d=Y(e,{label:t("pptx.presentationSettings.frameSlides"),onChange:g=>n.updatePresentationSettings({printProperties:chunkR2NUNRIB_cjs.Kf(i,g)})}),u=e.createElement("input");u.type="number",u.min="1",u.max="16",u.className="pptxv-field-input",u.setAttribute("aria-label",t("pptx.presentationSettings.slidesPerPage")),u.addEventListener("change",()=>{let g=Number.parseInt(u.value,10);Number.isFinite(g)&&n.updatePresentationSettings({printProperties:chunkR2NUNRIB_cjs.Lf(i,g)});});let m=Qe(e,t("pptx.presentationSettings.slidesPerPage"));return m.value.appendChild(u),r.append(a.el,s.el,p.el,l.el,d.el,m.el),{el:o,update(g){let x=g.presentationProperties;i=x.printProperties,a.setValue(x.showType??"presented"),s.setValue(!!x.loopContinuously),p.setValue(x.showWithNarration!==false),l.setValue(x.showWithAnimation!==false),d.setValue(chunkR2NUNRIB_cjs.Jf(x.printProperties)),e.activeElement!==u&&(u.value=String(chunkR2NUNRIB_cjs.If(x.printProperties)));for(let v of [a,s,p,l,d])v.setDisabled(!g.editable);u.disabled=!g.editable;}}}var iv="__custom__",Tw=[["landscape","pptx.slideSize.landscape"],["portrait","pptx.slideSize.portrait"]];function av(e,t,n){let{el:o,body:r}=ie(e,t("pptx.slideSize.title")),i=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-field-select"),a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");a.textContent=t("pptx.slideSize.presets");let s=e.createElement("select");s.className="pptxv-field-select-input",s.dataset.pptxSlideSizePreset="true",s.setAttribute("aria-label",t("pptx.slideSize.presets"));let p=e.createElement("option");p.value=iv,p.textContent=t("pptx.slideSize.customSize"),p.hidden=true,s.appendChild(p);for(let f of chunkR2NUNRIB_cjs.Ae){let b=e.createElement("option");b.value=f.labelKey,b.textContent=t(`pptx.slideSize.preset.${f.labelKey}`),s.appendChild(b);}i.append(a,s),r.appendChild(i);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-slide-size-orientation");l.setAttribute("role","group"),l.setAttribute("aria-label",t("pptx.slideSize.orientation"));let d=Tw.map(([f,b])=>{let h=chunkR2NUNRIB_cjs.Ok(e,"button");return h.type="button",h.dataset.pptxSlideSizeOrientation=f,h.textContent=t(b),l.appendChild(h),{value:f,button:h}});r.appendChild(l);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-grid");r.appendChild(u);let m={width:0,height:0},g=j(e,{label:"W",min:1,onCommit:f=>n.updateCanvasSize({width:f,height:m.height})}),x=j(e,{label:"H",min:1,onCommit:f=>n.updateCanvasSize({width:m.width,height:f})});u.append(g.el,x.el);let v=chunkR2NUNRIB_cjs.Ee({current:void 0,canvas:{width:1,height:1}});return s.addEventListener("change",()=>{let f=chunkR2NUNRIB_cjs.Ae.find(b=>b.labelKey===s.value);f&&n.updateSlideSize(chunkR2NUNRIB_cjs.Ce(f,v.orientation));}),d.forEach(({value:f,button:b})=>{b.addEventListener("click",()=>n.updateSlideSize(chunkR2NUNRIB_cjs.Be(v.size,f)));}),{el:o,update(f){m=f.canvasSize,v=chunkR2NUNRIB_cjs.Ee({current:f.slideSize,canvas:f.canvasSize}),p.hidden=v.preset!==void 0,s.value=v.preset?.labelKey??iv,s.disabled=!f.editable;for(let{value:b,button:h}of d){let S=v.orientation===b;h.classList.toggle("is-active",S),h.setAttribute("aria-pressed",String(S)),h.disabled=!f.editable;}g.setValue(f.canvasSize.width),x.setValue(f.canvasSize.height),g.setDisabled(!f.editable),x.setDisabled(!f.editable);}}}var hi={bg1:"Background 1",tx1:"Text 1",bg2:"Background 2",tx2:"Text 2",accent1:"Accent 1",accent2:"Accent 2",accent3:"Accent 3",accent4:"Accent 4",accent5:"Accent 5",accent6:"Accent 6",hlink:"Hyperlink",folHlink:"Followed Hyperlink"};function sv(e,t,n){let{el:o,body:r}=ie(e,t("pptx.documentProperties.themeHeading")),i=e.createElement("select");i.className="pptxv-field-select-input pptxv-inspector-theme-select",i.setAttribute("aria-label",t("pptx.documentProperties.themeHeading")),r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-deck-btn-row"),s=De(e,t("pptx.documentProperties.applyFirstMaster"),()=>n.applyThemeByPath(i.value,false)),p=De(e,t("pptx.documentProperties.applyAllMasters"),()=>n.applyThemeByPath(i.value,true));a.append(s,p),r.appendChild(a);let l="";return {el:o,update(d){let u=d.themeOptions.map(g=>g.path).join(`
|
|
5
5
|
`);if(u!==l){l=u;let g=i.value;if(i.replaceChildren(),d.themeOptions.length===0){let x=e.createElement("option");x.value="",x.textContent=t("pptx.documentProperties.noThemesOption"),i.appendChild(x);}else {for(let x of d.themeOptions){let v=e.createElement("option");v.value=x.path,v.textContent=x.name||x.path.split("/").pop()||x.path,i.appendChild(v);}d.themeOptions.some(x=>x.path===g)&&(i.value=g);}}i.disabled=d.themeOptions.length===0;let m=!d.editable||!i.value;s.disabled=m,p.disabled=m;}}}function pv(e,t,n){let{el:o,body:r}=ie(e,t("pptx.themeOverride.heading")),i,a=m=>{let g=i?.activeSlide;if(!g)return;if(!i?.colorScheme){n.updateActiveSlide({clrMapOverride:m});return}let x=chunkR2NUNRIB_cjs.G(g,i.colorScheme,m);n.updateActiveSlide({clrMapOverride:x.clrMapOverride,backgroundColor:x.backgroundColor,elements:x.elements});},s=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-field-checkbox"),p=e.createElement("input");p.type="checkbox",p.setAttribute("aria-label",t("pptx.themeOverride.enableOverride")),p.addEventListener("change",()=>{p.checked?a({...chunkR2NUNRIB_cjs.B}):a(void 0);});let l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");l.textContent=t("pptx.themeOverride.enableOverride"),s.append(p,l),r.appendChild(s);let d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-override-rows");r.appendChild(d);let u=(m,g,x)=>{let v=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-override-row"),f=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-label");f.textContent=hi[m],f.title=hi[m];let b=g[m]??chunkR2NUNRIB_cjs.B[m],h=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-override-swatch"),S=i?.colorScheme?.[b];typeof S=="string"&&S&&(h.style.backgroundColor=`#${S.replace(/^#/u,"")}`);let E=e.createElement("select");E.className="pptxv-field-select-input",E.setAttribute("aria-label",hi[m]);for(let T of chunkR2NUNRIB_cjs.e){let k=e.createElement("option");k.value=T,k.textContent=chunkR2NUNRIB_cjs.pa(chunkR2NUNRIB_cjs.qa,T,t),E.appendChild(k);}return E.value=b,E.disabled=!x,E.addEventListener("change",()=>{let T={...g,[m]:E.value};for(let k of chunkR2NUNRIB_cjs.A)T[k]||(T[k]=chunkR2NUNRIB_cjs.B[k]);a(T);}),v.append(f,h,E),v};return {el:o,update(m){i=m,o.hidden=!m.activeSlide;let g=m.activeSlide?.clrMapOverride;if(p.checked=g!==void 0,p.disabled=!m.editable,d.replaceChildren(),g)for(let x of chunkR2NUNRIB_cjs.A)d.appendChild(u(x,g,m.editable));}}}function lv(e,t,n){let{el:o,body:r}=ie(e,t("pptx.slideBackground.templateBackgroundsHeading"));function i(a,s){let p=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-inspector-row"),l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-label");l.textContent=s,l.title=a.title;let d=e.createElement("input");d.type="color",d.value=chunkR2NUNRIB_cjs.$(n.getTemplateBackgroundColor(a.path),"#ffffff"),d.addEventListener("change",()=>n.setTemplateBackground(a.path,d.value));let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-value");return u.textContent=a.label,p.append(l,d,u),p}return {el:o,update(a){let s=a.editTemplateMode&&a.activeSlide?chunkR2NUNRIB_cjs.wi(a.activeSlide,a.slideMasters,t("pptx.master.layout"),t("pptx.master.master")):{};o.hidden=!s.layout&&!s.master,r.replaceChildren(),s.layout&&r.appendChild(i(s.layout,t("pptx.master.layout"))),s.master&&r.appendChild(i(s.master,t("pptx.master.master")));}}}function dv(e,t){st(e);let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-preview"),o=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-transition-preview-label");o.textContent=t("pptx.transition.preview");let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-transition-preview-stage");r.type="button",r.title=t("pptx.transition.preview"),r.setAttribute("aria-label",t("pptx.transition.preview"));let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-transition-preview-layer is-incoming");i.textContent="B";let a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-transition-preview-layer is-outgoing");a.textContent="A",r.append(i,a),n.append(o,r);let s,p,l=()=>{i.style.animation="",a.style.animation="";},d=()=>{if(!s)return;let u=s.durationMs??500,m=chunkR2NUNRIB_cjs.$d(s.type,u,s.direction,s.orient,s.spokes);a.style.zIndex=m.outgoingOnTop?"2":"0",l(),r.offsetWidth,i.style.animation=m.incoming!=="none"?m.incoming:"",a.style.animation=m.outgoing!=="none"?m.outgoing:`pptx-tr-fade-out ${u}ms ease-in-out forwards`,clearTimeout(p),p=setTimeout(l,u+100);};return r.addEventListener("click",d),{el:n,update(u){s=u;let m=!!u&&u?.type!=="none"&&u?.type!=="cut";n.hidden=!m,m||(clearTimeout(p),l());}}}function cv(e,t,n){let{el:o,body:r}=ie(e,t("pptx.slideInspector.slideTransition")),i,a=false,s=h=>{let S={...i,...h};i=S,n.updateActiveSlide({transition:S});},p=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-field-select"),l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");l.textContent=t("pptx.transition.type");let d=e.createElement("select");d.className="pptxv-field-select-input",d.setAttribute("aria-label",t("pptx.transition.type"));for(let h of chunkR2NUNRIB_cjs.ce){let S=e.createElement("option");S.value=h.value,S.textContent=t(h.i18nKey),d.appendChild(S);}d.addEventListener("change",()=>s({type:d.value})),p.append(l,d);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-directions"),m=j(e,{label:t("pptx.transition.duration"),min:0,max:1e4,step:10,onCommit:h=>s({durationMs:Math.max(0,Math.min(1e4,Math.round(h)))})}),g=j(e,{label:t("pptx.transition.spokes"),min:1,max:8,onCommit:h=>s({spokes:Math.max(1,Math.min(8,Math.round(h)))})}),x=Y(e,{label:t("pptx.transition.advanceOnClick"),onChange:h=>s({advanceOnClick:h})}),v=chunkR2NUNRIB_cjs.Ok(e,"p","pptxv-transition-sound"),f=dv(e,t);r.append(p,u,g.el,m.el,x.el,v,f.el);let b=h=>{u.textContent="";let S=chunkR2NUNRIB_cjs.a[h];if(!S||S.length===0){u.hidden=true;return}u.hidden=false;let E=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label"),T=chunkR2NUNRIB_cjs.de.has(h);E.textContent=t(T?"pptx.transition.orientation":"pptx.transition.direction"),u.appendChild(E);let k=(A,P)=>{let I=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-transition-dir");I.type="button",I.textContent=P;let L=t(`pptx.transition.dir.${A}`);return I.title=L,I.setAttribute("aria-label",L),I.classList.toggle("is-active",(i?.direction??i?.orient)===A),I.disabled=!a,I.addEventListener("click",()=>s(T?{orient:A}:{direction:A})),I};if(T){let A=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-dir-row");for(let P of ["horz","vert"])A.appendChild(k(P,chunkR2NUNRIB_cjs.ee[P]??P));u.appendChild(A);return}let y=chunkR2NUNRIB_cjs.fe(S);if(y.some(A=>A.some(Boolean))){let A=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-dir-grid");for(let P of y)for(let I of P)I===null?A.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-transition-dir-gap")):A.appendChild(k(I,chunkR2NUNRIB_cjs.ee[I]??I));u.appendChild(A);return}let C=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-dir-row");for(let A of S)C.appendChild(k(A,chunkR2NUNRIB_cjs.ee[A]??A));u.appendChild(C);};return {el:o,update(h){a=h.editable,i=h.activeSlide?.transition,o.hidden=!h.activeSlide;let S=i?.type??"none";d.value=S,d.disabled=!h.editable,b(S),g.el.hidden=S!=="wheel",g.setValue(i?.spokes??4),g.setDisabled(!h.editable),m.setValue(Math.round(i?.durationMs??320)),m.setDisabled(!h.editable),x.setValue(i?.advanceOnClick!==false),x.setDisabled(!h.editable),v.hidden=!i?.soundFileName,v.textContent=i?.soundFileName?`${t("pptx.transition.sound")}: ${i.soundFileName}`:"",f.update(i);}}}function mv(e,t,n){let{el:o,body:r}=ie(e,t("pptx.tags.title")),i=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tags-toggle");i.type="button";let a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tags-toggle-label"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tags-count");i.append(a,s);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tags-list"),l=chunkR2NUNRIB_cjs.Ok(e,"p","pptxv-tags-empty");l.textContent=t("pptx.tags.noTags");let d=De(e,t("pptx.tags.addTag"),()=>n.updateTagCollections(chunkR2NUNRIB_cjs.xh(u)));r.append(i,p,l,d);let u=[],m=true,g=false,x=(b,h,S)=>{let E=e.createElement("input");return E.type="text",E.className="pptxv-tags-input",E.value=b,E.placeholder=h,E.setAttribute("aria-label",h),E.disabled=!g,E.addEventListener("change",()=>S(E.value)),E.addEventListener("keydown",T=>T.stopPropagation()),E},v=b=>{let h=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tags-row");if(h.append(x(b.name,t("pptx.tags.name"),S=>n.updateTagCollections(chunkR2NUNRIB_cjs.vh(u,b.colIdx,b.tagIdx,"name",S))),x(b.value,t("pptx.tags.value"),S=>n.updateTagCollections(chunkR2NUNRIB_cjs.vh(u,b.colIdx,b.tagIdx,"value",S)))),g){let S=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tags-remove");S.type="button",S.textContent="\xD7",S.title=t("pptx.tags.deleteTag"),S.setAttribute("aria-label",t("pptx.tags.deleteTag")),S.addEventListener("click",()=>n.updateTagCollections(chunkR2NUNRIB_cjs.wh(u,b.colIdx,b.tagIdx))),h.appendChild(S);}return h},f=()=>{let b=chunkR2NUNRIB_cjs.uh(u);s.textContent=String(b.length),a.textContent=`${m?"\u25B8":"\u25BE"} ${t("pptx.tags.title")}`,i.setAttribute("aria-expanded",String(!m)),p.hidden=m||b.length===0,l.hidden=m||b.length>0,d.hidden=m||!g,d.disabled=!g,!m&&(p.textContent="",p.append(...b.map(v)));};return i.addEventListener("click",()=>{m=!m,f();}),{el:o,update(b){u=b.tagCollections,g=b.editable,f();}}}var uv={dk1:"pptx.themeEditor.colorDark1",lt1:"pptx.themeEditor.colorLight1",dk2:"pptx.themeEditor.colorDark2",lt2:"pptx.themeEditor.colorLight2",accent1:"pptx.themeEditor.colorAccent1",accent2:"pptx.themeEditor.colorAccent2",accent3:"pptx.themeEditor.colorAccent3",accent4:"pptx.themeEditor.colorAccent4",accent5:"pptx.themeEditor.colorAccent5",accent6:"pptx.themeEditor.colorAccent6",hlink:"pptx.themeEditor.colorHyperlink",folHlink:"pptx.themeEditor.colorFollowedLink"};function Tt(e,t="#000000"){let n=typeof e=="string"?e.startsWith("#")?e:`#${e}`:"";return /^#[0-9a-fA-F]{6}$/u.test(n)?n:t}function xv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-slots"),r=new Map;for(let i of chunkR2NUNRIB_cjs.e){let a=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-theme-slot"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-slot-label");s.textContent=t(uv[i]);let p=e.createElement("input");p.type="color",p.className="pptxv-theme-slot-input",p.setAttribute("aria-label",t(uv[i])),p.addEventListener("change",()=>n(i,p.value)),a.append(s,p),o.appendChild(a),r.set(i,p);}return {el:o,update(i,a){for(let[s,p]of r)p.value=Tt(i[s]),p.disabled=!a;}}}function gv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-presets"),r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");r.textContent=t("pptx.themeEditor.presetThemes");let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-preset-grid");o.append(r,i);let a=[];for(let s of chunkR2NUNRIB_cjs.ri){let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-theme-preset");p.type="button",p.title=s.name,p.setAttribute("aria-label",s.name);let l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-preset-swatches");for(let u of ["accent1","accent2","accent3","accent4"]){let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-preset-dot");m.style.background=Tt(s.colorScheme[u],"#888888"),l.appendChild(m);}let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-preset-name");d.textContent=s.name,p.append(l,d),p.addEventListener("click",()=>n(s)),i.appendChild(p),a.push({node:p,preset:s});}return {el:o,update(s,p){for(let{node:l,preset:d}of a)l.classList.toggle("is-active",d.name===s),l.disabled=!p;}}}function yi(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-field-select"),r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");r.textContent=t;let i=e.createElement("select");i.className="pptxv-field-select-input",i.setAttribute("aria-label",t);for(let a of chunkR2NUNRIB_cjs.ti){let s=e.createElement("option");s.value=a,s.textContent=a,i.appendChild(s);}return i.addEventListener("change",()=>n(i.value)),o.append(r,i),{el:o,select:i}}function Si(e,t){if(!Array.from(e.options).some(n=>n.value===t)){let n=e.ownerDocument.createElement("option");n.value=t,n.textContent=t,e.appendChild(n);}e.value=t;}var wi="Calibri Light",Ci="Calibri";function bv(e,t,n){let{el:o,body:r}=ie(e,t("pptx.themeEditor.title")),i={colorScheme:void 0,major:wi,minor:Ci,name:"Custom Theme"},a={...chunkR2NUNRIB_cjs.si},s=wi,p=Ci,l=false,d=false,u=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-theme-name"),m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");m.textContent=t("pptx.themeEditor.themeName");let g=e.createElement("input");g.type="text",g.className="pptxv-field-input",g.placeholder=t("pptx.themeEditor.themeNamePlaceholder"),g.setAttribute("aria-label",t("pptx.themeEditor.themeName")),g.addEventListener("keydown",A=>A.stopPropagation()),g.addEventListener("input",()=>{d=true;}),u.append(m,g);let x=gv(e,t,A=>{a={...A.colorScheme},s=A.majorFont,p=A.minorFont,g.value=A.name,d=true,w();}),v=xv(e,t,(A,P)=>{a={...a,[A]:P},d=true,w();}),f=yi(e,t("pptx.themeEditor.headingFont"),A=>{s=A,d=true,w();}),b=yi(e,t("pptx.themeEditor.bodyFont"),A=>{p=A,d=true,w();}),h=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-preview"),S=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-preview-heading");S.textContent=t("pptx.themeEditor.headingSample");let E=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-preview-body");E.textContent=t("pptx.themeEditor.bodySample"),h.append(S,E);let T=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-deck-btn-row"),k=De(e,t("pptx.themeEditor.applyToPresentation"),()=>{let A={majorFont:{latin:s},minorFont:{latin:p}};n.applyThemeEdit({colorScheme:a,fontScheme:A,name:g.value}),d=false;}),y=De(e,t("pptx.themeEditor.reset"),()=>{C(),d=false,w();});T.append(k,y),r.append(u,x.el,v.el,f.el,b.el,h,T);function w(){v.update(a,l),x.update(g.value,l),Si(f.select,s),Si(b.select,p),f.select.disabled=!l,b.select.disabled=!l,g.disabled=!l,k.disabled=!l,y.disabled=!l,h.style.background=Tt(a.lt1,"#ffffff"),S.style.color=Tt(a.dk2,"#000000"),S.style.fontFamily=s,E.style.color=Tt(a.dk1,"#000000"),E.style.fontFamily=p;}function C(){a={...chunkR2NUNRIB_cjs.si,...i.colorScheme??{}},s=i.major,p=i.minor,g.value=i.name;}return {el:o,update(A){l=A.editable,i={colorScheme:A.colorScheme,major:A.fontScheme?.majorFont?.latin??wi,minor:A.fontScheme?.minorFont?.latin??Ci,name:A.themeName??"Custom Theme"},d||C(),w();}}}function Pw(e,t){let{el:n,body:o}=ie(e,t("pptx.documentProperties.notesHandoutHeading")),r=Qe(e,t("pptx.documentProperties.notesSize")),i=Qe(e,t("pptx.master.notesMasterTitle")),a=Qe(e,t("pptx.master.handoutMasterTitle"));o.append(r.el,i.el,a.el);let s=t("pptx.digitalSignatures.notAvailable"),p=l=>l===void 0?s:`${l} ${t("pptx.notesMaster.placeholders")}`;return {el:n,update(l){r.value.textContent=l.notesCanvasSize?`${l.notesCanvasSize.width} \xD7 ${l.notesCanvasSize.height}px`:s,i.value.textContent=p(l.notesPlaceholderCount),a.value.textContent=p(l.handoutPlaceholderCount);}}}function Aw(e,t,n){let{el:o,body:r}=ie(e,t("pptx.documentProperties.documentHeading")),i=Qe(e,t("pptx.properties.titleLabel")),a=Qe(e,t("pptx.properties.author")),s=De(e,t("pptx.ribbon.documentProperties"),()=>n.openDocumentProperties());return r.append(i.el,a.el,s),{el:o,update(p){i.value.textContent=p.docTitle||"-",a.value.textContent=p.docAuthor||"-";}}}function vv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-deck"),r=[rv(e,t,n),sv(e,t,n),bv(e,t,n),pv(e,t,n),lv(e,t,n),cv(e,t,n),av(e,t,n),Pw(e,t),Aw(e,t,n),mv(e,t,n)];return o.append(...r.map(i=>i.el)),{el:o,update(i){for(let a of r)a.update(i);},setVisible(i){o.hidden=!i;}}}function kw(e){return chunkR2NUNRIB_cjs.c(e)&&e.text?e.text.slice(0,24):e.type}function fv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-elements"),r=chunkR2NUNRIB_cjs.Ok(e,"h4","pptxv-inspector-section-title");r.textContent=t("pptx.inspector.layerOrder"),o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-layer-list");o.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"p","pptxv-inspector-empty");return a.textContent=t("pptx.selectionPane.empty"),o.appendChild(a),{el:o,update(s){i.replaceChildren(),a.hidden=s.elements.length>0,[...s.elements].reverse().forEach((p,l)=>{let d=s.elements.length-l-1,u=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-inspector-layer-row");u.type="button",u.title=`${p.type}: ${p.id}`,u.classList.toggle("is-selected",s.selectedIds.includes(p.id));let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-layer-num");m.textContent=String(d+1);let g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-layer-label");g.textContent=kw(p),u.append(m,g),u.addEventListener("click",()=>n(p.id)),i.appendChild(u);});}}}function hv(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-connector-arrows";let r=chunkR2NUNRIB_cjs.vd.map(i=>{let a=Iw(e,t,n,i);return o.appendChild(a.select.parentElement),a});return {el:o,update(i){o.hidden=!i.isConnector;for(let{control:a,select:s}of r){let p=i.shapeStyle?.[a.styleKey];s.value=typeof p=="string"&&p.length>0?p:a.fallback,s.disabled=!i.canShape;}}}}function Iw(e,t,n,o){let r=e.createElement("select");for(let a of o.values){let s=e.createElement("option");s.value=a,s.textContent=chunkR2NUNRIB_cjs.pa(o.optionLabelKeys,a,t),r.appendChild(s);}r.addEventListener("change",()=>n.setShapeStyle(chunkR2NUNRIB_cjs.wd(o,r.value)));let i=e.createElement("label");return i.textContent=t(o.labelKey),r.setAttribute("aria-label",t(o.labelKey)),i.appendChild(r),{control:o,select:r}}function yv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-shape-effects"),r=ce(e,{label:t("pptx.shape.type"),options:chunkR2NUNRIB_cjs.Ai.map(f=>({value:f.type,label:t(f.i18nKey)})),onChange:f=>n.setShapeType(f)});o.appendChild(r.el);let i=(f,b,h)=>{let S=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-row"),E=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-label");E.textContent=f;let T=ze(e,{label:f,onInput:k=>n.setShapeStyle({[b]:k})},h);return S.append(E,T.el),o.appendChild(S),T},a=(f,b)=>{let h=j(e,{label:f,min:0,onCommit:S=>n.setShapeStyle({[b]:S})});return o.appendChild(h.el),h},s=i(t("pptx.textEffects.shadowColor"),"shadowColor","#000000"),p=a(t("pptx.textEffects.blur"),"shadowBlur"),l=a(t("pptx.shape.shadowDistance"),"shadowDistance"),d=i(t("pptx.textEffects.glowColor"),"glowColor","#ffff00"),u=a(t("pptx.textEffects.glow"),"glowRadius"),m=a(t("pptx.shape.softEdges"),"softEdgeRadius"),g=Y(e,{label:t("pptx.textEffects.reflection"),onChange:f=>n.setShapeStyle({reflectionStartOpacity:f?.5:void 0})});o.appendChild(g.el);let x=hv(e,t,n);o.appendChild(x.el);let v=[r,s,p,l,d,u,m,g];return {el:o,update(f){let b=f.shapeStyle??{};s.setValue(b.shadowColor??"#000000"),p.setValue(b.shadowBlur??0),l.setValue(b.shadowDistance??0),d.setValue(b.glowColor??"#ffff00"),u.setValue(b.glowRadius??0),m.setValue(b.softEdgeRadius??0),g.setValue(!!b.reflectionStartOpacity),r.setValue(f.shapeType??"rect"),r.el.hidden=!f.shapeType,x.update(f);for(let h of v)h.setDisabled(!f.canShape);}}}function Sv(e){return `${Math.round(e*100)}%`}function wv(e,t,n,o){let r=n(t("pptx.shape.fillStroke")),i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-row"),a=ze(e,{label:t("pptx.inspector.fill"),onInput:o.setShapeFill},"#4f86ff"),s=ze(e,{label:t("pptx.inspector.line"),onInput:o.setShapeStroke},"#1e3a8a"),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-label");p.textContent=t("pptx.inspector.fill");let l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-inspector-row-label");l.textContent=t("pptx.inspector.line"),i.append(p,a.el,l,s.el),r.appendChild(i);let d=j(e,{label:t("pptx.ribbon.strokeWidth"),min:0,step:.5,onCommit:o.setShapeStrokeWidth});r.appendChild(d.el);let u=ve(e,{label:t("pptx.strokeEffects.fillOpacity"),min:0,max:1,step:.01,formatValue:Sv,onCommit:o.setFillOpacity});r.appendChild(u.el);let m=ve(e,{label:t("pptx.strokeEffects.strokeOpacity"),min:0,max:1,step:.01,formatValue:Sv,onCommit:o.setStrokeOpacity});r.appendChild(m.el);let g=Y(e,{label:t("pptx.fill.gradient"),onChange(P){P?o.setGradientFill(T):o.setShapeFill(a.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(g.el);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-gradient");r.appendChild(x);let v=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-row");x.appendChild(v);let f=H(e,{label:t("pptx.gradient.linear"),text:t("pptx.gradient.linear"),onClick:()=>o.setGradientFill({...T,type:"linear"})}),b=H(e,{label:t("pptx.gradient.radial"),text:t("pptx.gradient.radial"),onClick:()=>o.setGradientFill({...T,type:"radial"})});v.append(f.btn,b.btn);let h=j(e,{label:t("pptx.gradient.angle"),min:0,max:360,onCommit:P=>o.setGradientFill({...T,angle:P})});x.appendChild(h.el);let S=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-gradient-stops");x.appendChild(S);let E=H(e,{label:t("pptx.gradient.addStop"),text:t("pptx.gradient.addStop"),onClick:()=>{let P=T.stops,I=P[P.length-1]?.position??100,L=P[P.length-2]?.position??0;o.addGradientStop("#ffffff",Math.round((I+L)/2));}});x.appendChild(E.btn);let T={type:"linear",angle:90,stops:[]},k=[],y=P=>{S.replaceChildren(),k=P.map((I,L)=>{let D=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-row"),R=ze(e,{label:t("pptx.gradient.stops"),onInput:O=>o.updateGradientStop(L,{color:O})},I.color),F=j(e,{label:t("pptx.gradient.position"),min:0,max:100,onCommit:O=>o.updateGradientStop(L,{position:O})});F.setValue(I.position);let M=H(e,{label:t("pptx.gradient.removeStop"),text:"\u2715",onClick:()=>o.removeGradientStop(L)});return M.setDisabled(P.length<=2),D.append(R.el,F.el,M.btn),S.appendChild(D),{color:R,position:F,remove:M}});},w=[a,s,d,u,m,g],C=[f,b,h,E],A=yv(e,t,o);return r.appendChild(A.el),{el:r,update(P){r.hidden=!P.hasSelection||!P.canShape,a.setValue(P.fillColor),s.setValue(P.strokeColor),d.setValue(P.strokeWidth),u.setValue(P.fillOpacity),m.setValue(P.strokeOpacity),g.setValue(P.gradientEnabled),h.setValue(P.gradient.angle),T=P.gradient,y(P.gradient.stops),x.hidden=!P.gradientEnabled,A.update(P);for(let I of w)I.setDisabled(!P.canShape);for(let I of C)I.setDisabled(!P.canShape||!P.gradientEnabled);for(let I of k)I.color.setDisabled(!P.canShape),I.position.setDisabled(!P.canShape),I.remove.setDisabled(!P.canShape||P.gradient.stops.length<=2);}}}function Cv(e,t,n){let o=n(t("pptx.elementType.group")),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-muted-text");return o.appendChild(r),{el:o,update(i){o.hidden=!i.isGroup,i.isGroup&&(r.textContent=i.groupChildCount!==void 0?t("pptx.group.childCount",{count:i.groupChildCount}):t("pptx.group.groupedElement"));}}}function Ev(e,t,n,o){let r=n(t("pptx.inspector.image")),i=e.createElement("button");i.type="button",i.textContent=t("pptx.image.replaceImage"),i.addEventListener("click",o.replaceImage);let a=e.createElement("button");a.type="button",a.textContent=t("pptx.image.resetImage"),a.addEventListener("click",o.resetImage),r.append(i,a);let s=B=>`${Math.round(B)}%`,p=ve(e,{label:t("pptx.imageAdjustments.brightness"),min:-100,max:100,formatValue:s,onCommit:o.setImageBrightness}),l=ve(e,{label:t("pptx.imageAdjustments.contrast"),min:-100,max:100,formatValue:s,onCommit:o.setImageContrast}),d=ve(e,{label:t("pptx.image.saturation"),min:-100,max:100,formatValue:s,onCommit:o.setImageSaturation});r.append(p.el,l.el,d.el);let u=e.createElement("label");u.textContent=t("pptx.image.artisticEffects");let m=e.createElement("select");m.setAttribute("aria-label",t("pptx.image.artisticEffects"));for(let[B,V]of chunkR2NUNRIB_cjs.mi){let z=e.createElement("option");z.value=B,z.textContent=t(V),m.appendChild(z);}m.addEventListener("change",()=>o.setImageEffects({artisticEffect:m.value==="none"?void 0:m.value})),u.appendChild(m);let g=ve(e,{label:t("pptx.imageAdjustments.transparency"),min:0,max:100,formatValue:s,onCommit:B=>o.setImageEffects({alphaModFix:100-B})}),x=ve(e,{label:t("pptx.imageAdjustments.biLevelThreshold"),min:0,max:100,formatValue:s,onCommit:B=>o.setImageEffects({biLevel:B})}),v=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-grid"),f={},b=(B,V)=>{let z=e.createElement("label");z.textContent=B;let N=e.createElement("input");return N.type="color",N.addEventListener("input",()=>o.setImageEffects({duotone:{color1:V==="color1"?N.value:f.color1?.value??"#000000",color2:V==="color2"?N.value:f.color2?.value??"#ffffff"}})),z.appendChild(N),v.appendChild(z),N},h=b(t("pptx.image.duotoneDark"),"color1"),S=b(t("pptx.image.duotoneLight"),"color2");f.color1=h,f.color2=S,r.append(u,g.el,x.el,v);let E=e.createElement("input");E.type="checkbox";let T=e.createElement("input");T.type="color";let k=40,y=ve(e,{label:t("pptx.image.washOpacity"),min:0,max:100,formatValue:s,onCommit:B=>{k=B,o.setImageEffects({colorWash:{color:T.value,opacity:B}});}});E.addEventListener("change",()=>o.setImageEffects({colorWash:E.checked?{color:T.value,opacity:k}:void 0})),T.addEventListener("input",()=>o.setImageEffects({colorWash:{color:T.value,opacity:k}})),r.append(E,T,y.el);let w=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-grid");r.appendChild(w);let C=(B,V)=>{let z=j(e,{label:B,min:0,max:90,onCommit:N=>o.setImageCrop(V,N/100)});return w.appendChild(z.el),z},A=C(t("pptx.image.cropLeft"),"left"),P=C(t("pptx.image.cropTop"),"top"),I=C(t("pptx.image.cropRight"),"right"),L=C(t("pptx.image.cropBottom"),"bottom"),D=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-image-alt"),R=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");R.textContent=t("pptx.image.altText");let F=e.createElement("textarea");F.rows=2,F.className="pptxv-image-alt-input",F.placeholder=t("pptx.imageTransform.altTextPlaceholder"),F.setAttribute("aria-label",t("pptx.image.altText")),F.addEventListener("keydown",B=>B.stopPropagation()),F.addEventListener("change",()=>o.setAltText(F.value)),D.append(R,F),r.appendChild(D);let M=[p,l,d],O=[A,P,I,L];return {el:r,update(B){r.hidden=!B.hasSelection||!B.isImage,p.setValue(B.imageBrightness),l.setValue(B.imageContrast),d.setValue(B.imageSaturation),m.value=B.imageArtisticEffect,g.setValue(B.imageTransparency),x.setValue(B.imageBiLevel),h.value=B.imageDuotone1,S.value=B.imageDuotone2,E.checked=!!B.imageColorWash,T.value=B.imageColorWash?.color??"#0066cc",y.setValue(B.imageColorWash?.opacity??40),k=B.imageColorWash?.opacity??40,e.activeElement!==F&&(F.value=B.altText),F.disabled=!B.isImage,A.setValue(B.cropLeft*100),P.setValue(B.cropTop*100),I.setValue(B.cropRight*100),L.setValue(B.cropBottom*100);for(let V of [...M,g,x])V.setDisabled(!B.isImage);m.disabled=!B.isImage,h.disabled=!B.isImage,S.disabled=!B.isImage,i.disabled=!B.isImage,a.disabled=!B.isImage,E.disabled=!B.isImage,T.disabled=!B.isImage,y.setDisabled(!B.isImage);for(let V of O)V.setDisabled(!B.isImage);}}}function Tv(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline"),o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline-times"),r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-media-timeline-time"),i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-media-timeline-time");o.append(r,i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline-bar"),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline-region"),p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline-playhead"),l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline-handle is-start"),d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline-handle is-end"),u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-media-timeline-marks");a.append(s,u,p,l,d),n.append(o,a);let m={duration:0,trimStartMs:0,trimEndMs:0,canEdit:false},g=v=>{let f=a.getBoundingClientRect();return chunkR2NUNRIB_cjs.ji(v,f.left,f.width,m.duration||1)};a.addEventListener("click",v=>{v.target===l||v.target===d||t.onSeek(g(v.clientX));});let x=(v,f)=>{v.addEventListener("pointerdown",b=>{if(!m.canEdit)return;b.preventDefault(),b.stopPropagation(),v.setPointerCapture(b.pointerId);let h=E=>{let T=chunkR2NUNRIB_cjs.li(f,g(E.clientX),m.duration,m.trimStartMs,m.trimEndMs);t.onTrimChange(Math.round(T.trimStartMs),Math.round(T.trimEndMs));},S=()=>{v.removeEventListener("pointermove",h),v.removeEventListener("pointerup",S),v.removeEventListener("pointercancel",S);};v.addEventListener("pointermove",h),v.addEventListener("pointerup",S),v.addEventListener("pointercancel",S);});};return x(l,"start"),x(d,"end"),{el:n,update(v){m=v;let f=chunkR2NUNRIB_cjs.ki(v.duration,v.trimStartMs,v.trimEndMs,v.currentTime),b=v.trimEndMs>0?v.trimEndMs/1e3:v.duration;r.textContent=chunkR2NUNRIB_cjs.ii(v.trimStartMs/1e3),i.textContent=chunkR2NUNRIB_cjs.ii(b),s.style.left=`${f.startPercent}%`,s.style.width=`${Math.max(0,f.endPercent-f.startPercent)}%`,p.style.left=`${f.playheadPercent}%`,l.style.left=`${f.startPercent}%`,d.style.left=`${f.endPercent}%`,l.hidden=!v.canEdit,d.hidden=!v.canEdit,u.textContent="";let h=v.duration>0?v.duration:1;for(let S of v.bookmarks){let E=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-media-timeline-mark");E.type="button",E.style.left=`${Math.max(0,Math.min(100,S.time/h*100))}%`,E.title=S.label??"",E.setAttribute("aria-label",S.label||chunkR2NUNRIB_cjs.ii(S.time)),E.addEventListener("click",T=>{T.stopPropagation(),t.onSeek(S.time);}),u.appendChild(E);}}}}function kv(e,t,n,o){let r=n(t("pptx.media.title")),i=e.createElement("video");i.controls=true,i.preload="metadata",i.className="pptxv-media-preview",i.addEventListener("loadedmetadata",()=>{o.setMediaProperties({metadata:{duration:Number.isFinite(i.duration)?i.duration:void 0,videoWidth:i.videoWidth||void 0,videoHeight:i.videoHeight||void 0}}),y();});let a=e.createElement("img");a.className="pptxv-media-poster",a.alt=t("pptx.media.posterFrame");let s=Y(e,{label:t("pptx.media.autoPlay"),onChange:w=>o.setMediaProperties({autoPlay:w})}),p=Y(e,{label:t("pptx.media.loop"),onChange:w=>o.setMediaProperties({loop:w})}),l=Y(e,{label:t("pptx.media.playAcrossSlides"),onChange:w=>o.setMediaProperties({playAcrossSlides:w})}),d=Y(e,{label:t("pptx.media.fullScreen"),onChange:w=>o.setMediaProperties({fullScreen:w})}),u=Y(e,{label:t("pptx.media.hideWhenNotPlaying"),onChange:w=>o.setMediaProperties({hideWhenNotPlaying:w})}),m=ve(e,{label:t("pptx.media.volume"),min:0,max:100,formatValue:w=>`${Math.round(w)}%`,onCommit:w=>o.setMediaProperties({volume:w/100})}),g=ce(e,{label:t("pptx.media.playbackSpeed"),options:[.5,.75,1,1.25,1.5,2].map(w=>({value:String(w),label:`${w}x`})),onChange:w=>o.setMediaProperties({playbackSpeed:Number(w)})}),x=j(e,{label:t("pptx.media.trimStart"),min:0,onCommit:w=>o.setMediaProperties({trimStartMs:w})}),v=j(e,{label:t("pptx.media.trimEnd"),min:0,onCommit:w=>o.setMediaProperties({trimEndMs:w})}),f=Pv(e,t("pptx.media.bookmarks"));f.control.placeholder="12.5 | Intro",f.control.addEventListener("change",()=>o.setMediaProperties({bookmarks:Av(f.control.value).map((w,C)=>{let[A,P=""]=w.split("|").map(I=>I.trim());return {id:`bookmark-${C+1}`,time:Number(A),label:P}}).filter(({time:w})=>Number.isFinite(w))}));let b=Pv(e,t("pptx.media.captions"));b.control.placeholder="en | English | captions | captions.vtt",b.control.addEventListener("change",()=>o.setMediaProperties({captionTracks:Av(b.control.value).map((w,C)=>{let[A="",P="",I="captions",L=""]=w.split("|").map(D=>D.trim());return {id:`caption-${C+1}`,language:A,label:P,kind:I,src:L||void 0}})}));let h=e.createElement("output");h.className="pptxv-media-metadata";let S=[s,p,l,d,u],E,T=false,k=Tv(e,{onTrimChange:(w,C)=>{o.setMediaProperties({trimStartMs:w,trimEndMs:C}),x.setValue(w),v.setValue(C);},onSeek:w=>{Number.isFinite(i.duration)&&(i.currentTime=w);}}),y=()=>{k.update({duration:Number.isFinite(i.duration)?i.duration:0,trimStartMs:E?.trimStartMs??0,trimEndMs:E?.trimEndMs??0,currentTime:i.currentTime||0,bookmarks:E?.bookmarks??[],canEdit:T});};return i.addEventListener("timeupdate",y),r.append(i,a,k.el,...S.map(({el:w})=>w),m.el,g.el,x.el,v.el,f.label,b.label,h),{el:r,update(w){r.hidden=!w.isMedia;let C=w.media;E=C,T=w.isMedia,y();let A=w.mediaPreviewUrl??"";i.src!==A&&(i.src=A),i.hidden=!A,i.poster=w.mediaPosterUrl??"",a.src=w.mediaPosterUrl??"",a.hidden=!w.mediaPosterUrl,s.setValue(C?.autoPlay??false),p.setValue(C?.loop??false),l.setValue(C?.playAcrossSlides??false),d.setValue(C?.fullScreen??false),u.setValue(C?.hideWhenNotPlaying??false),m.setValue((C?.volume??1)*100),g.setValue(String(C?.playbackSpeed??1)),x.setValue(C?.trimStartMs??0),v.setValue(C?.trimEndMs??0),f.control.value=(C?.bookmarks??[]).map(({time:P,label:I})=>`${P} | ${I}`).join(`
|
|
6
6
|
`),b.control.value=(C?.captionTracks??[]).map(({language:P,label:I,kind:L,src:D})=>`${P} | ${I} | ${L} | ${D??""}`).join(`
|
|
7
|
-
`),h.textContent=C?.metadata?`${C.metadata.duration??0}s, ${C.metadata.videoWidth??0} x ${C.metadata.videoHeight??0}, ${C.metadata.codecInfo??C.mediaMimeType??""}`:C?.mediaMimeType??"";for(let P of [...S,m,g,x,v])P.setDisabled(!w.isMedia);f.control.disabled=!w.isMedia,b.control.disabled=!w.isMedia;}}}function Pv(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=3,n.appendChild(o),{label:n,control:o}}function Av(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function Iv(e,t,n){let o=n(t("pptx.ole.title"));o.classList.add("pptxv-ole-info");let r=p=>{let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ole-row"),d=chunkR2NUNRIB_cjs.Ok(e,"span");d.textContent=p;let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-ole-value");return l.append(d,u),o.appendChild(l),{row:l,value:u}},i=r(t("pptx.ole.type")),a=r(t("pptx.ole.fileName")),s=r(t("pptx.ole.linkStatus"));return s.value.classList.add("pptxv-ole-badge"),{el:o,update(p){o.hidden=!p.isOle,p.isOle&&(i.value.textContent=chunkR2NUNRIB_cjs.s(p.oleObjectType),a.row.hidden=!p.oleFileName,a.value.textContent=p.oleFileName??"",a.value.title=p.oleFileName??"",s.value.textContent=t(p.oleIsLinked?"pptx.ole.linked":"pptx.ole.embedded"),s.value.classList.toggle("is-linked",p.oleIsLinked));}}}function Lv(e,t,n,o,r){let i=n(t("pptx.arrange.positionSize")),a=i.querySelector(".pptxv-inspector-section-title"),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-lock-row");a?(i.insertBefore(s,a),s.appendChild(a)):i.insertBefore(s,i.firstChild);let p=H(e,{label:t("pptx.inspector.lock"),icon:"lock-open",className:"pptxv-inspector-lock-btn",onClick:r});s.appendChild(p.btn);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-grid");i.appendChild(l);let d=(b,h,S)=>{let E=j(e,{label:b,min:S,onCommit:T=>o({[h]:T})});return l.appendChild(E.el),E},u=d(t("pptx.arrange.x"),"x"),m=d(t("pptx.arrange.y"),"y"),g=d(t("pptx.arrange.width"),"width",1),x=d(t("pptx.arrange.height"),"height",1),v=d(t("pptx.arrange.rotation"),"rotation"),f=[u,m,g,x,v];return {el:i,update(b){i.hidden=!b.hasSelection,u.setValue(b.x),m.setValue(b.y),g.setValue(b.width),x.setValue(b.height),v.setValue(b.rotation);for(let S of f)S.setDisabled(!b.hasSelection);p.setActive(b.isLocked),p.setDisabled(!b.hasSelection);let h=t(b.isLocked?"pptx.inspector.unlock":"pptx.inspector.lock");p.btn.title=h,p.btn.setAttribute("aria-label",h),p.btn.replaceChildren(chunkR2NUNRIB_cjs.Zk(e,b.isLocked?"lock":"lock-open"));}}}function Dv(e,t,n,o){let r=n(t("pptx.shape.quickStyles")),i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-quick-styles"),a=[];for(let s of chunkR2NUNRIB_cjs.oi){let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-quick-style");if(p.type="button",p.title=s.name,p.setAttribute("aria-label",s.name),p.style.background=s.style.fillGradient||s.style.fillColor||"transparent",s.style.strokeColor&&(p.style.border=`${s.style.strokeWidth??1}px solid ${s.style.strokeColor}`),s.style.shadowColor){let l=s.style.shadowOffsetX??2,d=s.style.shadowOffsetY??2;p.style.boxShadow=`${l}px ${d}px ${s.style.shadowBlur??4}px ${s.style.shadowColor}`;}p.addEventListener("click",()=>o.setShapeStyle(s.style)),i.appendChild(p),a.push(p);}return r.appendChild(i),{el:r,update(s){r.hidden=!s.canShape;for(let p of a)p.disabled=!s.canShape;}}}var Lw=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function Mv(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-layout-grid"),s=new Map;for(let h of chunkR2NUNRIB_cjs.D){let S=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-layout-button");S.type="button",S.dataset.testid=`smartart-layout-${h}`,S.textContent=chunkR2NUNRIB_cjs.pa(chunkR2NUNRIB_cjs.sa,h,t),S.addEventListener("click",()=>o.setSmartArtLayout(h)),s.set(h,S),a.appendChild(S);}r.appendChild(a);let p=ce(e,{label:t("pptx.smartart.colorScheme"),options:Lw.map(h=>({value:h,label:chunkR2NUNRIB_cjs.pa(chunkR2NUNRIB_cjs.ra,h,t)})),onChange:o.setSmartArtColorScheme}),l=p.el.querySelector("select");l&&(l.dataset.testid="smartart-color-scheme"),r.appendChild(p.el);let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-label");d.textContent=t("pptx.smartart.textPane"),r.appendChild(d);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-nodes"),m=e.createElement("button");m.type="button",m.textContent=t("pptx.smartart.addItem"),m.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(m,u);let g,x=null;function v(h,S){let E=g;if(!E)return;let T=E.nodes.find(A=>A.id===S),k=h.currentTarget.value,y=!k,w=chunkR2NUNRIB_cjs.v(E,S,k),C=k!==T?.text;if(h.key==="Enter"){h.preventDefault();let A=chunkR2NUNRIB_cjs.ve(w,S);A?(x=A.focusNodeId??null,o.replaceSmartArtData(A.data)):C&&o.replaceSmartArtData(w);}else if((h.key==="Backspace"||h.key==="Delete")&&y){if(!T?.parentId&&!chunkR2NUNRIB_cjs.te(E.resolvedLayoutType,chunkR2NUNRIB_cjs.ue(E)))return;h.preventDefault();let P=chunkR2NUNRIB_cjs.we(E,S);P&&(x=P.focusNodeId??null,o.replaceSmartArtData(P.data));}else if(h.key==="Tab"&&!h.shiftKey){h.preventDefault();let A=chunkR2NUNRIB_cjs.xe(w,S);A?(x=S,o.replaceSmartArtData(A)):C&&o.replaceSmartArtData(w);}else if(h.key==="Tab"&&h.shiftKey){h.preventDefault();let A=chunkR2NUNRIB_cjs.ye(w,S);A?(x=S,o.replaceSmartArtData(A)):C&&o.replaceSmartArtData(w);}}let f="",b=h=>{let S=h.smartArtData;g=S;let E=S?.nodes.map(T=>T.id).join("|")??"";if(E===f){let T=u.querySelectorAll('[data-testid="smartart-node-text"]');S?.nodes.forEach((k,y)=>{let w=T[y];w&&e.activeElement!==w&&(w.value=k.text);});return}f=E,u.replaceChildren();for(let[T,k]of (S?.nodes??[]).entries()){let y=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-smartart-node"),w=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-node-index");w.textContent=String(T+1);let C=e.createElement("input");C.type="text",C.className="pptxv-smartart-node-input",C.dataset.testid="smartart-node-text",C.dataset.nodeId=k.id,C.setAttribute("aria-label",`${t("pptx.smartart.item")} ${T+1}`),C.value=k.text,C.addEventListener("change",()=>o.setSmartArtNodeText(k.id,C.value)),C.addEventListener("keydown",R=>v(R,k.id));let A=e.createElement("input");A.type="color",A.value=k.style?.fillColor??"#3b82f6",A.title=t("pptx.inspector.fill"),A.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fillColor:A.value}));let P=e.createElement("input");P.type="color",P.value=k.style?.fontColor??"#ffffff",P.title=t("pptx.table.color"),P.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fontColor:P.value}));let I=e.createElement("button");I.type="button",I.textContent="B",I.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{bold:!k.style?.bold}));let L=e.createElement("button");L.type="button",L.textContent="I",L.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{italic:!k.style?.italic}));let D=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-hierarchy");for(let[R,F]of [["addChild","pptx.smartArt.addSubItem"],["promote","pptx.smartart.promote"],["demote","pptx.smartart.demote"],["remove","pptx.common.delete"]]){let M=e.createElement("button");M.type="button",M.textContent=t(F),M.addEventListener("click",()=>o.mutateSmartArtNode(k.id,R)),D.appendChild(M);}y.append(w,C,A,P,I,L,D),u.appendChild(y);}};return {el:r,update(h){r.hidden=!h.isSmartArt;let S=h.smartArtData?.resolvedLayoutType;for(let[E,T]of s)T.disabled=!h.isSmartArt,T.classList.toggle("is-active",E===S),T.setAttribute("aria-pressed",String(E===S));if(p.setValue(h.smartArtData?.colorScheme??"colorful1"),p.setDisabled(!h.isSmartArt),m.disabled=!h.isSmartArt,b(h),x){let E=x;x=null,u.querySelector(`[data-testid="smartart-node-text"][data-node-id="${E}"]`)?.focus();}}}}function Hv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-inspector-section pptxv-table-grid");o.setAttribute("aria-label",t("pptx.tableDataEditor.ariaLabel"));let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-header"),i=chunkR2NUNRIB_cjs.Ok(e,"h4","pptxv-inspector-section-title");i.textContent=t("pptx.inspector.tableData");let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-toolbar");r.append(i,a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-scroll"),p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-body");p.setAttribute("role","grid"),s.appendChild(p),o.append(r,s);let l,d,u=true,m=A=>{!l||A===l||!A.tableData||n.setTableData(A.tableData,A.rawXml);},g=(A,P,I)=>{let L=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-table-grid-btn");return L.type="button",L.textContent=t(`pptx.tableDataEditor.${A}`),L.title=t(`pptx.tableDataEditor.${P}`),L.addEventListener("click",()=>{l&&m(I(l));}),L},x=g("addRowLabel","addRowTitle",chunkR2NUNRIB_cjs.Jb),v=g("removeRowLabel","removeRowTitle",chunkR2NUNRIB_cjs.Kb),f=g("addColumnLabel","addColumnTitle",chunkR2NUNRIB_cjs.Lb),b=g("removeColumnLabel","removeColumnTitle",chunkR2NUNRIB_cjs.Mb);a.append(x,v,f,b);let h=A=>{let P=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-head");P.setAttribute("role",A.role),A.role==="rowheader"&&P.classList.add("pptxv-table-grid-gutter");let I=e.createElement("span");if(I.textContent=A.text,P.appendChild(I),u&&A.canRemove){let L=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-table-grid-remove");L.type="button",L.textContent="\xD7",L.title=A.removeLabel,L.setAttribute("aria-label",A.removeLabel),L.addEventListener("click",A.onRemove),P.appendChild(L);}return P},S=A=>{let P=e.createElement("input");return P.type="text",P.className="pptxv-table-grid-input",P.value=A.text,P.disabled=!u,P.dataset.pptxRow=String(A.rowIndex),P.dataset.pptxCol=String(A.colIndex),P.setAttribute("aria-label",t("pptx.tableDataEditor.cellAriaLabel",{row:A.rowIndex+1,column:A.colIndex+1})),P.addEventListener("change",()=>{l&&m(chunkR2NUNRIB_cjs.Gb(l,A.rowIndex,A.colIndex,P.value));}),P.addEventListener("keydown",I=>I.stopPropagation()),P},E=(A,P)=>h({role:"columnheader",text:String(A+1),removeLabel:t("pptx.tableDataEditor.removeColumnN",{number:A+1}),canRemove:P,onRemove:()=>{l&&m(chunkR2NUNRIB_cjs.Ib(l,A));}}),T=(A,P)=>h({role:"rowheader",text:String(A+1),removeLabel:t("pptx.tableDataEditor.removeRowN",{number:A+1}),canRemove:P,onRemove:()=>{l&&m(chunkR2NUNRIB_cjs.Hb(l,A));}}),k=A=>{let P=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-row");P.setAttribute("role","row");let I=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-head pptxv-table-grid-gutter");I.setAttribute("role","columnheader"),P.appendChild(I);for(let L of A.colIndices)P.appendChild(E(L,A.canRemoveColumn));return P},y=A=>{p.textContent="",p.appendChild(k(A));for(let P of A.rows){let I=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-row");I.setAttribute("role","row"),I.appendChild(T(P.rowIndex,A.canRemoveRow));for(let L of P.cells){let D=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-cell");D.setAttribute("role","gridcell"),D.appendChild(S(L)),I.appendChild(D);}p.appendChild(I);}},w=()=>{let A=e.activeElement;if(!A||A.tagName!=="INPUT"||!p.contains(A))return null;let{pptxRow:P,pptxCol:I}=A.dataset;return P!==void 0&&I!==void 0?[P,I]:null},C=()=>{a.hidden=!u;for(let A of p.querySelectorAll("input"))A.disabled=!u;for(let A of p.querySelectorAll(".pptxv-table-grid-remove"))A.hidden=!u;};return {el:o,update(A){l=A.tableElement;let P=l?chunkR2NUNRIB_cjs.Fb(l):void 0,I=A.hasSelection&&A.isTable&&P!==void 0&&P.rowCount>0&&P.colCount>0;if(o.hidden=!I,!I||!P||!l){d=void 0,p.textContent="";return}if(a.hidden=!u,x.disabled=!u,f.disabled=!u,v.disabled=!u||!P.canRemoveRow,b.disabled=!u||!P.canRemoveColumn,l.tableData===d)return;let L=w();d=l.tableData,y(P),L&&p.querySelector(`input[data-pptx-row="${L[0]}"][data-pptx-col="${L[1]}"]`)?.focus();},setEditable(A){u=A,C(),d=void 0;}}}var Dw=["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"];function Rv(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=y=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],y);},a=(y,w,C)=>{let A=e.createElement("label");A.textContent=y;let P=e.createElement("select");P.setAttribute("aria-label",y);for(let I of w){let L=e.createElement("option");L.value=I,L.textContent=C?chunkR2NUNRIB_cjs.pa(C,I,t):I,P.appendChild(L);}return A.appendChild(P),o.appendChild(A),P},s=y=>{let w=e.createElement("label");w.textContent=y;let C=e.createElement("input");return C.type="color",w.appendChild(C),o.appendChild(w),C},p=a(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),l=a(t("pptx.table.gradientType"),["linear","radial"]),d=e.createElement("input");d.type="number",d.min="0",d.max="360",d.title=t("pptx.table.gradientAngle"),o.appendChild(d);let u=s(t("pptx.table.gradientStart")),m=s(t("pptx.table.gradientEnd")),g=a(t("pptx.table.patternPreset"),Dw,chunkR2NUNRIB_cjs.za),x=s(t("pptx.table.patternForeground")),v=s(t("pptx.table.patternBackground")),f=a(t("pptx.table.cellBorders"),["top","right","bottom","left"]),b=s(t("pptx.table.borderColor")),h=e.createElement("input");h.type="number",h.min="0",h.max="20",h.title=t("pptx.table.borderWidth"),o.appendChild(h);let S=()=>i({fillMode:"gradient",gradientFillType:l.value,gradientFillAngle:Number(d.value),gradientFillStops:[{color:u.value,position:0},{color:m.value,position:100}]});p.addEventListener("change",()=>i({fillMode:p.value}));for(let y of [l,d,u,m])y.addEventListener("change",S);let E=()=>i({fillMode:"pattern",patternFillPreset:g.value,patternFillForeground:x.value,patternFillBackground:v.value});for(let y of [g,x,v])y.addEventListener("change",E);let T=()=>{let y=`${f.value[0].toUpperCase()}${f.value.slice(1)}`;i({[`border${y}Color`]:b.value,[`border${y}Width`]:Number(h.value)});};for(let y of [f,b,h])y.addEventListener("change",T);let k=o.querySelectorAll("input,select");return {el:o,update(y){r=y,o.hidden=!y.selectedTableCell;let w=y.tableCellStyle??{};p.value=w.fillMode??"solid",l.value=w.gradientFillType??"linear",d.value=String(w.gradientFillAngle??90),u.value=w.gradientFillStops?.[0]?.color??"#ff0000",m.value=w.gradientFillStops?.at(-1)?.color??"#0000ff",g.value=w.patternFillPreset??"ltDnDiag",x.value=w.patternFillForeground??"#000000",v.value=w.patternFillBackground??"#ffffff";let C=`${f.value[0].toUpperCase()}${f.value.slice(1)}`;b.value=String(w[`border${C}Color`]??"#374151"),h.value=String(w[`border${C}Width`]??1);for(let A of k)A.disabled=!y.isTable;}}}var Mw={left:"pptx.textPanel.alignLeft",center:"pptx.textPanel.alignCenter",right:"pptx.textPanel.alignRight"},Hw={top:"pptx.textPanel.valignTop",middle:"pptx.textPanel.valignMiddle",bottom:"pptx.textPanel.valignBottom"};function Ei(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function Ov(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell";let r=e.createElement("strong");o.appendChild(r);let i=null,a=[],s=C=>{i&&n.setTableCellStyles(a.length>0?a:[i],C);},p=(C,A)=>{let P=e.createElement("label"),I=e.createElement("span");return I.textContent=C,A.setAttribute("aria-label",C),P.append(I,A),o.appendChild(P),P},l=(C,A)=>{let P=e.createElement("input");return P.type="number",P.addEventListener("change",()=>A(Number(P.value))),p(C,P),P},d=(C,A)=>{let P=e.createElement("input");return P.type="color",P.addEventListener("input",()=>s({[A]:P.value})),p(C,P),P},u=(C,A)=>{let P=e.createElement("input");return P.type="checkbox",P.addEventListener("change",()=>s({[A]:P.checked})),p(C,P),P},m=(C,A,P,I)=>{let L=e.createElement("select");for(let D of A){let R=e.createElement("option");R.value=D,R.textContent=chunkR2NUNRIB_cjs.pa(P,D,t),L.appendChild(R);}return L.addEventListener("change",()=>I(L.value)),p(C,L),L},g=l(t("pptx.table.fontSize"),C=>s({fontSize:C})),x=d(t("pptx.table.color"),"color"),v=d(t("pptx.table.background"),"backgroundColor"),f=d(t("pptx.table.cellBorders"),"borderColor"),b=l(t("pptx.table.borderWidth"),C=>s({borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C})),h=l(t("pptx.table.cellPadding"),C=>s({marginLeft:C,marginRight:C,marginTop:C,marginBottom:C})),S=u(t("pptx.format.bold"),"bold"),E=u(t("pptx.format.italic"),"italic"),T=u(t("pptx.format.underline"),"underline"),k=m(t("pptx.table.alignment"),["left","center","right"],Mw,C=>s({align:C})),y=m(t("pptx.table.verticalAlignment"),["top","middle","bottom"],Hw,C=>s({vAlign:C})),w=[g,x,v,f,b,h,S,E,T,k,y];return {el:o,update(C){if(i=C.selectedTableCell,a=C.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let A=C.tableCellStyle??{};g.value=String(A.fontSize??14),x.value=Ei(A.color,"#000000"),v.value=Ei(A.backgroundColor,"#ffffff"),f.value=Ei(A.borderColor,"#374151"),b.value=String(A.borderTopWidth??1),h.value=String(A.marginLeft??4),S.checked=!!A.bold,E.checked=!!A.italic,T.checked=!!A.underline,k.value=A.align??"left",y.value=A.vAlign??"top";for(let P of w)P.disabled=!C.isTable;}}}function Fv(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(u,m)=>{let g=e.createElement("button");return g.type="button",g.textContent=u,g.addEventListener("click",()=>r&&m(r)),o.appendChild(g),g},a=u=>u.selectedTableCell,s=u=>m=>{let g=a(m);g&&n.mutateTableStructure(g,u);},p=[i(t("pptx.table.insertAbove"),s("insertRowAbove")),i(t("pptx.table.insertBelow"),s("insertRowBelow")),i(t("pptx.table.deleteRow"),s("deleteRow")),i(t("pptx.table.insertLeft"),s("insertColumnLeft")),i(t("pptx.table.insertRight"),s("insertColumnRight")),i(t("pptx.table.deleteColumn"),s("deleteColumn")),i(t("pptx.table.mergeSelected"),u=>n.mergeTableCells(u.selectedTableCells)),i(t("pptx.table.split"),u=>{let m=a(u);m&&n.splitTableCell(m);})],l=e.createElement("input");l.type="number",l.min="5",l.max="95",l.title=t("pptx.table.columnWidths"),l.addEventListener("change",()=>{let u=r&&a(r);u&&n.setTableColumnWidth(u.column,Number(l.value));});let d=e.createElement("input");return d.type="number",d.min="1",d.title=t("pptx.table.rowHeights"),d.addEventListener("change",()=>{let u=r&&a(r);u&&n.setTableRowHeight(u.row,Number(d.value));}),o.append(l,d),{el:o,update(u){r=u;let m=a(u);o.hidden=!m,l.value=m?String(Math.round((u.tableColumnWidths[m.column]??0)*100)):"",d.value=m?String(u.tableRowHeights[m.row]??32):"";for(let g of p)g.disabled=!m;p[6].disabled=u.selectedTableCells.length<2,l.disabled=!m,d.disabled=!m;}}}function Bv(e,t,n,o){let r=n(t("pptx.inspector.table")),i=Y(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=Y(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),s=Y(e,{label:t("pptx.table.bandedColumns"),onChange:C=>o.setTableOptions({bandedColumns:C})}),p=Y(e,{label:t("pptx.table.totalRow"),onChange:C=>o.setTableOptions({lastRow:C})}),l=Y(e,{label:t("pptx.table.firstColumn"),onChange:C=>o.setTableOptions({firstCol:C})}),d=Y(e,{label:t("pptx.table.lastColumn"),onChange:C=>o.setTableOptions({lastCol:C})}),u=Y(e,{label:t("pptx.textAdvanced.rtl"),onChange:C=>o.setTableOptions({rtl:C})});r.append(i.el,a.el,s.el,p.el,l.el,d.el,u.el);let m,g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-table-presets-label");g.textContent=t("pptx.table.stylePresets");let x=C=>{m&&o.setTableOptions({rows:chunkR2NUNRIB_cjs.Pb(m,C)});},v=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-presets-grid");v.append(...chunkR2NUNRIB_cjs.Ob.map(C=>{let A=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-table-preset-swatch");A.type="button",A.title=C.label,A.setAttribute("aria-label",C.label);let P=chunkR2NUNRIB_cjs.Ok(e,"span");P.style.background=C.headerBg;let I=chunkR2NUNRIB_cjs.Ok(e,"span");I.style.background=C.bandBg;let L=chunkR2NUNRIB_cjs.Ok(e,"span");return L.style.borderTopColor=C.borderColor,A.append(P,I,L),A.addEventListener("click",()=>x(C)),A})),r.append(g,v);let f=j(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});r.appendChild(f.el);let b=e.createElement("input");b.placeholder=t("pptx.table.styleId"),b.addEventListener("change",()=>o.setTableOptions({tableStyleId:b.value}));let h=e.createElement("input");h.type="color",h.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:h.value}));let S=e.createElement("input");S.type="color",S.addEventListener("input",()=>o.setTableOptions({},{borderColor:S.value})),r.append(b,h,S);let E=Ov(e,t,o),T=Rv(e,t,o),k=Fv(e,t,o);r.append(E.el,T.el,k.el);let y=[i,a,s,p,l,d,u],w=[f];return {el:r,update(C){r.hidden=!C.hasSelection||!C.isTable,m=C.tableElement?.tableData;for(let A of v.children)A.disabled=!C.isTable;i.setValue(C.tableHeaderRow),a.setValue(C.tableBandedRows),s.setValue(C.tableBandedColumns),p.setValue(C.tableLastRow),l.setValue(C.tableFirstCol),d.setValue(C.tableLastCol),u.setValue(C.tableRtl),f.setValue(C.tableCellPadding),b.value=C.tableStyleId,h.value=C.tableCellBackground,S.value=C.tableCellBorder,E.update(C),T.update(C),k.update(C);for(let A of y)A.setDisabled(!C.isTable);b.disabled=!C.isTable,h.disabled=!C.isTable,S.disabled=!C.isTable;for(let A of w)A.setDisabled(!C.isTable);}}}var Vv=12700;function Ti(e){return e?Math.round(e/Vv):0}function Sn(e){return Math.round(e*Vv)}function Pi(e,t,n){return Math.max(t,Math.min(n,e))}function Nv(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-text3d-bevel"),a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-text3d-bevel-label");a.textContent=n;let s=ce(e,{label:`${n} ${t("pptx.text3d.bevelType")}`,options:chunkR2NUNRIB_cjs.pi.map(({value:d,label:u})=>({value:d,label:u})),onChange:d=>o({[r.type]:d})}),p=j(e,{label:`${n} ${t("pptx.text3d.bevelWidth")}`,min:0,max:50,onCommit:d=>o({[r.width]:Sn(Pi(d,0,50))})}),l=j(e,{label:`${n} ${t("pptx.text3d.bevelHeight")}`,min:0,max:50,onCommit:d=>o({[r.height]:Sn(Pi(d,0,50))})});return i.append(a,s.el,p.el,l.el),{el:i,update(d,u){s.setValue(d?.[r.type]??"none"),p.setValue(Ti(d?.[r.width])),l.setValue(Ti(d?.[r.height])),s.setDisabled(u),p.setDisabled(u),l.setDisabled(u);}}}function zv(e,t,n,o){let r=n(t("pptx.text3d.title")),i,a=f=>{i={...i,...f},o.setTextStyle({text3d:i});},s=Y(e,{label:t("pptx.text3d.extrusion"),onChange:f=>{f?a({extrusionHeight:Sn(6)}):(i=void 0,o.setTextStyle({text3d:void 0}));}}),p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-text3d-options"),l=j(e,{label:t("pptx.text3d.extrusionDepth"),min:0,max:100,onCommit:f=>a({extrusionHeight:Sn(Pi(f,0,100))})}),d=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-text3d-color"),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");u.textContent=t("pptx.text3d.extrusionColor");let m=e.createElement("input");m.type="color",m.setAttribute("aria-label",t("pptx.text3d.extrusionColor")),m.addEventListener("change",()=>a({extrusionColor:m.value})),d.append(u,m);let g=Nv(e,t,t("pptx.text3d.bevelTop"),a,{type:"bevelTopType",width:"bevelTopWidth",height:"bevelTopHeight"}),x=Nv(e,t,t("pptx.text3d.bevelBottom"),a,{type:"bevelBottomType",width:"bevelBottomWidth",height:"bevelBottomHeight"}),v=ce(e,{label:t("pptx.text3d.material"),options:chunkR2NUNRIB_cjs.qi.map(({value:f,label:b})=>({value:f||"",label:b})),onChange:f=>a({presetMaterial:f||void 0})});return p.append(l.el,d,g.el,x.el,v.el),r.append(s.el,p),{el:r,update(f){r.hidden=!f.canText,i=f.textStyle?.text3d;let b=!!(i?.extrusionHeight&&i.extrusionHeight>0);s.setValue(b),s.setDisabled(!f.canText),p.hidden=!b,l.setValue(Ti(i?.extrusionHeight)),l.setDisabled(!b),m.value=/^#[0-9a-fA-F]{6}$/u.test(i?.extrusionColor??"")?i?.extrusionColor:"#888888",m.disabled=!b,g.update(i,!b),x.update(i,!b),v.setValue(i?.presetMaterial??""),v.setDisabled(!b);}}}function _v(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=A=>n.setTextStyle(A,r?.selectedTextRange),a=A=>n.setTextStyle(A),s=(A,P)=>{let I=e.createElement("label");I.textContent=A,P.setAttribute("aria-label",A),I.appendChild(P),o.appendChild(I);},p=(A,P,I=0,L=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(I),D.addEventListener("change",()=>(L?a:i)({[P]:Number(D.value)})),s(A,D),D},l=(A,P)=>{let I=e.createElement("input");return I.type="color",I.addEventListener("input",()=>i({[P]:I.value})),s(A,I),I},d=(A,P)=>{let I=e.createElement("input");return I.type="checkbox",I.addEventListener("change",()=>i({[P]:I.checked})),s(A,I),I},u=p(t("pptx.textFormatting.columns"),"columnCount",1,true);u.max="6";let m=p(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),g=l(t("pptx.textEffects.outline"),"textOutlineColor"),x=p(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),v=d(t("pptx.textEffects.shadow"),"textShadowOpacity"),f=l(t("pptx.textEffects.shadowColor"),"textShadowColor"),b=p(t("pptx.textEffects.blur"),"textShadowBlur"),h=l(t("pptx.textEffects.glowColor"),"textGlowColor"),S=p(t("pptx.textEffects.glow"),"textGlowRadius"),E=d(t("pptx.textEffects.reflection"),"textReflection"),T=d(t("pptx.textFormatting.strikethrough"),"strikethrough"),k=l(t("pptx.text.highlightColor"),"highlightColor"),y=e.createElement("select");for(let A of chunkR2NUNRIB_cjs.ni){let P=e.createElement("option");P.value=A.value,P.textContent=A.label,y.appendChild(P);}y.addEventListener("change",()=>a({textWarpPreset:y.value==="textNoShape"?void 0:y.value})),s(t("pptx.textEffects.transform"),y);let w=p(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),C=Array.from(o.querySelectorAll("input,select"));return {el:o,update(A){r=A,o.hidden=!A.canText;let P=A.textStyle??{};u.value=String(P.columnCount??1),m.value=String(P.columnSpacing??0),g.value=P.textOutlineColor??"#000000",x.value=String(P.textOutlineWidth??0),v.checked=!!P.textShadowOpacity,f.value=P.textShadowColor??"#000000",b.value=String(P.textShadowBlur??4),h.value=P.textGlowColor??"#ffff00",S.value=String(P.textGlowRadius??0),E.checked=!!P.textReflection,T.checked=!!P.strikethrough,k.value=P.highlightColor??"#ffff00",y.value=P.textWarpPreset??"textNoShape",w.value=String(P.textWarpAdj??5e4);for(let I of C)I.disabled=!A.canText;}}}function Gv(e,t,n,o){let r=n(t("pptx.inspector.text")),i=ce(e,{label:t("pptx.textPanel.verticalAlign"),options:[{value:"top",label:t("pptx.textPanel.valignTop")},{value:"middle",label:t("pptx.textPanel.valignMiddle")},{value:"bottom",label:t("pptx.textPanel.valignBottom")}],onChange:o.setTextVerticalAlign});r.appendChild(i.el);let a=Y(e,{label:t("pptx.textAdvanced.wrapText"),onChange:T=>o.setTextWrap(T?"square":"none")});r.appendChild(a.el);let s=ce(e,{label:t("pptx.textAdvanced.autoFit"),options:[{value:"none",label:t("pptx.textAdvanced.autoFitNone")},{value:"normal",label:t("pptx.textAdvanced.autoFitShrink")},{value:"shrink",label:t("pptx.textAdvanced.autoFitResize")}],onChange:o.setAutoFitMode});r.appendChild(s.el);let p=(T,k,y)=>j(e,{label:T,min:y,onCommit:w=>o.setTextAdvanced({[k]:w})}),l=p(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),d=p(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),u=p(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),m=p(t("pptx.textAdvanced.spaceBefore"),"paragraphSpacingBefore",0),g=p(t("pptx.textAdvanced.spaceAfter"),"paragraphSpacingAfter",0),x=p(t("pptx.textAdvanced.indent"),"paragraphIndent"),v=p(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),f=ce(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(T=>({value:T,label:t(`pptx.textAdvanced.direction.${T}`)})),onChange:T=>o.setTextAdvanced({textDirection:T})}),b=Y(e,{label:t("pptx.textAdvanced.rtl"),onChange:T=>o.setTextAdvanced({rtl:T})}),h=[l,d,u,m,g,x,v];r.append(...h.map(({el:T})=>T),f.el,b.el);let S=_v(e,t,o);r.appendChild(S.el);let E=[i,a,s,...h,f,b];return {el:r,update(T){r.hidden=!T.hasSelection||!T.canText,i.setValue(T.vAlign),a.setValue(T.textWrap==="square"),s.setValue(T.autoFitMode),l.setValue(T.characterSpacing),d.setValue(T.lineSpacing),u.setValue(T.lineSpacingExactPt??0),m.setValue(T.paragraphSpacingBefore),g.setValue(T.paragraphSpacingAfter),x.setValue(T.paragraphIndent),v.setValue(T.paragraphMarginLeft),f.setValue(T.textDirection),b.setValue(T.textRtl),S.update(T);for(let k of E)k.setDisabled(!T.canText);}}}function wn(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,a=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let D of a){let R=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-inspector-tab");R.type="button",R.setAttribute("role","tab"),R.textContent=D.label,R.addEventListener("click",()=>m(D.id)),r.appendChild(R),i.set(D.id,R);}let s=fv(e,t,D=>n.selectElement(D));s.el.classList.add("pptxv-inspector-body"),o.appendChild(s.el);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-body");o.appendChild(p);let l=nv(e,t,n);l.el.classList.add("pptxv-inspector-body"),o.appendChild(l.el);let d=jb(e,t,n);o.appendChild(d.el);let u="properties",m=D=>{u=D;for(let[R,F]of i)F.classList.toggle("is-active",R===D),F.setAttribute("aria-selected",String(R===D));s.el.hidden=D!=="elements",p.hidden=D!=="properties",l.el.hidden=D!=="comments";},g=vv(e,t,n);p.appendChild(g.el);let x=D=>{let R=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-section"),F=chunkR2NUNRIB_cjs.Ok(e,"h4","pptxv-inspector-section-title");return F.textContent=D,R.appendChild(F),p.appendChild(R),R},v=Lv(e,t,x,n.setGeometry,n.toggleElementLock),f=Cv(e,t,x),b=Iv(e,t,x),h=wv(e,t,x,n),S=Dv(e,t,x,n),E=Gv(e,t,x,n),T=zv(e,t,x,n),k=Ev(e,t,x,n),y=Hv(e,t,n);p.appendChild(y.el);let w=Bv(e,t,x,n),C=Mv(e,t,x,n),A=Fb(e,t,x,n),P=ev(e,t,x,n),I=kv(e,t,x,n),L=[v,f,b,h,S,E,T,k,y,w,C,A,P,I];return m(u),{el:o,update(D){g.setVisible(!D.hasSelection);for(let R of L)R.update(D);},updateDeck(D){A.setSlideCount(D.slideCount),s.update(D),l.update(D),g.update(D),d.update({editable:D.editable,selectedElementId:D.selectedElementId,elements:D.elements,animations:D.activeSlide?.animations??[]});},setEditable(D){o.hidden=!D,y.setEditable(D);}}}var Uv=128,Rw=[1,2,3,4,6,9],Ow={body:"pptx.master.notesMasterBody",sldImg:"pptx.master.notesMasterSlideImage",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function Ai(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-master-card"),a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-card-label");a.textContent=t("pptx.master.notesMasterBackground");let s=chunkR2NUNRIB_cjs.Ok(e,"input","pptxv-master-background");s.type="color",s.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",s.setAttribute("aria-label",t("pptx.master.backgroundColorLabel")),s.addEventListener("input",()=>r(s.value)),i.append(a,s),n.appendChild(i);}function $v(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-master-card"),a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-card-label");if(a.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(a),o.length===0){let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-empty");s.textContent=t("pptx.master.noPlaceholders"),i.appendChild(s);}for(let s of o){let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-placeholder"),l=chunkR2NUNRIB_cjs.Ok(e,"span",`pptxv-master-dot is-${r}`);p.append(l,e.createTextNode(t(Ow[s.type]??s.type))),i.appendChild(p);}n.appendChild(i);}function Fw(e,t){return chunkR2NUNRIB_cjs.dj({slideMasters:[e]},{tab:"slides",masterIndex:0,layoutIndex:t})??{id:e.path,rId:"",slideNumber:0,elements:[]}}function Bw(e,t,n,o){o.editable&&Ai(e,t,n,chunkR2NUNRIB_cjs.gj({slideMasters:o.masters},{tab:"slides",masterIndex:o.active.masterIndex,layoutIndex:o.active.layoutIndex})??"#ffffff",o.onMasterBackgroundColorChange);let r=Uv/Math.max(o.canvasSize.width,1);for(let[i,a]of o.masters.entries()){let s=[{layoutIndex:null,label:a.name||t("pptx.master.master")},...a.layouts?.map((p,l)=>({layoutIndex:l,label:p.name||t("pptx.master.layout")}))??[]];for(let p of s){let l=chunkR2NUNRIB_cjs.Ok(e,"button",`pptxv-master-thumb${p.layoutIndex===null?"":" is-layout"}`);l.type="button",l.setAttribute("aria-label",p.label);let d=o.active.masterIndex===i&&o.active.layoutIndex===p.layoutIndex;l.classList.toggle("is-active",d),d&&l.setAttribute("aria-current","page");let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-master-thumb-name");u.textContent=p.label;let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-master-thumb-frame");m.style.width=`${Uv}px`,m.style.height=`${Math.round(o.canvasSize.height*r)}px`,m.appendChild(o.renderStage(Fw(a,p.layoutIndex),r)),l.append(u,m),l.addEventListener("click",()=>o.onSelect(i,p.layoutIndex)),n.appendChild(l);}}}function ki(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-master-sidebar");return n.hidden=true,n.setAttribute("aria-label",t("pptx.view.masterViews")),{el:n,render(o){n.replaceChildren();let r=chunkR2NUNRIB_cjs.Ok(e,"header","pptxv-master-header"),i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let a=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-master-collapse");a.type="button",a.textContent="\u2039",a.title=t("pptx.masterView.collapse"),a.setAttribute("aria-label",t("pptx.masterView.collapse")),a.addEventListener("click",o.onCollapse),r.append(i,a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-tabs");s.setAttribute("role","tablist");for(let[l,d]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let u=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-master-tab");u.type="button",u.role="tab",u.textContent=t(d),u.setAttribute("aria-selected",String(o.tab===l)),u.classList.toggle("is-active",o.tab===l),u.addEventListener("click",()=>o.onTabChange(l)),s.appendChild(u);}let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-body");if(p.setAttribute("role","tabpanel"),o.tab==="slides")Bw(e,t,p,o);else if(o.tab==="notes")o.notesMasterPresent?(Ai(e,t,p,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),$v(e,t,p,o.notesPlaceholders??[],"notes")):(p.textContent=t("pptx.master.noNotesMaster"),p.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)p.textContent=t("pptx.master.noHandoutMaster"),p.classList.add("pptxv-master-empty");else {let l=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-master-card"),d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-card-label");d.textContent=t("pptx.master.handoutSlidesPerPage");let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-counts");for(let m of Rw){let g=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-master-count");g.type="button",g.textContent=String(m),g.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===m)),g.classList.toggle("is-active",o.handoutSlidesPerPage===m),g.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(m)),u.appendChild(g);}l.append(d,u),p.appendChild(l),Ai(e,t,p,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),$v(e,t,p,o.handoutPlaceholders??[],"handout");}n.append(r,s,p);},setVisible(o){n.hidden=!o;}}}var Wv=148;function Ii(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-actions"),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-sheet-host");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let p=e.createElement("button");p.type="button",p.className="pptxv-mobile-sheet-backdrop",p.setAttribute("aria-label",t("pptx.settings.close"));let l=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-mobile-sheet"),d=chunkR2NUNRIB_cjs.Ok(e,"header","pptxv-mobile-sheet-header"),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-sheet-handle"),m=e.createElement("strong");d.append(u,m);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-sheet-body");l.append(d,g),s.append(p,l),s.hidden=true,a.appendChild(s);let x=null,v=0,f=[],b=[],h=true,S=false,E=null,T=960,k=540,y=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(y,r);let w=()=>{r&&y?.parentNode&&y.parentNode.insertBefore(r,y.nextSibling);},C=()=>{x=null,s.hidden=true,l.style.transform="",w();for(let M of L.querySelectorAll("button"))M.setAttribute("aria-pressed","false");};p.addEventListener("click",C);let A=chunkR2NUNRIB_cjs.bi((M,O)=>{l.style.transform=M>0?`translateY(${M}px)`:"",l.style.transition=O?"none":"";},C),P=M=>({clientY:M.clientY,pointerId:M.pointerId,currentTarget:d});d.addEventListener("pointerdown",M=>A.pointerDown(P(M))),d.addEventListener("pointermove",M=>A.pointerMove(P(M))),d.addEventListener("pointerup",M=>A.pointerUp(P(M))),d.addEventListener("pointercancel",M=>A.cancel(P(M)));let I=M=>{if(g.replaceChildren(),m.textContent=t(M==="inspector"?"pptx.field.format":`pptx.${M==="slides"?"sections.slides":M==="comments"?"toolbar.comments":M==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),s.setAttribute("aria-label",m.textContent),M==="slides"){let O=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-slide-list"),B=Wv/Math.max(T,1);for(let V=0;V<f.length;V+=1){let z=e.createElement("button");z.type="button";let N=chunkR2NUNRIB_cjs.zk(f[V],V);z.setAttribute("aria-label",N),z.classList.toggle("is-active",V===v),V===v&&z.setAttribute("aria-current","true");let _=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-slide-num");if(_.textContent=String(V+1),z.appendChild(_),E){let K=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-slide-frame",{width:`${Wv}px`,height:`${Math.round(k*B)}px`});K.appendChild(E(f[V],B)),z.appendChild(K);}else {let K=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-slide-title");K.textContent=N,z.appendChild(K);}z.addEventListener("click",()=>{o(V),C();}),O.appendChild(z);}g.appendChild(O);}else if(M==="insert"){let O=[[t("pptx.insert.addTextBox"),()=>n.insert.insert("text")],[t("pptx.ribbon.rectangle"),()=>n.insert.insert("shape","rect")],[t("pptx.insert.insertTable"),()=>n.insert.insert("table")]];for(let[B,V]of O){let z=e.createElement("button");z.type="button",z.textContent=B,z.addEventListener("click",V),g.appendChild(z);}}else if(M==="inspector"&&r)g.appendChild(r);else if(M==="comments"){b.length===0&&(g.textContent=t("pptx.comments.noneOnSlide"));for(let z of b){let N=chunkR2NUNRIB_cjs.Ok(e,"article","pptxv-mobile-comment"),_=e.createElement("textarea");_.value=z.text,_.setAttribute("aria-label",t("pptx.comments.edit"));let K=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-comment-actions"),$=e.createElement("button");$.type="button",$.textContent=t("pptx.comments.save"),$.addEventListener("click",()=>n.edit.comments.editComment(z.id,_.value));let he=e.createElement("button");he.type="button",he.textContent=z.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),he.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(z.id));let be=e.createElement("button");be.type="button",be.textContent=t("pptx.comments.delete"),be.addEventListener("click",()=>n.edit.comments.deleteComment(z.id)),K.append($,he,be),N.append(_,K),g.appendChild(N);}let O=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-comment-add"),B=e.createElement("textarea");B.placeholder=t("pptx.comments.addPlaceholder"),B.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let V=e.createElement("button");V.type="button",V.textContent=t("pptx.comments.addComment"),V.addEventListener("click",()=>{n.edit.comments.addComment(B.value)&&(B.value="");}),O.append(B,V),g.appendChild(O);}else {let O=[[t("pptx.ribbon.insert"),()=>n.insert.insert("text"),null],[t("pptx.presenter.previousSlide"),n.nav.prev,"navigation"],[t("pptx.presenter.nextSlide"),n.nav.next,"navigation"],[t("pptx.statusBar.zoomOut"),n.nav.zoomOut,"zoom"],[t("pptx.statusBar.zoomIn"),n.nav.zoomIn,"zoom"],[t("pptx.notes.title"),n.nav.toggleNotes,"notes"],[t("pptx.statusBar.slideShow"),n.nav.togglePresentation,"fullscreen"]];for(let[B,V,z]of O){if(z&&chunkR2NUNRIB_cjs.Qj(z,i))continue;let N=e.createElement("button");N.type="button",N.textContent=B,N.addEventListener("click",V),g.appendChild(N);}}},L=e.createElement("nav");L.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let D=M=>{if(x=chunkR2NUNRIB_cjs.Ch(x,M),!x){C();return}I(x),s.hidden=false;for(let O of L.querySelectorAll("button"))O.setAttribute("aria-pressed",String(O.dataset.mobileAction===x));},R={slides:"layers",insert:"plus",inspector:"sliders",comments:"comment",notes:"sticky-note"};for(let M of chunkR2NUNRIB_cjs.Dh({slideCount:0})){let O=M.key;if(O==="notes"&&chunkR2NUNRIB_cjs.Qj("notes",i))continue;let B=e.createElement("button");B.type="button",B.dataset.mobileAction=O,O==="notes"&&B.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),B.appendChild(chunkR2NUNRIB_cjs.Zk(e,R[O]));let V=chunkR2NUNRIB_cjs.Ok(e,"span");V.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"notes.title"}`),B.appendChild(V),B.addEventListener("click",()=>{if(O==="notes"){n.nav.toggleNotes();return}if(O==="insert"){n.insert.insert("text");return}D(O);}),L.appendChild(B);}a.appendChild(L);let F=()=>{let M=chunkR2NUNRIB_cjs.Dh({slideCount:f.length});for(let O of M){let B=L.querySelector(`button[data-mobile-action='${O.key}']`);if(!B)continue;let V=O.key==="insert"||O.key==="inspector"||O.key==="comments";B.disabled=O.disabled||V&&!h||O.key==="inspector"&&!r,B.setAttribute("aria-pressed",String(O.key==="notes"?S:O.key===x));}};return {el:a,update(M,O,B){v=M,f=O,b=B,x&&I(x),F();},setThumbnailRenderer(M,O,B){E=M,T=O,k=B,x==="slides"&&I(x);},toggle:D,close:C,setEditable(M){h=M,!h&&x&&["insert","inspector","comments"].includes(x)&&C(),F();},setNotesExpanded(M){S=M,F();}}}function Li(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=H(e,{label:t("pptx.mobileToolbar.menu"),icon:"menu",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),a=chunkR2NUNRIB_cjs.Qj("undo",o)?null:H(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),s=chunkR2NUNRIB_cjs.Qj("redo",o)?null:H(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-toolbar-spacer"),l=H(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),d=chunkR2NUNRIB_cjs.Qj("fullscreen",o)?null:H(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-toolbar-ai"),m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...a?[a.btn]:[],...s?[s.btn]:[],p,u,l.btn,...d?[d.btn]:[],m),{el:r,collaborationHost:m,aiHost:u,setEditState({editable:g,canUndo:x,canRedo:v}){for(let f of [i.btn,a?.btn,s?.btn])f&&(f.hidden=!g);m.hidden=!g,u.hidden=!g,a?.setDisabled(!x),s?.setDisabled(!v);}}}function Di(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes"),i=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-notes-header");i.type="button",i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","slide-notes-content"),i.addEventListener("click",n),r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-notes-title");a.textContent=t("pptx.notes.title"),i.appendChild(a);let s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-notes-chevron");s.setAttribute("aria-hidden","true"),i.appendChild(s);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes-body");p.id="slide-notes-content",r.appendChild(p);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes-toolbar");p.appendChild(l);let d=e.createElement("button");d.type="button",d.className="pptxv-notes-mode",l.appendChild(d);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes-rich-editor");u.contentEditable="true",u.setAttribute("role","textbox"),u.setAttribute("aria-multiline","true"),u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(u);let m=e.createElement("textarea");m.className="pptxv-notes-textarea",m.name="slide-notes",m.spellcheck=true,m.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(m);let g=false,x=null,v=false,f=chunkR2NUNRIB_cjs.Qc(),b=[],h,S,E=C=>{f=C,u.hidden=!f,m.hidden=f,l.hidden=!v,d.textContent=t(f?"pptx.notes.plainEditor":"pptx.notes.richEditor"),d.setAttribute("aria-pressed",String(f));},T=()=>{if(!v)return;let C=chunkR2NUNRIB_cjs.Rc(u);b=C.segments,o(C.text,C.segments);},k=(C,A,P)=>{let I=e.createElement("button");I.type="button",I.className="pptxv-notes-tool",I.textContent=C,I.title=A,I.setAttribute("aria-label",A),I.addEventListener("mousedown",L=>L.preventDefault()),I.addEventListener("click",()=>{u.focus(),P(),T();}),l.insertBefore(I,d);};k("B",t("pptx.notes.bold"),()=>chunkR2NUNRIB_cjs.Tc("bold")),k("I",t("pptx.notes.italic"),()=>chunkR2NUNRIB_cjs.Tc("italic")),k("U",t("pptx.notes.underline"),()=>chunkR2NUNRIB_cjs.Tc("underline")),k("S",t("pptx.notes.strikethrough"),()=>chunkR2NUNRIB_cjs.Tc("strikeThrough")),k("\u2022",t("pptx.notes.bulletList"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"bullet").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("1.",t("pptx.notes.numberedList"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"numbered").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("\u2192",t("pptx.notes.indent"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"indent").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("\u2190",t("pptx.notes.outdent"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"outdent").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("\u2197",t("pptx.notes.insertLink"),()=>{let C=e.getSelection()?.toString()??"",A=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!A)return;let P=window.prompt(t("pptx.notes.linkDisplayText"),C)??C;chunkR2NUNRIB_cjs.Vc(chunkR2NUNRIB_cjs.Uc(A),P);}),k("\u{1F5A8}",t("pptx.notes.printNotes"),()=>{if(!h)return;let C=chunkR2NUNRIB_cjs.Wc([h],I=>t("pptx.notes.slideN",{n:I}),S),A=e.createElement("iframe");A.setAttribute("aria-hidden","true"),A.setAttribute("sandbox","allow-same-origin"),A.style.cssText="position:fixed;right:0;bottom:0;width:0;height:0;border:0",e.body.appendChild(A);let P=A.contentWindow?.document;if(!P){A.remove();return}P.open(),P.write(C),P.close(),setTimeout(()=>{A.contentWindow?.focus(),A.contentWindow?.print(),setTimeout(()=>A.remove(),1e3);},200);}),d.addEventListener("click",()=>{f?(T(),m.value=chunkR2NUNRIB_cjs.Mc(b)):(b=chunkR2NUNRIB_cjs.Lc(m.value),u.innerHTML=chunkR2NUNRIB_cjs.Nc(b)),E(!f);});let y=()=>{v&&o(m.value);};m.addEventListener("change",y),m.addEventListener("blur",y),u.addEventListener("blur",T);let w=()=>{r.dataset.collapsed=g?"false":"true",i.setAttribute("aria-expanded",String(g)),p.hidden=!g,s.textContent=g?"\u25BE":"\u25B8";};return w(),E(f),{el:r,update({slide:C,editable:A,notesStyle:P}){v=A,h=C,S=P;let I=C!==void 0;m.disabled=!I,m.readOnly=!v,u.contentEditable=String(v&&I),l.hidden=!v,m.placeholder=t(I?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let L=C?.id??null;L!==x&&(x=L,b=chunkR2NUNRIB_cjs.Pc(C,P),m.value=chunkR2NUNRIB_cjs.Mc(b),u.innerHTML=chunkR2NUNRIB_cjs.Nc(b));},setExpanded(C){g=C,w();}}}function Kv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-palette");o.hidden=true;let r=n.colors.map(i=>{let a=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-present-swatch");a.type="button",a.dataset.pptxPresentSwatch=i,a.style.backgroundColor=i;let s=t(n.swatchLabelKey,{color:i});return a.title=s,a.setAttribute("aria-label",s),a.addEventListener("click",p=>{p.stopPropagation(),n.onPick(i);}),o.appendChild(a),{color:i,swatch:a}});return {el:o,setOpen(i){o.hidden=!i;},isOpen:()=>!o.hidden,setValue(i){for(let a of r){let s=a.color===i;a.swatch.classList.toggle("is-selected",s),a.swatch.setAttribute("aria-pressed",String(s));}}}}function Me(e,t,n){let o=H(e,{label:t(n.labelKey),icon:n.icon,className:`pptxv-present-btn${n.className?` ${n.className}`:""}`,onClick:n.onClick});return o.btn.dataset.pptxPresentControl=n.id,o}function Nw(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-group"),r=Me(e,t,{id:n.id,labelKey:n.labelKey,icon:n.icon,onClick:n.onSelect}),i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-present-swatch-bar");r.btn.appendChild(i);let a=Me(e,t,{id:`${n.id}-color`,labelKey:n.caretLabelKey,icon:"chevron-down",className:"pptxv-present-caret",onClick:n.onCaret}),s=Kv(e,t,{colors:n.colors,swatchLabelKey:n.swatchLabelKey,onPick:n.onPick});return o.append(r.btn,a.btn,s.el),{el:o,toggle:r,palette:s,bar:i}}function qv(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-toolbar-wrap");for(let[w,C]of Object.entries(chunkR2NUNRIB_cjs.gg()))r.style.setProperty(w,C);let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-toolbar");i.setAttribute("data-pptx-present-toolbar",""),i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria")),r.appendChild(i);let a=w=>{let C=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-divider");return C.dataset.pptxPresentControl=w,C},s=Me(e,t,{id:"previous",labelKey:"pptx.presenter.previousSlide",icon:"chevron-left",onClick:n.previous}),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-present-counter");p.dataset.pptxPresentControl="counter";let l=Me(e,t,{id:"next",labelKey:"pptx.presenter.nextSlide",icon:"chevron-right",onClick:n.next}),d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-timer");d.dataset.pptxPresentControl="timer",d.title=t("pptx.presenter.elapsed"),d.setAttribute("aria-label",t("pptx.presenter.elapsed"));let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-present-elapsed");d.append(chunkR2NUNRIB_cjs.Zk(e,"timer"),u);let m=Me(e,t,{id:"laser",labelKey:"pptx.presentation.laserPointer",icon:"cursor",onClick:()=>n.setTool("laser")}),g=null,x=()=>{b.palette.setOpen(g==="pen"),h.palette.setOpen(g==="highlighter");},v=()=>{g=null,x();},f=w=>Nw(e,t,{...w,onSelect:()=>{v(),n.setTool(w.id);},onPick:C=>{v(),n.setColor(C),n.setTool(w.id),o(w.id,C);},onCaret:()=>{g=g===w.id?null:w.id,x();}}),b=f({id:"pen",labelKey:"pptx.presentation.pen",icon:"pen",caretLabelKey:"pptx.presentationToolbar.penColor",colors:chunkR2NUNRIB_cjs.cg,swatchLabelKey:"pptx.presentationToolbar.penColorValue"}),h=f({id:"highlighter",labelKey:"pptx.presentation.highlighter",icon:"highlighter",caretLabelKey:"pptx.presentationToolbar.highlighterColor",colors:chunkR2NUNRIB_cjs.dg,swatchLabelKey:"pptx.presentationToolbar.highlighterColorValue"}),S=Me(e,t,{id:"eraser",labelKey:"pptx.presentation.eraser",icon:"eraser",onClick:()=>{v(),n.setTool("eraser");}}),E=Me(e,t,{id:"blackboard",labelKey:"pptx.presentation.blackboard",icon:"presentation",onClick:()=>{v(),n.toggleBlackboard();}}),T=Me(e,t,{id:"clear",labelKey:"pptx.presentation.clearAnnotations",icon:"trash",className:"pptxv-present-danger",onClick:n.clearAnnotations}),k=Me(e,t,{id:"presenter-view",labelKey:"pptx.presenter.presenterView",icon:"panel-right",onClick:n.togglePresenterView}),y=Me(e,t,{id:"end",labelKey:"pptx.presenter.endPresentation",icon:"close",className:"pptxv-present-danger",onClick:n.end});i.append(s.btn,p,l.btn,a("divider-navigation"),d,a("divider-timer"),m.btn,b.el,h.el,S.btn,E.btn,T.btn,a("divider-tools"),k.btn,y.btn);for(let w of ["pointerdown","click"])i.addEventListener(w,C=>C.stopPropagation());return {wrap:r,bar:i,previous:s,counter:p,next:l,elapsedText:u,laser:m,pen:b,highlighter:h,eraser:S,blackboard:E,clear:T,presenterView:k,end:y,closePalettes:v}}function Mi(e,t,n,o){let r={current:0,total:0,tool:"none",blackout:"none",hasAnnotations:false,presenterViewActive:false},i=chunkR2NUNRIB_cjs.cg[0]??"#ff0000",a=chunkR2NUNRIB_cjs.dg[0]??"#ffff00",s=qv(e,t,o,(y,w)=>{y==="pen"?i=w:a=w,d();}),{wrap:p,bar:l}=s;function d(){s.counter.textContent=chunkR2NUNRIB_cjs.fg(r.current,r.total),s.previous.setDisabled(r.current<=0),s.next.setDisabled(r.current>=r.total-1),s.laser.setActive(r.tool==="laser"),s.pen.toggle.setActive(r.tool==="pen"),s.highlighter.toggle.setActive(r.tool==="highlighter"),s.eraser.setActive(r.tool==="eraser"),s.blackboard.setActive(chunkR2NUNRIB_cjs.jg(r.blackout,r.tool)),s.clear.setDisabled(!r.hasAnnotations),s.presenterView.setActive(r.presenterViewActive),s.pen.bar.style.backgroundColor=i,s.highlighter.bar.style.backgroundColor=a,s.pen.palette.setValue(i),s.highlighter.palette.setValue(a);}let u=null,m=false,g=false,x=0,v=null,f=y=>{m=y,p.style.opacity=y?"1":"0",p.style.pointerEvents=y?"auto":"none";},b=()=>{u!==null&&(window.clearTimeout(u),u=null);},h=()=>{b(),u=window.setTimeout(()=>{g||f(false);},chunkR2NUNRIB_cjs.bg);},S=y=>{let w=n.getBoundingClientRect();if(chunkR2NUNRIB_cjs.eg(y.clientY,w.height,w.top)){f(true),h();return}f(true),h();},E=y=>{y.target instanceof Node&&!l.contains(y.target)&&s.closePalettes();};p.addEventListener("mouseenter",()=>{g=true,b(),f(true);}),p.addEventListener("mouseleave",()=>{g=false,h();});let T=()=>{s.elapsedText.textContent=chunkR2NUNRIB_cjs.Bf(x===0?0:Date.now()-x);},k=()=>{e.removeEventListener("mousemove",S),e.removeEventListener("mousedown",E),b(),v!==null&&(window.clearInterval(v),v=null),x=0,g=false,s.closePalettes(),T(),f(false);};return f(false),T(),d(),{el:p,update(y){Object.assign(r,y),d();},setPresenting(y){if(!y){k();return}x=Date.now(),T(),v??=window.setInterval(T,1e3),e.addEventListener("mousemove",S),e.addEventListener("mousedown",E),f(true),h();},toggleVisible(){if(m){b(),f(false);return}f(true),h();},dispose(){k(),p.remove();}}}function Hi(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=H(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),a=!chunkR2NUNRIB_cjs.Qj("navigation",o),s=a?H(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,p=a?H(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-presentation-touch-counter");l.setAttribute("aria-live","polite");for(let d of [i.btn,s?.btn,p?.btn])d?.addEventListener("pointerdown",u=>u.stopPropagation()),d?.addEventListener("click",u=>u.stopPropagation());return r.append(i.btn,...s?[s.btn]:[],...p?[p.btn]:[],l),{el:r,update(d,u){let m=chunkR2NUNRIB_cjs.ai(d,u);s?.setDisabled(m.previousDisabled),p?.setDisabled(m.nextDisabled),l.textContent=m.counterLabel;}}}function jv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let a=chunkR2NUNRIB_cjs.Ok(e,"header","pptxv-eqdlg-header"),s=chunkR2NUNRIB_cjs.Ok(e,"h2");s.textContent=t("pptx.equation.insertTitle");let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-eqdlg-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),a.append(s,p);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-preview"),d=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-eqdlg-field"),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-label");u.textContent=t("pptx.equation.latexInput");let m=e.createElement("textarea");m.className="pptxv-eqdlg-input",m.rows=3,m.placeholder="\\frac{a}{b} + \\sqrt{c}",m.spellcheck=false;let g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-hint");g.textContent=t("pptx.equation.latexHint"),d.append(u,m,g);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-field"),v=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-label");v.textContent=t("pptx.equation.templates");let f=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-grid"),b=[],h=chunkR2NUNRIB_cjs.ga();for(let[L,D]of chunkR2NUNRIB_cjs.ea.entries()){let R=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-eqdlg-template");R.type="button",R.title=t(D.i18nKey);let F=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-template-math");F.innerHTML=h[L]??"";let M=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-template-label");M.textContent=t(D.i18nKey),R.append(F,M),R.addEventListener("click",()=>{m.value=D.latex,C(),m.focus();}),f.appendChild(R),b.push(R);}x.append(v,f);let S=()=>{let L=m.value.trim();if(!L)return null;try{let D=chunkR2NUNRIB_cjs.ca(L);return Object.keys(D).length>0?D:null}catch{return null}},E=true,T,k=chunkR2NUNRIB_cjs.Ok(e,"footer","pptxv-eqdlg-footer"),y=H(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>P(false)}),w=H(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let L=S();L&&(n(L,T),m.value="",C(),P(false));}});w.btn.classList.add("is-primary"),k.append(y.btn,w.btn),i.append(a,l,d,x,k),o.append(r,i);let C=()=>{let L=chunkR2NUNRIB_cjs.fa(m.value);L?(l.classList.remove("is-empty"),l.innerHTML=L):(l.classList.add("is-empty"),l.textContent=t("pptx.equation.previewPlaceholder"));let D=m.value;for(let[R,F]of b.entries())F.classList.toggle("is-active",chunkR2NUNRIB_cjs.ea[R]?.latex===D);w.setDisabled(!E||S()===null);};m.addEventListener("input",C),o.addEventListener("keydown",L=>{L.stopPropagation(),L.key==="Escape"?P(false):L.key==="Enter"&&(L.ctrlKey||L.metaKey)&&(L.preventDefault(),w.btn.click());}),r.addEventListener("click",()=>P(false)),p.addEventListener("click",()=>P(false));let A=false,P=L=>{A=L,o.hidden=!A,A?m.focus():T=void 0;},I=()=>{let L=T!==void 0,D=t(L?"pptx.equation.editTitle":"pptx.equation.insertTitle"),R=t(L?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",D),s.textContent=D,w.btn.textContent=R,w.btn.title=R,w.btn.setAttribute("aria-label",R);};return C(),{el:o,toggle:()=>{A||(T=void 0,m.value="",I(),C()),P(!A);},setOpen:P,isOpen:()=>A,setEditable(L){E=L,m.disabled=!L,w.setDisabled(!L||S()===null);},openEdit(L,D){T=L,m.value=chunkR2NUNRIB_cjs.da(D),I(),C(),P(true);}}}function Ri(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-findreplace");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.findReplace.ariaLabel"));let r=e.createElement("input");r.type="text",r.className="pptxv-findreplace-input",r.placeholder=t("pptx.findReplace.findPlaceholder"),r.setAttribute("aria-label",t("pptx.findReplace.searchText"));let i=e.createElement("input");i.type="text",i.className="pptxv-findreplace-input",i.placeholder=t("pptx.findReplace.replacePlaceholder"),i.setAttribute("aria-label",t("pptx.findReplace.replacementText"));let a=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-findreplace-checkbox"),s=e.createElement("input");s.type="checkbox",s.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),a.append(s,e.createTextNode(t("pptx.findReplace.matchCase")));let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-findreplace-status");p.setAttribute("aria-live","polite");let l=()=>{let b=n.search(r.value,s.checked);p.textContent=b>0?t("pptx.findReplace.matchCount",{current:1,total:b}):t("pptx.findReplace.noMatches");},d=H(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:l}),u=H(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,s.checked),l();}}),m=H(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,s.checked),l();}}),g=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>f(false)});r.addEventListener("input",l),r.addEventListener("keydown",b=>{b.key==="Escape"&&(b.stopPropagation(),f(false));});let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-findreplace-row");x.append(r,i,a,d.btn,u.btn,m.btn,g.btn),o.append(x,p);let v=false,f=b=>{v=b,o.hidden=!v,v&&r.focus();};return {el:o,toggle:()=>f(!v),setOpen:f,isOpen:()=>v,setEditable(b){i.disabled=!b,u.setDisabled(!b),m.setDisabled(!b);}}}function Yv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=ze(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:u=>n.setSlideBackgroundColor(u)},"#ffffff"),i=H(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),a=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>d(false)}),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-format-background-row"),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-format-background-label");p.textContent=t("pptx.slideBackground.colour"),s.append(p,r.el,i.btn,a.btn),o.appendChild(s);let l=false,d=u=>{l=u,o.hidden=!l;};return {el:o,toggle:()=>d(!l),setOpen:d,isOpen:()=>l,setEditable(u){r.setDisabled(!u),i.setDisabled(!u);}}}var Vw=24,zw=1,_w=400;function Ee(e){return e!==void 0&&chunkR2NUNRIB_cjs.c(e)}function Cn(e){return e!==void 0&&chunkR2NUNRIB_cjs.d(e)}function Ue(e){let t=Ee(e)?e.textStyle:void 0,n=Ee(e)?e.textSegments?.find(o=>o.text)?.style:void 0;return {bold:!!(t?.bold??n?.bold),italic:!!(t?.italic??n?.italic),underline:!!(t?.underline??n?.underline),strikethrough:!!(t?.strikethrough??n?.strikethrough),hasTextShadow:!!(t?.textShadowColor??n?.textShadowColor),fontSize:t?.fontSize??n?.fontSize??Vw,fontFamily:t?.fontFamily??n?.fontFamily,placeholderType:e?.placeholderType,color:t?.color??n?.color,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:t?.listType??n?.listType,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function Je(e,t){if(!Ee(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function Pt(e,t){let n=Ue(e);return Je(e,{[t]:!n[t]})}function En(e,t){let n=Math.min(_w,Math.max(zw,Math.round(t)));return Je(e,{fontSize:n})}function Oi(e,t){return En(e,Ue(e).fontSize+t)}function Fi(e,t){return Je(e,{color:t})}function Bi(e,t){return Je(e,{highlightColor:t})}function $e(e,t){return Cn(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function Ni(e,t){return Je(e,{fontFamily:t})}function Vi(e,t){return Je(e,{characterSpacing:t})}var Gw={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function zi(e){let t=Ue(e).hasTextShadow;return Je(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:Gw)}function _i(e,t){if(!Ee(e)||!e.textSegments)return {};let n=chunkR2NUNRIB_cjs.md(e.textSegments,null,t);return {textSegments:n,text:n.map(o=>o.text).join("")}}function Gi(e){return Je(e,{bold:false,italic:false,underline:false,strikethrough:false,highlightColor:void 0,textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0,characterSpacing:void 0})}var Ui=1;function Xv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-arrange-extras"),r=H(e,{label:t("pptx.contextMenu.group"),icon:"group",onClick:n.groupSelected}),i=H(e,{label:t("pptx.contextMenu.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),a=e.createElement("input");return a.type="number",a.className="pptxv-field-input pptxv-arrange-stroke",a.min="0",a.max="120",a.step="0.5",a.value=String(Ui),a.title=t("pptx.ribbon.strokeWidth"),a.setAttribute("aria-label",t("pptx.ribbon.strokeWidth")),a.addEventListener("keydown",s=>s.stopPropagation()),a.addEventListener("change",()=>{let s=Number.parseFloat(a.value);Number.isFinite(s)&&n.setStrokeWidth(Math.max(0,s));}),o.append(r.btn,i.btn,a),{el:o,update({editable:s,selectedCount:p,selectedElement:l}){r.setDisabled(!s||p<2),i.setDisabled(!s||l?.type!=="group");let d=l!==void 0&&chunkR2NUNRIB_cjs.d(l);a.disabled=!s||!d;let u=l!==void 0&&chunkR2NUNRIB_cjs.d(l)?l.shapeStyle?.strokeWidth??Ui:Ui;e.activeElement!==a&&(a.value=String(u));}}}var Uw=[{edge:"left",label:"left",icon:"align-left"},{edge:"centerH",label:"center",icon:"align-center"},{edge:"right",label:"right",icon:"align-right"},{edge:"top",label:"top",icon:"align-top"},{edge:"middle",label:"middle",icon:"align-middle"},{edge:"bottom",label:"bottom",icon:"align-bottom"}],Zv=3;function Qv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.arrange.groupLabel"),o.appendChild(i);let a=Uw.map(S=>H(e,{label:t("pptx.arrange.align",{direction:S.label}),icon:S.icon,onClick:()=>n.alignElements(S.edge)})),s=H(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),p=H(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),l=H(e,{label:t("pptx.arrange.format"),icon:"copy",textLabel:t("pptx.arrange.format"),onClick:n.toggleFormatPainter});l.btn.title=t("pptx.arrange.formatPainter");let d=H(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),u=H(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),m=H(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),g=H(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),x=H(e,{label:t("pptx.arrange.back"),icon:"send-back",onClick:n.sendToBack});x.btn.title=t("pptx.arrange.sendToBack");let v=H(e,{label:t("pptx.arrange.front"),icon:"bring-front",onClick:n.bringToFront});v.btn.title=t("pptx.arrange.bringToFront");let f=H(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",textLabel:t("pptx.arrange.duplicate"),onClick:n.duplicate}),b=H(e,{label:t("pptx.arrange.delete"),icon:"trash",textLabel:t("pptx.arrange.delete"),onClick:n.delete}),h=Xv(e,t,n);return r.append(...a.map(S=>S.btn),s.btn,p.btn,l.btn,d.btn,u.btn,h.el,m.btn,g.btn,x.btn,v.btn,f.btn,b.btn),{el:o,update({editable:S,hasSelection:E,formatPainterActive:T,selectedCount:k,selectedElement:y}){let w=S&&E;for(let C of [...a,d,u,m,g,x,v,f,b])C.setDisabled(!w);h.update({editable:S,selectedCount:k,selectedElement:y}),l.setDisabled(!S||!E&&!T),l.btn.dataset.active=String(T),s.setDisabled(!S||k<Zv),p.setDisabled(!S||k<Zv);}}}function Jv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let a=H(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),s=H(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),p=H(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),l=H(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return l.btn.dataset.testid="format-painter-toggle",r.append(a.btn,s.btn,p.btn,l.btn),{el:o,update({hasSelection:d,hasClipboard:u,editable:m,formatPainterActive:g}){a.setDisabled(!m||!u),s.setDisabled(!m||!d),p.setDisabled(!d),l.setDisabled(!m||!d&&!g),l.btn.dataset.active=String(g);}}}function oe(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-dropdown"),o=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-dropdown-trigger");o.type="button",o.title=t.triggerLabel,o.setAttribute("aria-label",t.triggerLabel),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false");let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunkR2NUNRIB_cjs.Zk(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let a=false,s,p=new Map,l=x=>{a=x,i.hidden=!x,o.setAttribute("aria-expanded",String(x)),o.classList.toggle("is-active",x);},d=()=>{for(let[x,v]of p){let f=s!==void 0&&v===s;x.classList.toggle("is-selected",f),x.setAttribute("aria-selected",String(f));}},u=null,m=x=>JSON.stringify(x.map(v=>[v.label,String(v.value),v.groupLabel??"",v.hint??"",v.style?Object.entries(v.style):0])),g=x=>{i.replaceChildren(),p.clear();for(let v of x){if(v.groupLabel){let b=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-dropdown-group");b.setAttribute("role","presentation"),b.textContent=v.groupLabel,i.appendChild(b);}let f=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-dropdown-item");if(f.type="button",f.setAttribute("role","option"),f.setAttribute("aria-selected","false"),f.textContent=v.label,v.hint){let b=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-dropdown-item-hint");b.textContent=v.hint,f.appendChild(b);}v.style&&Object.assign(f.style,v.style),f.addEventListener("click",()=>{l(false),t.onSelect(v.value);}),i.appendChild(f),p.set(f,v.value);}d();};return g(t.items),o.addEventListener("click",x=>{x.stopPropagation(),l(!a);}),e.addEventListener("pointerdown",x=>{a&&!n.contains(x.target)&&l(false);}),{el:n,setDisabled(x){o.disabled=x,x&&l(false);},setTriggerText(x){r.textContent=x;},setSelected(x){s=x,d();},setItems(x){let v=m(x);v!==u&&(u=v,g(x),d());},close:()=>l(false)}}var We=["#000000","#ffffff","#ff0000","#00aa00","#0000ff","#ff8800","#8800cc","#00cccc","#ff69b4","#808080"];function $w(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Ke(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-swatch-picker"),r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-dropdown-trigger pptxv-swatch-trigger");r.type="button",r.title=n.label,r.setAttribute("aria-label",n.label),r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(chunkR2NUNRIB_cjs.Zk(e,n.icon));let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-swatch-menu");a.hidden=true,o.appendChild(a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-swatch-grid");a.appendChild(s);let p=n.fallback,l=new Map,d=()=>{for(let[v,f]of l)v.classList.toggle("is-selected",f===p);i.style.backgroundColor=p;},u=false,m=v=>{u=v,a.hidden=!v,r.setAttribute("aria-expanded",String(v)),r.classList.toggle("is-active",v);};for(let v of n.swatches){let f=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-swatch");f.type="button",f.setAttribute("data-pptx-compact",""),f.style.backgroundColor=v,f.setAttribute("aria-label",v),f.addEventListener("click",()=>{m(false),n.onSelect(v);}),s.appendChild(f),l.set(f,v);}let g=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-swatch-custom");g.textContent=t("pptx.ribbon.customColour");let x=e.createElement("input");return x.type="color",x.className="pptxv-swatch-custom-input",x.addEventListener("input",()=>n.onSelect(x.value)),g.appendChild(x),a.appendChild(g),r.addEventListener("click",v=>{v.stopPropagation(),m(!u);}),e.addEventListener("pointerdown",v=>{u&&!o.contains(v.target)&&m(false);}),d(),{el:o,setValue(v){p=$w(v,n.fallback),x.value=p,d();},setDisabled(v){r.disabled=v,v&&m(false);}}}var Ww=12;function ef(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.groupDrawing"),o.appendChild(i);let a=oe(e,{triggerLabel:t("pptx.drawing.shapes"),triggerText:t("pptx.drawing.shapes"),icon:"shapes",items:chunkR2NUNRIB_cjs.Ai.slice(0,Ww).map(u=>({label:t(u.i18nKey),value:u.type})),onSelect:u=>n.insertShape(u)}),s=oe(e,{triggerLabel:t("pptx.ribbon.arrange"),triggerText:t("pptx.ribbon.arrange"),icon:"bring-front",items:[{label:t("pptx.contextMenu.bringForward"),value:n.bringForward},{label:t("pptx.contextMenu.sendBackward"),value:n.sendBackward},{label:t("pptx.contextMenu.bringToFront"),value:n.bringToFront},{label:t("pptx.contextMenu.sendToBack"),value:n.sendToBack},{label:t("pptx.ribbon.group"),value:n.groupSelected},{label:t("pptx.ribbon.ungroup"),value:n.ungroupSelected}],onSelect:u=>u()}),p=Ke(e,t,{label:t("pptx.drawing.shapeFill"),icon:"square",swatches:We,fallback:"#ffffff",onSelect:u=>n.setShapeFill(u)}),l=Ke(e,t,{label:t("pptx.drawing.shapeOutline"),icon:"pen",swatches:We,fallback:"#000000",onSelect:u=>n.setShapeStroke(u)}),d=H(e,{label:t("pptx.drawing.shapeEffectsUnavailable"),icon:"sparkles",onClick:()=>{}});return d.setDisabled(true),r.append(a.el,s.el,p.el,l.el,d.btn),{el:o,update({editable:u,hasSelection:m}){a.setDisabled(!u);let g=u&&m;s.setDisabled(!g),p.setDisabled(!g),l.setDisabled(!g),d.setDisabled(true);}}}function tf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let a=H(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),s=H(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace}),p=Kw(e,t,n);return r.append(a.btn,s.btn,p.el),{el:o,update({editable:l}){p.setDisabled(!l);}}}function Kw(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu-host"),r=H(e,{label:t("pptx.ribbon.tool.select"),icon:"cursor",onClick:()=>s(!a)});r.btn.setAttribute("aria-haspopup","menu"),r.btn.setAttribute("aria-expanded","false");let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu");i.style.left="0",i.style.right="auto",i.style.minWidth="150px",i.hidden=true;let a=false,s=l=>{a=l,i.hidden=!l,r.btn.setAttribute("aria-expanded",String(l)),r.btn.classList.toggle("is-active",l);},p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-primary-menu-item");return p.type="button",p.textContent=t("pptx.editing.selectAll"),p.addEventListener("mousedown",l=>l.preventDefault()),p.addEventListener("click",()=>{s(false),n.selectAll();}),i.appendChild(p),e.addEventListener("pointerdown",l=>{a&&!o.contains(l.target)&&s(false);}),o.append(r.btn,i),{el:o,setDisabled(l){r.btn.disabled=l,p.disabled=l,l&&s(false);}}}var of=2;function nf(e,t){return chunkR2NUNRIB_cjs.Fi(t).flatMap(n=>n.entries.map((o,r)=>({label:o.family,value:o.family,style:{fontFamily:o.family},...r===0?{groupLabel:e(n.labelKey)}:{},...o.themeRole?{hint:e(`pptx.font.role.${o.themeRole}`)}:{}})))}function rf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let a=oe(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:nf(t,{}),onSelect:n.setFontFamily});a.el.classList.add("pptxv-font-family-dd");let s=oe(e,{triggerLabel:t("pptx.ribbon.fontSize"),triggerText:"24",items:chunkR2NUNRIB_cjs.Bi.map(k=>({label:String(k),value:k})),onSelect:n.setFontSize});s.el.classList.add("pptxv-font-size-dd");let p=H(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),l=H(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),d=H(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),u=H(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),m=H(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),g=H(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-of)}),x=H(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(of)}),v=H(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),f=oe(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunkR2NUNRIB_cjs.Ci.map(k=>({label:t(k.i18nKey),value:k.value})),onSelect:n.setCharacterSpacing});f.el.querySelector(".pptxv-dropdown-text")?.remove();let b=oe(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunkR2NUNRIB_cjs.Ei.map(k=>({label:t(k.i18nKey),value:k.value})),onSelect:n.changeCase});b.el.querySelector(".pptxv-dropdown-text")?.remove();let h=Ke(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:We,fallback:"#000000",onSelect:n.setTextColor}),S=Ke(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:We,fallback:"#ffff00",onSelect:n.setHighlightColor});r.append(a.el,s.el,g.btn,x.btn,p.btn,l.btn,d.btn,u.btn,m.btn,v.btn,f.el,b.el,h.el,S.el);let E=[p,l,d,u],T=[g,x,p,l,d,u,m,v,f,b,h,S];return {el:o,update({canFormat:k,editable:y,text:w,themeFonts:C,embeddedFontFamilies:A,customFontFamilies:P}){a.setItems(nf(t,{themeFonts:C,embeddedFonts:A,customFonts:P})),p.setActive(w.bold),l.setActive(w.italic),d.setActive(w.underline),u.setActive(w.strikethrough),m.setActive(w.hasTextShadow),a.setTriggerText(w.fontFamily??chunkR2NUNRIB_cjs.Gi(w.placeholderType,C)),a.setSelected(w.fontFamily),s.setTriggerText(String(w.fontSize)),s.setSelected(w.fontSize),h.setValue(w.color),S.setValue(w.highlightColor),a.setDisabled(!y),s.setDisabled(!y);for(let I of T)I.setDisabled(!y||!k);for(let I of E)(!y||!k)&&I.setActive(false);}}}var qw=[{value:"horizontal",labelKey:"pptx.slideInspector.horizontal"},{value:"vertical",labelKey:"pptx.ribbon.textDirectionRotate90"},{value:"vertical270",labelKey:"pptx.ribbon.textDirectionRotate270"},{value:"wordArtVert",labelKey:"pptx.ribbon.textDirectionStacked"}],jw=[{count:1,labelKey:"pptx.ribbon.columns1"},{count:2,labelKey:"pptx.ribbon.columns2"},{count:3,labelKey:"pptx.ribbon.columns3"}],af=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify"}];function sf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.paragraph"),o.appendChild(i);let a=H(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),s=H(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList}),p=H(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),l=H(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),d=af.map(v=>H(e,{label:t(v.labelKey),icon:v.icon,onClick:()=>n.setTextAlign(v.align)})),u=oe(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunkR2NUNRIB_cjs.Di.map(v=>({label:v.label,value:v.value})),onSelect:n.setLineSpacing});u.el.querySelector(".pptxv-dropdown-text")?.remove();let m=oe(e,{triggerLabel:t("pptx.paragraph.textDirection"),triggerText:"",icon:"change-case",items:qw.map(v=>({label:t(v.labelKey),value:v.value})),onSelect:n.setTextDirection});m.el.querySelector(".pptxv-dropdown-text")?.remove();let g=oe(e,{triggerLabel:t("pptx.paragraph.columns"),triggerText:"",icon:"columns",items:jw.map(v=>({label:t(v.labelKey),value:v.count})),onSelect:n.setColumnCount});g.el.querySelector(".pptxv-dropdown-text")?.remove(),r.append(a.btn,s.btn,p.btn,l.btn,...d.map(v=>v.btn),u.el,m.el,g.el);let x=[a,s,p,l,...d,u,m,g];return {el:o,update({canFormat:v,editable:f,text:b}){a.setActive(b.listType==="bullet"),s.setActive(b.listType==="numbered");for(let[h,S]of af.entries())d[h].setActive(b.align===S.align);u.setSelected(b.lineSpacing);for(let h of x)h.setDisabled(!f||!v);}}}var $i=1280,Wi=720,lf=144,df=lf/$i,Yw=Math.round(Wi*df),pf;function cf(e,t,n,o){pf??=chunkR2NUNRIB_cjs.Yk();let r=chunkR2NUNRIB_cjs.Ec(n,{slideWidth:$i,slideHeight:Wi,...o?{scheme:o}:{},idFor:s=>`tpl-preview-${n}-${s}`}),i={id:`tpl-preview-${n}`,rId:"",slideNumber:1,elements:r.elements,...r.backgroundColor?{backgroundColor:r.backgroundColor}:{}},a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-preview",{width:`${lf}px`,height:`${Yw}px`,overflow:"hidden",pointerEvents:"none",backgroundColor:i.backgroundColor??"#FFFFFF"});return a.setAttribute("aria-hidden","true"),a.appendChild(chunkR2NUNRIB_cjs.Sk({document:e,slide:i,canvasSize:{width:$i,height:Wi},mediaDataUrls:new Map,registry:pf,t,scale:df})),a}function mf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-layer");o.hidden=true;let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.slideTemplates.close"));let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.slideTemplates.galleryTitle")),i.tabIndex=-1;let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-header"),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-heading"),p=chunkR2NUNRIB_cjs.Ok(e,"h2");p.textContent=t("pptx.slideTemplates.galleryTitle");let l=chunkR2NUNRIB_cjs.Ok(e,"p");l.textContent=t("pptx.slideTemplates.galleryDescription"),s.append(p,l);let d=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-close");d.type="button",d.setAttribute("aria-label",t("pptx.slideTemplates.close")),d.textContent="\xD7",a.append(s,d);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-body"),m=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.slideTemplates.gallery")),u.appendChild(m);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-footer"),x=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-cancel");x.type="button",x.textContent=t("pptx.slideTemplates.cancel");let v=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-insert");v.type="button",v.textContent=t("pptx.slideTemplates.insert"),v.disabled=true,g.append(x,v),i.append(a,u,g),o.append(r,i);let f,b=null;function h(y){f=y,v.disabled=false;for(let w of m.querySelectorAll('[role="option"]')){let C=w.dataset.templateId===y;w.setAttribute("aria-selected",String(C)),w.classList.toggle("is-selected",C);}}function S(y){y&&(n.onInsert(y),T());}function E(){let y=n.getScheme?.();m.replaceChildren();for(let w of chunkR2NUNRIB_cjs.Dc){let C=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-option");C.type="button",C.dataset.templateId=w.id,C.setAttribute("role","option"),C.setAttribute("aria-selected",String(f===w.id)),C.setAttribute("aria-label",t(w.nameKey)),C.title=t(w.descriptionKey),C.classList.toggle("is-selected",f===w.id),C.appendChild(cf(e,t,w.id,y));let A=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tpl-option-label");A.textContent=t(w.nameKey),C.append(A),C.addEventListener("click",()=>h(w.id)),C.addEventListener("dblclick",()=>S(w.id)),m.appendChild(C);}}function T(){o.hidden||(o.hidden=true,b?.focus(),b=null);}function k(y){if(y.key==="Escape"){y.preventDefault(),T();return}if(y.key!=="Tab")return;let w=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(w.length===0)return;let C=w[0],A=w[w.length-1];y.shiftKey&&e.activeElement===C?(y.preventDefault(),A.focus()):!y.shiftKey&&e.activeElement===A&&(y.preventDefault(),C.focus());}return r.addEventListener("click",T),d.addEventListener("click",T),x.addEventListener("click",T),v.addEventListener("click",()=>S(f)),o.addEventListener("keydown",k),{el:o,open(y){let w=e.defaultView?.HTMLElement;b=w&&e.activeElement instanceof w?e.activeElement:null,E(),o.parentElement!==y&&y.appendChild(o),o.hidden=false,i.focus();},close:T}}var Xw=128,Zw=72;function uf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu pptxv-layout-menu");o.dataset.testid="layout-gallery-menu",o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=s=>{r=s,o.hidden=!s;};e.addEventListener("pointerdown",s=>{r&&!o.parentElement?.contains(s.target)&&i(false);});let a=null;return {el:o,setItems(s,p){let l=JSON.stringify([s.map(d=>[d.path,d.name]),p.currentLayoutPath??"",s.map(d=>p.previews.get(d.path)?1:0)]);if(l!==a){a=l,o.replaceChildren();for(let d of s){let u=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-layout-tile");u.type="button",u.setAttribute("role","menuitem"),chunkR2NUNRIB_cjs.Mi(d,p.currentLayoutPath)&&(u.classList.add("pptxv-layout-tile-current"),u.setAttribute("aria-current","true")),u.appendChild(Qw(e,p.previews.get(d.path),p.renderPreview));let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-layout-tile-name");m.textContent=d.name,u.appendChild(m),u.title=d.name,u.addEventListener("click",()=>{i(false),n(d);}),o.appendChild(u);}}},toggle:()=>i(!r),close:()=>i(false)}}function Qw(e,t,n){let o=chunkR2NUNRIB_cjs.Li(t,Xw,Zw),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-layout-tile-thumb");r.style.width=`${o.boxWidth}px`,r.style.height=`${o.boxHeight}px`,r.style.backgroundColor=o.backgroundColor;let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-layout-tile-surface");i.style.width=`${o.surfaceWidth}px`,i.style.height=`${o.surfaceHeight}px`,i.style.transform=`scale(${o.scale})`;let a=t&&n?n(t,o):void 0;a&&i.appendChild(a);for(let s of o.frames){let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-layout-tile-frame");p.style.left=`${s.left}px`,p.style.top=`${s.top}px`,p.style.width=`${s.width}px`,p.style.height=`${s.height}px`,p.style.borderWidth=`${o.frameBorderWidth}px`,i.appendChild(p);}return r.appendChild(i),r}function xf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-slides-split"),s=H(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-slides-caret");p.type="button",p.title=t("pptx.home.chooseLayout"),p.setAttribute("aria-label",t("pptx.home.chooseLayout")),p.setAttribute("aria-haspopup","menu"),p.appendChild(chunkR2NUNRIB_cjs.Zk(e,"chevron-down"));let l=uf(e,t("pptx.home.chooseLayout"),b=>n.insertSlideFromLayout(b.path,b.name));p.addEventListener("click",b=>{b.stopPropagation(),l.toggle();}),a.append(s.btn,p,l.el);let d=mf(e,t,{onInsert:b=>n.insertSlideFromTemplate(b),getScheme:()=>n.getTemplateScheme?.()}),u=H(e,{label:t("pptx.home.slideTemplates"),icon:"slide-templates",textLabel:t("pptx.home.slideTemplates"),onClick:()=>{let b=u.btn.closest(".pptxv")??e.body;d.open(b);}}),m=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-slides-menu-host"),g=H(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>x.toggle()});g.btn.setAttribute("aria-haspopup","menu");let x=uf(e,t("pptx.master.layout"),b=>n.applyLayout(b.path));m.append(g.btn,x.el);let v=H(e,{label:t("pptx.animations.reset"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide});v.btn.title=t("pptx.sections.resetSlideTitle");let f=H(e,{label:t("pptx.sections.sectionButtonLabel"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return f.btn.title=t("pptx.sections.addSection"),r.append(a,u.btn,m,v.btn,f.btn),{el:o,update({editable:b,slideCount:h,layouts:S,layoutPreviews:E,currentLayoutPath:T}){let k=S.length>0,y=E??new Map;l.setItems(S,{previews:y,renderPreview:n.renderLayoutPreview}),x.setItems(S,{previews:y,currentLayoutPath:T,renderPreview:n.renderLayoutPreview}),s.setDisabled(!b),p.hidden=!k,p.disabled=!b,u.setDisabled(!b),g.setDisabled(!b||!k),v.setDisabled(!b||h===0),f.setDisabled(!b||h===0),b||(l.close(),x.close(),d.close());}}}var Jw=100;function gf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=Jv(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=xf(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,insertSlideFromTemplate:r.insertSlideFromTemplate,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName")),getTemplateScheme:()=>r.getTemplateScheme(),renderLayoutPreview:(m,g)=>chunkR2NUNRIB_cjs.Sk({document:e,slide:{id:`layout-preview-${m.path}`,rId:"",slideNumber:0,elements:m.elements.slice(0,Jw),backgroundColor:g.backgroundColor},canvasSize:{width:g.surfaceWidth,height:g.surfaceHeight},mediaDataUrls:new Map,registry:chunkR2NUNRIB_cjs.Yk(),t})}),s=rf(e,t,{toggleBold:r.toggleBold,toggleItalic:r.toggleItalic,toggleUnderline:r.toggleUnderline,toggleStrikethrough:r.toggleStrikethrough,toggleTextShadow:r.toggleTextShadow,setFontFamily:r.setFontFamily,setFontSize:r.setFontSize,changeFontSize:r.changeFontSize,setTextColor:r.setTextColor,setHighlightColor:r.setHighlightColor,setCharacterSpacing:r.setCharacterSpacing,changeCase:r.changeCase,clearFormatting:r.clearFormatting}),p=sf(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing,setTextDirection:r.setTextDirection,setColumnCount:r.setColumnCount}),l=tf(e,t,{toggleFindReplace:n.onToggleFindReplace,selectAll:r.selectAll}),d=ef(e,t,{insertShape:m=>r.insert("shape",m),bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setShapeFill:r.setShapeFill,setShapeStroke:r.setShapeStroke}),u=Qv(e,t,{bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,alignElements:r.alignElements,distributeElements:r.distributeElements,flipHorizontal:r.flipHorizontal,flipVertical:r.flipVertical,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setStrokeWidth:r.setShapeStrokeWidth,toggleFormatPainter:r.toggleFormatPainter,duplicate:r.duplicateSelected,delete:r.deleteSelected});return o.append(i.el,a.el,s.el,p.el,l.el,d.el,u.el),{el:o,update({editable:m,selectedElement:g,hasClipboard:x,slideCount:v,selectedCount:f,formatPainterActive:b,layouts:h,layoutPreviews:S,currentLayoutPath:E,themeFonts:T,embeddedFontFamilies:k,customFontFamilies:y}){let w=Ee(g),C=Ue(g),A=g!==void 0;i.update({hasSelection:A,hasClipboard:x,editable:m,formatPainterActive:b}),a.update({editable:m,slideCount:v,layouts:h,layoutPreviews:S,currentLayoutPath:E}),s.update({canFormat:w,editable:m,text:C,themeFonts:T,embeddedFontFamilies:k,customFontFamilies:y}),p.update({canFormat:w,editable:m,text:C}),l.update({editable:m}),d.update({editable:m,hasSelection:A}),u.update({editable:m,hasSelection:A,formatPainterActive:b,selectedCount:f,selectedElement:g});}}}function Ki(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,a=s=>{i=s,r.hidden=!s,o?.(s);};for(let s of n){s.separatorBefore&&r.appendChild(chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu-sep"));let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-primary-menu-item");p.type="button",p.setAttribute("role","menuitem"),p.textContent=s.label,p.addEventListener("click",()=>{a(false),s.run();}),r.appendChild(p);}return e.addEventListener("pointerdown",s=>{i&&!r.parentElement?.contains(s.target)&&a(false);}),{el:r,toggle:()=>a(!i),close:()=>a(false),isOpen:()=>i}}function bf(e,t,n){let{slideShow:o}=t,r=[{label:e("pptx.toolbar.present"),run:()=>o.startFromCurrent()},{label:e("pptx.slideShow.presenterView"),run:()=>o.openPresenterView()},{label:e("pptx.slideShow.rehearseTimings"),run:()=>o.startRehearsal()},{label:e("pptx.slideShow.setUp"),run:()=>o.openSetUp(),separatorBefore:true}];return chunkR2NUNRIB_cjs.Qj("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function vf(e,t,n){let{file:o,nav:r}=t,i=[];return chunkR2NUNRIB_cjs.Qj("export",n)||i.push({label:e("pptx.ribbon.exportPng"),run:()=>o.exportPng()},{label:e("pptx.ribbon.exportPdf"),run:()=>o.exportPdf()},{label:e("pptx.ribbon.exportVideo"),run:()=>o.exportVideo()},{label:e("pptx.ribbon.exportGif"),run:()=>o.exportGif()},{label:e("pptx.file.packageTooltip"),run:()=>o.packageForSharing()},{label:e("pptx.file.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()}),i.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true},{label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage()},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true},{label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")},{label:e("pptx.ribbon.versionHistory"),run:()=>o.openVersionHistory(),separatorBefore:true},{label:e("pptx.ribbon.documentProperties"),run:()=>o.openDocumentProperties(),separatorBefore:true},{label:e("pptx.security.protectPresentation"),run:()=>o.openPasswordProtection()},{label:e("pptx.ribbon.embedFonts"),run:()=>o.openFontEmbedding()},{label:e("pptx.viewer.digitalSignatures"),run:()=>o.openDigitalSignatures()}),i}function ff(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-primary"),i=H(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-split"),s=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-present-main");s.type="button",s.title=t("pptx.present.presentTooltip"),s.textContent=t("pptx.toolbar.present"),s.addEventListener("click",()=>n.slideShow.startFromCurrent());let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-present-caret");p.type="button",p.title=t("pptx.present.optionsTooltip"),p.setAttribute("aria-label",t("pptx.present.optionsTooltip")),p.setAttribute("aria-haspopup","menu"),p.appendChild(chunkR2NUNRIB_cjs.Zk(e,"chevron-down"));let l=Ki(e,t("pptx.present.optionsTooltip"),bf(t,n,o),f=>{p.classList.toggle("is-active",f),p.setAttribute("aria-expanded",String(f));});p.addEventListener("click",f=>{f.stopPropagation(),l.toggle();}),a.append(s,p,l.el),r.appendChild(a);let d=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-show-btn");d.type="button",d.title=t("pptx.customShows.createTooltip"),d.textContent="+ Show",d.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(d),r.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-primary-sep"));let u=H(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(u.btn);let m=H(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()});r.appendChild(m.btn);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu-host"),x=Ki(e,t("pptx.ribbon.moreActions"),vf(t,n,o)),v=H(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>x.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",f=>f.stopPropagation()),g.append(v.btn,x.el),r.appendChild(g),{el:r,setEditState({editable:f}){r.hidden=!f,f||(l.close(),x.close());},setAutosaveStatus(){},setInspectorOpen(f){u.setActive(f);}}}var $t=[{id:"file",labelKey:"pptx.ribbon.tab.file"},{id:"home",labelKey:"pptx.ribbon.tab.home"},{id:"insert",labelKey:"pptx.ribbon.tab.insert"},{id:"draw",labelKey:"pptx.ribbon.tab.draw"},{id:"design",labelKey:"pptx.ribbon.tab.design"},{id:"transitions",labelKey:"pptx.ribbon.tab.transitions"},{id:"animations",labelKey:"pptx.ribbon.tab.animations"},{id:"slideShow",labelKey:"pptx.ribbon.tab.slideShow"},{id:"record",labelKey:"pptx.ribbon.tab.record"},{id:"review",labelKey:"pptx.ribbon.tab.review"},{id:"view",labelKey:"pptx.ribbon.tab.view"},{id:"help",labelKey:"pptx.ribbon.tab.help"}],Tn="home";function qi(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let a=new Map,s=new Map;for(let p of chunkR2NUNRIB_cjs.Rj($t,o)){let l=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-ribbon-tab");p.id==="file"&&l.classList.add("pptxv-ribbon-tab-file"),l.type="button",l.setAttribute("role","tab");let d=t(p.labelKey);l.textContent=d,l.addEventListener("click",()=>n(p.id)),i.appendChild(l),a.set(p.id,l),s.set(p.id,d);}if(r){i.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tabrow-spacer"));let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tabrow-actions");if(!chunkR2NUNRIB_cjs.Qj("record",o)){let l=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tabrow-record");l.type="button",l.title=t("pptx.titleBar.record"),l.setAttribute("aria-label",t("pptx.titleBar.record"));let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tabrow-record-dot");d.setAttribute("aria-hidden","true");let u=chunkR2NUNRIB_cjs.Ok(e,"span");u.textContent=t("pptx.titleBar.record"),l.append(d,u),l.addEventListener("click",()=>r.startRecording()),p.appendChild(l);}i.appendChild(p);}return {el:i,setActive(p){for(let[l,d]of a){let u=l===p;d.classList.toggle("is-active",u),d.setAttribute("aria-selected",String(u));}},setHiddenTabs(p){for(let[l,d]of a)d.hidden=l!=="file"&&p.has(l);},applyScreenTips(p){for(let[l,d]of a){let u=p(s.get(l)??"");u?d.title=u:d.removeAttribute("title");}}}}var eC=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunkR2NUNRIB_cjs.Ha},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunkR2NUNRIB_cjs.Ja},{group:"exit",labelKey:"pptx.animation.exit",presets:chunkR2NUNRIB_cjs.Ia}];function hf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-gallery");o.setAttribute("aria-label",t("pptx.animations.addAnimation"));let r=[];for(let i of eC){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-gallery-column"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-animation-gallery-caption");s.textContent=t(i.labelKey);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-gallery-items");for(let l of i.presets){let d=t(`pptx.animation.preset.${l}`),u=H(e,{label:d,text:d,className:"pptxv-animation-preset",onClick:()=>n(i.group,l)});p.appendChild(u.btn),r.push(u);}a.append(s,p),o.appendChild(a);}return {el:o,setDisabled(i){for(let a of r)a.setDisabled(i);}}}function Wt(e,t,n){let o=e.createElement("label");o.textContent=t;let r=e.createElement("input");return r.type="number",r.min="0",r.max="10000",r.step="100",r.value=String(n),o.appendChild(r),{label:o,input:r}}function Kt(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");i.setAttribute("aria-label",t(n));for(let a of o){let s=e.createElement("option");s.value=a,s.textContent=t(`${n}.${a}`),i.appendChild(s);}return r.appendChild(i),{label:r,select:i}}function yf(e,t,n,o,r,i,a,s){let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline-row");p.draggable=a,p.addEventListener("dragstart",m=>m.dataTransfer?.setData("text/plain",n.elementId)),p.addEventListener("dragover",m=>m.preventDefault()),p.addEventListener("drop",m=>{m.preventDefault();let g=m.dataTransfer?.getData("text/plain");g&&s.moveAnimation(g,o);}),p.classList.toggle("is-selected",n.elementId===i);let l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-animation-timeline-name");l.textContent=`${o+1}. ${chunkR2NUNRIB_cjs.db(n,t)}`;let d=H(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>s.reorderAnimation(n.elementId,"up")}),u=H(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>s.reorderAnimation(n.elementId,"down")});return d.setDisabled(!a||o===0),u.setDisabled(!a||o===r-1),p.append(l,d.btn,u.btn),p}function Sf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.animations.advanced"),o.appendChild(i);let a=H(e,{label:t("pptx.animations.exitEffects"),icon:"sparkles",textLabel:t("pptx.animations.exitEffects"),onClick:()=>n.addAnimation("exit","fadeOut")}),s=H(e,{label:t("pptx.animations.pathAnimation"),icon:"move-right",textLabel:t("pptx.animations.pathAnimation"),onClick:()=>n.applyMotionPath(chunkR2NUNRIB_cjs.ob)}),p=H(e,{label:t("pptx.animations.effectOptions"),icon:"wrench",textLabel:t("pptx.animations.effectOptions"),onClick:n.openAnimationPanel}),l=H(e,{label:t("pptx.animations.animationPanel"),icon:"panel-right",textLabel:t("pptx.animations.animationPanel"),onClick:n.openAnimationPanel});l.btn.title=t("pptx.animations.openPanelTooltip");let d=H(e,{label:t("pptx.animations.trigger"),icon:"cursor",textLabel:t("pptx.animations.trigger"),onClick:n.openAnimationPanel}),u=H(e,{label:t("pptx.animations.painter"),icon:"copy",textLabel:t("pptx.animations.painter"),onClick:()=>{}}),m=H(e,{label:t("pptx.animations.remove"),icon:"trash",textLabel:t("pptx.animations.remove"),onClick:n.removeAnimation});m.btn.title=t("pptx.animations.removeTooltip"),r.append(a.btn,s.btn,p.btn,l.btn,d.btn,u.btn,m.btn);let g=[a,s,p,d,m];return {el:o,setDisabled(x){for(let v of g)v.setDisabled(x);u.setDisabled(true);}}}var wf=0;function Cf(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row pptxv-animation-timing-grid");n.appendChild(o);let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.animations.timing"),n.appendChild(r),wf+=1;let i=`pptx-animation-start-${wf}`,a=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field-label");a.htmlFor=i,a.textContent=t("pptx.animations.start");let s=e.createElement("select");s.id=i,s.disabled=true;for(let d of ["onClick","withPrevious","afterPrevious"]){let u=e.createElement("option");u.value=d,u.textContent=t(`pptx.animations.${d}`),s.appendChild(u);}let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");p.textContent=t("pptx.animations.duration");let l=e.createElement("input");return l.type="number",l.min="0",l.step="0.1",l.value="0.5",l.disabled=true,l.setAttribute("aria-label",t("pptx.animations.duration")),o.append(a,s,p,l),{el:n}}function Ef(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-motion-path-gallery");o.setAttribute("aria-label",t("pptx.animations.motionPathGalleryAria"));let r=[];for(let i of chunkR2NUNRIB_cjs.jb){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-motion-path-gallery-column"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-motion-path-gallery-caption");s.textContent=t(chunkR2NUNRIB_cjs.kb(i));let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-motion-path-gallery-items");for(let l of chunkR2NUNRIB_cjs.mb(i)){let d=t(chunkR2NUNRIB_cjs.lb(l.id)),u=H(e,{label:d,text:d,className:"pptxv-motion-path-preset",onClick:()=>n(l.id)});p.appendChild(u.btn),r.push(u);}a.append(s,p),o.appendChild(a);}return {el:o,setDisabled(i){for(let a of r)a.setDisabled(i);}}}function Tf(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i,a=()=>{Gt(e,i);},s=H(e,{label:t("pptx.animations.preview"),icon:"play",textLabel:t("pptx.animations.preview"),onClick:a});s.btn.title=t("pptx.animations.previewTooltip");let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");l.appendChild(s.btn);let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");d.textContent=t("pptx.animations.preview"),p.append(l,d),r.appendChild(p);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");m.textContent=t("pptx.animations.animation");let g=hf(e,t,(M,O)=>n.addAnimation(M,O));u.append(g.el,m),r.appendChild(u);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),v=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");v.textContent=t("pptx.animation.motionPath");let f=Ef(e,t,M=>n.applyMotionPath(M));x.append(f.el,v),r.appendChild(x);let b=Sf(e,t,{addAnimation:n.addAnimation,applyMotionPath:n.applyMotionPath,removeAnimation:n.removeAnimation,openAnimationPanel:o});r.appendChild(b.el),r.appendChild(Cf(e,t).el);let h=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline"),S=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");S.textContent=t("pptx.animation.timeline");let E=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline-list"),T=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timing-controls"),k=e.createElement("select");k.setAttribute("aria-label",t("pptx.animation.trigger"));let y=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let M of y){let O=e.createElement("option");O.value=M,O.textContent=t(`pptx.animation.trigger.${M}`),k.appendChild(O);}let w=Wt(e,t("pptx.animation.duration"),500),C=Wt(e,t("pptx.animation.delay"),0),A=Kt(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),P=Kt(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),I=Kt(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),L=Kt(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),D=Wt(e,t("pptx.animation.repeatCount"),1),R=Wt(e,t("pptx.animations.triggerShape"),0);R.input.type="text",R.input.min="",R.input.max="",T.append(k,w.label,C.label,A.label,P.label,I.label,D.label,L.label,R.label),h.append(S,E,T),r.appendChild(h);let F=()=>{i&&n.setAnimationTiming(i.elementId,{trigger:k.value,durationMs:w.input.valueAsNumber,delayMs:C.input.valueAsNumber,direction:A.select.value,sequence:P.select.value,timingCurve:I.select.value,repeatCount:D.input.valueAsNumber,repeatMode:L.select.value,triggerShapeId:R.input.value});};for(let M of [k,A.select,P.select,I.select,L.select])M.addEventListener("change",F);return w.input.addEventListener("change",F),C.input.addEventListener("change",F),D.input.addEventListener("change",F),R.input.addEventListener("change",F),{el:r,update({editable:M,hasSelection:O,selectedElementId:B,animations:V}){let z=!M||!O;g.setDisabled(z),f.setDisabled(z),s.setDisabled(z),b.setDisabled(z);let N=[...V].sort((_,K)=>(_.order??0)-(K.order??0));i=N.find(({elementId:_})=>_===B),E.replaceChildren(...N.map((_,K)=>yf(e,t,_,K,N.length,B,M,n))),h.hidden=N.length===0,T.hidden=!i,k.value=i?.trigger??"onClick",R.input.value=i?.triggerShapeId??"",R.label.hidden=k.value!=="onShapeClick",w.input.value=String(i?.durationMs??500),C.input.value=String(i?.delayMs??0),A.select.value=i?.direction??"fromTop",P.select.value=i?.sequence??"asOne",I.select.value=i?.timingCurve??"ease",L.select.value=i?.repeatMode??"none",D.input.value=String(i?.repeatCount??1);for(let _ of [k,w.input,C.input,A.select,P.select,I.select,L.select,D.input,R.input])_.disabled=!M;}}}var tC=[{labelKey:"pptx.ribbon.theme.default",theme:void 0},{labelKey:"pptx.ribbon.theme.light",theme:chunkR2NUNRIB_cjs.O},{labelKey:"pptx.ribbon.theme.dark",theme:chunkR2NUNRIB_cjs.P}];function Pf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-gallery-host"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-gallery");r.hidden=true,t.btn.title=n,t.btn.setAttribute("aria-haspopup","true"),t.btn.setAttribute("aria-expanded","false");let i=false,a=s=>{i=s,r.hidden=!s,t.btn.setAttribute("aria-expanded",String(s));};return t.btn.addEventListener("click",s=>{s.stopPropagation(),a(!i);}),e.addEventListener("pointerdown",s=>{i&&!o.contains(s.target)&&a(false);}),o.append(t.btn,r),{el:o,button:t,gallery:r,close:()=>a(false)}}function Af(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-swatch-preview");return o.style.background=n,t.btn.prepend(o),t.btn}function kf(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),a=Pf(e,H(e,{label:t("pptx.ribbon.browseThemes"),icon:"sparkles",textLabel:t("pptx.ribbon.browseThemes"),onClick:()=>{}}),t("pptx.ribbon.browseThemesTitle")),s=chunkR2NUNRIB_cjs.f.map(u=>{let m=H(e,{label:u.name,text:u.name,onClick:()=>{n.applyPresentationTheme(u.id),a.close();}});return a.gallery.appendChild(Af(e,m,`linear-gradient(135deg, ${u.colorScheme.accent1}, ${u.colorScheme.accent2})`)),m}),p=Pf(e,H(e,{label:t("pptx.ribbon.editTheme"),icon:"wrench",textLabel:t("pptx.ribbon.editTheme"),onClick:()=>{}}),t("pptx.ribbon.editThemeTitle"));for(let u of tC){let m=H(e,{label:t(u.labelKey),text:t(u.labelKey),onClick:()=>{n.setTheme(u.theme),p.close();}});p.gallery.appendChild(Af(e,m,u.theme?.colors?.primary??"#6b7280"));}let l=H(e,{label:t("pptx.ribbon.slideSize"),icon:"monitor",textLabel:t("pptx.ribbon.slideSize"),onClick:r});l.btn.title=t("pptx.ribbon.slideSizeTitle");let d=H(e,{label:t("pptx.ribbon.formatBackground"),icon:"square",textLabel:t("pptx.ribbon.formatBackground"),onClick:o});return d.btn.title=t("pptx.ribbon.formatBackgroundTitle"),i.append(a.el,p.el,l.btn,d.btn),{el:i,setEditable(u){a.button.setDisabled(!u),p.button.setDisabled(!u),d.setDisabled(!u);for(let m of s)m.setDisabled(!u);u||(a.close(),p.close());}}}var oC=[1,2,3,4,6,8,12,16],If=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser"},{tool:"freeform",icon:"pen",labelKey:"pptx.ribbon.tool.freeform"}];function Lf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");a.textContent=t("pptx.ribbon.draw"),r.appendChild(a);let s=If.map(g=>H(e,{label:t(g.labelKey),icon:g.icon,onClick:()=>n.setTool(g.tool)}));i.append(...s.map(g=>g.btn)),o.appendChild(r);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");p.appendChild(l);let d=Ke(e,t,{label:t("pptx.ribbon.colour"),icon:"pen",swatches:We,fallback:"#000000",onSelect:g=>n.setColor(g)}),u=oe(e,{triggerLabel:t("pptx.ribbon.width"),triggerText:"",icon:"chevron-down",items:oC.map(g=>({label:`${g} px`,value:g})),onSelect:g=>n.setWidth(g)});l.append(d.el,u.el),o.appendChild(p);let m=[...s,d,u];return {el:o,setEditable(g){for(let x of m)x.setDisabled(!g);},update(g){for(let[x,v]of If.entries())s[x].setActive(g.tool===v.tool);d.setValue(g.color),u.setSelected(g.width),u.setTriggerText(`${g.width} px`);}}}var Df="1.24.0";function Mf(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-account");n.appendChild(r);let i={...chunkR2NUNRIB_cjs.Jj,...chunkR2NUNRIB_cjs.Hj().profile};r.appendChild(rC(e,t,i,s=>{i=s,chunkR2NUNRIB_cjs.Oj(i);}));let a=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section");r.appendChild(a),iC(e,t,a),r.appendChild(aC(e,t)),o?.enabled&&r.appendChild(sC(e,t,o));}function rC(e,t,n,o){let r=n,i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section"),a=e.createElement("h2");a.textContent=t("pptx.account.profile.title"),i.appendChild(a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-account-profile-row"),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-account-avatar"),l=()=>{p.textContent=chunkR2NUNRIB_cjs.Lj(r),p.style.background=r.avatarColor;};l();let d=e.createElement("label");d.className="pptxv-account-name-field";let u=e.createElement("span");u.textContent=t("pptx.account.profile.nameLabel");let m=e.createElement("input");m.type="text",m.placeholder=t("pptx.account.profile.namePlaceholder"),m.value=r.displayName,m.addEventListener("input",()=>{r={...r,displayName:m.value},l(),o(r);}),d.append(u,m),s.append(p,d),i.appendChild(s);let g=e.createElement("p");g.className="pptxv-account-swatch-label",g.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(g);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-parity-swatch-row"),v=(f,b)=>{r={...r,avatarColor:b},l();for(let h of x.querySelectorAll("button"))h.classList.toggle("is-active",h===f);o(r);};for(let f of chunkR2NUNRIB_cjs.Kj){let b=e.createElement("button");b.type="button",b.className="pptxv-account-color-swatch",b.classList.toggle("is-active",f===r.avatarColor),b.style.background=f,b.setAttribute("aria-label",f),b.addEventListener("click",()=>v(b,f)),x.appendChild(b);}return i.appendChild(x),i}function iC(e,t,n){let o=e.createElement("h2");o.textContent=t("pptx.account.storage.title"),n.appendChild(o);let r=e.createElement("p");n.appendChild(r);let i=e.createElement("p");i.className="pptxv-account-privacy",i.textContent=t("pptx.account.storage.privacyBlurb"),n.appendChild(i);let a=e.createElement("button");a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.storage.clear"),n.appendChild(a);let s=e.createElement("p");s.className="pptxv-account-notice",s.hidden=true,n.appendChild(s);async function p(){let l=await chunkR2NUNRIB_cjs.Mj();r.textContent=l.presentationCount>0?t("pptx.account.storage.usage",{count:l.presentationCount,size:chunkR2NUNRIB_cjs._i(l.totalBytes)}):t("pptx.account.storage.usageEmpty");}p(),a.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunkR2NUNRIB_cjs.Nj(),s.hidden=false,s.textContent=t("pptx.account.storage.clearedNotice"),await p()))();});}function aC(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section"),o=e.createElement("h2");o.textContent=t("pptx.account.about.title"),n.appendChild(o);let r=e.createElement("p");r.textContent="pptx-vanilla-viewer",n.appendChild(r);let i=e.createElement("p");return i.className="pptxv-account-privacy",i.textContent=t("pptx.account.about.version",{version:Df}),n.appendChild(i),n}function sC(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section"),r=e.createElement("h2");r.textContent=t("pptx.account.signIn.title"),o.appendChild(r);let i=e.createElement("p");if(i.textContent=t("pptx.account.signIn.description"),o.appendChild(i),n.signedInUser){let s=e.createElement("p");return s.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(s),o}let a=e.createElement("button");return a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.signIn.button"),a.addEventListener("click",()=>n.onSignIn()),o.appendChild(a),o}var SC={back:lucide.ArrowLeft,home:lucide.Home,new:lucide.FilePlus2,open:lucide.FolderOpen,info:lucide.Info,save:lucide.Save,saveAs:lucide.Download,print:lucide.Printer,share:lucide.Share2,export:lucide.Upload,close:lucide.X,account:lucide.UserRound,options:lucide.Settings},Hf="http://www.w3.org/2000/svg";function Rf(e,t){return qt(e,SC[t],17)}function qt(e,t,n){let o=e.createElementNS(Hf,"svg");for(let[r,i]of Object.entries({viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor","stroke-width":1.7,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))o.setAttribute(r,String(i));for(let[r,i]of t){let a=e.createElementNS(Hf,r);for(let[s,p]of Object.entries(i))p!==void 0&&a.setAttribute(s,String(p));o.appendChild(a);}return o}function et(e,t,n,o){let r=e.createElement("button");return r.type="button",r.textContent=t,o&&(r.className=o),r.addEventListener("click",n),r}function ji(e,t,n,o){let r=et(e,"",n,o);return r.appendChild(Rf(e,t)),r}function Of(e,t,n,o){let r=ji(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}var FC={protect:lucide.LockKeyhole,inspect:lucide.Info,embedFonts:lucide.Type,signatures:lucide.BadgeCheck,versionHistory:lucide.Clock3,saveAsPptx:lucide.FileText,saveAsPpsx:lucide.Presentation,saveAsPptm:lucide.FileCode2,package:lucide.Package,pdf:lucide.FileText,png:lucide.Image,video:lucide.Video,gif:lucide.Images,json:lucide.FileJson,copyImage:lucide.Copy,print:lucide.Printer,share:lucide.UserPlus,sharePackage:lucide.Package};function Nf(e,t,n,o,r,i,a){let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-bs-actions");if(t==="export"&&chunkR2NUNRIB_cjs.Qj("export",a))return s;let p={protect:n.openPasswordProtection,inspect:n.openDocumentProperties,embedFonts:n.openFontEmbedding,signatures:n.openDigitalSignatures,versionHistory:n.openVersionHistory,saveAsPptx:n.save,saveAsPpsx:n.saveAsPpsx,saveAsPptm:n.saveAsPptm,package:n.packageForSharing,pdf:n.exportPdf,png:n.exportPng,video:n.exportVideo,gif:n.exportGif,json:n.exportJson,copyImage:n.copySlideAsImage,print:n.print,share:n.openShare,sharePackage:n.packageForSharing};for(let l of chunkR2NUNRIB_cjs.$i(t)){if(l.id==="saveAsPptm"&&!o)continue;let d=p[l.id],u=et(e,"",()=>r(()=>d?.())),m=e.createElement("b");m.appendChild(qt(e,FC[l.id],22));let g=e.createElement("span"),x=e.createElement("strong");x.textContent=i(l.titleKey);let v=e.createElement("small");v.textContent=i(l.bodyKey),g.append(x,v),u.append(m,g),s.appendChild(u);}return s}function Yi(e,t){let n=e.createElement("span");return n.textContent=t,n}function Vf(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-backstage");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.setAttribute("aria-label",t("pptx.backstage.title"));let s=e.createElement("aside"),p=ji(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label",t("pptx.backstage.back"));let l=e.createElement("nav");s.append(p,l);let d=e.createElement("main");a.append(s,d);let u="home",m=false,g="",x=[];(async()=>(x=await chunkR2NUNRIB_cjs.Xi(t),k()))();function v(y){y?.(),y&&o();}function f(y){if(y==="close")return o();if(y==="save")return v(n.save);if(y==="options")return v(n.openSettings);u=y,k();}function b(){l.replaceChildren();for(let y of chunkR2NUNRIB_cjs.Ui){y.group&&!l.querySelector("i")&&l.appendChild(e.createElement("i"));let w=Of(e,y.id,t(y.labelKey),()=>f(y.id));w.classList.toggle("active",u===y.id),l.appendChild(w);}}function h(){let y=e.createElement("h2");y.textContent=t("pptx.backstage.newHeading");let w=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-bs-templates");for(let C of chunkR2NUNRIB_cjs.Vi){let A=et(e,"",()=>v(()=>n.createPresentation(C.id))),P=e.createElement("b");P.style.background=C.preview;let I=e.createElement("strong");I.textContent=t(C.nameKey);let L=e.createElement("small");L.textContent=t(C.descriptionKey),A.append(P,I,L),w.appendChild(A);}d.append(y,w);}function S(){let y=e.createElement("input");y.className="pptxv-bs-search",y.type="search",y.placeholder=t("pptx.backstage.searchPlaceholder"),y.value=g,y.addEventListener("input",()=>{g=y.value,k();}),d.appendChild(y),u==="open"&&d.appendChild(et(e,t("pptx.backstage.browseDevice"),()=>v(n.openFile),"pptxv-bs-primary"));let w=e.createElement("h2");w.textContent=t("pptx.backstage.recentHeading");let C=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-bs-recent"),A=e.createElement("header");A.replaceChildren(Yi(e,t("pptx.backstage.columnName")),Yi(e,t("pptx.backstage.columnModified")),Yi(e,t("pptx.backstage.columnSize"))),C.appendChild(A);let P=g.trim().toLowerCase(),I=P?x.filter(L=>`${L.name} ${L.location}`.toLowerCase().includes(P)):x;for(let L of I){let D=et(e,"",()=>v(()=>n.openRecentFile(L.key))),R=chunkR2NUNRIB_cjs.Ok(e,"span","name"),F=e.createElement("b");F.textContent="P";let M=e.createElement("span"),O=e.createElement("strong");O.textContent=L.name;let B=e.createElement("small");B.textContent=L.location,M.append(O,B),R.append(F,M);let V=e.createElement("span");V.textContent=chunkR2NUNRIB_cjs.Zi(L.timestamp,Date.now(),t);let z=e.createElement("span");z.textContent=chunkR2NUNRIB_cjs._i(L.size),D.append(R,V,z),C.appendChild(D);}if(!I.length){let L=e.createElement("p");L.textContent=t("pptx.backstage.noRecent"),C.appendChild(L);}d.append(w,C);}function E(){d.appendChild(Nf(e,u,n,m,v,t,r));}function T(){let y=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-bs-card"),w=e.createElement("b");w.appendChild(qt(e,lucide.Settings,24));let C=e.createElement("h2");C.textContent=t("pptx.backstage.optionsTitle");let A=e.createElement("p");A.textContent=t("pptx.backstage.optionsBody"),y.append(w,C,A),y.appendChild(et(e,t("pptx.backstage.openOptions"),()=>v(n.openSettings),"pptxv-bs-primary")),d.appendChild(y);}function k(){b(),d.replaceChildren();let y=e.createElement("h1");y.textContent=t(u==="home"?"pptx.backstage.greeting":chunkR2NUNRIB_cjs.Ui.find(C=>C.id===u)?.labelKey??"pptx.backstage.nav.home"),d.appendChild(y),(u==="home"||u==="new")&&h(),(u==="home"||u==="open")&&S(),["info","saveAs","print","share","export"].includes(u)&&E(),u==="options"&&T(),u==="account"&&Mf(e,t,d,i);let w=e.createElement("footer");w.textContent=`${t("pptx.backstage.untitled")} \xB7 ${t("pptx.backstage.savedToBrowser")}`,d.appendChild(w);}return k(),{el:a,setHasMacros(y){m=y,u==="saveAs"&&k();}}}function zf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=H(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")}),i=H(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),a=H(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});return o.append(r.btn,i.btn,a.btn),o}function _f(e,t,n){let o=oe(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunkR2NUNRIB_cjs.Zg.map(i=>({label:i.label,value:i.shapeType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertActionButton")),o}function Pn(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-select-button"),o=e.createElement("select");o.className="pptxv-select-button-select",o.title=t.selectLabel,o.setAttribute("aria-label",t.selectLabel);for(let[s,p]of t.items.entries()){let l=e.createElement("option");l.value=String(s),l.textContent=p.label,o.appendChild(l);}n.appendChild(o);let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-btn pptxv-btn-pill pptxv-select-button-commit");r.type="button",r.title=t.buttonTitle??t.buttonLabel,r.setAttribute("aria-label",t.buttonLabel),t.icon&&r.appendChild(chunkR2NUNRIB_cjs.Zk(e,t.icon));let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-btn-label");i.textContent=t.buttonLabel,r.appendChild(i),n.appendChild(r);let a=()=>t.items[Number(o.value)]?.value;return r.addEventListener("click",()=>{let s=a();s!==void 0&&t.onCommit(s);}),{el:n,setDisabled(s){r.disabled=s;},value:a}}function Gf(e,t,n){return Pn(e,{selectLabel:t("pptx.ribbon.chartType"),buttonLabel:t("pptx.ribbon.chart"),buttonTitle:t("pptx.ribbon.insertChart"),icon:"chart",items:chunkR2NUNRIB_cjs.ci.map(o=>({label:t(o.labelKey),value:o.id})),onCommit:n})}var NC=[{fieldType:"slidenum",i18nKey:"pptx.field.slideNumber"},{fieldType:"datetime",i18nKey:"pptx.field.dateTime"},{fieldType:"header",i18nKey:"pptx.field.header"},{fieldType:"footer",i18nKey:"pptx.field.footer"}];function Uf(e,t,n){let o=oe(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:NC.map(i=>({label:t(i.i18nKey),value:i.fieldType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.field.insertField")),o}function $f(e,t,n){let o=H(e,{label:t("pptx.hyperlinkDialog.title"),icon:"link",textLabel:t("pptx.hyperlinkDialog.title"),onClick:n});return o.setDisabled(true),o}function Wf(e,t,n){return Pn(e,{selectLabel:t("pptx.insert.shapeType"),buttonLabel:t("pptx.insert.shape"),buttonTitle:t("pptx.insert.addShape"),icon:"shapes",items:chunkR2NUNRIB_cjs.Ai.map(o=>({label:t(o.i18nKey),value:o.type})),onCommit:n})}var An=600,kn=340,Kf=64,VC=["1","2","3"];function zC(e){let t=chunkR2NUNRIB_cjs._g.find(n=>n.layout===e);return {id:`smartart-preview-${e}`,type:"smartArt",x:0,y:0,width:An,height:kn,smartArtData:chunkR2NUNRIB_cjs.ah(e,t?.defaultItems??VC)}}function qf(e,t,n){let o=Kf/An,r=Math.round(kn*o),i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-option-preview",{width:`${Kf}px`,height:`${r}px`,overflow:"hidden",pointerEvents:"none"});i.setAttribute("aria-hidden","true");let a=chunkR2NUNRIB_cjs.Ok(e,"div",void 0,{width:`${An}px`,height:`${kn}px`,transform:`scale(${o})`,transformOrigin:"top left"});i.appendChild(a);let s=zC(n),d={document:e,slide:{id:"smartart-preview",rId:"smartart-preview",slideNumber:1,elements:[s]},canvasSize:{width:An,height:kn},scale:1,mediaDataUrls:new Map,t,smartArt3D:false,surfaceChart3D:false,presenting:false,registry:chunkR2NUNRIB_cjs.Mk(),renderElement:()=>null},u=chunkR2NUNRIB_cjs.Xk(s,0,d);return u&&a.appendChild(u),i}function jf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.smartart.insertTitle")),i.tabIndex=-1;let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-header"),s=chunkR2NUNRIB_cjs.Ok(e,"h2");s.textContent=t("pptx.smartart.insertTitle");let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-close");p.type="button",p.setAttribute("aria-label",t("pptx.smartart.close")),p.textContent="\xD7",a.append(s,p);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-body"),d=chunkR2NUNRIB_cjs.Ok(e,"nav","pptxv-smartart-categories");d.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-gallery"),m=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),u.appendChild(m),l.append(d,u);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-footer"),x=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-cancel");x.type="button",x.textContent=t("pptx.smartart.cancel");let v=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-insert");v.type="button",v.textContent=t("pptx.smartart.insert"),v.disabled=true,g.append(x,v),i.append(a,l,g),o.append(r,i);let f="list",b,h=null;function S(C){b=C,v.disabled=false;for(let A of m.querySelectorAll('[role="option"]')){let P=A.dataset.layout===C.layout;A.setAttribute("aria-selected",String(P)),A.classList.toggle("is-selected",P);}}function E(C){C&&(n(C.layout,C.defaultItems),y());}function T(){m.replaceChildren();for(let C of chunkR2NUNRIB_cjs._g.filter(A=>A.category===f)){let A=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-option");A.type="button",A.dataset.layout=C.layout,A.setAttribute("role","option"),A.setAttribute("aria-selected",String(b?.layout===C.layout)),A.classList.toggle("is-selected",b?.layout===C.layout);let P=qf(e,t,C.layout),I=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-option-label");I.textContent=t(C.labelKey),A.append(P,I),A.addEventListener("click",()=>S(C)),A.addEventListener("dblclick",()=>E(C)),m.appendChild(A);}}function k(C){f=C,b=void 0,v.disabled=true;for(let A of d.querySelectorAll("button")){let P=A.dataset.category===C;A.classList.toggle("is-active",P),A.setAttribute("aria-pressed",String(P));}T();}for(let C of chunkR2NUNRIB_cjs.$g){let A=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-category");A.type="button",A.dataset.category=C.id,A.textContent=t(C.labelKey),A.addEventListener("click",()=>k(C.id)),d.appendChild(A);}k(f);function y(){o.hidden||(o.hidden=true,h?.focus(),h=null);}function w(C){if(C.key==="Escape"){C.preventDefault(),y();return}if(C.key!=="Tab")return;let A=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(A.length===0)return;let P=A[0],I=A[A.length-1];C.shiftKey&&e.activeElement===P?(C.preventDefault(),I.focus()):!C.shiftKey&&e.activeElement===I&&(C.preventDefault(),P.focus());}return r.addEventListener("click",y),p.addEventListener("click",y),x.addEventListener("click",y),v.addEventListener("click",()=>E(b)),o.addEventListener("keydown",w),{el:o,open(C){let A=e.defaultView?.HTMLElement;h=A&&e.activeElement instanceof A?e.activeElement:null,o.parentElement!==C&&C.appendChild(o),o.hidden=false,i.focus();},close:y}}function Yf(e,t,n){let o=jf(e,t,n),r=H(e,{label:t("pptx.ribbon.smartArt"),icon:"smart-art",onClick:()=>{let i=r.btn.closest(".pptxv")??e.body;o.open(i);}});return r.btn.title=t("pptx.ribbon.insertSmartArt"),{el:r.btn,setDisabled(i){r.setDisabled(i),i&&o.close();}}}function Xf(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content");a.classList.add("pptxv-ribbon-insert-content");let s=H(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),p=Wf(e,t,E=>n.insert("shape",E)),l=H(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),d=H(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});d.btn.title=t("pptx.ribbon.insertMedia");let u=H(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),m=Gf(e,t,E=>n.insertChart(E)),g=Yf(e,t,(E,T)=>n.insertSmartArt(E,T)),x=H(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});x.btn.title=t("pptx.insert.insertEquation");let v=_f(e,t,E=>n.insertActionButton(E)),f=Uf(e,t,E=>n.insertField(E)),b=$f(e,t,i),h=H(e,{label:t("pptx.headerFooter.title"),icon:"field",textLabel:t("pptx.headerFooter.title"),onClick:r});a.append(s.btn,p.el,l.btn,d.btn,u.btn,m.el,g.el,x.btn,v.el,f.el,b.btn,h.btn);let S=[s,p,l,d,u,m,g,x,v,f,h];return {el:a,setEditable(E){for(let T of S)T.setDisabled(!E);},setHasSelection(E){b.setDisabled(!E);}}}function Zf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=l=>{let d=H(e,{label:t(l),text:t(l),onClick:()=>{}});return d.setDisabled(true),d.btn},a=i("pptx.record.cameo"),s=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),p=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,a,s.btn,p.btn,i("pptx.record.clear"),i("pptx.record.resetToCameo"),i("pptx.record.learnMore")),o}function Qf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=(m,g)=>H(e,{label:t(m),text:t(m),onClick:g}).btn,i=m=>{let g=H(e,{label:t(m),text:t(m),onClick:()=>{}});return g.setDisabled(true),g.btn},a=r("pptx.review.spelling",n.toggleSpellCheck);a.title=t("pptx.review.toggleSpellCheck");let s=H(e,{label:t("pptx.review.accessibilityCheck"),text:t("pptx.review.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});s.btn.title=t("pptx.review.accessibilityCheckTooltip");let p=r("pptx.review.language",()=>n.openSettings("general"));p.title=t("pptx.review.languageTooltip");let l=H(e,{label:t("pptx.ribbon.compare"),text:t("pptx.ribbon.compare"),onClick:n.openCompare});l.btn.title=t("pptx.ribbon.compareTitle");let d=r("pptx.toolbar.comments",n.openComments);d.title=t("pptx.review.toggleComments");let u=r("pptx.review.showComments",n.openComments);return o.append(a,i("pptx.review.thesaurus"),s.btn,i("pptx.review.translate"),p,i("pptx.review.markAllRead"),l.btn,d,i("pptx.common.delete"),i("pptx.common.previous"),i("pptx.common.next"),u,i("pptx.review.readOnly"),i("pptx.review.restrictPermission"),i("pptx.review.hideInk")),{el:o,setEditable:m=>l.setDisabled(!m)}}function _C(e,t,n,o){let r=t(n.labelKey),i=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-show-option"),a=e.createElement("input");return a.type="checkbox",a.disabled=n.unsupported,a.setAttribute("aria-label",r),n.unsupported||a.addEventListener("change",()=>{let s=chunkR2NUNRIB_cjs.oe(n.id,a.checked);s&&o.updateShowOptions(s);}),i.append(a,e.createTextNode(r)),{el:i,descriptor:n,input:a}}function Jf(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning});i.btn.title=t("pptx.slideShow.fromBeginningTooltip");let a=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent});a.btn.title=t("pptx.slideShow.fromCurrentTooltip");let s=H(e,{label:t("pptx.slideShow.presenterView"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView});s.btn.title=t("pptx.slideShow.presenterViewTooltip");let p=H(e,{label:t("pptx.slideShow.customShow"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),l=chunkR2NUNRIB_cjs.Qj("broadcast",o)?null:H(e,{label:t("pptx.slideShow.broadcast"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast});l&&(l.btn.title=t("pptx.slideShow.broadcastTooltip"));let d=H(e,{label:t("pptx.slideShow.rehearseCoach"),text:t("pptx.slideShow.rehearseCoach"),onClick:()=>{}});d.setDisabled(true);let u=H(e,{label:t("pptx.slideShow.setUp"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp});u.btn.title=t("pptx.slideShow.setUpTooltip");let m=H(e,{label:t("pptx.slideShow.hideSlide"),text:t("pptx.slideShow.hideSlide"),onClick:()=>n.toggleHideSlide()});m.btn.setAttribute("aria-pressed","false");let g=H(e,{label:t("pptx.slideShow.rehearseTimings"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal});g.btn.title=t("pptx.slideShow.rehearseTimingsTooltip");let x=H(e,{label:t("pptx.titleBar.record"),text:t("pptx.titleBar.record"),onClick:n.startRehearsal}),v=H(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles});v.btn.title=t("pptx.slideShow.subtitlesTooltip");let f=H(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings}),b=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-show-options"),h=chunkR2NUNRIB_cjs.me.map(E=>_C(e,t,E,n));b.append(...h.map(E=>E.el));let S=()=>{let E=n.showOptions();for(let T of h)T.input.checked=T.descriptor.unsupported?false:chunkR2NUNRIB_cjs.ne(E,T.descriptor.id);};return S(),r.append(i.btn,a.btn,s.btn,p.btn,...l?[l.btn]:[],d.btn,u.btn,m.btn,g.btn,x.btn,b,v.btn,f.btn),{el:r,syncOptions:S,setSubtitlesVisible:E=>v.setActive(E),setHideSlideActive:E=>{m.setActive(E),m.btn.setAttribute("aria-pressed",String(E));}}}function eh(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-advance"),r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.ribbon.advanceSlide"),o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-transition-advance-row"),a=e.createElement("input");a.type="checkbox",a.checked=true,a.setAttribute("aria-label",t("pptx.ribbon.onMouseClick")),i.append(a,e.createTextNode(t("pptx.ribbon.onMouseClick")));let s=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-transition-advance-row"),p=e.createElement("input");p.type="checkbox",p.setAttribute("aria-label",t("pptx.ribbon.afterDuration"));let l=e.createElement("input");l.type="text",l.className="pptxv-transition-advance-seconds",l.value=chunkR2NUNRIB_cjs.he,l.disabled=true,l.title=t("pptx.ribbon.advanceAfterSeconds"),l.setAttribute("aria-label",t("pptx.ribbon.advanceAfterSeconds")),s.append(p,e.createTextNode(t("pptx.ribbon.afterDuration")),l);let d=()=>({advanceOnClick:a.checked,advanceAfter:p.checked,advanceAfterText:l.value}),u=false,m=()=>{l.disabled=u||!p.checked;};return a.addEventListener("change",()=>n(d())),p.addEventListener("change",()=>{m(),n(d());}),l.addEventListener("change",()=>n(d())),l.addEventListener("keydown",g=>g.stopPropagation()),o.append(i,s),{el:o,setValue(g){a.checked=g.advanceOnClick,p.checked=g.advanceAfter,e.activeElement!==l&&(l.value=g.advanceAfterText),m();},setDisabled(g){u=g,a.disabled=g,p.disabled=g,m();}}}function GC(e,t){return e.type===t.type&&e.durationSec===t.durationSec&&e.advanceOnClick===t.advanceOnClick&&e.advanceAfter===t.advanceAfter&&e.advanceAfterText===t.advanceAfterText}function th(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i=n.readDraft()??{...chunkR2NUNRIB_cjs.ie},a=H(e,{label:t("pptx.ribbon.preview"),icon:"play",textLabel:t("pptx.ribbon.preview"),onClick:()=>chunkR2NUNRIB_cjs.se(chunkR2NUNRIB_cjs.ke(void 0,i),e)});a.btn.title=t("pptx.ribbon.previewTransition"),r.appendChild(a.btn);let s=H(e,{label:t("pptx.headerFooter.applyToAll"),icon:"copy",textLabel:t("pptx.headerFooter.applyToAll"),onClick:()=>n.applyDraft(i,true)});s.btn.title=t("pptx.ribbon.applyTransitionToAll");function p(){for(let S of m)S.handle.setActive(S.type===i.type);}let l=S=>{i={...i,...S},p(),n.applyDraft(i,false);},d=eh(e,t,S=>l(S)),u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-gallery"),m=chunkR2NUNRIB_cjs.ge.map(S=>{let E=H(e,{label:t(S.labelKey),text:t(S.labelKey),onClick:()=>l({type:S.type})});return u.appendChild(E.btn),{type:S.type,handle:E}});r.appendChild(u);let g=j(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:S=>l({durationSec:Math.max(0,S)})});g.setValue(i.durationSec),g.input.title=t("pptx.ribbon.transitionDurationTitle"),r.appendChild(g.el);let x=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-transition-sound"),v=e.createElement("select");v.setAttribute("aria-label",t("pptx.ribbon.sound")),v.disabled=true;let f=e.createElement("option");f.value="none",f.textContent=t("pptx.ribbon.soundNone"),v.appendChild(f),x.append(e.createTextNode(t("pptx.ribbon.sound")),v),r.appendChild(x),r.appendChild(s.btn),r.appendChild(d.el);let b=H(e,{label:t("pptx.ribbon.inspector"),icon:"panel-right",textLabel:t("pptx.ribbon.inspector"),onClick:o});b.btn.title=t("pptx.ribbon.openInspectorTransitions"),r.appendChild(b.btn);let h=()=>{p(),g.setValue(i.durationSec),d.setValue(i);};return h(),{el:r,sync(){let S=n.readDraft()??chunkR2NUNRIB_cjs.ie;GC(S,i)||(i=S,h());},setEditable(S){for(let E of m)E.handle.setDisabled(!S);g.setDisabled(!S),s.setDisabled(!S),d.setDisabled(!S);}}}function oh(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i=(w,C)=>H(e,{label:t(w),text:t(w),onClick:C}),a=w=>{let C=i(w,()=>{});return C.setDisabled(true),C.btn},s=i("pptx.view.normal",n.normalView);s.btn.title=t("pptx.statusBar.normalView");let p=i("pptx.slideSorter.title",n.openSlideSorter);p.btn.title=t("pptx.view.slideSorterTooltip");let l=i("pptx.view.outlineView",n.openOutlineView);l.btn.title=t("pptx.view.outlineViewTooltip");let d=i("pptx.view.readingView",n.openReadingView),u=i("pptx.master.title",()=>n.toggleMasterView?.());u.btn.title=t("pptx.view.slideMasterTooltip");let m=i("pptx.ruler.rulers",()=>n.toggleViewOption("showRulers")),g=i("pptx.grid.grid",()=>n.toggleViewOption("showGrid")),x=i("pptx.view.guides",()=>n.toggleViewOption("showGuides"));x.btn.title=t("pptx.ribbon.toggleGuides");let v=i("pptx.view.snapToGrid",()=>n.toggleViewOption("snapToGrid")),f=i("pptx.view.snapToShape",()=>n.toggleViewOption("snapToShape")),b=i("pptx.view.selection",n.openSelectionPane);b.btn.title=t("pptx.selectionPane.title");let h=i("pptx.ribbon.eyedropper",n.activateEyedropper);h.btn.title=t("pptx.view.eyedropperTooltip");let S=i("pptx.view.hGuide",()=>n.addGuide("h"));S.btn.title=t("pptx.view.addHorizontalGuide");let E=i("pptx.view.vGuide",()=>n.addGuide("v"));E.btn.title=t("pptx.view.addVerticalGuide");let T=!chunkR2NUNRIB_cjs.Qj("zoom",o),k=T?i("pptx.view.zoomToFit",n.zoomToFit):null;k&&(k.btn.title=t("pptx.view.zoomToFitTooltip"));let y=i("pptx.ribbon.templatesOff",()=>n.toggleTemplateEditing?.());return y.btn.dataset.testid="template-edit-toggle",y.btn.title=t("pptx.view.templateEditingTooltip"),r.append(s.btn,p.btn,l.btn,d.btn,u.btn,a("pptx.master.handoutMasterTitle"),a("pptx.master.notesMasterTitle"),m.btn,g.btn,x.btn,v.btn,b.btn,h.btn,f.btn,S.btn,E.btn,...T?[a("pptx.slideSorter.zoom"),k?.btn??[]].flat():[],y.btn,a("pptx.view.macros")),{el:r,setEditable(w){y.setDisabled(!w),u.setDisabled(!w),h.setDisabled(!w);},setViewOptions(w){m.setActive(w.showRulers),g.setActive(w.showGrid),x.setActive(w.showGuides),v.setActive(w.snapToGrid),f.setActive(w.snapToShape);},setTemplateEditing(w){let C=t(w?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");y.btn.textContent=C,y.btn.title=t("pptx.view.templateEditingTooltip"),y.btn.setAttribute("aria-label",C),y.setActive(w);}}}function In(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let a=ff(e,t,n,o);i.append(a.el);let s=qi(e,t,N=>D(N),o,{startRecording:()=>n.slideShow.startRehearsal()});s.el.hidden=true,i.appendChild(s.el);let p=Ri(e,t,n.findReplace);i.appendChild(p.el);let l=jv(e,t,(N,_)=>_?n.edit.updateEquation(_,N):n.insert.insertEquation(N));i.appendChild(l.el);let d=Yv(e,t,n.edit);i.appendChild(d.el);let u=N=>chunkR2NUNRIB_cjs.Qj(N,o),m=u("file")?null:Vf(e,t,n.file,()=>D("home"),o,r),g=u("home")?null:gf(e,t,{edit:n.edit,onToggleFindReplace:()=>p.toggle()}),x=u("insert")?null:Xf(e,t,n.insert,()=>l.toggle(),()=>n.nav.openHeaderFooter(),()=>n.nav.openHyperlink()),v=u("draw")?null:Lf(e,t,n.draw),f=false,b=()=>n.nav.toggleInspector?.(),h=()=>{n.nav.clearSelection?.(),f||b();},S=u("design")?null:kf(e,t,n.design,()=>d.toggle(),h),E=u("transitions")?null:th(e,t,n.transitions,b),T=u("animations")?null:Tf(e,t,n.edit,b),k=u("slideShow")?null:Jf(e,t,n.slideShow,o),y=u("record")?null:Zf(e,t,n.slideShow),w=u("review")?null:Qf(e,t,n.nav),C=u("view")?null:oh(e,t,n.nav,o),A=u("help")?null:zf(e,t,n.nav),P={file:m?.el,home:g?.el,insert:x?.el,draw:v?.el,design:S?.el,transitions:E?.el,animations:T?.el,slideShow:k?.el,record:y??void 0,review:w?.el,view:C?.el,help:A??void 0},I=chunkR2NUNRIB_cjs.Rj($t,o);for(let N of I){let _=P[N.id];_&&(_.hidden=true,i.appendChild(_));}let L=I.find(N=>N.id===Tn)?.id??I[0]?.id??Tn;function D(N){if(P[N]){L=N,s.setActive(N);for(let _ of Object.keys(P)){let K=P[_];K&&(K.hidden=_!==N);}}}D(L);let R,F={hasClipboard:false,slideCount:0,selectedCount:0},M=()=>{g?.update({editable:B,selectedElement:R,hasClipboard:F.hasClipboard,formatPainterActive:F.formatPainterActive??false,slideCount:F.slideCount,selectedCount:F.selectedCount??0,layouts:F.layouts??[],layoutPreviews:F.layoutPreviews,currentLayoutPath:F.currentLayoutPath,themeFonts:F.themeFonts,embeddedFontFamilies:F.embeddedFontFamilies,customFontFamilies:F.customFontFamilies});},O=()=>{T?.update({editable:B,hasSelection:R!==void 0,selectedElementId:F.selectedElementId,animations:F.animations??[]});},B=false,V=new Set;return {el:i,update(){},setEditState(N){a.setEditState(N),s.el.hidden=!N.editable;},setNotesExpanded(){},setAutosaveStatus:(N,_)=>a.setAutosaveStatus(N,_),setEditable(N){B=N,w?.setEditable(N),C?.setEditable(N),x?.setEditable(N),v?.setEditable(N),p.setEditable(N),l.setEditable(N),d.setEditable(N),S?.setEditable(N),E?.setEditable(N),E?.sync(),k?.syncOptions(),M(),O();},setDrawState:N=>v?.update(N),setTemplateEditing:N=>C?.setTemplateEditing(N),setViewOptions:N=>C?.setViewOptions(N),setHasMacros:N=>m?.setHasMacros(N),setSubtitlesVisible:N=>k?.setSubtitlesVisible(N),setHideSlideActive:N=>k?.setHideSlideActive(N),setInspectorOpen:N=>{f=N,a.setInspectorOpen(N);},toggleFindReplace:()=>p.toggle(),openEquationEditor:(N,_)=>l.openEdit(N,_),setHiddenOptionTabs:N=>{if(V=new Set(N.filter(_=>_!=="file")),s.setHiddenTabs(V),V.has(L)){let _=V.has("home")?I.find(K=>!V.has(K.id))?.id:"home";_&&D(_);}},applyScreenTips:N=>s.applyScreenTips(N),updateSelection(N,_){R=N,F=_,x?.setHasSelection(N!==void 0),M(),O();}}}function Xi(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-shortcuts-panel");n.hidden=true,n.dataset.pptxShortcutsPanel="true",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false"),n.setAttribute("aria-label",t("pptx.shortcuts.title"));let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-shortcuts-header"),r=chunkR2NUNRIB_cjs.Ok(e,"h2","pptxv-shortcuts-title");r.textContent=t("pptx.shortcuts.title");let i=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-shortcuts-close");i.type="button",i.textContent=t("pptx.shortcuts.close"),i.setAttribute("aria-label",t("pptx.common.close")),o.append(r,i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-shortcuts-list");for(let p of chunkR2NUNRIB_cjs.qj){let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-shortcuts-row"),d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-shortcuts-action");d.textContent=t(p.actionKey);let u=chunkR2NUNRIB_cjs.Ok(e,"kbd","pptxv-shortcuts-keys");u.textContent=p.shortcut,l.append(d,u),a.appendChild(l);}n.append(o,a);let s=()=>{n.hidden=true;};return i.addEventListener("click",s),{el:n,toggle(){n.hidden=!n.hidden;},close:s,isOpen:()=>!n.hidden}}function nh(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-statusbar"),a=()=>{let w=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-sep");return w.setAttribute("aria-hidden","true"),w},s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-counter");s.setAttribute("aria-live","polite");let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-text");p.textContent=t("pptx.statusBar.language");let l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(s,a(),p,a(),l),i.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-spacer"));let d=false,u="",m="idle",g=()=>{l.textContent=u.length>0?u:t(d?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),l.classList.toggle("is-saving",m==="saving"),l.classList.toggle("is-error",m==="error");};g();let x=!chunkR2NUNRIB_cjs.Qj("notes",o),v=!chunkR2NUNRIB_cjs.Qj("fullscreen",o),f=!chunkR2NUNRIB_cjs.Qj("zoom",o),b=null;if(x){b=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),b.type="button",b.title=t("pptx.statusBar.toggleNotes"),b.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),b.setAttribute("aria-pressed","false"),b.setAttribute("data-pptx-compact",""),b.appendChild(UC(e,"sticky-note"));let w=chunkR2NUNRIB_cjs.Ok(e,"span");w.textContent=t("pptx.notes.title"),b.appendChild(w),b.addEventListener("click",n.toggleNotes);}let h=H(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});h.btn.setAttribute("data-pptx-compact","");let S=H(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});S.btn.setAttribute("data-pptx-compact","");let E=v?H(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;E?.btn.setAttribute("data-pptx-compact","");let T=null,k=null,y=null;return f&&(T=H(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),T.btn.setAttribute("data-pptx-compact",""),k=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-statusbar-zoom"),k.type="button",k.title=t("pptx.statusBar.zoomToFit"),k.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),k.setAttribute("data-pptx-compact",""),k.addEventListener("click",n.zoomToFit),y=H(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),y.btn.setAttribute("data-pptx-compact","")),i.append(...b?[b]:[],a(),h.btn,S.btn,...E?[E.btn]:[],...[],a(),...T&&k&&y?[T.btn,k,y.btn]:[]),{el:i,update({current:w,total:C,zoomPercent:A}){s.textContent=C>0?t("pptx.statusBar.slideOf",{current:w+1,total:C}):t("pptx.statusBar.noSlides"),k&&(k.textContent=`${Math.round(A)}%`);},setNotesExpanded(w){b?.setAttribute("aria-pressed",String(w)),b?.classList.toggle("is-active",w);},setSaveStatus(w,C){u=w,m=C,g();},setDirty(w){d=w,g();},setPresenting(w){h.btn.classList.toggle("is-active",!w),E?.btn.classList.toggle("is-active",w);}}}function UC(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-icon");return n.appendChild($C(e,t)),n}function $C(e,t){return chunkR2NUNRIB_cjs.Zk(e,t)}function rh(e){let{doc:t,t:n,actions:o}=e,r=chunkR2NUNRIB_cjs.tc(e.sections,e.slides);return r.map((i,a)=>{let s=chunkR2NUNRIB_cjs.Ok(t,"section","pptxv-thumb-section"),p=chunkR2NUNRIB_cjs.Ok(t,"header","pptxv-thumb-section-header"),l=chunkR2NUNRIB_cjs.Ok(t,"button","pptxv-thumb-section-toggle");if(l.type="button",l.setAttribute("aria-expanded",String(!i.section?.collapsed)),l.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(s.dataset.sectionId=i.section.id,l.addEventListener("click",()=>o?.toggle(i.section.id))),i.section?.color){let d=chunkR2NUNRIB_cjs.Ok(t,"span","pptxv-thumb-section-color");d.dataset.pptxSectionColor=i.section.color,d.style.background=i.section.color,p.appendChild(d);}if(p.appendChild(l),i.section&&o){let d=chunkR2NUNRIB_cjs.Ok(t,"span","pptxv-thumb-section-actions"),u=(m,g,x,v=false)=>{let f=chunkR2NUNRIB_cjs.Ok(t,"button");f.type="button",f.setAttribute("data-pptx-compact",""),f.title=m,f.setAttribute("aria-label",m),f.textContent=g,f.disabled=v,f.addEventListener("click",x),d.appendChild(f);};u(n("pptx.sections.rename"),"\u270E",()=>{let m=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);m!=null&&o.rename(i.section.id,m);}),u(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),a===0),u(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),a===r.length-1),u(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),p.appendChild(d);}if(s.appendChild(p),!i.section?.collapsed){let d=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-thumb-section-slides");i.slides.forEach((u,m)=>d.appendChild(e.buildSlide(u,i.slideIndexes[m]))),s.appendChild(d);}return s})}var jt=128;function Zi(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-thumbs");r.setAttribute("role","navigation"),r.setAttribute("aria-label",t("pptx.sections.slides"));let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-list");r.appendChild(i);let a=null,s=false,p=false,l=()=>{a&&(a.hidden=!s||p);};if(o){a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-footer"),a.hidden=true;let T=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-thumbs-add");T.type="button",T.appendChild(chunkR2NUNRIB_cjs.Zk(e,"plus")),T.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),T.addEventListener("click",()=>o()),a.appendChild(T),r.appendChild(a);}let d=new Map,u=0,m=[],g={width:1,height:1},x=null,v=[],f,b=1,h=false,S=(T,k,y)=>{let w=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-thumb");w.type="button",w.dataset.slideIndex=String(k),w.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:k+1}));let C=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-num");C.textContent=String(k+1);let A=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-frame",{display:"block",width:`${jt}px`,height:`${Math.round(g.height*y)}px`});A.appendChild(x(T,y)),w.append(C,A);let P=chunkR2NUNRIB_cjs.Ej(T.hidden,"rail",k);if(P.marker&&P.labelId){w.setAttribute(chunkR2NUNRIB_cjs.Aj,P.marker),w.setAttribute("aria-describedby",P.labelId);let I=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-hidden");I.id=P.labelId,I.appendChild(chunkR2NUNRIB_cjs.Zk(e,"eye-off"));let L=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-sr-only");L.textContent=t(chunkR2NUNRIB_cjs.Bj),I.appendChild(L),A.appendChild(I);}return w.addEventListener("click",()=>n(k)),d.set(k,w),w},E=()=>{if(!x)return;d=new Map;let T=jt/Math.max(g.width,1);if(v.length>0){i.replaceChildren(...rh({doc:e,t,sections:v,slides:m,actions:f,buildSlide:(A,P)=>S(A,P,T)})),d.get(u)?.classList.add("is-active");return}let k=h?chunkR2NUNRIB_cjs.ij(m.length,b,i.scrollTop,i.clientHeight||600):chunkR2NUNRIB_cjs.ij(m.length,b,0,m.length*b,0),y=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});h&&(y.style.position="absolute",y.style.insetInline="0",y.style.top=`${k.offsetY}px`);for(let A=k.startIndex;A<=k.endIndex;A+=1){let P=m[A];P&&y.appendChild(S(P,A,T));}let w=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-space",{position:"relative",height:h?`${k.totalHeight}px`:"auto"});h&&(w.dataset.virtualized="true"),w.appendChild(y),i.replaceChildren(w);let C=d.get(u);C?.classList.add("is-active"),C?.setAttribute("aria-current","page");};return i.addEventListener("scroll",()=>{h&&E();}),{el:r,render(T,k,y,w,C){p=false,l(),m=T,g=k,x=y,v=w??[],f=C;let A=jt/Math.max(k.width,1);b=Math.round(k.height*A)+8,h=!w?.length&&T.length>=chunkR2NUNRIB_cjs.hj,r.classList.toggle("pptxv-thumbs-virtualized",h),E(),this.setActive(u);},setActive(T){if(u=T,h){let y=T*b,w=y+b,C=i.clientHeight||600;y<i.scrollTop?i.scrollTop=y:w>i.scrollTop+C&&(i.scrollTop=Math.max(0,w-C)),E();}d.forEach((y,w)=>{y.classList.toggle("is-active",w===T),w===T?y.setAttribute("aria-current","page"):y.removeAttribute("aria-current");});let k=d.get(T);k&&typeof k.scrollIntoView=="function"&&k.scrollIntoView({block:"nearest"});},setVisible(T){r.hidden=!T;},setAddSlideVisible(T){s=T,l();},renderMasters(T,k,y,w,C){p=true,l(),i.replaceChildren(),d=new Map,h=false,r.classList.remove("pptxv-thumbs-virtualized");let A=jt/Math.max(k.width,1),P=(I,L,D,R)=>{let F=chunkR2NUNRIB_cjs.Ok(e,"button",`pptxv-thumb${R===null?"":" pptxv-master-layout"}`);F.type="button",F.setAttribute("aria-label",L),F.classList.toggle("is-active",C.masterIndex===D&&C.layoutIndex===R),C.masterIndex===D&&C.layoutIndex===R&&F.setAttribute("aria-current","page");let M=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-num");M.textContent=L;let O=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-frame",{display:"block",width:`${jt}px`,height:`${Math.round(k.height*A)}px`});O.appendChild(y(I,A)),F.append(M,O),F.addEventListener("click",()=>w(D,R)),i.appendChild(F);};T.forEach((I,L)=>{P({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),L,null),I.layouts?.forEach((D,R)=>P({id:D.path,rId:"",slideNumber:0,elements:[...I.elements??[],...D.elements??[]],backgroundColor:D.backgroundColor??I.backgroundColor,backgroundImage:D.backgroundImage??I.backgroundImage},D.name||t("pptx.master.layout"),L,R));});}}}function WC(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function ih(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch-box");r.appendChild(chunkR2NUNRIB_cjs.Zk(e,"search"));let i=e.createElement("input");i.type="text",i.className="pptxv-cmdsearch-input",i.placeholder=t("pptx.titleBar.searchPlaceholder"),i.setAttribute("aria-label",t("pptx.titleBar.search")),r.appendChild(i),o.appendChild(r);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch-menu");a.hidden=true,o.appendChild(a);let s=()=>{a.hidden=true,a.replaceChildren();},p=u=>{i.value="",s(),u.run();},l=[],d=()=>{if(l=WC(i.value,n,t),i.value.trim().length===0){s();return}if(a.replaceChildren(),l.length===0){let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch-empty");u.textContent=t("pptx.titleBar.searchNoResults"),a.appendChild(u);}for(let u of l){let m=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-cmdsearch-item");m.type="button",m.textContent=t(u.labelKey),m.addEventListener("mousedown",g=>{g.preventDefault(),p(u);}),a.appendChild(m);}a.hidden=false;};return i.addEventListener("input",d),i.addEventListener("focus",d),i.addEventListener("blur",s),i.addEventListener("keydown",u=>{u.stopPropagation(),u.key==="Enter"&&l.length>0?p(l[0]):u.key==="Escape"&&(i.value="",s());}),{el:o}}var KC={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function ah(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-autosave"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-autosave-label");s.textContent=t("pptx.titleBar.autoSave");let p=n.autosaveToggleAvailable??true,l=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-titlebar-switch");l.type="button",l.setAttribute("role","switch"),l.title=t(p?"pptx.titleBar.toggleAutoSave":"pptx.autosave.disabledByHost"),l.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),p||(l.disabled=true,l.classList.add("is-disabled")),l.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-switch-knob"));let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-autosave-label");a.append(s,l,d),o.appendChild(a);let u=()=>{l.classList.toggle("is-on",i),l.setAttribute("aria-checked",String(i)),d.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};l.addEventListener("click",()=>{p&&(i=n.onToggleAutosave(),u(),A());});let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-sep");o.appendChild(m);let g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-qat");o.appendChild(g);let x=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-sep");o.appendChild(x);let v={editable:true,canUndo:false,canRedo:false},f=null,b=null,h=I=>{I==="save"?n.save():I==="undo"?n.undo():I==="redo"?n.redo():n.quickAccess?.run(I);},S=()=>{g.replaceChildren(),f=null,b=null;let I=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};g.hidden=!I.visible||!v.editable;for(let L of I.commandIds){if((L==="undo"||L==="redo")&&chunkR2NUNRIB_cjs.Qj(L,n.hiddenActions))continue;let D=chunkR2NUNRIB_cjs.Tj.find(O=>O.id===L);if(!D)continue;let R=t(D.labelKey),F=KC[D.icon],M=H(e,{label:R,icon:F,text:F===void 0?"Ab":void 0,textLabel:I.showCommandLabels?R:void 0,className:"pptxv-titlebar-btn",onClick:()=>h(L)});if(n.quickAccess){let O=n.quickAccess.screenTip(R);O===void 0?M.btn.removeAttribute("title"):M.btn.title=O;}L==="undo"?(f=M,M.setDisabled(!v.canUndo)):L==="redo"&&(b=M,M.setDisabled(!v.canRedo)),g.appendChild(M.btn);}},E=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-file"),T=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-filename");T.textContent=n.fileName||t(chunkR2NUNRIB_cjs.Oi);let k=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-dot");k.textContent="\u2022",k.setAttribute("aria-hidden","true");let y=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-status");E.append(T,k,y),o.appendChild(E);let w="idle",C=false,A=()=>{y.textContent=t(chunkR2NUNRIB_cjs.Ni({autosaveState:w,isDirty:C,autosaveEnabled:i})),y.classList.toggle("is-error",i&&w==="error"),y.classList.toggle("is-saving",i&&w==="saving");},P=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-search");return P.appendChild(ih(e,t,n.commands).el),o.appendChild(P),o.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-spacer")),u(),A(),S(),{el:o,setEditState(I){v=I;for(let D of [a,m,x])D.hidden=!I.editable;let L=n.quickAccess?.getState();g.hidden=!I.editable||L?.visible===false,k.hidden=!I.editable,y.hidden=!I.editable,P.hidden=!I.editable,f?.setDisabled(!I.canUndo),b?.setDisabled(!I.canRedo);},setAutosaveState(I){w=I,A();},setDirty(I){C=I,A();},setAutosaveEnabled(I){i=I,u(),A();},refreshQuickAccess:S}}function Qi(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv");o.tabIndex=0,o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.titleBar.defaultFileName")),o.setAttribute("aria-busy","false"),o.classList.toggle("pptxv-editable",n.editable);let r=null,i=null;n.showToolbar&&(r=ah(e,t,n.titleBar),o.appendChild(r.el),i=In(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el));let a=null,s=n.showToolbar?Li(e,t,{openMenu:()=>a?.toggle("menu"),undo:n.ribbonHandlers.primary.undo,redo:n.ribbonHandlers.primary.redo,save:n.ribbonHandlers.file.save,present:n.ribbonHandlers.slideShow.startFromCurrent},n.hiddenActions):null;s&&(s.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(s.el));let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-body");o.appendChild(p);let l=pi(e,t,n.onSelectSlide);o.appendChild(l.el);let d=Xi(e,t);o.appendChild(d.el);let u=ki(e,t);p.appendChild(u.el);let m=null;n.showThumbnails&&(m=Zi(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide()),p.appendChild(m.el));let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-viewport");g.setAttribute("data-pptx-viewport",""),p.appendChild(g);let x=null;n.showInspector&&(x=wn(e,t,n.inspectorHandlers),x.setEditable(n.editable),p.appendChild(x.el));let v=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-stage-wrap");g.appendChild(v);let f=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-empty");f.textContent=t("pptx.statusBar.noSlides"),f.hidden=true,g.appendChild(f);let b=Di(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(b.el);let h=n.showToolbar?nh(e,t,{toggleNotes:n.ribbonHandlers.nav.toggleNotes,normalView:n.ribbonHandlers.nav.normalView,openSlideSorter:n.ribbonHandlers.nav.openSlideSorter,togglePresentation:n.ribbonHandlers.nav.togglePresentation,zoomIn:n.ribbonHandlers.nav.zoomIn,zoomOut:n.ribbonHandlers.nav.zoomOut,zoomToFit:n.ribbonHandlers.nav.zoomToFit},n.hiddenActions):null;h&&o.appendChild(h.el),a=n.showToolbar?Ii(e,t,n.ribbonHandlers,n.onSelectSlide,x?.el??null,n.hiddenActions):null,a&&(a.setEditable(n.editable),o.appendChild(a.el));let S=Hi(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);S.update(0,0),o.appendChild(S.el);let E=Mi(e,t,o,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,end:n.ribbonHandlers.nav.togglePresentation,...n.presentationToolbarHandlers});o.appendChild(E.el);let T=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-overlay pptxv-loading");T.textContent=t("pptx.common.loading"),T.setAttribute("role","status"),T.setAttribute("aria-live","polite"),T.hidden=true,o.appendChild(T);let k=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-overlay pptxv-error");k.setAttribute("role","alert");let y=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-error-message");return k.appendChild(y),k.hidden=true,o.appendChild(k),{root:o,ribbon:i,titleBar:r,inspector:x,accessibility:l,shortcuts:d,masterSidebar:u,thumbnails:m,viewport:g,stageWrap:v,notes:b,statusBar:h,mobileToolbar:s,mobileActionSheets:a,presentationTouchControls:S,presentationToolbar:E,setLoading(w){T.hidden=!w,o.setAttribute("aria-busy",String(w));},setError(w){k.hidden=w===null,y.textContent=w??"";},setEmpty(w){f.hidden=!w,v.hidden=w;},setPresenting(w){o.classList.toggle("pptxv-presenting",w),E.setPresenting(w);}}}function sh(e){return e.masterViewTarget?{document:{slideMasters:e.slideMasters,notesMaster:e.notesMaster,handoutMaster:e.handoutMaster},target:{tab:e.masterViewTab,masterIndex:e.masterViewTarget.masterIndex,layoutIndex:e.masterViewTarget.layoutIndex}}:null}function G(e){let t=sh(e);if(t)return chunkR2NUNRIB_cjs.ej(t.document,t.target);let n=e.slides[e.currentSlide];return n?e.editTemplateMode?e.templateElementsBySlideId[n.id]??[]:n.elements:[]}function X(e,t){let n=sh(e);if(n){let r=chunkR2NUNRIB_cjs.fj(n.document,n.target,t);return r?.slideMasters?{slideMasters:r.slideMasters}:r?.notesMaster?{notesMaster:r.notesMaster}:r?.handoutMaster?{handoutMaster:r.handoutMaster}:{slideMasters:e.slideMasters}}let o=e.slides[e.currentSlide];return o?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[o.id]:t}}:{slides:e.slides.map((r,i)=>i===e.currentSlide?{...r,elements:t}:r)}:{slides:e.slides}}function Z(e,t){return G(e).find(n=>n.id===t)}function Ln(e){let t=e instanceof Element?e.closest("td"):null;if(!t||t.dataset.rowIndex===void 0||t.dataset.cellIndex===void 0)return null;let n={row:Number(t.dataset.rowIndex),column:Number(t.dataset.cellIndex)};return Number.isFinite(n.row)&&Number.isFinite(n.column)?n:null}function Ji(e,t,n){if(t?.type!=="table"||!t.tableData)return null;let o=Ln(n)??e.selectedTableCell;if(!o)return null;let r=t.tableData.rows[o.row]?.cells[o.column];return {cell:o,context:{hasMultiCellSelection:e.selectedTableCells.length>1,isMergedCell:(r?.gridSpan??1)>1||(r?.rowSpan??1)>1}}}function ph(e,t,n){e.mergeTableCells([t,n==="right"?{row:t.row,column:t.column+1}:{row:t.row+1,column:t.column}]);}function ea(e,t,n){let o=t.getEditActions(),r=n?.cell??null;switch(e){case "copy":return o.copy();case "cut":return o.cut();case "paste":return o.paste();case "duplicate":return o.duplicateSelected();case "delete":return o.deleteSelected();case "bring-forward":return o.bringForward();case "send-backward":return o.sendBackward();case "bring-front":return o.bringToFront();case "send-back":return o.sendToBack();case "group":return o.groupSelected();case "ungroup":return o.ungroupSelected();case "comment":return t.openComments();case "hyperlink":return t.openHyperlink();case "ai-ask":return t.getAi()?.askAboutSelection();case "ai-fix":return qC(t);case "table-insert-row-above":return r?o.mutateTableStructure(r,"insertRowAbove"):void 0;case "table-insert-row-below":return r?o.mutateTableStructure(r,"insertRowBelow"):void 0;case "table-delete-row":return r?o.mutateTableStructure(r,"deleteRow"):void 0;case "table-insert-col-left":return r?o.mutateTableStructure(r,"insertColumnLeft"):void 0;case "table-insert-col-right":return r?o.mutateTableStructure(r,"insertColumnRight"):void 0;case "table-delete-col":return r?o.mutateTableStructure(r,"deleteColumn"):void 0;case "table-merge-selected":return o.mergeTableCells(t.store.get().selectedTableCells);case "table-merge-right":return r?ph(o,r,"right"):void 0;case "table-merge-down":return r?ph(o,r,"down"):void 0;case "table-split":return r?o.splitTableCell(r):void 0}}function qC(e){let t=e.store.get(),n=t.slides[t.currentSlide]?.elements.find(({id:o})=>o===t.selectedElementId)??null;e.getAi()?.fixElement(n,t.currentSlide);}function jC(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:a,top:s}=chunkR2NUNRIB_cjs.ud({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${a}px`,e.style.top=`${s}px`;}function ta(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,a=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},s=(d,u)=>{let m=chunkR2NUNRIB_cjs.Ok(t,"button",`pptxv-context-menu-item${d.danger?" is-danger":""}`);return m.type="button",m.setAttribute("role","menuitem"),m.textContent=e.getTranslator()(d.labelKey),m.disabled=d.disabled===true,m.addEventListener("click",()=>{a(),ea(d.id,e,u);}),m},p=(d,u,m,g)=>{r=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-context-menu",{left:`${m}px`,top:`${g}px`}),r.dataset.pptxContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.contextMenu.ariaLabel"));for(let x of d){if(x.separatorBefore){let v=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-context-menu-separator");v.setAttribute("role","separator"),r.appendChild(v);}r.appendChild(s(x,u));}(o.closest(".pptxv")??t.body).appendChild(r),jC(r,t,m,g),i=x=>{x instanceof KeyboardEvent&&x.key!=="Escape"||x.target instanceof Node&&r?.contains(x.target)||a();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},l=d=>{let u=n.get();if(!u.editable||u.presenting)return;let m=chunkR2NUNRIB_cjs.Wg(chunkR2NUNRIB_cjs.zh(d.target,e.getStageRoot()),d.target,u.selectedElementId);if(!m||!chunkR2NUNRIB_cjs.xi(m,u.editTemplateMode))return;d.preventDefault(),a(),u.selectedElementIds.includes(m)||e.selectElement(m);let g=Ln(d.target);g&&!n.get().selectedTableCells.some(({row:b,column:h})=>b===g.row&&h===g.column)&&n.set({selectedTableCell:g,selectedTableCells:[g]});let x=n.get(),v=Z(x,m)??null,f=Ji(x,v,d.target);p(chunkR2NUNRIB_cjs.Xg({elementType:v?.type??null,table:f?.context??null,hasMultiSelection:x.selectedElementIds.length>1,aiEnabled:e.getAi()!==null,hasClipboard:x.clipboardPayload!==null}),f,d.clientX,d.clientY);};return o.addEventListener("contextmenu",l),{destroy(){o.removeEventListener("contextmenu",l),a();}}}function oa(e,t){let n=chunkR2NUNRIB_cjs.ug(),o=a=>{let s=a.target;if(!(s&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(s.tagName))){if(t.isPresenting?.()){YC(a,t,n);return}switch(a.key){case "ArrowRight":case "ArrowDown":case "PageDown":case " ":t.next();break;case "ArrowLeft":case "ArrowUp":case "PageUp":t.prev();break;case "Home":t.first();break;case "End":t.last();break;case "Escape":t.escape();break;default:return}a.preventDefault();}},r=chunkR2NUNRIB_cjs.aa(),i=a=>{if(!t.isPresenting?.()||!chunkR2NUNRIB_cjs.$f())return;let s=chunkR2NUNRIB_cjs.ba(a,r);s.intent==="next-slide"?(a.preventDefault(),t.next()):s.intent==="previous-slide"&&(a.preventDefault(),t.prev());};return e.addEventListener("keydown",o),e.addEventListener("wheel",i,{passive:false}),()=>{e.removeEventListener("keydown",o),e.removeEventListener("wheel",i);}}function YC(e,t,n){if(!chunkR2NUNRIB_cjs.$f())return;let o=chunkR2NUNRIB_cjs.vg(e,n);if(o.action!=="none")switch(e.preventDefault(),o.action){case "next":t.next();return;case "previous":t.prev();return;case "first":t.first();return;case "last":t.last();return;case "goto":{let r=o.slideNumber-1,i=t.getSlideCount?.()??0;r>=0&&r<i&&t.goToSlide?.(r);return}case "end":t.escape();return;case "pointerTool":t.setPointerTool?.(o.tool==="arrow"?"none":o.tool);return;case "eraseAnnotations":t.eraseAnnotations?.();return;case "toggleInkMarkup":t.toggleInkMarkup?.();return;case "toggleBlackScreen":t.toggleBlank?.("black");return;case "toggleWhiteScreen":t.toggleBlank?.("white");return;case "toggleSubtitles":t.toggleSubtitles?.();break;case "toggleChrome":t.toggleChrome?.();break;case "showAllSlides":t.showAllSlides?.();break;}}var XC=.1,ZC=8;function na(e,t){let n=chunkR2NUNRIB_cjs.$h({getScale:t.getScale,minScale:XC,maxScale:ZC,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:s=>{t.isSwipeEnabled()&&(s===-1?t.onNext():t.onPrevious());}}}),o=s=>n.onTouchStart(s),r=s=>n.onTouchMove(s),i=s=>n.onTouchEnd(s),a=()=>n.onTouchCancel();return e.addEventListener("touchstart",o,{passive:false,capture:true}),e.addEventListener("touchmove",r,{passive:false,capture:true}),e.addEventListener("touchend",i,{passive:true,capture:true}),e.addEventListener("touchcancel",a,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",a,true),n.cancel();}}function ra(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,a=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",a),{async enter(){if(!i()){if(o)try{await e.requestFullscreen(),e.focus();return}catch{}r=true,t(true),e.focus();}},async exit(){if(o&&n.fullscreenElement===e){await n.exitFullscreen();return}r&&(r=false,t(false));},isActive:i,dispose(){o&&n.removeEventListener("fullscreenchange",a);}}}var ge=chunkR2NUNRIB_cjs.Hc,ia=chunkR2NUNRIB_cjs.Ic;function aa(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ruler-corner");n.setAttribute("aria-hidden","true");let o=chunkR2NUNRIB_cjs.Pk(e,"svg",{class:"pptxv-ruler pptxv-ruler-h"});o.setAttribute("data-pptx-ruler","h"),o.setAttribute("role","presentation");let r=chunkR2NUNRIB_cjs.Pk(e,"svg",{class:"pptxv-ruler pptxv-ruler-v"});r.setAttribute("data-pptx-ruler","v"),r.setAttribute("role","presentation");let i=false,a=1,s={width:0,height:0},p=null,l=(m,g)=>{i&&(g.stopPropagation(),g.preventDefault(),g.currentTarget?.setPointerCapture?.(g.pointerId),p=m);},d=(m,g)=>{let x=p;p=null;let v=g.currentTarget;if(x!==m||!i||!v)return;try{v.releasePointerCapture?.(g.pointerId);}catch{}let f=v.getBoundingClientRect(),b=m==="h"?g.clientY-f.top:g.clientX-f.left,h=chunkR2NUNRIB_cjs.Kc(b,a,m==="h"?s.height:s.width);h!==null&&t(m,h);};o.addEventListener("pointerdown",m=>l("h",m)),o.addEventListener("pointerup",m=>d("h",m)),r.addEventListener("pointerdown",m=>l("v",m)),r.addEventListener("pointerup",m=>d("v",m));let u=(m,g,x,v)=>{let f=x*v.scale,b=g==="h";chunkR2NUNRIB_cjs.Qk(m,{width:b?f:ge,height:b?ge:f}),m.replaceChildren(),m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"rect",{class:"pptxv-ruler-bg",width:b?f:ge,height:b?ge:f}));let h=v.selection;if(h){let S=(b?h.x:h.y)*v.scale,E=Math.max((b?h.width:h.height)*v.scale,1);m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"rect",{class:"pptxv-ruler-highlight",x:b?S:0,y:b?0:S,width:b?E:ge,height:b?ge:E}));}for(let S of chunkR2NUNRIB_cjs.Jc(x,v.scale,v.unit)){let E=ge-ge*(S.isMajor?.6:.3);if(m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"line",{class:"pptxv-ruler-tick",x1:b?S.position:ge,y1:b?ge:S.position,x2:b?S.position:E,y2:b?E:S.position,"stroke-width":S.isMajor?1:.5})),!S.label)continue;let T=chunkR2NUNRIB_cjs.Pk(e,"text",{class:"pptxv-ruler-label",x:b?S.position+2:2,y:b?ia+1:S.position+ia+2,"font-size":ia});T.textContent=S.label,m.appendChild(T);}m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"line",{class:"pptxv-ruler-edge",x1:b?0:ge-.5,y1:b?ge-.5:0,x2:b?f:ge-.5,y2:b?ge-.5:f}));};return {mount(m){n.parentNode!==m&&m.append(n,o,r);},update(m){i=m.draggable,a=m.scale,s=m.canvasSize,n.hidden=!m.visible,o.style.display=m.visible?"":"none",r.style.display=m.visible?"":"none",o.classList.toggle("is-draggable",m.draggable),r.classList.toggle("is-draggable",m.draggable),m.visible&&(u(o,"h",m.canvasSize.width,m),u(r,"v",m.canvasSize.height,m));},destroy(){n.remove(),o.remove(),r.remove();}}}function QC(e){let t={presentFromStart:()=>e.startPresentationFromBeginning(),print:()=>{e.print();},exportPdf:()=>{e.exportPdf();},newSlide:()=>e.getEditActions().addSlide(),spellCheck:()=>e.getEditActions().toggleSpellCheck(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut()};return n=>t[n]?.()}function sa(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:a}=e,s=Qi(t,o,{showToolbar:r.showToolbar??true,showThumbnails:r.showThumbnails??true,showFormatToolbar:r.showFormatToolbar??true,showInspector:r.showInspector??true,editable:r.editable??false,hiddenActions:r.hiddenActions,titleBar:{fileName:r.fileName,autosaveEnabled:e.isAutosaveSwitchOn?.()??r.autosave!==false,autosaveToggleAvailable:e.isAutosaveToggleAvailable?.()??r.autosave!==false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:JC(e),hiddenActions:r.hiddenActions,quickAccess:{getState:()=>e.getQuickAccessOptions(),run:QC(e),screenTip:k=>e.quickAccessScreenTip(k)}},accountAuth:r.accountAuth,presentationToolbarHandlers:{setTool:k=>e.setPresentationPointerTool?.(k),setColor:k=>e.setPresentationPointerColor?.(k),toggleBlackboard:()=>e.togglePresentationBlackboard?.(),clearAnnotations:()=>e.erasePresentationAnnotations?.(),togglePresenterView:()=>e.togglePresenterView?.()},...Db(e)}),p=_t(s.root,e.initialTheme??r.theme,[]);n.appendChild(s.root),s.statusBar?.setNotesExpanded(i.get().notesExpanded),s.statusBar?.setDirty(i.get().dirty),s.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),s.titleBar?.setDirty(i.get().dirty);let l=oa(s.root,{next:e.next,prev:e.prev,first:e.goToFirstSlide,last:e.goToLastSlide,escape:e.exitPresentation,isPresenting:()=>i.get().presenting,goToSlide:e.goToSlide,getSlideCount:()=>i.get().slides.length,setPointerTool:e.setPresentationPointerTool,eraseAnnotations:e.erasePresentationAnnotations,toggleInkMarkup:e.togglePresentationInkMarkup,toggleBlank:e.togglePresentationBlank,toggleSubtitles:e.toggleSubtitles,toggleChrome:()=>s.presentationToolbar.toggleVisible(),showAllSlides:e.showPresentationAllSlides}),d=na(s.root,{getScale:()=>a.effectiveScale(),onPinchZoom:k=>e.setZoom(k),isSwipeEnabled:()=>{let k=i.get();return k.presenting||!k.editable},onNext:()=>{let k=i.get();si({presenting:k.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:k.slides[k.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),u=t.createElement("button");u.type="button",u.setAttribute("data-pptx-end-of-show",""),u.className="pptxv-presentation-end",Object.assign(u.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let m=t.createElement("span");Object.assign(m.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),m.textContent=o("pptx.presentation.endOfSlideShow"),u.appendChild(m),u.addEventListener("click",k=>{k.stopPropagation(),e.next();});let g=()=>{let k=i.get(),y=k.presenting&&k.endOfShow;y&&u.parentElement!==s.root?s.root.appendChild(u):!y&&u.parentElement&&u.remove();},x=i.subscribe(g);g();let v=k=>{let y=i.get();!y.presenting||!(k.target instanceof Element)||!k.target.closest(".pptxv-stage")||!Mb({target:k.target,presenting:y.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:y.slides[y.currentSlide],slideCount:y.slides.length,runner:{goToSlide:C=>e.goToSlide(C),move:C=>C>0?e.next():e.prev(),endShow:()=>e.exitPresentation()}})||e.next();};s.root.addEventListener("click",v);let f=Hb({getState:()=>i.get(),subscribe:k=>i.subscribe(k),next:()=>e.next()}),b=Rb({getPresenting:()=>i.get().presenting,subscribe:k=>i.subscribe(k),root:s.root,cancelAutoAdvance:f.cancel,rearmAutoAdvance:f.rearm}),h=()=>{s.root.removeEventListener("click",v),f.detach(),b(),x(),u.remove();},S={current:void 0},E=ra(s.root,k=>{if(!k&&i.get().presenting&&e.classifyPresentationExit?.()==="restore-show"){S.current?.enter();return}i.set({presenting:k});});S.current=E;let T=null;return typeof ResizeObserver<"u"&&(T=new ResizeObserver(()=>{i.get().zoom==="fit"&&a.renderStage();}),T.observe(s.viewport)),{chrome:s,presentation:E,detachKeyboard:l,detachTouchGestures:d,detachPresentationClick:h,resizeObserver:T,appliedThemeVars:p}}function JC(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function pa(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function la(e){return {doc:e.doc,container:e.container,t:e.t,options:e.options,store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),setZoom:t=>e.setZoom(t),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>{e.lifecycle.presentation.isActive()?e.exitPresentation():e.enterPresentation();},returnToNormalView:()=>{e.store.get().presenting&&e.exitPresentation(),e.container.querySelector("[data-pptx-slide-sorter]")?.remove();},undo:()=>e.undo(),redo:()=>e.redo(),toggleAutosave:()=>e.toggleAutosave(),isAutosaveSwitchOn:()=>e.isAutosaveSwitchOn(),isAutosaveToggleAvailable:()=>e.isAutosaveToggleAvailable(),startPresentationFromBeginning:()=>{e.goToSlide(0),e.enterPresentation();},startPresentationFromCurrent:()=>{e.enterPresentation();},openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openShare:()=>e.openShare(),openAccessibility:()=>e.openAccessibility(),openSettings:t=>e.openSettings(t),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSetUpSlideShow:()=>e.openSetUpSlideShow(),toggleHideCurrentSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),clearSelection:()=>e.selectElements([]),readTransitionDraft:()=>{let t=e.store.get();return chunkR2NUNRIB_cjs.je(t.slides[t.currentSlide])},presentationProperties:()=>e.store.get().presentationProperties,save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),packageForSharing:()=>e.packageForSharing(),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),goToFirstSlide:()=>e.goToFirstSlide(),goToLastSlide:()=>e.goToLastSlide(),exitPresentation:()=>{e.exitPresentation();},setPresentationPointerTool:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"};e.updatePresenterSnapshot({pointer:{...n,tool:n.tool===t?"none":t}});},setPresentationPointerColor:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,tool:"none"};e.updatePresenterSnapshot({pointer:{...n,color:t}});},togglePresenterView:()=>e.togglePresenterView(),showPresentationAllSlides:()=>e.showPresentationAllSlides(),classifyPresentationExit:()=>e.classifyPresentationExit(),erasePresentationAnnotations:()=>e.clearPresentationAnnotations(),togglePresentationInkMarkup:()=>e.updatePresenterSnapshot({inkMarkupVisible:e.getPresenterSnapshot().inkMarkupVisible===false}),togglePresentationBlank:t=>e.updatePresenterSnapshot({blackout:e.getPresenterSnapshot().blackout===t?"none":t}),togglePresentationBlackboard:()=>{let t=e.getPresenterSnapshot(),n=t.pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"},o=chunkR2NUNRIB_cjs.kg(t.blackout,n.tool);e.updatePresenterSnapshot({blackout:o.blackout,pointer:{...n,tool:o.tool}});},commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),exportJson:()=>e.exportJson(),print:()=>Promise.resolve((e.openPrintDialog(),true)),openFile:()=>e.openFile(),openRecentFile:t=>e.openRecentFile(t),createPresentation:t=>e.createPresentation(t),getEditActions:()=>e.editor.getEditActions(),getFindReplaceActions:()=>e.editor.getFindReplaceActions(),setTheme:t=>e.setTheme(t),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t),getQuickAccessOptions:()=>e.getQuickAccessOptions(),quickAccessScreenTip:t=>e.quickAccessScreenTip(t)}}function da(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let a=n(i);Object.keys(a).length!==0&&(t.pushHistory(),e.set(X(o,G(o).map(s=>s.id===r?{...s,...a}:s))),t.commitChange());}}function ca(e,t,n){return e[t]?.elements.find(o=>o.id===n)}function lh(e,t,n){return e.map((o,r)=>r===t?{...chunkR2NUNRIB_cjs.k(o),elements:n(o.elements)}:o)}function ma(e,t,n){return lh(e,t,o=>o.filter(r=>r.id!==n))}function Dn(e){return e.map(chunkR2NUNRIB_cjs.k)}function Yt(e,t,n){return lh(e,t,o=>[...o,n])}function ua(e,t,n,o){return e.map((r,i)=>i===t?{...chunkR2NUNRIB_cjs.k(r),notes:n,notesSegments:o?.map(a=>({...a,style:{...a.style}}))}:r)}function me(e,t,n){return e.map((o,r)=>r===t?{...chunkR2NUNRIB_cjs.k(o),...n}:o)}function xa(e,t){return e.map(n=>({...chunkR2NUNRIB_cjs.k(n),...t}))}function ga(e){let{store:t,ops:n}=e,o=(r,i)=>{let a=t.get(),s=a.slides[a.currentSlide];if(!a.editable||!s?.animations?.some(l=>l.elementId===r))return;let p=i(s.animations);n.pushHistory(),t.set({slides:me(a.slides,a.currentSlide,{animations:p})}),n.commitChange();};return {addAnimation(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let l=chunkR2NUNRIB_cjs.ab(p.animations??[],s,r,i);n.pushHistory(),t.set({slides:me(a.slides,a.currentSlide,{animations:l})}),n.commitChange();},removeAnimation(){let r=t.get(),i=r.selectedElementId,a=r.slides[r.currentSlide];if(!r.editable||!i||!a?.animations?.length)return;let s=chunkR2NUNRIB_cjs.bb(a.animations,i);s.length!==a.animations.length&&(n.pushHistory(),t.set({slides:me(r.slides,r.currentSlide,{animations:s})}),n.commitChange());},setAnimationEffect(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let d=(r==="entrance"?chunkR2NUNRIB_cjs.Na:r==="exit"?chunkR2NUNRIB_cjs.Oa:chunkR2NUNRIB_cjs.Pa)(p.animations??[],s,i);n.pushHistory(),t.set({slides:me(a.slides,a.currentSlide,{animations:d})}),n.commitChange();},applyMotionPath(r){if(r==="custom")return;let i=t.get(),a=i.selectedElementId,s=i.slides[i.currentSlide];if(!i.editable||!a||!s)return;let p=s.animations??[],l=r==="none"?chunkR2NUNRIB_cjs.sb(p,a):chunkR2NUNRIB_cjs.rb(p,a,r);n.pushHistory(),t.set({slides:me(i.slides,i.currentSlide,{animations:l})}),n.commitChange();},setMotionPathData(r){let i=t.get(),a=i.selectedElementId,s=i.slides[i.currentSlide];if(!i.editable||!a||!s)return;let p=chunkR2NUNRIB_cjs.qb(s.animations??[],a,r);n.pushHistory(),t.set({slides:me(i.slides,i.currentSlide,{animations:p})}),n.commitChange();},setAnimationTiming(r,i){o(r,a=>{let s=[...a];return i.durationMs!==void 0&&(s=chunkR2NUNRIB_cjs.Sa(s,r,i.durationMs)),i.delayMs!==void 0&&(s=chunkR2NUNRIB_cjs.Ta(s,r,i.delayMs)),i.trigger!==void 0&&(s=chunkR2NUNRIB_cjs.Qa(s,r,i.trigger)),i.direction!==void 0&&(s=chunkR2NUNRIB_cjs.Va(s,r,i.direction)),i.sequence!==void 0&&(s=chunkR2NUNRIB_cjs.Wa(s,r,i.sequence)),i.timingCurve!==void 0&&(s=chunkR2NUNRIB_cjs.Ua(s,r,i.timingCurve)),i.repeatCount!==void 0&&(s=chunkR2NUNRIB_cjs.Xa(s,r,i.repeatCount)),i.repeatMode!==void 0&&(s=chunkR2NUNRIB_cjs.Ya(s,r,i.repeatMode)),i.triggerShapeId!==void 0&&(s=chunkR2NUNRIB_cjs.Ra(s,r,i.triggerShapeId||void 0)),s});},reorderAnimation(r,i){o(r,a=>i==="up"?chunkR2NUNRIB_cjs.Za(a,r):chunkR2NUNRIB_cjs._a(a,r));},moveAnimation(r,i){o(r,a=>chunkR2NUNRIB_cjs.$a(a,{elementId:r},i));}}}function dh(e,t){return t.size===0?[...e]:e.map(n=>{let o=t.get(n.id);return o?{...n,x:o.x??n.x,y:o.y??n.y}:n})}function ba(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return dh(e,chunkR2NUNRIB_cjs.Sb(r,n))}function va(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return dh(e,chunkR2NUNRIB_cjs.Tb(r,n))}function fa(e,t,n){switch(t){case "left":return {x:0};case "right":return {x:n.width-e.width};case "centerH":return {x:(n.width-e.width)/2};case "top":return {y:0};case "bottom":return {y:n.height-e.height};case "middle":return {y:(n.height-e.height)/2}}}function Mn(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function ha(e,t,n){return chunkR2NUNRIB_cjs.o(e,t,n)}function ya(e,t,n,o=false){return chunkR2NUNRIB_cjs.p(e,t,n,{intoTemplate:o})}function Sa(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let a=t.get(),s=a.selectedElementId,p=G(a);!a.editable||!s||!p||i(p,s)!==p&&(n.pushHistory(),t.set(X(a,i(p,s))),n.commitChange());};return {bringForward:()=>r(chunkR2NUNRIB_cjs.qc),sendBackward:()=>r(chunkR2NUNRIB_cjs.rc),bringToFront:()=>r(chunkR2NUNRIB_cjs.oc),sendToBack:()=>r(chunkR2NUNRIB_cjs.pc),alignElements(i){let a=t.get();if(a.selectedElementIds.length<2){o(s=>fa(s,i,a.canvasSize));return}n.pushHistory(),t.set(X(a,ba(G(a),a.selectedElementIds,i))),n.commitChange();},distributeElements(i){let a=t.get();!a.editable||a.selectedElementIds.length<3||(n.pushHistory(),t.set(X(a,va(G(a),a.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>Mn(i,"horizontal")),flipVertical:()=>o(i=>Mn(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let a=ha(G(i),i.selectedElementIds,i.editTemplateMode?chunkR2NUNRIB_cjs.Lg(true,i.selectedElementIds[0]):chunkR2NUNRIB_cjs.Kg());a.groupId&&(n.pushHistory(),t.set({...X(i,a.elements),selectedElementId:a.groupId,selectedElementIds:[a.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),a=i.selectedElementId,s=G(i),p=n.selectedElement(i);if(!i.editable||!a||!s||!p||p.type!=="group")return;let l=p.children.map(u=>i.editTemplateMode?chunkR2NUNRIB_cjs.Lg(true,u.id||p.id):chunkR2NUNRIB_cjs.Kg()),d=ya(s,a,l,i.editTemplateMode);d.childIds.length!==0&&(n.pushHistory(),t.set({...X(i,d.elements),selectedElementId:d.childIds.at(-1)??null,selectedElementIds:d.childIds}),n.commitChange());}}}function wa(e){let{store:t,ops:n}=e;return {setSlideBackgroundColor(o){let r=t.get();if(r.editable){if(r.masterViewTarget){n.pushHistory(),r.masterViewTab==="notes"&&r.notesMaster?t.set({notesMaster:{...r.notesMaster,backgroundColor:o}}):r.masterViewTab==="handout"&&r.handoutMaster?t.set({handoutMaster:{...r.handoutMaster,backgroundColor:o}}):t.set({slideMasters:ch(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:me(r.slides,r.currentSlide,{backgroundColor:o})}),n.commitChange());}},clearSlideBackground(){let o=t.get();if(o.editable){if(o.masterViewTarget){n.pushHistory(),o.masterViewTab==="notes"&&o.notesMaster?t.set({notesMaster:{...o.notesMaster,backgroundColor:void 0,backgroundImage:void 0}}):o.masterViewTab==="handout"&&o.handoutMaster?t.set({handoutMaster:{...o.handoutMaster,backgroundColor:void 0,backgroundImage:void 0}}):t.set({slideMasters:ch(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:me(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}}}}function ch(e,t){let n=e.masterViewTarget;return n?e.slideMasters.map((o,r)=>r!==n.masterIndex?o:n.layoutIndex===null?{...o,...t}:{...o,layouts:o.layouts?.map((i,a)=>a===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function Ca(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunkR2NUNRIB_cjs.Mg(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunkR2NUNRIB_cjs.Mg(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunkR2NUNRIB_cjs.Ng(r.element);n.pushHistory(),t.set({...X(o,[...G(o),i]),selectedElementId:i.id,selectedElementIds:[i.id]}),n.commitChange();}}}function Ea(e){let{store:t,ops:n}=e;return {updatePresentationSettings(o){n.updatePresentationProperties({...t.get().presentationProperties,...o});},applyThemeByPath(o,r){let i=e.getHandler();!i||!o||!t.get().editable||(async()=>(await i.setPresentationTheme(o,r),t.set({slideMasters:t.get().slideMasters.map((a,s)=>r||s===0?{...a,themePath:o}:a)}),n.commitChange()))();},applyThemeEdit({colorScheme:o,fontScheme:r,name:i}){let a=t.get();if(!a.editable)return;n.pushHistory();let s=chunkR2NUNRIB_cjs.F({slides:a.slides,theme:{colorScheme:a.colorScheme,fontScheme:a.fontScheme},themeColorMap:a.colorScheme?{...a.colorScheme}:void 0},o,r,i);t.set({slides:s.slides,colorScheme:s.theme?.colorScheme??o,fontScheme:s.theme?.fontScheme??r,themeName:i}),n.commitChange();},updateTagCollections(o){t.get().editable&&(t.set({tagCollections:o}),n.commitChange());},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:me(r.slides,r.currentSlide,o)}),n.commitChange());},setTemplateBackground(o,r){let i=e.getHandler();!i||!t.get().editable||(i.setTemplateBackground(o,r),t.set({slideMasters:t.get().slideMasters.map(a=>a.path===o?{...a,backgroundColor:r}:a)}),n.commitChange());},getTemplateBackgroundColor(o){return e.getHandler()?.getTemplateBackgroundColor(o)},updateCanvasSize(o){!Number.isFinite(o.width)||!Number.isFinite(o.height)||t.get().editable&&(t.set({canvasSize:{width:Math.max(1,Math.round(o.width)),height:Math.max(1,Math.round(o.height))}}),n.commitChange());},updateSlideSize(o){!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0||t.get().editable&&(t.set({slideSize:{...o},canvasSize:chunkR2NUNRIB_cjs.De(o)}),n.commitChange());}}}async function Ta(e,t){let n=new eE__default.default,o=n.folder("presentation-package");if(!o)throw new Error("Unable to create presentation package");return o.file(t,e),o.file("README.txt",chunkR2NUNRIB_cjs.pk(t)),n.generateAsync({type:"blob"})}function mh(e,t,n,o){t.querySelectorAll(".pptxv-alignment-guide").forEach(r=>r.remove());for(let r of n){let i=e.createElement("div");i.className=`pptxv-alignment-guide is-${r.axis}`,i.style[r.axis==="h"?"top":"left"]=`${r.position*o}px`,t.appendChild(i);}}function uh(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=G(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="connector"?t:null}function xh(e){let{doc:t,store:n,ops:o}=e,r=t.createElement("div");r.className="pptxv-connector-endpoints",r.setAttribute("data-pptx-connector-endpoints","");let i=null,a=m=>{let g=r.getBoundingClientRect(),x=e.getScale()||1;return {x:(m.clientX-g.left)/x,y:(m.clientY-g.top)/x}},s=m=>{i&&(i={kind:i.kind,...a(m)},u());},p=m=>{let g=i;i=null,l();let x=n.get(),v=uh(x);if(!g||!v){u();return}let f=G(x),b=a(m),h=chunkR2NUNRIB_cjs.rd(chunkR2NUNRIB_cjs.qd(f.filter(T=>T.id!==v.id)),b.x,b.y),S=chunkR2NUNRIB_cjs.sd(v,f,g.kind,b,h),E=chunkR2NUNRIB_cjs.td(v,S);o.pushHistory(),n.set(X(x,f.map(T=>T.id===v.id?E:T))),o.commitChange();},l=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p);};function d(m,g){let x=t.createElement("button");x.type="button",x.className="pptxv-connector-endpoint",m.attached&&x.classList.add("is-attached"),x.dataset.pptxConnectorEndpoint=m.kind,x.dataset.pptxConnectorAttached=String(m.attached),x.setAttribute("aria-label",e.label(m.kind));let v=i?.kind===m.kind?i:m;return x.style.left=`${v.x*g}px`,x.style.top=`${v.y*g}px`,x.addEventListener("pointerdown",f=>{f.preventDefault(),f.stopPropagation(),i={kind:m.kind,...a(f)},window.addEventListener("pointermove",s),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p),u();}),x}function u(){let m=n.get(),g=uh(m);if(r.replaceChildren(),!g)return;let x=e.getScale()||1,v=G(m);if(i){let f=chunkR2NUNRIB_cjs.qd(v.filter(h=>h.id!==g.id)),b=chunkR2NUNRIB_cjs.rd(f,i.x,i.y);for(let h of f){let S=t.createElement("div");S.className="pptxv-connection-site",S.setAttribute("data-pptx-connection-site",""),b?.elementId===h.elementId&&b.siteIndex===h.siteIndex&&S.classList.add("is-snapped"),S.style.left=`${h.x*x}px`,S.style.top=`${h.y*x}px`,r.appendChild(S);}}for(let f of chunkR2NUNRIB_cjs.pd(g))r.appendChild(d(f,x));}return {root:r,mount(m){m.appendChild(r),u();},sync:u,dispose(){l(),i=null,r.remove();}}}var tE={type:"linear",angle:90,stops:[{color:"#4472c4",position:0,opacity:1},{color:"#ffffff",position:100,opacity:1}]};function oE(e){return e&&chunkR2NUNRIB_cjs.d(e)?{fillColor:e.shapeStyle?.fillColor,strokeColor:e.shapeStyle?.strokeColor,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,strokeColor:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function Pa(e,t=null,n=[],o=null,r=new Map,i=null){let a=oE(e),s=e?chunkR2NUNRIB_cjs.cd(e):void 0,p=e?chunkR2NUNRIB_cjs.Kh(e):void 0,l=e?chunkR2NUNRIB_cjs.Mh(e):void 0,d=e?chunkR2NUNRIB_cjs.Oh(e):void 0,u=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,isLocked:chunkR2NUNRIB_cjs.gc(e),canShape:Cn(e),canText:Ee(e),isImage:e!==void 0&&chunkR2NUNRIB_cjs.b(e),isChart:e?.type==="chart",isMedia:e?.type==="media",isTable:e?.type==="table",isSmartArt:e?.type==="smartArt",smartArtData:e?.type==="smartArt"?e.smartArtData:void 0,isGroup:e?.type==="group",groupChildCount:e?.type==="group"&&Array.isArray(e.children)?e.children.length:void 0,isOle:e?.type==="ole",oleObjectType:e?.type==="ole"?e.oleObjectType:void 0,oleFileName:e?.type==="ole"?e.fileName:void 0,oleIsLinked:e?.type==="ole"&&e.isLinked===true,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:a.fillColor,strokeColor:a.strokeColor,strokeWidth:a.strokeWidth,shapeStyle:e&&chunkR2NUNRIB_cjs.d(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:a.fillOpacity,strokeOpacity:a.strokeOpacity,gradientEnabled:e!==void 0&&chunkR2NUNRIB_cjs.Fh(e),gradient:e?chunkR2NUNRIB_cjs.Eh(e):tE,vAlign:s?.vAlign??"top",textWrap:e?chunkR2NUNRIB_cjs.fd(e):"square",autoFitMode:e?chunkR2NUNRIB_cjs.gd(e):"none",characterSpacing:s?.characterSpacing??0,lineSpacing:s?.lineSpacing??1,lineSpacingExactPt:s?.lineSpacingExactPt??null,paragraphSpacingBefore:s?.paragraphSpacingBefore??0,paragraphSpacingAfter:s?.paragraphSpacingAfter??0,paragraphIndent:s?.paragraphIndent??0,paragraphMarginLeft:s?.paragraphMarginLeft??0,textDirection:s?.textDirection??"horizontal",textRtl:s?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:p?.brightness??0,imageContrast:p?.contrast??0,imageSaturation:p?.saturation??0,imageArtisticEffect:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunkR2NUNRIB_cjs.b(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.colorWash:void 0,altText:e&&"altText"in e&&typeof e.altText=="string"?e.altText:"",chartHighlightCell:e?.type==="chart"&&i?.elementId===e.id?{seriesIndex:i.part.seriesIndex,pointIndex:i.part.pointIndex}:null,actionClick:e?.actionClick?chunkR2NUNRIB_cjs.q(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunkR2NUNRIB_cjs.q(e.actionHover,"hover"):void 0,chartData:e?.type==="chart"?e.chartData:void 0,media:e?.type==="media"?e:void 0,mediaPreviewUrl:e?.type==="media"?e.mediaData??(e.mediaPath?r.get(e.mediaPath):void 0):void 0,mediaPosterUrl:e?.type==="media"?e.posterFrameData??(e.posterFramePath?r.get(e.posterFramePath):void 0):void 0,cropLeft:l?.cropLeft??0,cropTop:l?.cropTop??0,cropRight:l?.cropRight??0,cropBottom:l?.cropBottom??0,tableHeaderRow:d?.firstRowHeader??false,tableBandedRows:d?.bandedRows??false,tableBandedColumns:d?.bandedColumns??false,tableLastRow:e?.type==="table"?e.tableData?.lastRow??false:false,tableFirstCol:e?.type==="table"?e.tableData?.firstCol??false:false,tableLastCol:e?.type==="table"?e.tableData?.lastCol??false:false,tableRtl:e?.type==="table"?e.tableData?.rtl??false:false,tableStyleId:e?.type==="table"?e.tableData?.tableStyleId??"":"",tableCellBackground:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.backgroundColor??"#ffffff":"#ffffff",tableCellBorder:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.borderColor??"#000000":"#000000",tableCellPadding:d?.cellPadding??0,selectedTableCell:u?t:null,selectedTableCells:u?n:[],tableCellStyle:u?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(m=>m.height??32)??[]:[],tableElement:e?.type==="table"?e:void 0}}function nE(e){let t=[],n=new Set;for(let o of e.slideMasters)for(let r of o.layouts??[])!r.path||n.has(r.path)||(n.add(r.path),t.push({path:r.path,name:r.name||r.path.split("/").pop()||r.path}));return t}function gh(e){return ()=>{let t=e.store.get(),n=e.getChrome(),{ribbon:o,inspector:r}=n,i=t.editable&&!t.presenting;if(n.thumbnails?.setAddSlideVisible(i),!o&&!r||(o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen),t.presenting))return;let a=i?e.selectedElement(t):void 0;o?.updateSelection(a,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],layouts:nE(t),layoutPreviews:e.layoutPreviews?.(),currentLayoutPath:t.slides[t.currentSlide]?.layoutPath,themeFonts:{heading:t.fontScheme?.majorFont?.latin,body:t.fontScheme?.minorFont?.latin},embeddedFontFamilies:t.embeddedFonts.map(p=>p.name),customFontFamilies:t.customFontFamilies}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth}),r?.update(Pa(a,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls,t.chartPartSelection));let s=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,slideSize:t.slideSize,elements:s?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:a?.id,comments:s?.comments??[],docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:s,editTemplateMode:t.editTemplateMode,slideMasters:t.slideMasters,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.themeName,tagCollections:t.tagCollections,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function bh(e){if(e.length===0)return null;if(e.length>1){let n=chunkR2NUNRIB_cjs.jc(e);return n?{...n,rotation:n.rotation??0}:null}let t=e[0];return {x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0}}function vh(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function Aa(e){let t=null,n=s=>vh(s.clientX,s.clientY,e.getStageOrigin(),e.getScale());function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",a);}function r(s){!t||s.pointerId!==t.pointerId||t.points.push(n(s));}function i(s){if(!t||s.pointerId!==t.pointerId)return;t.points.push(n(s));let p=t;o(),t=null,e.onCommitStroke({points:p.points,color:e.getColor(),width:e.getWidth(),tool:p.tool});}function a(s){!t||s.pointerId!==t.pointerId||(o(),t=null);}return {onStagePointerDown(s){if(s.button!==0)return;let p=e.getTool();if(p!=="select"){if(p==="eraser"){let l=chunkR2NUNRIB_cjs.zh(s.target,e.getStageRoot());l&&(s.preventDefault(),s.stopPropagation(),e.onEraseAt(l));return}s.preventDefault(),s.stopPropagation(),t={tool:p,pointerId:s.pointerId,points:[n(s)]},window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",a);}},isActive:()=>t!==null,dispose(){o(),t=null;}}}function ka(e){let{store:t,editActions:n,interactions:o}=e,r=Aa({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:a=>n.commitStroke(a),onEraseAt:a=>n.eraseInkElement(a)}),i=a=>a.editable&&!a.presenting&&a.drawTool!=="select";return {onStagePointerDown(a){if(i(t.get())){r.onStagePointerDown(a);return}o.onStagePointerDown(a);},onStageDblClick(a){i(t.get())||o.onStageDblClick(a);},syncCursor(a){if(!a)return;let s=t.get();a.dataset.drawTool=i(s)?s.drawTool:"select";},setTool(a){let s=t.get();s.drawTool!==a&&(a!=="select"&&o.closeInline(true),t.set({drawTool:a,selectedElementId:a==="select"?s.selectedElementId:null}));},setColor:a=>t.set({drawColor:a}),setWidth:a=>t.set({drawWidth:Math.max(1,Math.round(a))}),dispose:()=>r.dispose()}}function rE(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function fh(e){let t=n=>{let o=e.store.get();if(!o.editable||!o.slides[o.currentSlide])return null;let r=n(o.slides[o.currentSlide].comments??[]);return r?(e.ops.pushHistory(),e.store.set({slides:rE(o.slides,o.currentSlide,()=>r)}),e.ops.commitChange(),r):null};return {addComment(n,o){let r=t(i=>chunkR2NUNRIB_cjs.Rh(i,n,"You",void 0,void 0,o));return r?r[r.length-1]?.id??null:null},addCommentReply(n,o){let r=t(a=>chunkR2NUNRIB_cjs.Uh(a,n,o,"You"));return r?r.find(a=>a.id===n)?.replies?.at(-1)?.id??null:null},editComment(n,o){t(r=>chunkR2NUNRIB_cjs.Th(r,n,o));},deleteComment(n){t(o=>chunkR2NUNRIB_cjs.Sh(o,n));},toggleCommentResolved(n){t(o=>chunkR2NUNRIB_cjs.Vh(o,n));}}}function Ia(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunkR2NUNRIB_cjs.Bh(o);i&&(n.pushHistory(),t.set({slides:Yt(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=ca(r.slides,r.currentSlide,o);if(!i||i.type!=="ink")return false;n.pushHistory();let a=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:ma(r.slides,r.currentSlide,o),selectedElementId:a}),n.commitChange(),true}}}var iE={width:320,height:80},aE={width:600,height:250},sE={width:200,height:150},hh={width:240,height:0};function Te(e,t){e.x=Math.max(0,Math.round((t.width-e.width)/2)),e.y=Math.max(0,Math.round((t.height-e.height)/2));}function La(e,t,n="rect"){let o,r;switch(e){case "text":o=chunkR2NUNRIB_cjs.g("Text",{fontSize:18,color:"#000000"}),r=iE;break;case "table":o={...chunkR2NUNRIB_cjs.nc(3,3),id:chunkR2NUNRIB_cjs.n("table")},r=aE;break;case "shape":n==="connector"?(o=chunkR2NUNRIB_cjs.i({type:"straight",stroke:{color:"#000000",width:2}}),r=hh):(o=chunkR2NUNRIB_cjs.h(n),r=n==="line"?hh:sE);break}return o.width=r.width,o.height=r.height,Te(o,t),o}function pE(e,t){return new Promise(n=>{let o=new Image;o.onload=()=>{let r=o.width/Math.max(1,o.height),i=Math.min(t,o.width||t),a=Math.max(1,Math.round(i/(r||1)));n({width:i,height:a});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function Hn(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="image/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=new FileReader;a.onload=async()=>{let s=typeof a.result=="string"?a.result:"";if(!s){n(null);return}let p=Math.round(t.width*.6),{width:l,height:d}=await pE(s,p),u={id:chunkR2NUNRIB_cjs.n("image"),type:"image",name:"Image",x:0,y:0,width:l,height:d,imageData:s};Te(u,t),n(u);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var lE={width:420,height:64},dt={width:640,height:360};function dE(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||dt.width,i=o.videoHeight||dt.height;if(r>dt.width||i>dt.height){let a=Math.min(dt.width/r,dt.height/i);n({width:Math.round(r*a),height:Math.round(i*a)});return}n({width:r,height:i});},o.onerror=()=>n(dt),o.src=t;})}function Da(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="video/*,audio/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=chunkR2NUNRIB_cjs.vi(i.type);if(!a){n(null);return}let s=new FileReader;s.onload=async()=>{let p=typeof s.result=="string"?s.result:"";if(!p){n(null);return}let l=a==="audio"?lE:await dE(e,p),d={id:chunkR2NUNRIB_cjs.n("media"),type:"media",mediaType:a,mediaMimeType:i.type||void 0,mediaData:p,x:0,y:0,width:l.width,height:l.height};Te(d,t),n(d);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var yh={width:400,height:80},Sh={width:600,height:340},wh={width:200,height:40};function Ma(e,t){let n=chunkR2NUNRIB_cjs.ei(e);return Te(n,t),n}function Ha(e,t,n){let o={id:chunkR2NUNRIB_cjs.n("smartart"),type:"smartArt",x:0,y:0,width:Sh.width,height:Sh.height,smartArtData:chunkR2NUNRIB_cjs.ah(e,t,r=>chunkR2NUNRIB_cjs.n(`smartart-node-${r}`))};return Te(o,n),o}function Ra(e,t){let n="[Equation]",o={id:chunkR2NUNRIB_cjs.n("equation"),type:"shape",x:0,y:0,width:yh.width,height:yh.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return Te(o,t),o}function Oa(e,t){let n=chunkR2NUNRIB_cjs.Yg(e,chunkR2NUNRIB_cjs.n("actionbutton"));return n?(Te(n,t),n):null}function Fa(e,t){return chunkR2NUNRIB_cjs.mc(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Ba(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunkR2NUNRIB_cjs.n("field"),type:"shape",x:0,y:0,width:wh.width,height:wh.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return Te(r,n),r}function Ch(e,t,n){let o=new Set(t.map(({row:r,column:i})=>`${r}:${i}`));return {...e,rows:e.rows.map((r,i)=>({...r,cells:r.cells.map((a,s)=>o.has(`${i}:${s}`)?{...a,style:{...a.style,...n}}:a)}))}}function Eh(e,t,n){switch(n){case "insertRowAbove":return chunkR2NUNRIB_cjs.Bb(e,t.row,"above");case "insertRowBelow":return chunkR2NUNRIB_cjs.Bb(e,t.row,"below");case "deleteRow":return chunkR2NUNRIB_cjs.Cb(e,t.row);case "insertColumnLeft":return chunkR2NUNRIB_cjs.Db(e,t.column,"left");case "insertColumnRight":return chunkR2NUNRIB_cjs.Db(e,t.column,"right");case "deleteColumn":return chunkR2NUNRIB_cjs.Eb(e,t.column)}}function Th(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100));return {...e,columnWidths:chunkR2NUNRIB_cjs.Qb(e.columnWidths,t,o)}}function Ph(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function Ah(e,t){let n=t.map(({row:o,column:r})=>({row:o,col:r}));return chunkR2NUNRIB_cjs.xb(n,e)?chunkR2NUNRIB_cjs.yb(n,e):e}function kh(e,t){let n=e.rows[t.row]?.cells[t.column],o=Math.max(1,n?.rowSpan??1),r=Math.max(1,n?.gridSpan??1),i=chunkR2NUNRIB_cjs.Nb(e,t.row,t.column);return i?{...e,rows:i.map((a,s)=>({...a,cells:a.cells.map((p,l)=>s>=t.row&&s<t.row+o&&l>=t.column&&l<t.column+r?{...p,hMerge:void 0,vMerge:void 0}:p)}))}:e}var cE={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function Na(e){return {toggleElementLock:()=>e(t=>({locks:chunkR2NUNRIB_cjs.hc(!chunkR2NUNRIB_cjs.gc(t))})),setTextVerticalAlign:t=>e(n=>chunkR2NUNRIB_cjs.ed(n,t)),setTextWrap:t=>e(n=>chunkR2NUNRIB_cjs.hd(n,t)),setAutoFitMode:t=>e(n=>chunkR2NUNRIB_cjs.id(n,t)),setTextAdvanced:t=>e(n=>chunkR2NUNRIB_cjs.dd(n,t)),setTextStyle:(t,n)=>e(o=>"textStyle"in o?n&&o.textSegments?.length?{textSegments:chunkR2NUNRIB_cjs.kd(o.textSegments,n,t).newSegments}:{textStyle:{...o.textStyle,...t}}:{}),setFillOpacity:t=>e(n=>$e(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>$e(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunkR2NUNRIB_cjs.Gh(n,t)),addGradientStop:(t,n)=>e(o=>chunkR2NUNRIB_cjs.Hh(o,t,n)),removeGradientStop:t=>e(n=>chunkR2NUNRIB_cjs.Ih(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunkR2NUNRIB_cjs.Jh(o,t,n)),setImageBrightness:t=>e(n=>chunkR2NUNRIB_cjs.Lh(n,{brightness:t})),setImageContrast:t=>e(n=>chunkR2NUNRIB_cjs.Lh(n,{contrast:t})),setImageSaturation:t=>e(n=>chunkR2NUNRIB_cjs.Lh(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunkR2NUNRIB_cjs.Nh(o,{[cE[t]]:n})),setImageEffects:t=>e(n=>chunkR2NUNRIB_cjs.b(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunkR2NUNRIB_cjs.r(n)})),setAltText:t=>e(()=>({altText:t})),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunkR2NUNRIB_cjs.Ph(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunkR2NUNRIB_cjs.Ph(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunkR2NUNRIB_cjs.Qh(n,t)),setTableOptions:(t,n)=>e(o=>o.type!=="table"||!o.tableData?{}:{tableData:{...o.tableData,...t,rows:n?o.tableData.rows.map(r=>({...r,cells:r.cells.map(i=>({...i,style:{...i.style,...n}}))})):o.tableData.rows}}),setTableData:(t,n)=>e(o=>o.type==="table"?{tableData:t,...n?{rawXml:n}:{}}:{}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,a)=>a===t?{...i,cells:i.cells.map((s,p)=>p===n?{...s,style:{...s.style,...o}}:s)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Ch(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Eh(o.tableData,t,n)}:{}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Th(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Ph(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:Ah(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:kh(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>At(o,r=>chunkR2NUNRIB_cjs.v(r,t,n))),setSmartArtNodeStyle:(t,n)=>e(o=>At(o,r=>chunkR2NUNRIB_cjs.z(r,t,n))),mutateSmartArtNode:(t,n)=>e(o=>At(o,r=>n==="add"?chunkR2NUNRIB_cjs.t(r,"New item"):n==="addChild"?chunkR2NUNRIB_cjs.y(r,t,"New item"):n==="remove"?chunkR2NUNRIB_cjs.u(r,t):n==="promote"?chunkR2NUNRIB_cjs.w(r,t):chunkR2NUNRIB_cjs.x(r,t))),replaceSmartArtData:t=>e(n=>At(n,()=>t)),setSmartArtLayout:t=>e(n=>At(n,o=>chunkR2NUNRIB_cjs.E(o,t))),setSmartArtColorScheme:t=>e(n=>At(n,o=>({...o,colorScheme:t})))}}function At(e,t){if(e.type!=="smartArt"||!e.smartArtData)return {};let n=t(e.smartArtData),o={width:e.width,height:e.height};return {smartArtData:chunkR2NUNRIB_cjs.fi(n,e.id,o)}}function Va(e,t){let n=(o,r)=>{t.pushHistory(),e.set({sections:o,slides:r}),t.commitChange();};return {addSection(o,r=e.get().currentSlide){let i=e.get(),a=o.trim();if(!i.editable||!a||!i.slides[r])return null;let s=chunkR2NUNRIB_cjs.uc(i.sections,i.slides,a,r),p=s.sections.find(l=>!i.sections.some(d=>d.id===l.id));return n(s.sections,s.slides),p?.id??null},renameSection(o,r){let i=e.get(),a=r.trim(),s=i.sections.find(l=>l.id===o);if(!i.editable||!s||!a||s.name===a)return;let p=chunkR2NUNRIB_cjs.vc(i.sections,i.slides,o,a);n(p.sections,p.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(a=>a.id===o))return;let i=chunkR2NUNRIB_cjs.wc(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),a=r==="up"?chunkR2NUNRIB_cjs.xc(i.sections,o):chunkR2NUNRIB_cjs.yc(i.sections,o);!i.editable||a===i.sections||n(a,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let a=chunkR2NUNRIB_cjs.zc(i.sections,i.slides,o,r);a.sections!==i.sections&&n(a.sections,a.slides);},toggleSection(o){let r=e.get();r.sections.some(i=>i.id===o)&&e.set({sections:r.sections.map(i=>i.id===o?{...i,collapsed:!i.collapsed}:i)});}}}function Xt(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function za(e){let{store:t,ops:n}=e;function o(r,i,a){let s=e.getHandler();s&&s.applyLayoutToSlide(r,i,[...t.get().slides]).then(p=>{let l=t.get();if(l.slides[r]?.id===a){n.pushHistory();let d=chunkR2NUNRIB_cjs.yi([p]),u=[...l.slides];u[r]=d.slides[0],t.set({slides:u,templateElementsBySlideId:{...l.templateElementsBySlideId,[p.id]:d.templateElementsBySlideId[p.id]??[]}}),n.commitChange();}},()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,a=chunkR2NUNRIB_cjs.Bc(i+1),s=Xt([...r.slides.slice(0,i),a,...r.slides.slice(i)]);t.set({slides:s,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let a=r.currentSlide+1,s={...chunkR2NUNRIB_cjs.k(i),id:chunkR2NUNRIB_cjs.Ac()},p=r.templateElementsBySlideId[i.id]??[],l=Xt([...r.slides.slice(0,a),s,...r.slides.slice(a)]);t.set({slides:l,templateElementsBySlideId:{...r.templateElementsBySlideId,[s.id]:p.map(chunkR2NUNRIB_cjs.j)},currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=Xt(r.slides.filter((p,l)=>l!==r.currentSlide)),a=Math.min(r.currentSlide,i.length-1),s={...r.templateElementsBySlideId};delete s[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:s,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let a=t.get();if(!a.editable||!r)return;n.pushHistory();let s=a.currentSlide+1,p={...chunkR2NUNRIB_cjs.Bc(s+1),layoutPath:r,...i?{layoutName:i}:{}},l=Xt([...a.slides.slice(0,s),p,...a.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(s,r,p.id);},insertSlideFromTemplate(r){let i=t.get();if(!i.editable)return;n.pushHistory();let a=i.currentSlide+1,s=chunkR2NUNRIB_cjs.Fc(r,chunkR2NUNRIB_cjs.Ac(),a+1,{slideWidth:i.canvasSize.width,slideHeight:i.canvasSize.height,scheme:chunkR2NUNRIB_cjs.Cc(i.colorScheme)}),p=Xt([...i.slides.slice(0,a),s,...i.slides.slice(a)]);t.set({slides:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},getTemplateScheme(){return chunkR2NUNRIB_cjs.Cc(t.get().colorScheme)},applyLayout(r){let i=t.get(),a=i.slides[i.currentSlide];!i.editable||!a||!r||o(i.currentSlide,r,a.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide],a=chunkR2NUNRIB_cjs.pe(i);!r.editable||!i||!a||o(r.currentSlide,a,i.id);}}}var mE=24;function kt(e,t){if(!Ee(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function Rn(e,t){let n=Ue(e).listType;return kt(e,{listType:n===t?"none":t})}function On(e,t){let n=Ue(e).paragraphMarginLeft,o=Math.max(0,n+t*mE);return kt(e,{paragraphMarginLeft:o})}function _a(e,t){return kt(e,{align:t})}function Ga(e,t){return kt(e,{lineSpacing:t})}function Ih(e,t){return kt(e,{textDirection:t})}function Lh(e,t){return kt(e,{columnCount:Math.max(1,Math.round(t))})}function Ua(e){return {toggleBold:()=>e(t=>Pt(t,"bold")),toggleItalic:()=>e(t=>Pt(t,"italic")),toggleUnderline:()=>e(t=>Pt(t,"underline")),toggleStrikethrough:()=>e(t=>Pt(t,"strikethrough")),toggleTextShadow:()=>e(t=>zi(t)),changeFontSize:t=>e(n=>Oi(n,t)),setFontSize:t=>e(n=>En(n,t)),setFontFamily:t=>e(n=>Ni(n,t)),setTextColor:t=>e(n=>Fi(n,t)),setHighlightColor:t=>e(n=>Bi(n,t)),setCharacterSpacing:t=>e(n=>Vi(n,t)),changeCase:t=>e(n=>_i(n,t)),clearFormatting:()=>e(t=>Gi(t)),toggleBulletList:()=>e(t=>Rn(t,"bullet")),toggleNumberedList:()=>e(t=>Rn(t,"numbered")),increaseIndent:()=>e(t=>On(t,1)),decreaseIndent:()=>e(t=>On(t,-1)),setTextAlign:t=>e(n=>_a(n,t)),setLineSpacing:t=>e(n=>Ga(n,t)),setTextDirection:t=>e(n=>Ih(n,t)),setColumnCount:t=>e(n=>Lh(n,t))}}function $a(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i,a){let s=t.get(),p=s.slides[s.currentSlide];if(!s.editable||!p)return;let l=Math.max(0,Math.round(r));n.pushHistory();let d=a?{advanceOnClick:a.onClick,advanceAfterMs:a.afterMs}:{};if(i){let u={type:o,durationMs:l,...d};t.set({slides:xa(s.slides,{transition:u})});}else {let u={...p.transition,type:o,durationMs:l,...d};t.set({slides:me(s.slides,s.currentSlide,{transition:u})});}n.commitChange();},applyTransitionDraft(o,r){let i=t.get(),a=i.slides[i.currentSlide];if(!i.editable||!a)return;let s=chunkR2NUNRIB_cjs.ke(a,o),p=new Set(chunkR2NUNRIB_cjs.le(i.slides.length,i.currentSlide,r));n.pushHistory(),t.set({slides:i.slides.map((l,d)=>p.has(d)?{...l,transition:{...s}}:l)}),n.commitChange();}}}function Wa(e){let{doc:t,store:n,ops:o}=e,r=da(n,o),i=a=>{if(!a)return;let s=n.get();!s.editable||!s.slides[s.currentSlide]||(o.pushHistory(),n.set({slides:Yt(s.slides,s.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {...Ua(r),...Sa({store:n,ops:o,applyToSelected:r}),...Ca({store:n,ops:o}),...za({store:n,ops:o,getHandler:e.getHandler}),...wa({store:n,ops:o}),...$a({store:n,ops:o}),...ga({store:n,ops:o}),...Na(r),...Ia({store:n,ops:o}),...Ea({store:n,ops:o,getHandler:e.getHandler}),sections:Va(n,o),comments:fh({store:n,ops:o}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:a=>r(s=>$e(s,chunkR2NUNRIB_cjs.qe(a))),setShapeStroke:a=>r(s=>$e(s,chunkR2NUNRIB_cjs.re(a))),setShapeStrokeWidth:a=>r(s=>$e(s,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(s=>$e(s,a)),setShapeType:a=>r(s=>s.type==="shape"?{shapeType:a}:{}),setGeometry(a){r(()=>{let s={};return a.x!==void 0&&Number.isFinite(a.x)&&(s.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(s.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(s.width=Math.max(chunkR2NUNRIB_cjs.m,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(s.height=Math.max(chunkR2NUNRIB_cjs.m,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(s.rotation=a.rotation),s});},insert(a,s){let p=n.get();p.slides[p.currentSlide]&&i(La(a,p.canvasSize,s));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await Hn(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await Da(t,a.canvasSize));},insertChart(a=chunkR2NUNRIB_cjs.di){let s=n.get();s.slides[s.currentSlide]&&i(Ma(a,s.canvasSize));},insertSmartArt(a,s){let p=n.get();p.slides[p.currentSlide]&&i(Ha(a,s,p.canvasSize));},insertEquation(a){let s=n.get();s.slides[s.currentSlide]&&i(Ra(a,s.canvasSize));},updateEquation:(a,s)=>o.updateEquation(a,s),insertActionButton(a){let s=n.get();s.slides[s.currentSlide]&&i(Oa(a,s.canvasSize));},insertField(a,s){let p=n.get();if(!p.slides[p.currentSlide])return;let l=s??Fa(a,{slideNumber:p.currentSlide+1});i(Ba(a,l,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),selectAll(){let a=n.get(),s=G(a).filter(p=>chunkR2NUNRIB_cjs.xi(p.id,a.editTemplateMode)).map(p=>p.id);s.length>0&&o.select(s.at(-1)??null,s);},toggleViewOption(a){let s=n.get();n.set({[a]:!s[a]});for(let p of t.querySelectorAll(".pptxv"))p.classList.toggle(`pptxv-${a}`,!s[a]);},addGuide(a,s){let p=n.get(),l=chunkR2NUNRIB_cjs.bh(`guide-${Date.now()}`,a,p.canvasSize);n.set({guides:[...p.guides,s===void 0?l:{...l,position:s}]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await Hn(t,n.get().canvasSize);!a||a.type!=="image"||r(s=>s.type==="image"?{imageData:a.imageData,imagePath:a.imagePath,svgData:a.svgData,svgPath:a.svgPath}:{});},resetSelectedImage:()=>r(a=>a.type==="image"?{imageEffects:void 0,cropLeft:void 0,cropTop:void 0,cropRight:void 0,cropBottom:void 0}:{})}}function Ka(e){let{store:t,ops:n}=e,o=(r,i)=>{i!==0&&(n.pushHistory(),t.set({slides:[...r]}),n.commitChange());};return {search(r,i){return r?chunkR2NUNRIB_cjs.fh(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let p=chunkR2NUNRIB_cjs.fh(s.slides,r,{matchCase:a}),{slides:l,replacements:d}=chunkR2NUNRIB_cjs.gh(s.slides,p,0,i);return o(l,d),d},replaceAll(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let{slides:p,replacements:l}=chunkR2NUNRIB_cjs.hh(s.slides,r,i,{matchCase:a});return o(p,l),l}}}function qa(e){return t=>{if(!e.isActive())return;let{action:n,dx:o,dy:r}=chunkR2NUNRIB_cjs.Rg(t,{hasSelection:e.getSelectedId()!==null,isTextInputTarget:chunkR2NUNRIB_cjs.Qg(t.target)});if(!(n===null||n==="prevSlide"||n==="nextSlide"))switch(t.preventDefault(),n){case "escape":if(e.cancelFormatPainter()||e.closeShortcuts())return;e.deselect();break;case "toggleShortcuts":e.toggleShortcuts();break;case "find":e.toggleFind?.();break;case "undo":e.undo();break;case "redo":e.redo();break;case "paste":e.paste();break;case "selectAll":e.selectAll();break;case "delete":e.deleteSelected();break;case "duplicate":e.duplicateSelected();break;case "copy":e.copySelected();break;case "cut":e.cutSelected();break;case "group":e.groupSelected();break;case "ungroup":e.ungroupSelected();break;case "nudge":e.nudgeSelected(o??0,r??0);break;}}}var uE=e=>t=>Z(e,t);function Fn(e,t){return chunkR2NUNRIB_cjs.xi(t,e.editTemplateMode)&&chunkR2NUNRIB_cjs.fc(Z(e,t),"select")}function Zt(e,t,n){return chunkR2NUNRIB_cjs.ic(t,uE(e),n)}function Dh(e,t){let n=e.selectedElementIds.length>1&&e.selectedElementIds.includes(t)?e.selectedElementIds:[t];return Zt(e,n,"move").length>0}var xE=chunkR2NUNRIB_cjs.ec(void 0);function gE(e,t){let n={...e};for(let o of Object.keys(n))n[o]&&=t[o];return n}function Bn(e){return e.selectedElementIds.reduce((t,n)=>gE(t,chunkR2NUNRIB_cjs.ec(Z(e,n))),xE)}function Mh(e,t){let n=e.store.get();!n.editable||!n.handoutMaster||n.handoutSlidesPerPage===t||(e.pushHistory(),e.store.set({handoutSlidesPerPage:t,handoutMaster:{...n.handoutMaster,slidesPerPage:t}}),e.commitChange());}function Hh(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null}}function Rh(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),a=Z(i,t);if(a?.type!=="table"||!a.tableData?.rows[n]?.cells[o])return;e.pushHistory();let s=a.tableData.rows.map((p,l)=>({...p,cells:p.cells.map((d,u)=>l===n&&u===o?chunkR2NUNRIB_cjs.wb(d,r):d)}));e.store.set(X(i,G(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:s}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=Z(o,t);!r||!chunkR2NUNRIB_cjs.c(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(X(o,G(o).map(i=>i.id===t&&chunkR2NUNRIB_cjs.c(i)?{...i,textSegments:i.textSegments?.map(a=>a.equationXml?{...a,equationXml:n}:a)}:i))),e.commitChange());}}}function ja(e){return !e||!chunkR2NUNRIB_cjs.c(e)||!chunkR2NUNRIB_cjs.fc(e,"textEdit")?false:!e.textSegments?.some(t=>t.equationXml)}function Ya(e,t){let n=chunkR2NUNRIB_cjs.c(e)?e:void 0,o=n?.textSegments,r=n?.textStyle;return {text:t,textSegments:chunkR2NUNRIB_cjs.zd(t,o,r)}}function Qt(e){let t="",n=o=>{for(let r of Array.from(o.childNodes)){if(r.nodeType===3){t+=r.nodeValue??"";continue}if(!(r instanceof HTMLElement))continue;if(r.tagName==="BR"){t+=`
|
|
7
|
+
`),h.textContent=C?.metadata?`${C.metadata.duration??0}s, ${C.metadata.videoWidth??0} x ${C.metadata.videoHeight??0}, ${C.metadata.codecInfo??C.mediaMimeType??""}`:C?.mediaMimeType??"";for(let P of [...S,m,g,x,v])P.setDisabled(!w.isMedia);f.control.disabled=!w.isMedia,b.control.disabled=!w.isMedia;}}}function Pv(e,t){let n=e.createElement("label");n.textContent=t;let o=e.createElement("textarea");return o.rows=3,n.appendChild(o),{label:n,control:o}}function Av(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function Iv(e,t,n){let o=n(t("pptx.ole.title"));o.classList.add("pptxv-ole-info");let r=p=>{let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ole-row"),d=chunkR2NUNRIB_cjs.Ok(e,"span");d.textContent=p;let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-ole-value");return l.append(d,u),o.appendChild(l),{row:l,value:u}},i=r(t("pptx.ole.type")),a=r(t("pptx.ole.fileName")),s=r(t("pptx.ole.linkStatus"));return s.value.classList.add("pptxv-ole-badge"),{el:o,update(p){o.hidden=!p.isOle,p.isOle&&(i.value.textContent=chunkR2NUNRIB_cjs.s(p.oleObjectType),a.row.hidden=!p.oleFileName,a.value.textContent=p.oleFileName??"",a.value.title=p.oleFileName??"",s.value.textContent=t(p.oleIsLinked?"pptx.ole.linked":"pptx.ole.embedded"),s.value.classList.toggle("is-linked",p.oleIsLinked));}}}function Lv(e,t,n,o,r){let i=n(t("pptx.arrange.positionSize")),a=i.querySelector(".pptxv-inspector-section-title"),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-lock-row");a?(i.insertBefore(s,a),s.appendChild(a)):i.insertBefore(s,i.firstChild);let p=H(e,{label:t("pptx.inspector.lock"),icon:"lock-open",className:"pptxv-inspector-lock-btn",onClick:r});s.appendChild(p.btn);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-grid");i.appendChild(l);let d=(b,h,S)=>{let E=j(e,{label:b,min:S,onCommit:T=>o({[h]:T})});return l.appendChild(E.el),E},u=d(t("pptx.arrange.x"),"x"),m=d(t("pptx.arrange.y"),"y"),g=d(t("pptx.arrange.width"),"width",1),x=d(t("pptx.arrange.height"),"height",1),v=d(t("pptx.arrange.rotation"),"rotation"),f=[u,m,g,x,v];return {el:i,update(b){i.hidden=!b.hasSelection,u.setValue(b.x),m.setValue(b.y),g.setValue(b.width),x.setValue(b.height),v.setValue(b.rotation);for(let S of f)S.setDisabled(!b.hasSelection);p.setActive(b.isLocked),p.setDisabled(!b.hasSelection);let h=t(b.isLocked?"pptx.inspector.unlock":"pptx.inspector.lock");p.btn.title=h,p.btn.setAttribute("aria-label",h),p.btn.replaceChildren(chunkR2NUNRIB_cjs.Zk(e,b.isLocked?"lock":"lock-open"));}}}function Dv(e,t,n,o){let r=n(t("pptx.shape.quickStyles")),i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-quick-styles"),a=[];for(let s of chunkR2NUNRIB_cjs.oi){let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-quick-style");if(p.type="button",p.title=s.name,p.setAttribute("aria-label",s.name),p.style.background=s.style.fillGradient||s.style.fillColor||"transparent",s.style.strokeColor&&(p.style.border=`${s.style.strokeWidth??1}px solid ${s.style.strokeColor}`),s.style.shadowColor){let l=s.style.shadowOffsetX??2,d=s.style.shadowOffsetY??2;p.style.boxShadow=`${l}px ${d}px ${s.style.shadowBlur??4}px ${s.style.shadowColor}`;}p.addEventListener("click",()=>o.setShapeStyle(s.style)),i.appendChild(p),a.push(p);}return r.appendChild(i),{el:r,update(s){r.hidden=!s.canShape;for(let p of a)p.disabled=!s.canShape;}}}var Lw=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function Mv(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-layout-grid"),s=new Map;for(let h of chunkR2NUNRIB_cjs.D){let S=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-layout-button");S.type="button",S.dataset.testid=`smartart-layout-${h}`,S.textContent=chunkR2NUNRIB_cjs.pa(chunkR2NUNRIB_cjs.sa,h,t),S.addEventListener("click",()=>o.setSmartArtLayout(h)),s.set(h,S),a.appendChild(S);}r.appendChild(a);let p=ce(e,{label:t("pptx.smartart.colorScheme"),options:Lw.map(h=>({value:h,label:chunkR2NUNRIB_cjs.pa(chunkR2NUNRIB_cjs.ra,h,t)})),onChange:o.setSmartArtColorScheme}),l=p.el.querySelector("select");l&&(l.dataset.testid="smartart-color-scheme"),r.appendChild(p.el);let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-label");d.textContent=t("pptx.smartart.textPane"),r.appendChild(d);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-nodes"),m=e.createElement("button");m.type="button",m.textContent=t("pptx.smartart.addItem"),m.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(m,u);let g,x=null;function v(h,S){let E=g;if(!E)return;let T=E.nodes.find(A=>A.id===S),k=h.currentTarget.value,y=!k,w=chunkR2NUNRIB_cjs.v(E,S,k),C=k!==T?.text;if(h.key==="Enter"){h.preventDefault();let A=chunkR2NUNRIB_cjs.ve(w,S);A?(x=A.focusNodeId??null,o.replaceSmartArtData(A.data)):C&&o.replaceSmartArtData(w);}else if((h.key==="Backspace"||h.key==="Delete")&&y){if(!T?.parentId&&!chunkR2NUNRIB_cjs.te(E.resolvedLayoutType,chunkR2NUNRIB_cjs.ue(E)))return;h.preventDefault();let P=chunkR2NUNRIB_cjs.we(E,S);P&&(x=P.focusNodeId??null,o.replaceSmartArtData(P.data));}else if(h.key==="Tab"&&!h.shiftKey){h.preventDefault();let A=chunkR2NUNRIB_cjs.xe(w,S);A?(x=S,o.replaceSmartArtData(A)):C&&o.replaceSmartArtData(w);}else if(h.key==="Tab"&&h.shiftKey){h.preventDefault();let A=chunkR2NUNRIB_cjs.ye(w,S);A?(x=S,o.replaceSmartArtData(A)):C&&o.replaceSmartArtData(w);}}let f="",b=h=>{let S=h.smartArtData;g=S;let E=S?.nodes.map(T=>T.id).join("|")??"";if(E===f){let T=u.querySelectorAll('[data-testid="smartart-node-text"]');S?.nodes.forEach((k,y)=>{let w=T[y];w&&e.activeElement!==w&&(w.value=k.text);});return}f=E,u.replaceChildren();for(let[T,k]of (S?.nodes??[]).entries()){let y=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-smartart-node"),w=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-node-index");w.textContent=String(T+1);let C=e.createElement("input");C.type="text",C.className="pptxv-smartart-node-input",C.dataset.testid="smartart-node-text",C.dataset.nodeId=k.id,C.setAttribute("aria-label",`${t("pptx.smartart.item")} ${T+1}`),C.value=k.text,C.addEventListener("change",()=>o.setSmartArtNodeText(k.id,C.value)),C.addEventListener("keydown",R=>v(R,k.id));let A=e.createElement("input");A.type="color",A.value=k.style?.fillColor??"#3b82f6",A.title=t("pptx.inspector.fill"),A.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fillColor:A.value}));let P=e.createElement("input");P.type="color",P.value=k.style?.fontColor??"#ffffff",P.title=t("pptx.table.color"),P.addEventListener("input",()=>o.setSmartArtNodeStyle(k.id,{fontColor:P.value}));let I=e.createElement("button");I.type="button",I.textContent="B",I.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{bold:!k.style?.bold}));let L=e.createElement("button");L.type="button",L.textContent="I",L.addEventListener("click",()=>o.setSmartArtNodeStyle(k.id,{italic:!k.style?.italic}));let D=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-hierarchy");for(let[R,F]of [["addChild","pptx.smartArt.addSubItem"],["promote","pptx.smartart.promote"],["demote","pptx.smartart.demote"],["remove","pptx.common.delete"]]){let M=e.createElement("button");M.type="button",M.textContent=t(F),M.addEventListener("click",()=>o.mutateSmartArtNode(k.id,R)),D.appendChild(M);}y.append(w,C,A,P,I,L,D),u.appendChild(y);}};return {el:r,update(h){r.hidden=!h.isSmartArt;let S=h.smartArtData?.resolvedLayoutType;for(let[E,T]of s)T.disabled=!h.isSmartArt,T.classList.toggle("is-active",E===S),T.setAttribute("aria-pressed",String(E===S));if(p.setValue(h.smartArtData?.colorScheme??"colorful1"),p.setDisabled(!h.isSmartArt),m.disabled=!h.isSmartArt,b(h),x){let E=x;x=null,u.querySelector(`[data-testid="smartart-node-text"][data-node-id="${E}"]`)?.focus();}}}}function Hv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-inspector-section pptxv-table-grid");o.setAttribute("aria-label",t("pptx.tableDataEditor.ariaLabel"));let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-header"),i=chunkR2NUNRIB_cjs.Ok(e,"h4","pptxv-inspector-section-title");i.textContent=t("pptx.inspector.tableData");let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-toolbar");r.append(i,a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-scroll"),p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-body");p.setAttribute("role","grid"),s.appendChild(p),o.append(r,s);let l,d,u=true,m=A=>{!l||A===l||!A.tableData||n.setTableData(A.tableData,A.rawXml);},g=(A,P,I)=>{let L=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-table-grid-btn");return L.type="button",L.textContent=t(`pptx.tableDataEditor.${A}`),L.title=t(`pptx.tableDataEditor.${P}`),L.addEventListener("click",()=>{l&&m(I(l));}),L},x=g("addRowLabel","addRowTitle",chunkR2NUNRIB_cjs.Jb),v=g("removeRowLabel","removeRowTitle",chunkR2NUNRIB_cjs.Kb),f=g("addColumnLabel","addColumnTitle",chunkR2NUNRIB_cjs.Lb),b=g("removeColumnLabel","removeColumnTitle",chunkR2NUNRIB_cjs.Mb);a.append(x,v,f,b);let h=A=>{let P=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-head");P.setAttribute("role",A.role),A.role==="rowheader"&&P.classList.add("pptxv-table-grid-gutter");let I=e.createElement("span");if(I.textContent=A.text,P.appendChild(I),u&&A.canRemove){let L=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-table-grid-remove");L.type="button",L.textContent="\xD7",L.title=A.removeLabel,L.setAttribute("aria-label",A.removeLabel),L.addEventListener("click",A.onRemove),P.appendChild(L);}return P},S=A=>{let P=e.createElement("input");return P.type="text",P.className="pptxv-table-grid-input",P.value=A.text,P.disabled=!u,P.dataset.pptxRow=String(A.rowIndex),P.dataset.pptxCol=String(A.colIndex),P.setAttribute("aria-label",t("pptx.tableDataEditor.cellAriaLabel",{row:A.rowIndex+1,column:A.colIndex+1})),P.addEventListener("change",()=>{l&&m(chunkR2NUNRIB_cjs.Gb(l,A.rowIndex,A.colIndex,P.value));}),P.addEventListener("keydown",I=>I.stopPropagation()),P},E=(A,P)=>h({role:"columnheader",text:String(A+1),removeLabel:t("pptx.tableDataEditor.removeColumnN",{number:A+1}),canRemove:P,onRemove:()=>{l&&m(chunkR2NUNRIB_cjs.Ib(l,A));}}),T=(A,P)=>h({role:"rowheader",text:String(A+1),removeLabel:t("pptx.tableDataEditor.removeRowN",{number:A+1}),canRemove:P,onRemove:()=>{l&&m(chunkR2NUNRIB_cjs.Hb(l,A));}}),k=A=>{let P=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-row");P.setAttribute("role","row");let I=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-head pptxv-table-grid-gutter");I.setAttribute("role","columnheader"),P.appendChild(I);for(let L of A.colIndices)P.appendChild(E(L,A.canRemoveColumn));return P},y=A=>{p.textContent="",p.appendChild(k(A));for(let P of A.rows){let I=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-row");I.setAttribute("role","row"),I.appendChild(T(P.rowIndex,A.canRemoveRow));for(let L of P.cells){let D=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-grid-cell");D.setAttribute("role","gridcell"),D.appendChild(S(L)),I.appendChild(D);}p.appendChild(I);}},w=()=>{let A=e.activeElement;if(!A||A.tagName!=="INPUT"||!p.contains(A))return null;let{pptxRow:P,pptxCol:I}=A.dataset;return P!==void 0&&I!==void 0?[P,I]:null},C=()=>{a.hidden=!u;for(let A of p.querySelectorAll("input"))A.disabled=!u;for(let A of p.querySelectorAll(".pptxv-table-grid-remove"))A.hidden=!u;};return {el:o,update(A){l=A.tableElement;let P=l?chunkR2NUNRIB_cjs.Fb(l):void 0,I=A.hasSelection&&A.isTable&&P!==void 0&&P.rowCount>0&&P.colCount>0;if(o.hidden=!I,!I||!P||!l){d=void 0,p.textContent="";return}if(a.hidden=!u,x.disabled=!u,f.disabled=!u,v.disabled=!u||!P.canRemoveRow,b.disabled=!u||!P.canRemoveColumn,l.tableData===d)return;let L=w();d=l.tableData,y(P),L&&p.querySelector(`input[data-pptx-row="${L[0]}"][data-pptx-col="${L[1]}"]`)?.focus();},setEditable(A){u=A,C(),d=void 0;}}}var Dw=["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"];function Rv(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=y=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],y);},a=(y,w,C)=>{let A=e.createElement("label");A.textContent=y;let P=e.createElement("select");P.setAttribute("aria-label",y);for(let I of w){let L=e.createElement("option");L.value=I,L.textContent=C?chunkR2NUNRIB_cjs.pa(C,I,t):I,P.appendChild(L);}return A.appendChild(P),o.appendChild(A),P},s=y=>{let w=e.createElement("label");w.textContent=y;let C=e.createElement("input");return C.type="color",w.appendChild(C),o.appendChild(w),C},p=a(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),l=a(t("pptx.table.gradientType"),["linear","radial"]),d=e.createElement("input");d.type="number",d.min="0",d.max="360",d.title=t("pptx.table.gradientAngle"),o.appendChild(d);let u=s(t("pptx.table.gradientStart")),m=s(t("pptx.table.gradientEnd")),g=a(t("pptx.table.patternPreset"),Dw,chunkR2NUNRIB_cjs.za),x=s(t("pptx.table.patternForeground")),v=s(t("pptx.table.patternBackground")),f=a(t("pptx.table.cellBorders"),["top","right","bottom","left"]),b=s(t("pptx.table.borderColor")),h=e.createElement("input");h.type="number",h.min="0",h.max="20",h.title=t("pptx.table.borderWidth"),o.appendChild(h);let S=()=>i({fillMode:"gradient",gradientFillType:l.value,gradientFillAngle:Number(d.value),gradientFillStops:[{color:u.value,position:0},{color:m.value,position:100}]});p.addEventListener("change",()=>i({fillMode:p.value}));for(let y of [l,d,u,m])y.addEventListener("change",S);let E=()=>i({fillMode:"pattern",patternFillPreset:g.value,patternFillForeground:x.value,patternFillBackground:v.value});for(let y of [g,x,v])y.addEventListener("change",E);let T=()=>{let y=`${f.value[0].toUpperCase()}${f.value.slice(1)}`;i({[`border${y}Color`]:b.value,[`border${y}Width`]:Number(h.value)});};for(let y of [f,b,h])y.addEventListener("change",T);let k=o.querySelectorAll("input,select");return {el:o,update(y){r=y,o.hidden=!y.selectedTableCell;let w=y.tableCellStyle??{};p.value=w.fillMode??"solid",l.value=w.gradientFillType??"linear",d.value=String(w.gradientFillAngle??90),u.value=w.gradientFillStops?.[0]?.color??"#ff0000",m.value=w.gradientFillStops?.at(-1)?.color??"#0000ff",g.value=w.patternFillPreset??"ltDnDiag",x.value=w.patternFillForeground??"#000000",v.value=w.patternFillBackground??"#ffffff";let C=`${f.value[0].toUpperCase()}${f.value.slice(1)}`;b.value=String(w[`border${C}Color`]??"#374151"),h.value=String(w[`border${C}Width`]??1);for(let A of k)A.disabled=!y.isTable;}}}var Mw={left:"pptx.textPanel.alignLeft",center:"pptx.textPanel.alignCenter",right:"pptx.textPanel.alignRight"},Hw={top:"pptx.textPanel.valignTop",middle:"pptx.textPanel.valignMiddle",bottom:"pptx.textPanel.valignBottom"};function Ei(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function Ov(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell";let r=e.createElement("strong");o.appendChild(r);let i=null,a=[],s=C=>{i&&n.setTableCellStyles(a.length>0?a:[i],C);},p=(C,A)=>{let P=e.createElement("label"),I=e.createElement("span");return I.textContent=C,A.setAttribute("aria-label",C),P.append(I,A),o.appendChild(P),P},l=(C,A)=>{let P=e.createElement("input");return P.type="number",P.addEventListener("change",()=>A(Number(P.value))),p(C,P),P},d=(C,A)=>{let P=e.createElement("input");return P.type="color",P.addEventListener("input",()=>s({[A]:P.value})),p(C,P),P},u=(C,A)=>{let P=e.createElement("input");return P.type="checkbox",P.addEventListener("change",()=>s({[A]:P.checked})),p(C,P),P},m=(C,A,P,I)=>{let L=e.createElement("select");for(let D of A){let R=e.createElement("option");R.value=D,R.textContent=chunkR2NUNRIB_cjs.pa(P,D,t),L.appendChild(R);}return L.addEventListener("change",()=>I(L.value)),p(C,L),L},g=l(t("pptx.table.fontSize"),C=>s({fontSize:C})),x=d(t("pptx.table.color"),"color"),v=d(t("pptx.table.background"),"backgroundColor"),f=d(t("pptx.table.cellBorders"),"borderColor"),b=l(t("pptx.table.borderWidth"),C=>s({borderTopWidth:C,borderRightWidth:C,borderBottomWidth:C,borderLeftWidth:C})),h=l(t("pptx.table.cellPadding"),C=>s({marginLeft:C,marginRight:C,marginTop:C,marginBottom:C})),S=u(t("pptx.format.bold"),"bold"),E=u(t("pptx.format.italic"),"italic"),T=u(t("pptx.format.underline"),"underline"),k=m(t("pptx.table.alignment"),["left","center","right"],Mw,C=>s({align:C})),y=m(t("pptx.table.verticalAlignment"),["top","middle","bottom"],Hw,C=>s({vAlign:C})),w=[g,x,v,f,b,h,S,E,T,k,y];return {el:o,update(C){if(i=C.selectedTableCell,a=C.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let A=C.tableCellStyle??{};g.value=String(A.fontSize??14),x.value=Ei(A.color,"#000000"),v.value=Ei(A.backgroundColor,"#ffffff"),f.value=Ei(A.borderColor,"#374151"),b.value=String(A.borderTopWidth??1),h.value=String(A.marginLeft??4),S.checked=!!A.bold,E.checked=!!A.italic,T.checked=!!A.underline,k.value=A.align??"left",y.value=A.vAlign??"top";for(let P of w)P.disabled=!C.isTable;}}}function Fv(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(u,m)=>{let g=e.createElement("button");return g.type="button",g.textContent=u,g.addEventListener("click",()=>r&&m(r)),o.appendChild(g),g},a=u=>u.selectedTableCell,s=u=>m=>{let g=a(m);g&&n.mutateTableStructure(g,u);},p=[i(t("pptx.table.insertAbove"),s("insertRowAbove")),i(t("pptx.table.insertBelow"),s("insertRowBelow")),i(t("pptx.table.deleteRow"),s("deleteRow")),i(t("pptx.table.insertLeft"),s("insertColumnLeft")),i(t("pptx.table.insertRight"),s("insertColumnRight")),i(t("pptx.table.deleteColumn"),s("deleteColumn")),i(t("pptx.table.mergeSelected"),u=>n.mergeTableCells(u.selectedTableCells)),i(t("pptx.table.split"),u=>{let m=a(u);m&&n.splitTableCell(m);})],l=e.createElement("input");l.type="number",l.min="5",l.max="95",l.title=t("pptx.table.columnWidths"),l.addEventListener("change",()=>{let u=r&&a(r);u&&n.setTableColumnWidth(u.column,Number(l.value));});let d=e.createElement("input");return d.type="number",d.min="1",d.title=t("pptx.table.rowHeights"),d.addEventListener("change",()=>{let u=r&&a(r);u&&n.setTableRowHeight(u.row,Number(d.value));}),o.append(l,d),{el:o,update(u){r=u;let m=a(u);o.hidden=!m,l.value=m?String(Math.round((u.tableColumnWidths[m.column]??0)*100)):"",d.value=m?String(u.tableRowHeights[m.row]??32):"";for(let g of p)g.disabled=!m;p[6].disabled=u.selectedTableCells.length<2,l.disabled=!m,d.disabled=!m;}}}function Bv(e,t,n,o){let r=n(t("pptx.inspector.table")),i=Y(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=Y(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),s=Y(e,{label:t("pptx.table.bandedColumns"),onChange:C=>o.setTableOptions({bandedColumns:C})}),p=Y(e,{label:t("pptx.table.totalRow"),onChange:C=>o.setTableOptions({lastRow:C})}),l=Y(e,{label:t("pptx.table.firstColumn"),onChange:C=>o.setTableOptions({firstCol:C})}),d=Y(e,{label:t("pptx.table.lastColumn"),onChange:C=>o.setTableOptions({lastCol:C})}),u=Y(e,{label:t("pptx.textAdvanced.rtl"),onChange:C=>o.setTableOptions({rtl:C})});r.append(i.el,a.el,s.el,p.el,l.el,d.el,u.el);let m,g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-table-presets-label");g.textContent=t("pptx.table.stylePresets");let x=C=>{m&&o.setTableOptions({rows:chunkR2NUNRIB_cjs.Pb(m,C)});},v=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-table-presets-grid");v.append(...chunkR2NUNRIB_cjs.Ob.map(C=>{let A=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-table-preset-swatch");A.type="button",A.title=C.label,A.setAttribute("aria-label",C.label);let P=chunkR2NUNRIB_cjs.Ok(e,"span");P.style.background=C.headerBg;let I=chunkR2NUNRIB_cjs.Ok(e,"span");I.style.background=C.bandBg;let L=chunkR2NUNRIB_cjs.Ok(e,"span");return L.style.borderTopColor=C.borderColor,A.append(P,I,L),A.addEventListener("click",()=>x(C)),A})),r.append(g,v);let f=j(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});r.appendChild(f.el);let b=e.createElement("input");b.placeholder=t("pptx.table.styleId"),b.addEventListener("change",()=>o.setTableOptions({tableStyleId:b.value}));let h=e.createElement("input");h.type="color",h.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:h.value}));let S=e.createElement("input");S.type="color",S.addEventListener("input",()=>o.setTableOptions({},{borderColor:S.value})),r.append(b,h,S);let E=Ov(e,t,o),T=Rv(e,t,o),k=Fv(e,t,o);r.append(E.el,T.el,k.el);let y=[i,a,s,p,l,d,u],w=[f];return {el:r,update(C){r.hidden=!C.hasSelection||!C.isTable,m=C.tableElement?.tableData;for(let A of v.children)A.disabled=!C.isTable;i.setValue(C.tableHeaderRow),a.setValue(C.tableBandedRows),s.setValue(C.tableBandedColumns),p.setValue(C.tableLastRow),l.setValue(C.tableFirstCol),d.setValue(C.tableLastCol),u.setValue(C.tableRtl),f.setValue(C.tableCellPadding),b.value=C.tableStyleId,h.value=C.tableCellBackground,S.value=C.tableCellBorder,E.update(C),T.update(C),k.update(C);for(let A of y)A.setDisabled(!C.isTable);b.disabled=!C.isTable,h.disabled=!C.isTable,S.disabled=!C.isTable;for(let A of w)A.setDisabled(!C.isTable);}}}var Vv=12700;function Ti(e){return e?Math.round(e/Vv):0}function Sn(e){return Math.round(e*Vv)}function Pi(e,t,n){return Math.max(t,Math.min(n,e))}function Nv(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-text3d-bevel"),a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-text3d-bevel-label");a.textContent=n;let s=ce(e,{label:`${n} ${t("pptx.text3d.bevelType")}`,options:chunkR2NUNRIB_cjs.pi.map(({value:d,label:u})=>({value:d,label:u})),onChange:d=>o({[r.type]:d})}),p=j(e,{label:`${n} ${t("pptx.text3d.bevelWidth")}`,min:0,max:50,onCommit:d=>o({[r.width]:Sn(Pi(d,0,50))})}),l=j(e,{label:`${n} ${t("pptx.text3d.bevelHeight")}`,min:0,max:50,onCommit:d=>o({[r.height]:Sn(Pi(d,0,50))})});return i.append(a,s.el,p.el,l.el),{el:i,update(d,u){s.setValue(d?.[r.type]??"none"),p.setValue(Ti(d?.[r.width])),l.setValue(Ti(d?.[r.height])),s.setDisabled(u),p.setDisabled(u),l.setDisabled(u);}}}function zv(e,t,n,o){let r=n(t("pptx.text3d.title")),i,a=f=>{i={...i,...f},o.setTextStyle({text3d:i});},s=Y(e,{label:t("pptx.text3d.extrusion"),onChange:f=>{f?a({extrusionHeight:Sn(6)}):(i=void 0,o.setTextStyle({text3d:void 0}));}}),p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-text3d-options"),l=j(e,{label:t("pptx.text3d.extrusionDepth"),min:0,max:100,onCommit:f=>a({extrusionHeight:Sn(Pi(f,0,100))})}),d=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field pptxv-text3d-color"),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");u.textContent=t("pptx.text3d.extrusionColor");let m=e.createElement("input");m.type="color",m.setAttribute("aria-label",t("pptx.text3d.extrusionColor")),m.addEventListener("change",()=>a({extrusionColor:m.value})),d.append(u,m);let g=Nv(e,t,t("pptx.text3d.bevelTop"),a,{type:"bevelTopType",width:"bevelTopWidth",height:"bevelTopHeight"}),x=Nv(e,t,t("pptx.text3d.bevelBottom"),a,{type:"bevelBottomType",width:"bevelBottomWidth",height:"bevelBottomHeight"}),v=ce(e,{label:t("pptx.text3d.material"),options:chunkR2NUNRIB_cjs.qi.map(({value:f,label:b})=>({value:f||"",label:b})),onChange:f=>a({presetMaterial:f||void 0})});return p.append(l.el,d,g.el,x.el,v.el),r.append(s.el,p),{el:r,update(f){r.hidden=!f.canText,i=f.textStyle?.text3d;let b=!!(i?.extrusionHeight&&i.extrusionHeight>0);s.setValue(b),s.setDisabled(!f.canText),p.hidden=!b,l.setValue(Ti(i?.extrusionHeight)),l.setDisabled(!b),m.value=/^#[0-9a-fA-F]{6}$/u.test(i?.extrusionColor??"")?i?.extrusionColor:"#888888",m.disabled=!b,g.update(i,!b),x.update(i,!b),v.setValue(i?.presetMaterial??""),v.setDisabled(!b);}}}function _v(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=A=>n.setTextStyle(A,r?.selectedTextRange),a=A=>n.setTextStyle(A),s=(A,P)=>{let I=e.createElement("label");I.textContent=A,P.setAttribute("aria-label",A),I.appendChild(P),o.appendChild(I);},p=(A,P,I=0,L=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(I),D.addEventListener("change",()=>(L?a:i)({[P]:Number(D.value)})),s(A,D),D},l=(A,P)=>{let I=e.createElement("input");return I.type="color",I.addEventListener("input",()=>i({[P]:I.value})),s(A,I),I},d=(A,P)=>{let I=e.createElement("input");return I.type="checkbox",I.addEventListener("change",()=>i({[P]:I.checked})),s(A,I),I},u=p(t("pptx.textFormatting.columns"),"columnCount",1,true);u.max="6";let m=p(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),g=l(t("pptx.textEffects.outline"),"textOutlineColor"),x=p(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),v=d(t("pptx.textEffects.shadow"),"textShadowOpacity"),f=l(t("pptx.textEffects.shadowColor"),"textShadowColor"),b=p(t("pptx.textEffects.blur"),"textShadowBlur"),h=l(t("pptx.textEffects.glowColor"),"textGlowColor"),S=p(t("pptx.textEffects.glow"),"textGlowRadius"),E=d(t("pptx.textEffects.reflection"),"textReflection"),T=d(t("pptx.textFormatting.strikethrough"),"strikethrough"),k=l(t("pptx.text.highlightColor"),"highlightColor"),y=e.createElement("select");for(let A of chunkR2NUNRIB_cjs.ni){let P=e.createElement("option");P.value=A.value,P.textContent=A.label,y.appendChild(P);}y.addEventListener("change",()=>a({textWarpPreset:y.value==="textNoShape"?void 0:y.value})),s(t("pptx.textEffects.transform"),y);let w=p(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),C=Array.from(o.querySelectorAll("input,select"));return {el:o,update(A){r=A,o.hidden=!A.canText;let P=A.textStyle??{};u.value=String(P.columnCount??1),m.value=String(P.columnSpacing??0),g.value=P.textOutlineColor??"#000000",x.value=String(P.textOutlineWidth??0),v.checked=!!P.textShadowOpacity,f.value=P.textShadowColor??"#000000",b.value=String(P.textShadowBlur??4),h.value=P.textGlowColor??"#ffff00",S.value=String(P.textGlowRadius??0),E.checked=!!P.textReflection,T.checked=!!P.strikethrough,k.value=P.highlightColor??"#ffff00",y.value=P.textWarpPreset??"textNoShape",w.value=String(P.textWarpAdj??5e4);for(let I of C)I.disabled=!A.canText;}}}function Gv(e,t,n,o){let r=n(t("pptx.inspector.text")),i=ce(e,{label:t("pptx.textPanel.verticalAlign"),options:[{value:"top",label:t("pptx.textPanel.valignTop")},{value:"middle",label:t("pptx.textPanel.valignMiddle")},{value:"bottom",label:t("pptx.textPanel.valignBottom")}],onChange:o.setTextVerticalAlign});r.appendChild(i.el);let a=Y(e,{label:t("pptx.textAdvanced.wrapText"),onChange:T=>o.setTextWrap(T?"square":"none")});r.appendChild(a.el);let s=ce(e,{label:t("pptx.textAdvanced.autoFit"),options:[{value:"none",label:t("pptx.textAdvanced.autoFitNone")},{value:"normal",label:t("pptx.textAdvanced.autoFitShrink")},{value:"shrink",label:t("pptx.textAdvanced.autoFitResize")}],onChange:o.setAutoFitMode});r.appendChild(s.el);let p=(T,k,y)=>j(e,{label:T,min:y,onCommit:w=>o.setTextAdvanced({[k]:w})}),l=p(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),d=p(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),u=p(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),m=p(t("pptx.textAdvanced.spaceBefore"),"paragraphSpacingBefore",0),g=p(t("pptx.textAdvanced.spaceAfter"),"paragraphSpacingAfter",0),x=p(t("pptx.textAdvanced.indent"),"paragraphIndent"),v=p(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),f=ce(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(T=>({value:T,label:t(`pptx.textAdvanced.direction.${T}`)})),onChange:T=>o.setTextAdvanced({textDirection:T})}),b=Y(e,{label:t("pptx.textAdvanced.rtl"),onChange:T=>o.setTextAdvanced({rtl:T})}),h=[l,d,u,m,g,x,v];r.append(...h.map(({el:T})=>T),f.el,b.el);let S=_v(e,t,o);r.appendChild(S.el);let E=[i,a,s,...h,f,b];return {el:r,update(T){r.hidden=!T.hasSelection||!T.canText,i.setValue(T.vAlign),a.setValue(T.textWrap==="square"),s.setValue(T.autoFitMode),l.setValue(T.characterSpacing),d.setValue(T.lineSpacing),u.setValue(T.lineSpacingExactPt??0),m.setValue(T.paragraphSpacingBefore),g.setValue(T.paragraphSpacingAfter),x.setValue(T.paragraphIndent),v.setValue(T.paragraphMarginLeft),f.setValue(T.textDirection),b.setValue(T.textRtl),S.update(T);for(let k of E)k.setDisabled(!T.canText);}}}function wn(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,a=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let D of a){let R=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-inspector-tab");R.type="button",R.setAttribute("role","tab"),R.textContent=D.label,R.addEventListener("click",()=>m(D.id)),r.appendChild(R),i.set(D.id,R);}let s=fv(e,t,D=>n.selectElement(D));s.el.classList.add("pptxv-inspector-body"),o.appendChild(s.el);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-body");o.appendChild(p);let l=nv(e,t,n);l.el.classList.add("pptxv-inspector-body"),o.appendChild(l.el);let d=jb(e,t,n);o.appendChild(d.el);let u="properties",m=D=>{u=D;for(let[R,F]of i)F.classList.toggle("is-active",R===D),F.setAttribute("aria-selected",String(R===D));s.el.hidden=D!=="elements",p.hidden=D!=="properties",l.el.hidden=D!=="comments";},g=vv(e,t,n);p.appendChild(g.el);let x=D=>{let R=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-inspector-section"),F=chunkR2NUNRIB_cjs.Ok(e,"h4","pptxv-inspector-section-title");return F.textContent=D,R.appendChild(F),p.appendChild(R),R},v=Lv(e,t,x,n.setGeometry,n.toggleElementLock),f=Cv(e,t,x),b=Iv(e,t,x),h=wv(e,t,x,n),S=Dv(e,t,x,n),E=Gv(e,t,x,n),T=zv(e,t,x,n),k=Ev(e,t,x,n),y=Hv(e,t,n);p.appendChild(y.el);let w=Bv(e,t,x,n),C=Mv(e,t,x,n),A=Fb(e,t,x,n),P=ev(e,t,x,n),I=kv(e,t,x,n),L=[v,f,b,h,S,E,T,k,y,w,C,A,P,I];return m(u),{el:o,update(D){g.setVisible(!D.hasSelection);for(let R of L)R.update(D);},updateDeck(D){A.setSlideCount(D.slideCount),s.update(D),l.update(D),g.update(D),d.update({editable:D.editable,selectedElementId:D.selectedElementId,elements:D.elements,animations:D.activeSlide?.animations??[]});},setEditable(D){o.hidden=!D,y.setEditable(D);}}}var Uv=128,Rw=[1,2,3,4,6,9],Ow={body:"pptx.master.notesMasterBody",sldImg:"pptx.master.notesMasterSlideImage",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function Ai(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-master-card"),a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-card-label");a.textContent=t("pptx.master.notesMasterBackground");let s=chunkR2NUNRIB_cjs.Ok(e,"input","pptxv-master-background");s.type="color",s.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",s.setAttribute("aria-label",t("pptx.master.backgroundColorLabel")),s.addEventListener("input",()=>r(s.value)),i.append(a,s),n.appendChild(i);}function $v(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-master-card"),a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-card-label");if(a.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(a),o.length===0){let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-empty");s.textContent=t("pptx.master.noPlaceholders"),i.appendChild(s);}for(let s of o){let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-placeholder"),l=chunkR2NUNRIB_cjs.Ok(e,"span",`pptxv-master-dot is-${r}`);p.append(l,e.createTextNode(t(Ow[s.type]??s.type))),i.appendChild(p);}n.appendChild(i);}function Fw(e,t){return chunkR2NUNRIB_cjs.dj({slideMasters:[e]},{tab:"slides",masterIndex:0,layoutIndex:t})??{id:e.path,rId:"",slideNumber:0,elements:[]}}function Bw(e,t,n,o){o.editable&&Ai(e,t,n,chunkR2NUNRIB_cjs.gj({slideMasters:o.masters},{tab:"slides",masterIndex:o.active.masterIndex,layoutIndex:o.active.layoutIndex})??"#ffffff",o.onMasterBackgroundColorChange);let r=Uv/Math.max(o.canvasSize.width,1);for(let[i,a]of o.masters.entries()){let s=[{layoutIndex:null,label:a.name||t("pptx.master.master")},...a.layouts?.map((p,l)=>({layoutIndex:l,label:p.name||t("pptx.master.layout")}))??[]];for(let p of s){let l=chunkR2NUNRIB_cjs.Ok(e,"button",`pptxv-master-thumb${p.layoutIndex===null?"":" is-layout"}`);l.type="button",l.setAttribute("aria-label",p.label);let d=o.active.masterIndex===i&&o.active.layoutIndex===p.layoutIndex;l.classList.toggle("is-active",d),d&&l.setAttribute("aria-current","page");let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-master-thumb-name");u.textContent=p.label;let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-master-thumb-frame");m.style.width=`${Uv}px`,m.style.height=`${Math.round(o.canvasSize.height*r)}px`,m.appendChild(o.renderStage(Fw(a,p.layoutIndex),r)),l.append(u,m),l.addEventListener("click",()=>o.onSelect(i,p.layoutIndex)),n.appendChild(l);}}}function ki(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-master-sidebar");return n.hidden=true,n.setAttribute("aria-label",t("pptx.view.masterViews")),{el:n,render(o){n.replaceChildren();let r=chunkR2NUNRIB_cjs.Ok(e,"header","pptxv-master-header"),i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let a=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-master-collapse");a.type="button",a.textContent="\u2039",a.title=t("pptx.masterView.collapse"),a.setAttribute("aria-label",t("pptx.masterView.collapse")),a.addEventListener("click",o.onCollapse),r.append(i,a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-tabs");s.setAttribute("role","tablist");for(let[l,d]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let u=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-master-tab");u.type="button",u.role="tab",u.textContent=t(d),u.setAttribute("aria-selected",String(o.tab===l)),u.classList.toggle("is-active",o.tab===l),u.addEventListener("click",()=>o.onTabChange(l)),s.appendChild(u);}let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-body");if(p.setAttribute("role","tabpanel"),o.tab==="slides")Bw(e,t,p,o);else if(o.tab==="notes")o.notesMasterPresent?(Ai(e,t,p,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),$v(e,t,p,o.notesPlaceholders??[],"notes")):(p.textContent=t("pptx.master.noNotesMaster"),p.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)p.textContent=t("pptx.master.noHandoutMaster"),p.classList.add("pptxv-master-empty");else {let l=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-master-card"),d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-card-label");d.textContent=t("pptx.master.handoutSlidesPerPage");let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-master-counts");for(let m of Rw){let g=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-master-count");g.type="button",g.textContent=String(m),g.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===m)),g.classList.toggle("is-active",o.handoutSlidesPerPage===m),g.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(m)),u.appendChild(g);}l.append(d,u),p.appendChild(l),Ai(e,t,p,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),$v(e,t,p,o.handoutPlaceholders??[],"handout");}n.append(r,s,p);},setVisible(o){n.hidden=!o;}}}var Wv=148;function Ii(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-actions"),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-sheet-host");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let p=e.createElement("button");p.type="button",p.className="pptxv-mobile-sheet-backdrop",p.setAttribute("aria-label",t("pptx.settings.close"));let l=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-mobile-sheet"),d=chunkR2NUNRIB_cjs.Ok(e,"header","pptxv-mobile-sheet-header"),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-sheet-handle"),m=e.createElement("strong");d.append(u,m);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-sheet-body");l.append(d,g),s.append(p,l),s.hidden=true,a.appendChild(s);let x=null,v=0,f=[],b=[],h=true,S=false,E=null,T=960,k=540,y=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(y,r);let w=()=>{r&&y?.parentNode&&y.parentNode.insertBefore(r,y.nextSibling);},C=()=>{x=null,s.hidden=true,l.style.transform="",w();for(let M of L.querySelectorAll("button"))M.setAttribute("aria-pressed","false");};p.addEventListener("click",C);let A=chunkR2NUNRIB_cjs.bi((M,O)=>{l.style.transform=M>0?`translateY(${M}px)`:"",l.style.transition=O?"none":"";},C),P=M=>({clientY:M.clientY,pointerId:M.pointerId,currentTarget:d});d.addEventListener("pointerdown",M=>A.pointerDown(P(M))),d.addEventListener("pointermove",M=>A.pointerMove(P(M))),d.addEventListener("pointerup",M=>A.pointerUp(P(M))),d.addEventListener("pointercancel",M=>A.cancel(P(M)));let I=M=>{if(g.replaceChildren(),m.textContent=t(M==="inspector"?"pptx.field.format":`pptx.${M==="slides"?"sections.slides":M==="comments"?"toolbar.comments":M==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),s.setAttribute("aria-label",m.textContent),M==="slides"){let O=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-slide-list"),B=Wv/Math.max(T,1);for(let V=0;V<f.length;V+=1){let z=e.createElement("button");z.type="button";let N=chunkR2NUNRIB_cjs.zk(f[V],V);z.setAttribute("aria-label",N),z.classList.toggle("is-active",V===v),V===v&&z.setAttribute("aria-current","true");let _=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-slide-num");if(_.textContent=String(V+1),z.appendChild(_),E){let K=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-slide-frame",{width:`${Wv}px`,height:`${Math.round(k*B)}px`});K.appendChild(E(f[V],B)),z.appendChild(K);}else {let K=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-slide-title");K.textContent=N,z.appendChild(K);}z.addEventListener("click",()=>{o(V),C();}),O.appendChild(z);}g.appendChild(O);}else if(M==="insert"){let O=[[t("pptx.insert.addTextBox"),()=>n.insert.insert("text")],[t("pptx.ribbon.rectangle"),()=>n.insert.insert("shape","rect")],[t("pptx.insert.insertTable"),()=>n.insert.insert("table")]];for(let[B,V]of O){let z=e.createElement("button");z.type="button",z.textContent=B,z.addEventListener("click",V),g.appendChild(z);}}else if(M==="inspector"&&r)g.appendChild(r);else if(M==="comments"){b.length===0&&(g.textContent=t("pptx.comments.noneOnSlide"));for(let z of b){let N=chunkR2NUNRIB_cjs.Ok(e,"article","pptxv-mobile-comment"),_=e.createElement("textarea");_.value=z.text,_.setAttribute("aria-label",t("pptx.comments.edit"));let K=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-comment-actions"),$=e.createElement("button");$.type="button",$.textContent=t("pptx.comments.save"),$.addEventListener("click",()=>n.edit.comments.editComment(z.id,_.value));let he=e.createElement("button");he.type="button",he.textContent=z.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),he.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(z.id));let be=e.createElement("button");be.type="button",be.textContent=t("pptx.comments.delete"),be.addEventListener("click",()=>n.edit.comments.deleteComment(z.id)),K.append($,he,be),N.append(_,K),g.appendChild(N);}let O=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-comment-add"),B=e.createElement("textarea");B.placeholder=t("pptx.comments.addPlaceholder"),B.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let V=e.createElement("button");V.type="button",V.textContent=t("pptx.comments.addComment"),V.addEventListener("click",()=>{n.edit.comments.addComment(B.value)&&(B.value="");}),O.append(B,V),g.appendChild(O);}else {let O=[[t("pptx.ribbon.insert"),()=>n.insert.insert("text"),null],[t("pptx.presenter.previousSlide"),n.nav.prev,"navigation"],[t("pptx.presenter.nextSlide"),n.nav.next,"navigation"],[t("pptx.statusBar.zoomOut"),n.nav.zoomOut,"zoom"],[t("pptx.statusBar.zoomIn"),n.nav.zoomIn,"zoom"],[t("pptx.notes.title"),n.nav.toggleNotes,"notes"],[t("pptx.statusBar.slideShow"),n.nav.togglePresentation,"fullscreen"]];for(let[B,V,z]of O){if(z&&chunkR2NUNRIB_cjs.Qj(z,i))continue;let N=e.createElement("button");N.type="button",N.textContent=B,N.addEventListener("click",V),g.appendChild(N);}}},L=e.createElement("nav");L.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let D=M=>{if(x=chunkR2NUNRIB_cjs.Ch(x,M),!x){C();return}I(x),s.hidden=false;for(let O of L.querySelectorAll("button"))O.setAttribute("aria-pressed",String(O.dataset.mobileAction===x));},R={slides:"layers",insert:"plus",inspector:"sliders",comments:"comment",notes:"sticky-note"};for(let M of chunkR2NUNRIB_cjs.Dh({slideCount:0})){let O=M.key;if(O==="notes"&&chunkR2NUNRIB_cjs.Qj("notes",i))continue;let B=e.createElement("button");B.type="button",B.dataset.mobileAction=O,O==="notes"&&B.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),B.appendChild(chunkR2NUNRIB_cjs.Zk(e,R[O]));let V=chunkR2NUNRIB_cjs.Ok(e,"span");V.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"notes.title"}`),B.appendChild(V),B.addEventListener("click",()=>{if(O==="notes"){n.nav.toggleNotes();return}if(O==="insert"){n.insert.insert("text");return}D(O);}),L.appendChild(B);}a.appendChild(L);let F=()=>{let M=chunkR2NUNRIB_cjs.Dh({slideCount:f.length});for(let O of M){let B=L.querySelector(`button[data-mobile-action='${O.key}']`);if(!B)continue;let V=O.key==="insert"||O.key==="inspector"||O.key==="comments";B.disabled=O.disabled||V&&!h||O.key==="inspector"&&!r,B.setAttribute("aria-pressed",String(O.key==="notes"?S:O.key===x));}};return {el:a,update(M,O,B){v=M,f=O,b=B,x&&I(x),F();},setThumbnailRenderer(M,O,B){E=M,T=O,k=B,x==="slides"&&I(x);},toggle:D,close:C,setEditable(M){h=M,!h&&x&&["insert","inspector","comments"].includes(x)&&C(),F();},setNotesExpanded(M){S=M,F();}}}function Li(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=H(e,{label:t("pptx.mobileToolbar.menu"),icon:"menu",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),a=chunkR2NUNRIB_cjs.Qj("undo",o)?null:H(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),s=chunkR2NUNRIB_cjs.Qj("redo",o)?null:H(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-toolbar-spacer"),l=H(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),d=chunkR2NUNRIB_cjs.Qj("fullscreen",o)?null:H(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-toolbar-ai"),m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...a?[a.btn]:[],...s?[s.btn]:[],p,u,l.btn,...d?[d.btn]:[],m),{el:r,collaborationHost:m,aiHost:u,setEditState({editable:g,canUndo:x,canRedo:v}){for(let f of [i.btn,a?.btn,s?.btn])f&&(f.hidden=!g);m.hidden=!g,u.hidden=!g,a?.setDisabled(!x),s?.setDisabled(!v);}}}function Di(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes"),i=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-notes-header");i.type="button",i.setAttribute("aria-expanded","false"),i.setAttribute("aria-controls","slide-notes-content"),i.addEventListener("click",n),r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-notes-title");a.textContent=t("pptx.notes.title"),i.appendChild(a);let s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-notes-chevron");s.setAttribute("aria-hidden","true"),i.appendChild(s);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes-body");p.id="slide-notes-content",r.appendChild(p);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes-toolbar");p.appendChild(l);let d=e.createElement("button");d.type="button",d.className="pptxv-notes-mode",l.appendChild(d);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-notes-rich-editor");u.contentEditable="true",u.setAttribute("role","textbox"),u.setAttribute("aria-multiline","true"),u.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(u);let m=e.createElement("textarea");m.className="pptxv-notes-textarea",m.name="slide-notes",m.spellcheck=true,m.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),p.appendChild(m);let g=false,x=null,v=false,f=chunkR2NUNRIB_cjs.Qc(),b=[],h,S,E=C=>{f=C,u.hidden=!f,m.hidden=f,l.hidden=!v,d.textContent=t(f?"pptx.notes.plainEditor":"pptx.notes.richEditor"),d.setAttribute("aria-pressed",String(f));},T=()=>{if(!v)return;let C=chunkR2NUNRIB_cjs.Rc(u);b=C.segments,o(C.text,C.segments);},k=(C,A,P)=>{let I=e.createElement("button");I.type="button",I.className="pptxv-notes-tool",I.textContent=C,I.title=A,I.setAttribute("aria-label",A),I.addEventListener("mousedown",L=>L.preventDefault()),I.addEventListener("click",()=>{u.focus(),P(),T();}),l.insertBefore(I,d);};k("B",t("pptx.notes.bold"),()=>chunkR2NUNRIB_cjs.Tc("bold")),k("I",t("pptx.notes.italic"),()=>chunkR2NUNRIB_cjs.Tc("italic")),k("U",t("pptx.notes.underline"),()=>chunkR2NUNRIB_cjs.Tc("underline")),k("S",t("pptx.notes.strikethrough"),()=>chunkR2NUNRIB_cjs.Tc("strikeThrough")),k("\u2022",t("pptx.notes.bulletList"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"bullet").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("1.",t("pptx.notes.numberedList"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"numbered").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("\u2192",t("pptx.notes.indent"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"indent").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("\u2190",t("pptx.notes.outdent"),()=>{b=chunkR2NUNRIB_cjs.Sc(u,b,"outdent").segments,u.innerHTML=chunkR2NUNRIB_cjs.Nc(b);}),k("\u2197",t("pptx.notes.insertLink"),()=>{let C=e.getSelection()?.toString()??"",A=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!A)return;let P=window.prompt(t("pptx.notes.linkDisplayText"),C)??C;chunkR2NUNRIB_cjs.Vc(chunkR2NUNRIB_cjs.Uc(A),P);}),k("\u{1F5A8}",t("pptx.notes.printNotes"),()=>{if(!h)return;let C=chunkR2NUNRIB_cjs.Wc([h],I=>t("pptx.notes.slideN",{n:I}),S),A=e.createElement("iframe");A.setAttribute("aria-hidden","true"),A.setAttribute("sandbox","allow-same-origin"),A.style.cssText="position:fixed;right:0;bottom:0;width:0;height:0;border:0",e.body.appendChild(A);let P=A.contentWindow?.document;if(!P){A.remove();return}P.open(),P.write(C),P.close(),setTimeout(()=>{A.contentWindow?.focus(),A.contentWindow?.print(),setTimeout(()=>A.remove(),1e3);},200);}),d.addEventListener("click",()=>{f?(T(),m.value=chunkR2NUNRIB_cjs.Mc(b)):(b=chunkR2NUNRIB_cjs.Lc(m.value),u.innerHTML=chunkR2NUNRIB_cjs.Nc(b)),E(!f);});let y=()=>{v&&o(m.value);};m.addEventListener("change",y),m.addEventListener("blur",y),u.addEventListener("blur",T);let w=()=>{r.dataset.collapsed=g?"false":"true",i.setAttribute("aria-expanded",String(g)),p.hidden=!g,s.textContent=g?"\u25BE":"\u25B8";};return w(),E(f),{el:r,update({slide:C,editable:A,notesStyle:P}){v=A,h=C,S=P;let I=C!==void 0;m.disabled=!I,m.readOnly=!v,u.contentEditable=String(v&&I),l.hidden=!v,m.placeholder=t(I?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let L=C?.id??null;L!==x&&(x=L,b=chunkR2NUNRIB_cjs.Pc(C,P),m.value=chunkR2NUNRIB_cjs.Mc(b),u.innerHTML=chunkR2NUNRIB_cjs.Nc(b));},setExpanded(C){g=C,w();}}}function Kv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-palette");o.hidden=true;let r=n.colors.map(i=>{let a=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-present-swatch");a.type="button",a.dataset.pptxPresentSwatch=i,a.style.backgroundColor=i;let s=t(n.swatchLabelKey,{color:i});return a.title=s,a.setAttribute("aria-label",s),a.addEventListener("click",p=>{p.stopPropagation(),n.onPick(i);}),o.appendChild(a),{color:i,swatch:a}});return {el:o,setOpen(i){o.hidden=!i;},isOpen:()=>!o.hidden,setValue(i){for(let a of r){let s=a.color===i;a.swatch.classList.toggle("is-selected",s),a.swatch.setAttribute("aria-pressed",String(s));}}}}function Me(e,t,n){let o=H(e,{label:t(n.labelKey),icon:n.icon,className:`pptxv-present-btn${n.className?` ${n.className}`:""}`,onClick:n.onClick});return o.btn.dataset.pptxPresentControl=n.id,o}function Nw(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-group"),r=Me(e,t,{id:n.id,labelKey:n.labelKey,icon:n.icon,onClick:n.onSelect}),i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-present-swatch-bar");r.btn.appendChild(i);let a=Me(e,t,{id:`${n.id}-color`,labelKey:n.caretLabelKey,icon:"chevron-down",className:"pptxv-present-caret",onClick:n.onCaret}),s=Kv(e,t,{colors:n.colors,swatchLabelKey:n.swatchLabelKey,onPick:n.onPick});return o.append(r.btn,a.btn,s.el),{el:o,toggle:r,palette:s,bar:i}}function qv(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-toolbar-wrap");for(let[w,C]of Object.entries(chunkR2NUNRIB_cjs.gg()))r.style.setProperty(w,C);let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-toolbar");i.setAttribute("data-pptx-present-toolbar",""),i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria")),r.appendChild(i);let a=w=>{let C=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-divider");return C.dataset.pptxPresentControl=w,C},s=Me(e,t,{id:"previous",labelKey:"pptx.presenter.previousSlide",icon:"chevron-left",onClick:n.previous}),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-present-counter");p.dataset.pptxPresentControl="counter";let l=Me(e,t,{id:"next",labelKey:"pptx.presenter.nextSlide",icon:"chevron-right",onClick:n.next}),d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-timer");d.dataset.pptxPresentControl="timer",d.title=t("pptx.presenter.elapsed"),d.setAttribute("aria-label",t("pptx.presenter.elapsed"));let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-present-elapsed");d.append(chunkR2NUNRIB_cjs.Zk(e,"timer"),u);let m=Me(e,t,{id:"laser",labelKey:"pptx.presentation.laserPointer",icon:"cursor",onClick:()=>n.setTool("laser")}),g=null,x=()=>{b.palette.setOpen(g==="pen"),h.palette.setOpen(g==="highlighter");},v=()=>{g=null,x();},f=w=>Nw(e,t,{...w,onSelect:()=>{v(),n.setTool(w.id);},onPick:C=>{v(),n.setColor(C),n.setTool(w.id),o(w.id,C);},onCaret:()=>{g=g===w.id?null:w.id,x();}}),b=f({id:"pen",labelKey:"pptx.presentation.pen",icon:"pen",caretLabelKey:"pptx.presentationToolbar.penColor",colors:chunkR2NUNRIB_cjs.cg,swatchLabelKey:"pptx.presentationToolbar.penColorValue"}),h=f({id:"highlighter",labelKey:"pptx.presentation.highlighter",icon:"highlighter",caretLabelKey:"pptx.presentationToolbar.highlighterColor",colors:chunkR2NUNRIB_cjs.dg,swatchLabelKey:"pptx.presentationToolbar.highlighterColorValue"}),S=Me(e,t,{id:"eraser",labelKey:"pptx.presentation.eraser",icon:"eraser",onClick:()=>{v(),n.setTool("eraser");}}),E=Me(e,t,{id:"blackboard",labelKey:"pptx.presentation.blackboard",icon:"presentation",onClick:()=>{v(),n.toggleBlackboard();}}),T=Me(e,t,{id:"clear",labelKey:"pptx.presentation.clearAnnotations",icon:"trash",className:"pptxv-present-danger",onClick:n.clearAnnotations}),k=Me(e,t,{id:"presenter-view",labelKey:"pptx.presenter.presenterView",icon:"panel-right",onClick:n.togglePresenterView}),y=Me(e,t,{id:"end",labelKey:"pptx.presenter.endPresentation",icon:"close",className:"pptxv-present-danger",onClick:n.end});i.append(s.btn,p,l.btn,a("divider-navigation"),d,a("divider-timer"),m.btn,b.el,h.el,S.btn,E.btn,T.btn,a("divider-tools"),k.btn,y.btn);for(let w of ["pointerdown","click"])i.addEventListener(w,C=>C.stopPropagation());return {wrap:r,bar:i,previous:s,counter:p,next:l,elapsedText:u,laser:m,pen:b,highlighter:h,eraser:S,blackboard:E,clear:T,presenterView:k,end:y,closePalettes:v}}function Mi(e,t,n,o){let r={current:0,total:0,tool:"none",blackout:"none",hasAnnotations:false,presenterViewActive:false},i=chunkR2NUNRIB_cjs.cg[0]??"#ff0000",a=chunkR2NUNRIB_cjs.dg[0]??"#ffff00",s=qv(e,t,o,(y,w)=>{y==="pen"?i=w:a=w,d();}),{wrap:p,bar:l}=s;function d(){s.counter.textContent=chunkR2NUNRIB_cjs.fg(r.current,r.total),s.previous.setDisabled(r.current<=0),s.next.setDisabled(r.current>=r.total-1),s.laser.setActive(r.tool==="laser"),s.pen.toggle.setActive(r.tool==="pen"),s.highlighter.toggle.setActive(r.tool==="highlighter"),s.eraser.setActive(r.tool==="eraser"),s.blackboard.setActive(chunkR2NUNRIB_cjs.jg(r.blackout,r.tool)),s.clear.setDisabled(!r.hasAnnotations),s.presenterView.setActive(r.presenterViewActive),s.pen.bar.style.backgroundColor=i,s.highlighter.bar.style.backgroundColor=a,s.pen.palette.setValue(i),s.highlighter.palette.setValue(a);}let u=null,m=false,g=false,x=0,v=null,f=y=>{m=y,p.style.opacity=y?"1":"0",p.style.pointerEvents=y?"auto":"none";},b=()=>{u!==null&&(window.clearTimeout(u),u=null);},h=()=>{b(),u=window.setTimeout(()=>{g||f(false);},chunkR2NUNRIB_cjs.bg);},S=y=>{let w=n.getBoundingClientRect();if(chunkR2NUNRIB_cjs.eg(y.clientY,w.height,w.top)){f(true),h();return}f(true),h();},E=y=>{y.target instanceof Node&&!l.contains(y.target)&&s.closePalettes();};p.addEventListener("mouseenter",()=>{g=true,b(),f(true);}),p.addEventListener("mouseleave",()=>{g=false,h();});let T=()=>{s.elapsedText.textContent=chunkR2NUNRIB_cjs.Bf(x===0?0:Date.now()-x);},k=()=>{e.removeEventListener("mousemove",S),e.removeEventListener("mousedown",E),b(),v!==null&&(window.clearInterval(v),v=null),x=0,g=false,s.closePalettes(),T(),f(false);};return f(false),T(),d(),{el:p,update(y){Object.assign(r,y),d();},setPresenting(y){if(!y){k();return}x=Date.now(),T(),v??=window.setInterval(T,1e3),e.addEventListener("mousemove",S),e.addEventListener("mousedown",E),f(true),h();},toggleVisible(){if(m){b(),f(false);return}f(true),h();},dispose(){k(),p.remove();}}}function Hi(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=H(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),a=!chunkR2NUNRIB_cjs.Qj("navigation",o),s=a?H(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,p=a?H(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-presentation-touch-counter");l.setAttribute("aria-live","polite");for(let d of [i.btn,s?.btn,p?.btn])d?.addEventListener("pointerdown",u=>u.stopPropagation()),d?.addEventListener("click",u=>u.stopPropagation());return r.append(i.btn,...s?[s.btn]:[],...p?[p.btn]:[],l),{el:r,update(d,u){let m=chunkR2NUNRIB_cjs.ai(d,u);s?.setDisabled(m.previousDisabled),p?.setDisabled(m.nextDisabled),l.textContent=m.counterLabel;}}}function jv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let a=chunkR2NUNRIB_cjs.Ok(e,"header","pptxv-eqdlg-header"),s=chunkR2NUNRIB_cjs.Ok(e,"h2");s.textContent=t("pptx.equation.insertTitle");let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-eqdlg-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),a.append(s,p);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-preview"),d=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-eqdlg-field"),u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-label");u.textContent=t("pptx.equation.latexInput");let m=e.createElement("textarea");m.className="pptxv-eqdlg-input",m.rows=3,m.placeholder="\\frac{a}{b} + \\sqrt{c}",m.spellcheck=false;let g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-hint");g.textContent=t("pptx.equation.latexHint"),d.append(u,m,g);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-field"),v=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-label");v.textContent=t("pptx.equation.templates");let f=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-eqdlg-grid"),b=[],h=chunkR2NUNRIB_cjs.ga();for(let[L,D]of chunkR2NUNRIB_cjs.ea.entries()){let R=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-eqdlg-template");R.type="button",R.title=t(D.i18nKey);let F=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-template-math");F.innerHTML=h[L]??"";let M=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-eqdlg-template-label");M.textContent=t(D.i18nKey),R.append(F,M),R.addEventListener("click",()=>{m.value=D.latex,C(),m.focus();}),f.appendChild(R),b.push(R);}x.append(v,f);let S=()=>{let L=m.value.trim();if(!L)return null;try{let D=chunkR2NUNRIB_cjs.ca(L);return Object.keys(D).length>0?D:null}catch{return null}},E=true,T,k=chunkR2NUNRIB_cjs.Ok(e,"footer","pptxv-eqdlg-footer"),y=H(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>P(false)}),w=H(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let L=S();L&&(n(L,T),m.value="",C(),P(false));}});w.btn.classList.add("is-primary"),k.append(y.btn,w.btn),i.append(a,l,d,x,k),o.append(r,i);let C=()=>{let L=chunkR2NUNRIB_cjs.fa(m.value);L?(l.classList.remove("is-empty"),l.innerHTML=L):(l.classList.add("is-empty"),l.textContent=t("pptx.equation.previewPlaceholder"));let D=m.value;for(let[R,F]of b.entries())F.classList.toggle("is-active",chunkR2NUNRIB_cjs.ea[R]?.latex===D);w.setDisabled(!E||S()===null);};m.addEventListener("input",C),o.addEventListener("keydown",L=>{L.stopPropagation(),L.key==="Escape"?P(false):L.key==="Enter"&&(L.ctrlKey||L.metaKey)&&(L.preventDefault(),w.btn.click());}),r.addEventListener("click",()=>P(false)),p.addEventListener("click",()=>P(false));let A=false,P=L=>{A=L,o.hidden=!A,A?m.focus():T=void 0;},I=()=>{let L=T!==void 0,D=t(L?"pptx.equation.editTitle":"pptx.equation.insertTitle"),R=t(L?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",D),s.textContent=D,w.btn.textContent=R,w.btn.title=R,w.btn.setAttribute("aria-label",R);};return C(),{el:o,toggle:()=>{A||(T=void 0,m.value="",I(),C()),P(!A);},setOpen:P,isOpen:()=>A,setEditable(L){E=L,m.disabled=!L,w.setDisabled(!L||S()===null);},openEdit(L,D){T=L,m.value=chunkR2NUNRIB_cjs.da(D),I(),C(),P(true);}}}function Ri(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-findreplace");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.findReplace.ariaLabel"));let r=e.createElement("input");r.type="text",r.className="pptxv-findreplace-input",r.placeholder=t("pptx.findReplace.findPlaceholder"),r.setAttribute("aria-label",t("pptx.findReplace.searchText"));let i=e.createElement("input");i.type="text",i.className="pptxv-findreplace-input",i.placeholder=t("pptx.findReplace.replacePlaceholder"),i.setAttribute("aria-label",t("pptx.findReplace.replacementText"));let a=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-findreplace-checkbox"),s=e.createElement("input");s.type="checkbox",s.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),a.append(s,e.createTextNode(t("pptx.findReplace.matchCase")));let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-findreplace-status");p.setAttribute("aria-live","polite");let l=()=>{let b=n.search(r.value,s.checked);p.textContent=b>0?t("pptx.findReplace.matchCount",{current:1,total:b}):t("pptx.findReplace.noMatches");},d=H(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:l}),u=H(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,s.checked),l();}}),m=H(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,s.checked),l();}}),g=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>f(false)});r.addEventListener("input",l),r.addEventListener("keydown",b=>{b.key==="Escape"&&(b.stopPropagation(),f(false));});let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-findreplace-row");x.append(r,i,a,d.btn,u.btn,m.btn,g.btn),o.append(x,p);let v=false,f=b=>{v=b,o.hidden=!v,v&&r.focus();};return {el:o,toggle:()=>f(!v),setOpen:f,isOpen:()=>v,setEditable(b){i.disabled=!b,u.setDisabled(!b),m.setDisabled(!b);}}}function Yv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=ze(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:u=>n.setSlideBackgroundColor(u)},"#ffffff"),i=H(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),a=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>d(false)}),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-format-background-row"),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-format-background-label");p.textContent=t("pptx.slideBackground.colour"),s.append(p,r.el,i.btn,a.btn),o.appendChild(s);let l=false,d=u=>{l=u,o.hidden=!l;};return {el:o,toggle:()=>d(!l),setOpen:d,isOpen:()=>l,setEditable(u){r.setDisabled(!u),i.setDisabled(!u);}}}var Vw=24,zw=1,_w=400;function Ee(e){return e!==void 0&&chunkR2NUNRIB_cjs.c(e)}function Cn(e){return e!==void 0&&chunkR2NUNRIB_cjs.d(e)}function Ue(e){let t=Ee(e)?e.textStyle:void 0,n=Ee(e)?e.textSegments?.find(o=>o.text)?.style:void 0;return {bold:!!(t?.bold??n?.bold),italic:!!(t?.italic??n?.italic),underline:!!(t?.underline??n?.underline),strikethrough:!!(t?.strikethrough??n?.strikethrough),hasTextShadow:!!(t?.textShadowColor??n?.textShadowColor),fontSize:t?.fontSize??n?.fontSize??Vw,fontFamily:t?.fontFamily??n?.fontFamily,placeholderType:e?.placeholderType,color:t?.color??n?.color,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:t?.listType??n?.listType,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function Je(e,t){if(!Ee(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function Pt(e,t){let n=Ue(e);return Je(e,{[t]:!n[t]})}function En(e,t){let n=Math.min(_w,Math.max(zw,Math.round(t)));return Je(e,{fontSize:n})}function Oi(e,t){return En(e,Ue(e).fontSize+t)}function Fi(e,t){return Je(e,{color:t})}function Bi(e,t){return Je(e,{highlightColor:t})}function $e(e,t){return Cn(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function Ni(e,t){return Je(e,{fontFamily:t})}function Vi(e,t){return Je(e,{characterSpacing:t})}var Gw={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function zi(e){let t=Ue(e).hasTextShadow;return Je(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:Gw)}function _i(e,t){if(!Ee(e)||!e.textSegments)return {};let n=chunkR2NUNRIB_cjs.md(e.textSegments,null,t);return {textSegments:n,text:n.map(o=>o.text).join("")}}function Gi(e){return Je(e,{bold:false,italic:false,underline:false,strikethrough:false,highlightColor:void 0,textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0,characterSpacing:void 0})}var Ui=1;function Xv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-arrange-extras"),r=H(e,{label:t("pptx.contextMenu.group"),icon:"group",onClick:n.groupSelected}),i=H(e,{label:t("pptx.contextMenu.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),a=e.createElement("input");return a.type="number",a.className="pptxv-field-input pptxv-arrange-stroke",a.min="0",a.max="120",a.step="0.5",a.value=String(Ui),a.title=t("pptx.ribbon.strokeWidth"),a.setAttribute("aria-label",t("pptx.ribbon.strokeWidth")),a.addEventListener("keydown",s=>s.stopPropagation()),a.addEventListener("change",()=>{let s=Number.parseFloat(a.value);Number.isFinite(s)&&n.setStrokeWidth(Math.max(0,s));}),o.append(r.btn,i.btn,a),{el:o,update({editable:s,selectedCount:p,selectedElement:l}){r.setDisabled(!s||p<2),i.setDisabled(!s||l?.type!=="group");let d=l!==void 0&&chunkR2NUNRIB_cjs.d(l);a.disabled=!s||!d;let u=l!==void 0&&chunkR2NUNRIB_cjs.d(l)?l.shapeStyle?.strokeWidth??Ui:Ui;e.activeElement!==a&&(a.value=String(u));}}}var Uw=[{edge:"left",label:"left",icon:"align-left"},{edge:"centerH",label:"center",icon:"align-center"},{edge:"right",label:"right",icon:"align-right"},{edge:"top",label:"top",icon:"align-top"},{edge:"middle",label:"middle",icon:"align-middle"},{edge:"bottom",label:"bottom",icon:"align-bottom"}],Zv=3;function Qv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.arrange.groupLabel"),o.appendChild(i);let a=Uw.map(S=>H(e,{label:t("pptx.arrange.align",{direction:S.label}),icon:S.icon,onClick:()=>n.alignElements(S.edge)})),s=H(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),p=H(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),l=H(e,{label:t("pptx.arrange.format"),icon:"copy",textLabel:t("pptx.arrange.format"),onClick:n.toggleFormatPainter});l.btn.title=t("pptx.arrange.formatPainter");let d=H(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),u=H(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),m=H(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),g=H(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),x=H(e,{label:t("pptx.arrange.back"),icon:"send-back",onClick:n.sendToBack});x.btn.title=t("pptx.arrange.sendToBack");let v=H(e,{label:t("pptx.arrange.front"),icon:"bring-front",onClick:n.bringToFront});v.btn.title=t("pptx.arrange.bringToFront");let f=H(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",textLabel:t("pptx.arrange.duplicate"),onClick:n.duplicate}),b=H(e,{label:t("pptx.arrange.delete"),icon:"trash",textLabel:t("pptx.arrange.delete"),onClick:n.delete}),h=Xv(e,t,n);return r.append(...a.map(S=>S.btn),s.btn,p.btn,l.btn,d.btn,u.btn,h.el,m.btn,g.btn,x.btn,v.btn,f.btn,b.btn),{el:o,update({editable:S,hasSelection:E,formatPainterActive:T,selectedCount:k,selectedElement:y}){let w=S&&E;for(let C of [...a,d,u,m,g,x,v,f,b])C.setDisabled(!w);h.update({editable:S,selectedCount:k,selectedElement:y}),l.setDisabled(!S||!E&&!T),l.btn.dataset.active=String(T),s.setDisabled(!S||k<Zv),p.setDisabled(!S||k<Zv);}}}function Jv(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let a=H(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),s=H(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),p=H(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),l=H(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return l.btn.dataset.testid="format-painter-toggle",r.append(a.btn,s.btn,p.btn,l.btn),{el:o,update({hasSelection:d,hasClipboard:u,editable:m,formatPainterActive:g}){a.setDisabled(!m||!u),s.setDisabled(!m||!d),p.setDisabled(!d),l.setDisabled(!m||!d&&!g),l.btn.dataset.active=String(g);}}}function oe(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-dropdown"),o=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-dropdown-trigger");o.type="button",o.title=t.triggerLabel,o.setAttribute("aria-label",t.triggerLabel),o.setAttribute("aria-haspopup","listbox"),o.setAttribute("aria-expanded","false");let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunkR2NUNRIB_cjs.Zk(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let a=false,s,p=new Map,l=x=>{a=x,i.hidden=!x,o.setAttribute("aria-expanded",String(x)),o.classList.toggle("is-active",x);},d=()=>{for(let[x,v]of p){let f=s!==void 0&&v===s;x.classList.toggle("is-selected",f),x.setAttribute("aria-selected",String(f));}},u=null,m=x=>JSON.stringify(x.map(v=>[v.label,String(v.value),v.groupLabel??"",v.hint??"",v.style?Object.entries(v.style):0])),g=x=>{i.replaceChildren(),p.clear();for(let v of x){if(v.groupLabel){let b=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-dropdown-group");b.setAttribute("role","presentation"),b.textContent=v.groupLabel,i.appendChild(b);}let f=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-dropdown-item");if(f.type="button",f.setAttribute("role","option"),f.setAttribute("aria-selected","false"),f.textContent=v.label,v.hint){let b=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-dropdown-item-hint");b.textContent=v.hint,f.appendChild(b);}v.style&&Object.assign(f.style,v.style),f.addEventListener("click",()=>{l(false),t.onSelect(v.value);}),i.appendChild(f),p.set(f,v.value);}d();};return g(t.items),o.addEventListener("click",x=>{x.stopPropagation(),l(!a);}),e.addEventListener("pointerdown",x=>{a&&!n.contains(x.target)&&l(false);}),{el:n,setDisabled(x){o.disabled=x,x&&l(false);},setTriggerText(x){r.textContent=x;},setSelected(x){s=x,d();},setItems(x){let v=m(x);v!==u&&(u=v,g(x),d());},close:()=>l(false)}}var We=["#000000","#ffffff","#ff0000","#00aa00","#0000ff","#ff8800","#8800cc","#00cccc","#ff69b4","#808080"];function $w(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function Ke(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-swatch-picker"),r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-dropdown-trigger pptxv-swatch-trigger");r.type="button",r.title=n.label,r.setAttribute("aria-label",n.label),r.setAttribute("aria-haspopup","true"),r.setAttribute("aria-expanded","false"),r.appendChild(chunkR2NUNRIB_cjs.Zk(e,n.icon));let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-swatch-menu");a.hidden=true,o.appendChild(a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-swatch-grid");a.appendChild(s);let p=n.fallback,l=new Map,d=()=>{for(let[v,f]of l)v.classList.toggle("is-selected",f===p);i.style.backgroundColor=p;},u=false,m=v=>{u=v,a.hidden=!v,r.setAttribute("aria-expanded",String(v)),r.classList.toggle("is-active",v);};for(let v of n.swatches){let f=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-swatch");f.type="button",f.setAttribute("data-pptx-compact",""),f.style.backgroundColor=v,f.setAttribute("aria-label",v),f.addEventListener("click",()=>{m(false),n.onSelect(v);}),s.appendChild(f),l.set(f,v);}let g=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-swatch-custom");g.textContent=t("pptx.ribbon.customColour");let x=e.createElement("input");return x.type="color",x.className="pptxv-swatch-custom-input",x.addEventListener("input",()=>n.onSelect(x.value)),g.appendChild(x),a.appendChild(g),r.addEventListener("click",v=>{v.stopPropagation(),m(!u);}),e.addEventListener("pointerdown",v=>{u&&!o.contains(v.target)&&m(false);}),d(),{el:o,setValue(v){p=$w(v,n.fallback),x.value=p,d();},setDisabled(v){r.disabled=v,v&&m(false);}}}var Ww=12;function ef(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.groupDrawing"),o.appendChild(i);let a=oe(e,{triggerLabel:t("pptx.drawing.shapes"),triggerText:t("pptx.drawing.shapes"),icon:"shapes",items:chunkR2NUNRIB_cjs.Ai.slice(0,Ww).map(u=>({label:t(u.i18nKey),value:u.type})),onSelect:u=>n.insertShape(u)}),s=oe(e,{triggerLabel:t("pptx.ribbon.arrange"),triggerText:t("pptx.ribbon.arrange"),icon:"bring-front",items:[{label:t("pptx.contextMenu.bringForward"),value:n.bringForward},{label:t("pptx.contextMenu.sendBackward"),value:n.sendBackward},{label:t("pptx.contextMenu.bringToFront"),value:n.bringToFront},{label:t("pptx.contextMenu.sendToBack"),value:n.sendToBack},{label:t("pptx.ribbon.group"),value:n.groupSelected},{label:t("pptx.ribbon.ungroup"),value:n.ungroupSelected}],onSelect:u=>u()}),p=Ke(e,t,{label:t("pptx.drawing.shapeFill"),icon:"square",swatches:We,fallback:"#ffffff",onSelect:u=>n.setShapeFill(u)}),l=Ke(e,t,{label:t("pptx.drawing.shapeOutline"),icon:"pen",swatches:We,fallback:"#000000",onSelect:u=>n.setShapeStroke(u)}),d=H(e,{label:t("pptx.drawing.shapeEffectsUnavailable"),icon:"sparkles",onClick:()=>{}});return d.setDisabled(true),r.append(a.el,s.el,p.el,l.el,d.btn),{el:o,update({editable:u,hasSelection:m}){a.setDisabled(!u);let g=u&&m;s.setDisabled(!g),p.setDisabled(!g),l.setDisabled(!g),d.setDisabled(true);}}}function tf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let a=H(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),s=H(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace}),p=Kw(e,t,n);return r.append(a.btn,s.btn,p.el),{el:o,update({editable:l}){p.setDisabled(!l);}}}function Kw(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu-host"),r=H(e,{label:t("pptx.ribbon.tool.select"),icon:"cursor",onClick:()=>s(!a)});r.btn.setAttribute("aria-haspopup","menu"),r.btn.setAttribute("aria-expanded","false");let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu");i.style.left="0",i.style.right="auto",i.style.minWidth="150px",i.hidden=true;let a=false,s=l=>{a=l,i.hidden=!l,r.btn.setAttribute("aria-expanded",String(l)),r.btn.classList.toggle("is-active",l);},p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-primary-menu-item");return p.type="button",p.textContent=t("pptx.editing.selectAll"),p.addEventListener("mousedown",l=>l.preventDefault()),p.addEventListener("click",()=>{s(false),n.selectAll();}),i.appendChild(p),e.addEventListener("pointerdown",l=>{a&&!o.contains(l.target)&&s(false);}),o.append(r.btn,i),{el:o,setDisabled(l){r.btn.disabled=l,p.disabled=l,l&&s(false);}}}var of=2;function nf(e,t){return chunkR2NUNRIB_cjs.Fi(t).flatMap(n=>n.entries.map((o,r)=>({label:o.family,value:o.family,style:{fontFamily:o.family},...r===0?{groupLabel:e(n.labelKey)}:{},...o.themeRole?{hint:e(`pptx.font.role.${o.themeRole}`)}:{}})))}function rf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let a=oe(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:nf(t,{}),onSelect:n.setFontFamily});a.el.classList.add("pptxv-font-family-dd");let s=oe(e,{triggerLabel:t("pptx.ribbon.fontSize"),triggerText:"24",items:chunkR2NUNRIB_cjs.Bi.map(k=>({label:String(k),value:k})),onSelect:n.setFontSize});s.el.classList.add("pptxv-font-size-dd");let p=H(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),l=H(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),d=H(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),u=H(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),m=H(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),g=H(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-of)}),x=H(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(of)}),v=H(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),f=oe(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunkR2NUNRIB_cjs.Ci.map(k=>({label:t(k.i18nKey),value:k.value})),onSelect:n.setCharacterSpacing});f.el.querySelector(".pptxv-dropdown-text")?.remove();let b=oe(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunkR2NUNRIB_cjs.Ei.map(k=>({label:t(k.i18nKey),value:k.value})),onSelect:n.changeCase});b.el.querySelector(".pptxv-dropdown-text")?.remove();let h=Ke(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:We,fallback:"#000000",onSelect:n.setTextColor}),S=Ke(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:We,fallback:"#ffff00",onSelect:n.setHighlightColor});r.append(a.el,s.el,g.btn,x.btn,p.btn,l.btn,d.btn,u.btn,m.btn,v.btn,f.el,b.el,h.el,S.el);let E=[p,l,d,u],T=[g,x,p,l,d,u,m,v,f,b,h,S];return {el:o,update({canFormat:k,editable:y,text:w,themeFonts:C,embeddedFontFamilies:A,customFontFamilies:P}){a.setItems(nf(t,{themeFonts:C,embeddedFonts:A,customFonts:P})),p.setActive(w.bold),l.setActive(w.italic),d.setActive(w.underline),u.setActive(w.strikethrough),m.setActive(w.hasTextShadow),a.setTriggerText(w.fontFamily??chunkR2NUNRIB_cjs.Gi(w.placeholderType,C)),a.setSelected(w.fontFamily),s.setTriggerText(String(w.fontSize)),s.setSelected(w.fontSize),h.setValue(w.color),S.setValue(w.highlightColor),a.setDisabled(!y),s.setDisabled(!y);for(let I of T)I.setDisabled(!y||!k);for(let I of E)(!y||!k)&&I.setActive(false);}}}var qw=[{value:"horizontal",labelKey:"pptx.slideInspector.horizontal"},{value:"vertical",labelKey:"pptx.ribbon.textDirectionRotate90"},{value:"vertical270",labelKey:"pptx.ribbon.textDirectionRotate270"},{value:"wordArtVert",labelKey:"pptx.ribbon.textDirectionStacked"}],jw=[{count:1,labelKey:"pptx.ribbon.columns1"},{count:2,labelKey:"pptx.ribbon.columns2"},{count:3,labelKey:"pptx.ribbon.columns3"}],af=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify"}];function sf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.paragraph"),o.appendChild(i);let a=H(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),s=H(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList}),p=H(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),l=H(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),d=af.map(v=>H(e,{label:t(v.labelKey),icon:v.icon,onClick:()=>n.setTextAlign(v.align)})),u=oe(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunkR2NUNRIB_cjs.Di.map(v=>({label:v.label,value:v.value})),onSelect:n.setLineSpacing});u.el.querySelector(".pptxv-dropdown-text")?.remove();let m=oe(e,{triggerLabel:t("pptx.paragraph.textDirection"),triggerText:"",icon:"change-case",items:qw.map(v=>({label:t(v.labelKey),value:v.value})),onSelect:n.setTextDirection});m.el.querySelector(".pptxv-dropdown-text")?.remove();let g=oe(e,{triggerLabel:t("pptx.paragraph.columns"),triggerText:"",icon:"columns",items:jw.map(v=>({label:t(v.labelKey),value:v.count})),onSelect:n.setColumnCount});g.el.querySelector(".pptxv-dropdown-text")?.remove(),r.append(a.btn,s.btn,p.btn,l.btn,...d.map(v=>v.btn),u.el,m.el,g.el);let x=[a,s,p,l,...d,u,m,g];return {el:o,update({canFormat:v,editable:f,text:b}){a.setActive(b.listType==="bullet"),s.setActive(b.listType==="numbered");for(let[h,S]of af.entries())d[h].setActive(b.align===S.align);u.setSelected(b.lineSpacing);for(let h of x)h.setDisabled(!f||!v);}}}var $i=1280,Wi=720,lf=144,df=lf/$i,Yw=Math.round(Wi*df),pf;function cf(e,t,n,o){pf??=chunkR2NUNRIB_cjs.Yk();let r=chunkR2NUNRIB_cjs.Ec(n,{slideWidth:$i,slideHeight:Wi,...o?{scheme:o}:{},idFor:s=>`tpl-preview-${n}-${s}`}),i={id:`tpl-preview-${n}`,rId:"",slideNumber:1,elements:r.elements,...r.backgroundColor?{backgroundColor:r.backgroundColor}:{}},a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-preview",{width:`${lf}px`,height:`${Yw}px`,overflow:"hidden",pointerEvents:"none",backgroundColor:i.backgroundColor??"#FFFFFF"});return a.setAttribute("aria-hidden","true"),a.appendChild(chunkR2NUNRIB_cjs.Sk({document:e,slide:i,canvasSize:{width:$i,height:Wi},mediaDataUrls:new Map,registry:pf,t,scale:df})),a}function mf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-layer");o.hidden=true;let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.slideTemplates.close"));let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.slideTemplates.galleryTitle")),i.tabIndex=-1;let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-header"),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-heading"),p=chunkR2NUNRIB_cjs.Ok(e,"h2");p.textContent=t("pptx.slideTemplates.galleryTitle");let l=chunkR2NUNRIB_cjs.Ok(e,"p");l.textContent=t("pptx.slideTemplates.galleryDescription"),s.append(p,l);let d=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-close");d.type="button",d.setAttribute("aria-label",t("pptx.slideTemplates.close")),d.textContent="\xD7",a.append(s,d);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-body"),m=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.slideTemplates.gallery")),u.appendChild(m);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tpl-dialog-footer"),x=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-cancel");x.type="button",x.textContent=t("pptx.slideTemplates.cancel");let v=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-dialog-insert");v.type="button",v.textContent=t("pptx.slideTemplates.insert"),v.disabled=true,g.append(x,v),i.append(a,u,g),o.append(r,i);let f,b=null;function h(y){f=y,v.disabled=false;for(let w of m.querySelectorAll('[role="option"]')){let C=w.dataset.templateId===y;w.setAttribute("aria-selected",String(C)),w.classList.toggle("is-selected",C);}}function S(y){y&&(n.onInsert(y),T());}function E(){let y=n.getScheme?.();m.replaceChildren();for(let w of chunkR2NUNRIB_cjs.Dc){let C=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tpl-option");C.type="button",C.dataset.templateId=w.id,C.setAttribute("role","option"),C.setAttribute("aria-selected",String(f===w.id)),C.setAttribute("aria-label",t(w.nameKey)),C.title=t(w.descriptionKey),C.classList.toggle("is-selected",f===w.id),C.appendChild(cf(e,t,w.id,y));let A=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tpl-option-label");A.textContent=t(w.nameKey),C.append(A),C.addEventListener("click",()=>h(w.id)),C.addEventListener("dblclick",()=>S(w.id)),m.appendChild(C);}}function T(){o.hidden||(o.hidden=true,b?.focus(),b=null);}function k(y){if(y.key==="Escape"){y.preventDefault(),T();return}if(y.key!=="Tab")return;let w=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(w.length===0)return;let C=w[0],A=w[w.length-1];y.shiftKey&&e.activeElement===C?(y.preventDefault(),A.focus()):!y.shiftKey&&e.activeElement===A&&(y.preventDefault(),C.focus());}return r.addEventListener("click",T),d.addEventListener("click",T),x.addEventListener("click",T),v.addEventListener("click",()=>S(f)),o.addEventListener("keydown",k),{el:o,open(y){let w=e.defaultView?.HTMLElement;b=w&&e.activeElement instanceof w?e.activeElement:null,E(),o.parentElement!==y&&y.appendChild(o),o.hidden=false,i.focus();},close:T}}var Xw=128,Zw=72;function uf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu pptxv-layout-menu");o.dataset.testid="layout-gallery-menu",o.setAttribute("role","menu"),o.setAttribute("aria-label",t),o.hidden=true;let r=false,i=s=>{r=s,o.hidden=!s;};e.addEventListener("pointerdown",s=>{r&&!o.parentElement?.contains(s.target)&&i(false);});let a=null;return {el:o,setItems(s,p){let l=JSON.stringify([s.map(d=>[d.path,d.name]),p.currentLayoutPath??"",s.map(d=>p.previews.get(d.path)?1:0)]);if(l!==a){a=l,o.replaceChildren();for(let d of s){let u=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-layout-tile");u.type="button",u.setAttribute("role","menuitem"),chunkR2NUNRIB_cjs.Mi(d,p.currentLayoutPath)&&(u.classList.add("pptxv-layout-tile-current"),u.setAttribute("aria-current","true")),u.appendChild(Qw(e,p.previews.get(d.path),p.renderPreview));let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-layout-tile-name");m.textContent=d.name,u.appendChild(m),u.title=d.name,u.addEventListener("click",()=>{i(false),n(d);}),o.appendChild(u);}}},toggle:()=>i(!r),close:()=>i(false)}}function Qw(e,t,n){let o=chunkR2NUNRIB_cjs.Li(t,Xw,Zw),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-layout-tile-thumb");r.style.width=`${o.boxWidth}px`,r.style.height=`${o.boxHeight}px`,r.style.backgroundColor=o.backgroundColor;let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-layout-tile-surface");i.style.width=`${o.surfaceWidth}px`,i.style.height=`${o.surfaceHeight}px`,i.style.transform=`scale(${o.scale})`;let a=t&&n?n(t,o):void 0;a&&i.appendChild(a);for(let s of o.frames){let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-layout-tile-frame");p.style.left=`${s.left}px`,p.style.top=`${s.top}px`,p.style.width=`${s.width}px`,p.style.height=`${s.height}px`,p.style.borderWidth=`${o.frameBorderWidth}px`,i.appendChild(p);}return r.appendChild(i),r}function xf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-slides-split"),s=H(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-slides-caret");p.type="button",p.title=t("pptx.home.chooseLayout"),p.setAttribute("aria-label",t("pptx.home.chooseLayout")),p.setAttribute("aria-haspopup","menu"),p.appendChild(chunkR2NUNRIB_cjs.Zk(e,"chevron-down"));let l=uf(e,t("pptx.home.chooseLayout"),b=>n.insertSlideFromLayout(b.path,b.name));p.addEventListener("click",b=>{b.stopPropagation(),l.toggle();}),a.append(s.btn,p,l.el);let d=mf(e,t,{onInsert:b=>n.insertSlideFromTemplate(b),getScheme:()=>n.getTemplateScheme?.()}),u=H(e,{label:t("pptx.home.slideTemplates"),icon:"slide-templates",textLabel:t("pptx.home.slideTemplates"),onClick:()=>{let b=u.btn.closest(".pptxv")??e.body;d.open(b);}}),m=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-slides-menu-host"),g=H(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>x.toggle()});g.btn.setAttribute("aria-haspopup","menu");let x=uf(e,t("pptx.master.layout"),b=>n.applyLayout(b.path));m.append(g.btn,x.el);let v=H(e,{label:t("pptx.animations.reset"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide});v.btn.title=t("pptx.sections.resetSlideTitle");let f=H(e,{label:t("pptx.sections.sectionButtonLabel"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return f.btn.title=t("pptx.sections.addSection"),r.append(a,u.btn,m,v.btn,f.btn),{el:o,update({editable:b,slideCount:h,layouts:S,layoutPreviews:E,currentLayoutPath:T}){let k=S.length>0,y=E??new Map;l.setItems(S,{previews:y,renderPreview:n.renderLayoutPreview}),x.setItems(S,{previews:y,currentLayoutPath:T,renderPreview:n.renderLayoutPreview}),s.setDisabled(!b),p.hidden=!k,p.disabled=!b,u.setDisabled(!b),g.setDisabled(!b||!k),v.setDisabled(!b||h===0),f.setDisabled(!b||h===0),b||(l.close(),x.close(),d.close());}}}var Jw=100;function gf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=Jv(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=xf(e,t,{addSlide:r.addSlide,insertSlideFromLayout:r.insertSlideFromLayout,insertSlideFromTemplate:r.insertSlideFromTemplate,applyLayout:r.applyLayout,resetSlide:r.resetSlide,addSection:()=>r.sections.addSection(t("pptx.sections.defaultName")),getTemplateScheme:()=>r.getTemplateScheme(),renderLayoutPreview:(m,g)=>chunkR2NUNRIB_cjs.Sk({document:e,slide:{id:`layout-preview-${m.path}`,rId:"",slideNumber:0,elements:m.elements.slice(0,Jw),backgroundColor:g.backgroundColor},canvasSize:{width:g.surfaceWidth,height:g.surfaceHeight},mediaDataUrls:new Map,registry:chunkR2NUNRIB_cjs.Yk(),t})}),s=rf(e,t,{toggleBold:r.toggleBold,toggleItalic:r.toggleItalic,toggleUnderline:r.toggleUnderline,toggleStrikethrough:r.toggleStrikethrough,toggleTextShadow:r.toggleTextShadow,setFontFamily:r.setFontFamily,setFontSize:r.setFontSize,changeFontSize:r.changeFontSize,setTextColor:r.setTextColor,setHighlightColor:r.setHighlightColor,setCharacterSpacing:r.setCharacterSpacing,changeCase:r.changeCase,clearFormatting:r.clearFormatting}),p=sf(e,t,{toggleBulletList:r.toggleBulletList,toggleNumberedList:r.toggleNumberedList,increaseIndent:r.increaseIndent,decreaseIndent:r.decreaseIndent,setTextAlign:r.setTextAlign,setLineSpacing:r.setLineSpacing,setTextDirection:r.setTextDirection,setColumnCount:r.setColumnCount}),l=tf(e,t,{toggleFindReplace:n.onToggleFindReplace,selectAll:r.selectAll}),d=ef(e,t,{insertShape:m=>r.insert("shape",m),bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setShapeFill:r.setShapeFill,setShapeStroke:r.setShapeStroke}),u=Qv(e,t,{bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,alignElements:r.alignElements,distributeElements:r.distributeElements,flipHorizontal:r.flipHorizontal,flipVertical:r.flipVertical,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setStrokeWidth:r.setShapeStrokeWidth,toggleFormatPainter:r.toggleFormatPainter,duplicate:r.duplicateSelected,delete:r.deleteSelected});return o.append(i.el,a.el,s.el,p.el,l.el,d.el,u.el),{el:o,update({editable:m,selectedElement:g,hasClipboard:x,slideCount:v,selectedCount:f,formatPainterActive:b,layouts:h,layoutPreviews:S,currentLayoutPath:E,themeFonts:T,embeddedFontFamilies:k,customFontFamilies:y}){let w=Ee(g),C=Ue(g),A=g!==void 0;i.update({hasSelection:A,hasClipboard:x,editable:m,formatPainterActive:b}),a.update({editable:m,slideCount:v,layouts:h,layoutPreviews:S,currentLayoutPath:E}),s.update({canFormat:w,editable:m,text:C,themeFonts:T,embeddedFontFamilies:k,customFontFamilies:y}),p.update({canFormat:w,editable:m,text:C}),l.update({editable:m}),d.update({editable:m,hasSelection:A}),u.update({editable:m,hasSelection:A,formatPainterActive:b,selectedCount:f,selectedElement:g});}}}function Ki(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,a=s=>{i=s,r.hidden=!s,o?.(s);};for(let s of n){s.separatorBefore&&r.appendChild(chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu-sep"));let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-primary-menu-item");p.type="button",p.setAttribute("role","menuitem"),p.textContent=s.label,p.addEventListener("click",()=>{a(false),s.run();}),r.appendChild(p);}return e.addEventListener("pointerdown",s=>{i&&!r.parentElement?.contains(s.target)&&a(false);}),{el:r,toggle:()=>a(!i),close:()=>a(false),isOpen:()=>i}}function bf(e,t,n){let{slideShow:o}=t,r=[{label:e("pptx.toolbar.present"),run:()=>o.startFromCurrent()},{label:e("pptx.slideShow.presenterView"),run:()=>o.openPresenterView()},{label:e("pptx.slideShow.rehearseTimings"),run:()=>o.startRehearsal()},{label:e("pptx.slideShow.setUp"),run:()=>o.openSetUp(),separatorBefore:true}];return chunkR2NUNRIB_cjs.Qj("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function vf(e,t,n){let{file:o,nav:r}=t,i=[];return chunkR2NUNRIB_cjs.Qj("export",n)||i.push({label:e("pptx.ribbon.exportPng"),run:()=>o.exportPng()},{label:e("pptx.ribbon.exportPdf"),run:()=>o.exportPdf()},{label:e("pptx.ribbon.exportVideo"),run:()=>o.exportVideo()},{label:e("pptx.ribbon.exportGif"),run:()=>o.exportGif()},{label:e("pptx.file.packageTooltip"),run:()=>o.packageForSharing()},{label:e("pptx.file.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()}),i.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true},{label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage()},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true},{label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")},{label:e("pptx.ribbon.versionHistory"),run:()=>o.openVersionHistory(),separatorBefore:true},{label:e("pptx.ribbon.documentProperties"),run:()=>o.openDocumentProperties(),separatorBefore:true},{label:e("pptx.security.protectPresentation"),run:()=>o.openPasswordProtection()},{label:e("pptx.ribbon.embedFonts"),run:()=>o.openFontEmbedding()},{label:e("pptx.viewer.digitalSignatures"),run:()=>o.openDigitalSignatures()}),i}function ff(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-primary"),i=H(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-present-split"),s=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-present-main");s.type="button",s.title=t("pptx.present.presentTooltip"),s.textContent=t("pptx.toolbar.present"),s.addEventListener("click",()=>n.slideShow.startFromCurrent());let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-present-caret");p.type="button",p.title=t("pptx.present.optionsTooltip"),p.setAttribute("aria-label",t("pptx.present.optionsTooltip")),p.setAttribute("aria-haspopup","menu"),p.appendChild(chunkR2NUNRIB_cjs.Zk(e,"chevron-down"));let l=Ki(e,t("pptx.present.optionsTooltip"),bf(t,n,o),f=>{p.classList.toggle("is-active",f),p.setAttribute("aria-expanded",String(f));});p.addEventListener("click",f=>{f.stopPropagation(),l.toggle();}),a.append(s,p,l.el),r.appendChild(a);let d=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-show-btn");d.type="button",d.title=t("pptx.customShows.createTooltip"),d.textContent="+ Show",d.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(d),r.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-primary-sep"));let u=H(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(u.btn);let m=H(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()});r.appendChild(m.btn);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-primary-menu-host"),x=Ki(e,t("pptx.ribbon.moreActions"),vf(t,n,o)),v=H(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>x.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",f=>f.stopPropagation()),g.append(v.btn,x.el),r.appendChild(g),{el:r,setEditState({editable:f}){r.hidden=!f,f||(l.close(),x.close());},setAutosaveStatus(){},setInspectorOpen(f){u.setActive(f);}}}var $t=[{id:"file",labelKey:"pptx.ribbon.tab.file"},{id:"home",labelKey:"pptx.ribbon.tab.home"},{id:"insert",labelKey:"pptx.ribbon.tab.insert"},{id:"draw",labelKey:"pptx.ribbon.tab.draw"},{id:"design",labelKey:"pptx.ribbon.tab.design"},{id:"transitions",labelKey:"pptx.ribbon.tab.transitions"},{id:"animations",labelKey:"pptx.ribbon.tab.animations"},{id:"slideShow",labelKey:"pptx.ribbon.tab.slideShow"},{id:"record",labelKey:"pptx.ribbon.tab.record"},{id:"review",labelKey:"pptx.ribbon.tab.review"},{id:"view",labelKey:"pptx.ribbon.tab.view"},{id:"help",labelKey:"pptx.ribbon.tab.help"}],Tn="home";function qi(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let a=new Map,s=new Map;for(let p of chunkR2NUNRIB_cjs.Rj($t,o)){let l=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-ribbon-tab");p.id==="file"&&l.classList.add("pptxv-ribbon-tab-file"),l.type="button",l.setAttribute("role","tab");let d=t(p.labelKey);l.textContent=d,l.addEventListener("click",()=>n(p.id)),i.appendChild(l),a.set(p.id,l),s.set(p.id,d);}if(r){i.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tabrow-spacer"));let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-tabrow-actions");if(!chunkR2NUNRIB_cjs.Qj("record",o)){let l=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-tabrow-record");l.type="button",l.title=t("pptx.titleBar.record"),l.setAttribute("aria-label",t("pptx.titleBar.record"));let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-tabrow-record-dot");d.setAttribute("aria-hidden","true");let u=chunkR2NUNRIB_cjs.Ok(e,"span");u.textContent=t("pptx.titleBar.record"),l.append(d,u),l.addEventListener("click",()=>r.startRecording()),p.appendChild(l);}i.appendChild(p);}return {el:i,setActive(p){for(let[l,d]of a){let u=l===p;d.classList.toggle("is-active",u),d.setAttribute("aria-selected",String(u));}},setHiddenTabs(p){for(let[l,d]of a)d.hidden=l!=="file"&&p.has(l);},applyScreenTips(p){for(let[l,d]of a){let u=p(s.get(l)??"");u?d.title=u:d.removeAttribute("title");}}}}var eC=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunkR2NUNRIB_cjs.Ha},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunkR2NUNRIB_cjs.Ja},{group:"exit",labelKey:"pptx.animation.exit",presets:chunkR2NUNRIB_cjs.Ia}];function hf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-gallery");o.setAttribute("aria-label",t("pptx.animations.addAnimation"));let r=[];for(let i of eC){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-gallery-column"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-animation-gallery-caption");s.textContent=t(i.labelKey);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-gallery-items");for(let l of i.presets){let d=t(`pptx.animation.preset.${l}`),u=H(e,{label:d,text:d,className:"pptxv-animation-preset",onClick:()=>n(i.group,l)});p.appendChild(u.btn),r.push(u);}a.append(s,p),o.appendChild(a);}return {el:o,setDisabled(i){for(let a of r)a.setDisabled(i);}}}function Wt(e,t,n){let o=e.createElement("label");o.textContent=t;let r=e.createElement("input");return r.type="number",r.min="0",r.max="10000",r.step="100",r.value=String(n),o.appendChild(r),{label:o,input:r}}function Kt(e,t,n,o){let r=e.createElement("label");r.textContent=t(n);let i=e.createElement("select");i.setAttribute("aria-label",t(n));for(let a of o){let s=e.createElement("option");s.value=a,s.textContent=t(`${n}.${a}`),i.appendChild(s);}return r.appendChild(i),{label:r,select:i}}function yf(e,t,n,o,r,i,a,s){let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline-row");p.draggable=a,p.addEventListener("dragstart",m=>m.dataTransfer?.setData("text/plain",n.elementId)),p.addEventListener("dragover",m=>m.preventDefault()),p.addEventListener("drop",m=>{m.preventDefault();let g=m.dataTransfer?.getData("text/plain");g&&s.moveAnimation(g,o);}),p.classList.toggle("is-selected",n.elementId===i);let l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-animation-timeline-name");l.textContent=`${o+1}. ${chunkR2NUNRIB_cjs.db(n,t)}`;let d=H(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>s.reorderAnimation(n.elementId,"up")}),u=H(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>s.reorderAnimation(n.elementId,"down")});return d.setDisabled(!a||o===0),u.setDisabled(!a||o===r-1),p.append(l,d.btn,u.btn),p}function Sf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.animations.advanced"),o.appendChild(i);let a=H(e,{label:t("pptx.animations.exitEffects"),icon:"sparkles",textLabel:t("pptx.animations.exitEffects"),onClick:()=>n.addAnimation("exit","fadeOut")}),s=H(e,{label:t("pptx.animations.pathAnimation"),icon:"move-right",textLabel:t("pptx.animations.pathAnimation"),onClick:()=>n.applyMotionPath(chunkR2NUNRIB_cjs.ob)}),p=H(e,{label:t("pptx.animations.effectOptions"),icon:"wrench",textLabel:t("pptx.animations.effectOptions"),onClick:n.openAnimationPanel}),l=H(e,{label:t("pptx.animations.animationPanel"),icon:"panel-right",textLabel:t("pptx.animations.animationPanel"),onClick:n.openAnimationPanel});l.btn.title=t("pptx.animations.openPanelTooltip");let d=H(e,{label:t("pptx.animations.trigger"),icon:"cursor",textLabel:t("pptx.animations.trigger"),onClick:n.openAnimationPanel}),u=H(e,{label:t("pptx.animations.painter"),icon:"copy",textLabel:t("pptx.animations.painter"),onClick:()=>{}}),m=H(e,{label:t("pptx.animations.remove"),icon:"trash",textLabel:t("pptx.animations.remove"),onClick:n.removeAnimation});m.btn.title=t("pptx.animations.removeTooltip"),r.append(a.btn,s.btn,p.btn,l.btn,d.btn,u.btn,m.btn);let g=[a,s,p,d,m];return {el:o,setDisabled(x){for(let v of g)v.setDisabled(x);u.setDisabled(true);}}}var wf=0;function Cf(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row pptxv-animation-timing-grid");n.appendChild(o);let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.animations.timing"),n.appendChild(r),wf+=1;let i=`pptx-animation-start-${wf}`,a=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-field-label");a.htmlFor=i,a.textContent=t("pptx.animations.start");let s=e.createElement("select");s.id=i,s.disabled=true;for(let d of ["onClick","withPrevious","afterPrevious"]){let u=e.createElement("option");u.value=d,u.textContent=t(`pptx.animations.${d}`),s.appendChild(u);}let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-field-label");p.textContent=t("pptx.animations.duration");let l=e.createElement("input");return l.type="number",l.min="0",l.step="0.1",l.value="0.5",l.disabled=true,l.setAttribute("aria-label",t("pptx.animations.duration")),o.append(a,s,p,l),{el:n}}function Ef(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-motion-path-gallery");o.setAttribute("aria-label",t("pptx.animations.motionPathGalleryAria"));let r=[];for(let i of chunkR2NUNRIB_cjs.jb){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-motion-path-gallery-column"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-motion-path-gallery-caption");s.textContent=t(chunkR2NUNRIB_cjs.kb(i));let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-motion-path-gallery-items");for(let l of chunkR2NUNRIB_cjs.mb(i)){let d=t(chunkR2NUNRIB_cjs.lb(l.id)),u=H(e,{label:d,text:d,className:"pptxv-motion-path-preset",onClick:()=>n(l.id)});p.appendChild(u.btn),r.push(u);}a.append(s,p),o.appendChild(a);}return {el:o,setDisabled(i){for(let a of r)a.setDisabled(i);}}}function Tf(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i,a=()=>{Gt(e,i);},s=H(e,{label:t("pptx.animations.preview"),icon:"play",textLabel:t("pptx.animations.preview"),onClick:a});s.btn.title=t("pptx.animations.previewTooltip");let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");l.appendChild(s.btn);let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");d.textContent=t("pptx.animations.preview"),p.append(l,d),r.appendChild(p);let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");m.textContent=t("pptx.animations.animation");let g=hf(e,t,(M,O)=>n.addAnimation(M,O));u.append(g.el,m),r.appendChild(u);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),v=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");v.textContent=t("pptx.animation.motionPath");let f=Ef(e,t,M=>n.applyMotionPath(M));x.append(f.el,v),r.appendChild(x);let b=Sf(e,t,{addAnimation:n.addAnimation,applyMotionPath:n.applyMotionPath,removeAnimation:n.removeAnimation,openAnimationPanel:o});r.appendChild(b.el),r.appendChild(Cf(e,t).el);let h=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline"),S=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");S.textContent=t("pptx.animation.timeline");let E=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timeline-list"),T=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-animation-timing-controls"),k=e.createElement("select");k.setAttribute("aria-label",t("pptx.animation.trigger"));let y=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let M of y){let O=e.createElement("option");O.value=M,O.textContent=t(`pptx.animation.trigger.${M}`),k.appendChild(O);}let w=Wt(e,t("pptx.animation.duration"),500),C=Wt(e,t("pptx.animation.delay"),0),A=Kt(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),P=Kt(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),I=Kt(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),L=Kt(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),D=Wt(e,t("pptx.animation.repeatCount"),1),R=Wt(e,t("pptx.animations.triggerShape"),0);R.input.type="text",R.input.min="",R.input.max="",T.append(k,w.label,C.label,A.label,P.label,I.label,D.label,L.label,R.label),h.append(S,E,T),r.appendChild(h);let F=()=>{i&&n.setAnimationTiming(i.elementId,{trigger:k.value,durationMs:w.input.valueAsNumber,delayMs:C.input.valueAsNumber,direction:A.select.value,sequence:P.select.value,timingCurve:I.select.value,repeatCount:D.input.valueAsNumber,repeatMode:L.select.value,triggerShapeId:R.input.value});};for(let M of [k,A.select,P.select,I.select,L.select])M.addEventListener("change",F);return w.input.addEventListener("change",F),C.input.addEventListener("change",F),D.input.addEventListener("change",F),R.input.addEventListener("change",F),{el:r,update({editable:M,hasSelection:O,selectedElementId:B,animations:V}){let z=!M||!O;g.setDisabled(z),f.setDisabled(z),s.setDisabled(z),b.setDisabled(z);let N=[...V].sort((_,K)=>(_.order??0)-(K.order??0));i=N.find(({elementId:_})=>_===B),E.replaceChildren(...N.map((_,K)=>yf(e,t,_,K,N.length,B,M,n))),h.hidden=N.length===0,T.hidden=!i,k.value=i?.trigger??"onClick",R.input.value=i?.triggerShapeId??"",R.label.hidden=k.value!=="onShapeClick",w.input.value=String(i?.durationMs??500),C.input.value=String(i?.delayMs??0),A.select.value=i?.direction??"fromTop",P.select.value=i?.sequence??"asOne",I.select.value=i?.timingCurve??"ease",L.select.value=i?.repeatMode??"none",D.input.value=String(i?.repeatCount??1);for(let _ of [k,w.input,C.input,A.select,P.select,I.select,L.select,D.input,R.input])_.disabled=!M;}}}var tC=[{labelKey:"pptx.ribbon.theme.default",theme:void 0},{labelKey:"pptx.ribbon.theme.light",theme:chunkR2NUNRIB_cjs.O},{labelKey:"pptx.ribbon.theme.dark",theme:chunkR2NUNRIB_cjs.P}];function Pf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-gallery-host"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-theme-gallery");r.hidden=true,t.btn.title=n,t.btn.setAttribute("aria-haspopup","true"),t.btn.setAttribute("aria-expanded","false");let i=false,a=s=>{i=s,r.hidden=!s,t.btn.setAttribute("aria-expanded",String(s));};return t.btn.addEventListener("click",s=>{s.stopPropagation(),a(!i);}),e.addEventListener("pointerdown",s=>{i&&!o.contains(s.target)&&a(false);}),o.append(t.btn,r),{el:o,button:t,gallery:r,close:()=>a(false)}}function Af(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-theme-swatch-preview");return o.style.background=n,t.btn.prepend(o),t.btn}function kf(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),a=Pf(e,H(e,{label:t("pptx.ribbon.browseThemes"),icon:"sparkles",textLabel:t("pptx.ribbon.browseThemes"),onClick:()=>{}}),t("pptx.ribbon.browseThemesTitle")),s=chunkR2NUNRIB_cjs.f.map(u=>{let m=H(e,{label:u.name,text:u.name,onClick:()=>{n.applyPresentationTheme(u.id),a.close();}});return a.gallery.appendChild(Af(e,m,`linear-gradient(135deg, ${u.colorScheme.accent1}, ${u.colorScheme.accent2})`)),m}),p=Pf(e,H(e,{label:t("pptx.ribbon.editTheme"),icon:"wrench",textLabel:t("pptx.ribbon.editTheme"),onClick:()=>{}}),t("pptx.ribbon.editThemeTitle"));for(let u of tC){let m=H(e,{label:t(u.labelKey),text:t(u.labelKey),onClick:()=>{n.setTheme(u.theme),p.close();}});p.gallery.appendChild(Af(e,m,u.theme?.colors?.primary??"#6b7280"));}let l=H(e,{label:t("pptx.ribbon.slideSize"),icon:"monitor",textLabel:t("pptx.ribbon.slideSize"),onClick:r});l.btn.title=t("pptx.ribbon.slideSizeTitle");let d=H(e,{label:t("pptx.ribbon.formatBackground"),icon:"square",textLabel:t("pptx.ribbon.formatBackground"),onClick:o});return d.btn.title=t("pptx.ribbon.formatBackgroundTitle"),i.append(a.el,p.el,l.btn,d.btn),{el:i,setEditable(u){a.button.setDisabled(!u),p.button.setDisabled(!u),d.setDisabled(!u);for(let m of s)m.setDisabled(!u);u||(a.close(),p.close());}}}var oC=[1,2,3,4,6,8,12,16],If=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser"},{tool:"freeform",icon:"pen",labelKey:"pptx.ribbon.tool.freeform"}];function Lf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");a.textContent=t("pptx.ribbon.draw"),r.appendChild(a);let s=If.map(g=>H(e,{label:t(g.labelKey),icon:g.icon,onClick:()=>n.setTool(g.tool)}));i.append(...s.map(g=>g.btn)),o.appendChild(r);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup"),l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rgroup-row");p.appendChild(l);let d=Ke(e,t,{label:t("pptx.ribbon.colour"),icon:"pen",swatches:We,fallback:"#000000",onSelect:g=>n.setColor(g)}),u=oe(e,{triggerLabel:t("pptx.ribbon.width"),triggerText:"",icon:"chevron-down",items:oC.map(g=>({label:`${g} px`,value:g})),onSelect:g=>n.setWidth(g)});l.append(d.el,u.el),o.appendChild(p);let m=[...s,d,u];return {el:o,setEditable(g){for(let x of m)x.setDisabled(!g);},update(g){for(let[x,v]of If.entries())s[x].setActive(g.tool===v.tool);d.setValue(g.color),u.setSelected(g.width),u.setTriggerText(`${g.width} px`);}}}var Df="2.0.0";function Mf(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-account");n.appendChild(r);let i={...chunkR2NUNRIB_cjs.Jj,...chunkR2NUNRIB_cjs.Hj().profile};r.appendChild(rC(e,t,i,s=>{i=s,chunkR2NUNRIB_cjs.Oj(i);}));let a=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section");r.appendChild(a),iC(e,t,a),r.appendChild(aC(e,t)),o?.enabled&&r.appendChild(sC(e,t,o));}function rC(e,t,n,o){let r=n,i=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section"),a=e.createElement("h2");a.textContent=t("pptx.account.profile.title"),i.appendChild(a);let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-account-profile-row"),p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-account-avatar"),l=()=>{p.textContent=chunkR2NUNRIB_cjs.Lj(r),p.style.background=r.avatarColor;};l();let d=e.createElement("label");d.className="pptxv-account-name-field";let u=e.createElement("span");u.textContent=t("pptx.account.profile.nameLabel");let m=e.createElement("input");m.type="text",m.placeholder=t("pptx.account.profile.namePlaceholder"),m.value=r.displayName,m.addEventListener("input",()=>{r={...r,displayName:m.value},l(),o(r);}),d.append(u,m),s.append(p,d),i.appendChild(s);let g=e.createElement("p");g.className="pptxv-account-swatch-label",g.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(g);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-parity-swatch-row"),v=(f,b)=>{r={...r,avatarColor:b},l();for(let h of x.querySelectorAll("button"))h.classList.toggle("is-active",h===f);o(r);};for(let f of chunkR2NUNRIB_cjs.Kj){let b=e.createElement("button");b.type="button",b.className="pptxv-account-color-swatch",b.classList.toggle("is-active",f===r.avatarColor),b.style.background=f,b.setAttribute("aria-label",f),b.addEventListener("click",()=>v(b,f)),x.appendChild(b);}return i.appendChild(x),i}function iC(e,t,n){let o=e.createElement("h2");o.textContent=t("pptx.account.storage.title"),n.appendChild(o);let r=e.createElement("p");n.appendChild(r);let i=e.createElement("p");i.className="pptxv-account-privacy",i.textContent=t("pptx.account.storage.privacyBlurb"),n.appendChild(i);let a=e.createElement("button");a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.storage.clear"),n.appendChild(a);let s=e.createElement("p");s.className="pptxv-account-notice",s.hidden=true,n.appendChild(s);async function p(){let l=await chunkR2NUNRIB_cjs.Mj();r.textContent=l.presentationCount>0?t("pptx.account.storage.usage",{count:l.presentationCount,size:chunkR2NUNRIB_cjs._i(l.totalBytes)}):t("pptx.account.storage.usageEmpty");}p(),a.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunkR2NUNRIB_cjs.Nj(),s.hidden=false,s.textContent=t("pptx.account.storage.clearedNotice"),await p()))();});}function aC(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section"),o=e.createElement("h2");o.textContent=t("pptx.account.about.title"),n.appendChild(o);let r=e.createElement("p");r.textContent="pptx-vanilla-viewer",n.appendChild(r);let i=e.createElement("p");return i.className="pptxv-account-privacy",i.textContent=t("pptx.account.about.version",{version:Df}),n.appendChild(i),n}function sC(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-account-section"),r=e.createElement("h2");r.textContent=t("pptx.account.signIn.title"),o.appendChild(r);let i=e.createElement("p");if(i.textContent=t("pptx.account.signIn.description"),o.appendChild(i),n.signedInUser){let s=e.createElement("p");return s.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(s),o}let a=e.createElement("button");return a.type="button",a.className="pptxv-bs-primary",a.textContent=t("pptx.account.signIn.button"),a.addEventListener("click",()=>n.onSignIn()),o.appendChild(a),o}var SC={back:lucide.ArrowLeft,home:lucide.Home,new:lucide.FilePlus2,open:lucide.FolderOpen,info:lucide.Info,save:lucide.Save,saveAs:lucide.Download,print:lucide.Printer,share:lucide.Share2,export:lucide.Upload,close:lucide.X,account:lucide.UserRound,options:lucide.Settings},Hf="http://www.w3.org/2000/svg";function Rf(e,t){return qt(e,SC[t],17)}function qt(e,t,n){let o=e.createElementNS(Hf,"svg");for(let[r,i]of Object.entries({viewBox:"0 0 24 24",width:n,height:n,fill:"none",stroke:"currentColor","stroke-width":1.7,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"}))o.setAttribute(r,String(i));for(let[r,i]of t){let a=e.createElementNS(Hf,r);for(let[s,p]of Object.entries(i))p!==void 0&&a.setAttribute(s,String(p));o.appendChild(a);}return o}function et(e,t,n,o){let r=e.createElement("button");return r.type="button",r.textContent=t,o&&(r.className=o),r.addEventListener("click",n),r}function ji(e,t,n,o){let r=et(e,"",n,o);return r.appendChild(Rf(e,t)),r}function Of(e,t,n,o){let r=ji(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}var FC={protect:lucide.LockKeyhole,inspect:lucide.Info,embedFonts:lucide.Type,signatures:lucide.BadgeCheck,versionHistory:lucide.Clock3,saveAsPptx:lucide.FileText,saveAsPpsx:lucide.Presentation,saveAsPptm:lucide.FileCode2,package:lucide.Package,pdf:lucide.FileText,png:lucide.Image,video:lucide.Video,gif:lucide.Images,json:lucide.FileJson,copyImage:lucide.Copy,print:lucide.Printer,share:lucide.UserPlus,sharePackage:lucide.Package};function Nf(e,t,n,o,r,i,a){let s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-bs-actions");if(t==="export"&&chunkR2NUNRIB_cjs.Qj("export",a))return s;let p={protect:n.openPasswordProtection,inspect:n.openDocumentProperties,embedFonts:n.openFontEmbedding,signatures:n.openDigitalSignatures,versionHistory:n.openVersionHistory,saveAsPptx:n.save,saveAsPpsx:n.saveAsPpsx,saveAsPptm:n.saveAsPptm,package:n.packageForSharing,pdf:n.exportPdf,png:n.exportPng,video:n.exportVideo,gif:n.exportGif,json:n.exportJson,copyImage:n.copySlideAsImage,print:n.print,share:n.openShare,sharePackage:n.packageForSharing};for(let l of chunkR2NUNRIB_cjs.$i(t)){if(l.id==="saveAsPptm"&&!o)continue;let d=p[l.id],u=et(e,"",()=>r(()=>d?.())),m=e.createElement("b");m.appendChild(qt(e,FC[l.id],22));let g=e.createElement("span"),x=e.createElement("strong");x.textContent=i(l.titleKey);let v=e.createElement("small");v.textContent=i(l.bodyKey),g.append(x,v),u.append(m,g),s.appendChild(u);}return s}function Yi(e,t){let n=e.createElement("span");return n.textContent=t,n}function Vf(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-backstage");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true"),a.setAttribute("aria-label",t("pptx.backstage.title"));let s=e.createElement("aside"),p=ji(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label",t("pptx.backstage.back"));let l=e.createElement("nav");s.append(p,l);let d=e.createElement("main");a.append(s,d);let u="home",m=false,g="",x=[];(async()=>(x=await chunkR2NUNRIB_cjs.Xi(t),k()))();function v(y){y?.(),y&&o();}function f(y){if(y==="close")return o();if(y==="save")return v(n.save);if(y==="options")return v(n.openSettings);u=y,k();}function b(){l.replaceChildren();for(let y of chunkR2NUNRIB_cjs.Ui){y.group&&!l.querySelector("i")&&l.appendChild(e.createElement("i"));let w=Of(e,y.id,t(y.labelKey),()=>f(y.id));w.classList.toggle("active",u===y.id),l.appendChild(w);}}function h(){let y=e.createElement("h2");y.textContent=t("pptx.backstage.newHeading");let w=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-bs-templates");for(let C of chunkR2NUNRIB_cjs.Vi){let A=et(e,"",()=>v(()=>n.createPresentation(C.id))),P=e.createElement("b");P.style.background=C.preview;let I=e.createElement("strong");I.textContent=t(C.nameKey);let L=e.createElement("small");L.textContent=t(C.descriptionKey),A.append(P,I,L),w.appendChild(A);}d.append(y,w);}function S(){let y=e.createElement("input");y.className="pptxv-bs-search",y.type="search",y.placeholder=t("pptx.backstage.searchPlaceholder"),y.value=g,y.addEventListener("input",()=>{g=y.value,k();}),d.appendChild(y),u==="open"&&d.appendChild(et(e,t("pptx.backstage.browseDevice"),()=>v(n.openFile),"pptxv-bs-primary"));let w=e.createElement("h2");w.textContent=t("pptx.backstage.recentHeading");let C=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-bs-recent"),A=e.createElement("header");A.replaceChildren(Yi(e,t("pptx.backstage.columnName")),Yi(e,t("pptx.backstage.columnModified")),Yi(e,t("pptx.backstage.columnSize"))),C.appendChild(A);let P=g.trim().toLowerCase(),I=P?x.filter(L=>`${L.name} ${L.location}`.toLowerCase().includes(P)):x;for(let L of I){let D=et(e,"",()=>v(()=>n.openRecentFile(L.key))),R=chunkR2NUNRIB_cjs.Ok(e,"span","name"),F=e.createElement("b");F.textContent="P";let M=e.createElement("span"),O=e.createElement("strong");O.textContent=L.name;let B=e.createElement("small");B.textContent=L.location,M.append(O,B),R.append(F,M);let V=e.createElement("span");V.textContent=chunkR2NUNRIB_cjs.Zi(L.timestamp,Date.now(),t);let z=e.createElement("span");z.textContent=chunkR2NUNRIB_cjs._i(L.size),D.append(R,V,z),C.appendChild(D);}if(!I.length){let L=e.createElement("p");L.textContent=t("pptx.backstage.noRecent"),C.appendChild(L);}d.append(w,C);}function E(){d.appendChild(Nf(e,u,n,m,v,t,r));}function T(){let y=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-bs-card"),w=e.createElement("b");w.appendChild(qt(e,lucide.Settings,24));let C=e.createElement("h2");C.textContent=t("pptx.backstage.optionsTitle");let A=e.createElement("p");A.textContent=t("pptx.backstage.optionsBody"),y.append(w,C,A),y.appendChild(et(e,t("pptx.backstage.openOptions"),()=>v(n.openSettings),"pptxv-bs-primary")),d.appendChild(y);}function k(){b(),d.replaceChildren();let y=e.createElement("h1");y.textContent=t(u==="home"?"pptx.backstage.greeting":chunkR2NUNRIB_cjs.Ui.find(C=>C.id===u)?.labelKey??"pptx.backstage.nav.home"),d.appendChild(y),(u==="home"||u==="new")&&h(),(u==="home"||u==="open")&&S(),["info","saveAs","print","share","export"].includes(u)&&E(),u==="options"&&T(),u==="account"&&Mf(e,t,d,i);let w=e.createElement("footer");w.textContent=`${t("pptx.backstage.untitled")} \xB7 ${t("pptx.backstage.savedToBrowser")}`,d.appendChild(w);}return k(),{el:a,setHasMacros(y){m=y,u==="saveAs"&&k();}}}function zf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=H(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")}),i=H(e,{label:t("pptx.settings.keyboardShortcuts"),text:t("pptx.settings.keyboardShortcuts"),onClick:()=>n.openSettings("shortcuts")}),a=H(e,{label:t("pptx.ribbon.accessibilityCheck"),text:t("pptx.ribbon.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});return o.append(r.btn,i.btn,a.btn),o}function _f(e,t,n){let o=oe(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunkR2NUNRIB_cjs.Zg.map(i=>({label:i.label,value:i.shapeType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.ribbon.insertActionButton")),o}function Pn(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-select-button"),o=e.createElement("select");o.className="pptxv-select-button-select",o.title=t.selectLabel,o.setAttribute("aria-label",t.selectLabel);for(let[s,p]of t.items.entries()){let l=e.createElement("option");l.value=String(s),l.textContent=p.label,o.appendChild(l);}n.appendChild(o);let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-btn pptxv-btn-pill pptxv-select-button-commit");r.type="button",r.title=t.buttonTitle??t.buttonLabel,r.setAttribute("aria-label",t.buttonLabel),t.icon&&r.appendChild(chunkR2NUNRIB_cjs.Zk(e,t.icon));let i=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-btn-label");i.textContent=t.buttonLabel,r.appendChild(i),n.appendChild(r);let a=()=>t.items[Number(o.value)]?.value;return r.addEventListener("click",()=>{let s=a();s!==void 0&&t.onCommit(s);}),{el:n,setDisabled(s){r.disabled=s;},value:a}}function Gf(e,t,n){return Pn(e,{selectLabel:t("pptx.ribbon.chartType"),buttonLabel:t("pptx.ribbon.chart"),buttonTitle:t("pptx.ribbon.insertChart"),icon:"chart",items:chunkR2NUNRIB_cjs.ci.map(o=>({label:t(o.labelKey),value:o.id})),onCommit:n})}var NC=[{fieldType:"slidenum",i18nKey:"pptx.field.slideNumber"},{fieldType:"datetime",i18nKey:"pptx.field.dateTime"},{fieldType:"header",i18nKey:"pptx.field.header"},{fieldType:"footer",i18nKey:"pptx.field.footer"}];function Uf(e,t,n){let o=oe(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:NC.map(i=>({label:t(i.i18nKey),value:i.fieldType})),onSelect:n}),r=o.el.querySelector(".pptxv-dropdown-trigger");return r&&(r.title=t("pptx.field.insertField")),o}function $f(e,t,n){let o=H(e,{label:t("pptx.hyperlinkDialog.title"),icon:"link",textLabel:t("pptx.hyperlinkDialog.title"),onClick:n});return o.setDisabled(true),o}function Wf(e,t,n){return Pn(e,{selectLabel:t("pptx.insert.shapeType"),buttonLabel:t("pptx.insert.shape"),buttonTitle:t("pptx.insert.addShape"),icon:"shapes",items:chunkR2NUNRIB_cjs.Ai.map(o=>({label:t(o.i18nKey),value:o.type})),onCommit:n})}var An=600,kn=340,Kf=64,VC=["1","2","3"];function zC(e){let t=chunkR2NUNRIB_cjs._g.find(n=>n.layout===e);return {id:`smartart-preview-${e}`,type:"smartArt",x:0,y:0,width:An,height:kn,smartArtData:chunkR2NUNRIB_cjs.ah(e,t?.defaultItems??VC)}}function qf(e,t,n){let o=Kf/An,r=Math.round(kn*o),i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-option-preview",{width:`${Kf}px`,height:`${r}px`,overflow:"hidden",pointerEvents:"none"});i.setAttribute("aria-hidden","true");let a=chunkR2NUNRIB_cjs.Ok(e,"div",void 0,{width:`${An}px`,height:`${kn}px`,transform:`scale(${o})`,transformOrigin:"top left"});i.appendChild(a);let s=zC(n),d={document:e,slide:{id:"smartart-preview",rId:"smartart-preview",slideNumber:1,elements:[s]},canvasSize:{width:An,height:kn},scale:1,mediaDataUrls:new Map,t,smartArt3D:false,surfaceChart3D:false,presenting:false,registry:chunkR2NUNRIB_cjs.Mk(),renderElement:()=>null},u=chunkR2NUNRIB_cjs.Xk(s,0,d);return u&&a.appendChild(u),i}function jf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.smartart.insertTitle")),i.tabIndex=-1;let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-header"),s=chunkR2NUNRIB_cjs.Ok(e,"h2");s.textContent=t("pptx.smartart.insertTitle");let p=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-close");p.type="button",p.setAttribute("aria-label",t("pptx.smartart.close")),p.textContent="\xD7",a.append(s,p);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-body"),d=chunkR2NUNRIB_cjs.Ok(e,"nav","pptxv-smartart-categories");d.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-gallery"),m=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),u.appendChild(m),l.append(d,u);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-smartart-dialog-footer"),x=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-cancel");x.type="button",x.textContent=t("pptx.smartart.cancel");let v=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-dialog-insert");v.type="button",v.textContent=t("pptx.smartart.insert"),v.disabled=true,g.append(x,v),i.append(a,l,g),o.append(r,i);let f="list",b,h=null;function S(C){b=C,v.disabled=false;for(let A of m.querySelectorAll('[role="option"]')){let P=A.dataset.layout===C.layout;A.setAttribute("aria-selected",String(P)),A.classList.toggle("is-selected",P);}}function E(C){C&&(n(C.layout,C.defaultItems),y());}function T(){m.replaceChildren();for(let C of chunkR2NUNRIB_cjs._g.filter(A=>A.category===f)){let A=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-option");A.type="button",A.dataset.layout=C.layout,A.setAttribute("role","option"),A.setAttribute("aria-selected",String(b?.layout===C.layout)),A.classList.toggle("is-selected",b?.layout===C.layout);let P=qf(e,t,C.layout),I=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-smartart-option-label");I.textContent=t(C.labelKey),A.append(P,I),A.addEventListener("click",()=>S(C)),A.addEventListener("dblclick",()=>E(C)),m.appendChild(A);}}function k(C){f=C,b=void 0,v.disabled=true;for(let A of d.querySelectorAll("button")){let P=A.dataset.category===C;A.classList.toggle("is-active",P),A.setAttribute("aria-pressed",String(P));}T();}for(let C of chunkR2NUNRIB_cjs.$g){let A=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-smartart-category");A.type="button",A.dataset.category=C.id,A.textContent=t(C.labelKey),A.addEventListener("click",()=>k(C.id)),d.appendChild(A);}k(f);function y(){o.hidden||(o.hidden=true,h?.focus(),h=null);}function w(C){if(C.key==="Escape"){C.preventDefault(),y();return}if(C.key!=="Tab")return;let A=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(A.length===0)return;let P=A[0],I=A[A.length-1];C.shiftKey&&e.activeElement===P?(C.preventDefault(),I.focus()):!C.shiftKey&&e.activeElement===I&&(C.preventDefault(),P.focus());}return r.addEventListener("click",y),p.addEventListener("click",y),x.addEventListener("click",y),v.addEventListener("click",()=>E(b)),o.addEventListener("keydown",w),{el:o,open(C){let A=e.defaultView?.HTMLElement;h=A&&e.activeElement instanceof A?e.activeElement:null,o.parentElement!==C&&C.appendChild(o),o.hidden=false,i.focus();},close:y}}function Yf(e,t,n){let o=jf(e,t,n),r=H(e,{label:t("pptx.ribbon.smartArt"),icon:"smart-art",onClick:()=>{let i=r.btn.closest(".pptxv")??e.body;o.open(i);}});return r.btn.title=t("pptx.ribbon.insertSmartArt"),{el:r.btn,setDisabled(i){r.setDisabled(i),i&&o.close();}}}function Xf(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content");a.classList.add("pptxv-ribbon-insert-content");let s=H(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),p=Wf(e,t,E=>n.insert("shape",E)),l=H(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),d=H(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});d.btn.title=t("pptx.ribbon.insertMedia");let u=H(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),m=Gf(e,t,E=>n.insertChart(E)),g=Yf(e,t,(E,T)=>n.insertSmartArt(E,T)),x=H(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});x.btn.title=t("pptx.insert.insertEquation");let v=_f(e,t,E=>n.insertActionButton(E)),f=Uf(e,t,E=>n.insertField(E)),b=$f(e,t,i),h=H(e,{label:t("pptx.headerFooter.title"),icon:"field",textLabel:t("pptx.headerFooter.title"),onClick:r});a.append(s.btn,p.el,l.btn,d.btn,u.btn,m.el,g.el,x.btn,v.el,f.el,b.btn,h.btn);let S=[s,p,l,d,u,m,g,x,v,f,h];return {el:a,setEditable(E){for(let T of S)T.setDisabled(!E);},setHasSelection(E){b.setDisabled(!E);}}}function Zf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=l=>{let d=H(e,{label:t(l),text:t(l),onClick:()=>{}});return d.setDisabled(true),d.btn},a=i("pptx.record.cameo"),s=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),p=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,a,s.btn,p.btn,i("pptx.record.clear"),i("pptx.record.resetToCameo"),i("pptx.record.learnMore")),o}function Qf(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),r=(m,g)=>H(e,{label:t(m),text:t(m),onClick:g}).btn,i=m=>{let g=H(e,{label:t(m),text:t(m),onClick:()=>{}});return g.setDisabled(true),g.btn},a=r("pptx.review.spelling",n.toggleSpellCheck);a.title=t("pptx.review.toggleSpellCheck");let s=H(e,{label:t("pptx.review.accessibilityCheck"),text:t("pptx.review.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});s.btn.title=t("pptx.review.accessibilityCheckTooltip");let p=r("pptx.review.language",()=>n.openSettings("general"));p.title=t("pptx.review.languageTooltip");let l=H(e,{label:t("pptx.ribbon.compare"),text:t("pptx.ribbon.compare"),onClick:n.openCompare});l.btn.title=t("pptx.ribbon.compareTitle");let d=r("pptx.toolbar.comments",n.openComments);d.title=t("pptx.review.toggleComments");let u=r("pptx.review.showComments",n.openComments);return o.append(a,i("pptx.review.thesaurus"),s.btn,i("pptx.review.translate"),p,i("pptx.review.markAllRead"),l.btn,d,i("pptx.common.delete"),i("pptx.common.previous"),i("pptx.common.next"),u,i("pptx.review.readOnly"),i("pptx.review.restrictPermission"),i("pptx.review.hideInk")),{el:o,setEditable:m=>l.setDisabled(!m)}}function _C(e,t,n,o){let r=t(n.labelKey),i=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-show-option"),a=e.createElement("input");return a.type="checkbox",a.disabled=n.unsupported,a.setAttribute("aria-label",r),n.unsupported||a.addEventListener("change",()=>{let s=chunkR2NUNRIB_cjs.oe(n.id,a.checked);s&&o.updateShowOptions(s);}),i.append(a,e.createTextNode(r)),{el:i,descriptor:n,input:a}}function Jf(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),icon:"play",onClick:n.startFromBeginning});i.btn.title=t("pptx.slideShow.fromBeginningTooltip");let a=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent});a.btn.title=t("pptx.slideShow.fromCurrentTooltip");let s=H(e,{label:t("pptx.slideShow.presenterView"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView});s.btn.title=t("pptx.slideShow.presenterViewTooltip");let p=H(e,{label:t("pptx.slideShow.customShow"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),l=chunkR2NUNRIB_cjs.Qj("broadcast",o)?null:H(e,{label:t("pptx.slideShow.broadcast"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast});l&&(l.btn.title=t("pptx.slideShow.broadcastTooltip"));let d=H(e,{label:t("pptx.slideShow.rehearseCoach"),text:t("pptx.slideShow.rehearseCoach"),onClick:()=>{}});d.setDisabled(true);let u=H(e,{label:t("pptx.slideShow.setUp"),text:t("pptx.slideShow.setUp"),onClick:n.openSetUp});u.btn.title=t("pptx.slideShow.setUpTooltip");let m=H(e,{label:t("pptx.slideShow.hideSlide"),text:t("pptx.slideShow.hideSlide"),onClick:()=>n.toggleHideSlide()});m.btn.setAttribute("aria-pressed","false");let g=H(e,{label:t("pptx.slideShow.rehearseTimings"),text:t("pptx.slideShow.rehearseTimings"),onClick:n.startRehearsal});g.btn.title=t("pptx.slideShow.rehearseTimingsTooltip");let x=H(e,{label:t("pptx.titleBar.record"),text:t("pptx.titleBar.record"),onClick:n.startRehearsal}),v=H(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles});v.btn.title=t("pptx.slideShow.subtitlesTooltip");let f=H(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings}),b=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-show-options"),h=chunkR2NUNRIB_cjs.me.map(E=>_C(e,t,E,n));b.append(...h.map(E=>E.el));let S=()=>{let E=n.showOptions();for(let T of h)T.input.checked=T.descriptor.unsupported?false:chunkR2NUNRIB_cjs.ne(E,T.descriptor.id);};return S(),r.append(i.btn,a.btn,s.btn,p.btn,...l?[l.btn]:[],d.btn,u.btn,m.btn,g.btn,x.btn,b,v.btn,f.btn),{el:r,syncOptions:S,setSubtitlesVisible:E=>v.setActive(E),setHideSlideActive:E=>{m.setActive(E),m.btn.setAttribute("aria-pressed",String(E));}}}function eh(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-advance"),r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.ribbon.advanceSlide"),o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-transition-advance-row"),a=e.createElement("input");a.type="checkbox",a.checked=true,a.setAttribute("aria-label",t("pptx.ribbon.onMouseClick")),i.append(a,e.createTextNode(t("pptx.ribbon.onMouseClick")));let s=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-transition-advance-row"),p=e.createElement("input");p.type="checkbox",p.setAttribute("aria-label",t("pptx.ribbon.afterDuration"));let l=e.createElement("input");l.type="text",l.className="pptxv-transition-advance-seconds",l.value=chunkR2NUNRIB_cjs.he,l.disabled=true,l.title=t("pptx.ribbon.advanceAfterSeconds"),l.setAttribute("aria-label",t("pptx.ribbon.advanceAfterSeconds")),s.append(p,e.createTextNode(t("pptx.ribbon.afterDuration")),l);let d=()=>({advanceOnClick:a.checked,advanceAfter:p.checked,advanceAfterText:l.value}),u=false,m=()=>{l.disabled=u||!p.checked;};return a.addEventListener("change",()=>n(d())),p.addEventListener("change",()=>{m(),n(d());}),l.addEventListener("change",()=>n(d())),l.addEventListener("keydown",g=>g.stopPropagation()),o.append(i,s),{el:o,setValue(g){a.checked=g.advanceOnClick,p.checked=g.advanceAfter,e.activeElement!==l&&(l.value=g.advanceAfterText),m();},setDisabled(g){u=g,a.disabled=g,p.disabled=g,m();}}}function GC(e,t){return e.type===t.type&&e.durationSec===t.durationSec&&e.advanceOnClick===t.advanceOnClick&&e.advanceAfter===t.advanceAfter&&e.advanceAfterText===t.advanceAfterText}function th(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i=n.readDraft()??{...chunkR2NUNRIB_cjs.ie},a=H(e,{label:t("pptx.ribbon.preview"),icon:"play",textLabel:t("pptx.ribbon.preview"),onClick:()=>chunkR2NUNRIB_cjs.se(chunkR2NUNRIB_cjs.ke(void 0,i),e)});a.btn.title=t("pptx.ribbon.previewTransition"),r.appendChild(a.btn);let s=H(e,{label:t("pptx.headerFooter.applyToAll"),icon:"copy",textLabel:t("pptx.headerFooter.applyToAll"),onClick:()=>n.applyDraft(i,true)});s.btn.title=t("pptx.ribbon.applyTransitionToAll");function p(){for(let S of m)S.handle.setActive(S.type===i.type);}let l=S=>{i={...i,...S},p(),n.applyDraft(i,false);},d=eh(e,t,S=>l(S)),u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-transition-gallery"),m=chunkR2NUNRIB_cjs.ge.map(S=>{let E=H(e,{label:t(S.labelKey),text:t(S.labelKey),onClick:()=>l({type:S.type})});return u.appendChild(E.btn),{type:S.type,handle:E}});r.appendChild(u);let g=j(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:S=>l({durationSec:Math.max(0,S)})});g.setValue(i.durationSec),g.input.title=t("pptx.ribbon.transitionDurationTitle"),r.appendChild(g.el);let x=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-transition-sound"),v=e.createElement("select");v.setAttribute("aria-label",t("pptx.ribbon.sound")),v.disabled=true;let f=e.createElement("option");f.value="none",f.textContent=t("pptx.ribbon.soundNone"),v.appendChild(f),x.append(e.createTextNode(t("pptx.ribbon.sound")),v),r.appendChild(x),r.appendChild(s.btn),r.appendChild(d.el);let b=H(e,{label:t("pptx.ribbon.inspector"),icon:"panel-right",textLabel:t("pptx.ribbon.inspector"),onClick:o});b.btn.title=t("pptx.ribbon.openInspectorTransitions"),r.appendChild(b.btn);let h=()=>{p(),g.setValue(i.durationSec),d.setValue(i);};return h(),{el:r,sync(){let S=n.readDraft()??chunkR2NUNRIB_cjs.ie;GC(S,i)||(i=S,h());},setEditable(S){for(let E of m)E.handle.setDisabled(!S);g.setDisabled(!S),s.setDisabled(!S),d.setDisabled(!S);}}}function oh(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon-tab-content"),i=(w,C)=>H(e,{label:t(w),text:t(w),onClick:C}),a=w=>{let C=i(w,()=>{});return C.setDisabled(true),C.btn},s=i("pptx.view.normal",n.normalView);s.btn.title=t("pptx.statusBar.normalView");let p=i("pptx.slideSorter.title",n.openSlideSorter);p.btn.title=t("pptx.view.slideSorterTooltip");let l=i("pptx.view.outlineView",n.openOutlineView);l.btn.title=t("pptx.view.outlineViewTooltip");let d=i("pptx.view.readingView",n.openReadingView),u=i("pptx.master.title",()=>n.toggleMasterView?.());u.btn.title=t("pptx.view.slideMasterTooltip");let m=i("pptx.ruler.rulers",()=>n.toggleViewOption("showRulers")),g=i("pptx.grid.grid",()=>n.toggleViewOption("showGrid")),x=i("pptx.view.guides",()=>n.toggleViewOption("showGuides"));x.btn.title=t("pptx.ribbon.toggleGuides");let v=i("pptx.view.snapToGrid",()=>n.toggleViewOption("snapToGrid")),f=i("pptx.view.snapToShape",()=>n.toggleViewOption("snapToShape")),b=i("pptx.view.selection",n.openSelectionPane);b.btn.title=t("pptx.selectionPane.title");let h=i("pptx.ribbon.eyedropper",n.activateEyedropper);h.btn.title=t("pptx.view.eyedropperTooltip");let S=i("pptx.view.hGuide",()=>n.addGuide("h"));S.btn.title=t("pptx.view.addHorizontalGuide");let E=i("pptx.view.vGuide",()=>n.addGuide("v"));E.btn.title=t("pptx.view.addVerticalGuide");let T=!chunkR2NUNRIB_cjs.Qj("zoom",o),k=T?i("pptx.view.zoomToFit",n.zoomToFit):null;k&&(k.btn.title=t("pptx.view.zoomToFitTooltip"));let y=i("pptx.ribbon.templatesOff",()=>n.toggleTemplateEditing?.());return y.btn.dataset.testid="template-edit-toggle",y.btn.title=t("pptx.view.templateEditingTooltip"),r.append(s.btn,p.btn,l.btn,d.btn,u.btn,a("pptx.master.handoutMasterTitle"),a("pptx.master.notesMasterTitle"),m.btn,g.btn,x.btn,v.btn,b.btn,h.btn,f.btn,S.btn,E.btn,...T?[a("pptx.slideSorter.zoom"),k?.btn??[]].flat():[],y.btn,a("pptx.view.macros")),{el:r,setEditable(w){y.setDisabled(!w),u.setDisabled(!w),h.setDisabled(!w);},setViewOptions(w){m.setActive(w.showRulers),g.setActive(w.showGrid),x.setActive(w.showGuides),v.setActive(w.snapToGrid),f.setActive(w.snapToShape);},setTemplateEditing(w){let C=t(w?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");y.btn.textContent=C,y.btn.title=t("pptx.view.templateEditingTooltip"),y.btn.setAttribute("aria-label",C),y.setActive(w);}}}function In(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let a=ff(e,t,n,o);i.append(a.el);let s=qi(e,t,N=>D(N),o,{startRecording:()=>n.slideShow.startRehearsal()});s.el.hidden=true,i.appendChild(s.el);let p=Ri(e,t,n.findReplace);i.appendChild(p.el);let l=jv(e,t,(N,_)=>_?n.edit.updateEquation(_,N):n.insert.insertEquation(N));i.appendChild(l.el);let d=Yv(e,t,n.edit);i.appendChild(d.el);let u=N=>chunkR2NUNRIB_cjs.Qj(N,o),m=u("file")?null:Vf(e,t,n.file,()=>D("home"),o,r),g=u("home")?null:gf(e,t,{edit:n.edit,onToggleFindReplace:()=>p.toggle()}),x=u("insert")?null:Xf(e,t,n.insert,()=>l.toggle(),()=>n.nav.openHeaderFooter(),()=>n.nav.openHyperlink()),v=u("draw")?null:Lf(e,t,n.draw),f=false,b=()=>n.nav.toggleInspector?.(),h=()=>{n.nav.clearSelection?.(),f||b();},S=u("design")?null:kf(e,t,n.design,()=>d.toggle(),h),E=u("transitions")?null:th(e,t,n.transitions,b),T=u("animations")?null:Tf(e,t,n.edit,b),k=u("slideShow")?null:Jf(e,t,n.slideShow,o),y=u("record")?null:Zf(e,t,n.slideShow),w=u("review")?null:Qf(e,t,n.nav),C=u("view")?null:oh(e,t,n.nav,o),A=u("help")?null:zf(e,t,n.nav),P={file:m?.el,home:g?.el,insert:x?.el,draw:v?.el,design:S?.el,transitions:E?.el,animations:T?.el,slideShow:k?.el,record:y??void 0,review:w?.el,view:C?.el,help:A??void 0},I=chunkR2NUNRIB_cjs.Rj($t,o);for(let N of I){let _=P[N.id];_&&(_.hidden=true,i.appendChild(_));}let L=I.find(N=>N.id===Tn)?.id??I[0]?.id??Tn;function D(N){if(P[N]){L=N,s.setActive(N);for(let _ of Object.keys(P)){let K=P[_];K&&(K.hidden=_!==N);}}}D(L);let R,F={hasClipboard:false,slideCount:0,selectedCount:0},M=()=>{g?.update({editable:B,selectedElement:R,hasClipboard:F.hasClipboard,formatPainterActive:F.formatPainterActive??false,slideCount:F.slideCount,selectedCount:F.selectedCount??0,layouts:F.layouts??[],layoutPreviews:F.layoutPreviews,currentLayoutPath:F.currentLayoutPath,themeFonts:F.themeFonts,embeddedFontFamilies:F.embeddedFontFamilies,customFontFamilies:F.customFontFamilies});},O=()=>{T?.update({editable:B,hasSelection:R!==void 0,selectedElementId:F.selectedElementId,animations:F.animations??[]});},B=false,V=new Set;return {el:i,update(){},setEditState(N){a.setEditState(N),s.el.hidden=!N.editable;},setNotesExpanded(){},setAutosaveStatus:(N,_)=>a.setAutosaveStatus(N,_),setEditable(N){B=N,w?.setEditable(N),C?.setEditable(N),x?.setEditable(N),v?.setEditable(N),p.setEditable(N),l.setEditable(N),d.setEditable(N),S?.setEditable(N),E?.setEditable(N),E?.sync(),k?.syncOptions(),M(),O();},setDrawState:N=>v?.update(N),setTemplateEditing:N=>C?.setTemplateEditing(N),setViewOptions:N=>C?.setViewOptions(N),setHasMacros:N=>m?.setHasMacros(N),setSubtitlesVisible:N=>k?.setSubtitlesVisible(N),setHideSlideActive:N=>k?.setHideSlideActive(N),setInspectorOpen:N=>{f=N,a.setInspectorOpen(N);},toggleFindReplace:()=>p.toggle(),openEquationEditor:(N,_)=>l.openEdit(N,_),setHiddenOptionTabs:N=>{if(V=new Set(N.filter(_=>_!=="file")),s.setHiddenTabs(V),V.has(L)){let _=V.has("home")?I.find(K=>!V.has(K.id))?.id:"home";_&&D(_);}},applyScreenTips:N=>s.applyScreenTips(N),updateSelection(N,_){R=N,F=_,x?.setHasSelection(N!==void 0),M(),O();}}}function Xi(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-shortcuts-panel");n.hidden=true,n.dataset.pptxShortcutsPanel="true",n.setAttribute("role","dialog"),n.setAttribute("aria-modal","false"),n.setAttribute("aria-label",t("pptx.shortcuts.title"));let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-shortcuts-header"),r=chunkR2NUNRIB_cjs.Ok(e,"h2","pptxv-shortcuts-title");r.textContent=t("pptx.shortcuts.title");let i=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-shortcuts-close");i.type="button",i.textContent=t("pptx.shortcuts.close"),i.setAttribute("aria-label",t("pptx.common.close")),o.append(r,i);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-shortcuts-list");for(let p of chunkR2NUNRIB_cjs.qj){let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-shortcuts-row"),d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-shortcuts-action");d.textContent=t(p.actionKey);let u=chunkR2NUNRIB_cjs.Ok(e,"kbd","pptxv-shortcuts-keys");u.textContent=p.shortcut,l.append(d,u),a.appendChild(l);}n.append(o,a);let s=()=>{n.hidden=true;};return i.addEventListener("click",s),{el:n,toggle(){n.hidden=!n.hidden;},close:s,isOpen:()=>!n.hidden}}function nh(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-statusbar"),a=()=>{let w=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-sep");return w.setAttribute("aria-hidden","true"),w},s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-counter");s.setAttribute("aria-live","polite");let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-text");p.textContent=t("pptx.statusBar.language");let l=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(s,a(),p,a(),l),i.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-spacer"));let d=false,u="",m="idle",g=()=>{l.textContent=u.length>0?u:t(d?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),l.classList.toggle("is-saving",m==="saving"),l.classList.toggle("is-error",m==="error");};g();let x=!chunkR2NUNRIB_cjs.Qj("notes",o),v=!chunkR2NUNRIB_cjs.Qj("fullscreen",o),f=!chunkR2NUNRIB_cjs.Qj("zoom",o),b=null;if(x){b=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),b.type="button",b.title=t("pptx.statusBar.toggleNotes"),b.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),b.setAttribute("aria-pressed","false"),b.setAttribute("data-pptx-compact",""),b.appendChild(UC(e,"sticky-note"));let w=chunkR2NUNRIB_cjs.Ok(e,"span");w.textContent=t("pptx.notes.title"),b.appendChild(w),b.addEventListener("click",n.toggleNotes);}let h=H(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});h.btn.setAttribute("data-pptx-compact","");let S=H(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});S.btn.setAttribute("data-pptx-compact","");let E=v?H(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;E?.btn.setAttribute("data-pptx-compact","");let T=null,k=null,y=null;return f&&(T=H(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),T.btn.setAttribute("data-pptx-compact",""),k=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-statusbar-zoom"),k.type="button",k.title=t("pptx.statusBar.zoomToFit"),k.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),k.setAttribute("data-pptx-compact",""),k.addEventListener("click",n.zoomToFit),y=H(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),y.btn.setAttribute("data-pptx-compact","")),i.append(...b?[b]:[],a(),h.btn,S.btn,...E?[E.btn]:[],...[],a(),...T&&k&&y?[T.btn,k,y.btn]:[]),{el:i,update({current:w,total:C,zoomPercent:A}){s.textContent=C>0?t("pptx.statusBar.slideOf",{current:w+1,total:C}):t("pptx.statusBar.noSlides"),k&&(k.textContent=`${Math.round(A)}%`);},setNotesExpanded(w){b?.setAttribute("aria-pressed",String(w)),b?.classList.toggle("is-active",w);},setSaveStatus(w,C){u=w,m=C,g();},setDirty(w){d=w,g();},setPresenting(w){h.btn.classList.toggle("is-active",!w),E?.btn.classList.toggle("is-active",w);}}}function UC(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-statusbar-icon");return n.appendChild($C(e,t)),n}function $C(e,t){return chunkR2NUNRIB_cjs.Zk(e,t)}function rh(e){let{doc:t,t:n,actions:o}=e,r=chunkR2NUNRIB_cjs.tc(e.sections,e.slides);return r.map((i,a)=>{let s=chunkR2NUNRIB_cjs.Ok(t,"section","pptxv-thumb-section"),p=chunkR2NUNRIB_cjs.Ok(t,"header","pptxv-thumb-section-header"),l=chunkR2NUNRIB_cjs.Ok(t,"button","pptxv-thumb-section-toggle");if(l.type="button",l.setAttribute("aria-expanded",String(!i.section?.collapsed)),l.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(s.dataset.sectionId=i.section.id,l.addEventListener("click",()=>o?.toggle(i.section.id))),i.section?.color){let d=chunkR2NUNRIB_cjs.Ok(t,"span","pptxv-thumb-section-color");d.dataset.pptxSectionColor=i.section.color,d.style.background=i.section.color,p.appendChild(d);}if(p.appendChild(l),i.section&&o){let d=chunkR2NUNRIB_cjs.Ok(t,"span","pptxv-thumb-section-actions"),u=(m,g,x,v=false)=>{let f=chunkR2NUNRIB_cjs.Ok(t,"button");f.type="button",f.setAttribute("data-pptx-compact",""),f.title=m,f.setAttribute("aria-label",m),f.textContent=g,f.disabled=v,f.addEventListener("click",x),d.appendChild(f);};u(n("pptx.sections.rename"),"\u270E",()=>{let m=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);m!=null&&o.rename(i.section.id,m);}),u(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),a===0),u(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),a===r.length-1),u(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),p.appendChild(d);}if(s.appendChild(p),!i.section?.collapsed){let d=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-thumb-section-slides");i.slides.forEach((u,m)=>d.appendChild(e.buildSlide(u,i.slideIndexes[m]))),s.appendChild(d);}return s})}var jt=128;function Zi(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-thumbs");r.setAttribute("role","navigation"),r.setAttribute("aria-label",t("pptx.sections.slides"));let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-list");r.appendChild(i);let a=null,s=false,p=false,l=()=>{a&&(a.hidden=!s||p);};if(o){a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-footer"),a.hidden=true;let T=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-thumbs-add");T.type="button",T.appendChild(chunkR2NUNRIB_cjs.Zk(e,"plus")),T.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),T.addEventListener("click",()=>o()),a.appendChild(T),r.appendChild(a);}let d=new Map,u=0,m=[],g={width:1,height:1},x=null,v=[],f,b=1,h=false,S=(T,k,y)=>{let w=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-thumb");w.type="button",w.dataset.slideIndex=String(k),w.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:k+1}));let C=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-num");C.textContent=String(k+1);let A=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-frame",{display:"block",width:`${jt}px`,height:`${Math.round(g.height*y)}px`});A.appendChild(x(T,y)),w.append(C,A);let P=chunkR2NUNRIB_cjs.Ej(T.hidden,"rail",k);if(P.marker&&P.labelId){w.setAttribute(chunkR2NUNRIB_cjs.Aj,P.marker),w.setAttribute("aria-describedby",P.labelId);let I=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-hidden");I.id=P.labelId,I.appendChild(chunkR2NUNRIB_cjs.Zk(e,"eye-off"));let L=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-sr-only");L.textContent=t(chunkR2NUNRIB_cjs.Bj),I.appendChild(L),A.appendChild(I);}return w.addEventListener("click",()=>n(k)),d.set(k,w),w},E=()=>{if(!x)return;d=new Map;let T=jt/Math.max(g.width,1);if(v.length>0){i.replaceChildren(...rh({doc:e,t,sections:v,slides:m,actions:f,buildSlide:(A,P)=>S(A,P,T)})),d.get(u)?.classList.add("is-active");return}let k=h?chunkR2NUNRIB_cjs.ij(m.length,b,i.scrollTop,i.clientHeight||600):chunkR2NUNRIB_cjs.ij(m.length,b,0,m.length*b,0),y=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});h&&(y.style.position="absolute",y.style.insetInline="0",y.style.top=`${k.offsetY}px`);for(let A=k.startIndex;A<=k.endIndex;A+=1){let P=m[A];P&&y.appendChild(S(P,A,T));}let w=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-thumbs-space",{position:"relative",height:h?`${k.totalHeight}px`:"auto"});h&&(w.dataset.virtualized="true"),w.appendChild(y),i.replaceChildren(w);let C=d.get(u);C?.classList.add("is-active"),C?.setAttribute("aria-current","page");};return i.addEventListener("scroll",()=>{h&&E();}),{el:r,render(T,k,y,w,C){p=false,l(),m=T,g=k,x=y,v=w??[],f=C;let A=jt/Math.max(k.width,1);b=Math.round(k.height*A)+8,h=!w?.length&&T.length>=chunkR2NUNRIB_cjs.hj,r.classList.toggle("pptxv-thumbs-virtualized",h),E(),this.setActive(u);},setActive(T){if(u=T,h){let y=T*b,w=y+b,C=i.clientHeight||600;y<i.scrollTop?i.scrollTop=y:w>i.scrollTop+C&&(i.scrollTop=Math.max(0,w-C)),E();}d.forEach((y,w)=>{y.classList.toggle("is-active",w===T),w===T?y.setAttribute("aria-current","page"):y.removeAttribute("aria-current");});let k=d.get(T);k&&typeof k.scrollIntoView=="function"&&k.scrollIntoView({block:"nearest"});},setVisible(T){r.hidden=!T;},setAddSlideVisible(T){s=T,l();},renderMasters(T,k,y,w,C){p=true,l(),i.replaceChildren(),d=new Map,h=false,r.classList.remove("pptxv-thumbs-virtualized");let A=jt/Math.max(k.width,1),P=(I,L,D,R)=>{let F=chunkR2NUNRIB_cjs.Ok(e,"button",`pptxv-thumb${R===null?"":" pptxv-master-layout"}`);F.type="button",F.setAttribute("aria-label",L),F.classList.toggle("is-active",C.masterIndex===D&&C.layoutIndex===R),C.masterIndex===D&&C.layoutIndex===R&&F.setAttribute("aria-current","page");let M=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-num");M.textContent=L;let O=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-thumb-frame",{display:"block",width:`${jt}px`,height:`${Math.round(k.height*A)}px`});O.appendChild(y(I,A)),F.append(M,O),F.addEventListener("click",()=>w(D,R)),i.appendChild(F);};T.forEach((I,L)=>{P({id:I.path,rId:"",slideNumber:0,elements:I.elements??[],backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},I.name||t("pptx.master.master"),L,null),I.layouts?.forEach((D,R)=>P({id:D.path,rId:"",slideNumber:0,elements:[...I.elements??[],...D.elements??[]],backgroundColor:D.backgroundColor??I.backgroundColor,backgroundImage:D.backgroundImage??I.backgroundImage},D.name||t("pptx.master.layout"),L,R));});}}}function WC(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function ih(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch-box");r.appendChild(chunkR2NUNRIB_cjs.Zk(e,"search"));let i=e.createElement("input");i.type="text",i.className="pptxv-cmdsearch-input",i.placeholder=t("pptx.titleBar.searchPlaceholder"),i.setAttribute("aria-label",t("pptx.titleBar.search")),r.appendChild(i),o.appendChild(r);let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch-menu");a.hidden=true,o.appendChild(a);let s=()=>{a.hidden=true,a.replaceChildren();},p=u=>{i.value="",s(),u.run();},l=[],d=()=>{if(l=WC(i.value,n,t),i.value.trim().length===0){s();return}if(a.replaceChildren(),l.length===0){let u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-cmdsearch-empty");u.textContent=t("pptx.titleBar.searchNoResults"),a.appendChild(u);}for(let u of l){let m=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-cmdsearch-item");m.type="button",m.textContent=t(u.labelKey),m.addEventListener("mousedown",g=>{g.preventDefault(),p(u);}),a.appendChild(m);}a.hidden=false;};return i.addEventListener("input",d),i.addEventListener("focus",d),i.addEventListener("blur",s),i.addEventListener("keydown",u=>{u.stopPropagation(),u.key==="Enter"&&l.length>0?p(l[0]):u.key==="Escape"&&(i.value="",s());}),{el:o}}var KC={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function ah(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,a=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-autosave"),s=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-autosave-label");s.textContent=t("pptx.titleBar.autoSave");let p=n.autosaveToggleAvailable??true,l=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-titlebar-switch");l.type="button",l.setAttribute("role","switch"),l.title=t(p?"pptx.titleBar.toggleAutoSave":"pptx.autosave.disabledByHost"),l.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),p||(l.disabled=true,l.classList.add("is-disabled")),l.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-switch-knob"));let d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-autosave-label");a.append(s,l,d),o.appendChild(a);let u=()=>{l.classList.toggle("is-on",i),l.setAttribute("aria-checked",String(i)),d.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};l.addEventListener("click",()=>{p&&(i=n.onToggleAutosave(),u(),A());});let m=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-sep");o.appendChild(m);let g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-qat");o.appendChild(g);let x=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-sep");o.appendChild(x);let v={editable:true,canUndo:false,canRedo:false},f=null,b=null,h=I=>{I==="save"?n.save():I==="undo"?n.undo():I==="redo"?n.redo():n.quickAccess?.run(I);},S=()=>{g.replaceChildren(),f=null,b=null;let I=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};g.hidden=!I.visible||!v.editable;for(let L of I.commandIds){if((L==="undo"||L==="redo")&&chunkR2NUNRIB_cjs.Qj(L,n.hiddenActions))continue;let D=chunkR2NUNRIB_cjs.Tj.find(O=>O.id===L);if(!D)continue;let R=t(D.labelKey),F=KC[D.icon],M=H(e,{label:R,icon:F,text:F===void 0?"Ab":void 0,textLabel:I.showCommandLabels?R:void 0,className:"pptxv-titlebar-btn",onClick:()=>h(L)});if(n.quickAccess){let O=n.quickAccess.screenTip(R);O===void 0?M.btn.removeAttribute("title"):M.btn.title=O;}L==="undo"?(f=M,M.setDisabled(!v.canUndo)):L==="redo"&&(b=M,M.setDisabled(!v.canRedo)),g.appendChild(M.btn);}},E=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-file"),T=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-filename");T.textContent=n.fileName||t(chunkR2NUNRIB_cjs.Oi);let k=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-dot");k.textContent="\u2022",k.setAttribute("aria-hidden","true");let y=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-status");E.append(T,k,y),o.appendChild(E);let w="idle",C=false,A=()=>{y.textContent=t(chunkR2NUNRIB_cjs.Ni({autosaveState:w,isDirty:C,autosaveEnabled:i})),y.classList.toggle("is-error",i&&w==="error"),y.classList.toggle("is-saving",i&&w==="saving");},P=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-search");return P.appendChild(ih(e,t,n.commands).el),o.appendChild(P),o.appendChild(chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-titlebar-spacer")),u(),A(),S(),{el:o,setEditState(I){v=I;for(let D of [a,m,x])D.hidden=!I.editable;let L=n.quickAccess?.getState();g.hidden=!I.editable||L?.visible===false,k.hidden=!I.editable,y.hidden=!I.editable,P.hidden=!I.editable,f?.setDisabled(!I.canUndo),b?.setDisabled(!I.canRedo);},setAutosaveState(I){w=I,A();},setDirty(I){C=I,A();},setAutosaveEnabled(I){i=I,u(),A();},refreshQuickAccess:S}}function Qi(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv");o.tabIndex=0,o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.titleBar.defaultFileName")),o.setAttribute("aria-busy","false"),o.classList.toggle("pptxv-editable",n.editable);let r=null,i=null;n.showToolbar&&(r=ah(e,t,n.titleBar),o.appendChild(r.el),i=In(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el));let a=null,s=n.showToolbar?Li(e,t,{openMenu:()=>a?.toggle("menu"),undo:n.ribbonHandlers.primary.undo,redo:n.ribbonHandlers.primary.redo,save:n.ribbonHandlers.file.save,present:n.ribbonHandlers.slideShow.startFromCurrent},n.hiddenActions):null;s&&(s.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(s.el));let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-body");o.appendChild(p);let l=pi(e,t,n.onSelectSlide);o.appendChild(l.el);let d=Xi(e,t);o.appendChild(d.el);let u=ki(e,t);p.appendChild(u.el);let m=null;n.showThumbnails&&(m=Zi(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide()),p.appendChild(m.el));let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-viewport");g.setAttribute("data-pptx-viewport",""),p.appendChild(g);let x=null;n.showInspector&&(x=wn(e,t,n.inspectorHandlers),x.setEditable(n.editable),p.appendChild(x.el));let v=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-stage-wrap");g.appendChild(v);let f=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-empty");f.textContent=t("pptx.statusBar.noSlides"),f.hidden=true,g.appendChild(f);let b=Di(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(b.el);let h=n.showToolbar?nh(e,t,{toggleNotes:n.ribbonHandlers.nav.toggleNotes,normalView:n.ribbonHandlers.nav.normalView,openSlideSorter:n.ribbonHandlers.nav.openSlideSorter,togglePresentation:n.ribbonHandlers.nav.togglePresentation,zoomIn:n.ribbonHandlers.nav.zoomIn,zoomOut:n.ribbonHandlers.nav.zoomOut,zoomToFit:n.ribbonHandlers.nav.zoomToFit},n.hiddenActions):null;h&&o.appendChild(h.el),a=n.showToolbar?Ii(e,t,n.ribbonHandlers,n.onSelectSlide,x?.el??null,n.hiddenActions):null,a&&(a.setEditable(n.editable),o.appendChild(a.el));let S=Hi(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);S.update(0,0),o.appendChild(S.el);let E=Mi(e,t,o,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,end:n.ribbonHandlers.nav.togglePresentation,...n.presentationToolbarHandlers});o.appendChild(E.el);let T=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-overlay pptxv-loading");T.textContent=t("pptx.common.loading"),T.setAttribute("role","status"),T.setAttribute("aria-live","polite"),T.hidden=true,o.appendChild(T);let k=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-overlay pptxv-error");k.setAttribute("role","alert");let y=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-error-message");return k.appendChild(y),k.hidden=true,o.appendChild(k),{root:o,ribbon:i,titleBar:r,inspector:x,accessibility:l,shortcuts:d,masterSidebar:u,thumbnails:m,viewport:g,stageWrap:v,notes:b,statusBar:h,mobileToolbar:s,mobileActionSheets:a,presentationTouchControls:S,presentationToolbar:E,setLoading(w){T.hidden=!w,o.setAttribute("aria-busy",String(w));},setError(w){k.hidden=w===null,y.textContent=w??"";},setEmpty(w){f.hidden=!w,v.hidden=w;},setPresenting(w){o.classList.toggle("pptxv-presenting",w),E.setPresenting(w);}}}function sh(e){return e.masterViewTarget?{document:{slideMasters:e.slideMasters,notesMaster:e.notesMaster,handoutMaster:e.handoutMaster},target:{tab:e.masterViewTab,masterIndex:e.masterViewTarget.masterIndex,layoutIndex:e.masterViewTarget.layoutIndex}}:null}function G(e){let t=sh(e);if(t)return chunkR2NUNRIB_cjs.ej(t.document,t.target);let n=e.slides[e.currentSlide];return n?e.editTemplateMode?e.templateElementsBySlideId[n.id]??[]:n.elements:[]}function X(e,t){let n=sh(e);if(n){let r=chunkR2NUNRIB_cjs.fj(n.document,n.target,t);return r?.slideMasters?{slideMasters:r.slideMasters}:r?.notesMaster?{notesMaster:r.notesMaster}:r?.handoutMaster?{handoutMaster:r.handoutMaster}:{slideMasters:e.slideMasters}}let o=e.slides[e.currentSlide];return o?e.editTemplateMode?{templateElementsBySlideId:{...e.templateElementsBySlideId,[o.id]:t}}:{slides:e.slides.map((r,i)=>i===e.currentSlide?{...r,elements:t}:r)}:{slides:e.slides}}function Z(e,t){return G(e).find(n=>n.id===t)}function Ln(e){let t=e instanceof Element?e.closest("td"):null;if(!t||t.dataset.rowIndex===void 0||t.dataset.cellIndex===void 0)return null;let n={row:Number(t.dataset.rowIndex),column:Number(t.dataset.cellIndex)};return Number.isFinite(n.row)&&Number.isFinite(n.column)?n:null}function Ji(e,t,n){if(t?.type!=="table"||!t.tableData)return null;let o=Ln(n)??e.selectedTableCell;if(!o)return null;let r=t.tableData.rows[o.row]?.cells[o.column];return {cell:o,context:{hasMultiCellSelection:e.selectedTableCells.length>1,isMergedCell:(r?.gridSpan??1)>1||(r?.rowSpan??1)>1}}}function ph(e,t,n){e.mergeTableCells([t,n==="right"?{row:t.row,column:t.column+1}:{row:t.row+1,column:t.column}]);}function ea(e,t,n){let o=t.getEditActions(),r=n?.cell??null;switch(e){case "copy":return o.copy();case "cut":return o.cut();case "paste":return o.paste();case "duplicate":return o.duplicateSelected();case "delete":return o.deleteSelected();case "bring-forward":return o.bringForward();case "send-backward":return o.sendBackward();case "bring-front":return o.bringToFront();case "send-back":return o.sendToBack();case "group":return o.groupSelected();case "ungroup":return o.ungroupSelected();case "comment":return t.openComments();case "hyperlink":return t.openHyperlink();case "ai-ask":return t.getAi()?.askAboutSelection();case "ai-fix":return qC(t);case "table-insert-row-above":return r?o.mutateTableStructure(r,"insertRowAbove"):void 0;case "table-insert-row-below":return r?o.mutateTableStructure(r,"insertRowBelow"):void 0;case "table-delete-row":return r?o.mutateTableStructure(r,"deleteRow"):void 0;case "table-insert-col-left":return r?o.mutateTableStructure(r,"insertColumnLeft"):void 0;case "table-insert-col-right":return r?o.mutateTableStructure(r,"insertColumnRight"):void 0;case "table-delete-col":return r?o.mutateTableStructure(r,"deleteColumn"):void 0;case "table-merge-selected":return o.mergeTableCells(t.store.get().selectedTableCells);case "table-merge-right":return r?ph(o,r,"right"):void 0;case "table-merge-down":return r?ph(o,r,"down"):void 0;case "table-split":return r?o.splitTableCell(r):void 0}}function qC(e){let t=e.store.get(),n=t.slides[t.currentSlide]?.elements.find(({id:o})=>o===t.selectedElementId)??null;e.getAi()?.fixElement(n,t.currentSlide);}function jC(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:a,top:s}=chunkR2NUNRIB_cjs.ud({x:n,y:o,width:i.width,height:i.height,viewportWidth:r?.innerWidth??i.right,viewportHeight:r?.innerHeight??i.bottom,margin:4});e.style.left=`${a}px`,e.style.top=`${s}px`;}function ta(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,a=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},s=(d,u)=>{let m=chunkR2NUNRIB_cjs.Ok(t,"button",`pptxv-context-menu-item${d.danger?" is-danger":""}`);return m.type="button",m.setAttribute("role","menuitem"),m.textContent=e.getTranslator()(d.labelKey),m.disabled=d.disabled===true,m.addEventListener("click",()=>{a(),ea(d.id,e,u);}),m},p=(d,u,m,g)=>{r=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-context-menu",{left:`${m}px`,top:`${g}px`}),r.dataset.pptxContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.contextMenu.ariaLabel"));for(let x of d){if(x.separatorBefore){let v=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-context-menu-separator");v.setAttribute("role","separator"),r.appendChild(v);}r.appendChild(s(x,u));}(o.closest(".pptxv")??t.body).appendChild(r),jC(r,t,m,g),i=x=>{x instanceof KeyboardEvent&&x.key!=="Escape"||x.target instanceof Node&&r?.contains(x.target)||a();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},l=d=>{let u=n.get();if(!u.editable||u.presenting)return;let m=chunkR2NUNRIB_cjs.Wg(chunkR2NUNRIB_cjs.zh(d.target,e.getStageRoot()),d.target,u.selectedElementId);if(!m||!chunkR2NUNRIB_cjs.xi(m,u.editTemplateMode))return;d.preventDefault(),a(),u.selectedElementIds.includes(m)||e.selectElement(m);let g=Ln(d.target);g&&!n.get().selectedTableCells.some(({row:b,column:h})=>b===g.row&&h===g.column)&&n.set({selectedTableCell:g,selectedTableCells:[g]});let x=n.get(),v=Z(x,m)??null,f=Ji(x,v,d.target);p(chunkR2NUNRIB_cjs.Xg({elementType:v?.type??null,table:f?.context??null,hasMultiSelection:x.selectedElementIds.length>1,aiEnabled:e.getAi()!==null,hasClipboard:x.clipboardPayload!==null}),f,d.clientX,d.clientY);};return o.addEventListener("contextmenu",l),{destroy(){o.removeEventListener("contextmenu",l),a();}}}function oa(e,t){let n=chunkR2NUNRIB_cjs.ug(),o=a=>{let s=a.target;if(!(s&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(s.tagName))){if(t.isPresenting?.()){YC(a,t,n);return}switch(a.key){case "ArrowRight":case "ArrowDown":case "PageDown":case " ":t.next();break;case "ArrowLeft":case "ArrowUp":case "PageUp":t.prev();break;case "Home":t.first();break;case "End":t.last();break;case "Escape":t.escape();break;default:return}a.preventDefault();}},r=chunkR2NUNRIB_cjs.aa(),i=a=>{if(!t.isPresenting?.()||!chunkR2NUNRIB_cjs.$f())return;let s=chunkR2NUNRIB_cjs.ba(a,r);s.intent==="next-slide"?(a.preventDefault(),t.next()):s.intent==="previous-slide"&&(a.preventDefault(),t.prev());};return e.addEventListener("keydown",o),e.addEventListener("wheel",i,{passive:false}),()=>{e.removeEventListener("keydown",o),e.removeEventListener("wheel",i);}}function YC(e,t,n){if(!chunkR2NUNRIB_cjs.$f())return;let o=chunkR2NUNRIB_cjs.vg(e,n);if(o.action!=="none")switch(e.preventDefault(),o.action){case "next":t.next();return;case "previous":t.prev();return;case "first":t.first();return;case "last":t.last();return;case "goto":{let r=o.slideNumber-1,i=t.getSlideCount?.()??0;r>=0&&r<i&&t.goToSlide?.(r);return}case "end":t.escape();return;case "pointerTool":t.setPointerTool?.(o.tool==="arrow"?"none":o.tool);return;case "eraseAnnotations":t.eraseAnnotations?.();return;case "toggleInkMarkup":t.toggleInkMarkup?.();return;case "toggleBlackScreen":t.toggleBlank?.("black");return;case "toggleWhiteScreen":t.toggleBlank?.("white");return;case "toggleSubtitles":t.toggleSubtitles?.();break;case "toggleChrome":t.toggleChrome?.();break;case "showAllSlides":t.showAllSlides?.();break;}}var XC=.1,ZC=8;function na(e,t){let n=chunkR2NUNRIB_cjs.$h({getScale:t.getScale,minScale:XC,maxScale:ZC,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:s=>{t.isSwipeEnabled()&&(s===-1?t.onNext():t.onPrevious());}}}),o=s=>n.onTouchStart(s),r=s=>n.onTouchMove(s),i=s=>n.onTouchEnd(s),a=()=>n.onTouchCancel();return e.addEventListener("touchstart",o,{passive:false,capture:true}),e.addEventListener("touchmove",r,{passive:false,capture:true}),e.addEventListener("touchend",i,{passive:true,capture:true}),e.addEventListener("touchcancel",a,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",a,true),n.cancel();}}function ra(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,a=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",a),{async enter(){if(!i()){if(o)try{await e.requestFullscreen(),e.focus();return}catch{}r=true,t(true),e.focus();}},async exit(){if(o&&n.fullscreenElement===e){await n.exitFullscreen();return}r&&(r=false,t(false));},isActive:i,dispose(){o&&n.removeEventListener("fullscreenchange",a);}}}var ge=chunkR2NUNRIB_cjs.Hc,ia=chunkR2NUNRIB_cjs.Ic;function aa(e,t){let n=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-ruler-corner");n.setAttribute("aria-hidden","true");let o=chunkR2NUNRIB_cjs.Pk(e,"svg",{class:"pptxv-ruler pptxv-ruler-h"});o.setAttribute("data-pptx-ruler","h"),o.setAttribute("role","presentation");let r=chunkR2NUNRIB_cjs.Pk(e,"svg",{class:"pptxv-ruler pptxv-ruler-v"});r.setAttribute("data-pptx-ruler","v"),r.setAttribute("role","presentation");let i=false,a=1,s={width:0,height:0},p=null,l=(m,g)=>{i&&(g.stopPropagation(),g.preventDefault(),g.currentTarget?.setPointerCapture?.(g.pointerId),p=m);},d=(m,g)=>{let x=p;p=null;let v=g.currentTarget;if(x!==m||!i||!v)return;try{v.releasePointerCapture?.(g.pointerId);}catch{}let f=v.getBoundingClientRect(),b=m==="h"?g.clientY-f.top:g.clientX-f.left,h=chunkR2NUNRIB_cjs.Kc(b,a,m==="h"?s.height:s.width);h!==null&&t(m,h);};o.addEventListener("pointerdown",m=>l("h",m)),o.addEventListener("pointerup",m=>d("h",m)),r.addEventListener("pointerdown",m=>l("v",m)),r.addEventListener("pointerup",m=>d("v",m));let u=(m,g,x,v)=>{let f=x*v.scale,b=g==="h";chunkR2NUNRIB_cjs.Qk(m,{width:b?f:ge,height:b?ge:f}),m.replaceChildren(),m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"rect",{class:"pptxv-ruler-bg",width:b?f:ge,height:b?ge:f}));let h=v.selection;if(h){let S=(b?h.x:h.y)*v.scale,E=Math.max((b?h.width:h.height)*v.scale,1);m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"rect",{class:"pptxv-ruler-highlight",x:b?S:0,y:b?0:S,width:b?E:ge,height:b?ge:E}));}for(let S of chunkR2NUNRIB_cjs.Jc(x,v.scale,v.unit)){let E=ge-ge*(S.isMajor?.6:.3);if(m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"line",{class:"pptxv-ruler-tick",x1:b?S.position:ge,y1:b?ge:S.position,x2:b?S.position:E,y2:b?E:S.position,"stroke-width":S.isMajor?1:.5})),!S.label)continue;let T=chunkR2NUNRIB_cjs.Pk(e,"text",{class:"pptxv-ruler-label",x:b?S.position+2:2,y:b?ia+1:S.position+ia+2,"font-size":ia});T.textContent=S.label,m.appendChild(T);}m.appendChild(chunkR2NUNRIB_cjs.Pk(e,"line",{class:"pptxv-ruler-edge",x1:b?0:ge-.5,y1:b?ge-.5:0,x2:b?f:ge-.5,y2:b?ge-.5:f}));};return {mount(m){n.parentNode!==m&&m.append(n,o,r);},update(m){i=m.draggable,a=m.scale,s=m.canvasSize,n.hidden=!m.visible,o.style.display=m.visible?"":"none",r.style.display=m.visible?"":"none",o.classList.toggle("is-draggable",m.draggable),r.classList.toggle("is-draggable",m.draggable),m.visible&&(u(o,"h",m.canvasSize.width,m),u(r,"v",m.canvasSize.height,m));},destroy(){n.remove(),o.remove(),r.remove();}}}function QC(e){let t={presentFromStart:()=>e.startPresentationFromBeginning(),print:()=>{e.print();},exportPdf:()=>{e.exportPdf();},newSlide:()=>e.getEditActions().addSlide(),spellCheck:()=>e.getEditActions().toggleSpellCheck(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut()};return n=>t[n]?.()}function sa(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:a}=e,s=Qi(t,o,{showToolbar:r.showToolbar??true,showThumbnails:r.showThumbnails??true,showFormatToolbar:r.showFormatToolbar??true,showInspector:r.showInspector??true,editable:r.editable??false,hiddenActions:r.hiddenActions,titleBar:{fileName:r.fileName,autosaveEnabled:e.isAutosaveSwitchOn?.()??r.autosave!==false,autosaveToggleAvailable:e.isAutosaveToggleAvailable?.()??r.autosave!==false,onToggleAutosave:()=>e.toggleAutosave(),save:()=>e.save(),undo:()=>e.undo(),redo:()=>e.redo(),commands:JC(e),hiddenActions:r.hiddenActions,quickAccess:{getState:()=>e.getQuickAccessOptions(),run:QC(e),screenTip:k=>e.quickAccessScreenTip(k)}},accountAuth:r.accountAuth,presentationToolbarHandlers:{setTool:k=>e.setPresentationPointerTool?.(k),setColor:k=>e.setPresentationPointerColor?.(k),toggleBlackboard:()=>e.togglePresentationBlackboard?.(),clearAnnotations:()=>e.erasePresentationAnnotations?.(),togglePresenterView:()=>e.togglePresenterView?.()},...Db(e)}),p=_t(s.root,e.initialTheme??r.theme,[]);n.appendChild(s.root),s.statusBar?.setNotesExpanded(i.get().notesExpanded),s.statusBar?.setDirty(i.get().dirty),s.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),s.titleBar?.setDirty(i.get().dirty);let l=oa(s.root,{next:e.next,prev:e.prev,first:e.goToFirstSlide,last:e.goToLastSlide,escape:e.exitPresentation,isPresenting:()=>i.get().presenting,goToSlide:e.goToSlide,getSlideCount:()=>i.get().slides.length,setPointerTool:e.setPresentationPointerTool,eraseAnnotations:e.erasePresentationAnnotations,toggleInkMarkup:e.togglePresentationInkMarkup,toggleBlank:e.togglePresentationBlank,toggleSubtitles:e.toggleSubtitles,toggleChrome:()=>s.presentationToolbar.toggleVisible(),showAllSlides:e.showPresentationAllSlides}),d=na(s.root,{getScale:()=>a.effectiveScale(),onPinchZoom:k=>e.setZoom(k),isSwipeEnabled:()=>{let k=i.get();return k.presenting||!k.editable},onNext:()=>{let k=i.get();si({presenting:k.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:k.slides[k.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),u=t.createElement("button");u.type="button",u.setAttribute("data-pptx-end-of-show",""),u.className="pptxv-presentation-end",Object.assign(u.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let m=t.createElement("span");Object.assign(m.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),m.textContent=o("pptx.presentation.endOfSlideShow"),u.appendChild(m),u.addEventListener("click",k=>{k.stopPropagation(),e.next();});let g=()=>{let k=i.get(),y=k.presenting&&k.endOfShow;y&&u.parentElement!==s.root?s.root.appendChild(u):!y&&u.parentElement&&u.remove();},x=i.subscribe(g);g();let v=k=>{let y=i.get();!y.presenting||!(k.target instanceof Element)||!k.target.closest(".pptxv-stage")||!Mb({target:k.target,presenting:y.presenting,animationBuildsComplete:a.presentationPlayback.isComplete(),currentSlide:y.slides[y.currentSlide],slideCount:y.slides.length,runner:{goToSlide:C=>e.goToSlide(C),move:C=>C>0?e.next():e.prev(),endShow:()=>e.exitPresentation()}})||e.next();};s.root.addEventListener("click",v);let f=Hb({getState:()=>i.get(),subscribe:k=>i.subscribe(k),next:()=>e.next()}),b=Rb({getPresenting:()=>i.get().presenting,subscribe:k=>i.subscribe(k),root:s.root,cancelAutoAdvance:f.cancel,rearmAutoAdvance:f.rearm}),h=()=>{s.root.removeEventListener("click",v),f.detach(),b(),x(),u.remove();},S={current:void 0},E=ra(s.root,k=>{if(!k&&i.get().presenting&&e.classifyPresentationExit?.()==="restore-show"){S.current?.enter();return}i.set({presenting:k});});S.current=E;let T=null;return typeof ResizeObserver<"u"&&(T=new ResizeObserver(()=>{i.get().zoom==="fit"&&a.renderStage();}),T.observe(s.viewport)),{chrome:s,presentation:E,detachKeyboard:l,detachTouchGestures:d,detachPresentationClick:h,resizeObserver:T,appliedThemeVars:p}}function JC(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function pa(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function la(e){return {doc:e.doc,container:e.container,t:e.t,options:e.options,store:e.store,renderer:e.renderer,initialTheme:e.currentTheme,prev:()=>e.prev(),next:()=>e.next(),setZoom:t=>e.setZoom(t),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>{e.lifecycle.presentation.isActive()?e.exitPresentation():e.enterPresentation();},returnToNormalView:()=>{e.store.get().presenting&&e.exitPresentation(),e.container.querySelector("[data-pptx-slide-sorter]")?.remove();},undo:()=>e.undo(),redo:()=>e.redo(),toggleAutosave:()=>e.toggleAutosave(),isAutosaveSwitchOn:()=>e.isAutosaveSwitchOn(),isAutosaveToggleAvailable:()=>e.isAutosaveToggleAvailable(),startPresentationFromBeginning:()=>{e.goToSlide(0),e.enterPresentation();},startPresentationFromCurrent:()=>{e.enterPresentation();},openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openShare:()=>e.openShare(),openAccessibility:()=>e.openAccessibility(),openSettings:t=>e.openSettings(t),openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSetUpSlideShow:()=>e.openSetUpSlideShow(),toggleHideCurrentSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),toggleSubtitles:()=>e.toggleSubtitles(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),openCustomShows:()=>e.openCustomShows(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterNavigation:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.store.set({inspectorOpen:!e.store.get().inspectorOpen}),selectElement:t=>e.selectElements([t]),clearSelection:()=>e.selectElements([]),readTransitionDraft:()=>{let t=e.store.get();return chunkR2NUNRIB_cjs.je(t.slides[t.currentSlide])},presentationProperties:()=>e.store.get().presentationProperties,save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),packageForSharing:()=>e.packageForSharing(),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),goToFirstSlide:()=>e.goToFirstSlide(),goToLastSlide:()=>e.goToLastSlide(),exitPresentation:()=>{e.exitPresentation();},setPresentationPointerTool:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"};e.updatePresenterSnapshot({pointer:{...n,tool:n.tool===t?"none":t}});},setPresentationPointerColor:t=>{let n=e.getPresenterSnapshot().pointer??{x:.5,y:.5,tool:"none"};e.updatePresenterSnapshot({pointer:{...n,color:t}});},togglePresenterView:()=>e.togglePresenterView(),showPresentationAllSlides:()=>e.showPresentationAllSlides(),classifyPresentationExit:()=>e.classifyPresentationExit(),erasePresentationAnnotations:()=>e.clearPresentationAnnotations(),togglePresentationInkMarkup:()=>e.updatePresenterSnapshot({inkMarkupVisible:e.getPresenterSnapshot().inkMarkupVisible===false}),togglePresentationBlank:t=>e.updatePresenterSnapshot({blackout:e.getPresenterSnapshot().blackout===t?"none":t}),togglePresentationBlackboard:()=>{let t=e.getPresenterSnapshot(),n=t.pointer??{x:.5,y:.5,color:"#ef4444",tool:"none"},o=chunkR2NUNRIB_cjs.kg(t.blackout,n.tool);e.updatePresenterSnapshot({blackout:o.blackout,pointer:{...n,tool:o.tool}});},commitNotes:(t,n)=>e.editor.commitNotes(t,n),exportSlidePng:()=>e.exportSlidePng(),copySlideAsImage:()=>e.copySlideAsImage(),exportPdf:()=>e.exportPdf(),exportGif:()=>e.exportGif(),exportVideo:()=>e.exportVideo(),exportJson:()=>e.exportJson(),print:()=>Promise.resolve((e.openPrintDialog(),true)),openFile:()=>e.openFile(),openRecentFile:t=>e.openRecentFile(t),createPresentation:t=>e.createPresentation(t),getEditActions:()=>e.editor.getEditActions(),getFindReplaceActions:()=>e.editor.getFindReplaceActions(),setTheme:t=>e.setTheme(t),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t),getQuickAccessOptions:()=>e.getQuickAccessOptions(),quickAccessScreenTip:t=>e.quickAccessScreenTip(t)}}function da(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let a=n(i);Object.keys(a).length!==0&&(t.pushHistory(),e.set(X(o,G(o).map(s=>s.id===r?{...s,...a}:s))),t.commitChange());}}function ca(e,t,n){return e[t]?.elements.find(o=>o.id===n)}function lh(e,t,n){return e.map((o,r)=>r===t?{...chunkR2NUNRIB_cjs.k(o),elements:n(o.elements)}:o)}function ma(e,t,n){return lh(e,t,o=>o.filter(r=>r.id!==n))}function Dn(e){return e.map(chunkR2NUNRIB_cjs.k)}function Yt(e,t,n){return lh(e,t,o=>[...o,n])}function ua(e,t,n,o){return e.map((r,i)=>i===t?{...chunkR2NUNRIB_cjs.k(r),notes:n,notesSegments:o?.map(a=>({...a,style:{...a.style}}))}:r)}function me(e,t,n){return e.map((o,r)=>r===t?{...chunkR2NUNRIB_cjs.k(o),...n}:o)}function xa(e,t){return e.map(n=>({...chunkR2NUNRIB_cjs.k(n),...t}))}function ga(e){let{store:t,ops:n}=e,o=(r,i)=>{let a=t.get(),s=a.slides[a.currentSlide];if(!a.editable||!s?.animations?.some(l=>l.elementId===r))return;let p=i(s.animations);n.pushHistory(),t.set({slides:me(a.slides,a.currentSlide,{animations:p})}),n.commitChange();};return {addAnimation(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let l=chunkR2NUNRIB_cjs.ab(p.animations??[],s,r,i);n.pushHistory(),t.set({slides:me(a.slides,a.currentSlide,{animations:l})}),n.commitChange();},removeAnimation(){let r=t.get(),i=r.selectedElementId,a=r.slides[r.currentSlide];if(!r.editable||!i||!a?.animations?.length)return;let s=chunkR2NUNRIB_cjs.bb(a.animations,i);s.length!==a.animations.length&&(n.pushHistory(),t.set({slides:me(r.slides,r.currentSlide,{animations:s})}),n.commitChange());},setAnimationEffect(r,i){let a=t.get(),s=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!s||!p)return;let d=(r==="entrance"?chunkR2NUNRIB_cjs.Na:r==="exit"?chunkR2NUNRIB_cjs.Oa:chunkR2NUNRIB_cjs.Pa)(p.animations??[],s,i);n.pushHistory(),t.set({slides:me(a.slides,a.currentSlide,{animations:d})}),n.commitChange();},applyMotionPath(r){if(r==="custom")return;let i=t.get(),a=i.selectedElementId,s=i.slides[i.currentSlide];if(!i.editable||!a||!s)return;let p=s.animations??[],l=r==="none"?chunkR2NUNRIB_cjs.sb(p,a):chunkR2NUNRIB_cjs.rb(p,a,r);n.pushHistory(),t.set({slides:me(i.slides,i.currentSlide,{animations:l})}),n.commitChange();},setMotionPathData(r){let i=t.get(),a=i.selectedElementId,s=i.slides[i.currentSlide];if(!i.editable||!a||!s)return;let p=chunkR2NUNRIB_cjs.qb(s.animations??[],a,r);n.pushHistory(),t.set({slides:me(i.slides,i.currentSlide,{animations:p})}),n.commitChange();},setAnimationTiming(r,i){o(r,a=>{let s=[...a];return i.durationMs!==void 0&&(s=chunkR2NUNRIB_cjs.Sa(s,r,i.durationMs)),i.delayMs!==void 0&&(s=chunkR2NUNRIB_cjs.Ta(s,r,i.delayMs)),i.trigger!==void 0&&(s=chunkR2NUNRIB_cjs.Qa(s,r,i.trigger)),i.direction!==void 0&&(s=chunkR2NUNRIB_cjs.Va(s,r,i.direction)),i.sequence!==void 0&&(s=chunkR2NUNRIB_cjs.Wa(s,r,i.sequence)),i.timingCurve!==void 0&&(s=chunkR2NUNRIB_cjs.Ua(s,r,i.timingCurve)),i.repeatCount!==void 0&&(s=chunkR2NUNRIB_cjs.Xa(s,r,i.repeatCount)),i.repeatMode!==void 0&&(s=chunkR2NUNRIB_cjs.Ya(s,r,i.repeatMode)),i.triggerShapeId!==void 0&&(s=chunkR2NUNRIB_cjs.Ra(s,r,i.triggerShapeId||void 0)),s});},reorderAnimation(r,i){o(r,a=>i==="up"?chunkR2NUNRIB_cjs.Za(a,r):chunkR2NUNRIB_cjs._a(a,r));},moveAnimation(r,i){o(r,a=>chunkR2NUNRIB_cjs.$a(a,{elementId:r},i));}}}function dh(e,t){return t.size===0?[...e]:e.map(n=>{let o=t.get(n.id);return o?{...n,x:o.x??n.x,y:o.y??n.y}:n})}function ba(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return dh(e,chunkR2NUNRIB_cjs.Sb(r,n))}function va(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return dh(e,chunkR2NUNRIB_cjs.Tb(r,n))}function fa(e,t,n){switch(t){case "left":return {x:0};case "right":return {x:n.width-e.width};case "centerH":return {x:(n.width-e.width)/2};case "top":return {y:0};case "bottom":return {y:n.height-e.height};case "middle":return {y:(n.height-e.height)/2}}}function Mn(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function ha(e,t,n){return chunkR2NUNRIB_cjs.o(e,t,n)}function ya(e,t,n,o=false){return chunkR2NUNRIB_cjs.p(e,t,n,{intoTemplate:o})}function Sa(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let a=t.get(),s=a.selectedElementId,p=G(a);!a.editable||!s||!p||i(p,s)!==p&&(n.pushHistory(),t.set(X(a,i(p,s))),n.commitChange());};return {bringForward:()=>r(chunkR2NUNRIB_cjs.qc),sendBackward:()=>r(chunkR2NUNRIB_cjs.rc),bringToFront:()=>r(chunkR2NUNRIB_cjs.oc),sendToBack:()=>r(chunkR2NUNRIB_cjs.pc),alignElements(i){let a=t.get();if(a.selectedElementIds.length<2){o(s=>fa(s,i,a.canvasSize));return}n.pushHistory(),t.set(X(a,ba(G(a),a.selectedElementIds,i))),n.commitChange();},distributeElements(i){let a=t.get();!a.editable||a.selectedElementIds.length<3||(n.pushHistory(),t.set(X(a,va(G(a),a.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>Mn(i,"horizontal")),flipVertical:()=>o(i=>Mn(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let a=ha(G(i),i.selectedElementIds,i.editTemplateMode?chunkR2NUNRIB_cjs.Lg(true,i.selectedElementIds[0]):chunkR2NUNRIB_cjs.Kg());a.groupId&&(n.pushHistory(),t.set({...X(i,a.elements),selectedElementId:a.groupId,selectedElementIds:[a.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),a=i.selectedElementId,s=G(i),p=n.selectedElement(i);if(!i.editable||!a||!s||!p||p.type!=="group")return;let l=p.children.map(u=>i.editTemplateMode?chunkR2NUNRIB_cjs.Lg(true,u.id||p.id):chunkR2NUNRIB_cjs.Kg()),d=ya(s,a,l,i.editTemplateMode);d.childIds.length!==0&&(n.pushHistory(),t.set({...X(i,d.elements),selectedElementId:d.childIds.at(-1)??null,selectedElementIds:d.childIds}),n.commitChange());}}}function wa(e){let{store:t,ops:n}=e;return {setSlideBackgroundColor(o){let r=t.get();if(r.editable){if(r.masterViewTarget){n.pushHistory(),r.masterViewTab==="notes"&&r.notesMaster?t.set({notesMaster:{...r.notesMaster,backgroundColor:o}}):r.masterViewTab==="handout"&&r.handoutMaster?t.set({handoutMaster:{...r.handoutMaster,backgroundColor:o}}):t.set({slideMasters:ch(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:me(r.slides,r.currentSlide,{backgroundColor:o})}),n.commitChange());}},clearSlideBackground(){let o=t.get();if(o.editable){if(o.masterViewTarget){n.pushHistory(),o.masterViewTab==="notes"&&o.notesMaster?t.set({notesMaster:{...o.notesMaster,backgroundColor:void 0,backgroundImage:void 0}}):o.masterViewTab==="handout"&&o.handoutMaster?t.set({handoutMaster:{...o.handoutMaster,backgroundColor:void 0,backgroundImage:void 0}}):t.set({slideMasters:ch(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:me(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}}}}function ch(e,t){let n=e.masterViewTarget;return n?e.slideMasters.map((o,r)=>r!==n.masterIndex?o:n.layoutIndex===null?{...o,...t}:{...o,layouts:o.layouts?.map((i,a)=>a===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function Ca(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunkR2NUNRIB_cjs.Mg(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunkR2NUNRIB_cjs.Mg(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunkR2NUNRIB_cjs.Ng(r.element);n.pushHistory(),t.set({...X(o,[...G(o),i]),selectedElementId:i.id,selectedElementIds:[i.id]}),n.commitChange();}}}function Ea(e){let{store:t,ops:n}=e;return {updatePresentationSettings(o){n.updatePresentationProperties({...t.get().presentationProperties,...o});},applyThemeByPath(o,r){let i=e.getHandler();!i||!o||!t.get().editable||(async()=>(await i.setPresentationTheme(o,r),t.set({slideMasters:t.get().slideMasters.map((a,s)=>r||s===0?{...a,themePath:o}:a)}),n.commitChange()))();},applyThemeEdit({colorScheme:o,fontScheme:r,name:i}){let a=t.get();if(!a.editable)return;n.pushHistory();let s=chunkR2NUNRIB_cjs.F({slides:a.slides,theme:{colorScheme:a.colorScheme,fontScheme:a.fontScheme},themeColorMap:a.colorScheme?{...a.colorScheme}:void 0},o,r,i);t.set({slides:s.slides,colorScheme:s.theme?.colorScheme??o,fontScheme:s.theme?.fontScheme??r,themeName:i}),n.commitChange();},updateTagCollections(o){t.get().editable&&(t.set({tagCollections:o}),n.commitChange());},updateActiveSlide(o){let r=t.get();!r.editable||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:me(r.slides,r.currentSlide,o)}),n.commitChange());},setTemplateBackground(o,r){let i=e.getHandler();!i||!t.get().editable||(i.setTemplateBackground(o,r),t.set({slideMasters:t.get().slideMasters.map(a=>a.path===o?{...a,backgroundColor:r}:a)}),n.commitChange());},getTemplateBackgroundColor(o){return e.getHandler()?.getTemplateBackgroundColor(o)},updateCanvasSize(o){!Number.isFinite(o.width)||!Number.isFinite(o.height)||t.get().editable&&(t.set({canvasSize:{width:Math.max(1,Math.round(o.width)),height:Math.max(1,Math.round(o.height))}}),n.commitChange());},updateSlideSize(o){!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0||t.get().editable&&(t.set({slideSize:{...o},canvasSize:chunkR2NUNRIB_cjs.De(o)}),n.commitChange());}}}async function Ta(e,t){let n=new eE__default.default,o=n.folder("presentation-package");if(!o)throw new Error("Unable to create presentation package");return o.file(t,e),o.file("README.txt",chunkR2NUNRIB_cjs.pk(t)),n.generateAsync({type:"blob"})}function mh(e,t,n,o){t.querySelectorAll(".pptxv-alignment-guide").forEach(r=>r.remove());for(let r of n){let i=e.createElement("div");i.className=`pptxv-alignment-guide is-${r.axis}`,i.style[r.axis==="h"?"top":"left"]=`${r.position*o}px`,t.appendChild(i);}}function uh(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=G(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="connector"?t:null}function xh(e){let{doc:t,store:n,ops:o}=e,r=t.createElement("div");r.className="pptxv-connector-endpoints",r.setAttribute("data-pptx-connector-endpoints","");let i=null,a=m=>{let g=r.getBoundingClientRect(),x=e.getScale()||1;return {x:(m.clientX-g.left)/x,y:(m.clientY-g.top)/x}},s=m=>{i&&(i={kind:i.kind,...a(m)},u());},p=m=>{let g=i;i=null,l();let x=n.get(),v=uh(x);if(!g||!v){u();return}let f=G(x),b=a(m),h=chunkR2NUNRIB_cjs.rd(chunkR2NUNRIB_cjs.qd(f.filter(T=>T.id!==v.id)),b.x,b.y),S=chunkR2NUNRIB_cjs.sd(v,f,g.kind,b,h),E=chunkR2NUNRIB_cjs.td(v,S);o.pushHistory(),n.set(X(x,f.map(T=>T.id===v.id?E:T))),o.commitChange();},l=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",p);};function d(m,g){let x=t.createElement("button");x.type="button",x.className="pptxv-connector-endpoint",m.attached&&x.classList.add("is-attached"),x.dataset.pptxConnectorEndpoint=m.kind,x.dataset.pptxConnectorAttached=String(m.attached),x.setAttribute("aria-label",e.label(m.kind));let v=i?.kind===m.kind?i:m;return x.style.left=`${v.x*g}px`,x.style.top=`${v.y*g}px`,x.addEventListener("pointerdown",f=>{f.preventDefault(),f.stopPropagation(),i={kind:m.kind,...a(f)},window.addEventListener("pointermove",s),window.addEventListener("pointerup",p),window.addEventListener("pointercancel",p),u();}),x}function u(){let m=n.get(),g=uh(m);if(r.replaceChildren(),!g)return;let x=e.getScale()||1,v=G(m);if(i){let f=chunkR2NUNRIB_cjs.qd(v.filter(h=>h.id!==g.id)),b=chunkR2NUNRIB_cjs.rd(f,i.x,i.y);for(let h of f){let S=t.createElement("div");S.className="pptxv-connection-site",S.setAttribute("data-pptx-connection-site",""),b?.elementId===h.elementId&&b.siteIndex===h.siteIndex&&S.classList.add("is-snapped"),S.style.left=`${h.x*x}px`,S.style.top=`${h.y*x}px`,r.appendChild(S);}}for(let f of chunkR2NUNRIB_cjs.pd(g))r.appendChild(d(f,x));}return {root:r,mount(m){m.appendChild(r),u();},sync:u,dispose(){l(),i=null,r.remove();}}}var tE={type:"linear",angle:90,stops:[{color:"#4472c4",position:0,opacity:1},{color:"#ffffff",position:100,opacity:1}]};function oE(e){return e&&chunkR2NUNRIB_cjs.d(e)?{fillColor:e.shapeStyle?.fillColor,strokeColor:e.shapeStyle?.strokeColor,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,strokeColor:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function Pa(e,t=null,n=[],o=null,r=new Map,i=null){let a=oE(e),s=e?chunkR2NUNRIB_cjs.cd(e):void 0,p=e?chunkR2NUNRIB_cjs.Kh(e):void 0,l=e?chunkR2NUNRIB_cjs.Mh(e):void 0,d=e?chunkR2NUNRIB_cjs.Oh(e):void 0,u=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,isLocked:chunkR2NUNRIB_cjs.gc(e),canShape:Cn(e),canText:Ee(e),isImage:e!==void 0&&chunkR2NUNRIB_cjs.b(e),isChart:e?.type==="chart",isMedia:e?.type==="media",isTable:e?.type==="table",isSmartArt:e?.type==="smartArt",smartArtData:e?.type==="smartArt"?e.smartArtData:void 0,isGroup:e?.type==="group",groupChildCount:e?.type==="group"&&Array.isArray(e.children)?e.children.length:void 0,isOle:e?.type==="ole",oleObjectType:e?.type==="ole"?e.oleObjectType:void 0,oleFileName:e?.type==="ole"?e.fileName:void 0,oleIsLinked:e?.type==="ole"&&e.isLinked===true,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:a.fillColor,strokeColor:a.strokeColor,strokeWidth:a.strokeWidth,shapeStyle:e&&chunkR2NUNRIB_cjs.d(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:a.fillOpacity,strokeOpacity:a.strokeOpacity,gradientEnabled:e!==void 0&&chunkR2NUNRIB_cjs.Fh(e),gradient:e?chunkR2NUNRIB_cjs.Eh(e):tE,vAlign:s?.vAlign??"top",textWrap:e?chunkR2NUNRIB_cjs.fd(e):"square",autoFitMode:e?chunkR2NUNRIB_cjs.gd(e):"none",characterSpacing:s?.characterSpacing??0,lineSpacing:s?.lineSpacing??1,lineSpacingExactPt:s?.lineSpacingExactPt??null,paragraphSpacingBefore:s?.paragraphSpacingBefore??0,paragraphSpacingAfter:s?.paragraphSpacingAfter??0,paragraphIndent:s?.paragraphIndent??0,paragraphMarginLeft:s?.paragraphMarginLeft??0,textDirection:s?.textDirection??"horizontal",textRtl:s?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:p?.brightness??0,imageContrast:p?.contrast??0,imageSaturation:p?.saturation??0,imageArtisticEffect:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunkR2NUNRIB_cjs.b(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunkR2NUNRIB_cjs.b(e)?e.imageEffects?.colorWash:void 0,altText:e&&"altText"in e&&typeof e.altText=="string"?e.altText:"",chartHighlightCell:e?.type==="chart"&&i?.elementId===e.id?{seriesIndex:i.part.seriesIndex,pointIndex:i.part.pointIndex}:null,actionClick:e?.actionClick?chunkR2NUNRIB_cjs.q(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunkR2NUNRIB_cjs.q(e.actionHover,"hover"):void 0,chartData:e?.type==="chart"?e.chartData:void 0,media:e?.type==="media"?e:void 0,mediaPreviewUrl:e?.type==="media"?e.mediaData??(e.mediaPath?r.get(e.mediaPath):void 0):void 0,mediaPosterUrl:e?.type==="media"?e.posterFrameData??(e.posterFramePath?r.get(e.posterFramePath):void 0):void 0,cropLeft:l?.cropLeft??0,cropTop:l?.cropTop??0,cropRight:l?.cropRight??0,cropBottom:l?.cropBottom??0,tableHeaderRow:d?.firstRowHeader??false,tableBandedRows:d?.bandedRows??false,tableBandedColumns:d?.bandedColumns??false,tableLastRow:e?.type==="table"?e.tableData?.lastRow??false:false,tableFirstCol:e?.type==="table"?e.tableData?.firstCol??false:false,tableLastCol:e?.type==="table"?e.tableData?.lastCol??false:false,tableRtl:e?.type==="table"?e.tableData?.rtl??false:false,tableStyleId:e?.type==="table"?e.tableData?.tableStyleId??"":"",tableCellBackground:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.backgroundColor??"#ffffff":"#ffffff",tableCellBorder:e?.type==="table"?e.tableData?.rows[0]?.cells[0]?.style?.borderColor??"#000000":"#000000",tableCellPadding:d?.cellPadding??0,selectedTableCell:u?t:null,selectedTableCells:u?n:[],tableCellStyle:u?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(m=>m.height??32)??[]:[],tableElement:e?.type==="table"?e:void 0}}function nE(e){let t=[],n=new Set;for(let o of e.slideMasters)for(let r of o.layouts??[])!r.path||n.has(r.path)||(n.add(r.path),t.push({path:r.path,name:r.name||r.path.split("/").pop()||r.path}));return t}function gh(e){return ()=>{let t=e.store.get(),n=e.getChrome(),{ribbon:o,inspector:r}=n,i=t.editable&&!t.presenting;if(n.thumbnails?.setAddSlideVisible(i),!o&&!r||(o?.setEditable(i),r?.setEditable(i&&t.inspectorOpen),o?.setInspectorOpen(t.inspectorOpen),t.presenting))return;let a=i?e.selectedElement(t):void 0;o?.updateSelection(a,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],layouts:nE(t),layoutPreviews:e.layoutPreviews?.(),currentLayoutPath:t.slides[t.currentSlide]?.layoutPath,themeFonts:{heading:t.fontScheme?.majorFont?.latin,body:t.fontScheme?.minorFont?.latin},embeddedFontFamilies:t.embeddedFonts.map(p=>p.name),customFontFamilies:t.customFontFamilies}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth}),r?.update(Pa(a,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls,t.chartPartSelection));let s=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,slideSize:t.slideSize,elements:s?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:a?.id,comments:s?.comments??[],docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:s,editTemplateMode:t.editTemplateMode,slideMasters:t.slideMasters,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.themeName,tagCollections:t.tagCollections,notesCanvasSize:t.notesCanvasSize,notesPlaceholderCount:t.notesMaster?t.notesMaster.placeholders?.length??0:void 0,handoutPlaceholderCount:t.handoutMaster?t.handoutMaster.placeholders?.length??0:void 0});}}function bh(e){if(e.length===0)return null;if(e.length>1){let n=chunkR2NUNRIB_cjs.jc(e);return n?{...n,rotation:n.rotation??0}:null}let t=e[0];return {x:t.x,y:t.y,width:t.width,height:t.height,rotation:t.rotation??0}}function vh(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function Aa(e){let t=null,n=s=>vh(s.clientX,s.clientY,e.getStageOrigin(),e.getScale());function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",a);}function r(s){!t||s.pointerId!==t.pointerId||t.points.push(n(s));}function i(s){if(!t||s.pointerId!==t.pointerId)return;t.points.push(n(s));let p=t;o(),t=null,e.onCommitStroke({points:p.points,color:e.getColor(),width:e.getWidth(),tool:p.tool});}function a(s){!t||s.pointerId!==t.pointerId||(o(),t=null);}return {onStagePointerDown(s){if(s.button!==0)return;let p=e.getTool();if(p!=="select"){if(p==="eraser"){let l=chunkR2NUNRIB_cjs.zh(s.target,e.getStageRoot());l&&(s.preventDefault(),s.stopPropagation(),e.onEraseAt(l));return}s.preventDefault(),s.stopPropagation(),t={tool:p,pointerId:s.pointerId,points:[n(s)]},window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",a);}},isActive:()=>t!==null,dispose(){o(),t=null;}}}function ka(e){let{store:t,editActions:n,interactions:o}=e,r=Aa({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:a=>n.commitStroke(a),onEraseAt:a=>n.eraseInkElement(a)}),i=a=>a.editable&&!a.presenting&&a.drawTool!=="select";return {onStagePointerDown(a){if(i(t.get())){r.onStagePointerDown(a);return}o.onStagePointerDown(a);},onStageDblClick(a){i(t.get())||o.onStageDblClick(a);},syncCursor(a){if(!a)return;let s=t.get();a.dataset.drawTool=i(s)?s.drawTool:"select";},setTool(a){let s=t.get();s.drawTool!==a&&(a!=="select"&&o.closeInline(true),t.set({drawTool:a,selectedElementId:a==="select"?s.selectedElementId:null}));},setColor:a=>t.set({drawColor:a}),setWidth:a=>t.set({drawWidth:Math.max(1,Math.round(a))}),dispose:()=>r.dispose()}}function rE(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function fh(e){let t=n=>{let o=e.store.get();if(!o.editable||!o.slides[o.currentSlide])return null;let r=n(o.slides[o.currentSlide].comments??[]);return r?(e.ops.pushHistory(),e.store.set({slides:rE(o.slides,o.currentSlide,()=>r)}),e.ops.commitChange(),r):null};return {addComment(n,o){let r=t(i=>chunkR2NUNRIB_cjs.Rh(i,n,"You",void 0,void 0,o));return r?r[r.length-1]?.id??null:null},addCommentReply(n,o){let r=t(a=>chunkR2NUNRIB_cjs.Uh(a,n,o,"You"));return r?r.find(a=>a.id===n)?.replies?.at(-1)?.id??null:null},editComment(n,o){t(r=>chunkR2NUNRIB_cjs.Th(r,n,o));},deleteComment(n){t(o=>chunkR2NUNRIB_cjs.Sh(o,n));},toggleCommentResolved(n){t(o=>chunkR2NUNRIB_cjs.Vh(o,n));}}}function Ia(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunkR2NUNRIB_cjs.Bh(o);i&&(n.pushHistory(),t.set({slides:Yt(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=ca(r.slides,r.currentSlide,o);if(!i||i.type!=="ink")return false;n.pushHistory();let a=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:ma(r.slides,r.currentSlide,o),selectedElementId:a}),n.commitChange(),true}}}var iE={width:320,height:80},aE={width:600,height:250},sE={width:200,height:150},hh={width:240,height:0};function Te(e,t){e.x=Math.max(0,Math.round((t.width-e.width)/2)),e.y=Math.max(0,Math.round((t.height-e.height)/2));}function La(e,t,n="rect"){let o,r;switch(e){case "text":o=chunkR2NUNRIB_cjs.g("Text",{fontSize:18,color:"#000000"}),r=iE;break;case "table":o={...chunkR2NUNRIB_cjs.nc(3,3),id:chunkR2NUNRIB_cjs.n("table")},r=aE;break;case "shape":n==="connector"?(o=chunkR2NUNRIB_cjs.i({type:"straight",stroke:{color:"#000000",width:2}}),r=hh):(o=chunkR2NUNRIB_cjs.h(n),r=n==="line"?hh:sE);break}return o.width=r.width,o.height=r.height,Te(o,t),o}function pE(e,t){return new Promise(n=>{let o=new Image;o.onload=()=>{let r=o.width/Math.max(1,o.height),i=Math.min(t,o.width||t),a=Math.max(1,Math.round(i/(r||1)));n({width:i,height:a});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function Hn(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="image/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=new FileReader;a.onload=async()=>{let s=typeof a.result=="string"?a.result:"";if(!s){n(null);return}let p=Math.round(t.width*.6),{width:l,height:d}=await pE(s,p),u={id:chunkR2NUNRIB_cjs.n("image"),type:"image",name:"Image",x:0,y:0,width:l,height:d,imageData:s};Te(u,t),n(u);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var lE={width:420,height:64},dt={width:640,height:360};function dE(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||dt.width,i=o.videoHeight||dt.height;if(r>dt.width||i>dt.height){let a=Math.min(dt.width/r,dt.height/i);n({width:Math.round(r*a),height:Math.round(i*a)});return}n({width:r,height:i});},o.onerror=()=>n(dt),o.src=t;})}function Da(e,t){return new Promise(n=>{let o=e.createElement("input");o.type="file",o.accept="video/*,audio/*",o.style.display="none",e.body.appendChild(o);let r=()=>o.remove();o.addEventListener("cancel",()=>{r(),n(null);}),o.addEventListener("change",()=>{let i=o.files?.[0];if(r(),!i){n(null);return}let a=chunkR2NUNRIB_cjs.vi(i.type);if(!a){n(null);return}let s=new FileReader;s.onload=async()=>{let p=typeof s.result=="string"?s.result:"";if(!p){n(null);return}let l=a==="audio"?lE:await dE(e,p),d={id:chunkR2NUNRIB_cjs.n("media"),type:"media",mediaType:a,mediaMimeType:i.type||void 0,mediaData:p,x:0,y:0,width:l.width,height:l.height};Te(d,t),n(d);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var yh={width:400,height:80},Sh={width:600,height:340},wh={width:200,height:40};function Ma(e,t){let n=chunkR2NUNRIB_cjs.ei(e);return Te(n,t),n}function Ha(e,t,n){let o={id:chunkR2NUNRIB_cjs.n("smartart"),type:"smartArt",x:0,y:0,width:Sh.width,height:Sh.height,smartArtData:chunkR2NUNRIB_cjs.ah(e,t,r=>chunkR2NUNRIB_cjs.n(`smartart-node-${r}`))};return Te(o,n),o}function Ra(e,t){let n="[Equation]",o={id:chunkR2NUNRIB_cjs.n("equation"),type:"shape",x:0,y:0,width:yh.width,height:yh.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return Te(o,t),o}function Oa(e,t){let n=chunkR2NUNRIB_cjs.Yg(e,chunkR2NUNRIB_cjs.n("actionbutton"));return n?(Te(n,t),n):null}function Fa(e,t){return chunkR2NUNRIB_cjs.mc(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Ba(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunkR2NUNRIB_cjs.n("field"),type:"shape",x:0,y:0,width:wh.width,height:wh.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return Te(r,n),r}function Ch(e,t,n){let o=new Set(t.map(({row:r,column:i})=>`${r}:${i}`));return {...e,rows:e.rows.map((r,i)=>({...r,cells:r.cells.map((a,s)=>o.has(`${i}:${s}`)?{...a,style:{...a.style,...n}}:a)}))}}function Eh(e,t,n){switch(n){case "insertRowAbove":return chunkR2NUNRIB_cjs.Bb(e,t.row,"above");case "insertRowBelow":return chunkR2NUNRIB_cjs.Bb(e,t.row,"below");case "deleteRow":return chunkR2NUNRIB_cjs.Cb(e,t.row);case "insertColumnLeft":return chunkR2NUNRIB_cjs.Db(e,t.column,"left");case "insertColumnRight":return chunkR2NUNRIB_cjs.Db(e,t.column,"right");case "deleteColumn":return chunkR2NUNRIB_cjs.Eb(e,t.column)}}function Th(e,t,n){if(!e.columnWidths[t]||e.columnWidths.length<2)return e;let o=Math.min(.95,Math.max(.05,n/100));return {...e,columnWidths:chunkR2NUNRIB_cjs.Qb(e.columnWidths,t,o)}}function Ph(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function Ah(e,t){let n=t.map(({row:o,column:r})=>({row:o,col:r}));return chunkR2NUNRIB_cjs.xb(n,e)?chunkR2NUNRIB_cjs.yb(n,e):e}function kh(e,t){let n=e.rows[t.row]?.cells[t.column],o=Math.max(1,n?.rowSpan??1),r=Math.max(1,n?.gridSpan??1),i=chunkR2NUNRIB_cjs.Nb(e,t.row,t.column);return i?{...e,rows:i.map((a,s)=>({...a,cells:a.cells.map((p,l)=>s>=t.row&&s<t.row+o&&l>=t.column&&l<t.column+r?{...p,hMerge:void 0,vMerge:void 0}:p)}))}:e}var cE={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function Na(e){return {toggleElementLock:()=>e(t=>({locks:chunkR2NUNRIB_cjs.hc(!chunkR2NUNRIB_cjs.gc(t))})),setTextVerticalAlign:t=>e(n=>chunkR2NUNRIB_cjs.ed(n,t)),setTextWrap:t=>e(n=>chunkR2NUNRIB_cjs.hd(n,t)),setAutoFitMode:t=>e(n=>chunkR2NUNRIB_cjs.id(n,t)),setTextAdvanced:t=>e(n=>chunkR2NUNRIB_cjs.dd(n,t)),setTextStyle:(t,n)=>e(o=>"textStyle"in o?n&&o.textSegments?.length?{textSegments:chunkR2NUNRIB_cjs.kd(o.textSegments,n,t).newSegments}:{textStyle:{...o.textStyle,...t}}:{}),setFillOpacity:t=>e(n=>$e(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>$e(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunkR2NUNRIB_cjs.Gh(n,t)),addGradientStop:(t,n)=>e(o=>chunkR2NUNRIB_cjs.Hh(o,t,n)),removeGradientStop:t=>e(n=>chunkR2NUNRIB_cjs.Ih(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunkR2NUNRIB_cjs.Jh(o,t,n)),setImageBrightness:t=>e(n=>chunkR2NUNRIB_cjs.Lh(n,{brightness:t})),setImageContrast:t=>e(n=>chunkR2NUNRIB_cjs.Lh(n,{contrast:t})),setImageSaturation:t=>e(n=>chunkR2NUNRIB_cjs.Lh(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunkR2NUNRIB_cjs.Nh(o,{[cE[t]]:n})),setImageEffects:t=>e(n=>chunkR2NUNRIB_cjs.b(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunkR2NUNRIB_cjs.r(n)})),setAltText:t=>e(()=>({altText:t})),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunkR2NUNRIB_cjs.Ph(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunkR2NUNRIB_cjs.Ph(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunkR2NUNRIB_cjs.Qh(n,t)),setTableOptions:(t,n)=>e(o=>o.type!=="table"||!o.tableData?{}:{tableData:{...o.tableData,...t,rows:n?o.tableData.rows.map(r=>({...r,cells:r.cells.map(i=>({...i,style:{...i.style,...n}}))})):o.tableData.rows}}),setTableData:(t,n)=>e(o=>o.type==="table"?{tableData:t,...n?{rawXml:n}:{}}:{}),setTableCellStyle:(t,n,o)=>e(r=>r.type!=="table"||!r.tableData?.rows[t]?.cells[n]?{}:{tableData:{...r.tableData,rows:r.tableData.rows.map((i,a)=>a===t?{...i,cells:i.cells.map((s,p)=>p===n?{...s,style:{...s.style,...o}}:s)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Ch(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Eh(o.tableData,t,n)}:{}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Th(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:Ph(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:Ah(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:kh(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>At(o,r=>chunkR2NUNRIB_cjs.v(r,t,n))),setSmartArtNodeStyle:(t,n)=>e(o=>At(o,r=>chunkR2NUNRIB_cjs.z(r,t,n))),mutateSmartArtNode:(t,n)=>e(o=>At(o,r=>n==="add"?chunkR2NUNRIB_cjs.t(r,"New item"):n==="addChild"?chunkR2NUNRIB_cjs.y(r,t,"New item"):n==="remove"?chunkR2NUNRIB_cjs.u(r,t):n==="promote"?chunkR2NUNRIB_cjs.w(r,t):chunkR2NUNRIB_cjs.x(r,t))),replaceSmartArtData:t=>e(n=>At(n,()=>t)),setSmartArtLayout:t=>e(n=>At(n,o=>chunkR2NUNRIB_cjs.E(o,t))),setSmartArtColorScheme:t=>e(n=>At(n,o=>({...o,colorScheme:t})))}}function At(e,t){if(e.type!=="smartArt"||!e.smartArtData)return {};let n=t(e.smartArtData),o={width:e.width,height:e.height};return {smartArtData:chunkR2NUNRIB_cjs.fi(n,e.id,o)}}function Va(e,t){let n=(o,r)=>{t.pushHistory(),e.set({sections:o,slides:r}),t.commitChange();};return {addSection(o,r=e.get().currentSlide){let i=e.get(),a=o.trim();if(!i.editable||!a||!i.slides[r])return null;let s=chunkR2NUNRIB_cjs.uc(i.sections,i.slides,a,r),p=s.sections.find(l=>!i.sections.some(d=>d.id===l.id));return n(s.sections,s.slides),p?.id??null},renameSection(o,r){let i=e.get(),a=r.trim(),s=i.sections.find(l=>l.id===o);if(!i.editable||!s||!a||s.name===a)return;let p=chunkR2NUNRIB_cjs.vc(i.sections,i.slides,o,a);n(p.sections,p.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(a=>a.id===o))return;let i=chunkR2NUNRIB_cjs.wc(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),a=r==="up"?chunkR2NUNRIB_cjs.xc(i.sections,o):chunkR2NUNRIB_cjs.yc(i.sections,o);!i.editable||a===i.sections||n(a,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let a=chunkR2NUNRIB_cjs.zc(i.sections,i.slides,o,r);a.sections!==i.sections&&n(a.sections,a.slides);},toggleSection(o){let r=e.get();r.sections.some(i=>i.id===o)&&e.set({sections:r.sections.map(i=>i.id===o?{...i,collapsed:!i.collapsed}:i)});}}}function Xt(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function za(e){let{store:t,ops:n}=e;function o(r,i,a){let s=e.getHandler();s&&s.applyLayoutToSlide(r,i,[...t.get().slides]).then(p=>{let l=t.get();if(l.slides[r]?.id===a){n.pushHistory();let d=chunkR2NUNRIB_cjs.yi([p]),u=[...l.slides];u[r]=d.slides[0],t.set({slides:u,templateElementsBySlideId:{...l.templateElementsBySlideId,[p.id]:d.templateElementsBySlideId[p.id]??[]}}),n.commitChange();}},()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,a=chunkR2NUNRIB_cjs.Bc(i+1),s=Xt([...r.slides.slice(0,i),a,...r.slides.slice(i)]);t.set({slides:s,currentSlide:i,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},duplicateSlide(){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let a=r.currentSlide+1,s={...chunkR2NUNRIB_cjs.k(i),id:chunkR2NUNRIB_cjs.Ac()},p=r.templateElementsBySlideId[i.id]??[],l=Xt([...r.slides.slice(0,a),s,...r.slides.slice(a)]);t.set({slides:l,templateElementsBySlideId:{...r.templateElementsBySlideId,[s.id]:p.map(chunkR2NUNRIB_cjs.j)},currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=Xt(r.slides.filter((p,l)=>l!==r.currentSlide)),a=Math.min(r.currentSlide,i.length-1),s={...r.templateElementsBySlideId};delete s[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:s,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let a=t.get();if(!a.editable||!r)return;n.pushHistory();let s=a.currentSlide+1,p={...chunkR2NUNRIB_cjs.Bc(s+1),layoutPath:r,...i?{layoutName:i}:{}},l=Xt([...a.slides.slice(0,s),p,...a.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(s,r,p.id);},insertSlideFromTemplate(r){let i=t.get();if(!i.editable)return;n.pushHistory();let a=i.currentSlide+1,s=chunkR2NUNRIB_cjs.Fc(r,chunkR2NUNRIB_cjs.Ac(),a+1,{slideWidth:i.canvasSize.width,slideHeight:i.canvasSize.height,scheme:chunkR2NUNRIB_cjs.Cc(i.colorScheme)}),p=Xt([...i.slides.slice(0,a),s,...i.slides.slice(a)]);t.set({slides:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},getTemplateScheme(){return chunkR2NUNRIB_cjs.Cc(t.get().colorScheme)},applyLayout(r){let i=t.get(),a=i.slides[i.currentSlide];!i.editable||!a||!r||o(i.currentSlide,r,a.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide],a=chunkR2NUNRIB_cjs.pe(i);!r.editable||!i||!a||o(r.currentSlide,a,i.id);}}}var mE=24;function kt(e,t){if(!Ee(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>({...r,style:{...r.style,...t}}));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function Rn(e,t){let n=Ue(e).listType;return kt(e,{listType:n===t?"none":t})}function On(e,t){let n=Ue(e).paragraphMarginLeft,o=Math.max(0,n+t*mE);return kt(e,{paragraphMarginLeft:o})}function _a(e,t){return kt(e,{align:t})}function Ga(e,t){return kt(e,{lineSpacing:t})}function Ih(e,t){return kt(e,{textDirection:t})}function Lh(e,t){return kt(e,{columnCount:Math.max(1,Math.round(t))})}function Ua(e){return {toggleBold:()=>e(t=>Pt(t,"bold")),toggleItalic:()=>e(t=>Pt(t,"italic")),toggleUnderline:()=>e(t=>Pt(t,"underline")),toggleStrikethrough:()=>e(t=>Pt(t,"strikethrough")),toggleTextShadow:()=>e(t=>zi(t)),changeFontSize:t=>e(n=>Oi(n,t)),setFontSize:t=>e(n=>En(n,t)),setFontFamily:t=>e(n=>Ni(n,t)),setTextColor:t=>e(n=>Fi(n,t)),setHighlightColor:t=>e(n=>Bi(n,t)),setCharacterSpacing:t=>e(n=>Vi(n,t)),changeCase:t=>e(n=>_i(n,t)),clearFormatting:()=>e(t=>Gi(t)),toggleBulletList:()=>e(t=>Rn(t,"bullet")),toggleNumberedList:()=>e(t=>Rn(t,"numbered")),increaseIndent:()=>e(t=>On(t,1)),decreaseIndent:()=>e(t=>On(t,-1)),setTextAlign:t=>e(n=>_a(n,t)),setLineSpacing:t=>e(n=>Ga(n,t)),setTextDirection:t=>e(n=>Ih(n,t)),setColumnCount:t=>e(n=>Lh(n,t))}}function $a(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i,a){let s=t.get(),p=s.slides[s.currentSlide];if(!s.editable||!p)return;let l=Math.max(0,Math.round(r));n.pushHistory();let d=a?{advanceOnClick:a.onClick,advanceAfterMs:a.afterMs}:{};if(i){let u={type:o,durationMs:l,...d};t.set({slides:xa(s.slides,{transition:u})});}else {let u={...p.transition,type:o,durationMs:l,...d};t.set({slides:me(s.slides,s.currentSlide,{transition:u})});}n.commitChange();},applyTransitionDraft(o,r){let i=t.get(),a=i.slides[i.currentSlide];if(!i.editable||!a)return;let s=chunkR2NUNRIB_cjs.ke(a,o),p=new Set(chunkR2NUNRIB_cjs.le(i.slides.length,i.currentSlide,r));n.pushHistory(),t.set({slides:i.slides.map((l,d)=>p.has(d)?{...l,transition:{...s}}:l)}),n.commitChange();}}}function Wa(e){let{doc:t,store:n,ops:o}=e,r=da(n,o),i=a=>{if(!a)return;let s=n.get();!s.editable||!s.slides[s.currentSlide]||(o.pushHistory(),n.set({slides:Yt(s.slides,s.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {...Ua(r),...Sa({store:n,ops:o,applyToSelected:r}),...Ca({store:n,ops:o}),...za({store:n,ops:o,getHandler:e.getHandler}),...wa({store:n,ops:o}),...$a({store:n,ops:o}),...ga({store:n,ops:o}),...Na(r),...Ia({store:n,ops:o}),...Ea({store:n,ops:o,getHandler:e.getHandler}),sections:Va(n,o),comments:fh({store:n,ops:o}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:a=>r(s=>$e(s,chunkR2NUNRIB_cjs.qe(a))),setShapeStroke:a=>r(s=>$e(s,chunkR2NUNRIB_cjs.re(a))),setShapeStrokeWidth:a=>r(s=>$e(s,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(s=>$e(s,a)),setShapeType:a=>r(s=>s.type==="shape"?{shapeType:a}:{}),setGeometry(a){r(()=>{let s={};return a.x!==void 0&&Number.isFinite(a.x)&&(s.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(s.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(s.width=Math.max(chunkR2NUNRIB_cjs.m,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(s.height=Math.max(chunkR2NUNRIB_cjs.m,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(s.rotation=a.rotation),s});},insert(a,s){let p=n.get();p.slides[p.currentSlide]&&i(La(a,p.canvasSize,s));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await Hn(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||i(await Da(t,a.canvasSize));},insertChart(a=chunkR2NUNRIB_cjs.di){let s=n.get();s.slides[s.currentSlide]&&i(Ma(a,s.canvasSize));},insertSmartArt(a,s){let p=n.get();p.slides[p.currentSlide]&&i(Ha(a,s,p.canvasSize));},insertEquation(a){let s=n.get();s.slides[s.currentSlide]&&i(Ra(a,s.canvasSize));},updateEquation:(a,s)=>o.updateEquation(a,s),insertActionButton(a){let s=n.get();s.slides[s.currentSlide]&&i(Oa(a,s.canvasSize));},insertField(a,s){let p=n.get();if(!p.slides[p.currentSlide])return;let l=s??Fa(a,{slideNumber:p.currentSlide+1});i(Ba(a,l,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),selectAll(){let a=n.get(),s=G(a).filter(p=>chunkR2NUNRIB_cjs.xi(p.id,a.editTemplateMode)).map(p=>p.id);s.length>0&&o.select(s.at(-1)??null,s);},toggleViewOption(a){let s=n.get();n.set({[a]:!s[a]});for(let p of t.querySelectorAll(".pptxv"))p.classList.toggle(`pptxv-${a}`,!s[a]);},addGuide(a,s){let p=n.get(),l=chunkR2NUNRIB_cjs.bh(`guide-${Date.now()}`,a,p.canvasSize);n.set({guides:[...p.guides,s===void 0?l:{...l,position:s}]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await Hn(t,n.get().canvasSize);!a||a.type!=="image"||r(s=>s.type==="image"?{imageData:a.imageData,imagePath:a.imagePath,svgData:a.svgData,svgPath:a.svgPath}:{});},resetSelectedImage:()=>r(a=>a.type==="image"?{imageEffects:void 0,cropLeft:void 0,cropTop:void 0,cropRight:void 0,cropBottom:void 0}:{})}}function Ka(e){let{store:t,ops:n}=e,o=(r,i)=>{i!==0&&(n.pushHistory(),t.set({slides:[...r]}),n.commitChange());};return {search(r,i){return r?chunkR2NUNRIB_cjs.fh(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let p=chunkR2NUNRIB_cjs.fh(s.slides,r,{matchCase:a}),{slides:l,replacements:d}=chunkR2NUNRIB_cjs.gh(s.slides,p,0,i);return o(l,d),d},replaceAll(r,i,a){let s=t.get();if(!s.editable||!r)return 0;let{slides:p,replacements:l}=chunkR2NUNRIB_cjs.hh(s.slides,r,i,{matchCase:a});return o(p,l),l}}}function qa(e){return t=>{if(!e.isActive())return;let{action:n,dx:o,dy:r}=chunkR2NUNRIB_cjs.Rg(t,{hasSelection:e.getSelectedId()!==null,isTextInputTarget:chunkR2NUNRIB_cjs.Qg(t.target)});if(!(n===null||n==="prevSlide"||n==="nextSlide"))switch(t.preventDefault(),n){case "escape":if(e.cancelFormatPainter()||e.closeShortcuts())return;e.deselect();break;case "toggleShortcuts":e.toggleShortcuts();break;case "find":e.toggleFind?.();break;case "undo":e.undo();break;case "redo":e.redo();break;case "paste":e.paste();break;case "selectAll":e.selectAll();break;case "delete":e.deleteSelected();break;case "duplicate":e.duplicateSelected();break;case "copy":e.copySelected();break;case "cut":e.cutSelected();break;case "group":e.groupSelected();break;case "ungroup":e.ungroupSelected();break;case "nudge":e.nudgeSelected(o??0,r??0);break;}}}var uE=e=>t=>Z(e,t);function Fn(e,t){return chunkR2NUNRIB_cjs.xi(t,e.editTemplateMode)&&chunkR2NUNRIB_cjs.fc(Z(e,t),"select")}function Zt(e,t,n){return chunkR2NUNRIB_cjs.ic(t,uE(e),n)}function Dh(e,t){let n=e.selectedElementIds.length>1&&e.selectedElementIds.includes(t)?e.selectedElementIds:[t];return Zt(e,n,"move").length>0}var xE=chunkR2NUNRIB_cjs.ec(void 0);function gE(e,t){let n={...e};for(let o of Object.keys(n))n[o]&&=t[o];return n}function Bn(e){return e.selectedElementIds.reduce((t,n)=>gE(t,chunkR2NUNRIB_cjs.ec(Z(e,n))),xE)}function Mh(e,t){let n=e.store.get();!n.editable||!n.handoutMaster||n.handoutSlidesPerPage===t||(e.pushHistory(),e.store.set({handoutSlidesPerPage:t,handoutMaster:{...n.handoutMaster,slidesPerPage:t}}),e.commitChange());}function Hh(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null}}function Rh(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),a=Z(i,t);if(a?.type!=="table"||!a.tableData?.rows[n]?.cells[o])return;e.pushHistory();let s=a.tableData.rows.map((p,l)=>({...p,cells:p.cells.map((d,u)=>l===n&&u===o?chunkR2NUNRIB_cjs.wb(d,r):d)}));e.store.set(X(i,G(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:s}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=Z(o,t);!r||!chunkR2NUNRIB_cjs.c(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(X(o,G(o).map(i=>i.id===t&&chunkR2NUNRIB_cjs.c(i)?{...i,textSegments:i.textSegments?.map(a=>a.equationXml?{...a,equationXml:n}:a)}:i))),e.commitChange());}}}function ja(e){return !e||!chunkR2NUNRIB_cjs.c(e)||!chunkR2NUNRIB_cjs.fc(e,"textEdit")?false:!e.textSegments?.some(t=>t.equationXml)}function Ya(e,t){let n=chunkR2NUNRIB_cjs.c(e)?e:void 0,o=n?.textSegments,r=n?.textStyle;return {text:t,textSegments:chunkR2NUNRIB_cjs.zd(t,o,r)}}function Qt(e){let t="",n=o=>{for(let r of Array.from(o.childNodes)){if(r.nodeType===3){t+=r.nodeValue??"";continue}if(!(r instanceof HTMLElement))continue;if(r.tagName==="BR"){t+=`
|
|
8
8
|
`;continue}(r.tagName==="DIV"||r.tagName==="P")&&t.length>0&&!t.endsWith(`
|
|
9
9
|
`)&&(t+=`
|
|
10
10
|
`),n(r);}};return n(e),t}function Oh(e,t){if(chunkR2NUNRIB_cjs.c(e))return chunkR2NUNRIB_cjs.Yc(e.textStyle,e.height,t)}function Xa(e){let{doc:t,overlayRoot:n,box:o,scale:r,element:i}=e,a=chunkR2NUNRIB_cjs.c(i)?i:void 0,s=a?.text??"",p=a?.textStyle?.fontSize,l=a?.textStyle?.fontFamily,d=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-inline-editor pptxv-inline-text-editor",{...chunkR2NUNRIB_cjs.Rk(i),...typeof p=="number"?{fontSize:`${p}px`}:{},...l!==void 0?{fontFamily:l}:{},left:`${o.x*r}px`,top:`${o.y*r}px`,width:`${o.width}px`,height:`${o.height}px`,transform:`scale(${r})`,transformOrigin:"top left"});d.contentEditable="true",d.spellcheck=e.spellCheck??false,d.dataset.inlineEditor="",d.setAttribute("role","textbox"),d.setAttribute("aria-multiline","true"),a?.textSegments?.length?a.textSegments.forEach((x,v)=>{let f=t.createElement("span");f.dataset.segIdx=String(v),f.textContent=x.text,d.appendChild(f);}):d.textContent=s;let u=false,m=x=>{u||(u=true,x!==null&&x!==s&&e.onCommit(x),d.remove(),e.onClose());};d.addEventListener("input",()=>e.onInput?.(Qt(d))),d.addEventListener("blur",()=>m(Qt(d))),d.addEventListener("keydown",x=>{x.stopPropagation(),x.key==="Escape"&&(x.preventDefault(),m(Qt(d)));}),d.addEventListener("pointerdown",x=>x.stopPropagation());let g=()=>e.onSelectionChange?.(chunkR2NUNRIB_cjs.jd(a?.textSegments));return d.addEventListener("keyup",g),d.addEventListener("pointerup",g),n.appendChild(d),d.focus(),chunkR2NUNRIB_cjs.ld(d),{el:d,commit:()=>m(Qt(d)),cancel:()=>m(null)}}var bE=100,vE=800;function Za(e){let{store:t}=e,n=new chunkR2NUNRIB_cjs.sc({maxDepth:bE}),o=0,r=(m=t.get())=>m.selectedElementId?Z(m,m.selectedElementId):void 0,i=(m,g=m?[m]:[])=>t.set(Hh(m,g)),a=()=>({slides:Dn(t.get().slides),sections:structuredClone(t.get().sections),coreProperties:structuredClone(t.get().coreProperties),appProperties:structuredClone(t.get().appProperties),customProperties:structuredClone(t.get().customProperties),templateElementsBySlideId:chunkR2NUNRIB_cjs.l(t.get().templateElementsBySlideId),slideMasters:structuredClone(t.get().slideMasters),notesMaster:structuredClone(t.get().notesMaster),handoutMaster:structuredClone(t.get().handoutMaster),handoutSlidesPerPage:t.get().handoutSlidesPerPage,presentationProperties:structuredClone(t.get().presentationProperties),headerFooter:structuredClone(t.get().headerFooter),customShows:structuredClone(t.get().customShows)}),s=()=>{n.record(a(),""),o=0,e.onHistoryChange();},p=()=>{t.set({dirty:true}),e.onHistoryChange(),e.onChange?.();},l=(m,g)=>{let x=t.get(),v=G(x).map(f=>f.id===m?{...f,...g}:f);t.set(X(x,v));},d=m=>{m&&(t.set({slides:Dn(m.slides),sections:structuredClone(m.sections),coreProperties:structuredClone(m.coreProperties),appProperties:structuredClone(m.appProperties),customProperties:structuredClone(m.customProperties),templateElementsBySlideId:chunkR2NUNRIB_cjs.l(m.templateElementsBySlideId),slideMasters:structuredClone(m.slideMasters),notesMaster:structuredClone(m.notesMaster),handoutMaster:structuredClone(m.handoutMaster),handoutSlidesPerPage:m.handoutSlidesPerPage,presentationProperties:structuredClone(m.presentationProperties),headerFooter:structuredClone(m.headerFooter),customShows:structuredClone(m.customShows),interactionActive:false}),p());},u=Rh({store:t,pushHistory:s,commitChange:p});return {selectedElement:r,select:i,pushHistory:s,commitChange:p,patchGeometry:l,deleteSelected(){let m=t.get(),g=m.selectedElementId;!m.editable||!g||!r(m)||(s(),t.set({...X(m,G(m).filter(x=>!m.selectedElementIds.includes(x.id))),selectedElementId:null,selectedElementIds:[]}),p());},duplicateSelected(){let m=t.get(),g=m.selectedElementId;if(!m.editable||!g)return null;let x=r(m);if(!x)return null;let v=chunkR2NUNRIB_cjs.J(x);return v.x+=20,v.y+=20,s(),t.set({...X(m,[...G(m),v]),selectedElementId:v.id,selectedElementIds:[v.id]}),p(),v.id},nudgeSelected(m,g){let x=t.get(),v=r(x),f=x.selectedElementId;if(!v||!f)return;let b=Date.now();b-o>vE&&s(),o=b,t.set(X(x,G(x).map(h=>h.id===f?{...h,x:v.x+m,y:v.y+g}:h))),p();},commitInlineText(m,g){let x=t.get(),v=Z(x,m);if(!v)return;s();let f=typeof document<"u"?document.querySelector("[data-inline-editor]"):null,b=Oh(v,f);t.set(X(x,G(x).map(h=>h.id===m?{...h,...Ya(v,g),...b!==void 0?{height:b}:{}}:h))),p();},commitNotes(m,g){let x=t.get(),v=x.slides[x.currentSlide];!x.editable||!v||v.notes===m&&g===void 0||(s(),t.set({slides:ua(x.slides,x.currentSlide,m,g)}),p());},setHandoutSlidesPerPage(m){Mh({store:t,pushHistory:s,commitChange:p},m);},applyFormatPainter(m,g){let x=t.get(),v=Z(x,m),f=Z(x,g);return !x.editable||!v||!f||m===g?false:(s(),t.set(X(x,G(x).map(b=>b.id===g?chunkR2NUNRIB_cjs.yd(b,chunkR2NUNRIB_cjs.xd(v)):b))),p(),true)},...u,updateDocumentProperties(m,g,x){t.get().editable&&(s(),t.set({coreProperties:structuredClone(m),appProperties:structuredClone(g),customProperties:structuredClone(x)}),p());},updatePresentationProperties(m){t.get().editable&&(s(),t.set({presentationProperties:structuredClone(m)}),p());},updateSections(m){t.get().editable&&(s(),t.set({sections:structuredClone(m)}),p());},updateHeaderFooter(m){t.get().editable&&(s(),t.set({headerFooter:structuredClone(m)}),p());},updateCustomShows(m){t.get().editable&&(s(),t.set({customShows:structuredClone(m)}),p());},undo(){d(n.undo(a())?.snapshot);},redo(){d(n.redo(a())?.snapshot);},canUndo:()=>n.canUndo,canRedo:()=>n.canRedo,clearHistory(){n.clear(),o=0,e.onHistoryChange();},setHistoryDepth(m){n.setMaxDepth(m);},async save(m="pptx"){let g=e.getHandler();if(!g)throw new Error("No presentation is loaded.");let x=t.get(),v=await chunkR2NUNRIB_cjs.pj(g,chunkR2NUNRIB_cjs.zi(x.slides,x.templateElementsBySlideId),{sections:x.sections.length>0?x.sections:void 0,coreProperties:x.coreProperties,appProperties:x.appProperties,customProperties:x.customProperties.length>0?x.customProperties:void 0,headerFooter:x.headerFooter,presentationProperties:x.presentationProperties,customShows:x.customShows.length?x.customShows:void 0,tags:x.tagCollections.length>0?x.tagCollections:void 0,slideMasters:x.slideMasters,notesMaster:x.notesMaster,handoutMaster:x.handoutMaster,outputFormat:m,slideSize:chunkR2NUNRIB_cjs.Ee({current:x.slideSize,canvas:x.canvasSize}).size,...chunkR2NUNRIB_cjs.Ii(x.embedFonts)},{password:x.presentationPassword,passwordProtected:x.presentationPassword!==null});return t.set({dirty:false}),v}}}function Fh(e){let{doc:t,store:n,ops:o}=e,r=null,i=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s);};function a(p){if(!r||p.pointerId!==r.pointerId)return;let l=e.stagePoint(p);if(!l)return;let d=e.getScale();r.el.style.left=`${Math.min(r.startX,l.x)*d}px`,r.el.style.top=`${Math.min(r.startY,l.y)*d}px`,r.el.style.width=`${Math.abs(l.x-r.startX)*d}px`,r.el.style.height=`${Math.abs(l.y-r.startY)*d}px`;}function s(p){if(!r||p.pointerId!==r.pointerId)return;let l=e.stagePoint(p),d=n.get(),u=l?Zt(d,chunkR2NUNRIB_cjs.ac({startX:r.startX,startY:r.startY,currentX:l.x,currentY:l.y},G(d)),"select"):[],m=r.additive?chunkR2NUNRIB_cjs.bc(d.selectedElementIds,u):u;r.el.remove(),r=null,i(),o.select(m.at(-1)??null,m);}return {begin(p){let l=e.stagePoint(p),d=e.getOverlayRoot();if(!l||!d)return;let u=t.createElement("div");u.className="pptxv-marquee",d.appendChild(u),r={pointerId:p.pointerId,startX:l.x,startY:l.y,additive:chunkR2NUNRIB_cjs.cc(p),el:u},window.addEventListener("pointermove",a),window.addEventListener("pointerup",s),window.addEventListener("pointercancel",s);},dispose(){r?.el.remove(),r=null,i();}}}function Bh(e){let{event:t,elementId:n,state:o,store:r,ops:i}=e;if(o.eyedropperActive){let d=t.target instanceof Element?t.target:null,u=d?getComputedStyle(d):null,m=u?.backgroundColor||u?.color;return m&&e.onEyedropper?.(m),r.set({eyedropperActive:false}),true}let a=t.target instanceof Element?t.target.closest("td"):null;if(!n||a?.dataset.rowIndex===void 0||a.dataset.cellIndex===void 0)return false;let s={row:Number(a.dataset.rowIndex),column:Number(a.dataset.cellIndex)},p=o.selectedTableCell,l=t.shiftKey&&o.selectedElementId===n&&p?yE(p,s,hE(o,n)):[s];return i.select(n,[n]),r.set({selectedTableCell:t.shiftKey&&p?p:s,selectedTableCells:l}),true}function Qa(e,t,n=10){return t?{...e,x:Math.round(e.x/n)*n,y:Math.round(e.y/n)*n}:e}function Nh(e){return e.snapToShape?G(e).map(({id:t,x:n,y:o,width:r,height:i})=>({id:t,x:n,y:o,width:r,height:i})):[]}var fE={rows:[],columnWidths:[]};function hE(e,t){let n=Z(e,t);return (n?.type==="table"?n.tableData:void 0)??fE}function yE(e,t,n){let o=chunkR2NUNRIB_cjs.zb(e.row,e.column,t.row,t.column,n);return chunkR2NUNRIB_cjs.Ab(o).map(({row:r,col:i})=>({row:r,column:i}))}function Vh(e,t,n){let o=e?.getBoundingClientRect();return o&&t>0?{x:(n.clientX-o.left)/t,y:(n.clientY-o.top)/t}:null}function zh(e,t){if(t.size===0)return;let n=e.get(),o=G(n),r=chunkR2NUNRIB_cjs.nd(o,t);r.length!==0&&e.set(X(n,chunkR2NUNRIB_cjs.od(o,r)));}var SE=new Set(["nw","ne","se","sw"]);function _h(e){return SE.has(e)}function Ja(e,t,n,o=chunkR2NUNRIB_cjs.m){if(!_h(n)||t.width<=0||t.height<=0)return e;let r=e.width/t.width,i=e.height/t.height,a=Math.abs(r-1)>=Math.abs(i-1)?r:i,s=t.width*a,p=t.height*a;if(s<o||p<o){let u=Math.max(o/t.width,o/t.height);s=t.width*u,p=t.height*u;}let l=n==="nw"||n==="sw",d=n==="nw"||n==="ne";return {x:l?t.x+t.width-s:t.x,y:d?t.y+t.height-p:t.y,width:s,height:p,rotation:e.rotation}}var Gh=2;function es(e){let t=null,n=(l,d)=>({id:l,x:d.x,y:d.y,width:d.width,height:d.height,rotation:d.rotation??0});function o(l,d,u){let m=e.getScale(),g=chunkR2NUNRIB_cjs.Yb(l.startBox,d,u,m);if(!g.rotation){let x=e.getSiblings(),v=chunkR2NUNRIB_cjs.Gc(g.x,g.y,g.width,g.height,x,new Set([l.id]),[]);return [{...n(l.id,g),x:v.x,y:v.y},v.lines]}return [n(l.id,g),[]]}function r(l,d,u,m){let g=e.getScale(),x=l.handle;if(!x)return n(l.id,l.startBox);let v=chunkR2NUNRIB_cjs.Zb(l.startBox,x,d,u,g);return m&&(v=Ja(v,l.startBox,x)),n(l.id,v)}function i(l,d){let u=e.getScale()||1,m=e.getStageOrigin(),g={x:(d.clientX-m.left)/u,y:(d.clientY-m.top)/u},x=chunkR2NUNRIB_cjs._b(chunkR2NUNRIB_cjs.Xb(l.startBox),g);return d.shiftKey&&(x=chunkR2NUNRIB_cjs.$b(x)),{...n(l.id,l.startBox),rotation:x}}function a(l){let d=t;if(!d||l.pointerId!==d.pointerId)return;let u=l.clientX-d.startClientX,m=l.clientY-d.startClientY;if(!d.moved){if(Math.abs(u)<=Gh&&Math.abs(m)<=Gh)return;d.moved=true,e.onStart(d.id,d.kind);}let g=[],x;d.kind==="move"?[x,g]=o(d,u,m):d.kind==="resize"?x=r(d,u,m,l.shiftKey):x=i(d,l),d.last=x,e.onPreview(x,g);}function s(l){let d=t;!d||l.pointerId!==d.pointerId||(p(),t=null,e.onEnd(d.moved?d.last:null,d.moved,d.id));}function p(){window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s);}return {begin(l,d,u,m){let g=e.getElementBox(d);!g||t||(u.preventDefault(),u.stopPropagation(),t={kind:l,id:d,pointerId:u.pointerId,startClientX:u.clientX,startClientY:u.clientY,startBox:{...g},handle:m,moved:false,last:null},window.addEventListener("pointermove",a),window.addEventListener("pointerup",s),window.addEventListener("pointercancel",s));},isActive(){return t!==null},dispose(){p(),t=null;}}}var wE={move:"move",resize:"resize",rotate:"rotate"};function Uh(e){let{store:t,ops:n}=e,o=[],r=null,i="move",a=new Set,s=p=>{let l=t.get(),d=G(l).filter(m=>l.selectedElementIds.includes(m.id));if(d.length>1&&l.selectedElementIds.includes(p))return chunkR2NUNRIB_cjs.jc(d)??void 0;let u=Z(l,p);return u?{x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation??0}:void 0};return es({getScale:e.getScale,getElementBox:s,getSiblings:()=>Nh(t.get()),getStageOrigin(){let p=e.getOverlay()?.root.getBoundingClientRect();return {left:p?.left??0,top:p?.top??0}},onStart(p,l){let d=t.get();i=l,o=G(d).filter(u=>d.selectedElementIds.includes(u.id)).map(({id:u,x:m,y:g,width:x,height:v,rotation:f})=>({id:u,x:m,y:g,width:x,height:v,rotation:f})),r=chunkR2NUNRIB_cjs.jc(o),a=new Set(Zt(d,o.length>0?o.map(u=>u.id):[p],wE[l])),n.pushHistory(),t.set({interactionActive:true});},onPreview(p,l){let d=t.get();if(p=Qa(p,d.snapToGrid,chunkR2NUNRIB_cjs.dc(d.viewProperties?.gridSpacing,10)),o.length>1&&r&&i!=="rotate"){let u=i==="move"?chunkR2NUNRIB_cjs.kc(o,p.x-r.x,p.y-r.y):chunkR2NUNRIB_cjs.lc(o,r,p);for(let m of u)a.has(m.id)&&n.patchGeometry(m.id,{...m,rotation:m.rotation??0});}else a.has(p.id)&&n.patchGeometry(p.id,p);e.getOverlay()?.setSnapLines(l,e.getScale());},onEnd(p,l,d){if(e.getOverlay()?.setSnapLines([],1),p&&o.length<=1&&a.has(d)){let u=t.get(),m=Qa(p,u.snapToGrid,chunkR2NUNRIB_cjs.dc(u.viewProperties?.gridSpacing,10));n.patchGeometry(d,m);}t.set({interactionActive:false}),l&&(zh(t,new Set([...a,d])),n.commitChange());}})}function $h(e=300){let t=null;return (n,o,r)=>{if(n==="mouse"||!o)return t=null,false;let i=t!==null&&t.id===o&&r-t.time<e;return t=i?null:{id:o,time:r},i}}var CE=2;function Wh(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return [];let t=e.selectedElementId?Z(e,e.selectedElementId):void 0;return t?chunkR2NUNRIB_cjs.Ad(t):[]}function Kh(e){let{store:t,ops:n}=e,o=null,r=p=>{if(!o)return;let{elementId:l}=o,d=t.get(),u=G(d);t.set(X(d,u.map(m=>m.id===l&&chunkR2NUNRIB_cjs.d(m)?{...m,shapeAdjustments:{...m.shapeAdjustments,...p}}:m)));},i=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s);};function a(p){if(!o)return;let l=e.getScale(),d=l>0?l:1,u=(p.clientX-o.startClientX)/d,m=(p.clientY-o.startClientY)/d;if(!o.moved){if(Math.hypot(p.clientX-o.startClientX,p.clientY-o.startClientY)<=CE)return;o.moved=true,n.pushHistory(),t.set({interactionActive:true});}r(chunkR2NUNRIB_cjs.Bd(o,u,m));}function s(){let p=o?.moved??false;o=null,i(),p&&(t.set({interactionActive:false}),n.commitChange());}return {begin(p,l){let d=t.get(),u=d.selectedElementId,m=u?Z(d,u):void 0;!u||!m||!l||!chunkR2NUNRIB_cjs.d(m)||(p.preventDefault(),p.stopPropagation(),o=chunkR2NUNRIB_cjs.Cd(m,l,p.clientX,p.clientY),window.addEventListener("pointermove",a),window.addEventListener("pointerup",s),window.addEventListener("pointercancel",s));},isActive:()=>o!==null,dispose(){o=null,i();}}}function qh(e){let{doc:t,cell:n,element:o,row:r,column:i,ops:a}=e,s=t.createElement("input");s.type="text",s.className="pptxv-inline-editor pptxv-table-cell-editor",s.dataset.inlineEditor="",s.value=o.tableData?.rows[r]?.cells[i]?.text??"",Object.assign(s.style,{boxSizing:"border-box",width:"100%",height:"100%"});let p=t.createDocumentFragment();for(;n.firstChild;)p.appendChild(n.firstChild);n.appendChild(s);let l=false,d=m=>{m.composedPath().includes(s)||u(true);},u=m=>{l||(l=true,t.removeEventListener("pointerdown",d,true),m&&a.commitTableCell(o.id,r,i,s.value),n.isConnected?n.replaceChildren(m?t.createTextNode(s.value):p):s.remove());};return s.addEventListener("blur",()=>u(true)),s.addEventListener("pointerdown",m=>m.stopPropagation()),s.addEventListener("keydown",m=>{m.stopPropagation(),m.key==="Escape"?u(false):m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),u(true));}),t.addEventListener("pointerdown",d,true),s.focus(),s.select(),{close:u}}function Nn(e){let t=e.elementId??chunkR2NUNRIB_cjs.zh(e.event.target,e.stage),n=t?Z(e.state,t):void 0,o=n&&chunkR2NUNRIB_cjs.c(n)?n.textSegments?.find(i=>i.equationXml)?.equationXml:void 0;if(t&&o&&e.onEditEquation)return e.onEditEquation(t,o),{handled:true,tableSession:null};let r=e.cell??(e.event.target instanceof Element?e.event.target.closest("td"):null);return !r||n?.type!=="table"||!e.overlay?{handled:false,tableSession:null}:{handled:true,tableSession:qh({doc:e.doc,cell:r,element:n,row:Number(r.dataset.rowIndex),column:Number(r.dataset.cellIndex),ops:e.ops})}}var EE=500;function TE(e,t){return e.pointerType!=="touch"?null:(e.target instanceof Element?e.target.closest("td"):null)??t.elementsFromPoint?.(e.clientX,e.clientY).find(o=>o.localName==="td")??null}function jh(e,t,n){let o=TE(e,t),r=chunkR2NUNRIB_cjs.zh(e.target,n)??chunkR2NUNRIB_cjs.zh(o,n);return {cell:o,id:r}}function Yh(){let e=null;return (t,n,o)=>{if(t.pointerType!=="touch"||!(t.target instanceof Element))return e=null,false;let r=o??t.target.closest("td");if(!r||!n)return e=null,false;let i=`${n}:${r.dataset.rowIndex}:${r.dataset.cellIndex}`,a=e?.key===i&&t.timeStamp-e.time<=EE;return e=a?null:{key:i,time:t.timeStamp},a}}function Xh(e){let t=Yh(),n=o=>{let r=e.getState();if(!r.editable||r.presenting||o.button!==0)return;let{cell:i,id:a}=jh(o,e.doc,e.getStage());if(!i||!t(o,a,i))return;let s=Nn({event:o,state:r,doc:e.doc,stage:e.getStage(),overlay:e.getOverlay(),ops:e.ops,elementId:a,cell:i,onEditEquation:e.onEditEquation});s.handled&&(o.preventDefault(),o.stopPropagation(),e.onOpen(s.tableSession));};return e.doc.addEventListener("pointerdown",n,true),()=>e.doc.removeEventListener("pointerdown",n,true)}function Zh(e){let{doc:t,store:n,ops:o}=e,r=null,i=null,a=Xh({doc:t,getState:n.get,getStage:e.getStageRoot,getOverlay:()=>e.getOverlay()?.root??null,ops:o,onOpen:v=>i=v,onEditEquation:e.onEditEquation}),s=Uh({store:n,ops:o,getScale:e.getScale,getOverlay:e.getOverlay}),p=Kh({store:n,ops:o,getScale:e.getScale}),l=v=>Vh(e.getOverlay()?.root,e.getScale(),v),d=Fh({doc:t,store:n,ops:o,getScale:e.getScale,getOverlayRoot:()=>e.getOverlay()?.root??null,stagePoint:l}),u=$h(),m=v=>{i?.close(v),i=null;let f=r;r=null,v?f?.commit():f?.cancel();},g=v=>{let f=n.get(),b=Z(f,v),h=e.getOverlay();!b||!ja(b)||!h||r||(o.select(v),h.setEditing(true),r=Xa({doc:t,overlayRoot:h.root,box:{x:b.x,y:b.y,width:b.width,height:b.height,rotation:b.rotation??0},scale:e.getScale(),element:b,spellCheck:f.spellCheckEnabled,onInput:S=>e.onInlineTextInput?.(v,S),onCommit:S=>{e.flushInlineTextInput?.(),o.commitInlineText(v,S);},onSelectionChange:S=>n.set({selectedTextRange:S}),onClose(){r=null,e.getOverlay()?.setEditing(false);}}));},x=(v,f)=>{let b=n.get(),h=Nn({event:v,state:b,doc:t,ops:o,stage:e.getStageRoot(),overlay:e.getOverlay()?.root??null,onEditEquation:e.onEditEquation});if(h.handled){i=h.tableSession;return}f&&Fn(b,f)&&g(f);};return {onStagePointerDown(v){let f=n.get();if(!f.editable||f.presenting||v.button!==0)return;let b=chunkR2NUNRIB_cjs.zh(v.target,e.getStageRoot());if((r||i)&&m(true),Bh({event:v,elementId:b,state:f,store:n,ops:o,onEyedropper:e.onEyedropper}))return;if(f.formatPainterSourceId){b&&Fn(f,b)&&o.applyFormatPainter(f.formatPainterSourceId,b),n.set({formatPainterSourceId:null});return}let h=b!==null&&Fn(f,b);if(u(v.pointerType,h?b:null,v.timeStamp||Date.now())){v.preventDefault(),x(v,b);return}if(!h){d.begin(v);return}if(chunkR2NUNRIB_cjs.cc(v)){let S=f.selectedElementIds.includes(b)?f.selectedElementIds.filter(E=>E!==b):[...f.selectedElementIds,b];o.select(S.at(-1)??null,S);return}(f.selectedElementId!==b||f.selectedElementIds.length!==1)&&o.select(b,[b]),Dh(n.get(),b)&&s.begin("move",b,v);},onStagePointerMove(v){if(!e.onCursorMove)return;let f=e.getOverlay()?.root.getBoundingClientRect(),b=e.getScale();!f||!(b>0)||e.onCursorMove((v.clientX-f.left)/b,(v.clientY-f.top)/b);},onStageDblClick(v){let f=n.get();if(!f.editable||f.presenting||r||i)return;let b=chunkR2NUNRIB_cjs.zh(v.target,e.getStageRoot());x(v,b);},beginHandleGesture(v,f,b){let h=n.get(),S=h.selectedElementId,E=Bn(h);!S||(v==="resize"?!E.resizable:!E.rotatable)||s.begin(v,S,f,b);},beginAdjustGesture:(v,f)=>p.begin(v,f),closeInline:m,inlineActive:()=>r!==null||i!==null,dispose(){m(false),a(),s.dispose(),p.dispose(),d.dispose();}}}var ts="#0ea5e9";function Qh(e,t,n){let o=chunkR2NUNRIB_cjs.Pk(e,"svg",{role:"img","aria-label":t("pptx.animation.motionPath.overlay"),"data-pptx-motion-path-overlay":"true"});o.style.position="absolute",o.style.left="0",o.style.top="0",o.style.zIndex="45",o.style.pointerEvents="none";let r=chunkR2NUNRIB_cjs.Pk(e,"path",{fill:"none",stroke:ts,"stroke-width":2,"stroke-dasharray":"6 4","vector-effect":"non-scaling-stroke"}),i=chunkR2NUNRIB_cjs.Pk(e,"circle",{r:5,fill:ts,opacity:.55}),a=chunkR2NUNRIB_cjs.Pk(e,"circle",{r:7,fill:"#ffffff",stroke:ts,"stroke-width":2,"aria-label":t("pptx.animation.motionPath.endHandle"),"data-pptx-motion-path-handle":"end"});o.append(r,i,a);let s=null,p=null,l=(x,v)=>({originX:x.x+x.width/2,originY:x.y+x.height/2,slideWidth:v.canvasSize.width,slideHeight:v.canvasSize.height}),d=(x,v,f)=>{let b=chunkR2NUNRIB_cjs.fb(x,v),h=chunkR2NUNRIB_cjs.gb(x,v);chunkR2NUNRIB_cjs.Qk(r,{d:b}),chunkR2NUNRIB_cjs.Qk(i,{cx:v.originX,cy:v.originY}),chunkR2NUNRIB_cjs.Qk(a,{cx:h.x,cy:h.y}),a.style.pointerEvents=f?"auto":"none",a.style.cursor=f?"move":"";},u=()=>{let x=p;p=null,e.defaultView?.removeEventListener("pointermove",m),e.defaultView?.removeEventListener("pointerup",g),e.defaultView?.removeEventListener("pointercancel",g),x&&x.draft!==x.basePath&&n(x.draft);};function m(x){if(!p||x.pointerId!==p.pointerId)return;let v=p.scale||1,f=(x.clientX-p.startClientX)/v,b=(x.clientY-p.startClientY)/v,h=chunkR2NUNRIB_cjs.gb(p.basePath,p.frame),S=(h.x+f-p.frame.originX)/p.frame.slideWidth,E=(h.y+b-p.frame.originY)/p.frame.slideHeight;p.draft=chunkR2NUNRIB_cjs.hb(p.basePath,S,E),d(p.draft,p.frame,true);}function g(x){p&&x.pointerId===p.pointerId&&u();}return a.addEventListener("pointerdown",x=>{let v=s?.element,f=s?.path;!v||!f||!s?.canEdit||!chunkR2NUNRIB_cjs.ib(f)||(x.stopPropagation(),x.preventDefault(),p={pointerId:x.pointerId,startClientX:x.clientX,startClientY:x.clientY,basePath:f,frame:l(v,s),scale:s.scale,draft:f},e.defaultView?.addEventListener("pointermove",m),e.defaultView?.addEventListener("pointerup",g),e.defaultView?.addEventListener("pointercancel",g));}),{root:o,mount(x){if(!s?.element||!s.path){o.remove();return}x&&o.parentElement!==x?x.appendChild(o):x||o.remove();},update(x){s=x;let{element:v,path:f}=x;if(!v||!f){o.remove();return}p||(chunkR2NUNRIB_cjs.Qk(o,{width:x.canvasSize.width,height:x.canvasSize.height}),d(f,l(v,x),x.canEdit&&chunkR2NUNRIB_cjs.ib(f)));},destroy(){u(),o.remove();}}}function Jh(e){let t=null;return {attach(){t?.destroy(),t=Qh(e.doc,e.getTranslator(),e.onChangePath);},sync(){if(!t)return;let n=e.store.get(),o=n.editable&&!n.presenting,r=o?e.getSelectedElement(n):void 0,i=n.slides[n.currentSlide];t.update({element:r??null,path:r?chunkR2NUNRIB_cjs.pb(i?.animations??[],r.id):void 0,canvasSize:n.canvasSize,scale:e.getScale(),canEdit:o}),t.mount(e.getStageWrap()?.querySelector(".pptxv-stage")??null);},detach(){t?.destroy(),t=null;}}}function os(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-editor-overlay"),r=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-sel-box");r.hidden=true,o.appendChild(r);let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-rotate-stem",{left:"50%",top:`${-chunkR2NUNRIB_cjs.Wb}px`,height:`${chunkR2NUNRIB_cjs.Wb}px`});r.appendChild(i);let a=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-rotate-knob",{left:"50%",top:`${-chunkR2NUNRIB_cjs.Wb}px`});a.type="button",a.setAttribute("data-pptx-compact",""),a.setAttribute("aria-label",t("pptx.selectionOverlay.rotate")),a.addEventListener("pointerdown",m=>n.onRotatePointerDown(m)),r.appendChild(a);let s=[];for(let m of chunkR2NUNRIB_cjs.Ub){let{fx:g,fy:x}=chunkR2NUNRIB_cjs.Vb[m],v=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-sel-handle",{left:`${g*100}%`,top:`${x*100}%`,cursor:chunkR2NUNRIB_cjs.Vb[m].cursor});v.type="button",v.setAttribute("data-pptx-compact",""),v.dataset.handle=m,v.setAttribute("aria-label",t("pptx.selectionOverlay.resize",{handle:m})),v.addEventListener("pointerdown",f=>n.onHandlePointerDown(m,f)),r.appendChild(v),s.push(v);}let p=[];function l(m){let g=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-adjust-handle");return g.type="button",g.setAttribute("data-pptx-compact",""),g.setAttribute("aria-label",t("pptx.selectionOverlay.adjust")),g.addEventListener("pointerdown",x=>{let v=d[m];v&&n.onAdjustPointerDown(x,v);}),r.appendChild(g),g}let d=[],u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-snap-layer");return o.appendChild(u),{root:o,mount(m){(o.parentElement!==m||m.lastElementChild!==o)&&m.appendChild(o);},setBox(m,g){if(!m){r.hidden=true;return}r.hidden=false,r.style.left=`${m.x*g}px`,r.style.top=`${m.y*g}px`,r.style.width=`${m.width*g}px`,r.style.height=`${m.height*g}px`,r.style.borderWidth=`${g}px`,r.style.transform=m.rotation?`rotate(${m.rotation}deg)`:"none";},setHandleVisibility({resizable:m,rotatable:g}){for(let x of s)x.hidden=!m;i.hidden=!g,a.hidden=!g;},setAdjustHandles(m,g){for(;p.length<m.length;)p.push(l(p.length));d=m,p.forEach((x,v)=>{let f=m[v];x.hidden=f===void 0,f&&(x.style.left=`${f.left*g}px`,x.style.top=`${f.top*g}px`,x.style.cursor=f.cursor,x.dataset.pptxAdjustKey=f.key);});},setSnapLines(m,g){u.replaceChildren();for(let x of m){let v=chunkR2NUNRIB_cjs.Ok(e,"div",`pptxv-snap-line pptxv-snap-${x.axis==="v"?"v":"h"}`);x.axis==="v"?v.style.left=`${x.position*g}px`:v.style.top=`${x.position*g}px`,u.appendChild(v);}},setEditing(m){o.classList.toggle("is-editing",m);},destroy(){o.remove();}}}var PE={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12"};function ns(e){let{doc:t,store:n}=e,o=null,r=null,i=null,a=null,s=()=>{let y={editable:n.get().editable,canUndo:p.canUndo(),canRedo:p.canRedo()};e.getChrome().ribbon?.setEditState(y),e.getChrome().titleBar?.setEditState(y),e.getChrome().mobileToolbar?.setEditState(y);},p=Za({store:n,getHandler:e.getHandler,onChange:e.onChange,onHistoryChange:()=>s()}),l=Wa({doc:t,store:n,ops:p,getHandler:e.getHandler}),d=Ka({store:n,ops:p}),u=new Map,m=false;function g(){let y=e.getHandler();return y&&!m&&u.size===0&&(m=true,y.getLayoutPreviews().then(w=>{u=new Map(w.map(C=>[C.path,C])),x();}).catch(()=>{}).finally(()=>{m=false;})),u}let x=gh({store:n,getChrome:e.getChrome,selectedElement:y=>p.selectedElement(y),layoutPreviews:g}),v=Zh({doc:t,store:n,ops:p,getScale:e.getScale,getOverlay:()=>o,getStageRoot:()=>i?.querySelector(".pptxv-stage")??null,onCursorMove:e.onCursorMove,onInlineTextInput:e.onInlineTextInput,flushInlineTextInput:e.flushInlineTextInput,onEditEquation:(y,w)=>e.getChrome().ribbon?.openEquationEditor(y,w),onEyedropper:y=>l.setShapeFill(y)}),f=ka({store:n,editActions:l,interactions:v,getScale:e.getScale,getStageOrigin(){let y=o?.root.getBoundingClientRect();return {left:y?.left??0,top:y?.top??0}},getStageRoot:()=>i?.querySelector(".pptxv-stage")??null}),b=Jh({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>i,getSelectedElement:y=>p.selectedElement(y),onChangePath:y=>l.setMotionPathData(y)}),h=()=>{if(x(),b.sync(),!o)return;let y=n.get(),w=y.editable&&!y.presenting?G(y).filter(A=>y.selectedElementIds.includes(A.id)):[];o.setBox(bh(w),e.getScale());let C=Bn(y);o.setHandleVisibility({resizable:C.resizable,rotatable:C.rotatable}),o.setAdjustHandles(Wh(y),e.getScale()),r?.sync(),mh(t,o.root,y.showGuides?y.guides:[],e.getScale());},S=qa({isActive:()=>{let y=n.get();return y.editable&&!y.presenting&&!v.inlineActive()},getSelectedId:()=>n.get().selectedElementId,deselect:()=>p.select(null),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>{p.duplicateSelected();},copySelected:()=>l.copy(),cutSelected:()=>l.cut(),paste:()=>l.paste(),selectAll:()=>l.selectAll(),groupSelected:()=>l.groupSelected(),ungroupSelected:()=>l.ungroupSelected(),nudgeSelected:(y,w)=>p.nudgeSelected(y,w),undo:()=>p.undo(),redo:()=>p.redo(),cancelFormatPainter:()=>n.get().formatPainterSourceId?(n.set({formatPainterSourceId:null}),true):false,toggleShortcuts:()=>e.getChrome().shortcuts.toggle(),toggleFind:()=>e.getChrome().ribbon?.toggleFindReplace(),closeShortcuts:()=>{let y=e.getChrome().shortcuts;return y.isOpen()?(y.close(),true):false}}),E=y=>{chunkR2NUNRIB_cjs.Tg(a),f.onStagePointerDown(y);},T=()=>{v.closeInline(true),i?.removeEventListener("pointerdown",E),i?.removeEventListener("pointermove",v.onStagePointerMove),i?.removeEventListener("dblclick",f.onStageDblClick),a?.removeEventListener("keydown",S),i=null,a=null,o?.destroy(),o=null,r?.dispose(),r=null,b.detach();},k=n.subscribe((y,w)=>{if(y.currentSlide!==w.currentSlide&&(v.closeInline(true),y.selectedElementId)){p.select(null);return}if((y.slides!==w.slides||y.templateElementsBySlideId!==w.templateElementsBySlideId||y.slideMasters!==w.slideMasters||y.notesMaster!==w.notesMaster||y.handoutMaster!==w.handoutMaster)&&y.selectedElementId&&!p.selectedElement(y)){p.select(null);return}y.editable!==w.editable&&(y.editable||(v.closeInline(true),y.selectedElementId&&p.select(null)),s()),(y.drawTool!==w.drawTool||y.editable!==w.editable)&&f.syncCursor(i),h();});return {attachChrome(){T();let y=e.getChrome();o=os(t,e.getTranslator(),{onHandlePointerDown(w,C){v.beginHandleGesture("resize",C,w);},onRotatePointerDown(w){v.beginHandleGesture("rotate",w);},onAdjustPointerDown(w,C){v.beginAdjustGesture(w,C);}}),r=xh({doc:t,store:n,ops:p,getScale:e.getScale,label:w=>e.getTranslator()(w==="start"?"pptx.canvas.connectorEndpointStart":"pptx.canvas.connectorEndpointEnd")}),b.attach(),i=y.stageWrap,a=y.root,i.addEventListener("pointerdown",E),i.addEventListener("pointermove",v.onStagePointerMove),i.addEventListener("dblclick",f.onStageDblClick),a.addEventListener("keydown",S),o.mount(i),r.mount(i),s(),f.syncCursor(i),h();},detachChrome:T,onStageRendered(){o&&i&&(o.mount(i),r?.mount(i),h());},capturesKeyboard(){let y=n.get();return y.editable&&(y.selectedElementId!==null||v.inlineActive())},reset(){v.closeInline(false),f.dispose(),p.clearHistory(),n.set({selectedElementId:null,selectedElementIds:[],dirty:false,interactionActive:false,drawTool:"select",formatPainterSourceId:null,editTemplateMode:false,masterViewTarget:null,masterViewTab:"slides"}),s();},setEditable(y){n.set({editable:y,...y?{}:{editTemplateMode:false,selectedElementId:null,selectedElementIds:[]}});},undo:()=>p.undo(),redo:()=>p.redo(),canUndo:()=>p.canUndo(),canRedo:()=>p.canRedo(),setHistoryDepth:y=>p.setHistoryDepth(y),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>p.duplicateSelected(),getSelectedElementId:()=>n.get().selectedElementId,selectElements:y=>p.select(y.at(-1)??null,y),applyElementPatch(y,w){let C=n.get();!C.editable||!G(C).some(A=>A.id===y)||(p.pushHistory(),n.set(X(C,G(C).map(A=>A.id===y?{...A,...w}:A))),p.commitChange());},commitSlides(y,w=n.get().currentSlide){n.get().editable&&(p.pushHistory(),n.set({slides:y,currentSlide:Math.max(0,Math.min(w,y.length-1)),selectedElementId:null,selectedElementIds:[]}),p.commitChange());},setDrawTool:y=>f.setTool(y),setDrawColor:y=>f.setColor(y),setDrawWidth:y=>f.setWidth(y),getEditActions:()=>l,getFindReplaceActions:()=>d,commitNotes:(y,w)=>p.commitNotes(y,w),setHandoutSlidesPerPage:y=>p.setHandoutSlidesPerPage(y),updateDocumentProperties:(y,w,C)=>p.updateDocumentProperties(y,w,C),updatePresentationProperties:y=>p.updatePresentationProperties(y),updateSections:y=>p.updateSections(y),updateHeaderFooter:y=>p.updateHeaderFooter(y),updateCustomShows:y=>p.updateCustomShows(y),save:y=>p.save(y),async downloadAs(y,w){let C=await p.save(y);chunkR2NUNRIB_cjs.mk(new Blob([C],{type:PE[y]}),chunkR2NUNRIB_cjs.Se(w,y));},async downloadPptx(y){await this.downloadAs("pptx",y);},async packageForSharing(y){let w=await p.save("pptx"),C=await Ta(w,chunkR2NUNRIB_cjs.Se(y));chunkR2NUNRIB_cjs.mk(C,`${chunkR2NUNRIB_cjs.Re(y)}-package.zip`);},destroy(){k(),v.dispose(),f.dispose(),T();}}}function AE(e,t){let{width:n,height:o}=chunkR2NUNRIB_cjs.rk(e.width,e.height,t),r=e;if(n!==e.width||o!==e.height){let a=e.ownerDocument.createElement("canvas");a.width=n,a.height=o;let s=a.getContext("2d");if(!s)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");s.drawImage(e,0,0,n,o),r=a;}let i=r.getContext("2d");if(!i)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");return {imageData:i.getImageData(0,0,n,o),width:n,height:o}}async function rs(e,t={}){let{slideDurationMs:n=2e3,slideTimingsMs:o,maxDimension:r=1920,onProgress:i,signal:a}=t,s=e.store.get().slides.length;if(s===0)return;let p=chunkR2NUNRIB_cjs.qk({totalSlides:s,slideDurationMs:n,slideTimingsMs:o}),l=[];for(let m of p){if(a?.aborted)throw chunkR2NUNRIB_cjs.Le();i?.(m.slideIndex,s);let g=await e.rasterizeSlide(m.slideIndex);l.push({...AE(g,r),delayCs:m.delayCs});}let d=chunkR2NUNRIB_cjs.sk(l,p[0].delayCs);i?.(s,s);let u=new ArrayBuffer(d.byteLength);new Uint8Array(u).set(d),chunkR2NUNRIB_cjs.mk(new Blob([u],{type:"image/gif"}),`${e.baseName}.gif`);}function Vn(e,t,n,o={}){return chunkR2NUNRIB_cjs.H.exportSlide(e,t,n,o)}function ey(e,t={}){return chunkR2NUNRIB_cjs.H.exportAll(e,t)}function kE(e){let t=window.open("","_blank","noopener,noreferrer");return t?(t.document.open(),t.document.write(e),t.document.close(),t.focus(),setTimeout(()=>{t.print();},300),true):false}async function as(e,t={}){let{onProgress:n,signal:o,openPrintWindow:r,...i}=t,a=r??kE,s=e.store.get(),p=s.slides,l=chunkR2NUNRIB_cjs.wk(i,p.length),d=chunkR2NUNRIB_cjs.yk(l.colorMode),u=chunkR2NUNRIB_cjs.xk(l.slideRange,s.currentSlide,p.length,l.customRangeFrom,l.customRangeTo);if(l.printWhat==="outline"){let v=`<div class="outline-page">${chunkR2NUNRIB_cjs.Ak(u,p)}</div>`;return a(is("Outline",v,l,d))}if(u.length===0)return false;if(l.printWhat==="slides"){let{width:v,height:f}=s.canvasSize,b=[];for(let h=0;h<u.length;h++){if(o?.aborted)throw chunkR2NUNRIB_cjs.Le();n?.(h,u.length),b.push(Vn(p[u[h]],v,f));}return n?.(u.length,u.length),a(chunkR2NUNRIB_cjs.tk(b,v,f,{title:"Slides (Vector)",orientation:l.orientation,colorFilter:d}))}let m=[];for(let v=0;v<u.length;v++){if(o?.aborted)throw chunkR2NUNRIB_cjs.Le();n?.(v,u.length);let f=await e.rasterizeSlide(u[v]);m.push(f.toDataURL("image/png"));}if(n?.(u.length,u.length),l.printWhat==="notes"){let v=chunkR2NUNRIB_cjs.Bk(m,u,p);return a(is("Notes Pages",v,l,d))}let g=chunkR2NUNRIB_cjs.Ck(m,u,l.slidesPerPage),x=`Handout ${l.slidesPerPage} per page`;return a(is(x,g,l,d))}function is(e,t,n,o){return chunkR2NUNRIB_cjs.Dk({title:e,bodyHtml:t,orientation:n.orientation,colorFilter:o,frameSlides:n.frameSlides})}function IE(e){return new Promise(t=>{setTimeout(t,e);})}async function LE(e,t){let n=document.createElement("canvas");n.width=e[0].width,n.height=e[0].height;let o=n.getContext("2d");if(!o)throw new Error("[pptx-vanilla-viewer] video export failed: 2D context unavailable");let r=n.captureStream(t.fps),i=new MediaRecorder(r,{mimeType:chunkR2NUNRIB_cjs.Gk([...chunkR2NUNRIB_cjs.Fk]),videoBitsPerSecond:t.videoBitsPerSecond}),a=[];i.ondataavailable=d=>{d.data.size>0&&a.push(d.data);};let s=new Promise((d,u)=>{i.onstop=()=>{d();},i.onerror=()=>{u(new Error("[pptx-vanilla-viewer] video export failed: MediaRecorder error"));};});i.start();let p=chunkR2NUNRIB_cjs.Ek({totalSlides:e.length,slideDurationMs:t.slideDurationMs,slideTimingsMs:t.slideTimingsMs,fps:t.fps}),l=chunkR2NUNRIB_cjs.Hk(t.fps);for(let d of p){t.onRecordProgress?.(d.slideIndex,p.length);for(let u=0;u<d.frameCount;u++){if(t.signal?.aborted)throw i.stop(),chunkR2NUNRIB_cjs.Le();o.drawImage(e[d.slideIndex],0,0),await t.waitMs(l);}}return i.stop(),await s,new Blob(a,{type:"video/webm"})}async function ss(e,t={}){let{slideDurationMs:n=3e3,slideTimingsMs:o,fps:r=30,videoBitsPerSecond:i=5e6,onProgress:a,onRecordProgress:s,signal:p}=t,l=e.store.get().slides.length;if(l===0)return;let d=[];for(let m=0;m<l;m++){if(p?.aborted)throw chunkR2NUNRIB_cjs.Le();a?.(m,l),d.push(await e.rasterizeSlide(m));}let u=await LE(d,{slideDurationMs:n,slideTimingsMs:o,fps:r,videoBitsPerSecond:i,onRecordProgress:s,signal:p,waitMs:e.waitMs??IE});a?.(l,l),chunkR2NUNRIB_cjs.mk(u,`${e.baseName}.webm`);}function DE(e){return {slides:e.slides,width:e.canvasSize.width,height:e.canvasSize.height,sections:e.sections,presentationProperties:e.presentationProperties,headerFooter:e.headerFooter,coreProperties:e.coreProperties,appProperties:e.appProperties,customProperties:e.customProperties,customShows:e.customShows,embeddedFonts:e.embeddedFonts,slideMasters:e.slideMasters,themeOptions:e.themeOptions,notesMaster:e.notesMaster,handoutMaster:e.handoutMaster,hasMacros:e.hasMacros,tableStyleMap:e.tableStyleMap,tags:e.tagCollections,theme:e.colorScheme||e.fontScheme||e.themeName?{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme}:void 0}}function ps(e){let t=false,n={store:e.store,rasterizeSlide:e.rasterizeSlide,baseName:chunkR2NUNRIB_cjs.lk(e.fileName)};async function o(p,l){if(t)return p;t=true;try{return await l()}finally{t=false;}}async function r(p){let l=e.store.get(),d=p??l.currentSlide;if(!(d<0||d>=l.slides.length))return o(void 0,async()=>{let u=await e.rasterizeSlide(d);chunkR2NUNRIB_cjs.nk(u.toDataURL("image/png"),`${n.baseName}-slide-${d+1}.png`);})}async function i(p){let l=e.store.get(),d=p??l.currentSlide;if(!(d<0||d>=l.slides.length||typeof ClipboardItem>"u"||!navigator.clipboard?.write))return o(void 0,async()=>{let u=await e.rasterizeSlide(d),m=await new Promise(g=>{u.toBlob(g,"image/png");});m&&await navigator.clipboard.write([new ClipboardItem({"image/png":m})]);})}async function a(p={}){let l=e.store.get();if(l.slides.length===0)return;let{onProgress:d,signal:u}=p;return o(void 0,async()=>{let{jsPDF:m}=await import('jspdf'),{width:g,height:x}=l.canvasSize,v=g>=x?"landscape":"portrait",f=new m({orientation:v,unit:"px",format:[g,x],compress:!0}),b=l.slides.length;for(let h=0;h<b;h++){if(u?.aborted)throw chunkR2NUNRIB_cjs.Le();d?.(h,b);let S=await e.rasterizeSlide(h);h>0&&f.addPage([g,x],v),f.addImage(S.toDataURL("image/png"),"PNG",0,0,g,x);}f.save(`${n.baseName}.pdf`);})}function s(){chunkR2NUNRIB_cjs.ok(DE(e.store.get()),e.fileName);}return {exportSlidePng:r,copySlideAsImage:i,exportPdf:a,exportJson:s,exportGif:p=>o(void 0,()=>rs(n,p)),exportVideo:p=>o(void 0,()=>ss(n,p)),print:p=>o(false,()=>as(n,p))}}function ls(e){let{doc:t}=e,n=null,o=null,r=null,i=null,a=null,s=()=>{let l=e.getTranslator();n=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-export-progress-backdrop"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let d=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-export-progress-panel");o=chunkR2NUNRIB_cjs.Ok(t,"h3");let u=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-export-progress-track");r=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-export-progress-fill"),u.appendChild(r);let m=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-export-progress-status");i=chunkR2NUNRIB_cjs.Ok(t,"span"),a=chunkR2NUNRIB_cjs.Ok(t,"span","pptxv-export-progress-pct"),m.append(i,a);let g=chunkR2NUNRIB_cjs.Ok(t,"div","pptxv-export-progress-actions"),x=chunkR2NUNRIB_cjs.Ok(t,"button");x.type="button",x.textContent=l("pptx.export.cancel"),x.addEventListener("click",()=>e.onCancel()),g.appendChild(x),d.append(o,u,m,g),n.appendChild(d),t.body.appendChild(n);},p=(l,d)=>{let u=chunkR2NUNRIB_cjs.He(l);r&&(r.style.width=`${u}%`),i&&(i.textContent=d),a&&(a.textContent=`${u}%`);};return {open(l,d){this.close(),s(),n?.setAttribute("aria-label",l),o&&(o.textContent=l),p(0,d);},update(l,d){p(l,d);},close(){n?.remove(),n=null,o=null,r=null,i=null,a=null;}}}function ds(e){let t=null,n=a=>e.getTranslator()(a),o=(a,s)=>{let p=new AbortController;return t=p,s&&(s.aborted?p.abort():s.addEventListener("abort",()=>p.abort(),{once:true})),e.modal.open(a,n("pptx.export.capturingSlides")),p},r=()=>{t=null,e.modal.close();},i=(a,s)=>{chunkR2NUNRIB_cjs.Me(s)||console.error(`[pptx-vanilla-viewer] ${a} export failed:`,s);};return {async runPdf(a={}){let s=o(n("pptx.ribbon.exportPdf"),a.signal);try{await e.controller.exportPdf({...a,signal:s.signal,onProgress:(p,l)=>{a.onProgress?.(p,l),e.modal.update(chunkR2NUNRIB_cjs.Ie(p,l),chunkR2NUNRIB_cjs.Ke(n("pptx.export.rendering"),p,l));}}),e.modal.update(chunkR2NUNRIB_cjs.Fe,n("pptx.export.buildingPdf")),e.modal.update(chunkR2NUNRIB_cjs.Ge,n("pptx.export.buildingPdf"));}catch(p){i("PDF",p);}finally{r();}},async runGif(a={}){let s=o(n("pptx.ribbon.exportGif"),a.signal);try{await e.controller.exportGif({...a,signal:s.signal,onProgress:(p,l)=>{a.onProgress?.(p,l),e.modal.update(chunkR2NUNRIB_cjs.Ie(p,l),chunkR2NUNRIB_cjs.Ke(n("pptx.export.encoding"),p,l));}}),e.modal.update(chunkR2NUNRIB_cjs.Ge,n("pptx.export.savingFile"));}catch(p){i("GIF",p);}finally{r();}},async runVideo(a={}){let s=o(n("pptx.ribbon.exportVideo"),a.signal);try{await e.controller.exportVideo({...a,signal:s.signal,onProgress:(p,l)=>{a.onProgress?.(p,l),e.modal.update(chunkR2NUNRIB_cjs.Ie(p,l,45),chunkR2NUNRIB_cjs.Ke(n("pptx.export.capturing"),p,l));},onRecordProgress:(p,l)=>{a.onRecordProgress?.(p,l),e.modal.update(chunkR2NUNRIB_cjs.Je(p,l),chunkR2NUNRIB_cjs.Ke(n("pptx.export.recording"),p,l));}}),e.modal.update(chunkR2NUNRIB_cjs.Ge,n("pptx.export.savingFile"));}catch(p){i("Video",p);}finally{r();}},cancel(){t?.abort(),t=null,e.modal.close();}}}function zn(e,t){return chunkR2NUNRIB_cjs.Xc({headerFooter:e.headerFooter,customProperties:e.customProperties,slide:t})}async function _n(e,t={}){let{default:n}=await import('html2canvas-pro'),o=t.onclone;return n(e,{...t,onclone:async(r,i)=>{await chunkR2NUNRIB_cjs.vk(r,i),chunkR2NUNRIB_cjs.uk(i),typeof o=="function"&&o(r,i);}})}function ME(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()));})}function cs(e){let t=chunkR2NUNRIB_cjs.Ok(e.doc,"div","pptxv-export-stage",{position:"fixed",left:"-99999px",top:"0",pointerEvents:"none",opacity:"0"});t.setAttribute("aria-hidden","true"),e.container.appendChild(t);let n=e.waitForFrame??ME;async function o(r){let i=e.store.get(),a=i.slides[r];if(!a)throw new Error(`Export failed: no slide at index ${r}`);t.replaceChildren();let s=chunkR2NUNRIB_cjs.Sk({document:e.doc,slide:a,canvasSize:i.canvasSize,mediaDataUrls:i.mediaDataUrls,fieldContext:zn(i,a),registry:e.registry,t:e.getTranslator(),scale:1,smartArt3D:e.smartArt3D,surfaceChart3D:e.surfaceChart3D,presenting:false});return t.appendChild(s),await n(),_n(s,{backgroundColor:"#ffffff",scale:2,width:i.canvasSize.width,height:i.canvasSize.height,logging:false})}return {rasterizeSlide:o,destroy(){t.remove();}}}var Jt=class{async exportSlidePng(t){return this.exporter.exportSlidePng(t)}async copySlideAsImage(t){return this.exporter.copySlideAsImage(t)}async exportPdf(t){return this.exporter.exportPdf(t)}async exportGif(t){return this.exporter.exportGif(t)}async exportVideo(t){return this.exporter.exportVideo(t)}async print(t){return this.exporter.print(t)}exportJson(){this.exporter.exportJson();}};function ms(e){let t=cs(e),n=ps({store:e.store,rasterizeSlide:i=>t.rasterizeSlide(i),fileName:e.fileName}),o=ls({doc:e.doc,getTranslator:e.getTranslator,onCancel:()=>r.cancel()}),r=ds({modal:o,controller:n,getTranslator:e.getTranslator});return {exportSlidePng:i=>n.exportSlidePng(i),copySlideAsImage:i=>n.copySlideAsImage(i),exportPdf:i=>r.runPdf(i),exportJson:()=>n.exportJson(),exportGif:i=>r.runGif(i),exportVideo:i=>r.runVideo(i),print:i=>n.print(i),destroy:()=>{r.cancel(),t.destroy();}}}function HE(e,t){return t?e.replace(/\{\{\s*(\w+)\s*\}\}/gu,(n,o)=>{let r=t[o];return r===void 0?n:String(r)}):e}function eo(e="en",t){let n=t?.[e],o=e!=="en"?t?.en:void 0;return (r,i)=>{let a=n?.[r]??o?.[r]??chunkR2NUNRIB_cjs.Uk[r]??chunkR2NUNRIB_cjs.Vk(r);return HE(a,i)}}async function us(e){if(typeof e=="string"){let t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch presentation (${t.status}) from ${e}`);return t.arrayBuffer()}if(e instanceof Blob)return e.arrayBuffer();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t.buffer}return e}async function to(e){let t=new chunkR2NUNRIB_cjs.I,n=[];try{let o=await t.load(e),r=await RE(t,o.slides,n),i=await OE(t,o.slides),a=await FE(t,i),s=await BE(t,o.tableStyleMap);return {handler:t,slides:a,sections:o.sections??[],presentationProperties:o.presentationProperties??{},viewProperties:o.viewProperties,headerFooter:o.headerFooter??{},coreProperties:o.coreProperties,appProperties:o.appProperties,customProperties:o.customProperties??[],customShows:o.customShows??[],embeddedFonts:o.embeddedFonts??[],hasDigitalSignatures:o.hasDigitalSignatures??!1,digitalSignatureCount:o.digitalSignatureCount??0,isPasswordProtected:o.isPasswordProtected??!1,canvasSize:{width:o.width??chunkR2NUNRIB_cjs.Y,height:o.height??chunkR2NUNRIB_cjs.Z},mediaDataUrls:r,colorScheme:o.theme?.colorScheme,fontScheme:o.theme?.fontScheme,themeName:o.theme?.name,tagCollections:o.tags??[],tableStyleMap:s,slideMasters:o.slideMasters??[],themeOptions:o.themeOptions??[],notesMaster:o.notesMaster,handoutMaster:o.handoutMaster,hasMacros:o.hasMacros??!1,slideSize:typeof o.widthEmu=="number"&&typeof o.heightEmu=="number"&&o.widthEmu>0&&o.heightEmu>0?{widthEmu:o.widthEmu,heightEmu:o.heightEmu,type:o.slideSizeType??""}:void 0,notesCanvasSize:typeof o.notesWidthEmu=="number"&&typeof o.notesHeightEmu=="number"&&o.notesWidthEmu>0&&o.notesHeightEmu>0?{width:Math.round(o.notesWidthEmu/9525),height:Math.round(o.notesHeightEmu/9525)}:void 0,blobUrls:n}}catch(o){throw tt(n),t.dispose(),o}}function tt(e){for(let t of e)t.startsWith("blob:")&&URL.revokeObjectURL(t);}async function RE(e,t,n){let o=[];for(let a of t)chunkR2NUNRIB_cjs.R(a.elements,o);let r=new Map;await Promise.all(o.map(async a=>{let s=a.mediaPath;if(!s){a.mediaMissing=true;return}try{if(a.mediaType==="audio"||a.mediaType==="video"){let l=await e.getMediaArrayBuffer(s);if(l){let d=a.mediaMimeType||"application/octet-stream",u=URL.createObjectURL(new Blob([l],{type:d}));n.push(u),r.set(s,u);}else a.mediaMissing=!0;}else {let l=await e.getImageData(s);l?r.set(s,l):a.mediaMissing=!0;}}catch{a.mediaMissing=true;}}));let i=chunkR2NUNRIB_cjs.S(t).filter(a=>!r.has(a));return await Promise.all(i.map(async a=>{try{let s=await e.getMediaArrayBuffer(a);if(s){let p=URL.createObjectURL(new Blob([s]));n.push(p),r.set(a,p);}}catch{}})),r}async function OE(e,t){let{paths:n,refs:o}=chunkR2NUNRIB_cjs.T(t);if(n.size===0)return t;let r=new Map;await Promise.all(Array.from(n).map(async s=>{try{let p=await e.getImageData(s);p&&r.set(s,p);}catch{}}));let i=new Map;for(let s of o){let p=r.get(s.path);if(!p)continue;let l=i.get(s.element.id)??{};l[s.field]=p,i.set(s.element.id,l);}if(i.size===0)return t;let a=s=>{let p=false,l=s.map(d=>{let u=d,m=i.get(d.id);if(m&&(u={...d,...m}),u.type==="group"&&u.children?.length){let g=a(u.children);g!==u.children&&(u={...u,children:g});}return u!==d&&(p=true),u});return p?l:s};return t.map(s=>{let p=a(s.elements);return p===s.elements?s:{...s,elements:p}})}async function FE(e,t){let{paths:n,refs:o}=chunkR2NUNRIB_cjs.U(t);if(n.size===0)return t;let r=new Map;return await Promise.all(Array.from(n).map(async i=>{try{let a=await e.getImageData(i);a&&r.set(i,a);}catch{}})),r.size===0?t:t.map(i=>{let a=chunkR2NUNRIB_cjs.V(i.elements,r,o);return a===i.elements?i:{...i,elements:a}})}async function BE(e,t){let{paths:n,refs:o}=chunkR2NUNRIB_cjs.W(t);if(n.size===0||!t)return t;let r=new Map;return await Promise.all(Array.from(n).map(async i=>{try{let a=await e.getImageData(i);a&&r.set(i,a);}catch{}})),r.size===0?t:chunkR2NUNRIB_cjs.X(t,r,o)}function Gn(e){let t=e,n=new Set;return {get:()=>t,set:o=>{let r=false;for(let a of Object.keys(o))if(o[a]!==t[a]){r=true;break}if(!r)return;let i=t;t={...t,...o};for(let a of Array.from(n))a(t,i);},subscribe:o=>(n.add(o),()=>{n.delete(o);})}}function Un(){return {slides:[],sections:[],presentationProperties:{},viewProperties:void 0,headerFooter:{},coreProperties:void 0,appProperties:void 0,customProperties:[],customShows:[],activeCustomShowId:null,embeddedFonts:[],embedFonts:true,customFontFamilies:[],hasDigitalSignatures:false,digitalSignatureCount:0,isPasswordProtected:false,presentationPassword:null,templateElementsBySlideId:{},slideMasters:[],themeOptions:[],notesMaster:void 0,notesCanvasSize:void 0,handoutMaster:void 0,hasMacros:false,masterViewTab:"slides",handoutSlidesPerPage:4,masterViewTarget:null,canvasSize:{width:chunkR2NUNRIB_cjs.Y,height:chunkR2NUNRIB_cjs.Z},slideSize:void 0,mediaDataUrls:new Map,colorScheme:void 0,fontScheme:void 0,themeName:void 0,tagCollections:[],tableStyleMap:void 0,currentSlide:0,zoom:"fit",loading:false,error:null,presenting:false,endOfShow:false,enteringBackward:false,editable:false,selectedElementId:null,selectedElementIds:[],selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null,formatPainterSourceId:null,editTemplateMode:false,dirty:false,interactionActive:false,notesExpanded:false,inspectorOpen:true,remotePresences:[],cursors:[],followedClientId:null,clipboardPayload:null,drawTool:"select",drawColor:chunkR2NUNRIB_cjs._,drawWidth:3,showGrid:false,showRulers:false,snapToGrid:false,snapToShape:true,showGuides:true,guides:[],eyedropperActive:false,spellCheckEnabled:false}}function ct(e,t){return t<=0?0:Math.min(Math.max(Math.trunc(e),0),t-1)}function ty(e){let{options:t,store:n}=e,o=null,r=[],i=0;function a(){tt(r),tt(n.get().mediaDataUrls.values()),r=[],o?.dispose(),o=null;}async function s(p,l="user"){let d=++i;e.getEditor()?.reset(),n.set({loading:true,error:null});try{let u=await us(p),m=await to(u);if(d!==i){tt(m.blobUrls),m.handler.dispose();return}a(),o=m.handler,r=m.blobUrls;let g=chunkR2NUNRIB_cjs.yi(m.slides);e.onContentApplying?.(l),n.set({slides:g.slides,sections:m.sections,presentationProperties:m.presentationProperties,viewProperties:m.viewProperties,headerFooter:m.headerFooter,coreProperties:m.coreProperties,appProperties:m.appProperties,customProperties:m.customProperties,customShows:m.customShows,activeCustomShowId:chunkR2NUNRIB_cjs.xj(m.presentationProperties,m.customShows)??null,embeddedFonts:m.embeddedFonts,embedFonts:chunkR2NUNRIB_cjs.Hi(m.embeddedFonts.map(x=>x.name)).initialEnabled,hasDigitalSignatures:m.hasDigitalSignatures,digitalSignatureCount:m.digitalSignatureCount,isPasswordProtected:m.isPasswordProtected,templateElementsBySlideId:g.templateElementsBySlideId,slideMasters:m.slideMasters,themeOptions:m.themeOptions,notesMaster:m.notesMaster,notesCanvasSize:m.notesCanvasSize,handoutMaster:m.handoutMaster,hasMacros:m.hasMacros,masterViewTab:"slides",handoutSlidesPerPage:m.handoutMaster?.slidesPerPage??4,masterViewTarget:null,canvasSize:m.canvasSize,slideSize:m.slideSize,mediaDataUrls:m.mediaDataUrls,colorScheme:m.colorScheme,fontScheme:m.fontScheme,themeName:m.themeName,tagCollections:m.tagCollections,tableStyleMap:m.tableStyleMap,currentSlide:ct(t.initialSlide??0,g.slides.length),loading:!1}),e.onContentApplied?.(l),t.onLoad?.({slideCount:m.slides.length,canvasSize:m.canvasSize});}catch(u){if(d!==i)return;let m=e.getTranslator(),g=u instanceof chunkR2NUNRIB_cjs.C?m("pptx.security.currentlyProtected"):u instanceof Error?u.message:String(u);n.set({loading:false,error:g}),t.onError?.(g,u);}}return {load:s,releaseLoaded:a,getHandler:()=>o,invalidate:()=>{i++;}}}var NE=22;function VE(e){return e.map(t=>`${t.key}@${t.level}`).join("\0")}function oy(e,t,n,o){t.querySelector(`[${chunkR2NUNRIB_cjs.Fg}]`)?.remove();let r=o.slides,i="",a=false,s=new Map,p=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-outline-view");p.setAttribute(chunkR2NUNRIB_cjs.Fg,"true"),p.setAttribute("role","region"),p.setAttribute("aria-label",n("pptx.view.outlineView"));let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-outline-view-header"),d=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-outline-view-title");d.textContent=n("pptx.view.outlineView");let u=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-outline-view-hint");u.textContent=n("pptx.outline.hint");let m=H(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-outline-view-btn",onClick:()=>{S(),o.onClose();}});l.append(d,u,m.btn);let g=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-outline-view-list");p.append(l,g);let x=E=>{if(!o.canEdit)return;let T=chunkR2NUNRIB_cjs.Pg(r,E,{canvas:o.canvasSize});T.changed&&(r=T.slides,o.commit(T.slides,T.activeSlideIndex),f(),b(T.focusKey));},v=E=>{let T=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-outline-view-row",{paddingLeft:`${E.level*NE}px`}),k=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-outline-view-number");k.textContent=E.kind==="title"?String(E.slideIndex+1):"";let y=e.createElement("input");return y.type="text",y.className=`pptxv-outline-view-input${E.kind==="title"?" is-title":""}`,y.value=E.text,y.readOnly=!o.canEdit,y.setAttribute(chunkR2NUNRIB_cjs.Gg,E.key),y.setAttribute(chunkR2NUNRIB_cjs.Hg,String(E.slideIndex+1)),y.setAttribute(chunkR2NUNRIB_cjs.Ig,String(E.level)),y.setAttribute("aria-label",n(E.kind==="title"?"pptx.outline.titleLine":"pptx.outline.bodyLine")),y.addEventListener("input",()=>x({type:"setText",key:E.key,text:y.value})),y.addEventListener("keydown",w=>{let{edit:C,preventDefault:A}=chunkR2NUNRIB_cjs.Og(w,E.key);A&&w.preventDefault(),C&&x(C);}),s.set(E.key,y),T.append(k,y),T};function f(){let E=chunkR2NUNRIB_cjs.Jg(r),T=VE(E);if(T===i){for(let k of E){let y=s.get(k.key);y&&y.value!==k.text&&(y.value=k.text);}return}i=T,s.clear(),g.replaceChildren(...E.map(k=>v(k)));}function b(E){let T=E?s.get(E):void 0;T&&e.activeElement!==T&&(T.focus(),T.setSelectionRange(T.value.length,T.value.length));}let h=o.subscribe?.(E=>{!a&&E!==r&&(r=E,f());});function S(){a||(a=true,h?.(),p.remove());}return f(),t.appendChild(p),{el:p,close:S}}function ny(e){let t=null,n=()=>{t?.close(),t=null;};return {open(){n();let o=e.store.get();t=oy(e.doc,e.root(),e.t,{slides:o.slides,canvasSize:o.canvasSize,canEdit:o.editable,subscribe:r=>e.store.subscribe(i=>r(i.slides)),commit:(r,i)=>e.editor.commitSlides(r,i),onClose:()=>{t=null;}});},close:n}}function ry(e,t,n,o){t.querySelector("[data-pptx-selection-pane]")?.remove();let r=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-workspace-pane");r.dataset.pptxSelectionPane="true";let i=chunkR2NUNRIB_cjs.Ok(e,"header"),a=chunkR2NUNRIB_cjs.Ok(e,"h2");a.textContent=n("pptx.selectionPane.title");let s=chunkR2NUNRIB_cjs.Ok(e,"button");s.type="button",s.textContent="\xD7",s.setAttribute("aria-label",n("pptx.selectionPane.close")),i.append(a,s),r.appendChild(i);let p=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-workspace-list"),l={elements:o.elements,selectedIds:o.selectedIds},d=null,u=new Map,m=()=>{for(let[f,b]of u)b.classList.toggle("is-selected",l.selectedIds.includes(f));},g=()=>{if(d===l.elements){m();return}if(d=l.elements,u.clear(),p.replaceChildren(),!l.elements.length){let f=chunkR2NUNRIB_cjs.Ok(e,"p");f.textContent=n("pptx.selectionPane.empty"),p.appendChild(f);return}[...l.elements].reverse().forEach((f,b)=>{let h=zE(e,n,f,l.elements.length-b-1,o,l.selectedIds);u.set(f.id,h),p.appendChild(h);});};g(),r.appendChild(p);let x=o.subscribe?.(f=>{l=f,!p.querySelector(".pptxv-selection-rename")&&g();})??null,v={close(){x?.(),r.remove();}};return s.addEventListener("click",()=>{v.close(),o.onClose?.();}),t.appendChild(r),v}function zE(e,t,n,o,r,i){let a=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-selection-row");a.draggable=true,a.dataset.index=String(o),a.classList.toggle("is-selected",i.includes(n.id));let s=chunkR2NUNRIB_cjs.Ok(e,"span");s.textContent="\u2630";let p=chunkR2NUNRIB_cjs.Ok(e,"button");p.type="button",p.dataset.pptxSelectionName="true",p.textContent=iy(n,o),p.addEventListener("click",()=>r.onSelect(n.id)),p.addEventListener("dblclick",()=>_E(e,t,a,p,n,o,r.onRename));let l=chunkR2NUNRIB_cjs.Ok(e,"button");return l.type="button",l.textContent=n.hidden?"\u25CB":"\u25C9",l.setAttribute("aria-label",t(n.hidden?"pptx.selectionPane.show":"pptx.selectionPane.hide")),l.addEventListener("click",()=>r.onToggleHidden(n.id)),a.addEventListener("dragstart",d=>d.dataTransfer?.setData("text/plain",String(o))),a.addEventListener("dragover",d=>d.preventDefault()),a.addEventListener("drop",d=>{d.preventDefault();let u=Number(d.dataTransfer?.getData("text/plain"));Number.isInteger(u)&&r.onReorder(u,o);}),a.append(s,p,l),a}function _E(e,t,n,o,r,i,a){let s=iy(r,i),p=e.createElement("input");p.type="text",p.className="pptxv-selection-rename",p.setAttribute("aria-label",t("pptx.selectionPane.renameElement")),p.value=s,o.hidden=true,n.insertBefore(p,o),p.focus(),p.select();let l=false,d=u=>{if(l)return;l=true,chunkR2NUNRIB_cjs.Ug(p),p.remove(),o.hidden=false;let m=u?chunkR2NUNRIB_cjs.Vg(s,p.value):null;m&&(o.textContent=m.name.length>0?m.name:ay(r,i),a(r.id,m.name));};p.addEventListener("keydown",u=>{u.key==="Enter"?d(true):u.key==="Escape"&&d(false);}),p.addEventListener("blur",()=>d(true));}function iy(e,t){return e.name&&e.name.trim().length>0?e.name.trim():ay(e,t)}function ay(e,t){return chunkR2NUNRIB_cjs.c(e)&&e.text?.trim()?e.text.trim().slice(0,32):`${e.type.charAt(0).toUpperCase()}${e.type.slice(1)} ${t+1}`}function GE(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}function sy(e){let t=null,n=()=>{t?.close(),t=null;},o=()=>{let r=e.store.get();return r.slides[r.currentSlide]};return {open(){n(),t=ry(e.doc,e.root(),e.t,{elements:o()?.elements??[],selectedIds:e.store.get().selectedElementIds,subscribe:r=>{let i=o()?.elements??[],a=e.store.get().selectedElementIds;return e.store.subscribe(s=>{let p=s.slides[s.currentSlide]?.elements??[],l=s.selectedElementIds;p===i&&GE(l,a)||(i=p,a=l,r({elements:i,selectedIds:a}));})},onClose:()=>{t=null;},onSelect:r=>e.editor.selectElements([r]),onToggleHidden:r=>e.editor.applyElementPatch(r,{hidden:!o()?.elements.find(i=>i.id===r)?.hidden}),onRename:(r,i)=>e.editor.applyElementPatch(r,{name:i}),onReorder:(r,i)=>{let a=e.store.get(),s=a.slides[a.currentSlide];if(!s||r===i)return;let p=[...s.elements],[l]=p.splice(r,1);p.splice(i,0,l),e.editor.commitSlides(a.slides.map((d,u)=>u===a.currentSlide?{...d,elements:p}:d));}});},close:n}}var xs=Symbol("pptxv-comments-panel-dispose");function py(e,t,n,o,r){let i=t.querySelector("[data-pptx-comments-panel]");i?.[xs]?.(),i?.remove();let a=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-workspace-pane");a.dataset.pptxCommentsPanel="true";let s=chunkR2NUNRIB_cjs.Ok(e,"header"),p=chunkR2NUNRIB_cjs.Ok(e,"h2");p.textContent=n("pptx.toolbar.comments");let l=chunkR2NUNRIB_cjs.Ok(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.common.close")),s.append(p,l),a.appendChild(s);let d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-workspace-list"),u=yn(e,n,r),m=chunkR2NUNRIB_cjs.Ok(e,"p");m.textContent=n("pptx.comments.noneOnSlide"),d.append(u.el,m);let g=()=>{let S=o.getComments();m.hidden=S.length>0,u.update(S,true);},x=chunkR2NUNRIB_cjs.Ok(e,"textarea");x.placeholder=n("pptx.comments.addPlaceholder");let v=chunkR2NUNRIB_cjs.Ok(e,"button");v.type="button",v.textContent=n("pptx.comments.addComment"),v.addEventListener("click",()=>{r.addComment(x.value)&&(x.value="");}),d.append(x,v),a.appendChild(d);let f=o.getComments(),b=()=>{h(),delete a[xs];},h=o.subscribe(()=>{if(!a.isConnected){b();return}let S=o.getComments();S!==f&&(f=S,g());});a[xs]=b,l.addEventListener("click",()=>{b(),a.remove();}),g(),t.appendChild(a);}function ly(e,t,n,o){t.querySelector("[data-pptx-compare-panel]")?.remove();let r=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-compare-panel");r.dataset.pptxComparePanel="true",r.setAttribute("aria-label",n("pptx.compare.title"));let i=chunkR2NUNRIB_cjs.Ok(e,"header"),a=chunkR2NUNRIB_cjs.Ok(e,"div"),s=chunkR2NUNRIB_cjs.Ok(e,"h2");s.textContent=n("pptx.compare.title");let p=chunkR2NUNRIB_cjs.Ok(e,"p");p.textContent=n("pptx.compare.summary",{added:o.result.addedCount,removed:o.result.removedCount,changed:o.result.changedCount}),a.append(s,p);let l=chunkR2NUNRIB_cjs.Ok(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.compare.close")),i.append(a,l),r.appendChild(i);let d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-compare-actions"),u=chunkR2NUNRIB_cjs.Ok(e,"button");u.type="button",u.textContent=n("pptx.compare.acceptAll"),u.addEventListener("click",()=>{o.onAcceptAll(),r.remove();}),d.appendChild(u),r.appendChild(d);let m=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-compare-list"),g=o.result.diffs.filter(x=>x.status!=="unchanged");if(g.length===0){let x=chunkR2NUNRIB_cjs.Ok(e,"p");x.textContent=n("pptx.compare.noDifferences"),m.appendChild(x);}for(let x of g)m.appendChild(UE(e,n,x,o.onAccept));r.appendChild(m),t.appendChild(r),l.addEventListener("click",()=>r.remove());}function UE(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"article","pptxv-compare-row"),i=chunkR2NUNRIB_cjs.Ok(e,"strong");i.textContent=`${t("pptx.compare.slideNumber",{number:Math.max(n.baseIndex,n.compareIndex)+1})} \xB7 ${t(`pptx.compare.status${$E(n.status)}`)}`;let a=chunkR2NUNRIB_cjs.Ok(e,"p");a.textContent=n.changes.map(d=>d.description).join("; ")||i.textContent;let s=chunkR2NUNRIB_cjs.Ok(e,"div"),p=chunkR2NUNRIB_cjs.Ok(e,"button");p.type="button",p.textContent=t("pptx.compare.reject");let l=chunkR2NUNRIB_cjs.Ok(e,"button");return l.type="button",l.textContent=t("pptx.compare.accept"),p.addEventListener("click",()=>{r.classList.add("is-resolved"),p.disabled=true,l.disabled=true;}),l.addEventListener("click",()=>{o(n),r.classList.add("is-resolved"),p.disabled=true,l.disabled=true;}),s.append(p,l),r.append(i,a,s),r}function $E(e){return e.charAt(0).toUpperCase()+e.slice(1)}function fe(e,t,n){let o=chunkR2NUNRIB_cjs.Ok(e,"button","pptxv-parity-backdrop");o.type="button",o.setAttribute("aria-label",t("pptx.common.close"));let r=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-parity-dialog");r.setAttribute("role","dialog"),r.setAttribute("aria-modal","true");let i=`pptxv-dialog-${crypto.randomUUID()}`;r.setAttribute("aria-labelledby",i);let a=chunkR2NUNRIB_cjs.Ok(e,"header","pptxv-parity-header"),s=chunkR2NUNRIB_cjs.Ok(e,"h2");s.id=i,s.textContent=n;let p=chunkR2NUNRIB_cjs.Ok(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.common.close")),a.append(s,p);let l=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-parity-body"),d=chunkR2NUNRIB_cjs.Ok(e,"footer","pptxv-parity-footer");r.append(a,l,d),e.body.append(o,r);let u=()=>{e.removeEventListener("keydown",m),o.remove(),r.remove();},m=g=>{g.key==="Escape"&&u();};return e.addEventListener("keydown",m),o.addEventListener("click",u),p.addEventListener("click",u),queueMicrotask(()=>p.focus()),{backdrop:o,dialog:r,heading:s,body:l,footer:d,close:u}}function Q(e,t,n,o,r=false){let i=chunkR2NUNRIB_cjs.Ok(e,"button",r?"is-primary":"");return i.type="button",i.textContent=n,i.addEventListener("click",o),t.appendChild(i),i}function He(e,t,n,o){let r=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-parity-check"),i=e.createElement("input");return i.type="checkbox",i.checked=o,r.append(i,e.createTextNode(n)),t.appendChild(r),i}function dy(e,t,n,o,r,i){for(let a of o){let s=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-parity-check"),p=e.createElement("input");p.type="radio",p.name=n,p.value=a.value,p.checked=a.value===r,p.addEventListener("change",()=>{p.checked&&i(a.value);}),s.append(p,e.createTextNode(a.label)),t.appendChild(s);}}function cy(e,t,n,o,r){let i=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-parity-swatch-row");for(let a of n){let s=e.createElement("button");s.type="button",s.className="pptxv-parity-swatch",s.classList.toggle("is-active",a.key===o);let p=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-parity-swatch-preview");p.style.background=a.previewColor;let l=e.createElement("span");l.textContent=a.label,s.append(p,l),s.addEventListener("click",()=>r(a.key)),i.appendChild(s);}t.appendChild(i);}function my(e,t,n){let{shows:o,slides:r,onSave:i,onSetActive:a,onRun:s}=n,p=fe(e,t,t("pptx.customShows.title")),l=structuredClone(o),d=n.activeShowId,u=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-custom-shows-active"),m=chunkR2NUNRIB_cjs.Ok(e,"span");m.textContent=t("pptx.customShows.selectCustomShow");let g=e.createElement("select");g.setAttribute("aria-label",t("pptx.customShows.selectCustomShow")),g.addEventListener("change",()=>{d=g.value||null,a(d);}),u.append(m,g),p.body.appendChild(u);let x=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-custom-shows");p.body.appendChild(x);let v=()=>{g.replaceChildren();let b=e.createElement("option");b.value="",b.textContent=t("pptx.customShows.allSlides"),g.appendChild(b);for(let h of l){let S=e.createElement("option");S.value=h.id,S.textContent=h.name,g.appendChild(S);}g.value=l.some(({id:h})=>h===d)?d??"":"";},f=()=>{x.replaceChildren(),l.forEach(b=>{let h=chunkR2NUNRIB_cjs.Ok(e,"article"),S=chunkR2NUNRIB_cjs.Ok(e,"input");S.value=b.name,S.setAttribute("aria-label",t("pptx.customShows.editNameLabel")),S.addEventListener("change",()=>{b.name=S.value.trim()||b.name,v();});let E=chunkR2NUNRIB_cjs.Ok(e,"span");E.textContent=`${b.slideRIds.length}/${r.length}`;let T=chunkR2NUNRIB_cjs.Ok(e,"button");T.type="button",T.textContent=t("pptx.slideShow.fromBeginning"),T.addEventListener("click",()=>{d=b.id,a(b.id),s(b),p.close();});let k=chunkR2NUNRIB_cjs.Ok(e,"button");k.type="button",k.textContent=t("pptx.customShows.delete"),k.addEventListener("click",()=>{l=l.filter(({id:w})=>w!==b.id),d===b.id&&(d=null,a(null)),f(),v();});let y=chunkR2NUNRIB_cjs.Ok(e,"div");r.forEach(w=>{let C=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-parity-check"),A=e.createElement("input");A.type="checkbox",A.checked=b.slideRIds.includes(w.rId),A.addEventListener("change",()=>{b.slideRIds=A.checked?[...b.slideRIds,w.rId]:b.slideRIds.filter(P=>P!==w.rId),E.textContent=`${b.slideRIds.length}/${r.length}`;}),C.append(A,e.createTextNode(`${t("pptx.rehearse.slide")} ${w.slideNumber}`)),y.appendChild(C);}),h.append(S,E,T,k,y),x.appendChild(h);});};Q(e,p.footer,t("pptx.customShows.createNew"),()=>{l.push({id:crypto.randomUUID(),name:t("pptx.customShows.createNew"),slideRIds:r.map(({rId:b})=>b)}),f(),v();}),Q(e,p.footer,t("pptx.common.cancel"),p.close),Q(e,p.footer,t("pptx.common.ok"),()=>{i(l),a(l.some(({id:b})=>b===d)?d:null),p.close();},true),f(),v();}function uy(e,t,n){let o=fe(e,t,t("pptx.headerFooter.title")),r=chunkR2NUNRIB_cjs.ui(n.value),i=He(e,o.body,t("pptx.headerFooter.dateAndTime"),!!r.hasDateTime),a=He(e,o.body,t("pptx.headerFooter.slideNumber"),!!r.hasSlideNumber),s=He(e,o.body,t("pptx.headerFooter.footer"),!!r.hasFooter),p=chunkR2NUNRIB_cjs.Ok(e,"input");p.type="text",p.value=r.footerText??"",p.placeholder=t("pptx.headerFooter.footerPlaceholder"),p.hidden=!s.checked,o.body.appendChild(p),s.addEventListener("change",()=>{p.hidden=!s.checked;});let l=d=>{n.onApply({...r,hasDateTime:i.checked,hasSlideNumber:a.checked,hasFooter:s.checked,footerText:p.value},d),o.close();};Q(e,o.footer,t("pptx.headerFooter.applyToAll"),()=>l("all")),Q(e,o.footer,t("pptx.headerFooter.applyToCurrent"),()=>l("current"),true);}function xy(e,t,n,o){let r=fe(e,t,t("pptx.hyperlink.editTitle")),i=chunkR2NUNRIB_cjs.ch(n),a=(l,d)=>{let u=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-parity-select"),m=chunkR2NUNRIB_cjs.Ok(e,"span");m.textContent=l;let g=chunkR2NUNRIB_cjs.Ok(e,"input");return g.type="text",g.value=d,u.append(m,g),r.body.appendChild(u),g},s=a(t("pptx.hyperlink.urlLabel"),i.url);s.placeholder=t("pptx.hyperlink.urlPlaceholder");let p=a(t("pptx.hyperlink.tooltipLabel"),i.tooltip);Q(e,r.footer,t("pptx.hyperlinkDialog.removeLink"),()=>{o(chunkR2NUNRIB_cjs.eh()),r.close();}),Q(e,r.footer,t("pptx.common.cancel"),r.close),Q(e,r.footer,t("pptx.hyperlinkDialog.apply"),()=>{o(chunkR2NUNRIB_cjs.dh(n,{url:s.value,tooltip:p.value})),r.close();},true);}function gy(e,t,n,o){let r=fe(e,t,t("pptx.print.title")),i=(x,v)=>{let f=chunkR2NUNRIB_cjs.Ok(e,"label","pptxv-parity-select"),b=chunkR2NUNRIB_cjs.Ok(e,"span");b.textContent=x;let h=e.createElement("select");for(let[S,E]of v){let T=e.createElement("option");T.value=S,T.textContent=E,h.appendChild(T);}return f.append(b,h),r.body.appendChild(f),h},a=i(t("pptx.print.slideRange"),[["all",t("pptx.print.allSlides")],["current",t("pptx.print.currentSlide")],["custom",t("pptx.print.customRange")]]),s=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-parity-range");s.hidden=true;let p=e.createElement("input");p.type="number",p.min="1",p.max=String(n),p.value="1";let l=e.createElement("input");l.type="number",l.min="1",l.max=String(n),l.value=String(n),s.append(p,e.createTextNode(t("pptx.slideShow.to")),l),r.body.appendChild(s),a.addEventListener("change",()=>{s.hidden=a.value!=="custom";});let d=i(t("pptx.print.printWhat"),[["slides",t("pptx.print.fullPageSlides")],["notes",t("pptx.print.notesPages")],["handouts",t("pptx.print.handouts")],["outline",t("pptx.print.outline")]]),u=i(t("pptx.print.orientation"),[["landscape",t("pptx.print.landscape")],["portrait",t("pptx.print.portrait")]]),m=i(t("pptx.print.colorMode"),[["color",t("pptx.print.color")],["grayscale",t("pptx.print.grayscale")],["pureBlackWhite",t("pptx.print.blackAndWhite")]]),g=He(e,r.body,t("pptx.print.frameSlides"),false);Q(e,r.footer,t("pptx.common.cancel"),r.close),Q(e,r.footer,t("pptx.print.title"),()=>{o({slideRange:a.value,customRangeFrom:Number(p.value),customRangeTo:Number(l.value),printWhat:d.value,orientation:u.value,colorMode:m.value,frameSlides:g.checked}),r.close();},true);}var WE=24;function by(e,t,n,o){let r=o.slides.length;if(t.querySelector(`[${chunkR2NUNRIB_cjs.wg}]`)?.remove(),r===0)return null;let i=chunkR2NUNRIB_cjs.zg(o.initialSlideIndex,r),a={width:0,height:0},s=false,p=chunkR2NUNRIB_cjs.ug(),l=chunkR2NUNRIB_cjs.Ok(e,"section","pptxv-reading-view");l.setAttribute(chunkR2NUNRIB_cjs.wg,"true"),l.setAttribute("role","region"),l.setAttribute("aria-label",n("pptx.view.readingView")),l.tabIndex=-1;let d=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-reading-view-viewport"),u=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-reading-view-bar"),m=H(e,{label:n("pptx.common.previous"),icon:"chevron-left",className:"pptxv-reading-view-btn",onClick:()=>b({command:"previous"})}),g=chunkR2NUNRIB_cjs.Ok(e,"span","pptxv-reading-view-counter");g.setAttribute(chunkR2NUNRIB_cjs.xg,"true");let x=H(e,{label:n("pptx.common.next"),icon:"chevron-right",className:"pptxv-reading-view-btn",onClick:()=>b({command:"next"})}),v=H(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-reading-view-btn",onClick:()=>b({command:"exit"})});u.append(m.btn,g,x.btn,v.btn),l.append(d,u);let f=()=>{let w=o.slides[i.slideIndex];g.textContent=chunkR2NUNRIB_cjs.fg(i.slideIndex,r),m.setDisabled(!chunkR2NUNRIB_cjs.Cg(i)),x.setDisabled(!chunkR2NUNRIB_cjs.Dg(i,r));let C=Math.max(o.canvasSize.width,1),A=Math.max(o.canvasSize.height,1),P=chunkR2NUNRIB_cjs.Eg(o.canvasSize,a,WE),I=chunkR2NUNRIB_cjs.Ok(e,"div","pptxv-reading-view-stage",{width:`${C*P}px`,height:`${A*P}px`});I.setAttribute(chunkR2NUNRIB_cjs.yg,"true"),I.setAttribute("aria-roledescription","slide"),w&&P>0&&I.appendChild(o.renderStage(w,P)),d.replaceChildren(I);},b=w=>{let C=i,A=chunkR2NUNRIB_cjs.Bg(C,w,r);if(C.open&&!A.open){k(),o.onExit(C.slideIndex);return}i=A,f();},h=w=>{let{command:C,swallow:A,preventDefault:P}=chunkR2NUNRIB_cjs.Ag(w,p);A&&w.stopPropagation(),P&&w.preventDefault(),C.command!=="none"&&b(C);},S=()=>{let w=d.getBoundingClientRect();(w.width!==a.width||w.height!==a.height)&&(a={width:w.width,height:w.height},f());},E=e.defaultView?.ResizeObserver,T=E?new E(()=>S()):null;function k(){s||(s=true,e.removeEventListener("keydown",h,true),T?.disconnect(),l.remove());}e.addEventListener("keydown",h,true),t.appendChild(l);let y=d.getBoundingClientRect();return a={width:y.width,height:y.height},f(),T?.observe(d),l.focus(),{el:l,close:k}}function vy(e,t,n,o){t.querySelector(".pptxv-rehearse")?.remove();let r=chunkR2NUNRIB_cjs.Ok(e,"aside","pptxv-rehearse");r.setAttribute("aria-label",n("pptx.rehearse.summaryTitle"));let i=chunkR2NUNRIB_cjs.Ok(e,"span"),a=chunkR2NUNRIB_cjs.Ok(e,"strong"),s=chunkR2NUNRIB_cjs.Ok(e,"span"),p={},l=performance.now(),d=l,u=0,m=0,g=false,x=E=>new Date(Math.max(0,E)).toISOString().slice(14,19),v=(E,T)=>{let k=chunkR2NUNRIB_cjs.Ok(e,"button");return k.type="button",k.textContent=E,k.addEventListener("click",T),r.appendChild(k),k},f=v(n("pptx.rehearse.pause"),()=>{if(g=!g,g)u=performance.now();else {let E=performance.now()-u;m+=E,l+=E,d+=E;}f.textContent=n(g?"pptx.rehearse.resume":"pptx.rehearse.pause");}),b=()=>{p[o.currentSlide()]=Math.max(250,performance.now()-l-m),m=0;};v(n("pptx.presenter.next"),()=>{if(g)return;b();let E=o.currentSlide()+1;E<o.slideCount&&(o.navigate(E),l=performance.now());}),v(n("pptx.rehearse.saveTimings"),()=>{b(),o.onSave(p),r.remove();}),v(n("pptx.rehearse.discard"),()=>r.remove()),r.prepend(i,a,s);let h=window.setInterval(()=>{if(g)return;let E=performance.now();i.textContent=`${n("pptx.rehearse.slide")} ${o.currentSlide()+1}/${o.slideCount}`,a.textContent=`${n("pptx.rehearse.slideTime")}: ${x(E-l)}`,s.textContent=`${n("pptx.rehearse.totalTime")}: ${x(E-d)}`;},250),S=new MutationObserver(()=>{r.isConnected||(clearInterval(h),S.disconnect());});S.observe(t,{childList:true}),t.appendChild(r);}function gs(e){return new Date(Number.isFinite(e)?e:0).toISOString()}function KE(e,t){let n=e.messages.map(o=>{let r=[],i=[];for(let a of chunkR2NUNRIB_cjs.fl(o)){if(a.kind==="text"){r.push(a.text);continue}i.push({toolName:a.toolName,toolCallId:a.toolCallId,state:a.state,input:t?a.input:void 0,output:t?a.output:void 0,errorText:a.errorText});}return {role:o.role,text:r.join(`
|