pptx-vanilla-viewer 3.14.0 → 3.16.0
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 +27 -0
- package/dist/{ai-panel-UVRFJV5W.js → ai-panel-F3MQVFQM.js} +1 -1
- package/dist/{ai-panel-R4CFN6XG.cjs → ai-panel-PK5HFITC.cjs} +1 -1
- package/dist/{chunk-OBVLNSK5.cjs → chunk-6TALMZ42.cjs} +26 -26
- package/dist/{chunk-HNPNPPFD.js → chunk-ACEQOODH.js} +1075 -433
- package/dist/chunk-LQYP7D76.cjs +4 -0
- package/dist/{chunk-EH7OHOZA.js → chunk-MEXZKL2Q.js} +26 -26
- package/dist/chunk-VFHGFYEN.js +4 -0
- package/dist/{chunk-24B6ZCFG.cjs → chunk-WKWWFY2C.cjs} +1075 -433
- package/dist/i18n/de.cjs +3 -0
- package/dist/i18n/de.mjs +3 -0
- package/dist/i18n/es.cjs +3 -0
- package/dist/i18n/es.mjs +3 -0
- package/dist/i18n/fr.cjs +3 -0
- package/dist/i18n/fr.mjs +3 -0
- package/dist/i18n/zh-CN.cjs +3 -0
- package/dist/i18n/zh-CN.mjs +3 -0
- package/dist/index.cjs +66 -102
- package/dist/index.d.ts +7 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -102
- package/dist/internals.cjs +1 -1
- package/dist/internals.d.ts +1 -1
- package/dist/internals.js +1 -1
- package/dist/styles.css +475 -38
- package/dist/{transition-overlay-C7hI62N0.d.ts → transition-overlay-f0pbzLt7.d.ts} +963 -901
- package/dist/{transition-overlay-C7hI62N0.d.ts.map → transition-overlay-f0pbzLt7.d.ts.map} +1 -1
- package/package.json +2 -2
- package/dist/chunk-W4OVIZLY.js +0 -4
- package/dist/chunk-WBPOPJLC.cjs +0 -4
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict';var chunkWBPOPJLC_cjs=require('./chunk-WBPOPJLC.cjs'),chunkOBVLNSK5_cjs=require('./chunk-OBVLNSK5.cjs'),chunk24B6ZCFG_cjs=require('./chunk-24B6ZCFG.cjs');require('./chunk-B5PFHICE.cjs');var lucide=require('lucide');function ns(e){let{store:t,editor:n}=e,o=(s,a)=>{let l=s(structuredClone(t.get().slides));e.ensureEditable(),n.commitSlides(l,t.get().currentSlide);},r=()=>{let s=t.get();return {slides:s.slides,width:s.canvasSize.width,height:s.canvasSize.height,theme:s.colorScheme?{colorScheme:s.colorScheme}:void 0,sections:s.sections,presentationProperties:s.presentationProperties,customProperties:s.customProperties,coreProperties:s.coreProperties,appProperties:s.appProperties,viewProperties:s.viewProperties,tableStyleMap:s.tableStyleMap,tableStylesDefaultId:s.tableStylesDefaultId,tags:s.tagCollections}},i=chunkOBVLNSK5_cjs.b;return {getDeckMeta(){let s=t.get();return {slideCount:s.slides.length,activeSlideIndex:s.currentSlide,title:mI(s.slides),width:s.canvasSize.width,height:s.canvasSize.height}},getSlides:()=>t.get().slides,getActiveSlideIndex:()=>t.get().currentSlide,getTheme(){let{colorScheme:s}=t.get();return s?{colorScheme:s}:void 0},getHandler:()=>e.getHandler()??void 0,goToSlide:s=>e.goToSlide(s),selectElements(s,a){e.goToSlide(s),n.selectElements(a);},applySlidesUpdate:o,updateElement(s,a,l){o(p=>{let d=p[s]?.elements.find(u=>u.id===a);return d&&chunkOBVLNSK5_cjs.p(d,l),p});},applyTheme:s=>e.applyThemeUpdates(s),getDeckData:()=>r(),applyDeckData(s,a){let l=r(),p=s(structuredClone(l));e.ensureEditable(),i(l.slides,p.slides)&&n.commitSlides(p.slides,t.get().currentSlide),(l.width!==p.width||l.height!==p.height)&&n.getEditActions().updateCanvasSize({width:p.width,height:p.height});let d=p.sections??l.sections??[];i(l.sections,d)&&n.updateSections(d);let u=p.presentationProperties??l.presentationProperties??{};i(l.presentationProperties,u)&&n.updatePresentationProperties(u);let m=p.coreProperties??l.coreProperties,g=p.appProperties??l.appProperties,x=p.customProperties??l.customProperties??[];(i(l.coreProperties,m)||i(l.appProperties,g)||i(l.customProperties,x))&&n.updateDocumentProperties(m??{},g??{},x),i(l.viewProperties,p.viewProperties)&&t.set({viewProperties:p.viewProperties}),i(l.tableStyleMap,p.tableStyleMap)&&n.getEditActions().updateTableStyleMap(p.tableStyleMap??{}),i(l.tableStylesDefaultId,p.tableStylesDefaultId)&&t.set({tableStylesDefaultId:p.tableStylesDefaultId});let b=p.tags??l.tags??[];i(l.tags,b)&&n.getEditActions().updateTagCollections(b);},getFocusedTargets:e.getFocusedTargets?()=>e.getFocusedTargets?.()??[]:void 0,notify:e.notify}}function mI(e){for(let t of e[0]?.elements??[])if(t.type==="text"&&t.text?.trim())return t.text.trim().slice(0,120)}var uI=2600;function xI(e,t){return `Review and fix any issues with this ${e.type} (id=${e.id}) on slide ${t+1}.`}function rs(e){let{store:t}=e,n=new Set,o=null,r=[],i=false,s=null,a=false,l=null,p={text:"",nonce:0},d=()=>{for(let x of n)x();},u=()=>{let x=t.get();return chunkOBVLNSK5_cjs.i({activeSlideIndex:x.currentSlide,selectedElementIds:x.selectedElementIds,selectedElementId:x.selectedElementId})},m=()=>r.length>0,g=t.subscribe((x,b)=>{(x.currentSlide!==b.currentSlide||x.selectedElementId!==b.selectedElementId||x.selectedElementIds!==b.selectedElementIds)&&d();});return {subscribe(x){return n.add(x),()=>n.delete(x)},getLiveTargets:u,getEffectiveTargets(){return m()?r:o&&o.length>0?o:u()},isPinned:()=>!m()&&o!==null,hasPicks:m,pinFocus(){o=u(),d();},clearPinnedFocus(){o=null,d();},isPicking:()=>i,startPicking(){i=true,e.requestOpen(),d();},stopPicking(){i=false,d();},addPick(x,b){r.some(v=>v.kind==="element"&&v.elementId===b)||(r=[...r,{kind:"element",slideIndex:x,elementId:b}],d());},clearPicks(){r=[],i=false,d();},getHighlights(){let x=[];for(let b of r)b.kind==="element"&&x.push({slideIndex:b.slideIndex,elementId:b.elementId,variant:"pick"});if(s)for(let b of s.elementIds)x.push({slideIndex:s.slideIndex,elementId:b,variant:"active"});return x},isAnimating:()=>a||r.length>0,flashToolTarget(x){s=x&&x.slideIndex!==void 0&&x.elementIds.length>0?{slideIndex:x.slideIndex,elementIds:x.elementIds}:null,a=true,l&&clearTimeout(l),l=setTimeout(()=>{s=null,a=false,l=null,d();},uI),d();},getPrefill:()=>p,askAboutSelection(){o=u(),p={text:"",nonce:p.nonce+1},e.requestOpen(),d();},fixElement(x,b){o=u(),p={text:x?xI(x,b):"",nonce:p.nonce+1},e.requestOpen(),d();},dispose(){l&&clearTimeout(l),g(),n.clear();}}}function H(e,t){let n=chunkOBVLNSK5_cjs.w(e,"button",`pptxv-btn${t.className?` ${t.className}`:""}`);if(n.type="button",n.title=t.label,n.setAttribute("aria-label",t.label),t.icon?n.appendChild(chunkOBVLNSK5_cjs.K(e,t.icon)):t.text!==void 0&&(n.classList.add("pptxv-btn-text"),n.textContent=t.text),t.textLabel!==void 0){n.classList.add("pptxv-btn-pill");let o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-btn-label");o.textContent=t.textLabel,n.appendChild(o);}return n.addEventListener("click",t.onClick),{btn:n,setActive(o){n.classList.toggle("is-active",o),n.setAttribute("aria-pressed",String(o));},setDisabled(o){n.disabled=o;}}}function gI(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function He(e,t,n="#000000"){let o=chunkOBVLNSK5_cjs.w(e,"label","pptxv-color");o.title=t.label,o.setAttribute("aria-label",t.label);let r=e.createElement("input");return r.type="color",r.className="pptxv-color-input",r.value=n,r.setAttribute("aria-label",t.label),r.addEventListener("input",()=>t.onInput(r.value)),t.onCommit&&r.addEventListener("change",()=>t.onCommit?.(r.value)),o.appendChild(r),{el:o,setValue(i){r.value=gI(i,n);},setDisabled(i){r.disabled=i,o.classList.toggle("is-disabled",i);}}}function re(e,t){let n=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field"),o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=e.createElement("input");r.type="number",r.className="pptxv-field-input",r.setAttribute("aria-label",t.label),t.min!==void 0&&(r.min=String(t.min)),t.max!==void 0&&(r.max=String(t.max)),r.step=String(t.step??1),n.appendChild(r);let i=Number.NaN,s=()=>{let a=Number.parseFloat(r.value);!Number.isFinite(a)||a===i||(i=a,t.onCommit(a));};return r.addEventListener("change",s),r.addEventListener("keydown",a=>{a.stopPropagation(),a.key==="Enter"&&s();}),{el:n,input:r,setValue(a){let l=Math.round(a*100)/100;i=l,e.activeElement!==r&&(r.value=String(l));},setDisabled(a){r.disabled=a;}}}function qC(e,t,n){let o=chunkOBVLNSK5_cjs.e(e,t,n);return {position:o.position,left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`,opacity:String(o.opacity),transform:o.transform,transition:o.transition,"box-shadow":o.boxShadow,border:o.border,"border-radius":o.borderRadius,"pointer-events":o.pointerEvents,"z-index":String(o.zIndex)}}function bI(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n);if(o.length===0)return null;let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ai-change-layer");r.setAttribute("data-export-ignore","true");for(let i of o){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ai-change-ghost",qC(i,"start",t.config));s.setAttribute("data-ai-change",i.kind),s.setAttribute("data-export-ignore","true"),r.appendChild(s);}return r}function fI(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n),r=e.children;for(let i=0;i<r.length&&i<o.length;i+=1){let s=r[i],a=qC(o[i],"end",t.config);for(let[l,p]of Object.entries(a))s.style.setProperty(l,String(p));}}function jC(e){let{doc:t,store:n,animator:o}=e,r=null,i=null,s=o.current(),a=0,l=0,p=()=>{a&&(cancelAnimationFrame(a),a=0),l&&(cancelAnimationFrame(l),l=0);},d=x=>{s&&((!i||!i.isConnected)&&(i=chunkOBVLNSK5_cjs.w(t,"style","pptxv-ai-change-css"),(x??t.head).appendChild(i)),i.textContent=chunkOBVLNSK5_cjs.d(s.config));},u=()=>{if(p(),r?.remove(),r=null,!s)return;let x=e.getStageRoot();if(!x)return;d(x.parentElement);let b=n.get().currentSlide,v=bI(t,s,b);if(!v)return;x.appendChild(v),r=v;let f=s;a=requestAnimationFrame(()=>{l=requestAnimationFrame(()=>{r&&fI(r,f,b);});});},m=n.subscribe(u),g=o.subscribe(x=>{s=x,x&&e.goToSlide(x.slideIndex),u();});return u(),{destroy(){p(),m(),g(),r?.remove(),r=null,i?.remove(),i=null;}}}function YC(e){let{doc:t,t:n,store:o,controller:r,viewport:i}=e,s=null,a=()=>{s?.remove(),s=null;},l=u=>{let m=o.get().currentSlide,g=o.get().slides[m]?.elements.find(x=>x.id===u)??null;return o.set({selectedElementId:u,selectedElementIds:[u]}),g},p=(u,m,g)=>{let x=chunkOBVLNSK5_cjs.w(t,"button","pptxv-ai-menu-item");return x.type="button",x.append(chunkOBVLNSK5_cjs.K(t,u),t.createTextNode(m)),x.addEventListener("click",()=>{g(),a();}),x},d=u=>{let m=o.get();if(m.editable&&!m.presenting)return;let g=chunk24B6ZCFG_cjs.Hm(u.target,e.getStageRoot());if(!g)return;u.preventDefault(),a();let x=l(g),b=o.get().currentSlide;s=chunkOBVLNSK5_cjs.w(t,"div","pptxv-ai-menu",{left:`${u.clientX}px`,top:`${u.clientY}px`}),s.setAttribute("role","menu"),s.append(p("sparkles",n("pptx.ai.askAboutElement"),()=>r.askAboutSelection()),p("wrench",n("pptx.ai.fixElement"),()=>r.fixElement(x,b))),t.body.appendChild(s);let v=f=>{f instanceof KeyboardEvent&&f.key!=="Escape"||f.target instanceof Node&&s?.contains(f.target)||(a(),t.removeEventListener("pointerdown",v,true),t.removeEventListener("keydown",v,true));};t.addEventListener("pointerdown",v,true),t.addEventListener("keydown",v,true);};return i.addEventListener("contextmenu",d),{destroy(){i.removeEventListener("contextmenu",d),a();}}}function XC(e){let{doc:t,store:n,controller:o}=e,r=null,i=()=>{r?.remove(),r=null;let l=e.getStageRoot();if(!l)return;o.isAnimating()?l.setAttribute("data-pptx-ai-active","true"):l.removeAttribute("data-pptx-ai-active");let p=n.get(),d=o.getHighlights().filter(x=>x.slideIndex===p.currentSlide);if(d.length===0)return;let u=p.slides[p.currentSlide]?.elements??[],m=new Map(u.map(x=>[x.id,x])),g=chunkOBVLNSK5_cjs.w(t,"div","pptxv-ai-hl-layer");for(let x of d){let b=m.get(x.elementId);if(!b)continue;let v=chunkOBVLNSK5_cjs.w(t,"div",`pptxv-ai-hl pptxv-ai-hl-${x.variant}`,{left:`${b.x-3}px`,top:`${b.y-3}px`,width:`${b.width+6}px`,height:`${b.height+6}px`});g.appendChild(v);}l.appendChild(g),r=g;},s=n.subscribe(i),a=o.subscribe(i);return i(),{destroy(){s(),a(),r?.remove(),r=null,e.getStageRoot()?.removeAttribute("data-pptx-ai-active");}}}function QC(e){let{viewport:t,store:n,controller:o}=e,r=i=>{if(!o.isPicking()||i.button!==0)return;let s=chunk24B6ZCFG_cjs.Hm(i.target,e.getStageRoot());s&&(i.preventDefault(),i.stopImmediatePropagation(),o.addPick(n.get().currentSlide,s));};return t.addEventListener("pointerdown",r,true),{destroy(){t.removeEventListener("pointerdown",r,true);}}}function vI(e){return e.stageWrap.querySelector(".pptxv-stage")}function is(e){let{doc:t,chrome:n,t:o,controller:r}=e,i=()=>vI(n),s=[],a=(f,S)=>{let y=H(t,{label:o("pptx.toolbar.toggleAiAssistant"),icon:"sparkles",className:S,onClick:()=>{v(!x);}});y.btn.setAttribute("aria-expanded","false"),f.appendChild(y.btn),s.push(y);};a(n.titleBar?.el??n.root,n.titleBar?"pptxv-titlebar-btn pptxv-ai-toggle":"pptxv-ai-toggle-floating"),n.mobileToolbar&&a(n.mobileToolbar.aiHost,"pptxv-mobile-toolbar-btn pptxv-ai-toggle");let l=chunkOBVLNSK5_cjs.w(t,"aside","pptxv-ai-panel");l.setAttribute("data-pptx-ai-panel",""),l.setAttribute("aria-label",o("pptx.ai.title")),l.hidden=true,(n.viewport.parentElement??n.root).appendChild(l);let p=XC({doc:t,store:e.store,controller:r,getStageRoot:i}),d=QC({viewport:n.viewport,store:e.store,controller:r,getStageRoot:i}),u=YC({doc:t,t:o,store:e.store,controller:r,viewport:n.viewport,getStageRoot:i}),m=null,g=null,x=false,b=false,v=async f=>{x=f,l.hidden=!x;for(let S of s)S.setActive(x),S.btn.setAttribute("aria-expanded",String(x));if(!(!x||m||b)){b=true,l.classList.add("is-loading");try{let{createAiPanel:S}=await import('./ai-panel-R4CFN6XG.cjs');m=await S({host:l,doc:t,t:o,bridge:e.bridge,config:e.config,controller:r,goToSlide:e.goToSlide,onClose:()=>{v(!1);}}),m.changeAnimator&&(g=jC({doc:t,store:e.store,animator:m.changeAnimator,getStageRoot:i,goToSlide:e.goToSlide}));}finally{b=false,l.classList.remove("is-loading");}}};return {open(){v(true);},destroy(){g?.destroy(),g=null,m?.destroy(),m=null,u.destroy(),d.destroy(),p.destroy(),r.dispose();for(let f of s)f.btn.remove();l.remove();}}}function Rr(e){let t=new Map;return new Proxy({},{get(n,o){if(typeof o!="string")return;let r=t.get(o);return r||(r=(...i)=>e()[o](...i),t.set(o,r)),r}})}function ZC(e){return {ribbonHandlers:{nav:{prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>e.togglePresentation(),normalView:()=>e.returnToNormalView(),toggleNotes:()=>e.toggleNotes(),openAccessibility:()=>e.openAccessibility(),openSettings:o=>e.openSettings(o),getCustomization:e.getCustomization,openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterView:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.toggleInspector(),clearSelection:()=>e.clearSelection(),toggleViewOption:o=>e.getEditActions().toggleViewOption(o),addGuide:o=>e.getEditActions().addGuide(o),activateEyedropper:()=>e.getEditActions().activateEyedropper(),toggleSpellCheck:()=>e.getEditActions().toggleSpellCheck()},primary:{undo:()=>e.undo(),redo:()=>e.redo(),save:()=>e.save()},file:{openFile:()=>e.openFile(),openRecentFile:o=>e.openRecentFile(o),createPresentation:o=>e.createPresentation(o),openSettings:()=>e.openSettings("general"),getCustomization:e.getCustomization,openShare:()=>e.openShare(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),save:()=>e.save(),saveAsPpsx:()=>{e.downloadAs("ppsx");},saveAsPptm:()=>{e.downloadAs("pptm");},saveAsPpt:()=>{e.downloadAs("ppt");},exportPng:()=>{e.exportSlidePng();},copySlideAsImage:()=>{e.copySlideAsImage();},exportPdf:()=>{e.exportPdf();},exportGif:()=>{e.exportGif();},exportVideo:()=>{e.exportVideo();},exportJson:()=>e.exportJson(),print:()=>{e.print();}},slideShow:{startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openSetUp:()=>e.openSetUpSlideShow(),toggleHideSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),openCustomShows:()=>e.openCustomShows(),toggleSubtitles:()=>e.toggleSubtitles(),openSubtitleSettings:()=>e.openSetUpSlideShow(),showOptions:()=>e.presentationProperties(),updateShowOptions:o=>e.getEditActions().updatePresentationSettings(o)},edit:Rr(()=>e.getEditActions()),insert:{insert:(o,r)=>e.getEditActions().insert(o,r),insertImage:()=>e.getEditActions().insertImage(),insertMedia:()=>e.getEditActions().insertMedia(),insertChart:o=>e.getEditActions().insertChart(o),insertSmartArt:(o,r)=>e.getEditActions().insertSmartArt(o,r),insertEquation:o=>e.getEditActions().insertEquation(o),insertActionButton:o=>e.getEditActions().insertActionButton(o),insertField:(o,r)=>e.getEditActions().insertField(o,r),armFreeformTool:o=>e.armFreeformTool?.(o),visibleDrawingTools:()=>chunk24B6ZCFG_cjs.Ls.filter(o=>chunk24B6ZCFG_cjs.fr(e.getCustomization?.()??chunk24B6ZCFG_cjs.$q,o))},findReplace:Rr(()=>e.getFindReplaceActions()),design:{applyPresentationTheme:o=>e.applyPresentationTheme(o),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o)},transitions:{readDraft:()=>e.readTransitionDraft(),applyDraft:(o,r)=>e.getEditActions().applyTransitionDraft(o,r),readTransition:()=>e.readTransition(),applyChange:o=>e.getEditActions().applyTransitionChange(o)},draw:{setTool:o=>e.setDrawTool(o),setColor:o=>e.setDrawColor(o),setWidth:o=>e.setDrawWidth(o)}},inspectorHandlers:{selectElement:o=>e.selectElement(o),openDocumentProperties:()=>e.openDocumentProperties(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),updatePresentationSettings:o=>e.getEditActions().updatePresentationSettings(o),applyThemeByPath:(o,r)=>e.getEditActions().applyThemeByPath(o,r),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o),updateTagCollections:o=>e.getEditActions().updateTagCollections(o),updateActiveSlide:o=>e.getEditActions().updateActiveSlide(o),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),updateTableStyleMap:o=>e.getEditActions().updateTableStyleMap(o),deleteTableStyle:o=>e.getEditActions().deleteTableStyle(o),setTemplateBackground:(o,r)=>e.getEditActions().setTemplateBackground(o,r),getTemplateBackgroundColor:o=>e.getEditActions().getTemplateBackgroundColor(o),updateCanvasSize:o=>e.getEditActions().updateCanvasSize(o),updateSlideSize:o=>e.getEditActions().updateSlideSize(o),applySlideSizeRescale:(o,r)=>e.getEditActions().applySlideSizeRescale(o,r),addComment:(o,r)=>{e.getEditActions().comments.addComment(o,void 0,r);},addCommentReply:(o,r,i)=>{e.getEditActions().comments.addCommentReply(o,r,i);},editComment:(o,r)=>e.getEditActions().comments.editComment(o,r),deleteComment:o=>e.getEditActions().comments.deleteComment(o),toggleCommentResolved:o=>e.getEditActions().comments.toggleCommentResolved(o),setAnimationEffect:(o,r)=>e.getEditActions().setAnimationEffect(o,r),applyMotionPath:o=>e.getEditActions().applyMotionPath(o),setAnimationTiming:(o,r)=>e.getEditActions().setAnimationTiming(o,r),setAnimationSound:(o,r)=>e.getEditActions().setAnimationSound(o,r),setAnimationStockSound:(o,r)=>e.getEditActions().setAnimationStockSound(o,r),reorderAnimation:(o,r)=>e.getEditActions().reorderAnimation(o,r),setGeometry:o=>e.getEditActions().setGeometry(o),toggleElementLock:()=>e.getEditActions().toggleElementLock(),setShapeFill:(o,r)=>e.getEditActions().setShapeFill(o,r),setShapeStroke:(o,r)=>e.getEditActions().setShapeStroke(o,r),setShapeStrokeWidth:o=>e.getEditActions().setShapeStrokeWidth(o),setShapeStyle:o=>e.getEditActions().setShapeStyle(o),setShapeType:o=>e.getEditActions().setShapeType(o),pushRecentColor:o=>e.getEditActions().pushRecentColor(o),setTextVerticalAlign:o=>e.getEditActions().setTextVerticalAlign(o),setTextWrap:o=>e.getEditActions().setTextWrap(o),setAutoFitMode:o=>e.getEditActions().setAutoFitMode(o),setTextAdvanced:o=>e.getEditActions().setTextAdvanced(o),setTextStyle:(o,r)=>e.getEditActions().setTextStyle(o,r),setFillOpacity:o=>e.getEditActions().setFillOpacity(o),setStrokeOpacity:o=>e.getEditActions().setStrokeOpacity(o),setGradientFill:o=>e.getEditActions().setGradientFill(o),addGradientStop:(o,r)=>e.getEditActions().addGradientStop(o,r),removeGradientStop:o=>e.getEditActions().removeGradientStop(o),updateGradientStop:(o,r)=>e.getEditActions().updateGradientStop(o,r),setImageBrightness:o=>e.getEditActions().setImageBrightness(o),setImageContrast:o=>e.getEditActions().setImageContrast(o),setImageSaturation:o=>e.getEditActions().setImageSaturation(o),setImageCrop:(o,r)=>e.getEditActions().setImageCrop(o,r),setImageEffects:o=>e.getEditActions().setImageEffects(o),replaceImage:()=>{e.getEditActions().replaceSelectedImage();},resetImage:()=>e.getEditActions().resetSelectedImage(),setElementAction:(o,r)=>e.getEditActions().setElementAction(o,r),setAltText:o=>e.getEditActions().setAltText(o),setTitle:o=>e.getEditActions().setTitle(o),setOleName:o=>e.getEditActions().setOleName(o),setOleContent:o=>e.getEditActions().setOleContent(o),setChartData:o=>e.getEditActions().setChartData(o),setMediaProperties:o=>e.getEditActions().setMediaProperties(o),setTableHeaderRow:o=>e.getEditActions().setTableHeaderRow(o),setTableBandedRows:o=>e.getEditActions().setTableBandedRows(o),setTableCellPadding:o=>e.getEditActions().setTableCellPadding(o),setTableOptions:(o,r)=>e.getEditActions().setTableOptions(o,r),setTableData:(o,r)=>e.getEditActions().setTableData(o,r),setTableCellStyle:(o,r,i)=>e.getEditActions().setTableCellStyle(o,r,i),setTableCellStyles:(o,r)=>e.getEditActions().setTableCellStyles(o,r),mutateTableStructure:(o,r)=>e.getEditActions().mutateTableStructure(o,r),setTableColumnWidth:(o,r)=>e.getEditActions().setTableColumnWidth(o,r),setTableRowHeight:(o,r)=>e.getEditActions().setTableRowHeight(o,r),mergeTableCells:o=>e.getEditActions().mergeTableCells(o),splitTableCell:o=>e.getEditActions().splitTableCell(o),setSmartArtNodeText:(o,r)=>e.getEditActions().setSmartArtNodeText(o,r),setSmartArtNodeStyle:(o,r)=>e.getEditActions().setSmartArtNodeStyle(o,r),mutateSmartArtNode:(o,r)=>e.getEditActions().mutateSmartArtNode(o,r),replaceSmartArtData:o=>e.getEditActions().replaceSmartArtData(o),setSmartArtLayout:o=>e.getEditActions().setSmartArtLayout(o),setSmartArtColorScheme:o=>e.getEditActions().setSmartArtColorScheme(o)},onSelectSlide:o=>e.goToSlide(o),onToggleNotes:()=>e.toggleNotes(),onCommitNotes:(o,r)=>e.commitNotes(o,r)}}function JC(e){return {showTitleBar:chunk24B6ZCFG_cjs.br(e,"titleBar"),showStatusBar:chunk24B6ZCFG_cjs.br(e,"statusBar"),showNotes:chunk24B6ZCFG_cjs.br(e,"notes")}}function ew(e,t){let n=e.visible&&chunk24B6ZCFG_cjs.br(t,"quickAccessToolbar"),o=chunk24B6ZCFG_cjs.dr(t,"print")?e.commandIds:e.commandIds.filter(r=>r!=="print");return {...e,visible:n,commandIds:o}}function tw(e){let t=chunk24B6ZCFG_cjs.gr(e.customization),n=null,o=e,r=null,i=()=>{let a=t.getResolved();return n!==a&&(n=a,o={...e,hiddenActions:chunk24B6ZCFG_cjs.ar(a,e.hiddenActions),showThumbnails:(e.showThumbnails??true)&&chunk24B6ZCFG_cjs.br(a,"slidesPane"),showInspector:(e.showInspector??true)&&chunk24B6ZCFG_cjs.br(a,"inspector")}),o},s=a=>{let l=t.getResolved();a.setConstraints({locked:l.lockedSettings,defaults:l.defaultSettings});};return {controller:t,getResolved:()=>t.getResolved(),getChromeOptions:i,isAiEnabled:()=>e.ai!==void 0&&chunk24B6ZCFG_cjs.cr(t.getResolved(),"ai"),isDialogAvailable:a=>chunk24B6ZCFG_cjs.dr(t.getResolved(),a),bind(a,l){r?.(),s(a),r=t.subscribe(()=>{s(a),l();});},destroy(){r?.(),r=null;}}}function ow(e){return {goToSlide:t=>e.goToSlide(t),move:t=>t>0?e.next():e.prev(),endShow:()=>e.exitPresentation(),confirmUrl:t=>e.confirmExternalHyperlink?.(t)??true,lastViewed:()=>{let t=e.getPreviousPresentedSlide();t!==null&&e.goToSlide(t);},customShow:(t,n)=>e.customShowRunner.customShow(t,n),openFile:t=>{chunk24B6ZCFG_cjs.ad(t);},openPresentation:t=>{chunk24B6ZCFG_cjs.ad(t);},playMedia:t=>{chunk24B6ZCFG_cjs.Od(e.getStageRoot(),t);},oleVerb:(t,n)=>{let o=chunk24B6ZCFG_cjs.Ep(e.getCurrentSlide(),n,t);o&&(o.action==="download"?chunk24B6ZCFG_cjs.nt(o.url,o.fileName??"download"):chunk24B6ZCFG_cjs.ot(o.url));},runProgram:t=>{e.addRunProgramNotice(chunk24B6ZCFG_cjs.gs(t));}}}function as(e){return e.presenting&&e.animationBuildsComplete&&!chunk24B6ZCFG_cjs.bd(e.currentSlide)}function nw(e){return hI(e.target,e.currentSlide),chunk24B6ZCFG_cjs.ed(e.target,e.currentSlide,{slideCount:e.slideCount},e.runner)!=="advance"?false:!as(e)}function hI(e,t){let n=chunk24B6ZCFG_cjs.ff(e,t);if(!n?.descriptor.click)return;let{element:o}=n,{style:r,clearStyle:i,durationMs:s}=n.descriptor.click;chunk24B6ZCFG_cjs.ef(o,r),!(typeof setTimeout>"u")&&setTimeout(()=>{chunk24B6ZCFG_cjs.ef(o,i);},s);}function yI(e){if(!(!e.presenting||e.endOfShow))return chunk24B6ZCFG_cjs.cd(e.slides[e.currentSlide],{useTimings:e.presentationProperties.advanceMode!=="manual"})}function rw(e){let t=e.setTimer??((d,u)=>setTimeout(d,u)),n=e.clearTimer??(d=>clearTimeout(d)),o,r=()=>{o!==void 0&&(n(o),o=void 0);},i=()=>{r();let d=yI(e.getState());d!==void 0&&(o=t(()=>{o=void 0;let u=e.getState().currentSlide;e.next(),e.getState().currentSlide===u&&i();},d));},s=()=>{let d=e.getState();return [d.presenting,d.endOfShow,d.currentSlide,d.presentationProperties.advanceMode??"",d.slides[d.currentSlide]?.transition?.advanceAfterMs??""].join("|")},a="",l=()=>{let d=s();d!==a&&(a=d,i());},p=e.subscribe(l);return l(),{cancel:r,rearm:i,detach:()=>{r(),p();}}}function iw(e){let t,n=false,o=()=>{let i=e.getPresenting();if(i!==n){if(n=i,i){t=chunk24B6ZCFG_cjs.Qn({root:e.root,onHidden:e.cancelAutoAdvance,onVisible:e.rearmAutoAdvance});return}t?.(),t=void 0,chunk24B6ZCFG_cjs.Pn();}},r=e.subscribe(o);return o(),()=>{r(),t?.(),t=void 0,n&&(n=false,chunk24B6ZCFG_cjs.Pn());}}function aw(e,t){let n=null,o=e.subscribe((r,i)=>{if(r.endOfShow&&!i.endOfShow&&n){let s=n;n=null,e.set({activeCustomShowId:s.showId,endOfShow:false}),t(s.index);return}i.presenting&&!r.presenting&&(n=null);});return {customShow(r,i){let s=e.get(),a=s.customShows.find(u=>u.id===r);if(!a)return;i&&(n={index:s.currentSlide,showId:s.activeCustomShowId});let l=chunk24B6ZCFG_cjs.Lp(s.presentationProperties,s.slides.length),p=chunk24B6ZCFG_cjs.Fp(s.slides,a,l);e.set({activeCustomShowId:r});let d=chunk24B6ZCFG_cjs.Mp(p);d!==void 0&&t(d);},dispose:o}}function Ro(e,t,n){for(let r of n)e.style.removeProperty(r);let o=chunk24B6ZCFG_cjs.Ea(t);for(let[r,i]of Object.entries(o))e.style.setProperty(r,i);return Object.keys(o)}function ss(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"section","pptxv-accessibility-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","false"),o.setAttribute("aria-label",t("pptx.accessibility.title"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-accessibility-header"),i=chunkOBVLNSK5_cjs.w(e,"h2","pptxv-accessibility-title");i.textContent=t("pptx.accessibility.title");let s=chunkOBVLNSK5_cjs.w(e,"button","pptxv-accessibility-close");s.type="button",s.textContent=t("pptx.accessibility.close"),s.setAttribute("aria-label",t("pptx.accessibility.closePanel")),r.append(i,s),o.appendChild(r);let a=chunkOBVLNSK5_cjs.w(e,"p","pptxv-accessibility-summary");o.appendChild(a);let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-accessibility-list");l.setAttribute("role","list"),l.setAttribute("aria-label",t("pptx.accessibility.issuesList")),o.appendChild(l);let p=()=>{o.hidden=true;};s.addEventListener("click",p);let d=u=>{let m=chunkOBVLNSK5_cjs.w(e,"section",`pptxv-accessibility-group is-${u.severity}`),g=chunkOBVLNSK5_cjs.w(e,"h3","pptxv-accessibility-group-title");g.textContent=`${u.label} (${u.issues.length})`,m.appendChild(g);for(let[x,b]of u.issues.entries()){let v=chunkOBVLNSK5_cjs.w(e,"button","pptxv-accessibility-issue");v.type="button",v.setAttribute("role","listitem"),v.dataset.issueKey=chunk24B6ZCFG_cjs.sm(b,x);let f=chunkOBVLNSK5_cjs.w(e,"strong","pptxv-accessibility-issue-type");f.textContent=chunk24B6ZCFG_cjs.rm(b.type,h=>t(h));let S=chunkOBVLNSK5_cjs.w(e,"span","pptxv-accessibility-issue-message");S.textContent=b.message;let y=chunkOBVLNSK5_cjs.w(e,"span","pptxv-accessibility-issue-slide");y.textContent=t("pptx.notes.slideN",{n:b.slideIndex+1}),v.append(f,S,y),v.addEventListener("click",()=>n(b.slideIndex)),m.appendChild(v);}l.appendChild(m);};return {el:o,open(u){if(l.replaceChildren(),a.textContent=t("pptx.accessibility.issueCount",{count:u.length}),u.length===0){let m=chunkOBVLNSK5_cjs.w(e,"p","pptxv-accessibility-empty");m.textContent=t("pptx.accessibility.noIssuesFound"),l.appendChild(m);}else for(let m of chunk24B6ZCFG_cjs.qm(u,g=>t(g)))d(m);o.hidden=false,s.focus();},close:p}}var sw=5;function lw(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-compat-toasts");r.dataset.testid="pptx-compat-toasts",r.hidden=true,r.setAttribute("style",chunk24B6ZCFG_cjs.Lo());let i=0,s=0,a=()=>{r.setAttribute("style",chunk24B6ZCFG_cjs.Lo(i,s));};r.setAttribute("role","region"),r.setAttribute("aria-label",t("pptx.compatibility.toastTitle"));let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-compat-toasts-list"),p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-compat-toasts-overflow");p.hidden=true;let d=chunkOBVLNSK5_cjs.w(e,"button","pptxv-compat-toasts-dismiss-all");d.type="button",d.dataset.testid="pptx-compat-toasts-dismiss-all",d.textContent=t("pptx.compatibility.dismissAll"),d.addEventListener("click",o),r.append(l,p,d);function u(m){let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-compat-toast");g.dataset.testid="pptx-compat-toast",g.dataset.code=m.code,g.dataset.severity=m.severity,g.setAttribute("role","status"),g.appendChild(chunkOBVLNSK5_cjs.K(e,"alert"));let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-compat-toast-body"),b=chunkOBVLNSK5_cjs.w(e,"strong","pptxv-compat-toast-title");b.textContent=t("pptx.compatibility.toastTitle");let v=chunkOBVLNSK5_cjs.w(e,"span","pptxv-compat-toast-message");v.textContent=t(m.messageKey,m.params),x.append(b,v);let f=chunkOBVLNSK5_cjs.w(e,"button","pptxv-compat-toast-dismiss");return f.type="button",f.dataset.testid="pptx-compat-toast-dismiss",f.setAttribute("aria-label",t("pptx.compatibility.dismiss")),f.appendChild(chunkOBVLNSK5_cjs.K(e,"close")),f.addEventListener("click",()=>n(m.id)),g.append(x,f),g}return {el:r,setBottomInset(m){s=m,a();},update(m,g=0){r.hidden=m.length===0,i=g,a(),l.replaceChildren(...m.slice(0,sw).map(u));let x=m.length-sw;p.hidden=x<=0,x>0&&(p.textContent=`+${x}`);}}}function pw(e,t,n,o){let r=n(t("pptx.accessibility.heading"));r.setAttribute("data-pptx-inspector-section","alt-text");let i=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-accessibility-alt"),s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.elementAccessibility.altText");let a=e.createElement("textarea");a.rows=2,a.className="pptxv-accessibility-alt-input",a.placeholder=t("pptx.elementAccessibility.altTextPlaceholder"),a.setAttribute("aria-label",t("pptx.elementAccessibility.altText")),a.addEventListener("keydown",u=>u.stopPropagation()),a.addEventListener("change",()=>o.setAltText(a.value)),i.append(s,a),r.appendChild(i);let l=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-accessibility-title"),p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.elementAccessibility.title");let d=e.createElement("input");return d.type="text",d.className="pptxv-accessibility-title-input",d.placeholder=t("pptx.elementAccessibility.titlePlaceholder"),d.setAttribute("aria-label",t("pptx.elementAccessibility.title")),d.addEventListener("keydown",u=>u.stopPropagation()),d.addEventListener("change",()=>o.setTitle(d.value)),l.append(p,d),r.appendChild(l),{el:r,update(u){r.hidden=!u.hasSelection||!u.showAccessibilitySection,e.activeElement!==a&&(a.value=u.altText),e.activeElement!==d&&(d.value=u.title),a.disabled=!u.showAccessibilitySection,d.disabled=!u.showAccessibilitySection;}}}function Q(e){return e.createElement("pptx-ui-select")}function me(e){return e.createElement("pptx-ui-checkbox")}function he(e,t){let n=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-select"),o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=Q(e);r.className="pptxv-field-select-input",r.setAttribute("aria-label",t.label);for(let i of t.options){let s=e.createElement("option");s.value=i.value,s.textContent=i.label,r.appendChild(s);}return r.addEventListener("change",()=>t.onChange(r.value)),n.appendChild(r),{el:n,setValue(i){r.value=i;},setDisabled(i){r.disabled=i;}}}function oe(e,t){let n=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),o=me(e);o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>t.onChange(o.checked));let r=chunkOBVLNSK5_cjs.w(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 Fe(e,t){let n=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-range"),o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=chunkOBVLNSK5_cjs.w(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 s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-range-readout"),a=t.formatValue??(p=>String(p)),l=()=>{s.textContent=a(Number.parseFloat(i.value));};return i.addEventListener("input",()=>{l(),t.onInput?.(Number.parseFloat(i.value));}),i.addEventListener("change",()=>t.onCommit(Number.parseFloat(i.value))),r.append(i,s),n.appendChild(r),{el:n,setValue(p){e.activeElement!==i&&(i.value=String(p),l());},setDisabled(p){i.disabled=p;}}}function cw(e,t,n,o){let r=n(t("pptx.action.title")),i=dw(e,t,"click",o),s=dw(e,t,"hover",o);r.append(i.el,s.el);let a=1,l=[];return {el:r,setSlideCount(p){a=Math.max(1,p);},setCustomShows(p){l=p;},update(p){r.hidden=!p.hasSelection,i.update(p.actionClick,a,l),s.update(p.actionHover,a,l);}}}function dw(e,t,n,o){let r=e.createElement("fieldset");r.className="pptxv-action-fieldset";let i=e.createElement("legend");i.textContent=t(n==="click"?"pptx.action.onClick":"pptx.action.onHover");let s=Q(e);s.setAttribute("aria-label",t(n==="click"?"pptx.action.onClick":"pptx.action.onHover"));for(let y of chunk24B6ZCFG_cjs.wm){let h=e.createElement("option");h.value=y.value,h.textContent=t(y.labelKey),s.appendChild(h);}let a=e.createElement("input"),l=new Set(["url","openFile","openPresentation","runProgram"]),p=Q(e);p.dataset.testid="pptx-action-custom-show",p.setAttribute("aria-label",t("pptx.hyperlink.customShowLabel"));let d=e.createElement("option");d.value="",p.appendChild(d);let u=e.createElement("label");u.className="pptxv-action-return-row";let m=me(e);m.dataset.testid="pptx-action-custom-show-return",u.append(m,e.createTextNode(t("pptx.hyperlink.customShowReturn")));let g=1,x=[],b=y=>({url:l.has(y)?a.value:void 0,slideIndex:y==="slide"?chunk24B6ZCFG_cjs.ym(a.valueAsNumber,g):void 0,customShowId:y==="customShow"&&p.value||void 0,returnAfter:y==="customShow"?m.checked:void 0}),v=()=>{let y=s.value;o.setElementAction(n,{trigger:n,type:y,...b(y)});},f=()=>{let y=p.value;p.replaceChildren(d);for(let h of x){let C=e.createElement("option");C.value=h.id,C.textContent=h.name,p.appendChild(C);}p.value=x.some(h=>h.id===y)?y:"";},S=()=>{let y=s.value,h=y==="slide",C=y==="customShow";a.hidden=!(l.has(y)||h),a.type=h?"number":"url",a.placeholder=h?t("pptx.action.slideNumberPlaceholder"):"https://",h&&(a.min="1",a.max=String(Math.max(1,g)),a.step="1"),p.hidden=!C,u.hidden=!C;};return s.addEventListener("change",()=>{S();let y=s.value;chunk24B6ZCFG_cjs.xm(y,b(y))&&v();}),a.addEventListener("change",v),p.addEventListener("change",v),m.addEventListener("change",v),r.append(i,s,a,p,u),{el:r,update(y,h,C){g=Math.max(1,h),x=C,s.value=y?.type??"none",a.value=y?.type==="slide"?String((y.slideIndex??0)+1):y?.url??"",f(),p.value=y?.customShowId??"",m.checked=y?.returnAfter===true,S();}}}var Lt=null;function Mt(e,t=false){Oo(),!(typeof Audio>"u")&&(Lt=new Audio(e),Lt.loop=t,Lt.play().catch(()=>{}));}function Oo(){Lt&&(Lt.pause(),Lt.currentTime=0,Lt=null);}function ls(e){if(e instanceof Element)return e.closest("[data-element-id]")?.dataset.elementId}function mw(e,t){let n=null;e.addEventListener("click",o=>{let r=t.getController(),i=ls(o.target);if(!i||!r?.hasInteractiveSequence(i))return;let s=r.advanceInteractive(i);s&&(o.stopPropagation(),t.play(r,s));}),e.addEventListener("mouseover",o=>{let r=chunk24B6ZCFG_cjs.ff(o.target,t.getSlide()),i=r?.descriptor.hover?r.element:null;i!==n&&(n&&chunk24B6ZCFG_cjs.ef(n,chunk24B6ZCFG_cjs.df),n=i,i&&r?.descriptor.hover&&chunk24B6ZCFG_cjs.ef(i,r.descriptor.hover.enterStyle));let s=t.getController(),a=ls(o.target);if(!a||!s?.hasHoverSequence(a))return;s.resetHover(a);let l=s.advanceHover(a);l&&t.play(s,l);}),e.addEventListener("mouseout",o=>{let r=o.relatedTarget;(!(r instanceof Node)||!e.contains(r))&&n&&(chunk24B6ZCFG_cjs.ef(n,chunk24B6ZCFG_cjs.df),n=null);let i=t.getController(),s=ls(o.target);s&&i?.hasHoverSequence(s)&&i.resetHover(s);});}function ps(){let e=new Map,t=[],n={current:null},o=null,r=null,i=null,s=-1,a=false,l=null,p=new Map,d=null,u=false,m,g,x,b,v,f,S=()=>o?.interactiveTriggerShapeIds??new Set,y=()=>o?.hoverTriggerShapeIds??new Set,h=M=>{e.clear();for(let[D,I]of M)e.set(D,I);w();},C=()=>{let M=new Set;for(let[D,I]of e){(I.build||I.animatesFill||I.animatesStroke)&&M.add(D);let R=D.indexOf("::");R>0&&M.add(D.slice(0,R));}return Array.from(M)},w=()=>{if(!r)return;let M=C();M.length>0&&d?.(M),chunkWBPOPJLC_cjs.c(r,e,S(),y());},P={setStates:M=>{h(M(new Map(e)));},timers:t,buildHandle:n,playSound:M=>{Mt(p.get(M)??M);},stopSound:Oo,frameRoot:()=>r},k=()=>{l&&(l(),l=null);},A=chunk24B6ZCFG_cjs.Hr(),T=()=>{chunk24B6ZCFG_cjs.Ir(P,A);},E=()=>{k(),T(),o=null,P.mediaTimeNodeElementIds=new Map,P.mediaBookmarkTimesMs=new Map,e.clear(),r=null,i=null;},L=(M,D,I=false)=>{if(o=chunk24B6ZCFG_cjs.de.fromSlide(M,{slideHeightPx:g?.height,slideWidthPx:g?.width,themeColorMap:x,pixelateMosaic:b}),P.mediaTimeNodeElementIds=chunk24B6ZCFG_cjs.Pd(M.nativeAnimations??[]),P.mediaBookmarkTimesMs=chunk24B6ZCFG_cjs.Qd(M.elements),chunkWBPOPJLC_cjs.b(D,o.keyframesCss),h(o.computeStates()),u=false,I){u=o.hasMoreSteps(),o.completeAll(),h(o.computeStates());return}if(o.hasMoreSteps()){let R=o.peekNext();if(R?.autoAdvance){let O=o,B=window.setTimeout(()=>{let V=O.advance();V&&(chunk24B6ZCFG_cjs.Fr(O,V,P),chunk24B6ZCFG_cjs.Gr(O,P));},R.autoAdvanceDelayMs??0);t.push(B);}}};return {elementStates:e,advance(){return chunk24B6ZCFG_cjs.Jr(o,P,A)},isComplete(){return !o||!o.hasMoreSteps()},isSeededCompleted(){return u},replayCurrentSlide(M){m&&(T(),L(m,M));},navigateToZoomTarget(M,D,I){return v=chunk24B6ZCFG_cjs.No(M,D,I),f=chunk24B6ZCFG_cjs.Po(M.transitionDurationMs),M.targetSlideIndex},consumeZoomReturnOnAdvance(M){let D=v,I=chunk24B6ZCFG_cjs.Oo(M,void 0,D);if(I.returnedToZoom&&I.nextSlideIndex!==void 0)return v=I.excursion,f=chunk24B6ZCFG_cjs.Po(D?.transitionDurationMs),I.nextSlideIndex},syncStage(M){k();let D=M.showWithAnimation!==false;if(!M.presenting||!M.slide||!D){T(),o=null,e.clear(),chunkWBPOPJLC_cjs.b(M.doc,""),r=M.presenting?M.stage:null,i=M.presenting?M.stage:null,s=M.slideIndex,a&&!M.presenting&&(Oo(),v=void 0,f=void 0),a=M.presenting;return}chunkWBPOPJLC_cjs.a(M.doc),p=M.mediaDataUrls??new Map,d=M.reRenderElements??null,r=M.stage,g=M.canvasSize,x=M.themeColorMap,b=M.pixelateMosaicAnimation;let I=!a,R=M.slideIndex!==s,O=m;m=M.slide,I||R||!o?(T(),L(M.slide,M.doc,M.seedCompleted===true)):w();let B=f;f=void 0;let V=M.slideIndex<s,F=B??(V?O?.transition:M.slide.transition);if(!I&&R&&i&&chunk24B6ZCFG_cjs.Dr(F,_=>p.get(_),{play:Mt,stop:Oo}),!I&&R&&i&&F&&F.type&&F.type!=="none"){let _=M.stage.cloneNode(true);l=chunkWBPOPJLC_cjs.d({doc:M.doc,stageWrap:M.stageWrap,outgoing:i,incoming:_,transition:F,outgoingSlide:O,incomingSlide:M.slide,onDone:()=>{l=null;}});}mw(M.stage,{getController:()=>o,play:(_,N)=>{chunk24B6ZCFG_cjs.Fr(_,N,P);},getSlide:()=>M.slide}),i=M.stage,s=M.slideIndex,a=true;},reset(){E(),s=-1,a=false;}}}function uw(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-after-animation-row"),i=chunkOBVLNSK5_cjs.w(e,"label"),s=chunkOBVLNSK5_cjs.w(e,"span");s.textContent=t("pptx.animation.afterAnimation");let a=Q(e);a.setAttribute("aria-label",t("pptx.animation.afterAnimation"));for(let u of chunk24B6ZCFG_cjs.rd){let m=e.createElement("option");m.value=u,m.textContent=t(`pptx.animation.afterAnimation.${u}`),a.appendChild(m);}a.addEventListener("change",()=>n(a.value)),i.append(s,a);let l=chunkOBVLNSK5_cjs.w(e,"label","pptxv-after-animation-color"),p=chunkOBVLNSK5_cjs.w(e,"span");p.textContent=t("pptx.animation.afterAnimation.color");let d=e.createElement("input");return d.type="color",d.setAttribute("aria-label",t("pptx.animation.afterAnimation.color")),d.addEventListener("change",()=>o(d.value)),l.append(p,d),l.hidden=true,r.append(i,l),{el:r,update(u){a.value=u.action,a.disabled=!u.editable;let m=u.action==="dimToColor";l.hidden=!m,d.value=u.color??"#808080",d.disabled=!u.editable;}}}var xw=["fromTop","fromBottom","fromLeft","fromRight"],gw=[{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"}],bw=["none","untilNextClick","untilEndOfSlide"];function Or(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"label","pptxv-anim-field"),r=chunkOBVLNSK5_cjs.w(e,"span");return r.textContent=t,o.appendChild(r),n.appendChild(o),o}function nt(e,t,n,o,r){let i=Or(e,t,r),s=Q(e);s.setAttribute("aria-label",t);for(let a of n){let l=e.createElement("option");l.value=a.value,l.textContent=a.label,s.appendChild(l);}return s.addEventListener("change",()=>o(s.value)),i.appendChild(s),s}function Hr(e,t,n,o,r){let i=Or(e,t,r),s=e.createElement("input");return s.type="number",s.min=String(n.min),s.max=String(n.max),s.step=String(n.step),s.addEventListener("change",()=>o(s.valueAsNumber)),i.appendChild(s),s}function fw(e,t,n,o){let r=nt(e,t("pptx.animation.trigger.bookmarkLabel"),[],o,n);r.setAttribute("data-pptx-animation-bookmark-picker","");let i=r.parentElement;return {select:r,update(s,a){i.hidden=a?.trigger!=="onMediaBookmark";let l=chunk24B6ZCFG_cjs.fd(s),p=e.createElement("option");p.value="",p.textContent=t(l.length===0?"pptx.animation.trigger.noBookmarks":"pptx.animation.trigger.selectBookmark"),r.replaceChildren(p,...l.map(d=>{let u=e.createElement("option");return u.value=d.value,u.textContent=d.label,u})),r.value=chunk24B6ZCFG_cjs.gd(a),r.disabled||=l.length===0;}}}function Fr(e){return chunk24B6ZCFG_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function vw(e,t){let n=t.find(o=>o.id===e.elementId);return n?Fr(n):e.elementId.slice(0,8)}function CI(e){return e.entrance?"entrance":e.emphasis?"emphasis":e.exit?"exit":"none"}function hw(e,t,n,o,r,i){let s=chunk24B6ZCFG_cjs.$c(o);n.replaceChildren(...o.map((a,l)=>{let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-anim-bar-seg");p.classList.add(`is-${CI(a)}`),p.classList.toggle("is-selected",a.elementId===i),p.style.left=`${s[l].leftPercent}%`,p.style.width=`${s[l].widthPercent}%`;let d=chunk24B6ZCFG_cjs.ud(a,t);return p.title=`${vw(a,r)} - ${d} (${a.durationMs??500}ms)`,p}));}function yw(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint");let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-animation-timeline-name"),a=n.map(l=>{let p=r.find(d=>d.id===l);return p?Fr(p):l.slice(0,8)}).join(", ");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${a}`,i.append(s),i}function Sw(e,t,n,o,r,i,s,a,l){let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timeline-row");p.classList.toggle("is-selected",n.elementId===s);let d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-animation-timeline-name");d.textContent=`${o+1}. ${vw(n,i)}`;let u=(m,g,x)=>{let b=chunkOBVLNSK5_cjs.w(e,"button","pptxv-btn");return b.type="button",b.textContent=g,b.setAttribute("aria-label",t(m==="up"?"pptx.animation.moveUp":"pptx.animation.moveDown")),b.disabled=x,b.addEventListener("click",()=>l(n.elementId,m)),b};return p.append(d,u("up","\u2191",!a||o===0),u("down","\u2193",!a||o===r-1)),p}var ds="none",cs="current",Cw="other";function ww(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"label","pptxv-effect-sound-row"),i=chunkOBVLNSK5_cjs.w(e,"span");i.textContent=t("pptx.animation.sound");let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-effect-sound-controls"),a=Q(e);a.setAttribute("aria-label",t("pptx.animation.sound"));let l=e.createElement("option");l.value=ds,l.textContent=t("pptx.animation.sound.none");let p=e.createElement("option");p.value=cs;let d=e.createElement("option");d.value=Cw,d.textContent=t("pptx.animation.sound.other"),a.append(l);for(let x of chunk24B6ZCFG_cjs.md){let b=e.createElement("option");b.value=x.id,b.textContent=t(x.i18nKey),a.append(b);}a.append(d);let u=e.createElement("button");u.type="button",u.className="pptxv-effect-sound-preview",u.setAttribute("aria-label",t("pptx.animation.sound.preview")),u.textContent="\u25B6",u.disabled=true;let m=e.createElement("input");m.type="file",m.accept="audio/*",m.setAttribute("aria-label",t("pptx.animation.sound.chooseFile")),m.className="pptxv-effect-sound-file-input",m.tabIndex=-1;let g;return a.addEventListener("change",()=>{let x=a.value;if(x===Cw){m.click();return}if(x===ds){n(void 0);return}x!==cs&&o(x);}),m.addEventListener("change",()=>{let x=m.files?.[0];if(m.value="",!x)return;let b=new FileReader;b.onload=()=>{typeof b.result=="string"&&n({dataUrl:b.result,fileName:x.name});},b.readAsDataURL(x);}),u.addEventListener("click",()=>{if(!g)return;let x=chunk24B6ZCFG_cjs.nd(g);x&&Mt(x.dataUrl);}),s.append(a,u),r.append(i,s,m),{el:r,update(x){g=x.catalogueId,x.hasSound&&!x.catalogueId?(p.textContent=x.fileName??t("pptx.animation.sound.custom"),p.isConnected||a.insertBefore(p,l.nextSibling)):p.isConnected&&p.remove(),a.value=x.catalogueId??(x.hasSound?cs:ds),a.disabled=!x.editable,u.disabled=!x.catalogueId;}}}function Ew(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"label","pptxv-motion-path-row"),r=chunkOBVLNSK5_cjs.w(e,"span");r.textContent=t("pptx.animation.motionPath.label");let i=Q(e);i.setAttribute("aria-label",t("pptx.animation.motionPath.label"));let s=e.createElement("option");s.value="none",s.textContent=t("pptx.animation.motionPath.none"),i.appendChild(s);let a=e.createElement("option");a.value="custom",a.textContent=t("pptx.animation.motionPath.custom");for(let p of chunk24B6ZCFG_cjs.Vd){let d=e.createElement("optgroup");d.label=t(chunk24B6ZCFG_cjs.Wd(p));for(let u of chunk24B6ZCFG_cjs.Yd(p)){let m=e.createElement("option");m.value=u.id,m.textContent=t(chunk24B6ZCFG_cjs.Xd(u.id)),d.appendChild(m);}i.appendChild(d);}i.addEventListener("change",()=>n(i.value));let l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-motion-path-hint");return l.textContent=t("pptx.animation.motionPath.editHint"),l.hidden=true,o.append(r,i,l),{el:o,update(p){let d=chunk24B6ZCFG_cjs.Zd(p.motionPath),u=!!p.motionPath&&!d;u?a.parentElement!==i&&i.insertBefore(a,s.nextSibling):a.remove(),i.value=u?"custom":d??"none",i.disabled=!p.editable,l.hidden=!p.motionPath;}}}function Tw(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-animation");o.setAttribute("data-pptx-animation-panel","");let r={selectedElementId:void 0,animations:[]},i=()=>r.animations.find(F=>F.elementId===r.selectedElementId),s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-anim-header"),a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-section-title");a.textContent=t("pptx.animation.title");let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-anim-preview-btn");l.type="button",l.textContent=t("pptx.animation.preview"),l.addEventListener("click",()=>chunk24B6ZCFG_cjs.fe(e,i())),s.append(a,l),o.appendChild(s);let p=(F,_,N)=>nt(e,t(_),[{value:"none",label:t("pptx.animation.none")},...N.map(W=>({value:W,label:t(`pptx.animation.preset.${W}`)}))],W=>n.setAnimationEffect(F,W),o),d=p("entrance","pptx.animation.entrance",chunk24B6ZCFG_cjs.Ic),u=p("emphasis","pptx.animation.emphasis",chunk24B6ZCFG_cjs.Kc),m=p("exit","pptx.animation.exit",chunk24B6ZCFG_cjs.Jc),g=Ew(e,t,F=>n.applyMotionPath(F));o.appendChild(g.el);let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-anim-options");o.appendChild(x);let b=F=>{r.selectedElementId&&n.setAnimationTiming(r.selectedElementId,F);},v=Or(e,t("pptx.animation.direction"),x);v.classList.add("pptxv-anim-direction");let f=xw.map(F=>{let _=chunkOBVLNSK5_cjs.w(e,"button","pptxv-anim-direction-btn");return _.type="button",_.textContent=t(`pptx.animation.direction.${F}`),_.addEventListener("click",()=>b({direction:F})),v.appendChild(_),{value:F,btn:_}}),S=nt(e,t("pptx.animation.sequence"),chunk24B6ZCFG_cjs.Mc.map(F=>({value:F,label:t(`pptx.animation.sequence.${F}`)})),F=>b({sequence:F}),x),y=ww(e,t,F=>{r.selectedElementId&&n.setAnimationSound(r.selectedElementId,F);},F=>{r.selectedElementId&&n.setAnimationStockSound(r.selectedElementId,F);});x.appendChild(y.el);let h=uw(e,t,F=>b({afterAnimation:F}),F=>{b({afterAnimationColor:F}),n.pushRecentColor(F);});x.appendChild(h.el);let C=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-section-title");C.textContent=t("pptx.animation.timing"),x.appendChild(C);let w=nt(e,t("pptx.animation.trigger"),chunk24B6ZCFG_cjs.Lc.map(F=>({value:F,label:t(`pptx.animation.trigger.${F}`)})),F=>b({trigger:F,triggerShapeId:""}),x),P=nt(e,t("pptx.animation.trigger.shapeLabel"),[],F=>b({triggerShapeId:F}),x),k=P.parentElement,A=fw(e,t,x,F=>b({triggerBookmark:F})),T=Hr(e,t("pptx.animation.duration"),{min:100,max:1e4,step:50},F=>b({durationMs:F}),x),E=Hr(e,t("pptx.animation.delay"),{min:0,max:1e4,step:50},F=>b({delayMs:F}),x),L=nt(e,t("pptx.animation.timingCurve"),gw.map(F=>({value:F.value,label:t(F.labelKey)})),F=>b({timingCurve:F}),x),M=Hr(e,t("pptx.animation.repeatCount"),{min:1,max:100,step:1},F=>b({repeatCount:F}),x),D=nt(e,t("pptx.animation.repeatUntil"),bw.map(F=>({value:F,label:t(`pptx.animation.repeatUntil.${F}`)})),F=>b({repeatMode:F}),x),I=chunkOBVLNSK5_cjs.w(e,"div","pptxv-anim-timeline"),R=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-section-title");R.textContent=t("pptx.animation.timelineBar");let O=chunkOBVLNSK5_cjs.w(e,"div","pptxv-anim-bar"),B=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-section-title");B.textContent=t("pptx.animation.timeline");let V=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timeline-list");return I.append(R,O,B,V),o.appendChild(I),{el:o,update(F){if(r=F,o.hidden=!F.selectedElementId,o.hidden)return;let _=i(),N=!!(_?.entrance||_?.emphasis||_?.exit||_?.motionPath);d.value=_?.entrance??"none",u.value=_?.emphasis??"none",m.value=_?.exit??"none",g.update({motionPath:_?.motionPath,editable:F.editable}),l.hidden=!N,x.hidden=!N;let W=_?chunk24B6ZCFG_cjs.Hc([_],_.elementId):[],X=chunk24B6ZCFG_cjs.Gc(_,W);v.hidden=W.length===0;for(let{value:j,btn:Y}of f)Y.hidden=!W.includes(j),Y.classList.toggle("is-active",X===j),Y.disabled=!F.editable;S.value=_?.sequence??"asOne",y.update({...chunk24B6ZCFG_cjs.od(F.animations,F.selectedElementId??""),editable:F.editable}),h.update({action:_?.afterAnimation??"none",color:_?.afterAnimationColor,editable:F.editable}),w.value=_?.trigger??"onClick",k.hidden=w.value!=="onShapeClick",P.replaceChildren(...[{id:"",label:t("pptx.animation.trigger.selectShape")},...F.elements.filter(j=>j.id!==F.selectedElementId).map(j=>({id:j.id,label:Fr(j)}))].map(j=>{let Y=e.createElement("option");return Y.value=j.id,Y.textContent=j.label,Y})),P.value=_?.triggerShapeId??"",T.value=String(_?.durationMs??450),E.value=String(_?.delayMs??0),L.value=chunk24B6ZCFG_cjs.Ec(_?.timingCurve),M.value=String(_?.repeatCount??1),D.value=_?.repeatMode??"none";for(let j of [d,u,m,S,w,P,L,D])j.disabled=!F.editable;T.disabled=E.disabled=M.disabled=!F.editable,A.select.disabled=!F.editable,A.update(F.elements,_);let ie=[...F.animations].sort((j,Y)=>(j.order??0)-(Y.order??0)),G=chunk24B6ZCFG_cjs.id(ie,F.animationTimelineAnchors??[]),K=new Map(ie.map(j=>[j.elementId,j]));I.hidden=G.length===0,hw(e,t,O,ie,F.elements,F.selectedElementId),V.replaceChildren(...G.flatMap((j,Y)=>{if(j.kind==="native")return [yw(e,t,j.targetIds,Y,F.elements)];let ue=K.get(j.elementId);return ue?[Sw(e,t,ue,Y,G.length,F.elements,F.selectedElementId,F.editable,n.reorderAnimation)]:[]}));}}}function Ho(e,t,n){let o=e.createElement("label");return o.className="pptxv-exhaustive-field",o.textContent=t,n.setAttribute("aria-label",t),n.classList.add("pptxv-exhaustive-field-control"),o.appendChild(n),{label:o,control:n}}function Dt(e,t){return Ho(e,t,e.createElement("input"))}function ge(e,t){let n=Dt(e,t);return n.control.type="number",n}function We(e,t,n){let o=Dt(e,t);return o.control.type="color",n&&o.control.addEventListener("change",()=>n(o.control.value)),o}function ye(e,t){return Ho(e,t,me(e))}function to(e,t,n){let o=Q(e);return it(e,o,n.map(r=>[r,r])),Ho(e,t,o)}function Ve(e,t,n,o){let r=Q(e);return it(e,r,n.map(i=>[i.value,o(i.labelKey)])),Ho(e,t,r)}function rt(e,t,n,o,r){let i=Q(e);return it(e,i,n.map(s=>[s,chunk24B6ZCFG_cjs.Qb(o,s,r)])),Ho(e,t,i)}function it(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let s=e.createElement("option");return s.value=r,s.textContent=i,s})),t.value=o;}function Se(e){return e.value===""?void 0:e.valueAsNumber}function Ce(e,t){e.value=t===void 0?"":String(t);}function ms(e){return e.split(",").map(Number).filter(Number.isFinite)}function oo(e,t){let{label:n,control:o}=ge(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 Pw(e,t,n,o=oo(e,t),r){let i=e.createElement("div");i.className="pptxv-chart-advanced";let s=to(e,t("pptx.chart.axis"),[]),a=ge(e,t("pptx.chart.axisMinimum")),l=ge(e,t("pptx.chart.axisMaximum")),p=ge(e,t("pptx.chart.majorUnit")),d=Ve(e,t("pptx.chart.displayUnits"),chunk24B6ZCFG_cjs.Kb,t),u=ye(e,t("pptx.chart.logScale")),m=ye(e,t("pptx.chart.reverseOrder")),g=ye(e,t("pptx.chart.majorGridlines")),x=to(e,t("pptx.chart.series"),[]),b=Ve(e,t("pptx.chart.trendlines"),chunk24B6ZCFG_cjs.Lb,t),v=ye(e,t("pptx.chart.trendlineEquation")),f=ye(e,t("pptx.chart.trendlineRSquared")),S=Ve(e,t("pptx.chart.errorBars"),chunk24B6ZCFG_cjs.Mb,t),y=ge(e,t("pptx.chart.errorBarAmount")),h=rt(e,t("pptx.chart.marker"),["none","auto","circle","diamond","square","star","triangle","x","plus"],chunk24B6ZCFG_cjs.Yb,t),C=ge(e,t("pptx.chart.markerSize")),w=We(e,t("pptx.chart.seriesColor"),r),P=We(e,t("pptx.chart.dataPointColor"),r),k=ge(e,t("pptx.chart.pointExplosion"));i.append(s.label,a.label,l.label,p.label,d.label,u.label,m.label,g.label,x.label,b.label,v.label,f.label,S.label,y.label,h.label,C.label,w.label,o.label,P.label,k.label);let A,T=()=>Math.max(0,s.control.selectedIndex),E=()=>Math.max(0,x.control.selectedIndex),L=()=>{if(!A)return;let I=[...A.axes??[]],R=I[T()]??{axisType:"valAx"};I[T()]={...R,min:Se(a.control),max:Se(l.control),majorUnit:Se(p.control),displayUnits:d.control.value||void 0,logScale:u.control.checked,orientation:m.control.checked?"maxMin":"minMax",majorGridlines:g.control.checked},n({...A,axes:I});},M=()=>{if(!A?.series[E()])return;let I=[...A.series],R=I[E()],O=b.control.value,B=S.control.value,V=o.selected(),F=R.dataPoints?.find(({idx:N})=>N===V),_=chunk24B6ZCFG_cjs.na(R.dataPoints,{...F??{idx:V},spPr:{...F?.spPr,fillColor:P.control.value},explosion:Se(k.control)});I[E()]={...R,color:w.control.value,trendlines:O?[{trendlineType:O,displayEq:v.control.checked,displayRSq:f.control.checked}]:[],errBars:B?[{direction:"y",barType:"both",valType:B,val:Se(y.control)}]:[],marker:{symbol:h.control.value,size:Se(C.control)},dataPoints:_},n({...A,series:I});};for(let I of [a.control,l.control,p.control,d.control,u.control,m.control,g.control])I.addEventListener("change",L);for(let I of [b.control,v.control,f.control,S.control,y.control,h.control,C.control,w.control,P.control,k.control])I.addEventListener("change",M);s.control.addEventListener("change",()=>A&&D(A)),x.control.addEventListener("change",()=>A&&D(A)),o.subscribe(()=>A&&D(A));let D=I=>{A=I,it(e,s.control,(I.axes??[]).map((V,F)=>[String(F),V.titleText??chunk24B6ZCFG_cjs.Qb(chunk24B6ZCFG_cjs.Wb,V.axisType,t)])),it(e,x.control,I.series.map((V,F)=>[String(F),V.name]));let R=I.axes?.[T()];Ce(a.control,R?.min),Ce(l.control,R?.max),Ce(p.control,R?.majorUnit),d.control.value=R?.displayUnits??"",u.control.checked=R?.logScale??false,m.control.checked=R?.orientation==="maxMin",g.control.checked=R?.majorGridlines??false;let O=I.series[E()];b.control.value=O?.trendlines?.[0]?.trendlineType??"",v.control.checked=O?.trendlines?.[0]?.displayEq??false,f.control.checked=O?.trendlines?.[0]?.displayRSq??false,S.control.value=O?.errBars?.[0]?.valType??"",Ce(y.control,O?.errBars?.[0]?.val),h.control.value=O?.marker?.symbol??"none",Ce(C.control,O?.marker?.size),w.control.value=O?.color??"#4472c4";let B=O?.dataPoints?.find(({idx:V})=>V===o.selected());P.control.value=B?.spPr?.fillColor??O?.color??"#4472c4",Ce(k.control,B?.explosion);};return {el:i,update:D}}var us="pptxv-chart-grid-cell-highlight";function Aw(e,t,n,o=()=>true){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-chart-grid"),i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-chart-grid-toolbar"),s=e.createElement("table");s.className="pptxv-chart-grid-table";let a=(S,y,h)=>{let C=chunkOBVLNSK5_cjs.w(e,"button","pptxv-chart-grid-btn");return C.type="button",C.textContent=`+ ${S}`,C.title=y,C.setAttribute("aria-label",y),C.addEventListener("click",h),C},l,p=S=>{S&&n(S);},d=a(t("pptx.chart.cat"),t("pptx.chart.addCategory"),()=>{l&&p(chunk24B6ZCFG_cjs.dc(l));}),u=a(t("pptx.chart.seriesShort"),t("pptx.chart.addSeries"),()=>{l&&p(chunk24B6ZCFG_cjs.bc(l));});i.append(d,u),r.append(i,s);let m=(S,y,h,C)=>{let w=e.createElement("input");return w.type=S,w.className="pptxv-chart-grid-cell",w.value=y,w.setAttribute("aria-label",h),w.addEventListener("change",()=>C(w.value)),w.addEventListener("keydown",P=>P.stopPropagation()),w},g=(S,y)=>{let h=chunkOBVLNSK5_cjs.w(e,"button","pptxv-chart-grid-remove");return h.type="button",h.textContent="\xD7",h.title=S,h.setAttribute("aria-label",S),h.addEventListener("click",y),h},x=(S,y,h)=>{let C=[...S.series[y].values];for(;C.length<=h;)C.push(0);return {...S,series:S.series.map((w,P)=>P===y?{...w,values:C}:w)}},b=(S,y)=>{let h=e.createElement("thead"),C=e.createElement("tr"),w=e.createElement("th");return w.setAttribute("aria-label",t("pptx.chart.categories")),C.appendChild(w),S.series.forEach((P,k)=>{let A=e.createElement("th"),T=m("text",P.name,t("pptx.chart.seriesShort"),E=>n({...S,series:S.series.map((L,M)=>M===k?{...L,name:E}:L)}));y?.seriesIndex===k&&y.pointIndex===void 0&&T.classList.add(us),A.appendChild(T),S.series.length>1&&A.appendChild(g(t("pptx.chart.removeSeries"),()=>p(chunk24B6ZCFG_cjs.cc(S,k)))),C.appendChild(A);}),h.appendChild(C),h},v=(S,y)=>{let h=e.createElement("tbody");return S.categories.forEach((C,w)=>{let P=e.createElement("tr"),k=e.createElement("td");k.appendChild(m("text",C,t("pptx.chart.categories"),A=>p(chunk24B6ZCFG_cjs.fc(S,w,A)))),S.categories.length>1&&k.appendChild(g(t("pptx.chart.removeCategory"),()=>p(chunk24B6ZCFG_cjs.ec(S,w,o())))),P.appendChild(k),S.series.forEach((A,T)=>{let E=e.createElement("td"),L=m("number",String(A.values[w]??0),`${A.name} value ${w+1}`,M=>{let D=w>=A.values.length?x(S,T,w):S;p(chunk24B6ZCFG_cjs.gc(D,T,w,M));});y?.seriesIndex===T&&y.pointIndex===w&&L.classList.add(us),E.appendChild(L),P.appendChild(E);}),h.appendChild(P);}),h},f=null;return {el:r,update(S,y=null){if(l=S,r.hidden=!S,!S)return;s.textContent="",s.append(b(S,y),v(S,y));let h=y?`${y.seriesIndex}:${y.pointIndex??""}`:null;h!==null&&h!==f&&s.querySelector(`.${us}`)?.scrollIntoView?.({block:"nearest",inline:"nearest"}),f=h;},setDisabled(S){d.disabled=S,u.disabled=S;for(let y of s.querySelectorAll("input"))y.disabled=S;}}}var wI=chunk24B6ZCFG_cjs.Ob.filter(e=>e.value!=="");function kw(e,t,n){let o=to(e,t("pptx.chart.series"),[]),r=rt(e,t("pptx.chart.seriesType"),["bar","line","area","scatter","bubble","radar"],chunk24B6ZCFG_cjs.Ub,t),i=ye(e,t("pptx.chart.secondaryAxis")),s=rt(e,t("pptx.chart.dataLabelPosition"),["bestFit","b","ctr","inBase","inEnd","l","outEnd","r","t"],chunk24B6ZCFG_cjs.Xb,t),a=ye(e,t("pptx.chart.showValue")),l=ye(e,t("pptx.chart.showCategory")),p=ye(e,t("pptx.chart.showSeriesName")),d=ye(e,t("pptx.chart.showPercentage")),u=ye(e,t("pptx.chart.showLeaderLines")),m=ge(e,t("pptx.chart.trendlineOrder")),g=ge(e,t("pptx.chart.trendlinePeriod")),x=ge(e,t("pptx.chart.forecastForward")),b=ge(e,t("pptx.chart.forecastBackward")),v=ge(e,t("pptx.chart.trendlineIntercept")),f=We(e,t("pptx.chart.trendlineColor"),n),S=rt(e,t("pptx.chart.errorBarDirection"),["x","y"],chunk24B6ZCFG_cjs.Zb,t),y=Ve(e,t("pptx.chart.errorBarType"),chunk24B6ZCFG_cjs.Nb,t),h=We(e,t("pptx.chart.errorBarColor"),n),C=ye(e,t("pptx.chart.noEndCap")),w=Dt(e,t("pptx.chart.customPlus")),P=Dt(e,t("pptx.chart.customMinus")),k=We(e,t("pptx.chart.markerFill"),n),A=We(e,t("pptx.chart.markerOutline"),n),T=Ve(e,t("pptx.chart.dataPointMarker"),wI,t),E=ge(e,t("pptx.chart.markerSize")),L=ye(e,t("pptx.chart.invertIfNegative")),M=to(e,t("pptx.chart.axis"),[]),D=Dt(e,t("pptx.chart.axisTitle")),I=ge(e,t("pptx.chart.minorUnit")),R=ye(e,t("pptx.chart.minorGridlines")),O=Dt(e,t("pptx.chart.numberFormat")),B=Ve(e,t("pptx.chart.tickLabelPosition"),chunk24B6ZCFG_cjs.Jb,t),V=We(e,t("pptx.chart.axisColor"),n),F=We(e,t("pptx.chart.axisFontColor"),n),_=ge(e,t("pptx.chart.axisFontSize"));return {series:o,axis:M,comboType:r,secondaryAxis:i,labelPosition:s,showValue:a,showCategory:l,showSeries:p,showPercent:d,leaderLines:u,trendOrder:m,trendPeriod:g,trendForward:x,trendBackward:b,trendIntercept:v,trendColor:f,errorDirection:S,errorBarType:y,errorColor:h,noEndCap:C,customPlus:w,customMinus:P,markerFill:k,markerLine:A,pointMarker:T,pointMarkerSize:E,pointInvert:L,axisTitle:D,minorUnit:I,minorGridlines:R,numberFormat:O,tickPosition:B,axisColor:V,axisFontColor:F,axisFontSize:_,seriesFields:[r,i,s,a,l,p,d,u,m,g,x,b,v,f,S,y,h,C,w,P,k,A,T,E,L],axisFields:[D,I,R,O,B,V,F,_]}}function Iw(e,t,n,o,r){let i=e.createElement("div");i.className="pptxv-chart-exhaustive";let{series:s,axis:a,comboType:l,secondaryAxis:p,labelPosition:d,showValue:u,showCategory:m,showSeries:g,showPercent:x,leaderLines:b,trendOrder:v,trendPeriod:f,trendForward:S,trendBackward:y,trendIntercept:h,trendColor:C,errorDirection:w,errorBarType:P,errorColor:k,noEndCap:A,customPlus:T,customMinus:E,markerFill:L,markerLine:M,pointMarker:D,pointMarkerSize:I,pointInvert:R,axisTitle:O,minorUnit:B,minorGridlines:V,numberFormat:F,tickPosition:_,axisColor:N,axisFontColor:W,axisFontSize:X,seriesFields:ie,axisFields:G}=kw(e,t,r),K=o===void 0,j=o??oo(e,t);i.append(s.label,...K?[j.label]:[],...ie.map(({label:ne})=>ne),a.label,...G.map(({label:ne})=>ne));let Y,ue=()=>Math.max(0,s.control.selectedIndex),Te=()=>Math.max(0,a.control.selectedIndex),Me=()=>{let ne=Y?.series[ue()];if(!Y||!ne)return;let De=[...Y.series],Qe=ne.trendlines?.[0],Ze=ne.errBars?.[0],Je=j.selected(),zt=ne.dataPoints?.find(({idx:_e})=>_e===Je);De[ue()]={...ne,seriesChartType:l.control.value,axisId:chunk24B6ZCFG_cjs.as(Y,p.control.checked),trendlines:Qe?[{...Qe,order:Se(v.control),period:Se(f.control),forward:Se(S.control),backward:Se(y.control),intercept:Se(h.control),color:C.control.value}]:[],errBars:Ze?[{...Ze,direction:w.control.value,barType:P.control.value,color:k.control.value,noEndCap:A.control.checked,customPlus:ms(T.control.value),customMinus:ms(E.control.value)}]:[],marker:{...ne.marker??{symbol:"auto"},spPr:{fillColor:L.control.value,strokeColor:M.control.value}},dataPoints:chunk24B6ZCFG_cjs.na(ne.dataPoints,{...zt??{idx:Je},invertIfNegative:R.control.checked,marker:{...zt?.marker,symbol:D.control.value,size:Se(I.control)}})},n({...Y,series:De,style:{...Y.style,hasDataLabels:true,dataLabels:{...Y.style?.dataLabels,position:d.control.value,showValue:u.control.checked,showCategory:m.control.checked,showSeriesName:g.control.checked,showPercent:x.control.checked,showLeaderLines:b.control.checked}}});},Xo=()=>{let ne=Y?.axes?.[Te()];if(!Y||!ne)return;let De=[...Y.axes??[]];De[Te()]={...ne,titleText:O.control.value,minorUnit:Se(B.control),minorGridlines:V.control.checked,numFmt:{formatCode:F.control.value},tickLblPos:_.control.value,spPr:{...ne.spPr,strokeColor:N.control.value},fontColor:W.control.value,fontSize:Se(X.control)},n({...Y,axes:De});};for(let ne of ie)ne.control.addEventListener("change",Me);for(let ne of G)ne.control.addEventListener("change",Xo);s.control.addEventListener("change",()=>Y&&Tt(Y)),a.control.addEventListener("change",()=>Y&&Tt(Y)),j.subscribe(()=>Y&&Tt(Y));let Tt=ne=>{Y=ne,it(e,s.control,ne.series.map((Nt,Ei)=>[String(Ei),Nt.name])),it(e,a.control,(ne.axes??[]).map((Nt,Ei)=>[String(Ei),Nt.titleText??chunk24B6ZCFG_cjs.Qb(chunk24B6ZCFG_cjs.Wb,Nt.axisType,t)]));let De=ne.series[ue()],Qe=De?.trendlines?.[0],Ze=De?.errBars?.[0];l.control.value=De?.seriesChartType??ne.chartType,p.control.checked=chunk24B6ZCFG_cjs.$r(ne,ue());let Je=ne.style?.dataLabels;d.control.value=Je?.position??"bestFit",u.control.checked=Je?.showValue??false,m.control.checked=Je?.showCategory??false,g.control.checked=Je?.showSeriesName??false,x.control.checked=Je?.showPercent??false,b.control.checked=Je?.showLeaderLines??false,Ce(v.control,Qe?.order),Ce(f.control,Qe?.period),Ce(S.control,Qe?.forward),Ce(y.control,Qe?.backward),Ce(h.control,Qe?.intercept),C.control.value=Qe?.color??"#4472c4",w.control.value=Ze?.direction??"y",P.control.value=Ze?.barType??"both",k.control.value=Ze?.color??"#000000",A.control.checked=Ze?.noEndCap??false,T.control.value=Ze?.customPlus?.join(", ")??"",E.control.value=Ze?.customMinus?.join(", ")??"",L.control.value=De?.marker?.spPr?.fillColor??"#4472c4",M.control.value=De?.marker?.spPr?.strokeColor??"#000000";let zt=De?.dataPoints?.find(({idx:Nt})=>Nt===j.selected());D.control.value=zt?.marker?.symbol??"none",Ce(I.control,zt?.marker?.size),R.control.checked=zt?.invertIfNegative??false;let _e=ne.axes?.[Te()];O.control.value=_e?.titleText??"",Ce(B.control,_e?.minorUnit),V.control.checked=_e?.minorGridlines??false,F.control.value=_e?.numFmt?.formatCode??"",_.control.value=_e?.tickLblPos??"nextTo",N.control.value=_e?.spPr?.strokeColor??"#000000",W.control.value=_e?.fontColor??"#000000",Ce(X.control,_e?.fontSize);};return {el:i,update:Tt}}function Lw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-filters",o.hidden=true;let r=e.createElement("h5");r.textContent=t("pptx.chart.chartFilters");let i=e.createElement("div");i.className="pptxv-chart-filters-visible";let s=e.createElement("div");s.className="pptxv-chart-filters-hidden";let a=e.createElement("div");a.className="pptxv-chart-filters-ranges",o.append(r,i,s,a);let l,p=true;function d(h){let C=l&&chunk24B6ZCFG_cjs.hc(l,h);C&&n(C);}function u(h){let C=l&&chunk24B6ZCFG_cjs.ic(l,h);C&&n(C);}function m(h,C,w){l&&n({...l,series:l.series.map((P,k)=>k===h?chunk24B6ZCFG_cjs.jc(P,C,w):P)});}function g(h,C,w){let P=e.createElement("div");P.className=w?"pptxv-chart-filters-row is-filtered":"pptxv-chart-filters-row";let k=e.createElement("span");return k.className="pptxv-chart-filters-name",k.title=h,k.textContent=h,P.append(k,C),P}function x(h,C,w){let P=e.createElement("button");return P.type="button",P.dataset.testid=h,P.setAttribute("aria-label",C),P.title=C,P.textContent=C,P.disabled=!p,P.addEventListener("click",w),P}function b(h){i.replaceChildren(),!(h.series.length<=1)&&h.series.forEach((C,w)=>{let P=t("pptx.chart.hideSeries",{name:C.name}),k=x(`chart-series-hide-${w}`,P,()=>d(w));i.append(g(C.name,k,false));});}function v(h){s.replaceChildren(),(h.filteredSeries??[]).forEach((C,w)=>{let P=C.name??h.filteredSeriesTitle??t("pptx.chart.seriesShort"),k=t("pptx.chart.showSeries",{name:P}),A=x(`chart-series-show-${w}`,k,()=>u(w));s.append(g(P,A,true));});}function f(h){a.replaceChildren(),h.series.forEach((C,w)=>{let P=C.dataLabelOptions?.dataLabelsRange;if(!P)return;let k=e.createElement("div");k.className="pptxv-chart-filters-range";let A=e.createElement("div");A.className="pptxv-chart-filters-range-title",A.title=C.name,A.textContent=t("pptx.chart.valueFromCells",{name:C.name}),k.append(A),P.cache.forEach((T,E)=>{let L=e.createElement("label");L.className="pptxv-chart-filters-range-field";let M=e.createElement("span"),D=h.categories[E]??String(E);M.textContent=D;let I=e.createElement("input");I.type="text",I.value=T,I.disabled=!p,I.dataset.testid=`chart-dlbl-range-${w}-${E}`,I.setAttribute("aria-label",D),I.addEventListener("change",()=>m(w,E,I.value)),L.append(M,I),k.append(L);}),a.append(k);});}function S(h){l=h;let C=h.filteredSeries?.length??0,w=h.series.filter(P=>P.dataLabelOptions?.dataLabelsRange).length;if(o.hidden=C===0&&w===0&&h.series.length<=1,o.hidden){i.replaceChildren(),s.replaceChildren(),a.replaceChildren();return}b(h),v(h),f(h);}function y(){for(let h of o.querySelectorAll("button, input"))h.disabled=!p;}return {el:o,update:S,setEditable(h){p=h,y();}}}function Mw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-subtype";let r=Ve(e,t("pptx.chart.bar3DShapeLabel"),chunk24B6ZCFG_cjs.js,t);r.control.dataset.testid="pptx-chart-bar3d-shape";let i=Ve(e,t("pptx.chart.radarStyleLabel"),chunk24B6ZCFG_cjs.ks,t);i.control.dataset.testid="pptx-chart-radar-style";let s=Ve(e,t("pptx.chart.surfaceWireframeLabel"),chunk24B6ZCFG_cjs.ls,t);s.control.dataset.testid="pptx-chart-surface-wireframe",o.append(r.label,i.label,s.label);let a;return r.control.addEventListener("change",()=>{a&&n({...a,...chunk24B6ZCFG_cjs.ms(a,r.control.value)});}),i.control.addEventListener("change",()=>{a&&n({...a,...chunk24B6ZCFG_cjs.ns(a,i.control.value)});}),s.control.addEventListener("change",()=>{a&&n({...a,...chunk24B6ZCFG_cjs.os(a,s.control.value==="true")});}),{el:o,update:p=>{a=p,r.label.hidden=p.chartType!=="bar3D",i.label.hidden=p.chartType!=="radar",s.label.hidden=p.chartType!=="surface",r.control.value=p.barShape??"box",i.control.value=p.radarStyle??"standard",s.control.value=p.wireframe?"true":"false";}}}function at(e,t,n){let o=e.createElement("input");return o.type="number",o.step="0.01",o.min="0",o.max="1",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function Dw(e,t,n,o,r){let i=e.createElement("input");return i.type="number",i.step=o,i.value=String(t),i.setAttribute("aria-label",n),i.addEventListener("change",()=>r(Number(i.value))),i}function xs(e,t,n){let o=e.createElement("input");return o.type="number",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function gs(e,t,n,o){let r=e.createElement("input");return r.type="text",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function bs(e,t,n,o){let r=me(e);return r.checked=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.checked)),r}function fs(e,t,n,o){let r=e.createElement("input");return r.type="color",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function Pe(e,t,...n){let o=e.createElement("span");return o.textContent=t,[o,...n]}function Rw(e,t,n,o,r,i,s,a){let l=e.createElement("div");l.className="pptxv-chart-usershape-anchor";let p=()=>Pe(e,t("pptx.chart.userShapeRotation"),Dw(e,n.rotation??0,t("pptx.chart.userShapeRotation"),"1",m=>s(n.path,m||void 0))),d=()=>[...Pe(e,t("pptx.arrange.flipHorizontally"),bs(e,n.flipH??false,t("pptx.arrange.flipHorizontally"),m=>a(n.path,{flipH:m}))),...Pe(e,t("pptx.arrange.flipVertically"),bs(e,n.flipV??false,t("pptx.arrange.flipVertically"),m=>a(n.path,{flipV:m})))];if(n.depth===0){let m=n.from;if(l.append(...Pe(e,t("pptx.chart.userShapeFrom"),at(e,m.x,g=>r(n.path,{from:{...m,x:g}})),at(e,m.y,g=>r(n.path,{from:{...m,y:g}})))),n.anchor==="rel"&&n.to){let g=n.to;l.append(...Pe(e,t("pptx.chart.userShapeTo"),at(e,g.x,x=>r(n.path,{to:{...g,x}})),at(e,g.y,x=>r(n.path,{to:{...g,y:x}}))));}if(n.anchor==="abs"&&n.ext){let g=n.ext;l.append(...Pe(e,t("pptx.chart.userShapeSize"),xs(e,g.cx,x=>r(n.path,{ext:{...g,cx:x}})),xs(e,g.cy,x=>r(n.path,{ext:{...g,cy:x}}))));}return l.append(...p(),...d()),l}let u=chunk24B6ZCFG_cjs.xc(o?.userShapes,n.path);return u&&l.append(...Pe(e,t("pptx.chart.userShapeFrom"),at(e,u.from.x,m=>i(n.path,{from:{...u.from,x:m},to:u.to})),at(e,u.from.y,m=>i(n.path,{from:{...u.from,y:m},to:u.to}))),...Pe(e,t("pptx.chart.userShapeTo"),at(e,u.to.x,m=>i(n.path,{from:u.from,to:{...u.to,x:m}})),at(e,u.to.y,m=>i(n.path,{from:u.from,to:{...u.to,y:m}}))),...p(),...d()),l}function Ow(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-usershapes";let r=e.createElement("h5");r.textContent=t("pptx.chart.userShapes");let i=e.createElement("button");i.type="button",i.dataset.testid="chart-user-shape-add",i.textContent=t("pptx.chart.userShapeAddTextBox");let s=e.createElement("div");s.className="pptxv-chart-usershapes-header",s.append(r,i);let a=e.createElement("p");a.className="pptxv-chart-usershapes-empty",a.textContent=t("pptx.chart.userShapesEmpty");let l=e.createElement("div");l.className="pptxv-chart-usershapes-list",o.append(s,a,l);let p;i.addEventListener("click",()=>{p&&n({userShapes:chunk24B6ZCFG_cjs.qc(p.userShapes,chunk24B6ZCFG_cjs.pc())});});function d(y,h){p&&n({userShapes:chunk24B6ZCFG_cjs.sc(p.userShapes,y,h)});}function u(y,h){p&&n({userShapes:chunk24B6ZCFG_cjs.uc(p.userShapes,y,h)});}function m(y){p&&n({userShapes:chunk24B6ZCFG_cjs.tc(p.userShapes,y)});}function g(y,h){p&&n({userShapes:chunk24B6ZCFG_cjs.yc(p.userShapes,y,h)});}function x(y,h){p&&n({userShapes:chunk24B6ZCFG_cjs.vc(p.userShapes,y,h)});}function b(y,h){p&&n({userShapes:chunk24B6ZCFG_cjs.wc(p.userShapes,y,h)});}function v(y){if(!p)return;let h=chunk24B6ZCFG_cjs.zc(p.userShapes,y);h&&n({userShapes:chunk24B6ZCFG_cjs.Bc(p.userShapes,y,chunk24B6ZCFG_cjs.Ac(h))});}function f(y){let h=e.createElement("div");h.className="pptxv-chart-usershape-row",h.dataset.testid="chart-user-shape-row",h.dataset.chartUserShapePath=y.path.join(","),h.style.marginLeft=`${y.depth*12}px`;let C=e.createElement("span"),w=`pptx.chart.userShapeKind${y.kind.charAt(0).toUpperCase()}${y.kind.slice(1)}`;C.textContent=y.text?`${t(w)} - ${y.text}`:t(w);let P=e.createElement("button");P.type="button",P.dataset.testid="chart-user-shape-delete",P.setAttribute("aria-label",t("pptx.chart.userShapeDelete")),P.textContent="\u2715",P.addEventListener("click",()=>m(y.path));let k=e.createElement("div");if(k.className="pptxv-chart-usershape-top",k.append(C),y.isGroup){let A=e.createElement("button");A.type="button",A.dataset.testid="chart-user-shape-add-into-group",A.textContent=t("pptx.chart.userShapeAddIntoGroup"),A.addEventListener("click",()=>v(y.path)),k.append(A);}if(k.append(P),h.append(k),y.editableVisuals){let A=e.createElement("div");A.className="pptxv-chart-usershape-text",A.append(...Pe(e,t("pptx.chart.userShapeText"),gs(e,y.text??"",t("pptx.chart.userShapeText"),E=>u(y.path,E)))),h.append(A);let T=e.createElement("div");T.className="pptxv-chart-usershape-colors",T.append(...Pe(e,t("pptx.chart.userShapeFill"),fs(e,y.fill??"#ffffff",t("pptx.chart.userShapeFill"),E=>d(y.path,{fill:E}))),...Pe(e,t("pptx.chart.userShapeStroke"),fs(e,y.stroke??"#000000",t("pptx.chart.userShapeStroke"),E=>d(y.path,{stroke:E})))),h.append(T);}if(y.editableAltText){let A=e.createElement("div");A.className="pptxv-chart-usershape-alt-text",A.append(...Pe(e,t("pptx.chart.userShapeAltText"),gs(e,y.altText??"",t("pptx.chart.userShapeAltText"),T=>d(y.path,{altText:T})))),h.append(A);}return h.append(Rw(e,t,y,p,d,g,x,b)),h}function S(y){p=y,l.replaceChildren();let h=chunk24B6ZCFG_cjs.rc(y.userShapes);a.hidden=h.length>0;for(let C of h)l.append(f(C));}return {el:o,update:S}}var EI=chunk24B6ZCFG_cjs.Ib.map(e=>e.value),TI=["clustered","stacked","percentStacked"];function Fw(e,t,n,o){let r=n(t("pptx.chart.data")),i=Vw(e,"text",t("pptx.chart.title")),s=rt(e,t("pptx.chart.type"),EI,chunk24B6ZCFG_cjs.Ub,t),a=rt(e,t("pptx.chart.grouping"),TI,chunk24B6ZCFG_cjs.Vb,t),l=Aw(e,t,y=>o.setChartData(y),()=>o.getChartFollowDataPoint()),p=Hw(e,t("pptx.chart.showLegend")),d=Hw(e,t("pptx.chart.dataLabels")),u=oo(e,t),m=Pw(e,t,y=>o.setChartData(y),u,o.pushRecentColor),g=Iw(e,t,y=>o.setChartData(y),u,o.pushRecentColor),x=Mw(e,t,y=>o.setChartData(y)),b=Lw(e,t,y=>o.setChartData(y)),v=Ow(e,t,y=>{f&&o.setChartData({...f,...y});});r.append(i.label,s.label,a.label,l.el,p.label,d.label,m.el,b.el,x.el,g.el,v.el);let f,S=()=>{if(!f)return;let y=s.control.value,h=y===f.chartType?f:chunk24B6ZCFG_cjs.Pb(f,{chartType:y});o.setChartData({...h,...chunk24B6ZCFG_cjs.ka(h,i.control.value),grouping:a.control.value,style:{...h.style,hasTitle:i.control.value.trim().length>0,hasLegend:p.control.checked,...d.control.checked!==(h.style?.hasDataLabels??false)?chunk24B6ZCFG_cjs.lc(h.style,d.control.checked):{hasDataLabels:d.control.checked}}});};for(let y of [i.control,s.control,a.control,p.control,d.control])y.addEventListener("change",S);return {el:r,update(y){r.hidden=!y.isChart,f=y.chartData,f&&(i.control.value=f.title??"",s.control.value=chunk24B6ZCFG_cjs.sa(f),a.control.value=f.grouping??"clustered",y.chartHighlightCell?.pointIndex!==void 0&&u.setSelected(y.chartHighlightCell.pointIndex),l.update(f,y.chartHighlightCell??null),p.control.checked=f.style?.hasLegend??false,d.control.checked=f.style?.hasDataLabels??false,m.update(f),b.update(f),x.update(f),g.update(f),v.update(f));},setEditable(y){b.setEditable(y);}}}function Vw(e,t,n){let o=e.createElement("label");o.textContent=n;let r=t==="checkbox"?me(e):e.createElement("input");return t!=="checkbox"&&(r.type=t),o.appendChild(r),{label:o,control:r}}function Hw(e,t){return Vw(e,"checkbox",t)}function Vr(e,t){let n=new Set(e.map(r=>r.id)),o=t.filter(r=>!n.has(r.id)).map(r=>({id:r.id,name:r.name,userId:"",providerId:""}));return [...e,...o]}function no(e){let{doc:t,t:n,field:o}=e,r=chunkOBVLNSK5_cjs.w(t,"div","pptxv-comment-mention-suggestions");r.dataset.testid="pptx-comment-mention-suggestions",r.hidden=true,r.setAttribute("role","listbox"),r.setAttribute("aria-label",n("pptx.comments.mentionSuggestions")),r.title=n("pptx.comments.mentionPlaceholder");let i=[],s=0,a=()=>{r.hidden=true,r.replaceChildren(),i=[];},l=x=>{let b=o.selectionStart??o.value.length,v=chunk24B6ZCFG_cjs.pn(o.value,e.getMentions(),b,x);o.value=v.text,o.setSelectionRange(v.caret,v.caret),e.onChange({text:v.text,mentions:v.mentions}),a(),o.focus();},p=()=>{r.replaceChildren(),i.forEach((x,b)=>{let v=chunkOBVLNSK5_cjs.w(t,"button","pptxv-comment-mention-option");v.type="button",v.dataset.testid="pptx-comment-mention-option",v.setAttribute("role","option"),v.setAttribute("aria-selected",String(b===s)),v.classList.toggle("is-active",b===s),v.textContent=x.name,v.addEventListener("mousedown",f=>{f.preventDefault(),l(x);}),r.appendChild(v);}),r.hidden=i.length===0;},d=()=>{let x=o.selectionStart??o.value.length,b=chunk24B6ZCFG_cjs.nn(o.value,x);if(!b){a();return}i=chunk24B6ZCFG_cjs.on([...e.getAuthors()],b.query),s=0,p();},u=()=>d(),m=x=>{if(!(r.hidden||i.length===0))if(x.key==="ArrowDown")x.preventDefault(),s=(s+1)%i.length,p();else if(x.key==="ArrowUp")x.preventDefault(),s=(s-1+i.length)%i.length,p();else if(x.key==="Enter"||x.key==="Tab"){let b=i[s];b&&(x.preventDefault(),l(b));}else x.key==="Escape"&&(x.preventDefault(),a());},g=()=>a();return o.addEventListener("input",u),o.addEventListener("keydown",m),o.addEventListener("blur",g),{el:r,destroy(){o.removeEventListener("input",u),o.removeEventListener("keydown",m),o.removeEventListener("blur",g);}}}function Bw(e,t,n){e.textContent="";let o=e.ownerDocument,r=chunk24B6ZCFG_cjs.mn(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 s=o.createElement("span");s.className=chunk24B6ZCFG_cjs.ln,s.setAttribute(chunk24B6ZCFG_cjs.kn,i.personId||""),i.authorName&&(s.title=i.authorName),s.textContent=i.text,e.appendChild(s);}return e}function Br(e,t,n,o=()=>[]){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-list"),i=null,s="",a=null,l="",p=[],d=new Set,u=[],m=false,g=()=>{r.replaceChildren(...u.map(C=>h(C,m,0)));},x=(C,w)=>{let P=chunkOBVLNSK5_cjs.w(e,"button","pptxv-inspector-comment-action");return P.type="button",P.textContent=C,P.addEventListener("click",w),P},b=(C,w,P)=>{let k=e.createElement("textarea");return k.className="pptxv-inspector-comment-input",k.rows=2,k.value=C,k.placeholder=w,k.addEventListener("input",()=>P(k.value)),k},v=C=>{let w=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-edit"),P=b(s,"",A=>{s=A;});P.setAttribute("aria-label",t("pptx.comments.edit"));let k=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-actions");return k.append(x(t("pptx.comments.save"),()=>{s.trim()&&n.editComment(C.id,s.trim()),i=null,g();}),x(t("pptx.comments.cancel"),()=>{i=null,g();})),w.append(P,k),w},f=C=>{let w=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-reply-form"),P=b(l,t("pptx.comments.replyPlaceholder",{author:C.author||t("pptx.comments.unknownAuthor")}),T=>{l=T;});P.setAttribute("aria-label",t("pptx.comments.reply"));let k=no({doc:e,t,field:P,getAuthors:o,getMentions:()=>p,onChange:T=>{l=T.text,p=T.mentions;}}),A=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-actions");return A.append(x(t("pptx.comments.addReply"),()=>{l.trim()&&n.addCommentReply(C.id,l.trim(),p),k.destroy(),a=null,l="",p=[],g();}),x(t("pptx.comments.cancel"),()=>{k.destroy(),a=null,g();})),w.append(P,k.el,A),w},S=(C,w)=>{let P=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-actions");return P.appendChild(x(t("pptx.comments.edit"),()=>{i=C.id,s=C.text,g();})),w===0&&P.appendChild(x(t("pptx.comments.reply"),()=>{a=C.id,l="",p=[],g();})),P.append(x(t(C.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>n.toggleCommentResolved(C.id)),x(t("pptx.comments.delete"),()=>n.deleteComment(C.id))),P},y=(C,w,P)=>{let k=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-replies-wrap"),A=C.replies??[],T=chunkOBVLNSK5_cjs.w(e,"button","pptxv-inspector-comment-replies-toggle");if(T.type="button",T.textContent=t("pptx.comments.repliesCount",{count:A.length}),T.setAttribute("aria-expanded",String(!d.has(C.id))),T.addEventListener("click",()=>{d.has(C.id)?d.delete(C.id):d.add(C.id),g();}),k.appendChild(T),!d.has(C.id)){let E=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-replies");E.append(...A.map(L=>h(L,w,P+1))),k.appendChild(E);}return k};function h(C,w,P){let k=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment");k.classList.toggle("is-resolved",C.resolved===true),k.classList.toggle("is-reply",P>0);let A=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-meta");if(A.textContent=C.author||t("pptx.comments.unknownAuthor"),C.resolved){let T=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-comment-badge");T.textContent=t("pptx.comments.resolved"),A.appendChild(T);}if(k.appendChild(A),i===C.id)k.appendChild(v(C));else {let T=chunkOBVLNSK5_cjs.w(e,"p","pptxv-inspector-comment-text");Bw(T,C.text,C.mentions),k.appendChild(T),w&&k.appendChild(S(C,P));}return (C.replies??[]).length>0&&k.appendChild(y(C,w,P)),a===C.id&&k.appendChild(f(C)),k}return {el:r,update(C,w){u=C,m=w,g();}}}function zw(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comments"),r=[],i=Br(e,t,n,()=>r);o.appendChild(i.el);let s=chunkOBVLNSK5_cjs.w(e,"p","pptxv-inspector-empty");s.textContent=t("pptx.comments.noComments"),o.appendChild(s);let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-comment-add"),l=e.createElement("textarea");l.className="pptxv-inspector-comment-input",l.rows=2,l.placeholder=t("pptx.comments.addCommentPlaceholder"),l.setAttribute("aria-label",t("pptx.comments.addComment"));let p=[],d=no({doc:e,t,field:l,getAuthors:()=>r,getMentions:()=>p,onChange:m=>{l.value=m.text,p=m.mentions;}}),u=chunkOBVLNSK5_cjs.w(e,"button","pptxv-inspector-deck-btn");return u.type="button",u.textContent=t("pptx.comments.addComment"),u.addEventListener("click",()=>{let m=l.value.trim();m&&(n.addComment(m,p),l.value="",p=[]);}),a.append(l,d.el,u),o.appendChild(a),{el:o,update(m){r=m.commentMentionAuthors,s.hidden=m.comments.length>0,a.hidden=!m.editable,i.update(m.comments,m.editable);}}}function be(e,t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-section"),o=chunkOBVLNSK5_cjs.w(e,"h4","pptxv-inspector-section-title");o.textContent=t,n.appendChild(o);let r=chunkOBVLNSK5_cjs.w(e,"div");return n.appendChild(r),{el:n,body:r}}function ht(e,t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-row"),o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-label");o.textContent=t;let r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-value");return n.append(o,r),{el:n,value:r}}function $e(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"button","pptxv-inspector-deck-btn");return o.type="button",o.textContent=t,o.addEventListener("click",n),o}function Nw(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideInspector.presentation")),i,s=he(e,{label:t("pptx.presentationSettings.showType"),webComponent:true,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})}),a=oe(e,{label:t("pptx.presentationSettings.loopContinuously"),webComponent:true,onChange:g=>n.updatePresentationSettings({loopContinuously:g})}),l=oe(e,{label:t("pptx.presentationSettings.showNarration"),webComponent:true,onChange:g=>n.updatePresentationSettings({showWithNarration:g})}),p=oe(e,{label:t("pptx.presentationSettings.showAnimation"),webComponent:true,onChange:g=>n.updatePresentationSettings({showWithAnimation:g})}),d=oe(e,{label:t("pptx.presentationSettings.frameSlides"),webComponent:true,onChange:g=>n.updatePresentationSettings({printProperties:chunk24B6ZCFG_cjs.sk(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:chunk24B6ZCFG_cjs.tk(i,g)});});let m=ht(e,t("pptx.presentationSettings.slidesPerPage"));return m.value.appendChild(u),r.append(s.el,a.el,l.el,p.el,d.el,m.el),{el:o,update(g){let x=g.presentationProperties;i=x.printProperties,s.setValue(x.showType??"presented"),a.setValue(!!x.loopContinuously),l.setValue(x.showWithNarration!==false),p.setValue(x.showWithAnimation!==false),d.setValue(chunk24B6ZCFG_cjs.rk(x.printProperties)),e.activeElement!==u&&(u.value=String(chunk24B6ZCFG_cjs.qk(x.printProperties)));for(let b of [s,a,l,p,d])b.setDisabled(!g.editable);u.disabled=!g.editable;}}}function _w(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-slide-size-rescale");o.hidden=true,o.setAttribute("role","group"),o.setAttribute("aria-label",t("pptx.slideSize.rescaleTitle"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-slide-size-rescale-title");r.textContent=t("pptx.slideSize.rescaleTitle");let i=chunkOBVLNSK5_cjs.w(e,"p","pptxv-slide-size-rescale-description");i.textContent=t("pptx.slideSize.rescaleDescription");let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-slide-size-rescale-buttons");function a(l,p,d,u){let m=chunkOBVLNSK5_cjs.w(e,"button","pptxv-slide-size-rescale-btn");return m.type="button",m.dataset.testid=l,m.title=t(d),m.textContent=t(p),m.addEventListener("click",()=>n(u)),m}return s.append(a("pptx-slide-size-rescale-maximize","pptx.slideSize.rescaleMaximize","pptx.slideSize.rescaleMaximizeHint","maximize"),a("pptx-slide-size-rescale-ensure-fit","pptx.slideSize.rescaleEnsureFit","pptx.slideSize.rescaleEnsureFitHint","ensureFit")),o.append(r,i,s),{el:o,show(){o.hidden=false;},hide(){o.hidden=true;}}}var Gw="__custom__";function PI(e,t){return e.widthEmu!==t.widthEmu||e.heightEmu!==t.heightEmu}var AI=[["landscape","pptx.slideSize.landscape"],["portrait","pptx.slideSize.portrait"]];function Uw(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideSize.title")),i=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-select"),s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.slideSize.presets");let a=Q(e);a.className="pptxv-field-select-input",a.dataset.pptxSlideSizePreset="true",a.setAttribute("aria-label",t("pptx.slideSize.presets"));let l=e.createElement("option");l.value=Gw,l.textContent=t("pptx.slideSize.customSize"),l.hidden=true,a.appendChild(l);for(let h of chunk24B6ZCFG_cjs.jj){let C=e.createElement("option");C.value=h.labelKey,C.textContent=t(`pptx.slideSize.preset.${h.labelKey}`),a.appendChild(C);}i.append(s,a),r.appendChild(i);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-slide-size-orientation");p.setAttribute("role","group"),p.setAttribute("aria-label",t("pptx.slideSize.orientation"));let d=AI.map(([h,C])=>{let w=chunkOBVLNSK5_cjs.w(e,"button");return w.type="button",w.dataset.pptxSlideSizeOrientation=h,w.textContent=t(C),p.appendChild(w),{value:h,button:w}});r.appendChild(p);let u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(u);let m={width:0,height:0},g=re(e,{label:"W",min:1,onCommit:h=>n.updateCanvasSize({width:h,height:m.height})}),x=re(e,{label:"H",min:1,onCommit:h=>n.updateCanvasSize({width:m.width,height:h})});u.append(g.el,x.el);let b,v=_w(e,t,h=>{b&&n.applySlideSizeRescale(b,h),b=void 0,v.hide();});r.appendChild(v.el);let f=chunk24B6ZCFG_cjs.nj({current:void 0,canvas:{width:1,height:1}}),S=false;function y(h){if(!S||!PI(h,f.size)){n.updateSlideSize(h);return}b=h,v.show();}return a.addEventListener("change",()=>{let h=chunk24B6ZCFG_cjs.jj.find(C=>C.labelKey===a.value);h&&y(chunk24B6ZCFG_cjs.lj(h,f.orientation));}),d.forEach(({value:h,button:C})=>{C.addEventListener("click",()=>y(chunk24B6ZCFG_cjs.kj(f.size,h)));}),{el:o,update(h){m=h.canvasSize,f=chunk24B6ZCFG_cjs.nj({current:h.slideSize,canvas:h.canvasSize}),S=h.hasDeckElements,l.hidden=f.preset!==void 0,a.value=f.preset?.labelKey??Gw,a.disabled=!h.editable;for(let{value:C,button:w}of d){let P=f.orientation===C;w.classList.toggle("is-active",P),w.setAttribute("aria-pressed",String(P)),w.disabled=!h.editable;}g.setValue(h.canvasSize.width),x.setValue(h.canvasSize.height),g.setDisabled(!h.editable),x.setDisabled(!h.editable),b&&!h.editable&&(b=void 0,v.hide());}}}var vs={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 Kw(e,t,n){let{el:o,body:r}=be(e,t("pptx.documentProperties.themeHeading")),i=Q(e);i.className="pptxv-field-select-input pptxv-inspector-theme-select",i.setAttribute("aria-label",t("pptx.documentProperties.themeHeading")),r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-deck-btn-row"),a=$e(e,t("pptx.documentProperties.applyFirstMaster"),()=>n.applyThemeByPath(i.value,false)),l=$e(e,t("pptx.documentProperties.applyAllMasters"),()=>n.applyThemeByPath(i.value,true));s.append(a,l),r.appendChild(s);let p="";return {el:o,update(d){let u=d.themeOptions.map(g=>g.path).join(`
|
|
2
|
-
`);if(u!==p){p=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 b=e.createElement("option");b.value=x.path,b.textContent=x.name||x.path.split("/").pop()||x.path,i.appendChild(b);}d.themeOptions.some(x=>x.path===g)&&(i.value=g);}}i.disabled=d.themeOptions.length===0;let m=!d.editable||!i.value;a.disabled=m,l.disabled=m;}}}function Ww(e,t,n){let{el:o,body:r}=be(e,t("pptx.themeOverride.heading")),i,s=m=>{let g=i?.activeSlide;if(!g)return;if(!i?.colorScheme){n.updateActiveSlide({clrMapOverride:m});return}let x=chunk24B6ZCFG_cjs.S(g,i.colorScheme,m);n.updateActiveSlide({clrMapOverride:x.clrMapOverride,backgroundColor:x.backgroundColor,elements:x.elements});},a=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),l=me(e);l.setAttribute("aria-label",t("pptx.themeOverride.enableOverride")),l.addEventListener("change",()=>{l.checked?s({...chunk24B6ZCFG_cjs.K}):s(void 0);});let p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.themeOverride.enableOverride"),a.append(l,p),r.appendChild(a);let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-override-rows");r.appendChild(d);let u=(m,g,x)=>{let b=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-override-row"),v=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-label");v.textContent=vs[m],v.title=vs[m];let f=g[m]??chunk24B6ZCFG_cjs.K[m],S=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-override-swatch"),y=i?.colorScheme?.[f];typeof y=="string"&&y&&(S.style.backgroundColor=`#${y.replace(/^#/u,"")}`);let h=Q(e);h.className="pptxv-field-select-input",h.setAttribute("aria-label",vs[m]);for(let C of chunk24B6ZCFG_cjs.g){let w=e.createElement("option");w.value=C,w.textContent=chunk24B6ZCFG_cjs.Qb(chunk24B6ZCFG_cjs.Rb,C,t),h.appendChild(w);}return h.value=f,h.disabled=!x,h.addEventListener("change",()=>{let C={...g,[m]:h.value};for(let w of chunk24B6ZCFG_cjs.J)C[w]||(C[w]=chunk24B6ZCFG_cjs.K[w]);s(C);}),b.append(v,S,h),b};return {el:o,update(m){i=m,o.hidden=!m.activeSlide;let g=m.activeSlide?.clrMapOverride;if(l.checked=g!==void 0,l.disabled=!m.editable,d.replaceChildren(),g)for(let x of chunk24B6ZCFG_cjs.J)d.appendChild(u(x,g,m.editable));}}}function $w(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideBackground.templateBackgroundsHeading"));function i(s,a){let l=chunkOBVLNSK5_cjs.w(e,"label","pptxv-inspector-row"),p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=a,p.title=s.title;let d=e.createElement("input");d.type="color",d.value=chunk24B6ZCFG_cjs.ha(n.getTemplateBackgroundColor(s.path),"#ffffff"),d.addEventListener("change",()=>{n.setTemplateBackground(s.path,d.value),n.pushRecentColor(d.value);});let u=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-value");return u.textContent=s.label,l.append(p,d,u),l}return {el:o,update(s){let a=s.editTemplateMode&&s.activeSlide?chunk24B6ZCFG_cjs.ko(s.activeSlide,s.slideMasters,t("pptx.master.layout"),t("pptx.master.master")):{};o.hidden=!a.layout&&!a.master,r.replaceChildren(),a.layout&&r.appendChild(i(a.layout,t("pptx.master.layout"))),a.master&&r.appendChild(i(a.master,t("pptx.master.master")));}}}function qw(e,t){chunkWBPOPJLC_cjs.a(e);let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-preview"),o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-transition-preview-label");o.textContent=t("pptx.transition.preview");let r=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(e,"span","pptxv-transition-preview-layer is-incoming");i.textContent="B";let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-transition-preview-layer is-outgoing");s.textContent="A",r.append(i,s),n.append(o,r);let a,l,p=()=>{i.style.animation="",s.style.animation="";},d=()=>{if(!a)return;let u=a.durationMs??500,m=chunk24B6ZCFG_cjs.gi(a.type,u,a.direction,a.orient,a.spokes,a.pattern);s.style.zIndex=m.outgoingOnTop?"2":"0",p(),r.offsetWidth,i.style.animation=m.incoming!=="none"?m.incoming:"",s.style.animation=m.outgoing!=="none"?m.outgoing:`pptx-tr-fade-out ${u}ms ease-in-out forwards`,clearTimeout(l),l=setTimeout(p,u+100);};return r.addEventListener("click",d),{el:n,update(u){a=u;let m=!!u&&u?.type!=="none"&&u?.type!=="cut";n.hidden=!m,m||(clearTimeout(l),p());}}}function jw(e,t,n){let{el:o,body:r}=be(e,t("pptx.slideInspector.slideTransition")),i,s=false,a=E=>{let L={...i,...E};i=L,n.updateActiveSlide({transition:L});},l=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-select"),p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.transition.type");let d=Q(e);d.className="pptxv-field-select-input",d.setAttribute("aria-label",t("pptx.transition.type"));for(let E of chunk24B6ZCFG_cjs.ji){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),d.appendChild(L);}d.addEventListener("change",()=>a({type:d.value})),l.append(p,d);let u=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-select"),m=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");m.textContent=t("pptx.transition.speed");let g=Q(e);g.className="pptxv-field-select-input",g.setAttribute("aria-label",t("pptx.transition.speed"));for(let E of chunk24B6ZCFG_cjs.ki){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),g.appendChild(L);}g.addEventListener("change",()=>a({speed:g.value})),u.append(m,g);let x=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-select"),b=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");b.textContent=t("pptx.transition.morphOption");let v=Q(e);v.className="pptxv-field-select-input",v.setAttribute("aria-label",t("pptx.transition.morphOption"));for(let E of chunk24B6ZCFG_cjs.li){let L=e.createElement("option");L.value=E.value,L.textContent=t(E.i18nKey),v.appendChild(L);}v.addEventListener("change",()=>a({morphOption:v.value})),x.append(b,v);let f=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-directions"),S=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-directions"),y=oe(e,{label:t("pptx.transition.thruBlk"),onChange:E=>a({thruBlk:E})}),h=re(e,{label:t("pptx.transition.duration"),min:0,max:1e4,step:10,onCommit:E=>a({durationMs:Math.max(0,Math.min(1e4,Math.round(E)))})}),C=re(e,{label:t("pptx.transition.spokes"),min:1,max:8,onCommit:E=>a({spokes:Math.max(1,Math.min(8,Math.round(E)))})}),w=oe(e,{label:t("pptx.transition.advanceOnClick"),onChange:E=>a({advanceOnClick:E})}),P=chunkOBVLNSK5_cjs.w(e,"p","pptxv-transition-sound"),k=qw(e,t);r.append(l,f,S,y.el,C.el,h.el,u,x,w.el,P,k.el);let A=E=>{f.textContent="";let L=chunk24B6ZCFG_cjs.a[E];if(!L||L.length===0){f.hidden=true;return}f.hidden=false;let M=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label"),D=chunk24B6ZCFG_cjs.mi.has(E);M.textContent=t(D?"pptx.transition.orientation":"pptx.transition.direction"),f.appendChild(M);let I=(V,F)=>{let _=chunkOBVLNSK5_cjs.w(e,"button","pptxv-transition-dir");_.type="button",_.textContent=F;let N=t(`pptx.transition.dir.${V}`);return _.title=N,_.setAttribute("aria-label",N),_.classList.toggle("is-active",(i?.direction??i?.orient)===V),_.disabled=!s,_.addEventListener("click",()=>a(D?{orient:V}:{direction:V})),_};if(D){let V=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-dir-row");for(let F of ["horz","vert"])V.appendChild(I(F,chunk24B6ZCFG_cjs.ni[F]??F));f.appendChild(V);return}let R=chunk24B6ZCFG_cjs.oi(L);if(R.some(V=>V.some(Boolean))){let V=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-dir-grid");for(let F of R)for(let _ of F)_===null?V.appendChild(chunkOBVLNSK5_cjs.w(e,"span","pptxv-transition-dir-gap")):V.appendChild(I(_,chunk24B6ZCFG_cjs.ni[_]??_));f.appendChild(V);return}let B=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-dir-row");for(let V of L)B.appendChild(I(V,chunk24B6ZCFG_cjs.ni[V]??V));f.appendChild(B);},T=E=>{S.textContent="";let L=chunk24B6ZCFG_cjs.b[E];if(!L||L.length===0){S.hidden=true;return}S.hidden=false;let M=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");M.textContent=t("pptx.transition.pattern"),S.appendChild(M);let D=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-dir-row");for(let I of L){let R=chunkOBVLNSK5_cjs.w(e,"button","pptxv-transition-pattern-btn");R.type="button",R.textContent=t(`pptx.transition.pattern.${I}`),R.classList.toggle("is-active",(i?.pattern??L[0])===I),R.disabled=!s,R.addEventListener("click",()=>a({pattern:I})),D.appendChild(R);}S.appendChild(D);};return {el:o,update(E){s=E.editable,i=E.activeSlide?.transition,o.hidden=!E.activeSlide;let L=i?.type??"none";d.value=L,d.disabled=!E.editable,A(L),T(L),y.el.hidden=!chunk24B6ZCFG_cjs.c.has(L),y.setValue(i?.thruBlk===true),y.setDisabled(!E.editable),C.el.hidden=L!=="wheel",C.setValue(i?.spokes??4),C.setDisabled(!E.editable),h.setValue(Math.round(i?.durationMs??320)),h.setDisabled(!E.editable),g.value=i?.speed??"fast",g.disabled=!E.editable,x.hidden=L!=="morph",v.value=i?.morphOption??"byObject",v.disabled=!E.editable,w.setValue(i?.advanceOnClick!==false),w.setDisabled(!E.editable),P.hidden=!i?.soundFileName,P.textContent=i?.soundFileName?`${t("pptx.transition.sound")}: ${i.soundFileName}`:"",k.update(i);}}}function Yw(e,t,n){let{el:o,body:r}=be(e,t("pptx.tags.title")),i=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tags-toggle");i.type="button";let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tags-toggle-label"),a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tags-count");i.append(s,a);let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tags-list"),p=chunkOBVLNSK5_cjs.w(e,"p","pptxv-tags-empty");p.textContent=t("pptx.tags.noTags");let d=$e(e,t("pptx.tags.addTag"),()=>n.updateTagCollections(chunk24B6ZCFG_cjs.Cm(u)));r.append(i,l,p,d);let u=[],m=true,g=false,x=(f,S,y)=>{let h=e.createElement("input");return h.type="text",h.className="pptxv-tags-input",h.value=f,h.placeholder=S,h.setAttribute("aria-label",S),h.disabled=!g,h.addEventListener("change",()=>y(h.value)),h.addEventListener("keydown",C=>C.stopPropagation()),h},b=f=>{let S=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tags-row");if(S.append(x(f.name,t("pptx.tags.name"),y=>n.updateTagCollections(chunk24B6ZCFG_cjs.Am(u,f.colIdx,f.tagIdx,"name",y))),x(f.value,t("pptx.tags.value"),y=>n.updateTagCollections(chunk24B6ZCFG_cjs.Am(u,f.colIdx,f.tagIdx,"value",y)))),g){let y=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tags-remove");y.type="button",y.textContent="\xD7",y.title=t("pptx.tags.deleteTag"),y.setAttribute("aria-label",t("pptx.tags.deleteTag")),y.addEventListener("click",()=>n.updateTagCollections(chunk24B6ZCFG_cjs.Bm(u,f.colIdx,f.tagIdx))),S.appendChild(y);}return S},v=()=>{let f=chunk24B6ZCFG_cjs.zm(u);a.textContent=String(f.length),s.textContent=`${m?"\u25B8":"\u25BE"} ${t("pptx.tags.title")}`,i.setAttribute("aria-expanded",String(!m)),l.hidden=m||f.length===0,p.hidden=m||f.length>0,d.hidden=m||!g,d.disabled=!g,!m&&(l.textContent="",l.append(...f.map(b)));};return i.addEventListener("click",()=>{m=!m,v();}),{el:o,update(f){u=f.tagCollections,g=f.editable,v();}}}var Xw={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 ro(e,t="#000000"){let n=typeof e=="string"?e.startsWith("#")?e:`#${e}`:"";return /^#[0-9a-fA-F]{6}$/u.test(n)?n:t}function Qw(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-slots"),r=new Map;for(let i of chunk24B6ZCFG_cjs.g){let s=chunkOBVLNSK5_cjs.w(e,"label","pptxv-theme-slot"),a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-theme-slot-label");a.textContent=t(Xw[i]);let l=e.createElement("input");l.type="color",l.className="pptxv-theme-slot-input",l.setAttribute("aria-label",t(Xw[i])),l.addEventListener("change",()=>n(i,l.value)),s.append(a,l),o.appendChild(s),r.set(i,l);}return {el:o,update(i,s){for(let[a,l]of r)l.value=ro(i[a]),l.disabled=!s;}}}function Zw(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-presets"),r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");r.textContent=t("pptx.themeEditor.presetThemes");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-preset-grid");o.append(r,i);let s=[];for(let a of chunk24B6ZCFG_cjs.co){let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-theme-preset");l.type="button",l.title=a.name,l.setAttribute("aria-label",a.name);let p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-theme-preset-swatches");for(let u of ["accent1","accent2","accent3","accent4"]){let m=chunkOBVLNSK5_cjs.w(e,"span","pptxv-theme-preset-dot");m.style.background=ro(a.colorScheme[u],"#888888"),p.appendChild(m);}let d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-theme-preset-name");d.textContent=a.name,l.append(p,d),l.addEventListener("click",()=>n(a)),i.appendChild(l),s.push({node:l,preset:a});}return {el:o,update(a,l){for(let{node:p,preset:d}of s)p.classList.toggle("is-active",d.name===a),p.disabled=!l;}}}function hs(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-field-select"),r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");r.textContent=t;let i=Q(e);i.className="pptxv-field-select-input",i.setAttribute("aria-label",t);for(let s of chunk24B6ZCFG_cjs.eo){let a=e.createElement("option");a.value=s,a.textContent=s,i.appendChild(a);}return i.addEventListener("change",()=>n(i.value)),o.append(r,i),{el:o,select:i}}function ys(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 Ss="Calibri Light",Cs="Calibri";function zr(e,t,n){let{el:o,body:r}=be(e,t("pptx.themeEditor.title")),i={colorScheme:void 0,major:Ss,minor:Cs,name:"Custom Theme"},s={...chunk24B6ZCFG_cjs.do},a=Ss,l=Cs,p=false,d=false,u=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-theme-name"),m=chunkOBVLNSK5_cjs.w(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",T=>T.stopPropagation()),g.addEventListener("input",()=>{d=true;}),u.append(m,g);let x=Zw(e,t,T=>{s={...T.colorScheme},a=T.majorFont,l=T.minorFont,g.value=T.name,d=true,k();}),b=Qw(e,t,(T,E)=>{s={...s,[T]:E},d=true,k();}),v=hs(e,t("pptx.themeEditor.headingFont"),T=>{a=T,d=true,k();}),f=hs(e,t("pptx.themeEditor.bodyFont"),T=>{l=T,d=true,k();}),S=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-preview"),y=chunkOBVLNSK5_cjs.w(e,"span","pptxv-theme-preview-heading");y.textContent=t("pptx.themeEditor.headingSample");let h=chunkOBVLNSK5_cjs.w(e,"span","pptxv-theme-preview-body");h.textContent=t("pptx.themeEditor.bodySample"),S.append(y,h);let C=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-deck-btn-row"),w=$e(e,t("pptx.themeEditor.applyToPresentation"),()=>{let T={majorFont:{latin:a},minorFont:{latin:l}};n.applyThemeEdit({colorScheme:s,fontScheme:T,name:g.value}),d=false;}),P=$e(e,t("pptx.themeEditor.reset"),()=>{A(),d=false,k();});C.append(w,P),r.append(u,x.el,b.el,v.el,f.el,S,C);function k(){b.update(s,p),x.update(g.value,p),ys(v.select,a),ys(f.select,l),v.select.disabled=!p,f.select.disabled=!p,g.disabled=!p,w.disabled=!p,P.disabled=!p,S.style.background=ro(s.lt1,"#ffffff"),y.style.color=ro(s.dk2,"#000000"),y.style.fontFamily=a,h.style.color=ro(s.dk1,"#000000"),h.style.fontFamily=l;}function A(){s={...chunk24B6ZCFG_cjs.do,...i.colorScheme??{}},a=i.major,l=i.minor,g.value=i.name;}return {el:o,update(T){p=T.editable,i={colorScheme:T.colorScheme,major:T.fontScheme?.majorFont?.latin??Ss,minor:T.fontScheme?.minorFont?.latin??Cs,name:T.themeName??"Custom Theme"},d||A(),k();}}}function kI(e,t){let{el:n,body:o}=be(e,t("pptx.documentProperties.notesHandoutHeading")),r=ht(e,t("pptx.documentProperties.notesSize")),i=ht(e,t("pptx.master.notesMasterTitle")),s=ht(e,t("pptx.master.handoutMasterTitle"));o.append(r.el,i.el,s.el);let a=t("pptx.digitalSignatures.notAvailable"),l=p=>p===void 0?a:`${p} ${t("pptx.notesMaster.placeholders")}`;return {el:n,update(p){r.value.textContent=p.notesCanvasSize?`${p.notesCanvasSize.width} \xD7 ${p.notesCanvasSize.height}px`:a,i.value.textContent=l(p.notesPlaceholderCount),s.value.textContent=l(p.handoutPlaceholderCount);}}}function II(e,t,n){let{el:o,body:r}=be(e,t("pptx.documentProperties.documentHeading")),i=ht(e,t("pptx.properties.titleLabel")),s=ht(e,t("pptx.properties.author")),a=$e(e,t("pptx.ribbon.documentProperties"),()=>n.openDocumentProperties());return r.append(i.el,s.el,a),{el:o,update(l){i.value.textContent=l.docTitle||"-",s.value.textContent=l.docAuthor||"-";}}}function Jw(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-deck"),r=[Nw(e,t,n),Kw(e,t,n),zr(e,t,n),Ww(e,t,n),$w(e,t,n),jw(e,t,n),Uw(e,t,n),kI(e,t),II(e,t,n),Yw(e,t,n)];return o.append(...r.map(i=>i.el)),{el:o,update(i){for(let s of r)s.update(i);},setVisible(i){o.hidden=!i;}}}function LI(e){return chunk24B6ZCFG_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function eE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-elements"),r=chunkOBVLNSK5_cjs.w(e,"h4","pptxv-inspector-section-title");r.textContent=t("pptx.inspector.layerOrder"),o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-layer-list");o.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"p","pptxv-inspector-empty");return s.textContent=t("pptx.selectionPane.empty"),o.appendChild(s),{el:o,update(a){i.replaceChildren(),s.hidden=a.elements.length>0,[...a.elements].reverse().forEach((l,p)=>{let d=a.elements.length-p-1,u=chunkOBVLNSK5_cjs.w(e,"button","pptxv-inspector-layer-row");u.type="button",u.title=`${l.type}: ${l.id}`,u.classList.toggle("is-selected",a.selectedIds.includes(l.id));let m=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-layer-num");m.textContent=String(d+1);let g=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-layer-label");g.textContent=LI(l),u.append(m,g),u.addEventListener("click",()=>n(l.id)),i.appendChild(u);});}}}function Rt(e,t,n){let o=t("pptx.colorPicker.recentColors"),r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-recent-colors");r.dataset.testid="pptx-color-recent",r.setAttribute("aria-label",o),r.hidden=true;let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-recent-colors-label");i.textContent=o,r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-swatch-grid pptxv-recent-colors-grid");r.appendChild(s);let a=false,l,p=new Map,d=()=>{for(let[u,m]of p)u.classList.toggle("is-selected",m===l);};return {el:r,setColors(u){s.replaceChildren(),p.clear();for(let m of u??[]){let g=chunkOBVLNSK5_cjs.w(e,"button","pptxv-swatch");g.type="button",g.setAttribute("data-pptx-compact",""),g.style.backgroundColor=m,g.title=m,g.setAttribute("aria-label",`Recent ${m}`),g.disabled=a,g.addEventListener("click",()=>n(m)),s.appendChild(g),p.set(g,m);}r.hidden=u.length===0,d();},setDisabled(u){a=u;for(let m of p.keys())m.disabled=u;},setSelected(u){l=u,d();}}}function Ie(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-swatch-grid");o.hidden=true;let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-swatch-grid-label");r.textContent=t("pptx.colorPicker.themeColors"),o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-swatch-grid-rows");o.appendChild(i);let s=false,a,l,p=chunk24B6ZCFG_cjs.zo(void 0),d=[],u=()=>{i.replaceChildren(),d.length=0;let m=chunk24B6ZCFG_cjs.Co(p),g=chunk24B6ZCFG_cjs.Ao(p,a,l);for(let x of m){let b=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-swatch-grid-row");for(let v of x){if(!v){b.appendChild(chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-swatch-grid-empty"));continue}let f=chunkOBVLNSK5_cjs.w(e,"button","pptxv-theme-swatch-grid-swatch");f.type="button",f.setAttribute("data-pptx-compact",""),f.style.backgroundColor=v.hex,f.title=v.label,f.setAttribute("aria-label",v.label),f.disabled=s,f.classList.toggle("is-selected",v===g),f.addEventListener("click",()=>n(chunk24B6ZCFG_cjs.Bo(v))),b.appendChild(f),d.push(f);}i.appendChild(b);}o.hidden=p.length===0;};return {el:o,setThemeColorMap(m){p=chunk24B6ZCFG_cjs.zo(m),u();},setSelected(m,g){a=m,l=g,u();},setDisabled(m){s=m;for(let g of d)g.disabled=m;}}}function tE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-connector-arrows";let r=chunk24B6ZCFG_cjs.eh.map(i=>{let s=MI(e,t,n,i);return o.appendChild(s.select.parentElement),s});return {el:o,update(i){o.hidden=!i.isConnector;for(let{control:s,select:a}of r){let l=i.shapeStyle?.[s.styleKey];a.value=typeof l=="string"&&l.length>0?l:s.fallback,a.disabled=!i.canShape||!i.arrowheadsChangeable;}}}}function MI(e,t,n,o){let r=Q(e);for(let s of o.values){let a=e.createElement("option");a.value=s,a.textContent=chunk24B6ZCFG_cjs.Qb(o.optionLabelKeys,s,t),r.appendChild(a);}r.addEventListener("change",()=>n.setShapeStyle(chunk24B6ZCFG_cjs.fh(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 oE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-shape-effects"),r=he(e,{label:t("pptx.shape.type"),options:chunk24B6ZCFG_cjs.qo.map(f=>({value:f.type,label:t(f.i18nKey)})),onChange:f=>n.setShapeType(f)});o.appendChild(r.el);let i=(f,S,y)=>{let h=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-row"),C=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-label");C.textContent=f;let w=He(e,{label:f,onInput:P=>n.setShapeStyle({[S]:P}),onCommit:n.pushRecentColor},y);return h.append(C,w.el),o.appendChild(h),w},s=(f,S)=>{let y=re(e,{label:f,min:0,onCommit:h=>n.setShapeStyle({[S]:h})});return o.appendChild(y.el),y},a=i(t("pptx.textEffects.shadowColor"),"shadowColor","#000000"),l=s(t("pptx.textEffects.blur"),"shadowBlur"),p=s(t("pptx.shape.shadowDistance"),"shadowDistance"),d=oe(e,{label:t("pptx.effects.rotateWithShape"),onChange:f=>n.setShapeStyle({shadowRotateWithShape:f})});o.appendChild(d.el);let u=i(t("pptx.textEffects.glowColor"),"glowColor","#ffff00"),m=s(t("pptx.textEffects.glow"),"glowRadius"),g=s(t("pptx.shape.softEdges"),"softEdgeRadius"),x=oe(e,{label:t("pptx.textEffects.reflection"),onChange:f=>n.setShapeStyle({reflectionStartOpacity:f?.5:void 0})});o.appendChild(x.el);let b=tE(e,t,n);o.appendChild(b.el);let v=[r,a,l,p,d,u,m,g,x];return {el:o,update(f){let S=f.shapeStyle??{};a.setValue(S.shadowColor??"#000000"),l.setValue(S.shadowBlur??0),p.setValue(S.shadowDistance??0),d.setValue(S.shadowRotateWithShape??true),u.setValue(S.glowColor??"#ffff00"),m.setValue(S.glowRadius??0),g.setValue(S.softEdgeRadius??0),x.setValue(!!S.reflectionStartOpacity),r.setValue(f.shapeType??"rect"),r.el.hidden=!f.shapeType,b.update(f);for(let y of v)y.setDisabled(!f.canShape);}}}var DI="pct20";function nE(e){return `${Math.round(e*100)}%`}function rE(e,t,n,o){let r=n(t("pptx.shape.fillStroke"));r.setAttribute("data-pptx-inspector-section","fill-stroke");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-row"),s=He(e,{label:t("pptx.inspector.fill"),onInput:o.setShapeFill},"#4f86ff"),a=He(e,{label:t("pptx.inspector.line"),onInput:o.setShapeStroke},"#1e3a8a"),l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-label");l.textContent=t("pptx.inspector.fill");let p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=t("pptx.inspector.line"),i.append(l,s.el,p,a.el),r.appendChild(i);let d=Ie(e,t,N=>o.setShapeFill(N.hex,N.ref));r.appendChild(d.el);let u=Ie(e,t,N=>o.setShapeStroke(N.hex,N.ref));r.appendChild(u.el);let m=Rt(e,t,o.setShapeFill);r.appendChild(m.el);let g=Rt(e,t,o.setShapeStroke);r.appendChild(g.el);let x=re(e,{label:t("pptx.ribbon.strokeWidth"),min:0,step:.5,onCommit:o.setShapeStrokeWidth});r.appendChild(x.el);let b=Fe(e,{label:t("pptx.strokeEffects.fillOpacity"),min:0,max:1,step:.01,formatValue:nE,onCommit:o.setFillOpacity});r.appendChild(b.el);let v=Fe(e,{label:t("pptx.strokeEffects.strokeOpacity"),min:0,max:1,step:.01,formatValue:nE,onCommit:o.setStrokeOpacity});r.appendChild(v.el);let f=oe(e,{label:t("pptx.fill.gradient"),onChange(N){N?o.setGradientFill(I):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(f.el);let S=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-gradient");r.appendChild(S);let y=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-row");S.appendChild(y);let h=H(e,{label:t("pptx.gradient.linear"),text:t("pptx.gradient.linear"),onClick:()=>o.setGradientFill({...I,type:"linear"})}),C=H(e,{label:t("pptx.gradient.radial"),text:t("pptx.gradient.radial"),onClick:()=>o.setGradientFill({...I,type:"radial"})});y.append(h.btn,C.btn);let w=re(e,{label:t("pptx.gradient.angle"),min:0,max:360,onCommit:N=>o.setGradientFill({...I,angle:N})});S.appendChild(w.el);let P=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-gradient-stops");S.appendChild(P);let k=H(e,{label:t("pptx.gradient.addStop"),text:t("pptx.gradient.addStop"),onClick:()=>{let N=I.stops,W=N[N.length-1]?.position??100,X=N[N.length-2]?.position??0;o.addGradientStop("#ffffff",Math.round((W+X)/2));}});S.appendChild(k.btn);let A=oe(e,{label:t("pptx.table.fillPattern"),onChange(N){N?o.setShapeStyle({fillMode:"pattern",fillPatternPreset:M,fillPatternBackgroundColor:D}):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(A.el);let T=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-pattern");r.appendChild(T);let E=he(e,{label:t("pptx.table.patternPreset"),options:chunk24B6ZCFG_cjs.ac.map(N=>({value:N.value,label:t(N.labelKey)})),onChange:N=>{M=N,o.setShapeStyle({fillMode:"pattern",fillPatternPreset:N});}});T.appendChild(E.el);let L=He(e,{label:t("pptx.table.patternBackground"),onInput:N=>{D=N,o.setShapeStyle({fillMode:"pattern",fillPatternBackgroundColor:N});},onCommit:o.pushRecentColor},"#ffffff");T.appendChild(L.el);let M=DI,D="#ffffff",I=chunk24B6ZCFG_cjs.Zm(),R=[],O=(N,W,X)=>{P.replaceChildren(),R=N.map((ie,G)=>{let K=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-row"),j=He(e,{label:t("pptx.gradient.stops"),onInput:Me=>o.updateGradientStop(G,{color:Me,colorRef:void 0}),onCommit:o.pushRecentColor},ie.color),Y=re(e,{label:t("pptx.gradient.position"),min:0,max:100,onCommit:Me=>o.updateGradientStop(G,{position:Me})});Y.setValue(ie.position);let ue=H(e,{label:t("pptx.gradient.removeStop"),text:"\u2715",onClick:()=>o.removeGradientStop(G)});ue.setDisabled(N.length<=2),K.append(j.el,Y.el,ue.btn),P.appendChild(K);let Te=Ie(e,t,Me=>o.updateGradientStop(G,chunk24B6ZCFG_cjs.Do(Me)));return Te.setThemeColorMap(W),Te.setSelected(ie.colorRef,ie.color),Te.setDisabled(!X),P.appendChild(Te.el),{color:j,theme:Te,position:Y,remove:ue}});},B=[s,a,x,b,v,f,A],V=[h,C,w,k],F=[E,L],_=oE(e,t,o);return r.appendChild(_.el),{el:r,update(N){r.hidden=!N.hasSelection||!N.canShape,s.setValue(N.fillColor),a.setValue(N.strokeColor),x.setValue(N.strokeWidth),b.setValue(N.fillOpacity),v.setValue(N.strokeOpacity),d.setThemeColorMap(N.themeColorMap),d.setSelected(N.fillColorRef,N.fillColor),d.setDisabled(!N.canShape),u.setThemeColorMap(N.themeColorMap),u.setSelected(N.strokeColorRef,N.strokeColor),u.setDisabled(!N.canShape),m.setColors(N.recentColors??[]),g.setColors(N.recentColors??[]),m.setDisabled(!N.canShape),g.setDisabled(!N.canShape),f.setValue(N.gradientEnabled),w.setValue(N.gradient.angle),I=N.gradient,O(N.gradient.stops,N.themeColorMap,N.canShape),S.hidden=!N.gradientEnabled,_.update(N);let W=N.shapeStyle?.fillMode==="pattern";A.setValue(W),M=N.shapeStyle?.fillPatternPreset??M,D=N.shapeStyle?.fillPatternBackgroundColor??D,E.setValue(M),L.setValue(D),T.hidden=!W;for(let X of B)X.setDisabled(!N.canShape);for(let X of V)X.setDisabled(!N.canShape||!N.gradientEnabled);for(let X of F)X.setDisabled(!N.canShape||!W);for(let X of R)X.color.setDisabled(!N.canShape),X.position.setDisabled(!N.canShape),X.remove.setDisabled(!N.canShape||N.gradient.stops.length<=2);}}}function iE(e,t,n){let o=n(t("pptx.elementType.group")),r=chunkOBVLNSK5_cjs.w(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 aE(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 s=e.createElement("button");s.type="button",s.textContent=t("pptx.image.resetImage"),s.addEventListener("click",o.resetImage),r.append(i,s);let a=V=>`${Math.round(V)}%`,l=Fe(e,{label:t("pptx.imageAdjustments.brightness"),min:-100,max:100,formatValue:a,onCommit:o.setImageBrightness}),p=Fe(e,{label:t("pptx.imageAdjustments.contrast"),min:-100,max:100,formatValue:a,onCommit:o.setImageContrast}),d=Fe(e,{label:t("pptx.image.saturation"),min:-100,max:100,formatValue:a,onCommit:o.setImageSaturation});r.append(l.el,p.el,d.el);let u=e.createElement("label");u.textContent=t("pptx.image.artisticEffects");let m=Q(e);m.setAttribute("aria-label",t("pptx.image.artisticEffects"));for(let[V,F]of chunk24B6ZCFG_cjs.Zn){let _=e.createElement("option");_.value=V,_.textContent=t(F),m.appendChild(_);}m.addEventListener("change",()=>o.setImageEffects({artisticEffect:m.value==="none"?void 0:m.value})),u.appendChild(m);let g=Fe(e,{label:t("pptx.imageAdjustments.transparency"),min:0,max:100,formatValue:a,onCommit:V=>o.setImageEffects({alphaModFix:100-V})}),x=Fe(e,{label:t("pptx.imageAdjustments.biLevelThreshold"),min:0,max:100,formatValue:a,onCommit:V=>o.setImageEffects({biLevel:V})}),b=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-grid"),v={},f=(V,F)=>{let _=e.createElement("label");_.textContent=V;let N=e.createElement("input");return N.type="color",N.addEventListener("input",()=>o.setImageEffects({duotone:{color1:F==="color1"?N.value:v.color1?.value??"#000000",color2:F==="color2"?N.value:v.color2?.value??"#ffffff"}})),_.appendChild(N),b.appendChild(_),N},S=f(t("pptx.image.duotoneDark"),"color1"),y=f(t("pptx.image.duotoneLight"),"color2");v.color1=S,v.color2=y;for(let V of [S,y])V.addEventListener("change",()=>o.pushRecentColor(V.value));r.append(u,g.el,x.el,b);let h=me(e),C=e.createElement("input");C.type="color";let w=40,P=Fe(e,{label:t("pptx.image.washOpacity"),min:0,max:100,formatValue:a,onCommit:V=>{w=V,o.setImageEffects({colorWash:{color:C.value,opacity:V}});}});h.addEventListener("change",()=>o.setImageEffects({colorWash:h.checked?{color:C.value,opacity:w}:void 0})),C.addEventListener("input",()=>o.setImageEffects({colorWash:{color:C.value,opacity:w}})),C.addEventListener("change",()=>o.pushRecentColor(C.value)),r.append(h,C,P.el);let k=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(k);let A=(V,F)=>{let _=re(e,{label:V,min:0,max:90,onCommit:N=>o.setImageCrop(F,N/100)});return k.appendChild(_.el),_},T=A(t("pptx.image.cropLeft"),"left"),E=A(t("pptx.image.cropTop"),"top"),L=A(t("pptx.image.cropRight"),"right"),M=A(t("pptx.image.cropBottom"),"bottom"),D=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-image-alt"),I=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");I.textContent=t("pptx.image.altText");let R=e.createElement("textarea");R.rows=2,R.className="pptxv-image-alt-input",R.placeholder=t("pptx.imageTransform.altTextPlaceholder"),R.setAttribute("aria-label",t("pptx.image.altText")),R.addEventListener("keydown",V=>V.stopPropagation()),R.addEventListener("change",()=>o.setAltText(R.value)),D.append(I,R),r.appendChild(D);let O=[l,p,d],B=[T,E,L,M];return {el:r,update(V){r.hidden=!V.hasSelection||!V.isImage,l.setValue(V.imageBrightness),p.setValue(V.imageContrast),d.setValue(V.imageSaturation),m.value=V.imageArtisticEffect,g.setValue(V.imageTransparency),x.setValue(V.imageBiLevel),S.value=V.imageDuotone1,y.value=V.imageDuotone2,h.checked=!!V.imageColorWash,C.value=V.imageColorWash?.color??"#0066cc",P.setValue(V.imageColorWash?.opacity??40),w=V.imageColorWash?.opacity??40,e.activeElement!==R&&(R.value=V.altText),R.disabled=!V.isImage,T.setValue(V.cropLeft*100),E.setValue(V.cropTop*100),L.setValue(V.cropRight*100),M.setValue(V.cropBottom*100);for(let F of [...O,g,x])F.setDisabled(!V.isImage);m.disabled=!V.isImage,S.disabled=!V.isImage,y.disabled=!V.isImage,i.disabled=!V.isImage,s.disabled=!V.isImage,h.disabled=!V.isImage,C.disabled=!V.isImage,P.setDisabled(!V.isImage);for(let F of B)F.setDisabled(!V.isImage||!V.croppable);}}}function sE(e,t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline"),o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline-times"),r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-media-timeline-time"),i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-media-timeline-time");o.append(r,i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline-bar"),a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline-region"),l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline-playhead"),p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline-handle is-start"),d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline-handle is-end"),u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-media-timeline-marks");s.append(a,u,l,p,d),n.append(o,s);let m={duration:0,trimStartMs:0,trimEndMs:0,canEdit:false},g=b=>{let v=s.getBoundingClientRect();return chunk24B6ZCFG_cjs.Vn(b,v.left,v.width,m.duration||1)};s.addEventListener("click",b=>{b.target===p||b.target===d||t.onSeek(g(b.clientX));});let x=(b,v)=>{b.addEventListener("pointerdown",f=>{if(!m.canEdit)return;f.preventDefault(),f.stopPropagation(),b.setPointerCapture(f.pointerId);let S=h=>{let C=chunk24B6ZCFG_cjs.Xn(v,g(h.clientX),m.duration,m.trimStartMs,m.trimEndMs);t.onTrimChange(Math.round(C.trimStartMs),Math.round(C.trimEndMs));},y=()=>{b.removeEventListener("pointermove",S),b.removeEventListener("pointerup",y),b.removeEventListener("pointercancel",y);};b.addEventListener("pointermove",S),b.addEventListener("pointerup",y),b.addEventListener("pointercancel",y);});};return x(p,"start"),x(d,"end"),{el:n,update(b){m=b;let v=chunk24B6ZCFG_cjs.Wn(b.duration,b.trimStartMs,b.trimEndMs,b.currentTime),f=chunk24B6ZCFG_cjs.Un(b.duration,b.trimEndMs);r.textContent=chunk24B6ZCFG_cjs.Tn(b.trimStartMs/1e3),i.textContent=chunk24B6ZCFG_cjs.Tn(f),a.style.left=`${v.startPercent}%`,a.style.width=`${Math.max(0,v.endPercent-v.startPercent)}%`,l.style.left=`${v.playheadPercent}%`,p.style.left=`${v.startPercent}%`,d.style.left=`${v.endPercent}%`,p.hidden=!b.canEdit,d.hidden=!b.canEdit,u.textContent="";let S=b.duration>0?b.duration:1;for(let y of b.bookmarks){let h=chunkOBVLNSK5_cjs.w(e,"button","pptxv-media-timeline-mark");h.type="button",h.style.left=`${Math.max(0,Math.min(100,y.time/S*100))}%`,h.title=y.label??"",h.setAttribute("aria-label",y.label||chunk24B6ZCFG_cjs.Tn(y.time)),h.addEventListener("click",C=>{C.stopPropagation(),t.onSeek(y.time);}),u.appendChild(h);}}}}function dE(e,t,n,o){let r=n(t("pptx.media.title")),i,s=()=>{let A=Number.isFinite(a.duration)?a.duration:0,T=i?.metadata?.duration??0;return (A||T)*1e3},a=e.createElement("video");a.controls=true,a.preload="metadata",a.className="pptxv-media-preview",a.addEventListener("loadedmetadata",()=>{o.setMediaProperties({metadata:{duration:Number.isFinite(a.duration)?a.duration:void 0,videoWidth:a.videoWidth||void 0,videoHeight:a.videoHeight||void 0}}),k();});let l=e.createElement("img");l.className="pptxv-media-poster",l.alt=t("pptx.media.posterFrame");let p=oe(e,{label:t("pptx.media.autoPlay"),onChange:A=>o.setMediaProperties({autoPlay:A})}),d=oe(e,{label:t("pptx.media.loop"),onChange:A=>o.setMediaProperties({loop:A})}),u=oe(e,{label:t("pptx.media.playAcrossSlides"),onChange:A=>o.setMediaProperties({playAcrossSlides:A})}),m=oe(e,{label:t("pptx.media.fullScreen"),onChange:A=>o.setMediaProperties({fullScreen:A})}),g=oe(e,{label:t("pptx.media.hideWhenNotPlaying"),onChange:A=>o.setMediaProperties({hideWhenNotPlaying:A})}),x=Fe(e,{label:t("pptx.media.volume"),min:0,max:100,formatValue:A=>`${Math.round(A)}%`,onCommit:A=>o.setMediaProperties({volume:A/100})}),b=he(e,{label:t("pptx.media.playbackSpeed"),options:[.5,.75,1,1.25,1.5,2].map(A=>({value:String(A),label:`${A}x`})),onChange:A=>o.setMediaProperties({playbackSpeed:Number(A)})}),v=re(e,{label:t("pptx.media.trimStart"),min:0,onCommit:A=>o.setMediaProperties({trimStartMs:A})}),f=re(e,{label:t("pptx.media.trimEnd"),min:0,onCommit:A=>o.setMediaProperties({trimEndMs:chunk24B6ZCFG_cjs.Sn(s(),A)})}),S=lE(e,t("pptx.media.bookmarks"));S.control.placeholder="12.5 | Intro",S.control.addEventListener("change",()=>o.setMediaProperties({bookmarks:pE(S.control.value).map((A,T)=>{let[E,L=""]=A.split("|").map(M=>M.trim());return {id:`bookmark-${T+1}`,time:Number(E),label:L}}).filter(({time:A})=>Number.isFinite(A))}));let y=lE(e,t("pptx.media.captions"));y.control.placeholder="en | English | captions | captions.vtt",y.control.addEventListener("change",()=>o.setMediaProperties({captionTracks:pE(y.control.value).map((A,T)=>{let[E="",L="",M="captions",D=""]=A.split("|").map(I=>I.trim());return {id:`caption-${T+1}`,language:E,label:L,kind:M,src:D||void 0}})}));let h=e.createElement("output");h.className="pptxv-media-metadata";let C=[p,d,u,m,g],w=false,P=sE(e,{onTrimChange:(A,T)=>{o.setMediaProperties({trimStartMs:A,trimEndMs:T}),v.setValue(A),f.setValue(chunk24B6ZCFG_cjs.Rn(s(),T));},onSeek:A=>{Number.isFinite(a.duration)&&(a.currentTime=A);}}),k=()=>{P.update({duration:Number.isFinite(a.duration)?a.duration:0,trimStartMs:i?.trimStartMs??0,trimEndMs:i?.trimEndMs??0,currentTime:a.currentTime||0,bookmarks:i?.bookmarks??[],canEdit:w});};return a.addEventListener("timeupdate",k),r.append(a,l,P.el,...C.map(({el:A})=>A),x.el,b.el,v.el,f.el,S.label,y.label,h),{el:r,update(A){r.hidden=!A.isMedia;let T=A.media;i=T,w=A.isMedia,k();let E=A.mediaPreviewUrl??"";a.src!==E&&(a.src=E),a.hidden=!E,a.poster=A.mediaPosterUrl??"",l.src=A.mediaPosterUrl??"",l.hidden=!A.mediaPosterUrl,p.setValue(T?.autoPlay??false),d.setValue(T?.loop??false),u.setValue(T?.playAcrossSlides??false),m.setValue(T?.fullScreen??false),g.setValue(T?.hideWhenNotPlaying??false),x.setValue((T?.volume??1)*100),b.setValue(String(T?.playbackSpeed??1)),v.setValue(T?.trimStartMs??0),f.setValue(chunk24B6ZCFG_cjs.Rn(s(),T?.trimEndMs??0)),S.control.value=(T?.bookmarks??[]).map(({time:L,label:M})=>`${L} | ${M}`).join(`
|
|
3
|
-
`),
|
|
4
|
-
`),h.textContent=T?.metadata?`${T.metadata.duration??0}s, ${T.metadata.videoWidth??0} x ${T.metadata.videoHeight??0}, ${T.metadata.codecInfo??T.mediaMimeType??""}`:T?.mediaMimeType??"";for(let L of [...C,x,b,v,f])L.setDisabled(!A.isMedia);S.control.disabled=!A.isMedia,y.control.disabled=!A.isMedia;}}}function lE(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 pE(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function we(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"button","pptxv-parity-backdrop");o.type="button",o.setAttribute("aria-label",t("pptx.common.close"));let r=chunkOBVLNSK5_cjs.w(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 s=chunkOBVLNSK5_cjs.w(e,"header","pptxv-parity-header"),a=chunkOBVLNSK5_cjs.w(e,"h2");a.id=i,a.textContent=n;let l=chunkOBVLNSK5_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.common.close")),s.append(a,l);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-parity-body"),d=chunkOBVLNSK5_cjs.w(e,"footer","pptxv-parity-footer");r.append(s,p,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),l.addEventListener("click",u),queueMicrotask(()=>l.focus()),{backdrop:o,dialog:r,heading:a,body:p,footer:d,close:u}}function ae(e,t,n,o,r=false){let i=chunkOBVLNSK5_cjs.w(e,"button",r?"is-primary":"");return i.type="button",i.textContent=n,i.addEventListener("click",o),t.appendChild(i),i}function qe(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(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 Nr(e,t,n,o,r,i){for(let s of o){let a=chunkOBVLNSK5_cjs.w(e,"label","pptxv-parity-check"),l=e.createElement("input");l.type="radio",l.name=n,l.value=s.value,l.checked=s.value===r,l.addEventListener("change",()=>{l.checked&&i(s.value);}),a.append(l,e.createTextNode(s.label)),t.appendChild(a);}}function cE(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-parity-swatch-row");for(let s of n){let a=e.createElement("button");a.type="button",a.className="pptxv-parity-swatch",a.classList.toggle("is-active",s.key===o);let l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-parity-swatch-preview");l.style.background=s.previewColor;let p=e.createElement("span");p.textContent=s.label,a.append(l,p),a.addEventListener("click",()=>r(s.key)),i.appendChild(a);}t.appendChild(i);}function _r(e,t){let n=chunkOBVLNSK5_cjs.w(e,"p","pptxv-ole-edit-empty");return n.textContent=t,n}function mE(e,t,n,o){if(!n||n.rows.length===0)return _r(e,t("pptx.ole.editDialog.emptySheet"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ole-edit-table-wrap"),i=chunkOBVLNSK5_cjs.w(e,"table","pptxv-ole-edit-table"),s=e.createElement("tbody");return n.rows.forEach((a,l)=>{let p=e.createElement("tr");a.cells.forEach((d,u)=>{let m=e.createElement("td"),g=e.createElement("input");g.type="text",g.value=d.value,g.setAttribute("aria-label",t("pptx.ole.editDialog.cellEditLabel")),g.addEventListener("keydown",x=>x.stopPropagation()),g.addEventListener("blur",()=>{g.value!==d.value&&o(l,u,g.value);}),m.appendChild(g),p.appendChild(m);}),s.appendChild(p);}),i.appendChild(s),r.appendChild(i),r}function uE(e,t,n,o){if(!n||n.length===0)return _r(e,t("pptx.ole.editDialog.emptyDocument"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ole-edit-paragraphs");return n.forEach((i,s)=>{let a=e.createElement("textarea");a.rows=2,a.value=i,a.addEventListener("keydown",l=>l.stopPropagation()),a.addEventListener("blur",()=>{a.value!==i&&o(s,a.value);}),r.appendChild(a);}),r}function xE(e,t,n,o){if(!n||n.length===0)return _r(e,t("pptx.ole.editDialog.deckEmpty"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ole-edit-deck");for(let i of n){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ole-edit-deck-slide"),a=e.createElement("span");a.className="pptxv-ole-edit-deck-caption",a.textContent=t("pptx.ole.editDialog.deckSlideLabel",{number:i.index+1}),s.appendChild(a),i.elements.length===0&&s.appendChild(_r(e,t("pptx.ole.editDialog.deckEmpty")));for(let l of i.elements){let p=e.createElement("input");p.type="text",p.value=l.text,p.addEventListener("keydown",d=>d.stopPropagation()),p.addEventListener("blur",()=>{p.value!==l.text&&o(i.index,l.elementId,p.value);}),s.appendChild(p);}r.appendChild(s);}return r}function gE(e,t,n,o){let r=chunk24B6ZCFG_cjs.Xf(n),i=we(e,t,t(r.titleKey));i.dialog.classList.add("pptxv-ole-edit-dialog");let s=n,a=y=>{s=y,y.oleContentDirty&&o.onUpdateElement(chunk24B6ZCFG_cjs.Yf(y));},l=chunkOBVLNSK5_cjs.w(e,"p","pptxv-ole-edit-loading");l.textContent=t("pptx.ole.editDialog.loading");let p=chunkOBVLNSK5_cjs.w(e,"p","pptxv-ole-edit-error");p.textContent=t("pptx.ole.editDialog.saveError"),p.hidden=true;let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ole-edit-content");i.body.append(l,p,d);let u=()=>i.dialog.isConnected,m=()=>{u()&&(p.hidden=false);},g=y=>{u()&&d.replaceChildren(mE(e,t,y,(h,C,w)=>{(async()=>{try{let P=await chunk24B6ZCFG_cjs.y(s,{row:h,col:C,value:w});a(P);let k=await chunk24B6ZCFG_cjs.u(P);g(k);}catch{m();}})();}));},x=y=>{u()&&d.replaceChildren(uE(e,t,y,(h,C)=>{(async()=>{try{let w=await chunk24B6ZCFG_cjs.z(s,h,C);a(w);let P=await chunk24B6ZCFG_cjs.v(w);x(P);}catch{m();}})();}));},b=y=>{u()&&d.replaceChildren(xE(e,t,y,(h,C,w)=>{(async()=>{try{let P=await chunk24B6ZCFG_cjs.x(s,h,C,w);a(P);let k=await chunk24B6ZCFG_cjs.w(P);b(k);}catch{m();}})();}));},v=()=>{let y=chunkOBVLNSK5_cjs.w(e,"p","pptxv-ole-edit-empty");y.textContent=t("pptx.ole.editDialog.unsupported"),d.replaceChildren(y);};(async()=>{let y=r.contentTab?.kind;try{y==="sheet"?g(await chunk24B6ZCFG_cjs.u(n)):y==="document"?x(await chunk24B6ZCFG_cjs.v(n)):y==="deck"?b(await chunk24B6ZCFG_cjs.w(n)):v();}catch{m();}finally{l.hidden=true;}})();let S=e.createElement("input");S.type="file",S.hidden=true,S.addEventListener("change",()=>{let y=S.files?.[0];S.value="",y&&(async()=>{try{let h=new Uint8Array(await y.arrayBuffer()),C=await chunk24B6ZCFG_cjs.A(s,h,y.name);a(C),i.close();}catch{m();}})();}),i.footer.appendChild(S),ae(e,i.footer,t("pptx.ole.editDialog.replaceFile"),()=>S.click()),ae(e,i.footer,t("pptx.ole.editDialog.save"),()=>i.close(),true);}function bE(e,t,n,o){let r=n(t("pptx.ole.title"));r.classList.add("pptxv-ole-info");let i,s=e.createElement("button");s.type="button",s.textContent=t("pptx.ole.editContent"),s.addEventListener("click",()=>{i&&gE(e,t,i,{onUpdateElement:x=>o.setOleContent(x)});}),r.appendChild(s);let a=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-ole-name"),l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.ole.objectName");let p=e.createElement("input");p.type="text",p.placeholder=t("pptx.ole.objectNamePlaceholder"),p.setAttribute("aria-label",t("pptx.ole.objectName")),p.addEventListener("keydown",x=>x.stopPropagation()),p.addEventListener("change",()=>o.setOleName(p.value)),a.append(l,p),r.appendChild(a);let d=x=>{let b=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ole-row"),v=chunkOBVLNSK5_cjs.w(e,"span");v.textContent=x;let f=chunkOBVLNSK5_cjs.w(e,"span","pptxv-ole-value");return b.append(v,f),r.appendChild(b),{row:b,value:f}},u=d(t("pptx.ole.type")),m=d(t("pptx.ole.fileName")),g=d(t("pptx.ole.linkStatus"));return g.value.classList.add("pptxv-ole-badge"),{el:r,update(x){r.hidden=!x.isOle,x.isOle&&(i=x.oleElement,s.hidden=x.isLocked||x.oleIsLinked,e.activeElement!==p&&(p.value=x.oleName??""),u.value.textContent=chunk24B6ZCFG_cjs.t(x.oleObjectType),m.row.hidden=!x.oleFileName,m.value.textContent=x.oleFileName??"",m.value.title=x.oleFileName??"",g.value.textContent=t(x.oleIsLinked?"pptx.ole.linked":"pptx.ole.embedded"),g.value.classList.toggle("is-linked",x.oleIsLinked));}}}function fE(e,t,n,o,r){let i=n(t("pptx.arrange.positionSize"));i.setAttribute("data-pptx-inspector-section","transform");let s=i.querySelector(".pptxv-inspector-section-title"),a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-lock-row");s?(i.insertBefore(a,s),a.appendChild(s)):i.insertBefore(a,i.firstChild);let l=H(e,{label:t("pptx.inspector.lock"),icon:"lock-open",className:"pptxv-inspector-lock-btn",onClick:r});a.appendChild(l.btn);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-grid");i.appendChild(p);let d=(f,S,y)=>{let h=re(e,{label:f,min:y,onCommit:C=>o({[S]:C})});return p.appendChild(h.el),h},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),b=d(t("pptx.arrange.rotation"),"rotation"),v=[u,m,g,x,b];return {el:i,update(f){i.hidden=!f.hasSelection,u.setValue(f.x),m.setValue(f.y),g.setValue(f.width),x.setValue(f.height),b.setValue(f.rotation);for(let y of v)y.setDisabled(!f.hasSelection);l.setActive(f.isLocked),l.setDisabled(!f.hasSelection);let S=t(f.isLocked?"pptx.inspector.unlock":"pptx.inspector.lock");l.btn.title=S,l.btn.setAttribute("aria-label",S),l.btn.replaceChildren(chunkOBVLNSK5_cjs.K(e,f.isLocked?"lock":"lock-open"));}}}function vE(e,t,n,o){let r=n(t("pptx.shape.quickStyles")),i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-quick-styles"),s=[];for(let a of chunk24B6ZCFG_cjs.$n){let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-quick-style");if(l.type="button",l.title=a.name,l.setAttribute("aria-label",a.name),l.style.background=a.style.fillGradient||a.style.fillColor||"transparent",a.style.strokeColor&&(l.style.border=`${a.style.strokeWidth??1}px solid ${a.style.strokeColor}`),a.style.shadowColor){let p=a.style.shadowOffsetX??2,d=a.style.shadowOffsetY??2;l.style.boxShadow=`${p}px ${d}px ${a.style.shadowBlur??4}px ${a.style.shadowColor}`;}l.addEventListener("click",()=>o.setShapeStyle(a.style)),i.appendChild(l),s.push(l);}return r.appendChild(i),{el:r,update(a){r.hidden=!a.canShape;for(let l of s)l.disabled=!a.canShape;}}}var RI=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function hE(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-layout-grid"),a=new Map;for(let S of chunk24B6ZCFG_cjs.N){let y=chunkOBVLNSK5_cjs.w(e,"button","pptxv-smartart-layout-button");y.type="button",y.dataset.testid=`smartart-layout-${S}`,y.textContent=chunk24B6ZCFG_cjs.Qb(chunk24B6ZCFG_cjs.Tb,S,t),y.addEventListener("click",()=>o.setSmartArtLayout(S)),a.set(S,y),s.appendChild(y);}r.appendChild(s);let l=he(e,{label:t("pptx.smartart.colorScheme"),options:RI.map(S=>({value:S,label:chunk24B6ZCFG_cjs.Qb(chunk24B6ZCFG_cjs.Sb,S,t)})),onChange:o.setSmartArtColorScheme}),p=l.el.querySelector("pptx-ui-select");p&&(p.dataset.testid="smartart-color-scheme"),r.appendChild(l.el);let d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-smartart-label");d.textContent=t("pptx.smartart.textPane"),r.appendChild(d);let u=chunkOBVLNSK5_cjs.w(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 b(S,y){let h=g;if(!h)return;let C=h.nodes.find(T=>T.id===y),w=S.currentTarget.value,P=!w,k=chunk24B6ZCFG_cjs.E(h,y,w),A=w!==C?.text;if(S.key==="Enter"){S.preventDefault();let T=chunk24B6ZCFG_cjs.Yi(k,y);T?(x=T.focusNodeId??null,o.replaceSmartArtData(T.data)):A&&o.replaceSmartArtData(k);}else if((S.key==="Backspace"||S.key==="Delete")&&P){if(!C?.parentId&&!chunk24B6ZCFG_cjs.Wi(h.resolvedLayoutType,chunk24B6ZCFG_cjs.Xi(h)))return;S.preventDefault();let E=chunk24B6ZCFG_cjs.Zi(h,y);E&&(x=E.focusNodeId??null,o.replaceSmartArtData(E.data));}else if(S.key==="Tab"&&!S.shiftKey){S.preventDefault();let T=chunk24B6ZCFG_cjs._i(k,y);T?(x=y,o.replaceSmartArtData(T)):A&&o.replaceSmartArtData(k);}else if(S.key==="Tab"&&S.shiftKey){S.preventDefault();let T=chunk24B6ZCFG_cjs.$i(k,y);T?(x=y,o.replaceSmartArtData(T)):A&&o.replaceSmartArtData(k);}}let v="",f=S=>{let y=S.smartArtData;g=y;let h=y?.nodes.map(C=>C.id).join("|")??"";if(h===v){let C=u.querySelectorAll('[data-testid="smartart-node-text"]');y?.nodes.forEach((w,P)=>{let k=C[P];k&&e.activeElement!==k&&(k.value=w.text);});return}v=h,u.replaceChildren();for(let[C,w]of (y?.nodes??[]).entries()){let P=chunkOBVLNSK5_cjs.w(e,"label","pptxv-smartart-node"),k=chunkOBVLNSK5_cjs.w(e,"span","pptxv-smartart-node-index");k.textContent=String(C+1);let A=e.createElement("input");A.type="text",A.className="pptxv-smartart-node-input",A.dataset.testid="smartart-node-text",A.dataset.nodeId=w.id,A.setAttribute("aria-label",`${t("pptx.smartart.item")} ${C+1}`),A.value=w.text,A.addEventListener("change",()=>o.setSmartArtNodeText(w.id,A.value)),A.addEventListener("keydown",I=>b(I,w.id));let T=e.createElement("input");T.type="color",T.value=w.style?.fillColor??"#3b82f6",T.title=t("pptx.inspector.fill"),T.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fillColor:T.value})),T.addEventListener("change",()=>o.pushRecentColor(T.value));let E=e.createElement("input");E.type="color",E.value=w.style?.fontColor??"#ffffff",E.title=t("pptx.table.color"),E.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fontColor:E.value})),E.addEventListener("change",()=>o.pushRecentColor(E.value));let L=e.createElement("button");L.type="button",L.textContent="B",L.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{bold:!w.style?.bold}));let M=e.createElement("button");M.type="button",M.textContent="I",M.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{italic:!w.style?.italic}));let D=chunkOBVLNSK5_cjs.w(e,"span","pptxv-smartart-hierarchy");for(let[I,R]of [["addChild","pptx.smartArt.addSubItem"],["promote","pptx.smartart.promote"],["demote","pptx.smartart.demote"],["remove","pptx.common.delete"]]){let O=e.createElement("button");O.type="button",O.textContent=t(R),O.addEventListener("click",()=>o.mutateSmartArtNode(w.id,I)),D.appendChild(O);}P.append(k,A,T,E,L,M,D),u.appendChild(P);}};return {el:r,update(S){r.hidden=!S.isSmartArt;let y=S.smartArtData?.resolvedLayoutType;for(let[h,C]of a)C.disabled=!S.isSmartArt,C.classList.toggle("is-active",h===y),C.setAttribute("aria-pressed",String(h===y));if(l.setValue(S.smartArtData?.colorScheme??"colorful1"),l.setDisabled(!S.isSmartArt),m.disabled=!S.isSmartArt,f(S),x){let h=x;x=null,u.querySelector(`[data-testid="smartart-node-text"][data-node-id="${h}"]`)?.focus();}}}}function yE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"section","pptxv-inspector-section pptxv-table-grid");o.setAttribute("aria-label",t("pptx.tableDataEditor.ariaLabel"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-header"),i=chunkOBVLNSK5_cjs.w(e,"h4","pptxv-inspector-section-title");i.textContent=t("pptx.inspector.tableData");let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-toolbar");r.append(i,s);let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-scroll"),l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-body");l.setAttribute("role","grid"),a.appendChild(l),o.append(r,a);let p,d,u=true,m=T=>{!p||T===p||!T.tableData||n.setTableData(T.tableData,T.rawXml);},g=(T,E,L)=>{let M=chunkOBVLNSK5_cjs.w(e,"button","pptxv-table-grid-btn");return M.type="button",M.textContent=t(`pptx.tableDataEditor.${T}`),M.title=t(`pptx.tableDataEditor.${E}`),M.addEventListener("click",()=>{p&&m(L(p));}),M},x=g("addRowLabel","addRowTitle",chunk24B6ZCFG_cjs.ze),b=g("removeRowLabel","removeRowTitle",chunk24B6ZCFG_cjs.Ae),v=g("addColumnLabel","addColumnTitle",chunk24B6ZCFG_cjs.Be),f=g("removeColumnLabel","removeColumnTitle",chunk24B6ZCFG_cjs.Ce);s.append(x,b,v,f);let S=T=>{let E=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-head");E.setAttribute("role",T.role),T.role==="rowheader"&&E.classList.add("pptxv-table-grid-gutter");let L=e.createElement("span");if(L.textContent=T.text,E.appendChild(L),u&&T.canRemove){let M=chunkOBVLNSK5_cjs.w(e,"button","pptxv-table-grid-remove");M.type="button",M.textContent="\xD7",M.title=T.removeLabel,M.setAttribute("aria-label",T.removeLabel),M.addEventListener("click",T.onRemove),E.appendChild(M);}return E},y=T=>{let E=e.createElement("input");return E.type="text",E.className="pptxv-table-grid-input",E.value=T.text,E.disabled=!u,E.dataset.pptxRow=String(T.rowIndex),E.dataset.pptxCol=String(T.colIndex),E.setAttribute("aria-label",t("pptx.tableDataEditor.cellAriaLabel",{row:T.rowIndex+1,column:T.colIndex+1})),E.addEventListener("change",()=>{p&&m(chunk24B6ZCFG_cjs.ue(p,T.rowIndex,T.colIndex,E.value));}),E.addEventListener("keydown",L=>L.stopPropagation()),E},h=(T,E)=>S({role:"columnheader",text:String(T+1),removeLabel:t("pptx.tableDataEditor.removeColumnN",{number:T+1}),canRemove:E,onRemove:()=>{p&&m(chunk24B6ZCFG_cjs.ye(p,T));}}),C=(T,E)=>S({role:"rowheader",text:String(T+1),removeLabel:t("pptx.tableDataEditor.removeRowN",{number:T+1}),canRemove:E,onRemove:()=>{p&&m(chunk24B6ZCFG_cjs.we(p,T));}}),w=T=>{let E=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-row");E.setAttribute("role","row");let L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-head pptxv-table-grid-gutter");L.setAttribute("role","columnheader"),E.appendChild(L);for(let M of T.colIndices)E.appendChild(h(M,T.canRemoveColumn));return E},P=T=>{l.textContent="",l.appendChild(w(T));for(let E of T.rows){let L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-row");L.setAttribute("role","row"),L.appendChild(C(E.rowIndex,T.canRemoveRow));for(let M of E.cells){let D=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-grid-cell");D.setAttribute("role","gridcell"),D.appendChild(y(M)),L.appendChild(D);}l.appendChild(L);}},k=()=>{let T=e.activeElement;if(!T||T.tagName!=="INPUT"||!l.contains(T))return null;let{pptxRow:E,pptxCol:L}=T.dataset;return E!==void 0&&L!==void 0?[E,L]:null},A=()=>{s.hidden=!u;for(let T of l.querySelectorAll("input"))T.disabled=!u;for(let T of l.querySelectorAll(".pptxv-table-grid-remove"))T.hidden=!u;};return {el:o,update(T){p=T.tableElement;let E=p?chunk24B6ZCFG_cjs.te(p):void 0,L=T.hasSelection&&T.isTable&&E!==void 0&&E.rowCount>0&&E.colCount>0;if(o.hidden=!L,!L||!E||!p){d=void 0,l.textContent="";return}if(s.hidden=!u,x.disabled=!u,v.disabled=!u,b.disabled=!u||!E.canRemoveRow,f.disabled=!u||!E.canRemoveColumn,p.tableData===d)return;let M=k();d=p.tableData,P(E),M&&l.querySelector(`input[data-pptx-row="${M[0]}"][data-pptx-col="${M[1]}"]`)?.focus();},setEditable(T){u=T,A(),d=void 0;}}}function SE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tsef"),r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tsef-group"),i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tsef-hdg");i.textContent=t("pptx.tableStyleEditor.fillSection");let s=e.createElement("input");s.type="color",s.addEventListener("input",()=>n({kind:"fillColor",hex:s.value,ref:void 0}));let a=chunkOBVLNSK5_cjs.w(e,"label","pptxv-tsef-check"),l=me(e);l.addEventListener("change",()=>n({kind:"fillNone",noFill:l.checked})),a.append(l,e.createTextNode(t("pptx.tableStyleEditor.noFill")));let p=Ie(e,t,h=>n({kind:"fillColor",hex:h.hex,ref:h.ref}));r.append(i,s,a,p.el);let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tsef-group"),u=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tsef-hdg");u.textContent=t("pptx.tableStyleEditor.textSection");let m=ws(e,t("pptx.format.bold"),()=>n({kind:"textBold",value:!m.classList.contains("active")})),g=ws(e,t("pptx.format.italic"),()=>n({kind:"textItalic",value:!g.classList.contains("active")})),x=ws(e,t("pptx.format.underline"),()=>n({kind:"textUnderline",value:!x.classList.contains("active")})),b=e.createElement("input");b.type="color",b.addEventListener("input",()=>n({kind:"textColor",hex:b.value,ref:void 0}));let v=Ie(e,t,h=>n({kind:"textColor",hex:h.hex,ref:h.ref}));d.append(u,m,g,x,b,v.el);let f=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tsef-group"),S=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tsef-hdg");S.textContent=t("pptx.tableStyleEditor.bordersSection");let y=new Map;for(let h of chunk24B6ZCFG_cjs.ts){let C=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tsef-border-row"),w=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tsef-side-lbl");w.textContent=t(chunk24B6ZCFG_cjs.us[h]);let P=e.createElement("input");P.type="color",P.addEventListener("input",()=>n({kind:"borderColor",side:h,hex:P.value,ref:void 0}));let k=e.createElement("input");k.type="number",k.min="0",k.max="20",k.addEventListener("change",()=>n({kind:"borderWidth",side:h,width:Number(k.value)}));let A=Q(e);for(let L of chunk24B6ZCFG_cjs.vs){let M=e.createElement("option");M.value=L,M.textContent=L,A.appendChild(M);}A.addEventListener("change",()=>n({kind:"borderDash",side:h,dash:A.value}));let T=chunkOBVLNSK5_cjs.w(e,"label","pptxv-tsef-check"),E=me(e);E.addEventListener("change",()=>n({kind:"borderNone",side:h,noFill:E.checked})),T.append(E,e.createTextNode(t("pptx.tableStyleEditor.noBorder"))),C.append(w,P,k,A,T),f.appendChild(C),y.set(h,{color:P,width:k,dash:A,noFill:E});}return o.append(r,d,f),{el:o,update(h,C,w){if(s.value=h.fill.color.hex,s.disabled=!w,l.checked=h.fill.noFill,l.disabled=!w,p.setThemeColorMap(C),p.setSelected(h.fill.color.ref,h.fill.color.hex),p.setDisabled(!w),d.hidden=!h.hasTextAndBorders,f.hidden=!h.hasTextAndBorders,!!h.hasTextAndBorders){m.classList.toggle("active",h.text.bold),g.classList.toggle("active",h.text.italic),x.classList.toggle("active",h.text.underline);for(let P of [m,g,x])P.disabled=!w;b.value=h.text.color.hex,b.disabled=!w,v.setThemeColorMap(C),v.setSelected(h.text.color.ref,h.text.color.hex),v.setDisabled(!w);for(let[P,k]of y){let A=h.borders[P];k.color.value=A.color.hex,k.color.disabled=!w,k.width.value=String(A.width),k.width.disabled=!w,k.dash.value=A.dash,k.dash.disabled=!w,k.noFill.checked=A.noFill,k.noFill.disabled=!w;}}}}}function ws(e,t,n){let o=e.createElement("button");return o.type="button",o.className="pptxv-tsef-toggle",o.textContent=t,o.addEventListener("click",n),o}function CE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tse"),r=e.createElement("button");r.type="button",r.className="pptxv-tse-btn",r.textContent=t("pptx.tableStyleEditor.editButton");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tse-panel");i.dataset.testid="table-style-editor",i.hidden=true,o.append(r,i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tse-header"),a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tse-heading");a.textContent=t("pptx.tableStyleEditor.title");let l=e.createElement("button");l.type="button",l.textContent=t("pptx.tableStyleEditor.close"),l.addEventListener("click",()=>h(false)),s.append(a,l);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tse-empty");p.textContent=t("pptx.tableStyleEditor.noStyleSelected");let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tse-parts"),u=new Map,m="wholeTbl";chunk24B6ZCFG_cjs.ss.forEach(w=>{let P=e.createElement("button");P.type="button",P.textContent=t(w.labelKey),P.addEventListener("click",()=>{m=w.id,C();}),u.set(w.id,P),d.appendChild(P);});let g=SE(e,t,w=>{let P=n.getTableStyleMap(),k=P?.[chunk24B6ZCFG_cjs.V(f)];if(!P||!k)return;let{entry:A}=chunk24B6ZCFG_cjs.xs(k,m,w);n.onStyleMapChange({...P,[A.styleId]:A});}),x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tse-actions"),b=e.createElement("button");b.type="button",b.textContent=t("pptx.tableStyleEditor.newFromCurrent"),b.addEventListener("click",()=>{let w=n.getTableStyleMap(),P=w?.[chunk24B6ZCFG_cjs.V(f)],k=e.defaultView?.prompt(t("pptx.tableStyleEditor.newStyleNamePrompt"),P?`${P.styleName??""} Copy`.trim():"");if(!k)return;let A={...w??{}},T=chunk24B6ZCFG_cjs.W(A,{styleName:k,basedOn:P});chunk24B6ZCFG_cjs.X(A,T),n.onStyleMapChange(A),f=T.styleId,n.onAssignStyle?.(T.styleId),C();});let v=e.createElement("button");v.type="button",v.textContent=t("pptx.tableStyleEditor.deleteStyle"),v.addEventListener("click",()=>{let w=n.getTableStyleMap(),P=w?.[chunk24B6ZCFG_cjs.V(f)];if(!w||!P||!e.defaultView?.confirm(t("pptx.tableStyleEditor.deleteConfirm")))return;let k={...w};chunk24B6ZCFG_cjs.Y(k,P.styleId),n.onStyleMapChange(k),n.onDeleteStyle(P.styleId),h(false);}),x.append(b,v),i.append(s,p,d,g.el,x);let f="",S=true,y=false;function h(w){y=w,i.hidden=!y,y&&C();}function C(){let w=n.getTableStyleMap(),P=f?w?.[f]:void 0;p.hidden=!!P,d.hidden=!P,g.el.hidden=!P,v.hidden=!P,b.textContent=t(P?"pptx.tableStyleEditor.newFromCurrent":"pptx.tableStyleEditor.newStyle");for(let[k,A]of u)A.classList.toggle("active",k===m),A.disabled=!S;if(b.disabled=!S,v.disabled=!S,P){let k=chunk24B6ZCFG_cjs.ws(P,m,n.getThemeColorMap());k&&g.update(k,n.getThemeColorMap(),S);}}return r.addEventListener("click",()=>h(!y)),{el:o,update(w,P){f=w?chunk24B6ZCFG_cjs.V(w):"",S=P,r.disabled=!P,y&&C();}}}var OI=["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"];function wE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=P=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],P);},s=(P,k,A)=>{let T=e.createElement("label");T.textContent=P;let E=Q(e);E.setAttribute("aria-label",P);for(let L of k){let M=e.createElement("option");M.value=L,M.textContent=A?chunk24B6ZCFG_cjs.Qb(A,L,t):L,E.appendChild(M);}return T.appendChild(E),o.appendChild(T),E},a=P=>{let k=e.createElement("label");k.textContent=P;let A=e.createElement("input");return A.type="color",A.addEventListener("change",()=>n.pushRecentColor(A.value)),k.appendChild(A),o.appendChild(k),A},l=s(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),p=s(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=a(t("pptx.table.gradientStart")),m=a(t("pptx.table.gradientEnd")),g=s(t("pptx.table.patternPreset"),OI,chunk24B6ZCFG_cjs.$b),x=a(t("pptx.table.patternForeground")),b=a(t("pptx.table.patternBackground")),v=s(t("pptx.table.cellBorders"),["top","right","bottom","left"]),f=a(t("pptx.table.borderColor")),S=e.createElement("input");S.type="number",S.min="0",S.max="20",S.title=t("pptx.table.borderWidth"),o.appendChild(S);let y=()=>i({fillMode:"gradient",gradientFillType:p.value,gradientFillAngle:Number(d.value),gradientFillStops:[{color:u.value,position:0},{color:m.value,position:100}]});l.addEventListener("change",()=>i({fillMode:l.value}));for(let P of [p,d,u,m])P.addEventListener("change",y);let h=()=>i({fillMode:"pattern",patternFillPreset:g.value,patternFillForeground:x.value,patternFillBackground:b.value});for(let P of [g,x,b])P.addEventListener("change",h);let C=()=>{let P=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;i({[`border${P}Color`]:f.value,[`border${P}Width`]:Number(S.value)});};for(let P of [v,f,S])P.addEventListener("change",C);let w=o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox");return {el:o,update(P){r=P,o.hidden=!P.selectedTableCell;let k=P.tableCellStyle??{};l.value=k.fillMode??"solid",p.value=k.gradientFillType??"linear",d.value=String(k.gradientFillAngle??90),u.value=k.gradientFillStops?.[0]?.color??"#ff0000",m.value=k.gradientFillStops?.at(-1)?.color??"#0000ff",g.value=k.patternFillPreset??"ltDnDiag",x.value=k.patternFillForeground??"#000000",b.value=k.patternFillBackground??"#ffffff";let A=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;f.value=String(k[`border${A}Color`]??"#374151"),S.value=String(k[`border${A}Width`]??1);for(let T of w)T.disabled=!P.isTable;}}}var HI={left:"pptx.textPanel.alignLeft",center:"pptx.textPanel.alignCenter",right:"pptx.textPanel.alignRight"},FI={top:"pptx.textPanel.valignTop",middle:"pptx.textPanel.valignMiddle",bottom:"pptx.textPanel.valignBottom"};function Es(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function EE(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,s=[],a=L=>{i&&n.setTableCellStyles(s.length>0?s:[i],L);},l=(L,M)=>{let D=e.createElement("label"),I=e.createElement("span");return I.textContent=L,M.setAttribute("aria-label",L),D.append(I,M),o.appendChild(D),D},p=(L,M)=>{let D=e.createElement("input");return D.type="number",D.addEventListener("change",()=>M(Number(D.value))),l(L,D),D},d=(L,M)=>{let D=e.createElement("input");return D.type="color",D.addEventListener("input",()=>a({[M]:D.value})),D.addEventListener("change",()=>n.pushRecentColor(D.value)),l(L,D),D},u=(L,M,D,I)=>{let R=e.createElement("input");R.type="color",R.addEventListener("input",()=>a({[M]:R.value,[D]:void 0})),R.addEventListener("change",()=>n.pushRecentColor(R.value)),l(L,R);let O=Ie(e,t,B=>a(I(B)));return o.appendChild(O.el),{input:R,theme:O}},m=(L,M)=>{let D=me(e);return D.addEventListener("change",()=>a({[M]:D.checked})),l(L,D),D},g=(L,M,D,I)=>{let R=Q(e);for(let O of M){let B=e.createElement("option");B.value=O,B.textContent=chunk24B6ZCFG_cjs.Qb(D,O,t),R.appendChild(B);}return R.addEventListener("change",()=>I(R.value)),l(L,R),R},x=p(t("pptx.table.fontSize"),L=>a({fontSize:L})),{input:b,theme:v}=u(t("pptx.table.color"),"color","colorRef",chunk24B6ZCFG_cjs.Fo),{input:f,theme:S}=u(t("pptx.table.background"),"backgroundColor","backgroundColorRef",chunk24B6ZCFG_cjs.Eo),y=d(t("pptx.table.cellBorders"),"borderColor"),h=p(t("pptx.table.borderWidth"),L=>a({borderTopWidth:L,borderRightWidth:L,borderBottomWidth:L,borderLeftWidth:L})),C=p(t("pptx.table.cellPadding"),L=>a({marginLeft:L,marginRight:L,marginTop:L,marginBottom:L})),w=m(t("pptx.format.bold"),"bold"),P=m(t("pptx.format.italic"),"italic"),k=m(t("pptx.format.underline"),"underline"),A=g(t("pptx.table.alignment"),["left","center","right"],HI,L=>a({align:L})),T=g(t("pptx.table.verticalAlignment"),["top","middle","bottom"],FI,L=>a({vAlign:L})),E=[x,b,f,y,h,C,w,P,k,A,T];return {el:o,update(L){if(i=L.selectedTableCell,s=L.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let M=L.tableCellStyle??{};x.value=String(M.fontSize??14),b.value=Es(M.color,"#000000"),f.value=Es(M.backgroundColor,"#ffffff"),y.value=Es(M.borderColor,"#374151"),v.setThemeColorMap(L.themeColorMap),v.setSelected(M.colorRef,M.color),v.setDisabled(!L.isTable),S.setThemeColorMap(L.themeColorMap),S.setSelected(M.backgroundColorRef,M.backgroundColor),S.setDisabled(!L.isTable),h.value=String(M.borderTopWidth??1),C.value=String(M.marginLeft??4),w.checked=!!M.bold,P.checked=!!M.italic,k.checked=!!M.underline,A.value=M.align??"left",T.value=M.vAlign??"top";for(let D of E)D.disabled=!L.isTable;}}}function TE(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},s=u=>u.selectedTableCell,a=u=>m=>{let g=s(m);g&&n.mutateTableStructure(g,u);},l=[i(t("pptx.table.insertAbove"),a("insertRowAbove")),i(t("pptx.table.insertBelow"),a("insertRowBelow")),i(t("pptx.table.deleteRow"),a("deleteRow")),i(t("pptx.table.insertLeft"),a("insertColumnLeft")),i(t("pptx.table.insertRight"),a("insertColumnRight")),i(t("pptx.table.deleteColumn"),a("deleteColumn")),i(t("pptx.table.mergeSelected"),u=>n.mergeTableCells(u.selectedTableCells)),i(t("pptx.table.split"),u=>{let m=s(u);m&&n.splitTableCell(m);})],p=e.createElement("input");p.type="number",p.min="5",p.max="95",p.title=t("pptx.table.columnWidths"),p.addEventListener("change",()=>{let u=r&&s(r);u&&n.setTableColumnWidth(u.column,Number(p.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&&s(r);u&&n.setTableRowHeight(u.row,Number(d.value));}),o.append(p,d),{el:o,update(u){r=u;let m=s(u);o.hidden=!m,p.value=m?String(Math.round((u.tableColumnWidths[m.column]??0)*100)):"",d.value=m?String(u.tableRowHeights[m.row]??32):"";for(let g of l)g.disabled=!m;l[6].disabled=u.selectedTableCells.length<2,p.disabled=!m,d.disabled=!m;}}}function PE(e,t,n,o,r){let i=n(t("pptx.inspector.table")),s=oe(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=oe(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),l=oe(e,{label:t("pptx.table.bandedColumns"),onChange:E=>o.setTableOptions({bandedColumns:E})}),p=oe(e,{label:t("pptx.table.totalRow"),onChange:E=>o.setTableOptions({lastRow:E})}),d=oe(e,{label:t("pptx.table.firstColumn"),onChange:E=>o.setTableOptions({firstCol:E})}),u=oe(e,{label:t("pptx.table.lastColumn"),onChange:E=>o.setTableOptions({lastCol:E})}),m=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:E=>o.setTableOptions({rtl:E})});i.append(s.el,a.el,l.el,p.el,d.el,u.el,m.el);let g,x=chunkOBVLNSK5_cjs.w(e,"span","pptxv-table-presets-label");x.textContent=t("pptx.table.stylePresets");let b=E=>{g&&o.setTableOptions({rows:chunk24B6ZCFG_cjs.Fe(g,E)});},v=chunkOBVLNSK5_cjs.w(e,"div","pptxv-table-presets-grid");v.append(...chunk24B6ZCFG_cjs.Ee.map(E=>{let L=chunkOBVLNSK5_cjs.w(e,"button","pptxv-table-preset-swatch");L.type="button",L.title=E.label,L.setAttribute("aria-label",E.label);let M=chunkOBVLNSK5_cjs.w(e,"span");M.style.background=E.headerBg;let D=chunkOBVLNSK5_cjs.w(e,"span");D.style.background=E.bandBg;let I=chunkOBVLNSK5_cjs.w(e,"span");return I.style.borderTopColor=E.borderColor,L.append(M,D,I),L.addEventListener("click",()=>b(E)),L})),i.append(x,v);let f=re(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});i.appendChild(f.el);let S=e.createElement("input");S.placeholder=t("pptx.table.styleId"),S.addEventListener("change",()=>o.setTableOptions({tableStyleId:S.value}));let y=e.createElement("input");y.type="color",y.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:y.value})),y.addEventListener("change",()=>o.pushRecentColor(y.value));let h=e.createElement("input");h.type="color",h.addEventListener("input",()=>o.setTableOptions({},{borderColor:h.value})),h.addEventListener("change",()=>o.pushRecentColor(h.value)),i.append(S,y,h);let C=r?CE(e,t,r):void 0;C&&i.appendChild(C.el);let w=EE(e,t,o),P=wE(e,t,o),k=TE(e,t,o);i.append(w.el,P.el,k.el);let A=[s,a,l,p,d,u,m],T=[f];return {el:i,update(E){i.hidden=!E.hasSelection||!E.isTable,g=E.tableElement?.tableData;for(let L of v.children)L.disabled=!E.isTable;s.setValue(E.tableHeaderRow),a.setValue(E.tableBandedRows),l.setValue(E.tableBandedColumns),p.setValue(E.tableLastRow),d.setValue(E.tableFirstCol),u.setValue(E.tableLastCol),m.setValue(E.tableRtl),f.setValue(E.tableCellPadding),S.value=E.tableStyleId,y.value=E.tableCellBackground,h.value=E.tableCellBorder,w.update(E),P.update(E),k.update(E);for(let L of A)L.setDisabled(!E.isTable);S.disabled=!E.isTable,y.disabled=!E.isTable,h.disabled=!E.isTable,C?.update(E.isTable?E.tableStyleId:void 0,E.isTable);for(let L of T)L.setDisabled(!E.isTable);}}}var kE=12700;function Ts(e){return e?Math.round(e/kE):0}function Gr(e){return Math.round(e*kE)}function Ps(e,t,n){return Math.max(t,Math.min(n,e))}function AE(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-text3d-bevel"),s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-text3d-bevel-label");s.textContent=n;let a=he(e,{label:`${n} ${t("pptx.text3d.bevelType")}`,options:chunk24B6ZCFG_cjs.ao.map(({value:d,label:u})=>({value:d,label:u})),onChange:d=>o({[r.type]:d})}),l=re(e,{label:`${n} ${t("pptx.text3d.bevelWidth")}`,min:0,max:50,onCommit:d=>o({[r.width]:Gr(Ps(d,0,50))})}),p=re(e,{label:`${n} ${t("pptx.text3d.bevelHeight")}`,min:0,max:50,onCommit:d=>o({[r.height]:Gr(Ps(d,0,50))})});return i.append(s,a.el,l.el,p.el),{el:i,update(d,u){a.setValue(d?.[r.type]??"none"),l.setValue(Ts(d?.[r.width])),p.setValue(Ts(d?.[r.height])),a.setDisabled(u),l.setDisabled(u),p.setDisabled(u);}}}function IE(e,t,n,o){let r=n(t("pptx.text3d.title")),i,s=v=>{i={...i,...v},o.setTextStyle({text3d:i});},a=oe(e,{label:t("pptx.text3d.extrusion"),onChange:v=>{v?s({extrusionHeight:Gr(6)}):(i=void 0,o.setTextStyle({text3d:void 0}));}}),l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-text3d-options"),p=re(e,{label:t("pptx.text3d.extrusionDepth"),min:0,max:100,onCommit:v=>s({extrusionHeight:Gr(Ps(v,0,100))})}),d=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field pptxv-text3d-color"),u=chunkOBVLNSK5_cjs.w(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",()=>{s({extrusionColor:m.value}),o.pushRecentColor(m.value);}),d.append(u,m);let g=AE(e,t,t("pptx.text3d.bevelTop"),s,{type:"bevelTopType",width:"bevelTopWidth",height:"bevelTopHeight"}),x=AE(e,t,t("pptx.text3d.bevelBottom"),s,{type:"bevelBottomType",width:"bevelBottomWidth",height:"bevelBottomHeight"}),b=he(e,{label:t("pptx.text3d.material"),options:chunk24B6ZCFG_cjs.bo.map(({value:v,label:f})=>({value:v||"",label:f})),onChange:v=>s({presetMaterial:v||void 0})});return l.append(p.el,d,g.el,x.el,b.el),r.append(a.el,l),{el:r,update(v){r.hidden=!v.canText,i=v.textStyle?.text3d;let f=!!(i?.extrusionHeight&&i.extrusionHeight>0);a.setValue(f),a.setDisabled(!v.canText),l.hidden=!f,p.setValue(Ts(i?.extrusionHeight)),p.setDisabled(!f),m.value=/^#[0-9a-fA-F]{6}$/u.test(i?.extrusionColor??"")?i?.extrusionColor:"#888888",m.disabled=!f,g.update(i,!f),x.update(i,!f),b.setValue(i?.presetMaterial??""),b.setDisabled(!f);}}}function LE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=T=>n.setTextStyle(T,r?.selectedTextRange),s=T=>n.setTextStyle(T),a=(T,E)=>{let L=e.createElement("label");L.textContent=T,E.setAttribute("aria-label",T),L.appendChild(E),o.appendChild(L);},l=(T,E,L=0,M=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(L),D.addEventListener("change",()=>(M?s:i)({[E]:Number(D.value)})),a(T,D),D},p=(T,E)=>{let L=e.createElement("input");return L.type="color",L.addEventListener("input",()=>i({[E]:L.value})),L.addEventListener("change",()=>n.pushRecentColor(L.value)),a(T,L),L},d=(T,E)=>{let L=me(e);return L.addEventListener("change",()=>i({[E]:L.checked})),a(T,L),L},u=l(t("pptx.textFormatting.columns"),"columnCount",1,true);u.max="6";let m=l(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),g=p(t("pptx.textEffects.outline"),"textOutlineColor"),x=l(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),b=d(t("pptx.textEffects.shadow"),"textShadowOpacity"),v=p(t("pptx.textEffects.shadowColor"),"textShadowColor"),f=l(t("pptx.textEffects.blur"),"textShadowBlur"),S=p(t("pptx.textEffects.glowColor"),"textGlowColor"),y=l(t("pptx.textEffects.glow"),"textGlowRadius"),h=d(t("pptx.textEffects.reflection"),"textReflection"),C=d(t("pptx.textFormatting.strikethrough"),"strikethrough"),w=p(t("pptx.text.highlightColor"),"highlightColor"),P=Q(e);for(let T of chunk24B6ZCFG_cjs._n){let E=e.createElement("option");E.value=T.value,E.textContent=T.label,P.appendChild(E);}P.addEventListener("change",()=>s({textWarpPreset:P.value==="textNoShape"?void 0:P.value})),a(t("pptx.textEffects.transform"),P);let k=l(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),A=Array.from(o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox"));return {el:o,update(T){r=T,o.hidden=!T.canText;let E=T.textStyle??{};u.value=String(E.columnCount??1),m.value=String(E.columnSpacing??0),g.value=E.textOutlineColor??"#000000",x.value=String(E.textOutlineWidth??0),b.checked=!!E.textShadowOpacity,v.value=E.textShadowColor??"#000000",f.value=String(E.textShadowBlur??4),S.value=E.textGlowColor??"#ffff00",y.value=String(E.textGlowRadius??0),h.checked=!!E.textReflection,C.checked=!!E.strikethrough,w.value=E.highlightColor??"#ffff00",P.value=E.textWarpPreset??"textNoShape",k.value=String(E.textWarpAdj??5e4);for(let L of A)L.disabled=!T.canText;}}}function ME(e,t,n,o){let r=n(t("pptx.inspector.text")),i=e.createElement("div");i.className="pptxv-inspector-row";let s=e.createElement("span");s.className="pptxv-inspector-row-label",s.textContent=t("pptx.textPanel.color");let a=He(e,{label:t("pptx.textPanel.color"),onInput:T=>o.setTextStyle({color:T,colorRef:void 0}),onCommit:o.pushRecentColor},"#000000");i.append(s,a.el),r.appendChild(i);let l=Ie(e,t,T=>o.setTextStyle({color:T.hex,colorRef:T.ref}));r.appendChild(l.el);let p=Rt(e,t,T=>{o.setTextStyle({color:T,colorRef:void 0}),o.pushRecentColor(T);});r.appendChild(p.el);let d=he(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(d.el);let u=oe(e,{label:t("pptx.textAdvanced.wrapText"),onChange:T=>o.setTextWrap(T?"square":"none")});r.appendChild(u.el);let m=he(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(m.el);let g=(T,E,L)=>re(e,{label:T,min:L,onCommit:M=>o.setTextAdvanced({[E]:M})}),x=g(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),b=g(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),v=g(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),f=g(t("pptx.textAdvanced.spaceBefore"),"paragraphSpacingBefore",0),S=g(t("pptx.textAdvanced.spaceAfter"),"paragraphSpacingAfter",0),y=g(t("pptx.textAdvanced.indent"),"paragraphIndent"),h=g(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),C=he(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})}),w=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:T=>o.setTextAdvanced({rtl:T})}),P=[x,b,v,f,S,y,h];r.append(...P.map(({el:T})=>T),C.el,w.el);let k=LE(e,t,o);r.appendChild(k.el);let A=[a,d,u,m,...P,C,w];return {el:r,update(T){r.hidden=!T.hasSelection||!T.canText,a.setValue(T.textStyle?.color),l.setThemeColorMap(T.themeColorMap),l.setSelected(T.textStyle?.colorRef,T.textStyle?.color),l.setDisabled(!T.canText),p.setColors(T.recentColors??[]),p.setDisabled(!T.canText),d.setValue(T.vAlign),u.setValue(T.textWrap==="square"),m.setValue(T.autoFitMode),x.setValue(T.characterSpacing),b.setValue(T.lineSpacing),v.setValue(T.lineSpacingExactPt??0),f.setValue(T.paragraphSpacingBefore),S.setValue(T.paragraphSpacingAfter),y.setValue(T.paragraphIndent),h.setValue(T.paragraphMarginLeft),C.setValue(T.textDirection),w.setValue(T.textRtl),k.update(T);for(let E of A)E.setDisabled(!T.canText);}}}function Ur(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),o.appendChild(r);let i=new Map,s=[{id:"elements",label:t("pptx.documentProperties.statistics.elements")},{id:"properties",label:t("pptx.inspector.properties")},{id:"comments",label:t("pptx.toolbar.comments")}];for(let R of s){let O=chunkOBVLNSK5_cjs.w(e,"button","pptxv-inspector-tab");O.type="button",O.setAttribute("role","tab"),O.textContent=R.label,O.addEventListener("click",()=>m(R.id)),r.appendChild(O),i.set(R.id,O);}let a=eE(e,t,R=>n.selectElement(R));a.el.classList.add("pptxv-inspector-body"),o.appendChild(a.el);let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-body");o.appendChild(l);let p=zw(e,t,n);p.el.classList.add("pptxv-inspector-body"),o.appendChild(p.el);let d=Tw(e,t,n);o.appendChild(d.el);let u="properties",m=R=>{u=R;for(let[O,B]of i)B.classList.toggle("is-active",O===R),B.setAttribute("aria-selected",String(O===R));a.el.hidden=R!=="elements",l.hidden=R!=="properties",p.el.hidden=R!=="comments";},g=Jw(e,t,n);l.appendChild(g.el);let x=R=>{let O=chunkOBVLNSK5_cjs.w(e,"div","pptxv-inspector-section"),B=chunkOBVLNSK5_cjs.w(e,"h4","pptxv-inspector-section-title");return B.textContent=R,O.appendChild(B),l.appendChild(O),O},b=fE(e,t,x,n.setGeometry,n.toggleElementLock),v=iE(e,t,x),f=bE(e,t,x,n),S=rE(e,t,x,n),y=vE(e,t,x,n),h=ME(e,t,x,n),C=IE(e,t,x,n),w=aE(e,t,x,n),P=pw(e,t,x,n),k=yE(e,t,n);l.appendChild(k.el);let T=PE(e,t,x,n,{getTableStyleMap:()=>n.getTableStyleMap(),getThemeColorMap:()=>n.getThemeColorMap(),onStyleMapChange:R=>n.updateTableStyleMap(R),onDeleteStyle:R=>n.deleteTableStyle(R),onAssignStyle:R=>n.setTableOptions(chunk24B6ZCFG_cjs.yp(R))}),E=hE(e,t,x,n),L=cw(e,t,x,n),M=Fw(e,t,x,n),D=dE(e,t,x,n),I=[b,v,f,S,y,h,C,w,P,k,T,E,L,M,D];return m(u),{el:o,update(R){g.setVisible(!R.hasSelection);for(let O of I)O.update(R);},updateDeck(R){L.setSlideCount(R.slideCount),L.setCustomShows(R.customShows),a.update(R),p.update(R),g.update(R),d.update({editable:R.editable,selectedElementId:R.selectedElementId,elements:R.elements,animations:R.activeSlide?.animations??[],animationTimelineAnchors:R.activeSlide?.animationTimelineAnchors??[]});},setEditable(R){o.hidden=!R,k.setEditable(R),M.setEditable(R);}}}var DE=128,VI=[1,2,3,4,6,9],BI={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 As(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"section","pptxv-master-card"),s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-card-label");s.textContent=t("pptx.master.notesMasterBackground");let a=chunkOBVLNSK5_cjs.w(e,"input","pptxv-master-background");a.type="color",a.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",a.setAttribute("aria-label",t("pptx.master.backgroundColorLabel")),a.addEventListener("input",()=>r(a.value)),i.append(s,a),n.appendChild(i);}function RE(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"section","pptxv-master-card"),s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-card-label");if(s.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(s),o.length===0){let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-empty");a.textContent=t("pptx.master.noPlaceholders"),i.appendChild(a);}for(let a of o){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-placeholder"),p=chunkOBVLNSK5_cjs.w(e,"span",`pptxv-master-dot is-${r}`);l.append(p,e.createTextNode(t(BI[a.type]??a.type))),i.appendChild(l);}n.appendChild(i);}function zI(e,t){return chunk24B6ZCFG_cjs.hp({slideMasters:[e]},{tab:"slides",masterIndex:0,layoutIndex:t})??{id:e.path,rId:"",slideNumber:0,elements:[]}}function NI(e,t,n,o,r){if(o.length===0)return;let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-crud");for(let s of o){let a=chunkOBVLNSK5_cjs.w(e,"button","pptxv-master-crud-btn");a.type="button",a.dataset.testid=`pptx-master-crud-${s.id}`,a.textContent=t(s.labelKey),a.disabled=!s.enabled,s.disabledReasonKey&&(a.title=t(s.disabledReasonKey)),a.addEventListener("click",()=>r(s.id)),i.appendChild(a);}n.appendChild(i);}function _I(e,t,n,o){o.editable&&(As(e,t,n,chunk24B6ZCFG_cjs.kp({slideMasters:o.masters},{tab:"slides",masterIndex:o.active.masterIndex,layoutIndex:o.active.layoutIndex})??"#ffffff",o.onMasterBackgroundColorChange),NI(e,t,n,o.crudActions,o.onCrudAction));let r=DE/Math.max(o.canvasSize.width,1);for(let[i,s]of o.masters.entries()){let a=[{layoutIndex:null,label:s.name||t("pptx.master.master")},...s.layouts?.map((l,p)=>({layoutIndex:p,label:l.name||t("pptx.master.layout")}))??[]];for(let l of a){let p=chunkOBVLNSK5_cjs.w(e,"button",`pptxv-master-thumb${l.layoutIndex===null?"":" is-layout"}`);p.type="button",p.setAttribute("aria-label",l.label);let d=o.active.masterIndex===i&&o.active.layoutIndex===l.layoutIndex;p.classList.toggle("is-active",d),d&&p.setAttribute("aria-current","page");let u=chunkOBVLNSK5_cjs.w(e,"span","pptxv-master-thumb-name");u.textContent=l.label;let m=chunkOBVLNSK5_cjs.w(e,"span","pptxv-master-thumb-frame");m.style.width=`${DE}px`,m.style.height=`${Math.round(o.canvasSize.height*r)}px`,m.appendChild(o.renderStage(zI(s,l.layoutIndex),r)),p.append(u,m),p.addEventListener("click",()=>o.onSelect(i,l.layoutIndex)),n.appendChild(p);}}}function ks(e,t){let n=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(e,"header","pptxv-master-header"),i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let s=chunkOBVLNSK5_cjs.w(e,"button","pptxv-master-collapse");s.type="button",s.textContent="\u2039",s.title=t("pptx.masterView.collapse"),s.setAttribute("aria-label",t("pptx.masterView.collapse")),s.addEventListener("click",o.onCollapse),r.append(i,s);let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-tabs");a.setAttribute("role","tablist");for(let[p,d]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let u=chunkOBVLNSK5_cjs.w(e,"button","pptxv-master-tab");u.type="button",u.role="tab",u.textContent=t(d),u.setAttribute("aria-selected",String(o.tab===p)),u.classList.toggle("is-active",o.tab===p),u.addEventListener("click",()=>o.onTabChange(p)),a.appendChild(u);}let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-body");if(l.setAttribute("role","tabpanel"),o.tab==="slides")_I(e,t,l,o);else if(o.tab==="notes")o.notesMasterPresent?(As(e,t,l,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),RE(e,t,l,o.notesPlaceholders??[],"notes")):(l.textContent=t("pptx.master.noNotesMaster"),l.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)l.textContent=t("pptx.master.noHandoutMaster"),l.classList.add("pptxv-master-empty");else {let p=chunkOBVLNSK5_cjs.w(e,"section","pptxv-master-card"),d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-card-label");d.textContent=t("pptx.master.handoutSlidesPerPage");let u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-counts");for(let m of VI){let g=chunkOBVLNSK5_cjs.w(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);}p.append(d,u),l.appendChild(p),As(e,t,l,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),RE(e,t,l,o.handoutPlaceholders??[],"handout");}n.append(r,a,l);},setVisible(o){n.hidden=!o;}}}var OE=148;function Is(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-mobile-actions"),a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-mobile-sheet-host");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true");let l=e.createElement("button");l.type="button",l.className="pptxv-mobile-sheet-backdrop",l.setAttribute("aria-label",t("pptx.settings.close"));let p=chunkOBVLNSK5_cjs.w(e,"section","pptxv-mobile-sheet"),d=chunkOBVLNSK5_cjs.w(e,"header","pptxv-mobile-sheet-header"),u=chunkOBVLNSK5_cjs.w(e,"span","pptxv-mobile-sheet-handle"),m=e.createElement("strong");d.append(u,m);let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-mobile-sheet-body");p.append(d,g),a.append(l,p),a.hidden=true,s.appendChild(a);let x=null,b=0,v=[],f=[],S=true,y=false,h=null,C=960,w=540,P=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(P,r);let k=()=>{r&&P?.parentNode&&P.parentNode.insertBefore(r,P.nextSibling);},A=()=>{x=null,a.hidden=true,p.style.transform="",k();for(let O of M.querySelectorAll("button"))O.setAttribute("aria-pressed","false");};l.addEventListener("click",A);let T=chunk24B6ZCFG_cjs.un((O,B)=>{p.style.transform=O>0?`translateY(${O}px)`:"",p.style.transition=B?"none":"";},A),E=O=>({clientY:O.clientY,pointerId:O.pointerId,currentTarget:d});d.addEventListener("pointerdown",O=>T.pointerDown(E(O))),d.addEventListener("pointermove",O=>T.pointerMove(E(O))),d.addEventListener("pointerup",O=>T.pointerUp(E(O))),d.addEventListener("pointercancel",O=>T.cancel(E(O)));let L=O=>{if(g.replaceChildren(),m.textContent=t(O==="inspector"?"pptx.field.format":`pptx.${O==="slides"?"sections.slides":O==="comments"?"toolbar.comments":O==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),a.setAttribute("aria-label",m.textContent),O==="slides"){let B=chunkOBVLNSK5_cjs.w(e,"div","pptxv-mobile-slide-list"),V=OE/Math.max(C,1);for(let F=0;F<v.length;F+=1){let _=e.createElement("button");_.type="button";let N=chunk24B6ZCFG_cjs.At(v[F],F);_.setAttribute("aria-label",N),_.classList.toggle("is-active",F===b),F===b&&_.setAttribute("aria-current","true");let W=chunkOBVLNSK5_cjs.w(e,"span","pptxv-mobile-slide-num");if(W.textContent=String(F+1),_.appendChild(W),h){let X=chunkOBVLNSK5_cjs.w(e,"span","pptxv-mobile-slide-frame",{width:`${OE}px`,height:`${Math.round(w*V)}px`});X.appendChild(h(v[F],V)),_.appendChild(X);}else {let X=chunkOBVLNSK5_cjs.w(e,"span","pptxv-mobile-slide-title");X.textContent=N,_.appendChild(X);}_.addEventListener("click",()=>{o(F),A();}),B.appendChild(_);}g.appendChild(B);}else if(O==="insert"){let B=[[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[V,F]of B){let _=e.createElement("button");_.type="button",_.textContent=V,_.addEventListener("click",F),g.appendChild(_);}}else if(O==="inspector"&&r)g.appendChild(r);else if(O==="comments"){f.length===0&&(g.textContent=t("pptx.comments.noneOnSlide"));for(let _ of f){let N=chunkOBVLNSK5_cjs.w(e,"article","pptxv-mobile-comment"),W=e.createElement("textarea");W.value=_.text,W.setAttribute("aria-label",t("pptx.comments.edit"));let X=chunkOBVLNSK5_cjs.w(e,"div","pptxv-mobile-comment-actions"),ie=e.createElement("button");ie.type="button",ie.textContent=t("pptx.comments.save"),ie.addEventListener("click",()=>n.edit.comments.editComment(_.id,W.value));let G=e.createElement("button");G.type="button",G.textContent=_.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),G.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(_.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(_.id)),X.append(ie,G,K),N.append(W,X),g.appendChild(N);}let B=chunkOBVLNSK5_cjs.w(e,"div","pptxv-mobile-comment-add"),V=e.createElement("textarea");V.placeholder=t("pptx.comments.addPlaceholder"),V.setAttribute("aria-label",t("pptx.comments.addPlaceholder"));let F=e.createElement("button");F.type="button",F.textContent=t("pptx.comments.addComment"),F.addEventListener("click",()=>{n.edit.comments.addComment(V.value)&&(V.value="");}),B.append(V,F),g.appendChild(B);}else {let B=[[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[V,F,_]of B){if(_&&chunk24B6ZCFG_cjs.eq(_,i))continue;let N=e.createElement("button");N.type="button",N.textContent=V,N.addEventListener("click",F),g.appendChild(N);}}},M=e.createElement("nav");M.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let D=O=>{if(x=chunk24B6ZCFG_cjs.Rm(x,O),!x){A();return}L(x),a.hidden=false;for(let B of M.querySelectorAll("button"))B.setAttribute("aria-pressed",String(B.dataset.mobileAction===x));},I={slides:"layers",insert:"plus",inspector:"sliders",comments:"comment",notes:"sticky-note"};for(let O of chunk24B6ZCFG_cjs.Sm({slideCount:0})){let B=O.key;if(B==="notes"&&chunk24B6ZCFG_cjs.eq("notes",i))continue;let V=e.createElement("button");V.type="button",V.dataset.mobileAction=B,B==="notes"&&V.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),V.appendChild(chunkOBVLNSK5_cjs.K(e,I[B]));let F=chunkOBVLNSK5_cjs.w(e,"span");F.textContent=t(B==="inspector"?"pptx.field.format":`pptx.${B==="slides"?"sections.slides":B==="comments"?"toolbar.comments":B==="insert"?"mobileBar.insert":"notes.title"}`),V.appendChild(F),V.addEventListener("click",()=>{if(B==="notes"){n.nav.toggleNotes();return}if(B==="insert"){n.insert.insert("text");return}D(B);}),M.appendChild(V);}s.appendChild(M);let R=()=>{let O=chunk24B6ZCFG_cjs.Sm({slideCount:v.length});for(let B of O){let V=M.querySelector(`button[data-mobile-action='${B.key}']`);if(!V)continue;let F=B.key==="insert"||B.key==="inspector"||B.key==="comments";V.disabled=B.disabled||F&&!S||B.key==="inspector"&&!r,V.setAttribute("aria-pressed",String(B.key==="notes"?y:B.key===x));}};return {el:s,update(O,B,V){b=O,v=B,f=V,x&&L(x),R();},setThumbnailRenderer(O,B,V){h=O,C=B,w=V,x==="slides"&&L(x);},toggle:D,close:A,setEditable(O){S=O,!S&&x&&["insert","inspector","comments"].includes(x)&&A(),R();},setNotesExpanded(O){y=O,R();}}}function Ls(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(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}),s=chunk24B6ZCFG_cjs.eq("undo",o)?null:H(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),a=chunk24B6ZCFG_cjs.eq("redo",o)?null:H(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-mobile-toolbar-spacer"),p=H(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),d=chunk24B6ZCFG_cjs.eq("fullscreen",o)?null:H(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),u=chunkOBVLNSK5_cjs.w(e,"span","pptxv-mobile-toolbar-ai"),m=chunkOBVLNSK5_cjs.w(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...s?[s.btn]:[],...a?[a.btn]:[],l,u,p.btn,...d?[d.btn]:[],m),{el:r,collaborationHost:m,aiHost:u,setEditState({editable:g,canUndo:x,canRedo:b}){for(let v of [i.btn,s?.btn,a?.btn])v&&(v.hidden=!g);m.hidden=!g,u.hidden=!g,s?.setDisabled(!x),a?.setDisabled(!b);}}}function Ms(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-notes"),i=chunkOBVLNSK5_cjs.w(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 s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-notes-title");s.textContent=t("pptx.notes.title"),i.appendChild(s);let a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-notes-chevron");a.setAttribute("aria-hidden","true"),i.appendChild(a);let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-notes-body");l.id="slide-notes-content",r.appendChild(l);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-notes-toolbar");l.appendChild(p);let d=e.createElement("button");d.type="button",d.className="pptxv-notes-mode",p.appendChild(d);let u=chunkOBVLNSK5_cjs.w(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")),l.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")),l.appendChild(m);let g=false,x=null,b=false,v=chunk24B6ZCFG_cjs.ug(),f=[],S,y,h=A=>{v=A,u.hidden=!v,m.hidden=v,p.hidden=!b,d.textContent=t(v?"pptx.notes.plainEditor":"pptx.notes.richEditor"),d.setAttribute("aria-pressed",String(v));},C=()=>{if(!b)return;let A=chunk24B6ZCFG_cjs.vg(u);f=A.segments,o(A.text,A.segments);},w=(A,T,E)=>{let L=e.createElement("button");L.type="button",L.className="pptxv-notes-tool",L.textContent=A,L.title=T,L.setAttribute("aria-label",T),L.addEventListener("mousedown",M=>M.preventDefault()),L.addEventListener("click",()=>{u.focus(),E(),C();}),p.insertBefore(L,d);};w("B",t("pptx.notes.bold"),()=>chunk24B6ZCFG_cjs.xg("bold")),w("I",t("pptx.notes.italic"),()=>chunk24B6ZCFG_cjs.xg("italic")),w("U",t("pptx.notes.underline"),()=>chunk24B6ZCFG_cjs.xg("underline")),w("S",t("pptx.notes.strikethrough"),()=>chunk24B6ZCFG_cjs.xg("strikeThrough")),w("\u2022",t("pptx.notes.bulletList"),()=>{f=chunk24B6ZCFG_cjs.wg(u,f,"bullet").segments,u.innerHTML=chunk24B6ZCFG_cjs.rg(f);}),w("1.",t("pptx.notes.numberedList"),()=>{f=chunk24B6ZCFG_cjs.wg(u,f,"numbered").segments,u.innerHTML=chunk24B6ZCFG_cjs.rg(f);}),w("\u2192",t("pptx.notes.indent"),()=>{f=chunk24B6ZCFG_cjs.wg(u,f,"indent").segments,u.innerHTML=chunk24B6ZCFG_cjs.rg(f);}),w("\u2190",t("pptx.notes.outdent"),()=>{f=chunk24B6ZCFG_cjs.wg(u,f,"outdent").segments,u.innerHTML=chunk24B6ZCFG_cjs.rg(f);}),w("\u2197",t("pptx.notes.insertLink"),()=>{let A=e.getSelection()?.toString()??"",T=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!T)return;let E=window.prompt(t("pptx.notes.linkDisplayText"),A)??A;chunk24B6ZCFG_cjs.zg(chunk24B6ZCFG_cjs.yg(T),E);}),w("\u{1F5A8}",t("pptx.notes.printNotes"),()=>{if(!S)return;let A=chunk24B6ZCFG_cjs.Ag([S],L=>t("pptx.notes.slideN",{n:L}),y),T=e.createElement("iframe");T.setAttribute("aria-hidden","true"),T.setAttribute("sandbox","allow-same-origin"),T.style.cssText="position:fixed;right:0;bottom:0;width:0;height:0;border:0",e.body.appendChild(T);let E=T.contentWindow?.document;if(!E){T.remove();return}E.open(),E.write(A),E.close(),setTimeout(()=>{T.contentWindow?.focus(),T.contentWindow?.print(),setTimeout(()=>T.remove(),1e3);},200);}),d.addEventListener("click",()=>{v?(C(),m.value=chunk24B6ZCFG_cjs.qg(f)):(f=chunk24B6ZCFG_cjs.pg(m.value),u.innerHTML=chunk24B6ZCFG_cjs.rg(f)),h(!v);});let P=()=>{b&&o(m.value);};m.addEventListener("change",P),m.addEventListener("blur",P),u.addEventListener("blur",C);let k=()=>{r.dataset.collapsed=g?"false":"true",i.setAttribute("aria-expanded",String(g)),l.hidden=!g,a.textContent=g?"\u25BE":"\u25B8";};return k(),h(v),{el:r,update({slide:A,editable:T,notesStyle:E}){b=T,S=A,y=E;let L=A!==void 0;m.disabled=!L,m.readOnly=!b,u.contentEditable=String(b&&L),p.hidden=!b,m.placeholder=t(L?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let M=A?.id??null;M!==x&&(x=M,f=chunk24B6ZCFG_cjs.tg(A,E),m.value=chunk24B6ZCFG_cjs.qg(f),u.innerHTML=chunk24B6ZCFG_cjs.rg(f));},setExpanded(A){g=A,k();}}}function HE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-present-palette");o.hidden=true;let r=n.colors.map(i=>{let s=chunkOBVLNSK5_cjs.w(e,"button","pptxv-present-swatch");s.type="button",s.dataset.pptxPresentSwatch=i,s.style.backgroundColor=i;let a=t(n.swatchLabelKey,{color:i});return s.title=a,s.setAttribute("aria-label",a),s.addEventListener("click",l=>{l.stopPropagation(),n.onPick(i);}),o.appendChild(s),{color:i,swatch:s}});return {el:o,setOpen(i){o.hidden=!i;},isOpen:()=>!o.hidden,setValue(i){for(let s of r){let a=s.color===i;s.swatch.classList.toggle("is-selected",a),s.swatch.setAttribute("aria-pressed",String(a));}}}}function je(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 GI(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-present-group"),r=je(e,t,{id:n.id,labelKey:n.labelKey,icon:n.icon,onClick:n.onSelect}),i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-present-swatch-bar");r.btn.appendChild(i);let s=je(e,t,{id:`${n.id}-color`,labelKey:n.caretLabelKey,icon:"chevron-down",className:"pptxv-present-caret",onClick:n.onCaret}),a=HE(e,t,{colors:n.colors,swatchLabelKey:n.swatchLabelKey,onPick:n.onPick});return o.append(r.btn,s.btn,a.el),{el:o,toggle:r,palette:a,bar:i}}function FE(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-present-toolbar-wrap");for(let[k,A]of Object.entries(chunk24B6ZCFG_cjs.Qk()))r.style.setProperty(k,A);let i=chunkOBVLNSK5_cjs.w(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 s=k=>{let A=chunkOBVLNSK5_cjs.w(e,"div","pptxv-present-divider");return A.dataset.pptxPresentControl=k,A},a=je(e,t,{id:"previous",labelKey:"pptx.presenter.previousSlide",icon:"chevron-left",onClick:n.previous}),l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-present-counter");l.dataset.pptxPresentControl="counter";let p=je(e,t,{id:"next",labelKey:"pptx.presenter.nextSlide",icon:"chevron-right",onClick:n.next}),d=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(e,"span","pptxv-present-elapsed");d.append(chunkOBVLNSK5_cjs.K(e,"timer"),u);let m=je(e,t,{id:"laser",labelKey:"pptx.presentation.laserPointer",icon:"cursor",onClick:()=>n.setTool("laser")}),g=null,x=()=>{f.palette.setOpen(g==="pen"),S.palette.setOpen(g==="highlighter");},b=()=>{g=null,x();},v=k=>GI(e,t,{...k,onSelect:()=>{b(),n.setTool(k.id);},onPick:A=>{b(),n.setColor(A),n.setTool(k.id),o(k.id,A);},onCaret:()=>{g=g===k.id?null:k.id,x();}}),f=v({id:"pen",labelKey:"pptx.presentation.pen",icon:"pen",caretLabelKey:"pptx.presentationToolbar.penColor",colors:chunk24B6ZCFG_cjs.Mk,swatchLabelKey:"pptx.presentationToolbar.penColorValue"}),S=v({id:"highlighter",labelKey:"pptx.presentation.highlighter",icon:"highlighter",caretLabelKey:"pptx.presentationToolbar.highlighterColor",colors:chunk24B6ZCFG_cjs.Nk,swatchLabelKey:"pptx.presentationToolbar.highlighterColorValue"}),y=je(e,t,{id:"eraser",labelKey:"pptx.presentation.eraser",icon:"eraser",onClick:()=>{b(),n.setTool("eraser");}}),h=je(e,t,{id:"blackboard",labelKey:"pptx.presentation.blackboard",icon:"presentation",onClick:()=>{b(),n.toggleBlackboard();}}),C=je(e,t,{id:"clear",labelKey:"pptx.presentation.clearAnnotations",icon:"trash",className:"pptxv-present-danger",onClick:n.clearAnnotations}),w=je(e,t,{id:"presenter-view",labelKey:"pptx.presenter.presenterView",icon:"panel-right",onClick:n.togglePresenterView}),P=je(e,t,{id:"end",labelKey:"pptx.presenter.endPresentation",icon:"close",className:"pptxv-present-danger",onClick:n.end});i.append(a.btn,l,p.btn,s("divider-navigation"),d,s("divider-timer"),m.btn,f.el,S.el,y.btn,h.btn,C.btn,s("divider-tools"),w.btn,P.btn);for(let k of ["pointerdown","click"])i.addEventListener(k,A=>A.stopPropagation());return {wrap:r,bar:i,previous:a,counter:l,next:p,elapsedText:u,laser:m,pen:f,highlighter:S,eraser:y,blackboard:h,clear:C,presenterView:w,end:P,closePalettes:b}}function Ds(e,t,n,o){let r={current:0,total:0,tool:"none",blackout:"none",hasAnnotations:false,presenterViewActive:false},i=chunk24B6ZCFG_cjs.Mk[0]??"#ff0000",s=chunk24B6ZCFG_cjs.Nk[0]??"#ffff00",a=FE(e,t,o,(P,k)=>{P==="pen"?i=k:s=k,d();}),{wrap:l,bar:p}=a;function d(){a.counter.textContent=chunk24B6ZCFG_cjs.Pk(r.current,r.total),a.previous.setDisabled(r.current<=0),a.next.setDisabled(r.current>=r.total-1),a.laser.setActive(r.tool==="laser"),a.pen.toggle.setActive(r.tool==="pen"),a.highlighter.toggle.setActive(r.tool==="highlighter"),a.eraser.setActive(r.tool==="eraser"),a.blackboard.setActive(chunk24B6ZCFG_cjs.Tk(r.blackout,r.tool)),a.clear.setDisabled(!r.hasAnnotations),a.presenterView.setActive(r.presenterViewActive),a.pen.bar.style.backgroundColor=i,a.highlighter.bar.style.backgroundColor=s,a.pen.palette.setValue(i),a.highlighter.palette.setValue(s);}let u=null,m=false,g=false,x=0,b=null,v=P=>{m=P,l.style.opacity=P?"1":"0",l.style.pointerEvents=P?"auto":"none";},f=()=>{u!==null&&(window.clearTimeout(u),u=null);},S=()=>{f(),u=window.setTimeout(()=>{g||v(false);},chunk24B6ZCFG_cjs.Lk);},y=P=>{let k=n.getBoundingClientRect();if(chunk24B6ZCFG_cjs.Ok(P.clientY,k.height,k.top)){v(true),S();return}v(true),S();},h=P=>{P.target instanceof Node&&!p.contains(P.target)&&a.closePalettes();};l.addEventListener("mouseenter",()=>{g=true,f(),v(true);}),l.addEventListener("mouseleave",()=>{g=false,S();});let C=()=>{a.elapsedText.textContent=chunk24B6ZCFG_cjs.hk(x===0?0:Date.now()-x);},w=()=>{e.removeEventListener("mousemove",y),e.removeEventListener("mousedown",h),f(),b!==null&&(window.clearInterval(b),b=null),x=0,g=false,a.closePalettes(),C(),v(false);};return v(false),C(),d(),{el:l,update(P){Object.assign(r,P),d();},setPresenting(P){if(!P){w();return}x=Date.now(),C(),b??=window.setInterval(C,1e3),e.addEventListener("mousemove",y),e.addEventListener("mousedown",h),v(true),S();},toggleVisible(){if(m){f(),v(false);return}v(true),S();},dispose(){w(),l.remove();}}}function Rs(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(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}),s=!chunk24B6ZCFG_cjs.eq("navigation",o),a=s?H(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,l=s?H(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-presentation-touch-counter");p.setAttribute("aria-live","polite");for(let d of [i.btn,a?.btn,l?.btn])d?.addEventListener("pointerdown",u=>u.stopPropagation()),d?.addEventListener("click",u=>u.stopPropagation());return r.append(i.btn,...a?[a.btn]:[],...l?[l.btn]:[],p),{el:r,update(d,u){let m=chunk24B6ZCFG_cjs.tn(d,u);a?.setDisabled(m.previousDisabled),l?.setDisabled(m.nextDisabled),p.textContent=m.counterLabel;}}}function Os(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-protected-view");o.hidden=true,o.setAttribute("role","alert"),o.appendChild(chunkOBVLNSK5_cjs.K(e,"lock"));let r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-protected-view-text"),i=chunkOBVLNSK5_cjs.w(e,"strong");i.textContent=t("pptx.security.protectedViewTitle"),r.append(i,": ",t("pptx.options.trust.protectedViewInfo"));let s=chunkOBVLNSK5_cjs.w(e,"button","pptxv-protected-view-enable");return s.type="button",s.textContent=t("pptx.security.enableEditing"),s.addEventListener("click",n),o.append(r,s),{el:o,setActive(a){o.hidden=!a;}}}function VE(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-readonly-banner");s.dataset.testid="pptx-readonly-banner",s.hidden=true,s.setAttribute("role","alert"),s.appendChild(chunkOBVLNSK5_cjs.K(e,"lock"));let a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-readonly-banner-text"),l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-readonly-banner-edit");l.type="button",l.dataset.testid="pptx-readonly-edit-anyway",l.textContent=t("pptx.readOnly.editAnyway"),l.addEventListener("click",n);let p=chunkOBVLNSK5_cjs.w(e,"button","pptxv-readonly-banner-dismiss");p.type="button",p.dataset.testid="pptx-readonly-dismiss",p.setAttribute("aria-label",t("pptx.readOnly.dismiss")),p.appendChild(chunkOBVLNSK5_cjs.K(e,"close")),p.addEventListener("click",o);let d=chunkOBVLNSK5_cjs.w(e,"form","pptxv-readonly-banner-password-form");d.dataset.testid="pptx-readonly-password-form",d.hidden=true;let u=chunkOBVLNSK5_cjs.w(e,"label","pptxv-sr-only");u.textContent=t("pptx.readOnly.passwordLabel"),u.setAttribute("for","pptxv-readonly-password-input");let m=chunkOBVLNSK5_cjs.w(e,"input","pptxv-readonly-banner-password-input");m.id="pptxv-readonly-password-input",m.type="password",m.dataset.testid="pptx-readonly-password-input",m.placeholder=t("pptx.readOnly.passwordPlaceholder");let g=chunkOBVLNSK5_cjs.w(e,"button","pptxv-readonly-banner-unlock");g.type="submit",g.dataset.testid="pptx-readonly-unlock",g.textContent=t("pptx.readOnly.unlock");let x=chunkOBVLNSK5_cjs.w(e,"button","pptxv-readonly-banner-password-cancel");x.type="button",x.dataset.testid="pptx-readonly-password-cancel",x.textContent=t("pptx.common.cancel"),x.addEventListener("click",i);let b=chunkOBVLNSK5_cjs.w(e,"span","pptxv-readonly-banner-password-error");return b.dataset.testid="pptx-readonly-password-error",b.setAttribute("role","alert"),b.id="pptxv-readonly-password-error",b.hidden=true,d.addEventListener("submit",v=>{v.preventDefault(),r(m.value);}),d.append(u,m,g,x,b),s.append(a,l,p,d),{el:s,update(v,f,S){let y=v!==null&&!f;if(s.hidden=!y,!y||!v)return;s.dataset.kind=v.kind??"",a.textContent=t(v.messageKey);let h=S.promptOpen;if(l.hidden=h,p.hidden=h,d.hidden=!h,!h)return;m.disabled=S.checking,g.disabled=S.checking;let C=S.error!==null;m.setAttribute("aria-invalid",String(C)),m.setAttribute("aria-describedby",C?b.id:""),C||m.removeAttribute("aria-describedby"),b.hidden=!C,C&&(b.textContent=t(S.error==="wrong-password"?"pptx.readOnly.wrongPassword":"pptx.readOnly.unsupportedAlgorithm"));}}}function BE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunkOBVLNSK5_cjs.w(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunkOBVLNSK5_cjs.w(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let s=chunkOBVLNSK5_cjs.w(e,"header","pptxv-eqdlg-header"),a=chunkOBVLNSK5_cjs.w(e,"h2");a.textContent=t("pptx.equation.insertTitle");let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-eqdlg-close");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.settings.close")),s.append(a,l);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-eqdlg-preview"),d=chunkOBVLNSK5_cjs.w(e,"label","pptxv-eqdlg-field"),u=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(e,"span","pptxv-eqdlg-hint");g.textContent=t("pptx.equation.latexHint"),d.append(u,m,g);let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-eqdlg-field"),b=chunkOBVLNSK5_cjs.w(e,"span","pptxv-eqdlg-label");b.textContent=t("pptx.equation.templates");let v=chunkOBVLNSK5_cjs.w(e,"div","pptxv-eqdlg-grid"),f=[],S=chunk24B6ZCFG_cjs.Hb();for(let[M,D]of chunk24B6ZCFG_cjs.Eb.entries()){let I=chunkOBVLNSK5_cjs.w(e,"button","pptxv-eqdlg-template");I.type="button",I.title=t(D.i18nKey);let R=chunkOBVLNSK5_cjs.w(e,"span","pptxv-eqdlg-template-math");R.innerHTML=S[M]??"";let O=chunkOBVLNSK5_cjs.w(e,"span","pptxv-eqdlg-template-label");O.textContent=t(D.i18nKey),I.append(R,O),I.addEventListener("click",()=>{m.value=D.latex,A(),m.focus();}),v.appendChild(I),f.push(I);}x.append(b,v);let y=()=>{let M=m.value.trim();if(!M)return null;try{let D=chunk24B6ZCFG_cjs.Db(M);return Object.keys(D).length>0?D:null}catch{return null}},h=true,C,w=chunkOBVLNSK5_cjs.w(e,"footer","pptxv-eqdlg-footer"),P=H(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>E(false)}),k=H(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let M=y();M&&(n(M,C),m.value="",A(),E(false));}});k.btn.classList.add("is-primary"),w.append(P.btn,k.btn),i.append(s,p,d,x,w),o.append(r,i);let A=()=>{let M=chunk24B6ZCFG_cjs.Gb(m.value);M?(p.classList.remove("is-empty"),p.innerHTML=M):(p.classList.add("is-empty"),p.textContent=t("pptx.equation.previewPlaceholder"));let D=m.value;for(let[I,R]of f.entries())R.classList.toggle("is-active",chunk24B6ZCFG_cjs.Eb[I]?.latex===D);k.setDisabled(!h||y()===null);};m.addEventListener("input",A),o.addEventListener("keydown",M=>{M.stopPropagation(),M.key==="Escape"?E(false):M.key==="Enter"&&(M.ctrlKey||M.metaKey)&&(M.preventDefault(),k.btn.click());}),r.addEventListener("click",()=>E(false)),l.addEventListener("click",()=>E(false));let T=false,E=M=>{T=M,o.hidden=!T,T?m.focus():C=void 0;},L=()=>{let M=C!==void 0,D=t(M?"pptx.equation.editTitle":"pptx.equation.insertTitle"),I=t(M?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",D),a.textContent=D,k.btn.textContent=I,k.btn.title=I,k.btn.setAttribute("aria-label",I);};return A(),{el:o,toggle:()=>{T||(C=void 0,m.value="",L(),A()),E(!T);},setOpen:E,isOpen:()=>T,setEditable(M){h=M,m.disabled=!M,k.setDisabled(!M||y()===null);},openEdit(M,D){C=M,m.value=chunk24B6ZCFG_cjs.Cb(D),L(),A(),E(true);}}}function Hs(e,t,n){let o=chunkOBVLNSK5_cjs.w(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 s=chunkOBVLNSK5_cjs.w(e,"label","pptxv-findreplace-checkbox"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),s.append(a,e.createTextNode(t("pptx.findReplace.matchCase")));let l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-findreplace-status");l.setAttribute("aria-live","polite");let p=()=>{let f=n.search(r.value,a.checked);l.textContent=f>0?t("pptx.findReplace.matchCount",{current:1,total:f}):t("pptx.findReplace.noMatches");},d=H(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:p}),u=H(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,a.checked),p();}}),m=H(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,a.checked),p();}}),g=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>v(false)});r.addEventListener("input",p),r.addEventListener("keydown",f=>{f.key==="Escape"&&(f.stopPropagation(),v(false));});let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-findreplace-row");x.append(r,i,s,d.btn,u.btn,m.btn,g.btn),o.append(x,l);let b=false,v=f=>{b=f,o.hidden=!b,b&&r.focus();};return {el:o,toggle:()=>v(!b),setOpen:v,isOpen:()=>b,setEditable(f){i.disabled=!f,u.setDisabled(!f),m.setDisabled(!f);}}}function zE(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=He(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:g=>n.setSlideBackgroundColor(g),onCommit:g=>n.pushRecentColor?.(g)},"#ffffff"),i=H(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),s=H(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>m(false)}),a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-format-background-row"),l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-format-background-label");l.textContent=t("pptx.slideBackground.colour"),a.append(l,r.el,i.btn,s.btn),o.appendChild(a);let p=chunkOBVLNSK5_cjs.w(e,"label","pptxv-format-background-hide-row"),d=e.createElement("input");d.type="checkbox",d.addEventListener("change",()=>{n.setHideBackgroundGraphics(d.checked);}),p.append(d,e.createTextNode(t("pptx.slideBackground.hideBackgroundGraphics"))),o.appendChild(p);let u=false,m=g=>{u=g,o.hidden=!u;};return {el:o,toggle:()=>m(!u),setOpen:m,isOpen:()=>u,setEditable(g){r.setDisabled(!g),i.setDisabled(!g);}}}function Fo(e,t,n){if(!t)return n;let o=e(t);return o&&o!==t?o:n}function Fs(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"button","pptxv-gallery-tile");i.type="button",i.setAttribute(chunk24B6ZCFG_cjs.wr,n.id),i.setAttribute("aria-pressed",String(n.applied)),i.classList.toggle("is-applied",n.applied);let s=chunk24B6ZCFG_cjs.Ar(n,t);return i.title=s,i.setAttribute("aria-label",s),i.innerHTML=n.previewSvg,i.disabled=o,i.addEventListener("mousedown",a=>a.preventDefault()),i.addEventListener("click",()=>r(n)),i}function UI(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-gallery-section");if(i.dataset.gallerySection=n.id,n.titleKey||n.title){let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-gallery-heading");a.textContent=Fo(t,n.titleKey,n.title??""),i.appendChild(a);}let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-gallery-grid");s.style.gridTemplateColumns=`repeat(${Math.max(1,n.columns)}, max-content)`;for(let a of n.items)s.appendChild(Fs(e,t,a,o,r));return i.appendChild(s),i}function NE(e,t,n,o,r,i){n.replaceChildren(...o.sections.filter(s=>s.items.length>0).map(s=>UI(e,t,s,r,i)));}var KI=4;function Ye(e,t,n){let o=()=>{let{top:r,left:i,right:s}=chunk24B6ZCFG_cjs.dl(t.getBoundingClientRect(),{alignRight:n?.alignRight});e.style.position="fixed",e.style.margin="0",e.style.top=`${r+KI}px`,e.style.left=i===null?"auto":`${i}px`,e.style.right=s===null?"auto":`${s}px`;};return o(),window.addEventListener("resize",o),document.addEventListener("scroll",o,true),{update:o,destroy(){window.removeEventListener("resize",o),document.removeEventListener("scroll",o,true);}}}var WI={shapeStyles:"paintbrush",shapeEffects:"sparkles",wordArtStyles:"font-color",pictureStyles:"image",pictureCorrections:"sliders",pictureColor:"paintbrush",pictureArtisticEffects:"sparkles",bullets:"bullet-list",numbering:"numbered-list",tableStyles:"table",chartStyles:"chart",chartColors:"paintbrush",chartQuickLayout:"layout",smartArtStyles:"smart-art",smartArtColors:"paintbrush",themeColors:"paintbrush",themeFonts:"font-color"};function st(e,t,n,o,r={}){let i=n.mode==="inline",s=chunkOBVLNSK5_cjs.w(e,"div",`pptxv-gallery${i?" pptxv-gallery-inline":""}`);r.chevronOnly||s.setAttribute(chunk24B6ZCFG_cjs.Yq,n.control);let a=i?chunkOBVLNSK5_cjs.w(e,"div","pptxv-gallery-strip"):null,l=chunkOBVLNSK5_cjs.w(e,"button",i?"pptxv-gallery-more":`pptxv-dropdown-trigger pptxv-gallery-trigger${r.chevronOnly?" pptxv-gallery-chevron":""}`);l.type="button",l.setAttribute(chunk24B6ZCFG_cjs.ur,n.gallery),l.setAttribute("aria-haspopup","true"),l.setAttribute("aria-expanded","false");let p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-dropdown-text");!i&&!r.chevronOnly&&l.append(chunkOBVLNSK5_cjs.K(e,WI[n.gallery]),p),l.appendChild(chunkOBVLNSK5_cjs.K(e,"chevron-down"));let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-gallery-popup");d.setAttribute(chunk24B6ZCFG_cjs.vr,n.gallery),d.setAttribute("role","dialog"),d.hidden=true,a&&s.appendChild(a),s.append(l);let u=null,m=true,g=null,x=true,b=h=>{s.contains(h.target)||f(false);};function v(){x&&u&&(NE(e,t,d,u,m,S),x=false);}function f(h){let C=h&&!m;C&&v(),d.hidden=!C,C?s.append(d):d.remove(),l.setAttribute("aria-expanded",String(C)),l.classList.toggle("is-active",C),g?.destroy(),g=C?Ye(d,l):null,e.removeEventListener("pointerdown",b),C&&e.addEventListener("pointerdown",b);}let S=h=>{f(false),o.pick(n.gallery,h.id),chunk24B6ZCFG_cjs.Il(s.closest(".pptxv"));};l.addEventListener("mousedown",h=>h.preventDefault()),l.addEventListener("click",h=>{h.stopPropagation(),f(d.hidden===true);}),s.addEventListener("keydown",h=>{h.key==="Escape"&&d.hidden!==true&&(h.stopPropagation(),f(false),l.focus());});let y={el:s,trigger:l,popup:d,isOpen:()=>d.hidden!==true,close:()=>f(false),refresh(h,C){u=chunk24B6ZCFG_cjs.nr(n.gallery,h),m=!C||u.disabled||!chunk24B6ZCFG_cjs.zr(u);let w=Fo(t,u.labelKey,u.label);p.textContent=w;let P=i?t("pptx.gallery.more",{name:w}):w;l.title=P,l.setAttribute("aria-label",P),l.disabled=m,s.classList.toggle("is-disabled",m),a?.replaceChildren(...chunk24B6ZCFG_cjs.yr(u).map(k=>Fs(e,t,k,m,S))),x=true,d.hidden!==true&&v(),m?f(false):g?.update();}};return o.register(y),y}function Vs(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");o.setAttribute(chunk24B6ZCFG_cjs.Xq,t);let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row"),i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");return i.textContent=n,o.append(r,i),{el:o,row:r}}function $I(e,t,n,o){let r=Vs(e,n.group,Fo(t,n.labelKey,n.label));for(let i of n.galleries)r.row.appendChild(st(e,t,i,o).el);return r.el}function _E(e,t,n){let o=new Map;for(let{id:r}of chunk24B6ZCFG_cjs.cq){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content pptxv-ribbon-contextual-content");i.dataset.ribbonContextualPane=r;for(let s of chunk24B6ZCFG_cjs.pr[r])i.appendChild($I(e,t,s,n));o.set(r,i);}return o}function GE(e,t,n){for(let[o,r]of t)n.includes(o)?r.parentElement!==e&&e.appendChild(r):r.remove();}var UE={element:null};function yt(e){let t=[],n=UE,o=false,r=[],i=()=>{for(let s of t)s.refresh(n,o);};return {context:()=>n,register(s){t.push(s),s.refresh(n,o);},sync(s,a){let l=s??UE,p=[l.element,l.theme?.colorScheme,l.theme?.fontScheme,l.theme?.name,l.resolveStyleMatrix!==void 0,a];n=l,o=a,!(p.length===r.length&&p.every((d,u)=>d===r[u]))&&(r=p,i());},pick(s,a){let l=chunk24B6ZCFG_cjs.or(s,a,n);l&&e(l);},closeAll(){for(let s of t)s.close();}}}function KE(e,t,n){let o=chunk24B6ZCFG_cjs.hg(t);if(!o||!("textSegments"in t))return;let r=chunk24B6ZCFG_cjs.Ch(t.textSegments);if(chunk24B6ZCFG_cjs.ig(e)!==r)return false;let i=chunk24B6ZCFG_cjs.As(e,r),s=e.ownerDocument.createElement("div");return s.dataset.pptxTextFlow="",chunk24B6ZCFG_cjs.Nh(s,o)?(e.replaceChildren(s),n(s,o),i&&chunk24B6ZCFG_cjs.jg(o,s,i),true):false}function WE(e){let t=Array.from(e.childNodes).filter(n=>n.nodeType===3?(n.nodeValue??"").length>0:n instanceof HTMLElement&&!n.hasAttribute("data-pptx-bullet-marker"));return t.length!==1||!(t[0]instanceof HTMLElement)?false:t[0].tagName==="BR"||WE(t[0])}function qI(e){return (e.matches("[data-seg-idx]")&&!e.hasAttribute("data-pptx-bullet-marker")?e:e.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])"))?.dataset.segIdx}function $E(e,t){let o=e.getSelection()?.anchorNode,i=(o?.nodeType===Node.ELEMENT_NODE?o:o?.parentElement)?.closest("[data-seg-idx]");if(!i||!t.contains(i))return;let s=i.closest("div, p"),a=s?.hasAttribute("data-pptx-text-flow"),l=a&&s?.previousElementSibling?.hasAttribute("data-pptx-text-flow")&&s.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])")===i,p=s&&s!==t&&(!a||l)&&t.contains(s)?s:i,d=p.previousElementSibling,u=d instanceof HTMLElement&&qI(d)===i.dataset.segIdx&&WE(d)?d:p;u.dataset.pptxParagraphStart="";}function qE(e,t,n){let o=e.ownerDocument,r=e;if(t?.length){let i=o.createElement("div");i.dataset.pptxTextFlow="",r=i,t.forEach((s,a)=>{let l=o.createElement("span");l.dataset.segIdx=String(a),chunk24B6ZCFG_cjs.bg(s)&&(l.dataset.pptxBulletMarker="",l.contentEditable="false");let p=a>0&&chunk24B6ZCFG_cjs.bg(t[a-1]),d=s.bulletInfo&&!s.bulletInfo.none;s.text.length===0&&a===t.length-1&&(p||d)?(l.dataset.pptxEmptyRun="",l.appendChild(o.createElement("br"))):l.textContent=s.text,i.appendChild(l);}),e.appendChild(i);}else e.textContent=n;return r}function Kr(e,t,n){let o=chunk24B6ZCFG_cjs.e(e)?e:void 0,r=o?.textSegments,i=o?.textStyle,s=n?.elementId===e.id?chunk24B6ZCFG_cjs.Sr(n,t):void 0;return {text:t,textSegments:s?.textSegments??chunk24B6ZCFG_cjs.ph(t,r,i)}}function Bs(e,t){if(chunk24B6ZCFG_cjs.e(e))return chunk24B6ZCFG_cjs.Fg(e.textStyle,e.height,t)}function zs(e,t){return chunk24B6ZCFG_cjs.e(e)?chunk24B6ZCFG_cjs.Gg(e.textStyle,e.height,t):"unchanged"}function Wr(e){return !e||!chunk24B6ZCFG_cjs.e(e)||!chunk24B6ZCFG_cjs._e(e,"textEdit")?false:!e.textSegments?.some(t=>t.equationXml)}function io(){if(typeof document>"u")return;let e=document.querySelector("[data-inline-editor]");return e?chunk24B6ZCFG_cjs.ig(e):void 0}function $r(e){let{doc:t,overlayRoot:n,box:o,scale:r,element:i}=e,s=chunk24B6ZCFG_cjs.e(i)?i:void 0,a=s?.text??"",l=s?.textStyle?.fontSize,p=s?.textStyle?.fontFamily,d=chunkOBVLNSK5_cjs.w(t,"div","pptxv-inline-editor pptxv-inline-text-editor",{...chunkOBVLNSK5_cjs.z(i),...typeof l=="number"?{fontSize:`${l}px`}:{},...p!==void 0?{fontFamily:p}:{},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");let u=d,m=!!e.collaboration?.patcher.isActive(),g=m?void 0:chunk24B6ZCFG_cjs.hg(i),x,b;g?(u=t.createElement("div"),u.dataset.pptxTextFlow="",chunk24B6ZCFG_cjs.Nh(u,g),d.append(u)):m||(u=qE(d,s?.textSegments,a));let v=chunk24B6ZCFG_cjs.ig(d),f=false,S=()=>{let w=x?.read();return w?.kind==="supported"?w.snapshot:void 0},y=w=>{if(f)return;let P=x?.read();if(w!==null&&m&&P?.kind==="unsupported"&&(P.reason==="composition-active"||P.reason==="input-active"))return;let k=P?.kind==="supported"?P.snapshot:void 0;m&&!k&&(w=null),w!==null&&k&&(w=k.text),f=true,d.contains(t.activeElement)&&chunk24B6ZCFG_cjs.Jl(d),w!==null&&(k?chunk24B6ZCFG_cjs.Tr(i,w,k):w!==v)&&(k?e.onCommit(w,k):e.onCommit(w)),x?.dispose(),d.remove(),e.onClose();};d.addEventListener("input",w=>{if(x){x.refresh();return}w.inputType==="insertParagraph"&&$E(t,d),e.onInput?.(chunk24B6ZCFG_cjs.ig(d));}),d.addEventListener("blur",()=>y(chunk24B6ZCFG_cjs.ig(d))),d.addEventListener("keydown",w=>{if(e.onLiveFormatKey?.(w)){w.preventDefault(),w.stopPropagation();return}w.stopPropagation(),w.key==="Escape"&&(w.preventDefault(),y(chunk24B6ZCFG_cjs.ig(d)));}),d.addEventListener("pointerdown",w=>w.stopPropagation());let h=()=>{let w=x?.readSelection();e.onSelectionChange?.(w?w.kind==="supported"?w.selection:null:chunk24B6ZCFG_cjs.mg(s?.textSegments));};d.addEventListener("keyup",h),d.addEventListener("pointerup",h);let C=(w,P)=>{d.style.textDecoration="none",d.style.textDecorationLine="none",u=w,x=chunk24B6ZCFG_cjs.kg(w,P,{isCurrent:()=>!f&&d.isConnected,onRead:k=>e.onInput?.(k.kind==="supported"?k.snapshot.text:k.text,k.kind==="supported"?k.snapshot:void 0)});};return n.appendChild(d),m?(b=chunk24B6ZCFG_cjs.Oh(d,i,{...e.collaboration,onCancel:()=>y(null)}),x=b,b||y(null)):g&&C(u,g),f||d.focus(),f||chunk24B6ZCFG_cjs.Tg(u),{el:d,checkModel:b?.checkModel,readAccepted:b?.readAccepted,activateList:w=>!f&&(!!x||KE(d,w,C)),readSnapshot:S,readList:()=>x?.read(),formatSnapshot:w=>x?.format(w).kind==="supported",commit:()=>y(chunk24B6ZCFG_cjs.ig(d)),cancel:()=>y(null)}}var jI=24,YI=1,XI=400;function Le(e){return e!==void 0&&chunk24B6ZCFG_cjs.e(e)}function qr(e){return e!==void 0&&chunk24B6ZCFG_cjs.f(e)}function lt(e){let t=Le(e)?e.textStyle:void 0,n=Le(e)?e.textSegments?.find(i=>i.text)?.style:void 0,o=t?.fontSize??n?.fontSize,r=Le(e)?chunk24B6ZCFG_cjs.cg(e):"none";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:o===void 0?jI:chunk24B6ZCFG_cjs.gh(o),fontFamily:t?.fontFamily??n?.fontFamily,placeholderType:e?.placeholderType,color:t?.color??n?.color,colorRef:t?.colorRef??n?.colorRef,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:r==="mixed"?"none":r,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function St(e,t){if(!Le(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>chunk24B6ZCFG_cjs.dg(r,t));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function ao(e,t){let n=lt(e);return St(e,{[t]:!n[t]})}function Vo(e,t){let n=Math.min(XI,Math.max(YI,t));return St(e,{fontSize:chunk24B6ZCFG_cjs.hh(n)})}function Ns(e,t){return Vo(e,lt(e).fontSize+t)}function jE(e,t){return Vo(e,chunk24B6ZCFG_cjs.jh(lt(e).fontSize,t))}function _s(e,t,n){return St(e,{color:t,colorRef:n})}function Gs(e,t){return St(e,{highlightColor:t})}function pt(e,t){return qr(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function Us(e,t){return St(e,{fontFamily:t})}function Ks(e,t){return St(e,{characterSpacing:t})}var QI={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function Ws(e){let t=lt(e).hasTextShadow;return St(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:QI)}function $s(e,t){if(!Le(e)||!e.textSegments)return {};let n=io(),o=n!==void 0?chunk24B6ZCFG_cjs.ph(n,e.textSegments,e.textStyle):e.textSegments,r=chunk24B6ZCFG_cjs.Ug(o,null,t);return {textSegments:r,text:r.map(i=>i.text).join("")}}function qs(e){return St(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})}function se(e,t){return e.setAttribute(chunk24B6ZCFG_cjs.Xq,t),e}function z(e,t){return e.setAttribute(chunk24B6ZCFG_cjs.Yq,t),e}function YE(e,...t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-contents");return n.append(...t),n}function q(e,t,...n){return se(YE(e,...n),t)}function Ot(e,t,...n){return z(YE(e,...n),t)}function XE(e,t,n){let o=chunkOBVLNSK5_cjs.w(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}),s=e.createElement("input");return s.type="number",s.className="pptxv-field-input pptxv-arrange-stroke",s.min="0",s.max="120",s.step="0.5",s.value=String(chunk24B6ZCFG_cjs.Wr),s.title=t("pptx.ribbon.strokeWidth"),s.setAttribute("aria-label",t("pptx.ribbon.strokeWidth")),s.addEventListener("keydown",a=>a.stopPropagation()),s.addEventListener("change",()=>{let a=Number.parseFloat(s.value);Number.isFinite(a)&&n.setStrokeWidth(Math.max(0,a));}),z(r.btn,"home.arrange.group"),z(i.btn,"home.arrange.ungroup"),z(s,"home.arrange.outlineWidth"),o.append(r.btn,i.btn,s),{el:o,update({editable:a,selectedCount:l,selectionGroupable:p,selectedElement:d}){let u=d??null;r.setDisabled(!chunk24B6ZCFG_cjs.Xr(a,l,p)),i.setDisabled(!chunk24B6ZCFG_cjs.Yr(a,u)),s.disabled=!chunk24B6ZCFG_cjs.Zr(a,u);let m=chunk24B6ZCFG_cjs._r(u);e.activeElement!==s&&(s.value=String(m));}}}function js(e,t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-dropdown"),o=chunkOBVLNSK5_cjs.w(e,"button","pptxv-dropdown-trigger");if(o.type="button",o.title=t.label,o.setAttribute("aria-label",t.label),o.setAttribute("aria-haspopup","menu"),o.setAttribute("aria-expanded","false"),o.dataset.pptxRibbonControl=t.control,t.icon&&o.appendChild(chunkOBVLNSK5_cjs.K(e,t.icon)),t.text){let a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-dropdown-text");a.textContent=t.text,o.appendChild(a);}o.appendChild(chunkOBVLNSK5_cjs.K(e,"chevron-down"));let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-dropdown-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t.label),r.hidden=true,n.append(o,r);let i=null,s=a=>{r.hidden=!a,o.setAttribute("aria-expanded",String(a)),o.classList.toggle("is-active",a),i?.destroy(),i=a?Ye(r,o):null;};for(let a of t.items){if(a.groupLabel){let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-dropdown-group");p.setAttribute("role","presentation"),p.textContent=a.groupLabel,r.appendChild(p);}let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-dropdown-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,Object.assign(l.dataset,a.dataset??{}),l.addEventListener("click",()=>{s(false),a.run(),l.blur(),chunk24B6ZCFG_cjs.Il(n.closest(".pptxv"));}),r.appendChild(l);}return o.addEventListener("click",a=>{a.stopPropagation(),s(r.hidden===true);}),e.addEventListener("pointerdown",a=>{!r.hidden&&!n.contains(a.target)&&s(false);}),{el:n,trigger:o,setDisabled(a,l){o.disabled=a,o.title=a&&l?l:t.label,a&&s(false);},close:()=>s(false)}}var QE="pptx.image.cropHint";function ZE(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-arrange-extras"),i=chunk24B6ZCFG_cjs.eq("mergeShapes",o)?null:js(e,{label:t(chunk24B6ZCFG_cjs.Pl),icon:"merge-shapes",control:"merge-shapes",items:chunk24B6ZCFG_cjs.Rl.map(l=>({label:t(l.labelKey),dataset:{pptxMergeOp:l.operation},run:()=>n.mergeShapes(l.operation)}))});i&&(z(i.el,"home.arrange.mergeShapes"),r.appendChild(i.el));let s=null,a=null;if(!chunk24B6ZCFG_cjs.eq("crop",o)){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-arrange-extras");l.dataset.pptxCropControls="true",s=H(e,{label:t(chunk24B6ZCFG_cjs.dt),icon:"crop",onClick:n.toggleCropMode}),s.btn.dataset.pptxRibbonControl="crop";let p=null,d=chunk24B6ZCFG_cjs.Us.map(u=>{let m=u.group!==p?t(chunk24B6ZCFG_cjs.Vs[u.group]):void 0;return p=u.group,{label:u.id,groupLabel:m,dataset:{pptxCropAspect:u.id},run:()=>n.cropToAspect(u.ratioWidth,u.ratioHeight)}});d.push({label:t(chunk24B6ZCFG_cjs.et),dataset:{pptxCropAction:"fill"},run:n.cropFill},{label:t(chunk24B6ZCFG_cjs.ft),dataset:{pptxCropAction:"fit"},run:n.cropFit}),a=js(e,{label:t(chunk24B6ZCFG_cjs.gt),control:"crop-menu",items:d}),z(l,"home.arrange.crop"),l.append(s.btn,a.el),r.appendChild(l);}return {el:r,update({editable:l,canMergeShapes:p,canCrop:d,cropActive:u}){if(i?.setDisabled(!(l&&p),t(chunk24B6ZCFG_cjs.Ql)),s){let m=l&&(d||u);s.setDisabled(!m),s.btn.title=t(m?chunk24B6ZCFG_cjs.dt:QE),s.setActive(u);}a?.setDisabled(!(l&&(d||u)),t(QE));}}}var ZI=[{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"}],JE=3;function eT(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(r,"home.arrange");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.arrange.groupLabel"),r.appendChild(s);let a=ZI.map(C=>H(e,{label:t(chunkOBVLNSK5_cjs.F[C.label]),icon:C.icon,onClick:()=>n.alignElements(C.edge)})),l=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")}),d=H(e,{label:t("pptx.arrange.format"),icon:"copy",textLabel:t("pptx.arrange.format"),onClick:n.toggleFormatPainter});d.btn.title=t("pptx.arrange.formatPainter");let u=H(e,{label:t("pptx.arrange.flipH"),icon:"flip-h",onClick:n.flipHorizontal}),m=H(e,{label:t("pptx.arrange.flipV"),icon:"flip-v",onClick:n.flipVertical}),g=H(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),x=H(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),b=H(e,{label:t("pptx.arrange.back"),icon:"send-back",onClick:n.sendToBack});b.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}),S=H(e,{label:t("pptx.arrange.delete"),icon:"trash",textLabel:t("pptx.arrange.delete"),onClick:n.delete}),y=XE(e,t,n),h=ZE(e,t,n,o);return z(u.btn,"home.arrange.flipHorizontal"),z(m.btn,"home.arrange.flipVertical"),z(g.btn,"home.arrange.sendBackward"),z(x.btn,"home.arrange.bringForward"),z(b.btn,"home.arrange.sendToBack"),z(v.btn,"home.arrange.bringToFront"),z(f.btn,"home.arrange.duplicate"),z(S.btn,"home.arrange.delete"),i.append(Ot(e,"home.arrange.align",...a.map(C=>C.btn),l.btn,p.btn),d.btn,u.btn,m.btn,y.el,h.el,g.btn,x.btn,b.btn,v.btn,f.btn,S.btn),{el:r,update({editable:C,hasSelection:w,formatPainterActive:P,selectedCount:k,selectionGroupable:A,selectedElement:T,canMergeShapes:E=false,canCrop:L=false,cropActive:M=false}){let D=C&&w;for(let I of [...a,u,m,g,x,b,v,f,S])I.setDisabled(!D);y.update({editable:C,selectedCount:k,selectionGroupable:A,selectedElement:T}),h.update({editable:C,canMergeShapes:E,canCrop:L,cropActive:M}),d.setDisabled(!C||!w&&!P),d.btn.dataset.active=String(P),l.setDisabled(!C||k<JE),p.setDisabled(!C||k<JE);}}}function tT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(o,"home.clipboard");let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let s=H(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),a=H(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),l=H(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),p=H(e,{label:t("pptx.arrange.formatPainter"),icon:"copy",onClick:n.toggleFormatPainter});return p.btn.dataset.testid="format-painter-toggle",z(s.btn,"home.clipboard.paste"),z(a.btn,"home.clipboard.cut"),z(l.btn,"home.clipboard.copy"),z(p.btn,"home.clipboard.formatPainter"),r.append(s.btn,a.btn,l.btn,p.btn),{el:o,update({hasSelection:d,hasClipboard:u,editable:m,formatPainterActive:g}){s.setDisabled(!m||!u),a.setDisabled(!m||!d),l.setDisabled(!d),p.setDisabled(!m||!d&&!g),p.btn.dataset.active=String(g);}}}function xe(e,t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-dropdown"),o=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunkOBVLNSK5_cjs.K(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let s=false,a,l=new Map,p=null,d=b=>{s=b,i.hidden=!b,o.setAttribute("aria-expanded",String(b)),o.classList.toggle("is-active",b),b?(p?.destroy(),p=Ye(i,o)):(p?.destroy(),p=null);},u=()=>{for(let[b,v]of l){let f=a!==void 0&&v===a;b.classList.toggle("is-selected",f),b.setAttribute("aria-selected",String(f));}},m=null,g=b=>JSON.stringify(b.map(v=>[v.label,String(v.value),v.groupLabel??"",v.hint??"",v.style?Object.entries(v.style):0])),x=b=>{i.replaceChildren(),l.clear();for(let v of b){if(v.groupLabel){let S=chunkOBVLNSK5_cjs.w(e,"div","pptxv-dropdown-group");S.setAttribute("role","presentation"),S.textContent=v.groupLabel,i.appendChild(S);}let f=chunkOBVLNSK5_cjs.w(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 S=chunkOBVLNSK5_cjs.w(e,"span","pptxv-dropdown-item-hint");S.textContent=v.hint,f.appendChild(S);}v.style&&Object.assign(f.style,v.style),f.addEventListener("click",()=>{d(false),t.onSelect(v.value);}),i.appendChild(f),l.set(f,v.value);}u();};return x(t.items),o.addEventListener("click",b=>{b.stopPropagation(),d(!s);}),e.addEventListener("pointerdown",b=>{s&&!n.contains(b.target)&&d(false);}),{el:n,setDisabled(b){o.disabled=b,b&&d(false);},setTriggerText(b){r.textContent=b;},setSelected(b){a=b,u();},setItems(b){let v=g(b);v!==m&&(m=v,x(b),u());},close:()=>d(false)}}var so=chunk24B6ZCFG_cjs.yo;function JI(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function dt(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-swatch-picker"),r=chunkOBVLNSK5_cjs.w(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(chunkOBVLNSK5_cjs.K(e,n.icon));let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-swatch-swab");r.appendChild(i),o.appendChild(r);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-swatch-menu");s.hidden=true,o.appendChild(s);let a=null;if(n.onSelectTheme){let y=n.onSelectTheme;a=Ie(e,t,C=>{v(false),y(C);}),s.appendChild(a.el);let h=chunkOBVLNSK5_cjs.w(e,"div","pptxv-swatch-standard-label");h.textContent=t("pptx.colorPicker.standardColors"),s.appendChild(h);}let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-swatch-grid");s.appendChild(l);let p=Rt(e,t,y=>{v(false),n.onSelect(y);});s.appendChild(p.el);let d=n.fallback,u,m=new Map,g=()=>{for(let[y,h]of m)y.classList.toggle("is-selected",h===d);p.setSelected(d),a?.setSelected(u,d),i.style.backgroundColor=d;},x=false,b=null,v=y=>{x=y,s.hidden=!y,r.setAttribute("aria-expanded",String(y)),r.classList.toggle("is-active",y),y?(b?.destroy(),b=Ye(s,r)):(b?.destroy(),b=null);};for(let y of n.swatches){let h=chunkOBVLNSK5_cjs.w(e,"button","pptxv-swatch");h.type="button",h.setAttribute("data-pptx-compact",""),h.style.backgroundColor=y,h.setAttribute("aria-label",y),h.addEventListener("click",()=>{v(false),n.onSelect(y);}),l.appendChild(h),m.set(h,y);}let f=chunkOBVLNSK5_cjs.w(e,"label","pptxv-swatch-custom");f.textContent=t("pptx.ribbon.customColour");let S=e.createElement("input");return S.type="color",S.className="pptxv-swatch-custom-input",S.addEventListener("input",()=>n.onSelect(S.value)),f.appendChild(S),s.appendChild(f),r.addEventListener("click",y=>{y.stopPropagation(),v(!x);}),e.addEventListener("pointerdown",y=>{x&&!o.contains(y.target)&&v(false);}),g(),{el:o,setValue(y){d=JI(y,n.fallback),S.value=d,g();},setDisabled(y){r.disabled=y,p.setDisabled(y),a?.setDisabled(y),y&&v(false);},setRecentColors(y){p.setColors(y);},setThemeColorMap(y){a?.setThemeColorMap(y);},setSelectedRef(y){u=y,g();}}}var eL=12;function oT(e,t,n,o=yt(()=>{})){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(r,"home.drawing");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.groupDrawing"),r.appendChild(s);let a=xe(e,{triggerLabel:t("pptx.drawing.shapes"),triggerText:t("pptx.drawing.shapes"),icon:"shapes",items:chunk24B6ZCFG_cjs.qo.slice(0,eL).map(x=>({label:t(x.i18nKey),value:x.type})),onSelect:x=>n.insertShape(x)}),l=xe(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:x=>x()}),p=dt(e,t,{label:t("pptx.drawing.shapeFill"),icon:"square",swatches:chunk24B6ZCFG_cjs.Li,fallback:"#ffffff",onSelect:x=>n.setShapeFill(x),onSelectTheme:x=>n.setShapeFill(x.hex,x.ref)}),d=dt(e,t,{label:t("pptx.drawing.shapeOutline"),icon:"pen",swatches:chunk24B6ZCFG_cjs.Li,fallback:"#000000",onSelect:x=>n.setShapeStroke(x),onSelectTheme:x=>n.setShapeStroke(x.hex,x.ref)}),u=x=>{let b=chunk24B6ZCFG_cjs.qr.find(v=>v.control===x);if(!b)throw new Error(`Missing fixed gallery placement ${x}`);return b},m=st(e,t,u("home.drawing.quickStyles"),o),g=st(e,t,u("home.drawing.shapeEffects"),o);return z(a.el,"home.drawing.shapes"),z(l.el,"home.drawing.arrange"),z(p.el,"home.drawing.shapeFill"),z(d.el,"home.drawing.shapeOutline"),i.append(a.el,l.el,m.el,p.el,d.el,g.el),{el:r,update({editable:x,hasSelection:b,recentColors:v,themeColorMap:f,fillColor:S,fillColorRef:y,strokeColor:h,strokeColorRef:C}){a.setDisabled(!x);let w=x&&b;l.setDisabled(!w),p.setDisabled(!w),d.setDisabled(!w),p.setRecentColors(v??[]),d.setRecentColors(v??[]),p.setThemeColorMap(f),d.setThemeColorMap(f),p.setSelectedRef(y),d.setSelectedRef(C),S!==void 0&&p.setValue(S),h!==void 0&&d.setValue(h);}}}function nT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(o,"home.editing");let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let s=H(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),a=H(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace}),l=tL(e,t,n);return z(s.btn,"home.editing.find"),z(a.btn,"home.editing.replace"),z(l.el,"home.editing.select"),r.append(s.btn,a.btn,l.el),{el:o,update({editable:p}){l.setDisabled(!p);}}}function tL(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-primary-menu-host"),r=H(e,{label:t("pptx.ribbon.tool.select"),icon:"cursor",onClick:()=>a(!s)});r.btn.setAttribute("aria-haspopup","menu"),r.btn.setAttribute("aria-expanded","false");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-primary-menu");i.style.left="0",i.style.right="auto",i.style.minWidth="150px",i.hidden=true;let s=false,a=p=>{s=p,i.hidden=!p,r.btn.setAttribute("aria-expanded",String(p)),r.btn.classList.toggle("is-active",p);},l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-primary-menu-item");return l.type="button",l.textContent=t("pptx.editing.selectAll"),l.addEventListener("mousedown",p=>p.preventDefault()),l.addEventListener("click",()=>{a(false),n.selectAll();}),i.appendChild(l),e.addEventListener("pointerdown",p=>{s&&!o.contains(p.target)&&a(false);}),o.append(r.btn,i),{el:o,setDisabled(p){r.btn.disabled=p,l.disabled=p,p&&a(false);}}}var rT=2;function iT(e,t){return chunk24B6ZCFG_cjs.ro(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 aT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(o,"home.font");let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.ribbon.font"),o.appendChild(i);let s=xe(e,{triggerLabel:t("pptx.ribbon.fontFamily"),triggerText:"Segoe UI",items:iT(t,{}),onSelect:n.setFontFamily});s.el.classList.add("pptxv-font-family-dd");let a=xe(e,{triggerLabel:t("pptx.ribbon.fontSize"),triggerText:"24",items:chunk24B6ZCFG_cjs.ih.map(w=>({label:String(w),value:w})),onSelect:n.setFontSize});a.el.classList.add("pptxv-font-size-dd");let l=H(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),p=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(-rT)}),x=H(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(rT)}),b=H(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),v=xe(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunk24B6ZCFG_cjs.kh.map(w=>({label:t(w.i18nKey),value:w.value})),onSelect:n.setCharacterSpacing});v.el.querySelector(".pptxv-dropdown-text")?.remove();let f=xe(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunk24B6ZCFG_cjs.mh.map(w=>({label:t(w.i18nKey),value:w.value})),onSelect:n.changeCase});f.el.querySelector(".pptxv-dropdown-text")?.remove();let S=dt(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:so,fallback:"#000000",onSelect:n.setTextColor,onSelectTheme:w=>n.setTextColor(w.hex,w.ref)}),y=dt(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:so,fallback:"#ffff00",onSelect:n.setHighlightColor});z(s.el,"home.font.fontFamily"),z(a.el,"home.font.fontSize"),z(g.btn,"home.font.decreaseFontSize"),z(x.btn,"home.font.increaseFontSize"),z(l.btn,"home.font.bold"),z(p.btn,"home.font.italic"),z(d.btn,"home.font.underline"),z(u.btn,"home.font.strikethrough"),z(m.btn,"home.font.shadow"),z(b.btn,"home.font.clearFormatting"),z(v.el,"home.font.characterSpacing"),z(f.el,"home.font.changeCase"),z(S.el,"home.font.fontColor"),z(y.el,"home.font.highlightColor"),r.append(s.el,a.el,g.btn,x.btn,l.btn,p.btn,d.btn,u.btn,m.btn,b.btn,v.el,f.el,S.el,y.el);let h=[l,p,d,u],C=[g,x,l,p,d,u,m,b,v,f,S,y];return {el:o,update({canFormat:w,editable:P,text:k,themeFonts:A,embeddedFontFamilies:T,customFontFamilies:E,recentColors:L,themeColorMap:M}){s.setItems(iT(t,{themeFonts:A,embeddedFonts:T,customFonts:E})),l.setActive(k.bold),p.setActive(k.italic),d.setActive(k.underline),u.setActive(k.strikethrough),m.setActive(k.hasTextShadow),s.setTriggerText(k.fontFamily??chunk24B6ZCFG_cjs.so(k.placeholderType,A)),s.setSelected(k.fontFamily),a.setTriggerText(String(k.fontSize)),a.setSelected(k.fontSize),S.setValue(k.color),y.setValue(k.highlightColor),S.setRecentColors(L??[]),y.setRecentColors(L??[]),S.setThemeColorMap(M),S.setSelectedRef(k.colorRef),s.setDisabled(!P||!w),a.setDisabled(!P||!w);for(let D of C)D.setDisabled(!P||!w);for(let D of h)(!P||!w)&&D.setActive(false);}}}var oL=[{value:"horizontal",labelKey:"pptx.slideInspector.horizontal"},{value:"vertical",labelKey:"pptx.ribbon.textDirectionRotate90"},{value:"vertical270",labelKey:"pptx.ribbon.textDirectionRotate270"},{value:"wordArtVert",labelKey:"pptx.ribbon.textDirectionStacked"}],nL=[{count:1,labelKey:"pptx.ribbon.columns1"},{count:2,labelKey:"pptx.ribbon.columns2"},{count:3,labelKey:"pptx.ribbon.columns3"}],Ys=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft",control:"home.paragraph.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter",control:"home.paragraph.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight",control:"home.paragraph.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify",control:"home.paragraph.justify"}];function sT(e,t,n,o,r){let i=chunk24B6ZCFG_cjs.qr.find(a=>a.control===o),s=z(chunkOBVLNSK5_cjs.w(e,"div","pptxv-split-gallery"),o);return s.appendChild(n),i&&s.appendChild(st(e,t,i,r,{chevronOnly:true}).el),s}function lT(e,t,n,o=yt(()=>{})){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(r,"home.paragraph");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.paragraph"),r.appendChild(s);let a=H(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),l=H(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList});for(let{btn:v}of [a,l])v.addEventListener("mousedown",f=>f.preventDefault());let p=H(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),d=H(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),u=Ys.map(v=>H(e,{label:t(v.labelKey),icon:v.icon,onClick:()=>n.setTextAlign(v.align)})),m=xe(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunk24B6ZCFG_cjs.lh.map(v=>({label:v.label,value:v.value})),onSelect:n.setLineSpacing});m.el.querySelector(".pptxv-dropdown-text")?.remove();let g=xe(e,{triggerLabel:t("pptx.paragraph.textDirection"),triggerText:"",icon:"change-case",items:oL.map(v=>({label:t(v.labelKey),value:v.value})),onSelect:n.setTextDirection});g.el.querySelector(".pptxv-dropdown-text")?.remove();let x=xe(e,{triggerLabel:t("pptx.paragraph.columns"),triggerText:"",icon:"columns",items:nL.map(v=>({label:t(v.labelKey),value:v.count})),onSelect:n.setColumnCount});x.el.querySelector(".pptxv-dropdown-text")?.remove(),z(p.btn,"home.paragraph.decreaseIndent"),z(d.btn,"home.paragraph.increaseIndent");for(let[v,f]of Ys.entries())z(u[v].btn,f.control);z(m.el,"home.paragraph.lineSpacing"),z(g.el,"home.paragraph.textDirection"),z(x.el,"home.paragraph.columns"),i.append(sT(e,t,a.btn,"home.paragraph.bullets",o),sT(e,t,l.btn,"home.paragraph.numbering",o),p.btn,d.btn,...u.map(v=>v.btn),m.el,g.el,x.el);let b=[a,l,p,d,...u,m,g,x];return {el:r,update({canFormat:v,editable:f,text:S}){a.setActive(S.listType==="bullet"),l.setActive(S.listType==="numbered");for(let[y,h]of Ys.entries())u[y].setActive(S.align===h.align);m.setSelected(S.lineSpacing);for(let y of b)y.setDisabled(!f||!v);}}}var Xs=1280,Qs=720,dT=144,cT=dT/Xs,rL=Math.round(Qs*cT),pT;function mT(e,t,n,o){pT??=chunkOBVLNSK5_cjs.J();let r=chunk24B6ZCFG_cjs.Kf(n,{slideWidth:Xs,slideHeight:Qs,...o?{scheme:o}:{},idFor:a=>`tpl-preview-${n}-${a}`}),i={id:`tpl-preview-${n}`,rId:"",slideNumber:1,elements:r.elements,...r.backgroundColor?{backgroundColor:r.backgroundColor}:{}},s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tpl-preview",{width:`${dT}px`,height:`${rL}px`,overflow:"hidden",pointerEvents:"none",backgroundColor:i.backgroundColor??"#FFFFFF"});return s.setAttribute("aria-hidden","true"),s.appendChild(chunkOBVLNSK5_cjs.A({document:e,slide:i,canvasSize:{width:Xs,height:Qs},mediaDataUrls:new Map,registry:pT,t,scale:cT})),s}function uT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tpl-dialog-layer");o.hidden=true;let r=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tpl-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.slideTemplates.close"));let i=chunkOBVLNSK5_cjs.w(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 s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tpl-dialog-header"),a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tpl-dialog-heading"),l=chunkOBVLNSK5_cjs.w(e,"h2");l.textContent=t("pptx.slideTemplates.galleryTitle");let p=chunkOBVLNSK5_cjs.w(e,"p");p.textContent=t("pptx.slideTemplates.galleryDescription"),a.append(l,p);let d=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tpl-dialog-close");d.type="button",d.setAttribute("aria-label",t("pptx.slideTemplates.close")),d.textContent="\xD7",s.append(a,d);let u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tpl-dialog-body"),m=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tpl-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.slideTemplates.gallery")),u.appendChild(m);let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tpl-dialog-footer"),x=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tpl-dialog-cancel");x.type="button",x.textContent=t("pptx.slideTemplates.cancel");let b=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tpl-dialog-insert");b.type="button",b.textContent=t("pptx.slideTemplates.insert"),b.disabled=true,g.append(x,b),i.append(s,u,g),o.append(r,i);let v,f=null;function S(P){v=P,b.disabled=false;for(let k of m.querySelectorAll('[role="option"]')){let A=k.dataset.templateId===P;k.setAttribute("aria-selected",String(A)),k.classList.toggle("is-selected",A);}}function y(P){P&&(n.onInsert(P),C());}function h(){let P=n.getScheme?.();m.replaceChildren();for(let k of chunk24B6ZCFG_cjs.Jf){let A=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tpl-option");A.type="button",A.dataset.templateId=k.id,A.setAttribute("role","option"),A.setAttribute("aria-selected",String(v===k.id)),A.setAttribute("aria-label",t(k.nameKey)),A.title=t(k.descriptionKey),A.classList.toggle("is-selected",v===k.id),A.appendChild(mT(e,t,k.id,P));let T=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tpl-option-label");T.textContent=t(k.nameKey),A.append(T),A.addEventListener("click",()=>S(k.id)),A.addEventListener("dblclick",()=>y(k.id)),m.appendChild(A);}}function C(){o.hidden||(o.hidden=true,f?.focus(),f=null);}function w(P){if(P.key==="Escape"){P.preventDefault(),C();return}if(P.key!=="Tab")return;let k=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(k.length===0)return;let A=k[0],T=k[k.length-1];P.shiftKey&&e.activeElement===A?(P.preventDefault(),T.focus()):!P.shiftKey&&e.activeElement===T&&(P.preventDefault(),A.focus());}return r.addEventListener("click",C),d.addEventListener("click",C),x.addEventListener("click",C),b.addEventListener("click",()=>y(v)),o.addEventListener("keydown",w),{el:o,open(P){let k=e.defaultView?.HTMLElement;f=k&&e.activeElement instanceof k?e.activeElement:null,h(),o.parentElement!==P&&P.appendChild(o),o.hidden=false,i.focus();},close:C}}var iL=128,aL=72;function xT(e,t,n){let o=chunkOBVLNSK5_cjs.w(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=a=>{r=a,o.hidden=!a;};e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);});let s=null;return {el:o,setItems(a,l){let p=JSON.stringify([a.map(d=>[d.path,d.name]),l.currentLayoutPath??"",a.map(d=>l.previews.get(d.path)?1:0)]);if(p!==s){s=p,o.replaceChildren();for(let d of a){let u=chunkOBVLNSK5_cjs.w(e,"button","pptxv-layout-tile");u.type="button",u.setAttribute("role","menuitem"),chunk24B6ZCFG_cjs.xo(d,l.currentLayoutPath)&&(u.classList.add("pptxv-layout-tile-current"),u.setAttribute("aria-current","true")),u.appendChild(sL(e,l.previews.get(d.path),l.renderPreview));let m=chunkOBVLNSK5_cjs.w(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 sL(e,t,n){let o=chunk24B6ZCFG_cjs.wo(t,iL,aL),r=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(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 s=t&&n?n(t,o):void 0;s&&i.appendChild(s);for(let a of o.frames){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-layout-tile-frame");l.style.left=`${a.left}px`,l.style.top=`${a.top}px`,l.style.width=`${a.width}px`,l.style.height=`${a.height}px`,l.style.borderWidth=`${o.frameBorderWidth}px`,i.appendChild(l);}return r.appendChild(i),r}function gT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(o,"home.slides");let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.sections.slides"),o.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-slides-split"),a=H(e,{label:t("pptx.home.newSlide"),icon:"new-slide",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-slides-caret");l.type="button",l.title=t("pptx.home.chooseLayout"),l.setAttribute("aria-label",t("pptx.home.chooseLayout")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunkOBVLNSK5_cjs.K(e,"chevron-down"));let p=xT(e,t("pptx.home.chooseLayout"),f=>n.insertSlideFromLayout(f.path,f.name));l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a.btn,l,p.el);let d=uT(e,t,{onInsert:f=>n.insertSlideFromTemplate(f),getScheme:()=>n.getTemplateScheme?.()}),u=H(e,{label:t("pptx.home.slideTemplates"),icon:"slide-templates",textLabel:t("pptx.home.slideTemplates"),onClick:()=>{let f=u.btn.closest(".pptxv")??e.body;d.open(f);}}),m=chunkOBVLNSK5_cjs.w(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=xT(e,t("pptx.master.layout"),f=>n.applyLayout(f.path));m.append(g.btn,x.el);let b=H(e,{label:t("pptx.animations.reset"),icon:"undo",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide});b.btn.title=t("pptx.sections.resetSlideTitle");let v=H(e,{label:t("pptx.sections.sectionButtonLabel"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return v.btn.title=t("pptx.sections.addSection"),z(s,"home.slides.newSlide"),z(u.btn,"home.slides.slideTemplates"),z(m,"home.slides.layout"),z(b.btn,"home.slides.reset"),z(v.btn,"home.slides.section"),r.append(s,u.btn,m,b.btn,v.btn),{el:o,update({editable:f,slideCount:S,layouts:y,layoutPreviews:h,currentLayoutPath:C}){let w=y.length>0,P=h??new Map;p.setItems(y,{previews:P,renderPreview:n.renderLayoutPreview}),x.setItems(y,{previews:P,currentLayoutPath:C,renderPreview:n.renderLayoutPreview}),a.setDisabled(!f),l.hidden=!w,l.disabled=!f,u.setDisabled(!f),g.setDisabled(!f||!w),b.setDisabled(!f||S===0),v.setDisabled(!f||S===0),f||(p.close(),x.close(),d.close());}}}var lL=100;function bT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=n.galleryHub??yt(g=>r.applyRibbonGalleryResult(g)),s=tT(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=gT(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:(g,x)=>chunkOBVLNSK5_cjs.A({document:e,slide:{id:`layout-preview-${g.path}`,rId:"",slideNumber:0,elements:g.elements.slice(0,lL),backgroundColor:x.backgroundColor},canvasSize:{width:x.surfaceWidth,height:x.surfaceHeight},mediaDataUrls:new Map,registry:chunkOBVLNSK5_cjs.J(),t})}),l=aT(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=lT(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},i),d=nT(e,t,{toggleFindReplace:n.onToggleFindReplace,selectAll:r.selectAll}),u=oT(e,t,{insertShape:g=>r.insert("shape",g),bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setShapeFill:r.setShapeFill,setShapeStroke:r.setShapeStroke},i),m=eT(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,mergeShapes:r.mergeShapes,toggleCropMode:r.toggleCropMode,cropToAspect:r.cropToAspect,cropFill:r.cropFill,cropFit:r.cropFit},n.hiddenActions);return o.append(s.el,a.el,l.el,p.el,d.el,u.el,m.el),{el:o,update({editable:g,selectedElement:x,hasClipboard:b,slideCount:v,selectedCount:f,selectionGroupable:S,formatPainterActive:y,layouts:h,layoutPreviews:C,currentLayoutPath:w,themeFonts:P,embeddedFontFamilies:k,customFontFamilies:A,recentColors:T,themeColorMap:E,canMergeShapes:L,canCrop:M,cropActive:D}){let I=Le(x),R=lt(x),O=x!==void 0,B=x&&chunk24B6ZCFG_cjs.f(x)?x.shapeStyle:void 0;s.update({hasSelection:O,hasClipboard:b,editable:g,formatPainterActive:y}),a.update({editable:g,slideCount:v,layouts:h,layoutPreviews:C,currentLayoutPath:w}),l.update({canFormat:I,editable:g,text:R,themeFonts:P,embeddedFontFamilies:k,customFontFamilies:A,recentColors:T,themeColorMap:E}),p.update({canFormat:I,editable:g,text:R}),d.update({editable:g}),u.update({editable:g,hasSelection:O,recentColors:T,themeColorMap:E,fillColor:B?.fillColor,fillColorRef:B?.fillColorRef,strokeColor:B?.strokeColor,strokeColorRef:B?.strokeColorRef}),m.update({editable:g,hasSelection:O,formatPainterActive:y,selectedCount:f,selectionGroupable:S,selectedElement:x,canMergeShapes:L,canCrop:M,cropActive:D});}}}function fT(e,t,n){return {editable:e,selectedElement:t,hasClipboard:n.hasClipboard,formatPainterActive:n.formatPainterActive??false,slideCount:n.slideCount,selectedCount:n.selectedCount??0,selectionGroupable:n.selectionGroupable??true,layouts:n.layouts??[],layoutPreviews:n.layoutPreviews,currentLayoutPath:n.currentLayoutPath,themeFonts:n.themeFonts,embeddedFontFamilies:n.embeddedFontFamilies,customFontFamilies:n.customFontFamilies,recentColors:n.recentColors??[],themeColorMap:n.themeColorMap,canMergeShapes:n.canMergeShapes,canCrop:n.canCrop,cropActive:n.cropActive}}function Zs(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,s=a=>{i=a,r.hidden=!a,o?.(a);};for(let a of n){a.separatorBefore&&r.appendChild(chunkOBVLNSK5_cjs.w(e,"div","pptxv-primary-menu-sep"));let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-primary-menu-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,l.addEventListener("click",()=>{s(false),a.run();}),r.appendChild(l);}return e.addEventListener("pointerdown",a=>{i&&!r.parentElement?.contains(a.target)&&s(false);}),{el:r,toggle:()=>s(!i),close:()=>s(false),isOpen:()=>i}}function vT(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 chunk24B6ZCFG_cjs.eq("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function hT(e,t,n){let{file:o,nav:r}=t,i=o.getCustomization?.()??chunk24B6ZCFG_cjs.$q,s=[];chunk24B6ZCFG_cjs.eq("export",n)||s.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.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()},{label:e("pptx.file.saveAsPptTooltip"),run:()=>o.saveAsPpt()});let a=chunk24B6ZCFG_cjs.dr(i,"print");return a&&s.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true}),s.push({label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage(),separatorBefore:!a},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true}),chunk24B6ZCFG_cjs.dr(i,"options")&&s.push({label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")}),s.push({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()}),s}function yT(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-primary"),i=H(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-present-split"),a=chunkOBVLNSK5_cjs.w(e,"button","pptxv-present-main");a.type="button",a.title=t("pptx.present.presentTooltip"),a.textContent=t("pptx.toolbar.present"),a.addEventListener("click",()=>n.slideShow.startFromCurrent());let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-present-caret");l.type="button",l.title=t("pptx.present.optionsTooltip"),l.setAttribute("aria-label",t("pptx.present.optionsTooltip")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunkOBVLNSK5_cjs.K(e,"chevron-down"));let p=Zs(e,t("pptx.present.optionsTooltip"),vT(t,n,o),f=>{l.classList.toggle("is-active",f),l.setAttribute("aria-expanded",String(f));});l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a,l,p.el),r.appendChild(s);let d=chunkOBVLNSK5_cjs.w(e,"button","pptxv-show-btn");d.type="button",d.title=t("pptx.customShows.createTooltip"),d.textContent=t("pptx.customShows.addShow"),d.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(d),r.appendChild(chunkOBVLNSK5_cjs.w(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()}),g=n.nav.getCustomization?.()??chunk24B6ZCFG_cjs.$q;chunk24B6ZCFG_cjs.dr(g,"options")&&r.appendChild(m.btn);let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-primary-menu-host"),b=Zs(e,t("pptx.ribbon.moreActions"),hT(t,n,o)),v=H(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>b.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",f=>f.stopPropagation()),x.append(v.btn,b.el),r.appendChild(x),{el:r,setEditState({editable:f}){r.hidden=!f,f||(p.close(),b.close());},setAutosaveStatus(){},setInspectorOpen(f){u.setActive(f);}}}var Bo=[{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"}],jr="home";function Js(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tabs");i.setAttribute("role","tablist");let s=new Map,a=new Map;for(let x of chunk24B6ZCFG_cjs.fq(Bo,o)){let b=chunkOBVLNSK5_cjs.w(e,"button","pptxv-ribbon-tab");x.id==="file"&&b.classList.add("pptxv-ribbon-tab-file"),b.type="button",b.setAttribute("role","tab");let v=t(x.labelKey);b.textContent=v,b.addEventListener("click",()=>n(x.id)),i.appendChild(b),s.set(x.id,b),a.set(x.id,v);}let l=new Map,p=[],d=null,u=null,m=()=>{let x=[...s,...l];for(let[b,v]of x){let f=b===d;v.classList.toggle("is-active",f),v.setAttribute("aria-selected",String(f));}},g=x=>{if(!(x.length===p.length&&x.every((b,v)=>p[v]===b))){p=[...x];for(let b of l.values())b.remove();l.clear();for(let b of x){let v=chunkOBVLNSK5_cjs.w(e,"button","pptxv-ribbon-tab pptxv-ribbon-tab-contextual");v.type="button",v.setAttribute("role","tab"),v.setAttribute(chunk24B6ZCFG_cjs.xr,b),v.textContent=t(chunk24B6ZCFG_cjs.sr(b)),v.addEventListener("click",()=>n(b)),i.insertBefore(v,u),l.set(b,v);}m();}};if(r){u=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tabrow-spacer"),i.appendChild(u);let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-tabrow-actions");if(!chunk24B6ZCFG_cjs.eq("record",o)){let b=chunkOBVLNSK5_cjs.w(e,"button","pptxv-tabrow-record");b.type="button",b.title=t("pptx.titleBar.record"),b.setAttribute("aria-label",t("pptx.titleBar.record"));let v=chunkOBVLNSK5_cjs.w(e,"span","pptxv-tabrow-record-dot");v.setAttribute("aria-hidden","true");let f=chunkOBVLNSK5_cjs.w(e,"span");f.textContent=t("pptx.titleBar.record"),b.append(v,f),b.addEventListener("click",()=>r.startRecording()),x.appendChild(b);}i.appendChild(x);}return {el:i,setActive(x){d=x,m();},setContextualTabs:g,setHiddenTabs(x){for(let[b,v]of s)v.hidden=b!=="file"&&x.has(b);},applyScreenTips(x){for(let[b,v]of s){let f=x(a.get(b)??"");f?v.title=f:v.removeAttribute("title");}}}}var pL=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunk24B6ZCFG_cjs.Ic},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunk24B6ZCFG_cjs.Kc},{group:"exit",labelKey:"pptx.animation.exit",presets:chunk24B6ZCFG_cjs.Jc}];function ST(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-gallery");o.setAttribute("aria-label",t("pptx.animations.addAnimation"));let r=[];for(let i of pL){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-gallery-column"),a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-animation-gallery-caption");a.textContent=t(i.labelKey);let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-gallery-items");for(let p of i.presets){let d=t(`pptx.animation.preset.${p}`),u=H(e,{label:d,text:d,className:"pptxv-animation-preset",onClick:()=>n(i.group,p)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function zo(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 No(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 s of o){let a=e.createElement("option");a.value=s,a.textContent=t(`${n}.${s}`),i.appendChild(a);}return r.appendChild(i),{label:r,select:i}}function CT(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint"),i.addEventListener("dragover",a=>a.preventDefault()),i.addEventListener("drop",a=>{a.preventDefault();let l=a.dataTransfer?.getData("text/plain");l&&r.moveAnimation(l,o);});let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-animation-timeline-name");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${n.join(", ")}`,i.append(s),i}function wT(e,t,n,o,r,i,s,a){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timeline-row");l.draggable=s,l.addEventListener("dragstart",m=>m.dataTransfer?.setData("text/plain",n.elementId)),l.addEventListener("dragover",m=>m.preventDefault()),l.addEventListener("drop",m=>{m.preventDefault();let g=m.dataTransfer?.getData("text/plain");g&&a.moveAnimation(g,o);}),l.classList.toggle("is-selected",n.elementId===i);let p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-animation-timeline-name");p.textContent=`${o+1}. ${chunk24B6ZCFG_cjs.ud(n,t)}`;let d=H(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>a.reorderAnimation(n.elementId,"up")}),u=H(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>a.reorderAnimation(n.elementId,"down")});return d.setDisabled(!s||o===0),u.setDisabled(!s||o===r-1),l.append(p,d.btn,u.btn),l}function ET(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(o,"animations.advancedAnimation");let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.animations.advanced"),o.appendChild(i);let s=H(e,{label:t("pptx.animations.exitEffects"),icon:"sparkles",textLabel:t("pptx.animations.exitEffects"),onClick:()=>n.addAnimation("exit","fadeOut")}),a=H(e,{label:t("pptx.animations.pathAnimation"),icon:"move-right",textLabel:t("pptx.animations.pathAnimation"),onClick:()=>n.applyMotionPath(chunk24B6ZCFG_cjs._d)}),l=H(e,{label:t("pptx.animations.effectOptions"),icon:"wrench",textLabel:t("pptx.animations.effectOptions"),onClick:n.openAnimationPanel}),p=H(e,{label:t("pptx.animations.animationPanel"),icon:"panel-right",textLabel:t("pptx.animations.animationPanel"),onClick:n.openAnimationPanel});p.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"),z(l.btn,"animations.animation.effectOptions"),z(p.btn,"animations.advancedAnimation.animationPane"),z(d.btn,"animations.advancedAnimation.trigger"),z(u.btn,"animations.advancedAnimation.animationPainter"),z(m.btn,"animations.advancedAnimation.remove"),r.append(s.btn,a.btn,l.btn,p.btn,d.btn,u.btn,m.btn);let g=[s,a,l,d,m];return {el:o,setDisabled(x){for(let b of g)b.setDisabled(x);u.setDisabled(true);}}}var TT=0;function PT(e,t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup");se(n,"animations.timing");let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row pptxv-animation-timing-grid");n.appendChild(o);let r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.animations.timing"),n.appendChild(r),TT+=1;let i=`pptx-animation-start-${TT}`,s=chunkOBVLNSK5_cjs.w(e,"label","pptxv-field-label");s.htmlFor=i,s.textContent=t("pptx.animations.start");let a=e.createElement("select");a.id=i,a.disabled=true;for(let d of ["onClick","withPrevious","afterPrevious"]){let u=e.createElement("option");u.value=d,u.textContent=t(`pptx.animations.${d}`),a.appendChild(u);}let l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.animations.duration");let p=e.createElement("input");return p.type="number",p.min="0",p.step="0.1",p.value="0.5",p.disabled=true,p.setAttribute("aria-label",t("pptx.animations.duration")),o.append(Ot(e,"animations.timing.start",s,a),Ot(e,"animations.timing.duration",l,p)),{el:n}}function AT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-motion-path-gallery");o.setAttribute("aria-label",t("pptx.animations.motionPathGalleryAria"));let r=[];for(let i of chunk24B6ZCFG_cjs.Vd){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-motion-path-gallery-column"),a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-motion-path-gallery-caption");a.textContent=t(chunk24B6ZCFG_cjs.Wd(i));let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-motion-path-gallery-items");for(let p of chunk24B6ZCFG_cjs.Yd(i)){let d=t(chunk24B6ZCFG_cjs.Xd(p.id)),u=H(e,{label:d,text:d,className:"pptxv-motion-path-preset",onClick:()=>n(p.id)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function kT(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),i,s=()=>{chunk24B6ZCFG_cjs.fe(e,i);},a=H(e,{label:t("pptx.animations.preview"),icon:"play",textLabel:t("pptx.animations.preview"),onClick:s});a.btn.title=t("pptx.animations.previewTooltip");let l=se(chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup"),"animations.preview");z(a.btn,"animations.preview.preview");let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");p.appendChild(a.btn);let d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");d.textContent=t("pptx.animations.preview"),l.append(p,d),r.appendChild(l);let u=se(chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup"),"animations.animation"),m=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");m.textContent=t("pptx.animations.animation");let g=ST(e,t,(O,B)=>n.addAnimation(O,B));z(g.el,"animations.animation.gallery"),u.append(g.el,m),r.appendChild(u);let x=se(chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup"),"animations.motionPath"),b=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");b.textContent=t("pptx.animation.motionPath");let v=AT(e,t,O=>n.applyMotionPath(O));z(v.el,"animations.motionPath.gallery"),x.append(v.el,b),r.appendChild(x);let f=ET(e,t,{addAnimation:n.addAnimation,applyMotionPath:n.applyMotionPath,removeAnimation:n.removeAnimation,openAnimationPanel:o});r.appendChild(f.el),r.appendChild(PT(e,t).el);let S=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timeline"),y=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");y.textContent=t("pptx.animation.timeline");let h=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timeline-list"),C=chunkOBVLNSK5_cjs.w(e,"div","pptxv-animation-timing-controls"),w=e.createElement("select");w.setAttribute("aria-label",t("pptx.animation.trigger"));let P=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let O of P){let B=e.createElement("option");B.value=O,B.textContent=t(`pptx.animation.trigger.${O}`),w.appendChild(B);}let k=zo(e,t("pptx.animation.duration"),500),A=zo(e,t("pptx.animation.delay"),0),T=No(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),E=No(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),L=No(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),M=No(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),D=zo(e,t("pptx.animation.repeatCount"),1),I=zo(e,t("pptx.animations.triggerShape"),0);I.input.type="text",I.input.min="",I.input.max="",C.append(w,k.label,A.label,T.label,E.label,L.label,D.label,M.label,I.label),S.append(y,h,C),r.appendChild(S);let R=()=>{i&&n.setAnimationTiming(i.elementId,{trigger:w.value,durationMs:k.input.valueAsNumber,delayMs:A.input.valueAsNumber,direction:T.select.value,sequence:E.select.value,timingCurve:L.select.value,repeatCount:D.input.valueAsNumber,repeatMode:M.select.value,triggerShapeId:w.value==="onShapeClick"?I.input.value:void 0});};for(let O of [w,T.select,E.select,L.select,M.select])O.addEventListener("change",R);return k.input.addEventListener("change",R),A.input.addEventListener("change",R),D.input.addEventListener("change",R),I.input.addEventListener("change",R),{el:r,update({editable:O,hasSelection:B,selectedElementId:V,animations:F,animationTimelineAnchors:_}){let N=!O||!B;g.setDisabled(N),v.setDisabled(N),a.setDisabled(N),f.setDisabled(N);let W=[...F].sort((K,j)=>(K.order??0)-(j.order??0));i=W.find(({elementId:K})=>K===V);let X=chunk24B6ZCFG_cjs.id(W,_??[]),ie=new Map(W.map(K=>[K.elementId,K]));h.replaceChildren(...X.flatMap((K,j)=>{if(K.kind==="native")return [CT(e,t,K.targetIds,j,n)];let Y=ie.get(K.elementId);return Y?[wT(e,t,Y,j,X.length,V,O,n)]:[]})),S.hidden=W.length===0,C.hidden=!i,w.value=i?.trigger??"onClick",I.input.value=i?.triggerShapeId??"",I.label.hidden=w.value!=="onShapeClick",k.input.value=String(i?.durationMs??500),A.input.value=String(i?.delayMs??0);let G=i?chunk24B6ZCFG_cjs.Hc([i],i.elementId):[];T.label.hidden=G.length===0;for(let K of T.select.options)K.hidden=!G.includes(K.value);T.select.value=chunk24B6ZCFG_cjs.Gc(i,G)??"fromBottom",E.select.value=i?.sequence??"asOne",L.select.value=chunk24B6ZCFG_cjs.Ec(i?.timingCurve),M.select.value=i?.repeatMode??"none",D.input.value=String(i?.repeatCount??1);for(let K of [w,k.input,A.input,T.select,E.select,L.select,M.select,D.input,I.input])K.disabled=!O;}}}function IT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-theme-gallery-host"),r=chunkOBVLNSK5_cjs.w(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,s=null,a=l=>{i=l,r.hidden=!l,t.btn.setAttribute("aria-expanded",String(l)),s?.destroy(),s=l?Ye(r,t.btn):null;};return t.btn.addEventListener("click",l=>{l.stopPropagation(),a(!i);}),e.addEventListener("pointerdown",l=>{i&&!o.contains(l.target)&&a(false);}),o.append(t.btn,r),{el:o,button:t,gallery:r,close:()=>a(false)}}function dL(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-theme-swatch-preview");return o.style.background=n,t.btn.prepend(o),t.btn}function LT(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),a=IT(e,H(e,{label:t("pptx.ribbon.browseThemes"),icon:"sparkles",textLabel:t("pptx.ribbon.browseThemes"),onClick:()=>{}}),t("pptx.ribbon.browseThemesTitle"));a.gallery.setAttribute("role","menu"),a.gallery.setAttribute("aria-label",t("pptx.themes.gallery.ariaLabel"));let l=chunk24B6ZCFG_cjs.Ja.map(x=>{let b=H(e,{label:x.name,text:x.name,onClick:()=>{n.applyPresentationTheme(x.id),a.close();}});return b.btn.setAttribute("role","menuitemradio"),b.btn.setAttribute("aria-checked","false"),b.btn.dataset.themePreset=x.id,a.gallery.appendChild(dL(e,b,`linear-gradient(135deg, ${x.colorScheme.accent1}, ${x.colorScheme.accent2})`)),b}),p=IT(e,H(e,{label:t("pptx.ribbon.editTheme"),icon:"wrench",textLabel:t("pptx.ribbon.editTheme"),onClick:()=>{}}),t("pptx.ribbon.editThemeTitle"));p.gallery.classList.add("pptxv-deck-theme-editor"),p.gallery.dataset.deckThemeEditor="";let d=null,u={editable:false,colorScheme:void 0,fontScheme:void 0,themeName:void 0};p.button.btn.addEventListener("click",()=>{d||(d=zr(e,t,{applyThemeEdit:x=>{n.applyThemeEdit(x),p.close();}}),d.update(u),p.gallery.appendChild(d.el));});let m=H(e,{label:t("pptx.ribbon.slideSize"),icon:"monitor",textLabel:t("pptx.ribbon.slideSize"),onClick:r});m.btn.title=t("pptx.ribbon.slideSizeTitle");let g=H(e,{label:t("pptx.ribbon.formatBackground"),icon:"square",textLabel:t("pptx.ribbon.formatBackground"),onClick:o});if(g.btn.title=t("pptx.ribbon.formatBackgroundTitle"),z(a.el,"design.themes.browseThemes"),z(p.el,"design.themes.editTheme"),z(m.btn,"design.customize.slideSize"),z(g.btn,"design.customize.formatBackground"),s.appendChild(q(e,"design.themes",a.el,p.el)),i){let x=Vs(e,"design.variants",t("pptx.ribbon.groupVariants"));for(let b of chunk24B6ZCFG_cjs.qr)b.control.startsWith("design.variants.")&&x.row.appendChild(st(e,t,b,i).el);s.appendChild(x.el),i.register({refresh(b,v){let f=chunk24B6ZCFG_cjs.Ka(b.theme)?.id;for(let S of l)S.btn.setAttribute("aria-checked",String(S.btn.dataset.themePreset===f));u={editable:v,colorScheme:b.theme?.colorScheme,fontScheme:b.theme?.fontScheme,themeName:b.theme?.name},d?.update(u);},close(){}});}return s.appendChild(q(e,"design.customize",m.btn,g.btn)),{el:s,setEditable(x){a.button.setDisabled(!x),p.button.setDisabled(!x),g.setDisabled(!x);for(let b of l)b.setDisabled(!x);x||(a.close(),p.close());}}}var cL=[1,2,3,4,6,8,12,16],el=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select",control:"draw.tools.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen",control:"draw.tools.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter",control:"draw.tools.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser",control:"draw.tools.eraser"},{tool:"freeform",icon:"pen",labelKey:"pptx.ribbon.tool.freeform"}];function MT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=se(chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.draw"),r.appendChild(s);let a=el.map(g=>H(e,{label:t(g.labelKey),icon:g.icon,onClick:()=>n.setTool(g.tool)}));for(let[g,x]of el.entries())x.control&&z(a[g].btn,x.control);i.append(...a.map(g=>g.btn)),o.appendChild(r);let l=se(chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rgroup-row");l.appendChild(p);let d=dt(e,t,{label:t("pptx.ribbon.colour"),icon:"pen",swatches:so,fallback:"#000000",onSelect:g=>n.setColor(g)}),u=xe(e,{triggerLabel:t("pptx.ribbon.width"),triggerText:"",icon:"chevron-down",items:cL.map(g=>({label:`${g} px`,value:g})),onSelect:g=>n.setWidth(g)});z(d.el,"draw.tools.penColor"),z(u.el,"draw.tools.penWidth"),p.append(d.el,u.el),o.appendChild(l);let m=[...a,d,u];return {el:o,setEditable(g){for(let x of m)x.setDisabled(!g);},update(g){for(let[x,b]of el.entries())a[x].setActive(g.tool===b.tool);d.setValue(g.color),d.setRecentColors(g.recentColors??[]),u.setSelected(g.width),u.setTriggerText(`${g.width} px`);}}}var DT="3.13.0";function RT(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-account");n.appendChild(r);let i={...chunk24B6ZCFG_cjs.Yp,...chunk24B6ZCFG_cjs.Wp().profile};r.appendChild(uL(e,t,i,a=>{i=a,chunk24B6ZCFG_cjs.bq(i);}));let s=chunkOBVLNSK5_cjs.w(e,"section","pptxv-account-section");r.appendChild(s),xL(e,t,s),r.appendChild(gL(e,t)),o?.enabled&&r.appendChild(bL(e,t,o));}function uL(e,t,n,o){let r=n,i=chunkOBVLNSK5_cjs.w(e,"section","pptxv-account-section"),s=e.createElement("h2");s.textContent=t("pptx.account.profile.title"),i.appendChild(s);let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-account-profile-row"),l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-account-avatar"),p=()=>{l.textContent=chunk24B6ZCFG_cjs._p(r),l.style.background=r.avatarColor;};p();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},p(),o(r);}),d.append(u,m),a.append(l,d),i.appendChild(a);let g=e.createElement("p");g.className="pptxv-account-swatch-label",g.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(g);let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-parity-swatch-row"),b=(v,f)=>{r={...r,avatarColor:f},p();for(let S of x.querySelectorAll("button"))S.classList.toggle("is-active",S===v);o(r);};for(let v of chunk24B6ZCFG_cjs.Zp){let f=e.createElement("button");f.type="button",f.className="pptxv-account-color-swatch",f.classList.toggle("is-active",v===r.avatarColor),f.style.background=v,f.setAttribute("aria-label",v),f.addEventListener("click",()=>b(f,v)),x.appendChild(f);}return i.appendChild(x),i}function xL(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 s=e.createElement("button");s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.storage.clear"),n.appendChild(s);let a=e.createElement("p");a.className="pptxv-account-notice",a.hidden=true,n.appendChild(a);async function l(){let p=await chunk24B6ZCFG_cjs.$p();r.textContent=p.presentationCount>0?t("pptx.account.storage.usage",{count:p.presentationCount,size:chunk24B6ZCFG_cjs.cp(p.totalBytes)}):t("pptx.account.storage.usageEmpty");}l(),s.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunk24B6ZCFG_cjs.aq(),a.hidden=false,a.textContent=t("pptx.account.storage.clearedNotice"),await l()))();});}function gL(e,t){let n=chunkOBVLNSK5_cjs.w(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:DT}),n.appendChild(i),n}function bL(e,t,n){let o=chunkOBVLNSK5_cjs.w(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 a=e.createElement("p");return a.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(a),o}let s=e.createElement("button");return s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.signIn.button"),s.addEventListener("click",()=>n.onSignIn()),o.appendChild(s),o}var LL={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},OT="http://www.w3.org/2000/svg";function HT(e,t){return _o(e,LL[t],17)}function _o(e,t,n){let o=e.createElementNS(OT,"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 s=e.createElementNS(OT,r);for(let[a,l]of Object.entries(i))l!==void 0&&s.setAttribute(a,String(l));o.appendChild(s);}return o}function Ct(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 tl(e,t,n,o){let r=Ct(e,"",n,o);return r.appendChild(HT(e,t)),r}function FT(e,t,n,o){let r=tl(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}var $L={protect:lucide.LockKeyhole,inspect:lucide.Info,embedFonts:lucide.Type,signatures:lucide.BadgeCheck,versionHistory:lucide.Clock3,saveAsPptx:lucide.FileText,saveAsPpsx:lucide.Presentation,saveAsPptm:lucide.FileCode2,saveAsPpt:lucide.Database,pdf:lucide.FileText,png:lucide.Image,video:lucide.Video,gif:lucide.Images,json:lucide.FileJson,copyImage:lucide.Copy,print:lucide.Printer,share:lucide.UserPlus};function BT(e,t,n,o,r,i,s,a=chunk24B6ZCFG_cjs.$q){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-bs-actions");if(t==="export"&&chunk24B6ZCFG_cjs.eq("export",s))return l;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,saveAsPpt:n.saveAsPpt,pdf:n.exportPdf,png:n.exportPng,video:n.exportVideo,gif:n.exportGif,json:n.exportJson,copyImage:n.copySlideAsImage,print:n.print,share:n.openShare};for(let d of chunk24B6ZCFG_cjs.mr(chunk24B6ZCFG_cjs.dp(t),a)){if(d.id==="saveAsPptm"&&!o)continue;let u=p[d.id],m=Ct(e,"",()=>r(()=>u?.())),g=e.createElement("b");g.appendChild(_o(e,$L[d.id],22));let x=e.createElement("span"),b=e.createElement("strong");b.textContent=i(d.titleKey);let v=e.createElement("small");v.textContent=i(d.bodyKey),x.append(b,v),m.append(g,x),l.appendChild(m);}return l}function ol(e,t){let n=e.createElement("span");return n.textContent=t,n}function zT(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-backstage");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",t("pptx.backstage.title"));let a=e.createElement("aside"),l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-bs-back-row"),p=tl(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label",t("pptx.backstage.back")),l.append(p);let d=e.createElement("nav");a.append(l,d);let u=e.createElement("main");s.append(a,u);let m=n.getCustomization?.()??chunk24B6ZCFG_cjs.$q,g=chunk24B6ZCFG_cjs.lr(chunk24B6ZCFG_cjs.Yo,m),x=g.some(E=>E.id==="home")?"home":g[0]?.id??"home",b=false,v="",f=[];(async()=>{f=await chunk24B6ZCFG_cjs.$o(t,n.getRecentPresentationsCount());let E=u.querySelector(".pptxv-bs-recent");E&&P(E);})();function S(E){E?.(),E&&o();}function y(E){if(E==="close")return o();if(E==="save")return S(n.save);if(E==="options")return S(n.openSettings);x=E,T();}function h(){d.replaceChildren();for(let E of g){E.group&&!d.querySelector("i")&&d.appendChild(e.createElement("i"));let L=FT(e,E.id,t(E.labelKey),()=>y(E.id));L.setAttribute("data-pptx-backstage-nav-item",""),L.classList.toggle("active",x===E.id),x===E.id&&L.setAttribute("aria-current","page"),d.appendChild(L);}}function C(){let E=e.createElement("h2");E.textContent=t("pptx.backstage.newHeading");let L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-bs-templates");for(let M of chunk24B6ZCFG_cjs.Zo){let D=Ct(e,"",()=>S(()=>n.createPresentation(M.id))),I=e.createElement("b");I.style.background=M.preview;let R=e.createElement("strong");R.textContent=t(M.nameKey);let O=e.createElement("small");O.textContent=t(M.descriptionKey),D.append(I,R,O),L.appendChild(D);}u.append(E,L);}function w(){let E=chunkOBVLNSK5_cjs.w(e,"div","pptxv-bs-recent"),L=e.createElement("pptx-ui-search");L.className="pptxv-bs-search",L.setAttribute("data-pptx-search-surface",""),L.setAttribute("data-pptx-search-input",""),L.placeholder=t("pptx.backstage.searchPlaceholder"),L.setAttribute("aria-label",L.placeholder),L.value=v,L.addEventListener("input",()=>{v=L.value,P(E);}),u.appendChild(L),x==="open"&&u.appendChild(Ct(e,t("pptx.backstage.browseDevice"),()=>S(n.openFile),"pptxv-bs-primary"));let M=e.createElement("h2");M.textContent=t("pptx.backstage.recentHeading"),P(E),u.append(M,E);}function P(E){let L=e.createElement("header");L.replaceChildren(ol(e,t("pptx.backstage.columnName")),ol(e,t("pptx.backstage.columnModified")),ol(e,t("pptx.backstage.columnSize"))),E.replaceChildren(L);let M=v.trim().toLowerCase(),D=M?f.filter(I=>`${I.name} ${I.location}`.toLowerCase().includes(M)):f;for(let I of D){let R=Ct(e,"",()=>S(()=>n.openRecentFile(I.key))),O=chunkOBVLNSK5_cjs.w(e,"span","name"),B=e.createElement("b");B.textContent="P";let V=e.createElement("span"),F=e.createElement("strong");F.textContent=I.name;let _=e.createElement("small");_.textContent=I.location,V.append(F,_),O.append(B,V);let N=e.createElement("span");N.textContent=chunk24B6ZCFG_cjs.bp(I.timestamp,Date.now(),t);let W=e.createElement("span");W.textContent=chunk24B6ZCFG_cjs.cp(I.size),R.append(O,N,W),E.appendChild(R);}if(!D.length){let I=e.createElement("p");I.textContent=t("pptx.backstage.noRecent"),E.appendChild(I);}}function k(){u.appendChild(BT(e,x,n,b,S,t,r,m));}function A(){let E=chunkOBVLNSK5_cjs.w(e,"section","pptxv-bs-card"),L=e.createElement("b");L.appendChild(_o(e,lucide.Settings,24));let M=e.createElement("h2");M.textContent=t("pptx.backstage.optionsTitle");let D=e.createElement("p");D.textContent=t("pptx.backstage.optionsBody"),E.append(L,M,D),E.appendChild(Ct(e,t("pptx.backstage.openOptions"),()=>S(n.openSettings),"pptxv-bs-primary")),u.appendChild(E);}function T(){h(),u.replaceChildren();let E=e.createElement("h1");E.textContent=t(x==="home"?"pptx.backstage.greeting":chunk24B6ZCFG_cjs.Yo.find(M=>M.id===x)?.labelKey??"pptx.backstage.nav.home"),u.appendChild(E),(x==="home"||x==="new")&&C(),(x==="home"||x==="open")&&w(),["info","saveAs","print","share","export"].includes(x)&&k(),x==="options"&&A(),x==="account"&&RT(e,t,u,i);let L=e.createElement("footer");L.textContent=`${t("pptx.backstage.untitled")} \xB7 ${t("pptx.backstage.savedToBrowser")}`,u.appendChild(L);}return T(),{el:s,setHasMacros(E){b=E,x==="saveAs"&&T();}}}function NT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=q(e,"help.help");o.appendChild(r);let i=H(e,{label:t("pptx.settings.title"),text:t("pptx.settings.title"),onClick:()=>n.openSettings("general")}),s=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 z(i.btn,"help.help.options"),z(s.btn,"help.help.keyboardShortcuts"),z(a.btn,"help.help.accessibility"),chunk24B6ZCFG_cjs.dr(n.getCustomization?.()??chunk24B6ZCFG_cjs.$q,"options")&&r.append(i.btn,s.btn),r.append(a.btn),o}function _T(e,t,n){let o=xe(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunk24B6ZCFG_cjs.am.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 Yr(e,t){let n=chunkOBVLNSK5_cjs.w(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[a,l]of t.items.entries()){let p=e.createElement("option");p.value=String(a),p.textContent=l.label,o.appendChild(p);}n.appendChild(o);let r=chunkOBVLNSK5_cjs.w(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(chunkOBVLNSK5_cjs.K(e,t.icon));let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-btn-label");i.textContent=t.buttonLabel,r.appendChild(i),n.appendChild(r);let s=()=>t.items[Number(o.value)]?.value;return r.addEventListener("click",()=>{let a=s();a!==void 0&&t.onCommit(a);}),{el:n,setDisabled(a){r.disabled=a;},value:s}}function GT(e,t,n){return Yr(e,{selectLabel:t("pptx.ribbon.chartType"),buttonLabel:t("pptx.ribbon.chart"),buttonTitle:t("pptx.ribbon.insertChart"),icon:"chart",items:chunk24B6ZCFG_cjs.vn.map(o=>({label:t(o.labelKey),value:o.id})),onCommit:n})}var jL=[{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 UT(e,t,n){let o=xe(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:jL.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}var YL={freeformShape:"pen",curve:"shapes"};function KT(e,t,n,o){let r=null,i=n.map(s=>{let a=t(chunk24B6ZCFG_cjs.Ms[s]),l=H(e,{label:a,icon:YL[s],textLabel:a,onClick:()=>o(r===s?null:s)});return l.btn.dataset.pptxDrawingTool=s,l.setActive(false),{tool:s,handle:l}});return {buttons:i.map(({handle:s})=>s.btn),setActive(s){r=s;for(let{tool:a,handle:l}of i)l.setActive(a===s);},setDisabled(s){for(let{handle:a}of i)a.setDisabled(s);}}}function WT(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 $T(e,t,n){return Yr(e,{selectLabel:t("pptx.insert.shapeType"),buttonLabel:t("pptx.insert.shape"),buttonTitle:t("pptx.insert.addShape"),icon:"shapes",items:chunk24B6ZCFG_cjs.qo.map(o=>({label:t(o.i18nKey),value:o.type})),onCommit:n})}var nl=600,rl=340,qT=64;function jT(e,t,n){let o=qT/nl,r=Math.round(rl*o),i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-option-preview",{width:`${qT}px`,height:`${r}px`,overflow:"hidden",pointerEvents:"none"});i.setAttribute("aria-hidden","true");let s=chunkOBVLNSK5_cjs.w(e,"div",void 0,{width:`${nl}px`,height:`${rl}px`,transform:`scale(${o})`,transformOrigin:"top left"});i.appendChild(s);let a=chunk24B6ZCFG_cjs.po(n),d={document:e,slide:{id:"smartart-preview",rId:"smartart-preview",slideNumber:1,elements:[a]},canvasSize:{width:nl,height:rl},scale:1,mediaDataUrls:new Map,t,smartArt3D:false,surfaceChart3D:false,barChart3D:false,lineChart3D:false,areaChart3D:false,pieChart3D:false,presenting:false,registry:chunkOBVLNSK5_cjs.u(),renderElement:()=>null},u=chunkOBVLNSK5_cjs.H(a,0,d);return u&&s.appendChild(u),i}function YT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunkOBVLNSK5_cjs.w(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunkOBVLNSK5_cjs.w(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 s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-dialog-header"),a=chunkOBVLNSK5_cjs.w(e,"h2");a.textContent=t("pptx.smartart.insertTitle");let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-smartart-dialog-close");l.type="button",l.setAttribute("aria-label",t("pptx.smartart.close")),l.textContent="\xD7",s.append(a,l);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-dialog-body"),d=chunkOBVLNSK5_cjs.w(e,"nav","pptxv-smartart-categories");d.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-gallery"),m=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-options");m.setAttribute("role","listbox"),m.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),u.appendChild(m),p.append(d,u);let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-smartart-dialog-footer"),x=chunkOBVLNSK5_cjs.w(e,"button","pptxv-smartart-dialog-cancel");x.type="button",x.textContent=t("pptx.smartart.cancel");let b=chunkOBVLNSK5_cjs.w(e,"button","pptxv-smartart-dialog-insert");b.type="button",b.textContent=t("pptx.smartart.insert"),b.disabled=true,g.append(x,b),i.append(s,p,g),o.append(r,i);let v="list",f,S=null;function y(A){f=A,b.disabled=false;for(let T of m.querySelectorAll('[role="option"]')){let E=T.dataset.layout===A.layout;T.setAttribute("aria-selected",String(E)),T.classList.toggle("is-selected",E);}}function h(A){A&&(n(A.layout,A.defaultItems),P());}function C(){m.replaceChildren();for(let A of chunk24B6ZCFG_cjs.bm.filter(T=>T.category===v)){let T=chunkOBVLNSK5_cjs.w(e,"button","pptxv-smartart-option");T.type="button",T.dataset.layout=A.layout,T.setAttribute("role","option"),T.setAttribute("aria-selected",String(f?.layout===A.layout)),T.classList.toggle("is-selected",f?.layout===A.layout);let E=jT(e,t,A.layout),L=chunkOBVLNSK5_cjs.w(e,"span","pptxv-smartart-option-label");L.textContent=t(A.labelKey),T.append(E,L),T.addEventListener("click",()=>y(A)),T.addEventListener("dblclick",()=>h(A)),m.appendChild(T);}}function w(A){v=A,f=void 0,b.disabled=true;for(let T of d.querySelectorAll("button")){let E=T.dataset.category===A;T.classList.toggle("is-active",E),T.setAttribute("aria-pressed",String(E));}C();}for(let A of chunk24B6ZCFG_cjs.cm){let T=chunkOBVLNSK5_cjs.w(e,"button","pptxv-smartart-category");T.type="button",T.dataset.category=A.id,T.textContent=t(A.labelKey),T.addEventListener("click",()=>w(A.id)),d.appendChild(T);}w(v);function P(){o.hidden||(o.hidden=true,S?.focus(),S=null);}function k(A){if(A.key==="Escape"){A.preventDefault(),P();return}if(A.key!=="Tab")return;let T=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(T.length===0)return;let E=T[0],L=T[T.length-1];A.shiftKey&&e.activeElement===E?(A.preventDefault(),L.focus()):!A.shiftKey&&e.activeElement===L&&(A.preventDefault(),E.focus());}return r.addEventListener("click",P),l.addEventListener("click",P),x.addEventListener("click",P),b.addEventListener("click",()=>h(f)),o.addEventListener("keydown",k),{el:o,open(A){let T=e.defaultView?.HTMLElement;S=T&&e.activeElement instanceof T?e.activeElement:null,o.parentElement!==A&&A.appendChild(o),o.hidden=false,i.focus();},close:P}}function XT(e,t,n){let o=YT(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 QT(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content");s.classList.add("pptxv-ribbon-insert-content");let a=H(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),l=$T(e,t,C=>n.insert("shape",C)),p=KT(e,t,n.armFreeformTool?n.visibleDrawingTools?.()??[]:[],C=>n.armFreeformTool?.(C)),d=H(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),u=H(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});u.btn.title=t("pptx.ribbon.insertMedia");let m=H(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),g=GT(e,t,C=>n.insertChart(C)),x=XT(e,t,(C,w)=>n.insertSmartArt(C,w)),b=H(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});b.btn.title=t("pptx.insert.insertEquation");let v=_T(e,t,C=>n.insertActionButton(C)),f=UT(e,t,C=>n.insertField(C)),S=WT(e,t,i),y=H(e,{label:t("pptx.headerFooter.title"),icon:"field",textLabel:t("pptx.headerFooter.title"),onClick:r});z(a.btn,"insert.text.textBox"),z(l.el,"insert.illustrations.shapes"),z(d.btn,"insert.images.pictures"),z(u.btn,"insert.media.media"),z(m.btn,"insert.tables.table"),z(g.el,"insert.illustrations.chart"),z(x.el,"insert.illustrations.smartArt"),z(b.btn,"insert.symbols.equation"),z(v.el,"insert.links.action"),z(f.el,"insert.text.field"),z(S.btn,"insert.links.link"),s.append(q(e,"insert.text",a.btn),q(e,"insert.illustrations",l.el,...p.buttons),q(e,"insert.images",d.btn),q(e,"insert.media",u.btn),q(e,"insert.tables",m.btn),q(e,"insert.illustrations",g.el,x.el),q(e,"insert.symbols",b.btn),q(e,"insert.links",v.el),q(e,"insert.text",f.el),q(e,"insert.links",S.btn),q(e,"insert.text",y.btn));let h=[a,l,p,d,u,m,g,x,b,v,f,y];return {el:s,setEditable(C){for(let w of h)w.setDisabled(!C);},setHasSelection(C){S.setDisabled(!C);},setFreeformTool(C){p.setActive(C);}}}function ZT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-record-dot");r.setAttribute("aria-hidden","true");let i=p=>{let d=H(e,{label:t(p),text:t(p),onClick:()=>{}});return d.setDisabled(true),d.btn},s=i("pptx.record.cameo"),a=H(e,{label:t("pptx.slideShow.fromBeginning"),text:t("pptx.slideShow.fromBeginning"),onClick:n.startRehearsal}),l=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),onClick:n.startRehearsal});return o.append(r,q(e,"record.camera",z(s,"record.camera.cameo")),q(e,"record.record",z(a.btn,"record.record.fromBeginning"),z(l.btn,"record.record.fromCurrent")),q(e,"record.manage",z(i("pptx.record.clear"),"record.manage.clear"),z(i("pptx.record.resetToCameo"),"record.manage.reset")),q(e,"record.help",z(i("pptx.record.learnMore"),"record.help.learnMore"))),o}function JT(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=(g,x)=>H(e,{label:t(g),text:t(g),onClick:x}).btn,i=g=>{let x=H(e,{label:t(g),text:t(g),onClick:()=>{}});return x.setDisabled(true),x.btn},s=r("pptx.review.spelling",n.toggleSpellCheck);s.title=t("pptx.review.toggleSpellCheck");let a=H(e,{label:t("pptx.review.accessibilityCheck"),text:t("pptx.review.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});a.btn.title=t("pptx.review.accessibilityCheckTooltip");let l=r("pptx.review.language",()=>n.openSettings("general"));l.title=t("pptx.review.languageTooltip");let p=H(e,{label:t("pptx.ribbon.compare"),text:t("pptx.ribbon.compare"),onClick:n.openCompare});p.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),m=(g,x)=>z(i(g),x);return o.append(q(e,"review.proofing",z(s,"review.proofing.spelling"),m("pptx.review.thesaurus","review.proofing.thesaurus")),q(e,"review.accessibility",z(a.btn,"review.accessibility.check")),q(e,"review.language",m("pptx.review.translate","review.language.translate"),l),q(e,"review.compare",m("pptx.review.markAllRead","review.compare.markAllRead"),z(p.btn,"review.compare.compare")),q(e,"review.comments",z(d,"review.comments.newComment"),m("pptx.common.delete","review.comments.delete"),m("pptx.common.previous","review.comments.previous"),m("pptx.common.next","review.comments.next"),z(u,"review.comments.showComments")),q(e,"review.protect",m("pptx.review.readOnly","review.protect.readOnly"),m("pptx.review.restrictPermission","review.protect.restrictPermission")),q(e,"review.ink",m("pptx.review.hideInk","review.ink.hideInk"))),chunk24B6ZCFG_cjs.dr(n.getCustomization?.()??chunk24B6ZCFG_cjs.$q,"options")||l.remove(),{el:o,setEditable:g=>p.setDisabled(!g)}}function XL(e,t,n,o){let r=t(n.labelKey),i=chunkOBVLNSK5_cjs.w(e,"label","pptxv-show-option"),s=e.createElement("input");return s.type="checkbox",s.disabled=n.unsupported,s.setAttribute("aria-label",r),n.unsupported||s.addEventListener("change",()=>{let a=chunk24B6ZCFG_cjs.Hi(n.id,s.checked);a&&o.updateShowOptions(a);}),i.append(s,e.createTextNode(r)),{el:i,descriptor:n,input:s}}function eP(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(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 s=H(e,{label:t("pptx.slideShow.fromCurrent"),text:t("pptx.slideShow.fromCurrent"),icon:"presentation",onClick:n.startFromCurrent});s.btn.title=t("pptx.slideShow.fromCurrentTooltip");let a=H(e,{label:t("pptx.slideShow.presenterView"),text:t("pptx.slideShow.presenterView"),icon:"presentation",onClick:n.openPresenterView});a.btn.title=t("pptx.slideShow.presenterViewTooltip");let l=H(e,{label:t("pptx.slideShow.customShow"),text:t("pptx.customShows.title"),onClick:n.openCustomShows}),p=chunk24B6ZCFG_cjs.eq("broadcast",o)?null:H(e,{label:t("pptx.slideShow.broadcast"),text:t("pptx.slideShow.broadcast"),icon:"broadcast",onClick:n.openBroadcast});p&&(z(p.btn,"slideShow.present.broadcast"),p.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}),b=H(e,{label:t("pptx.slideShow.subtitles"),text:t("pptx.slideShow.subtitles"),onClick:n.toggleSubtitles});b.btn.title=t("pptx.slideShow.subtitlesTooltip");let v=H(e,{label:t("pptx.slideShow.subtitleSettings"),text:t("pptx.slideShow.subtitleSettings"),onClick:n.openSubtitleSettings}),f=chunkOBVLNSK5_cjs.w(e,"div","pptxv-show-options"),S=chunk24B6ZCFG_cjs.Fi.map(h=>XL(e,t,h,n));f.append(...S.map(h=>h.el));let y=()=>{let h=n.showOptions();for(let C of S)C.input.checked=C.descriptor.unsupported?false:chunk24B6ZCFG_cjs.Gi(h,C.descriptor.id);};return y(),z(i.btn,"slideShow.startSlideShow.fromBeginning"),z(s.btn,"slideShow.startSlideShow.fromCurrent"),z(a.btn,"slideShow.present.presenterView"),z(l.btn,"slideShow.startSlideShow.customShow"),z(d.btn,"slideShow.setUp.rehearseWithCoach"),z(u.btn,"slideShow.setUp.setUpSlideShow"),z(m.btn,"slideShow.setUp.hideSlide"),z(g.btn,"slideShow.setUp.rehearseTimings"),z(x.btn,"slideShow.setUp.record"),z(b.btn,"slideShow.captions.subtitles"),z(v.btn,"slideShow.captions.subtitleSettings"),r.append(q(e,"slideShow.startSlideShow",i.btn,s.btn),q(e,"slideShow.present",a.btn),q(e,"slideShow.startSlideShow",l.btn),q(e,"slideShow.present",...p?[p.btn]:[]),q(e,"slideShow.setUp",d.btn,u.btn,m.btn,g.btn,x.btn),f,q(e,"slideShow.captions",b.btn,v.btn)),{el:r,syncOptions:y,setSubtitlesVisible:h=>b.setActive(h),setHideSlideActive:h=>{m.setActive(h),m.btn.setAttribute("aria-pressed",String(h));}}}function tP(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-advance"),r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.ribbon.advanceSlide"),o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"label","pptxv-transition-advance-row"),s=e.createElement("input");s.type="checkbox",s.checked=true,s.setAttribute("aria-label",t("pptx.ribbon.onMouseClick")),i.append(s,e.createTextNode(t("pptx.ribbon.onMouseClick")));let a=chunkOBVLNSK5_cjs.w(e,"label","pptxv-transition-advance-row"),l=e.createElement("input");l.type="checkbox",l.setAttribute("aria-label",t("pptx.ribbon.afterDuration"));let p=e.createElement("input");p.type="text",p.className="pptxv-transition-advance-seconds",p.value=chunk24B6ZCFG_cjs.Ai,p.disabled=true,p.title=t("pptx.ribbon.advanceAfterSeconds"),p.setAttribute("aria-label",t("pptx.ribbon.advanceAfterSeconds")),a.append(l,e.createTextNode(t("pptx.ribbon.afterDuration")),p);let d=()=>({advanceOnClick:s.checked,advanceAfter:l.checked,advanceAfterText:p.value}),u=false,m=()=>{p.disabled=u||!l.checked;};return s.addEventListener("change",()=>n(d())),l.addEventListener("change",()=>{m(),n(d());}),p.addEventListener("change",()=>n(d())),p.addEventListener("keydown",g=>g.stopPropagation()),z(i,"transitions.timing.advanceOnClick"),z(a,"transitions.timing.advanceAfter"),o.append(i,a),{el:o,setValue(g){s.checked=g.advanceOnClick,l.checked=g.advanceAfter,e.activeElement!==p&&(p.value=g.advanceAfterText),m();},setDisabled(g){u=g,s.disabled=g,l.disabled=g,m();}}}function QL(e,t){return e.type===t.type&&e.durationSec===t.durationSec&&e.advanceOnClick===t.advanceOnClick&&e.advanceAfter===t.advanceAfter&&e.advanceAfterText===t.advanceAfterText}function oP(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=n.readDraft()??{...chunk24B6ZCFG_cjs.Bi},s=H(e,{label:t("pptx.ribbon.preview"),icon:"play",textLabel:t("pptx.ribbon.preview"),onClick:()=>chunk24B6ZCFG_cjs.Mi(chunk24B6ZCFG_cjs.Di(void 0,i),e)});s.btn.title=t("pptx.ribbon.previewTransition"),r.appendChild(s.btn);let a=H(e,{label:t("pptx.headerFooter.applyToAll"),icon:"copy",textLabel:t("pptx.headerFooter.applyToAll"),onClick:()=>n.applyDraft(i,true)});a.btn.title=t("pptx.ribbon.applyTransitionToAll");function l(){for(let C of m)C.handle.setActive(C.type===i.type);}let p=C=>{i={...i,...C},l(),n.applyDraft(i,false);},d=tP(e,t,C=>p(C)),u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-transition-gallery"),m=chunk24B6ZCFG_cjs.zi.map(C=>{let w=H(e,{label:t(C.labelKey),text:t(C.labelKey),onClick:()=>p({type:C.type})});return u.appendChild(w.btn),{type:C.type,handle:w}});r.appendChild(u);let g=re(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:C=>p({durationSec:Math.max(0,C)})});g.setValue(i.durationSec),g.input.title=t("pptx.ribbon.transitionDurationTitle"),r.appendChild(g.el);let x=chunkOBVLNSK5_cjs.w(e,"label","pptxv-transition-sound"),b=e.createElement("select");b.setAttribute("aria-label",t("pptx.ribbon.sound"));let v=e.createElement("input");v.type="file",v.accept="audio/*",v.style.display="none";let f=e.createElement("button");f.type="button",f.className="pptxv-transition-sound-preview",f.setAttribute("aria-label",t("pptx.animation.sound.preview")),f.textContent="\u25B6",f.disabled=true,x.append(e.createTextNode(t("pptx.ribbon.sound")),b,f,v),r.appendChild(x);function S(){let C=n.readTransition();b.replaceChildren();for(let w of chunk24B6ZCFG_cjs.si(C)){let P=e.createElement("option");P.value=w.value,P.textContent=w.i18nKey?t(w.i18nKey):w.label??"",b.appendChild(P);}b.value=chunk24B6ZCFG_cjs.ti(C),f.disabled=!chunk24B6ZCFG_cjs.wi(C);}S(),b.addEventListener("change",()=>{if(b.value===chunk24B6ZCFG_cjs.ri){v.click(),b.value=chunk24B6ZCFG_cjs.ti(n.readTransition());return}if(b.value===chunk24B6ZCFG_cjs.qi){n.applyChange(chunk24B6ZCFG_cjs.xi());return}let C=chunk24B6ZCFG_cjs.vi(b.value);C&&n.applyChange(C);}),f.addEventListener("click",()=>{let C=chunk24B6ZCFG_cjs.wi(n.readTransition());if(!C)return;let w=chunk24B6ZCFG_cjs.nd(C);w&&Mt(w.dataUrl);}),v.addEventListener("change",()=>{let C=v.files?.[0];v.value="",C&&chunk24B6ZCFG_cjs.yi(C).then(w=>{w&&n.applyChange(chunk24B6ZCFG_cjs.ui({name:C.name,dataUrl:w}));});}),r.appendChild(a.btn),r.appendChild(d.el);let y=H(e,{label:t("pptx.ribbon.inspector"),icon:"panel-right",textLabel:t("pptx.ribbon.inspector"),onClick:o});y.btn.title=t("pptx.ribbon.openInspectorTransitions"),r.appendChild(y.btn),z(s.btn,"transitions.preview.preview"),z(u,"transitions.transitionToThisSlide.gallery"),z(g.el,"transitions.timing.duration"),z(x,"transitions.timing.sound"),z(a.btn,"transitions.timing.applyToAll"),r.replaceChildren(q(e,"transitions.preview",s.btn),q(e,"transitions.transitionToThisSlide",u),q(e,"transitions.timing",g.el,x,a.btn,d.el),y.btn);let h=()=>{l(),g.setValue(i.durationSec),d.setValue(i);};return h(),{el:r,sync(){S();let C=n.readDraft()??chunk24B6ZCFG_cjs.Bi;QL(C,i)||(i=C,h());},setEditable(C){for(let w of m)w.handle.setDisabled(!C);g.setDisabled(!C),b.disabled=!C,a.setDisabled(!C),d.setDisabled(!C);}}}function nP(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=(T,E)=>H(e,{label:t(T),text:t(T),onClick:E}),s=T=>{let E=i(T,()=>{});return E.setDisabled(true),E.btn},a=i("pptx.view.normal",n.normalView);a.btn.title=t("pptx.statusBar.normalView");let l=i("pptx.slideSorter.title",n.openSlideSorter);l.btn.title=t("pptx.view.slideSorterTooltip");let p=i("pptx.view.outlineView",n.openOutlineView);p.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 b=i("pptx.view.snapToGrid",()=>n.toggleViewOption("snapToGrid")),v=i("pptx.view.snapToShape",()=>n.toggleViewOption("snapToShape")),f=i("pptx.view.selection",n.openSelectionPane);f.btn.title=t("pptx.selectionPane.title");let S=i("pptx.ribbon.eyedropper",n.activateEyedropper);S.btn.title=t("pptx.view.eyedropperTooltip");let y=i("pptx.view.hGuide",()=>n.addGuide("h"));y.btn.title=t("pptx.view.addHorizontalGuide");let h=i("pptx.view.vGuide",()=>n.addGuide("v"));h.btn.title=t("pptx.view.addVerticalGuide");let C=!chunk24B6ZCFG_cjs.eq("zoom",o),w=C?i("pptx.view.zoomToFit",n.zoomToFit):null;w&&(w.btn.title=t("pptx.view.zoomToFitTooltip"));let P=i("pptx.ribbon.templatesOff",()=>n.toggleTemplateEditing?.());P.btn.dataset.testid="template-edit-toggle",P.btn.title=t("pptx.view.templateEditingTooltip");let k=(T,E)=>z(T.btn,E),A=(T,E)=>z(s(T),E);return r.append(q(e,"view.presentationViews",k(a,"view.presentationViews.normal"),k(l,"view.presentationViews.slideSorter"),k(p,"view.presentationViews.outline"),k(d,"view.presentationViews.readingView")),q(e,"view.masterViews",k(u,"view.masterViews.slideMaster"),A("pptx.master.handoutMasterTitle","view.masterViews.handoutMaster"),A("pptx.master.notesMasterTitle","view.masterViews.notesMaster")),q(e,"view.show",k(m,"view.show.ruler"),k(g,"view.show.gridlines"),k(x,"view.show.guides"),k(b,"view.show.snapToGrid"),k(f,"view.show.selectionPane"),k(S,"view.show.eyedropper"),k(v,"view.show.snapToShape"),Ot(e,"view.show.addGuide",y.btn,h.btn)),q(e,"view.zoom",...C?[A("pptx.slideSorter.zoom","view.zoom.zoom"),w?.btn??[]].flat():[]),q(e,"view.window",k(P,"view.window.templateEditing"),A("pptx.view.macros","view.window.macros"))),w&&z(w.btn,"view.zoom.fitToWindow"),{el:r,setEditable(T){P.setDisabled(!T),u.setDisabled(!T),S.setDisabled(!T);},setViewOptions(T){m.setActive(T.showRulers),g.setActive(T.showGrid),x.setActive(T.showGuides),b.setActive(T.snapToGrid),v.setActive(T.snapToShape);},setTemplateEditing(T){let E=t(T?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");P.btn.textContent=E,P.btn.title=t("pptx.view.templateEditingTooltip"),P.btn.setAttribute("aria-label",E),P.setActive(T);}}}function Xr(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ribbon");i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let s=yT(e,t,n,o);i.append(s.el);let a=Js(e,t,G=>O(G),o,{startRecording:()=>n.slideShow.startRehearsal()});a.el.hidden=true,i.appendChild(a.el);let l=Hs(e,t,n.findReplace);i.appendChild(l.el);let p=BE(e,t,(G,K)=>K?n.edit.updateEquation(K,G):n.insert.insertEquation(G));i.appendChild(p.el);let d=zE(e,t,n.edit);i.appendChild(d.el);let u=yt(G=>n.edit.applyRibbonGalleryResult(G)),m=G=>chunk24B6ZCFG_cjs.eq(G,o),g=m("file")?null:zT(e,t,n.file,()=>O("home"),o,r),x=m("home")?null:bT(e,t,{edit:n.edit,onToggleFindReplace:()=>l.toggle(),hiddenActions:o,galleryHub:u}),b=m("insert")?null:QT(e,t,n.insert,()=>p.toggle(),()=>n.nav.openHeaderFooter(),()=>n.nav.openHyperlink()),v=m("draw")?null:MT(e,t,n.draw),f=false,S=()=>n.nav.toggleInspector?.(),y=()=>{n.nav.clearSelection?.(),f||S();},h=m("design")?null:LT(e,t,n.design,()=>d.toggle(),y,u),C=m("transitions")?null:oP(e,t,n.transitions,S),w=m("animations")?null:kT(e,t,n.edit,S),P=m("slideShow")?null:eP(e,t,n.slideShow,o),k=m("record")?null:ZT(e,t,n.slideShow),A=m("review")?null:JT(e,t,n.nav),T=m("view")?null:nP(e,t,n.nav,o),E=m("help")?null:NT(e,t,n.nav),L={file:g?.el,home:x?.el,insert:b?.el,draw:v?.el,design:h?.el,transitions:C?.el,animations:w?.el,slideShow:P?.el,record:k??void 0,review:A?.el,view:T?.el,help:E??void 0},M=chunk24B6ZCFG_cjs.fq(Bo,o);for(let G of M){let K=L[G.id];K&&(K.hidden=true,i.appendChild(K));}let D=_E(e,t,u);for(let[G,K]of D)K.hidden=true,L[G]=K;let I=M.find(G=>G.id===jr)?.id??M[0]?.id??jr,R=I;function O(G){if(L[G]){G!==R&&u.closeAll(),R=G,a.setActive(G);for(let K of Object.keys(L)){let j=L[K];j&&(j.hidden=K!==G);}}}O(R);let B,V={hasClipboard:false,slideCount:0,selectedCount:0},F=()=>{let G=chunk24B6ZCFG_cjs.rr(B??null,n.nav.getCustomization?.());a.setContextualTabs(G),GE(i,D,G);let K=chunk24B6ZCFG_cjs.tr(R,G,I);K!==R&&O(K);},_=()=>{u.sync(V.galleryContext,W),F(),x?.update(fT(W,B,V));},N=()=>{w?.update({editable:W,hasSelection:B!==void 0,selectedElementId:V.selectedElementId,animations:V.animations??[],animationTimelineAnchors:V.animationTimelineAnchors??[]});},W=false,X=new Set;return {el:i,update(){},setEditState(G){s.setEditState(G),a.el.hidden=!G.editable;},setNotesExpanded(){},setAutosaveStatus:(G,K)=>s.setAutosaveStatus(G,K),setEditable(G){W=G,A?.setEditable(G),T?.setEditable(G),b?.setEditable(G),v?.setEditable(G),l.setEditable(G),p.setEditable(G),d.setEditable(G),h?.setEditable(G),C?.setEditable(G),C?.sync(),P?.syncOptions(),_(),N();},setDrawState:G=>{v?.update(G),b?.setFreeformTool(G.freeformTool??null);},setTemplateEditing:G=>T?.setTemplateEditing(G),setViewOptions:G=>T?.setViewOptions(G),setHasMacros:G=>g?.setHasMacros(G),setSubtitlesVisible:G=>P?.setSubtitlesVisible(G),setHideSlideActive:G=>P?.setHideSlideActive(G),setInspectorOpen:G=>{f=G,s.setInspectorOpen(G);},toggleFindReplace:()=>l.toggle(),openEquationEditor:(G,K)=>p.openEdit(G,K),showDefaultTab:()=>O(I),setHiddenOptionTabs:G=>{if(X=new Set(G.filter(K=>K!=="file")),a.setHiddenTabs(X),X.has(R)){let K=X.has("home")?M.find(j=>!X.has(j.id))?.id:"home";K&&O(K);}},applyScreenTips:G=>a.applyScreenTips(G),updateSelection(G,K){B=G,V=K,b?.setHasSelection(G!==void 0),_(),N();}}}var rP=0;function ZL(){return rP+=1,`pptxv-ribbon-${rP}`}function iP(e,t,n){let o=ZL();t.setAttribute(chunk24B6ZCFG_cjs.Zq,o);let r=e.createElement("style");r.dataset.pptxRibbonCustomization="";let i=s=>{r.textContent=chunk24B6ZCFG_cjs._q(s??chunk24B6ZCFG_cjs.$q,o);};return i(n),t.appendChild(r),{el:r,token:o,update:i}}function aP(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-run-program-notices");o.dataset.testid="pptx-run-program-notices",o.hidden=true,o.setAttribute("style",chunk24B6ZCFG_cjs.Lo()),o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.hyperlink.actionRunProgram"));let r=chunk24B6ZCFG_cjs.Vj(typeof navigator>"u"?void 0:navigator);function i(s){let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-run-program-notice");a.dataset.testid="pptx-run-program-notice",a.dataset.target=s.target,a.setAttribute("role","status");let l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-run-program-notice-message");if(l.textContent=t(s.messageKey,{target:s.target}),a.appendChild(l),r){let d=chunkOBVLNSK5_cjs.w(e,"button","pptxv-run-program-notice-copy");d.type="button",d.dataset.testid="pptx-run-program-notice-copy",d.textContent=t(s.copyLabelKey),d.addEventListener("click",()=>{navigator.clipboard.writeText(s.target);}),a.appendChild(d);}let p=chunkOBVLNSK5_cjs.w(e,"button","pptxv-run-program-notice-dismiss");return p.type="button",p.dataset.testid="pptx-run-program-notice-dismiss",p.setAttribute("aria-label",t("pptx.compatibility.dismiss")),p.appendChild(chunkOBVLNSK5_cjs.K(e,"close")),p.addEventListener("click",()=>n(s.id)),a.appendChild(p),a}return {el:o,update(s){o.hidden=s.length===0,o.replaceChildren(...s.map(i));}}}function il(e,t){let n=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(e,"div","pptxv-shortcuts-header"),r=chunkOBVLNSK5_cjs.w(e,"h2","pptxv-shortcuts-title");r.textContent=t("pptx.shortcuts.title");let i=chunkOBVLNSK5_cjs.w(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 s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-shortcuts-list");for(let l of chunk24B6ZCFG_cjs.Ap){let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-shortcuts-row"),d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-shortcuts-action");d.textContent=t(l.actionKey);let u=chunkOBVLNSK5_cjs.w(e,"kbd","pptxv-shortcuts-keys");u.textContent=l.shortcut,p.append(d,u),s.appendChild(p);}n.append(o,s);let a=()=>{n.hidden=true;};return i.addEventListener("click",a),{el:n,toggle(){n.hidden=!n.hidden;},close:a,isOpen:()=>!n.hidden}}function sP(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-statusbar"),s=()=>{let k=chunkOBVLNSK5_cjs.w(e,"span","pptxv-statusbar-sep");return k.setAttribute("aria-hidden","true"),k},a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-statusbar-counter");a.setAttribute("aria-live","polite");let l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-statusbar-text");l.textContent=t("pptx.statusBar.language");let p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(a,s(),l,s(),p),i.appendChild(chunkOBVLNSK5_cjs.w(e,"span","pptxv-statusbar-spacer"));let d=false,u="",m="idle",g=()=>{p.textContent=u.length>0?u:t(d?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),p.classList.toggle("is-saving",m==="saving"),p.classList.toggle("is-error",m==="error");};g();let x=!chunk24B6ZCFG_cjs.eq("notes",o),b=!chunk24B6ZCFG_cjs.eq("fullscreen",o),v=!chunk24B6ZCFG_cjs.eq("zoom",o),f=null;if(x){f=chunkOBVLNSK5_cjs.w(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),f.type="button",f.title=t("pptx.statusBar.toggleNotes"),f.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),f.setAttribute("aria-pressed","false"),f.setAttribute("data-pptx-compact",""),f.appendChild(JL(e,"sticky-note"));let k=chunkOBVLNSK5_cjs.w(e,"span");k.textContent=t("pptx.notes.title"),f.appendChild(k),f.addEventListener("click",n.toggleNotes);}let S=H(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});S.btn.setAttribute("data-pptx-compact","");let y=H(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});y.btn.setAttribute("data-pptx-compact","");let h=b?H(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;h?.btn.setAttribute("data-pptx-compact","");let C=null,w=null,P=null;return v&&(C=H(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),C.btn.setAttribute("data-pptx-compact",""),w=chunkOBVLNSK5_cjs.w(e,"button","pptxv-statusbar-zoom"),w.type="button",w.title=t("pptx.statusBar.zoomToFit"),w.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),w.setAttribute("data-pptx-compact",""),w.addEventListener("click",n.zoomToFit),P=H(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),P.btn.setAttribute("data-pptx-compact","")),i.append(...f?[f]:[],s(),S.btn,y.btn,...h?[h.btn]:[],...[],s(),...C&&w&&P?[C.btn,w,P.btn]:[]),{el:i,update({current:k,total:A,zoomPercent:T}){a.textContent=A>0?t("pptx.statusBar.slideOf",{current:k+1,total:A}):t("pptx.statusBar.noSlides"),w&&(w.textContent=`${Math.round(T)}%`);},setNotesExpanded(k){f?.setAttribute("aria-pressed",String(k)),f?.classList.toggle("is-active",k);},setSaveStatus(k,A){u=k,m=A,g();},setDirty(k){d=k,g();},setPresenting(k){S.btn.classList.toggle("is-active",!k),h?.btn.classList.toggle("is-active",k);}}}function JL(e,t){let n=chunkOBVLNSK5_cjs.w(e,"span","pptxv-statusbar-icon");return n.appendChild(eM(e,t)),n}function eM(e,t){return chunkOBVLNSK5_cjs.K(e,t)}function Qr(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 U(e){let t=Qr(e);if(t)return chunk24B6ZCFG_cjs.ip(t.document,t.target);let n=e.slides[e.currentSlide];return n?e.editTemplateMode?e.templateElementsBySlideId[n.id]??[]:n.elements:[]}function lP(e,t){return Qr(e)||!e.editTemplateMode||chunk24B6ZCFG_cjs.Le(t)?U(e):e.slides[e.currentSlide]?.elements??[]}function pP(e,t,n){return Qr(e)||!e.editTemplateMode||chunk24B6ZCFG_cjs.Le(t)?Z(e,n):{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:n}:o)}}function Z(e,t){let n=Qr(e);if(n){let r=chunk24B6ZCFG_cjs.jp(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 J(e,t){return U(e).find(n=>n.id===t)}function Go(e){return chunk24B6ZCFG_cjs.ps({mruColors:e.presentationProperties.mruColors})}function ct(e,t){let n=e.get(),o=Go(n),r=chunk24B6ZCFG_cjs.qs(o,t);r!==o&&e.set({presentationProperties:{...n.presentationProperties,...chunk24B6ZCFG_cjs.rs(r)}});}function tM(e){return e&&chunk24B6ZCFG_cjs.f(e)?{fillColor:e.shapeStyle?.fillColor,fillColorRef:e.shapeStyle?.fillColorRef,strokeColor:e.shapeStyle?.strokeColor,strokeColorRef:e.shapeStyle?.strokeColorRef,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,fillColorRef:void 0,strokeColor:void 0,strokeColorRef:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function al(e,t=null,n=[],o=null,r=new Map,i=null,s=[],a=void 0){let l=tM(e),p=e?chunk24B6ZCFG_cjs.Mg(e):void 0,d=e?chunk24B6ZCFG_cjs._m(e):void 0,u=e?chunk24B6ZCFG_cjs.an(e):void 0,m=e?chunk24B6ZCFG_cjs.cn(e):void 0,g=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,isLocked:chunk24B6ZCFG_cjs.af(e),croppable:chunk24B6ZCFG_cjs._e(e,"crop"),arrowheadsChangeable:chunk24B6ZCFG_cjs._e(e,"changeArrowheads"),canShape:qr(e),canText:Le(e),isImage:e!==void 0&&chunk24B6ZCFG_cjs.d(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,oleName:e?.type==="ole"?e.oleName:void 0,oleElement:e?.type==="ole"?e:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:l.fillColor,fillColorRef:l.fillColorRef,strokeColor:l.strokeColor,strokeColorRef:l.strokeColorRef,strokeWidth:l.strokeWidth,shapeStyle:e&&chunk24B6ZCFG_cjs.f(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:l.fillOpacity,strokeOpacity:l.strokeOpacity,gradientEnabled:e!==void 0&&chunk24B6ZCFG_cjs.Um(e),gradient:e?chunk24B6ZCFG_cjs.Tm(e):chunk24B6ZCFG_cjs.Zm(),vAlign:p?.vAlign??"top",textWrap:e?chunk24B6ZCFG_cjs.Pg(e):"square",autoFitMode:e?chunk24B6ZCFG_cjs.Qg(e):"none",characterSpacing:p?.characterSpacing??0,lineSpacing:p?.lineSpacing??1,lineSpacingExactPt:p?.lineSpacingExactPt??null,paragraphSpacingBefore:p?.paragraphSpacingBefore??0,paragraphSpacingAfter:p?.paragraphSpacingAfter??0,paragraphIndent:p?.paragraphIndent??0,paragraphMarginLeft:p?.paragraphMarginLeft??0,textDirection:p?.textDirection??"horizontal",textRtl:p?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:d?.brightness??0,imageContrast:d?.contrast??0,imageSaturation:d?.saturation??0,imageArtisticEffect:e&&chunk24B6ZCFG_cjs.d(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunk24B6ZCFG_cjs.d(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunk24B6ZCFG_cjs.d(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunk24B6ZCFG_cjs.d(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunk24B6ZCFG_cjs.d(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunk24B6ZCFG_cjs.d(e)?e.imageEffects?.colorWash:void 0,altText:e?chunk24B6ZCFG_cjs.Fm(e).altText:"",title:e?chunk24B6ZCFG_cjs.Fm(e).title:"",showAccessibilitySection:e!==void 0&&chunk24B6ZCFG_cjs.Gm(e),chartHighlightCell:e?.type==="chart"&&i?.elementId===e.id?{seriesIndex:i.part.seriesIndex,pointIndex:i.part.pointIndex}:null,actionClick:e?.actionClick?chunk24B6ZCFG_cjs.r(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunk24B6ZCFG_cjs.r(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:u?.cropLeft??0,cropTop:u?.cropTop??0,cropRight:u?.cropRight??0,cropBottom:u?.cropBottom??0,tableHeaderRow:m?.firstRowHeader??false,tableBandedRows:m?.bandedRows??false,tableBandedColumns:m?.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:m?.cellPadding??0,selectedTableCell:g?t:null,selectedTableCells:g?n:[],tableCellStyle:g?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(x=>x.height??32)??[]:[],tableElement:e?.type==="table"?e:void 0,recentColors:s,themeColorMap:a}}function oM(e){let t=U(e);return e.selectedElementIds.every(n=>chunk24B6ZCFG_cjs._e(t.find(o=>o.id===n)??null,"group"))}function nM(e){let t=U(e);return e.selectedElementIds.map(n=>t.find(o=>o.id===n)).filter(n=>n!==void 0)}function Uo(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 rM(e,t,n){return {element:t??null,themeColorMap:e.colorScheme?chunk24B6ZCFG_cjs.P(e.colorScheme):void 0,theme:{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme},resolveStyleMatrix:n?o=>n.resolveStyleMatrixReferences(o):void 0}}function dP(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 s=i?e.selectedElement(t):void 0;o?.updateSelection(s,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,selectionGroupable:oM(t),formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],animationTimelineAnchors:t.slides[t.currentSlide]?.animationTimelineAnchors??[],layouts:Uo(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(l=>l.name),customFontFamilies:t.customFontFamilies,recentColors:Go(t),themeColorMap:t.colorScheme?chunk24B6ZCFG_cjs.P(t.colorScheme):void 0,canMergeShapes:i&&chunk24B6ZCFG_cjs.Ml(nM(t)),canCrop:t.selectedElementIds.length===1&&chunk24B6ZCFG_cjs._s(s),cropActive:t.cropSession!==null,galleryContext:rM(t,s,e.getHandler?.())}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth,recentColors:Go(t),freeformTool:t.freeformTool}),r?.update(al(s,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls,t.chartPartSelection,Go(t),t.colorScheme?chunk24B6ZCFG_cjs.P(t.colorScheme):void 0));let a=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,slideSize:t.slideSize,hasDeckElements:t.slides.some(l=>l.elements.length>0),elements:a?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:s?.id,comments:a?.comments??[],commentMentionAuthors:Vr(t.modernCommentAuthors,t.commentAuthors),customShows:t.customShows,docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:a,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 cP(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk24B6ZCFG_cjs.ah({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=`${s}px`,e.style.top=`${a}px`;}function mP(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=()=>{o?.remove(),o=null,r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(p,d,u)=>{r?.remove();let m=chunkOBVLNSK5_cjs.w(t,"div","pptxv-context-menu",{left:`${d}px`,top:`${u}px`});m.setAttribute("role","menu"),m.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));for(let g of Uo(n.get())){let x=chunkOBVLNSK5_cjs.w(t,"button","pptxv-context-menu-item");x.type="button",x.setAttribute("role","menuitem"),x.textContent=g.name,x.addEventListener("click",()=>{n.set({currentSlide:p}),e.getEditActions().applyLayout(g.path),s();}),m.appendChild(x);}(e.host.closest(".pptxv")??t.body).appendChild(m),cP(m,t,d,u),r=m;},l=(p,d,u)=>{let m=chunkOBVLNSK5_cjs.w(t,"button","pptxv-context-menu-item");return m.type="button",m.setAttribute("role","menuitem"),m.textContent=p.countLabelKey?e.getTranslator()(p.labelKey,{count:u}):e.getTranslator()(p.labelKey),m.disabled=p.disabled===true,m.addEventListener("click",()=>{switch(p.id){case "new-slide":s(),e.addSlideAfter(d.index);break;case "duplicate":s(),e.duplicateSlides(d.selectedIndexes);break;case "delete":s(),e.deleteSlides(d.selectedIndexes);break;case "layout":o?.remove(),o=null,a(d.index,d.x,d.y);break;case "hide":s(),e.toggleHideSlides(d.selectedIndexes);break;case "add-section":s(),e.getEditActions().sections.addSection(e.getTranslator()("pptx.sections.defaultName"),d.index);break;default:s();}}),m};return {open(p,d){s();let u=p.selectedIndexes.map(g=>d[g]).filter(g=>!!g),m=chunk24B6ZCFG_cjs.Hl({selectedCount:u.length,hasHiddenInSelection:u.some(g=>g.hidden),hasVisibleInSelection:u.some(g=>!g.hidden),wouldDeleteAllSlides:u.length>=d.length});o=chunkOBVLNSK5_cjs.w(t,"div","pptxv-context-menu",{left:`${p.x}px`,top:`${p.y}px`}),o.dataset.pptxContextMenu="true",o.dataset.pptxSlidePaneContextMenu="true",o.setAttribute("role","menu"),o.setAttribute("aria-label",e.getTranslator()("pptx.slidesPane.contextMenu.newSlide"));for(let g of m){if(g.separatorBefore){let x=chunkOBVLNSK5_cjs.w(t,"div","pptxv-context-menu-separator");x.setAttribute("role","separator"),o.appendChild(x);}o.appendChild(l(g,p,u.length));}(e.host.closest(".pptxv")??t.body).appendChild(o),cP(o,t,p.x,p.y),i=g=>{if(g instanceof KeyboardEvent&&g.key!=="Escape")return;let x=g.target;x instanceof Node&&(o?.contains(x)||r?.contains(x))||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},close:s,destroy:s}}function uP(){let e=[],t=null;return {isSelected(n){return e.includes(n)},onClick(n,o,r){let i=chunk24B6ZCFG_cjs.Gl({clickedId:o,orderedIds:r,selectedIds:e,anchorId:t,ctrlKey:n.ctrlKey,metaKey:n.metaKey,shiftKey:n.shiftKey});e=i.selectedIds,t=i.anchorId;},openContextMenu(n,o,r,i){let s=i[r];if(s===void 0)return null;let l=(e.length>0&&e.includes(s)?e:[s]).map(p=>i.indexOf(p)).filter(p=>p!==-1);return {x:n,y:o,index:r,selectedIndexes:l}}}}function xP(e){let{doc:t,t:n,actions:o}=e,r=chunk24B6ZCFG_cjs.zf(e.sections,e.slides);return r.map((i,s)=>{let a=chunkOBVLNSK5_cjs.w(t,"section","pptxv-thumb-section"),l=chunkOBVLNSK5_cjs.w(t,"header","pptxv-thumb-section-header"),p=chunkOBVLNSK5_cjs.w(t,"button","pptxv-thumb-section-toggle");if(p.type="button",p.setAttribute("aria-expanded",String(!i.section?.collapsed)),p.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(a.dataset.sectionId=i.section.id,p.addEventListener("click",()=>o?.toggle(i.section.id))),i.section?.color){let d=chunkOBVLNSK5_cjs.w(t,"span","pptxv-thumb-section-color");d.dataset.pptxSectionColor=i.section.color,d.style.background=i.section.color,l.appendChild(d);}if(l.appendChild(p),i.section&&o){let d=chunkOBVLNSK5_cjs.w(t,"span","pptxv-thumb-section-actions"),u=(m,g,x,b=false)=>{let v=chunkOBVLNSK5_cjs.w(t,"button");v.type="button",v.setAttribute("data-pptx-compact",""),v.title=m,v.setAttribute("aria-label",m),v.textContent=g,v.disabled=b,v.addEventListener("click",x),d.appendChild(v);};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"),s===0),u(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),s===r.length-1),u(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),l.appendChild(d);}if(a.appendChild(l),!i.section?.collapsed){let d=chunkOBVLNSK5_cjs.w(t,"div","pptxv-thumb-section-slides");i.slides.forEach((u,m)=>d.appendChild(e.buildSlide(u,i.slideIndexes[m]))),a.appendChild(d);}return a})}var Ko=128;function sl(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"aside","pptxv-thumbs");i.setAttribute("role","navigation"),i.setAttribute("aria-label",t("pptx.sections.slides"));let s=uP(),a=r?mP({doc:e,store:r.store,getTranslator:()=>t,getEditActions:r.getEditActions,addSlideAfter:r.addSlideAfter,duplicateSlides:r.duplicateSlides,deleteSlides:r.deleteSlides,toggleHideSlides:r.toggleHideSlides,host:i}):null;i.addEventListener("keydown",A=>{if(A.key!=="Enter"||!r)return;let T=A.target;T instanceof HTMLElement&&T.dataset.slideIndex!==void 0&&(A.preventDefault(),r.addSlideAfter(x));});let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-thumbs-list");i.appendChild(l);let p=null,d=false,u=false,m=()=>{p&&(p.hidden=!d||u);};if(o){p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-thumbs-footer"),p.hidden=true;let A=chunkOBVLNSK5_cjs.w(e,"button","pptxv-thumbs-add");A.type="button",A.appendChild(chunkOBVLNSK5_cjs.K(e,"plus")),A.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),A.addEventListener("click",()=>o()),p.appendChild(A),i.appendChild(p);}let g=new Map,x=0,b=[],v={width:1,height:1},f=null,S=[],y,h=1,C=false,w=(A,T,E)=>{let L=chunkOBVLNSK5_cjs.w(e,"button","pptxv-thumb");L.type="button",L.dataset.slideIndex=String(T),L.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:T+1}));let M=chunkOBVLNSK5_cjs.w(e,"span","pptxv-thumb-num");M.textContent=String(T+1);let D=chunkOBVLNSK5_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${Ko}px`,height:`${Math.round(v.height*E)}px`});D.appendChild(f(A,E)),L.append(M,D);let I=chunk24B6ZCFG_cjs.Tp(A.hidden,"rail",T);if(I.marker&&I.labelId){L.setAttribute(chunk24B6ZCFG_cjs.Pp,I.marker),L.setAttribute("aria-describedby",I.labelId);let R=chunkOBVLNSK5_cjs.w(e,"span","pptxv-thumb-hidden");R.id=I.labelId,R.appendChild(chunkOBVLNSK5_cjs.K(e,"eye-off"));let O=chunkOBVLNSK5_cjs.w(e,"span","pptxv-sr-only");O.textContent=t(chunk24B6ZCFG_cjs.Qp),R.appendChild(O),D.appendChild(R);}return s.isSelected(A.id)&&T!==x&&L.classList.add("is-selected"),L.addEventListener("click",R=>{s.onClick(R,A.id,b.map(O=>O.id)),L.classList.toggle("is-selected",s.isSelected(A.id)&&T!==x),n(T);}),a&&L.addEventListener("contextmenu",R=>{R.preventDefault();let O=s.openContextMenu(R.clientX,R.clientY,T,b.map(B=>B.id));O&&a.open(O,b);}),g.set(T,L),L},P=()=>chunk24B6ZCFG_cjs.Xt(chunk24B6ZCFG_cjs.Wt(l),k),k=()=>{if(!f)return;g=new Map;let A=Ko/Math.max(v.width,1);if(S.length>0){l.replaceChildren(...xP({doc:e,t,sections:S,slides:b,actions:y,buildSlide:(D,I)=>w(D,I,A)})),g.get(x)?.classList.add("is-active");return}let T=C?chunk24B6ZCFG_cjs.pp(b.length,h,l.scrollTop,l.clientHeight||600):chunk24B6ZCFG_cjs.pp(b.length,h,0,b.length*h,0),E=chunkOBVLNSK5_cjs.w(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column",gap:"8px"});C&&(E.style.position="absolute",E.style.insetInline="0",E.style.top=`${T.offsetY}px`);for(let D=T.startIndex;D<=T.endIndex;D+=1){let I=b[D];I&&E.appendChild(w(I,D,A));}let L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-thumbs-space",{position:"relative",height:C?`${T.totalHeight}px`:"auto"});C&&(L.dataset.virtualized="true"),L.appendChild(E),l.replaceChildren(L);let M=g.get(x);M?.classList.add("is-active"),M?.setAttribute("aria-current","page");};return l.addEventListener("scroll",()=>{C&&P();}),{el:i,render(A,T,E,L,M){u=false,m(),b=A,v=T,f=E,S=L??[],y=M;let D=Ko/Math.max(T.width,1);h=Math.round(T.height*D)+8,C=!L?.length&&A.length>=chunk24B6ZCFG_cjs.op,i.classList.toggle("pptxv-thumbs-virtualized",C),P(),this.setActive(x);},setActive(A){if(x=A,C){let E=A*h,L=E+h,M=l.clientHeight||600;E<l.scrollTop?l.scrollTop=E:L>l.scrollTop+M&&(l.scrollTop=Math.max(0,L-M)),P();}g.forEach((E,L)=>{E.classList.toggle("is-active",L===A),L===A?E.setAttribute("aria-current","page"):E.removeAttribute("aria-current");});let T=g.get(A);T&&typeof T.scrollIntoView=="function"&&T.scrollIntoView({block:"nearest"});},setVisible(A){i.hidden=!A;},setAddSlideVisible(A){d=A,m();},renderMasters(A,T,E,L,M){u=true,m(),l.replaceChildren(),g=new Map,C=false,i.classList.remove("pptxv-thumbs-virtualized");let D=Ko/Math.max(T.width,1),I=(R,O,B,V)=>{let F=chunkOBVLNSK5_cjs.w(e,"button",`pptxv-thumb${V===null?"":" pptxv-master-layout"}`);F.type="button",F.setAttribute("aria-label",O),F.classList.toggle("is-active",M.masterIndex===B&&M.layoutIndex===V),M.masterIndex===B&&M.layoutIndex===V&&F.setAttribute("aria-current","page");let _=chunkOBVLNSK5_cjs.w(e,"span","pptxv-thumb-num");_.textContent=O;let N=chunkOBVLNSK5_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${Ko}px`,height:`${Math.round(T.height*D)}px`});N.appendChild(E(R,D)),F.append(_,N),F.addEventListener("click",()=>L(B,V)),l.appendChild(F);};A.forEach((R,O)=>{I({id:R.path,rId:"",slideNumber:0,elements:R.elements??[],backgroundColor:R.backgroundColor,backgroundImage:R.backgroundImage},R.name||t("pptx.master.master"),O,null),R.layouts?.forEach((B,V)=>I({id:B.path,rId:"",slideNumber:0,elements:[...R.elements??[],...B.elements??[]],backgroundColor:B.backgroundColor??R.backgroundColor,backgroundImage:B.backgroundImage??R.backgroundImage},B.name||t("pptx.master.layout"),O,V));});}}}function iM(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function gP(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-cmdsearch"),r=e.createElement("pptx-ui-search");r.className="pptxv-cmdsearch-box",r.setAttribute("variant","titlebar"),r.setAttribute("data-pptx-search-surface",""),r.setAttribute("data-pptx-search-input",""),r.placeholder=t("pptx.titleBar.searchPlaceholder"),r.setAttribute("aria-label",t("pptx.titleBar.search")),o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-cmdsearch-menu");i.hidden=true,o.appendChild(i);let s=()=>{i.hidden=true,i.replaceChildren();},a=d=>{r.value="",s(),d.run();},l=[],p=()=>{if(l=iM(r.value,n,t),r.value.trim().length===0){s();return}if(i.replaceChildren(),l.length===0){let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-cmdsearch-empty");d.textContent=t("pptx.titleBar.searchNoResults"),i.appendChild(d);}for(let d of l){let u=chunkOBVLNSK5_cjs.w(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(d.labelKey),u.addEventListener("mousedown",m=>{m.preventDefault(),a(d);}),i.appendChild(u);}i.hidden=false;};return r.addEventListener("input",p),r.addEventListener("focus",p),r.addEventListener("blur",s),r.addEventListener("keydown",d=>{d.stopPropagation(),d.key==="Enter"&&l.length>0?a(l[0]):d.key==="Escape"&&(r.value="",s());}),{el:o}}var aM={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function bP(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-autosave"),a=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-autosave-label");a.textContent=t("pptx.titleBar.autoSave");let l=n.autosaveToggleAvailable??true,p=chunkOBVLNSK5_cjs.w(e,"button","pptxv-titlebar-switch");p.type="button",p.setAttribute("role","switch"),p.title=t(l?"pptx.titleBar.toggleAutoSave":"pptx.autosave.disabledByHost"),p.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),l||(p.disabled=true,p.classList.add("is-disabled")),p.appendChild(chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-switch-knob"));let d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-autosave-label");s.append(a,p,d),o.appendChild(s);let u=()=>{p.classList.toggle("is-on",i),p.setAttribute("aria-checked",String(i)),d.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};p.addEventListener("click",()=>{l&&(i=n.onToggleAutosave(),u(),L());});let m=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(m);let g=chunkOBVLNSK5_cjs.w(e,"span","pptxv-qat");o.appendChild(g);let x=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(x);let b={editable:true,canUndo:false,canRedo:false},v=null,f=null,S=false,y=()=>{m.hidden=!b.editable,x.hidden=S||!b.editable;},h=D=>{D==="save"?n.save():D==="undo"?n.undo():D==="redo"?n.redo():n.quickAccess?.run(D);},C=()=>{g.replaceChildren(),v=null,f=null;let D=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};g.hidden=!D.visible||!b.editable,n.onQuickAccessVisibilityChange?.(g.hidden);for(let I of D.commandIds){if((I==="undo"||I==="redo")&&chunk24B6ZCFG_cjs.eq(I,n.hiddenActions))continue;let R=chunk24B6ZCFG_cjs.hq.find(F=>F.id===I);if(!R)continue;let O=t(R.labelKey),B=aM[R.icon],V=H(e,{label:O,icon:B,text:B===void 0?"Ab":void 0,textLabel:D.showCommandLabels?O:void 0,className:"pptxv-titlebar-btn",onClick:()=>h(I)});if(n.quickAccess){let F=n.quickAccess.screenTip(O);F===void 0?V.btn.removeAttribute("title"):V.btn.title=F;}I==="undo"?(v=V,V.setDisabled(!b.canUndo)):I==="redo"&&(f=V,V.setDisabled(!b.canRedo)),g.appendChild(V.btn);}},w=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-file"),P=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-filename");P.textContent=n.fileName||t(chunk24B6ZCFG_cjs.Ho);let k=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-dot");k.textContent="\u2022",k.setAttribute("aria-hidden","true");let A=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-status");w.append(P,k,A),o.appendChild(w);let T="idle",E=false,L=()=>{A.textContent=t(chunk24B6ZCFG_cjs.Go({autosaveState:T,isDirty:E,autosaveEnabled:i})),A.classList.toggle("is-error",i&&T==="error"),A.classList.toggle("is-saving",i&&T==="saving");},M=chunkOBVLNSK5_cjs.w(e,"span","pptxv-titlebar-search");return M.appendChild(gP(e,t,n.commands).el),o.appendChild(M),u(),L(),y(),C(),{el:o,setEditState(D){b=D,s.hidden=!D.editable,y();let I=n.quickAccess?.getState();g.hidden=!D.editable||I?.visible===false,n.onQuickAccessVisibilityChange?.(g.hidden),k.hidden=!D.editable,A.hidden=!D.editable,M.hidden=!D.editable,v?.setDisabled(!D.canUndo),f?.setDisabled(!D.canRedo);},setAutosaveState(D){T=D,L();},setDirty(D){E=D,L();},setAutosaveEnabled(D){i=D,u(),L();},refreshQuickAccess:C,getQuickAccessElement:()=>g,dockQuickAccessElement(){o.insertBefore(g,x);},setQuickAccessDetached(D){S=D,y();}}}function ll(e,t,n){let o=chunkOBVLNSK5_cjs.w(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,s=null,a=false;n.showToolbar&&n.showTitleBar!==false&&(r=bP(e,t,{...n.titleBar,onQuickAccessVisibilityChange:D=>{a&&s&&(s.hidden=D),n.titleBar.onQuickAccessVisibilityChange?.(D);}}),o.appendChild(r.el)),n.showToolbar&&(i=Xr(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el),iP(e,o,n.ribbonHandlers.nav.getCustomization?.()),s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-qat-row"),s.hidden=true,o.appendChild(s));let l=n.showToolbar?Os(e,t,()=>n.onEnableEditing()):null;l&&o.appendChild(l.el);let p=n.showToolbar?VE(e,t,()=>n.onEditAnywayFromReadOnly(),()=>n.onDismissReadOnlyBanner(),D=>n.onSubmitReadOnlyPassword(D),()=>n.onCancelReadOnlyPasswordPrompt()):null;p&&o.appendChild(p.el);let d=null,u=n.showToolbar?Ls(e,t,{openMenu:()=>d?.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;u&&(u.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(u.el));let m=chunkOBVLNSK5_cjs.w(e,"div","pptxv-body");o.appendChild(m);let g=ss(e,t,n.onSelectSlide);o.appendChild(g.el);let x=il(e,t);o.appendChild(x.el);let b=ks(e,t);m.appendChild(b.el);let v=null;n.showThumbnails&&(v=sl(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide(),n.thumbnailMenu),m.appendChild(v.el));let f=chunkOBVLNSK5_cjs.w(e,"div","pptxv-viewport");f.setAttribute("data-pptx-viewport",""),m.appendChild(f);let S=null;n.showInspector&&(S=Ur(e,t,n.inspectorHandlers),S.setEditable(n.editable),m.appendChild(S.el));let y=chunkOBVLNSK5_cjs.w(e,"div","pptxv-stage-wrap");f.appendChild(y);let h=chunkOBVLNSK5_cjs.w(e,"div","pptxv-empty");h.textContent=t("pptx.statusBar.noSlides"),h.hidden=true,f.appendChild(h);let C=Ms(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(C.el),n.showNotes===false&&(C.el.style.display="none");let w=n.showToolbar&&n.showStatusBar!==false?sP(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;w&&o.appendChild(w.el),d=n.showToolbar?Is(e,t,n.ribbonHandlers,n.onSelectSlide,S?.el??null,n.hiddenActions):null,d&&(d.setEditable(n.editable),o.appendChild(d.el));let P=Rs(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);P.update(0,0),o.appendChild(P.el);let k=Ds(e,t,o,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,end:n.ribbonHandlers.nav.togglePresentation,...n.presentationToolbarHandlers});o.appendChild(k.el);let A=lw(e,t,D=>n.onDismissCompatToast(D),()=>n.onDismissAllCompatToasts());o.appendChild(A.el),chunk24B6ZCFG_cjs.Ui(C.el,D=>A.setBottomInset(D));let T=aP(e,t,D=>n.onDismissRunProgramNotice(D));o.appendChild(T.el);let E=chunkOBVLNSK5_cjs.w(e,"div","pptxv-overlay pptxv-loading");E.textContent=t("pptx.common.loading"),E.setAttribute("role","status"),E.setAttribute("aria-live","polite"),E.hidden=true,o.appendChild(E);let L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-overlay pptxv-error");L.setAttribute("role","alert");let M=chunkOBVLNSK5_cjs.w(e,"div","pptxv-error-message");return L.appendChild(M),L.hidden=true,o.appendChild(L),{root:o,ribbon:i,titleBar:r,inspector:S,accessibility:g,shortcuts:x,masterSidebar:b,thumbnails:v,viewport:f,stageWrap:y,notes:C,statusBar:w,mobileToolbar:u,mobileActionSheets:d,presentationTouchControls:P,presentationToolbar:k,setLoading(D){E.hidden=!D,o.setAttribute("aria-busy",String(D));},setError(D){L.hidden=D===null,M.textContent=D??"";},setEmpty(D){h.hidden=!D,y.hidden=D;},setPresenting(D){o.classList.toggle("pptxv-presenting",D),k.setPresenting(D);},setQuickAccessPosition(D){if(!(!r||!s))if(D==="below"){let I=r.getQuickAccessElement();s.appendChild(I),a=true,s.hidden=I.hidden,r.setQuickAccessDetached(true);}else a=false,r.dockQuickAccessElement(),s.hidden=true,r.setQuickAccessDetached(false);},setProtectedView(D){l?.setActive(D);},setReadOnlyRecommendation(D,I,R){p?.update(D,I,R);},setCompatToasts(D,I){A.update(D,I);},setRunProgramNotices(D){T.update(D);}}}async function lo(e,t={}){let{default:n}=await import('html2canvas-pro'),o=t.onclone;return n(e,{...t,onclone:async(r,i)=>{await chunk24B6ZCFG_cjs.vt(e,r,i),typeof o=="function"&&o(r,i);}})}function pl(e,t){return chunk24B6ZCFG_cjs.ee(e,t)}function fP(e,t){pl(e,t)?.dispatchEvent(new MouseEvent("dblclick",{bubbles:true,cancelable:true}));}function vP(e){return (t,n)=>lo(e,{scale:n.width/(t.width||1),x:t.x,y:t.y,width:t.width,height:t.height,useCORS:true,allowTaint:true,backgroundColor:null,logging:false})}function hP(e,t,n){let o=pl(e,n);if(!o)return;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=J(t.get(),n);chunk24B6ZCFG_cjs.Ut(o,i,s,e,chunk24B6ZCFG_cjs.Tt(a?.name,"Picture"),{scale:2,html2canvasFallback:vP(o)});}async function Zr(e,t,n){let o=pl(e,t);if(!o)return null;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=await chunk24B6ZCFG_cjs.Vt(o,i,s,e,{scale:2,html2canvasFallback:vP(o)});return chunk24B6ZCFG_cjs._l(n,a)}function Jr(e,t,n){t.set({inspectorOpen:true}),requestAnimationFrame(()=>{requestAnimationFrame(()=>chunk24B6ZCFG_cjs.Xl(e,n));});}function ei(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 cl(e,t,n){if(t?.type!=="table"||!t.tableData)return null;let o=ei(n)??e.selectedTableCell;if(!o)return null;let r=t.tableData.rows[o.row]?.cells[o.column];return {cell:o,context:{hasMultiCellSelection:chunk24B6ZCFG_cjs.Tl(e.selectedTableCells.map(({row:i,column:s})=>({row:i,col:s})),t.tableData),isMergedCell:(r?.gridSpan??1)>1||(r?.rowSpan??1)>1}}}function yP(e,t,n){e.mergeTableCells([t,n==="right"?{row:t.row,column:t.column+1}:{row:t.row+1,column:t.column}]);}function ml(e,t,n){let o=t.getEditActions(),r=n?.cell??null,i=chunk24B6ZCFG_cjs.Sl(e);if(i)return o.mergeShapes(i);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 "crop":return o.enterCropMode();case "comment":return t.openComments();case "hyperlink":return t.openHyperlink();case "ai-ask":return t.getAi()?.askAboutSelection();case "ai-fix":return sM(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?yP(o,r,"right"):void 0;case "table-merge-down":return r?yP(o,r,"down"):void 0;case "table-split":return r?o.splitTableCell(r):void 0;case "edit-text":return dl(t,s=>fP(t.doc,s));case "edit-points":return dl(t,s=>{t.startEditPoints?.(s);});case "save-as-picture":return dl(t,s=>hP(t.doc,t.store,s));case "edit-alt-text":return Jr(t.doc,t.store,chunk24B6ZCFG_cjs.Wl("edit-alt-text"));case "size-and-position":return Jr(t.doc,t.store,chunk24B6ZCFG_cjs.Wl("size-and-position"));case "format-shape":return Jr(t.doc,t.store,chunk24B6ZCFG_cjs.Wl("format-shape"))}}function dl(e,t){let n=e.store.get().selectedElementId;n&&t(n);}function sM(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 lM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk24B6ZCFG_cjs.ah({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=`${s}px`,e.style.top=`${a}px`;}function ul(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(d,u)=>{let m=chunkOBVLNSK5_cjs.w(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",()=>{s(),ml(d.id,e,u);}),m},l=(d,u,m,g)=>{r=chunkOBVLNSK5_cjs.w(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 b=chunkOBVLNSK5_cjs.w(t,"div","pptxv-context-menu-separator");b.setAttribute("role","separator"),r.appendChild(b);}r.appendChild(a(x,u));}(o.closest(".pptxv")??t.body).appendChild(r),lM(r,t,m,g),i=x=>{x instanceof KeyboardEvent&&x.key!=="Escape"||x.target instanceof Node&&r?.contains(x.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{let u=n.get(),m=e.getCustomization?.()??chunk24B6ZCFG_cjs.$q;if(!u.editable||u.presenting||!m.elementMenuEnabled)return;let g=chunk24B6ZCFG_cjs.Ll(chunk24B6ZCFG_cjs.Hm(d.target,e.getStageRoot()),d.target,u.selectedElementId);if(!g||!chunk24B6ZCFG_cjs.lo(g,u.editTemplateMode))return;d.preventDefault(),s(),u.selectedElementIds.includes(g)||e.selectElement(g);let x=ei(d.target);x&&!n.get().selectedTableCells.some(({row:y,column:h})=>y===x.row&&h===x.column)&&n.set({selectedTableCell:x,selectedTableCells:[x]});let b=n.get(),v=J(b,g)??null,f=cl(b,v,d.target),S=chunk24B6ZCFG_cjs.jr(chunk24B6ZCFG_cjs.Ul({elementType:v?.type??null,table:f?.context??null,hasMultiSelection:b.selectedElementIds.length>1,selectionGroupable:b.selectedElementIds.every(y=>chunk24B6ZCFG_cjs._e(J(b,y)??null,"group")),aiEnabled:e.getAi()!==null,hasClipboard:b.clipboardPayload!==null,editPoints:e.startEditPoints?chunk24B6ZCFG_cjs.Gs(v):void 0,canMergeShapes:chunk24B6ZCFG_cjs.Ml(b.selectedElementIds.map(y=>J(b,y))),canCrop:chunk24B6ZCFG_cjs._s(v)}),m);S.length>0&&l(S,f,d.clientX,d.clientY);};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function pM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk24B6ZCFG_cjs.ah({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=`${s}px`,e.style.top=`${a}px`;}function xl(e){let{doc:t,store:n,root:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=d=>{switch(d){case "next":e.next();break;case "previous":e.prev();break;case "seeAllSlides":e.showAllSlides();break;case "presenterView":e.togglePresenterView();break;case "pointerArrow":e.setPointerTool("none");break;case "pointerPen":e.setPointerTool("pen");break;case "pointerHighlighter":e.setPointerTool("highlighter");break;case "pointerLaser":e.setPointerTool("laser");break;case "eraseInk":e.eraseAnnotations();break;case "blankBlack":e.toggleBlank("black");break;case "blankWhite":e.toggleBlank("white");break;case "endShow":e.exitPresentation();break}},l=(d,u)=>{r=chunkOBVLNSK5_cjs.w(t,"div","pptxv-showmenu",{left:`${d}px`,top:`${u}px`}),r.dataset.pptxPresentationMenu="true",r.setAttribute("role","menu"),chunk24B6ZCFG_cjs.Vk({seeAllSlides:true,presenterView:true,pointerTools:true,eraseInk:true,blankBlack:true,blankWhite:true}).forEach((g,x)=>{if(x>0){let b=chunkOBVLNSK5_cjs.w(t,"hr","pptxv-showmenu-separator");b.setAttribute("role","separator"),r?.appendChild(b);}for(let b of g.items){let v=chunkOBVLNSK5_cjs.w(t,"button");v.type="button",v.setAttribute("role","menuitem"),v.dataset.itemId=b.id,v.textContent=e.getTranslator()(b.labelKey),v.addEventListener("click",()=>{s(),a(b.id);}),r?.appendChild(v);}}),o.appendChild(r),pM(r,t,d,u),i=g=>{g instanceof KeyboardEvent&&g.key!=="Escape"||g.target instanceof Node&&r?.contains(g.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{n.get().presenting&&(d.preventDefault(),s(),e.shouldShow()&&l(d.clientX,d.clientY));};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function gl(e,t){let n=chunk24B6ZCFG_cjs.el(),o=s=>{let a=t.isSlideShowStartEnabled?.()===false?null:chunk24B6ZCFG_cjs.El(s,{isPresenting:t.isPresenting?.()??false});if(a){s.preventDefault(),a==="fromBeginning"?t.startFromBeginning?.():t.startFromCurrent?.();return}let l=s.target;if(!(l&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(l.tagName))){if(t.isPresenting?.()){dM(s,t,n);return}switch(s.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}s.preventDefault();}},r=chunk24B6ZCFG_cjs.gb(),i=s=>{if(!t.isPresenting?.()||!chunk24B6ZCFG_cjs.Jk())return;let a=chunk24B6ZCFG_cjs.hb(s,r);a.intent==="next-slide"?(s.preventDefault(),t.next()):a.intent==="previous-slide"&&(s.preventDefault(),t.prev());};return e.addEventListener("keydown",o),e.addEventListener("wheel",i,{passive:false}),()=>{e.removeEventListener("keydown",o),e.removeEventListener("wheel",i);}}function dM(e,t,n){if(!chunk24B6ZCFG_cjs.Jk())return;let o=chunk24B6ZCFG_cjs.fl(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 cM=.1,mM=8;function bl(e,t){let n=chunk24B6ZCFG_cjs.sn({getScale:t.getScale,minScale:cM,maxScale:mM,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:a=>{t.isSwipeEnabled()&&(a===-1?t.onNext():t.onPrevious());}}}),o=a=>n.onTouchStart(a),r=a=>n.onTouchMove(a),i=a=>n.onTouchEnd(a),s=()=>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",s,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",s,true),n.cancel();}}function fl(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,s=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",s),{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",s);}}}var Ae=chunk24B6ZCFG_cjs.Zf,vl=chunk24B6ZCFG_cjs._f;function hl(e,t){let n=chunkOBVLNSK5_cjs.w(e,"div","pptxv-ruler-corner");n.setAttribute("aria-hidden","true");let o=chunkOBVLNSK5_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-h"});o.setAttribute("data-pptx-ruler","h"),o.setAttribute("role","presentation");let r=chunkOBVLNSK5_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-v"});r.setAttribute("data-pptx-ruler","v"),r.setAttribute("role","presentation");let i=false,s=1,a={width:0,height:0},l=null,p=(m,g)=>{i&&(g.stopPropagation(),g.preventDefault(),g.currentTarget?.setPointerCapture?.(g.pointerId),l=m);},d=(m,g)=>{let x=l;l=null;let b=g.currentTarget;if(x!==m||!i||!b)return;try{b.releasePointerCapture?.(g.pointerId);}catch{}let v=b.getBoundingClientRect(),f=m==="h"?g.clientY-v.top:g.clientX-v.left,S=chunk24B6ZCFG_cjs.ag(f,s,m==="h"?a.height:a.width);S!==null&&t(m,S);};o.addEventListener("pointerdown",m=>p("h",m)),o.addEventListener("pointerup",m=>d("h",m)),r.addEventListener("pointerdown",m=>p("v",m)),r.addEventListener("pointerup",m=>d("v",m));let u=(m,g,x,b)=>{let v=x*b.scale,f=g==="h";chunkOBVLNSK5_cjs.y(m,{width:f?v:Ae,height:f?Ae:v}),m.replaceChildren(),m.appendChild(chunkOBVLNSK5_cjs.x(e,"rect",{class:"pptxv-ruler-bg",width:f?v:Ae,height:f?Ae:v}));let S=b.selection;if(S){let y=(f?S.x:S.y)*b.scale,h=Math.max((f?S.width:S.height)*b.scale,1);m.appendChild(chunkOBVLNSK5_cjs.x(e,"rect",{class:"pptxv-ruler-highlight",x:f?y:0,y:f?0:y,width:f?h:Ae,height:f?Ae:h}));}for(let y of chunk24B6ZCFG_cjs.$f(x,b.scale,b.unit)){let h=Ae-Ae*(y.isMajor?.6:.3);if(m.appendChild(chunkOBVLNSK5_cjs.x(e,"line",{class:"pptxv-ruler-tick",x1:f?y.position:Ae,y1:f?Ae:y.position,x2:f?y.position:h,y2:f?h:y.position,"stroke-width":y.isMajor?1:.5})),!y.label)continue;let C=chunkOBVLNSK5_cjs.x(e,"text",{class:"pptxv-ruler-label",x:f?y.position+2:2,y:f?vl+1:y.position+vl+2,"font-size":vl});C.textContent=y.label,m.appendChild(C);}m.appendChild(chunkOBVLNSK5_cjs.x(e,"line",{class:"pptxv-ruler-edge",x1:f?0:Ae-.5,y1:f?Ae-.5:0,x2:f?v:Ae-.5,y2:f?Ae-.5:v}));};return {mount(m){n.parentNode!==m&&m.append(n,o,r);},update(m){i=m.draggable,s=m.scale,a=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 uM(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 yl(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:s}=e,a=()=>e.getCustomization?.()??chunk24B6ZCFG_cjs.$q,l=ll(t,o,{...JC(a()),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:xM(e),hiddenActions:r.hiddenActions,quickAccess:{getState:()=>ew(e.getQuickAccessOptions(),a()),run:uM(e),screenTip:M=>e.quickAccessScreenTip(M)}},accountAuth:r.accountAuth,presentationToolbarHandlers:{setTool:M=>e.setPresentationPointerTool?.(M),setColor:M=>e.setPresentationPointerColor?.(M),toggleBlackboard:()=>e.togglePresentationBlackboard?.(),clearAnnotations:()=>e.erasePresentationAnnotations?.(),togglePresenterView:()=>e.togglePresenterView?.()},onEnableEditing:()=>e.enableEditingFromProtectedView(),onEditAnywayFromReadOnly:()=>e.editAnywayFromReadOnlyRecommendation(),onDismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),onSubmitReadOnlyPassword:M=>e.submitReadOnlyPassword(M),onCancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),onDismissCompatToast:M=>e.dismissCompatToast(M),onDismissAllCompatToasts:()=>e.dismissAllCompatToasts(),onDismissRunProgramNotice:M=>e.dismissRunProgramNotice(M),thumbnailMenu:{store:i,getEditActions:()=>e.getEditActions(),addSlideAfter:M=>e.addSlide(M),duplicateSlides:M=>e.duplicateSlides(M),deleteSlides:M=>e.deleteSlides(M),toggleHideSlides:M=>e.toggleHideSlides(M)},...ZC(e)}),p=Ro(l.root,e.initialTheme??r.theme,[]);n.appendChild(l.root),l.statusBar?.setNotesExpanded(i.get().notesExpanded),l.statusBar?.setDirty(i.get().dirty),l.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),l.titleBar?.setDirty(i.get().dirty),l.setProtectedView(i.get().protectedView),l.setReadOnlyRecommendation(i.get().readOnlyRecommendation,i.get().readOnlyBannerDismissed,{promptOpen:i.get().readOnlyPasswordPromptOpen,error:i.get().readOnlyPasswordError,checking:i.get().readOnlyCheckingPassword}),l.setCompatToasts(i.get().compatToasts,i.get().inspectorOpen?chunk24B6ZCFG_cjs.Ko:0),l.setRunProgramNotices(i.get().runProgramNotices);let d=gl(l.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:()=>l.presentationToolbar.toggleVisible(),showAllSlides:e.showPresentationAllSlides,startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),isSlideShowStartEnabled:()=>chunk24B6ZCFG_cjs.cr(a(),"presentMode")}),u=bl(l.root,{getScale:()=>s.effectiveScale(),onPinchZoom:M=>e.setZoom(M),isSwipeEnabled:()=>{let M=i.get();return M.presenting||!M.editable},onNext:()=>{let M=i.get();as({presenting:M.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:M.slides[M.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),m=t.createElement("button");m.type="button",m.setAttribute("data-pptx-end-of-show",""),m.className="pptxv-presentation-end",Object.assign(m.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let g=t.createElement("span");Object.assign(g.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),g.textContent=o("pptx.presentation.endOfSlideShow"),m.appendChild(g),m.addEventListener("click",M=>{M.stopPropagation(),e.next();});let x=()=>{let M=i.get(),D=M.presenting&&M.endOfShow;D&&m.parentElement!==l.root?l.root.appendChild(m):!D&&m.parentElement&&m.remove();},b=i.subscribe(x);x();let v=null,f=i.subscribe((M,D)=>{M.presenting&&M.currentSlide!==D.currentSlide&&(v=D.currentSlide),D.presenting&&!M.presenting&&(v=null);}),S=aw(i,M=>e.goToSlide(M)),y=ow({goToSlide:M=>e.goToSlide(M),next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),confirmExternalHyperlink:e.confirmExternalHyperlink,getStageRoot:()=>l.stageWrap,getPreviousPresentedSlide:()=>v,getCurrentSlide:()=>{let M=i.get();return M.slides[M.currentSlide]},customShowRunner:S,addRunProgramNotice:M=>e.addRunProgramNotice(M)}),h=M=>{let D=i.get();!D.presenting||!(M.target instanceof Element)||!M.target.closest(".pptxv-stage")||!nw({target:M.target,presenting:D.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:D.slides[D.currentSlide],slideCount:D.slides.length,runner:y})||e.next();};l.root.addEventListener("click",h);let C=M=>{if(!(M.target instanceof Element))return;let D=M.target.closest("a.pptxv-link"),I=D?.getAttribute("href");!D||!I||(M.preventDefault(),(e.confirmExternalHyperlink?.(I)??true)&&chunk24B6ZCFG_cjs.ad(I));};l.root.addEventListener("click",C);let w=rw({getState:()=>i.get(),subscribe:M=>i.subscribe(M),next:()=>e.next()}),P=iw({getPresenting:()=>i.get().presenting,subscribe:M=>i.subscribe(M),root:l.root,cancelAutoAdvance:w.cancel,rearmAutoAdvance:w.rearm}),k=xl({doc:t,store:i,root:l.root,getTranslator:()=>e.t,shouldShow:()=>e.shouldShowPresentationContextMenu?.()??true,next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),showAllSlides:()=>e.showPresentationAllSlides?.(),togglePresenterView:()=>e.togglePresenterView?.(),setPointerTool:M=>e.setPresentationPointerTool?.(M),eraseAnnotations:()=>e.erasePresentationAnnotations?.(),toggleBlank:M=>e.togglePresentationBlank?.(M)}),A=()=>{l.root.removeEventListener("click",h),l.root.removeEventListener("click",C),w.detach(),P(),b(),f(),S.dispose(),m.remove(),k.destroy();},T={current:void 0},E=fl(l.root,M=>{if(!M&&i.get().presenting&&e.classifyPresentationExit?.()==="restore-show"){T.current?.enter();return}i.set({presenting:M});});T.current=E;let L=null;return typeof ResizeObserver<"u"&&(L=new ResizeObserver(()=>{i.get().zoom==="fit"&&s.renderStage();}),L.observe(l.viewport)),{chrome:l,presentation:E,detachKeyboard:d,detachTouchGestures:u,detachPresentationClick:A,resizeObserver:L,appliedThemeVars:p}}function xM(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function Sl(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function Cl(e){return {doc:e.doc,container:e.container,t:e.t,options:e.getChromeOptions(),getCustomization:()=>e.getResolvedCustomization(),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(e.firstShowSlideIndex()),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(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),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 chunk24B6ZCFG_cjs.Ci(t.slides[t.currentSlide])},readTransition:()=>{let t=e.store.get();return t.slides[t.currentSlide]?.transition},presentationProperties:()=>e.store.get().presentationProperties,save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),addSlide:t=>e.addSlide(t),duplicateSlides:t=>e.duplicateSlides(t),deleteSlides:t=>e.deleteSlides(t),toggleHideSlides:t=>e.toggleHideSlides(t),goToFirstSlide:()=>e.goToFirstSlide(),goToLastSlide:()=>e.goToLastSlide(),firstShowSlideIndex:()=>e.firstShowSlideIndex(),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(),shouldShowPresentationContextMenu:()=>e.shouldShowPresentationContextMenu(),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=chunk24B6ZCFG_cjs.Uk(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(),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t),armFreeformTool:t=>e.editor.armFreeformTool(t),getQuickAccessOptions:()=>e.getQuickAccessOptions(),quickAccessScreenTip:t=>e.quickAccessScreenTip(t),enableEditingFromProtectedView:()=>e.enableEditingFromProtectedView(),editAnywayFromReadOnlyRecommendation:()=>e.editAnywayFromReadOnlyRecommendation(),dismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),submitReadOnlyPassword:t=>e.submitReadOnlyPassword(t),cancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),dismissCompatToast:t=>e.dismissCompatToast(t),dismissAllCompatToasts:()=>e.dismissAllCompatToasts(),addRunProgramNotice:t=>e.addRunProgramNotice(t),dismissRunProgramNotice:t=>e.dismissRunProgramNotice(t),confirmExternalHyperlink:t=>e.confirmExternalHyperlink(t)}}function gM(e,t){let{width:n,height:o}=chunk24B6ZCFG_cjs.st(e.width,e.height,t),r=e;if(n!==e.width||o!==e.height){let s=e.ownerDocument.createElement("canvas");s.width=n,s.height=o;let a=s.getContext("2d");if(!a)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");a.drawImage(e,0,0,n,o),r=s;}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 wl(e,t={}){let{slideDurationMs:n=2e3,slideTimingsMs:o,maxDimension:r=chunk24B6ZCFG_cjs.rt,onProgress:i,signal:s}=t,a=e.store.get().slides.length;if(a===0)return;let l=chunk24B6ZCFG_cjs.qt({totalSlides:a,slideDurationMs:n,slideTimingsMs:o}),p=[];for(let m of l){if(s?.aborted)throw chunk24B6ZCFG_cjs.uj();i?.(m.slideIndex,a);let g=await e.rasterizeSlide(m.slideIndex);p.push({...gM(g,r),delayCs:m.delayCs});}let d=chunk24B6ZCFG_cjs.tt(p,l[0].delayCs);i?.(a,a);let u=new ArrayBuffer(d.byteLength);new Uint8Array(u).set(d),chunk24B6ZCFG_cjs.mt(new Blob([u],{type:"image/gif"}),`${e.baseName}.gif`);}function bM(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 Ht(e="en",t){let n=t?.[e],o=e!=="en"?t?.en:void 0;return (r,i)=>{let s=n?.[r]??o?.[r]??chunkOBVLNSK5_cjs.C[r]??chunkOBVLNSK5_cjs.D(r);return bM(s,i)}}function ti(e,t,n,o={}){return chunk24B6ZCFG_cjs.U.exportSlide(e,t,n,o)}function SP(e,t={}){return chunk24B6ZCFG_cjs.U.exportAll(e,t)}async function Tl(e,t={}){let{onProgress:n,signal:o,openPrintWindow:r,...i}=t,s=r??chunk24B6ZCFG_cjs.Ht,a=e.store.get(),l=a.slides,p=chunk24B6ZCFG_cjs.wt(i,l.length),d=chunk24B6ZCFG_cjs.zt(p.colorMode),u=chunk24B6ZCFG_cjs.yt(chunk24B6ZCFG_cjs.xt(p.slideRange,a.currentSlide,l.length,p.customRangeFrom,p.customRangeTo),l,e.getIncludeHiddenSlides?.()??false);if(p.printWhat==="outline"){let y=`<div class="outline-page">${chunk24B6ZCFG_cjs.Bt(u,l)}</div>`;return s(El("Outline",y,p,d))}if(u.length===0)return false;if(p.printWhat==="slides"){let{width:y,height:h}=a.canvasSize,C=[];for(let w=0;w<u.length;w++){if(o?.aborted)throw chunk24B6ZCFG_cjs.uj();n?.(w,u.length),C.push(ti(l[u[w]],y,h));}return n?.(u.length,u.length),s(chunk24B6ZCFG_cjs.ut(C,y,h,{title:"Slides (Vector)",orientation:p.orientation,colorFilter:d,scaleToFit:p.scaleToFit}))}let m=e.getTranslator?.()??Ht(),g=r?void 0:chunk24B6ZCFG_cjs.Ft(m("pptx.print.preparingToPrint"));if(!r&&!g)return false;let x=e.getPrintHighQuality?.()?2:1,b=[];for(let y=0;y<u.length;y++){if(o?.aborted)throw g?.close(),chunk24B6ZCFG_cjs.uj();n?.(y,u.length);let h=await e.rasterizeSlide(u[y],x);b.push(h.toDataURL("image/png"));}n?.(u.length,u.length);let v=y=>g?(chunk24B6ZCFG_cjs.Gt(g,y),true):s(y);if(p.printWhat==="notes"){let y=chunk24B6ZCFG_cjs.Ct(b,u,l);return v(El("Notes Pages",y,p,d))}let f=chunk24B6ZCFG_cjs.Dt(b,u,p.slidesPerPage,a.handoutMaster),S=`Handout ${p.slidesPerPage} per page`;return v(El(S,f,p,d))}function El(e,t,n,o){return chunk24B6ZCFG_cjs.Et({title:e,bodyHtml:t,orientation:n.orientation,colorFilter:o,frameSlides:n.frameSlides,scaleToFit:n.scaleToFit})}function fM(e){return new Promise(t=>{setTimeout(t,e);})}async function vM(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:chunk24B6ZCFG_cjs.Kt([...chunk24B6ZCFG_cjs.Jt]),videoBitsPerSecond:t.videoBitsPerSecond}),s=[];i.ondataavailable=l=>{l.data.size>0&&s.push(l.data);};let a=new Promise((l,p)=>{i.onstop=()=>{l();},i.onerror=()=>{p(new Error("[pptx-vanilla-viewer] video export failed: MediaRecorder error"));};});i.start();try{let l=chunk24B6ZCFG_cjs.It({totalSlides:e.length,slideDurationMs:t.slideDurationMs,slideTimingsMs:t.slideTimingsMs,fps:t.fps}),p=chunk24B6ZCFG_cjs.Lt(t.fps);for(let d of l){t.onRecordProgress?.(d.slideIndex,l.length);for(let u=0;u<d.frameCount;u++){if(t.signal?.aborted)throw i.stop(),chunk24B6ZCFG_cjs.uj();o.drawImage(e[d.slideIndex],0,0),await t.waitMs(p);}}return i.stop(),await a,new Blob(s,{type:"video/webm"})}finally{chunk24B6ZCFG_cjs.Mt(r);}}async function Pl(e,t={}){let{slideDurationMs:n=3e3,slideTimingsMs:o,fps:r=30,videoBitsPerSecond:i=5e6,onProgress:s,onRecordProgress:a,signal:l}=t,p=e.store.get().slides.length;if(p===0)return;let d=[];for(let m=0;m<p;m++){if(l?.aborted)throw chunk24B6ZCFG_cjs.uj();s?.(m,p),d.push(await e.rasterizeSlide(m));}let u=await vM(d,{slideDurationMs:n,slideTimingsMs:o,fps:r,videoBitsPerSecond:i,onRecordProgress:a,signal:l,waitMs:e.waitMs??fM});s?.(p,p),chunk24B6ZCFG_cjs.mt(u,`${e.baseName}.webm`);}function hM(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,tableStylesDefaultId:e.tableStylesDefaultId,tags:e.tagCollections,theme:e.colorScheme||e.fontScheme||e.themeName?{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme}:void 0}}function Al(e){let t=false,n={store:e.store,rasterizeSlide:e.rasterizeSlide,rasterizeSlideToRaster:e.rasterizeSlideToRaster,baseName:chunk24B6ZCFG_cjs.lt(e.fileName),getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality};async function o(p,d){if(t)return p;t=true;try{return await d()}finally{t=false;}}async function r(p){if(e.rasterizeSlideToRaster)return e.rasterizeSlideToRaster(p);let d=await e.rasterizeSlide(p);return {kind:"canvas",canvas:d,strategy:"html2canvas",width:d.width,height:d.height}}async function i(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length))return o(void 0,async()=>{let m=await r(u);chunk24B6ZCFG_cjs.nt(await chunk24B6ZCFG_cjs.St(m),`${n.baseName}-slide-${u+1}.png`);})}async function s(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length||typeof ClipboardItem>"u"||!navigator.clipboard?.write))return o(void 0,async()=>{let m=await r(u),g=await chunk24B6ZCFG_cjs.Rt(m);await navigator.clipboard.write([new ClipboardItem({"image/png":g})]);})}async function a(p={}){let d=e.store.get();if(d.slides.length===0)return;let{onProgress:u,signal:m}=p;return o(void 0,async()=>{let{jsPDF:g}=await import('jspdf'),{width:x,height:b}=d.canvasSize,v=x>=b?"landscape":"portrait",f=new g({orientation:v,unit:"px",format:[x,b],compress:!0}),S=d.slides.length;for(let y=0;y<S;y++){if(m?.aborted)throw chunk24B6ZCFG_cjs.uj();if(u?.(y,S),y>0&&f.addPage([x,b],v),e.rasterizeSlideToTiles){let h=await e.rasterizeSlideToTiles(y);for(let C of h.tiles){let w=chunk24B6ZCFG_cjs.Pt(C,h.fullWidth,h.fullHeight,x,b);f.addImage(C.canvas.toDataURL("image/png"),"PNG",w.x,w.y,w.width,w.height);}}else {let h=await e.rasterizeSlide(y);f.addImage(h.toDataURL("image/png"),"PNG",0,0,x,b);}}f.save(`${n.baseName}.pdf`);})}function l(){chunk24B6ZCFG_cjs.pt(hM(e.store.get()),e.fileName);}return {exportSlidePng:i,copySlideAsImage:s,exportPdf:a,exportJson:l,exportGif:p=>o(void 0,()=>wl(n,p)),exportVideo:p=>o(void 0,()=>Pl(n,p)),print:p=>o(false,()=>Tl(n,p))}}function kl(e){let{doc:t}=e,n=null,o=null,r=null,i=null,s=null,a=()=>{let p=e.getTranslator();n=chunkOBVLNSK5_cjs.w(t,"div","pptxv-export-progress-backdrop"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let d=chunkOBVLNSK5_cjs.w(t,"div","pptxv-export-progress-panel");o=chunkOBVLNSK5_cjs.w(t,"h3");let u=chunkOBVLNSK5_cjs.w(t,"div","pptxv-export-progress-track");r=chunkOBVLNSK5_cjs.w(t,"div","pptxv-export-progress-fill"),u.appendChild(r);let m=chunkOBVLNSK5_cjs.w(t,"div","pptxv-export-progress-status");i=chunkOBVLNSK5_cjs.w(t,"span"),s=chunkOBVLNSK5_cjs.w(t,"span","pptxv-export-progress-pct"),m.append(i,s);let g=chunkOBVLNSK5_cjs.w(t,"div","pptxv-export-progress-actions"),x=chunkOBVLNSK5_cjs.w(t,"button");x.type="button",x.textContent=p("pptx.export.cancel"),x.addEventListener("click",()=>e.onCancel()),g.appendChild(x),d.append(o,u,m,g),n.appendChild(d),t.body.appendChild(n);},l=(p,d)=>{let u=chunk24B6ZCFG_cjs.qj(p);r&&(r.style.width=`${u}%`),i&&(i.textContent=d),s&&(s.textContent=`${u}%`);};return {open(p,d){this.close(),a(),n?.setAttribute("aria-label",p),o&&(o.textContent=p),l(0,d);},update(p,d){l(p,d);},close(){n?.remove(),n=null,o=null,r=null,i=null,s=null;}}}function Il(e){let t=null,n=s=>e.getTranslator()(s),o=(s,a)=>{let l=new AbortController;return t=l,a&&(a.aborted?l.abort():a.addEventListener("abort",()=>l.abort(),{once:true})),e.modal.open(s,n("pptx.export.capturingSlides")),l},r=()=>{t=null,e.modal.close();},i=(s,a)=>{chunk24B6ZCFG_cjs.vj(a)||console.error(`[pptx-vanilla-viewer] ${s} export failed:`,a);};return {async runPdf(s={}){let a=o(n("pptx.ribbon.exportPdf"),s.signal);try{await e.controller.exportPdf({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunk24B6ZCFG_cjs.rj(l,p),chunk24B6ZCFG_cjs.tj(n("pptx.export.rendering"),l,p));}}),e.modal.update(chunk24B6ZCFG_cjs.oj,n("pptx.export.buildingPdf")),e.modal.update(chunk24B6ZCFG_cjs.pj,n("pptx.export.buildingPdf"));}catch(l){i("PDF",l);}finally{r();}},async runGif(s={}){let a=o(n("pptx.ribbon.exportGif"),s.signal);try{await e.controller.exportGif({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunk24B6ZCFG_cjs.rj(l,p),chunk24B6ZCFG_cjs.tj(n("pptx.export.encoding"),l,p));}}),e.modal.update(chunk24B6ZCFG_cjs.pj,n("pptx.export.savingFile"));}catch(l){i("GIF",l);}finally{r();}},async runVideo(s={}){let a=o(n("pptx.ribbon.exportVideo"),s.signal);try{await e.controller.exportVideo({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunk24B6ZCFG_cjs.rj(l,p,45),chunk24B6ZCFG_cjs.tj(n("pptx.export.capturing"),l,p));},onRecordProgress:(l,p)=>{s.onRecordProgress?.(l,p),e.modal.update(chunk24B6ZCFG_cjs.sj(l,p),chunk24B6ZCFG_cjs.tj(n("pptx.export.recording"),l,p));}}),e.modal.update(chunk24B6ZCFG_cjs.pj,n("pptx.export.savingFile"));}catch(l){i("Video",l);}finally{r();}},cancel(){t?.abort(),t=null,e.modal.close();}}}function oi(e,t){return chunk24B6ZCFG_cjs.Dg({headerFooter:e.headerFooter,customProperties:e.customProperties,slide:t})}function yM(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()));})}function Ll(e){let t=chunkOBVLNSK5_cjs.w(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??yM;async function o(a,l){let p=e.store.get(),d=p.slides[a];if(!d)throw new Error(`Export failed: no slide at index ${a}`);t.replaceChildren();let u=chunkOBVLNSK5_cjs.A({document:e.doc,slide:d,canvasSize:p.canvasSize,mediaDataUrls:p.mediaDataUrls,fieldContext:oi(p,d),registry:e.registry,t:e.getTranslator(),scale:1,smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:false});t.appendChild(u),await n();let m=2*e.getImageResolutionScale()*l;return {stage:u,naturalWidth:p.canvasSize.width,naturalHeight:p.canvasSize.height,scale:m,html2canvasFallback:(g,x)=>lo(u,{backgroundColor:"#ffffff",scale:x.width/(g.width||1),x:g.x,y:g.y,width:g.width,height:g.height,logging:false})}}async function r(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return chunk24B6ZCFG_cjs.Ot(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})}async function i(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return chunk24B6ZCFG_cjs.Nt(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})}async function s(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:m,html2canvasFallback:g}=await o(a,l);return (await chunk24B6ZCFG_cjs.Qt(p,d,u,e.doc,{scale:m,backgroundColor:"#ffffff",html2canvasFallback:g})).canvas}return {rasterizeSlide:s,rasterizeSlideToRaster:r,rasterizeSlideToTiles:i,destroy(){t.remove();}}}var Wo=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 Ml(e){let t=Ll(e),n=Al({store:e.store,rasterizeSlide:t.rasterizeSlide,rasterizeSlideToRaster:t.rasterizeSlideToRaster,rasterizeSlideToTiles:t.rasterizeSlideToTiles,fileName:e.fileName,getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality}),o=kl({doc:e.doc,getTranslator:e.getTranslator,onCancel:()=>r.cancel()}),r=Il({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();}}}var ni=class extends Wo{get customizationApi(){return this.customization.controller.api}getCustomization(){return this.customizationApi.getCustomization()}setCustomization(t){this.customizationApi.setCustomization(t);}updateCustomization(t){this.customizationApi.updateCustomization(t);}resetCustomization(){this.customizationApi.resetCustomization();}hideRibbonTab(t){this.customizationApi.hideRibbonTab(t);}showRibbonTab(t){this.customizationApi.showRibbonTab(t);}hideRibbonGroup(t){this.customizationApi.hideRibbonGroup(t);}showRibbonGroup(t){this.customizationApi.showRibbonGroup(t);}hideToolbarButton(t){this.customizationApi.hideToolbarButton(t);}showToolbarButton(t){this.customizationApi.showToolbarButton(t);}hideRibbonControl(t){this.customizationApi.hideRibbonControl(t);}showRibbonControl(t){this.customizationApi.showRibbonControl(t);}hideOptionsPage(t){this.customizationApi.hideOptionsPage(t);}showOptionsPage(t){this.customizationApi.showOptionsPage(t);}hideOptionsSection(t){this.customizationApi.hideOptionsSection(t);}showOptionsSection(t){this.customizationApi.showOptionsSection(t);}hideSetting(t){this.customizationApi.hideSetting(t);}showSetting(t){this.customizationApi.showSetting(t);}lockSetting(t,n,o){this.customizationApi.lockSetting(t,n,o);}unlockSetting(t){this.customizationApi.unlockSetting(t);}setSettingDefault(t,n){this.customizationApi.setSettingDefault(t,n);}hideBackstagePage(t){this.customizationApi.hideBackstagePage(t);}showBackstagePage(t){this.customizationApi.showBackstagePage(t);}hideBackstageCard(t){this.customizationApi.hideBackstageCard(t);}showBackstageCard(t){this.customizationApi.showBackstageCard(t);}hideContextMenuCommand(t){this.customizationApi.hideContextMenuCommand(t);}showContextMenuCommand(t){this.customizationApi.showContextMenuCommand(t);}hideCanvasContextMenuCommand(t){this.customizationApi.hideCanvasContextMenuCommand(t);}showCanvasContextMenuCommand(t){this.customizationApi.showCanvasContextMenuCommand(t);}disableShortcut(t){this.customizationApi.disableShortcut(t);}enableShortcut(t){this.customizationApi.enableShortcut(t);}remapShortcut(t,n){this.customizationApi.remapShortcut(t,n);}setPanelVisible(t,n){this.customizationApi.setPanelVisible(t,n);}setFeatureEnabled(t,n){this.customizationApi.setFeatureEnabled(t,n);}setDialogAvailable(t,n){this.customizationApi.setDialogAvailable(t,n);}};function Dl(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let s=t.readInlineList?.();if(s?.kind==="unsupported")return;let a=s?.kind==="supported"&&s.snapshot.elementId===r?s.snapshot:void 0,l=a?{...i,text:a.text,textSegments:a.textSegments}:i,p=n(l,a);if(Object.keys(p).length!==0){if(a&&chunk24B6ZCFG_cjs.e(l)&&("textStyle"in p||"textSegments"in p)){let d=Object.fromEntries(Object.entries(p.textStyle??{}).filter(([g,x])=>x!==l.textStyle?.[g])),u=("textSegments"in p?p.textSegments:a.textSegments)?.map(g=>chunk24B6ZCFG_cjs.dg(g,d)),m=chunk24B6ZCFG_cjs.Ch(u);if(m!==a.text)t.cancelInlineList?.();else if(!t.formatInlineList?.({elementId:r,text:m,textSegments:u}))return;p={...p,text:m,textSegments:u};}t.pushHistory(),e.set(Z(o,U(o).map(d=>d.id===r?{...d,...p}:d))),t.commitChange();}}}function Rl(e){let{store:t,ops:n}=e,o=(i,s)=>{let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l?.animations?.some(d=>d.elementId===i))return;let p=s(l.animations);n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(a.slides,a.currentSlide,{animations:p})}),n.commitChange();},r=()=>t.get().slides[t.get().currentSlide]?.animationTimelineAnchors??[];return {addAnimation(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let d=chunk24B6ZCFG_cjs.Zc(p.animations??[],l,i,s);n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(a.slides,a.currentSlide,{animations:d})}),n.commitChange();},removeAnimation(){let i=t.get(),s=i.selectedElementId,a=i.slides[i.currentSlide];if(!i.editable||!s||!a?.animations?.length)return;let l=chunk24B6ZCFG_cjs._c(a.animations,s);l.length!==a.animations.length&&(n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(i.slides,i.currentSlide,{animations:l})}),n.commitChange());},setAnimationEffect(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let u=(i==="entrance"?chunk24B6ZCFG_cjs.Nc:i==="exit"?chunk24B6ZCFG_cjs.Oc:chunk24B6ZCFG_cjs.Pc)(p.animations??[],l,s);n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(a.slides,a.currentSlide,{animations:u})}),n.commitChange();},applyMotionPath(i){if(i==="custom")return;let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=l.animations??[],d=i==="none"?chunk24B6ZCFG_cjs.ce(p,a):chunk24B6ZCFG_cjs.be(p,a,i);n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(s.slides,s.currentSlide,{animations:d})}),n.commitChange();},setMotionPathData(i){let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=chunk24B6ZCFG_cjs.ae(l.animations??[],a,i);n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(s.slides,s.currentSlide,{animations:p})}),n.commitChange();},setAnimationTiming(i,s){o(i,a=>{let l=[...a];return s.durationMs!==void 0&&(l=chunk24B6ZCFG_cjs.Sc(l,i,s.durationMs)),s.delayMs!==void 0&&(l=chunk24B6ZCFG_cjs.Tc(l,i,s.delayMs)),s.trigger!==void 0&&(l=chunk24B6ZCFG_cjs.Qc(l,i,s.trigger)),s.direction!==void 0&&(l=chunk24B6ZCFG_cjs.Vc(l,i,s.direction)),s.sequence!==void 0&&(l=chunk24B6ZCFG_cjs.Wc(l,i,s.sequence)),s.timingCurve!==void 0&&(l=chunk24B6ZCFG_cjs.Uc(l,i,s.timingCurve)),s.repeatCount!==void 0&&(l=chunk24B6ZCFG_cjs.Xc(l,i,s.repeatCount)),s.repeatMode!==void 0&&(l=chunk24B6ZCFG_cjs.Yc(l,i,s.repeatMode)),s.triggerShapeId!==void 0&&(l=chunk24B6ZCFG_cjs.Rc(l,i,s.triggerShapeId||void 0)),s.triggerBookmark!==void 0&&(l=chunk24B6ZCFG_cjs.hd(l,i,s.triggerBookmark)),s.afterAnimation!==void 0&&(l=chunk24B6ZCFG_cjs.sd(l,i,s.afterAnimation)),s.afterAnimationColor!==void 0&&(l=chunk24B6ZCFG_cjs.td(l,i,s.afterAnimationColor)),l});},setAnimationSound(i,s){o(i,a=>chunk24B6ZCFG_cjs.qd(a,i,s));},setAnimationStockSound(i,s){o(i,a=>chunk24B6ZCFG_cjs.pd(a,i,s));},reorderAnimation(i,s){o(i,a=>chunk24B6ZCFG_cjs.ld(a,r(),i,s==="up"?-1:1));},moveAnimation(i,s){o(i,a=>{let l=chunk24B6ZCFG_cjs.id(a,r()),p=chunk24B6ZCFG_cjs.jd(l,`editor:${i}`,s);return chunk24B6ZCFG_cjs.kd(a,p)});}}}function CP(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 Ol(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return CP(e,chunk24B6ZCFG_cjs.Me(r,n))}function Hl(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return CP(e,chunk24B6ZCFG_cjs.Ne(r,n))}function Fl(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 ri(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function Vl(e,t,n){return t.map(r=>e.find(i=>i.id===r)).every(r=>chunk24B6ZCFG_cjs._e(r,"group"))?chunk24B6ZCFG_cjs.o(e,t,n):{elements:[...e],groupId:null}}function Bl(e,t,n,o=false){let r=e.find(i=>i.id===t);return chunk24B6ZCFG_cjs._e(r,"group")?chunk24B6ZCFG_cjs.p(e,t,n,{intoTemplate:o}):{elements:[...e],childIds:[]}}function zl(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let s=t.get(),a=s.selectedElementId;if(!s.editable||!a)return;let l=lP(s,a);i(l,a)!==l&&(n.pushHistory(),t.set(pP(s,a,i(l,a))),n.commitChange());};return {bringForward:()=>r(chunk24B6ZCFG_cjs.wf),sendBackward:()=>r(chunk24B6ZCFG_cjs.xf),bringToFront:()=>r(chunk24B6ZCFG_cjs.uf),sendToBack:()=>r(chunk24B6ZCFG_cjs.vf),alignElements(i){let s=t.get();if(s.selectedElementIds.length<2){o(a=>Fl(a,i,s.canvasSize));return}n.pushHistory(),t.set(Z(s,Ol(U(s),s.selectedElementIds,i))),n.commitChange();},distributeElements(i){let s=t.get();!s.editable||s.selectedElementIds.length<3||(n.pushHistory(),t.set(Z(s,Hl(U(s),s.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>ri(i,"horizontal")),flipVertical:()=>o(i=>ri(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let s=Vl(U(i),i.selectedElementIds,i.editTemplateMode?chunk24B6ZCFG_cjs.vl(true,i.selectedElementIds[0]):chunk24B6ZCFG_cjs.ul());s.groupId&&(n.pushHistory(),t.set({...Z(i,s.elements),selectedElementId:s.groupId,selectedElementIds:[s.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),s=i.selectedElementId,a=U(i),l=n.selectedElement(i);if(!i.editable||!s||!a||!l||l.type!=="group")return;let p=l.children.map(u=>i.editTemplateMode?chunk24B6ZCFG_cjs.vl(true,u.id||l.id):chunk24B6ZCFG_cjs.ul()),d=Bl(a,s,p,i.editTemplateMode);d.childIds.length!==0&&(n.pushHistory(),t.set({...Z(i,d.elements),selectedElementId:d.childIds.at(-1)??null,selectedElementIds:d.childIds}),n.commitChange());}}}function Nl(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:wP(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(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:wP(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}},setHideBackgroundGraphics(o){let r=t.get();!r.editable||r.masterViewTarget||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Pr(r.slides,r.currentSlide,{showMasterShapes:!o})}),n.commitChange());}}}function wP(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,s)=>s===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function _l(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunk24B6ZCFG_cjs.wl(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunk24B6ZCFG_cjs.wl(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunk24B6ZCFG_cjs.xl(r.element);n.pushHistory(),t.set({...Z(o,[...U(o),i]),selectedElementId:i.id,selectedElementIds:[i.id],pasteOptionsToolbar:[{id:i.id,sourceClone:i}]}),n.commitChange();},pasteWithFormat(o){let r=t.get(),i=r.clipboardPayload;if(!r.editable||!i||!r.slides[r.currentSlide])return null;let s=chunk24B6ZCFG_cjs.xl(i.element),a=o==="picture"?s:chunk24B6ZCFG_cjs.Zl(s,o);return n.pushHistory(),t.set({...Z(r,[...U(r),a]),selectedElementId:a.id,selectedElementIds:[a.id],pasteOptionsToolbar:[{id:a.id,sourceClone:s}]}),n.commitChange(),a.id},reformatPasted(o,r,i){i!=="picture"&&EP(t,n,o,chunk24B6ZCFG_cjs.Zl(r,i));},replaceElement(o,r){EP(t,n,o,r);}}}function EP(e,t,n,o){let r=e.get();t.pushHistory(),e.set(Z(r,U(r).map(i=>i.id===n?o:i))),t.commitChange();}function Gl(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((s,a)=>r||a===0?{...s,themePath:o}:s)}),n.commitChange()))();},applyThemeEdit({colorScheme:o,fontScheme:r,name:i}){let s=t.get();if(!s.editable)return;n.pushHistory();let a=s.colorScheme?{...s.colorScheme}:void 0,l=chunk24B6ZCFG_cjs.R({slides:s.slides,theme:{colorScheme:s.colorScheme,fontScheme:s.fontScheme},themeColorMap:a},o,r,i),p=Object.keys(s.templateElementsBySlideId).length?Object.fromEntries(Object.entries(s.templateElementsBySlideId).map(([d,u])=>[d,chunk24B6ZCFG_cjs.Q(u,a??{},o)])):s.templateElementsBySlideId;t.set({slides:l.slides,templateElementsBySlideId:p,colorScheme:l.theme?.colorScheme??o,fontScheme:l.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:chunk24B6ZCFG_cjs.Pr(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(s=>s.path===o?{...s,backgroundColor:r}:s)}),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:chunk24B6ZCFG_cjs.mj(o)}),n.commitChange());},applySlideSizeRescale(o,r){if(!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0)return;let i=t.get();if(!i.editable)return;let s=chunk24B6ZCFG_cjs.nj({current:i.slideSize,canvas:i.canvasSize}).size;n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.cs(i.slides,s,o,r),slideSize:{...o},canvasSize:chunk24B6ZCFG_cjs.mj(o)}),n.commitChange();},updateTableStyleMap(o){let r=t.get();if(!r.editable)return;let i=chunk24B6ZCFG_cjs.wp({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();},deleteTableStyle(o){let r=t.get();if(!r.editable)return;let i=chunk24B6ZCFG_cjs.xp({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();}}}function ii(e,t,n,o){let r=we(e,t,t("pptx.hyperlink.editTitle")),i=chunk24B6ZCFG_cjs.jm(n),s=(p,d)=>{let u=chunkOBVLNSK5_cjs.w(e,"label","pptxv-parity-select"),m=chunkOBVLNSK5_cjs.w(e,"span");m.textContent=p;let g=chunkOBVLNSK5_cjs.w(e,"input");return g.type="text",g.value=d,u.append(m,g),r.body.appendChild(u),g},a=s(t("pptx.hyperlink.urlLabel"),i.url);a.placeholder=t("pptx.hyperlink.urlPlaceholder");let l=s(t("pptx.hyperlink.tooltipLabel"),i.tooltip);ae(e,r.footer,t("pptx.hyperlinkDialog.removeLink"),()=>{o(chunk24B6ZCFG_cjs.lm()),r.close();}),ae(e,r.footer,t("pptx.common.cancel"),r.close),ae(e,r.footer,t("pptx.hyperlinkDialog.apply"),()=>{o(chunk24B6ZCFG_cjs.km(n,{url:a.value,tooltip:l.value})),r.close();},true);}function TP(e,t,n){let o=we(e,t,t("pptx.pasteSpecial.dialogTitle")),r="keep-source-formatting";Nr(e,o.body,"paste-special-format",chunk24B6ZCFG_cjs.Yl.map(i=>({value:i.id,label:t(i.labelKey)})),r,i=>{r=i;}),ae(e,o.footer,t("pptx.common.cancel"),()=>o.close()),ae(e,o.footer,t("pptx.common.ok"),()=>{o.close(),n.onConfirm(r);},true);}var ai=new WeakMap;function SM(e,t){e.addEventListener("pointerdown",n=>{n.stopPropagation(),e.setPointerCapture(n.pointerId);}),e.addEventListener("pointermove",n=>{if(!e.hasPointerCapture(n.pointerId))return;let o=ai.get(e),r=e.offsetParent;if(!o||!r)return;let i=r.getBoundingClientRect(),s=o.scale||1,a=o.axis==="h"?(n.clientY-i.top)/s:(n.clientX-i.left)/s;t.onMoveGuide(o.id,a);}),e.addEventListener("pointerup",n=>{try{e.releasePointerCapture(n.pointerId);}catch{}}),e.addEventListener("dblclick",n=>{n.stopPropagation();let o=ai.get(e);o&&t.onRemoveGuide(o.id);});}function PP(e,t,n,o,r){let i=new Map;t.querySelectorAll(".pptxv-alignment-guide").forEach(a=>{let l=a.dataset.guideId;l!==void 0&&i.set(l,a);});let s=new Set;for(let a of n){s.add(a.id);let l=i.get(a.id);l||(l=e.createElement("div"),l.dataset.guideId=a.id,r&&SM(l,r),t.appendChild(l)),l.className=`pptxv-alignment-guide is-${a.axis}${r?" is-interactive":""}`,l.style[a.axis==="h"?"top":"left"]=`${a.position*o}px`,ai.set(l,{id:a.id,axis:a.axis,scale:o});}for(let[a,l]of i)s.has(a)||(ai.delete(l),l.remove());}function CM(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="chart"?t:null}function AP(e){let{doc:t,t:n,store:o,ops:r}=e,i=t.createElement("div");i.className="pptxv-chart-quick-actions",i.setAttribute("data-pptx-chart-quick-actions","");let s=null;function a(b,v){let f=o.get();!f.editable||!U(f).some(S=>S.id===b)||(r.pushHistory(),o.set(Z(f,U(f).map(S=>S.id===b?{...S,chartData:v}:S))),r.commitChange());}function l(b){b.preventDefault(),b.stopPropagation();}function p(b){s=s===b?null:b,x();}function d(b,v){let f=t.createElement("button");return f.type="button",f.className="pptxv-chart-quick-btn",f.disabled=!v,f.dataset.testid=`chart-quick-action-${b.id}`,f.setAttribute("aria-label",n(b.labelKey)),f.title=n(b.labelKey),f.style.left=`${b.x}px`,f.style.top=`${b.y}px`,f.style.width=`${b.size}px`,f.style.height=`${b.size}px`,f.appendChild(chunkOBVLNSK5_cjs.K(t,b.id==="elements"?"plus":b.id==="styles"?"paintbrush":"filter")),f.addEventListener("pointerdown",l),f.addEventListener("click",()=>p(b.id)),f}function u(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-elements-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickElements"),h.appendChild(C);for(let w of b.elements){let P=t.createElement("label");P.className="row";let k=t.createElement("input");k.type="checkbox",k.disabled=!f,k.checked=w.checked,k.dataset.testid=`chart-quick-element-${w.key}`,k.addEventListener("pointerdown",l),k.addEventListener("change",()=>{let T=v.chartData;T&&(a(v.id,chunk24B6ZCFG_cjs.mc(T,w.key,k.checked)),x());});let A=t.createElement("span");A.textContent=n(w.labelKey),P.append(k,A),h.appendChild(P);}return h}function m(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card pptxv-chart-quick-styles",h.dataset.testid="chart-quick-styles-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;for(let C of b.styles.presets){let w=t.createElement("button");w.type="button",w.className="pptxv-chart-quick-swatch",w.classList.toggle("is-applied",C.applied),w.disabled=!f,w.dataset.testid=`chart-quick-style-${C.id}`,w.setAttribute("aria-label",n(C.labelKey)),w.setAttribute("aria-pressed",String(C.applied)),w.title=n(C.labelKey);let P=t.createElement("span");P.className="swatch-row";for(let k of C.colors.slice(0,5)){let A=t.createElement("span");A.style.backgroundColor=k,P.appendChild(A);}w.appendChild(P),w.addEventListener("pointerdown",l),w.addEventListener("click",()=>{let k=v.chartData;if(!k)return;let A=chunk24B6ZCFG_cjs.kc(k,C.id);A&&a(v.id,A),x();}),h.appendChild(w);}return h}function g(b,v,f,S,y){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-filters-popover",h.style.left=`${S}px`,h.style.top=`${y}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickFilters"),h.appendChild(C);for(let w of b.filters.series){let P=t.createElement("label");P.className="row";let k=t.createElement("input");k.type="checkbox",k.disabled=!f,k.checked=w.visible,k.dataset.testid=`chart-quick-filter-${w.key}`,k.addEventListener("pointerdown",l),k.addEventListener("change",()=>{let T=v.chartData;if(!T)return;let E=w.seriesIndex!==void 0?chunk24B6ZCFG_cjs.hc(T,w.seriesIndex):chunk24B6ZCFG_cjs.ic(T,w.filteredIndex);E&&a(v.id,E),x();});let A=t.createElement("span");A.className="name",A.textContent=w.name,P.append(k,A),h.appendChild(P);}return h}function x(){let b=o.get(),v=CM(b);if(i.replaceChildren(),!v||!v.chartData)return;let f=e.getScale()||1,S=chunk24B6ZCFG_cjs.oc({isChartSelected:true,chartData:v.chartData,selectionBox:{x:v.x*f,y:v.y*f,width:v.width*f,height:v.height*f}});if(S){s&&!S.buttons.some(y=>y.id===s)&&(s=null);for(let y of S.buttons){if(i.appendChild(d(y,b.editable)),s!==y.id)continue;let h=y.x+chunk24B6ZCFG_cjs.nc+4,C=y.y;y.id==="elements"?i.appendChild(u(S,v,b.editable,h,C)):y.id==="styles"?i.appendChild(m(S,v,b.editable,h,C)):i.appendChild(g(S,v,b.editable,h,C));}}}return {root:i,mount(b){b.appendChild(i),x();},sync:x,dispose(){s=null,i.remove();}}}function kP(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="connector"?t:null}function IP(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,s=m=>{let g=r.getBoundingClientRect(),x=e.getScale()||1;return {x:(m.clientX-g.left)/x,y:(m.clientY-g.top)/x}},a=m=>{i&&(i={kind:i.kind,...s(m)},u());},l=m=>{let g=i;i=null,p();let x=n.get(),b=kP(x);if(!g||!b){u();return}let v=U(x),f=s(m),S=chunk24B6ZCFG_cjs.Zg(chunk24B6ZCFG_cjs.Yg(v.filter(C=>C.id!==b.id)),f.x,f.y),y=chunk24B6ZCFG_cjs._g(b,v,g.kind,f,S),h=chunk24B6ZCFG_cjs.$g(b,y);o.pushHistory(),n.set(Z(x,v.map(C=>C.id===b.id?h:C))),o.commitChange();},p=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l);};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 b=i?.kind===m.kind?i:m;return x.style.left=`${b.x*g}px`,x.style.top=`${b.y*g}px`,x.addEventListener("pointerdown",v=>{v.preventDefault(),v.stopPropagation(),i={kind:m.kind,...s(v)},window.addEventListener("pointermove",a),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),u();}),x}function u(){let m=n.get(),g=kP(m);if(r.replaceChildren(),!g)return;let x=e.getScale()||1,b=U(m);if(i){let v=chunk24B6ZCFG_cjs.Yg(b.filter(S=>S.id!==g.id)),f=chunk24B6ZCFG_cjs.Zg(v,i.x,i.y);for(let S of v){let y=t.createElement("div");y.className="pptxv-connection-site",y.setAttribute("data-pptx-connection-site",""),f?.elementId===S.elementId&&f.siteIndex===S.siteIndex&&y.classList.add("is-snapped"),y.style.left=`${S.x*x}px`,y.style.top=`${S.y*x}px`,r.appendChild(y);}}for(let v of chunk24B6ZCFG_cjs.Xg(g))r.appendChild(d(v,x));}return {root:r,isActive:()=>i!==null,mount(m){m.appendChild(r),u();},sync:u,dispose(){p(),i=null,r.remove();}}}var LP="http://www.w3.org/2000/svg";function Ul(e,t){e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`;}function MP(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-crop-overlay",{position:"absolute",overflow:"visible",zIndex:"50",pointerEvents:"none"});o.dataset.pptxCropOverlay="true";let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-crop-ghost",{position:"absolute",pointerEvents:"auto",cursor:"move"}),i=e.createElement("img");i.alt="",i.draggable=false,Object.assign(i.style,{display:"block",width:"100%",height:"100%",pointerEvents:"none",userSelect:"none"}),r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-crop-frame",{position:"absolute",boxSizing:"border-box",pointerEvents:"auto",cursor:"move"});s.dataset.pptxCropFrame="true";let a=d=>{d.button===0&&n.onPanPointerDown(d);};r.addEventListener("pointerdown",a),s.addEventListener("pointerdown",a),o.append(r,s);let l=new Map,p=d=>{let u=l.get(d);if(u)return u;let m=chunkOBVLNSK5_cjs.w(e,"div","pptxv-crop-handle",{position:"absolute",pointerEvents:"auto",touchAction:"none"});m.dataset.pptxCropHandle=d,m.setAttribute("role","button"),m.setAttribute("aria-label",t);let g=e.createElementNS(LP,"svg");g.setAttribute("aria-hidden","true"),Object.assign(g.style,{position:"absolute",inset:"0",overflow:"visible"});let x=e.createElementNS(LP,"path");x.setAttribute("fill","#000000"),x.setAttribute("stroke","#ffffff"),g.appendChild(x),m.appendChild(g),m.addEventListener("pointerdown",v=>{v.button===0&&n.onHandlePointerDown(d,v);}),o.appendChild(m);let b={node:m,path:x,svg:g};return l.set(d,b),b};return {root:o,update(d,u,m){let g=chunk24B6ZCFG_cjs.Zs(d,u);o.style.left=`${d.x}px`,o.style.top=`${d.y}px`,o.style.width=`${d.width}px`,o.style.height=`${d.height}px`,o.style.transform=d.rotation?`rotate(${d.rotation}deg)`:"",Ul(r,g.ghost),r.style.clipPath=g.ghost.clipPath,r.style.opacity=String(g.ghost.opacity),i.style.transform=g.ghost.transform,m&&i.getAttribute("src")!==m&&(i.src=m),Ul(s,g.frame);let x=u>0?1/u:1;s.style.outline=`${x}px solid rgba(0, 0, 0, 0.6)`;for(let b of g.handles){let v=p(b.id);Ul(v.node,b),v.node.style.cursor=b.cursor,v.svg.setAttribute("width",String(b.width)),v.svg.setAttribute("height",String(b.height)),v.path.setAttribute("d",b.path),v.path.setAttribute("stroke-width",String(x));}},mount(d){if(!d){o.remove();return}(o.parentElement!==d||d.lastElementChild!==o)&&d.appendChild(o);},unmount(){o.remove();}}}var wM="[data-pptx-crop-controls]";function EM(e){return e instanceof HTMLElement&&(e.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(e.tagName))}function DP(e){let{doc:t,store:n,actions:o}=e,r=null,i=null,s=null,a=x=>x.cropSession?J(x,x.cropSession.elementId):void 0,l=(x,b)=>{let v=a(n.get());if(!v)return;x.preventDefault(),x.stopPropagation(),s?.stop();let f=chunk24B6ZCFG_cjs.Qs(v),S=e.getScale()>0?e.getScale():1,y=x.clientX,h=x.clientY;n.set({interactionActive:true});let C=P=>{let k=chunk24B6ZCFG_cjs.Ts((P.clientX-y)/S,(P.clientY-h)/S,f.rotation);o.previewCrop(b(f,k.dx,k.dy));},w=()=>{t.removeEventListener("pointermove",C),t.removeEventListener("pointerup",w),t.removeEventListener("pointercancel",w),s=null,n.set({interactionActive:false});};t.addEventListener("pointermove",C),t.addEventListener("pointerup",w),t.addEventListener("pointercancel",w),s={stop:w};},p=()=>(r??=MP(t,e.getTranslator()(chunk24B6ZCFG_cjs.ht),{onHandlePointerDown:(x,b)=>l(b,(v,f,S)=>chunk24B6ZCFG_cjs.Rs(v,x,f,S)),onPanPointerDown:x=>l(x,chunk24B6ZCFG_cjs.Ss)}),r),d=x=>{if(!n.get().cropSession||EM(x.target)||i&&x.target instanceof Node&&x.target!==t.body&&!i.contains(x.target))return;let b=chunk24B6ZCFG_cjs.ct(x.key);b&&(x.preventDefault(),x.stopImmediatePropagation(),b==="commit"?o.commitCropMode():o.cancelCropMode());},u=x=>{if(!n.get().cropSession||s)return;let b=x.target instanceof Element?x.target:null;b&&(r?.root.contains(b)||b.closest(wM))||o.commitCropMode();},m=n.subscribe((x,b)=>{let v=x.cropSession;if(!v)return;let f=x.selectedElementIds.length===1&&x.selectedElementIds[0]===v.elementId;(x.currentSlide!==b.currentSlide||!f||!x.editable||x.presenting)&&o.commitCropMode();}),g=()=>{s?.stop(),r?.unmount(),t.removeEventListener("keydown",d,true),t.removeEventListener("pointerdown",u),i=null;};return {attach(x){g(),i=x,t.addEventListener("keydown",d,true),t.addEventListener("pointerdown",u);},sync(){let x=n.get(),b=x.editable&&!x.presenting?a(x):void 0;if(!b){r?.unmount();return}let v=p();v.update(b,e.getScale(),chunk24B6ZCFG_cjs.nf(b,new Map(x.mediaDataUrls))),v.mount(e.getStageWrap()?.querySelector(".pptxv-stage")??null);},isDragging:()=>s!==null,detach:g,destroy(){g(),m(),r=null;}}}function RP(e){if(e.length===0)return null;if(e.length>1){let n=chunk24B6ZCFG_cjs.gf(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 OP(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function Kl(e){let t=null,n=a=>{let{x:l,y:p}=OP(a.clientX,a.clientY,e.getStageOrigin(),e.getScale());return chunk24B6ZCFG_cjs.Mm(l,p,a)};function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",s);}function r(a){!t||a.pointerId!==t.pointerId||(t.points.push(n(a)),e.onStrokePreview?.(t.points));}function i(a){if(!t||a.pointerId!==t.pointerId)return;t.points.push(n(a));let l=t;o(),t=null,e.onStrokePreview?.(null),e.onCommitStroke({points:l.points,color:e.getColor(),width:e.getWidth(),tool:l.tool});}function s(a){!t||a.pointerId!==t.pointerId||(o(),t=null,e.onStrokePreview?.(null));}return {onStagePointerDown(a){if(a.button!==0)return;let l=e.getTool();if(l!=="select"){if(l==="eraser"){let p=chunk24B6ZCFG_cjs.Hm(a.target,e.getStageRoot());p&&(a.preventDefault(),a.stopPropagation(),e.onEraseAt(p));return}a.preventDefault(),a.stopPropagation(),t={tool:l,pointerId:a.pointerId,points:[n(a)]},e.onStrokePreview?.(t.points),window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",s);}},isActive:()=>t!==null,dispose(){let a=t!==null;o(),t=null,a&&e.onStrokePreview?.(null);}}}function Wl(e){let t=chunkOBVLNSK5_cjs.x(e,"svg",{"aria-hidden":"true","data-pptx-ink-live-preview":"true"});return t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.pointerEvents="none",t.style.zIndex="46",{root:t,mount(n){if(!n){t.remove();return}t.parentElement!==n&&n.appendChild(t);},update(n,o){if(!n){t.replaceChildren();return}let r=Math.max(o.width,1),i=Math.max(o.height,1);t.setAttribute("width",String(r)),t.setAttribute("height",String(i)),t.setAttribute("viewBox",`0 0 ${r} ${i}`),t.replaceChildren(chunkOBVLNSK5_cjs.G(e,n,void 0));},destroy(){t.remove();}}}function $l(e){let{store:t,editActions:n,interactions:o}=e,r=Wl(e.doc),i=l=>l==="highlighter"?"highlighter":l==="freeform"?"freeform":"pen",s=Kl({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:l=>n.commitStroke(l),onEraseAt:l=>n.eraseInkElement(l),onStrokePreview:l=>{if(!l){r.update(null,t.get().canvasSize);return}r.mount(e.getStageRoot());let p=chunk24B6ZCFG_cjs.Om({points:[...l],color:t.get().drawColor,width:t.get().drawWidth,tool:i(t.get().drawTool)});r.update(p,t.get().canvasSize);}}),a=l=>l.editable&&!l.presenting&&l.drawTool!=="select";return {isActive:()=>s.isActive(),onStagePointerDown(l){if(a(t.get())){s.onStagePointerDown(l);return}o.onStagePointerDown(l);},onStageDblClick(l){a(t.get())||o.onStageDblClick(l);},syncCursor(l){if(!l)return;let p=t.get();l.dataset.drawTool=a(p)?p.drawTool:"select";},setTool(l){let p=t.get();p.drawTool!==l&&(l!=="select"&&o.closeInline(true),t.set({drawTool:l,selectedElementId:l==="select"?p.selectedElementId:null}));},setColor:l=>t.set({drawColor:l}),setWidth:l=>t.set({drawWidth:Math.max(1,Math.round(l))}),dispose:()=>{s.dispose(),r.destroy();}}}function TM(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function PM(e,t){let n=e.at(-1);return n?e.map(o=>o.id===n.id?{...o,mentions:t}:o):e}function AM(e,t,n){return e.map(o=>{if(o.id!==t)return o;let r=o.replies?.at(-1);return r?{...o,replies:o.replies?.map(i=>i.id===r.id?{...i,mentions:n}:i)}:o})}function HP(e){let t=()=>e.getUserName?.()||"You",n=o=>{let r=e.store.get();if(!r.editable||!r.slides[r.currentSlide])return null;let i=o(r.slides[r.currentSlide].comments??[]);return i?(e.ops.pushHistory(),e.store.set({slides:TM(r.slides,r.currentSlide,()=>i)}),e.ops.commitChange(),i):null};return {addComment(o,r,i){let s=n(a=>{let l=chunk24B6ZCFG_cjs.fn(a,o,t(),void 0,void 0,r);return l&&i?.length?PM(l,i):l});return s?s[s.length-1]?.id??null:null},addCommentReply(o,r,i){let s=n(l=>{let p=chunk24B6ZCFG_cjs.in(l,o,r,t());return p&&i?.length?AM(p,o,i):p});return s?s.find(l=>l.id===o)?.replies?.at(-1)?.id??null:null},editComment(o,r){n(i=>chunk24B6ZCFG_cjs.hn(i,o,r));},deleteComment(o){n(r=>chunk24B6ZCFG_cjs.gn(r,o));},toggleCommentResolved(o){n(r=>chunk24B6ZCFG_cjs.jn(r,o));}}}function FP(e,t){let n=U(e).find(o=>o.id===t);if(n)return n;for(let o of e.slides){let r=o.elements.find(i=>i.id===t);if(r)return r}}var VP=(e,t)=>({...e,...t});function po(e,t,n){let o=U(e);return o.some(r=>r.id===t)?Z(e,o.map(r=>r.id===t?VP(r,n):r)):{slides:e.slides.map(r=>r.elements.some(i=>i.id===t)?{...r,elements:r.elements.map(i=>i.id===t?VP(i,n):i)}:r)}}var kM=e=>({...chunk24B6ZCFG_cjs.Ps(e),...chunk24B6ZCFG_cjs.Os(e)});function BP(e,t){let n=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t,o=e.querySelector(`[data-element-id="${n}"] img`);return o&&o.naturalWidth>0&&o.naturalHeight>0?{width:o.naturalWidth,height:o.naturalHeight}:void 0}function zP(e){let{doc:t,store:n,ops:o}=e,r=p=>{if(!p.editable||p.selectedElementIds.length!==1)return;let d=o.selectedElement(p);return chunk24B6ZCFG_cjs._s(d)?d:void 0},i=p=>{let d=n.get(),u=d.cropSession,m=u?FP(d,u.elementId):r(d);if(!m)return;let g=p(m);if(u){n.set(po(d,m.id,g));return}o.pushHistory(),n.set(po(d,m.id,g)),o.commitChange();},s=()=>{let p=n.get();if(p.cropSession)return;let d=chunk24B6ZCFG_cjs.$s(r(p));d&&n.set({cropSession:d});},a=()=>{let p=n.get(),d=p.cropSession;if(!d)return;let u=FP(p,d.elementId);if(!u||!chunk24B6ZCFG_cjs.bt(d,u)){n.set({cropSession:null});return}let m=kM(u);n.set({...po(p,d.elementId,chunk24B6ZCFG_cjs.at(d)),cropSession:null}),o.pushHistory(),n.set(po(n.get(),d.elementId,m)),o.commitChange();};return {toggleCropMode(){n.get().cropSession?a():s();},enterCropMode:s,commitCropMode:a,cancelCropMode:()=>{let p=n.get(),d=p.cropSession;d&&n.set({...po(p,d.elementId,chunk24B6ZCFG_cjs.at(d)),cropSession:null,interactionActive:false});},previewCrop(p){let d=n.get();d.cropSession&&n.set(po(d,d.cropSession.elementId,p));},cropToAspect:(p,d)=>i(u=>chunk24B6ZCFG_cjs.Ws(u,p,d)),cropFill:()=>i(p=>chunk24B6ZCFG_cjs.Xs(p,BP(t,p.id))),cropFit:()=>i(p=>chunk24B6ZCFG_cjs.Ys(p,BP(t,p.id)))}}function NP(e){let{store:t,ops:n,deck:o}=e;return {applyRibbonGalleryResult(r){let i=t.get();if(i.editable){if(r.kind==="element"){let s=U(i);if(!s.some(a=>a.id===r.elementId))return;n.pushHistory(),t.set(Z(i,s.map(a=>a.id===r.elementId?{...a,...r.patch}:a))),n.commitChange();return}if(r.kind==="themeColorScheme"){o.applyThemeEdit({colorScheme:r.colorScheme,fontScheme:i.fontScheme??{},name:r.name});return}i.colorScheme&&o.applyThemeEdit({colorScheme:i.colorScheme,fontScheme:r.fontScheme,name:r.name});}}}}function ql(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunk24B6ZCFG_cjs.Nm(o);i&&(n.pushHistory(),t.set({slides:chunk24B6ZCFG_cjs.Nr(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=chunk24B6ZCFG_cjs.Kr(r.slides,r.currentSlide,o);if(!i||i.type!=="ink"&&i.type!=="contentPart")return false;n.pushHistory();let s=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:chunk24B6ZCFG_cjs.Lr(r.slides,r.currentSlide,o),selectedElementId:s}),n.commitChange(),true}}}var IM={width:320,height:80},LM={width:600,height:250},MM={width:200,height:150},_P={width:240,height:0};function Ne(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 jl(e,t,n="rect"){let o,r;switch(e){case "text":o=chunk24B6ZCFG_cjs.h("Text",{fontSize:18,color:"#000000"}),r=IM;break;case "table":o={...chunk24B6ZCFG_cjs.tf(3,3),id:chunk24B6ZCFG_cjs.n("table")},r=LM;break;case "shape":n==="connector"?(o=chunk24B6ZCFG_cjs.j({type:"straight",stroke:{color:"#000000",width:2}}),r=_P):(o=chunk24B6ZCFG_cjs.i(n),r=n==="line"?_P:MM);break}return o.width=r.width,o.height=r.height,Ne(o,t),o}function DM(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),s=Math.max(1,Math.round(i/(r||1)));n({width:i,height:s});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function si(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 s=new FileReader;s.onload=async()=>{let a=typeof s.result=="string"?s.result:"";if(!a){n(null);return}let l=Math.round(t.width*.6),{width:p,height:d}=await DM(a,l),u={id:chunk24B6ZCFG_cjs.n("image"),type:"image",name:"Image",x:0,y:0,width:p,height:d,imageData:a};Ne(u,t),n(u);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var RM={width:420,height:64},Ft={width:640,height:360};function OM(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||Ft.width,i=o.videoHeight||Ft.height;if(r>Ft.width||i>Ft.height){let s=Math.min(Ft.width/r,Ft.height/i);n({width:Math.round(r*s),height:Math.round(i*s)});return}n({width:r,height:i});},o.onerror=()=>n(Ft),o.src=t;})}function Yl(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 s=chunk24B6ZCFG_cjs.jo(i.type);if(!s){n(null);return}let a=new FileReader;a.onload=async()=>{let l=typeof a.result=="string"?a.result:"";if(!l){n(null);return}let p=s==="audio"?RM:await OM(e,l),d={id:chunk24B6ZCFG_cjs.n("media"),type:"media",mediaType:s,mediaMimeType:i.type||void 0,mediaData:l,x:0,y:0,width:p.width,height:p.height};Ne(d,t),n(d);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var GP={width:400,height:80},UP={width:600,height:340},KP={width:200,height:40};function Xl(e,t){let n=chunk24B6ZCFG_cjs.xn(e);return Ne(n,t),n}function Ql(e,t,n){let o={id:chunk24B6ZCFG_cjs.n("smartart"),type:"smartArt",x:0,y:0,width:UP.width,height:UP.height,smartArtData:chunk24B6ZCFG_cjs.dm(e,t,r=>chunk24B6ZCFG_cjs.n(`smartart-node-${r}`))};return Ne(o,n),o}function Zl(e,t){let n="[Equation]",o={id:chunk24B6ZCFG_cjs.n("equation"),type:"shape",x:0,y:0,width:GP.width,height:GP.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return Ne(o,t),o}function Jl(e,t){let n=chunk24B6ZCFG_cjs.$l(e,chunk24B6ZCFG_cjs.n("actionbutton"));return n?(Ne(n,t),n):null}function ep(e,t){return chunk24B6ZCFG_cjs.sf(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function tp(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunk24B6ZCFG_cjs.n("field"),type:"shape",x:0,y:0,width:KP.width,height:KP.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return Ne(r,n),r}function WP(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((s,a)=>o.has(`${i}:${a}`)?{...s,style:{...s.style,...n}}:s)}))}}function $P(e,t,n){switch(n){case "insertRowAbove":return chunk24B6ZCFG_cjs.ve(e,t.row,"above");case "insertRowBelow":return chunk24B6ZCFG_cjs.ve(e,t.row,"below");case "deleteRow":return chunk24B6ZCFG_cjs.we(e,t.row);case "insertColumnLeft":return chunk24B6ZCFG_cjs.xe(e,t.column,"left");case "insertColumnRight":return chunk24B6ZCFG_cjs.xe(e,t.column,"right");case "deleteColumn":return chunk24B6ZCFG_cjs.ye(e,t.column)}}function qP(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:chunk24B6ZCFG_cjs.Ke(e.columnWidths,t,o)}}function jP(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function YP(e,t){let n=t.map(({row:o,column:r})=>({row:o,col:r}));return chunk24B6ZCFG_cjs.pe(n,e)?chunk24B6ZCFG_cjs.qe(n,e):e}function XP(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=chunk24B6ZCFG_cjs.De(e,t.row,t.column);return i?{...e,rows:i.map((s,a)=>({...s,cells:s.cells.map((l,p)=>a>=t.row&&a<t.row+o&&p>=t.column&&p<t.column+r?{...l,hMerge:void 0,vMerge:void 0}:l)}))}:e}var HM={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function op(e){return {toggleElementLock:()=>e(t=>({locks:chunk24B6ZCFG_cjs.bf(!chunk24B6ZCFG_cjs.af(t))})),setTextVerticalAlign:t=>e(n=>chunk24B6ZCFG_cjs.Og(n,t)),setTextWrap:t=>e(n=>chunk24B6ZCFG_cjs.Rg(n,t)),setAutoFitMode:t=>e(n=>chunk24B6ZCFG_cjs.Sg(n,t)),setTextAdvanced:t=>e(n=>chunk24B6ZCFG_cjs.Ng(n,t)),setTextStyle:(t,n)=>e(o=>{if(!("textStyle"in o))return {};if(n&&o.textSegments?.length){let r=io(),i=r!==void 0?chunk24B6ZCFG_cjs.ph(r,o.textSegments,o.textStyle):o.textSegments;return {textSegments:chunk24B6ZCFG_cjs.ng(i,n,t).newSegments,...r!==void 0?{text:r}:{}}}return {textStyle:{...o.textStyle,...t}}}),setFillOpacity:t=>e(n=>pt(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>pt(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunk24B6ZCFG_cjs.Vm(n,t)),addGradientStop:(t,n)=>e(o=>chunk24B6ZCFG_cjs.Wm(o,t,n)),removeGradientStop:t=>e(n=>chunk24B6ZCFG_cjs.Xm(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunk24B6ZCFG_cjs.Ym(o,t,n)),setImageBrightness:t=>e(n=>chunk24B6ZCFG_cjs.$m(n,{brightness:t})),setImageContrast:t=>e(n=>chunk24B6ZCFG_cjs.$m(n,{contrast:t})),setImageSaturation:t=>e(n=>chunk24B6ZCFG_cjs.$m(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunk24B6ZCFG_cjs.bn(o,{[HM[t]]:n})),setImageEffects:t=>e(n=>chunk24B6ZCFG_cjs.d(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunk24B6ZCFG_cjs.s(n)})),setAltText:t=>e(()=>({altText:t})),setTitle:t=>e(()=>({title:t})),setOleName:t=>e(n=>n.type==="ole"?chunk24B6ZCFG_cjs.Vf(t):{}),setOleContent:t=>e(n=>n.type==="ole"?t:{}),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunk24B6ZCFG_cjs.dn(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunk24B6ZCFG_cjs.dn(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunk24B6ZCFG_cjs.en(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,s)=>s===t?{...i,cells:i.cells.map((a,l)=>l===n?{...a,style:{...a.style,...o}}:a)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:WP(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>{if(o.type!=="table"||!o.tableData)return {};let r=$P(o,t,n);return r===o?{}:{tableData:r.tableData,rawXml:r.rawXml}}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:qP(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:jP(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:YP(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:XP(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>co(o,r=>chunk24B6ZCFG_cjs.E(r,t,n))),setSmartArtNodeStyle:(t,n)=>e(o=>co(o,r=>chunk24B6ZCFG_cjs.I(r,t,n))),mutateSmartArtNode:(t,n)=>e(o=>co(o,r=>n==="add"?chunk24B6ZCFG_cjs.C(r,"New item"):n==="addChild"?chunk24B6ZCFG_cjs.H(r,t,"New item"):n==="remove"?chunk24B6ZCFG_cjs.D(r,t):n==="promote"?chunk24B6ZCFG_cjs.F(r,t):chunk24B6ZCFG_cjs.G(r,t))),replaceSmartArtData:t=>e(n=>co(n,()=>t)),setSmartArtLayout:t=>e(n=>co(n,o=>chunk24B6ZCFG_cjs.M(o,t))),setSmartArtColorScheme:t=>e(n=>co(n,o=>({...o,colorScheme:t})))}}function co(e,t){if(e.type!=="smartArt"||!e.smartArtData)return {};let n=t(e.smartArtData),o={width:e.width,height:e.height};return {smartArtData:chunk24B6ZCFG_cjs.yn(n,e.id,o)}}function np(e){return {slides:e.slides,width:e.canvasSize.width,height:e.canvasSize.height,widthEmu:e.slideSize?.widthEmu,heightEmu:e.slideSize?.heightEmu,slideSizeType:e.slideSize?.type,slideMasters:e.slideMasters,presentationProperties:e.presentationProperties,customShows:e.customShows,sections:e.sections}}function rp(e){return e.masterViewTarget?{tab:e.masterViewTab,...e.masterViewTarget}:null}function FM(e,t){let n=e[t.masterIndex];return t.layoutIndex===null?n?.name??"":n?.layouts?.[t.layoutIndex]?.name??""}async function VM(e,t){let n=[];for(let s of t){n.push({id:s.path,rId:"",slideNumber:0,elements:s.elements??[]});for(let a of s.layouts??[])n.push({id:a.path,rId:"",slideNumber:0,elements:a.elements??[]});}let{paths:o,refs:r}=chunk24B6ZCFG_cjs.Oa(n);if(o.size===0)return [...t];let i=new Map;return await Promise.all(Array.from(o).map(async s=>{try{let a=await e.getImageData(s);a&&i.set(s,a);}catch{}})),t.map(s=>({...s,elements:chunk24B6ZCFG_cjs.La(s.elements??[],i,r),layouts:s.layouts?.map(a=>({...a,elements:chunk24B6ZCFG_cjs.La(a.elements??[],i,r)}))}))}function QP(e){let{doc:t,store:n,ops:o}=e;return {async runMasterViewCrudAction(r){let i=e.getTranslator(),s=n.get(),a=rp(s),l=e.getHandler();if(!a||!l||!s.editable)return;let p=np(s);if(!chunk24B6ZCFG_cjs.mp(p,a).find(x=>x.id===r)?.enabled)return;let u;if(r==="renameLayout"||r==="renameMaster"){let x=t.defaultView?.prompt(i("pptx.masterView.renamePrompt"),FM(s.slideMasters,a));if(!x)return;u=x;}let m=await chunk24B6ZCFG_cjs.np(l,p,r,a,{name:u});if(!m.ok){t.defaultView?.alert(i(chunk24B6ZCFG_cjs.lp(r,m.reason)));return}o.pushHistory(),e.setHandler(m.handler);let g=await VM(m.handler,m.data.slideMasters??[]);n.set({slideMasters:g,masterViewTarget:{masterIndex:m.target.masterIndex,layoutIndex:m.target.layoutIndex},selectedElementId:null,selectedElementIds:[]}),o.commitChange();}}}function BM(e){let t=new Map(U(e).map(n=>[n.id,n]));return e.selectedElementIds.map(n=>t.get(n)).filter(n=>n!==void 0)}function ZP(e){let{store:t,ops:n}=e;return {mergeShapes(o){let r=t.get();if(!r.editable)return;let i=chunk24B6ZCFG_cjs.Nl(o,BM(r));if(!i)return;let s=i.created.map(a=>a.id);n.pushHistory(),t.set({...Z(r,chunk24B6ZCFG_cjs.Ol(U(r),i)),selectedElementId:s.at(-1)??null,selectedElementIds:s}),n.commitChange();}}}function ip(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(),s=o.trim();if(!i.editable||!s||!i.slides[r])return null;let a=chunk24B6ZCFG_cjs.Af(i.sections,i.slides,s,r),l=a.sections.find(p=>!i.sections.some(d=>d.id===p.id));return n(a.sections,a.slides),l?.id??null},renameSection(o,r){let i=e.get(),s=r.trim(),a=i.sections.find(p=>p.id===o);if(!i.editable||!a||!s||a.name===s)return;let l=chunk24B6ZCFG_cjs.Bf(i.sections,i.slides,o,s);n(l.sections,l.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(s=>s.id===o))return;let i=chunk24B6ZCFG_cjs.Cf(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),s=r==="up"?chunk24B6ZCFG_cjs.Df(i.sections,o):chunk24B6ZCFG_cjs.Ef(i.sections,o);!i.editable||s===i.sections||n(s,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let s=chunk24B6ZCFG_cjs.Ff(i.sections,i.slides,o,r);s.sections!==i.sections&&n(s.sections,s.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 $o(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function ap(e){let{store:t,ops:n}=e;function o(r,i,s){let a=e.getHandler();a&&a.applyLayoutToSlide(r,i,[...t.get().slides]).then(async l=>{let p=await a.getTemplateElementsForSlide(l.id),d=t.get();if(d.slides[r]?.id===s){n.pushHistory();let u=[...d.slides];u[r]=l,t.set({slides:u,templateElementsBySlideId:{...d.templateElementsBySlideId,[l.id]:p}}),n.commitChange();}},()=>{}).catch(()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,s=chunk24B6ZCFG_cjs.Hf(i+1),a=$o([...r.slides.slice(0,i),s,...r.slides.slice(i)]);t.set({slides:a,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 s=r.currentSlide+1,a={...chunk24B6ZCFG_cjs.l(i),id:chunk24B6ZCFG_cjs.Gf()},l=r.templateElementsBySlideId[i.id]??[],p=$o([...r.slides.slice(0,s),a,...r.slides.slice(s)]);t.set({slides:p,templateElementsBySlideId:{...r.templateElementsBySlideId,[a.id]:l.map(chunk24B6ZCFG_cjs.k)},currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=$o(r.slides.filter((l,p)=>p!==r.currentSlide)),s=Math.min(r.currentSlide,i.length-1),a={...r.templateElementsBySlideId};delete a[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:a,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let s=t.get();if(!s.editable||!r)return;n.pushHistory();let a=s.currentSlide+1,l={...chunk24B6ZCFG_cjs.Hf(a+1),layoutPath:r,...i?{layoutName:i}:{}},p=$o([...s.slides.slice(0,a),l,...s.slides.slice(a)]);t.set({slides:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(a,r,l.id);},insertSlideFromTemplate(r){let i=t.get();if(!i.editable)return;n.pushHistory();let s=i.currentSlide+1,a=chunk24B6ZCFG_cjs.Lf(r,chunk24B6ZCFG_cjs.Gf(),s+1,{slideWidth:i.canvasSize.width,slideHeight:i.canvasSize.height,scheme:chunk24B6ZCFG_cjs.If(i.colorScheme)}),l=$o([...i.slides.slice(0,s),a,...i.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},getTemplateScheme(){return chunk24B6ZCFG_cjs.If(t.get().colorScheme)},applyLayout(r){let i=t.get(),s=i.slides[i.currentSlide];!i.editable||!s||!r||o(i.currentSlide,r,s.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide],s=chunk24B6ZCFG_cjs.Ii(i);!r.editable||!i||!s||o(r.currentSlide,s,i.id);}}}var zM=24;function qo(e,t){if(!Le(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 li(e,t,n){if(!Le(e))return {};let o=n?.text??io(),r=o===void 0?e:{...e,text:o,textSegments:n?.textSegments??chunk24B6ZCFG_cjs.ph(o,e.textSegments,e.textStyle)},i=chunk24B6ZCFG_cjs.lg(r.textSegments,{preserveCaret:true});return i.kind!=="supported"||i.snapshot&&i.snapshot.elementId!==e.id?{}:{...o===void 0?{}:{text:o},...chunk24B6ZCFG_cjs.og(r,t,i.selection,i.snapshot?.textSegments).patch}}function pi(e,t){let n=lt(e).paragraphMarginLeft,o=Math.max(0,n+t*zM);return qo(e,{paragraphMarginLeft:o})}function sp(e,t){return qo(e,{align:t})}function lp(e,t){return qo(e,{lineSpacing:t})}function JP(e,t){return qo(e,{textDirection:t})}function eA(e,t){return qo(e,{columnCount:Math.max(1,Math.round(t))})}function pp(e,t){return {toggleBold:()=>t(n=>ao(n,"bold")),toggleItalic:()=>t(n=>ao(n,"italic")),toggleUnderline:()=>t(n=>ao(n,"underline")),toggleStrikethrough:()=>t(n=>ao(n,"strikethrough")),toggleTextShadow:()=>t(n=>Ws(n)),changeFontSize:n=>t(o=>Ns(o,n)),stepFontSize:n=>t(o=>jE(o,n)),setFontSize:n=>t(o=>Vo(o,n)),setFontFamily:n=>t(o=>Us(o,n)),setTextColor:(n,o)=>{ct(e,n),t(r=>_s(r,n,o));},setHighlightColor:n=>{ct(e,n),t(o=>Gs(o,n));},setCharacterSpacing:n=>t(o=>Ks(o,n)),changeCase:n=>t((o,r)=>{if(!r)return $s(o,n);let{text:i,textSegments:s}=chunk24B6ZCFG_cjs.Cs(r,null,n);return {text:i,textSegments:s}}),clearFormatting:()=>t(n=>qs(n)),toggleBulletList:()=>t((n,o)=>li(n,"bullet",o)),toggleNumberedList:()=>t((n,o)=>li(n,"numbered",o)),increaseIndent:()=>t(n=>pi(n,1)),decreaseIndent:()=>t(n=>pi(n,-1)),setTextAlign:n=>t(o=>sp(o,n)),setLineSpacing:n=>t(o=>lp(o,n)),setTextDirection:n=>t(o=>JP(o,n)),setColumnCount:n=>t(o=>eA(o,n))}}function dp(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i,s){let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l)return;let p=Math.max(0,Math.round(r));n.pushHistory();let d=s?{advanceOnClick:s.onClick,advanceAfterMs:s.afterMs}:{};if(i){let u={type:o,durationMs:p,...d};t.set({slides:chunk24B6ZCFG_cjs.Qr(a.slides,{transition:u})});}else {let u={...l.transition,type:o,durationMs:p,...d};t.set({slides:chunk24B6ZCFG_cjs.Pr(a.slides,a.currentSlide,{transition:u})});}n.commitChange();},applyTransitionDraft(o,r){let i=t.get(),s=i.slides[i.currentSlide];if(!i.editable||!s)return;let a=chunk24B6ZCFG_cjs.Di(s,o),l=new Set(chunk24B6ZCFG_cjs.Ei(i.slides.length,i.currentSlide,r));n.pushHistory(),t.set({slides:i.slides.map((p,d)=>l.has(d)?{...p,transition:{...a}}:p)}),n.commitChange();},applyTransitionChange(o){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let s=chunk24B6ZCFG_cjs.pi(i.transition,o);t.set({slides:chunk24B6ZCFG_cjs.Pr(r.slides,r.currentSlide,{transition:s})}),n.commitChange();}}}var NM=new Set(["showGuides","snapToGrid","snapToShape"]);function cp(e){return NM.has(e)}function tA(e){return {autoSave:true,spellCheck:false,reducedMotion:false,showGrid:e.showGrid,showRulers:e.showRulers,snapToGrid:e.snapToGrid,snapToObjects:e.snapToShape,showGuides:e.showGuides}}function mp(e,t){let n=chunk24B6ZCFG_cjs.Cp({viewProperties:t},tA(e));return {snapToGrid:n.snapToGrid,snapToShape:n.snapToObjects??e.snapToShape,showGuides:n.showGuides??e.showGuides}}function up(e,t,n){let o=tA({...e,[t]:n}),r=chunk24B6ZCFG_cjs.Dp(o);return {...e.viewProperties,slideViewPr:{...e.viewProperties?.slideViewPr,...r.slideViewPr},...r.gridSpacing?{gridSpacing:r.gridSpacing}:{}}}function xp(e){let{doc:t,store:n,ops:o}=e,r=Dl(n,o),i=Gl({store:n,ops:o,getHandler:e.getHandler}),s=a=>{if(!a)return;let l=n.get();!l.editable||!l.slides[l.currentSlide]||(o.pushHistory(),n.set({slides:chunk24B6ZCFG_cjs.Nr(l.slides,l.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {insertElement:s,...pp(n,r),...zl({store:n,ops:o,applyToSelected:r}),..._l({store:n,ops:o}),...ap({store:n,ops:o,getHandler:e.getHandler}),...Nl({store:n,ops:o}),...dp({store:n,ops:o}),...Rl({store:n,ops:o}),...op(r),...ql({store:n,ops:o}),...i,...NP({store:n,ops:o,deck:i}),...ZP({store:n,ops:o}),...zP({doc:t,store:n,ops:o}),sections:ip(n,o),masterView:QP({doc:t,getTranslator:e.getTranslator,store:n,ops:o,getHandler:e.getHandler,setHandler:e.setHandler}),comments:HP({store:n,ops:o,getUserName:e.getUserName}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:(a,l)=>{ct(n,a),r(p=>pt(p,chunk24B6ZCFG_cjs.Ji(a,l)));},setShapeStroke:(a,l)=>{ct(n,a),r(p=>pt(p,chunk24B6ZCFG_cjs.Ki(a,l)));},setShapeStrokeWidth:a=>r(l=>pt(l,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(l=>pt(l,a)),setShapeType:a=>r(l=>l.type==="shape"?{shapeType:a}:{}),pushRecentColor:a=>ct(n,a),setGeometry(a){r(()=>{let l={};return a.x!==void 0&&Number.isFinite(a.x)&&(l.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(l.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(l.width=Math.max(chunk24B6ZCFG_cjs.q,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(l.height=Math.max(chunk24B6ZCFG_cjs.q,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(l.rotation=a.rotation),l});},insert(a,l){let p=n.get();p.slides[p.currentSlide]&&s(jl(a,p.canvasSize,l));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await si(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await Yl(t,a.canvasSize));},insertChart(a=chunk24B6ZCFG_cjs.wn){let l=n.get();l.slides[l.currentSlide]&&s(Xl(a,l.canvasSize));},insertSmartArt(a,l){let p=n.get();p.slides[p.currentSlide]&&s(Ql(a,l,p.canvasSize));},insertEquation(a){let l=n.get();l.slides[l.currentSlide]&&s(Zl(a,l.canvasSize));},updateEquation:(a,l)=>o.updateEquation(a,l),insertActionButton(a){let l=n.get();l.slides[l.currentSlide]&&s(Jl(a,l.canvasSize));},insertField(a,l){let p=n.get();if(!p.slides[p.currentSlide])return;let d=l??ep(a,{slideNumber:p.currentSlide+1});s(tp(a,d,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),selectAll(){let a=n.get(),l=U(a).filter(p=>chunk24B6ZCFG_cjs.lo(p.id,a.editTemplateMode)).map(p=>p.id);l.length>0&&o.select(l.at(-1)??null,l);},toggleViewOption(a){let l=n.get(),p=!l[a];n.set(cp(a)?{[a]:p,viewProperties:up(l,a,p)}:{[a]:p});for(let d of t.querySelectorAll(".pptxv"))d.classList.toggle(`pptxv-${a}`,p);},addGuide(a,l){let p=n.get(),d=chunk24B6ZCFG_cjs.em(`guide-${Date.now()}`,a,p.canvasSize);n.set({guides:[...p.guides,l===void 0?d:{...d,position:l}]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await si(t,n.get().canvasSize);!a||a.type!=="image"||r(l=>l.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 gp(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?chunk24B6ZCFG_cjs.mm(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let l=chunk24B6ZCFG_cjs.mm(a.slides,r,{matchCase:s}),{slides:p,replacements:d}=chunk24B6ZCFG_cjs.nm(a.slides,l,0,i);return o(p,d),d},replaceAll(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let{slides:l,replacements:p}=chunk24B6ZCFG_cjs.om(a.slides,r,i,{matchCase:s});return o(l,p),p}}}function oA(e,t,n){let o=()=>{let l=n.store.get(),p=n.getHandler(),d=l.slides[l.currentSlide];return !l.editable||l.loading||l.error||l.presenting||l.masterViewTarget||l.editTemplateMode||l.drawTool!=="select"||n.isEditing()||!d||!p?null:{documentId:p,slideId:d.id,canvasSize:l.canvasSize}},r=()=>chunk24B6ZCFG_cjs.ho(e,{getCanvas:()=>t,getTarget:o,insertElement:n.insertElement}),i=o(),s=r(),a=n.store.subscribe(()=>{let l=o();(l?.documentId!==i?.documentId||l?.slideId!==i?.slideId||l?.canvasSize.width!==i?.canvasSize.width||l?.canvasSize.height!==i?.canvasSize.height)&&(s(),s=r()),i=l;});return ()=>{a(),s();}}function bp(e){return t=>{if(!e.isActive())return;let{action:n,dx:o,dy:r}=chunk24B6ZCFG_cjs.Wq(t,{canPaste:e.canPaste?.(),hasSelection:e.getSelectedId()!==null,isTextInputTarget:chunk24B6ZCFG_cjs.Bl(t.target),isControlTarget:chunk24B6ZCFG_cjs.Cl(t.target)},e.getKeyboardCustomization?.());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;case "alignLeft":e.setTextAlign?.("left");break;case "alignCenter":e.setTextAlign?.("center");break;case "alignRight":e.setTextAlign?.("right");break;case "alignJustify":e.setTextAlign?.("justify");break;case "increaseFontSize":e.stepFontSize?.("increase");break;case "decreaseFontSize":e.stepFontSize?.("decrease");break;case "copyFormat":e.copyFormat?.();break;case "pasteFormat":e.pasteFormat?.();break;case "newSlide":e.addSlide?.();break;case "hyperlink":e.openHyperlink?.();break;case "findReplace":e.toggleFindReplace?.();break;case "clearFormatting":e.clearFormatting?.();break;case "cycleSelectionNext":e.cycleSelection?.("next");break;case "cycleSelectionPrev":e.cycleSelection?.("prev");break;case "pasteSpecial":e.onPasteSpecial?.();break;}}}var _M=e=>t=>J(e,t);function di(e,t){return chunk24B6ZCFG_cjs.lo(t,e.editTemplateMode)&&chunk24B6ZCFG_cjs._e(J(e,t),"select")}function jo(e,t,n){return chunk24B6ZCFG_cjs.cf(t,_M(e),n)}function nA(e,t){let n=e.selectedElementIds.length>1&&e.selectedElementIds.includes(t)?e.selectedElementIds:[t];return jo(e,n,"move").length>0}var GM=chunk24B6ZCFG_cjs.Ze(void 0);function UM(e,t){let n={...e};for(let o of Object.keys(n))n[o]&&=t[o];return n}function ci(e){return e.selectedElementIds.reduce((t,n)=>UM(t,chunk24B6ZCFG_cjs.Ze(J(e,n))),GM)}function rA(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 iA(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null}}function aA(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),s=J(i,t);if(s?.type!=="table"||!s.tableData?.rows[n]?.cells[o])return;let a=e.transformCommittedText?e.transformCommittedText(r):r;e.pushHistory();let l=s.tableData.rows.map((p,d)=>({...p,cells:p.cells.map((u,m)=>d===n&&m===o?chunk24B6ZCFG_cjs.oe(u,a):u)}));e.store.set(Z(i,U(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:l}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=J(o,t);!r||!chunk24B6ZCFG_cjs.e(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(Z(o,U(o).map(i=>i.id===t&&chunk24B6ZCFG_cjs.e(i)?{...i,textSegments:i.textSegments?.map(s=>{if(!s.equationXml)return s;let{equationSourceXml:a,...l}=s;return {...l,equationXml:n}})}:i))),e.commitChange());}}}var KM=100,WM=800;function fp(e){let{store:t}=e,n=new chunk24B6ZCFG_cjs.yf({maxDepth:KM}),o=0,r=(m=t.get())=>m.selectedElementId?J(m,m.selectedElementId):void 0,i=(m,g=m?[m]:[])=>t.set(iA(m,g)),s=()=>({slides:chunk24B6ZCFG_cjs.Mr(t.get().slides),sections:structuredClone(t.get().sections),coreProperties:structuredClone(t.get().coreProperties),appProperties:structuredClone(t.get().appProperties),customProperties:structuredClone(t.get().customProperties),templateElementsBySlideId:chunk24B6ZCFG_cjs.m(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)}),a=(m="")=>{n.record(s(),m),o=0,e.onHistoryChange();},l=()=>{t.set({dirty:true}),e.onHistoryChange(),e.onChange?.();},p=(m,g)=>{let x=t.get(),b=U(x).map(v=>v.id===m?{...v,...g}:v);t.set(Z(x,b));},d=m=>{m&&(t.set({slides:chunk24B6ZCFG_cjs.Mr(m.slides),sections:structuredClone(m.sections),coreProperties:structuredClone(m.coreProperties),appProperties:structuredClone(m.appProperties),customProperties:structuredClone(m.customProperties),templateElementsBySlideId:chunk24B6ZCFG_cjs.m(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}),l());},u=aA({store:t,pushHistory:a,commitChange:l,transformCommittedText:e.transformCommittedText});return {readInlineList:e.readInlineList,formatInlineList:e.formatInlineList,cancelInlineList:e.cancelInlineList,selectedElement:r,select:i,pushHistory:a,commitChange:l,patchGeometry:p,deleteSelected(){let m=t.get(),g=m.selectedElementId;!m.editable||!g||!r(m)||(a(),t.set({...Z(m,U(m).filter(x=>!m.selectedElementIds.includes(x.id))),selectedElementId:null,selectedElementIds:[]}),l());},duplicateSelected(){let m=t.get(),g=m.selectedElementId;if(!m.editable||!g)return null;let x=r(m);if(!x)return null;let b=chunk24B6ZCFG_cjs._(x);return b.x+=20,b.y+=20,a(),t.set({...Z(m,[...U(m),b]),selectedElementId:b.id,selectedElementIds:[b.id]}),l(),b.id},nudgeSelected(m,g){let x=t.get(),b=r(x),v=x.selectedElementId;if(!b||!v)return;let f=Date.now();f-o>WM&&a(),o=f,t.set(Z(x,U(x).map(S=>S.id===v?{...S,x:b.x+m,y:b.y+g}:S))),l();},commitInlineText(m,g,x){let b=t.get(),v=J(b,m);if(!v)return;let f=e.transformCommittedText?e.transformCommittedText(g):g;a();let S=typeof document<"u"?document.querySelector("[data-inline-editor]"):null,y=Bs(v,S),h=zs(v,S);t.set(Z(b,U(b).map(C=>C.id===m?{...C,...Kr(v,f,x),...y!==void 0?{height:y}:{},...h!=="unchanged"?{textStyle:{...v.textStyle,autoFitFontScale:h.fontScale,autoFitLineSpacingReduction:h.lnSpcReduction}}:{}}:C))),l();},commitNotes(m,g){let x=t.get(),b=x.slides[x.currentSlide];!x.editable||!b||b.notes===m&&g===void 0||(a(),t.set({slides:chunk24B6ZCFG_cjs.Or(x.slides,x.currentSlide,m,g)}),l());},setHandoutSlidesPerPage(m){rA({store:t,pushHistory:a,commitChange:l},m);},applyFormatPainter(m,g){let x=t.get(),b=J(x,m),v=J(x,g);return !x.editable||!b||!v||m===g?false:(a(),t.set(Z(x,U(x).map(f=>f.id===g?chunk24B6ZCFG_cjs.oh(f,chunk24B6ZCFG_cjs.nh(b)):f))),l(),true)},...u,updateDocumentProperties(m,g,x){t.get().editable&&(a(),t.set({coreProperties:structuredClone(m),appProperties:structuredClone(g),customProperties:structuredClone(x)}),l());},updatePresentationProperties(m){t.get().editable&&(a(),t.set({presentationProperties:structuredClone(m)}),l());},updateSections(m){t.get().editable&&(a(),t.set({sections:structuredClone(m)}),l());},updateHeaderFooter(m){t.get().editable&&(a(),t.set({headerFooter:structuredClone(m)}),l());},updateCustomShows(m){t.get().editable&&(a(),t.set({customShows:structuredClone(m)}),l());},undo(){d(n.undo(s())?.snapshot);},redo(){d(n.redo(s())?.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(),b=e.getPendingInlineTextEdit?.(),v=b?e.transformCommittedText?.(b.snapshot.text)??b.snapshot.text:void 0,f=b&&"masterView"in b.target?chunk24B6ZCFG_cjs.Vr(x,b.target.masterView,b.snapshot,v):null,S=chunk24B6ZCFG_cjs.oo(x.slides,x.templateElementsBySlideId).map(h=>b&&"slideId"in b.target&&h.id===b.target.slideId?{...h,elements:[...chunk24B6ZCFG_cjs.Ur(h.elements,b.snapshot,v)]}:h),y=await chunk24B6ZCFG_cjs.vp(g,S,chunk24B6ZCFG_cjs.zp({sections:x.sections,coreProperties:x.coreProperties,appProperties:x.appProperties,customProperties:x.customProperties,headerFooter:x.headerFooter,presentationProperties:x.presentationProperties,viewProperties:x.viewProperties,customShows:x.customShows,tagCollections:x.tagCollections,slideMasters:f?.slideMasters??x.slideMasters,notesMaster:f?.notesMaster??x.notesMaster,handoutMaster:f?.handoutMaster??x.handoutMaster,tableStyleMap:x.tableStyleMap,tableStylesDefaultId:x.tableStylesDefaultId,tableStylesToDelete:x.tableStylesToDelete,outputFormat:m,slideSize:chunk24B6ZCFG_cjs.nj({current:x.slideSize,canvas:x.canvasSize}).size,embedFonts:x.embedFonts}),{password:x.presentationPassword,passwordProtected:x.presentationPassword!==null});return t.set({dirty:false}),y}}}function sA(e){let{doc:t,store:n,ops:o}=e,r=null,i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l);if(!p)return;let d=e.getScale();r.el.style.left=`${Math.min(r.startX,p.x)*d}px`,r.el.style.top=`${Math.min(r.startY,p.y)*d}px`,r.el.style.width=`${Math.abs(p.x-r.startX)*d}px`,r.el.style.height=`${Math.abs(p.y-r.startY)*d}px`;}function a(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l),d=n.get(),u=p?jo(d,chunk24B6ZCFG_cjs.Re({startX:r.startX,startY:r.startY,currentX:p.x,currentY:p.y},U(d)),"select"):[],m=r.additive?chunk24B6ZCFG_cjs.Se(d.selectedElementIds,u):u;r.el.remove(),r=null,i(),o.select(m.at(-1)??null,m);}return {isActive:()=>r!==null,begin(l){let p=e.stagePoint(l),d=e.getOverlayRoot();if(!p||!d)return;let u=t.createElement("div");u.className="pptxv-marquee",d.appendChild(u),r={pointerId:l.pointerId,startX:p.x,startY:p.y,additive:chunk24B6ZCFG_cjs.Te(l),el:u},window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a);},dispose(){r?.el.remove(),r=null,i();}}}function lA(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 s=t.target instanceof Element?t.target.closest("td"):null;if(!n||s?.dataset.rowIndex===void 0||s.dataset.cellIndex===void 0)return false;let a={row:Number(s.dataset.rowIndex),column:Number(s.dataset.cellIndex)},l=o.selectedTableCell,p=t.shiftKey&&o.selectedElementId===n&&l?jM(l,a,qM(o,n)):[a];return i.select(n,[n]),r.set({selectedTableCell:t.shiftKey&&l?l:a,selectedTableCells:p}),true}function vp(e,t,n=10){return t?{...e,x:Math.round(e.x/n)*n,y:Math.round(e.y/n)*n}:e}function pA(e){return e.snapToShape?U(e).map(({id:t,x:n,y:o,width:r,height:i})=>({id:t,x:n,y:o,width:r,height:i})):[]}var $M={rows:[],columnWidths:[]};function qM(e,t){let n=J(e,t);return (n?.type==="table"?n.tableData:void 0)??$M}function jM(e,t,n){let o=chunk24B6ZCFG_cjs.re(e.row,e.column,t.row,t.column,n);return chunk24B6ZCFG_cjs.se(o).map(({row:r,col:i})=>({row:r,column:i}))}function dA(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 cA(e,t){if(t.size===0)return;let n=e.get(),o=U(n),r=chunk24B6ZCFG_cjs.Vg(o,t);r.length!==0&&e.set(Z(n,chunk24B6ZCFG_cjs.Wg(o,r)));}var YM={move:"move",resize:"resize",rotate:"rotate"};function mA(e){let{store:t,ops:n}=e,o=[],r=null,i="move",s=new Set,a=l=>{let p=t.get(),d=U(p).filter(m=>p.selectedElementIds.includes(m.id));if(d.length>1&&p.selectedElementIds.includes(l))return chunk24B6ZCFG_cjs.gf(d)??void 0;let u=J(p,l);return u?{x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation??0}:void 0};return chunk24B6ZCFG_cjs.Rr({getScale:e.getScale,getElementBox:a,getSiblings:()=>pA(t.get()),getStageOrigin(){let l=e.getOverlay()?.root.getBoundingClientRect();return {left:l?.left??0,top:l?.top??0}},onStart(l,p){let d=t.get();i=p,o=U(d).filter(u=>d.selectedElementIds.includes(u.id)).map(({id:u,x:m,y:g,width:x,height:b,rotation:v})=>({id:u,x:m,y:g,width:x,height:b,rotation:v})),r=chunk24B6ZCFG_cjs.gf(o),s=new Set(jo(d,o.length>0?o.map(u=>u.id):[l],YM[p])),n.pushHistory(),t.set({interactionActive:true});},onPreview(l,p){let d=t.get();if(l=vp(l,d.snapToGrid,chunk24B6ZCFG_cjs.Ye(d.viewProperties?.gridSpacing,10)),o.length>1&&r&&i!=="rotate"){let u=i==="move"?chunk24B6ZCFG_cjs.hf(o,l.x-r.x,l.y-r.y):chunk24B6ZCFG_cjs.if(o,r,l);for(let m of u)s.has(m.id)&&n.patchGeometry(m.id,{...m,rotation:m.rotation??0});}else s.has(l.id)&&n.patchGeometry(l.id,l);e.getOverlay()?.setSnapLines(p,e.getScale());},onEnd(l,p,d){if(e.getOverlay()?.setSnapLines([],1),l&&o.length<=1&&s.has(d)){let u=t.get(),m=vp(l,u.snapToGrid,chunk24B6ZCFG_cjs.Ye(u.viewProperties?.gridSpacing,10));n.patchGeometry(d,m);}t.set({interactionActive:false}),p&&(cA(t,new Set([...s,d])),n.commitChange());}})}function uA(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}}function xA(e){return e.masterViewTarget?{masterView:{tab:e.masterViewTab,...e.masterViewTarget}}:e.slides[e.currentSlide]?{slideId:e.slides[e.currentSlide].id}:void 0}function gA(e,t,n){let o=e.slides[e.currentSlide];return n&&!e.masterViewTarget&&o?.elements.some(r=>r.id===t)?{patcher:n,slideId:o.id}:void 0}function bA(e,t,n){let o=e.slides[e.currentSlide];if(!n?.readAccepted||!t||!("slideId"in t)||e.loading||e.masterViewTarget||o?.id!==t.slideId)return;let r=n.readAccepted();if(!r||!n.checkModel?.(o.elements.find(s=>s.id===r.elementId)))return;let i=chunk24B6ZCFG_cjs.Ur(o.elements,r);return i===o.elements?void 0:e.slides.map(s=>s===o?{...o,elements:[...i]}:s)}function fA(e,t,n){if(!(!t||!hp(e,t))){if(n?.kind==="unsupported"&&(n.reason==="composition-active"||n.reason==="input-active"))throw new Error("Finish the current text input before saving.");if(n?.kind==="supported")return {snapshot:n.snapshot,target:t}}}function hp(e,t){return !(!t||!e.editable||e.presenting||e.loading||e.error||"slideId"in t&&(e.masterViewTarget||e.slides[e.currentSlide]?.id!==t.slideId)||"masterView"in t&&JSON.stringify({tab:e.masterViewTab,...e.masterViewTarget})!==JSON.stringify(t.masterView))}function vA(e,t,n,o,r=()=>true){let i=chunk24B6ZCFG_cjs.Bs(e);return {read(){let s=t();if(s?.checkModel){if(!r()||!s.checkModel(n())){o();return}return s.readList()}if(s?.readList()&&!r()){o();return}let a=n();if(a&&!s?.readList()&&s?.activateList(a)===false){let d=chunk24B6ZCFG_cjs.ig(s.el);return o(),{kind:"unsupported",reason:"model-replaced",text:d}}let l=s?.readList();if(!l)return l;let p=i.check(a,l);if(p.kind==="retire")return o(),{kind:"unsupported",reason:"model-replaced",text:l.kind==="supported"?l.snapshot.text:l.text};if(p.kind==="format"){if(!s?.formatSnapshot(p.snapshot)){o();return}return s.readList()}return l},format(s){let a=t()?.formatSnapshot(s)??false;return a&&i.expect(s),a}}}var XM=2;function hA(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return [];let t=e.selectedElementId?J(e,e.selectedElementId):void 0;return t?chunk24B6ZCFG_cjs.qh(t):[]}function yA(e){let{store:t,ops:n}=e,o=null,r=l=>{if(!o)return;let{elementId:p}=o,d=t.get(),u=U(d);t.set(Z(d,u.map(m=>m.id===p&&chunk24B6ZCFG_cjs.f(m)?{...m,shapeAdjustments:{...m.shapeAdjustments,...l}}:m)));},i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!o)return;let p=e.getScale(),d=p>0?p:1,u=(l.clientX-o.startClientX)/d,m=(l.clientY-o.startClientY)/d;if(!o.moved){if(Math.hypot(l.clientX-o.startClientX,l.clientY-o.startClientY)<=XM)return;o.moved=true,n.pushHistory(),t.set({interactionActive:true});}r(chunk24B6ZCFG_cjs.rh(o,u,m));}function a(){let l=o?.moved??false;o=null,i(),l&&(t.set({interactionActive:false}),n.commitChange());}return {begin(l,p){let d=t.get(),u=d.selectedElementId,m=u?J(d,u):void 0;!u||!m||!p||!chunk24B6ZCFG_cjs.f(m)||(l.preventDefault(),l.stopPropagation(),o=chunk24B6ZCFG_cjs.sh(m,p,l.clientX,l.clientY),window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a));},isActive:()=>o!==null,dispose(){o=null,i();}}}function SA(e){let{doc:t,cell:n,element:o,row:r,column:i,ops:s}=e,a=t.createElement("input");a.type="text",a.className="pptxv-inline-editor pptxv-table-cell-editor",a.dataset.inlineEditor="",a.value=o.tableData?.rows[r]?.cells[i]?.text??"",Object.assign(a.style,{boxSizing:"border-box",width:"100%",height:"100%"});let l=t.createDocumentFragment();for(;n.firstChild;)l.appendChild(n.firstChild);n.appendChild(a);let p=false,d=m=>{m.composedPath().includes(a)||u(true);},u=m=>{p||(p=true,t.removeEventListener("pointerdown",d,true),m&&s.commitTableCell(o.id,r,i,a.value),n.isConnected?n.replaceChildren(m?t.createTextNode(a.value):l):a.remove());};return a.addEventListener("blur",()=>u(true)),a.addEventListener("pointerdown",m=>m.stopPropagation()),a.addEventListener("keydown",m=>{m.stopPropagation(),m.key==="Escape"?u(false):m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),u(true));}),t.addEventListener("pointerdown",d,true),a.focus(),a.select(),{close:u}}function mi(e){let t=e.elementId??chunk24B6ZCFG_cjs.Hm(e.event.target,e.stage),n=t?J(e.state,t):void 0,o=n&&chunk24B6ZCFG_cjs.e(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||!chunk24B6ZCFG_cjs.$e(n)?{handled:false,tableSession:null}:{handled:true,tableSession:SA({doc:e.doc,cell:r,element:n,row:Number(r.dataset.rowIndex),column:Number(r.dataset.cellIndex),ops:e.ops})}}var QM=500;function ZM(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 CA(e,t,n){let o=ZM(e,t),r=chunk24B6ZCFG_cjs.Hm(e.target,n)??chunk24B6ZCFG_cjs.Hm(o,n);return {cell:o,id:r}}function wA(){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}`,s=e?.key===i&&t.timeStamp-e.time<=QM;return e=s?null:{key:i,time:t.timeStamp},s}}function EA(e){let t=wA(),n=o=>{let r=e.getState();if(!r.editable||r.presenting||o.button!==0)return;let{cell:i,id:s}=CA(o,e.doc,e.getStage());if(!i||!t(o,s,i))return;let a=mi({event:o,state:r,doc:e.doc,stage:e.getStage(),overlay:e.getOverlay(),ops:e.ops,elementId:s,cell:i,onEditEquation:e.onEditEquation});a.handled&&(o.preventDefault(),o.stopPropagation(),e.onOpen(a.tableSession));};return e.doc.addEventListener("pointerdown",n,true),()=>e.doc.removeEventListener("pointerdown",n,true)}function TA(e){let{doc:t,store:n,ops:o}=e,r=null,i,s,a=null,l=EA({doc:t,getState:n.get,getStage:e.getStageRoot,getOverlay:()=>e.getOverlay()?.root??null,ops:o,onOpen:h=>a=h,onEditEquation:e.onEditEquation}),p=mA({store:n,ops:o,getScale:e.getScale,getOverlay:e.getOverlay}),d=yA({store:n,ops:o,getScale:e.getScale}),u=h=>dA(e.getOverlay()?.root,e.getScale(),h),m=sA({doc:t,store:n,ops:o,getScale:e.getScale,getOverlayRoot:()=>e.getOverlay()?.root??null,stagePoint:u}),g=uA(),x=h=>{a?.close(h),a=null;let C=r;h?C?.commit():C?.cancel();},b=()=>s?.read()??r?.readList(),v=h=>e.getStageRoot()?.querySelector(`[data-element-id="${CSS.escape(h)}"]`)??null,f=(h,C)=>{v(h)?.classList.toggle("pptxv-inline-editing-source",C);},S=h=>{let C=n.get(),w=J(C,h),P=e.getOverlay();!w||!Wr(w)||!P||r||(o.select(h),P.setEditing(true),f(h,true),i=xA(C),r=$r({doc:t,overlayRoot:P.root,box:{x:w.x,y:w.y,width:w.width,height:w.height,rotation:w.rotation??0},scale:e.getScale(),element:w,spellCheck:C.spellCheckEnabled,collaboration:gA(C,h,e.getLivePatcher?.()),onInput:k=>e.onInlineTextInput?.(h,k),onCommit:(k,A)=>{e.flushInlineTextInput?.(),o.commitInlineText(h,k,A);},onSelectionChange:k=>n.set({selectedTextRange:k}),onLiveFormatKey:e.onInlineLiveFormatKey,onClose(){r=null,i=void 0,s=void 0,e.getOverlay()?.setEditing(false),f(h,false);}}),s=vA(w,()=>r,()=>J(n.get(),h),()=>x(false),()=>hp(n.get(),i)&&C.editTemplateMode===n.get().editTemplateMode));},y=(h,C)=>{let w=n.get(),P=mi({event:h,state:w,doc:t,ops:o,stage:e.getStageRoot(),overlay:e.getOverlay()?.root??null,onEditEquation:e.onEditEquation});if(P.handled){a=P.tableSession;return}C&&di(w,C)&&S(C);};return {onStagePointerDown(h){let C=n.get();if(!C.editable||C.presenting||h.button!==0)return;let w=chunk24B6ZCFG_cjs.Hm(h.target,e.getStageRoot());if((r||a)&&x(true),lA({event:h,elementId:w,state:C,store:n,ops:o,onEyedropper:e.onEyedropper}))return;if(C.formatPainterSourceId){w&&di(C,w)&&o.applyFormatPainter(C.formatPainterSourceId,w),n.set({formatPainterSourceId:null});return}let P=w!==null&&di(C,w);if(g(h.pointerType,P?w:null,h.timeStamp||Date.now())){h.preventDefault(),y(h,w);return}if(!P){m.begin(h);return}if(chunk24B6ZCFG_cjs.Te(h)){let k=C.selectedElementIds.includes(w)?C.selectedElementIds.filter(A=>A!==w):[...C.selectedElementIds,w];o.select(k.at(-1)??null,k);return}(C.selectedElementId!==w||C.selectedElementIds.length!==1)&&o.select(w,[w]),nA(n.get(),w)&&(h.preventDefault(),h.stopPropagation(),p.begin("move",w,h));},onStagePointerMove(h){if(!e.onCursorMove)return;let C=e.getOverlay()?.root.getBoundingClientRect(),w=e.getScale();!C||!(w>0)||e.onCursorMove((h.clientX-C.left)/w,(h.clientY-C.top)/w);},onStageDblClick(h){let C=n.get();if(!C.editable||C.presenting||r||a)return;let w=chunk24B6ZCFG_cjs.Hm(h.target,e.getStageRoot());y(h,w);},beginHandleGesture(h,C,w){let P=n.get(),k=P.selectedElementId,A=ci(P);!k||(h==="resize"?!A.resizable:!A.rotatable)||(C.preventDefault(),C.stopPropagation(),p.begin(h,k,C,w));},beginAdjustGesture:(h,C)=>d.begin(h,C),closeInline:x,readInlineList:b,retainAcceptedInlineText(){let h=bA(n.get(),i,r);h&&n.set({slides:h});},formatInlineList:h=>s?.format(h)??false,readPendingInlineTextEdit:()=>fA(n.get(),i,b()),hasActivePointerInteraction:()=>p.isActive()||d.isActive()||m.isActive(),inlineActive:()=>r!==null||a!==null,dispose(){x(false),l(),p.dispose(),d.dispose(),m.dispose();}}}var yp="#0ea5e9";function PA(e,t,n){let o=chunkOBVLNSK5_cjs.x(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=chunkOBVLNSK5_cjs.x(e,"path",{fill:"none",stroke:yp,"stroke-width":2,"stroke-dasharray":"6 4","vector-effect":"non-scaling-stroke"}),i=chunkOBVLNSK5_cjs.x(e,"circle",{r:5,fill:yp,opacity:.55}),s=chunkOBVLNSK5_cjs.x(e,"circle",{r:7,fill:"#ffffff",stroke:yp,"stroke-width":2,"aria-label":t("pptx.animation.motionPath.endHandle"),"data-pptx-motion-path-handle":"end"});o.append(r,i,s);let a=null,l=null,p=(x,b)=>({originX:x.x+x.width/2,originY:x.y+x.height/2,slideWidth:b.canvasSize.width,slideHeight:b.canvasSize.height}),d=(x,b,v)=>{let f=chunk24B6ZCFG_cjs.Rd(x,b),S=chunk24B6ZCFG_cjs.Sd(x,b);chunkOBVLNSK5_cjs.y(r,{d:f}),chunkOBVLNSK5_cjs.y(i,{cx:b.originX,cy:b.originY}),chunkOBVLNSK5_cjs.y(s,{cx:S.x,cy:S.y}),s.style.pointerEvents=v?"auto":"none",s.style.cursor=v?"move":"";},u=()=>{let x=l;l=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(!l||x.pointerId!==l.pointerId)return;let b=l.scale||1,v=(x.clientX-l.startClientX)/b,f=(x.clientY-l.startClientY)/b,S=chunk24B6ZCFG_cjs.Sd(l.basePath,l.frame),y=(S.x+v-l.frame.originX)/l.frame.slideWidth,h=(S.y+f-l.frame.originY)/l.frame.slideHeight;l.draft=chunk24B6ZCFG_cjs.Td(l.basePath,y,h),d(l.draft,l.frame,true);}function g(x){l&&x.pointerId===l.pointerId&&u();}return s.addEventListener("pointerdown",x=>{let b=a?.element,v=a?.path;!b||!v||!a?.canEdit||!chunk24B6ZCFG_cjs.Ud(v)||(x.stopPropagation(),x.preventDefault(),l={pointerId:x.pointerId,startClientX:x.clientX,startClientY:x.clientY,basePath:v,frame:p(b,a),scale:a.scale,draft:v},e.defaultView?.addEventListener("pointermove",m),e.defaultView?.addEventListener("pointerup",g),e.defaultView?.addEventListener("pointercancel",g));}),{root:o,mount(x){if(!a?.element||!a.path){o.remove();return}x&&o.parentElement!==x?x.appendChild(o):x||o.remove();},update(x){a=x;let{element:b,path:v}=x;if(!b||!v){o.remove();return}l||(chunkOBVLNSK5_cjs.y(o,{width:x.canvasSize.width,height:x.canvasSize.height}),d(v,p(b,x),x.canEdit&&chunk24B6ZCFG_cjs.Ud(v)));},destroy(){u(),o.remove();}}}function AA(e){let t=null;return {attach(){t?.destroy(),t=PA(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?chunk24B6ZCFG_cjs.$d(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 kA(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-context-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t("pptx.editPoints.menu")),r.dataset.pptxEditPointsMenu="true",r.style.position="absolute",r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.transform=`scale(${n.inverseScale})`,r.style.transformOrigin="0 0",r.style.zIndex="61";let i=s=>s.stopPropagation();r.addEventListener("pointerdown",i),r.addEventListener("mousedown",i),r.addEventListener("click",i),r.addEventListener("contextmenu",s=>{s.preventDefault(),s.stopPropagation();});for(let s of n.entries){if(s.separatorBefore){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-context-menu-separator");l.setAttribute("role","separator"),r.appendChild(l);}let a=chunkOBVLNSK5_cjs.w(e,"button","pptxv-context-menu-item");if(a.type="button",a.dataset.pptxEditPointsCommand=s.id,s.checked===void 0)a.setAttribute("role","menuitem");else {a.setAttribute("role","menuitemcheckbox"),a.setAttribute("aria-checked",String(s.checked));let l=chunkOBVLNSK5_cjs.w(e,"span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block",l.style.width="12px",l.style.marginRight="6px",l.textContent=s.checked?"\u2713":"",a.appendChild(l);}a.appendChild(e.createTextNode(t(s.labelKey))),a.disabled=s.disabled===true,a.addEventListener("click",()=>o(s.id)),r.appendChild(a);}return r}function JM(e,t,n){t.replaceChildren();let o=r=>({[chunk24B6ZCFG_cjs.Ds]:r});t.appendChild(chunkOBVLNSK5_cjs.x(e,"rect",{width:"100%",height:"100%",fill:"transparent"}));for(let r of n.segments){let i=chunkOBVLNSK5_cjs.x(e,"path",{d:r.d,fill:"none",stroke:"transparent","stroke-width":n.hitStrokeWidth,"pointer-events":"stroke",...o(r.target)});i.style.cursor="copy",t.appendChild(i);}t.appendChild(chunkOBVLNSK5_cjs.x(e,"path",{d:n.outlineD,fill:"none",stroke:chunk24B6ZCFG_cjs.Es.outlineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));for(let r of n.handles){t.appendChild(chunkOBVLNSK5_cjs.x(e,"line",{x1:r.anchorX,y1:r.anchorY,x2:r.x,y2:r.y,stroke:chunk24B6ZCFG_cjs.Es.handleLineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));let i=chunkOBVLNSK5_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:chunk24B6ZCFG_cjs.Es.handleFill,stroke:chunk24B6ZCFG_cjs.Es.handleStroke,"stroke-width":n.outlineWidth,...o(r.target)});i.style.cursor="move",t.appendChild(i);}for(let r of n.nodes){let i=chunkOBVLNSK5_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:r.selected?chunk24B6ZCFG_cjs.Es.selectedNodeFill:chunk24B6ZCFG_cjs.Es.nodeFill,stroke:r.selected?chunk24B6ZCFG_cjs.Es.selectedNodeStroke:chunk24B6ZCFG_cjs.Es.nodeStroke,"stroke-width":n.outlineWidth,"data-pptx-edit-points-node-type":r.type,"data-selected":r.selected?"true":void 0,...o(r.target)});i.style.cursor="move",t.appendChild(i);}}function IA(e){let{doc:t,t:n}=e,o=e.element.id,r=e.canvasSize,i=e.scale,s=null,a=null,l=chunkOBVLNSK5_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.editPoints.overlay"),"data-pptx-edit-points-overlay":"true","data-pptx-edit-points-element":o});l.style.position="absolute",l.style.left="0",l.style.top="0",l.style.zIndex="60",l.style.touchAction="none";let p=()=>{chunkOBVLNSK5_cjs.y(l,{width:r.width,height:r.height});let g=d.view(i);JM(t,l,g),s?.remove(),s=g.menu?kA(t,n,g.menu,x=>d.runCommand(x)):null,s&&a&&a.appendChild(s);},d=new chunk24B6ZCFG_cjs.Fs(e.element,{onCommit:g=>e.onCommit(o,g),onExit:()=>e.onExit(),onChange:()=>p(),hiddenCommands:e.hiddenCommands}),u=g=>chunk24B6ZCFG_cjs.Js(g,l,r.width,r.height);l.addEventListener("pointerdown",g=>{g.stopPropagation(),g.button===0&&(g.preventDefault(),l.setPointerCapture?.(g.pointerId),d.pointerDown(u(g)));}),l.addEventListener("pointermove",g=>d.pointerMove(u(g))),l.addEventListener("pointerup",g=>{l.hasPointerCapture?.(g.pointerId)&&l.releasePointerCapture(g.pointerId),d.pointerUp(u(g));}),l.addEventListener("contextmenu",g=>{g.preventDefault(),g.stopPropagation(),d.contextMenu(u(g));});for(let g of ["mousedown","click","dblclick"])l.addEventListener(g,x=>x.stopPropagation());let m=t.defaultView?chunk24B6ZCFG_cjs.Ks(d,t.defaultView):()=>{};return p(),{elementId:o,root:l,mount(g){if(a=g,!g){l.remove(),s?.remove();return}l.parentElement!==g&&g.appendChild(l),s&&s.parentElement!==g&&g.appendChild(s);},update(g,x,b){let v=b!==i||x.width!==r.width||x.height!==r.height;r=x,i=b,d.reconcile(g),v&&p();},destroy(){m(),l.remove(),s?.remove(),s=null;}}}var Sp="#2f528f";function LA(e){let{doc:t,t:n,tool:o}=e,r=e.canvasSize,i=chunkOBVLNSK5_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.freeformTool.overlay"),"data-pptx-freeform-tool-overlay":o});i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.zIndex="60",i.style.cursor="crosshair",i.style.touchAction="none";let s=chunkOBVLNSK5_cjs.x(t,"rect",{width:"100%",height:"100%",fill:"transparent"}),a=chunkOBVLNSK5_cjs.x(t,"g",{"pointer-events":"none"});i.append(s,a);let l=()=>{chunkOBVLNSK5_cjs.y(i,{width:r.width,height:r.height});let m=p.view();a.replaceChildren(),m.previewD&&a.appendChild(chunkOBVLNSK5_cjs.x(t,"path",{d:m.previewD,fill:"none",stroke:Sp,"stroke-width":m.strokeWidth,"pointer-events":"none"})),m.start&&a.appendChild(chunkOBVLNSK5_cjs.x(t,"circle",{cx:m.start.x,cy:m.start.y,r:m.start.size/2,fill:m.start.armed?Sp:"#ffffff",stroke:Sp,"stroke-width":m.strokeWidth,"pointer-events":"none","data-pptx-freeform-start":m.start.armed?"armed":"idle"}));},p=new chunk24B6ZCFG_cjs.Ns({tool:o,onCommit:m=>e.onCommit(m),onCancel:()=>e.onCancel(),onChange:()=>l()});p.setScale(e.scale);let d=m=>chunk24B6ZCFG_cjs.Is(i,m.clientX,m.clientY,r.width,r.height);i.addEventListener("pointerdown",m=>{m.stopPropagation(),m.preventDefault(),i.setPointerCapture?.(m.pointerId),p.pointerDown({...d(m),button:m.button});}),i.addEventListener("pointermove",m=>p.pointerMove(d(m))),i.addEventListener("pointerup",m=>{i.hasPointerCapture?.(m.pointerId)&&i.releasePointerCapture(m.pointerId),p.pointerUp();}),i.addEventListener("dblclick",m=>{m.stopPropagation(),p.doubleClick();}),i.addEventListener("contextmenu",m=>{m.preventDefault(),m.stopPropagation();});for(let m of ["mousedown","click"])i.addEventListener(m,g=>g.stopPropagation());let u=t.defaultView?chunk24B6ZCFG_cjs.Ks(p,t.defaultView):()=>{};return l(),{tool:o,root:i,mount(m){m?i.parentElement!==m&&m.appendChild(i):i.remove();},update(m,g){r=m,p.setScale(g),l();},destroy(){u(),i.remove();}}}function MA(e){let{doc:t,store:n}=e,o=null,r=null,i=()=>e.getStageWrap()?.querySelector(".pptxv-stage")??null,s=()=>{let u=e.getCustomization?.();return u?chunk24B6ZCFG_cjs.er(u):true},a=()=>{let u=o;o=null,u?.destroy();},l=()=>{let u=r;r=null,u?.destroy();},p=(u,m)=>{a(),r&&r.tool!==m&&l(),r??=LA({doc:t,t:e.getTranslator(),tool:m,canvasSize:u.canvasSize,scale:e.getScale(),onCommit:g=>{n.set({freeformTool:null}),e.insertElement(g);},onCancel:()=>n.set({freeformTool:null})}),r.update(u.canvasSize,e.getScale()),r.mount(i());},d=(u,m)=>{l();let g=J(u,m);if(!g||!chunk24B6ZCFG_cjs.Hs(g)||!s()){a(),n.set({editPointsElementId:null});return}o&&o.elementId!==m&&a(),o??=IA({doc:t,t:e.getTranslator(),element:g,canvasSize:u.canvasSize,scale:e.getScale(),hiddenCommands:e.getCustomization?.()?.hiddenEditPointsCommands,onCommit:(x,b)=>e.applyElementPatch(x,b),onExit:()=>{a(),n.set({editPointsElementId:null});}}),o.update(g,u.canvasSize,e.getScale()),o.mount(i());};return {startEditPoints(u){let m=n.get();return !m.editable||!s()||!chunk24B6ZCFG_cjs.Hs(J(m,u))?false:(n.set({editPointsElementId:u,freeformTool:null}),true)},armFreeformTool(u){n.set({freeformTool:u,...u?{editPointsElementId:null}:{}});},isEditingPoints(u){return u!==null&&n.get().editPointsElementId===u},sync(){let u=n.get(),m=u.editable&&!u.presenting;m&&u.freeformTool?p(u,u.freeformTool):m&&u.editPointsElementId?d(u,u.editPointsElementId):(l(),a());},detach(){l(),a();}}}function eD(e){let t=e?e.length===2?"corner":e==="n"||e==="s"?"horizontal-edge":"vertical-edge":"rotate",n=e?"var(--pptxv-resize-size, 10px)":"var(--pptxv-rotate-size, 12px)",{frame:o,artwork:r}=chunk24B6ZCFG_cjs.Ve(t,{width:n,height:n,radius:e?"2px":"50%",fill:"#fff",borderColor:"var(--pptx-ring)"});return {frame:{...o,marginLeft:`calc(${o.width} / -2)`,marginTop:`calc(${o.height} / -2)`},artwork:r}}function Cp(e,t){let{frame:n,artwork:o}=eD(t);Object.assign(e.style,n);let r=chunkOBVLNSK5_cjs.w(e.ownerDocument,"span","pptxv-control-artwork",o);r.setAttribute("data-pptx-handle-artwork",""),r.setAttribute("aria-hidden","true"),e.appendChild(r);}function wp(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-editor-overlay"),r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-sel-box");r.style.borderColor=chunk24B6ZCFG_cjs.We("var(--pptx-ring)"),r.hidden=true,o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-rotate-stem",{left:"50%",top:`${-chunk24B6ZCFG_cjs.Qe}px`,height:`${chunk24B6ZCFG_cjs.Qe}px`,background:chunk24B6ZCFG_cjs.We("var(--pptx-ring)")});r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"button","pptxv-rotate-knob",{left:"50%",top:`${-chunk24B6ZCFG_cjs.Qe}px`});s.type="button",s.setAttribute("data-pptx-compact",""),s.dataset.pptxHandleKind="rotate",s.setAttribute("aria-label",t("pptx.selectionOverlay.rotate")),s.addEventListener("pointerdown",x=>n.onRotatePointerDown(x)),Cp(s),r.appendChild(s);let a,l,p=[];for(let x of chunk24B6ZCFG_cjs.Oe){let{fx:b,fy:v}=chunk24B6ZCFG_cjs.Pe[x],f=chunkOBVLNSK5_cjs.w(e,"button","pptxv-sel-handle",{left:`${b*100}%`,top:`${v*100}%`,cursor:chunk24B6ZCFG_cjs.Pe[x].cursor});f.type="button",f.setAttribute("data-pptx-compact",""),f.dataset.handle=x,f.dataset.pptxHandleKind="resize",f.setAttribute("aria-label",t("pptx.selectionOverlay.resize",{handle:x})),f.addEventListener("pointerdown",S=>n.onHandlePointerDown(x,S)),f.appendChild(chunkOBVLNSK5_cjs.w(e,"span",void 0,chunk24B6ZCFG_cjs.Ue(x))),f.firstElementChild?.setAttribute("data-pptx-handle-hit",""),Cp(f,x),r.appendChild(f),p.push(f);}let d=[];function u(x){let b=chunkOBVLNSK5_cjs.w(e,"button","pptxv-adjust-handle");return b.type="button",b.setAttribute("data-pptx-compact",""),b.dataset.pptxHandleKind="adjust",b.setAttribute("aria-label",t("pptx.selectionOverlay.adjust")),b.addEventListener("pointerdown",v=>{let f=m[x];f&&n.onAdjustPointerDown(v,f);}),r.appendChild(b),b}let m=[],g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-snap-layer");return o.appendChild(g),{root:o,mount(x){o.parentElement!==x?(x.appendChild(o),l!==x&&(a?.(),l=x,a=chunk24B6ZCFG_cjs.Xe(s,{stem:i}))):x.lastElementChild!==o&&x.appendChild(o);},setBox(x,b){if(!x){r.hidden=true;return}r.hidden=false,r.style.left=`${x.x*b}px`,r.style.top=`${x.y*b}px`,r.style.width=`${x.width*b}px`,r.style.height=`${x.height*b}px`,r.style.setProperty("--pptx-selection-width",`${x.width*b}px`),r.style.setProperty("--pptx-selection-height",`${x.height*b}px`),r.style.borderWidth=`${b}px`,r.style.transform=x.rotation?`rotate(${x.rotation}deg)`:"none";},setHandleVisibility({resizable:x,rotatable:b}){for(let v of p)v.hidden=!x;i.hidden=!b,s.hidden=!b;},setAdjustHandles(x,b){for(;d.length<x.length;)d.push(u(d.length));m=x,d.forEach((v,f)=>{let S=x[f];v.hidden=S===void 0,S&&(v.style.left=`${S.left*b}px`,v.style.top=`${S.top*b}px`,v.style.cursor=S.cursor,v.dataset.pptxAdjustKey=S.key);});},setSnapLines(x,b){g.replaceChildren();for(let v of x){let f=chunkOBVLNSK5_cjs.w(e,"div",`pptxv-snap-line pptxv-snap-${v.axis==="v"?"v":"h"}`);v.axis==="v"?f.style.left=`${v.position*b}px`:f.style.top=`${v.position*b}px`,g.appendChild(f);}},setEditing(x){o.classList.toggle("is-editing",x),r.style.zIndex=x?"7":"";},destroy(){a?.(),o.remove();}}}var tD={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12",ppt:"application/vnd.ms-powerpoint"};function Ep(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=null,a=null,l=()=>{let I={editable:n.get().editable,canUndo:p.canUndo(),canRedo:p.canRedo()};e.getChrome().ribbon?.setEditState(I),e.getChrome().titleBar?.setEditState(I),e.getChrome().mobileToolbar?.setEditState(I);},p=fp({store:n,getHandler:e.getHandler,onChange:e.onChange,onHistoryChange:()=>l(),transformCommittedText:e.transformCommittedText,getPendingInlineTextEdit:()=>h.readPendingInlineTextEdit?.(),readInlineList:()=>h.readInlineList?.(),formatInlineList:I=>h.formatInlineList?.(I)??false,cancelInlineList:()=>h.closeInline(false)}),d=xp({doc:t,getTranslator:e.getTranslator,store:n,ops:p,getHandler:e.getHandler,setHandler:e.setHandler,getUserName:e.getUserName}),u=gp({store:n,ops:p}),m=(I,R)=>{let O=n.get();!O.editable||!U(O).some(B=>B.id===I)||(p.pushHistory(),n.set(Z(O,U(O).map(B=>B.id===I?{...B,...R}:B))),p.commitChange());},g=()=>{let I=n.get(),R=U(I).find(O=>O.id===I.selectedElementId);R&&ii(t,e.getTranslator(),R,O=>m(R.id,O));},x=()=>{let I=n.get();I.formatPainterSourceId&&I.selectedElementId&&p.applyFormatPainter(I.formatPainterSourceId,I.selectedElementId);},b=I=>{let R=chunk24B6ZCFG_cjs.Al(I);if(R==="bold")return d.toggleBold(),true;if(R==="italic")return d.toggleItalic(),true;if(R==="underline")return d.toggleUnderline(),true;let{action:O}=chunk24B6ZCFG_cjs.Wq(I,{isEditingText:true,canEdit:true,hasSelection:true},e.getKeyboardCustomization?.());switch(O){case "alignLeft":return d.setTextAlign("left"),true;case "alignCenter":return d.setTextAlign("center"),true;case "alignRight":return d.setTextAlign("right"),true;case "alignJustify":return d.setTextAlign("justify"),true;case "increaseFontSize":return d.stepFontSize("increase"),true;case "decreaseFontSize":return d.stepFontSize("decrease"),true;case "copyFormat":return d.toggleFormatPainter(),true;case "pasteFormat":return x(),true;case "hyperlink":return g(),true;case "clearFormatting":return d.clearFormatting(),true;case "find":case "findReplace":return e.getChrome().ribbon?.toggleFindReplace(),true;default:return false}},v=new Map,f=false;function S(){let I=e.getHandler();return I&&!f&&v.size===0&&(f=true,I.getLayoutPreviews().then(R=>{v=new Map(R.map(O=>[O.path,O])),y();}).catch(()=>{}).finally(()=>{f=false;})),v}let y=dP({store:n,getChrome:e.getChrome,selectedElement:I=>p.selectedElement(I),layoutPreviews:S,getHandler:e.getHandler}),h=TA({doc:t,store:n,ops:p,getScale:e.getScale,getOverlay:()=>o,getLivePatcher:e.getLivePatcher,getStageRoot:()=>s?.querySelector(".pptxv-stage")??null,onCursorMove:e.onCursorMove,onInlineTextInput:e.onInlineTextInput,flushInlineTextInput:e.flushInlineTextInput,onEditEquation:(I,R)=>e.getChrome().ribbon?.openEquationEditor(I,R),onEyedropper:I=>d.setShapeFill(I),onInlineLiveFormatKey:b}),C=$l({doc:t,store:n,editActions:d,interactions:h,getScale:e.getScale,getStageOrigin(){let I=o?.root.getBoundingClientRect();return {left:I?.left??0,top:I?.top??0}},getStageRoot:()=>s?.querySelector(".pptxv-stage")??null}),w=AA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getSelectedElement:I=>p.selectedElement(I),onChangePath:I=>d.setMotionPathData(I)}),P=MA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getCustomization:e.getCustomization,applyElementPatch:(I,R)=>m(I,R),insertElement:I=>d.insertElement(I)}),k=DP({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,actions:d}),A=()=>{if(y(),w.sync(),P.sync(),k.sync(),!o)return;let I=n.get(),R=I.editable&&!I.presenting&&!I.cropSession?U(I).filter(B=>I.selectedElementIds.includes(B.id)&&!P.isEditingPoints(B.id)):[];o.setBox(RP(R),e.getScale());let O=ci(I);o.setHandleVisibility({resizable:O.resizable,rotatable:O.rotatable}),o.setAdjustHandles(I.cropSession?[]:hA(I),e.getScale()),r?.sync(),i?.sync(),PP(t,o.root,I.showGuides?I.guides:[],e.getScale(),I.editable&&!I.presenting?{onMoveGuide:(B,V)=>{let F=n.get();n.set({guides:chunk24B6ZCFG_cjs.fm(F.guides,B,V,F.canvasSize)});},onRemoveGuide:B=>{n.set({guides:chunk24B6ZCFG_cjs.gm(n.get().guides,B)});}}:void 0);},T=bp({getKeyboardCustomization:e.getKeyboardCustomization,isActive:()=>{let I=n.get();return I.editable&&!I.presenting&&!h.inlineActive()},getSelectedId:()=>n.get().selectedElementId,deselect:()=>p.select(null),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>{p.duplicateSelected();},copySelected:()=>d.copy(),cutSelected:()=>d.cut(),paste:()=>d.paste(),canPaste:()=>{let I=n.get();return !!(I.clipboardPayload&&I.slides[I.currentSlide])},selectAll:()=>d.selectAll(),groupSelected:()=>d.groupSelected(),ungroupSelected:()=>d.ungroupSelected(),nudgeSelected:(I,R)=>p.nudgeSelected(I,R),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 I=e.getChrome().shortcuts;return I.isOpen()?(I.close(),true):false},setTextAlign:I=>d.setTextAlign(I),stepFontSize:I=>d.stepFontSize(I),copyFormat:()=>d.toggleFormatPainter(),pasteFormat:x,addSlide:()=>d.addSlide(),openHyperlink:g,toggleFindReplace:()=>e.getChrome().ribbon?.toggleFindReplace(),clearFormatting:()=>d.clearFormatting(),cycleSelection:I=>{let R=n.get(),O=U(R).map(V=>V.id),B=chunk24B6ZCFG_cjs.Dl(O,R.selectedElementId,I);B&&p.select(B,[B]);},onPasteSpecial:()=>{n.get().clipboardPayload&&TP(t,e.getTranslator(),{onConfirm:I=>{let R=d.pasteWithFormat(I);if(!R||I!=="picture")return;let O=n.get().pasteOptionsToolbar?.find(B=>B.id===R)?.sourceClone;O&&requestAnimationFrame(()=>{Zr(t,R,O).then(B=>{B&&d.replaceElement(R,B);});});}});}}),E=I=>{chunk24B6ZCFG_cjs.Il(a),C.onStagePointerDown(I);},L,M=()=>{L?.(),L=void 0,h.closeInline(true),h.closeInline(false),s?.removeEventListener("pointerdown",E),s?.removeEventListener("pointermove",h.onStagePointerMove),s?.removeEventListener("dblclick",C.onStageDblClick),a?.removeEventListener("keydown",T),s=null,a=null,o?.destroy(),o=null,r?.dispose(),r=null,i?.dispose(),i=null,w.detach(),P.detach(),k.detach();},D=n.subscribe((I,R)=>{if(R.editable&&!I.editable&&h.retainAcceptedInlineText?.(),h.readInlineList?.(),I.loading&&!R.loading&&h.closeInline(false),I.currentSlide!==R.currentSlide&&(h.closeInline(true),I.selectedElementId)){p.select(null);return}if((I.slides!==R.slides||I.templateElementsBySlideId!==R.templateElementsBySlideId||I.slideMasters!==R.slideMasters||I.notesMaster!==R.notesMaster||I.handoutMaster!==R.handoutMaster)&&I.selectedElementId&&!p.selectedElement(I)){p.select(null);return}I.editable!==R.editable&&(I.editable||(h.closeInline(true),I.selectedElementId&&p.select(null)),l()),(I.drawTool!==R.drawTool||I.editable!==R.editable)&&C.syncCursor(s),A();});return {attachChrome(){M();let I=e.getChrome();o=wp(t,e.getTranslator(),{onHandlePointerDown(R,O){h.beginHandleGesture("resize",O,R);},onRotatePointerDown(R){h.beginHandleGesture("rotate",R);},onAdjustPointerDown(R,O){h.beginAdjustGesture(R,O);}}),r=IP({doc:t,store:n,ops:p,getScale:e.getScale,label:R=>e.getTranslator()(R==="start"?"pptx.canvas.connectorEndpointStart":"pptx.canvas.connectorEndpointEnd")}),i=AP({doc:t,t:e.getTranslator(),store:n,ops:p,getScale:e.getScale}),w.attach(),s=I.stageWrap,a=I.root,k.attach(a),L=oA(a,s,{store:n,getHandler:e.getHandler,isEditing:h.inlineActive,insertElement:d.insertElement}),s.addEventListener("pointerdown",E),s.addEventListener("pointermove",h.onStagePointerMove),s.addEventListener("dblclick",C.onStageDblClick),a.addEventListener("keydown",T),o.mount(s),r.mount(s),i.mount(s),l(),C.syncCursor(s),A();},detachChrome:M,onStageRendered(){o&&s&&(o.mount(s),r?.mount(s),i?.mount(s),A());},hasActivePointerInteraction:()=>h.hasActivePointerInteraction()||C.isActive()||k.isDragging()||!!r?.isActive(),capturesKeyboard(){let I=n.get();return I.editable&&(I.selectedElementId!==null||h.inlineActive())},reset(){h.closeInline(false),C.dispose(),p.clearHistory(),n.set({selectedElementId:null,selectedElementIds:[],dirty:false,interactionActive:false,drawTool:"select",editPointsElementId:null,freeformTool:null,formatPainterSourceId:null,cropSession:null,editTemplateMode:false,masterViewTarget:null,masterViewTab:"slides"}),l();},setEditable(I){n.set({editable:I,...I?{}:{editTemplateMode:false,selectedElementId:null,selectedElementIds:[]}});},undo:()=>p.undo(),redo:()=>p.redo(),canUndo:()=>p.canUndo(),canRedo:()=>p.canRedo(),setHistoryDepth:I=>p.setHistoryDepth(I),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>p.duplicateSelected(),getSelectedElementId:()=>n.get().selectedElementId,selectElements:I=>p.select(I.at(-1)??null,I),applyElementPatch:m,commitElementUpdates(I,R){p.pushHistory(R),n.set({slides:I}),p.commitChange();},commitSlides(I,R=n.get().currentSlide){n.get().editable&&(p.pushHistory(),n.set({slides:I,currentSlide:Math.max(0,Math.min(R,I.length-1)),selectedElementId:null,selectedElementIds:[]}),p.commitChange());},setDrawTool:I=>C.setTool(I),setDrawColor:I=>{ct(n,I),C.setColor(I);},setDrawWidth:I=>C.setWidth(I),startEditPoints:I=>P.startEditPoints(I),armFreeformTool:I=>P.armFreeformTool(I),getEditActions:()=>d,getFindReplaceActions:()=>u,commitNotes:(I,R)=>p.commitNotes(I,R),setHandoutSlidesPerPage:I=>p.setHandoutSlidesPerPage(I),updateDocumentProperties:(I,R,O)=>p.updateDocumentProperties(I,R,O),updatePresentationProperties:I=>p.updatePresentationProperties(I),updateSections:I=>p.updateSections(I),updateHeaderFooter:I=>p.updateHeaderFooter(I),updateCustomShows:I=>p.updateCustomShows(I),save:I=>p.save(I),async downloadAs(I,R){let O=await p.save(I);chunk24B6ZCFG_cjs.mt(new Blob([O],{type:tD[I]}),chunk24B6ZCFG_cjs.Bj(R,I));},async downloadPptx(I){await this.downloadAs("pptx",I);},destroy(){D(),k.destroy(),h.dispose(),C.dispose(),M();}}}async function Tp(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 mo(e,t){let n=new chunk24B6ZCFG_cjs.Z,o=[];try{let r=await n.load(e,{allowExternalImages:t?.allowExternalImages}),i=u=>n.getImageData(u),s=await oD(n,r.slides,o),a=await nD(n,r.slides),l=await chunk24B6ZCFG_cjs.Qa(a,i),p=await chunk24B6ZCFG_cjs.Ra(r.tableStyleMap,i),d=await chunk24B6ZCFG_cjs.Sa(l,i);return {handler:n,slides:d,sections:r.sections??[],presentationProperties:r.presentationProperties??{},viewProperties:r.viewProperties,headerFooter:r.headerFooter??{},coreProperties:r.coreProperties,appProperties:r.appProperties,customProperties:r.customProperties??[],customShows:r.customShows??[],modernCommentAuthors:r.modernCommentAuthors??[],commentAuthors:r.commentAuthors??[],embeddedFonts:r.embeddedFonts??[],hasDigitalSignatures:r.hasDigitalSignatures??!1,digitalSignatureCount:r.digitalSignatureCount??0,isPasswordProtected:r.isPasswordProtected??!1,canvasSize:{width:r.width??chunk24B6ZCFG_cjs.ba,height:r.height??chunk24B6ZCFG_cjs.ca},mediaDataUrls:s,colorScheme:r.theme?.colorScheme,fontScheme:r.theme?.fontScheme,themeName:r.theme?.name,tagCollections:r.tags??[],tableStyleMap:p,tableStylesDefaultId:r.tableStylesDefaultId,slideMasters:r.slideMasters??[],themeOptions:r.themeOptions??[],notesMaster:r.notesMaster,handoutMaster:r.handoutMaster,hasMacros:r.hasMacros??!1,modifyVerifier:r.modifyVerifier,warnings:r.warnings??[],slideSize:typeof r.widthEmu=="number"&&typeof r.heightEmu=="number"&&r.widthEmu>0&&r.heightEmu>0?{widthEmu:r.widthEmu,heightEmu:r.heightEmu,type:r.slideSizeType??""}:void 0,notesCanvasSize:typeof r.notesWidthEmu=="number"&&typeof r.notesHeightEmu=="number"&&r.notesWidthEmu>0&&r.notesHeightEmu>0?{width:Math.round(r.notesWidthEmu/9525),height:Math.round(r.notesHeightEmu/9525)}:void 0,blobUrls:o}}catch(r){throw mt(o),n.dispose(),r}}function mt(e){for(let t of e)t.startsWith("blob:")&&URL.revokeObjectURL(t);}async function oD(e,t,n){let o=[];for(let s of t)chunk24B6ZCFG_cjs.Ma(s.elements,o);let r=new Map;await Promise.all(o.map(async s=>{let a=await chunk24B6ZCFG_cjs.Pa(s,e);if(a.missing||!a.mediaPath||!a.url){s.mediaMissing=true;return}r.set(a.mediaPath,a.url),a.isBlobUrl&&n.push(a.url);}));let i=chunk24B6ZCFG_cjs.Na(t).filter(s=>!r.has(s));return await Promise.all(i.map(async s=>{try{let a=await e.getMediaArrayBuffer(s);if(a){let l=URL.createObjectURL(new Blob([a]));n.push(l),r.set(s,l);}}catch{}})),r}async function nD(e,t){let{paths:n,refs:o}=chunk24B6ZCFG_cjs.Oa(t);if(n.size===0)return t;let r=new Map;return await Promise.all(Array.from(n).map(async i=>{try{let s=await e.getImageData(i);s&&r.set(i,s);}catch{}})),t.map(i=>{let s=chunk24B6ZCFG_cjs.La(i.elements,r,o);return s===i.elements?i:{...i,elements:s}})}function ui(e){let t=e,n=new Set;return {get:()=>t,set:o=>{let r=false;for(let s of Object.keys(o))if(o[s]!==t[s]){r=true;break}if(!r)return;let i=t;t={...t,...o};for(let s of Array.from(n))s(t,i);},subscribe:o=>(n.add(o),()=>{n.delete(o);})}}function xi(){return {slides:[],sections:[],presentationProperties:{},viewProperties:void 0,headerFooter:{},coreProperties:void 0,appProperties:void 0,customProperties:[],customShows:[],modernCommentAuthors:[],commentAuthors:[],activeCustomShowId:null,embeddedFonts:[],outlineFontsTick:0,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:chunk24B6ZCFG_cjs.ba,height:chunk24B6ZCFG_cjs.ca},slideSize:void 0,mediaDataUrls:new Map,colorScheme:void 0,fontScheme:void 0,themeName:void 0,tagCollections:[],tableStyleMap:void 0,tableStylesDefaultId:void 0,tableStylesToDelete:[],currentSlide:0,zoom:"fit",loading:false,error:null,presenting:false,endOfShow:false,enteringBackward:false,editable:false,protectedView: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,pasteOptionsToolbar:null,drawTool:"select",editPointsElementId:null,freeformTool:null,drawColor:chunk24B6ZCFG_cjs.ea,drawWidth:3,showGrid:false,showRulers:false,snapToGrid:false,snapToShape:true,showGuides:true,guides:[],eyedropperActive:false,cropSession:null,spellCheckEnabled:false,readOnlyRecommendation:null,readOnlyBannerDismissed:false,modifyVerifier:void 0,readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null,readOnlyCheckingPassword:false,compatToasts:[],runProgramNotices:[]}}function Vt(e,t){return t<=0?0:Math.min(Math.max(Math.trunc(e),0),t-1)}function DA(e){let{options:t,store:n}=e,o=null,r=[],i=0;function s(){mt(r),mt(n.get().mediaDataUrls.values()),r=[],o?.dispose(),o=null;}async function a(l,p="user",d){let u=++i;e.getEditor()?.reset(),n.set({loading:true,error:null});try{let m=await Tp(l),g=await mo(m,{allowExternalImages:e.getAllowExternalContent?.()});if(u!==i){mt(g.blobUrls),g.handler.dispose();return}s(),o=g.handler,r=g.blobUrls;let x=chunk24B6ZCFG_cjs.no(g.slides);e.onContentApplying?.(p);let b=p==="user"&&!d?.skipProtectedView&&t.editable===!0&&(e.shouldOpenProtectedView?.()??!1),v=chunk24B6ZCFG_cjs.ds({modifyVerifier:g.modifyVerifier,customProperties:g.customProperties}),f=t.editable===!0&&v.kind!==null&&v.defaultReadOnly,S=mp(n.get(),g.viewProperties),y=chunk24B6ZCFG_cjs.fs([...g.warnings,...g.slides.flatMap(h=>h.warnings??[])]);n.set({slides:x.slides,protectedView:b,readOnlyRecommendation:v.kind===null?null:v,readOnlyBannerDismissed:!1,modifyVerifier:g.modifyVerifier??void 0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null,readOnlyCheckingPassword:!1,compatToasts:y,...S,sections:g.sections,presentationProperties:g.presentationProperties,viewProperties:g.viewProperties,headerFooter:g.headerFooter,coreProperties:g.coreProperties,appProperties:g.appProperties,customProperties:g.customProperties,customShows:g.customShows,modernCommentAuthors:g.modernCommentAuthors,commentAuthors:g.commentAuthors,activeCustomShowId:chunk24B6ZCFG_cjs.Kp(g.presentationProperties,g.customShows)??null,embeddedFonts:g.embeddedFonts,embedFonts:chunk24B6ZCFG_cjs.to(g.embeddedFonts.map(h=>h.name)).initialEnabled,hasDigitalSignatures:g.hasDigitalSignatures,digitalSignatureCount:g.digitalSignatureCount,isPasswordProtected:g.isPasswordProtected,templateElementsBySlideId:x.templateElementsBySlideId,slideMasters:g.slideMasters,themeOptions:g.themeOptions,notesMaster:g.notesMaster,notesCanvasSize:g.notesCanvasSize,handoutMaster:g.handoutMaster,hasMacros:g.hasMacros,masterViewTab:"slides",handoutSlidesPerPage:g.handoutMaster?.slidesPerPage??4,masterViewTarget:null,canvasSize:g.canvasSize,slideSize:g.slideSize,mediaDataUrls:g.mediaDataUrls,colorScheme:g.colorScheme,fontScheme:g.fontScheme,themeName:g.themeName,tagCollections:g.tagCollections,tableStyleMap:g.tableStyleMap,tableStylesDefaultId:g.tableStylesDefaultId,tableStylesToDelete:[],currentSlide:Vt(t.initialSlide??0,x.slides.length),loading:!1}),e.setEditableForLoad?.(b||f?!1:t.editable===!0),e.onContentApplied?.(p),t.onLoad?.({slideCount:g.slides.length,canvasSize:g.canvasSize});}catch(m){if(u!==i)return;let g=e.getTranslator(),x=m instanceof chunk24B6ZCFG_cjs.L?g("pptx.security.currentlyProtected"):m instanceof Error?m.message:String(m);n.set({loading:false,error:x}),t.onError?.(x,m);}}return {load:a,releaseLoaded:s,getHandler:()=>o,setHandler:l=>{o?.dispose(),o=l;},invalidate:()=>{i++;}}}var rD=22;function iD(e){return e.map(t=>`${t.key}@${t.level}`).join("\0")}function RA(e,t,n,o){t.querySelector(`[${chunk24B6ZCFG_cjs.pl}]`)?.remove();let r=o.slides,i="",s=false,a=new Map,l=chunkOBVLNSK5_cjs.w(e,"section","pptxv-outline-view");l.setAttribute(chunk24B6ZCFG_cjs.pl,"true"),l.setAttribute("role","region"),l.setAttribute("aria-label",n("pptx.view.outlineView"));let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-outline-view-header"),d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-outline-view-title");d.textContent=n("pptx.view.outlineView");let u=chunkOBVLNSK5_cjs.w(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:()=>{y(),o.onClose();}});p.append(d,u,m.btn);let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-outline-view-list");l.append(p,g);let x=h=>{if(!o.canEdit)return;let C=chunk24B6ZCFG_cjs.zl(r,h,{canvas:o.canvasSize});C.changed&&(r=C.slides,o.commit(C.slides,C.activeSlideIndex),v(),f(C.focusKey));},b=h=>{let C=chunkOBVLNSK5_cjs.w(e,"div","pptxv-outline-view-row",{paddingLeft:`${h.level*rD}px`}),w=chunkOBVLNSK5_cjs.w(e,"span","pptxv-outline-view-number");w.textContent=h.kind==="title"?String(h.slideIndex+1):"";let P=e.createElement("input");return P.type="text",P.className=`pptxv-outline-view-input${h.kind==="title"?" is-title":""}`,P.value=h.text,P.readOnly=!o.canEdit,P.setAttribute(chunk24B6ZCFG_cjs.ql,h.key),P.setAttribute(chunk24B6ZCFG_cjs.rl,String(h.slideIndex+1)),P.setAttribute(chunk24B6ZCFG_cjs.sl,String(h.level)),P.setAttribute("aria-label",n(h.kind==="title"?"pptx.outline.titleLine":"pptx.outline.bodyLine")),P.addEventListener("input",()=>x({type:"setText",key:h.key,text:P.value})),P.addEventListener("keydown",k=>{let{edit:A,preventDefault:T}=chunk24B6ZCFG_cjs.yl(k,h.key);T&&k.preventDefault(),A&&x(A);}),a.set(h.key,P),C.append(w,P),C};function v(){let h=chunk24B6ZCFG_cjs.tl(r),C=iD(h);if(C===i){for(let w of h){let P=a.get(w.key);P&&P.value!==w.text&&(P.value=w.text);}return}i=C,a.clear(),g.replaceChildren(...h.map(w=>b(w)));}function f(h){let C=h?a.get(h):void 0;C&&e.activeElement!==C&&(C.focus(),C.setSelectionRange(C.value.length,C.value.length));}let S=o.subscribe?.(h=>{!s&&h!==r&&(r=h,v());});function y(){s||(s=true,S?.(),l.remove());}return v(),t.appendChild(l),{el:l,close:y}}function OA(e){let t=null,n=()=>{t?.close(),t=null;};return {open(){n();let o=e.store.get();t=RA(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 HA(e,t,n,o){t.querySelector("[data-pptx-selection-pane]")?.remove();let r=chunkOBVLNSK5_cjs.w(e,"aside","pptxv-workspace-pane");r.dataset.pptxSelectionPane="true";let i=chunkOBVLNSK5_cjs.w(e,"header"),s=chunkOBVLNSK5_cjs.w(e,"h2");s.textContent=n("pptx.selectionPane.title");let a=chunkOBVLNSK5_cjs.w(e,"button");a.type="button",a.textContent="\xD7",a.setAttribute("aria-label",n("pptx.selectionPane.close")),i.append(s,a),r.appendChild(i);let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-workspace-list"),p={elements:o.elements,selectedIds:o.selectedIds},d=null,u=new Map,m=()=>{for(let[v,f]of u)f.classList.toggle("is-selected",p.selectedIds.includes(v));},g=()=>{if(d===p.elements){m();return}if(d=p.elements,u.clear(),l.replaceChildren(),!p.elements.length){let v=chunkOBVLNSK5_cjs.w(e,"p");v.textContent=n("pptx.selectionPane.empty"),l.appendChild(v);return}[...p.elements].reverse().forEach((v,f)=>{let S=aD(e,n,v,p.elements.length-f-1,o,p.selectedIds);u.set(v.id,S),l.appendChild(S);});};g(),r.appendChild(l);let x=o.subscribe?.(v=>{p=v,!l.querySelector(".pptxv-selection-rename")&&g();})??null,b={close(){x?.(),r.remove();}};return a.addEventListener("click",()=>{b.close(),o.onClose?.();}),t.appendChild(r),b}function aD(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-selection-row");s.draggable=true,s.dataset.index=String(o),s.classList.toggle("is-selected",i.includes(n.id));let a=chunkOBVLNSK5_cjs.w(e,"span");a.textContent="\u2630";let l=chunkOBVLNSK5_cjs.w(e,"button");l.type="button",l.dataset.pptxSelectionName="true",l.textContent=FA(n,o),l.addEventListener("click",()=>r.onSelect(n.id)),l.addEventListener("dblclick",()=>sD(e,t,s,l,n,o,r.onRename));let p=chunkOBVLNSK5_cjs.w(e,"button");return p.type="button",p.textContent=n.hidden?"\u25CB":"\u25C9",p.setAttribute("aria-label",t(n.hidden?"pptx.selectionPane.show":"pptx.selectionPane.hide")),p.addEventListener("click",()=>r.onToggleHidden(n.id)),s.addEventListener("dragstart",d=>d.dataTransfer?.setData("text/plain",String(o))),s.addEventListener("dragover",d=>d.preventDefault()),s.addEventListener("drop",d=>{d.preventDefault();let u=Number(d.dataTransfer?.getData("text/plain"));Number.isInteger(u)&&r.onReorder(u,o);}),s.append(a,l,p),s}function sD(e,t,n,o,r,i,s){let a=FA(r,i),l=e.createElement("input");l.type="text",l.className="pptxv-selection-rename",l.setAttribute("aria-label",t("pptx.selectionPane.renameElement")),l.value=a,o.hidden=true,n.insertBefore(l,o),l.focus(),l.select();let p=false,d=u=>{if(p)return;p=true,chunk24B6ZCFG_cjs.Jl(l),l.remove(),o.hidden=false;let m=u?chunk24B6ZCFG_cjs.Kl(a,l.value):null;m&&(o.textContent=m.name.length>0?m.name:VA(r,i),s(r.id,m.name));};l.addEventListener("keydown",u=>{u.key==="Enter"?d(true):u.key==="Escape"&&d(false);}),l.addEventListener("blur",()=>d(true));}function FA(e,t){return e.name&&e.name.trim().length>0?e.name.trim():VA(e,t)}function VA(e,t){return chunk24B6ZCFG_cjs.e(e)&&e.text?.trim()?e.text.trim().slice(0,32):`${e.type.charAt(0).toUpperCase()}${e.type.slice(1)} ${t+1}`}function lD(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}function BA(e){let t=null,n=()=>{t?.close(),t=null;},o=()=>{let r=e.store.get();return r.slides[r.currentSlide]};return {open(){n(),t=HA(e.doc,e.root(),e.t,{elements:o()?.elements??[],selectedIds:e.store.get().selectedElementIds,subscribe:r=>{let i=o()?.elements??[],s=e.store.get().selectedElementIds;return e.store.subscribe(a=>{let l=a.slides[a.currentSlide]?.elements??[],p=a.selectedElementIds;l===i&&lD(p,s)||(i=l,s=p,r({elements:i,selectedIds:s}));})},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 s=e.store.get(),a=s.slides[s.currentSlide];if(!a||r===i)return;let l=[...a.elements],[p]=l.splice(r,1);l.splice(i,0,p),e.editor.commitSlides(s.slides.map((d,u)=>u===s.currentSlide?{...d,elements:l}:d));}});},close:n}}var Pp=Symbol("pptxv-comments-panel-dispose");function zA(e,t,n,o,r){let i=t.querySelector("[data-pptx-comments-panel]");i?.[Pp]?.(),i?.remove();let s=chunkOBVLNSK5_cjs.w(e,"aside","pptxv-workspace-pane");s.dataset.pptxCommentsPanel="true";let a=chunkOBVLNSK5_cjs.w(e,"header"),l=chunkOBVLNSK5_cjs.w(e,"h2");l.textContent=n("pptx.toolbar.comments");let p=chunkOBVLNSK5_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.common.close")),a.append(l,p),s.appendChild(a);let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-workspace-list"),u=Br(e,n,r,o.getAuthors),m=chunkOBVLNSK5_cjs.w(e,"p");m.textContent=n("pptx.comments.noneOnSlide"),d.append(u.el,m);let g=()=>{let C=o.getComments();m.hidden=C.length>0,u.update(C,true);},x=chunkOBVLNSK5_cjs.w(e,"textarea");x.placeholder=n("pptx.comments.addPlaceholder");let b=[],v=no({doc:e,t:n,field:x,getAuthors:o.getAuthors,getMentions:()=>b,onChange:C=>{x.value=C.text,b=C.mentions;}}),f=chunkOBVLNSK5_cjs.w(e,"button");f.type="button",f.textContent=n("pptx.comments.addComment"),f.addEventListener("click",()=>{r.addComment(x.value,void 0,b)&&(x.value="",b=[]);}),d.append(x,v.el,f),s.appendChild(d);let S=o.getComments(),y=()=>{h(),v.destroy(),delete s[Pp];},h=o.subscribe(()=>{if(!s.isConnected){y();return}let C=o.getComments();C!==S&&(S=C,g());});s[Pp]=y,p.addEventListener("click",()=>{y(),s.remove();}),g(),t.appendChild(s);}function NA(e,t,n,o){t.querySelector("[data-pptx-compare-panel]")?.remove();let r=chunkOBVLNSK5_cjs.w(e,"aside","pptxv-compare-panel");r.dataset.pptxComparePanel="true",r.setAttribute("aria-label",n("pptx.compare.title"));let i=chunkOBVLNSK5_cjs.w(e,"header"),s=chunkOBVLNSK5_cjs.w(e,"div"),a=chunkOBVLNSK5_cjs.w(e,"h2");a.textContent=n("pptx.compare.title");let l=chunkOBVLNSK5_cjs.w(e,"p");l.textContent=n("pptx.compare.summary",{added:o.result.addedCount,removed:o.result.removedCount,changed:o.result.changedCount}),s.append(a,l);let p=chunkOBVLNSK5_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.compare.close")),i.append(s,p),r.appendChild(i);let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-compare-actions"),u=chunkOBVLNSK5_cjs.w(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=chunkOBVLNSK5_cjs.w(e,"div","pptxv-compare-list"),g=o.result.diffs.filter(x=>x.status!=="unchanged");if(g.length===0){let x=chunkOBVLNSK5_cjs.w(e,"p");x.textContent=n("pptx.compare.noDifferences"),m.appendChild(x);}for(let x of g)m.appendChild(pD(e,n,x,o.onAccept));r.appendChild(m),t.appendChild(r),p.addEventListener("click",()=>r.remove());}function pD(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"article","pptxv-compare-row"),i=chunkOBVLNSK5_cjs.w(e,"strong");i.textContent=`${t("pptx.compare.slideNumber",{number:Math.max(n.baseIndex,n.compareIndex)+1})} \xB7 ${t(`pptx.compare.status${dD(n.status)}`)}`;let s=chunkOBVLNSK5_cjs.w(e,"p");s.textContent=n.changes.map(d=>d.description).join("; ")||i.textContent;let a=chunkOBVLNSK5_cjs.w(e,"div"),l=chunkOBVLNSK5_cjs.w(e,"button");l.type="button",l.textContent=t("pptx.compare.reject");let p=chunkOBVLNSK5_cjs.w(e,"button");return p.type="button",p.textContent=t("pptx.compare.accept"),l.addEventListener("click",()=>{r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),p.addEventListener("click",()=>{o(n),r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),a.append(l,p),r.append(i,s,a),r}function dD(e){return e.charAt(0).toUpperCase()+e.slice(1)}function _A(e,t,n){let{shows:o,slides:r,onSave:i,onSetActive:s,onRun:a}=n,l=we(e,t,t("pptx.customShows.title")),p=structuredClone(o),d=n.activeShowId,u=chunkOBVLNSK5_cjs.w(e,"label","pptxv-custom-shows-active"),m=chunkOBVLNSK5_cjs.w(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,s(d);}),u.append(m,g),l.body.appendChild(u);let x=chunkOBVLNSK5_cjs.w(e,"div","pptxv-custom-shows");l.body.appendChild(x);let b=()=>{g.replaceChildren();let f=e.createElement("option");f.value="",f.textContent=t("pptx.customShows.allSlides"),g.appendChild(f);for(let S of p){let y=e.createElement("option");y.value=S.id,y.textContent=S.name,g.appendChild(y);}g.value=p.some(({id:S})=>S===d)?d??"":"";},v=()=>{x.replaceChildren(),p.forEach(f=>{let S=chunkOBVLNSK5_cjs.w(e,"article"),y=chunkOBVLNSK5_cjs.w(e,"input");y.value=f.name,y.setAttribute("aria-label",t("pptx.customShows.editNameLabel")),y.addEventListener("change",()=>{f.name=y.value.trim()||f.name,b();});let h=chunkOBVLNSK5_cjs.w(e,"span");h.textContent=`${f.slideRIds.length}/${r.length}`;let C=chunkOBVLNSK5_cjs.w(e,"button");C.type="button",C.textContent=t("pptx.slideShow.fromBeginning"),C.addEventListener("click",()=>{d=f.id,s(f.id),a(f),l.close();});let w=chunkOBVLNSK5_cjs.w(e,"button");w.type="button",w.textContent=t("pptx.customShows.delete"),w.addEventListener("click",()=>{p=p.filter(({id:k})=>k!==f.id),d===f.id&&(d=null,s(null)),v(),b();});let P=chunkOBVLNSK5_cjs.w(e,"div");r.forEach(k=>{let A=chunkOBVLNSK5_cjs.w(e,"label","pptxv-parity-check"),T=e.createElement("input");T.type="checkbox",T.checked=f.slideRIds.includes(k.rId),T.addEventListener("change",()=>{f.slideRIds=T.checked?[...f.slideRIds,k.rId]:f.slideRIds.filter(E=>E!==k.rId),h.textContent=`${f.slideRIds.length}/${r.length}`;}),A.append(T,e.createTextNode(`${t("pptx.rehearse.slide")} ${k.slideNumber}`)),P.appendChild(A);}),S.append(y,h,C,w,P),x.appendChild(S);});};ae(e,l.footer,t("pptx.customShows.createNew"),()=>{p.push({id:crypto.randomUUID(),name:t("pptx.customShows.createNew"),slideRIds:r.map(({rId:f})=>f)}),v(),b();}),ae(e,l.footer,t("pptx.common.cancel"),l.close),ae(e,l.footer,t("pptx.common.ok"),()=>{i(p),s(p.some(({id:f})=>f===d)?d:null),l.close();},true),v(),b();}function GA(e,t,n){let o=we(e,t,t("pptx.headerFooter.title")),r=chunk24B6ZCFG_cjs.io(n.value),i=qe(e,o.body,t("pptx.headerFooter.dateAndTime"),!!r.hasDateTime),s=qe(e,o.body,t("pptx.headerFooter.slideNumber"),!!r.hasSlideNumber),a=qe(e,o.body,t("pptx.headerFooter.footer"),!!r.hasFooter),l=chunkOBVLNSK5_cjs.w(e,"input");l.type="text",l.value=r.footerText??"",l.placeholder=t("pptx.headerFooter.footerPlaceholder"),l.hidden=!a.checked,o.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=!a.checked;});let p=d=>{n.onApply({...r,hasDateTime:i.checked,hasSlideNumber:s.checked,hasFooter:a.checked,footerText:l.value},d),o.close();};ae(e,o.footer,t("pptx.headerFooter.applyToAll"),()=>p("all")),ae(e,o.footer,t("pptx.headerFooter.applyToCurrent"),()=>p("current"),true);}function UA(e,t,n,o,r){let i=we(e,t,t("pptx.print.title")),s=(b,v)=>{let f=chunkOBVLNSK5_cjs.w(e,"label","pptxv-parity-select"),S=chunkOBVLNSK5_cjs.w(e,"span");S.textContent=b;let y=e.createElement("select");for(let[h,C]of v){let w=e.createElement("option");w.value=h,w.textContent=C,y.appendChild(w);}return f.append(S,y),i.body.appendChild(f),y},a=s(t("pptx.print.slideRange"),[["all",t("pptx.print.allSlides")],["current",t("pptx.print.currentSlide")],["custom",t("pptx.print.customRange")]]),l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-parity-range");l.hidden=true;let p=e.createElement("input");p.type="number",p.min="1",p.max=String(n),p.value="1";let d=e.createElement("input");d.type="number",d.min="1",d.max=String(n),d.value=String(n),l.append(p,e.createTextNode(t("pptx.slideShow.to")),d),i.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=a.value!=="custom";});let u=s(t("pptx.print.printWhat"),[["slides",t("pptx.print.fullPageSlides")],["notes",t("pptx.print.notesPages")],["handouts",t("pptx.print.handouts")],["outline",t("pptx.print.outline")]]);r?.printWhat&&(u.value=r.printWhat);let m=s(t("pptx.print.orientation"),[["landscape",t("pptx.print.landscape")],["portrait",t("pptx.print.portrait")]]),g=s(t("pptx.print.colorMode"),[["color",t("pptx.print.color")],["grayscale",t("pptx.print.grayscale")],["blackAndWhite",t("pptx.print.blackAndWhite")]]);r?.colorMode&&(g.value=r.colorMode);let x=qe(e,i.body,t("pptx.print.frameSlides"),r?.frameSlides??false);ae(e,i.footer,t("pptx.common.cancel"),i.close),ae(e,i.footer,t("pptx.print.title"),()=>{o({slideRange:a.value,customRangeFrom:Number(p.value),customRangeTo:Number(d.value),printWhat:u.value,orientation:m.value,colorMode:g.value,frameSlides:x.checked,scaleToFit:r?.scaleToFit??true}),i.close();},true);}var cD=24;function KA(e,t,n,o){let r=o.slides.length;if(t.querySelector(`[${chunk24B6ZCFG_cjs.gl}]`)?.remove(),r===0)return null;let i=chunk24B6ZCFG_cjs.jl(o.initialSlideIndex,r),s={width:0,height:0},a=false,l=chunk24B6ZCFG_cjs.el(),p=chunkOBVLNSK5_cjs.w(e,"section","pptxv-reading-view");p.setAttribute(chunk24B6ZCFG_cjs.gl,"true"),p.setAttribute("role","region"),p.setAttribute("aria-label",n("pptx.view.readingView")),p.tabIndex=-1;let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-reading-view-viewport"),u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-reading-view-bar"),m=H(e,{label:n("pptx.common.previous"),icon:"chevron-left",className:"pptxv-reading-view-btn",onClick:()=>f({command:"previous"})}),g=chunkOBVLNSK5_cjs.w(e,"span","pptxv-reading-view-counter");g.setAttribute(chunk24B6ZCFG_cjs.hl,"true");let x=H(e,{label:n("pptx.common.next"),icon:"chevron-right",className:"pptxv-reading-view-btn",onClick:()=>f({command:"next"})}),b=H(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-reading-view-btn",onClick:()=>f({command:"exit"})});u.append(m.btn,g,x.btn,b.btn),p.append(d,u);let v=()=>{let k=o.slides[i.slideIndex];g.textContent=chunk24B6ZCFG_cjs.Pk(i.slideIndex,r),m.setDisabled(!chunk24B6ZCFG_cjs.ml(i)),x.setDisabled(!chunk24B6ZCFG_cjs.nl(i,r));let A=Math.max(o.canvasSize.width,1),T=Math.max(o.canvasSize.height,1),E=chunk24B6ZCFG_cjs.ol(o.canvasSize,s,cD),L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-reading-view-stage",{width:`${A*E}px`,height:`${T*E}px`});L.setAttribute(chunk24B6ZCFG_cjs.il,"true"),L.setAttribute("aria-roledescription","slide"),k&&E>0&&L.appendChild(o.renderStage(k,E)),d.replaceChildren(L);},f=k=>{let A=i,T=chunk24B6ZCFG_cjs.ll(A,k,r);if(A.open&&!T.open){w(),o.onExit(A.slideIndex);return}i=T,v();},S=k=>{let{command:A,swallow:T,preventDefault:E}=chunk24B6ZCFG_cjs.kl(k,l);T&&k.stopPropagation(),E&&k.preventDefault(),A.command!=="none"&&f(A);},y=()=>{let k=d.getBoundingClientRect();(k.width!==s.width||k.height!==s.height)&&(s={width:k.width,height:k.height},v());},h=e.defaultView?.ResizeObserver,C=h?new h(()=>y()):null;function w(){a||(a=true,e.removeEventListener("keydown",S,true),C?.disconnect(),p.remove());}e.addEventListener("keydown",S,true),t.appendChild(p);let P=d.getBoundingClientRect();return s={width:P.width,height:P.height},v(),C?.observe(d),p.focus(),{el:p,close:w}}function WA(e,t,n,o){t.querySelector(".pptxv-rehearse")?.remove();let r=chunkOBVLNSK5_cjs.w(e,"aside","pptxv-rehearse");r.setAttribute("aria-label",n("pptx.rehearse.summaryTitle"));let i=chunkOBVLNSK5_cjs.w(e,"span"),s=chunkOBVLNSK5_cjs.w(e,"strong"),a=chunkOBVLNSK5_cjs.w(e,"span"),l={},p=performance.now(),d=p,u=0,m=0,g=false,x=h=>new Date(Math.max(0,h)).toISOString().slice(14,19),b=(h,C)=>{let w=chunkOBVLNSK5_cjs.w(e,"button");return w.type="button",w.textContent=h,w.addEventListener("click",C),r.appendChild(w),w},v=b(n("pptx.rehearse.pause"),()=>{if(g=!g,g)u=performance.now();else {let h=performance.now()-u;m+=h,p+=h,d+=h;}v.textContent=n(g?"pptx.rehearse.resume":"pptx.rehearse.pause");}),f=()=>{l[o.currentSlide()]=Math.max(250,performance.now()-p-m),m=0;};b(n("pptx.presenter.next"),()=>{if(g)return;f();let h=o.currentSlide()+1;h<o.slideCount&&(o.navigate(h),p=performance.now());}),b(n("pptx.rehearse.saveTimings"),()=>{f(),o.onSave(l),r.remove();}),b(n("pptx.rehearse.discard"),()=>r.remove()),r.prepend(i,s,a);let S=window.setInterval(()=>{if(g)return;let h=performance.now();i.textContent=`${n("pptx.rehearse.slide")} ${o.currentSlide()+1}/${o.slideCount}`,s.textContent=`${n("pptx.rehearse.slideTime")}: ${x(h-p)}`,a.textContent=`${n("pptx.rehearse.totalTime")}: ${x(h-d)}`;},250),y=new MutationObserver(()=>{r.isConnected||(clearInterval(S),y.disconnect());});y.observe(t,{childList:true}),t.appendChild(r);}var mD=(e,t,n)=>{chunk24B6ZCFG_cjs.mt(new Blob([t],{type:n}),e);};function $A(e){let{doc:t,t:n}=e,o=e.store??chunkOBVLNSK5_cjs.a(),r=chunkOBVLNSK5_cjs.w(t,"section","pptxv-ai-settings"),i=chunkOBVLNSK5_cjs.w(t,"div","pptxv-ai-settings-intro"),s=chunkOBVLNSK5_cjs.w(t,"div"),a=chunkOBVLNSK5_cjs.w(t,"p");a.textContent=n("pptx.ai.settingsSectionTitle");let l=chunkOBVLNSK5_cjs.w(t,"p","pptxv-ai-settings-count");l.textContent=n("pptx.ai.exportLogsHint"),s.append(a,l),i.append(chunkOBVLNSK5_cjs.K(t,"bug"),s);let p=chunkOBVLNSK5_cjs.w(t,"p","pptxv-ai-settings-count");p.textContent=n("pptx.ai.exportLogsCounting");let d=chunkOBVLNSK5_cjs.w(t,"label","pptxv-ai-settings-detailed"),u=t.createElement("pptx-ui-checkbox");u.checked=true,u.setAttribute("aria-label",n("pptx.ai.exportLogsDetailed")),d.append(u,t.createTextNode(n("pptx.ai.exportLogsDetailed")));let m=chunkOBVLNSK5_cjs.w(t,"div","pptxv-ai-settings-actions"),g=chunkOBVLNSK5_cjs.w(t,"p","pptxv-ai-settings-status");g.setAttribute("role","status"),g.hidden=true;let x=(v,f)=>{let S=chunkOBVLNSK5_cjs.w(t,"button","pptxv-ai-settings-btn");return S.type="button",S.append(chunkOBVLNSK5_cjs.K(t,"download"),t.createTextNode(n(v))),S.addEventListener("click",()=>{b(f);}),S},b=async(v,f)=>{let S=m.querySelectorAll("button");for(let y of S)y.disabled=true;try{let y=await chunkOBVLNSK5_cjs.g(o),h=chunkOBVLNSK5_cjs.h(y,{format:v,detailed:u.checked},mD);g.hidden=!1,g.textContent=h>0?n("pptx.ai.exportLogsDone",{count:h}):n("pptx.ai.noChatsToExport");}finally{for(let y of S)y.disabled=false;}};return m.append(x("pptx.ai.exportLogsJson","json"),x("pptx.ai.exportLogsMarkdown","markdown")),r.append(i,p,d,m,g),(async()=>{let v=0;try{v=(await o.listChats()).length;}catch{v=0;}p.textContent=n("pptx.ai.exportLogsStoredCount",{count:v});})(),r}function gi(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-options-row-label");if(o.appendChild(e.createTextNode(t(n.labelKey))),n.infoKey){let r=chunkOBVLNSK5_cjs.w(e,"i","pptxv-options-info");r.textContent="i",r.title=t(n.infoKey),r.setAttribute("aria-label",t(n.infoKey)),o.appendChild(r);}return o}function bi(e,t,n){return n.readOnly!==true?false:(e.toggleAttribute("disabled",true),e.title=t("pptx.options.lockedByHost"),true)}function fi(e){return `pptxv-options-row${e.indent?" is-indent":""}`}function uD(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"label",fi(o)),s=e.createElement("pptx-ui-checkbox");s.setAttribute("aria-label",t(o.labelKey)),s.checked=r.getValue(o.group,o.key)===true;let a=bi(s,t,o);s.addEventListener("change",()=>{a||r.setValue(o.group,o.key,s.checked);}),i.append(gi(e,t,o),s),n.appendChild(i);}function xD(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div",fi(o)),s=e.createElement("pptx-ui-select");s.setAttribute("aria-label",t(o.labelKey));for(let p of o.choices){let d=e.createElement("option");d.value=p.value,d.textContent=t(p.labelKey),s.appendChild(d);}let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=bi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(gi(e,t,o),s),n.appendChild(i);}function gD(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div",fi(o)),s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-options-number"),a=e.createElement("input");a.type="number",a.min=String(o.min),a.max=String(o.max),a.step=String(o.step??1),a.setAttribute("aria-label",t(o.labelKey));let l=r.getValue(o.group,o.key);a.value=String(typeof l=="number"?l:o.min);let p=bi(a,t,o);if(a.addEventListener("change",()=>{if(p)return;let d=chunk24B6ZCFG_cjs.Fq(a.value,o.min,o.max);d!==void 0&&(a.value=String(d),r.setValue(o.group,o.key,d));}),s.appendChild(a),o.unitKey){let d=chunkOBVLNSK5_cjs.w(e,"span","pptxv-options-unit");d.textContent=t(o.unitKey),s.appendChild(d);}i.append(gi(e,t,o),s),n.appendChild(i);}function bD(e,t,n,o,r){let i=chunkOBVLNSK5_cjs.w(e,"div",fi(o)),s=e.createElement("input");s.type="text",s.setAttribute("aria-label",t(o.labelKey)),o.maxLength!==void 0&&(s.maxLength=o.maxLength);let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=bi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(gi(e,t,o),s),n.appendChild(i);}function fD(e,t,n,o,r){o.kind==="toggle"?uD(e,t,n,o,r):o.kind==="select"?xD(e,t,n,o,r):o.kind==="number"?gD(e,t,n,o,r):bD(e,t,n,o,r);}function qA(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"section","pptxv-options-section"),a=chunkOBVLNSK5_cjs.w(e,"h3");if(a.textContent=t(o.titleKey),s.appendChild(a),o.descriptionKey){let l=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");l.textContent=t(o.descriptionKey),s.appendChild(l);}for(let l of o.controls)fD(e,t,s,l,r);o.special&&i&&i(o,s),n.appendChild(s);}function Xe(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"button","pptxv-options-action");return r.type="button",r.textContent=n,r.addEventListener("click",o),t.appendChild(r),r}function YA(){return {selectedId:null}}function jA(e,t,n,o,r,i,s){let a=chunkOBVLNSK5_cjs.w(e,"h4");if(a.textContent=o,n.appendChild(a),r.length===0){let d=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-addins-empty");d.textContent=t("pptx.options.addIns.description"),n.appendChild(d);return}let l=e.createElement("table"),p=e.createElement("tbody");for(let d of r){let u=e.createElement("tr");u.className=i.selectedId===d.id?"is-selected":"";let m=e.createElement("td");m.textContent=t(d.nameKey);let g=e.createElement("td");g.textContent=d.location;let x=e.createElement("td");x.textContent=t(`pptx.options.addInType.${d.type}`),u.append(m,g,x),u.addEventListener("click",()=>{i.selectedId=d.id,s();}),p.appendChild(u);}l.appendChild(p),n.appendChild(l);}function XA(e,t,n,o,r,i){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-addins"),a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-addins-head");for(let d of ["name","location","type"]){let u=chunkOBVLNSK5_cjs.w(e,"span");u.textContent=t(`pptx.options.addIns.${d}`),a.appendChild(u);}s.appendChild(a);let l=chunk24B6ZCFG_cjs.nq(o);jA(e,t,s,t("pptx.options.addIns.active"),l.filter(d=>d.active),r,i),jA(e,t,s,t("pptx.options.addIns.inactive"),l.filter(d=>!d.active),r,i);let p=l.find(d=>d.id===r.selectedId);if(p){let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-addins-detail"),u=chunkOBVLNSK5_cjs.w(e,"p");u.textContent=t(p.nameKey);let m=chunkOBVLNSK5_cjs.w(e,"p");m.textContent=t(p.descriptionKey);let g=chunkOBVLNSK5_cjs.w(e,"p");g.textContent=p.location,d.append(u,m,g),s.appendChild(d);}n.appendChild(s);}function ZA(){return {selectedAvailable:null,selectedCurrent:null}}function QA(e,t,n,o,r,i,s){let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-qa-col"),l=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-qa-title");l.textContent=o;let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-qa-list");p.setAttribute("role","listbox"),p.setAttribute("aria-label",o);for(let d of r){let u=chunk24B6ZCFG_cjs.hq.find(g=>g.id===d);if(!u)continue;let m=chunkOBVLNSK5_cjs.w(e,"button",i===d?"is-selected":"");m.type="button",m.setAttribute("role","option"),m.setAttribute("aria-selected",String(i===d)),m.textContent=t(u.labelKey),m.addEventListener("click",()=>s(d)),p.appendChild(m);}a.append(l,p),n.appendChild(a);}function JA(e,t,n,o,r,i){let s=o.getOptions().quickAccess.commandIds,a=chunk24B6ZCFG_cjs.jq(s).map(b=>b.id),l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-qa");QA(e,t,l,t("pptx.options.quickAccess.chooseCommands"),a,r.selectedAvailable,b=>{r.selectedAvailable=b,i();});let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-qa-arrows"),d=Xe(e,p,`${t("pptx.options.quickAccess.add")} \xBB`,()=>{r.selectedAvailable&&(o.setQuickAccessCommands(chunk24B6ZCFG_cjs.kq(s,r.selectedAvailable)),r.selectedAvailable=null);});d.disabled=!r.selectedAvailable;let u=Xe(e,p,`\xAB ${t("pptx.options.quickAccess.remove")}`,()=>{r.selectedCurrent&&(o.setQuickAccessCommands(chunk24B6ZCFG_cjs.lq(s,r.selectedCurrent)),r.selectedCurrent=null);});u.disabled=!r.selectedCurrent,l.appendChild(p),QA(e,t,l,t("pptx.options.quickAccess.currentCommands"),s,r.selectedCurrent,b=>{r.selectedCurrent=b,i();});let m=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-qa-arrows"),g=Xe(e,m,"\u2191",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunk24B6ZCFG_cjs.mq(s,r.selectedCurrent,"up"));});g.setAttribute("aria-label",t("pptx.options.quickAccess.moveUp")),g.disabled=!r.selectedCurrent;let x=Xe(e,m,"\u2193",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunk24B6ZCFG_cjs.mq(s,r.selectedCurrent,"down"));});x.setAttribute("aria-label",t("pptx.options.quickAccess.moveDown")),x.disabled=!r.selectedCurrent,l.appendChild(m),n.appendChild(l),Xe(e,n,t("pptx.options.quickAccess.reset"),()=>{o.setQuickAccessCommands([...chunk24B6ZCFG_cjs.iq]);});}function ek(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"section","pptxv-options-section"),i=chunkOBVLNSK5_cjs.w(e,"h3");i.textContent=t("pptx.options.ribbon.tabsTitle");let s=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");s.textContent=t("pptx.options.ribbon.tabsDescription"),r.append(i,s);let a=new Set(o.getOptions().ribbon.hiddenTabIds),l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-ribbon-list");for(let p of chunk24B6ZCFG_cjs.dq){let d=p.id==="file",u=chunkOBVLNSK5_cjs.w(e,"label",`pptxv-parity-check${d?" is-locked":""}`),m=e.createElement("input");m.type="checkbox",m.checked=d||!a.has(p.id),m.disabled=d,m.addEventListener("change",()=>{o.setRibbonTabHidden(p.id,!m.checked);}),u.append(m,e.createTextNode(t(p.labelKey))),l.appendChild(u);}r.appendChild(l),Xe(e,r,t("pptx.options.ribbon.reset"),()=>{o.reset("ribbon");}),n.appendChild(r),Ap(e,t,n);}function Ap(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"section","pptxv-options-section"),r=chunkOBVLNSK5_cjs.w(e,"h3");r.textContent=t("pptx.settings.keyboardShortcuts"),o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-shortcut-list");for(let{actionKey:s,shortcut:a}of chunk24B6ZCFG_cjs.Bp){let l=chunkOBVLNSK5_cjs.w(e,"div"),p=chunkOBVLNSK5_cjs.w(e,"span");p.textContent=t(s);let d=chunkOBVLNSK5_cjs.w(e,"kbd");d.textContent=a,l.append(p,d),i.appendChild(l);}o.appendChild(i),n.appendChild(o);}function tk(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"input","pptxv-visually-hidden");r.type="file",r.accept=chunk24B6ZCFG_cjs.uo,r.hidden=true;let i=chunkOBVLNSK5_cjs.w(e,"button","pptxv-options-action");i.type="button",i.textContent=t("pptx.options.general.addFontFile"),i.disabled=!o.enabled,i.addEventListener("click",()=>r.click());let s=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");if(s.setAttribute("role","alert"),s.hidden=true,s.textContent=t("pptx.options.general.customFontError"),r.addEventListener("change",()=>{let p=r.files?.[0];r.value="",p&&(s.hidden=true,chunk24B6ZCFG_cjs.vo(p).then(d=>{d?(o.onRegistered(d.family),o.onRefresh()):s.hidden=false;}).catch(()=>{s.hidden=false;}));}),n.append(i,r,s),!o.enabled){let p=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsDisabled"),n.appendChild(p);}let a=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");if(a.textContent=t("pptx.options.general.customFontsAdded"),n.appendChild(a),o.families.length===0){let p=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsEmpty"),n.appendChild(p);return}let l=chunkOBVLNSK5_cjs.w(e,"ul","pptxv-options-font-list");for(let p of o.families){let d=chunkOBVLNSK5_cjs.w(e,"li");d.textContent=p,d.style.fontFamily=p,l.appendChild(d);}n.appendChild(l);}function ok(e,t,n){let{store:o}=n,r=we(e,t,t("pptx.options.title"));r.dialog.classList.add("pptxv-options-dialog");let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-body"),s=chunkOBVLNSK5_cjs.w(e,"nav","pptxv-options-nav");s.setAttribute("aria-label",t("pptx.options.title"));let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-options-pane");i.append(s,a),r.body.appendChild(i);let l=chunk24B6ZCFG_cjs.pq(o.getOptions()),p=n.customization??chunk24B6ZCFG_cjs.$q,d=chunk24B6ZCFG_cjs.ir(chunk24B6ZCFG_cjs.Gq,p),u=n.aiEnabled===true&&chunk24B6ZCFG_cjs.hr(p,"ai"),m=n.initialTab??"general",g=false,x=null,b=n.themeOptions.currentKey,v=n.localeOptions.currentCode,f=ZA(),S=YA(),y=(I,R)=>{if(I.special==="themePicker")cE(e,R,n.themeOptions.catalog.map(O=>({key:O.key,label:t(O.labelKey),previewColor:O.theme?.colors?.primary??"#6b7280"})),b,O=>{let B=n.themeOptions.catalog.find(V=>V.key===O);B&&(b=O,n.themeOptions.onSelect(B.theme,O),P());});else if(I.special==="clearCache"){let O=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");O.textContent=t("pptx.options.save.clearCacheDescription"),R.appendChild(O),Xe(e,R,t("pptx.options.save.clearCacheNow"),n.onClearCache);}else I.special==="customFonts"?tk(e,t,R,{enabled:n.store.getOptions().general.enableCustomFontUpload,families:n.customFonts?.list()??[],onRegistered:O=>n.customFonts?.register(O),onRefresh:P}):I.special==="shortcutReference"&&Ap(e,t,R);},h=()=>{let I=chunkOBVLNSK5_cjs.w(e,"section","pptxv-options-section"),R=chunkOBVLNSK5_cjs.w(e,"h3");R.textContent=t("pptx.options.language.displayLanguage");let O=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-section-desc");O.textContent=t("pptx.options.language.displayLanguageDescription"),I.append(R,O),Nr(e,I,"pptxv-options-locale",n.localeOptions.catalog.map(B=>({value:B.code,label:B.nativeLabel})),v,B=>{v=B,n.localeOptions.onSelect(B),D();}),a.appendChild(I);},C=I=>{for(let R of I.sections)qA(e,t,a,R,o,y);},w=()=>{for(let R of s.querySelectorAll("button"))R.classList.remove("is-active"),R.setAttribute("aria-current","false");x?.classList.add("is-active"),x?.setAttribute("aria-current","true"),a.replaceChildren();let I=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-headline");I.textContent=t("pptx.ai.exportLogsHint"),a.append(I,$A({doc:e,t,store:n.aiChatStore}));};function P(){if(g){w();return}let I=d.find(O=>O.id===m)??d[0];if(!I)return;for(let O of s.querySelectorAll("button")){let B=O.getAttribute("data-tab")===I.id;O.classList.toggle("is-active",B),O.setAttribute("aria-current",String(B));}a.replaceChildren();let R=chunkOBVLNSK5_cjs.w(e,"p","pptxv-options-headline");R.textContent=t(I.descriptionKey),a.appendChild(R),I.custom==="language"?h():I.custom==="ribbon"?ek(e,t,a,o):I.custom==="addIns"?XA(e,t,a,n.addinStatus,S,P):(C(I),I.custom==="quickAccess"&&JA(e,t,a,o,f,P));}let k=I=>{m=I,g=false,P();},A=()=>{s.replaceChildren(),s.setAttribute("aria-label",t("pptx.options.title"));for(let I of d){let R=ae(e,s,t(I.labelKey),()=>k(I.id));R.dataset.tab=I.id;}x=null,u&&(x=ae(e,s,t("pptx.ai.settingsSectionTitle"),()=>{g=true,P();}),x.dataset.tab="ai");},T=o.subscribe(()=>{if(!r.dialog.isConnected){T();return}P();}),E=ae(e,r.footer,t("pptx.options.resetAll"),()=>{o.reset();}),L=ae(e,r.footer,t("pptx.common.cancel"),()=>{o.setOptions(l),r.close(),T();}),M=ae(e,r.footer,t("pptx.common.ok"),()=>{r.close(),T();},true);function D(){r.heading.textContent=t("pptx.options.title"),A(),E.textContent=t("pptx.options.resetAll"),L.textContent=t("pptx.common.cancel"),M.textContent=t("pptx.common.ok"),P();}D();}function nk(e,t,n,o,r,i=[]){let s=we(e,t,t("pptx.slideShow.setUpTitle")),a={...n},l=S=>{let y=chunkOBVLNSK5_cjs.w(e,"fieldset"),h=chunkOBVLNSK5_cjs.w(e,"legend");return h.textContent=S,y.appendChild(h),s.body.appendChild(y),y},p=l(t("pptx.slideShow.showType"));for(let[S,y]of [["presented","pptx.slideShow.presentedBySpeaker"],["browsed","pptx.slideShow.browsedByIndividual"],["kiosk","pptx.slideShow.browsedAtKiosk"]]){let h=chunkOBVLNSK5_cjs.w(e,"label","pptxv-parity-check"),C=e.createElement("input");C.type="radio",C.name="showType",C.checked=(a.showType??"presented")===S,C.addEventListener("change",()=>{a.showType=S,S==="kiosk"&&(a.loopContinuously=true);}),h.append(C,e.createTextNode(t(y))),p.appendChild(h);}let d=l(t("pptx.slideShow.showSlides")),u=qe(e,d,t("pptx.slideShow.allSlides"),(a.showSlidesMode??"all")==="all");u.type="radio",u.name="range",u.addEventListener("change",()=>{a.showSlidesMode="all";});let m=e.createElement("input");m.type="number",m.min="1",m.max=String(o),m.value=String(a.showSlidesFrom??1);let g=e.createElement("input");g.type="number",g.min="1",g.max=String(o),g.value=String(a.showSlidesTo??o);let x=chunkOBVLNSK5_cjs.w(e,"label","pptxv-parity-range"),b=e.createElement("input");if(b.type="radio",b.name="range",b.checked=a.showSlidesMode==="range",x.append(b,e.createTextNode(t("pptx.slideShow.from")),m,e.createTextNode(t("pptx.slideShow.to")),g),d.appendChild(x),b.addEventListener("change",()=>{a.showSlidesMode="range";}),i.length>0){let S=chunkOBVLNSK5_cjs.w(e,"label","pptxv-parity-range"),y=e.createElement("input");y.type="radio",y.name="range",y.dataset.pptxShowSlidesCustom="true",y.checked=a.showSlidesMode==="customShow";let h=e.createElement("select");h.setAttribute("aria-label",t("pptx.slideShow.customShow"));for(let w of i){let P=e.createElement("option");P.value=w.id,P.textContent=w.name,h.appendChild(P);}h.value=a.showSlidesCustomShowId??i[0].id;let C=()=>{a.showSlidesMode="customShow",a.showSlidesCustomShowId=h.value;};y.addEventListener("change",C),h.addEventListener("change",()=>{y.checked&&C();}),S.append(y,e.createTextNode(t("pptx.slideShow.customShow")),h),d.appendChild(S);}let v=l(t("pptx.slideShow.advanceSlides"));for(let[S,y]of [["manual","pptx.slideShow.manually"],["useTimings","pptx.slideShow.useTimings"]]){let h=qe(e,v,t(y),(a.advanceMode??"useTimings")===S);h.type="radio",h.name="advance",h.addEventListener("change",()=>{a.advanceMode=S;});}let f=l(t("pptx.slideShow.showOptions"));for(let[S,y,h]of [["loopContinuously","pptx.slideShow.loopContinuously",false],["showWithNarration","pptx.slideShow.showWithoutNarration",true],["showWithAnimation","pptx.slideShow.showWithoutAnimation",true],["showSubtitles","pptx.slideShow.showSubtitles",false]]){let C=qe(e,f,t(y),h?a[S]===false:!!a[S]);C.addEventListener("change",()=>{a[S]=h?!C.checked:C.checked;});}ae(e,s.footer,t("pptx.common.cancel"),s.close),ae(e,s.footer,t("pptx.common.ok"),()=>{a.showSlidesFrom=Number(m.value),a.showSlidesTo=Number(g.value),r(a),s.close();},true);}function rk(e,t,n,o){t.querySelector("[data-pptx-slide-sorter]")?.remove();let r=chunkOBVLNSK5_cjs.w(e,"section","pptxv-slide-sorter");r.dataset.pptxSlideSorter="true",r.setAttribute("role","dialog");let i=chunkOBVLNSK5_cjs.w(e,"header"),s=chunkOBVLNSK5_cjs.w(e,"h2");s.textContent=n("pptx.slideSorter.title");let a=chunkOBVLNSK5_cjs.w(e,"span");a.textContent=n("pptx.slideSorter.slideCount",{count:o.slides.length});let l=chunkOBVLNSK5_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.slideSorter.close")),i.append(s,a,l),r.appendChild(i);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-sorter-grid");o.slides.forEach((m,g)=>{let x=chunkOBVLNSK5_cjs.w(e,"article","pptxv-sorter-card");x.draggable=true,x.classList.toggle("is-current",g===o.current),x.classList.toggle("is-hidden",!!m.hidden);let b=chunkOBVLNSK5_cjs.w(e,"button");b.type="button";let v=chunkOBVLNSK5_cjs.w(e,"span","pptxv-sorter-num");v.textContent=String(g+1),b.appendChild(v),b.setAttribute("aria-label",n("pptx.compare.slideNumber",{number:g+1}));let f=chunk24B6ZCFG_cjs.Tp(m.hidden,"sorter",g);if(f.marker&&f.labelId){x.setAttribute(chunk24B6ZCFG_cjs.Pp,f.marker),b.setAttribute("aria-describedby",f.labelId);let y=chunkOBVLNSK5_cjs.w(e,"span","pptxv-sorter-hidden");y.id=f.labelId,y.textContent=n(chunk24B6ZCFG_cjs.Qp),b.appendChild(y);}b.addEventListener("click",()=>{o.onSelect(g),r.remove();});let S=chunkOBVLNSK5_cjs.w(e,"div");for(let[y,h]of [[n("pptx.slideSorter.contextMenu.duplicate"),()=>o.onDuplicate(g)],[n(m.hidden?"pptx.slideSorter.contextMenu.showSlides":"pptx.slideSorter.contextMenu.hideSlides"),()=>o.onToggleHidden(g)],[n("pptx.slideSorter.contextMenu.delete"),()=>o.onDelete(g)]]){let C=chunkOBVLNSK5_cjs.w(e,"button");C.type="button",C.textContent=y,C.addEventListener("click",h),S.appendChild(C);}x.addEventListener("dragstart",y=>y.dataTransfer?.setData("text/plain",String(g))),x.addEventListener("dragover",y=>y.preventDefault()),x.addEventListener("drop",y=>{y.preventDefault();let h=Number(y.dataTransfer?.getData("text/plain"));Number.isInteger(h)&&o.onReorder(h,g);}),x.append(b,S),p.appendChild(x);}),r.appendChild(p);let d=()=>{e.removeEventListener("keydown",u),r.remove();},u=m=>{if(!r.isConnected){e.removeEventListener("keydown",u);return}let{action:g}=chunk24B6ZCFG_cjs.Fl(m,{canEdit:o.canEdit!==false,isTextInputTarget:chunk24B6ZCFG_cjs.Bl(m.target)});if(g==="close"){m.stopPropagation(),d();return}if(g==="delete"){m.preventDefault(),o.onDelete(o.current);return}g==="duplicate"&&(m.preventDefault(),o.onDuplicate(o.current));};e.addEventListener("keydown",u),l.addEventListener("click",d),t.appendChild(r);}function ik(e){let t=()=>e.store.get(),n=null,o=OA(e),r=BA(e);return {openSettings(i="general"){let s=e.getThemeState(),a=e.getLocaleState(),l=i==="shortcuts"?"ribbon":"general";ok(e.doc,(p,d)=>e.t(p,d),{store:e.optionsStore,initialTab:l,aiEnabled:e.aiEnabled,customization:e.getCustomization?.(),addinStatus:e.getAddinStatus(),onClearCache:()=>e.clearOptionsCache(),themeOptions:{catalog:s.catalog,currentKey:s.key,onSelect:p=>e.setTheme(p)},localeOptions:{catalog:a.catalog,currentCode:a.code,onSelect:p=>e.setLocale(p)},customFonts:{list:()=>t().customFontFamilies,register:p=>e.registerCustomFont(p)}});},openSetUpSlideShow(){let i=t();nk(e.doc,e.t,i.presentationProperties,i.slides.length,s=>{e.editor.updatePresentationProperties(s),e.store.set({activeCustomShowId:chunk24B6ZCFG_cjs.Kp(s,e.store.get().customShows)??null});},i.customShows);},openHeaderFooter(){GA(e.doc,e.t,{value:t().headerFooter,onApply:i=>e.editor.updateHeaderFooter(i)});},openCompare(){vD(e);},openPrintDialog(){UA(e.doc,e.t,t().slides.length,i=>{e.print(i);},chunk24B6ZCFG_cjs.vq(e.optionsStore.getOptions()));},startRehearsal(){WA(e.doc,e.root(),e.t,{slideCount:t().slides.length,currentSlide:()=>t().currentSlide,navigate:e.goToSlide,onSave:i=>e.editor.commitSlides(chunk24B6ZCFG_cjs.dd(t().slides,i))});},openSelectionPane(){r.open();},openSlideSorter(){hD(e);},openReadingView(){let i=t();n?.close(),n=KA(e.doc,e.root(),e.t,{slides:i.slides,canvasSize:i.canvasSize,initialSlideIndex:i.currentSlide,renderStage:(s,a)=>e.renderSlideNode(s,a),onExit:s=>{n=null,e.goToSlide(s);}});},closeReadingView(){n?.close(),n=null;},openOutlineView(){o.open();},closeOutlineView(){o.close();},openComments(){zA(e.doc,e.root(),e.t,{getComments:()=>{let i=t();return i.slides[i.currentSlide]?.comments??[]},getAuthors:()=>{let i=t();return Vr(i.modernCommentAuthors,i.commentAuthors)},subscribe:i=>e.store.subscribe(()=>i())},e.editor.getEditActions().comments);},openHyperlink(){let i=t(),s=i.slides[i.currentSlide]?.elements.find(({id:a})=>a===i.selectedElementId);s&&ii(e.doc,e.t,s,a=>e.editor.applyElementPatch(s.id,a));},openCustomShows(){let i=t();_A(e.doc,e.t,{shows:i.customShows,slides:i.slides,activeShowId:i.activeCustomShowId,onSave:s=>e.editor.updateCustomShows(s),onSetActive:s=>e.store.set({activeCustomShowId:s}),onRun:s=>{let a=t().slides.findIndex(({rId:l})=>s.slideRIds.includes(l));a>=0&&e.goToSlide(a),e.enterPresentation();}});}}}async function vD(e){let t=await chunk24B6ZCFG_cjs.Nj();if(!t)return;let n=await mo(t.buffer,{allowExternalImages:e.optionsStore.getOptions().trust.allowExternalContent});try{let o=chunk24B6ZCFG_cjs.Wh(e.store.get().slides,n.slides);NA(e.doc,e.root(),e.t,{result:o,onAccept:r=>e.editor.commitSlides(chunk24B6ZCFG_cjs.Xh(e.store.get().slides,r)),onAcceptAll:()=>e.editor.commitSlides(chunk24B6ZCFG_cjs.Yh(e.store.get().slides,o))});}finally{mt(n.blobUrls),n.handler.dispose();}}function hD(e){let t=e.store.get();rk(e.doc,e.root(),e.t,{slides:t.slides,current:t.currentSlide,canEdit:t.editable,onSelect:e.goToSlide,onReorder:(n,o)=>yD(e,n,o),onDelete:n=>e.editor.commitSlides(t.slides.filter((o,r)=>r!==n)),onDuplicate:n=>{let o=[...t.slides];o.splice(n+1,0,structuredClone(o[n])),e.editor.commitSlides(o,n+1);},onToggleHidden:n=>e.editor.commitSlides(t.slides.map((o,r)=>r===n?{...o,hidden:!o.hidden}:o))});}function yD(e,t,n){let o=[...e.store.get().slides],[r]=o.splice(t,1);r&&(o.splice(n,0,r),e.editor.commitSlides(o,n));}var SD=2.5,CD=14;function ak(e,t){let n=e.getBoundingClientRect();return {x:Math.min(1,Math.max(0,(t.clientX-n.left)/Math.max(n.width,1))),y:Math.min(1,Math.max(0,(t.clientY-n.top)/Math.max(n.height,1)))}}function sk(e,t){let n=e.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",chunk24B6ZCFG_cjs.pk(t.points)),n.setAttribute("fill","none"),n.setAttribute("stroke",t.color),n.setAttribute("stroke-width",String(t.width)),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("vector-effect","non-scaling-stroke"),n.setAttribute("opacity",t.tool==="highlighter"?"0.4":"1"),n}function kp(e){let{stageWrap:t,slideIndex:n,tool:o}=e;if(t.querySelector(".pptxv-presentation-annotations")?.remove(),o==="none")return ()=>{};let r=t.ownerDocument,i=r.createElementNS("http://www.w3.org/2000/svg","svg");i.classList.add("pptxv-presentation-annotations"),i.setAttribute("viewBox","0 0 100 100"),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("aria-label","Presentation annotations"),i.setAttribute("data-pptx-annotation-overlay",""),Object.assign(i.style,{position:"absolute",inset:"0",zIndex:String(chunk24B6ZCFG_cjs.Sk(e.blackout)),width:"100%",height:"100%",cursor:chunk24B6ZCFG_cjs.Er(o),touchAction:"none"});let s=[...e.strokes],a=null,l=null,p=r.createElementNS("http://www.w3.org/2000/svg","circle");p.setAttribute("r","10"),p.setAttribute("fill","#ef4444"),p.setAttribute("vector-effect","non-scaling-stroke"),p.style.filter="drop-shadow(0 0 8px #ef4444)",p.style.display="none";let d=()=>{i.replaceChildren(...s.filter(v=>v.slideIndex===n).map(v=>sk(r,v))),a&&i.append(sk(r,a)),o==="laser"&&i.append(p);},u=v=>{s=v,e.onChange(v),d();},m=v=>{v.preventDefault(),v.stopPropagation();let f=ak(i,v);if(l=v.pointerId,i.setPointerCapture?.(v.pointerId),o==="eraser"){u(chunk24B6ZCFG_cjs.nk(s,n,f));return}(o==="pen"||o==="highlighter")&&(a={id:`presentation-ink-${crypto.randomUUID()}`,slideIndex:n,tool:o,color:o==="highlighter"&&e.color==="#ef4444"?"#fde047":e.color,width:o==="highlighter"?CD:SD,points:[f]},d());},g=v=>{let f=ak(i,v);if(e.onPointerMove?.(f),o==="laser"){p.setAttribute("cx",String(f.x*100)),p.setAttribute("cy",String(f.y*100)),p.style.display="";return}l===v.pointerId&&(o==="eraser"?u(chunk24B6ZCFG_cjs.nk(s,n,f)):a&&(a=chunk24B6ZCFG_cjs.mk(a,f),d()));},x=()=>{l=null,a?.points.length&&a.points.length>1&&u([...s,a]),a=null,d();},b=()=>{p.style.display="none",x();};return i.addEventListener("pointerdown",m),i.addEventListener("pointermove",g),i.addEventListener("pointerup",x),i.addEventListener("pointercancel",x),i.addEventListener("pointerleave",b),t.append(i),d(),()=>i.remove()}function Ip(e,t,n,o){return new Promise(r=>{let i=e.createElement("div");i.className="pptxv-parity-backdrop pptxv-keep-annotations";let s=e.createElement("section");s.className="pptxv-parity-dialog",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let a=e.createElement("h2");a.textContent=t("pptx.keepAnnotations.title");let l=e.createElement("div");l.className="pptxv-parity-body",l.textContent=t("pptx.keepAnnotations.description",{count:n,slides:o});let p=e.createElement("footer");p.className="pptxv-parity-footer";let d=e.createElement("button");d.type="button",d.textContent=t("pptx.keepAnnotations.discard");let u=e.createElement("button");u.type="button",u.className="is-primary",u.textContent=t("pptx.keepAnnotations.keep");let m=x=>{e.removeEventListener("keydown",g),i.remove(),r(x);},g=x=>{x.key==="Escape"&&m("discard");};d.addEventListener("click",()=>m("discard")),u.addEventListener("click",()=>m("keep")),e.addEventListener("keydown",g),p.append(d,u),s.append(a,l,p),i.append(s),e.body.append(i),queueMicrotask(()=>u.focus());})}function Lp(e){let t=[],n=()=>{},o=null,r=null,i=d=>[String(d.active),String(d.slideIndex),d.pointer?.tool??"none",d.pointer?.color??""].join("|"),s=()=>e.onStrokesChange?.([...t]),a=()=>{n();let d=o,u=d?.pointer?.tool??"none";!d?.active||u==="none"||(n=kp({stageWrap:d.stageWrap,slideIndex:d.slideIndex,tool:u,color:d.pointer?.color??"#ef4444",blackout:d.blackout,strokes:t,onChange(m){t=m,s();},onPointerMove:e.onPointerMove}));},l=()=>{t=[],s(),a();},p=()=>{let d=e.getSlides(),u=false,m=d.map((g,x)=>{let b=t.filter(v=>v.slideIndex===x&&v.points.length>1).map(v=>chunk24B6ZCFG_cjs.Nm({points:v.points.map(f=>({x:f.x*(o?.canvasSize.width??960),y:f.y*(o?.canvasSize.height??540)})),color:v.color,width:v.width,tool:v.tool})).filter(v=>v!==null);return b.length===0?g:(u=true,{...g,elements:[...g.elements,...b]})});return u&&e.commitSlides(m),u};return {syncStage(d){let u=i(d),m=d.stageWrap.querySelector(".pptxv-presentation-annotations")===null,g=d.stageWrap!==o?.stageWrap||u!==r;o=d,r=u,(g||m)&&a();let x=d.stageWrap.querySelector(".pptxv-presentation-annotations");x&&(x.style.zIndex=String(chunk24B6ZCFG_cjs.Sk(d.blackout)));},getStrokes:()=>t,setStrokes(d){t=[...d],s(),a();},hasAnnotations:()=>t.length>0,clear:l,async finishPresentation(){if(t.length===0)return "none";if(e.shouldPromptKeepAnnotations?.()===false)return l(),"discarded";let d=new Set(t.map(m=>m.slideIndex)).size,u=await Ip(e.doc,e.t,t.length,d);return u==="keep"&&p(),l(),u==="keep"?"kept":"discarded"},dispose(){n(),o=null;}}}function lk(e){let t=Lp({doc:e.doc,t:e.t,getSlides:()=>e.store.get().slides,commitSlides:n=>e.editor.commitSlides(n),shouldPromptKeepAnnotations:e.shouldPromptKeepAnnotations,onStrokesChange:n=>e.updateSnapshot({inkStrokes:n}),onPointerMove:({x:n,y:o})=>e.updateSnapshot({pointer:{...e.getSnapshot().pointer??{tool:"laser",color:"#ef4444"},x:n,y:o}})});return {sync(n){let o=e.store.get();t.syncStage({stageWrap:e.getChrome().stageWrap,active:o.presenting&&n.inkMarkupVisible!==false,slideIndex:o.currentSlide,canvasSize:o.canvasSize,pointer:n.pointer,blackout:n.blackout});},clear:()=>t.clear(),finish:()=>t.finishPresentation(),dispose:()=>t.dispose()}}async function pk(e){let t=chunk24B6ZCFG_cjs.Ja.find(({id:s})=>s===e.presetId),n=e.loading.getHandler();if(!t||!n)return false;let o=e.store.get(),r=await n.switchThemePreset({slides:chunk24B6ZCFG_cjs.oo(o.slides,o.templateElementsBySlideId),width:o.canvasSize.width,height:o.canvasSize.height,themeColorMap:o.colorScheme?{...o.colorScheme}:void 0,theme:{colorScheme:o.colorScheme}},t),i=chunk24B6ZCFG_cjs.no(r.slides);return e.editor.commitSlides(i.slides,o.currentSlide),e.store.set({templateElementsBySlideId:i.templateElementsBySlideId,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.name}),true}function Mp(e){let t=null,n=false,o=()=>{n=false,t?.stop(),t=null;},r=()=>{let i=chunk24B6ZCFG_cjs.Vp();if(!i){e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")});return}t=new i,t.continuous=true,t.interimResults=true,t.lang=e.doc.documentElement.lang||"en-US",t.onresult=s=>e.emit({subtitlesVisible:true,caption:chunk24B6ZCFG_cjs.Up(s.resultIndex,s.results)}),t.onerror=()=>e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")}),t.onend=()=>{if(n)try{t?.start();}catch{}},t.start();};return {isActive:()=>n,toggle:()=>n?(o(),e.emit({subtitlesVisible:false,caption:void 0}),false):(n=true,e.emit({subtitlesVisible:true,caption:""}),r(),true),dispose:o}}function uo(e,t,n){e.style.width=`${String(Math.round(t.width*n))}px`,e.style.height=`${String(Math.round(t.height*n))}px`,e.style.overflow="hidden",e.style.position="relative";}function Dp(e,t){return e.width>0?t/e.width:1}function dk(e,t,n){return e.width<=0||e.height<=0?1:Math.max(.01,Math.min(t/e.width,n/e.height))}function Rp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-navigator",o.setAttribute("role","dialog"),o.setAttribute("aria-label",n(chunk24B6ZCFG_cjs.Yk.title));let r=t.createElement("header");r.className="pptxv-presenter-navigator-header";let i=t.createElement("h2");i.textContent=n(chunk24B6ZCFG_cjs.Yk.subtitle);let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-navigator-close",s.dataset.pptxPresenterControl="navigator-close";let a=n(chunk24B6ZCFG_cjs.Yk.close);s.setAttribute("aria-label",a),s.title=a,s.textContent=a,s.addEventListener("click",e.close),r.append(i,s);let l=t.createElement("div");return l.className="pptxv-presenter-navigator-grid",e.slides.forEach((p,d)=>{let u=t.createElement("button");u.type="button",u.className="pptxv-presenter-navigator-tile",u.dataset.slideIndex=String(d),d===e.current&&(u.classList.add("is-current"),u.setAttribute("aria-current","true")),p.hidden===true&&(u.style.opacity=String(chunk24B6ZCFG_cjs.al.hiddenSlideOpacity)),u.setAttribute("aria-label",n("pptx.presenter.slideLabel",{current:d+1,total:e.slides.length}));let m=t.createElement("div");m.className="pptxv-presenter-navigator-preview",m.setAttribute("aria-hidden","true"),m.append(e.renderSlide(p,e.tileScale)),uo(m,e.canvas,e.tileScale);let g=t.createElement("span");g.className="pptxv-presenter-navigator-caption",g.textContent=String(d+1),u.append(m,g),u.addEventListener("click",()=>e.select(d)),l.append(u);}),o.append(r,l),o}function ck(e,t,n){let o=e.createElement("div");o.className=n;let r=e.createElement("div");r.className="pptxv-presenter-heading",r.textContent=t;let i=e.createElement("div");return i.className="pptxv-presenter-readout",o.append(r,i),{root:o,value:i}}function Op(e){let{doc:t,t:n}=e,o=t.createElement("aside");o.className="pptxv-presenter-rail";let r=t.createElement("header");r.className="pptxv-presenter-rail-header";let i=ck(t,n(chunk24B6ZCFG_cjs.Xk.currentTime),"pptxv-presenter-clock"),s=ck(t,n(chunk24B6ZCFG_cjs.Xk.elapsed),"pptxv-presenter-elapsed");r.append(i.root,s.root);let a=t.createElement("nav");a.className="pptxv-presenter-rail-nav";let l=(L,M)=>{let D=t.createElement("button");D.type="button",D.className="pptxv-presenter-nav-btn",D.dataset.pptxPresenterControl=L;let I=n(M);D.setAttribute("aria-label",I),D.title=I;let R=t.createElement("span");R.textContent=I;let O=chunkOBVLNSK5_cjs.K(t,L==="prev"?"chevron-left":"chevron-right");return D.append(...L==="prev"?[O,R]:[R,O]),D.addEventListener("click",()=>e.move(L==="prev"?-1:1)),D},p=l("prev","pptx.presenter.prev"),d=t.createElement("span");d.className="pptxv-presenter-counter";let u=l("next","pptx.presenter.next");a.append(p,d,u);let m=t.createElement("section");m.className="pptxv-presenter-next",m.dataset.pptxPresenterNextPreview="true";let g=t.createElement("div");g.className="pptxv-presenter-heading",g.textContent=n(chunk24B6ZCFG_cjs.Xk.nextSlidePreview);let x=t.createElement("div");x.className="pptxv-presenter-next-body",m.append(g,x);let b=t.createElement("section");b.className="pptxv-presenter-notes",b.dataset.pptxPresenterNotes="true";let v=t.createElement("div");v.className="pptxv-presenter-notes-header";let f=t.createElement("div");f.className="pptxv-presenter-heading",f.textContent=n(chunk24B6ZCFG_cjs.Xk.speakerNotes);let S=chunk24B6ZCFG_cjs.ek,y=t.createElement("div");y.className="pptxv-presenter-notes-body";let h=t.createElement("span");h.className="pptxv-presenter-notes-size";let C=L=>{S=chunk24B6ZCFG_cjs.fk(S+L),y.style.fontSize=`${String(S)}px`,h.textContent=`${String(S)}px`,P.disabled=S<=chunk24B6ZCFG_cjs.bk,k.disabled=S>=chunk24B6ZCFG_cjs.ck;},w=(L,M,D)=>{let I=t.createElement("button");I.type="button",I.className="pptxv-presenter-notes-btn",I.dataset.pptxPresenterControl=L;let R=n(M);return I.setAttribute("aria-label",R),I.title=R,I.append(chunkOBVLNSK5_cjs.K(t,D<0?"minus":"plus")),I.addEventListener("click",()=>C(D)),I},P=w("notes-font-decrease","pptx.presenter.decreaseFontSize",-chunk24B6ZCFG_cjs.dk),k=w("notes-font-increase","pptx.presenter.increaseFontSize",chunk24B6ZCFG_cjs.dk),A=t.createElement("div");A.className="pptxv-presenter-notes-controls",A.append(P,h,k),v.append(f,A),b.append(v,y),C(0),o.append(r,a,m,b);let T=L=>{y.replaceChildren();let M=L?.notesSegments;if(M?.length){for(let R of chunk24B6ZCFG_cjs.ik(M)){if(R.kind==="break"){y.append(t.createElement("br"));continue}let O=t.createElement("span");O.textContent=R.text,Object.assign(O.style,R.style),y.append(O);}return}let D=L?.notes?.trim();if(D){y.textContent=D;return}let I=t.createElement("em");I.className="pptxv-presenter-empty",I.textContent=n(chunk24B6ZCFG_cjs.Xk.noNotes),y.append(I);};return {root:o,syncClock:(L,M)=>{i.value.textContent=chunk24B6ZCFG_cjs.gk(new Date(L)),s.value.textContent=chunk24B6ZCFG_cjs.hk(M);},syncSlide:()=>{let L=e.getSlides(),M=e.getCurrent();d.textContent=`${String(M+1)} / ${String(L.length)}`,p.disabled=chunk24B6ZCFG_cjs._k(M),u.disabled=chunk24B6ZCFG_cjs.Zk(),x.replaceChildren();let D=chunk24B6ZCFG_cjs.Jp(L,M,e.getActiveCustomShow?.(),e.getAuthoredRange?.());if(D){let I=e.previewScale();x.append(e.renderSlide(D,I)),uo(x,e.canvas(),I);}else {x.style.removeProperty("width"),x.style.removeProperty("height");let I=t.createElement("em");I.className="pptxv-presenter-empty",I.textContent=n(chunk24B6ZCFG_cjs.Xk.endOfPresentation),x.append(I);}T(L[M]);}}}var wD={"circle-pause":"circle-pause","circle-play":"circle-play","rotate-ccw":"rotate-ccw","grid-2x2":"grid-2x2","zoom-in":"zoom-in","zoom-out":"zoom-out",scan:"scan","mouse-pointer-2":"mouse-pointer-2","pen-tool":"pen",highlighter:"highlighter",eraser:"eraser",captions:"captions",monitor:"monitor","monitor-off":"monitor-off","arrow-left-right":"arrow-left-right",x:"close"},mk={laser:"laser",pen:"pen",highlighter:"highlighter",eraser:"eraser"};function ED(e,t,n){let o=mk[e];if(o)return (t.pointer?.tool??"none")===o;switch(e){case "blackout-black":return t.blackout==="black";case "blackout-white":return t.blackout==="white";case "captions":return t.subtitlesVisible===true;case "audience":return n;default:return false}}function TD(e,t){let n=mk[e];return n?()=>{let r=t.getSnapshot().pointer?.tool??"none";t.setPointerTool(r===n?"none":n);}:{"timer-toggle":t.toggleTimer,"timer-reset":t.resetTimer,"all-slides":t.showAllSlides,"zoom-in":()=>t.stepZoom(1),"zoom-out":()=>t.stepZoom(-1),"zoom-reset":t.resetZoom,"blackout-black":()=>t.setBlackout("black"),"blackout-white":()=>t.setBlackout("white"),captions:t.toggleCaptions,audience:t.toggleAudience,"swap-displays":t.swapDisplays,end:t.end}[e]}function Hp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-strip";let r=[];for(let i of chunk24B6ZCFG_cjs.Wk){if(i.kind==="divider"){let d=t.createElement("span");d.className="pptxv-presenter-strip-divider",d.setAttribute("aria-hidden","true"),o.append(d);continue}if(i.kind==="spacer"){let d=t.createElement("span");d.className="pptxv-presenter-strip-spacer",o.append(d);continue}let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-strip-btn",s.dataset.pptxPresenterControl=i.id;let a=TD(i.id,e);if(a&&s.addEventListener("click",a),i.glyph){let d=t.createElement("span");d.textContent=i.glyph,d.setAttribute("aria-hidden","true"),s.append(d);}let l=t.createElement("span");l.className="pptxv-presenter-strip-icon",l.setAttribute("aria-hidden","true"),s.append(l);let p=()=>{let d=e.getSnapshot(),u=ED(i.id,d,e.isAudienceOpen()),m=d.paused===true,g=i.id==="timer-toggle"?m:u,x=g&&i.activeLabelKey?i.activeLabelKey:i.labelKey,b=x?n(x):"";s.setAttribute("aria-label",b),s.title=b,i.kind==="toggle"&&s.setAttribute("aria-pressed",String(u)),s.classList.toggle("is-active",u);let v=g&&i.activeIcon?i.activeIcon:i.icon;l.replaceChildren();let f=v===void 0?void 0:wD[v];f&&l.append(chunkOBVLNSK5_cjs.K(t,f));};p(),r.push(p),o.append(s);}return {root:o,sync:()=>{for(let i of r)i();}}}function Fp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter",o.setAttribute("role","region"),o.setAttribute("aria-label",n("pptx.presenter.presenterView"));for(let[h,C]of Object.entries(chunk24B6ZCFG_cjs.bl()))o.style.setProperty(h,C);let r=Hp({...e,showAllSlides:()=>g()}),i=t.createElement("div");i.className="pptxv-presenter-body";let s=t.createElement("div");s.className="pptxv-presenter-main",s.dataset.pptxPresenterSlide="true";let a=t.createElement("div");a.className="pptxv-presenter-main-frame";let l=t.createElement("div");l.className="pptxv-presenter-badge",s.append(a,l),s.addEventListener("click",()=>{chunk24B6ZCFG_cjs.ak(e.getSnapshot().pointer?.tool)&&e.move(1);});let p=Op({doc:t,t:n,getSlides:e.getSlides,getCurrent:e.getCurrent,renderSlide:e.renderSlide,previewScale:()=>Dp(e.canvasSize(),chunk24B6ZCFG_cjs.al.nextPreviewWidth),canvas:e.canvasSize,getActiveCustomShow:e.getActiveCustomShow,getAuthoredRange:e.getAuthoredRange,move:e.move});i.append(s,p.root);let d=t.createElement("div");d.className="pptxv-presenter-progress",d.setAttribute("role","progressbar"),d.setAttribute("aria-valuemin","0"),d.setAttribute("aria-valuemax","100"),d.setAttribute("aria-label",n(chunk24B6ZCFG_cjs.Xk.timerProgress));let u=t.createElement("div");u.className="pptxv-presenter-progress-fill",d.append(u),o.append(r.root,i,d),e.container.append(o);let m=null;function g(){m?.remove(),m=Rp({doc:t,t:n,slides:e.getSlides(),current:e.getCurrent(),renderSlide:e.renderSlide,tileScale:Dp(e.canvasSize(),chunk24B6ZCFG_cjs.al.navigatorTileWidth),canvas:e.canvasSize(),select:h=>{e.navigate(h),x();},close:()=>x()}),o.append(m);}function x(){m?.remove(),m=null;}function b(){let h=e.getSlides(),C=e.getCurrent(),w=h[C];if(a.replaceChildren(),w){let P=v();a.append(e.renderSlide(w,P)),uo(a,e.canvasSize(),P);}else {a.style.removeProperty("width"),a.style.removeProperty("height");let P=t.createElement("div");P.className="pptxv-presenter-empty",P.textContent=n(chunk24B6ZCFG_cjs.Xk.noSlides),a.append(P);}l.textContent=n(chunk24B6ZCFG_cjs.Xk.slideLabel,{current:C+1,total:h.length}),p.syncSlide(),f();}function v(){let h=chunk24B6ZCFG_cjs.al.mainPadding*2;return dk(e.canvasSize(),Math.max(1,s.clientWidth-h),Math.max(1,s.clientHeight-h))}function f(){let h=e.getSnapshot().zoom,C=h?.scale??1;a.style.transform=`scale(${String(C)})`,a.style.transformOrigin=`${String((h?.originX??.5)*100)}% ${String((h?.originY??.5)*100)}%`;}function S(){let h=e.getElapsedMs();p.syncClock(Date.now(),h);let C=chunk24B6ZCFG_cjs.$k(h);d.setAttribute("aria-valuenow",String(Math.round(C.percent))),d.title=n("pptx.presenter.timerTitle",{elapsed:chunk24B6ZCFG_cjs.hk(h),segment:C.segment+1}),u.style.width=`${String(C.percent)}%`;}b(),S(),r.sync();let y=setInterval(S,1e3);return {syncSlide:b,syncSnapshot:()=>{r.sync(),f();},showAllSlides:()=>g(),dispose:()=>{clearInterval(y),x(),o.remove();}}}function Vp(e,t){e.querySelectorAll(".pptxv-presenter-effect").forEach(r=>r.remove());let n=r=>{let i=e.ownerDocument.createElement("div");return i.className=`pptxv-presenter-effect ${r}`,e.append(i),i};if(t.blackout!=="none"){let r=n("blank");r.setAttribute("data-pptx-blackout",""),Object.assign(r.style,{position:"absolute",inset:"0",zIndex:String(chunk24B6ZCFG_cjs.Rk),background:t.blackout,pointerEvents:"none"});}if(t.pointer?.tool==="laser"){let r=n("laser");Object.assign(r.style,{position:"absolute",zIndex:"76",width:"20px",height:"20px",left:`${t.pointer.x*100}%`,top:`${t.pointer.y*100}%`,transform:"translate(-50%,-50%)",borderRadius:"50%",background:"#ef4444",boxShadow:"0 0 20px 8px #ef444488"});}let o=t.inkStrokes?.filter(r=>r.slideIndex===t.slideIndex);if(o?.length){let r=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("pptxv-presenter-effect","ink"),r.setAttribute("viewBox","0 0 1 1"),r.setAttribute("preserveAspectRatio","none"),Object.assign(r.style,{position:"absolute",zIndex:"76",inset:"0",width:"100%",height:"100%",pointerEvents:"none"});for(let i of o){let s=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polyline");s.setAttribute("points",i.points.map(({x:a,y:l})=>`${a},${l}`).join(" ")),s.setAttribute("fill","none"),s.setAttribute("stroke",i.color),s.setAttribute("stroke-width",String(i.width)),s.setAttribute("vector-effect","non-scaling-stroke"),s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),i.tool==="highlighter"&&s.setAttribute("stroke-opacity",".4"),r.appendChild(s);}e.appendChild(r);}if(t.subtitlesVisible&&t.caption){let r=n("caption");r.textContent=t.caption,Object.assign(r.style,{position:"absolute",zIndex:"77",left:"10%",right:"10%",bottom:"32px",padding:"12px 24px",borderRadius:"8px",background:"#000c",color:"#fff",textAlign:"center",fontSize:"20px"});}}function uk(e,t,n,o,r,i){if(n.length===0)return;let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-comment-markers",{position:"absolute",inset:"0",pointerEvents:"none",zIndex:"45"}),a=chunk24B6ZCFG_cjs.rn(n,o.width,o.height,r("pptx.comments.unknownAuthor"));for(let l of a){let p=chunkOBVLNSK5_cjs.w(e,"button","pptxv-comment-marker",{position:"absolute",left:`${l.x-chunk24B6ZCFG_cjs.qn/2}px`,top:`${l.y-chunk24B6ZCFG_cjs.qn/2}px`,width:`${chunk24B6ZCFG_cjs.qn}px`,height:`${chunk24B6ZCFG_cjs.qn}px`,display:"flex",alignItems:"center",justifyContent:"center",padding:"0",pointerEvents:"auto",cursor:"pointer",borderRadius:"50%",background:"rgba(255, 165, 0, 0.9)",border:"2px solid #fff",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3)",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:"#fff"});p.type="button",p.title=l.title,p.textContent=l.label,p.addEventListener("click",d=>{d.stopPropagation(),i?.(l.commentId);}),s.appendChild(p);}t.appendChild(s);}var PD={sldImg:"pptx.master.notesMasterSlideImage",body:"pptx.master.notesMasterBody",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function xk(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div",`pptxv-master-page ${t}`);return r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.backgroundColor=o??"#ffffff",r}function gk(e,t,n,o,r){if(!n){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-canvas-empty");return l.dataset.testid="notes-master-empty",l.textContent=t("pptx.master.noNotesMaster"),l}let i=xk(e,"pptxv-notes-master-page",o,n.backgroundColor);i.dataset.testid="notes-master-page";let s=n.placeholders??[{type:"sldImg"},{type:"body"},{type:"hdr"},{type:"ftr"},{type:"dt"},{type:"sldNum"}],a=chunk24B6ZCFG_cjs.sg(n.notesStyle,r);for(let l of s){let p=chunk24B6ZCFG_cjs.fp[l.type];if(!p)continue;let d=chunkOBVLNSK5_cjs.w(e,"div",`pptxv-notes-region is-${l.type}`);d.dataset.region=l.type,d.style.left=`${p.x*o.width}px`,d.style.top=`${p.y*o.height}px`,d.style.width=`${p.w*o.width}px`,d.style.height=`${p.h*o.height}px`,l.type==="body"&&(d.style.fontSize=`${a}px`),d.textContent=t(PD[l.type]??l.type),i.appendChild(d);}return i}var AD=chunk24B6ZCFG_cjs.gp;function bk(e,t,n,o,r){if(!n){let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-master-canvas-empty");return s.dataset.testid="handout-master-empty",s.textContent=t("pptx.master.noHandoutMaster"),s}let i=xk(e,"pptxv-handout-master-page",o,n.backgroundColor);i.dataset.testid="handout-master-page";for(let[s,a]of AD(r).entries()){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-handout-slot");l.dataset.testid="handout-slot",l.style.left=`${a.x*o.width}px`,l.style.top=`${a.y*o.height}px`,l.style.width=`${a.w*o.width}px`,l.style.height=`${a.h*o.height}px`,l.textContent=t("pptx.master.handoutSlideSlot",{number:s+1}),i.appendChild(l);}for(let[s,a]of [["is-top-left","pptx.master.notesMasterHeader"],["is-top-right","pptx.master.notesMasterDate"],["is-bottom-left","pptx.master.notesMasterFooter"],["is-bottom-right","pptx.master.notesMasterPageNumber"]]){let l=chunkOBVLNSK5_cjs.w(e,"div",`pptxv-handout-corner ${s}`);l.textContent=t(a),i.appendChild(l);}return i}var fk={fitPadding:16,maxFitScale:null};function vk(e,t,n,o){let r=o?{fitPadding:0,maxFitScale:null}:n;if(n.fitPadding!==void 0){let{horizontal:i,vertical:s}=chunk24B6ZCFG_cjs.ys(r,fk).fitPadding;e.style.padding=`${s}px ${i}px`;}return chunk24B6ZCFG_cjs.zs({viewportWidth:e.clientWidth,viewportHeight:e.clientHeight,canvasWidth:Math.max(t.width,1),canvasHeight:Math.max(t.height,1),...r},fk).scale}function kD(e){let t=rp(e);return t?chunk24B6ZCFG_cjs.mp(np(e),t):[]}function Bp(e){let{doc:t,store:n,registry:o}=e,r=ps(),i=null,s=null,a=f=>{i=f;},l=(f,S,y=false,h=false,C=n.get().canvasSize)=>{let w=n.get(),P=chunk24B6ZCFG_cjs.mo(f,w.templateElementsBySlideId[f.id]??[]),k=P.length?{...f,elements:[...P,...f.elements]}:f;return chunkOBVLNSK5_cjs.A({document:t,slide:k,canvasSize:C,mediaDataUrls:w.mediaDataUrls,colorScheme:w.colorScheme,fontScheme:w.fontScheme,tableStyleMap:w.tableStyleMap,fieldContext:oi(w,f),registry:o,t:e.getTranslator(),scale:S,gridSpacingPx:chunk24B6ZCFG_cjs.Ye(w.viewProperties?.gridSpacing,10),smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:y,slides:w.slides,currentSlideIndex:w.currentSlide,onZoomClick:e.onZoomClick,onSmartArtNodeTextChange:h?e.onSmartArtNodeTextChange:void 0,onSmartArtNodeFillChange:h?e.onSmartArtNodeFillChange:void 0,onChartPointChange:h?e.onChartPointChange:void 0,onTableResizeColumns:h?e.onTableResizeColumns:void 0,onTableResizeRow:h?e.onTableResizeRow:void 0,chartPartSelection:w.chartPartSelection,onChartPartSelect:h?e.onChartPartSelect:void 0,selectedElementIds:h?new Set(w.selectedElementIds):void 0,interactive:h,templateEditing:w.editTemplateMode||w.masterViewTarget!==null,presentationStates:y?r.elementStates:void 0,captureContext:y?a:void 0})},p=f=>{i&&s&&chunkOBVLNSK5_cjs.B(i,s,f);},d=f=>{let S=n.get(),y=e.getChrome().viewport;return vk(y,f,e.getFitOptions?.()??{},S.presenting)},u=f=>{let S=n.get();return S.zoom!=="fit"?S.zoom:d(f)},m=()=>u(n.get().canvasSize),g=()=>d(n.get().canvasSize),x=()=>{let f=n.get().canvasSize;return u(f)/d(f)*100},b=()=>{let f=e.getChrome(),S=n.get(),y=S.masterViewTarget,h=y?chunk24B6ZCFG_cjs.hp({slideMasters:S.slideMasters},{tab:"slides",masterIndex:y.masterIndex,layoutIndex:y.layoutIndex}):S.slides[S.currentSlide],C=y&&S.masterViewTab!=="slides",w=C?S.masterViewTab==="notes"?S.notesCanvasSize??chunk24B6ZCFG_cjs.ep:chunk24B6ZCFG_cjs.ep:S.canvasSize,P=C||!!h;f.setEmpty(!P);let k=u(w);f.stageWrap.style.width=`${w.width*k}px`,f.stageWrap.style.height=`${w.height*k}px`;let A=P&&S.editable&&!S.presenting&&!S.loading?Array.from(f.stageWrap.children).find(M=>M.classList.contains("pptxv-editor-overlay")&&M.querySelector("[data-inline-editor]")):void 0,T=chunk24B6ZCFG_cjs.Wt(f.stageWrap);if(A)for(let M of Array.from(f.stageWrap.childNodes))M!==A&&M.remove();else f.stageWrap.replaceChildren();let E=null;if(C){let M=S.masterViewTab==="notes"?S.notesMaster:S.handoutMaster;if(M?.elements?.length)E=l({id:M.path,rId:"",slideNumber:0,elements:M.elements,backgroundColor:M.backgroundColor,backgroundImage:M.backgroundImage},k,false,true,w),E.dataset.testid=S.masterViewTab==="notes"?"notes-master-page":"handout-master-page";else {let D={width:w.width*k,height:w.height*k};E=S.masterViewTab==="notes"?gk(t,e.getTranslator(),S.notesMaster,D,k):bk(t,e.getTranslator(),S.handoutMaster,D,S.handoutSlidesPerPage);}}else h&&(E=chunk24B6ZCFG_cjs.Xt(T,()=>l(h,k,S.presenting,true,w)),S.editable&&!S.presenting&&uk(t,E,h.comments??[],w,e.getTranslator(),e.onCommentMarkerClick));E&&h&&f.stageWrap.insertBefore(E,A??null);let L=k/d(w)*100;f.ribbon?.update({current:S.currentSlide,total:S.slides.length,zoomPercent:L}),f.statusBar?.update({current:S.currentSlide,total:S.slides.length,zoomPercent:L}),f.presentationTouchControls.update(S.currentSlide,S.slides.length),f.mobileActionSheets?.setThumbnailRenderer((M,D)=>l(M,D),S.canvasSize.width,S.canvasSize.height),f.mobileActionSheets?.update(S.currentSlide,S.slides,h?.comments??[]),f.notes.update({slide:C?void 0:h,editable:S.editable,notesStyle:S.notesMaster?.notesStyle}),e.onStageRendered?.(),E?(s=E,r.syncStage({doc:t,stageWrap:f.stageWrap,stage:E,slide:h,slideIndex:S.currentSlide,presenting:S.presenting,showWithAnimation:S.presentationProperties.showWithAnimation,mediaDataUrls:S.mediaDataUrls,reRenderElements:p,seedCompleted:S.enteringBackward===true,canvasSize:S.canvasSize,themeColorMap:S.colorScheme?chunk24B6ZCFG_cjs.P(S.colorScheme):void 0,pixelateMosaicAnimation:e.getPixelateMosaicAnimation()})):(s=null,i=null,r.reset());},v=()=>{let f=n.get(),S=e.getChrome().thumbnails;f.masterViewTarget?(S?.setVisible(false),e.getChrome().masterSidebar.setVisible(true),e.getChrome().masterSidebar.render({tab:f.masterViewTab,masters:f.slideMasters,active:f.masterViewTarget,canvasSize:f.canvasSize,notesBackground:f.notesMaster?.backgroundColor,notesPlaceholders:f.notesMaster?.placeholders,notesMasterPresent:!!f.notesMaster,handoutBackground:f.handoutMaster?.backgroundColor,handoutPlaceholders:f.handoutMaster?.placeholders,handoutMasterPresent:!!f.handoutMaster,handoutSlidesPerPage:f.handoutSlidesPerPage,editable:f.editable,crudActions:kD(f),onCrudAction:e.onMasterCrudAction,renderStage:l,onSelect:(y,h)=>{n.set({masterViewTarget:{masterIndex:y,layoutIndex:h},selectedElementId:null,selectedElementIds:[]});},onTabChange:y=>{n.set({masterViewTab:y,selectedElementId:null,selectedElementIds:[]});},onCollapse:()=>{n.set({masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false,selectedElementId:null,selectedElementIds:[]});},onHandoutSlidesPerPageChange:y=>{e.onHandoutSlidesPerPageChange(y);},onMasterBackgroundColorChange:e.onMasterBackgroundColorChange})):(e.getChrome().masterSidebar.setVisible(false),S?.setVisible(true),S?.render(f.slides,f.canvasSize,l,f.sections,f.editable?{toggle:e.onSectionToggle,rename:e.onSectionRename,delete:e.onSectionDelete,move:e.onSectionMove}:void 0));};return {renderAll(){let f=e.getChrome(),S=n.get();f.setLoading(S.loading),f.setError(S.error),f.setPresenting(S.presenting),v(),b(),f.thumbnails?.setActive(S.currentSlide),f.notes.setExpanded(S.notesExpanded),f.ribbon?.setNotesExpanded(S.notesExpanded),f.mobileActionSheets?.setNotesExpanded(S.notesExpanded),f.ribbon?.setTemplateEditing(S.editTemplateMode),f.ribbon?.setViewOptions(S);},renderStage:b,renderThumbnails:v,renderSlideNode:(f,S)=>l(f,S),effectiveScale:m,fitScale:g,zoomPercent:x,presentationPlayback:r}}function hk(e){let t=hl(e.doc,e.onCreateGuide),n=i=>{if(i.selectedElementIds.length!==1)return null;let s=U(i).find(a=>a.id===i.selectedElementIds[0]);return s?{x:s.x,y:s.y,width:s.width,height:s.height}:null},o=()=>{let i=e.getStageWrap();if(!i)return;t.mount(i);let s=e.store.get();t.update({visible:s.showRulers&&!s.presenting,canvasSize:s.canvasSize,scale:e.getScale(),unit:e.getUnit?.()??"inches",selection:n(s),draggable:s.editable&&!s.presenting});},r=e.store.subscribe(o);return {sync:o,destroy(){r(),t.destroy();}}}var ID={active:true};function vi(e){let{store:t}=e,n="idle",o=null,r=false,i=false,s=false,a=null,l=()=>(e.getActivation?.()??ID).active,p=l(),d=f=>{n=f,e.onStatus?.(f);},u=()=>{o!==null&&(clearTimeout(o),o=null);};async function m(){let f=e.getHandler();if(!(i||!l()||r||!f||!t.get().dirty)){r=true,d("saving");try{let S=await chunk24B6ZCFG_cjs.vp(f,t.get().slides,void 0,chunk24B6ZCFG_cjs.up(e.getSaveIntent?.()));await chunk24B6ZCFG_cjs.Hj(e.filePath,S),a=null,!i&&l()&&d("saved");}catch{!i&&l()&&d("error");}finally{r=false;}}}let g=()=>{if(!l())return;let f=Date.now();a??=f;let S=chunk24B6ZCFG_cjs.So({intervalMs:e.getIntervalMs(),firstDirtyAt:a,now:f});u(),o=setTimeout(()=>{o=null,m();},S);},x=f=>{i||!chunk24B6ZCFG_cjs.To({alreadyChecked:s,filePath:e.filePath,loading:f.loading,error:f.error,slideCount:f.slides.length,autosaveAllowed:e.isRecoveryAllowed?.()??true})||(s=true,chunk24B6ZCFG_cjs.Vo(e.filePath,Date.now(),e.fileName).then(S=>(S&&!i&&(e.onRecovery?.(S.record),e.onRecoveryOffer?.(S)),S)));},b=()=>{let f=l();f===p||i||(p=f,u(),d("idle"),f&&(a=null,t.get().dirty&&g()));},v=t.subscribe((f,S)=>{b(),f.loading&&!S.loading&&(s=false),f.dirty&&(f.dirty!==S.dirty||f.slides!==S.slides)?g():!f.dirty&&S.dirty&&!r&&d("saved"),x(f);});return x(t.get()),{saveNow:m,getStatus:()=>n,refresh:b,isEnabled:l,destroy(){i=true,u(),v();}}}function zp(e,t,n,o){return new Promise(r=>{let i=false,s=false,a=t(n.titleKey),l=e.createElement("div");l.className="pptxv-parity-backdrop pptxv-autosave-recovery";let p=e.createElement("section");p.className="pptxv-parity-dialog",p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true"),p.setAttribute("aria-label",a),p.setAttribute("data-pptx-autosave-recovery","true");let d=e.createElement("header");d.className="pptxv-parity-header";let u=e.createElement("h2");u.textContent=a,d.append(u);let m=e.createElement("div");m.className="pptxv-parity-body";let g=e.createElement("p");g.className="pptxv-autosave-recovery-message",g.textContent=t(n.messageKey,n.messageParams);let x=e.createElement("p");x.className="pptxv-autosave-recovery-age",x.textContent=t("pptx.autosave.recovery.savedLabel",{when:t(n.ageKey,n.ageParams)}),m.append(g,x);let b=e.createElement("footer");b.className="pptxv-parity-footer";let v=e.createElement("button");v.type="button",v.textContent=t(n.discardKey),v.setAttribute("aria-label",t(n.discardKey));let f=e.createElement("button");f.type="button",f.className="is-primary",f.textContent=t(n.restoreKey),f.setAttribute("aria-label",t(n.restoreKey)),b.append(v,f);let S=h=>{s||(s=true,e.removeEventListener("keydown",y),l.remove(),r(h));},y=h=>{h.key==="Escape"&&!i&&S("dismiss");};v.addEventListener("click",()=>{i||(i=true,p.setAttribute("aria-busy","true"),v.disabled=true,f.disabled=true,(async()=>{try{await o?.(),S("discard");}catch{i=false,p.removeAttribute("aria-busy"),v.disabled=false,f.disabled=false;}})());}),f.addEventListener("click",()=>{i||S("restore");}),e.addEventListener("keydown",y),p.append(d,m,b),l.append(p),e.body.append(l),queueMicrotask(()=>f.focus());})}function Np(e){let t=e.hostAutosave??true,n,o=()=>chunk24B6ZCFG_cjs.Qo({hostAutosave:e.hostAutosave,userEnabled:t,canEdit:e.store.get().editable,filePath:e.filePath}),r=null,i=false,s=async d=>{i=true;try{if(await zp(e.doc,e.getTranslator(),d.prompt,()=>chunk24B6ZCFG_cjs.Xo(d.record))==="restore"){chunk24B6ZCFG_cjs.Cj(d.record);try{await e.loadFile(chunk24B6ZCFG_cjs.Wo(d.record));}catch(m){throw chunk24B6ZCFG_cjs.Dj(d.record),m}}}finally{i=false;}},a=()=>{let d=r;!d||i||!chunk24B6ZCFG_cjs.Uo({prompt:d.prompt,presenting:e.store.get().presenting})||(r=null,s(d).catch(()=>{}));},l=e.store.subscribe((d,u)=>{u.presenting&&!d.presenting&&a();}),p=vi({store:e.store,getHandler:e.getHandler,filePath:e.filePath,fileName:e.fileName,getIntervalMs:()=>chunk24B6ZCFG_cjs.Ro({hostIntervalMs:e.hostIntervalMs,optionsIntervalSeconds:n}),getSaveIntent:e.getSaveIntent,onStatus:e.onStatus,getActivation:o,isRecoveryAllowed:()=>e.hostAutosave!==false,onRecovery:e.onRecovery,onRecoveryOffer:d=>{r=d,a();}});return {saveNow:()=>p.saveNow(),isEnabled:()=>p.isEnabled(),isPreferred:()=>o().toggleAvailable&&t,getActivation:o,setEnabled(d){return !o().toggleAvailable||t===d?false:(t=d,p.refresh(),true)},setOptionsIntervalMs(d){n=typeof d=="number"&&Number.isFinite(d)?d/1e3:void 0;},destroy:()=>{l(),p.destroy();}}}var LD="Presenter";function yk(e,t){return {...e,userName:t?.trim()||LD,role:"owner"}}function wt(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-field"),i=chunkOBVLNSK5_cjs.w(e,"label","pptxv-modal-label");i.textContent=t,r.appendChild(i);let s=e.createElement("input");return s.type="text",s.className="pptxv-modal-input",s.placeholder=n,s.addEventListener("input",()=>o(s.value)),r.appendChild(s),{el:r,input:s}}function hi(e,t,n,o){let r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-field"),i=chunkOBVLNSK5_cjs.w(e,"label","pptxv-modal-label");i.textContent=n,r.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-link-row");r.appendChild(s);let a=e.createElement("input");a.type="text",a.className="pptxv-modal-input",a.readOnly=true,a.addEventListener("focus",()=>a.select()),s.appendChild(a);let l=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-btn");return l.type="button",l.textContent=t("pptx.broadcast.copyLinkBtn"),l.addEventListener("click",o),s.appendChild(l),{el:r,input:a,setValue(p){a.value=p;},setCopied(p){l.textContent=t(p?"pptx.share.copied":"pptx.broadcast.copyLinkBtn");}}}function yi(e,t,n){let o=false,r,i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-backdrop");i.hidden=true,i.addEventListener("pointerdown",x=>{x.target===i&&n.onClose();});let s=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-panel");s.tabIndex=-1,s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.addEventListener("pointerdown",x=>x.stopPropagation()),i.appendChild(s);let a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-header");s.appendChild(a);let l=chunkOBVLNSK5_cjs.w(e,"h2","pptxv-modal-title");a.appendChild(l);let p=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),p.addEventListener("click",()=>n.onClose()),a.appendChild(p);let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-body");s.appendChild(d);let u=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-footer");s.appendChild(u);function m(x){l.textContent=x,s.setAttribute("aria-label",x);}m(n.title);function g(){let x=n.themeHost?.(),b=x?.ownerDocument.defaultView;if(!x||!b)return;let v=b.getComputedStyle(x);for(let f of Object.keys(chunk24B6ZCFG_cjs.Fa())){let S=v.getPropertyValue(f).trim();S&&i.style.setProperty(f,S);}}return {el:i,bodyEl:d,footerEl:u,setTitle(x){m(x);},setOpen(x){x!==o&&(o=x,i.hidden=!x,x?(g(),r=chunk24B6ZCFG_cjs.Im(s,{onEscape:n.onClose})):(r?.(),r=void 0));},destroy(){r?.(),i.remove();}}}var MD=2e3;function Sk(e,t,n,o){let r=chunk24B6ZCFG_cjs.Rj(),i=false,s=null,a=yi(e,t,{title:t("pptx.broadcast.startTitle"),onClose:()=>a.setOpen(false),themeHost:o});e.body.appendChild(a.el);let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-section"),p=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-desc");p.textContent=t("pptx.broadcast.idleDesc"),l.appendChild(p);let d=wt(e,t("pptx.broadcast.roomId"),t("pptx.broadcast.roomIdPlaceholder"),P=>{r={...r,roomId:P},w();});l.appendChild(d.el);let u=wt(e,t("pptx.broadcast.serverUrl"),t("pptx.broadcast.serverUrlPlaceholder"),P=>{r={...r,serverUrl:P},w();}),m=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-hint");m.textContent=t("pptx.broadcast.p2pHint"),u.el.appendChild(m),l.appendChild(u.el);let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-section"),x=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-desc");x.textContent=t("pptx.broadcast.liveDesc"),g.appendChild(x);let b=hi(e,t,t("pptx.broadcast.viewerLink"),()=>{C();});g.appendChild(b.el);let v=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-hint");v.textContent=t("pptx.broadcast.viewerHint"),g.appendChild(v);let f=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-hint");f.textContent=t("pptx.broadcast.p2pServerValue"),g.appendChild(f);let S=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-danger-btn");S.type="button",S.textContent=t("pptx.broadcast.stopBroadcast"),S.addEventListener("click",()=>n.onStop()),g.appendChild(S),a.bodyEl.append(l,g);let y=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-btn");y.type="button",y.textContent=t("pptx.common.close"),y.addEventListener("click",()=>a.setOpen(false)),a.footerEl.appendChild(y);let h=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");h.type="button",h.textContent=t("pptx.broadcast.startBroadcast"),h.addEventListener("click",()=>{let P=chunk24B6ZCFG_cjs.Tj(r);P&&n.onStart(P);}),a.footerEl.appendChild(h);async function C(){chunk24B6ZCFG_cjs.Vj(typeof navigator>"u"?void 0:navigator)&&(await navigator.clipboard.writeText(b.input.value),b.setCopied(true),s!==null&&clearTimeout(s),s=setTimeout(()=>b.setCopied(false),MD));}function w(){a.setTitle(t(i?"pptx.broadcast.broadcastingTitle":"pptx.broadcast.startTitle")),l.hidden=i,g.hidden=!i,h.hidden=i,h.disabled=!chunk24B6ZCFG_cjs.Sj(r),m.hidden=chunk24B6ZCFG_cjs.Qj(r.serverUrl)!=="webrtc",d.input.value=r.roomId,u.input.value=r.serverUrl;}return w(),{el:a.el,open(P,k,A){i=k,i||(r=chunk24B6ZCFG_cjs.Rj(P)),b.setValue(A),b.setCopied(false),w(),a.setOpen(true);},close(){a.setOpen(false);},setActive(P,k){i=P,b.setValue(k),w();},destroy(){s!==null&&clearTimeout(s),a.destroy();}}}var DD="M0 0 L0 16 L4.5 12.5 L8 20 L10.5 19 L7 11.5 L12 11 Z";function xo(e){let t=chunkOBVLNSK5_cjs.w(e,"div","pptxv-collab-cursors");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-collab-cursor");i.dataset.clientId=String(r),i.dataset.pptxRemoteCursor=String(r);let s=chunkOBVLNSK5_cjs.x(e,"svg",{width:20,height:22,viewBox:"0 0 20 22",focusable:"false"});s.setAttribute("class","pptxv-collab-pointer");let a=chunkOBVLNSK5_cjs.x(e,"path",{d:DD,stroke:"#ffffff","stroke-width":1});s.appendChild(a),i.appendChild(s);let l=chunkOBVLNSK5_cjs.w(e,"span","pptxv-collab-label");return i.appendChild(l),t.appendChild(i),{root:i,path:a,label:l}}return {el:t,update(r,i){let s=new Set;for(let a of r){s.add(a.clientId);let l=n.get(a.clientId);l||(l=o(a.clientId),n.set(a.clientId,l)),l.root.style.transform=`translate(${a.x*i}px, ${a.y*i}px)`,chunkOBVLNSK5_cjs.y(l.path,{fill:a.color}),l.label.textContent=chunk24B6ZCFG_cjs.yh(a.userName),l.label.style.backgroundColor=a.color;}for(let[a,l]of n)s.has(a)||(l.root.remove(),n.delete(a));},destroy(){t.remove();}}}var Ck={connected:"pptx.collaboration.status.connected",connecting:"pptx.collaboration.status.connecting",disconnected:"pptx.collaboration.status.disconnected",error:"pptx.collaboration.status.error"};function wk(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"span","pptxv-collab-status");o.hidden=true,o.setAttribute("role","status"),o.setAttribute("data-testid","collaboration-status");let r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-collab-status-dot");o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"span","pptxv-collab-status-text");o.appendChild(i);let s=chunkOBVLNSK5_cjs.w(e,"button","pptxv-collab-status-retry");return s.type="button",s.textContent=t("pptx.collaboration.retry"),s.hidden=true,s.addEventListener("click",n),o.appendChild(s),{el:o,update(a,l){o.hidden=a==="disconnected",r.className=`pptxv-collab-status-dot is-${a}`,i.textContent=a==="connected"?l===1?t("pptx.collaboration.onePersonHere"):t("pptx.collaboration.peopleHere",{count:l}):t(Ck[a]),s.hidden=a!=="error",o.setAttribute("aria-label",t("pptx.collaboration.statusAriaLabel",{status:t(Ck[a]),count:l}));},destroy(){o.remove();}}}var RD=2;function OD(e){let t=e.trim().split(/\s+/u);return t.length>=2&&t[0]&&t[t.length-1]?(t[0][0]+t[t.length-1][0]).toUpperCase():e.slice(0,RD).toUpperCase()||"?"}function Ek(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-follow-bar");o.dataset.exportIgnore="true",o.hidden=true;let r=chunkOBVLNSK5_cjs.w(e,"span","pptxv-follow-status");o.appendChild(r);let i=chunkOBVLNSK5_cjs.w(e,"ul","pptxv-follow-list");o.appendChild(i);let s=new Map;function a(p){if(r.replaceChildren(),!p){r.textContent=t("pptx.followMode.followCollaborator");return}r.append(`${t("pptx.followMode.following")} `);let d=chunkOBVLNSK5_cjs.w(e,"strong");d.textContent=p.userName,r.appendChild(d),r.append(" ");let u=chunkOBVLNSK5_cjs.w(e,"button","pptxv-follow-stop");u.type="button",u.textContent=t("pptx.followMode.stop"),u.title=t("pptx.followMode.stopFollowing"),u.addEventListener("click",()=>n.onFollow(null)),r.appendChild(u);}function l(p){let d=s.get(p.clientId);if(d)return d;let u=chunkOBVLNSK5_cjs.w(e,"button","pptxv-follow-peer");u.type="button",u.appendChild(chunkOBVLNSK5_cjs.w(e,"span","pptxv-follow-avatar")),u.appendChild(chunkOBVLNSK5_cjs.w(e,"span","pptxv-follow-name"));let m=chunkOBVLNSK5_cjs.w(e,"li");return m.appendChild(u),i.appendChild(m),s.set(p.clientId,u),u}return {el:o,update(p,d){if(o.hidden=p.length===0,o.hidden)return;let u=p.find(g=>g.clientId===d)??null;a(u);let m=new Set;for(let g of p){m.add(g.clientId);let x=l(g),b=x.firstElementChild,v=x.lastElementChild;b.textContent=OD(g.userName),b.style.backgroundColor=g.userColor,v.textContent=g.userName;let f=g.clientId===d;x.classList.toggle("is-following",f),x.setAttribute("aria-pressed",String(f)),x.title=f?t("pptx.followMode.stopFollowingUser",{name:g.userName}):t("pptx.followMode.followUser",{name:g.userName}),x.onclick=()=>n.onFollow(f?null:g.clientId);}for(let[g,x]of s)m.has(g)||(x.closest("li")?.remove(),s.delete(g));},destroy(){o.remove();}}}var HD=20;function Si(e){let t=chunkOBVLNSK5_cjs.w(e,"div","pptxv-remote-selections");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-remote-selection");i.dataset.selectionKey=r;let s=chunkOBVLNSK5_cjs.w(e,"span","pptxv-remote-selection-label");return i.appendChild(s),t.appendChild(i),{root:i,label:s}}return {el:t,update(r,i,s,a){let l=new Map;for(let d of i)l.set(d.id,d);let p=new Set;for(let d of r){if(d.activeSlideIndex!==s||!d.selectedElementId)continue;let u=l.get(d.selectedElementId);if(!u)continue;let m=`${d.clientId}-${u.id}`;p.add(m);let g=n.get(m);g||(g=o(m),n.set(m,g)),g.root.dataset.pptxRemoteSelection=u.id,g.root.style.transform=`translate(${u.x*a}px, ${u.y*a}px)`,g.root.style.width=`${u.width*a}px`,g.root.style.height=`${u.height*a}px`,g.root.style.borderColor=d.userColor,g.label.textContent=chunk24B6ZCFG_cjs.yh(d.userName,HD),g.label.style.backgroundColor=d.userColor;}for(let[d,u]of n)p.has(d)||(u.root.remove(),n.delete(d));},destroy(){t.remove();}}}function Tk(e,t,n,o,r){let i=chunk24B6ZCFG_cjs.Zj(),s=false,a="create",l="",p={status:"disconnected",connectedCount:0,config:null,remoteUsers:[]},d=false,u,m=yi(e,t,{title:t("pptx.toolbar.share"),onClose:()=>m.setOpen(false),themeHost:o});e.body.appendChild(m.el);let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-section"),x=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-desc");x.textContent=t("pptx.share.formDescription");let b=chunkOBVLNSK5_cjs.w(e,"div","pptxv-share-tabs");b.setAttribute("role","tablist");let v=chunkOBVLNSK5_cjs.w(e,"button");v.type="button",v.textContent=t("pptx.share.createSession");let f=chunkOBVLNSK5_cjs.w(e,"button");f.type="button",f.textContent=t("pptx.share.joinSession"),b.append(v,f),g.append(b,x);let S=wt(e,t("pptx.share.invitationLabel"),t("pptx.share.invitationPlaceholder"),G=>{l=G,ie();});g.appendChild(S.el);let y=wt(e,t("pptx.share.roomId"),t("pptx.share.roomIdPlaceholder"),G=>{i={...i,roomId:G},ie();});g.appendChild(y.el);let h=wt(e,t("pptx.share.yourName"),t("pptx.share.yourNamePlaceholder"),G=>{i={...i,userName:G},ie();});g.appendChild(h.el);let C=wt(e,t("pptx.share.serverUrl"),t("pptx.share.serverPlaceholder"),G=>{i={...i,serverUrl:G},ie();}),w=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-hint");w.textContent=t("pptx.share.p2pHint"),C.el.appendChild(w),g.appendChild(C.el);let P=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-section"),k=chunkOBVLNSK5_cjs.w(e,"div","pptxv-share-status-row"),A=chunkOBVLNSK5_cjs.w(e,"span","pptxv-collab-status-dot");k.appendChild(A);let T=chunkOBVLNSK5_cjs.w(e,"span","pptxv-share-status-text");k.appendChild(T);let E=chunkOBVLNSK5_cjs.w(e,"span","pptxv-share-count");k.appendChild(E),P.appendChild(k);let L=hi(e,t,t("pptx.share.shareLink"),()=>{L.input.value&&e.defaultView?.navigator.clipboard.writeText(L.input.value).then(()=>{d=true,L.setCopied(true),clearTimeout(u),u=setTimeout(()=>{d=false,L.setCopied(false);},2e3);});});P.appendChild(L.el);let M=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-hint");M.textContent=t("pptx.share.shareHint"),P.appendChild(M);let D=chunkOBVLNSK5_cjs.w(e,"div","pptxv-share-details"),I=chunkOBVLNSK5_cjs.w(e,"span");D.appendChild(I);let R=chunkOBVLNSK5_cjs.w(e,"span");D.appendChild(R),P.appendChild(D);let O=chunkOBVLNSK5_cjs.w(e,"p","pptxv-modal-hint");O.textContent=t("pptx.share.p2pServerValue"),P.appendChild(O);let B=chunkOBVLNSK5_cjs.w(e,"div","pptxv-modal-field"),V=chunkOBVLNSK5_cjs.w(e,"label","pptxv-modal-label");V.textContent=t("pptx.share.connectedUsers"),B.appendChild(V);let F=chunkOBVLNSK5_cjs.w(e,"div","pptxv-share-users-list");B.appendChild(F),P.appendChild(B);let _=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-danger-btn");_.type="button",_.textContent=t("pptx.share.stopSharing"),_.addEventListener("click",()=>n.onStop()),P.appendChild(_),m.bodyEl.append(g,P);let N=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-btn");N.type="button",N.addEventListener("click",()=>m.setOpen(false)),m.footerEl.appendChild(N);let W=chunkOBVLNSK5_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");W.type="button",W.textContent=t("pptx.share.startSharing"),W.addEventListener("click",()=>{let G=a==="join"?chunk24B6ZCFG_cjs.Wj({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):chunk24B6ZCFG_cjs.$j(i);G&&n.onStart(G);}),m.footerEl.appendChild(W);function X(){let G=p.config,K=chunk24B6ZCFG_cjs.Qj(G?.serverUrl??"")==="webrtc";A.className=`pptxv-collab-status-dot is-${p.status}`,T.textContent=p.status,E.textContent=t("pptx.collaboration.userCount",{count:p.connectedCount});let j=G?chunk24B6ZCFG_cjs.Yj(G,e.defaultView?{origin:e.defaultView.location.origin,pathname:e.defaultView.location.pathname}:void 0):"";L.el.hidden=!j,M.hidden=!j,L.setValue(j),L.setCopied(d),D.hidden=!G,G&&(I.replaceChildren(`${t("pptx.share.room")} `,Object.assign(e.createElement("code"),{textContent:G.roomId})),R.replaceChildren(`${t("pptx.share.server")} `,Object.assign(e.createElement("code"),{textContent:K?t("pptx.share.p2pServerValue"):G.serverUrl}))),O.hidden=!!G||!K;let Y=G?chunk24B6ZCFG_cjs.Kh({localUserName:G.userName,localUserInitials:r?.(),localUserColor:G.userColor,remoteUsers:p.remoteUsers}):[];B.hidden=Y.length===0,F.replaceChildren(...Y.map(ue=>{let Te=chunkOBVLNSK5_cjs.w(e,"div","pptxv-share-user"),Me=chunkOBVLNSK5_cjs.w(e,"span","pptxv-share-user-avatar");if(Me.style.backgroundColor=ue.color,ue.avatarUrl){let ne=e.createElement("img");ne.src=ue.avatarUrl,ne.alt="",Me.appendChild(ne);}else Me.textContent=ue.initials;Te.appendChild(Me);let Xo=chunkOBVLNSK5_cjs.w(e,"span","pptxv-share-user-name");Xo.textContent=ue.name,Te.appendChild(Xo);let Tt=chunkOBVLNSK5_cjs.w(e,"span","pptxv-share-user-tag");return Tt.textContent=ue.isLocal?t("pptx.share.you"):t("pptx.notes.slideN",{n:ue.slideNumber??1}),Te.appendChild(Tt),Te}));}function ie(){m.setTitle(t(s?"pptx.share.collaborationActive":"pptx.toolbar.share")),g.hidden=s,P.hidden=!s,W.hidden=s,N.textContent=t(s?"pptx.share.close":"pptx.share.cancel"),v.setAttribute("aria-selected",String(a==="create")),f.setAttribute("aria-selected",String(a==="join")),x.textContent=t(a==="join"?"pptx.share.joinDescription":"pptx.share.formDescription"),S.el.hidden=a!=="join",y.el.hidden=a==="join",W.textContent=t(a==="join"?"pptx.share.joinSession":"pptx.share.startSharing"),W.disabled=a==="join"?!chunk24B6ZCFG_cjs.Xj({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):!chunk24B6ZCFG_cjs._j(i),w.hidden=chunk24B6ZCFG_cjs.Qj(i.serverUrl)!=="webrtc",y.input.value=i.roomId,h.input.value=i.userName,C.input.value=i.serverUrl,S.input.value=l,X();}return v.addEventListener("click",()=>{a="create",ie();}),f.addEventListener("click",()=>{a="join",ie();}),ie(),{el:m.el,open(G,K){s=K,s||(i=chunk24B6ZCFG_cjs.Zj(G),l=""),ie(),m.setOpen(true);},close(){m.setOpen(false);},setActive(G){s=G,ie();},updateSession(G){p=G,X();},destroy(){clearTimeout(u),m.destroy();}}}function Pk(e){let{doc:t}=e,n=e.getTranslator(),o=e.getChrome(),r="",i="";function s(){if(!r)return "";let E=t.defaultView?.location;return chunk24B6ZCFG_cjs.Uj(r,i,E?{origin:E.origin,pathname:E.pathname}:void 0)}let a=()=>e.getChrome().root,l=Tk(t,n,{onStart:E=>{e.startCollaboration(E).then(()=>l.setActive(true));},onStop:()=>{e.stopCollaboration(),l.setActive(false),l.close();}},a,e.getUserInitials),p=Sk(t,n,{onStart:E=>{r=E.roomId,i=E.serverUrl;let L=yk(E,e.shareDefaults?.userName);e.startCollaboration(L).then(()=>p.setActive(true,s()));},onStop:()=>{e.stopCollaboration(),r="",i="",p.setActive(false,""),p.close();}},a),d=wk(t,n,()=>{let E=e.getConfig();E&&e.startCollaboration(E);}),u=null,m=null,g=()=>{l.open(e.shareDefaults,e.getStatus()!=="disconnected");},x=()=>{p.open({roomId:r,serverUrl:i},e.getStatus()!=="disconnected",s());},b=!chunk24B6ZCFG_cjs.eq("share",e.hiddenActions),v=o.ribbon?.el.querySelector(".pptxv-ribbon-primary")??null,f=o.ribbon?.el.querySelector(".pptxv-tabrow-actions")??null;if(v){if(b){if(u=chunkOBVLNSK5_cjs.w(t,"button",f?"pptxv-tabrow-share":"pptxv-btn"),u.type="button",u.title=n("pptx.toolbar.share"),u.setAttribute("aria-label",n("pptx.toolbar.share")),u.appendChild(chunkOBVLNSK5_cjs.K(t,"share")),f){let E=chunkOBVLNSK5_cjs.w(t,"span");E.textContent=n("pptx.toolbar.share"),u.appendChild(E);}u.addEventListener("click",g),(f??v).appendChild(u);}e.showCollaborationStatus!==false&&v.appendChild(d.el);}let S=o.mobileToolbar?.collaborationHost??null;S&&b&&(m=chunkOBVLNSK5_cjs.w(t,"button","pptxv-mobile-toolbar-btn pptxv-mobile-share"),m.type="button",m.title=n("pptx.toolbar.share"),m.setAttribute("aria-label",n("pptx.toolbar.share")),m.appendChild(chunkOBVLNSK5_cjs.K(t,"share")),m.addEventListener("click",g),S.appendChild(m));let y=xo(t),h=Si(t),C=Ek(t,n,{onFollow:E=>e.followUser(E)});function w(){let E=e.getChrome(),L=E.stageWrap;h.el.parentElement!==L&&L.appendChild(h.el),y.el.parentElement!==L&&L.appendChild(y.el),C.el.parentElement!==E.root&&E.root.appendChild(C.el);}function P(E){return e.getStatus()==="disconnected"?0:E.remotePresences.length+1}function k(E){return {status:e.getStatus(),connectedCount:P(E),config:e.getConfig(),remoteUsers:E.remotePresences}}function A(E){w(),y.update(E.cursors,e.getScale()),h.update(E.remotePresences,E.slides[E.currentSlide]?.elements??[],E.currentSlide,e.getScale()),C.update(E.remotePresences,E.followedClientId),d.update(e.getStatus(),P(E)),l.updateSession(k(E));}A(e.store.get());let T=e.store.subscribe((E,L)=>{(E.cursors!==L.cursors||E.remotePresences!==L.remotePresences||E.followedClientId!==L.followedClientId||E.currentSlide!==L.currentSlide||E.slides!==L.slides||E.zoom!==L.zoom)&&A(E);});return {onStatusChange(E){A(e.store.get()),E==="disconnected"&&(l.setActive(false),p.setActive(false,""));},openShare:g,openBroadcast:x,destroy(){T(),u?.remove(),m?.remove(),d.destroy(),y.destroy(),h.destroy(),C.destroy(),l.destroy(),p.destroy();}}}function Ak(e){let{provider:t,transport:n}=e,o=null;function r(){o!==null&&(clearTimeout(o),o=null);}function i(){e.isActive()&&(e.setStatus("disconnected"),e.reArmGate());}return n==="webrtc"?(e.setStatus("connected"),t.onStatus(s=>{s?e.setStatus("connected"):i();}),{cancelConnectTimer:r}):(t.onStatus(s=>{s?(r(),e.setStatus("connected")):i();}),t.connectedNow?e.setStatus("connected"):o=setTimeout(()=>{o=null,e.onConnectTimeout();},chunk24B6ZCFG_cjs.th),{cancelConnectTimer:r})}function kk(e){let t=false,n=null;return {isReadOnly:()=>t,setReadOnly(o){o!==t&&(t=o,e.onReadOnlyChange?e.onReadOnlyChange(o):o?(n=e.store.get().editable,e.setEditable(false)):n!==null&&(e.setEditable(n),n=null));}}}function Ik(e,t,n){let o=chunk24B6ZCFG_cjs.Hh(e,{gate:n.gate,factories:n.factories,livePatcher:n.livePatcher,role:t.role,sessionIntent:t.sessionIntent,adoptSlides:n.adoptSlides,onStatus:n.setStatus,onReadOnlyChange:n.setReadOnly,onSuspend:n.cancelWriteBack,onReady:({seedEmptyRoom:r})=>{r&&n.resetBaseline(),n.flushLocal();}});return {contentLoaded(r){!o.handleLoad(r)&&o.canWrite()&&n.flushLocal();},dispose:o}}var FD=1e5;function Lk(e){return e!==void 0&&e>0?e:FD}function Mk(e,t,n,o){let r=chunk24B6ZCFG_cjs.Ih(t,n),i=t.clientID??-1,s=0,a=chunk24B6ZCFG_cjs.Jh();function l(){let{width:d,height:u}=o(),{list:m,cursors:g,changed:x}=a.project(t.getStates(),i,Lk(d),Lk(u),s);if(!x)return;let b=e.get().followedClientId;e.set({remotePresences:m,cursors:g,followedClientId:b!==null&&!m.some(v=>v.clientId===b)?null:b});}t.on("change",l),t.on("update",l);let p=setInterval(()=>r.flush(),chunk24B6ZCFG_cjs.uh);return l(),{setCursor(d,u,m=s){s=m,r.update({cursorX:d,cursorY:u,activeSlideIndex:m});},setSelection(d,u=s){s=u,r.update({selectedElementId:d,activeSlideIndex:u});},setActiveSlide(d){s=Math.max(0,Math.floor(d)),r.update({activeSlideIndex:s}),l();},followUser(d){e.set({followedClientId:d});},destroy(){clearInterval(p),t.off?.("change",l),t.off?.("update",l),r.dispose(),e.set({remotePresences:[],cursors:[],followedClientId:null});}}}async function _p(e,t,n){if(e==="webrtc"){let{WebrtcProvider:s}=await import('y-webrtc'),a=new s(t.roomId,n,{signaling:t.signaling?.length?t.signaling:void 0,password:t.authToken||void 0}),l=chunk24B6ZCFG_cjs.Uh(t.roomId,a.awareness);return {awareness:a.awareness,onStatus:p=>a.on("status",d=>p(!!d.connected)),connectedNow:true,onSynced:p=>a.on("synced",d=>{d?.synced!==false&&p();}),syncedNow:false,destroy:()=>{l.announce(),l.dispose(),chunk24B6ZCFG_cjs.Th(a.awareness),a.destroy();}}}let{WebsocketProvider:o}=await import('y-websocket'),r=new o(t.serverUrl,t.roomId,n,{params:t.authToken?{token:t.authToken}:void 0}),i=chunk24B6ZCFG_cjs.Uh(t.roomId,r.awareness);return {awareness:r.awareness,onStatus:s=>r.on("status",a=>{a.status==="connected"?s(true):a.status==="disconnected"&&s(false);}),connectedNow:r.wsconnected,onSynced:s=>r.on("sync",a=>{a&&s();}),syncedNow:r.synced,destroy:()=>{i.announce(),i.dispose(),chunk24B6ZCFG_cjs.Th(r.awareness),r.disconnect(),r.destroy();}}}async function Dk(e,t){let n=await import('yjs'),o=e.externalSession?.doc??new n.Doc,r={createMap:()=>new n.Map,createArray:()=>new n.Array,createText:()=>new n.Text,createTextPositions:i=>chunk24B6ZCFG_cjs.Ph(i,{read:()=>n.snapshot(o),equal:n.equalSnapshots,subscribeBeforeObservers:s=>(o.on("beforeObserverCalls",s),()=>o.off("beforeObserverCalls",s))})};if(e.externalSession){let i=chunk24B6ZCFG_cjs.Bh(e.externalSession.awareness);return {doc:e.externalSession.doc,factories:r,awareness:i.awareness,dispose:i.dispose}}try{let i=await _p(t,e,o);return {doc:o,factories:r,awareness:i.awareness,provider:i,dispose(){i.destroy(),o.destroy();}}}catch(i){throw o.destroy(),i}}function Rk(e,t){let n="",o=false;function r(l,p,d,u){if(!l||!p||o||u)return;let m=e.get().slides,g=JSON.stringify(m);g!==n&&(n=g,chunk24B6ZCFG_cjs.Gh(m,l,p),d&&t(d));}function i(l,p,d=false){if(!l)return false;let u=chunk24B6ZCFG_cjs.Dh(l);return u.length===0&&!d?false:(s(u,p),true)}function s(l,p){n=JSON.stringify(l),o=true;try{e.set({slides:l,currentSlide:Vt(e.get().currentSlide,l.length)});}finally{o=false;}t(p);}function a(){n="",o=false;}return {flushLocalSlides:r,applyRemoteSlides:i,adoptSlides:s,isApplyingRemote:()=>o,reset:a}}function Ok(e){return chunk24B6ZCFG_cjs.Vh({getYDoc:e.getYDoc,serialize:()=>{let t=e.getYDoc(),n=e.getHandler();return !t||!n?null:n.save(chunk24B6ZCFG_cjs.Dh(t),e.getSaveOptions?.())}})}function Bt(e){let{store:t}=e,n="disconnected",o=false,r=null,i=0,s=null,a=null,l=null,p=null,d=kk(e),u=null,m=null,g=null,x=null,b=false,v=chunk24B6ZCFG_cjs.Lh();function f(E){E!==n&&(n=E,e.onStatusChange?.(E));}let S=Ok({getYDoc:()=>a,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions}),y=Rk(t,E=>{(!E.externalSession||C.isOpen())&&S.schedule(E);});function h(){y.flushLocalSlides(a,l,u,d.isReadOnly());}let C=chunk24B6ZCFG_cjs.Qh(h);async function w(E){A();let L=i;u=E;try{chunk24B6ZCFG_cjs.wh(E.roomId);}catch{f("error");return}let M=E.transport??chunk24B6ZCFG_cjs.Qj(E.serverUrl);if(!E.externalSession&&M==="websocket"&&chunk24B6ZCFG_cjs.xh(E.serverUrl)){f("error");return}f("connecting"),d.setReadOnly(!!E.externalSession||E.role==="viewer");try{let D=await Dk(E,M);if(L!==i){D.dispose();return}if(r=D,a=D.doc,l=D.factories,p=Mk(t,D.awareness,{userName:E.userName,userColor:E.userColor??chunk24B6ZCFG_cjs.vh,userAvatar:E.userAvatar,role:E.role},()=>({width:t.get().canvasSize.width,height:t.get().canvasSize.height})),E.externalSession||(m=chunk24B6ZCFG_cjs.Eh(a,(I,R)=>{R?.origin===chunk24B6ZCFG_cjs.Fh||y.isApplyingRemote()||y.applyRemoteSlides(a,E);})),g=t.subscribe((I,R)=>{I.slides!==R.slides&&!b&&C.isOpen()&&h();}),o=!0,E.externalSession)s=Ik(E.externalSession,E,{factories:D.factories,livePatcher:v,gate:C,setStatus:f,setReadOnly:d.setReadOnly,flushLocal:h,resetBaseline:y.reset,cancelWriteBack:S.cancel,adoptSlides:I=>y.adoptSlides(I,E)});else if(D.provider){let I=D.provider;v.configure(d.isReadOnly()?null:a,d.isReadOnly()?null:l),I.onSynced(()=>C.open()),I.syncedNow?C.open():C.arm(),x=Ak({provider:I,transport:M,setStatus:f,isActive:()=>o,reArmGate:()=>{C.reset(),C.arm();},onConnectTimeout:()=>{n!=="connected"&&(A(),f("error"));}});}}catch{L===i&&(A(),f("error"));}}function P(E){b=true;}function k(E){let L=b;if(b=false,!(!o||!a||!u)){if(s){s.contentLoaded(E);return}chunk24B6ZCFG_cjs.Rh(E,chunk24B6ZCFG_cjs.Dh(a).length)&&y.applyRemoteSlides(a,u)||L&&C.isOpen()&&h();}}function A(){i+=1,s?.dispose(),s=null,x?.cancelConnectTimer(),x=null,b=false,S.cancel(),C.reset(),y.reset(),m?.(),m=null,g?.(),g=null,p?.destroy(),p=null,r?.dispose(),r=null,a=null,l=null,v.configure(null,null),o=false,d.setReadOnly(false),f("disconnected");}let T=chunk24B6ZCFG_cjs.Sh({leaveOnBeforeUnload:()=>!u?.externalSession,leave:A,rejoin:()=>{u&&w(u);}});return {start:w,stop:A,isActive:()=>o,isReadOnly:d.isReadOnly,getStatus:()=>n,setCursor:(E,L,M)=>p?.setCursor(E,L,M),setSelection:(E,L)=>p?.setSelection(E,L),setActiveSlide:E=>p?.setActiveSlide(E),followUser:E=>p?.followUser(E??null),getConfig:()=>u,beginContentLoad:P,notifyContentLoaded:k,livePatcher:v,destroy:()=>{T(),A();}}}var VD="presentation.pptx";function BD(e,t){switch(e){case "saving":return t("pptx.autosave.saving");case "saved":return t("pptx.autosave.savedShort");case "error":return t("pptx.autosave.saveFailed");default:return ""}}function Hk(e){let{options:t}=e,n=Np({doc:e.doc,store:e.store,getHandler:e.getHandler,getTranslator:e.getTranslator,hostAutosave:t.autosave,hostIntervalMs:t.autosaveIntervalMs,filePath:t.autosaveFilePath??VD,fileName:t.fileName,getSaveIntent:()=>({password:e.store.get().presentationPassword,passwordProtected:e.store.get().isPasswordProtected}),onStatus:l=>{e.getChrome().ribbon?.setAutosaveStatus(BD(l,e.getTranslator()),l),e.getChrome().titleBar?.setAutosaveState(l),t.onAutosaveStatus?.(l);},onRecovery:l=>t.onAutosaveRecovery?.(l),loadFile:l=>e.loadFile(l)}),o=null,r=Bt({store:e.store,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:e.setEditable,onReadOnlyChange:e.onCollaborationReadOnlyChange,onStatusChange:l=>{t.onCollaborationStatus?.(l),o?.(l);}});t.collaboration&&r.start(t.collaboration);let i=e.store.subscribe((l,p)=>{if(r.isActive()&&(l.currentSlide!==p.currentSlide&&r.setActiveSlide(l.currentSlide),l.selectedElementId!==p.selectedElementId&&r.setSelection(l.selectedElementId??void 0,l.currentSlide),l.followedClientId!==null&&l.remotePresences!==p.remotePresences)){let d=l.remotePresences.find(u=>u.clientId===l.followedClientId);d&&d.activeSlideIndex!==l.currentSlide&&e.goToSlide(d.activeSlideIndex);}}),s=()=>Pk({doc:e.doc,store:e.store,getChrome:e.getChrome,getTranslator:e.getTranslator,getScale:e.getScale,startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),getStatus:()=>r.getStatus(),getConfig:()=>r.getConfig(),followUser:l=>r.followUser(l),shareDefaults:t.shareDefaults,hiddenActions:e.getHiddenActions?e.getHiddenActions():t.hiddenActions,showCollaborationStatus:e.isShareAvailable?.()??true,getUserInitials:e.getUserInitials}),a=s();return o=l=>a.onStatusChange(l),{startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),isCollaborationReadOnly:()=>r.isReadOnly(),getCollaborationStatus:()=>r.getStatus(),getCollaborationLivePatcher:()=>r.livePatcher,setCollaborationCursor:(l,p)=>r.setCursor(l,p,e.store.get().currentSlide),publishCollaborationInlineText:(l,p)=>{let d=e.store.get();chunk24B6ZCFG_cjs.Mh(r.livePatcher,d.slides[d.currentSlide],l,p);},flushCollaborationLivePatch:()=>r.livePatcher.flush(),followCollaborationUser:l=>r.followUser(l),beginCollaborationContentLoad:l=>r.beginContentLoad(l),notifyCollaborationContentLoaded:l=>r.notifyContentLoaded(l),autosaveNow:()=>n.saveNow(),setAutosaveEnabled(l){n.setEnabled(l)&&t.onToggleAutosave?.(l);},isAutosaveEnabled:()=>n.isEnabled(),isAutosavePreferred:()=>n.isPreferred(),getAutosaveActivation:()=>n.getActivation(),setAutosaveIntervalMs:l=>n.setOptionsIntervalMs(l),openBroadcast:()=>a.openBroadcast(),openShare:()=>a.openShare(),remountUi(){a.destroy(),a=s(),a.onStatusChange(r.getStatus());},destroy(){i(),a.destroy(),r.destroy(),n.destroy();}}}function Fk(e,t,n){if(e===t)return false;let o=new Set(e),r=new Set(t);return n.some(i=>i.type==="chart"&&o.has(i.id)!==r.has(i.id))}function Gp(e){let{renderer:t,callbacks:n}=e;return (o,r)=>{let i=e.getChrome();o.loading!==r.loading&&i.setLoading(o.loading),o.error!==r.error&&i.setError(o.error),o.presenting!==r.presenting&&(i.setPresenting(o.presenting),i.statusBar?.setPresenting(o.presenting),n.onPresentationChange?.(o.presenting)),((o.slides!==r.slides||o.sections!==r.sections||o.canvasSize!==r.canvasSize||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||o.outlineFontsTick!==r.outlineFontsTick)&&!o.interactionActive||r.interactionActive&&!o.interactionActive)&&t.renderThumbnails(),(o.slides!==r.slides||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom||o.canvasSize!==r.canvasSize||o.presenting!==r.presenting||o.editTemplateMode!==r.editTemplateMode||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||Fk(r.selectedElementIds,o.selectedElementIds,U(o)))&&t.renderStage(),o.currentSlide!==r.currentSlide&&(i.thumbnails?.setActive(o.currentSlide),n.onSlideChange?.(o.currentSlide)),(o.slides!==r.slides||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom)&&(i.statusBar?.update({current:o.currentSlide,total:o.slides.length,zoomPercent:t.zoomPercent()}),i.presentationTouchControls.update(o.currentSlide,o.slides.length),i.presentationToolbar.update({current:o.currentSlide,total:o.slides.length}),i.mobileActionSheets?.update(o.currentSlide,o.slides,o.slides[o.currentSlide]?.comments??[])),o.zoom!==r.zoom&&n.onZoomChange?.(t.effectiveScale()),o.selectedElementId!==r.selectedElementId&&n.onSelectionChange?.(o.selectedElementId),o.dirty!==r.dirty&&(i.statusBar?.setDirty(o.dirty),i.titleBar?.setDirty(o.dirty),n.onDirtyChange?.(o.dirty)),o.editable!==r.editable&&(i.root.classList.toggle("pptxv-editable",o.editable),i.notes.update({slide:o.slides[o.currentSlide],editable:o.editable,notesStyle:o.notesMaster?.notesStyle}),i.mobileActionSheets?.setEditable(o.editable)),o.protectedView!==r.protectedView&&i.setProtectedView(o.protectedView),(o.readOnlyRecommendation!==r.readOnlyRecommendation||o.readOnlyBannerDismissed!==r.readOnlyBannerDismissed||o.readOnlyPasswordPromptOpen!==r.readOnlyPasswordPromptOpen||o.readOnlyPasswordError!==r.readOnlyPasswordError||o.readOnlyCheckingPassword!==r.readOnlyCheckingPassword)&&i.setReadOnlyRecommendation(o.readOnlyRecommendation,o.readOnlyBannerDismissed,{promptOpen:o.readOnlyPasswordPromptOpen,error:o.readOnlyPasswordError,checking:o.readOnlyCheckingPassword}),(o.compatToasts!==r.compatToasts||o.inspectorOpen!==r.inspectorOpen)&&i.setCompatToasts(o.compatToasts,o.inspectorOpen?chunk24B6ZCFG_cjs.Ko:0),o.runProgramNotices!==r.runProgramNotices&&i.setRunProgramNotices(o.runProgramNotices),o.notesExpanded!==r.notesExpanded&&(i.notes.setExpanded(o.notesExpanded),i.ribbon?.setNotesExpanded(o.notesExpanded),i.statusBar?.setNotesExpanded(o.notesExpanded),i.mobileActionSheets?.setNotesExpanded(o.notesExpanded)),o.editTemplateMode!==r.editTemplateMode&&i.ribbon?.setTemplateEditing(o.editTemplateMode),(o.showGrid!==r.showGrid||o.showRulers!==r.showRulers||o.showGuides!==r.showGuides||o.snapToGrid!==r.snapToGrid||o.snapToShape!==r.snapToShape)&&i.ribbon?.setViewOptions(o),o.hasMacros!==r.hasMacros&&i.ribbon?.setHasMacros(o.hasMacros),o.presentationProperties.showSubtitles!==r.presentationProperties.showSubtitles&&i.ribbon?.setSubtitlesVisible(!!o.presentationProperties.showSubtitles),(o.currentSlide!==r.currentSlide||o.slides[o.currentSlide]?.hidden!==r.slides[r.currentSlide]?.hidden)&&i.ribbon?.setHideSlideActive(!!o.slides[o.currentSlide]?.hidden);}}var Vk=`
|
|
1
|
+
'use strict';var chunkLQYP7D76_cjs=require('./chunk-LQYP7D76.cjs'),chunk6TALMZ42_cjs=require('./chunk-6TALMZ42.cjs'),chunkWKWWFY2C_cjs=require('./chunk-WKWWFY2C.cjs');require('./chunk-B5PFHICE.cjs');var lucide=require('lucide');function os(e){let{store:t,editor:n}=e,o=(s,a)=>{let l=s(structuredClone(t.get().slides));e.ensureEditable(),n.commitSlides(l,t.get().currentSlide);},r=()=>{let s=t.get();return {slides:s.slides,width:s.canvasSize.width,height:s.canvasSize.height,theme:s.colorScheme?{colorScheme:s.colorScheme}:void 0,sections:s.sections,presentationProperties:s.presentationProperties,customProperties:s.customProperties,coreProperties:s.coreProperties,appProperties:s.appProperties,viewProperties:s.viewProperties,tableStyleMap:s.tableStyleMap,tableStylesDefaultId:s.tableStylesDefaultId,tags:s.tagCollections}},i=chunk6TALMZ42_cjs.b;return {getDeckMeta(){let s=t.get();return {slideCount:s.slides.length,activeSlideIndex:s.currentSlide,title:yI(s.slides),width:s.canvasSize.width,height:s.canvasSize.height}},getSlides:()=>t.get().slides,getActiveSlideIndex:()=>t.get().currentSlide,getTheme(){let{colorScheme:s}=t.get();return s?{colorScheme:s}:void 0},getHandler:()=>e.getHandler()??void 0,goToSlide:s=>e.goToSlide(s),selectElements(s,a){e.goToSlide(s),n.selectElements(a);},applySlidesUpdate:o,updateElement(s,a,l){o(p=>{let d=p[s]?.elements.find(u=>u.id===a);return d&&chunk6TALMZ42_cjs.p(d,l),p});},applyTheme:s=>e.applyThemeUpdates(s),getDeckData:()=>r(),applyDeckData(s,a){let l=r(),p=s(structuredClone(l));e.ensureEditable(),i(l.slides,p.slides)&&n.commitSlides(p.slides,t.get().currentSlide),(l.width!==p.width||l.height!==p.height)&&n.getEditActions().updateCanvasSize({width:p.width,height:p.height});let d=p.sections??l.sections??[];i(l.sections,d)&&n.updateSections(d);let u=p.presentationProperties??l.presentationProperties??{};i(l.presentationProperties,u)&&n.updatePresentationProperties(u);let c=p.coreProperties??l.coreProperties,x=p.appProperties??l.appProperties,b=p.customProperties??l.customProperties??[];(i(l.coreProperties,c)||i(l.appProperties,x)||i(l.customProperties,b))&&n.updateDocumentProperties(c??{},x??{},b),i(l.viewProperties,p.viewProperties)&&t.set({viewProperties:p.viewProperties}),i(l.tableStyleMap,p.tableStyleMap)&&n.getEditActions().updateTableStyleMap(p.tableStyleMap??{}),i(l.tableStylesDefaultId,p.tableStylesDefaultId)&&t.set({tableStylesDefaultId:p.tableStylesDefaultId});let g=p.tags??l.tags??[];i(l.tags,g)&&n.getEditActions().updateTagCollections(g);},getFocusedTargets:e.getFocusedTargets?()=>e.getFocusedTargets?.()??[]:void 0,notify:e.notify}}function yI(e){for(let t of e[0]?.elements??[])if(t.type==="text"&&t.text?.trim())return t.text.trim().slice(0,120)}var SI=2600;function CI(e,t){return `Review and fix any issues with this ${e.type} (id=${e.id}) on slide ${t+1}.`}function ns(e){let{store:t}=e,n=new Set,o=null,r=[],i=false,s=null,a=false,l=null,p={text:"",nonce:0},d=()=>{for(let b of n)b();},u=()=>{let b=t.get();return chunk6TALMZ42_cjs.i({activeSlideIndex:b.currentSlide,selectedElementIds:b.selectedElementIds,selectedElementId:b.selectedElementId})},c=()=>r.length>0,x=t.subscribe((b,g)=>{(b.currentSlide!==g.currentSlide||b.selectedElementId!==g.selectedElementId||b.selectedElementIds!==g.selectedElementIds)&&d();});return {subscribe(b){return n.add(b),()=>n.delete(b)},getLiveTargets:u,getEffectiveTargets(){return c()?r:o&&o.length>0?o:u()},isPinned:()=>!c()&&o!==null,hasPicks:c,pinFocus(){o=u(),d();},clearPinnedFocus(){o=null,d();},isPicking:()=>i,startPicking(){i=true,e.requestOpen(),d();},stopPicking(){i=false,d();},addPick(b,g){r.some(v=>v.kind==="element"&&v.elementId===g)||(r=[...r,{kind:"element",slideIndex:b,elementId:g}],d());},clearPicks(){r=[],i=false,d();},getHighlights(){let b=[];for(let g of r)g.kind==="element"&&b.push({slideIndex:g.slideIndex,elementId:g.elementId,variant:"pick"});if(s)for(let g of s.elementIds)b.push({slideIndex:s.slideIndex,elementId:g,variant:"active"});return b},isAnimating:()=>a||r.length>0,flashToolTarget(b){s=b&&b.slideIndex!==void 0&&b.elementIds.length>0?{slideIndex:b.slideIndex,elementIds:b.elementIds}:null,a=true,l&&clearTimeout(l),l=setTimeout(()=>{s=null,a=false,l=null,d();},SI),d();},getPrefill:()=>p,askAboutSelection(){o=u(),p={text:"",nonce:p.nonce+1},e.requestOpen(),d();},fixElement(b,g){o=u(),p={text:b?CI(b,g):"",nonce:p.nonce+1},e.requestOpen(),d();},dispose(){l&&clearTimeout(l),x(),n.clear();}}}function z(e,t){let n=chunk6TALMZ42_cjs.w(e,"button",`pptxv-btn${t.className?` ${t.className}`:""}`);if(n.type="button",n.title=t.label,n.setAttribute("aria-label",t.label),t.icon?n.appendChild(chunk6TALMZ42_cjs.K(e,t.icon)):t.text!==void 0&&(n.classList.add("pptxv-btn-text"),n.textContent=t.text),t.textLabel!==void 0){n.classList.add("pptxv-btn-pill");let o=chunk6TALMZ42_cjs.w(e,"span","pptxv-btn-label");o.textContent=t.textLabel,n.appendChild(o);}return n.addEventListener("click",t.onClick),{btn:n,setActive(o){n.classList.toggle("is-active",o),n.setAttribute("aria-pressed",String(o));},setDisabled(o){n.disabled=o;}}}function wI(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function He(e,t,n="#000000"){let o=chunk6TALMZ42_cjs.w(e,"label","pptxv-color");o.title=t.label,o.setAttribute("aria-label",t.label);let r=e.createElement("input");return r.type="color",r.className="pptxv-color-input",r.value=n,r.setAttribute("aria-label",t.label),r.addEventListener("input",()=>t.onInput(r.value)),t.onCommit&&r.addEventListener("change",()=>t.onCommit?.(r.value)),o.appendChild(r),{el:o,setValue(i){r.value=wI(i,n);},setDisabled(i){r.disabled=i,o.classList.toggle("is-disabled",i);}}}function re(e,t){let n=chunk6TALMZ42_cjs.w(e,"label","pptxv-field"),o=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=e.createElement("input");r.type="number",r.className="pptxv-field-input",r.setAttribute("aria-label",t.label),t.min!==void 0&&(r.min=String(t.min)),t.max!==void 0&&(r.max=String(t.max)),r.step=String(t.step??1),n.appendChild(r);let i=Number.NaN,s=()=>{let a=Number.parseFloat(r.value);!Number.isFinite(a)||a===i||(i=a,t.onCommit(a));};return r.addEventListener("change",s),r.addEventListener("keydown",a=>{a.stopPropagation(),a.key==="Enter"&&s();}),{el:n,input:r,setValue(a){let l=Math.round(a*100)/100;i=l,e.activeElement!==r&&(r.value=String(l));},setDisabled(a){r.disabled=a;}}}function JC(e,t,n){let o=chunk6TALMZ42_cjs.e(e,t,n);return {position:o.position,left:`${o.left}px`,top:`${o.top}px`,width:`${o.width}px`,height:`${o.height}px`,opacity:String(o.opacity),transform:o.transform,transition:o.transition,"box-shadow":o.boxShadow,border:o.border,"border-radius":o.borderRadius,"pointer-events":o.pointerEvents,"z-index":String(o.zIndex)}}function EI(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n);if(o.length===0)return null;let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ai-change-layer");r.setAttribute("data-export-ignore","true");for(let i of o){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-ai-change-ghost",JC(i,"start",t.config));s.setAttribute("data-ai-change",i.kind),s.setAttribute("data-export-ignore","true"),r.appendChild(s);}return r}function TI(e,t,n){let o=t.changes.filter(i=>i.slideIndex===n),r=e.children;for(let i=0;i<r.length&&i<o.length;i+=1){let s=r[i],a=JC(o[i],"end",t.config);for(let[l,p]of Object.entries(a))s.style.setProperty(l,String(p));}}function ew(e){let{doc:t,store:n,animator:o}=e,r=null,i=null,s=o.current(),a=0,l=0,p=()=>{a&&(cancelAnimationFrame(a),a=0),l&&(cancelAnimationFrame(l),l=0);},d=b=>{s&&((!i||!i.isConnected)&&(i=chunk6TALMZ42_cjs.w(t,"style","pptxv-ai-change-css"),(b??t.head).appendChild(i)),i.textContent=chunk6TALMZ42_cjs.d(s.config));},u=()=>{if(p(),r?.remove(),r=null,!s)return;let b=e.getStageRoot();if(!b)return;d(b.parentElement);let g=n.get().currentSlide,v=EI(t,s,g);if(!v)return;b.appendChild(v),r=v;let f=s;a=requestAnimationFrame(()=>{l=requestAnimationFrame(()=>{r&&TI(r,f,g);});});},c=n.subscribe(u),x=o.subscribe(b=>{s=b,b&&e.goToSlide(b.slideIndex),u();});return u(),{destroy(){p(),c(),x(),r?.remove(),r=null,i?.remove(),i=null;}}}function tw(e){let{doc:t,t:n,store:o,controller:r,viewport:i}=e,s=null,a=()=>{s?.remove(),s=null;},l=u=>{let c=o.get().currentSlide,x=o.get().slides[c]?.elements.find(b=>b.id===u)??null;return o.set({selectedElementId:u,selectedElementIds:[u]}),x},p=(u,c,x)=>{let b=chunk6TALMZ42_cjs.w(t,"button","pptxv-ai-menu-item");return b.type="button",b.append(chunk6TALMZ42_cjs.K(t,u),t.createTextNode(c)),b.addEventListener("click",()=>{x(),a();}),b},d=u=>{let c=o.get();if(c.editable&&!c.presenting)return;let x=chunkWKWWFY2C_cjs.tm(u.target,e.getStageRoot());if(!x)return;u.preventDefault(),a();let b=l(x),g=o.get().currentSlide;s=chunk6TALMZ42_cjs.w(t,"div","pptxv-ai-menu",{left:`${u.clientX}px`,top:`${u.clientY}px`}),s.setAttribute("role","menu"),s.append(p("sparkles",n("pptx.ai.askAboutElement"),()=>r.askAboutSelection()),p("wrench",n("pptx.ai.fixElement"),()=>r.fixElement(b,g))),t.body.appendChild(s);let v=f=>{f instanceof KeyboardEvent&&f.key!=="Escape"||f.target instanceof Node&&s?.contains(f.target)||(a(),t.removeEventListener("pointerdown",v,true),t.removeEventListener("keydown",v,true));};t.addEventListener("pointerdown",v,true),t.addEventListener("keydown",v,true);};return i.addEventListener("contextmenu",d),{destroy(){i.removeEventListener("contextmenu",d),a();}}}function ow(e){let{doc:t,store:n,controller:o}=e,r=null,i=()=>{r?.remove(),r=null;let l=e.getStageRoot();if(!l)return;o.isAnimating()?l.setAttribute("data-pptx-ai-active","true"):l.removeAttribute("data-pptx-ai-active");let p=n.get(),d=o.getHighlights().filter(b=>b.slideIndex===p.currentSlide);if(d.length===0)return;let u=p.slides[p.currentSlide]?.elements??[],c=new Map(u.map(b=>[b.id,b])),x=chunk6TALMZ42_cjs.w(t,"div","pptxv-ai-hl-layer");for(let b of d){let g=c.get(b.elementId);if(!g)continue;let v=chunk6TALMZ42_cjs.w(t,"div",`pptxv-ai-hl pptxv-ai-hl-${b.variant}`,{left:`${g.x-3}px`,top:`${g.y-3}px`,width:`${g.width+6}px`,height:`${g.height+6}px`});x.appendChild(v);}l.appendChild(x),r=x;},s=n.subscribe(i),a=o.subscribe(i);return i(),{destroy(){s(),a(),r?.remove(),r=null,e.getStageRoot()?.removeAttribute("data-pptx-ai-active");}}}function nw(e){let{viewport:t,store:n,controller:o}=e,r=i=>{if(!o.isPicking()||i.button!==0)return;let s=chunkWKWWFY2C_cjs.tm(i.target,e.getStageRoot());s&&(i.preventDefault(),i.stopImmediatePropagation(),o.addPick(n.get().currentSlide,s));};return t.addEventListener("pointerdown",r,true),{destroy(){t.removeEventListener("pointerdown",r,true);}}}function PI(e){return e.stageWrap.querySelector(".pptxv-stage")}function rs(e){let{doc:t,chrome:n,t:o,controller:r}=e,i=()=>PI(n),s=[],a=(f,y)=>{let S=z(t,{label:o("pptx.toolbar.toggleAiAssistant"),icon:"sparkles",className:y,onClick:()=>{v(!b);}});S.btn.setAttribute("aria-expanded","false"),f.appendChild(S.btn),s.push(S);};a(n.titleBar?.el??n.root,n.titleBar?"pptxv-titlebar-btn pptxv-ai-toggle":"pptxv-ai-toggle-floating"),n.mobileToolbar&&a(n.mobileToolbar.aiHost,"pptxv-mobile-toolbar-btn pptxv-ai-toggle");let l=chunk6TALMZ42_cjs.w(t,"aside","pptxv-ai-panel");l.setAttribute("data-pptx-ai-panel",""),l.setAttribute("aria-label",o("pptx.ai.title")),l.hidden=true,(n.viewport.parentElement??n.root).appendChild(l);let p=ow({doc:t,store:e.store,controller:r,getStageRoot:i}),d=nw({viewport:n.viewport,store:e.store,controller:r,getStageRoot:i}),u=tw({doc:t,t:o,store:e.store,controller:r,viewport:n.viewport,getStageRoot:i}),c=null,x=null,b=false,g=false,v=async f=>{b=f,l.hidden=!b;for(let y of s)y.setActive(b),y.btn.setAttribute("aria-expanded",String(b));if(!(!b||c||g)){g=true,l.classList.add("is-loading");try{let{createAiPanel:y}=await import('./ai-panel-PK5HFITC.cjs');c=await y({host:l,doc:t,t:o,bridge:e.bridge,config:e.config,controller:r,goToSlide:e.goToSlide,onClose:()=>{v(!1);}}),c.changeAnimator&&(x=ew({doc:t,store:e.store,animator:c.changeAnimator,getStageRoot:i,goToSlide:e.goToSlide}));}finally{g=false,l.classList.remove("is-loading");}}};return {open(){v(true);},destroy(){x?.destroy(),x=null,c?.destroy(),c=null,u.destroy(),d.destroy(),p.destroy(),r.dispose();for(let f of s)f.btn.remove();l.remove();}}}function Or(e){let t=new Map;return new Proxy({},{get(n,o){if(typeof o!="string")return;let r=t.get(o);return r||(r=(...i)=>e()[o](...i),t.set(o,r)),r}})}function rw(e){return {ribbonHandlers:{nav:{prev:()=>e.prev(),next:()=>e.next(),zoomIn:()=>e.zoomIn(),zoomOut:()=>e.zoomOut(),zoomToFit:()=>e.zoomToFit(),togglePresentation:()=>e.togglePresentation(),normalView:()=>e.returnToNormalView(),toggleNotes:()=>e.toggleNotes(),openAccessibility:()=>e.openAccessibility(),openSettings:o=>e.openSettings(o),getCustomization:e.getCustomization,openHeaderFooter:()=>e.openHeaderFooter(),openCompare:()=>e.openCompare(),openSelectionPane:()=>e.openSelectionPane(),openSlideSorter:()=>e.openSlideSorter(),openReadingView:()=>e.openReadingView(),openOutlineView:()=>e.openOutlineView(),openComments:()=>e.openComments(),openHyperlink:()=>e.openHyperlink(),toggleTemplateEditing:()=>e.toggleTemplateEditing(),toggleMasterView:()=>e.toggleMasterNavigation(),toggleInspector:()=>e.toggleInspector(),clearSelection:()=>e.clearSelection(),toggleViewOption:o=>e.getEditActions().toggleViewOption(o),addGuide:o=>e.getEditActions().addGuide(o),activateEyedropper:()=>e.getEditActions().activateEyedropper(),toggleSpellCheck:()=>e.getEditActions().toggleSpellCheck()},primary:{undo:()=>e.undo(),redo:()=>e.redo(),save:()=>e.save()},file:{openFile:()=>e.openFile(),openRecentFile:o=>e.openRecentFile(o),createPresentation:o=>e.createPresentation(o),openSettings:()=>e.openSettings("general"),getCustomization:e.getCustomization,openShare:()=>e.openShare(),openDocumentProperties:()=>e.openDocumentProperties(),openFontEmbedding:()=>e.openFontEmbedding(),openDigitalSignatures:()=>e.openDigitalSignatures(),openPasswordProtection:()=>e.openPasswordProtection(),openVersionHistory:()=>e.openVersionHistory(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),save:()=>e.save(),saveAsPpsx:()=>{e.downloadAs("ppsx");},saveAsPptm:()=>{e.downloadAs("pptm");},saveAsPpt:()=>{e.downloadAs("ppt");},exportPng:()=>{e.exportSlidePng();},copySlideAsImage:()=>{e.copySlideAsImage();},exportPdf:()=>{e.exportPdf();},exportGif:()=>{e.exportGif();},exportVideo:()=>{e.exportVideo();},exportJson:()=>e.exportJson(),print:()=>{e.print();}},slideShow:{startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openSetUp:()=>e.openSetUpSlideShow(),toggleHideSlide:()=>e.toggleHideCurrentSlide(),startRehearsal:()=>e.startRehearsal(),openCustomShows:()=>e.openCustomShows(),toggleSubtitles:()=>e.toggleSubtitles(),openSubtitleSettings:()=>e.openSetUpSlideShow(),subtitleOptionsStore:e.subtitleOptionsStore,showOptions:()=>e.presentationProperties(),updateShowOptions:o=>e.getEditActions().updatePresentationSettings(o)},edit:Or(()=>e.getEditActions()),insert:{insert:(o,r)=>e.getEditActions().insert(o,r),insertImage:()=>e.getEditActions().insertImage(),insertMedia:()=>e.getEditActions().insertMedia(),insertChart:o=>e.getEditActions().insertChart(o),insertSmartArt:(o,r)=>e.getEditActions().insertSmartArt(o,r),insertEquation:o=>e.getEditActions().insertEquation(o),insertActionButton:o=>e.getEditActions().insertActionButton(o),insertField:(o,r)=>e.getEditActions().insertField(o,r),armFreeformTool:o=>e.armFreeformTool?.(o),visibleDrawingTools:()=>chunkWKWWFY2C_cjs.ys.filter(o=>chunkWKWWFY2C_cjs.Uq(e.getCustomization?.()??chunkWKWWFY2C_cjs.Oq,o))},findReplace:Or(()=>e.getFindReplaceActions()),design:{applyPresentationTheme:o=>e.applyPresentationTheme(o),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o)},transitions:{readDraft:()=>e.readTransitionDraft(),applyDraft:(o,r)=>e.getEditActions().applyTransitionDraft(o,r),readTransition:()=>e.readTransition(),applyChange:o=>e.getEditActions().applyTransitionChange(o)},draw:{setTool:o=>e.setDrawTool(o),setColor:o=>e.setDrawColor(o),setWidth:o=>e.setDrawWidth(o)}},inspectorHandlers:{selectElement:o=>e.selectElement(o),openDocumentProperties:()=>e.openDocumentProperties(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),updatePresentationSettings:o=>e.getEditActions().updatePresentationSettings(o),applyThemeByPath:(o,r)=>e.getEditActions().applyThemeByPath(o,r),applyThemeEdit:o=>e.getEditActions().applyThemeEdit(o),updateTagCollections:o=>e.getEditActions().updateTagCollections(o),updateActiveSlide:o=>e.getEditActions().updateActiveSlide(o),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),updateTableStyleMap:o=>e.getEditActions().updateTableStyleMap(o),deleteTableStyle:o=>e.getEditActions().deleteTableStyle(o),setTemplateBackground:(o,r)=>e.getEditActions().setTemplateBackground(o,r),getTemplateBackgroundColor:o=>e.getEditActions().getTemplateBackgroundColor(o),updateCanvasSize:o=>e.getEditActions().updateCanvasSize(o),updateSlideSize:o=>e.getEditActions().updateSlideSize(o),applySlideSizeRescale:(o,r)=>e.getEditActions().applySlideSizeRescale(o,r),addComment:(o,r)=>{e.getEditActions().comments.addComment(o,void 0,r);},addCommentReply:(o,r,i)=>{e.getEditActions().comments.addCommentReply(o,r,i);},editComment:(o,r)=>e.getEditActions().comments.editComment(o,r),deleteComment:o=>e.getEditActions().comments.deleteComment(o),toggleCommentResolved:o=>e.getEditActions().comments.toggleCommentResolved(o),setAnimationEffect:(o,r)=>e.getEditActions().setAnimationEffect(o,r),applyMotionPath:o=>e.getEditActions().applyMotionPath(o),setAnimationTiming:(o,r)=>e.getEditActions().setAnimationTiming(o,r),setAnimationSound:(o,r)=>e.getEditActions().setAnimationSound(o,r),setAnimationStockSound:(o,r)=>e.getEditActions().setAnimationStockSound(o,r),reorderAnimation:(o,r)=>e.getEditActions().reorderAnimation(o,r),setGeometry:o=>e.getEditActions().setGeometry(o),toggleElementLock:()=>e.getEditActions().toggleElementLock(),setShapeFill:(o,r)=>e.getEditActions().setShapeFill(o,r),setShapeStroke:(o,r)=>e.getEditActions().setShapeStroke(o,r),setShapeStrokeWidth:o=>e.getEditActions().setShapeStrokeWidth(o),setShapeStyle:o=>e.getEditActions().setShapeStyle(o),setShapeType:o=>e.getEditActions().setShapeType(o),pushRecentColor:o=>e.getEditActions().pushRecentColor(o),setTextVerticalAlign:o=>e.getEditActions().setTextVerticalAlign(o),setTextWrap:o=>e.getEditActions().setTextWrap(o),setAutoFitMode:o=>e.getEditActions().setAutoFitMode(o),setTextAdvanced:o=>e.getEditActions().setTextAdvanced(o),setTextStyle:(o,r)=>e.getEditActions().setTextStyle(o,r),setFillOpacity:o=>e.getEditActions().setFillOpacity(o),setStrokeOpacity:o=>e.getEditActions().setStrokeOpacity(o),setGradientFill:o=>e.getEditActions().setGradientFill(o),addGradientStop:(o,r)=>e.getEditActions().addGradientStop(o,r),removeGradientStop:o=>e.getEditActions().removeGradientStop(o),updateGradientStop:(o,r)=>e.getEditActions().updateGradientStop(o,r),setImageBrightness:o=>e.getEditActions().setImageBrightness(o),setImageContrast:o=>e.getEditActions().setImageContrast(o),setImageSaturation:o=>e.getEditActions().setImageSaturation(o),setImageCrop:(o,r)=>e.getEditActions().setImageCrop(o,r),setImageEffects:o=>e.getEditActions().setImageEffects(o),replaceImage:()=>{e.getEditActions().replaceSelectedImage();},resetImage:()=>e.getEditActions().resetSelectedImage(),setElementAction:(o,r)=>e.getEditActions().setElementAction(o,r),setAltText:o=>e.getEditActions().setAltText(o),setTitle:o=>e.getEditActions().setTitle(o),setOleName:o=>e.getEditActions().setOleName(o),setOleContent:o=>e.getEditActions().setOleContent(o),setChartData:o=>e.getEditActions().setChartData(o),setMediaProperties:o=>e.getEditActions().setMediaProperties(o),setTableHeaderRow:o=>e.getEditActions().setTableHeaderRow(o),setTableBandedRows:o=>e.getEditActions().setTableBandedRows(o),setTableCellPadding:o=>e.getEditActions().setTableCellPadding(o),setTableOptions:(o,r)=>e.getEditActions().setTableOptions(o,r),setTableData:(o,r)=>e.getEditActions().setTableData(o,r),setTableCellStyle:(o,r,i)=>e.getEditActions().setTableCellStyle(o,r,i),setTableCellStyles:(o,r)=>e.getEditActions().setTableCellStyles(o,r),mutateTableStructure:(o,r)=>e.getEditActions().mutateTableStructure(o,r),setTableColumnWidth:(o,r)=>e.getEditActions().setTableColumnWidth(o,r),setTableRowHeight:(o,r)=>e.getEditActions().setTableRowHeight(o,r),mergeTableCells:o=>e.getEditActions().mergeTableCells(o),splitTableCell:o=>e.getEditActions().splitTableCell(o),setSmartArtNodeText:(o,r)=>e.getEditActions().setSmartArtNodeText(o,r),setSmartArtNodeStyle:(o,r)=>e.getEditActions().setSmartArtNodeStyle(o,r),mutateSmartArtNode:(o,r)=>e.getEditActions().mutateSmartArtNode(o,r),replaceSmartArtData:o=>e.getEditActions().replaceSmartArtData(o),setSmartArtLayout:o=>e.getEditActions().setSmartArtLayout(o),setSmartArtColorScheme:o=>e.getEditActions().setSmartArtColorScheme(o)},onSelectSlide:o=>e.goToSlide(o),onToggleNotes:()=>e.toggleNotes(),onCommitNotes:(o,r)=>e.commitNotes(o,r)}}function iw(e){return {showTitleBar:chunkWKWWFY2C_cjs.Qq(e,"titleBar"),showStatusBar:chunkWKWWFY2C_cjs.Qq(e,"statusBar"),showNotes:chunkWKWWFY2C_cjs.Qq(e,"notes")}}function aw(e,t){let n=e.visible&&chunkWKWWFY2C_cjs.Qq(t,"quickAccessToolbar"),o=chunkWKWWFY2C_cjs.Sq(t,"print")?e.commandIds:e.commandIds.filter(r=>r!=="print");return {...e,visible:n,commandIds:o}}function sw(e){let t=chunkWKWWFY2C_cjs.Vq(e.customization),n=null,o=e,r=null,i=()=>{let a=t.getResolved();return n!==a&&(n=a,o={...e,hiddenActions:chunkWKWWFY2C_cjs.Pq(a,e.hiddenActions),showThumbnails:(e.showThumbnails??true)&&chunkWKWWFY2C_cjs.Qq(a,"slidesPane"),showInspector:(e.showInspector??true)&&chunkWKWWFY2C_cjs.Qq(a,"inspector")}),o},s=a=>{let l=t.getResolved();a.setConstraints({locked:l.lockedSettings,defaults:l.defaultSettings});};return {controller:t,getResolved:()=>t.getResolved(),getChromeOptions:i,isAiEnabled:()=>e.ai!==void 0&&chunkWKWWFY2C_cjs.Rq(t.getResolved(),"ai"),isDialogAvailable:a=>chunkWKWWFY2C_cjs.Sq(t.getResolved(),a),bind(a,l){r?.(),s(a),r=t.subscribe(()=>{s(a),l();});},destroy(){r?.(),r=null;}}}function lw(e){return {goToSlide:t=>e.goToSlide(t),move:t=>t>0?e.next():e.prev(),endShow:()=>e.exitPresentation(),confirmUrl:t=>e.confirmExternalHyperlink?.(t)??true,lastViewed:()=>{let t=e.getPreviousPresentedSlide();t!==null&&e.goToSlide(t);},customShow:(t,n)=>e.customShowRunner.customShow(t,n),openFile:t=>{chunkWKWWFY2C_cjs.Mc(t);},openPresentation:t=>{chunkWKWWFY2C_cjs.Mc(t);},playMedia:t=>{chunkWKWWFY2C_cjs.yd(e.getStageRoot(),t);},oleVerb:(t,n)=>{let o=chunkWKWWFY2C_cjs.np(e.getCurrentSlide(),n,t);o&&(o.action==="download"?chunkWKWWFY2C_cjs.Bt(o.url,o.fileName??"download"):chunkWKWWFY2C_cjs.Ct(o.url));},runProgram:t=>{e.addRunProgramNotice(chunkWKWWFY2C_cjs.Vr(t));}}}function is(e){return e.presenting&&e.animationBuildsComplete&&!chunkWKWWFY2C_cjs.Nc(e.currentSlide)}function pw(e){return AI(e.target,e.currentSlide),chunkWKWWFY2C_cjs.Qc(e.target,e.currentSlide,{slideCount:e.slideCount},e.runner)!=="advance"?false:!is(e)}function AI(e,t){let n=chunkWKWWFY2C_cjs.Se(e,t);if(!n?.descriptor.click)return;let{element:o}=n,{style:r,clearStyle:i,durationMs:s}=n.descriptor.click;chunkWKWWFY2C_cjs.Re(o,r),!(typeof setTimeout>"u")&&setTimeout(()=>{chunkWKWWFY2C_cjs.Re(o,i);},s);}function kI(e){if(!(!e.presenting||e.endOfShow))return chunkWKWWFY2C_cjs.Oc(e.slides[e.currentSlide],{useTimings:e.presentationProperties.advanceMode!=="manual"})}function dw(e){let t=e.setTimer??((d,u)=>setTimeout(d,u)),n=e.clearTimer??(d=>clearTimeout(d)),o,r=()=>{o!==void 0&&(n(o),o=void 0);},i=()=>{r();let d=kI(e.getState());d!==void 0&&(o=t(()=>{o=void 0;let u=e.getState().currentSlide;e.next(),e.getState().currentSlide===u&&i();},d));},s=()=>{let d=e.getState();return [d.presenting,d.endOfShow,d.currentSlide,d.presentationProperties.advanceMode??"",d.slides[d.currentSlide]?.transition?.advanceAfterMs??""].join("|")},a="",l=()=>{let d=s();d!==a&&(a=d,i());},p=e.subscribe(l);return l(),{cancel:r,rearm:i,detach:()=>{r(),p();}}}function cw(e){let t,n=false,o=()=>{let i=e.getPresenting();if(i!==n){if(n=i,i){t=chunkWKWWFY2C_cjs.Cn({root:e.root,onHidden:e.cancelAutoAdvance,onVisible:e.rearmAutoAdvance});return}t?.(),t=void 0,chunkWKWWFY2C_cjs.Bn();}},r=e.subscribe(o);return o(),()=>{r(),t?.(),t=void 0,n&&(n=false,chunkWKWWFY2C_cjs.Bn());}}function mw(e,t){let n=null,o=e.subscribe((r,i)=>{if(r.endOfShow&&!i.endOfShow&&n){let s=n;n=null,e.set({activeCustomShowId:s.showId,endOfShow:false}),t(s.index);return}i.presenting&&!r.presenting&&(n=null);});return {customShow(r,i){let s=e.get(),a=s.customShows.find(u=>u.id===r);if(!a)return;i&&(n={index:s.currentSlide,showId:s.activeCustomShowId});let l=chunkWKWWFY2C_cjs.up(s.presentationProperties,s.slides.length),p=chunkWKWWFY2C_cjs.op(s.slides,a,l);e.set({activeCustomShowId:r});let d=chunkWKWWFY2C_cjs.vp(p);d!==void 0&&t(d);},dispose:o}}function Ro(e,t,n){for(let r of n)e.style.removeProperty(r);let o=chunkWKWWFY2C_cjs.it(t);for(let[r,i]of Object.entries(o))e.style.setProperty(r,i);return Object.keys(o)}function as(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"section","pptxv-accessibility-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","false"),o.setAttribute("aria-label",t("pptx.accessibility.title"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-accessibility-header"),i=chunk6TALMZ42_cjs.w(e,"h2","pptxv-accessibility-title");i.textContent=t("pptx.accessibility.title");let s=chunk6TALMZ42_cjs.w(e,"button","pptxv-accessibility-close");s.type="button",s.textContent=t("pptx.accessibility.close"),s.setAttribute("aria-label",t("pptx.accessibility.closePanel")),r.append(i,s),o.appendChild(r);let a=chunk6TALMZ42_cjs.w(e,"p","pptxv-accessibility-summary");o.appendChild(a);let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-accessibility-list");l.setAttribute("role","list"),l.setAttribute("aria-label",t("pptx.accessibility.issuesList")),o.appendChild(l);let p=()=>{o.hidden=true;};s.addEventListener("click",p);let d=u=>{let c=chunk6TALMZ42_cjs.w(e,"section",`pptxv-accessibility-group is-${u.severity}`),x=chunk6TALMZ42_cjs.w(e,"h3","pptxv-accessibility-group-title");x.textContent=`${u.label} (${u.issues.length})`,c.appendChild(x);for(let[b,g]of u.issues.entries()){let v=chunk6TALMZ42_cjs.w(e,"button","pptxv-accessibility-issue");v.type="button",v.setAttribute("role","listitem"),v.dataset.issueKey=chunkWKWWFY2C_cjs.dm(g,b);let f=chunk6TALMZ42_cjs.w(e,"strong","pptxv-accessibility-issue-type");f.textContent=chunkWKWWFY2C_cjs.cm(g.type,h=>t(h));let y=chunk6TALMZ42_cjs.w(e,"span","pptxv-accessibility-issue-message");y.textContent=g.message;let S=chunk6TALMZ42_cjs.w(e,"span","pptxv-accessibility-issue-slide");S.textContent=t("pptx.notes.slideN",{n:g.slideIndex+1}),v.append(f,y,S),v.addEventListener("click",()=>n(g.slideIndex)),c.appendChild(v);}l.appendChild(c);};return {el:o,open(u){if(l.replaceChildren(),a.textContent=t("pptx.accessibility.issueCount",{count:u.length}),u.length===0){let c=chunk6TALMZ42_cjs.w(e,"p","pptxv-accessibility-empty");c.textContent=t("pptx.accessibility.noIssuesFound"),l.appendChild(c);}else for(let c of chunkWKWWFY2C_cjs.bm(u,x=>t(x)))d(c);o.hidden=false,s.focus();},close:p}}var uw=5;function xw(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-compat-toasts");r.dataset.testid="pptx-compat-toasts",r.hidden=true,r.setAttribute("style",chunkWKWWFY2C_cjs.uo());let i=0,s=0,a=()=>{r.setAttribute("style",chunkWKWWFY2C_cjs.uo(i,s));};r.setAttribute("role","region"),r.setAttribute("aria-label",t("pptx.compatibility.toastTitle"));let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-compat-toasts-list"),p=chunk6TALMZ42_cjs.w(e,"div","pptxv-compat-toasts-overflow");p.hidden=true;let d=chunk6TALMZ42_cjs.w(e,"button","pptxv-compat-toasts-dismiss-all");d.type="button",d.dataset.testid="pptx-compat-toasts-dismiss-all",d.textContent=t("pptx.compatibility.dismissAll"),d.addEventListener("click",o),r.append(l,p,d);function u(c){let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-compat-toast");x.dataset.testid="pptx-compat-toast",x.dataset.code=c.code,x.dataset.severity=c.severity,x.setAttribute("role","status"),x.appendChild(chunk6TALMZ42_cjs.K(e,"alert"));let b=chunk6TALMZ42_cjs.w(e,"div","pptxv-compat-toast-body"),g=chunk6TALMZ42_cjs.w(e,"strong","pptxv-compat-toast-title");g.textContent=t("pptx.compatibility.toastTitle");let v=chunk6TALMZ42_cjs.w(e,"span","pptxv-compat-toast-message");v.textContent=t(c.messageKey,c.params),b.append(g,v);let f=chunk6TALMZ42_cjs.w(e,"button","pptxv-compat-toast-dismiss");return f.type="button",f.dataset.testid="pptx-compat-toast-dismiss",f.setAttribute("aria-label",t("pptx.compatibility.dismiss")),f.appendChild(chunk6TALMZ42_cjs.K(e,"close")),f.addEventListener("click",()=>n(c.id)),x.append(b,f),x}return {el:r,setBottomInset(c){s=c,a();},update(c,x=0){r.hidden=c.length===0,i=x,a(),l.replaceChildren(...c.slice(0,uw).map(u));let b=c.length-uw;p.hidden=b<=0,b>0&&(p.textContent=`+${b}`);}}}function bw(e,t,n,o){let r=n(t("pptx.accessibility.heading"));r.setAttribute("data-pptx-inspector-section","alt-text");let i=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-accessibility-alt"),s=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.elementAccessibility.altText");let a=e.createElement("textarea");a.rows=2,a.className="pptxv-accessibility-alt-input",a.placeholder=t("pptx.elementAccessibility.altTextPlaceholder"),a.setAttribute("aria-label",t("pptx.elementAccessibility.altText")),a.addEventListener("keydown",u=>u.stopPropagation()),a.addEventListener("change",()=>o.setAltText(a.value)),i.append(s,a),r.appendChild(i);let l=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-accessibility-title"),p=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.elementAccessibility.title");let d=e.createElement("input");return d.type="text",d.className="pptxv-accessibility-title-input",d.placeholder=t("pptx.elementAccessibility.titlePlaceholder"),d.setAttribute("aria-label",t("pptx.elementAccessibility.title")),d.addEventListener("keydown",u=>u.stopPropagation()),d.addEventListener("change",()=>o.setTitle(d.value)),l.append(p,d),r.appendChild(l),{el:r,update(u){r.hidden=!u.hasSelection||!u.showAccessibilitySection,e.activeElement!==a&&(a.value=u.altText),e.activeElement!==d&&(d.value=u.title),a.disabled=!u.showAccessibilitySection,d.disabled=!u.showAccessibilitySection;}}}function Q(e){return e.createElement("pptx-ui-select")}function me(e){return e.createElement("pptx-ui-checkbox")}function fe(e,t){let n=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-select"),o=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=Q(e);r.className="pptxv-field-select-input",r.setAttribute("aria-label",t.label);for(let i of t.options){let s=e.createElement("option");s.value=i.value,s.textContent=i.label,r.appendChild(s);}return r.addEventListener("change",()=>t.onChange(r.value)),n.appendChild(r),{el:n,setValue(i){r.value=i;},setDisabled(i){r.disabled=i;}}}function oe(e,t){let n=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),o=me(e);o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>t.onChange(o.checked));let r=chunk6TALMZ42_cjs.w(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 Fe(e,t){let n=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-range"),o=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");o.textContent=t.label,n.appendChild(o);let r=chunk6TALMZ42_cjs.w(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 s=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-range-readout"),a=t.formatValue??(p=>String(p)),l=()=>{s.textContent=a(Number.parseFloat(i.value));};return i.addEventListener("input",()=>{l(),t.onInput?.(Number.parseFloat(i.value));}),i.addEventListener("change",()=>t.onCommit(Number.parseFloat(i.value))),r.append(i,s),n.appendChild(r),{el:n,setValue(p){e.activeElement!==i&&(i.value=String(p),l());},setDisabled(p){i.disabled=p;}}}function fw(e,t,n,o){let r=n(t("pptx.action.title")),i=gw(e,t,"click",o),s=gw(e,t,"hover",o);r.append(i.el,s.el);let a=1,l=[];return {el:r,setSlideCount(p){a=Math.max(1,p);},setCustomShows(p){l=p;},update(p){r.hidden=!p.hasSelection,i.update(p.actionClick,a,l),s.update(p.actionHover,a,l);}}}function gw(e,t,n,o){let r=e.createElement("fieldset");r.className="pptxv-action-fieldset";let i=e.createElement("legend");i.textContent=t(n==="click"?"pptx.action.onClick":"pptx.action.onHover");let s=Q(e);s.setAttribute("aria-label",t(n==="click"?"pptx.action.onClick":"pptx.action.onHover"));for(let S of chunkWKWWFY2C_cjs.hm){let h=e.createElement("option");h.value=S.value,h.textContent=t(S.labelKey),s.appendChild(h);}let a=e.createElement("input"),l=new Set(["url","openFile","openPresentation","runProgram"]),p=Q(e);p.dataset.testid="pptx-action-custom-show",p.setAttribute("aria-label",t("pptx.hyperlink.customShowLabel"));let d=e.createElement("option");d.value="",p.appendChild(d);let u=e.createElement("label");u.className="pptxv-action-return-row";let c=me(e);c.dataset.testid="pptx-action-custom-show-return",u.append(c,e.createTextNode(t("pptx.hyperlink.customShowReturn")));let x=1,b=[],g=S=>({url:l.has(S)?a.value:void 0,slideIndex:S==="slide"?chunkWKWWFY2C_cjs.jm(a.valueAsNumber,x):void 0,customShowId:S==="customShow"&&p.value||void 0,returnAfter:S==="customShow"?c.checked:void 0}),v=()=>{let S=s.value;o.setElementAction(n,{trigger:n,type:S,...g(S)});},f=()=>{let S=p.value;p.replaceChildren(d);for(let h of b){let C=e.createElement("option");C.value=h.id,C.textContent=h.name,p.appendChild(C);}p.value=b.some(h=>h.id===S)?S:"";},y=()=>{let S=s.value,h=S==="slide",C=S==="customShow";a.hidden=!(l.has(S)||h),a.type=h?"number":"url",a.placeholder=h?t("pptx.action.slideNumberPlaceholder"):"https://",h&&(a.min="1",a.max=String(Math.max(1,x)),a.step="1"),p.hidden=!C,u.hidden=!C;};return s.addEventListener("change",()=>{y();let S=s.value;chunkWKWWFY2C_cjs.im(S,g(S))&&v();}),a.addEventListener("change",v),p.addEventListener("change",v),c.addEventListener("change",v),r.append(i,s,a,p,u),{el:r,update(S,h,C){x=Math.max(1,h),b=C,s.value=S?.type??"none",a.value=S?.type==="slide"?String((S.slideIndex??0)+1):S?.url??"",f(),p.value=S?.customShowId??"",c.checked=S?.returnAfter===true,y();}}}var It=null;function Lt(e,t=false){Oo(),!(typeof Audio>"u")&&(It=new Audio(e),It.loop=t,It.play().catch(()=>{}));}function Oo(){It&&(It.pause(),It.currentTime=0,It=null);}function ss(e){if(e instanceof Element)return e.closest("[data-element-id]")?.dataset.elementId}function vw(e,t){let n=null;e.addEventListener("click",o=>{let r=t.getController(),i=ss(o.target);if(!i||!r?.hasInteractiveSequence(i))return;let s=r.advanceInteractive(i);s&&(o.stopPropagation(),t.play(r,s));}),e.addEventListener("mouseover",o=>{let r=chunkWKWWFY2C_cjs.Se(o.target,t.getSlide()),i=r?.descriptor.hover?r.element:null;i!==n&&(n&&chunkWKWWFY2C_cjs.Re(n,chunkWKWWFY2C_cjs.Qe),n=i,i&&r?.descriptor.hover&&chunkWKWWFY2C_cjs.Re(i,r.descriptor.hover.enterStyle));let s=t.getController(),a=ss(o.target);if(!a||!s?.hasHoverSequence(a))return;s.resetHover(a);let l=s.advanceHover(a);l&&t.play(s,l);}),e.addEventListener("mouseout",o=>{let r=o.relatedTarget;(!(r instanceof Node)||!e.contains(r))&&n&&(chunkWKWWFY2C_cjs.Re(n,chunkWKWWFY2C_cjs.Qe),n=null);let i=t.getController(),s=ss(o.target);s&&i?.hasHoverSequence(s)&&i.resetHover(s);});}function ls(){let e=new Map,t=[],n={current:null},o=null,r=null,i=null,s=-1,a=false,l=null,p=new Map,d=null,u=false,c,x,b,g,v,f,y=()=>o?.interactiveTriggerShapeIds??new Set,S=()=>o?.hoverTriggerShapeIds??new Set,h=I=>{e.clear();for(let[D,L]of I)e.set(D,L);w();},C=()=>{let I=new Set;for(let[D,L]of e){(L.build||L.animatesFill||L.animatesStroke)&&I.add(D);let O=D.indexOf("::");O>0&&I.add(D.slice(0,O));}return Array.from(I)},w=()=>{if(!r)return;let I=C();I.length>0&&d?.(I),chunkLQYP7D76_cjs.c(r,e,y(),S());},T={setStates:I=>{h(I(new Map(e)));},timers:t,buildHandle:n,playSound:I=>{Lt(p.get(I)??I);},stopSound:Oo,frameRoot:()=>r},k=()=>{l&&(l(),l=null);},A=chunkWKWWFY2C_cjs.ur(),P=()=>{chunkWKWWFY2C_cjs.vr(T,A);},E=()=>{k(),P(),o=null,T.mediaTimeNodeElementIds=new Map,T.mediaBookmarkTimesMs=new Map,e.clear(),r=null,i=null;},M=(I,D,L=false)=>{if(o=chunkWKWWFY2C_cjs.Pd.fromSlide(I,{slideHeightPx:x?.height,slideWidthPx:x?.width,themeColorMap:b,pixelateMosaic:g}),T.mediaTimeNodeElementIds=chunkWKWWFY2C_cjs.zd(I.nativeAnimations??[]),T.mediaBookmarkTimesMs=chunkWKWWFY2C_cjs.Ad(I.elements),chunkLQYP7D76_cjs.b(D,o.keyframesCss),h(o.computeStates()),u=false,L){u=o.hasMoreSteps(),o.completeAll(),h(o.computeStates());return}if(o.hasMoreSteps()){let O=o.peekNext();if(O?.autoAdvance){let R=o,F=window.setTimeout(()=>{let H=R.advance();H&&(chunkWKWWFY2C_cjs.sr(R,H,T),chunkWKWWFY2C_cjs.tr(R,T));},O.autoAdvanceDelayMs??0);t.push(F);}}};return {elementStates:e,advance(){return chunkWKWWFY2C_cjs.wr(o,T,A)},isComplete(){return !o||!o.hasMoreSteps()},isSeededCompleted(){return u},replayCurrentSlide(I){c&&(P(),M(c,I));},navigateToZoomTarget(I,D,L){return v=chunkWKWWFY2C_cjs.wo(I,D,L),f=chunkWKWWFY2C_cjs.yo(I.transitionDurationMs),I.targetSlideIndex},consumeZoomReturnOnAdvance(I){let D=v,L=chunkWKWWFY2C_cjs.xo(I,void 0,D);if(L.returnedToZoom&&L.nextSlideIndex!==void 0)return v=L.excursion,f=chunkWKWWFY2C_cjs.yo(D?.transitionDurationMs),L.nextSlideIndex},syncStage(I){k();let D=I.showWithAnimation!==false;if(!I.presenting||!I.slide||!D){P(),o=null,e.clear(),chunkLQYP7D76_cjs.b(I.doc,""),r=I.presenting?I.stage:null,i=I.presenting?I.stage:null,s=I.slideIndex,a&&!I.presenting&&(Oo(),v=void 0,f=void 0),a=I.presenting;return}chunkLQYP7D76_cjs.a(I.doc),p=I.mediaDataUrls??new Map,d=I.reRenderElements??null,r=I.stage,x=I.canvasSize,b=I.themeColorMap,g=I.pixelateMosaicAnimation;let L=!a,O=I.slideIndex!==s,R=c;c=I.slide,L||O||!o?(P(),M(I.slide,I.doc,I.seedCompleted===true)):w();let F=f;f=void 0;let H=I.slideIndex<s,V=F??(H?R?.transition:I.slide.transition);if(!L&&O&&i&&chunkWKWWFY2C_cjs.qr(V,N=>p.get(N),{play:Lt,stop:Oo}),!L&&O&&i&&V&&V.type&&V.type!=="none"){let N=I.stage.cloneNode(true);l=chunkLQYP7D76_cjs.d({doc:I.doc,stageWrap:I.stageWrap,outgoing:i,incoming:N,transition:V,outgoingSlide:R,incomingSlide:I.slide,onDone:()=>{l=null;}});}vw(I.stage,{getController:()=>o,play:(N,B)=>{chunkWKWWFY2C_cjs.sr(N,B,T);},getSlide:()=>I.slide}),i=I.stage,s=I.slideIndex,a=true;},reset(){E(),s=-1,a=false;}}}function hw(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-after-animation-row"),i=chunk6TALMZ42_cjs.w(e,"label"),s=chunk6TALMZ42_cjs.w(e,"span");s.textContent=t("pptx.animation.afterAnimation");let a=Q(e);a.setAttribute("aria-label",t("pptx.animation.afterAnimation"));for(let u of chunkWKWWFY2C_cjs.bd){let c=e.createElement("option");c.value=u,c.textContent=t(`pptx.animation.afterAnimation.${u}`),a.appendChild(c);}a.addEventListener("change",()=>n(a.value)),i.append(s,a);let l=chunk6TALMZ42_cjs.w(e,"label","pptxv-after-animation-color"),p=chunk6TALMZ42_cjs.w(e,"span");p.textContent=t("pptx.animation.afterAnimation.color");let d=e.createElement("input");return d.type="color",d.setAttribute("aria-label",t("pptx.animation.afterAnimation.color")),d.addEventListener("change",()=>o(d.value)),l.append(p,d),l.hidden=true,r.append(i,l),{el:r,update(u){a.value=u.action,a.disabled=!u.editable;let c=u.action==="dimToColor";l.hidden=!c,d.value=u.color??"#808080",d.disabled=!u.editable;}}}var yw=["fromTop","fromBottom","fromLeft","fromRight"],Sw=[{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"}],Cw=["none","untilNextClick","untilEndOfSlide"];function Hr(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"label","pptxv-anim-field"),r=chunk6TALMZ42_cjs.w(e,"span");return r.textContent=t,o.appendChild(r),n.appendChild(o),o}function ot(e,t,n,o,r){let i=Hr(e,t,r),s=Q(e);s.setAttribute("aria-label",t);for(let a of n){let l=e.createElement("option");l.value=a.value,l.textContent=a.label,s.appendChild(l);}return s.addEventListener("change",()=>o(s.value)),i.appendChild(s),s}function Fr(e,t,n,o,r){let i=Hr(e,t,r),s=e.createElement("input");return s.type="number",s.min=String(n.min),s.max=String(n.max),s.step=String(n.step),s.addEventListener("change",()=>o(s.valueAsNumber)),i.appendChild(s),s}function ww(e,t,n,o){let r=ot(e,t("pptx.animation.trigger.bookmarkLabel"),[],o,n);r.setAttribute("data-pptx-animation-bookmark-picker","");let i=r.parentElement;return {select:r,update(s,a){i.hidden=a?.trigger!=="onMediaBookmark";let l=chunkWKWWFY2C_cjs.Rc(s),p=e.createElement("option");p.value="",p.textContent=t(l.length===0?"pptx.animation.trigger.noBookmarks":"pptx.animation.trigger.selectBookmark"),r.replaceChildren(p,...l.map(d=>{let u=e.createElement("option");return u.value=d.value,u.textContent=d.label,u})),r.value=chunkWKWWFY2C_cjs.Sc(a),r.disabled||=l.length===0;}}}function Vr(e){return chunkWKWWFY2C_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function Ew(e,t){let n=t.find(o=>o.id===e.elementId);return n?Vr(n):e.elementId.slice(0,8)}function LI(e){return e.entrance?"entrance":e.emphasis?"emphasis":e.exit?"exit":"none"}function Tw(e,t,n,o,r,i){let s=chunkWKWWFY2C_cjs.Lc(o);n.replaceChildren(...o.map((a,l)=>{let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-anim-bar-seg");p.classList.add(`is-${LI(a)}`),p.classList.toggle("is-selected",a.elementId===i),p.style.left=`${s[l].leftPercent}%`,p.style.width=`${s[l].widthPercent}%`;let d=chunkWKWWFY2C_cjs.ed(a,t);return p.title=`${Ew(a,r)} - ${d} (${a.durationMs??500}ms)`,p}));}function Pw(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint");let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-animation-timeline-name"),a=n.map(l=>{let p=r.find(d=>d.id===l);return p?Vr(p):l.slice(0,8)}).join(", ");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${a}`,i.append(s),i}function Aw(e,t,n,o,r,i,s,a,l){let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timeline-row");p.classList.toggle("is-selected",n.elementId===s);let d=chunk6TALMZ42_cjs.w(e,"span","pptxv-animation-timeline-name");d.textContent=`${o+1}. ${Ew(n,i)}`;let u=(c,x,b)=>{let g=chunk6TALMZ42_cjs.w(e,"button","pptxv-btn");return g.type="button",g.textContent=x,g.setAttribute("aria-label",t(c==="up"?"pptx.animation.moveUp":"pptx.animation.moveDown")),g.disabled=b,g.addEventListener("click",()=>l(n.elementId,c)),g};return p.append(d,u("up","\u2191",!a||o===0),u("down","\u2193",!a||o===r-1)),p}var ps="none",ds="current",kw="other";function Iw(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"label","pptxv-effect-sound-row"),i=chunk6TALMZ42_cjs.w(e,"span");i.textContent=t("pptx.animation.sound");let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-effect-sound-controls"),a=Q(e);a.setAttribute("aria-label",t("pptx.animation.sound"));let l=e.createElement("option");l.value=ps,l.textContent=t("pptx.animation.sound.none");let p=e.createElement("option");p.value=ds;let d=e.createElement("option");d.value=kw,d.textContent=t("pptx.animation.sound.other"),a.append(l);for(let b of chunkWKWWFY2C_cjs.Yc){let g=e.createElement("option");g.value=b.id,g.textContent=t(b.i18nKey),a.append(g);}a.append(d);let u=e.createElement("button");u.type="button",u.className="pptxv-effect-sound-preview",u.setAttribute("aria-label",t("pptx.animation.sound.preview")),u.textContent="\u25B6",u.disabled=true;let c=e.createElement("input");c.type="file",c.accept="audio/*",c.setAttribute("aria-label",t("pptx.animation.sound.chooseFile")),c.className="pptxv-effect-sound-file-input",c.tabIndex=-1;let x;return a.addEventListener("change",()=>{let b=a.value;if(b===kw){c.click();return}if(b===ps){n(void 0);return}b!==ds&&o(b);}),c.addEventListener("change",()=>{let b=c.files?.[0];if(c.value="",!b)return;let g=new FileReader;g.onload=()=>{typeof g.result=="string"&&n({dataUrl:g.result,fileName:b.name});},g.readAsDataURL(b);}),u.addEventListener("click",()=>{if(!x)return;let b=chunkWKWWFY2C_cjs.Zc(x);b&&Lt(b.dataUrl);}),s.append(a,u),r.append(i,s,c),{el:r,update(b){x=b.catalogueId,b.hasSound&&!b.catalogueId?(p.textContent=b.fileName??t("pptx.animation.sound.custom"),p.isConnected||a.insertBefore(p,l.nextSibling)):p.isConnected&&p.remove(),a.value=b.catalogueId??(b.hasSound?ds:ps),a.disabled=!b.editable,u.disabled=!b.catalogueId;}}}function Lw(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"label","pptxv-motion-path-row"),r=chunk6TALMZ42_cjs.w(e,"span");r.textContent=t("pptx.animation.motionPath.label");let i=Q(e);i.setAttribute("aria-label",t("pptx.animation.motionPath.label"));let s=e.createElement("option");s.value="none",s.textContent=t("pptx.animation.motionPath.none"),i.appendChild(s);let a=e.createElement("option");a.value="custom",a.textContent=t("pptx.animation.motionPath.custom");for(let p of chunkWKWWFY2C_cjs.Fd){let d=e.createElement("optgroup");d.label=t(chunkWKWWFY2C_cjs.Gd(p));for(let u of chunkWKWWFY2C_cjs.Id(p)){let c=e.createElement("option");c.value=u.id,c.textContent=t(chunkWKWWFY2C_cjs.Hd(u.id)),d.appendChild(c);}i.appendChild(d);}i.addEventListener("change",()=>n(i.value));let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-motion-path-hint");return l.textContent=t("pptx.animation.motionPath.editHint"),l.hidden=true,o.append(r,i,l),{el:o,update(p){let d=chunkWKWWFY2C_cjs.Jd(p.motionPath),u=!!p.motionPath&&!d;u?a.parentElement!==i&&i.insertBefore(a,s.nextSibling):a.remove(),i.value=u?"custom":d??"none",i.disabled=!p.editable,l.hidden=!p.motionPath;}}}function Mw(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-animation");o.setAttribute("data-pptx-animation-panel","");let r={selectedElementId:void 0,animations:[]},i=()=>r.animations.find(V=>V.elementId===r.selectedElementId),s=chunk6TALMZ42_cjs.w(e,"div","pptxv-anim-header"),a=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-section-title");a.textContent=t("pptx.animation.title");let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-anim-preview-btn");l.type="button",l.textContent=t("pptx.animation.preview"),l.addEventListener("click",()=>chunkWKWWFY2C_cjs.Rd(e,i())),s.append(a,l),o.appendChild(s);let p=(V,N,B)=>ot(e,t(N),[{value:"none",label:t("pptx.animation.none")},...B.map($=>({value:$,label:t(`pptx.animation.preset.${$}`)}))],$=>n.setAnimationEffect(V,$),o),d=p("entrance","pptx.animation.entrance",chunkWKWWFY2C_cjs.sc),u=p("emphasis","pptx.animation.emphasis",chunkWKWWFY2C_cjs.uc),c=p("exit","pptx.animation.exit",chunkWKWWFY2C_cjs.tc),x=Lw(e,t,V=>n.applyMotionPath(V));o.appendChild(x.el);let b=chunk6TALMZ42_cjs.w(e,"div","pptxv-anim-options");o.appendChild(b);let g=V=>{r.selectedElementId&&n.setAnimationTiming(r.selectedElementId,V);},v=Hr(e,t("pptx.animation.direction"),b);v.classList.add("pptxv-anim-direction");let f=yw.map(V=>{let N=chunk6TALMZ42_cjs.w(e,"button","pptxv-anim-direction-btn");return N.type="button",N.textContent=t(`pptx.animation.direction.${V}`),N.addEventListener("click",()=>g({direction:V})),v.appendChild(N),{value:V,btn:N}}),y=ot(e,t("pptx.animation.sequence"),chunkWKWWFY2C_cjs.wc.map(V=>({value:V,label:t(`pptx.animation.sequence.${V}`)})),V=>g({sequence:V}),b),S=Iw(e,t,V=>{r.selectedElementId&&n.setAnimationSound(r.selectedElementId,V);},V=>{r.selectedElementId&&n.setAnimationStockSound(r.selectedElementId,V);});b.appendChild(S.el);let h=hw(e,t,V=>g({afterAnimation:V}),V=>{g({afterAnimationColor:V}),n.pushRecentColor(V);});b.appendChild(h.el);let C=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-section-title");C.textContent=t("pptx.animation.timing"),b.appendChild(C);let w=ot(e,t("pptx.animation.trigger"),chunkWKWWFY2C_cjs.vc.map(V=>({value:V,label:t(`pptx.animation.trigger.${V}`)})),V=>g({trigger:V,triggerShapeId:""}),b),T=ot(e,t("pptx.animation.trigger.shapeLabel"),[],V=>g({triggerShapeId:V}),b),k=T.parentElement,A=ww(e,t,b,V=>g({triggerBookmark:V})),P=Fr(e,t("pptx.animation.duration"),{min:100,max:1e4,step:50},V=>g({durationMs:V}),b),E=Fr(e,t("pptx.animation.delay"),{min:0,max:1e4,step:50},V=>g({delayMs:V}),b),M=ot(e,t("pptx.animation.timingCurve"),Sw.map(V=>({value:V.value,label:t(V.labelKey)})),V=>g({timingCurve:V}),b),I=Fr(e,t("pptx.animation.repeatCount"),{min:1,max:100,step:1},V=>g({repeatCount:V}),b),D=ot(e,t("pptx.animation.repeatUntil"),Cw.map(V=>({value:V,label:t(`pptx.animation.repeatUntil.${V}`)})),V=>g({repeatMode:V}),b),L=chunk6TALMZ42_cjs.w(e,"div","pptxv-anim-timeline"),O=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-section-title");O.textContent=t("pptx.animation.timelineBar");let R=chunk6TALMZ42_cjs.w(e,"div","pptxv-anim-bar"),F=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-section-title");F.textContent=t("pptx.animation.timeline");let H=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timeline-list");return L.append(O,R,F,H),o.appendChild(L),{el:o,update(V){if(r=V,o.hidden=!V.selectedElementId,o.hidden)return;let N=i(),B=!!(N?.entrance||N?.emphasis||N?.exit||N?.motionPath);d.value=N?.entrance??"none",u.value=N?.emphasis??"none",c.value=N?.exit??"none",x.update({motionPath:N?.motionPath,editable:V.editable}),l.hidden=!B,b.hidden=!B;let $=N?chunkWKWWFY2C_cjs.rc([N],N.elementId):[],Y=chunkWKWWFY2C_cjs.qc(N,$);v.hidden=$.length===0;for(let{value:q,btn:j}of f)j.hidden=!$.includes(q),j.classList.toggle("is-active",Y===q),j.disabled=!V.editable;y.value=N?.sequence??"asOne",S.update({...chunkWKWWFY2C_cjs._c(V.animations,V.selectedElementId??""),editable:V.editable}),h.update({action:N?.afterAnimation??"none",color:N?.afterAnimationColor,editable:V.editable}),w.value=N?.trigger??"onClick",k.hidden=w.value!=="onShapeClick",T.replaceChildren(...[{id:"",label:t("pptx.animation.trigger.selectShape")},...V.elements.filter(q=>q.id!==V.selectedElementId).map(q=>({id:q.id,label:Vr(q)}))].map(q=>{let j=e.createElement("option");return j.value=q.id,j.textContent=q.label,j})),T.value=N?.triggerShapeId??"",P.value=String(N?.durationMs??450),E.value=String(N?.delayMs??0),M.value=chunkWKWWFY2C_cjs.oc(N?.timingCurve),I.value=String(N?.repeatCount??1),D.value=N?.repeatMode??"none";for(let q of [d,u,c,y,w,T,M,D])q.disabled=!V.editable;P.disabled=E.disabled=I.disabled=!V.editable,A.select.disabled=!V.editable,A.update(V.elements,N);let ie=[...V.animations].sort((q,j)=>(q.order??0)-(j.order??0)),_=chunkWKWWFY2C_cjs.Uc(ie,V.animationTimelineAnchors??[]),K=new Map(ie.map(q=>[q.elementId,q]));L.hidden=_.length===0,Tw(e,t,R,ie,V.elements,V.selectedElementId),H.replaceChildren(..._.flatMap((q,j)=>{if(q.kind==="native")return [Pw(e,t,q.targetIds,j,V.elements)];let ue=K.get(q.elementId);return ue?[Aw(e,t,ue,j,_.length,V.elements,V.selectedElementId,V.editable,n.reorderAnimation)]:[]}));}}}function Ho(e,t,n){let o=e.createElement("label");return o.className="pptxv-exhaustive-field",o.textContent=t,n.setAttribute("aria-label",t),n.classList.add("pptxv-exhaustive-field-control"),o.appendChild(n),{label:o,control:n}}function Mt(e,t){return Ho(e,t,e.createElement("input"))}function xe(e,t){let n=Mt(e,t);return n.control.type="number",n}function We(e,t,n){let o=Mt(e,t);return o.control.type="color",n&&o.control.addEventListener("change",()=>n(o.control.value)),o}function he(e,t){return Ho(e,t,me(e))}function oo(e,t,n){let o=Q(e);return rt(e,o,n.map(r=>[r,r])),Ho(e,t,o)}function Ve(e,t,n,o){let r=Q(e);return rt(e,r,n.map(i=>[i.value,o(i.labelKey)])),Ho(e,t,r)}function nt(e,t,n,o,r){let i=Q(e);return rt(e,i,n.map(s=>[s,chunkWKWWFY2C_cjs.Ab(o,s,r)])),Ho(e,t,i)}function rt(e,t,n){let o=t.value;t.replaceChildren(...n.map(([r,i])=>{let s=e.createElement("option");return s.value=r,s.textContent=i,s})),t.value=o;}function ye(e){return e.value===""?void 0:e.valueAsNumber}function Se(e,t){e.value=t===void 0?"":String(t);}function cs(e){return e.split(",").map(Number).filter(Number.isFinite)}function no(e,t){let{label:n,control:o}=xe(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 Dw(e,t,n,o=no(e,t),r){let i=e.createElement("div");i.className="pptxv-chart-advanced";let s=oo(e,t("pptx.chart.axis"),[]),a=xe(e,t("pptx.chart.axisMinimum")),l=xe(e,t("pptx.chart.axisMaximum")),p=xe(e,t("pptx.chart.majorUnit")),d=Ve(e,t("pptx.chart.displayUnits"),chunkWKWWFY2C_cjs.ub,t),u=he(e,t("pptx.chart.logScale")),c=he(e,t("pptx.chart.reverseOrder")),x=he(e,t("pptx.chart.majorGridlines")),b=oo(e,t("pptx.chart.series"),[]),g=Ve(e,t("pptx.chart.trendlines"),chunkWKWWFY2C_cjs.vb,t),v=he(e,t("pptx.chart.trendlineEquation")),f=he(e,t("pptx.chart.trendlineRSquared")),y=Ve(e,t("pptx.chart.errorBars"),chunkWKWWFY2C_cjs.wb,t),S=xe(e,t("pptx.chart.errorBarAmount")),h=nt(e,t("pptx.chart.marker"),["none","auto","circle","diamond","square","star","triangle","x","plus"],chunkWKWWFY2C_cjs.Ib,t),C=xe(e,t("pptx.chart.markerSize")),w=We(e,t("pptx.chart.seriesColor"),r),T=We(e,t("pptx.chart.dataPointColor"),r),k=xe(e,t("pptx.chart.pointExplosion"));i.append(s.label,a.label,l.label,p.label,d.label,u.label,c.label,x.label,b.label,g.label,v.label,f.label,y.label,S.label,h.label,C.label,w.label,o.label,T.label,k.label);let A,P=()=>Math.max(0,s.control.selectedIndex),E=()=>Math.max(0,b.control.selectedIndex),M=()=>{if(!A)return;let L=[...A.axes??[]],O=L[P()]??{axisType:"valAx"};L[P()]={...O,min:ye(a.control),max:ye(l.control),majorUnit:ye(p.control),displayUnits:d.control.value||void 0,logScale:u.control.checked,orientation:c.control.checked?"maxMin":"minMax",majorGridlines:x.control.checked},n({...A,axes:L});},I=()=>{if(!A?.series[E()])return;let L=[...A.series],O=L[E()],R=g.control.value,F=y.control.value,H=o.selected(),V=O.dataPoints?.find(({idx:B})=>B===H),N=chunkWKWWFY2C_cjs.oa(O.dataPoints,{...V??{idx:H},spPr:{...V?.spPr,fillColor:T.control.value},explosion:ye(k.control)});L[E()]={...O,color:w.control.value,trendlines:R?[{trendlineType:R,displayEq:v.control.checked,displayRSq:f.control.checked}]:[],errBars:F?[{direction:"y",barType:"both",valType:F,val:ye(S.control)}]:[],marker:{symbol:h.control.value,size:ye(C.control)},dataPoints:N},n({...A,series:L});};for(let L of [a.control,l.control,p.control,d.control,u.control,c.control,x.control])L.addEventListener("change",M);for(let L of [g.control,v.control,f.control,y.control,S.control,h.control,C.control,w.control,T.control,k.control])L.addEventListener("change",I);s.control.addEventListener("change",()=>A&&D(A)),b.control.addEventListener("change",()=>A&&D(A)),o.subscribe(()=>A&&D(A));let D=L=>{A=L,rt(e,s.control,(L.axes??[]).map((H,V)=>[String(V),H.titleText??chunkWKWWFY2C_cjs.Ab(chunkWKWWFY2C_cjs.Gb,H.axisType,t)])),rt(e,b.control,L.series.map((H,V)=>[String(V),H.name]));let O=L.axes?.[P()];Se(a.control,O?.min),Se(l.control,O?.max),Se(p.control,O?.majorUnit),d.control.value=O?.displayUnits??"",u.control.checked=O?.logScale??false,c.control.checked=O?.orientation==="maxMin",x.control.checked=O?.majorGridlines??false;let R=L.series[E()];g.control.value=R?.trendlines?.[0]?.trendlineType??"",v.control.checked=R?.trendlines?.[0]?.displayEq??false,f.control.checked=R?.trendlines?.[0]?.displayRSq??false,y.control.value=R?.errBars?.[0]?.valType??"",Se(S.control,R?.errBars?.[0]?.val),h.control.value=R?.marker?.symbol??"none",Se(C.control,R?.marker?.size),w.control.value=R?.color??"#4472c4";let F=R?.dataPoints?.find(({idx:H})=>H===o.selected());T.control.value=F?.spPr?.fillColor??R?.color??"#4472c4",Se(k.control,F?.explosion);};return {el:i,update:D}}var ms="pptxv-chart-grid-cell-highlight";function Rw(e,t,n,o=()=>true){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-chart-grid"),i=chunk6TALMZ42_cjs.w(e,"div","pptxv-chart-grid-toolbar"),s=e.createElement("table");s.className="pptxv-chart-grid-table";let a=(y,S,h)=>{let C=chunk6TALMZ42_cjs.w(e,"button","pptxv-chart-grid-btn");return C.type="button",C.textContent=`+ ${y}`,C.title=S,C.setAttribute("aria-label",S),C.addEventListener("click",h),C},l,p=y=>{y&&n(y);},d=a(t("pptx.chart.cat"),t("pptx.chart.addCategory"),()=>{l&&p(chunkWKWWFY2C_cjs.Pb(l));}),u=a(t("pptx.chart.seriesShort"),t("pptx.chart.addSeries"),()=>{l&&p(chunkWKWWFY2C_cjs.Nb(l));});i.append(d,u),r.append(i,s);let c=(y,S,h,C)=>{let w=e.createElement("input");return w.type=y,w.className="pptxv-chart-grid-cell",w.value=S,w.setAttribute("aria-label",h),w.addEventListener("change",()=>C(w.value)),w.addEventListener("keydown",T=>T.stopPropagation()),w},x=(y,S)=>{let h=chunk6TALMZ42_cjs.w(e,"button","pptxv-chart-grid-remove");return h.type="button",h.textContent="\xD7",h.title=y,h.setAttribute("aria-label",y),h.addEventListener("click",S),h},b=(y,S,h)=>{let C=[...y.series[S].values];for(;C.length<=h;)C.push(0);return {...y,series:y.series.map((w,T)=>T===S?{...w,values:C}:w)}},g=(y,S)=>{let h=e.createElement("thead"),C=e.createElement("tr"),w=e.createElement("th");return w.setAttribute("aria-label",t("pptx.chart.categories")),C.appendChild(w),y.series.forEach((T,k)=>{let A=e.createElement("th"),P=c("text",T.name,t("pptx.chart.seriesShort"),E=>n({...y,series:y.series.map((M,I)=>I===k?{...M,name:E}:M)}));S?.seriesIndex===k&&S.pointIndex===void 0&&P.classList.add(ms),A.appendChild(P),y.series.length>1&&A.appendChild(x(t("pptx.chart.removeSeries"),()=>p(chunkWKWWFY2C_cjs.Ob(y,k)))),C.appendChild(A);}),h.appendChild(C),h},v=(y,S)=>{let h=e.createElement("tbody");return y.categories.forEach((C,w)=>{let T=e.createElement("tr"),k=e.createElement("td");k.appendChild(c("text",C,t("pptx.chart.categories"),A=>p(chunkWKWWFY2C_cjs.Rb(y,w,A)))),y.categories.length>1&&k.appendChild(x(t("pptx.chart.removeCategory"),()=>p(chunkWKWWFY2C_cjs.Qb(y,w,o())))),T.appendChild(k),y.series.forEach((A,P)=>{let E=e.createElement("td"),M=c("number",String(A.values[w]??0),`${A.name} value ${w+1}`,I=>{let D=w>=A.values.length?b(y,P,w):y;p(chunkWKWWFY2C_cjs.Sb(D,P,w,I));});S?.seriesIndex===P&&S.pointIndex===w&&M.classList.add(ms),E.appendChild(M),T.appendChild(E);}),h.appendChild(T);}),h},f=null;return {el:r,update(y,S=null){if(l=y,r.hidden=!y,!y)return;s.textContent="",s.append(g(y,S),v(y,S));let h=S?`${S.seriesIndex}:${S.pointIndex??""}`:null;h!==null&&h!==f&&s.querySelector(`.${ms}`)?.scrollIntoView?.({block:"nearest",inline:"nearest"}),f=h;},setDisabled(y){d.disabled=y,u.disabled=y;for(let S of s.querySelectorAll("input"))S.disabled=y;}}}var MI=chunkWKWWFY2C_cjs.yb.filter(e=>e.value!=="");function Ow(e,t,n){let o=oo(e,t("pptx.chart.series"),[]),r=nt(e,t("pptx.chart.seriesType"),["bar","line","area","scatter","bubble","radar"],chunkWKWWFY2C_cjs.Eb,t),i=he(e,t("pptx.chart.secondaryAxis")),s=nt(e,t("pptx.chart.dataLabelPosition"),["bestFit","b","ctr","inBase","inEnd","l","outEnd","r","t"],chunkWKWWFY2C_cjs.Hb,t),a=he(e,t("pptx.chart.showValue")),l=he(e,t("pptx.chart.showCategory")),p=he(e,t("pptx.chart.showSeriesName")),d=he(e,t("pptx.chart.showPercentage")),u=he(e,t("pptx.chart.showLeaderLines")),c=xe(e,t("pptx.chart.trendlineOrder")),x=xe(e,t("pptx.chart.trendlinePeriod")),b=xe(e,t("pptx.chart.forecastForward")),g=xe(e,t("pptx.chart.forecastBackward")),v=xe(e,t("pptx.chart.trendlineIntercept")),f=We(e,t("pptx.chart.trendlineColor"),n),y=nt(e,t("pptx.chart.errorBarDirection"),["x","y"],chunkWKWWFY2C_cjs.Jb,t),S=Ve(e,t("pptx.chart.errorBarType"),chunkWKWWFY2C_cjs.xb,t),h=We(e,t("pptx.chart.errorBarColor"),n),C=he(e,t("pptx.chart.noEndCap")),w=Mt(e,t("pptx.chart.customPlus")),T=Mt(e,t("pptx.chart.customMinus")),k=We(e,t("pptx.chart.markerFill"),n),A=We(e,t("pptx.chart.markerOutline"),n),P=Ve(e,t("pptx.chart.dataPointMarker"),MI,t),E=xe(e,t("pptx.chart.markerSize")),M=he(e,t("pptx.chart.invertIfNegative")),I=oo(e,t("pptx.chart.axis"),[]),D=Mt(e,t("pptx.chart.axisTitle")),L=xe(e,t("pptx.chart.minorUnit")),O=he(e,t("pptx.chart.minorGridlines")),R=Mt(e,t("pptx.chart.numberFormat")),F=Ve(e,t("pptx.chart.tickLabelPosition"),chunkWKWWFY2C_cjs.tb,t),H=We(e,t("pptx.chart.axisColor"),n),V=We(e,t("pptx.chart.axisFontColor"),n),N=xe(e,t("pptx.chart.axisFontSize"));return {series:o,axis:I,comboType:r,secondaryAxis:i,labelPosition:s,showValue:a,showCategory:l,showSeries:p,showPercent:d,leaderLines:u,trendOrder:c,trendPeriod:x,trendForward:b,trendBackward:g,trendIntercept:v,trendColor:f,errorDirection:y,errorBarType:S,errorColor:h,noEndCap:C,customPlus:w,customMinus:T,markerFill:k,markerLine:A,pointMarker:P,pointMarkerSize:E,pointInvert:M,axisTitle:D,minorUnit:L,minorGridlines:O,numberFormat:R,tickPosition:F,axisColor:H,axisFontColor:V,axisFontSize:N,seriesFields:[r,i,s,a,l,p,d,u,c,x,b,g,v,f,y,S,h,C,w,T,k,A,P,E,M],axisFields:[D,L,O,R,F,H,V,N]}}function Hw(e,t,n,o,r){let i=e.createElement("div");i.className="pptxv-chart-exhaustive";let{series:s,axis:a,comboType:l,secondaryAxis:p,labelPosition:d,showValue:u,showCategory:c,showSeries:x,showPercent:b,leaderLines:g,trendOrder:v,trendPeriod:f,trendForward:y,trendBackward:S,trendIntercept:h,trendColor:C,errorDirection:w,errorBarType:T,errorColor:k,noEndCap:A,customPlus:P,customMinus:E,markerFill:M,markerLine:I,pointMarker:D,pointMarkerSize:L,pointInvert:O,axisTitle:R,minorUnit:F,minorGridlines:H,numberFormat:V,tickPosition:N,axisColor:B,axisFontColor:$,axisFontSize:Y,seriesFields:ie,axisFields:_}=Ow(e,t,r),K=o===void 0,q=o??no(e,t);i.append(s.label,...K?[q.label]:[],...ie.map(({label:ne})=>ne),a.label,..._.map(({label:ne})=>ne));let j,ue=()=>Math.max(0,s.control.selectedIndex),Te=()=>Math.max(0,a.control.selectedIndex),Me=()=>{let ne=j?.series[ue()];if(!j||!ne)return;let De=[...j.series],Xe=ne.trendlines?.[0],Qe=ne.errBars?.[0],Ze=q.selected(),Bt=ne.dataPoints?.find(({idx:_e})=>_e===Ze);De[ue()]={...ne,seriesChartType:l.control.value,axisId:chunkWKWWFY2C_cjs.Pr(j,p.control.checked),trendlines:Xe?[{...Xe,order:ye(v.control),period:ye(f.control),forward:ye(y.control),backward:ye(S.control),intercept:ye(h.control),color:C.control.value}]:[],errBars:Qe?[{...Qe,direction:w.control.value,barType:T.control.value,color:k.control.value,noEndCap:A.control.checked,customPlus:cs(P.control.value),customMinus:cs(E.control.value)}]:[],marker:{...ne.marker??{symbol:"auto"},spPr:{fillColor:M.control.value,strokeColor:I.control.value}},dataPoints:chunkWKWWFY2C_cjs.oa(ne.dataPoints,{...Bt??{idx:Ze},invertIfNegative:O.control.checked,marker:{...Bt?.marker,symbol:D.control.value,size:ye(L.control)}})},n({...j,series:De,style:{...j.style,hasDataLabels:true,dataLabels:{...j.style?.dataLabels,position:d.control.value,showValue:u.control.checked,showCategory:c.control.checked,showSeriesName:x.control.checked,showPercent:b.control.checked,showLeaderLines:g.control.checked}}});},Yo=()=>{let ne=j?.axes?.[Te()];if(!j||!ne)return;let De=[...j.axes??[]];De[Te()]={...ne,titleText:R.control.value,minorUnit:ye(F.control),minorGridlines:H.control.checked,numFmt:{formatCode:V.control.value},tickLblPos:N.control.value,spPr:{...ne.spPr,strokeColor:B.control.value},fontColor:$.control.value,fontSize:ye(Y.control)},n({...j,axes:De});};for(let ne of ie)ne.control.addEventListener("change",Me);for(let ne of _)ne.control.addEventListener("change",Yo);s.control.addEventListener("change",()=>j&&Et(j)),a.control.addEventListener("change",()=>j&&Et(j)),q.subscribe(()=>j&&Et(j));let Et=ne=>{j=ne,rt(e,s.control,ne.series.map((Nt,Ei)=>[String(Ei),Nt.name])),rt(e,a.control,(ne.axes??[]).map((Nt,Ei)=>[String(Ei),Nt.titleText??chunkWKWWFY2C_cjs.Ab(chunkWKWWFY2C_cjs.Gb,Nt.axisType,t)]));let De=ne.series[ue()],Xe=De?.trendlines?.[0],Qe=De?.errBars?.[0];l.control.value=De?.seriesChartType??ne.chartType,p.control.checked=chunkWKWWFY2C_cjs.Or(ne,ue());let Ze=ne.style?.dataLabels;d.control.value=Ze?.position??"bestFit",u.control.checked=Ze?.showValue??false,c.control.checked=Ze?.showCategory??false,x.control.checked=Ze?.showSeriesName??false,b.control.checked=Ze?.showPercent??false,g.control.checked=Ze?.showLeaderLines??false,Se(v.control,Xe?.order),Se(f.control,Xe?.period),Se(y.control,Xe?.forward),Se(S.control,Xe?.backward),Se(h.control,Xe?.intercept),C.control.value=Xe?.color??"#4472c4",w.control.value=Qe?.direction??"y",T.control.value=Qe?.barType??"both",k.control.value=Qe?.color??"#000000",A.control.checked=Qe?.noEndCap??false,P.control.value=Qe?.customPlus?.join(", ")??"",E.control.value=Qe?.customMinus?.join(", ")??"",M.control.value=De?.marker?.spPr?.fillColor??"#4472c4",I.control.value=De?.marker?.spPr?.strokeColor??"#000000";let Bt=De?.dataPoints?.find(({idx:Nt})=>Nt===q.selected());D.control.value=Bt?.marker?.symbol??"none",Se(L.control,Bt?.marker?.size),O.control.checked=Bt?.invertIfNegative??false;let _e=ne.axes?.[Te()];R.control.value=_e?.titleText??"",Se(F.control,_e?.minorUnit),H.control.checked=_e?.minorGridlines??false,V.control.value=_e?.numFmt?.formatCode??"",N.control.value=_e?.tickLblPos??"nextTo",B.control.value=_e?.spPr?.strokeColor??"#000000",$.control.value=_e?.fontColor??"#000000",Se(Y.control,_e?.fontSize);};return {el:i,update:Et}}function Fw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-filters",o.hidden=true;let r=e.createElement("h5");r.textContent=t("pptx.chart.chartFilters");let i=e.createElement("div");i.className="pptxv-chart-filters-visible";let s=e.createElement("div");s.className="pptxv-chart-filters-hidden";let a=e.createElement("div");a.className="pptxv-chart-filters-ranges",o.append(r,i,s,a);let l,p=true;function d(h){let C=l&&chunkWKWWFY2C_cjs.Tb(l,h);C&&n(C);}function u(h){let C=l&&chunkWKWWFY2C_cjs.Ub(l,h);C&&n(C);}function c(h,C,w){l&&n({...l,series:l.series.map((T,k)=>k===h?chunkWKWWFY2C_cjs.Vb(T,C,w):T)});}function x(h,C,w){let T=e.createElement("div");T.className=w?"pptxv-chart-filters-row is-filtered":"pptxv-chart-filters-row";let k=e.createElement("span");return k.className="pptxv-chart-filters-name",k.title=h,k.textContent=h,T.append(k,C),T}function b(h,C,w){let T=e.createElement("button");return T.type="button",T.dataset.testid=h,T.setAttribute("aria-label",C),T.title=C,T.textContent=C,T.disabled=!p,T.addEventListener("click",w),T}function g(h){i.replaceChildren(),!(h.series.length<=1)&&h.series.forEach((C,w)=>{let T=t("pptx.chart.hideSeries",{name:C.name}),k=b(`chart-series-hide-${w}`,T,()=>d(w));i.append(x(C.name,k,false));});}function v(h){s.replaceChildren(),(h.filteredSeries??[]).forEach((C,w)=>{let T=C.name??h.filteredSeriesTitle??t("pptx.chart.seriesShort"),k=t("pptx.chart.showSeries",{name:T}),A=b(`chart-series-show-${w}`,k,()=>u(w));s.append(x(T,A,true));});}function f(h){a.replaceChildren(),h.series.forEach((C,w)=>{let T=C.dataLabelOptions?.dataLabelsRange;if(!T)return;let k=e.createElement("div");k.className="pptxv-chart-filters-range";let A=e.createElement("div");A.className="pptxv-chart-filters-range-title",A.title=C.name,A.textContent=t("pptx.chart.valueFromCells",{name:C.name}),k.append(A),T.cache.forEach((P,E)=>{let M=e.createElement("label");M.className="pptxv-chart-filters-range-field";let I=e.createElement("span"),D=h.categories[E]??String(E);I.textContent=D;let L=e.createElement("input");L.type="text",L.value=P,L.disabled=!p,L.dataset.testid=`chart-dlbl-range-${w}-${E}`,L.setAttribute("aria-label",D),L.addEventListener("change",()=>c(w,E,L.value)),M.append(I,L),k.append(M);}),a.append(k);});}function y(h){l=h;let C=h.filteredSeries?.length??0,w=h.series.filter(T=>T.dataLabelOptions?.dataLabelsRange).length;if(o.hidden=C===0&&w===0&&h.series.length<=1,o.hidden){i.replaceChildren(),s.replaceChildren(),a.replaceChildren();return}g(h),v(h),f(h);}function S(){for(let h of o.querySelectorAll("button, input"))h.disabled=!p;}return {el:o,update:y,setEditable(h){p=h,S();}}}function Vw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-subtype";let r=Ve(e,t("pptx.chart.bar3DShapeLabel"),chunkWKWWFY2C_cjs.Yr,t);r.control.dataset.testid="pptx-chart-bar3d-shape";let i=Ve(e,t("pptx.chart.radarStyleLabel"),chunkWKWWFY2C_cjs.Zr,t);i.control.dataset.testid="pptx-chart-radar-style";let s=Ve(e,t("pptx.chart.surfaceWireframeLabel"),chunkWKWWFY2C_cjs._r,t);s.control.dataset.testid="pptx-chart-surface-wireframe",o.append(r.label,i.label,s.label);let a;return r.control.addEventListener("change",()=>{a&&n({...a,...chunkWKWWFY2C_cjs.$r(a,r.control.value)});}),i.control.addEventListener("change",()=>{a&&n({...a,...chunkWKWWFY2C_cjs.as(a,i.control.value)});}),s.control.addEventListener("change",()=>{a&&n({...a,...chunkWKWWFY2C_cjs.bs(a,s.control.value==="true")});}),{el:o,update:p=>{a=p,r.label.hidden=p.chartType!=="bar3D",i.label.hidden=p.chartType!=="radar",s.label.hidden=p.chartType!=="surface",r.control.value=p.barShape??"box",i.control.value=p.radarStyle??"standard",s.control.value=p.wireframe?"true":"false";}}}function it(e,t,n){let o=e.createElement("input");return o.type="number",o.step="0.01",o.min="0",o.max="1",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function zw(e,t,n,o,r){let i=e.createElement("input");return i.type="number",i.step=o,i.value=String(t),i.setAttribute("aria-label",n),i.addEventListener("change",()=>r(Number(i.value))),i}function us(e,t,n){let o=e.createElement("input");return o.type="number",o.value=String(t),o.addEventListener("change",()=>n(Number(o.value))),o}function xs(e,t,n,o){let r=e.createElement("input");return r.type="text",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function bs(e,t,n,o){let r=me(e);return r.checked=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.checked)),r}function gs(e,t,n,o){let r=e.createElement("input");return r.type="color",r.value=t,r.setAttribute("aria-label",n),r.addEventListener("change",()=>o(r.value)),r}function Pe(e,t,...n){let o=e.createElement("span");return o.textContent=t,[o,...n]}function Bw(e,t,n,o,r,i,s,a){let l=e.createElement("div");l.className="pptxv-chart-usershape-anchor";let p=()=>Pe(e,t("pptx.chart.userShapeRotation"),zw(e,n.rotation??0,t("pptx.chart.userShapeRotation"),"1",c=>s(n.path,c||void 0))),d=()=>[...Pe(e,t("pptx.arrange.flipHorizontally"),bs(e,n.flipH??false,t("pptx.arrange.flipHorizontally"),c=>a(n.path,{flipH:c}))),...Pe(e,t("pptx.arrange.flipVertically"),bs(e,n.flipV??false,t("pptx.arrange.flipVertically"),c=>a(n.path,{flipV:c})))];if(n.depth===0){let c=n.from;if(l.append(...Pe(e,t("pptx.chart.userShapeFrom"),it(e,c.x,x=>r(n.path,{from:{...c,x}})),it(e,c.y,x=>r(n.path,{from:{...c,y:x}})))),n.anchor==="rel"&&n.to){let x=n.to;l.append(...Pe(e,t("pptx.chart.userShapeTo"),it(e,x.x,b=>r(n.path,{to:{...x,x:b}})),it(e,x.y,b=>r(n.path,{to:{...x,y:b}}))));}if(n.anchor==="abs"&&n.ext){let x=n.ext;l.append(...Pe(e,t("pptx.chart.userShapeSize"),us(e,x.cx,b=>r(n.path,{ext:{...x,cx:b}})),us(e,x.cy,b=>r(n.path,{ext:{...x,cy:b}}))));}return l.append(...p(),...d()),l}let u=chunkWKWWFY2C_cjs.hc(o?.userShapes,n.path);return u&&l.append(...Pe(e,t("pptx.chart.userShapeFrom"),it(e,u.from.x,c=>i(n.path,{from:{...u.from,x:c},to:u.to})),it(e,u.from.y,c=>i(n.path,{from:{...u.from,y:c},to:u.to}))),...Pe(e,t("pptx.chart.userShapeTo"),it(e,u.to.x,c=>i(n.path,{from:u.from,to:{...u.to,x:c}})),it(e,u.to.y,c=>i(n.path,{from:u.from,to:{...u.to,y:c}}))),...p(),...d()),l}function Nw(e,t,n){let o=e.createElement("div");o.className="pptxv-chart-usershapes";let r=e.createElement("h5");r.textContent=t("pptx.chart.userShapes");let i=e.createElement("button");i.type="button",i.dataset.testid="chart-user-shape-add",i.textContent=t("pptx.chart.userShapeAddTextBox");let s=e.createElement("div");s.className="pptxv-chart-usershapes-header",s.append(r,i);let a=e.createElement("p");a.className="pptxv-chart-usershapes-empty",a.textContent=t("pptx.chart.userShapesEmpty");let l=e.createElement("div");l.className="pptxv-chart-usershapes-list",o.append(s,a,l);let p;i.addEventListener("click",()=>{p&&n({userShapes:chunkWKWWFY2C_cjs.ac(p.userShapes,chunkWKWWFY2C_cjs.$b())});});function d(S,h){p&&n({userShapes:chunkWKWWFY2C_cjs.cc(p.userShapes,S,h)});}function u(S,h){p&&n({userShapes:chunkWKWWFY2C_cjs.ec(p.userShapes,S,h)});}function c(S){p&&n({userShapes:chunkWKWWFY2C_cjs.dc(p.userShapes,S)});}function x(S,h){p&&n({userShapes:chunkWKWWFY2C_cjs.ic(p.userShapes,S,h)});}function b(S,h){p&&n({userShapes:chunkWKWWFY2C_cjs.fc(p.userShapes,S,h)});}function g(S,h){p&&n({userShapes:chunkWKWWFY2C_cjs.gc(p.userShapes,S,h)});}function v(S){if(!p)return;let h=chunkWKWWFY2C_cjs.jc(p.userShapes,S);h&&n({userShapes:chunkWKWWFY2C_cjs.lc(p.userShapes,S,chunkWKWWFY2C_cjs.kc(h))});}function f(S){let h=e.createElement("div");h.className="pptxv-chart-usershape-row",h.dataset.testid="chart-user-shape-row",h.dataset.chartUserShapePath=S.path.join(","),h.style.marginLeft=`${S.depth*12}px`;let C=e.createElement("span"),w=`pptx.chart.userShapeKind${S.kind.charAt(0).toUpperCase()}${S.kind.slice(1)}`;C.textContent=S.text?`${t(w)} - ${S.text}`:t(w);let T=e.createElement("button");T.type="button",T.dataset.testid="chart-user-shape-delete",T.setAttribute("aria-label",t("pptx.chart.userShapeDelete")),T.textContent="\u2715",T.addEventListener("click",()=>c(S.path));let k=e.createElement("div");if(k.className="pptxv-chart-usershape-top",k.append(C),S.isGroup){let A=e.createElement("button");A.type="button",A.dataset.testid="chart-user-shape-add-into-group",A.textContent=t("pptx.chart.userShapeAddIntoGroup"),A.addEventListener("click",()=>v(S.path)),k.append(A);}if(k.append(T),h.append(k),S.editableVisuals){let A=e.createElement("div");A.className="pptxv-chart-usershape-text",A.append(...Pe(e,t("pptx.chart.userShapeText"),xs(e,S.text??"",t("pptx.chart.userShapeText"),E=>u(S.path,E)))),h.append(A);let P=e.createElement("div");P.className="pptxv-chart-usershape-colors",P.append(...Pe(e,t("pptx.chart.userShapeFill"),gs(e,S.fill??"#ffffff",t("pptx.chart.userShapeFill"),E=>d(S.path,{fill:E}))),...Pe(e,t("pptx.chart.userShapeStroke"),gs(e,S.stroke??"#000000",t("pptx.chart.userShapeStroke"),E=>d(S.path,{stroke:E})))),h.append(P);}if(S.editableAltText){let A=e.createElement("div");A.className="pptxv-chart-usershape-alt-text",A.append(...Pe(e,t("pptx.chart.userShapeAltText"),xs(e,S.altText??"",t("pptx.chart.userShapeAltText"),P=>d(S.path,{altText:P})))),h.append(A);}return h.append(Bw(e,t,S,p,d,x,b,g)),h}function y(S){p=S,l.replaceChildren();let h=chunkWKWWFY2C_cjs.bc(S.userShapes);a.hidden=h.length>0;for(let C of h)l.append(f(C));}return {el:o,update:y}}var DI=chunkWKWWFY2C_cjs.sb.map(e=>e.value),RI=["clustered","stacked","percentStacked"];function Gw(e,t,n,o){let r=n(t("pptx.chart.data")),i=Uw(e,"text",t("pptx.chart.title")),s=nt(e,t("pptx.chart.type"),DI,chunkWKWWFY2C_cjs.Eb,t),a=nt(e,t("pptx.chart.grouping"),RI,chunkWKWWFY2C_cjs.Fb,t),l=Rw(e,t,S=>o.setChartData(S),()=>o.getChartFollowDataPoint()),p=_w(e,t("pptx.chart.showLegend")),d=_w(e,t("pptx.chart.dataLabels")),u=no(e,t),c=Dw(e,t,S=>o.setChartData(S),u,o.pushRecentColor),x=Hw(e,t,S=>o.setChartData(S),u,o.pushRecentColor),b=Vw(e,t,S=>o.setChartData(S)),g=Fw(e,t,S=>o.setChartData(S)),v=Nw(e,t,S=>{f&&o.setChartData({...f,...S});});r.append(i.label,s.label,a.label,l.el,p.label,d.label,c.el,g.el,b.el,x.el,v.el);let f,y=()=>{if(!f)return;let S=s.control.value,h=S===f.chartType?f:chunkWKWWFY2C_cjs.zb(f,{chartType:S});o.setChartData({...h,...chunkWKWWFY2C_cjs.la(h,i.control.value),grouping:a.control.value,style:{...h.style,hasTitle:i.control.value.trim().length>0,hasLegend:p.control.checked,...d.control.checked!==(h.style?.hasDataLabels??false)?chunkWKWWFY2C_cjs.Xb(h.style,d.control.checked):{hasDataLabels:d.control.checked}}});};for(let S of [i.control,s.control,a.control,p.control,d.control])S.addEventListener("change",y);return {el:r,update(S){r.hidden=!S.isChart,f=S.chartData,f&&(i.control.value=f.title??"",s.control.value=chunkWKWWFY2C_cjs.ta(f),a.control.value=f.grouping??"clustered",S.chartHighlightCell?.pointIndex!==void 0&&u.setSelected(S.chartHighlightCell.pointIndex),l.update(f,S.chartHighlightCell??null),p.control.checked=f.style?.hasLegend??false,d.control.checked=f.style?.hasDataLabels??false,c.update(f),g.update(f),b.update(f),x.update(f),v.update(f));},setEditable(S){g.setEditable(S);}}}function Uw(e,t,n){let o=e.createElement("label");o.textContent=n;let r=t==="checkbox"?me(e):e.createElement("input");return t!=="checkbox"&&(r.type=t),o.appendChild(r),{label:o,control:r}}function _w(e,t){return Uw(e,"checkbox",t)}function zr(e,t){let n=new Set(e.map(r=>r.id)),o=t.filter(r=>!n.has(r.id)).map(r=>({id:r.id,name:r.name,userId:"",providerId:""}));return [...e,...o]}function ro(e){let{doc:t,t:n,field:o}=e,r=chunk6TALMZ42_cjs.w(t,"div","pptxv-comment-mention-suggestions");r.dataset.testid="pptx-comment-mention-suggestions",r.hidden=true,r.setAttribute("role","listbox"),r.setAttribute("aria-label",n("pptx.comments.mentionSuggestions")),r.title=n("pptx.comments.mentionPlaceholder");let i=[],s=0,a=()=>{r.hidden=true,r.replaceChildren(),i=[];},l=b=>{let g=o.selectionStart??o.value.length,v=chunkWKWWFY2C_cjs.bn(o.value,e.getMentions(),g,b);o.value=v.text,o.setSelectionRange(v.caret,v.caret),e.onChange({text:v.text,mentions:v.mentions}),a(),o.focus();},p=()=>{r.replaceChildren(),i.forEach((b,g)=>{let v=chunk6TALMZ42_cjs.w(t,"button","pptxv-comment-mention-option");v.type="button",v.dataset.testid="pptx-comment-mention-option",v.setAttribute("role","option"),v.setAttribute("aria-selected",String(g===s)),v.classList.toggle("is-active",g===s),v.textContent=b.name,v.addEventListener("mousedown",f=>{f.preventDefault(),l(b);}),r.appendChild(v);}),r.hidden=i.length===0;},d=()=>{let b=o.selectionStart??o.value.length,g=chunkWKWWFY2C_cjs.$m(o.value,b);if(!g){a();return}i=chunkWKWWFY2C_cjs.an([...e.getAuthors()],g.query),s=0,p();},u=()=>d(),c=b=>{if(!(r.hidden||i.length===0))if(b.key==="ArrowDown")b.preventDefault(),s=(s+1)%i.length,p();else if(b.key==="ArrowUp")b.preventDefault(),s=(s-1+i.length)%i.length,p();else if(b.key==="Enter"||b.key==="Tab"){let g=i[s];g&&(b.preventDefault(),l(g));}else b.key==="Escape"&&(b.preventDefault(),a());},x=()=>a();return o.addEventListener("input",u),o.addEventListener("keydown",c),o.addEventListener("blur",x),{el:r,destroy(){o.removeEventListener("input",u),o.removeEventListener("keydown",c),o.removeEventListener("blur",x);}}}function Kw(e,t,n){e.textContent="";let o=e.ownerDocument,r=chunkWKWWFY2C_cjs._m(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 s=o.createElement("span");s.className=chunkWKWWFY2C_cjs.Zm,s.setAttribute(chunkWKWWFY2C_cjs.Ym,i.personId||""),i.authorName&&(s.title=i.authorName),s.textContent=i.text,e.appendChild(s);}return e}function Br(e,t,n,o=()=>[]){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-list"),i=null,s="",a=null,l="",p=[],d=new Set,u=[],c=false,x=()=>{r.replaceChildren(...u.map(C=>h(C,c,0)));},b=(C,w)=>{let T=chunk6TALMZ42_cjs.w(e,"button","pptxv-inspector-comment-action");return T.type="button",T.textContent=C,T.addEventListener("click",w),T},g=(C,w,T)=>{let k=e.createElement("textarea");return k.className="pptxv-inspector-comment-input",k.rows=2,k.value=C,k.placeholder=w,k.addEventListener("input",()=>T(k.value)),k},v=C=>{let w=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-edit"),T=g(s,"",A=>{s=A;});T.setAttribute("aria-label",t("pptx.comments.edit"));let k=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-actions");return k.append(b(t("pptx.comments.save"),()=>{s.trim()&&n.editComment(C.id,s.trim()),i=null,x();}),b(t("pptx.comments.cancel"),()=>{i=null,x();})),w.append(T,k),w},f=C=>{let w=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-reply-form"),T=g(l,t("pptx.comments.replyPlaceholder",{author:C.author||t("pptx.comments.unknownAuthor")}),P=>{l=P;});T.setAttribute("aria-label",t("pptx.comments.reply"));let k=ro({doc:e,t,field:T,getAuthors:o,getMentions:()=>p,onChange:P=>{l=P.text,p=P.mentions;}}),A=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-actions");return A.append(b(t("pptx.comments.addReply"),()=>{l.trim()&&n.addCommentReply(C.id,l.trim(),p),k.destroy(),a=null,l="",p=[],x();}),b(t("pptx.comments.cancel"),()=>{k.destroy(),a=null,x();})),w.append(T,k.el,A),w},y=(C,w)=>{let T=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-actions");return T.appendChild(b(t("pptx.comments.edit"),()=>{i=C.id,s=C.text,x();})),w===0&&T.appendChild(b(t("pptx.comments.reply"),()=>{a=C.id,l="",p=[],x();})),T.append(b(t(C.resolved?"pptx.comments.unresolve":"pptx.comments.resolve"),()=>n.toggleCommentResolved(C.id)),b(t("pptx.comments.delete"),()=>n.deleteComment(C.id))),T},S=(C,w,T)=>{let k=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-replies-wrap"),A=C.replies??[],P=chunk6TALMZ42_cjs.w(e,"button","pptxv-inspector-comment-replies-toggle");if(P.type="button",P.textContent=t("pptx.comments.repliesCount",{count:A.length}),P.setAttribute("aria-expanded",String(!d.has(C.id))),P.addEventListener("click",()=>{d.has(C.id)?d.delete(C.id):d.add(C.id),x();}),k.appendChild(P),!d.has(C.id)){let E=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-replies");E.append(...A.map(M=>h(M,w,T+1))),k.appendChild(E);}return k};function h(C,w,T){let k=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment");k.classList.toggle("is-resolved",C.resolved===true),k.classList.toggle("is-reply",T>0);let A=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-meta");if(A.textContent=C.author||t("pptx.comments.unknownAuthor"),C.resolved){let P=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-comment-badge");P.textContent=t("pptx.comments.resolved"),A.appendChild(P);}if(k.appendChild(A),i===C.id)k.appendChild(v(C));else {let P=chunk6TALMZ42_cjs.w(e,"p","pptxv-inspector-comment-text");Kw(P,C.text,C.mentions),k.appendChild(P),w&&k.appendChild(y(C,T));}return (C.replies??[]).length>0&&k.appendChild(S(C,w,T)),a===C.id&&k.appendChild(f(C)),k}return {el:r,update(C,w){u=C,c=w,x();}}}function Ww(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comments"),r=[],i=Br(e,t,n,()=>r);o.appendChild(i.el);let s=chunk6TALMZ42_cjs.w(e,"p","pptxv-inspector-empty");s.textContent=t("pptx.comments.noComments"),o.appendChild(s);let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-comment-add"),l=e.createElement("textarea");l.className="pptxv-inspector-comment-input",l.rows=2,l.placeholder=t("pptx.comments.addCommentPlaceholder"),l.setAttribute("aria-label",t("pptx.comments.addComment"));let p=[],d=ro({doc:e,t,field:l,getAuthors:()=>r,getMentions:()=>p,onChange:c=>{l.value=c.text,p=c.mentions;}}),u=chunk6TALMZ42_cjs.w(e,"button","pptxv-inspector-deck-btn");return u.type="button",u.textContent=t("pptx.comments.addComment"),u.addEventListener("click",()=>{let c=l.value.trim();c&&(n.addComment(c,p),l.value="",p=[]);}),a.append(l,d.el,u),o.appendChild(a),{el:o,update(c){r=c.commentMentionAuthors,s.hidden=c.comments.length>0,a.hidden=!c.editable,i.update(c.comments,c.editable);}}}function Ce(e,t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-section");n.dataset.pptxChrome="inspector-card";let o=chunk6TALMZ42_cjs.w(e,"h4","pptxv-inspector-section-title");o.textContent=t,o.dataset.pptxChrome="inspector-heading",n.appendChild(o);let r=chunk6TALMZ42_cjs.w(e,"div");return n.appendChild(r),{el:n,body:r}}function vt(e,t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-row"),o=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-label");o.textContent=t;let r=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-value");return n.append(o,r),{el:n,value:r}}function Dt(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"button","pptxv-inspector-deck-btn");return o.type="button",o.textContent=t,o.addEventListener("click",n),o}function $w(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.slideInspector.presentation"));o.classList.add("pptx-editor-presentation-card"),r.dataset.pptxChrome="presentation-fields";let i,s=fe(e,{label:t("pptx.presentationSettings.showType"),webComponent:true,options:[{value:"presented",label:t("pptx.presentationSettings.showTypePresented")},{value:"browsed",label:t("pptx.presentationSettings.showTypeBrowsed")},{value:"kiosk",label:t("pptx.presentationSettings.showTypeKiosk")}],onChange:x=>n.updatePresentationSettings({showType:x})}),a=oe(e,{label:t("pptx.presentationSettings.loopContinuously"),webComponent:true,onChange:x=>n.updatePresentationSettings({loopContinuously:x})}),l=oe(e,{label:t("pptx.presentationSettings.showNarration"),webComponent:true,onChange:x=>n.updatePresentationSettings({showWithNarration:x})}),p=oe(e,{label:t("pptx.presentationSettings.showAnimation"),webComponent:true,onChange:x=>n.updatePresentationSettings({showWithAnimation:x})}),d=oe(e,{label:t("pptx.presentationSettings.frameSlides"),webComponent:true,onChange:x=>n.updatePresentationSettings({printProperties:chunkWKWWFY2C_cjs.dk(i,x)})}),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 x=Number.parseInt(u.value,10);Number.isFinite(x)&&n.updatePresentationSettings({printProperties:chunkWKWWFY2C_cjs.ek(i,x)});});let c=vt(e,t("pptx.presentationSettings.slidesPerPage"));return c.value.appendChild(u),r.append(s.el,a.el,l.el,p.el,d.el,c.el),{el:o,update(x){let b=x.presentationProperties;i=b.printProperties,s.setValue(b.showType??"presented"),a.setValue(!!b.loopContinuously),l.setValue(b.showWithNarration!==false),p.setValue(b.showWithAnimation!==false),d.setValue(chunkWKWWFY2C_cjs.ck(b.printProperties)),e.activeElement!==u&&(u.value=String(chunkWKWWFY2C_cjs.bk(b.printProperties)));for(let g of [s,a,l,p,d])g.setDisabled(!x.editable);u.disabled=!x.editable;}}}function qw(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-slide-size-rescale");o.hidden=true,o.setAttribute("role","group"),o.setAttribute("aria-label",t("pptx.slideSize.rescaleTitle"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-slide-size-rescale-title");r.textContent=t("pptx.slideSize.rescaleTitle");let i=chunk6TALMZ42_cjs.w(e,"p","pptxv-slide-size-rescale-description");i.textContent=t("pptx.slideSize.rescaleDescription");let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-slide-size-rescale-buttons");function a(l,p,d,u){let c=chunk6TALMZ42_cjs.w(e,"button","pptxv-slide-size-rescale-btn");return c.type="button",c.dataset.testid=l,c.title=t(d),c.textContent=t(p),c.addEventListener("click",()=>n(u)),c}return s.append(a("pptx-slide-size-rescale-maximize","pptx.slideSize.rescaleMaximize","pptx.slideSize.rescaleMaximizeHint","maximize"),a("pptx-slide-size-rescale-ensure-fit","pptx.slideSize.rescaleEnsureFit","pptx.slideSize.rescaleEnsureFitHint","ensureFit")),o.append(r,i,s),{el:o,show(){o.hidden=false;},hide(){o.hidden=true;}}}var jw="__custom__";function OI(e,t){return e.widthEmu!==t.widthEmu||e.heightEmu!==t.heightEmu}var HI=[["landscape","pptx.slideSize.landscape"],["portrait","pptx.slideSize.portrait"]];function Yw(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.slideSize.title")),i=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-select"),s=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");s.textContent=t("pptx.slideSize.presets");let a=Q(e);a.className="pptxv-field-select-input",a.dataset.pptxSlideSizePreset="true",a.setAttribute("aria-label",t("pptx.slideSize.presets"));let l=e.createElement("option");l.value=jw,l.textContent=t("pptx.slideSize.customSize"),l.hidden=true,a.appendChild(l);for(let h of chunkWKWWFY2C_cjs.Wi){let C=e.createElement("option");C.value=h.labelKey,C.textContent=t(`pptx.slideSize.preset.${h.labelKey}`),a.appendChild(C);}i.append(s,a),r.appendChild(i);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-slide-size-orientation");p.setAttribute("role","group"),p.setAttribute("aria-label",t("pptx.slideSize.orientation"));let d=HI.map(([h,C])=>{let w=chunk6TALMZ42_cjs.w(e,"button");return w.type="button",w.dataset.pptxSlideSizeOrientation=h,w.textContent=t(C),p.appendChild(w),{value:h,button:w}});r.appendChild(p);let u=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(u);let c={width:0,height:0},x=re(e,{label:"W",min:1,onCommit:h=>n.updateCanvasSize({width:h,height:c.height})}),b=re(e,{label:"H",min:1,onCommit:h=>n.updateCanvasSize({width:c.width,height:h})});u.append(x.el,b.el);let g,v=qw(e,t,h=>{g&&n.applySlideSizeRescale(g,h),g=void 0,v.hide();});r.appendChild(v.el);let f=chunkWKWWFY2C_cjs._i({current:void 0,canvas:{width:1,height:1}}),y=false;function S(h){if(!y||!OI(h,f.size)){n.updateSlideSize(h);return}g=h,v.show();}return a.addEventListener("change",()=>{let h=chunkWKWWFY2C_cjs.Wi.find(C=>C.labelKey===a.value);h&&S(chunkWKWWFY2C_cjs.Yi(h,f.orientation));}),d.forEach(({value:h,button:C})=>{C.addEventListener("click",()=>S(chunkWKWWFY2C_cjs.Xi(f.size,h)));}),{el:o,update(h){c=h.canvasSize,f=chunkWKWWFY2C_cjs._i({current:h.slideSize,canvas:h.canvasSize}),y=h.hasDeckElements,l.hidden=f.preset!==void 0,a.value=f.preset?.labelKey??jw,a.disabled=!h.editable;for(let{value:C,button:w}of d){let T=f.orientation===C;w.classList.toggle("is-active",T),w.setAttribute("aria-pressed",String(T)),w.disabled=!h.editable;}x.setValue(h.canvasSize.width),b.setValue(h.canvasSize.height),x.setDisabled(!h.editable),b.setDisabled(!h.editable),g&&!h.editable&&(g=void 0,v.hide());}}}var fs={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 Xw(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.documentProperties.themeHeading")),i=Q(e);i.className="pptxv-field-select-input pptxv-inspector-theme-select",i.setAttribute("aria-label",t("pptx.documentProperties.themeHeading")),r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-deck-btn-row"),a=Dt(e,t("pptx.documentProperties.applyFirstMaster"),()=>n.applyThemeByPath(i.value,false)),l=Dt(e,t("pptx.documentProperties.applyAllMasters"),()=>n.applyThemeByPath(i.value,true));s.append(a,l),r.appendChild(s);let p="";return {el:o,update(d){let u=d.themeOptions.map(x=>x.path).join(`
|
|
2
|
+
`);if(u!==p){p=u;let x=i.value;if(i.replaceChildren(),d.themeOptions.length===0){let b=e.createElement("option");b.value="",b.textContent=t("pptx.documentProperties.noThemesOption"),i.appendChild(b);}else {for(let b of d.themeOptions){let g=e.createElement("option");g.value=b.path,g.textContent=b.name||b.path.split("/").pop()||b.path,i.appendChild(g);}d.themeOptions.some(b=>b.path===x)&&(i.value=x);}}i.disabled=d.themeOptions.length===0;let c=!d.editable||!i.value;a.disabled=c,l.disabled=c;}}}function Qw(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.themeOverride.heading")),i,s=c=>{let x=i?.activeSlide;if(!x)return;if(!i?.colorScheme){n.updateActiveSlide({clrMapOverride:c});return}let b=chunkWKWWFY2C_cjs.T(x,i.colorScheme,c);n.updateActiveSlide({clrMapOverride:b.clrMapOverride,backgroundColor:b.backgroundColor,elements:b.elements});},a=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-checkbox"),l=me(e);l.setAttribute("aria-label",t("pptx.themeOverride.enableOverride")),l.addEventListener("change",()=>{l.checked?s({...chunkWKWWFY2C_cjs.K}):s(void 0);});let p=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.themeOverride.enableOverride"),a.append(l,p),r.appendChild(a);let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-override-rows");r.appendChild(d);let u=(c,x,b)=>{let g=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-override-row"),v=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-label");v.textContent=fs[c],v.title=fs[c];let f=x[c]??chunkWKWWFY2C_cjs.K[c],y=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-override-swatch"),S=i?.colorScheme?.[f];typeof S=="string"&&S&&(y.style.backgroundColor=`#${S.replace(/^#/u,"")}`);let h=Q(e);h.className="pptxv-field-select-input",h.setAttribute("aria-label",fs[c]);for(let C of chunkWKWWFY2C_cjs.g){let w=e.createElement("option");w.value=C,w.textContent=chunkWKWWFY2C_cjs.Ab(chunkWKWWFY2C_cjs.Bb,C,t),h.appendChild(w);}return h.value=f,h.disabled=!b,h.addEventListener("change",()=>{let C={...x,[c]:h.value};for(let w of chunkWKWWFY2C_cjs.J)C[w]||(C[w]=chunkWKWWFY2C_cjs.K[w]);s(C);}),g.append(v,y,h),g};return {el:o,update(c){i=c,o.hidden=!c.activeSlide;let x=c.activeSlide?.clrMapOverride;if(l.checked=x!==void 0,l.disabled=!c.editable,d.replaceChildren(),x)for(let b of chunkWKWWFY2C_cjs.J)d.appendChild(u(b,x,c.editable));}}}function Zw(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.slideBackground.templateBackgroundsHeading"));function i(s,a){let l=chunk6TALMZ42_cjs.w(e,"label","pptxv-inspector-row"),p=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=a,p.title=s.title;let d=e.createElement("input");d.type="color",d.value=chunkWKWWFY2C_cjs.ia(n.getTemplateBackgroundColor(s.path),"#ffffff"),d.addEventListener("change",()=>{n.setTemplateBackground(s.path,d.value),n.pushRecentColor(d.value);});let u=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-value");return u.textContent=s.label,l.append(p,d,u),l}return {el:o,update(s){let a=s.editTemplateMode&&s.activeSlide?chunkWKWWFY2C_cjs.Vn(s.activeSlide,s.slideMasters,t("pptx.master.layout"),t("pptx.master.master")):{};o.hidden=!a.layout&&!a.master,r.replaceChildren(),a.layout&&r.appendChild(i(a.layout,t("pptx.master.layout"))),a.master&&r.appendChild(i(a.master,t("pptx.master.master")));}}}function Jw(e,t){chunkLQYP7D76_cjs.a(e);let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-preview"),o=chunk6TALMZ42_cjs.w(e,"span","pptxv-transition-preview-label");o.textContent=t("pptx.transition.preview");let r=chunk6TALMZ42_cjs.w(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=chunk6TALMZ42_cjs.w(e,"span","pptxv-transition-preview-layer is-incoming");i.textContent="B";let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-transition-preview-layer is-outgoing");s.textContent="A",r.append(i,s),n.append(o,r);let a,l,p=()=>{i.style.animation="",s.style.animation="";},d=()=>{if(!a)return;let u=a.durationMs??500,c=chunkWKWWFY2C_cjs.Th(a.type,u,a.direction,a.orient,a.spokes,a.pattern);s.style.zIndex=c.outgoingOnTop?"2":"0",p(),r.offsetWidth,i.style.animation=c.incoming!=="none"?c.incoming:"",s.style.animation=c.outgoing!=="none"?c.outgoing:`pptx-tr-fade-out ${u}ms ease-in-out forwards`,clearTimeout(l),l=setTimeout(p,u+100);};return r.addEventListener("click",d),{el:n,update(u){a=u;let c=!!u&&u?.type!=="none"&&u?.type!=="cut";n.hidden=!c,c||(clearTimeout(l),p());}}}function eE(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.slideInspector.slideTransition")),i,s=false,a=E=>{let M={...i,...E};i=M,n.updateActiveSlide({transition:M});},l=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-select"),p=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");p.textContent=t("pptx.transition.type");let d=Q(e);d.className="pptxv-field-select-input",d.setAttribute("aria-label",t("pptx.transition.type"));for(let E of chunkWKWWFY2C_cjs.Wh){let M=e.createElement("option");M.value=E.value,M.textContent=t(E.i18nKey),d.appendChild(M);}d.addEventListener("change",()=>a({type:d.value})),l.append(p,d);let u=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-select"),c=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");c.textContent=t("pptx.transition.speed");let x=Q(e);x.className="pptxv-field-select-input",x.setAttribute("aria-label",t("pptx.transition.speed"));for(let E of chunkWKWWFY2C_cjs.Xh){let M=e.createElement("option");M.value=E.value,M.textContent=t(E.i18nKey),x.appendChild(M);}x.addEventListener("change",()=>a({speed:x.value})),u.append(c,x);let b=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-field-select"),g=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");g.textContent=t("pptx.transition.morphOption");let v=Q(e);v.className="pptxv-field-select-input",v.setAttribute("aria-label",t("pptx.transition.morphOption"));for(let E of chunkWKWWFY2C_cjs.Yh){let M=e.createElement("option");M.value=E.value,M.textContent=t(E.i18nKey),v.appendChild(M);}v.addEventListener("change",()=>a({morphOption:v.value})),b.append(g,v);let f=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-directions"),y=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-directions"),S=oe(e,{label:t("pptx.transition.thruBlk"),onChange:E=>a({thruBlk:E})}),h=re(e,{label:t("pptx.transition.duration"),min:0,max:1e4,step:10,onCommit:E=>a({durationMs:Math.max(0,Math.min(1e4,Math.round(E)))})}),C=re(e,{label:t("pptx.transition.spokes"),min:1,max:8,onCommit:E=>a({spokes:Math.max(1,Math.min(8,Math.round(E)))})}),w=oe(e,{label:t("pptx.transition.advanceOnClick"),onChange:E=>a({advanceOnClick:E})}),T=chunk6TALMZ42_cjs.w(e,"p","pptxv-transition-sound"),k=Jw(e,t);r.append(l,f,y,S.el,C.el,h.el,u,b,w.el,T,k.el);let A=E=>{f.textContent="";let M=chunkWKWWFY2C_cjs.a[E];if(!M||M.length===0){f.hidden=true;return}f.hidden=false;let I=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label"),D=chunkWKWWFY2C_cjs.Zh.has(E);I.textContent=t(D?"pptx.transition.orientation":"pptx.transition.direction"),f.appendChild(I);let L=(H,V)=>{let N=chunk6TALMZ42_cjs.w(e,"button","pptxv-transition-dir");N.type="button",N.textContent=V;let B=t(`pptx.transition.dir.${H}`);return N.title=B,N.setAttribute("aria-label",B),N.classList.toggle("is-active",(i?.direction??i?.orient)===H),N.disabled=!s,N.addEventListener("click",()=>a(D?{orient:H}:{direction:H})),N};if(D){let H=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-dir-row");for(let V of ["horz","vert"])H.appendChild(L(V,chunkWKWWFY2C_cjs._h[V]??V));f.appendChild(H);return}let O=chunkWKWWFY2C_cjs.$h(M);if(O.some(H=>H.some(Boolean))){let H=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-dir-grid");for(let V of O)for(let N of V)N===null?H.appendChild(chunk6TALMZ42_cjs.w(e,"span","pptxv-transition-dir-gap")):H.appendChild(L(N,chunkWKWWFY2C_cjs._h[N]??N));f.appendChild(H);return}let F=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-dir-row");for(let H of M)F.appendChild(L(H,chunkWKWWFY2C_cjs._h[H]??H));f.appendChild(F);},P=E=>{y.textContent="";let M=chunkWKWWFY2C_cjs.b[E];if(!M||M.length===0){y.hidden=true;return}y.hidden=false;let I=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");I.textContent=t("pptx.transition.pattern"),y.appendChild(I);let D=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-dir-row");for(let L of M){let O=chunk6TALMZ42_cjs.w(e,"button","pptxv-transition-pattern-btn");O.type="button",O.textContent=t(`pptx.transition.pattern.${L}`),O.classList.toggle("is-active",(i?.pattern??M[0])===L),O.disabled=!s,O.addEventListener("click",()=>a({pattern:L})),D.appendChild(O);}y.appendChild(D);};return {el:o,update(E){s=E.editable,i=E.activeSlide?.transition,o.hidden=!E.activeSlide;let M=i?.type??"none";d.value=M,d.disabled=!E.editable,A(M),P(M),S.el.hidden=!chunkWKWWFY2C_cjs.c.has(M),S.setValue(i?.thruBlk===true),S.setDisabled(!E.editable),C.el.hidden=M!=="wheel",C.setValue(i?.spokes??4),C.setDisabled(!E.editable),h.setValue(Math.round(i?.durationMs??320)),h.setDisabled(!E.editable),x.value=i?.speed??"fast",x.disabled=!E.editable,b.hidden=M!=="morph",v.value=i?.morphOption??"byObject",v.disabled=!E.editable,w.setValue(i?.advanceOnClick!==false),w.setDisabled(!E.editable),T.hidden=!i?.soundFileName,T.textContent=i?.soundFileName?`${t("pptx.transition.sound")}: ${i.soundFileName}`:"",k.update(i);}}}function tE(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.tags.title")),i=chunk6TALMZ42_cjs.w(e,"button","pptxv-tags-toggle");i.type="button";let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-tags-toggle-label"),a=chunk6TALMZ42_cjs.w(e,"span","pptxv-tags-count");i.append(s,a);let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-tags-list"),p=chunk6TALMZ42_cjs.w(e,"p","pptxv-tags-empty");p.textContent=t("pptx.tags.noTags");let d=Dt(e,t("pptx.tags.addTag"),()=>n.updateTagCollections(chunkWKWWFY2C_cjs.nm(u)));r.append(i,l,p,d);let u=[],c=true,x=false,b=(f,y,S)=>{let h=e.createElement("input");return h.type="text",h.className="pptxv-tags-input",h.value=f,h.placeholder=y,h.setAttribute("aria-label",y),h.disabled=!x,h.addEventListener("change",()=>S(h.value)),h.addEventListener("keydown",C=>C.stopPropagation()),h},g=f=>{let y=chunk6TALMZ42_cjs.w(e,"div","pptxv-tags-row");if(y.append(b(f.name,t("pptx.tags.name"),S=>n.updateTagCollections(chunkWKWWFY2C_cjs.lm(u,f.colIdx,f.tagIdx,"name",S))),b(f.value,t("pptx.tags.value"),S=>n.updateTagCollections(chunkWKWWFY2C_cjs.lm(u,f.colIdx,f.tagIdx,"value",S)))),x){let S=chunk6TALMZ42_cjs.w(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(chunkWKWWFY2C_cjs.mm(u,f.colIdx,f.tagIdx))),y.appendChild(S);}return y},v=()=>{let f=chunkWKWWFY2C_cjs.km(u);a.textContent=String(f.length),s.textContent=`${c?"\u25B8":"\u25BE"} ${t("pptx.tags.title")}`,i.setAttribute("aria-expanded",String(!c)),l.hidden=c||f.length===0,p.hidden=c||f.length>0,d.hidden=c||!x,d.disabled=!x,!c&&(l.textContent="",l.append(...f.map(g)));};return i.addEventListener("click",()=>{c=!c,v();}),{el:o,update(f){u=f.tagCollections,x=f.editable,v();}}}function FI(e,t){let{el:n,body:o}=Ce(e,t("pptx.documentProperties.notesHandoutHeading")),r=vt(e,t("pptx.documentProperties.notesSize")),i=vt(e,t("pptx.master.notesMasterTitle")),s=vt(e,t("pptx.master.handoutMasterTitle"));o.append(r.el,i.el,s.el);let a=t("pptx.digitalSignatures.notAvailable"),l=p=>p===void 0?a:`${p} ${t("pptx.notesMaster.placeholders")}`;return {el:n,update(p){r.value.textContent=p.notesCanvasSize?`${p.notesCanvasSize.width} \xD7 ${p.notesCanvasSize.height}px`:a,i.value.textContent=l(p.notesPlaceholderCount),s.value.textContent=l(p.handoutPlaceholderCount);}}}function VI(e,t,n){let{el:o,body:r}=Ce(e,t("pptx.documentProperties.documentHeading")),i=vt(e,t("pptx.properties.titleLabel")),s=vt(e,t("pptx.properties.author")),a=Dt(e,t("pptx.ribbon.documentProperties"),()=>n.openDocumentProperties());return r.append(i.el,s.el,a),{el:o,update(l){i.value.textContent=l.docTitle||"-",s.value.textContent=l.docAuthor||"-";}}}function oE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-deck");o.dataset.pptxChrome="deck-properties";let r=[$w(e,t,n),Xw(e,t,n),Qw(e,t,n),Yw(e,t,n),eE(e,t,n),FI(e,t),VI(e,t,n),tE(e,t,n),Zw(e,t,n)];return o.append(...r.map(i=>i.el)),{el:o,update(i){for(let s of r)s.update(i);},setVisible(i){o.hidden=!i;}}}function zI(e){return chunkWKWWFY2C_cjs.e(e)&&e.text?e.text.slice(0,24):e.type}function nE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-elements"),r=chunk6TALMZ42_cjs.w(e,"h4","pptxv-inspector-section-title");r.textContent=t("pptx.inspector.layerOrder"),o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-layer-list");o.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"p","pptxv-inspector-empty");return s.textContent=t("pptx.selectionPane.empty"),o.appendChild(s),{el:o,update(a){i.replaceChildren(),s.hidden=a.elements.length>0,[...a.elements].reverse().forEach((l,p)=>{let d=a.elements.length-p-1,u=chunk6TALMZ42_cjs.w(e,"button","pptxv-inspector-layer-row");u.type="button",u.title=`${l.type}: ${l.id}`,u.classList.toggle("is-selected",a.selectedIds.includes(l.id));let c=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-layer-num");c.textContent=String(d+1);let x=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-layer-label");x.textContent=zI(l),u.append(c,x),u.addEventListener("click",()=>n(l.id)),i.appendChild(u);});}}}function Rt(e,t,n){let o=t("pptx.colorPicker.recentColors"),r=chunk6TALMZ42_cjs.w(e,"div","pptxv-recent-colors");r.dataset.testid="pptx-color-recent",r.setAttribute("aria-label",o),r.hidden=true;let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-recent-colors-label");i.textContent=o,r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-swatch-grid pptxv-recent-colors-grid");r.appendChild(s);let a=false,l,p=new Map,d=()=>{for(let[u,c]of p)u.classList.toggle("is-selected",c===l);};return {el:r,setColors(u){s.replaceChildren(),p.clear();for(let c of u??[]){let x=chunk6TALMZ42_cjs.w(e,"button","pptxv-swatch");x.type="button",x.setAttribute("data-pptx-compact",""),x.style.backgroundColor=c,x.title=c,x.setAttribute("aria-label",`Recent ${c}`),x.disabled=a,x.addEventListener("click",()=>n(c)),s.appendChild(x),p.set(x,c);}r.hidden=u.length===0,d();},setDisabled(u){a=u;for(let c of p.keys())c.disabled=u;},setSelected(u){l=u,d();}}}function Ie(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-theme-swatch-grid");o.hidden=true;let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-theme-swatch-grid-label");r.textContent=t("pptx.colorPicker.themeColors"),o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-theme-swatch-grid-rows");o.appendChild(i);let s=false,a,l,p=chunkWKWWFY2C_cjs.io(void 0),d=[],u=()=>{i.replaceChildren(),d.length=0;let c=chunkWKWWFY2C_cjs.lo(p),x=chunkWKWWFY2C_cjs.jo(p,a,l);for(let b of c){let g=chunk6TALMZ42_cjs.w(e,"div","pptxv-theme-swatch-grid-row");for(let v of b){if(!v){g.appendChild(chunk6TALMZ42_cjs.w(e,"div","pptxv-theme-swatch-grid-empty"));continue}let f=chunk6TALMZ42_cjs.w(e,"button","pptxv-theme-swatch-grid-swatch");f.type="button",f.setAttribute("data-pptx-compact",""),f.style.backgroundColor=v.hex,f.title=v.label,f.setAttribute("aria-label",v.label),f.disabled=s,f.classList.toggle("is-selected",v===x),f.addEventListener("click",()=>n(chunkWKWWFY2C_cjs.ko(v))),g.appendChild(f),d.push(f);}i.appendChild(g);}o.hidden=p.length===0;};return {el:o,setThemeColorMap(c){p=chunkWKWWFY2C_cjs.io(c),u();},setSelected(c,x){a=c,l=x,u();},setDisabled(c){s=c;for(let x of d)x.disabled=c;}}}function rE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-connector-arrows";let r=chunkWKWWFY2C_cjs.Rg.map(i=>{let s=BI(e,t,n,i);return o.appendChild(s.select.parentElement),s});return {el:o,update(i){o.hidden=!i.isConnector;for(let{control:s,select:a}of r){let l=i.shapeStyle?.[s.styleKey];a.value=typeof l=="string"&&l.length>0?l:s.fallback,a.disabled=!i.canShape||!i.arrowheadsChangeable;}}}}function BI(e,t,n,o){let r=Q(e);for(let s of o.values){let a=e.createElement("option");a.value=s,a.textContent=chunkWKWWFY2C_cjs.Ab(o.optionLabelKeys,s,t),r.appendChild(a);}r.addEventListener("change",()=>n.setShapeStyle(chunkWKWWFY2C_cjs.Sg(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 iE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-shape-effects"),r=fe(e,{label:t("pptx.shape.type"),options:chunkWKWWFY2C_cjs.$n.map(f=>({value:f.type,label:t(f.i18nKey)})),onChange:f=>n.setShapeType(f)});o.appendChild(r.el);let i=(f,y,S)=>{let h=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-row"),C=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-label");C.textContent=f;let w=He(e,{label:f,onInput:T=>n.setShapeStyle({[y]:T}),onCommit:n.pushRecentColor},S);return h.append(C,w.el),o.appendChild(h),w},s=(f,y)=>{let S=re(e,{label:f,min:0,onCommit:h=>n.setShapeStyle({[y]:h})});return o.appendChild(S.el),S},a=i(t("pptx.textEffects.shadowColor"),"shadowColor","#000000"),l=s(t("pptx.textEffects.blur"),"shadowBlur"),p=s(t("pptx.shape.shadowDistance"),"shadowDistance"),d=oe(e,{label:t("pptx.effects.rotateWithShape"),onChange:f=>n.setShapeStyle({shadowRotateWithShape:f})});o.appendChild(d.el);let u=i(t("pptx.textEffects.glowColor"),"glowColor","#ffff00"),c=s(t("pptx.textEffects.glow"),"glowRadius"),x=s(t("pptx.shape.softEdges"),"softEdgeRadius"),b=oe(e,{label:t("pptx.textEffects.reflection"),onChange:f=>n.setShapeStyle({reflectionStartOpacity:f?.5:void 0})});o.appendChild(b.el);let g=rE(e,t,n);o.appendChild(g.el);let v=[r,a,l,p,d,u,c,x,b];return {el:o,update(f){let y=f.shapeStyle??{};a.setValue(y.shadowColor??"#000000"),l.setValue(y.shadowBlur??0),p.setValue(y.shadowDistance??0),d.setValue(y.shadowRotateWithShape??true),u.setValue(y.glowColor??"#ffff00"),c.setValue(y.glowRadius??0),x.setValue(y.softEdgeRadius??0),b.setValue(!!y.reflectionStartOpacity),r.setValue(f.shapeType??"rect"),r.el.hidden=!f.shapeType,g.update(f);for(let S of v)S.setDisabled(!f.canShape);}}}var NI="pct20";function aE(e){return `${Math.round(e*100)}%`}function sE(e,t,n,o){let r=n(t("pptx.shape.fillStroke"));r.setAttribute("data-pptx-inspector-section","fill-stroke");let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-row"),s=He(e,{label:t("pptx.inspector.fill"),onInput:o.setShapeFill},"#4f86ff"),a=He(e,{label:t("pptx.inspector.line"),onInput:o.setShapeStroke},"#1e3a8a"),l=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-label");l.textContent=t("pptx.inspector.fill");let p=chunk6TALMZ42_cjs.w(e,"span","pptxv-inspector-row-label");p.textContent=t("pptx.inspector.line"),i.append(l,s.el,p,a.el),r.appendChild(i);let d=Ie(e,t,B=>o.setShapeFill(B.hex,B.ref));r.appendChild(d.el);let u=Ie(e,t,B=>o.setShapeStroke(B.hex,B.ref));r.appendChild(u.el);let c=Rt(e,t,o.setShapeFill);r.appendChild(c.el);let x=Rt(e,t,o.setShapeStroke);r.appendChild(x.el);let b=re(e,{label:t("pptx.ribbon.strokeWidth"),min:0,step:.5,onCommit:o.setShapeStrokeWidth});r.appendChild(b.el);let g=Fe(e,{label:t("pptx.strokeEffects.fillOpacity"),min:0,max:1,step:.01,formatValue:aE,onCommit:o.setFillOpacity});r.appendChild(g.el);let v=Fe(e,{label:t("pptx.strokeEffects.strokeOpacity"),min:0,max:1,step:.01,formatValue:aE,onCommit:o.setStrokeOpacity});r.appendChild(v.el);let f=oe(e,{label:t("pptx.fill.gradient"),onChange(B){B?o.setGradientFill(L):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(f.el);let y=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-gradient");r.appendChild(y);let S=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-row");y.appendChild(S);let h=z(e,{label:t("pptx.gradient.linear"),text:t("pptx.gradient.linear"),onClick:()=>o.setGradientFill({...L,type:"linear"})}),C=z(e,{label:t("pptx.gradient.radial"),text:t("pptx.gradient.radial"),onClick:()=>o.setGradientFill({...L,type:"radial"})});S.append(h.btn,C.btn);let w=re(e,{label:t("pptx.gradient.angle"),min:0,max:360,onCommit:B=>o.setGradientFill({...L,angle:B})});y.appendChild(w.el);let T=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-gradient-stops");y.appendChild(T);let k=z(e,{label:t("pptx.gradient.addStop"),text:t("pptx.gradient.addStop"),onClick:()=>{let B=L.stops,$=B[B.length-1]?.position??100,Y=B[B.length-2]?.position??0;o.addGradientStop("#ffffff",Math.round(($+Y)/2));}});y.appendChild(k.btn);let A=oe(e,{label:t("pptx.table.fillPattern"),onChange(B){B?o.setShapeStyle({fillMode:"pattern",fillPatternPreset:I,fillPatternBackgroundColor:D}):o.setShapeFill(s.el.querySelector("input")?.value??"#4f86ff");}});r.appendChild(A.el);let P=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-pattern");r.appendChild(P);let E=fe(e,{label:t("pptx.table.patternPreset"),options:chunkWKWWFY2C_cjs.Mb.map(B=>({value:B.value,label:t(B.labelKey)})),onChange:B=>{I=B,o.setShapeStyle({fillMode:"pattern",fillPatternPreset:B});}});P.appendChild(E.el);let M=He(e,{label:t("pptx.table.patternBackground"),onInput:B=>{D=B,o.setShapeStyle({fillMode:"pattern",fillPatternBackgroundColor:B});},onCommit:o.pushRecentColor},"#ffffff");P.appendChild(M.el);let I=NI,D="#ffffff",L=chunkWKWWFY2C_cjs.Lm(),O=[],R=(B,$,Y)=>{T.replaceChildren(),O=B.map((ie,_)=>{let K=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-row"),q=He(e,{label:t("pptx.gradient.stops"),onInput:Me=>o.updateGradientStop(_,{color:Me,colorRef:void 0}),onCommit:o.pushRecentColor},ie.color),j=re(e,{label:t("pptx.gradient.position"),min:0,max:100,onCommit:Me=>o.updateGradientStop(_,{position:Me})});j.setValue(ie.position);let ue=z(e,{label:t("pptx.gradient.removeStop"),text:"\u2715",onClick:()=>o.removeGradientStop(_)});ue.setDisabled(B.length<=2),K.append(q.el,j.el,ue.btn),T.appendChild(K);let Te=Ie(e,t,Me=>o.updateGradientStop(_,chunkWKWWFY2C_cjs.mo(Me)));return Te.setThemeColorMap($),Te.setSelected(ie.colorRef,ie.color),Te.setDisabled(!Y),T.appendChild(Te.el),{color:q,theme:Te,position:j,remove:ue}});},F=[s,a,b,g,v,f,A],H=[h,C,w,k],V=[E,M],N=iE(e,t,o);return r.appendChild(N.el),{el:r,update(B){r.hidden=!B.hasSelection||!B.canShape,s.setValue(B.fillColor),a.setValue(B.strokeColor),b.setValue(B.strokeWidth),g.setValue(B.fillOpacity),v.setValue(B.strokeOpacity),d.setThemeColorMap(B.themeColorMap),d.setSelected(B.fillColorRef,B.fillColor),d.setDisabled(!B.canShape),u.setThemeColorMap(B.themeColorMap),u.setSelected(B.strokeColorRef,B.strokeColor),u.setDisabled(!B.canShape),c.setColors(B.recentColors??[]),x.setColors(B.recentColors??[]),c.setDisabled(!B.canShape),x.setDisabled(!B.canShape),f.setValue(B.gradientEnabled),w.setValue(B.gradient.angle),L=B.gradient,R(B.gradient.stops,B.themeColorMap,B.canShape),y.hidden=!B.gradientEnabled,N.update(B);let $=B.shapeStyle?.fillMode==="pattern";A.setValue($),I=B.shapeStyle?.fillPatternPreset??I,D=B.shapeStyle?.fillPatternBackgroundColor??D,E.setValue(I),M.setValue(D),P.hidden=!$;for(let Y of F)Y.setDisabled(!B.canShape);for(let Y of H)Y.setDisabled(!B.canShape||!B.gradientEnabled);for(let Y of V)Y.setDisabled(!B.canShape||!$);for(let Y of O)Y.color.setDisabled(!B.canShape),Y.position.setDisabled(!B.canShape),Y.remove.setDisabled(!B.canShape||B.gradient.stops.length<=2);}}}function lE(e,t,n){let o=n(t("pptx.elementType.group")),r=chunk6TALMZ42_cjs.w(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 pE(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 s=e.createElement("button");s.type="button",s.textContent=t("pptx.image.resetImage"),s.addEventListener("click",o.resetImage),r.append(i,s);let a=H=>`${Math.round(H)}%`,l=Fe(e,{label:t("pptx.imageAdjustments.brightness"),min:-100,max:100,formatValue:a,onCommit:o.setImageBrightness}),p=Fe(e,{label:t("pptx.imageAdjustments.contrast"),min:-100,max:100,formatValue:a,onCommit:o.setImageContrast}),d=Fe(e,{label:t("pptx.image.saturation"),min:-100,max:100,formatValue:a,onCommit:o.setImageSaturation});r.append(l.el,p.el,d.el);let u=e.createElement("label");u.textContent=t("pptx.image.artisticEffects");let c=Q(e);c.setAttribute("aria-label",t("pptx.image.artisticEffects"));for(let[H,V]of chunkWKWWFY2C_cjs.Ln){let N=e.createElement("option");N.value=H,N.textContent=t(V),c.appendChild(N);}c.addEventListener("change",()=>o.setImageEffects({artisticEffect:c.value==="none"?void 0:c.value})),u.appendChild(c);let x=Fe(e,{label:t("pptx.imageAdjustments.transparency"),min:0,max:100,formatValue:a,onCommit:H=>o.setImageEffects({alphaModFix:100-H})}),b=Fe(e,{label:t("pptx.imageAdjustments.biLevelThreshold"),min:0,max:100,formatValue:a,onCommit:H=>o.setImageEffects({biLevel:H})}),g=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-grid"),v={},f=(H,V)=>{let N=e.createElement("label");N.textContent=H;let B=e.createElement("input");return B.type="color",B.addEventListener("input",()=>o.setImageEffects({duotone:{color1:V==="color1"?B.value:v.color1?.value??"#000000",color2:V==="color2"?B.value:v.color2?.value??"#ffffff"}})),N.appendChild(B),g.appendChild(N),B},y=f(t("pptx.image.duotoneDark"),"color1"),S=f(t("pptx.image.duotoneLight"),"color2");v.color1=y,v.color2=S;for(let H of [y,S])H.addEventListener("change",()=>o.pushRecentColor(H.value));r.append(u,x.el,b.el,g);let h=me(e),C=e.createElement("input");C.type="color";let w=40,T=Fe(e,{label:t("pptx.image.washOpacity"),min:0,max:100,formatValue:a,onCommit:H=>{w=H,o.setImageEffects({colorWash:{color:C.value,opacity:H}});}});h.addEventListener("change",()=>o.setImageEffects({colorWash:h.checked?{color:C.value,opacity:w}:void 0})),C.addEventListener("input",()=>o.setImageEffects({colorWash:{color:C.value,opacity:w}})),C.addEventListener("change",()=>o.pushRecentColor(C.value)),r.append(h,C,T.el);let k=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-grid");r.appendChild(k);let A=(H,V)=>{let N=re(e,{label:H,min:0,max:90,onCommit:B=>o.setImageCrop(V,B/100)});return k.appendChild(N.el),N},P=A(t("pptx.image.cropLeft"),"left"),E=A(t("pptx.image.cropTop"),"top"),M=A(t("pptx.image.cropRight"),"right"),I=A(t("pptx.image.cropBottom"),"bottom"),D=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-image-alt"),L=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");L.textContent=t("pptx.image.altText");let O=e.createElement("textarea");O.rows=2,O.className="pptxv-image-alt-input",O.placeholder=t("pptx.imageTransform.altTextPlaceholder"),O.setAttribute("aria-label",t("pptx.image.altText")),O.addEventListener("keydown",H=>H.stopPropagation()),O.addEventListener("change",()=>o.setAltText(O.value)),D.append(L,O),r.appendChild(D);let R=[l,p,d],F=[P,E,M,I];return {el:r,update(H){r.hidden=!H.hasSelection||!H.isImage,l.setValue(H.imageBrightness),p.setValue(H.imageContrast),d.setValue(H.imageSaturation),c.value=H.imageArtisticEffect,x.setValue(H.imageTransparency),b.setValue(H.imageBiLevel),y.value=H.imageDuotone1,S.value=H.imageDuotone2,h.checked=!!H.imageColorWash,C.value=H.imageColorWash?.color??"#0066cc",T.setValue(H.imageColorWash?.opacity??40),w=H.imageColorWash?.opacity??40,e.activeElement!==O&&(O.value=H.altText),O.disabled=!H.isImage,P.setValue(H.cropLeft*100),E.setValue(H.cropTop*100),M.setValue(H.cropRight*100),I.setValue(H.cropBottom*100);for(let V of [...R,x,b])V.setDisabled(!H.isImage);c.disabled=!H.isImage,y.disabled=!H.isImage,S.disabled=!H.isImage,i.disabled=!H.isImage,s.disabled=!H.isImage,h.disabled=!H.isImage,C.disabled=!H.isImage,T.setDisabled(!H.isImage);for(let V of F)V.setDisabled(!H.isImage||!H.croppable);}}}function dE(e,t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline"),o=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline-times"),r=chunk6TALMZ42_cjs.w(e,"span","pptxv-media-timeline-time"),i=chunk6TALMZ42_cjs.w(e,"span","pptxv-media-timeline-time");o.append(r,i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline-bar"),a=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline-region"),l=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline-playhead"),p=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline-handle is-start"),d=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline-handle is-end"),u=chunk6TALMZ42_cjs.w(e,"div","pptxv-media-timeline-marks");s.append(a,u,l,p,d),n.append(o,s);let c={duration:0,trimStartMs:0,trimEndMs:0,canEdit:false},x=g=>{let v=s.getBoundingClientRect();return chunkWKWWFY2C_cjs.Hn(g,v.left,v.width,c.duration||1)};s.addEventListener("click",g=>{g.target===p||g.target===d||t.onSeek(x(g.clientX));});let b=(g,v)=>{g.addEventListener("pointerdown",f=>{if(!c.canEdit)return;f.preventDefault(),f.stopPropagation(),g.setPointerCapture(f.pointerId);let y=h=>{let C=chunkWKWWFY2C_cjs.Jn(v,x(h.clientX),c.duration,c.trimStartMs,c.trimEndMs);t.onTrimChange(Math.round(C.trimStartMs),Math.round(C.trimEndMs));},S=()=>{g.removeEventListener("pointermove",y),g.removeEventListener("pointerup",S),g.removeEventListener("pointercancel",S);};g.addEventListener("pointermove",y),g.addEventListener("pointerup",S),g.addEventListener("pointercancel",S);});};return b(p,"start"),b(d,"end"),{el:n,update(g){c=g;let v=chunkWKWWFY2C_cjs.In(g.duration,g.trimStartMs,g.trimEndMs,g.currentTime),f=chunkWKWWFY2C_cjs.Gn(g.duration,g.trimEndMs);r.textContent=chunkWKWWFY2C_cjs.Fn(g.trimStartMs/1e3),i.textContent=chunkWKWWFY2C_cjs.Fn(f),a.style.left=`${v.startPercent}%`,a.style.width=`${Math.max(0,v.endPercent-v.startPercent)}%`,l.style.left=`${v.playheadPercent}%`,p.style.left=`${v.startPercent}%`,d.style.left=`${v.endPercent}%`,p.hidden=!g.canEdit,d.hidden=!g.canEdit,u.textContent="";let y=g.duration>0?g.duration:1;for(let S of g.bookmarks){let h=chunk6TALMZ42_cjs.w(e,"button","pptxv-media-timeline-mark");h.type="button",h.style.left=`${Math.max(0,Math.min(100,S.time/y*100))}%`,h.title=S.label??"",h.setAttribute("aria-label",S.label||chunkWKWWFY2C_cjs.Fn(S.time)),h.addEventListener("click",C=>{C.stopPropagation(),t.onSeek(S.time);}),u.appendChild(h);}}}}function uE(e,t,n,o){let r=n(t("pptx.media.title")),i,s=()=>{let A=Number.isFinite(a.duration)?a.duration:0,P=i?.metadata?.duration??0;return (A||P)*1e3},a=e.createElement("video");a.controls=true,a.preload="metadata",a.className="pptxv-media-preview",a.addEventListener("loadedmetadata",()=>{o.setMediaProperties({metadata:{duration:Number.isFinite(a.duration)?a.duration:void 0,videoWidth:a.videoWidth||void 0,videoHeight:a.videoHeight||void 0}}),k();});let l=e.createElement("img");l.className="pptxv-media-poster",l.alt=t("pptx.media.posterFrame");let p=oe(e,{label:t("pptx.media.autoPlay"),onChange:A=>o.setMediaProperties({autoPlay:A})}),d=oe(e,{label:t("pptx.media.loop"),onChange:A=>o.setMediaProperties({loop:A})}),u=oe(e,{label:t("pptx.media.playAcrossSlides"),onChange:A=>o.setMediaProperties({playAcrossSlides:A})}),c=oe(e,{label:t("pptx.media.fullScreen"),onChange:A=>o.setMediaProperties({fullScreen:A})}),x=oe(e,{label:t("pptx.media.hideWhenNotPlaying"),onChange:A=>o.setMediaProperties({hideWhenNotPlaying:A})}),b=Fe(e,{label:t("pptx.media.volume"),min:0,max:100,formatValue:A=>`${Math.round(A)}%`,onCommit:A=>o.setMediaProperties({volume:A/100})}),g=fe(e,{label:t("pptx.media.playbackSpeed"),options:[.5,.75,1,1.25,1.5,2].map(A=>({value:String(A),label:`${A}x`})),onChange:A=>o.setMediaProperties({playbackSpeed:Number(A)})}),v=re(e,{label:t("pptx.media.trimStart"),min:0,onCommit:A=>o.setMediaProperties({trimStartMs:A})}),f=re(e,{label:t("pptx.media.trimEnd"),min:0,onCommit:A=>o.setMediaProperties({trimEndMs:chunkWKWWFY2C_cjs.En(s(),A)})}),y=cE(e,t("pptx.media.bookmarks"));y.control.placeholder="12.5 | Intro",y.control.addEventListener("change",()=>o.setMediaProperties({bookmarks:mE(y.control.value).map((A,P)=>{let[E,M=""]=A.split("|").map(I=>I.trim());return {id:`bookmark-${P+1}`,time:Number(E),label:M}}).filter(({time:A})=>Number.isFinite(A))}));let S=cE(e,t("pptx.media.captions"));S.control.placeholder="en | English | captions | captions.vtt",S.control.addEventListener("change",()=>o.setMediaProperties({captionTracks:mE(S.control.value).map((A,P)=>{let[E="",M="",I="captions",D=""]=A.split("|").map(L=>L.trim());return {id:`caption-${P+1}`,language:E,label:M,kind:I,src:D||void 0}})}));let h=e.createElement("output");h.className="pptxv-media-metadata";let C=[p,d,u,c,x],w=false,T=dE(e,{onTrimChange:(A,P)=>{o.setMediaProperties({trimStartMs:A,trimEndMs:P}),v.setValue(A),f.setValue(chunkWKWWFY2C_cjs.Dn(s(),P));},onSeek:A=>{Number.isFinite(a.duration)&&(a.currentTime=A);}}),k=()=>{T.update({duration:Number.isFinite(a.duration)?a.duration:0,trimStartMs:i?.trimStartMs??0,trimEndMs:i?.trimEndMs??0,currentTime:a.currentTime||0,bookmarks:i?.bookmarks??[],canEdit:w});};return a.addEventListener("timeupdate",k),r.append(a,l,T.el,...C.map(({el:A})=>A),b.el,g.el,v.el,f.el,y.label,S.label,h),{el:r,update(A){r.hidden=!A.isMedia;let P=A.media;i=P,w=A.isMedia,k();let E=A.mediaPreviewUrl??"";a.src!==E&&(a.src=E),a.hidden=!E,a.poster=A.mediaPosterUrl??"",l.src=A.mediaPosterUrl??"",l.hidden=!A.mediaPosterUrl,p.setValue(P?.autoPlay??false),d.setValue(P?.loop??false),u.setValue(P?.playAcrossSlides??false),c.setValue(P?.fullScreen??false),x.setValue(P?.hideWhenNotPlaying??false),b.setValue((P?.volume??1)*100),g.setValue(String(P?.playbackSpeed??1)),v.setValue(P?.trimStartMs??0),f.setValue(chunkWKWWFY2C_cjs.Dn(s(),P?.trimEndMs??0)),y.control.value=(P?.bookmarks??[]).map(({time:M,label:I})=>`${M} | ${I}`).join(`
|
|
3
|
+
`),S.control.value=(P?.captionTracks??[]).map(({language:M,label:I,kind:D,src:L})=>`${M} | ${I} | ${D} | ${L??""}`).join(`
|
|
4
|
+
`),h.textContent=P?.metadata?`${P.metadata.duration??0}s, ${P.metadata.videoWidth??0} x ${P.metadata.videoHeight??0}, ${P.metadata.codecInfo??P.mediaMimeType??""}`:P?.mediaMimeType??"";for(let M of [...C,b,g,v,f])M.setDisabled(!A.isMedia);y.control.disabled=!A.isMedia,S.control.disabled=!A.isMedia;}}}function cE(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 mE(e){return e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean)}function we(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"button","pptxv-parity-backdrop");o.type="button",o.setAttribute("aria-label",t("pptx.common.close"));let r=chunk6TALMZ42_cjs.w(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 s=chunk6TALMZ42_cjs.w(e,"header","pptxv-parity-header"),a=chunk6TALMZ42_cjs.w(e,"h2");a.id=i,a.textContent=n;let l=chunk6TALMZ42_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.common.close")),s.append(a,l);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-parity-body"),d=chunk6TALMZ42_cjs.w(e,"footer","pptxv-parity-footer");r.append(s,p,d),e.body.append(o,r);let u=()=>{e.removeEventListener("keydown",c),o.remove(),r.remove();},c=x=>{x.key==="Escape"&&u();};return e.addEventListener("keydown",c),o.addEventListener("click",u),l.addEventListener("click",u),queueMicrotask(()=>l.focus()),{backdrop:o,dialog:r,heading:a,body:p,footer:d,close:u}}function ae(e,t,n,o,r=false){let i=chunk6TALMZ42_cjs.w(e,"button",r?"is-primary":"");return i.type="button",i.textContent=n,i.addEventListener("click",o),t.appendChild(i),i}function $e(e,t,n,o){let r=chunk6TALMZ42_cjs.w(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 Nr(e,t,n,o,r,i){for(let s of o){let a=chunk6TALMZ42_cjs.w(e,"label","pptxv-parity-check"),l=e.createElement("input");l.type="radio",l.name=n,l.value=s.value,l.checked=s.value===r,l.addEventListener("change",()=>{l.checked&&i(s.value);}),a.append(l,e.createTextNode(s.label)),t.appendChild(a);}}function xE(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-parity-swatch-row");for(let s of n){let a=e.createElement("button");a.type="button",a.className="pptxv-parity-swatch",a.classList.toggle("is-active",s.key===o);let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-parity-swatch-preview");l.style.background=s.previewColor;let p=e.createElement("span");p.textContent=s.label,a.append(l,p),a.addEventListener("click",()=>r(s.key)),i.appendChild(a);}t.appendChild(i);}function _r(e,t){let n=chunk6TALMZ42_cjs.w(e,"p","pptxv-ole-edit-empty");return n.textContent=t,n}function bE(e,t,n,o){if(!n||n.rows.length===0)return _r(e,t("pptx.ole.editDialog.emptySheet"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ole-edit-table-wrap"),i=chunk6TALMZ42_cjs.w(e,"table","pptxv-ole-edit-table"),s=e.createElement("tbody");return n.rows.forEach((a,l)=>{let p=e.createElement("tr");a.cells.forEach((d,u)=>{let c=e.createElement("td"),x=e.createElement("input");x.type="text",x.value=d.value,x.setAttribute("aria-label",t("pptx.ole.editDialog.cellEditLabel")),x.addEventListener("keydown",b=>b.stopPropagation()),x.addEventListener("blur",()=>{x.value!==d.value&&o(l,u,x.value);}),c.appendChild(x),p.appendChild(c);}),s.appendChild(p);}),i.appendChild(s),r.appendChild(i),r}function gE(e,t,n,o){if(!n||n.length===0)return _r(e,t("pptx.ole.editDialog.emptyDocument"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ole-edit-paragraphs");return n.forEach((i,s)=>{let a=e.createElement("textarea");a.rows=2,a.value=i,a.addEventListener("keydown",l=>l.stopPropagation()),a.addEventListener("blur",()=>{a.value!==i&&o(s,a.value);}),r.appendChild(a);}),r}function fE(e,t,n,o){if(!n||n.length===0)return _r(e,t("pptx.ole.editDialog.deckEmpty"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ole-edit-deck");for(let i of n){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-ole-edit-deck-slide"),a=e.createElement("span");a.className="pptxv-ole-edit-deck-caption",a.textContent=t("pptx.ole.editDialog.deckSlideLabel",{number:i.index+1}),s.appendChild(a),i.elements.length===0&&s.appendChild(_r(e,t("pptx.ole.editDialog.deckEmpty")));for(let l of i.elements){let p=e.createElement("input");p.type="text",p.value=l.text,p.addEventListener("keydown",d=>d.stopPropagation()),p.addEventListener("blur",()=>{p.value!==l.text&&o(i.index,l.elementId,p.value);}),s.appendChild(p);}r.appendChild(s);}return r}function vE(e,t,n,o){let r=chunkWKWWFY2C_cjs.If(n),i=we(e,t,t(r.titleKey));i.dialog.classList.add("pptxv-ole-edit-dialog");let s=n,a=S=>{s=S,S.oleContentDirty&&o.onUpdateElement(chunkWKWWFY2C_cjs.Jf(S));},l=chunk6TALMZ42_cjs.w(e,"p","pptxv-ole-edit-loading");l.textContent=t("pptx.ole.editDialog.loading");let p=chunk6TALMZ42_cjs.w(e,"p","pptxv-ole-edit-error");p.textContent=t("pptx.ole.editDialog.saveError"),p.hidden=true;let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-ole-edit-content");i.body.append(l,p,d);let u=()=>i.dialog.isConnected,c=()=>{u()&&(p.hidden=false);},x=S=>{u()&&d.replaceChildren(bE(e,t,S,(h,C,w)=>{(async()=>{try{let T=await chunkWKWWFY2C_cjs.y(s,{row:h,col:C,value:w});a(T);let k=await chunkWKWWFY2C_cjs.u(T);x(k);}catch{c();}})();}));},b=S=>{u()&&d.replaceChildren(gE(e,t,S,(h,C)=>{(async()=>{try{let w=await chunkWKWWFY2C_cjs.z(s,h,C);a(w);let T=await chunkWKWWFY2C_cjs.v(w);b(T);}catch{c();}})();}));},g=S=>{u()&&d.replaceChildren(fE(e,t,S,(h,C,w)=>{(async()=>{try{let T=await chunkWKWWFY2C_cjs.x(s,h,C,w);a(T);let k=await chunkWKWWFY2C_cjs.w(T);g(k);}catch{c();}})();}));},v=()=>{let S=chunk6TALMZ42_cjs.w(e,"p","pptxv-ole-edit-empty");S.textContent=t("pptx.ole.editDialog.unsupported"),d.replaceChildren(S);};(async()=>{let S=r.contentTab?.kind;try{S==="sheet"?x(await chunkWKWWFY2C_cjs.u(n)):S==="document"?b(await chunkWKWWFY2C_cjs.v(n)):S==="deck"?g(await chunkWKWWFY2C_cjs.w(n)):v();}catch{c();}finally{l.hidden=true;}})();let y=e.createElement("input");y.type="file",y.hidden=true,y.addEventListener("change",()=>{let S=y.files?.[0];y.value="",S&&(async()=>{try{let h=new Uint8Array(await S.arrayBuffer()),C=await chunkWKWWFY2C_cjs.A(s,h,S.name);a(C),i.close();}catch{c();}})();}),i.footer.appendChild(y),ae(e,i.footer,t("pptx.ole.editDialog.replaceFile"),()=>y.click()),ae(e,i.footer,t("pptx.ole.editDialog.save"),()=>i.close(),true);}function hE(e,t,n,o){let r=n(t("pptx.ole.title"));r.classList.add("pptxv-ole-info");let i,s=e.createElement("button");s.type="button",s.textContent=t("pptx.ole.editContent"),s.addEventListener("click",()=>{i&&vE(e,t,i,{onUpdateElement:b=>o.setOleContent(b)});}),r.appendChild(s);let a=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-ole-name"),l=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.ole.objectName");let p=e.createElement("input");p.type="text",p.placeholder=t("pptx.ole.objectNamePlaceholder"),p.setAttribute("aria-label",t("pptx.ole.objectName")),p.addEventListener("keydown",b=>b.stopPropagation()),p.addEventListener("change",()=>o.setOleName(p.value)),a.append(l,p),r.appendChild(a);let d=b=>{let g=chunk6TALMZ42_cjs.w(e,"div","pptxv-ole-row"),v=chunk6TALMZ42_cjs.w(e,"span");v.textContent=b;let f=chunk6TALMZ42_cjs.w(e,"span","pptxv-ole-value");return g.append(v,f),r.appendChild(g),{row:g,value:f}},u=d(t("pptx.ole.type")),c=d(t("pptx.ole.fileName")),x=d(t("pptx.ole.linkStatus"));return x.value.classList.add("pptxv-ole-badge"),{el:r,update(b){r.hidden=!b.isOle,b.isOle&&(i=b.oleElement,s.hidden=b.isLocked||b.oleIsLinked,e.activeElement!==p&&(p.value=b.oleName??""),u.value.textContent=chunkWKWWFY2C_cjs.t(b.oleObjectType),c.row.hidden=!b.oleFileName,c.value.textContent=b.oleFileName??"",c.value.title=b.oleFileName??"",x.value.textContent=t(b.oleIsLinked?"pptx.ole.linked":"pptx.ole.embedded"),x.value.classList.toggle("is-linked",b.oleIsLinked));}}}function yE(e,t,n,o,r){let i=n(t("pptx.arrange.positionSize"));i.setAttribute("data-pptx-inspector-section","transform");let s=i.querySelector(".pptxv-inspector-section-title"),a=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-lock-row");s?(i.insertBefore(a,s),a.appendChild(s)):i.insertBefore(a,i.firstChild);let l=z(e,{label:t("pptx.inspector.lock"),icon:"lock-open",className:"pptxv-inspector-lock-btn",onClick:r});a.appendChild(l.btn);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-grid");i.appendChild(p);let d=(f,y,S)=>{let h=re(e,{label:f,min:S,onCommit:C=>o({[y]:C})});return p.appendChild(h.el),h},u=d(t("pptx.arrange.x"),"x"),c=d(t("pptx.arrange.y"),"y"),x=d(t("pptx.arrange.width"),"width",1),b=d(t("pptx.arrange.height"),"height",1),g=d(t("pptx.arrange.rotation"),"rotation"),v=[u,c,x,b,g];return {el:i,update(f){i.hidden=!f.hasSelection,u.setValue(f.x),c.setValue(f.y),x.setValue(f.width),b.setValue(f.height),g.setValue(f.rotation);for(let S of v)S.setDisabled(!f.hasSelection);l.setActive(f.isLocked),l.setDisabled(!f.hasSelection);let y=t(f.isLocked?"pptx.inspector.unlock":"pptx.inspector.lock");l.btn.title=y,l.btn.setAttribute("aria-label",y),l.btn.replaceChildren(chunk6TALMZ42_cjs.K(e,f.isLocked?"lock":"lock-open"));}}}function SE(e,t,n,o){let r=n(t("pptx.shape.quickStyles")),i=chunk6TALMZ42_cjs.w(e,"div","pptxv-quick-styles"),s=[];for(let a of chunkWKWWFY2C_cjs.Nn){let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-quick-style");if(l.type="button",l.title=a.name,l.setAttribute("aria-label",a.name),l.style.background=a.style.fillGradient||a.style.fillColor||"transparent",a.style.strokeColor&&(l.style.border=`${a.style.strokeWidth??1}px solid ${a.style.strokeColor}`),a.style.shadowColor){let p=a.style.shadowOffsetX??2,d=a.style.shadowOffsetY??2;l.style.boxShadow=`${p}px ${d}px ${a.style.shadowBlur??4}px ${a.style.shadowColor}`;}l.addEventListener("click",()=>o.setShapeStyle(a.style)),i.appendChild(l),s.push(l);}return r.appendChild(i),{el:r,update(a){r.hidden=!a.canShape;for(let l of s)l.disabled=!a.canShape;}}}var _I=["colorful1","colorful2","colorful3","monochromatic1","monochromatic2"];function CE(e,t,n,o){let r=n(t("pptx.smartart.title")),i=chunk6TALMZ42_cjs.w(e,"span","pptxv-smartart-label");i.textContent=t("pptx.smartart.switchLayout"),r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-layout-grid"),a=new Map;for(let y of chunkWKWWFY2C_cjs.N){let S=chunk6TALMZ42_cjs.w(e,"button","pptxv-smartart-layout-button");S.type="button",S.dataset.testid=`smartart-layout-${y}`,S.textContent=chunkWKWWFY2C_cjs.Ab(chunkWKWWFY2C_cjs.Db,y,t),S.addEventListener("click",()=>o.setSmartArtLayout(y)),a.set(y,S),s.appendChild(S);}r.appendChild(s);let l=fe(e,{label:t("pptx.smartart.colorScheme"),options:_I.map(y=>({value:y,label:chunkWKWWFY2C_cjs.Ab(chunkWKWWFY2C_cjs.Cb,y,t)})),onChange:o.setSmartArtColorScheme}),p=l.el.querySelector("pptx-ui-select");p&&(p.dataset.testid="smartart-color-scheme"),r.appendChild(l.el);let d=chunk6TALMZ42_cjs.w(e,"span","pptxv-smartart-label");d.textContent=t("pptx.smartart.textPane"),r.appendChild(d);let u=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-nodes"),c=e.createElement("button");c.type="button",c.textContent=t("pptx.smartart.addItem"),c.addEventListener("click",()=>o.mutateSmartArtNode("","add")),r.append(c,u);let x,b=null;function g(y,S){let h=x;if(!h)return;let C=h.nodes.find(P=>P.id===S),w=y.currentTarget.value,T=!w,k=chunkWKWWFY2C_cjs.E(h,S,w),A=w!==C?.text;if(y.key==="Enter"){y.preventDefault();let P=chunkWKWWFY2C_cjs.Ji(k,S);P?(b=P.focusNodeId??null,o.replaceSmartArtData(P.data)):A&&o.replaceSmartArtData(k);}else if((y.key==="Backspace"||y.key==="Delete")&&T){if(!C?.parentId&&!chunkWKWWFY2C_cjs.Hi(h.resolvedLayoutType,chunkWKWWFY2C_cjs.Ii(h)))return;y.preventDefault();let E=chunkWKWWFY2C_cjs.Ki(h,S);E&&(b=E.focusNodeId??null,o.replaceSmartArtData(E.data));}else if(y.key==="Tab"&&!y.shiftKey){y.preventDefault();let P=chunkWKWWFY2C_cjs.Li(k,S);P?(b=S,o.replaceSmartArtData(P)):A&&o.replaceSmartArtData(k);}else if(y.key==="Tab"&&y.shiftKey){y.preventDefault();let P=chunkWKWWFY2C_cjs.Mi(k,S);P?(b=S,o.replaceSmartArtData(P)):A&&o.replaceSmartArtData(k);}}let v="",f=y=>{let S=y.smartArtData;x=S;let h=S?.nodes.map(C=>C.id).join("|")??"";if(h===v){let C=u.querySelectorAll('[data-testid="smartart-node-text"]');S?.nodes.forEach((w,T)=>{let k=C[T];k&&e.activeElement!==k&&(k.value=w.text);});return}v=h,u.replaceChildren();for(let[C,w]of (S?.nodes??[]).entries()){let T=chunk6TALMZ42_cjs.w(e,"label","pptxv-smartart-node"),k=chunk6TALMZ42_cjs.w(e,"span","pptxv-smartart-node-index");k.textContent=String(C+1);let A=e.createElement("input");A.type="text",A.className="pptxv-smartart-node-input",A.dataset.testid="smartart-node-text",A.dataset.nodeId=w.id,A.setAttribute("aria-label",`${t("pptx.smartart.item")} ${C+1}`),A.value=w.text,A.addEventListener("change",()=>o.setSmartArtNodeText(w.id,A.value)),A.addEventListener("keydown",L=>g(L,w.id));let P=e.createElement("input");P.type="color",P.value=w.style?.fillColor??"#3b82f6",P.title=t("pptx.inspector.fill"),P.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fillColor:P.value})),P.addEventListener("change",()=>o.pushRecentColor(P.value));let E=e.createElement("input");E.type="color",E.value=w.style?.fontColor??"#ffffff",E.title=t("pptx.table.color"),E.addEventListener("input",()=>o.setSmartArtNodeStyle(w.id,{fontColor:E.value})),E.addEventListener("change",()=>o.pushRecentColor(E.value));let M=e.createElement("button");M.type="button",M.textContent="B",M.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{bold:!w.style?.bold}));let I=e.createElement("button");I.type="button",I.textContent="I",I.addEventListener("click",()=>o.setSmartArtNodeStyle(w.id,{italic:!w.style?.italic}));let D=chunk6TALMZ42_cjs.w(e,"span","pptxv-smartart-hierarchy");for(let[L,O]of [["addChild","pptx.smartArt.addSubItem"],["promote","pptx.smartart.promote"],["demote","pptx.smartart.demote"],["remove","pptx.common.delete"]]){let R=e.createElement("button");R.type="button",R.textContent=t(O),R.addEventListener("click",()=>o.mutateSmartArtNode(w.id,L)),D.appendChild(R);}T.append(k,A,P,E,M,I,D),u.appendChild(T);}};return {el:r,update(y){r.hidden=!y.isSmartArt;let S=y.smartArtData?.resolvedLayoutType;for(let[h,C]of a)C.disabled=!y.isSmartArt,C.classList.toggle("is-active",h===S),C.setAttribute("aria-pressed",String(h===S));if(l.setValue(y.smartArtData?.colorScheme??"colorful1"),l.setDisabled(!y.isSmartArt),c.disabled=!y.isSmartArt,f(y),b){let h=b;b=null,u.querySelector(`[data-testid="smartart-node-text"][data-node-id="${h}"]`)?.focus();}}}}function wE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"section","pptxv-inspector-section pptxv-table-grid");o.setAttribute("aria-label",t("pptx.tableDataEditor.ariaLabel"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-header"),i=chunk6TALMZ42_cjs.w(e,"h4","pptxv-inspector-section-title");i.textContent=t("pptx.inspector.tableData");let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-toolbar");r.append(i,s);let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-scroll"),l=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-body");l.setAttribute("role","grid"),a.appendChild(l),o.append(r,a);let p,d,u=true,c=P=>{!p||P===p||!P.tableData||n.setTableData(P.tableData,P.rawXml);},x=(P,E,M)=>{let I=chunk6TALMZ42_cjs.w(e,"button","pptxv-table-grid-btn");return I.type="button",I.textContent=t(`pptx.tableDataEditor.${P}`),I.title=t(`pptx.tableDataEditor.${E}`),I.addEventListener("click",()=>{p&&c(M(p));}),I},b=x("addRowLabel","addRowTitle",chunkWKWWFY2C_cjs.je),g=x("removeRowLabel","removeRowTitle",chunkWKWWFY2C_cjs.ke),v=x("addColumnLabel","addColumnTitle",chunkWKWWFY2C_cjs.le),f=x("removeColumnLabel","removeColumnTitle",chunkWKWWFY2C_cjs.me);s.append(b,g,v,f);let y=P=>{let E=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-head");E.setAttribute("role",P.role),P.role==="rowheader"&&E.classList.add("pptxv-table-grid-gutter");let M=e.createElement("span");if(M.textContent=P.text,E.appendChild(M),u&&P.canRemove){let I=chunk6TALMZ42_cjs.w(e,"button","pptxv-table-grid-remove");I.type="button",I.textContent="\xD7",I.title=P.removeLabel,I.setAttribute("aria-label",P.removeLabel),I.addEventListener("click",P.onRemove),E.appendChild(I);}return E},S=P=>{let E=e.createElement("input");return E.type="text",E.className="pptxv-table-grid-input",E.value=P.text,E.disabled=!u,E.dataset.pptxRow=String(P.rowIndex),E.dataset.pptxCol=String(P.colIndex),E.setAttribute("aria-label",t("pptx.tableDataEditor.cellAriaLabel",{row:P.rowIndex+1,column:P.colIndex+1})),E.addEventListener("change",()=>{p&&c(chunkWKWWFY2C_cjs.ee(p,P.rowIndex,P.colIndex,E.value));}),E.addEventListener("keydown",M=>M.stopPropagation()),E},h=(P,E)=>y({role:"columnheader",text:String(P+1),removeLabel:t("pptx.tableDataEditor.removeColumnN",{number:P+1}),canRemove:E,onRemove:()=>{p&&c(chunkWKWWFY2C_cjs.ie(p,P));}}),C=(P,E)=>y({role:"rowheader",text:String(P+1),removeLabel:t("pptx.tableDataEditor.removeRowN",{number:P+1}),canRemove:E,onRemove:()=>{p&&c(chunkWKWWFY2C_cjs.ge(p,P));}}),w=P=>{let E=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-row");E.setAttribute("role","row");let M=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-head pptxv-table-grid-gutter");M.setAttribute("role","columnheader"),E.appendChild(M);for(let I of P.colIndices)E.appendChild(h(I,P.canRemoveColumn));return E},T=P=>{l.textContent="",l.appendChild(w(P));for(let E of P.rows){let M=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-row");M.setAttribute("role","row"),M.appendChild(C(E.rowIndex,P.canRemoveRow));for(let I of E.cells){let D=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-grid-cell");D.setAttribute("role","gridcell"),D.appendChild(S(I)),M.appendChild(D);}l.appendChild(M);}},k=()=>{let P=e.activeElement;if(!P||P.tagName!=="INPUT"||!l.contains(P))return null;let{pptxRow:E,pptxCol:M}=P.dataset;return E!==void 0&&M!==void 0?[E,M]:null},A=()=>{s.hidden=!u;for(let P of l.querySelectorAll("input"))P.disabled=!u;for(let P of l.querySelectorAll(".pptxv-table-grid-remove"))P.hidden=!u;};return {el:o,update(P){p=P.tableElement;let E=p?chunkWKWWFY2C_cjs.de(p):void 0,M=P.hasSelection&&P.isTable&&E!==void 0&&E.rowCount>0&&E.colCount>0;if(o.hidden=!M,!M||!E||!p){d=void 0,l.textContent="";return}if(s.hidden=!u,b.disabled=!u,v.disabled=!u,g.disabled=!u||!E.canRemoveRow,f.disabled=!u||!E.canRemoveColumn,p.tableData===d)return;let I=k();d=p.tableData,T(E),I&&l.querySelector(`input[data-pptx-row="${I[0]}"][data-pptx-col="${I[1]}"]`)?.focus();},setEditable(P){u=P,A(),d=void 0;}}}function EE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-tsef"),r=chunk6TALMZ42_cjs.w(e,"div","pptxv-tsef-group"),i=chunk6TALMZ42_cjs.w(e,"span","pptxv-tsef-hdg");i.textContent=t("pptx.tableStyleEditor.fillSection");let s=e.createElement("input");s.type="color",s.addEventListener("input",()=>n({kind:"fillColor",hex:s.value,ref:void 0}));let a=chunk6TALMZ42_cjs.w(e,"label","pptxv-tsef-check"),l=me(e);l.addEventListener("change",()=>n({kind:"fillNone",noFill:l.checked})),a.append(l,e.createTextNode(t("pptx.tableStyleEditor.noFill")));let p=Ie(e,t,h=>n({kind:"fillColor",hex:h.hex,ref:h.ref}));r.append(i,s,a,p.el);let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-tsef-group"),u=chunk6TALMZ42_cjs.w(e,"span","pptxv-tsef-hdg");u.textContent=t("pptx.tableStyleEditor.textSection");let c=vs(e,t("pptx.format.bold"),()=>n({kind:"textBold",value:!c.classList.contains("active")})),x=vs(e,t("pptx.format.italic"),()=>n({kind:"textItalic",value:!x.classList.contains("active")})),b=vs(e,t("pptx.format.underline"),()=>n({kind:"textUnderline",value:!b.classList.contains("active")})),g=e.createElement("input");g.type="color",g.addEventListener("input",()=>n({kind:"textColor",hex:g.value,ref:void 0}));let v=Ie(e,t,h=>n({kind:"textColor",hex:h.hex,ref:h.ref}));d.append(u,c,x,b,g,v.el);let f=chunk6TALMZ42_cjs.w(e,"div","pptxv-tsef-group"),y=chunk6TALMZ42_cjs.w(e,"span","pptxv-tsef-hdg");y.textContent=t("pptx.tableStyleEditor.bordersSection");let S=new Map;for(let h of chunkWKWWFY2C_cjs.gs){let C=chunk6TALMZ42_cjs.w(e,"div","pptxv-tsef-border-row"),w=chunk6TALMZ42_cjs.w(e,"span","pptxv-tsef-side-lbl");w.textContent=t(chunkWKWWFY2C_cjs.hs[h]);let T=e.createElement("input");T.type="color",T.addEventListener("input",()=>n({kind:"borderColor",side:h,hex:T.value,ref:void 0}));let k=e.createElement("input");k.type="number",k.min="0",k.max="20",k.addEventListener("change",()=>n({kind:"borderWidth",side:h,width:Number(k.value)}));let A=Q(e);for(let M of chunkWKWWFY2C_cjs.is){let I=e.createElement("option");I.value=M,I.textContent=M,A.appendChild(I);}A.addEventListener("change",()=>n({kind:"borderDash",side:h,dash:A.value}));let P=chunk6TALMZ42_cjs.w(e,"label","pptxv-tsef-check"),E=me(e);E.addEventListener("change",()=>n({kind:"borderNone",side:h,noFill:E.checked})),P.append(E,e.createTextNode(t("pptx.tableStyleEditor.noBorder"))),C.append(w,T,k,A,P),f.appendChild(C),S.set(h,{color:T,width:k,dash:A,noFill:E});}return o.append(r,d,f),{el:o,update(h,C,w){if(s.value=h.fill.color.hex,s.disabled=!w,l.checked=h.fill.noFill,l.disabled=!w,p.setThemeColorMap(C),p.setSelected(h.fill.color.ref,h.fill.color.hex),p.setDisabled(!w),d.hidden=!h.hasTextAndBorders,f.hidden=!h.hasTextAndBorders,!!h.hasTextAndBorders){c.classList.toggle("active",h.text.bold),x.classList.toggle("active",h.text.italic),b.classList.toggle("active",h.text.underline);for(let T of [c,x,b])T.disabled=!w;g.value=h.text.color.hex,g.disabled=!w,v.setThemeColorMap(C),v.setSelected(h.text.color.ref,h.text.color.hex),v.setDisabled(!w);for(let[T,k]of S){let A=h.borders[T];k.color.value=A.color.hex,k.color.disabled=!w,k.width.value=String(A.width),k.width.disabled=!w,k.dash.value=A.dash,k.dash.disabled=!w,k.noFill.checked=A.noFill,k.noFill.disabled=!w;}}}}}function vs(e,t,n){let o=e.createElement("button");return o.type="button",o.className="pptxv-tsef-toggle",o.textContent=t,o.addEventListener("click",n),o}function TE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-tse"),r=e.createElement("button");r.type="button",r.className="pptxv-tse-btn",r.textContent=t("pptx.tableStyleEditor.editButton");let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-tse-panel");i.dataset.testid="table-style-editor",i.hidden=true,o.append(r,i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-tse-header"),a=chunk6TALMZ42_cjs.w(e,"span","pptxv-tse-heading");a.textContent=t("pptx.tableStyleEditor.title");let l=e.createElement("button");l.type="button",l.textContent=t("pptx.tableStyleEditor.close"),l.addEventListener("click",()=>h(false)),s.append(a,l);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-tse-empty");p.textContent=t("pptx.tableStyleEditor.noStyleSelected");let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-tse-parts"),u=new Map,c="wholeTbl";chunkWKWWFY2C_cjs.fs.forEach(w=>{let T=e.createElement("button");T.type="button",T.textContent=t(w.labelKey),T.addEventListener("click",()=>{c=w.id,C();}),u.set(w.id,T),d.appendChild(T);});let x=EE(e,t,w=>{let T=n.getTableStyleMap(),k=T?.[chunkWKWWFY2C_cjs.W(f)];if(!T||!k)return;let{entry:A}=chunkWKWWFY2C_cjs.ks(k,c,w);n.onStyleMapChange({...T,[A.styleId]:A});}),b=chunk6TALMZ42_cjs.w(e,"div","pptxv-tse-actions"),g=e.createElement("button");g.type="button",g.textContent=t("pptx.tableStyleEditor.newFromCurrent"),g.addEventListener("click",()=>{let w=n.getTableStyleMap(),T=w?.[chunkWKWWFY2C_cjs.W(f)],k=e.defaultView?.prompt(t("pptx.tableStyleEditor.newStyleNamePrompt"),T?`${T.styleName??""} Copy`.trim():"");if(!k)return;let A={...w??{}},P=chunkWKWWFY2C_cjs.X(A,{styleName:k,basedOn:T});chunkWKWWFY2C_cjs.Y(A,P),n.onStyleMapChange(A),f=P.styleId,n.onAssignStyle?.(P.styleId),C();});let v=e.createElement("button");v.type="button",v.textContent=t("pptx.tableStyleEditor.deleteStyle"),v.addEventListener("click",()=>{let w=n.getTableStyleMap(),T=w?.[chunkWKWWFY2C_cjs.W(f)];if(!w||!T||!e.defaultView?.confirm(t("pptx.tableStyleEditor.deleteConfirm")))return;let k={...w};chunkWKWWFY2C_cjs.Z(k,T.styleId),n.onStyleMapChange(k),n.onDeleteStyle(T.styleId),h(false);}),b.append(g,v),i.append(s,p,d,x.el,b);let f="",y=true,S=false;function h(w){S=w,i.hidden=!S,S&&C();}function C(){let w=n.getTableStyleMap(),T=f?w?.[f]:void 0;p.hidden=!!T,d.hidden=!T,x.el.hidden=!T,v.hidden=!T,g.textContent=t(T?"pptx.tableStyleEditor.newFromCurrent":"pptx.tableStyleEditor.newStyle");for(let[k,A]of u)A.classList.toggle("active",k===c),A.disabled=!y;if(g.disabled=!y,v.disabled=!y,T){let k=chunkWKWWFY2C_cjs.js(T,c,n.getThemeColorMap());k&&x.update(k,n.getThemeColorMap(),y);}}return r.addEventListener("click",()=>h(!S)),{el:o,update(w,T){f=w?chunkWKWWFY2C_cjs.W(w):"",y=T,r.disabled=!T,S&&C();}}}var GI=["ltDnDiag","dkDnDiag","ltUpDiag","dkUpDiag","smGrid","lgGrid","horz","vert","diagCross"];function PE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-cell-fill";let r=null,i=T=>{r?.selectedTableCell&&n.setTableCellStyles(r.selectedTableCells.length>0?r.selectedTableCells:[r.selectedTableCell],T);},s=(T,k,A)=>{let P=e.createElement("label");P.textContent=T;let E=Q(e);E.setAttribute("aria-label",T);for(let M of k){let I=e.createElement("option");I.value=M,I.textContent=A?chunkWKWWFY2C_cjs.Ab(A,M,t):M,E.appendChild(I);}return P.appendChild(E),o.appendChild(P),E},a=T=>{let k=e.createElement("label");k.textContent=T;let A=e.createElement("input");return A.type="color",A.addEventListener("change",()=>n.pushRecentColor(A.value)),k.appendChild(A),o.appendChild(k),A},l=s(t("pptx.table.fillMode"),["solid","gradient","pattern","none"]),p=s(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=a(t("pptx.table.gradientStart")),c=a(t("pptx.table.gradientEnd")),x=s(t("pptx.table.patternPreset"),GI,chunkWKWWFY2C_cjs.Lb),b=a(t("pptx.table.patternForeground")),g=a(t("pptx.table.patternBackground")),v=s(t("pptx.table.cellBorders"),["top","right","bottom","left"]),f=a(t("pptx.table.borderColor")),y=e.createElement("input");y.type="number",y.min="0",y.max="20",y.title=t("pptx.table.borderWidth"),o.appendChild(y);let S=()=>i({fillMode:"gradient",gradientFillType:p.value,gradientFillAngle:Number(d.value),gradientFillStops:[{color:u.value,position:0},{color:c.value,position:100}]});l.addEventListener("change",()=>i({fillMode:l.value}));for(let T of [p,d,u,c])T.addEventListener("change",S);let h=()=>i({fillMode:"pattern",patternFillPreset:x.value,patternFillForeground:b.value,patternFillBackground:g.value});for(let T of [x,b,g])T.addEventListener("change",h);let C=()=>{let T=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;i({[`border${T}Color`]:f.value,[`border${T}Width`]:Number(y.value)});};for(let T of [v,f,y])T.addEventListener("change",C);let w=o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox");return {el:o,update(T){r=T,o.hidden=!T.selectedTableCell;let k=T.tableCellStyle??{};l.value=k.fillMode??"solid",p.value=k.gradientFillType??"linear",d.value=String(k.gradientFillAngle??90),u.value=k.gradientFillStops?.[0]?.color??"#ff0000",c.value=k.gradientFillStops?.at(-1)?.color??"#0000ff",x.value=k.patternFillPreset??"ltDnDiag",b.value=k.patternFillForeground??"#000000",g.value=k.patternFillBackground??"#ffffff";let A=`${v.value[0].toUpperCase()}${v.value.slice(1)}`;f.value=String(k[`border${A}Color`]??"#374151"),y.value=String(k[`border${A}Width`]??1);for(let P of w)P.disabled=!T.isTable;}}}var UI={left:"pptx.textPanel.alignLeft",center:"pptx.textPanel.alignCenter",right:"pptx.textPanel.alignRight"},KI={top:"pptx.textPanel.valignTop",middle:"pptx.textPanel.valignMiddle",bottom:"pptx.textPanel.valignBottom"};function hs(e,t){return /^#[0-9a-f]{6}$/i.test(e??"")?e:t}function AE(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,s=[],a=M=>{i&&n.setTableCellStyles(s.length>0?s:[i],M);},l=(M,I)=>{let D=e.createElement("label"),L=e.createElement("span");return L.textContent=M,I.setAttribute("aria-label",M),D.append(L,I),o.appendChild(D),D},p=(M,I)=>{let D=e.createElement("input");return D.type="number",D.addEventListener("change",()=>I(Number(D.value))),l(M,D),D},d=(M,I)=>{let D=e.createElement("input");return D.type="color",D.addEventListener("input",()=>a({[I]:D.value})),D.addEventListener("change",()=>n.pushRecentColor(D.value)),l(M,D),D},u=(M,I,D,L)=>{let O=e.createElement("input");O.type="color",O.addEventListener("input",()=>a({[I]:O.value,[D]:void 0})),O.addEventListener("change",()=>n.pushRecentColor(O.value)),l(M,O);let R=Ie(e,t,F=>a(L(F)));return o.appendChild(R.el),{input:O,theme:R}},c=(M,I)=>{let D=me(e);return D.addEventListener("change",()=>a({[I]:D.checked})),l(M,D),D},x=(M,I,D,L)=>{let O=Q(e);for(let R of I){let F=e.createElement("option");F.value=R,F.textContent=chunkWKWWFY2C_cjs.Ab(D,R,t),O.appendChild(F);}return O.addEventListener("change",()=>L(O.value)),l(M,O),O},b=p(t("pptx.table.fontSize"),M=>a({fontSize:M})),{input:g,theme:v}=u(t("pptx.table.color"),"color","colorRef",chunkWKWWFY2C_cjs.oo),{input:f,theme:y}=u(t("pptx.table.background"),"backgroundColor","backgroundColorRef",chunkWKWWFY2C_cjs.no),S=d(t("pptx.table.cellBorders"),"borderColor"),h=p(t("pptx.table.borderWidth"),M=>a({borderTopWidth:M,borderRightWidth:M,borderBottomWidth:M,borderLeftWidth:M})),C=p(t("pptx.table.cellPadding"),M=>a({marginLeft:M,marginRight:M,marginTop:M,marginBottom:M})),w=c(t("pptx.format.bold"),"bold"),T=c(t("pptx.format.italic"),"italic"),k=c(t("pptx.format.underline"),"underline"),A=x(t("pptx.table.alignment"),["left","center","right"],UI,M=>a({align:M})),P=x(t("pptx.table.verticalAlignment"),["top","middle","bottom"],KI,M=>a({vAlign:M})),E=[b,g,f,S,h,C,w,T,k,A,P];return {el:o,update(M){if(i=M.selectedTableCell,s=M.selectedTableCells,o.hidden=!i,!i)return;r.textContent=t("pptx.table.cell",{row:i.row+1,col:i.column+1});let I=M.tableCellStyle??{};b.value=String(I.fontSize??14),g.value=hs(I.color,"#000000"),f.value=hs(I.backgroundColor,"#ffffff"),S.value=hs(I.borderColor,"#374151"),v.setThemeColorMap(M.themeColorMap),v.setSelected(I.colorRef,I.color),v.setDisabled(!M.isTable),y.setThemeColorMap(M.themeColorMap),y.setSelected(I.backgroundColorRef,I.backgroundColor),y.setDisabled(!M.isTable),h.value=String(I.borderTopWidth??1),C.value=String(I.marginLeft??4),w.checked=!!I.bold,T.checked=!!I.italic,k.checked=!!I.underline,A.value=I.align??"left",P.value=I.vAlign??"top";for(let D of E)D.disabled=!M.isTable;}}}function kE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-table-structure";let r=null,i=(u,c)=>{let x=e.createElement("button");return x.type="button",x.textContent=u,x.addEventListener("click",()=>r&&c(r)),o.appendChild(x),x},s=u=>u.selectedTableCell,a=u=>c=>{let x=s(c);x&&n.mutateTableStructure(x,u);},l=[i(t("pptx.table.insertAbove"),a("insertRowAbove")),i(t("pptx.table.insertBelow"),a("insertRowBelow")),i(t("pptx.table.deleteRow"),a("deleteRow")),i(t("pptx.table.insertLeft"),a("insertColumnLeft")),i(t("pptx.table.insertRight"),a("insertColumnRight")),i(t("pptx.table.deleteColumn"),a("deleteColumn")),i(t("pptx.table.mergeSelected"),u=>n.mergeTableCells(u.selectedTableCells)),i(t("pptx.table.split"),u=>{let c=s(u);c&&n.splitTableCell(c);})],p=e.createElement("input");p.type="number",p.min="5",p.max="95",p.title=t("pptx.table.columnWidths"),p.addEventListener("change",()=>{let u=r&&s(r);u&&n.setTableColumnWidth(u.column,Number(p.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&&s(r);u&&n.setTableRowHeight(u.row,Number(d.value));}),o.append(p,d),{el:o,update(u){r=u;let c=s(u);o.hidden=!c,p.value=c?String(Math.round((u.tableColumnWidths[c.column]??0)*100)):"",d.value=c?String(u.tableRowHeights[c.row]??32):"";for(let x of l)x.disabled=!c;l[6].disabled=u.selectedTableCells.length<2,p.disabled=!c,d.disabled=!c;}}}function IE(e,t,n,o,r){let i=n(t("pptx.inspector.table")),s=oe(e,{label:t("pptx.table.headerRow"),onChange:o.setTableHeaderRow}),a=oe(e,{label:t("pptx.table.bandedRows"),onChange:o.setTableBandedRows}),l=oe(e,{label:t("pptx.table.bandedColumns"),onChange:E=>o.setTableOptions({bandedColumns:E})}),p=oe(e,{label:t("pptx.table.totalRow"),onChange:E=>o.setTableOptions({lastRow:E})}),d=oe(e,{label:t("pptx.table.firstColumn"),onChange:E=>o.setTableOptions({firstCol:E})}),u=oe(e,{label:t("pptx.table.lastColumn"),onChange:E=>o.setTableOptions({lastCol:E})}),c=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:E=>o.setTableOptions({rtl:E})});i.append(s.el,a.el,l.el,p.el,d.el,u.el,c.el);let x,b=chunk6TALMZ42_cjs.w(e,"span","pptxv-table-presets-label");b.textContent=t("pptx.table.stylePresets");let g=E=>{x&&o.setTableOptions({rows:chunkWKWWFY2C_cjs.pe(x,E)});},v=chunk6TALMZ42_cjs.w(e,"div","pptxv-table-presets-grid");v.append(...chunkWKWWFY2C_cjs.oe.map(E=>{let M=chunk6TALMZ42_cjs.w(e,"button","pptxv-table-preset-swatch");M.type="button",M.title=E.label,M.setAttribute("aria-label",E.label);let I=chunk6TALMZ42_cjs.w(e,"span");I.style.background=E.headerBg;let D=chunk6TALMZ42_cjs.w(e,"span");D.style.background=E.bandBg;let L=chunk6TALMZ42_cjs.w(e,"span");return L.style.borderTopColor=E.borderColor,M.append(I,D,L),M.addEventListener("click",()=>g(E)),M})),i.append(b,v);let f=re(e,{label:t("pptx.table.cellPadding"),min:0,onCommit:o.setTableCellPadding});i.appendChild(f.el);let y=e.createElement("input");y.placeholder=t("pptx.table.styleId"),y.addEventListener("change",()=>o.setTableOptions({tableStyleId:y.value}));let S=e.createElement("input");S.type="color",S.addEventListener("input",()=>o.setTableOptions({},{backgroundColor:S.value})),S.addEventListener("change",()=>o.pushRecentColor(S.value));let h=e.createElement("input");h.type="color",h.addEventListener("input",()=>o.setTableOptions({},{borderColor:h.value})),h.addEventListener("change",()=>o.pushRecentColor(h.value)),i.append(y,S,h);let C=r?TE(e,t,r):void 0;C&&i.appendChild(C.el);let w=AE(e,t,o),T=PE(e,t,o),k=kE(e,t,o);i.append(w.el,T.el,k.el);let A=[s,a,l,p,d,u,c],P=[f];return {el:i,update(E){i.hidden=!E.hasSelection||!E.isTable,x=E.tableElement?.tableData;for(let M of v.children)M.disabled=!E.isTable;s.setValue(E.tableHeaderRow),a.setValue(E.tableBandedRows),l.setValue(E.tableBandedColumns),p.setValue(E.tableLastRow),d.setValue(E.tableFirstCol),u.setValue(E.tableLastCol),c.setValue(E.tableRtl),f.setValue(E.tableCellPadding),y.value=E.tableStyleId,S.value=E.tableCellBackground,h.value=E.tableCellBorder,w.update(E),T.update(E),k.update(E);for(let M of A)M.setDisabled(!E.isTable);y.disabled=!E.isTable,S.disabled=!E.isTable,h.disabled=!E.isTable,C?.update(E.isTable?E.tableStyleId:void 0,E.isTable);for(let M of P)M.setDisabled(!E.isTable);}}}var ME=12700;function ys(e){return e?Math.round(e/ME):0}function Gr(e){return Math.round(e*ME)}function Ss(e,t,n){return Math.max(t,Math.min(n,e))}function LE(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-text3d-bevel"),s=chunk6TALMZ42_cjs.w(e,"span","pptxv-text3d-bevel-label");s.textContent=n;let a=fe(e,{label:`${n} ${t("pptx.text3d.bevelType")}`,options:chunkWKWWFY2C_cjs.On.map(({value:d,label:u})=>({value:d,label:u})),onChange:d=>o({[r.type]:d})}),l=re(e,{label:`${n} ${t("pptx.text3d.bevelWidth")}`,min:0,max:50,onCommit:d=>o({[r.width]:Gr(Ss(d,0,50))})}),p=re(e,{label:`${n} ${t("pptx.text3d.bevelHeight")}`,min:0,max:50,onCommit:d=>o({[r.height]:Gr(Ss(d,0,50))})});return i.append(s,a.el,l.el,p.el),{el:i,update(d,u){a.setValue(d?.[r.type]??"none"),l.setValue(ys(d?.[r.width])),p.setValue(ys(d?.[r.height])),a.setDisabled(u),l.setDisabled(u),p.setDisabled(u);}}}function DE(e,t,n,o){let r=n(t("pptx.text3d.title")),i,s=v=>{i={...i,...v},o.setTextStyle({text3d:i});},a=oe(e,{label:t("pptx.text3d.extrusion"),onChange:v=>{v?s({extrusionHeight:Gr(6)}):(i=void 0,o.setTextStyle({text3d:void 0}));}}),l=chunk6TALMZ42_cjs.w(e,"div","pptxv-text3d-options"),p=re(e,{label:t("pptx.text3d.extrusionDepth"),min:0,max:100,onCommit:v=>s({extrusionHeight:Gr(Ss(v,0,100))})}),d=chunk6TALMZ42_cjs.w(e,"label","pptxv-field pptxv-text3d-color"),u=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");u.textContent=t("pptx.text3d.extrusionColor");let c=e.createElement("input");c.type="color",c.setAttribute("aria-label",t("pptx.text3d.extrusionColor")),c.addEventListener("change",()=>{s({extrusionColor:c.value}),o.pushRecentColor(c.value);}),d.append(u,c);let x=LE(e,t,t("pptx.text3d.bevelTop"),s,{type:"bevelTopType",width:"bevelTopWidth",height:"bevelTopHeight"}),b=LE(e,t,t("pptx.text3d.bevelBottom"),s,{type:"bevelBottomType",width:"bevelBottomWidth",height:"bevelBottomHeight"}),g=fe(e,{label:t("pptx.text3d.material"),options:chunkWKWWFY2C_cjs.Pn.map(({value:v,label:f})=>({value:v||"",label:f})),onChange:v=>s({presetMaterial:v||void 0})});return l.append(p.el,d,x.el,b.el,g.el),r.append(a.el,l),{el:r,update(v){r.hidden=!v.canText,i=v.textStyle?.text3d;let f=!!(i?.extrusionHeight&&i.extrusionHeight>0);a.setValue(f),a.setDisabled(!v.canText),l.hidden=!f,p.setValue(ys(i?.extrusionHeight)),p.setDisabled(!f),c.value=/^#[0-9a-fA-F]{6}$/u.test(i?.extrusionColor??"")?i?.extrusionColor:"#888888",c.disabled=!f,x.update(i,!f),b.update(i,!f),g.setValue(i?.presetMaterial??""),g.setDisabled(!f);}}}function RE(e,t,n){let o=e.createElement("div");o.className="pptxv-inspector-text-effects";let r=null,i=P=>n.setTextStyle(P,r?.selectedTextRange),s=P=>n.setTextStyle(P),a=(P,E)=>{let M=e.createElement("label");M.textContent=P,E.setAttribute("aria-label",P),M.appendChild(E),o.appendChild(M);},l=(P,E,M=0,I=false)=>{let D=e.createElement("input");return D.type="number",D.min=String(M),D.addEventListener("change",()=>(I?s:i)({[E]:Number(D.value)})),a(P,D),D},p=(P,E)=>{let M=e.createElement("input");return M.type="color",M.addEventListener("input",()=>i({[E]:M.value})),M.addEventListener("change",()=>n.pushRecentColor(M.value)),a(P,M),M},d=(P,E)=>{let M=me(e);return M.addEventListener("change",()=>i({[E]:M.checked})),a(P,M),M},u=l(t("pptx.textFormatting.columns"),"columnCount",1,true);u.max="6";let c=l(t("pptx.textFormatting.columnSpacing"),"columnSpacing",0,true),x=p(t("pptx.textEffects.outline"),"textOutlineColor"),b=l(t("pptx.textEffects.outlineWidth"),"textOutlineWidth"),g=d(t("pptx.textEffects.shadow"),"textShadowOpacity"),v=p(t("pptx.textEffects.shadowColor"),"textShadowColor"),f=l(t("pptx.textEffects.blur"),"textShadowBlur"),y=p(t("pptx.textEffects.glowColor"),"textGlowColor"),S=l(t("pptx.textEffects.glow"),"textGlowRadius"),h=d(t("pptx.textEffects.reflection"),"textReflection"),C=d(t("pptx.textFormatting.strikethrough"),"strikethrough"),w=p(t("pptx.text.highlightColor"),"highlightColor"),T=Q(e);for(let P of chunkWKWWFY2C_cjs.Mn){let E=e.createElement("option");E.value=P.value,E.textContent=P.label,T.appendChild(E);}T.addEventListener("change",()=>s({textWarpPreset:T.value==="textNoShape"?void 0:T.value})),a(t("pptx.textEffects.transform"),T);let k=l(t("pptx.textEffects.adjustment"),"textWarpAdj",0,true),A=Array.from(o.querySelectorAll("input,pptx-ui-select,pptx-ui-checkbox"));return {el:o,update(P){r=P,o.hidden=!P.canText;let E=P.textStyle??{};u.value=String(E.columnCount??1),c.value=String(E.columnSpacing??0),x.value=E.textOutlineColor??"#000000",b.value=String(E.textOutlineWidth??0),g.checked=!!E.textShadowOpacity,v.value=E.textShadowColor??"#000000",f.value=String(E.textShadowBlur??4),y.value=E.textGlowColor??"#ffff00",S.value=String(E.textGlowRadius??0),h.checked=!!E.textReflection,C.checked=!!E.strikethrough,w.value=E.highlightColor??"#ffff00",T.value=E.textWarpPreset??"textNoShape",k.value=String(E.textWarpAdj??5e4);for(let M of A)M.disabled=!P.canText;}}}function OE(e,t,n,o){let r=n(t("pptx.inspector.text")),i=e.createElement("div");i.className="pptxv-inspector-row";let s=e.createElement("span");s.className="pptxv-inspector-row-label",s.textContent=t("pptx.textPanel.color");let a=He(e,{label:t("pptx.textPanel.color"),onInput:P=>o.setTextStyle({color:P,colorRef:void 0}),onCommit:o.pushRecentColor},"#000000");i.append(s,a.el),r.appendChild(i);let l=Ie(e,t,P=>o.setTextStyle({color:P.hex,colorRef:P.ref}));r.appendChild(l.el);let p=Rt(e,t,P=>{o.setTextStyle({color:P,colorRef:void 0}),o.pushRecentColor(P);});r.appendChild(p.el);let d=fe(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(d.el);let u=oe(e,{label:t("pptx.textAdvanced.wrapText"),onChange:P=>o.setTextWrap(P?"square":"none")});r.appendChild(u.el);let c=fe(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(c.el);let x=(P,E,M)=>re(e,{label:P,min:M,onCommit:I=>o.setTextAdvanced({[E]:I})}),b=x(t("pptx.textAdvanced.characterSpacing"),"characterSpacing"),g=x(t("pptx.textAdvanced.lineSpacing"),"lineSpacing",0),v=x(t("pptx.textAdvanced.lineSpacingExact"),"lineSpacingExactPt",0),f=x(t("pptx.textAdvanced.spaceBefore"),"paragraphSpacingBefore",0),y=x(t("pptx.textAdvanced.spaceAfter"),"paragraphSpacingAfter",0),S=x(t("pptx.textAdvanced.indent"),"paragraphIndent"),h=x(t("pptx.textAdvanced.marginLeft"),"paragraphMarginLeft"),C=fe(e,{label:t("pptx.textAdvanced.direction"),options:["horizontal","vertical","vertical270","eaVert","wordArtVert","wordArtVertRtl","mongolianVert"].map(P=>({value:P,label:t(`pptx.textAdvanced.direction.${P}`)})),onChange:P=>o.setTextAdvanced({textDirection:P})}),w=oe(e,{label:t("pptx.textAdvanced.rtl"),onChange:P=>o.setTextAdvanced({rtl:P})}),T=[b,g,v,f,y,S,h];r.append(...T.map(({el:P})=>P),C.el,w.el);let k=RE(e,t,o);r.appendChild(k.el);let A=[a,d,u,c,...T,C,w];return {el:r,update(P){r.hidden=!P.hasSelection||!P.canText,a.setValue(P.textStyle?.color),l.setThemeColorMap(P.themeColorMap),l.setSelected(P.textStyle?.colorRef,P.textStyle?.color),l.setDisabled(!P.canText),p.setColors(P.recentColors??[]),p.setDisabled(!P.canText),d.setValue(P.vAlign),u.setValue(P.textWrap==="square"),c.setValue(P.autoFitMode),b.setValue(P.characterSpacing),g.setValue(P.lineSpacing),v.setValue(P.lineSpacingExactPt??0),f.setValue(P.paragraphSpacingBefore),y.setValue(P.paragraphSpacingAfter),S.setValue(P.paragraphIndent),h.setValue(P.paragraphMarginLeft),C.setValue(P.textDirection),w.setValue(P.textRtl),k.update(P);for(let E of A)E.setDisabled(!P.canText);}}}function Ur(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"aside","pptxv-inspector");o.setAttribute("data-pptx-inspector",""),o.dataset.pptxChrome="inspector",o.setAttribute("aria-label",t("pptx.inspector.properties"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-tabs");r.setAttribute("role","tablist"),r.dataset.pptxChrome="inspector-tabs";let i=chunk6TALMZ42_cjs.w(e,"div");i.dataset.pptxChrome="inspector-header",i.appendChild(r),o.appendChild(i);let s=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 R of a){let F=chunk6TALMZ42_cjs.w(e,"button","pptxv-inspector-tab");F.type="button",F.setAttribute("role","tab"),F.appendChild(chunk6TALMZ42_cjs.K(e,R.id==="elements"?"layers":R.id==="properties"?"settings":"comment")),F.appendChild(e.createTextNode(R.label)),F.addEventListener("click",()=>x(R.id)),r.appendChild(F),s.set(R.id,F);}let l=nE(e,t,R=>n.selectElement(R));l.el.classList.add("pptxv-inspector-body"),o.appendChild(l.el);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-body");p.dataset.pptxChrome="inspector-body",o.appendChild(p);let d=Ww(e,t,n);d.el.classList.add("pptxv-inspector-body"),o.appendChild(d.el);let u=Mw(e,t,n);o.appendChild(u.el);let c="properties",x=R=>{c=R;for(let[F,H]of s)H.classList.toggle("is-active",F===R),H.setAttribute("aria-selected",String(F===R));l.el.hidden=R!=="elements",p.hidden=R!=="properties",d.el.hidden=R!=="comments";},b=oE(e,t,n);p.appendChild(b.el);let g=R=>{let F=chunk6TALMZ42_cjs.w(e,"div","pptxv-inspector-section"),H=chunk6TALMZ42_cjs.w(e,"h4","pptxv-inspector-section-title");return H.textContent=R,F.appendChild(H),p.appendChild(F),F},v=yE(e,t,g,n.setGeometry,n.toggleElementLock),f=lE(e,t,g),y=hE(e,t,g,n),S=sE(e,t,g,n),h=SE(e,t,g,n),C=OE(e,t,g,n),w=DE(e,t,g,n),T=pE(e,t,g,n),k=bw(e,t,g,n),A=wE(e,t,n);p.appendChild(A.el);let E=IE(e,t,g,n,{getTableStyleMap:()=>n.getTableStyleMap(),getThemeColorMap:()=>n.getThemeColorMap(),onStyleMapChange:R=>n.updateTableStyleMap(R),onDeleteStyle:R=>n.deleteTableStyle(R),onAssignStyle:R=>n.setTableOptions(chunkWKWWFY2C_cjs.hp(R))}),M=CE(e,t,g,n),I=fw(e,t,g,n),D=Gw(e,t,g,n),L=uE(e,t,g,n),O=[v,f,y,S,h,C,w,T,k,A,E,M,I,D,L];return x(c),{el:o,update(R){b.setVisible(!R.hasSelection);for(let F of O)F.update(R);},updateDeck(R){I.setSlideCount(R.slideCount),I.setCustomShows(R.customShows),l.update(R),d.update(R),b.update(R),u.update({editable:R.editable,selectedElementId:R.selectedElementId,elements:R.elements,animations:R.activeSlide?.animations??[],animationTimelineAnchors:R.activeSlide?.animationTimelineAnchors??[]});},setEditable(R){o.hidden=!R,A.setEditable(R),D.setEditable(R);}}}var HE=128,WI=[1,2,3,4,6,9],$I={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 Cs(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"section","pptxv-master-card"),s=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-card-label");s.textContent=t("pptx.master.notesMasterBackground");let a=chunk6TALMZ42_cjs.w(e,"input","pptxv-master-background");a.type="color",a.value=/^#[\da-f]{6}$/i.test(o)?o:"#ffffff",a.setAttribute("aria-label",t("pptx.master.backgroundColorLabel")),a.addEventListener("input",()=>r(a.value)),i.append(s,a),n.appendChild(i);}function FE(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"section","pptxv-master-card"),s=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-card-label");if(s.textContent=t("pptx.master.notesMasterPlaceholders"),i.appendChild(s),o.length===0){let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-empty");a.textContent=t("pptx.master.noPlaceholders"),i.appendChild(a);}for(let a of o){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-placeholder"),p=chunk6TALMZ42_cjs.w(e,"span",`pptxv-master-dot is-${r}`);l.append(p,e.createTextNode(t($I[a.type]??a.type))),i.appendChild(l);}n.appendChild(i);}function qI(e,t){return chunkWKWWFY2C_cjs.So({slideMasters:[e]},{tab:"slides",masterIndex:0,layoutIndex:t})??{id:e.path,rId:"",slideNumber:0,elements:[]}}function jI(e,t,n,o,r){if(o.length===0)return;let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-crud");for(let s of o){let a=chunk6TALMZ42_cjs.w(e,"button","pptxv-master-crud-btn");a.type="button",a.dataset.testid=`pptx-master-crud-${s.id}`,a.textContent=t(s.labelKey),a.disabled=!s.enabled,s.disabledReasonKey&&(a.title=t(s.disabledReasonKey)),a.addEventListener("click",()=>r(s.id)),i.appendChild(a);}n.appendChild(i);}function YI(e,t,n,o){o.editable&&(Cs(e,t,n,chunkWKWWFY2C_cjs.Vo({slideMasters:o.masters},{tab:"slides",masterIndex:o.active.masterIndex,layoutIndex:o.active.layoutIndex})??"#ffffff",o.onMasterBackgroundColorChange),jI(e,t,n,o.crudActions,o.onCrudAction));let r=HE/Math.max(o.canvasSize.width,1);for(let[i,s]of o.masters.entries()){let a=[{layoutIndex:null,label:s.name||t("pptx.master.master")},...s.layouts?.map((l,p)=>({layoutIndex:p,label:l.name||t("pptx.master.layout")}))??[]];for(let l of a){let p=chunk6TALMZ42_cjs.w(e,"button",`pptxv-master-thumb${l.layoutIndex===null?"":" is-layout"}`);p.type="button",p.setAttribute("aria-label",l.label);let d=o.active.masterIndex===i&&o.active.layoutIndex===l.layoutIndex;p.classList.toggle("is-active",d),d&&p.setAttribute("aria-current","page");let u=chunk6TALMZ42_cjs.w(e,"span","pptxv-master-thumb-name");u.textContent=l.label;let c=chunk6TALMZ42_cjs.w(e,"span","pptxv-master-thumb-frame");c.style.width=`${HE}px`,c.style.height=`${Math.round(o.canvasSize.height*r)}px`,c.appendChild(o.renderStage(qI(s,l.layoutIndex),r)),p.append(u,c),p.addEventListener("click",()=>o.onSelect(i,l.layoutIndex)),n.appendChild(p);}}}function ws(e,t){let n=chunk6TALMZ42_cjs.w(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=chunk6TALMZ42_cjs.w(e,"header","pptxv-master-header"),i=chunk6TALMZ42_cjs.w(e,"span","pptxv-master-title");i.textContent=t(o.tab==="slides"?"pptx.masterView.slideMastersTitle":o.tab==="notes"?"pptx.masterView.notesMasterTitle":"pptx.masterView.handoutMasterTitle");let s=chunk6TALMZ42_cjs.w(e,"button","pptxv-master-collapse");s.type="button",s.textContent="\u2039",s.title=t("pptx.masterView.collapse"),s.setAttribute("aria-label",t("pptx.masterView.collapse")),s.addEventListener("click",o.onCollapse),r.append(i,s);let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-tabs");a.setAttribute("role","tablist");for(let[p,d]of [["slides","pptx.sections.slides"],["notes","pptx.notes.title"],["handout","pptx.masterView.tabHandout"]]){let u=chunk6TALMZ42_cjs.w(e,"button","pptxv-master-tab");u.type="button",u.role="tab",u.textContent=t(d),u.setAttribute("aria-selected",String(o.tab===p)),u.classList.toggle("is-active",o.tab===p),u.addEventListener("click",()=>o.onTabChange(p)),a.appendChild(u);}let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-body");if(l.setAttribute("role","tabpanel"),o.tab==="slides")YI(e,t,l,o);else if(o.tab==="notes")o.notesMasterPresent?(Cs(e,t,l,o.notesBackground??"#ffffff",o.onMasterBackgroundColorChange),FE(e,t,l,o.notesPlaceholders??[],"notes")):(l.textContent=t("pptx.master.noNotesMaster"),l.classList.add("pptxv-master-empty"));else if(!o.handoutMasterPresent)l.textContent=t("pptx.master.noHandoutMaster"),l.classList.add("pptxv-master-empty");else {let p=chunk6TALMZ42_cjs.w(e,"section","pptxv-master-card"),d=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-card-label");d.textContent=t("pptx.master.handoutSlidesPerPage");let u=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-counts");for(let c of WI){let x=chunk6TALMZ42_cjs.w(e,"button","pptxv-master-count");x.type="button",x.textContent=String(c),x.setAttribute("aria-pressed",String(o.handoutSlidesPerPage===c)),x.classList.toggle("is-active",o.handoutSlidesPerPage===c),x.addEventListener("click",()=>o.onHandoutSlidesPerPageChange(c)),u.appendChild(x);}p.append(d,u),l.appendChild(p),Cs(e,t,l,o.handoutBackground??"#ffffff",o.onMasterBackgroundColorChange),FE(e,t,l,o.handoutPlaceholders??[],"handout");}n.append(r,a,l);},setVisible(o){n.hidden=!o;}}}var VE=148;function Es(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-mobile-actions"),a=chunk6TALMZ42_cjs.w(e,"div","pptxv-mobile-sheet-host");a.setAttribute("role","dialog"),a.setAttribute("aria-modal","true");let l=e.createElement("button");l.type="button",l.className="pptxv-mobile-sheet-backdrop",l.setAttribute("aria-label",t("pptx.settings.close"));let p=chunk6TALMZ42_cjs.w(e,"section","pptxv-mobile-sheet"),d=chunk6TALMZ42_cjs.w(e,"header","pptxv-mobile-sheet-header"),u=chunk6TALMZ42_cjs.w(e,"span","pptxv-mobile-sheet-handle"),c=e.createElement("strong");d.append(u,c);let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-mobile-sheet-body");p.append(d,x),a.append(l,p),a.hidden=true,s.appendChild(a);let b=null,g=0,v=[],f=[],y=true,S=false,h=null,C=960,w=540,T=r?e.createComment("inspector-home"):null;r?.parentNode?.insertBefore(T,r);let k=()=>{r&&T?.parentNode&&T.parentNode.insertBefore(r,T.nextSibling);},A=()=>{b=null,a.hidden=true,p.style.transform="",k();for(let R of I.querySelectorAll("button"))R.setAttribute("aria-pressed","false");};l.addEventListener("click",A);let P=chunkWKWWFY2C_cjs.gn((R,F)=>{p.style.transform=R>0?`translateY(${R}px)`:"",p.style.transition=F?"none":"";},A),E=R=>({clientY:R.clientY,pointerId:R.pointerId,currentTarget:d});d.addEventListener("pointerdown",R=>P.pointerDown(E(R))),d.addEventListener("pointermove",R=>P.pointerMove(E(R))),d.addEventListener("pointerup",R=>P.pointerUp(E(R))),d.addEventListener("pointercancel",R=>P.cancel(E(R)));let M=R=>{if(x.replaceChildren(),c.textContent=t(R==="inspector"?"pptx.field.format":`pptx.${R==="slides"?"sections.slides":R==="comments"?"toolbar.comments":R==="insert"?"mobileBar.insert":"mobileToolbar.menu"}`),a.setAttribute("aria-label",c.textContent),R==="slides"){let F=chunk6TALMZ42_cjs.w(e,"div","pptxv-mobile-slide-list"),H=VE/Math.max(C,1);for(let V=0;V<v.length;V+=1){let N=e.createElement("button");N.type="button";let B=chunkWKWWFY2C_cjs.Ot(v[V],V);N.setAttribute("aria-label",B),N.classList.toggle("is-active",V===g),V===g&&N.setAttribute("aria-current","true");let $=chunk6TALMZ42_cjs.w(e,"span","pptxv-mobile-slide-num");if($.textContent=String(V+1),N.appendChild($),h){let Y=chunk6TALMZ42_cjs.w(e,"span","pptxv-mobile-slide-frame",{width:`${VE}px`,height:`${Math.round(w*H)}px`});Y.appendChild(h(v[V],H)),N.appendChild(Y);}else {let Y=chunk6TALMZ42_cjs.w(e,"span","pptxv-mobile-slide-title");Y.textContent=B,N.appendChild(Y);}N.addEventListener("click",()=>{o(V),A();}),F.appendChild(N);}x.appendChild(F);}else if(R==="insert"){let F=[[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[H,V]of F){let N=e.createElement("button");N.type="button",N.textContent=H,N.addEventListener("click",V),x.appendChild(N);}}else if(R==="inspector"&&r)x.appendChild(r);else if(R==="comments"){f.length===0&&(x.textContent=t("pptx.comments.noneOnSlide"));for(let N of f){let B=chunk6TALMZ42_cjs.w(e,"article","pptxv-mobile-comment"),$=e.createElement("textarea");$.value=N.text,$.setAttribute("aria-label",t("pptx.comments.edit"));let Y=chunk6TALMZ42_cjs.w(e,"div","pptxv-mobile-comment-actions"),ie=e.createElement("button");ie.type="button",ie.textContent=t("pptx.comments.save"),ie.addEventListener("click",()=>n.edit.comments.editComment(N.id,$.value));let _=e.createElement("button");_.type="button",_.textContent=N.resolved?t("pptx.comments.unresolve"):t("pptx.comments.resolve"),_.addEventListener("click",()=>n.edit.comments.toggleCommentResolved(N.id));let K=e.createElement("button");K.type="button",K.textContent=t("pptx.comments.delete"),K.addEventListener("click",()=>n.edit.comments.deleteComment(N.id)),Y.append(ie,_,K),B.append($,Y),x.appendChild(B);}let F=chunk6TALMZ42_cjs.w(e,"div","pptxv-mobile-comment-add"),H=e.createElement("textarea");H.placeholder=t("pptx.comments.addPlaceholder"),H.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(H.value)&&(H.value="");}),F.append(H,V),x.appendChild(F);}else {let F=[[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[H,V,N]of F){if(N&&chunkWKWWFY2C_cjs.Tp(N,i))continue;let B=e.createElement("button");B.type="button",B.textContent=H,B.addEventListener("click",V),x.appendChild(B);}}},I=e.createElement("nav");I.setAttribute("aria-label",t("pptx.mobileBar.ariaLabel"));let D=R=>{if(b=chunkWKWWFY2C_cjs.Dm(b,R),!b){A();return}M(b),a.hidden=false;for(let F of I.querySelectorAll("button"))F.setAttribute("aria-pressed",String(F.dataset.mobileAction===b));},L={slides:"layers",insert:"plus",inspector:"sliders",comments:"comment",notes:"sticky-note"};for(let R of chunkWKWWFY2C_cjs.Em({slideCount:0})){let F=R.key;if(F==="notes"&&chunkWKWWFY2C_cjs.Tp("notes",i))continue;let H=e.createElement("button");H.type="button",H.dataset.mobileAction=F,F==="notes"&&H.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),H.appendChild(chunk6TALMZ42_cjs.K(e,L[F]));let V=chunk6TALMZ42_cjs.w(e,"span");V.textContent=t(F==="inspector"?"pptx.field.format":`pptx.${F==="slides"?"sections.slides":F==="comments"?"toolbar.comments":F==="insert"?"mobileBar.insert":"notes.title"}`),H.appendChild(V),H.addEventListener("click",()=>{if(F==="notes"){n.nav.toggleNotes();return}if(F==="insert"){n.insert.insert("text");return}D(F);}),I.appendChild(H);}s.appendChild(I);let O=()=>{let R=chunkWKWWFY2C_cjs.Em({slideCount:v.length});for(let F of R){let H=I.querySelector(`button[data-mobile-action='${F.key}']`);if(!H)continue;let V=F.key==="insert"||F.key==="inspector"||F.key==="comments";H.disabled=F.disabled||V&&!y||F.key==="inspector"&&!r,H.setAttribute("aria-pressed",String(F.key==="notes"?S:F.key===b));}};return {el:s,update(R,F,H){g=R,v=F,f=H,b&&M(b),O();},setThumbnailRenderer(R,F,H){h=R,C=F,w=H,b==="slides"&&M(b);},toggle:D,close:A,setEditable(R){y=R,!y&&b&&["insert","inspector","comments"].includes(b)&&A(),O();},setNotesExpanded(R){S=R,O();}}}function Ts(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-mobile-toolbar");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.mobileToolbar.toolbar"));let i=z(e,{label:t("pptx.mobileToolbar.menu"),icon:"menu",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.openMenu}),s=chunkWKWWFY2C_cjs.Tp("undo",o)?null:z(e,{label:t("pptx.toolbar.undo"),icon:"undo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.undo}),a=chunkWKWWFY2C_cjs.Tp("redo",o)?null:z(e,{label:t("pptx.toolbar.redo"),icon:"redo",className:"pptxv-mobile-toolbar-btn pptxv-mobile-toolbar-edit",onClick:n.redo}),l=chunk6TALMZ42_cjs.w(e,"span","pptxv-mobile-toolbar-spacer"),p=z(e,{label:t("pptx.toolbar.save"),icon:"download",className:"pptxv-mobile-toolbar-btn",onClick:n.save}),d=chunkWKWWFY2C_cjs.Tp("fullscreen",o)?null:z(e,{label:t("pptx.toolbar.present"),icon:"presentation",className:"pptxv-mobile-toolbar-btn pptxv-mobile-present",onClick:n.present}),u=chunk6TALMZ42_cjs.w(e,"span","pptxv-mobile-toolbar-ai"),c=chunk6TALMZ42_cjs.w(e,"span","pptxv-mobile-toolbar-collaboration");return r.append(i.btn,...s?[s.btn]:[],...a?[a.btn]:[],l,u,p.btn,...d?[d.btn]:[],c),{el:r,collaborationHost:c,aiHost:u,setEditState({editable:x,canUndo:b,canRedo:g}){for(let v of [i.btn,s?.btn,a?.btn])v&&(v.hidden=!x);c.hidden=!x,u.hidden=!x,s?.setDisabled(!b),a?.setDisabled(!g);}}}function Ps(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-notes");r.dataset.pptxChrome="notes";let i=chunk6TALMZ42_cjs.w(e,"button","pptxv-notes-header");i.dataset.pptxChrome="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 s=chunk6TALMZ42_cjs.w(e,"span","pptxv-notes-title");s.textContent=t("pptx.notes.title"),i.appendChild(s);let a=chunk6TALMZ42_cjs.w(e,"span","pptxv-notes-chevron");a.setAttribute("aria-hidden","true"),i.appendChild(a);let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-notes-body");l.id="slide-notes-content",r.appendChild(l);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-notes-toolbar");l.appendChild(p);let d=e.createElement("button");d.type="button",d.className="pptxv-notes-mode",p.appendChild(d);let u=chunk6TALMZ42_cjs.w(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")),l.appendChild(u);let c=e.createElement("textarea");c.className="pptxv-notes-textarea",c.name="slide-notes",c.spellcheck=true,c.setAttribute("aria-label",t("pptx.presenter.speakerNotes")),l.appendChild(c);let x=false,b=null,g=false,v=chunkWKWWFY2C_cjs.fg(),f=[],y,S,h=A=>{v=A,u.hidden=!v,c.hidden=v,p.hidden=!g,d.textContent=t(v?"pptx.notes.plainEditor":"pptx.notes.richEditor"),d.setAttribute("aria-pressed",String(v));},C=()=>{if(!g)return;let A=chunkWKWWFY2C_cjs.gg(u);f=A.segments,o(A.text,A.segments);},w=(A,P,E)=>{let M=e.createElement("button");M.type="button",M.className="pptxv-notes-tool",M.textContent=A,M.title=P,M.setAttribute("aria-label",P),M.addEventListener("mousedown",I=>I.preventDefault()),M.addEventListener("click",()=>{u.focus(),E(),C();}),p.insertBefore(M,d);};w("B",t("pptx.notes.bold"),()=>chunkWKWWFY2C_cjs.ig("bold")),w("I",t("pptx.notes.italic"),()=>chunkWKWWFY2C_cjs.ig("italic")),w("U",t("pptx.notes.underline"),()=>chunkWKWWFY2C_cjs.ig("underline")),w("S",t("pptx.notes.strikethrough"),()=>chunkWKWWFY2C_cjs.ig("strikeThrough")),w("\u2022",t("pptx.notes.bulletList"),()=>{f=chunkWKWWFY2C_cjs.hg(u,f,"bullet").segments,u.innerHTML=chunkWKWWFY2C_cjs.cg(f);}),w("1.",t("pptx.notes.numberedList"),()=>{f=chunkWKWWFY2C_cjs.hg(u,f,"numbered").segments,u.innerHTML=chunkWKWWFY2C_cjs.cg(f);}),w("\u2192",t("pptx.notes.indent"),()=>{f=chunkWKWWFY2C_cjs.hg(u,f,"indent").segments,u.innerHTML=chunkWKWWFY2C_cjs.cg(f);}),w("\u2190",t("pptx.notes.outdent"),()=>{f=chunkWKWWFY2C_cjs.hg(u,f,"outdent").segments,u.innerHTML=chunkWKWWFY2C_cjs.cg(f);}),w("\u2197",t("pptx.notes.insertLink"),()=>{let A=e.getSelection()?.toString()??"",P=window.prompt(t("pptx.notes.linkUrl"),"https://");if(!P)return;let E=window.prompt(t("pptx.notes.linkDisplayText"),A)??A;chunkWKWWFY2C_cjs.kg(chunkWKWWFY2C_cjs.jg(P),E);}),w("\u{1F5A8}",t("pptx.notes.printNotes"),()=>{if(!y)return;let A=chunkWKWWFY2C_cjs.lg([y],M=>t("pptx.notes.slideN",{n:M}),S),P=e.createElement("iframe");P.setAttribute("aria-hidden","true"),P.setAttribute("sandbox","allow-same-origin"),P.style.cssText="position:fixed;right:0;bottom:0;width:0;height:0;border:0",e.body.appendChild(P);let E=P.contentWindow?.document;if(!E){P.remove();return}E.open(),E.write(A),E.close(),setTimeout(()=>{P.contentWindow?.focus(),P.contentWindow?.print(),setTimeout(()=>P.remove(),1e3);},200);}),d.addEventListener("click",()=>{v?(C(),c.value=chunkWKWWFY2C_cjs.bg(f)):(f=chunkWKWWFY2C_cjs.ag(c.value),u.innerHTML=chunkWKWWFY2C_cjs.cg(f)),h(!v);});let T=()=>{g&&o(c.value);};c.addEventListener("change",T),c.addEventListener("blur",T),u.addEventListener("blur",C);let k=()=>{r.dataset.collapsed=x?"false":"true",i.setAttribute("aria-expanded",String(x)),l.hidden=!x,a.textContent=x?"\u25BE":"\u25B8";};return k(),h(v),{el:r,update({slide:A,editable:P,notesStyle:E}){g=P,y=A,S=E;let M=A!==void 0;c.disabled=!M,c.readOnly=!g,u.contentEditable=String(g&&M),p.hidden=!g,c.placeholder=t(M?"pptx.notes.addSpeakerNotes":"pptx.notes.noSlide");let I=A?.id??null;I!==b&&(b=I,f=chunkWKWWFY2C_cjs.eg(A,E),c.value=chunkWKWWFY2C_cjs.bg(f),u.innerHTML=chunkWKWWFY2C_cjs.cg(f));},setExpanded(A){x=A,k();}}}function zE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-present-palette");o.hidden=true;let r=n.colors.map(i=>{let s=chunk6TALMZ42_cjs.w(e,"button","pptxv-present-swatch");s.type="button",s.dataset.pptxPresentSwatch=i,s.style.backgroundColor=i;let a=t(n.swatchLabelKey,{color:i});return s.title=a,s.setAttribute("aria-label",a),s.addEventListener("click",l=>{l.stopPropagation(),n.onPick(i);}),o.appendChild(s),{color:i,swatch:s}});return {el:o,setOpen(i){o.hidden=!i;},isOpen:()=>!o.hidden,setValue(i){for(let s of r){let a=s.color===i;s.swatch.classList.toggle("is-selected",a),s.swatch.setAttribute("aria-pressed",String(a));}}}}function qe(e,t,n){let o=z(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 XI(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-present-group"),r=qe(e,t,{id:n.id,labelKey:n.labelKey,icon:n.icon,onClick:n.onSelect}),i=chunk6TALMZ42_cjs.w(e,"span","pptxv-present-swatch-bar");r.btn.appendChild(i);let s=qe(e,t,{id:`${n.id}-color`,labelKey:n.caretLabelKey,icon:"chevron-down",className:"pptxv-present-caret",onClick:n.onCaret}),a=zE(e,t,{colors:n.colors,swatchLabelKey:n.swatchLabelKey,onPick:n.onPick});return o.append(r.btn,s.btn,a.el),{el:o,toggle:r,palette:a,bar:i}}function BE(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-present-toolbar-wrap");for(let[k,A]of Object.entries(chunkWKWWFY2C_cjs.Bk()))r.style.setProperty(k,A);let i=chunk6TALMZ42_cjs.w(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 s=k=>{let A=chunk6TALMZ42_cjs.w(e,"div","pptxv-present-divider");return A.dataset.pptxPresentControl=k,A},a=qe(e,t,{id:"previous",labelKey:"pptx.presenter.previousSlide",icon:"chevron-left",onClick:n.previous}),l=chunk6TALMZ42_cjs.w(e,"span","pptxv-present-counter");l.dataset.pptxPresentControl="counter";let p=qe(e,t,{id:"next",labelKey:"pptx.presenter.nextSlide",icon:"chevron-right",onClick:n.next}),d=chunk6TALMZ42_cjs.w(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=chunk6TALMZ42_cjs.w(e,"span","pptxv-present-elapsed");d.append(chunk6TALMZ42_cjs.K(e,"timer"),u);let c=qe(e,t,{id:"laser",labelKey:"pptx.presentation.laserPointer",icon:"cursor",onClick:()=>n.setTool("laser")}),x=null,b=()=>{f.palette.setOpen(x==="pen"),y.palette.setOpen(x==="highlighter");},g=()=>{x=null,b();},v=k=>XI(e,t,{...k,onSelect:()=>{g(),n.setTool(k.id);},onPick:A=>{g(),n.setColor(A),n.setTool(k.id),o(k.id,A);},onCaret:()=>{x=x===k.id?null:k.id,b();}}),f=v({id:"pen",labelKey:"pptx.presentation.pen",icon:"pen",caretLabelKey:"pptx.presentationToolbar.penColor",colors:chunkWKWWFY2C_cjs.xk,swatchLabelKey:"pptx.presentationToolbar.penColorValue"}),y=v({id:"highlighter",labelKey:"pptx.presentation.highlighter",icon:"highlighter",caretLabelKey:"pptx.presentationToolbar.highlighterColor",colors:chunkWKWWFY2C_cjs.yk,swatchLabelKey:"pptx.presentationToolbar.highlighterColorValue"}),S=qe(e,t,{id:"eraser",labelKey:"pptx.presentation.eraser",icon:"eraser",onClick:()=>{g(),n.setTool("eraser");}}),h=qe(e,t,{id:"blackboard",labelKey:"pptx.presentation.blackboard",icon:"presentation",onClick:()=>{g(),n.toggleBlackboard();}}),C=qe(e,t,{id:"clear",labelKey:"pptx.presentation.clearAnnotations",icon:"trash",className:"pptxv-present-danger",onClick:n.clearAnnotations}),w=qe(e,t,{id:"presenter-view",labelKey:"pptx.presenter.presenterView",icon:"panel-right",onClick:n.togglePresenterView}),T=qe(e,t,{id:"end",labelKey:"pptx.presenter.endPresentation",icon:"close",className:"pptxv-present-danger",onClick:n.end});i.append(a.btn,l,p.btn,s("divider-navigation"),d,s("divider-timer"),c.btn,f.el,y.el,S.btn,h.btn,C.btn,s("divider-tools"),w.btn,T.btn);for(let k of ["pointerdown","click"])i.addEventListener(k,A=>A.stopPropagation());return {wrap:r,bar:i,previous:a,counter:l,next:p,elapsedText:u,laser:c,pen:f,highlighter:y,eraser:S,blackboard:h,clear:C,presenterView:w,end:T,closePalettes:g}}function As(e,t,n,o){let r={current:0,total:0,tool:"none",blackout:"none",hasAnnotations:false,presenterViewActive:false},i=chunkWKWWFY2C_cjs.xk[0]??"#ff0000",s=chunkWKWWFY2C_cjs.yk[0]??"#ffff00",a=BE(e,t,o,(T,k)=>{T==="pen"?i=k:s=k,d();}),{wrap:l,bar:p}=a;function d(){a.counter.textContent=chunkWKWWFY2C_cjs.Ak(r.current,r.total),a.previous.setDisabled(r.current<=0),a.next.setDisabled(r.current>=r.total-1),a.laser.setActive(r.tool==="laser"),a.pen.toggle.setActive(r.tool==="pen"),a.highlighter.toggle.setActive(r.tool==="highlighter"),a.eraser.setActive(r.tool==="eraser"),a.blackboard.setActive(chunkWKWWFY2C_cjs.Ek(r.blackout,r.tool)),a.clear.setDisabled(!r.hasAnnotations),a.presenterView.setActive(r.presenterViewActive),a.pen.bar.style.backgroundColor=i,a.highlighter.bar.style.backgroundColor=s,a.pen.palette.setValue(i),a.highlighter.palette.setValue(s);}let u=null,c=false,x=false,b=0,g=null,v=T=>{c=T,l.style.opacity=T?"1":"0",l.style.pointerEvents=T?"auto":"none";},f=()=>{u!==null&&(window.clearTimeout(u),u=null);},y=()=>{f(),u=window.setTimeout(()=>{x||v(false);},chunkWKWWFY2C_cjs.wk);},S=T=>{let k=n.getBoundingClientRect();if(chunkWKWWFY2C_cjs.zk(T.clientY,k.height,k.top)){v(true),y();return}v(true),y();},h=T=>{T.target instanceof Node&&!p.contains(T.target)&&a.closePalettes();};l.addEventListener("mouseenter",()=>{x=true,f(),v(true);}),l.addEventListener("mouseleave",()=>{x=false,y();});let C=()=>{a.elapsedText.textContent=chunkWKWWFY2C_cjs.Uj(b===0?0:Date.now()-b);},w=()=>{e.removeEventListener("mousemove",S),e.removeEventListener("mousedown",h),f(),g!==null&&(window.clearInterval(g),g=null),b=0,x=false,a.closePalettes(),C(),v(false);};return v(false),C(),d(),{el:l,update(T){Object.assign(r,T),d();},setPresenting(T){if(!T){w();return}b=Date.now(),C(),g??=window.setInterval(C,1e3),e.addEventListener("mousemove",S),e.addEventListener("mousedown",h),v(true),y();},toggleVisible(){if(c){f(),v(false);return}v(true),y();},dispose(){w(),l.remove();}}}function ks(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-presentation-touch-controls");r.setAttribute("role","toolbar"),r.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let i=z(e,{label:t("pptx.presenter.endPresentation"),text:"\xD7",className:"pptxv-presentation-touch-exit",onClick:n.exit}),s=!chunkWKWWFY2C_cjs.Tp("navigation",o),a=s?z(e,{label:t("pptx.presenter.previousSlide"),icon:"chevron-left",className:"pptxv-presentation-touch-prev",onClick:n.previous}):null,l=s?z(e,{label:t("pptx.presenter.nextSlide"),icon:"chevron-right",className:"pptxv-presentation-touch-next",onClick:n.next}):null,p=chunk6TALMZ42_cjs.w(e,"span","pptxv-presentation-touch-counter");p.setAttribute("aria-live","polite");for(let d of [i.btn,a?.btn,l?.btn])d?.addEventListener("pointerdown",u=>u.stopPropagation()),d?.addEventListener("click",u=>u.stopPropagation());return r.append(i.btn,...a?[a.btn]:[],...l?[l.btn]:[],p),{el:r,update(d,u){let c=chunkWKWWFY2C_cjs.fn(d,u);a?.setDisabled(c.previousDisabled),l?.setDisabled(c.nextDisabled),p.textContent=c.counterLabel;}}}function Is(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-protected-view");o.hidden=true,o.setAttribute("role","alert"),o.appendChild(chunk6TALMZ42_cjs.K(e,"lock"));let r=chunk6TALMZ42_cjs.w(e,"span","pptxv-protected-view-text"),i=chunk6TALMZ42_cjs.w(e,"strong");i.textContent=t("pptx.security.protectedViewTitle"),r.append(i,": ",t("pptx.options.trust.protectedViewInfo"));let s=chunk6TALMZ42_cjs.w(e,"button","pptxv-protected-view-enable");return s.type="button",s.textContent=t("pptx.security.enableEditing"),s.addEventListener("click",n),o.append(r,s),{el:o,setActive(a){o.hidden=!a;}}}function NE(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-readonly-banner");s.dataset.testid="pptx-readonly-banner",s.hidden=true,s.setAttribute("role","alert"),s.appendChild(chunk6TALMZ42_cjs.K(e,"lock"));let a=chunk6TALMZ42_cjs.w(e,"span","pptxv-readonly-banner-text"),l=chunk6TALMZ42_cjs.w(e,"button","pptxv-readonly-banner-edit");l.type="button",l.dataset.testid="pptx-readonly-edit-anyway",l.textContent=t("pptx.readOnly.editAnyway"),l.addEventListener("click",n);let p=chunk6TALMZ42_cjs.w(e,"button","pptxv-readonly-banner-dismiss");p.type="button",p.dataset.testid="pptx-readonly-dismiss",p.setAttribute("aria-label",t("pptx.readOnly.dismiss")),p.appendChild(chunk6TALMZ42_cjs.K(e,"close")),p.addEventListener("click",o);let d=chunk6TALMZ42_cjs.w(e,"form","pptxv-readonly-banner-password-form");d.dataset.testid="pptx-readonly-password-form",d.hidden=true;let u=chunk6TALMZ42_cjs.w(e,"label","pptxv-sr-only");u.textContent=t("pptx.readOnly.passwordLabel"),u.setAttribute("for","pptxv-readonly-password-input");let c=chunk6TALMZ42_cjs.w(e,"input","pptxv-readonly-banner-password-input");c.id="pptxv-readonly-password-input",c.type="password",c.dataset.testid="pptx-readonly-password-input",c.placeholder=t("pptx.readOnly.passwordPlaceholder");let x=chunk6TALMZ42_cjs.w(e,"button","pptxv-readonly-banner-unlock");x.type="submit",x.dataset.testid="pptx-readonly-unlock",x.textContent=t("pptx.readOnly.unlock");let b=chunk6TALMZ42_cjs.w(e,"button","pptxv-readonly-banner-password-cancel");b.type="button",b.dataset.testid="pptx-readonly-password-cancel",b.textContent=t("pptx.common.cancel"),b.addEventListener("click",i);let g=chunk6TALMZ42_cjs.w(e,"span","pptxv-readonly-banner-password-error");return g.dataset.testid="pptx-readonly-password-error",g.setAttribute("role","alert"),g.id="pptxv-readonly-password-error",g.hidden=true,d.addEventListener("submit",v=>{v.preventDefault(),r(c.value);}),d.append(u,c,x,b,g),s.append(a,l,p,d),{el:s,update(v,f,y){let S=v!==null&&!f;if(s.hidden=!S,!S||!v)return;s.dataset.kind=v.kind??"",a.textContent=t(v.messageKey);let h=y.promptOpen;if(l.hidden=h,p.hidden=h,d.hidden=!h,!h)return;c.disabled=y.checking,x.disabled=y.checking;let C=y.error!==null;c.setAttribute("aria-invalid",String(C)),c.setAttribute("aria-describedby",C?g.id:""),C||c.removeAttribute("aria-describedby"),g.hidden=!C,C&&(g.textContent=t(y.error==="wrong-password"?"pptx.readOnly.wrongPassword":"pptx.readOnly.unsupportedAlgorithm"));}}}function _E(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-eqdlg-root");o.hidden=true;let r=chunk6TALMZ42_cjs.w(e,"button","pptxv-eqdlg-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.equation.cancel"));let i=chunk6TALMZ42_cjs.w(e,"section","pptxv-eqdlg");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-label",t("pptx.equation.insertTitle"));let s=chunk6TALMZ42_cjs.w(e,"header","pptxv-eqdlg-header"),a=chunk6TALMZ42_cjs.w(e,"h2");a.textContent=t("pptx.equation.insertTitle");let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-eqdlg-close");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",t("pptx.settings.close")),s.append(a,l);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-eqdlg-preview"),d=chunk6TALMZ42_cjs.w(e,"label","pptxv-eqdlg-field"),u=chunk6TALMZ42_cjs.w(e,"span","pptxv-eqdlg-label");u.textContent=t("pptx.equation.latexInput");let c=e.createElement("textarea");c.className="pptxv-eqdlg-input",c.rows=3,c.placeholder="\\frac{a}{b} + \\sqrt{c}",c.spellcheck=false;let x=chunk6TALMZ42_cjs.w(e,"span","pptxv-eqdlg-hint");x.textContent=t("pptx.equation.latexHint"),d.append(u,c,x);let b=chunk6TALMZ42_cjs.w(e,"div","pptxv-eqdlg-field"),g=chunk6TALMZ42_cjs.w(e,"span","pptxv-eqdlg-label");g.textContent=t("pptx.equation.templates");let v=chunk6TALMZ42_cjs.w(e,"div","pptxv-eqdlg-grid"),f=[],y=chunkWKWWFY2C_cjs.rb();for(let[I,D]of chunkWKWWFY2C_cjs.ob.entries()){let L=chunk6TALMZ42_cjs.w(e,"button","pptxv-eqdlg-template");L.type="button",L.title=t(D.i18nKey);let O=chunk6TALMZ42_cjs.w(e,"span","pptxv-eqdlg-template-math");O.innerHTML=y[I]??"";let R=chunk6TALMZ42_cjs.w(e,"span","pptxv-eqdlg-template-label");R.textContent=t(D.i18nKey),L.append(O,R),L.addEventListener("click",()=>{c.value=D.latex,A(),c.focus();}),v.appendChild(L),f.push(L);}b.append(g,v);let S=()=>{let I=c.value.trim();if(!I)return null;try{let D=chunkWKWWFY2C_cjs.nb(I);return Object.keys(D).length>0?D:null}catch{return null}},h=true,C,w=chunk6TALMZ42_cjs.w(e,"footer","pptxv-eqdlg-footer"),T=z(e,{label:t("pptx.equation.cancel"),text:t("pptx.equation.cancel"),onClick:()=>E(false)}),k=z(e,{label:t("pptx.equation.insert"),text:t("pptx.equation.insert"),onClick:()=>{let I=S();I&&(n(I,C),c.value="",A(),E(false));}});k.btn.classList.add("is-primary"),w.append(T.btn,k.btn),i.append(s,p,d,b,w),o.append(r,i);let A=()=>{let I=chunkWKWWFY2C_cjs.qb(c.value);I?(p.classList.remove("is-empty"),p.innerHTML=I):(p.classList.add("is-empty"),p.textContent=t("pptx.equation.previewPlaceholder"));let D=c.value;for(let[L,O]of f.entries())O.classList.toggle("is-active",chunkWKWWFY2C_cjs.ob[L]?.latex===D);k.setDisabled(!h||S()===null);};c.addEventListener("input",A),o.addEventListener("keydown",I=>{I.stopPropagation(),I.key==="Escape"?E(false):I.key==="Enter"&&(I.ctrlKey||I.metaKey)&&(I.preventDefault(),k.btn.click());}),r.addEventListener("click",()=>E(false)),l.addEventListener("click",()=>E(false));let P=false,E=I=>{P=I,o.hidden=!P,P?c.focus():C=void 0;},M=()=>{let I=C!==void 0,D=t(I?"pptx.equation.editTitle":"pptx.equation.insertTitle"),L=t(I?"pptx.equation.update":"pptx.equation.insert");i.setAttribute("aria-label",D),a.textContent=D,k.btn.textContent=L,k.btn.title=L,k.btn.setAttribute("aria-label",L);};return A(),{el:o,toggle:()=>{P||(C=void 0,c.value="",M(),A()),E(!P);},setOpen:E,isOpen:()=>P,setEditable(I){h=I,c.disabled=!I,k.setDisabled(!I||S()===null);},openEdit(I,D){C=I,c.value=chunkWKWWFY2C_cjs.mb(D),M(),A(),E(true);}}}function Ls(e,t,n){let o=chunk6TALMZ42_cjs.w(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 s=chunk6TALMZ42_cjs.w(e,"label","pptxv-findreplace-checkbox"),a=e.createElement("input");a.type="checkbox",a.setAttribute("aria-label",t("pptx.findReplace.toggleMatchCase")),s.append(a,e.createTextNode(t("pptx.findReplace.matchCase")));let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-findreplace-status");l.setAttribute("aria-live","polite");let p=()=>{let f=n.search(r.value,a.checked);l.textContent=f>0?t("pptx.findReplace.matchCount",{current:1,total:f}):t("pptx.findReplace.noMatches");},d=z(e,{label:t("pptx.findReplace.searchText"),text:t("pptx.findReplace.title"),onClick:p}),u=z(e,{label:t("pptx.findReplace.replaceCurrent"),text:t("pptx.findReplace.replace"),onClick:()=>{n.replaceCurrent(r.value,i.value,a.checked),p();}}),c=z(e,{label:t("pptx.findReplace.replaceAllMatches"),text:t("pptx.findReplace.replaceAll"),onClick:()=>{n.replaceAll(r.value,i.value,a.checked),p();}}),x=z(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>v(false)});r.addEventListener("input",p),r.addEventListener("keydown",f=>{f.key==="Escape"&&(f.stopPropagation(),v(false));});let b=chunk6TALMZ42_cjs.w(e,"div","pptxv-findreplace-row");b.append(r,i,s,d.btn,u.btn,c.btn,x.btn),o.append(b,l);let g=false,v=f=>{g=f,o.hidden=!g,g&&r.focus();};return {el:o,toggle:()=>v(!g),setOpen:v,isOpen:()=>g,setEditable(f){i.disabled=!f,u.setDisabled(!f),c.setDisabled(!f);}}}function GE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-format-background-panel");o.hidden=true,o.setAttribute("role","dialog"),o.setAttribute("aria-label",t("pptx.ribbon.formatBackground"));let r=He(e,{label:t("pptx.slideBackground.colourAriaLabel"),onInput:x=>n.setSlideBackgroundColor(x),onCommit:x=>n.pushRecentColor?.(x)},"#ffffff"),i=z(e,{label:t("pptx.slideBackground.clearBackground"),text:t("pptx.slideBackground.clearBackground"),onClick:()=>n.clearSlideBackground()}),s=z(e,{label:t("pptx.findReplace.closeAriaLabel"),icon:"chevron-up",onClick:()=>c(false)}),a=chunk6TALMZ42_cjs.w(e,"div","pptxv-format-background-row"),l=chunk6TALMZ42_cjs.w(e,"span","pptxv-format-background-label");l.textContent=t("pptx.slideBackground.colour"),a.append(l,r.el,i.btn,s.btn),o.appendChild(a);let p=chunk6TALMZ42_cjs.w(e,"label","pptxv-format-background-hide-row"),d=e.createElement("input");d.type="checkbox",d.addEventListener("change",()=>{n.setHideBackgroundGraphics(d.checked);}),p.append(d,e.createTextNode(t("pptx.slideBackground.hideBackgroundGraphics"))),o.appendChild(p);let u=false,c=x=>{u=x,o.hidden=!u;};return {el:o,toggle:()=>c(!u),setOpen:c,isOpen:()=>u,setEditable(x){r.setDisabled(!x),i.setDisabled(!x);}}}function Fo(e,t,n){if(!t)return n;let o=e(t);return o&&o!==t?o:n}function Ms(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"button","pptxv-gallery-tile");i.type="button",i.setAttribute(chunkWKWWFY2C_cjs.jr,n.id),i.setAttribute("aria-pressed",String(n.applied)),i.classList.toggle("is-applied",n.applied);let s=chunkWKWWFY2C_cjs.nr(n,t);return i.title=s,i.setAttribute("aria-label",s),i.innerHTML=n.previewSvg,i.disabled=o,i.addEventListener("mousedown",a=>a.preventDefault()),i.addEventListener("click",()=>r(n)),i}function QI(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-gallery-section");if(i.dataset.gallerySection=n.id,n.titleKey||n.title){let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-gallery-heading");a.textContent=Fo(t,n.titleKey,n.title??""),i.appendChild(a);}let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-gallery-grid");s.style.gridTemplateColumns=`repeat(${Math.max(1,n.columns)}, max-content)`;for(let a of n.items)s.appendChild(Ms(e,t,a,o,r));return i.appendChild(s),i}function UE(e,t,n,o,r,i){n.replaceChildren(...o.sections.filter(s=>s.items.length>0).map(s=>QI(e,t,s,r,i)));}var ZI=4;function je(e,t,n){let o=()=>{let{top:r,left:i,right:s}=chunkWKWWFY2C_cjs.Qk(t.getBoundingClientRect(),{alignRight:n?.alignRight});e.style.position="fixed",e.style.margin="0",e.style.top=`${r+ZI}px`,e.style.left=i===null?"auto":`${i}px`,e.style.right=s===null?"auto":`${s}px`;};return o(),window.addEventListener("resize",o),document.addEventListener("scroll",o,true),{update:o,destroy(){window.removeEventListener("resize",o),document.removeEventListener("scroll",o,true);}}}var JI={shapeStyles:"palette",shapeEffects:"sparkles",wordArtStyles:"font-color",pictureStyles:"image",pictureCorrections:"sliders",pictureColor:"paintbrush",pictureArtisticEffects:"sparkles",bullets:"bullet-list",numbering:"numbered-list",tableStyles:"table",chartStyles:"chart",chartColors:"paintbrush",chartQuickLayout:"layout",smartArtStyles:"smart-art",smartArtColors:"paintbrush",themeColors:"paintbrush",themeFonts:"font-color"};function at(e,t,n,o,r={}){let i=n.mode==="inline",s=chunk6TALMZ42_cjs.w(e,"div",`pptxv-gallery${i?" pptxv-gallery-inline":""}`);r.chevronOnly||s.setAttribute(chunkWKWWFY2C_cjs.Lq,n.control);let a=i?chunk6TALMZ42_cjs.w(e,"div","pptxv-gallery-strip"):null,l=chunk6TALMZ42_cjs.w(e,"button",i?"pptxv-gallery-more":`pptxv-dropdown-trigger pptxv-gallery-trigger${r.chevronOnly?" pptxv-gallery-chevron":""}`);l.type="button",r.chevronOnly&&(l.dataset.pptxChrome="gallery-caret"),l.setAttribute(chunkWKWWFY2C_cjs.hr,n.gallery),l.setAttribute("aria-haspopup","true"),l.setAttribute("aria-expanded","false");let p=chunk6TALMZ42_cjs.w(e,"span","pptxv-dropdown-text");!i&&!r.chevronOnly&&l.append(chunk6TALMZ42_cjs.K(e,JI[n.gallery]),p),l.appendChild(chunk6TALMZ42_cjs.K(e,"chevron-down"));let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-gallery-popup");d.setAttribute(chunkWKWWFY2C_cjs.ir,n.gallery),d.setAttribute("role","dialog"),d.hidden=true,a&&s.appendChild(a),s.append(l);let u=null,c=true,x=null,b=true,g=h=>{s.contains(h.target)||f(false);};function v(){b&&u&&(UE(e,t,d,u,c,y),b=false);}function f(h){let C=h&&!c;C&&v(),d.hidden=!C,C?s.append(d):d.remove(),l.setAttribute("aria-expanded",String(C)),l.classList.toggle("is-active",C),x?.destroy(),x=C?je(d,l):null,e.removeEventListener("pointerdown",g),C&&e.addEventListener("pointerdown",g);}let y=h=>{f(false),o.pick(n.gallery,h.id),chunkWKWWFY2C_cjs.tl(s.closest(".pptxv"));};l.addEventListener("mousedown",h=>h.preventDefault()),l.addEventListener("click",h=>{h.stopPropagation(),f(d.hidden===true);}),s.addEventListener("keydown",h=>{h.key==="Escape"&&d.hidden!==true&&(h.stopPropagation(),f(false),l.focus());});let S={el:s,trigger:l,popup:d,isOpen:()=>d.hidden!==true,close:()=>f(false),refresh(h,C){u=chunkWKWWFY2C_cjs.ar(n.gallery,h),c=!C||u.disabled||!chunkWKWWFY2C_cjs.mr(u);let w=Fo(t,u.labelKey,u.label);p.textContent=w;let T=i?t("pptx.gallery.more",{name:w}):w;l.title=T,l.setAttribute("aria-label",T),l.disabled=c,s.classList.toggle("is-disabled",c),a?.replaceChildren(...chunkWKWWFY2C_cjs.lr(u).map(k=>Ms(e,t,k,c,y))),b=true,d.hidden!==true&&v(),c?f(false):x?.update();}};return o.register(S),S}function Ds(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");o.setAttribute(chunkWKWWFY2C_cjs.Kq,t);let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row"),i=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");return i.textContent=n,o.append(r,i),{el:o,row:r}}function eL(e,t,n,o){let r=Ds(e,n.group,Fo(t,n.labelKey,n.label));for(let i of n.galleries)r.row.appendChild(at(e,t,i,o).el);return r.el}function KE(e,t,n){let o=new Map;for(let{id:r}of chunkWKWWFY2C_cjs.Rp){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content pptxv-ribbon-contextual-content");i.dataset.ribbonContextualPane=r;for(let s of chunkWKWWFY2C_cjs.cr[r])i.appendChild(eL(e,t,s,n));o.set(r,i);}return o}function WE(e,t,n){for(let[o,r]of t)n.includes(o)?r.parentElement!==e&&e.appendChild(r):r.remove();}var $E={element:null};function ht(e){let t=[],n=$E,o=false,r=[],i=()=>{for(let s of t)s.refresh(n,o);};return {context:()=>n,register(s){t.push(s),s.refresh(n,o);},sync(s,a){let l=s??$E,p=[l.element,l.theme?.colorScheme,l.theme?.fontScheme,l.theme?.name,l.resolveStyleMatrix!==void 0,a];n=l,o=a,!(p.length===r.length&&p.every((d,u)=>d===r[u]))&&(r=p,i());},pick(s,a){let l=chunkWKWWFY2C_cjs.br(s,a,n);l&&e(l);},closeAll(){for(let s of t)s.close();}}}function qE(e,t,n){let o=chunkWKWWFY2C_cjs.Uf(t);if(!o||!("textSegments"in t))return;let r=chunkWKWWFY2C_cjs.nh(t.textSegments);if(chunkWKWWFY2C_cjs.Vf(e)!==r)return false;let i=chunkWKWWFY2C_cjs.ns(e,r),s=e.ownerDocument.createElement("div");return s.dataset.pptxTextFlow="",chunkWKWWFY2C_cjs.yh(s,o)?(e.replaceChildren(s),n(s,o),i&&chunkWKWWFY2C_cjs.Wf(o,s,i),true):false}function jE(e){let t=Array.from(e.childNodes).filter(n=>n.nodeType===3?(n.nodeValue??"").length>0:n instanceof HTMLElement&&!n.hasAttribute("data-pptx-bullet-marker"));return t.length!==1||!(t[0]instanceof HTMLElement)?false:t[0].tagName==="BR"||jE(t[0])}function tL(e){return (e.matches("[data-seg-idx]")&&!e.hasAttribute("data-pptx-bullet-marker")?e:e.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])"))?.dataset.segIdx}function YE(e,t){let o=e.getSelection()?.anchorNode,i=(o?.nodeType===Node.ELEMENT_NODE?o:o?.parentElement)?.closest("[data-seg-idx]");if(!i||!t.contains(i))return;let s=i.closest("div, p"),a=s?.hasAttribute("data-pptx-text-flow"),l=a&&s?.previousElementSibling?.hasAttribute("data-pptx-text-flow")&&s.querySelector("[data-seg-idx]:not([data-pptx-bullet-marker])")===i,p=s&&s!==t&&(!a||l)&&t.contains(s)?s:i,d=p.previousElementSibling,u=d instanceof HTMLElement&&tL(d)===i.dataset.segIdx&&jE(d)?d:p;u.dataset.pptxParagraphStart="";}function XE(e,t,n){let o=e.ownerDocument,r=e;if(t?.length){let i=o.createElement("div");i.dataset.pptxTextFlow="",r=i,t.forEach((s,a)=>{let l=o.createElement("span");l.dataset.segIdx=String(a),chunkWKWWFY2C_cjs.Of(s)&&(l.dataset.pptxBulletMarker="",l.contentEditable="false");let p=a>0&&chunkWKWWFY2C_cjs.Of(t[a-1]),d=s.bulletInfo&&!s.bulletInfo.none;s.text.length===0&&a===t.length-1&&(p||d)?(l.dataset.pptxEmptyRun="",l.appendChild(o.createElement("br"))):l.textContent=s.text,i.appendChild(l);}),e.appendChild(i);}else e.textContent=n;return r}function Kr(e,t,n){let o=chunkWKWWFY2C_cjs.e(e)?e:void 0,r=o?.textSegments,i=o?.textStyle,s=n?.elementId===e.id?chunkWKWWFY2C_cjs.Fr(n,t):void 0;return {text:t,textSegments:s?.textSegments??chunkWKWWFY2C_cjs.ah(t,r,i)}}function Rs(e,t){if(chunkWKWWFY2C_cjs.e(e))return chunkWKWWFY2C_cjs.qg(e.textStyle,e.height,t)}function Os(e,t){return chunkWKWWFY2C_cjs.e(e)?chunkWKWWFY2C_cjs.rg(e.textStyle,e.height,t):"unchanged"}function Wr(e){return !e||!chunkWKWWFY2C_cjs.e(e)||!chunkWKWWFY2C_cjs.Le(e,"textEdit")?false:!e.textSegments?.some(t=>t.equationXml)}function io(){if(typeof document>"u")return;let e=document.querySelector("[data-inline-editor]");return e?chunkWKWWFY2C_cjs.Vf(e):void 0}function $r(e){let{doc:t,overlayRoot:n,box:o,scale:r,element:i}=e,s=chunkWKWWFY2C_cjs.e(i)?i:void 0,a=s?.text??"",l=s?.textStyle?.fontSize,p=s?.textStyle?.fontFamily,d=chunk6TALMZ42_cjs.w(t,"div","pptxv-inline-editor pptxv-inline-text-editor",{...chunk6TALMZ42_cjs.z(i),...typeof l=="number"?{fontSize:`${l}px`}:{},...p!==void 0?{fontFamily:p}:{},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");let u=d,c=!!e.collaboration?.patcher.isActive(),x=c?void 0:chunkWKWWFY2C_cjs.Uf(i),b,g;x?(u=t.createElement("div"),u.dataset.pptxTextFlow="",chunkWKWWFY2C_cjs.yh(u,x),d.append(u)):c||(u=XE(d,s?.textSegments,a));let v=chunkWKWWFY2C_cjs.Vf(d),f=false,y=()=>{let w=b?.read();return w?.kind==="supported"?w.snapshot:void 0},S=w=>{if(f)return;let T=b?.read();if(w!==null&&c&&T?.kind==="unsupported"&&(T.reason==="composition-active"||T.reason==="input-active"))return;let k=T?.kind==="supported"?T.snapshot:void 0;c&&!k&&(w=null),w!==null&&k&&(w=k.text),f=true,d.contains(t.activeElement)&&chunkWKWWFY2C_cjs.ul(d),w!==null&&(k?chunkWKWWFY2C_cjs.Gr(i,w,k):w!==v)&&(k?e.onCommit(w,k):e.onCommit(w)),b?.dispose(),d.remove(),e.onClose();};d.addEventListener("input",w=>{if(b){b.refresh();return}w.inputType==="insertParagraph"&&YE(t,d),e.onInput?.(chunkWKWWFY2C_cjs.Vf(d));}),d.addEventListener("blur",()=>S(chunkWKWWFY2C_cjs.Vf(d))),d.addEventListener("keydown",w=>{if(e.onLiveFormatKey?.(w)){w.preventDefault(),w.stopPropagation();return}w.stopPropagation(),w.key==="Escape"&&(w.preventDefault(),S(chunkWKWWFY2C_cjs.Vf(d)));}),d.addEventListener("pointerdown",w=>w.stopPropagation());let h=()=>{let w=b?.readSelection();e.onSelectionChange?.(w?w.kind==="supported"?w.selection:null:chunkWKWWFY2C_cjs.Zf(s?.textSegments));};d.addEventListener("keyup",h),d.addEventListener("pointerup",h);let C=(w,T)=>{d.style.textDecoration="none",d.style.textDecorationLine="none",u=w,b=chunkWKWWFY2C_cjs.Xf(w,T,{isCurrent:()=>!f&&d.isConnected,onRead:k=>e.onInput?.(k.kind==="supported"?k.snapshot.text:k.text,k.kind==="supported"?k.snapshot:void 0)});};return n.appendChild(d),c?(g=chunkWKWWFY2C_cjs.zh(d,i,{...e.collaboration,onCancel:()=>S(null)}),b=g,g||S(null)):x&&C(u,x),f||d.focus(),f||chunkWKWWFY2C_cjs.Eg(u),{el:d,checkModel:g?.checkModel,readAccepted:g?.readAccepted,activateList:w=>!f&&(!!b||qE(d,w,C)),readSnapshot:y,readList:()=>b?.read(),formatSnapshot:w=>b?.format(w).kind==="supported",commit:()=>S(chunkWKWWFY2C_cjs.Vf(d)),cancel:()=>S(null)}}var oL=24,nL=1,rL=400;function Le(e){return e!==void 0&&chunkWKWWFY2C_cjs.e(e)}function qr(e){return e!==void 0&&chunkWKWWFY2C_cjs.f(e)}function st(e){let t=Le(e)?e.textStyle:void 0,n=Le(e)?e.textSegments?.find(i=>i.text)?.style:void 0,o=t?.fontSize??n?.fontSize,r=Le(e)?chunkWKWWFY2C_cjs.Pf(e):"none";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:o===void 0?oL:chunkWKWWFY2C_cjs.Tg(o),fontFamily:t?.fontFamily??n?.fontFamily,placeholderType:e?.placeholderType,color:t?.color??n?.color,colorRef:t?.colorRef??n?.colorRef,highlightColor:t?.highlightColor??n?.highlightColor,characterSpacing:t?.characterSpacing??n?.characterSpacing??0,listType:r==="mixed"?"none":r,align:t?.align??n?.align,paragraphMarginLeft:t?.paragraphMarginLeft??n?.paragraphMarginLeft??0,lineSpacing:t?.lineSpacing??n?.lineSpacing}}function yt(e,t){if(!Le(e))return {};let n={...e.textStyle,...t},o=e.textSegments?.map(r=>chunkWKWWFY2C_cjs.Qf(r,t));return o?{textStyle:n,textSegments:o}:{textStyle:n}}function ao(e,t){let n=st(e);return yt(e,{[t]:!n[t]})}function Vo(e,t){let n=Math.min(rL,Math.max(nL,t));return yt(e,{fontSize:chunkWKWWFY2C_cjs.Ug(n)})}function Hs(e,t){return Vo(e,st(e).fontSize+t)}function QE(e,t){return Vo(e,chunkWKWWFY2C_cjs.Wg(st(e).fontSize,t))}function Fs(e,t,n){return yt(e,{color:t,colorRef:n})}function Vs(e,t){return yt(e,{highlightColor:t})}function lt(e,t){return qr(e)?{shapeStyle:{...e.shapeStyle,...t}}:{}}function zs(e,t){return yt(e,{fontFamily:t})}function Bs(e,t){return yt(e,{characterSpacing:t})}var iL={textShadowColor:"#000000",textShadowBlur:2,textShadowOffsetX:1,textShadowOffsetY:1,textShadowOpacity:.5};function Ns(e){let t=st(e).hasTextShadow;return yt(e,t?{textShadowColor:void 0,textShadowBlur:void 0,textShadowOffsetX:void 0,textShadowOffsetY:void 0,textShadowOpacity:void 0}:iL)}function _s(e,t){if(!Le(e)||!e.textSegments)return {};let n=io(),o=n!==void 0?chunkWKWWFY2C_cjs.ah(n,e.textSegments,e.textStyle):e.textSegments,r=chunkWKWWFY2C_cjs.Fg(o,null,t);return {textSegments:r,text:r.map(i=>i.text).join("")}}function Gs(e){return yt(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})}function se(e,t){return e.setAttribute(chunkWKWWFY2C_cjs.Kq,t),e}function G(e,t){return e.setAttribute(chunkWKWWFY2C_cjs.Lq,t),e}function ZE(e,...t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-contents");return n.append(...t),n}function Z(e,t,...n){return se(ZE(e,...n),t)}function Ot(e,t,...n){return G(ZE(e,...n),t)}function JE(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-arrange-extras");o.dataset.pptxChrome="arrange-extras";let r=z(e,{label:t("pptx.contextMenu.group"),icon:"group",onClick:n.groupSelected}),i=z(e,{label:t("pptx.contextMenu.ungroup"),icon:"ungroup",onClick:n.ungroupSelected}),s=e.createElement("input");s.type="number",s.className="pptxv-field-input pptxv-arrange-stroke",s.min="0",s.max="120",s.step="0.5",s.value=String(chunkWKWWFY2C_cjs.Jr),s.title=t("pptx.ribbon.strokeWidth"),s.setAttribute("aria-label",t("pptx.ribbon.strokeWidth")),s.addEventListener("keydown",l=>l.stopPropagation()),s.addEventListener("change",()=>{let l=Number.parseFloat(s.value);Number.isFinite(l)&&n.setStrokeWidth(Math.max(0,l));}),G(r.btn,"home.arrange.group"),G(i.btn,"home.arrange.ungroup"),G(s,"home.arrange.outlineWidth");let a=chunk6TALMZ42_cjs.w(e,"div");return a.dataset.pptxChrome="group-controls",a.append(r.btn,i.btn),o.append(a,s),{el:o,update({editable:l,selectedCount:p,selectionGroupable:d,selectedElement:u}){let c=u??null;r.setDisabled(!chunkWKWWFY2C_cjs.Kr(l,p,d)),i.setDisabled(!chunkWKWWFY2C_cjs.Lr(l,c)),s.disabled=!chunkWKWWFY2C_cjs.Mr(l,c);let x=chunkWKWWFY2C_cjs.Nr(c);e.activeElement!==s&&(s.value=String(x));}}}function Us(e,t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-dropdown"),o=chunk6TALMZ42_cjs.w(e,"button","pptxv-dropdown-trigger");if(o.type="button",o.title=t.label,o.setAttribute("aria-label",t.label),o.setAttribute("aria-haspopup","menu"),o.setAttribute("aria-expanded","false"),o.dataset.pptxRibbonControl=t.control,t.icon&&o.appendChild(chunk6TALMZ42_cjs.K(e,t.icon)),t.text){let a=chunk6TALMZ42_cjs.w(e,"span","pptxv-dropdown-text");a.textContent=t.text,o.appendChild(a);}o.appendChild(chunk6TALMZ42_cjs.K(e,"chevron-down"));let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-dropdown-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t.label),r.hidden=true,n.append(o,r);let i=null,s=a=>{r.hidden=!a,o.setAttribute("aria-expanded",String(a)),o.classList.toggle("is-active",a),i?.destroy(),i=a?je(r,o):null;};for(let a of t.items){if(a.groupLabel){let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-dropdown-group");p.setAttribute("role","presentation"),p.textContent=a.groupLabel,r.appendChild(p);}let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-dropdown-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,Object.assign(l.dataset,a.dataset??{}),l.addEventListener("click",()=>{s(false),a.run(),l.blur(),chunkWKWWFY2C_cjs.tl(n.closest(".pptxv"));}),r.appendChild(l);}return o.addEventListener("click",a=>{a.stopPropagation(),s(r.hidden===true);}),e.addEventListener("pointerdown",a=>{!r.hidden&&!n.contains(a.target)&&s(false);}),{el:n,trigger:o,setDisabled(a,l){o.disabled=a,o.title=a&&l?l:t.label,a&&s(false);},close:()=>s(false)}}var eT="pptx.image.cropHint";function tT(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-arrange-extras");r.dataset.pptxChrome="control-fragment";let i=chunkWKWWFY2C_cjs.Tp("mergeShapes",o)?null:Us(e,{label:t(chunkWKWWFY2C_cjs.Al),icon:"merge-shapes",control:"merge-shapes",items:chunkWKWWFY2C_cjs.Cl.map(l=>({label:t(l.labelKey),dataset:{pptxMergeOp:l.operation},run:()=>n.mergeShapes(l.operation)}))});i&&(G(i.el,"home.arrange.mergeShapes"),r.appendChild(i.el));let s=null,a=null;if(!chunkWKWWFY2C_cjs.Tp("crop",o)){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-arrange-extras");l.dataset.pptxCropControls="true",s=z(e,{label:t(chunkWKWWFY2C_cjs.Ss),icon:"crop",onClick:n.toggleCropMode}),s.btn.dataset.pptxRibbonControl="crop";let p=null,d=chunkWKWWFY2C_cjs.Hs.map(u=>{let c=u.group!==p?t(chunkWKWWFY2C_cjs.Is[u.group]):void 0;return p=u.group,{label:u.id,groupLabel:c,dataset:{pptxCropAspect:u.id},run:()=>n.cropToAspect(u.ratioWidth,u.ratioHeight)}});d.push({label:t(chunkWKWWFY2C_cjs.Ts),dataset:{pptxCropAction:"fill"},run:n.cropFill},{label:t(chunkWKWWFY2C_cjs.Us),dataset:{pptxCropAction:"fit"},run:n.cropFit}),a=Us(e,{label:t(chunkWKWWFY2C_cjs.Vs),control:"crop-menu",items:d}),G(l,"home.arrange.crop"),l.append(s.btn,a.el),r.appendChild(l);}return {el:r,update({editable:l,canMergeShapes:p,canCrop:d,cropActive:u}){if(i?.setDisabled(!(l&&p),t(chunkWKWWFY2C_cjs.Bl)),s){let c=l&&(d||u);s.setDisabled(!c),s.btn.title=t(c?chunkWKWWFY2C_cjs.Ss:eT),s.setActive(u);}a?.setDisabled(!(l&&(d||u)),t(eT));}}}var aL=[{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"}],oT=3;function nT(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");r.dataset.pptxChrome="home-group",se(r,"home.arrange");let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");i.dataset.pptxChrome="arrange-controls",r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");s.dataset.pptxChrome="ribbon-group-label",s.textContent=t("pptx.arrange.groupLabel"),r.appendChild(s);let a=aL.map(A=>z(e,{label:t(chunk6TALMZ42_cjs.F[A.label]),icon:A.icon,onClick:()=>n.alignElements(A.edge)})),l=z(e,{label:t("pptx.arrange.distributeHorizontal"),icon:"distribute-h",onClick:()=>n.distributeElements("horizontal")}),p=z(e,{label:t("pptx.arrange.distributeVertical"),icon:"distribute-v",onClick:()=>n.distributeElements("vertical")}),d=z(e,{label:t("pptx.arrange.format"),icon:"paintbrush",textLabel:t("pptx.arrange.format"),onClick:n.toggleFormatPainter});d.btn.title=t("pptx.arrange.formatPainter");let u=z(e,{label:t("pptx.arrange.flipH"),textLabel:t("pptx.arrange.flipH"),onClick:n.flipHorizontal}),c=z(e,{label:t("pptx.arrange.flipV"),textLabel:t("pptx.arrange.flipV"),onClick:n.flipVertical}),x=z(e,{label:t("pptx.arrange.sendBackward"),icon:"send-backward",onClick:n.sendBackward}),b=z(e,{label:t("pptx.arrange.bringForward"),icon:"bring-forward",onClick:n.bringForward}),g=z(e,{label:t("pptx.arrange.back"),textLabel:t("pptx.arrange.back"),onClick:n.sendToBack});g.btn.title=t("pptx.arrange.sendToBack");let v=z(e,{label:t("pptx.arrange.front"),textLabel:t("pptx.arrange.front"),onClick:n.bringToFront});v.btn.title=t("pptx.arrange.bringToFront");let f=z(e,{label:t("pptx.arrange.duplicate"),icon:"duplicate",textLabel:t("pptx.arrange.duplicate"),onClick:n.duplicate}),y=z(e,{label:t("pptx.arrange.delete"),icon:"trash",textLabel:t("pptx.arrange.delete"),onClick:n.delete}),S=JE(e,t,n),h=tT(e,t,n,o);G(d.btn,"home.clipboard.formatPainter"),G(u.btn,"home.arrange.flipHorizontal"),G(c.btn,"home.arrange.flipVertical"),G(x.btn,"home.arrange.sendBackward"),G(b.btn,"home.arrange.bringForward"),G(g.btn,"home.arrange.sendToBack"),G(v.btn,"home.arrange.bringToFront"),G(f.btn,"home.arrange.duplicate"),G(y.btn,"home.arrange.delete");let C=Ot(e,"home.arrange.align",...a.map(A=>A.btn));C.dataset.pptxChrome="align-controls";let w=chunk6TALMZ42_cjs.w(e,"div");w.dataset.pptxChrome="distribute-controls",w.append(l.btn,p.btn);let T=chunk6TALMZ42_cjs.w(e,"div");T.dataset.pptxChrome="flip-controls",T.append(u.btn,c.btn);let k=chunk6TALMZ42_cjs.w(e,"div");return k.dataset.pptxChrome="order-controls",k.append(x.btn,b.btn,g.btn,v.btn),i.append(C,w,d.btn,T,S.el,h.el,k,f.btn,y.btn),{el:r,update({editable:A,hasSelection:P,formatPainterActive:E,selectedCount:M,selectionGroupable:I,selectedElement:D,canMergeShapes:L=false,canCrop:O=false,cropActive:R=false}){let F=A&&P;for(let H of [...a,u,c,x,b,g,v,f,y])H.setDisabled(!F);S.update({editable:A,selectedCount:M,selectionGroupable:I,selectedElement:D}),h.update({editable:A,canMergeShapes:L,canCrop:O,cropActive:R}),d.setDisabled(!A||!P&&!E),d.btn.dataset.active=String(E),l.setDisabled(!A||M<oT),p.setDisabled(!A||M<oT);}}}function rT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");o.dataset.pptxChrome="home-group",se(o,"home.clipboard");let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");r.dataset.pptxChrome="control-cluster",o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");i.dataset.pptxChrome="ribbon-group-label",i.textContent=t("pptx.ribbon.clipboard"),o.appendChild(i);let s=z(e,{label:t("pptx.arrange.paste"),icon:"paste",onClick:n.paste}),a=z(e,{label:t("pptx.arrange.cut"),icon:"cut",onClick:n.cut}),l=z(e,{label:t("pptx.arrange.copy"),icon:"copy",onClick:n.copy}),p=z(e,{label:t("pptx.arrange.formatPainter"),icon:"paintbrush",onClick:n.toggleFormatPainter});return p.btn.dataset.testid="format-painter-toggle",G(s.btn,"home.clipboard.paste"),G(a.btn,"home.clipboard.cut"),G(l.btn,"home.clipboard.copy"),G(p.btn,"home.clipboard.formatPainter"),r.append(s.btn,a.btn,l.btn,p.btn),{el:o,update({hasSelection:d,hasClipboard:u,editable:c,formatPainterActive:x}){s.setDisabled(!c||!u),a.setDisabled(!c||!d),l.setDisabled(!d),p.setDisabled(!c||!d&&!x),p.btn.dataset.active=String(x);}}}function ve(e,t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-dropdown"),o=chunk6TALMZ42_cjs.w(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=chunk6TALMZ42_cjs.w(e,"span","pptxv-dropdown-text");r.textContent=t.triggerText,o.appendChild(r),o.appendChild(chunk6TALMZ42_cjs.K(e,t.icon??"chevron-down")),n.appendChild(o);let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-dropdown-menu");i.setAttribute("role","listbox"),i.setAttribute("aria-label",t.triggerLabel),i.hidden=true,n.appendChild(i);let s=false,a,l=new Map,p=null,d=g=>{s=g,i.hidden=!g,o.setAttribute("aria-expanded",String(g)),o.classList.toggle("is-active",g),g?(p?.destroy(),p=je(i,o)):(p?.destroy(),p=null);},u=()=>{for(let[g,v]of l){let f=a!==void 0&&v===a;g.classList.toggle("is-selected",f),g.setAttribute("aria-selected",String(f));}},c=null,x=g=>JSON.stringify(g.map(v=>[v.label,String(v.value),v.groupLabel??"",v.hint??"",v.style?Object.entries(v.style):0])),b=g=>{i.replaceChildren(),l.clear();for(let v of g){if(v.groupLabel){let y=chunk6TALMZ42_cjs.w(e,"div","pptxv-dropdown-group");y.setAttribute("role","presentation"),y.textContent=v.groupLabel,i.appendChild(y);}let f=chunk6TALMZ42_cjs.w(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 y=chunk6TALMZ42_cjs.w(e,"span","pptxv-dropdown-item-hint");y.textContent=v.hint,f.appendChild(y);}v.style&&Object.assign(f.style,v.style),f.addEventListener("click",()=>{d(false),t.onSelect(v.value);}),i.appendChild(f),l.set(f,v.value);}u();};return b(t.items),o.addEventListener("click",g=>{g.stopPropagation(),d(!s);}),e.addEventListener("pointerdown",g=>{s&&!n.contains(g.target)&&d(false);}),{el:n,setDisabled(g){o.disabled=g,g&&d(false);},setTriggerText(g){r.textContent=g;},setSelected(g){a=g,u();},setItems(g){let v=x(g);v!==c&&(c=v,b(g),u());},close:()=>d(false)}}var so=chunkWKWWFY2C_cjs.ho;function sL(e,t){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/u.test(e)?e.toLowerCase():t}function pt(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-swatch-picker"),r=chunk6TALMZ42_cjs.w(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(chunk6TALMZ42_cjs.K(e,n.icon));let i=chunk6TALMZ42_cjs.w(e,"span","pptxv-swatch-swab");i.dataset.pptxChrome="color-swatch",r.appendChild(i),o.appendChild(r);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-swatch-menu");s.hidden=true,o.appendChild(s);let a=null;if(n.onSelectTheme){let S=n.onSelectTheme;a=Ie(e,t,C=>{v(false),S(C);}),s.appendChild(a.el);let h=chunk6TALMZ42_cjs.w(e,"div","pptxv-swatch-standard-label");h.textContent=t("pptx.colorPicker.standardColors"),s.appendChild(h);}let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-swatch-grid");s.appendChild(l);let p=Rt(e,t,S=>{v(false),n.onSelect(S);});s.appendChild(p.el);let d=n.fallback,u,c=new Map,x=()=>{for(let[S,h]of c)S.classList.toggle("is-selected",h===d);p.setSelected(d),a?.setSelected(u,d),i.style.backgroundColor=d;},b=false,g=null,v=S=>{b=S,s.hidden=!S,r.setAttribute("aria-expanded",String(S)),r.classList.toggle("is-active",S),S?(g?.destroy(),g=je(s,r)):(g?.destroy(),g=null);};for(let S of n.swatches){let h=chunk6TALMZ42_cjs.w(e,"button","pptxv-swatch");h.type="button",h.setAttribute("data-pptx-compact",""),h.style.backgroundColor=S,h.setAttribute("aria-label",S),h.addEventListener("click",()=>{v(false),n.onSelect(S);}),l.appendChild(h),c.set(h,S);}let f=chunk6TALMZ42_cjs.w(e,"label","pptxv-swatch-custom");f.textContent=t("pptx.ribbon.customColour");let y=e.createElement("input");return y.type="color",y.className="pptxv-swatch-custom-input",y.addEventListener("input",()=>n.onSelect(y.value)),f.appendChild(y),s.appendChild(f),r.addEventListener("click",S=>{S.stopPropagation(),v(!b);}),e.addEventListener("pointerdown",S=>{b&&!o.contains(S.target)&&v(false);}),x(),{el:o,setValue(S){d=sL(S,n.fallback),y.value=d,x();},setDisabled(S){r.disabled=S,p.setDisabled(S),a?.setDisabled(S),S&&v(false);},setRecentColors(S){p.setColors(S);},setThemeColorMap(S){a?.setThemeColorMap(S);},setSelectedRef(S){u=S,x();}}}var lL=12;function iT(e,t,n,o=ht(()=>{})){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");r.dataset.pptxChrome="home-group",se(r,"home.drawing");let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");i.dataset.pptxChrome="drawing-controls",r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");s.dataset.pptxChrome="ribbon-group-label",s.textContent=t("pptx.ribbon.groupDrawing"),r.appendChild(s);let a=ve(e,{triggerLabel:t("pptx.drawing.shapes"),triggerText:t("pptx.drawing.shapes"),icon:"shapes",items:chunkWKWWFY2C_cjs.$n.slice(0,lL).map(b=>({label:t(b.i18nKey),value:b.type})),onSelect:b=>n.insertShape(b)}),l=ve(e,{triggerLabel:t("pptx.ribbon.arrange"),triggerText:t("pptx.ribbon.arrange"),icon:"layers",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:b=>b()}),p=pt(e,t,{label:t("pptx.drawing.shapeFill"),icon:"square",swatches:chunkWKWWFY2C_cjs.wi,fallback:"#ffffff",onSelect:b=>n.setShapeFill(b),onSelectTheme:b=>n.setShapeFill(b.hex,b.ref)}),d=pt(e,t,{label:t("pptx.drawing.shapeOutline"),icon:"pen",swatches:chunkWKWWFY2C_cjs.wi,fallback:"#000000",onSelect:b=>n.setShapeStroke(b),onSelectTheme:b=>n.setShapeStroke(b.hex,b.ref)}),u=b=>{let g=chunkWKWWFY2C_cjs.dr.find(v=>v.control===b);if(!g)throw new Error(`Missing fixed gallery placement ${b}`);return g},c=at(e,t,u("home.drawing.quickStyles"),o),x=at(e,t,u("home.drawing.shapeEffects"),o);return G(a.el,"home.drawing.shapes"),G(l.el,"home.drawing.arrange"),G(p.el,"home.drawing.shapeFill"),G(d.el,"home.drawing.shapeOutline"),i.dataset.pptxChrome="drawing-controls",i.append(a.el,l.el,p.el,d.el,c.el,x.el),{el:r,update({editable:b,hasSelection:g,recentColors:v,themeColorMap:f,fillColor:y,fillColorRef:S,strokeColor:h,strokeColorRef:C}){a.setDisabled(!b);let w=b&&g;l.setDisabled(!w),p.setDisabled(!w),d.setDisabled(!w),p.setRecentColors(v??[]),d.setRecentColors(v??[]),p.setThemeColorMap(f),d.setThemeColorMap(f),p.setSelectedRef(S),d.setSelectedRef(C),y!==void 0&&p.setValue(y),h!==void 0&&d.setValue(h);}}}function aT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");o.dataset.pptxChrome="home-group",se(o,"home.editing");let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");r.dataset.pptxChrome="editing-controls",o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");i.dataset.pptxChrome="ribbon-group-label",i.textContent=t("pptx.shortcuts.group.editing"),o.appendChild(i);let s=z(e,{label:t("pptx.editing.find"),icon:"search",onClick:n.toggleFindReplace}),a=z(e,{label:t("pptx.ribbon.replace"),icon:"replace",onClick:n.toggleFindReplace}),l=pL(e,t,n);G(s.btn,"home.editing.find"),G(a.btn,"home.editing.replace"),G(l.el,"home.editing.select");let p=chunk6TALMZ42_cjs.w(e,"div");return p.dataset.pptxChrome="control-cluster",p.append(s.btn,a.btn),r.append(p,l.el),{el:o,update({editable:d}){l.setDisabled(!d);}}}function pL(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-primary-menu-host"),r=z(e,{label:t("pptx.ribbon.tool.select"),icon:"cursor",onClick:()=>a(!s)});r.btn.setAttribute("aria-haspopup","menu"),r.btn.setAttribute("aria-expanded","false");let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-primary-menu");i.style.left="0",i.style.right="auto",i.style.minWidth="150px",i.hidden=true;let s=false,a=p=>{s=p,i.hidden=!p,r.btn.setAttribute("aria-expanded",String(p)),r.btn.classList.toggle("is-active",p);},l=chunk6TALMZ42_cjs.w(e,"button","pptxv-primary-menu-item");return l.type="button",l.textContent=t("pptx.editing.selectAll"),l.addEventListener("mousedown",p=>p.preventDefault()),l.addEventListener("click",()=>{a(false),n.selectAll();}),i.appendChild(l),e.addEventListener("pointerdown",p=>{s&&!o.contains(p.target)&&a(false);}),o.append(r.btn,i),{el:o,setDisabled(p){r.btn.disabled=p,l.disabled=p,p&&a(false);}}}function Ks(e,t,n,o){chunkWKWWFY2C_cjs.ft();let r=e.createElement("pptx-ui-select");return r.setAttribute("variant","ribbon-font"),r.dataset.fontPicker=n,r.setAttribute("aria-label",t(n==="family"?"pptx.ribbon.fontFamily":"pptx.ribbon.fontSize")),r.addEventListener("change",()=>o(r.value)),{el:r,setTriggerText:i=>{r.value=i;},setDisabled:i=>{r.disabled=i;}}}function sT(e,t,n){let o=e.ownerDocument;e.replaceChildren(...chunkWKWWFY2C_cjs.ao(n).map(r=>{let i=o.createElement("optgroup");i.label=t(r.labelKey);for(let s of r.entries){let a=o.createElement("option");a.value=a.textContent=s.family,a.dataset.displayLabel=s.family,s.themeRole&&(a.dataset.description=t(`pptx.font.role.${s.themeRole}`)),a.style.fontFamily=s.family,i.append(a);}return i}));}var lT=2;function pT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div");o.dataset.pptxChrome="font-groups";let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup"),i=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");for(let E of [r,i])E.dataset.pptxChrome="home-group",se(E,"home.font");o.append(r,i);let s=chunk6TALMZ42_cjs.w(e,"div");s.dataset.pptxChrome="font-picker-controls",r.append(s);let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");a.dataset.pptxChrome="font-controls",i.appendChild(a);let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");l.dataset.pptxChrome="ribbon-group-label",l.textContent=t("pptx.ribbon.font"),i.appendChild(l),r.appendChild(l.cloneNode(true));let p=Ks(e,t,"family",n.setFontFamily),d=Ks(e,t,"size",E=>n.setFontSize(Number(E)));d.el.replaceChildren(...chunkWKWWFY2C_cjs.Vg.map(E=>{let M=e.createElement("option");return M.value=M.textContent=String(E),M}));let u=z(e,{label:t("pptx.textPanel.bold"),icon:"bold",onClick:n.toggleBold}),c=z(e,{label:t("pptx.textPanel.italic"),icon:"italic",onClick:n.toggleItalic}),x=z(e,{label:t("pptx.textPanel.underline"),icon:"underline",onClick:n.toggleUnderline}),b=z(e,{label:t("pptx.textPanel.strikethrough"),icon:"strikethrough",onClick:n.toggleStrikethrough}),g=z(e,{label:t("pptx.textEffects.shadow"),icon:"text-shadow",onClick:n.toggleTextShadow}),v=z(e,{label:t("pptx.text.decreaseFontSize"),icon:"a-down",onClick:()=>n.changeFontSize(-lT)}),f=z(e,{label:t("pptx.text.increaseFontSize"),icon:"a-up",onClick:()=>n.changeFontSize(lT)}),y=z(e,{label:t("pptx.text.clearFormatting"),icon:"clear-format",onClick:n.clearFormatting}),S=ve(e,{triggerLabel:t("pptx.text.characterSpacing"),triggerText:"",icon:"char-spacing",items:chunkWKWWFY2C_cjs.Xg.map(E=>({label:t(E.i18nKey),value:E.value})),onSelect:n.setCharacterSpacing});S.el.querySelector(".pptxv-dropdown-text")?.remove();let h=ve(e,{triggerLabel:t("pptx.text.changeCase"),triggerText:"",icon:"change-case",items:chunkWKWWFY2C_cjs.Zg.map(E=>({label:t(E.i18nKey),value:E.value})),onSelect:n.changeCase});h.el.querySelector(".pptxv-dropdown-text")?.remove();let C=pt(e,t,{label:t("pptx.text.fontColor"),icon:"font-color",swatches:so,fallback:"#000000",onSelect:n.setTextColor,onSelectTheme:E=>n.setTextColor(E.hex,E.ref)}),w=pt(e,t,{label:t("pptx.text.highlightColor"),icon:"highlight",swatches:so,fallback:"#ffff00",onSelect:n.setHighlightColor});G(p.el,"home.font.fontFamily"),G(d.el,"home.font.fontSize"),G(v.btn,"home.font.decreaseFontSize"),G(f.btn,"home.font.increaseFontSize"),G(u.btn,"home.font.bold"),G(c.btn,"home.font.italic"),G(x.btn,"home.font.underline"),G(b.btn,"home.font.strikethrough"),G(g.btn,"home.font.shadow"),G(y.btn,"home.font.clearFormatting"),G(S.el,"home.font.characterSpacing"),G(h.el,"home.font.changeCase"),G(C.el,"home.font.fontColor"),G(w.el,"home.font.highlightColor"),s.append(p.el,d.el);let T=chunk6TALMZ42_cjs.w(e,"div"),k=chunk6TALMZ42_cjs.w(e,"div");T.dataset.pptxChrome=k.dataset.pptxChrome="control-cluster",T.append(u.btn,c.btn,x.btn,b.btn),k.append(f.btn,v.btn,y.btn),a.append(T,g.btn,k,S.el,h.el,C.el,w.el);let A=[u,c,x,b],P=[v,f,u,c,x,b,g,y,S,h,C,w];return {el:o,update({canFormat:E,editable:M,text:I,themeFonts:D,embeddedFontFamilies:L,customFontFamilies:O,recentColors:R,themeColorMap:F}){sT(p.el,t,{themeFonts:D,embeddedFonts:L,customFonts:O}),u.setActive(I.bold),c.setActive(I.italic),x.setActive(I.underline),b.setActive(I.strikethrough),g.setActive(I.hasTextShadow),p.setTriggerText(I.fontFamily??chunkWKWWFY2C_cjs.bo(I.placeholderType,D)),d.setTriggerText(String(I.fontSize)),C.setValue(I.color),w.setValue(I.highlightColor),C.setRecentColors(R??[]),w.setRecentColors(R??[]),C.setThemeColorMap(F),C.setSelectedRef(I.colorRef),p.setDisabled(!M||!E),d.setDisabled(!M||!E);for(let H of P)H.setDisabled(!M||!E);for(let H of A)(!M||!E)&&H.setActive(false);}}}var dL=[{value:"horizontal",labelKey:"pptx.slideInspector.horizontal"},{value:"vertical",labelKey:"pptx.ribbon.textDirectionRotate90"},{value:"vertical270",labelKey:"pptx.ribbon.textDirectionRotate270"},{value:"wordArtVert",labelKey:"pptx.ribbon.textDirectionStacked"}],cL=[{count:1,labelKey:"pptx.ribbon.columns1"},{count:2,labelKey:"pptx.ribbon.columns2"},{count:3,labelKey:"pptx.ribbon.columns3"}],Ws=[{align:"left",icon:"align-left",labelKey:"pptx.ribbon.alignLeft",control:"home.paragraph.alignLeft"},{align:"center",icon:"align-center",labelKey:"pptx.ribbon.alignCenter",control:"home.paragraph.alignCenter"},{align:"right",icon:"align-right",labelKey:"pptx.ribbon.alignRight",control:"home.paragraph.alignRight"},{align:"justify",icon:"align-justify",labelKey:"pptx.ribbon.justify",control:"home.paragraph.justify"}];function dT(e,t,n,o,r){let i=chunkWKWWFY2C_cjs.dr.find(a=>a.control===o),s=G(chunk6TALMZ42_cjs.w(e,"div","pptxv-split-gallery"),o);return s.appendChild(n),i&&s.appendChild(at(e,t,i,r,{chevronOnly:true}).el),s}function cT(e,t,n,o=ht(()=>{})){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");r.dataset.pptxChrome="home-group",se(r,"home.paragraph");let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");i.dataset.pptxChrome="paragraph-controls",r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");s.dataset.pptxChrome="ribbon-group-label",s.textContent=t("pptx.ribbon.paragraph"),r.appendChild(s);let a=z(e,{label:t("pptx.text.bulletList"),icon:"bullet-list",onClick:n.toggleBulletList}),l=z(e,{label:t("pptx.text.numberedList"),icon:"numbered-list",onClick:n.toggleNumberedList});for(let{btn:y}of [a,l])y.addEventListener("mousedown",S=>S.preventDefault());let p=z(e,{label:t("pptx.text.decreaseIndent"),icon:"indent-decrease",onClick:n.decreaseIndent}),d=z(e,{label:t("pptx.text.increaseIndent"),icon:"indent-increase",onClick:n.increaseIndent}),u=Ws.map(y=>z(e,{label:t(y.labelKey),icon:y.icon,onClick:()=>n.setTextAlign(y.align)})),c=ve(e,{triggerLabel:t("pptx.paragraph.lineSpacing"),triggerText:"",icon:"line-spacing",items:chunkWKWWFY2C_cjs.Yg.map(y=>({label:y.label,value:y.value})),onSelect:n.setLineSpacing});c.el.querySelector(".pptxv-dropdown-text")?.remove();let x=ve(e,{triggerLabel:t("pptx.paragraph.textDirection"),triggerText:"",icon:"text-direction",items:dL.map(y=>({label:t(y.labelKey),value:y.value})),onSelect:n.setTextDirection});x.el.querySelector(".pptxv-dropdown-text")?.remove();let b=ve(e,{triggerLabel:t("pptx.paragraph.columns"),triggerText:"",icon:"columns",items:cL.map(y=>({label:t(y.labelKey),value:y.count})),onSelect:n.setColumnCount});b.el.querySelector(".pptxv-dropdown-text")?.remove(),G(p.btn,"home.paragraph.decreaseIndent"),G(d.btn,"home.paragraph.increaseIndent");for(let[y,S]of Ws.entries())G(u[y].btn,S.control);G(c.el,"home.paragraph.lineSpacing"),G(x.el,"home.paragraph.textDirection"),G(b.el,"home.paragraph.columns");let g=chunk6TALMZ42_cjs.w(e,"div");g.dataset.pptxChrome="control-cluster",g.append(p.btn,d.btn);let v=chunk6TALMZ42_cjs.w(e,"div");v.dataset.pptxChrome="control-cluster",v.append(...u.map(y=>y.btn)),i.append(dT(e,t,a.btn,"home.paragraph.bullets",o),dT(e,t,l.btn,"home.paragraph.numbering",o),g,v,c.el,x.el,b.el);let f=[a,l,p,d,...u,c,x,b];return {el:r,update({canFormat:y,editable:S,text:h}){a.setActive(h.listType==="bullet"),l.setActive(h.listType==="numbered");for(let[C,w]of Ws.entries())u[C].setActive(h.align===w.align);c.setSelected(h.lineSpacing);for(let C of f)C.setDisabled(!S||!y);}}}var mL=128,uL=72;function $s(e,t,n){let o=chunk6TALMZ42_cjs.w(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=a=>{r=a,o.hidden=!a;};e.addEventListener("pointerdown",a=>{r&&!o.parentElement?.contains(a.target)&&i(false);});let s=null;return {el:o,setItems(a,l){let p=JSON.stringify([a.map(d=>[d.path,d.name]),l.currentLayoutPath??"",a.map(d=>l.previews.get(d.path)?1:0)]);if(p!==s){s=p,o.replaceChildren();for(let d of a){let u=chunk6TALMZ42_cjs.w(e,"button","pptxv-layout-tile");u.type="button",u.setAttribute("role","menuitem"),chunkWKWWFY2C_cjs.go(d,l.currentLayoutPath)&&(u.classList.add("pptxv-layout-tile-current"),u.setAttribute("aria-current","true")),u.appendChild(xL(e,l.previews.get(d.path),l.renderPreview));let c=chunk6TALMZ42_cjs.w(e,"span","pptxv-layout-tile-name");c.textContent=d.name,u.appendChild(c),u.title=d.name,u.addEventListener("click",()=>{i(false),n(d);}),o.appendChild(u);}}},toggle:()=>i(!r),close:()=>i(false)}}function xL(e,t,n){let o=chunkWKWWFY2C_cjs.fo(t,mL,uL),r=chunk6TALMZ42_cjs.w(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=chunk6TALMZ42_cjs.w(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 s=t&&n?n(t,o):void 0;s&&i.appendChild(s);for(let a of o.frames){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-layout-tile-frame");l.style.left=`${a.left}px`,l.style.top=`${a.top}px`,l.style.width=`${a.width}px`,l.style.height=`${a.height}px`,l.style.borderWidth=`${o.frameBorderWidth}px`,i.appendChild(l);}return r.appendChild(i),r}var qs=1280,js=720,uT=144,xT=uT/qs,bL=Math.round(js*xT),mT;function bT(e,t,n,o){mT??=chunk6TALMZ42_cjs.J();let r=chunkWKWWFY2C_cjs.vf(n,{slideWidth:qs,slideHeight:js,...o?{scheme:o}:{},idFor:a=>`tpl-preview-${n}-${a}`}),i={id:`tpl-preview-${n}`,rId:"",slideNumber:1,elements:r.elements,...r.backgroundColor?{backgroundColor:r.backgroundColor}:{}},s=chunk6TALMZ42_cjs.w(e,"div","pptxv-tpl-preview",{width:`${uT}px`,height:`${bL}px`,overflow:"hidden",pointerEvents:"none",backgroundColor:i.backgroundColor??"#FFFFFF"});return s.setAttribute("aria-hidden","true"),s.appendChild(chunk6TALMZ42_cjs.A({document:e,slide:i,canvasSize:{width:qs,height:js},mediaDataUrls:new Map,registry:mT,t,scale:xT})),s}function gT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-tpl-dialog-layer");o.hidden=true;let r=chunk6TALMZ42_cjs.w(e,"button","pptxv-tpl-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.slideTemplates.close"));let i=chunk6TALMZ42_cjs.w(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 s=chunk6TALMZ42_cjs.w(e,"div","pptxv-tpl-dialog-header"),a=chunk6TALMZ42_cjs.w(e,"div","pptxv-tpl-dialog-heading"),l=chunk6TALMZ42_cjs.w(e,"h2");l.textContent=t("pptx.slideTemplates.galleryTitle");let p=chunk6TALMZ42_cjs.w(e,"p");p.textContent=t("pptx.slideTemplates.galleryDescription"),a.append(l,p);let d=chunk6TALMZ42_cjs.w(e,"button","pptxv-tpl-dialog-close");d.type="button",d.setAttribute("aria-label",t("pptx.slideTemplates.close")),d.textContent="\xD7",s.append(a,d);let u=chunk6TALMZ42_cjs.w(e,"div","pptxv-tpl-dialog-body"),c=chunk6TALMZ42_cjs.w(e,"div","pptxv-tpl-options");c.setAttribute("role","listbox"),c.setAttribute("aria-label",t("pptx.slideTemplates.gallery")),u.appendChild(c);let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-tpl-dialog-footer"),b=chunk6TALMZ42_cjs.w(e,"button","pptxv-tpl-dialog-cancel");b.type="button",b.textContent=t("pptx.slideTemplates.cancel");let g=chunk6TALMZ42_cjs.w(e,"button","pptxv-tpl-dialog-insert");g.type="button",g.textContent=t("pptx.slideTemplates.insert"),g.disabled=true,x.append(b,g),i.append(s,u,x),o.append(r,i);let v,f=null;function y(T){v=T,g.disabled=false;for(let k of c.querySelectorAll('[role="option"]')){let A=k.dataset.templateId===T;k.setAttribute("aria-selected",String(A)),k.classList.toggle("is-selected",A);}}function S(T){T&&(n.onInsert(T),C());}function h(){let T=n.getScheme?.();c.replaceChildren();for(let k of chunkWKWWFY2C_cjs.uf){let A=chunk6TALMZ42_cjs.w(e,"button","pptxv-tpl-option");A.type="button",A.dataset.templateId=k.id,A.setAttribute("role","option"),A.setAttribute("aria-selected",String(v===k.id)),A.setAttribute("aria-label",t(k.nameKey)),A.title=t(k.descriptionKey),A.classList.toggle("is-selected",v===k.id),A.appendChild(bT(e,t,k.id,T));let P=chunk6TALMZ42_cjs.w(e,"span","pptxv-tpl-option-label");P.textContent=t(k.nameKey),A.append(P),A.addEventListener("click",()=>y(k.id)),A.addEventListener("dblclick",()=>S(k.id)),c.appendChild(A);}}function C(){o.hidden||(o.hidden=true,f?.focus(),f=null);}function w(T){if(T.key==="Escape"){T.preventDefault(),C();return}if(T.key!=="Tab")return;let k=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(k.length===0)return;let A=k[0],P=k[k.length-1];T.shiftKey&&e.activeElement===A?(T.preventDefault(),P.focus()):!T.shiftKey&&e.activeElement===P&&(T.preventDefault(),A.focus());}return r.addEventListener("click",C),d.addEventListener("click",C),b.addEventListener("click",C),g.addEventListener("click",()=>S(v)),o.addEventListener("keydown",w),{el:o,open(T){let k=e.defaultView?.HTMLElement;f=k&&e.activeElement instanceof k?e.activeElement:null,h(),o.parentElement!==T&&T.appendChild(o),o.hidden=false,i.focus();},close:C}}function fT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");o.dataset.pptxChrome="home-group",se(o,"home.slides");let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");r.dataset.pptxChrome="slides-controls",o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");i.dataset.pptxChrome="ribbon-group-label",i.textContent=t("pptx.sections.slides"),o.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-slides-split");s.dataset.pptxChrome="split-button";let a=z(e,{label:t("pptx.home.newSlide"),icon:"plus",textLabel:t("pptx.home.newSlide"),onClick:n.addSlide}),l=chunk6TALMZ42_cjs.w(e,"button","pptxv-slides-caret");a.btn.dataset.pptxChrome="split-main",l.dataset.pptxChrome="split-caret",l.type="button",l.title=t("pptx.home.chooseLayout"),l.setAttribute("aria-label",t("pptx.home.chooseLayout")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunk6TALMZ42_cjs.K(e,"chevron-down"));let p=$s(e,t("pptx.home.chooseLayout"),f=>n.insertSlideFromLayout(f.path,f.name));l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a.btn,l,p.el);let d=gT(e,t,{onInsert:f=>n.insertSlideFromTemplate(f),getScheme:()=>n.getTemplateScheme?.()}),u=z(e,{label:t("pptx.home.slideTemplates"),icon:"slide-templates",textLabel:t("pptx.home.slideTemplates"),onClick:()=>{let f=u.btn.closest(".pptxv")??e.body;d.open(f);}}),c=chunk6TALMZ42_cjs.w(e,"div","pptxv-slides-menu-host"),x=z(e,{label:t("pptx.master.layout"),icon:"layout",textLabel:t("pptx.master.layout"),onClick:()=>b.toggle()});x.btn.setAttribute("aria-haspopup","menu");let b=$s(e,t("pptx.master.layout"),f=>n.applyLayout(f.path));c.append(x.btn,b.el);let g=z(e,{label:t("pptx.animations.reset"),icon:"rotate-ccw",textLabel:t("pptx.animations.reset"),onClick:n.resetSlide});g.btn.title=t("pptx.sections.resetSlideTitle");let v=z(e,{label:t("pptx.sections.sectionButtonLabel"),icon:"folder-plus",textLabel:t("pptx.sections.sectionButtonLabel"),onClick:n.addSection});return v.btn.title=t("pptx.sections.addSection"),G(s,"home.slides.newSlide"),G(u.btn,"home.slides.slideTemplates"),G(c,"home.slides.layout"),G(g.btn,"home.slides.reset"),G(v.btn,"home.slides.section"),r.append(s,u.btn,c,g.btn,v.btn),{el:o,update({editable:f,slideCount:y,layouts:S,layoutPreviews:h,currentLayoutPath:C}){let w=S.length>0,T=h??new Map;p.setItems(S,{previews:T,renderPreview:n.renderLayoutPreview}),b.setItems(S,{previews:T,currentLayoutPath:C,renderPreview:n.renderLayoutPreview}),a.setDisabled(!f),l.hidden=!w,l.disabled=!f,u.setDisabled(!f),x.setDisabled(!f||!w),g.setDisabled(!f||y===0),v.setDisabled(!f||y===0),f||(p.close(),b.close(),d.close());}}}var gL=100;function vT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),{edit:r}=n,i=n.galleryHub??ht(x=>r.applyRibbonGalleryResult(x)),s=rT(e,t,{copy:r.copy,cut:r.cut,paste:r.paste,toggleFormatPainter:r.toggleFormatPainter}),a=fT(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:(x,b)=>chunk6TALMZ42_cjs.A({document:e,slide:{id:`layout-preview-${x.path}`,rId:"",slideNumber:0,elements:x.elements.slice(0,gL),backgroundColor:b.backgroundColor},canvasSize:{width:b.surfaceWidth,height:b.surfaceHeight},mediaDataUrls:new Map,registry:chunk6TALMZ42_cjs.J(),t})}),l=pT(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=cT(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},i),d=aT(e,t,{toggleFindReplace:n.onToggleFindReplace,selectAll:r.selectAll}),u=iT(e,t,{insertShape:x=>r.insert("shape",x),bringForward:r.bringForward,sendBackward:r.sendBackward,bringToFront:r.bringToFront,sendToBack:r.sendToBack,groupSelected:r.groupSelected,ungroupSelected:r.ungroupSelected,setShapeFill:r.setShapeFill,setShapeStroke:r.setShapeStroke},i),c=nT(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,mergeShapes:r.mergeShapes,toggleCropMode:r.toggleCropMode,cropToAspect:r.cropToAspect,cropFill:r.cropFill,cropFit:r.cropFit},n.hiddenActions);return o.append(s.el,a.el,l.el,p.el,d.el,u.el,c.el),{el:o,update({editable:x,selectedElement:b,hasClipboard:g,slideCount:v,selectedCount:f,selectionGroupable:y,formatPainterActive:S,layouts:h,layoutPreviews:C,currentLayoutPath:w,themeFonts:T,embeddedFontFamilies:k,customFontFamilies:A,recentColors:P,themeColorMap:E,canMergeShapes:M,canCrop:I,cropActive:D}){let L=Le(b),O=st(b),R=b!==void 0,F=b&&chunkWKWWFY2C_cjs.f(b)?b.shapeStyle:void 0;s.update({hasSelection:R,hasClipboard:g,editable:x,formatPainterActive:S}),a.update({editable:x,slideCount:v,layouts:h,layoutPreviews:C,currentLayoutPath:w}),l.update({canFormat:L,editable:x,text:O,themeFonts:T,embeddedFontFamilies:k,customFontFamilies:A,recentColors:P,themeColorMap:E}),p.update({canFormat:L,editable:x,text:O}),d.update({editable:x}),u.update({editable:x,hasSelection:R,recentColors:P,themeColorMap:E,fillColor:F?.fillColor,fillColorRef:F?.fillColorRef,strokeColor:F?.strokeColor,strokeColorRef:F?.strokeColorRef}),c.update({editable:x,hasSelection:R,formatPainterActive:S,selectedCount:f,selectionGroupable:y,selectedElement:b,canMergeShapes:M,canCrop:I,cropActive:D});}}}function hT(e,t,n){return {editable:e,selectedElement:t,hasClipboard:n.hasClipboard,formatPainterActive:n.formatPainterActive??false,slideCount:n.slideCount,selectedCount:n.selectedCount??0,selectionGroupable:n.selectionGroupable??true,layouts:n.layouts??[],layoutPreviews:n.layoutPreviews,currentLayoutPath:n.currentLayoutPath,themeFonts:n.themeFonts,embeddedFontFamilies:n.embeddedFontFamilies,customFontFamilies:n.customFontFamilies,recentColors:n.recentColors??[],themeColorMap:n.themeColorMap,canMergeShapes:n.canMergeShapes,canCrop:n.canCrop,cropActive:n.cropActive}}function Ys(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-primary-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t),r.hidden=true;let i=false,s=a=>{i=a,r.hidden=!a,o?.(a);};for(let a of n){a.separatorBefore&&r.appendChild(chunk6TALMZ42_cjs.w(e,"div","pptxv-primary-menu-sep"));let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-primary-menu-item");l.type="button",l.setAttribute("role","menuitem"),l.textContent=a.label,l.addEventListener("click",()=>{s(false),a.run();}),r.appendChild(l);}return e.addEventListener("pointerdown",a=>{i&&!r.parentElement?.contains(a.target)&&s(false);}),{el:r,toggle:()=>s(!i),close:()=>s(false),isOpen:()=>i}}function yT(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 chunkWKWWFY2C_cjs.Tp("broadcast",n)||r.push({label:e("pptx.present.presentOnline"),run:()=>o.openBroadcast()}),r.push({label:e("pptx.slideShow.subtitles"),run:()=>o.toggleSubtitles()}),r}function ST(e,t,n){let{file:o,nav:r}=t,i=o.getCustomization?.()??chunkWKWWFY2C_cjs.Oq,s=[];chunkWKWWFY2C_cjs.Tp("export",n)||s.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.saveAsPptxTooltip"),run:()=>o.save()},{label:e("pptx.file.saveAsPpsxTooltip"),run:()=>o.saveAsPpsx()},{label:e("pptx.file.saveAsPptmTooltip"),run:()=>o.saveAsPptm()},{label:e("pptx.file.saveAsPptTooltip"),run:()=>o.saveAsPpt()});let a=chunkWKWWFY2C_cjs.Sq(i,"print");return a&&s.push({label:e("pptx.print.printButton"),run:()=>o.print(),separatorBefore:true}),s.push({label:e("pptx.file.copyImageTooltip"),run:()=>o.copySlideAsImage(),separatorBefore:!a},{label:e("pptx.ribbon.accessibilityCheck"),run:()=>r.openAccessibility(),separatorBefore:true}),chunkWKWWFY2C_cjs.Sq(i,"options")&&s.push({label:e("pptx.settings.keyboardShortcuts"),run:()=>r.openSettings("shortcuts")}),s.push({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()}),s}function CT(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-primary");r.dataset.pptxChrome="ribbon-primary";let i=z(e,{label:t("pptx.toolbar.comments"),icon:"comment",onClick:()=>n.nav.openComments()});r.appendChild(i.btn);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-present-split"),a=chunk6TALMZ42_cjs.w(e,"button","pptxv-present-main");a.type="button",a.title=t("pptx.present.presentTooltip"),a.textContent=t("pptx.toolbar.present"),a.addEventListener("click",()=>n.slideShow.startFromCurrent());let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-present-caret");l.type="button",l.title=t("pptx.present.optionsTooltip"),l.setAttribute("aria-label",t("pptx.present.optionsTooltip")),l.setAttribute("aria-haspopup","menu"),l.appendChild(chunk6TALMZ42_cjs.K(e,"chevron-down"));let p=Ys(e,t("pptx.present.optionsTooltip"),yT(t,n,o),f=>{l.classList.toggle("is-active",f),l.setAttribute("aria-expanded",String(f));});l.addEventListener("click",f=>{f.stopPropagation(),p.toggle();}),s.append(a,l,p.el),r.appendChild(s);let d=chunk6TALMZ42_cjs.w(e,"button","pptxv-show-btn");d.type="button",d.title=t("pptx.customShows.createTooltip"),d.textContent=t("pptx.customShows.addShow"),d.addEventListener("click",()=>n.slideShow.openCustomShows()),r.appendChild(d),r.appendChild(chunk6TALMZ42_cjs.w(e,"span","pptxv-primary-sep"));let u=z(e,{label:t("pptx.toolbar.toggleInspector"),icon:"panel-right",onClick:()=>n.nav.toggleInspector?.()});r.appendChild(u.btn);let c=z(e,{label:t("pptx.toolbar.settingsShortcuts"),icon:"settings",onClick:()=>n.nav.openSettings()}),x=n.nav.getCustomization?.()??chunkWKWWFY2C_cjs.Oq;chunkWKWWFY2C_cjs.Sq(x,"options")&&r.appendChild(c.btn);let b=chunk6TALMZ42_cjs.w(e,"div","pptxv-primary-menu-host"),g=Ys(e,t("pptx.ribbon.moreActions"),ST(t,n,o)),v=z(e,{label:t("pptx.ribbon.moreActions"),icon:"ellipsis",onClick:()=>g.toggle()});return v.btn.setAttribute("aria-haspopup","menu"),v.btn.addEventListener("pointerdown",f=>f.stopPropagation()),b.append(v.btn,g.el),r.appendChild(b),{el:r,setEditState({editable:f}){r.hidden=!f,f||(p.close(),g.close());},setAutosaveStatus(){},setInspectorOpen(f){u.setActive(f);}}}var zo=[{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"}],jr="home";function Xs(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tabs");i.dataset.pptxChrome="ribbon-tabs",i.setAttribute("role","tablist");let s=chunk6TALMZ42_cjs.w(e,"div");s.dataset.pptxChrome="ribbon-tab-scroll",i.appendChild(s);let a=new Map,l=new Map;for(let g of chunkWKWWFY2C_cjs.Up(zo,o)){let v=chunk6TALMZ42_cjs.w(e,"button","pptxv-ribbon-tab");g.id==="file"&&v.classList.add("pptxv-ribbon-tab-file"),v.type="button",v.setAttribute("role","tab");let f=t(g.labelKey);v.textContent=f,v.addEventListener("click",()=>n(g.id)),s.appendChild(v),a.set(g.id,v),l.set(g.id,f);}let p=new Map,d=[],u=null,c=null,x=()=>{let g=[...a,...p];for(let[v,f]of g){let y=v===u;f.classList.toggle("is-active",y),f.setAttribute("aria-selected",String(y));}},b=g=>{if(!(g.length===d.length&&g.every((v,f)=>d[f]===v))){d=[...g];for(let v of p.values())v.remove();p.clear();for(let v of g){let f=chunk6TALMZ42_cjs.w(e,"button","pptxv-ribbon-tab pptxv-ribbon-tab-contextual");f.type="button",f.setAttribute("role","tab"),f.setAttribute(chunkWKWWFY2C_cjs.kr,v),f.textContent=t(chunkWKWWFY2C_cjs.fr(v)),f.addEventListener("click",()=>n(v)),s.insertBefore(f,c),p.set(v,f);}x();}};if(r){c=chunk6TALMZ42_cjs.w(e,"span","pptxv-tabrow-spacer"),s.appendChild(c);let g=chunk6TALMZ42_cjs.w(e,"div","pptxv-tabrow-actions");if(!chunkWKWWFY2C_cjs.Tp("record",o)){let v=chunk6TALMZ42_cjs.w(e,"button","pptxv-tabrow-record");v.type="button",v.title=t("pptx.titleBar.record"),v.setAttribute("aria-label",t("pptx.titleBar.record"));let f=chunk6TALMZ42_cjs.w(e,"span","pptxv-tabrow-record-dot");f.setAttribute("aria-hidden","true");let y=chunk6TALMZ42_cjs.w(e,"span");y.textContent=t("pptx.titleBar.record"),v.append(f,y),v.addEventListener("click",()=>r.startRecording()),g.appendChild(v);}i.appendChild(g);}return {el:i,setActive(g){u=g,x();},setContextualTabs:b,setHiddenTabs(g){for(let[v,f]of a)f.hidden=v!=="file"&&g.has(v);},applyScreenTips(g){for(let[v,f]of a){let y=g(l.get(v)??"");y?f.title=y:f.removeAttribute("title");}}}}var fL=[{group:"entrance",labelKey:"pptx.animation.entrance",presets:chunkWKWWFY2C_cjs.sc},{group:"emphasis",labelKey:"pptx.animation.emphasis",presets:chunkWKWWFY2C_cjs.uc},{group:"exit",labelKey:"pptx.animation.exit",presets:chunkWKWWFY2C_cjs.tc}];function wT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-gallery");o.setAttribute("aria-label",t("pptx.animations.addAnimation"));let r=[];for(let i of fL){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-gallery-column"),a=chunk6TALMZ42_cjs.w(e,"span","pptxv-animation-gallery-caption");a.textContent=t(i.labelKey);let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-gallery-items");for(let p of i.presets){let d=t(`pptx.animation.preset.${p}`),u=z(e,{label:d,text:d,className:"pptxv-animation-preset",onClick:()=>n(i.group,p)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function Bo(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 No(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 s of o){let a=e.createElement("option");a.value=s,a.textContent=t(`${n}.${s}`),i.appendChild(a);}return r.appendChild(i),{label:r,select:i}}function ET(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timeline-row");i.classList.add("is-native"),i.title=t("pptx.animation.nativeEffectHint"),i.addEventListener("dragover",a=>a.preventDefault()),i.addEventListener("drop",a=>{a.preventDefault();let l=a.dataTransfer?.getData("text/plain");l&&r.moveAnimation(l,o);});let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-animation-timeline-name");return s.textContent=`${o+1}. ${t("pptx.animation.nativeEffect")}: ${n.join(", ")}`,i.append(s),i}function TT(e,t,n,o,r,i,s,a){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timeline-row");l.draggable=s,l.addEventListener("dragstart",c=>c.dataTransfer?.setData("text/plain",n.elementId)),l.addEventListener("dragover",c=>c.preventDefault()),l.addEventListener("drop",c=>{c.preventDefault();let x=c.dataTransfer?.getData("text/plain");x&&a.moveAnimation(x,o);}),l.classList.toggle("is-selected",n.elementId===i);let p=chunk6TALMZ42_cjs.w(e,"span","pptxv-animation-timeline-name");p.textContent=`${o+1}. ${chunkWKWWFY2C_cjs.ed(n,t)}`;let d=z(e,{label:t("pptx.animation.moveUp"),text:"\u2191",onClick:()=>a.reorderAnimation(n.elementId,"up")}),u=z(e,{label:t("pptx.animation.moveDown"),text:"\u2193",onClick:()=>a.reorderAnimation(n.elementId,"down")});return d.setDisabled(!s||o===0),u.setDisabled(!s||o===r-1),l.append(p,d.btn,u.btn),l}function PT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");se(o,"animations.advancedAnimation");let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");i.textContent=t("pptx.animations.advanced"),o.appendChild(i);let s=z(e,{label:t("pptx.animations.exitEffects"),icon:"sparkles",textLabel:t("pptx.animations.exitEffects"),onClick:()=>n.addAnimation("exit","fadeOut")}),a=z(e,{label:t("pptx.animations.pathAnimation"),icon:"move-right",textLabel:t("pptx.animations.pathAnimation"),onClick:()=>n.applyMotionPath(chunkWKWWFY2C_cjs.Kd)}),l=z(e,{label:t("pptx.animations.effectOptions"),icon:"wrench",textLabel:t("pptx.animations.effectOptions"),onClick:n.openAnimationPanel}),p=z(e,{label:t("pptx.animations.animationPanel"),icon:"panel-right",textLabel:t("pptx.animations.animationPanel"),onClick:n.openAnimationPanel});p.btn.title=t("pptx.animations.openPanelTooltip");let d=z(e,{label:t("pptx.animations.trigger"),icon:"cursor",textLabel:t("pptx.animations.trigger"),onClick:n.openAnimationPanel}),u=z(e,{label:t("pptx.animations.painter"),icon:"copy",textLabel:t("pptx.animations.painter"),onClick:()=>{}}),c=z(e,{label:t("pptx.animations.remove"),icon:"trash",textLabel:t("pptx.animations.remove"),onClick:n.removeAnimation});c.btn.title=t("pptx.animations.removeTooltip"),G(l.btn,"animations.animation.effectOptions"),G(p.btn,"animations.advancedAnimation.animationPane"),G(d.btn,"animations.advancedAnimation.trigger"),G(u.btn,"animations.advancedAnimation.animationPainter"),G(c.btn,"animations.advancedAnimation.remove"),r.append(s.btn,a.btn,l.btn,p.btn,d.btn,u.btn,c.btn);let x=[s,a,l,d,c];return {el:o,setDisabled(b){for(let g of x)g.setDisabled(b);u.setDisabled(true);}}}var AT=0;function kT(e,t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup");se(n,"animations.timing");let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row pptxv-animation-timing-grid");n.appendChild(o);let r=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.animations.timing"),n.appendChild(r),AT+=1;let i=`pptx-animation-start-${AT}`,s=chunk6TALMZ42_cjs.w(e,"label","pptxv-field-label");s.htmlFor=i,s.textContent=t("pptx.animations.start");let a=e.createElement("select");a.id=i,a.disabled=true;for(let d of ["onClick","withPrevious","afterPrevious"]){let u=e.createElement("option");u.value=d,u.textContent=t(`pptx.animations.${d}`),a.appendChild(u);}let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-field-label");l.textContent=t("pptx.animations.duration");let p=e.createElement("input");return p.type="number",p.min="0",p.step="0.1",p.value="0.5",p.disabled=true,p.setAttribute("aria-label",t("pptx.animations.duration")),o.append(Ot(e,"animations.timing.start",s,a),Ot(e,"animations.timing.duration",l,p)),{el:n}}function IT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-motion-path-gallery");o.setAttribute("aria-label",t("pptx.animations.motionPathGalleryAria"));let r=[];for(let i of chunkWKWWFY2C_cjs.Fd){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-motion-path-gallery-column"),a=chunk6TALMZ42_cjs.w(e,"span","pptxv-motion-path-gallery-caption");a.textContent=t(chunkWKWWFY2C_cjs.Gd(i));let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-motion-path-gallery-items");for(let p of chunkWKWWFY2C_cjs.Id(i)){let d=t(chunkWKWWFY2C_cjs.Hd(p.id)),u=z(e,{label:d,text:d,className:"pptxv-motion-path-preset",onClick:()=>n(p.id)});l.appendChild(u.btn),r.push(u);}s.append(a,l),o.appendChild(s);}return {el:o,setDisabled(i){for(let s of r)s.setDisabled(i);}}}function LT(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),i,s=()=>{chunkWKWWFY2C_cjs.Rd(e,i);},a=z(e,{label:t("pptx.animations.preview"),icon:"play",textLabel:t("pptx.animations.preview"),onClick:s});a.btn.title=t("pptx.animations.previewTooltip");let l=se(chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup"),"animations.preview");G(a.btn,"animations.preview.preview");let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");p.appendChild(a.btn);let d=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");d.textContent=t("pptx.animations.preview"),l.append(p,d),r.appendChild(l);let u=se(chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup"),"animations.animation"),c=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");c.textContent=t("pptx.animations.animation");let x=wT(e,t,(R,F)=>n.addAnimation(R,F));G(x.el,"animations.animation.gallery"),u.append(x.el,c),r.appendChild(u);let b=se(chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup"),"animations.motionPath"),g=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");g.textContent=t("pptx.animation.motionPath");let v=IT(e,t,R=>n.applyMotionPath(R));G(v.el,"animations.motionPath.gallery"),b.append(v.el,g),r.appendChild(b);let f=PT(e,t,{addAnimation:n.addAnimation,applyMotionPath:n.applyMotionPath,removeAnimation:n.removeAnimation,openAnimationPanel:o});r.appendChild(f.el),r.appendChild(kT(e,t).el);let y=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timeline"),S=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");S.textContent=t("pptx.animation.timeline");let h=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timeline-list"),C=chunk6TALMZ42_cjs.w(e,"div","pptxv-animation-timing-controls"),w=e.createElement("select");w.setAttribute("aria-label",t("pptx.animation.trigger"));let T=["onClick","withPrevious","afterPrevious","onShapeClick","onHover"];for(let R of T){let F=e.createElement("option");F.value=R,F.textContent=t(`pptx.animation.trigger.${R}`),w.appendChild(F);}let k=Bo(e,t("pptx.animation.duration"),500),A=Bo(e,t("pptx.animation.delay"),0),P=No(e,t,"pptx.animation.direction",["fromTop","fromBottom","fromLeft","fromRight"]),E=No(e,t,"pptx.animation.sequence",["asOne","byParagraph","byWord","byLetter"]),M=No(e,t,"pptx.animation.timingCurve",["ease","ease-in","ease-out","linear"]),I=No(e,t,"pptx.animation.repeatUntil",["none","untilNextClick","untilEndOfSlide"]),D=Bo(e,t("pptx.animation.repeatCount"),1),L=Bo(e,t("pptx.animations.triggerShape"),0);L.input.type="text",L.input.min="",L.input.max="",C.append(w,k.label,A.label,P.label,E.label,M.label,D.label,I.label,L.label),y.append(S,h,C),r.appendChild(y);let O=()=>{i&&n.setAnimationTiming(i.elementId,{trigger:w.value,durationMs:k.input.valueAsNumber,delayMs:A.input.valueAsNumber,direction:P.select.value,sequence:E.select.value,timingCurve:M.select.value,repeatCount:D.input.valueAsNumber,repeatMode:I.select.value,triggerShapeId:w.value==="onShapeClick"?L.input.value:void 0});};for(let R of [w,P.select,E.select,M.select,I.select])R.addEventListener("change",O);return k.input.addEventListener("change",O),A.input.addEventListener("change",O),D.input.addEventListener("change",O),L.input.addEventListener("change",O),{el:r,update({editable:R,hasSelection:F,selectedElementId:H,animations:V,animationTimelineAnchors:N}){let B=!R||!F;x.setDisabled(B),v.setDisabled(B),a.setDisabled(B),f.setDisabled(B);let $=[...V].sort((K,q)=>(K.order??0)-(q.order??0));i=$.find(({elementId:K})=>K===H);let Y=chunkWKWWFY2C_cjs.Uc($,N??[]),ie=new Map($.map(K=>[K.elementId,K]));h.replaceChildren(...Y.flatMap((K,q)=>{if(K.kind==="native")return [ET(e,t,K.targetIds,q,n)];let j=ie.get(K.elementId);return j?[TT(e,t,j,q,Y.length,H,R,n)]:[]})),y.hidden=$.length===0,C.hidden=!i,w.value=i?.trigger??"onClick",L.input.value=i?.triggerShapeId??"",L.label.hidden=w.value!=="onShapeClick",k.input.value=String(i?.durationMs??500),A.input.value=String(i?.delayMs??0);let _=i?chunkWKWWFY2C_cjs.rc([i],i.elementId):[];P.label.hidden=_.length===0;for(let K of P.select.options)K.hidden=!_.includes(K.value);P.select.value=chunkWKWWFY2C_cjs.qc(i,_)??"fromBottom",E.select.value=i?.sequence??"asOne",M.select.value=chunkWKWWFY2C_cjs.oc(i?.timingCurve),I.select.value=i?.repeatMode??"none",D.input.value=String(i?.repeatCount??1);for(let K of [w,k.input,A.input,P.select,E.select,M.select,I.select,D.input,L.input])K.disabled=!R;}}}function MT(e,t,n,o={}){chunkWKWWFY2C_cjs.ft();let r=e.createElement("pptx-ui-theme-editor");o.inline!==false&&r.setAttribute("inline",""),r.labels=chunkWKWWFY2C_cjs.et(t);let i=false,s=true;return r.addEventListener("theme-editor-apply",a=>{!r.disabled&&!i&&(i=true,r.disabled=true,Promise.resolve(n.applyThemeEdit(a.detail)).finally(()=>{i=false,r.disabled=!s;}));}),r.addEventListener("theme-editor-close",()=>o.onClose?.()),{el:r,update(a){s=a.editable,r.disabled=!s||i,r.theme={name:a.themeName,colorScheme:a.colorScheme,fontScheme:a.fontScheme};}}}function DT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div"),r=chunk6TALMZ42_cjs.w(e,"section");r.dataset.deckThemeEditor="",r.setAttribute("aria-label",t("pptx.themeEditor.title")),r.hidden=true;let i=null,s={editable:false,colorScheme:void 0,fontScheme:void 0,themeName:void 0},a=()=>{let p=!r.hidden;r.hidden=true,i?.el.remove(),i=null,l.btn.setAttribute("aria-expanded","false"),p&&l.btn.focus();},l=z(e,{label:t("pptx.ribbon.editTheme"),icon:"wrench",textLabel:t("pptx.ribbon.editTheme"),onClick:()=>{if(!r.hidden){a();return}i||(i=MT(e,t,{applyThemeEdit:async d=>{await n.applyThemeEdit(d),a();}},{inline:false,onClose:a}),r.appendChild(i.el)),i.update(s),(o.closest("[data-pptx-editor-chrome]")?.querySelector('[data-pptx-chrome="body"]')??o).appendChild(r),r.hidden=false,l.btn.setAttribute("aria-expanded","true");}});return l.btn.title=t("pptx.ribbon.editThemeTitle"),l.btn.setAttribute("aria-expanded","false"),r.addEventListener("keydown",p=>{p.key==="Escape"&&(p.stopPropagation(),a());}),o.append(l.btn,r),{el:o,button:l,panel:r,close:a,update(p){s=p,i?.update(s);}}}function vL(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-theme-gallery-host"),r=chunk6TALMZ42_cjs.w(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,s=null,a=l=>{i=l,r.hidden=!l,t.btn.setAttribute("aria-expanded",String(l)),s?.destroy(),s=l?je(r,t.btn):null;};return t.btn.addEventListener("click",l=>{l.stopPropagation(),a(!i);}),e.addEventListener("pointerdown",l=>{i&&!o.contains(l.target)&&a(false);}),o.append(t.btn,r),{el:o,button:t,gallery:r,close:()=>a(false)}}function hL(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"span","pptxv-theme-swatch-preview");return o.style.background=n,t.btn.prepend(o),t.btn}function RT(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),a=vL(e,z(e,{label:t("pptx.ribbon.browseThemes"),icon:"sparkles",textLabel:t("pptx.ribbon.browseThemes"),onClick:()=>{}}),t("pptx.ribbon.browseThemesTitle"));a.gallery.setAttribute("role","menu"),a.gallery.setAttribute("aria-label",t("pptx.themes.gallery.ariaLabel"));let l=chunkWKWWFY2C_cjs.nt.map(c=>{let x=z(e,{label:c.name,text:c.name,onClick:()=>{n.applyPresentationTheme(c.id),a.close();}});return x.btn.setAttribute("role","menuitemradio"),x.btn.setAttribute("aria-checked","false"),x.btn.dataset.themePreset=c.id,a.gallery.appendChild(hL(e,x,`linear-gradient(135deg, ${c.colorScheme.accent1}, ${c.colorScheme.accent2})`)),x}),p=DT(e,t,n),d=z(e,{label:t("pptx.ribbon.slideSize"),icon:"monitor",textLabel:t("pptx.ribbon.slideSize"),onClick:r});d.btn.title=t("pptx.ribbon.slideSizeTitle");let u=z(e,{label:t("pptx.ribbon.formatBackground"),icon:"square",textLabel:t("pptx.ribbon.formatBackground"),onClick:o});if(u.btn.title=t("pptx.ribbon.formatBackgroundTitle"),G(a.el,"design.themes.browseThemes"),G(p.el,"design.themes.editTheme"),G(d.btn,"design.customize.slideSize"),G(u.btn,"design.customize.formatBackground"),s.appendChild(Z(e,"design.themes",a.el,p.el)),i){let c=Ds(e,"design.variants",t("pptx.ribbon.groupVariants"));for(let x of chunkWKWWFY2C_cjs.dr)x.control.startsWith("design.variants.")&&c.row.appendChild(at(e,t,x,i).el);s.appendChild(c.el),i.register({refresh(x,b){let g=chunkWKWWFY2C_cjs.ot(x.theme)?.id;for(let v of l)v.btn.setAttribute("aria-checked",String(v.btn.dataset.themePreset===g));p.update({editable:b,colorScheme:x.theme?.colorScheme,fontScheme:x.theme?.fontScheme,themeName:x.theme?.name});},close(){}});}return s.appendChild(Z(e,"design.customize",d.btn,u.btn)),{el:s,setEditable(c){a.button.setDisabled(!c),p.button.setDisabled(!c),u.setDisabled(!c);for(let x of l)x.setDisabled(!c);c||(a.close(),p.close());}}}var yL=[1,2,3,4,6,8,12,16],Qs=[{tool:"select",icon:"cursor",labelKey:"pptx.ribbon.tool.select",control:"draw.tools.select"},{tool:"pen",icon:"pen",labelKey:"pptx.ribbon.tool.pen",control:"draw.tools.pen"},{tool:"highlighter",icon:"highlighter",labelKey:"pptx.ribbon.tool.highlighter",control:"draw.tools.highlighter"},{tool:"eraser",icon:"eraser",labelKey:"pptx.ribbon.tool.eraser",control:"draw.tools.eraser"},{tool:"freeform",icon:"pen",labelKey:"pptx.ribbon.tool.freeform"}];function OT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=se(chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),i=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");s.textContent=t("pptx.ribbon.draw"),r.appendChild(s);let a=Qs.map(x=>z(e,{label:t(x.labelKey),icon:x.icon,onClick:()=>n.setTool(x.tool)}));for(let[x,b]of Qs.entries())b.control&&G(a[x].btn,b.control);i.append(...a.map(x=>x.btn)),o.appendChild(r);let l=se(chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup"),"draw.tools"),p=chunk6TALMZ42_cjs.w(e,"div","pptxv-rgroup-row");l.appendChild(p);let d=pt(e,t,{label:t("pptx.ribbon.colour"),icon:"pen",swatches:so,fallback:"#000000",onSelect:x=>n.setColor(x)}),u=ve(e,{triggerLabel:t("pptx.ribbon.width"),triggerText:"",icon:"chevron-down",items:yL.map(x=>({label:`${x} px`,value:x})),onSelect:x=>n.setWidth(x)});G(d.el,"draw.tools.penColor"),G(u.el,"draw.tools.penWidth"),p.append(d.el,u.el),o.appendChild(l);let c=[...a,d,u];return {el:o,setEditable(x){for(let b of c)b.setDisabled(!x);},update(x){for(let[b,g]of Qs.entries())a[b].setActive(x.tool===g.tool);d.setValue(x.color),d.setRecentColors(x.recentColors??[]),u.setSelected(x.width),u.setTriggerText(`${x.width} px`);}}}var HT="3.15.0";function FT(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-account");n.appendChild(r);let i={...chunkWKWWFY2C_cjs.Lp,...chunkWKWWFY2C_cjs.Jp().profile};r.appendChild(CL(e,t,i,a=>{i=a,chunkWKWWFY2C_cjs.Qp(i);}));let s=chunk6TALMZ42_cjs.w(e,"section","pptxv-account-section");r.appendChild(s),wL(e,t,s),r.appendChild(EL(e,t)),o?.enabled&&r.appendChild(TL(e,t,o));}function CL(e,t,n,o){let r=n,i=chunk6TALMZ42_cjs.w(e,"section","pptxv-account-section"),s=e.createElement("h2");s.textContent=t("pptx.account.profile.title"),i.appendChild(s);let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-account-profile-row"),l=chunk6TALMZ42_cjs.w(e,"span","pptxv-account-avatar"),p=()=>{l.textContent=chunkWKWWFY2C_cjs.Np(r),l.style.background=r.avatarColor;};p();let d=e.createElement("label");d.className="pptxv-account-name-field";let u=e.createElement("span");u.textContent=t("pptx.account.profile.nameLabel");let c=e.createElement("input");c.type="text",c.placeholder=t("pptx.account.profile.namePlaceholder"),c.value=r.displayName,c.addEventListener("input",()=>{r={...r,displayName:c.value},p(),o(r);}),d.append(u,c),a.append(l,d),i.appendChild(a);let x=e.createElement("p");x.className="pptxv-account-swatch-label",x.textContent=t("pptx.account.profile.avatarColorLabel"),i.appendChild(x);let b=chunk6TALMZ42_cjs.w(e,"div","pptxv-parity-swatch-row"),g=(v,f)=>{r={...r,avatarColor:f},p();for(let y of b.querySelectorAll("button"))y.classList.toggle("is-active",y===v);o(r);};for(let v of chunkWKWWFY2C_cjs.Mp){let f=e.createElement("button");f.type="button",f.className="pptxv-account-color-swatch",f.classList.toggle("is-active",v===r.avatarColor),f.style.background=v,f.setAttribute("aria-label",v),f.addEventListener("click",()=>g(f,v)),b.appendChild(f);}return i.appendChild(b),i}function wL(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 s=e.createElement("button");s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.storage.clear"),n.appendChild(s);let a=e.createElement("p");a.className="pptxv-account-notice",a.hidden=true,n.appendChild(a);async function l(){let p=await chunkWKWWFY2C_cjs.Op();r.textContent=p.presentationCount>0?t("pptx.account.storage.usage",{count:p.presentationCount,size:chunkWKWWFY2C_cjs.No(p.totalBytes)}):t("pptx.account.storage.usageEmpty");}l(),s.addEventListener("click",()=>{window.confirm(t("pptx.account.storage.clearConfirm"))&&(async()=>(await chunkWKWWFY2C_cjs.Pp(),a.hidden=false,a.textContent=t("pptx.account.storage.clearedNotice"),await l()))();});}function EL(e,t){let n=chunk6TALMZ42_cjs.w(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:HT}),n.appendChild(i),n}function TL(e,t,n){let o=chunk6TALMZ42_cjs.w(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 a=e.createElement("p");return a.textContent=t("pptx.account.signIn.signedInAs",{name:n.signedInUser.name}),o.appendChild(a),o}let s=e.createElement("button");return s.type="button",s.className="pptxv-bs-primary",s.textContent=t("pptx.account.signIn.button"),s.addEventListener("click",()=>n.onSignIn()),o.appendChild(s),o}var BL={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},VT="http://www.w3.org/2000/svg";function zT(e,t){return _o(e,BL[t],17)}function _o(e,t,n){let o=e.createElementNS(VT,"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 s=e.createElementNS(VT,r);for(let[a,l]of Object.entries(i))l!==void 0&&s.setAttribute(a,String(l));o.appendChild(s);}return o}function St(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 Zs(e,t,n,o){let r=St(e,"",n,o);return r.appendChild(zT(e,t)),r}function BT(e,t,n,o){let r=Zs(e,t,o),i=e.createElement("span");return i.textContent=n,r.appendChild(i),r}var tM={protect:lucide.LockKeyhole,inspect:lucide.Info,embedFonts:lucide.Type,signatures:lucide.BadgeCheck,versionHistory:lucide.Clock3,saveAsPptx:lucide.FileText,saveAsPpsx:lucide.Presentation,saveAsPptm:lucide.FileCode2,saveAsPpt:lucide.Database,pdf:lucide.FileText,png:lucide.Image,video:lucide.Video,gif:lucide.Images,json:lucide.FileJson,copyImage:lucide.Copy,print:lucide.Printer,share:lucide.UserPlus};function _T(e,t,n,o,r,i,s,a=chunkWKWWFY2C_cjs.Oq){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-bs-actions");if(t==="export"&&chunkWKWWFY2C_cjs.Tp("export",s))return l;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,saveAsPpt:n.saveAsPpt,pdf:n.exportPdf,png:n.exportPng,video:n.exportVideo,gif:n.exportGif,json:n.exportJson,copyImage:n.copySlideAsImage,print:n.print,share:n.openShare};for(let d of chunkWKWWFY2C_cjs.$q(chunkWKWWFY2C_cjs.Oo(t),a)){if(d.id==="saveAsPptm"&&!o)continue;let u=p[d.id],c=St(e,"",()=>r(()=>u?.())),x=e.createElement("b");x.appendChild(_o(e,tM[d.id],22));let b=e.createElement("span"),g=e.createElement("strong");g.textContent=i(d.titleKey);let v=e.createElement("small");v.textContent=i(d.bodyKey),b.append(g,v),c.append(x,b),l.appendChild(c);}return l}function Js(e,t){let n=e.createElement("span");return n.textContent=t,n}function GT(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-backstage");s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label",t("pptx.backstage.title"));let a=e.createElement("aside"),l=chunk6TALMZ42_cjs.w(e,"div","pptxv-bs-back-row"),p=Zs(e,"back",o,"pptxv-bs-back");p.setAttribute("aria-label",t("pptx.backstage.back")),l.append(p);let d=e.createElement("nav");a.append(l,d);let u=e.createElement("main");s.append(a,u);let c=n.getCustomization?.()??chunkWKWWFY2C_cjs.Oq,x=chunkWKWWFY2C_cjs._q(chunkWKWWFY2C_cjs.Ho,c),b=x.some(E=>E.id==="home")?"home":x[0]?.id??"home",g=false,v="",f=[];(async()=>{f=await chunkWKWWFY2C_cjs.Ko(t,n.getRecentPresentationsCount());let E=u.querySelector(".pptxv-bs-recent");E&&T(E);})();function y(E){E?.(),E&&o();}function S(E){if(E==="close")return o();if(E==="save")return y(n.save);if(E==="options")return y(n.openSettings);b=E,P();}function h(){d.replaceChildren();for(let E of x){E.group&&!d.querySelector("i")&&d.appendChild(e.createElement("i"));let M=BT(e,E.id,t(E.labelKey),()=>S(E.id));M.setAttribute("data-pptx-backstage-nav-item",""),M.classList.toggle("active",b===E.id),b===E.id&&M.setAttribute("aria-current","page"),d.appendChild(M);}}function C(){let E=e.createElement("h2");E.textContent=t("pptx.backstage.newHeading");let M=chunk6TALMZ42_cjs.w(e,"div","pptxv-bs-templates");for(let I of chunkWKWWFY2C_cjs.Io){let D=St(e,"",()=>y(()=>n.createPresentation(I.id))),L=e.createElement("b");L.style.background=I.preview;let O=e.createElement("strong");O.textContent=t(I.nameKey);let R=e.createElement("small");R.textContent=t(I.descriptionKey),D.append(L,O,R),M.appendChild(D);}u.append(E,M);}function w(){let E=chunk6TALMZ42_cjs.w(e,"div","pptxv-bs-recent"),M=e.createElement("pptx-ui-search");M.className="pptxv-bs-search",M.setAttribute("data-pptx-search-surface",""),M.setAttribute("data-pptx-search-input",""),M.placeholder=t("pptx.backstage.searchPlaceholder"),M.setAttribute("aria-label",M.placeholder),M.value=v,M.addEventListener("input",()=>{v=M.value,T(E);}),u.appendChild(M),b==="open"&&u.appendChild(St(e,t("pptx.backstage.browseDevice"),()=>y(n.openFile),"pptxv-bs-primary"));let I=e.createElement("h2");I.textContent=t("pptx.backstage.recentHeading"),T(E),u.append(I,E);}function T(E){let M=e.createElement("header");M.replaceChildren(Js(e,t("pptx.backstage.columnName")),Js(e,t("pptx.backstage.columnModified")),Js(e,t("pptx.backstage.columnSize"))),E.replaceChildren(M);let I=v.trim().toLowerCase(),D=I?f.filter(L=>`${L.name} ${L.location}`.toLowerCase().includes(I)):f;for(let L of D){let O=St(e,"",()=>y(()=>n.openRecentFile(L.key))),R=chunk6TALMZ42_cjs.w(e,"span","name"),F=e.createElement("b");F.textContent="P";let H=e.createElement("span"),V=e.createElement("strong");V.textContent=L.name;let N=e.createElement("small");N.textContent=L.location,H.append(V,N),R.append(F,H);let B=e.createElement("span");B.textContent=chunkWKWWFY2C_cjs.Mo(L.timestamp,Date.now(),t);let $=e.createElement("span");$.textContent=chunkWKWWFY2C_cjs.No(L.size),O.append(R,B,$),E.appendChild(O);}if(!D.length){let L=e.createElement("p");L.textContent=t("pptx.backstage.noRecent"),E.appendChild(L);}}function k(){u.appendChild(_T(e,b,n,g,y,t,r,c));}function A(){let E=chunk6TALMZ42_cjs.w(e,"section","pptxv-bs-card"),M=e.createElement("b");M.appendChild(_o(e,lucide.Settings,24));let I=e.createElement("h2");I.textContent=t("pptx.backstage.optionsTitle");let D=e.createElement("p");D.textContent=t("pptx.backstage.optionsBody"),E.append(M,I,D),E.appendChild(St(e,t("pptx.backstage.openOptions"),()=>y(n.openSettings),"pptxv-bs-primary")),u.appendChild(E);}function P(){h(),u.replaceChildren();let E=e.createElement("h1");E.textContent=t(b==="home"?"pptx.backstage.greeting":chunkWKWWFY2C_cjs.Ho.find(I=>I.id===b)?.labelKey??"pptx.backstage.nav.home"),u.appendChild(E),(b==="home"||b==="new")&&C(),(b==="home"||b==="open")&&w(),["info","saveAs","print","share","export"].includes(b)&&k(),b==="options"&&A(),b==="account"&&FT(e,t,u,i);let M=e.createElement("footer");M.textContent=`${t("pptx.backstage.untitled")} \xB7 ${t("pptx.backstage.savedToBrowser")}`,u.appendChild(M);}return P(),{el:s,setHasMacros(E){g=E,b==="saveAs"&&P();}}}function UT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=e.createElement("pptx-ui-ribbon-group");r.setAttribute("data-ribbon-group","help.help"),r.setAttribute("label",t("pptx.ribbon.tab.help"));let i=chunkWKWWFY2C_cjs.Sq(n.getCustomization?.()??chunkWKWWFY2C_cjs.Oq,"options"),s={"help.help.options":()=>n.openSettings("general"),"help.help.keyboardShortcuts":()=>n.openSettings("shortcuts"),"help.help.accessibility":n.openAccessibility};for(let a of chunkWKWWFY2C_cjs.si){if(!i&&a.id!=="help.help.accessibility")continue;let l=e.createElement("pptx-ui-ribbon-command");l.setAttribute("data-ribbon-control",a.id),l.setAttribute("label",t(a.labelKey)),l.setAttribute("icon",a.icon),l.setAttribute("compact",""),l.addEventListener("command-request",s[a.id]),r.append(l);}return o.append(r),o}function KT(e,t,n){let o=ve(e,{triggerLabel:t("pptx.ribbon.action"),triggerText:t("pptx.ribbon.action"),items:chunkWKWWFY2C_cjs.Nl.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 Yr(e,t){let n=chunk6TALMZ42_cjs.w(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[a,l]of t.items.entries()){let p=e.createElement("option");p.value=String(a),p.textContent=l.label,o.appendChild(p);}n.appendChild(o);let r=chunk6TALMZ42_cjs.w(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(chunk6TALMZ42_cjs.K(e,t.icon));let i=chunk6TALMZ42_cjs.w(e,"span","pptxv-btn-label");i.textContent=t.buttonLabel,r.appendChild(i),n.appendChild(r);let s=()=>t.items[Number(o.value)]?.value;return r.addEventListener("click",()=>{let a=s();a!==void 0&&t.onCommit(a);}),{el:n,setDisabled(a){r.disabled=a;},value:s}}function WT(e,t,n){return Yr(e,{selectLabel:t("pptx.ribbon.chartType"),buttonLabel:t("pptx.ribbon.chart"),buttonTitle:t("pptx.ribbon.insertChart"),icon:"chart",items:chunkWKWWFY2C_cjs.hn.map(o=>({label:t(o.labelKey),value:o.id})),onCommit:n})}var nM=[{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 $T(e,t,n){let o=ve(e,{triggerLabel:t("pptx.field.field"),triggerText:t("pptx.field.field"),items:nM.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}var rM={freeformShape:"pen",curve:"shapes"};function qT(e,t,n,o){let r=null,i=n.map(s=>{let a=t(chunkWKWWFY2C_cjs.zs[s]),l=z(e,{label:a,icon:rM[s],textLabel:a,onClick:()=>o(r===s?null:s)});return l.btn.dataset.pptxDrawingTool=s,l.setActive(false),{tool:s,handle:l}});return {buttons:i.map(({handle:s})=>s.btn),setActive(s){r=s;for(let{tool:a,handle:l}of i)l.setActive(a===s);},setDisabled(s){for(let{handle:a}of i)a.setDisabled(s);}}}function jT(e,t,n){let o=z(e,{label:t("pptx.hyperlinkDialog.title"),icon:"link",textLabel:t("pptx.hyperlinkDialog.title"),onClick:n});return o.setDisabled(true),o}function YT(e,t,n){return Yr(e,{selectLabel:t("pptx.insert.shapeType"),buttonLabel:t("pptx.insert.shape"),buttonTitle:t("pptx.insert.addShape"),icon:"shapes",items:chunkWKWWFY2C_cjs.$n.map(o=>({label:t(o.i18nKey),value:o.type})),onCommit:n})}var el=600,tl=340,XT=64;function QT(e,t,n){let o=XT/el,r=Math.round(tl*o),i=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-option-preview",{width:`${XT}px`,height:`${r}px`,overflow:"hidden",pointerEvents:"none"});i.setAttribute("aria-hidden","true");let s=chunk6TALMZ42_cjs.w(e,"div",void 0,{width:`${el}px`,height:`${tl}px`,transform:`scale(${o})`,transformOrigin:"top left"});i.appendChild(s);let a=chunkWKWWFY2C_cjs._n(n),d={document:e,slide:{id:"smartart-preview",rId:"smartart-preview",slideNumber:1,elements:[a]},canvasSize:{width:el,height:tl},scale:1,mediaDataUrls:new Map,t,smartArt3D:false,surfaceChart3D:false,barChart3D:false,lineChart3D:false,areaChart3D:false,pieChart3D:false,presenting:false,registry:chunk6TALMZ42_cjs.u(),renderElement:()=>null},u=chunk6TALMZ42_cjs.H(a,0,d);return u&&s.appendChild(u),i}function ZT(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-dialog-layer");o.hidden=true;let r=chunk6TALMZ42_cjs.w(e,"button","pptxv-smartart-dialog-backdrop");r.type="button",r.setAttribute("aria-label",t("pptx.smartart.close"));let i=chunk6TALMZ42_cjs.w(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 s=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-dialog-header"),a=chunk6TALMZ42_cjs.w(e,"h2");a.textContent=t("pptx.smartart.insertTitle");let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-smartart-dialog-close");l.type="button",l.setAttribute("aria-label",t("pptx.smartart.close")),l.textContent="\xD7",s.append(a,l);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-dialog-body"),d=chunk6TALMZ42_cjs.w(e,"nav","pptxv-smartart-categories");d.setAttribute("aria-label",t("pptx.insertSmartArt.categories"));let u=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-gallery"),c=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-options");c.setAttribute("role","listbox"),c.setAttribute("aria-label",t("pptx.insertSmartArt.layouts")),u.appendChild(c),p.append(d,u);let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-smartart-dialog-footer"),b=chunk6TALMZ42_cjs.w(e,"button","pptxv-smartart-dialog-cancel");b.type="button",b.textContent=t("pptx.smartart.cancel");let g=chunk6TALMZ42_cjs.w(e,"button","pptxv-smartart-dialog-insert");g.type="button",g.textContent=t("pptx.smartart.insert"),g.disabled=true,x.append(b,g),i.append(s,p,x),o.append(r,i);let v="list",f,y=null;function S(A){f=A,g.disabled=false;for(let P of c.querySelectorAll('[role="option"]')){let E=P.dataset.layout===A.layout;P.setAttribute("aria-selected",String(E)),P.classList.toggle("is-selected",E);}}function h(A){A&&(n(A.layout,A.defaultItems),T());}function C(){c.replaceChildren();for(let A of chunkWKWWFY2C_cjs.Ol.filter(P=>P.category===v)){let P=chunk6TALMZ42_cjs.w(e,"button","pptxv-smartart-option");P.type="button",P.dataset.layout=A.layout,P.setAttribute("role","option"),P.setAttribute("aria-selected",String(f?.layout===A.layout)),P.classList.toggle("is-selected",f?.layout===A.layout);let E=QT(e,t,A.layout),M=chunk6TALMZ42_cjs.w(e,"span","pptxv-smartart-option-label");M.textContent=t(A.labelKey),P.append(E,M),P.addEventListener("click",()=>S(A)),P.addEventListener("dblclick",()=>h(A)),c.appendChild(P);}}function w(A){v=A,f=void 0,g.disabled=true;for(let P of d.querySelectorAll("button")){let E=P.dataset.category===A;P.classList.toggle("is-active",E),P.setAttribute("aria-pressed",String(E));}C();}for(let A of chunkWKWWFY2C_cjs.Pl){let P=chunk6TALMZ42_cjs.w(e,"button","pptxv-smartart-category");P.type="button",P.dataset.category=A.id,P.textContent=t(A.labelKey),P.addEventListener("click",()=>w(A.id)),d.appendChild(P);}w(v);function T(){o.hidden||(o.hidden=true,y?.focus(),y=null);}function k(A){if(A.key==="Escape"){A.preventDefault(),T();return}if(A.key!=="Tab")return;let P=Array.from(i.querySelectorAll('button:not(:disabled), [tabindex]:not([tabindex="-1"])'));if(P.length===0)return;let E=P[0],M=P[P.length-1];A.shiftKey&&e.activeElement===E?(A.preventDefault(),M.focus()):!A.shiftKey&&e.activeElement===M&&(A.preventDefault(),E.focus());}return r.addEventListener("click",T),l.addEventListener("click",T),b.addEventListener("click",T),g.addEventListener("click",()=>h(f)),o.addEventListener("keydown",k),{el:o,open(A){let P=e.defaultView?.HTMLElement;y=P&&e.activeElement instanceof P?e.activeElement:null,o.parentElement!==A&&A.appendChild(o),o.hidden=false,i.focus();},close:T}}function JT(e,t,n){let o=ZT(e,t,n),r=z(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 eP(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content");s.classList.add("pptxv-ribbon-insert-content");let a=z(e,{label:t("pptx.ribbon.textBox"),icon:"text-box",onClick:()=>n.insert("text")}),l=YT(e,t,C=>n.insert("shape",C)),p=qT(e,t,n.armFreeformTool?n.visibleDrawingTools?.()??[]:[],C=>n.armFreeformTool?.(C)),d=z(e,{label:t("pptx.ribbon.image"),icon:"image",onClick:()=>{n.insertImage();}}),u=z(e,{label:t("pptx.ribbon.media"),icon:"video",onClick:()=>{n.insertMedia();}});u.btn.title=t("pptx.ribbon.insertMedia");let c=z(e,{label:t("pptx.ribbon.table"),icon:"table",onClick:()=>n.insert("table")}),x=WT(e,t,C=>n.insertChart(C)),b=JT(e,t,(C,w)=>n.insertSmartArt(C,w)),g=z(e,{label:t("pptx.ribbon.equation"),icon:"equation",onClick:o});g.btn.title=t("pptx.insert.insertEquation");let v=KT(e,t,C=>n.insertActionButton(C)),f=$T(e,t,C=>n.insertField(C)),y=jT(e,t,i),S=z(e,{label:t("pptx.headerFooter.title"),icon:"field",textLabel:t("pptx.headerFooter.title"),onClick:r});G(a.btn,"insert.text.textBox"),G(l.el,"insert.illustrations.shapes"),G(d.btn,"insert.images.pictures"),G(u.btn,"insert.media.media"),G(c.btn,"insert.tables.table"),G(x.el,"insert.illustrations.chart"),G(b.el,"insert.illustrations.smartArt"),G(g.btn,"insert.symbols.equation"),G(v.el,"insert.links.action"),G(f.el,"insert.text.field"),G(y.btn,"insert.links.link"),s.append(Z(e,"insert.text",a.btn),Z(e,"insert.illustrations",l.el,...p.buttons),Z(e,"insert.images",d.btn),Z(e,"insert.media",u.btn),Z(e,"insert.tables",c.btn),Z(e,"insert.illustrations",x.el,b.el),Z(e,"insert.symbols",g.btn),Z(e,"insert.links",v.el),Z(e,"insert.text",f.el),Z(e,"insert.links",y.btn),Z(e,"insert.text",S.btn));let h=[a,l,p,d,u,c,x,b,g,v,f,S];return {el:s,setEditable(C){for(let w of h)w.setDisabled(!C);},setHasSelection(C){y.setDisabled(!C);},setFreeformTool(C){p.setActive(C);}}}function tP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content");for(let r of chunkWKWWFY2C_cjs.Ys){let i=e.createElement("pptx-ui-ribbon-group");i.setAttribute("label",t(r.labelKey)),i.setAttribute("data-ribbon-group",r.id);for(let s of r.commands){let a=e.createElement("pptx-ui-ribbon-command");a.setAttribute("label",t(s.labelKey)),a.setAttribute("icon",s.icon),a.setAttribute("data-ribbon-control",s.id),a.setAttribute("compact",""),s.unsupported?a.setAttribute("disabled",""):a.addEventListener("command-request",n.startRehearsal),i.append(a);}o.append(i);}return o}function oP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),r=(x,b)=>z(e,{label:t(x),text:t(x),onClick:b}).btn,i=x=>{let b=z(e,{label:t(x),text:t(x),onClick:()=>{}});return b.setDisabled(true),b.btn},s=r("pptx.review.spelling",n.toggleSpellCheck);s.title=t("pptx.review.toggleSpellCheck");let a=z(e,{label:t("pptx.review.accessibilityCheck"),text:t("pptx.review.accessibilityCheck"),icon:"sidebar",onClick:n.openAccessibility});a.btn.title=t("pptx.review.accessibilityCheckTooltip");let l=r("pptx.review.language",()=>n.openSettings("general"));l.title=t("pptx.review.languageTooltip");let p=z(e,{label:t("pptx.ribbon.compare"),text:t("pptx.ribbon.compare"),onClick:n.openCompare});p.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),c=(x,b)=>G(i(x),b);return o.append(Z(e,"review.proofing",G(s,"review.proofing.spelling"),c("pptx.review.thesaurus","review.proofing.thesaurus")),Z(e,"review.accessibility",G(a.btn,"review.accessibility.check")),Z(e,"review.language",c("pptx.review.translate","review.language.translate"),l),Z(e,"review.compare",c("pptx.review.markAllRead","review.compare.markAllRead"),G(p.btn,"review.compare.compare")),Z(e,"review.comments",G(d,"review.comments.newComment"),c("pptx.common.delete","review.comments.delete"),c("pptx.common.previous","review.comments.previous"),c("pptx.common.next","review.comments.next"),G(u,"review.comments.showComments")),Z(e,"review.protect",c("pptx.review.readOnly","review.protect.readOnly"),c("pptx.review.restrictPermission","review.protect.restrictPermission")),Z(e,"review.ink",c("pptx.review.hideInk","review.ink.hideInk"))),chunkWKWWFY2C_cjs.Sq(n.getCustomization?.()??chunkWKWWFY2C_cjs.Oq,"options")||l.remove(),{el:o,setEditable:x=>p.setDisabled(!x)}}function nP(e,t,n){let o=chunkWKWWFY2C_cjs.uq({persist:false}),r=()=>(typeof n=="function"?n():n)??o,i=e.createElement("pptx-ui-subtitle-settings");i.setAttribute("data-ribbon-control","slideShow.captions.subtitleSettings");let s=()=>{let a=r();i.settings=chunkWKWWFY2C_cjs.Fp(a.getOptions()),i.labels=chunkWKWWFY2C_cjs.Ip(t),i.languageDisabled=a.isLocked("accessibility","subtitleLanguage");};return i.addEventListener("command-request",s,true),i.addEventListener("subtitle-settings-change",a=>{chunkWKWWFY2C_cjs.Gp(r(),a.detail),s();}),s(),i}function rP(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),i={"slideShow.startSlideShow.fromBeginning":n.startFromBeginning,"slideShow.startSlideShow.fromCurrent":n.startFromCurrent,"slideShow.present.presenterView":n.openPresenterView,"slideShow.startSlideShow.customShow":n.openCustomShows,"slideShow.present.broadcast":n.openBroadcast,"slideShow.setUp.setUpSlideShow":n.openSetUp,"slideShow.setUp.hideSlide":n.toggleHideSlide,"slideShow.setUp.rehearseTimings":n.startRehearsal,"slideShow.setUp.record":n.startRehearsal},s=new Map;for(let c of chunkWKWWFY2C_cjs.ri){let x=e.createElement("pptx-ui-ribbon-group");x.setAttribute("label",t(c.labelKey)),x.setAttribute("data-ribbon-group",c.id);for(let b of c.commands){if(b.id==="slideShow.present.broadcast"&&chunkWKWWFY2C_cjs.Tp("broadcast",o))continue;let g=e.createElement("pptx-ui-ribbon-command");g.setAttribute("data-ribbon-control",b.id),g.setAttribute("label",t(b.labelKey)),g.setAttribute("icon",b.icon),g.title=t(b.tooltipKey??b.labelKey),g.toggleAttribute("disabled",!!b.unsupported),b.id==="slideShow.setUp.hideSlide"&&g.setAttribute("pressed","false"),g.addEventListener("command-request",v=>i[v.detail.id]?.()),s.set(b.id,g),x.append(g);}r.append(x);}let a=e.createElement("pptx-ui-ribbon-group");a.setAttribute("label",t("pptx.slideShow.options"));let l=e.createElement("pptx-ui-slide-show-options");l.labels=Object.fromEntries(chunkWKWWFY2C_cjs.qi.map(c=>[c.id,t(c.labelKey)]));let p=()=>{l.presentationProperties=n.showOptions();};l.addEventListener("show-options-change",c=>{n.updateShowOptions(c.detail),p();}),p();let d=e.createElement("pptx-ui-ribbon-toggle");d.setAttribute("data-ribbon-control","slideShow.captions.subtitles"),d.setAttribute("label",t("pptx.slideShow.subtitles")),d.title=t("pptx.slideShow.subtitlesTooltip"),d.addEventListener("toggle-request",()=>n.toggleSubtitles());let u=nP(e,t,n.subtitleOptionsStore);return l.append(Z(e,"slideShow.captions",d,u)),a.append(l),r.append(a),{el:r,syncOptions:p,setSubtitlesVisible:c=>d.toggleAttribute("checked",c),setHideSlideActive:c=>{let x=s.get("slideShow.setUp.hideSlide");x.toggleAttribute("active",c),x.setAttribute("pressed",String(c));}}}function iP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-advance"),r=chunk6TALMZ42_cjs.w(e,"span","pptxv-rgroup-label");r.textContent=t("pptx.ribbon.advanceSlide"),o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"label","pptxv-transition-advance-row"),s=e.createElement("input");s.type="checkbox",s.checked=true,s.setAttribute("aria-label",t("pptx.ribbon.onMouseClick")),i.append(s,e.createTextNode(t("pptx.ribbon.onMouseClick")));let a=chunk6TALMZ42_cjs.w(e,"label","pptxv-transition-advance-row"),l=e.createElement("input");l.type="checkbox",l.setAttribute("aria-label",t("pptx.ribbon.afterDuration"));let p=e.createElement("input");p.type="text",p.className="pptxv-transition-advance-seconds",p.value=chunkWKWWFY2C_cjs.li,p.disabled=true,p.title=t("pptx.ribbon.advanceAfterSeconds"),p.setAttribute("aria-label",t("pptx.ribbon.advanceAfterSeconds")),a.append(l,e.createTextNode(t("pptx.ribbon.afterDuration")),p);let d=()=>({advanceOnClick:s.checked,advanceAfter:l.checked,advanceAfterText:p.value}),u=false,c=()=>{p.disabled=u||!l.checked;};return s.addEventListener("change",()=>n(d())),l.addEventListener("change",()=>{c(),n(d());}),p.addEventListener("change",()=>n(d())),p.addEventListener("keydown",x=>x.stopPropagation()),G(i,"transitions.timing.advanceOnClick"),G(a,"transitions.timing.advanceAfter"),o.append(i,a),{el:o,setValue(x){s.checked=x.advanceOnClick,l.checked=x.advanceAfter,e.activeElement!==p&&(p.value=x.advanceAfterText),c();},setDisabled(x){u=x,s.disabled=x,l.disabled=x,c();}}}function iM(e,t){return e.type===t.type&&e.durationSec===t.durationSec&&e.advanceOnClick===t.advanceOnClick&&e.advanceAfter===t.advanceAfter&&e.advanceAfterText===t.advanceAfterText}function aP(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=n.readDraft()??{...chunkWKWWFY2C_cjs.mi},s=z(e,{label:t("pptx.ribbon.preview"),icon:"play",textLabel:t("pptx.ribbon.preview"),onClick:()=>chunkWKWWFY2C_cjs.xi(chunkWKWWFY2C_cjs.oi(void 0,i),e)});s.btn.title=t("pptx.ribbon.previewTransition"),r.appendChild(s.btn);let a=z(e,{label:t("pptx.headerFooter.applyToAll"),icon:"copy",textLabel:t("pptx.headerFooter.applyToAll"),onClick:()=>n.applyDraft(i,true)});a.btn.title=t("pptx.ribbon.applyTransitionToAll");function l(){for(let C of c)C.handle.setActive(C.type===i.type);}let p=C=>{i={...i,...C},l(),n.applyDraft(i,false);},d=iP(e,t,C=>p(C)),u=chunk6TALMZ42_cjs.w(e,"div","pptxv-transition-gallery"),c=chunkWKWWFY2C_cjs.ki.map(C=>{let w=z(e,{label:t(C.labelKey),text:t(C.labelKey),onClick:()=>p({type:C.type})});return u.appendChild(w.btn),{type:C.type,handle:w}});r.appendChild(u);let x=re(e,{label:t("pptx.ribbon.duration"),min:0,max:20,step:.25,onCommit:C=>p({durationSec:Math.max(0,C)})});x.setValue(i.durationSec),x.input.title=t("pptx.ribbon.transitionDurationTitle"),r.appendChild(x.el);let b=chunk6TALMZ42_cjs.w(e,"label","pptxv-transition-sound"),g=e.createElement("select");g.setAttribute("aria-label",t("pptx.ribbon.sound"));let v=e.createElement("input");v.type="file",v.accept="audio/*",v.style.display="none";let f=e.createElement("button");f.type="button",f.className="pptxv-transition-sound-preview",f.setAttribute("aria-label",t("pptx.animation.sound.preview")),f.textContent="\u25B6",f.disabled=true,b.append(e.createTextNode(t("pptx.ribbon.sound")),g,f,v),r.appendChild(b);function y(){let C=n.readTransition();g.replaceChildren();for(let w of chunkWKWWFY2C_cjs.di(C)){let T=e.createElement("option");T.value=w.value,T.textContent=w.i18nKey?t(w.i18nKey):w.label??"",g.appendChild(T);}g.value=chunkWKWWFY2C_cjs.ei(C),f.disabled=!chunkWKWWFY2C_cjs.hi(C);}y(),g.addEventListener("change",()=>{if(g.value===chunkWKWWFY2C_cjs.ci){v.click(),g.value=chunkWKWWFY2C_cjs.ei(n.readTransition());return}if(g.value===chunkWKWWFY2C_cjs.bi){n.applyChange(chunkWKWWFY2C_cjs.ii());return}let C=chunkWKWWFY2C_cjs.gi(g.value);C&&n.applyChange(C);}),f.addEventListener("click",()=>{let C=chunkWKWWFY2C_cjs.hi(n.readTransition());if(!C)return;let w=chunkWKWWFY2C_cjs.Zc(C);w&&Lt(w.dataUrl);}),v.addEventListener("change",()=>{let C=v.files?.[0];v.value="",C&&chunkWKWWFY2C_cjs.ji(C).then(w=>{w&&n.applyChange(chunkWKWWFY2C_cjs.fi({name:C.name,dataUrl:w}));});}),r.appendChild(a.btn),r.appendChild(d.el);let S=z(e,{label:t("pptx.ribbon.inspector"),icon:"panel-right",textLabel:t("pptx.ribbon.inspector"),onClick:o});S.btn.title=t("pptx.ribbon.openInspectorTransitions"),r.appendChild(S.btn),G(s.btn,"transitions.preview.preview"),G(u,"transitions.transitionToThisSlide.gallery"),G(x.el,"transitions.timing.duration"),G(b,"transitions.timing.sound"),G(a.btn,"transitions.timing.applyToAll"),r.replaceChildren(Z(e,"transitions.preview",s.btn),Z(e,"transitions.transitionToThisSlide",u),Z(e,"transitions.timing",x.el,b,a.btn,d.el),S.btn);let h=()=>{l(),x.setValue(i.durationSec),d.setValue(i);};return h(),{el:r,sync(){y();let C=n.readDraft()??chunkWKWWFY2C_cjs.mi;iM(C,i)||(i=C,h());},setEditable(C){for(let w of c)w.handle.setDisabled(!C);x.setDisabled(!C),g.disabled=!C,a.setDisabled(!C),d.setDisabled(!C);}}}function sP(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon-tab-content"),i=(P,E)=>z(e,{label:t(P),text:t(P),onClick:E}),s=P=>{let E=i(P,()=>{});return E.setDisabled(true),E.btn},a=i("pptx.view.normal",n.normalView);a.btn.title=t("pptx.statusBar.normalView");let l=i("pptx.slideSorter.title",n.openSlideSorter);l.btn.title=t("pptx.view.slideSorterTooltip");let p=i("pptx.view.outlineView",n.openOutlineView);p.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 c=i("pptx.ruler.rulers",()=>n.toggleViewOption("showRulers")),x=i("pptx.grid.grid",()=>n.toggleViewOption("showGrid")),b=i("pptx.view.guides",()=>n.toggleViewOption("showGuides"));b.btn.title=t("pptx.ribbon.toggleGuides");let g=i("pptx.view.snapToGrid",()=>n.toggleViewOption("snapToGrid")),v=i("pptx.view.snapToShape",()=>n.toggleViewOption("snapToShape")),f=i("pptx.view.selection",n.openSelectionPane);f.btn.title=t("pptx.selectionPane.title");let y=i("pptx.ribbon.eyedropper",n.activateEyedropper);y.btn.title=t("pptx.view.eyedropperTooltip");let S=i("pptx.view.hGuide",()=>n.addGuide("h"));S.btn.title=t("pptx.view.addHorizontalGuide");let h=i("pptx.view.vGuide",()=>n.addGuide("v"));h.btn.title=t("pptx.view.addVerticalGuide");let C=!chunkWKWWFY2C_cjs.Tp("zoom",o),w=C?i("pptx.view.zoomToFit",n.zoomToFit):null;w&&(w.btn.title=t("pptx.view.zoomToFitTooltip"));let T=i("pptx.ribbon.templatesOff",()=>n.toggleTemplateEditing?.());T.btn.dataset.testid="template-edit-toggle",T.btn.title=t("pptx.view.templateEditingTooltip");let k=(P,E)=>G(P.btn,E),A=(P,E)=>G(s(P),E);return r.append(Z(e,"view.presentationViews",k(a,"view.presentationViews.normal"),k(l,"view.presentationViews.slideSorter"),k(p,"view.presentationViews.outline"),k(d,"view.presentationViews.readingView")),Z(e,"view.masterViews",k(u,"view.masterViews.slideMaster"),A("pptx.master.handoutMasterTitle","view.masterViews.handoutMaster"),A("pptx.master.notesMasterTitle","view.masterViews.notesMaster")),Z(e,"view.show",k(c,"view.show.ruler"),k(x,"view.show.gridlines"),k(b,"view.show.guides"),k(g,"view.show.snapToGrid"),k(f,"view.show.selectionPane"),k(y,"view.show.eyedropper"),k(v,"view.show.snapToShape"),Ot(e,"view.show.addGuide",S.btn,h.btn)),Z(e,"view.zoom",...C?[A("pptx.slideSorter.zoom","view.zoom.zoom"),w?.btn??[]].flat():[]),Z(e,"view.window",k(T,"view.window.templateEditing"),A("pptx.view.macros","view.window.macros"))),w&&G(w.btn,"view.zoom.fitToWindow"),{el:r,setEditable(P){T.setDisabled(!P),u.setDisabled(!P),y.setDisabled(!P);},setViewOptions(P){c.setActive(P.showRulers),x.setActive(P.showGrid),b.setActive(P.showGuides),g.setActive(P.snapToGrid),v.setActive(P.snapToShape);},setTemplateEditing(P){let E=t(P?"pptx.ribbon.templatesOn":"pptx.ribbon.templatesOff");T.btn.textContent=E,T.btn.title=t("pptx.view.templateEditingTooltip"),T.btn.setAttribute("aria-label",E),T.setActive(P);}}}function Xr(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-ribbon");i.dataset.pptxChrome="ribbon",i.setAttribute("role","toolbar"),i.setAttribute("aria-label",t("pptx.toolbar.presentationToolbarAria"));let s=CT(e,t,n,o);i.append(s.el);let a=Xs(e,t,_=>R(_),o,{startRecording:()=>n.slideShow.startRehearsal()});a.el.hidden=true,i.appendChild(a.el);let l=Ls(e,t,n.findReplace);i.appendChild(l.el);let p=_E(e,t,(_,K)=>K?n.edit.updateEquation(K,_):n.insert.insertEquation(_));i.appendChild(p.el);let d=GE(e,t,n.edit);i.appendChild(d.el);let u=ht(_=>n.edit.applyRibbonGalleryResult(_)),c=_=>chunkWKWWFY2C_cjs.Tp(_,o),x=c("file")?null:GT(e,t,n.file,()=>R("home"),o,r),b=c("home")?null:vT(e,t,{edit:n.edit,onToggleFindReplace:()=>l.toggle(),hiddenActions:o,galleryHub:u}),g=c("insert")?null:eP(e,t,n.insert,()=>p.toggle(),()=>n.nav.openHeaderFooter(),()=>n.nav.openHyperlink()),v=c("draw")?null:OT(e,t,n.draw),f=false,y=()=>n.nav.toggleInspector?.(),S=()=>{n.nav.clearSelection?.(),f||y();},h=c("design")?null:RT(e,t,n.design,()=>d.toggle(),S,u),C=c("transitions")?null:aP(e,t,n.transitions,y),w=c("animations")?null:LT(e,t,n.edit,y),T=c("slideShow")?null:rP(e,t,n.slideShow,o),k=c("record")?null:tP(e,t,n.slideShow),A=c("review")?null:oP(e,t,n.nav),P=c("view")?null:sP(e,t,n.nav,o),E=c("help")?null:UT(e,t,n.nav),M={file:x?.el,home:b?.el,insert:g?.el,draw:v?.el,design:h?.el,transitions:C?.el,animations:w?.el,slideShow:T?.el,record:k??void 0,review:A?.el,view:P?.el,help:E??void 0},I=chunkWKWWFY2C_cjs.Up(zo,o);for(let _ of I){let K=M[_.id];K&&(K.hidden=true,K.dataset.pptxChrome="ribbon-content",i.appendChild(K));}let D=KE(e,t,u);for(let[_,K]of D)K.hidden=true,M[_]=K;let L=I.find(_=>_.id===jr)?.id??I[0]?.id??jr,O=L;function R(_){if(M[_]){_!==O&&u.closeAll(),O=_,a.setActive(_);for(let K of Object.keys(M)){let q=M[K];q&&(q.hidden=K!==_);}}}R(O);let F,H={hasClipboard:false,slideCount:0,selectedCount:0},V=()=>{let _=chunkWKWWFY2C_cjs.er(F??null,n.nav.getCustomization?.());a.setContextualTabs(_),WE(i,D,_);let K=chunkWKWWFY2C_cjs.gr(O,_,L);K!==O&&R(K);},N=()=>{u.sync(H.galleryContext,$),V(),b?.update(hT($,F,H));},B=()=>{w?.update({editable:$,hasSelection:F!==void 0,selectedElementId:H.selectedElementId,animations:H.animations??[],animationTimelineAnchors:H.animationTimelineAnchors??[]});},$=false,Y=new Set;return {el:i,update(){},setEditState(_){s.setEditState(_),a.el.hidden=!_.editable;},setNotesExpanded(){},setAutosaveStatus:(_,K)=>s.setAutosaveStatus(_,K),setEditable(_){$=_,A?.setEditable(_),P?.setEditable(_),g?.setEditable(_),v?.setEditable(_),l.setEditable(_),p.setEditable(_),d.setEditable(_),h?.setEditable(_),C?.setEditable(_),C?.sync(),T?.syncOptions(),N(),B();},setDrawState:_=>{v?.update(_),g?.setFreeformTool(_.freeformTool??null);},setTemplateEditing:_=>P?.setTemplateEditing(_),setViewOptions:_=>P?.setViewOptions(_),setHasMacros:_=>x?.setHasMacros(_),setSubtitlesVisible:_=>T?.setSubtitlesVisible(_),setHideSlideActive:_=>T?.setHideSlideActive(_),setInspectorOpen:_=>{f=_,s.setInspectorOpen(_);},toggleFindReplace:()=>l.toggle(),openEquationEditor:(_,K)=>p.openEdit(_,K),showDefaultTab:()=>R(L),setHiddenOptionTabs:_=>{if(Y=new Set(_.filter(K=>K!=="file")),a.setHiddenTabs(Y),Y.has(O)){let K=Y.has("home")?I.find(q=>!Y.has(q.id))?.id:"home";K&&R(K);}},applyScreenTips:_=>a.applyScreenTips(_),updateSelection(_,K){F=_,H=K,g?.setHasSelection(_!==void 0),N(),B();}}}var lP=0;function aM(){return lP+=1,`pptxv-ribbon-${lP}`}function pP(e,t,n){let o=aM();t.setAttribute(chunkWKWWFY2C_cjs.Mq,o);let r=e.createElement("style");r.dataset.pptxRibbonCustomization="";let i=s=>{r.textContent=chunkWKWWFY2C_cjs.Nq(s??chunkWKWWFY2C_cjs.Oq,o);};return i(n),t.appendChild(r),{el:r,token:o,update:i}}function dP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-run-program-notices");o.dataset.testid="pptx-run-program-notices",o.hidden=true,o.setAttribute("style",chunkWKWWFY2C_cjs.uo()),o.setAttribute("role","region"),o.setAttribute("aria-label",t("pptx.hyperlink.actionRunProgram"));let r=chunkWKWWFY2C_cjs.Gj(typeof navigator>"u"?void 0:navigator);function i(s){let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-run-program-notice");a.dataset.testid="pptx-run-program-notice",a.dataset.target=s.target,a.setAttribute("role","status");let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-run-program-notice-message");if(l.textContent=t(s.messageKey,{target:s.target}),a.appendChild(l),r){let d=chunk6TALMZ42_cjs.w(e,"button","pptxv-run-program-notice-copy");d.type="button",d.dataset.testid="pptx-run-program-notice-copy",d.textContent=t(s.copyLabelKey),d.addEventListener("click",()=>{navigator.clipboard.writeText(s.target);}),a.appendChild(d);}let p=chunk6TALMZ42_cjs.w(e,"button","pptxv-run-program-notice-dismiss");return p.type="button",p.dataset.testid="pptx-run-program-notice-dismiss",p.setAttribute("aria-label",t("pptx.compatibility.dismiss")),p.appendChild(chunk6TALMZ42_cjs.K(e,"close")),p.addEventListener("click",()=>n(s.id)),a.appendChild(p),a}return {el:o,update(s){o.hidden=s.length===0,o.replaceChildren(...s.map(i));}}}function ol(e,t){let n=chunk6TALMZ42_cjs.w(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=chunk6TALMZ42_cjs.w(e,"div","pptxv-shortcuts-header"),r=chunk6TALMZ42_cjs.w(e,"h2","pptxv-shortcuts-title");r.textContent=t("pptx.shortcuts.title");let i=chunk6TALMZ42_cjs.w(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 s=chunk6TALMZ42_cjs.w(e,"div","pptxv-shortcuts-list");for(let l of chunkWKWWFY2C_cjs.jp){let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-shortcuts-row"),d=chunk6TALMZ42_cjs.w(e,"span","pptxv-shortcuts-action");d.textContent=t(l.actionKey);let u=chunk6TALMZ42_cjs.w(e,"kbd","pptxv-shortcuts-keys");u.textContent=l.shortcut,p.append(d,u),s.appendChild(p);}n.append(o,s);let a=()=>{n.hidden=true;};return i.addEventListener("click",a),{el:n,toggle(){n.hidden=!n.hidden;},close:a,isOpen:()=>!n.hidden}}function cP(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-statusbar"),s=()=>{let k=chunk6TALMZ42_cjs.w(e,"span","pptxv-statusbar-sep");return k.setAttribute("aria-hidden","true"),k},a=chunk6TALMZ42_cjs.w(e,"span","pptxv-statusbar-counter");a.setAttribute("aria-live","polite");let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-statusbar-text");l.textContent=t("pptx.statusBar.language");let p=chunk6TALMZ42_cjs.w(e,"span","pptxv-statusbar-text pptxv-statusbar-save");i.append(a,s(),l,s(),p),i.appendChild(chunk6TALMZ42_cjs.w(e,"span","pptxv-statusbar-spacer"));let d=false,u="",c="idle",x=()=>{p.textContent=u.length>0?u:t(d?"pptx.statusBar.unsavedChanges":"pptx.statusBar.allSaved"),p.classList.toggle("is-saving",c==="saving"),p.classList.toggle("is-error",c==="error");};x();let b=!chunkWKWWFY2C_cjs.Tp("notes",o),g=!chunkWKWWFY2C_cjs.Tp("fullscreen",o),v=!chunkWKWWFY2C_cjs.Tp("zoom",o),f=null;if(b){f=chunk6TALMZ42_cjs.w(e,"button","pptxv-statusbar-btn pptxv-statusbar-notes"),f.type="button",f.title=t("pptx.statusBar.toggleNotes"),f.setAttribute("aria-label",t("pptx.statusBar.toggleNotes")),f.setAttribute("aria-pressed","false"),f.setAttribute("data-pptx-compact",""),f.appendChild(sM(e,"sticky-note"));let k=chunk6TALMZ42_cjs.w(e,"span");k.textContent=t("pptx.notes.title"),f.appendChild(k),f.addEventListener("click",n.toggleNotes);}let y=z(e,{label:t("pptx.statusBar.normalView"),icon:"monitor",className:"pptxv-statusbar-btn is-active",onClick:n.normalView});y.btn.setAttribute("data-pptx-compact","");let S=z(e,{label:t("pptx.statusBar.slideSorter"),icon:"columns",className:"pptxv-statusbar-btn",onClick:n.openSlideSorter});S.btn.setAttribute("data-pptx-compact","");let h=g?z(e,{label:t("pptx.statusBar.slideShow"),icon:"presentation",className:"pptxv-statusbar-btn",onClick:n.togglePresentation}):null;h?.btn.setAttribute("data-pptx-compact","");let C=null,w=null,T=null;return v&&(C=z(e,{label:t("pptx.statusBar.zoomOut"),icon:"minus",className:"pptxv-statusbar-btn",onClick:n.zoomOut}),C.btn.setAttribute("data-pptx-compact",""),w=chunk6TALMZ42_cjs.w(e,"button","pptxv-statusbar-zoom"),w.type="button",w.title=t("pptx.statusBar.zoomToFit"),w.setAttribute("aria-label",t("pptx.statusBar.zoomToFit")),w.setAttribute("data-pptx-compact",""),w.addEventListener("click",n.zoomToFit),T=z(e,{label:t("pptx.statusBar.zoomIn"),icon:"plus",className:"pptxv-statusbar-btn",onClick:n.zoomIn}),T.btn.setAttribute("data-pptx-compact","")),i.append(...f?[f]:[],s(),y.btn,S.btn,...h?[h.btn]:[],...[],s(),...C&&w&&T?[C.btn,w,T.btn]:[]),{el:i,update({current:k,total:A,zoomPercent:P}){a.textContent=A>0?t("pptx.statusBar.slideOf",{current:k+1,total:A}):t("pptx.statusBar.noSlides"),w&&(w.textContent=`${Math.round(P)}%`);},setNotesExpanded(k){f?.setAttribute("aria-pressed",String(k)),f?.classList.toggle("is-active",k);},setSaveStatus(k,A){u=k,c=A,x();},setDirty(k){d=k,x();},setPresenting(k){y.btn.classList.toggle("is-active",!k),h?.btn.classList.toggle("is-active",k);}}}function sM(e,t){let n=chunk6TALMZ42_cjs.w(e,"span","pptxv-statusbar-icon");return n.appendChild(lM(e,t)),n}function lM(e,t){return chunk6TALMZ42_cjs.K(e,t)}function Qr(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 U(e){let t=Qr(e);if(t)return chunkWKWWFY2C_cjs.To(t.document,t.target);let n=e.slides[e.currentSlide];return n?e.editTemplateMode?e.templateElementsBySlideId[n.id]??[]:n.elements:[]}function mP(e,t){return Qr(e)||!e.editTemplateMode||chunkWKWWFY2C_cjs.we(t)?U(e):e.slides[e.currentSlide]?.elements??[]}function uP(e,t,n){return Qr(e)||!e.editTemplateMode||chunkWKWWFY2C_cjs.we(t)?X(e,n):{slides:e.slides.map((o,r)=>r===e.currentSlide?{...o,elements:n}:o)}}function X(e,t){let n=Qr(e);if(n){let r=chunkWKWWFY2C_cjs.Uo(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 J(e,t){return U(e).find(n=>n.id===t)}function Go(e){return chunkWKWWFY2C_cjs.cs({mruColors:e.presentationProperties.mruColors})}function dt(e,t){let n=e.get(),o=Go(n),r=chunkWKWWFY2C_cjs.ds(o,t);r!==o&&e.set({presentationProperties:{...n.presentationProperties,...chunkWKWWFY2C_cjs.es(r)}});}function pM(e){return e&&chunkWKWWFY2C_cjs.f(e)?{fillColor:e.shapeStyle?.fillColor,fillColorRef:e.shapeStyle?.fillColorRef,strokeColor:e.shapeStyle?.strokeColor,strokeColorRef:e.shapeStyle?.strokeColorRef,strokeWidth:e.shapeStyle?.strokeWidth??0,fillOpacity:e.shapeStyle?.fillOpacity??1,strokeOpacity:e.shapeStyle?.strokeOpacity??1}:{fillColor:void 0,fillColorRef:void 0,strokeColor:void 0,strokeColorRef:void 0,strokeWidth:0,fillOpacity:1,strokeOpacity:1}}function nl(e,t=null,n=[],o=null,r=new Map,i=null,s=[],a=void 0){let l=pM(e),p=e?chunkWKWWFY2C_cjs.xg(e):void 0,d=e?chunkWKWWFY2C_cjs.Mm(e):void 0,u=e?chunkWKWWFY2C_cjs.Om(e):void 0,c=e?chunkWKWWFY2C_cjs.Qm(e):void 0,x=e?.type==="table"&&t?e.tableData?.rows[t.row]?.cells[t.column]:void 0;return {hasSelection:e!==void 0,isLocked:chunkWKWWFY2C_cjs.Ne(e),croppable:chunkWKWWFY2C_cjs.Le(e,"crop"),arrowheadsChangeable:chunkWKWWFY2C_cjs.Le(e,"changeArrowheads"),canShape:qr(e),canText:Le(e),isImage:e!==void 0&&chunkWKWWFY2C_cjs.d(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,oleName:e?.type==="ole"?e.oleName:void 0,oleElement:e?.type==="ole"?e:void 0,x:e?.x??0,y:e?.y??0,width:e?.width??0,height:e?.height??0,rotation:e?.rotation??0,fillColor:l.fillColor,fillColorRef:l.fillColorRef,strokeColor:l.strokeColor,strokeColorRef:l.strokeColorRef,strokeWidth:l.strokeWidth,shapeStyle:e&&chunkWKWWFY2C_cjs.f(e)?e.shapeStyle:void 0,shapeType:e?.type==="shape"?e.shapeType:void 0,isConnector:e?.type==="connector",fillOpacity:l.fillOpacity,strokeOpacity:l.strokeOpacity,gradientEnabled:e!==void 0&&chunkWKWWFY2C_cjs.Gm(e),gradient:e?chunkWKWWFY2C_cjs.Fm(e):chunkWKWWFY2C_cjs.Lm(),vAlign:p?.vAlign??"top",textWrap:e?chunkWKWWFY2C_cjs.Ag(e):"square",autoFitMode:e?chunkWKWWFY2C_cjs.Bg(e):"none",characterSpacing:p?.characterSpacing??0,lineSpacing:p?.lineSpacing??1,lineSpacingExactPt:p?.lineSpacingExactPt??null,paragraphSpacingBefore:p?.paragraphSpacingBefore??0,paragraphSpacingAfter:p?.paragraphSpacingAfter??0,paragraphIndent:p?.paragraphIndent??0,paragraphMarginLeft:p?.paragraphMarginLeft??0,textDirection:p?.textDirection??"horizontal",textRtl:p?.rtl??false,textStyle:e&&"textStyle"in e?e.textStyle:void 0,selectedTextRange:o,imageBrightness:d?.brightness??0,imageContrast:d?.contrast??0,imageSaturation:d?.saturation??0,imageArtisticEffect:e&&chunkWKWWFY2C_cjs.d(e)?e.imageEffects?.artisticEffect??"none":"none",imageTransparency:e&&chunkWKWWFY2C_cjs.d(e)?100-(e.imageEffects?.alphaModFix??100):0,imageBiLevel:e&&chunkWKWWFY2C_cjs.d(e)?e.imageEffects?.biLevel??0:0,imageDuotone1:e&&chunkWKWWFY2C_cjs.d(e)?e.imageEffects?.duotone?.color1??"#000000":"#000000",imageDuotone2:e&&chunkWKWWFY2C_cjs.d(e)?e.imageEffects?.duotone?.color2??"#ffffff":"#ffffff",imageColorWash:e&&chunkWKWWFY2C_cjs.d(e)?e.imageEffects?.colorWash:void 0,altText:e?chunkWKWWFY2C_cjs.rm(e).altText:"",title:e?chunkWKWWFY2C_cjs.rm(e).title:"",showAccessibilitySection:e!==void 0&&chunkWKWWFY2C_cjs.sm(e),chartHighlightCell:e?.type==="chart"&&i?.elementId===e.id?{seriesIndex:i.part.seriesIndex,pointIndex:i.part.pointIndex}:null,actionClick:e?.actionClick?chunkWKWWFY2C_cjs.r(e.actionClick,"click"):void 0,actionHover:e?.actionHover?chunkWKWWFY2C_cjs.r(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:u?.cropLeft??0,cropTop:u?.cropTop??0,cropRight:u?.cropRight??0,cropBottom:u?.cropBottom??0,tableHeaderRow:c?.firstRowHeader??false,tableBandedRows:c?.bandedRows??false,tableBandedColumns:c?.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:c?.cellPadding??0,selectedTableCell:x?t:null,selectedTableCells:x?n:[],tableCellStyle:x?.style,tableColumnWidths:e?.type==="table"?e.tableData?.columnWidths??[]:[],tableRowHeights:e?.type==="table"?e.tableData?.rows.map(b=>b.height??32)??[]:[],tableElement:e?.type==="table"?e:void 0,recentColors:s,themeColorMap:a}}function dM(e){let t=U(e);return e.selectedElementIds.every(n=>chunkWKWWFY2C_cjs.Le(t.find(o=>o.id===n)??null,"group"))}function cM(e){let t=U(e);return e.selectedElementIds.map(n=>t.find(o=>o.id===n)).filter(n=>n!==void 0)}function Uo(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 mM(e,t,n){return {element:t??null,themeColorMap:e.colorScheme?chunkWKWWFY2C_cjs.Q(e.colorScheme):void 0,theme:{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme},resolveStyleMatrix:n?o=>n.resolveStyleMatrixReferences(o):void 0}}function xP(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 s=i?e.selectedElement(t):void 0;o?.updateSelection(s,{hasClipboard:t.clipboardPayload!==null,slideCount:t.slides.length,selectedCount:t.selectedElementIds.length,selectionGroupable:dM(t),formatPainterActive:t.formatPainterSourceId!==null,selectedElementId:t.selectedElementId??void 0,animations:t.slides[t.currentSlide]?.animations??[],animationTimelineAnchors:t.slides[t.currentSlide]?.animationTimelineAnchors??[],layouts:Uo(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(l=>l.name),customFontFamilies:t.customFontFamilies,recentColors:Go(t),themeColorMap:t.colorScheme?chunkWKWWFY2C_cjs.Q(t.colorScheme):void 0,canMergeShapes:i&&chunkWKWWFY2C_cjs.xl(cM(t)),canCrop:t.selectedElementIds.length===1&&chunkWKWWFY2C_cjs.Ns(s),cropActive:t.cropSession!==null,galleryContext:mM(t,s,e.getHandler?.())}),o?.setDrawState({tool:t.drawTool,color:t.drawColor,width:t.drawWidth,recentColors:Go(t),freeformTool:t.freeformTool}),r?.update(nl(s,t.selectedTableCell,t.selectedTableCells,t.selectedTextRange,t.mediaDataUrls,t.chartPartSelection,Go(t),t.colorScheme?chunkWKWWFY2C_cjs.Q(t.colorScheme):void 0));let a=t.slides[t.currentSlide];r?.updateDeck({slideCount:t.slides.length,currentSlide:t.currentSlide,canvasSize:t.canvasSize,slideSize:t.slideSize,hasDeckElements:t.slides.some(l=>l.elements.length>0),elements:a?.elements??[],selectedIds:t.selectedElementIds,selectedElementId:s?.id,comments:a?.comments??[],commentMentionAuthors:zr(t.modernCommentAuthors,t.commentAuthors),customShows:t.customShows,docTitle:t.coreProperties?.title,docAuthor:t.coreProperties?.creator,editable:i,presentationProperties:t.presentationProperties,themeOptions:t.themeOptions,activeSlide:a,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 bP(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkWKWWFY2C_cjs.Ng({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=`${s}px`,e.style.top=`${a}px`;}function gP(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=()=>{o?.remove(),o=null,r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(p,d,u)=>{r?.remove();let c=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu",{left:`${d}px`,top:`${u}px`});c.setAttribute("role","menu"),c.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));for(let x of Uo(n.get())){let b=chunk6TALMZ42_cjs.w(t,"button","pptxv-context-menu-item");b.type="button",b.setAttribute("role","menuitem"),b.textContent=x.name,b.addEventListener("click",()=>{n.set({currentSlide:p}),e.getEditActions().applyLayout(x.path),s();}),c.appendChild(b);}(e.host.closest(".pptxv")??t.body).appendChild(c),bP(c,t,d,u),r=c;},l=(p,d,u)=>{let c=chunk6TALMZ42_cjs.w(t,"button","pptxv-context-menu-item");return c.type="button",c.setAttribute("role","menuitem"),c.textContent=p.countLabelKey?e.getTranslator()(p.labelKey,{count:u}):e.getTranslator()(p.labelKey),c.disabled=p.disabled===true,c.addEventListener("click",()=>{switch(p.id){case "new-slide":s(),e.addSlideAfter(d.index);break;case "duplicate":s(),e.duplicateSlides(d.selectedIndexes);break;case "delete":s(),e.deleteSlides(d.selectedIndexes);break;case "layout":o?.remove(),o=null,a(d.index,d.x,d.y);break;case "hide":s(),e.toggleHideSlides(d.selectedIndexes);break;case "add-section":s(),e.getEditActions().sections.addSection(e.getTranslator()("pptx.sections.defaultName"),d.index);break;default:s();}}),c};return {open(p,d){s();let u=p.selectedIndexes.map(x=>d[x]).filter(x=>!!x),c=chunkWKWWFY2C_cjs.sl({selectedCount:u.length,hasHiddenInSelection:u.some(x=>x.hidden),hasVisibleInSelection:u.some(x=>!x.hidden),wouldDeleteAllSlides:u.length>=d.length});o=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu",{left:`${p.x}px`,top:`${p.y}px`}),o.dataset.pptxContextMenu="true",o.dataset.pptxSlidePaneContextMenu="true",o.setAttribute("role","menu"),o.setAttribute("aria-label",e.getTranslator()("pptx.slidesPane.contextMenu.newSlide"));for(let x of c){if(x.separatorBefore){let b=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu-separator");b.setAttribute("role","separator"),o.appendChild(b);}o.appendChild(l(x,p,u.length));}(e.host.closest(".pptxv")??t.body).appendChild(o),bP(o,t,p.x,p.y),i=x=>{if(x instanceof KeyboardEvent&&x.key!=="Escape")return;let b=x.target;b instanceof Node&&(o?.contains(b)||r?.contains(b))||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},close:s,destroy:s}}function fP(e,t,n,o){let{selection:r,menu:i,getSlides:s,getActive:a,onSelect:l}=o;r.isSelected(t.id)&&n!==a()&&e.classList.add("is-selected"),e.addEventListener("click",p=>{r.onClick(p,t.id,s().map(d=>d.id)),e.classList.toggle("is-selected",r.isSelected(t.id)&&n!==a()),l(n);}),i&&e.addEventListener("contextmenu",p=>{p.preventDefault();let d=s(),u=r.openContextMenu(p.clientX,p.clientY,n,d.map(c=>c.id));u&&i.open(u,d);});}function vP(){let e=[],t=null;return {isSelected(n){return e.includes(n)},onClick(n,o,r){let i=chunkWKWWFY2C_cjs.rl({clickedId:o,orderedIds:r,selectedIds:e,anchorId:t,ctrlKey:n.ctrlKey,metaKey:n.metaKey,shiftKey:n.shiftKey});e=i.selectedIds,t=i.anchorId;},openContextMenu(n,o,r,i){let s=i[r];if(s===void 0)return null;let l=(e.length>0&&e.includes(s)?e:[s]).map(p=>i.indexOf(p)).filter(p=>p!==-1);return {x:n,y:o,index:r,selectedIndexes:l}}}}function hP(e){let{doc:t,t:n,actions:o}=e,r=chunkWKWWFY2C_cjs.kf(e.sections,e.slides);return r.map((i,s)=>{let a=chunk6TALMZ42_cjs.w(t,"section","pptxv-thumb-section"),l=chunk6TALMZ42_cjs.w(t,"header","pptxv-thumb-section-header"),p=chunk6TALMZ42_cjs.w(t,"button","pptxv-thumb-section-toggle");if(p.type="button",p.setAttribute("aria-expanded",String(!i.section?.collapsed)),p.textContent=`${i.section?.collapsed?"\u25B8":"\u25BE"} ${i.section?.name??n("pptx.slides.ungroupedSlides")} (${i.slides.length})`,i.section&&(a.dataset.sectionId=i.section.id,p.addEventListener("click",()=>o?.toggle(i.section.id))),i.section?.color){let d=chunk6TALMZ42_cjs.w(t,"span","pptxv-thumb-section-color");d.dataset.pptxSectionColor=i.section.color,d.style.background=i.section.color,l.appendChild(d);}if(l.appendChild(p),i.section&&o){let d=chunk6TALMZ42_cjs.w(t,"span","pptxv-thumb-section-actions"),u=(c,x,b,g=false)=>{let v=chunk6TALMZ42_cjs.w(t,"button");v.type="button",v.setAttribute("data-pptx-compact",""),v.title=c,v.setAttribute("aria-label",c),v.textContent=x,v.disabled=g,v.addEventListener("click",b),d.appendChild(v);};u(n("pptx.sections.rename"),"\u270E",()=>{let c=t.defaultView?.prompt(n("pptx.sections.rename"),i.section.name);c!=null&&o.rename(i.section.id,c);}),u(n("pptx.sections.moveUp"),"\u2191",()=>o.move(i.section.id,"up"),s===0),u(n("pptx.sections.moveDown"),"\u2193",()=>o.move(i.section.id,"down"),s===r.length-1),u(n("pptx.sectionList.deleteSection"),"\xD7",()=>o.delete(i.section.id)),l.appendChild(d);}if(a.appendChild(l),!i.section?.collapsed){let d=chunk6TALMZ42_cjs.w(t,"div","pptxv-thumb-section-slides");i.slides.forEach((u,c)=>d.appendChild(e.buildSlide(u,i.slideIndexes[c]))),a.appendChild(d);}return a})}function yP(e,t,n,o,r,i,s){let a=chunk6TALMZ42_cjs.w(e,"button","pptxv-thumb");a.type="button",a.dataset.slideIndex=String(o),a.dataset.pptxChrome="slide-row",a.setAttribute("aria-label",t("pptx.slidesPanel.goToSlide",{n:o+1}));let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-thumb-num");l.textContent=String(o+1),l.dataset.pptxChrome="slide-number";let p=chunk6TALMZ42_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${chunkWKWWFY2C_cjs.$s}px`,height:`${chunkWKWWFY2C_cjs.at(r.width,r.height)}px`});p.dataset.pptxChrome="slide-frame",p.appendChild(i(n,s)),a.append(l,p);let d=chunkWKWWFY2C_cjs.Cp(n.hidden,"rail",o);if(d.marker&&d.labelId){a.setAttribute(chunkWKWWFY2C_cjs.yp,d.marker),a.setAttribute("aria-describedby",d.labelId);let u=chunk6TALMZ42_cjs.w(e,"span","pptxv-thumb-hidden");u.id=d.labelId,u.appendChild(chunk6TALMZ42_cjs.K(e,"eye-off"));let c=chunk6TALMZ42_cjs.w(e,"span","pptxv-sr-only");c.textContent=t(chunkWKWWFY2C_cjs.zp),u.appendChild(c),p.appendChild(u);}return a}function SP(e,t,n,o,r,i,s){let a=[],l=chunkWKWWFY2C_cjs.$s/Math.max(o.width,1),p=(d,u,c,x)=>{let b=chunk6TALMZ42_cjs.w(e,"button",`pptxv-thumb${x===null?"":" pptxv-master-layout"}`);b.type="button",b.setAttribute("aria-label",u),b.classList.toggle("is-active",s.masterIndex===c&&s.layoutIndex===x),s.masterIndex===c&&s.layoutIndex===x&&b.setAttribute("aria-current","page");let g=chunk6TALMZ42_cjs.w(e,"span","pptxv-thumb-num");g.textContent=u;let v=chunk6TALMZ42_cjs.w(e,"span","pptxv-thumb-frame",{display:"block",width:`${chunkWKWWFY2C_cjs.$s}px`,height:`${Math.round(o.height*l)}px`});v.appendChild(r(d,l)),b.append(g,v),b.addEventListener("click",()=>i(c,x)),a.push(b);};return n.forEach((d,u)=>{p({id:d.path,rId:"",slideNumber:0,elements:d.elements??[],backgroundColor:d.backgroundColor,backgroundImage:d.backgroundImage},d.name||t("pptx.master.master"),u,null),d.layouts?.forEach((c,x)=>p({id:c.path,rId:"",slideNumber:0,elements:[...d.elements??[],...c.elements??[]],backgroundColor:c.backgroundColor??d.backgroundColor,backgroundImage:c.backgroundImage??d.backgroundImage},c.name||t("pptx.master.layout"),u,x));}),a}function CP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-thumbs-footer");o.dataset.pptxChrome="slide-footer",o.hidden=true;let r=chunk6TALMZ42_cjs.w(e,"button","pptxv-thumbs-add");return r.type="button",r.appendChild(chunk6TALMZ42_cjs.K(e,"plus")),r.appendChild(e.createTextNode(t("pptx.sections.addSlide"))),r.addEventListener("click",()=>n()),o.appendChild(r),o}var uM=chunkWKWWFY2C_cjs.$s;function rl(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"aside","pptxv-thumbs");i.setAttribute("role","navigation"),i.dataset.pptxChrome="slides",i.style.width=`${chunkWKWWFY2C_cjs._s}px`,i.setAttribute("aria-label",t("pptx.sections.slides"));let s=vP(),a=r?gP({doc:e,store:r.store,getTranslator:()=>t,getEditActions:r.getEditActions,addSlideAfter:r.addSlideAfter,duplicateSlides:r.duplicateSlides,deleteSlides:r.deleteSlides,toggleHideSlides:r.toggleHideSlides,host:i}):null;i.addEventListener("keydown",A=>{if(A.key!=="Enter"||!r)return;let P=A.target;P instanceof HTMLElement&&P.dataset.slideIndex!==void 0&&(A.preventDefault(),r.addSlideAfter(b));});let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-thumbs-list");l.dataset.pptxChrome="slide-list",i.appendChild(l);let p=null,d=false,u=false,c=()=>{p&&(p.hidden=!d||u);};o&&(p=CP(e,t,o),i.appendChild(p));let x=new Map,b=0,g=[],v={width:1,height:1},f=null,y=[],S,h=1,C=false,w=(A,P,E)=>{let M=yP(e,t,A,P,v,f,E);return fP(M,A,P,{selection:s,menu:a,getSlides:()=>g,getActive:()=>b,onSelect:n}),x.set(P,M),M},T=()=>chunkWKWWFY2C_cjs.ju(chunkWKWWFY2C_cjs.iu(l),k),k=()=>{if(!f)return;x=new Map;let A=uM/Math.max(v.width,1);if(y.length>0){l.replaceChildren(...hP({doc:e,t,sections:y,slides:g,actions:S,buildSlide:(D,L)=>w(D,L,A)})),x.get(b)?.classList.add("is-active"),x.get(b)?.setAttribute("aria-current","page");return}let P=C?chunkWKWWFY2C_cjs._o(g.length,h,l.scrollTop,l.clientHeight||600):chunkWKWWFY2C_cjs._o(g.length,h,0,g.length*h,0),E=chunk6TALMZ42_cjs.w(e,"div","pptxv-thumbs-window",{display:"flex",flexDirection:"column"});E.dataset.pptxChrome="slide-window",C&&(E.style.position="absolute",E.style.insetInline="0",E.style.top=`${P.offsetY}px`);for(let D=P.startIndex;D<=P.endIndex;D+=1){let L=g[D];L&&E.appendChild(w(L,D,A));}let M=chunk6TALMZ42_cjs.w(e,"div","pptxv-thumbs-space",{position:"relative",height:C?`${P.totalHeight}px`:"auto"});C&&(M.dataset.virtualized="true"),M.appendChild(E),l.replaceChildren(M);let I=x.get(b);I?.classList.add("is-active"),I?.setAttribute("aria-current","page");};return l.addEventListener("scroll",()=>{C&&T();}),{el:i,render(A,P,E,M,I){u=false,c(),g=A,v=P,f=E,y=M??[],S=I,h=chunkWKWWFY2C_cjs.bt(P.width,P.height),C=!M?.length&&A.length>=chunkWKWWFY2C_cjs.Zo,i.classList.toggle("pptxv-thumbs-virtualized",C),T(),this.setActive(b);},setActive(A){if(b=A,C){let E=A*h,M=E+h,I=l.clientHeight||600;E<l.scrollTop?l.scrollTop=E:M>l.scrollTop+I&&(l.scrollTop=Math.max(0,M-I)),T();}x.forEach((E,M)=>{E.classList.toggle("is-active",M===A),M===A?E.setAttribute("aria-current","page"):E.removeAttribute("aria-current");});let P=x.get(A);P&&typeof P.scrollIntoView=="function"&&P.scrollIntoView({block:"nearest"});},setVisible(A){i.hidden=!A;},setAddSlideVisible(A){d=A,c();},renderMasters(A,P,E,M,I){u=true,c(),l.replaceChildren(),x=new Map,C=false,i.classList.remove("pptxv-thumbs-virtualized"),l.append(...SP(e,t,A,P,E,M,I));}}}function xM(e,t,n){let o=e.trim().toLowerCase();return o?t.filter(r=>n(r.labelKey).toLowerCase().includes(o)):[]}function wP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-cmdsearch"),r=e.createElement("pptx-ui-search");r.className="pptxv-cmdsearch-box",r.setAttribute("variant","titlebar"),r.setAttribute("data-pptx-search-surface",""),r.setAttribute("data-pptx-search-input",""),r.placeholder=t("pptx.titleBar.searchPlaceholder"),r.setAttribute("aria-label",t("pptx.titleBar.search")),o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-cmdsearch-menu");i.hidden=true,o.appendChild(i);let s=()=>{i.hidden=true,i.replaceChildren();},a=d=>{r.value="",s(),d.run();},l=[],p=()=>{if(l=xM(r.value,n,t),r.value.trim().length===0){s();return}if(i.replaceChildren(),l.length===0){let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-cmdsearch-empty");d.textContent=t("pptx.titleBar.searchNoResults"),i.appendChild(d);}for(let d of l){let u=chunk6TALMZ42_cjs.w(e,"button","pptxv-cmdsearch-item");u.type="button",u.textContent=t(d.labelKey),u.addEventListener("mousedown",c=>{c.preventDefault(),a(d);}),i.appendChild(u);}i.hidden=false;};return r.addEventListener("input",p),r.addEventListener("focus",p),r.addEventListener("blur",s),r.addEventListener("keydown",d=>{d.stopPropagation(),d.key==="Enter"&&l.length>0?a(l[0]):d.key==="Escape"&&(r.value="",s());}),{el:o}}var bM={save:"save",undo:"undo",redo:"redo",play:"play",printer:"printer",fileDown:"download",plus:"new-slide",zoomIn:"zoom-in",zoomOut:"zoom-out"};function EP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-titlebar");o.setAttribute("data-pptx-title-bar","");let r=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-logo");r.textContent="P",r.setAttribute("aria-hidden","true"),o.appendChild(r);let i=n.autosaveEnabled,s=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-autosave"),a=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-autosave-label");a.textContent=t("pptx.titleBar.autoSave");let l=n.autosaveToggleAvailable??true,p=chunk6TALMZ42_cjs.w(e,"button","pptxv-titlebar-switch");p.type="button",p.setAttribute("role","switch"),p.title=t(l?"pptx.titleBar.toggleAutoSave":"pptx.autosave.disabledByHost"),p.setAttribute("aria-label",t("pptx.titleBar.toggleAutoSave")),l||(p.disabled=true,p.classList.add("is-disabled")),p.appendChild(chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-switch-knob"));let d=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-autosave-label");s.append(a,p,d),o.appendChild(s);let u=()=>{p.classList.toggle("is-on",i),p.setAttribute("aria-checked",String(i)),d.textContent=t(i?"pptx.titleBar.autoSaveOn":"pptx.titleBar.autoSaveOff");};p.addEventListener("click",()=>{l&&(i=n.onToggleAutosave(),u(),M());});let c=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(c);let x=chunk6TALMZ42_cjs.w(e,"span","pptxv-qat");o.appendChild(x);let b=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-sep");o.appendChild(b);let g={editable:true,canUndo:false,canRedo:false},v=null,f=null,y=false,S=()=>{c.hidden=!g.editable,b.hidden=y||!g.editable;},h=D=>{D==="save"?n.save():D==="undo"?n.undo():D==="redo"?n.redo():n.quickAccess?.run(D);},C=()=>{x.replaceChildren(),v=null,f=null;let D=n.quickAccess?.getState()??{visible:true,showCommandLabels:false,commandIds:["save","undo","redo"]};x.hidden=!D.visible||!g.editable,n.onQuickAccessVisibilityChange?.(x.hidden);for(let L of D.commandIds){if((L==="undo"||L==="redo")&&chunkWKWWFY2C_cjs.Tp(L,n.hiddenActions))continue;let O=chunkWKWWFY2C_cjs.Wp.find(V=>V.id===L);if(!O)continue;let R=t(O.labelKey),F=bM[O.icon],H=z(e,{label:R,icon:F,text:F===void 0?"Ab":void 0,textLabel:D.showCommandLabels?R:void 0,className:"pptxv-titlebar-btn",onClick:()=>h(L)});if(n.quickAccess){let V=n.quickAccess.screenTip(R);V===void 0?H.btn.removeAttribute("title"):H.btn.title=V;}L==="undo"?(v=H,H.setDisabled(!g.canUndo)):L==="redo"&&(f=H,H.setDisabled(!g.canRedo)),x.appendChild(H.btn);}},w=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-file"),T=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-filename");T.textContent=n.fileName||t(chunkWKWWFY2C_cjs.qo);let k=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-dot");k.textContent="\u2022",k.setAttribute("aria-hidden","true");let A=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-status");w.append(T,k,A),o.appendChild(w);let P="idle",E=false,M=()=>{A.textContent=t(chunkWKWWFY2C_cjs.po({autosaveState:P,isDirty:E,autosaveEnabled:i})),A.classList.toggle("is-error",i&&P==="error"),A.classList.toggle("is-saving",i&&P==="saving");},I=chunk6TALMZ42_cjs.w(e,"span","pptxv-titlebar-search");return I.appendChild(wP(e,t,n.commands).el),o.appendChild(I),u(),M(),S(),C(),{el:o,setEditState(D){g=D,s.hidden=!D.editable,S();let L=n.quickAccess?.getState();x.hidden=!D.editable||L?.visible===false,n.onQuickAccessVisibilityChange?.(x.hidden),k.hidden=!D.editable,A.hidden=!D.editable,I.hidden=!D.editable,v?.setDisabled(!D.canUndo),f?.setDisabled(!D.canRedo);},setAutosaveState(D){P=D,M();},setDirty(D){E=D,M();},setAutosaveEnabled(D){i=D,u(),M();},refreshQuickAccess:C,getQuickAccessElement:()=>x,dockQuickAccessElement(){o.insertBefore(x,b);},setQuickAccessDetached(D){y=D,S();}}}function il(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv");o.dataset.pptxEditorChrome="",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,s=null,a=false;n.showToolbar&&n.showTitleBar!==false&&(r=EP(e,t,{...n.titleBar,onQuickAccessVisibilityChange:D=>{a&&s&&(s.hidden=D),n.titleBar.onQuickAccessVisibilityChange?.(D);}}),o.appendChild(r.el)),n.showToolbar&&(i=Xr(e,t,n.ribbonHandlers,n.hiddenActions,n.accountAuth),n.showFormatToolbar||i.setEditable(false),o.appendChild(i.el),pP(e,o,n.ribbonHandlers.nav.getCustomization?.()),s=chunk6TALMZ42_cjs.w(e,"div","pptxv-qat-row"),s.hidden=true,o.appendChild(s));let l=n.showToolbar?Is(e,t,()=>n.onEnableEditing()):null;l&&o.appendChild(l.el);let p=n.showToolbar?NE(e,t,()=>n.onEditAnywayFromReadOnly(),()=>n.onDismissReadOnlyBanner(),D=>n.onSubmitReadOnlyPassword(D),()=>n.onCancelReadOnlyPasswordPrompt()):null;p&&o.appendChild(p.el);let d=null,u=n.showToolbar?Ts(e,t,{openMenu:()=>d?.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;u&&(u.setEditState({editable:n.editable,canUndo:false,canRedo:false}),o.appendChild(u.el));let c=chunk6TALMZ42_cjs.w(e,"div","pptxv-body");c.dataset.pptxChrome="body",o.appendChild(c);let x=as(e,t,n.onSelectSlide);o.appendChild(x.el);let b=ol(e,t);o.appendChild(b.el);let g=ws(e,t);c.appendChild(g.el);let v=null;n.showThumbnails&&(v=rl(e,t,n.onSelectSlide,()=>n.ribbonHandlers.edit.addSlide(),n.thumbnailMenu),c.appendChild(v.el));let f=chunk6TALMZ42_cjs.w(e,"div","pptxv-viewport");f.setAttribute("data-pptx-viewport",""),c.appendChild(f);let y=null;n.showInspector&&(y=Ur(e,t,n.inspectorHandlers),y.setEditable(n.editable),c.appendChild(y.el));let S=chunk6TALMZ42_cjs.w(e,"div","pptxv-stage-wrap");f.appendChild(S);let h=chunk6TALMZ42_cjs.w(e,"div","pptxv-empty");h.textContent=t("pptx.statusBar.noSlides"),h.hidden=true,f.appendChild(h);let C=Ps(e,t,n.onToggleNotes,n.onCommitNotes);o.appendChild(C.el),n.showNotes===false&&(C.el.style.display="none");let w=n.showToolbar&&n.showStatusBar!==false?cP(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;w&&o.appendChild(w.el),d=n.showToolbar?Es(e,t,n.ribbonHandlers,n.onSelectSlide,y?.el??null,n.hiddenActions):null,d&&(d.setEditable(n.editable),o.appendChild(d.el));let T=ks(e,t,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,exit:n.ribbonHandlers.nav.togglePresentation},n.hiddenActions);T.update(0,0),o.appendChild(T.el);let k=As(e,t,o,{previous:n.ribbonHandlers.nav.prev,next:n.ribbonHandlers.nav.next,end:n.ribbonHandlers.nav.togglePresentation,...n.presentationToolbarHandlers});o.appendChild(k.el);let A=xw(e,t,D=>n.onDismissCompatToast(D),()=>n.onDismissAllCompatToasts());o.appendChild(A.el),chunkWKWWFY2C_cjs.Fi(C.el,D=>A.setBottomInset(D));let P=dP(e,t,D=>n.onDismissRunProgramNotice(D));o.appendChild(P.el);let E=chunk6TALMZ42_cjs.w(e,"div","pptxv-overlay pptxv-loading");E.textContent=t("pptx.common.loading"),E.setAttribute("role","status"),E.setAttribute("aria-live","polite"),E.hidden=true,o.appendChild(E);let M=chunk6TALMZ42_cjs.w(e,"div","pptxv-overlay pptxv-error");M.setAttribute("role","alert");let I=chunk6TALMZ42_cjs.w(e,"div","pptxv-error-message");return M.appendChild(I),M.hidden=true,o.appendChild(M),{root:o,ribbon:i,titleBar:r,inspector:y,accessibility:x,shortcuts:b,masterSidebar:g,thumbnails:v,viewport:f,stageWrap:S,notes:C,statusBar:w,mobileToolbar:u,mobileActionSheets:d,presentationTouchControls:T,presentationToolbar:k,setLoading(D){E.hidden=!D,o.setAttribute("aria-busy",String(D));},setError(D){M.hidden=D===null,I.textContent=D??"";},setEmpty(D){h.hidden=!D,S.hidden=D;},setPresenting(D){o.classList.toggle("pptxv-presenting",D),k.setPresenting(D);},setQuickAccessPosition(D){if(!(!r||!s))if(D==="below"){let L=r.getQuickAccessElement();s.appendChild(L),a=true,s.hidden=L.hidden,r.setQuickAccessDetached(true);}else a=false,r.dockQuickAccessElement(),s.hidden=true,r.setQuickAccessDetached(false);},setProtectedView(D){l?.setActive(D);},setReadOnlyRecommendation(D,L,O){p?.update(D,L,O);},setCompatToasts(D,L){A.update(D,L);},setRunProgramNotices(D){P.update(D);}}}async function lo(e,t={}){let{default:n}=await import('html2canvas-pro'),o=t.onclone;return n(e,{...t,onclone:async(r,i)=>{await chunkWKWWFY2C_cjs.Jt(e,r,i),typeof o=="function"&&o(r,i);}})}function al(e,t){return chunkWKWWFY2C_cjs.Qd(e,t)}function TP(e,t){al(e,t)?.dispatchEvent(new MouseEvent("dblclick",{bubbles:true,cancelable:true}));}function PP(e){return (t,n)=>lo(e,{scale:n.width/(t.width||1),x:t.x,y:t.y,width:t.width,height:t.height,useCORS:true,allowTaint:true,backgroundColor:null,logging:false})}function AP(e,t,n){let o=al(e,n);if(!o)return;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=J(t.get(),n);chunkWKWWFY2C_cjs.gu(o,i,s,e,chunkWKWWFY2C_cjs.fu(a?.name,"Picture"),{scale:2,html2canvasFallback:PP(o)});}async function Zr(e,t,n){let o=al(e,t);if(!o)return null;let r=o.getBoundingClientRect(),i=r.width||o.offsetWidth,s=r.height||o.offsetHeight,a=await chunkWKWWFY2C_cjs.hu(o,i,s,e,{scale:2,html2canvasFallback:PP(o)});return chunkWKWWFY2C_cjs.Ll(n,a)}function Jr(e,t,n){t.set({inspectorOpen:true}),requestAnimationFrame(()=>{requestAnimationFrame(()=>chunkWKWWFY2C_cjs.Il(e,n));});}function ei(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 ll(e,t,n){if(t?.type!=="table"||!t.tableData)return null;let o=ei(n)??e.selectedTableCell;if(!o)return null;let r=t.tableData.rows[o.row]?.cells[o.column];return {cell:o,context:{hasMultiCellSelection:chunkWKWWFY2C_cjs.El(e.selectedTableCells.map(({row:i,column:s})=>({row:i,col:s})),t.tableData),isMergedCell:(r?.gridSpan??1)>1||(r?.rowSpan??1)>1}}}function kP(e,t,n){e.mergeTableCells([t,n==="right"?{row:t.row,column:t.column+1}:{row:t.row+1,column:t.column}]);}function pl(e,t,n){let o=t.getEditActions(),r=n?.cell??null,i=chunkWKWWFY2C_cjs.Dl(e);if(i)return o.mergeShapes(i);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 "crop":return o.enterCropMode();case "comment":return t.openComments();case "hyperlink":return t.openHyperlink();case "ai-ask":return t.getAi()?.askAboutSelection();case "ai-fix":return gM(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?kP(o,r,"right"):void 0;case "table-merge-down":return r?kP(o,r,"down"):void 0;case "table-split":return r?o.splitTableCell(r):void 0;case "edit-text":return sl(t,s=>TP(t.doc,s));case "edit-points":return sl(t,s=>{t.startEditPoints?.(s);});case "save-as-picture":return sl(t,s=>AP(t.doc,t.store,s));case "edit-alt-text":return Jr(t.doc,t.store,chunkWKWWFY2C_cjs.Hl("edit-alt-text"));case "size-and-position":return Jr(t.doc,t.store,chunkWKWWFY2C_cjs.Hl("size-and-position"));case "format-shape":return Jr(t.doc,t.store,chunkWKWWFY2C_cjs.Hl("format-shape"))}}function sl(e,t){let n=e.store.get().selectedElementId;n&&t(n);}function gM(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 fM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkWKWWFY2C_cjs.Ng({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=`${s}px`,e.style.top=`${a}px`;}function dl(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=(d,u)=>{let c=chunk6TALMZ42_cjs.w(t,"button",`pptxv-context-menu-item${d.danger?" is-danger":""}`);return c.type="button",c.setAttribute("role","menuitem"),c.textContent="host"in d?d.label:e.getTranslator()(d.labelKey),c.disabled=d.disabled===true,c.addEventListener("click",()=>{if(s(),"host"in d){d.onSelect();return}pl(d.id,e,u);}),c},l=(d,u,c,x)=>{r=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu",{left:`${c}px`,top:`${x}px`}),r.dataset.pptxContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.contextMenu.ariaLabel"));for(let b of d){if(b.separatorBefore){let g=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu-separator");g.setAttribute("role","separator"),r.appendChild(g);}r.appendChild(a(b,u));}(o.closest(".pptxv")??t.body).appendChild(r),fM(r,t,c,x),i=b=>{b instanceof KeyboardEvent&&b.key!=="Escape"||b.target instanceof Node&&r?.contains(b.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{let u=n.get(),c=e.getCustomization?.()??chunkWKWWFY2C_cjs.Oq;if(!u.editable||u.presenting||!c.elementMenuEnabled)return;let x=chunkWKWWFY2C_cjs.wl(chunkWKWWFY2C_cjs.tm(d.target,e.getStageRoot()),d.target,u.selectedElementId);if(!x||!chunkWKWWFY2C_cjs.Wn(x,u.editTemplateMode))return;d.preventDefault(),s(),u.selectedElementIds.includes(x)||e.selectElement(x);let b=ei(d.target);b&&!n.get().selectedTableCells.some(({row:S,column:h})=>S===b.row&&h===b.column)&&n.set({selectedTableCell:b,selectedTableCells:[b]});let g=n.get(),v=J(g,x)??null,f=ll(g,v,d.target),y=chunkWKWWFY2C_cjs.Yq(chunkWKWWFY2C_cjs.Fl({elementType:v?.type??null,table:f?.context??null,hasMultiSelection:g.selectedElementIds.length>1,selectionGroupable:g.selectedElementIds.every(S=>chunkWKWWFY2C_cjs.Le(J(g,S)??null,"group")),aiEnabled:e.getAi()!==null,hasClipboard:g.clipboardPayload!==null,editPoints:e.startEditPoints?chunkWKWWFY2C_cjs.ts(v):void 0,canMergeShapes:chunkWKWWFY2C_cjs.xl(g.selectedElementIds.map(S=>J(g,S))),canCrop:chunkWKWWFY2C_cjs.Ns(v)}),c,{slideIndex:g.currentSlide,elementIds:[...g.selectedElementIds]});y.length>0&&l(y,f,d.clientX,d.clientY);};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function vM(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkWKWWFY2C_cjs.Ng({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=`${s}px`,e.style.top=`${a}px`;}function cl(e){let{doc:t,store:n,root:o}=e,r=null,i=null,s=()=>{r?.remove(),r=null,i&&(t.removeEventListener("pointerdown",i,true),t.removeEventListener("keydown",i,true),i=null);},a=d=>{switch(d){case "next":e.next();break;case "previous":e.prev();break;case "seeAllSlides":e.showAllSlides();break;case "presenterView":e.togglePresenterView();break;case "pointerArrow":e.setPointerTool("none");break;case "pointerPen":e.setPointerTool("pen");break;case "pointerHighlighter":e.setPointerTool("highlighter");break;case "pointerLaser":e.setPointerTool("laser");break;case "eraseInk":e.eraseAnnotations();break;case "blankBlack":e.toggleBlank("black");break;case "blankWhite":e.toggleBlank("white");break;case "endShow":e.exitPresentation();break}},l=(d,u)=>{r=chunk6TALMZ42_cjs.w(t,"div","pptxv-showmenu",{left:`${d}px`,top:`${u}px`}),r.dataset.pptxPresentationMenu="true",r.setAttribute("role","menu"),chunkWKWWFY2C_cjs.Gk({seeAllSlides:true,presenterView:true,pointerTools:true,eraseInk:true,blankBlack:true,blankWhite:true}).forEach((x,b)=>{if(b>0){let g=chunk6TALMZ42_cjs.w(t,"hr","pptxv-showmenu-separator");g.setAttribute("role","separator"),r?.appendChild(g);}for(let g of x.items){let v=chunk6TALMZ42_cjs.w(t,"button");v.type="button",v.setAttribute("role","menuitem"),v.dataset.itemId=g.id,v.textContent=e.getTranslator()(g.labelKey),v.addEventListener("click",()=>{s(),a(g.id);}),r?.appendChild(v);}}),o.appendChild(r),vM(r,t,d,u),i=x=>{x instanceof KeyboardEvent&&x.key!=="Escape"||x.target instanceof Node&&r?.contains(x.target)||s();},t.addEventListener("pointerdown",i,true),t.addEventListener("keydown",i,true);},p=d=>{n.get().presenting&&(d.preventDefault(),s(),e.shouldShow()&&l(d.clientX,d.clientY));};return o.addEventListener("contextmenu",p),{destroy(){o.removeEventListener("contextmenu",p),s();}}}function ml(e,t){let n=chunkWKWWFY2C_cjs.Rk(),o=s=>{let a=t.isSlideShowStartEnabled?.()===false?null:chunkWKWWFY2C_cjs.pl(s,{isPresenting:t.isPresenting?.()??false});if(a){s.preventDefault(),a==="fromBeginning"?t.startFromBeginning?.():t.startFromCurrent?.();return}let l=s.target;if(!(l&&/^(?:INPUT|TEXTAREA|SELECT)$/u.test(l.tagName))){if(t.isPresenting?.()){hM(s,t,n);return}switch(s.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}s.preventDefault();}},r=chunkWKWWFY2C_cjs.Sa(),i=s=>{if(!t.isPresenting?.()||!chunkWKWWFY2C_cjs.uk())return;let a=chunkWKWWFY2C_cjs.Ta(s,r);a.intent==="next-slide"?(s.preventDefault(),t.next()):a.intent==="previous-slide"&&(s.preventDefault(),t.prev());};return e.addEventListener("keydown",o),e.addEventListener("wheel",i,{passive:false}),()=>{e.removeEventListener("keydown",o),e.removeEventListener("wheel",i);}}function hM(e,t,n){if(!chunkWKWWFY2C_cjs.uk())return;let o=chunkWKWWFY2C_cjs.Sk(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 yM=.1,SM=8;function ul(e,t){let n=chunkWKWWFY2C_cjs.en({getScale:t.getScale,minScale:yM,maxScale:SM,callbacks:{onPinchZoom:t.onPinchZoom,onSwipe:a=>{t.isSwipeEnabled()&&(a===-1?t.onNext():t.onPrevious());}}}),o=a=>n.onTouchStart(a),r=a=>n.onTouchMove(a),i=a=>n.onTouchEnd(a),s=()=>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",s,{passive:true,capture:true}),()=>{e.removeEventListener("touchstart",o,true),e.removeEventListener("touchmove",r,true),e.removeEventListener("touchend",i,true),e.removeEventListener("touchcancel",s,true),n.cancel();}}function xl(e,t){let n=e.ownerDocument,o=typeof e.requestFullscreen=="function",r=false,i=()=>o?n.fullscreenElement===e:r,s=()=>{t(i());};return o&&n.addEventListener("fullscreenchange",s),{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",s);}}}var Ae=chunkWKWWFY2C_cjs.Kf,bl=chunkWKWWFY2C_cjs.Lf;function gl(e,t){let n=chunk6TALMZ42_cjs.w(e,"div","pptxv-ruler-corner");n.setAttribute("aria-hidden","true");let o=chunk6TALMZ42_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-h"});o.setAttribute("data-pptx-ruler","h"),o.setAttribute("role","presentation");let r=chunk6TALMZ42_cjs.x(e,"svg",{class:"pptxv-ruler pptxv-ruler-v"});r.setAttribute("data-pptx-ruler","v"),r.setAttribute("role","presentation");let i=false,s=1,a={width:0,height:0},l=null,p=(c,x)=>{i&&(x.stopPropagation(),x.preventDefault(),x.currentTarget?.setPointerCapture?.(x.pointerId),l=c);},d=(c,x)=>{let b=l;l=null;let g=x.currentTarget;if(b!==c||!i||!g)return;try{g.releasePointerCapture?.(x.pointerId);}catch{}let v=g.getBoundingClientRect(),f=c==="h"?x.clientY-v.top:x.clientX-v.left,y=chunkWKWWFY2C_cjs.Nf(f,s,c==="h"?a.height:a.width);y!==null&&t(c,y);};o.addEventListener("pointerdown",c=>p("h",c)),o.addEventListener("pointerup",c=>d("h",c)),r.addEventListener("pointerdown",c=>p("v",c)),r.addEventListener("pointerup",c=>d("v",c));let u=(c,x,b,g)=>{let v=b*g.scale,f=x==="h";chunk6TALMZ42_cjs.y(c,{width:f?v:Ae,height:f?Ae:v}),c.replaceChildren(),c.appendChild(chunk6TALMZ42_cjs.x(e,"rect",{class:"pptxv-ruler-bg",width:f?v:Ae,height:f?Ae:v}));let y=g.selection;if(y){let S=(f?y.x:y.y)*g.scale,h=Math.max((f?y.width:y.height)*g.scale,1);c.appendChild(chunk6TALMZ42_cjs.x(e,"rect",{class:"pptxv-ruler-highlight",x:f?S:0,y:f?0:S,width:f?h:Ae,height:f?Ae:h}));}for(let S of chunkWKWWFY2C_cjs.Mf(b,g.scale,g.unit)){let h=Ae-Ae*(S.isMajor?.6:.3);if(c.appendChild(chunk6TALMZ42_cjs.x(e,"line",{class:"pptxv-ruler-tick",x1:f?S.position:Ae,y1:f?Ae:S.position,x2:f?S.position:h,y2:f?h:S.position,"stroke-width":S.isMajor?1:.5})),!S.label)continue;let C=chunk6TALMZ42_cjs.x(e,"text",{class:"pptxv-ruler-label",x:f?S.position+2:2,y:f?bl+1:S.position+bl+2,"font-size":bl});C.textContent=S.label,c.appendChild(C);}c.appendChild(chunk6TALMZ42_cjs.x(e,"line",{class:"pptxv-ruler-edge",x1:f?0:Ae-.5,y1:f?Ae-.5:0,x2:f?v:Ae-.5,y2:f?Ae-.5:v}));};return {mount(c){n.parentNode!==c&&c.append(n,o,r);},update(c){i=c.draggable,s=c.scale,a=c.canvasSize,n.hidden=!c.visible,o.style.display=c.visible?"":"none",r.style.display=c.visible?"":"none",o.classList.toggle("is-draggable",c.draggable),r.classList.toggle("is-draggable",c.draggable),c.visible&&(u(o,"h",c.canvasSize.width,c),u(r,"v",c.canvasSize.height,c));},destroy(){n.remove(),o.remove(),r.remove();}}}function CM(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 fl(e){let{doc:t,container:n,t:o,options:r,store:i,renderer:s}=e,a=()=>e.getCustomization?.()??chunkWKWWFY2C_cjs.Oq,l=il(t,o,{...iw(a()),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:wM(e),hiddenActions:r.hiddenActions,quickAccess:{getState:()=>aw(e.getQuickAccessOptions(),a()),run:CM(e),screenTip:I=>e.quickAccessScreenTip(I)}},accountAuth:r.accountAuth,presentationToolbarHandlers:{setTool:I=>e.setPresentationPointerTool?.(I),setColor:I=>e.setPresentationPointerColor?.(I),toggleBlackboard:()=>e.togglePresentationBlackboard?.(),clearAnnotations:()=>e.erasePresentationAnnotations?.(),togglePresenterView:()=>e.togglePresenterView?.()},onEnableEditing:()=>e.enableEditingFromProtectedView(),onEditAnywayFromReadOnly:()=>e.editAnywayFromReadOnlyRecommendation(),onDismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),onSubmitReadOnlyPassword:I=>e.submitReadOnlyPassword(I),onCancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),onDismissCompatToast:I=>e.dismissCompatToast(I),onDismissAllCompatToasts:()=>e.dismissAllCompatToasts(),onDismissRunProgramNotice:I=>e.dismissRunProgramNotice(I),thumbnailMenu:{store:i,getEditActions:()=>e.getEditActions(),addSlideAfter:I=>e.addSlide(I),duplicateSlides:I=>e.duplicateSlides(I),deleteSlides:I=>e.deleteSlides(I),toggleHideSlides:I=>e.toggleHideSlides(I)},...rw(e)}),p=Ro(l.root,e.initialTheme??r.theme,[]);n.appendChild(l.root),l.statusBar?.setNotesExpanded(i.get().notesExpanded),l.statusBar?.setDirty(i.get().dirty),l.mobileActionSheets?.setNotesExpanded(i.get().notesExpanded),l.titleBar?.setDirty(i.get().dirty),l.setProtectedView(i.get().protectedView),l.setReadOnlyRecommendation(i.get().readOnlyRecommendation,i.get().readOnlyBannerDismissed,{promptOpen:i.get().readOnlyPasswordPromptOpen,error:i.get().readOnlyPasswordError,checking:i.get().readOnlyCheckingPassword}),l.setCompatToasts(i.get().compatToasts,i.get().inspectorOpen?chunkWKWWFY2C_cjs.to:0),l.setRunProgramNotices(i.get().runProgramNotices);let d=ml(l.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:()=>l.presentationToolbar.toggleVisible(),showAllSlides:e.showPresentationAllSlides,startFromBeginning:()=>e.startPresentationFromBeginning(),startFromCurrent:()=>e.startPresentationFromCurrent(),isSlideShowStartEnabled:()=>chunkWKWWFY2C_cjs.Rq(a(),"presentMode")}),u=ul(l.root,{getScale:()=>s.effectiveScale(),onPinchZoom:I=>e.setZoom(I),isSwipeEnabled:()=>{let I=i.get();return I.presenting||!I.editable},onNext:()=>{let I=i.get();is({presenting:I.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:I.slides[I.currentSlide]})||e.next();},onPrevious:()=>e.prev()}),c=t.createElement("button");c.type="button",c.setAttribute("data-pptx-end-of-show",""),c.className="pptxv-presentation-end",Object.assign(c.style,{position:"absolute",inset:"0",zIndex:"90",display:"flex",alignItems:"flex-start",border:"0",padding:"0",background:"#000",textAlign:"left",cursor:"default"});let x=t.createElement("span");Object.assign(x.style,{padding:"12px 16px",color:"rgba(255,255,255,0.7)",fontSize:"12px"}),x.textContent=o("pptx.presentation.endOfSlideShow"),c.appendChild(x),c.addEventListener("click",I=>{I.stopPropagation(),e.next();});let b=()=>{let I=i.get(),D=I.presenting&&I.endOfShow;D&&c.parentElement!==l.root?l.root.appendChild(c):!D&&c.parentElement&&c.remove();},g=i.subscribe(b);b();let v=null,f=i.subscribe((I,D)=>{I.presenting&&I.currentSlide!==D.currentSlide&&(v=D.currentSlide),D.presenting&&!I.presenting&&(v=null);}),y=mw(i,I=>e.goToSlide(I)),S=lw({goToSlide:I=>e.goToSlide(I),next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),confirmExternalHyperlink:e.confirmExternalHyperlink,getStageRoot:()=>l.stageWrap,getPreviousPresentedSlide:()=>v,getCurrentSlide:()=>{let I=i.get();return I.slides[I.currentSlide]},customShowRunner:y,addRunProgramNotice:I=>e.addRunProgramNotice(I)}),h=I=>{let D=i.get();!D.presenting||!(I.target instanceof Element)||!I.target.closest(".pptxv-stage")||!pw({target:I.target,presenting:D.presenting,animationBuildsComplete:s.presentationPlayback.isComplete(),currentSlide:D.slides[D.currentSlide],slideCount:D.slides.length,runner:S})||e.next();};l.root.addEventListener("click",h);let C=I=>{if(!(I.target instanceof Element))return;let D=I.target.closest("a.pptxv-link"),L=D?.getAttribute("href");!D||!L||(I.preventDefault(),(e.confirmExternalHyperlink?.(L)??true)&&chunkWKWWFY2C_cjs.Mc(L));};l.root.addEventListener("click",C);let w=dw({getState:()=>i.get(),subscribe:I=>i.subscribe(I),next:()=>e.next()}),T=cw({getPresenting:()=>i.get().presenting,subscribe:I=>i.subscribe(I),root:l.root,cancelAutoAdvance:w.cancel,rearmAutoAdvance:w.rearm}),k=cl({doc:t,store:i,root:l.root,getTranslator:()=>e.t,shouldShow:()=>e.shouldShowPresentationContextMenu?.()??true,next:()=>e.next(),prev:()=>e.prev(),exitPresentation:()=>e.exitPresentation(),showAllSlides:()=>e.showPresentationAllSlides?.(),togglePresenterView:()=>e.togglePresenterView?.(),setPointerTool:I=>e.setPresentationPointerTool?.(I),eraseAnnotations:()=>e.erasePresentationAnnotations?.(),toggleBlank:I=>e.togglePresentationBlank?.(I)}),A=()=>{l.root.removeEventListener("click",h),l.root.removeEventListener("click",C),w.detach(),T(),g(),f(),y.dispose(),c.remove(),k.destroy();},P={current:void 0},E=xl(l.root,I=>{if(!I&&i.get().presenting&&e.classifyPresentationExit?.()==="restore-show"){P.current?.enter();return}i.set({presenting:I});});P.current=E;let M=null;return typeof ResizeObserver<"u"&&(M=new ResizeObserver(()=>{i.get().zoom==="fit"&&s.renderStage();}),M.observe(l.viewport)),{chrome:l,presentation:E,detachKeyboard:d,detachTouchGestures:u,detachPresentationClick:A,resizeObserver:M,appliedThemeVars:p}}function wM(e){return [{labelKey:"pptx.titleBar.save",run:()=>e.save()},{labelKey:"pptx.toolbar.undo",run:()=>e.undo()},{labelKey:"pptx.toolbar.redo",run:()=>e.redo()}]}function vl(e,t){t(),e.detachKeyboard(),e.detachPresentationClick(),e.detachTouchGestures(),e.resizeObserver?.disconnect(),e.presentation.dispose(),e.chrome.root.remove();}function hl(e){return {doc:e.doc,container:e.container,t:e.t,options:e.getChromeOptions(),getCustomization:()=>e.getResolvedCustomization(),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(e.firstShowSlideIndex()),e.enterPresentation();},startPresentationFromCurrent:()=>{e.enterPresentation();},openPresenterView:()=>e.openPresenterView(),openBroadcast:()=>e.openBroadcast(),openShare:()=>e.openShare(),openAccessibility:()=>e.openAccessibility(),openSettings:t=>e.openSettings(t),subtitleOptionsStore:e.subtitleOptionsStore?()=>e.subtitleOptionsStore():void 0,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(),getChartFollowDataPoint:()=>e.getChartFollowDataPoint(),getRecentPresentationsCount:()=>e.getRecentPresentationsCount(),getTableStyleMap:()=>e.getTableStyleMap(),getThemeColorMap:()=>e.getThemeColorMap(),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 chunkWKWWFY2C_cjs.ni(t.slides[t.currentSlide])},readTransition:()=>{let t=e.store.get();return t.slides[t.currentSlide]?.transition},presentationProperties:()=>e.store.get().presentationProperties,save:()=>{e.downloadPptx();},downloadAs:t=>e.downloadAs(t),toggleNotes:()=>e.toggleNotes(),goToSlide:t=>e.goToSlide(t),addSlide:t=>e.addSlide(t),duplicateSlides:t=>e.duplicateSlides(t),deleteSlides:t=>e.deleteSlides(t),toggleHideSlides:t=>e.toggleHideSlides(t),goToFirstSlide:()=>e.goToFirstSlide(),goToLastSlide:()=>e.goToLastSlide(),firstShowSlideIndex:()=>e.firstShowSlideIndex(),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(),shouldShowPresentationContextMenu:()=>e.shouldShowPresentationContextMenu(),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=chunkWKWWFY2C_cjs.Fk(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(),applyPresentationTheme:t=>e.applyPresentationTheme(t),setDrawTool:t=>e.editor.setDrawTool(t),setDrawColor:t=>e.editor.setDrawColor(t),setDrawWidth:t=>e.editor.setDrawWidth(t),armFreeformTool:t=>e.editor.armFreeformTool(t),getQuickAccessOptions:()=>e.getQuickAccessOptions(),quickAccessScreenTip:t=>e.quickAccessScreenTip(t),enableEditingFromProtectedView:()=>e.enableEditingFromProtectedView(),editAnywayFromReadOnlyRecommendation:()=>e.editAnywayFromReadOnlyRecommendation(),dismissReadOnlyBanner:()=>e.dismissReadOnlyBanner(),submitReadOnlyPassword:t=>e.submitReadOnlyPassword(t),cancelReadOnlyPasswordPrompt:()=>e.cancelReadOnlyPasswordPrompt(),dismissCompatToast:t=>e.dismissCompatToast(t),dismissAllCompatToasts:()=>e.dismissAllCompatToasts(),addRunProgramNotice:t=>e.addRunProgramNotice(t),dismissRunProgramNotice:t=>e.dismissRunProgramNotice(t),confirmExternalHyperlink:t=>e.confirmExternalHyperlink(t)}}function EM(e,t){let{width:n,height:o}=chunkWKWWFY2C_cjs.Gt(e.width,e.height,t),r=e;if(n!==e.width||o!==e.height){let s=e.ownerDocument.createElement("canvas");s.width=n,s.height=o;let a=s.getContext("2d");if(!a)throw new Error("[pptx-vanilla-viewer] GIF export failed: 2D context unavailable");a.drawImage(e,0,0,n,o),r=s;}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 yl(e,t={}){let{slideDurationMs:n=2e3,slideTimingsMs:o,maxDimension:r=chunkWKWWFY2C_cjs.Ft,onProgress:i,signal:s}=t,a=e.store.get().slides.length;if(a===0)return;let l=chunkWKWWFY2C_cjs.Et({totalSlides:a,slideDurationMs:n,slideTimingsMs:o}),p=[];for(let c of l){if(s?.aborted)throw chunkWKWWFY2C_cjs.fj();i?.(c.slideIndex,a);let x=await e.rasterizeSlide(c.slideIndex);p.push({...EM(x,r),delayCs:c.delayCs});}let d=chunkWKWWFY2C_cjs.Ht(p,l[0].delayCs);i?.(a,a);let u=new ArrayBuffer(d.byteLength);new Uint8Array(u).set(d),chunkWKWWFY2C_cjs.At(new Blob([u],{type:"image/gif"}),`${e.baseName}.gif`);}function TM(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 Ht(e="en",t){let n=t?.[e],o=e!=="en"?t?.en:void 0;return (r,i)=>{let s=n?.[r]??o?.[r]??chunk6TALMZ42_cjs.C[r]??chunk6TALMZ42_cjs.D(r);return TM(s,i)}}function ti(e,t,n,o={}){return chunkWKWWFY2C_cjs.V.exportSlide(e,t,n,o)}function IP(e,t={}){return chunkWKWWFY2C_cjs.V.exportAll(e,t)}async function Cl(e,t={}){let{onProgress:n,signal:o,openPrintWindow:r,...i}=t,s=r??chunkWKWWFY2C_cjs.Vt,a=e.store.get(),l=a.slides,p=chunkWKWWFY2C_cjs.Kt(i,l.length),d=chunkWKWWFY2C_cjs.Nt(p.colorMode),u=chunkWKWWFY2C_cjs.Mt(chunkWKWWFY2C_cjs.Lt(p.slideRange,a.currentSlide,l.length,p.customRangeFrom,p.customRangeTo),l,e.getIncludeHiddenSlides?.()??false);if(p.printWhat==="outline"){let S=`<div class="outline-page">${chunkWKWWFY2C_cjs.Pt(u,l)}</div>`;return s(Sl("Outline",S,p,d))}if(u.length===0)return false;if(p.printWhat==="slides"){let{width:S,height:h}=a.canvasSize,C=[];for(let w=0;w<u.length;w++){if(o?.aborted)throw chunkWKWWFY2C_cjs.fj();n?.(w,u.length),C.push(ti(l[u[w]],S,h));}return n?.(u.length,u.length),s(chunkWKWWFY2C_cjs.It(C,S,h,{title:"Slides (Vector)",orientation:p.orientation,colorFilter:d,scaleToFit:p.scaleToFit}))}let c=e.getTranslator?.()??Ht(),x=r?void 0:chunkWKWWFY2C_cjs.Tt(c("pptx.print.preparingToPrint"));if(!r&&!x)return false;let b=e.getPrintHighQuality?.()?2:1,g=[];for(let S=0;S<u.length;S++){if(o?.aborted)throw x?.close(),chunkWKWWFY2C_cjs.fj();n?.(S,u.length);let h=await e.rasterizeSlide(u[S],b);g.push(h.toDataURL("image/png"));}n?.(u.length,u.length);let v=S=>x?(chunkWKWWFY2C_cjs.Ut(x,S),true):s(S);if(p.printWhat==="notes"){let S=chunkWKWWFY2C_cjs.Qt(g,u,l);return v(Sl("Notes Pages",S,p,d))}let f=chunkWKWWFY2C_cjs.Rt(g,u,p.slidesPerPage,a.handoutMaster),y=`Handout ${p.slidesPerPage} per page`;return v(Sl(y,f,p,d))}function Sl(e,t,n,o){return chunkWKWWFY2C_cjs.St({title:e,bodyHtml:t,orientation:n.orientation,colorFilter:o,frameSlides:n.frameSlides,scaleToFit:n.scaleToFit})}function PM(e){return new Promise(t=>{setTimeout(t,e);})}async function AM(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:chunkWKWWFY2C_cjs.Yt([...chunkWKWWFY2C_cjs.Xt]),videoBitsPerSecond:t.videoBitsPerSecond}),s=[];i.ondataavailable=l=>{l.data.size>0&&s.push(l.data);};let a=new Promise((l,p)=>{i.onstop=()=>{l();},i.onerror=()=>{p(new Error("[pptx-vanilla-viewer] video export failed: MediaRecorder error"));};});i.start();try{let l=chunkWKWWFY2C_cjs.Wt({totalSlides:e.length,slideDurationMs:t.slideDurationMs,slideTimingsMs:t.slideTimingsMs,fps:t.fps}),p=chunkWKWWFY2C_cjs.Zt(t.fps);for(let d of l){t.onRecordProgress?.(d.slideIndex,l.length);for(let u=0;u<d.frameCount;u++){if(t.signal?.aborted)throw i.stop(),chunkWKWWFY2C_cjs.fj();o.drawImage(e[d.slideIndex],0,0),await t.waitMs(p);}}return i.stop(),await a,new Blob(s,{type:"video/webm"})}finally{chunkWKWWFY2C_cjs._t(r);}}async function wl(e,t={}){let{slideDurationMs:n=3e3,slideTimingsMs:o,fps:r=30,videoBitsPerSecond:i=5e6,onProgress:s,onRecordProgress:a,signal:l}=t,p=e.store.get().slides.length;if(p===0)return;let d=[];for(let c=0;c<p;c++){if(l?.aborted)throw chunkWKWWFY2C_cjs.fj();s?.(c,p),d.push(await e.rasterizeSlide(c));}let u=await AM(d,{slideDurationMs:n,slideTimingsMs:o,fps:r,videoBitsPerSecond:i,onRecordProgress:a,signal:l,waitMs:e.waitMs??PM});s?.(p,p),chunkWKWWFY2C_cjs.At(u,`${e.baseName}.webm`);}function kM(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,tableStylesDefaultId:e.tableStylesDefaultId,tags:e.tagCollections,theme:e.colorScheme||e.fontScheme||e.themeName?{name:e.themeName,colorScheme:e.colorScheme,fontScheme:e.fontScheme}:void 0}}function El(e){let t=false,n={store:e.store,rasterizeSlide:e.rasterizeSlide,rasterizeSlideToRaster:e.rasterizeSlideToRaster,baseName:chunkWKWWFY2C_cjs.zt(e.fileName),getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality};async function o(p,d){if(t)return p;t=true;try{return await d()}finally{t=false;}}async function r(p){if(e.rasterizeSlideToRaster)return e.rasterizeSlideToRaster(p);let d=await e.rasterizeSlide(p);return {kind:"canvas",canvas:d,strategy:"html2canvas",width:d.width,height:d.height}}async function i(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length))return o(void 0,async()=>{let c=await r(u);chunkWKWWFY2C_cjs.Bt(await chunkWKWWFY2C_cjs.eu(c),`${n.baseName}-slide-${u+1}.png`);})}async function s(p){let d=e.store.get(),u=p??d.currentSlide;if(!(u<0||u>=d.slides.length||typeof ClipboardItem>"u"||!navigator.clipboard?.write))return o(void 0,async()=>{let c=await r(u),x=await chunkWKWWFY2C_cjs.du(c);await navigator.clipboard.write([new ClipboardItem({"image/png":x})]);})}async function a(p={}){let d=e.store.get();if(d.slides.length===0)return;let{onProgress:u,signal:c}=p;return o(void 0,async()=>{let{jsPDF:x}=await import('jspdf'),{width:b,height:g}=d.canvasSize,v=b>=g?"landscape":"portrait",f=new x({orientation:v,unit:"px",format:[b,g],compress:!0}),y=d.slides.length;for(let S=0;S<y;S++){if(c?.aborted)throw chunkWKWWFY2C_cjs.fj();if(u?.(S,y),S>0&&f.addPage([b,g],v),e.rasterizeSlideToTiles){let h=await e.rasterizeSlideToTiles(S);for(let C of h.tiles){let w=chunkWKWWFY2C_cjs.bu(C,h.fullWidth,h.fullHeight,b,g);f.addImage(C.canvas.toDataURL("image/png"),"PNG",w.x,w.y,w.width,w.height);}}else {let h=await e.rasterizeSlide(S);f.addImage(h.toDataURL("image/png"),"PNG",0,0,b,g);}}f.save(`${n.baseName}.pdf`);})}function l(){chunkWKWWFY2C_cjs.Dt(kM(e.store.get()),e.fileName);}return {exportSlidePng:i,copySlideAsImage:s,exportPdf:a,exportJson:l,exportGif:p=>o(void 0,()=>yl(n,p)),exportVideo:p=>o(void 0,()=>wl(n,p)),print:p=>o(false,()=>Cl(n,p))}}function Tl(e){let{doc:t}=e,n=null,o=null,r=null,i=null,s=null,a=()=>{let p=e.getTranslator();n=chunk6TALMZ42_cjs.w(t,"div","pptxv-export-progress-backdrop"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true");let d=chunk6TALMZ42_cjs.w(t,"div","pptxv-export-progress-panel");o=chunk6TALMZ42_cjs.w(t,"h3");let u=chunk6TALMZ42_cjs.w(t,"div","pptxv-export-progress-track");r=chunk6TALMZ42_cjs.w(t,"div","pptxv-export-progress-fill"),u.appendChild(r);let c=chunk6TALMZ42_cjs.w(t,"div","pptxv-export-progress-status");i=chunk6TALMZ42_cjs.w(t,"span"),s=chunk6TALMZ42_cjs.w(t,"span","pptxv-export-progress-pct"),c.append(i,s);let x=chunk6TALMZ42_cjs.w(t,"div","pptxv-export-progress-actions"),b=chunk6TALMZ42_cjs.w(t,"button");b.type="button",b.textContent=p("pptx.export.cancel"),b.addEventListener("click",()=>e.onCancel()),x.appendChild(b),d.append(o,u,c,x),n.appendChild(d),t.body.appendChild(n);},l=(p,d)=>{let u=chunkWKWWFY2C_cjs.bj(p);r&&(r.style.width=`${u}%`),i&&(i.textContent=d),s&&(s.textContent=`${u}%`);};return {open(p,d){this.close(),a(),n?.setAttribute("aria-label",p),o&&(o.textContent=p),l(0,d);},update(p,d){l(p,d);},close(){n?.remove(),n=null,o=null,r=null,i=null,s=null;}}}function Pl(e){let t=null,n=s=>e.getTranslator()(s),o=(s,a)=>{let l=new AbortController;return t=l,a&&(a.aborted?l.abort():a.addEventListener("abort",()=>l.abort(),{once:true})),e.modal.open(s,n("pptx.export.capturingSlides")),l},r=()=>{t=null,e.modal.close();},i=(s,a)=>{chunkWKWWFY2C_cjs.gj(a)||console.error(`[pptx-vanilla-viewer] ${s} export failed:`,a);};return {async runPdf(s={}){let a=o(n("pptx.ribbon.exportPdf"),s.signal);try{await e.controller.exportPdf({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunkWKWWFY2C_cjs.cj(l,p),chunkWKWWFY2C_cjs.ej(n("pptx.export.rendering"),l,p));}}),e.modal.update(chunkWKWWFY2C_cjs.$i,n("pptx.export.buildingPdf")),e.modal.update(chunkWKWWFY2C_cjs.aj,n("pptx.export.buildingPdf"));}catch(l){i("PDF",l);}finally{r();}},async runGif(s={}){let a=o(n("pptx.ribbon.exportGif"),s.signal);try{await e.controller.exportGif({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunkWKWWFY2C_cjs.cj(l,p),chunkWKWWFY2C_cjs.ej(n("pptx.export.encoding"),l,p));}}),e.modal.update(chunkWKWWFY2C_cjs.aj,n("pptx.export.savingFile"));}catch(l){i("GIF",l);}finally{r();}},async runVideo(s={}){let a=o(n("pptx.ribbon.exportVideo"),s.signal);try{await e.controller.exportVideo({...s,signal:a.signal,onProgress:(l,p)=>{s.onProgress?.(l,p),e.modal.update(chunkWKWWFY2C_cjs.cj(l,p,45),chunkWKWWFY2C_cjs.ej(n("pptx.export.capturing"),l,p));},onRecordProgress:(l,p)=>{s.onRecordProgress?.(l,p),e.modal.update(chunkWKWWFY2C_cjs.dj(l,p),chunkWKWWFY2C_cjs.ej(n("pptx.export.recording"),l,p));}}),e.modal.update(chunkWKWWFY2C_cjs.aj,n("pptx.export.savingFile"));}catch(l){i("Video",l);}finally{r();}},cancel(){t?.abort(),t=null,e.modal.close();}}}function oi(e,t){return chunkWKWWFY2C_cjs.og({headerFooter:e.headerFooter,customProperties:e.customProperties,slide:t})}function IM(){return new Promise(e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()));})}function Al(e){let t=chunk6TALMZ42_cjs.w(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??IM;async function o(a,l){let p=e.store.get(),d=p.slides[a];if(!d)throw new Error(`Export failed: no slide at index ${a}`);t.replaceChildren();let u=chunk6TALMZ42_cjs.A({document:e.doc,slide:d,canvasSize:p.canvasSize,mediaDataUrls:p.mediaDataUrls,fieldContext:oi(p,d),registry:e.registry,t:e.getTranslator(),scale:1,smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:false});t.appendChild(u),await n();let c=2*e.getImageResolutionScale()*l;return {stage:u,naturalWidth:p.canvasSize.width,naturalHeight:p.canvasSize.height,scale:c,html2canvasFallback:(x,b)=>lo(u,{backgroundColor:"#ffffff",scale:b.width/(x.width||1),x:x.x,y:x.y,width:x.width,height:x.height,logging:false})}}async function r(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:c,html2canvasFallback:x}=await o(a,l);return chunkWKWWFY2C_cjs.au(p,d,u,e.doc,{scale:c,backgroundColor:"#ffffff",html2canvasFallback:x})}async function i(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:c,html2canvasFallback:x}=await o(a,l);return chunkWKWWFY2C_cjs.$t(p,d,u,e.doc,{scale:c,backgroundColor:"#ffffff",html2canvasFallback:x})}async function s(a,l=1){let{stage:p,naturalWidth:d,naturalHeight:u,scale:c,html2canvasFallback:x}=await o(a,l);return (await chunkWKWWFY2C_cjs.cu(p,d,u,e.doc,{scale:c,backgroundColor:"#ffffff",html2canvasFallback:x})).canvas}return {rasterizeSlide:s,rasterizeSlideToRaster:r,rasterizeSlideToTiles:i,destroy(){t.remove();}}}var Ko=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 kl(e){let t=Al(e),n=El({store:e.store,rasterizeSlide:t.rasterizeSlide,rasterizeSlideToRaster:t.rasterizeSlideToRaster,rasterizeSlideToTiles:t.rasterizeSlideToTiles,fileName:e.fileName,getTranslator:e.getTranslator,getIncludeHiddenSlides:e.getIncludeHiddenSlides,getPrintHighQuality:e.getPrintHighQuality}),o=Tl({doc:e.doc,getTranslator:e.getTranslator,onCancel:()=>r.cancel()}),r=Pl({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();}}}var ni=class extends Ko{get customizationApi(){return this.customization.controller.api}getCustomization(){return this.customizationApi.getCustomization()}setCustomization(t){this.customizationApi.setCustomization(t);}updateCustomization(t){this.customizationApi.updateCustomization(t);}resetCustomization(){this.customizationApi.resetCustomization();}hideRibbonTab(t){this.customizationApi.hideRibbonTab(t);}showRibbonTab(t){this.customizationApi.showRibbonTab(t);}hideRibbonGroup(t){this.customizationApi.hideRibbonGroup(t);}showRibbonGroup(t){this.customizationApi.showRibbonGroup(t);}hideToolbarButton(t){this.customizationApi.hideToolbarButton(t);}showToolbarButton(t){this.customizationApi.showToolbarButton(t);}hideRibbonControl(t){this.customizationApi.hideRibbonControl(t);}showRibbonControl(t){this.customizationApi.showRibbonControl(t);}hideOptionsPage(t){this.customizationApi.hideOptionsPage(t);}showOptionsPage(t){this.customizationApi.showOptionsPage(t);}hideOptionsSection(t){this.customizationApi.hideOptionsSection(t);}showOptionsSection(t){this.customizationApi.showOptionsSection(t);}hideSetting(t){this.customizationApi.hideSetting(t);}showSetting(t){this.customizationApi.showSetting(t);}lockSetting(t,n,o){this.customizationApi.lockSetting(t,n,o);}unlockSetting(t){this.customizationApi.unlockSetting(t);}setSettingDefault(t,n){this.customizationApi.setSettingDefault(t,n);}hideBackstagePage(t){this.customizationApi.hideBackstagePage(t);}showBackstagePage(t){this.customizationApi.showBackstagePage(t);}hideBackstageCard(t){this.customizationApi.hideBackstageCard(t);}showBackstageCard(t){this.customizationApi.showBackstageCard(t);}hideContextMenuCommand(t){this.customizationApi.hideContextMenuCommand(t);}showContextMenuCommand(t){this.customizationApi.showContextMenuCommand(t);}hideCanvasContextMenuCommand(t){this.customizationApi.hideCanvasContextMenuCommand(t);}showCanvasContextMenuCommand(t){this.customizationApi.showCanvasContextMenuCommand(t);}disableShortcut(t){this.customizationApi.disableShortcut(t);}enableShortcut(t){this.customizationApi.enableShortcut(t);}remapShortcut(t,n){this.customizationApi.remapShortcut(t,n);}setPanelVisible(t,n){this.customizationApi.setPanelVisible(t,n);}setFeatureEnabled(t,n){this.customizationApi.setFeatureEnabled(t,n);}setDialogAvailable(t,n){this.customizationApi.setDialogAvailable(t,n);}};function Il(e,t){return n=>{let o=e.get(),r=o.selectedElementId,i=t.selectedElement(o);if(!o.editable||!r||!i)return;let s=t.readInlineList?.();if(s?.kind==="unsupported")return;let a=s?.kind==="supported"&&s.snapshot.elementId===r?s.snapshot:void 0,l=a?{...i,text:a.text,textSegments:a.textSegments}:i,p=n(l,a);if(Object.keys(p).length!==0){if(a&&chunkWKWWFY2C_cjs.e(l)&&("textStyle"in p||"textSegments"in p)){let d=Object.fromEntries(Object.entries(p.textStyle??{}).filter(([x,b])=>b!==l.textStyle?.[x])),u=("textSegments"in p?p.textSegments:a.textSegments)?.map(x=>chunkWKWWFY2C_cjs.Qf(x,d)),c=chunkWKWWFY2C_cjs.nh(u);if(c!==a.text)t.cancelInlineList?.();else if(!t.formatInlineList?.({elementId:r,text:c,textSegments:u}))return;p={...p,text:c,textSegments:u};}t.pushHistory(),e.set(X(o,U(o).map(d=>d.id===r?{...d,...p}:d))),t.commitChange();}}}function Ll(e){let{store:t,ops:n}=e,o=(i,s)=>{let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l?.animations?.some(d=>d.elementId===i))return;let p=s(l.animations);n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(a.slides,a.currentSlide,{animations:p})}),n.commitChange();},r=()=>t.get().slides[t.get().currentSlide]?.animationTimelineAnchors??[];return {addAnimation(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let d=chunkWKWWFY2C_cjs.Jc(p.animations??[],l,i,s);n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(a.slides,a.currentSlide,{animations:d})}),n.commitChange();},removeAnimation(){let i=t.get(),s=i.selectedElementId,a=i.slides[i.currentSlide];if(!i.editable||!s||!a?.animations?.length)return;let l=chunkWKWWFY2C_cjs.Kc(a.animations,s);l.length!==a.animations.length&&(n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(i.slides,i.currentSlide,{animations:l})}),n.commitChange());},setAnimationEffect(i,s){let a=t.get(),l=a.selectedElementId,p=a.slides[a.currentSlide];if(!a.editable||!l||!p)return;let u=(i==="entrance"?chunkWKWWFY2C_cjs.xc:i==="exit"?chunkWKWWFY2C_cjs.yc:chunkWKWWFY2C_cjs.zc)(p.animations??[],l,s);n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(a.slides,a.currentSlide,{animations:u})}),n.commitChange();},applyMotionPath(i){if(i==="custom")return;let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=l.animations??[],d=i==="none"?chunkWKWWFY2C_cjs.Od(p,a):chunkWKWWFY2C_cjs.Nd(p,a,i);n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(s.slides,s.currentSlide,{animations:d})}),n.commitChange();},setMotionPathData(i){let s=t.get(),a=s.selectedElementId,l=s.slides[s.currentSlide];if(!s.editable||!a||!l)return;let p=chunkWKWWFY2C_cjs.Md(l.animations??[],a,i);n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(s.slides,s.currentSlide,{animations:p})}),n.commitChange();},setAnimationTiming(i,s){o(i,a=>{let l=[...a];return s.durationMs!==void 0&&(l=chunkWKWWFY2C_cjs.Cc(l,i,s.durationMs)),s.delayMs!==void 0&&(l=chunkWKWWFY2C_cjs.Dc(l,i,s.delayMs)),s.trigger!==void 0&&(l=chunkWKWWFY2C_cjs.Ac(l,i,s.trigger)),s.direction!==void 0&&(l=chunkWKWWFY2C_cjs.Fc(l,i,s.direction)),s.sequence!==void 0&&(l=chunkWKWWFY2C_cjs.Gc(l,i,s.sequence)),s.timingCurve!==void 0&&(l=chunkWKWWFY2C_cjs.Ec(l,i,s.timingCurve)),s.repeatCount!==void 0&&(l=chunkWKWWFY2C_cjs.Hc(l,i,s.repeatCount)),s.repeatMode!==void 0&&(l=chunkWKWWFY2C_cjs.Ic(l,i,s.repeatMode)),s.triggerShapeId!==void 0&&(l=chunkWKWWFY2C_cjs.Bc(l,i,s.triggerShapeId||void 0)),s.triggerBookmark!==void 0&&(l=chunkWKWWFY2C_cjs.Tc(l,i,s.triggerBookmark)),s.afterAnimation!==void 0&&(l=chunkWKWWFY2C_cjs.cd(l,i,s.afterAnimation)),s.afterAnimationColor!==void 0&&(l=chunkWKWWFY2C_cjs.dd(l,i,s.afterAnimationColor)),l});},setAnimationSound(i,s){o(i,a=>chunkWKWWFY2C_cjs.ad(a,i,s));},setAnimationStockSound(i,s){o(i,a=>chunkWKWWFY2C_cjs.$c(a,i,s));},reorderAnimation(i,s){o(i,a=>chunkWKWWFY2C_cjs.Xc(a,r(),i,s==="up"?-1:1));},moveAnimation(i,s){o(i,a=>{let l=chunkWKWWFY2C_cjs.Uc(a,r()),p=chunkWKWWFY2C_cjs.Vc(l,`editor:${i}`,s);return chunkWKWWFY2C_cjs.Wc(a,p)});}}}function LP(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 Ml(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return LP(e,chunkWKWWFY2C_cjs.xe(r,n))}function Dl(e,t,n){let o=new Set(t),r=e.filter(i=>o.has(i.id));return LP(e,chunkWKWWFY2C_cjs.ye(r,n))}function Rl(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 ri(e,t){return t==="horizontal"?{flipHorizontal:!e.flipHorizontal}:{flipVertical:!e.flipVertical}}function Ol(e,t,n){return t.map(r=>e.find(i=>i.id===r)).every(r=>chunkWKWWFY2C_cjs.Le(r,"group"))?chunkWKWWFY2C_cjs.o(e,t,n):{elements:[...e],groupId:null}}function Hl(e,t,n,o=false){let r=e.find(i=>i.id===t);return chunkWKWWFY2C_cjs.Le(r,"group")?chunkWKWWFY2C_cjs.p(e,t,n,{intoTemplate:o}):{elements:[...e],childIds:[]}}function Fl(e){let{store:t,ops:n,applyToSelected:o}=e,r=i=>{let s=t.get(),a=s.selectedElementId;if(!s.editable||!a)return;let l=mP(s,a);i(l,a)!==l&&(n.pushHistory(),t.set(uP(s,a,i(l,a))),n.commitChange());};return {bringForward:()=>r(chunkWKWWFY2C_cjs.hf),sendBackward:()=>r(chunkWKWWFY2C_cjs.if),bringToFront:()=>r(chunkWKWWFY2C_cjs.ff),sendToBack:()=>r(chunkWKWWFY2C_cjs.gf),alignElements(i){let s=t.get();if(s.selectedElementIds.length<2){o(a=>Rl(a,i,s.canvasSize));return}n.pushHistory(),t.set(X(s,Ml(U(s),s.selectedElementIds,i))),n.commitChange();},distributeElements(i){let s=t.get();!s.editable||s.selectedElementIds.length<3||(n.pushHistory(),t.set(X(s,Dl(U(s),s.selectedElementIds,i))),n.commitChange());},flipHorizontal:()=>o(i=>ri(i,"horizontal")),flipVertical:()=>o(i=>ri(i,"vertical")),groupSelected(){let i=t.get();if(!i.editable||i.selectedElementIds.length<2)return;let s=Ol(U(i),i.selectedElementIds,i.editTemplateMode?chunkWKWWFY2C_cjs.gl(true,i.selectedElementIds[0]):chunkWKWWFY2C_cjs.fl());s.groupId&&(n.pushHistory(),t.set({...X(i,s.elements),selectedElementId:s.groupId,selectedElementIds:[s.groupId]}),n.commitChange());},ungroupSelected(){let i=t.get(),s=i.selectedElementId,a=U(i),l=n.selectedElement(i);if(!i.editable||!s||!a||!l||l.type!=="group")return;let p=l.children.map(u=>i.editTemplateMode?chunkWKWWFY2C_cjs.gl(true,u.id||l.id):chunkWKWWFY2C_cjs.fl()),d=Hl(a,s,p,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 Vl(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:MP(r,{backgroundColor:o})}),n.commitChange();return}r.slides[r.currentSlide]&&(n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(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:MP(o,{backgroundColor:void 0,backgroundImage:void 0})}),n.commitChange();return}o.slides[o.currentSlide]&&(n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(o.slides,o.currentSlide,{backgroundColor:void 0,backgroundImage:void 0,backgroundGradient:void 0,backgroundPattern:void 0})}),n.commitChange());}},setHideBackgroundGraphics(o){let r=t.get();!r.editable||r.masterViewTarget||!r.slides[r.currentSlide]||(n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Cr(r.slides,r.currentSlide,{showMasterShapes:!o})}),n.commitChange());}}}function MP(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,s)=>s===n.layoutIndex?{...i,...t}:i)}):e.slideMasters}function zl(e){let{store:t,ops:n}=e;return {copy(){let o=n.selectedElement(t.get());o&&t.set({clipboardPayload:chunkWKWWFY2C_cjs.hl(o,false)});},cut(){let o=t.get(),r=n.selectedElement(o);!o.editable||!r||(t.set({clipboardPayload:chunkWKWWFY2C_cjs.hl(r,false)}),n.deleteSelected());},paste(){let o=t.get(),r=o.clipboardPayload;if(!o.editable||!r||!o.slides[o.currentSlide])return;let i=chunkWKWWFY2C_cjs.il(r.element);n.pushHistory(),t.set({...X(o,[...U(o),i]),selectedElementId:i.id,selectedElementIds:[i.id],pasteOptionsToolbar:[{id:i.id,sourceClone:i}]}),n.commitChange();},pasteWithFormat(o){let r=t.get(),i=r.clipboardPayload;if(!r.editable||!i||!r.slides[r.currentSlide])return null;let s=chunkWKWWFY2C_cjs.il(i.element),a=o==="picture"?s:chunkWKWWFY2C_cjs.Kl(s,o);return n.pushHistory(),t.set({...X(r,[...U(r),a]),selectedElementId:a.id,selectedElementIds:[a.id],pasteOptionsToolbar:[{id:a.id,sourceClone:s}]}),n.commitChange(),a.id},reformatPasted(o,r,i){i!=="picture"&&DP(t,n,o,chunkWKWWFY2C_cjs.Kl(r,i));},replaceElement(o,r){DP(t,n,o,r);}}}function DP(e,t,n,o){let r=e.get();t.pushHistory(),e.set(X(r,U(r).map(i=>i.id===n?o:i))),t.commitChange();}function Bl(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((s,a)=>r||a===0?{...s,themePath:o}:s)}),n.commitChange()))();},async applyThemeEdit({colorScheme:o,fontScheme:r,name:i}){if(!t.get().editable)return;await e.getHandler()?.applyTheme(o,r,i);let s=t.get();n.pushHistory();let a=s.colorScheme?{...s.colorScheme}:void 0,l=chunkWKWWFY2C_cjs.S({slides:s.slides,theme:{colorScheme:s.colorScheme,fontScheme:s.fontScheme},themeColorMap:a},o,r,i),p=Object.keys(s.templateElementsBySlideId).length?Object.fromEntries(Object.entries(s.templateElementsBySlideId).map(([d,u])=>[d,chunkWKWWFY2C_cjs.P(chunkWKWWFY2C_cjs.R(u,a??{},o),s.fontScheme,r)])):s.templateElementsBySlideId;t.set({slides:l.slides,templateElementsBySlideId:p,colorScheme:l.theme?.colorScheme??o,fontScheme:l.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:chunkWKWWFY2C_cjs.Cr(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(s=>s.path===o?{...s,backgroundColor:r}:s)}),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:chunkWKWWFY2C_cjs.Zi(o)}),n.commitChange());},applySlideSizeRescale(o,r){if(!Number.isFinite(o.widthEmu)||!Number.isFinite(o.heightEmu)||o.widthEmu<=0||o.heightEmu<=0)return;let i=t.get();if(!i.editable)return;let s=chunkWKWWFY2C_cjs._i({current:i.slideSize,canvas:i.canvasSize}).size;n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Rr(i.slides,s,o,r),slideSize:{...o},canvasSize:chunkWKWWFY2C_cjs.Zi(o)}),n.commitChange();},updateTableStyleMap(o){let r=t.get();if(!r.editable)return;let i=chunkWKWWFY2C_cjs.fp({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();},deleteTableStyle(o){let r=t.get();if(!r.editable)return;let i=chunkWKWWFY2C_cjs.gp({tableStyleMap:r.tableStyleMap,tableStylesToDelete:r.tableStylesToDelete},o);t.set({tableStyleMap:i.tableStyleMap,tableStylesToDelete:i.tableStylesToDelete}),n.commitChange();}}}function ii(e,t,n,o){let r=we(e,t,t("pptx.hyperlink.editTitle")),i=chunkWKWWFY2C_cjs.Wl(n),s=(p,d)=>{let u=chunk6TALMZ42_cjs.w(e,"label","pptxv-parity-select"),c=chunk6TALMZ42_cjs.w(e,"span");c.textContent=p;let x=chunk6TALMZ42_cjs.w(e,"input");return x.type="text",x.value=d,u.append(c,x),r.body.appendChild(u),x},a=s(t("pptx.hyperlink.urlLabel"),i.url);a.placeholder=t("pptx.hyperlink.urlPlaceholder");let l=s(t("pptx.hyperlink.tooltipLabel"),i.tooltip);ae(e,r.footer,t("pptx.hyperlinkDialog.removeLink"),()=>{o(chunkWKWWFY2C_cjs.Yl()),r.close();}),ae(e,r.footer,t("pptx.common.cancel"),r.close),ae(e,r.footer,t("pptx.hyperlinkDialog.apply"),()=>{o(chunkWKWWFY2C_cjs.Xl(n,{url:a.value,tooltip:l.value})),r.close();},true);}function RP(e,t,n){let o=we(e,t,t("pptx.pasteSpecial.dialogTitle")),r="keep-source-formatting";Nr(e,o.body,"paste-special-format",chunkWKWWFY2C_cjs.Jl.map(i=>({value:i.id,label:t(i.labelKey)})),r,i=>{r=i;}),ae(e,o.footer,t("pptx.common.cancel"),()=>o.close()),ae(e,o.footer,t("pptx.common.ok"),()=>{o.close(),n.onConfirm(r);},true);}var ai=new WeakMap;function LM(e,t){e.addEventListener("pointerdown",n=>{n.stopPropagation(),e.setPointerCapture(n.pointerId);}),e.addEventListener("pointermove",n=>{if(!e.hasPointerCapture(n.pointerId))return;let o=ai.get(e),r=e.offsetParent;if(!o||!r)return;let i=r.getBoundingClientRect(),s=o.scale||1,a=o.axis==="h"?(n.clientY-i.top)/s:(n.clientX-i.left)/s;t.onMoveGuide(o.id,a);}),e.addEventListener("pointerup",n=>{try{e.releasePointerCapture(n.pointerId);}catch{}}),e.addEventListener("dblclick",n=>{n.stopPropagation();let o=ai.get(e);o&&t.onRemoveGuide(o.id);});}function OP(e,t,n,o,r){let i=new Map;t.querySelectorAll(".pptxv-alignment-guide").forEach(a=>{let l=a.dataset.guideId;l!==void 0&&i.set(l,a);});let s=new Set;for(let a of n){s.add(a.id);let l=i.get(a.id);l||(l=e.createElement("div"),l.dataset.guideId=a.id,r&&LM(l,r),t.appendChild(l)),l.className=`pptxv-alignment-guide is-${a.axis}${r?" is-interactive":""}`,l.style[a.axis==="h"?"top":"left"]=`${a.position*o}px`,ai.set(l,{id:a.id,axis:a.axis,scale:o});}for(let[a,l]of i)s.has(a)||(ai.delete(l),l.remove());}function MM(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="chart"?t:null}function HP(e){let{doc:t,t:n,store:o,ops:r}=e,i=t.createElement("div");i.className="pptxv-chart-quick-actions",i.setAttribute("data-pptx-chart-quick-actions","");let s=null;function a(g,v){let f=o.get();!f.editable||!U(f).some(y=>y.id===g)||(r.pushHistory(),o.set(X(f,U(f).map(y=>y.id===g?{...y,chartData:v}:y))),r.commitChange());}function l(g){g.preventDefault(),g.stopPropagation();}function p(g){s=s===g?null:g,b();}function d(g,v){let f=t.createElement("button");return f.type="button",f.className="pptxv-chart-quick-btn",f.disabled=!v,f.dataset.testid=`chart-quick-action-${g.id}`,f.setAttribute("aria-label",n(g.labelKey)),f.title=n(g.labelKey),f.style.left=`${g.x}px`,f.style.top=`${g.y}px`,f.style.width=`${g.size}px`,f.style.height=`${g.size}px`,f.appendChild(chunk6TALMZ42_cjs.K(t,g.id==="elements"?"plus":g.id==="styles"?"paintbrush":"filter")),f.addEventListener("pointerdown",l),f.addEventListener("click",()=>p(g.id)),f}function u(g,v,f,y,S){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-elements-popover",h.style.left=`${y}px`,h.style.top=`${S}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickElements"),h.appendChild(C);for(let w of g.elements){let T=t.createElement("label");T.className="row";let k=t.createElement("input");k.type="checkbox",k.disabled=!f,k.checked=w.checked,k.dataset.testid=`chart-quick-element-${w.key}`,k.addEventListener("pointerdown",l),k.addEventListener("change",()=>{let P=v.chartData;P&&(a(v.id,chunkWKWWFY2C_cjs.Yb(P,w.key,k.checked)),b());});let A=t.createElement("span");A.textContent=n(w.labelKey),T.append(k,A),h.appendChild(T);}return h}function c(g,v,f,y,S){let h=t.createElement("div");h.className="pptxv-chart-quick-card pptxv-chart-quick-styles",h.dataset.testid="chart-quick-styles-popover",h.style.left=`${y}px`,h.style.top=`${S}px`;for(let C of g.styles.presets){let w=t.createElement("button");w.type="button",w.className="pptxv-chart-quick-swatch",w.classList.toggle("is-applied",C.applied),w.disabled=!f,w.dataset.testid=`chart-quick-style-${C.id}`,w.setAttribute("aria-label",n(C.labelKey)),w.setAttribute("aria-pressed",String(C.applied)),w.title=n(C.labelKey);let T=t.createElement("span");T.className="swatch-row";for(let k of C.colors.slice(0,5)){let A=t.createElement("span");A.style.backgroundColor=k,T.appendChild(A);}w.appendChild(T),w.addEventListener("pointerdown",l),w.addEventListener("click",()=>{let k=v.chartData;if(!k)return;let A=chunkWKWWFY2C_cjs.Wb(k,C.id);A&&a(v.id,A),b();}),h.appendChild(w);}return h}function x(g,v,f,y,S){let h=t.createElement("div");h.className="pptxv-chart-quick-card",h.dataset.testid="chart-quick-filters-popover",h.style.left=`${y}px`,h.style.top=`${S}px`;let C=t.createElement("h5");C.textContent=n("pptx.chart.quickFilters"),h.appendChild(C);for(let w of g.filters.series){let T=t.createElement("label");T.className="row";let k=t.createElement("input");k.type="checkbox",k.disabled=!f,k.checked=w.visible,k.dataset.testid=`chart-quick-filter-${w.key}`,k.addEventListener("pointerdown",l),k.addEventListener("change",()=>{let P=v.chartData;if(!P)return;let E=w.seriesIndex!==void 0?chunkWKWWFY2C_cjs.Tb(P,w.seriesIndex):chunkWKWWFY2C_cjs.Ub(P,w.filteredIndex);E&&a(v.id,E),b();});let A=t.createElement("span");A.className="name",A.textContent=w.name,T.append(k,A),h.appendChild(T);}return h}function b(){let g=o.get(),v=MM(g);if(i.replaceChildren(),!v||!v.chartData)return;let f=e.getScale()||1,y=chunkWKWWFY2C_cjs._b({isChartSelected:true,chartData:v.chartData,selectionBox:{x:v.x*f,y:v.y*f,width:v.width*f,height:v.height*f}});if(y){s&&!y.buttons.some(S=>S.id===s)&&(s=null);for(let S of y.buttons){if(i.appendChild(d(S,g.editable)),s!==S.id)continue;let h=S.x+chunkWKWWFY2C_cjs.Zb+4,C=S.y;S.id==="elements"?i.appendChild(u(y,v,g.editable,h,C)):S.id==="styles"?i.appendChild(c(y,v,g.editable,h,C)):i.appendChild(x(y,v,g.editable,h,C));}}}return {root:i,mount(g){g.appendChild(i),b();},sync:b,dispose(){s=null,i.remove();}}}function FP(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return null;let t=U(e).find(n=>n.id===e.selectedElementId);return t&&t.type==="connector"?t:null}function VP(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,s=c=>{let x=r.getBoundingClientRect(),b=e.getScale()||1;return {x:(c.clientX-x.left)/b,y:(c.clientY-x.top)/b}},a=c=>{i&&(i={kind:i.kind,...s(c)},u());},l=c=>{let x=i;i=null,p();let b=n.get(),g=FP(b);if(!x||!g){u();return}let v=U(b),f=s(c),y=chunkWKWWFY2C_cjs.Kg(chunkWKWWFY2C_cjs.Jg(v.filter(C=>C.id!==g.id)),f.x,f.y),S=chunkWKWWFY2C_cjs.Lg(g,v,x.kind,f,y),h=chunkWKWWFY2C_cjs.Mg(g,S);o.pushHistory(),n.set(X(b,v.map(C=>C.id===g.id?h:C))),o.commitChange();},p=()=>{window.removeEventListener("pointermove",a),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l);};function d(c,x){let b=t.createElement("button");b.type="button",b.className="pptxv-connector-endpoint",c.attached&&b.classList.add("is-attached"),b.dataset.pptxConnectorEndpoint=c.kind,b.dataset.pptxConnectorAttached=String(c.attached),b.setAttribute("aria-label",e.label(c.kind));let g=i?.kind===c.kind?i:c;return b.style.left=`${g.x*x}px`,b.style.top=`${g.y*x}px`,b.addEventListener("pointerdown",v=>{v.preventDefault(),v.stopPropagation(),i={kind:c.kind,...s(v)},window.addEventListener("pointermove",a),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),u();}),b}function u(){let c=n.get(),x=FP(c);if(r.replaceChildren(),!x)return;let b=e.getScale()||1,g=U(c);if(i){let v=chunkWKWWFY2C_cjs.Jg(g.filter(y=>y.id!==x.id)),f=chunkWKWWFY2C_cjs.Kg(v,i.x,i.y);for(let y of v){let S=t.createElement("div");S.className="pptxv-connection-site",S.setAttribute("data-pptx-connection-site",""),f?.elementId===y.elementId&&f.siteIndex===y.siteIndex&&S.classList.add("is-snapped"),S.style.left=`${y.x*b}px`,S.style.top=`${y.y*b}px`,r.appendChild(S);}}for(let v of chunkWKWWFY2C_cjs.Ig(x))r.appendChild(d(v,b));}return {root:r,isActive:()=>i!==null,mount(c){c.appendChild(r),u();},sync:u,dispose(){p(),i=null,r.remove();}}}var zP="http://www.w3.org/2000/svg";function Nl(e,t){e.style.left=`${t.left}px`,e.style.top=`${t.top}px`,e.style.width=`${t.width}px`,e.style.height=`${t.height}px`;}function BP(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-crop-overlay",{position:"absolute",overflow:"visible",zIndex:"50",pointerEvents:"none"});o.dataset.pptxCropOverlay="true";let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-crop-ghost",{position:"absolute",pointerEvents:"auto",cursor:"move"}),i=e.createElement("img");i.alt="",i.draggable=false,Object.assign(i.style,{display:"block",width:"100%",height:"100%",pointerEvents:"none",userSelect:"none"}),r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-crop-frame",{position:"absolute",boxSizing:"border-box",pointerEvents:"auto",cursor:"move"});s.dataset.pptxCropFrame="true";let a=d=>{d.button===0&&n.onPanPointerDown(d);};r.addEventListener("pointerdown",a),s.addEventListener("pointerdown",a),o.append(r,s);let l=new Map,p=d=>{let u=l.get(d);if(u)return u;let c=chunk6TALMZ42_cjs.w(e,"div","pptxv-crop-handle",{position:"absolute",pointerEvents:"auto",touchAction:"none"});c.dataset.pptxCropHandle=d,c.setAttribute("role","button"),c.setAttribute("aria-label",t);let x=e.createElementNS(zP,"svg");x.setAttribute("aria-hidden","true"),Object.assign(x.style,{position:"absolute",inset:"0",overflow:"visible"});let b=e.createElementNS(zP,"path");b.setAttribute("fill","#000000"),b.setAttribute("stroke","#ffffff"),x.appendChild(b),c.appendChild(x),c.addEventListener("pointerdown",v=>{v.button===0&&n.onHandlePointerDown(d,v);}),o.appendChild(c);let g={node:c,path:b,svg:x};return l.set(d,g),g};return {root:o,update(d,u,c){let x=chunkWKWWFY2C_cjs.Ms(d,u);o.style.left=`${d.x}px`,o.style.top=`${d.y}px`,o.style.width=`${d.width}px`,o.style.height=`${d.height}px`,o.style.transform=d.rotation?`rotate(${d.rotation}deg)`:"",Nl(r,x.ghost),r.style.clipPath=x.ghost.clipPath,r.style.opacity=String(x.ghost.opacity),i.style.transform=x.ghost.transform,c&&i.getAttribute("src")!==c&&(i.src=c),Nl(s,x.frame);let b=u>0?1/u:1;s.style.outline=`${b}px solid rgba(0, 0, 0, 0.6)`;for(let g of x.handles){let v=p(g.id);Nl(v.node,g),v.node.style.cursor=g.cursor,v.svg.setAttribute("width",String(g.width)),v.svg.setAttribute("height",String(g.height)),v.path.setAttribute("d",g.path),v.path.setAttribute("stroke-width",String(b));}},mount(d){if(!d){o.remove();return}(o.parentElement!==d||d.lastElementChild!==o)&&d.appendChild(o);},unmount(){o.remove();}}}var DM="[data-pptx-crop-controls]";function RM(e){return e instanceof HTMLElement&&(e.isContentEditable||["INPUT","TEXTAREA","SELECT"].includes(e.tagName))}function NP(e){let{doc:t,store:n,actions:o}=e,r=null,i=null,s=null,a=b=>b.cropSession?J(b,b.cropSession.elementId):void 0,l=(b,g)=>{let v=a(n.get());if(!v)return;b.preventDefault(),b.stopPropagation(),s?.stop();let f=chunkWKWWFY2C_cjs.Ds(v),y=e.getScale()>0?e.getScale():1,S=b.clientX,h=b.clientY;n.set({interactionActive:true});let C=T=>{let k=chunkWKWWFY2C_cjs.Gs((T.clientX-S)/y,(T.clientY-h)/y,f.rotation);o.previewCrop(g(f,k.dx,k.dy));},w=()=>{t.removeEventListener("pointermove",C),t.removeEventListener("pointerup",w),t.removeEventListener("pointercancel",w),s=null,n.set({interactionActive:false});};t.addEventListener("pointermove",C),t.addEventListener("pointerup",w),t.addEventListener("pointercancel",w),s={stop:w};},p=()=>(r??=BP(t,e.getTranslator()(chunkWKWWFY2C_cjs.Ws),{onHandlePointerDown:(b,g)=>l(g,(v,f,y)=>chunkWKWWFY2C_cjs.Es(v,b,f,y)),onPanPointerDown:b=>l(b,chunkWKWWFY2C_cjs.Fs)}),r),d=b=>{if(!n.get().cropSession||RM(b.target)||i&&b.target instanceof Node&&b.target!==t.body&&!i.contains(b.target))return;let g=chunkWKWWFY2C_cjs.Rs(b.key);g&&(b.preventDefault(),b.stopImmediatePropagation(),g==="commit"?o.commitCropMode():o.cancelCropMode());},u=b=>{if(!n.get().cropSession||s)return;let g=b.target instanceof Element?b.target:null;g&&(r?.root.contains(g)||g.closest(DM))||o.commitCropMode();},c=n.subscribe((b,g)=>{let v=b.cropSession;if(!v)return;let f=b.selectedElementIds.length===1&&b.selectedElementIds[0]===v.elementId;(b.currentSlide!==g.currentSlide||!f||!b.editable||b.presenting)&&o.commitCropMode();}),x=()=>{s?.stop(),r?.unmount(),t.removeEventListener("keydown",d,true),t.removeEventListener("pointerdown",u),i=null;};return {attach(b){x(),i=b,t.addEventListener("keydown",d,true),t.addEventListener("pointerdown",u);},sync(){let b=n.get(),g=b.editable&&!b.presenting?a(b):void 0;if(!g){r?.unmount();return}let v=p();v.update(g,e.getScale(),chunkWKWWFY2C_cjs._e(g,new Map(b.mediaDataUrls))),v.mount(e.getStageWrap()?.querySelector(".pptxv-stage")??null);},isDragging:()=>s!==null,detach:x,destroy(){x(),c(),r=null;}}}function _P(e){if(e.length===0)return null;if(e.length>1){let n=chunkWKWWFY2C_cjs.Te(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 GP(e,t,n,o){let r=o||1;return {x:(e-n.left)/r,y:(t-n.top)/r}}function _l(e){let t=null,n=a=>{let{x:l,y:p}=GP(a.clientX,a.clientY,e.getStageOrigin(),e.getScale());return chunkWKWWFY2C_cjs.ym(l,p,a)};function o(){window.removeEventListener("pointermove",r),window.removeEventListener("pointerup",i),window.removeEventListener("pointercancel",s);}function r(a){!t||a.pointerId!==t.pointerId||(t.points.push(n(a)),e.onStrokePreview?.(t.points));}function i(a){if(!t||a.pointerId!==t.pointerId)return;t.points.push(n(a));let l=t;o(),t=null,e.onStrokePreview?.(null),e.onCommitStroke({points:l.points,color:e.getColor(),width:e.getWidth(),tool:l.tool});}function s(a){!t||a.pointerId!==t.pointerId||(o(),t=null,e.onStrokePreview?.(null));}return {onStagePointerDown(a){if(a.button!==0)return;let l=e.getTool();if(l!=="select"){if(l==="eraser"){let p=chunkWKWWFY2C_cjs.tm(a.target,e.getStageRoot());p&&(a.preventDefault(),a.stopPropagation(),e.onEraseAt(p));return}a.preventDefault(),a.stopPropagation(),t={tool:l,pointerId:a.pointerId,points:[n(a)]},e.onStrokePreview?.(t.points),window.addEventListener("pointermove",r),window.addEventListener("pointerup",i),window.addEventListener("pointercancel",s);}},isActive:()=>t!==null,dispose(){let a=t!==null;o(),t=null,a&&e.onStrokePreview?.(null);}}}function Gl(e){let t=chunk6TALMZ42_cjs.x(e,"svg",{"aria-hidden":"true","data-pptx-ink-live-preview":"true"});return t.style.position="absolute",t.style.left="0",t.style.top="0",t.style.pointerEvents="none",t.style.zIndex="46",{root:t,mount(n){if(!n){t.remove();return}t.parentElement!==n&&n.appendChild(t);},update(n,o){if(!n){t.replaceChildren();return}let r=Math.max(o.width,1),i=Math.max(o.height,1);t.setAttribute("width",String(r)),t.setAttribute("height",String(i)),t.setAttribute("viewBox",`0 0 ${r} ${i}`),t.replaceChildren(chunk6TALMZ42_cjs.G(e,n,void 0));},destroy(){t.remove();}}}function Ul(e){let{store:t,editActions:n,interactions:o}=e,r=Gl(e.doc),i=l=>l==="highlighter"?"highlighter":l==="freeform"?"freeform":"pen",s=_l({getScale:e.getScale,getStageOrigin:e.getStageOrigin,getStageRoot:e.getStageRoot,getTool:()=>t.get().drawTool,getColor:()=>t.get().drawColor,getWidth:()=>t.get().drawWidth,onCommitStroke:l=>n.commitStroke(l),onEraseAt:l=>n.eraseInkElement(l),onStrokePreview:l=>{if(!l){r.update(null,t.get().canvasSize);return}r.mount(e.getStageRoot());let p=chunkWKWWFY2C_cjs.Am({points:[...l],color:t.get().drawColor,width:t.get().drawWidth,tool:i(t.get().drawTool)});r.update(p,t.get().canvasSize);}}),a=l=>l.editable&&!l.presenting&&l.drawTool!=="select";return {isActive:()=>s.isActive(),onStagePointerDown(l){if(a(t.get())){s.onStagePointerDown(l);return}o.onStagePointerDown(l);},onStageDblClick(l){a(t.get())||o.onStageDblClick(l);},syncCursor(l){if(!l)return;let p=t.get();l.dataset.drawTool=a(p)?p.drawTool:"select";},setTool(l){let p=t.get();p.drawTool!==l&&(l!=="select"&&o.closeInline(true),t.set({drawTool:l,selectedElementId:l==="select"?p.selectedElementId:null}));},setColor:l=>t.set({drawColor:l}),setWidth:l=>t.set({drawWidth:Math.max(1,Math.round(l))}),dispose:()=>{s.dispose(),r.destroy();}}}function OM(e,t,n){return e.map((o,r)=>r===t?{...o,comments:n(o.comments??[])}:o)}function HM(e,t){let n=e.at(-1);return n?e.map(o=>o.id===n.id?{...o,mentions:t}:o):e}function FM(e,t,n){return e.map(o=>{if(o.id!==t)return o;let r=o.replies?.at(-1);return r?{...o,replies:o.replies?.map(i=>i.id===r.id?{...i,mentions:n}:i)}:o})}function UP(e){let t=()=>e.getUserName?.()||"You",n=o=>{let r=e.store.get();if(!r.editable||!r.slides[r.currentSlide])return null;let i=o(r.slides[r.currentSlide].comments??[]);return i?(e.ops.pushHistory(),e.store.set({slides:OM(r.slides,r.currentSlide,()=>i)}),e.ops.commitChange(),i):null};return {addComment(o,r,i){let s=n(a=>{let l=chunkWKWWFY2C_cjs.Tm(a,o,t(),void 0,void 0,r);return l&&i?.length?HM(l,i):l});return s?s[s.length-1]?.id??null:null},addCommentReply(o,r,i){let s=n(l=>{let p=chunkWKWWFY2C_cjs.Wm(l,o,r,t());return p&&i?.length?FM(p,o,i):p});return s?s.find(l=>l.id===o)?.replies?.at(-1)?.id??null:null},editComment(o,r){n(i=>chunkWKWWFY2C_cjs.Vm(i,o,r));},deleteComment(o){n(r=>chunkWKWWFY2C_cjs.Um(r,o));},toggleCommentResolved(o){n(r=>chunkWKWWFY2C_cjs.Xm(r,o));}}}function KP(e,t){let n=U(e).find(o=>o.id===t);if(n)return n;for(let o of e.slides){let r=o.elements.find(i=>i.id===t);if(r)return r}}var WP=(e,t)=>({...e,...t});function po(e,t,n){let o=U(e);return o.some(r=>r.id===t)?X(e,o.map(r=>r.id===t?WP(r,n):r)):{slides:e.slides.map(r=>r.elements.some(i=>i.id===t)?{...r,elements:r.elements.map(i=>i.id===t?WP(i,n):i)}:r)}}var VM=e=>({...chunkWKWWFY2C_cjs.Cs(e),...chunkWKWWFY2C_cjs.Bs(e)});function $P(e,t){let n=typeof CSS<"u"&&CSS.escape?CSS.escape(t):t,o=e.querySelector(`[data-element-id="${n}"] img`);return o&&o.naturalWidth>0&&o.naturalHeight>0?{width:o.naturalWidth,height:o.naturalHeight}:void 0}function qP(e){let{doc:t,store:n,ops:o}=e,r=p=>{if(!p.editable||p.selectedElementIds.length!==1)return;let d=o.selectedElement(p);return chunkWKWWFY2C_cjs.Ns(d)?d:void 0},i=p=>{let d=n.get(),u=d.cropSession,c=u?KP(d,u.elementId):r(d);if(!c)return;let x=p(c);if(u){n.set(po(d,c.id,x));return}o.pushHistory(),n.set(po(d,c.id,x)),o.commitChange();},s=()=>{let p=n.get();if(p.cropSession)return;let d=chunkWKWWFY2C_cjs.Os(r(p));d&&n.set({cropSession:d});},a=()=>{let p=n.get(),d=p.cropSession;if(!d)return;let u=KP(p,d.elementId);if(!u||!chunkWKWWFY2C_cjs.Qs(d,u)){n.set({cropSession:null});return}let c=VM(u);n.set({...po(p,d.elementId,chunkWKWWFY2C_cjs.Ps(d)),cropSession:null}),o.pushHistory(),n.set(po(n.get(),d.elementId,c)),o.commitChange();};return {toggleCropMode(){n.get().cropSession?a():s();},enterCropMode:s,commitCropMode:a,cancelCropMode:()=>{let p=n.get(),d=p.cropSession;d&&n.set({...po(p,d.elementId,chunkWKWWFY2C_cjs.Ps(d)),cropSession:null,interactionActive:false});},previewCrop(p){let d=n.get();d.cropSession&&n.set(po(d,d.cropSession.elementId,p));},cropToAspect:(p,d)=>i(u=>chunkWKWWFY2C_cjs.Js(u,p,d)),cropFill:()=>i(p=>chunkWKWWFY2C_cjs.Ks(p,$P(t,p.id))),cropFit:()=>i(p=>chunkWKWWFY2C_cjs.Ls(p,$P(t,p.id)))}}function jP(e){let{store:t,ops:n,deck:o}=e;return {applyRibbonGalleryResult(r){let i=t.get();if(i.editable){if(r.kind==="element"){let s=U(i);if(!s.some(a=>a.id===r.elementId))return;n.pushHistory(),t.set(X(i,s.map(a=>a.id===r.elementId?{...a,...r.patch}:a))),n.commitChange();return}if(r.kind==="themeColorScheme"){o.applyThemeEdit({colorScheme:r.colorScheme,fontScheme:i.fontScheme??{},name:r.name});return}i.colorScheme&&o.applyThemeEdit({colorScheme:i.colorScheme,fontScheme:r.fontScheme,name:r.name});}}}}function Kl(e){let{store:t,ops:n}=e;return {commitStroke(o){let r=t.get();if(!r.editable||!r.slides[r.currentSlide])return;let i=chunkWKWWFY2C_cjs.zm(o);i&&(n.pushHistory(),t.set({slides:chunkWKWWFY2C_cjs.Ar(r.slides,r.currentSlide,i),selectedElementId:i.id}),n.commitChange());},eraseInkElement(o){let r=t.get();if(!r.editable)return false;let i=chunkWKWWFY2C_cjs.xr(r.slides,r.currentSlide,o);if(!i||i.type!=="ink"&&i.type!=="contentPart")return false;n.pushHistory();let s=r.selectedElementId===o?null:r.selectedElementId;return t.set({slides:chunkWKWWFY2C_cjs.yr(r.slides,r.currentSlide,o),selectedElementId:s}),n.commitChange(),true}}}var zM={width:320,height:80},BM={width:600,height:250},NM={width:200,height:150},YP={width:240,height:0};function Ne(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 Wl(e,t,n="rect"){let o,r;switch(e){case "text":o=chunkWKWWFY2C_cjs.h("Text",{fontSize:18,color:"#000000"}),r=zM;break;case "table":o={...chunkWKWWFY2C_cjs.ef(3,3),id:chunkWKWWFY2C_cjs.n("table")},r=BM;break;case "shape":n==="connector"?(o=chunkWKWWFY2C_cjs.j({type:"straight",stroke:{color:"#000000",width:2}}),r=YP):(o=chunkWKWWFY2C_cjs.i(n),r=n==="line"?YP:NM);break}return o.width=r.width,o.height=r.height,Ne(o,t),o}function _M(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),s=Math.max(1,Math.round(i/(r||1)));n({width:i,height:s});},o.onerror=()=>n({width:t,height:Math.round(t*.6)}),o.src=e;})}function si(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 s=new FileReader;s.onload=async()=>{let a=typeof s.result=="string"?s.result:"";if(!a){n(null);return}let l=Math.round(t.width*.6),{width:p,height:d}=await _M(a,l),u={id:chunkWKWWFY2C_cjs.n("image"),type:"image",name:"Image",x:0,y:0,width:p,height:d,imageData:a};Ne(u,t),n(u);},s.onerror=()=>n(null),s.readAsDataURL(i);}),o.click();})}var GM={width:420,height:64},Ft={width:640,height:360};function UM(e,t){return new Promise(n=>{let o=e.createElement("video");o.preload="metadata",o.onloadedmetadata=()=>{let r=o.videoWidth||Ft.width,i=o.videoHeight||Ft.height;if(r>Ft.width||i>Ft.height){let s=Math.min(Ft.width/r,Ft.height/i);n({width:Math.round(r*s),height:Math.round(i*s)});return}n({width:r,height:i});},o.onerror=()=>n(Ft),o.src=t;})}function $l(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 s=chunkWKWWFY2C_cjs.Un(i.type);if(!s){n(null);return}let a=new FileReader;a.onload=async()=>{let l=typeof a.result=="string"?a.result:"";if(!l){n(null);return}let p=s==="audio"?GM:await UM(e,l),d={id:chunkWKWWFY2C_cjs.n("media"),type:"media",mediaType:s,mediaMimeType:i.type||void 0,mediaData:l,x:0,y:0,width:p.width,height:p.height};Ne(d,t),n(d);},a.onerror=()=>n(null),a.readAsDataURL(i);}),o.click();})}var XP={width:400,height:80},QP={width:600,height:340},ZP={width:200,height:40};function ql(e,t){let n=chunkWKWWFY2C_cjs.jn(e);return Ne(n,t),n}function jl(e,t,n){let o={id:chunkWKWWFY2C_cjs.n("smartart"),type:"smartArt",x:0,y:0,width:QP.width,height:QP.height,smartArtData:chunkWKWWFY2C_cjs.Ql(e,t,r=>chunkWKWWFY2C_cjs.n(`smartart-node-${r}`))};return Ne(o,n),o}function Yl(e,t){let n="[Equation]",o={id:chunkWKWWFY2C_cjs.n("equation"),type:"shape",x:0,y:0,width:XP.width,height:XP.height,text:n,textStyle:{fontSize:18,fontFamily:"Cambria Math"},textSegments:[{text:n,style:{fontSize:18,fontFamily:"Cambria Math"},equationXml:e}]};return Ne(o,t),o}function Xl(e,t){let n=chunkWKWWFY2C_cjs.Ml(e,chunkWKWWFY2C_cjs.n("actionbutton"));return n?(Ne(n,t),n):null}function Ql(e,t){return chunkWKWWFY2C_cjs.df(e,e,{slideNumber:t.slideNumber,headerText:"Header",footerText:"Footer"})}function Zl(e,t,n){let o=`{${crypto.randomUUID().toUpperCase()}}`,r={id:chunkWKWWFY2C_cjs.n("field"),type:"shape",x:0,y:0,width:ZP.width,height:ZP.height,text:t,textStyle:{fontSize:14},textSegments:[{text:t,style:{fontSize:14},fieldType:e,fieldGuid:o}]};return Ne(r,n),r}function JP(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((s,a)=>o.has(`${i}:${a}`)?{...s,style:{...s.style,...n}}:s)}))}}function eA(e,t,n){switch(n){case "insertRowAbove":return chunkWKWWFY2C_cjs.fe(e,t.row,"above");case "insertRowBelow":return chunkWKWWFY2C_cjs.fe(e,t.row,"below");case "deleteRow":return chunkWKWWFY2C_cjs.ge(e,t.row);case "insertColumnLeft":return chunkWKWWFY2C_cjs.he(e,t.column,"left");case "insertColumnRight":return chunkWKWWFY2C_cjs.he(e,t.column,"right");case "deleteColumn":return chunkWKWWFY2C_cjs.ie(e,t.column)}}function tA(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:chunkWKWWFY2C_cjs.ve(e.columnWidths,t,o)}}function oA(e,t,n){return {...e,rows:e.rows.map((o,r)=>r===t?{...o,height:Math.max(1,n)}:o)}}function nA(e,t){let n=t.map(({row:o,column:r})=>({row:o,col:r}));return chunkWKWWFY2C_cjs.$d(n,e)?chunkWKWWFY2C_cjs.ae(n,e):e}function rA(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=chunkWKWWFY2C_cjs.ne(e,t.row,t.column);return i?{...e,rows:i.map((s,a)=>({...s,cells:s.cells.map((l,p)=>a>=t.row&&a<t.row+o&&p>=t.column&&p<t.column+r?{...l,hMerge:void 0,vMerge:void 0}:l)}))}:e}var KM={left:"cropLeft",top:"cropTop",right:"cropRight",bottom:"cropBottom"};function Jl(e){return {toggleElementLock:()=>e(t=>({locks:chunkWKWWFY2C_cjs.Oe(!chunkWKWWFY2C_cjs.Ne(t))})),setTextVerticalAlign:t=>e(n=>chunkWKWWFY2C_cjs.zg(n,t)),setTextWrap:t=>e(n=>chunkWKWWFY2C_cjs.Cg(n,t)),setAutoFitMode:t=>e(n=>chunkWKWWFY2C_cjs.Dg(n,t)),setTextAdvanced:t=>e(n=>chunkWKWWFY2C_cjs.yg(n,t)),setTextStyle:(t,n)=>e(o=>{if(!("textStyle"in o))return {};if(n&&o.textSegments?.length){let r=io(),i=r!==void 0?chunkWKWWFY2C_cjs.ah(r,o.textSegments,o.textStyle):o.textSegments;return {textSegments:chunkWKWWFY2C_cjs._f(i,n,t).newSegments,...r!==void 0?{text:r}:{}}}return {textStyle:{...o.textStyle,...t}}}),setFillOpacity:t=>e(n=>lt(n,{fillOpacity:t})),setStrokeOpacity:t=>e(n=>lt(n,{strokeOpacity:t})),setGradientFill:t=>e(n=>chunkWKWWFY2C_cjs.Hm(n,t)),addGradientStop:(t,n)=>e(o=>chunkWKWWFY2C_cjs.Im(o,t,n)),removeGradientStop:t=>e(n=>chunkWKWWFY2C_cjs.Jm(n,t)??{}),updateGradientStop:(t,n)=>e(o=>chunkWKWWFY2C_cjs.Km(o,t,n)),setImageBrightness:t=>e(n=>chunkWKWWFY2C_cjs.Nm(n,{brightness:t})),setImageContrast:t=>e(n=>chunkWKWWFY2C_cjs.Nm(n,{contrast:t})),setImageSaturation:t=>e(n=>chunkWKWWFY2C_cjs.Nm(n,{saturation:t})),setImageCrop:(t,n)=>e(o=>chunkWKWWFY2C_cjs.Pm(o,{[KM[t]]:n})),setImageEffects:t=>e(n=>chunkWKWWFY2C_cjs.d(n)?{imageEffects:{...n.imageEffects,...t}}:{}),setElementAction:(t,n)=>e(()=>({[t==="click"?"actionClick":"actionHover"]:chunkWKWWFY2C_cjs.s(n)})),setAltText:t=>e(()=>({altText:t})),setTitle:t=>e(()=>({title:t})),setOleName:t=>e(n=>n.type==="ole"?chunkWKWWFY2C_cjs.Gf(t):{}),setOleContent:t=>e(n=>n.type==="ole"?t:{}),setChartData:t=>e(n=>n.type==="chart"?{chartData:t}:{}),setMediaProperties:t=>e(n=>n.type==="media"?t:{}),setTableHeaderRow:t=>e(n=>chunkWKWWFY2C_cjs.Rm(n,{firstRowHeader:t})),setTableBandedRows:t=>e(n=>chunkWKWWFY2C_cjs.Rm(n,{bandedRows:t})),setTableCellPadding:t=>e(n=>chunkWKWWFY2C_cjs.Sm(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,s)=>s===t?{...i,cells:i.cells.map((a,l)=>l===n?{...a,style:{...a.style,...o}}:a)}:i)}}),setTableCellStyles:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:JP(o.tableData,t,n)}:{}),mutateTableStructure:(t,n)=>e(o=>{if(o.type!=="table"||!o.tableData)return {};let r=eA(o,t,n);return r===o?{}:{tableData:r.tableData,rawXml:r.rawXml}}),setTableColumnWidth:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:tA(o.tableData,t,n)}:{}),setTableRowHeight:(t,n)=>e(o=>o.type==="table"&&o.tableData?{tableData:oA(o.tableData,t,n)}:{}),mergeTableCells:t=>e(n=>n.type==="table"&&n.tableData?{tableData:nA(n.tableData,t)}:{}),splitTableCell:t=>e(n=>n.type==="table"&&n.tableData?{tableData:rA(n.tableData,t)}:{}),setSmartArtNodeText:(t,n)=>e(o=>co(o,r=>chunkWKWWFY2C_cjs.E(r,t,n))),setSmartArtNodeStyle:(t,n)=>e(o=>co(o,r=>chunkWKWWFY2C_cjs.I(r,t,n))),mutateSmartArtNode:(t,n)=>e(o=>co(o,r=>n==="add"?chunkWKWWFY2C_cjs.C(r,"New item"):n==="addChild"?chunkWKWWFY2C_cjs.H(r,t,"New item"):n==="remove"?chunkWKWWFY2C_cjs.D(r,t):n==="promote"?chunkWKWWFY2C_cjs.F(r,t):chunkWKWWFY2C_cjs.G(r,t))),replaceSmartArtData:t=>e(n=>co(n,()=>t)),setSmartArtLayout:t=>e(n=>co(n,o=>chunkWKWWFY2C_cjs.M(o,t))),setSmartArtColorScheme:t=>e(n=>co(n,o=>({...o,colorScheme:t})))}}function co(e,t){if(e.type!=="smartArt"||!e.smartArtData)return {};let n=t(e.smartArtData),o={width:e.width,height:e.height};return {smartArtData:chunkWKWWFY2C_cjs.kn(n,e.id,o)}}function ep(e){return {slides:e.slides,width:e.canvasSize.width,height:e.canvasSize.height,widthEmu:e.slideSize?.widthEmu,heightEmu:e.slideSize?.heightEmu,slideSizeType:e.slideSize?.type,slideMasters:e.slideMasters,presentationProperties:e.presentationProperties,customShows:e.customShows,sections:e.sections}}function tp(e){return e.masterViewTarget?{tab:e.masterViewTab,...e.masterViewTarget}:null}function WM(e,t){let n=e[t.masterIndex];return t.layoutIndex===null?n?.name??"":n?.layouts?.[t.layoutIndex]?.name??""}async function $M(e,t){let n=[];for(let s of t){n.push({id:s.path,rId:"",slideNumber:0,elements:s.elements??[]});for(let a of s.layouts??[])n.push({id:a.path,rId:"",slideNumber:0,elements:a.elements??[]});}let{paths:o,refs:r}=chunkWKWWFY2C_cjs.st(n);if(o.size===0)return [...t];let i=new Map;return await Promise.all(Array.from(o).map(async s=>{try{let a=await e.getImageData(s);a&&i.set(s,a);}catch{}})),t.map(s=>({...s,elements:chunkWKWWFY2C_cjs.pt(s.elements??[],i,r),layouts:s.layouts?.map(a=>({...a,elements:chunkWKWWFY2C_cjs.pt(a.elements??[],i,r)}))}))}function iA(e){let{doc:t,store:n,ops:o}=e;return {async runMasterViewCrudAction(r){let i=e.getTranslator(),s=n.get(),a=tp(s),l=e.getHandler();if(!a||!l||!s.editable)return;let p=ep(s);if(!chunkWKWWFY2C_cjs.Xo(p,a).find(b=>b.id===r)?.enabled)return;let u;if(r==="renameLayout"||r==="renameMaster"){let b=t.defaultView?.prompt(i("pptx.masterView.renamePrompt"),WM(s.slideMasters,a));if(!b)return;u=b;}let c=await chunkWKWWFY2C_cjs.Yo(l,p,r,a,{name:u});if(!c.ok){t.defaultView?.alert(i(chunkWKWWFY2C_cjs.Wo(r,c.reason)));return}o.pushHistory(),e.setHandler(c.handler);let x=await $M(c.handler,c.data.slideMasters??[]);n.set({slideMasters:x,masterViewTarget:{masterIndex:c.target.masterIndex,layoutIndex:c.target.layoutIndex},selectedElementId:null,selectedElementIds:[]}),o.commitChange();}}}function qM(e){let t=new Map(U(e).map(n=>[n.id,n]));return e.selectedElementIds.map(n=>t.get(n)).filter(n=>n!==void 0)}function aA(e){let{store:t,ops:n}=e;return {mergeShapes(o){let r=t.get();if(!r.editable)return;let i=chunkWKWWFY2C_cjs.yl(o,qM(r));if(!i)return;let s=i.created.map(a=>a.id);n.pushHistory(),t.set({...X(r,chunkWKWWFY2C_cjs.zl(U(r),i)),selectedElementId:s.at(-1)??null,selectedElementIds:s}),n.commitChange();}}}function op(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(),s=o.trim();if(!i.editable||!s||!i.slides[r])return null;let a=chunkWKWWFY2C_cjs.lf(i.sections,i.slides,s,r),l=a.sections.find(p=>!i.sections.some(d=>d.id===p.id));return n(a.sections,a.slides),l?.id??null},renameSection(o,r){let i=e.get(),s=r.trim(),a=i.sections.find(p=>p.id===o);if(!i.editable||!a||!s||a.name===s)return;let l=chunkWKWWFY2C_cjs.mf(i.sections,i.slides,o,s);n(l.sections,l.slides);},deleteSection(o){let r=e.get();if(!r.editable||!r.sections.some(s=>s.id===o))return;let i=chunkWKWWFY2C_cjs.nf(r.sections,r.slides,o);n(i.sections,i.slides);},moveSection(o,r){let i=e.get(),s=r==="up"?chunkWKWWFY2C_cjs.of(i.sections,o):chunkWKWWFY2C_cjs.pf(i.sections,o);!i.editable||s===i.sections||n(s,i.slides);},moveSlidesToSection(o,r){let i=e.get();if(!i.editable||o.length===0)return;let s=chunkWKWWFY2C_cjs.qf(i.sections,i.slides,o,r);s.sections!==i.sections&&n(s.sections,s.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 Wo(e){return e.map((t,n)=>({...t,slideNumber:n+1}))}function np(e){let{store:t,ops:n}=e;function o(r,i,s){let a=e.getHandler();a&&a.applyLayoutToSlide(r,i,[...t.get().slides]).then(async l=>{let p=await a.getTemplateElementsForSlide(l.id),d=t.get();if(d.slides[r]?.id===s){n.pushHistory();let u=[...d.slides];u[r]=l,t.set({slides:u,templateElementsBySlideId:{...d.templateElementsBySlideId,[l.id]:p}}),n.commitChange();}},()=>{}).catch(()=>{});}return {addSlide(){let r=t.get();if(!r.editable)return;n.pushHistory();let i=r.currentSlide+1,s=chunkWKWWFY2C_cjs.sf(i+1),a=Wo([...r.slides.slice(0,i),s,...r.slides.slice(i)]);t.set({slides:a,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 s=r.currentSlide+1,a={...chunkWKWWFY2C_cjs.l(i),id:chunkWKWWFY2C_cjs.rf()},l=r.templateElementsBySlideId[i.id]??[],p=Wo([...r.slides.slice(0,s),a,...r.slides.slice(s)]);t.set({slides:p,templateElementsBySlideId:{...r.templateElementsBySlideId,[a.id]:l.map(chunkWKWWFY2C_cjs.k)},currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},deleteSlide(){let r=t.get();if(!r.editable||r.slides.length<=1)return;n.pushHistory();let i=Wo(r.slides.filter((l,p)=>p!==r.currentSlide)),s=Math.min(r.currentSlide,i.length-1),a={...r.templateElementsBySlideId};delete a[r.slides[r.currentSlide].id],t.set({slides:i,templateElementsBySlideId:a,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},insertSlideFromLayout(r,i){let s=t.get();if(!s.editable||!r)return;n.pushHistory();let a=s.currentSlide+1,l={...chunkWKWWFY2C_cjs.sf(a+1),layoutPath:r,...i?{layoutName:i}:{}},p=Wo([...s.slides.slice(0,a),l,...s.slides.slice(a)]);t.set({slides:p,currentSlide:a,selectedElementId:null,selectedElementIds:[]}),n.commitChange(),o(a,r,l.id);},insertSlideFromTemplate(r){let i=t.get();if(!i.editable)return;n.pushHistory();let s=i.currentSlide+1,a=chunkWKWWFY2C_cjs.wf(r,chunkWKWWFY2C_cjs.rf(),s+1,{slideWidth:i.canvasSize.width,slideHeight:i.canvasSize.height,scheme:chunkWKWWFY2C_cjs.tf(i.colorScheme)}),l=Wo([...i.slides.slice(0,s),a,...i.slides.slice(s)]);t.set({slides:l,currentSlide:s,selectedElementId:null,selectedElementIds:[]}),n.commitChange();},getTemplateScheme(){return chunkWKWWFY2C_cjs.tf(t.get().colorScheme)},applyLayout(r){let i=t.get(),s=i.slides[i.currentSlide];!i.editable||!s||!r||o(i.currentSlide,r,s.id);},resetSlide(){let r=t.get(),i=r.slides[r.currentSlide],s=chunkWKWWFY2C_cjs.ti(i);!r.editable||!i||!s||o(r.currentSlide,s,i.id);}}}var jM=24;function $o(e,t){if(!Le(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 li(e,t,n){if(!Le(e))return {};let o=n?.text??io(),r=o===void 0?e:{...e,text:o,textSegments:n?.textSegments??chunkWKWWFY2C_cjs.ah(o,e.textSegments,e.textStyle)},i=chunkWKWWFY2C_cjs.Yf(r.textSegments,{preserveCaret:true});return i.kind!=="supported"||i.snapshot&&i.snapshot.elementId!==e.id?{}:{...o===void 0?{}:{text:o},...chunkWKWWFY2C_cjs.$f(r,t,i.selection,i.snapshot?.textSegments).patch}}function pi(e,t){let n=st(e).paragraphMarginLeft,o=Math.max(0,n+t*jM);return $o(e,{paragraphMarginLeft:o})}function rp(e,t){return $o(e,{align:t})}function ip(e,t){return $o(e,{lineSpacing:t})}function sA(e,t){return $o(e,{textDirection:t})}function lA(e,t){return $o(e,{columnCount:Math.max(1,Math.round(t))})}function ap(e,t){return {toggleBold:()=>t(n=>ao(n,"bold")),toggleItalic:()=>t(n=>ao(n,"italic")),toggleUnderline:()=>t(n=>ao(n,"underline")),toggleStrikethrough:()=>t(n=>ao(n,"strikethrough")),toggleTextShadow:()=>t(n=>Ns(n)),changeFontSize:n=>t(o=>Hs(o,n)),stepFontSize:n=>t(o=>QE(o,n)),setFontSize:n=>t(o=>Vo(o,n)),setFontFamily:n=>t(o=>zs(o,n)),setTextColor:(n,o)=>{dt(e,n),t(r=>Fs(r,n,o));},setHighlightColor:n=>{dt(e,n),t(o=>Vs(o,n));},setCharacterSpacing:n=>t(o=>Bs(o,n)),changeCase:n=>t((o,r)=>{if(!r)return _s(o,n);let{text:i,textSegments:s}=chunkWKWWFY2C_cjs.ps(r,null,n);return {text:i,textSegments:s}}),clearFormatting:()=>t(n=>Gs(n)),toggleBulletList:()=>t((n,o)=>li(n,"bullet",o)),toggleNumberedList:()=>t((n,o)=>li(n,"numbered",o)),increaseIndent:()=>t(n=>pi(n,1)),decreaseIndent:()=>t(n=>pi(n,-1)),setTextAlign:n=>t(o=>rp(o,n)),setLineSpacing:n=>t(o=>ip(o,n)),setTextDirection:n=>t(o=>sA(o,n)),setColumnCount:n=>t(o=>lA(o,n))}}function sp(e){let{store:t,ops:n}=e;return {applyTransition(o,r,i,s){let a=t.get(),l=a.slides[a.currentSlide];if(!a.editable||!l)return;let p=Math.max(0,Math.round(r));n.pushHistory();let d=s?{advanceOnClick:s.onClick,advanceAfterMs:s.afterMs}:{};if(i){let u={type:o,durationMs:p,...d};t.set({slides:chunkWKWWFY2C_cjs.Dr(a.slides,{transition:u})});}else {let u={...l.transition,type:o,durationMs:p,...d};t.set({slides:chunkWKWWFY2C_cjs.Cr(a.slides,a.currentSlide,{transition:u})});}n.commitChange();},applyTransitionDraft(o,r){let i=t.get(),s=i.slides[i.currentSlide];if(!i.editable||!s)return;let a=chunkWKWWFY2C_cjs.oi(s,o),l=new Set(chunkWKWWFY2C_cjs.pi(i.slides.length,i.currentSlide,r));n.pushHistory(),t.set({slides:i.slides.map((p,d)=>l.has(d)?{...p,transition:{...a}}:p)}),n.commitChange();},applyTransitionChange(o){let r=t.get(),i=r.slides[r.currentSlide];if(!r.editable||!i)return;n.pushHistory();let s=chunkWKWWFY2C_cjs.ai(i.transition,o);t.set({slides:chunkWKWWFY2C_cjs.Cr(r.slides,r.currentSlide,{transition:s})}),n.commitChange();}}}var YM=new Set(["showGuides","snapToGrid","snapToShape"]);function lp(e){return YM.has(e)}function pA(e){return {autoSave:true,spellCheck:false,reducedMotion:false,showGrid:e.showGrid,showRulers:e.showRulers,snapToGrid:e.snapToGrid,snapToObjects:e.snapToShape,showGuides:e.showGuides}}function pp(e,t){let n=chunkWKWWFY2C_cjs.lp({viewProperties:t},pA(e));return {snapToGrid:n.snapToGrid,snapToShape:n.snapToObjects??e.snapToShape,showGuides:n.showGuides??e.showGuides}}function dp(e,t,n){let o=pA({...e,[t]:n}),r=chunkWKWWFY2C_cjs.mp(o);return {...e.viewProperties,slideViewPr:{...e.viewProperties?.slideViewPr,...r.slideViewPr},...r.gridSpacing?{gridSpacing:r.gridSpacing}:{}}}function cp(e){let{doc:t,store:n,ops:o}=e,r=Il(n,o),i=Bl({store:n,ops:o,getHandler:e.getHandler}),s=a=>{if(!a)return;let l=n.get();!l.editable||!l.slides[l.currentSlide]||(o.pushHistory(),n.set({slides:chunkWKWWFY2C_cjs.Ar(l.slides,l.currentSlide,a),selectedElementId:a.id,selectedElementIds:[a.id]}),o.commitChange());};return {insertElement:s,...ap(n,r),...Fl({store:n,ops:o,applyToSelected:r}),...zl({store:n,ops:o}),...np({store:n,ops:o,getHandler:e.getHandler}),...Vl({store:n,ops:o}),...sp({store:n,ops:o}),...Ll({store:n,ops:o}),...Jl(r),...Kl({store:n,ops:o}),...i,...jP({store:n,ops:o,deck:i}),...aA({store:n,ops:o}),...qP({doc:t,store:n,ops:o}),sections:op(n,o),masterView:iA({doc:t,getTranslator:e.getTranslator,store:n,ops:o,getHandler:e.getHandler,setHandler:e.setHandler}),comments:UP({store:n,ops:o,getUserName:e.getUserName}),toggleFormatPainter(){let a=n.get();n.set({formatPainterSourceId:a.formatPainterSourceId?null:a.selectedElementId});},setShapeFill:(a,l)=>{dt(n,a),r(p=>lt(p,chunkWKWWFY2C_cjs.ui(a,l)));},setShapeStroke:(a,l)=>{dt(n,a),r(p=>lt(p,chunkWKWWFY2C_cjs.vi(a,l)));},setShapeStrokeWidth:a=>r(l=>lt(l,{strokeWidth:Math.max(0,a)})),setShapeStyle:a=>r(l=>lt(l,a)),setShapeType:a=>r(l=>l.type==="shape"?{shapeType:a}:{}),pushRecentColor:a=>dt(n,a),setGeometry(a){r(()=>{let l={};return a.x!==void 0&&Number.isFinite(a.x)&&(l.x=Math.round(a.x)),a.y!==void 0&&Number.isFinite(a.y)&&(l.y=Math.round(a.y)),a.width!==void 0&&Number.isFinite(a.width)&&(l.width=Math.max(chunkWKWWFY2C_cjs.q,Math.round(a.width))),a.height!==void 0&&Number.isFinite(a.height)&&(l.height=Math.max(chunkWKWWFY2C_cjs.q,Math.round(a.height))),a.rotation!==void 0&&Number.isFinite(a.rotation)&&(l.rotation=a.rotation),l});},insert(a,l){let p=n.get();p.slides[p.currentSlide]&&s(Wl(a,p.canvasSize,l));},async insertImage(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await si(t,a.canvasSize));},async insertMedia(){let a=n.get();!a.editable||!a.slides[a.currentSlide]||s(await $l(t,a.canvasSize));},insertChart(a=chunkWKWWFY2C_cjs.in){let l=n.get();l.slides[l.currentSlide]&&s(ql(a,l.canvasSize));},insertSmartArt(a,l){let p=n.get();p.slides[p.currentSlide]&&s(jl(a,l,p.canvasSize));},insertEquation(a){let l=n.get();l.slides[l.currentSlide]&&s(Yl(a,l.canvasSize));},updateEquation:(a,l)=>o.updateEquation(a,l),insertActionButton(a){let l=n.get();l.slides[l.currentSlide]&&s(Xl(a,l.canvasSize));},insertField(a,l){let p=n.get();if(!p.slides[p.currentSlide])return;let d=l??Ql(a,{slideNumber:p.currentSlide+1});s(Zl(a,d,p.canvasSize));},duplicateSelected:()=>{o.duplicateSelected();},deleteSelected:()=>o.deleteSelected(),selectAll(){let a=n.get(),l=U(a).filter(p=>chunkWKWWFY2C_cjs.Wn(p.id,a.editTemplateMode)).map(p=>p.id);l.length>0&&o.select(l.at(-1)??null,l);},toggleViewOption(a){let l=n.get(),p=!l[a];n.set(lp(a)?{[a]:p,viewProperties:dp(l,a,p)}:{[a]:p});for(let d of t.querySelectorAll(".pptxv"))d.classList.toggle(`pptxv-${a}`,p);},addGuide(a,l){let p=n.get(),d=chunkWKWWFY2C_cjs.Rl(`guide-${Date.now()}`,a,p.canvasSize);n.set({guides:[...p.guides,l===void 0?d:{...d,position:l}]});},activateEyedropper:()=>n.set({eyedropperActive:true}),toggleSpellCheck:()=>n.set({spellCheckEnabled:!n.get().spellCheckEnabled}),async replaceSelectedImage(){let a=await si(t,n.get().canvasSize);!a||a.type!=="image"||r(l=>l.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 mp(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?chunkWKWWFY2C_cjs.Zl(t.get().slides,r,{matchCase:i}).length:0},replaceCurrent(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let l=chunkWKWWFY2C_cjs.Zl(a.slides,r,{matchCase:s}),{slides:p,replacements:d}=chunkWKWWFY2C_cjs._l(a.slides,l,0,i);return o(p,d),d},replaceAll(r,i,s){let a=t.get();if(!a.editable||!r)return 0;let{slides:l,replacements:p}=chunkWKWWFY2C_cjs.$l(a.slides,r,i,{matchCase:s});return o(l,p),p}}}function dA(e,t,n){let o=()=>{let l=n.store.get(),p=n.getHandler(),d=l.slides[l.currentSlide];return !l.editable||l.loading||l.error||l.presenting||l.masterViewTarget||l.editTemplateMode||l.drawTool!=="select"||n.isEditing()||!d||!p?null:{documentId:p,slideId:d.id,canvasSize:l.canvasSize}},r=()=>chunkWKWWFY2C_cjs.Sn(e,{getCanvas:()=>t,getTarget:o,insertElement:n.insertElement}),i=o(),s=r(),a=n.store.subscribe(()=>{let l=o();(l?.documentId!==i?.documentId||l?.slideId!==i?.slideId||l?.canvasSize.width!==i?.canvasSize.width||l?.canvasSize.height!==i?.canvasSize.height)&&(s(),s=r()),i=l;});return ()=>{a(),s();}}function up(e){return t=>{if(!e.isActive())return;let{action:n,dx:o,dy:r}=chunkWKWWFY2C_cjs.Jq(t,{canPaste:e.canPaste?.(),hasSelection:e.getSelectedId()!==null,isTextInputTarget:chunkWKWWFY2C_cjs.ml(t.target),isControlTarget:chunkWKWWFY2C_cjs.nl(t.target)},e.getKeyboardCustomization?.());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;case "alignLeft":e.setTextAlign?.("left");break;case "alignCenter":e.setTextAlign?.("center");break;case "alignRight":e.setTextAlign?.("right");break;case "alignJustify":e.setTextAlign?.("justify");break;case "increaseFontSize":e.stepFontSize?.("increase");break;case "decreaseFontSize":e.stepFontSize?.("decrease");break;case "copyFormat":e.copyFormat?.();break;case "pasteFormat":e.pasteFormat?.();break;case "newSlide":e.addSlide?.();break;case "hyperlink":e.openHyperlink?.();break;case "findReplace":e.toggleFindReplace?.();break;case "clearFormatting":e.clearFormatting?.();break;case "cycleSelectionNext":e.cycleSelection?.("next");break;case "cycleSelectionPrev":e.cycleSelection?.("prev");break;case "pasteSpecial":e.onPasteSpecial?.();break;}}}var XM=e=>t=>J(e,t);function di(e,t){return chunkWKWWFY2C_cjs.Wn(t,e.editTemplateMode)&&chunkWKWWFY2C_cjs.Le(J(e,t),"select")}function qo(e,t,n){return chunkWKWWFY2C_cjs.Pe(t,XM(e),n)}function cA(e,t){let n=e.selectedElementIds.length>1&&e.selectedElementIds.includes(t)?e.selectedElementIds:[t];return qo(e,n,"move").length>0}var QM=chunkWKWWFY2C_cjs.Ke(void 0);function ZM(e,t){let n={...e};for(let o of Object.keys(n))n[o]&&=t[o];return n}function ci(e){return e.selectedElementIds.reduce((t,n)=>ZM(t,chunkWKWWFY2C_cjs.Ke(J(e,n))),QM)}function mA(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 uA(e,t){return {selectedElementId:e,selectedElementIds:t,selectedTableCell:null,selectedTableCells:[],selectedTextRange:null,chartPartSelection:null}}function xA(e){return {commitTableCell(t,n,o,r){let i=e.store.get(),s=J(i,t);if(s?.type!=="table"||!s.tableData?.rows[n]?.cells[o])return;let a=e.transformCommittedText?e.transformCommittedText(r):r;e.pushHistory();let l=s.tableData.rows.map((p,d)=>({...p,cells:p.cells.map((u,c)=>d===n&&c===o?chunkWKWWFY2C_cjs._d(u,a):u)}));e.store.set(X(i,U(i).map(p=>p.id===t&&p.type==="table"?{...p,tableData:{...p.tableData,rows:l}}:p))),e.commitChange();},updateEquation(t,n){let o=e.store.get(),r=J(o,t);!r||!chunkWKWWFY2C_cjs.e(r)||!r.textSegments?.some(i=>i.equationXml)||(e.pushHistory(),e.store.set(X(o,U(o).map(i=>i.id===t&&chunkWKWWFY2C_cjs.e(i)?{...i,textSegments:i.textSegments?.map(s=>{if(!s.equationXml)return s;let{equationSourceXml:a,...l}=s;return {...l,equationXml:n}})}:i))),e.commitChange());}}}var JM=100,eD=800;function xp(e){let{store:t}=e,n=new chunkWKWWFY2C_cjs.jf({maxDepth:JM}),o=0,r=(c=t.get())=>c.selectedElementId?J(c,c.selectedElementId):void 0,i=(c,x=c?[c]:[])=>t.set(uA(c,x)),s=()=>({slides:chunkWKWWFY2C_cjs.zr(t.get().slides),sections:structuredClone(t.get().sections),coreProperties:structuredClone(t.get().coreProperties),appProperties:structuredClone(t.get().appProperties),customProperties:structuredClone(t.get().customProperties),templateElementsBySlideId:chunkWKWWFY2C_cjs.m(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)}),a=(c="")=>{n.record(s(),c),o=0,e.onHistoryChange();},l=()=>{t.set({dirty:true}),e.onHistoryChange(),e.onChange?.();},p=(c,x)=>{let b=t.get(),g=U(b).map(v=>v.id===c?{...v,...x}:v);t.set(X(b,g));},d=c=>{c&&(t.set({slides:chunkWKWWFY2C_cjs.zr(c.slides),sections:structuredClone(c.sections),coreProperties:structuredClone(c.coreProperties),appProperties:structuredClone(c.appProperties),customProperties:structuredClone(c.customProperties),templateElementsBySlideId:chunkWKWWFY2C_cjs.m(c.templateElementsBySlideId),slideMasters:structuredClone(c.slideMasters),notesMaster:structuredClone(c.notesMaster),handoutMaster:structuredClone(c.handoutMaster),handoutSlidesPerPage:c.handoutSlidesPerPage,presentationProperties:structuredClone(c.presentationProperties),headerFooter:structuredClone(c.headerFooter),customShows:structuredClone(c.customShows),interactionActive:false}),l());},u=xA({store:t,pushHistory:a,commitChange:l,transformCommittedText:e.transformCommittedText});return {readInlineList:e.readInlineList,formatInlineList:e.formatInlineList,cancelInlineList:e.cancelInlineList,selectedElement:r,select:i,pushHistory:a,commitChange:l,patchGeometry:p,deleteSelected(){let c=t.get(),x=c.selectedElementId;!c.editable||!x||!r(c)||(a(),t.set({...X(c,U(c).filter(b=>!c.selectedElementIds.includes(b.id))),selectedElementId:null,selectedElementIds:[]}),l());},duplicateSelected(){let c=t.get(),x=c.selectedElementId;if(!c.editable||!x)return null;let b=r(c);if(!b)return null;let g=chunkWKWWFY2C_cjs.$(b);return g.x+=20,g.y+=20,a(),t.set({...X(c,[...U(c),g]),selectedElementId:g.id,selectedElementIds:[g.id]}),l(),g.id},nudgeSelected(c,x){let b=t.get(),g=r(b),v=b.selectedElementId;if(!g||!v)return;let f=Date.now();f-o>eD&&a(),o=f,t.set(X(b,U(b).map(y=>y.id===v?{...y,x:g.x+c,y:g.y+x}:y))),l();},commitInlineText(c,x,b){let g=t.get(),v=J(g,c);if(!v)return;let f=e.transformCommittedText?e.transformCommittedText(x):x;a();let y=typeof document<"u"?document.querySelector("[data-inline-editor]"):null,S=Rs(v,y),h=Os(v,y);t.set(X(g,U(g).map(C=>C.id===c?{...C,...Kr(v,f,b),...S!==void 0?{height:S}:{},...h!=="unchanged"?{textStyle:{...v.textStyle,autoFitFontScale:h.fontScale,autoFitLineSpacingReduction:h.lnSpcReduction}}:{}}:C))),l();},commitNotes(c,x){let b=t.get(),g=b.slides[b.currentSlide];!b.editable||!g||g.notes===c&&x===void 0||(a(),t.set({slides:chunkWKWWFY2C_cjs.Br(b.slides,b.currentSlide,c,x)}),l());},setHandoutSlidesPerPage(c){mA({store:t,pushHistory:a,commitChange:l},c);},applyFormatPainter(c,x){let b=t.get(),g=J(b,c),v=J(b,x);return !b.editable||!g||!v||c===x?false:(a(),t.set(X(b,U(b).map(f=>f.id===x?chunkWKWWFY2C_cjs.$g(f,chunkWKWWFY2C_cjs._g(g)):f))),l(),true)},...u,updateDocumentProperties(c,x,b){t.get().editable&&(a(),t.set({coreProperties:structuredClone(c),appProperties:structuredClone(x),customProperties:structuredClone(b)}),l());},updatePresentationProperties(c){t.get().editable&&(a(),t.set({presentationProperties:structuredClone(c)}),l());},updateSections(c){t.get().editable&&(a(),t.set({sections:structuredClone(c)}),l());},updateHeaderFooter(c){t.get().editable&&(a(),t.set({headerFooter:structuredClone(c)}),l());},updateCustomShows(c){t.get().editable&&(a(),t.set({customShows:structuredClone(c)}),l());},undo(){d(n.undo(s())?.snapshot);},redo(){d(n.redo(s())?.snapshot);},canUndo:()=>n.canUndo,canRedo:()=>n.canRedo,clearHistory(){n.clear(),o=0,e.onHistoryChange();},setHistoryDepth(c){n.setMaxDepth(c);},async save(c="pptx"){let x=e.getHandler();if(!x)throw new Error("No presentation is loaded.");let b=t.get(),g=e.getPendingInlineTextEdit?.(),v=g?e.transformCommittedText?.(g.snapshot.text)??g.snapshot.text:void 0,f=g&&"masterView"in g.target?chunkWKWWFY2C_cjs.Ir(b,g.target.masterView,g.snapshot,v):null,y=chunkWKWWFY2C_cjs.Zn(b.slides,b.templateElementsBySlideId).map(h=>g&&"slideId"in g.target&&h.id===g.target.slideId?{...h,elements:[...chunkWKWWFY2C_cjs.Hr(h.elements,g.snapshot,v)]}:h),S=await chunkWKWWFY2C_cjs.ep(x,y,chunkWKWWFY2C_cjs.ip({sections:b.sections,coreProperties:b.coreProperties,appProperties:b.appProperties,customProperties:b.customProperties,headerFooter:b.headerFooter,presentationProperties:b.presentationProperties,viewProperties:b.viewProperties,customShows:b.customShows,tagCollections:b.tagCollections,slideMasters:f?.slideMasters??b.slideMasters,notesMaster:f?.notesMaster??b.notesMaster,handoutMaster:f?.handoutMaster??b.handoutMaster,tableStyleMap:b.tableStyleMap,tableStylesDefaultId:b.tableStylesDefaultId,tableStylesToDelete:b.tableStylesToDelete,outputFormat:c,slideSize:chunkWKWWFY2C_cjs._i({current:b.slideSize,canvas:b.canvasSize}).size,embedFonts:b.embedFonts}),{password:b.presentationPassword,passwordProtected:b.presentationPassword!==null});return t.set({dirty:false}),S}}}function bA(e){let{doc:t,store:n,ops:o}=e,r=null,i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l);if(!p)return;let d=e.getScale();r.el.style.left=`${Math.min(r.startX,p.x)*d}px`,r.el.style.top=`${Math.min(r.startY,p.y)*d}px`,r.el.style.width=`${Math.abs(p.x-r.startX)*d}px`,r.el.style.height=`${Math.abs(p.y-r.startY)*d}px`;}function a(l){if(!r||l.pointerId!==r.pointerId)return;let p=e.stagePoint(l),d=n.get(),u=p?qo(d,chunkWKWWFY2C_cjs.Ce({startX:r.startX,startY:r.startY,currentX:p.x,currentY:p.y},U(d)),"select"):[],c=r.additive?chunkWKWWFY2C_cjs.De(d.selectedElementIds,u):u;r.el.remove(),r=null,i(),o.select(c.at(-1)??null,c);}return {isActive:()=>r!==null,begin(l){let p=e.stagePoint(l),d=e.getOverlayRoot();if(!p||!d)return;let u=t.createElement("div");u.className="pptxv-marquee",d.appendChild(u),r={pointerId:l.pointerId,startX:p.x,startY:p.y,additive:chunkWKWWFY2C_cjs.Ee(l),el:u},window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a);},dispose(){r?.el.remove(),r=null,i();}}}function gA(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,c=u?.backgroundColor||u?.color;return c&&e.onEyedropper?.(c),r.set({eyedropperActive:false}),true}let s=t.target instanceof Element?t.target.closest("td"):null;if(!n||s?.dataset.rowIndex===void 0||s.dataset.cellIndex===void 0)return false;let a={row:Number(s.dataset.rowIndex),column:Number(s.dataset.cellIndex)},l=o.selectedTableCell,p=t.shiftKey&&o.selectedElementId===n&&l?nD(l,a,oD(o,n)):[a];return i.select(n,[n]),r.set({selectedTableCell:t.shiftKey&&l?l:a,selectedTableCells:p}),true}function bp(e,t,n=10){return t?{...e,x:Math.round(e.x/n)*n,y:Math.round(e.y/n)*n}:e}function fA(e){return e.snapToShape?U(e).map(({id:t,x:n,y:o,width:r,height:i})=>({id:t,x:n,y:o,width:r,height:i})):[]}var tD={rows:[],columnWidths:[]};function oD(e,t){let n=J(e,t);return (n?.type==="table"?n.tableData:void 0)??tD}function nD(e,t,n){let o=chunkWKWWFY2C_cjs.be(e.row,e.column,t.row,t.column,n);return chunkWKWWFY2C_cjs.ce(o).map(({row:r,col:i})=>({row:r,column:i}))}function vA(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 hA(e,t){if(t.size===0)return;let n=e.get(),o=U(n),r=chunkWKWWFY2C_cjs.Gg(o,t);r.length!==0&&e.set(X(n,chunkWKWWFY2C_cjs.Hg(o,r)));}var rD={move:"move",resize:"resize",rotate:"rotate"};function yA(e){let{store:t,ops:n}=e,o=[],r=null,i="move",s=new Set,a=l=>{let p=t.get(),d=U(p).filter(c=>p.selectedElementIds.includes(c.id));if(d.length>1&&p.selectedElementIds.includes(l))return chunkWKWWFY2C_cjs.Te(d)??void 0;let u=J(p,l);return u?{x:u.x,y:u.y,width:u.width,height:u.height,rotation:u.rotation??0}:void 0};return chunkWKWWFY2C_cjs.Er({getScale:e.getScale,getElementBox:a,getSiblings:()=>fA(t.get()),getStageOrigin(){let l=e.getOverlay()?.root.getBoundingClientRect();return {left:l?.left??0,top:l?.top??0}},onStart(l,p){let d=t.get();i=p,o=U(d).filter(u=>d.selectedElementIds.includes(u.id)).map(({id:u,x:c,y:x,width:b,height:g,rotation:v})=>({id:u,x:c,y:x,width:b,height:g,rotation:v})),r=chunkWKWWFY2C_cjs.Te(o),s=new Set(qo(d,o.length>0?o.map(u=>u.id):[l],rD[p])),n.pushHistory(),t.set({interactionActive:true});},onPreview(l,p){let d=t.get();if(l=bp(l,d.snapToGrid,chunkWKWWFY2C_cjs.Je(d.viewProperties?.gridSpacing,10)),o.length>1&&r&&i!=="rotate"){let u=i==="move"?chunkWKWWFY2C_cjs.Ue(o,l.x-r.x,l.y-r.y):chunkWKWWFY2C_cjs.Ve(o,r,l);for(let c of u)s.has(c.id)&&n.patchGeometry(c.id,{...c,rotation:c.rotation??0});}else s.has(l.id)&&n.patchGeometry(l.id,l);e.getOverlay()?.setSnapLines(p,e.getScale());},onEnd(l,p,d){if(e.getOverlay()?.setSnapLines([],1),l&&o.length<=1&&s.has(d)){let u=t.get(),c=bp(l,u.snapToGrid,chunkWKWWFY2C_cjs.Je(u.viewProperties?.gridSpacing,10));n.patchGeometry(d,c);}t.set({interactionActive:false}),p&&(hA(t,new Set([...s,d])),n.commitChange());}})}function SA(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}}function CA(e){return e.masterViewTarget?{masterView:{tab:e.masterViewTab,...e.masterViewTarget}}:e.slides[e.currentSlide]?{slideId:e.slides[e.currentSlide].id}:void 0}function wA(e,t,n){let o=e.slides[e.currentSlide];return n&&!e.masterViewTarget&&o?.elements.some(r=>r.id===t)?{patcher:n,slideId:o.id}:void 0}function EA(e,t,n){let o=e.slides[e.currentSlide];if(!n?.readAccepted||!t||!("slideId"in t)||e.loading||e.masterViewTarget||o?.id!==t.slideId)return;let r=n.readAccepted();if(!r||!n.checkModel?.(o.elements.find(s=>s.id===r.elementId)))return;let i=chunkWKWWFY2C_cjs.Hr(o.elements,r);return i===o.elements?void 0:e.slides.map(s=>s===o?{...o,elements:[...i]}:s)}function TA(e,t,n){if(!(!t||!gp(e,t))){if(n?.kind==="unsupported"&&(n.reason==="composition-active"||n.reason==="input-active"))throw new Error("Finish the current text input before saving.");if(n?.kind==="supported")return {snapshot:n.snapshot,target:t}}}function gp(e,t){return !(!t||!e.editable||e.presenting||e.loading||e.error||"slideId"in t&&(e.masterViewTarget||e.slides[e.currentSlide]?.id!==t.slideId)||"masterView"in t&&JSON.stringify({tab:e.masterViewTab,...e.masterViewTarget})!==JSON.stringify(t.masterView))}function PA(e,t,n,o,r=()=>true){let i=chunkWKWWFY2C_cjs.os(e);return {read(){let s=t();if(s?.checkModel){if(!r()||!s.checkModel(n())){o();return}return s.readList()}if(s?.readList()&&!r()){o();return}let a=n();if(a&&!s?.readList()&&s?.activateList(a)===false){let d=chunkWKWWFY2C_cjs.Vf(s.el);return o(),{kind:"unsupported",reason:"model-replaced",text:d}}let l=s?.readList();if(!l)return l;let p=i.check(a,l);if(p.kind==="retire")return o(),{kind:"unsupported",reason:"model-replaced",text:l.kind==="supported"?l.snapshot.text:l.text};if(p.kind==="format"){if(!s?.formatSnapshot(p.snapshot)){o();return}return s.readList()}return l},format(s){let a=t()?.formatSnapshot(s)??false;return a&&i.expect(s),a}}}var iD=2;function AA(e){if(!e.editable||e.presenting||e.selectedElementIds.length!==1)return [];let t=e.selectedElementId?J(e,e.selectedElementId):void 0;return t?chunkWKWWFY2C_cjs.bh(t):[]}function kA(e){let{store:t,ops:n}=e,o=null,r=l=>{if(!o)return;let{elementId:p}=o,d=t.get(),u=U(d);t.set(X(d,u.map(c=>c.id===p&&chunkWKWWFY2C_cjs.f(c)?{...c,shapeAdjustments:{...c.shapeAdjustments,...l}}:c)));},i=()=>{window.removeEventListener("pointermove",s),window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",a);};function s(l){if(!o)return;let p=e.getScale(),d=p>0?p:1,u=(l.clientX-o.startClientX)/d,c=(l.clientY-o.startClientY)/d;if(!o.moved){if(Math.hypot(l.clientX-o.startClientX,l.clientY-o.startClientY)<=iD)return;o.moved=true,n.pushHistory(),t.set({interactionActive:true});}r(chunkWKWWFY2C_cjs.ch(o,u,c));}function a(){let l=o?.moved??false;o=null,i(),l&&(t.set({interactionActive:false}),n.commitChange());}return {begin(l,p){let d=t.get(),u=d.selectedElementId,c=u?J(d,u):void 0;!u||!c||!p||!chunkWKWWFY2C_cjs.f(c)||(l.preventDefault(),l.stopPropagation(),o=chunkWKWWFY2C_cjs.dh(c,p,l.clientX,l.clientY),window.addEventListener("pointermove",s),window.addEventListener("pointerup",a),window.addEventListener("pointercancel",a));},isActive:()=>o!==null,dispose(){o=null,i();}}}function IA(e){let{doc:t,cell:n,element:o,row:r,column:i,ops:s}=e,a=t.createElement("input");a.type="text",a.className="pptxv-inline-editor pptxv-table-cell-editor",a.dataset.inlineEditor="",a.value=o.tableData?.rows[r]?.cells[i]?.text??"",Object.assign(a.style,{boxSizing:"border-box",width:"100%",height:"100%"});let l=t.createDocumentFragment();for(;n.firstChild;)l.appendChild(n.firstChild);n.appendChild(a);let p=false,d=c=>{c.composedPath().includes(a)||u(true);},u=c=>{p||(p=true,t.removeEventListener("pointerdown",d,true),c&&s.commitTableCell(o.id,r,i,a.value),n.isConnected?n.replaceChildren(c?t.createTextNode(a.value):l):a.remove());};return a.addEventListener("blur",()=>u(true)),a.addEventListener("pointerdown",c=>c.stopPropagation()),a.addEventListener("keydown",c=>{c.stopPropagation(),c.key==="Escape"?u(false):c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),u(true));}),t.addEventListener("pointerdown",d,true),a.focus(),a.select(),{close:u}}function mi(e){let t=e.elementId??chunkWKWWFY2C_cjs.tm(e.event.target,e.stage),n=t?J(e.state,t):void 0,o=n&&chunkWKWWFY2C_cjs.e(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||!chunkWKWWFY2C_cjs.Me(n)?{handled:false,tableSession:null}:{handled:true,tableSession:IA({doc:e.doc,cell:r,element:n,row:Number(r.dataset.rowIndex),column:Number(r.dataset.cellIndex),ops:e.ops})}}var aD=500;function sD(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 LA(e,t,n){let o=sD(e,t),r=chunkWKWWFY2C_cjs.tm(e.target,n)??chunkWKWWFY2C_cjs.tm(o,n);return {cell:o,id:r}}function MA(){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}`,s=e?.key===i&&t.timeStamp-e.time<=aD;return e=s?null:{key:i,time:t.timeStamp},s}}function DA(e){let t=MA(),n=o=>{let r=e.getState();if(!r.editable||r.presenting||o.button!==0)return;let{cell:i,id:s}=LA(o,e.doc,e.getStage());if(!i||!t(o,s,i))return;let a=mi({event:o,state:r,doc:e.doc,stage:e.getStage(),overlay:e.getOverlay(),ops:e.ops,elementId:s,cell:i,onEditEquation:e.onEditEquation});a.handled&&(o.preventDefault(),o.stopPropagation(),e.onOpen(a.tableSession));};return e.doc.addEventListener("pointerdown",n,true),()=>e.doc.removeEventListener("pointerdown",n,true)}function RA(e){let{doc:t,store:n,ops:o}=e,r=null,i,s,a=null,l=DA({doc:t,getState:n.get,getStage:e.getStageRoot,getOverlay:()=>e.getOverlay()?.root??null,ops:o,onOpen:h=>a=h,onEditEquation:e.onEditEquation}),p=yA({store:n,ops:o,getScale:e.getScale,getOverlay:e.getOverlay}),d=kA({store:n,ops:o,getScale:e.getScale}),u=h=>vA(e.getOverlay()?.root,e.getScale(),h),c=bA({doc:t,store:n,ops:o,getScale:e.getScale,getOverlayRoot:()=>e.getOverlay()?.root??null,stagePoint:u}),x=SA(),b=h=>{a?.close(h),a=null;let C=r;h?C?.commit():C?.cancel();},g=()=>s?.read()??r?.readList(),v=h=>e.getStageRoot()?.querySelector(`[data-element-id="${CSS.escape(h)}"]`)??null,f=(h,C)=>{v(h)?.classList.toggle("pptxv-inline-editing-source",C);},y=h=>{let C=n.get(),w=J(C,h),T=e.getOverlay();!w||!Wr(w)||!T||r||(o.select(h),T.setEditing(true),f(h,true),i=CA(C),r=$r({doc:t,overlayRoot:T.root,box:{x:w.x,y:w.y,width:w.width,height:w.height,rotation:w.rotation??0},scale:e.getScale(),element:w,spellCheck:C.spellCheckEnabled,collaboration:wA(C,h,e.getLivePatcher?.()),onInput:k=>e.onInlineTextInput?.(h,k),onCommit:(k,A)=>{e.flushInlineTextInput?.(),o.commitInlineText(h,k,A);},onSelectionChange:k=>n.set({selectedTextRange:k}),onLiveFormatKey:e.onInlineLiveFormatKey,onClose(){r=null,i=void 0,s=void 0,e.getOverlay()?.setEditing(false),f(h,false);}}),s=PA(w,()=>r,()=>J(n.get(),h),()=>b(false),()=>gp(n.get(),i)&&C.editTemplateMode===n.get().editTemplateMode));},S=(h,C)=>{let w=n.get(),T=mi({event:h,state:w,doc:t,ops:o,stage:e.getStageRoot(),overlay:e.getOverlay()?.root??null,onEditEquation:e.onEditEquation});if(T.handled){a=T.tableSession;return}C&&di(w,C)&&y(C);};return {onStagePointerDown(h){let C=n.get();if(!C.editable||C.presenting||h.button!==0)return;let w=chunkWKWWFY2C_cjs.tm(h.target,e.getStageRoot());if((r||a)&&b(true),gA({event:h,elementId:w,state:C,store:n,ops:o,onEyedropper:e.onEyedropper}))return;if(C.formatPainterSourceId){w&&di(C,w)&&o.applyFormatPainter(C.formatPainterSourceId,w),n.set({formatPainterSourceId:null});return}let T=w!==null&&di(C,w);if(x(h.pointerType,T?w:null,h.timeStamp||Date.now())){h.preventDefault(),S(h,w);return}if(!T){c.begin(h);return}if(chunkWKWWFY2C_cjs.Ee(h)){let k=C.selectedElementIds.includes(w)?C.selectedElementIds.filter(A=>A!==w):[...C.selectedElementIds,w];o.select(k.at(-1)??null,k);return}(C.selectedElementId!==w||C.selectedElementIds.length!==1)&&o.select(w,[w]),cA(n.get(),w)&&(h.preventDefault(),h.stopPropagation(),p.begin("move",w,h));},onStagePointerMove(h){if(!e.onCursorMove)return;let C=e.getOverlay()?.root.getBoundingClientRect(),w=e.getScale();!C||!(w>0)||e.onCursorMove((h.clientX-C.left)/w,(h.clientY-C.top)/w);},onStageDblClick(h){let C=n.get();if(!C.editable||C.presenting||r||a)return;let w=chunkWKWWFY2C_cjs.tm(h.target,e.getStageRoot());S(h,w);},beginHandleGesture(h,C,w){let T=n.get(),k=T.selectedElementId,A=ci(T);!k||(h==="resize"?!A.resizable:!A.rotatable)||(C.preventDefault(),C.stopPropagation(),p.begin(h,k,C,w));},beginAdjustGesture:(h,C)=>d.begin(h,C),closeInline:b,readInlineList:g,retainAcceptedInlineText(){let h=EA(n.get(),i,r);h&&n.set({slides:h});},formatInlineList:h=>s?.format(h)??false,readPendingInlineTextEdit:()=>TA(n.get(),i,g()),hasActivePointerInteraction:()=>p.isActive()||d.isActive()||c.isActive(),inlineActive:()=>r!==null||a!==null,dispose(){b(false),l(),p.dispose(),d.dispose(),c.dispose();}}}var fp="#0ea5e9";function OA(e,t,n){let o=chunk6TALMZ42_cjs.x(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=chunk6TALMZ42_cjs.x(e,"path",{fill:"none",stroke:fp,"stroke-width":2,"stroke-dasharray":"6 4","vector-effect":"non-scaling-stroke"}),i=chunk6TALMZ42_cjs.x(e,"circle",{r:5,fill:fp,opacity:.55}),s=chunk6TALMZ42_cjs.x(e,"circle",{r:7,fill:"#ffffff",stroke:fp,"stroke-width":2,"aria-label":t("pptx.animation.motionPath.endHandle"),"data-pptx-motion-path-handle":"end"});o.append(r,i,s);let a=null,l=null,p=(b,g)=>({originX:b.x+b.width/2,originY:b.y+b.height/2,slideWidth:g.canvasSize.width,slideHeight:g.canvasSize.height}),d=(b,g,v)=>{let f=chunkWKWWFY2C_cjs.Bd(b,g),y=chunkWKWWFY2C_cjs.Cd(b,g);chunk6TALMZ42_cjs.y(r,{d:f}),chunk6TALMZ42_cjs.y(i,{cx:g.originX,cy:g.originY}),chunk6TALMZ42_cjs.y(s,{cx:y.x,cy:y.y}),s.style.pointerEvents=v?"auto":"none",s.style.cursor=v?"move":"";},u=()=>{let b=l;l=null,e.defaultView?.removeEventListener("pointermove",c),e.defaultView?.removeEventListener("pointerup",x),e.defaultView?.removeEventListener("pointercancel",x),b&&b.draft!==b.basePath&&n(b.draft);};function c(b){if(!l||b.pointerId!==l.pointerId)return;let g=l.scale||1,v=(b.clientX-l.startClientX)/g,f=(b.clientY-l.startClientY)/g,y=chunkWKWWFY2C_cjs.Cd(l.basePath,l.frame),S=(y.x+v-l.frame.originX)/l.frame.slideWidth,h=(y.y+f-l.frame.originY)/l.frame.slideHeight;l.draft=chunkWKWWFY2C_cjs.Dd(l.basePath,S,h),d(l.draft,l.frame,true);}function x(b){l&&b.pointerId===l.pointerId&&u();}return s.addEventListener("pointerdown",b=>{let g=a?.element,v=a?.path;!g||!v||!a?.canEdit||!chunkWKWWFY2C_cjs.Ed(v)||(b.stopPropagation(),b.preventDefault(),l={pointerId:b.pointerId,startClientX:b.clientX,startClientY:b.clientY,basePath:v,frame:p(g,a),scale:a.scale,draft:v},e.defaultView?.addEventListener("pointermove",c),e.defaultView?.addEventListener("pointerup",x),e.defaultView?.addEventListener("pointercancel",x));}),{root:o,mount(b){if(!a?.element||!a.path){o.remove();return}b&&o.parentElement!==b?b.appendChild(o):b||o.remove();},update(b){a=b;let{element:g,path:v}=b;if(!g||!v){o.remove();return}l||(chunk6TALMZ42_cjs.y(o,{width:b.canvasSize.width,height:b.canvasSize.height}),d(v,p(g,b),b.canEdit&&chunkWKWWFY2C_cjs.Ed(v)));},destroy(){u(),o.remove();}}}function HA(e){let t=null;return {attach(){t?.destroy(),t=OA(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?chunkWKWWFY2C_cjs.Ld(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 FA(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-context-menu");r.setAttribute("role","menu"),r.setAttribute("aria-label",t("pptx.editPoints.menu")),r.dataset.pptxEditPointsMenu="true",r.style.position="absolute",r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r.style.transform=`scale(${n.inverseScale})`,r.style.transformOrigin="0 0",r.style.zIndex="61";let i=s=>s.stopPropagation();r.addEventListener("pointerdown",i),r.addEventListener("mousedown",i),r.addEventListener("click",i),r.addEventListener("contextmenu",s=>{s.preventDefault(),s.stopPropagation();});for(let s of n.entries){if(s.separatorBefore){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-context-menu-separator");l.setAttribute("role","separator"),r.appendChild(l);}let a=chunk6TALMZ42_cjs.w(e,"button","pptxv-context-menu-item");if(a.type="button",a.dataset.pptxEditPointsCommand=s.id,s.checked===void 0)a.setAttribute("role","menuitem");else {a.setAttribute("role","menuitemcheckbox"),a.setAttribute("aria-checked",String(s.checked));let l=chunk6TALMZ42_cjs.w(e,"span");l.setAttribute("aria-hidden","true"),l.style.display="inline-block",l.style.width="12px",l.style.marginRight="6px",l.textContent=s.checked?"\u2713":"",a.appendChild(l);}a.appendChild(e.createTextNode(t(s.labelKey))),a.disabled=s.disabled===true,a.addEventListener("click",()=>o(s.id)),r.appendChild(a);}return r}function lD(e,t,n){t.replaceChildren();let o=r=>({[chunkWKWWFY2C_cjs.qs]:r});t.appendChild(chunk6TALMZ42_cjs.x(e,"rect",{width:"100%",height:"100%",fill:"transparent"}));for(let r of n.segments){let i=chunk6TALMZ42_cjs.x(e,"path",{d:r.d,fill:"none",stroke:"transparent","stroke-width":n.hitStrokeWidth,"pointer-events":"stroke",...o(r.target)});i.style.cursor="copy",t.appendChild(i);}t.appendChild(chunk6TALMZ42_cjs.x(e,"path",{d:n.outlineD,fill:"none",stroke:chunkWKWWFY2C_cjs.rs.outlineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));for(let r of n.handles){t.appendChild(chunk6TALMZ42_cjs.x(e,"line",{x1:r.anchorX,y1:r.anchorY,x2:r.x,y2:r.y,stroke:chunkWKWWFY2C_cjs.rs.handleLineColor,"stroke-width":n.outlineWidth,"pointer-events":"none"}));let i=chunk6TALMZ42_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:chunkWKWWFY2C_cjs.rs.handleFill,stroke:chunkWKWWFY2C_cjs.rs.handleStroke,"stroke-width":n.outlineWidth,...o(r.target)});i.style.cursor="move",t.appendChild(i);}for(let r of n.nodes){let i=chunk6TALMZ42_cjs.x(e,"rect",{x:r.x-r.size/2,y:r.y-r.size/2,width:r.size,height:r.size,fill:r.selected?chunkWKWWFY2C_cjs.rs.selectedNodeFill:chunkWKWWFY2C_cjs.rs.nodeFill,stroke:r.selected?chunkWKWWFY2C_cjs.rs.selectedNodeStroke:chunkWKWWFY2C_cjs.rs.nodeStroke,"stroke-width":n.outlineWidth,"data-pptx-edit-points-node-type":r.type,"data-selected":r.selected?"true":void 0,...o(r.target)});i.style.cursor="move",t.appendChild(i);}}function VA(e){let{doc:t,t:n}=e,o=e.element.id,r=e.canvasSize,i=e.scale,s=null,a=null,l=chunk6TALMZ42_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.editPoints.overlay"),"data-pptx-edit-points-overlay":"true","data-pptx-edit-points-element":o});l.style.position="absolute",l.style.left="0",l.style.top="0",l.style.zIndex="60",l.style.touchAction="none";let p=()=>{chunk6TALMZ42_cjs.y(l,{width:r.width,height:r.height});let x=d.view(i);lD(t,l,x),s?.remove(),s=x.menu?FA(t,n,x.menu,b=>d.runCommand(b)):null,s&&a&&a.appendChild(s);},d=new chunkWKWWFY2C_cjs.ss(e.element,{onCommit:x=>e.onCommit(o,x),onExit:()=>e.onExit(),onChange:()=>p(),hiddenCommands:e.hiddenCommands}),u=x=>chunkWKWWFY2C_cjs.ws(x,l,r.width,r.height);l.addEventListener("pointerdown",x=>{x.stopPropagation(),x.button===0&&(x.preventDefault(),l.setPointerCapture?.(x.pointerId),d.pointerDown(u(x)));}),l.addEventListener("pointermove",x=>d.pointerMove(u(x))),l.addEventListener("pointerup",x=>{l.hasPointerCapture?.(x.pointerId)&&l.releasePointerCapture(x.pointerId),d.pointerUp(u(x));}),l.addEventListener("contextmenu",x=>{x.preventDefault(),x.stopPropagation(),d.contextMenu(u(x));});for(let x of ["mousedown","click","dblclick"])l.addEventListener(x,b=>b.stopPropagation());let c=t.defaultView?chunkWKWWFY2C_cjs.xs(d,t.defaultView):()=>{};return p(),{elementId:o,root:l,mount(x){if(a=x,!x){l.remove(),s?.remove();return}l.parentElement!==x&&x.appendChild(l),s&&s.parentElement!==x&&x.appendChild(s);},update(x,b,g){let v=g!==i||b.width!==r.width||b.height!==r.height;r=b,i=g,d.reconcile(x),v&&p();},destroy(){c(),l.remove(),s?.remove(),s=null;}}}var vp="#2f528f";function zA(e){let{doc:t,t:n,tool:o}=e,r=e.canvasSize,i=chunk6TALMZ42_cjs.x(t,"svg",{role:"application","aria-label":n("pptx.freeformTool.overlay"),"data-pptx-freeform-tool-overlay":o});i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.zIndex="60",i.style.cursor="crosshair",i.style.touchAction="none";let s=chunk6TALMZ42_cjs.x(t,"rect",{width:"100%",height:"100%",fill:"transparent"}),a=chunk6TALMZ42_cjs.x(t,"g",{"pointer-events":"none"});i.append(s,a);let l=()=>{chunk6TALMZ42_cjs.y(i,{width:r.width,height:r.height});let c=p.view();a.replaceChildren(),c.previewD&&a.appendChild(chunk6TALMZ42_cjs.x(t,"path",{d:c.previewD,fill:"none",stroke:vp,"stroke-width":c.strokeWidth,"pointer-events":"none"})),c.start&&a.appendChild(chunk6TALMZ42_cjs.x(t,"circle",{cx:c.start.x,cy:c.start.y,r:c.start.size/2,fill:c.start.armed?vp:"#ffffff",stroke:vp,"stroke-width":c.strokeWidth,"pointer-events":"none","data-pptx-freeform-start":c.start.armed?"armed":"idle"}));},p=new chunkWKWWFY2C_cjs.As({tool:o,onCommit:c=>e.onCommit(c),onCancel:()=>e.onCancel(),onChange:()=>l()});p.setScale(e.scale);let d=c=>chunkWKWWFY2C_cjs.vs(i,c.clientX,c.clientY,r.width,r.height);i.addEventListener("pointerdown",c=>{c.stopPropagation(),c.preventDefault(),i.setPointerCapture?.(c.pointerId),p.pointerDown({...d(c),button:c.button});}),i.addEventListener("pointermove",c=>p.pointerMove(d(c))),i.addEventListener("pointerup",c=>{i.hasPointerCapture?.(c.pointerId)&&i.releasePointerCapture(c.pointerId),p.pointerUp();}),i.addEventListener("dblclick",c=>{c.stopPropagation(),p.doubleClick();}),i.addEventListener("contextmenu",c=>{c.preventDefault(),c.stopPropagation();});for(let c of ["mousedown","click"])i.addEventListener(c,x=>x.stopPropagation());let u=t.defaultView?chunkWKWWFY2C_cjs.xs(p,t.defaultView):()=>{};return l(),{tool:o,root:i,mount(c){c?i.parentElement!==c&&c.appendChild(i):i.remove();},update(c,x){r=c,p.setScale(x),l();},destroy(){u(),i.remove();}}}function BA(e){let{doc:t,store:n}=e,o=null,r=null,i=()=>e.getStageWrap()?.querySelector(".pptxv-stage")??null,s=()=>{let u=e.getCustomization?.();return u?chunkWKWWFY2C_cjs.Tq(u):true},a=()=>{let u=o;o=null,u?.destroy();},l=()=>{let u=r;r=null,u?.destroy();},p=(u,c)=>{a(),r&&r.tool!==c&&l(),r??=zA({doc:t,t:e.getTranslator(),tool:c,canvasSize:u.canvasSize,scale:e.getScale(),onCommit:x=>{n.set({freeformTool:null}),e.insertElement(x);},onCancel:()=>n.set({freeformTool:null})}),r.update(u.canvasSize,e.getScale()),r.mount(i());},d=(u,c)=>{l();let x=J(u,c);if(!x||!chunkWKWWFY2C_cjs.us(x)||!s()){a(),n.set({editPointsElementId:null});return}o&&o.elementId!==c&&a(),o??=VA({doc:t,t:e.getTranslator(),element:x,canvasSize:u.canvasSize,scale:e.getScale(),hiddenCommands:e.getCustomization?.()?.hiddenEditPointsCommands,onCommit:(b,g)=>e.applyElementPatch(b,g),onExit:()=>{a(),n.set({editPointsElementId:null});}}),o.update(x,u.canvasSize,e.getScale()),o.mount(i());};return {startEditPoints(u){let c=n.get();return !c.editable||!s()||!chunkWKWWFY2C_cjs.us(J(c,u))?false:(n.set({editPointsElementId:u,freeformTool:null}),true)},armFreeformTool(u){n.set({freeformTool:u,...u?{editPointsElementId:null}:{}});},isEditingPoints(u){return u!==null&&n.get().editPointsElementId===u},sync(){let u=n.get(),c=u.editable&&!u.presenting;c&&u.freeformTool?p(u,u.freeformTool):c&&u.editPointsElementId?d(u,u.editPointsElementId):(l(),a());},detach(){l(),a();}}}function pD(e){let t=e?e.length===2?"corner":e==="n"||e==="s"?"horizontal-edge":"vertical-edge":"rotate",n=e?"var(--pptxv-resize-size, 10px)":"var(--pptxv-rotate-size, 12px)",{frame:o,artwork:r}=chunkWKWWFY2C_cjs.Ge(t,{width:n,height:n,radius:e?"2px":"50%",fill:"#fff",borderColor:"var(--pptx-ring)"});return {frame:{...o,marginLeft:`calc(${o.width} / -2)`,marginTop:`calc(${o.height} / -2)`},artwork:r}}function hp(e,t){let{frame:n,artwork:o}=pD(t);Object.assign(e.style,n);let r=chunk6TALMZ42_cjs.w(e.ownerDocument,"span","pptxv-control-artwork",o);r.setAttribute("data-pptx-handle-artwork",""),r.setAttribute("aria-hidden","true"),e.appendChild(r);}function yp(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-editor-overlay"),r=chunk6TALMZ42_cjs.w(e,"div","pptxv-sel-box");r.style.borderColor=chunkWKWWFY2C_cjs.He("var(--pptx-ring)"),r.hidden=true,o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-rotate-stem",{left:"50%",top:`${-chunkWKWWFY2C_cjs.Be}px`,height:`${chunkWKWWFY2C_cjs.Be}px`,background:chunkWKWWFY2C_cjs.He("var(--pptx-ring)")});r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"button","pptxv-rotate-knob",{left:"50%",top:`${-chunkWKWWFY2C_cjs.Be}px`});s.type="button",s.setAttribute("data-pptx-compact",""),s.dataset.pptxHandleKind="rotate",s.setAttribute("aria-label",t("pptx.selectionOverlay.rotate")),s.addEventListener("pointerdown",b=>n.onRotatePointerDown(b)),hp(s),r.appendChild(s);let a,l,p=[];for(let b of chunkWKWWFY2C_cjs.ze){let{fx:g,fy:v}=chunkWKWWFY2C_cjs.Ae[b],f=chunk6TALMZ42_cjs.w(e,"button","pptxv-sel-handle",{left:`${g*100}%`,top:`${v*100}%`,cursor:chunkWKWWFY2C_cjs.Ae[b].cursor});f.type="button",f.setAttribute("data-pptx-compact",""),f.dataset.handle=b,f.dataset.pptxHandleKind="resize",f.setAttribute("aria-label",t("pptx.selectionOverlay.resize",{handle:b})),f.addEventListener("pointerdown",y=>n.onHandlePointerDown(b,y)),f.appendChild(chunk6TALMZ42_cjs.w(e,"span",void 0,chunkWKWWFY2C_cjs.Fe(b))),f.firstElementChild?.setAttribute("data-pptx-handle-hit",""),hp(f,b),r.appendChild(f),p.push(f);}let d=[];function u(b){let g=chunk6TALMZ42_cjs.w(e,"button","pptxv-adjust-handle");return g.type="button",g.setAttribute("data-pptx-compact",""),g.dataset.pptxHandleKind="adjust",g.setAttribute("aria-label",t("pptx.selectionOverlay.adjust")),g.addEventListener("pointerdown",v=>{let f=c[b];f&&n.onAdjustPointerDown(v,f);}),r.appendChild(g),g}let c=[],x=chunk6TALMZ42_cjs.w(e,"div","pptxv-snap-layer");return o.appendChild(x),{root:o,mount(b){o.parentElement!==b?(b.appendChild(o),l!==b&&(a?.(),l=b,a=chunkWKWWFY2C_cjs.Ie(s,{stem:i}))):b.lastElementChild!==o&&b.appendChild(o);},setBox(b,g){if(!b){r.hidden=true;return}r.hidden=false,r.style.left=`${b.x*g}px`,r.style.top=`${b.y*g}px`,r.style.width=`${b.width*g}px`,r.style.height=`${b.height*g}px`,r.style.setProperty("--pptx-selection-width",`${b.width*g}px`),r.style.setProperty("--pptx-selection-height",`${b.height*g}px`),r.style.borderWidth=`${g}px`,r.style.transform=b.rotation?`rotate(${b.rotation}deg)`:"none";},setHandleVisibility({resizable:b,rotatable:g}){for(let v of p)v.hidden=!b;i.hidden=!g,s.hidden=!g;},setAdjustHandles(b,g){for(;d.length<b.length;)d.push(u(d.length));c=b,d.forEach((v,f)=>{let y=b[f];v.hidden=y===void 0,y&&(v.style.left=`${y.left*g}px`,v.style.top=`${y.top*g}px`,v.style.cursor=y.cursor,v.dataset.pptxAdjustKey=y.key);});},setSnapLines(b,g){x.replaceChildren();for(let v of b){let f=chunk6TALMZ42_cjs.w(e,"div",`pptxv-snap-line pptxv-snap-${v.axis==="v"?"v":"h"}`);v.axis==="v"?f.style.left=`${v.position*g}px`:f.style.top=`${v.position*g}px`,x.appendChild(f);}},setEditing(b){o.classList.toggle("is-editing",b),r.style.zIndex=b?"7":"";},destroy(){a?.(),o.remove();}}}var dD={pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation",ppsx:"application/vnd.openxmlformats-officedocument.presentationml.slideshow",pptm:"application/vnd.ms-powerpoint.presentation.macroEnabled.12",ppt:"application/vnd.ms-powerpoint"};function Sp(e){let{doc:t,store:n}=e,o=null,r=null,i=null,s=null,a=null,l=()=>{let L={editable:n.get().editable,canUndo:p.canUndo(),canRedo:p.canRedo()};e.getChrome().ribbon?.setEditState(L),e.getChrome().titleBar?.setEditState(L),e.getChrome().mobileToolbar?.setEditState(L);},p=xp({store:n,getHandler:e.getHandler,onChange:e.onChange,onHistoryChange:()=>l(),transformCommittedText:e.transformCommittedText,getPendingInlineTextEdit:()=>h.readPendingInlineTextEdit?.(),readInlineList:()=>h.readInlineList?.(),formatInlineList:L=>h.formatInlineList?.(L)??false,cancelInlineList:()=>h.closeInline(false)}),d=cp({doc:t,getTranslator:e.getTranslator,store:n,ops:p,getHandler:e.getHandler,setHandler:e.setHandler,getUserName:e.getUserName}),u=mp({store:n,ops:p}),c=(L,O)=>{let R=n.get();!R.editable||!U(R).some(F=>F.id===L)||(p.pushHistory(),n.set(X(R,U(R).map(F=>F.id===L?{...F,...O}:F))),p.commitChange());},x=()=>{let L=n.get(),O=U(L).find(R=>R.id===L.selectedElementId);O&&ii(t,e.getTranslator(),O,R=>c(O.id,R));},b=()=>{let L=n.get();L.formatPainterSourceId&&L.selectedElementId&&p.applyFormatPainter(L.formatPainterSourceId,L.selectedElementId);},g=L=>{let O=chunkWKWWFY2C_cjs.ll(L);if(O==="bold")return d.toggleBold(),true;if(O==="italic")return d.toggleItalic(),true;if(O==="underline")return d.toggleUnderline(),true;let{action:R}=chunkWKWWFY2C_cjs.Jq(L,{isEditingText:true,canEdit:true,hasSelection:true},e.getKeyboardCustomization?.());switch(R){case "alignLeft":return d.setTextAlign("left"),true;case "alignCenter":return d.setTextAlign("center"),true;case "alignRight":return d.setTextAlign("right"),true;case "alignJustify":return d.setTextAlign("justify"),true;case "increaseFontSize":return d.stepFontSize("increase"),true;case "decreaseFontSize":return d.stepFontSize("decrease"),true;case "copyFormat":return d.toggleFormatPainter(),true;case "pasteFormat":return b(),true;case "hyperlink":return x(),true;case "clearFormatting":return d.clearFormatting(),true;case "find":case "findReplace":return e.getChrome().ribbon?.toggleFindReplace(),true;default:return false}},v=new Map,f=false;function y(){let L=e.getHandler();return L&&!f&&v.size===0&&(f=true,L.getLayoutPreviews().then(O=>{v=new Map(O.map(R=>[R.path,R])),S();}).catch(()=>{}).finally(()=>{f=false;})),v}let S=xP({store:n,getChrome:e.getChrome,selectedElement:L=>p.selectedElement(L),layoutPreviews:y,getHandler:e.getHandler}),h=RA({doc:t,store:n,ops:p,getScale:e.getScale,getOverlay:()=>o,getLivePatcher:e.getLivePatcher,getStageRoot:()=>s?.querySelector(".pptxv-stage")??null,onCursorMove:e.onCursorMove,onInlineTextInput:e.onInlineTextInput,flushInlineTextInput:e.flushInlineTextInput,onEditEquation:(L,O)=>e.getChrome().ribbon?.openEquationEditor(L,O),onEyedropper:L=>d.setShapeFill(L),onInlineLiveFormatKey:g}),C=Ul({doc:t,store:n,editActions:d,interactions:h,getScale:e.getScale,getStageOrigin(){let L=o?.root.getBoundingClientRect();return {left:L?.left??0,top:L?.top??0}},getStageRoot:()=>s?.querySelector(".pptxv-stage")??null}),w=HA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getSelectedElement:L=>p.selectedElement(L),onChangePath:L=>d.setMotionPathData(L)}),T=BA({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,getCustomization:e.getCustomization,applyElementPatch:(L,O)=>c(L,O),insertElement:L=>d.insertElement(L)}),k=NP({doc:t,store:n,getTranslator:e.getTranslator,getScale:e.getScale,getStageWrap:()=>s,actions:d}),A=()=>{if(S(),w.sync(),T.sync(),k.sync(),!o)return;let L=n.get(),O=L.editable&&!L.presenting&&!L.cropSession?U(L).filter(F=>L.selectedElementIds.includes(F.id)&&!T.isEditingPoints(F.id)):[];o.setBox(_P(O),e.getScale());let R=ci(L);o.setHandleVisibility({resizable:R.resizable,rotatable:R.rotatable}),o.setAdjustHandles(L.cropSession?[]:AA(L),e.getScale()),r?.sync(),i?.sync(),OP(t,o.root,L.showGuides?L.guides:[],e.getScale(),L.editable&&!L.presenting?{onMoveGuide:(F,H)=>{let V=n.get();n.set({guides:chunkWKWWFY2C_cjs.Sl(V.guides,F,H,V.canvasSize)});},onRemoveGuide:F=>{n.set({guides:chunkWKWWFY2C_cjs.Tl(n.get().guides,F)});}}:void 0);},P=up({getKeyboardCustomization:e.getKeyboardCustomization,isActive:()=>{let L=n.get();return L.editable&&!L.presenting&&!h.inlineActive()},getSelectedId:()=>n.get().selectedElementId,deselect:()=>p.select(null),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>{p.duplicateSelected();},copySelected:()=>d.copy(),cutSelected:()=>d.cut(),paste:()=>d.paste(),canPaste:()=>{let L=n.get();return !!(L.clipboardPayload&&L.slides[L.currentSlide])},selectAll:()=>d.selectAll(),groupSelected:()=>d.groupSelected(),ungroupSelected:()=>d.ungroupSelected(),nudgeSelected:(L,O)=>p.nudgeSelected(L,O),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 L=e.getChrome().shortcuts;return L.isOpen()?(L.close(),true):false},setTextAlign:L=>d.setTextAlign(L),stepFontSize:L=>d.stepFontSize(L),copyFormat:()=>d.toggleFormatPainter(),pasteFormat:b,addSlide:()=>d.addSlide(),openHyperlink:x,toggleFindReplace:()=>e.getChrome().ribbon?.toggleFindReplace(),clearFormatting:()=>d.clearFormatting(),cycleSelection:L=>{let O=n.get(),R=U(O).map(H=>H.id),F=chunkWKWWFY2C_cjs.ol(R,O.selectedElementId,L);F&&p.select(F,[F]);},onPasteSpecial:()=>{n.get().clipboardPayload&&RP(t,e.getTranslator(),{onConfirm:L=>{let O=d.pasteWithFormat(L);if(!O||L!=="picture")return;let R=n.get().pasteOptionsToolbar?.find(F=>F.id===O)?.sourceClone;R&&requestAnimationFrame(()=>{Zr(t,O,R).then(F=>{F&&d.replaceElement(O,F);});});}});}}),E=L=>{chunkWKWWFY2C_cjs.tl(a),C.onStagePointerDown(L);},M,I=()=>{M?.(),M=void 0,h.closeInline(true),h.closeInline(false),s?.removeEventListener("pointerdown",E),s?.removeEventListener("pointermove",h.onStagePointerMove),s?.removeEventListener("dblclick",C.onStageDblClick),a?.removeEventListener("keydown",P),s=null,a=null,o?.destroy(),o=null,r?.dispose(),r=null,i?.dispose(),i=null,w.detach(),T.detach(),k.detach();},D=n.subscribe((L,O)=>{if(O.editable&&!L.editable&&h.retainAcceptedInlineText?.(),h.readInlineList?.(),L.loading&&!O.loading&&h.closeInline(false),L.currentSlide!==O.currentSlide&&(h.closeInline(true),L.selectedElementId)){p.select(null);return}if((L.slides!==O.slides||L.templateElementsBySlideId!==O.templateElementsBySlideId||L.slideMasters!==O.slideMasters||L.notesMaster!==O.notesMaster||L.handoutMaster!==O.handoutMaster)&&L.selectedElementId&&!p.selectedElement(L)){p.select(null);return}L.editable!==O.editable&&(L.editable||(h.closeInline(true),L.selectedElementId&&p.select(null)),l()),(L.drawTool!==O.drawTool||L.editable!==O.editable)&&C.syncCursor(s),A();});return {attachChrome(){I();let L=e.getChrome();o=yp(t,e.getTranslator(),{onHandlePointerDown(O,R){h.beginHandleGesture("resize",R,O);},onRotatePointerDown(O){h.beginHandleGesture("rotate",O);},onAdjustPointerDown(O,R){h.beginAdjustGesture(O,R);}}),r=VP({doc:t,store:n,ops:p,getScale:e.getScale,label:O=>e.getTranslator()(O==="start"?"pptx.canvas.connectorEndpointStart":"pptx.canvas.connectorEndpointEnd")}),i=HP({doc:t,t:e.getTranslator(),store:n,ops:p,getScale:e.getScale}),w.attach(),s=L.stageWrap,a=L.root,k.attach(a),M=dA(a,s,{store:n,getHandler:e.getHandler,isEditing:h.inlineActive,insertElement:d.insertElement}),s.addEventListener("pointerdown",E),s.addEventListener("pointermove",h.onStagePointerMove),s.addEventListener("dblclick",C.onStageDblClick),a.addEventListener("keydown",P),o.mount(s),r.mount(s),i.mount(s),l(),C.syncCursor(s),A();},detachChrome:I,onStageRendered(){o&&s&&(o.mount(s),r?.mount(s),i?.mount(s),A());},hasActivePointerInteraction:()=>h.hasActivePointerInteraction()||C.isActive()||k.isDragging()||!!r?.isActive(),capturesKeyboard(){let L=n.get();return L.editable&&(L.selectedElementId!==null||h.inlineActive())},reset(){h.closeInline(false),C.dispose(),p.clearHistory(),n.set({selectedElementId:null,selectedElementIds:[],dirty:false,interactionActive:false,drawTool:"select",editPointsElementId:null,freeformTool:null,formatPainterSourceId:null,cropSession:null,editTemplateMode:false,masterViewTarget:null,masterViewTab:"slides"}),l();},setEditable(L){n.set({editable:L,...L?{}:{editTemplateMode:false,selectedElementId:null,selectedElementIds:[]}});},undo:()=>p.undo(),redo:()=>p.redo(),canUndo:()=>p.canUndo(),canRedo:()=>p.canRedo(),setHistoryDepth:L=>p.setHistoryDepth(L),deleteSelected:()=>p.deleteSelected(),duplicateSelected:()=>p.duplicateSelected(),getSelectedElementId:()=>n.get().selectedElementId,selectElements:L=>p.select(L.at(-1)??null,L),applyElementPatch:c,commitElementUpdates(L,O){p.pushHistory(O),n.set({slides:L}),p.commitChange();},commitSlides(L,O=n.get().currentSlide){n.get().editable&&(p.pushHistory(),n.set({slides:L,currentSlide:Math.max(0,Math.min(O,L.length-1)),selectedElementId:null,selectedElementIds:[]}),p.commitChange());},setDrawTool:L=>C.setTool(L),setDrawColor:L=>{dt(n,L),C.setColor(L);},setDrawWidth:L=>C.setWidth(L),startEditPoints:L=>T.startEditPoints(L),armFreeformTool:L=>T.armFreeformTool(L),getEditActions:()=>d,getFindReplaceActions:()=>u,commitNotes:(L,O)=>p.commitNotes(L,O),setHandoutSlidesPerPage:L=>p.setHandoutSlidesPerPage(L),updateDocumentProperties:(L,O,R)=>p.updateDocumentProperties(L,O,R),updatePresentationProperties:L=>p.updatePresentationProperties(L),updateSections:L=>p.updateSections(L),updateHeaderFooter:L=>p.updateHeaderFooter(L),updateCustomShows:L=>p.updateCustomShows(L),save:L=>p.save(L),async downloadAs(L,O){let R=await p.save(L);chunkWKWWFY2C_cjs.At(new Blob([R],{type:dD[L]}),chunkWKWWFY2C_cjs.mj(O,L));},async downloadPptx(L){await this.downloadAs("pptx",L);},destroy(){D(),k.destroy(),h.dispose(),C.dispose(),I();}}}async function Cp(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 mo(e,t){let n=new chunkWKWWFY2C_cjs._,o=[];try{let r=await n.load(e,{allowExternalImages:t?.allowExternalImages}),i=u=>n.getImageData(u),s=await cD(n,r.slides,o),a=await mD(n,r.slides),l=await chunkWKWWFY2C_cjs.ut(a,i),p=await chunkWKWWFY2C_cjs.vt(r.tableStyleMap,i),d=await chunkWKWWFY2C_cjs.wt(l,i);return {handler:n,slides:d,sections:r.sections??[],presentationProperties:r.presentationProperties??{},viewProperties:r.viewProperties,headerFooter:r.headerFooter??{},coreProperties:r.coreProperties,appProperties:r.appProperties,customProperties:r.customProperties??[],customShows:r.customShows??[],modernCommentAuthors:r.modernCommentAuthors??[],commentAuthors:r.commentAuthors??[],embeddedFonts:r.embeddedFonts??[],hasDigitalSignatures:r.hasDigitalSignatures??!1,digitalSignatureCount:r.digitalSignatureCount??0,isPasswordProtected:r.isPasswordProtected??!1,canvasSize:{width:r.width??chunkWKWWFY2C_cjs.ca,height:r.height??chunkWKWWFY2C_cjs.da},mediaDataUrls:s,colorScheme:r.theme?.colorScheme,fontScheme:r.theme?.fontScheme,themeName:r.theme?.name,tagCollections:r.tags??[],tableStyleMap:p,tableStylesDefaultId:r.tableStylesDefaultId,slideMasters:r.slideMasters??[],themeOptions:r.themeOptions??[],notesMaster:r.notesMaster,handoutMaster:r.handoutMaster,hasMacros:r.hasMacros??!1,modifyVerifier:r.modifyVerifier,warnings:r.warnings??[],slideSize:typeof r.widthEmu=="number"&&typeof r.heightEmu=="number"&&r.widthEmu>0&&r.heightEmu>0?{widthEmu:r.widthEmu,heightEmu:r.heightEmu,type:r.slideSizeType??""}:void 0,notesCanvasSize:typeof r.notesWidthEmu=="number"&&typeof r.notesHeightEmu=="number"&&r.notesWidthEmu>0&&r.notesHeightEmu>0?{width:Math.round(r.notesWidthEmu/9525),height:Math.round(r.notesHeightEmu/9525)}:void 0,blobUrls:o}}catch(r){throw ct(o),n.dispose(),r}}function ct(e){for(let t of e)t.startsWith("blob:")&&URL.revokeObjectURL(t);}async function cD(e,t,n){let o=[];for(let s of t)chunkWKWWFY2C_cjs.qt(s.elements,o);let r=new Map;await Promise.all(o.map(async s=>{let a=await chunkWKWWFY2C_cjs.tt(s,e);if(a.missing||!a.mediaPath||!a.url){s.mediaMissing=true;return}r.set(a.mediaPath,a.url),a.isBlobUrl&&n.push(a.url);}));let i=chunkWKWWFY2C_cjs.rt(t).filter(s=>!r.has(s));return await Promise.all(i.map(async s=>{try{let a=await e.getMediaArrayBuffer(s);if(a){let l=URL.createObjectURL(new Blob([a]));n.push(l),r.set(s,l);}}catch{}})),r}async function mD(e,t){let{paths:n,refs:o}=chunkWKWWFY2C_cjs.st(t);if(n.size===0)return t;let r=new Map;return await Promise.all(Array.from(n).map(async i=>{try{let s=await e.getImageData(i);s&&r.set(i,s);}catch{}})),t.map(i=>{let s=chunkWKWWFY2C_cjs.pt(i.elements,r,o);return s===i.elements?i:{...i,elements:s}})}function ui(e){let t=e,n=new Set;return {get:()=>t,set:o=>{let r=false;for(let s of Object.keys(o))if(o[s]!==t[s]){r=true;break}if(!r)return;let i=t;t={...t,...o};for(let s of Array.from(n))s(t,i);},subscribe:o=>(n.add(o),()=>{n.delete(o);})}}function xi(){return {slides:[],sections:[],presentationProperties:{},viewProperties:void 0,headerFooter:{},coreProperties:void 0,appProperties:void 0,customProperties:[],customShows:[],modernCommentAuthors:[],commentAuthors:[],activeCustomShowId:null,embeddedFonts:[],outlineFontsTick:0,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:chunkWKWWFY2C_cjs.ca,height:chunkWKWWFY2C_cjs.da},slideSize:void 0,mediaDataUrls:new Map,colorScheme:void 0,fontScheme:void 0,themeName:void 0,tagCollections:[],tableStyleMap:void 0,tableStylesDefaultId:void 0,tableStylesToDelete:[],currentSlide:0,zoom:"fit",loading:false,error:null,presenting:false,endOfShow:false,enteringBackward:false,editable:false,protectedView: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,pasteOptionsToolbar:null,drawTool:"select",editPointsElementId:null,freeformTool:null,drawColor:chunkWKWWFY2C_cjs.fa,drawWidth:3,showGrid:false,showRulers:false,snapToGrid:false,snapToShape:true,showGuides:true,guides:[],eyedropperActive:false,cropSession:null,spellCheckEnabled:false,readOnlyRecommendation:null,readOnlyBannerDismissed:false,modifyVerifier:void 0,readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null,readOnlyCheckingPassword:false,compatToasts:[],runProgramNotices:[]}}function Vt(e,t){return t<=0?0:Math.min(Math.max(Math.trunc(e),0),t-1)}function NA(e){let{options:t,store:n}=e,o=null,r=[],i=0;function s(){ct(r),ct(n.get().mediaDataUrls.values()),r=[],o?.dispose(),o=null;}async function a(l,p="user",d){let u=++i;e.getEditor()?.reset(),n.set({loading:true,error:null});try{let c=await Cp(l),x=await mo(c,{allowExternalImages:e.getAllowExternalContent?.()});if(u!==i){ct(x.blobUrls),x.handler.dispose();return}s(),o=x.handler,r=x.blobUrls;let b=chunkWKWWFY2C_cjs.Yn(x.slides);e.onContentApplying?.(p);let g=p==="user"&&!d?.skipProtectedView&&t.editable===!0&&(e.shouldOpenProtectedView?.()??!1),v=chunkWKWWFY2C_cjs.Sr({modifyVerifier:x.modifyVerifier,customProperties:x.customProperties}),f=t.editable===!0&&v.kind!==null&&v.defaultReadOnly,y=pp(n.get(),x.viewProperties),S=chunkWKWWFY2C_cjs.Ur([...x.warnings,...x.slides.flatMap(h=>h.warnings??[])]);n.set({slides:b.slides,protectedView:g,readOnlyRecommendation:v.kind===null?null:v,readOnlyBannerDismissed:!1,modifyVerifier:x.modifyVerifier??void 0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null,readOnlyCheckingPassword:!1,compatToasts:S,...y,sections:x.sections,presentationProperties:x.presentationProperties,viewProperties:x.viewProperties,headerFooter:x.headerFooter,coreProperties:x.coreProperties,appProperties:x.appProperties,customProperties:x.customProperties,customShows:x.customShows,modernCommentAuthors:x.modernCommentAuthors,commentAuthors:x.commentAuthors,activeCustomShowId:chunkWKWWFY2C_cjs.tp(x.presentationProperties,x.customShows)??null,embeddedFonts:x.embeddedFonts,embedFonts:chunkWKWWFY2C_cjs.co(x.embeddedFonts.map(h=>h.name)).initialEnabled,hasDigitalSignatures:x.hasDigitalSignatures,digitalSignatureCount:x.digitalSignatureCount,isPasswordProtected:x.isPasswordProtected,templateElementsBySlideId:b.templateElementsBySlideId,slideMasters:x.slideMasters,themeOptions:x.themeOptions,notesMaster:x.notesMaster,notesCanvasSize:x.notesCanvasSize,handoutMaster:x.handoutMaster,hasMacros:x.hasMacros,masterViewTab:"slides",handoutSlidesPerPage:x.handoutMaster?.slidesPerPage??4,masterViewTarget:null,canvasSize:x.canvasSize,slideSize:x.slideSize,mediaDataUrls:x.mediaDataUrls,colorScheme:x.colorScheme,fontScheme:x.fontScheme,themeName:x.themeName,tagCollections:x.tagCollections,tableStyleMap:x.tableStyleMap,tableStylesDefaultId:x.tableStylesDefaultId,tableStylesToDelete:[],currentSlide:Vt(t.initialSlide??0,b.slides.length),loading:!1}),e.setEditableForLoad?.(g||f?!1:t.editable===!0),e.onContentApplied?.(p),t.onLoad?.({slideCount:x.slides.length,canvasSize:x.canvasSize});}catch(c){if(u!==i)return;let x=e.getTranslator(),b=c instanceof chunkWKWWFY2C_cjs.L?x("pptx.security.currentlyProtected"):c instanceof Error?c.message:String(c);n.set({loading:false,error:b}),t.onError?.(b,c);}}return {load:a,releaseLoaded:s,getHandler:()=>o,setHandler:l=>{o?.dispose(),o=l;},invalidate:()=>{i++;}}}var uD=22;function xD(e){return e.map(t=>`${t.key}@${t.level}`).join("\0")}function _A(e,t,n,o){t.querySelector(`[${chunkWKWWFY2C_cjs.al}]`)?.remove();let r=o.slides,i="",s=false,a=new Map,l=chunk6TALMZ42_cjs.w(e,"section","pptxv-outline-view");l.setAttribute(chunkWKWWFY2C_cjs.al,"true"),l.setAttribute("role","region"),l.setAttribute("aria-label",n("pptx.view.outlineView"));let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-outline-view-header"),d=chunk6TALMZ42_cjs.w(e,"span","pptxv-outline-view-title");d.textContent=n("pptx.view.outlineView");let u=chunk6TALMZ42_cjs.w(e,"span","pptxv-outline-view-hint");u.textContent=n("pptx.outline.hint");let c=z(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-outline-view-btn",onClick:()=>{S(),o.onClose();}});p.append(d,u,c.btn);let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-outline-view-list");l.append(p,x);let b=h=>{if(!o.canEdit)return;let C=chunkWKWWFY2C_cjs.kl(r,h,{canvas:o.canvasSize});C.changed&&(r=C.slides,o.commit(C.slides,C.activeSlideIndex),v(),f(C.focusKey));},g=h=>{let C=chunk6TALMZ42_cjs.w(e,"div","pptxv-outline-view-row",{paddingLeft:`${h.level*uD}px`}),w=chunk6TALMZ42_cjs.w(e,"span","pptxv-outline-view-number");w.textContent=h.kind==="title"?String(h.slideIndex+1):"";let T=e.createElement("input");return T.type="text",T.className=`pptxv-outline-view-input${h.kind==="title"?" is-title":""}`,T.value=h.text,T.readOnly=!o.canEdit,T.setAttribute(chunkWKWWFY2C_cjs.bl,h.key),T.setAttribute(chunkWKWWFY2C_cjs.cl,String(h.slideIndex+1)),T.setAttribute(chunkWKWWFY2C_cjs.dl,String(h.level)),T.setAttribute("aria-label",n(h.kind==="title"?"pptx.outline.titleLine":"pptx.outline.bodyLine")),T.addEventListener("input",()=>b({type:"setText",key:h.key,text:T.value})),T.addEventListener("keydown",k=>{let{edit:A,preventDefault:P}=chunkWKWWFY2C_cjs.jl(k,h.key);P&&k.preventDefault(),A&&b(A);}),a.set(h.key,T),C.append(w,T),C};function v(){let h=chunkWKWWFY2C_cjs.el(r),C=xD(h);if(C===i){for(let w of h){let T=a.get(w.key);T&&T.value!==w.text&&(T.value=w.text);}return}i=C,a.clear(),x.replaceChildren(...h.map(w=>g(w)));}function f(h){let C=h?a.get(h):void 0;C&&e.activeElement!==C&&(C.focus(),C.setSelectionRange(C.value.length,C.value.length));}let y=o.subscribe?.(h=>{!s&&h!==r&&(r=h,v());});function S(){s||(s=true,y?.(),l.remove());}return v(),t.appendChild(l),{el:l,close:S}}function GA(e){let t=null,n=()=>{t?.close(),t=null;};return {open(){n();let o=e.store.get();t=_A(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 UA(e,t,n,o){t.querySelector("[data-pptx-selection-pane]")?.remove();let r=chunk6TALMZ42_cjs.w(e,"aside","pptxv-workspace-pane");r.dataset.pptxSelectionPane="true";let i=chunk6TALMZ42_cjs.w(e,"header"),s=chunk6TALMZ42_cjs.w(e,"h2");s.textContent=n("pptx.selectionPane.title");let a=chunk6TALMZ42_cjs.w(e,"button");a.type="button",a.textContent="\xD7",a.setAttribute("aria-label",n("pptx.selectionPane.close")),i.append(s,a),r.appendChild(i);let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-workspace-list"),p={elements:o.elements,selectedIds:o.selectedIds},d=null,u=new Map,c=()=>{for(let[v,f]of u)f.classList.toggle("is-selected",p.selectedIds.includes(v));},x=()=>{if(d===p.elements){c();return}if(d=p.elements,u.clear(),l.replaceChildren(),!p.elements.length){let v=chunk6TALMZ42_cjs.w(e,"p");v.textContent=n("pptx.selectionPane.empty"),l.appendChild(v);return}[...p.elements].reverse().forEach((v,f)=>{let y=bD(e,n,v,p.elements.length-f-1,o,p.selectedIds);u.set(v.id,y),l.appendChild(y);});};x(),r.appendChild(l);let b=o.subscribe?.(v=>{p=v,!l.querySelector(".pptxv-selection-rename")&&x();})??null,g={close(){b?.(),r.remove();}};return a.addEventListener("click",()=>{g.close(),o.onClose?.();}),t.appendChild(r),g}function bD(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-selection-row");s.draggable=true,s.dataset.index=String(o),s.classList.toggle("is-selected",i.includes(n.id));let a=chunk6TALMZ42_cjs.w(e,"span");a.textContent="\u2630";let l=chunk6TALMZ42_cjs.w(e,"button");l.type="button",l.dataset.pptxSelectionName="true",l.textContent=KA(n,o),l.addEventListener("click",()=>r.onSelect(n.id)),l.addEventListener("dblclick",()=>gD(e,t,s,l,n,o,r.onRename));let p=chunk6TALMZ42_cjs.w(e,"button");return p.type="button",p.textContent=n.hidden?"\u25CB":"\u25C9",p.setAttribute("aria-label",t(n.hidden?"pptx.selectionPane.show":"pptx.selectionPane.hide")),p.addEventListener("click",()=>r.onToggleHidden(n.id)),s.addEventListener("dragstart",d=>d.dataTransfer?.setData("text/plain",String(o))),s.addEventListener("dragover",d=>d.preventDefault()),s.addEventListener("drop",d=>{d.preventDefault();let u=Number(d.dataTransfer?.getData("text/plain"));Number.isInteger(u)&&r.onReorder(u,o);}),s.append(a,l,p),s}function gD(e,t,n,o,r,i,s){let a=KA(r,i),l=e.createElement("input");l.type="text",l.className="pptxv-selection-rename",l.setAttribute("aria-label",t("pptx.selectionPane.renameElement")),l.value=a,o.hidden=true,n.insertBefore(l,o),l.focus(),l.select();let p=false,d=u=>{if(p)return;p=true,chunkWKWWFY2C_cjs.ul(l),l.remove(),o.hidden=false;let c=u?chunkWKWWFY2C_cjs.vl(a,l.value):null;c&&(o.textContent=c.name.length>0?c.name:WA(r,i),s(r.id,c.name));};l.addEventListener("keydown",u=>{u.key==="Enter"?d(true):u.key==="Escape"&&d(false);}),l.addEventListener("blur",()=>d(true));}function KA(e,t){return e.name&&e.name.trim().length>0?e.name.trim():WA(e,t)}function WA(e,t){return chunkWKWWFY2C_cjs.e(e)&&e.text?.trim()?e.text.trim().slice(0,32):`${e.type.charAt(0).toUpperCase()}${e.type.slice(1)} ${t+1}`}function fD(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}function $A(e){let t=null,n=()=>{t?.close(),t=null;},o=()=>{let r=e.store.get();return r.slides[r.currentSlide]};return {open(){n(),t=UA(e.doc,e.root(),e.t,{elements:o()?.elements??[],selectedIds:e.store.get().selectedElementIds,subscribe:r=>{let i=o()?.elements??[],s=e.store.get().selectedElementIds;return e.store.subscribe(a=>{let l=a.slides[a.currentSlide]?.elements??[],p=a.selectedElementIds;l===i&&fD(p,s)||(i=l,s=p,r({elements:i,selectedIds:s}));})},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 s=e.store.get(),a=s.slides[s.currentSlide];if(!a||r===i)return;let l=[...a.elements],[p]=l.splice(r,1);l.splice(i,0,p),e.editor.commitSlides(s.slides.map((d,u)=>u===s.currentSlide?{...d,elements:l}:d));}});},close:n}}var wp=Symbol("pptxv-comments-panel-dispose");function qA(e,t,n,o,r){let i=t.querySelector("[data-pptx-comments-panel]");i?.[wp]?.(),i?.remove();let s=chunk6TALMZ42_cjs.w(e,"aside","pptxv-workspace-pane");s.dataset.pptxCommentsPanel="true";let a=chunk6TALMZ42_cjs.w(e,"header"),l=chunk6TALMZ42_cjs.w(e,"h2");l.textContent=n("pptx.toolbar.comments");let p=chunk6TALMZ42_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.common.close")),a.append(l,p),s.appendChild(a);let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-workspace-list"),u=Br(e,n,r,o.getAuthors),c=chunk6TALMZ42_cjs.w(e,"p");c.textContent=n("pptx.comments.noneOnSlide"),d.append(u.el,c);let x=()=>{let C=o.getComments();c.hidden=C.length>0,u.update(C,true);},b=chunk6TALMZ42_cjs.w(e,"textarea");b.placeholder=n("pptx.comments.addPlaceholder");let g=[],v=ro({doc:e,t:n,field:b,getAuthors:o.getAuthors,getMentions:()=>g,onChange:C=>{b.value=C.text,g=C.mentions;}}),f=chunk6TALMZ42_cjs.w(e,"button");f.type="button",f.textContent=n("pptx.comments.addComment"),f.addEventListener("click",()=>{r.addComment(b.value,void 0,g)&&(b.value="",g=[]);}),d.append(b,v.el,f),s.appendChild(d);let y=o.getComments(),S=()=>{h(),v.destroy(),delete s[wp];},h=o.subscribe(()=>{if(!s.isConnected){S();return}let C=o.getComments();C!==y&&(y=C,x());});s[wp]=S,p.addEventListener("click",()=>{S(),s.remove();}),x(),t.appendChild(s);}function jA(e,t,n,o){t.querySelector("[data-pptx-compare-panel]")?.remove();let r=chunk6TALMZ42_cjs.w(e,"aside","pptxv-compare-panel");r.dataset.pptxComparePanel="true",r.setAttribute("aria-label",n("pptx.compare.title"));let i=chunk6TALMZ42_cjs.w(e,"header"),s=chunk6TALMZ42_cjs.w(e,"div"),a=chunk6TALMZ42_cjs.w(e,"h2");a.textContent=n("pptx.compare.title");let l=chunk6TALMZ42_cjs.w(e,"p");l.textContent=n("pptx.compare.summary",{added:o.result.addedCount,removed:o.result.removedCount,changed:o.result.changedCount}),s.append(a,l);let p=chunk6TALMZ42_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",n("pptx.compare.close")),i.append(s,p),r.appendChild(i);let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-compare-actions"),u=chunk6TALMZ42_cjs.w(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 c=chunk6TALMZ42_cjs.w(e,"div","pptxv-compare-list"),x=o.result.diffs.filter(b=>b.status!=="unchanged");if(x.length===0){let b=chunk6TALMZ42_cjs.w(e,"p");b.textContent=n("pptx.compare.noDifferences"),c.appendChild(b);}for(let b of x)c.appendChild(vD(e,n,b,o.onAccept));r.appendChild(c),t.appendChild(r),p.addEventListener("click",()=>r.remove());}function vD(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"article","pptxv-compare-row"),i=chunk6TALMZ42_cjs.w(e,"strong");i.textContent=`${t("pptx.compare.slideNumber",{number:Math.max(n.baseIndex,n.compareIndex)+1})} \xB7 ${t(`pptx.compare.status${hD(n.status)}`)}`;let s=chunk6TALMZ42_cjs.w(e,"p");s.textContent=n.changes.map(d=>d.description).join("; ")||i.textContent;let a=chunk6TALMZ42_cjs.w(e,"div"),l=chunk6TALMZ42_cjs.w(e,"button");l.type="button",l.textContent=t("pptx.compare.reject");let p=chunk6TALMZ42_cjs.w(e,"button");return p.type="button",p.textContent=t("pptx.compare.accept"),l.addEventListener("click",()=>{r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),p.addEventListener("click",()=>{o(n),r.classList.add("is-resolved"),l.disabled=true,p.disabled=true;}),a.append(l,p),r.append(i,s,a),r}function hD(e){return e.charAt(0).toUpperCase()+e.slice(1)}function YA(e,t,n){let{shows:o,slides:r,onSave:i,onSetActive:s,onRun:a}=n,l=we(e,t,t("pptx.customShows.title")),p=structuredClone(o),d=n.activeShowId,u=chunk6TALMZ42_cjs.w(e,"label","pptxv-custom-shows-active"),c=chunk6TALMZ42_cjs.w(e,"span");c.textContent=t("pptx.customShows.selectCustomShow");let x=e.createElement("select");x.setAttribute("aria-label",t("pptx.customShows.selectCustomShow")),x.addEventListener("change",()=>{d=x.value||null,s(d);}),u.append(c,x),l.body.appendChild(u);let b=chunk6TALMZ42_cjs.w(e,"div","pptxv-custom-shows");l.body.appendChild(b);let g=()=>{x.replaceChildren();let f=e.createElement("option");f.value="",f.textContent=t("pptx.customShows.allSlides"),x.appendChild(f);for(let y of p){let S=e.createElement("option");S.value=y.id,S.textContent=y.name,x.appendChild(S);}x.value=p.some(({id:y})=>y===d)?d??"":"";},v=()=>{b.replaceChildren(),p.forEach(f=>{let y=chunk6TALMZ42_cjs.w(e,"article"),S=chunk6TALMZ42_cjs.w(e,"input");S.value=f.name,S.setAttribute("aria-label",t("pptx.customShows.editNameLabel")),S.addEventListener("change",()=>{f.name=S.value.trim()||f.name,g();});let h=chunk6TALMZ42_cjs.w(e,"span");h.textContent=`${f.slideRIds.length}/${r.length}`;let C=chunk6TALMZ42_cjs.w(e,"button");C.type="button",C.textContent=t("pptx.slideShow.fromBeginning"),C.addEventListener("click",()=>{d=f.id,s(f.id),a(f),l.close();});let w=chunk6TALMZ42_cjs.w(e,"button");w.type="button",w.textContent=t("pptx.customShows.delete"),w.addEventListener("click",()=>{p=p.filter(({id:k})=>k!==f.id),d===f.id&&(d=null,s(null)),v(),g();});let T=chunk6TALMZ42_cjs.w(e,"div");r.forEach(k=>{let A=chunk6TALMZ42_cjs.w(e,"label","pptxv-parity-check"),P=e.createElement("input");P.type="checkbox",P.checked=f.slideRIds.includes(k.rId),P.addEventListener("change",()=>{f.slideRIds=P.checked?[...f.slideRIds,k.rId]:f.slideRIds.filter(E=>E!==k.rId),h.textContent=`${f.slideRIds.length}/${r.length}`;}),A.append(P,e.createTextNode(`${t("pptx.rehearse.slide")} ${k.slideNumber}`)),T.appendChild(A);}),y.append(S,h,C,w,T),b.appendChild(y);});};ae(e,l.footer,t("pptx.customShows.createNew"),()=>{p.push({id:crypto.randomUUID(),name:t("pptx.customShows.createNew"),slideRIds:r.map(({rId:f})=>f)}),v(),g();}),ae(e,l.footer,t("pptx.common.cancel"),l.close),ae(e,l.footer,t("pptx.common.ok"),()=>{i(p),s(p.some(({id:f})=>f===d)?d:null),l.close();},true),v(),g();}function XA(e,t,n){let o=we(e,t,t("pptx.headerFooter.title")),r=chunkWKWWFY2C_cjs.Tn(n.value),i=$e(e,o.body,t("pptx.headerFooter.dateAndTime"),!!r.hasDateTime),s=$e(e,o.body,t("pptx.headerFooter.slideNumber"),!!r.hasSlideNumber),a=$e(e,o.body,t("pptx.headerFooter.footer"),!!r.hasFooter),l=chunk6TALMZ42_cjs.w(e,"input");l.type="text",l.value=r.footerText??"",l.placeholder=t("pptx.headerFooter.footerPlaceholder"),l.hidden=!a.checked,o.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=!a.checked;});let p=d=>{n.onApply({...r,hasDateTime:i.checked,hasSlideNumber:s.checked,hasFooter:a.checked,footerText:l.value},d),o.close();};ae(e,o.footer,t("pptx.headerFooter.applyToAll"),()=>p("all")),ae(e,o.footer,t("pptx.headerFooter.applyToCurrent"),()=>p("current"),true);}function QA(e,t,n,o,r){let i=we(e,t,t("pptx.print.title")),s=(g,v)=>{let f=chunk6TALMZ42_cjs.w(e,"label","pptxv-parity-select"),y=chunk6TALMZ42_cjs.w(e,"span");y.textContent=g;let S=e.createElement("select");for(let[h,C]of v){let w=e.createElement("option");w.value=h,w.textContent=C,S.appendChild(w);}return f.append(y,S),i.body.appendChild(f),S},a=s(t("pptx.print.slideRange"),[["all",t("pptx.print.allSlides")],["current",t("pptx.print.currentSlide")],["custom",t("pptx.print.customRange")]]),l=chunk6TALMZ42_cjs.w(e,"div","pptxv-parity-range");l.hidden=true;let p=e.createElement("input");p.type="number",p.min="1",p.max=String(n),p.value="1";let d=e.createElement("input");d.type="number",d.min="1",d.max=String(n),d.value=String(n),l.append(p,e.createTextNode(t("pptx.slideShow.to")),d),i.body.appendChild(l),a.addEventListener("change",()=>{l.hidden=a.value!=="custom";});let u=s(t("pptx.print.printWhat"),[["slides",t("pptx.print.fullPageSlides")],["notes",t("pptx.print.notesPages")],["handouts",t("pptx.print.handouts")],["outline",t("pptx.print.outline")]]);r?.printWhat&&(u.value=r.printWhat);let c=s(t("pptx.print.orientation"),[["landscape",t("pptx.print.landscape")],["portrait",t("pptx.print.portrait")]]),x=s(t("pptx.print.colorMode"),[["color",t("pptx.print.color")],["grayscale",t("pptx.print.grayscale")],["blackAndWhite",t("pptx.print.blackAndWhite")]]);r?.colorMode&&(x.value=r.colorMode);let b=$e(e,i.body,t("pptx.print.frameSlides"),r?.frameSlides??false);ae(e,i.footer,t("pptx.common.cancel"),i.close),ae(e,i.footer,t("pptx.print.title"),()=>{o({slideRange:a.value,customRangeFrom:Number(p.value),customRangeTo:Number(d.value),printWhat:u.value,orientation:c.value,colorMode:x.value,frameSlides:b.checked,scaleToFit:r?.scaleToFit??true}),i.close();},true);}var yD=24;function ZA(e,t,n,o){let r=o.slides.length;if(t.querySelector(`[${chunkWKWWFY2C_cjs.Tk}]`)?.remove(),r===0)return null;let i=chunkWKWWFY2C_cjs.Wk(o.initialSlideIndex,r),s={width:0,height:0},a=false,l=chunkWKWWFY2C_cjs.Rk(),p=chunk6TALMZ42_cjs.w(e,"section","pptxv-reading-view");p.setAttribute(chunkWKWWFY2C_cjs.Tk,"true"),p.setAttribute("role","region"),p.setAttribute("aria-label",n("pptx.view.readingView")),p.tabIndex=-1;let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-reading-view-viewport"),u=chunk6TALMZ42_cjs.w(e,"div","pptxv-reading-view-bar"),c=z(e,{label:n("pptx.common.previous"),icon:"chevron-left",className:"pptxv-reading-view-btn",onClick:()=>f({command:"previous"})}),x=chunk6TALMZ42_cjs.w(e,"span","pptxv-reading-view-counter");x.setAttribute(chunkWKWWFY2C_cjs.Uk,"true");let b=z(e,{label:n("pptx.common.next"),icon:"chevron-right",className:"pptxv-reading-view-btn",onClick:()=>f({command:"next"})}),g=z(e,{label:n("pptx.statusBar.normalView"),icon:"close",className:"pptxv-reading-view-btn",onClick:()=>f({command:"exit"})});u.append(c.btn,x,b.btn,g.btn),p.append(d,u);let v=()=>{let k=o.slides[i.slideIndex];x.textContent=chunkWKWWFY2C_cjs.Ak(i.slideIndex,r),c.setDisabled(!chunkWKWWFY2C_cjs.Zk(i)),b.setDisabled(!chunkWKWWFY2C_cjs._k(i,r));let A=Math.max(o.canvasSize.width,1),P=Math.max(o.canvasSize.height,1),E=chunkWKWWFY2C_cjs.$k(o.canvasSize,s,yD),M=chunk6TALMZ42_cjs.w(e,"div","pptxv-reading-view-stage",{width:`${A*E}px`,height:`${P*E}px`});M.setAttribute(chunkWKWWFY2C_cjs.Vk,"true"),M.setAttribute("aria-roledescription","slide"),k&&E>0&&M.appendChild(o.renderStage(k,E)),d.replaceChildren(M);},f=k=>{let A=i,P=chunkWKWWFY2C_cjs.Yk(A,k,r);if(A.open&&!P.open){w(),o.onExit(A.slideIndex);return}i=P,v();},y=k=>{let{command:A,swallow:P,preventDefault:E}=chunkWKWWFY2C_cjs.Xk(k,l);P&&k.stopPropagation(),E&&k.preventDefault(),A.command!=="none"&&f(A);},S=()=>{let k=d.getBoundingClientRect();(k.width!==s.width||k.height!==s.height)&&(s={width:k.width,height:k.height},v());},h=e.defaultView?.ResizeObserver,C=h?new h(()=>S()):null;function w(){a||(a=true,e.removeEventListener("keydown",y,true),C?.disconnect(),p.remove());}e.addEventListener("keydown",y,true),t.appendChild(p);let T=d.getBoundingClientRect();return s={width:T.width,height:T.height},v(),C?.observe(d),p.focus(),{el:p,close:w}}function JA(e,t,n,o){t.querySelector(".pptxv-rehearse")?.remove();let r=chunk6TALMZ42_cjs.w(e,"aside","pptxv-rehearse");r.setAttribute("aria-label",n("pptx.rehearse.summaryTitle"));let i=chunk6TALMZ42_cjs.w(e,"span"),s=chunk6TALMZ42_cjs.w(e,"strong"),a=chunk6TALMZ42_cjs.w(e,"span"),l={},p=performance.now(),d=p,u=0,c=0,x=false,b=h=>new Date(Math.max(0,h)).toISOString().slice(14,19),g=(h,C)=>{let w=chunk6TALMZ42_cjs.w(e,"button");return w.type="button",w.textContent=h,w.addEventListener("click",C),r.appendChild(w),w},v=g(n("pptx.rehearse.pause"),()=>{if(x=!x,x)u=performance.now();else {let h=performance.now()-u;c+=h,p+=h,d+=h;}v.textContent=n(x?"pptx.rehearse.resume":"pptx.rehearse.pause");}),f=()=>{l[o.currentSlide()]=Math.max(250,performance.now()-p-c),c=0;};g(n("pptx.presenter.next"),()=>{if(x)return;f();let h=o.currentSlide()+1;h<o.slideCount&&(o.navigate(h),p=performance.now());}),g(n("pptx.rehearse.saveTimings"),()=>{f(),o.onSave(l),r.remove();}),g(n("pptx.rehearse.discard"),()=>r.remove()),r.prepend(i,s,a);let y=window.setInterval(()=>{if(x)return;let h=performance.now();i.textContent=`${n("pptx.rehearse.slide")} ${o.currentSlide()+1}/${o.slideCount}`,s.textContent=`${n("pptx.rehearse.slideTime")}: ${b(h-p)}`,a.textContent=`${n("pptx.rehearse.totalTime")}: ${b(h-d)}`;},250),S=new MutationObserver(()=>{r.isConnected||(clearInterval(y),S.disconnect());});S.observe(t,{childList:true}),t.appendChild(r);}var SD=(e,t,n)=>{chunkWKWWFY2C_cjs.At(new Blob([t],{type:n}),e);};function ek(e){let{doc:t,t:n}=e,o=e.store??chunk6TALMZ42_cjs.a(),r=chunk6TALMZ42_cjs.w(t,"section","pptxv-ai-settings"),i=chunk6TALMZ42_cjs.w(t,"div","pptxv-ai-settings-intro"),s=chunk6TALMZ42_cjs.w(t,"div"),a=chunk6TALMZ42_cjs.w(t,"p");a.textContent=n("pptx.ai.settingsSectionTitle");let l=chunk6TALMZ42_cjs.w(t,"p","pptxv-ai-settings-count");l.textContent=n("pptx.ai.exportLogsHint"),s.append(a,l),i.append(chunk6TALMZ42_cjs.K(t,"bug"),s);let p=chunk6TALMZ42_cjs.w(t,"p","pptxv-ai-settings-count");p.textContent=n("pptx.ai.exportLogsCounting");let d=chunk6TALMZ42_cjs.w(t,"label","pptxv-ai-settings-detailed"),u=t.createElement("pptx-ui-checkbox");u.checked=true,u.setAttribute("aria-label",n("pptx.ai.exportLogsDetailed")),d.append(u,t.createTextNode(n("pptx.ai.exportLogsDetailed")));let c=chunk6TALMZ42_cjs.w(t,"div","pptxv-ai-settings-actions"),x=chunk6TALMZ42_cjs.w(t,"p","pptxv-ai-settings-status");x.setAttribute("role","status"),x.hidden=true;let b=(v,f)=>{let y=chunk6TALMZ42_cjs.w(t,"button","pptxv-ai-settings-btn");return y.type="button",y.append(chunk6TALMZ42_cjs.K(t,"download"),t.createTextNode(n(v))),y.addEventListener("click",()=>{g(f);}),y},g=async(v,f)=>{let y=c.querySelectorAll("button");for(let S of y)S.disabled=true;try{let S=await chunk6TALMZ42_cjs.g(o),h=chunk6TALMZ42_cjs.h(S,{format:v,detailed:u.checked},SD);x.hidden=!1,x.textContent=h>0?n("pptx.ai.exportLogsDone",{count:h}):n("pptx.ai.noChatsToExport");}finally{for(let S of y)S.disabled=false;}};return c.append(b("pptx.ai.exportLogsJson","json"),b("pptx.ai.exportLogsMarkdown","markdown")),r.append(i,p,d,c,x),(async()=>{let v=0;try{v=(await o.listChats()).length;}catch{v=0;}p.textContent=n("pptx.ai.exportLogsStoredCount",{count:v});})(),r}function bi(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"span","pptxv-options-row-label");if(o.appendChild(e.createTextNode(t(n.labelKey))),n.infoKey){let r=chunk6TALMZ42_cjs.w(e,"i","pptxv-options-info");r.textContent="i",r.title=t(n.infoKey),r.setAttribute("aria-label",t(n.infoKey)),o.appendChild(r);}return o}function gi(e,t,n){return n.readOnly!==true?false:(e.toggleAttribute("disabled",true),e.title=t("pptx.options.lockedByHost"),true)}function fi(e){return `pptxv-options-row${e.indent?" is-indent":""}`}function CD(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"label",fi(o)),s=e.createElement("pptx-ui-checkbox");s.setAttribute("aria-label",t(o.labelKey)),s.checked=r.getValue(o.group,o.key)===true;let a=gi(s,t,o);s.addEventListener("change",()=>{a||r.setValue(o.group,o.key,s.checked);}),i.append(bi(e,t,o),s),n.appendChild(i);}function wD(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div",fi(o)),s=e.createElement("pptx-ui-select");s.setAttribute("aria-label",t(o.labelKey));for(let p of o.choices){let d=e.createElement("option");d.value=p.value,d.textContent=t(p.labelKey),s.appendChild(d);}let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=gi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(bi(e,t,o),s),n.appendChild(i);}function ED(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div",fi(o)),s=chunk6TALMZ42_cjs.w(e,"span","pptxv-options-number"),a=e.createElement("input");a.type="number",a.min=String(o.min),a.max=String(o.max),a.step=String(o.step??1),a.setAttribute("aria-label",t(o.labelKey));let l=r.getValue(o.group,o.key);a.value=String(typeof l=="number"?l:o.min);let p=gi(a,t,o);if(a.addEventListener("change",()=>{if(p)return;let d=chunkWKWWFY2C_cjs.sq(a.value,o.min,o.max);d!==void 0&&(a.value=String(d),r.setValue(o.group,o.key,d));}),s.appendChild(a),o.unitKey){let d=chunk6TALMZ42_cjs.w(e,"span","pptxv-options-unit");d.textContent=t(o.unitKey),s.appendChild(d);}i.append(bi(e,t,o),s),n.appendChild(i);}function TD(e,t,n,o,r){let i=chunk6TALMZ42_cjs.w(e,"div",fi(o)),s=e.createElement("input");s.type="text",s.setAttribute("aria-label",t(o.labelKey)),o.maxLength!==void 0&&(s.maxLength=o.maxLength);let a=r.getValue(o.group,o.key);s.value=typeof a=="string"?a:"";let l=gi(s,t,o);s.addEventListener("change",()=>{l||r.setValue(o.group,o.key,s.value);}),i.append(bi(e,t,o),s),n.appendChild(i);}function PD(e,t,n,o,r){o.kind==="toggle"?CD(e,t,n,o,r):o.kind==="select"?wD(e,t,n,o,r):o.kind==="number"?ED(e,t,n,o,r):TD(e,t,n,o,r);}function tk(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"section","pptxv-options-section"),a=chunk6TALMZ42_cjs.w(e,"h3");if(a.textContent=t(o.titleKey),s.appendChild(a),o.descriptionKey){let l=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");l.textContent=t(o.descriptionKey),s.appendChild(l);}for(let l of o.controls)PD(e,t,s,l,r);o.special&&i&&i(o,s),n.appendChild(s);}function Ye(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"button","pptxv-options-action");return r.type="button",r.textContent=n,r.addEventListener("click",o),t.appendChild(r),r}function nk(){return {selectedId:null}}function ok(e,t,n,o,r,i,s){let a=chunk6TALMZ42_cjs.w(e,"h4");if(a.textContent=o,n.appendChild(a),r.length===0){let d=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-addins-empty");d.textContent=t("pptx.options.addIns.description"),n.appendChild(d);return}let l=e.createElement("table"),p=e.createElement("tbody");for(let d of r){let u=e.createElement("tr");u.className=i.selectedId===d.id?"is-selected":"";let c=e.createElement("td");c.textContent=t(d.nameKey);let x=e.createElement("td");x.textContent=d.location;let b=e.createElement("td");b.textContent=t(`pptx.options.addInType.${d.type}`),u.append(c,x,b),u.addEventListener("click",()=>{i.selectedId=d.id,s();}),p.appendChild(u);}l.appendChild(p),n.appendChild(l);}function rk(e,t,n,o,r,i){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-addins"),a=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-addins-head");for(let d of ["name","location","type"]){let u=chunk6TALMZ42_cjs.w(e,"span");u.textContent=t(`pptx.options.addIns.${d}`),a.appendChild(u);}s.appendChild(a);let l=chunkWKWWFY2C_cjs.aq(o);ok(e,t,s,t("pptx.options.addIns.active"),l.filter(d=>d.active),r,i),ok(e,t,s,t("pptx.options.addIns.inactive"),l.filter(d=>!d.active),r,i);let p=l.find(d=>d.id===r.selectedId);if(p){let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-addins-detail"),u=chunk6TALMZ42_cjs.w(e,"p");u.textContent=t(p.nameKey);let c=chunk6TALMZ42_cjs.w(e,"p");c.textContent=t(p.descriptionKey);let x=chunk6TALMZ42_cjs.w(e,"p");x.textContent=p.location,d.append(u,c,x),s.appendChild(d);}n.appendChild(s);}function ak(){return {selectedAvailable:null,selectedCurrent:null}}function ik(e,t,n,o,r,i,s){let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-qa-col"),l=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-qa-title");l.textContent=o;let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-qa-list");p.setAttribute("role","listbox"),p.setAttribute("aria-label",o);for(let d of r){let u=chunkWKWWFY2C_cjs.Wp.find(x=>x.id===d);if(!u)continue;let c=chunk6TALMZ42_cjs.w(e,"button",i===d?"is-selected":"");c.type="button",c.setAttribute("role","option"),c.setAttribute("aria-selected",String(i===d)),c.textContent=t(u.labelKey),c.addEventListener("click",()=>s(d)),p.appendChild(c);}a.append(l,p),n.appendChild(a);}function sk(e,t,n,o,r,i){let s=o.getOptions().quickAccess.commandIds,a=chunkWKWWFY2C_cjs.Yp(s).map(g=>g.id),l=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-qa");ik(e,t,l,t("pptx.options.quickAccess.chooseCommands"),a,r.selectedAvailable,g=>{r.selectedAvailable=g,i();});let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-qa-arrows"),d=Ye(e,p,`${t("pptx.options.quickAccess.add")} \xBB`,()=>{r.selectedAvailable&&(o.setQuickAccessCommands(chunkWKWWFY2C_cjs.Zp(s,r.selectedAvailable)),r.selectedAvailable=null);});d.disabled=!r.selectedAvailable;let u=Ye(e,p,`\xAB ${t("pptx.options.quickAccess.remove")}`,()=>{r.selectedCurrent&&(o.setQuickAccessCommands(chunkWKWWFY2C_cjs._p(s,r.selectedCurrent)),r.selectedCurrent=null);});u.disabled=!r.selectedCurrent,l.appendChild(p),ik(e,t,l,t("pptx.options.quickAccess.currentCommands"),s,r.selectedCurrent,g=>{r.selectedCurrent=g,i();});let c=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-qa-arrows"),x=Ye(e,c,"\u2191",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunkWKWWFY2C_cjs.$p(s,r.selectedCurrent,"up"));});x.setAttribute("aria-label",t("pptx.options.quickAccess.moveUp")),x.disabled=!r.selectedCurrent;let b=Ye(e,c,"\u2193",()=>{r.selectedCurrent&&o.setQuickAccessCommands(chunkWKWWFY2C_cjs.$p(s,r.selectedCurrent,"down"));});b.setAttribute("aria-label",t("pptx.options.quickAccess.moveDown")),b.disabled=!r.selectedCurrent,l.appendChild(c),n.appendChild(l),Ye(e,n,t("pptx.options.quickAccess.reset"),()=>{o.setQuickAccessCommands([...chunkWKWWFY2C_cjs.Xp]);});}function lk(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"section","pptxv-options-section"),i=chunk6TALMZ42_cjs.w(e,"h3");i.textContent=t("pptx.options.ribbon.tabsTitle");let s=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");s.textContent=t("pptx.options.ribbon.tabsDescription"),r.append(i,s);let a=new Set(o.getOptions().ribbon.hiddenTabIds),l=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-ribbon-list");for(let p of chunkWKWWFY2C_cjs.Sp){let d=p.id==="file",u=chunk6TALMZ42_cjs.w(e,"label",`pptxv-parity-check${d?" is-locked":""}`),c=e.createElement("input");c.type="checkbox",c.checked=d||!a.has(p.id),c.disabled=d,c.addEventListener("change",()=>{o.setRibbonTabHidden(p.id,!c.checked);}),u.append(c,e.createTextNode(t(p.labelKey))),l.appendChild(u);}r.appendChild(l),Ye(e,r,t("pptx.options.ribbon.reset"),()=>{o.reset("ribbon");}),n.appendChild(r),Ep(e,t,n);}function Ep(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"section","pptxv-options-section"),r=chunk6TALMZ42_cjs.w(e,"h3");r.textContent=t("pptx.settings.keyboardShortcuts"),o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-shortcut-list");for(let{actionKey:s,shortcut:a}of chunkWKWWFY2C_cjs.kp){let l=chunk6TALMZ42_cjs.w(e,"div"),p=chunk6TALMZ42_cjs.w(e,"span");p.textContent=t(s);let d=chunk6TALMZ42_cjs.w(e,"kbd");d.textContent=a,l.append(p,d),i.appendChild(l);}o.appendChild(i),n.appendChild(o);}function pk(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"input","pptxv-visually-hidden");r.type="file",r.accept=chunkWKWWFY2C_cjs.do,r.hidden=true;let i=chunk6TALMZ42_cjs.w(e,"button","pptxv-options-action");i.type="button",i.textContent=t("pptx.options.general.addFontFile"),i.disabled=!o.enabled,i.addEventListener("click",()=>r.click());let s=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");if(s.setAttribute("role","alert"),s.hidden=true,s.textContent=t("pptx.options.general.customFontError"),r.addEventListener("change",()=>{let p=r.files?.[0];r.value="",p&&(s.hidden=true,chunkWKWWFY2C_cjs.eo(p).then(d=>{d?(o.onRegistered(d.family),o.onRefresh()):s.hidden=false;}).catch(()=>{s.hidden=false;}));}),n.append(i,r,s),!o.enabled){let p=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsDisabled"),n.appendChild(p);}let a=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");if(a.textContent=t("pptx.options.general.customFontsAdded"),n.appendChild(a),o.families.length===0){let p=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");p.textContent=t("pptx.options.general.customFontsEmpty"),n.appendChild(p);return}let l=chunk6TALMZ42_cjs.w(e,"ul","pptxv-options-font-list");for(let p of o.families){let d=chunk6TALMZ42_cjs.w(e,"li");d.textContent=p,d.style.fontFamily=p,l.appendChild(d);}n.appendChild(l);}function dk(e,t,n){let{store:o}=n,r=we(e,t,t("pptx.options.title"));r.dialog.classList.add("pptxv-options-dialog");let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-body"),s=chunk6TALMZ42_cjs.w(e,"nav","pptxv-options-nav");s.setAttribute("aria-label",t("pptx.options.title"));let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-options-pane");i.append(s,a),r.body.appendChild(i);let l=chunkWKWWFY2C_cjs.cq(o.getOptions()),p=n.customization??chunkWKWWFY2C_cjs.Oq,d=chunkWKWWFY2C_cjs.Xq(chunkWKWWFY2C_cjs.tq,p),u=n.aiEnabled===true&&chunkWKWWFY2C_cjs.Wq(p,"ai"),c=n.initialTab??"general",x=false,b=null,g=n.themeOptions.currentKey,v=n.localeOptions.currentCode,f=ak(),y=nk(),S=(L,O)=>{if(L.special==="themePicker")xE(e,O,n.themeOptions.catalog.map(R=>({key:R.key,label:t(R.labelKey),previewColor:R.theme?.colors?.primary??"#6b7280"})),g,R=>{let F=n.themeOptions.catalog.find(H=>H.key===R);F&&(g=R,n.themeOptions.onSelect(F.theme,R),T());});else if(L.special==="clearCache"){let R=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");R.textContent=t("pptx.options.save.clearCacheDescription"),O.appendChild(R),Ye(e,O,t("pptx.options.save.clearCacheNow"),n.onClearCache);}else L.special==="customFonts"?pk(e,t,O,{enabled:n.store.getOptions().general.enableCustomFontUpload,families:n.customFonts?.list()??[],onRegistered:R=>n.customFonts?.register(R),onRefresh:T}):L.special==="shortcutReference"&&Ep(e,t,O);},h=()=>{let L=chunk6TALMZ42_cjs.w(e,"section","pptxv-options-section"),O=chunk6TALMZ42_cjs.w(e,"h3");O.textContent=t("pptx.options.language.displayLanguage");let R=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-section-desc");R.textContent=t("pptx.options.language.displayLanguageDescription"),L.append(O,R),Nr(e,L,"pptxv-options-locale",n.localeOptions.catalog.map(F=>({value:F.code,label:F.nativeLabel})),v,F=>{v=F,n.localeOptions.onSelect(F),D();}),a.appendChild(L);},C=L=>{for(let O of L.sections)tk(e,t,a,O,o,S);},w=()=>{for(let O of s.querySelectorAll("button"))O.classList.remove("is-active"),O.setAttribute("aria-current","false");b?.classList.add("is-active"),b?.setAttribute("aria-current","true"),a.replaceChildren();let L=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-headline");L.textContent=t("pptx.ai.exportLogsHint"),a.append(L,ek({doc:e,t,store:n.aiChatStore}));};function T(){if(x){w();return}let L=d.find(R=>R.id===c)??d[0];if(!L)return;for(let R of s.querySelectorAll("button")){let F=R.getAttribute("data-tab")===L.id;R.classList.toggle("is-active",F),R.setAttribute("aria-current",String(F));}a.replaceChildren();let O=chunk6TALMZ42_cjs.w(e,"p","pptxv-options-headline");O.textContent=t(L.descriptionKey),a.appendChild(O),L.custom==="language"?h():L.custom==="ribbon"?lk(e,t,a,o):L.custom==="addIns"?rk(e,t,a,n.addinStatus,y,T):(C(L),L.custom==="quickAccess"&&sk(e,t,a,o,f,T));}let k=L=>{c=L,x=false,T();},A=()=>{s.replaceChildren(),s.setAttribute("aria-label",t("pptx.options.title"));for(let L of d){let O=ae(e,s,t(L.labelKey),()=>k(L.id));O.dataset.tab=L.id;}b=null,u&&(b=ae(e,s,t("pptx.ai.settingsSectionTitle"),()=>{x=true,T();}),b.dataset.tab="ai");},P=o.subscribe(()=>{if(!r.dialog.isConnected){P();return}T();}),E=ae(e,r.footer,t("pptx.options.resetAll"),()=>{o.reset();}),M=ae(e,r.footer,t("pptx.common.cancel"),()=>{o.setOptions(l),r.close(),P();}),I=ae(e,r.footer,t("pptx.common.ok"),()=>{r.close(),P();},true);function D(){r.heading.textContent=t("pptx.options.title"),A(),E.textContent=t("pptx.options.resetAll"),M.textContent=t("pptx.common.cancel"),I.textContent=t("pptx.common.ok"),T();}D();}function ck(e,t,n,o,r,i=[]){let s=we(e,t,t("pptx.slideShow.setUpTitle")),a={...n},l=y=>{let S=chunk6TALMZ42_cjs.w(e,"fieldset"),h=chunk6TALMZ42_cjs.w(e,"legend");return h.textContent=y,S.appendChild(h),s.body.appendChild(S),S},p=l(t("pptx.slideShow.showType"));for(let[y,S]of [["presented","pptx.slideShow.presentedBySpeaker"],["browsed","pptx.slideShow.browsedByIndividual"],["kiosk","pptx.slideShow.browsedAtKiosk"]]){let h=chunk6TALMZ42_cjs.w(e,"label","pptxv-parity-check"),C=e.createElement("input");C.type="radio",C.name="showType",C.checked=(a.showType??"presented")===y,C.addEventListener("change",()=>{a.showType=y,y==="kiosk"&&(a.loopContinuously=true);}),h.append(C,e.createTextNode(t(S))),p.appendChild(h);}let d=l(t("pptx.slideShow.showSlides")),u=$e(e,d,t("pptx.slideShow.allSlides"),(a.showSlidesMode??"all")==="all");u.type="radio",u.name="range",u.addEventListener("change",()=>{a.showSlidesMode="all";});let c=e.createElement("input");c.type="number",c.min="1",c.max=String(o),c.value=String(a.showSlidesFrom??1);let x=e.createElement("input");x.type="number",x.min="1",x.max=String(o),x.value=String(a.showSlidesTo??o);let b=chunk6TALMZ42_cjs.w(e,"label","pptxv-parity-range"),g=e.createElement("input");if(g.type="radio",g.name="range",g.checked=a.showSlidesMode==="range",b.append(g,e.createTextNode(t("pptx.slideShow.from")),c,e.createTextNode(t("pptx.slideShow.to")),x),d.appendChild(b),g.addEventListener("change",()=>{a.showSlidesMode="range";}),i.length>0){let y=chunk6TALMZ42_cjs.w(e,"label","pptxv-parity-range"),S=e.createElement("input");S.type="radio",S.name="range",S.dataset.pptxShowSlidesCustom="true",S.checked=a.showSlidesMode==="customShow";let h=e.createElement("select");h.setAttribute("aria-label",t("pptx.slideShow.customShow"));for(let w of i){let T=e.createElement("option");T.value=w.id,T.textContent=w.name,h.appendChild(T);}h.value=a.showSlidesCustomShowId??i[0].id;let C=()=>{a.showSlidesMode="customShow",a.showSlidesCustomShowId=h.value;};S.addEventListener("change",C),h.addEventListener("change",()=>{S.checked&&C();}),y.append(S,e.createTextNode(t("pptx.slideShow.customShow")),h),d.appendChild(y);}let v=l(t("pptx.slideShow.advanceSlides"));for(let[y,S]of [["manual","pptx.slideShow.manually"],["useTimings","pptx.slideShow.useTimings"]]){let h=$e(e,v,t(S),(a.advanceMode??"useTimings")===y);h.type="radio",h.name="advance",h.addEventListener("change",()=>{a.advanceMode=y;});}let f=l(t("pptx.slideShow.showOptions"));for(let[y,S,h]of [["loopContinuously","pptx.slideShow.loopContinuously",false],["showWithNarration","pptx.slideShow.showWithoutNarration",true],["showWithAnimation","pptx.slideShow.showWithoutAnimation",true],["showSubtitles","pptx.slideShow.showSubtitles",false]]){let C=$e(e,f,t(S),h?a[y]===false:!!a[y]);C.addEventListener("change",()=>{a[y]=h?!C.checked:C.checked;});}ae(e,s.footer,t("pptx.common.cancel"),s.close),ae(e,s.footer,t("pptx.common.ok"),()=>{a.showSlidesFrom=Number(c.value),a.showSlidesTo=Number(x.value),r(a),s.close();},true);}function mk(e,t,n,o){t.querySelector("[data-pptx-slide-sorter]")?.remove();let r=chunk6TALMZ42_cjs.w(e,"section","pptxv-slide-sorter");r.dataset.pptxSlideSorter="true",r.setAttribute("role","dialog");let i=chunk6TALMZ42_cjs.w(e,"header"),s=chunk6TALMZ42_cjs.w(e,"h2");s.textContent=n("pptx.slideSorter.title");let a=chunk6TALMZ42_cjs.w(e,"span");a.textContent=n("pptx.slideSorter.slideCount",{count:o.slides.length});let l=chunk6TALMZ42_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.slideSorter.close")),i.append(s,a,l),r.appendChild(i);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-sorter-grid");o.slides.forEach((c,x)=>{let b=chunk6TALMZ42_cjs.w(e,"article","pptxv-sorter-card");b.draggable=true,b.classList.toggle("is-current",x===o.current),b.classList.toggle("is-hidden",!!c.hidden);let g=chunk6TALMZ42_cjs.w(e,"button");g.type="button";let v=chunk6TALMZ42_cjs.w(e,"span","pptxv-sorter-num");v.textContent=String(x+1),g.appendChild(v),g.setAttribute("aria-label",n("pptx.compare.slideNumber",{number:x+1}));let f=chunkWKWWFY2C_cjs.Cp(c.hidden,"sorter",x);if(f.marker&&f.labelId){b.setAttribute(chunkWKWWFY2C_cjs.yp,f.marker),g.setAttribute("aria-describedby",f.labelId);let S=chunk6TALMZ42_cjs.w(e,"span","pptxv-sorter-hidden");S.id=f.labelId,S.textContent=n(chunkWKWWFY2C_cjs.zp),g.appendChild(S);}g.addEventListener("click",()=>{o.onSelect(x),r.remove();});let y=chunk6TALMZ42_cjs.w(e,"div");for(let[S,h]of [[n("pptx.slideSorter.contextMenu.duplicate"),()=>o.onDuplicate(x)],[n(c.hidden?"pptx.slideSorter.contextMenu.showSlides":"pptx.slideSorter.contextMenu.hideSlides"),()=>o.onToggleHidden(x)],[n("pptx.slideSorter.contextMenu.delete"),()=>o.onDelete(x)]]){let C=chunk6TALMZ42_cjs.w(e,"button");C.type="button",C.textContent=S,C.addEventListener("click",h),y.appendChild(C);}b.addEventListener("dragstart",S=>S.dataTransfer?.setData("text/plain",String(x))),b.addEventListener("dragover",S=>S.preventDefault()),b.addEventListener("drop",S=>{S.preventDefault();let h=Number(S.dataTransfer?.getData("text/plain"));Number.isInteger(h)&&o.onReorder(h,x);}),b.append(g,y),p.appendChild(b);}),r.appendChild(p);let d=()=>{e.removeEventListener("keydown",u),r.remove();},u=c=>{if(!r.isConnected){e.removeEventListener("keydown",u);return}let{action:x}=chunkWKWWFY2C_cjs.ql(c,{canEdit:o.canEdit!==false,isTextInputTarget:chunkWKWWFY2C_cjs.ml(c.target)});if(x==="close"){c.stopPropagation(),d();return}if(x==="delete"){c.preventDefault(),o.onDelete(o.current);return}x==="duplicate"&&(c.preventDefault(),o.onDuplicate(o.current));};e.addEventListener("keydown",u),l.addEventListener("click",d),t.appendChild(r);}function uk(e){let t=()=>e.store.get(),n=null,o=GA(e),r=$A(e);return {openSettings(i="general"){let s=e.getThemeState(),a=e.getLocaleState(),l=i==="shortcuts"?"ribbon":"general";dk(e.doc,(p,d)=>e.t(p,d),{store:e.optionsStore,initialTab:l,aiEnabled:e.aiEnabled,customization:e.getCustomization?.(),addinStatus:e.getAddinStatus(),onClearCache:()=>e.clearOptionsCache(),themeOptions:{catalog:s.catalog,currentKey:s.key,onSelect:p=>e.setTheme(p)},localeOptions:{catalog:a.catalog,currentCode:a.code,onSelect:p=>e.setLocale(p)},customFonts:{list:()=>t().customFontFamilies,register:p=>e.registerCustomFont(p)}});},openSetUpSlideShow(){let i=t();ck(e.doc,e.t,i.presentationProperties,i.slides.length,s=>{e.editor.updatePresentationProperties(s),e.store.set({activeCustomShowId:chunkWKWWFY2C_cjs.tp(s,e.store.get().customShows)??null});},i.customShows);},openHeaderFooter(){XA(e.doc,e.t,{value:t().headerFooter,onApply:i=>e.editor.updateHeaderFooter(i)});},openCompare(){AD(e);},openPrintDialog(){QA(e.doc,e.t,t().slides.length,i=>{e.print(i);},chunkWKWWFY2C_cjs.iq(e.optionsStore.getOptions()));},startRehearsal(){JA(e.doc,e.root(),e.t,{slideCount:t().slides.length,currentSlide:()=>t().currentSlide,navigate:e.goToSlide,onSave:i=>e.editor.commitSlides(chunkWKWWFY2C_cjs.Pc(t().slides,i))});},openSelectionPane(){r.open();},openSlideSorter(){kD(e);},openReadingView(){let i=t();n?.close(),n=ZA(e.doc,e.root(),e.t,{slides:i.slides,canvasSize:i.canvasSize,initialSlideIndex:i.currentSlide,renderStage:(s,a)=>e.renderSlideNode(s,a),onExit:s=>{n=null,e.goToSlide(s);}});},closeReadingView(){n?.close(),n=null;},openOutlineView(){o.open();},closeOutlineView(){o.close();},openComments(){qA(e.doc,e.root(),e.t,{getComments:()=>{let i=t();return i.slides[i.currentSlide]?.comments??[]},getAuthors:()=>{let i=t();return zr(i.modernCommentAuthors,i.commentAuthors)},subscribe:i=>e.store.subscribe(()=>i())},e.editor.getEditActions().comments);},openHyperlink(){let i=t(),s=i.slides[i.currentSlide]?.elements.find(({id:a})=>a===i.selectedElementId);s&&ii(e.doc,e.t,s,a=>e.editor.applyElementPatch(s.id,a));},openCustomShows(){let i=t();YA(e.doc,e.t,{shows:i.customShows,slides:i.slides,activeShowId:i.activeCustomShowId,onSave:s=>e.editor.updateCustomShows(s),onSetActive:s=>e.store.set({activeCustomShowId:s}),onRun:s=>{let a=t().slides.findIndex(({rId:l})=>s.slideRIds.includes(l));a>=0&&e.goToSlide(a),e.enterPresentation();}});}}}async function AD(e){let t=await chunkWKWWFY2C_cjs.yj();if(!t)return;let n=await mo(t.buffer,{allowExternalImages:e.optionsStore.getOptions().trust.allowExternalContent});try{let o=chunkWKWWFY2C_cjs.Hh(e.store.get().slides,n.slides);jA(e.doc,e.root(),e.t,{result:o,onAccept:r=>e.editor.commitSlides(chunkWKWWFY2C_cjs.Ih(e.store.get().slides,r)),onAcceptAll:()=>e.editor.commitSlides(chunkWKWWFY2C_cjs.Jh(e.store.get().slides,o))});}finally{ct(n.blobUrls),n.handler.dispose();}}function kD(e){let t=e.store.get();mk(e.doc,e.root(),e.t,{slides:t.slides,current:t.currentSlide,canEdit:t.editable,onSelect:e.goToSlide,onReorder:(n,o)=>ID(e,n,o),onDelete:n=>e.editor.commitSlides(t.slides.filter((o,r)=>r!==n)),onDuplicate:n=>{let o=[...t.slides];o.splice(n+1,0,structuredClone(o[n])),e.editor.commitSlides(o,n+1);},onToggleHidden:n=>e.editor.commitSlides(t.slides.map((o,r)=>r===n?{...o,hidden:!o.hidden}:o))});}function ID(e,t,n){let o=[...e.store.get().slides],[r]=o.splice(t,1);r&&(o.splice(n,0,r),e.editor.commitSlides(o,n));}var LD=2.5,MD=14;function xk(e,t){let n=e.getBoundingClientRect();return {x:Math.min(1,Math.max(0,(t.clientX-n.left)/Math.max(n.width,1))),y:Math.min(1,Math.max(0,(t.clientY-n.top)/Math.max(n.height,1)))}}function bk(e,t){let n=e.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",chunkWKWWFY2C_cjs.ak(t.points)),n.setAttribute("fill","none"),n.setAttribute("stroke",t.color),n.setAttribute("stroke-width",String(t.width)),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round"),n.setAttribute("vector-effect","non-scaling-stroke"),n.setAttribute("opacity",t.tool==="highlighter"?"0.4":"1"),n}function Tp(e){let{stageWrap:t,slideIndex:n,tool:o}=e;if(t.querySelector(".pptxv-presentation-annotations")?.remove(),o==="none")return ()=>{};let r=t.ownerDocument,i=r.createElementNS("http://www.w3.org/2000/svg","svg");i.classList.add("pptxv-presentation-annotations"),i.setAttribute("viewBox","0 0 100 100"),i.setAttribute("preserveAspectRatio","none"),i.setAttribute("aria-label","Presentation annotations"),i.setAttribute("data-pptx-annotation-overlay",""),Object.assign(i.style,{position:"absolute",inset:"0",zIndex:String(chunkWKWWFY2C_cjs.Dk(e.blackout)),width:"100%",height:"100%",cursor:chunkWKWWFY2C_cjs.rr(o),touchAction:"none"});let s=[...e.strokes],a=null,l=null,p=r.createElementNS("http://www.w3.org/2000/svg","circle");p.setAttribute("r","10"),p.setAttribute("fill","#ef4444"),p.setAttribute("vector-effect","non-scaling-stroke"),p.style.filter="drop-shadow(0 0 8px #ef4444)",p.style.display="none";let d=()=>{i.replaceChildren(...s.filter(v=>v.slideIndex===n).map(v=>bk(r,v))),a&&i.append(bk(r,a)),o==="laser"&&i.append(p);},u=v=>{s=v,e.onChange(v),d();},c=v=>{v.preventDefault(),v.stopPropagation();let f=xk(i,v);if(l=v.pointerId,i.setPointerCapture?.(v.pointerId),o==="eraser"){u(chunkWKWWFY2C_cjs._j(s,n,f));return}(o==="pen"||o==="highlighter")&&(a={id:`presentation-ink-${crypto.randomUUID()}`,slideIndex:n,tool:o,color:o==="highlighter"&&e.color==="#ef4444"?"#fde047":e.color,width:o==="highlighter"?MD:LD,points:[f]},d());},x=v=>{let f=xk(i,v);if(e.onPointerMove?.(f),o==="laser"){p.setAttribute("cx",String(f.x*100)),p.setAttribute("cy",String(f.y*100)),p.style.display="";return}l===v.pointerId&&(o==="eraser"?u(chunkWKWWFY2C_cjs._j(s,n,f)):a&&(a=chunkWKWWFY2C_cjs.Zj(a,f),d()));},b=()=>{l=null,a?.points.length&&a.points.length>1&&u([...s,a]),a=null,d();},g=()=>{p.style.display="none",b();};return i.addEventListener("pointerdown",c),i.addEventListener("pointermove",x),i.addEventListener("pointerup",b),i.addEventListener("pointercancel",b),i.addEventListener("pointerleave",g),t.append(i),d(),()=>i.remove()}function Pp(e,t,n,o){return new Promise(r=>{let i=e.createElement("div");i.className="pptxv-parity-backdrop pptxv-keep-annotations";let s=e.createElement("section");s.className="pptxv-parity-dialog",s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true");let a=e.createElement("h2");a.textContent=t("pptx.keepAnnotations.title");let l=e.createElement("div");l.className="pptxv-parity-body",l.textContent=t("pptx.keepAnnotations.description",{count:n,slides:o});let p=e.createElement("footer");p.className="pptxv-parity-footer";let d=e.createElement("button");d.type="button",d.textContent=t("pptx.keepAnnotations.discard");let u=e.createElement("button");u.type="button",u.className="is-primary",u.textContent=t("pptx.keepAnnotations.keep");let c=b=>{e.removeEventListener("keydown",x),i.remove(),r(b);},x=b=>{b.key==="Escape"&&c("discard");};d.addEventListener("click",()=>c("discard")),u.addEventListener("click",()=>c("keep")),e.addEventListener("keydown",x),p.append(d,u),s.append(a,l,p),i.append(s),e.body.append(i),queueMicrotask(()=>u.focus());})}function Ap(e){let t=[],n=()=>{},o=null,r=null,i=d=>[String(d.active),String(d.slideIndex),d.pointer?.tool??"none",d.pointer?.color??""].join("|"),s=()=>e.onStrokesChange?.([...t]),a=()=>{n();let d=o,u=d?.pointer?.tool??"none";!d?.active||u==="none"||(n=Tp({stageWrap:d.stageWrap,slideIndex:d.slideIndex,tool:u,color:d.pointer?.color??"#ef4444",blackout:d.blackout,strokes:t,onChange(c){t=c,s();},onPointerMove:e.onPointerMove}));},l=()=>{t=[],s(),a();},p=()=>{let d=e.getSlides(),u=false,c=d.map((x,b)=>{let g=t.filter(v=>v.slideIndex===b&&v.points.length>1).map(v=>chunkWKWWFY2C_cjs.zm({points:v.points.map(f=>({x:f.x*(o?.canvasSize.width??960),y:f.y*(o?.canvasSize.height??540)})),color:v.color,width:v.width,tool:v.tool})).filter(v=>v!==null);return g.length===0?x:(u=true,{...x,elements:[...x.elements,...g]})});return u&&e.commitSlides(c),u};return {syncStage(d){let u=i(d),c=d.stageWrap.querySelector(".pptxv-presentation-annotations")===null,x=d.stageWrap!==o?.stageWrap||u!==r;o=d,r=u,(x||c)&&a();let b=d.stageWrap.querySelector(".pptxv-presentation-annotations");b&&(b.style.zIndex=String(chunkWKWWFY2C_cjs.Dk(d.blackout)));},getStrokes:()=>t,setStrokes(d){t=[...d],s(),a();},hasAnnotations:()=>t.length>0,clear:l,async finishPresentation(){if(t.length===0)return "none";if(e.shouldPromptKeepAnnotations?.()===false)return l(),"discarded";let d=new Set(t.map(c=>c.slideIndex)).size,u=await Pp(e.doc,e.t,t.length,d);return u==="keep"&&p(),l(),u==="keep"?"kept":"discarded"},dispose(){n(),o=null;}}}function gk(e){let t=Ap({doc:e.doc,t:e.t,getSlides:()=>e.store.get().slides,commitSlides:n=>e.editor.commitSlides(n),shouldPromptKeepAnnotations:e.shouldPromptKeepAnnotations,onStrokesChange:n=>e.updateSnapshot({inkStrokes:n}),onPointerMove:({x:n,y:o})=>e.updateSnapshot({pointer:{...e.getSnapshot().pointer??{tool:"laser",color:"#ef4444"},x:n,y:o}})});return {sync(n){let o=e.store.get();t.syncStage({stageWrap:e.getChrome().stageWrap,active:o.presenting&&n.inkMarkupVisible!==false,slideIndex:o.currentSlide,canvasSize:o.canvasSize,pointer:n.pointer,blackout:n.blackout});},clear:()=>t.clear(),finish:()=>t.finishPresentation(),dispose:()=>t.dispose()}}async function fk(e){let t=chunkWKWWFY2C_cjs.nt.find(({id:s})=>s===e.presetId),n=e.loading.getHandler();if(!t||!n)return false;let o=e.store.get(),r=await n.switchThemePreset({slides:chunkWKWWFY2C_cjs.Zn(o.slides,o.templateElementsBySlideId),width:o.canvasSize.width,height:o.canvasSize.height,themeColorMap:o.colorScheme?{...o.colorScheme}:void 0,theme:{colorScheme:o.colorScheme}},t),i=chunkWKWWFY2C_cjs.Yn(r.slides);return e.editor.commitSlides(i.slides,o.currentSlide),e.store.set({templateElementsBySlideId:i.templateElementsBySlideId,colorScheme:t.colorScheme,fontScheme:t.fontScheme,themeName:t.name}),true}function kp(e){let t=null,n=false,o=()=>{n=false,t?.stop(),t=null;},r=()=>{let i=chunkWKWWFY2C_cjs.Ep();if(!i){e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")});return}t=new i,t.continuous=true,t.interimResults=true,t.lang=chunkWKWWFY2C_cjs.Hp(e.settings?.()??{spokenLanguage:"auto"},e.doc.defaultView?.navigator.language),t.onresult=s=>e.emit({subtitlesVisible:true,caption:chunkWKWWFY2C_cjs.Dp(s.resultIndex,s.results)}),t.onerror=()=>e.emit({subtitlesVisible:true,caption:e.t("pptx.subtitles.notSupported")}),t.onend=()=>{if(n)try{t?.start();}catch{}},t.start();};return {isActive:()=>n,toggle:()=>n?(o(),e.emit({subtitlesVisible:false,caption:void 0}),false):(n=true,e.emit({subtitlesVisible:true,caption:""}),r(),true),dispose:o}}function uo(e,t,n){e.style.width=`${String(Math.round(t.width*n))}px`,e.style.height=`${String(Math.round(t.height*n))}px`,e.style.overflow="hidden",e.style.position="relative";}function Ip(e,t){return e.width>0?t/e.width:1}function vk(e,t,n){return e.width<=0||e.height<=0?1:Math.max(.01,Math.min(t/e.width,n/e.height))}function Lp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-navigator",o.setAttribute("role","dialog"),o.setAttribute("aria-label",n(chunkWKWWFY2C_cjs.Jk.title));let r=t.createElement("header");r.className="pptxv-presenter-navigator-header";let i=t.createElement("h2");i.textContent=n(chunkWKWWFY2C_cjs.Jk.subtitle);let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-navigator-close",s.dataset.pptxPresenterControl="navigator-close";let a=n(chunkWKWWFY2C_cjs.Jk.close);s.setAttribute("aria-label",a),s.title=a,s.textContent=a,s.addEventListener("click",e.close),r.append(i,s);let l=t.createElement("div");return l.className="pptxv-presenter-navigator-grid",e.slides.forEach((p,d)=>{let u=t.createElement("button");u.type="button",u.className="pptxv-presenter-navigator-tile",u.dataset.slideIndex=String(d),d===e.current&&(u.classList.add("is-current"),u.setAttribute("aria-current","true")),p.hidden===true&&(u.style.opacity=String(chunkWKWWFY2C_cjs.Nk.hiddenSlideOpacity)),u.setAttribute("aria-label",n("pptx.presenter.slideLabel",{current:d+1,total:e.slides.length}));let c=t.createElement("div");c.className="pptxv-presenter-navigator-preview",c.setAttribute("aria-hidden","true"),c.append(e.renderSlide(p,e.tileScale)),uo(c,e.canvas,e.tileScale);let x=t.createElement("span");x.className="pptxv-presenter-navigator-caption",x.textContent=String(d+1),u.append(c,x),u.addEventListener("click",()=>e.select(d)),l.append(u);}),o.append(r,l),o}function hk(e,t,n){let o=e.createElement("div");o.className=n;let r=e.createElement("div");r.className="pptxv-presenter-heading",r.textContent=t;let i=e.createElement("div");return i.className="pptxv-presenter-readout",o.append(r,i),{root:o,value:i}}function Mp(e){let{doc:t,t:n}=e,o=t.createElement("aside");o.className="pptxv-presenter-rail";let r=t.createElement("header");r.className="pptxv-presenter-rail-header";let i=hk(t,n(chunkWKWWFY2C_cjs.Ik.currentTime),"pptxv-presenter-clock"),s=hk(t,n(chunkWKWWFY2C_cjs.Ik.elapsed),"pptxv-presenter-elapsed");r.append(i.root,s.root);let a=t.createElement("nav");a.className="pptxv-presenter-rail-nav";let l=(M,I)=>{let D=t.createElement("button");D.type="button",D.className="pptxv-presenter-nav-btn",D.dataset.pptxPresenterControl=M;let L=n(I);D.setAttribute("aria-label",L),D.title=L;let O=t.createElement("span");O.textContent=L;let R=chunk6TALMZ42_cjs.K(t,M==="prev"?"chevron-left":"chevron-right");return D.append(...M==="prev"?[R,O]:[O,R]),D.addEventListener("click",()=>e.move(M==="prev"?-1:1)),D},p=l("prev","pptx.presenter.prev"),d=t.createElement("span");d.className="pptxv-presenter-counter";let u=l("next","pptx.presenter.next");a.append(p,d,u);let c=t.createElement("section");c.className="pptxv-presenter-next",c.dataset.pptxPresenterNextPreview="true";let x=t.createElement("div");x.className="pptxv-presenter-heading",x.textContent=n(chunkWKWWFY2C_cjs.Ik.nextSlidePreview);let b=t.createElement("div");b.className="pptxv-presenter-next-body",c.append(x,b);let g=t.createElement("section");g.className="pptxv-presenter-notes",g.dataset.pptxPresenterNotes="true";let v=t.createElement("div");v.className="pptxv-presenter-notes-header";let f=t.createElement("div");f.className="pptxv-presenter-heading",f.textContent=n(chunkWKWWFY2C_cjs.Ik.speakerNotes);let y=chunkWKWWFY2C_cjs.Rj,S=t.createElement("div");S.className="pptxv-presenter-notes-body";let h=t.createElement("span");h.className="pptxv-presenter-notes-size";let C=M=>{y=chunkWKWWFY2C_cjs.Sj(y+M),S.style.fontSize=`${String(y)}px`,h.textContent=`${String(y)}px`,T.disabled=y<=chunkWKWWFY2C_cjs.Oj,k.disabled=y>=chunkWKWWFY2C_cjs.Pj;},w=(M,I,D)=>{let L=t.createElement("button");L.type="button",L.className="pptxv-presenter-notes-btn",L.dataset.pptxPresenterControl=M;let O=n(I);return L.setAttribute("aria-label",O),L.title=O,L.append(chunk6TALMZ42_cjs.K(t,D<0?"minus":"plus")),L.addEventListener("click",()=>C(D)),L},T=w("notes-font-decrease","pptx.presenter.decreaseFontSize",-chunkWKWWFY2C_cjs.Qj),k=w("notes-font-increase","pptx.presenter.increaseFontSize",chunkWKWWFY2C_cjs.Qj),A=t.createElement("div");A.className="pptxv-presenter-notes-controls",A.append(T,h,k),v.append(f,A),g.append(v,S),C(0),o.append(r,a,c,g);let P=M=>{S.replaceChildren();let I=M?.notesSegments;if(I?.length){for(let O of chunkWKWWFY2C_cjs.Vj(I)){if(O.kind==="break"){S.append(t.createElement("br"));continue}let R=t.createElement("span");R.textContent=O.text,Object.assign(R.style,O.style),S.append(R);}return}let D=M?.notes?.trim();if(D){S.textContent=D;return}let L=t.createElement("em");L.className="pptxv-presenter-empty",L.textContent=n(chunkWKWWFY2C_cjs.Ik.noNotes),S.append(L);};return {root:o,syncClock:(M,I)=>{i.value.textContent=chunkWKWWFY2C_cjs.Tj(new Date(M)),s.value.textContent=chunkWKWWFY2C_cjs.Uj(I);},syncSlide:()=>{let M=e.getSlides(),I=e.getCurrent();d.textContent=`${String(I+1)} / ${String(M.length)}`,p.disabled=chunkWKWWFY2C_cjs.Lk(I),u.disabled=chunkWKWWFY2C_cjs.Kk(),b.replaceChildren();let D=chunkWKWWFY2C_cjs.sp(M,I,e.getActiveCustomShow?.(),e.getAuthoredRange?.());if(D){let L=e.previewScale();b.append(e.renderSlide(D,L)),uo(b,e.canvas(),L);}else {b.style.removeProperty("width"),b.style.removeProperty("height");let L=t.createElement("em");L.className="pptxv-presenter-empty",L.textContent=n(chunkWKWWFY2C_cjs.Ik.endOfPresentation),b.append(L);}P(M[I]);}}}var DD={"circle-pause":"circle-pause","circle-play":"circle-play","rotate-ccw":"rotate-ccw","grid-2x2":"grid-2x2","zoom-in":"zoom-in","zoom-out":"zoom-out",scan:"scan","mouse-pointer-2":"mouse-pointer-2","pen-tool":"pen",highlighter:"highlighter",eraser:"eraser",captions:"captions",monitor:"monitor","monitor-off":"monitor-off","arrow-left-right":"arrow-left-right",x:"close"},yk={laser:"laser",pen:"pen",highlighter:"highlighter",eraser:"eraser"};function RD(e,t,n){let o=yk[e];if(o)return (t.pointer?.tool??"none")===o;switch(e){case "blackout-black":return t.blackout==="black";case "blackout-white":return t.blackout==="white";case "captions":return t.subtitlesVisible===true;case "audience":return n;default:return false}}function OD(e,t){let n=yk[e];return n?()=>{let r=t.getSnapshot().pointer?.tool??"none";t.setPointerTool(r===n?"none":n);}:{"timer-toggle":t.toggleTimer,"timer-reset":t.resetTimer,"all-slides":t.showAllSlides,"zoom-in":()=>t.stepZoom(1),"zoom-out":()=>t.stepZoom(-1),"zoom-reset":t.resetZoom,"blackout-black":()=>t.setBlackout("black"),"blackout-white":()=>t.setBlackout("white"),captions:t.toggleCaptions,audience:t.toggleAudience,"swap-displays":t.swapDisplays,end:t.end}[e]}function Dp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter-strip";let r=[];for(let i of chunkWKWWFY2C_cjs.Hk){if(i.kind==="divider"){let d=t.createElement("span");d.className="pptxv-presenter-strip-divider",d.setAttribute("aria-hidden","true"),o.append(d);continue}if(i.kind==="spacer"){let d=t.createElement("span");d.className="pptxv-presenter-strip-spacer",o.append(d);continue}let s=t.createElement("button");s.type="button",s.className="pptxv-presenter-strip-btn",s.dataset.pptxPresenterControl=i.id;let a=OD(i.id,e);if(a&&s.addEventListener("click",a),i.glyph){let d=t.createElement("span");d.textContent=i.glyph,d.setAttribute("aria-hidden","true"),s.append(d);}let l=t.createElement("span");l.className="pptxv-presenter-strip-icon",l.setAttribute("aria-hidden","true"),s.append(l);let p=()=>{let d=e.getSnapshot(),u=RD(i.id,d,e.isAudienceOpen()),c=d.paused===true,x=i.id==="timer-toggle"?c:u,b=x&&i.activeLabelKey?i.activeLabelKey:i.labelKey,g=b?n(b):"";s.setAttribute("aria-label",g),s.title=g,i.kind==="toggle"&&s.setAttribute("aria-pressed",String(u)),s.classList.toggle("is-active",u);let v=x&&i.activeIcon?i.activeIcon:i.icon;l.replaceChildren();let f=v===void 0?void 0:DD[v];f&&l.append(chunk6TALMZ42_cjs.K(t,f));};p(),r.push(p),o.append(s);}return {root:o,sync:()=>{for(let i of r)i();}}}function Rp(e){let{doc:t,t:n}=e,o=t.createElement("div");o.className="pptxv-presenter",o.setAttribute("role","region"),o.setAttribute("aria-label",n("pptx.presenter.presenterView"));for(let[h,C]of Object.entries(chunkWKWWFY2C_cjs.Ok()))o.style.setProperty(h,C);let r=Dp({...e,showAllSlides:()=>x()}),i=t.createElement("div");i.className="pptxv-presenter-body";let s=t.createElement("div");s.className="pptxv-presenter-main",s.dataset.pptxPresenterSlide="true";let a=t.createElement("div");a.className="pptxv-presenter-main-frame";let l=t.createElement("div");l.className="pptxv-presenter-badge",s.append(a,l),s.addEventListener("click",()=>{chunkWKWWFY2C_cjs.Nj(e.getSnapshot().pointer?.tool)&&e.move(1);});let p=Mp({doc:t,t:n,getSlides:e.getSlides,getCurrent:e.getCurrent,renderSlide:e.renderSlide,previewScale:()=>Ip(e.canvasSize(),chunkWKWWFY2C_cjs.Nk.nextPreviewWidth),canvas:e.canvasSize,getActiveCustomShow:e.getActiveCustomShow,getAuthoredRange:e.getAuthoredRange,move:e.move});i.append(s,p.root);let d=t.createElement("div");d.className="pptxv-presenter-progress",d.setAttribute("role","progressbar"),d.setAttribute("aria-valuemin","0"),d.setAttribute("aria-valuemax","100"),d.setAttribute("aria-label",n(chunkWKWWFY2C_cjs.Ik.timerProgress));let u=t.createElement("div");u.className="pptxv-presenter-progress-fill",d.append(u),o.append(r.root,i,d),e.container.append(o);let c=null;function x(){c?.remove(),c=Lp({doc:t,t:n,slides:e.getSlides(),current:e.getCurrent(),renderSlide:e.renderSlide,tileScale:Ip(e.canvasSize(),chunkWKWWFY2C_cjs.Nk.navigatorTileWidth),canvas:e.canvasSize(),select:h=>{e.navigate(h),b();},close:()=>b()}),o.append(c);}function b(){c?.remove(),c=null;}function g(){let h=e.getSlides(),C=e.getCurrent(),w=h[C];if(a.replaceChildren(),w){let T=v();a.append(e.renderSlide(w,T)),uo(a,e.canvasSize(),T);}else {a.style.removeProperty("width"),a.style.removeProperty("height");let T=t.createElement("div");T.className="pptxv-presenter-empty",T.textContent=n(chunkWKWWFY2C_cjs.Ik.noSlides),a.append(T);}l.textContent=n(chunkWKWWFY2C_cjs.Ik.slideLabel,{current:C+1,total:h.length}),p.syncSlide(),f();}function v(){let h=chunkWKWWFY2C_cjs.Nk.mainPadding*2;return vk(e.canvasSize(),Math.max(1,s.clientWidth-h),Math.max(1,s.clientHeight-h))}function f(){let h=e.getSnapshot().zoom,C=h?.scale??1;a.style.transform=`scale(${String(C)})`,a.style.transformOrigin=`${String((h?.originX??.5)*100)}% ${String((h?.originY??.5)*100)}%`;}function y(){let h=e.getElapsedMs();p.syncClock(Date.now(),h);let C=chunkWKWWFY2C_cjs.Mk(h);d.setAttribute("aria-valuenow",String(Math.round(C.percent))),d.title=n("pptx.presenter.timerTitle",{elapsed:chunkWKWWFY2C_cjs.Uj(h),segment:C.segment+1}),u.style.width=`${String(C.percent)}%`;}g(),y(),r.sync();let S=setInterval(y,1e3);return {syncSlide:g,syncSnapshot:()=>{r.sync(),f();},showAllSlides:()=>x(),dispose:()=>{clearInterval(S),b(),o.remove();}}}function Op(e,t){e.querySelectorAll(".pptxv-presenter-effect").forEach(r=>r.remove());let n=r=>{let i=e.ownerDocument.createElement("div");return i.className=`pptxv-presenter-effect ${r}`,e.append(i),i};if(t.blackout!=="none"){let r=n("blank");r.setAttribute("data-pptx-blackout",""),Object.assign(r.style,{position:"absolute",inset:"0",zIndex:String(chunkWKWWFY2C_cjs.Ck),background:t.blackout,pointerEvents:"none"});}if(t.pointer?.tool==="laser"){let r=n("laser");Object.assign(r.style,{position:"absolute",zIndex:"76",width:"20px",height:"20px",left:`${t.pointer.x*100}%`,top:`${t.pointer.y*100}%`,transform:"translate(-50%,-50%)",borderRadius:"50%",background:"#ef4444",boxShadow:"0 0 20px 8px #ef444488"});}let o=t.inkStrokes?.filter(r=>r.slideIndex===t.slideIndex);if(o?.length){let r=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");r.classList.add("pptxv-presenter-effect","ink"),r.setAttribute("viewBox","0 0 1 1"),r.setAttribute("preserveAspectRatio","none"),Object.assign(r.style,{position:"absolute",zIndex:"76",inset:"0",width:"100%",height:"100%",pointerEvents:"none"});for(let i of o){let s=e.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polyline");s.setAttribute("points",i.points.map(({x:a,y:l})=>`${a},${l}`).join(" ")),s.setAttribute("fill","none"),s.setAttribute("stroke",i.color),s.setAttribute("stroke-width",String(i.width)),s.setAttribute("vector-effect","non-scaling-stroke"),s.setAttribute("stroke-linecap","round"),s.setAttribute("stroke-linejoin","round"),i.tool==="highlighter"&&s.setAttribute("stroke-opacity",".4"),r.appendChild(s);}e.appendChild(r);}if(t.subtitlesVisible&&t.caption){let r=n("caption");r.textContent=t.caption,Object.assign(r.style,{position:"absolute",zIndex:"77",left:"10%",right:"10%",bottom:"32px",padding:"12px 24px",borderRadius:"8px",background:"#000c",color:"#fff",textAlign:"center",fontSize:"20px"});}}function Sk(e,t,n,o,r,i){if(n.length===0)return;let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-comment-markers",{position:"absolute",inset:"0",pointerEvents:"none",zIndex:"45"}),a=chunkWKWWFY2C_cjs.dn(n,o.width,o.height,r("pptx.comments.unknownAuthor"));for(let l of a){let p=chunk6TALMZ42_cjs.w(e,"button","pptxv-comment-marker",{position:"absolute",left:`${l.x-chunkWKWWFY2C_cjs.cn/2}px`,top:`${l.y-chunkWKWWFY2C_cjs.cn/2}px`,width:`${chunkWKWWFY2C_cjs.cn}px`,height:`${chunkWKWWFY2C_cjs.cn}px`,display:"flex",alignItems:"center",justifyContent:"center",padding:"0",pointerEvents:"auto",cursor:"pointer",borderRadius:"50%",background:"rgba(255, 165, 0, 0.9)",border:"2px solid #fff",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.3)",fontSize:"10px",fontWeight:"700",lineHeight:"1",color:"#fff"});p.type="button",p.title=l.title,p.textContent=l.label,p.addEventListener("click",d=>{d.stopPropagation(),i?.(l.commentId);}),s.appendChild(p);}t.appendChild(s);}var HD={sldImg:"pptx.master.notesMasterSlideImage",body:"pptx.master.notesMasterBody",hdr:"pptx.master.notesMasterHeader",ftr:"pptx.master.notesMasterFooter",dt:"pptx.master.notesMasterDate",sldNum:"pptx.master.notesMasterPageNumber"};function Ck(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div",`pptxv-master-page ${t}`);return r.style.width=`${n.width}px`,r.style.height=`${n.height}px`,r.style.backgroundColor=o??"#ffffff",r}function wk(e,t,n,o,r){if(!n){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-canvas-empty");return l.dataset.testid="notes-master-empty",l.textContent=t("pptx.master.noNotesMaster"),l}let i=Ck(e,"pptxv-notes-master-page",o,n.backgroundColor);i.dataset.testid="notes-master-page";let s=n.placeholders??[{type:"sldImg"},{type:"body"},{type:"hdr"},{type:"ftr"},{type:"dt"},{type:"sldNum"}],a=chunkWKWWFY2C_cjs.dg(n.notesStyle,r);for(let l of s){let p=chunkWKWWFY2C_cjs.Qo[l.type];if(!p)continue;let d=chunk6TALMZ42_cjs.w(e,"div",`pptxv-notes-region is-${l.type}`);d.dataset.region=l.type,d.style.left=`${p.x*o.width}px`,d.style.top=`${p.y*o.height}px`,d.style.width=`${p.w*o.width}px`,d.style.height=`${p.h*o.height}px`,l.type==="body"&&(d.style.fontSize=`${a}px`),d.textContent=t(HD[l.type]??l.type),i.appendChild(d);}return i}var FD=chunkWKWWFY2C_cjs.Ro;function Ek(e,t,n,o,r){if(!n){let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-master-canvas-empty");return s.dataset.testid="handout-master-empty",s.textContent=t("pptx.master.noHandoutMaster"),s}let i=Ck(e,"pptxv-handout-master-page",o,n.backgroundColor);i.dataset.testid="handout-master-page";for(let[s,a]of FD(r).entries()){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-handout-slot");l.dataset.testid="handout-slot",l.style.left=`${a.x*o.width}px`,l.style.top=`${a.y*o.height}px`,l.style.width=`${a.w*o.width}px`,l.style.height=`${a.h*o.height}px`,l.textContent=t("pptx.master.handoutSlideSlot",{number:s+1}),i.appendChild(l);}for(let[s,a]of [["is-top-left","pptx.master.notesMasterHeader"],["is-top-right","pptx.master.notesMasterDate"],["is-bottom-left","pptx.master.notesMasterFooter"],["is-bottom-right","pptx.master.notesMasterPageNumber"]]){let l=chunk6TALMZ42_cjs.w(e,"div",`pptxv-handout-corner ${s}`);l.textContent=t(a),i.appendChild(l);}return i}var Tk=chunkWKWWFY2C_cjs.Zs;function Pk(e,t,n,o){let r=o?{fitPadding:0,maxFitScale:null}:n;{let{horizontal:i,vertical:s}=chunkWKWWFY2C_cjs.ls(r,Tk).fitPadding;e.style.padding=`${s}px ${i}px`;}return chunkWKWWFY2C_cjs.ms({viewportWidth:e.clientWidth,viewportHeight:e.clientHeight,canvasWidth:Math.max(t.width,1),canvasHeight:Math.max(t.height,1),...r},Tk).scale}function VD(e){let t=tp(e);return t?chunkWKWWFY2C_cjs.Xo(ep(e),t):[]}function Hp(e){let{doc:t,store:n,registry:o}=e,r=ls(),i=null,s=null,a=f=>{i=f;},l=(f,y,S=false,h=false,C=n.get().canvasSize)=>{let w=n.get(),T=chunkWKWWFY2C_cjs.Xn(f,w.templateElementsBySlideId[f.id]??[]),k=T.length?{...f,elements:[...T,...f.elements]}:f;return chunk6TALMZ42_cjs.A({document:t,slide:k,canvasSize:C,mediaDataUrls:w.mediaDataUrls,colorScheme:w.colorScheme,fontScheme:w.fontScheme,tableStyleMap:w.tableStyleMap,fieldContext:oi(w,f),registry:o,t:e.getTranslator(),scale:y,gridSpacingPx:chunkWKWWFY2C_cjs.Je(w.viewProperties?.gridSpacing,10),smartArt3D:e.getSmartArt3D(),surfaceChart3D:e.getSurfaceChart3D(),barChart3D:e.getBarChart3D(),lineChart3D:e.getLineChart3D(),areaChart3D:e.getAreaChart3D(),pieChart3D:e.getPieChart3D(),presenting:S,slides:w.slides,currentSlideIndex:w.currentSlide,onZoomClick:e.onZoomClick,onSmartArtNodeTextChange:h?e.onSmartArtNodeTextChange:void 0,onSmartArtNodeFillChange:h?e.onSmartArtNodeFillChange:void 0,onChartPointChange:h?e.onChartPointChange:void 0,onTableResizeColumns:h?e.onTableResizeColumns:void 0,onTableResizeRow:h?e.onTableResizeRow:void 0,chartPartSelection:w.chartPartSelection,onChartPartSelect:h?e.onChartPartSelect:void 0,selectedElementIds:h?new Set(w.selectedElementIds):void 0,interactive:h,templateEditing:w.editTemplateMode||w.masterViewTarget!==null,presentationStates:S?r.elementStates:void 0,captureContext:S?a:void 0})},p=f=>{i&&s&&chunk6TALMZ42_cjs.B(i,s,f);},d=f=>{let y=n.get(),S=e.getChrome().viewport;return Pk(S,f,e.getFitOptions?.()??{},y.presenting)},u=f=>{let y=n.get();return y.zoom!=="fit"?y.zoom:d(f)},c=()=>u(n.get().canvasSize),x=()=>d(n.get().canvasSize),b=()=>{let f=n.get().canvasSize;return u(f)/d(f)*100},g=()=>{let f=e.getChrome(),y=n.get(),S=y.masterViewTarget,h=S?chunkWKWWFY2C_cjs.So({slideMasters:y.slideMasters},{tab:"slides",masterIndex:S.masterIndex,layoutIndex:S.layoutIndex}):y.slides[y.currentSlide],C=S&&y.masterViewTab!=="slides",w=C?y.masterViewTab==="notes"?y.notesCanvasSize??chunkWKWWFY2C_cjs.Po:chunkWKWWFY2C_cjs.Po:y.canvasSize,T=C||!!h;f.setEmpty(!T);let k=u(w);f.stageWrap.style.width=`${w.width*k}px`,f.stageWrap.style.height=`${w.height*k}px`;let A=T&&y.editable&&!y.presenting&&!y.loading?Array.from(f.stageWrap.children).find(I=>I.classList.contains("pptxv-editor-overlay")&&I.querySelector("[data-inline-editor]")):void 0,P=chunkWKWWFY2C_cjs.iu(f.stageWrap);if(A)for(let I of Array.from(f.stageWrap.childNodes))I!==A&&I.remove();else f.stageWrap.replaceChildren();let E=null;if(C){let I=y.masterViewTab==="notes"?y.notesMaster:y.handoutMaster;if(I?.elements?.length)E=l({id:I.path,rId:"",slideNumber:0,elements:I.elements,backgroundColor:I.backgroundColor,backgroundImage:I.backgroundImage},k,false,true,w),E.dataset.testid=y.masterViewTab==="notes"?"notes-master-page":"handout-master-page";else {let D={width:w.width*k,height:w.height*k};E=y.masterViewTab==="notes"?wk(t,e.getTranslator(),y.notesMaster,D,k):Ek(t,e.getTranslator(),y.handoutMaster,D,y.handoutSlidesPerPage);}}else h&&(E=chunkWKWWFY2C_cjs.ju(P,()=>l(h,k,y.presenting,true,w)),y.editable&&!y.presenting&&Sk(t,E,h.comments??[],w,e.getTranslator(),e.onCommentMarkerClick));E&&h&&f.stageWrap.insertBefore(E,A??null);let M=k/d(w)*100;f.ribbon?.update({current:y.currentSlide,total:y.slides.length,zoomPercent:M}),f.statusBar?.update({current:y.currentSlide,total:y.slides.length,zoomPercent:M}),f.presentationTouchControls.update(y.currentSlide,y.slides.length),f.mobileActionSheets?.setThumbnailRenderer((I,D)=>l(I,D),y.canvasSize.width,y.canvasSize.height),f.mobileActionSheets?.update(y.currentSlide,y.slides,h?.comments??[]),f.notes.update({slide:C?void 0:h,editable:y.editable,notesStyle:y.notesMaster?.notesStyle}),e.onStageRendered?.(),E?(s=E,r.syncStage({doc:t,stageWrap:f.stageWrap,stage:E,slide:h,slideIndex:y.currentSlide,presenting:y.presenting,showWithAnimation:y.presentationProperties.showWithAnimation,mediaDataUrls:y.mediaDataUrls,reRenderElements:p,seedCompleted:y.enteringBackward===true,canvasSize:y.canvasSize,themeColorMap:y.colorScheme?chunkWKWWFY2C_cjs.Q(y.colorScheme):void 0,pixelateMosaicAnimation:e.getPixelateMosaicAnimation()})):(s=null,i=null,r.reset());},v=()=>{let f=n.get(),y=e.getChrome().thumbnails;f.masterViewTarget?(y?.setVisible(false),e.getChrome().masterSidebar.setVisible(true),e.getChrome().masterSidebar.render({tab:f.masterViewTab,masters:f.slideMasters,active:f.masterViewTarget,canvasSize:f.canvasSize,notesBackground:f.notesMaster?.backgroundColor,notesPlaceholders:f.notesMaster?.placeholders,notesMasterPresent:!!f.notesMaster,handoutBackground:f.handoutMaster?.backgroundColor,handoutPlaceholders:f.handoutMaster?.placeholders,handoutMasterPresent:!!f.handoutMaster,handoutSlidesPerPage:f.handoutSlidesPerPage,editable:f.editable,crudActions:VD(f),onCrudAction:e.onMasterCrudAction,renderStage:l,onSelect:(S,h)=>{n.set({masterViewTarget:{masterIndex:S,layoutIndex:h},selectedElementId:null,selectedElementIds:[]});},onTabChange:S=>{n.set({masterViewTab:S,selectedElementId:null,selectedElementIds:[]});},onCollapse:()=>{n.set({masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false,selectedElementId:null,selectedElementIds:[]});},onHandoutSlidesPerPageChange:S=>{e.onHandoutSlidesPerPageChange(S);},onMasterBackgroundColorChange:e.onMasterBackgroundColorChange})):(e.getChrome().masterSidebar.setVisible(false),y?.setVisible(true),y?.render(f.slides,f.canvasSize,l,f.sections,f.editable?{toggle:e.onSectionToggle,rename:e.onSectionRename,delete:e.onSectionDelete,move:e.onSectionMove}:void 0));};return {renderAll(){let f=e.getChrome(),y=n.get();f.setLoading(y.loading),f.setError(y.error),f.setPresenting(y.presenting),v(),g(),f.thumbnails?.setActive(y.currentSlide),f.notes.setExpanded(y.notesExpanded),f.ribbon?.setNotesExpanded(y.notesExpanded),f.mobileActionSheets?.setNotesExpanded(y.notesExpanded),f.ribbon?.setTemplateEditing(y.editTemplateMode),f.ribbon?.setViewOptions(y);},renderStage:g,renderThumbnails:v,renderSlideNode:(f,y)=>l(f,y),effectiveScale:c,fitScale:x,zoomPercent:b,presentationPlayback:r}}function Ak(e){let t=gl(e.doc,e.onCreateGuide),n=i=>{if(i.selectedElementIds.length!==1)return null;let s=U(i).find(a=>a.id===i.selectedElementIds[0]);return s?{x:s.x,y:s.y,width:s.width,height:s.height}:null},o=()=>{let i=e.getStageWrap();if(!i)return;t.mount(i);let s=e.store.get();t.update({visible:s.showRulers&&!s.presenting,canvasSize:s.canvasSize,scale:e.getScale(),unit:e.getUnit?.()??"inches",selection:n(s),draggable:s.editable&&!s.presenting});},r=e.store.subscribe(o);return {sync:o,destroy(){r(),t.destroy();}}}var zD={active:true};function vi(e){let{store:t}=e,n="idle",o=null,r=false,i=false,s=false,a=null,l=()=>(e.getActivation?.()??zD).active,p=l(),d=f=>{n=f,e.onStatus?.(f);},u=()=>{o!==null&&(clearTimeout(o),o=null);};async function c(){let f=e.getHandler();if(!(i||!l()||r||!f||!t.get().dirty)){r=true,d("saving");try{let y=await chunkWKWWFY2C_cjs.ep(f,t.get().slides,void 0,chunkWKWWFY2C_cjs.dp(e.getSaveIntent?.()));await chunkWKWWFY2C_cjs.sj(e.filePath,y),a=null,!i&&l()&&d("saved");}catch{!i&&l()&&d("error");}finally{r=false;}}}let x=()=>{if(!l())return;let f=Date.now();a??=f;let y=chunkWKWWFY2C_cjs.Bo({intervalMs:e.getIntervalMs(),firstDirtyAt:a,now:f});u(),o=setTimeout(()=>{o=null,c();},y);},b=f=>{i||!chunkWKWWFY2C_cjs.Co({alreadyChecked:s,filePath:e.filePath,loading:f.loading,error:f.error,slideCount:f.slides.length,autosaveAllowed:e.isRecoveryAllowed?.()??true})||(s=true,chunkWKWWFY2C_cjs.Eo(e.filePath,Date.now(),e.fileName).then(y=>(y&&!i&&(e.onRecovery?.(y.record),e.onRecoveryOffer?.(y)),y)));},g=()=>{let f=l();f===p||i||(p=f,u(),d("idle"),f&&(a=null,t.get().dirty&&x()));},v=t.subscribe((f,y)=>{g(),f.loading&&!y.loading&&(s=false),f.dirty&&(f.dirty!==y.dirty||f.slides!==y.slides)?x():!f.dirty&&y.dirty&&!r&&d("saved"),b(f);});return b(t.get()),{saveNow:c,getStatus:()=>n,refresh:g,isEnabled:l,destroy(){i=true,u(),v();}}}function Fp(e,t,n,o){return new Promise(r=>{let i=false,s=false,a=t(n.titleKey),l=e.createElement("div");l.className="pptxv-parity-backdrop pptxv-autosave-recovery";let p=e.createElement("section");p.className="pptxv-parity-dialog",p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true"),p.setAttribute("aria-label",a),p.setAttribute("data-pptx-autosave-recovery","true");let d=e.createElement("header");d.className="pptxv-parity-header";let u=e.createElement("h2");u.textContent=a,d.append(u);let c=e.createElement("div");c.className="pptxv-parity-body";let x=e.createElement("p");x.className="pptxv-autosave-recovery-message",x.textContent=t(n.messageKey,n.messageParams);let b=e.createElement("p");b.className="pptxv-autosave-recovery-age",b.textContent=t("pptx.autosave.recovery.savedLabel",{when:t(n.ageKey,n.ageParams)}),c.append(x,b);let g=e.createElement("footer");g.className="pptxv-parity-footer";let v=e.createElement("button");v.type="button",v.textContent=t(n.discardKey),v.setAttribute("aria-label",t(n.discardKey));let f=e.createElement("button");f.type="button",f.className="is-primary",f.textContent=t(n.restoreKey),f.setAttribute("aria-label",t(n.restoreKey)),g.append(v,f);let y=h=>{s||(s=true,e.removeEventListener("keydown",S),l.remove(),r(h));},S=h=>{h.key==="Escape"&&!i&&y("dismiss");};v.addEventListener("click",()=>{i||(i=true,p.setAttribute("aria-busy","true"),v.disabled=true,f.disabled=true,(async()=>{try{await o?.(),y("discard");}catch{i=false,p.removeAttribute("aria-busy"),v.disabled=false,f.disabled=false;}})());}),f.addEventListener("click",()=>{i||y("restore");}),e.addEventListener("keydown",S),p.append(d,c,g),l.append(p),e.body.append(l),queueMicrotask(()=>f.focus());})}function Vp(e){let t=e.hostAutosave??true,n,o=()=>chunkWKWWFY2C_cjs.zo({hostAutosave:e.hostAutosave,userEnabled:t,canEdit:e.store.get().editable,filePath:e.filePath}),r=null,i=false,s=async d=>{i=true;try{if(await Fp(e.doc,e.getTranslator(),d.prompt,()=>chunkWKWWFY2C_cjs.Go(d.record))==="restore"){chunkWKWWFY2C_cjs.nj(d.record);try{await e.loadFile(chunkWKWWFY2C_cjs.Fo(d.record));}catch(c){throw chunkWKWWFY2C_cjs.oj(d.record),c}}}finally{i=false;}},a=()=>{let d=r;!d||i||!chunkWKWWFY2C_cjs.Do({prompt:d.prompt,presenting:e.store.get().presenting})||(r=null,s(d).catch(()=>{}));},l=e.store.subscribe((d,u)=>{u.presenting&&!d.presenting&&a();}),p=vi({store:e.store,getHandler:e.getHandler,filePath:e.filePath,fileName:e.fileName,getIntervalMs:()=>chunkWKWWFY2C_cjs.Ao({hostIntervalMs:e.hostIntervalMs,optionsIntervalSeconds:n}),getSaveIntent:e.getSaveIntent,onStatus:e.onStatus,getActivation:o,isRecoveryAllowed:()=>e.hostAutosave!==false,onRecovery:e.onRecovery,onRecoveryOffer:d=>{r=d,a();}});return {saveNow:()=>p.saveNow(),isEnabled:()=>p.isEnabled(),isPreferred:()=>o().toggleAvailable&&t,getActivation:o,setEnabled(d){return !o().toggleAvailable||t===d?false:(t=d,p.refresh(),true)},setOptionsIntervalMs(d){n=typeof d=="number"&&Number.isFinite(d)?d/1e3:void 0;},destroy:()=>{l(),p.destroy();}}}var BD="Presenter";function kk(e,t){return {...e,userName:t?.trim()||BD,role:"owner"}}function Ct(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-field"),i=chunk6TALMZ42_cjs.w(e,"label","pptxv-modal-label");i.textContent=t,r.appendChild(i);let s=e.createElement("input");return s.type="text",s.className="pptxv-modal-input",s.placeholder=n,s.addEventListener("input",()=>o(s.value)),r.appendChild(s),{el:r,input:s}}function hi(e,t,n,o){let r=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-field"),i=chunk6TALMZ42_cjs.w(e,"label","pptxv-modal-label");i.textContent=n,r.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-link-row");r.appendChild(s);let a=e.createElement("input");a.type="text",a.className="pptxv-modal-input",a.readOnly=true,a.addEventListener("focus",()=>a.select()),s.appendChild(a);let l=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-btn");return l.type="button",l.textContent=t("pptx.broadcast.copyLinkBtn"),l.addEventListener("click",o),s.appendChild(l),{el:r,input:a,setValue(p){a.value=p;},setCopied(p){l.textContent=t(p?"pptx.share.copied":"pptx.broadcast.copyLinkBtn");}}}function yi(e,t,n){let o=false,r,i=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-backdrop");i.hidden=true,i.addEventListener("pointerdown",b=>{b.target===i&&n.onClose();});let s=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-panel");s.tabIndex=-1,s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.addEventListener("pointerdown",b=>b.stopPropagation()),i.appendChild(s);let a=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-header");s.appendChild(a);let l=chunk6TALMZ42_cjs.w(e,"h2","pptxv-modal-title");a.appendChild(l);let p=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-close");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.settings.close")),p.addEventListener("click",()=>n.onClose()),a.appendChild(p);let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-body");s.appendChild(d);let u=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-footer");s.appendChild(u);function c(b){l.textContent=b,s.setAttribute("aria-label",b);}c(n.title);function x(){let b=n.themeHost?.(),g=b?.ownerDocument.defaultView;if(!b||!g)return;let v=g.getComputedStyle(b);for(let f of Object.keys(chunkWKWWFY2C_cjs.jt())){let y=v.getPropertyValue(f).trim();y&&i.style.setProperty(f,y);}}return {el:i,bodyEl:d,footerEl:u,setTitle(b){c(b);},setOpen(b){b!==o&&(o=b,i.hidden=!b,b?(x(),r=chunkWKWWFY2C_cjs.um(s,{onEscape:n.onClose})):(r?.(),r=void 0));},destroy(){r?.(),i.remove();}}}var ND=2e3;function Ik(e,t,n,o){let r=chunkWKWWFY2C_cjs.Cj(),i=false,s=null,a=yi(e,t,{title:t("pptx.broadcast.startTitle"),onClose:()=>a.setOpen(false),themeHost:o});e.body.appendChild(a.el);let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-section"),p=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-desc");p.textContent=t("pptx.broadcast.idleDesc"),l.appendChild(p);let d=Ct(e,t("pptx.broadcast.roomId"),t("pptx.broadcast.roomIdPlaceholder"),T=>{r={...r,roomId:T},w();});l.appendChild(d.el);let u=Ct(e,t("pptx.broadcast.serverUrl"),t("pptx.broadcast.serverUrlPlaceholder"),T=>{r={...r,serverUrl:T},w();}),c=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-hint");c.textContent=t("pptx.broadcast.p2pHint"),u.el.appendChild(c),l.appendChild(u.el);let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-section"),b=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-desc");b.textContent=t("pptx.broadcast.liveDesc"),x.appendChild(b);let g=hi(e,t,t("pptx.broadcast.viewerLink"),()=>{C();});x.appendChild(g.el);let v=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-hint");v.textContent=t("pptx.broadcast.viewerHint"),x.appendChild(v);let f=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-hint");f.textContent=t("pptx.broadcast.p2pServerValue"),x.appendChild(f);let y=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-danger-btn");y.type="button",y.textContent=t("pptx.broadcast.stopBroadcast"),y.addEventListener("click",()=>n.onStop()),x.appendChild(y),a.bodyEl.append(l,x);let S=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-btn");S.type="button",S.textContent=t("pptx.common.close"),S.addEventListener("click",()=>a.setOpen(false)),a.footerEl.appendChild(S);let h=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");h.type="button",h.textContent=t("pptx.broadcast.startBroadcast"),h.addEventListener("click",()=>{let T=chunkWKWWFY2C_cjs.Ej(r);T&&n.onStart(T);}),a.footerEl.appendChild(h);async function C(){chunkWKWWFY2C_cjs.Gj(typeof navigator>"u"?void 0:navigator)&&(await navigator.clipboard.writeText(g.input.value),g.setCopied(true),s!==null&&clearTimeout(s),s=setTimeout(()=>g.setCopied(false),ND));}function w(){a.setTitle(t(i?"pptx.broadcast.broadcastingTitle":"pptx.broadcast.startTitle")),l.hidden=i,x.hidden=!i,h.hidden=i,h.disabled=!chunkWKWWFY2C_cjs.Dj(r),c.hidden=chunkWKWWFY2C_cjs.Bj(r.serverUrl)!=="webrtc",d.input.value=r.roomId,u.input.value=r.serverUrl;}return w(),{el:a.el,open(T,k,A){i=k,i||(r=chunkWKWWFY2C_cjs.Cj(T)),g.setValue(A),g.setCopied(false),w(),a.setOpen(true);},close(){a.setOpen(false);},setActive(T,k){i=T,g.setValue(k),w();},destroy(){s!==null&&clearTimeout(s),a.destroy();}}}var _D="M0 0 L0 16 L4.5 12.5 L8 20 L10.5 19 L7 11.5 L12 11 Z";function xo(e){let t=chunk6TALMZ42_cjs.w(e,"div","pptxv-collab-cursors");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-collab-cursor");i.dataset.clientId=String(r),i.dataset.pptxRemoteCursor=String(r);let s=chunk6TALMZ42_cjs.x(e,"svg",{width:20,height:22,viewBox:"0 0 20 22",focusable:"false"});s.setAttribute("class","pptxv-collab-pointer");let a=chunk6TALMZ42_cjs.x(e,"path",{d:_D,stroke:"#ffffff","stroke-width":1});s.appendChild(a),i.appendChild(s);let l=chunk6TALMZ42_cjs.w(e,"span","pptxv-collab-label");return i.appendChild(l),t.appendChild(i),{root:i,path:a,label:l}}return {el:t,update(r,i){let s=new Set;for(let a of r){s.add(a.clientId);let l=n.get(a.clientId);l||(l=o(a.clientId),n.set(a.clientId,l)),l.root.style.transform=`translate(${a.x*i}px, ${a.y*i}px)`,chunk6TALMZ42_cjs.y(l.path,{fill:a.color}),l.label.textContent=chunkWKWWFY2C_cjs.jh(a.userName),l.label.style.backgroundColor=a.color;}for(let[a,l]of n)s.has(a)||(l.root.remove(),n.delete(a));},destroy(){t.remove();}}}var Lk={connected:"pptx.collaboration.status.connected",connecting:"pptx.collaboration.status.connecting",disconnected:"pptx.collaboration.status.disconnected",error:"pptx.collaboration.status.error"};function Mk(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"span","pptxv-collab-status");o.hidden=true,o.setAttribute("role","status"),o.setAttribute("data-testid","collaboration-status");let r=chunk6TALMZ42_cjs.w(e,"span","pptxv-collab-status-dot");o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"span","pptxv-collab-status-text");o.appendChild(i);let s=chunk6TALMZ42_cjs.w(e,"button","pptxv-collab-status-retry");return s.type="button",s.textContent=t("pptx.collaboration.retry"),s.hidden=true,s.addEventListener("click",n),o.appendChild(s),{el:o,update(a,l){o.hidden=a==="disconnected",r.className=`pptxv-collab-status-dot is-${a}`,i.textContent=a==="connected"?l===1?t("pptx.collaboration.onePersonHere"):t("pptx.collaboration.peopleHere",{count:l}):t(Lk[a]),s.hidden=a!=="error",o.setAttribute("aria-label",t("pptx.collaboration.statusAriaLabel",{status:t(Lk[a]),count:l}));},destroy(){o.remove();}}}var GD=2;function UD(e){let t=e.trim().split(/\s+/u);return t.length>=2&&t[0]&&t[t.length-1]?(t[0][0]+t[t.length-1][0]).toUpperCase():e.slice(0,GD).toUpperCase()||"?"}function Dk(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-follow-bar");o.dataset.exportIgnore="true",o.hidden=true;let r=chunk6TALMZ42_cjs.w(e,"span","pptxv-follow-status");o.appendChild(r);let i=chunk6TALMZ42_cjs.w(e,"ul","pptxv-follow-list");o.appendChild(i);let s=new Map;function a(p){if(r.replaceChildren(),!p){r.textContent=t("pptx.followMode.followCollaborator");return}r.append(`${t("pptx.followMode.following")} `);let d=chunk6TALMZ42_cjs.w(e,"strong");d.textContent=p.userName,r.appendChild(d),r.append(" ");let u=chunk6TALMZ42_cjs.w(e,"button","pptxv-follow-stop");u.type="button",u.textContent=t("pptx.followMode.stop"),u.title=t("pptx.followMode.stopFollowing"),u.addEventListener("click",()=>n.onFollow(null)),r.appendChild(u);}function l(p){let d=s.get(p.clientId);if(d)return d;let u=chunk6TALMZ42_cjs.w(e,"button","pptxv-follow-peer");u.type="button",u.appendChild(chunk6TALMZ42_cjs.w(e,"span","pptxv-follow-avatar")),u.appendChild(chunk6TALMZ42_cjs.w(e,"span","pptxv-follow-name"));let c=chunk6TALMZ42_cjs.w(e,"li");return c.appendChild(u),i.appendChild(c),s.set(p.clientId,u),u}return {el:o,update(p,d){if(o.hidden=p.length===0,o.hidden)return;let u=p.find(x=>x.clientId===d)??null;a(u);let c=new Set;for(let x of p){c.add(x.clientId);let b=l(x),g=b.firstElementChild,v=b.lastElementChild;g.textContent=UD(x.userName),g.style.backgroundColor=x.userColor,v.textContent=x.userName;let f=x.clientId===d;b.classList.toggle("is-following",f),b.setAttribute("aria-pressed",String(f)),b.title=f?t("pptx.followMode.stopFollowingUser",{name:x.userName}):t("pptx.followMode.followUser",{name:x.userName}),b.onclick=()=>n.onFollow(f?null:x.clientId);}for(let[x,b]of s)c.has(x)||(b.closest("li")?.remove(),s.delete(x));},destroy(){o.remove();}}}var KD=20;function Si(e){let t=chunk6TALMZ42_cjs.w(e,"div","pptxv-remote-selections");t.setAttribute("aria-hidden","true"),t.dataset.exportIgnore="true";let n=new Map;function o(r){let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-remote-selection");i.dataset.selectionKey=r;let s=chunk6TALMZ42_cjs.w(e,"span","pptxv-remote-selection-label");return i.appendChild(s),t.appendChild(i),{root:i,label:s}}return {el:t,update(r,i,s,a){let l=new Map;for(let d of i)l.set(d.id,d);let p=new Set;for(let d of r){if(d.activeSlideIndex!==s||!d.selectedElementId)continue;let u=l.get(d.selectedElementId);if(!u)continue;let c=`${d.clientId}-${u.id}`;p.add(c);let x=n.get(c);x||(x=o(c),n.set(c,x)),x.root.dataset.pptxRemoteSelection=u.id,x.root.style.transform=`translate(${u.x*a}px, ${u.y*a}px)`,x.root.style.width=`${u.width*a}px`,x.root.style.height=`${u.height*a}px`,x.root.style.borderColor=d.userColor,x.label.textContent=chunkWKWWFY2C_cjs.jh(d.userName,KD),x.label.style.backgroundColor=d.userColor;}for(let[d,u]of n)p.has(d)||(u.root.remove(),n.delete(d));},destroy(){t.remove();}}}function Rk(e,t,n,o,r){let i=chunkWKWWFY2C_cjs.Kj(),s=false,a="create",l="",p={status:"disconnected",connectedCount:0,config:null,remoteUsers:[]},d=false,u,c=yi(e,t,{title:t("pptx.toolbar.share"),onClose:()=>c.setOpen(false),themeHost:o});e.body.appendChild(c.el);let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-section"),b=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-desc");b.textContent=t("pptx.share.formDescription");let g=chunk6TALMZ42_cjs.w(e,"div","pptxv-share-tabs");g.setAttribute("role","tablist");let v=chunk6TALMZ42_cjs.w(e,"button");v.type="button",v.textContent=t("pptx.share.createSession");let f=chunk6TALMZ42_cjs.w(e,"button");f.type="button",f.textContent=t("pptx.share.joinSession"),g.append(v,f),x.append(g,b);let y=Ct(e,t("pptx.share.invitationLabel"),t("pptx.share.invitationPlaceholder"),_=>{l=_,ie();});x.appendChild(y.el);let S=Ct(e,t("pptx.share.roomId"),t("pptx.share.roomIdPlaceholder"),_=>{i={...i,roomId:_},ie();});x.appendChild(S.el);let h=Ct(e,t("pptx.share.yourName"),t("pptx.share.yourNamePlaceholder"),_=>{i={...i,userName:_},ie();});x.appendChild(h.el);let C=Ct(e,t("pptx.share.serverUrl"),t("pptx.share.serverPlaceholder"),_=>{i={...i,serverUrl:_},ie();}),w=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-hint");w.textContent=t("pptx.share.p2pHint"),C.el.appendChild(w),x.appendChild(C.el);let T=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-section"),k=chunk6TALMZ42_cjs.w(e,"div","pptxv-share-status-row"),A=chunk6TALMZ42_cjs.w(e,"span","pptxv-collab-status-dot");k.appendChild(A);let P=chunk6TALMZ42_cjs.w(e,"span","pptxv-share-status-text");k.appendChild(P);let E=chunk6TALMZ42_cjs.w(e,"span","pptxv-share-count");k.appendChild(E),T.appendChild(k);let M=hi(e,t,t("pptx.share.shareLink"),()=>{M.input.value&&e.defaultView?.navigator.clipboard.writeText(M.input.value).then(()=>{d=true,M.setCopied(true),clearTimeout(u),u=setTimeout(()=>{d=false,M.setCopied(false);},2e3);});});T.appendChild(M.el);let I=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-hint");I.textContent=t("pptx.share.shareHint"),T.appendChild(I);let D=chunk6TALMZ42_cjs.w(e,"div","pptxv-share-details"),L=chunk6TALMZ42_cjs.w(e,"span");D.appendChild(L);let O=chunk6TALMZ42_cjs.w(e,"span");D.appendChild(O),T.appendChild(D);let R=chunk6TALMZ42_cjs.w(e,"p","pptxv-modal-hint");R.textContent=t("pptx.share.p2pServerValue"),T.appendChild(R);let F=chunk6TALMZ42_cjs.w(e,"div","pptxv-modal-field"),H=chunk6TALMZ42_cjs.w(e,"label","pptxv-modal-label");H.textContent=t("pptx.share.connectedUsers"),F.appendChild(H);let V=chunk6TALMZ42_cjs.w(e,"div","pptxv-share-users-list");F.appendChild(V),T.appendChild(F);let N=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-danger-btn");N.type="button",N.textContent=t("pptx.share.stopSharing"),N.addEventListener("click",()=>n.onStop()),T.appendChild(N),c.bodyEl.append(x,T);let B=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-btn");B.type="button",B.addEventListener("click",()=>c.setOpen(false)),c.footerEl.appendChild(B);let $=chunk6TALMZ42_cjs.w(e,"button","pptxv-modal-btn pptxv-modal-btn-primary");$.type="button",$.textContent=t("pptx.share.startSharing"),$.addEventListener("click",()=>{let _=a==="join"?chunkWKWWFY2C_cjs.Hj({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):chunkWKWWFY2C_cjs.Mj(i);_&&n.onStart(_);}),c.footerEl.appendChild($);function Y(){let _=p.config,K=chunkWKWWFY2C_cjs.Bj(_?.serverUrl??"")==="webrtc";A.className=`pptxv-collab-status-dot is-${p.status}`,P.textContent=p.status,E.textContent=t("pptx.collaboration.userCount",{count:p.connectedCount});let q=_?chunkWKWWFY2C_cjs.Jj(_,e.defaultView?{origin:e.defaultView.location.origin,pathname:e.defaultView.location.pathname}:void 0):"";M.el.hidden=!q,I.hidden=!q,M.setValue(q),M.setCopied(d),D.hidden=!_,_&&(L.replaceChildren(`${t("pptx.share.room")} `,Object.assign(e.createElement("code"),{textContent:_.roomId})),O.replaceChildren(`${t("pptx.share.server")} `,Object.assign(e.createElement("code"),{textContent:K?t("pptx.share.p2pServerValue"):_.serverUrl}))),R.hidden=!!_||!K;let j=_?chunkWKWWFY2C_cjs.vh({localUserName:_.userName,localUserInitials:r?.(),localUserColor:_.userColor,remoteUsers:p.remoteUsers}):[];F.hidden=j.length===0,V.replaceChildren(...j.map(ue=>{let Te=chunk6TALMZ42_cjs.w(e,"div","pptxv-share-user"),Me=chunk6TALMZ42_cjs.w(e,"span","pptxv-share-user-avatar");if(Me.style.backgroundColor=ue.color,ue.avatarUrl){let ne=e.createElement("img");ne.src=ue.avatarUrl,ne.alt="",Me.appendChild(ne);}else Me.textContent=ue.initials;Te.appendChild(Me);let Yo=chunk6TALMZ42_cjs.w(e,"span","pptxv-share-user-name");Yo.textContent=ue.name,Te.appendChild(Yo);let Et=chunk6TALMZ42_cjs.w(e,"span","pptxv-share-user-tag");return Et.textContent=ue.isLocal?t("pptx.share.you"):t("pptx.notes.slideN",{n:ue.slideNumber??1}),Te.appendChild(Et),Te}));}function ie(){c.setTitle(t(s?"pptx.share.collaborationActive":"pptx.toolbar.share")),x.hidden=s,T.hidden=!s,$.hidden=s,B.textContent=t(s?"pptx.share.close":"pptx.share.cancel"),v.setAttribute("aria-selected",String(a==="create")),f.setAttribute("aria-selected",String(a==="join")),b.textContent=t(a==="join"?"pptx.share.joinDescription":"pptx.share.formDescription"),y.el.hidden=a!=="join",S.el.hidden=a==="join",$.textContent=t(a==="join"?"pptx.share.joinSession":"pptx.share.startSharing"),$.disabled=a==="join"?!chunkWKWWFY2C_cjs.Ij({invitation:l,userName:i.userName,serverUrl:i.serverUrl}):!chunkWKWWFY2C_cjs.Lj(i),w.hidden=chunkWKWWFY2C_cjs.Bj(i.serverUrl)!=="webrtc",S.input.value=i.roomId,h.input.value=i.userName,C.input.value=i.serverUrl,y.input.value=l,Y();}return v.addEventListener("click",()=>{a="create",ie();}),f.addEventListener("click",()=>{a="join",ie();}),ie(),{el:c.el,open(_,K){s=K,s||(i=chunkWKWWFY2C_cjs.Kj(_),l=""),ie(),c.setOpen(true);},close(){c.setOpen(false);},setActive(_){s=_,ie();},updateSession(_){p=_,Y();},destroy(){clearTimeout(u),c.destroy();}}}function Ok(e){let{doc:t}=e,n=e.getTranslator(),o=e.getChrome(),r="",i="";function s(){if(!r)return "";let E=t.defaultView?.location;return chunkWKWWFY2C_cjs.Fj(r,i,E?{origin:E.origin,pathname:E.pathname}:void 0)}let a=()=>e.getChrome().root,l=Rk(t,n,{onStart:E=>{e.startCollaboration(E).then(()=>l.setActive(true));},onStop:()=>{e.stopCollaboration(),l.setActive(false),l.close();}},a,e.getUserInitials),p=Ik(t,n,{onStart:E=>{r=E.roomId,i=E.serverUrl;let M=kk(E,e.shareDefaults?.userName);e.startCollaboration(M).then(()=>p.setActive(true,s()));},onStop:()=>{e.stopCollaboration(),r="",i="",p.setActive(false,""),p.close();}},a),d=Mk(t,n,()=>{let E=e.getConfig();E&&e.startCollaboration(E);}),u=null,c=null,x=()=>{l.open(e.shareDefaults,e.getStatus()!=="disconnected");},b=()=>{p.open({roomId:r,serverUrl:i},e.getStatus()!=="disconnected",s());},g=!chunkWKWWFY2C_cjs.Tp("share",e.hiddenActions),v=o.ribbon?.el.querySelector(".pptxv-ribbon-primary")??null,f=o.ribbon?.el.querySelector(".pptxv-tabrow-actions")??null;if(v){if(g){if(u=chunk6TALMZ42_cjs.w(t,"button",f?"pptxv-tabrow-share":"pptxv-btn"),u.type="button",u.title=n("pptx.toolbar.share"),u.setAttribute("aria-label",n("pptx.toolbar.share")),u.appendChild(chunk6TALMZ42_cjs.K(t,"share")),f){let E=chunk6TALMZ42_cjs.w(t,"span");E.textContent=n("pptx.toolbar.share"),u.appendChild(E);}u.addEventListener("click",x),(f??v).appendChild(u);}e.showCollaborationStatus!==false&&v.appendChild(d.el);}let y=o.mobileToolbar?.collaborationHost??null;y&&g&&(c=chunk6TALMZ42_cjs.w(t,"button","pptxv-mobile-toolbar-btn pptxv-mobile-share"),c.type="button",c.title=n("pptx.toolbar.share"),c.setAttribute("aria-label",n("pptx.toolbar.share")),c.appendChild(chunk6TALMZ42_cjs.K(t,"share")),c.addEventListener("click",x),y.appendChild(c));let S=xo(t),h=Si(t),C=Dk(t,n,{onFollow:E=>e.followUser(E)});function w(){let E=e.getChrome(),M=E.stageWrap;h.el.parentElement!==M&&M.appendChild(h.el),S.el.parentElement!==M&&M.appendChild(S.el),C.el.parentElement!==E.root&&E.root.appendChild(C.el);}function T(E){return e.getStatus()==="disconnected"?0:E.remotePresences.length+1}function k(E){return {status:e.getStatus(),connectedCount:T(E),config:e.getConfig(),remoteUsers:E.remotePresences}}function A(E){w(),S.update(E.cursors,e.getScale()),h.update(E.remotePresences,E.slides[E.currentSlide]?.elements??[],E.currentSlide,e.getScale()),C.update(E.remotePresences,E.followedClientId),d.update(e.getStatus(),T(E)),l.updateSession(k(E));}A(e.store.get());let P=e.store.subscribe((E,M)=>{(E.cursors!==M.cursors||E.remotePresences!==M.remotePresences||E.followedClientId!==M.followedClientId||E.currentSlide!==M.currentSlide||E.slides!==M.slides||E.zoom!==M.zoom)&&A(E);});return {onStatusChange(E){A(e.store.get()),E==="disconnected"&&(l.setActive(false),p.setActive(false,""));},openShare:x,openBroadcast:b,destroy(){P(),u?.remove(),c?.remove(),d.destroy(),S.destroy(),h.destroy(),C.destroy(),l.destroy(),p.destroy();}}}function Hk(e){let{provider:t,transport:n}=e,o=null;function r(){o!==null&&(clearTimeout(o),o=null);}function i(){e.isActive()&&(e.setStatus("disconnected"),e.reArmGate());}return n==="webrtc"?(e.setStatus("connected"),t.onStatus(s=>{s?e.setStatus("connected"):i();}),{cancelConnectTimer:r}):(t.onStatus(s=>{s?(r(),e.setStatus("connected")):i();}),t.connectedNow?e.setStatus("connected"):o=setTimeout(()=>{o=null,e.onConnectTimeout();},chunkWKWWFY2C_cjs.eh),{cancelConnectTimer:r})}function Fk(e){let t=false,n=null;return {isReadOnly:()=>t,setReadOnly(o){o!==t&&(t=o,e.onReadOnlyChange?e.onReadOnlyChange(o):o?(n=e.store.get().editable,e.setEditable(false)):n!==null&&(e.setEditable(n),n=null));}}}function Vk(e,t,n){let o=chunkWKWWFY2C_cjs.sh(e,{gate:n.gate,factories:n.factories,livePatcher:n.livePatcher,role:t.role,sessionIntent:t.sessionIntent,adoptSlides:n.adoptSlides,onStatus:n.setStatus,onReadOnlyChange:n.setReadOnly,onSuspend:n.cancelWriteBack,onReady:({seedEmptyRoom:r})=>{r&&n.resetBaseline(),n.flushLocal();}});return {contentLoaded(r){!o.handleLoad(r)&&o.canWrite()&&n.flushLocal();},dispose:o}}var WD=1e5;function zk(e){return e!==void 0&&e>0?e:WD}function Bk(e,t,n,o){let r=chunkWKWWFY2C_cjs.th(t,n),i=t.clientID??-1,s=0,a=chunkWKWWFY2C_cjs.uh();function l(){let{width:d,height:u}=o(),{list:c,cursors:x,changed:b}=a.project(t.getStates(),i,zk(d),zk(u),s);if(!b)return;let g=e.get().followedClientId;e.set({remotePresences:c,cursors:x,followedClientId:g!==null&&!c.some(v=>v.clientId===g)?null:g});}t.on("change",l),t.on("update",l);let p=setInterval(()=>r.flush(),chunkWKWWFY2C_cjs.fh);return l(),{setCursor(d,u,c=s){s=c,r.update({cursorX:d,cursorY:u,activeSlideIndex:c});},setSelection(d,u=s){s=u,r.update({selectedElementId:d,activeSlideIndex:u});},setActiveSlide(d){s=Math.max(0,Math.floor(d)),r.update({activeSlideIndex:s}),l();},followUser(d){e.set({followedClientId:d});},destroy(){clearInterval(p),t.off?.("change",l),t.off?.("update",l),r.dispose(),e.set({remotePresences:[],cursors:[],followedClientId:null});}}}async function zp(e,t,n){if(e==="webrtc"){let{WebrtcProvider:s}=await import('y-webrtc'),a=new s(t.roomId,n,{signaling:t.signaling?.length?t.signaling:void 0,password:t.authToken||void 0}),l=chunkWKWWFY2C_cjs.Fh(t.roomId,a.awareness);return {awareness:a.awareness,onStatus:p=>a.on("status",d=>p(!!d.connected)),connectedNow:true,onSynced:p=>a.on("synced",d=>{d?.synced!==false&&p();}),syncedNow:false,destroy:()=>{l.announce(),l.dispose(),chunkWKWWFY2C_cjs.Eh(a.awareness),a.destroy();}}}let{WebsocketProvider:o}=await import('y-websocket'),r=new o(t.serverUrl,t.roomId,n,{params:t.authToken?{token:t.authToken}:void 0}),i=chunkWKWWFY2C_cjs.Fh(t.roomId,r.awareness);return {awareness:r.awareness,onStatus:s=>r.on("status",a=>{a.status==="connected"?s(true):a.status==="disconnected"&&s(false);}),connectedNow:r.wsconnected,onSynced:s=>r.on("sync",a=>{a&&s();}),syncedNow:r.synced,destroy:()=>{i.announce(),i.dispose(),chunkWKWWFY2C_cjs.Eh(r.awareness),r.disconnect(),r.destroy();}}}async function Nk(e,t){let n=await import('yjs'),o=e.externalSession?.doc??new n.Doc,r={createMap:()=>new n.Map,createArray:()=>new n.Array,createText:()=>new n.Text,createTextPositions:i=>chunkWKWWFY2C_cjs.Ah(i,{read:()=>n.snapshot(o),equal:n.equalSnapshots,subscribeBeforeObservers:s=>(o.on("beforeObserverCalls",s),()=>o.off("beforeObserverCalls",s))})};if(e.externalSession){let i=chunkWKWWFY2C_cjs.mh(e.externalSession.awareness);return {doc:e.externalSession.doc,factories:r,awareness:i.awareness,dispose:i.dispose}}try{let i=await zp(t,e,o);return {doc:o,factories:r,awareness:i.awareness,provider:i,dispose(){i.destroy(),o.destroy();}}}catch(i){throw o.destroy(),i}}function _k(e,t){let n="",o=false;function r(l,p,d,u){if(!l||!p||o||u)return;let c=e.get().slides,x=JSON.stringify(c);x!==n&&(n=x,chunkWKWWFY2C_cjs.rh(c,l,p),d&&t(d));}function i(l,p,d=false){if(!l)return false;let u=chunkWKWWFY2C_cjs.oh(l);return u.length===0&&!d?false:(s(u,p),true)}function s(l,p){n=JSON.stringify(l),o=true;try{e.set({slides:l,currentSlide:Vt(e.get().currentSlide,l.length)});}finally{o=false;}t(p);}function a(){n="",o=false;}return {flushLocalSlides:r,applyRemoteSlides:i,adoptSlides:s,isApplyingRemote:()=>o,reset:a}}function Gk(e){return chunkWKWWFY2C_cjs.Gh({getYDoc:e.getYDoc,serialize:()=>{let t=e.getYDoc(),n=e.getHandler();return !t||!n?null:n.save(chunkWKWWFY2C_cjs.oh(t),e.getSaveOptions?.())}})}function zt(e){let{store:t}=e,n="disconnected",o=false,r=null,i=0,s=null,a=null,l=null,p=null,d=Fk(e),u=null,c=null,x=null,b=null,g=false,v=chunkWKWWFY2C_cjs.wh();function f(E){E!==n&&(n=E,e.onStatusChange?.(E));}let y=Gk({getYDoc:()=>a,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions}),S=_k(t,E=>{(!E.externalSession||C.isOpen())&&y.schedule(E);});function h(){S.flushLocalSlides(a,l,u,d.isReadOnly());}let C=chunkWKWWFY2C_cjs.Bh(h);async function w(E){A();let M=i;u=E;try{chunkWKWWFY2C_cjs.hh(E.roomId);}catch{f("error");return}let I=E.transport??chunkWKWWFY2C_cjs.Bj(E.serverUrl);if(!E.externalSession&&I==="websocket"&&chunkWKWWFY2C_cjs.ih(E.serverUrl)){f("error");return}f("connecting"),d.setReadOnly(!!E.externalSession||E.role==="viewer");try{let D=await Nk(E,I);if(M!==i){D.dispose();return}if(r=D,a=D.doc,l=D.factories,p=Bk(t,D.awareness,{userName:E.userName,userColor:E.userColor??chunkWKWWFY2C_cjs.gh,userAvatar:E.userAvatar,role:E.role},()=>({width:t.get().canvasSize.width,height:t.get().canvasSize.height})),E.externalSession||(c=chunkWKWWFY2C_cjs.ph(a,(L,O)=>{O?.origin===chunkWKWWFY2C_cjs.qh||S.isApplyingRemote()||S.applyRemoteSlides(a,E);})),x=t.subscribe((L,O)=>{L.slides!==O.slides&&!g&&C.isOpen()&&h();}),o=!0,E.externalSession)s=Vk(E.externalSession,E,{factories:D.factories,livePatcher:v,gate:C,setStatus:f,setReadOnly:d.setReadOnly,flushLocal:h,resetBaseline:S.reset,cancelWriteBack:y.cancel,adoptSlides:L=>S.adoptSlides(L,E)});else if(D.provider){let L=D.provider;v.configure(d.isReadOnly()?null:a,d.isReadOnly()?null:l),L.onSynced(()=>C.open()),L.syncedNow?C.open():C.arm(),b=Hk({provider:L,transport:I,setStatus:f,isActive:()=>o,reArmGate:()=>{C.reset(),C.arm();},onConnectTimeout:()=>{n!=="connected"&&(A(),f("error"));}});}}catch{M===i&&(A(),f("error"));}}function T(E){g=true;}function k(E){let M=g;if(g=false,!(!o||!a||!u)){if(s){s.contentLoaded(E);return}chunkWKWWFY2C_cjs.Ch(E,chunkWKWWFY2C_cjs.oh(a).length)&&S.applyRemoteSlides(a,u)||M&&C.isOpen()&&h();}}function A(){i+=1,s?.dispose(),s=null,b?.cancelConnectTimer(),b=null,g=false,y.cancel(),C.reset(),S.reset(),c?.(),c=null,x?.(),x=null,p?.destroy(),p=null,r?.dispose(),r=null,a=null,l=null,v.configure(null,null),o=false,d.setReadOnly(false),f("disconnected");}let P=chunkWKWWFY2C_cjs.Dh({leaveOnBeforeUnload:()=>!u?.externalSession,leave:A,rejoin:()=>{u&&w(u);}});return {start:w,stop:A,isActive:()=>o,isReadOnly:d.isReadOnly,getStatus:()=>n,setCursor:(E,M,I)=>p?.setCursor(E,M,I),setSelection:(E,M)=>p?.setSelection(E,M),setActiveSlide:E=>p?.setActiveSlide(E),followUser:E=>p?.followUser(E??null),getConfig:()=>u,beginContentLoad:T,notifyContentLoaded:k,livePatcher:v,destroy:()=>{P(),A();}}}var $D="presentation.pptx";function qD(e,t){switch(e){case "saving":return t("pptx.autosave.saving");case "saved":return t("pptx.autosave.savedShort");case "error":return t("pptx.autosave.saveFailed");default:return ""}}function Uk(e){let{options:t}=e,n=Vp({doc:e.doc,store:e.store,getHandler:e.getHandler,getTranslator:e.getTranslator,hostAutosave:t.autosave,hostIntervalMs:t.autosaveIntervalMs,filePath:t.autosaveFilePath??$D,fileName:t.fileName,getSaveIntent:()=>({password:e.store.get().presentationPassword,passwordProtected:e.store.get().isPasswordProtected}),onStatus:l=>{e.getChrome().ribbon?.setAutosaveStatus(qD(l,e.getTranslator()),l),e.getChrome().titleBar?.setAutosaveState(l),t.onAutosaveStatus?.(l);},onRecovery:l=>t.onAutosaveRecovery?.(l),loadFile:l=>e.loadFile(l)}),o=null,r=zt({store:e.store,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:e.setEditable,onReadOnlyChange:e.onCollaborationReadOnlyChange,onStatusChange:l=>{t.onCollaborationStatus?.(l),o?.(l);}});t.collaboration&&r.start(t.collaboration);let i=e.store.subscribe((l,p)=>{if(r.isActive()&&(l.currentSlide!==p.currentSlide&&r.setActiveSlide(l.currentSlide),l.selectedElementId!==p.selectedElementId&&r.setSelection(l.selectedElementId??void 0,l.currentSlide),l.followedClientId!==null&&l.remotePresences!==p.remotePresences)){let d=l.remotePresences.find(u=>u.clientId===l.followedClientId);d&&d.activeSlideIndex!==l.currentSlide&&e.goToSlide(d.activeSlideIndex);}}),s=()=>Ok({doc:e.doc,store:e.store,getChrome:e.getChrome,getTranslator:e.getTranslator,getScale:e.getScale,startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),getStatus:()=>r.getStatus(),getConfig:()=>r.getConfig(),followUser:l=>r.followUser(l),shareDefaults:t.shareDefaults,hiddenActions:e.getHiddenActions?e.getHiddenActions():t.hiddenActions,showCollaborationStatus:e.isShareAvailable?.()??true,getUserInitials:e.getUserInitials}),a=s();return o=l=>a.onStatusChange(l),{startCollaboration:l=>r.start(l),stopCollaboration:()=>r.stop(),isCollaborationReadOnly:()=>r.isReadOnly(),getCollaborationStatus:()=>r.getStatus(),getCollaborationLivePatcher:()=>r.livePatcher,setCollaborationCursor:(l,p)=>r.setCursor(l,p,e.store.get().currentSlide),publishCollaborationInlineText:(l,p)=>{let d=e.store.get();chunkWKWWFY2C_cjs.xh(r.livePatcher,d.slides[d.currentSlide],l,p);},flushCollaborationLivePatch:()=>r.livePatcher.flush(),followCollaborationUser:l=>r.followUser(l),beginCollaborationContentLoad:l=>r.beginContentLoad(l),notifyCollaborationContentLoaded:l=>r.notifyContentLoaded(l),autosaveNow:()=>n.saveNow(),setAutosaveEnabled(l){n.setEnabled(l)&&t.onToggleAutosave?.(l);},isAutosaveEnabled:()=>n.isEnabled(),isAutosavePreferred:()=>n.isPreferred(),getAutosaveActivation:()=>n.getActivation(),setAutosaveIntervalMs:l=>n.setOptionsIntervalMs(l),openBroadcast:()=>a.openBroadcast(),openShare:()=>a.openShare(),remountUi(){a.destroy(),a=s(),a.onStatusChange(r.getStatus());},destroy(){i(),a.destroy(),r.destroy(),n.destroy();}}}function Kk(e,t,n){if(e===t)return false;let o=new Set(e),r=new Set(t);return n.some(i=>i.type==="chart"&&o.has(i.id)!==r.has(i.id))}function Bp(e){let{renderer:t,callbacks:n}=e;return (o,r)=>{let i=e.getChrome();o.loading!==r.loading&&i.setLoading(o.loading),o.error!==r.error&&i.setError(o.error),o.presenting!==r.presenting&&(i.setPresenting(o.presenting),i.statusBar?.setPresenting(o.presenting),n.onPresentationChange?.(o.presenting)),((o.slides!==r.slides||o.sections!==r.sections||o.canvasSize!==r.canvasSize||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||o.outlineFontsTick!==r.outlineFontsTick)&&!o.interactionActive||r.interactionActive&&!o.interactionActive)&&t.renderThumbnails(),(o.slides!==r.slides||o.templateElementsBySlideId!==r.templateElementsBySlideId||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom||o.canvasSize!==r.canvasSize||o.presenting!==r.presenting||o.editTemplateMode!==r.editTemplateMode||o.slideMasters!==r.slideMasters||o.notesMaster!==r.notesMaster||o.handoutMaster!==r.handoutMaster||o.masterViewTarget!==r.masterViewTarget||o.masterViewTab!==r.masterViewTab||o.handoutSlidesPerPage!==r.handoutSlidesPerPage||o.headerFooter!==r.headerFooter||o.customProperties!==r.customProperties||o.tableStyleMap!==r.tableStyleMap||Kk(r.selectedElementIds,o.selectedElementIds,U(o)))&&t.renderStage(),o.currentSlide!==r.currentSlide&&(i.thumbnails?.setActive(o.currentSlide),n.onSlideChange?.(o.currentSlide)),(o.slides!==r.slides||o.currentSlide!==r.currentSlide||o.zoom!==r.zoom)&&(i.statusBar?.update({current:o.currentSlide,total:o.slides.length,zoomPercent:t.zoomPercent()}),i.presentationTouchControls.update(o.currentSlide,o.slides.length),i.presentationToolbar.update({current:o.currentSlide,total:o.slides.length}),i.mobileActionSheets?.update(o.currentSlide,o.slides,o.slides[o.currentSlide]?.comments??[])),o.zoom!==r.zoom&&n.onZoomChange?.(t.effectiveScale()),o.selectedElementId!==r.selectedElementId&&n.onSelectionChange?.(o.selectedElementId),o.dirty!==r.dirty&&(i.statusBar?.setDirty(o.dirty),i.titleBar?.setDirty(o.dirty),n.onDirtyChange?.(o.dirty)),o.editable!==r.editable&&(i.root.classList.toggle("pptxv-editable",o.editable),i.notes.update({slide:o.slides[o.currentSlide],editable:o.editable,notesStyle:o.notesMaster?.notesStyle}),i.mobileActionSheets?.setEditable(o.editable)),o.protectedView!==r.protectedView&&i.setProtectedView(o.protectedView),(o.readOnlyRecommendation!==r.readOnlyRecommendation||o.readOnlyBannerDismissed!==r.readOnlyBannerDismissed||o.readOnlyPasswordPromptOpen!==r.readOnlyPasswordPromptOpen||o.readOnlyPasswordError!==r.readOnlyPasswordError||o.readOnlyCheckingPassword!==r.readOnlyCheckingPassword)&&i.setReadOnlyRecommendation(o.readOnlyRecommendation,o.readOnlyBannerDismissed,{promptOpen:o.readOnlyPasswordPromptOpen,error:o.readOnlyPasswordError,checking:o.readOnlyCheckingPassword}),(o.compatToasts!==r.compatToasts||o.inspectorOpen!==r.inspectorOpen)&&i.setCompatToasts(o.compatToasts,o.inspectorOpen?chunkWKWWFY2C_cjs.to:0),o.runProgramNotices!==r.runProgramNotices&&i.setRunProgramNotices(o.runProgramNotices),o.notesExpanded!==r.notesExpanded&&(i.notes.setExpanded(o.notesExpanded),i.ribbon?.setNotesExpanded(o.notesExpanded),i.statusBar?.setNotesExpanded(o.notesExpanded),i.mobileActionSheets?.setNotesExpanded(o.notesExpanded)),o.editTemplateMode!==r.editTemplateMode&&i.ribbon?.setTemplateEditing(o.editTemplateMode),(o.showGrid!==r.showGrid||o.showRulers!==r.showRulers||o.showGuides!==r.showGuides||o.snapToGrid!==r.snapToGrid||o.snapToShape!==r.snapToShape)&&i.ribbon?.setViewOptions(o),o.hasMacros!==r.hasMacros&&i.ribbon?.setHasMacros(o.hasMacros),o.presentationProperties.showSubtitles!==r.presentationProperties.showSubtitles&&i.ribbon?.setSubtitlesVisible(!!o.presentationProperties.showSubtitles),(o.currentSlide!==r.currentSlide||o.slides[o.currentSlide]?.hidden!==r.slides[r.currentSlide]?.hidden)&&i.ribbon?.setHideSlideActive(!!o.slides[o.currentSlide]?.hidden);}}var Wk=`
|
|
5
5
|
.pptxv-account { display: flex; flex-direction: column; gap: 28px; max-width: 640px; margin-top: 24px; }
|
|
6
6
|
.pptxv-account-section { padding: 20px; border: 1px solid var(--pptx-border); border-radius: 8px; background: var(--pptx-card); color: var(--pptx-card-foreground); }
|
|
7
7
|
.pptxv-account-section h2 { margin: 0 0 14px; font-size: 14px; }
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
.pptxv-account-color-swatch.is-active { border-color: var(--pptx-foreground); }
|
|
17
17
|
.pptxv-account-privacy { font-size: 11px !important; }
|
|
18
18
|
.pptxv-account-notice { color: var(--pptx-primary) !important; font-weight: 600; }
|
|
19
|
-
`;var
|
|
19
|
+
`;var $k=`
|
|
20
20
|
.pptxv-ai-toggle.is-active { background: var(--pptx-accent); color: var(--pptx-accent-foreground); }
|
|
21
21
|
.pptxv-ai-toggle-floating {
|
|
22
22
|
position: absolute;
|
|
@@ -319,7 +319,7 @@
|
|
|
319
319
|
.pptxv-ai-close,
|
|
320
320
|
.pptxv-ai-send { min-width: 44px !important; min-height: 44px !important; }
|
|
321
321
|
}
|
|
322
|
-
`;var
|
|
322
|
+
`;var qk=`
|
|
323
323
|
/* \u2500\u2500 Focused-target bar \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
324
324
|
.pptxv-ai-focus {
|
|
325
325
|
flex: none;
|
|
@@ -511,7 +511,7 @@
|
|
|
511
511
|
.pptxv-ai-settings-btn:hover { background: var(--pptx-accent); color: var(--pptx-accent-foreground); }
|
|
512
512
|
.pptxv-ai-settings-btn:disabled { opacity: 0.5; cursor: default; }
|
|
513
513
|
.pptxv-ai-settings-status { font-size: 0.75rem; color: var(--pptx-muted-foreground); }
|
|
514
|
-
`;var
|
|
514
|
+
`;var jk=`
|
|
515
515
|
/* \u2500\u2500 Chat history: header "Chats" toggle + saved-chat dropdown \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
516
516
|
.pptxv-ai-chats {
|
|
517
517
|
margin-left: auto;
|
|
@@ -645,7 +645,7 @@
|
|
|
645
645
|
@media (max-width: 767px) {
|
|
646
646
|
.pptxv-ai-chats, .pptxv-ai-history-new, .pptxv-ai-history-delete { min-width: 44px !important; min-height: 44px !important; }
|
|
647
647
|
}
|
|
648
|
-
`;var
|
|
648
|
+
`;var Yk=`
|
|
649
649
|
/* Animations > Animation: the full 27-preset catalogue in three captioned
|
|
650
650
|
columns. Capped and scrollable rather than tall: the ribbon is one row high
|
|
651
651
|
and the layout-parity spec fails the whole tab if a group grows it. */
|
|
@@ -769,7 +769,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
769
769
|
background: var(--pptx-background);
|
|
770
770
|
color: var(--pptx-foreground);
|
|
771
771
|
}
|
|
772
|
-
`;var
|
|
772
|
+
`;var Xk=`
|
|
773
773
|
/* \u2500\u2500 Modal dialog (Share / Broadcast) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
774
774
|
.pptxv-modal-backdrop {
|
|
775
775
|
position: fixed;
|
|
@@ -1111,7 +1111,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
1111
1111
|
/* Presentation mode hides all collaboration chrome. */
|
|
1112
1112
|
.pptxv.pptxv-presenting .pptxv-collab-status,
|
|
1113
1113
|
.pptxv.pptxv-presenting .pptxv-follow-bar { display: none; }
|
|
1114
|
-
`;var
|
|
1114
|
+
`;var Qk=`
|
|
1115
1115
|
.pptxv-props-overlay { position:fixed; inset:0; z-index:210; display:grid; place-items:center; background:#0009; }
|
|
1116
1116
|
.pptxv-props-scrim { position:absolute; inset:0; width:100%; height:100%; border:0; background:transparent; }
|
|
1117
1117
|
.pptxv-props-dialog { position:relative; width:min(680px,calc(100vw - 32px)); max-height:calc(100vh - 40px); overflow:auto; border:1px solid var(--pptx-border); border-radius:10px; background:var(--pptx-card); color:var(--pptx-card-foreground); box-shadow:0 24px 80px #0008; }
|
|
@@ -1131,7 +1131,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
1131
1131
|
.pptxv-props-custom-row { display:grid; grid-template-columns:1fr 1fr 100px 34px; gap:6px; }
|
|
1132
1132
|
.pptxv-props-dialog footer { justify-content:flex-end; border-top:1px solid var(--pptx-border); border-bottom:0; }
|
|
1133
1133
|
@media (max-width:600px) { .pptxv-props-grid,.pptxv-props-custom-row { grid-template-columns:1fr; } }
|
|
1134
|
-
`;var
|
|
1134
|
+
`;var Zk=`
|
|
1135
1135
|
.pptxv-marquee { position: absolute; z-index: 4; border: 1px solid var(--pptx-primary); background: color-mix(in srgb, var(--pptx-primary) 14%, transparent); pointer-events: none; }
|
|
1136
1136
|
/* --pptxv-grid-size is set inline on .pptxv-stage from the deck's authored
|
|
1137
1137
|
viewProperties.gridSpacing (via computeGridSpacingPx); 10px matches this
|
|
@@ -1672,7 +1672,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
1672
1672
|
swatch grid, so it gets the WCAG target rather than an exemption. */
|
|
1673
1673
|
.pptxv-table-preset-swatch { height: 44px !important; }
|
|
1674
1674
|
}
|
|
1675
|
-
`;var
|
|
1675
|
+
`;var Jk=`
|
|
1676
1676
|
.pptxv-eqdlg-root[hidden] { display: none; }
|
|
1677
1677
|
.pptxv-eqdlg-backdrop { position: fixed; inset: 0; z-index: 1200; border: 0; background: rgb(0 0 0 / .55); }
|
|
1678
1678
|
.pptxv-eqdlg { position: fixed; z-index: 1201; top: 50%; left: 50%; display: flex; flex-direction: column; gap: 12px; width: min(600px, calc(100vw - 32px)); max-height: 85vh; overflow-y: auto; transform: translate(-50%, -50%); padding: 16px; border: 1px solid var(--pptx-border); border-radius: 10px; background: var(--pptx-background); color: var(--pptx-foreground); box-shadow: 0 24px 70px rgb(0 0 0 / .34); }
|
|
@@ -1700,7 +1700,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
1700
1700
|
.pptxv-eqdlg-footer button.is-primary { border-color: var(--pptx-primary); background: var(--pptx-primary); color: #fff; }
|
|
1701
1701
|
.pptxv-eqdlg-footer button.is-primary:hover:not(:disabled) { background: var(--pptx-primary); color: #fff; filter: brightness(1.1); }
|
|
1702
1702
|
@media (max-width: 767px) { .pptxv-eqdlg { top: auto; bottom: 0; width: 100%; max-height: 88dvh; transform: translateX(-50%); border-radius: 16px 16px 0 0; } }
|
|
1703
|
-
`;var
|
|
1703
|
+
`;var e0=`
|
|
1704
1704
|
.pptxv-export-progress-backdrop {
|
|
1705
1705
|
position: fixed;
|
|
1706
1706
|
inset: 0;
|
|
@@ -1765,10 +1765,10 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
1765
1765
|
transition: background 0.15s;
|
|
1766
1766
|
}
|
|
1767
1767
|
.pptxv-export-progress-actions button:hover { background: var(--pptx-accent, #33334d); }
|
|
1768
|
-
`;var
|
|
1768
|
+
`;var t0=`
|
|
1769
1769
|
.pptxv-info-overlay{position:fixed;inset:0;z-index:220;display:grid;place-items:center;background:#0009}.pptxv-info-scrim{position:absolute;inset:0;width:100%;height:100%;border:0;background:transparent}.pptxv-info-dialog{position:relative;width:min(460px,calc(100vw - 32px));max-height:80vh;overflow:auto;border:1px solid var(--pptx-border);border-radius:12px;background:var(--pptx-card);color:var(--pptx-card-foreground);box-shadow:0 24px 80px #0008}.pptxv-info-dialog header,.pptxv-info-dialog footer{display:flex;align-items:center;gap:8px;padding:14px 18px;border-bottom:1px solid var(--pptx-border)}.pptxv-info-dialog header{justify-content:space-between}.pptxv-info-dialog h2,.pptxv-info-dialog h3,.pptxv-info-dialog p{margin:0}.pptxv-info-dialog h2{font-size:14px}.pptxv-info-dialog h3{font-size:12px}.pptxv-info-body{display:grid;gap:14px;padding:18px}.pptxv-info-dialog button,.pptxv-info-dialog input{border:1px solid var(--pptx-border);border-radius:6px;padding:7px 9px;background:var(--pptx-muted);color:inherit}.pptxv-info-dialog .is-primary{background:var(--pptx-primary);color:#fff}.pptxv-info-dialog .is-danger,.pptxv-info-error,.pptxv-info-row em.is-missing{color:#f87171}.pptxv-info-description,.pptxv-info-status,.pptxv-info-field span{color:var(--pptx-muted-foreground);font-size:12px}.pptxv-info-toggle{display:flex;align-items:center;gap:9px;font-size:12px}.pptxv-info-list{display:grid;gap:6px;max-height:280px;overflow:auto}.pptxv-info-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:8px;background:var(--pptx-muted);font-size:12px}.pptxv-info-badges{display:flex;align-items:center;gap:7px}.pptxv-info-badges b{padding:2px 5px;border-radius:4px;background:#16653455;color:#86efac;font-size:10px}.pptxv-info-badges em{color:#4ade80;font-style:normal}.pptxv-info-notice{display:flex;gap:10px;padding:12px;border:1px solid var(--pptx-border);border-radius:9px;background:var(--pptx-muted);font-size:12px}.pptxv-info-notice.is-signed,.pptxv-info-protected{border-color:#15803d66;background:#14532d33;color:#86efac}.pptxv-info-notice.is-warning{border-color:#b4530966;background:#78350f33;color:#fde68a}.pptxv-info-notice b{display:grid;width:20px;height:20px;flex:none;place-items:center;border:1px solid currentColor;border-radius:50%}.pptxv-info-protected{padding:9px;border:1px solid;border-radius:7px;font-size:12px}.pptxv-info-field{display:grid;gap:5px}.pptxv-info-strength{color:#eab308;letter-spacing:3px}.pptxv-info-error{min-height:14px;font-size:11px}.pptxv-info-spacer{flex:1}.pptxv-info-dialog footer{border-top:1px solid var(--pptx-border);border-bottom:0}
|
|
1770
1770
|
.pptxv-version-history{position:absolute;z-index:210;inset:0 0 0 auto;display:flex;width:min(320px,100%);flex-direction:column;border-left:1px solid var(--pptx-border);background:var(--pptx-background);color:var(--pptx-foreground);box-shadow:-18px 0 48px #0005}.pptxv-version-history>header{display:flex;min-height:48px;align-items:center;gap:9px;padding:0 12px;border-bottom:1px solid var(--pptx-border)}.pptxv-version-history h2{flex:1;margin:0;font-size:14px}.pptxv-version-history button{border:0;border-radius:6px;padding:6px 9px;background:transparent;color:inherit}.pptxv-version-history button:hover{background:var(--pptx-accent)}.pptxv-version-content{flex:1;overflow:auto;color:var(--pptx-muted-foreground);font-size:12px}.pptxv-version-empty{padding:32px 14px;text-align:center}.pptxv-version-content article{display:grid;grid-template-columns:1fr auto;gap:4px 12px;padding:14px;border-bottom:1px solid var(--pptx-border)}.pptxv-version-content article strong{color:var(--pptx-foreground);font-weight:500}.pptxv-version-content article p{grid-column:1/-1;margin:0;font-size:10px}.pptxv-version-content article footer{grid-column:1/-1;display:flex;gap:6px;margin-top:8px}.pptxv-version-content .is-primary{background:color-mix(in srgb,var(--pptx-primary) 20%,transparent);color:var(--pptx-primary)}.pptxv-version-content .is-danger{color:#f87171}@media(max-width:600px){.pptxv-info-dialog{position:fixed;inset:auto 0 0;width:100%;max-height:88dvh;border-radius:16px 16px 0 0}.pptxv-version-history{position:fixed;top:auto;height:min(72dvh,560px);border-top:1px solid var(--pptx-border);border-left:0}}
|
|
1771
|
-
`;var
|
|
1771
|
+
`;var o0=`
|
|
1772
1772
|
/* \u2500\u2500 Quick Styles gallery \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
1773
1773
|
.pptxv-quick-styles {
|
|
1774
1774
|
display: grid;
|
|
@@ -2102,43 +2102,6 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
2102
2102
|
.pptxv-tags-empty { margin: 6px 0 0; color: var(--pptx-muted-foreground); font-size: 10px; }
|
|
2103
2103
|
.pptxv-tags-empty[hidden] { display: none; }
|
|
2104
2104
|
|
|
2105
|
-
/* \u2500\u2500 Theme editor card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2106
|
-
.pptxv-theme-name .pptxv-field-input { width: 100%; }
|
|
2107
|
-
.pptxv-theme-presets { display: grid; gap: 4px; margin: 8px 0; }
|
|
2108
|
-
.pptxv-theme-preset-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
|
|
2109
|
-
.pptxv-theme-preset {
|
|
2110
|
-
display: grid;
|
|
2111
|
-
min-width: 0;
|
|
2112
|
-
gap: 2px;
|
|
2113
|
-
padding: 4px;
|
|
2114
|
-
border: 1px solid var(--pptx-border);
|
|
2115
|
-
border-radius: var(--pptx-radius);
|
|
2116
|
-
background: transparent;
|
|
2117
|
-
color: var(--pptx-muted-foreground);
|
|
2118
|
-
font: inherit;
|
|
2119
|
-
font-size: 10px;
|
|
2120
|
-
cursor: pointer;
|
|
2121
|
-
}
|
|
2122
|
-
.pptxv-theme-preset:hover:not(:disabled) { background: var(--pptx-accent); color: var(--pptx-accent-foreground); }
|
|
2123
|
-
.pptxv-theme-preset.is-active { border-color: var(--pptx-primary); color: var(--pptx-primary); }
|
|
2124
|
-
.pptxv-theme-preset-swatches { display: flex; gap: 2px; }
|
|
2125
|
-
.pptxv-theme-preset-dot { display: block; width: 100%; height: 10px; border-radius: 2px; }
|
|
2126
|
-
.pptxv-theme-preset-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
2127
|
-
.pptxv-theme-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 8px; margin-bottom: 8px; }
|
|
2128
|
-
.pptxv-theme-slot { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; font-size: 10px; }
|
|
2129
|
-
.pptxv-theme-slot-label { overflow: hidden; color: var(--pptx-muted-foreground); text-overflow: ellipsis; white-space: nowrap; }
|
|
2130
|
-
.pptxv-theme-slot-input { width: 26px; height: 20px; padding: 0; border: 1px solid var(--pptx-border); border-radius: 3px; background: transparent; }
|
|
2131
|
-
.pptxv-theme-preview {
|
|
2132
|
-
display: grid;
|
|
2133
|
-
gap: 2px;
|
|
2134
|
-
margin: 8px 0;
|
|
2135
|
-
padding: 8px;
|
|
2136
|
-
border: 1px solid var(--pptx-border);
|
|
2137
|
-
border-radius: var(--pptx-radius);
|
|
2138
|
-
}
|
|
2139
|
-
.pptxv-theme-preview-heading { font-size: 13px; font-weight: 600; }
|
|
2140
|
-
.pptxv-theme-preview-body { font-size: 11px; }
|
|
2141
|
-
|
|
2142
2105
|
/* \u2500\u2500 Alt text (image section) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2143
2106
|
.pptxv-image-alt { display: grid; gap: 3px; margin: 6px 0; }
|
|
2144
2107
|
.pptxv-image-alt-input {
|
|
@@ -2191,7 +2154,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
2191
2154
|
min-height: 44px !important;
|
|
2192
2155
|
}
|
|
2193
2156
|
}
|
|
2194
|
-
`;var
|
|
2157
|
+
`;var n0=`
|
|
2195
2158
|
/* \u2500\u2500 Docked Animation panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
2196
2159
|
.pptxv-inspector-animation {
|
|
2197
2160
|
display: grid;
|
|
@@ -2375,7 +2338,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
2375
2338
|
min-height: 44px !important;
|
|
2376
2339
|
}
|
|
2377
2340
|
}
|
|
2378
|
-
`;var
|
|
2341
|
+
`;var r0=`
|
|
2379
2342
|
.pptxv-master-sidebar {
|
|
2380
2343
|
display: flex;
|
|
2381
2344
|
flex: none;
|
|
@@ -2433,7 +2396,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
2433
2396
|
.pptxv-handout-corner.is-bottom-right { right: 0; bottom: 0; border-top-width: 1px; border-left-width: 1px; }
|
|
2434
2397
|
@media (max-width: 767px), (max-width: 1023px) and (max-height: 520px) { .pptxv-master-sidebar { display: none; } }
|
|
2435
2398
|
.pptxv.pptxv-presenting .pptxv-master-sidebar { display: none; }
|
|
2436
|
-
`;var
|
|
2399
|
+
`;var i0=`
|
|
2437
2400
|
.pptxv-mobile-toolbar, .pptxv-mobile-actions { display: none; }
|
|
2438
2401
|
@media (max-width: 767px), (max-width: 1023px) and (max-height: 520px) {
|
|
2439
2402
|
.pptxv-ribbon { display: none; }
|
|
@@ -2484,7 +2447,7 @@ svg[data-pptx-motion-path-overlay] [data-pptx-motion-path-handle] { pointer-even
|
|
|
2484
2447
|
.pptxv.pptxv-presenting .pptxv-mobile-actions > nav,
|
|
2485
2448
|
.pptxv.pptxv-presenting .pptxv-mobile-sheet-host { display: none; }
|
|
2486
2449
|
}
|
|
2487
|
-
`;var
|
|
2450
|
+
`;var a0=`
|
|
2488
2451
|
/* \u2500\u2500 Dialog shell override: the Options dialog is wider than parity dialogs \u2500\u2500 */
|
|
2489
2452
|
.pptxv-options-dialog { width: min(56rem, calc(100vw - 32px)); height: min(620px, 88vh); }
|
|
2490
2453
|
.pptxv-options-dialog .pptxv-parity-body { flex: 1; min-height: 0; padding: 0; gap: 0; }
|
|
@@ -2595,7 +2558,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
2595
2558
|
navBtnStyle already covers its own nav for the same reason). */
|
|
2596
2559
|
.pptxv-options-nav button { min-height: 44px; }
|
|
2597
2560
|
}
|
|
2598
|
-
`;var
|
|
2561
|
+
`;var s0=`
|
|
2599
2562
|
.pptxv-outline-view {
|
|
2600
2563
|
position: fixed;
|
|
2601
2564
|
inset: 0;
|
|
@@ -2666,7 +2629,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
2666
2629
|
.pptxv-outline-view-input.is-title { color: #f5f5f5; font-size: 14px; font-weight: 600; }
|
|
2667
2630
|
.pptxv-outline-view-input:focus { background: rgb(255 255 255 / 0.1); }
|
|
2668
2631
|
.pptxv-outline-view-input:read-only { cursor: default; }
|
|
2669
|
-
`;var
|
|
2632
|
+
`;var l0=`
|
|
2670
2633
|
.pptxv-readonly-banner {
|
|
2671
2634
|
display: flex;
|
|
2672
2635
|
align-items: center;
|
|
@@ -2878,13 +2841,13 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
2878
2841
|
}
|
|
2879
2842
|
.pptxv-run-program-notice-dismiss:hover { background: var(--pptx-accent); }
|
|
2880
2843
|
.pptxv-run-program-notice-dismiss svg { width: 12px; height: 12px; margin: 0; }
|
|
2881
|
-
`;var
|
|
2844
|
+
`;var p0=`
|
|
2882
2845
|
/* Hidden slide in the sorter: the card is already dimmed by \`.is-hidden\`, so
|
|
2883
2846
|
this adds the two signals dimming cannot carry, because opacity is a
|
|
2884
2847
|
colour-only cue: the shared diagonal slash across the slide number, and the
|
|
2885
2848
|
state spelled out in words. */
|
|
2886
2849
|
.pptxv-sorter-num { display: inline-block; padding: 0 3px; }
|
|
2887
|
-
.pptxv-sorter-card[data-pptx-slide-hidden] .pptxv-sorter-num { background-image: ${
|
|
2850
|
+
.pptxv-sorter-card[data-pptx-slide-hidden] .pptxv-sorter-num { background-image: ${chunkWKWWFY2C_cjs.Ap}; }
|
|
2888
2851
|
.pptxv-sorter-hidden { display: block; margin-top: 4px; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--pptx-muted-foreground); }
|
|
2889
2852
|
.pptxv-parity-backdrop { position: fixed; inset: 0; z-index: 1200; border: 0; background: rgb(0 0 0 / .55); }
|
|
2890
2853
|
.pptxv-parity-dialog { position: fixed; z-index: 1201; top: 50%; left: 50%; display: flex; flex-direction: column; width: min(440px, calc(100vw - 32px)); max-height: 88vh; transform: translate(-50%, -50%); overflow: hidden; border: 1px solid var(--pptx-border); border-radius: 10px; background: var(--pptx-background); color: var(--pptx-foreground); box-shadow: 0 24px 70px rgb(0 0 0 / .34); }
|
|
@@ -2965,7 +2928,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
2965
2928
|
@media (max-width: 767px) {
|
|
2966
2929
|
.pptxv-workspace-list button, .pptxv-workspace-pane header button { min-height: 44px !important; }
|
|
2967
2930
|
}
|
|
2968
|
-
`;var
|
|
2931
|
+
`;var d0=`
|
|
2969
2932
|
.pptxv-present-toolbar-wrap { display: none; }
|
|
2970
2933
|
.pptxv.pptxv-presenting .pptxv-present-toolbar-wrap {
|
|
2971
2934
|
position: absolute;
|
|
@@ -3080,7 +3043,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
3080
3043
|
}
|
|
3081
3044
|
.pptxv-present-swatch:hover { transform: scale(1.1); }
|
|
3082
3045
|
.pptxv-present-swatch.is-selected { border-color: #fff; }
|
|
3083
|
-
`;var
|
|
3046
|
+
`;var c0=`
|
|
3084
3047
|
.pptxv-presentation-touch-controls { display: none; }
|
|
3085
3048
|
@media (any-pointer: coarse) {
|
|
3086
3049
|
.pptxv.pptxv-presenting .pptxv-presentation-touch-controls { display: contents; }
|
|
@@ -3093,7 +3056,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
3093
3056
|
.pptxv-presentation-touch-next { top: 50%; right: calc(env(safe-area-inset-right, 0px) + 8px); transform: translateY(-50%); }
|
|
3094
3057
|
.pptxv-presentation-touch-counter { position: fixed; z-index: 90; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); left: 50%; padding: 4px 12px; border-radius: 999px; background: rgb(0 0 0 / 55%); color: #fff; font: 12px ui-monospace, monospace; font-variant-numeric: tabular-nums; pointer-events: none; transform: translateX(-50%); }
|
|
3095
3058
|
}
|
|
3096
|
-
`;var
|
|
3059
|
+
`;var m0=`
|
|
3097
3060
|
/* The show toolbar stands down while the console is up: the console carries its
|
|
3098
3061
|
own navigation, annotation tools and End control, and the bar sits at a
|
|
3099
3062
|
higher stacking order, so leaving it up drew a second set of them on top. */
|
|
@@ -3335,7 +3298,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
3335
3298
|
font-family: ui-monospace, monospace;
|
|
3336
3299
|
font-size: 11px;
|
|
3337
3300
|
}
|
|
3338
|
-
`;var
|
|
3301
|
+
`;var u0=`
|
|
3339
3302
|
.pptxv-reading-view {
|
|
3340
3303
|
position: fixed;
|
|
3341
3304
|
inset: 0;
|
|
@@ -3386,7 +3349,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
3386
3349
|
opacity: .3;
|
|
3387
3350
|
cursor: default;
|
|
3388
3351
|
}
|
|
3389
|
-
`;var
|
|
3352
|
+
`;var x0=`
|
|
3390
3353
|
/* \u2500\u2500 Ribbon shell and React-aligned command row \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3391
3354
|
.pptxv-ribbon {
|
|
3392
3355
|
display: flex;
|
|
@@ -3476,7 +3439,6 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
3476
3439
|
/* Design > Edit Theme docks the deck THEME EDITOR card, a column, not a chip row. */
|
|
3477
3440
|
.pptxv-theme-gallery-host > .pptxv-deck-theme-editor { display: block; width: 300px; max-height: 70vh; overflow-y: auto; padding: 0; }
|
|
3478
3441
|
.pptxv-theme-swatch-preview { display: block; width: 20px; height: 20px; flex: none; border: 1px solid var(--pptx-border); border-radius: 4px; }
|
|
3479
|
-
.pptxv-record-dot { width: 12px; height: 12px; margin: 7px; border-radius: 50%; background: #ef4444; }
|
|
3480
3442
|
.pptxv-shortcut-help { align-self: center; padding: 5px 8px; color: var(--pptx-muted-foreground); font-size: 11px; }
|
|
3481
3443
|
.pptxv-ribbon-insert-content {
|
|
3482
3444
|
flex-wrap: nowrap;
|
|
@@ -3828,7 +3790,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
3828
3790
|
.pptxv-backstage nav button.active { border-left-color: transparent; border-bottom-color: var(--pptx-primary, #c43e1c); }
|
|
3829
3791
|
.pptxv-backstage main { padding: 16px; }
|
|
3830
3792
|
}
|
|
3831
|
-
`;var
|
|
3793
|
+
`;var b0=`
|
|
3832
3794
|
/* \u2500\u2500 Ribbon galleries \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3833
3795
|
.pptxv-ribbon-contents { display: contents; }
|
|
3834
3796
|
.pptxv-gallery { position: relative; display: inline-flex; align-items: stretch; }
|
|
@@ -3900,7 +3862,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
3900
3862
|
/* PowerPoint tints contextual tabs so they read as selection-driven. */
|
|
3901
3863
|
.pptxv-ribbon-tab.pptxv-ribbon-tab-contextual { color: var(--pptx-primary); }
|
|
3902
3864
|
.pptxv-ribbon-tab.pptxv-ribbon-tab-contextual.is-active { border-bottom-color: var(--pptx-primary); }
|
|
3903
|
-
`;var
|
|
3865
|
+
`;var g0=`
|
|
3904
3866
|
/* \u2500\u2500 Primary-row quick actions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
3905
3867
|
.pptxv-primary-sep { width: 1px; align-self: stretch; margin: 0 4px; background: color-mix(in srgb, var(--pptx-border) 40%, transparent); }
|
|
3906
3868
|
/* React-style "Present" split button + its options dropdown. */
|
|
@@ -4017,7 +3979,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
4017
3979
|
color: var(--pptx-primary-foreground, #fff);
|
|
4018
3980
|
}
|
|
4019
3981
|
.pptxv-tabrow-share svg { width: 12px; height: 12px; }
|
|
4020
|
-
`;var
|
|
3982
|
+
`;var f0=`
|
|
4021
3983
|
.pptxv-tpl-dialog-layer {
|
|
4022
3984
|
position: fixed;
|
|
4023
3985
|
inset: 0;
|
|
@@ -4128,7 +4090,7 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
4128
4090
|
.pptxv-tpl-dialog { width: 100%; max-height: 88dvh; border-radius: 16px 16px 0 0; }
|
|
4129
4091
|
.pptxv-tpl-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
4130
4092
|
}
|
|
4131
|
-
`;var
|
|
4093
|
+
`;var v0=`
|
|
4132
4094
|
.pptxv-smartart-dialog-layer {
|
|
4133
4095
|
position: fixed;
|
|
4134
4096
|
inset: 0;
|
|
@@ -4267,10 +4229,10 @@ label.pptxv-options-row { cursor: pointer; }
|
|
|
4267
4229
|
.pptxv-smartart-categories { flex-basis: 120px; }
|
|
4268
4230
|
.pptxv-smartart-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
|
4269
4231
|
}
|
|
4270
|
-
`;var pe=
|
|
4271
|
-
${Object.entries(
|
|
4232
|
+
`;var pe=chunkWKWWFY2C_cjs.ro;function jD(){return `:where(:root) {
|
|
4233
|
+
${Object.entries(chunkWKWWFY2C_cjs.jt()).map(([t,n])=>` ${t}: ${n};`).join(`
|
|
4272
4234
|
`)}
|
|
4273
|
-
}`}var
|
|
4235
|
+
}`}var YD=`
|
|
4274
4236
|
.pptxv {
|
|
4275
4237
|
position: relative;
|
|
4276
4238
|
display: flex;
|
|
@@ -4513,6 +4475,7 @@ ${Object.entries(chunk24B6ZCFG_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
|
|
|
4513
4475
|
/* Virtualized rail: block layout for the absolute-positioned window. :where()
|
|
4514
4476
|
keeps the .pptxv-thumbs-virtualized part at zero specificity so the mobile
|
|
4515
4477
|
and presenting display:none rules on the rail still win. */
|
|
4478
|
+
.pptxv-thumbs-window { gap: 8px; }
|
|
4516
4479
|
:where(.pptxv-thumbs-virtualized) .pptxv-thumbs-list { display: block; }
|
|
4517
4480
|
.pptxv-thumbs[hidden] { display: none; }
|
|
4518
4481
|
.pptxv-thumbs-footer {
|
|
@@ -4569,8 +4532,8 @@ ${Object.entries(chunk24B6ZCFG_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
|
|
|
4569
4532
|
/* Hidden slide (PowerPoint's Hide Slide): dim the preview and strike the slide
|
|
4570
4533
|
number with the shared diagonal slash. The slash carries the meaning on its
|
|
4571
4534
|
own, because dimming is a colour signal and a dark thumbnail looks dim too. */
|
|
4572
|
-
.pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-frame > :first-child { opacity: ${
|
|
4573
|
-
.pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-num { background-image: ${
|
|
4535
|
+
.pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-frame > :first-child { opacity: ${chunkWKWWFY2C_cjs.Bp}; }
|
|
4536
|
+
.pptxv-thumb[data-pptx-slide-hidden] .pptxv-thumb-num { background-image: ${chunkWKWWFY2C_cjs.Ap}; }
|
|
4574
4537
|
.pptxv-thumb-hidden {
|
|
4575
4538
|
position: absolute;
|
|
4576
4539
|
right: 2px;
|
|
@@ -4999,7 +4962,7 @@ ${Object.entries(chunk24B6ZCFG_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
|
|
|
4999
4962
|
gap: 4px;
|
|
5000
4963
|
/* Pinned from the shared metric rather than left to emerge from the padding
|
|
5001
4964
|
+ button box, which is how this row ended up 2px shorter than the others. */
|
|
5002
|
-
min-height: ${
|
|
4965
|
+
min-height: ${chunkWKWWFY2C_cjs.so.height}px;
|
|
5003
4966
|
padding: 2px 8px;
|
|
5004
4967
|
border-top: 1px solid var(--pptx-border);
|
|
5005
4968
|
background: color-mix(in srgb, var(--pptx-secondary) 50%, transparent);
|
|
@@ -5158,35 +5121,36 @@ ${Object.entries(chunk24B6ZCFG_cjs.Fa()).map(([t,n])=>` ${t}: ${n};`).join(`
|
|
|
5158
5121
|
way it does on the editing canvas. */
|
|
5159
5122
|
.pptxv.pptxv-presenting .pptxv-stage-wrap,
|
|
5160
5123
|
.pptxv.pptxv-presenting .pptxv-stage-wrap * { user-select: none; }
|
|
5161
|
-
`;function Ci(){return `${
|
|
5162
|
-
${
|
|
5163
|
-
${
|
|
5164
|
-
${
|
|
5165
|
-
${
|
|
5166
|
-
${
|
|
5167
|
-
${
|
|
5168
|
-
${
|
|
5124
|
+
`;function Ci(){return `${jD()}
|
|
5125
|
+
${YD}
|
|
5126
|
+
${Zk}
|
|
5127
|
+
${x0}
|
|
5128
|
+
${g0}
|
|
5129
|
+
${b0}
|
|
5130
|
+
${Qk}
|
|
5131
|
+
${t0}
|
|
5132
|
+
${v0}
|
|
5133
|
+
${f0}
|
|
5134
|
+
${Jk}
|
|
5135
|
+
${Xk}
|
|
5136
|
+
${c0}
|
|
5169
5137
|
${d0}
|
|
5138
|
+
${m0}
|
|
5139
|
+
${i0}
|
|
5140
|
+
${r0}
|
|
5170
5141
|
${p0}
|
|
5171
|
-
${
|
|
5172
|
-
${
|
|
5142
|
+
${a0}
|
|
5143
|
+
${Yk}
|
|
5173
5144
|
${n0}
|
|
5174
5145
|
${o0}
|
|
5175
|
-
${
|
|
5176
|
-
${Qk}
|
|
5177
|
-
${Xk}
|
|
5178
|
-
${t0}
|
|
5179
|
-
${Zk}
|
|
5180
|
-
${_k}
|
|
5181
|
-
${Yk}
|
|
5182
|
-
${jk}
|
|
5183
|
-
${Vk}
|
|
5184
|
-
${Bk}
|
|
5185
|
-
${Nk}
|
|
5186
|
-
${zk}
|
|
5187
|
-
${i0}
|
|
5188
|
-
${Jk}
|
|
5146
|
+
${Wk}
|
|
5189
5147
|
${$k}
|
|
5190
|
-
${e0}`}var c0="pptx-vanilla-viewer-styles";function Up(e){if(e.getElementById(c0))return;let t=e.createElement("style");t.id=c0,t.textContent=Ci(),(e.head??e.documentElement).appendChild(t);}function m0(){return Ci()}function u0(e){if(!e.editable)return null;let t={selectedElementId:null,selectedElementIds:[]};return e.masterViewTarget?{...t,masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false}:e.slideMasters.length>0?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:"slides",editTemplateMode:true}:e.notesMaster||e.handoutMaster?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:e.notesMaster?"notes":"handout",editTemplateMode:true}:{...t,editTemplateMode:!e.editTemplateMode}}function Kp(e,t){return t.find(n=>n.theme===e)?.key}function x0(e,t,n){let o=t&&n.some(r=>r.key===t)?t:Kp(e.theme,n)??"default";return {key:o,theme:n.find(r=>r.key===o)?.theme??e.theme}}function g0(e){return e.availableLocales?e.availableLocales:Array.from(new Set(["en",...Object.keys(e.messages??{})])).map(n=>chunkOBVLNSK5_cjs.E.find(o=>o.code===n)??{code:n,label:n,nativeLabel:n})}function b0(e,t,n){return t&&n.some(o=>o.code===t)?t:e.locale??"en"}function f0(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunk24B6ZCFG_cjs.ah({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=`${s}px`,e.style.top=`${a}px`;}function v0(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=null,a=()=>{r?.remove(),r=null,i?.remove(),i=null,s&&(t.removeEventListener("pointerdown",s,true),t.removeEventListener("keydown",s,true),s=null);},l=(m,g)=>{i?.remove();let x=chunkOBVLNSK5_cjs.w(t,"div","pptxv-context-menu",{left:`${m}px`,top:`${g}px`});x.setAttribute("role","menu"),x.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));let b=Uo(n.get());for(let v of b){let f=chunkOBVLNSK5_cjs.w(t,"button","pptxv-context-menu-item");f.type="button",f.setAttribute("role","menuitem"),f.textContent=v.name,f.addEventListener("click",()=>{e.getEditActions().applyLayout(v.path),a();}),x.appendChild(f);}(o.closest(".pptxv")??t.body).appendChild(x),f0(x,t,m,g),i=x;},p=(m,g,x)=>{let b=chunkOBVLNSK5_cjs.w(t,"button","pptxv-context-menu-item");if(b.type="button",b.setAttribute("role",m.checked===void 0?"menuitem":"menuitemcheckbox"),m.checked!==void 0){b.setAttribute("aria-checked",String(m.checked));let v=chunkOBVLNSK5_cjs.w(t,"span","pptxv-context-menu-check");v.textContent=m.checked?"\u2713":"",b.appendChild(v);}return b.append(e.getTranslator()(m.labelKey)),b.disabled=m.disabled===true,b.addEventListener("click",()=>{let v=e.getEditActions();switch(m.id){case "paste":a(),v.paste();break;case "layout":r?.remove(),r=null,l(g,x);break;case "reset-slide":a(),v.resetSlide();break;case "format-background":a(),n.set({selectedElementId:null,selectedElementIds:[],inspectorOpen:true});break;case "grid-and-guides":a(),v.toggleViewOption("showGrid");break;case "ruler":a(),v.toggleViewOption("showRulers");break;default:a();}}),b},d=(m,g,x)=>{r=chunkOBVLNSK5_cjs.w(t,"div","pptxv-context-menu",{left:`${g}px`,top:`${x}px`}),r.dataset.pptxContextMenu="true",r.dataset.pptxCanvasContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.canvasContextMenu.ariaLabel"));for(let b of m){if(b.separatorBefore){let v=chunkOBVLNSK5_cjs.w(t,"div","pptxv-context-menu-separator");v.setAttribute("role","separator"),r.appendChild(v);}r.appendChild(p(b,g,x));}(o.closest(".pptxv")??t.body).appendChild(r),f0(r,t,g,x),s=b=>{if(b instanceof KeyboardEvent&&b.key!=="Escape")return;let v=b.target;v instanceof Node&&(r?.contains(v)||i?.contains(v))||a();},t.addEventListener("pointerdown",s,true),t.addEventListener("keydown",s,true);},u=m=>{let g=n.get();if(!g.editable||g.presenting)return;let x=chunk24B6ZCFG_cjs.Ll(chunk24B6ZCFG_cjs.Hm(m.target,e.getStageRoot()),m.target,g.selectedElementId);if(x&&chunk24B6ZCFG_cjs.lo(x,g.editTemplateMode))return;let b=chunk24B6ZCFG_cjs.kr(chunk24B6ZCFG_cjs.Vl({hasClipboard:g.clipboardPayload!==null,showGrid:g.showGrid,showRulers:g.showRulers}),e.getCustomization?.()??chunk24B6ZCFG_cjs.$q);b.length!==0&&(m.preventDefault(),a(),d(b,m.clientX,m.clientY));};return o.addEventListener("contextmenu",u),{destroy(){o.removeEventListener("contextmenu",u),a();}}}function Et(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-overlay"),r=chunkOBVLNSK5_cjs.w(e,"button","pptxv-info-scrim"),i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-dialog"),s=()=>o.remove();r.type="button",r.setAttribute("aria-label",t("pptx.common.close")),r.addEventListener("click",s),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a=chunkOBVLNSK5_cjs.w(e,"header"),l=chunkOBVLNSK5_cjs.w(e,"h2");l.textContent=n;let p=chunkOBVLNSK5_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.common.close")),p.addEventListener("click",s),a.append(l,p);let d=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-body"),u=chunkOBVLNSK5_cjs.w(e,"footer");return i.append(a,d,u),o.append(r,i),e.body.appendChild(o),{overlay:o,body:d,footer:u,close:s}}function wi(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"button","is-primary");o.type="button",o.textContent=t("pptx.common.done"),o.addEventListener("click",n.close),n.footer.appendChild(o);}function h0(e,t,n,o){let r=Et(e,t,t("pptx.digitalSignatures.title")),i=chunkOBVLNSK5_cjs.w(e,"div",`pptxv-info-notice${n?" is-signed":""}`),s=chunkOBVLNSK5_cjs.w(e,"b");s.textContent=n?"\u2713":"i";let a=chunkOBVLNSK5_cjs.w(e,"p");if(a.textContent=n?`${t("pptx.digitalSignatures.signed")} ${t("pptx.digitalSignatures.signatureCount",{count:o})}`:t("pptx.digitalSignatures.noSignatures"),i.append(s,a),r.body.appendChild(i),n){let l=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-notice is-warning"),p=chunkOBVLNSK5_cjs.w(e,"b");p.textContent="i";let d=chunkOBVLNSK5_cjs.w(e,"p");d.textContent=t("pptx.digitalSignatures.editWarning"),l.append(p,d),r.body.appendChild(l);}return wi(e,t,r),r.overlay}function y0(e,t,n){let o=chunkOBVLNSK5_cjs.w(e,"div","pptxv-props-overlay"),r=chunkOBVLNSK5_cjs.w(e,"button","pptxv-props-scrim");r.setAttribute("aria-label",t("pptx.common.close"));let i=chunkOBVLNSK5_cjs.w(e,"div","pptxv-props-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-labelledby","pptxv-props-title");let s=structuredClone(n.core??{}),a=structuredClone(n.app??{}),l=n.custom.map(L=>({...L})),p=JSON.stringify({core:s,app:a,custom:l}),d=()=>o.remove();r.addEventListener("click",d);let u=chunkOBVLNSK5_cjs.w(e,"header"),m=chunkOBVLNSK5_cjs.w(e,"h2");m.id="pptxv-props-title",m.textContent=t("pptx.documentProperties.dialogTitle");let g=chunkOBVLNSK5_cjs.w(e,"button");g.type="button",g.setAttribute("aria-label",t("pptx.common.close")),g.textContent="\xD7",g.addEventListener("click",d),u.append(m,g);let x=chunkOBVLNSK5_cjs.w(e,"nav","pptxv-props-tabs");x.setAttribute("aria-label",t("pptx.documentProperties.dialogTitle"));let b=chunkOBVLNSK5_cjs.w(e,"div","pptxv-props-body"),v="summary",f=chunkOBVLNSK5_cjs.w(e,"button","is-primary"),S=()=>{f&&(f.disabled=!n.editable||JSON.stringify({core:s,app:a,custom:l})===p);},y=(L,M,D)=>{let I=chunkOBVLNSK5_cjs.w(e,"label"),R=chunkOBVLNSK5_cjs.w(e,"span");R.textContent=L;let O=chunkOBVLNSK5_cjs.w(e,"input");return O.value=M,O.disabled=!n.editable,O.addEventListener("input",()=>{D(O.value),S();}),I.append(R,O),I},h=()=>{let L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-props-grid"),M=[["title","pptx.documentProperties.summary.title"],["subject","pptx.documentProperties.summary.subject"],["creator","pptx.documentProperties.summary.author"],["keywords","pptx.documentProperties.summary.keywords"],["category","pptx.documentProperties.summary.category"],["description","pptx.documentProperties.summary.description"]];for(let[D,I]of M)L.appendChild(y(t(I),s[D]??"",R=>s[D]=R));L.append(y(t("pptx.documentProperties.summary.manager"),a.manager??"",D=>{a.manager=D;}),y(t("pptx.documentProperties.summary.company"),a.company??"",D=>{a.company=D;})),b.replaceChildren(L);},C=()=>{let L=chunk24B6ZCFG_cjs.qp(n.slides,n.core),M=chunkOBVLNSK5_cjs.w(e,"dl","pptxv-props-stats"),D=[["pptx.documentProperties.statistics.slides",L.slideCount],["pptx.documentProperties.statistics.hiddenSlides",L.hiddenSlideCount],["pptx.documentProperties.statistics.notes",L.noteCount],["pptx.documentProperties.statistics.elements",L.elementCount],["pptx.documentProperties.statistics.words",L.wordCount],["pptx.documentProperties.statistics.paragraphs",L.paragraphCount],["pptx.documentProperties.created",L.created??"-"],["pptx.documentProperties.modified",L.modified??"-"]];for(let[I,R]of D){let O=chunkOBVLNSK5_cjs.w(e,"dt");O.textContent=t(I);let B=chunkOBVLNSK5_cjs.w(e,"dd");B.textContent=String(R),M.append(O,B);}b.replaceChildren(M);},w=()=>{let L=chunkOBVLNSK5_cjs.w(e,"div","pptxv-props-custom");l.forEach((D,I)=>{let R=chunkOBVLNSK5_cjs.w(e,"div","pptxv-props-custom-row"),O=chunkOBVLNSK5_cjs.w(e,"input");O.value=D.name,O.disabled=!n.editable,O.setAttribute("aria-label",t("pptx.documentProperties.custom.name")),O.addEventListener("input",()=>{D.name=O.value,S();});let B=D.type==="bool"?chunkOBVLNSK5_cjs.w(e,"select"):chunkOBVLNSK5_cjs.w(e,"input");if(B instanceof HTMLInputElement&&(B.type=D.type==="i4"?"number":"text"),B instanceof HTMLSelectElement)for(let[_,N]of [["true","pptx.documentProperties.custom.yes"],["false","pptx.documentProperties.custom.no"]]){let W=chunkOBVLNSK5_cjs.w(e,"option");W.value=_,W.textContent=t(N),B.appendChild(W);}B.value=D.value,B.disabled=!n.editable,B.setAttribute("aria-label",t("pptx.documentProperties.custom.value")),B.addEventListener("input",()=>{D.value=B.value,S();});let V=chunkOBVLNSK5_cjs.w(e,"select");V.disabled=!n.editable,V.setAttribute("aria-label",t("pptx.documentProperties.custom.type"));for(let[_,N]of [["lpwstr","pptx.documentProperties.custom.typeText"],["i4","pptx.documentProperties.custom.typeNumber"],["filetime","pptx.documentProperties.custom.typeDate"],["bool","pptx.documentProperties.custom.typeYesNo"]]){let W=chunkOBVLNSK5_cjs.w(e,"option");W.value=_,W.textContent=t(N),V.appendChild(W);}V.value=D.type,V.addEventListener("change",()=>{D.type=V.value,D.type==="bool"&&!["true","false"].includes(D.value)&&(D.value="true"),S(),w();});let F=chunkOBVLNSK5_cjs.w(e,"button");F.type="button",F.disabled=!n.editable,F.textContent="\xD7",F.setAttribute("aria-label",t("pptx.documentProperties.custom.deleteProperty")),F.addEventListener("click",()=>{l=l.filter((_,N)=>N!==I),S(),w();}),R.append(O,B,V,F),L.appendChild(R);});let M=chunkOBVLNSK5_cjs.w(e,"button");M.type="button",M.disabled=!n.editable,M.textContent=t("pptx.documentProperties.custom.addProperty"),M.addEventListener("click",()=>{l=[...l,{name:"",value:"",type:"lpwstr"}],S(),w();}),L.appendChild(M),b.replaceChildren(L);},P=()=>{v==="summary"?h():v==="statistics"?C():w();},k=([L,M])=>{let D=chunkOBVLNSK5_cjs.w(e,"button");D.type="button",D.textContent=t(M),D.addEventListener("click",()=>{v=L;for(let I of x.querySelectorAll("button"))I.classList.toggle("is-active",I===D);P();}),D.classList.toggle("is-active",L===v),x.appendChild(D);};[["summary","pptx.documentProperties.tabs.general"],["statistics","pptx.documentProperties.tabs.statistics"],["custom","pptx.documentProperties.tabs.custom"]].forEach(k);let T=chunkOBVLNSK5_cjs.w(e,"footer"),E=chunkOBVLNSK5_cjs.w(e,"button");return E.type="button",E.textContent=t("pptx.common.cancel"),E.addEventListener("click",d),f.type="button",f.textContent=t("pptx.common.save"),S(),f.addEventListener("click",()=>{n.onSave(s,a,l),d();}),T.append(E,f),i.append(u,x,b,T),o.append(r,i),P(),e.body.appendChild(o),o}function S0(e,t,n){let o=Et(e,t,t("pptx.fonts.embedFonts")),r=chunkOBVLNSK5_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.fonts.embedDescription");let i=n.canEmbed!==false,s=chunkOBVLNSK5_cjs.w(e,"label","pptxv-info-toggle"),a=chunkOBVLNSK5_cjs.w(e,"input");a.type="checkbox",a.checked=n.enabled,a.disabled=!i,a.addEventListener("change",()=>n.onToggle(a.checked));let l=chunkOBVLNSK5_cjs.w(e,"span");l.textContent=t("pptx.fonts.enableEmbedding"),s.append(a,l);let p=chunkOBVLNSK5_cjs.w(e,"p","pptxv-info-status");p.textContent=t(i?"pptx.fonts.embedKeepsExisting":n.unavailableKey??"pptx.fonts.embedUnavailable");let d=chunk24B6ZCFG_cjs.ej(n.slides),u=new Set(n.embeddedFonts.map(b=>b.name)),m=chunkOBVLNSK5_cjs.w(e,"h3");m.textContent=`${t("pptx.fonts.usedFonts")} (${d.length})`;let g=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-list"),x=chunkOBVLNSK5_cjs.w(e,"p","pptxv-info-status");return x.textContent=t("pptx.fonts.scanning"),g.appendChild(x),chunk24B6ZCFG_cjs.rp(d).then(b=>{if(o.overlay.isConnected){g.replaceChildren();for(let v of d){let f=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-row"),S=chunkOBVLNSK5_cjs.w(e,"span");S.textContent=v;let y=chunkOBVLNSK5_cjs.w(e,"span","pptxv-info-badges");if(u.has(v)){let C=chunkOBVLNSK5_cjs.w(e,"b");C.textContent=t("pptx.fonts.embedded"),y.appendChild(C);}let h=chunkOBVLNSK5_cjs.w(e,"em");h.classList.toggle("is-missing",!b.has(v)),h.textContent=b.has(v)?"\u2713":t("pptx.fonts.notFound"),y.appendChild(h),f.append(S,y),g.appendChild(f);}}}),o.body.append(r,s,p,m,g),wi(e,t,o),o.overlay}function w0(e,t,n){let o=Et(e,t,t("pptx.security.protectPresentation"));if(n.protected){let m=chunkOBVLNSK5_cjs.w(e,"p","pptxv-info-protected");m.textContent=`\u2713 ${t("pptx.security.currentlyProtected")}`,o.body.appendChild(m);}let r=chunkOBVLNSK5_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.security.description");let i=C0(e,t("pptx.security.password")),s=C0(e,t("pptx.security.confirmPassword")),a=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-strength"),l=chunkOBVLNSK5_cjs.w(e,"p","pptxv-info-error");if(l.setAttribute("role","alert"),i.input.addEventListener("input",()=>{l.textContent="";let m=chunk24B6ZCFG_cjs.sp(i.input.value);a.textContent=i.input.value?"\u25CF".repeat(m+1):"";}),s.input.addEventListener("input",()=>l.textContent=""),o.body.append(r,i.label,a,s.label,l),n.protected){let m=chunkOBVLNSK5_cjs.w(e,"button","is-danger");m.type="button",m.textContent=t("pptx.security.removePassword"),m.addEventListener("click",()=>{n.onRemove(),o.close();}),o.footer.appendChild(m);}let p=chunkOBVLNSK5_cjs.w(e,"span","pptxv-info-spacer"),d=chunkOBVLNSK5_cjs.w(e,"button");d.type="button",d.textContent=t("pptx.common.cancel"),d.addEventListener("click",o.close);let u=chunkOBVLNSK5_cjs.w(e,"button","is-primary");return u.type="button",u.textContent=t(n.protected?"pptx.security.updatePassword":"pptx.security.setPassword"),u.addEventListener("click",()=>{let m=chunk24B6ZCFG_cjs.tp(i.input.value,s.input.value);if(m){l.textContent=t(m==="required"?"pptx.security.errorPasswordRequired":m==="mismatch"?"pptx.security.errorPasswordMismatch":"pptx.security.errorPasswordTooShort");return}n.onSet(i.input.value),o.close();}),o.footer.append(p,d,u),o.overlay}function C0(e,t){let n=chunkOBVLNSK5_cjs.w(e,"label","pptxv-info-field"),o=chunkOBVLNSK5_cjs.w(e,"span");o.textContent=t;let r=chunkOBVLNSK5_cjs.w(e,"input");return r.type="password",n.append(o,r),{label:n,input:r}}var _D=10;function E0(e){let{doc:t,store:n,getTranslator:o,onChoose:r}=e,i=null,s;function a(){n.set({pasteOptionsToolbar:null});}function l(){s?.(),s=void 0,i?.remove(),i=null;}function p(u=0){l();let g=n.get().pasteOptionsToolbar?.[0]?.id;if(!g)return;let x=chunk24B6ZCFG_cjs.ee(t,g,{canvasOnly:true});if(!x){let y=t.defaultView;if(y&&u<_D){let h=y.requestAnimationFrame(()=>p(u+1));s=()=>y.cancelAnimationFrame(h);}return}let b=x.getBoundingClientRect(),v=o(),f=chunkOBVLNSK5_cjs.w(t,"div","pptxv-paste-options");f.setAttribute("role","toolbar"),f.setAttribute("tabindex","-1"),f.setAttribute("aria-label",v("pptx.pasteSpecial.optionsLabel")),f.setAttribute("data-pptx-paste-options",""),f.style.position="fixed",f.style.left=`${b.right+4}px`,f.style.top=`${b.bottom+4}px`,f.addEventListener("mousedown",y=>y.stopPropagation());for(let y of chunk24B6ZCFG_cjs.Yl){let h=chunkOBVLNSK5_cjs.w(t,"button");h.type="button",h.textContent=v(y.labelKey),h.title=v(y.labelKey),h.addEventListener("click",()=>r(y.id)),f.appendChild(h);}t.body.appendChild(f),i=f;let S=t.defaultView?.setTimeout(()=>{t.addEventListener("pointerdown",a,true),t.addEventListener("keydown",a,true);},0);s=()=>{S!==void 0&&t.defaultView?.clearTimeout(S),t.removeEventListener("pointerdown",a,true),t.removeEventListener("keydown",a,true);};}p();let d=n.subscribe((u,m)=>{u.pasteOptionsToolbar!==m.pasteOptionsToolbar&&p();});return {destroy(){d(),l();}}}function T0(e,t,n){let o=Et(e,t,t("pptx.digitalSignatures.strippedTitle")),r=chunkOBVLNSK5_cjs.w(e,"div","pptxv-info-notice is-warning"),i=chunkOBVLNSK5_cjs.w(e,"b");i.textContent="!";let s=chunkOBVLNSK5_cjs.w(e,"div"),a=chunkOBVLNSK5_cjs.w(e,"p");a.textContent=t("pptx.digitalSignatures.strippedMessage",{count:n});let l=chunkOBVLNSK5_cjs.w(e,"p","pptxv-info-description");l.textContent=t("pptx.digitalSignatures.editWarning"),s.append(a,l),r.append(i,s),o.body.appendChild(r);let p=chunkOBVLNSK5_cjs.w(e,"button");p.type="button",p.textContent=t("pptx.common.cancel"),p.addEventListener("click",o.close);let d=chunkOBVLNSK5_cjs.w(e,"button","is-primary");return d.type="button",d.textContent=t("pptx.digitalSignatures.strippedConfirm"),d.addEventListener("click",o.close),o.footer.append(p,d),o.overlay}function P0(e,t,n,o){t.querySelector(".pptxv-version-history")?.remove();let r=chunkOBVLNSK5_cjs.w(e,"aside","pptxv-version-history");r.setAttribute("aria-label",n("pptx.versionHistory.title"));let i=chunkOBVLNSK5_cjs.w(e,"header"),s=chunkOBVLNSK5_cjs.w(e,"span");s.textContent="\u25F7";let a=chunkOBVLNSK5_cjs.w(e,"h2");a.textContent=n("pptx.versionHistory.title");let l=chunkOBVLNSK5_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.common.close")),l.addEventListener("click",()=>r.remove()),i.append(s,a,l);let p=chunkOBVLNSK5_cjs.w(e,"div","pptxv-version-content");return p.textContent=n("pptx.common.loading"),r.append(i,p),t.appendChild(r),chunk24B6ZCFG_cjs.Ej(o.filePath).then(d=>{if(p.replaceChildren(),!d){let S=chunkOBVLNSK5_cjs.w(e,"p","pptxv-version-empty");S.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(S);return}let u=chunkOBVLNSK5_cjs.w(e,"article"),m=chunkOBVLNSK5_cjs.w(e,"strong");m.textContent=chunk24B6ZCFG_cjs.Oj(d.timestamp);let g=chunkOBVLNSK5_cjs.w(e,"small");g.textContent=chunk24B6ZCFG_cjs.Pj(d.timestamp);let x=chunkOBVLNSK5_cjs.w(e,"p");x.textContent=chunk24B6ZCFG_cjs.cp(d.size);let b=chunkOBVLNSK5_cjs.w(e,"footer"),v=chunkOBVLNSK5_cjs.w(e,"button","is-primary");v.type="button",v.textContent=n("pptx.versionHistory.restore"),v.addEventListener("click",()=>{Promise.resolve(o.onRestore(d.data)).then(()=>r.remove());});let f=chunkOBVLNSK5_cjs.w(e,"button","is-danger");f.type="button",f.textContent=n("pptx.common.delete"),f.addEventListener("click",()=>{chunk24B6ZCFG_cjs.Gj(d.key).then(()=>u.remove()).catch(()=>{});}),b.append(v,f),u.append(m,g,x,b),p.appendChild(u);}).catch(()=>{p.replaceChildren();let d=chunkOBVLNSK5_cjs.w(e,"p","pptxv-version-empty");d.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(d);}),r}function A0(e,t,n,o){let r=()=>{let d=e.get(),u=d.activeCustomShowId?d.customShows.find(({id:g})=>g===d.activeCustomShowId):void 0,m=chunk24B6ZCFG_cjs.Lp(d.presentationProperties,d.slides.length);return chunk24B6ZCFG_cjs.Fp(d.slides,u,m)},i=(d,u=false)=>{e.set({currentSlide:Vt(d,e.get().slides.length),endOfShow:false,enteringBackward:u});},s=chunk24B6ZCFG_cjs.Hk(),a=()=>{let{zoom:d,fitScale:u,manual:m}=s.getState();e.set({zoom:m?u*d:"fit"});};s.subscribe(a);let l=()=>{let d=t.fitScale();return s.dispatch({type:"set-fit-scale",fitScale:d}),d};return {next:()=>{let d=e.get();if(d.endOfShow){e.set({endOfShow:false}),n?.();return}if(d.presenting&&t.presentationPlayback.advance())return;if(d.presenting){let g=t.presentationPlayback.consumeZoomReturnOnAdvance(d.currentSlide);if(g!==void 0){i(g);return}}let u=r(),m=d.presentationProperties.loopContinuously===true;if(d.presenting&&!m&&!chunk24B6ZCFG_cjs.Ip(d.currentSlide,u)){if(o?.()===false){n?.();return}e.set({endOfShow:true});return}i(d.presenting?chunk24B6ZCFG_cjs.Gp(d.currentSlide,u,{loop:m})??d.currentSlide:d.currentSlide+1);},prev:()=>{if(e.get().endOfShow){e.set({endOfShow:false});return}if(e.get().presenting&&t.presentationPlayback.isSeededCompleted()){t.presentationPlayback.replayCurrentSlide(document);return}let d=e.get();i(d.presenting?chunk24B6ZCFG_cjs.Hp(d.currentSlide,r())??d.currentSlide:d.currentSlide-1,d.presenting);},firstSlide:()=>{let d=e.get();i(d.presenting?chunk24B6ZCFG_cjs.Mp(r())??0:0);},lastSlide:()=>{let d=e.get();i(d.presenting?chunk24B6ZCFG_cjs.Np(r())??d.slides.length-1:d.slides.length-1);},goToSlide:i,navigateToZoomTarget:d=>{let u=e.get(),m=t.presentationPlayback.navigateToZoomTarget(d,u.currentSlide,u.slides);i(m);},firstShowSlideIndex:()=>chunk24B6ZCFG_cjs.Mp(r())??0,presentationEntryIndex:()=>chunk24B6ZCFG_cjs.Op(e.get().currentSlide,r()),slideCount:()=>e.get().slides.length,currentSlide:()=>e.get().currentSlide,zoom:()=>t.effectiveScale(),setZoom:d=>{if(d==="fit"){s.dispatch({type:"zoom-to-fit"});return}let u=l();s.dispatch({type:"set-zoom",zoom:u>Number.EPSILON?d/u:d});},zoomIn:()=>{l(),s.dispatch({type:"zoom-in"});},zoomOut:()=>{l(),s.dispatch({type:"zoom-out"});},zoomToFit:()=>s.dispatch({type:"zoom-to-fit"})}}var GD=["pptxv-reduced-motion","pptxv-no-hw-accel","pptxv-compat-display"],k0=[["showGrid","showGrid"],["showRulers","showRulers"],["snapToGrid","snapToGrid"],["spellCheckEnabled","spellCheck"]];function I0(e,t){let n=chunk24B6ZCFG_cjs.Hq(t),o=false,r=a=>{o=true;try{let l=chunk24B6ZCFG_cjs.qq(a),p=e.store.get(),d={};for(let[m,g]of k0)p[m]!==l[g]&&(d[m]=l[g]);Object.keys(d).length>0&&e.store.set(d);let u=e.root();if(u){u.classList.toggle("pptxv-showGrid",l.showGrid),u.classList.toggle("pptxv-showRulers",l.showRulers),u.classList.toggle("pptxv-snapToGrid",l.snapToGrid);let m=new Set(chunk24B6ZCFG_cjs.Aq(a,"pptxv"));for(let g of GD)u.classList.toggle(g,m.has(g));u.classList.toggle("pptxv-no-show-popup",!a.advanced.slideShowShowPopupToolbar);}e.isAutosaveEnabled()!==l.autoSave&&e.setAutosaveEnabled(l.autoSave),e.setAutosaveIntervalMs(chunk24B6ZCFG_cjs.tq(a)*1e3),e.setHistoryDepth(chunk24B6ZCFG_cjs.sq(a)),e.setRibbonHiddenTabs(a.ribbon.hiddenTabIds),e.refreshQuickAccess(),e.applyScreenTips(),e.renderStage();}finally{o=false;}},i=n.subscribe(r),s=e.store.subscribe((a,l)=>{if(o)return;let p=n.getOptions(),d=false;for(let[u,m]of k0)a[u]!==l[u]&&chunk24B6ZCFG_cjs.qq(p)[m]!==a[u]&&(p=chunk24B6ZCFG_cjs.rq(p,m,a[u]),d=true);d&&n.setOptions(p);});return {optionsStore:n,getOptions:()=>n.getOptions(),applyAll:()=>r(n.getOptions()),screenTip:(a,l,p)=>chunk24B6ZCFG_cjs.uq(n.getOptions(),a,l,p),transformCommittedText:a=>chunk24B6ZCFG_cjs.gq(a,n.getOptions().proofing),notifyActionSuccess:()=>chunk24B6ZCFG_cjs.Eq(n.getOptions()),notifyAutosaveEnabled(a){!o&&n.getOptions().save.autoSave!==a&&n.setValue("save","autoSave",a);},isProtectedView:()=>chunk24B6ZCFG_cjs.xq(n.getOptions()),dispose(){i(),s();}}}var L0="pptx-vanilla-google-fonts";function M0(e,t){chunk24B6ZCFG_cjs.ij(e,L0,t);}function D0(e){e.getElementById(L0)?.remove();}var Yo=class extends ni{container;doc;options;store;renderer;t;currentTheme;availableThemes;availableLocales;currentThemeKey;currentLocale;lifecycle;editor;exporter;loading;registry;sessions;controls;destroyed=false;presenterChannel=null;audienceWindow=null;presenterSessionId="";presenterSequence=0;presenterSnapshot=chunk24B6ZCFG_cjs.xk();presenterView=null;presenterCaptions=null;presenterShowGuard=chunk24B6ZCFG_cjs.cl();userFontsStyle=null;signatureWarningAcknowledged=false;detachSignatureWarning=null;webfontsToken=0;requestedEditable=false;annotations;parityWorkflows;aiChat=null;aiFocus=null;contextMenu=null;canvasContextMenu=null;pasteOptionsToolbar=null;rulers=null;optionsController;customization;constructor(t,n={}){super(),this.container=t,this.doc=t.ownerDocument,this.options=n,this.customization=tw(n),this.requestedEditable=n.editable??false;let o=chunk24B6ZCFG_cjs.Wp();this.availableThemes=n.availableThemes??chunk24B6ZCFG_cjs.Ia,this.availableLocales=g0(n);let r=x0(n,o.themeKey,this.availableThemes);this.currentThemeKey=r.key,this.currentTheme=r.theme,this.currentLocale=b0(n,o.localeCode,this.availableLocales),this.t=Ht(this.currentLocale,n.messages),this.registry=n.registry??chunkOBVLNSK5_cjs.J(),this.store=ui(xi()),this.loading=DA({options:n,store:this.store,getTranslator:()=>this.t,getEditor:()=>this.editor,onContentApplying:a=>this.sessions?.beginCollaborationContentLoad(a),onContentApplied:a=>{this.sessions?.notifyCollaborationContentLoaded(a),a==="bootstrap"&&this.lifecycle?.chrome.ribbon?.showDefaultTab();},getAllowExternalContent:()=>this.optionsController?.getOptions().trust.allowExternalContent??chunk24B6ZCFG_cjs.oq.trust.allowExternalContent,shouldOpenProtectedView:()=>this.optionsController?.isProtectedView()??false,setEditableForLoad:a=>this.setEditable(a)}),this.renderer=Bp({doc:this.doc,store:this.store,registry:this.registry,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getFitOptions:()=>this.options,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getPixelateMosaicAnimation:()=>this.optionsController?.getOptions().advanced.pixelateMosaicAnimation??false,onHandoutSlidesPerPageChange:a=>this.editor?.setHandoutSlidesPerPage(a),onMasterBackgroundColorChange:a=>this.editor?.getEditActions().setSlideBackgroundColor(a),onMasterCrudAction:a=>{this.editor?.getEditActions().masterView.runMasterViewCrudAction(a);},onSectionToggle:a=>this.editor?.getEditActions().sections.toggleSection(a),onSectionRename:(a,l)=>this.editor?.getEditActions().sections.renameSection(a,l),onSectionDelete:a=>this.editor?.getEditActions().sections.deleteSection(a),onSectionMove:(a,l)=>this.editor?.getEditActions().sections.moveSection(a,l),onZoomClick:a=>this.controls.navigateToZoomTarget(a),onCommentMarkerClick:()=>this.parityWorkflows.openComments(),onSmartArtNodeTextChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData||!chunk24B6ZCFG_cjs.Kd(a.smartArtData,l,p))return;let d=chunk24B6ZCFG_cjs.E(a.smartArtData,l,p),u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunk24B6ZCFG_cjs.yn(d,a.id,u)});},onSmartArtNodeFillChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData)return;let d=chunk24B6ZCFG_cjs.I(a.smartArtData,l,{fillColor:p});if(d!==a.smartArtData){let u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunk24B6ZCFG_cjs.yn(d,a.id,u)});}},onChartPointChange:(a,l)=>{a.type==="chart"&&this.editor?.applyElementPatch(a.id,{chartData:l});},onTableResizeColumns:(a,l)=>{a.type!=="table"||!a.tableData||this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,columnWidths:l}});},onTableResizeRow:(a,l,p)=>{if(a.type!=="table"||!a.tableData)return;let d=a.tableData.rows.map((u,m)=>m===l?{...u,height:p}:u);this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,rows:d}});},onChartPartSelect:(a,l)=>{this.store.set({chartPartSelection:{elementId:a.id,part:l}});},onStageRendered:()=>{this.editor?.onStageRendered(),this.rulers?.sync(),this.annotations?.sync(this.presenterSnapshot);}}),this.controls=A0(this.store,this.renderer,()=>{this.exitPresentation();},()=>this.optionsController?.getOptions().advanced.slideShowEndWithBlackSlide),Up(this.doc);let i=chunk24B6ZCFG_cjs.xb(n.fonts??[]);i&&(this.userFontsStyle=this.doc.createElement("style"),this.userFontsStyle.dataset.pptxUserFonts="vanilla",this.userFontsStyle.textContent=i,this.doc.head.appendChild(this.userFontsStyle)),this.lifecycle=yl(Cl(this)),this.editor=Ep({doc:this.doc,store:this.store,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),getHandler:()=>this.loading.getHandler(),setHandler:a=>this.loading.setHandler(a),getUserName:()=>this.optionsController?.getOptions().general.userName,transformCommittedText:a=>this.optionsController?.transformCommittedText(a)??a,onChange:n.onChange,onCursorMove:(a,l)=>this.sessions.setCollaborationCursor(a,l),onInlineTextInput:(a,l)=>this.sessions.publishCollaborationInlineText(a,l),getLivePatcher:()=>this.sessions.getCollaborationLivePatcher(),flushInlineTextInput:()=>this.sessions.flushCollaborationLivePatch(),getKeyboardCustomization:()=>this.customization.getResolved().keyboard,getCustomization:()=>this.customization.getResolved()}),this.editor.attachChrome(),this.rulers=hk({doc:this.doc,store:this.store,getStageWrap:()=>this.lifecycle?.chrome.stageWrap??null,getScale:()=>this.renderer.effectiveScale(),getUnit:()=>n.rulerUnit??"inches",onCreateGuide:(a,l)=>this.editor?.getEditActions().addGuide(a,l)}),this.annotations=lk({doc:this.doc,t:this.t,store:this.store,editor:this.editor,getChrome:()=>this.lifecycle.chrome,getSnapshot:()=>this.presenterSnapshot,updateSnapshot:a=>this.updatePresenterSnapshot(a),shouldPromptKeepAnnotations:()=>this.optionsController?.getOptions().advanced.slideShowPromptKeepInkAnnotations??true}),this.exporter=Ml({doc:this.doc,container:this.container,store:this.store,registry:this.registry,getTranslator:()=>this.t,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getImageResolutionScale:()=>chunk24B6ZCFG_cjs.wq(this.optionsController.getOptions()),getIncludeHiddenSlides:()=>this.optionsController.getOptions().advanced.printHiddenSlides,getPrintHighQuality:()=>this.optionsController.getOptions().advanced.printHighQuality,fileName:n.fileName}),this.optionsController=I0({store:this.store,root:()=>this.lifecycle?.chrome.root??null,isAutosaveEnabled:()=>this.sessions?.isAutosavePreferred()??true,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),setAutosaveIntervalMs:a=>this.sessions?.setAutosaveIntervalMs(a),setHistoryDepth:a=>this.editor?.setHistoryDepth(a),setRibbonHiddenTabs:a=>this.lifecycle?.chrome.ribbon?.setHiddenOptionTabs(a),refreshQuickAccess:()=>{this.lifecycle?.chrome.titleBar?.refreshQuickAccess(),this.lifecycle?.chrome.setQuickAccessPosition(this.getQuickAccessOptions().position);},applyScreenTips:()=>this.lifecycle?.chrome.ribbon?.applyScreenTips(a=>this.optionsController.screenTip(a)),renderStage:()=>this.renderer.renderStage()},{initial:{save:{autoSave:n.autosave??true}}});let s={doc:this.doc,t:this.t,store:this.store,editor:this.editor,optionsStore:this.optionsController.optionsStore,clearOptionsCache:()=>this.clearOptionsCache(),registerCustomFont:a=>{let l=this.store.get().customFontFamilies;l.includes(a)||this.store.set({customFontFamilies:[...l,a]});},aiEnabled:false,getCustomization:()=>this.customization.getResolved(),root:()=>this.lifecycle.chrome.root,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),print:a=>this.print(a),goToSlide:a=>this.goToSlide(a),renderSlideNode:(a,l)=>this.renderer.renderSlideNode(a,l),enterPresentation:()=>this.enterPresentation(),setTheme:a=>this.setTheme(a),setLocale:a=>this.setLocale(a),getThemeState:()=>({key:this.currentThemeKey,catalog:this.availableThemes}),getLocaleState:()=>({code:this.currentLocale,catalog:this.availableLocales}),getAddinStatus:()=>{let a=!this.optionsController.getOptions().advanced.disable3DRendering;return {smartArt3d:a,model3d:a,collaboration:this.getCollaborationStatus()==="connected"}}};Object.defineProperty(s,"t",{get:()=>this.t}),Object.defineProperty(s,"aiEnabled",{get:()=>this.customization.isAiEnabled()}),this.parityWorkflows=ik(s),this.setupContextMenu(),this.pasteOptionsToolbar=E0({doc:this.doc,store:this.store,getTranslator:()=>this.t,onChoose:a=>{let l=this.store.get().pasteOptionsToolbar?.[0];if(this.store.set({pasteOptionsToolbar:null}),!!l){if(a==="picture"){Zr(this.doc,l.id,l.sourceClone).then(p=>{p&&this.editor.getEditActions().replaceElement(l.id,p);});return}this.editor.getEditActions().reformatPasted(l.id,l.sourceClone,a);}}}),n.editable&&(this.store.set({editable:true}),this.editor.setEditable(true)),this.store.subscribe(Gp({getChrome:()=>this.lifecycle.chrome,renderer:this.renderer,callbacks:n})),this.store.subscribe((a,l)=>{this.presenterSessionId&&this.syncAudience(a.currentSlide),this.annotations.sync(this.presenterSnapshot),l.presenting&&!a.presenting&&this.annotations.finish(),(a.currentSlide!==l.currentSlide||a.slides!==l.slides)&&this.presenterView?.syncSlide();}),this.detachSignatureWarning=this.store.subscribe((a,l)=>{a.dirty&&!l.dirty&&a.hasDigitalSignatures&&!this.signatureWarningAcknowledged&&(this.signatureWarningAcknowledged=true,T0(this.doc,this.t,a.digitalSignatureCount));}),this.store.subscribe((a,l)=>{if(a.slides===l.slides&&a.embeddedFonts===l.embeddedFonts)return;chunkOBVLNSK5_cjs.I.registerEmbeddedFonts(a.embeddedFonts);let p=++this.webfontsToken;chunk24B6ZCFG_cjs.hj(a.slides,a.embeddedFonts).then(d=>p!==this.webfontsToken?null:(M0(this.doc,d),d)),this.syncGlyphOutlineWebfonts(a.slides,a.embeddedFonts,p);}),this.sessions=Hk({doc:this.doc,store:this.store,options:n,getHandler:()=>this.loading.getHandler(),getSaveOptions:()=>{let a=this.store.get();return chunk24B6ZCFG_cjs.zp({headerFooter:a.headerFooter,presentationProperties:a.presentationProperties,viewProperties:a.viewProperties,customShows:a.customShows,sections:a.sections,coreProperties:a.coreProperties,appProperties:a.appProperties,customProperties:a.customProperties,tagCollections:a.tagCollections,slideMasters:a.slideMasters,notesMaster:a.notesMaster,handoutMaster:a.handoutMaster,slideSize:chunk24B6ZCFG_cjs.nj({current:a.slideSize,canvas:a.canvasSize}).size,tableStyleMap:a.tableStyleMap,tableStylesDefaultId:a.tableStylesDefaultId,tableStylesToDelete:a.tableStylesToDelete,embedFonts:a.embedFonts})},getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),setEditable:a=>this.setEditable(a),onCollaborationReadOnlyChange:a=>this.applyEditable(this.requestedEditable&&!a),goToSlide:a=>this.controls.goToSlide(a),loadFile:a=>this.loadFile(a,{skipProtectedView:true}),getUserInitials:()=>this.optionsController?.getOptions().general.userInitials,getHiddenActions:()=>this.getChromeOptions().hiddenActions,isShareAvailable:()=>this.customization.isDialogAvailable("share")}),this.customization.bind(this.optionsController.optionsStore,()=>this.rebuildChrome()),this.optionsController.applyAll(),this.pruneExpiredAutosaveSnapshots(),this.renderer.renderAll(),this.setupAiChat(),n.source!==void 0&&this.loading.load(n.source,"bootstrap"),this.connectAudienceRole();}syncGlyphOutlineWebfonts(t,n,o){let r=chunk24B6ZCFG_cjs.fj(t),i=chunk24B6ZCFG_cjs.gj(r,n.map(s=>s.name));i.length!==0&&chunk24B6ZCFG_cjs.hj(t,n).then(async s=>{if(o!==this.webfontsToken||!s)return;let a=[{bold:false,italic:false},{bold:true,italic:false}],l=false;for(let p of i)for(let d of a){if(o!==this.webfontsToken)return;let u=await chunk24B6ZCFG_cjs.Ab(s,p,d.bold,d.italic,fetch);u&&chunkOBVLNSK5_cjs.I.registerFontBytes(p,d.bold,d.italic,u)&&(l=true);}l&&o===this.webfontsToken&&this.store.set({outlineFontsTick:this.store.get().outlineFontsTick+1});});}setupContextMenu(){this.contextMenu?.destroy(),this.contextMenu=ul({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),selectElement:t=>this.editor.selectElements([t]),openComments:()=>this.parityWorkflows.openComments(),openHyperlink:()=>this.parityWorkflows.openHyperlink(),getAi:()=>this.aiFocus,getCustomization:()=>this.customization.getResolved(),startEditPoints:t=>this.editor.startEditPoints(t)}),this.canvasContextMenu?.destroy(),this.canvasContextMenu=v0({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),getCustomization:()=>this.customization.getResolved()});}setupAiChat(){let t=this.options.ai;if(this.aiChat?.destroy(),!t||!this.customization.isAiEnabled()){this.aiChat=null,this.aiFocus=null;return}let n=rs({store:this.store,requestOpen:()=>this.aiChat?.open()});this.aiFocus=n;let o=ns({store:this.store,editor:this.editor,goToSlide:r=>this.controls.goToSlide(r),ensureEditable:()=>{this.store.get().editable||this.setEditable(true);},getHandler:()=>this.loading.getHandler(),applyThemeUpdates:r=>this.applyAiThemeUpdates(r),getFocusedTargets:()=>n.getEffectiveTargets()});this.aiChat=is({doc:this.doc,chrome:this.lifecycle.chrome,t:this.t,bridge:o,config:t,store:this.store,controller:n,goToSlide:r=>this.controls.goToSlide(r)});}applyAiThemeUpdates(t){t.colorScheme&&(this.store.set({colorScheme:{...this.store.get().colorScheme??{},...t.colorScheme}}),this.renderer.renderAll());}async loadFile(t,n){this.signatureWarningAcknowledged=false,await this.loading.load(t,"user",n);}openFile(){(async()=>{let t=await chunk24B6ZCFG_cjs.Nj();t&&await this.loadFile(t.buffer);})();}openRecentFile(t){(async()=>{let n=await chunk24B6ZCFG_cjs.ap(t);n&&await this.loadFile(n);})();}createPresentation(t){this.editor.commitSlides(chunk24B6ZCFG_cjs._o(t),0);}async loadUrl(t){this.signatureWarningAcknowledged=false,await this.loading.load(t);}next=()=>this.controls.next();prev=()=>this.controls.prev();goToSlide=t=>this.controls.goToSlide(t);toggleHideCurrentSlide=()=>this.toggleHideSlides([this.store.get().currentSlide]);goToFirstSlide=()=>this.controls.firstSlide();goToLastSlide=()=>this.controls.lastSlide();firstShowSlideIndex=()=>this.controls.firstShowSlideIndex();getSlideCount=()=>this.controls.slideCount();getCurrentSlide=()=>this.controls.currentSlide();getZoom=()=>this.controls.zoom();setZoom(t){this.controls.setZoom(t);}zoomIn=()=>this.controls.zoomIn();zoomOut=()=>this.controls.zoomOut();zoomToFit=()=>this.controls.zoomToFit();zoomReset=()=>this.controls.setZoom(1);goTo=t=>this.goToSlide(t);goPrev=()=>this.prev();goNext=()=>this.next();getContent=()=>this.save();getMode=()=>{let t=this.store.get();return t.masterViewTarget?"master":t.presenting?"present":t.editable?"edit":"preview"};setMode=t=>{if(t==="present"){this.enterPresentation();return}this.store.get().presenting&&this.exitPresentation(),this.setEditable(t==="edit"||t==="master"),t==="master"&&!this.store.get().masterViewTarget&&this.toggleMasterNavigation(),t!=="master"&&this.store.get().masterViewTarget&&this.toggleMasterNavigation();};getActiveSlideIndex=()=>this.getCurrentSlide();setActiveSlideIndex=t=>this.goToSlide(t);isDirty=()=>this.store.get().dirty;getSlides=()=>this.store.get().slides;getSlide=t=>this.store.get().slides[t];getActiveSlide=()=>this.getSlide(this.getCurrentSlide());getElements=(t=this.getCurrentSlide())=>this.getSlide(t)?.elements??[];getElementById=(t,n=this.getCurrentSlide())=>this.getElements(n).find(o=>o.id===t);updateElements=async(t,n)=>{chunk24B6ZCFG_cjs.it(t,n,{getTarget:()=>{let o=this.store.get();return {canEdit:o.editable&&!o.protectedView&&!(o.readOnlyRecommendation?.defaultReadOnly&&!o.readOnlyBannerDismissed),mode:this.getMode(),loaded:!o.loading&&!o.error,editTemplateMode:o.editTemplateMode}},getSlides:()=>this.store.get().slides,hasActivePointerInteraction:()=>this.editor.hasActivePointerInteraction(),commitPendingText:()=>this.container.querySelector("[data-inline-editor]")?.blur(),commitSlides:(o,r)=>this.editor.commitElementUpdates(o,r)});};updateElement=(t,n)=>this.editor.applyElementPatch(t,n);addElement=t=>{let n=this.store.get(),o=chunk24B6ZCFG_cjs.fo(t,{canEdit:n.editable&&!n.protectedView&&!(n.readOnlyRecommendation?.defaultReadOnly&&!n.readOnlyBannerDismissed),mode:this.getMode(),hasActiveSlide:!n.loading&&!n.error&&!!n.slides[n.currentSlide],editTemplateMode:n.editTemplateMode});if(o)return this.container.querySelector("[data-inline-editor]")?.blur(),this.editor.getEditActions().insertElement(o),o.id};deleteElements=t=>{this.editor.selectElements(t),this.editor.deleteSelected();};duplicateElement=t=>(this.editor.selectElements([t]),this.editor.duplicateSelected()??void 0);getSelectedElementIds=()=>[...this.store.get().selectedElementIds];selectElements=t=>this.editor.selectElements(t);clearSelection=()=>this.editor.selectElements([]);addSlide=(t=this.store.get().slides.length-1)=>{let n=[...this.store.get().slides],o=Math.min(Math.max(t+1,0),n.length);n.splice(o,0,chunk24B6ZCFG_cjs.Hf(o+1,chunk24B6ZCFG_cjs.Gf)),this.editor.commitSlides(this.renumber(n),o);};deleteSlides=t=>{let n=new Set(t),o=this.store.get().slides.filter((r,i)=>!n.has(i));o.length>0&&this.editor.commitSlides(this.renumber(o));};duplicateSlides=t=>{let n=new Set(t),o=this.store.get().slides.flatMap((r,i)=>n.has(i)?[r,{...chunk24B6ZCFG_cjs.l(r),id:chunk24B6ZCFG_cjs.Gf()}]:[r]);this.editor.commitSlides(this.renumber(o));};moveSlide=(t,n)=>{let o=[...this.store.get().slides];if(!o[t]||n<0||n>=o.length||t===n)return;let[r]=o.splice(t,1);o.splice(n,0,r),this.editor.commitSlides(this.renumber(o),n);};toggleHideSlides=t=>{let n=new Set(t);this.editor.commitSlides(this.store.get().slides.map((o,r)=>n.has(r)?{...o,hidden:!o.hidden}:o));};renumber(t){return t.map((n,o)=>({...n,slideNumber:o+1}))}toggleNotes(){this.store.set({notesExpanded:!this.store.get().notesExpanded});}setTheme(t){this.lifecycle.appliedThemeVars=Ro(this.lifecycle.chrome.root,t,this.lifecycle.appliedThemeVars),this.currentTheme=t;let n=Kp(t,this.availableThemes);n!==void 0&&(this.currentThemeKey=n,this.options.onThemeChange?this.options.onThemeChange(n):chunk24B6ZCFG_cjs.Xp({themeKey:n}));}applyPresentationTheme(t){pk({presetId:t,loading:this.loading,store:this.store,editor:this.editor});}openAccessibility(){this.lifecycle.chrome.accessibility.open(chunk24B6ZCFG_cjs.pm(this.store.get().slides));}openSettings(t="general"){this.customization.isDialogAvailable("options")&&this.parityWorkflows.openSettings(t);}openSetUpSlideShow(){this.parityWorkflows.openSetUpSlideShow();}toggleSubtitles(){let t=this.store.get().presentationProperties;this.editor.updatePresentationProperties({...t,showSubtitles:!t.showSubtitles});}openHeaderFooter(){this.parityWorkflows.openHeaderFooter();}openCompare(){this.parityWorkflows.openCompare();}openPrintDialog(){this.customization.isDialogAvailable("print")&&this.parityWorkflows.openPrintDialog();}startRehearsal(){this.parityWorkflows.startRehearsal();}openSelectionPane(){this.parityWorkflows.openSelectionPane();}openSlideSorter(){this.parityWorkflows.openSlideSorter();}openReadingView(){this.parityWorkflows.openReadingView();}openOutlineView(){this.parityWorkflows.openOutlineView();}openComments(){this.parityWorkflows.openComments();}openHyperlink(){this.parityWorkflows.openHyperlink();}openCustomShows(){this.parityWorkflows.openCustomShows();}openDocumentProperties(){let t=this.store.get();y0(this.doc,this.t,{slides:t.slides,core:t.coreProperties,app:t.appProperties,custom:t.customProperties,editable:t.editable,onSave:(n,o,r)=>this.editor.updateDocumentProperties(n,o,r)});}openFontEmbedding(){let t=this.store.get(),n=chunk24B6ZCFG_cjs.to(t.embeddedFonts.map(o=>o.name));S0(this.doc,this.t,{slides:t.slides,embeddedFonts:t.embeddedFonts,enabled:t.embedFonts,canEmbed:n.interactive,unavailableKey:n.disabledReasonKey,onToggle:o=>this.store.set({embedFonts:o})});}openDigitalSignatures(){let t=this.store.get();h0(this.doc,this.t,t.hasDigitalSignatures,t.digitalSignatureCount);}openPasswordProtection(){w0(this.doc,this.t,{protected:this.store.get().isPasswordProtected,onSet:t=>{this.store.set({isPasswordProtected:true,presentationPassword:t});},onRemove:()=>{this.store.set({isPasswordProtected:false,presentationPassword:null});}});}openVersionHistory(){P0(this.doc,this.lifecycle.chrome.root,this.t,{filePath:this.options.autosaveFilePath??"presentation.pptx",onRestore:t=>this.loadFile(t,{skipProtectedView:true})});}openPresenterView(){this.store.set({notesExpanded:true}),this.presenterView?.dispose(),this.presenterView=Fp(this.buildPresenterViewOptions()),this.markPresenterConsoleOpen(true),this.store.get().presenting||this.enterPresentation();}openAudienceWindow(){this.closeAudienceWindow(),this.store.get().presenting&&this.presenterShowGuard.expectAudienceBounce();let t=window.open("about:blank","pptx-viewer-audience","popup=yes,width=1280,height=720");if(!t){this.presenterShowGuard.disarm();return}this.audienceWindow=t,this.presenterSessionId=chunk24B6ZCFG_cjs.wk(),this.presenterView?.syncSnapshot();let n=this.presenterSessionId,o=chunk24B6ZCFG_cjs.yk(window.location.href,n);chunk24B6ZCFG_cjs.Bk(window).then(i=>{i&&this.audienceWindow===t&&!t.closed&&chunk24B6ZCFG_cjs.Ck(t,i);});let r=this.loading.getHandler();if(!r){this.closeAudienceWindow();return}r.save(this.store.get().slides).then(i=>chunk24B6ZCFG_cjs.Ek(n,i)).then(()=>t.location.replace(o)).catch(()=>this.closeAudienceWindow());}getPresenterChannel(){try{return this.presenterChannel??=new BroadcastChannel(chunk24B6ZCFG_cjs.uk),this.presenterChannel}catch{return null}}isAudienceWindowOpen(){return !!(this.audienceWindow&&!this.audienceWindow.closed)}syncAudience(t=this.getCurrentSlide()){this.presenterSessionId&&this.getPresenterChannel()?.postMessage({origin:chunk24B6ZCFG_cjs.vk,type:"presenter-state",sessionId:this.presenterSessionId,snapshot:{...this.presenterSnapshot,slideIndex:t,sequence:++this.presenterSequence}});}getPresenterSnapshot(){return this.presenterSnapshot}updatePresenterSnapshot(t){this.presenterSnapshot=chunk24B6ZCFG_cjs.ok(this.presenterSnapshot,t),Vp(this.lifecycle.chrome.root,this.presenterSnapshot),this.syncAudience(this.presenterSnapshot.slideIndex),this.annotations.sync(this.presenterSnapshot),this.syncPresentationToolbar(),this.presenterView?.syncSnapshot();}buildPresenterViewOptions(){return {doc:this.doc,t:this.t,container:this.lifecycle.chrome.root,getSnapshot:()=>this.presenterSnapshot,getSlides:()=>this.store.get().slides,getCurrent:()=>this.getCurrentSlide(),getElapsedMs:()=>this.presenterSnapshot.elapsedMs??0,canvasSize:()=>this.store.get().canvasSize,getActiveCustomShow:()=>{let t=this.store.get();return t.activeCustomShowId?t.customShows.find(({id:n})=>n===t.activeCustomShowId)??null:null},getAuthoredRange:()=>{let t=this.store.get();return chunk24B6ZCFG_cjs.Lp(t.presentationProperties,t.slides.length)},renderSlide:(t,n)=>this.renderer.renderSlideNode(t,n),navigate:t=>this.goToSlide(t),move:t=>t===1?this.controls.next():this.controls.prev(),isAudienceOpen:()=>this.isAudienceWindowOpen(),toggleTimer:()=>this.updatePresenterSnapshot({paused:!this.presenterSnapshot.paused}),resetTimer:()=>this.updatePresenterSnapshot({paused:false,elapsedMs:0}),stepZoom:t=>this.updatePresenterSnapshot({zoom:chunk24B6ZCFG_cjs.lk(this.presenterSnapshot.zoom??{scale:1,originX:.5,originY:.5},t)}),resetZoom:()=>this.updatePresenterSnapshot({zoom:{scale:1,originX:.5,originY:.5}}),setPointerTool:t=>this.updatePresenterSnapshot({pointer:{...this.presenterSnapshot.pointer??{x:.5,y:.5,color:"#ef4444"},tool:t}}),setBlackout:t=>this.updatePresenterSnapshot({blackout:this.presenterSnapshot.blackout===t?"none":t}),toggleCaptions:()=>this.togglePresenterCaptions(),toggleAudience:()=>this.isAudienceWindowOpen()?this.closeAudienceWindow():this.openAudienceWindow(),swapDisplays:()=>this.swapPresenterDisplays(),end:()=>{this.closeAudienceWindow(),this.exitPresentation();}}}clearPresentationAnnotations(){this.annotations.clear();}markPresenterConsoleOpen(t){this.lifecycle.chrome.root.classList.toggle("pptxv-presenter-open",t);}syncPresentationToolbar(){this.lifecycle.chrome.presentationToolbar.update({tool:this.presenterSnapshot.pointer?.tool??"none",blackout:this.presenterSnapshot.blackout,hasAnnotations:(this.presenterSnapshot.inkStrokes?.length??0)>0,presenterViewActive:this.presenterView!==null});}togglePresenterView(){if(this.presenterView){this.closeAudienceWindow(),this.presenterView.dispose(),this.presenterView=null,this.presenterCaptions?.dispose(),this.presenterCaptions=null,this.markPresenterConsoleOpen(false),this.syncPresentationToolbar();return}this.openPresenterView(),this.syncPresentationToolbar();}showPresentationAllSlides(){this.presenterView||(this.openPresenterView(),this.syncPresentationToolbar()),this.presenterView?.showAllSlides();}shouldShowPresentationContextMenu(){return this.optionsController?.getOptions().advanced.slideShowShowMenuOnRightClick??true}togglePresenterCaptions(){this.presenterCaptions??=Mp({doc:this.doc,t:this.t,emit:t=>this.updatePresenterSnapshot(t)}),this.presenterCaptions.toggle();}swapPresenterDisplays(){let t=this.audienceWindow;!t||t.closed||chunk24B6ZCFG_cjs.Dk(window,t);}classifyPresentationExit(){return this.presenterShowGuard.classifyFullscreenExit()}connectAudienceRole(){let t=chunk24B6ZCFG_cjs.zk(window.location.hash),n=this.getPresenterChannel();n&&(n.addEventListener("message",o=>{let r=o.data;chunk24B6ZCFG_cjs.Ak(r)&&(t&&r.sessionId===t?(r.type==="presenter-state"&&(this.presenterSnapshot=r.snapshot,Vp(this.lifecycle.chrome.root,r.snapshot),this.goToSlide(r.snapshot.slideIndex)),r.type==="presenter-slide-change"&&this.goToSlide(r.slideIndex),r.type==="presenter-exit"&&chunk24B6ZCFG_cjs.Kk(window)&&this.store.set({endOfShow:true})):r.type==="audience-ready"&&r.sessionId===this.presenterSessionId&&this.syncAudience());}),t&&(n.postMessage({origin:chunk24B6ZCFG_cjs.vk,type:"audience-ready",sessionId:t}),this.options.source===void 0&&chunk24B6ZCFG_cjs.Fk(t).then(async o=>{o&&(await this.loading.load(o,"bootstrap"),await this.enterPresentation());})));}closeAudienceWindow(){let t=this.presenterSessionId;t&&(this.getPresenterChannel()?.postMessage({origin:chunk24B6ZCFG_cjs.vk,type:"presenter-exit",sessionId:t}),chunk24B6ZCFG_cjs.Gk(t));try{this.audienceWindow?.close();}catch{}this.audienceWindow=null,this.presenterSessionId="",this.presenterView?.syncSnapshot();}setLocale(t){this.t=Ht(t,this.options.messages),this.currentLocale=t,this.rebuildChrome(),this.options.onLocaleChange?this.options.onLocaleChange(t):chunk24B6ZCFG_cjs.Xp({localeCode:t});}setEditable(t){this.requestedEditable=t,this.applyEditable(t&&!this.sessions?.isCollaborationReadOnly());}applyEditable(t){this.store.set({editable:t}),this.editor.setEditable(t);}enableEditingFromProtectedView(){this.store.set({protectedView:false}),this.setEditable(true);}editAnywayFromReadOnlyRecommendation(){if(this.store.get().readOnlyRecommendation?.requiresPassword){this.store.set({readOnlyPasswordPromptOpen:true,readOnlyPasswordError:null});return}this.store.set({readOnlyBannerDismissed:true}),this.setEditable(true);}dismissReadOnlyBanner(){this.store.set({readOnlyBannerDismissed:true});}cancelReadOnlyPasswordPrompt(){this.store.set({readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null});}submitReadOnlyPassword(t){this.checkReadOnlyPassword(t);}async checkReadOnlyPassword(t){this.store.set({readOnlyCheckingPassword:true});try{let n=await chunk24B6ZCFG_cjs.es(this.store.get().modifyVerifier,t);n.ok?(this.store.set({readOnlyBannerDismissed:!0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null}),this.setEditable(!0)):this.store.set({readOnlyPasswordError:n.reason});}finally{this.store.set({readOnlyCheckingPassword:false});}}dismissCompatToast(t){this.store.set({compatToasts:this.store.get().compatToasts.filter(n=>n.id!==t)});}dismissAllCompatToasts(){this.store.set({compatToasts:[]});}addRunProgramNotice(t){this.store.set({runProgramNotices:[...this.store.get().runProgramNotices,t]});}dismissRunProgramNotice(t){this.store.set({runProgramNotices:this.store.get().runProgramNotices.filter(n=>n.id!==t)});}confirmExternalHyperlink(t){return chunk24B6ZCFG_cjs.yq(this.optionsController.getOptions(),t)?window.confirm(`${this.t("pptx.options.trust.confirmHyperlinks")}
|
|
5148
|
+
${jk}
|
|
5149
|
+
${qk}
|
|
5150
|
+
${u0}
|
|
5151
|
+
${s0}
|
|
5152
|
+
${e0}
|
|
5153
|
+
${l0}
|
|
5154
|
+
${chunkWKWWFY2C_cjs.ct}`}var h0="pptx-vanilla-viewer-styles";function Np(e){if(e.getElementById(h0))return;let t=e.createElement("style");t.id=h0,t.textContent=Ci(),(e.head??e.documentElement).appendChild(t);}function y0(){return Ci()}function S0(e){if(!e.editable)return null;let t={selectedElementId:null,selectedElementIds:[]};return e.masterViewTarget?{...t,masterViewTarget:null,masterViewTab:"slides",editTemplateMode:false}:e.slideMasters.length>0?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:"slides",editTemplateMode:true}:e.notesMaster||e.handoutMaster?{...t,masterViewTarget:{masterIndex:0,layoutIndex:null},masterViewTab:e.notesMaster?"notes":"handout",editTemplateMode:true}:{...t,editTemplateMode:!e.editTemplateMode}}function _p(e,t){return t.find(n=>n.theme===e)?.key}function C0(e,t,n){let o=t&&n.some(r=>r.key===t)?t:_p(e.theme,n)??"default";return {key:o,theme:n.find(r=>r.key===o)?.theme??e.theme}}function w0(e){return e.availableLocales?e.availableLocales:Array.from(new Set(["en",...Object.keys(e.messages??{})])).map(n=>chunk6TALMZ42_cjs.E.find(o=>o.code===n)??{code:n,label:n,nativeLabel:n})}function E0(e,t,n){return t&&n.some(o=>o.code===t)?t:e.locale??"en"}function T0(e,t,n,o){let r=t.defaultView,i=e.getBoundingClientRect(),{left:s,top:a}=chunkWKWWFY2C_cjs.Ng({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=`${s}px`,e.style.top=`${a}px`;}function P0(e){let{doc:t,store:n,viewport:o}=e,r=null,i=null,s=null,a=()=>{r?.remove(),r=null,i?.remove(),i=null,s&&(t.removeEventListener("pointerdown",s,true),t.removeEventListener("keydown",s,true),s=null);},l=(c,x)=>{i?.remove();let b=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu",{left:`${c}px`,top:`${x}px`});b.setAttribute("role","menu"),b.setAttribute("aria-label",e.getTranslator()("pptx.master.layout"));let g=Uo(n.get());for(let v of g){let f=chunk6TALMZ42_cjs.w(t,"button","pptxv-context-menu-item");f.type="button",f.setAttribute("role","menuitem"),f.textContent=v.name,f.addEventListener("click",()=>{e.getEditActions().applyLayout(v.path),a();}),b.appendChild(f);}(o.closest(".pptxv")??t.body).appendChild(b),T0(b,t,c,x),i=b;},p=(c,x,b)=>{let g=chunk6TALMZ42_cjs.w(t,"button","pptxv-context-menu-item");if(g.type="button",g.setAttribute("role",c.checked===void 0?"menuitem":"menuitemcheckbox"),c.checked!==void 0){g.setAttribute("aria-checked",String(c.checked));let v=chunk6TALMZ42_cjs.w(t,"span","pptxv-context-menu-check");v.textContent=c.checked?"\u2713":"",g.appendChild(v);}return g.append("host"in c?c.label:e.getTranslator()(c.labelKey)),g.disabled=c.disabled===true,g.addEventListener("click",()=>{if("host"in c){a(),c.onSelect();return}let v=e.getEditActions();switch(c.id){case "paste":a(),v.paste();break;case "layout":r?.remove(),r=null,l(x,b);break;case "reset-slide":a(),v.resetSlide();break;case "format-background":a(),n.set({selectedElementId:null,selectedElementIds:[],inspectorOpen:true});break;case "grid-and-guides":a(),v.toggleViewOption("showGrid");break;case "ruler":a(),v.toggleViewOption("showRulers");break;default:a();}}),g},d=(c,x,b)=>{r=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu",{left:`${x}px`,top:`${b}px`}),r.dataset.pptxContextMenu="true",r.dataset.pptxCanvasContextMenu="true",r.setAttribute("role","menu"),r.setAttribute("aria-label",e.getTranslator()("pptx.canvasContextMenu.ariaLabel"));for(let g of c){if(g.separatorBefore){let v=chunk6TALMZ42_cjs.w(t,"div","pptxv-context-menu-separator");v.setAttribute("role","separator"),r.appendChild(v);}r.appendChild(p(g,x,b));}(o.closest(".pptxv")??t.body).appendChild(r),T0(r,t,x,b),s=g=>{if(g instanceof KeyboardEvent&&g.key!=="Escape")return;let v=g.target;v instanceof Node&&(r?.contains(v)||i?.contains(v))||a();},t.addEventListener("pointerdown",s,true),t.addEventListener("keydown",s,true);},u=c=>{let x=n.get();if(!x.editable||x.presenting)return;let b=chunkWKWWFY2C_cjs.wl(chunkWKWWFY2C_cjs.tm(c.target,e.getStageRoot()),c.target,x.selectedElementId);if(b&&chunkWKWWFY2C_cjs.Wn(b,x.editTemplateMode))return;let g=chunkWKWWFY2C_cjs.Zq(chunkWKWWFY2C_cjs.Gl({hasClipboard:x.clipboardPayload!==null,showGrid:x.showGrid,showRulers:x.showRulers}),e.getCustomization?.()??chunkWKWWFY2C_cjs.Oq,{slideIndex:x.currentSlide});g.length!==0&&(c.preventDefault(),a(),d(g,c.clientX,c.clientY));};return o.addEventListener("contextmenu",u),{destroy(){o.removeEventListener("contextmenu",u),a();}}}function wt(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-overlay"),r=chunk6TALMZ42_cjs.w(e,"button","pptxv-info-scrim"),i=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-dialog"),s=()=>o.remove();r.type="button",r.setAttribute("aria-label",t("pptx.common.close")),r.addEventListener("click",s),i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true");let a=chunk6TALMZ42_cjs.w(e,"header"),l=chunk6TALMZ42_cjs.w(e,"h2");l.textContent=n;let p=chunk6TALMZ42_cjs.w(e,"button");p.type="button",p.textContent="\xD7",p.setAttribute("aria-label",t("pptx.common.close")),p.addEventListener("click",s),a.append(l,p);let d=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-body"),u=chunk6TALMZ42_cjs.w(e,"footer");return i.append(a,d,u),o.append(r,i),e.body.appendChild(o),{overlay:o,body:d,footer:u,close:s}}function wi(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"button","is-primary");o.type="button",o.textContent=t("pptx.common.done"),o.addEventListener("click",n.close),n.footer.appendChild(o);}function A0(e,t,n,o){let r=wt(e,t,t("pptx.digitalSignatures.title")),i=chunk6TALMZ42_cjs.w(e,"div",`pptxv-info-notice${n?" is-signed":""}`),s=chunk6TALMZ42_cjs.w(e,"b");s.textContent=n?"\u2713":"i";let a=chunk6TALMZ42_cjs.w(e,"p");if(a.textContent=n?`${t("pptx.digitalSignatures.signed")} ${t("pptx.digitalSignatures.signatureCount",{count:o})}`:t("pptx.digitalSignatures.noSignatures"),i.append(s,a),r.body.appendChild(i),n){let l=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-notice is-warning"),p=chunk6TALMZ42_cjs.w(e,"b");p.textContent="i";let d=chunk6TALMZ42_cjs.w(e,"p");d.textContent=t("pptx.digitalSignatures.editWarning"),l.append(p,d),r.body.appendChild(l);}return wi(e,t,r),r.overlay}function k0(e,t,n){let o=chunk6TALMZ42_cjs.w(e,"div","pptxv-props-overlay"),r=chunk6TALMZ42_cjs.w(e,"button","pptxv-props-scrim");r.setAttribute("aria-label",t("pptx.common.close"));let i=chunk6TALMZ42_cjs.w(e,"div","pptxv-props-dialog");i.setAttribute("role","dialog"),i.setAttribute("aria-modal","true"),i.setAttribute("aria-labelledby","pptxv-props-title");let s=structuredClone(n.core??{}),a=structuredClone(n.app??{}),l=n.custom.map(M=>({...M})),p=JSON.stringify({core:s,app:a,custom:l}),d=()=>o.remove();r.addEventListener("click",d);let u=chunk6TALMZ42_cjs.w(e,"header"),c=chunk6TALMZ42_cjs.w(e,"h2");c.id="pptxv-props-title",c.textContent=t("pptx.documentProperties.dialogTitle");let x=chunk6TALMZ42_cjs.w(e,"button");x.type="button",x.setAttribute("aria-label",t("pptx.common.close")),x.textContent="\xD7",x.addEventListener("click",d),u.append(c,x);let b=chunk6TALMZ42_cjs.w(e,"nav","pptxv-props-tabs");b.setAttribute("aria-label",t("pptx.documentProperties.dialogTitle"));let g=chunk6TALMZ42_cjs.w(e,"div","pptxv-props-body"),v="summary",f=chunk6TALMZ42_cjs.w(e,"button","is-primary"),y=()=>{f&&(f.disabled=!n.editable||JSON.stringify({core:s,app:a,custom:l})===p);},S=(M,I,D)=>{let L=chunk6TALMZ42_cjs.w(e,"label"),O=chunk6TALMZ42_cjs.w(e,"span");O.textContent=M;let R=chunk6TALMZ42_cjs.w(e,"input");return R.value=I,R.disabled=!n.editable,R.addEventListener("input",()=>{D(R.value),y();}),L.append(O,R),L},h=()=>{let M=chunk6TALMZ42_cjs.w(e,"div","pptxv-props-grid"),I=[["title","pptx.documentProperties.summary.title"],["subject","pptx.documentProperties.summary.subject"],["creator","pptx.documentProperties.summary.author"],["keywords","pptx.documentProperties.summary.keywords"],["category","pptx.documentProperties.summary.category"],["description","pptx.documentProperties.summary.description"]];for(let[D,L]of I)M.appendChild(S(t(L),s[D]??"",O=>s[D]=O));M.append(S(t("pptx.documentProperties.summary.manager"),a.manager??"",D=>{a.manager=D;}),S(t("pptx.documentProperties.summary.company"),a.company??"",D=>{a.company=D;})),g.replaceChildren(M);},C=()=>{let M=chunkWKWWFY2C_cjs.$o(n.slides,n.core),I=chunk6TALMZ42_cjs.w(e,"dl","pptxv-props-stats"),D=[["pptx.documentProperties.statistics.slides",M.slideCount],["pptx.documentProperties.statistics.hiddenSlides",M.hiddenSlideCount],["pptx.documentProperties.statistics.notes",M.noteCount],["pptx.documentProperties.statistics.elements",M.elementCount],["pptx.documentProperties.statistics.words",M.wordCount],["pptx.documentProperties.statistics.paragraphs",M.paragraphCount],["pptx.documentProperties.created",M.created??"-"],["pptx.documentProperties.modified",M.modified??"-"]];for(let[L,O]of D){let R=chunk6TALMZ42_cjs.w(e,"dt");R.textContent=t(L);let F=chunk6TALMZ42_cjs.w(e,"dd");F.textContent=String(O),I.append(R,F);}g.replaceChildren(I);},w=()=>{let M=chunk6TALMZ42_cjs.w(e,"div","pptxv-props-custom");l.forEach((D,L)=>{let O=chunk6TALMZ42_cjs.w(e,"div","pptxv-props-custom-row"),R=chunk6TALMZ42_cjs.w(e,"input");R.value=D.name,R.disabled=!n.editable,R.setAttribute("aria-label",t("pptx.documentProperties.custom.name")),R.addEventListener("input",()=>{D.name=R.value,y();});let F=D.type==="bool"?chunk6TALMZ42_cjs.w(e,"select"):chunk6TALMZ42_cjs.w(e,"input");if(F instanceof HTMLInputElement&&(F.type=D.type==="i4"?"number":"text"),F instanceof HTMLSelectElement)for(let[N,B]of [["true","pptx.documentProperties.custom.yes"],["false","pptx.documentProperties.custom.no"]]){let $=chunk6TALMZ42_cjs.w(e,"option");$.value=N,$.textContent=t(B),F.appendChild($);}F.value=D.value,F.disabled=!n.editable,F.setAttribute("aria-label",t("pptx.documentProperties.custom.value")),F.addEventListener("input",()=>{D.value=F.value,y();});let H=chunk6TALMZ42_cjs.w(e,"select");H.disabled=!n.editable,H.setAttribute("aria-label",t("pptx.documentProperties.custom.type"));for(let[N,B]of [["lpwstr","pptx.documentProperties.custom.typeText"],["i4","pptx.documentProperties.custom.typeNumber"],["filetime","pptx.documentProperties.custom.typeDate"],["bool","pptx.documentProperties.custom.typeYesNo"]]){let $=chunk6TALMZ42_cjs.w(e,"option");$.value=N,$.textContent=t(B),H.appendChild($);}H.value=D.type,H.addEventListener("change",()=>{D.type=H.value,D.type==="bool"&&!["true","false"].includes(D.value)&&(D.value="true"),y(),w();});let V=chunk6TALMZ42_cjs.w(e,"button");V.type="button",V.disabled=!n.editable,V.textContent="\xD7",V.setAttribute("aria-label",t("pptx.documentProperties.custom.deleteProperty")),V.addEventListener("click",()=>{l=l.filter((N,B)=>B!==L),y(),w();}),O.append(R,F,H,V),M.appendChild(O);});let I=chunk6TALMZ42_cjs.w(e,"button");I.type="button",I.disabled=!n.editable,I.textContent=t("pptx.documentProperties.custom.addProperty"),I.addEventListener("click",()=>{l=[...l,{name:"",value:"",type:"lpwstr"}],y(),w();}),M.appendChild(I),g.replaceChildren(M);},T=()=>{v==="summary"?h():v==="statistics"?C():w();},k=([M,I])=>{let D=chunk6TALMZ42_cjs.w(e,"button");D.type="button",D.textContent=t(I),D.addEventListener("click",()=>{v=M;for(let L of b.querySelectorAll("button"))L.classList.toggle("is-active",L===D);T();}),D.classList.toggle("is-active",M===v),b.appendChild(D);};[["summary","pptx.documentProperties.tabs.general"],["statistics","pptx.documentProperties.tabs.statistics"],["custom","pptx.documentProperties.tabs.custom"]].forEach(k);let P=chunk6TALMZ42_cjs.w(e,"footer"),E=chunk6TALMZ42_cjs.w(e,"button");return E.type="button",E.textContent=t("pptx.common.cancel"),E.addEventListener("click",d),f.type="button",f.textContent=t("pptx.common.save"),y(),f.addEventListener("click",()=>{n.onSave(s,a,l),d();}),P.append(E,f),i.append(u,b,g,P),o.append(r,i),T(),e.body.appendChild(o),o}function I0(e,t,n){let o=wt(e,t,t("pptx.fonts.embedFonts")),r=chunk6TALMZ42_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.fonts.embedDescription");let i=n.canEmbed!==false,s=chunk6TALMZ42_cjs.w(e,"label","pptxv-info-toggle"),a=chunk6TALMZ42_cjs.w(e,"input");a.type="checkbox",a.checked=n.enabled,a.disabled=!i,a.addEventListener("change",()=>n.onToggle(a.checked));let l=chunk6TALMZ42_cjs.w(e,"span");l.textContent=t("pptx.fonts.enableEmbedding"),s.append(a,l);let p=chunk6TALMZ42_cjs.w(e,"p","pptxv-info-status");p.textContent=t(i?"pptx.fonts.embedKeepsExisting":n.unavailableKey??"pptx.fonts.embedUnavailable");let d=chunkWKWWFY2C_cjs.Ri(n.slides),u=new Set(n.embeddedFonts.map(g=>g.name)),c=chunk6TALMZ42_cjs.w(e,"h3");c.textContent=`${t("pptx.fonts.usedFonts")} (${d.length})`;let x=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-list"),b=chunk6TALMZ42_cjs.w(e,"p","pptxv-info-status");return b.textContent=t("pptx.fonts.scanning"),x.appendChild(b),chunkWKWWFY2C_cjs.ap(d).then(g=>{if(o.overlay.isConnected){x.replaceChildren();for(let v of d){let f=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-row"),y=chunk6TALMZ42_cjs.w(e,"span");y.textContent=v;let S=chunk6TALMZ42_cjs.w(e,"span","pptxv-info-badges");if(u.has(v)){let C=chunk6TALMZ42_cjs.w(e,"b");C.textContent=t("pptx.fonts.embedded"),S.appendChild(C);}let h=chunk6TALMZ42_cjs.w(e,"em");h.classList.toggle("is-missing",!g.has(v)),h.textContent=g.has(v)?"\u2713":t("pptx.fonts.notFound"),S.appendChild(h),f.append(y,S),x.appendChild(f);}}}),o.body.append(r,s,p,c,x),wi(e,t,o),o.overlay}function M0(e,t,n){let o=wt(e,t,t("pptx.security.protectPresentation"));if(n.protected){let c=chunk6TALMZ42_cjs.w(e,"p","pptxv-info-protected");c.textContent=`\u2713 ${t("pptx.security.currentlyProtected")}`,o.body.appendChild(c);}let r=chunk6TALMZ42_cjs.w(e,"p","pptxv-info-description");r.textContent=t("pptx.security.description");let i=L0(e,t("pptx.security.password")),s=L0(e,t("pptx.security.confirmPassword")),a=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-strength"),l=chunk6TALMZ42_cjs.w(e,"p","pptxv-info-error");if(l.setAttribute("role","alert"),i.input.addEventListener("input",()=>{l.textContent="";let c=chunkWKWWFY2C_cjs.bp(i.input.value);a.textContent=i.input.value?"\u25CF".repeat(c+1):"";}),s.input.addEventListener("input",()=>l.textContent=""),o.body.append(r,i.label,a,s.label,l),n.protected){let c=chunk6TALMZ42_cjs.w(e,"button","is-danger");c.type="button",c.textContent=t("pptx.security.removePassword"),c.addEventListener("click",()=>{n.onRemove(),o.close();}),o.footer.appendChild(c);}let p=chunk6TALMZ42_cjs.w(e,"span","pptxv-info-spacer"),d=chunk6TALMZ42_cjs.w(e,"button");d.type="button",d.textContent=t("pptx.common.cancel"),d.addEventListener("click",o.close);let u=chunk6TALMZ42_cjs.w(e,"button","is-primary");return u.type="button",u.textContent=t(n.protected?"pptx.security.updatePassword":"pptx.security.setPassword"),u.addEventListener("click",()=>{let c=chunkWKWWFY2C_cjs.cp(i.input.value,s.input.value);if(c){l.textContent=t(c==="required"?"pptx.security.errorPasswordRequired":c==="mismatch"?"pptx.security.errorPasswordMismatch":"pptx.security.errorPasswordTooShort");return}n.onSet(i.input.value),o.close();}),o.footer.append(p,d,u),o.overlay}function L0(e,t){let n=chunk6TALMZ42_cjs.w(e,"label","pptxv-info-field"),o=chunk6TALMZ42_cjs.w(e,"span");o.textContent=t;let r=chunk6TALMZ42_cjs.w(e,"input");return r.type="password",n.append(o,r),{label:n,input:r}}var XD=10;function D0(e){let{doc:t,store:n,getTranslator:o,onChoose:r}=e,i=null,s;function a(){n.set({pasteOptionsToolbar:null});}function l(){s?.(),s=void 0,i?.remove(),i=null;}function p(u=0){l();let x=n.get().pasteOptionsToolbar?.[0]?.id;if(!x)return;let b=chunkWKWWFY2C_cjs.Qd(t,x,{canvasOnly:true});if(!b){let S=t.defaultView;if(S&&u<XD){let h=S.requestAnimationFrame(()=>p(u+1));s=()=>S.cancelAnimationFrame(h);}return}let g=b.getBoundingClientRect(),v=o(),f=chunk6TALMZ42_cjs.w(t,"div","pptxv-paste-options");f.setAttribute("role","toolbar"),f.setAttribute("tabindex","-1"),f.setAttribute("aria-label",v("pptx.pasteSpecial.optionsLabel")),f.setAttribute("data-pptx-paste-options",""),f.style.position="fixed",f.style.left=`${g.right+4}px`,f.style.top=`${g.bottom+4}px`,f.addEventListener("mousedown",S=>S.stopPropagation());for(let S of chunkWKWWFY2C_cjs.Jl){let h=chunk6TALMZ42_cjs.w(t,"button");h.type="button",h.textContent=v(S.labelKey),h.title=v(S.labelKey),h.addEventListener("click",()=>r(S.id)),f.appendChild(h);}t.body.appendChild(f),i=f;let y=t.defaultView?.setTimeout(()=>{t.addEventListener("pointerdown",a,true),t.addEventListener("keydown",a,true);},0);s=()=>{y!==void 0&&t.defaultView?.clearTimeout(y),t.removeEventListener("pointerdown",a,true),t.removeEventListener("keydown",a,true);};}p();let d=n.subscribe((u,c)=>{u.pasteOptionsToolbar!==c.pasteOptionsToolbar&&p();});return {destroy(){d(),l();}}}function R0(e,t,n){let o=wt(e,t,t("pptx.digitalSignatures.strippedTitle")),r=chunk6TALMZ42_cjs.w(e,"div","pptxv-info-notice is-warning"),i=chunk6TALMZ42_cjs.w(e,"b");i.textContent="!";let s=chunk6TALMZ42_cjs.w(e,"div"),a=chunk6TALMZ42_cjs.w(e,"p");a.textContent=t("pptx.digitalSignatures.strippedMessage",{count:n});let l=chunk6TALMZ42_cjs.w(e,"p","pptxv-info-description");l.textContent=t("pptx.digitalSignatures.editWarning"),s.append(a,l),r.append(i,s),o.body.appendChild(r);let p=chunk6TALMZ42_cjs.w(e,"button");p.type="button",p.textContent=t("pptx.common.cancel"),p.addEventListener("click",o.close);let d=chunk6TALMZ42_cjs.w(e,"button","is-primary");return d.type="button",d.textContent=t("pptx.digitalSignatures.strippedConfirm"),d.addEventListener("click",o.close),o.footer.append(p,d),o.overlay}function O0(e,t,n,o){t.querySelector(".pptxv-version-history")?.remove();let r=chunk6TALMZ42_cjs.w(e,"aside","pptxv-version-history");r.setAttribute("aria-label",n("pptx.versionHistory.title"));let i=chunk6TALMZ42_cjs.w(e,"header"),s=chunk6TALMZ42_cjs.w(e,"span");s.textContent="\u25F7";let a=chunk6TALMZ42_cjs.w(e,"h2");a.textContent=n("pptx.versionHistory.title");let l=chunk6TALMZ42_cjs.w(e,"button");l.type="button",l.textContent="\xD7",l.setAttribute("aria-label",n("pptx.common.close")),l.addEventListener("click",()=>r.remove()),i.append(s,a,l);let p=chunk6TALMZ42_cjs.w(e,"div","pptxv-version-content");return p.textContent=n("pptx.common.loading"),r.append(i,p),t.appendChild(r),chunkWKWWFY2C_cjs.pj(o.filePath).then(d=>{if(p.replaceChildren(),!d){let y=chunk6TALMZ42_cjs.w(e,"p","pptxv-version-empty");y.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(y);return}let u=chunk6TALMZ42_cjs.w(e,"article"),c=chunk6TALMZ42_cjs.w(e,"strong");c.textContent=chunkWKWWFY2C_cjs.zj(d.timestamp);let x=chunk6TALMZ42_cjs.w(e,"small");x.textContent=chunkWKWWFY2C_cjs.Aj(d.timestamp);let b=chunk6TALMZ42_cjs.w(e,"p");b.textContent=chunkWKWWFY2C_cjs.No(d.size);let g=chunk6TALMZ42_cjs.w(e,"footer"),v=chunk6TALMZ42_cjs.w(e,"button","is-primary");v.type="button",v.textContent=n("pptx.versionHistory.restore"),v.addEventListener("click",()=>{Promise.resolve(o.onRestore(d.data)).then(()=>r.remove());});let f=chunk6TALMZ42_cjs.w(e,"button","is-danger");f.type="button",f.textContent=n("pptx.common.delete"),f.addEventListener("click",()=>{chunkWKWWFY2C_cjs.rj(d.key).then(()=>u.remove()).catch(()=>{});}),g.append(v,f),u.append(c,x,b,g),p.appendChild(u);}).catch(()=>{p.replaceChildren();let d=chunk6TALMZ42_cjs.w(e,"p","pptxv-version-empty");d.textContent=n("pptx.versionHistory.noVersions"),p.appendChild(d);}),r}function H0(e,t,n,o){let r=()=>{let d=e.get(),u=d.activeCustomShowId?d.customShows.find(({id:x})=>x===d.activeCustomShowId):void 0,c=chunkWKWWFY2C_cjs.up(d.presentationProperties,d.slides.length);return chunkWKWWFY2C_cjs.op(d.slides,u,c)},i=(d,u=false)=>{e.set({currentSlide:Vt(d,e.get().slides.length),endOfShow:false,enteringBackward:u});},s=chunkWKWWFY2C_cjs.sk(),a=()=>{let{zoom:d,fitScale:u,manual:c}=s.getState();e.set({zoom:c?u*d:"fit"});};s.subscribe(a);let l=()=>{let d=t.fitScale();return s.dispatch({type:"set-fit-scale",fitScale:d}),d};return {next:()=>{let d=e.get();if(d.endOfShow){e.set({endOfShow:false}),n?.();return}if(d.presenting&&t.presentationPlayback.advance())return;if(d.presenting){let x=t.presentationPlayback.consumeZoomReturnOnAdvance(d.currentSlide);if(x!==void 0){i(x);return}}let u=r(),c=d.presentationProperties.loopContinuously===true;if(d.presenting&&!c&&!chunkWKWWFY2C_cjs.rp(d.currentSlide,u)){if(o?.()===false){n?.();return}e.set({endOfShow:true});return}i(d.presenting?chunkWKWWFY2C_cjs.pp(d.currentSlide,u,{loop:c})??d.currentSlide:d.currentSlide+1);},prev:()=>{if(e.get().endOfShow){e.set({endOfShow:false});return}if(e.get().presenting&&t.presentationPlayback.isSeededCompleted()){t.presentationPlayback.replayCurrentSlide(document);return}let d=e.get();i(d.presenting?chunkWKWWFY2C_cjs.qp(d.currentSlide,r())??d.currentSlide:d.currentSlide-1,d.presenting);},firstSlide:()=>{let d=e.get();i(d.presenting?chunkWKWWFY2C_cjs.vp(r())??0:0);},lastSlide:()=>{let d=e.get();i(d.presenting?chunkWKWWFY2C_cjs.wp(r())??d.slides.length-1:d.slides.length-1);},goToSlide:i,navigateToZoomTarget:d=>{let u=e.get(),c=t.presentationPlayback.navigateToZoomTarget(d,u.currentSlide,u.slides);i(c);},firstShowSlideIndex:()=>chunkWKWWFY2C_cjs.vp(r())??0,presentationEntryIndex:()=>chunkWKWWFY2C_cjs.xp(e.get().currentSlide,r()),slideCount:()=>e.get().slides.length,currentSlide:()=>e.get().currentSlide,zoom:()=>t.effectiveScale(),setZoom:d=>{if(d==="fit"){s.dispatch({type:"zoom-to-fit"});return}let u=l();s.dispatch({type:"set-zoom",zoom:u>Number.EPSILON?d/u:d});},zoomIn:()=>{l(),s.dispatch({type:"zoom-in"});},zoomOut:()=>{l(),s.dispatch({type:"zoom-out"});},zoomToFit:()=>s.dispatch({type:"zoom-to-fit"})}}var QD=["pptxv-reduced-motion","pptxv-no-hw-accel","pptxv-compat-display"],F0=[["showGrid","showGrid"],["showRulers","showRulers"],["snapToGrid","snapToGrid"],["spellCheckEnabled","spellCheck"]];function V0(e,t){let n=chunkWKWWFY2C_cjs.uq(t),o=false,r=a=>{o=true;try{let l=chunkWKWWFY2C_cjs.dq(a),p=e.store.get(),d={};for(let[c,x]of F0)p[c]!==l[x]&&(d[c]=l[x]);Object.keys(d).length>0&&e.store.set(d);let u=e.root();if(u){u.classList.toggle("pptxv-showGrid",l.showGrid),u.classList.toggle("pptxv-showRulers",l.showRulers),u.classList.toggle("pptxv-snapToGrid",l.snapToGrid);let c=new Set(chunkWKWWFY2C_cjs.nq(a,"pptxv"));for(let x of QD)u.classList.toggle(x,c.has(x));u.classList.toggle("pptxv-no-show-popup",!a.advanced.slideShowShowPopupToolbar);}e.isAutosaveEnabled()!==l.autoSave&&e.setAutosaveEnabled(l.autoSave),e.setAutosaveIntervalMs(chunkWKWWFY2C_cjs.gq(a)*1e3),e.setHistoryDepth(chunkWKWWFY2C_cjs.fq(a)),e.setRibbonHiddenTabs(a.ribbon.hiddenTabIds),e.refreshQuickAccess(),e.applyScreenTips(),e.renderStage();}finally{o=false;}},i=n.subscribe(r),s=e.store.subscribe((a,l)=>{if(o)return;let p=n.getOptions(),d=false;for(let[u,c]of F0)a[u]!==l[u]&&chunkWKWWFY2C_cjs.dq(p)[c]!==a[u]&&(p=chunkWKWWFY2C_cjs.eq(p,c,a[u]),d=true);d&&n.setOptions(p);});return {optionsStore:n,getOptions:()=>n.getOptions(),applyAll:()=>r(n.getOptions()),screenTip:(a,l,p)=>chunkWKWWFY2C_cjs.hq(n.getOptions(),a,l,p),transformCommittedText:a=>chunkWKWWFY2C_cjs.Vp(a,n.getOptions().proofing),notifyActionSuccess:()=>chunkWKWWFY2C_cjs.rq(n.getOptions()),notifyAutosaveEnabled(a){!o&&n.getOptions().save.autoSave!==a&&n.setValue("save","autoSave",a);},isProtectedView:()=>chunkWKWWFY2C_cjs.kq(n.getOptions()),dispose(){i(),s();}}}var z0="pptx-vanilla-google-fonts";function B0(e,t){chunkWKWWFY2C_cjs.Vi(e,z0,t);}function N0(e){e.getElementById(z0)?.remove();}var jo=class extends ni{container;doc;options;store;renderer;t;currentTheme;availableThemes;availableLocales;currentThemeKey;currentLocale;lifecycle;editor;exporter;loading;registry;sessions;controls;destroyed=false;presenterChannel=null;audienceWindow=null;presenterSessionId="";presenterSequence=0;presenterSnapshot=chunkWKWWFY2C_cjs.ik();presenterView=null;presenterCaptions=null;presenterShowGuard=chunkWKWWFY2C_cjs.Pk();userFontsStyle=null;signatureWarningAcknowledged=false;detachSignatureWarning=null;webfontsToken=0;requestedEditable=false;annotations;parityWorkflows;aiChat=null;aiFocus=null;contextMenu=null;canvasContextMenu=null;pasteOptionsToolbar=null;rulers=null;optionsController;customization;constructor(t,n={}){super(),this.container=t,this.doc=t.ownerDocument,this.options=n,this.customization=sw(n),this.requestedEditable=n.editable??false;let o=chunkWKWWFY2C_cjs.Jp();this.availableThemes=n.availableThemes??chunkWKWWFY2C_cjs.mt,this.availableLocales=w0(n);let r=C0(n,o.themeKey,this.availableThemes);this.currentThemeKey=r.key,this.currentTheme=r.theme,this.currentLocale=E0(n,o.localeCode,this.availableLocales),this.t=Ht(this.currentLocale,n.messages),this.registry=n.registry??chunk6TALMZ42_cjs.J(),this.store=ui(xi()),this.loading=NA({options:n,store:this.store,getTranslator:()=>this.t,getEditor:()=>this.editor,onContentApplying:a=>this.sessions?.beginCollaborationContentLoad(a),onContentApplied:a=>{this.sessions?.notifyCollaborationContentLoaded(a),a==="bootstrap"&&this.lifecycle?.chrome.ribbon?.showDefaultTab();},getAllowExternalContent:()=>this.optionsController?.getOptions().trust.allowExternalContent??chunkWKWWFY2C_cjs.bq.trust.allowExternalContent,shouldOpenProtectedView:()=>this.optionsController?.isProtectedView()??false,setEditableForLoad:a=>this.setEditable(a)}),this.renderer=Hp({doc:this.doc,store:this.store,registry:this.registry,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getFitOptions:()=>this.options,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getPixelateMosaicAnimation:()=>this.optionsController?.getOptions().advanced.pixelateMosaicAnimation??false,onHandoutSlidesPerPageChange:a=>this.editor?.setHandoutSlidesPerPage(a),onMasterBackgroundColorChange:a=>this.editor?.getEditActions().setSlideBackgroundColor(a),onMasterCrudAction:a=>{this.editor?.getEditActions().masterView.runMasterViewCrudAction(a);},onSectionToggle:a=>this.editor?.getEditActions().sections.toggleSection(a),onSectionRename:(a,l)=>this.editor?.getEditActions().sections.renameSection(a,l),onSectionDelete:a=>this.editor?.getEditActions().sections.deleteSection(a),onSectionMove:(a,l)=>this.editor?.getEditActions().sections.moveSection(a,l),onZoomClick:a=>this.controls.navigateToZoomTarget(a),onCommentMarkerClick:()=>this.parityWorkflows.openComments(),onSmartArtNodeTextChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData||!chunkWKWWFY2C_cjs.ud(a.smartArtData,l,p))return;let d=chunkWKWWFY2C_cjs.E(a.smartArtData,l,p),u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunkWKWWFY2C_cjs.kn(d,a.id,u)});},onSmartArtNodeFillChange:(a,l,p)=>{if(a.type!=="smartArt"||!a.smartArtData)return;let d=chunkWKWWFY2C_cjs.I(a.smartArtData,l,{fillColor:p});if(d!==a.smartArtData){let u={width:a.width,height:a.height};this.editor?.applyElementPatch(a.id,{smartArtData:chunkWKWWFY2C_cjs.kn(d,a.id,u)});}},onChartPointChange:(a,l)=>{a.type==="chart"&&this.editor?.applyElementPatch(a.id,{chartData:l});},onTableResizeColumns:(a,l)=>{a.type!=="table"||!a.tableData||this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,columnWidths:l}});},onTableResizeRow:(a,l,p)=>{if(a.type!=="table"||!a.tableData)return;let d=a.tableData.rows.map((u,c)=>c===l?{...u,height:p}:u);this.editor?.applyElementPatch(a.id,{tableData:{...a.tableData,rows:d}});},onChartPartSelect:(a,l)=>{this.store.set({chartPartSelection:{elementId:a.id,part:l}});},onStageRendered:()=>{this.editor?.onStageRendered(),this.rulers?.sync(),this.annotations?.sync(this.presenterSnapshot);}}),this.controls=H0(this.store,this.renderer,()=>{this.exitPresentation();},()=>this.optionsController?.getOptions().advanced.slideShowEndWithBlackSlide),Np(this.doc);let i=chunkWKWWFY2C_cjs.hb(n.fonts??[]);i&&(this.userFontsStyle=this.doc.createElement("style"),this.userFontsStyle.dataset.pptxUserFonts="vanilla",this.userFontsStyle.textContent=i,this.doc.head.appendChild(this.userFontsStyle)),this.lifecycle=fl(hl(this)),this.editor=Sp({doc:this.doc,store:this.store,getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),getHandler:()=>this.loading.getHandler(),setHandler:a=>this.loading.setHandler(a),getUserName:()=>this.optionsController?.getOptions().general.userName,transformCommittedText:a=>this.optionsController?.transformCommittedText(a)??a,onChange:n.onChange,onCursorMove:(a,l)=>this.sessions.setCollaborationCursor(a,l),onInlineTextInput:(a,l)=>this.sessions.publishCollaborationInlineText(a,l),getLivePatcher:()=>this.sessions.getCollaborationLivePatcher(),flushInlineTextInput:()=>this.sessions.flushCollaborationLivePatch(),getKeyboardCustomization:()=>this.customization.getResolved().keyboard,getCustomization:()=>this.customization.getResolved()}),this.editor.attachChrome(),this.rulers=Ak({doc:this.doc,store:this.store,getStageWrap:()=>this.lifecycle?.chrome.stageWrap??null,getScale:()=>this.renderer.effectiveScale(),getUnit:()=>n.rulerUnit??"inches",onCreateGuide:(a,l)=>this.editor?.getEditActions().addGuide(a,l)}),this.annotations=gk({doc:this.doc,t:this.t,store:this.store,editor:this.editor,getChrome:()=>this.lifecycle.chrome,getSnapshot:()=>this.presenterSnapshot,updateSnapshot:a=>this.updatePresenterSnapshot(a),shouldPromptKeepAnnotations:()=>this.optionsController?.getOptions().advanced.slideShowPromptKeepInkAnnotations??true}),this.exporter=kl({doc:this.doc,container:this.container,store:this.store,registry:this.registry,getTranslator:()=>this.t,getSmartArt3D:()=>this.effective3DFlags().smartArt3D,getSurfaceChart3D:()=>this.effective3DFlags().surfaceChart3D,getBarChart3D:()=>this.effective3DFlags().barChart3D,getLineChart3D:()=>this.effective3DFlags().lineChart3D,getAreaChart3D:()=>this.effective3DFlags().areaChart3D,getPieChart3D:()=>this.effective3DFlags().pieChart3D,getImageResolutionScale:()=>chunkWKWWFY2C_cjs.jq(this.optionsController.getOptions()),getIncludeHiddenSlides:()=>this.optionsController.getOptions().advanced.printHiddenSlides,getPrintHighQuality:()=>this.optionsController.getOptions().advanced.printHighQuality,fileName:n.fileName}),this.optionsController=V0({store:this.store,root:()=>this.lifecycle?.chrome.root??null,isAutosaveEnabled:()=>this.sessions?.isAutosavePreferred()??true,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),setAutosaveIntervalMs:a=>this.sessions?.setAutosaveIntervalMs(a),setHistoryDepth:a=>this.editor?.setHistoryDepth(a),setRibbonHiddenTabs:a=>this.lifecycle?.chrome.ribbon?.setHiddenOptionTabs(a),refreshQuickAccess:()=>{this.lifecycle?.chrome.titleBar?.refreshQuickAccess(),this.lifecycle?.chrome.setQuickAccessPosition(this.getQuickAccessOptions().position);},applyScreenTips:()=>this.lifecycle?.chrome.ribbon?.applyScreenTips(a=>this.optionsController.screenTip(a)),renderStage:()=>this.renderer.renderStage()},{initial:{save:{autoSave:n.autosave??true}}});let s={doc:this.doc,t:this.t,store:this.store,editor:this.editor,optionsStore:this.optionsController.optionsStore,clearOptionsCache:()=>this.clearOptionsCache(),registerCustomFont:a=>{let l=this.store.get().customFontFamilies;l.includes(a)||this.store.set({customFontFamilies:[...l,a]});},aiEnabled:false,getCustomization:()=>this.customization.getResolved(),root:()=>this.lifecycle.chrome.root,setAutosaveEnabled:a=>this.setAutosaveEnabled(a),print:a=>this.print(a),goToSlide:a=>this.goToSlide(a),renderSlideNode:(a,l)=>this.renderer.renderSlideNode(a,l),enterPresentation:()=>this.enterPresentation(),setTheme:a=>this.setTheme(a),setLocale:a=>this.setLocale(a),getThemeState:()=>({key:this.currentThemeKey,catalog:this.availableThemes}),getLocaleState:()=>({code:this.currentLocale,catalog:this.availableLocales}),getAddinStatus:()=>{let a=!this.optionsController.getOptions().advanced.disable3DRendering;return {smartArt3d:a,model3d:a,collaboration:this.getCollaborationStatus()==="connected"}}};Object.defineProperty(s,"t",{get:()=>this.t}),Object.defineProperty(s,"aiEnabled",{get:()=>this.customization.isAiEnabled()}),this.parityWorkflows=uk(s),this.setupContextMenu(),this.pasteOptionsToolbar=D0({doc:this.doc,store:this.store,getTranslator:()=>this.t,onChoose:a=>{let l=this.store.get().pasteOptionsToolbar?.[0];if(this.store.set({pasteOptionsToolbar:null}),!!l){if(a==="picture"){Zr(this.doc,l.id,l.sourceClone).then(p=>{p&&this.editor.getEditActions().replaceElement(l.id,p);});return}this.editor.getEditActions().reformatPasted(l.id,l.sourceClone,a);}}}),n.editable&&(this.store.set({editable:true}),this.editor.setEditable(true)),this.store.subscribe(Bp({getChrome:()=>this.lifecycle.chrome,renderer:this.renderer,callbacks:n})),this.store.subscribe((a,l)=>{this.presenterSessionId&&this.syncAudience(a.currentSlide),this.annotations.sync(this.presenterSnapshot),l.presenting&&!a.presenting&&this.annotations.finish(),(a.currentSlide!==l.currentSlide||a.slides!==l.slides)&&this.presenterView?.syncSlide();}),this.detachSignatureWarning=this.store.subscribe((a,l)=>{a.dirty&&!l.dirty&&a.hasDigitalSignatures&&!this.signatureWarningAcknowledged&&(this.signatureWarningAcknowledged=true,R0(this.doc,this.t,a.digitalSignatureCount));}),this.store.subscribe((a,l)=>{if(a.slides===l.slides&&a.embeddedFonts===l.embeddedFonts)return;chunk6TALMZ42_cjs.I.registerEmbeddedFonts(a.embeddedFonts);let p=++this.webfontsToken;chunkWKWWFY2C_cjs.Ui(a.slides,a.embeddedFonts).then(d=>p!==this.webfontsToken?null:(B0(this.doc,d),d)),this.syncGlyphOutlineWebfonts(a.slides,a.embeddedFonts,p);}),this.sessions=Uk({doc:this.doc,store:this.store,options:n,getHandler:()=>this.loading.getHandler(),getSaveOptions:()=>{let a=this.store.get();return chunkWKWWFY2C_cjs.ip({headerFooter:a.headerFooter,presentationProperties:a.presentationProperties,viewProperties:a.viewProperties,customShows:a.customShows,sections:a.sections,coreProperties:a.coreProperties,appProperties:a.appProperties,customProperties:a.customProperties,tagCollections:a.tagCollections,slideMasters:a.slideMasters,notesMaster:a.notesMaster,handoutMaster:a.handoutMaster,slideSize:chunkWKWWFY2C_cjs._i({current:a.slideSize,canvas:a.canvasSize}).size,tableStyleMap:a.tableStyleMap,tableStylesDefaultId:a.tableStylesDefaultId,tableStylesToDelete:a.tableStylesToDelete,embedFonts:a.embedFonts})},getChrome:()=>this.lifecycle.chrome,getTranslator:()=>this.t,getScale:()=>this.renderer.effectiveScale(),setEditable:a=>this.setEditable(a),onCollaborationReadOnlyChange:a=>this.applyEditable(this.requestedEditable&&!a),goToSlide:a=>this.controls.goToSlide(a),loadFile:a=>this.loadFile(a,{skipProtectedView:true}),getUserInitials:()=>this.optionsController?.getOptions().general.userInitials,getHiddenActions:()=>this.getChromeOptions().hiddenActions,isShareAvailable:()=>this.customization.isDialogAvailable("share")}),this.customization.bind(this.optionsController.optionsStore,()=>this.rebuildChrome()),this.optionsController.applyAll(),this.pruneExpiredAutosaveSnapshots(),this.renderer.renderAll(),this.setupAiChat(),n.source!==void 0&&this.loading.load(n.source,"bootstrap"),this.connectAudienceRole();}syncGlyphOutlineWebfonts(t,n,o){let r=chunkWKWWFY2C_cjs.Si(t),i=chunkWKWWFY2C_cjs.Ti(r,n.map(s=>s.name));i.length!==0&&chunkWKWWFY2C_cjs.Ui(t,n).then(async s=>{if(o!==this.webfontsToken||!s)return;let a=[{bold:false,italic:false},{bold:true,italic:false}],l=false;for(let p of i)for(let d of a){if(o!==this.webfontsToken)return;let u=await chunkWKWWFY2C_cjs.kb(s,p,d.bold,d.italic,fetch);u&&chunk6TALMZ42_cjs.I.registerFontBytes(p,d.bold,d.italic,u)&&(l=true);}l&&o===this.webfontsToken&&this.store.set({outlineFontsTick:this.store.get().outlineFontsTick+1});});}setupContextMenu(){this.contextMenu?.destroy(),this.contextMenu=dl({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),selectElement:t=>this.editor.selectElements([t]),openComments:()=>this.parityWorkflows.openComments(),openHyperlink:()=>this.parityWorkflows.openHyperlink(),getAi:()=>this.aiFocus,getCustomization:()=>this.customization.getResolved(),startEditPoints:t=>this.editor.startEditPoints(t)}),this.canvasContextMenu?.destroy(),this.canvasContextMenu=P0({doc:this.doc,store:this.store,getTranslator:()=>this.t,viewport:this.lifecycle.chrome.viewport,getStageRoot:()=>this.lifecycle.chrome.stageWrap.querySelector(".pptxv-stage"),getEditActions:()=>this.editor.getEditActions(),getCustomization:()=>this.customization.getResolved()});}setupAiChat(){let t=this.options.ai;if(this.aiChat?.destroy(),!t||!this.customization.isAiEnabled()){this.aiChat=null,this.aiFocus=null;return}let n=ns({store:this.store,requestOpen:()=>this.aiChat?.open()});this.aiFocus=n;let o=os({store:this.store,editor:this.editor,goToSlide:r=>this.controls.goToSlide(r),ensureEditable:()=>{this.store.get().editable||this.setEditable(true);},getHandler:()=>this.loading.getHandler(),applyThemeUpdates:r=>this.applyAiThemeUpdates(r),getFocusedTargets:()=>n.getEffectiveTargets()});this.aiChat=rs({doc:this.doc,chrome:this.lifecycle.chrome,t:this.t,bridge:o,config:t,store:this.store,controller:n,goToSlide:r=>this.controls.goToSlide(r)});}applyAiThemeUpdates(t){t.colorScheme&&(this.store.set({colorScheme:{...this.store.get().colorScheme??{},...t.colorScheme}}),this.renderer.renderAll());}async loadFile(t,n){this.signatureWarningAcknowledged=false,await this.loading.load(t,"user",n);}openFile(){(async()=>{let t=await chunkWKWWFY2C_cjs.yj();t&&await this.loadFile(t.buffer);})();}openRecentFile(t){(async()=>{let n=await chunkWKWWFY2C_cjs.Lo(t);n&&await this.loadFile(n);})();}createPresentation(t){this.editor.commitSlides(chunkWKWWFY2C_cjs.Jo(t),0);}async loadUrl(t){this.signatureWarningAcknowledged=false,await this.loading.load(t);}next=()=>this.controls.next();prev=()=>this.controls.prev();goToSlide=t=>this.controls.goToSlide(t);toggleHideCurrentSlide=()=>this.toggleHideSlides([this.store.get().currentSlide]);goToFirstSlide=()=>this.controls.firstSlide();goToLastSlide=()=>this.controls.lastSlide();firstShowSlideIndex=()=>this.controls.firstShowSlideIndex();getSlideCount=()=>this.controls.slideCount();getCurrentSlide=()=>this.controls.currentSlide();getZoom=()=>this.controls.zoom();setZoom(t){this.controls.setZoom(t);}zoomIn=()=>this.controls.zoomIn();zoomOut=()=>this.controls.zoomOut();zoomToFit=()=>this.controls.zoomToFit();zoomReset=()=>this.controls.setZoom(1);goTo=t=>this.goToSlide(t);goPrev=()=>this.prev();goNext=()=>this.next();getContent=()=>this.save();getMode=()=>{let t=this.store.get();return t.masterViewTarget?"master":t.presenting?"present":t.editable?"edit":"preview"};setMode=t=>{if(t==="present"){this.enterPresentation();return}this.store.get().presenting&&this.exitPresentation(),this.setEditable(t==="edit"||t==="master"),t==="master"&&!this.store.get().masterViewTarget&&this.toggleMasterNavigation(),t!=="master"&&this.store.get().masterViewTarget&&this.toggleMasterNavigation();};getActiveSlideIndex=()=>this.getCurrentSlide();setActiveSlideIndex=t=>this.goToSlide(t);isDirty=()=>this.store.get().dirty;getSlides=()=>this.store.get().slides;getSlide=t=>this.store.get().slides[t];getActiveSlide=()=>this.getSlide(this.getCurrentSlide());getElements=(t=this.getCurrentSlide())=>this.getSlide(t)?.elements??[];getElementById=(t,n=this.getCurrentSlide())=>this.getElements(n).find(o=>o.id===t);updateElements=async(t,n)=>{chunkWKWWFY2C_cjs.Xs(t,n,{getTarget:()=>{let o=this.store.get();return {canEdit:o.editable&&!o.protectedView&&!(o.readOnlyRecommendation?.defaultReadOnly&&!o.readOnlyBannerDismissed),mode:this.getMode(),loaded:!o.loading&&!o.error,editTemplateMode:o.editTemplateMode}},getSlides:()=>this.store.get().slides,hasActivePointerInteraction:()=>this.editor.hasActivePointerInteraction(),commitPendingText:()=>this.container.querySelector("[data-inline-editor]")?.blur(),commitSlides:(o,r)=>this.editor.commitElementUpdates(o,r)});};updateElement=(t,n)=>this.editor.applyElementPatch(t,n);addElement=t=>{let n=this.store.get(),o=chunkWKWWFY2C_cjs.Qn(t,{canEdit:n.editable&&!n.protectedView&&!(n.readOnlyRecommendation?.defaultReadOnly&&!n.readOnlyBannerDismissed),mode:this.getMode(),hasActiveSlide:!n.loading&&!n.error&&!!n.slides[n.currentSlide],editTemplateMode:n.editTemplateMode});if(o)return this.container.querySelector("[data-inline-editor]")?.blur(),this.editor.getEditActions().insertElement(o),o.id};deleteElements=t=>{this.editor.selectElements(t),this.editor.deleteSelected();};duplicateElement=t=>(this.editor.selectElements([t]),this.editor.duplicateSelected()??void 0);getSelectedElementIds=()=>[...this.store.get().selectedElementIds];selectElements=t=>this.editor.selectElements(t);clearSelection=()=>this.editor.selectElements([]);addSlide=(t=this.store.get().slides.length-1)=>{let n=[...this.store.get().slides],o=Math.min(Math.max(t+1,0),n.length);n.splice(o,0,chunkWKWWFY2C_cjs.sf(o+1,chunkWKWWFY2C_cjs.rf)),this.editor.commitSlides(this.renumber(n),o);};deleteSlides=t=>{let n=new Set(t),o=this.store.get().slides.filter((r,i)=>!n.has(i));o.length>0&&this.editor.commitSlides(this.renumber(o));};duplicateSlides=t=>{let n=new Set(t),o=this.store.get().slides.flatMap((r,i)=>n.has(i)?[r,{...chunkWKWWFY2C_cjs.l(r),id:chunkWKWWFY2C_cjs.rf()}]:[r]);this.editor.commitSlides(this.renumber(o));};moveSlide=(t,n)=>{let o=[...this.store.get().slides];if(!o[t]||n<0||n>=o.length||t===n)return;let[r]=o.splice(t,1);o.splice(n,0,r),this.editor.commitSlides(this.renumber(o),n);};toggleHideSlides=t=>{let n=new Set(t);this.editor.commitSlides(this.store.get().slides.map((o,r)=>n.has(r)?{...o,hidden:!o.hidden}:o));};renumber(t){return t.map((n,o)=>({...n,slideNumber:o+1}))}toggleNotes(){this.store.set({notesExpanded:!this.store.get().notesExpanded});}setTheme(t){this.lifecycle.appliedThemeVars=Ro(this.lifecycle.chrome.root,t,this.lifecycle.appliedThemeVars),this.currentTheme=t;let n=_p(t,this.availableThemes);n!==void 0&&(this.currentThemeKey=n,this.options.onThemeChange?this.options.onThemeChange(n):chunkWKWWFY2C_cjs.Kp({themeKey:n}));}applyPresentationTheme(t){fk({presetId:t,loading:this.loading,store:this.store,editor:this.editor});}openAccessibility(){this.lifecycle.chrome.accessibility.open(chunkWKWWFY2C_cjs.am(this.store.get().slides));}openSettings(t="general"){this.customization.isDialogAvailable("options")&&this.parityWorkflows.openSettings(t);}openSetUpSlideShow(){this.parityWorkflows.openSetUpSlideShow();}toggleSubtitles(){let t=this.store.get().presentationProperties;this.editor.updatePresentationProperties({...t,showSubtitles:!t.showSubtitles});}subtitleOptionsStore(){return this.optionsController?.optionsStore}openHeaderFooter(){this.parityWorkflows.openHeaderFooter();}openCompare(){this.parityWorkflows.openCompare();}openPrintDialog(){this.customization.isDialogAvailable("print")&&this.parityWorkflows.openPrintDialog();}startRehearsal(){this.parityWorkflows.startRehearsal();}openSelectionPane(){this.parityWorkflows.openSelectionPane();}openSlideSorter(){this.parityWorkflows.openSlideSorter();}openReadingView(){this.parityWorkflows.openReadingView();}openOutlineView(){this.parityWorkflows.openOutlineView();}openComments(){this.parityWorkflows.openComments();}openHyperlink(){this.parityWorkflows.openHyperlink();}openCustomShows(){this.parityWorkflows.openCustomShows();}openDocumentProperties(){let t=this.store.get();k0(this.doc,this.t,{slides:t.slides,core:t.coreProperties,app:t.appProperties,custom:t.customProperties,editable:t.editable,onSave:(n,o,r)=>this.editor.updateDocumentProperties(n,o,r)});}openFontEmbedding(){let t=this.store.get(),n=chunkWKWWFY2C_cjs.co(t.embeddedFonts.map(o=>o.name));I0(this.doc,this.t,{slides:t.slides,embeddedFonts:t.embeddedFonts,enabled:t.embedFonts,canEmbed:n.interactive,unavailableKey:n.disabledReasonKey,onToggle:o=>this.store.set({embedFonts:o})});}openDigitalSignatures(){let t=this.store.get();A0(this.doc,this.t,t.hasDigitalSignatures,t.digitalSignatureCount);}openPasswordProtection(){M0(this.doc,this.t,{protected:this.store.get().isPasswordProtected,onSet:t=>{this.store.set({isPasswordProtected:true,presentationPassword:t});},onRemove:()=>{this.store.set({isPasswordProtected:false,presentationPassword:null});}});}openVersionHistory(){O0(this.doc,this.lifecycle.chrome.root,this.t,{filePath:this.options.autosaveFilePath??"presentation.pptx",onRestore:t=>this.loadFile(t,{skipProtectedView:true})});}openPresenterView(){this.store.set({notesExpanded:true}),this.presenterView?.dispose(),this.presenterView=Rp(this.buildPresenterViewOptions()),this.markPresenterConsoleOpen(true),this.store.get().presenting||this.enterPresentation();}openAudienceWindow(){this.closeAudienceWindow(),this.store.get().presenting&&this.presenterShowGuard.expectAudienceBounce();let t=window.open("about:blank","pptx-viewer-audience","popup=yes,width=1280,height=720");if(!t){this.presenterShowGuard.disarm();return}this.audienceWindow=t,this.presenterSessionId=chunkWKWWFY2C_cjs.hk(),this.presenterView?.syncSnapshot();let n=this.presenterSessionId,o=chunkWKWWFY2C_cjs.jk(window.location.href,n);chunkWKWWFY2C_cjs.mk(window).then(i=>{i&&this.audienceWindow===t&&!t.closed&&chunkWKWWFY2C_cjs.nk(t,i);});let r=this.loading.getHandler();if(!r){this.closeAudienceWindow();return}r.save(this.store.get().slides).then(i=>chunkWKWWFY2C_cjs.pk(n,i)).then(()=>t.location.replace(o)).catch(()=>this.closeAudienceWindow());}getPresenterChannel(){try{return this.presenterChannel??=new BroadcastChannel(chunkWKWWFY2C_cjs.fk),this.presenterChannel}catch{return null}}isAudienceWindowOpen(){return !!(this.audienceWindow&&!this.audienceWindow.closed)}syncAudience(t=this.getCurrentSlide()){this.presenterSessionId&&this.getPresenterChannel()?.postMessage({origin:chunkWKWWFY2C_cjs.gk,type:"presenter-state",sessionId:this.presenterSessionId,snapshot:{...this.presenterSnapshot,slideIndex:t,sequence:++this.presenterSequence}});}getPresenterSnapshot(){return this.presenterSnapshot}updatePresenterSnapshot(t){this.presenterSnapshot=chunkWKWWFY2C_cjs.$j(this.presenterSnapshot,t),Op(this.lifecycle.chrome.root,this.presenterSnapshot),this.syncAudience(this.presenterSnapshot.slideIndex),this.annotations.sync(this.presenterSnapshot),this.syncPresentationToolbar(),this.presenterView?.syncSnapshot();}buildPresenterViewOptions(){return {doc:this.doc,t:this.t,container:this.lifecycle.chrome.root,getSnapshot:()=>this.presenterSnapshot,getSlides:()=>this.store.get().slides,getCurrent:()=>this.getCurrentSlide(),getElapsedMs:()=>this.presenterSnapshot.elapsedMs??0,canvasSize:()=>this.store.get().canvasSize,getActiveCustomShow:()=>{let t=this.store.get();return t.activeCustomShowId?t.customShows.find(({id:n})=>n===t.activeCustomShowId)??null:null},getAuthoredRange:()=>{let t=this.store.get();return chunkWKWWFY2C_cjs.up(t.presentationProperties,t.slides.length)},renderSlide:(t,n)=>this.renderer.renderSlideNode(t,n),navigate:t=>this.goToSlide(t),move:t=>t===1?this.controls.next():this.controls.prev(),isAudienceOpen:()=>this.isAudienceWindowOpen(),toggleTimer:()=>this.updatePresenterSnapshot({paused:!this.presenterSnapshot.paused}),resetTimer:()=>this.updatePresenterSnapshot({paused:false,elapsedMs:0}),stepZoom:t=>this.updatePresenterSnapshot({zoom:chunkWKWWFY2C_cjs.Yj(this.presenterSnapshot.zoom??{scale:1,originX:.5,originY:.5},t)}),resetZoom:()=>this.updatePresenterSnapshot({zoom:{scale:1,originX:.5,originY:.5}}),setPointerTool:t=>this.updatePresenterSnapshot({pointer:{...this.presenterSnapshot.pointer??{x:.5,y:.5,color:"#ef4444"},tool:t}}),setBlackout:t=>this.updatePresenterSnapshot({blackout:this.presenterSnapshot.blackout===t?"none":t}),toggleCaptions:()=>this.togglePresenterCaptions(),toggleAudience:()=>this.isAudienceWindowOpen()?this.closeAudienceWindow():this.openAudienceWindow(),swapDisplays:()=>this.swapPresenterDisplays(),end:()=>{this.closeAudienceWindow(),this.exitPresentation();}}}clearPresentationAnnotations(){this.annotations.clear();}markPresenterConsoleOpen(t){this.lifecycle.chrome.root.classList.toggle("pptxv-presenter-open",t);}syncPresentationToolbar(){this.lifecycle.chrome.presentationToolbar.update({tool:this.presenterSnapshot.pointer?.tool??"none",blackout:this.presenterSnapshot.blackout,hasAnnotations:(this.presenterSnapshot.inkStrokes?.length??0)>0,presenterViewActive:this.presenterView!==null});}togglePresenterView(){if(this.presenterView){this.closeAudienceWindow(),this.presenterView.dispose(),this.presenterView=null,this.presenterCaptions?.dispose(),this.presenterCaptions=null,this.markPresenterConsoleOpen(false),this.syncPresentationToolbar();return}this.openPresenterView(),this.syncPresentationToolbar();}showPresentationAllSlides(){this.presenterView||(this.openPresenterView(),this.syncPresentationToolbar()),this.presenterView?.showAllSlides();}shouldShowPresentationContextMenu(){return this.optionsController?.getOptions().advanced.slideShowShowMenuOnRightClick??true}togglePresenterCaptions(){this.presenterCaptions??=kp({settings:()=>chunkWKWWFY2C_cjs.Fp(this.optionsController.getOptions()),doc:this.doc,t:this.t,emit:t=>this.updatePresenterSnapshot(t)}),this.presenterCaptions.toggle();}swapPresenterDisplays(){let t=this.audienceWindow;!t||t.closed||chunkWKWWFY2C_cjs.ok(window,t);}classifyPresentationExit(){return this.presenterShowGuard.classifyFullscreenExit()}connectAudienceRole(){let t=chunkWKWWFY2C_cjs.kk(window.location.hash),n=this.getPresenterChannel();n&&(n.addEventListener("message",o=>{let r=o.data;chunkWKWWFY2C_cjs.lk(r)&&(t&&r.sessionId===t?(r.type==="presenter-state"&&(this.presenterSnapshot=r.snapshot,Op(this.lifecycle.chrome.root,r.snapshot),this.goToSlide(r.snapshot.slideIndex)),r.type==="presenter-slide-change"&&this.goToSlide(r.slideIndex),r.type==="presenter-exit"&&chunkWKWWFY2C_cjs.vk(window)&&this.store.set({endOfShow:true})):r.type==="audience-ready"&&r.sessionId===this.presenterSessionId&&this.syncAudience());}),t&&(n.postMessage({origin:chunkWKWWFY2C_cjs.gk,type:"audience-ready",sessionId:t}),this.options.source===void 0&&chunkWKWWFY2C_cjs.qk(t).then(async o=>{o&&(await this.loading.load(o,"bootstrap"),await this.enterPresentation());})));}closeAudienceWindow(){let t=this.presenterSessionId;t&&(this.getPresenterChannel()?.postMessage({origin:chunkWKWWFY2C_cjs.gk,type:"presenter-exit",sessionId:t}),chunkWKWWFY2C_cjs.rk(t));try{this.audienceWindow?.close();}catch{}this.audienceWindow=null,this.presenterSessionId="",this.presenterView?.syncSnapshot();}setLocale(t){this.t=Ht(t,this.options.messages),this.currentLocale=t,this.rebuildChrome(),this.options.onLocaleChange?this.options.onLocaleChange(t):chunkWKWWFY2C_cjs.Kp({localeCode:t});}setEditable(t){this.requestedEditable=t,this.applyEditable(t&&!this.sessions?.isCollaborationReadOnly());}applyEditable(t){this.store.set({editable:t}),this.editor.setEditable(t);}enableEditingFromProtectedView(){this.store.set({protectedView:false}),this.setEditable(true);}editAnywayFromReadOnlyRecommendation(){if(this.store.get().readOnlyRecommendation?.requiresPassword){this.store.set({readOnlyPasswordPromptOpen:true,readOnlyPasswordError:null});return}this.store.set({readOnlyBannerDismissed:true}),this.setEditable(true);}dismissReadOnlyBanner(){this.store.set({readOnlyBannerDismissed:true});}cancelReadOnlyPasswordPrompt(){this.store.set({readOnlyPasswordPromptOpen:false,readOnlyPasswordError:null});}submitReadOnlyPassword(t){this.checkReadOnlyPassword(t);}async checkReadOnlyPassword(t){this.store.set({readOnlyCheckingPassword:true});try{let n=await chunkWKWWFY2C_cjs.Tr(this.store.get().modifyVerifier,t);n.ok?(this.store.set({readOnlyBannerDismissed:!0,readOnlyPasswordPromptOpen:!1,readOnlyPasswordError:null}),this.setEditable(!0)):this.store.set({readOnlyPasswordError:n.reason});}finally{this.store.set({readOnlyCheckingPassword:false});}}dismissCompatToast(t){this.store.set({compatToasts:this.store.get().compatToasts.filter(n=>n.id!==t)});}dismissAllCompatToasts(){this.store.set({compatToasts:[]});}addRunProgramNotice(t){this.store.set({runProgramNotices:[...this.store.get().runProgramNotices,t]});}dismissRunProgramNotice(t){this.store.set({runProgramNotices:this.store.get().runProgramNotices.filter(n=>n.id!==t)});}confirmExternalHyperlink(t){return chunkWKWWFY2C_cjs.lq(this.optionsController.getOptions(),t)?window.confirm(`${this.t("pptx.options.trust.confirmHyperlinks")}
|
|
5191
5155
|
|
|
5192
|
-
${t}`):true}setEditTemplateMode(t){let n=this.store.get();!n.editable||n.editTemplateMode===t||this.store.set({editTemplateMode:t,selectedElementId:null,selectedElementIds:[]});}toggleTemplateEditing(){this.setEditTemplateMode(!this.store.get().editTemplateMode);}toggleMasterNavigation(){let t=u0(this.store.get());t&&this.store.set(t);}undo=()=>this.editor.undo();redo=()=>this.editor.redo();toggleAutosave(){return this.setAutosaveEnabled(!this.sessions.isAutosavePreferred()),this.isAutosaveSwitchOn()}isAutosaveToggleAvailable=()=>this.sessions?.getAutosaveActivation().toggleAvailable??this.options.autosave!==false;isAutosaveSwitchOn=()=>this.sessions?.isAutosavePreferred()??this.isAutosaveToggleAvailable();getQuickAccessOptions(){return this.optionsController?.getOptions().quickAccess??chunk24B6ZCFG_cjs.oq.quickAccess}quickAccessScreenTip(t){return this.optionsController?.screenTip(t)??t}getChartFollowDataPoint(){return this.optionsController?.getOptions().advanced.chartPropertiesFollowDataPoint??true}getTableStyleMap(){return this.store.get().tableStyleMap}getThemeColorMap(){let t=this.store.get().colorScheme;return t?chunk24B6ZCFG_cjs.P(t):void 0}getRecentPresentationsCount(){return this.optionsController?.getOptions().advanced.recentPresentationsCount??chunk24B6ZCFG_cjs.oq.advanced.recentPresentationsCount}canUndo=()=>this.editor.canUndo();canRedo=()=>this.editor.canRedo();async save(t="pptx"){let n=await this.editor.save(t);return this.afterSuccessfulSave(t),n}async downloadAs(t,n){await this.editor.downloadAs(t,n),this.afterSuccessfulSave(t);}async downloadPptx(t){await this.editor.downloadPptx(t),this.afterSuccessfulSave("pptx");}afterSuccessfulSave(t){this.optionsController.notifyActionSuccess(),t==="pptx"&&chunk24B6ZCFG_cjs.Bq(this.optionsController.getOptions())&&chunk24B6ZCFG_cjs.Gj(this.autosaveFilePath()).catch(()=>{});}autosaveFilePath(){return this.options.autosaveFilePath??"presentation.pptx"}async pruneExpiredAutosaveSnapshots(){try{let t=await chunk24B6ZCFG_cjs.Fj(),n=chunk24B6ZCFG_cjs.Dq(t,this.optionsController.getOptions());await Promise.all(n.map(o=>chunk24B6ZCFG_cjs.Gj(o)));}catch{}}deleteSelected=()=>this.editor.deleteSelected();getSelectedElementId=()=>this.editor.getSelectedElementId();async enterPresentation(){this.controls.goToSlide(this.controls.presentationEntryIndex()),await this.lifecycle.presentation.enter();}async exitPresentation(){chunk24B6ZCFG_cjs.Ik()&&await this.lifecycle.presentation.exit();}getRegistry=()=>this.registry;getHandler=()=>this.loading.getHandler();startCollaboration(t){return this.sessions.startCollaboration(t)}stopCollaboration=()=>this.sessions.stopCollaboration();getCollaborationStatus=()=>this.sessions.getCollaborationStatus();autosaveNow(){return this.sessions.autosaveNow()}setAutosaveEnabled(t){this.sessions.setAutosaveEnabled(t),this.lifecycle.chrome.titleBar?.setAutosaveEnabled(this.isAutosaveSwitchOn());}isAutosaveEnabled=()=>this.sessions.isAutosaveEnabled();openBroadcast(){this.customization.isDialogAvailable("broadcast")&&this.sessions.openBroadcast();}openShare(){this.customization.isDialogAvailable("share")&&this.sessions.openShare();}destroy(){this.destroyed||(this.destroyed=true,this.customization.destroy(),chunk24B6ZCFG_cjs.Cq(this.optionsController.getOptions())&&this.clearOptionsCache(),this.aiChat?.destroy(),this.aiChat=null,this.aiFocus=null,this.contextMenu?.destroy(),this.contextMenu=null,this.canvasContextMenu?.destroy(),this.canvasContextMenu=null,this.pasteOptionsToolbar?.destroy(),this.pasteOptionsToolbar=null,this.rulers?.destroy(),this.rulers=null,this.parityWorkflows.closeReadingView(),this.parityWorkflows.closeOutlineView(),this.closeAudienceWindow(),this.presenterChannel?.close(),this.sessions.destroy(),this.optionsController.dispose(),this.detachSignatureWarning?.(),this.loading.invalidate(),this.editor.destroy(),this.annotations.dispose(),this.exporter.destroy(),this.userFontsStyle?.remove(),this.webfontsToken++,D0(this.doc),Sl(this.lifecycle,()=>this.editor?.detachChrome()),this.loading.releaseLoaded());}clearOptionsCache(){(async()=>{try{let t=await chunk24B6ZCFG_cjs.Fj();await Promise.all(t.map(n=>chunk24B6ZCFG_cjs.Gj(n.key)));}catch{}})();}effective3DFlags(){return chunk24B6ZCFG_cjs.zq({smartArt3D:this.options.smartArt3D??false,surfaceChart3D:this.options.surfaceChart3D??false,barChart3D:this.options.barChart3D??false,lineChart3D:this.options.lineChart3D??false,areaChart3D:this.options.areaChart3D??false,pieChart3D:this.options.pieChart3D??false},this.optionsController.getOptions())}getChromeOptions(){return this.customization.getChromeOptions()}getResolvedCustomization(){return this.customization.getResolved()}rebuildChrome(){this.remountChrome(),this.editor.attachChrome(),this.setupContextMenu(),this.setupAiChat(),this.sessions.remountUi(),this.renderer.renderAll();}remountChrome(){Sl(this.lifecycle,()=>this.editor?.detachChrome()),this.lifecycle=yl(Cl(this)),this.optionsController.applyAll();}};function R0(e,t={}){return new Yo(e,t)}function O0(e){let{store:t}=e,n=xo(e.document),o=Si(e.document),r=false,i=false,s=false,a=false,l=()=>chunk24B6ZCFG_cjs.zh({authorizedCanEdit:e.getCanEdit(),configured:r,readOnly:i,sourcePending:e.getSourcePending?.()??false,sourceError:e.getSourceError?.()??!!t.get().error,status:d.getStatus(),remoteUsers:t.get().remotePresences}),p=()=>{if(!(s||a)){a=true;try{let m=l();t.get().editable!==m.canEdit&&t.set({editable:m.canEdit}),n.update(r?t.get().cursors:[],e.getScale?.()??1),o.update(m.remoteUsers,t.get().slides[t.get().currentSlide]?.elements??[],t.get().currentSlide,e.getScale?.()??1),e.onStateChange?.(m);}finally{a=false;}}},d=Bt({store:t,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:m=>t.set({editable:m}),onReadOnlyChange:m=>{i=m,p();},onStatusChange:p}),u=t.subscribe((m,g)=>{m.currentSlide!==g.currentSlide&&d.setActiveSlide(m.currentSlide),m.selectedElementId!==g.selectedElementId&&d.setSelection(m.selectedElementId??void 0,m.currentSlide),p();});return p(),{controller:d,cursorOverlay:n,selectionOverlay:o,getState:l,refresh:p,async setConfig(m){s||(r=!!m,m?await d.start(m):d.stop(),p());},destroy(){s||(s=true,u(),d.destroy(),n.destroy(),o.destroy());}}}Object.defineProperty(exports,"applyStyleMap",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.v}});Object.defineProperty(exports,"createDefaultRegistry",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.J}});Object.defineProperty(exports,"createEl",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.w}});Object.defineProperty(exports,"createElementRendererRegistry",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.u}});Object.defineProperty(exports,"createSvgEl",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.x}});Object.defineProperty(exports,"keyToLabel",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.D}});Object.defineProperty(exports,"renderSlideStage",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.A}});Object.defineProperty(exports,"translationsEn",{enumerable:true,get:function(){return chunkOBVLNSK5_cjs.C}});Object.defineProperty(exports,"BACKSTAGE_CARD_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Oq}});Object.defineProperty(exports,"BACKSTAGE_PAGE_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Nq}});Object.defineProperty(exports,"CANVAS_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Qq}});Object.defineProperty(exports,"EDITOR_SHORTCUT_ACTION_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Rq}});Object.defineProperty(exports,"ELEMENT_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Pq}});Object.defineProperty(exports,"OPTIONS_PAGE_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Kq}});Object.defineProperty(exports,"OPTIONS_SECTION_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Lq}});Object.defineProperty(exports,"OPTIONS_SETTING_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Mq}});Object.defineProperty(exports,"PPTX_OPEN_ACCEPT",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.xj}});Object.defineProperty(exports,"PRESENTATION_OPEN_EXTENSIONS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.wj}});Object.defineProperty(exports,"RIBBON_TAB_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Iq}});Object.defineProperty(exports,"TOOLBAR_BUTTON_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Jq}});Object.defineProperty(exports,"VIEWER_DIALOG_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Uq}});Object.defineProperty(exports,"VIEWER_EXPORT_FORMAT_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Vq}});Object.defineProperty(exports,"VIEWER_FEATURE_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Tq}});Object.defineProperty(exports,"VIEWER_PANEL_IDS",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Sq}});Object.defineProperty(exports,"buildInlineTextCommitPatch",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Tr}});Object.defineProperty(exports,"canInteractWithElement",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs._e}});Object.defineProperty(exports,"createImageElementFromFile",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.go}});Object.defineProperty(exports,"defaultCssVars",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Fa}});Object.defineProperty(exports,"defaultRadius",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Da}});Object.defineProperty(exports,"defaultThemeColors",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Ca}});Object.defineProperty(exports,"describeCollaborationShellState",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Ah}});Object.defineProperty(exports,"forgetSessionDeck",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Lj}});Object.defineProperty(exports,"getSessionTabId",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Ij}});Object.defineProperty(exports,"isLegacyBinaryPresentation",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.zj}});Object.defineProperty(exports,"isSupportedPresentationFile",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.yj}});Object.defineProperty(exports,"loadPresentationDeck",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Fk}});Object.defineProperty(exports,"loadSessionDeck",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Kj}});Object.defineProperty(exports,"overlayInlineTextSnapshot",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Ur}});Object.defineProperty(exports,"parsePresentationSessionId",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.zk}});Object.defineProperty(exports,"presentationBaseName",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Aj}});Object.defineProperty(exports,"rememberSessionDeck",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Jj}});Object.defineProperty(exports,"restoreSessionDeck",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Mj}});Object.defineProperty(exports,"savedPresentationFileName",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Bj}});Object.defineProperty(exports,"themeToCssVars",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Ea}});Object.defineProperty(exports,"vermilionDarkTheme",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Ha}});Object.defineProperty(exports,"vermilionLightTheme",{enumerable:true,get:function(){return chunk24B6ZCFG_cjs.Ga}});exports.PptxViewer=Yo;exports.canInlineEditElement=Wr;exports.createCollaborationController=Bt;exports.createCollaborationCursors=xo;exports.createCollaborationShell=O0;exports.createInitialViewerState=xi;exports.createPptxViewer=R0;exports.createRibbon=Xr;exports.createStore=ui;exports.createTranslator=Ht;exports.exportAllSlidesToSvg=SP;exports.exportSlideToSvg=ti;exports.getViewerCss=m0;exports.loadPresentation=mo;exports.openInlineEditor=$r;exports.renderToCanvas=lo;exports.revokeBlobUrls=mt;
|
|
5156
|
+
${t}`):true}setEditTemplateMode(t){let n=this.store.get();!n.editable||n.editTemplateMode===t||this.store.set({editTemplateMode:t,selectedElementId:null,selectedElementIds:[]});}toggleTemplateEditing(){this.setEditTemplateMode(!this.store.get().editTemplateMode);}toggleMasterNavigation(){let t=S0(this.store.get());t&&this.store.set(t);}undo=()=>this.editor.undo();redo=()=>this.editor.redo();toggleAutosave(){return this.setAutosaveEnabled(!this.sessions.isAutosavePreferred()),this.isAutosaveSwitchOn()}isAutosaveToggleAvailable=()=>this.sessions?.getAutosaveActivation().toggleAvailable??this.options.autosave!==false;isAutosaveSwitchOn=()=>this.sessions?.isAutosavePreferred()??this.isAutosaveToggleAvailable();getQuickAccessOptions(){return this.optionsController?.getOptions().quickAccess??chunkWKWWFY2C_cjs.bq.quickAccess}quickAccessScreenTip(t){return this.optionsController?.screenTip(t)??t}getChartFollowDataPoint(){return this.optionsController?.getOptions().advanced.chartPropertiesFollowDataPoint??true}getTableStyleMap(){return this.store.get().tableStyleMap}getThemeColorMap(){let t=this.store.get().colorScheme;return t?chunkWKWWFY2C_cjs.Q(t):void 0}getRecentPresentationsCount(){return this.optionsController?.getOptions().advanced.recentPresentationsCount??chunkWKWWFY2C_cjs.bq.advanced.recentPresentationsCount}canUndo=()=>this.editor.canUndo();canRedo=()=>this.editor.canRedo();async save(t="pptx"){let n=await this.editor.save(t);return this.afterSuccessfulSave(t),n}async downloadAs(t,n){await this.editor.downloadAs(t,n),this.afterSuccessfulSave(t);}async downloadPptx(t){await this.editor.downloadPptx(t),this.afterSuccessfulSave("pptx");}afterSuccessfulSave(t){this.optionsController.notifyActionSuccess(),t==="pptx"&&chunkWKWWFY2C_cjs.oq(this.optionsController.getOptions())&&chunkWKWWFY2C_cjs.rj(this.autosaveFilePath()).catch(()=>{});}autosaveFilePath(){return this.options.autosaveFilePath??"presentation.pptx"}async pruneExpiredAutosaveSnapshots(){try{let t=await chunkWKWWFY2C_cjs.qj(),n=chunkWKWWFY2C_cjs.qq(t,this.optionsController.getOptions());await Promise.all(n.map(o=>chunkWKWWFY2C_cjs.rj(o)));}catch{}}deleteSelected=()=>this.editor.deleteSelected();getSelectedElementId=()=>this.editor.getSelectedElementId();async enterPresentation(){this.controls.goToSlide(this.controls.presentationEntryIndex()),await this.lifecycle.presentation.enter();}async exitPresentation(){chunkWKWWFY2C_cjs.tk()&&await this.lifecycle.presentation.exit();}getRegistry=()=>this.registry;getHandler=()=>this.loading.getHandler();startCollaboration(t){return this.sessions.startCollaboration(t)}stopCollaboration=()=>this.sessions.stopCollaboration();getCollaborationStatus=()=>this.sessions.getCollaborationStatus();autosaveNow(){return this.sessions.autosaveNow()}setAutosaveEnabled(t){this.sessions.setAutosaveEnabled(t),this.lifecycle.chrome.titleBar?.setAutosaveEnabled(this.isAutosaveSwitchOn());}isAutosaveEnabled=()=>this.sessions.isAutosaveEnabled();openBroadcast(){this.customization.isDialogAvailable("broadcast")&&this.sessions.openBroadcast();}openShare(){this.customization.isDialogAvailable("share")&&this.sessions.openShare();}destroy(){this.destroyed||(this.destroyed=true,this.customization.destroy(),chunkWKWWFY2C_cjs.pq(this.optionsController.getOptions())&&this.clearOptionsCache(),this.aiChat?.destroy(),this.aiChat=null,this.aiFocus=null,this.contextMenu?.destroy(),this.contextMenu=null,this.canvasContextMenu?.destroy(),this.canvasContextMenu=null,this.pasteOptionsToolbar?.destroy(),this.pasteOptionsToolbar=null,this.rulers?.destroy(),this.rulers=null,this.parityWorkflows.closeReadingView(),this.parityWorkflows.closeOutlineView(),this.closeAudienceWindow(),this.presenterChannel?.close(),this.sessions.destroy(),this.optionsController.dispose(),this.detachSignatureWarning?.(),this.loading.invalidate(),this.editor.destroy(),this.annotations.dispose(),this.exporter.destroy(),this.userFontsStyle?.remove(),this.webfontsToken++,N0(this.doc),vl(this.lifecycle,()=>this.editor?.detachChrome()),this.loading.releaseLoaded());}clearOptionsCache(){(async()=>{try{let t=await chunkWKWWFY2C_cjs.qj();await Promise.all(t.map(n=>chunkWKWWFY2C_cjs.rj(n.key)));}catch{}})();}effective3DFlags(){return chunkWKWWFY2C_cjs.mq({smartArt3D:this.options.smartArt3D??false,surfaceChart3D:this.options.surfaceChart3D??false,barChart3D:this.options.barChart3D??false,lineChart3D:this.options.lineChart3D??false,areaChart3D:this.options.areaChart3D??false,pieChart3D:this.options.pieChart3D??false},this.optionsController.getOptions())}getChromeOptions(){return this.customization.getChromeOptions()}getResolvedCustomization(){return this.customization.getResolved()}rebuildChrome(){this.remountChrome(),this.editor.attachChrome(),this.setupContextMenu(),this.setupAiChat(),this.sessions.remountUi(),this.renderer.renderAll();}remountChrome(){vl(this.lifecycle,()=>this.editor?.detachChrome()),this.lifecycle=fl(hl(this)),this.optionsController.applyAll();}};function _0(e,t={}){return new jo(e,t)}function G0(e){let{store:t}=e,n=xo(e.document),o=Si(e.document),r=false,i=false,s=false,a=false,l=()=>chunkWKWWFY2C_cjs.kh({authorizedCanEdit:e.getCanEdit(),configured:r,readOnly:i,sourcePending:e.getSourcePending?.()??false,sourceError:e.getSourceError?.()??!!t.get().error,status:d.getStatus(),remoteUsers:t.get().remotePresences}),p=()=>{if(!(s||a)){a=true;try{let c=l();t.get().editable!==c.canEdit&&t.set({editable:c.canEdit}),n.update(r?t.get().cursors:[],e.getScale?.()??1),o.update(c.remoteUsers,t.get().slides[t.get().currentSlide]?.elements??[],t.get().currentSlide,e.getScale?.()??1),e.onStateChange?.(c);}finally{a=false;}}},d=zt({store:t,getHandler:e.getHandler,getSaveOptions:e.getSaveOptions,setEditable:c=>t.set({editable:c}),onReadOnlyChange:c=>{i=c,p();},onStatusChange:p}),u=t.subscribe((c,x)=>{c.currentSlide!==x.currentSlide&&d.setActiveSlide(c.currentSlide),c.selectedElementId!==x.selectedElementId&&d.setSelection(c.selectedElementId??void 0,c.currentSlide),p();});return p(),{controller:d,cursorOverlay:n,selectionOverlay:o,getState:l,refresh:p,async setConfig(c){s||(r=!!c,c?await d.start(c):d.stop(),p());},destroy(){s||(s=true,u(),d.destroy(),n.destroy(),o.destroy());}}}Object.defineProperty(exports,"applyStyleMap",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.v}});Object.defineProperty(exports,"createDefaultRegistry",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.J}});Object.defineProperty(exports,"createEl",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.w}});Object.defineProperty(exports,"createElementRendererRegistry",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.u}});Object.defineProperty(exports,"createSvgEl",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.x}});Object.defineProperty(exports,"keyToLabel",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.D}});Object.defineProperty(exports,"renderSlideStage",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.A}});Object.defineProperty(exports,"translationsEn",{enumerable:true,get:function(){return chunk6TALMZ42_cjs.C}});Object.defineProperty(exports,"BACKSTAGE_CARD_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Bq}});Object.defineProperty(exports,"BACKSTAGE_PAGE_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Aq}});Object.defineProperty(exports,"CANVAS_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Dq}});Object.defineProperty(exports,"EDITOR_SHORTCUT_ACTION_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Eq}});Object.defineProperty(exports,"ELEMENT_CONTEXT_MENU_COMMAND_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Cq}});Object.defineProperty(exports,"OPTIONS_PAGE_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.xq}});Object.defineProperty(exports,"OPTIONS_SECTION_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.yq}});Object.defineProperty(exports,"OPTIONS_SETTING_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.zq}});Object.defineProperty(exports,"PPTX_OPEN_ACCEPT",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.ij}});Object.defineProperty(exports,"PRESENTATION_OPEN_EXTENSIONS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.hj}});Object.defineProperty(exports,"RIBBON_TAB_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.vq}});Object.defineProperty(exports,"TOOLBAR_BUTTON_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.wq}});Object.defineProperty(exports,"VIEWER_DIALOG_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Hq}});Object.defineProperty(exports,"VIEWER_EXPORT_FORMAT_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Iq}});Object.defineProperty(exports,"VIEWER_FEATURE_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Gq}});Object.defineProperty(exports,"VIEWER_PANEL_IDS",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Fq}});Object.defineProperty(exports,"buildInlineTextCommitPatch",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Gr}});Object.defineProperty(exports,"canInteractWithElement",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Le}});Object.defineProperty(exports,"createImageElementFromFile",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Rn}});Object.defineProperty(exports,"defaultCssVars",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.jt}});Object.defineProperty(exports,"defaultRadius",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.ht}});Object.defineProperty(exports,"defaultThemeColors",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.gt}});Object.defineProperty(exports,"describeCollaborationShellState",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.lh}});Object.defineProperty(exports,"forgetSessionDeck",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.wj}});Object.defineProperty(exports,"getSessionTabId",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.tj}});Object.defineProperty(exports,"isLegacyBinaryPresentation",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.kj}});Object.defineProperty(exports,"isSupportedPresentationFile",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.jj}});Object.defineProperty(exports,"loadPresentationDeck",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.qk}});Object.defineProperty(exports,"loadSessionDeck",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.vj}});Object.defineProperty(exports,"overlayInlineTextSnapshot",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.Hr}});Object.defineProperty(exports,"parsePresentationSessionId",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.kk}});Object.defineProperty(exports,"presentationBaseName",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.lj}});Object.defineProperty(exports,"rememberSessionDeck",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.uj}});Object.defineProperty(exports,"restoreSessionDeck",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.xj}});Object.defineProperty(exports,"savedPresentationFileName",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.mj}});Object.defineProperty(exports,"themeToCssVars",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.it}});Object.defineProperty(exports,"vermilionDarkTheme",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.lt}});Object.defineProperty(exports,"vermilionLightTheme",{enumerable:true,get:function(){return chunkWKWWFY2C_cjs.kt}});exports.PptxViewer=jo;exports.canInlineEditElement=Wr;exports.createCollaborationController=zt;exports.createCollaborationCursors=xo;exports.createCollaborationShell=G0;exports.createInitialViewerState=xi;exports.createPptxViewer=_0;exports.createRibbon=Xr;exports.createStore=ui;exports.createTranslator=Ht;exports.exportAllSlidesToSvg=IP;exports.exportSlideToSvg=ti;exports.getViewerCss=y0;exports.loadPresentation=mo;exports.openInlineEditor=$r;exports.renderToCanvas=lo;exports.revokeBlobUrls=ct;
|