filens-preview 0.3.2 → 0.3.3

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.
Files changed (28) hide show
  1. package/README.md +4 -4
  2. package/dist/all-in-one/THIRD-PARTY-NOTICES.txt +583 -0
  3. package/dist/all-in-one/filens.js +305 -305
  4. package/dist/index.d.ts +1 -1
  5. package/dist/split/THIRD-PARTY-NOTICES.txt +583 -0
  6. package/dist/split/chunks/{archive-haip2eOP.js → archive-BT6evXzB.js} +1 -1
  7. package/dist/split/chunks/{browser-video-session-C_14e_mG.js → browser-video-session-BX-bBV8b.js} +1 -1
  8. package/dist/split/chunks/{cad-5oTkbaDV.js → cad-D4xpsKTK.js} +1 -1
  9. package/dist/split/chunks/{core-EjELrtsP.js → core-DMIUha7u.js} +10 -10
  10. package/dist/split/chunks/{diagram-BRcdlitF.js → diagram-DEaht2P0.js} +1 -1
  11. package/dist/split/chunks/{docx-I39iDYpR.js → docx-CDkeTBtm.js} +1 -1
  12. package/dist/split/chunks/{ebook-BRfadCGl.js → ebook-Hm8yI-Uy.js} +1 -1
  13. package/dist/split/chunks/index-JSBoG8MK.js +1 -0
  14. package/dist/split/chunks/{index-DkF8PBGR.js → index-cyA_1amh.js} +1 -1
  15. package/dist/split/chunks/{iwork-DXq9Adf7.js → iwork-Drn02EYr.js} +1 -1
  16. package/dist/split/chunks/{media-runtime-B6322raw.js → media-runtime-C31OgCrW.js} +1 -1
  17. package/dist/split/chunks/{mindmap-CyR3TRfx.js → mindmap-CZvf6m9O.js} +1 -1
  18. package/dist/split/chunks/{model3d-BEt6INTt.js → model3d-DXfxzjT8.js} +1 -1
  19. package/dist/split/chunks/{panorama-ChsqnvWC.js → panorama-COXaZ8XC.js} +10 -10
  20. package/dist/split/chunks/vendor-C8SyXchM.js +4115 -0
  21. package/dist/split/chunks/{xlsx-CITQo0Od.js → xlsx-bMXHZBbO.js} +1 -1
  22. package/dist/split/converter-core.wasm +0 -0
  23. package/dist/split/converter-office.wasm +0 -0
  24. package/dist/split/converter-postscript.wasm +0 -0
  25. package/dist/split/filens.js +2 -2
  26. package/package.json +1 -1
  27. package/dist/split/chunks/index-C4jdVbDq.js +0 -1
  28. package/dist/split/chunks/vendor-C1aIdQ-w.js +0 -4115
@@ -1,17 +1,17 @@
1
- var po=Object.defineProperty;var ho=(t,e,r)=>e in t?po(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r;var E=(t,e,r)=>ho(t,typeof e!="symbol"?e+"":e,r);import{J as fo,i as mo,u as Pn,f as go,U as mr}from"./vendor-C1aIdQ-w.js";function U(t){return t==null?[]:Array.isArray(t)?t:[t]}function gt(t,e,r){return Math.min(Math.max(t,e),r)}function On(t){const e=t.replace(/\\/g,"/").split("/"),r=[];for(const n of e)if(!(!n||n===".")){if(n===".."){r.pop();continue}r.push(n)}return r.join("/")}function yo(t,e){if(e.startsWith("/"))return On(e.slice(1));const r=t.split("/").slice(0,-1).join("/");return On(`${r}/${e}`)}function B(t,e=0){if(typeof t=="number")return Number.isFinite(t)?t:e;if(typeof t=="string"&&t.trim().length>0){const r=Number(t);return Number.isFinite(r)?r:e}return e}let Dn=0;function $t(t){return Dn+=1,`${t}-${Dn}`}function xt(t){return t==null||typeof t!="object"?t:typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}class ie extends Error{constructor(e){super(e==="password_required"?"This document requires a password.":e==="password_invalid"?"Incorrect password. Please try again.":"Opening the document was cancelled."),this.code=e,this.name="PreviewPasswordError"}}function ge(t){var n;const e=t,r=(e==null?void 0:e.code)??((n=e==null?void 0:e.result)==null?void 0:n.errorCode);return r==="password_required"||r==="password_invalid"||r==="password_cancelled"?r:void 0}const jr=new TextDecoder;async function xo(t,e={}){const r=vo(t,e.maxEntryBytes);if(r)return r;let n;try{n=await fo.loadAsync(t)}catch(i){throw i instanceof Error&&/encrypted/i.test(i.message)?new ie("password_required"):i}const a={remaining:8*1024*1024};return new Map(Object.values(n.files).map(i=>{var d,l,u;const o=i,s=Ia(()=>{var f;if((((f=o._data)==null?void 0:f.uncompressedSize)??0)>(e.maxEntryBytes??128*1024*1024))throw new Error("Archive entry exceeds the preview size limit.");return i.async("uint8array")},(d=o._data)==null?void 0:d.uncompressedSize,a);return[i.name,{name:i.name,directory:i.dir,size:(l=o._data)==null?void 0:l.uncompressedSize,modified:(u=i.date)==null?void 0:u.getTime(),bytes:s,text:async()=>jr.decode(await s())}]}))}function vo(t,e=128*1024*1024){const r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=t.length;let a=n-22;const i=Math.max(0,a-65535);for(;a>=i&&!(r.getUint32(a,true)===101010256&&a+22+r.getUint16(a+20,true)===n);a--);if(a<i)return;if([4,6].some(m=>{const h=r.getUint16(a+m,true);return h!==0&&h!==65535}))throw new Error("Multi-volume ZIP requires all archive parts.");const o=r.getUint16(a+10,true),s=r.getUint32(a+12,true);let d=r.getUint32(a+16,true);if(r.getUint16(a+4,true)||r.getUint16(a+6,true)||r.getUint16(a+8,true)!==o||o===65535||s===4294967295||d===4294967295||d+s!==a)return;const l=new Map,u={remaining:8*1024*1024},f=d;for(let m=0;m<o;m++){if(d+46>a||r.getUint32(d,true)!==33639248)return;const h=r.getUint16(d+8,true),g=r.getUint16(d+10,true),x=r.getUint32(d+20,true),F=r.getUint32(d+24,true),y=r.getUint16(d+28,true),S=r.getUint16(d+30,true),k=r.getUint16(d+32,true),w=r.getUint32(d+42,true),T=d+46+y+S+k;if(T>a)return;if(h&1)throw new ie("password_required");if(g!==0&&g!==8||x===4294967295||F===4294967295||w===4294967295||r.getUint16(d+34,true))return;const N=t.subarray(d+46,d+46+y);if(!(h&2048)&&N.some($=>$>=128))return;for(let $=d+46+y;$<d+46+y+S;){if($+4>T)return;const q=r.getUint16($,true),V=r.getUint16($+2,true);if(q===28789||q===1||($+=4+V,$>d+46+y+S))return}const I=[],C=jr.decode(N);for(const $ of C.split("/"))$===".."?I.pop():$!=="."&&I.push($);let M=I.join("/");const H=C.endsWith("/")||!!(r.getUint32(d+38,true)&16);if(H&&!M.endsWith("/")&&(M+="/"),w+30>f||r.getUint32(w,true)!==67324752)return;const z=w+30+r.getUint16(w+26,true)+r.getUint16(w+28,true);if(z+x>f)return;const Y=t.subarray(z,z+x),D=r.getUint16(d+14,true),P=r.getUint16(d+12,true),j=Date.UTC((D>>9)+1980,(D>>5&15)-1,D&31,P>>11,P>>5&63,(P&31)*2),O=Ia(async()=>{if(F>e)throw new Error("Archive entry exceeds the preview size limit.");const $=g===0?Y:await bo(Y,F);if($.length!==F)throw new Error(`Invalid ZIP entry size: ${M}.`);return $},F,u);l.set(M,{name:M,directory:H,size:F,modified:j,bytes:O,text:async()=>jr.decode(await O())}),d=T}return d===a?l:void 0}function Ia(t,e,r){let n;return()=>{if(n)return n;const a=Promise.resolve().then(t);return e!==void 0&&e<=r.remaining&&(r.remaining-=e,n=a,a.catch(()=>{n===a&&(n=void 0,r.remaining+=e)})),a}}async function bo(t,e){if(e>=256*1024&&typeof DecompressionStream<"u"&&typeof Response<"u"){let r;try{r=new DecompressionStream("deflate-raw")}catch{}if(r){const a=new Response(t).body.pipeThrough(r).getReader(),i=[];let o=0;try{for(;;){const{value:l,done:u}=await a.read();if(u)break;if(o+=l.byteLength,o>e)throw new Error("Invalid ZIP entry size.");i.push(l)}}finally{await a.cancel().catch(()=>{})}const s=new Uint8Array(o);let d=0;for(const l of i)s.set(l,d),d+=l.byteLength;return s}}return mo(t,{out:new Uint8Array(e+1)})}async function nn(t,e={}){try{return await xo(t,e)}catch(r){if(!(r instanceof ie)||r.code!=="password_required")throw r;return So(t,e)}}const wo=new TextDecoder;async function So(t,e){var o;const{ZipReader:r,Uint8ArrayReader:n,ERR_INVALID_PASSWORD:a}=await import("./vendor-C1aIdQ-w.js").then(s=>s.aR),i=new r(new n(t),{useWebWorkers:false});try{const s=new Map;for(const d of await i.getEntries()){let l;const u=async(f=e.password,m=e.signal)=>{if(m==null||m.throwIfAborted(),l)return l;if(d.directory)return new Uint8Array;if(d.encrypted&&!f)throw new ie("password_required");const h=e.maxEntryBytes??128*1024*1024;if(d.uncompressedSize>h)throw new Error("Archive entry exceeds the preview size limit.");try{let g=0;const x=[];await d.getData(new WritableStream({write(S){if(g+=S.byteLength,g>h)throw new Error("Archive entry exceeds the preview size limit.");x.push(S)}}),{password:f,signal:m,checkSignature:true});const F=new Uint8Array(g);let y=0;for(const S of x)F.set(S,y),y+=S.byteLength;return F.byteLength<=8388608&&(l=F),F}catch(g){throw g instanceof Error&&g.message===a?new ie("password_invalid"):g}};s.set(d.filename,{name:d.filename,directory:d.directory,encrypted:d.encrypted,size:d.uncompressedSize,modified:(o=d.lastModDate)==null?void 0:o.getTime(),bytes:u,text:async()=>wo.decode(await u())})}return s}finally{await i.close()}}async function Je(t,e={}){if(Dt(e.signal),typeof t=="string"){const r=await fetch(t,{signal:e.signal});if(Dt(e.signal),!r.ok)throw new Error(`Failed to fetch PPTX source: ${r.status} ${r.statusText}`);const n=await r.arrayBuffer();return Dt(e.signal),new Uint8Array(n)}if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice();if(Ao(t))return new Uint8Array(t);if(ko(t)){const r=await t.arrayBuffer();return Dt(e.signal),new Uint8Array(r)}throw new Error("Unsupported PPTX source type.")}function Dt(t){if(t!=null&&t.aborted)throw Fo()}function Fo(){try{return new DOMException("The operation was aborted.","AbortError")}catch{const t=new Error("The operation was aborted.");return t.name="AbortError",t}}function Ao(t){return t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]"||Object.prototype.toString.call(t)==="[object SharedArrayBuffer]"}function ko(t){return typeof t=="object"&&t!==null&&typeof t.arrayBuffer=="function"&&typeof t.size=="number"}class Hn{constructor(e,r){E(this,"loaded");this.data=e,this.signal=r}async async(e){Dt(this.signal),this.loaded??(this.loaded=typeof this.data=="function"?this.data():Promise.resolve(this.data));const r=await this.loaded;return Dt(this.signal),e==="text"?new TextDecoder().decode(r):r}}async function To(t,e={}){Dt(e.signal);const r=await nn(t).catch(()=>{});if(Dt(e.signal),r){const i=new Map([...r].map(([o,s])=>[o,new Hn(s.bytes,e.signal)]));return{file:o=>i.get(o)??null}}const n=[];Pn(t,{filter:i=>(n.push(i.name),false)});const a=new Map(n.map(i=>[i,new Hn(async()=>Pn(t,{filter:o=>o.name===i})[i],e.signal)]));return{file:i=>a.get(i)??null}}function an(t){const e=t.replace("#","").padEnd(6,"0");return[Number.parseInt(e.slice(0,2),16),Number.parseInt(e.slice(2,4),16),Number.parseInt(e.slice(4,6),16)]}function Ba(t){return`#${t.map(e=>Ro(e).toString(16).padStart(2,"0")).join("")}`.toUpperCase()}function qe(t,e){return on(t,({h:r,s:n,l:a})=>({h:r,s:n,l:a+(1-a)*Me(e)}))}function Rr(t,e){const r=Me(e);return Co(t,n=>n*r)}function Lo(t,e){return on(t,({h:r,s:n,l:a})=>({h:r,s:n,l:a*e}))}function Mo(t,e){return on(t,({h:r,s:n,l:a})=>({h:r,s:n,l:a+e}))}function Nr(t,e,r){const n=r[t]??t;return e[n]??e[t]??"#000000"}function Co(t,e){const[r,n,a]=an(t);return Ba([yr(e(gr(r/255)))*255,yr(e(gr(n/255)))*255,yr(e(gr(a/255)))*255])}function on(t,e){const[r,n,a]=an(t),[i,o,s]=Eo(r/255,n/255,a/255),d=e({h:i,s:o,l:s}),[l,u,f]=jo(d.h,Me(d.s),Me(d.l));return Ba([l*255,u*255,f*255])}function gr(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){const e=Me(t);return e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055}function Eo(t,e,r){const n=Math.max(t,e,r),a=Math.min(t,e,r),i=(n+a)/2;if(n===a)return[0,0,i];const o=n-a,s=i>.5?o/(2-n-a):o/(n+a);let d=0;switch(n){case t:d=(e-r)/o+(e<r?6:0);break;case e:d=(r-t)/o+2;break;default:d=(t-e)/o+4;break}return[d/6,s,i]}function jo(t,e,r){if(e===0)return[r,r,r];const n=(t%1+1)%1,a=r<.5?r*(1+e):r+e-r*e,i=2*r-a;return[xr(i,a,n+1/3),xr(i,a,n),xr(i,a,n-1/3)]}function xr(t,e,r){let n=r;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ro(t){return Math.max(0,Math.min(255,Math.round(t)))}function Me(t){return Number.isFinite(t)?Math.max(0,Math.min(1,t)):0}const No=9525,$o=6e4;function J(t){return t/No}function sr(t){return t/$o}const vr=/([^<]+)|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\?xml\s+([^?]*)\?>|<\/([^\s/>]+)\s*>|<([^\s/>!?]+)((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/gy,zn=/([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Io=/&(amp|lt|gt|quot|apos|#38|#x26|#60|#x3C|#62|#x3E|#34|#x22|#39|#x27);/g,Bo={amp:"&","#38":"&","#x26":"&",lt:"<","#60":"<","#x3C":"<",gt:">","#62":">","#x3E":">",quot:'"',"#34":'"',"#x22":'"',apos:"'","#39":"'","#x27":"'"};function Po(t){if(!t.startsWith("<"))return null;const e=t.replace(/\r\n?/g,`
2
- `),r={tag:"",children:[],text:""},n=[r];vr.lastIndex=0;let a=0;try{for(;a<e.length;){const i=vr.exec(e);if(!i||i.index!==a)return null;a=vr.lastIndex;const o=n[n.length-1];if(i[1]!==void 0)n.length>1&&(o.text+=i[1]);else if(i[2]!==void 0)Be(o),o.children.push({"#text":i[2]});else if(i[3]!==void 0){Be(o);const s={"?xml":[{"#text":""}]};s[":@"]=Un(i[3]),o.children.push(s)}else if(i[4]!==void 0){if(n.length===1||o.tag!==i[4])return null;Be(o),n.pop()}else if(i[5]!==void 0){const s=i[5];if(s===":@"||s==="#text"||s==="__proto__")return null;Be(o);const d=[],l={};if(Oa(l,s,d),i[6].trim()&&(l[":@"]=Un(i[6])),o.children.push(l),!i[7]){if(n.length>101)return null;n.push({tag:s,children:d,text:""})}}}return n.length===1?r.children:null}catch{return null}}function Be(t){t.text&&(t.children.push({"#text":Pa(t.text)}),t.text="")}function Un(t){const e={};zn.lastIndex=0;let r;for(;r=zn.exec(t);){if(r[1]in Object.prototype||r[1]==="prototype")throw new Error("Reserved XML attribute");Oa(e,r[1],Pa(r[2]??r[3]))}return e}function Pa(t){return t.includes("&")?t.replace(Io,(e,r)=>Bo[r]):t}function Oa(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{value:r,enumerable:true,writable:true,configurable:true}):t[e]=r}const Oo=new go.XMLParser({preserveOrder:true,ignoreAttributes:false,attributeNamePrefix:"",parseTagValue:false,trimValues:false,parseAttributeValue:false}),Xn=new WeakMap,Yn=new WeakMap;function Da(t){let e=Xn.get(t);return e||(e=t.async("text").then(r=>Po(r)??Oo.parse(r)),Xn.set(t,e)),e}async function It(t,e){const r=t.file(e);if(!r)return null;let n=Yn.get(r);return n||(n=Ha(await Da(r)),Yn.set(r,n)),n}async function cr(t,e){const r=t.file(e);return r?Da(r):null}function Ha(t){const e={};let r;for(const n of t){const a=Object.keys(n).find(d=>d!==":@");if(!a)continue;if(a==="#text"){r=r===void 0?n[a]:String(r)+String(n[a]);continue}if(!Array.isArray(n[a]))continue;const i=Ha(n[a]),o=n[":@"];let s=i;if(o)for(const[d,l]of Object.entries(o))br(i,d,l);else{const d=Object.keys(i);d.length===0?s="":d.length===1&&i["#text"]!==void 0&&(s=i["#text"])}if(Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==void 0){const d=e[a];Array.isArray(d)?d.push(s):br(e,a,[d,s])}else br(e,a,s)}return r!==void 0&&(typeof r!="string"||r.length)&&(e["#text"]=r),e}function br(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{value:r,enumerable:true,writable:true,configurable:true}):t[e]=r}const nt={slideMaster:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster",slideLayout:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",video:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",audio:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio",media:"http://schemas.microsoft.com/office/2007/relationships/media",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",slide:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",diagramData:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData",diagramDrawing:"http://schemas.microsoft.com/office/2007/relationships/diagramDrawing",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"},at={name:"Default",colors:{dk1:"#111827",lt1:"#FFFFFF",dk2:"#334155",lt2:"#F8FAFC",accent1:"#2563EB",accent2:"#F97316",accent3:"#10B981",accent4:"#F59E0B",accent5:"#8B5CF6",accent6:"#0EA5E9",hlink:"#2563EB",folHlink:"#8B5CF6"},fonts:{major:"Aptos",minor:"Calibri",majorScripts:{},minorScripts:{}}},Ve={bg1:"lt1",tx1:"dk1",bg2:"lt2",tx2:"dk2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink"},sn={offsetX:0,offsetY:0,scaleX:1,scaleY:1,rotation:0,flipH:false,flipV:false,matrix:{a:1,b:0,c:0,d:1,e:0,f:0},groupPath:[],fill:void 0},$r="\xAD",Ir="\u2011";function Ce(){return{fills:[],backgroundFills:[],lines:[],effects:[]}}async function Do(t,e={}){var F;const r=await Je(t,e),n=await To(r,e),a=[],i={masters:new Map,layouts:new Map,themes:new Map,media:{}},o=await Ho(n),s=await It(n,"ppt/presentation.xml");if(!(s!=null&&s["p:presentation"]))throw new Error("Invalid PPTX: presentation.xml is missing.");const d=await lr(n,"ppt/_rels/presentation.xml.rels"),l=s["p:presentation"];i.presentationDefaultTextStyle=X(l["p:defaultTextStyle"]);const u=l["p:sldSz"],f={width:J(B(u==null?void 0:u.cx,9144e3)),height:J(B(u==null?void 0:u.cy,5143500))},m=U((F=l["p:sldIdLst"])==null?void 0:F["p:sldId"]),h=Object.fromEntries(m.flatMap((y,S)=>{const k=y["r:id"],w=k?d[k]:void 0;return w?[[w.target,S]]:[]})),g=[];let x=at;for(const y of m){const S=y["r:id"];if(!S)continue;const k=d[S];if(!k){a.push(`Missing relationship ${S} in presentation.xml.rels.`);continue}const w=[],T=await Yo(n,k.target,f,o,i,w,h);Dt(e.signal),x=T.theme,a.push(...w),g.push({...T.slide,index:g.length})}return Dt(e.signal),{size:f,theme:x,slides:g,media:i.media,warnings:a}}async function Ho(t){const e=await It(t,"[Content_Types].xml"),r=e==null?void 0:e.Types,n={},a={};for(const i of U(r==null?void 0:r.Override))n[String(i.PartName??"").replace(/^\//,"")]=String(i.ContentType??"");for(const i of U(r==null?void 0:r.Default))a[String(i.Extension??"")]=String(i.ContentType??"");return{overrides:n,defaults:a}}async function lr(t,e){const r=await It(t,e),n=r==null?void 0:r.Relationships,a=U(n==null?void 0:n.Relationship),i={},o=Fc(e);for(const s of a){const d=s.TargetMode?String(s.TargetMode):void 0,l=String(s.Target??"");i[String(s.Id)]={id:String(s.Id),type:String(s.Type),target:ac(l,d)?l:yo(o,l),targetMode:d}}return i}async function zo(t,e,r){const n=r.themes.get(e);if(n)return n;const a=(async()=>{var x,F,y,S;const i=await It(t,e),o=await cr(t,e),s=i==null?void 0:i["a:theme"];if(!s)return{theme:at,formatScheme:Ce()};const d=s["a:themeElements"],l=o?Tt(o,"a:theme"):void 0,u=l?Tt(l,"a:themeElements"):void 0,f=d==null?void 0:d["a:clrScheme"],m=d==null?void 0:d["a:fontScheme"],h=Bs(d==null?void 0:d["a:fmtScheme"],u?Tt(u,"a:fmtScheme"):void 0),g={...at.colors};if(f)for(const k of Object.keys(g)){const w=f[`a:${k}`];if(!w)continue;const T=w["a:srgbClr"],N=w["a:sysClr"];T!=null&&T.val?g[k]=`#${String(T.val)}`.toUpperCase():N!=null&&N.lastClr&&(g[k]=`#${String(N.lastClr)}`.toUpperCase())}return{theme:{name:typeof s.name=="string"?s.name:at.name,colors:g,fonts:{major:(F=(x=m==null?void 0:m["a:majorFont"])==null?void 0:x["a:latin"])!=null&&F.typeface?String(m["a:majorFont"]["a:latin"].typeface):at.fonts.major,minor:(S=(y=m==null?void 0:m["a:minorFont"])==null?void 0:y["a:latin"])!=null&&S.typeface?String(m["a:minorFont"]["a:latin"].typeface):at.fonts.minor,majorScripts:qn(m==null?void 0:m["a:majorFont"]),minorScripts:qn(m==null?void 0:m["a:minorFont"])}},formatScheme:h}})();return r.themes.set(e,a),a}async function cn(t,e){if(e.tableStyles)return e.tableStyles;const r=(async()=>{const n=await It(t,"ppt/tableStyles.xml"),a=n==null?void 0:n["a:tblStyleLst"];if(!a)return{styles:{}};const i={};for(const o of U(a["a:tblStyle"])){const s=typeof(o==null?void 0:o.styleId)=="string"?String(o.styleId):"";s&&(i[s]={styleId:s,wholeTbl:X(o["a:wholeTbl"]),band1H:X(o["a:band1H"]),band2H:X(o["a:band2H"]),band1V:X(o["a:band1V"]),band2V:X(o["a:band2V"]),firstRow:X(o["a:firstRow"]),lastRow:X(o["a:lastRow"]),firstCol:X(o["a:firstCol"]),lastCol:X(o["a:lastCol"]),nwCell:X(o["a:nwCell"]),neCell:X(o["a:neCell"]),swCell:X(o["a:swCell"]),seCell:X(o["a:seCell"])})}return{defaultStyleId:typeof a.def=="string"?String(a.def):void 0,styles:i}})();return e.tableStyles=r,r}function qn(t){if(!t)return{};const e={};for(const r of U(t["a:font"])){const n=typeof(r==null?void 0:r.script)=="string"?String(r.script).trim():"",a=typeof(r==null?void 0:r.typeface)=="string"?String(r.typeface).trim():"";!n||!a||(e[n]=a)}return e}async function Uo(t,e,r,n){const a=n.masters.get(e);if(a)return a;const i=(async()=>{var H;const o=await It(t,e),s=await cr(t,e),d=Sn(e),l=await lr(t,d),u=await cn(t,n),f=o==null?void 0:o["p:sldMaster"];if(!f)return{fixedItems:[],placeholders:new Map,background:{type:"solid",color:at.colors.lt1},theme:at,themeFormatScheme:Ce(),textStyles:Gt(),colorMap:{...Ve}};const m=Object.values(l).find(z=>z.type===nt.theme),h=m?await zo(t,m.target,n):{theme:at,formatScheme:Ce()},g=h.theme,x=h.formatScheme,F={...Ve,...f["p:clrMap"]?f["p:clrMap"]:{}},y=[],S={theme:g,themeFormatScheme:x,tableStyles:u,textStyles:Gt(),colorMap:F,relationships:l,slideIndexByPath:{},contentTypes:r,slidePath:e,warnings:y,group:sn,orderedTextFrames:ln(s),orderedShapeNodes:dn(s),orderedNodeOrders:un(s),diagramDataModels:{},diagramDrawings:{},chartSpaces:{},caches:n,zip:t},k=ke(n.presentationDefaultTextStyle,S),w=$s(f["p:txStyles"],S,Gt(k)),T={...S,textStyles:w},N=yn(f["p:cSld"],g,F,x,T)??{type:"solid",color:g.colors.lt1},I=je((H=f["p:cSld"])==null?void 0:H["p:spTree"],T),C=new Map,M=[];for(const z of I)z.placeholderKey?C.set(z.placeholderKey,z):M.push(z);return{fixedItems:M,placeholders:C,background:N,theme:g,themeFormatScheme:x,textStyles:w,colorMap:F}})();return n.masters.set(e,i),i}async function Xo(t,e,r,n){const a=n.layouts.get(e);if(a)return a;const i=(async()=>{var I;const o=await It(t,e),s=await cr(t,e),d=Sn(e),l=await lr(t,d),u=await cn(t,n),f=o==null?void 0:o["p:sldLayout"],m=Object.values(l).find(C=>C.type===nt.slideMaster),h=m?await Uo(t,m.target,r,n):null,g=(h==null?void 0:h.theme)??at,x=(h==null?void 0:h.themeFormatScheme)??Ce(),F=(h==null?void 0:h.colorMap)??{...Ve};if(!f)return{fixedItems:(h==null?void 0:h.fixedItems)??[],placeholders:(h==null?void 0:h.placeholders)??new Map,background:(h==null?void 0:h.background)??{type:"solid",color:g.colors.lt1},theme:g,themeFormatScheme:x,textStyles:(h==null?void 0:h.textStyles)??Gt(),colorMap:F};const y=[],S={theme:g,themeFormatScheme:x,tableStyles:u,textStyles:(h==null?void 0:h.textStyles)??Gt(),placeholderSources:h==null?void 0:h.placeholders,colorMap:F,relationships:l,slideIndexByPath:{},contentTypes:r,slidePath:e,warnings:y,group:sn,orderedTextFrames:ln(s),orderedShapeNodes:dn(s),orderedNodeOrders:un(s),diagramDataModels:{},diagramDrawings:{},chartSpaces:{},caches:n,zip:t},k=yn(f["p:cSld"],g,F,x,S)??(h==null?void 0:h.background)??{type:"solid",color:g.colors.lt1},w=je((I=f["p:cSld"])==null?void 0:I["p:spTree"],S),T=new Map,N=[...(h==null?void 0:h.fixedItems)??[]];for(const C of w)if(C.placeholderKey){const M=yi(wn(h==null?void 0:h.placeholders,C.item.placeholder),C);T.set(C.placeholderKey,M)}else N.push(C);if(h)for(const[C,M]of h.placeholders.entries())T.has(C)||T.set(C,M);return{fixedItems:N,placeholders:T,background:k,theme:g,themeFormatScheme:x,textStyles:(h==null?void 0:h.textStyles)??Gt(),colorMap:F}})();return n.layouts.set(e,i),i}async function Yo(t,e,r,n,a,i,o){var P;const s=await It(t,e),d=await cr(t,e),l=Sn(e),u=await lr(t,l),f=s==null?void 0:s["p:sld"];if(!f)return{slide:{id:$t("slide"),index:0,title:"Untitled slide",background:{type:"solid",color:at.colors.lt1},width:r.width,height:r.height,items:[],warnings:[...i]},theme:at};const m=Object.values(u).find(j=>j.type===nt.slideLayout),h=m?await Xo(t,m.target,n,a):null,g=await cn(t,a),x=(h==null?void 0:h.theme)??at,F=(h==null?void 0:h.themeFormatScheme)??Ce(),y=(h==null?void 0:h.colorMap)??{...Ve},S=await us(t,u),k=await ps(t,u),w=i,T={theme:x,themeFormatScheme:F,tableStyles:g,textStyles:(h==null?void 0:h.textStyles)??Gt(),placeholderSources:h==null?void 0:h.placeholders,colorMap:y,relationships:u,slideIndexByPath:o,contentTypes:n,slidePath:e,warnings:w,group:sn,orderedTextFrames:ln(d),orderedShapeNodes:dn(d),orderedNodeOrders:un(d),diagramDataModels:S.dataModels,diagramDrawings:S.drawings,chartSpaces:k,caches:a,zip:t},N=yn(f["p:cSld"],x,y,F,T)??(h==null?void 0:h.background)??{type:"solid",color:x.colors.lt1},I=je((P=f["p:cSld"])==null?void 0:P["p:spTree"],T),C=[],M=new Set,H=o[e]??0;for(const j of(h==null?void 0:h.fixedItems)??[])C.push(xt(j.item));for(const j of I){const O=j.placeholderKey?yi(wn(h==null?void 0:h.placeholders,j.item.placeholder),j):j;j.placeholderKey&&M.add(j.placeholderKey),C.push(O.item)}for(const[j,O]of(h==null?void 0:h.placeholders.entries())??[])M.has(j)||ia(O.item)&&!_r(O.item)&&!Wr(O.item)&&!Jr(O.item)&&!bi(O.item)&&C.push(xt(O.item));const z=C.filter(j=>!vc(j));xc(z,H),yc(z,x);const Y=new Set;Gr(N,Y);for(const j of z)Ac(j,Y);for(const j of Y)await kc(t,j,n,a);const D=Tc(z.find(j=>{var O;return((O=j.placeholder)==null?void 0:O.type)==="title"&&ia(j)}))??bc(z)??"Untitled slide";return{slide:{id:$t("slide"),index:0,title:D,background:N,width:r.width,height:r.height,items:z,warnings:[...w]},theme:x}}function je(t,e,r=true){var d,l;if(!t)return[];const n=r&&((d=t["p:grpSpPr"])==null?void 0:d["a:xfrm"])!==void 0?Qa((l=t["p:grpSpPr"])==null?void 0:l["a:xfrm"],e.group,void 0,false):e.group,a=n!==e.group?{...e,group:{...n,fill:ei(t["p:grpSpPr"],e)}}:e,i=[],o=u=>{for(const f of U(t[u]))i.push({type:u,node:f,order:Wt(f,a.orderedNodeOrders)})};o("p:sp"),o("p:pic"),o("p:graphicFrame"),o("p:cxnSp"),o("p:grpSp"),i.sort((u,f)=>u.order-f.order);const s=[];for(const u of i)switch(u.type){case"p:sp":s.push(Wo(u.node,a));break;case"p:pic":s.push(ns(u.node,a));break;case"p:graphicFrame":s.push(...as(u.node,a));break;case"p:cxnSp":s.push(rs(u.node,a));break;case"p:grpSp":s.push(..._o(u.node,a));break}return s}function ln(t){const e=new Map;return t&&za(t,e),e}function dn(t){const e=new Map;return t&&Ua(t,e),e}function un(t){const e=new Map;return t&&Xa(t,e,{nextOrder:0}),e}function za(t,e){for(const r of t)for(const[n,a]of Object.entries(r)){if(n===":@"||n==="#text"||!Array.isArray(a))continue;const i=a;if(n==="p:sp"){const o=pn(i),s=Tt(i,"p:txBody");o&&s&&e.set(o,s)}za(i,e)}}function Ua(t,e){for(const r of t)for(const[n,a]of Object.entries(r)){if(n===":@"||n==="#text"||!Array.isArray(a))continue;const i=a;if(n==="p:sp"){const o=pn(i);o&&e.set(o,i)}Ua(i,e)}}function Xa(t,e,r){for(const n of t)for(const[a,i]of Object.entries(n)){if(a===":@"||a==="#text"||!Array.isArray(i))continue;const o=i,s=qo(a,o);s&&(e.set(s,r.nextOrder),r.nextOrder+=1),Xa(o,e,r)}}function pn(t){const e=Tt(t,"p:nvSpPr"),r=e?hn(e,"p:cNvPr"):void 0,n=fn(r);return(n==null?void 0:n.id)!=null?String(n.id):void 0}function qo(t,e){switch(t){case"p:sp":return pn(e);case"p:pic":return Pe(e,"p:nvPicPr");case"p:graphicFrame":return Pe(e,"p:nvGraphicFramePr");case"p:cxnSp":return Pe(e,"p:nvCxnSpPr");case"p:grpSp":return Pe(e,"p:nvGrpSpPr");default:return}}function Pe(t,e){const r=Tt(t,e),n=r?hn(r,"p:cNvPr"):void 0,a=fn(n);return(a==null?void 0:a.id)!=null?String(a.id):void 0}function Tt(t,e){const r=hn(t,e);if(!r)return;const n=r[e];return Array.isArray(n)?n:void 0}function Ya(t,e){const r=[];for(const n of t){const a=n[e];Array.isArray(a)&&r.push(a)}return r}function hn(t,e){return t.find(r=>Object.prototype.hasOwnProperty.call(r,e))}function fn(t){return X(t==null?void 0:t[":@"])}function _o(t,e){var i;const r=Qt(t,["p:nvGrpSpPr","p:cNvPr"]),n=Ka((i=t["p:grpSpPr"])==null?void 0:i["a:xfrm"],e.group,r||$t("group")),a={...e,group:{...n,fill:ei(t["p:grpSpPr"],e)}};return je(t,a,false)}function Wo(t,e){var $,q,V,Z,st,bt,dt,tt,At,ct;const r=lc(($=t["p:nvSpPr"])==null?void 0:$["p:nvPr"]),n=sc(t),a=n?e.orderedShapeNodes.get(n):void 0,i=a?Tt(a,"p:spPr"):void 0,o=si(t["p:txBody"]),s=Kt((q=t["p:spPr"])==null?void 0:q["a:xfrm"],e.group),d=dr(t["p:spPr"],e.theme,e.colorMap),l=Ht(t["p:spPr"],e.theme,e.colorMap,void 0,ti(e)),u=Re((V=t["p:spPr"])==null?void 0:V["a:ln"],e.theme,e.colorMap),f=xn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),m=ai(l)?ui(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme):void 0,h=d?void 0:vn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),g=Cs(t["p:style"],e.theme,e.colorMap,o),x=((st=(Z=t["p:nvSpPr"])==null?void 0:Z["p:cNvSpPr"])==null?void 0:st.txBox)==="1",F=wn(e.placeholderSources,r),y=F?void 0:Is(e.textStyles,r,x),S=(r==null?void 0:r.type)==="title"||(r==null?void 0:r.type)==="ctrTitle",k=!F||!S&&!dc(F,e.theme),w=ii(t["p:txBody"],e,n?e.orderedTextFrames.get(n):void 0,g,void 0,y,r!=null,k),T=oe((dt=(bt=t["p:nvSpPr"])==null?void 0:bt["p:cNvPr"])==null?void 0:dt["a:hlinkClick"],e),N=(tt=t["p:spPr"])==null?void 0:tt["a:prstGeom"],I=Vo((At=t["p:spPr"])==null?void 0:At["a:custGeom"],i?Tt(i,"a:custGeom"):void 0),C=Jo(N,e)??I,M=(C==null?void 0:C.type)==="custom",H=typeof(N==null?void 0:N.prst)=="string"?N.prst:M?"customGeom":"rect",z=M?"unknown":Ds(H),Y=Zo(X((ct=t["p:spPr"])==null?void 0:ct["a:xfrm"]),X(t["p:txXfrm"]),e.group),D=Wt(t,e.orderedNodeOrders),P=Qt(t,["p:nvSpPr","p:cNvPr"])??H,j={id:$t("shape"),name:P,transform:s.transform,fill:Pr(l,m),line:Ge(u.line,f==null?void 0:f.line,u.hasLine),shadow:h??d,placeholder:r,order:D,groupPath:[...e.group.groupPath],...T},O=x?{...j,kind:"text",textFrame:w.frame??di(e.theme,g,o)}:z==="unknown"&&!M?{...j,kind:"unsupported",unsupportedType:H,label:"Unsupported shape"}:{...j,kind:"shape",shapeType:z,geometry:C,textBounds:Y,textFrame:w.frame};return!x&&z==="unknown"&&!M&&e.warnings.push(`Unsupported shape ${P} (${H}).`),{item:O,placeholderKey:r?Yr(r):void 0,hasTransform:s.hasTransform,hasText:w.hasText,hasFill:l.hasFill||(m==null?void 0:m.hasFill)===true,hasLine:u.hasLine||(f==null?void 0:f.hasLine)===true,textFrameStyleFlags:w.styleFlags}}function Jo(t,e){if(!t||typeof t.prst!="string")return;const r=Ko(t["a:avLst"],e);return{type:"preset",preset:String(t.prst),adjustments:r}}function Vo(t,e){var s;if(!t&&!e)return;const r=e?Tt(e,"a:pathLst"):void 0,n=r?Ya(r,"a:path"):[],a=U((s=t==null?void 0:t["a:pathLst"])==null?void 0:s["a:path"]),i=Math.max(a.length,n.length),o=Array.from({length:i},(d,l)=>Go(a[l],n[l])).filter(d=>!!d);if(o.length)return{type:"custom",paths:o}}function Go(t,e){if(!t&&!e)return;const r=[];if(e)for(const n of e)for(const[a,i]of Object.entries(n)){if(a===":@"||a==="#text"||!Array.isArray(i))continue;const o=i;switch(a){case"a:moveTo":{const s=Oe(o)[0];s&&r.push({type:"M",...s});break}case"a:lnTo":{const s=Oe(o)[0];s&&r.push({type:"L",...s});break}case"a:quadBezTo":{const s=Oe(o);s.length>=2&&r.push({type:"Q",x1:s[0].x,y1:s[0].y,x:s[1].x,y:s[1].y});break}case"a:cubicBezTo":{const s=Oe(o);s.length>=3&&r.push({type:"C",x1:s[0].x,y1:s[0].y,x2:s[1].x,y2:s[1].y,x:s[2].x,y:s[2].y});break}case"a:close":r.push({type:"Z"});break}}else{for(const n of U(t==null?void 0:t["a:moveTo"])){const a=De(n==null?void 0:n["a:pt"]);a&&r.push({type:"M",...a})}for(const n of U(t==null?void 0:t["a:lnTo"])){const a=De(n==null?void 0:n["a:pt"]);a&&r.push({type:"L",...a})}for(const n of U(t==null?void 0:t["a:quadBezTo"])){const a=U(n==null?void 0:n["a:pt"]).map(i=>De(i)).filter(i=>!!i);a.length>=2&&r.push({type:"Q",x1:a[0].x,y1:a[0].y,x:a[1].x,y:a[1].y})}for(const n of U(t==null?void 0:t["a:cubicBezTo"])){const a=U(n==null?void 0:n["a:pt"]).map(i=>De(i)).filter(i=>!!i);a.length>=3&&r.push({type:"C",x1:a[0].x,y1:a[0].y,x2:a[1].x,y2:a[1].y,x:a[2].x,y:a[2].y})}(t==null?void 0:t["a:close"])!=null&&r.push({type:"Z"})}if(r.length)return{width:Math.max(B(t==null?void 0:t.w,0),1),height:Math.max(B(t==null?void 0:t.h,0),1),fill:(t==null?void 0:t.fill)==="none"?"none":"norm",stroke:(t==null?void 0:t.stroke)==="0"||(t==null?void 0:t.stroke)==="false"||(t==null?void 0:t.stroke)==="none"?"none":"norm",commands:r}}function Oe(t){const e=[];for(const r of t){if(!Object.prototype.hasOwnProperty.call(r,"a:pt"))continue;const n=fn(r);n&&e.push({x:B(n.x,0),y:B(n.y,0)})}return e}function De(t){if(t)return{x:B(t.x,0),y:B(t.y,0)}}function Zo(t,e,r){if(!t||!e)return;const n=Kt(t,r).transform,a=Kt(e,r).transform;if(n.width<=0||n.height<=0||a.width<=0||a.height<=0)return;const i=a.x-n.x,o=a.y-n.y,s=n.width-i-a.width,d=n.height-o-a.height;if(![i,o,s,d].every(Number.isFinite))return;const l=n.width*.5,u=n.height*.5;if(!(i<-l||s<-l||o<-u||d<-u))return{left:Number(Math.max(i,0).toFixed(3)),top:Number(Math.max(o,0).toFixed(3)),right:Number(Math.max(s,0).toFixed(3)),bottom:Number(Math.max(d,0).toFixed(3))}}function Ko(t,e){if(!t)return{};const r=new Map;for(const u of U(t["a:gd"])){const f=typeof(u==null?void 0:u.name)=="string"?u.name:void 0,m=typeof(u==null?void 0:u.fmla)=="string"?u.fmla.trim():"";!f||!m||r.set(f,m)}const n={},a=new Map,i=new Set,o=new Set,s=(u,f)=>{const m=`${u}:${f}`;o.has(m)||(o.add(m),e.warnings.push(`Unsupported geometry adjustment formula: ${f}.`))},d=u=>{const f=a.get(u);if(f!=null)return f;const m=r.get(u);if(!m)return;if(i.has(u)){s(u,m);return}i.add(u);const h=es(m,l);if(i.delete(u),h==null){s(u,m);return}return a.set(u,h),n[u]=h,h},l=u=>{if(Qo.test(u)){const m=Number(u);return Number.isFinite(m)?yt(m):void 0}const f=ts[u];return f??d(u)};for(const u of r.keys())d(u);return n}const qa=6e4,Qo=/^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/,ts={cd2:108e5,cd4:54e5,cd8:27e5,"3cd4":162e5,"3cd8":81e5,"5cd8":135e5,"7cd8":189e5};function es(t,e){const[r,...n]=t.trim().split(/\s+/);if(!r)return;const a=o=>{const s=n[o];return typeof s=="string"?e(s):void 0},i=(...o)=>{const s=o.map(d=>a(d));return s.every(d=>d!=null)?s:void 0};switch(r.toLowerCase()){case"val":return n.length!==1?void 0:a(0);case"+-":{const o=i(0,1,2);return o?yt(o[0]+o[1]-o[2]):void 0}case"*/":{const o=i(0,1,2);return o?_n(o[0]*o[1],o[2]):void 0}case"+/":{const o=i(0,1,2);return o?_n(o[0]+o[1],o[2]):void 0}case"?:":{const o=i(0,1,2);return o?yt(o[0]>0?o[1]:o[2]):void 0}case"abs":{const o=a(0);return o==null?void 0:yt(Math.abs(o))}case"at2":{const o=i(0,1);return o?yt(Math.atan2(o[1],o[0])*180*qa/Math.PI):void 0}case"cat2":{const o=i(0,1,2);return o?Wn(o[0],o[1],o[2],"adjacent"):void 0}case"cos":{const o=i(0,1);return o?yt(o[0]*Math.cos(wr(o[1]))):void 0}case"max":{const o=i(0,1);return o?yt(Math.max(o[0],o[1])):void 0}case"min":{const o=i(0,1);return o?yt(Math.min(o[0],o[1])):void 0}case"mod":{const o=i(0,1,2);return o?yt(Math.hypot(o[0],o[1],o[2])):void 0}case"pin":{const o=i(0,1,2);return o?yt(Math.min(Math.max(o[1],o[0]),o[2])):void 0}case"sat2":{const o=i(0,1,2);return o?Wn(o[0],o[1],o[2],"opposite"):void 0}case"sin":{const o=i(0,1);return o?yt(o[0]*Math.sin(wr(o[1]))):void 0}case"sqrt":{const o=a(0);return o==null?void 0:yt(Math.sqrt(Math.max(0,o)))}case"tan":{const o=i(0,1);return o?yt(o[0]*Math.tan(wr(o[1]))):void 0}default:return}}function _n(t,e){return Math.abs(e)<1e-9?0:yt(t/e)}function Wn(t,e,r,n){const a=Math.hypot(e,r);return a<1e-9?0:yt(t*(n==="adjacent"?e:r)/a)}function wr(t){return t/qa*Math.PI/180}function yt(t){if(!Number.isFinite(t))return 0;const e=Math.round(t);if(Math.abs(t-e)<1e-6)return e;const r=Number(t.toFixed(6));return Object.is(r,-0)?0:r}function rs(t,e){var l,u,f,m;const r=Kt((l=t["p:spPr"])==null?void 0:l["a:xfrm"],e.group),n=Re((u=t["p:spPr"])==null?void 0:u["a:ln"],e.theme,e.colorMap),a=dr(t["p:spPr"],e.theme,e.colorMap),i=xn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),o=a?void 0:vn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),s=oe((m=(f=t["p:nvCxnSpPr"])==null?void 0:f["p:cNvPr"])==null?void 0:m["a:hlinkClick"],e);return{item:{id:$t("connector"),name:Qt(t,["p:nvCxnSpPr","p:cNvPr"])??"connector",kind:"shape",shapeType:"line",transform:r.transform,fill:{type:"none"},line:Ge(n.line,i==null?void 0:i.line,n.hasLine),shadow:o??a,order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],...s},hasTransform:r.hasTransform,hasText:false,hasFill:false,hasLine:n.hasLine||(i==null?void 0:i.hasLine)===true}}function ns(t,e){var y,S,k,w,T,N,I,C,M;const r=Kt((y=t["p:spPr"])==null?void 0:y["a:xfrm"],e.group),n=ri((S=t["p:blipFill"])==null?void 0:S["a:srcRect"]),a=ni(X((k=t["p:blipFill"])==null?void 0:k["a:blip"])),i=dr(t["p:spPr"],e.theme,e.colorMap),o=Ht(t["p:spPr"],e.theme,e.colorMap,void 0,e),s=Re((w=t["p:spPr"])==null?void 0:w["a:ln"],e.theme,e.colorMap),d=xn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),l=ai(o)?ui(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme):void 0,u=i?void 0:vn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),f=oe((N=(T=t["p:nvPicPr"])==null?void 0:T["p:cNvPr"])==null?void 0:N["a:hlinkClick"],e),m=Qt(t,["p:nvPicPr","p:cNvPr"])??"image",h=(C=(I=t["p:blipFill"])==null?void 0:I["a:blip"])==null?void 0:C["r:embed"],g=Vr(h,[nt.image],e,`poster image for ${m}`),x=wc((M=t["p:nvPicPr"])==null?void 0:M["p:nvPr"],e,m);if(x!=null&&x.mediaId)return{item:{id:$t("media"),name:m,kind:"media",mediaType:x.mediaType,transform:r.transform,fill:Pr(o,l),line:Ge(s.line,d==null?void 0:d.line,s.hasLine),shadow:u??i,order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],mediaId:x.mediaId,posterMediaId:g,crop:n,opacity:a,...f},hasTransform:r.hasTransform,hasText:false,hasFill:o.hasFill||(l==null?void 0:l.hasFill)===true,hasLine:s.hasLine||(d==null?void 0:d.hasLine)===true};const F={id:$t("image"),name:m,kind:"image",transform:r.transform,fill:Pr(o,l),line:Ge(s.line,d==null?void 0:d.line,s.hasLine),shadow:u??i,order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],mediaId:g??"",crop:n,opacity:a,...f};return g||e.warnings.push(`Image ${m} has no media reference.`),{item:F,hasTransform:r.hasTransform,hasText:false,hasFill:o.hasFill||(l==null?void 0:l.hasFill)===true,hasLine:s.hasLine||(d==null?void 0:d.hasLine)===true}}function as(t,e){var i,o,s,d,l;if((o=(i=t["a:graphic"])==null?void 0:i["a:graphicData"])!=null&&o["a:tbl"])return[ls(t,e)];const r=(s=t["a:graphic"])==null?void 0:s["a:graphicData"];if((r==null?void 0:r.uri)==="http://schemas.openxmlformats.org/drawingml/2006/chart"){const u=is(t,r,e);if(u)return[u]}if((r==null?void 0:r.uri)==="http://schemas.openxmlformats.org/drawingml/2006/diagram"){const u=ds(t,r,e);if(u.length)return u}const n=oe((l=(d=t["p:nvGraphicFramePr"])==null?void 0:d["p:cNvPr"])==null?void 0:l["a:hlinkClick"],e),a={id:$t("unsupported"),name:Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??"graphic-frame",kind:"unsupported",unsupportedType:"graphicFrame",label:"Unsupported graphic frame",transform:Kt(t["p:xfrm"],e.group).transform,fill:{type:"none"},order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],...n};return e.warnings.push(`Unsupported graphic frame ${a.name??a.id}.`),[{item:a,hasTransform:true,hasText:false,hasFill:false,hasLine:false}]}function is(t,e,r){var w,T,N,I,C,M,H,z,Y,D,P,j,O,$;const n=(w=e["c:chart"])==null?void 0:w["r:id"],a=typeof n=="string"?r.relationships[n]:void 0;if(!a||a.type!==nt.chart)return;const i=r.chartSpaces[a.target],o=i==null?void 0:i["c:chart"],s=o==null?void 0:o["c:plotArea"],d=U(s==null?void 0:s["c:barChart"])[0],l=U(s==null?void 0:s["c:pieChart"])[0],u=d??l;if(!o||!s||!u||d&&String(((T=d["c:barDir"])==null?void 0:T.val)??"col")!=="col")return;const f=d?"column":"pie",m=U(u["c:ser"]).slice(0,f==="pie"?1:void 0),h=_a((N=m[0])==null?void 0:N["c:cat"]),g=m.map((q,V)=>{var At;const Z=Ht(q["c:spPr"],r.theme,r.colorMap).fill,st=os(q["c:val"]),bt=Or(Z)??Nr(`accent${V%6+1}`,r.theme.colors,r.colorMap),dt=Dr(Z),tt=f==="pie"?st.map((ct,et)=>{var ut;return{color:["0","false"].includes(String(((ut=u["c:varyColors"])==null?void 0:ut.val)??"1"))?bt:Nr(`accent${et%6+1}`,r.theme.colors,r.colorMap),alpha:dt}}):void 0;for(const ct of U(q["c:dPt"])){const et=be((At=ct["c:idx"])==null?void 0:At.val);if(!tt||et==null||!Number.isInteger(et)||!tt[et])continue;const ut=Ht(ct["c:spPr"],r.theme,r.colorMap);ut.hasFill&&(tt[et]={color:Or(ut.fill)??tt[et].color,alpha:ut.fill.type==="none"?0:Dr(ut.fill)})}return{name:Jn(q["c:tx"])??`Series ${V+1}`,values:st,color:bt,alpha:dt,pointStyles:tt}});if(!g.length||!g.some(q=>q.values.some(V=>V!=null)))return;const x=U(s["c:valAx"])[0],F=x?{min:be((C=(I=x["c:scaling"])==null?void 0:I["c:min"])==null?void 0:C.val),max:be((H=(M=x["c:scaling"])==null?void 0:M["c:max"])==null?void 0:H.val),majorUnit:be((z=x["c:majorUnit"])==null?void 0:z.val),formatCode:typeof((Y=x["c:numFmt"])==null?void 0:Y.formatCode)=="string"?String(x["c:numFmt"].formatCode):void 0}:void 0,y=Kt(t["p:xfrm"],r.group),S=oe((P=(D=t["p:nvGraphicFramePr"])==null?void 0:D["p:cNvPr"])==null?void 0:P["a:hlinkClick"],r),k={id:$t("chart"),name:Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??"chart",kind:"chart",chartType:f,grouping:ss((j=u["c:grouping"])==null?void 0:j.val),firstSliceAngle:f==="pie"?be((O=u["c:firstSliceAng"])==null?void 0:O.val)??0:void 0,title:Jn(($=o["c:title"])==null?void 0:$["c:tx"]),categories:h,series:g,legendPosition:cs(o["c:legend"]),valueAxis:F,transform:y.transform,fill:{type:"none"},order:Wt(t,r.orderedNodeOrders),groupPath:[...r.group.groupPath],...S};return{item:k,hasTransform:y.hasTransform,hasText:!!k.title,hasFill:false,hasLine:false}}function Jn(t){var n,a;if(!t)return;const e=U((n=t["c:rich"])==null?void 0:n["a:p"]).flatMap(i=>[...U(i["a:r"]).map(o=>String((o==null?void 0:o["a:t"])??"")),...U(i["a:fld"]).map(o=>String((o==null?void 0:o["a:t"])??""))]).join("").trim();return e||((a=_a(t).find(i=>i.trim()))==null?void 0:a.trim())}function _a(t){const e=Wa(t);return Ja(e).map(r=>r??"")}function os(t){const e=Wa(t);return Ja(e).map(r=>{if(r==null||r.trim()==="")return null;const n=Number(r);return Number.isFinite(n)?n:null})}function Wa(t){var e,r;if(t)return((e=t["c:strRef"])==null?void 0:e["c:strCache"])??((r=t["c:numRef"])==null?void 0:r["c:numCache"])??t["c:strLit"]??t["c:numLit"]}function Ja(t){var a;if(!t)return[];const e=U(t["c:pt"]),r=Math.max(0,B((a=t["c:ptCount"])==null?void 0:a.val,0),...e.map(i=>B(i==null?void 0:i.idx,-1)+1)),n=Array(r).fill(null);for(const i of e){const o=B(i==null?void 0:i.idx,-1);o>=0&&o<n.length&&(n[o]=(i==null?void 0:i["c:v"])==null?null:String(i["c:v"]))}return n}function be(t){const e=Number(t);return Number.isFinite(e)?e:void 0}function ss(t){switch(String(t??"clustered")){case"stacked":return"stacked";case"percentStacked":return"percentStacked";default:return"clustered"}}function cs(t){var e,r;if(!t||((e=t["c:delete"])==null?void 0:e.val)==="1")return"none";switch(String(((r=t["c:legendPos"])==null?void 0:r.val)??"right")){case"t":return"top";case"b":return"bottom";case"l":return"left";case"r":case"tr":default:return"right"}}function ls(t,e){var m,h,g,x,F;const r=(h=(m=t["a:graphic"])==null?void 0:m["a:graphicData"])==null?void 0:h["a:tbl"],n=X(r==null?void 0:r["a:tblPr"]),a=Kt(t["p:xfrm"],e.group),i=oe((x=(g=t["p:nvGraphicFramePr"])==null?void 0:g["p:cNvPr"])==null?void 0:x["a:hlinkClick"],e),o=U((F=r["a:tblGrid"])==null?void 0:F["a:gridCol"]).map(y=>J(B(y.w,0))),s=U(r["a:tr"]),d=s.map(y=>J(B(y.h,0))),l=zs(n,e.tableStyles),u=[];return s.forEach((y,S)=>{var w,T,N;let k=0;for(const I of U(y["a:tc"])){const C=X(I["a:tcPr"]),M=Math.max(1,B(I.rowSpan??(C==null?void 0:C.rowSpan),1)),H=Math.max(1,B(I.gridSpan??(C==null?void 0:C.gridSpan),1)),z=I.hMerge==="1"||I.vMerge==="1"||(C==null?void 0:C.hMerge)==="1"||(C==null?void 0:C.vMerge)==="1",Y=si(I["a:txBody"]),D=Us(l,n,S,k,M,H,s.length,o.length,e,Y),P=Ns(e.textStyles.other,(w=D.textStyle)==null?void 0:w.paragraphAlign),j=_t(ci(P,0).run,((T=D.textStyle)==null?void 0:T.run)??{}),O=Ht(C,e.theme,e.colorMap,void 0,e),$=Zs(C,e.theme,e.colorMap),q=ii(I["a:txBody"],e,void 0,((N=D.textStyle)==null?void 0:N.run)??{},void 0,P),V=q.styleFlags.verticalAlign||(C==null?void 0:C.anchor)!=null,Z=Gs(Js(Vs(q.frame??di(e.theme,j,Y),C),j),V);u.push({row:S,column:k,rowSpan:M,colSpan:H,isMergedContinuation:z,fill:O.hasFill?O.fill:D.fill??{type:"none"},borders:Ws(_s(D.borders,S,k,s.length,o.length),$),textFrame:Z}),k+=H>1||z?1:H}}),{item:{id:$t("table"),name:Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??"table",kind:"table",transform:a.transform,fill:{type:"none"},order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],...i,columns:o,rows:d,cells:u},hasTransform:a.hasTransform,hasText:u.some(y=>Zt(y.textFrame)),hasFill:false,hasLine:false}}function ds(t,e,r){const n=e["dgm:relIds"],a=typeof(n==null?void 0:n["r:dm"])=="string"?String(n["r:dm"]):void 0;if(!a)return[];const i=r.relationships[a];if(!i||i.type!==nt.diagramData)return[];const o=r.diagramDataModels[i.target],s=Va(o);if(!s)return[];const d=r.relationships[s];if(!d||d.type!==nt.diagramDrawing)return[];const l=r.diagramDrawings[d.target],u=l==null?void 0:l["dsp:spTree"];if(!u)return[];const f=hs(u),m=Wt(t,r.orderedNodeOrders),h=Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??$t("diagram"),g={...r,inDiagram:true,group:Ka(t["p:xfrm"],r.group,h)};return je(f,g).map((x,F)=>({...x,item:{...x.item,order:m+F/1e3}}))}async function us(t,e){const r={},n={},a=Object.values(e).filter(i=>i.type===nt.diagramData);for(const i of a){if(!(i.target in r)){const l=await It(t,i.target);r[i.target]=(l==null?void 0:l["dgm:dataModel"])??null}const o=Va(r[i.target]);if(!o)continue;const s=e[o];if(!s||s.type!==nt.diagramDrawing||s.target in n)continue;const d=await It(t,s.target);n[s.target]=(d==null?void 0:d["dsp:drawing"])??null}return{dataModels:r,drawings:n}}async function ps(t,e){const r={},n=Object.values(e).filter(a=>a.type===nt.chart);for(const a of n){const i=await It(t,a.target);r[a.target]=(i==null?void 0:i["c:chartSpace"])??null}return r}function Va(t){const e=Ga(t,"dsp:dataModelExt");return typeof(e==null?void 0:e.relId)=="string"?String(e.relId):void 0}function Ga(t,e){if(!t||typeof t!="object")return;if(!Array.isArray(t)&&e in t)return X(t[e]);const r=Array.isArray(t)?t:Object.values(t);for(const n of r){const a=Ga(n,e);if(a)return a}}function hs(t){return Br(t,"dsp:","p:")}function te(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function He(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function fs(t,e){return{a:t,b:0,c:0,d:e,e:0,f:0}}function ms(t,e){return{a:t?-1:1,b:0,c:0,d:e?-1:1,e:0,f:0}}function gs(t){const e=t*Math.PI/180,r=Math.cos(e),n=Math.sin(e);return{a:r,b:n,c:-n,d:r,e:0,f:0}}function Za(t,e,r){return{x:t.a*e+t.c*r+t.e,y:t.b*e+t.d*r+t.f}}function Br(t,e,r){if(Array.isArray(t))return t.map(i=>Br(i,e,r));if(!t||typeof t!="object")return t;const n=t,a={};for(const[i,o]of Object.entries(n)){const s=i.startsWith(e)?`${r}${i.slice(e.length)}`:i;a[s]=Br(o,e,r)}return a}function Kt(t,e){if(!t)return{transform:{x:e.offsetX,y:e.offsetY,width:0,height:0,rotation:e.rotation,flipH:false,flipV:false},hasTransform:false};const r=t["a:off"]??t.off,n=t["a:ext"]??t.ext,a=J(B(r==null?void 0:r.x,0)),i=J(B(r==null?void 0:r.y,0)),o=J(B(n==null?void 0:n.cx,0)),s=J(B(n==null?void 0:n.cy,0)),d=o*e.scaleX,l=s*e.scaleY,u=Za(e.matrix,a+o/2,i+s/2);return{transform:{x:u.x-d/2,y:u.y-l/2,width:d,height:l,rotation:sr(B(t.rot,0))+e.rotation,flipH:t.flipH==="1"!==e.flipH,flipV:t.flipV==="1"!==e.flipV},hasTransform:true}}function Ka(t,e,r){return Qa(t,e,r,true)}function Qa(t,e,r,n=true){if(!t)return{...e,groupPath:n&&r?[...e.groupPath,r]:[...e.groupPath]};const a=t["a:off"],i=t["a:ext"],o=t["a:chOff"],s=t["a:chExt"],d=J(B(a==null?void 0:a.x,0)),l=J(B(a==null?void 0:a.y,0)),u=i?J(B(i.cx,0)):void 0,f=i?J(B(i.cy,0)):void 0,m=o?J(B(o.x,0)):0,h=o?J(B(o.y,0)):0,g=s?J(B(s.cx,0)):u,x=s?J(B(s.cy,0)):f,F=u===void 0||g===void 0||g===0?1:u/g,y=f===void 0||x===void 0||x===0?1:f/x,S=sr(B(t.rot,0)),k=t.flipH==="1",w=t.flipV==="1",T=d+(u??0)/2,N=l+(f??0)/2,I=te(te(te(te(te(He(T,N),gs(S)),ms(k,w)),He(-T,-N)),He(d,l)),te(fs(F,y),He(-m,-h))),C=te(e.matrix,I),M=Za(C,0,0);return{offsetX:M.x,offsetY:M.y,scaleX:e.scaleX*F,scaleY:e.scaleY*y,rotation:e.rotation+S,flipH:e.flipH!==k,flipV:e.flipV!==w,matrix:C,fill:e.fill,groupPath:n&&r?[...e.groupPath,r]:[...e.groupPath]}}function ti(t){return{relationships:t.relationships,warnings:t.warnings,slidePath:t.slidePath,groupFill:t.group.fill?xt(t.group.fill):void 0}}function ei(t,e){const r=Ht(t,e.theme,e.colorMap,void 0,ti(e));return r.hasFill?xt(r.fill):e.group.fill?xt(e.group.fill):void 0}function Ht(t,e,r,n,a){if(!t)return{fill:{type:"none"},hasFill:false};if(t["a:grpFill"]!==void 0)return{fill:a!=null&&a.groupFill?xt(a.groupFill):{type:"none"},hasFill:true};if(t["a:noFill"]!==void 0)return{fill:{type:"none"},hasFill:true};const i=t["a:solidFill"];if(i){const l=Ft(i,e,r,n);return{fill:{type:"solid",color:l.color,alpha:l.alpha},hasFill:true}}const o=t["a:blipFill"];if(o){const l=xs(o,a);if(l)return{fill:l,hasFill:true}}const s=t["a:pattFill"];if(s){const l=vs(s,e,r,n);if(l)return{fill:l,hasFill:true}}const d=t["a:gradFill"];if(d){const l=bs(d,e,r,n);if(l)return{fill:l,hasFill:true}}return{fill:{type:"none"},hasFill:false}}function Re(t,e,r,n){var i,o,s;if(!t)return{line:void 0,hasLine:false};if(t["a:noFill"]!==void 0)return{line:void 0,hasLine:true};const a=Ht(t,e,r,n);return{line:{color:Or(a.fill),alpha:Dr(a.fill),width:J(B(t.w,0)),dash:(i=t["a:prstDash"])!=null&&i.val?String(t["a:prstDash"].val):void 0,compound:tc(t.cmpd),lineCap:Qs(t.cap),lineJoin:ec(t),miterLimit:rc(t),headEnd:ea((o=t["a:headEnd"])==null?void 0:o.type),tailEnd:ea((s=t["a:tailEnd"])==null?void 0:s.type)},hasLine:true}}function Ge(t,e,r){if(r){if(!t)return;if(!e)return t;const n={...e};for(const[a,i]of Object.entries(t))i!==void 0&&(n[String(a)]=i);return n}return e}function dr(t,e,r,n){var u;const a=((u=t==null?void 0:t["a:effectLst"])==null?void 0:u["a:outerShdw"])??(t==null?void 0:t["a:outerShdw"]);if(!a)return;const i=Ft(a,e,r,n),o=sr(B(a.dir,0)),s=J(B(a.dist,0)),d=J(B(a.blurRad,0)),l=ys(s,o);return{color:i.color,alpha:i.alpha,blur:d,distance:s,angle:o,offsetX:l.x,offsetY:l.y}}function ys(t,e){const r=e*Math.PI/180;return{x:Number((Math.cos(r)*t).toFixed(3)),y:Number((Math.sin(r)*t).toFixed(3))}}function ri(t){if(!t)return;const e={left:gt(B(t.l,0)/1e5,0,1),right:gt(B(t.r,0)/1e5,0,1),top:gt(B(t.t,0)/1e5,0,1),bottom:gt(B(t.b,0)/1e5,0,1)};return e.left||e.right||e.top||e.bottom?e:void 0}function ni(t){if(!t)return;let e=1,r=false;const n=X(t["a:alpha"])??X(t.alpha);(n==null?void 0:n.amt)!=null&&(e=gt(B(n.amt,1e5)/1e5,0,1),r=true);const a=X(t["a:alphaMod"])??X(t.alphaMod);(a==null?void 0:a.amt)!=null&&(e*=gt(B(a.amt,1e5)/1e5,0,1),r=true);const i=X(t["a:alphaModFix"])??X(t.alphaModFix);(i==null?void 0:i.amt)!=null&&(e*=gt(B(i.amt,1e5)/1e5,0,1),r=true);const o=X(t["a:alphaOff"])??X(t.alphaOff);return(o==null?void 0:o.amt)!=null&&(e+=B(o.amt,0)/1e5,r=true),r?gt(e,0,1):void 0}function xs(t,e){if(!t||!e)return;const r=t["a:blip"],n=r==null?void 0:r["r:embed"],a=r==null?void 0:r["r:link"],i=n??a;if(!i){e.warnings.push(`Picture fill in ${e.slidePath} has no image relationship.`);return}const o=e.relationships[i];if(!o){e.warnings.push(`Missing image relationship ${i} in ${e.slidePath}.`);return}if(o.type!==nt.image||o.targetMode==="External"){e.warnings.push(`Unsupported picture fill relationship ${i} in ${e.slidePath}.`);return}return{type:"picture",mediaId:o.target,crop:ri(t["a:srcRect"]),tile:t["a:tile"]!==void 0,alpha:ni(r)}}function vs(t,e,r,n){if(!t)return;const a=t["a:fgClr"]?Ft(t["a:fgClr"],e,r,n):void 0,i=t["a:bgClr"]?Ft(t["a:bgClr"],e,r,n):void 0;return{type:"pattern",pattern:typeof t.prst=="string"?t.prst:"pct5",foregroundColor:(a==null?void 0:a.color)??e.colors.dk1,foregroundAlpha:a==null?void 0:a.alpha,backgroundColor:(i==null?void 0:i.color)??e.colors.lt1,backgroundAlpha:i==null?void 0:i.alpha}}function ai(t){return!t.hasFill||t.fill.type==="pattern"}function Pr(t,e){return t.fill.type==="pattern"&&(e!=null&&e.hasFill)?e.fill:(e==null?void 0:e.fill)??t.fill}function Ft(t,e,r,n){var u,f,m,h,g;const a=t["a:srgbClr"],i=t["a:schemeClr"],o=t["a:sysClr"];let s="#000000",d,l;if(a!=null&&a.val?(s=`#${String(a.val)}`.toUpperCase(),l=a):i!=null&&i.val?(String(i.val)==="phClr"&&n?(s=n.color,d=n.alpha):s=Nr(String(i.val),e.colors,r),l=i):o!=null&&o.lastClr&&(s=`#${String(o.lastClr)}`.toUpperCase(),l=o),(u=l==null?void 0:l["a:shade"])!=null&&u.val&&(s=Rr(s,B(l["a:shade"].val,1e5)/1e5)),(f=l==null?void 0:l["a:lumMod"])!=null&&f.val&&(s=Lo(s,B(l["a:lumMod"].val,1e5)/1e5)),(m=l==null?void 0:l["a:lumOff"])!=null&&m.val&&(s=Mo(s,B(l["a:lumOff"].val,0)/1e5)),(h=l==null?void 0:l["a:tint"])!=null&&h.val){const x=gt(B(l["a:tint"].val,0)/1e5,0,1);s=qe(s,1-x)}return{color:s,alpha:(g=l==null?void 0:l["a:alpha"])!=null&&g.val?B(l["a:alpha"].val,1e5)/1e5:d}}function bs(t,e,r,n){var s;const a=U((s=t["a:gsLst"])==null?void 0:s["a:gs"]).map(d=>{const l=Ft(d,e,r,n);return{position:gt(B(d==null?void 0:d.pos,0)/1e5,0,1),color:l.color,alpha:l.alpha}}).sort((d,l)=>d.position-l.position);if(!a.length)return;if(a.length===1)return{type:"solid",color:a[0].color,alpha:a[0].alpha};const i=t["a:lin"],o=t["a:path"];return{type:"gradient",angle:sr(B(i==null?void 0:i.ang,0)),gradientType:o?"path":"linear",gradientPath:o!=null&&o.path?String(o.path):void 0,gradientFillToRect:Vn(o==null?void 0:o["a:fillToRect"]),gradientTileRect:Vn(t["a:tileRect"]),stops:a}}function Vn(t){if(t!=null)return{left:ze(t.l),top:ze(t.t),right:ze(t.r),bottom:ze(t.b)}}function ze(t){return Number((B(t,0)/1e5).toFixed(5))}function Or(t){var e,r;if(t.type==="solid")return t.color;if(t.type==="gradient")return(r=(e=t.stops)==null?void 0:e[0])==null?void 0:r.color;if(t.type==="pattern")return t.foregroundColor??t.backgroundColor}function Dr(t){var e,r;if(t.type==="solid")return t.alpha;if(t.type==="gradient")return(r=(e=t.stops)==null?void 0:e[0])==null?void 0:r.alpha;if(t.type==="pattern")return t.foregroundAlpha??t.backgroundAlpha}function ii(t,e,r,n={},a,i,o=false,s=true){const d=fc();if(!t)return{frame:void 0,hasText:false,styleFlags:d};const l=X(t["a:bodyPr"]);d.verticalAlign=(l==null?void 0:l.anchor)!=null,d.direction=(l==null?void 0:l.vert)!=null,d.wrap=(l==null?void 0:l.wrap)!=null,d.anchorCenter=(l==null?void 0:l.anchorCtr)!=null,d.padding.left=(l==null?void 0:l.lIns)!=null,d.padding.right=(l==null?void 0:l.rIns)!=null,d.padding.top=(l==null?void 0:l.tIns)!=null,d.padding.bottom=(l==null?void 0:l.bIns)!=null;const u=ke(t["a:lstStyle"],e,i),f=o?u:Rs(u),m=r?Ya(r,"a:p"):[],h=U(t["a:p"]).map((y,S)=>Fs(y,e,f,m[S],n,a,s)),g=ws(l);gc(l,e);const x={paragraphs:h.length?h:[{runs:[]}],verticalAlign:fi(l==null?void 0:l.anchor),direction:Hs(l==null?void 0:l.vert),wrap:mc(l==null?void 0:l.wrap),anchorCenter:Nt(l==null?void 0:l.anchorCtr),horizontalOverflow:aa(l==null?void 0:l.horzOverflow),verticalOverflow:aa(l==null?void 0:l.vertOverflow),columns:Math.max(1,B(l==null?void 0:l.numCol,1)),columnSpacing:(l==null?void 0:l.spcCol)!=null?J(B(l.spcCol,0)):void 0,rtlColumns:Nt(l==null?void 0:l.rtlCol),fromWordArt:Nt(l==null?void 0:l.fromWordArt),padding:{left:J(B(l==null?void 0:l.lIns,91440)),right:J(B(l==null?void 0:l.rIns,91440)),top:J(B(l==null?void 0:l.tIns,45720)),bottom:J(B(l==null?void 0:l.bIns,45720))},autofit:g},F=Ss(x);return{frame:F,hasText:Zt(F),styleFlags:d}}function ws(t){if(!t)return;const e=X(t["a:normAutofit"]);if(e)return{type:"normal",fontScale:Gn(e.fontScale),lineSpaceReduction:Gn(e.lnSpcReduction)};if(t["a:spAutoFit"]!==void 0)return{type:"shape"};if(t["a:noAutofit"]!==void 0)return{type:"none"}}function Gn(t){if(t==null)return;const e=B(t,NaN);if(!(!Number.isFinite(e)||e<=0))return gt(e/1e5,.01,1)}function Ss(t){const e=t.autofit;if(!e||e.type!=="normal")return t;const r=e.fontScale??1,n=e.lineSpaceReduction??0;return Math.abs(r-1)<1e-4&&n<=1e-4?t:{...t,paragraphs:t.paragraphs.map(a=>{var o;const i={...a,runs:a.runs.map(s=>({...s,fontSize:s.fontSize!=null?Number((s.fontSize*r).toFixed(3)):s.fontSize}))};return a.lineHeight!=null?a.lineHeightUnit==="px"?i.lineHeight=Number((a.lineHeight*r).toFixed(3)):i.lineHeight=Number((a.lineHeight*Math.max(.2,1-n)).toFixed(4)):n>1e-4&&(i.lineHeight=Number((1*Math.max(.2,1-n)).toFixed(4)),i.lineHeightUnit="multiple"),a.spaceBefore!=null&&(i.spaceBefore=Number((a.spaceBefore*r).toFixed(3))),a.spaceAfter!=null&&(i.spaceAfter=Number((a.spaceAfter*r).toFixed(3))),a.marginLeft!=null&&(i.marginLeft=Number((a.marginLeft*r).toFixed(3))),a.indent!=null&&(i.indent=Number((a.indent*r).toFixed(3))),(o=a.tabStops)!=null&&o.length&&(i.tabStops=a.tabStops.map(s=>Number((s*r).toFixed(3)))),i})}}function Fs(t,e,r,n,a={},i,o=true){const s=t["a:pPr"],d=(s==null?void 0:s.lvl)!=null?B(s.lvl,0):0,l=ci(r,d),u=Xr(s,e),f=_t(_t(l.run,a),u.run),m=(s==null?void 0:s["a:buNone"])!==void 0,h=n?As(t,n,e,f,o):ks(t,e,f,o);if(!h.length){const g=ur(t["a:endParaRPr"],e,void 0,o&&!f.fontFamily),x=_t(f,g);h.push({text:(t["a:endParaRPr"],""),...x,fontFamily:x.fontFamily??(o?e.theme.fonts.minor:void 0)})}return{align:u.align??l.align??i,level:(s==null?void 0:s.lvl)!=null?d:void 0,bullet:m?void 0:gn(l.bullet,u.bullet)??void 0,bulletDisabled:m||void 0,marginLeft:u.marginLeft??l.marginLeft,indent:u.indent??l.indent,spaceBefore:u.spaceBefore??l.spaceBefore,spaceAfter:u.spaceAfter??l.spaceAfter,lineHeight:u.lineHeight??l.lineHeight,lineHeightUnit:u.lineHeightUnit??l.lineHeightUnit,tabStops:u.tabStops??l.tabStops,runs:h}}function As(t,e,r,n,a){const i=[],o=U(t["a:r"]),s=U(t["a:fld"]),d=U(t["a:sym"]),l=U(t["a:br"]),u=U(t["a:tab"]),f=U(t["a:softHyphen"]),m=U(t["a:noBreakHyphen"]);let h=0,g=0,x=0,F=0,y=0,S=0,k=0;for(const w of e){if(Object.prototype.hasOwnProperty.call(w,"a:r")){const T=o[h];h+=1,T&&i.push(me(T,r,n,a));continue}if(Object.prototype.hasOwnProperty.call(w,"a:fld")){const T=s[g];g+=1,T&&i.push(me(T,r,n,a));continue}if(Object.prototype.hasOwnProperty.call(w,"a:sym")){const T=d[x];x+=1,T&&i.push(Hr(T,r,n));continue}if(Object.prototype.hasOwnProperty.call(w,"a:br")){i.push(Ct(l[F],r,n,`
3
- `,a)),F+=1;continue}if(Object.prototype.hasOwnProperty.call(w,"a:tab")){i.push(Ct(u[y],r,n," ",a)),y+=1;continue}if(Object.prototype.hasOwnProperty.call(w,"a:softHyphen")){i.push(Ct(f[S],r,n,$r,a)),S+=1;continue}Object.prototype.hasOwnProperty.call(w,"a:noBreakHyphen")&&(i.push(Ct(m[k],r,n,Ir,a)),k+=1)}for(;h<o.length;h+=1)i.push(me(o[h],r,n,a));for(;g<s.length;g+=1)i.push(me(s[g],r,n,a));for(;x<d.length;x+=1)i.push(Hr(d[x],r,n));for(;F<l.length;F+=1)i.push(Ct(l[F],r,n,`
4
- `,a));for(;y<u.length;y+=1)i.push(Ct(u[y],r,n," ",a));for(;S<f.length;S+=1)i.push(Ct(f[S],r,n,$r,a));for(;k<m.length;k+=1)i.push(Ct(m[k],r,n,Ir,a));return i}function ks(t,e,r,n){const a=[];for(const i of U(t["a:r"]))a.push(me(i,e,r,n));for(const i of U(t["a:fld"]))a.push(me(i,e,r,n));for(const i of U(t["a:sym"]))a.push(Hr(i,e,r));for(const i of U(t["a:br"]))a.push(Ct(i,e,r,`
5
- `,n));for(const i of U(t["a:tab"]))a.push(Ct(i,e,r," ",n));for(const i of U(t["a:softHyphen"]))a.push(Ct(i,e,r,$r,n));for(const i of U(t["a:noBreakHyphen"]))a.push(Ct(i,e,r,Ir,n));return a}function Hr(t,e,r){const n=typeof(t==null?void 0:t.font)=="string"?mn(t.font,e.theme,typeof(t==null?void 0:t.lang)=="string"?t.lang:void 0):r.fontFamily;return{text:typeof(t==null?void 0:t.char)=="string"?mi(t.char):"",...r,fontFamily:n??e.theme.fonts.minor}}function Ct(t,e,r,n,a=true){const i=bn(n),o=_t(r,ur(X(t==null?void 0:t["a:rPr"]),e,i,a&&!r.fontFamily));return{text:n,...o,fontFamily:o.fontFamily??(a?zt("minor",e.theme,i):void 0)}}function me(t,e,r={},n=true){const a=Ts(t,e)??(typeof t["a:t"]=="string"?t["a:t"]:""),i=X(t["a:rPr"])??t,o=bn(a),s=Ls(_t(r,ur(i,e,o,n&&!r.fontFamily)),X(i["a:hlinkClick"]),e),d=oe(i["a:hlinkClick"],e);return{text:a,...s,fontFamily:s.fontFamily??(n?zt("minor",e.theme,o):void 0),...d}}function Ts(t,e){const r=typeof t["a:t"]=="string"?t["a:t"]:void 0,n=typeof t.type=="string"?t.type.trim().toLowerCase():"",a=e.slideIndexByPath[e.slidePath];return a==null?r:(n.includes("slidenum")||n.includes("slidenumber"))&&vi((r??"").trim())?String(a+1):r}function Ls(t,e,r){return e?{...t,color:t.color??r.theme.colors.hlink??at.colors.hlink,underline:t.underline??true}:t}function ur(t,e,r,n=true){if(!t)return{};const a={},i=typeof t.lang=="string"?t.lang:r,o=t["a:solidFill"]?Ft(t["a:solidFill"],e.theme,e.colorMap):void 0,s=t["a:highlight"]?Ft(t["a:highlight"],e.theme,e.colorMap):void 0,d=Ms(t,i);return t.b!=null&&(a.bold=t.b==="1"),t.i!=null&&(a.italic=t.i==="1"),t.u!=null&&(a.underline=String(t.u)!=="none"),t.strike!=null&&(a.strike=String(t.strike)!=="noStrike"),o&&(a.color=o.color,a.colorAlpha=o.alpha),s&&(a.highlightColor=s.color,a.highlightAlpha=s.alpha),t.sz!=null&&(a.fontSize=pr(B(t.sz,1800)/100)),d!=null&&d.typeface?a.fontFamily=mn(String(d.typeface),e.theme,i):n&&i&&(a.fontFamily=zt("minor",e.theme,i)),t.baseline!=null&&(a.baselineShift=B(t.baseline,0)/1e5),a}function Ms(t,e){const r=X(t["a:latin"])??X(t.latin),n=X(t["a:ea"])??X(t.ea),a=X(t["a:cs"])??X(t.cs);if(e){const i=e.trim().toLowerCase();if(i.startsWith("zh")||i.startsWith("ja")||i.startsWith("ko"))return n??r??a;if(i.startsWith("ar")||i.startsWith("he")||i.startsWith("fa")||i.startsWith("ur"))return a??r??n}return r??n??a}function Cs(t,e,r,n){const a=t==null?void 0:t["a:fontRef"];if(!a)return;const i={},o=typeof a.idx=="string"?a.idx.trim().toLowerCase():"";return o==="major"?i.fontFamily=zt("major",e,n):o==="minor"&&(i.fontFamily=zt("minor",e,n)),(a["a:srgbClr"]||a["a:schemeClr"]||a["a:sysClr"])&&(i.color=Ft(a,e,r).color),Object.keys(i).length?i:void 0}function mn(t,e,r){const n=t.trim();return n?/^\+mj(?:-|$)/i.test(n)?Zn("major",n,e,r)??e.fonts.major??at.fonts.major??n:/^\+mn(?:-|$)/i.test(n)?Zn("minor",n,e,r)??e.fonts.minor??at.fonts.minor??n:n:e.fonts.minor??at.fonts.minor??t}function zt(t,e,r){const n=t==="major"?e.fonts.majorScripts:e.fonts.minorScripts,a=t==="major"?e.fonts.major??at.fonts.major:e.fonts.minor??at.fonts.minor,i=oi(r,"lt");return(i?n==null?void 0:n[i]:void 0)??a??at.fonts.minor??"Calibri"}function Zn(t,e,r,n){const i=e.trim().toLowerCase().replace(/^\+m[jn]-/,""),o=t==="major"?r.fonts.majorScripts:r.fonts.minorScripts,s=t==="major"?r.fonts.major:r.fonts.minor;if(i==="lt")return s??void 0;const d=oi(n,i);return(d?o==null?void 0:o[d]:void 0)??s??void 0}function oi(t,e){const r=(t??"").trim().toLowerCase();return r?r.startsWith("zh")?"Hans":r.startsWith("ja")?"Jpan":r.startsWith("ko")?"Hang":r.startsWith("ar")?"Arab":r.startsWith("he")?"Hebr":r.startsWith("th")?"Thai":Kn(e):Kn(e)}function si(t){if(!t)return;const e=zr(t);if(e)return e;const r=Ur(t);if(/[\u4E00-\u9FFF]/.test(r))return"zh-CN";if(/[\u3040-\u30FF]/.test(r))return"ja-JP";if(/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7AF]/.test(r))return"ko-KR"}function zr(t){if(!t||typeof t!="object")return;if(Array.isArray(t)){for(const r of t){const n=zr(r);if(n)return n}return}const e=t;if(typeof e.lang=="string"&&e.lang.trim().length)return e.lang;for(const r of Object.values(e)){const n=zr(r);if(n)return n}}function Ur(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";if(Array.isArray(t))return t.map(n=>Ur(n)).join("");const e=t;let r="";for(const[n,a]of Object.entries(e)){if(n==="a:t"&&typeof a=="string"){r+=a;continue}r+=Ur(a)}return r}function Kn(t){switch(t.toLowerCase()){case"ea":return"Hans";case"cs":return"Arab";case"lt":return;default:return}}function _t(t,e){const r={...t,...e},n=Ze(t.color,t.colorAlpha,e.color,e.colorAlpha);r.color=n.color,r.colorAlpha=n.alpha;const a=Ze(t.highlightColor,t.highlightAlpha,e.highlightColor,e.highlightAlpha);return r.highlightColor=a.color,r.highlightAlpha=a.alpha,r}function Gt(t){return{textBox:Lt(t),title:Lt(t),body:Lt(t),other:Lt(t)}}function Es(t){return{textBox:Lt(t.textBox),title:Lt(t.title),body:Lt(t.body),other:Lt(t.other)}}function Lt(t){const e=t==null?void 0:t.default,r=Ae(e),n={};for(let a=0;a<9;a+=1)n[a]=Ae((t==null?void 0:t.levels[a])??e);return{default:r,levels:n}}function Ae(t){return{align:t==null?void 0:t.align,bullet:li(t==null?void 0:t.bullet),marginLeft:t==null?void 0:t.marginLeft,indent:t==null?void 0:t.indent,spaceBefore:t==null?void 0:t.spaceBefore,spaceAfter:t==null?void 0:t.spaceAfter,lineHeight:t==null?void 0:t.lineHeight,lineHeightUnit:t==null?void 0:t.lineHeightUnit,tabStops:t!=null&&t.tabStops?[...t.tabStops]:void 0,run:t!=null&&t.run?{...t.run}:{}}}function Qn(t){return{run:t!=null&&t.run?{...t.run}:{}}}function js(t){const e={default:Qn(t.default),levels:{}};for(let r=0;r<9;r+=1)e.levels[r]=Qn(t.levels[r]??t.default);return e}function Rs(t){const e=Lt(t);e.default.lineHeight=void 0,e.default.lineHeightUnit=void 0;for(let r=0;r<9;r+=1){const n=e.levels[r];n&&(n.lineHeight=void 0,n.lineHeightUnit=void 0)}return e}function Ns(t,e){const r=Lt(t);if(!e)return r;r.default.align=e;for(let n=0;n<9;n+=1){const a=r.levels[n];a&&(a.align=e)}return r}function $s(t,e,r=Gt()){return t?{textBox:Lt(r.textBox),title:ke(t["p:titleStyle"],e,r.title),body:ke(t["p:bodyStyle"],e,r.body),other:ke(t["p:otherStyle"],e,r.other)}:Es(r)}function Is(t,e,r=false){if(!e&&r)return t.textBox;switch(e==null?void 0:e.type){case"title":case"ctrTitle":return t.title;case"body":case"obj":case"subTitle":return t.body;default:return js(t.other)}}function ke(t,e,r=Lt()){if(!t)return Lt(r);const n=Xr(t["a:defPPr"],e),a=Sr(Ae(r.default),n),i={};for(let o=0;o<9;o+=1){const s=Xr(t[`a:lvl${o+1}pPr`],e),d=r.levels[o]??r.default;i[o]=Sr(Sr(Ae(d),Ae(n)),s)}return{default:a,levels:i}}function Xr(t,e){return{align:hi(t==null?void 0:t.algn),bullet:(t==null?void 0:t["a:buNone"])!==void 0?null:nc(t,e),marginLeft:(t==null?void 0:t.marL)!=null?J(B(t.marL,0)):void 0,indent:(t==null?void 0:t.indent)!=null?J(B(t.indent,0)):void 0,spaceBefore:ra(t==null?void 0:t["a:spcBef"]),spaceAfter:ra(t==null?void 0:t["a:spcAft"]),...oc(t==null?void 0:t["a:lnSpc"]),tabStops:ic(t==null?void 0:t["a:tabLst"]),run:ur(t==null?void 0:t["a:defRPr"],e)}}function ci(t,e){return t.levels[e]??t.default}function li(t){return t&&typeof t=="object"?{...t}:t}function gn(t,e){return e===void 0?li(t):e===null?null:!t||t===null?{...e}:{char:e.char!==void 0?e.char:e.autoType!==void 0?void 0:t.char,autoType:e.autoType!==void 0?e.autoType:e.char!==void 0?void 0:t.autoType,startAt:e.autoType!==void 0?e.startAt??t.startAt:e.char!==void 0?void 0:e.startAt??t.startAt,fontFamily:e.fontFamily??t.fontFamily,color:e.color??t.color,colorAlpha:e.colorAlpha??t.colorAlpha}}function Sr(t,e){return{align:e.align??t.align,bullet:gn(t.bullet,e.bullet),marginLeft:e.marginLeft??t.marginLeft,indent:e.indent??t.indent,spaceBefore:e.spaceBefore??t.spaceBefore,spaceAfter:e.spaceAfter??t.spaceAfter,lineHeight:e.lineHeight??t.lineHeight,lineHeightUnit:e.lineHeightUnit??t.lineHeightUnit,tabStops:e.tabStops??t.tabStops,run:_t(t.run,e.run)}}function di(t,e={},r){return{paragraphs:[{runs:[{text:"",...e,fontFamily:e.fontFamily??zt("minor",t,r)}]}],verticalAlign:"top",direction:"horizontal",wrap:"square",anchorCenter:false,horizontalOverflow:"overflow",verticalOverflow:"overflow",columns:1,rtlColumns:false,fromWordArt:false,padding:{top:J(45720),right:J(91440),bottom:J(45720),left:J(91440)},autofit:{type:"none"}}}function yn(t,e,r,n,a){const i=t==null?void 0:t["p:bg"],o=i==null?void 0:i["p:bgPr"];if(!o){const d=i==null?void 0:i["p:bgRef"];if(!d)return;const l=pi(d,e,r,n);if(l!=null&&l.hasFill)return l.fill;const u=Ft(d,e,r);return{type:"solid",color:u.color,alpha:u.alpha}}const s=Ht(o,e,r,void 0,a);return s.fill.type==="none"?{type:"solid",color:e.colors.lt1}:s.fill}function Bs(t,e){return{fills:ta(t==null?void 0:t["a:fillStyleLst"],e?Tt(e,"a:fillStyleLst"):void 0),backgroundFills:ta(t==null?void 0:t["a:bgFillStyleLst"],e?Tt(e,"a:bgFillStyleLst"):void 0),lines:Ps(t==null?void 0:t["a:lnStyleLst"],e?Tt(e,"a:lnStyleLst"):void 0),effects:Os(t==null?void 0:t["a:effectStyleLst"],e?Tt(e,"a:effectStyleLst"):void 0)}}function ta(t,e){const r=[],n={"a:solidFill":0,"a:gradFill":0,"a:noFill":0,"a:pattFill":0};for(const a of e??[]){const[i]=Object.keys(a);if(i!=="a:solidFill"&&i!=="a:gradFill"&&i!=="a:noFill"&&i!=="a:pattFill")continue;const s=U(t==null?void 0:t[i])[n[i]];n[i]+=1,r.push({tag:i,node:X(s)??{}})}return r}function Ps(t,e){const r=[],n=U(t==null?void 0:t["a:ln"]);let a=0;for(const i of e??[])Object.prototype.hasOwnProperty.call(i,"a:ln")&&(r.push(X(n[a])??{}),a+=1);return r}function Os(t,e){const r=[],n=U(t==null?void 0:t["a:effectStyle"]);let a=0;for(const i of e??[])Object.prototype.hasOwnProperty.call(i,"a:effectStyle")&&(r.push(X(n[a])??{}),a+=1);return r.length?r:n.map(i=>X(i)??{})}function ui(t,e,r,n){const a=t==null?void 0:t["a:fillRef"];return a?pi(a,e,r,n):void 0}function pi(t,e,r,n){const a=Ft(t,e,r),i=B(t.idx,0),o=i>=1001?n.backgroundFills:n.fills,s=i>=1001?i-1001:i-1,d=o[s];if(d){const l=Ht({[d.tag]:d.node},e,r,a);if(l.hasFill)return l}return{fill:{type:"solid",color:a.color,alpha:a.alpha},hasFill:true}}function xn(t,e,r,n){const a=t==null?void 0:t["a:lnRef"];if(!a)return;const i=Ft(a,e,r),o=n.lines[Math.max(0,B(a.idx,1)-1)];if(o){const s=Re(o,e,r,i);if(s.hasLine)return s}return{line:{color:i.color,alpha:i.alpha,width:1},hasLine:true}}function vn(t,e,r,n){const a=t==null?void 0:t["a:effectRef"];if(!a)return;const i=Ft(a,e,r),o=n.effects[Math.max(0,B(a.idx,0))];return o?dr(o,e,r,i):void 0}function Ds(t){const e=typeof t=="string"?t:"rect";switch(e){case"rect":case"roundRect":case"snip1Rect":case"snip2SameRect":case"snip2DiagRect":case"snipRoundRect":case"round1Rect":case"round2SameRect":case"round2DiagRect":case"ellipse":case"diamond":case"triangle":case"rtTriangle":case"parallelogram":case"trapezoid":case"octagon":case"hexagon":case"heptagon":case"decagon":case"dodecagon":case"pentagon":case"star5":case"plaque":case"can":case"pie":case"chord":case"donut":case"arc":case"teardrop":case"leftCircularArrow":case"curvedRightArrow":case"curvedLeftArrow":case"curvedUpArrow":case"curvedDownArrow":case"smileyFace":case"frame":case"halfFrame":case"corner":case"diagStripe":case"plus":case"noSmoking":case"bevel":case"chevron":case"cloud":case"cube":case"homePlate":case"rightArrow":case"stripedRightArrow":case"notchedRightArrow":case"leftArrow":case"leftRightArrow":case"upArrow":case"downArrow":case"upDownArrow":case"quadArrow":case"leftRightUpArrow":case"bentArrow":case"uturnArrow":case"leftUpArrow":case"bentUpArrow":case"rightArrowCallout":case"leftRightArrowCallout":case"quadArrowCallout":case"leftArrowCallout":case"upArrowCallout":case"line":return e;default:return"unknown"}}function hi(t){if(!(t==null||t===""))switch(t){case"ctr":return"center";case"r":return"right";case"just":return"justify";default:return"left"}}function fi(t){switch(t){case"ctr":case"mid":return"middle";case"b":case"bot":return"bottom";default:return"top"}}function Hs(t){switch(t){case"vert":case"eaVert":case"mongolianVert":case"wordArtVert":return"vertical";case"vert270":case"wordArtVertRtl":return"vertical270";default:return"horizontal"}}function zs(t,e){const r=(typeof(t==null?void 0:t["a:tableStyleId"])=="string"?String(t["a:tableStyleId"]):void 0)??e.defaultStyleId;return r?e.styles[r]:void 0}function Us(t,e,r,n,a,i,o,s,d,l){if(!t)return{};const u=Nt(e==null?void 0:e.firstRow),f=Nt(e==null?void 0:e.lastRow),m=Nt(e==null?void 0:e.firstCol),h=Nt(e==null?void 0:e.lastCol),g=Nt(e==null?void 0:e.bandRow),x=Nt(e==null?void 0:e.bandCol),F=Math.min(o-1,r+Math.max(a,1)-1),y=Math.min(s-1,n+Math.max(i,1)-1);let S=jt(t.wholeTbl,d,l);if(g&&o>0){const k=Math.max(0,r-(u&&r>0?1:0));S=Bt(S,jt(k%2===0?t.band1H:t.band2H,d,l))}if(x&&s>0){const k=Math.max(0,n-(m&&n>0?1:0));S=Bt(S,jt(k%2===0?t.band1V:t.band2V,d,l))}return u&&r===0&&(S=Bt(S,jt(t.firstRow,d,l))),f&&F===o-1&&(S=Bt(S,jt(t.lastRow,d,l))),m&&n===0&&(S=Bt(S,jt(t.firstCol,d,l))),h&&y===s-1&&(S=Bt(S,jt(t.lastCol,d,l))),r===0&&n===0&&(S=Bt(S,jt(t.nwCell,d,l))),r===0&&y===s-1&&(S=Bt(S,jt(t.neCell,d,l))),F===o-1&&n===0&&(S=Bt(S,jt(t.swCell,d,l))),F===o-1&&y===s-1&&(S=Bt(S,jt(t.seCell,d,l))),S}function jt(t,e,r){var a,i;if(!t)return{};const n=Ht((a=t["a:tcStyle"])==null?void 0:a["a:fill"],e.theme,e.colorMap);return{fill:n.hasFill?n.fill:void 0,borders:Ys((i=t["a:tcStyle"])==null?void 0:i["a:tcBdr"],e.theme,e.colorMap),textStyle:Xs(t["a:tcTxStyle"],e.theme,e.colorMap,r)}}function Bt(t,e){var r,n,a;return{fill:e.fill??t.fill,borders:qs(t.borders,e.borders),textStyle:e.textStyle?{run:e.textStyle.run?_t(((r=t.textStyle)==null?void 0:r.run)??{},e.textStyle.run):(n=t.textStyle)==null?void 0:n.run,paragraphAlign:e.textStyle.paragraphAlign??((a=t.textStyle)==null?void 0:a.paragraphAlign)}:t.textStyle}}function Xs(t,e,r,n){if(!t)return;const a={};t.b!=null&&(a.bold=String(t.b)==="1"||String(t.b).toLowerCase()==="on"),t.i!=null&&(a.italic=String(t.i)==="1"||String(t.i).toLowerCase()==="on"),t.u!=null&&(a.underline=String(t.u)!=="none"&&String(t.u).toLowerCase()!=="off"),t.sz!=null&&(a.fontSize=pr(B(t.sz,1800)/100));const i=t["a:fontRef"],o=typeof(i==null?void 0:i.idx)=="string"?String(i.idx).trim().toLowerCase():"";if(o==="major"?a.fontFamily=zt("major",e,n):o==="minor"&&(a.fontFamily=zt("minor",e,n)),t["a:srgbClr"]||t["a:schemeClr"]||t["a:sysClr"]){const d=Ft(t,e,r);a.color=d.color,a.colorAlpha=d.alpha}const s=hi(t.algn);if(!(!Object.keys(a).length&&s==null))return{run:Object.keys(a).length?a:void 0,paragraphAlign:s}}function Ys(t,e,r){if(!t)return;const n={top:ce(t["a:top"],e,r),right:ce(t["a:right"],e,r),bottom:ce(t["a:bottom"],e,r),left:ce(t["a:left"],e,r),insideH:ce(t["a:insideH"],e,r),insideV:ce(t["a:insideV"],e,r)};return Object.values(n).some(Boolean)?n:void 0}function ce(t,e,r){return Fe(X(t==null?void 0:t["a:ln"])??t,e,r)}function qs(t,e){return t?e?{top:e.top??t.top,right:e.right??t.right,bottom:e.bottom??t.bottom,left:e.left??t.left,insideH:e.insideH??t.insideH,insideV:e.insideV??t.insideV}:t:e}function _s(t,e,r,n,a){if(!t)return;const i={top:e===0?t.top??t.insideH:t.insideH??t.top,right:r===a-1?t.right??t.insideV:t.insideV??t.right,bottom:e===n-1?t.bottom??t.insideH:t.insideH??t.bottom,left:r===0?t.left??t.insideV:t.insideV??t.left};return Object.values(i).some(Boolean)?i:void 0}function Ws(t,e){return t?e?{top:e.top??t.top,right:e.right??t.right,bottom:e.bottom??t.bottom,left:e.left??t.left}:t:e}function Js(t,e){return!e||!Object.keys(e).length?t:{...t,paragraphs:t.paragraphs.map(r=>({...r,runs:r.runs.map(n=>({..._t(e??{},n),text:n.text}))}))}}function Nt(t){return t===true||t===1||t==="1"||String(t).toLowerCase()==="true"}function Vs(t,e){if(!e)return t;const r=xt(t);let n=false;const a=[["left","marL"],["right","marR"],["top","marT"],["bottom","marB"]];for(const[i,o]of a)e[o]!=null&&(r.padding[i]=J(B(e[o],r.padding[i])),n=true);return e.anchor!=null&&(r.verticalAlign=fi(e.anchor),n=true),n?r:t}function Gs(t,e){return e||t.verticalAlign!=="top"?t:{...t,verticalAlign:"middle"}}function Zs(t,e,r){if(!t)return;const n={top:Fe(t["a:lnT"],e,r),right:Fe(t["a:lnR"],e,r),bottom:Fe(t["a:lnB"],e,r),left:Fe(t["a:lnL"],e,r)};return Object.values(n).some(Boolean)?n:void 0}function Fe(t,e,r){if(!t)return;const n=Re(t,e,r);if(n.line)return n.line;if(n.hasLine)return{width:0,color:"transparent"}}function oe(t,e){const r=Ks(t==null?void 0:t.action),n=t==null?void 0:t["r:id"];if(typeof n!="string"||!n)return r?{navigationAction:r}:{};const a=e.relationships[n];if(!a)return r?{navigationAction:r}:(e.warnings.push(`Missing hyperlink relationship ${n} in ${e.slidePath}.`),{});if(a.type===nt.hyperlink)return{href:a.target};if(a.type===nt.slide){const i=e.slideIndexByPath[a.target];return i==null?(e.warnings.push(`Missing target slide ${a.target} for hyperlink ${n}.`),{}):{slideIndex:i}}return r?{navigationAction:r}:{}}function Ks(t){if(typeof t!="string"||!t)return;const r=t.trim().toLowerCase().match(/[?&]jump=([^&]+)/);switch(r==null?void 0:r[1]){case"nextslide":return"next";case"previousslide":return"previous";case"firstslide":return"first";case"lastslide":return"last";case"lastslideviewed":return"lastViewed";default:return}}function ea(t){switch(t){case"triangle":case"stealth":case"diamond":case"oval":case"arrow":return t;default:return}}function Qs(t){switch(t){case"rnd":return"round";case"sq":return"square";case"flat":return"butt";default:return}}function tc(t){switch(t){case"dbl":return"double";case"thickThin":return"thickThin";case"thinThick":return"thinThick";case"tri":return"triple";case"sng":return"single";default:return}}function ec(t){if(t){if(t["a:round"]!==void 0)return"round";if(t["a:bevel"]!==void 0)return"bevel";if(t["a:miter"]!==void 0)return"miter"}}function rc(t){var n;const e=(n=X(t==null?void 0:t["a:miter"]))==null?void 0:n.lim;if(e==null)return;const r=B(e,0)/1e5;return Number.isFinite(r)&&r>0?r:void 0}function nc(t,e){var d;if(!t||t["a:buNone"]!==void 0)return;const r=t["a:buFont"],n=typeof(r==null?void 0:r.typeface)=="string"&&r.typeface.trim().length?mn(String(r.typeface),e.theme):void 0,a=t["a:buClr"],i=a?Ft(a,e.theme,e.colorMap):void 0,o=(d=t["a:buChar"])==null?void 0:d.char;if(typeof o=="string"&&o.trim().length>0)return{char:mi(o),fontFamily:n,color:i==null?void 0:i.color,colorAlpha:i==null?void 0:i.alpha};const s=t["a:buAutoNum"];if(s!=null&&s.type)return{autoType:String(s.type),startAt:Math.max(1,B(s.startAt,1)),fontFamily:n,color:i==null?void 0:i.color,colorAlpha:i==null?void 0:i.alpha}}function bn(t){if(/[\u4E00-\u9FFF]/.test(t))return"zh-CN";if(/[\u3040-\u30FF]/.test(t))return"ja-JP";if(/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7AF]/.test(t))return"ko-KR"}function mi(t){return t.replace(/&#x([0-9a-f]+);/gi,(e,r)=>String.fromCodePoint(parseInt(r,16))).replace(/&#(\d+);/g,(e,r)=>String.fromCodePoint(parseInt(r,10))).replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function ac(t,e){return e==="External"||/^[a-z][a-z0-9+.-]*:/i.test(t)}function ra(t){var e;if(t&&((e=t["a:spcPts"])==null?void 0:e.val)!=null)return pr(B(t["a:spcPts"].val,0)/100)}function ic(t){if(!t)return;const e=U(t["a:tab"]).map(r=>J(B(r==null?void 0:r.pos,NaN))).filter(r=>Number.isFinite(r)).sort((r,n)=>r-n);return e.length?e:[]}function oc(t){var e,r;return t?((e=t["a:spcPct"])==null?void 0:e.val)!=null?{lineHeight:B(t["a:spcPct"].val,1e5)/1e5,lineHeightUnit:"multiple"}:((r=t["a:spcPts"])==null?void 0:r.val)!=null?{lineHeight:pr(B(t["a:spcPts"].val,0)/100),lineHeightUnit:"px"}:{}:{}}function pr(t){return Number((t*96/72).toFixed(3))}function Wt(t,e){const r=cc(t),n=r?e==null?void 0:e.get(r):void 0;return n??(r!=null?B(r,Number.POSITIVE_INFINITY):Number.POSITIVE_INFINITY)}function Qt(t,e){let r=t;for(const n of e)r=r==null?void 0:r[n];return typeof(r==null?void 0:r.name)=="string"?r.name:void 0}function sc(t){var r,n;const e=(n=(r=t["p:nvSpPr"])==null?void 0:r["p:cNvPr"])==null?void 0:n.id;return e!=null?String(e):void 0}function cc(t){return we(t,["p:nvSpPr","p:cNvPr"])??we(t,["p:nvPicPr","p:cNvPr"])??we(t,["p:nvGraphicFramePr","p:cNvPr"])??we(t,["p:nvCxnSpPr","p:cNvPr"])??we(t,["p:nvGrpSpPr","p:cNvPr"])}function we(t,e){let r=t;for(const n of e)r=r==null?void 0:r[n];return(r==null?void 0:r.id)!=null?String(r.id):void 0}function lc(t){const e=t==null?void 0:t["p:ph"];if(e)return{type:typeof e.type=="string"?e.type:void 0,idx:e.idx!=null?String(e.idx):void 0}}function Yr(t){return`${gi(t.type)}:${t.idx??""}`}function wn(t,e){if(!(!t||!e))for(const r of uc(e)){const n=t.get(r);if(n)return n}}function dc(t,e){var n;const r=t?qr(t.item):void 0;if(!r)return false;for(const a of r.paragraphs)for(const i of a.runs){const o=(n=i.fontFamily)==null?void 0:n.trim();if(o&&o!==e.fonts.minor&&o!==e.fonts.major)return true}return false}function uc(t){const e=Yr(t),r=t.idx,n=gi(t.type),a=[n];n==="ctrTitle"?a.push("title"):n==="title"?a.push("ctrTitle"):n==="obj"?a.push("body"):n==="body"&&a.push("obj");const i=new Set([e]);for(const o of a)i.add(Yr({type:o,idx:r}));return[...i]}function gi(t){switch(t){case"ctrTitle":return"title";case"obj":return"body";default:return t??"body"}}function yi(t,e){if(!t)return e;const r=xt(e),n=qr(t.item),a=qr(r.item);return r.hasTransform||(r.item.transform=xt(t.item.transform)),!r.hasFill&&t.item.fill&&(r.item.fill=xt(t.item.fill)),!r.hasLine&&"line"in t.item&&t.item.line&&(r.item.line=xt(t.item.line)),r.item.name||(r.item.name=t.item.name),!r.item.placeholder&&t.item.placeholder&&(r.item.placeholder=xt(t.item.placeholder)),r.hasText?n&&a&&Fr(r.item,na(n,a,r.textFrameStyleFlags)):n&&a&&!_r(t.item)&&!Wr(t.item)&&!Jr(t.item)?Fr(r.item,na(n,a,r.textFrameStyleFlags)):n&&!a&&!_r(t.item)&&!Wr(t.item)&&!Jr(t.item)&&Fr(r.item,xt(n)),r.item.kind==="shape"&&t.item.kind==="shape"&&!r.item.geometry&&t.item.geometry&&(r.item.geometry=xt(t.item.geometry)),r}function qr(t){if(t.kind==="text"||t.kind==="shape")return t.textFrame}function Fr(t,e){(t.kind==="text"||t.kind==="shape")&&(t.textFrame=e)}function na(t,e,r){if(!(t!=null&&t.paragraphs.length))return e;const n=xt(e);return r!=null&&r.verticalAlign||(n.verticalAlign=t.verticalAlign),r!=null&&r.direction||(n.direction=t.direction??"horizontal"),r!=null&&r.wrap||(n.wrap=t.wrap??"square"),r!=null&&r.anchorCenter||(n.anchorCenter=t.anchorCenter??false),n.horizontalOverflow=e.horizontalOverflow??t.horizontalOverflow??"overflow",n.verticalOverflow=e.verticalOverflow??t.verticalOverflow??"overflow",n.columns=e.columns??t.columns??1,n.columnSpacing=e.columnSpacing??t.columnSpacing,n.rtlColumns=e.rtlColumns??t.rtlColumns??false,n.fromWordArt=e.fromWordArt??t.fromWordArt??false,r!=null&&r.padding.top||(n.padding.top=t.padding.top),r!=null&&r.padding.right||(n.padding.right=t.padding.right),r!=null&&r.padding.bottom||(n.padding.bottom=t.padding.bottom),r!=null&&r.padding.left||(n.padding.left=t.padding.left),n.autofit=e.autofit??t.autofit,n.paragraphs=e.paragraphs.map((a,i)=>pc(xi(t.paragraphs,i),a)),n}function pc(t,e){return t?{...e,level:e.level??t.level,bullet:e.bulletDisabled?void 0:gn(t.bullet,e.bullet)??void 0,bulletDisabled:e.bulletDisabled||void 0,align:e.align??t.align,marginLeft:e.marginLeft??t.marginLeft,indent:e.indent??t.indent,spaceBefore:e.spaceBefore??t.spaceBefore,spaceAfter:e.spaceAfter??t.spaceAfter,lineHeight:e.lineHeight??t.lineHeight,lineHeightUnit:e.lineHeightUnit??t.lineHeightUnit,runs:e.runs.map((r,n)=>hc(xi(t.runs,n),r))}:e}function hc(t,e){if(!t)return e;const r=Ze(t.color,t.colorAlpha,e.color,e.colorAlpha),n=Ze(t.highlightColor,t.highlightAlpha,e.highlightColor,e.highlightAlpha);return{...e,bold:e.bold??t.bold,italic:e.italic??t.italic,underline:e.underline??t.underline,strike:e.strike??t.strike,color:r.color,colorAlpha:r.alpha,highlightColor:n.color,highlightAlpha:n.alpha,fontSize:e.fontSize??t.fontSize,fontFamily:e.fontFamily??t.fontFamily,baselineShift:e.baselineShift??t.baselineShift}}function Ze(t,e,r,n){return r!==void 0?{color:r,alpha:n}:n!==void 0?{color:t,alpha:n}:{color:t,alpha:e}}function xi(t,e){return t[e]??t[t.length-1]??t[0]}function fc(){return{verticalAlign:false,direction:false,wrap:false,anchorCenter:false,padding:{top:false,right:false,bottom:false,left:false}}}function mc(t){return String(t).trim().toLowerCase()==="none"?"none":"square"}function aa(t){return String(t).trim().toLowerCase()==="clip"?"clip":"overflow"}function gc(t,e){if(!t)return;Nt(t.rtlCol)&&e.warnings.push(`Text columns with rtlCol are not fully supported in ${e.slidePath}.`),Nt(t.fromWordArt)&&e.warnings.push(`WordArt text behavior is not fully supported in ${e.slidePath}.`);const r=Math.max(1,B(t.numCol,1));r>1&&e.warnings.push(`Multi-column text (numCol=${r}) is not fully supported in ${e.slidePath}.`)}function X(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function Zt(t){return!!(t!=null&&t.paragraphs.some(e=>e.runs.some(r=>r.text.trim().length>0)))}function ia(t){return t.kind==="text"||t.kind==="shape"?Zt(t.textFrame):t.kind==="table"?t.cells.some(e=>Zt(e.textFrame)):false}function yc(t,e){for(const r of t){if((r.kind==="text"||r.kind==="shape")&&r.textFrame){oa(r.textFrame,e);continue}if(r.kind==="table")for(const n of r.cells)oa(n.textFrame,e)}}function oa(t,e){var r;for(const n of t.paragraphs)for(const a of n.runs){const i=(r=a.fontFamily)==null?void 0:r.trim(),o=bn(a.text);!i||!o||(i===e.fonts.major?a.fontFamily=zt("major",e,o):i===e.fonts.minor&&(a.fontFamily=zt("minor",e,o)))}}function xc(t,e){const r=String(e+1);for(const n of t){if(n.kind!=="text"&&n.kind!=="shape"||!n.placeholder||!n.textFrame||n.placeholder.type!=="sldNum")continue;const a=n.textFrame.paragraphs.map(s=>s.runs.map(d=>d.text).join("").trim()).filter(Boolean).join("");if(!vi(a))continue;const i=n.textFrame.paragraphs.find(s=>s.runs.length);if(!i)continue;let o=false;i.runs=i.runs.map(s=>o?{...s,text:""}:(o=true,{...s,text:r}))}}function vi(t){if(!t)return true;const e=t.replace(/[\s<#>‹›《》〔〕\[\]\(\)\{\}-]/g,"");return e.length===0||/^sldnum$/i.test(e)}function vc(t){return t.kind!=="text"&&t.kind!=="shape"||!t.placeholder?false:t.placeholder.type==="dt"||t.placeholder.type==="ftr"||t.placeholder.type==="hdr"}function bi(t){return t.kind!=="text"&&t.kind!=="shape"||!t.placeholder?false:t.placeholder.type==="dt"||t.placeholder.type==="sldNum"||t.placeholder.type==="ftr"||t.placeholder.type==="hdr"}function _r(t){var n;if(t.kind!=="text"&&t.kind!=="shape"||!t.placeholder||!Zt(t.textFrame))return false;const e=t.placeholder.type;if(e==="dt"||e==="sldNum"||e==="ftr"||e==="hdr")return false;const r=((n=t.textFrame)==null?void 0:n.paragraphs.map(a=>a.runs.map(i=>i.text).join("").trim()).find(Boolean))??"";return/^(?:click|tap)\s+to\s+(?:edit|add)\b/i.test(r)||/^(?:单击|点击)\s*此处(?:以)?(?:编辑|添加)/.test(r)}function Wr(t){var n,a;if(t.kind!=="text"&&t.kind!=="shape"||!t.placeholder||!Zt(t.textFrame))return false;const e=t.placeholder.type;if(e==="dt"||e==="sldNum"||e==="ftr"||e==="hdr")return false;const r=((a=(n=t.textFrame)==null?void 0:n.paragraphs.map(i=>i.runs.map(o=>o.text).join("").trim()).find(Boolean))==null?void 0:a.replace(/\s+/g," ").trim())??"";return/^(?:标题|副标题)\s*文本$/u.test(r)||/^(?:Title|Subtitle)\s+Text$/i.test(r)||/^(?:正文|文本)\s*级别\s*\d+$/u.test(r)||/^(?:Body|Text)\s+Level\s*\d+$/i.test(r)}function Jr(t){var a;if(t.kind!=="text"&&t.kind!=="shape"||!t.placeholder||!Zt(t.textFrame))return false;const e=t.placeholder.type;if(e==="dt"||e==="sldNum"||e==="ftr"||e==="hdr")return false;const r=(((a=t.textFrame)==null?void 0:a.paragraphs)??[]).map(i=>i.runs.map(o=>o.text).join("").replace(/\s+/g," ").trim()).filter(Boolean),n=r[0]??"";return/^编[辑輯]母版(?:标题|副标题|文本)样式$/u.test(n)?true:r.length>=2&&/^编[辑輯]母版(?:标题|副标题|文本)样式$/u.test(n)&&r.slice(1).every((i,o)=>i===`\u7B2C${o+2}\u7EA7`)}function bc(t){var e;for(const r of t)if(!bi(r)){if(r.kind==="text"||r.kind==="shape")for(const n of((e=r.textFrame)==null?void 0:e.paragraphs)??[]){const a=n.runs.map(i=>i.text).join("").trim();if(a)return a}if(r.kind==="table")for(const n of r.cells)for(const a of n.textFrame.paragraphs){const i=a.runs.map(o=>o.text).join("").trim();if(i)return i}}}function Sn(t){const e=t.split("/"),r=e.pop();return`${e.join("/")}/_rels/${r}.rels`}function wc(t,e,r){var h,g;if(!t)return;const n=typeof((h=t["a:videoFile"])==null?void 0:h["r:link"])=="string"?String(t["a:videoFile"]["r:link"]):void 0,a=typeof((g=t["a:audioFile"])==null?void 0:g["r:link"])=="string"?String(t["a:audioFile"]["r:link"]):void 0,i=Sc(t),o=n?"video":a?"audio":void 0;if(!n&&!a&&!i)return;const s=i??n??a,d=o?[nt.media,o==="video"?nt.video:nt.audio]:[nt.media,nt.video,nt.audio],l=Vr(s,d,e,`media for ${r}`);if(l)return{mediaType:o??sa(l),mediaId:l};const u=o==="video"?n:o==="audio"?a:void 0,f=o==="video"?[nt.video]:o==="audio"?[nt.audio]:[],m=u&&u!==s?Vr(u,f,e,`${o??"media"} for ${r}`):void 0;if(m)return{mediaType:o??sa(m),mediaId:m}}function Sc(t){var e;if(t)for(const r of U((e=t["p:extLst"])==null?void 0:e["p:ext"])){const n=X(r==null?void 0:r["p14:media"]);if(typeof(n==null?void 0:n["r:embed"])=="string"&&n["r:embed"])return String(n["r:embed"])}}function Vr(t,e,r,n){if(!t)return;const a=r.relationships[t];if(!a){r.warnings.push(`Missing relationship ${t} for ${n} in ${r.slidePath}.`);return}if(a.targetMode==="External"){r.warnings.push(`External ${n} is not supported in ${r.slidePath}.`);return}if(e.length>0&&!e.includes(a.type)){r.warnings.push(`Unsupported relationship type for ${n} in ${r.slidePath}: ${a.type}.`);return}return a.target}function sa(t){switch((t.split(".").pop()??"").toLowerCase()){case"mp3":case"wav":case"m4a":case"aac":case"oga":case"ogg":case"flac":return"audio";default:return"video"}}function Fc(t){if(t==="_rels/.rels")return"package-root.xml";const e=t.split("/"),r=e.pop()??"";return e.pop()!=="_rels"?t:[...e,r.replace(/\.rels$/,"")].join("/")}function Ac(t,e){if(t.kind==="image"&&t.mediaId&&e.add(t.mediaId),t.kind==="media"&&(t.mediaId&&e.add(t.mediaId),t.posterMediaId&&e.add(t.posterMediaId)),Gr(t.fill,e),t.kind==="table")for(const r of t.cells)Gr(r.fill,e)}function Gr(t,e){(t==null?void 0:t.type)==="picture"&&t.mediaId&&e.add(t.mediaId)}async function kc(t,e,r,n){var o,s;if((s=(o=n.media[e])==null?void 0:o.data)!=null&&s.length)return;const a=t.file(e);if(!a)return;const i=await a.async("uint8array");n.media[e]={id:e,path:e,contentType:Lc(e,r),data:i}}function Tc(t){var e;if(t){if(t.kind==="text"||t.kind==="shape")return(e=t.textFrame)==null?void 0:e.paragraphs.map(r=>r.runs.map(n=>n.text).join("")).join(" ").trim();if(t.kind==="table")return t.cells.flatMap(r=>r.textFrame.paragraphs.map(n=>n.runs.map(a=>a.text).join(""))).join(" ").trim()}}function Lc(t,e){const r=e.overrides[t];if(r)return r;const n=t.split(".").pop()??"";return e.defaults[n]??"application/octet-stream"}function c(t,e){return{name:t,value:e}}function L(...t){return{type:"add",values:t}}function v(t,e){return{type:"sub",left:t,right:e}}function p(t,e){return{type:"mul",left:t,right:e}}function b(t,e){return{type:"div",left:t,right:e}}function Jt(...t){return{type:"min",values:t}}function le(...t){return{type:"max",values:t}}function R(t,e,r){return{type:"pin",min:t,value:e,max:r}}function K(t,e){return{type:"sin",radius:t,angle:e}}function Q(t,e){return{type:"cos",radius:t,angle:e}}function Vt(t,e){return{type:"gt",left:t,right:e}}function he(t,e,r){return{type:"ifElse",condition:t,whenTrue:e,whenFalse:r}}function Ke(t){return{type:"sqrt",value:t}}function Qe(t,e,r){return{type:"mod",x:t,y:e,z:r}}function Te(t,e){return{type:"at2",x:t,y:e}}function wi(t,e,r=[]){const n={l:0,t:0,r:t,b:e,w:t,h:e,hc:t/2,vc:e/2,wd2:t/2,hd2:e/2,cx:t/2,cy:e/2,ss:Math.min(t,e),ls:Math.max(t,e),cd4:54e5,cd2:108e5,"3cd4":162e5},a=new Map(r.map(l=>[l.name,l.value])),i=new Map(Object.entries(n)),o=new Set,s=l=>{const u=i.get(l);if(u!=null)return u;const f=a.get(l);if(f==null)throw new Error(`Unknown geometry guide: ${l}`);if(o.has(l))throw new Error(`Circular geometry guide reference: ${l}`);o.add(l);const m=d(f);return o.delete(l),i.set(l,m),m},d=l=>Mc(l,{width:t,height:e,get:s,resolve:d});return{width:t,height:e,get:s,resolve:d}}function Mc(t,e){if(typeof t=="number")return ft(t);if(typeof t=="string")return ft(e.get(t));switch(t.type){case"add":return ft(t.values.reduce((r,n)=>r+e.resolve(n),0));case"sub":return ft(e.resolve(t.left)-e.resolve(t.right));case"mul":return ft(e.resolve(t.left)*e.resolve(t.right));case"div":{const r=e.resolve(t.right);return Math.abs(r)<1e-9?0:ft(e.resolve(t.left)/r)}case"min":return ft(Math.min(...t.values.map(r=>e.resolve(r))));case"max":return ft(Math.max(...t.values.map(r=>e.resolve(r))));case"pin":{const r=e.resolve(t.min),n=e.resolve(t.max),a=e.resolve(t.value);return ft(Math.min(Math.max(a,r),n))}case"sin":{const r=e.resolve(t.radius),n=e.resolve(t.angle)*Math.PI/180;return ft(r*Math.sin(n))}case"cos":{const r=e.resolve(t.radius),n=e.resolve(t.angle)*Math.PI/180;return ft(r*Math.cos(n))}case"gt":return e.resolve(t.left)>e.resolve(t.right)?1:0;case"ifElse":return ft(e.resolve(t.condition)>=.5?e.resolve(t.whenTrue):e.resolve(t.whenFalse));case"sqrt":return ft(Math.sqrt(Math.max(0,e.resolve(t.value))));case"mod":return ft(Math.sqrt(Math.max(0,Math.pow(e.resolve(t.x),2)+Math.pow(e.resolve(t.y),2)+Math.pow(e.resolve(t.z),2))));case"at2":return ft(Math.atan2(e.resolve(t.y),e.resolve(t.x))*180*6e4/Math.PI);default:return 0}}function Cc(t,e){return{x:e.resolve(t.x),y:e.resolve(t.y)}}function Ec(t,e){const r=[];let n=0,a=0,i=0,o=0;for(const s of t)switch(s.type){case"M":case"L":{n=e.resolve(s.x),a=e.resolve(s.y),s.type==="M"&&(i=n,o=a),r.push(`${s.type} ${W(n)} ${W(a)}`);break}case"H":n=e.resolve(s.x),r.push(`H ${W(n)}`);break;case"V":a=e.resolve(s.y),r.push(`V ${W(a)}`);break;case"Q":n=e.resolve(s.x),a=e.resolve(s.y),r.push(`Q ${W(e.resolve(s.x1))} ${W(e.resolve(s.y1))} ${W(n)} ${W(a)}`);break;case"C":n=e.resolve(s.x),a=e.resolve(s.y),r.push(`C ${W(e.resolve(s.x1))} ${W(e.resolve(s.y1))}, ${W(e.resolve(s.x2))} ${W(e.resolve(s.y2))}, ${W(n)} ${W(a)}`);break;case"A":n=e.resolve(s.x),a=e.resolve(s.y),r.push(`A ${W(e.resolve(s.rx))} ${W(e.resolve(s.ry))} ${W(e.resolve(s.rotation??0))} ${ca(s.largeArc,e)} ${ca(s.sweep,e)} ${W(n)} ${W(a)}`);break;case"OA":{const d=e.resolve(s.rx),l=e.resolve(s.ry),u=e.resolve(s.startAngle),f=e.resolve(s.sweepAngle),m=la(u),h=la(u+f),g=n-Math.cos(m)*d,x=a-Math.sin(m)*l;n=g+Math.cos(h)*d,a=x+Math.sin(h)*l,r.push(`A ${W(d)} ${W(l)} 0 ${Math.abs(f)>108e5?"1":"0"} ${f>=0?"1":"0"} ${W(n)} ${W(a)}`);break}case"Z":r.push("Z"),n=i,a=o;break}return r.join(" ")}function jc(t,e){return t.map(r=>{const n=Cc(r,e);return`${W(n.x)},${W(n.y)}`}).join(" ")}function W(t){const e=ft(t),r=Number(e.toFixed(3));return Object.is(r,-0)?"0":String(r)}function ca(t,e){return typeof t=="boolean"?t?"1":"0":t==null?"0":e.resolve(t)>=.5?"1":"0"}function ft(t){return Number.isFinite(t)?Object.is(t,-0)?0:t:0}function la(t){return t/6e4*Math.PI/180}const Fn=216e5,tr=Fn-1,Rt=6e4;function Ar(t,e){return[c("adj1",t),c("adj2",e),c("stAng",R(0,"adj1",tr)),c("enAng",R(0,"adj2",tr)),c("rawSwAng",v("enAng","stAng")),c("swAng",he(Vt("rawSwAng",0),"rawSwAng",L("rawSwAng",Fn))),c("rx",b("w",2)),c("ry",b("h",2)),c("stDeg",b("stAng",Rt)),c("enDeg",b("enAng",Rt)),c("swDeg",b("swAng",Rt)),c("stDenX",Q("ry","stDeg")),c("stDenY",K("rx","stDeg")),c("stRadius",b(p("rx","ry"),Qe("stDenX","stDenY",0))),c("enDenX",Q("ry","enDeg")),c("enDenY",K("rx","enDeg")),c("enRadius",b(p("rx","ry"),Qe("enDenX","enDenY",0))),c("x1",L("cx",Q("stRadius","stDeg"))),c("y1",L("cy",K("stRadius","stDeg"))),c("x2",L("cx",Q("enRadius","enDeg"))),c("y2",L("cy",K("enRadius","enDeg"))),c("largeArcFlag",Vt("swDeg",180))]}function Rc(t,e=-90){return Array.from({length:t},(r,n)=>{const a=e+360/t*n;return{x:L("cx",Q("cx",a)),y:L("cy",K("cy",a))}})}function kr(t,e=-90){return{textBounds:{left:p("w",.14),top:p("h",.14),right:p("w",.14),bottom:p("h",.14)},elements:[{kind:"polygon",defaultJoin:"round",points:Rc(t,e)}]}}function Nc(){return[c("adj1",25e3),c("adj2",5e4),c("adj3",25e3),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("q1",b(L("th","aw"),4)),c("hR",v("hd2","q1")),c("q7",p("hR",2)),c("q8",p("q7","q7")),c("q9",p("th","th")),c("q10",v("q8","q9")),c("q11",Ke("q10")),c("idx",b(p("q11","w"),"q7")),c("maxAdj3",b(p(1e5,"idx"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("ah",b(p("ss","a3"),1e5)),c("y3",L("hR","th")),c("q2",p("w","w")),c("q3",p("ah","ah")),c("q4",v("q2","q3")),c("q5",Ke("q4")),c("dy",b(p("q5","hR"),"w")),c("y5",L("hR","dy")),c("y7",L("y3","dy")),c("q6",v("aw","th")),c("dh",b("q6",2)),c("y4",v("y5","dh")),c("y8",L("y7","dh")),c("aw2",b("aw",2)),c("y6",v("b","aw2")),c("x1",v("r","ah"))]}function $c(){return[c("adj1",25e3),c("adj2",5e4),c("adj3",25e3),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("q1",b(L("th","aw"),4)),c("hR",v("hd2","q1")),c("q7",p("hR",2)),c("q8",p("q7","q7")),c("q9",p("th","th")),c("q10",v("q8","q9")),c("q11",Ke("q10")),c("idx",b(p("q11","w"),"q7")),c("maxAdj3",b(p(1e5,"idx"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("ah",b(p("ss","a3"),1e5)),c("y3",L("hR","th")),c("q2",p("w","w")),c("q3",p("ah","ah")),c("q4",v("q2","q3")),c("q5",Ke("q4")),c("dy",b(p("q5","hR"),"w")),c("y5",L("hR","dy")),c("y7",L("y3","dy")),c("q6",v("aw","th")),c("dh",b("q6",2)),c("y4",v("y5","dh")),c("y8",L("y7","dh")),c("aw2",b("aw",2)),c("y6",v("b","aw2")),c("x1",L("l","ah")),c("outerInset",p("th",.42)),c("outerX",v("r","outerInset")),c("innerY",v("y3",p("th",.38))),c("curveEndX",L("x1",p("th",.28))),c("curveEndY",v("y8",p("th",.68))),c("swAng",Te("ah","dy")),c("ix",L("l","idx")),c("iy",b(L("hR","y3"),2)),c("q12",b("th",2)),c("dang2",Te("idx","q12")),c("swAng2",v("dang2","swAng")),c("swAng3",v("swAng","dang2")),c("stAng3",v(0,"dang2"))]}function Ic(){return[c("adj1",26e3),c("adj2",5e4),c("maxAdj2",b(p(5e4,"w"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("arcX",v("wd2",b(L("th","aw"),4))),c("bandX",L("arcX","th")),c("headBaseX",v("w","aw")),c("headJoinX",v("w",b(L("aw","th"),2))),c("headOuterX",v("w","th")),c("rightArcEndX",v("w",b("th",2))),c("barY",v("h","th"))]}function Bc(){return[c("adj1",26e3),c("adj2",5e4),c("maxAdj2",b(p(5e4,"w"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("arcX",v("wd2",b(L("th","aw"),4))),c("bandX",L("arcX","th")),c("headBaseX",v("w","aw")),c("headJoinX",v("w",b(L("aw","th"),2))),c("headOuterX",v("w","th")),c("rightArcEndX",v("w",b("th",2))),c("barY",v("h","th"))]}const Si={snip1Rect:{guides:[c("adj",18e3),c("a",R(0,"adj",5e4)),c("cut",b(p("ss","a"),1e5))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",lineJoin:"round",commands:[{type:"M",x:0,y:0},{type:"H",x:v("w","cut")},{type:"L",x:"w",y:"cut"},{type:"V",y:"h"},{type:"H",x:0},{type:"Z"}]}]},snip2SameRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("cutTop",b(p("ss","a1"),1e5)),c("cutBottom",b(p("ss","a2"),1e5)),c("maxCut",he(Vt("cutTop","cutBottom"),"cutTop","cutBottom"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"cutTop",y:0},{type:"H",x:v("w","cutTop")},{type:"L",x:"w",y:"cutTop"},{type:"V",y:v("h","cutBottom")},{type:"L",x:v("w","cutBottom"),y:"h"},{type:"H",x:"cutBottom"},{type:"L",x:0,y:v("h","cutBottom")},{type:"V",y:"cutTop"},{type:"Z"}]}]},snip2DiagRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("cutTop",b(p("ss","a1"),1e5)),c("cutBottom",b(p("ss","a2"),1e5)),c("maxCut",he(Vt("cutTop","cutBottom"),"cutTop","cutBottom"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"cutTop",y:0},{type:"H",x:v("w","cutBottom")},{type:"L",x:"w",y:"cutBottom"},{type:"V",y:v("h","cutTop")},{type:"L",x:v("w","cutTop"),y:"h"},{type:"H",x:"cutBottom"},{type:"L",x:0,y:v("h","cutBottom")},{type:"V",y:"cutTop"},{type:"Z"}]}]},snipRoundRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("radius",b(p("ss","a1"),1e5)),c("cut",b(p("ss","a2"),1e5)),c("curveInset",b(p("radius",29289),1e5))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"radius",y:0},{type:"H",x:v("w","cut")},{type:"L",x:"w",y:"cut"},{type:"V",y:"h"},{type:"H",x:0},{type:"V",y:"radius"},{type:"A",rx:"radius",ry:"radius",sweep:true,x:"radius",y:0},{type:"Z"}]}]},round1Rect:{guides:[c("adj",18e3),c("a",R(0,"adj",5e4)),c("radius",b(p("ss","a"),1e5)),c("curveInset",b(p("radius",29289),1e5))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:0,y:0},{type:"H",x:v("w","radius")},{type:"A",rx:"radius",ry:"radius",sweep:true,x:"w",y:"radius"},{type:"V",y:"h"},{type:"H",x:0},{type:"Z"}]}]},round2SameRect:{guides:[c("adj1",18e3),c("adj2",0),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("radiusTop",b(p("ss","a1"),1e5)),c("radiusBottom",b(p("ss","a2"),1e5)),c("topCurveInset",b(p("radiusTop",29289),1e5)),c("bottomCurveInset",b(p("radiusBottom",29289),1e5)),c("maxCurveInset",he(Vt("radiusTop","radiusBottom"),"topCurveInset","bottomCurveInset"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"radiusTop",y:0},{type:"H",x:v("w","radiusTop")},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:"w",y:"radiusTop"},{type:"V",y:v("h","radiusBottom")},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:v("w","radiusBottom"),y:"h"},{type:"H",x:"radiusBottom"},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:0,y:v("h","radiusBottom")},{type:"V",y:"radiusTop"},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:"radiusTop",y:0},{type:"Z"}]}]},round2DiagRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("radiusTop",b(p("ss","a1"),1e5)),c("radiusBottom",b(p("ss","a2"),1e5)),c("topCurveInset",b(p("radiusTop",29289),1e5)),c("bottomCurveInset",b(p("radiusBottom",29289),1e5)),c("maxCurveInset",he(Vt("radiusTop","radiusBottom"),"topCurveInset","bottomCurveInset"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"radiusTop",y:0},{type:"H",x:v("w","radiusBottom")},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:"w",y:"radiusBottom"},{type:"V",y:v("h","radiusTop")},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:v("w","radiusTop"),y:"h"},{type:"H",x:"radiusBottom"},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:0,y:v("h","radiusBottom")},{type:"V",y:"radiusTop"},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:"radiusTop",y:0},{type:"Z"}]}]},cloud:{textBounds:{left:p("w",.14),top:p("h",.18),right:p("w",.14),bottom:p("h",.16)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:p("w",.18),y:p("h",.72)},{type:"C",x1:p("w",.08),y1:p("h",.72),x2:0,y2:p("h",.63),x:0,y:p("h",.52)},{type:"C",x1:0,y1:p("h",.4),x2:p("w",.1),y2:p("h",.31),x:p("w",.22),y:p("h",.33)},{type:"C",x1:p("w",.24),y1:p("h",.18),x2:p("w",.38),y2:p("h",.06),x:p("w",.53),y:p("h",.08)},{type:"C",x1:p("w",.61),y1:p("h",.01),x2:p("w",.76),y2:p("h",.04),x:p("w",.82),y:p("h",.15)},{type:"C",x1:p("w",.95),y1:p("h",.14),x2:"w",y2:p("h",.26),x:p("w",.97),y:p("h",.37)},{type:"C",x1:p("w",1.05),y1:p("h",.43),x2:p("w",1.03),y2:p("h",.58),x:p("w",.91),y:p("h",.63)},{type:"C",x1:p("w",.9),y1:p("h",.76),x2:p("w",.76),y2:p("h",.85),x:p("w",.62),y:p("h",.8)},{type:"C",x1:p("w",.54),y1:p("h",.91),x2:p("w",.36),y2:p("h",.93),x:p("w",.28),y:p("h",.83)},{type:"C",x1:p("w",.18),y1:p("h",.86),x2:p("w",.11),y2:p("h",.81),x:p("w",.18),y:p("h",.72)},{type:"Z"}]}]},plaque:{guides:[c("left",p("w",.18)),c("right",p("w",.82)),c("topInset",p("h",.14)),c("sideInset",p("w",.14)),c("upper",p("h",.32)),c("lower",p("h",.68)),c("innerRight",v("w","sideInset")),c("bottomInset",v("h","topInset"))],textBounds:{left:"sideInset",top:"topInset",right:"sideInset",bottom:"topInset"},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"left",y:0},{type:"Q",x1:"cx",y1:"topInset",x:"right",y:0},{type:"Q",x1:"w",y1:p("h",.18),x:"w",y:"upper"},{type:"Q",x1:"innerRight",y1:"cy",x:"w",y:"lower"},{type:"Q",x1:"w",y1:p("h",.82),x:"right",y:"h"},{type:"Q",x1:"cx",y1:"bottomInset",x:"left",y:"h"},{type:"Q",x1:0,y1:p("h",.82),x:0,y:"lower"},{type:"Q",x1:"sideInset",y1:"cy",x:0,y:"upper"},{type:"Q",x1:0,y1:p("h",.18),x:"left",y:0},{type:"Z"}]}]},can:{guides:[c("adj",25e3),c("maxAdj",b(p(5e4,"h"),"ss")),c("a",R(0,"adj","maxAdj")),c("y1",b(p("ss","a"),2e5)),c("y2",L("y1","y1")),c("y3",v("b","y1"))],textBounds:{left:"l",top:"y2",right:"l",bottom:v("h","y3")},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"l",y:"y1"},{type:"L",x:"l",y:"y3"},{type:"A",rx:"wd2",ry:"y1",rotation:0,largeArc:false,sweep:false,x:"r",y:"y3"},{type:"L",x:"r",y:"y1"},{type:"A",rx:"wd2",ry:"y1",rotation:0,largeArc:false,sweep:true,x:"l",y:"y1"},{type:"Z"}]},{kind:"ellipse",fill:"lightenMore",cx:"hc",cy:"y1",rx:"wd2",ry:"y1",defaultJoin:"round"}]},pie:{guides:Ar(0,162e5),textBounds:{left:p("w",.146447),top:p("h",.265625),right:p("w",.146447),bottom:p("h",.265625)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"y1"},{type:"A",rx:"rx",ry:"ry",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"x2",y:"y2"},{type:"L",x:"cx",y:"cy"},{type:"Z"}]}]},chord:{guides:Ar(27e5,162e5),textBounds:{left:p("w",.146447),top:p("h",.265625),right:p("w",.146447),bottom:p("h",.265625)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"y1"},{type:"A",rx:"rx",ry:"ry",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"x2",y:"y2"},{type:"Z"}]}]},donut:{guides:[c("adj",21e3),c("a",R(0,"adj",5e4)),c("outerX",b("w",2)),c("outerY",b("h",2)),c("dr",b(p("ss","a"),1e5)),c("innerX",v("outerX","dr")),c("innerY",v("outerY","dr")),c("leftOuterX",v("cx","outerX")),c("rightOuterX",L("cx","outerX")),c("leftInnerX",v("cx","innerX")),c("rightInnerX",L("cx","innerX"))],textBounds:{left:p("w",.18),top:p("h",.18),right:p("w",.18),bottom:p("h",.18)},elements:[{kind:"path",defaultJoin:"round",fillRule:"evenodd",clipRule:"evenodd",commands:[{type:"M",x:"rightOuterX",y:"cy"},{type:"A",rx:"outerX",ry:"outerY",rotation:0,largeArc:true,sweep:true,x:"leftOuterX",y:"cy"},{type:"A",rx:"outerX",ry:"outerY",rotation:0,largeArc:true,sweep:true,x:"rightOuterX",y:"cy"},{type:"Z"},{type:"M",x:"rightInnerX",y:"cy"},{type:"A",rx:"innerX",ry:"innerY",rotation:0,largeArc:true,sweep:false,x:"leftInnerX",y:"cy"},{type:"A",rx:"innerX",ry:"innerY",rotation:0,largeArc:true,sweep:false,x:"rightInnerX",y:"cy"},{type:"Z"}]}]},arc:{guides:Ar(162e5,0),elements:[{kind:"path",fill:"none",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"y1"},{type:"A",rx:"rx",ry:"ry",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"x2",y:"y2"}]}]},leftCircularArrow:{guides:[c("adj1",21e3),c("adj2",-24e5),c("adj3",132e5),c("adj4",12e5),c("adj5",2e3),c("a1",R(0,"adj1",25e3)),c("a5",R(0,"adj5",25e3)),c("band",b(p("ss","a1"),1e5)),c("tipExtend",b(p("ss","a5"),1e5)),c("stAng",R(0,"adj4",tr)),c("enAng",R(0,"adj3",tr)),c("rawSwAng",v("enAng","stAng")),c("swAng",he(Vt("rawSwAng",0),"rawSwAng",L("rawSwAng",Fn))),c("outerX",b("w",2)),c("outerY",b("h",2)),c("innerX",v("outerX","band")),c("innerY",v("outerY","band")),c("stDeg",b("stAng",Rt)),c("enDeg",b("enAng",Rt)),c("swDeg",b("swAng",Rt)),c("largeArcFlag",Vt("swDeg",180)),c("outerStartX",L("cx",Q("outerX","stDeg"))),c("outerStartY",L("cy",K("outerY","stDeg"))),c("outerEndX",L("cx",Q("outerX","enDeg"))),c("outerEndY",L("cy",K("outerY","enDeg"))),c("innerEndX",L("cx",Q("innerX","enDeg"))),c("innerEndY",L("cy",K("innerY","enDeg"))),c("innerStartX",L("cx",Q("innerX","stDeg"))),c("innerStartY",L("cy",K("innerY","stDeg"))),c("tipAng",L("enAng","adj2")),c("tipDeg",b("tipAng",Rt)),c("tipRx",L("outerX","tipExtend")),c("tipRy",L("outerY","tipExtend")),c("tipX",L("cx",Q("tipRx","tipDeg"))),c("tipY",L("cy",K("tipRy","tipDeg")))],textBounds:{left:p("w",.18),top:p("h",.2),right:p("w",.18),bottom:p("h",.18)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"outerStartX",y:"outerStartY"},{type:"A",rx:"outerX",ry:"outerY",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"outerEndX",y:"outerEndY"},{type:"L",x:"innerEndX",y:"innerEndY"},{type:"A",rx:"innerX",ry:"innerY",rotation:0,largeArc:"largeArcFlag",sweep:false,x:"innerStartX",y:"innerStartY"},{type:"Z"}]},{kind:"polygon",defaultJoin:"round",lineJoin:"round",points:[{x:"outerEndX",y:"outerEndY"},{x:"tipX",y:"tipY"},{x:"innerEndX",y:"innerEndY"}]}]},curvedRightArrow:{guides:Nc(),elements:[{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"r",y:"t"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"l",y:"hR"},{type:"L",x:"l",y:"y3"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"r",y:"th"},{type:"Z"}]},{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"hR"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"x1",y:"y5"},{type:"L",x:"x1",y:"y4"},{type:"L",x:"r",y:"y6"},{type:"L",x:"x1",y:"b"},{type:"L",x:"x1",y:"y8"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"l",y:"y3"},{type:"Z"}]}]},curvedLeftArrow:{guides:$c(),elements:[{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"y6"},{type:"L",x:"x1",y:"y4"},{type:"L",x:"x1",y:"y5"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"outerX",y:"hR"},{type:"L",x:"outerX",y:"innerY"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"curveEndX",y:"curveEndY"},{type:"L",x:"x1",y:"b"},{type:"Z"}]},{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"t"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"outerX",y:"hR"},{type:"L",x:"outerX",y:"innerY"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"l",y:"th"},{type:"Z"}]}]},curvedUpArrow:{guides:Ic(),elements:[{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"headOuterX",y:"t"},{type:"L",x:"headBaseX",y:"th"},{type:"L",x:"headJoinX",y:"th"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"arcX",y:"h"},{type:"L",x:"bandX",y:"h"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"rightArcEndX",y:"th"},{type:"L",x:"w",y:"th"},{type:"Z"}]},{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"th",y:"t"},{type:"L",x:"l",y:"t"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"arcX",y:"h"},{type:"L",x:"bandX",y:"h"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"th",y:"t"},{type:"Z"}]}]},curvedDownArrow:{guides:Bc(),elements:[{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"b"},{type:"L",x:"th",y:"b"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"bandX",y:"t"},{type:"L",x:"arcX",y:"t"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"l",y:"b"},{type:"Z"}]},{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"headOuterX",y:"b"},{type:"L",x:"headBaseX",y:"barY"},{type:"L",x:"headJoinX",y:"barY"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"arcX",y:"t"},{type:"L",x:"bandX",y:"t"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"rightArcEndX",y:"barY"},{type:"L",x:"w",y:"barY"},{type:"Z"}]}]},smileyFace:{textBounds:{left:p("w",.14),top:p("h",.18),right:p("w",.14),bottom:p("h",.16)},guides:[c("adj",4653),c("a",R(-4653,"adj",4653)),c("rx",b("w",2)),c("ry",b("h",2)),c("eyeRadius",p("ss",1125/21600)),c("leftEyeX",p("w",6215/21600)),c("rightEyeX",p("w",13135/21600)),c("eyeY",p("h",7570/21600)),c("smileStartX",p("w",4969/21699)),c("smileBaseY",p("h",16515/21600)),c("mouthOffset",b(p("h","a"),1e5)),c("smileStartY",v("smileBaseY","mouthOffset")),c("smileEndX",p("w",16640/21600)),c("smileEndY","smileStartY"),c("smileArcLift",b(p("h","a"),5e4)),c("smileControlX",b("w",2)),c("smileControlY",L(L("smileBaseY","mouthOffset"),"smileArcLift"))],elements:[{kind:"ellipse",defaultJoin:"round",cx:"cx",cy:"cy",rx:"rx",ry:"ry"},{kind:"circle",fill:"stroke",stroke:"none",applyLineStyles:false,cx:"leftEyeX",cy:"eyeY",r:"eyeRadius"},{kind:"circle",fill:"stroke",stroke:"none",applyLineStyles:false,cx:"rightEyeX",cy:"eyeY",r:"eyeRadius"},{kind:"path",fill:"none",minStrokeWidth:2,lineCap:"round",lineJoin:"round",applyLineStyles:false,applyDashPattern:true,commands:[{type:"M",x:"smileStartX",y:"smileStartY"},{type:"Q",x1:"smileControlX",y1:"smileControlY",x:"smileEndX",y:"smileEndY"}]}]},frame:{guides:[c("adj1",12500),c("a1",R(0,"adj1",5e4)),c("x1",b(p("ss","a1"),1e5)),c("x4",v("r","x1")),c("y4",v("b","x1"))],elements:[{kind:"path",defaultJoin:"round",fillRule:"evenodd",clipRule:"evenodd",commands:[{type:"M",x:0,y:0},{type:"H",x:"w"},{type:"V",y:"h"},{type:"H",x:0},{type:"Z"},{type:"M",x:"x1",y:"x1"},{type:"V",y:"y4"},{type:"H",x:"x4"},{type:"V",y:"x1"},{type:"Z"}]}]},halfFrame:{guides:[c("adj1",33333),c("adj2",33333),c("maxAdj2",b(p(1e5,"w"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("x1",b(p("ss","a2"),1e5)),c("g1",b(p("h","x1"),"w")),c("g2",v("h","g1")),c("maxAdj1",b(p(1e5,"g2"),"ss")),c("a1",R(0,"adj1","maxAdj1")),c("y1",b(p("ss","a1"),1e5)),c("dx2",b(p("y1","w"),"h")),c("x2",v("r","dx2")),c("dy2",b(p("x1","h"),"w")),c("y2",v("b","dy2"))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"l",y:"t"},{type:"L",x:"r",y:"t"},{type:"L",x:"x2",y:"y1"},{type:"L",x:"x1",y:"y1"},{type:"L",x:"x1",y:"y2"},{type:"L",x:"l",y:"b"},{type:"Z"}]}]},corner:{guides:[c("innerX",p("w",.425834)),c("innerY",p("h",.66162))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:0,y:0},{type:"L",x:"innerX",y:0},{type:"L",x:"innerX",y:"innerY"},{type:"L",x:"w",y:"innerY"},{type:"L",x:"w",y:"h"},{type:"L",x:0,y:"h"},{type:"Z"}]}]},diagStripe:{guides:[c("insetX",p("w",.40909)),c("insetY",p("h",.40909))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"insetX",y:0},{type:"L",x:"w",y:0},{type:"L",x:0,y:"h"},{type:"L",x:0,y:"insetY"},{type:"Z"}]}]},plus:{guides:[c("adj",25e3),c("a",R(0,"adj",5e4)),c("armInset",b(p("ss","a"),1e5)),c("armX1","armInset"),c("armX2",v("w","armInset")),c("armY1","armInset"),c("armY2",v("h","armInset"))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"armX1",y:0},{type:"L",x:"armX2",y:0},{type:"L",x:"armX2",y:"armY1"},{type:"L",x:"w",y:"armY1"},{type:"L",x:"w",y:"armY2"},{type:"L",x:"armX2",y:"armY2"},{type:"L",x:"armX2",y:"h"},{type:"L",x:"armX1",y:"h"},{type:"L",x:"armX1",y:"armY2"},{type:"L",x:0,y:"armY2"},{type:"L",x:0,y:"armY1"},{type:"L",x:"armX1",y:"armY1"},{type:"Z"}]}]},noSmoking:{guides:[c("adj",18750),c("a",R(0,"adj",5e4)),c("dr",b(p("ss","a"),1e5)),c("iwd2",v("wd2","dr")),c("ihd2",v("hd2","dr")),c("ang",Te("w","h")),c("angDeg",b("ang",Rt)),c("ct",Q("ihd2","angDeg")),c("st",K("iwd2","angDeg")),c("m",Qe("ct","st",0)),c("n",b(p("iwd2","ihd2"),"m")),c("drd2",b("dr",2)),c("dang",Te("n","drd2")),c("2dang",L("dang","dang")),c("swAng",L(v(0,"cd2"),"2dang")),c("t3",Te("w","h")),c("stAng1",v("t3","dang")),c("stAng2",v("stAng1","cd2")),c("stAng1Deg",b("stAng1",Rt)),c("ct1",Q("ihd2","stAng1Deg")),c("st1",K("iwd2","stAng1Deg")),c("m1",Qe("ct1","st1",0)),c("n1",b(p("iwd2","ihd2"),"m1")),c("dx1",Q("n1","stAng1Deg")),c("dy1",K("n1","stAng1Deg")),c("x1",L("hc","dx1")),c("y1",L("vc","dy1")),c("x2",v("hc","dx1")),c("y2",v("vc","dy1")),c("idx",Q("wd2",b(27e5,Rt))),c("idy",K("hd2",b(27e5,Rt))),c("il",v("hc","idx")),c("ir",L("hc","idx")),c("it",v("vc","idy")),c("ib",L("vc","idy"))],textBounds:{left:"il",top:"it",right:v("w","ir"),bottom:v("h","ib")},elements:[{kind:"path",fillRule:"evenodd",clipRule:"evenodd",commands:[{type:"M",x:"l",y:"vc"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:"cd2",sweepAngle:"cd4"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:"3cd4",sweepAngle:"cd4"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:0,sweepAngle:"cd4"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:"cd4",sweepAngle:"cd4"},{type:"Z"},{type:"M",x:"x1",y:"y1"},{type:"OA",rx:"iwd2",ry:"ihd2",startAngle:"stAng1",sweepAngle:"swAng"},{type:"Z"},{type:"M",x:"x2",y:"y2"},{type:"OA",rx:"iwd2",ry:"ihd2",startAngle:"stAng2",sweepAngle:"swAng"},{type:"Z"}]}]},bevel:{guides:[c("adj",12500),c("a",R(0,"adj",5e4)),c("x1",b(p("ss","a"),1e5)),c("x2",v("r","x1")),c("y2",v("b","x1"))],textBounds:{left:"x1",top:"x1",right:"x1",bottom:v("h","y2")},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"x1"},{type:"L",x:"x2",y:"x1"},{type:"L",x:"x2",y:"y2"},{type:"L",x:"x1",y:"y2"},{type:"Z"}]},{kind:"path",fill:"lightenLess",defaultJoin:"round",commands:[{type:"M",x:"l",y:"t"},{type:"L",x:"r",y:"t"},{type:"L",x:"x2",y:"x1"},{type:"L",x:"x1",y:"x1"},{type:"Z"}]},{kind:"path",fill:"darken",defaultJoin:"round",commands:[{type:"M",x:"l",y:"b"},{type:"L",x:"x1",y:"y2"},{type:"L",x:"x2",y:"y2"},{type:"L",x:"r",y:"b"},{type:"Z"}]},{kind:"path",fill:"lighten",defaultJoin:"round",commands:[{type:"M",x:"l",y:"t"},{type:"L",x:"x1",y:"x1"},{type:"L",x:"x1",y:"y2"},{type:"L",x:"l",y:"b"},{type:"Z"}]},{kind:"path",fill:"darken",defaultJoin:"round",commands:[{type:"M",x:"r",y:"t"},{type:"L",x:"x2",y:"x1"},{type:"L",x:"x2",y:"y2"},{type:"L",x:"r",y:"b"},{type:"Z"}]}]},chevron:{guides:[c("adj",5e4),c("maxAdj",b(p(1e5,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x1",b(p("ss","a"),1e5)),c("x2",v("w","x1"))],textBounds:{left:"x1",top:p("h",.12),right:v("w","x2"),bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:0},{x:"x2",y:0},{x:"w",y:"cy"},{x:"x2",y:"h"},{x:0,y:"h"},{x:"x1",y:"cy"}]}]},parallelogram:{guides:[c("adj",25e3),c("maxAdj",b(p(1e5,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x2",b(p("ss","a"),1e5)),c("x5",v("w","x2"))],textBounds:{left:"x2",top:p("h",.12),right:"x2",bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"h"},{x:"x2",y:0},{x:"w",y:0},{x:"x5",y:"h"}]}]},trapezoid:{guides:[c("adj",25e3),c("maxAdj",b(p(5e4,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x2",b(p("ss","a"),1e5)),c("x3",v("w","x2"))],textBounds:{left:"x2",top:p("h",.12),right:"x2",bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"h"},{x:"x2",y:0},{x:"x3",y:0},{x:"w",y:"h"}]}]},hexagon:{guides:[c("adj",25e3),c("vf",115470),c("maxAdj",b(p(5e4,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x1",b(p("ss","a"),1e5)),c("x2",v("w","x1")),c("vr",b(p("cy","vf"),1e5)),c("yInset",K("vr",120)),c("y1",v("cy","yInset")),c("y2",L("cy","yInset"))],textBounds:{left:"x1",top:"y1",right:"x1",bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"cy"},{x:"x1",y:"y1"},{x:"x2",y:"y1"},{x:"w",y:"cy"},{x:"x2",y:"y2"},{x:"x1",y:"y2"}]}]},heptagon:kr(7,-90),triangle:{guides:[c("adj",5e4),c("a",R(0,"adj",1e5)),c("x2",b(p("w","a"),1e5))],textBounds:{left:p("w",.16),top:p("h",.3),right:p("w",.16),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"h"},{x:"x2",y:0},{x:"w",y:"h"}]}]},pentagon:{guides:[c("y1",p("h",.3819660113)),c("x2",p("w",.1909830056)),c("x3",p("w",.8090169944))],textBounds:{left:"x2",top:"y1",right:v("w","x3"),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"y1"},{x:"cx",y:0},{x:"w",y:"y1"},{x:"x3",y:"h"},{x:"x2",y:"h"}]}]},octagon:{guides:[c("adj",29289),c("a",R(0,"adj",5e4)),c("x1",b(p("ss","a"),1e5)),c("x2",v("w","x1")),c("y2",v("h","x1"))],textBounds:{left:b("x1",2),top:b("x1",2),right:b("x1",2),bottom:b("x1",2)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"x1"},{x:"x1",y:0},{x:"x2",y:0},{x:"w",y:"x1"},{x:"w",y:"y2"},{x:"x2",y:"h"},{x:"x1",y:"h"},{x:0,y:"y2"}]}]},decagon:kr(10,-90),dodecagon:kr(12,-90),diamond:{textBounds:{left:p("w",.18),top:p("h",.16),right:p("w",.18),bottom:p("h",.16)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:"cx",y:0},{x:"w",y:"cy"},{x:"cx",y:"h"},{x:0,y:"cy"}]}]},rtTriangle:{textBounds:{left:p("w",.16),top:p("h",.28),right:p("w",.16),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:0},{x:"w",y:"h"},{x:0,y:"h"}]}]},star5:{guides:[c("adj",19098),c("a",R(0,"adj",5e4)),c("innerRx",b(p("cx","a"),5e4)),c("innerRy",b(p("cy","a"),5e4))],textBounds:{left:p("w",.24),top:p("h",.22),right:p("w",.24),bottom:p("h",.26)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:L("cx",Q("cx",-90)),y:L("cy",K("cy",-90))},{x:L("cx",Q("innerRx",-54)),y:L("cy",K("innerRy",-54))},{x:L("cx",Q("cx",-18)),y:L("cy",K("cy",-18))},{x:L("cx",Q("innerRx",18)),y:L("cy",K("innerRy",18))},{x:L("cx",Q("cx",54)),y:L("cy",K("cy",54))},{x:L("cx",Q("innerRx",90)),y:L("cy",K("innerRy",90))},{x:L("cx",Q("cx",126)),y:L("cy",K("cy",126))},{x:L("cx",Q("innerRx",162)),y:L("cy",K("innerRy",162))},{x:L("cx",Q("cx",198)),y:L("cy",K("cy",198))},{x:L("cx",Q("innerRx",234)),y:L("cy",K("innerRy",234))}]}]},teardrop:{guides:[c("adj",1e5),c("a",R(0,"adj",2e5)),c("tipDx",b(p("w","a"),2e5)),c("tipDy",b(p("h","a"),2e5)),c("tipX",L("cx","tipDx")),c("tipY",v("cy","tipDy")),c("topCtrlX",L("cx",b("tipDx",2))),c("rightCtrlY",v("cy",b("tipDy",2)))],textBounds:{left:p("w",.146447),top:p("h",.277228),right:p("w",.146447),bottom:p("h",.277228)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"w",y:"cy"},{type:"A",rx:"cx",ry:"cy",rotation:0,largeArc:true,sweep:true,x:"cx",y:0},{type:"Q",x1:"topCtrlX",y1:0,x:"tipX",y:"tipY"},{type:"Q",x1:"w",y1:"rightCtrlY",x:"w",y:"cy"}]}]},homePlate:{guides:[c("adj",5e4),c("a",R(0,"adj",1e5)),c("depth",b(p("h","a"),1e5)),c("x1",v("w","depth"))],textBounds:{left:p("w",.08),top:p("h",.12),right:v("w","x1"),bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:0},{x:"x1",y:0},{x:"w",y:"cy"},{x:"x1",y:"h"},{x:0,y:"h"}]}]},rightArrow:{guides:[c("adj1",47500),c("adj2",26e3),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("headDepth",Jt(b(p("w",R(0,"adj2",1e5)),1e5),"hd2")),c("headStart",v("w","headDepth")),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:p("w",.08),top:"y1",right:v("w","headStart"),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:"y1"},{x:"headStart",y:"y1"},{x:"headStart",y:0},{x:"w",y:"cy"},{x:"headStart",y:"h"},{x:"headStart",y:"y2"},{x:0,y:"y2"}]}]},notchedRightArrow:{guides:[c("adj1",5e4),c("adj2",2e4),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("headStart",v("w",b(p("w",R(0,"adj2",1e5)),1e5))),c("notchX",Jt("shaftInset",v("headStart",1))),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:p("w",.08),top:"y1",right:v("w","headStart"),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:"y1"},{x:"headStart",y:"y1"},{x:"headStart",y:0},{x:"w",y:"cy"},{x:"headStart",y:"h"},{x:"headStart",y:"y2"},{x:0,y:"y2"},{x:"notchX",y:"cy"}]}]},leftArrow:{guides:[c("adj1",5e4),c("adj2",26e3),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("headEnd",Jt(b(p("w",R(0,"adj2",1e5)),1e5),"hd2")),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:"headEnd",top:"y1",right:p("w",.08),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"w",y:"y1"},{x:"headEnd",y:"y1"},{x:"headEnd",y:0},{x:0,y:"cy"},{x:"headEnd",y:"h"},{x:"headEnd",y:"y2"},{x:"w",y:"y2"}]}]},leftRightArrow:{guides:[c("adj1",5e4),c("adj2",24e3),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("sideInsetRaw",b(p("w",R(0,"adj2",5e4)),1e5)),c("sideInset",Jt("sideInsetRaw","hd2")),c("rightInset",v("w","sideInset")),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:"sideInset",top:"y1",right:"sideInset",bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"sideInset",y:"y1"},{x:"rightInset",y:"y1"},{x:"rightInset",y:0},{x:"w",y:"cy"},{x:"rightInset",y:"h"},{x:"rightInset",y:"y2"},{x:"sideInset",y:"y2"},{x:"sideInset",y:"h"},{x:0,y:"cy"},{x:"sideInset",y:0}]}]},upArrow:{guides:[c("adj1",5e4),c("adj2",25e3),c("shaftLeft",b(p("w",R(0,"adj1",1e5)),2e5)),c("shaftRight",v("w","shaftLeft")),c("headBaseYRaw",b(p("h",R(0,"adj2",1e5)),1e5)),c("headBaseY",Jt("headBaseYRaw","wd2"))],textBounds:{left:"shaftLeft",top:"headBaseY",right:v("w","shaftRight"),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"shaftLeft",y:"headBaseY"},{x:"shaftLeft",y:"h"},{x:"shaftRight",y:"h"},{x:"shaftRight",y:"headBaseY"},{x:"w",y:"headBaseY"},{x:"cx",y:0},{x:0,y:"headBaseY"}]}]},downArrow:{guides:[c("adj1",5e4),c("adj2",75e3),c("shaftLeft",b(p("w",R(0,"adj1",1e5)),2e5)),c("shaftRight",v("w","shaftLeft")),c("headBaseYRaw",b(p("h",R(0,"adj2",1e5)),1e5)),c("headBaseY",Jt("headBaseYRaw",v("h",1)))],textBounds:{left:"shaftLeft",top:p("h",.08),right:v("w","shaftRight"),bottom:v("h","headBaseY")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"shaftLeft",y:0},{x:"shaftLeft",y:"headBaseY"},{x:0,y:"headBaseY"},{x:"cx",y:"h"},{x:"w",y:"headBaseY"},{x:"shaftRight",y:"headBaseY"},{x:"shaftRight",y:0}]}]},quadArrow:{guides:[c("adj1",22500),c("adj2",22500),c("adj3",22500),c("shaftHalf",b(p("ss",R(0,"adj2",5e4)),1e5)),c("maxArmHalf",b(v(1e5,p(R(0,"adj2",5e4),2)),2)),c("armHalf",b(p("ss",R(0,"adj1",L(R(0,"adj2",5e4),R(0,"adj2",5e4)))),2e5)),c("headInset",b(p("ss",R(0,"adj3","maxArmHalf")),1e5)),c("armX1",v("cx","armHalf")),c("armX2",L("cx","armHalf")),c("shaftX1",v("cx","shaftHalf")),c("shaftX2",L("cx","shaftHalf")),c("armY1",v("cy","armHalf")),c("armY2",L("cy","armHalf")),c("shaftY1",v("cy","shaftHalf")),c("shaftY2",L("cy","shaftHalf")),c("headRightX",v("w","headInset")),c("headBottomY",v("h","headInset")),c("textInsetX",b(p("armHalf","headInset"),le("shaftHalf",1)))],textBounds:{left:"textInsetX",top:"armY1",right:v("w",v("w","textInsetX")),bottom:v("h","armY2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:"cy"},{x:"headInset",y:"shaftY1"},{x:"headInset",y:"armY1"},{x:"armX1",y:"armY1"},{x:"armX1",y:"headInset"},{x:"shaftX1",y:"headInset"},{x:"cx",y:0},{x:"shaftX2",y:"headInset"},{x:"armX2",y:"headInset"},{x:"armX2",y:"armY1"},{x:"headRightX",y:"armY1"},{x:"headRightX",y:"shaftY1"},{x:"w",y:"cy"},{x:"headRightX",y:"shaftY2"},{x:"headRightX",y:"armY2"},{x:"armX2",y:"armY2"},{x:"armX2",y:"headBottomY"},{x:"shaftX2",y:"headBottomY"},{x:"cx",y:"h"},{x:"shaftX1",y:"headBottomY"},{x:"armX1",y:"headBottomY"},{x:"armX1",y:"armY2"},{x:"headInset",y:"armY2"},{x:"headInset",y:"shaftY2"}]}]},leftRightUpArrow:{guides:[c("sideHeadInset",p("w",28.35/175)),c("sideShoulderY",p("h",69.3/126)),c("topHeadBaseY",p("h",28.35/126)),c("topHeadInnerLeft",p("w",59.15/175)),c("shaftLeft",p("w",73.325/175)),c("shaftRight",p("w",101.675/175)),c("topHeadInnerRight",p("w",115.85/175)),c("barRight",p("w",146.65/175)),c("barTop",p("h",83.475/126)),c("barMid",p("h",97.65/126)),c("barBottom",p("h",111.825/126))],textBounds:{left:p("w",.2),top:"topHeadBaseY",right:p("w",.2),bottom:v("h","barBottom")},elements:[{kind:"path",defaultJoin:"round",coerceMiterJoin:"round",commands:[{type:"M",x:"l",y:"barMid"},{type:"L",x:"sideHeadInset",y:"sideShoulderY"},{type:"L",x:"sideHeadInset",y:"barTop"},{type:"L",x:"shaftLeft",y:"barTop"},{type:"L",x:"shaftLeft",y:"topHeadBaseY"},{type:"L",x:"topHeadInnerLeft",y:"topHeadBaseY"},{type:"L",x:"hc",y:"t"},{type:"L",x:"topHeadInnerRight",y:"topHeadBaseY"},{type:"L",x:"shaftRight",y:"topHeadBaseY"},{type:"L",x:"shaftRight",y:"barTop"},{type:"L",x:"barRight",y:"barTop"},{type:"L",x:"barRight",y:"sideShoulderY"},{type:"L",x:"r",y:"barMid"},{type:"L",x:"barRight",y:"b"},{type:"L",x:"barRight",y:"barBottom"},{type:"L",x:"sideHeadInset",y:"barBottom"},{type:"L",x:"sideHeadInset",y:"b"},{type:"Z"}]}]},bentArrow:{guides:[c("adj1",26e3),c("adj2",42e3),c("adj3",18e3),c("a1",R(12e3,"adj1",38e3)),c("a2",R(26e3,"adj2",76e3)),c("a3",R(16e3,"adj3",42e3)),c("th",b(p("ss","a1"),1e5)),c("headLen",b(p("ss","a3"),1e5)),c("shaftEndX",le(L("th",1),v("w","headLen"))),c("bendRaw",b(p("ss","a2"),1e5)),c("bend",Jt("bendRaw",v("shaftEndX",1),v("h",1))),c("topGap",le(b("th",2),p("ss",.1))),c("inner",le(v(v("bend","th"),"topGap"),1)),c("headH",le(L("th",p("th",.12)),p("ss",.24))),c("headHalf",b("headH",2)),c("headMid",L("topGap","headHalf")),c("headBottom",L("topGap","headH")),c("innerArcStartX",L("th","topGap"))],textBounds:{left:p("w",.08),top:p("h",.18),right:p("w",.22),bottom:p("h",.18)},elements:[{kind:"path",defaultJoin:"round",coerceMiterJoin:"round",commands:[{type:"M",x:"w",y:"headMid"},{type:"L",x:"shaftEndX",y:"topGap"},{type:"L",x:"bend",y:"topGap"},{type:"OA",rx:v("bend","topGap"),ry:v("bend","topGap"),startAngle:"3cd4",sweepAngle:-54e5},{type:"L",x:0,y:"bend"},{type:"L",x:0,y:"h"},{type:"L",x:"th",y:"h"},{type:"L",x:"th",y:"bend"},{type:"L",x:"innerArcStartX",y:"bend"},{type:"OA",rx:"inner",ry:"inner",startAngle:"cd2",sweepAngle:"cd4"},{type:"L",x:"shaftEndX",y:L("topGap","th")},{type:"L",x:"shaftEndX",y:"headBottom"},{type:"Z"}]}]},uturnArrow:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",3e4),c("adj4",45e3),c("adj5",45e3),c("a2",R(0,"adj2",25e3)),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("q2",b(p("a1","ss"),"h")),c("q3",v(1e5,"q2")),c("maxAdj3",b(p("q3","h"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("q1",L("a3","a1")),c("minAdj5",b(p("q1","ss"),"h")),c("a5",R("minAdj5","adj5",1e5)),c("th",b(p("ss","a1"),1e5)),c("aw2",b(p("ss","a2"),1e5)),c("th2",b("th",2)),c("dh2",v("aw2","th2")),c("y5",b(p("h","a5"),1e5)),c("ah",b(p("ss","a3"),1e5)),c("y4",v("y5","ah")),c("x9",v("r","dh2")),c("bw",b("x9",2)),c("bs",Jt("bw","y4")),c("maxAdj4",b(p("bs",1e5),"ss")),c("a4",R(0,"adj4","maxAdj4")),c("bd",b(p("ss","a4"),1e5)),c("bd3",v("bd","th")),c("bd2",le("bd3",0)),c("x3",L("th","bd2")),c("x8",v("r","aw2")),c("x6",v("x8","aw2")),c("x7",L("x6","dh2")),c("x4",v("x9","bd")),c("x5",v("x7","bd2"))],elements:[{kind:"path",defaultJoin:"round",coerceMiterJoin:"round",commands:[{type:"M",x:"l",y:"b"},{type:"L",x:"l",y:"bd"},{type:"OA",rx:"bd",ry:"bd",startAngle:"cd2",sweepAngle:"cd4"},{type:"L",x:"x4",y:"t"},{type:"OA",rx:"bd",ry:"bd",startAngle:"3cd4",sweepAngle:"cd4"},{type:"L",x:"x9",y:"y4"},{type:"L",x:"r",y:"y4"},{type:"L",x:"x8",y:"y5"},{type:"L",x:"x6",y:"y4"},{type:"L",x:"x7",y:"y4"},{type:"L",x:"x7",y:"x3"},{type:"OA",rx:"bd2",ry:"bd2",startAngle:0,sweepAngle:-54e5},{type:"L",x:"x3",y:"th"},{type:"OA",rx:"bd2",ry:"bd2",startAngle:"3cd4",sweepAngle:-54e5},{type:"L",x:"th",y:"b"},{type:"Z"}]}]},leftUpArrow:{guides:[c("sideX",p("w",.25)),c("headBaseY",p("h",29.25/123)),c("armY",p("h",64.5/123)),c("barY",p("h",79.125/123)),c("leftShoulderY",p("h",93.75/123)),c("bodyBottomY",p("h",108.375/123)),c("shaftLeft",p("w",.625)),c("headLeft",p("w",.5)),c("headTipX",p("w",.75)),c("shaftRight",p("w",.875))],textBounds:{left:"sideX",top:"barY",right:v("w","shaftRight"),bottom:v("h","bodyBottomY")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"leftShoulderY"},{x:"sideX",y:"armY"},{x:"sideX",y:"barY"},{x:"shaftLeft",y:"barY"},{x:"shaftLeft",y:"headBaseY"},{x:"headLeft",y:"headBaseY"},{x:"headTipX",y:"t"},{x:"r",y:"headBaseY"},{x:"shaftRight",y:"headBaseY"},{x:"shaftRight",y:"bodyBottomY"},{x:"sideX",y:"bodyBottomY"},{x:"sideX",y:"b"}]}]},bentUpArrow:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",25e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("a3",R(0,"adj3",5e4)),c("y1",b(p("ss","a3"),1e5)),c("dx1",b(p("ss","a2"),5e4)),c("x1",v("r","dx1")),c("dx3",b(p("ss","a2"),1e5)),c("x3",v("r","dx3")),c("dx2",b(p("ss","a1"),2e5)),c("x2",v("x3","dx2")),c("x4",L("x3","dx2")),c("dy2",b(p("ss","a1"),1e5)),c("y2",v("b","dy2"))],textBounds:{left:"l",top:"y2",right:v("w","x4"),bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"y2"},{x:"x2",y:"y2"},{x:"x2",y:"y1"},{x:"x1",y:"y1"},{x:"x3",y:"t"},{x:"r",y:"y1"},{x:"x4",y:"y1"},{x:"x4",y:"b"},{x:"l",y:"b"}]}]},rightArrowCallout:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",25e3),c("adj4",64977),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("maxAdj3",b(p(1e5,"w"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("q2",b(p("a3","ss"),"w")),c("maxAdj4",v(1e5,"q2")),c("a4",R(0,"adj4","maxAdj4")),c("dy1",b(p("ss","a2"),1e5)),c("dy2",b(p("ss","a1"),2e5)),c("y1",v("vc","dy1")),c("y2",v("vc","dy2")),c("y3",L("vc","dy2")),c("y4",L("vc","dy1")),c("dx3",b(p("ss","a3"),1e5)),c("x3",v("r","dx3")),c("x2",b(p("w","a4"),1e5)),c("x1",b("x2",2))],textBounds:{left:"l",top:"t",right:v("w","x2"),bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"t"},{x:"x2",y:"t"},{x:"x2",y:"y2"},{x:"x3",y:"y2"},{x:"x3",y:"y1"},{x:"r",y:"vc"},{x:"x3",y:"y4"},{x:"x3",y:"y3"},{x:"x2",y:"y3"},{x:"x2",y:"b"},{x:"l",y:"b"}]}]},leftArrowCallout:{guides:[c("headRight",p("w",22/120)),c("bodyLeft",p("w",42.028/120)),c("headTop",p("h",22/88)),c("shaftTop",p("h",33/88)),c("shaftBottom",p("h",55/88)),c("headBottom",p("h",66/88))],textBounds:{left:"bodyLeft",top:"t",right:"l",bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"vc"},{x:"headRight",y:"headTop"},{x:"headRight",y:"shaftTop"},{x:"bodyLeft",y:"shaftTop"},{x:"bodyLeft",y:0},{x:"r",y:0},{x:"r",y:"b"},{x:"bodyLeft",y:"b"},{x:"bodyLeft",y:"shaftBottom"},{x:"headRight",y:"shaftBottom"},{x:"headRight",y:"headBottom"}]}]},leftRightArrowCallout:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",25e3),c("adj4",48123),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("maxAdj3",b(p(5e4,"w"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("q2",b(p("a3","ss"),"wd2")),c("maxAdj4",v(1e5,"q2")),c("a4",R(0,"adj4","maxAdj4")),c("dy1",b(p("ss","a2"),1e5)),c("dy2",b(p("ss","a1"),2e5)),c("y1",v("vc","dy1")),c("y2",v("vc","dy2")),c("y3",L("vc","dy2")),c("y4",L("vc","dy1")),c("x1",b(p("ss","a3"),1e5)),c("x4",v("r","x1")),c("dx2",b(p("w","a4"),2e5)),c("x2",v("hc","dx2")),c("x3",L("hc","dx2"))],textBounds:{left:"x2",top:"t",right:v("w","x3"),bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"vc"},{x:"x1",y:"y1"},{x:"x1",y:"y2"},{x:"x2",y:"y2"},{x:"x2",y:"t"},{x:"x3",y:"t"},{x:"x3",y:"y2"},{x:"x4",y:"y2"},{x:"x4",y:"y1"},{x:"r",y:"vc"},{x:"x4",y:"y4"},{x:"x4",y:"y3"},{x:"x3",y:"y3"},{x:"x3",y:"b"},{x:"x2",y:"b"},{x:"x2",y:"y3"},{x:"x1",y:"y3"},{x:"x1",y:"y4"}]}]},upArrowCallout:{guides:[c("bodyTop",p("h",29.76955/85)),c("neckTop",p("h",21.25/85)),c("shaftLeft",p("w",48.375/118)),c("shaftRight",p("w",69.625/118)),c("neckLeft",p("w",37.75/118)),c("neckRight",p("w",80.25/118))],textBounds:{left:"l",top:"bodyTop",right:"l",bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"bodyTop"},{x:"shaftLeft",y:"bodyTop"},{x:"shaftLeft",y:"neckTop"},{x:"neckLeft",y:"neckTop"},{x:"hc",y:"t"},{x:"neckRight",y:"neckTop"},{x:"shaftRight",y:"neckTop"},{x:"shaftRight",y:"bodyTop"},{x:"r",y:"bodyTop"},{x:"r",y:"b"},{x:"l",y:"b"}]}]},quadArrowCallout:{guides:[c("adj1",18515),c("adj2",18515),c("adj3",18515),c("adj4",48123),c("a2",R(0,"adj2",5e4)),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("maxAdj3",v(5e4,"a2")),c("a3",R(0,"adj3","maxAdj3")),c("q2",p("a3",2)),c("maxAdj4",v(1e5,"q2")),c("a4",R("a1","adj4","maxAdj4")),c("dx2",b(p("ss","a2"),1e5)),c("dx3",b(p("ss","a1"),2e5)),c("ah",b(p("ss","a3"),1e5)),c("dx1",b(p("w","a4"),2e5)),c("dy1",b(p("h","a4"),2e5)),c("x8",v("r","ah")),c("x2",v("hc","dx1")),c("x7",L("hc","dx1")),c("x3",v("hc","dx2")),c("x6",L("hc","dx2")),c("x4",v("hc","dx3")),c("x5",L("hc","dx3")),c("y8",v("b","ah")),c("y2",v("vc","dy1")),c("y7",L("vc","dy1")),c("y3",v("vc","dx2")),c("y6",L("vc","dx2")),c("y4",v("vc","dx3")),c("y5",L("vc","dx3"))],textBounds:{left:"x2",top:"y2",right:v("w","x7"),bottom:v("h","y7")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"vc"},{x:"ah",y:"y3"},{x:"ah",y:"y4"},{x:"x2",y:"y4"},{x:"x2",y:"y2"},{x:"x4",y:"y2"},{x:"x4",y:"ah"},{x:"x3",y:"ah"},{x:"hc",y:"t"},{x:"x6",y:"ah"},{x:"x5",y:"ah"},{x:"x5",y:"y2"},{x:"x7",y:"y2"},{x:"x7",y:"y4"},{x:"x8",y:"y4"},{x:"x8",y:"y3"},{x:"r",y:"vc"},{x:"x8",y:"y6"},{x:"x8",y:"y5"},{x:"x7",y:"y5"},{x:"x7",y:"y7"},{x:"x5",y:"y7"},{x:"x5",y:"y8"},{x:"x6",y:"y8"},{x:"hc",y:"b"},{x:"x3",y:"y8"},{x:"x4",y:"y8"},{x:"x4",y:"y7"},{x:"x2",y:"y7"},{x:"x2",y:"y5"},{x:"ah",y:"y5"},{x:"ah",y:"y6"}]}]},stripedRightArrow:{guides:[c("stripeWidth",p("w",1.9375/157)),c("stripeGap",p("w",1.9375/157)),c("stripeX1",0),c("stripeX2",p("w",3.875/157)),c("bodyLeft",p("w",9.6875/157)),c("headStart",p("w",126/157)),c("shaftInset",p("h",.25)),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:"bodyLeft",top:"y1",right:v("w","headStart"),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"bodyLeft",y:"y1"},{x:"headStart",y:"y1"},{x:"headStart",y:0},{x:"w",y:"cy"},{x:"headStart",y:"h"},{x:"headStart",y:"y2"},{x:"bodyLeft",y:"y2"}]},{kind:"polygon",fill:"stroke",stroke:"none",applyLineStyles:false,points:[{x:"stripeX1",y:"y1"},{x:L("stripeX1","stripeWidth"),y:"y1"},{x:L("stripeX1","stripeWidth"),y:"y2"},{x:"stripeX1",y:"y2"}]},{kind:"polygon",fill:"stroke",stroke:"none",applyLineStyles:false,points:[{x:"stripeX2",y:"y1"},{x:L("stripeX2","stripeWidth"),y:"y1"},{x:L("stripeX2","stripeWidth"),y:"y2"},{x:"stripeX2",y:"y2"}]}]},cube:{guides:[c("adj",25e3),c("a",R(0,"adj",1e5)),c("y1",b(p("ss","a"),1e5)),c("y4",v("b","y1")),c("y2",b("y4",2)),c("y3",b(L("y1","b"),2)),c("x4",v("r","y1")),c("x2",b("x4",2)),c("x3",b(L("y1","r"),2))],textBounds:{left:"l",top:"y1",right:v("w","x4"),bottom:"t"},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"l",y:"y1"},{type:"L",x:"x4",y:"y1"},{type:"L",x:"x4",y:"b"},{type:"L",x:"l",y:"b"},{type:"Z"}]},{kind:"path",fill:"darken",defaultJoin:"round",commands:[{type:"M",x:"x4",y:"y1"},{type:"L",x:"r",y:"t"},{type:"L",x:"r",y:"y4"},{type:"L",x:"x4",y:"b"},{type:"Z"}]},{kind:"path",fill:"lightenLess",defaultJoin:"round",commands:[{type:"M",x:"l",y:"y1"},{type:"L",x:"y1",y:"t"},{type:"L",x:"r",y:"t"},{type:"L",x:"x4",y:"y1"},{type:"Z"}]}]}},Pc={left:0,top:0,right:0,bottom:0},Fi={upDownArrow:{base:"leftRightArrow",swapAxes:true,transform:"rotate90"}};function Ai(t,e){const r=Fi[t];if(r){const d=r.swapAxes?{...e,width:e.height,height:e.width}:e,l=Ai(r.base,d);if(!l)return;if(!r.transform)return l;const u=document.createElementNS("http://www.w3.org/2000/svg","g");return u.appendChild(l),u.setAttribute("transform",Oc(r.transform,e)),u}const n=Si[t];if(!n)return;const a=Object.entries(e.adjustments??{}).map(([d,l])=>({name:d,value:l})),i=wi(e.width,e.height,[...n.guides??[],...a]),o=n.elements.map(d=>Hc(d,e,i));if(o.length===1)return o[0];const s=document.createElementNS("http://www.w3.org/2000/svg","g");for(const d of o)s.appendChild(d);return s}function ki(t,e){const r=Fi[t];if(r){const o=r.swapAxes?{...e,width:e.height,height:e.width}:e,s=ki(r.base,o);return s?r.transform?Dc(s,r.transform,e.width,e.height):s:void 0}const n=Si[t];if(!(n!=null&&n.textBounds))return;const a=Object.entries(e.adjustments??{}).map(([o,s])=>({name:o,value:s})),i=wi(e.width,e.height,[...n.guides??[],...a]);return{left:i.resolve(n.textBounds.left),top:i.resolve(n.textBounds.top),right:i.resolve(n.textBounds.right),bottom:i.resolve(n.textBounds.bottom)}}function Oc(t,e){switch(t){case"mirrorX":return`translate(${W(e.width)} 0) scale(-1 1)`;case"rotate90":return`translate(${W(e.width)} 0) rotate(90)`;case"rotate-90":return`translate(0 ${W(e.height)}) rotate(-90)`;default:return""}}function Dc(t,e,r,n){switch(e){case"mirrorX":return{left:t.right,top:t.top,right:t.left,bottom:t.bottom};case"rotate90":return{left:t.bottom,top:t.left,right:t.top,bottom:t.right};case"rotate-90":return{left:t.top,top:t.right,right:t.bottom,bottom:t.left};default:return Pc}}function Hc(t,e,r){const n=zc(t,r);return Uc(n,t,e,r),n}function zc(t,e){switch(t.kind){case"path":{const r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",Ec(t.commands,e)),r}case"polygon":{const r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",jc(t.points,e)),r}case"ellipse":{const r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",W(e.resolve(t.cx))),r.setAttribute("cy",W(e.resolve(t.cy))),r.setAttribute("rx",W(e.resolve(t.rx))),r.setAttribute("ry",W(e.resolve(t.ry))),r}case"circle":{const r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",W(e.resolve(t.cx))),r.setAttribute("cy",W(e.resolve(t.cy))),r.setAttribute("r",W(e.resolve(t.r))),r}default:return document.createElementNS("http://www.w3.org/2000/svg","g")}}function Uc(t,e,r,n){var s,d;const a=da(e.fill,r),i=da(e.stroke??"stroke",r),o=Xc(e,r,n);if(t.setAttribute("fill",a),t.setAttribute("stroke",i),i!=="none"?t.setAttribute("stroke-width",String(o)):t.removeAttribute("stroke-width"),e.fillRule&&t.setAttribute("fill-rule",e.fillRule),e.clipRule&&t.setAttribute("clip-rule",e.clipRule),e.fillOpacity!=null){const l=a==="transparent"?0:e.fillOpacity;t.setAttribute("fill-opacity",W(l))}e.applyLineStyles!==false&&i!=="none"&&r.applyLineStyles(t,r.line,{defaultJoin:e.defaultJoin}),e.applyDashPattern&&(e.applyLineStyles===false||i==="none")&&r.applyDashPattern(t,r.line),e.lineCap&&t.setAttribute("stroke-linecap",e.lineCap),e.defaultJoin&&e.defaultJoin!=="miter"&&((s=r.line)==null?void 0:s.lineJoin)==="miter"&&t.setAttribute("stroke-linejoin",e.defaultJoin),e.coerceMiterJoin&&((d=r.line)==null?void 0:d.lineJoin)==="miter"&&t.setAttribute("stroke-linejoin",e.coerceMiterJoin),e.lineJoin&&t.setAttribute("stroke-linejoin",e.lineJoin)}function da(t,e){switch(t){case void 0:case"fill":return e.fill;case"lightenMore":return Se(e.fill,"lightenMore");case"lighten":return Se(e.fill,"lighten");case"lightenLess":return Se(e.fill,"lightenLess");case"darken":return Se(e.fill,"darken");case"darkenLess":return Se(e.fill,"darkenLess");case"stroke":return e.stroke;case"none":return"none";default:return t}}function Se(t,e){if(!/^#[0-9a-f]{6}$/i.test(t))return t;switch(e){case"lightenMore":return qe(t,.5);case"lighten":return qe(t,.42);case"lightenLess":return qe(t,.24);case"darken":return Rr(t,.62);case"darkenLess":return Rr(t,.8);default:return t}}function Xc(t,e,r){const n=t.strokeWidth!=null?r.resolve(t.strokeWidth):e.strokeWidth;return t.minStrokeWidth==null?n:Math.max(n,t.minStrokeWidth)}function Mt(t){return t.trim().replace(/^['"]+|['"]+$/g,"")}function Ut(t){const e=Mt(t);switch(e){case"\u7B49\u7EBF":return"DengXian";case"\u7B49\u7EBF Light":case"\u7B49\u7EBF light":return"DengXian Light";case"\u5B8B\u4F53":return"SimSun";case"\u9ED1\u4F53":return"SimHei";case"\u5FAE\u8F6F\u96C5\u9ED1":return"Microsoft YaHei";case"\u6977\u4F53":return"KaiTi";case"\u4EFF\u5B8B":return"FangSong";case"\u6E38\u30B4\u30B7\u30C3\u30AF":return"Yu Gothic";case"\u6E38\u30B4\u30B7\u30C3\u30AF Light":case"\u6E38\u30B4\u30B7\u30C3\u30AF light":return"Yu Gothic Light";case"\uB9D1\uC740 \uACE0\uB515":return"Malgun Gothic";default:return e}}function er(t){if(typeof t!="string"||!/^[\da-f]{20}$/i.test(t.trim()))return;const e=t.trim().match(/../g).map(r=>Number.parseInt(r,16));return e[0]>=2&&e[0]<=5?e:void 0}function Yc(t){const e=er(t);if(!e)return{};const r={panose:t.trim().toUpperCase()};if(r.style={2:"text",3:"handwriting",4:"decorative",5:"symbol"}[e[0]],e[0]!==5){const n={2:100,3:200,4:300,5:400,6:400,7:600,8:700,9:800,10:900,11:950};n[e[2]]&&(r.weight=n[e[2]])}if(e[0]===2){e[1]>=2&&e[1]<=10?r.serif=true:e[1]>=11&&e[1]<=15&&(r.serif=false),e[3]>=2&&e[3]<=9&&(r.monospace=e[3]===9);const n={5:125,6:75,7:150,8:62.5};n[e[3]]&&(r.stretch=n[e[3]])}return r}const qc=["Liberation Serif","Tinos","Times New Roman","Times","Noto Serif","Georgia","serif"],ua=["Arial","Liberation Sans","Arimo","Helvetica Neue","Noto Sans","sans-serif"],_c=["Cascadia Mono","Consolas","Liberation Mono","Courier New","Menlo","Noto Sans Mono","monospace"],Wc=["Segoe Print","Bradley Hand","Comic Sans MS","Chalkboard SE","cursive"],Jc=["Papyrus","Copperplate","fantasy"],pa=["Songti SC","SimSun","STSong","Noto Serif CJK SC","Source Han Serif SC","serif"],Vc=["PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Source Han Sans SC","sans-serif"],ha={"cjk-sc":"Noto Sans Mono CJK SC","cjk-tc":"Noto Sans Mono CJK TC",japanese:"Noto Sans Mono CJK JP",korean:"Noto Sans Mono CJK KR"},Ti=new Map([["times new roman",["Liberation Serif","Tinos","Times"]],["arial",["Liberation Sans","Arimo"]],["courier new",["Liberation Mono","Cousine","Courier"]],["calibri",["Carlito"]],["cambria",["Caladea"]],["aptos",["Aptos","Calibri","Carlito"]]]),Gc=[[/^serif$/i,{serif:true,style:"text"}],[/^sans-serif$/i,{serif:false,style:"text"}],[/^monospace$/i,{monospace:true,style:"text"}],[/^cursive$/i,{style:"handwriting"}],[/^fantasy$/i,{style:"decorative"}],[/^(?:times new roman|times|georgia|cambria|caladea|tinos|liberation serif|palatino(?: linotype)?|book antiqua|garamond|baskerville|noto serif)$/i,{serif:true,monospace:false,style:"text",script:"latin"}],[/^(?:arial|helvetica(?: neue)?|calibri(?: light)?|carlito|aptos(?: display| narrow)?|segoe ui|verdana|tahoma|roboto|arimo|liberation sans|noto sans)$/i,{serif:false,monospace:false,style:"text",script:"latin"}],[/^(?:arial narrow|roboto condensed|noto sans condensed)$/i,{serif:false,monospace:false,style:"text",script:"latin",stretch:75}],[/^(?:courier(?: new)?|consolas|cascadia (?:mono|code)|menlo|monaco|liberation mono|cousine|roboto mono|noto sans mono)$/i,{monospace:true,style:"text",script:"latin"}],[/^(?:simsun|nsimsun|songti sc|stsong|noto serif cjk sc|source han serif sc)$/i,{serif:true,style:"text",script:"cjk-sc"}],[/^(?:simhei|microsoft yahei|pingfang sc|dengxian(?: light)?|noto sans cjk sc|source han sans sc)$/i,{serif:false,style:"text",script:"cjk-sc"}],[/^(?:kaiti|stkaiti|fangsong|stfangsong)$/i,{serif:true,style:"handwriting",script:"cjk-sc"}],[/^(?:mingliu|pmingliu|songti tc|noto serif cjk tc)$/i,{serif:true,style:"text",script:"cjk-tc"}],[/^(?:microsoft jhenghei|pingfang tc|noto sans cjk tc)$/i,{serif:false,style:"text",script:"cjk-tc"}],[/^(?:yu mincho|ms pmincho|hiragino mincho pron|noto serif cjk jp)$/i,{serif:true,style:"text",script:"japanese"}],[/^(?:yu gothic(?: ui| light)?|meiryo|ms pgothic|hiragino sans|noto sans cjk jp)$/i,{serif:false,style:"text",script:"japanese"}],[/^(?:batang|applemyungjo|noto serif cjk kr)$/i,{serif:true,style:"text",script:"korean"}],[/^(?:malgun gothic|apple sd gothic neo|noto sans cjk kr)$/i,{serif:false,style:"text",script:"korean"}],[/^(?:comic sans ms|segoe print|bradley hand|chalkboard se|chalkboard)$/i,{style:"handwriting",script:"latin"}],[/^(?:papyrus|copperplate|algerian|jokerman)$/i,{style:"decorative",script:"latin"}],[/^impact$/i,{serif:false,style:"text",script:"latin"}],[/^(?:wingdings(?: [23])?|webdings|symbol|segoe ui symbol|apple symbols|noto sans symbols(?: 2)?)$/i,{style:"symbol"}],[/^(?:segoe ui emoji|apple color emoji|noto color emoji)$/i,{style:"symbol",script:"emoji"}]];function ye(t,e={}){var l;const r=Ut(t),n=r.replace(/\b(?:extra[- ]?light|ultra[- ]?light|semi[- ]?bold|demi[- ]?bold|extra[- ]?bold|ultra[- ]?bold|very condensed|extra condensed|condensed|narrow|expanded|extended|wide|thin|hairline|light|regular|medium|bold|black|heavy|italic|oblique)\b/gi," ").replace(/\s+/g," ").trim(),a=(l=Gc.find(([u])=>u.test(r)||u.test(n)))==null?void 0:l[1],i=a?{weight:400,stretch:100,...a}:{};let o=a?"known":"unknown";a||(/\b(?:mono(?:space)?|typewriter|courier|code)\b/i.test(r)&&(i.monospace=true),/\bsans(?:[ -]serif)?\b/i.test(r)?i.serif=false:/\bserif\b/i.test(r)&&(i.serif=true),/\b(?:script|handwriting|handwritten|brush|calligraphy)\b/i.test(r)?i.style="handwriting":/\b(?:decorative|ornamental|fantasy)\b/i.test(r)&&(i.style="decorative"),Object.keys(i).length&&(o="name"));const s={};/\b(?:extra[- ]?bold|ultra[- ]?bold)\b/i.test(r)?s.weight=800:/\b(?:semi[- ]?bold|demi[- ]?bold)\b/i.test(r)?s.weight=600:/\b(?:black|heavy)\b/i.test(r)?s.weight=900:/\bbold\b/i.test(r)?s.weight=700:/\b(?:extra[- ]?light|ultra[- ]?light)\b/i.test(r)?s.weight=200:/\b(?:thin|hairline)\b/i.test(r)?s.weight=100:/\blight\b/i.test(r)?s.weight=300:/\bmedium\b/i.test(r)&&(s.weight=500),/\b(?:very condensed|extra condensed)\b/i.test(r)?s.stretch=62.5:/\b(?:condensed|narrow)\b/i.test(r)?s.stretch=75:/\b(?:expanded|extended|wide)\b/i.test(r)&&(s.stretch=125),Object.keys(s).length&&o==="unknown"&&(o="name");const d=Object.fromEntries(Object.entries(e).filter(([,u])=>u!==void 0));er(e.panose)?d.panose=e.panose.trim().toUpperCase():delete d.panose;for(const[u,f,m]of[["weight",1,1e3],["stretch",1,1e3],["averageWidth",Number.MIN_VALUE,100]]){const h=d[u];(typeof h!="number"||!Number.isFinite(h)||h<f||h>m)&&delete d[u]}return{...i,...s,...Yc(e.panose),...d,evidence:Object.keys(d).length?"metadata":o}}function oh(t,e){const n={...{1:{serif:true,style:"text"},roman:{serif:true,style:"text"},2:{serif:false,style:"text"},swiss:{serif:false,style:"text"},3:{monospace:true,style:"text"},modern:{monospace:true,style:"text"},4:{style:"handwriting"},script:{style:"handwriting"},5:{style:"decorative"},decorative:{style:"decorative"}}[String(t).toLowerCase()]};return e==="fixed"?n.monospace=true:e==="variable"&&(n.monospace=false),n}function An(t,e){const r=Ut(t).toLowerCase(),n=ye(t,e);let a=[];if(n.script==="emoji")a=["Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji","emoji"];else{if(n.style==="symbol")return[];n.monospace?a=ha[n.script??""]?[ha[n.script],"monospace"]:_c:n.script==="cjk-sc"?a=n.style==="handwriting"?["KaiTi","STKaiti","FangSong","STFangsong",...pa]:n.serif?pa:Vc:n.script==="cjk-tc"?a=n.serif?["Songti TC","MingLiU","Noto Serif CJK TC","serif"]:["PingFang TC","Microsoft JhengHei","Noto Sans CJK TC","sans-serif"]:n.script==="japanese"?a=n.serif?["Yu Mincho","Hiragino Mincho ProN","Noto Serif CJK JP","serif"]:["Yu Gothic","Meiryo","Hiragino Sans","Noto Sans CJK JP","sans-serif"]:n.script==="korean"?a=n.serif?["Batang","AppleMyungjo","Noto Serif CJK KR","serif"]:["Malgun Gothic","Apple SD Gothic Neo","Noto Sans CJK KR","sans-serif"]:n.style==="handwriting"?a=Wc:n.style==="decorative"?a=Jc:n.serif===true?a=qc:n.serif===false&&(a=n.stretch!==void 0&&n.stretch<90?["Arial Narrow","Roboto Condensed","Noto Sans Condensed",...ua]:ua)}const i=(Ti.get(r)??[]).filter(o=>{const s=ye(o);return["monospace","serif","style","script"].every(d=>n[d]===void 0||s[d]===void 0||n[d]===s[d])});return[...new Set([...i,...a])].filter(o=>o.toLowerCase()!==r)}function sh(t,e,r=[]){const n=Zc(t),a=n.flatMap(i=>An(i,typeof e=="function"?e(i):e));return[...new Set([...n,...r,...a])].map(i=>/^(?:serif|sans-serif|monospace|system-ui|cursive|fantasy|emoji|math)$/i.test(i)?i:`"${i.replace(/["\\]/g,"\\$&")}"`).join(", ")}function rr(t,e){const r=ye(t.fontFamily??"",t.traits);if(r.style==="symbol"&&r.script!=="emoji")return[];const n=new Set;for(const o of t.text??""){const s=o.codePointAt(0);if(s>32&&!(s>=127&&s<=159)&&s!==8205&&!(s>=65024&&s<=65039)&&!(s>=917760&&s<=917999)&&n.add(s),n.size===256)break}const a=Ti.get(Ut(t.fontFamily??"").toLowerCase())??[],i=[];for(const o of e){const s=ye(o.fontFamily,o.traits);if(r.monospace===true&&s.monospace!==true||["handwriting","decorative","symbol"].includes(r.style??"")&&s.style!==r.style||r.script==="emoji"&&s.script!=="emoji"||["monospace","serif","style","script"].some(g=>r[g]!==void 0&&s[g]!==void 0&&r[g]!==s[g]))continue;const d=o.coverage;if(d&&n.size&&[...n].some(g=>!d.some(([x,F])=>g>=x&&g<=F)))continue;let l=0;const u=[];for(const g of["monospace","serif","style","script"])r[g]!==void 0&&r[g]===s[g]&&(l+=g==="monospace"||g==="script"?20:10,u.push(g));r.weight!==void 0&&s.weight!==void 0&&(l+=15-Math.min(30,Math.abs(r.weight-s.weight)/25),u.push("weight")),r.stretch!==void 0&&s.stretch!==void 0&&(l+=25-Math.min(50,Math.abs(r.stretch-s.stretch)),u.push("stretch")),r.averageWidth&&s.averageWidth&&(l+=25-Math.min(50,Math.abs(Math.log(s.averageWidth/r.averageWidth))*60),u.push("average-width"));const f=er(r.panose),m=er(s.panose);if(f&&m&&f[0]===2&&m[0]===2){const g=[9,10,11,15,13,7];let x=false;for(let F=4;F<10;F++)f[F]<2||m[F]<2||f[F]>g[F-4]||m[F]>g[F-4]||(l+=4-Math.min(8,Math.abs(f[F]-m[F])),x=true);x&&u.push("PANOSE")}a.some(g=>g.toLowerCase()===o.fontFamily.toLowerCase())&&(l+=30,u.push("compatible-metrics"));const h=d&&n.size?"matched":"unknown";h==="matched"&&(l+=40,u.push("glyph-coverage")),u.length&&i.push({candidate:o,score:l,reasons:u,coverage:h})}return i.sort((o,s)=>+(s.coverage==="matched")-+(o.coverage==="matched")||s.score-o.score)}function Zc(t){const e=[];let r="",n=false,a=0;for(let i=0;i<=t.length;i++){const o=t[i];if(n){n=false;continue}if(o==="\\"){n=true;continue}if(r){o===r&&(r="");continue}if(o==='"'||o==="'"){r=o;continue}if(o===","||i===t.length){const s=Mt(t.slice(a,i));s&&!/[()\x00-\x1f]/.test(s)&&e.push(s),a=i+1}}return e}class Li{constructor(e){E(this,"cache",new Map);this.presentation=e}getUrl(e){const r=this.cache.get(e);if(r)return r;const n=this.presentation.media[e];if(!n)return"";let a="";const i=Kc(e,n.contentType)?Qc(n.data):void 0;if(i)a=i;else if(typeof URL<"u"&&typeof URL.createObjectURL=="function"){const o=new Uint8Array(n.data.byteLength);o.set(n.data),a=URL.createObjectURL(new Blob([o.buffer],{type:n.contentType}))}else a=`data:${n.contentType};base64,${hu(n.data)}`;return this.cache.set(e,a),a}destroy(){if(typeof URL<"u"&&typeof URL.revokeObjectURL=="function")for(const e of this.cache.values())e.startsWith("blob:")&&URL.revokeObjectURL(e);this.cache.clear()}}function Kc(t,e){return/\.tiff?$/i.test(t)||/^image\/tiff?$/i.test(e)}function Qc(t){if(!(typeof document>"u"))try{const e=tl(t),r=mr.decode(e);if(!r.length)return;for(const u of r)mr.decodeImage(e,u,r);const n=r.find(u=>Number(u.width)>0&&Number(u.height)>0&&u.data instanceof Uint8Array)??r.find(u=>Number(u.width)>0&&Number(u.height)>0)??r[0],a=Number(n.width),i=Number(n.height);if(!Number.isFinite(a)||!Number.isFinite(i)||a<=0||i<=0)return;const o=mr.toRGBA8(n),s=document.createElement("canvas");s.width=a,s.height=i;const d=s.getContext("2d");if(!d)return;const l=d.createImageData(a,i);return l.data.set(o),d.putImageData(l,0,0),s.toDataURL("image/png")}catch{return}}function tl(t){if(t.byteOffset===0&&t.byteLength===t.buffer.byteLength&&t.buffer instanceof ArrayBuffer)return t.buffer;const e=new Uint8Array(t.byteLength);return e.set(t),e.buffer}let ot;function Mi(){if((ot==null?void 0:ot.context)!==void 0)return ot.context;const t=document.createElement("canvas"),r=!(typeof navigator<"u"&&/jsdom/i.test(navigator.userAgent)&&typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)&&typeof t.getContext=="function"?t.getContext("2d"):null;return ot&&(ot.context=r),r}function el(t,e,r={}){const n=ot;ot={};try{const a=r.mediaRegistry??new Li(e),i=document.createElement("div");i.className=["pptxv-slide",r.thumbnail?"pptxv-slide--thumbnail":"",r.className??""].filter(Boolean).join(" "),i.style.position="relative",i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,Tn(i,t.background,a);for(const o of t.items)i.appendChild(rl(o,a));return i}finally{ot=n}}function rl(t,e){return t.kind==="text"?nl(t,e):t.kind==="shape"?il(t,e):t.kind==="image"?pl(t.mediaId,t,e):t.kind==="media"?hl(t,e):t.kind==="table"?vl(t,e):t.kind==="chart"?wl(t):Ml(t.transform,t.label)}function hr(t){const e=t.opacity;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function se(t,e,r){const n=document.createElement("div");n.className=e,n.style.left=`${t.x}px`,n.style.top=`${t.y}px`,n.style.width=`${Math.max(t.width,1)}px`,n.style.height=`${Math.max(t.height,1)}px`,n.style.position="absolute",n.style.transformOrigin="center center";const a=[];return t.flipH&&a.push("scaleX(-1)"),t.flipV&&a.push("scaleY(-1)"),t.rotation&&a.push(`rotate(${t.rotation}deg)`),a.length&&(n.style.transform=a.join(" ")),r!=null&&(n.style.opacity=String(r)),n}function nl(t,e){var o,s;const r=t.transform.width<=0,n=t.transform.height<=0,a=se(t.transform,"pptxv-item pptxv-item--text",hr(t));(r||n)&&al(a,r,n),(o=t.placeholder)!=null&&o.type&&(a.dataset.placeholderType=t.placeholder.type),(s=t.placeholder)!=null&&s.idx&&(a.dataset.placeholderIdx=t.placeholder.idx),Ol(a,t.textFrame),kn(a,t.fill,t.line,e),$e(a,t.shadow);const i=Ln(t.textFrame,Nd(t.fill)??"#111827",{omitPlaceholderBulletLabels:Ri(t),availableWidth:r?void 0:t.transform.width,availableHeight:n?void 0:t.transform.height});return r&&(i.style.width="auto"),n&&(i.style.height="auto"),t.fill.type==="picture"&&(i.style.position="relative",i.style.zIndex="1"),a.appendChild(i),Ne(a,t,!Rn(t.textFrame)),a}function al(t,e,r){e&&(t.style.width="auto",t.style.minWidth="fit-content"),r&&(t.style.height="auto");const n=e?"-50%":"0",a=r?"-50%":"0",i=t.style.transform;t.style.transform=[`translate(${n}, ${a})`,i].filter(Boolean).join(" "),t.style.transformOrigin="0 0"}function il(t,e){var o,s,d;const r=se(t.transform,"pptxv-item pptxv-item--shape",hr(t));r.dataset.shapeType=t.shapeType,(o=t.placeholder)!=null&&o.type&&(r.dataset.placeholderType=t.placeholder.type),(s=t.placeholder)!=null&&s.idx&&(r.dataset.placeholderIdx=t.placeholder.idx),$e(r,t.shadow);const n=Ld(t),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox",`${-n} ${-n} ${Math.max(t.transform.width,1)+n*2} ${Math.max(t.transform.height,1)+n*2}`),a.setAttribute("width",`${Math.max(t.transform.width,1)+n*2}`),a.setAttribute("height",`${Math.max(t.transform.height,1)+n*2}`),a.setAttribute("overflow","visible"),a.style.position="absolute",a.style.left=`${-n}px`,a.style.top=`${-n}px`,a.style.pointerEvents="none",a.classList.add("pptxv-shape-svg");const i=wd(t,e);if(i.defs.length){const l=document.createElementNS("http://www.w3.org/2000/svg","defs");for(const u of i.defs)l.appendChild(u);a.appendChild(l)}if(a.appendChild(i.node),r.appendChild(a),t.textFrame&&ou(t.textFrame)){const l=Ln(t.textFrame,((d=t.line)==null?void 0:d.color)??"#111827",{omitPlaceholderBulletLabels:Ri(t)});l.classList.add("pptxv-shape-text"),ol(l,t),r.appendChild(l)}return Ne(r,t,!t.textFrame||!Rn(t.textFrame)),r}function ol(t,e){var i;t.style.position="absolute";const r=sl(e),n=Math.max(1,e.transform.width-r.left-r.right),a=Math.max(1,e.transform.height-r.top-r.bottom);if(t.style.left=`${r.left}px`,t.style.right="",t.style.width=`${n}px`,t.style.height="auto",t.style.maxHeight=`${a}px`,t.style.bottom="",t.style.transform="",dl(e)){t.style.top=`${Number((e.transform.height/2).toFixed(3))}px`,t.style.transform="translateY(-50%)";return}if(((i=e.textFrame)==null?void 0:i.verticalAlign)==="bottom"){t.style.top="",t.style.bottom=`${r.bottom}px`;return}t.style.top=`${r.top}px`}function sl(t){var o;if(ll(t))return rt(t.transform.width,t.transform.height,0,0,0,0);const e=t.textBounds??(((o=t.geometry)==null?void 0:o.type)==="preset"?ki(t.shapeType,{width:t.transform.width,height:t.transform.height,adjustments:t.geometry.adjustments}):void 0);if(e)return fa(t,Ci(e));const r=t.transform.width,n=t.transform.height,a=rt(r,n,.08,.08,.08,.08);let i;switch(t.shapeType){case"ellipse":i=rt(r,n,0,0,0,0);break;case"diamond":i=rt(r,n,.18,.16,.18,.16);break;case"hexagon":case"octagon":case"decagon":case"dodecagon":i=rt(r,n,.16,.12,.16,.12);break;case"pentagon":i=rt(r,n,.14,.2,.14,.08);break;case"heptagon":i=rt(r,n,.14,.14,.14,.12);break;case"triangle":case"rtTriangle":i=rt(r,n,.16,.3,.16,.08);break;case"trapezoid":case"parallelogram":i=rt(r,n,.18,.12,.18,.12);break;case"chevron":i=rt(r,n,.12,.12,.2,.12);break;case"rightArrow":case"stripedRightArrow":case"notchedRightArrow":case"rightArrowCallout":i=rt(r,n,.08,.16,.3,.16);break;case"leftArrow":case"leftArrowCallout":i=rt(r,n,.3,.16,.08,.16);break;case"upArrow":case"upArrowCallout":i=rt(r,n,.16,.28,.16,.1);break;case"downArrow":i=rt(r,n,.16,.1,.16,.28);break;case"leftRightArrow":case"leftRightArrowCallout":i=rt(r,n,.24,.16,.24,.16);break;case"upDownArrow":i=rt(r,n,.16,.24,.16,.24);break;case"quadArrow":case"quadArrowCallout":i=rt(r,n,.24,.24,.24,.24);break;case"bentArrow":case"bentUpArrow":case"uturnArrow":case"leftUpArrow":case"leftRightUpArrow":i=rt(r,n,.18,.2,.18,.18);break;case"homePlate":i=rt(r,n,.08,.12,.22,.12);break;case"plaque":case"cloud":case"smileyFace":case"bevel":case"can":i=rt(r,n,.14,.14,.14,.14);break;case"pie":case"chord":case"donut":i=rt(r,n,.18,.18,.18,.18);break;case"frame":case"halfFrame":case"corner":case"diagStripe":case"plus":case"noSmoking":case"arc":case"line":i=a;break;default:i=a;break}return fa(t,i)}const cl=new Set(["rect","roundRect","ellipse","snip1Rect","snip2SameRect","snip2DiagRect","snipRoundRect","round1Rect","round2SameRect","round2DiagRect"]);function ll(t){var e;return((e=t.geometry)==null?void 0:e.type)==="custom"?true:cl.has(t.shapeType)}function dl(t){var e,r;return((e=t.placeholder)==null?void 0:e.type)==="title"||((r=t.textFrame)==null?void 0:r.verticalAlign)==="middle"}function fa(t,e){const r=ul(t);if(r<=0)return e;const n=Math.max(t.transform.width,1),a=Math.max(t.transform.height,1),i=Math.max((n-1)/2,0),o=Math.max((a-1)/2,0);return Ci({left:Math.min(e.left+r,i),top:Math.min(e.top+r,o),right:Math.min(e.right+r,i),bottom:Math.min(e.bottom+r,o)})}function ul(t){var r;const e=Math.max(((r=t.line)==null?void 0:r.width)??0,0);return e<=2||t.shapeType==="line"?0:Number(Math.min(Math.max((e-2)*.45,0),8).toFixed(3))}function Ci(t){return{left:Number(Math.max(t.left,0).toFixed(3)),top:Number(Math.max(t.top,0).toFixed(3)),right:Number(Math.max(t.right,0).toFixed(3)),bottom:Number(Math.max(t.bottom,0).toFixed(3))}}function rt(t,e,r,n,a,i){return{left:Number((t*r).toFixed(3)),top:Number((e*n).toFixed(3)),right:Number((t*a).toFixed(3)),bottom:Number((e*i).toFixed(3))}}function pl(t,e,r){const n=se(e.transform,"pptxv-item pptxv-item--image",hr(e));kn(n,e.fill,e.line,r),$e(n,e.shadow);const a=document.createElement("img");return a.className="pptxv-image",a.src=r.getUrl(t),a.alt=e.name??"slide-image",ji(n,a,e.crop,"contain"),a.draggable=false,n.appendChild(a),Ne(n,e,true),n}function hl(t,e){const r=se(t.transform,`pptxv-item pptxv-item--media pptxv-item--media-${t.mediaType}`,hr(t));if(r.dataset.mediaType=t.mediaType,kn(r,t.fill,t.line,e),$e(r,t.shadow),t.mediaType==="video")r.appendChild(fl(t,e));else{r.style.width="0px",r.style.height="0px",r.style.overflow="visible";const n=document.createElement("audio");n.className="pptxv-media-player pptxv-media-player--audio",Ei(n,t.mediaId,e),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.transform="translate(-50%)",n.style.zIndex="1",r.appendChild(n)}return r}function fl(t,e){const r=document.createElement("div");r.className="pptxv-media-stage";const n=document.createElement("div");n.className="pptxv-media-poster-frame",gl(n,t.transform);const a=ml(t.posterMediaId,t.name??"video-poster",e);a&&(a.className="pptxv-media-poster pptxv-media-poster--video",yl(n,a,t.crop),n.appendChild(a),r.appendChild(n));const i=document.createElement("video");return i.className="pptxv-media-player pptxv-media-player--video",Ei(i,t.mediaId,e,true),i.playsInline=true,i.setAttribute("playsinline",""),xl(i,t.transform,t.crop),r.appendChild(i),r}function ml(t,e,r){if(!t)return null;const n=r.getUrl(t);if(!n)return null;const a=document.createElement("img");return a.src=n,a.alt="",a.draggable=false,a}function Ei(t,e,r,n=true){const a=r.getUrl(e);a&&(t.src=a,t.setAttribute("src",a)),t.controls=n,n?t.setAttribute("controls",""):t.removeAttribute("controls"),t.preload="metadata",t.setAttribute("preload","metadata")}function ji(t,e,r,n){if(r){const a=Math.max(1-r.left-r.right,1e-4),i=Math.max(1-r.top-r.bottom,1e-4);t.style.overflow="hidden",e.style.position="absolute",e.style.width=Et(100/a),e.style.height=Et(100/i),e.style.maxWidth="none",e.style.maxHeight="none",e.style.left=Et(-r.left/a*100),e.style.top=Et(-r.top/i*100),e.style.objectFit="fill";return}e.style.width="100%",e.style.height="100%",e.style.objectFit=n}function gl(t,e){t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width=`${Number(e.width.toFixed(3))}px`,t.style.height=`${Number(e.height.toFixed(3))}px`,t.style.overflow="hidden"}function yl(t,e,r){if(r){ji(t,e,r,"fill");return}e.style.width="100%",e.style.height="100%"}function xl(t,e,r){if(t.style.position="absolute",t.style.left="0px",t.style.top="0px",r){const i=Math.max(1-r.left-r.right,1e-4),o=Math.max(1-r.top-r.bottom,1e-4);t.style.width=Et(100/i),t.style.height=Et(100/o),t.style.maxWidth="none",t.style.maxHeight="none",t.style.left=Et(-r.left/i*100),t.style.top=Et(-r.top/o*100);return}const n=Math.max(1,Math.round(e.width)),a=Math.max(1,Math.round(e.height));t.width=n,t.height=a,t.setAttribute("width",String(n)),t.setAttribute("height",String(a))}function vl(t,e){var f;const r=se(t.transform,"pptxv-item pptxv-item--table");$e(r,t.shadow);const n=document.createElement("table");n.className="pptxv-table";const a=new Set(t.hiddenColumns??[]),i=new Set(t.hiddenRows??[]),o=ma(t.columns,t.transform.width,a),s=ma(t.rows,t.transform.height,i),d=new Map;for(const m of t.cells){const h=d.get(m.row)??[];h.push(m),d.set(m.row,h)}const l=document.createElement("colgroup");for(let m=0;m<t.columns.length;m+=1){const h=o[m]??1,g=document.createElement("col");a.has(m)?(g.style.width="0px",g.style.visibility="collapse"):g.style.width=`${Math.max(h,1)}px`,l.appendChild(g)}n.appendChild(l);const u=document.createElement("tbody");for(let m=0;m<t.rows.length;m+=1){const h=document.createElement("tr");i.has(m)?(h.style.height="0px",h.style.visibility="collapse"):h.style.height=`${s[m]??1}px`;const g=((f=d.get(m))==null?void 0:f.sort((x,F)=>x.column-F.column))??[];for(const x of g)x.isMergedContinuation||h.appendChild(bl(x,e));u.appendChild(h)}return n.appendChild(u),r.appendChild(n),Ne(r,t,!su(t)),r}function ma(t,e,r){const n=t.map((o,s)=>r.has(s)?0:Math.max(o,1)),a=n.reduce((o,s)=>o+s,0);if(!Number.isFinite(e)||e<=0||a<=0)return n;const i=e/a;return n.map(o=>o*i)}function bl(t,e){const r=document.createElement("td");r.className="pptxv-table-cell",r.rowSpan=t.rowSpan,r.colSpan=t.colSpan,r.style.position="relative",r.style.overflow="hidden",r.style.verticalAlign=Rd(t.textFrame.verticalAlign),Tn(r,t.fill,e),Dd(r,t);const n=Ln(t.textFrame,"#111827");return n.style.position="absolute",n.style.inset="0",t.fill.type==="picture"&&(n.style.zIndex="1"),r.appendChild(n),r}function wl(t){const e=se(t.transform,"pptxv-item pptxv-item--chart"),r=Math.max(t.transform.width,1),n=Math.max(t.transform.height,1),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("pptxv-chart-svg"),a.setAttribute("viewBox",`0 0 ${r} ${n}`),a.setAttribute("width",String(r)),a.setAttribute("height",String(n)),a.setAttribute("role","img"),a.setAttribute("aria-label",t.title??t.name??(t.chartType==="pie"?"Pie chart":"Column chart"));const i=t.legendPosition??"right",o=t.title?n*.13:n*.04,s=i==="bottom"?n*.15:0,d=i==="top"?n*.13:0,l=i==="left"||i==="right"?r*.2:0,u=r*(t.chartType==="pie"?.04:.125)+(i==="left"?l:0),f=r-r*(t.chartType==="pie"?.04:.068)-(i==="right"?l:0),m=Math.max(n*.08,o+d+n*.035),h=n-n*.08-s;if(t.title){const x=mt("text",{x:r/2,y:n*.052,"text-anchor":"middle","dominant-baseline":"middle"});x.classList.add("pptxv-chart-title"),x.setAttribute("font-size",String(Math.max(12,n*.047))),x.textContent=t.title,a.appendChild(x)}const g={width:r,height:n,plotLeft:u,plotRight:f,plotTop:m,plotBottom:h};return t.chartType==="pie"?Sl(a,t,g):Fl(a,t,g),Ll(a,t,g),e.appendChild(a),Ne(e,t,true),e}function Sl(t,e,r){const n=e.series[0];if(!n)return;const a=n.values.map(f=>f!=null&&Number.isFinite(f)?Math.abs(f):0),i=Math.max(0,...a);if(i===0)return;const o=a.reduce((f,m)=>f+m/i,0),s=(r.plotLeft+r.plotRight)/2,d=(r.plotTop+r.plotBottom)/2,l=Math.max(.5,Math.min(r.plotRight-r.plotLeft,r.plotBottom-r.plotTop)/2);let u=((e.firstSliceAngle??0)-90)*Math.PI/180;a.forEach((f,m)=>{var C;if(f===0)return;const h=f/i/o,g=h*Math.PI*2,x=u+g,F=s+l*Math.cos(u),y=d+l*Math.sin(u),S=s+l*Math.cos(x),k=d+l*Math.sin(x),w=mt("path",{}),T=h===1?`M ${F} ${y} A ${l} ${l} 0 0 1 ${2*s-F} ${2*d-y} A ${l} ${l} 0 0 1 ${F} ${y} Z`:`M ${s} ${d} L ${F} ${y} A ${l} ${l} 0 ${g>Math.PI?1:0} 1 ${S} ${k} Z`;w.setAttribute("d",T),w.classList.add("pptxv-chart-slice");const N=((C=n.pointStyles)==null?void 0:C[m])??n;w.setAttribute("fill",vt(N.color,N.alpha)),w.setAttribute("data-series-index","0"),w.setAttribute("data-category-index",String(m)),w.setAttribute("data-value",String(n.values[m])),w.setAttribute("data-percentage",String(h*100));const I=mt("title",{});I.textContent=`${e.categories[m]||m+1}: ${n.values[m]}`,w.appendChild(I),t.appendChild(w),u=x})}function Fl(t,e,r){const{height:n,plotLeft:a,plotRight:i,plotTop:o,plotBottom:s}=r,d=Math.max(i-a,1),l=Math.max(s-o,1),u=Al(e),f=y=>s-(y-u.min)/(u.max-u.min)*l;for(let y=u.min;y<=u.max+u.majorUnit/2;y+=u.majorUnit){const S=Math.abs(y)<u.majorUnit/1e3?0:y,k=f(S);if(S!==0){const N=mt("line",{x1:a,y1:k,x2:i,y2:k});N.classList.add("pptxv-chart-gridline"),t.appendChild(N)}const w=mt("line",{x1:a-4,y1:k,x2:a,y2:k});w.classList.add("pptxv-chart-axis"),t.appendChild(w);const T=mt("text",{x:a-10,y:k,"text-anchor":"end","dominant-baseline":"middle"});T.classList.add("pptxv-chart-axis-label"),T.setAttribute("font-size",String(Math.max(9,n*.036))),T.textContent=Tl(S,e),t.appendChild(T)}const m=f(Math.min(u.max,Math.max(u.min,0))),h=Math.max(e.categories.length,...e.series.map(y=>y.values.length),1),g=d/h;if(e.grouping==="clustered"){const y=g*.74,S=y/Math.max(e.series.length,1);e.series.forEach((k,w)=>{k.values.forEach((T,N)=>{if(T==null||N>=h)return;const I=Zr(T,e,N),C=f(I),M=mt("rect",{x:a+N*g+(g-y)/2+w*S,y:Math.min(m,C),width:Math.max(S,.5),height:Math.max(Math.abs(m-C),0)});ga(M,e,w,N,I),t.appendChild(M)})})}else{const y=g*.5,S=Array(h).fill(0),k=Array(h).fill(0);e.series.forEach((w,T)=>{w.values.forEach((N,I)=>{if(N==null||I>=h)return;const C=Zr(N,e,I),M=C>=0?S[I]:k[I],H=M+C;C>=0?S[I]=H:k[I]=H;const z=f(M),Y=f(H),D=mt("rect",{x:a+I*g+(g-y)/2,y:Math.min(z,Y),width:Math.max(y,.5),height:Math.max(Math.abs(z-Y),0)});ga(D,e,T,I,C),t.appendChild(D)})})}const x=mt("line",{x1:a,y1:m,x2:i,y2:m});x.classList.add("pptxv-chart-axis"),t.appendChild(x);const F=mt("line",{x1:a,y1:o,x2:a,y2:s});F.classList.add("pptxv-chart-axis"),t.appendChild(F);for(let y=0;y<h;y+=1){const S=a+(y+.5)*g,k=mt("line",{x1:S,y1:m,x2:S,y2:m+2});k.classList.add("pptxv-chart-axis"),t.appendChild(k);const w=mt("text",{x:S,y:s+n*.057,"text-anchor":"middle","dominant-baseline":"middle"});w.classList.add("pptxv-chart-category-label"),w.setAttribute("font-size",String(Math.max(10,n*.042))),w.textContent=e.categories[y]??String(y+1),t.appendChild(w)}}function mt(t,e){const r=document.createElementNS("http://www.w3.org/2000/svg",t);for(const[n,a]of Object.entries(e))r.setAttribute(n,String(Number.isFinite(a)?Number(Number(a).toFixed(3)):a));return r}function Al(t){var m,h,g,x,F;const e=t.series.flatMap(y=>y.values.flatMap((S,k)=>S==null?[]:[Zr(S,t,k)])),r=e.some(y=>y<0),n=t.grouping==="percentStacked"?100:t.grouping==="stacked"?e.reduce((y,S)=>y+Math.max(S,0),0):Math.max(0,...e),a=t.grouping==="percentStacked"?r?-100:0:t.grouping==="stacked"?e.reduce((y,S)=>y+Math.min(S,0),0):Math.min(0,...e),i=((m=t.valueAxis)==null?void 0:m.min)??a,o=((h=t.valueAxis)==null?void 0:h.max)??n,s=4,d=kl(Math.max(o-i,1)/s),l=(g=t.valueAxis)!=null&&g.majorUnit&&t.valueAxis.majorUnit>0?t.valueAxis.majorUnit:d,u=((x=t.valueAxis)==null?void 0:x.min)??Math.min(0,Math.floor(i/l)*l);let f=((F=t.valueAxis)==null?void 0:F.max)??Math.max(u+l,Math.ceil(o/l)*l,u+s*l);return f<=u&&(f=u+l),{min:u,max:f,majorUnit:l}}function kl(t){const e=10**Math.floor(Math.log10(Math.max(t,Number.EPSILON))),r=t/e;return(r<=1?1:r<=2?2:r<=5?5:10)*e}function Zr(t,e,r){if(e.grouping!=="percentStacked")return t;const n=e.series.reduce((a,i)=>a+Math.abs(i.values[r]??0),0);return n>0?t/n*100:0}function Tl(t,e){var r,n;return e.grouping==="percentStacked"||(n=(r=e.valueAxis)==null?void 0:r.formatCode)!=null&&n.includes("%")?`${Number(t.toFixed(2))}%`:String(Number(t.toFixed(6)))}function ga(t,e,r,n,a){const i=e.series[r];t.classList.add("pptxv-chart-bar"),t.setAttribute("fill",vt((i==null?void 0:i.color)??"#4472C4",i==null?void 0:i.alpha)),t.setAttribute("data-series-index",String(r)),t.setAttribute("data-category-index",String(n)),t.setAttribute("data-value",String(a))}function Ll(t,e,r){const n=e.legendPosition??"right";if(n==="none"||!e.series.length)return;const a=e.chartType==="pie"?e.series[0].values.map((d,l)=>{var u;return{...((u=e.series[0].pointStyles)==null?void 0:u[l])??e.series[0],name:e.categories[l]||String(l+1),seriesIndex:0,categoryIndex:l}}):(n==="bottom"||n==="top"?[...e.series].reverse():e.series).map(d=>({...d,seriesIndex:e.series.indexOf(d),categoryIndex:void 0})),i=Math.max(9,r.height*.036),o=Math.max(8,i*.9),s=mt("g",{});s.classList.add("pptxv-chart-legend"),a.forEach((d,l)=>{let u,f;if(n==="bottom"||n==="top"){const x=(r.plotRight-r.plotLeft)/a.length;u=r.plotLeft+l*x+x*.03,f=n==="bottom"?r.height*.925:Math.max(r.height*.105,r.plotTop-i)}else u=n==="left"?r.width*.025:r.plotRight+r.width*.04,f=r.plotTop+(l+.5)*Math.min(i*2.2,(r.plotBottom-r.plotTop)/a.length);const m=mt("g",{"data-series-index":d.seriesIndex});d.categoryIndex!=null&&m.setAttribute("data-category-index",String(d.categoryIndex)),m.classList.add("pptxv-chart-legend-item");const h=mt("rect",{x:u,y:f-o*.72,width:o,height:o});h.setAttribute("fill",vt(d.color,d.alpha));const g=mt("text",{x:u+o*1.35,y:f,"dominant-baseline":"middle"});g.setAttribute("font-size",String(i)),g.textContent=d.name,m.append(h,g),s.appendChild(m)}),t.appendChild(s)}function Ml(t,e){const r=se(t,"pptxv-item pptxv-item--unsupported");return r.textContent=e,r}function Ne(t,e,r){if(!r||!cu(e))return;const n=document.createElement("a");n.className="pptxv-item-link",_i(n,e);const a=Ki(e,e.name);n.setAttribute("aria-label",a),n.title=au(e,e.name),n.style.position="absolute",n.style.inset="0",n.style.zIndex="4",n.style.display="block",n.style.background="transparent",n.style.textDecoration="none",t.appendChild(n)}function kn(t,e,r,n){Tn(t,e,n),t.style.border="none",r&&(t.style.border=Yi(r))}function $e(t,e){e&&(t.style.filter=`drop-shadow(${Number(e.offsetX.toFixed(3))}px ${Number(e.offsetY.toFixed(3))}px ${Number(e.blur.toFixed(3))}px ${vt(e.color,e.alpha)})`)}function Tn(t,e,r){if(t.style.background="",t.style.backgroundColor="",t.style.backgroundImage="",t.style.backgroundSize="",t.style.backgroundRepeat="",t.style.backgroundPosition="",e.type==="pattern"?Cl(t,e):t.style.background=zi(e),e.type!=="picture")return;const n=El(e,r);n&&(t.style.overflow="hidden",t.insertBefore(n,t.firstChild))}function Cl(t,e){const r=Bd(e);t.style.backgroundColor=r.color,t.style.backgroundImage=r.image,r.size&&(t.style.backgroundSize=r.size),r.repeat&&(t.style.backgroundRepeat=r.repeat),r.position&&(t.style.backgroundPosition=r.position)}function El(t,e){if(t.type!=="picture"||!t.mediaId)return;const r=e.getUrl(t.mediaId);if(!r)return;const n=document.createElement("div");if(n.className="pptxv-fill-layer",n.style.position="absolute",n.style.inset="0",n.style.overflow="hidden",n.style.pointerEvents="none",n.style.borderRadius="inherit",n.style.zIndex="0",t.alpha!=null&&(n.style.opacity=String(t.alpha)),t.tile)return n.style.backgroundImage=`url("${iu(r)}")`,n.style.backgroundRepeat="repeat",n.style.backgroundPosition="0 0",n;const a=document.createElement("img");if(a.className="pptxv-fill-image",a.src=r,a.alt="",a.setAttribute("aria-hidden","true"),a.draggable=false,a.style.position="absolute",a.style.maxWidth="none",a.style.maxHeight="none",t.crop){const i=Math.max(1-t.crop.left-t.crop.right,1e-4),o=Math.max(1-t.crop.top-t.crop.bottom,1e-4);a.style.width=Et(100/i),a.style.height=Et(100/o),a.style.left=Et(-t.crop.left/i*100),a.style.top=Et(-t.crop.top/o*100),a.style.objectFit="fill"}else a.style.width="100%",a.style.height="100%",a.style.objectFit="fill";return n.appendChild(a),n}function Ln(t,e,r={}){const n=document.createElement("div");n.className="pptxv-text-frame",n.style.padding=`${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`,n.style.justifyContent=jd(t.verticalAlign),n.style.overflowX=t.horizontalOverflow==="clip"||t.wrap==="none"?"clip":"visible",n.style.overflowY=t.verticalOverflow==="clip"?"clip":"visible",t.anchorCenter&&(n.style.alignItems="center"),(t.direction==="vertical"||t.direction==="vertical270")&&(n.style.writingMode=t.direction==="vertical270"?"vertical-lr":"vertical-rl",n.style.textOrientation="mixed");const a=[];for(const i of t.paragraphs){const o=document.createElement("p");o.className="pptxv-paragraph",o.style.textAlign=i.align??"left";const s=Ni(i),d=Hl(i,e),l=s.fontSize,u=s.fontFamily,f=!!(r.omitPlaceholderBulletLabels&&ql(i,l)),m=!f&&Xl(i,l),h=Yl(i,f);if(o.style.fontSize=`${l}px`,u){o.style.fontFamily=xe(u,{sampleText:xa(i)});const y=ar(u);y&&(o.style.fontWeight=y);const S=Hi(u);S&&(o.style.fontStyle=S)}t.anchorCenter&&(o.style.width="fit-content",o.style.maxWidth="100%"),t.wrap==="none"&&(o.style.whiteSpace="pre",o.style.overflowWrap="normal",o.style.wordBreak="normal"),i.marginLeft!=null&&(o.style.paddingLeft=`${Mn(i,m)}px`),i.indent!=null&&(o.style.textIndent=`${h?0:Cn(i,m)}px`),i.spaceBefore!=null&&(o.style.marginTop=`${i.spaceBefore}px`),i.spaceAfter!=null&&(o.style.marginBottom=`${i.spaceAfter}px`),i.lineHeight!=null?o.style.lineHeight=i.lineHeightUnit==="px"?`${i.lineHeight}px`:String(i.lineHeight):o.style.lineHeight="1";let g=$i(i,m);if(i.bullet){const y=document.createElement("span"),S=Wi(i,a),k=Xd(i,d),w=Ii(S,i,l),T=Yd(i,S),N=Jd(S,l);y.className=["pptxv-run","pptxv-run--bullet",i.bullet.autoType?"pptxv-run--bullet-auto":""].filter(Boolean).join(" "),N?(y.dataset.resolvedLabel=S,y.appendChild(N),y.style.display="inline-flex",y.style.alignItems="center",y.style.justifyContent="flex-start",y.style.lineHeight="1"):y.textContent=S,y.style.color=k,T&&(y.style.fontFamily=T);const I=ar(i.bullet.fontFamily);I&&(y.style.fontWeight=I),w>0&&i.indent!=null&&i.indent<0&&(y.style.display=N?"inline-flex":"inline-block",y.style.width=`${Number(w.toFixed(3))}px`,y.style.boxSizing="border-box",h&&(y.style.marginLeft=`${m?0:i.indent}px`)),i.bullet.autoType&&(y.style.fontVariantNumeric="tabular-nums"),S&&!f&&(o.appendChild(y),g+=w)}const x=xa(i),F=i.runs.some(y=>y.text===" ");for(const y of i.runs){const S=Dl(y,d,x,l,t.wrap==="none");if(y.text===" "){const k=_l(i,g,l);S.classList.add("pptxv-run--tab"),S.style.width=`${Number(k.toFixed(3))}px`,g+=k}else y.text===`
6
- `?g=Ul(i,m):F&&(g+=Bi(y,l));o.appendChild(S)}n.appendChild(o)}return jl(n,t,r),n}function jl(t,e,r){var s;if(((s=e.autofit)==null?void 0:s.type)!=="shape"||e.wrap!=="none")return;const n=r.availableWidth!=null?Math.max(r.availableWidth-e.padding.left-e.padding.right,1):void 0,a=r.availableHeight!=null?Math.max(r.availableHeight-e.padding.top-e.padding.bottom,1):void 0;if((!n||!Number.isFinite(n))&&(!a||!Number.isFinite(a)))return;const i=Rl(e);if(i.width<=0||i.height<=0)return;let o=1;n&&i.width>n+.5&&(o=Math.min(o,n/i.width)),a&&i.height>a+.5&&(o=Math.min(o,a/i.height)),!(!Number.isFinite(o)||o>=.999)&&$l(t,o)}function Rl(t){let e=0,r=0;for(const n of t.paragraphs){const a=Ni(n).fontSize;let i=$i(n);n.bullet&&(i+=Ii(Wi(n,[]),n,a));for(const d of n.runs)i+=Bi(d,a);const o=Nl(n,a),s=o+(n.spaceBefore??0)+(n.spaceAfter??0);e=Math.max(e,i),r+=Math.max(s,o)}return{width:e,height:r}}function Nl(t,e){const r=t.runs.reduce((n,a)=>Math.max(n,a.fontSize??e),e);return t.lineHeight!=null?t.lineHeightUnit==="px"?t.lineHeight:r*t.lineHeight:r}function $l(t,e){const r=Array.from(t.querySelectorAll(".pptxv-paragraph"));for(const a of r)Xt(a.style,"fontSize",e),Xt(a.style,"marginTop",e),Xt(a.style,"marginBottom",e),Xt(a.style,"paddingLeft",e),Xt(a.style,"textIndent",e),Il(a.style,e);const n=Array.from(t.querySelectorAll(".pptxv-run"));for(const a of n)Xt(a.style,"fontSize",e),Xt(a.style,"width",e),Xt(a.style,"marginLeft",e),Xt(a.style,"lineHeight",e),Bl(a.style,e)}function Xt(t,e,r){const n=t[e];if(typeof n!="string"||!n.endsWith("px"))return;const a=Number.parseFloat(n);Number.isFinite(a)&&(t[e]=`${Number((a*r).toFixed(3))}px`)}function Il(t,e){const r=t.lineHeight;if(!r||!r.endsWith("px"))return;const n=Number.parseFloat(r);Number.isFinite(n)&&(t.lineHeight=`${Number((n*e).toFixed(3))}px`)}function Bl(t,e){const r=t.letterSpacing;if(!r||!r.endsWith("px"))return;const n=Number.parseFloat(r);Number.isFinite(n)&&(t.letterSpacing=`${Number((n*e).toFixed(3))}px`)}function Ri(t){var e;return!!((e=t.placeholder)!=null&&e.type)||Pl(t.name)}function Pl(t){return t?/placeholder|占位符/i.test(t):false}function Ol(t,e){t.style.overflowX=e.horizontalOverflow==="clip"||e.wrap==="none"?"clip":"visible",t.style.overflowY=e.verticalOverflow==="clip"?"clip":"visible"}function Dl(t,e,r,n=16,a=false){const i=!!(t.href||t.slideIndex!=null||t.navigationAction),o=i?document.createElement("a"):document.createElement("span");o.className=["pptxv-run",i?"pptxv-run--link":""].filter(Boolean).join(" ");const s=Vi(t.text),d=s&&Ie(s)?Zi(s,t.fontSize??n):void 0;d?(o.dataset.resolvedLabel=s,o.appendChild(d),o.style.display="inline-flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.lineHeight="1"):o.textContent=t.text||"\xA0",o instanceof HTMLAnchorElement&&_i(o,t),t.color?o.style.color=vt(t.color,t.colorAlpha):o.style.color=e;const l=ar(t.fontFamily,t.bold);l&&(o.style.fontWeight=l);const u=Hi(t.fontFamily,t.italic);u&&(o.style.fontStyle=u);const f=[];t.underline&&f.push("underline"),t.strike&&f.push("line-through"),f.length&&(o.style.textDecoration=f.join(" ")),t.highlightColor&&(o.style.backgroundColor=vt(t.highlightColor,t.highlightAlpha)),t.fontSize&&(o.style.fontSize=`${t.fontSize}px`);const m=Wd(t.text,t.fontFamily);m?o.style.fontFamily=m:t.fontFamily&&(o.style.fontFamily=xe(t.fontFamily,{sampleText:t.text,contextText:r}));const h=bd(t,r);return h&&(o.style.letterSpacing=h),t.baselineShift&&(o.style.verticalAlign=`${Number(t.baselineShift.toFixed(4))}em`),a&&(o.style.whiteSpace="pre"),o}function Ni(t){const e=new Map,r=new Map;let n,a;for(const i of t.runs){const o=zl(i);i.fontSize!=null&&(n??(n=i.fontSize),e.set(i.fontSize,(e.get(i.fontSize)??0)+o)),i.fontFamily&&(a??(a=i.fontFamily),r.set(i.fontFamily,(r.get(i.fontFamily)??0)+o))}return{fontSize:ya(e)??n??16,fontFamily:ya(r)??a}}function Hl(t,e){for(const r of t.runs)if(r.color&&r.text.trim().length>0)return vt(r.color,r.colorAlpha);for(const r of t.runs)if(r.color)return vt(r.color,r.colorAlpha);return e}function zl(t){const e=t.text.replace(/[\n\t]/g,""),r=e.trim().length?e.trim():e;return Math.max(Array.from(r).length,1)}function ya(t){let e,r=-1;for(const[n,a]of t.entries())a>r&&(e=n,r=a);return e}function xa(t){return t.runs.map(e=>e.text).join("")}function Mn(t,e){const r=Math.max(t.marginLeft??0,0);return e?Math.max(r+Math.min(t.indent??0,0),0):r}function Cn(t,e){return e?Math.max(t.indent??0,0):t.indent??0}function $i(t,e=false){return Mn(t,e)+Cn(t,e)}function Ul(t,e=false){const r=Mn(t,e),n=Math.max(Cn(t,e),0);return r+n}function Xl(t,e){if(!t.bullet||e>24)return false;const r=t.marginLeft??0,n=t.indent??0;return r<=0||n>=0?false:Math.abs(r+n)<=2}function Yl(t,e){return!e&&!!(t.bullet&&t.indent!=null&&t.indent<0)}function ql(t,e){var n;if(!((n=t.bullet)!=null&&n.char)||t.bullet.autoType||e<24)return false;const r=Ut(t.bullet.fontFamily??"").toLowerCase();return t.bullet.char==="\u2022"&&r==="arial"}function Ii(t,e,r){var a;const n=e.indent!=null&&e.indent<0?Math.abs(e.indent):0;return n>0?Math.max(n,Kr(t,r)):Math.max(Kr(t,r),(a=e.bullet)!=null&&a.autoType?r*2.4:r*1.2)}function _l(t,e,r){const n=Wl(r);for(const a of t.tabStops??[])if(a>e+.5)return Math.max(a-e,4);return n}function Wl(t){return Math.max(t*2.6,24)}function Bi(t,e){return Kr(t.text,t.fontSize??e,t.fontFamily,t.bold,t.italic)}function Kr(t,e,r,n,a){if(!t)return 0;const i=t.replace(/\n/g,""),o=Jl(i,e,r,n,a);if(o!=null&&Number.isFinite(o)&&o>0)return o;let s=0;for(const l of i)s+=Vl(l);return s*(n?1.04:1)*(a?1.02:1)*e}function Jl(t,e,r,n,a){if(!(typeof document>"u"||typeof document.createElement!="function")&&!(typeof navigator<"u"&&/jsdom/i.test(navigator.userAgent)))try{const i=Mi();if(!i)return;const o=[a?"italic":"",ar(r,n)??"400",`${e}px`,r?xe(r,{sampleText:t,contextText:t}):'"Segoe UI", Arial, sans-serif'].filter(Boolean).join(" ");return i.font=o,i.measureText(t).width}catch{return}}function Vl(t){return t===" "?0:t===" "?.33:/[.,:;'"!|`]/.test(t)?.28:/[-_/\\(){}\[\]]/.test(t)?.34:/[A-Z0-9]/.test(t)?.6:/[a-z]/.test(t)?.54:/[\u1100-\u115F\u2E80-\uA4CF\uAC00-\uD7A3\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE6F\uFF00-\uFF60\uFFE0-\uFFE6]/.test(t)?1:.56}function xe(t,e={}){const r=Ut(t),n=[],a=new Set,i=e.contextText&&e.contextText.trim()?e.contextText:e.sampleText,o=!e.symbol&&dd(r)&&ud(e.sampleText,e.contextText),s=l=>{if(!l)return;const u=Mt(l);if(!u)return;const f=u.toLowerCase();a.has(f)||(a.add(f),n.push(Di(u)))},d=l=>{for(const u of l)s(u)};if(!o){s(t),r!==t&&s(r);const l=id(r,i);d(l.length?l:An(r))}return e.emoji&&d(Pi),(e.symbol||En(r))&&d(Oi),o||d(cd(r,e.sampleText)),d(Gl),n.join(", ")}const Gl=["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","Noto Sans","sans-serif"],Pi=["Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji"],Oi=["Segoe UI Symbol","Apple Symbols","Noto Sans Symbols 2","Noto Sans Symbols"],Zl=new Set(["aptos","aptos display","aptos narrow","calibri","calibri light","dengxian","dengxian light","\u7B49\u7EBF","\u7B49\u7EBF light","\u7EDB\u590C\u568E","\u7EDB\u590C\u568E light"]),Ot=["Microsoft YaHei","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Source Han Sans SC","WenQuanYi Micro Hei"],de=["SimSun","Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC"],re=["Yu Gothic UI","Yu Gothic","Meiryo","Hiragino Sans","Noto Sans CJK JP"],nr=["Malgun Gothic","Apple SD Gothic Neo","Noto Sans CJK KR"],Kl=400,Ql=100,td=900,va=5,ed=[{pattern:/\b(thin|hairline)\b/,scale:.25},{pattern:/\b(extra[- ]?light|ultra[- ]?light)\b/,scale:.55},{pattern:/\b(semi[- ]?light|demi[- ]?light)\b/,scale:.88},{pattern:/\blight\b/,scale:.78},{pattern:/\bmedium\b/,scale:1.15},{pattern:/\b(semi[- ]?bold|demi[- ]?bold)\b/,scale:1.38},{pattern:/\b(extra[- ]?bold|ultra[- ]?bold)\b/,scale:2},{pattern:/\b(black|heavy)\b/,scale:2.25},{pattern:/\bbold\b/,scale:1.75}],rd="BESbswy1234567890",nd=32,ad=.1,ba={aptos:["Aptos","Aptos Narrow","Calibri"],"aptos display":["Aptos Display","Aptos","Calibri"],calibri:["Calibri","Carlito"],"calibri light":["Calibri Light","Calibri","Carlito"],roboto:["Roboto","Arial","Helvetica Neue","Helvetica","Liberation Sans"],"roboto light":["Roboto Light","Roboto","Arial","Helvetica Neue","Helvetica","Liberation Sans"],"roboto medium":["Roboto Medium","Roboto","Arial","Helvetica Neue","Helvetica","Liberation Sans"],"roboto mono":["Roboto Mono","Cascadia Mono","Consolas","Courier New","monospace"],"segoe ui":["Segoe UI"],"segoe ui emoji":["Segoe UI Emoji"],"segoe ui symbol":["Segoe UI Symbol"],arial:["Arial","Liberation Sans"],tahoma:["Tahoma"],verdana:["Verdana"],dengxian:["DengXian",...Ot],"dengxian light":["DengXian Light","DengXian",...Ot],\u7B49\u7EBF:["DengXian",...Ot],"\u7B49\u7EBF light":["DengXian Light","DengXian",...Ot],simsun:["SimSun",...de],\u5B8B\u4F53:["SimSun",...de],simhei:["SimHei","Microsoft YaHei",...Ot],\u9ED1\u4F53:["SimHei","Microsoft YaHei",...Ot],"microsoft yahei":["Microsoft YaHei",...Ot],\u5FAE\u8F6F\u96C5\u9ED1:["Microsoft YaHei",...Ot],kaiti:["KaiTi","STKaiti",...de],\u6977\u4F53:["KaiTi","STKaiti",...de],fangsong:["FangSong","STFangsong",...de],\u4EFF\u5B8B:["FangSong","STFangsong",...de],meiryo:["Meiryo",...re],"yu gothic":["Yu Gothic","Yu Gothic UI",...re],\u6E38\u30B4\u30B7\u30C3\u30AF:["Yu Gothic","Yu Gothic UI",...re],"\u6E38\u30B4\u30B7\u30C3\u30AF light":["Yu Gothic Light","Yu Gothic",...re],"ms pgothic":["MS PGothic",...re],"ms pmincho":["MS PMincho","Yu Mincho","Hiragino Mincho ProN"],"malgun gothic":["Malgun Gothic",...nr],"\uB9D1\uC740 \uACE0\uB515":["Malgun Gothic",...nr],batang:["Batang","AppleMyungjo","Noto Serif CJK KR"],wingdings:["Wingdings"],"wingdings 2":["Wingdings 2"],"wingdings 3":["Wingdings 3"],webdings:["Webdings"]};function id(t,e){const r=Mt(t).toLowerCase();return od(r,e)?["Roboto Mono","Roboto","Segoe UI","Arial","Helvetica Neue","Helvetica","Liberation Sans","Cascadia Mono","Consolas","Courier New","monospace"]:Object.prototype.hasOwnProperty.call(ba,r)?ba[r]:[]}function od(t,e){return t!=="roboto mono"||!(e!=null&&e.trim())?false:jn(e)?true:e.trim().split(/\s+/).filter(n=>/[A-Za-z]/.test(n)).length>=3&&!sd(e)}function sd(t){return/[`{}[\]();=<>/\\]|::|->|=>|\b(func|class|const|let|var|return|package|import|export)\b/i.test(t)}function cd(t,e){const r=Mt(t).toLowerCase();if(_e(r,["dengxian","\u7B49\u7EBF","yahei","\u5FAE\u8F6F\u96C5\u9ED1","simsun","\u5B8B\u4F53","simhei","\u9ED1\u4F53","kaiti","\u6977\u4F53","fangsong","\u4EFF\u5B8B"]))return Ot;if(_e(r,["meiryo","yu gothic","\u6E38\u30B4\u30B7\u30C3\u30AF","ms pgothic","ms pmincho"]))return re;if(_e(r,["malgun gothic","\uB9D1\uC740 \uACE0\uB515","batang"]))return nr;const n=ld(e);return n||[]}function ld(t){if(t){if(/[\u4E00-\u9FFF]/.test(t))return Ot;if(/[\u3040-\u30FF]/.test(t))return re;if(/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7AF]/.test(t))return nr}}function En(t){const e=Mt(t).toLowerCase();return _e(e,["wingdings","webdings","symbol"])}function dd(t){return Zl.has(Ut(t).toLowerCase())}function ud(t,e){const r=t==null?void 0:t.trim();return!!(!r||/^[\x20-\x7E]+$/.test(r)&&/[A-Za-z]/.test(r)||jn(r)&&pd(r))}function jn(t){return!!(t&&/[\u4E00-\u9FFF]/.test(t))}function pd(t){return!!(t&&/[A-Za-z]/.test(t))}function _e(t,e){return e.some(r=>t.includes(r))}function Di(t){return/^(serif|sans-serif|monospace|system-ui|ui-sans-serif|cursive|fantasy|emoji|math|fangsong)$/i.test(t)||/^[A-Za-z0-9_-]+$/.test(t)?t:`"${t.replace(/["\\]/g,"\\$&")}"`}function ar(t,e=false){return e?"700":hd(t)}function hd(t){const e=Ut(t??"").toLowerCase();if(!e)return;const r=fd(e);if(r!=null&&!gd(t??e))return String(md(r))}function fd(t){for(const e of ed)if(e.pattern.test(t))return e.scale}function md(t){const e=Kl*t,r=Math.min(td,Math.max(Ql,e));return Math.round(r/va)*va}function gd(t){const e=Array.from(new Set([Mt(t),Ut(t)].filter(yd)));return e.length?e.some(r=>xd(r)):true}function yd(t){const e=Mt(t);return!e||e.includes(",")?false:!/^(serif|sans-serif|monospace|system-ui|ui-sans-serif|cursive|fantasy|emoji|math|fangsong)$/i.test(e)}function xd(t){const e=ot&&(ot.fontAvailability??(ot.fontAvailability=new Map)),r=Mt(t).toLowerCase(),n=e==null?void 0:e.get(r);if(n!=null)return n;const a=vd(t);return e==null||e.set(r,a),a}function vd(t){const e=["monospace","serif","sans-serif"],r=(ot==null?void 0:ot.baselineWidths)??e.map(n=>wa(n));return ot&&(ot.baselineWidths=r),r.some(n=>n==null)?true:e.some((n,a)=>{const i=wa(`${Di(t)}, ${n}`),o=r[a];return i!=null&&o!=null&&Math.abs(i-o)>ad})}function wa(t){if(!(typeof document>"u"||typeof document.createElement!="function"))try{const e=Mi();return e?(e.font=`normal 400 ${nd}px ${t}`,e.measureText(rd).width):void 0}catch{return}}function Hi(t,e=false){if(e)return"italic";const r=Mt(t??"").toLowerCase();if(/\bitalic\b|\boblique\b/.test(r))return"italic"}function bd(t,e){const r=t.text.replace(/[\n\t]/g,"").trim();if(!(r.length<2||/\s/.test(r))&&!(!/^[\x20-\x7E]+$/.test(r)||!/[A-Za-z]/.test(r))&&!(jn(e)&&(e==null?void 0:e.trim())!==r&&(e!=null&&e.includes(`${r} `)||e!=null&&e.includes(` ${r}`)))&&!((t.fontSize??0)<16))return"-0.04em"}function wd(t,e){var l,u,f,m;const r=Math.max(t.transform.width,1),n=Math.max(t.transform.height,1),a=Math.max(((l=t.line)==null?void 0:l.width)??1,0),i=Id(t.id,t.fill,e,r,n),o=Ui(t.line);if(((u=t.geometry)==null?void 0:u.type)==="custom"){const h=Sd(t.geometry.paths,r,n,i.paint,o,a,t.line);if(h)return{node:h,defs:i.defs}}if(t.shapeType==="line"){const h=document.createElementNS("http://www.w3.org/2000/svg","line"),g=((f=t.geometry)==null?void 0:f.type)==="line"?t.geometry:void 0;return h.setAttribute("x1",String((g==null?void 0:g.x1)??0)),h.setAttribute("y1",String((g==null?void 0:g.y1)??0)),h.setAttribute("x2",String((g==null?void 0:g.x2)??r)),h.setAttribute("y2",String((g==null?void 0:g.y2)??n)),h.setAttribute("stroke",o),h.setAttribute("stroke-width",String(a)),fe(h,t.line),{node:h,defs:lu(h,t,o)}}if(t.shapeType==="ellipse"){const h=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return h.setAttribute("cx",String(r/2)),h.setAttribute("cy",String(n/2)),h.setAttribute("rx",String(r/2)),h.setAttribute("ry",String(n/2)),h.setAttribute("fill",i.paint),h.setAttribute("stroke",o),h.setAttribute("stroke-width",String(a)),fe(h,t.line),{node:h,defs:i.defs}}if(t.shapeType==="rect"||t.shapeType==="roundRect"){const h=document.createElementNS("http://www.w3.org/2000/svg","rect");if(h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width",String(r)),h.setAttribute("height",String(n)),h.setAttribute("fill",i.paint),h.setAttribute("stroke",o),h.setAttribute("stroke-width",String(a)),t.shapeType==="roundRect"){const g=Cd(t,r,n);h.setAttribute("rx",String(g)),h.setAttribute("ry",String(g))}return fe(h,t.line),{node:h,defs:i.defs}}const s=Ai(t.shapeType,{width:r,height:n,fill:i.paint,stroke:o,strokeWidth:a,line:t.line,adjustments:((m=t.geometry)==null?void 0:m.type)==="preset"?t.geometry.adjustments:void 0,applyLineStyles:fe,applyDashPattern:qi});if(s)return{node:s,defs:i.defs};const d=document.createElementNS("http://www.w3.org/2000/svg","polygon");return d.setAttribute("points",Td(r,n)),d.setAttribute("fill",i.paint),d.setAttribute("stroke",o),d.setAttribute("stroke-width",String(a)),fe(d,t.line),{node:d,defs:i.defs}}function Sd(t,e,r,n,a,i,o){const s=t.map(l=>Fd(l,e,r,n,a,i,o)).filter(l=>!!l);if(!s.length)return;if(s.length===1)return s[0];const d=document.createElementNS("http://www.w3.org/2000/svg","g");for(const l of s)d.appendChild(l);return d}function Fd(t,e,r,n,a,i,o){const s=kd(t,e,r);if(!s)return;const d=document.createElementNS("http://www.w3.org/2000/svg","path");return d.setAttribute("d",s),d.setAttribute("fill",t.fill==="none"?"none":n),d.setAttribute("stroke",t.stroke==="none"?"none":a),t.stroke!=="none"&&(d.setAttribute("stroke-width",String(i)),fe(d,o),(o==null?void 0:o.lineJoin)==="miter"&&Ad(t)&&d.setAttribute("stroke-linejoin","round")),d}function Ad(t){return t.commands.some(e=>e.type==="Q"||e.type==="C")}function kd(t,e,r){const n=e/Math.max(t.width,1),a=r/Math.max(t.height,1),i=[];for(const o of t.commands)switch(o.type){case"M":i.push(`M ${St(o.x*n)} ${St(o.y*a)}`);break;case"L":i.push(`L ${St(o.x*n)} ${St(o.y*a)}`);break;case"Q":i.push(`Q ${St(o.x1*n)} ${St(o.y1*a)} ${St(o.x*n)} ${St(o.y*a)}`);break;case"C":i.push(`C ${St(o.x1*n)} ${St(o.y1*a)} ${St(o.x2*n)} ${St(o.y2*a)} ${St(o.x*n)} ${St(o.y*a)}`);break;case"Z":i.push("Z");break}return i.join(" ")}function St(t){return String(Number(t.toFixed(3)))}function Td(t,e){return`0,0 ${t},0 ${t},${e} 0,${e}`}function Ld(t){var i,o,s,d;const e=Math.max(((i=t.line)==null?void 0:i.width)??0,0),n=!!((t.shapeType==="line"||t.shapeType.endsWith("Arrow"))&&((o=t.line)!=null&&o.headEnd&&t.line.headEnd!=="none"||(s=t.line)!=null&&s.tailEnd&&t.line.tailEnd!=="none"))?Math.max(e*5,10):0,a=((d=t.geometry)==null?void 0:d.type)==="custom"?Md(t):0;return Number(Math.max(e*1.5,n,a,1).toFixed(3))}function Md(t){var s;if(((s=t.geometry)==null?void 0:s.type)!=="custom")return 0;const e=Math.max(t.transform.width,1),r=Math.max(t.transform.height,1);let n=0,a=0,i=e,o=r;for(const d of t.geometry.paths){const l=e/Math.max(d.width,1),u=r/Math.max(d.height,1);for(const f of d.commands)switch(f.type){case"M":case"L":n=Math.min(n,f.x*l),a=Math.min(a,f.y*u),i=Math.max(i,f.x*l),o=Math.max(o,f.y*u);break;case"Q":n=Math.min(n,f.x1*l,f.x*l),a=Math.min(a,f.y1*u,f.y*u),i=Math.max(i,f.x1*l,f.x*l),o=Math.max(o,f.y1*u,f.y*u);break;case"C":n=Math.min(n,f.x1*l,f.x2*l,f.x*l),a=Math.min(a,f.y1*u,f.y2*u,f.y*u),i=Math.max(i,f.x1*l,f.x2*l,f.x*l),o=Math.max(o,f.y1*u,f.y2*u,f.y*u);break}}return Number(Math.max(-n,-a,i-e,o-r,0).toFixed(3))}function Cd(t,e,r){var i,o;const n=((i=t.geometry)==null?void 0:i.type)==="preset"?(o=t.geometry.adjustments)==null?void 0:o.adj:void 0,a=Ed(n??16667)/1e5;return Number((Math.min(e,r)*a).toFixed(3))}function Ed(t){return Number.isFinite(t)?Math.min(Math.max(t,0),5e4):16667}function jd(t){switch(t){case"middle":return"center";case"bottom":return"flex-end";default:return"flex-start"}}function Rd(t){switch(t){case"middle":return"middle";case"bottom":return"bottom";default:return"top"}}function zi(t){var e;if(t.type==="none"||t.type==="picture")return"transparent";if(t.type==="pattern")return vt(t.backgroundColor??"#FFFFFF",t.backgroundAlpha);if(t.type==="gradient"&&((e=t.stops)!=null&&e.length)){const r=$d(t.stops);if(t.gradientType==="path"){if(t.gradientPath==="rect"){const i=Sa(t.angle??0);return`linear-gradient(${Number(i.toFixed(3))}deg, ${r})`}const a=Xi(t);return`radial-gradient(circle${a?` at ${a.x}% ${a.y}%`:""}, ${r})`}const n=Sa(t.angle??0);return`linear-gradient(${Number(n.toFixed(3))}deg, ${r})`}return t.color?vt(t.color,t.alpha):"transparent"}function Nd(t){var e,r;if(t.type==="solid")return t.color;if(t.type==="gradient")return(r=(e=t.stops)==null?void 0:e[0])==null?void 0:r.color;if(t.type==="pattern")return t.foregroundColor??t.backgroundColor}function vt(t,e){if(e==null)return t;const[r,n,a]=an(t);return`rgba(${r}, ${n}, ${a}, ${e})`}function Ui(t){return!(t!=null&&t.color)||t.color==="transparent"||t.alpha!=null&&t.alpha<=0?"transparent":vt(t.color,t.alpha)}function Sa(t){return((90-t)%360+360)%360}function $d(t){return t.map(e=>`${vt(e.color,e.alpha)} ${Number((e.position*100).toFixed(3))}%`).join(", ")}function Xi(t){if(t.type!=="gradient"||t.gradientType!=="path")return;const e=t.gradientTileRect;if(!e)return;const r=e.left<0?0:e.right<0?100:50,n=e.top<0?0:e.bottom<0?100:50;if(!(r===50&&n===50))return{x:r,y:n}}function Id(t,e,r,n,a){var o;if(e.type==="picture"&&e.mediaId){const s=r.getUrl(e.mediaId);if(!s)return{paint:"transparent",defs:[]};const d=document.createElementNS("http://www.w3.org/2000/svg","pattern");d.id=`${t}-fill-pattern`,d.setAttribute("patternUnits","userSpaceOnUse"),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(n)),d.setAttribute("height",String(a));const l=document.createElementNS("http://www.w3.org/2000/svg","image");if(l.setAttribute("preserveAspectRatio","none"),l.setAttribute("href",s),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),e.crop){const u=Math.max(1-e.crop.left-e.crop.right,1e-4),f=Math.max(1-e.crop.top-e.crop.bottom,1e-4);l.setAttribute("x",String(Number((-e.crop.left/u*n).toFixed(3)))),l.setAttribute("y",String(Number((-e.crop.top/f*a).toFixed(3)))),l.setAttribute("width",String(Number((n/u).toFixed(3)))),l.setAttribute("height",String(Number((a/f).toFixed(3))))}else l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(n)),l.setAttribute("height",String(a));return e.alpha!=null&&l.setAttribute("opacity",String(e.alpha)),d.appendChild(l),{paint:`url(#${d.id})`,defs:[d]}}if(e.type==="pattern")return Od(t,e);if(e.type!=="gradient"||!((o=e.stops)!=null&&o.length))return{paint:zi(e),defs:[]};if(e.gradientType==="path"){if(e.gradientPath==="rect"){const l=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");l.id=`${t}-fill-gradient`,l.setAttribute("x1","0"),l.setAttribute("y1","0.5"),l.setAttribute("x2","1"),l.setAttribute("y2","0.5"),l.setAttribute("gradientUnits","objectBoundingBox");for(const u of e.stops){const f=document.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset",`${Number((u.position*100).toFixed(3))}%`),f.setAttribute("stop-color",u.color),u.alpha!=null&&f.setAttribute("stop-opacity",String(u.alpha)),l.appendChild(f)}return{paint:`url(#${l.id})`,defs:[l]}}const s=document.createElementNS("http://www.w3.org/2000/svg","radialGradient");s.id=`${t}-fill-gradient`;const d=Xi(e);d&&(s.setAttribute("cx",`${d.x}%`),s.setAttribute("cy",`${d.y}%`));for(const l of e.stops){const u=document.createElementNS("http://www.w3.org/2000/svg","stop");u.setAttribute("offset",`${Number((l.position*100).toFixed(3))}%`),u.setAttribute("stop-color",l.color),l.alpha!=null&&u.setAttribute("stop-opacity",String(l.alpha)),s.appendChild(u)}return{paint:`url(#${s.id})`,defs:[s]}}const i=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");i.id=`${t}-fill-gradient`,i.setAttribute("x1","0"),i.setAttribute("y1","0.5"),i.setAttribute("x2","1"),i.setAttribute("y2","0.5"),i.setAttribute("gradientUnits","objectBoundingBox"),i.setAttribute("gradientTransform",`rotate(${Number(((e.angle??0)%360).toFixed(3))} 0.5 0.5)`);for(const s of e.stops){const d=document.createElementNS("http://www.w3.org/2000/svg","stop");d.setAttribute("offset",`${Number((s.position*100).toFixed(3))}%`),d.setAttribute("stop-color",s.color),s.alpha!=null&&d.setAttribute("stop-opacity",String(s.alpha)),i.appendChild(d)}return{paint:`url(#${i.id})`,defs:[i]}}function Bd(t){const e=vt(t.foregroundColor??"#111827",t.foregroundAlpha),r=vt(t.backgroundColor??"#FFFFFF",t.backgroundAlpha);switch(t.pattern){case"horz":return{color:r,image:`repeating-linear-gradient(180deg, ${e} 0 2px, ${r} 2px 8px)`};case"vert":return{color:r,image:`repeating-linear-gradient(90deg, ${e} 0 2px, ${r} 2px 8px)`};case"ltDnDiag":return{color:r,image:`repeating-linear-gradient(45deg, ${e} 0 2px, ${r} 2px 10px)`};case"ltUpDiag":return{color:r,image:`repeating-linear-gradient(135deg, ${e} 0 2px, ${r} 2px 10px)`};case"diagCross":return{color:r,image:`repeating-linear-gradient(45deg, ${e} 0 2px, transparent 2px 10px), repeating-linear-gradient(135deg, ${e} 0 2px, transparent 2px 10px)`};case"smGrid":return{color:r,image:`repeating-linear-gradient(0deg, ${e} 0 1px, transparent 1px 8px), repeating-linear-gradient(90deg, ${e} 0 1px, transparent 1px 8px)`};case"lgGrid":return{color:r,image:`repeating-linear-gradient(0deg, ${e} 0 2px, transparent 2px 14px), repeating-linear-gradient(90deg, ${e} 0 2px, transparent 2px 14px)`};case"pct10":return kt(e,r,5,.65);case"pct20":return kt(e,r,10,1.75);case"pct25":return kt(e,r,9,1.9);case"pct30":return kt(e,r,8,2);case"pct40":return kt(e,r,8,2.35);case"pct50":return kt(e,r,7,2.4);case"pct60":return kt(e,r,6,2.45);case"pct70":return kt(e,r,5,2.55);case"pct75":return kt(e,r,5,2.7);case"pct80":return kt(e,r,4,2.75);case"pct90":return kt(e,r,4,3);case"pct5":return kt(e,r,4,.45);case"solidDmnd":return Pd(`<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
1
+ var po=Object.defineProperty;var ho=(t,e,r)=>e in t?po(t,e,{enumerable:true,configurable:true,writable:true,value:r}):t[e]=r;var E=(t,e,r)=>ho(t,typeof e!="symbol"?e+"":e,r);import{J as fo,i as mo,u as Pn,f as go,U as mr}from"./vendor-C8SyXchM.js";function U(t){return t==null?[]:Array.isArray(t)?t:[t]}function gt(t,e,r){return Math.min(Math.max(t,e),r)}function On(t){const e=t.replace(/\\/g,"/").split("/"),r=[];for(const n of e)if(!(!n||n===".")){if(n===".."){r.pop();continue}r.push(n)}return r.join("/")}function yo(t,e){if(e.startsWith("/"))return On(e.slice(1));const r=t.split("/").slice(0,-1).join("/");return On(`${r}/${e}`)}function B(t,e=0){if(typeof t=="number")return Number.isFinite(t)?t:e;if(typeof t=="string"&&t.trim().length>0){const r=Number(t);return Number.isFinite(r)?r:e}return e}let Dn=0;function $t(t){return Dn+=1,`${t}-${Dn}`}function xt(t){return t==null||typeof t!="object"?t:typeof structuredClone=="function"?structuredClone(t):JSON.parse(JSON.stringify(t))}class ie extends Error{constructor(e){super(e==="password_required"?"This document requires a password.":e==="password_invalid"?"Incorrect password. Please try again.":"Opening the document was cancelled."),this.code=e,this.name="PreviewPasswordError"}}function ge(t){var n;const e=t,r=(e==null?void 0:e.code)??((n=e==null?void 0:e.result)==null?void 0:n.errorCode);return r==="password_required"||r==="password_invalid"||r==="password_cancelled"?r:void 0}const jr=new TextDecoder;async function xo(t,e={}){const r=vo(t,e.maxEntryBytes);if(r)return r;let n;try{n=await fo.loadAsync(t)}catch(i){throw i instanceof Error&&/encrypted/i.test(i.message)?new ie("password_required"):i}const a={remaining:8*1024*1024};return new Map(Object.values(n.files).map(i=>{var d,l,u;const o=i,s=Ia(()=>{var f;if((((f=o._data)==null?void 0:f.uncompressedSize)??0)>(e.maxEntryBytes??128*1024*1024))throw new Error("Archive entry exceeds the preview size limit.");return i.async("uint8array")},(d=o._data)==null?void 0:d.uncompressedSize,a);return[i.name,{name:i.name,directory:i.dir,size:(l=o._data)==null?void 0:l.uncompressedSize,modified:(u=i.date)==null?void 0:u.getTime(),bytes:s,text:async()=>jr.decode(await s())}]}))}function vo(t,e=128*1024*1024){const r=new DataView(t.buffer,t.byteOffset,t.byteLength),n=t.length;let a=n-22;const i=Math.max(0,a-65535);for(;a>=i&&!(r.getUint32(a,true)===101010256&&a+22+r.getUint16(a+20,true)===n);a--);if(a<i)return;if([4,6].some(m=>{const h=r.getUint16(a+m,true);return h!==0&&h!==65535}))throw new Error("Multi-volume ZIP requires all archive parts.");const o=r.getUint16(a+10,true),s=r.getUint32(a+12,true);let d=r.getUint32(a+16,true);if(r.getUint16(a+4,true)||r.getUint16(a+6,true)||r.getUint16(a+8,true)!==o||o===65535||s===4294967295||d===4294967295||d+s!==a)return;const l=new Map,u={remaining:8*1024*1024},f=d;for(let m=0;m<o;m++){if(d+46>a||r.getUint32(d,true)!==33639248)return;const h=r.getUint16(d+8,true),g=r.getUint16(d+10,true),x=r.getUint32(d+20,true),S=r.getUint32(d+24,true),y=r.getUint16(d+28,true),F=r.getUint16(d+30,true),k=r.getUint16(d+32,true),w=r.getUint32(d+42,true),T=d+46+y+F+k;if(T>a)return;if(h&1)throw new ie("password_required");if(g!==0&&g!==8||x===4294967295||S===4294967295||w===4294967295||r.getUint16(d+34,true))return;const N=t.subarray(d+46,d+46+y);if(!(h&2048)&&N.some($=>$>=128))return;for(let $=d+46+y;$<d+46+y+F;){if($+4>T)return;const q=r.getUint16($,true),V=r.getUint16($+2,true);if(q===28789||q===1||($+=4+V,$>d+46+y+F))return}const I=[],C=jr.decode(N);for(const $ of C.split("/"))$===".."?I.pop():$!=="."&&I.push($);let M=I.join("/");const H=C.endsWith("/")||!!(r.getUint32(d+38,true)&16);if(H&&!M.endsWith("/")&&(M+="/"),w+30>f||r.getUint32(w,true)!==67324752)return;const z=w+30+r.getUint16(w+26,true)+r.getUint16(w+28,true);if(z+x>f)return;const Y=t.subarray(z,z+x),D=r.getUint16(d+14,true),P=r.getUint16(d+12,true),j=Date.UTC((D>>9)+1980,(D>>5&15)-1,D&31,P>>11,P>>5&63,(P&31)*2),O=Ia(async()=>{if(S>e)throw new Error("Archive entry exceeds the preview size limit.");const $=g===0?Y:await bo(Y,S);if($.length!==S)throw new Error(`Invalid ZIP entry size: ${M}.`);return $},S,u);l.set(M,{name:M,directory:H,size:S,modified:j,bytes:O,text:async()=>jr.decode(await O())}),d=T}return d===a?l:void 0}function Ia(t,e,r){let n;return()=>{if(n)return n;const a=Promise.resolve().then(t);return e!==void 0&&e<=r.remaining&&(r.remaining-=e,n=a,a.catch(()=>{n===a&&(n=void 0,r.remaining+=e)})),a}}async function bo(t,e){if(e>=256*1024&&typeof DecompressionStream<"u"&&typeof Response<"u"){let r;try{r=new DecompressionStream("deflate-raw")}catch{}if(r){const a=new Response(t).body.pipeThrough(r).getReader(),i=[];let o=0;try{for(;;){const{value:l,done:u}=await a.read();if(u)break;if(o+=l.byteLength,o>e)throw new Error("Invalid ZIP entry size.");i.push(l)}}finally{await a.cancel().catch(()=>{})}const s=new Uint8Array(o);let d=0;for(const l of i)s.set(l,d),d+=l.byteLength;return s}}return mo(t,{out:new Uint8Array(e+1)})}async function nn(t,e={}){try{return await xo(t,e)}catch(r){if(!(r instanceof ie)||r.code!=="password_required")throw r;return Fo(t,e)}}const wo=new TextDecoder;async function Fo(t,e){var o;const{ZipReader:r,Uint8ArrayReader:n,ERR_INVALID_PASSWORD:a}=await import("./vendor-C8SyXchM.js").then(s=>s.aR),i=new r(new n(t),{useWebWorkers:false});try{const s=new Map;for(const d of await i.getEntries()){let l;const u=async(f=e.password,m=e.signal)=>{if(m==null||m.throwIfAborted(),l)return l;if(d.directory)return new Uint8Array;if(d.encrypted&&!f)throw new ie("password_required");const h=e.maxEntryBytes??128*1024*1024;if(d.uncompressedSize>h)throw new Error("Archive entry exceeds the preview size limit.");try{let g=0;const x=[];await d.getData(new WritableStream({write(F){if(g+=F.byteLength,g>h)throw new Error("Archive entry exceeds the preview size limit.");x.push(F)}}),{password:f,signal:m,checkSignature:true});const S=new Uint8Array(g);let y=0;for(const F of x)S.set(F,y),y+=F.byteLength;return S.byteLength<=8388608&&(l=S),S}catch(g){throw g instanceof Error&&g.message===a?new ie("password_invalid"):g}};s.set(d.filename,{name:d.filename,directory:d.directory,encrypted:d.encrypted,size:d.uncompressedSize,modified:(o=d.lastModDate)==null?void 0:o.getTime(),bytes:u,text:async()=>wo.decode(await u())})}return s}finally{await i.close()}}async function Je(t,e={}){if(Dt(e.signal),typeof t=="string"){const r=await fetch(t,{signal:e.signal});if(Dt(e.signal),!r.ok)throw new Error(`Failed to fetch PPTX source: ${r.status} ${r.statusText}`);const n=await r.arrayBuffer();return Dt(e.signal),new Uint8Array(n)}if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice();if(Ao(t))return new Uint8Array(t);if(ko(t)){const r=await t.arrayBuffer();return Dt(e.signal),new Uint8Array(r)}throw new Error("Unsupported PPTX source type.")}function Dt(t){if(t!=null&&t.aborted)throw So()}function So(){try{return new DOMException("The operation was aborted.","AbortError")}catch{const t=new Error("The operation was aborted.");return t.name="AbortError",t}}function Ao(t){return t instanceof ArrayBuffer||Object.prototype.toString.call(t)==="[object ArrayBuffer]"||Object.prototype.toString.call(t)==="[object SharedArrayBuffer]"}function ko(t){return typeof t=="object"&&t!==null&&typeof t.arrayBuffer=="function"&&typeof t.size=="number"}class Hn{constructor(e,r){E(this,"loaded");this.data=e,this.signal=r}async async(e){Dt(this.signal),this.loaded??(this.loaded=typeof this.data=="function"?this.data():Promise.resolve(this.data));const r=await this.loaded;return Dt(this.signal),e==="text"?new TextDecoder().decode(r):r}}async function To(t,e={}){Dt(e.signal);const r=await nn(t).catch(()=>{});if(Dt(e.signal),r){const i=new Map([...r].map(([o,s])=>[o,new Hn(s.bytes,e.signal)]));return{file:o=>i.get(o)??null}}const n=[];Pn(t,{filter:i=>(n.push(i.name),false)});const a=new Map(n.map(i=>[i,new Hn(async()=>Pn(t,{filter:o=>o.name===i})[i],e.signal)]));return{file:i=>a.get(i)??null}}function an(t){const e=t.replace("#","").padEnd(6,"0");return[Number.parseInt(e.slice(0,2),16),Number.parseInt(e.slice(2,4),16),Number.parseInt(e.slice(4,6),16)]}function Ba(t){return`#${t.map(e=>Ro(e).toString(16).padStart(2,"0")).join("")}`.toUpperCase()}function qe(t,e){return on(t,({h:r,s:n,l:a})=>({h:r,s:n,l:a+(1-a)*Me(e)}))}function Rr(t,e){const r=Me(e);return Co(t,n=>n*r)}function Lo(t,e){return on(t,({h:r,s:n,l:a})=>({h:r,s:n,l:a*e}))}function Mo(t,e){return on(t,({h:r,s:n,l:a})=>({h:r,s:n,l:a+e}))}function Nr(t,e,r){const n=r[t]??t;return e[n]??e[t]??"#000000"}function Co(t,e){const[r,n,a]=an(t);return Ba([yr(e(gr(r/255)))*255,yr(e(gr(n/255)))*255,yr(e(gr(a/255)))*255])}function on(t,e){const[r,n,a]=an(t),[i,o,s]=Eo(r/255,n/255,a/255),d=e({h:i,s:o,l:s}),[l,u,f]=jo(d.h,Me(d.s),Me(d.l));return Ba([l*255,u*255,f*255])}function gr(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function yr(t){const e=Me(t);return e<=.0031308?e*12.92:1.055*Math.pow(e,1/2.4)-.055}function Eo(t,e,r){const n=Math.max(t,e,r),a=Math.min(t,e,r),i=(n+a)/2;if(n===a)return[0,0,i];const o=n-a,s=i>.5?o/(2-n-a):o/(n+a);let d=0;switch(n){case t:d=(e-r)/o+(e<r?6:0);break;case e:d=(r-t)/o+2;break;default:d=(t-e)/o+4;break}return[d/6,s,i]}function jo(t,e,r){if(e===0)return[r,r,r];const n=(t%1+1)%1,a=r<.5?r*(1+e):r+e-r*e,i=2*r-a;return[xr(i,a,n+1/3),xr(i,a,n),xr(i,a,n-1/3)]}function xr(t,e,r){let n=r;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ro(t){return Math.max(0,Math.min(255,Math.round(t)))}function Me(t){return Number.isFinite(t)?Math.max(0,Math.min(1,t)):0}const No=9525,$o=6e4;function J(t){return t/No}function sr(t){return t/$o}const vr=/([^<]+)|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\?xml\s+([^?]*)\?>|<\/([^\s/>]+)\s*>|<([^\s/>!?]+)((?:\s+[^\s=/>]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>/gy,zn=/([^\s=/>]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Io=/&(amp|lt|gt|quot|apos|#38|#x26|#60|#x3C|#62|#x3E|#34|#x22|#39|#x27);/g,Bo={amp:"&","#38":"&","#x26":"&",lt:"<","#60":"<","#x3C":"<",gt:">","#62":">","#x3E":">",quot:'"',"#34":'"',"#x22":'"',apos:"'","#39":"'","#x27":"'"};function Po(t){if(!t.startsWith("<"))return null;const e=t.replace(/\r\n?/g,`
2
+ `),r={tag:"",children:[],text:""},n=[r];vr.lastIndex=0;let a=0;try{for(;a<e.length;){const i=vr.exec(e);if(!i||i.index!==a)return null;a=vr.lastIndex;const o=n[n.length-1];if(i[1]!==void 0)n.length>1&&(o.text+=i[1]);else if(i[2]!==void 0)Be(o),o.children.push({"#text":i[2]});else if(i[3]!==void 0){Be(o);const s={"?xml":[{"#text":""}]};s[":@"]=Un(i[3]),o.children.push(s)}else if(i[4]!==void 0){if(n.length===1||o.tag!==i[4])return null;Be(o),n.pop()}else if(i[5]!==void 0){const s=i[5];if(s===":@"||s==="#text"||s==="__proto__")return null;Be(o);const d=[],l={};if(Oa(l,s,d),i[6].trim()&&(l[":@"]=Un(i[6])),o.children.push(l),!i[7]){if(n.length>101)return null;n.push({tag:s,children:d,text:""})}}}return n.length===1?r.children:null}catch{return null}}function Be(t){t.text&&(t.children.push({"#text":Pa(t.text)}),t.text="")}function Un(t){const e={};zn.lastIndex=0;let r;for(;r=zn.exec(t);){if(r[1]in Object.prototype||r[1]==="prototype")throw new Error("Reserved XML attribute");Oa(e,r[1],Pa(r[2]??r[3]))}return e}function Pa(t){return t.includes("&")?t.replace(Io,(e,r)=>Bo[r]):t}function Oa(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{value:r,enumerable:true,writable:true,configurable:true}):t[e]=r}const Oo=new go.XMLParser({preserveOrder:true,ignoreAttributes:false,attributeNamePrefix:"",parseTagValue:false,trimValues:false,parseAttributeValue:false}),Xn=new WeakMap,Yn=new WeakMap;function Da(t){let e=Xn.get(t);return e||(e=t.async("text").then(r=>Po(r)??Oo.parse(r)),Xn.set(t,e)),e}async function It(t,e){const r=t.file(e);if(!r)return null;let n=Yn.get(r);return n||(n=Ha(await Da(r)),Yn.set(r,n)),n}async function cr(t,e){const r=t.file(e);return r?Da(r):null}function Ha(t){const e={};let r;for(const n of t){const a=Object.keys(n).find(d=>d!==":@");if(!a)continue;if(a==="#text"){r=r===void 0?n[a]:String(r)+String(n[a]);continue}if(!Array.isArray(n[a]))continue;const i=Ha(n[a]),o=n[":@"];let s=i;if(o)for(const[d,l]of Object.entries(o))br(i,d,l);else{const d=Object.keys(i);d.length===0?s="":d.length===1&&i["#text"]!==void 0&&(s=i["#text"])}if(Object.prototype.hasOwnProperty.call(e,a)&&e[a]!==void 0){const d=e[a];Array.isArray(d)?d.push(s):br(e,a,[d,s])}else br(e,a,s)}return r!==void 0&&(typeof r!="string"||r.length)&&(e["#text"]=r),e}function br(t,e,r){e==="__proto__"?Object.defineProperty(t,e,{value:r,enumerable:true,writable:true,configurable:true}):t[e]=r}const nt={slideMaster:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideMaster",slideLayout:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout",theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",video:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/video",audio:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/audio",media:"http://schemas.microsoft.com/office/2007/relationships/media",hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",slide:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide",diagramData:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/diagramData",diagramDrawing:"http://schemas.microsoft.com/office/2007/relationships/diagramDrawing",chart:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"},at={name:"Default",colors:{dk1:"#111827",lt1:"#FFFFFF",dk2:"#334155",lt2:"#F8FAFC",accent1:"#2563EB",accent2:"#F97316",accent3:"#10B981",accent4:"#F59E0B",accent5:"#8B5CF6",accent6:"#0EA5E9",hlink:"#2563EB",folHlink:"#8B5CF6"},fonts:{major:"Aptos",minor:"Calibri",majorScripts:{},minorScripts:{}}},Ve={bg1:"lt1",tx1:"dk1",bg2:"lt2",tx2:"dk2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hlink:"hlink",folHlink:"folHlink"},sn={offsetX:0,offsetY:0,scaleX:1,scaleY:1,rotation:0,flipH:false,flipV:false,matrix:{a:1,b:0,c:0,d:1,e:0,f:0},groupPath:[],fill:void 0},$r="\xAD",Ir="\u2011";function Ce(){return{fills:[],backgroundFills:[],lines:[],effects:[]}}async function Do(t,e={}){var S;const r=await Je(t,e),n=await To(r,e),a=[],i={masters:new Map,layouts:new Map,themes:new Map,media:{}},o=await Ho(n),s=await It(n,"ppt/presentation.xml");if(!(s!=null&&s["p:presentation"]))throw new Error("Invalid PPTX: presentation.xml is missing.");const d=await lr(n,"ppt/_rels/presentation.xml.rels"),l=s["p:presentation"];i.presentationDefaultTextStyle=X(l["p:defaultTextStyle"]);const u=l["p:sldSz"],f={width:J(B(u==null?void 0:u.cx,9144e3)),height:J(B(u==null?void 0:u.cy,5143500))},m=U((S=l["p:sldIdLst"])==null?void 0:S["p:sldId"]),h=Object.fromEntries(m.flatMap((y,F)=>{const k=y["r:id"],w=k?d[k]:void 0;return w?[[w.target,F]]:[]})),g=[];let x=at;for(const y of m){const F=y["r:id"];if(!F)continue;const k=d[F];if(!k){a.push(`Missing relationship ${F} in presentation.xml.rels.`);continue}const w=[],T=await Yo(n,k.target,f,o,i,w,h);Dt(e.signal),x=T.theme,a.push(...w),g.push({...T.slide,index:g.length})}return Dt(e.signal),{size:f,theme:x,slides:g,media:i.media,warnings:a}}async function Ho(t){const e=await It(t,"[Content_Types].xml"),r=e==null?void 0:e.Types,n={},a={};for(const i of U(r==null?void 0:r.Override))n[String(i.PartName??"").replace(/^\//,"")]=String(i.ContentType??"");for(const i of U(r==null?void 0:r.Default))a[String(i.Extension??"")]=String(i.ContentType??"");return{overrides:n,defaults:a}}async function lr(t,e){const r=await It(t,e),n=r==null?void 0:r.Relationships,a=U(n==null?void 0:n.Relationship),i={},o=Sc(e);for(const s of a){const d=s.TargetMode?String(s.TargetMode):void 0,l=String(s.Target??"");i[String(s.Id)]={id:String(s.Id),type:String(s.Type),target:ac(l,d)?l:yo(o,l),targetMode:d}}return i}async function zo(t,e,r){const n=r.themes.get(e);if(n)return n;const a=(async()=>{var x,S,y,F;const i=await It(t,e),o=await cr(t,e),s=i==null?void 0:i["a:theme"];if(!s)return{theme:at,formatScheme:Ce()};const d=s["a:themeElements"],l=o?Tt(o,"a:theme"):void 0,u=l?Tt(l,"a:themeElements"):void 0,f=d==null?void 0:d["a:clrScheme"],m=d==null?void 0:d["a:fontScheme"],h=Bs(d==null?void 0:d["a:fmtScheme"],u?Tt(u,"a:fmtScheme"):void 0),g={...at.colors};if(f)for(const k of Object.keys(g)){const w=f[`a:${k}`];if(!w)continue;const T=w["a:srgbClr"],N=w["a:sysClr"];T!=null&&T.val?g[k]=`#${String(T.val)}`.toUpperCase():N!=null&&N.lastClr&&(g[k]=`#${String(N.lastClr)}`.toUpperCase())}return{theme:{name:typeof s.name=="string"?s.name:at.name,colors:g,fonts:{major:(S=(x=m==null?void 0:m["a:majorFont"])==null?void 0:x["a:latin"])!=null&&S.typeface?String(m["a:majorFont"]["a:latin"].typeface):at.fonts.major,minor:(F=(y=m==null?void 0:m["a:minorFont"])==null?void 0:y["a:latin"])!=null&&F.typeface?String(m["a:minorFont"]["a:latin"].typeface):at.fonts.minor,majorScripts:qn(m==null?void 0:m["a:majorFont"]),minorScripts:qn(m==null?void 0:m["a:minorFont"])}},formatScheme:h}})();return r.themes.set(e,a),a}async function cn(t,e){if(e.tableStyles)return e.tableStyles;const r=(async()=>{const n=await It(t,"ppt/tableStyles.xml"),a=n==null?void 0:n["a:tblStyleLst"];if(!a)return{styles:{}};const i={};for(const o of U(a["a:tblStyle"])){const s=typeof(o==null?void 0:o.styleId)=="string"?String(o.styleId):"";s&&(i[s]={styleId:s,wholeTbl:X(o["a:wholeTbl"]),band1H:X(o["a:band1H"]),band2H:X(o["a:band2H"]),band1V:X(o["a:band1V"]),band2V:X(o["a:band2V"]),firstRow:X(o["a:firstRow"]),lastRow:X(o["a:lastRow"]),firstCol:X(o["a:firstCol"]),lastCol:X(o["a:lastCol"]),nwCell:X(o["a:nwCell"]),neCell:X(o["a:neCell"]),swCell:X(o["a:swCell"]),seCell:X(o["a:seCell"])})}return{defaultStyleId:typeof a.def=="string"?String(a.def):void 0,styles:i}})();return e.tableStyles=r,r}function qn(t){if(!t)return{};const e={};for(const r of U(t["a:font"])){const n=typeof(r==null?void 0:r.script)=="string"?String(r.script).trim():"",a=typeof(r==null?void 0:r.typeface)=="string"?String(r.typeface).trim():"";!n||!a||(e[n]=a)}return e}async function Uo(t,e,r,n){const a=n.masters.get(e);if(a)return a;const i=(async()=>{var H;const o=await It(t,e),s=await cr(t,e),d=Fn(e),l=await lr(t,d),u=await cn(t,n),f=o==null?void 0:o["p:sldMaster"];if(!f)return{fixedItems:[],placeholders:new Map,background:{type:"solid",color:at.colors.lt1},theme:at,themeFormatScheme:Ce(),textStyles:Gt(),colorMap:{...Ve}};const m=Object.values(l).find(z=>z.type===nt.theme),h=m?await zo(t,m.target,n):{theme:at,formatScheme:Ce()},g=h.theme,x=h.formatScheme,S={...Ve,...f["p:clrMap"]?f["p:clrMap"]:{}},y=[],F={theme:g,themeFormatScheme:x,tableStyles:u,textStyles:Gt(),colorMap:S,relationships:l,slideIndexByPath:{},contentTypes:r,slidePath:e,warnings:y,group:sn,orderedTextFrames:ln(s),orderedShapeNodes:dn(s),orderedNodeOrders:un(s),diagramDataModels:{},diagramDrawings:{},chartSpaces:{},caches:n,zip:t},k=ke(n.presentationDefaultTextStyle,F),w=$s(f["p:txStyles"],F,Gt(k)),T={...F,textStyles:w},N=yn(f["p:cSld"],g,S,x,T)??{type:"solid",color:g.colors.lt1},I=je((H=f["p:cSld"])==null?void 0:H["p:spTree"],T),C=new Map,M=[];for(const z of I)z.placeholderKey?C.set(z.placeholderKey,z):M.push(z);return{fixedItems:M,placeholders:C,background:N,theme:g,themeFormatScheme:x,textStyles:w,colorMap:S}})();return n.masters.set(e,i),i}async function Xo(t,e,r,n){const a=n.layouts.get(e);if(a)return a;const i=(async()=>{var I;const o=await It(t,e),s=await cr(t,e),d=Fn(e),l=await lr(t,d),u=await cn(t,n),f=o==null?void 0:o["p:sldLayout"],m=Object.values(l).find(C=>C.type===nt.slideMaster),h=m?await Uo(t,m.target,r,n):null,g=(h==null?void 0:h.theme)??at,x=(h==null?void 0:h.themeFormatScheme)??Ce(),S=(h==null?void 0:h.colorMap)??{...Ve};if(!f)return{fixedItems:(h==null?void 0:h.fixedItems)??[],placeholders:(h==null?void 0:h.placeholders)??new Map,background:(h==null?void 0:h.background)??{type:"solid",color:g.colors.lt1},theme:g,themeFormatScheme:x,textStyles:(h==null?void 0:h.textStyles)??Gt(),colorMap:S};const y=[],F={theme:g,themeFormatScheme:x,tableStyles:u,textStyles:(h==null?void 0:h.textStyles)??Gt(),placeholderSources:h==null?void 0:h.placeholders,colorMap:S,relationships:l,slideIndexByPath:{},contentTypes:r,slidePath:e,warnings:y,group:sn,orderedTextFrames:ln(s),orderedShapeNodes:dn(s),orderedNodeOrders:un(s),diagramDataModels:{},diagramDrawings:{},chartSpaces:{},caches:n,zip:t},k=yn(f["p:cSld"],g,S,x,F)??(h==null?void 0:h.background)??{type:"solid",color:g.colors.lt1},w=je((I=f["p:cSld"])==null?void 0:I["p:spTree"],F),T=new Map,N=[...(h==null?void 0:h.fixedItems)??[]];for(const C of w)if(C.placeholderKey){const M=yi(wn(h==null?void 0:h.placeholders,C.item.placeholder),C);T.set(C.placeholderKey,M)}else N.push(C);if(h)for(const[C,M]of h.placeholders.entries())T.has(C)||T.set(C,M);return{fixedItems:N,placeholders:T,background:k,theme:g,themeFormatScheme:x,textStyles:(h==null?void 0:h.textStyles)??Gt(),colorMap:S}})();return n.layouts.set(e,i),i}async function Yo(t,e,r,n,a,i,o){var P;const s=await It(t,e),d=await cr(t,e),l=Fn(e),u=await lr(t,l),f=s==null?void 0:s["p:sld"];if(!f)return{slide:{id:$t("slide"),index:0,title:"Untitled slide",background:{type:"solid",color:at.colors.lt1},width:r.width,height:r.height,items:[],warnings:[...i]},theme:at};const m=Object.values(u).find(j=>j.type===nt.slideLayout),h=m?await Xo(t,m.target,n,a):null,g=await cn(t,a),x=(h==null?void 0:h.theme)??at,S=(h==null?void 0:h.themeFormatScheme)??Ce(),y=(h==null?void 0:h.colorMap)??{...Ve},F=await us(t,u),k=await ps(t,u),w=i,T={theme:x,themeFormatScheme:S,tableStyles:g,textStyles:(h==null?void 0:h.textStyles)??Gt(),placeholderSources:h==null?void 0:h.placeholders,colorMap:y,relationships:u,slideIndexByPath:o,contentTypes:n,slidePath:e,warnings:w,group:sn,orderedTextFrames:ln(d),orderedShapeNodes:dn(d),orderedNodeOrders:un(d),diagramDataModels:F.dataModels,diagramDrawings:F.drawings,chartSpaces:k,caches:a,zip:t},N=yn(f["p:cSld"],x,y,S,T)??(h==null?void 0:h.background)??{type:"solid",color:x.colors.lt1},I=je((P=f["p:cSld"])==null?void 0:P["p:spTree"],T),C=[],M=new Set,H=o[e]??0;for(const j of(h==null?void 0:h.fixedItems)??[])C.push(xt(j.item));for(const j of I){const O=j.placeholderKey?yi(wn(h==null?void 0:h.placeholders,j.item.placeholder),j):j;j.placeholderKey&&M.add(j.placeholderKey),C.push(O.item)}for(const[j,O]of(h==null?void 0:h.placeholders.entries())??[])M.has(j)||ia(O.item)&&!_r(O.item)&&!Wr(O.item)&&!Jr(O.item)&&!bi(O.item)&&C.push(xt(O.item));const z=C.filter(j=>!vc(j));xc(z,H),yc(z,x);const Y=new Set;Gr(N,Y);for(const j of z)Ac(j,Y);for(const j of Y)await kc(t,j,n,a);const D=Tc(z.find(j=>{var O;return((O=j.placeholder)==null?void 0:O.type)==="title"&&ia(j)}))??bc(z)??"Untitled slide";return{slide:{id:$t("slide"),index:0,title:D,background:N,width:r.width,height:r.height,items:z,warnings:[...w]},theme:x}}function je(t,e,r=true){var d,l;if(!t)return[];const n=r&&((d=t["p:grpSpPr"])==null?void 0:d["a:xfrm"])!==void 0?Qa((l=t["p:grpSpPr"])==null?void 0:l["a:xfrm"],e.group,void 0,false):e.group,a=n!==e.group?{...e,group:{...n,fill:ei(t["p:grpSpPr"],e)}}:e,i=[],o=u=>{for(const f of U(t[u]))i.push({type:u,node:f,order:Wt(f,a.orderedNodeOrders)})};o("p:sp"),o("p:pic"),o("p:graphicFrame"),o("p:cxnSp"),o("p:grpSp"),i.sort((u,f)=>u.order-f.order);const s=[];for(const u of i)switch(u.type){case"p:sp":s.push(Wo(u.node,a));break;case"p:pic":s.push(ns(u.node,a));break;case"p:graphicFrame":s.push(...as(u.node,a));break;case"p:cxnSp":s.push(rs(u.node,a));break;case"p:grpSp":s.push(..._o(u.node,a));break}return s}function ln(t){const e=new Map;return t&&za(t,e),e}function dn(t){const e=new Map;return t&&Ua(t,e),e}function un(t){const e=new Map;return t&&Xa(t,e,{nextOrder:0}),e}function za(t,e){for(const r of t)for(const[n,a]of Object.entries(r)){if(n===":@"||n==="#text"||!Array.isArray(a))continue;const i=a;if(n==="p:sp"){const o=pn(i),s=Tt(i,"p:txBody");o&&s&&e.set(o,s)}za(i,e)}}function Ua(t,e){for(const r of t)for(const[n,a]of Object.entries(r)){if(n===":@"||n==="#text"||!Array.isArray(a))continue;const i=a;if(n==="p:sp"){const o=pn(i);o&&e.set(o,i)}Ua(i,e)}}function Xa(t,e,r){for(const n of t)for(const[a,i]of Object.entries(n)){if(a===":@"||a==="#text"||!Array.isArray(i))continue;const o=i,s=qo(a,o);s&&(e.set(s,r.nextOrder),r.nextOrder+=1),Xa(o,e,r)}}function pn(t){const e=Tt(t,"p:nvSpPr"),r=e?hn(e,"p:cNvPr"):void 0,n=fn(r);return(n==null?void 0:n.id)!=null?String(n.id):void 0}function qo(t,e){switch(t){case"p:sp":return pn(e);case"p:pic":return Pe(e,"p:nvPicPr");case"p:graphicFrame":return Pe(e,"p:nvGraphicFramePr");case"p:cxnSp":return Pe(e,"p:nvCxnSpPr");case"p:grpSp":return Pe(e,"p:nvGrpSpPr");default:return}}function Pe(t,e){const r=Tt(t,e),n=r?hn(r,"p:cNvPr"):void 0,a=fn(n);return(a==null?void 0:a.id)!=null?String(a.id):void 0}function Tt(t,e){const r=hn(t,e);if(!r)return;const n=r[e];return Array.isArray(n)?n:void 0}function Ya(t,e){const r=[];for(const n of t){const a=n[e];Array.isArray(a)&&r.push(a)}return r}function hn(t,e){return t.find(r=>Object.prototype.hasOwnProperty.call(r,e))}function fn(t){return X(t==null?void 0:t[":@"])}function _o(t,e){var i;const r=Qt(t,["p:nvGrpSpPr","p:cNvPr"]),n=Ka((i=t["p:grpSpPr"])==null?void 0:i["a:xfrm"],e.group,r||$t("group")),a={...e,group:{...n,fill:ei(t["p:grpSpPr"],e)}};return je(t,a,false)}function Wo(t,e){var $,q,V,Z,st,bt,dt,tt,At,ct;const r=lc(($=t["p:nvSpPr"])==null?void 0:$["p:nvPr"]),n=sc(t),a=n?e.orderedShapeNodes.get(n):void 0,i=a?Tt(a,"p:spPr"):void 0,o=si(t["p:txBody"]),s=Kt((q=t["p:spPr"])==null?void 0:q["a:xfrm"],e.group),d=dr(t["p:spPr"],e.theme,e.colorMap),l=Ht(t["p:spPr"],e.theme,e.colorMap,void 0,ti(e)),u=Re((V=t["p:spPr"])==null?void 0:V["a:ln"],e.theme,e.colorMap),f=xn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),m=ai(l)?ui(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme):void 0,h=d?void 0:vn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),g=Cs(t["p:style"],e.theme,e.colorMap,o),x=((st=(Z=t["p:nvSpPr"])==null?void 0:Z["p:cNvSpPr"])==null?void 0:st.txBox)==="1",S=wn(e.placeholderSources,r),y=S?void 0:Is(e.textStyles,r,x),F=(r==null?void 0:r.type)==="title"||(r==null?void 0:r.type)==="ctrTitle",k=!S||!F&&!dc(S,e.theme),w=ii(t["p:txBody"],e,n?e.orderedTextFrames.get(n):void 0,g,void 0,y,r!=null,k),T=oe((dt=(bt=t["p:nvSpPr"])==null?void 0:bt["p:cNvPr"])==null?void 0:dt["a:hlinkClick"],e),N=(tt=t["p:spPr"])==null?void 0:tt["a:prstGeom"],I=Vo((At=t["p:spPr"])==null?void 0:At["a:custGeom"],i?Tt(i,"a:custGeom"):void 0),C=Jo(N,e)??I,M=(C==null?void 0:C.type)==="custom",H=typeof(N==null?void 0:N.prst)=="string"?N.prst:M?"customGeom":"rect",z=M?"unknown":Ds(H),Y=Zo(X((ct=t["p:spPr"])==null?void 0:ct["a:xfrm"]),X(t["p:txXfrm"]),e.group),D=Wt(t,e.orderedNodeOrders),P=Qt(t,["p:nvSpPr","p:cNvPr"])??H,j={id:$t("shape"),name:P,transform:s.transform,fill:Pr(l,m),line:Ge(u.line,f==null?void 0:f.line,u.hasLine),shadow:h??d,placeholder:r,order:D,groupPath:[...e.group.groupPath],...T},O=x?{...j,kind:"text",textFrame:w.frame??di(e.theme,g,o)}:z==="unknown"&&!M?{...j,kind:"unsupported",unsupportedType:H,label:"Unsupported shape"}:{...j,kind:"shape",shapeType:z,geometry:C,textBounds:Y,textFrame:w.frame};return!x&&z==="unknown"&&!M&&e.warnings.push(`Unsupported shape ${P} (${H}).`),{item:O,placeholderKey:r?Yr(r):void 0,hasTransform:s.hasTransform,hasText:w.hasText,hasFill:l.hasFill||(m==null?void 0:m.hasFill)===true,hasLine:u.hasLine||(f==null?void 0:f.hasLine)===true,textFrameStyleFlags:w.styleFlags}}function Jo(t,e){if(!t||typeof t.prst!="string")return;const r=Ko(t["a:avLst"],e);return{type:"preset",preset:String(t.prst),adjustments:r}}function Vo(t,e){var s;if(!t&&!e)return;const r=e?Tt(e,"a:pathLst"):void 0,n=r?Ya(r,"a:path"):[],a=U((s=t==null?void 0:t["a:pathLst"])==null?void 0:s["a:path"]),i=Math.max(a.length,n.length),o=Array.from({length:i},(d,l)=>Go(a[l],n[l])).filter(d=>!!d);if(o.length)return{type:"custom",paths:o}}function Go(t,e){if(!t&&!e)return;const r=[];if(e)for(const n of e)for(const[a,i]of Object.entries(n)){if(a===":@"||a==="#text"||!Array.isArray(i))continue;const o=i;switch(a){case"a:moveTo":{const s=Oe(o)[0];s&&r.push({type:"M",...s});break}case"a:lnTo":{const s=Oe(o)[0];s&&r.push({type:"L",...s});break}case"a:quadBezTo":{const s=Oe(o);s.length>=2&&r.push({type:"Q",x1:s[0].x,y1:s[0].y,x:s[1].x,y:s[1].y});break}case"a:cubicBezTo":{const s=Oe(o);s.length>=3&&r.push({type:"C",x1:s[0].x,y1:s[0].y,x2:s[1].x,y2:s[1].y,x:s[2].x,y:s[2].y});break}case"a:close":r.push({type:"Z"});break}}else{for(const n of U(t==null?void 0:t["a:moveTo"])){const a=De(n==null?void 0:n["a:pt"]);a&&r.push({type:"M",...a})}for(const n of U(t==null?void 0:t["a:lnTo"])){const a=De(n==null?void 0:n["a:pt"]);a&&r.push({type:"L",...a})}for(const n of U(t==null?void 0:t["a:quadBezTo"])){const a=U(n==null?void 0:n["a:pt"]).map(i=>De(i)).filter(i=>!!i);a.length>=2&&r.push({type:"Q",x1:a[0].x,y1:a[0].y,x:a[1].x,y:a[1].y})}for(const n of U(t==null?void 0:t["a:cubicBezTo"])){const a=U(n==null?void 0:n["a:pt"]).map(i=>De(i)).filter(i=>!!i);a.length>=3&&r.push({type:"C",x1:a[0].x,y1:a[0].y,x2:a[1].x,y2:a[1].y,x:a[2].x,y:a[2].y})}(t==null?void 0:t["a:close"])!=null&&r.push({type:"Z"})}if(r.length)return{width:Math.max(B(t==null?void 0:t.w,0),1),height:Math.max(B(t==null?void 0:t.h,0),1),fill:(t==null?void 0:t.fill)==="none"?"none":"norm",stroke:(t==null?void 0:t.stroke)==="0"||(t==null?void 0:t.stroke)==="false"||(t==null?void 0:t.stroke)==="none"?"none":"norm",commands:r}}function Oe(t){const e=[];for(const r of t){if(!Object.prototype.hasOwnProperty.call(r,"a:pt"))continue;const n=fn(r);n&&e.push({x:B(n.x,0),y:B(n.y,0)})}return e}function De(t){if(t)return{x:B(t.x,0),y:B(t.y,0)}}function Zo(t,e,r){if(!t||!e)return;const n=Kt(t,r).transform,a=Kt(e,r).transform;if(n.width<=0||n.height<=0||a.width<=0||a.height<=0)return;const i=a.x-n.x,o=a.y-n.y,s=n.width-i-a.width,d=n.height-o-a.height;if(![i,o,s,d].every(Number.isFinite))return;const l=n.width*.5,u=n.height*.5;if(!(i<-l||s<-l||o<-u||d<-u))return{left:Number(Math.max(i,0).toFixed(3)),top:Number(Math.max(o,0).toFixed(3)),right:Number(Math.max(s,0).toFixed(3)),bottom:Number(Math.max(d,0).toFixed(3))}}function Ko(t,e){if(!t)return{};const r=new Map;for(const u of U(t["a:gd"])){const f=typeof(u==null?void 0:u.name)=="string"?u.name:void 0,m=typeof(u==null?void 0:u.fmla)=="string"?u.fmla.trim():"";!f||!m||r.set(f,m)}const n={},a=new Map,i=new Set,o=new Set,s=(u,f)=>{const m=`${u}:${f}`;o.has(m)||(o.add(m),e.warnings.push(`Unsupported geometry adjustment formula: ${f}.`))},d=u=>{const f=a.get(u);if(f!=null)return f;const m=r.get(u);if(!m)return;if(i.has(u)){s(u,m);return}i.add(u);const h=es(m,l);if(i.delete(u),h==null){s(u,m);return}return a.set(u,h),n[u]=h,h},l=u=>{if(Qo.test(u)){const m=Number(u);return Number.isFinite(m)?yt(m):void 0}const f=ts[u];return f??d(u)};for(const u of r.keys())d(u);return n}const qa=6e4,Qo=/^-?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?$/,ts={cd2:108e5,cd4:54e5,cd8:27e5,"3cd4":162e5,"3cd8":81e5,"5cd8":135e5,"7cd8":189e5};function es(t,e){const[r,...n]=t.trim().split(/\s+/);if(!r)return;const a=o=>{const s=n[o];return typeof s=="string"?e(s):void 0},i=(...o)=>{const s=o.map(d=>a(d));return s.every(d=>d!=null)?s:void 0};switch(r.toLowerCase()){case"val":return n.length!==1?void 0:a(0);case"+-":{const o=i(0,1,2);return o?yt(o[0]+o[1]-o[2]):void 0}case"*/":{const o=i(0,1,2);return o?_n(o[0]*o[1],o[2]):void 0}case"+/":{const o=i(0,1,2);return o?_n(o[0]+o[1],o[2]):void 0}case"?:":{const o=i(0,1,2);return o?yt(o[0]>0?o[1]:o[2]):void 0}case"abs":{const o=a(0);return o==null?void 0:yt(Math.abs(o))}case"at2":{const o=i(0,1);return o?yt(Math.atan2(o[1],o[0])*180*qa/Math.PI):void 0}case"cat2":{const o=i(0,1,2);return o?Wn(o[0],o[1],o[2],"adjacent"):void 0}case"cos":{const o=i(0,1);return o?yt(o[0]*Math.cos(wr(o[1]))):void 0}case"max":{const o=i(0,1);return o?yt(Math.max(o[0],o[1])):void 0}case"min":{const o=i(0,1);return o?yt(Math.min(o[0],o[1])):void 0}case"mod":{const o=i(0,1,2);return o?yt(Math.hypot(o[0],o[1],o[2])):void 0}case"pin":{const o=i(0,1,2);return o?yt(Math.min(Math.max(o[1],o[0]),o[2])):void 0}case"sat2":{const o=i(0,1,2);return o?Wn(o[0],o[1],o[2],"opposite"):void 0}case"sin":{const o=i(0,1);return o?yt(o[0]*Math.sin(wr(o[1]))):void 0}case"sqrt":{const o=a(0);return o==null?void 0:yt(Math.sqrt(Math.max(0,o)))}case"tan":{const o=i(0,1);return o?yt(o[0]*Math.tan(wr(o[1]))):void 0}default:return}}function _n(t,e){return Math.abs(e)<1e-9?0:yt(t/e)}function Wn(t,e,r,n){const a=Math.hypot(e,r);return a<1e-9?0:yt(t*(n==="adjacent"?e:r)/a)}function wr(t){return t/qa*Math.PI/180}function yt(t){if(!Number.isFinite(t))return 0;const e=Math.round(t);if(Math.abs(t-e)<1e-6)return e;const r=Number(t.toFixed(6));return Object.is(r,-0)?0:r}function rs(t,e){var l,u,f,m;const r=Kt((l=t["p:spPr"])==null?void 0:l["a:xfrm"],e.group),n=Re((u=t["p:spPr"])==null?void 0:u["a:ln"],e.theme,e.colorMap),a=dr(t["p:spPr"],e.theme,e.colorMap),i=xn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),o=a?void 0:vn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),s=oe((m=(f=t["p:nvCxnSpPr"])==null?void 0:f["p:cNvPr"])==null?void 0:m["a:hlinkClick"],e);return{item:{id:$t("connector"),name:Qt(t,["p:nvCxnSpPr","p:cNvPr"])??"connector",kind:"shape",shapeType:"line",transform:r.transform,fill:{type:"none"},line:Ge(n.line,i==null?void 0:i.line,n.hasLine),shadow:o??a,order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],...s},hasTransform:r.hasTransform,hasText:false,hasFill:false,hasLine:n.hasLine||(i==null?void 0:i.hasLine)===true}}function ns(t,e){var y,F,k,w,T,N,I,C,M;const r=Kt((y=t["p:spPr"])==null?void 0:y["a:xfrm"],e.group),n=ri((F=t["p:blipFill"])==null?void 0:F["a:srcRect"]),a=ni(X((k=t["p:blipFill"])==null?void 0:k["a:blip"])),i=dr(t["p:spPr"],e.theme,e.colorMap),o=Ht(t["p:spPr"],e.theme,e.colorMap,void 0,e),s=Re((w=t["p:spPr"])==null?void 0:w["a:ln"],e.theme,e.colorMap),d=xn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),l=ai(o)?ui(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme):void 0,u=i?void 0:vn(t["p:style"],e.theme,e.colorMap,e.themeFormatScheme),f=oe((N=(T=t["p:nvPicPr"])==null?void 0:T["p:cNvPr"])==null?void 0:N["a:hlinkClick"],e),m=Qt(t,["p:nvPicPr","p:cNvPr"])??"image",h=(C=(I=t["p:blipFill"])==null?void 0:I["a:blip"])==null?void 0:C["r:embed"],g=Vr(h,[nt.image],e,`poster image for ${m}`),x=wc((M=t["p:nvPicPr"])==null?void 0:M["p:nvPr"],e,m);if(x!=null&&x.mediaId)return{item:{id:$t("media"),name:m,kind:"media",mediaType:x.mediaType,transform:r.transform,fill:Pr(o,l),line:Ge(s.line,d==null?void 0:d.line,s.hasLine),shadow:u??i,order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],mediaId:x.mediaId,posterMediaId:g,crop:n,opacity:a,...f},hasTransform:r.hasTransform,hasText:false,hasFill:o.hasFill||(l==null?void 0:l.hasFill)===true,hasLine:s.hasLine||(d==null?void 0:d.hasLine)===true};const S={id:$t("image"),name:m,kind:"image",transform:r.transform,fill:Pr(o,l),line:Ge(s.line,d==null?void 0:d.line,s.hasLine),shadow:u??i,order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],mediaId:g??"",crop:n,opacity:a,...f};return g||e.warnings.push(`Image ${m} has no media reference.`),{item:S,hasTransform:r.hasTransform,hasText:false,hasFill:o.hasFill||(l==null?void 0:l.hasFill)===true,hasLine:s.hasLine||(d==null?void 0:d.hasLine)===true}}function as(t,e){var i,o,s,d,l;if((o=(i=t["a:graphic"])==null?void 0:i["a:graphicData"])!=null&&o["a:tbl"])return[ls(t,e)];const r=(s=t["a:graphic"])==null?void 0:s["a:graphicData"];if((r==null?void 0:r.uri)==="http://schemas.openxmlformats.org/drawingml/2006/chart"){const u=is(t,r,e);if(u)return[u]}if((r==null?void 0:r.uri)==="http://schemas.openxmlformats.org/drawingml/2006/diagram"){const u=ds(t,r,e);if(u.length)return u}const n=oe((l=(d=t["p:nvGraphicFramePr"])==null?void 0:d["p:cNvPr"])==null?void 0:l["a:hlinkClick"],e),a={id:$t("unsupported"),name:Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??"graphic-frame",kind:"unsupported",unsupportedType:"graphicFrame",label:"Unsupported graphic frame",transform:Kt(t["p:xfrm"],e.group).transform,fill:{type:"none"},order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],...n};return e.warnings.push(`Unsupported graphic frame ${a.name??a.id}.`),[{item:a,hasTransform:true,hasText:false,hasFill:false,hasLine:false}]}function is(t,e,r){var w,T,N,I,C,M,H,z,Y,D,P,j,O,$;const n=(w=e["c:chart"])==null?void 0:w["r:id"],a=typeof n=="string"?r.relationships[n]:void 0;if(!a||a.type!==nt.chart)return;const i=r.chartSpaces[a.target],o=i==null?void 0:i["c:chart"],s=o==null?void 0:o["c:plotArea"],d=U(s==null?void 0:s["c:barChart"])[0],l=U(s==null?void 0:s["c:pieChart"])[0],u=d??l;if(!o||!s||!u||d&&String(((T=d["c:barDir"])==null?void 0:T.val)??"col")!=="col")return;const f=d?"column":"pie",m=U(u["c:ser"]).slice(0,f==="pie"?1:void 0),h=_a((N=m[0])==null?void 0:N["c:cat"]),g=m.map((q,V)=>{var At;const Z=Ht(q["c:spPr"],r.theme,r.colorMap).fill,st=os(q["c:val"]),bt=Or(Z)??Nr(`accent${V%6+1}`,r.theme.colors,r.colorMap),dt=Dr(Z),tt=f==="pie"?st.map((ct,et)=>{var ut;return{color:["0","false"].includes(String(((ut=u["c:varyColors"])==null?void 0:ut.val)??"1"))?bt:Nr(`accent${et%6+1}`,r.theme.colors,r.colorMap),alpha:dt}}):void 0;for(const ct of U(q["c:dPt"])){const et=be((At=ct["c:idx"])==null?void 0:At.val);if(!tt||et==null||!Number.isInteger(et)||!tt[et])continue;const ut=Ht(ct["c:spPr"],r.theme,r.colorMap);ut.hasFill&&(tt[et]={color:Or(ut.fill)??tt[et].color,alpha:ut.fill.type==="none"?0:Dr(ut.fill)})}return{name:Jn(q["c:tx"])??`Series ${V+1}`,values:st,color:bt,alpha:dt,pointStyles:tt}});if(!g.length||!g.some(q=>q.values.some(V=>V!=null)))return;const x=U(s["c:valAx"])[0],S=x?{min:be((C=(I=x["c:scaling"])==null?void 0:I["c:min"])==null?void 0:C.val),max:be((H=(M=x["c:scaling"])==null?void 0:M["c:max"])==null?void 0:H.val),majorUnit:be((z=x["c:majorUnit"])==null?void 0:z.val),formatCode:typeof((Y=x["c:numFmt"])==null?void 0:Y.formatCode)=="string"?String(x["c:numFmt"].formatCode):void 0}:void 0,y=Kt(t["p:xfrm"],r.group),F=oe((P=(D=t["p:nvGraphicFramePr"])==null?void 0:D["p:cNvPr"])==null?void 0:P["a:hlinkClick"],r),k={id:$t("chart"),name:Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??"chart",kind:"chart",chartType:f,grouping:ss((j=u["c:grouping"])==null?void 0:j.val),firstSliceAngle:f==="pie"?be((O=u["c:firstSliceAng"])==null?void 0:O.val)??0:void 0,title:Jn(($=o["c:title"])==null?void 0:$["c:tx"]),categories:h,series:g,legendPosition:cs(o["c:legend"]),valueAxis:S,transform:y.transform,fill:{type:"none"},order:Wt(t,r.orderedNodeOrders),groupPath:[...r.group.groupPath],...F};return{item:k,hasTransform:y.hasTransform,hasText:!!k.title,hasFill:false,hasLine:false}}function Jn(t){var n,a;if(!t)return;const e=U((n=t["c:rich"])==null?void 0:n["a:p"]).flatMap(i=>[...U(i["a:r"]).map(o=>String((o==null?void 0:o["a:t"])??"")),...U(i["a:fld"]).map(o=>String((o==null?void 0:o["a:t"])??""))]).join("").trim();return e||((a=_a(t).find(i=>i.trim()))==null?void 0:a.trim())}function _a(t){const e=Wa(t);return Ja(e).map(r=>r??"")}function os(t){const e=Wa(t);return Ja(e).map(r=>{if(r==null||r.trim()==="")return null;const n=Number(r);return Number.isFinite(n)?n:null})}function Wa(t){var e,r;if(t)return((e=t["c:strRef"])==null?void 0:e["c:strCache"])??((r=t["c:numRef"])==null?void 0:r["c:numCache"])??t["c:strLit"]??t["c:numLit"]}function Ja(t){var a;if(!t)return[];const e=U(t["c:pt"]),r=Math.max(0,B((a=t["c:ptCount"])==null?void 0:a.val,0),...e.map(i=>B(i==null?void 0:i.idx,-1)+1)),n=Array(r).fill(null);for(const i of e){const o=B(i==null?void 0:i.idx,-1);o>=0&&o<n.length&&(n[o]=(i==null?void 0:i["c:v"])==null?null:String(i["c:v"]))}return n}function be(t){const e=Number(t);return Number.isFinite(e)?e:void 0}function ss(t){switch(String(t??"clustered")){case"stacked":return"stacked";case"percentStacked":return"percentStacked";default:return"clustered"}}function cs(t){var e,r;if(!t||((e=t["c:delete"])==null?void 0:e.val)==="1")return"none";switch(String(((r=t["c:legendPos"])==null?void 0:r.val)??"right")){case"t":return"top";case"b":return"bottom";case"l":return"left";case"r":case"tr":default:return"right"}}function ls(t,e){var m,h,g,x,S;const r=(h=(m=t["a:graphic"])==null?void 0:m["a:graphicData"])==null?void 0:h["a:tbl"],n=X(r==null?void 0:r["a:tblPr"]),a=Kt(t["p:xfrm"],e.group),i=oe((x=(g=t["p:nvGraphicFramePr"])==null?void 0:g["p:cNvPr"])==null?void 0:x["a:hlinkClick"],e),o=U((S=r["a:tblGrid"])==null?void 0:S["a:gridCol"]).map(y=>J(B(y.w,0))),s=U(r["a:tr"]),d=s.map(y=>J(B(y.h,0))),l=zs(n,e.tableStyles),u=[];return s.forEach((y,F)=>{var w,T,N;let k=0;for(const I of U(y["a:tc"])){const C=X(I["a:tcPr"]),M=Math.max(1,B(I.rowSpan??(C==null?void 0:C.rowSpan),1)),H=Math.max(1,B(I.gridSpan??(C==null?void 0:C.gridSpan),1)),z=I.hMerge==="1"||I.vMerge==="1"||(C==null?void 0:C.hMerge)==="1"||(C==null?void 0:C.vMerge)==="1",Y=si(I["a:txBody"]),D=Us(l,n,F,k,M,H,s.length,o.length,e,Y),P=Ns(e.textStyles.other,(w=D.textStyle)==null?void 0:w.paragraphAlign),j=_t(ci(P,0).run,((T=D.textStyle)==null?void 0:T.run)??{}),O=Ht(C,e.theme,e.colorMap,void 0,e),$=Zs(C,e.theme,e.colorMap),q=ii(I["a:txBody"],e,void 0,((N=D.textStyle)==null?void 0:N.run)??{},void 0,P),V=q.styleFlags.verticalAlign||(C==null?void 0:C.anchor)!=null,Z=Gs(Js(Vs(q.frame??di(e.theme,j,Y),C),j),V);u.push({row:F,column:k,rowSpan:M,colSpan:H,isMergedContinuation:z,fill:O.hasFill?O.fill:D.fill??{type:"none"},borders:Ws(_s(D.borders,F,k,s.length,o.length),$),textFrame:Z}),k+=H>1||z?1:H}}),{item:{id:$t("table"),name:Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??"table",kind:"table",transform:a.transform,fill:{type:"none"},order:Wt(t,e.orderedNodeOrders),groupPath:[...e.group.groupPath],...i,columns:o,rows:d,cells:u},hasTransform:a.hasTransform,hasText:u.some(y=>Zt(y.textFrame)),hasFill:false,hasLine:false}}function ds(t,e,r){const n=e["dgm:relIds"],a=typeof(n==null?void 0:n["r:dm"])=="string"?String(n["r:dm"]):void 0;if(!a)return[];const i=r.relationships[a];if(!i||i.type!==nt.diagramData)return[];const o=r.diagramDataModels[i.target],s=Va(o);if(!s)return[];const d=r.relationships[s];if(!d||d.type!==nt.diagramDrawing)return[];const l=r.diagramDrawings[d.target],u=l==null?void 0:l["dsp:spTree"];if(!u)return[];const f=hs(u),m=Wt(t,r.orderedNodeOrders),h=Qt(t,["p:nvGraphicFramePr","p:cNvPr"])??$t("diagram"),g={...r,inDiagram:true,group:Ka(t["p:xfrm"],r.group,h)};return je(f,g).map((x,S)=>({...x,item:{...x.item,order:m+S/1e3}}))}async function us(t,e){const r={},n={},a=Object.values(e).filter(i=>i.type===nt.diagramData);for(const i of a){if(!(i.target in r)){const l=await It(t,i.target);r[i.target]=(l==null?void 0:l["dgm:dataModel"])??null}const o=Va(r[i.target]);if(!o)continue;const s=e[o];if(!s||s.type!==nt.diagramDrawing||s.target in n)continue;const d=await It(t,s.target);n[s.target]=(d==null?void 0:d["dsp:drawing"])??null}return{dataModels:r,drawings:n}}async function ps(t,e){const r={},n=Object.values(e).filter(a=>a.type===nt.chart);for(const a of n){const i=await It(t,a.target);r[a.target]=(i==null?void 0:i["c:chartSpace"])??null}return r}function Va(t){const e=Ga(t,"dsp:dataModelExt");return typeof(e==null?void 0:e.relId)=="string"?String(e.relId):void 0}function Ga(t,e){if(!t||typeof t!="object")return;if(!Array.isArray(t)&&e in t)return X(t[e]);const r=Array.isArray(t)?t:Object.values(t);for(const n of r){const a=Ga(n,e);if(a)return a}}function hs(t){return Br(t,"dsp:","p:")}function te(t,e){return{a:t.a*e.a+t.c*e.b,b:t.b*e.a+t.d*e.b,c:t.a*e.c+t.c*e.d,d:t.b*e.c+t.d*e.d,e:t.a*e.e+t.c*e.f+t.e,f:t.b*e.e+t.d*e.f+t.f}}function He(t,e){return{a:1,b:0,c:0,d:1,e:t,f:e}}function fs(t,e){return{a:t,b:0,c:0,d:e,e:0,f:0}}function ms(t,e){return{a:t?-1:1,b:0,c:0,d:e?-1:1,e:0,f:0}}function gs(t){const e=t*Math.PI/180,r=Math.cos(e),n=Math.sin(e);return{a:r,b:n,c:-n,d:r,e:0,f:0}}function Za(t,e,r){return{x:t.a*e+t.c*r+t.e,y:t.b*e+t.d*r+t.f}}function Br(t,e,r){if(Array.isArray(t))return t.map(i=>Br(i,e,r));if(!t||typeof t!="object")return t;const n=t,a={};for(const[i,o]of Object.entries(n)){const s=i.startsWith(e)?`${r}${i.slice(e.length)}`:i;a[s]=Br(o,e,r)}return a}function Kt(t,e){if(!t)return{transform:{x:e.offsetX,y:e.offsetY,width:0,height:0,rotation:e.rotation,flipH:false,flipV:false},hasTransform:false};const r=t["a:off"]??t.off,n=t["a:ext"]??t.ext,a=J(B(r==null?void 0:r.x,0)),i=J(B(r==null?void 0:r.y,0)),o=J(B(n==null?void 0:n.cx,0)),s=J(B(n==null?void 0:n.cy,0)),d=o*e.scaleX,l=s*e.scaleY,u=Za(e.matrix,a+o/2,i+s/2);return{transform:{x:u.x-d/2,y:u.y-l/2,width:d,height:l,rotation:sr(B(t.rot,0))+e.rotation,flipH:t.flipH==="1"!==e.flipH,flipV:t.flipV==="1"!==e.flipV},hasTransform:true}}function Ka(t,e,r){return Qa(t,e,r,true)}function Qa(t,e,r,n=true){if(!t)return{...e,groupPath:n&&r?[...e.groupPath,r]:[...e.groupPath]};const a=t["a:off"],i=t["a:ext"],o=t["a:chOff"],s=t["a:chExt"],d=J(B(a==null?void 0:a.x,0)),l=J(B(a==null?void 0:a.y,0)),u=i?J(B(i.cx,0)):void 0,f=i?J(B(i.cy,0)):void 0,m=o?J(B(o.x,0)):0,h=o?J(B(o.y,0)):0,g=s?J(B(s.cx,0)):u,x=s?J(B(s.cy,0)):f,S=u===void 0||g===void 0||g===0?1:u/g,y=f===void 0||x===void 0||x===0?1:f/x,F=sr(B(t.rot,0)),k=t.flipH==="1",w=t.flipV==="1",T=d+(u??0)/2,N=l+(f??0)/2,I=te(te(te(te(te(He(T,N),gs(F)),ms(k,w)),He(-T,-N)),He(d,l)),te(fs(S,y),He(-m,-h))),C=te(e.matrix,I),M=Za(C,0,0);return{offsetX:M.x,offsetY:M.y,scaleX:e.scaleX*S,scaleY:e.scaleY*y,rotation:e.rotation+F,flipH:e.flipH!==k,flipV:e.flipV!==w,matrix:C,fill:e.fill,groupPath:n&&r?[...e.groupPath,r]:[...e.groupPath]}}function ti(t){return{relationships:t.relationships,warnings:t.warnings,slidePath:t.slidePath,groupFill:t.group.fill?xt(t.group.fill):void 0}}function ei(t,e){const r=Ht(t,e.theme,e.colorMap,void 0,ti(e));return r.hasFill?xt(r.fill):e.group.fill?xt(e.group.fill):void 0}function Ht(t,e,r,n,a){if(!t)return{fill:{type:"none"},hasFill:false};if(t["a:grpFill"]!==void 0)return{fill:a!=null&&a.groupFill?xt(a.groupFill):{type:"none"},hasFill:true};if(t["a:noFill"]!==void 0)return{fill:{type:"none"},hasFill:true};const i=t["a:solidFill"];if(i){const l=St(i,e,r,n);return{fill:{type:"solid",color:l.color,alpha:l.alpha},hasFill:true}}const o=t["a:blipFill"];if(o){const l=xs(o,a);if(l)return{fill:l,hasFill:true}}const s=t["a:pattFill"];if(s){const l=vs(s,e,r,n);if(l)return{fill:l,hasFill:true}}const d=t["a:gradFill"];if(d){const l=bs(d,e,r,n);if(l)return{fill:l,hasFill:true}}return{fill:{type:"none"},hasFill:false}}function Re(t,e,r,n){var i,o,s;if(!t)return{line:void 0,hasLine:false};if(t["a:noFill"]!==void 0)return{line:void 0,hasLine:true};const a=Ht(t,e,r,n);return{line:{color:Or(a.fill),alpha:Dr(a.fill),width:J(B(t.w,0)),dash:(i=t["a:prstDash"])!=null&&i.val?String(t["a:prstDash"].val):void 0,compound:tc(t.cmpd),lineCap:Qs(t.cap),lineJoin:ec(t),miterLimit:rc(t),headEnd:ea((o=t["a:headEnd"])==null?void 0:o.type),tailEnd:ea((s=t["a:tailEnd"])==null?void 0:s.type)},hasLine:true}}function Ge(t,e,r){if(r){if(!t)return;if(!e)return t;const n={...e};for(const[a,i]of Object.entries(t))i!==void 0&&(n[String(a)]=i);return n}return e}function dr(t,e,r,n){var u;const a=((u=t==null?void 0:t["a:effectLst"])==null?void 0:u["a:outerShdw"])??(t==null?void 0:t["a:outerShdw"]);if(!a)return;const i=St(a,e,r,n),o=sr(B(a.dir,0)),s=J(B(a.dist,0)),d=J(B(a.blurRad,0)),l=ys(s,o);return{color:i.color,alpha:i.alpha,blur:d,distance:s,angle:o,offsetX:l.x,offsetY:l.y}}function ys(t,e){const r=e*Math.PI/180;return{x:Number((Math.cos(r)*t).toFixed(3)),y:Number((Math.sin(r)*t).toFixed(3))}}function ri(t){if(!t)return;const e={left:gt(B(t.l,0)/1e5,0,1),right:gt(B(t.r,0)/1e5,0,1),top:gt(B(t.t,0)/1e5,0,1),bottom:gt(B(t.b,0)/1e5,0,1)};return e.left||e.right||e.top||e.bottom?e:void 0}function ni(t){if(!t)return;let e=1,r=false;const n=X(t["a:alpha"])??X(t.alpha);(n==null?void 0:n.amt)!=null&&(e=gt(B(n.amt,1e5)/1e5,0,1),r=true);const a=X(t["a:alphaMod"])??X(t.alphaMod);(a==null?void 0:a.amt)!=null&&(e*=gt(B(a.amt,1e5)/1e5,0,1),r=true);const i=X(t["a:alphaModFix"])??X(t.alphaModFix);(i==null?void 0:i.amt)!=null&&(e*=gt(B(i.amt,1e5)/1e5,0,1),r=true);const o=X(t["a:alphaOff"])??X(t.alphaOff);return(o==null?void 0:o.amt)!=null&&(e+=B(o.amt,0)/1e5,r=true),r?gt(e,0,1):void 0}function xs(t,e){if(!t||!e)return;const r=t["a:blip"],n=r==null?void 0:r["r:embed"],a=r==null?void 0:r["r:link"],i=n??a;if(!i){e.warnings.push(`Picture fill in ${e.slidePath} has no image relationship.`);return}const o=e.relationships[i];if(!o){e.warnings.push(`Missing image relationship ${i} in ${e.slidePath}.`);return}if(o.type!==nt.image||o.targetMode==="External"){e.warnings.push(`Unsupported picture fill relationship ${i} in ${e.slidePath}.`);return}return{type:"picture",mediaId:o.target,crop:ri(t["a:srcRect"]),tile:t["a:tile"]!==void 0,alpha:ni(r)}}function vs(t,e,r,n){if(!t)return;const a=t["a:fgClr"]?St(t["a:fgClr"],e,r,n):void 0,i=t["a:bgClr"]?St(t["a:bgClr"],e,r,n):void 0;return{type:"pattern",pattern:typeof t.prst=="string"?t.prst:"pct5",foregroundColor:(a==null?void 0:a.color)??e.colors.dk1,foregroundAlpha:a==null?void 0:a.alpha,backgroundColor:(i==null?void 0:i.color)??e.colors.lt1,backgroundAlpha:i==null?void 0:i.alpha}}function ai(t){return!t.hasFill||t.fill.type==="pattern"}function Pr(t,e){return t.fill.type==="pattern"&&(e!=null&&e.hasFill)?e.fill:(e==null?void 0:e.fill)??t.fill}function St(t,e,r,n){var u,f,m,h,g;const a=t["a:srgbClr"],i=t["a:schemeClr"],o=t["a:sysClr"];let s="#000000",d,l;if(a!=null&&a.val?(s=`#${String(a.val)}`.toUpperCase(),l=a):i!=null&&i.val?(String(i.val)==="phClr"&&n?(s=n.color,d=n.alpha):s=Nr(String(i.val),e.colors,r),l=i):o!=null&&o.lastClr&&(s=`#${String(o.lastClr)}`.toUpperCase(),l=o),(u=l==null?void 0:l["a:shade"])!=null&&u.val&&(s=Rr(s,B(l["a:shade"].val,1e5)/1e5)),(f=l==null?void 0:l["a:lumMod"])!=null&&f.val&&(s=Lo(s,B(l["a:lumMod"].val,1e5)/1e5)),(m=l==null?void 0:l["a:lumOff"])!=null&&m.val&&(s=Mo(s,B(l["a:lumOff"].val,0)/1e5)),(h=l==null?void 0:l["a:tint"])!=null&&h.val){const x=gt(B(l["a:tint"].val,0)/1e5,0,1);s=qe(s,1-x)}return{color:s,alpha:(g=l==null?void 0:l["a:alpha"])!=null&&g.val?B(l["a:alpha"].val,1e5)/1e5:d}}function bs(t,e,r,n){var s;const a=U((s=t["a:gsLst"])==null?void 0:s["a:gs"]).map(d=>{const l=St(d,e,r,n);return{position:gt(B(d==null?void 0:d.pos,0)/1e5,0,1),color:l.color,alpha:l.alpha}}).sort((d,l)=>d.position-l.position);if(!a.length)return;if(a.length===1)return{type:"solid",color:a[0].color,alpha:a[0].alpha};const i=t["a:lin"],o=t["a:path"];return{type:"gradient",angle:sr(B(i==null?void 0:i.ang,0)),gradientType:o?"path":"linear",gradientPath:o!=null&&o.path?String(o.path):void 0,gradientFillToRect:Vn(o==null?void 0:o["a:fillToRect"]),gradientTileRect:Vn(t["a:tileRect"]),stops:a}}function Vn(t){if(t!=null)return{left:ze(t.l),top:ze(t.t),right:ze(t.r),bottom:ze(t.b)}}function ze(t){return Number((B(t,0)/1e5).toFixed(5))}function Or(t){var e,r;if(t.type==="solid")return t.color;if(t.type==="gradient")return(r=(e=t.stops)==null?void 0:e[0])==null?void 0:r.color;if(t.type==="pattern")return t.foregroundColor??t.backgroundColor}function Dr(t){var e,r;if(t.type==="solid")return t.alpha;if(t.type==="gradient")return(r=(e=t.stops)==null?void 0:e[0])==null?void 0:r.alpha;if(t.type==="pattern")return t.foregroundAlpha??t.backgroundAlpha}function ii(t,e,r,n={},a,i,o=false,s=true){const d=fc();if(!t)return{frame:void 0,hasText:false,styleFlags:d};const l=X(t["a:bodyPr"]);d.verticalAlign=(l==null?void 0:l.anchor)!=null,d.direction=(l==null?void 0:l.vert)!=null,d.wrap=(l==null?void 0:l.wrap)!=null,d.anchorCenter=(l==null?void 0:l.anchorCtr)!=null,d.padding.left=(l==null?void 0:l.lIns)!=null,d.padding.right=(l==null?void 0:l.rIns)!=null,d.padding.top=(l==null?void 0:l.tIns)!=null,d.padding.bottom=(l==null?void 0:l.bIns)!=null;const u=ke(t["a:lstStyle"],e,i),f=o?u:Rs(u),m=r?Ya(r,"a:p"):[],h=U(t["a:p"]).map((y,F)=>Ss(y,e,f,m[F],n,a,s)),g=ws(l);gc(l,e);const x={paragraphs:h.length?h:[{runs:[]}],verticalAlign:fi(l==null?void 0:l.anchor),direction:Hs(l==null?void 0:l.vert),wrap:mc(l==null?void 0:l.wrap),anchorCenter:Nt(l==null?void 0:l.anchorCtr),horizontalOverflow:aa(l==null?void 0:l.horzOverflow),verticalOverflow:aa(l==null?void 0:l.vertOverflow),columns:Math.max(1,B(l==null?void 0:l.numCol,1)),columnSpacing:(l==null?void 0:l.spcCol)!=null?J(B(l.spcCol,0)):void 0,rtlColumns:Nt(l==null?void 0:l.rtlCol),fromWordArt:Nt(l==null?void 0:l.fromWordArt),padding:{left:J(B(l==null?void 0:l.lIns,91440)),right:J(B(l==null?void 0:l.rIns,91440)),top:J(B(l==null?void 0:l.tIns,45720)),bottom:J(B(l==null?void 0:l.bIns,45720))},autofit:g},S=Fs(x);return{frame:S,hasText:Zt(S),styleFlags:d}}function ws(t){if(!t)return;const e=X(t["a:normAutofit"]);if(e)return{type:"normal",fontScale:Gn(e.fontScale),lineSpaceReduction:Gn(e.lnSpcReduction)};if(t["a:spAutoFit"]!==void 0)return{type:"shape"};if(t["a:noAutofit"]!==void 0)return{type:"none"}}function Gn(t){if(t==null)return;const e=B(t,NaN);if(!(!Number.isFinite(e)||e<=0))return gt(e/1e5,.01,1)}function Fs(t){const e=t.autofit;if(!e||e.type!=="normal")return t;const r=e.fontScale??1,n=e.lineSpaceReduction??0;return Math.abs(r-1)<1e-4&&n<=1e-4?t:{...t,paragraphs:t.paragraphs.map(a=>{var o;const i={...a,runs:a.runs.map(s=>({...s,fontSize:s.fontSize!=null?Number((s.fontSize*r).toFixed(3)):s.fontSize}))};return a.lineHeight!=null?a.lineHeightUnit==="px"?i.lineHeight=Number((a.lineHeight*r).toFixed(3)):i.lineHeight=Number((a.lineHeight*Math.max(.2,1-n)).toFixed(4)):n>1e-4&&(i.lineHeight=Number((1*Math.max(.2,1-n)).toFixed(4)),i.lineHeightUnit="multiple"),a.spaceBefore!=null&&(i.spaceBefore=Number((a.spaceBefore*r).toFixed(3))),a.spaceAfter!=null&&(i.spaceAfter=Number((a.spaceAfter*r).toFixed(3))),a.marginLeft!=null&&(i.marginLeft=Number((a.marginLeft*r).toFixed(3))),a.indent!=null&&(i.indent=Number((a.indent*r).toFixed(3))),(o=a.tabStops)!=null&&o.length&&(i.tabStops=a.tabStops.map(s=>Number((s*r).toFixed(3)))),i})}}function Ss(t,e,r,n,a={},i,o=true){const s=t["a:pPr"],d=(s==null?void 0:s.lvl)!=null?B(s.lvl,0):0,l=ci(r,d),u=Xr(s,e),f=_t(_t(l.run,a),u.run),m=(s==null?void 0:s["a:buNone"])!==void 0,h=n?As(t,n,e,f,o):ks(t,e,f,o);if(!h.length){const g=ur(t["a:endParaRPr"],e,void 0,o&&!f.fontFamily),x=_t(f,g);h.push({text:(t["a:endParaRPr"],""),...x,fontFamily:x.fontFamily??(o?e.theme.fonts.minor:void 0)})}return{align:u.align??l.align??i,level:(s==null?void 0:s.lvl)!=null?d:void 0,bullet:m?void 0:gn(l.bullet,u.bullet)??void 0,bulletDisabled:m||void 0,marginLeft:u.marginLeft??l.marginLeft,indent:u.indent??l.indent,spaceBefore:u.spaceBefore??l.spaceBefore,spaceAfter:u.spaceAfter??l.spaceAfter,lineHeight:u.lineHeight??l.lineHeight,lineHeightUnit:u.lineHeightUnit??l.lineHeightUnit,tabStops:u.tabStops??l.tabStops,runs:h}}function As(t,e,r,n,a){const i=[],o=U(t["a:r"]),s=U(t["a:fld"]),d=U(t["a:sym"]),l=U(t["a:br"]),u=U(t["a:tab"]),f=U(t["a:softHyphen"]),m=U(t["a:noBreakHyphen"]);let h=0,g=0,x=0,S=0,y=0,F=0,k=0;for(const w of e){if(Object.prototype.hasOwnProperty.call(w,"a:r")){const T=o[h];h+=1,T&&i.push(me(T,r,n,a));continue}if(Object.prototype.hasOwnProperty.call(w,"a:fld")){const T=s[g];g+=1,T&&i.push(me(T,r,n,a));continue}if(Object.prototype.hasOwnProperty.call(w,"a:sym")){const T=d[x];x+=1,T&&i.push(Hr(T,r,n));continue}if(Object.prototype.hasOwnProperty.call(w,"a:br")){i.push(Ct(l[S],r,n,`
3
+ `,a)),S+=1;continue}if(Object.prototype.hasOwnProperty.call(w,"a:tab")){i.push(Ct(u[y],r,n," ",a)),y+=1;continue}if(Object.prototype.hasOwnProperty.call(w,"a:softHyphen")){i.push(Ct(f[F],r,n,$r,a)),F+=1;continue}Object.prototype.hasOwnProperty.call(w,"a:noBreakHyphen")&&(i.push(Ct(m[k],r,n,Ir,a)),k+=1)}for(;h<o.length;h+=1)i.push(me(o[h],r,n,a));for(;g<s.length;g+=1)i.push(me(s[g],r,n,a));for(;x<d.length;x+=1)i.push(Hr(d[x],r,n));for(;S<l.length;S+=1)i.push(Ct(l[S],r,n,`
4
+ `,a));for(;y<u.length;y+=1)i.push(Ct(u[y],r,n," ",a));for(;F<f.length;F+=1)i.push(Ct(f[F],r,n,$r,a));for(;k<m.length;k+=1)i.push(Ct(m[k],r,n,Ir,a));return i}function ks(t,e,r,n){const a=[];for(const i of U(t["a:r"]))a.push(me(i,e,r,n));for(const i of U(t["a:fld"]))a.push(me(i,e,r,n));for(const i of U(t["a:sym"]))a.push(Hr(i,e,r));for(const i of U(t["a:br"]))a.push(Ct(i,e,r,`
5
+ `,n));for(const i of U(t["a:tab"]))a.push(Ct(i,e,r," ",n));for(const i of U(t["a:softHyphen"]))a.push(Ct(i,e,r,$r,n));for(const i of U(t["a:noBreakHyphen"]))a.push(Ct(i,e,r,Ir,n));return a}function Hr(t,e,r){const n=typeof(t==null?void 0:t.font)=="string"?mn(t.font,e.theme,typeof(t==null?void 0:t.lang)=="string"?t.lang:void 0):r.fontFamily;return{text:typeof(t==null?void 0:t.char)=="string"?mi(t.char):"",...r,fontFamily:n??e.theme.fonts.minor}}function Ct(t,e,r,n,a=true){const i=bn(n),o=_t(r,ur(X(t==null?void 0:t["a:rPr"]),e,i,a&&!r.fontFamily));return{text:n,...o,fontFamily:o.fontFamily??(a?zt("minor",e.theme,i):void 0)}}function me(t,e,r={},n=true){const a=Ts(t,e)??(typeof t["a:t"]=="string"?t["a:t"]:""),i=X(t["a:rPr"])??t,o=bn(a),s=Ls(_t(r,ur(i,e,o,n&&!r.fontFamily)),X(i["a:hlinkClick"]),e),d=oe(i["a:hlinkClick"],e);return{text:a,...s,fontFamily:s.fontFamily??(n?zt("minor",e.theme,o):void 0),...d}}function Ts(t,e){const r=typeof t["a:t"]=="string"?t["a:t"]:void 0,n=typeof t.type=="string"?t.type.trim().toLowerCase():"",a=e.slideIndexByPath[e.slidePath];return a==null?r:(n.includes("slidenum")||n.includes("slidenumber"))&&vi((r??"").trim())?String(a+1):r}function Ls(t,e,r){return e?{...t,color:t.color??r.theme.colors.hlink??at.colors.hlink,underline:t.underline??true}:t}function ur(t,e,r,n=true){if(!t)return{};const a={},i=typeof t.lang=="string"?t.lang:r,o=t["a:solidFill"]?St(t["a:solidFill"],e.theme,e.colorMap):void 0,s=t["a:highlight"]?St(t["a:highlight"],e.theme,e.colorMap):void 0,d=Ms(t,i);return t.b!=null&&(a.bold=t.b==="1"),t.i!=null&&(a.italic=t.i==="1"),t.u!=null&&(a.underline=String(t.u)!=="none"),t.strike!=null&&(a.strike=String(t.strike)!=="noStrike"),o&&(a.color=o.color,a.colorAlpha=o.alpha),s&&(a.highlightColor=s.color,a.highlightAlpha=s.alpha),t.sz!=null&&(a.fontSize=pr(B(t.sz,1800)/100)),d!=null&&d.typeface?a.fontFamily=mn(String(d.typeface),e.theme,i):n&&i&&(a.fontFamily=zt("minor",e.theme,i)),t.baseline!=null&&(a.baselineShift=B(t.baseline,0)/1e5),a}function Ms(t,e){const r=X(t["a:latin"])??X(t.latin),n=X(t["a:ea"])??X(t.ea),a=X(t["a:cs"])??X(t.cs);if(e){const i=e.trim().toLowerCase();if(i.startsWith("zh")||i.startsWith("ja")||i.startsWith("ko"))return n??r??a;if(i.startsWith("ar")||i.startsWith("he")||i.startsWith("fa")||i.startsWith("ur"))return a??r??n}return r??n??a}function Cs(t,e,r,n){const a=t==null?void 0:t["a:fontRef"];if(!a)return;const i={},o=typeof a.idx=="string"?a.idx.trim().toLowerCase():"";return o==="major"?i.fontFamily=zt("major",e,n):o==="minor"&&(i.fontFamily=zt("minor",e,n)),(a["a:srgbClr"]||a["a:schemeClr"]||a["a:sysClr"])&&(i.color=St(a,e,r).color),Object.keys(i).length?i:void 0}function mn(t,e,r){const n=t.trim();return n?/^\+mj(?:-|$)/i.test(n)?Zn("major",n,e,r)??e.fonts.major??at.fonts.major??n:/^\+mn(?:-|$)/i.test(n)?Zn("minor",n,e,r)??e.fonts.minor??at.fonts.minor??n:n:e.fonts.minor??at.fonts.minor??t}function zt(t,e,r){const n=t==="major"?e.fonts.majorScripts:e.fonts.minorScripts,a=t==="major"?e.fonts.major??at.fonts.major:e.fonts.minor??at.fonts.minor,i=oi(r,"lt");return(i?n==null?void 0:n[i]:void 0)??a??at.fonts.minor??"Calibri"}function Zn(t,e,r,n){const i=e.trim().toLowerCase().replace(/^\+m[jn]-/,""),o=t==="major"?r.fonts.majorScripts:r.fonts.minorScripts,s=t==="major"?r.fonts.major:r.fonts.minor;if(i==="lt")return s??void 0;const d=oi(n,i);return(d?o==null?void 0:o[d]:void 0)??s??void 0}function oi(t,e){const r=(t??"").trim().toLowerCase();return r?r.startsWith("zh")?"Hans":r.startsWith("ja")?"Jpan":r.startsWith("ko")?"Hang":r.startsWith("ar")?"Arab":r.startsWith("he")?"Hebr":r.startsWith("th")?"Thai":Kn(e):Kn(e)}function si(t){if(!t)return;const e=zr(t);if(e)return e;const r=Ur(t);if(/[\u4E00-\u9FFF]/.test(r))return"zh-CN";if(/[\u3040-\u30FF]/.test(r))return"ja-JP";if(/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7AF]/.test(r))return"ko-KR"}function zr(t){if(!t||typeof t!="object")return;if(Array.isArray(t)){for(const r of t){const n=zr(r);if(n)return n}return}const e=t;if(typeof e.lang=="string"&&e.lang.trim().length)return e.lang;for(const r of Object.values(e)){const n=zr(r);if(n)return n}}function Ur(t){if(typeof t=="string")return t;if(!t||typeof t!="object")return"";if(Array.isArray(t))return t.map(n=>Ur(n)).join("");const e=t;let r="";for(const[n,a]of Object.entries(e)){if(n==="a:t"&&typeof a=="string"){r+=a;continue}r+=Ur(a)}return r}function Kn(t){switch(t.toLowerCase()){case"ea":return"Hans";case"cs":return"Arab";case"lt":return;default:return}}function _t(t,e){const r={...t,...e},n=Ze(t.color,t.colorAlpha,e.color,e.colorAlpha);r.color=n.color,r.colorAlpha=n.alpha;const a=Ze(t.highlightColor,t.highlightAlpha,e.highlightColor,e.highlightAlpha);return r.highlightColor=a.color,r.highlightAlpha=a.alpha,r}function Gt(t){return{textBox:Lt(t),title:Lt(t),body:Lt(t),other:Lt(t)}}function Es(t){return{textBox:Lt(t.textBox),title:Lt(t.title),body:Lt(t.body),other:Lt(t.other)}}function Lt(t){const e=t==null?void 0:t.default,r=Ae(e),n={};for(let a=0;a<9;a+=1)n[a]=Ae((t==null?void 0:t.levels[a])??e);return{default:r,levels:n}}function Ae(t){return{align:t==null?void 0:t.align,bullet:li(t==null?void 0:t.bullet),marginLeft:t==null?void 0:t.marginLeft,indent:t==null?void 0:t.indent,spaceBefore:t==null?void 0:t.spaceBefore,spaceAfter:t==null?void 0:t.spaceAfter,lineHeight:t==null?void 0:t.lineHeight,lineHeightUnit:t==null?void 0:t.lineHeightUnit,tabStops:t!=null&&t.tabStops?[...t.tabStops]:void 0,run:t!=null&&t.run?{...t.run}:{}}}function Qn(t){return{run:t!=null&&t.run?{...t.run}:{}}}function js(t){const e={default:Qn(t.default),levels:{}};for(let r=0;r<9;r+=1)e.levels[r]=Qn(t.levels[r]??t.default);return e}function Rs(t){const e=Lt(t);e.default.lineHeight=void 0,e.default.lineHeightUnit=void 0;for(let r=0;r<9;r+=1){const n=e.levels[r];n&&(n.lineHeight=void 0,n.lineHeightUnit=void 0)}return e}function Ns(t,e){const r=Lt(t);if(!e)return r;r.default.align=e;for(let n=0;n<9;n+=1){const a=r.levels[n];a&&(a.align=e)}return r}function $s(t,e,r=Gt()){return t?{textBox:Lt(r.textBox),title:ke(t["p:titleStyle"],e,r.title),body:ke(t["p:bodyStyle"],e,r.body),other:ke(t["p:otherStyle"],e,r.other)}:Es(r)}function Is(t,e,r=false){if(!e&&r)return t.textBox;switch(e==null?void 0:e.type){case"title":case"ctrTitle":return t.title;case"body":case"obj":case"subTitle":return t.body;default:return js(t.other)}}function ke(t,e,r=Lt()){if(!t)return Lt(r);const n=Xr(t["a:defPPr"],e),a=Fr(Ae(r.default),n),i={};for(let o=0;o<9;o+=1){const s=Xr(t[`a:lvl${o+1}pPr`],e),d=r.levels[o]??r.default;i[o]=Fr(Fr(Ae(d),Ae(n)),s)}return{default:a,levels:i}}function Xr(t,e){return{align:hi(t==null?void 0:t.algn),bullet:(t==null?void 0:t["a:buNone"])!==void 0?null:nc(t,e),marginLeft:(t==null?void 0:t.marL)!=null?J(B(t.marL,0)):void 0,indent:(t==null?void 0:t.indent)!=null?J(B(t.indent,0)):void 0,spaceBefore:ra(t==null?void 0:t["a:spcBef"]),spaceAfter:ra(t==null?void 0:t["a:spcAft"]),...oc(t==null?void 0:t["a:lnSpc"]),tabStops:ic(t==null?void 0:t["a:tabLst"]),run:ur(t==null?void 0:t["a:defRPr"],e)}}function ci(t,e){return t.levels[e]??t.default}function li(t){return t&&typeof t=="object"?{...t}:t}function gn(t,e){return e===void 0?li(t):e===null?null:!t||t===null?{...e}:{char:e.char!==void 0?e.char:e.autoType!==void 0?void 0:t.char,autoType:e.autoType!==void 0?e.autoType:e.char!==void 0?void 0:t.autoType,startAt:e.autoType!==void 0?e.startAt??t.startAt:e.char!==void 0?void 0:e.startAt??t.startAt,fontFamily:e.fontFamily??t.fontFamily,color:e.color??t.color,colorAlpha:e.colorAlpha??t.colorAlpha}}function Fr(t,e){return{align:e.align??t.align,bullet:gn(t.bullet,e.bullet),marginLeft:e.marginLeft??t.marginLeft,indent:e.indent??t.indent,spaceBefore:e.spaceBefore??t.spaceBefore,spaceAfter:e.spaceAfter??t.spaceAfter,lineHeight:e.lineHeight??t.lineHeight,lineHeightUnit:e.lineHeightUnit??t.lineHeightUnit,tabStops:e.tabStops??t.tabStops,run:_t(t.run,e.run)}}function di(t,e={},r){return{paragraphs:[{runs:[{text:"",...e,fontFamily:e.fontFamily??zt("minor",t,r)}]}],verticalAlign:"top",direction:"horizontal",wrap:"square",anchorCenter:false,horizontalOverflow:"overflow",verticalOverflow:"overflow",columns:1,rtlColumns:false,fromWordArt:false,padding:{top:J(45720),right:J(91440),bottom:J(45720),left:J(91440)},autofit:{type:"none"}}}function yn(t,e,r,n,a){const i=t==null?void 0:t["p:bg"],o=i==null?void 0:i["p:bgPr"];if(!o){const d=i==null?void 0:i["p:bgRef"];if(!d)return;const l=pi(d,e,r,n);if(l!=null&&l.hasFill)return l.fill;const u=St(d,e,r);return{type:"solid",color:u.color,alpha:u.alpha}}const s=Ht(o,e,r,void 0,a);return s.fill.type==="none"?{type:"solid",color:e.colors.lt1}:s.fill}function Bs(t,e){return{fills:ta(t==null?void 0:t["a:fillStyleLst"],e?Tt(e,"a:fillStyleLst"):void 0),backgroundFills:ta(t==null?void 0:t["a:bgFillStyleLst"],e?Tt(e,"a:bgFillStyleLst"):void 0),lines:Ps(t==null?void 0:t["a:lnStyleLst"],e?Tt(e,"a:lnStyleLst"):void 0),effects:Os(t==null?void 0:t["a:effectStyleLst"],e?Tt(e,"a:effectStyleLst"):void 0)}}function ta(t,e){const r=[],n={"a:solidFill":0,"a:gradFill":0,"a:noFill":0,"a:pattFill":0};for(const a of e??[]){const[i]=Object.keys(a);if(i!=="a:solidFill"&&i!=="a:gradFill"&&i!=="a:noFill"&&i!=="a:pattFill")continue;const s=U(t==null?void 0:t[i])[n[i]];n[i]+=1,r.push({tag:i,node:X(s)??{}})}return r}function Ps(t,e){const r=[],n=U(t==null?void 0:t["a:ln"]);let a=0;for(const i of e??[])Object.prototype.hasOwnProperty.call(i,"a:ln")&&(r.push(X(n[a])??{}),a+=1);return r}function Os(t,e){const r=[],n=U(t==null?void 0:t["a:effectStyle"]);let a=0;for(const i of e??[])Object.prototype.hasOwnProperty.call(i,"a:effectStyle")&&(r.push(X(n[a])??{}),a+=1);return r.length?r:n.map(i=>X(i)??{})}function ui(t,e,r,n){const a=t==null?void 0:t["a:fillRef"];return a?pi(a,e,r,n):void 0}function pi(t,e,r,n){const a=St(t,e,r),i=B(t.idx,0),o=i>=1001?n.backgroundFills:n.fills,s=i>=1001?i-1001:i-1,d=o[s];if(d){const l=Ht({[d.tag]:d.node},e,r,a);if(l.hasFill)return l}return{fill:{type:"solid",color:a.color,alpha:a.alpha},hasFill:true}}function xn(t,e,r,n){const a=t==null?void 0:t["a:lnRef"];if(!a)return;const i=St(a,e,r),o=n.lines[Math.max(0,B(a.idx,1)-1)];if(o){const s=Re(o,e,r,i);if(s.hasLine)return s}return{line:{color:i.color,alpha:i.alpha,width:1},hasLine:true}}function vn(t,e,r,n){const a=t==null?void 0:t["a:effectRef"];if(!a)return;const i=St(a,e,r),o=n.effects[Math.max(0,B(a.idx,0))];return o?dr(o,e,r,i):void 0}function Ds(t){const e=typeof t=="string"?t:"rect";switch(e){case"rect":case"roundRect":case"snip1Rect":case"snip2SameRect":case"snip2DiagRect":case"snipRoundRect":case"round1Rect":case"round2SameRect":case"round2DiagRect":case"ellipse":case"diamond":case"triangle":case"rtTriangle":case"parallelogram":case"trapezoid":case"octagon":case"hexagon":case"heptagon":case"decagon":case"dodecagon":case"pentagon":case"star5":case"plaque":case"can":case"pie":case"chord":case"donut":case"arc":case"teardrop":case"leftCircularArrow":case"curvedRightArrow":case"curvedLeftArrow":case"curvedUpArrow":case"curvedDownArrow":case"smileyFace":case"frame":case"halfFrame":case"corner":case"diagStripe":case"plus":case"noSmoking":case"bevel":case"chevron":case"cloud":case"cube":case"homePlate":case"rightArrow":case"stripedRightArrow":case"notchedRightArrow":case"leftArrow":case"leftRightArrow":case"upArrow":case"downArrow":case"upDownArrow":case"quadArrow":case"leftRightUpArrow":case"bentArrow":case"uturnArrow":case"leftUpArrow":case"bentUpArrow":case"rightArrowCallout":case"leftRightArrowCallout":case"quadArrowCallout":case"leftArrowCallout":case"upArrowCallout":case"line":return e;default:return"unknown"}}function hi(t){if(!(t==null||t===""))switch(t){case"ctr":return"center";case"r":return"right";case"just":return"justify";default:return"left"}}function fi(t){switch(t){case"ctr":case"mid":return"middle";case"b":case"bot":return"bottom";default:return"top"}}function Hs(t){switch(t){case"vert":case"eaVert":case"mongolianVert":case"wordArtVert":return"vertical";case"vert270":case"wordArtVertRtl":return"vertical270";default:return"horizontal"}}function zs(t,e){const r=(typeof(t==null?void 0:t["a:tableStyleId"])=="string"?String(t["a:tableStyleId"]):void 0)??e.defaultStyleId;return r?e.styles[r]:void 0}function Us(t,e,r,n,a,i,o,s,d,l){if(!t)return{};const u=Nt(e==null?void 0:e.firstRow),f=Nt(e==null?void 0:e.lastRow),m=Nt(e==null?void 0:e.firstCol),h=Nt(e==null?void 0:e.lastCol),g=Nt(e==null?void 0:e.bandRow),x=Nt(e==null?void 0:e.bandCol),S=Math.min(o-1,r+Math.max(a,1)-1),y=Math.min(s-1,n+Math.max(i,1)-1);let F=jt(t.wholeTbl,d,l);if(g&&o>0){const k=Math.max(0,r-(u&&r>0?1:0));F=Bt(F,jt(k%2===0?t.band1H:t.band2H,d,l))}if(x&&s>0){const k=Math.max(0,n-(m&&n>0?1:0));F=Bt(F,jt(k%2===0?t.band1V:t.band2V,d,l))}return u&&r===0&&(F=Bt(F,jt(t.firstRow,d,l))),f&&S===o-1&&(F=Bt(F,jt(t.lastRow,d,l))),m&&n===0&&(F=Bt(F,jt(t.firstCol,d,l))),h&&y===s-1&&(F=Bt(F,jt(t.lastCol,d,l))),r===0&&n===0&&(F=Bt(F,jt(t.nwCell,d,l))),r===0&&y===s-1&&(F=Bt(F,jt(t.neCell,d,l))),S===o-1&&n===0&&(F=Bt(F,jt(t.swCell,d,l))),S===o-1&&y===s-1&&(F=Bt(F,jt(t.seCell,d,l))),F}function jt(t,e,r){var a,i;if(!t)return{};const n=Ht((a=t["a:tcStyle"])==null?void 0:a["a:fill"],e.theme,e.colorMap);return{fill:n.hasFill?n.fill:void 0,borders:Ys((i=t["a:tcStyle"])==null?void 0:i["a:tcBdr"],e.theme,e.colorMap),textStyle:Xs(t["a:tcTxStyle"],e.theme,e.colorMap,r)}}function Bt(t,e){var r,n,a;return{fill:e.fill??t.fill,borders:qs(t.borders,e.borders),textStyle:e.textStyle?{run:e.textStyle.run?_t(((r=t.textStyle)==null?void 0:r.run)??{},e.textStyle.run):(n=t.textStyle)==null?void 0:n.run,paragraphAlign:e.textStyle.paragraphAlign??((a=t.textStyle)==null?void 0:a.paragraphAlign)}:t.textStyle}}function Xs(t,e,r,n){if(!t)return;const a={};t.b!=null&&(a.bold=String(t.b)==="1"||String(t.b).toLowerCase()==="on"),t.i!=null&&(a.italic=String(t.i)==="1"||String(t.i).toLowerCase()==="on"),t.u!=null&&(a.underline=String(t.u)!=="none"&&String(t.u).toLowerCase()!=="off"),t.sz!=null&&(a.fontSize=pr(B(t.sz,1800)/100));const i=t["a:fontRef"],o=typeof(i==null?void 0:i.idx)=="string"?String(i.idx).trim().toLowerCase():"";if(o==="major"?a.fontFamily=zt("major",e,n):o==="minor"&&(a.fontFamily=zt("minor",e,n)),t["a:srgbClr"]||t["a:schemeClr"]||t["a:sysClr"]){const d=St(t,e,r);a.color=d.color,a.colorAlpha=d.alpha}const s=hi(t.algn);if(!(!Object.keys(a).length&&s==null))return{run:Object.keys(a).length?a:void 0,paragraphAlign:s}}function Ys(t,e,r){if(!t)return;const n={top:ce(t["a:top"],e,r),right:ce(t["a:right"],e,r),bottom:ce(t["a:bottom"],e,r),left:ce(t["a:left"],e,r),insideH:ce(t["a:insideH"],e,r),insideV:ce(t["a:insideV"],e,r)};return Object.values(n).some(Boolean)?n:void 0}function ce(t,e,r){return Se(X(t==null?void 0:t["a:ln"])??t,e,r)}function qs(t,e){return t?e?{top:e.top??t.top,right:e.right??t.right,bottom:e.bottom??t.bottom,left:e.left??t.left,insideH:e.insideH??t.insideH,insideV:e.insideV??t.insideV}:t:e}function _s(t,e,r,n,a){if(!t)return;const i={top:e===0?t.top??t.insideH:t.insideH??t.top,right:r===a-1?t.right??t.insideV:t.insideV??t.right,bottom:e===n-1?t.bottom??t.insideH:t.insideH??t.bottom,left:r===0?t.left??t.insideV:t.insideV??t.left};return Object.values(i).some(Boolean)?i:void 0}function Ws(t,e){return t?e?{top:e.top??t.top,right:e.right??t.right,bottom:e.bottom??t.bottom,left:e.left??t.left}:t:e}function Js(t,e){return!e||!Object.keys(e).length?t:{...t,paragraphs:t.paragraphs.map(r=>({...r,runs:r.runs.map(n=>({..._t(e??{},n),text:n.text}))}))}}function Nt(t){return t===true||t===1||t==="1"||String(t).toLowerCase()==="true"}function Vs(t,e){if(!e)return t;const r=xt(t);let n=false;const a=[["left","marL"],["right","marR"],["top","marT"],["bottom","marB"]];for(const[i,o]of a)e[o]!=null&&(r.padding[i]=J(B(e[o],r.padding[i])),n=true);return e.anchor!=null&&(r.verticalAlign=fi(e.anchor),n=true),n?r:t}function Gs(t,e){return e||t.verticalAlign!=="top"?t:{...t,verticalAlign:"middle"}}function Zs(t,e,r){if(!t)return;const n={top:Se(t["a:lnT"],e,r),right:Se(t["a:lnR"],e,r),bottom:Se(t["a:lnB"],e,r),left:Se(t["a:lnL"],e,r)};return Object.values(n).some(Boolean)?n:void 0}function Se(t,e,r){if(!t)return;const n=Re(t,e,r);if(n.line)return n.line;if(n.hasLine)return{width:0,color:"transparent"}}function oe(t,e){const r=Ks(t==null?void 0:t.action),n=t==null?void 0:t["r:id"];if(typeof n!="string"||!n)return r?{navigationAction:r}:{};const a=e.relationships[n];if(!a)return r?{navigationAction:r}:(e.warnings.push(`Missing hyperlink relationship ${n} in ${e.slidePath}.`),{});if(a.type===nt.hyperlink)return{href:a.target};if(a.type===nt.slide){const i=e.slideIndexByPath[a.target];return i==null?(e.warnings.push(`Missing target slide ${a.target} for hyperlink ${n}.`),{}):{slideIndex:i}}return r?{navigationAction:r}:{}}function Ks(t){if(typeof t!="string"||!t)return;const r=t.trim().toLowerCase().match(/[?&]jump=([^&]+)/);switch(r==null?void 0:r[1]){case"nextslide":return"next";case"previousslide":return"previous";case"firstslide":return"first";case"lastslide":return"last";case"lastslideviewed":return"lastViewed";default:return}}function ea(t){switch(t){case"triangle":case"stealth":case"diamond":case"oval":case"arrow":return t;default:return}}function Qs(t){switch(t){case"rnd":return"round";case"sq":return"square";case"flat":return"butt";default:return}}function tc(t){switch(t){case"dbl":return"double";case"thickThin":return"thickThin";case"thinThick":return"thinThick";case"tri":return"triple";case"sng":return"single";default:return}}function ec(t){if(t){if(t["a:round"]!==void 0)return"round";if(t["a:bevel"]!==void 0)return"bevel";if(t["a:miter"]!==void 0)return"miter"}}function rc(t){var n;const e=(n=X(t==null?void 0:t["a:miter"]))==null?void 0:n.lim;if(e==null)return;const r=B(e,0)/1e5;return Number.isFinite(r)&&r>0?r:void 0}function nc(t,e){var d;if(!t||t["a:buNone"]!==void 0)return;const r=t["a:buFont"],n=typeof(r==null?void 0:r.typeface)=="string"&&r.typeface.trim().length?mn(String(r.typeface),e.theme):void 0,a=t["a:buClr"],i=a?St(a,e.theme,e.colorMap):void 0,o=(d=t["a:buChar"])==null?void 0:d.char;if(typeof o=="string"&&o.trim().length>0)return{char:mi(o),fontFamily:n,color:i==null?void 0:i.color,colorAlpha:i==null?void 0:i.alpha};const s=t["a:buAutoNum"];if(s!=null&&s.type)return{autoType:String(s.type),startAt:Math.max(1,B(s.startAt,1)),fontFamily:n,color:i==null?void 0:i.color,colorAlpha:i==null?void 0:i.alpha}}function bn(t){if(/[\u4E00-\u9FFF]/.test(t))return"zh-CN";if(/[\u3040-\u30FF]/.test(t))return"ja-JP";if(/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7AF]/.test(t))return"ko-KR"}function mi(t){return t.replace(/&#x([0-9a-f]+);/gi,(e,r)=>String.fromCodePoint(parseInt(r,16))).replace(/&#(\d+);/g,(e,r)=>String.fromCodePoint(parseInt(r,10))).replace(/&quot;/g,'"').replace(/&apos;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")}function ac(t,e){return e==="External"||/^[a-z][a-z0-9+.-]*:/i.test(t)}function ra(t){var e;if(t&&((e=t["a:spcPts"])==null?void 0:e.val)!=null)return pr(B(t["a:spcPts"].val,0)/100)}function ic(t){if(!t)return;const e=U(t["a:tab"]).map(r=>J(B(r==null?void 0:r.pos,NaN))).filter(r=>Number.isFinite(r)).sort((r,n)=>r-n);return e.length?e:[]}function oc(t){var e,r;return t?((e=t["a:spcPct"])==null?void 0:e.val)!=null?{lineHeight:B(t["a:spcPct"].val,1e5)/1e5,lineHeightUnit:"multiple"}:((r=t["a:spcPts"])==null?void 0:r.val)!=null?{lineHeight:pr(B(t["a:spcPts"].val,0)/100),lineHeightUnit:"px"}:{}:{}}function pr(t){return Number((t*96/72).toFixed(3))}function Wt(t,e){const r=cc(t),n=r?e==null?void 0:e.get(r):void 0;return n??(r!=null?B(r,Number.POSITIVE_INFINITY):Number.POSITIVE_INFINITY)}function Qt(t,e){let r=t;for(const n of e)r=r==null?void 0:r[n];return typeof(r==null?void 0:r.name)=="string"?r.name:void 0}function sc(t){var r,n;const e=(n=(r=t["p:nvSpPr"])==null?void 0:r["p:cNvPr"])==null?void 0:n.id;return e!=null?String(e):void 0}function cc(t){return we(t,["p:nvSpPr","p:cNvPr"])??we(t,["p:nvPicPr","p:cNvPr"])??we(t,["p:nvGraphicFramePr","p:cNvPr"])??we(t,["p:nvCxnSpPr","p:cNvPr"])??we(t,["p:nvGrpSpPr","p:cNvPr"])}function we(t,e){let r=t;for(const n of e)r=r==null?void 0:r[n];return(r==null?void 0:r.id)!=null?String(r.id):void 0}function lc(t){const e=t==null?void 0:t["p:ph"];if(e)return{type:typeof e.type=="string"?e.type:void 0,idx:e.idx!=null?String(e.idx):void 0}}function Yr(t){return`${gi(t.type)}:${t.idx??""}`}function wn(t,e){if(!(!t||!e))for(const r of uc(e)){const n=t.get(r);if(n)return n}}function dc(t,e){var n;const r=t?qr(t.item):void 0;if(!r)return false;for(const a of r.paragraphs)for(const i of a.runs){const o=(n=i.fontFamily)==null?void 0:n.trim();if(o&&o!==e.fonts.minor&&o!==e.fonts.major)return true}return false}function uc(t){const e=Yr(t),r=t.idx,n=gi(t.type),a=[n];n==="ctrTitle"?a.push("title"):n==="title"?a.push("ctrTitle"):n==="obj"?a.push("body"):n==="body"&&a.push("obj");const i=new Set([e]);for(const o of a)i.add(Yr({type:o,idx:r}));return[...i]}function gi(t){switch(t){case"ctrTitle":return"title";case"obj":return"body";default:return t??"body"}}function yi(t,e){if(!t)return e;const r=xt(e),n=qr(t.item),a=qr(r.item);return r.hasTransform||(r.item.transform=xt(t.item.transform)),!r.hasFill&&t.item.fill&&(r.item.fill=xt(t.item.fill)),!r.hasLine&&"line"in t.item&&t.item.line&&(r.item.line=xt(t.item.line)),r.item.name||(r.item.name=t.item.name),!r.item.placeholder&&t.item.placeholder&&(r.item.placeholder=xt(t.item.placeholder)),r.hasText?n&&a&&Sr(r.item,na(n,a,r.textFrameStyleFlags)):n&&a&&!_r(t.item)&&!Wr(t.item)&&!Jr(t.item)?Sr(r.item,na(n,a,r.textFrameStyleFlags)):n&&!a&&!_r(t.item)&&!Wr(t.item)&&!Jr(t.item)&&Sr(r.item,xt(n)),r.item.kind==="shape"&&t.item.kind==="shape"&&!r.item.geometry&&t.item.geometry&&(r.item.geometry=xt(t.item.geometry)),r}function qr(t){if(t.kind==="text"||t.kind==="shape")return t.textFrame}function Sr(t,e){(t.kind==="text"||t.kind==="shape")&&(t.textFrame=e)}function na(t,e,r){if(!(t!=null&&t.paragraphs.length))return e;const n=xt(e);return r!=null&&r.verticalAlign||(n.verticalAlign=t.verticalAlign),r!=null&&r.direction||(n.direction=t.direction??"horizontal"),r!=null&&r.wrap||(n.wrap=t.wrap??"square"),r!=null&&r.anchorCenter||(n.anchorCenter=t.anchorCenter??false),n.horizontalOverflow=e.horizontalOverflow??t.horizontalOverflow??"overflow",n.verticalOverflow=e.verticalOverflow??t.verticalOverflow??"overflow",n.columns=e.columns??t.columns??1,n.columnSpacing=e.columnSpacing??t.columnSpacing,n.rtlColumns=e.rtlColumns??t.rtlColumns??false,n.fromWordArt=e.fromWordArt??t.fromWordArt??false,r!=null&&r.padding.top||(n.padding.top=t.padding.top),r!=null&&r.padding.right||(n.padding.right=t.padding.right),r!=null&&r.padding.bottom||(n.padding.bottom=t.padding.bottom),r!=null&&r.padding.left||(n.padding.left=t.padding.left),n.autofit=e.autofit??t.autofit,n.paragraphs=e.paragraphs.map((a,i)=>pc(xi(t.paragraphs,i),a)),n}function pc(t,e){return t?{...e,level:e.level??t.level,bullet:e.bulletDisabled?void 0:gn(t.bullet,e.bullet)??void 0,bulletDisabled:e.bulletDisabled||void 0,align:e.align??t.align,marginLeft:e.marginLeft??t.marginLeft,indent:e.indent??t.indent,spaceBefore:e.spaceBefore??t.spaceBefore,spaceAfter:e.spaceAfter??t.spaceAfter,lineHeight:e.lineHeight??t.lineHeight,lineHeightUnit:e.lineHeightUnit??t.lineHeightUnit,runs:e.runs.map((r,n)=>hc(xi(t.runs,n),r))}:e}function hc(t,e){if(!t)return e;const r=Ze(t.color,t.colorAlpha,e.color,e.colorAlpha),n=Ze(t.highlightColor,t.highlightAlpha,e.highlightColor,e.highlightAlpha);return{...e,bold:e.bold??t.bold,italic:e.italic??t.italic,underline:e.underline??t.underline,strike:e.strike??t.strike,color:r.color,colorAlpha:r.alpha,highlightColor:n.color,highlightAlpha:n.alpha,fontSize:e.fontSize??t.fontSize,fontFamily:e.fontFamily??t.fontFamily,baselineShift:e.baselineShift??t.baselineShift}}function Ze(t,e,r,n){return r!==void 0?{color:r,alpha:n}:n!==void 0?{color:t,alpha:n}:{color:t,alpha:e}}function xi(t,e){return t[e]??t[t.length-1]??t[0]}function fc(){return{verticalAlign:false,direction:false,wrap:false,anchorCenter:false,padding:{top:false,right:false,bottom:false,left:false}}}function mc(t){return String(t).trim().toLowerCase()==="none"?"none":"square"}function aa(t){return String(t).trim().toLowerCase()==="clip"?"clip":"overflow"}function gc(t,e){if(!t)return;Nt(t.rtlCol)&&e.warnings.push(`Text columns with rtlCol are not fully supported in ${e.slidePath}.`),Nt(t.fromWordArt)&&e.warnings.push(`WordArt text behavior is not fully supported in ${e.slidePath}.`);const r=Math.max(1,B(t.numCol,1));r>1&&e.warnings.push(`Multi-column text (numCol=${r}) is not fully supported in ${e.slidePath}.`)}function X(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:void 0}function Zt(t){return!!(t!=null&&t.paragraphs.some(e=>e.runs.some(r=>r.text.trim().length>0)))}function ia(t){return t.kind==="text"||t.kind==="shape"?Zt(t.textFrame):t.kind==="table"?t.cells.some(e=>Zt(e.textFrame)):false}function yc(t,e){for(const r of t){if((r.kind==="text"||r.kind==="shape")&&r.textFrame){oa(r.textFrame,e);continue}if(r.kind==="table")for(const n of r.cells)oa(n.textFrame,e)}}function oa(t,e){var r;for(const n of t.paragraphs)for(const a of n.runs){const i=(r=a.fontFamily)==null?void 0:r.trim(),o=bn(a.text);!i||!o||(i===e.fonts.major?a.fontFamily=zt("major",e,o):i===e.fonts.minor&&(a.fontFamily=zt("minor",e,o)))}}function xc(t,e){const r=String(e+1);for(const n of t){if(n.kind!=="text"&&n.kind!=="shape"||!n.placeholder||!n.textFrame||n.placeholder.type!=="sldNum")continue;const a=n.textFrame.paragraphs.map(s=>s.runs.map(d=>d.text).join("").trim()).filter(Boolean).join("");if(!vi(a))continue;const i=n.textFrame.paragraphs.find(s=>s.runs.length);if(!i)continue;let o=false;i.runs=i.runs.map(s=>o?{...s,text:""}:(o=true,{...s,text:r}))}}function vi(t){if(!t)return true;const e=t.replace(/[\s<#>‹›《》〔〕\[\]\(\)\{\}-]/g,"");return e.length===0||/^sldnum$/i.test(e)}function vc(t){return t.kind!=="text"&&t.kind!=="shape"||!t.placeholder?false:t.placeholder.type==="dt"||t.placeholder.type==="ftr"||t.placeholder.type==="hdr"}function bi(t){return t.kind!=="text"&&t.kind!=="shape"||!t.placeholder?false:t.placeholder.type==="dt"||t.placeholder.type==="sldNum"||t.placeholder.type==="ftr"||t.placeholder.type==="hdr"}function _r(t){var n;if(t.kind!=="text"&&t.kind!=="shape"||!t.placeholder||!Zt(t.textFrame))return false;const e=t.placeholder.type;if(e==="dt"||e==="sldNum"||e==="ftr"||e==="hdr")return false;const r=((n=t.textFrame)==null?void 0:n.paragraphs.map(a=>a.runs.map(i=>i.text).join("").trim()).find(Boolean))??"";return/^(?:click|tap)\s+to\s+(?:edit|add)\b/i.test(r)||/^(?:单击|点击)\s*此处(?:以)?(?:编辑|添加)/.test(r)}function Wr(t){var n,a;if(t.kind!=="text"&&t.kind!=="shape"||!t.placeholder||!Zt(t.textFrame))return false;const e=t.placeholder.type;if(e==="dt"||e==="sldNum"||e==="ftr"||e==="hdr")return false;const r=((a=(n=t.textFrame)==null?void 0:n.paragraphs.map(i=>i.runs.map(o=>o.text).join("").trim()).find(Boolean))==null?void 0:a.replace(/\s+/g," ").trim())??"";return/^(?:标题|副标题)\s*文本$/u.test(r)||/^(?:Title|Subtitle)\s+Text$/i.test(r)||/^(?:正文|文本)\s*级别\s*\d+$/u.test(r)||/^(?:Body|Text)\s+Level\s*\d+$/i.test(r)}function Jr(t){var a;if(t.kind!=="text"&&t.kind!=="shape"||!t.placeholder||!Zt(t.textFrame))return false;const e=t.placeholder.type;if(e==="dt"||e==="sldNum"||e==="ftr"||e==="hdr")return false;const r=(((a=t.textFrame)==null?void 0:a.paragraphs)??[]).map(i=>i.runs.map(o=>o.text).join("").replace(/\s+/g," ").trim()).filter(Boolean),n=r[0]??"";return/^编[辑輯]母版(?:标题|副标题|文本)样式$/u.test(n)?true:r.length>=2&&/^编[辑輯]母版(?:标题|副标题|文本)样式$/u.test(n)&&r.slice(1).every((i,o)=>i===`\u7B2C${o+2}\u7EA7`)}function bc(t){var e;for(const r of t)if(!bi(r)){if(r.kind==="text"||r.kind==="shape")for(const n of((e=r.textFrame)==null?void 0:e.paragraphs)??[]){const a=n.runs.map(i=>i.text).join("").trim();if(a)return a}if(r.kind==="table")for(const n of r.cells)for(const a of n.textFrame.paragraphs){const i=a.runs.map(o=>o.text).join("").trim();if(i)return i}}}function Fn(t){const e=t.split("/"),r=e.pop();return`${e.join("/")}/_rels/${r}.rels`}function wc(t,e,r){var h,g;if(!t)return;const n=typeof((h=t["a:videoFile"])==null?void 0:h["r:link"])=="string"?String(t["a:videoFile"]["r:link"]):void 0,a=typeof((g=t["a:audioFile"])==null?void 0:g["r:link"])=="string"?String(t["a:audioFile"]["r:link"]):void 0,i=Fc(t),o=n?"video":a?"audio":void 0;if(!n&&!a&&!i)return;const s=i??n??a,d=o?[nt.media,o==="video"?nt.video:nt.audio]:[nt.media,nt.video,nt.audio],l=Vr(s,d,e,`media for ${r}`);if(l)return{mediaType:o??sa(l),mediaId:l};const u=o==="video"?n:o==="audio"?a:void 0,f=o==="video"?[nt.video]:o==="audio"?[nt.audio]:[],m=u&&u!==s?Vr(u,f,e,`${o??"media"} for ${r}`):void 0;if(m)return{mediaType:o??sa(m),mediaId:m}}function Fc(t){var e;if(t)for(const r of U((e=t["p:extLst"])==null?void 0:e["p:ext"])){const n=X(r==null?void 0:r["p14:media"]);if(typeof(n==null?void 0:n["r:embed"])=="string"&&n["r:embed"])return String(n["r:embed"])}}function Vr(t,e,r,n){if(!t)return;const a=r.relationships[t];if(!a){r.warnings.push(`Missing relationship ${t} for ${n} in ${r.slidePath}.`);return}if(a.targetMode==="External"){r.warnings.push(`External ${n} is not supported in ${r.slidePath}.`);return}if(e.length>0&&!e.includes(a.type)){r.warnings.push(`Unsupported relationship type for ${n} in ${r.slidePath}: ${a.type}.`);return}return a.target}function sa(t){switch((t.split(".").pop()??"").toLowerCase()){case"mp3":case"wav":case"m4a":case"aac":case"oga":case"ogg":case"flac":return"audio";default:return"video"}}function Sc(t){if(t==="_rels/.rels")return"package-root.xml";const e=t.split("/"),r=e.pop()??"";return e.pop()!=="_rels"?t:[...e,r.replace(/\.rels$/,"")].join("/")}function Ac(t,e){if(t.kind==="image"&&t.mediaId&&e.add(t.mediaId),t.kind==="media"&&(t.mediaId&&e.add(t.mediaId),t.posterMediaId&&e.add(t.posterMediaId)),Gr(t.fill,e),t.kind==="table")for(const r of t.cells)Gr(r.fill,e)}function Gr(t,e){(t==null?void 0:t.type)==="picture"&&t.mediaId&&e.add(t.mediaId)}async function kc(t,e,r,n){var o,s;if((s=(o=n.media[e])==null?void 0:o.data)!=null&&s.length)return;const a=t.file(e);if(!a)return;const i=await a.async("uint8array");n.media[e]={id:e,path:e,contentType:Lc(e,r),data:i}}function Tc(t){var e;if(t){if(t.kind==="text"||t.kind==="shape")return(e=t.textFrame)==null?void 0:e.paragraphs.map(r=>r.runs.map(n=>n.text).join("")).join(" ").trim();if(t.kind==="table")return t.cells.flatMap(r=>r.textFrame.paragraphs.map(n=>n.runs.map(a=>a.text).join(""))).join(" ").trim()}}function Lc(t,e){const r=e.overrides[t];if(r)return r;const n=t.split(".").pop()??"";return e.defaults[n]??"application/octet-stream"}function c(t,e){return{name:t,value:e}}function L(...t){return{type:"add",values:t}}function v(t,e){return{type:"sub",left:t,right:e}}function p(t,e){return{type:"mul",left:t,right:e}}function b(t,e){return{type:"div",left:t,right:e}}function Jt(...t){return{type:"min",values:t}}function le(...t){return{type:"max",values:t}}function R(t,e,r){return{type:"pin",min:t,value:e,max:r}}function K(t,e){return{type:"sin",radius:t,angle:e}}function Q(t,e){return{type:"cos",radius:t,angle:e}}function Vt(t,e){return{type:"gt",left:t,right:e}}function he(t,e,r){return{type:"ifElse",condition:t,whenTrue:e,whenFalse:r}}function Ke(t){return{type:"sqrt",value:t}}function Qe(t,e,r){return{type:"mod",x:t,y:e,z:r}}function Te(t,e){return{type:"at2",x:t,y:e}}function wi(t,e,r=[]){const n={l:0,t:0,r:t,b:e,w:t,h:e,hc:t/2,vc:e/2,wd2:t/2,hd2:e/2,cx:t/2,cy:e/2,ss:Math.min(t,e),ls:Math.max(t,e),cd4:54e5,cd2:108e5,"3cd4":162e5},a=new Map(r.map(l=>[l.name,l.value])),i=new Map(Object.entries(n)),o=new Set,s=l=>{const u=i.get(l);if(u!=null)return u;const f=a.get(l);if(f==null)throw new Error(`Unknown geometry guide: ${l}`);if(o.has(l))throw new Error(`Circular geometry guide reference: ${l}`);o.add(l);const m=d(f);return o.delete(l),i.set(l,m),m},d=l=>Mc(l,{width:t,height:e,get:s,resolve:d});return{width:t,height:e,get:s,resolve:d}}function Mc(t,e){if(typeof t=="number")return ft(t);if(typeof t=="string")return ft(e.get(t));switch(t.type){case"add":return ft(t.values.reduce((r,n)=>r+e.resolve(n),0));case"sub":return ft(e.resolve(t.left)-e.resolve(t.right));case"mul":return ft(e.resolve(t.left)*e.resolve(t.right));case"div":{const r=e.resolve(t.right);return Math.abs(r)<1e-9?0:ft(e.resolve(t.left)/r)}case"min":return ft(Math.min(...t.values.map(r=>e.resolve(r))));case"max":return ft(Math.max(...t.values.map(r=>e.resolve(r))));case"pin":{const r=e.resolve(t.min),n=e.resolve(t.max),a=e.resolve(t.value);return ft(Math.min(Math.max(a,r),n))}case"sin":{const r=e.resolve(t.radius),n=e.resolve(t.angle)*Math.PI/180;return ft(r*Math.sin(n))}case"cos":{const r=e.resolve(t.radius),n=e.resolve(t.angle)*Math.PI/180;return ft(r*Math.cos(n))}case"gt":return e.resolve(t.left)>e.resolve(t.right)?1:0;case"ifElse":return ft(e.resolve(t.condition)>=.5?e.resolve(t.whenTrue):e.resolve(t.whenFalse));case"sqrt":return ft(Math.sqrt(Math.max(0,e.resolve(t.value))));case"mod":return ft(Math.sqrt(Math.max(0,Math.pow(e.resolve(t.x),2)+Math.pow(e.resolve(t.y),2)+Math.pow(e.resolve(t.z),2))));case"at2":return ft(Math.atan2(e.resolve(t.y),e.resolve(t.x))*180*6e4/Math.PI);default:return 0}}function Cc(t,e){return{x:e.resolve(t.x),y:e.resolve(t.y)}}function Ec(t,e){const r=[];let n=0,a=0,i=0,o=0;for(const s of t)switch(s.type){case"M":case"L":{n=e.resolve(s.x),a=e.resolve(s.y),s.type==="M"&&(i=n,o=a),r.push(`${s.type} ${W(n)} ${W(a)}`);break}case"H":n=e.resolve(s.x),r.push(`H ${W(n)}`);break;case"V":a=e.resolve(s.y),r.push(`V ${W(a)}`);break;case"Q":n=e.resolve(s.x),a=e.resolve(s.y),r.push(`Q ${W(e.resolve(s.x1))} ${W(e.resolve(s.y1))} ${W(n)} ${W(a)}`);break;case"C":n=e.resolve(s.x),a=e.resolve(s.y),r.push(`C ${W(e.resolve(s.x1))} ${W(e.resolve(s.y1))}, ${W(e.resolve(s.x2))} ${W(e.resolve(s.y2))}, ${W(n)} ${W(a)}`);break;case"A":n=e.resolve(s.x),a=e.resolve(s.y),r.push(`A ${W(e.resolve(s.rx))} ${W(e.resolve(s.ry))} ${W(e.resolve(s.rotation??0))} ${ca(s.largeArc,e)} ${ca(s.sweep,e)} ${W(n)} ${W(a)}`);break;case"OA":{const d=e.resolve(s.rx),l=e.resolve(s.ry),u=e.resolve(s.startAngle),f=e.resolve(s.sweepAngle),m=la(u),h=la(u+f),g=n-Math.cos(m)*d,x=a-Math.sin(m)*l;n=g+Math.cos(h)*d,a=x+Math.sin(h)*l,r.push(`A ${W(d)} ${W(l)} 0 ${Math.abs(f)>108e5?"1":"0"} ${f>=0?"1":"0"} ${W(n)} ${W(a)}`);break}case"Z":r.push("Z"),n=i,a=o;break}return r.join(" ")}function jc(t,e){return t.map(r=>{const n=Cc(r,e);return`${W(n.x)},${W(n.y)}`}).join(" ")}function W(t){const e=ft(t),r=Number(e.toFixed(3));return Object.is(r,-0)?"0":String(r)}function ca(t,e){return typeof t=="boolean"?t?"1":"0":t==null?"0":e.resolve(t)>=.5?"1":"0"}function ft(t){return Number.isFinite(t)?Object.is(t,-0)?0:t:0}function la(t){return t/6e4*Math.PI/180}const Sn=216e5,tr=Sn-1,Rt=6e4;function Ar(t,e){return[c("adj1",t),c("adj2",e),c("stAng",R(0,"adj1",tr)),c("enAng",R(0,"adj2",tr)),c("rawSwAng",v("enAng","stAng")),c("swAng",he(Vt("rawSwAng",0),"rawSwAng",L("rawSwAng",Sn))),c("rx",b("w",2)),c("ry",b("h",2)),c("stDeg",b("stAng",Rt)),c("enDeg",b("enAng",Rt)),c("swDeg",b("swAng",Rt)),c("stDenX",Q("ry","stDeg")),c("stDenY",K("rx","stDeg")),c("stRadius",b(p("rx","ry"),Qe("stDenX","stDenY",0))),c("enDenX",Q("ry","enDeg")),c("enDenY",K("rx","enDeg")),c("enRadius",b(p("rx","ry"),Qe("enDenX","enDenY",0))),c("x1",L("cx",Q("stRadius","stDeg"))),c("y1",L("cy",K("stRadius","stDeg"))),c("x2",L("cx",Q("enRadius","enDeg"))),c("y2",L("cy",K("enRadius","enDeg"))),c("largeArcFlag",Vt("swDeg",180))]}function Rc(t,e=-90){return Array.from({length:t},(r,n)=>{const a=e+360/t*n;return{x:L("cx",Q("cx",a)),y:L("cy",K("cy",a))}})}function kr(t,e=-90){return{textBounds:{left:p("w",.14),top:p("h",.14),right:p("w",.14),bottom:p("h",.14)},elements:[{kind:"polygon",defaultJoin:"round",points:Rc(t,e)}]}}function Nc(){return[c("adj1",25e3),c("adj2",5e4),c("adj3",25e3),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("q1",b(L("th","aw"),4)),c("hR",v("hd2","q1")),c("q7",p("hR",2)),c("q8",p("q7","q7")),c("q9",p("th","th")),c("q10",v("q8","q9")),c("q11",Ke("q10")),c("idx",b(p("q11","w"),"q7")),c("maxAdj3",b(p(1e5,"idx"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("ah",b(p("ss","a3"),1e5)),c("y3",L("hR","th")),c("q2",p("w","w")),c("q3",p("ah","ah")),c("q4",v("q2","q3")),c("q5",Ke("q4")),c("dy",b(p("q5","hR"),"w")),c("y5",L("hR","dy")),c("y7",L("y3","dy")),c("q6",v("aw","th")),c("dh",b("q6",2)),c("y4",v("y5","dh")),c("y8",L("y7","dh")),c("aw2",b("aw",2)),c("y6",v("b","aw2")),c("x1",v("r","ah"))]}function $c(){return[c("adj1",25e3),c("adj2",5e4),c("adj3",25e3),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("q1",b(L("th","aw"),4)),c("hR",v("hd2","q1")),c("q7",p("hR",2)),c("q8",p("q7","q7")),c("q9",p("th","th")),c("q10",v("q8","q9")),c("q11",Ke("q10")),c("idx",b(p("q11","w"),"q7")),c("maxAdj3",b(p(1e5,"idx"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("ah",b(p("ss","a3"),1e5)),c("y3",L("hR","th")),c("q2",p("w","w")),c("q3",p("ah","ah")),c("q4",v("q2","q3")),c("q5",Ke("q4")),c("dy",b(p("q5","hR"),"w")),c("y5",L("hR","dy")),c("y7",L("y3","dy")),c("q6",v("aw","th")),c("dh",b("q6",2)),c("y4",v("y5","dh")),c("y8",L("y7","dh")),c("aw2",b("aw",2)),c("y6",v("b","aw2")),c("x1",L("l","ah")),c("outerInset",p("th",.42)),c("outerX",v("r","outerInset")),c("innerY",v("y3",p("th",.38))),c("curveEndX",L("x1",p("th",.28))),c("curveEndY",v("y8",p("th",.68))),c("swAng",Te("ah","dy")),c("ix",L("l","idx")),c("iy",b(L("hR","y3"),2)),c("q12",b("th",2)),c("dang2",Te("idx","q12")),c("swAng2",v("dang2","swAng")),c("swAng3",v("swAng","dang2")),c("stAng3",v(0,"dang2"))]}function Ic(){return[c("adj1",26e3),c("adj2",5e4),c("maxAdj2",b(p(5e4,"w"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("arcX",v("wd2",b(L("th","aw"),4))),c("bandX",L("arcX","th")),c("headBaseX",v("w","aw")),c("headJoinX",v("w",b(L("aw","th"),2))),c("headOuterX",v("w","th")),c("rightArcEndX",v("w",b("th",2))),c("barY",v("h","th"))]}function Bc(){return[c("adj1",26e3),c("adj2",5e4),c("maxAdj2",b(p(5e4,"w"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("a1",R(0,"adj1","a2")),c("th",b(p("ss","a1"),1e5)),c("aw",b(p("ss","a2"),1e5)),c("arcX",v("wd2",b(L("th","aw"),4))),c("bandX",L("arcX","th")),c("headBaseX",v("w","aw")),c("headJoinX",v("w",b(L("aw","th"),2))),c("headOuterX",v("w","th")),c("rightArcEndX",v("w",b("th",2))),c("barY",v("h","th"))]}const Fi={snip1Rect:{guides:[c("adj",18e3),c("a",R(0,"adj",5e4)),c("cut",b(p("ss","a"),1e5))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",lineJoin:"round",commands:[{type:"M",x:0,y:0},{type:"H",x:v("w","cut")},{type:"L",x:"w",y:"cut"},{type:"V",y:"h"},{type:"H",x:0},{type:"Z"}]}]},snip2SameRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("cutTop",b(p("ss","a1"),1e5)),c("cutBottom",b(p("ss","a2"),1e5)),c("maxCut",he(Vt("cutTop","cutBottom"),"cutTop","cutBottom"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"cutTop",y:0},{type:"H",x:v("w","cutTop")},{type:"L",x:"w",y:"cutTop"},{type:"V",y:v("h","cutBottom")},{type:"L",x:v("w","cutBottom"),y:"h"},{type:"H",x:"cutBottom"},{type:"L",x:0,y:v("h","cutBottom")},{type:"V",y:"cutTop"},{type:"Z"}]}]},snip2DiagRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("cutTop",b(p("ss","a1"),1e5)),c("cutBottom",b(p("ss","a2"),1e5)),c("maxCut",he(Vt("cutTop","cutBottom"),"cutTop","cutBottom"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"cutTop",y:0},{type:"H",x:v("w","cutBottom")},{type:"L",x:"w",y:"cutBottom"},{type:"V",y:v("h","cutTop")},{type:"L",x:v("w","cutTop"),y:"h"},{type:"H",x:"cutBottom"},{type:"L",x:0,y:v("h","cutBottom")},{type:"V",y:"cutTop"},{type:"Z"}]}]},snipRoundRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("radius",b(p("ss","a1"),1e5)),c("cut",b(p("ss","a2"),1e5)),c("curveInset",b(p("radius",29289),1e5))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"radius",y:0},{type:"H",x:v("w","cut")},{type:"L",x:"w",y:"cut"},{type:"V",y:"h"},{type:"H",x:0},{type:"V",y:"radius"},{type:"A",rx:"radius",ry:"radius",sweep:true,x:"radius",y:0},{type:"Z"}]}]},round1Rect:{guides:[c("adj",18e3),c("a",R(0,"adj",5e4)),c("radius",b(p("ss","a"),1e5)),c("curveInset",b(p("radius",29289),1e5))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:0,y:0},{type:"H",x:v("w","radius")},{type:"A",rx:"radius",ry:"radius",sweep:true,x:"w",y:"radius"},{type:"V",y:"h"},{type:"H",x:0},{type:"Z"}]}]},round2SameRect:{guides:[c("adj1",18e3),c("adj2",0),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("radiusTop",b(p("ss","a1"),1e5)),c("radiusBottom",b(p("ss","a2"),1e5)),c("topCurveInset",b(p("radiusTop",29289),1e5)),c("bottomCurveInset",b(p("radiusBottom",29289),1e5)),c("maxCurveInset",he(Vt("radiusTop","radiusBottom"),"topCurveInset","bottomCurveInset"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"radiusTop",y:0},{type:"H",x:v("w","radiusTop")},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:"w",y:"radiusTop"},{type:"V",y:v("h","radiusBottom")},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:v("w","radiusBottom"),y:"h"},{type:"H",x:"radiusBottom"},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:0,y:v("h","radiusBottom")},{type:"V",y:"radiusTop"},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:"radiusTop",y:0},{type:"Z"}]}]},round2DiagRect:{guides:[c("adj1",18e3),c("adj2",18e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("radiusTop",b(p("ss","a1"),1e5)),c("radiusBottom",b(p("ss","a2"),1e5)),c("topCurveInset",b(p("radiusTop",29289),1e5)),c("bottomCurveInset",b(p("radiusBottom",29289),1e5)),c("maxCurveInset",he(Vt("radiusTop","radiusBottom"),"topCurveInset","bottomCurveInset"))],textBounds:{left:0,top:0,right:0,bottom:0},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"radiusTop",y:0},{type:"H",x:v("w","radiusBottom")},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:"w",y:"radiusBottom"},{type:"V",y:v("h","radiusTop")},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:v("w","radiusTop"),y:"h"},{type:"H",x:"radiusBottom"},{type:"A",rx:"radiusBottom",ry:"radiusBottom",sweep:true,x:0,y:v("h","radiusBottom")},{type:"V",y:"radiusTop"},{type:"A",rx:"radiusTop",ry:"radiusTop",sweep:true,x:"radiusTop",y:0},{type:"Z"}]}]},cloud:{textBounds:{left:p("w",.14),top:p("h",.18),right:p("w",.14),bottom:p("h",.16)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:p("w",.18),y:p("h",.72)},{type:"C",x1:p("w",.08),y1:p("h",.72),x2:0,y2:p("h",.63),x:0,y:p("h",.52)},{type:"C",x1:0,y1:p("h",.4),x2:p("w",.1),y2:p("h",.31),x:p("w",.22),y:p("h",.33)},{type:"C",x1:p("w",.24),y1:p("h",.18),x2:p("w",.38),y2:p("h",.06),x:p("w",.53),y:p("h",.08)},{type:"C",x1:p("w",.61),y1:p("h",.01),x2:p("w",.76),y2:p("h",.04),x:p("w",.82),y:p("h",.15)},{type:"C",x1:p("w",.95),y1:p("h",.14),x2:"w",y2:p("h",.26),x:p("w",.97),y:p("h",.37)},{type:"C",x1:p("w",1.05),y1:p("h",.43),x2:p("w",1.03),y2:p("h",.58),x:p("w",.91),y:p("h",.63)},{type:"C",x1:p("w",.9),y1:p("h",.76),x2:p("w",.76),y2:p("h",.85),x:p("w",.62),y:p("h",.8)},{type:"C",x1:p("w",.54),y1:p("h",.91),x2:p("w",.36),y2:p("h",.93),x:p("w",.28),y:p("h",.83)},{type:"C",x1:p("w",.18),y1:p("h",.86),x2:p("w",.11),y2:p("h",.81),x:p("w",.18),y:p("h",.72)},{type:"Z"}]}]},plaque:{guides:[c("left",p("w",.18)),c("right",p("w",.82)),c("topInset",p("h",.14)),c("sideInset",p("w",.14)),c("upper",p("h",.32)),c("lower",p("h",.68)),c("innerRight",v("w","sideInset")),c("bottomInset",v("h","topInset"))],textBounds:{left:"sideInset",top:"topInset",right:"sideInset",bottom:"topInset"},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"left",y:0},{type:"Q",x1:"cx",y1:"topInset",x:"right",y:0},{type:"Q",x1:"w",y1:p("h",.18),x:"w",y:"upper"},{type:"Q",x1:"innerRight",y1:"cy",x:"w",y:"lower"},{type:"Q",x1:"w",y1:p("h",.82),x:"right",y:"h"},{type:"Q",x1:"cx",y1:"bottomInset",x:"left",y:"h"},{type:"Q",x1:0,y1:p("h",.82),x:0,y:"lower"},{type:"Q",x1:"sideInset",y1:"cy",x:0,y:"upper"},{type:"Q",x1:0,y1:p("h",.18),x:"left",y:0},{type:"Z"}]}]},can:{guides:[c("adj",25e3),c("maxAdj",b(p(5e4,"h"),"ss")),c("a",R(0,"adj","maxAdj")),c("y1",b(p("ss","a"),2e5)),c("y2",L("y1","y1")),c("y3",v("b","y1"))],textBounds:{left:"l",top:"y2",right:"l",bottom:v("h","y3")},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"l",y:"y1"},{type:"L",x:"l",y:"y3"},{type:"A",rx:"wd2",ry:"y1",rotation:0,largeArc:false,sweep:false,x:"r",y:"y3"},{type:"L",x:"r",y:"y1"},{type:"A",rx:"wd2",ry:"y1",rotation:0,largeArc:false,sweep:true,x:"l",y:"y1"},{type:"Z"}]},{kind:"ellipse",fill:"lightenMore",cx:"hc",cy:"y1",rx:"wd2",ry:"y1",defaultJoin:"round"}]},pie:{guides:Ar(0,162e5),textBounds:{left:p("w",.146447),top:p("h",.265625),right:p("w",.146447),bottom:p("h",.265625)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"y1"},{type:"A",rx:"rx",ry:"ry",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"x2",y:"y2"},{type:"L",x:"cx",y:"cy"},{type:"Z"}]}]},chord:{guides:Ar(27e5,162e5),textBounds:{left:p("w",.146447),top:p("h",.265625),right:p("w",.146447),bottom:p("h",.265625)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"y1"},{type:"A",rx:"rx",ry:"ry",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"x2",y:"y2"},{type:"Z"}]}]},donut:{guides:[c("adj",21e3),c("a",R(0,"adj",5e4)),c("outerX",b("w",2)),c("outerY",b("h",2)),c("dr",b(p("ss","a"),1e5)),c("innerX",v("outerX","dr")),c("innerY",v("outerY","dr")),c("leftOuterX",v("cx","outerX")),c("rightOuterX",L("cx","outerX")),c("leftInnerX",v("cx","innerX")),c("rightInnerX",L("cx","innerX"))],textBounds:{left:p("w",.18),top:p("h",.18),right:p("w",.18),bottom:p("h",.18)},elements:[{kind:"path",defaultJoin:"round",fillRule:"evenodd",clipRule:"evenodd",commands:[{type:"M",x:"rightOuterX",y:"cy"},{type:"A",rx:"outerX",ry:"outerY",rotation:0,largeArc:true,sweep:true,x:"leftOuterX",y:"cy"},{type:"A",rx:"outerX",ry:"outerY",rotation:0,largeArc:true,sweep:true,x:"rightOuterX",y:"cy"},{type:"Z"},{type:"M",x:"rightInnerX",y:"cy"},{type:"A",rx:"innerX",ry:"innerY",rotation:0,largeArc:true,sweep:false,x:"leftInnerX",y:"cy"},{type:"A",rx:"innerX",ry:"innerY",rotation:0,largeArc:true,sweep:false,x:"rightInnerX",y:"cy"},{type:"Z"}]}]},arc:{guides:Ar(162e5,0),elements:[{kind:"path",fill:"none",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"y1"},{type:"A",rx:"rx",ry:"ry",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"x2",y:"y2"}]}]},leftCircularArrow:{guides:[c("adj1",21e3),c("adj2",-24e5),c("adj3",132e5),c("adj4",12e5),c("adj5",2e3),c("a1",R(0,"adj1",25e3)),c("a5",R(0,"adj5",25e3)),c("band",b(p("ss","a1"),1e5)),c("tipExtend",b(p("ss","a5"),1e5)),c("stAng",R(0,"adj4",tr)),c("enAng",R(0,"adj3",tr)),c("rawSwAng",v("enAng","stAng")),c("swAng",he(Vt("rawSwAng",0),"rawSwAng",L("rawSwAng",Sn))),c("outerX",b("w",2)),c("outerY",b("h",2)),c("innerX",v("outerX","band")),c("innerY",v("outerY","band")),c("stDeg",b("stAng",Rt)),c("enDeg",b("enAng",Rt)),c("swDeg",b("swAng",Rt)),c("largeArcFlag",Vt("swDeg",180)),c("outerStartX",L("cx",Q("outerX","stDeg"))),c("outerStartY",L("cy",K("outerY","stDeg"))),c("outerEndX",L("cx",Q("outerX","enDeg"))),c("outerEndY",L("cy",K("outerY","enDeg"))),c("innerEndX",L("cx",Q("innerX","enDeg"))),c("innerEndY",L("cy",K("innerY","enDeg"))),c("innerStartX",L("cx",Q("innerX","stDeg"))),c("innerStartY",L("cy",K("innerY","stDeg"))),c("tipAng",L("enAng","adj2")),c("tipDeg",b("tipAng",Rt)),c("tipRx",L("outerX","tipExtend")),c("tipRy",L("outerY","tipExtend")),c("tipX",L("cx",Q("tipRx","tipDeg"))),c("tipY",L("cy",K("tipRy","tipDeg")))],textBounds:{left:p("w",.18),top:p("h",.2),right:p("w",.18),bottom:p("h",.18)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"outerStartX",y:"outerStartY"},{type:"A",rx:"outerX",ry:"outerY",rotation:0,largeArc:"largeArcFlag",sweep:true,x:"outerEndX",y:"outerEndY"},{type:"L",x:"innerEndX",y:"innerEndY"},{type:"A",rx:"innerX",ry:"innerY",rotation:0,largeArc:"largeArcFlag",sweep:false,x:"innerStartX",y:"innerStartY"},{type:"Z"}]},{kind:"polygon",defaultJoin:"round",lineJoin:"round",points:[{x:"outerEndX",y:"outerEndY"},{x:"tipX",y:"tipY"},{x:"innerEndX",y:"innerEndY"}]}]},curvedRightArrow:{guides:Nc(),elements:[{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"r",y:"t"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"l",y:"hR"},{type:"L",x:"l",y:"y3"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"r",y:"th"},{type:"Z"}]},{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"hR"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"x1",y:"y5"},{type:"L",x:"x1",y:"y4"},{type:"L",x:"r",y:"y6"},{type:"L",x:"x1",y:"b"},{type:"L",x:"x1",y:"y8"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"l",y:"y3"},{type:"Z"}]}]},curvedLeftArrow:{guides:$c(),elements:[{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"y6"},{type:"L",x:"x1",y:"y4"},{type:"L",x:"x1",y:"y5"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"outerX",y:"hR"},{type:"L",x:"outerX",y:"innerY"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"curveEndX",y:"curveEndY"},{type:"L",x:"x1",y:"b"},{type:"Z"}]},{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"t"},{type:"A",rx:"w",ry:"hR",sweep:true,x:"outerX",y:"hR"},{type:"L",x:"outerX",y:"innerY"},{type:"A",rx:"w",ry:"hR",sweep:false,x:"l",y:"th"},{type:"Z"}]}]},curvedUpArrow:{guides:Ic(),elements:[{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"headOuterX",y:"t"},{type:"L",x:"headBaseX",y:"th"},{type:"L",x:"headJoinX",y:"th"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"arcX",y:"h"},{type:"L",x:"bandX",y:"h"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"rightArcEndX",y:"th"},{type:"L",x:"w",y:"th"},{type:"Z"}]},{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"th",y:"t"},{type:"L",x:"l",y:"t"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"arcX",y:"h"},{type:"L",x:"bandX",y:"h"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"th",y:"t"},{type:"Z"}]}]},curvedDownArrow:{guides:Bc(),elements:[{kind:"path",fill:"darkenLess",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"l",y:"b"},{type:"L",x:"th",y:"b"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"bandX",y:"t"},{type:"L",x:"arcX",y:"t"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"l",y:"b"},{type:"Z"}]},{kind:"path",defaultJoin:"round",lineJoin:"round",stroke:"none",applyLineStyles:false,commands:[{type:"M",x:"headOuterX",y:"b"},{type:"L",x:"headBaseX",y:"barY"},{type:"L",x:"headJoinX",y:"barY"},{type:"A",rx:"arcX",ry:"h",sweep:false,x:"arcX",y:"t"},{type:"L",x:"bandX",y:"t"},{type:"A",rx:"arcX",ry:"h",sweep:true,x:"rightArcEndX",y:"barY"},{type:"L",x:"w",y:"barY"},{type:"Z"}]}]},smileyFace:{textBounds:{left:p("w",.14),top:p("h",.18),right:p("w",.14),bottom:p("h",.16)},guides:[c("adj",4653),c("a",R(-4653,"adj",4653)),c("rx",b("w",2)),c("ry",b("h",2)),c("eyeRadius",p("ss",1125/21600)),c("leftEyeX",p("w",6215/21600)),c("rightEyeX",p("w",13135/21600)),c("eyeY",p("h",7570/21600)),c("smileStartX",p("w",4969/21699)),c("smileBaseY",p("h",16515/21600)),c("mouthOffset",b(p("h","a"),1e5)),c("smileStartY",v("smileBaseY","mouthOffset")),c("smileEndX",p("w",16640/21600)),c("smileEndY","smileStartY"),c("smileArcLift",b(p("h","a"),5e4)),c("smileControlX",b("w",2)),c("smileControlY",L(L("smileBaseY","mouthOffset"),"smileArcLift"))],elements:[{kind:"ellipse",defaultJoin:"round",cx:"cx",cy:"cy",rx:"rx",ry:"ry"},{kind:"circle",fill:"stroke",stroke:"none",applyLineStyles:false,cx:"leftEyeX",cy:"eyeY",r:"eyeRadius"},{kind:"circle",fill:"stroke",stroke:"none",applyLineStyles:false,cx:"rightEyeX",cy:"eyeY",r:"eyeRadius"},{kind:"path",fill:"none",minStrokeWidth:2,lineCap:"round",lineJoin:"round",applyLineStyles:false,applyDashPattern:true,commands:[{type:"M",x:"smileStartX",y:"smileStartY"},{type:"Q",x1:"smileControlX",y1:"smileControlY",x:"smileEndX",y:"smileEndY"}]}]},frame:{guides:[c("adj1",12500),c("a1",R(0,"adj1",5e4)),c("x1",b(p("ss","a1"),1e5)),c("x4",v("r","x1")),c("y4",v("b","x1"))],elements:[{kind:"path",defaultJoin:"round",fillRule:"evenodd",clipRule:"evenodd",commands:[{type:"M",x:0,y:0},{type:"H",x:"w"},{type:"V",y:"h"},{type:"H",x:0},{type:"Z"},{type:"M",x:"x1",y:"x1"},{type:"V",y:"y4"},{type:"H",x:"x4"},{type:"V",y:"x1"},{type:"Z"}]}]},halfFrame:{guides:[c("adj1",33333),c("adj2",33333),c("maxAdj2",b(p(1e5,"w"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("x1",b(p("ss","a2"),1e5)),c("g1",b(p("h","x1"),"w")),c("g2",v("h","g1")),c("maxAdj1",b(p(1e5,"g2"),"ss")),c("a1",R(0,"adj1","maxAdj1")),c("y1",b(p("ss","a1"),1e5)),c("dx2",b(p("y1","w"),"h")),c("x2",v("r","dx2")),c("dy2",b(p("x1","h"),"w")),c("y2",v("b","dy2"))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"l",y:"t"},{type:"L",x:"r",y:"t"},{type:"L",x:"x2",y:"y1"},{type:"L",x:"x1",y:"y1"},{type:"L",x:"x1",y:"y2"},{type:"L",x:"l",y:"b"},{type:"Z"}]}]},corner:{guides:[c("innerX",p("w",.425834)),c("innerY",p("h",.66162))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:0,y:0},{type:"L",x:"innerX",y:0},{type:"L",x:"innerX",y:"innerY"},{type:"L",x:"w",y:"innerY"},{type:"L",x:"w",y:"h"},{type:"L",x:0,y:"h"},{type:"Z"}]}]},diagStripe:{guides:[c("insetX",p("w",.40909)),c("insetY",p("h",.40909))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"insetX",y:0},{type:"L",x:"w",y:0},{type:"L",x:0,y:"h"},{type:"L",x:0,y:"insetY"},{type:"Z"}]}]},plus:{guides:[c("adj",25e3),c("a",R(0,"adj",5e4)),c("armInset",b(p("ss","a"),1e5)),c("armX1","armInset"),c("armX2",v("w","armInset")),c("armY1","armInset"),c("armY2",v("h","armInset"))],elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"armX1",y:0},{type:"L",x:"armX2",y:0},{type:"L",x:"armX2",y:"armY1"},{type:"L",x:"w",y:"armY1"},{type:"L",x:"w",y:"armY2"},{type:"L",x:"armX2",y:"armY2"},{type:"L",x:"armX2",y:"h"},{type:"L",x:"armX1",y:"h"},{type:"L",x:"armX1",y:"armY2"},{type:"L",x:0,y:"armY2"},{type:"L",x:0,y:"armY1"},{type:"L",x:"armX1",y:"armY1"},{type:"Z"}]}]},noSmoking:{guides:[c("adj",18750),c("a",R(0,"adj",5e4)),c("dr",b(p("ss","a"),1e5)),c("iwd2",v("wd2","dr")),c("ihd2",v("hd2","dr")),c("ang",Te("w","h")),c("angDeg",b("ang",Rt)),c("ct",Q("ihd2","angDeg")),c("st",K("iwd2","angDeg")),c("m",Qe("ct","st",0)),c("n",b(p("iwd2","ihd2"),"m")),c("drd2",b("dr",2)),c("dang",Te("n","drd2")),c("2dang",L("dang","dang")),c("swAng",L(v(0,"cd2"),"2dang")),c("t3",Te("w","h")),c("stAng1",v("t3","dang")),c("stAng2",v("stAng1","cd2")),c("stAng1Deg",b("stAng1",Rt)),c("ct1",Q("ihd2","stAng1Deg")),c("st1",K("iwd2","stAng1Deg")),c("m1",Qe("ct1","st1",0)),c("n1",b(p("iwd2","ihd2"),"m1")),c("dx1",Q("n1","stAng1Deg")),c("dy1",K("n1","stAng1Deg")),c("x1",L("hc","dx1")),c("y1",L("vc","dy1")),c("x2",v("hc","dx1")),c("y2",v("vc","dy1")),c("idx",Q("wd2",b(27e5,Rt))),c("idy",K("hd2",b(27e5,Rt))),c("il",v("hc","idx")),c("ir",L("hc","idx")),c("it",v("vc","idy")),c("ib",L("vc","idy"))],textBounds:{left:"il",top:"it",right:v("w","ir"),bottom:v("h","ib")},elements:[{kind:"path",fillRule:"evenodd",clipRule:"evenodd",commands:[{type:"M",x:"l",y:"vc"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:"cd2",sweepAngle:"cd4"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:"3cd4",sweepAngle:"cd4"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:0,sweepAngle:"cd4"},{type:"OA",rx:"wd2",ry:"hd2",startAngle:"cd4",sweepAngle:"cd4"},{type:"Z"},{type:"M",x:"x1",y:"y1"},{type:"OA",rx:"iwd2",ry:"ihd2",startAngle:"stAng1",sweepAngle:"swAng"},{type:"Z"},{type:"M",x:"x2",y:"y2"},{type:"OA",rx:"iwd2",ry:"ihd2",startAngle:"stAng2",sweepAngle:"swAng"},{type:"Z"}]}]},bevel:{guides:[c("adj",12500),c("a",R(0,"adj",5e4)),c("x1",b(p("ss","a"),1e5)),c("x2",v("r","x1")),c("y2",v("b","x1"))],textBounds:{left:"x1",top:"x1",right:"x1",bottom:v("h","y2")},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"x1",y:"x1"},{type:"L",x:"x2",y:"x1"},{type:"L",x:"x2",y:"y2"},{type:"L",x:"x1",y:"y2"},{type:"Z"}]},{kind:"path",fill:"lightenLess",defaultJoin:"round",commands:[{type:"M",x:"l",y:"t"},{type:"L",x:"r",y:"t"},{type:"L",x:"x2",y:"x1"},{type:"L",x:"x1",y:"x1"},{type:"Z"}]},{kind:"path",fill:"darken",defaultJoin:"round",commands:[{type:"M",x:"l",y:"b"},{type:"L",x:"x1",y:"y2"},{type:"L",x:"x2",y:"y2"},{type:"L",x:"r",y:"b"},{type:"Z"}]},{kind:"path",fill:"lighten",defaultJoin:"round",commands:[{type:"M",x:"l",y:"t"},{type:"L",x:"x1",y:"x1"},{type:"L",x:"x1",y:"y2"},{type:"L",x:"l",y:"b"},{type:"Z"}]},{kind:"path",fill:"darken",defaultJoin:"round",commands:[{type:"M",x:"r",y:"t"},{type:"L",x:"x2",y:"x1"},{type:"L",x:"x2",y:"y2"},{type:"L",x:"r",y:"b"},{type:"Z"}]}]},chevron:{guides:[c("adj",5e4),c("maxAdj",b(p(1e5,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x1",b(p("ss","a"),1e5)),c("x2",v("w","x1"))],textBounds:{left:"x1",top:p("h",.12),right:v("w","x2"),bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:0},{x:"x2",y:0},{x:"w",y:"cy"},{x:"x2",y:"h"},{x:0,y:"h"},{x:"x1",y:"cy"}]}]},parallelogram:{guides:[c("adj",25e3),c("maxAdj",b(p(1e5,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x2",b(p("ss","a"),1e5)),c("x5",v("w","x2"))],textBounds:{left:"x2",top:p("h",.12),right:"x2",bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"h"},{x:"x2",y:0},{x:"w",y:0},{x:"x5",y:"h"}]}]},trapezoid:{guides:[c("adj",25e3),c("maxAdj",b(p(5e4,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x2",b(p("ss","a"),1e5)),c("x3",v("w","x2"))],textBounds:{left:"x2",top:p("h",.12),right:"x2",bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"h"},{x:"x2",y:0},{x:"x3",y:0},{x:"w",y:"h"}]}]},hexagon:{guides:[c("adj",25e3),c("vf",115470),c("maxAdj",b(p(5e4,"w"),"ss")),c("a",R(0,"adj","maxAdj")),c("x1",b(p("ss","a"),1e5)),c("x2",v("w","x1")),c("vr",b(p("cy","vf"),1e5)),c("yInset",K("vr",120)),c("y1",v("cy","yInset")),c("y2",L("cy","yInset"))],textBounds:{left:"x1",top:"y1",right:"x1",bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"cy"},{x:"x1",y:"y1"},{x:"x2",y:"y1"},{x:"w",y:"cy"},{x:"x2",y:"y2"},{x:"x1",y:"y2"}]}]},heptagon:kr(7,-90),triangle:{guides:[c("adj",5e4),c("a",R(0,"adj",1e5)),c("x2",b(p("w","a"),1e5))],textBounds:{left:p("w",.16),top:p("h",.3),right:p("w",.16),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"h"},{x:"x2",y:0},{x:"w",y:"h"}]}]},pentagon:{guides:[c("y1",p("h",.3819660113)),c("x2",p("w",.1909830056)),c("x3",p("w",.8090169944))],textBounds:{left:"x2",top:"y1",right:v("w","x3"),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"y1"},{x:"cx",y:0},{x:"w",y:"y1"},{x:"x3",y:"h"},{x:"x2",y:"h"}]}]},octagon:{guides:[c("adj",29289),c("a",R(0,"adj",5e4)),c("x1",b(p("ss","a"),1e5)),c("x2",v("w","x1")),c("y2",v("h","x1"))],textBounds:{left:b("x1",2),top:b("x1",2),right:b("x1",2),bottom:b("x1",2)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:"x1"},{x:"x1",y:0},{x:"x2",y:0},{x:"w",y:"x1"},{x:"w",y:"y2"},{x:"x2",y:"h"},{x:"x1",y:"h"},{x:0,y:"y2"}]}]},decagon:kr(10,-90),dodecagon:kr(12,-90),diamond:{textBounds:{left:p("w",.18),top:p("h",.16),right:p("w",.18),bottom:p("h",.16)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:"cx",y:0},{x:"w",y:"cy"},{x:"cx",y:"h"},{x:0,y:"cy"}]}]},rtTriangle:{textBounds:{left:p("w",.16),top:p("h",.28),right:p("w",.16),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:0,y:0},{x:"w",y:"h"},{x:0,y:"h"}]}]},star5:{guides:[c("adj",19098),c("a",R(0,"adj",5e4)),c("innerRx",b(p("cx","a"),5e4)),c("innerRy",b(p("cy","a"),5e4))],textBounds:{left:p("w",.24),top:p("h",.22),right:p("w",.24),bottom:p("h",.26)},elements:[{kind:"polygon",defaultJoin:"round",points:[{x:L("cx",Q("cx",-90)),y:L("cy",K("cy",-90))},{x:L("cx",Q("innerRx",-54)),y:L("cy",K("innerRy",-54))},{x:L("cx",Q("cx",-18)),y:L("cy",K("cy",-18))},{x:L("cx",Q("innerRx",18)),y:L("cy",K("innerRy",18))},{x:L("cx",Q("cx",54)),y:L("cy",K("cy",54))},{x:L("cx",Q("innerRx",90)),y:L("cy",K("innerRy",90))},{x:L("cx",Q("cx",126)),y:L("cy",K("cy",126))},{x:L("cx",Q("innerRx",162)),y:L("cy",K("innerRy",162))},{x:L("cx",Q("cx",198)),y:L("cy",K("cy",198))},{x:L("cx",Q("innerRx",234)),y:L("cy",K("innerRy",234))}]}]},teardrop:{guides:[c("adj",1e5),c("a",R(0,"adj",2e5)),c("tipDx",b(p("w","a"),2e5)),c("tipDy",b(p("h","a"),2e5)),c("tipX",L("cx","tipDx")),c("tipY",v("cy","tipDy")),c("topCtrlX",L("cx",b("tipDx",2))),c("rightCtrlY",v("cy",b("tipDy",2)))],textBounds:{left:p("w",.146447),top:p("h",.277228),right:p("w",.146447),bottom:p("h",.277228)},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"w",y:"cy"},{type:"A",rx:"cx",ry:"cy",rotation:0,largeArc:true,sweep:true,x:"cx",y:0},{type:"Q",x1:"topCtrlX",y1:0,x:"tipX",y:"tipY"},{type:"Q",x1:"w",y1:"rightCtrlY",x:"w",y:"cy"}]}]},homePlate:{guides:[c("adj",5e4),c("a",R(0,"adj",1e5)),c("depth",b(p("h","a"),1e5)),c("x1",v("w","depth"))],textBounds:{left:p("w",.08),top:p("h",.12),right:v("w","x1"),bottom:p("h",.12)},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:0},{x:"x1",y:0},{x:"w",y:"cy"},{x:"x1",y:"h"},{x:0,y:"h"}]}]},rightArrow:{guides:[c("adj1",47500),c("adj2",26e3),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("headDepth",Jt(b(p("w",R(0,"adj2",1e5)),1e5),"hd2")),c("headStart",v("w","headDepth")),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:p("w",.08),top:"y1",right:v("w","headStart"),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:"y1"},{x:"headStart",y:"y1"},{x:"headStart",y:0},{x:"w",y:"cy"},{x:"headStart",y:"h"},{x:"headStart",y:"y2"},{x:0,y:"y2"}]}]},notchedRightArrow:{guides:[c("adj1",5e4),c("adj2",2e4),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("headStart",v("w",b(p("w",R(0,"adj2",1e5)),1e5))),c("notchX",Jt("shaftInset",v("headStart",1))),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:p("w",.08),top:"y1",right:v("w","headStart"),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:"y1"},{x:"headStart",y:"y1"},{x:"headStart",y:0},{x:"w",y:"cy"},{x:"headStart",y:"h"},{x:"headStart",y:"y2"},{x:0,y:"y2"},{x:"notchX",y:"cy"}]}]},leftArrow:{guides:[c("adj1",5e4),c("adj2",26e3),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("headEnd",Jt(b(p("w",R(0,"adj2",1e5)),1e5),"hd2")),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:"headEnd",top:"y1",right:p("w",.08),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"w",y:"y1"},{x:"headEnd",y:"y1"},{x:"headEnd",y:0},{x:0,y:"cy"},{x:"headEnd",y:"h"},{x:"headEnd",y:"y2"},{x:"w",y:"y2"}]}]},leftRightArrow:{guides:[c("adj1",5e4),c("adj2",24e3),c("shaftInset",b(p("h",R(0,"adj1",1e5)),2e5)),c("sideInsetRaw",b(p("w",R(0,"adj2",5e4)),1e5)),c("sideInset",Jt("sideInsetRaw","hd2")),c("rightInset",v("w","sideInset")),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:"sideInset",top:"y1",right:"sideInset",bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"sideInset",y:"y1"},{x:"rightInset",y:"y1"},{x:"rightInset",y:0},{x:"w",y:"cy"},{x:"rightInset",y:"h"},{x:"rightInset",y:"y2"},{x:"sideInset",y:"y2"},{x:"sideInset",y:"h"},{x:0,y:"cy"},{x:"sideInset",y:0}]}]},upArrow:{guides:[c("adj1",5e4),c("adj2",25e3),c("shaftLeft",b(p("w",R(0,"adj1",1e5)),2e5)),c("shaftRight",v("w","shaftLeft")),c("headBaseYRaw",b(p("h",R(0,"adj2",1e5)),1e5)),c("headBaseY",Jt("headBaseYRaw","wd2"))],textBounds:{left:"shaftLeft",top:"headBaseY",right:v("w","shaftRight"),bottom:p("h",.08)},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"shaftLeft",y:"headBaseY"},{x:"shaftLeft",y:"h"},{x:"shaftRight",y:"h"},{x:"shaftRight",y:"headBaseY"},{x:"w",y:"headBaseY"},{x:"cx",y:0},{x:0,y:"headBaseY"}]}]},downArrow:{guides:[c("adj1",5e4),c("adj2",75e3),c("shaftLeft",b(p("w",R(0,"adj1",1e5)),2e5)),c("shaftRight",v("w","shaftLeft")),c("headBaseYRaw",b(p("h",R(0,"adj2",1e5)),1e5)),c("headBaseY",Jt("headBaseYRaw",v("h",1)))],textBounds:{left:"shaftLeft",top:p("h",.08),right:v("w","shaftRight"),bottom:v("h","headBaseY")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"shaftLeft",y:0},{x:"shaftLeft",y:"headBaseY"},{x:0,y:"headBaseY"},{x:"cx",y:"h"},{x:"w",y:"headBaseY"},{x:"shaftRight",y:"headBaseY"},{x:"shaftRight",y:0}]}]},quadArrow:{guides:[c("adj1",22500),c("adj2",22500),c("adj3",22500),c("shaftHalf",b(p("ss",R(0,"adj2",5e4)),1e5)),c("maxArmHalf",b(v(1e5,p(R(0,"adj2",5e4),2)),2)),c("armHalf",b(p("ss",R(0,"adj1",L(R(0,"adj2",5e4),R(0,"adj2",5e4)))),2e5)),c("headInset",b(p("ss",R(0,"adj3","maxArmHalf")),1e5)),c("armX1",v("cx","armHalf")),c("armX2",L("cx","armHalf")),c("shaftX1",v("cx","shaftHalf")),c("shaftX2",L("cx","shaftHalf")),c("armY1",v("cy","armHalf")),c("armY2",L("cy","armHalf")),c("shaftY1",v("cy","shaftHalf")),c("shaftY2",L("cy","shaftHalf")),c("headRightX",v("w","headInset")),c("headBottomY",v("h","headInset")),c("textInsetX",b(p("armHalf","headInset"),le("shaftHalf",1)))],textBounds:{left:"textInsetX",top:"armY1",right:v("w",v("w","textInsetX")),bottom:v("h","armY2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:0,y:"cy"},{x:"headInset",y:"shaftY1"},{x:"headInset",y:"armY1"},{x:"armX1",y:"armY1"},{x:"armX1",y:"headInset"},{x:"shaftX1",y:"headInset"},{x:"cx",y:0},{x:"shaftX2",y:"headInset"},{x:"armX2",y:"headInset"},{x:"armX2",y:"armY1"},{x:"headRightX",y:"armY1"},{x:"headRightX",y:"shaftY1"},{x:"w",y:"cy"},{x:"headRightX",y:"shaftY2"},{x:"headRightX",y:"armY2"},{x:"armX2",y:"armY2"},{x:"armX2",y:"headBottomY"},{x:"shaftX2",y:"headBottomY"},{x:"cx",y:"h"},{x:"shaftX1",y:"headBottomY"},{x:"armX1",y:"headBottomY"},{x:"armX1",y:"armY2"},{x:"headInset",y:"armY2"},{x:"headInset",y:"shaftY2"}]}]},leftRightUpArrow:{guides:[c("sideHeadInset",p("w",28.35/175)),c("sideShoulderY",p("h",69.3/126)),c("topHeadBaseY",p("h",28.35/126)),c("topHeadInnerLeft",p("w",59.15/175)),c("shaftLeft",p("w",73.325/175)),c("shaftRight",p("w",101.675/175)),c("topHeadInnerRight",p("w",115.85/175)),c("barRight",p("w",146.65/175)),c("barTop",p("h",83.475/126)),c("barMid",p("h",97.65/126)),c("barBottom",p("h",111.825/126))],textBounds:{left:p("w",.2),top:"topHeadBaseY",right:p("w",.2),bottom:v("h","barBottom")},elements:[{kind:"path",defaultJoin:"round",coerceMiterJoin:"round",commands:[{type:"M",x:"l",y:"barMid"},{type:"L",x:"sideHeadInset",y:"sideShoulderY"},{type:"L",x:"sideHeadInset",y:"barTop"},{type:"L",x:"shaftLeft",y:"barTop"},{type:"L",x:"shaftLeft",y:"topHeadBaseY"},{type:"L",x:"topHeadInnerLeft",y:"topHeadBaseY"},{type:"L",x:"hc",y:"t"},{type:"L",x:"topHeadInnerRight",y:"topHeadBaseY"},{type:"L",x:"shaftRight",y:"topHeadBaseY"},{type:"L",x:"shaftRight",y:"barTop"},{type:"L",x:"barRight",y:"barTop"},{type:"L",x:"barRight",y:"sideShoulderY"},{type:"L",x:"r",y:"barMid"},{type:"L",x:"barRight",y:"b"},{type:"L",x:"barRight",y:"barBottom"},{type:"L",x:"sideHeadInset",y:"barBottom"},{type:"L",x:"sideHeadInset",y:"b"},{type:"Z"}]}]},bentArrow:{guides:[c("adj1",26e3),c("adj2",42e3),c("adj3",18e3),c("a1",R(12e3,"adj1",38e3)),c("a2",R(26e3,"adj2",76e3)),c("a3",R(16e3,"adj3",42e3)),c("th",b(p("ss","a1"),1e5)),c("headLen",b(p("ss","a3"),1e5)),c("shaftEndX",le(L("th",1),v("w","headLen"))),c("bendRaw",b(p("ss","a2"),1e5)),c("bend",Jt("bendRaw",v("shaftEndX",1),v("h",1))),c("topGap",le(b("th",2),p("ss",.1))),c("inner",le(v(v("bend","th"),"topGap"),1)),c("headH",le(L("th",p("th",.12)),p("ss",.24))),c("headHalf",b("headH",2)),c("headMid",L("topGap","headHalf")),c("headBottom",L("topGap","headH")),c("innerArcStartX",L("th","topGap"))],textBounds:{left:p("w",.08),top:p("h",.18),right:p("w",.22),bottom:p("h",.18)},elements:[{kind:"path",defaultJoin:"round",coerceMiterJoin:"round",commands:[{type:"M",x:"w",y:"headMid"},{type:"L",x:"shaftEndX",y:"topGap"},{type:"L",x:"bend",y:"topGap"},{type:"OA",rx:v("bend","topGap"),ry:v("bend","topGap"),startAngle:"3cd4",sweepAngle:-54e5},{type:"L",x:0,y:"bend"},{type:"L",x:0,y:"h"},{type:"L",x:"th",y:"h"},{type:"L",x:"th",y:"bend"},{type:"L",x:"innerArcStartX",y:"bend"},{type:"OA",rx:"inner",ry:"inner",startAngle:"cd2",sweepAngle:"cd4"},{type:"L",x:"shaftEndX",y:L("topGap","th")},{type:"L",x:"shaftEndX",y:"headBottom"},{type:"Z"}]}]},uturnArrow:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",3e4),c("adj4",45e3),c("adj5",45e3),c("a2",R(0,"adj2",25e3)),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("q2",b(p("a1","ss"),"h")),c("q3",v(1e5,"q2")),c("maxAdj3",b(p("q3","h"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("q1",L("a3","a1")),c("minAdj5",b(p("q1","ss"),"h")),c("a5",R("minAdj5","adj5",1e5)),c("th",b(p("ss","a1"),1e5)),c("aw2",b(p("ss","a2"),1e5)),c("th2",b("th",2)),c("dh2",v("aw2","th2")),c("y5",b(p("h","a5"),1e5)),c("ah",b(p("ss","a3"),1e5)),c("y4",v("y5","ah")),c("x9",v("r","dh2")),c("bw",b("x9",2)),c("bs",Jt("bw","y4")),c("maxAdj4",b(p("bs",1e5),"ss")),c("a4",R(0,"adj4","maxAdj4")),c("bd",b(p("ss","a4"),1e5)),c("bd3",v("bd","th")),c("bd2",le("bd3",0)),c("x3",L("th","bd2")),c("x8",v("r","aw2")),c("x6",v("x8","aw2")),c("x7",L("x6","dh2")),c("x4",v("x9","bd")),c("x5",v("x7","bd2"))],elements:[{kind:"path",defaultJoin:"round",coerceMiterJoin:"round",commands:[{type:"M",x:"l",y:"b"},{type:"L",x:"l",y:"bd"},{type:"OA",rx:"bd",ry:"bd",startAngle:"cd2",sweepAngle:"cd4"},{type:"L",x:"x4",y:"t"},{type:"OA",rx:"bd",ry:"bd",startAngle:"3cd4",sweepAngle:"cd4"},{type:"L",x:"x9",y:"y4"},{type:"L",x:"r",y:"y4"},{type:"L",x:"x8",y:"y5"},{type:"L",x:"x6",y:"y4"},{type:"L",x:"x7",y:"y4"},{type:"L",x:"x7",y:"x3"},{type:"OA",rx:"bd2",ry:"bd2",startAngle:0,sweepAngle:-54e5},{type:"L",x:"x3",y:"th"},{type:"OA",rx:"bd2",ry:"bd2",startAngle:"3cd4",sweepAngle:-54e5},{type:"L",x:"th",y:"b"},{type:"Z"}]}]},leftUpArrow:{guides:[c("sideX",p("w",.25)),c("headBaseY",p("h",29.25/123)),c("armY",p("h",64.5/123)),c("barY",p("h",79.125/123)),c("leftShoulderY",p("h",93.75/123)),c("bodyBottomY",p("h",108.375/123)),c("shaftLeft",p("w",.625)),c("headLeft",p("w",.5)),c("headTipX",p("w",.75)),c("shaftRight",p("w",.875))],textBounds:{left:"sideX",top:"barY",right:v("w","shaftRight"),bottom:v("h","bodyBottomY")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"leftShoulderY"},{x:"sideX",y:"armY"},{x:"sideX",y:"barY"},{x:"shaftLeft",y:"barY"},{x:"shaftLeft",y:"headBaseY"},{x:"headLeft",y:"headBaseY"},{x:"headTipX",y:"t"},{x:"r",y:"headBaseY"},{x:"shaftRight",y:"headBaseY"},{x:"shaftRight",y:"bodyBottomY"},{x:"sideX",y:"bodyBottomY"},{x:"sideX",y:"b"}]}]},bentUpArrow:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",25e3),c("a1",R(0,"adj1",5e4)),c("a2",R(0,"adj2",5e4)),c("a3",R(0,"adj3",5e4)),c("y1",b(p("ss","a3"),1e5)),c("dx1",b(p("ss","a2"),5e4)),c("x1",v("r","dx1")),c("dx3",b(p("ss","a2"),1e5)),c("x3",v("r","dx3")),c("dx2",b(p("ss","a1"),2e5)),c("x2",v("x3","dx2")),c("x4",L("x3","dx2")),c("dy2",b(p("ss","a1"),1e5)),c("y2",v("b","dy2"))],textBounds:{left:"l",top:"y2",right:v("w","x4"),bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"y2"},{x:"x2",y:"y2"},{x:"x2",y:"y1"},{x:"x1",y:"y1"},{x:"x3",y:"t"},{x:"r",y:"y1"},{x:"x4",y:"y1"},{x:"x4",y:"b"},{x:"l",y:"b"}]}]},rightArrowCallout:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",25e3),c("adj4",64977),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("maxAdj3",b(p(1e5,"w"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("q2",b(p("a3","ss"),"w")),c("maxAdj4",v(1e5,"q2")),c("a4",R(0,"adj4","maxAdj4")),c("dy1",b(p("ss","a2"),1e5)),c("dy2",b(p("ss","a1"),2e5)),c("y1",v("vc","dy1")),c("y2",v("vc","dy2")),c("y3",L("vc","dy2")),c("y4",L("vc","dy1")),c("dx3",b(p("ss","a3"),1e5)),c("x3",v("r","dx3")),c("x2",b(p("w","a4"),1e5)),c("x1",b("x2",2))],textBounds:{left:"l",top:"t",right:v("w","x2"),bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"t"},{x:"x2",y:"t"},{x:"x2",y:"y2"},{x:"x3",y:"y2"},{x:"x3",y:"y1"},{x:"r",y:"vc"},{x:"x3",y:"y4"},{x:"x3",y:"y3"},{x:"x2",y:"y3"},{x:"x2",y:"b"},{x:"l",y:"b"}]}]},leftArrowCallout:{guides:[c("headRight",p("w",22/120)),c("bodyLeft",p("w",42.028/120)),c("headTop",p("h",22/88)),c("shaftTop",p("h",33/88)),c("shaftBottom",p("h",55/88)),c("headBottom",p("h",66/88))],textBounds:{left:"bodyLeft",top:"t",right:"l",bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"vc"},{x:"headRight",y:"headTop"},{x:"headRight",y:"shaftTop"},{x:"bodyLeft",y:"shaftTop"},{x:"bodyLeft",y:0},{x:"r",y:0},{x:"r",y:"b"},{x:"bodyLeft",y:"b"},{x:"bodyLeft",y:"shaftBottom"},{x:"headRight",y:"shaftBottom"},{x:"headRight",y:"headBottom"}]}]},leftRightArrowCallout:{guides:[c("adj1",25e3),c("adj2",25e3),c("adj3",25e3),c("adj4",48123),c("maxAdj2",b(p(5e4,"h"),"ss")),c("a2",R(0,"adj2","maxAdj2")),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("maxAdj3",b(p(5e4,"w"),"ss")),c("a3",R(0,"adj3","maxAdj3")),c("q2",b(p("a3","ss"),"wd2")),c("maxAdj4",v(1e5,"q2")),c("a4",R(0,"adj4","maxAdj4")),c("dy1",b(p("ss","a2"),1e5)),c("dy2",b(p("ss","a1"),2e5)),c("y1",v("vc","dy1")),c("y2",v("vc","dy2")),c("y3",L("vc","dy2")),c("y4",L("vc","dy1")),c("x1",b(p("ss","a3"),1e5)),c("x4",v("r","x1")),c("dx2",b(p("w","a4"),2e5)),c("x2",v("hc","dx2")),c("x3",L("hc","dx2"))],textBounds:{left:"x2",top:"t",right:v("w","x3"),bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"vc"},{x:"x1",y:"y1"},{x:"x1",y:"y2"},{x:"x2",y:"y2"},{x:"x2",y:"t"},{x:"x3",y:"t"},{x:"x3",y:"y2"},{x:"x4",y:"y2"},{x:"x4",y:"y1"},{x:"r",y:"vc"},{x:"x4",y:"y4"},{x:"x4",y:"y3"},{x:"x3",y:"y3"},{x:"x3",y:"b"},{x:"x2",y:"b"},{x:"x2",y:"y3"},{x:"x1",y:"y3"},{x:"x1",y:"y4"}]}]},upArrowCallout:{guides:[c("bodyTop",p("h",29.76955/85)),c("neckTop",p("h",21.25/85)),c("shaftLeft",p("w",48.375/118)),c("shaftRight",p("w",69.625/118)),c("neckLeft",p("w",37.75/118)),c("neckRight",p("w",80.25/118))],textBounds:{left:"l",top:"bodyTop",right:"l",bottom:"t"},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"bodyTop"},{x:"shaftLeft",y:"bodyTop"},{x:"shaftLeft",y:"neckTop"},{x:"neckLeft",y:"neckTop"},{x:"hc",y:"t"},{x:"neckRight",y:"neckTop"},{x:"shaftRight",y:"neckTop"},{x:"shaftRight",y:"bodyTop"},{x:"r",y:"bodyTop"},{x:"r",y:"b"},{x:"l",y:"b"}]}]},quadArrowCallout:{guides:[c("adj1",18515),c("adj2",18515),c("adj3",18515),c("adj4",48123),c("a2",R(0,"adj2",5e4)),c("maxAdj1",p("a2",2)),c("a1",R(0,"adj1","maxAdj1")),c("maxAdj3",v(5e4,"a2")),c("a3",R(0,"adj3","maxAdj3")),c("q2",p("a3",2)),c("maxAdj4",v(1e5,"q2")),c("a4",R("a1","adj4","maxAdj4")),c("dx2",b(p("ss","a2"),1e5)),c("dx3",b(p("ss","a1"),2e5)),c("ah",b(p("ss","a3"),1e5)),c("dx1",b(p("w","a4"),2e5)),c("dy1",b(p("h","a4"),2e5)),c("x8",v("r","ah")),c("x2",v("hc","dx1")),c("x7",L("hc","dx1")),c("x3",v("hc","dx2")),c("x6",L("hc","dx2")),c("x4",v("hc","dx3")),c("x5",L("hc","dx3")),c("y8",v("b","ah")),c("y2",v("vc","dy1")),c("y7",L("vc","dy1")),c("y3",v("vc","dx2")),c("y6",L("vc","dx2")),c("y4",v("vc","dx3")),c("y5",L("vc","dx3"))],textBounds:{left:"x2",top:"y2",right:v("w","x7"),bottom:v("h","y7")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"l",y:"vc"},{x:"ah",y:"y3"},{x:"ah",y:"y4"},{x:"x2",y:"y4"},{x:"x2",y:"y2"},{x:"x4",y:"y2"},{x:"x4",y:"ah"},{x:"x3",y:"ah"},{x:"hc",y:"t"},{x:"x6",y:"ah"},{x:"x5",y:"ah"},{x:"x5",y:"y2"},{x:"x7",y:"y2"},{x:"x7",y:"y4"},{x:"x8",y:"y4"},{x:"x8",y:"y3"},{x:"r",y:"vc"},{x:"x8",y:"y6"},{x:"x8",y:"y5"},{x:"x7",y:"y5"},{x:"x7",y:"y7"},{x:"x5",y:"y7"},{x:"x5",y:"y8"},{x:"x6",y:"y8"},{x:"hc",y:"b"},{x:"x3",y:"y8"},{x:"x4",y:"y8"},{x:"x4",y:"y7"},{x:"x2",y:"y7"},{x:"x2",y:"y5"},{x:"ah",y:"y5"},{x:"ah",y:"y6"}]}]},stripedRightArrow:{guides:[c("stripeWidth",p("w",1.9375/157)),c("stripeGap",p("w",1.9375/157)),c("stripeX1",0),c("stripeX2",p("w",3.875/157)),c("bodyLeft",p("w",9.6875/157)),c("headStart",p("w",126/157)),c("shaftInset",p("h",.25)),c("y1","shaftInset"),c("y2",v("h","shaftInset"))],textBounds:{left:"bodyLeft",top:"y1",right:v("w","headStart"),bottom:v("h","y2")},elements:[{kind:"polygon",defaultJoin:"round",coerceMiterJoin:"round",points:[{x:"bodyLeft",y:"y1"},{x:"headStart",y:"y1"},{x:"headStart",y:0},{x:"w",y:"cy"},{x:"headStart",y:"h"},{x:"headStart",y:"y2"},{x:"bodyLeft",y:"y2"}]},{kind:"polygon",fill:"stroke",stroke:"none",applyLineStyles:false,points:[{x:"stripeX1",y:"y1"},{x:L("stripeX1","stripeWidth"),y:"y1"},{x:L("stripeX1","stripeWidth"),y:"y2"},{x:"stripeX1",y:"y2"}]},{kind:"polygon",fill:"stroke",stroke:"none",applyLineStyles:false,points:[{x:"stripeX2",y:"y1"},{x:L("stripeX2","stripeWidth"),y:"y1"},{x:L("stripeX2","stripeWidth"),y:"y2"},{x:"stripeX2",y:"y2"}]}]},cube:{guides:[c("adj",25e3),c("a",R(0,"adj",1e5)),c("y1",b(p("ss","a"),1e5)),c("y4",v("b","y1")),c("y2",b("y4",2)),c("y3",b(L("y1","b"),2)),c("x4",v("r","y1")),c("x2",b("x4",2)),c("x3",b(L("y1","r"),2))],textBounds:{left:"l",top:"y1",right:v("w","x4"),bottom:"t"},elements:[{kind:"path",defaultJoin:"round",commands:[{type:"M",x:"l",y:"y1"},{type:"L",x:"x4",y:"y1"},{type:"L",x:"x4",y:"b"},{type:"L",x:"l",y:"b"},{type:"Z"}]},{kind:"path",fill:"darken",defaultJoin:"round",commands:[{type:"M",x:"x4",y:"y1"},{type:"L",x:"r",y:"t"},{type:"L",x:"r",y:"y4"},{type:"L",x:"x4",y:"b"},{type:"Z"}]},{kind:"path",fill:"lightenLess",defaultJoin:"round",commands:[{type:"M",x:"l",y:"y1"},{type:"L",x:"y1",y:"t"},{type:"L",x:"r",y:"t"},{type:"L",x:"x4",y:"y1"},{type:"Z"}]}]}},Pc={left:0,top:0,right:0,bottom:0},Si={upDownArrow:{base:"leftRightArrow",swapAxes:true,transform:"rotate90"}};function Ai(t,e){const r=Si[t];if(r){const d=r.swapAxes?{...e,width:e.height,height:e.width}:e,l=Ai(r.base,d);if(!l)return;if(!r.transform)return l;const u=document.createElementNS("http://www.w3.org/2000/svg","g");return u.appendChild(l),u.setAttribute("transform",Oc(r.transform,e)),u}const n=Fi[t];if(!n)return;const a=Object.entries(e.adjustments??{}).map(([d,l])=>({name:d,value:l})),i=wi(e.width,e.height,[...n.guides??[],...a]),o=n.elements.map(d=>Hc(d,e,i));if(o.length===1)return o[0];const s=document.createElementNS("http://www.w3.org/2000/svg","g");for(const d of o)s.appendChild(d);return s}function ki(t,e){const r=Si[t];if(r){const o=r.swapAxes?{...e,width:e.height,height:e.width}:e,s=ki(r.base,o);return s?r.transform?Dc(s,r.transform,e.width,e.height):s:void 0}const n=Fi[t];if(!(n!=null&&n.textBounds))return;const a=Object.entries(e.adjustments??{}).map(([o,s])=>({name:o,value:s})),i=wi(e.width,e.height,[...n.guides??[],...a]);return{left:i.resolve(n.textBounds.left),top:i.resolve(n.textBounds.top),right:i.resolve(n.textBounds.right),bottom:i.resolve(n.textBounds.bottom)}}function Oc(t,e){switch(t){case"mirrorX":return`translate(${W(e.width)} 0) scale(-1 1)`;case"rotate90":return`translate(${W(e.width)} 0) rotate(90)`;case"rotate-90":return`translate(0 ${W(e.height)}) rotate(-90)`;default:return""}}function Dc(t,e,r,n){switch(e){case"mirrorX":return{left:t.right,top:t.top,right:t.left,bottom:t.bottom};case"rotate90":return{left:t.bottom,top:t.left,right:t.top,bottom:t.right};case"rotate-90":return{left:t.top,top:t.right,right:t.bottom,bottom:t.left};default:return Pc}}function Hc(t,e,r){const n=zc(t,r);return Uc(n,t,e,r),n}function zc(t,e){switch(t.kind){case"path":{const r=document.createElementNS("http://www.w3.org/2000/svg","path");return r.setAttribute("d",Ec(t.commands,e)),r}case"polygon":{const r=document.createElementNS("http://www.w3.org/2000/svg","polygon");return r.setAttribute("points",jc(t.points,e)),r}case"ellipse":{const r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",W(e.resolve(t.cx))),r.setAttribute("cy",W(e.resolve(t.cy))),r.setAttribute("rx",W(e.resolve(t.rx))),r.setAttribute("ry",W(e.resolve(t.ry))),r}case"circle":{const r=document.createElementNS("http://www.w3.org/2000/svg","circle");return r.setAttribute("cx",W(e.resolve(t.cx))),r.setAttribute("cy",W(e.resolve(t.cy))),r.setAttribute("r",W(e.resolve(t.r))),r}default:return document.createElementNS("http://www.w3.org/2000/svg","g")}}function Uc(t,e,r,n){var s,d;const a=da(e.fill,r),i=da(e.stroke??"stroke",r),o=Xc(e,r,n);if(t.setAttribute("fill",a),t.setAttribute("stroke",i),i!=="none"?t.setAttribute("stroke-width",String(o)):t.removeAttribute("stroke-width"),e.fillRule&&t.setAttribute("fill-rule",e.fillRule),e.clipRule&&t.setAttribute("clip-rule",e.clipRule),e.fillOpacity!=null){const l=a==="transparent"?0:e.fillOpacity;t.setAttribute("fill-opacity",W(l))}e.applyLineStyles!==false&&i!=="none"&&r.applyLineStyles(t,r.line,{defaultJoin:e.defaultJoin}),e.applyDashPattern&&(e.applyLineStyles===false||i==="none")&&r.applyDashPattern(t,r.line),e.lineCap&&t.setAttribute("stroke-linecap",e.lineCap),e.defaultJoin&&e.defaultJoin!=="miter"&&((s=r.line)==null?void 0:s.lineJoin)==="miter"&&t.setAttribute("stroke-linejoin",e.defaultJoin),e.coerceMiterJoin&&((d=r.line)==null?void 0:d.lineJoin)==="miter"&&t.setAttribute("stroke-linejoin",e.coerceMiterJoin),e.lineJoin&&t.setAttribute("stroke-linejoin",e.lineJoin)}function da(t,e){switch(t){case void 0:case"fill":return e.fill;case"lightenMore":return Fe(e.fill,"lightenMore");case"lighten":return Fe(e.fill,"lighten");case"lightenLess":return Fe(e.fill,"lightenLess");case"darken":return Fe(e.fill,"darken");case"darkenLess":return Fe(e.fill,"darkenLess");case"stroke":return e.stroke;case"none":return"none";default:return t}}function Fe(t,e){if(!/^#[0-9a-f]{6}$/i.test(t))return t;switch(e){case"lightenMore":return qe(t,.5);case"lighten":return qe(t,.42);case"lightenLess":return qe(t,.24);case"darken":return Rr(t,.62);case"darkenLess":return Rr(t,.8);default:return t}}function Xc(t,e,r){const n=t.strokeWidth!=null?r.resolve(t.strokeWidth):e.strokeWidth;return t.minStrokeWidth==null?n:Math.max(n,t.minStrokeWidth)}function Mt(t){return t.trim().replace(/^['"]+|['"]+$/g,"")}function Ut(t){const e=Mt(t);switch(e){case"\u7B49\u7EBF":return"DengXian";case"\u7B49\u7EBF Light":case"\u7B49\u7EBF light":return"DengXian Light";case"\u5B8B\u4F53":return"SimSun";case"\u9ED1\u4F53":return"SimHei";case"\u5FAE\u8F6F\u96C5\u9ED1":return"Microsoft YaHei";case"\u6977\u4F53":return"KaiTi";case"\u4EFF\u5B8B":return"FangSong";case"\u6E38\u30B4\u30B7\u30C3\u30AF":return"Yu Gothic";case"\u6E38\u30B4\u30B7\u30C3\u30AF Light":case"\u6E38\u30B4\u30B7\u30C3\u30AF light":return"Yu Gothic Light";case"\uB9D1\uC740 \uACE0\uB515":return"Malgun Gothic";default:return e}}function er(t){if(typeof t!="string"||!/^[\da-f]{20}$/i.test(t.trim()))return;const e=t.trim().match(/../g).map(r=>Number.parseInt(r,16));return e[0]>=2&&e[0]<=5?e:void 0}function Yc(t){const e=er(t);if(!e)return{};const r={panose:t.trim().toUpperCase()};if(r.style={2:"text",3:"handwriting",4:"decorative",5:"symbol"}[e[0]],e[0]!==5){const n={2:100,3:200,4:300,5:400,6:400,7:600,8:700,9:800,10:900,11:950};n[e[2]]&&(r.weight=n[e[2]])}if(e[0]===2){e[1]>=2&&e[1]<=10?r.serif=true:e[1]>=11&&e[1]<=15&&(r.serif=false),e[3]>=2&&e[3]<=9&&(r.monospace=e[3]===9);const n={5:125,6:75,7:150,8:62.5};n[e[3]]&&(r.stretch=n[e[3]])}return r}const qc=["Liberation Serif","Tinos","Times New Roman","Times","Noto Serif","Georgia","serif"],ua=["Arial","Liberation Sans","Arimo","Helvetica Neue","Noto Sans","sans-serif"],_c=["Cascadia Mono","Consolas","Liberation Mono","Courier New","Menlo","Noto Sans Mono","monospace"],Wc=["Segoe Print","Bradley Hand","Comic Sans MS","Chalkboard SE","cursive"],Jc=["Papyrus","Copperplate","fantasy"],pa=["Songti SC","SimSun","STSong","Noto Serif CJK SC","Source Han Serif SC","serif"],Vc=["PingFang SC","Microsoft YaHei","Noto Sans CJK SC","Source Han Sans SC","sans-serif"],ha={"cjk-sc":"Noto Sans Mono CJK SC","cjk-tc":"Noto Sans Mono CJK TC",japanese:"Noto Sans Mono CJK JP",korean:"Noto Sans Mono CJK KR"},Ti=new Map([["times new roman",["Liberation Serif","Tinos","Times"]],["arial",["Liberation Sans","Arimo"]],["courier new",["Liberation Mono","Cousine","Courier"]],["calibri",["Carlito"]],["cambria",["Caladea"]],["aptos",["Aptos","Calibri","Carlito"]]]),Gc=[[/^serif$/i,{serif:true,style:"text"}],[/^sans-serif$/i,{serif:false,style:"text"}],[/^monospace$/i,{monospace:true,style:"text"}],[/^cursive$/i,{style:"handwriting"}],[/^fantasy$/i,{style:"decorative"}],[/^(?:times new roman|times|georgia|cambria|caladea|tinos|liberation serif|palatino(?: linotype)?|book antiqua|garamond|baskerville|noto serif)$/i,{serif:true,monospace:false,style:"text",script:"latin"}],[/^(?:arial|helvetica(?: neue)?|calibri(?: light)?|carlito|aptos(?: display| narrow)?|segoe ui|verdana|tahoma|roboto|arimo|liberation sans|noto sans)$/i,{serif:false,monospace:false,style:"text",script:"latin"}],[/^(?:arial narrow|roboto condensed|noto sans condensed)$/i,{serif:false,monospace:false,style:"text",script:"latin",stretch:75}],[/^(?:courier(?: new)?|consolas|cascadia (?:mono|code)|menlo|monaco|liberation mono|cousine|roboto mono|noto sans mono)$/i,{monospace:true,style:"text",script:"latin"}],[/^(?:simsun|nsimsun|songti sc|stsong|noto serif cjk sc|source han serif sc)$/i,{serif:true,style:"text",script:"cjk-sc"}],[/^(?:simhei|microsoft yahei|pingfang sc|dengxian(?: light)?|noto sans cjk sc|source han sans sc)$/i,{serif:false,style:"text",script:"cjk-sc"}],[/^(?:kaiti|stkaiti|fangsong|stfangsong)$/i,{serif:true,style:"handwriting",script:"cjk-sc"}],[/^(?:mingliu|pmingliu|songti tc|noto serif cjk tc)$/i,{serif:true,style:"text",script:"cjk-tc"}],[/^(?:microsoft jhenghei|pingfang tc|noto sans cjk tc)$/i,{serif:false,style:"text",script:"cjk-tc"}],[/^(?:yu mincho|ms pmincho|hiragino mincho pron|noto serif cjk jp)$/i,{serif:true,style:"text",script:"japanese"}],[/^(?:yu gothic(?: ui| light)?|meiryo|ms pgothic|hiragino sans|noto sans cjk jp)$/i,{serif:false,style:"text",script:"japanese"}],[/^(?:batang|applemyungjo|noto serif cjk kr)$/i,{serif:true,style:"text",script:"korean"}],[/^(?:malgun gothic|apple sd gothic neo|noto sans cjk kr)$/i,{serif:false,style:"text",script:"korean"}],[/^(?:comic sans ms|segoe print|bradley hand|chalkboard se|chalkboard)$/i,{style:"handwriting",script:"latin"}],[/^(?:papyrus|copperplate|algerian|jokerman)$/i,{style:"decorative",script:"latin"}],[/^impact$/i,{serif:false,style:"text",script:"latin"}],[/^(?:wingdings(?: [23])?|webdings|symbol|segoe ui symbol|apple symbols|noto sans symbols(?: 2)?)$/i,{style:"symbol"}],[/^(?:segoe ui emoji|apple color emoji|noto color emoji)$/i,{style:"symbol",script:"emoji"}]];function ye(t,e={}){var l;const r=Ut(t),n=r.replace(/\b(?:extra[- ]?light|ultra[- ]?light|semi[- ]?bold|demi[- ]?bold|extra[- ]?bold|ultra[- ]?bold|very condensed|extra condensed|condensed|narrow|expanded|extended|wide|thin|hairline|light|regular|medium|bold|black|heavy|italic|oblique)\b/gi," ").replace(/\s+/g," ").trim(),a=(l=Gc.find(([u])=>u.test(r)||u.test(n)))==null?void 0:l[1],i=a?{weight:400,stretch:100,...a}:{};let o=a?"known":"unknown";a||(/\b(?:mono(?:space)?|typewriter|courier|code)\b/i.test(r)&&(i.monospace=true),/\bsans(?:[ -]serif)?\b/i.test(r)?i.serif=false:/\bserif\b/i.test(r)&&(i.serif=true),/\b(?:script|handwriting|handwritten|brush|calligraphy)\b/i.test(r)?i.style="handwriting":/\b(?:decorative|ornamental|fantasy)\b/i.test(r)&&(i.style="decorative"),Object.keys(i).length&&(o="name"));const s={};/\b(?:extra[- ]?bold|ultra[- ]?bold)\b/i.test(r)?s.weight=800:/\b(?:semi[- ]?bold|demi[- ]?bold)\b/i.test(r)?s.weight=600:/\b(?:black|heavy)\b/i.test(r)?s.weight=900:/\bbold\b/i.test(r)?s.weight=700:/\b(?:extra[- ]?light|ultra[- ]?light)\b/i.test(r)?s.weight=200:/\b(?:thin|hairline)\b/i.test(r)?s.weight=100:/\blight\b/i.test(r)?s.weight=300:/\bmedium\b/i.test(r)&&(s.weight=500),/\b(?:very condensed|extra condensed)\b/i.test(r)?s.stretch=62.5:/\b(?:condensed|narrow)\b/i.test(r)?s.stretch=75:/\b(?:expanded|extended|wide)\b/i.test(r)&&(s.stretch=125),Object.keys(s).length&&o==="unknown"&&(o="name");const d=Object.fromEntries(Object.entries(e).filter(([,u])=>u!==void 0));er(e.panose)?d.panose=e.panose.trim().toUpperCase():delete d.panose;for(const[u,f,m]of[["weight",1,1e3],["stretch",1,1e3],["averageWidth",Number.MIN_VALUE,100]]){const h=d[u];(typeof h!="number"||!Number.isFinite(h)||h<f||h>m)&&delete d[u]}return{...i,...s,...Yc(e.panose),...d,evidence:Object.keys(d).length?"metadata":o}}function oh(t,e){const n={...{1:{serif:true,style:"text"},roman:{serif:true,style:"text"},2:{serif:false,style:"text"},swiss:{serif:false,style:"text"},3:{monospace:true,style:"text"},modern:{monospace:true,style:"text"},4:{style:"handwriting"},script:{style:"handwriting"},5:{style:"decorative"},decorative:{style:"decorative"}}[String(t).toLowerCase()]};return e==="fixed"?n.monospace=true:e==="variable"&&(n.monospace=false),n}function An(t,e){const r=Ut(t).toLowerCase(),n=ye(t,e);let a=[];if(n.script==="emoji")a=["Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji","emoji"];else{if(n.style==="symbol")return[];n.monospace?a=ha[n.script??""]?[ha[n.script],"monospace"]:_c:n.script==="cjk-sc"?a=n.style==="handwriting"?["KaiTi","STKaiti","FangSong","STFangsong",...pa]:n.serif?pa:Vc:n.script==="cjk-tc"?a=n.serif?["Songti TC","MingLiU","Noto Serif CJK TC","serif"]:["PingFang TC","Microsoft JhengHei","Noto Sans CJK TC","sans-serif"]:n.script==="japanese"?a=n.serif?["Yu Mincho","Hiragino Mincho ProN","Noto Serif CJK JP","serif"]:["Yu Gothic","Meiryo","Hiragino Sans","Noto Sans CJK JP","sans-serif"]:n.script==="korean"?a=n.serif?["Batang","AppleMyungjo","Noto Serif CJK KR","serif"]:["Malgun Gothic","Apple SD Gothic Neo","Noto Sans CJK KR","sans-serif"]:n.style==="handwriting"?a=Wc:n.style==="decorative"?a=Jc:n.serif===true?a=qc:n.serif===false&&(a=n.stretch!==void 0&&n.stretch<90?["Arial Narrow","Roboto Condensed","Noto Sans Condensed",...ua]:ua)}const i=(Ti.get(r)??[]).filter(o=>{const s=ye(o);return["monospace","serif","style","script"].every(d=>n[d]===void 0||s[d]===void 0||n[d]===s[d])});return[...new Set([...i,...a])].filter(o=>o.toLowerCase()!==r)}function sh(t,e,r=[]){const n=Zc(t),a=n.flatMap(i=>An(i,typeof e=="function"?e(i):e));return[...new Set([...n,...r,...a])].map(i=>/^(?:serif|sans-serif|monospace|system-ui|cursive|fantasy|emoji|math)$/i.test(i)?i:`"${i.replace(/["\\]/g,"\\$&")}"`).join(", ")}function rr(t,e){const r=ye(t.fontFamily??"",t.traits);if(r.style==="symbol"&&r.script!=="emoji")return[];const n=new Set;for(const o of t.text??""){const s=o.codePointAt(0);if(s>32&&!(s>=127&&s<=159)&&s!==8205&&!(s>=65024&&s<=65039)&&!(s>=917760&&s<=917999)&&n.add(s),n.size===256)break}const a=Ti.get(Ut(t.fontFamily??"").toLowerCase())??[],i=[];for(const o of e){const s=ye(o.fontFamily,o.traits);if(r.monospace===true&&s.monospace!==true||["handwriting","decorative","symbol"].includes(r.style??"")&&s.style!==r.style||r.script==="emoji"&&s.script!=="emoji"||["monospace","serif","style","script"].some(g=>r[g]!==void 0&&s[g]!==void 0&&r[g]!==s[g]))continue;const d=o.coverage;if(d&&n.size&&[...n].some(g=>!d.some(([x,S])=>g>=x&&g<=S)))continue;let l=0;const u=[];for(const g of["monospace","serif","style","script"])r[g]!==void 0&&r[g]===s[g]&&(l+=g==="monospace"||g==="script"?20:10,u.push(g));r.weight!==void 0&&s.weight!==void 0&&(l+=15-Math.min(30,Math.abs(r.weight-s.weight)/25),u.push("weight")),r.stretch!==void 0&&s.stretch!==void 0&&(l+=25-Math.min(50,Math.abs(r.stretch-s.stretch)),u.push("stretch")),r.averageWidth&&s.averageWidth&&(l+=25-Math.min(50,Math.abs(Math.log(s.averageWidth/r.averageWidth))*60),u.push("average-width"));const f=er(r.panose),m=er(s.panose);if(f&&m&&f[0]===2&&m[0]===2){const g=[9,10,11,15,13,7];let x=false;for(let S=4;S<10;S++)f[S]<2||m[S]<2||f[S]>g[S-4]||m[S]>g[S-4]||(l+=4-Math.min(8,Math.abs(f[S]-m[S])),x=true);x&&u.push("PANOSE")}a.some(g=>g.toLowerCase()===o.fontFamily.toLowerCase())&&(l+=30,u.push("compatible-metrics"));const h=d&&n.size?"matched":"unknown";h==="matched"&&(l+=40,u.push("glyph-coverage")),u.length&&i.push({candidate:o,score:l,reasons:u,coverage:h})}return i.sort((o,s)=>+(s.coverage==="matched")-+(o.coverage==="matched")||s.score-o.score)}function Zc(t){const e=[];let r="",n=false,a=0;for(let i=0;i<=t.length;i++){const o=t[i];if(n){n=false;continue}if(o==="\\"){n=true;continue}if(r){o===r&&(r="");continue}if(o==='"'||o==="'"){r=o;continue}if(o===","||i===t.length){const s=Mt(t.slice(a,i));s&&!/[()\x00-\x1f]/.test(s)&&e.push(s),a=i+1}}return e}class Li{constructor(e){E(this,"cache",new Map);this.presentation=e}getUrl(e){const r=this.cache.get(e);if(r)return r;const n=this.presentation.media[e];if(!n)return"";let a="";const i=Kc(e,n.contentType)?Qc(n.data):void 0;if(i)a=i;else if(typeof URL<"u"&&typeof URL.createObjectURL=="function"){const o=new Uint8Array(n.data.byteLength);o.set(n.data),a=URL.createObjectURL(new Blob([o.buffer],{type:n.contentType}))}else a=`data:${n.contentType};base64,${hu(n.data)}`;return this.cache.set(e,a),a}destroy(){if(typeof URL<"u"&&typeof URL.revokeObjectURL=="function")for(const e of this.cache.values())e.startsWith("blob:")&&URL.revokeObjectURL(e);this.cache.clear()}}function Kc(t,e){return/\.tiff?$/i.test(t)||/^image\/tiff?$/i.test(e)}function Qc(t){if(!(typeof document>"u"))try{const e=tl(t),r=mr.decode(e);if(!r.length)return;for(const u of r)mr.decodeImage(e,u,r);const n=r.find(u=>Number(u.width)>0&&Number(u.height)>0&&u.data instanceof Uint8Array)??r.find(u=>Number(u.width)>0&&Number(u.height)>0)??r[0],a=Number(n.width),i=Number(n.height);if(!Number.isFinite(a)||!Number.isFinite(i)||a<=0||i<=0)return;const o=mr.toRGBA8(n),s=document.createElement("canvas");s.width=a,s.height=i;const d=s.getContext("2d");if(!d)return;const l=d.createImageData(a,i);return l.data.set(o),d.putImageData(l,0,0),s.toDataURL("image/png")}catch{return}}function tl(t){if(t.byteOffset===0&&t.byteLength===t.buffer.byteLength&&t.buffer instanceof ArrayBuffer)return t.buffer;const e=new Uint8Array(t.byteLength);return e.set(t),e.buffer}let ot;function Mi(){if((ot==null?void 0:ot.context)!==void 0)return ot.context;const t=document.createElement("canvas"),r=!(typeof navigator<"u"&&/jsdom/i.test(navigator.userAgent)&&typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)&&typeof t.getContext=="function"?t.getContext("2d"):null;return ot&&(ot.context=r),r}function el(t,e,r={}){const n=ot;ot={};try{const a=r.mediaRegistry??new Li(e),i=document.createElement("div");i.className=["pptxv-slide",r.thumbnail?"pptxv-slide--thumbnail":"",r.className??""].filter(Boolean).join(" "),i.style.position="relative",i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,Tn(i,t.background,a);for(const o of t.items)i.appendChild(rl(o,a));return i}finally{ot=n}}function rl(t,e){return t.kind==="text"?nl(t,e):t.kind==="shape"?il(t,e):t.kind==="image"?pl(t.mediaId,t,e):t.kind==="media"?hl(t,e):t.kind==="table"?vl(t,e):t.kind==="chart"?wl(t):Ml(t.transform,t.label)}function hr(t){const e=t.opacity;return typeof e=="number"&&Number.isFinite(e)?e:void 0}function se(t,e,r){const n=document.createElement("div");n.className=e,n.style.left=`${t.x}px`,n.style.top=`${t.y}px`,n.style.width=`${Math.max(t.width,1)}px`,n.style.height=`${Math.max(t.height,1)}px`,n.style.position="absolute",n.style.transformOrigin="center center";const a=[];return t.flipH&&a.push("scaleX(-1)"),t.flipV&&a.push("scaleY(-1)"),t.rotation&&a.push(`rotate(${t.rotation}deg)`),a.length&&(n.style.transform=a.join(" ")),r!=null&&(n.style.opacity=String(r)),n}function nl(t,e){var o,s;const r=t.transform.width<=0,n=t.transform.height<=0,a=se(t.transform,"pptxv-item pptxv-item--text",hr(t));(r||n)&&al(a,r,n),(o=t.placeholder)!=null&&o.type&&(a.dataset.placeholderType=t.placeholder.type),(s=t.placeholder)!=null&&s.idx&&(a.dataset.placeholderIdx=t.placeholder.idx),Ol(a,t.textFrame),kn(a,t.fill,t.line,e),$e(a,t.shadow);const i=Ln(t.textFrame,Nd(t.fill)??"#111827",{omitPlaceholderBulletLabels:Ri(t),availableWidth:r?void 0:t.transform.width,availableHeight:n?void 0:t.transform.height});return r&&(i.style.width="auto"),n&&(i.style.height="auto"),t.fill.type==="picture"&&(i.style.position="relative",i.style.zIndex="1"),a.appendChild(i),Ne(a,t,!Rn(t.textFrame)),a}function al(t,e,r){e&&(t.style.width="auto",t.style.minWidth="fit-content"),r&&(t.style.height="auto");const n=e?"-50%":"0",a=r?"-50%":"0",i=t.style.transform;t.style.transform=[`translate(${n}, ${a})`,i].filter(Boolean).join(" "),t.style.transformOrigin="0 0"}function il(t,e){var o,s,d;const r=se(t.transform,"pptxv-item pptxv-item--shape",hr(t));r.dataset.shapeType=t.shapeType,(o=t.placeholder)!=null&&o.type&&(r.dataset.placeholderType=t.placeholder.type),(s=t.placeholder)!=null&&s.idx&&(r.dataset.placeholderIdx=t.placeholder.idx),$e(r,t.shadow);const n=Ld(t),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox",`${-n} ${-n} ${Math.max(t.transform.width,1)+n*2} ${Math.max(t.transform.height,1)+n*2}`),a.setAttribute("width",`${Math.max(t.transform.width,1)+n*2}`),a.setAttribute("height",`${Math.max(t.transform.height,1)+n*2}`),a.setAttribute("overflow","visible"),a.style.position="absolute",a.style.left=`${-n}px`,a.style.top=`${-n}px`,a.style.pointerEvents="none",a.classList.add("pptxv-shape-svg");const i=wd(t,e);if(i.defs.length){const l=document.createElementNS("http://www.w3.org/2000/svg","defs");for(const u of i.defs)l.appendChild(u);a.appendChild(l)}if(a.appendChild(i.node),r.appendChild(a),t.textFrame&&ou(t.textFrame)){const l=Ln(t.textFrame,((d=t.line)==null?void 0:d.color)??"#111827",{omitPlaceholderBulletLabels:Ri(t)});l.classList.add("pptxv-shape-text"),ol(l,t),r.appendChild(l)}return Ne(r,t,!t.textFrame||!Rn(t.textFrame)),r}function ol(t,e){var i;t.style.position="absolute";const r=sl(e),n=Math.max(1,e.transform.width-r.left-r.right),a=Math.max(1,e.transform.height-r.top-r.bottom);if(t.style.left=`${r.left}px`,t.style.right="",t.style.width=`${n}px`,t.style.height="auto",t.style.maxHeight=`${a}px`,t.style.bottom="",t.style.transform="",dl(e)){t.style.top=`${Number((e.transform.height/2).toFixed(3))}px`,t.style.transform="translateY(-50%)";return}if(((i=e.textFrame)==null?void 0:i.verticalAlign)==="bottom"){t.style.top="",t.style.bottom=`${r.bottom}px`;return}t.style.top=`${r.top}px`}function sl(t){var o;if(ll(t))return rt(t.transform.width,t.transform.height,0,0,0,0);const e=t.textBounds??(((o=t.geometry)==null?void 0:o.type)==="preset"?ki(t.shapeType,{width:t.transform.width,height:t.transform.height,adjustments:t.geometry.adjustments}):void 0);if(e)return fa(t,Ci(e));const r=t.transform.width,n=t.transform.height,a=rt(r,n,.08,.08,.08,.08);let i;switch(t.shapeType){case"ellipse":i=rt(r,n,0,0,0,0);break;case"diamond":i=rt(r,n,.18,.16,.18,.16);break;case"hexagon":case"octagon":case"decagon":case"dodecagon":i=rt(r,n,.16,.12,.16,.12);break;case"pentagon":i=rt(r,n,.14,.2,.14,.08);break;case"heptagon":i=rt(r,n,.14,.14,.14,.12);break;case"triangle":case"rtTriangle":i=rt(r,n,.16,.3,.16,.08);break;case"trapezoid":case"parallelogram":i=rt(r,n,.18,.12,.18,.12);break;case"chevron":i=rt(r,n,.12,.12,.2,.12);break;case"rightArrow":case"stripedRightArrow":case"notchedRightArrow":case"rightArrowCallout":i=rt(r,n,.08,.16,.3,.16);break;case"leftArrow":case"leftArrowCallout":i=rt(r,n,.3,.16,.08,.16);break;case"upArrow":case"upArrowCallout":i=rt(r,n,.16,.28,.16,.1);break;case"downArrow":i=rt(r,n,.16,.1,.16,.28);break;case"leftRightArrow":case"leftRightArrowCallout":i=rt(r,n,.24,.16,.24,.16);break;case"upDownArrow":i=rt(r,n,.16,.24,.16,.24);break;case"quadArrow":case"quadArrowCallout":i=rt(r,n,.24,.24,.24,.24);break;case"bentArrow":case"bentUpArrow":case"uturnArrow":case"leftUpArrow":case"leftRightUpArrow":i=rt(r,n,.18,.2,.18,.18);break;case"homePlate":i=rt(r,n,.08,.12,.22,.12);break;case"plaque":case"cloud":case"smileyFace":case"bevel":case"can":i=rt(r,n,.14,.14,.14,.14);break;case"pie":case"chord":case"donut":i=rt(r,n,.18,.18,.18,.18);break;case"frame":case"halfFrame":case"corner":case"diagStripe":case"plus":case"noSmoking":case"arc":case"line":i=a;break;default:i=a;break}return fa(t,i)}const cl=new Set(["rect","roundRect","ellipse","snip1Rect","snip2SameRect","snip2DiagRect","snipRoundRect","round1Rect","round2SameRect","round2DiagRect"]);function ll(t){var e;return((e=t.geometry)==null?void 0:e.type)==="custom"?true:cl.has(t.shapeType)}function dl(t){var e,r;return((e=t.placeholder)==null?void 0:e.type)==="title"||((r=t.textFrame)==null?void 0:r.verticalAlign)==="middle"}function fa(t,e){const r=ul(t);if(r<=0)return e;const n=Math.max(t.transform.width,1),a=Math.max(t.transform.height,1),i=Math.max((n-1)/2,0),o=Math.max((a-1)/2,0);return Ci({left:Math.min(e.left+r,i),top:Math.min(e.top+r,o),right:Math.min(e.right+r,i),bottom:Math.min(e.bottom+r,o)})}function ul(t){var r;const e=Math.max(((r=t.line)==null?void 0:r.width)??0,0);return e<=2||t.shapeType==="line"?0:Number(Math.min(Math.max((e-2)*.45,0),8).toFixed(3))}function Ci(t){return{left:Number(Math.max(t.left,0).toFixed(3)),top:Number(Math.max(t.top,0).toFixed(3)),right:Number(Math.max(t.right,0).toFixed(3)),bottom:Number(Math.max(t.bottom,0).toFixed(3))}}function rt(t,e,r,n,a,i){return{left:Number((t*r).toFixed(3)),top:Number((e*n).toFixed(3)),right:Number((t*a).toFixed(3)),bottom:Number((e*i).toFixed(3))}}function pl(t,e,r){const n=se(e.transform,"pptxv-item pptxv-item--image",hr(e));kn(n,e.fill,e.line,r),$e(n,e.shadow);const a=document.createElement("img");return a.className="pptxv-image",a.src=r.getUrl(t),a.alt=e.name??"slide-image",ji(n,a,e.crop,"contain"),a.draggable=false,n.appendChild(a),Ne(n,e,true),n}function hl(t,e){const r=se(t.transform,`pptxv-item pptxv-item--media pptxv-item--media-${t.mediaType}`,hr(t));if(r.dataset.mediaType=t.mediaType,kn(r,t.fill,t.line,e),$e(r,t.shadow),t.mediaType==="video")r.appendChild(fl(t,e));else{r.style.width="0px",r.style.height="0px",r.style.overflow="visible";const n=document.createElement("audio");n.className="pptxv-media-player pptxv-media-player--audio",Ei(n,t.mediaId,e),n.style.position="absolute",n.style.left="0px",n.style.top="0px",n.style.transform="translate(-50%)",n.style.zIndex="1",r.appendChild(n)}return r}function fl(t,e){const r=document.createElement("div");r.className="pptxv-media-stage";const n=document.createElement("div");n.className="pptxv-media-poster-frame",gl(n,t.transform);const a=ml(t.posterMediaId,t.name??"video-poster",e);a&&(a.className="pptxv-media-poster pptxv-media-poster--video",yl(n,a,t.crop),n.appendChild(a),r.appendChild(n));const i=document.createElement("video");return i.className="pptxv-media-player pptxv-media-player--video",Ei(i,t.mediaId,e,true),i.playsInline=true,i.setAttribute("playsinline",""),xl(i,t.transform,t.crop),r.appendChild(i),r}function ml(t,e,r){if(!t)return null;const n=r.getUrl(t);if(!n)return null;const a=document.createElement("img");return a.src=n,a.alt="",a.draggable=false,a}function Ei(t,e,r,n=true){const a=r.getUrl(e);a&&(t.src=a,t.setAttribute("src",a)),t.controls=n,n?t.setAttribute("controls",""):t.removeAttribute("controls"),t.preload="metadata",t.setAttribute("preload","metadata")}function ji(t,e,r,n){if(r){const a=Math.max(1-r.left-r.right,1e-4),i=Math.max(1-r.top-r.bottom,1e-4);t.style.overflow="hidden",e.style.position="absolute",e.style.width=Et(100/a),e.style.height=Et(100/i),e.style.maxWidth="none",e.style.maxHeight="none",e.style.left=Et(-r.left/a*100),e.style.top=Et(-r.top/i*100),e.style.objectFit="fill";return}e.style.width="100%",e.style.height="100%",e.style.objectFit=n}function gl(t,e){t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width=`${Number(e.width.toFixed(3))}px`,t.style.height=`${Number(e.height.toFixed(3))}px`,t.style.overflow="hidden"}function yl(t,e,r){if(r){ji(t,e,r,"fill");return}e.style.width="100%",e.style.height="100%"}function xl(t,e,r){if(t.style.position="absolute",t.style.left="0px",t.style.top="0px",r){const i=Math.max(1-r.left-r.right,1e-4),o=Math.max(1-r.top-r.bottom,1e-4);t.style.width=Et(100/i),t.style.height=Et(100/o),t.style.maxWidth="none",t.style.maxHeight="none",t.style.left=Et(-r.left/i*100),t.style.top=Et(-r.top/o*100);return}const n=Math.max(1,Math.round(e.width)),a=Math.max(1,Math.round(e.height));t.width=n,t.height=a,t.setAttribute("width",String(n)),t.setAttribute("height",String(a))}function vl(t,e){var f;const r=se(t.transform,"pptxv-item pptxv-item--table");$e(r,t.shadow);const n=document.createElement("table");n.className="pptxv-table";const a=new Set(t.hiddenColumns??[]),i=new Set(t.hiddenRows??[]),o=ma(t.columns,t.transform.width,a),s=ma(t.rows,t.transform.height,i),d=new Map;for(const m of t.cells){const h=d.get(m.row)??[];h.push(m),d.set(m.row,h)}const l=document.createElement("colgroup");for(let m=0;m<t.columns.length;m+=1){const h=o[m]??1,g=document.createElement("col");a.has(m)?(g.style.width="0px",g.style.visibility="collapse"):g.style.width=`${Math.max(h,1)}px`,l.appendChild(g)}n.appendChild(l);const u=document.createElement("tbody");for(let m=0;m<t.rows.length;m+=1){const h=document.createElement("tr");i.has(m)?(h.style.height="0px",h.style.visibility="collapse"):h.style.height=`${s[m]??1}px`;const g=((f=d.get(m))==null?void 0:f.sort((x,S)=>x.column-S.column))??[];for(const x of g)x.isMergedContinuation||h.appendChild(bl(x,e));u.appendChild(h)}return n.appendChild(u),r.appendChild(n),Ne(r,t,!su(t)),r}function ma(t,e,r){const n=t.map((o,s)=>r.has(s)?0:Math.max(o,1)),a=n.reduce((o,s)=>o+s,0);if(!Number.isFinite(e)||e<=0||a<=0)return n;const i=e/a;return n.map(o=>o*i)}function bl(t,e){const r=document.createElement("td");r.className="pptxv-table-cell",r.rowSpan=t.rowSpan,r.colSpan=t.colSpan,r.style.position="relative",r.style.overflow="hidden",r.style.verticalAlign=Rd(t.textFrame.verticalAlign),Tn(r,t.fill,e),Dd(r,t);const n=Ln(t.textFrame,"#111827");return n.style.position="absolute",n.style.inset="0",t.fill.type==="picture"&&(n.style.zIndex="1"),r.appendChild(n),r}function wl(t){const e=se(t.transform,"pptxv-item pptxv-item--chart"),r=Math.max(t.transform.width,1),n=Math.max(t.transform.height,1),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.classList.add("pptxv-chart-svg"),a.setAttribute("viewBox",`0 0 ${r} ${n}`),a.setAttribute("width",String(r)),a.setAttribute("height",String(n)),a.setAttribute("role","img"),a.setAttribute("aria-label",t.title??t.name??(t.chartType==="pie"?"Pie chart":"Column chart"));const i=t.legendPosition??"right",o=t.title?n*.13:n*.04,s=i==="bottom"?n*.15:0,d=i==="top"?n*.13:0,l=i==="left"||i==="right"?r*.2:0,u=r*(t.chartType==="pie"?.04:.125)+(i==="left"?l:0),f=r-r*(t.chartType==="pie"?.04:.068)-(i==="right"?l:0),m=Math.max(n*.08,o+d+n*.035),h=n-n*.08-s;if(t.title){const x=mt("text",{x:r/2,y:n*.052,"text-anchor":"middle","dominant-baseline":"middle"});x.classList.add("pptxv-chart-title"),x.setAttribute("font-size",String(Math.max(12,n*.047))),x.textContent=t.title,a.appendChild(x)}const g={width:r,height:n,plotLeft:u,plotRight:f,plotTop:m,plotBottom:h};return t.chartType==="pie"?Fl(a,t,g):Sl(a,t,g),Ll(a,t,g),e.appendChild(a),Ne(e,t,true),e}function Fl(t,e,r){const n=e.series[0];if(!n)return;const a=n.values.map(f=>f!=null&&Number.isFinite(f)?Math.abs(f):0),i=Math.max(0,...a);if(i===0)return;const o=a.reduce((f,m)=>f+m/i,0),s=(r.plotLeft+r.plotRight)/2,d=(r.plotTop+r.plotBottom)/2,l=Math.max(.5,Math.min(r.plotRight-r.plotLeft,r.plotBottom-r.plotTop)/2);let u=((e.firstSliceAngle??0)-90)*Math.PI/180;a.forEach((f,m)=>{var C;if(f===0)return;const h=f/i/o,g=h*Math.PI*2,x=u+g,S=s+l*Math.cos(u),y=d+l*Math.sin(u),F=s+l*Math.cos(x),k=d+l*Math.sin(x),w=mt("path",{}),T=h===1?`M ${S} ${y} A ${l} ${l} 0 0 1 ${2*s-S} ${2*d-y} A ${l} ${l} 0 0 1 ${S} ${y} Z`:`M ${s} ${d} L ${S} ${y} A ${l} ${l} 0 ${g>Math.PI?1:0} 1 ${F} ${k} Z`;w.setAttribute("d",T),w.classList.add("pptxv-chart-slice");const N=((C=n.pointStyles)==null?void 0:C[m])??n;w.setAttribute("fill",vt(N.color,N.alpha)),w.setAttribute("data-series-index","0"),w.setAttribute("data-category-index",String(m)),w.setAttribute("data-value",String(n.values[m])),w.setAttribute("data-percentage",String(h*100));const I=mt("title",{});I.textContent=`${e.categories[m]||m+1}: ${n.values[m]}`,w.appendChild(I),t.appendChild(w),u=x})}function Sl(t,e,r){const{height:n,plotLeft:a,plotRight:i,plotTop:o,plotBottom:s}=r,d=Math.max(i-a,1),l=Math.max(s-o,1),u=Al(e),f=y=>s-(y-u.min)/(u.max-u.min)*l;for(let y=u.min;y<=u.max+u.majorUnit/2;y+=u.majorUnit){const F=Math.abs(y)<u.majorUnit/1e3?0:y,k=f(F);if(F!==0){const N=mt("line",{x1:a,y1:k,x2:i,y2:k});N.classList.add("pptxv-chart-gridline"),t.appendChild(N)}const w=mt("line",{x1:a-4,y1:k,x2:a,y2:k});w.classList.add("pptxv-chart-axis"),t.appendChild(w);const T=mt("text",{x:a-10,y:k,"text-anchor":"end","dominant-baseline":"middle"});T.classList.add("pptxv-chart-axis-label"),T.setAttribute("font-size",String(Math.max(9,n*.036))),T.textContent=Tl(F,e),t.appendChild(T)}const m=f(Math.min(u.max,Math.max(u.min,0))),h=Math.max(e.categories.length,...e.series.map(y=>y.values.length),1),g=d/h;if(e.grouping==="clustered"){const y=g*.74,F=y/Math.max(e.series.length,1);e.series.forEach((k,w)=>{k.values.forEach((T,N)=>{if(T==null||N>=h)return;const I=Zr(T,e,N),C=f(I),M=mt("rect",{x:a+N*g+(g-y)/2+w*F,y:Math.min(m,C),width:Math.max(F,.5),height:Math.max(Math.abs(m-C),0)});ga(M,e,w,N,I),t.appendChild(M)})})}else{const y=g*.5,F=Array(h).fill(0),k=Array(h).fill(0);e.series.forEach((w,T)=>{w.values.forEach((N,I)=>{if(N==null||I>=h)return;const C=Zr(N,e,I),M=C>=0?F[I]:k[I],H=M+C;C>=0?F[I]=H:k[I]=H;const z=f(M),Y=f(H),D=mt("rect",{x:a+I*g+(g-y)/2,y:Math.min(z,Y),width:Math.max(y,.5),height:Math.max(Math.abs(z-Y),0)});ga(D,e,T,I,C),t.appendChild(D)})})}const x=mt("line",{x1:a,y1:m,x2:i,y2:m});x.classList.add("pptxv-chart-axis"),t.appendChild(x);const S=mt("line",{x1:a,y1:o,x2:a,y2:s});S.classList.add("pptxv-chart-axis"),t.appendChild(S);for(let y=0;y<h;y+=1){const F=a+(y+.5)*g,k=mt("line",{x1:F,y1:m,x2:F,y2:m+2});k.classList.add("pptxv-chart-axis"),t.appendChild(k);const w=mt("text",{x:F,y:s+n*.057,"text-anchor":"middle","dominant-baseline":"middle"});w.classList.add("pptxv-chart-category-label"),w.setAttribute("font-size",String(Math.max(10,n*.042))),w.textContent=e.categories[y]??String(y+1),t.appendChild(w)}}function mt(t,e){const r=document.createElementNS("http://www.w3.org/2000/svg",t);for(const[n,a]of Object.entries(e))r.setAttribute(n,String(Number.isFinite(a)?Number(Number(a).toFixed(3)):a));return r}function Al(t){var m,h,g,x,S;const e=t.series.flatMap(y=>y.values.flatMap((F,k)=>F==null?[]:[Zr(F,t,k)])),r=e.some(y=>y<0),n=t.grouping==="percentStacked"?100:t.grouping==="stacked"?e.reduce((y,F)=>y+Math.max(F,0),0):Math.max(0,...e),a=t.grouping==="percentStacked"?r?-100:0:t.grouping==="stacked"?e.reduce((y,F)=>y+Math.min(F,0),0):Math.min(0,...e),i=((m=t.valueAxis)==null?void 0:m.min)??a,o=((h=t.valueAxis)==null?void 0:h.max)??n,s=4,d=kl(Math.max(o-i,1)/s),l=(g=t.valueAxis)!=null&&g.majorUnit&&t.valueAxis.majorUnit>0?t.valueAxis.majorUnit:d,u=((x=t.valueAxis)==null?void 0:x.min)??Math.min(0,Math.floor(i/l)*l);let f=((S=t.valueAxis)==null?void 0:S.max)??Math.max(u+l,Math.ceil(o/l)*l,u+s*l);return f<=u&&(f=u+l),{min:u,max:f,majorUnit:l}}function kl(t){const e=10**Math.floor(Math.log10(Math.max(t,Number.EPSILON))),r=t/e;return(r<=1?1:r<=2?2:r<=5?5:10)*e}function Zr(t,e,r){if(e.grouping!=="percentStacked")return t;const n=e.series.reduce((a,i)=>a+Math.abs(i.values[r]??0),0);return n>0?t/n*100:0}function Tl(t,e){var r,n;return e.grouping==="percentStacked"||(n=(r=e.valueAxis)==null?void 0:r.formatCode)!=null&&n.includes("%")?`${Number(t.toFixed(2))}%`:String(Number(t.toFixed(6)))}function ga(t,e,r,n,a){const i=e.series[r];t.classList.add("pptxv-chart-bar"),t.setAttribute("fill",vt((i==null?void 0:i.color)??"#4472C4",i==null?void 0:i.alpha)),t.setAttribute("data-series-index",String(r)),t.setAttribute("data-category-index",String(n)),t.setAttribute("data-value",String(a))}function Ll(t,e,r){const n=e.legendPosition??"right";if(n==="none"||!e.series.length)return;const a=e.chartType==="pie"?e.series[0].values.map((d,l)=>{var u;return{...((u=e.series[0].pointStyles)==null?void 0:u[l])??e.series[0],name:e.categories[l]||String(l+1),seriesIndex:0,categoryIndex:l}}):(n==="bottom"||n==="top"?[...e.series].reverse():e.series).map(d=>({...d,seriesIndex:e.series.indexOf(d),categoryIndex:void 0})),i=Math.max(9,r.height*.036),o=Math.max(8,i*.9),s=mt("g",{});s.classList.add("pptxv-chart-legend"),a.forEach((d,l)=>{let u,f;if(n==="bottom"||n==="top"){const x=(r.plotRight-r.plotLeft)/a.length;u=r.plotLeft+l*x+x*.03,f=n==="bottom"?r.height*.925:Math.max(r.height*.105,r.plotTop-i)}else u=n==="left"?r.width*.025:r.plotRight+r.width*.04,f=r.plotTop+(l+.5)*Math.min(i*2.2,(r.plotBottom-r.plotTop)/a.length);const m=mt("g",{"data-series-index":d.seriesIndex});d.categoryIndex!=null&&m.setAttribute("data-category-index",String(d.categoryIndex)),m.classList.add("pptxv-chart-legend-item");const h=mt("rect",{x:u,y:f-o*.72,width:o,height:o});h.setAttribute("fill",vt(d.color,d.alpha));const g=mt("text",{x:u+o*1.35,y:f,"dominant-baseline":"middle"});g.setAttribute("font-size",String(i)),g.textContent=d.name,m.append(h,g),s.appendChild(m)}),t.appendChild(s)}function Ml(t,e){const r=se(t,"pptxv-item pptxv-item--unsupported");return r.textContent=e,r}function Ne(t,e,r){if(!r||!cu(e))return;const n=document.createElement("a");n.className="pptxv-item-link",_i(n,e);const a=Ki(e,e.name);n.setAttribute("aria-label",a),n.title=au(e,e.name),n.style.position="absolute",n.style.inset="0",n.style.zIndex="4",n.style.display="block",n.style.background="transparent",n.style.textDecoration="none",t.appendChild(n)}function kn(t,e,r,n){Tn(t,e,n),t.style.border="none",r&&(t.style.border=Yi(r))}function $e(t,e){e&&(t.style.filter=`drop-shadow(${Number(e.offsetX.toFixed(3))}px ${Number(e.offsetY.toFixed(3))}px ${Number(e.blur.toFixed(3))}px ${vt(e.color,e.alpha)})`)}function Tn(t,e,r){if(t.style.background="",t.style.backgroundColor="",t.style.backgroundImage="",t.style.backgroundSize="",t.style.backgroundRepeat="",t.style.backgroundPosition="",e.type==="pattern"?Cl(t,e):t.style.background=zi(e),e.type!=="picture")return;const n=El(e,r);n&&(t.style.overflow="hidden",t.insertBefore(n,t.firstChild))}function Cl(t,e){const r=Bd(e);t.style.backgroundColor=r.color,t.style.backgroundImage=r.image,r.size&&(t.style.backgroundSize=r.size),r.repeat&&(t.style.backgroundRepeat=r.repeat),r.position&&(t.style.backgroundPosition=r.position)}function El(t,e){if(t.type!=="picture"||!t.mediaId)return;const r=e.getUrl(t.mediaId);if(!r)return;const n=document.createElement("div");if(n.className="pptxv-fill-layer",n.style.position="absolute",n.style.inset="0",n.style.overflow="hidden",n.style.pointerEvents="none",n.style.borderRadius="inherit",n.style.zIndex="0",t.alpha!=null&&(n.style.opacity=String(t.alpha)),t.tile)return n.style.backgroundImage=`url("${iu(r)}")`,n.style.backgroundRepeat="repeat",n.style.backgroundPosition="0 0",n;const a=document.createElement("img");if(a.className="pptxv-fill-image",a.src=r,a.alt="",a.setAttribute("aria-hidden","true"),a.draggable=false,a.style.position="absolute",a.style.maxWidth="none",a.style.maxHeight="none",t.crop){const i=Math.max(1-t.crop.left-t.crop.right,1e-4),o=Math.max(1-t.crop.top-t.crop.bottom,1e-4);a.style.width=Et(100/i),a.style.height=Et(100/o),a.style.left=Et(-t.crop.left/i*100),a.style.top=Et(-t.crop.top/o*100),a.style.objectFit="fill"}else a.style.width="100%",a.style.height="100%",a.style.objectFit="fill";return n.appendChild(a),n}function Ln(t,e,r={}){const n=document.createElement("div");n.className="pptxv-text-frame",n.style.padding=`${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`,n.style.justifyContent=jd(t.verticalAlign),n.style.overflowX=t.horizontalOverflow==="clip"||t.wrap==="none"?"clip":"visible",n.style.overflowY=t.verticalOverflow==="clip"?"clip":"visible",t.anchorCenter&&(n.style.alignItems="center"),(t.direction==="vertical"||t.direction==="vertical270")&&(n.style.writingMode=t.direction==="vertical270"?"vertical-lr":"vertical-rl",n.style.textOrientation="mixed");const a=[];for(const i of t.paragraphs){const o=document.createElement("p");o.className="pptxv-paragraph",o.style.textAlign=i.align??"left";const s=Ni(i),d=Hl(i,e),l=s.fontSize,u=s.fontFamily,f=!!(r.omitPlaceholderBulletLabels&&ql(i,l)),m=!f&&Xl(i,l),h=Yl(i,f);if(o.style.fontSize=`${l}px`,u){o.style.fontFamily=xe(u,{sampleText:xa(i)});const y=ar(u);y&&(o.style.fontWeight=y);const F=Hi(u);F&&(o.style.fontStyle=F)}t.anchorCenter&&(o.style.width="fit-content",o.style.maxWidth="100%"),t.wrap==="none"&&(o.style.whiteSpace="pre",o.style.overflowWrap="normal",o.style.wordBreak="normal"),i.marginLeft!=null&&(o.style.paddingLeft=`${Mn(i,m)}px`),i.indent!=null&&(o.style.textIndent=`${h?0:Cn(i,m)}px`),i.spaceBefore!=null&&(o.style.marginTop=`${i.spaceBefore}px`),i.spaceAfter!=null&&(o.style.marginBottom=`${i.spaceAfter}px`),i.lineHeight!=null?o.style.lineHeight=i.lineHeightUnit==="px"?`${i.lineHeight}px`:String(i.lineHeight):o.style.lineHeight="1";let g=$i(i,m);if(i.bullet){const y=document.createElement("span"),F=Wi(i,a),k=Xd(i,d),w=Ii(F,i,l),T=Yd(i,F),N=Jd(F,l);y.className=["pptxv-run","pptxv-run--bullet",i.bullet.autoType?"pptxv-run--bullet-auto":""].filter(Boolean).join(" "),N?(y.dataset.resolvedLabel=F,y.appendChild(N),y.style.display="inline-flex",y.style.alignItems="center",y.style.justifyContent="flex-start",y.style.lineHeight="1"):y.textContent=F,y.style.color=k,T&&(y.style.fontFamily=T);const I=ar(i.bullet.fontFamily);I&&(y.style.fontWeight=I),w>0&&i.indent!=null&&i.indent<0&&(y.style.display=N?"inline-flex":"inline-block",y.style.width=`${Number(w.toFixed(3))}px`,y.style.boxSizing="border-box",h&&(y.style.marginLeft=`${m?0:i.indent}px`)),i.bullet.autoType&&(y.style.fontVariantNumeric="tabular-nums"),F&&!f&&(o.appendChild(y),g+=w)}const x=xa(i),S=i.runs.some(y=>y.text===" ");for(const y of i.runs){const F=Dl(y,d,x,l,t.wrap==="none");if(y.text===" "){const k=_l(i,g,l);F.classList.add("pptxv-run--tab"),F.style.width=`${Number(k.toFixed(3))}px`,g+=k}else y.text===`
6
+ `?g=Ul(i,m):S&&(g+=Bi(y,l));o.appendChild(F)}n.appendChild(o)}return jl(n,t,r),n}function jl(t,e,r){var s;if(((s=e.autofit)==null?void 0:s.type)!=="shape"||e.wrap!=="none")return;const n=r.availableWidth!=null?Math.max(r.availableWidth-e.padding.left-e.padding.right,1):void 0,a=r.availableHeight!=null?Math.max(r.availableHeight-e.padding.top-e.padding.bottom,1):void 0;if((!n||!Number.isFinite(n))&&(!a||!Number.isFinite(a)))return;const i=Rl(e);if(i.width<=0||i.height<=0)return;let o=1;n&&i.width>n+.5&&(o=Math.min(o,n/i.width)),a&&i.height>a+.5&&(o=Math.min(o,a/i.height)),!(!Number.isFinite(o)||o>=.999)&&$l(t,o)}function Rl(t){let e=0,r=0;for(const n of t.paragraphs){const a=Ni(n).fontSize;let i=$i(n);n.bullet&&(i+=Ii(Wi(n,[]),n,a));for(const d of n.runs)i+=Bi(d,a);const o=Nl(n,a),s=o+(n.spaceBefore??0)+(n.spaceAfter??0);e=Math.max(e,i),r+=Math.max(s,o)}return{width:e,height:r}}function Nl(t,e){const r=t.runs.reduce((n,a)=>Math.max(n,a.fontSize??e),e);return t.lineHeight!=null?t.lineHeightUnit==="px"?t.lineHeight:r*t.lineHeight:r}function $l(t,e){const r=Array.from(t.querySelectorAll(".pptxv-paragraph"));for(const a of r)Xt(a.style,"fontSize",e),Xt(a.style,"marginTop",e),Xt(a.style,"marginBottom",e),Xt(a.style,"paddingLeft",e),Xt(a.style,"textIndent",e),Il(a.style,e);const n=Array.from(t.querySelectorAll(".pptxv-run"));for(const a of n)Xt(a.style,"fontSize",e),Xt(a.style,"width",e),Xt(a.style,"marginLeft",e),Xt(a.style,"lineHeight",e),Bl(a.style,e)}function Xt(t,e,r){const n=t[e];if(typeof n!="string"||!n.endsWith("px"))return;const a=Number.parseFloat(n);Number.isFinite(a)&&(t[e]=`${Number((a*r).toFixed(3))}px`)}function Il(t,e){const r=t.lineHeight;if(!r||!r.endsWith("px"))return;const n=Number.parseFloat(r);Number.isFinite(n)&&(t.lineHeight=`${Number((n*e).toFixed(3))}px`)}function Bl(t,e){const r=t.letterSpacing;if(!r||!r.endsWith("px"))return;const n=Number.parseFloat(r);Number.isFinite(n)&&(t.letterSpacing=`${Number((n*e).toFixed(3))}px`)}function Ri(t){var e;return!!((e=t.placeholder)!=null&&e.type)||Pl(t.name)}function Pl(t){return t?/placeholder|占位符/i.test(t):false}function Ol(t,e){t.style.overflowX=e.horizontalOverflow==="clip"||e.wrap==="none"?"clip":"visible",t.style.overflowY=e.verticalOverflow==="clip"?"clip":"visible"}function Dl(t,e,r,n=16,a=false){const i=!!(t.href||t.slideIndex!=null||t.navigationAction),o=i?document.createElement("a"):document.createElement("span");o.className=["pptxv-run",i?"pptxv-run--link":""].filter(Boolean).join(" ");const s=Vi(t.text),d=s&&Ie(s)?Zi(s,t.fontSize??n):void 0;d?(o.dataset.resolvedLabel=s,o.appendChild(d),o.style.display="inline-flex",o.style.alignItems="center",o.style.justifyContent="center",o.style.lineHeight="1"):o.textContent=t.text||"\xA0",o instanceof HTMLAnchorElement&&_i(o,t),t.color?o.style.color=vt(t.color,t.colorAlpha):o.style.color=e;const l=ar(t.fontFamily,t.bold);l&&(o.style.fontWeight=l);const u=Hi(t.fontFamily,t.italic);u&&(o.style.fontStyle=u);const f=[];t.underline&&f.push("underline"),t.strike&&f.push("line-through"),f.length&&(o.style.textDecoration=f.join(" ")),t.highlightColor&&(o.style.backgroundColor=vt(t.highlightColor,t.highlightAlpha)),t.fontSize&&(o.style.fontSize=`${t.fontSize}px`);const m=Wd(t.text,t.fontFamily);m?o.style.fontFamily=m:t.fontFamily&&(o.style.fontFamily=xe(t.fontFamily,{sampleText:t.text,contextText:r}));const h=bd(t,r);return h&&(o.style.letterSpacing=h),t.baselineShift&&(o.style.verticalAlign=`${Number(t.baselineShift.toFixed(4))}em`),a&&(o.style.whiteSpace="pre"),o}function Ni(t){const e=new Map,r=new Map;let n,a;for(const i of t.runs){const o=zl(i);i.fontSize!=null&&(n??(n=i.fontSize),e.set(i.fontSize,(e.get(i.fontSize)??0)+o)),i.fontFamily&&(a??(a=i.fontFamily),r.set(i.fontFamily,(r.get(i.fontFamily)??0)+o))}return{fontSize:ya(e)??n??16,fontFamily:ya(r)??a}}function Hl(t,e){for(const r of t.runs)if(r.color&&r.text.trim().length>0)return vt(r.color,r.colorAlpha);for(const r of t.runs)if(r.color)return vt(r.color,r.colorAlpha);return e}function zl(t){const e=t.text.replace(/[\n\t]/g,""),r=e.trim().length?e.trim():e;return Math.max(Array.from(r).length,1)}function ya(t){let e,r=-1;for(const[n,a]of t.entries())a>r&&(e=n,r=a);return e}function xa(t){return t.runs.map(e=>e.text).join("")}function Mn(t,e){const r=Math.max(t.marginLeft??0,0);return e?Math.max(r+Math.min(t.indent??0,0),0):r}function Cn(t,e){return e?Math.max(t.indent??0,0):t.indent??0}function $i(t,e=false){return Mn(t,e)+Cn(t,e)}function Ul(t,e=false){const r=Mn(t,e),n=Math.max(Cn(t,e),0);return r+n}function Xl(t,e){if(!t.bullet||e>24)return false;const r=t.marginLeft??0,n=t.indent??0;return r<=0||n>=0?false:Math.abs(r+n)<=2}function Yl(t,e){return!e&&!!(t.bullet&&t.indent!=null&&t.indent<0)}function ql(t,e){var n;if(!((n=t.bullet)!=null&&n.char)||t.bullet.autoType||e<24)return false;const r=Ut(t.bullet.fontFamily??"").toLowerCase();return t.bullet.char==="\u2022"&&r==="arial"}function Ii(t,e,r){var a;const n=e.indent!=null&&e.indent<0?Math.abs(e.indent):0;return n>0?Math.max(n,Kr(t,r)):Math.max(Kr(t,r),(a=e.bullet)!=null&&a.autoType?r*2.4:r*1.2)}function _l(t,e,r){const n=Wl(r);for(const a of t.tabStops??[])if(a>e+.5)return Math.max(a-e,4);return n}function Wl(t){return Math.max(t*2.6,24)}function Bi(t,e){return Kr(t.text,t.fontSize??e,t.fontFamily,t.bold,t.italic)}function Kr(t,e,r,n,a){if(!t)return 0;const i=t.replace(/\n/g,""),o=Jl(i,e,r,n,a);if(o!=null&&Number.isFinite(o)&&o>0)return o;let s=0;for(const l of i)s+=Vl(l);return s*(n?1.04:1)*(a?1.02:1)*e}function Jl(t,e,r,n,a){if(!(typeof document>"u"||typeof document.createElement!="function")&&!(typeof navigator<"u"&&/jsdom/i.test(navigator.userAgent)))try{const i=Mi();if(!i)return;const o=[a?"italic":"",ar(r,n)??"400",`${e}px`,r?xe(r,{sampleText:t,contextText:t}):'"Segoe UI", Arial, sans-serif'].filter(Boolean).join(" ");return i.font=o,i.measureText(t).width}catch{return}}function Vl(t){return t===" "?0:t===" "?.33:/[.,:;'"!|`]/.test(t)?.28:/[-_/\\(){}\[\]]/.test(t)?.34:/[A-Z0-9]/.test(t)?.6:/[a-z]/.test(t)?.54:/[\u1100-\u115F\u2E80-\uA4CF\uAC00-\uD7A3\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE6F\uFF00-\uFF60\uFFE0-\uFFE6]/.test(t)?1:.56}function xe(t,e={}){const r=Ut(t),n=[],a=new Set,i=e.contextText&&e.contextText.trim()?e.contextText:e.sampleText,o=!e.symbol&&dd(r)&&ud(e.sampleText,e.contextText),s=l=>{if(!l)return;const u=Mt(l);if(!u)return;const f=u.toLowerCase();a.has(f)||(a.add(f),n.push(Di(u)))},d=l=>{for(const u of l)s(u)};if(!o){s(t),r!==t&&s(r);const l=id(r,i);d(l.length?l:An(r))}return e.emoji&&d(Pi),(e.symbol||En(r))&&d(Oi),o||d(cd(r,e.sampleText)),d(Gl),n.join(", ")}const Gl=["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Helvetica Neue","Arial","Noto Sans","sans-serif"],Pi=["Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji"],Oi=["Segoe UI Symbol","Apple Symbols","Noto Sans Symbols 2","Noto Sans Symbols"],Zl=new Set(["aptos","aptos display","aptos narrow","calibri","calibri light","dengxian","dengxian light","\u7B49\u7EBF","\u7B49\u7EBF light","\u7EDB\u590C\u568E","\u7EDB\u590C\u568E light"]),Ot=["Microsoft YaHei","PingFang SC","Hiragino Sans GB","Noto Sans CJK SC","Source Han Sans SC","WenQuanYi Micro Hei"],de=["SimSun","Songti SC","STSong","Noto Serif CJK SC","Source Han Serif SC"],re=["Yu Gothic UI","Yu Gothic","Meiryo","Hiragino Sans","Noto Sans CJK JP"],nr=["Malgun Gothic","Apple SD Gothic Neo","Noto Sans CJK KR"],Kl=400,Ql=100,td=900,va=5,ed=[{pattern:/\b(thin|hairline)\b/,scale:.25},{pattern:/\b(extra[- ]?light|ultra[- ]?light)\b/,scale:.55},{pattern:/\b(semi[- ]?light|demi[- ]?light)\b/,scale:.88},{pattern:/\blight\b/,scale:.78},{pattern:/\bmedium\b/,scale:1.15},{pattern:/\b(semi[- ]?bold|demi[- ]?bold)\b/,scale:1.38},{pattern:/\b(extra[- ]?bold|ultra[- ]?bold)\b/,scale:2},{pattern:/\b(black|heavy)\b/,scale:2.25},{pattern:/\bbold\b/,scale:1.75}],rd="BESbswy1234567890",nd=32,ad=.1,ba={aptos:["Aptos","Aptos Narrow","Calibri"],"aptos display":["Aptos Display","Aptos","Calibri"],calibri:["Calibri","Carlito"],"calibri light":["Calibri Light","Calibri","Carlito"],roboto:["Roboto","Arial","Helvetica Neue","Helvetica","Liberation Sans"],"roboto light":["Roboto Light","Roboto","Arial","Helvetica Neue","Helvetica","Liberation Sans"],"roboto medium":["Roboto Medium","Roboto","Arial","Helvetica Neue","Helvetica","Liberation Sans"],"roboto mono":["Roboto Mono","Cascadia Mono","Consolas","Courier New","monospace"],"segoe ui":["Segoe UI"],"segoe ui emoji":["Segoe UI Emoji"],"segoe ui symbol":["Segoe UI Symbol"],arial:["Arial","Liberation Sans"],tahoma:["Tahoma"],verdana:["Verdana"],dengxian:["DengXian",...Ot],"dengxian light":["DengXian Light","DengXian",...Ot],\u7B49\u7EBF:["DengXian",...Ot],"\u7B49\u7EBF light":["DengXian Light","DengXian",...Ot],simsun:["SimSun",...de],\u5B8B\u4F53:["SimSun",...de],simhei:["SimHei","Microsoft YaHei",...Ot],\u9ED1\u4F53:["SimHei","Microsoft YaHei",...Ot],"microsoft yahei":["Microsoft YaHei",...Ot],\u5FAE\u8F6F\u96C5\u9ED1:["Microsoft YaHei",...Ot],kaiti:["KaiTi","STKaiti",...de],\u6977\u4F53:["KaiTi","STKaiti",...de],fangsong:["FangSong","STFangsong",...de],\u4EFF\u5B8B:["FangSong","STFangsong",...de],meiryo:["Meiryo",...re],"yu gothic":["Yu Gothic","Yu Gothic UI",...re],\u6E38\u30B4\u30B7\u30C3\u30AF:["Yu Gothic","Yu Gothic UI",...re],"\u6E38\u30B4\u30B7\u30C3\u30AF light":["Yu Gothic Light","Yu Gothic",...re],"ms pgothic":["MS PGothic",...re],"ms pmincho":["MS PMincho","Yu Mincho","Hiragino Mincho ProN"],"malgun gothic":["Malgun Gothic",...nr],"\uB9D1\uC740 \uACE0\uB515":["Malgun Gothic",...nr],batang:["Batang","AppleMyungjo","Noto Serif CJK KR"],wingdings:["Wingdings"],"wingdings 2":["Wingdings 2"],"wingdings 3":["Wingdings 3"],webdings:["Webdings"]};function id(t,e){const r=Mt(t).toLowerCase();return od(r,e)?["Roboto Mono","Roboto","Segoe UI","Arial","Helvetica Neue","Helvetica","Liberation Sans","Cascadia Mono","Consolas","Courier New","monospace"]:Object.prototype.hasOwnProperty.call(ba,r)?ba[r]:[]}function od(t,e){return t!=="roboto mono"||!(e!=null&&e.trim())?false:jn(e)?true:e.trim().split(/\s+/).filter(n=>/[A-Za-z]/.test(n)).length>=3&&!sd(e)}function sd(t){return/[`{}[\]();=<>/\\]|::|->|=>|\b(func|class|const|let|var|return|package|import|export)\b/i.test(t)}function cd(t,e){const r=Mt(t).toLowerCase();if(_e(r,["dengxian","\u7B49\u7EBF","yahei","\u5FAE\u8F6F\u96C5\u9ED1","simsun","\u5B8B\u4F53","simhei","\u9ED1\u4F53","kaiti","\u6977\u4F53","fangsong","\u4EFF\u5B8B"]))return Ot;if(_e(r,["meiryo","yu gothic","\u6E38\u30B4\u30B7\u30C3\u30AF","ms pgothic","ms pmincho"]))return re;if(_e(r,["malgun gothic","\uB9D1\uC740 \uACE0\uB515","batang"]))return nr;const n=ld(e);return n||[]}function ld(t){if(t){if(/[\u4E00-\u9FFF]/.test(t))return Ot;if(/[\u3040-\u30FF]/.test(t))return re;if(/[\u1100-\u11FF\u3130-\u318F\uAC00-\uD7AF]/.test(t))return nr}}function En(t){const e=Mt(t).toLowerCase();return _e(e,["wingdings","webdings","symbol"])}function dd(t){return Zl.has(Ut(t).toLowerCase())}function ud(t,e){const r=t==null?void 0:t.trim();return!!(!r||/^[\x20-\x7E]+$/.test(r)&&/[A-Za-z]/.test(r)||jn(r)&&pd(r))}function jn(t){return!!(t&&/[\u4E00-\u9FFF]/.test(t))}function pd(t){return!!(t&&/[A-Za-z]/.test(t))}function _e(t,e){return e.some(r=>t.includes(r))}function Di(t){return/^(serif|sans-serif|monospace|system-ui|ui-sans-serif|cursive|fantasy|emoji|math|fangsong)$/i.test(t)||/^[A-Za-z0-9_-]+$/.test(t)?t:`"${t.replace(/["\\]/g,"\\$&")}"`}function ar(t,e=false){return e?"700":hd(t)}function hd(t){const e=Ut(t??"").toLowerCase();if(!e)return;const r=fd(e);if(r!=null&&!gd(t??e))return String(md(r))}function fd(t){for(const e of ed)if(e.pattern.test(t))return e.scale}function md(t){const e=Kl*t,r=Math.min(td,Math.max(Ql,e));return Math.round(r/va)*va}function gd(t){const e=Array.from(new Set([Mt(t),Ut(t)].filter(yd)));return e.length?e.some(r=>xd(r)):true}function yd(t){const e=Mt(t);return!e||e.includes(",")?false:!/^(serif|sans-serif|monospace|system-ui|ui-sans-serif|cursive|fantasy|emoji|math|fangsong)$/i.test(e)}function xd(t){const e=ot&&(ot.fontAvailability??(ot.fontAvailability=new Map)),r=Mt(t).toLowerCase(),n=e==null?void 0:e.get(r);if(n!=null)return n;const a=vd(t);return e==null||e.set(r,a),a}function vd(t){const e=["monospace","serif","sans-serif"],r=(ot==null?void 0:ot.baselineWidths)??e.map(n=>wa(n));return ot&&(ot.baselineWidths=r),r.some(n=>n==null)?true:e.some((n,a)=>{const i=wa(`${Di(t)}, ${n}`),o=r[a];return i!=null&&o!=null&&Math.abs(i-o)>ad})}function wa(t){if(!(typeof document>"u"||typeof document.createElement!="function"))try{const e=Mi();return e?(e.font=`normal 400 ${nd}px ${t}`,e.measureText(rd).width):void 0}catch{return}}function Hi(t,e=false){if(e)return"italic";const r=Mt(t??"").toLowerCase();if(/\bitalic\b|\boblique\b/.test(r))return"italic"}function bd(t,e){const r=t.text.replace(/[\n\t]/g,"").trim();if(!(r.length<2||/\s/.test(r))&&!(!/^[\x20-\x7E]+$/.test(r)||!/[A-Za-z]/.test(r))&&!(jn(e)&&(e==null?void 0:e.trim())!==r&&(e!=null&&e.includes(`${r} `)||e!=null&&e.includes(` ${r}`)))&&!((t.fontSize??0)<16))return"-0.04em"}function wd(t,e){var l,u,f,m;const r=Math.max(t.transform.width,1),n=Math.max(t.transform.height,1),a=Math.max(((l=t.line)==null?void 0:l.width)??1,0),i=Id(t.id,t.fill,e,r,n),o=Ui(t.line);if(((u=t.geometry)==null?void 0:u.type)==="custom"){const h=Fd(t.geometry.paths,r,n,i.paint,o,a,t.line);if(h)return{node:h,defs:i.defs}}if(t.shapeType==="line"){const h=document.createElementNS("http://www.w3.org/2000/svg","line"),g=((f=t.geometry)==null?void 0:f.type)==="line"?t.geometry:void 0;return h.setAttribute("x1",String((g==null?void 0:g.x1)??0)),h.setAttribute("y1",String((g==null?void 0:g.y1)??0)),h.setAttribute("x2",String((g==null?void 0:g.x2)??r)),h.setAttribute("y2",String((g==null?void 0:g.y2)??n)),h.setAttribute("stroke",o),h.setAttribute("stroke-width",String(a)),fe(h,t.line),{node:h,defs:lu(h,t,o)}}if(t.shapeType==="ellipse"){const h=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return h.setAttribute("cx",String(r/2)),h.setAttribute("cy",String(n/2)),h.setAttribute("rx",String(r/2)),h.setAttribute("ry",String(n/2)),h.setAttribute("fill",i.paint),h.setAttribute("stroke",o),h.setAttribute("stroke-width",String(a)),fe(h,t.line),{node:h,defs:i.defs}}if(t.shapeType==="rect"||t.shapeType==="roundRect"){const h=document.createElementNS("http://www.w3.org/2000/svg","rect");if(h.setAttribute("x","0"),h.setAttribute("y","0"),h.setAttribute("width",String(r)),h.setAttribute("height",String(n)),h.setAttribute("fill",i.paint),h.setAttribute("stroke",o),h.setAttribute("stroke-width",String(a)),t.shapeType==="roundRect"){const g=Cd(t,r,n);h.setAttribute("rx",String(g)),h.setAttribute("ry",String(g))}return fe(h,t.line),{node:h,defs:i.defs}}const s=Ai(t.shapeType,{width:r,height:n,fill:i.paint,stroke:o,strokeWidth:a,line:t.line,adjustments:((m=t.geometry)==null?void 0:m.type)==="preset"?t.geometry.adjustments:void 0,applyLineStyles:fe,applyDashPattern:qi});if(s)return{node:s,defs:i.defs};const d=document.createElementNS("http://www.w3.org/2000/svg","polygon");return d.setAttribute("points",Td(r,n)),d.setAttribute("fill",i.paint),d.setAttribute("stroke",o),d.setAttribute("stroke-width",String(a)),fe(d,t.line),{node:d,defs:i.defs}}function Fd(t,e,r,n,a,i,o){const s=t.map(l=>Sd(l,e,r,n,a,i,o)).filter(l=>!!l);if(!s.length)return;if(s.length===1)return s[0];const d=document.createElementNS("http://www.w3.org/2000/svg","g");for(const l of s)d.appendChild(l);return d}function Sd(t,e,r,n,a,i,o){const s=kd(t,e,r);if(!s)return;const d=document.createElementNS("http://www.w3.org/2000/svg","path");return d.setAttribute("d",s),d.setAttribute("fill",t.fill==="none"?"none":n),d.setAttribute("stroke",t.stroke==="none"?"none":a),t.stroke!=="none"&&(d.setAttribute("stroke-width",String(i)),fe(d,o),(o==null?void 0:o.lineJoin)==="miter"&&Ad(t)&&d.setAttribute("stroke-linejoin","round")),d}function Ad(t){return t.commands.some(e=>e.type==="Q"||e.type==="C")}function kd(t,e,r){const n=e/Math.max(t.width,1),a=r/Math.max(t.height,1),i=[];for(const o of t.commands)switch(o.type){case"M":i.push(`M ${Ft(o.x*n)} ${Ft(o.y*a)}`);break;case"L":i.push(`L ${Ft(o.x*n)} ${Ft(o.y*a)}`);break;case"Q":i.push(`Q ${Ft(o.x1*n)} ${Ft(o.y1*a)} ${Ft(o.x*n)} ${Ft(o.y*a)}`);break;case"C":i.push(`C ${Ft(o.x1*n)} ${Ft(o.y1*a)} ${Ft(o.x2*n)} ${Ft(o.y2*a)} ${Ft(o.x*n)} ${Ft(o.y*a)}`);break;case"Z":i.push("Z");break}return i.join(" ")}function Ft(t){return String(Number(t.toFixed(3)))}function Td(t,e){return`0,0 ${t},0 ${t},${e} 0,${e}`}function Ld(t){var i,o,s,d;const e=Math.max(((i=t.line)==null?void 0:i.width)??0,0),n=!!((t.shapeType==="line"||t.shapeType.endsWith("Arrow"))&&((o=t.line)!=null&&o.headEnd&&t.line.headEnd!=="none"||(s=t.line)!=null&&s.tailEnd&&t.line.tailEnd!=="none"))?Math.max(e*5,10):0,a=((d=t.geometry)==null?void 0:d.type)==="custom"?Md(t):0;return Number(Math.max(e*1.5,n,a,1).toFixed(3))}function Md(t){var s;if(((s=t.geometry)==null?void 0:s.type)!=="custom")return 0;const e=Math.max(t.transform.width,1),r=Math.max(t.transform.height,1);let n=0,a=0,i=e,o=r;for(const d of t.geometry.paths){const l=e/Math.max(d.width,1),u=r/Math.max(d.height,1);for(const f of d.commands)switch(f.type){case"M":case"L":n=Math.min(n,f.x*l),a=Math.min(a,f.y*u),i=Math.max(i,f.x*l),o=Math.max(o,f.y*u);break;case"Q":n=Math.min(n,f.x1*l,f.x*l),a=Math.min(a,f.y1*u,f.y*u),i=Math.max(i,f.x1*l,f.x*l),o=Math.max(o,f.y1*u,f.y*u);break;case"C":n=Math.min(n,f.x1*l,f.x2*l,f.x*l),a=Math.min(a,f.y1*u,f.y2*u,f.y*u),i=Math.max(i,f.x1*l,f.x2*l,f.x*l),o=Math.max(o,f.y1*u,f.y2*u,f.y*u);break}}return Number(Math.max(-n,-a,i-e,o-r,0).toFixed(3))}function Cd(t,e,r){var i,o;const n=((i=t.geometry)==null?void 0:i.type)==="preset"?(o=t.geometry.adjustments)==null?void 0:o.adj:void 0,a=Ed(n??16667)/1e5;return Number((Math.min(e,r)*a).toFixed(3))}function Ed(t){return Number.isFinite(t)?Math.min(Math.max(t,0),5e4):16667}function jd(t){switch(t){case"middle":return"center";case"bottom":return"flex-end";default:return"flex-start"}}function Rd(t){switch(t){case"middle":return"middle";case"bottom":return"bottom";default:return"top"}}function zi(t){var e;if(t.type==="none"||t.type==="picture")return"transparent";if(t.type==="pattern")return vt(t.backgroundColor??"#FFFFFF",t.backgroundAlpha);if(t.type==="gradient"&&((e=t.stops)!=null&&e.length)){const r=$d(t.stops);if(t.gradientType==="path"){if(t.gradientPath==="rect"){const i=Fa(t.angle??0);return`linear-gradient(${Number(i.toFixed(3))}deg, ${r})`}const a=Xi(t);return`radial-gradient(circle${a?` at ${a.x}% ${a.y}%`:""}, ${r})`}const n=Fa(t.angle??0);return`linear-gradient(${Number(n.toFixed(3))}deg, ${r})`}return t.color?vt(t.color,t.alpha):"transparent"}function Nd(t){var e,r;if(t.type==="solid")return t.color;if(t.type==="gradient")return(r=(e=t.stops)==null?void 0:e[0])==null?void 0:r.color;if(t.type==="pattern")return t.foregroundColor??t.backgroundColor}function vt(t,e){if(e==null)return t;const[r,n,a]=an(t);return`rgba(${r}, ${n}, ${a}, ${e})`}function Ui(t){return!(t!=null&&t.color)||t.color==="transparent"||t.alpha!=null&&t.alpha<=0?"transparent":vt(t.color,t.alpha)}function Fa(t){return((90-t)%360+360)%360}function $d(t){return t.map(e=>`${vt(e.color,e.alpha)} ${Number((e.position*100).toFixed(3))}%`).join(", ")}function Xi(t){if(t.type!=="gradient"||t.gradientType!=="path")return;const e=t.gradientTileRect;if(!e)return;const r=e.left<0?0:e.right<0?100:50,n=e.top<0?0:e.bottom<0?100:50;if(!(r===50&&n===50))return{x:r,y:n}}function Id(t,e,r,n,a){var o;if(e.type==="picture"&&e.mediaId){const s=r.getUrl(e.mediaId);if(!s)return{paint:"transparent",defs:[]};const d=document.createElementNS("http://www.w3.org/2000/svg","pattern");d.id=`${t}-fill-pattern`,d.setAttribute("patternUnits","userSpaceOnUse"),d.setAttribute("x","0"),d.setAttribute("y","0"),d.setAttribute("width",String(n)),d.setAttribute("height",String(a));const l=document.createElementNS("http://www.w3.org/2000/svg","image");if(l.setAttribute("preserveAspectRatio","none"),l.setAttribute("href",s),l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s),e.crop){const u=Math.max(1-e.crop.left-e.crop.right,1e-4),f=Math.max(1-e.crop.top-e.crop.bottom,1e-4);l.setAttribute("x",String(Number((-e.crop.left/u*n).toFixed(3)))),l.setAttribute("y",String(Number((-e.crop.top/f*a).toFixed(3)))),l.setAttribute("width",String(Number((n/u).toFixed(3)))),l.setAttribute("height",String(Number((a/f).toFixed(3))))}else l.setAttribute("x","0"),l.setAttribute("y","0"),l.setAttribute("width",String(n)),l.setAttribute("height",String(a));return e.alpha!=null&&l.setAttribute("opacity",String(e.alpha)),d.appendChild(l),{paint:`url(#${d.id})`,defs:[d]}}if(e.type==="pattern")return Od(t,e);if(e.type!=="gradient"||!((o=e.stops)!=null&&o.length))return{paint:zi(e),defs:[]};if(e.gradientType==="path"){if(e.gradientPath==="rect"){const l=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");l.id=`${t}-fill-gradient`,l.setAttribute("x1","0"),l.setAttribute("y1","0.5"),l.setAttribute("x2","1"),l.setAttribute("y2","0.5"),l.setAttribute("gradientUnits","objectBoundingBox");for(const u of e.stops){const f=document.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset",`${Number((u.position*100).toFixed(3))}%`),f.setAttribute("stop-color",u.color),u.alpha!=null&&f.setAttribute("stop-opacity",String(u.alpha)),l.appendChild(f)}return{paint:`url(#${l.id})`,defs:[l]}}const s=document.createElementNS("http://www.w3.org/2000/svg","radialGradient");s.id=`${t}-fill-gradient`;const d=Xi(e);d&&(s.setAttribute("cx",`${d.x}%`),s.setAttribute("cy",`${d.y}%`));for(const l of e.stops){const u=document.createElementNS("http://www.w3.org/2000/svg","stop");u.setAttribute("offset",`${Number((l.position*100).toFixed(3))}%`),u.setAttribute("stop-color",l.color),l.alpha!=null&&u.setAttribute("stop-opacity",String(l.alpha)),s.appendChild(u)}return{paint:`url(#${s.id})`,defs:[s]}}const i=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");i.id=`${t}-fill-gradient`,i.setAttribute("x1","0"),i.setAttribute("y1","0.5"),i.setAttribute("x2","1"),i.setAttribute("y2","0.5"),i.setAttribute("gradientUnits","objectBoundingBox"),i.setAttribute("gradientTransform",`rotate(${Number(((e.angle??0)%360).toFixed(3))} 0.5 0.5)`);for(const s of e.stops){const d=document.createElementNS("http://www.w3.org/2000/svg","stop");d.setAttribute("offset",`${Number((s.position*100).toFixed(3))}%`),d.setAttribute("stop-color",s.color),s.alpha!=null&&d.setAttribute("stop-opacity",String(s.alpha)),i.appendChild(d)}return{paint:`url(#${i.id})`,defs:[i]}}function Bd(t){const e=vt(t.foregroundColor??"#111827",t.foregroundAlpha),r=vt(t.backgroundColor??"#FFFFFF",t.backgroundAlpha);switch(t.pattern){case"horz":return{color:r,image:`repeating-linear-gradient(180deg, ${e} 0 2px, ${r} 2px 8px)`};case"vert":return{color:r,image:`repeating-linear-gradient(90deg, ${e} 0 2px, ${r} 2px 8px)`};case"ltDnDiag":return{color:r,image:`repeating-linear-gradient(45deg, ${e} 0 2px, ${r} 2px 10px)`};case"ltUpDiag":return{color:r,image:`repeating-linear-gradient(135deg, ${e} 0 2px, ${r} 2px 10px)`};case"diagCross":return{color:r,image:`repeating-linear-gradient(45deg, ${e} 0 2px, transparent 2px 10px), repeating-linear-gradient(135deg, ${e} 0 2px, transparent 2px 10px)`};case"smGrid":return{color:r,image:`repeating-linear-gradient(0deg, ${e} 0 1px, transparent 1px 8px), repeating-linear-gradient(90deg, ${e} 0 1px, transparent 1px 8px)`};case"lgGrid":return{color:r,image:`repeating-linear-gradient(0deg, ${e} 0 2px, transparent 2px 14px), repeating-linear-gradient(90deg, ${e} 0 2px, transparent 2px 14px)`};case"pct10":return kt(e,r,5,.65);case"pct20":return kt(e,r,10,1.75);case"pct25":return kt(e,r,9,1.9);case"pct30":return kt(e,r,8,2);case"pct40":return kt(e,r,8,2.35);case"pct50":return kt(e,r,7,2.4);case"pct60":return kt(e,r,6,2.45);case"pct70":return kt(e,r,5,2.55);case"pct75":return kt(e,r,5,2.7);case"pct80":return kt(e,r,4,2.75);case"pct90":return kt(e,r,4,3);case"pct5":return kt(e,r,4,.45);case"solidDmnd":return Pd(`<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8" viewBox="0 0 8 8">
7
7
  <rect width="8" height="8" fill="${r}"/>
8
8
  <polygon points="4,1.5 6.5,4 4,6.5 1.5,4" fill="${e}"/>
9
- </svg>`,r,8);default:return kt(e,r,4,.45)}}function kt(t,e,r,n){return{color:e,image:`radial-gradient(circle, ${t} 0 ${n}px, transparent ${n}px)`,size:`${r}px ${r}px`,repeat:"repeat",position:"0 0"}}function Pd(t,e,r){return{color:e,image:`url("data:image/svg+xml,${encodeURIComponent(t)}")`,size:`${r}px ${r}px`,repeat:"repeat",position:"0 0"}}function Od(t,e,r,n){const a=document.createElementNS("http://www.w3.org/2000/svg","pattern");a.id=`${t}-fill-pattern`,a.setAttribute("patternUnits","userSpaceOnUse"),a.setAttribute("x","0"),a.setAttribute("y","0");const i=e.foregroundColor??"#111827",o=e.backgroundColor??"#FFFFFF",s=e.foregroundAlpha,d=e.backgroundAlpha,l=(g,x,F,y,S,k)=>{const w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",String(g)),w.setAttribute("y",String(x)),w.setAttribute("width",String(F)),w.setAttribute("height",String(y)),w.setAttribute("fill",S),k!=null&&w.setAttribute("fill-opacity",String(k)),a.appendChild(w)},u=(g,x,F,y,S)=>{const k=document.createElementNS("http://www.w3.org/2000/svg","line");k.setAttribute("x1",String(g)),k.setAttribute("y1",String(x)),k.setAttribute("x2",String(F)),k.setAttribute("y2",String(y)),k.setAttribute("stroke",i),k.setAttribute("stroke-width",String(S)),s!=null&&k.setAttribute("stroke-opacity",String(s)),a.appendChild(k)},f=(g,x,F)=>{const y=document.createElementNS("http://www.w3.org/2000/svg","circle");y.setAttribute("cx",String(g)),y.setAttribute("cy",String(x)),y.setAttribute("r",String(F)),y.setAttribute("fill",i),s!=null&&y.setAttribute("fill-opacity",String(s)),a.appendChild(y)},m=g=>{const x=document.createElementNS("http://www.w3.org/2000/svg","polygon");x.setAttribute("points",g),x.setAttribute("fill",i),s!=null&&x.setAttribute("fill-opacity",String(s)),a.appendChild(x)},h=(g,x)=>{a.setAttribute("width",String(g)),a.setAttribute("height",String(x)),l(0,0,g,x,o,d)};switch(e.pattern){case"horz":h(8,8),u(0,1,8,1,2);break;case"vert":h(8,8),u(1,0,1,8,2);break;case"ltDnDiag":h(10,10),u(-2,10,10,-2,2),u(0,12,12,0,2);break;case"ltUpDiag":h(10,10),u(-2,0,10,12,2),u(0,-2,12,10,2);break;case"diagCross":h(10,10),u(-2,10,10,-2,2),u(0,12,12,0,2),u(-2,0,10,12,2),u(0,-2,12,10,2);break;case"smGrid":h(8,8),u(0,1,8,1,1),u(1,0,1,8,1);break;case"lgGrid":h(14,14),u(0,2,14,2,2),u(2,0,2,14,2);break;case"pct10":h(5,5),f(1.25,1.25,.65);break;case"pct20":h(10,10),f(2,2,1.75);break;case"pct25":h(9,9),f(2,2,1.9);break;case"pct30":h(8,8),f(2,2,2);break;case"pct40":h(8,8),f(2,2,2.35);break;case"pct50":h(7,7),f(2,2,2.4);break;case"pct60":h(6,6),f(2,2,2.45);break;case"pct70":h(5,5),f(1.8,1.8,2.55);break;case"pct75":h(5,5),f(1.8,1.8,2.7);break;case"pct80":h(4,4),f(1.5,1.5,2.75);break;case"pct90":h(4,4),f(1.5,1.5,3);break;case"pct5":h(4,4),f(1,1,.45);break;case"solidDmnd":h(8,8),m("4,1.5 6.5,4 4,6.5 1.5,4");break;default:h(4,4),f(1,1,.45);break}return{paint:`url(#${a.id})`,defs:[a]}}function Dd(t,e){if(!e.borders)return;const r=[["top",e.borders.top],["right",e.borders.right],["bottom",e.borders.bottom],["left",e.borders.left]];for(const[n,a]of r)a&&t.style.setProperty(`border-${n}`,Yi(a))}function Yi(t){const e=t.width??1,r=Ui(t);if(e<=0||r==="transparent")return"0px solid transparent";const n=Hd(t.compound)??zd(t.dash);return`${Number(e.toFixed(3))}px ${n} ${r}`}function qi(t,e){const r=Ud(e);if(r){t.setAttribute("stroke-dasharray",r);return}t.removeAttribute("stroke-dasharray")}function fe(t,e,r={}){qi(t,e),(e==null?void 0:e.dashOffset)!=null&&Number.isFinite(e.dashOffset)?t.setAttribute("stroke-dashoffset",String(Number(e.dashOffset.toFixed(3)))):t.removeAttribute("stroke-dashoffset"),e!=null&&e.lineCap?t.setAttribute("stroke-linecap",e.lineCap):t.removeAttribute("stroke-linecap");const n=(e==null?void 0:e.lineJoin)??r.defaultJoin;n?t.setAttribute("stroke-linejoin",n):t.removeAttribute("stroke-linejoin"),n==="miter"&&(e==null?void 0:e.miterLimit)!=null?t.setAttribute("stroke-miterlimit",String(Number(e.miterLimit.toFixed(3)))):t.removeAttribute("stroke-miterlimit")}function Hd(t){switch(t){case"double":case"thickThin":case"thinThick":case"triple":return"double";default:return}}function zd(t){switch(t){case"dot":case"sysDot":return"dotted";case"dash":case"sysDash":case"lgDash":case"dashDot":case"sysDashDot":case"lgDashDot":case"lgDashDotDot":case"sysDashDotDot":return"dashed";default:return"solid"}}function Ud(t){var a;const e=(a=t==null?void 0:t.dashPattern)==null?void 0:a.filter(i=>Number.isFinite(i)&&i>0);if(e!=null&&e.length)return e.map(i=>String(Number(i.toFixed(3)))).join(" ");if(!(t!=null&&t.dash)||t.dash==="solid")return;const r=Math.max(t.width??1,1),n=t.lineCap??"butt";switch(t.dash){case"dot":case"sysDot":return ee(r,n,1,1.8);case"dash":case"sysDash":return ee(r,n,3,2);case"lgDash":return ee(r,n,6,3);case"dashDot":case"sysDashDot":return ee(r,n,3,2,1,2);case"lgDashDot":return ee(r,n,6,3,1,3);case"lgDashDotDot":case"sysDashDotDot":return ee(r,n,6,3,1,2,1,2);default:return ee(r,n,3,2)}}function ee(t,e,...r){const n=e==="round"||e==="square";return r.map((a,i)=>{let o=t*a;return n&&i%2===0&&(o=Math.max(o-t,.01)),String(Number(o.toFixed(3)))}).join(" ")}function _i(t,e){t.href=e.href??(e.slideIndex!=null?`#slide-${e.slideIndex+1}`:`#action-${e.navigationAction??"link"}`),e.href?(t.target="_blank",t.rel="noreferrer noopener",t.setAttribute("referrerpolicy","no-referrer")):(t.removeAttribute("target"),t.removeAttribute("rel"),t.removeAttribute("referrerpolicy")),e.slideIndex!=null&&(t.dataset.slideIndex=String(e.slideIndex)),e.navigationAction&&(t.dataset.slideAction=e.navigationAction)}function Wi(t,e){if(!t.bullet)return"";if(t.bullet.char)return Zd(t.bullet.char,t.bullet.fontFamily);if(!t.bullet.autoType)return"";const r=Math.max(0,t.level??0);e.length=r+1;const n=Math.max(1,t.bullet.startAt??1),a=e[r]==null?n:e[r]+1;return e[r]=a,Gd(a,t.bullet.autoType)}function Xd(t,e){return t.bullet&&t.bullet.color?vt(t.bullet.color,t.bullet.colorAlpha):e}function Yd(t,e){if(!t.bullet)return;if(Ie(e))return Ji(e);const r=t.bullet.fontFamily;if(!(!r||!qd(t,e)))return xe(r,{symbol:true,sampleText:e})}function qd(t,e){var a,i;const r=(a=t.bullet)==null?void 0:a.fontFamily;if(!r)return false;const n=(i=t.bullet)==null?void 0:i.char;return n&&n!==e?false:!Ie(e)||!En(r)}function Ie(t){return t?/^[\u2022\u25A0-\u25FF\u2713-\u2714\u27A2\u2460-\u2473\u2474-\u2487\u2488-\u249B]+[.)、.。]?$/.test(t):false}function Ji(t){return xe(Oi[0],{symbol:true,sampleText:t})}function _d(t){return xe(Pi[0],{emoji:true,sampleText:t})}function Vi(t){const e=t.trim();if(!(!e||e!==t)&&(Ie(e)||Gi(e)))return e}function Wd(t,e){const r=Vi(t);if(r){if(Gi(r))return _d(r);if(Ie(r)||En(e??""))return Ji(r)}}function Gi(t){for(const e of t){const r=e.codePointAt(0)??0;if(r===65039||r===8205||r>=126976)return true;if(r>=9728&&r<=9983||r>=9984&&r<=10175)return t.includes("\uFE0F")}return false}function Jd(t,e){return Zi(t,e)}function Zi(t,e){const r=Vd(t);if(!r)return;const n=Number(Math.max(e*.92,12).toFixed(3)),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 16 16"),a.setAttribute("width",String(n)),a.setAttribute("height",String(n)),a.setAttribute("aria-hidden","true"),a.style.display="block",a.style.flex="0 0 auto",a.style.overflow="visible";const i=o=>{o.setAttribute("fill","currentColor"),a.appendChild(o)};switch(r){case"square":{const o=document.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x","2"),o.setAttribute("y","2"),o.setAttribute("width","12"),o.setAttribute("height","12"),i(o);break}case"circle":{const o=document.createElementNS("http://www.w3.org/2000/svg","circle");o.setAttribute("cx","8"),o.setAttribute("cy","8"),o.setAttribute("r","6"),i(o);break}case"circleOutline":{const o=document.createElementNS("http://www.w3.org/2000/svg","circle");o.setAttribute("cx","8"),o.setAttribute("cy","8"),o.setAttribute("r","5.6"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.65"),a.appendChild(o);break}case"diamond":{const o=document.createElementNS("http://www.w3.org/2000/svg","polygon");o.setAttribute("points","8,1.5 14.5,8 8,14.5 1.5,8"),i(o);break}case"squareOutline":{const o=document.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x","2.25"),o.setAttribute("y","2.25"),o.setAttribute("width","11.5"),o.setAttribute("height","11.5"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.75"),a.appendChild(o);break}case"check":{const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d","M 2.5 8.5 L 6.4 12.2 L 13.5 3.6"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2.2"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),a.appendChild(o);break}case"arrow":{const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d","M 1.5 8 L 9.5 8 L 9.5 4.6 L 14.5 8 L 9.5 11.4 L 9.5 8.9 L 1.5 8.9 Z"),i(o);break}}return a}function Vd(t){switch(t){case"\u25A0":return"square";case"\u25CF":return"circle";case"\u25CB":return"circleOutline";case"\u25C6":return"diamond";case"\u25A1":return"squareOutline";case"\u2714":return"check";case"\u27A2":return"arrow";default:return}}function Gd(t,e){switch(e){case"circleNumDbPlain":return ru(t);case"ea1JpnChsDbPeriod":return`${nu(t)}.`;case"arabicPlain":return`${t}`;case"arabicParenR":return`${t})`;case"arabicParenBoth":return`(${t})`;case"alphaLcParenR":return`${ue(t).toLowerCase()})`;case"alphaLcParenBoth":return`(${ue(t).toLowerCase()})`;case"alphaLcPeriod":return`${ue(t).toLowerCase()}.`;case"alphaUcParenR":return`${ue(t)})`;case"alphaUcParenBoth":return`(${ue(t)})`;case"alphaUcPeriod":return`${ue(t)}.`;case"romanLcParenR":return`${pe(t).toLowerCase()})`;case"romanLcParenBoth":return`(${pe(t).toLowerCase()})`;case"romanLcPeriod":return`${pe(t).toLowerCase()}.`;case"romanUcParenR":return`${pe(t)})`;case"romanUcParenBoth":return`(${pe(t)})`;case"romanUcPeriod":return`${pe(t)}.`;case"arabicPeriod":default:return`${t}.`}}function Zd(t,e){const r=Ut(e??"").toLowerCase();return r.includes("wingdings")?Kd(t):r.includes("webdings")?Qd(t):t}function Kd(t){switch(t){case"n":return"\u25A0";case"l":return"\u25CF";case"u":return"\u25C6";case"p":return"\u25A1";case"\xFC":return"\u2714";case"\xD8":return"\u27A2";default:return tu[t]??t}}function Qd(t){switch(t){case"8":return"\u2022";case"=":return"\u25A0";case">":return"\u25C6";default:return eu[t]??t}}const tu={n:"\u25A0",l:"\u25CF",u:"\u25C6",p:"\u25A1",\u00FC:"\u2713",\u00D8:"\u2794"},eu={8:"\u2022","=":"\u25A0",">":"\u25C6"};function ru(t){return["","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473"][t]??`${t}`}function nu(t){const e=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"];if(t<=0)return`${t}`;if(t<10)return e[t];if(t===10)return"\u5341";if(t<20)return`\u5341${e[t%10]}`;if(t<100){const r=Math.floor(t/10),n=t%10;return`${e[r]}\u5341${n?e[n]:""}`}return`${t}`}function Ki(t,e){if(t.href)return e?`Open link: ${e}`:"Open external link";if(t.slideIndex!=null)return e?`Go to slide ${t.slideIndex+1}: ${e}`:`Go to slide ${t.slideIndex+1}`;switch(t.navigationAction){case"next":return"Go to next slide";case"previous":return"Go to previous slide";case"first":return"Go to first slide";case"last":return"Go to last slide";case"lastViewed":return"Return to last viewed slide";default:return e??"Linked slide item"}}function au(t,e){return t.href?e?`${e}: ${t.href}`:t.href:Ki(t,e)}function Et(t){return`${Number(t.toFixed(6))}%`}function iu(t){return t.replace(/["\\]/g,"\\$&")}function ue(t){let e=Math.max(1,Math.floor(t)),r="";for(;e>0;)e-=1,r=String.fromCharCode(65+e%26)+r,e=Math.floor(e/26);return r||"A"}function pe(t){const e=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];let r=Math.max(1,Math.floor(t)),n="";for(const[a,i]of e)for(;r>=a;)n+=i,r-=a;return n||"I"}function ou(t){return t.paragraphs.some(e=>e.runs.some(r=>r.text.trim().length>0))}function Rn(t){return t.paragraphs.some(e=>e.runs.some(r=>!!(r.href||r.slideIndex!=null||r.navigationAction)))}function su(t){return t.cells.some(e=>Rn(e.textFrame))}function cu(t){return!!(t.href||t.slideIndex!=null||t.navigationAction)}function lu(t,e,r){var i,o,s;const n=[],a=Math.max(((i=e.line)==null?void 0:i.width)??1,1);if((o=e.line)!=null&&o.headEnd&&e.line.headEnd!=="none"){const d=Fa(`${e.id}-head`,e.line.headEnd,r,a);t.setAttribute("marker-start",`url(#${d.id})`),n.push(d)}if((s=e.line)!=null&&s.tailEnd&&e.line.tailEnd!=="none"){const d=Fa(`${e.id}-tail`,e.line.tailEnd,r,a);t.setAttribute("marker-end",`url(#${d.id})`),n.push(d)}return n}function Fa(t,e,r,n){const a=du(e),i=document.createElementNS("http://www.w3.org/2000/svg","marker");i.id=t,i.setAttribute("viewBox","0 0 10 10"),i.setAttribute("markerWidth",String(Number((a*2).toFixed(3)))),i.setAttribute("markerHeight",String(Number((a*2).toFixed(3)))),i.setAttribute("refX",String(uu(e))),i.setAttribute("refY","5"),i.setAttribute("orient","auto-start-reverse"),i.setAttribute("markerUnits","strokeWidth");const o=pu(e,r,n);return i.appendChild(o),i}function du(t){switch(t){case"arrow":return 3;case"oval":return 2.8;case"diamond":case"stealth":case"triangle":default:return 2.4}}function uu(t){switch(t){case"arrow":return 9.2;case"stealth":return 8.8;case"oval":return 7.6;case"diamond":return 8.4;case"triangle":default:return 8.6}}function pu(t,e,r){switch(t){case"diamond":{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 5 L 4 1 L 8 5 L 4 9 z"),n.setAttribute("fill",e),n}case"oval":{const n=document.createElementNS("http://www.w3.org/2000/svg","circle");return n.setAttribute("cx","4.5"),n.setAttribute("cy","5"),n.setAttribute("r","3"),n.setAttribute("fill",e),n}case"stealth":{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 0 L 8 5 L 0 10 L 2.6 5 z"),n.setAttribute("fill",e),n}case"arrow":{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 0 L 8 5 L 0 10"),n.setAttribute("fill","none"),n.setAttribute("stroke",e),n.setAttribute("stroke-width",String(Number(Math.max(r*.9,1.25).toFixed(3)))),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round"),n}case"triangle":default:{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 0 L 8 5 L 0 10 z"),n.setAttribute("fill",e),n}}}function hu(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");let e="";for(const r of t)e+=String.fromCharCode(r);return btoa(e)}function Qi(t,e){var S,k;const r=new AbortController,n=r.signal,a=new Set,i=new Set,o=new WeakSet;let s=[],d=false;const l=t.style.touchAction??"",u=e.pan?"none":"pan-x pan-y";t.style.touchAction=u;const f=w=>Array.from(w.touches).filter(T=>a.has(T.identifier)),m=w=>w.length<2?0:Math.hypot(w[1].clientX-w[0].clientX,w[1].clientY-w[0].clientY),h=()=>{for(const w of i)w.removeEventListener("touchmove",x),w.removeEventListener("touchend",F),w.removeEventListener("touchcancel",g);i.clear(),a.clear(),s=[],d=false},g=()=>h(),x=w=>{var N,I;if(o.has(w))return;if(o.add(w),((N=e.enabled)==null?void 0:N.call(e))===false){h();return}const T=f(w);if(T.length){if((e.pan||T.length>1||d)&&w.preventDefault(),T.length>1&&s.length>1){d=true;const C=m(s),M=m(T),H=e.getScale();if(C>0&&M>0&&Number.isFinite(H)&&H>0){const z=t.getBoundingClientRect(),Y=(T[0].clientX+T[1].clientX)/2-z.left,D=(T[0].clientY+T[1].clientY)/2-z.top,P=t.scrollLeft,j=t.scrollTop,O=Math.max(e.minScale??.1,Math.min(e.maxScale??8,H*M/C));if(O!==H&&(e.setScale(O,{x:Y,y:D}),!e.pan)){const $=e.getScale()/H;t.scrollLeft=(P+Y)*$-Y,t.scrollTop=(j+D)*$-D}}}else T.length===1&&s.length===1&&T[0].identifier===s[0].identifier&&((I=e.pan)==null||I.call(e,T[0].clientX-s[0].clientX,T[0].clientY-s[0].clientY));s=T}},F=w=>{o.has(w)||(o.add(w),s=f(w),s.length||h())};t.addEventListener("touchstart",w=>{var N,I;if(((N=e.enabled)==null?void 0:N.call(e))===false)return;const T=w.target;if(!(!a.size&&((I=T==null?void 0:T.closest)!=null&&I.call(T,'button, input, select, textarea, video, audio, [contenteditable="true"]')))){for(const C of Array.from(w.changedTouches))a.add(C.identifier);s=f(w),d||(d=s.length>1),(e.pan||d)&&w.preventDefault(),w.target&&!i.has(w.target)&&(i.add(w.target),w.target.addEventListener("touchmove",x,{passive:false,signal:n}),w.target.addEventListener("touchend",F,{signal:n}),w.target.addEventListener("touchcancel",g,{signal:n}))}},{passive:false,signal:n});const y=()=>r.abort();return n.addEventListener("abort",()=>{var w;h(),t.style.touchAction===u&&(t.style.touchAction=l),(w=e.signal)==null||w.removeEventListener("abort",y)},{once:true}),(S=e.signal)!=null&&S.aborted?y():(k=e.signal)==null||k.addEventListener("abort",y,{once:true}),y}class fu{constructor(e,r={}){E(this,"options");E(this,"root");E(this,"scrollArea");E(this,"unbindTouch",()=>{});E(this,"listeners",{rendered:new Set,error:new Set,slidechange:new Set,scalechange:new Set,warnings:new Set});E(this,"resizeObserver");E(this,"shells",[]);E(this,"mountedSlides",new Set);E(this,"mountedStages",new Map);E(this,"slideRoots",new Map);E(this,"requestToken",0);E(this,"fallbackScrollRaf",0);E(this,"activeAbortController",null);E(this,"mediaRegistry",null);E(this,"presentation",null);E(this,"lastViewedSlide",null);E(this,"navigationSourceSlide",null);E(this,"navigationTargetSlide",null);E(this,"navigationSettleTimer",0);E(this,"state",{loading:false,error:null,currentSlide:0,slideCount:0,scale:1,fit:"contain",warnings:[],presentation:null,mediaRegistry:null});E(this,"handleFallbackScroll",()=>{this.fallbackScrollRaf||(this.fallbackScrollRaf=requestAnimationFrame(()=>{this.fallbackScrollRaf=0,this.syncCurrentSlideToViewport()}))});E(this,"handleNavigationInterruption",()=>{this.navigationTargetSlide!=null&&(this.navigationSourceSlide=null,this.clearNavigationSettleTimer(),this.handleFallbackScroll())});E(this,"handleLinkClick",e2=>{var i;const r2=e2.target instanceof Element?e2.target.closest("[data-slide-index], [data-slide-action]"):null;if(!(r2 instanceof HTMLAnchorElement))return;const n=r2.dataset.slideAction;if(n)switch(e2.preventDefault(),n){case"next":this.next();return;case"previous":this.prev();return;case"first":this.goToSlide(0);return;case"last":this.goToSlide(Math.max((((i=this.presentation)==null?void 0:i.slides.length)??1)-1,0));return;case"lastViewed":this.lastViewedSlide!=null&&this.goToSlide(this.lastViewedSlide);return;default:return}const a=Number(r2.dataset.slideIndex);Number.isFinite(a)&&(e2.preventDefault(),this.goToSlide(a))});this.container=e,this.options={width:r.width??0,height:r.height??0,fit:r.fit??"contain",initialScale:r.initialScale??1,minScale:r.minScale??.4,maxScale:r.maxScale??4,virtual:r.virtual??true},this.state.fit=this.options.fit,this.state.scale=gt(this.options.initialScale,this.options.minScale,this.options.maxScale),this.root=document.createElement("div"),this.root.className="pptxv-viewer",this.options.width&&(this.root.style.width=`${this.options.width}px`),this.options.height&&(this.root.style.height=`${this.options.height}px`),this.scrollArea=document.createElement("div"),this.scrollArea.className="pptxv-scroll-area",this.root.appendChild(this.scrollArea),this.root.addEventListener("click",this.handleLinkClick),this.container.innerHTML="",this.container.appendChild(this.root),this.bindResizeObserver()}async preview(e){var n,a;this.unbindTouch();const r=++this.requestToken;(n=this.activeAbortController)==null||n.abort(),this.activeAbortController=typeof AbortController<"u"?new AbortController:null,this.beginLoadingState(),this.renderLoadingState();try{const i=await Do(e,{signal:(a=this.activeAbortController)==null?void 0:a.signal});if(r!==this.requestToken)return;this.applyPresentation(i)}catch(i){if(r!==this.requestToken||gu(i))return;const o=i instanceof Error?i:new Error(String(i));this.state.loading=false,this.state.error=o.message,this.renderErrorState(o.message),this.emit("error",o)}finally{r===this.requestToken&&(this.activeAbortController=null)}}destroy(){var e,r,n;this.unbindTouch(),this.requestToken+=1,(e=this.activeAbortController)==null||e.abort(),this.activeAbortController=null,(r=this.resizeObserver)==null||r.disconnect(),(n=this.mediaRegistry)==null||n.destroy(),this.root.removeEventListener("click",this.handleLinkClick),this.clearRenderedSlides(),this.container.innerHTML="",this.presentation=null,this.mediaRegistry=null,this.state.presentation=null,this.state.mediaRegistry=null,this.state.loading=false,this.state.error=null,this.state.slideCount=0,this.state.currentSlide=0,this.state.warnings=[],this.lastViewedSlide=null,this.navigationSourceSlide=null,this.clearNavigationSettleTimer()}setScale(e){const r=gt(e,this.options.minScale,this.options.maxScale),n=this.state.fit!=="none"||r!==this.state.scale;this.state.fit="none",this.state.scale=r,n&&(this.layoutSlides(),this.emit("scalechange",this.getState()))}fit(e){const r=e??this.state.fit,n=r!==this.state.fit;this.state.fit=r,this.applyFitScale(),!(!n&&!this.presentation)&&(this.layoutSlides(),this.emit("scalechange",this.getState()))}goToSlide(e){const r=gt(e,0,Math.max(this.shells.length-1,0)),n=this.shells[r];n&&(this.beginProgrammaticNavigation(),this.navigationTargetSlide=r,n.scrollIntoView({behavior:Aa(),block:"start"}),this.setCurrentSlide(r))}next(){this.goToSlide(this.state.currentSlide+1)}prev(){this.goToSlide(this.state.currentSlide-1)}getState(){return{...this.state,presentation:this.presentation,mediaRegistry:this.mediaRegistry}}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}emit(e,r){for(const n of this.listeners[e])n(r)}applyPresentation(e){var r;(r=this.mediaRegistry)==null||r.destroy(),this.presentation=e,this.lastViewedSlide=null,this.mediaRegistry=new Li(e),this.state.loading=false,this.state.error=null,this.state.presentation=e,this.state.mediaRegistry=this.mediaRegistry,this.state.slideCount=e.slides.length,this.state.currentSlide=0,this.state.warnings=e.warnings,this.clearRenderedSlides(),this.state.fit!=="none"?this.applyFitScale():this.state.scale=gt(this.state.scale,this.options.minScale,this.options.maxScale),this.scrollArea.scrollTop=0,this.renderSlideShells(),this.unbindTouch=Qi(this.scrollArea,{getScale:()=>this.state.scale,setScale:n=>this.setScale(n),enabled:()=>!this.state.loading&&!!this.presentation,minScale:this.options.minScale,maxScale:this.options.maxScale}),this.emit("warnings",e.warnings),this.emit("rendered",this.getState())}renderLoadingState(){this.clearRenderedSlides();const e=document.createElement("div");e.className="pptxv-loading",e.textContent="Loading presentation...",this.scrollArea.appendChild(e)}renderErrorState(e){this.clearRenderedSlides();const r=document.createElement("div");r.className="pptxv-loading pptxv-loading--error",r.textContent=`Unable to load presentation: ${e}`,this.scrollArea.appendChild(r)}renderSlideShells(){if(this.clearRenderedSlides(),!!this.presentation){if(this.presentation.slides.length===0){const e=document.createElement("div");e.className="pptxv-loading pptxv-loading--empty",e.textContent="No slides in presentation.",this.scrollArea.appendChild(e);return}this.presentation.slides.forEach((e,r)=>{const n=document.createElement("div");n.className="pptxv-slide-shell",n.dataset.slideIndex=String(r),this.scrollArea.appendChild(n),this.shells.push(n)}),this.layoutSlides(),this.bindSlideTracking()}}layoutSlides(){this.presentation&&(this.presentation.slides.forEach((e,r)=>{const n=this.shells[r];n&&(n.style.width=`${e.width*this.state.scale}px`,n.style.minHeight=`${e.height*this.state.scale}px`,n.style.height=`${e.height*this.state.scale}px`)}),this.syncMountedSlides(),this.handleFallbackScroll())}syncMountedSlides(){var r;if(!this.presentation||!this.mediaRegistry)return;const e=new Set;if(this.options.virtual){e.add(this.state.currentSlide),this.navigationTargetSlide!=null&&e.add(this.navigationTargetSlide);const n=this.getTrackingViewport();if(n){let a=this.state.currentSlide;const i=(r=this.shells[a])==null?void 0:r.getBoundingClientRect();i&&(i.bottom<=n.top||i.top>=n.bottom)&&(a=this.findTrackedSlideIndex()??a,e.add(a));for(const o of[-1,1])for(let s=a+o;s>=0&&s<this.shells.length;s+=o){const d=this.shells[s].getBoundingClientRect();if(d.height<=0||d.bottom<=n.top||d.top>=n.bottom)break;e.add(s)}}}else for(let n=0;n<this.presentation.slides.length;n+=1)e.add(n);for(const n of[...this.mountedSlides])e.has(n)||this.unmountSlide(n);for(const n of e){if(this.mountedSlides.has(n)){this.updateMountedSlide(n);continue}this.mountSlide(n)}}refreshFonts(){if(!this.presentation||this.state.loading)return;const e=this.scrollArea.scrollTop,r=this.scrollArea.scrollLeft,n=[...this.mountedSlides];for(const a of n)this.unmountSlide(a);for(const a of n)this.mountSlide(a);this.scrollArea.scrollTop=e,this.scrollArea.scrollLeft=r,this.emit("rendered",this.getState())}mountSlide(e){if(!this.presentation||!this.mediaRegistry)return;const r=this.shells[e];if(!r)return;const n=document.createElement("div");n.className="pptxv-slide-stage";const a=el(this.presentation.slides[e],this.presentation,{mediaRegistry:this.mediaRegistry});n.appendChild(a),r.appendChild(n),this.mountedStages.set(e,n),this.slideRoots.set(e,a),this.mountedSlides.add(e),this.updateMountedSlide(e)}updateMountedSlide(e){if(!this.presentation)return;const r=this.mountedStages.get(e),n=this.slideRoots.get(e),a=this.presentation.slides[e];!r||!n||!a||(r.style.width=`${a.width*this.state.scale}px`,r.style.height=`${a.height*this.state.scale}px`,n.style.transform=`scale(${this.state.scale})`,n.style.transformOrigin="top left")}unmountSlide(e){var r;(r=this.mountedStages.get(e))==null||r.remove(),this.mountedStages.delete(e),this.slideRoots.delete(e),this.mountedSlides.delete(e)}bindResizeObserver(){typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver(()=>{this.presentation&&this.state.fit!=="none"&&(this.applyFitScale(),this.layoutSlides())}),this.resizeObserver.observe(this.root))}bindSlideTracking(){this.scrollArea.removeEventListener("scroll",this.handleFallbackScroll),this.scrollArea.addEventListener("scroll",this.handleFallbackScroll,{passive:true});for(const e of["wheel","touchstart","pointerdown"])this.scrollArea.removeEventListener(e,this.handleNavigationInterruption),this.scrollArea.addEventListener(e,this.handleNavigationInterruption,{passive:true});typeof window<"u"&&(window.removeEventListener("scroll",this.handleFallbackScroll),window.removeEventListener("resize",this.handleFallbackScroll),window.addEventListener("scroll",this.handleFallbackScroll,{passive:true}),window.addEventListener("resize",this.handleFallbackScroll,{passive:true}))}syncCurrentSlideToViewport(){if(this.navigationTargetSlide!=null){this.syncMountedSlides();return}const e=this.findTrackedSlideIndex();e!=null&&this.setCurrentSlide(e)}findTrackedSlideIndex(){if(!this.shells.length)return null;const e=this.getTrackingViewport();if(!e)return null;let r=null,n=-1,a=Number.POSITIVE_INFINITY,i=0,o=Number.POSITIVE_INFINITY;const s=new Map,d=m=>{let h=s.get(m);return h||(h=this.shells[m].getBoundingClientRect(),s.set(m,h)),h};let l=0,u=this.shells.length,f=false;for(;l<u;){const m=Math.floor((l+u)/2),h=d(m);if(!Number.isFinite(h.top)||!Number.isFinite(h.height)||h.height<=0){f=true;break}h.bottom<=e.top?l=m+1:u=m}for(let m=f?0:Math.max(0,l-1);m<this.shells.length;m++){const h=d(m);if(!Number.isFinite(h.top)||!Number.isFinite(h.height)||h.height<=0)continue;const g=h.top+h.height/2,x=Math.abs(g-e.center);x<o&&(o=x,i=m);const F=Math.max(h.top,e.top),S=Math.min(h.bottom,e.bottom)-F;if(S<=0){if(!f&&h.top>=e.bottom)break;continue}const k=S/h.height,w=F+S/2,T=Math.abs(w-e.center);(k>n+1e-4||Math.abs(k-n)<=1e-4&&T<a)&&(r=m,n=k,a=T)}return r??i}getTrackingViewport(){const e=this.scrollArea.getBoundingClientRect();if(!Number.isFinite(e.top)||!Number.isFinite(e.bottom))return null;const r=typeof window<"u"&&(window.innerHeight||document.documentElement.clientHeight)||e.height,n=Math.max(e.top,0),a=Math.min(e.bottom,r);return a<=n?null:{top:n,bottom:a,center:n+(a-n)/2}}setCurrentSlide(e){if(e===this.state.currentSlide){this.syncMountedSlides();return}const r=this.state.scale,n=this.state.currentSlide;this.lastViewedSlide=this.navigationSourceSlide??n,this.state.currentSlide=e,this.state.fit!=="none"?(this.applyFitScale(),this.layoutSlides()):this.syncMountedSlides(),this.emit("slidechange",this.getState()),this.state.scale!==r&&this.emit("scalechange",this.getState())}beginProgrammaticNavigation(){if(this.navigationSourceSlide=this.state.currentSlide,this.clearNavigationSettleTimer(),typeof window>"u")return;const e=Aa()==="smooth"?700:50;this.navigationSettleTimer=window.setTimeout(()=>{this.navigationSettleTimer=0,this.navigationSourceSlide=null,this.navigationTargetSlide=null,this.syncCurrentSlideToViewport()},e)}clearNavigationSettleTimer(){this.navigationTargetSlide=null,this.navigationSettleTimer&&(clearTimeout(this.navigationSettleTimer),this.navigationSettleTimer=0)}applyFitScale(){var o;if(!((o=this.presentation)!=null&&o.slides.length))return;const e=this.presentation.slides[this.state.currentSlide]??this.presentation.slides[0],r=Math.max(this.scrollArea.clientWidth-24,120),n=Math.max(this.scrollArea.clientHeight-24,120),a=r/e.width,i=Math.min(a,n/e.height);this.state.scale=gt(this.state.fit==="width"?a:i,this.options.minScale,this.options.maxScale)}beginLoadingState(){var e;(e=this.mediaRegistry)==null||e.destroy(),this.mediaRegistry=null,this.presentation=null,this.lastViewedSlide=null,this.navigationSourceSlide=null,this.clearNavigationSettleTimer(),this.state.loading=true,this.state.error=null,this.state.presentation=null,this.state.mediaRegistry=null,this.state.currentSlide=0,this.state.slideCount=0,this.state.warnings=[]}clearRenderedSlides(){this.clearNavigationSettleTimer(),this.navigationSourceSlide=null,this.fallbackScrollRaf&&(cancelAnimationFrame(this.fallbackScrollRaf),this.fallbackScrollRaf=0),this.scrollArea.removeEventListener("scroll",this.handleFallbackScroll);for(const e of["wheel","touchstart","pointerdown"])this.scrollArea.removeEventListener(e,this.handleNavigationInterruption);typeof window<"u"&&(window.removeEventListener("scroll",this.handleFallbackScroll),window.removeEventListener("resize",this.handleFallbackScroll)),this.shells=[],this.mountedSlides.clear(),this.mountedStages.clear(),this.slideRoots.clear(),this.scrollArea.innerHTML=""}}function mu(t,e){return new fu(t,e)}function gu(t){return t instanceof Error&&t.name==="AbortError"}function Aa(){return typeof window>"u"||typeof window.matchMedia!="function"?"smooth":window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}const ne={maxDepth:8,maxEntryBytes:128*1024*1024,maxExpandedBytes:512*1024*1024,maxEntries:2e4};function to(){return{depth:0,budget:{expandedBytes:0}}}function yu(t){if(t.depth>=ne.maxDepth)throw new Error("The maximum nested preview depth has been reached.");return{depth:t.depth+1,budget:t.budget}}function qt(t,e){return e?new Promise((r,n)=>{const a=()=>{i(),n(new DOMException("Preview cancelled.","AbortError"))},i=()=>e.removeEventListener("abort",a);e.addEventListener("abort",a,{once:true}),e.aborted&&a(),t.then(o=>{i(),r(o)},o=>{i(),n(o)})}):t}async function xu(t,e,r,n){n==null||n.throwIfAborted();const a=e??0;if(!Number.isSafeInteger(a)||a<0||a>ne.maxEntryBytes)throw new Error("Attachment exceeds the preview size limit.");if(r.budget.expandedBytes+a>ne.maxExpandedBytes)throw new Error("The total expanded preview size limit has been reached.");r.budget.expandedBytes+=a;try{const i=await qt(t(),n);if(n==null||n.throwIfAborted(),i.byteLength>ne.maxEntryBytes||r.budget.expandedBytes-a+i.byteLength>ne.maxExpandedBytes)throw new Error("The expanded preview size limit has been reached.");return r.budget.expandedBytes+=i.byteLength-a,i}catch(i){throw r.budget.expandedBytes-=a,i}}async function ch(t,e,r,n,a){let i=a,o=0;for(;;){n==null||n.throwIfAborted();try{return await qt(t(i),n)}catch(s){const d=ge(s);if(!d||d==="password_cancelled"||!e.requestPassword)throw s;const l=await qt(Promise.resolve(e.requestPassword({name:r,reason:d,attempt:++o,signal:n})),n);if(n==null||n.throwIfAborted(),l===null)throw new ie("password_cancelled");i=l}}}const vu=[{sourceFormat:"docx",targetFormat:"docx"},{sourceFormat:"xlsx",targetFormat:"xlsx"},{sourceFormat:"pptx",targetFormat:"pptx"},{sourceFormat:"ppt",targetFormat:"pptx"},{sourceFormat:"pps",targetFormat:"pptx"},{sourceFormat:"pot",targetFormat:"pptx"},{sourceFormat:"pptm",targetFormat:"pptx"},{sourceFormat:"ppsx",targetFormat:"pptx"},{sourceFormat:"ppsm",targetFormat:"pptx"},{sourceFormat:"potx",targetFormat:"pptx"},{sourceFormat:"potm",targetFormat:"pptx"},{sourceFormat:"dps",targetFormat:"pptx"},{sourceFormat:"dpt",targetFormat:"pptx"},{sourceFormat:"odp",targetFormat:"pptx"},{sourceFormat:"otp",targetFormat:"pptx"},{sourceFormat:"fodp",targetFormat:"pptx"},{sourceFormat:"sxi",targetFormat:"pptx"},{sourceFormat:"sti",targetFormat:"pptx"},{sourceFormat:"odg",targetFormat:"pptx"},{sourceFormat:"otg",targetFormat:"pptx"},{sourceFormat:"fodg",targetFormat:"pptx"},{sourceFormat:"sxd",targetFormat:"pptx"},{sourceFormat:"std",targetFormat:"pptx"},{sourceFormat:"doc",targetFormat:"docx"},{sourceFormat:"docm",targetFormat:"docx"},{sourceFormat:"dot",targetFormat:"docx"},{sourceFormat:"dotx",targetFormat:"docx"},{sourceFormat:"dotm",targetFormat:"docx"},{sourceFormat:"wps",targetFormat:"docx"},{sourceFormat:"wpt",targetFormat:"docx"},{sourceFormat:"rtf",targetFormat:"docx"},{sourceFormat:"odt",targetFormat:"docx"},{sourceFormat:"ott",targetFormat:"docx"},{sourceFormat:"fodt",targetFormat:"docx"},{sourceFormat:"sxw",targetFormat:"docx"},{sourceFormat:"stw",targetFormat:"docx"},{sourceFormat:"txt",targetFormat:"docx"},{sourceFormat:"text",targetFormat:"docx"},{sourceFormat:"md",targetFormat:"docx"},{sourceFormat:"markdown",targetFormat:"docx"},{sourceFormat:"mkd",targetFormat:"docx"},{sourceFormat:"mkdn",targetFormat:"docx"},{sourceFormat:"mdown",targetFormat:"docx"},{sourceFormat:"html",targetFormat:"docx"},{sourceFormat:"htm",targetFormat:"docx"},{sourceFormat:"shtml",targetFormat:"docx"},{sourceFormat:"xhtml",targetFormat:"docx"},{sourceFormat:"xht",targetFormat:"docx"},{sourceFormat:"xhtm",targetFormat:"docx"},{sourceFormat:"epub",targetFormat:"docx"},{sourceFormat:"fb2",targetFormat:"docx"},{sourceFormat:"xml",targetFormat:"docx"},{sourceFormat:"rss",targetFormat:"docx"},{sourceFormat:"atom",targetFormat:"docx"},{sourceFormat:"kml",targetFormat:"docx"},{sourceFormat:"gpx",targetFormat:"docx"},{sourceFormat:"ttml",targetFormat:"docx"},{sourceFormat:"dfxp",targetFormat:"docx"},{sourceFormat:"xsd",targetFormat:"docx"},{sourceFormat:"xsl",targetFormat:"docx"},{sourceFormat:"xslt",targetFormat:"docx"},{sourceFormat:"wsdl",targetFormat:"docx"},{sourceFormat:"plist",targetFormat:"docx"},{sourceFormat:"pom",targetFormat:"docx"},{sourceFormat:"yaml",targetFormat:"docx"},{sourceFormat:"yml",targetFormat:"docx"},{sourceFormat:"toml",targetFormat:"docx"},{sourceFormat:"ini",targetFormat:"docx"},{sourceFormat:"log",targetFormat:"docx"},{sourceFormat:"rst",targetFormat:"docx"},{sourceFormat:"rest",targetFormat:"docx"},{sourceFormat:"adoc",targetFormat:"docx"},{sourceFormat:"asciidoc",targetFormat:"docx"},{sourceFormat:"asc",targetFormat:"docx"},{sourceFormat:"tex",targetFormat:"docx"},{sourceFormat:"latex",targetFormat:"docx"},{sourceFormat:"ltx",targetFormat:"docx"},{sourceFormat:"sty",targetFormat:"docx"},{sourceFormat:"cls",targetFormat:"docx"},{sourceFormat:"properties",targetFormat:"docx"},{sourceFormat:"env",targetFormat:"docx"},{sourceFormat:"conf",targetFormat:"docx"},{sourceFormat:"config",targetFormat:"docx"},{sourceFormat:"cfg",targetFormat:"docx"},{sourceFormat:"cnf",targetFormat:"docx"},{sourceFormat:"sql",targetFormat:"docx"},{sourceFormat:"js",targetFormat:"docx"},{sourceFormat:"jsx",targetFormat:"docx"},{sourceFormat:"mjs",targetFormat:"docx"},{sourceFormat:"cjs",targetFormat:"docx"},{sourceFormat:"ts",targetFormat:"docx"},{sourceFormat:"tsx",targetFormat:"docx"},{sourceFormat:"mts",targetFormat:"docx"},{sourceFormat:"cts",targetFormat:"docx"},{sourceFormat:"vue",targetFormat:"docx"},{sourceFormat:"css",targetFormat:"docx"},{sourceFormat:"scss",targetFormat:"docx"},{sourceFormat:"sass",targetFormat:"docx"},{sourceFormat:"less",targetFormat:"docx"},{sourceFormat:"c",targetFormat:"docx"},{sourceFormat:"cpp",targetFormat:"docx"},{sourceFormat:"cc",targetFormat:"docx"},{sourceFormat:"cxx",targetFormat:"docx"},{sourceFormat:"h",targetFormat:"docx"},{sourceFormat:"hpp",targetFormat:"docx"},{sourceFormat:"hh",targetFormat:"docx"},{sourceFormat:"hxx",targetFormat:"docx"},{sourceFormat:"cs",targetFormat:"docx"},{sourceFormat:"go",targetFormat:"docx"},{sourceFormat:"java",targetFormat:"docx"},{sourceFormat:"kt",targetFormat:"docx"},{sourceFormat:"kts",targetFormat:"docx"},{sourceFormat:"lua",targetFormat:"docx"},{sourceFormat:"php",targetFormat:"docx"},{sourceFormat:"py",targetFormat:"docx"},{sourceFormat:"rb",targetFormat:"docx"},{sourceFormat:"rs",targetFormat:"docx"},{sourceFormat:"sh",targetFormat:"docx"},{sourceFormat:"bash",targetFormat:"docx"},{sourceFormat:"bat",targetFormat:"docx"},{sourceFormat:"cmd",targetFormat:"docx"},{sourceFormat:"ps1",targetFormat:"docx"},{sourceFormat:"swift",targetFormat:"docx"},{sourceFormat:"jsonc",targetFormat:"docx"},{sourceFormat:"json5",targetFormat:"docx"},{sourceFormat:"ipynb",targetFormat:"docx"},{sourceFormat:"gql",targetFormat:"docx"},{sourceFormat:"graphql",targetFormat:"docx"},{sourceFormat:"proto",targetFormat:"docx"},{sourceFormat:"diff",targetFormat:"docx"},{sourceFormat:"patch",targetFormat:"docx"},{sourceFormat:"gitignore",targetFormat:"docx"},{sourceFormat:"dockerignore",targetFormat:"docx"},{sourceFormat:"editorconfig",targetFormat:"docx"},{sourceFormat:"r",targetFormat:"docx"},{sourceFormat:"dart",targetFormat:"docx"},{sourceFormat:"scala",targetFormat:"docx"},{sourceFormat:"groovy",targetFormat:"docx"},{sourceFormat:"gradle",targetFormat:"docx"},{sourceFormat:"pl",targetFormat:"docx"},{sourceFormat:"ex",targetFormat:"docx"},{sourceFormat:"erl",targetFormat:"docx"},{sourceFormat:"fs",targetFormat:"docx"},{sourceFormat:"fsi",targetFormat:"docx"},{sourceFormat:"fsx",targetFormat:"docx"},{sourceFormat:"vb",targetFormat:"docx"},{sourceFormat:"clj",targetFormat:"docx"},{sourceFormat:"hs",targetFormat:"docx"},{sourceFormat:"jl",targetFormat:"docx"},{sourceFormat:"zig",targetFormat:"docx"},{sourceFormat:"m",targetFormat:"docx"},{sourceFormat:"matlab",targetFormat:"docx"},{sourceFormat:"svelte",targetFormat:"docx"},{sourceFormat:"astro",targetFormat:"docx"},{sourceFormat:"mdx",targetFormat:"docx"},{sourceFormat:"tf",targetFormat:"docx"},{sourceFormat:"tfvars",targetFormat:"docx"},{sourceFormat:"hcl",targetFormat:"docx"},{sourceFormat:"rego",targetFormat:"docx"},{sourceFormat:"bicep",targetFormat:"docx"},{sourceFormat:"prisma",targetFormat:"docx"},{sourceFormat:"dockerfile",targetFormat:"docx"},{sourceFormat:"cmake",targetFormat:"docx"},{sourceFormat:"make",targetFormat:"docx"},{sourceFormat:"mk",targetFormat:"docx"},{sourceFormat:"zsh",targetFormat:"docx"},{sourceFormat:"fish",targetFormat:"docx"},{sourceFormat:"csproj",targetFormat:"docx"},{sourceFormat:"vbproj",targetFormat:"docx"},{sourceFormat:"fsproj",targetFormat:"docx"},{sourceFormat:"props",targetFormat:"docx"},{sourceFormat:"targets",targetFormat:"docx"},{sourceFormat:"sln",targetFormat:"docx"},{sourceFormat:"cshtml",targetFormat:"docx"},{sourceFormat:"razor",targetFormat:"docx"},{sourceFormat:"mustache",targetFormat:"docx"},{sourceFormat:"hbs",targetFormat:"docx"},{sourceFormat:"liquid",targetFormat:"docx"},{sourceFormat:"jinja",targetFormat:"docx"},{sourceFormat:"twig",targetFormat:"docx"},{sourceFormat:"ejs",targetFormat:"docx"},{sourceFormat:"erb",targetFormat:"docx"},{sourceFormat:"haml",targetFormat:"docx"},{sourceFormat:"slim",targetFormat:"docx"},{sourceFormat:"mermaid",targetFormat:"docx"},{sourceFormat:"mmd",targetFormat:"docx"},{sourceFormat:"puml",targetFormat:"docx"},{sourceFormat:"avsc",targetFormat:"docx"},{sourceFormat:"sol",targetFormat:"docx"},{sourceFormat:"move",targetFormat:"docx"},{sourceFormat:"nim",targetFormat:"docx"},{sourceFormat:"cr",targetFormat:"docx"},{sourceFormat:"ml",targetFormat:"docx"},{sourceFormat:"mli",targetFormat:"docx"},{sourceFormat:"elm",targetFormat:"docx"},{sourceFormat:"rkt",targetFormat:"docx"},{sourceFormat:"lisp",targetFormat:"docx"},{sourceFormat:"scm",targetFormat:"docx"},{sourceFormat:"asm",targetFormat:"docx"},{sourceFormat:"s",targetFormat:"docx"},{sourceFormat:"cu",targetFormat:"docx"},{sourceFormat:"cuh",targetFormat:"docx"},{sourceFormat:"d",targetFormat:"docx"},{sourceFormat:"pas",targetFormat:"docx"},{sourceFormat:"adb",targetFormat:"docx"},{sourceFormat:"ads",targetFormat:"docx"},{sourceFormat:"cob",targetFormat:"docx"},{sourceFormat:"cbl",targetFormat:"docx"},{sourceFormat:"f90",targetFormat:"docx"},{sourceFormat:"f95",targetFormat:"docx"},{sourceFormat:"vhd",targetFormat:"docx"},{sourceFormat:"vhdl",targetFormat:"docx"},{sourceFormat:"sv",targetFormat:"docx"},{sourceFormat:"svh",targetFormat:"docx"},{sourceFormat:"ino",targetFormat:"docx"},{sourceFormat:"glsl",targetFormat:"docx"},{sourceFormat:"vert",targetFormat:"docx"},{sourceFormat:"frag",targetFormat:"docx"},{sourceFormat:"wgsl",targetFormat:"docx"},{sourceFormat:"hlsl",targetFormat:"docx"},{sourceFormat:"rmd",targetFormat:"docx"},{sourceFormat:"qmd",targetFormat:"docx"},{sourceFormat:"bib",targetFormat:"docx"},{sourceFormat:"nix",targetFormat:"docx"},{sourceFormat:"cue",targetFormat:"docx"},{sourceFormat:"dhall",targetFormat:"docx"},{sourceFormat:"org",targetFormat:"docx"},{sourceFormat:"wiki",targetFormat:"docx"},{sourceFormat:"mediawiki",targetFormat:"docx"},{sourceFormat:"textile",targetFormat:"docx"},{sourceFormat:"pod",targetFormat:"docx"},{sourceFormat:"man",targetFormat:"docx"},{sourceFormat:"roff",targetFormat:"docx"},{sourceFormat:"nfo",targetFormat:"docx"},{sourceFormat:"srt",targetFormat:"docx"},{sourceFormat:"vtt",targetFormat:"docx"},{sourceFormat:"sbv",targetFormat:"docx"},{sourceFormat:"ass",targetFormat:"docx"},{sourceFormat:"ssa",targetFormat:"docx"},{sourceFormat:"ics",targetFormat:"docx"},{sourceFormat:"vcf",targetFormat:"docx"},{sourceFormat:"eml",targetFormat:"docx"},{sourceFormat:"mbox",targetFormat:"docx"},{sourceFormat:"msg",targetFormat:"docx"},{sourceFormat:"oft",targetFormat:"docx"},{sourceFormat:"mht",targetFormat:"docx"},{sourceFormat:"mhtml",targetFormat:"docx"},{sourceFormat:"npmrc",targetFormat:"docx"},{sourceFormat:"yarnrc",targetFormat:"docx"},{sourceFormat:"gitattributes",targetFormat:"docx"},{sourceFormat:"gitmodules",targetFormat:"docx"},{sourceFormat:"xls",targetFormat:"xlsx"},{sourceFormat:"xlsm",targetFormat:"xlsx"},{sourceFormat:"xlt",targetFormat:"xlsx"},{sourceFormat:"xltx",targetFormat:"xlsx"},{sourceFormat:"xltm",targetFormat:"xlsx"},{sourceFormat:"et",targetFormat:"xlsx"},{sourceFormat:"ett",targetFormat:"xlsx"},{sourceFormat:"ods",targetFormat:"xlsx"},{sourceFormat:"ots",targetFormat:"xlsx"},{sourceFormat:"fods",targetFormat:"xlsx"},{sourceFormat:"sxc",targetFormat:"xlsx"},{sourceFormat:"stc",targetFormat:"xlsx"},{sourceFormat:"dbf",targetFormat:"xlsx"},{sourceFormat:"slk",targetFormat:"xlsx"},{sourceFormat:"dif",targetFormat:"xlsx"},{sourceFormat:"csv",targetFormat:"xlsx"},{sourceFormat:"tsv",targetFormat:"xlsx"},{sourceFormat:"tab",targetFormat:"xlsx"},{sourceFormat:"psv",targetFormat:"xlsx"},{sourceFormat:"json",targetFormat:"xlsx"},{sourceFormat:"jsonl",targetFormat:"xlsx"},{sourceFormat:"ndjson",targetFormat:"xlsx"},{sourceFormat:"jsonlines",targetFormat:"xlsx"},{sourceFormat:"ldjson",targetFormat:"xlsx"},{sourceFormat:"dng",targetFormat:"jpg"},{sourceFormat:"cr2",targetFormat:"jpg"},{sourceFormat:"cr3",targetFormat:"jpg"},{sourceFormat:"nef",targetFormat:"jpg"},{sourceFormat:"nrw",targetFormat:"jpg"},{sourceFormat:"arw",targetFormat:"jpg"},{sourceFormat:"sr2",targetFormat:"jpg"},{sourceFormat:"srf",targetFormat:"jpg"},{sourceFormat:"orf",targetFormat:"jpg"},{sourceFormat:"rw2",targetFormat:"jpg"},{sourceFormat:"rwl",targetFormat:"jpg"},{sourceFormat:"raf",targetFormat:"jpg"},{sourceFormat:"kdc",targetFormat:"jpg"},{sourceFormat:"x3f",targetFormat:"jpg"},{sourceFormat:"pef",targetFormat:"jpg"},{sourceFormat:"srw",targetFormat:"jpg"},{sourceFormat:"erf",targetFormat:"jpg"},{sourceFormat:"mef",targetFormat:"jpg"},{sourceFormat:"mos",targetFormat:"jpg"},{sourceFormat:"mrw",targetFormat:"jpg"},{sourceFormat:"3fr",targetFormat:"jpg"},{sourceFormat:"iiq",targetFormat:"jpg"},{sourceFormat:"icns",targetFormat:"png"},{sourceFormat:"apk",targetFormat:"png"},{sourceFormat:"ipa",targetFormat:"png"},{sourceFormat:"exe",targetFormat:"png"},{sourceFormat:"dll",targetFormat:"png"},{sourceFormat:"mui",targetFormat:"png"},{sourceFormat:"mun",targetFormat:"png"},{sourceFormat:"ico",targetFormat:"png"},{sourceFormat:"ppm",targetFormat:"png"}],bu=[A(["pptx"],"paged","pptx"),A(["pdf"],"paged","pdf",{contentTypes:["application/pdf"]}),A(["docx"],"flow","docx"),A(["xlsx"],"workbook","xlsx"),A(["csv"],"workbook","xlsx",{contentTypes:["text/csv","application/csv"]}),A(["html","htm","shtml"],"html","html",{targetFormat:"html",contentTypes:["text/html"]}),A(["xhtml","xht","xhtm"],"html","html",{targetFormat:"html",contentTypes:["application/xhtml+xml"]}),A(["json"],"code","text",{contentTypes:["application/json"]}),A(["xml"],"code","text",{contentTypes:["application/xml","text/xml"]}),A(["yaml","yml"],"code","text",{contentTypes:["application/yaml","application/x-yaml","text/yaml","text/x-yaml"]}),A(["toml"],"code","text",{contentTypes:["application/toml","text/toml","text/x-toml"]}),A(["ini"],"code","text",{contentTypes:["text/x-ini"]}),A(["rst","rest"],"code","text",{contentTypes:["text/x-rst","text/prs.fallenstein.rst"]}),A(["adoc","asciidoc","asc"],"code","text",{contentTypes:["text/asciidoc","text/x-asciidoc"]}),A(["tex","latex","ltx","sty","cls"],"code","text",{contentTypes:["application/x-tex","text/x-tex"]}),A(["properties"],"code","text",{contentTypes:["text/x-java-properties"]}),A(["env"],"code","text",{contentTypes:["application/x-env","text/x-env"]}),A(["conf","config","cfg","cnf"],"code","text",{contentTypes:["text/x-config"]}),A(["sql"],"code","text",{contentTypes:["application/sql","application/x-sql","text/x-sql"]}),A(["png"],"image","image",{contentTypes:["image/png"]}),A(["jpg","jpeg"],"image","image",{contentTypes:["image/jpeg"]}),A(["gif"],"image","image",{contentTypes:["image/gif"]}),A(["webp"],"image","image",{contentTypes:["image/webp"]}),A(["avif"],"image","image",{contentTypes:["image/avif"]}),A(["apng"],"image","image",{contentTypes:["image/apng"]}),A(["ico"],"image","image",{contentTypes:["image/x-icon","image/vnd.microsoft.icon"]}),A(["svg"],"image","image",{contentTypes:["image/svg+xml"]}),A(["bmp"],"image","image",{contentTypes:["image/bmp","image/x-ms-bmp"]}),A(["mp4","webm","mov","m4v","ogv","mkv","avi","mpeg","mpg","3gp"],"video","media"),A(["mp3","wav","aac","m4a","flac","ogg","oga","opus"],"audio","media"),A(["epub"],"ebook","ebook",{contentTypes:["application/epub+zip"]}),A(["cbz"],"ebook","ebook",{contentTypes:["application/vnd.comicbook+zip","application/x-cbz"]}),A(["js","jsx","mjs","cjs"],"code","text",{contentTypes:["text/javascript","application/javascript"]}),A(["ts","tsx","mts","cts"],"code","text",{contentTypes:["text/typescript","application/typescript"]}),A(["vue"],"code","text",{contentTypes:["text/x-vue"]}),A(["css"],"code","text",{contentTypes:["text/css"]}),A(["scss","sass"],"code","text",{contentTypes:["text/x-scss","text/x-sass"]}),A(["less"],"code","text",{contentTypes:["text/x-less"]}),A(["c","h"],"code","text",{contentTypes:["text/x-csrc"]}),A(["cpp","cc","cxx","hpp","hh","hxx"],"code","text",{contentTypes:["text/x-c++src"]}),A(["cs"],"code","text",{contentTypes:["text/x-csharp"]}),A(["go"],"code","text",{contentTypes:["text/x-go"]}),A(["java"],"code","text",{contentTypes:["text/x-java-source"]}),A(["kt","kts"],"code","text",{contentTypes:["text/x-kotlin"]}),A(["lua"],"code","text",{contentTypes:["text/x-lua"]}),A(["php"],"code","text",{contentTypes:["application/x-httpd-php","text/x-php"]}),A(["py"],"code","text",{contentTypes:["text/x-python"]}),A(["rb"],"code","text",{contentTypes:["text/x-ruby"]}),A(["rs"],"code","text",{contentTypes:["text/rust","text/x-rustsrc"]}),A(["sh"],"code","text",{contentTypes:["application/x-sh","text/x-shellscript"]}),A(["bat","cmd"],"code","text",{contentTypes:["application/x-msdos-program","text/x-msdos-batch"]}),A(["ps1"],"code","text",{contentTypes:["text/x-powershell"]}),A(["swift"],"code","text",{contentTypes:["text/x-swift"]}),A(["jsonc"],"code","text",{contentTypes:["application/jsonc","text/jsonc"]}),A(["json5"],"code","text",{contentTypes:["application/json5","text/json5"]}),A(["gql","graphql"],"code","text",{contentTypes:["application/graphql","text/graphql"]}),A(["proto"],"code","text",{contentTypes:["application/x-protobuf","text/x-protobuf","text/proto"]}),A(["diff"],"code","text",{contentTypes:["text/x-diff"]}),A(["patch"],"code","text",{contentTypes:["text/x-patch"]}),A(["gitignore"],"code","text",{contentTypes:["text/x-gitignore"]}),A(["dockerignore"],"code","text",{contentTypes:["text/x-dockerignore"]}),A(["editorconfig"],"code","text",{contentTypes:["text/x-editorconfig"]}),A(["r"],"code","text",{contentTypes:["text/x-r","text/r"]}),A(["dart"],"code","text",{contentTypes:["text/x-dart"]}),A(["scala"],"code","text",{contentTypes:["text/x-scala"]}),A(["groovy","gradle"],"code","text",{contentTypes:["text/x-groovy"]}),A(["pl"],"code","text",{contentTypes:["text/x-perl"]}),A(["ex"],"code","text",{contentTypes:["text/x-elixir"]}),A(["erl"],"code","text",{contentTypes:["text/x-erlang"]}),A(["fs","fsi","fsx"],"code","text",{contentTypes:["text/x-fsharp"]}),A(["vb"],"code","text",{contentTypes:["text/x-vb"]}),A(["clj"],"code","text",{contentTypes:["text/x-clojure"]}),A(["hs"],"code","text",{contentTypes:["text/x-haskell"]}),A(["jl"],"code","text",{contentTypes:["text/x-julia"]}),A(["zig"],"code","text",{contentTypes:["text/x-zig"]}),A(["m","matlab"],"code","text",{contentTypes:["text/x-matlab"]}),A(["svelte"],"code","text",{contentTypes:["text/x-svelte"]}),A(["astro"],"code","text",{contentTypes:["text/x-astro"]}),A(["mdx"],"code","text",{contentTypes:["text/mdx","text/x-mdx"]}),A(["tf","tfvars","hcl"],"code","text",{contentTypes:["text/x-hcl"]}),A(["rego"],"code","text",{contentTypes:["text/x-rego"]}),A(["bicep"],"code","text",{contentTypes:["text/x-bicep"]}),A(["prisma"],"code","text",{contentTypes:["text/x-prisma"]}),A(["dockerfile"],"code","text",{contentTypes:["text/x-dockerfile"]}),A(["cmake"],"code","text",{contentTypes:["text/x-cmake"]}),A(["make","mk"],"code","text",{contentTypes:["text/x-makefile"]}),A(["bash","zsh","fish"],"code","text",{contentTypes:["text/x-shellscript"]}),A(["csproj","vbproj","fsproj","props","targets"],"code","text",{contentTypes:["application/x-msbuild"]}),A(["sln"],"code","text",{contentTypes:["text/x-ms-sln"]}),A(["cshtml","razor"],"code","text",{contentTypes:["text/x-cshtml"]}),A(["mustache","hbs"],"code","text",{contentTypes:["text/x-handlebars-template"]}),A(["liquid"],"code","text",{contentTypes:["text/x-liquid"]}),A(["jinja"],"code","text",{contentTypes:["text/x-jinja"]}),A(["twig"],"code","text",{contentTypes:["text/x-twig"]}),A(["ejs"],"code","text",{contentTypes:["text/x-ejs"]}),A(["erb"],"code","text",{contentTypes:["text/x-erb"]}),A(["haml"],"code","text",{contentTypes:["text/x-haml"]}),A(["slim"],"code","text",{contentTypes:["text/x-slim"]}),A(["mermaid","mmd"],"code","text",{contentTypes:["text/vnd.mermaid"]}),A(["puml"],"code","text",{contentTypes:["text/x-plantuml"]}),A(["avsc"],"code","text",{contentTypes:["application/vnd.apache.avro+json"]}),A(["sol"],"code","text",{contentTypes:["text/x-solidity"]}),A(["move"],"code","text",{contentTypes:["text/x-move"]}),A(["nim"],"code","text",{contentTypes:["text/x-nim"]}),A(["cr"],"code","text",{contentTypes:["text/x-crystal"]}),A(["ml","mli"],"code","text",{contentTypes:["text/x-ocaml"]}),A(["elm"],"code","text",{contentTypes:["text/x-elm"]}),A(["rkt"],"code","text",{contentTypes:["text/x-racket"]}),A(["lisp"],"code","text",{contentTypes:["text/x-lisp"]}),A(["scm"],"code","text",{contentTypes:["text/x-scheme"]}),A(["asm","s"],"code","text",{contentTypes:["text/x-asm"]}),A(["cu","cuh"],"code","text",{contentTypes:["text/x-cuda"]}),A(["d"],"code","text",{contentTypes:["text/x-d"]}),A(["pas"],"code","text",{contentTypes:["text/x-pascal"]}),A(["adb","ads"],"code","text",{contentTypes:["text/x-ada"]}),A(["cob","cbl"],"code","text",{contentTypes:["text/x-cobol"]}),A(["f90","f95"],"code","text",{contentTypes:["text/x-fortran"]}),A(["vhd","vhdl"],"code","text",{contentTypes:["text/x-vhdl"]}),A(["sv","svh"],"code","text",{contentTypes:["text/x-systemverilog"]}),A(["ino"],"code","text",{contentTypes:["text/x-arduino"]}),A(["glsl","vert","frag"],"code","text",{contentTypes:["text/x-glsl"]}),A(["wgsl"],"code","text",{contentTypes:["text/wgsl","text/x-wgsl"]}),A(["hlsl"],"code","text",{contentTypes:["text/x-hlsl"]}),A(["rmd"],"code","text",{contentTypes:["text/x-r-markdown"]}),A(["qmd"],"code","text",{contentTypes:["text/x-quarto"]}),A(["bib"],"code","text",{contentTypes:["application/x-bibtex","text/x-bibtex"]}),A(["nix"],"code","text",{contentTypes:["text/x-nix"]}),A(["cue"],"code","text",{contentTypes:["text/x-cue"]}),A(["dhall"],"code","text",{contentTypes:["text/x-dhall"]}),A(["org"],"code","text",{contentTypes:["text/org","text/x-org"]}),A(["wiki","mediawiki"],"code","text",{contentTypes:["text/x-wiki","text/x-mediawiki"]}),A(["textile"],"code","text",{contentTypes:["text/x-textile"]}),A(["pod"],"code","text",{contentTypes:["text/x-pod"]}),A(["man","roff"],"code","text",{contentTypes:["text/troff","application/x-troff","application/x-troff-man"]}),A(["nfo"],"code","text",{contentTypes:["text/x-nfo"]}),A(["npmrc"],"code","text",{contentTypes:["text/x-npmrc"]}),A(["yarnrc"],"code","text",{contentTypes:["text/x-yarnrc"]}),A(["gitattributes"],"code","text",{contentTypes:["text/x-gitattributes"]}),A(["gitmodules"],"code","text",{contentTypes:["text/x-gitmodules"]}),A(["md","markdown","mkd","mkdn","mdown"],"code","text",{contentTypes:["text/markdown","text/x-markdown"]}),A(["txt","log","text"],"text","text",{contentTypes:["text/plain"]}),A(["zip"],"archive","archive",{contentTypes:["application/zip","application/x-zip-compressed"]}),A(["apk"],"archive","archive",{targetFormat:"zip",contentTypes:["application/vnd.android.package-archive"]}),A(["ipa"],"archive","archive",{targetFormat:"zip",contentTypes:["application/x-ios-app"]})],wu=Au(vu),eo=[...bu,...wu];function Su(t,e={}){const r=lt(t.extension??ir(t.name)),n=ro(t.contentType),a=e.routes??eo,i=r?a.find(s=>s.extensions.includes(r)):a.find(s=>{var d;return n&&((d=s.contentTypes)==null?void 0:d.includes(n))});if(!i)return null;const o=r||i.extensions[0];return{sourceFormat:o,targetFormat:i.targetFormat??o,family:i.family,driverId:i.driverId,conversion:i.conversion}}function ir(t){var o;if(!t)return;const r=(((o=t.split(/[?#]/,1)[0])==null?void 0:o.trim())??"").split(/[\\/]/).pop()??"",n=/\.(7z|zip)\.\d{3,}$/i.exec(r);if(n)return n[1].toLowerCase();if(/\.[r-y]\d{2}$/i.test(r))return"rar";if(/\.z\d{2,}$/i.test(r))return"zip";const a=Fu(r);if(a)return a;const i=r.lastIndexOf(".");if(!(i<0||i===r.length-1))return i===0&&r.indexOf(".",1)<0?lt(r.slice(1)):lt(r.slice(i+1))}function Fu(t){const e=t.trim().toLowerCase();if(e){if(e==="dockerfile"||e.startsWith("dockerfile."))return"dockerfile";if(e==="makefile"||e==="gnumakefile"||e==="bsdmakefile")return"make";if(e==="cmakelists.txt")return"cmake"}}function lt(t){return String(t??"").trim().replace(/^\./,"").toLowerCase()}function A(t,e,r,n={}){var a;return{extensions:t.map(lt).filter(Boolean),family:e,driverId:r,targetFormat:n.targetFormat?lt(n.targetFormat):void 0,contentTypes:(a=n.contentTypes)==null?void 0:a.map(ro).filter(Boolean),conversion:n.conversion}}function ro(t){return String(t??"").split(";",1)[0].trim().toLowerCase()}function Au(t){const e=new Set;return t.flatMap(r=>{const n=lt(r.sourceFormat),a=lt(r.targetFormat);return!n||!a||n===a||e.has(n)?[]:(e.add(n),a==="jpg"||a==="jpeg"||a==="png"?A([n],"image","image",{targetFormat:a,contentTypes:ka(n),conversion:{required:true,reason:n==="ppm"?"PPM images are decoded to PNG in the WASM conversion core":["apk","ipa","exe","dll","mui","mun","ico"].includes(n)?"application icons are extracted to PNG in the WASM conversion core":a==="png"?"ICNS files use their embedded PNG icon preview":"camera RAW files use their embedded JPEG preview"}}):A([n],ku(a),a,{targetFormat:a,contentTypes:ka(n),conversion:{required:true,reason:Tu(a)}}))})}function ku(t){switch(t){case"docx":return"flow";case"xlsx":return"workbook";default:return"paged"}}function Tu(t){switch(t){case"docx":return"legacy or compatible text documents are normalized to DOCX";case"xlsx":return"legacy or compatible spreadsheets are normalized to XLSX";default:return"legacy or compatible presentations are normalized to PPTX"}}function ka(t){switch(t){case"ppm":return["image/x-portable-pixmap"];case"apk":return["application/vnd.android.package-archive"];case"ipa":return["application/x-ios-app"];case"exe":return["application/vnd.microsoft.portable-executable","application/x-msdownload"];case"icns":return["image/icns","image/x-icns","application/x-icns"];case"ppt":case"pps":case"pot":return["application/vnd.ms-powerpoint"];case"dps":return["application/vnd.ms-powerpoint","application/wps-office.dps"];case"dpt":return["application/wps-office.dpt"];case"ppsx":return["application/vnd.openxmlformats-officedocument.presentationml.slideshow"];case"pptm":return["application/vnd.ms-powerpoint.presentation.macroenabled.12"];case"ppsm":return["application/vnd.ms-powerpoint.slideshow.macroenabled.12"];case"potx":return["application/vnd.openxmlformats-officedocument.presentationml.template"];case"potm":return["application/vnd.ms-powerpoint.template.macroenabled.12"];case"odp":return["application/vnd.oasis.opendocument.presentation"];case"otp":return["application/vnd.oasis.opendocument.presentation-template"];case"fodp":return["application/vnd.oasis.opendocument.presentation-flat-xml"];case"sxi":return["application/vnd.sun.xml.impress"];case"sti":return["application/vnd.sun.xml.impress.template"];case"odg":return["application/vnd.oasis.opendocument.graphics"];case"otg":return["application/vnd.oasis.opendocument.graphics-template"];case"fodg":return["application/vnd.oasis.opendocument.graphics-flat-xml"];case"sxd":return["application/vnd.sun.xml.draw"];case"std":return["application/vnd.sun.xml.draw.template"];case"doc":case"dot":return["application/msword"];case"docm":return["application/vnd.ms-word.document.macroenabled.12"];case"dotm":return["application/vnd.ms-word.template.macroenabled.12"];case"dotx":return["application/vnd.openxmlformats-officedocument.wordprocessingml.template"];case"wps":return["application/vnd.ms-works","application/wps-office.wps"];case"wpt":return["application/wps-office.wpt"];case"rtf":return["application/rtf","text/rtf"];case"odt":return["application/vnd.oasis.opendocument.text"];case"ott":return["application/vnd.oasis.opendocument.text-template"];case"fodt":return["application/vnd.oasis.opendocument.text-flat-xml"];case"sxw":return["application/vnd.sun.xml.writer"];case"stw":return["application/vnd.sun.xml.writer.template"];case"txt":case"text":case"log":return["text/plain"];case"md":case"markdown":case"mkd":case"mkdn":case"mdown":return["text/markdown","text/x-markdown"];case"html":case"htm":case"shtml":return["text/html"];case"xhtml":case"xht":case"xhtm":return["application/xhtml+xml","text/html"];case"epub":return["application/epub+zip"];case"fb2":return["application/x-fictionbook+xml"];case"xml":return["application/xml","text/xml"];case"rss":return["application/rss+xml","application/xml","text/xml"];case"atom":return["application/atom+xml","application/xml","text/xml"];case"kml":return["application/vnd.google-earth.kml+xml","application/kml+xml","application/xml","text/xml"];case"gpx":return["application/gpx+xml","application/xml","text/xml"];case"ttml":case"dfxp":return["application/ttml+xml","application/xml","text/xml"];case"xsd":return["application/xsd+xml","application/xml","text/xml"];case"xsl":case"xslt":return["application/xslt+xml","text/xsl","application/xml","text/xml"];case"wsdl":return["application/wsdl+xml","application/xml","text/xml"];case"plist":return["application/x-plist","application/xml","text/xml"];case"pom":return["application/xml","text/xml"];case"yaml":case"yml":return["application/yaml","application/x-yaml","text/yaml","text/x-yaml"];case"toml":return["application/toml","text/toml","text/x-toml"];case"ini":return["text/x-ini"];case"rst":case"rest":return["text/x-rst","text/prs.fallenstein.rst"];case"adoc":case"asciidoc":case"asc":return["text/asciidoc","text/x-asciidoc"];case"tex":case"latex":case"ltx":case"sty":case"cls":return["application/x-tex","text/x-tex"];case"properties":return["text/x-java-properties"];case"env":return["application/x-env","text/x-env"];case"conf":case"config":case"cfg":case"cnf":return["text/x-config"];case"sql":return["application/sql","application/x-sql","text/x-sql"];case"js":case"jsx":case"mjs":case"cjs":return["text/javascript","application/javascript"];case"ts":case"tsx":case"mts":case"cts":return["text/typescript","application/typescript"];case"vue":return["text/x-vue"];case"css":return["text/css"];case"scss":case"sass":return["text/x-scss","text/x-sass"];case"less":return["text/x-less"];case"c":case"h":return["text/x-csrc"];case"cpp":case"cc":case"cxx":case"hpp":case"hh":case"hxx":return["text/x-c++src"];case"cs":return["text/x-csharp"];case"go":return["text/x-go"];case"java":return["text/x-java-source"];case"kt":case"kts":return["text/x-kotlin"];case"lua":return["text/x-lua"];case"php":return["application/x-httpd-php","text/x-php"];case"py":return["text/x-python"];case"rb":return["text/x-ruby"];case"rs":return["text/rust","text/x-rustsrc"];case"sh":case"bash":return["application/x-sh","text/x-shellscript"];case"bat":case"cmd":return["application/x-msdos-program","text/x-msdos-batch"];case"ps1":return["text/x-powershell"];case"swift":return["text/x-swift"];case"jsonc":return["application/jsonc","text/jsonc"];case"json5":return["application/json5","text/json5"];case"ipynb":return["application/x-ipynb+json"];case"gql":case"graphql":return["application/graphql","text/graphql"];case"proto":return["application/x-protobuf","text/x-protobuf","text/proto"];case"diff":return["text/x-diff"];case"patch":return["text/x-patch"];case"gitignore":return["text/x-gitignore"];case"dockerignore":return["text/x-dockerignore"];case"editorconfig":return["text/x-editorconfig"];case"r":return["text/x-r","text/r"];case"dart":return["text/x-dart"];case"scala":return["text/x-scala"];case"groovy":case"gradle":return["text/x-groovy"];case"pl":return["text/x-perl"];case"ex":return["text/x-elixir"];case"erl":return["text/x-erlang"];case"fs":case"fsi":case"fsx":return["text/x-fsharp"];case"vb":return["text/x-vb"];case"clj":return["text/x-clojure"];case"hs":return["text/x-haskell"];case"jl":return["text/x-julia"];case"zig":return["text/x-zig"];case"m":case"matlab":return["text/x-matlab"];case"svelte":return["text/x-svelte"];case"astro":return["text/x-astro"];case"mdx":return["text/mdx","text/x-mdx"];case"tf":case"tfvars":case"hcl":return["text/x-hcl"];case"rego":return["text/x-rego"];case"bicep":return["text/x-bicep"];case"prisma":return["text/x-prisma"];case"dockerfile":return["text/x-dockerfile"];case"cmake":return["text/x-cmake"];case"make":case"mk":return["text/x-makefile"];case"zsh":case"fish":return["text/x-shellscript"];case"csproj":case"vbproj":case"fsproj":case"props":case"targets":return["application/x-msbuild"];case"sln":return["text/x-ms-sln"];case"cshtml":case"razor":return["text/x-cshtml"];case"mustache":case"hbs":return["text/x-handlebars-template"];case"liquid":return["text/x-liquid"];case"jinja":return["text/x-jinja"];case"twig":return["text/x-twig"];case"ejs":return["text/x-ejs"];case"erb":return["text/x-erb"];case"haml":return["text/x-haml"];case"slim":return["text/x-slim"];case"mermaid":case"mmd":return["text/vnd.mermaid"];case"puml":return["text/x-plantuml"];case"avsc":return["application/vnd.apache.avro+json"];case"sol":return["text/x-solidity"];case"move":return["text/x-move"];case"nim":return["text/x-nim"];case"cr":return["text/x-crystal"];case"ml":case"mli":return["text/x-ocaml"];case"elm":return["text/x-elm"];case"rkt":return["text/x-racket"];case"lisp":return["text/x-lisp"];case"scm":return["text/x-scheme"];case"asm":case"s":return["text/x-asm"];case"cu":case"cuh":return["text/x-cuda"];case"d":return["text/x-d"];case"pas":return["text/x-pascal"];case"adb":case"ads":return["text/x-ada"];case"cob":case"cbl":return["text/x-cobol"];case"f90":case"f95":return["text/x-fortran"];case"vhd":case"vhdl":return["text/x-vhdl"];case"sv":case"svh":return["text/x-systemverilog"];case"ino":return["text/x-arduino"];case"glsl":case"vert":case"frag":return["text/x-glsl"];case"wgsl":return["text/wgsl","text/x-wgsl"];case"hlsl":return["text/x-hlsl"];case"rmd":return["text/x-r-markdown"];case"qmd":return["text/x-quarto"];case"bib":return["application/x-bibtex","text/x-bibtex"];case"nix":return["text/x-nix"];case"cue":return["text/x-cue"];case"dhall":return["text/x-dhall"];case"org":return["text/org","text/x-org"];case"wiki":case"mediawiki":return["text/x-wiki","text/x-mediawiki"];case"textile":return["text/x-textile"];case"pod":return["text/x-pod"];case"man":case"roff":return["text/troff","application/x-troff","application/x-troff-man"];case"nfo":return["text/x-nfo"];case"srt":return["application/x-subrip","text/srt"];case"vtt":return["text/vtt"];case"sbv":return["text/x-sbv"];case"ass":return["text/x-ass","application/x-ass"];case"ssa":return["text/x-ssa","application/x-ssa"];case"ics":return["text/calendar"];case"vcf":return["text/vcard","text/x-vcard"];case"eml":return["message/rfc822"];case"mbox":return["application/mbox","application/x-mbox"];case"msg":return["application/vnd.ms-outlook","application/x-msg"];case"oft":return["application/vnd.ms-outlook","application/x-ms-outlook"];case"mht":case"mhtml":return["message/rfc822","multipart/related","application/x-mimearchive"];case"npmrc":return["text/x-npmrc"];case"yarnrc":return["text/x-yarnrc"];case"gitattributes":return["text/x-gitattributes"];case"gitmodules":return["text/x-gitmodules"];case"xls":case"xlt":return["application/vnd.ms-excel"];case"xlsm":return["application/vnd.ms-excel.sheet.macroenabled.12"];case"xltm":return["application/vnd.ms-excel.template.macroenabled.12"];case"et":return["application/vnd.ms-excel","application/wps-office.et"];case"ett":return["application/wps-office.ett"];case"xltx":return["application/vnd.openxmlformats-officedocument.spreadsheetml.template"];case"ods":return["application/vnd.oasis.opendocument.spreadsheet"];case"ots":return["application/vnd.oasis.opendocument.spreadsheet-template"];case"fods":return["application/vnd.oasis.opendocument.spreadsheet-flat-xml"];case"sxc":return["application/vnd.sun.xml.calc"];case"stc":return["application/vnd.sun.xml.calc.template"];case"dbf":return["application/x-dbf","application/dbf","application/vnd.dbf"];case"slk":return["text/spreadsheet","text/x-sylk","application/x-sylk"];case"dif":return["application/x-dif","text/x-dif"];case"csv":return["text/csv","application/csv"];case"tsv":case"tab":return["text/tab-separated-values"];case"psv":return["text/x-pipe-separated-values","text/pipe-separated-values"];case"json":return["application/json"];case"jsonl":case"ndjson":case"jsonlines":case"ldjson":return["application/x-ndjson","application/jsonl","application/jsonlines"];default:return[]}}async function Lu(t,e,r){const n=await nn(t,{signal:r,maxEntryBytes:ne.maxEntryBytes});if(r==null||r.throwIfAborted(),n.size>ne.maxEntries)throw new Error("Document contains too many package entries.");return[...n.values()].filter(a=>!a.directory&&/^(word|xl|ppt)\/embeddings\/[^/]+$/i.test(a.name)).map(a=>{const i=async o=>{r==null||r.throwIfAborted();const s=o??r,d=await xu(()=>a.bytes(void 0,s),a.size,e,s);return{source:d,name:Qr(a.name),size:d.byteLength}};return{id:a.name,name:Qr(a.name),size:a.size,readRaw:i,read:async o=>{const s=await i(o);return Mu(s.source,s.name)}}})}function Qr(t){var e;return((e=t.replace(/\\/g,"/").split("/").pop())==null?void 0:e.replace(/[\u0000-\u001f\u007f]/g,"").trim())||"attachment.bin"}async function Mu(t,e){if([208,207,17,224,161,177,26,225].every((n,a)=>t[a]===n)){const n=await import("./vendor-C1aIdQ-w.js").then(d=>d.c),a=n.read(t,{type:"array"}),i=n.find(a,"Ole10Native");if(i)return Cu(new Uint8Array(i.content),e);const o=n.find(a,"Package");if(o)return tn(new Uint8Array(o.content),e);const s=n.find(a,"WordDocument")?"doc":n.find(a,"Workbook")||n.find(a,"Book")?"xls":n.find(a,"PowerPoint Document")?"ppt":void 0;if(s)return{source:t,name:no(e,s),extension:s}}return tn(t,e)}async function Cu(t,e){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);if(t.length<6)throw new Error("The embedded OLE attachment is truncated.");const n=r.getUint32(0,true);if(n>t.length-4)throw new Error("The embedded OLE attachment is truncated.");const a=Math.min(t.length,n+4);let i=6;const o=()=>{const l=t.indexOf(0,i);if(l<i||l>=a)throw new Error("Invalid embedded OLE filename.");const u=new TextDecoder().decode(t.subarray(i,l));return i=l+1,u},s=o();if(o(),i+=4,o(),i+4>a)throw new Error("The embedded OLE attachment is truncated.");const d=r.getUint32(i,true);if(i+=4,d>a-i)throw new Error("The embedded OLE attachment is truncated.");return tn(t.slice(i,i+d),Qr(s||e))}function no(t,e){return`${t.replace(/\.[^.]*$/,"")}.${e}`}async function tn(t,e){let r=ir(e);if(r==="bin"||!e.includes(".")){if(new TextDecoder().decode(t.subarray(0,5))==="%PDF-")r="pdf";else if(t[0]===80&&t[1]===75){const a=await nn(t);r=a.has("word/document.xml")?"docx":a.has("xl/workbook.xml")?"xlsx":a.has("ppt/presentation.xml")?"pptx":"zip"}else[82,97,114,33,26,7].every((a,i)=>t[i]===a)?r="rar":[55,122,188,175,39,28].every((a,i)=>t[i]===a)?r="7z":t[0]===31&&t[1]===139?r="gz":t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71?r="png":t[0]===255&&t[1]===216&&(r="jpg");r&&r!=="bin"&&(e=no(e,r))}return{source:t,name:e,extension:r,size:t.byteLength}}const Eu={maxVolumes:256,maxBytes:512*1024*1024};function en(t){let e=/^(.*\.part)(\d+)(\.rar)$/i.exec(t);if(e)return{format:"rar",kind:"rar-part",key:`${e[1]}*.rar`.toLowerCase(),base:e[1],index:Number(e[2])-1,width:e[2].length};if(e=/^(.*\.(7z|zip))\.(\d{3,})$/i.exec(t),e)return{format:e[2].toLowerCase(),kind:"numbered",key:`${e[1]}.*`.toLowerCase(),base:e[1],index:Number(e[3])-1,width:e[3].length};if(e=/^(.*)\.([r-y])(\d{2})$/i.exec(t),e)return{format:"rar",kind:"rar-old",key:`${e[1]}.rar`.toLowerCase(),base:e[1],index:(e[2].toLowerCase().charCodeAt(0)-114)*100+Number(e[3])+1,width:2};if(e=/^(.*)\.rar$/i.exec(t),e)return{format:"rar",kind:"rar-old",key:t.toLowerCase(),base:e[1],index:0,width:2};if(e=/^(.*)\.z(\d{2,})$/i.exec(t),e)return{format:"zip",kind:"zip",key:`${e[1]}.zip`.toLowerCase(),base:e[1],index:Number(e[2])-1,width:e[2].length};if(e=/^(.*)\.zip$/i.exec(t),e)return{format:"zip",kind:"zip",key:t.toLowerCase(),base:e[1],index:1/0,width:2}}function We(t){const e=en(t);return!!(e&&(e.kind==="numbered"||e.kind==="rar-part"||!/\.(rar|zip)$/i.test(t)))}function ju(t,e){const r=en(t);if(!r)return;const n=e.flatMap(s=>{const d=en(s.name);return(d==null?void 0:d.key)===r.key&&d.kind===r.kind?[{file:s,info:d}]:[]}).sort((s,d)=>s.info.index-d.info.index);if(!n.length||n.length===1&&!We(t))return;if(n.length>Eu.maxVolumes)throw new Error("Archive contains too many volumes.");const a=new Set;for(const{info:s}of n){if(a.has(s.index))throw new Error("Duplicate archive volume numbers.");if(s.index<0||!Number.isSafeInteger(s.index)&&!(s.kind==="zip"&&s.index===1/0))throw new Error("Invalid archive volume number.");a.add(s.index)}const i=n.filter(s=>s.info.index!==1/0);for(let s=0;s<i.length;s++)if(i[s].info.index!==s)throw new Error(`Missing archive volume: ${Ru(r,s)}. Select all parts of the archive.`);if(r.kind==="zip"&&!n.some(s=>s.info.index===1/0))throw new Error(`Missing archive volume: ${r.base}.zip. Select all parts of the archive.`);const o=r.kind==="zip"?n[n.length-1].file:n[0].file;return{format:r.format,primary:o,files:[o,...n.map(s=>s.file).filter(s=>s!==o)]}}function Ru(t,e){return t.kind==="rar-part"?`${t.base}${String(e+1).padStart(t.width,"0")}.rar`:t.kind==="numbered"?`${t.base}.${String(e+1).padStart(t.width,"0")}`:t.kind==="zip"?`${t.base}.z${String(e+1).padStart(t.width,"0")}`:e===0?`${t.base}.rar`:`${t.base}.${String.fromCharCode(114+Math.floor((e-1)/100))}${String((e-1)%100).padStart(2,"0")}`}const ao=new WeakMap,or=t=>ao.get(t)??t.fontFamily,rn=(t,e,r="normal")=>JSON.stringify([t.toLowerCase(),e,r]);function io(t,e){const r=n=>{for(const a of(n==null?void 0:n.paragraphs)??[])a.bullet&&e(a.bullet),a.runs.forEach(e)};for(const n of t)for(const a of n.items)a.kind==="text"||a.kind==="shape"?r(a.textFrame):a.kind==="table"&&a.cells.forEach(i=>r(i.textFrame))}function Nu(t){const e=new Map;return io(t,r=>{const n=or(r);if(!n)return;const a=r.bold===void 0?void 0:r.bold?700:400,i=r.italic?"italic":"normal",o=rn(n,a,i);let s=e.get(o);s||e.set(o,s={fontFamily:n,traits:a?{weight:a}:void 0,fontStyle:i}),s.text=((s.text??"")+(r.text??r.char??"")).slice(0,4096)}),[...e.values()]}function $u(t,e){const r=new Map(e.filter(a=>a.fontFamily).map(a=>{var i;return[rn(a.fontFamily,(i=a.traits)==null?void 0:i.weight,a.fontStyle),a.resolvedFontFamily]})),n=new Map(e.filter(a=>{var i;return a.fontFamily&&((i=a.traits)==null?void 0:i.weight)===void 0&&a.fontStyle===void 0}).map(a=>[a.fontFamily.toLowerCase(),a.resolvedFontFamily]));io(t,a=>{const i=or(a);if(!i)return;ao.set(a,i);const o=rn(i,a.bold===void 0?void 0:a.bold?700:400,a.italic?"italic":"normal");a.fontFamily=(r.has(o)?r.get(o):n.get(i.toLowerCase()))??i})}const Tr=/^(serif|sans-serif|monospace|system-ui|ui-serif|ui-sans-serif|ui-monospace|ui-rounded|cursive|fantasy|emoji|math|fangsong)$/i,Iu="BESbswy1234567890\u6C49\u5B57\u304B\u306A\uD55C\uAE00";function Bu(t){const e=new Map,r=a=>{if(!a)return;const i=Mt(a);i&&e.set(i.toLowerCase(),{fontFamily:i})},n=a=>{for(const i of(a==null?void 0:a.paragraphs)??[]){i.bullet&&r(or(i.bullet));for(const o of i.runs)r(or(o))}};for(const a of t)for(const i of a.items)if(i.kind==="text"||i.kind==="shape")n(i.textFrame);else if(i.kind==="table")for(const o of i.cells)n(o.textFrame);return[...e.values()]}function Le(t,e=typeof document>"u"?void 0:document,r={}){var u;const n=new Map,a=new Map;let i;const o=f=>{try{if(i===void 0&&(i=(e==null?void 0:e.createElement("canvas").getContext("2d"))??null),!i)return;i.font=`normal 400 32px ${f}`;const m=i.measureText(Iu).width;return Number.isFinite(m)&&m>0?m:void 0}catch{return}},s=new Map,d=f=>{const m=f.toLowerCase();if(a.has(m))return a.get(m);if(f.includes(",")||/[\x00-\x1f\x7f]/.test(f))return;if(Tr.test(f))return e?true:void 0;let h=false;const g=new Set([f,Ut(f)]);for(const x of["monospace","serif","sans-serif"]){s.has(x)||s.set(x,o(x));const F=s.get(x);for(const y of g){const S=o(`${Pu(y)}, ${x}`);if(S==null||F==null)h=void 0;else if(Math.abs(S-F)>.1)return a.set(m,true),true}}return a.set(m,h),h};for(const f of t){const m=Mt(f.fontFamily??"")||void 0,h=((u=f.fontFile)==null?void 0:u.trim())||void 0;if(!m&&!h)continue;let g=Mt(f.resolvedFontFamily??"")||void 0,x=g??m;const F=f.browserUnsupported||/\.shx$/i.test(h??"");let y=x&&(!F||g)?d(x):void 0;const S=ye(m??"",f.traits);let k,w,T;if(r.substitute&&y===false&&m&&!g&&!F&&!f.embedded){const H=new Map;for(const Y of An(m,f.traits))H.set(Y.toLowerCase(),{fontFamily:Y});for(const Y of r.candidates??[])H.set(Y.fontFamily.toLowerCase(),Y);const z=rr(f,[...H.values()]).find(Y=>!Tr.test(Y.candidate.fontFamily)&&d(Y.candidate.fontFamily)===true);if(z){g=x=z.candidate.fontFamily,y=true,w=z.score,T=z.coverage,k=S.monospace?"monospace":S.style==="handwriting"?"handwriting":S.style==="decorative"?"decorative":S.script==="emoji"?"emoji":S.serif===true?"serif":S.serif===false?"sans-serif":"similar-traits";const Y=z.reasons.filter(D=>["weight","stretch","average-width","PANOSE","glyph-coverage"].includes(D));Y.length&&(k+=`, ${Y.join(", ")}`)}}let N="unknown",I=f.source??"unknown";F&&!g?(N="unsupported",I="fallback"):y===false&&!f.embedded?(N="missing",I="fallback"):y===true&&(N=g&&(F||g.toLowerCase()!==(m==null?void 0:m.toLowerCase()))?"substituted":"available",I=k?"fallback":f.source??(Tr.test(x)?"fallback":"environment"));const C={fontFamily:m,fontFile:h,styleName:f.styleName,resolvedFontFamily:g,status:N,source:I,classification:S,substitutionReason:k,matchScore:w,coverage:T,embedded:f.embedded},M=JSON.stringify([m==null?void 0:m.toLowerCase(),h==null?void 0:h.toLowerCase(),f.styleName,g==null?void 0:g.toLowerCase(),I,S,f.embedded]);n.has(M)||n.set(M,C)}const l=[...n.values()];return{fonts:l,warnings:oo(l)}}function oo(t){const e=new Map,r=n=>{const a=n.toLowerCase();e.has(a)||e.set(a,n)};for(const n of t){const a=n.fontFamily??n.fontFile;a&&(n.status==="unsupported"?r(`Font "${a}" cannot be rendered directly by the browser; fallback fonts may change layout.`):n.status==="missing"?r(`Font "${n.resolvedFontFamily??a}" was not detected; fallback fonts may change layout.`):n.status==="substituted"&&r(n.substitutionReason?`Font "${a}" is automatically substituted with "${n.resolvedFontFamily}" (${n.substitutionReason}); text layout may differ.`:`Font "${a}" is mapped to "${n.resolvedFontFamily}"; text layout may differ.`))}return[...e.values()]}function Pu(t){return`"${t.replace(/["\\]/g,"\\$&")}"`}const Lr="5.2.6",Ou=["https://cdn.jsdelivr.net/npm","https://unpkg.com"],Du=[[0,255],[305,305],[338,339],[699,700],[710,710],[730,730],[732,732],[772,772],[776,776],[809,809],[8192,8303],[8364,8364],[8482,8482],[8593,8593],[8595,8595],[8722,8722],[8725,8725],[65279,65279],[65533,65533]];function Hu(t={}){const e=t.mirrors??Ou;return[["carlito","Carlito","latin",{serif:false,script:"latin"}],["caladea","Caladea","latin",{serif:true,script:"latin"}],["arimo","Arimo","latin",{serif:false,script:"latin"}],["tinos","Tinos","latin",{serif:true,script:"latin"}],["cousine","Cousine","latin",{monospace:true,script:"latin"}],["noto-sans","Noto Sans","latin",{serif:false,script:"latin"}],["noto-serif","Noto Serif","latin",{serif:true,script:"latin"}],["noto-sans-mono","Noto Sans Mono","latin",{monospace:true,script:"latin"}],["noto-sans-sc","Noto Sans SC","chinese-simplified",{serif:false,script:"cjk-sc"}],["noto-sans-tc","Noto Sans TC","chinese-traditional",{serif:false,script:"cjk-tc"}],["noto-sans-jp","Noto Sans JP","japanese",{serif:false,script:"japanese"}],["noto-sans-kr","Noto Sans KR","korean",{serif:false,script:"korean"}],["noto-serif-sc","Noto Serif SC","chinese-simplified",{serif:true,script:"cjk-sc"}],["noto-serif-tc","Noto Serif TC","chinese-traditional",{serif:true,script:"cjk-tc"}],["noto-serif-jp","Noto Serif JP","japanese",{serif:true,script:"japanese"}],["noto-serif-kr","Noto Serif KR","korean",{serif:true,script:"korean"}]].map(([n,a,i,o])=>({id:n,version:Lr,license:`https://cdn.jsdelivr.net/npm/@fontsource/${n}@${Lr}/LICENSE`,fonts:[400,700].flatMap(s=>(i==="latin"&&n!=="noto-sans-mono"?["normal","italic"]:["normal"]).map(d=>({id:`${n}-${i}-${s}-${d}`,fontFamily:a,traits:{style:"text",monospace:false,stretch:100,...o,weight:s},coverage:i==="latin"?Du:void 0,descriptors:{weight:String(s),style:d},sources:e.map(l=>({url:`${l.replace(/\/$/,"")}/@fontsource/${n}@${Lr}/files/${n}-${i}-${s}-${d}.woff2`}))})))}))}const zu={},Ta=new WeakMap,Ee=()=>new DOMException("Font loading aborted.","AbortError"),Yt=t=>{if(t.aborted)throw Ee()},Pt=(t,e,r,n)=>Number.isFinite(t)?Math.max(r,Math.min(n,t)):e;function Ue(t,e){return e.aborted?Promise.reject(Ee()):new Promise((r,n)=>{const a=()=>{e.removeEventListener("abort",a),n(Ee())};e.addEventListener("abort",a,{once:true}),t.then(i=>{e.removeEventListener("abort",a),r(i)},i=>{e.removeEventListener("abort",a),n(i)})})}function Uu(t,e){return new Promise((r,n)=>{const a=()=>{clearTimeout(i),e.removeEventListener("abort",a),n(Ee())},i=setTimeout(()=>{e.removeEventListener("abort",a),r()},t);e.addEventListener("abort",a,{once:true}),e.aborted&&a()})}class Xu{constructor(e,r){E(this,"entries",new Map);E(this,"routes",new Map);E(this,"origins",new Map);E(this,"assets");this.document=e,this.options=r,this.assets=(r.packs??Hu()).flatMap(n=>n.fonts)}async acquire(e,r){Yt(r);let n=this.entries.get(e);if(!n){const s=new AbortController;n={users:0,controller:s,promise:void 0};const d=n;d.promise=this.load(e,s.signal).then(l=>(Yt(s.signal),this.document.fonts.add(l),d.face=l,l)),this.entries.set(e,n)}n.users++;const a=n;let i=false;const o=()=>{i||(i=true,r.removeEventListener("abort",o),--a.users===0&&(a.controller.abort(),a.face&&this.document.fonts.delete(a.face),this.entries.get(e)===a&&this.entries.delete(e)))};r.addEventListener("abort",o,{once:true});try{return await Ue(a.promise,r),Yt(r),{asset:e,release:o}}catch(s){throw o(),s}}async load(e,r){var d,l;const n=((d=this.document.defaultView)==null?void 0:d.FontFace)??globalThis.FontFace;if(!n||!((l=this.document.fonts)!=null&&l.add))throw new Error("FontFace API unavailable.");const a=Date.now()+Pt(this.options.budgetMs,12e3,10,6e4),i=Math.floor(Pt(this.options.maxAttempts,3,1,8));if(e.data){if(e.data.byteLength>Pt(this.options.maxFontBytes,16*1024*1024,1024,64*1024*1024))throw new Error("Font exceeds size limit.");const u=e.data instanceof Uint8Array?e.data.slice().buffer:e.data.slice(0);return this.decode(n,e,u,r,a)}const o=(e.sources??[]).flatMap(u=>{try{const f=new URL(u.url,this.document.baseURI);return/^https?:$/i.test(f.protocol)?[{...u,url:f.href}]:[]}catch{return[]}});let s=0;for(;s<i&&(Yt(r),!(!o.length||Date.now()>=a));){const u=Date.now(),f=o.filter(h=>this.health(h).retryAt<=u).sort((h,g)=>(h.priority??0)-(g.priority??0)||this.cost(h)-this.cost(g));if(!f.length){const h=Math.min(...o.map(g=>this.health(g).retryAt))-u;if(h>=a-u)break;await Uu(h,r);continue}const m=s+1<i?f.slice(0,2):f.slice(0,1);try{return await this.raceRoutes(m,r,async(h,g)=>(s++,this.request(n,e,h,g,a)))}catch{Yt(r)}}throw new Error(`Font "${e.fontFamily}" could not be loaded; local fallbacks remain active.`)}raceRoutes(e,r,n){return new Promise((a,i)=>{let o=false,s=0,d=0;const l=[];let u;const f=()=>{clearTimeout(u),r.removeEventListener("abort",m)},m=()=>{o||(o=true,f(),l.forEach(g=>g.controller.abort()),i(Ee()))},h=()=>{if(o||s>=e.length)return;const g=e[s++],x=new AbortController,F={source:g,controller:x,started:Date.now()};l.push(F),n(g,x.signal).then(y=>{if(!o){o=true,f();for(const S of l)if(S!==F){if(!S.controller.signal.aborted){const k=this.health(S.source);k.latency=Math.max(k.latency??0,Date.now()-S.started),this.origins.set(new URL(S.source.url).origin,k.latency)}S.controller.abort()}a(y)}},y=>{o||(d++,s<e.length?(clearTimeout(u),h()):d===s&&(o=true,f(),i(y)))})};if(r.addEventListener("abort",m,{once:true}),r.aborted){m();return}h(),e.length>1&&(u=setTimeout(h,Pt(this.options.hedgeDelayMs,200,0,5e3)))})}async request(e,r,n,a,i){var f,m;const o=Date.now(),s=new AbortController,d=()=>s.abort();a.addEventListener("abort",d,{once:true});const l=setTimeout(d,Math.min(i-o,Pt(this.options.timeoutMs,4e3,10,3e4)));let u=0;try{const h=await Ue(fetch(n.url,{signal:s.signal,mode:"cors",credentials:n.credentials??"omit",headers:n.headers,cache:"force-cache",referrerPolicy:"no-referrer"}),s.signal);if(!h.ok){const k=h.headers.get("Retry-After");throw k&&(u=/^\d+(?:\.\d+)?$/.test(k)?Number(k)*1e3:Math.max(0,Date.parse(k)-Date.now())),[401,403,404,410].includes(h.status)&&(u=Math.max(u||0,3e5)),(f=h.body)==null||f.cancel().catch(()=>{}),new Error("Font source returned an error.")}const g=Pt(this.options.maxFontBytes,16*1024*1024,1024,64*1024*1024);if(Number(h.headers.get("Content-Length"))>g)throw(m=h.body)==null||m.cancel().catch(()=>{}),new Error("Font exceeds size limit.");const x=await Ue(Yu(h,g,s.signal),s.signal),F=await this.decode(e,r,x,s.signal,i);Yt(a);const y=this.health(n),S=Math.max(1,Date.now()-o);return y.latency=y.latency===void 0?S:y.latency*.7+S*.3,this.origins.set(new URL(n.url).origin,y.latency),y.failures=0,y.retryAt=0,F}catch(h){Yt(a);const g=this.health(n),x=Pt(this.options.backoffMs,500,1,3e4),F=Pt(this.options.maxBackoffMs,3e4,x,3e5);throw g.failures=Math.min(g.failures+1,10),g.retryAt=Date.now()+Math.max(Number.isFinite(u)?u:0,Math.min(F,x*2**(g.failures-1))*(.75+Math.random()*.5)),h}finally{clearTimeout(l),a.removeEventListener("abort",d),s.abort()}}async decode(e,r,n,a,i){const o=new AbortController,s=()=>o.abort();a.addEventListener("abort",s,{once:true});const d=setTimeout(s,Math.max(0,Math.min(i-Date.now(),Pt(this.options.timeoutMs,4e3,10,3e4))));try{Yt(a);const l=new e(r.fontFamily,n,{display:"swap",...r.descriptors});return await Ue(l.load(),o.signal),Yt(a),l}finally{clearTimeout(d),a.removeEventListener("abort",s)}}health(e){const r=JSON.stringify([e.url,e.credentials,e.headers]);let n=this.routes.get(r);return n||this.routes.set(r,n={failures:0,retryAt:0}),n}cost(e){const r=new URL(e.url).origin===new URL(this.document.baseURI).origin,n=this.health(e);return(n.latency??this.origins.get(new URL(e.url).origin)??(r?500:1500))+n.failures*5e3}}async function Yu(t,e,r){var s;if(!((s=t.body)!=null&&s.getReader)){const d=await t.arrayBuffer();if(!d.byteLength||d.byteLength>e)throw new Error("Invalid font response size.");return d}const n=t.body.getReader(),a=[],i=()=>{n.cancel().catch(()=>{})};r.addEventListener("abort",i,{once:true});let o=0;try{for(;;){const{value:u,done:f}=await n.read();if(f)break;if(o+=u.byteLength,o>e)throw new Error("Font exceeds size limit.");a.push(u)}if(!o)throw new Error("Empty font response.");const d=new Uint8Array(o);let l=0;for(const u of a)d.set(u,l),l+=u.byteLength;return d.buffer}catch(d){throw n.cancel().catch(()=>{}),d}finally{r.removeEventListener("abort",i),n.releaseLock()}}function qu(t,e,r){const n=r.fontLoading===true?zu:r.fontLoading||void 0;if(!n||!t.refreshFonts)return{reset(){},destroy(){}};let a=Ta.get(e);a||Ta.set(e,a=new WeakMap);let i=a.get(n);i||a.set(n,i=new Xu(e,n));let o=new AbortController,s=false,d=false,l=false;const u=new Set,f=[],m=[];let h,g;const x=(k,w)=>{if(g=w,h==null||h(),h=void 0,o.abort(),o=new AbortController,f.splice(0).forEach(T=>T.release()),m.length=0,u.clear(),d=false,k){const T=()=>{o.abort(),f.splice(0).forEach(N=>N.release())};k.addEventListener("abort",T,{once:true}),h=()=>k.removeEventListener("abort",T),k.aborted&&T()}},F=()=>{l||s||(l=true,queueMicrotask(()=>{l=false,y()}))},y=async()=>{var Y;const k=t.getState();if(s||d||o.signal.aborted||k.loading||k.error)return;const w=o.signal,T=((Y=t.getFontReferences)==null?void 0:Y.call(t))??(k.fonts??[]).map(D=>({...D,traits:D.classification})),N=D=>JSON.stringify([D.fontFamily,D.fontFile,D.traits,D.resolvedFontFamily,D.fontStyle]),I=T.filter(D=>{const P=N(D);return u.has(P)?false:(u.add(P),true)});if(!I.length)return;d=true;const C=[],M=new Map;let H=0;const z=async()=>{var D,P;for(;H<I.length&&!w.aborted;){const j=I[H++];if(!(j.fontFamily||j.resolvedFontFamily)||j.embedded||(j.browserUnsupported||/\.shx$/i.test(j.fontFile??""))&&!j.resolvedFontFamily)continue;let O=i.assets,$=j;try{let q;try{q=(D=r.fontResolver)==null?void 0:D.call(r,{family:k.family,sourceFormat:g,fontFamily:j.fontFamily,fontFile:j.fontFile,styleName:j.styleName,fontStyle:j.fontStyle})}catch{C.push(`Font resolver failed for "${j.fontFamily}"; pack and local fallbacks remain active.`)}if(q){const _=typeof q=="string"?q:q.fontFamily;_&&($={...j,resolvedFontFamily:_,source:"application"}),typeof q!="string"&&(O=[...q.assets??[],...O],C.push(...q.warnings??[]))}const V=Le([$],e,{substitute:true}).fonts[0],Z=m.filter(_=>_.fontFamily===((V==null?void 0:V.resolvedFontFamily)??$.resolvedFontFamily??$.fontFamily)),st=ye($.fontFamily??"",$.traits),bt=st.weight??400,dt=Z.some(_=>{var ht,wt,ve;const it=(((ht=_.descriptors)==null?void 0:ht.weight)??String(((wt=_.traits)==null?void 0:wt.weight)??400)).split(/\s+/).map(Number);return bt>=it[0]&&bt<=(it[1]??it[0])&&(((ve=_.descriptors)==null?void 0:ve.style)??"normal").startsWith(j.fontStyle??"normal")}),tt=Z.length>0&&!dt;if(dt||!tt&&((V==null?void 0:V.status)==="available"||$.source==="application"&&(V==null?void 0:V.status)==="substituted")){$.resolvedFontFamily&&$.resolvedFontFamily!==j.resolvedFontFamily&&M.set(j,$);continue}const At=$.resolvedFontFamily??$.fontFamily;O=O.filter(_=>{var it;return(((it=_.descriptors)==null?void 0:it.style)??"normal")===(j.fontStyle??"normal")});const ct=O.filter(_=>_.fontFamily.toLowerCase()===At.toLowerCase()).sort((_,it)=>{var ht,wt,ve,Bn;return Math.abs((((ht=_.traits)==null?void 0:ht.weight)??400)-(((wt=j.traits)==null?void 0:wt.weight)??400))-Math.abs((((ve=it.traits)==null?void 0:ve.weight)??400)-(((Bn=j.traits)==null?void 0:Bn.weight)??400))});if(!ct.length&&!$.resolvedFontFamily&&["serif","monospace","style","script"].every(_=>st[_]===void 0))continue;const et=rr({...$,fontFamily:At},O),ut=[...ct,...et.map(_=>_.candidate).filter(_=>!ct.includes(_))];if($.resolvedFontFamily&&ut.splice(0,ut.length,...ct),!ut.length)continue;if(!tt&&n.preferLocal!==false&&(V==null?void 0:V.status)==="substituted"&&!ct.length){const _={fontFamily:V.resolvedFontFamily};if(((P=rr(j,[_,...ut])[0])==null?void 0:P.candidate)===_)continue}const pt=new Set;for(const _ of ut.filter(it=>{const ht=it.fontFamily.toLowerCase();return pt.has(ht)?false:(pt.add(ht),true)}).slice(0,2))try{const it=await i.acquire(_,w);if(w.aborted){it.release();break}f.push(it),m.push(_),M.set(j,{...$,resolvedFontFamily:_.fontFamily,source:$.source==="application"?"application":"fallback"});break}catch{if(w.aborted)break}!w.aborted&&!M.has(j)&&C.push(`Font "${At}" could not be loaded; local fallback fonts remain active.`)}catch{w.aborted||C.push(`Font "${j.fontFamily}" could not be loaded; local fallback fonts remain active.`)}}};try{if(await Promise.all(Array.from({length:Math.floor(Pt(n.concurrency,3,1,8))},z)),w.aborted||s)return;const D=T.map(P=>M.get(P)??P);for(const P of M.values())u.add(N(P));(M.size||C.length)&&await t.refreshFonts({references:D,loaded:[...m],warnings:[...new Set(C)],relayout:M.size>0})}catch{}finally{w.aborted||(d=false,F())}},S=[t.on("rendered",F),t.on("statechange",F)];return{reset:x,destroy(){s=true,S.forEach(k=>k()),x()}}}function _u(t,e){var n,a;const r=Le(t.references,e,{substitute:true,candidates:t.loaded});for(const i of r.fonts){const o=i.resolvedFontFamily??i.fontFamily;if(t.loaded.some(s=>s.fontFamily.toLowerCase()===(o==null?void 0:o.toLowerCase()))&&(i.status=i.resolvedFontFamily&&i.resolvedFontFamily.toLowerCase()!==((n=i.fontFamily)==null?void 0:n.toLowerCase())?"substituted":"available",i.source=((a=t.references.find(s=>s.fontFamily===i.fontFamily))==null?void 0:a.source)??"application",i.status==="substituted"&&i.source==="fallback")){const s=t.references.find(l=>l.fontFamily===i.fontFamily),d=s&&rr(s,t.loaded.filter(l=>l.fontFamily===o))[0];i.substitutionReason=["webfont",...(d==null?void 0:d.reasons)??[]].join(", "),i.matchScore=d==null?void 0:d.score,i.coverage=(d==null?void 0:d.coverage)??"unknown"}}return r.warnings=[...new Set([...oo(r.fonts),...t.warnings])],r}function Wu(t){const e={lines:[]};let r=0;for(const a of t.replace(/^\uFEFF/,"").split(/\r?\n/)){const i=/^\s*\[(ti|ar|al|offset):([^\]]*)\]\s*$/i.exec(a);if(i){const l=i[1].toLowerCase(),u=i[2].trim();l==="offset"?/^[+-]?\d+$/.test(u)&&Number.isFinite(Number(u))&&(r=Number(u)/1e3):e[l==="ti"?"title":l==="ar"?"artist":"album"]=u;continue}const o=[];let s=a.trimStart(),d;for(;d=/^\[(\d{1,5}):([0-5]\d)(?:[.:](\d{1,3}))?\]/.exec(s);)o.push(Number(d[1])*60+Number(d[2])+ +`0.${d[3]??"0"}`),s=s.slice(d[0].length);s=s.replace(/<\d{1,5}:[0-5]\d(?:[.:]\d{1,3})?>/g,"").trim();for(const l of o)e.lines.push({time:l,text:s})}e.lines.sort((a,i)=>a.time-i.time);const n=[];for(const a of e.lines){const i=n[n.length-1],o=a.time-r;(i==null?void 0:i.time)===o?a.text&&!i.text.split(`
9
+ </svg>`,r,8);default:return kt(e,r,4,.45)}}function kt(t,e,r,n){return{color:e,image:`radial-gradient(circle, ${t} 0 ${n}px, transparent ${n}px)`,size:`${r}px ${r}px`,repeat:"repeat",position:"0 0"}}function Pd(t,e,r){return{color:e,image:`url("data:image/svg+xml,${encodeURIComponent(t)}")`,size:`${r}px ${r}px`,repeat:"repeat",position:"0 0"}}function Od(t,e,r,n){const a=document.createElementNS("http://www.w3.org/2000/svg","pattern");a.id=`${t}-fill-pattern`,a.setAttribute("patternUnits","userSpaceOnUse"),a.setAttribute("x","0"),a.setAttribute("y","0");const i=e.foregroundColor??"#111827",o=e.backgroundColor??"#FFFFFF",s=e.foregroundAlpha,d=e.backgroundAlpha,l=(g,x,S,y,F,k)=>{const w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",String(g)),w.setAttribute("y",String(x)),w.setAttribute("width",String(S)),w.setAttribute("height",String(y)),w.setAttribute("fill",F),k!=null&&w.setAttribute("fill-opacity",String(k)),a.appendChild(w)},u=(g,x,S,y,F)=>{const k=document.createElementNS("http://www.w3.org/2000/svg","line");k.setAttribute("x1",String(g)),k.setAttribute("y1",String(x)),k.setAttribute("x2",String(S)),k.setAttribute("y2",String(y)),k.setAttribute("stroke",i),k.setAttribute("stroke-width",String(F)),s!=null&&k.setAttribute("stroke-opacity",String(s)),a.appendChild(k)},f=(g,x,S)=>{const y=document.createElementNS("http://www.w3.org/2000/svg","circle");y.setAttribute("cx",String(g)),y.setAttribute("cy",String(x)),y.setAttribute("r",String(S)),y.setAttribute("fill",i),s!=null&&y.setAttribute("fill-opacity",String(s)),a.appendChild(y)},m=g=>{const x=document.createElementNS("http://www.w3.org/2000/svg","polygon");x.setAttribute("points",g),x.setAttribute("fill",i),s!=null&&x.setAttribute("fill-opacity",String(s)),a.appendChild(x)},h=(g,x)=>{a.setAttribute("width",String(g)),a.setAttribute("height",String(x)),l(0,0,g,x,o,d)};switch(e.pattern){case"horz":h(8,8),u(0,1,8,1,2);break;case"vert":h(8,8),u(1,0,1,8,2);break;case"ltDnDiag":h(10,10),u(-2,10,10,-2,2),u(0,12,12,0,2);break;case"ltUpDiag":h(10,10),u(-2,0,10,12,2),u(0,-2,12,10,2);break;case"diagCross":h(10,10),u(-2,10,10,-2,2),u(0,12,12,0,2),u(-2,0,10,12,2),u(0,-2,12,10,2);break;case"smGrid":h(8,8),u(0,1,8,1,1),u(1,0,1,8,1);break;case"lgGrid":h(14,14),u(0,2,14,2,2),u(2,0,2,14,2);break;case"pct10":h(5,5),f(1.25,1.25,.65);break;case"pct20":h(10,10),f(2,2,1.75);break;case"pct25":h(9,9),f(2,2,1.9);break;case"pct30":h(8,8),f(2,2,2);break;case"pct40":h(8,8),f(2,2,2.35);break;case"pct50":h(7,7),f(2,2,2.4);break;case"pct60":h(6,6),f(2,2,2.45);break;case"pct70":h(5,5),f(1.8,1.8,2.55);break;case"pct75":h(5,5),f(1.8,1.8,2.7);break;case"pct80":h(4,4),f(1.5,1.5,2.75);break;case"pct90":h(4,4),f(1.5,1.5,3);break;case"pct5":h(4,4),f(1,1,.45);break;case"solidDmnd":h(8,8),m("4,1.5 6.5,4 4,6.5 1.5,4");break;default:h(4,4),f(1,1,.45);break}return{paint:`url(#${a.id})`,defs:[a]}}function Dd(t,e){if(!e.borders)return;const r=[["top",e.borders.top],["right",e.borders.right],["bottom",e.borders.bottom],["left",e.borders.left]];for(const[n,a]of r)a&&t.style.setProperty(`border-${n}`,Yi(a))}function Yi(t){const e=t.width??1,r=Ui(t);if(e<=0||r==="transparent")return"0px solid transparent";const n=Hd(t.compound)??zd(t.dash);return`${Number(e.toFixed(3))}px ${n} ${r}`}function qi(t,e){const r=Ud(e);if(r){t.setAttribute("stroke-dasharray",r);return}t.removeAttribute("stroke-dasharray")}function fe(t,e,r={}){qi(t,e),(e==null?void 0:e.dashOffset)!=null&&Number.isFinite(e.dashOffset)?t.setAttribute("stroke-dashoffset",String(Number(e.dashOffset.toFixed(3)))):t.removeAttribute("stroke-dashoffset"),e!=null&&e.lineCap?t.setAttribute("stroke-linecap",e.lineCap):t.removeAttribute("stroke-linecap");const n=(e==null?void 0:e.lineJoin)??r.defaultJoin;n?t.setAttribute("stroke-linejoin",n):t.removeAttribute("stroke-linejoin"),n==="miter"&&(e==null?void 0:e.miterLimit)!=null?t.setAttribute("stroke-miterlimit",String(Number(e.miterLimit.toFixed(3)))):t.removeAttribute("stroke-miterlimit")}function Hd(t){switch(t){case"double":case"thickThin":case"thinThick":case"triple":return"double";default:return}}function zd(t){switch(t){case"dot":case"sysDot":return"dotted";case"dash":case"sysDash":case"lgDash":case"dashDot":case"sysDashDot":case"lgDashDot":case"lgDashDotDot":case"sysDashDotDot":return"dashed";default:return"solid"}}function Ud(t){var a;const e=(a=t==null?void 0:t.dashPattern)==null?void 0:a.filter(i=>Number.isFinite(i)&&i>0);if(e!=null&&e.length)return e.map(i=>String(Number(i.toFixed(3)))).join(" ");if(!(t!=null&&t.dash)||t.dash==="solid")return;const r=Math.max(t.width??1,1),n=t.lineCap??"butt";switch(t.dash){case"dot":case"sysDot":return ee(r,n,1,1.8);case"dash":case"sysDash":return ee(r,n,3,2);case"lgDash":return ee(r,n,6,3);case"dashDot":case"sysDashDot":return ee(r,n,3,2,1,2);case"lgDashDot":return ee(r,n,6,3,1,3);case"lgDashDotDot":case"sysDashDotDot":return ee(r,n,6,3,1,2,1,2);default:return ee(r,n,3,2)}}function ee(t,e,...r){const n=e==="round"||e==="square";return r.map((a,i)=>{let o=t*a;return n&&i%2===0&&(o=Math.max(o-t,.01)),String(Number(o.toFixed(3)))}).join(" ")}function _i(t,e){t.href=e.href??(e.slideIndex!=null?`#slide-${e.slideIndex+1}`:`#action-${e.navigationAction??"link"}`),e.href?(t.target="_blank",t.rel="noreferrer noopener",t.setAttribute("referrerpolicy","no-referrer")):(t.removeAttribute("target"),t.removeAttribute("rel"),t.removeAttribute("referrerpolicy")),e.slideIndex!=null&&(t.dataset.slideIndex=String(e.slideIndex)),e.navigationAction&&(t.dataset.slideAction=e.navigationAction)}function Wi(t,e){if(!t.bullet)return"";if(t.bullet.char)return Zd(t.bullet.char,t.bullet.fontFamily);if(!t.bullet.autoType)return"";const r=Math.max(0,t.level??0);e.length=r+1;const n=Math.max(1,t.bullet.startAt??1),a=e[r]==null?n:e[r]+1;return e[r]=a,Gd(a,t.bullet.autoType)}function Xd(t,e){return t.bullet&&t.bullet.color?vt(t.bullet.color,t.bullet.colorAlpha):e}function Yd(t,e){if(!t.bullet)return;if(Ie(e))return Ji(e);const r=t.bullet.fontFamily;if(!(!r||!qd(t,e)))return xe(r,{symbol:true,sampleText:e})}function qd(t,e){var a,i;const r=(a=t.bullet)==null?void 0:a.fontFamily;if(!r)return false;const n=(i=t.bullet)==null?void 0:i.char;return n&&n!==e?false:!Ie(e)||!En(r)}function Ie(t){return t?/^[\u2022\u25A0-\u25FF\u2713-\u2714\u27A2\u2460-\u2473\u2474-\u2487\u2488-\u249B]+[.)、.。]?$/.test(t):false}function Ji(t){return xe(Oi[0],{symbol:true,sampleText:t})}function _d(t){return xe(Pi[0],{emoji:true,sampleText:t})}function Vi(t){const e=t.trim();if(!(!e||e!==t)&&(Ie(e)||Gi(e)))return e}function Wd(t,e){const r=Vi(t);if(r){if(Gi(r))return _d(r);if(Ie(r)||En(e??""))return Ji(r)}}function Gi(t){for(const e of t){const r=e.codePointAt(0)??0;if(r===65039||r===8205||r>=126976)return true;if(r>=9728&&r<=9983||r>=9984&&r<=10175)return t.includes("\uFE0F")}return false}function Jd(t,e){return Zi(t,e)}function Zi(t,e){const r=Vd(t);if(!r)return;const n=Number(Math.max(e*.92,12).toFixed(3)),a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("viewBox","0 0 16 16"),a.setAttribute("width",String(n)),a.setAttribute("height",String(n)),a.setAttribute("aria-hidden","true"),a.style.display="block",a.style.flex="0 0 auto",a.style.overflow="visible";const i=o=>{o.setAttribute("fill","currentColor"),a.appendChild(o)};switch(r){case"square":{const o=document.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x","2"),o.setAttribute("y","2"),o.setAttribute("width","12"),o.setAttribute("height","12"),i(o);break}case"circle":{const o=document.createElementNS("http://www.w3.org/2000/svg","circle");o.setAttribute("cx","8"),o.setAttribute("cy","8"),o.setAttribute("r","6"),i(o);break}case"circleOutline":{const o=document.createElementNS("http://www.w3.org/2000/svg","circle");o.setAttribute("cx","8"),o.setAttribute("cy","8"),o.setAttribute("r","5.6"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.65"),a.appendChild(o);break}case"diamond":{const o=document.createElementNS("http://www.w3.org/2000/svg","polygon");o.setAttribute("points","8,1.5 14.5,8 8,14.5 1.5,8"),i(o);break}case"squareOutline":{const o=document.createElementNS("http://www.w3.org/2000/svg","rect");o.setAttribute("x","2.25"),o.setAttribute("y","2.25"),o.setAttribute("width","11.5"),o.setAttribute("height","11.5"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","1.75"),a.appendChild(o);break}case"check":{const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d","M 2.5 8.5 L 6.4 12.2 L 13.5 3.6"),o.setAttribute("fill","none"),o.setAttribute("stroke","currentColor"),o.setAttribute("stroke-width","2.2"),o.setAttribute("stroke-linecap","round"),o.setAttribute("stroke-linejoin","round"),a.appendChild(o);break}case"arrow":{const o=document.createElementNS("http://www.w3.org/2000/svg","path");o.setAttribute("d","M 1.5 8 L 9.5 8 L 9.5 4.6 L 14.5 8 L 9.5 11.4 L 9.5 8.9 L 1.5 8.9 Z"),i(o);break}}return a}function Vd(t){switch(t){case"\u25A0":return"square";case"\u25CF":return"circle";case"\u25CB":return"circleOutline";case"\u25C6":return"diamond";case"\u25A1":return"squareOutline";case"\u2714":return"check";case"\u27A2":return"arrow";default:return}}function Gd(t,e){switch(e){case"circleNumDbPlain":return ru(t);case"ea1JpnChsDbPeriod":return`${nu(t)}.`;case"arabicPlain":return`${t}`;case"arabicParenR":return`${t})`;case"arabicParenBoth":return`(${t})`;case"alphaLcParenR":return`${ue(t).toLowerCase()})`;case"alphaLcParenBoth":return`(${ue(t).toLowerCase()})`;case"alphaLcPeriod":return`${ue(t).toLowerCase()}.`;case"alphaUcParenR":return`${ue(t)})`;case"alphaUcParenBoth":return`(${ue(t)})`;case"alphaUcPeriod":return`${ue(t)}.`;case"romanLcParenR":return`${pe(t).toLowerCase()})`;case"romanLcParenBoth":return`(${pe(t).toLowerCase()})`;case"romanLcPeriod":return`${pe(t).toLowerCase()}.`;case"romanUcParenR":return`${pe(t)})`;case"romanUcParenBoth":return`(${pe(t)})`;case"romanUcPeriod":return`${pe(t)}.`;case"arabicPeriod":default:return`${t}.`}}function Zd(t,e){const r=Ut(e??"").toLowerCase();return r.includes("wingdings")?Kd(t):r.includes("webdings")?Qd(t):t}function Kd(t){switch(t){case"n":return"\u25A0";case"l":return"\u25CF";case"u":return"\u25C6";case"p":return"\u25A1";case"\xFC":return"\u2714";case"\xD8":return"\u27A2";default:return tu[t]??t}}function Qd(t){switch(t){case"8":return"\u2022";case"=":return"\u25A0";case">":return"\u25C6";default:return eu[t]??t}}const tu={n:"\u25A0",l:"\u25CF",u:"\u25C6",p:"\u25A1",\u00FC:"\u2713",\u00D8:"\u2794"},eu={8:"\u2022","=":"\u25A0",">":"\u25C6"};function ru(t){return["","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473"][t]??`${t}`}function nu(t){const e=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"];if(t<=0)return`${t}`;if(t<10)return e[t];if(t===10)return"\u5341";if(t<20)return`\u5341${e[t%10]}`;if(t<100){const r=Math.floor(t/10),n=t%10;return`${e[r]}\u5341${n?e[n]:""}`}return`${t}`}function Ki(t,e){if(t.href)return e?`Open link: ${e}`:"Open external link";if(t.slideIndex!=null)return e?`Go to slide ${t.slideIndex+1}: ${e}`:`Go to slide ${t.slideIndex+1}`;switch(t.navigationAction){case"next":return"Go to next slide";case"previous":return"Go to previous slide";case"first":return"Go to first slide";case"last":return"Go to last slide";case"lastViewed":return"Return to last viewed slide";default:return e??"Linked slide item"}}function au(t,e){return t.href?e?`${e}: ${t.href}`:t.href:Ki(t,e)}function Et(t){return`${Number(t.toFixed(6))}%`}function iu(t){return t.replace(/["\\]/g,"\\$&")}function ue(t){let e=Math.max(1,Math.floor(t)),r="";for(;e>0;)e-=1,r=String.fromCharCode(65+e%26)+r,e=Math.floor(e/26);return r||"A"}function pe(t){const e=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]];let r=Math.max(1,Math.floor(t)),n="";for(const[a,i]of e)for(;r>=a;)n+=i,r-=a;return n||"I"}function ou(t){return t.paragraphs.some(e=>e.runs.some(r=>r.text.trim().length>0))}function Rn(t){return t.paragraphs.some(e=>e.runs.some(r=>!!(r.href||r.slideIndex!=null||r.navigationAction)))}function su(t){return t.cells.some(e=>Rn(e.textFrame))}function cu(t){return!!(t.href||t.slideIndex!=null||t.navigationAction)}function lu(t,e,r){var i,o,s;const n=[],a=Math.max(((i=e.line)==null?void 0:i.width)??1,1);if((o=e.line)!=null&&o.headEnd&&e.line.headEnd!=="none"){const d=Sa(`${e.id}-head`,e.line.headEnd,r,a);t.setAttribute("marker-start",`url(#${d.id})`),n.push(d)}if((s=e.line)!=null&&s.tailEnd&&e.line.tailEnd!=="none"){const d=Sa(`${e.id}-tail`,e.line.tailEnd,r,a);t.setAttribute("marker-end",`url(#${d.id})`),n.push(d)}return n}function Sa(t,e,r,n){const a=du(e),i=document.createElementNS("http://www.w3.org/2000/svg","marker");i.id=t,i.setAttribute("viewBox","0 0 10 10"),i.setAttribute("markerWidth",String(Number((a*2).toFixed(3)))),i.setAttribute("markerHeight",String(Number((a*2).toFixed(3)))),i.setAttribute("refX",String(uu(e))),i.setAttribute("refY","5"),i.setAttribute("orient","auto-start-reverse"),i.setAttribute("markerUnits","strokeWidth");const o=pu(e,r,n);return i.appendChild(o),i}function du(t){switch(t){case"arrow":return 3;case"oval":return 2.8;case"diamond":case"stealth":case"triangle":default:return 2.4}}function uu(t){switch(t){case"arrow":return 9.2;case"stealth":return 8.8;case"oval":return 7.6;case"diamond":return 8.4;case"triangle":default:return 8.6}}function pu(t,e,r){switch(t){case"diamond":{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 5 L 4 1 L 8 5 L 4 9 z"),n.setAttribute("fill",e),n}case"oval":{const n=document.createElementNS("http://www.w3.org/2000/svg","circle");return n.setAttribute("cx","4.5"),n.setAttribute("cy","5"),n.setAttribute("r","3"),n.setAttribute("fill",e),n}case"stealth":{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 0 L 8 5 L 0 10 L 2.6 5 z"),n.setAttribute("fill",e),n}case"arrow":{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 0 L 8 5 L 0 10"),n.setAttribute("fill","none"),n.setAttribute("stroke",e),n.setAttribute("stroke-width",String(Number(Math.max(r*.9,1.25).toFixed(3)))),n.setAttribute("stroke-linecap","round"),n.setAttribute("stroke-linejoin","round"),n}case"triangle":default:{const n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d","M 0 0 L 8 5 L 0 10 z"),n.setAttribute("fill",e),n}}}function hu(t){if(typeof Buffer<"u")return Buffer.from(t).toString("base64");let e="";for(const r of t)e+=String.fromCharCode(r);return btoa(e)}function Qi(t,e){var F,k;const r=new AbortController,n=r.signal,a=new Set,i=new Set,o=new WeakSet;let s=[],d=false;const l=t.style.touchAction??"",u=e.pan?"none":"pan-x pan-y";t.style.touchAction=u;const f=w=>Array.from(w.touches).filter(T=>a.has(T.identifier)),m=w=>w.length<2?0:Math.hypot(w[1].clientX-w[0].clientX,w[1].clientY-w[0].clientY),h=()=>{for(const w of i)w.removeEventListener("touchmove",x),w.removeEventListener("touchend",S),w.removeEventListener("touchcancel",g);i.clear(),a.clear(),s=[],d=false},g=()=>h(),x=w=>{var N,I;if(o.has(w))return;if(o.add(w),((N=e.enabled)==null?void 0:N.call(e))===false){h();return}const T=f(w);if(T.length){if((e.pan||T.length>1||d)&&w.preventDefault(),T.length>1&&s.length>1){d=true;const C=m(s),M=m(T),H=e.getScale();if(C>0&&M>0&&Number.isFinite(H)&&H>0){const z=t.getBoundingClientRect(),Y=(T[0].clientX+T[1].clientX)/2-z.left,D=(T[0].clientY+T[1].clientY)/2-z.top,P=t.scrollLeft,j=t.scrollTop,O=Math.max(e.minScale??.1,Math.min(e.maxScale??8,H*M/C));if(O!==H&&(e.setScale(O,{x:Y,y:D}),!e.pan)){const $=e.getScale()/H;t.scrollLeft=(P+Y)*$-Y,t.scrollTop=(j+D)*$-D}}}else T.length===1&&s.length===1&&T[0].identifier===s[0].identifier&&((I=e.pan)==null||I.call(e,T[0].clientX-s[0].clientX,T[0].clientY-s[0].clientY));s=T}},S=w=>{o.has(w)||(o.add(w),s=f(w),s.length||h())};t.addEventListener("touchstart",w=>{var N,I;if(((N=e.enabled)==null?void 0:N.call(e))===false)return;const T=w.target;if(!(!a.size&&((I=T==null?void 0:T.closest)!=null&&I.call(T,'button, input, select, textarea, video, audio, [contenteditable="true"]')))){for(const C of Array.from(w.changedTouches))a.add(C.identifier);s=f(w),d||(d=s.length>1),(e.pan||d)&&w.preventDefault(),w.target&&!i.has(w.target)&&(i.add(w.target),w.target.addEventListener("touchmove",x,{passive:false,signal:n}),w.target.addEventListener("touchend",S,{signal:n}),w.target.addEventListener("touchcancel",g,{signal:n}))}},{passive:false,signal:n});const y=()=>r.abort();return n.addEventListener("abort",()=>{var w;h(),t.style.touchAction===u&&(t.style.touchAction=l),(w=e.signal)==null||w.removeEventListener("abort",y)},{once:true}),(F=e.signal)!=null&&F.aborted?y():(k=e.signal)==null||k.addEventListener("abort",y,{once:true}),y}class fu{constructor(e,r={}){E(this,"options");E(this,"root");E(this,"scrollArea");E(this,"unbindTouch",()=>{});E(this,"listeners",{rendered:new Set,error:new Set,slidechange:new Set,scalechange:new Set,warnings:new Set});E(this,"resizeObserver");E(this,"shells",[]);E(this,"mountedSlides",new Set);E(this,"mountedStages",new Map);E(this,"slideRoots",new Map);E(this,"requestToken",0);E(this,"fallbackScrollRaf",0);E(this,"activeAbortController",null);E(this,"mediaRegistry",null);E(this,"presentation",null);E(this,"lastViewedSlide",null);E(this,"navigationSourceSlide",null);E(this,"navigationTargetSlide",null);E(this,"navigationSettleTimer",0);E(this,"state",{loading:false,error:null,currentSlide:0,slideCount:0,scale:1,fit:"contain",warnings:[],presentation:null,mediaRegistry:null});E(this,"handleFallbackScroll",()=>{this.fallbackScrollRaf||(this.fallbackScrollRaf=requestAnimationFrame(()=>{this.fallbackScrollRaf=0,this.syncCurrentSlideToViewport()}))});E(this,"handleNavigationInterruption",()=>{this.navigationTargetSlide!=null&&(this.navigationSourceSlide=null,this.clearNavigationSettleTimer(),this.handleFallbackScroll())});E(this,"handleLinkClick",e2=>{var i;const r2=e2.target instanceof Element?e2.target.closest("[data-slide-index], [data-slide-action]"):null;if(!(r2 instanceof HTMLAnchorElement))return;const n=r2.dataset.slideAction;if(n)switch(e2.preventDefault(),n){case"next":this.next();return;case"previous":this.prev();return;case"first":this.goToSlide(0);return;case"last":this.goToSlide(Math.max((((i=this.presentation)==null?void 0:i.slides.length)??1)-1,0));return;case"lastViewed":this.lastViewedSlide!=null&&this.goToSlide(this.lastViewedSlide);return;default:return}const a=Number(r2.dataset.slideIndex);Number.isFinite(a)&&(e2.preventDefault(),this.goToSlide(a))});this.container=e,this.options={width:r.width??0,height:r.height??0,fit:r.fit??"contain",initialScale:r.initialScale??1,minScale:r.minScale??.4,maxScale:r.maxScale??4,virtual:r.virtual??true},this.state.fit=this.options.fit,this.state.scale=gt(this.options.initialScale,this.options.minScale,this.options.maxScale),this.root=document.createElement("div"),this.root.className="pptxv-viewer",this.options.width&&(this.root.style.width=`${this.options.width}px`),this.options.height&&(this.root.style.height=`${this.options.height}px`),this.scrollArea=document.createElement("div"),this.scrollArea.className="pptxv-scroll-area",this.root.appendChild(this.scrollArea),this.root.addEventListener("click",this.handleLinkClick),this.container.innerHTML="",this.container.appendChild(this.root),this.bindResizeObserver()}async preview(e){var n,a;this.unbindTouch();const r=++this.requestToken;(n=this.activeAbortController)==null||n.abort(),this.activeAbortController=typeof AbortController<"u"?new AbortController:null,this.beginLoadingState(),this.renderLoadingState();try{const i=await Do(e,{signal:(a=this.activeAbortController)==null?void 0:a.signal});if(r!==this.requestToken)return;this.applyPresentation(i)}catch(i){if(r!==this.requestToken||gu(i))return;const o=i instanceof Error?i:new Error(String(i));this.state.loading=false,this.state.error=o.message,this.renderErrorState(o.message),this.emit("error",o)}finally{r===this.requestToken&&(this.activeAbortController=null)}}destroy(){var e,r,n;this.unbindTouch(),this.requestToken+=1,(e=this.activeAbortController)==null||e.abort(),this.activeAbortController=null,(r=this.resizeObserver)==null||r.disconnect(),(n=this.mediaRegistry)==null||n.destroy(),this.root.removeEventListener("click",this.handleLinkClick),this.clearRenderedSlides(),this.container.innerHTML="",this.presentation=null,this.mediaRegistry=null,this.state.presentation=null,this.state.mediaRegistry=null,this.state.loading=false,this.state.error=null,this.state.slideCount=0,this.state.currentSlide=0,this.state.warnings=[],this.lastViewedSlide=null,this.navigationSourceSlide=null,this.clearNavigationSettleTimer()}setScale(e){const r=gt(e,this.options.minScale,this.options.maxScale),n=this.state.fit!=="none"||r!==this.state.scale;this.state.fit="none",this.state.scale=r,n&&(this.layoutSlides(),this.emit("scalechange",this.getState()))}fit(e){const r=e??this.state.fit,n=r!==this.state.fit;this.state.fit=r,this.applyFitScale(),!(!n&&!this.presentation)&&(this.layoutSlides(),this.emit("scalechange",this.getState()))}goToSlide(e){const r=gt(e,0,Math.max(this.shells.length-1,0)),n=this.shells[r];n&&(this.beginProgrammaticNavigation(),this.navigationTargetSlide=r,n.scrollIntoView({behavior:Aa(),block:"start"}),this.setCurrentSlide(r))}next(){this.goToSlide(this.state.currentSlide+1)}prev(){this.goToSlide(this.state.currentSlide-1)}getState(){return{...this.state,presentation:this.presentation,mediaRegistry:this.mediaRegistry}}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}emit(e,r){for(const n of this.listeners[e])n(r)}applyPresentation(e){var r;(r=this.mediaRegistry)==null||r.destroy(),this.presentation=e,this.lastViewedSlide=null,this.mediaRegistry=new Li(e),this.state.loading=false,this.state.error=null,this.state.presentation=e,this.state.mediaRegistry=this.mediaRegistry,this.state.slideCount=e.slides.length,this.state.currentSlide=0,this.state.warnings=e.warnings,this.clearRenderedSlides(),this.state.fit!=="none"?this.applyFitScale():this.state.scale=gt(this.state.scale,this.options.minScale,this.options.maxScale),this.scrollArea.scrollTop=0,this.renderSlideShells(),this.unbindTouch=Qi(this.scrollArea,{getScale:()=>this.state.scale,setScale:n=>this.setScale(n),enabled:()=>!this.state.loading&&!!this.presentation,minScale:this.options.minScale,maxScale:this.options.maxScale}),this.emit("warnings",e.warnings),this.emit("rendered",this.getState())}renderLoadingState(){this.clearRenderedSlides();const e=document.createElement("div");e.className="pptxv-loading",e.textContent="Loading presentation...",this.scrollArea.appendChild(e)}renderErrorState(e){this.clearRenderedSlides();const r=document.createElement("div");r.className="pptxv-loading pptxv-loading--error",r.textContent=`Unable to load presentation: ${e}`,this.scrollArea.appendChild(r)}renderSlideShells(){if(this.clearRenderedSlides(),!!this.presentation){if(this.presentation.slides.length===0){const e=document.createElement("div");e.className="pptxv-loading pptxv-loading--empty",e.textContent="No slides in presentation.",this.scrollArea.appendChild(e);return}this.presentation.slides.forEach((e,r)=>{const n=document.createElement("div");n.className="pptxv-slide-shell",n.dataset.slideIndex=String(r),this.scrollArea.appendChild(n),this.shells.push(n)}),this.layoutSlides(),this.bindSlideTracking()}}layoutSlides(){this.presentation&&(this.presentation.slides.forEach((e,r)=>{const n=this.shells[r];n&&(n.style.width=`${e.width*this.state.scale}px`,n.style.minHeight=`${e.height*this.state.scale}px`,n.style.height=`${e.height*this.state.scale}px`)}),this.syncMountedSlides(),this.handleFallbackScroll())}syncMountedSlides(){var r;if(!this.presentation||!this.mediaRegistry)return;const e=new Set;if(this.options.virtual){e.add(this.state.currentSlide),this.navigationTargetSlide!=null&&e.add(this.navigationTargetSlide);const n=this.getTrackingViewport();if(n){let a=this.state.currentSlide;const i=(r=this.shells[a])==null?void 0:r.getBoundingClientRect();i&&(i.bottom<=n.top||i.top>=n.bottom)&&(a=this.findTrackedSlideIndex()??a,e.add(a));for(const o of[-1,1])for(let s=a+o;s>=0&&s<this.shells.length;s+=o){const d=this.shells[s].getBoundingClientRect();if(d.height<=0||d.bottom<=n.top||d.top>=n.bottom)break;e.add(s)}}}else for(let n=0;n<this.presentation.slides.length;n+=1)e.add(n);for(const n of[...this.mountedSlides])e.has(n)||this.unmountSlide(n);for(const n of e){if(this.mountedSlides.has(n)){this.updateMountedSlide(n);continue}this.mountSlide(n)}}refreshFonts(){if(!this.presentation||this.state.loading)return;const e=this.scrollArea.scrollTop,r=this.scrollArea.scrollLeft,n=[...this.mountedSlides];for(const a of n)this.unmountSlide(a);for(const a of n)this.mountSlide(a);this.scrollArea.scrollTop=e,this.scrollArea.scrollLeft=r,this.emit("rendered",this.getState())}mountSlide(e){if(!this.presentation||!this.mediaRegistry)return;const r=this.shells[e];if(!r)return;const n=document.createElement("div");n.className="pptxv-slide-stage";const a=el(this.presentation.slides[e],this.presentation,{mediaRegistry:this.mediaRegistry});n.appendChild(a),r.appendChild(n),this.mountedStages.set(e,n),this.slideRoots.set(e,a),this.mountedSlides.add(e),this.updateMountedSlide(e)}updateMountedSlide(e){if(!this.presentation)return;const r=this.mountedStages.get(e),n=this.slideRoots.get(e),a=this.presentation.slides[e];!r||!n||!a||(r.style.width=`${a.width*this.state.scale}px`,r.style.height=`${a.height*this.state.scale}px`,n.style.transform=`scale(${this.state.scale})`,n.style.transformOrigin="top left")}unmountSlide(e){var r;(r=this.mountedStages.get(e))==null||r.remove(),this.mountedStages.delete(e),this.slideRoots.delete(e),this.mountedSlides.delete(e)}bindResizeObserver(){typeof ResizeObserver>"u"||(this.resizeObserver=new ResizeObserver(()=>{this.presentation&&this.state.fit!=="none"&&(this.applyFitScale(),this.layoutSlides())}),this.resizeObserver.observe(this.root))}bindSlideTracking(){this.scrollArea.removeEventListener("scroll",this.handleFallbackScroll),this.scrollArea.addEventListener("scroll",this.handleFallbackScroll,{passive:true});for(const e of["wheel","touchstart","pointerdown"])this.scrollArea.removeEventListener(e,this.handleNavigationInterruption),this.scrollArea.addEventListener(e,this.handleNavigationInterruption,{passive:true});typeof window<"u"&&(window.removeEventListener("scroll",this.handleFallbackScroll),window.removeEventListener("resize",this.handleFallbackScroll),window.addEventListener("scroll",this.handleFallbackScroll,{passive:true}),window.addEventListener("resize",this.handleFallbackScroll,{passive:true}))}syncCurrentSlideToViewport(){if(this.navigationTargetSlide!=null){this.syncMountedSlides();return}const e=this.findTrackedSlideIndex();e!=null&&this.setCurrentSlide(e)}findTrackedSlideIndex(){if(!this.shells.length)return null;const e=this.getTrackingViewport();if(!e)return null;let r=null,n=-1,a=Number.POSITIVE_INFINITY,i=0,o=Number.POSITIVE_INFINITY;const s=new Map,d=m=>{let h=s.get(m);return h||(h=this.shells[m].getBoundingClientRect(),s.set(m,h)),h};let l=0,u=this.shells.length,f=false;for(;l<u;){const m=Math.floor((l+u)/2),h=d(m);if(!Number.isFinite(h.top)||!Number.isFinite(h.height)||h.height<=0){f=true;break}h.bottom<=e.top?l=m+1:u=m}for(let m=f?0:Math.max(0,l-1);m<this.shells.length;m++){const h=d(m);if(!Number.isFinite(h.top)||!Number.isFinite(h.height)||h.height<=0)continue;const g=h.top+h.height/2,x=Math.abs(g-e.center);x<o&&(o=x,i=m);const S=Math.max(h.top,e.top),F=Math.min(h.bottom,e.bottom)-S;if(F<=0){if(!f&&h.top>=e.bottom)break;continue}const k=F/h.height,w=S+F/2,T=Math.abs(w-e.center);(k>n+1e-4||Math.abs(k-n)<=1e-4&&T<a)&&(r=m,n=k,a=T)}return r??i}getTrackingViewport(){const e=this.scrollArea.getBoundingClientRect();if(!Number.isFinite(e.top)||!Number.isFinite(e.bottom))return null;const r=typeof window<"u"&&(window.innerHeight||document.documentElement.clientHeight)||e.height,n=Math.max(e.top,0),a=Math.min(e.bottom,r);return a<=n?null:{top:n,bottom:a,center:n+(a-n)/2}}setCurrentSlide(e){if(e===this.state.currentSlide){this.syncMountedSlides();return}const r=this.state.scale,n=this.state.currentSlide;this.lastViewedSlide=this.navigationSourceSlide??n,this.state.currentSlide=e,this.state.fit!=="none"?(this.applyFitScale(),this.layoutSlides()):this.syncMountedSlides(),this.emit("slidechange",this.getState()),this.state.scale!==r&&this.emit("scalechange",this.getState())}beginProgrammaticNavigation(){if(this.navigationSourceSlide=this.state.currentSlide,this.clearNavigationSettleTimer(),typeof window>"u")return;const e=Aa()==="smooth"?700:50;this.navigationSettleTimer=window.setTimeout(()=>{this.navigationSettleTimer=0,this.navigationSourceSlide=null,this.navigationTargetSlide=null,this.syncCurrentSlideToViewport()},e)}clearNavigationSettleTimer(){this.navigationTargetSlide=null,this.navigationSettleTimer&&(clearTimeout(this.navigationSettleTimer),this.navigationSettleTimer=0)}applyFitScale(){var o;if(!((o=this.presentation)!=null&&o.slides.length))return;const e=this.presentation.slides[this.state.currentSlide]??this.presentation.slides[0],r=Math.max(this.scrollArea.clientWidth-24,120),n=Math.max(this.scrollArea.clientHeight-24,120),a=r/e.width,i=Math.min(a,n/e.height);this.state.scale=gt(this.state.fit==="width"?a:i,this.options.minScale,this.options.maxScale)}beginLoadingState(){var e;(e=this.mediaRegistry)==null||e.destroy(),this.mediaRegistry=null,this.presentation=null,this.lastViewedSlide=null,this.navigationSourceSlide=null,this.clearNavigationSettleTimer(),this.state.loading=true,this.state.error=null,this.state.presentation=null,this.state.mediaRegistry=null,this.state.currentSlide=0,this.state.slideCount=0,this.state.warnings=[]}clearRenderedSlides(){this.clearNavigationSettleTimer(),this.navigationSourceSlide=null,this.fallbackScrollRaf&&(cancelAnimationFrame(this.fallbackScrollRaf),this.fallbackScrollRaf=0),this.scrollArea.removeEventListener("scroll",this.handleFallbackScroll);for(const e of["wheel","touchstart","pointerdown"])this.scrollArea.removeEventListener(e,this.handleNavigationInterruption);typeof window<"u"&&(window.removeEventListener("scroll",this.handleFallbackScroll),window.removeEventListener("resize",this.handleFallbackScroll)),this.shells=[],this.mountedSlides.clear(),this.mountedStages.clear(),this.slideRoots.clear(),this.scrollArea.innerHTML=""}}function mu(t,e){return new fu(t,e)}function gu(t){return t instanceof Error&&t.name==="AbortError"}function Aa(){return typeof window>"u"||typeof window.matchMedia!="function"?"smooth":window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}const ne={maxDepth:8,maxEntryBytes:128*1024*1024,maxExpandedBytes:512*1024*1024,maxEntries:2e4};function to(){return{depth:0,budget:{expandedBytes:0}}}function yu(t){if(t.depth>=ne.maxDepth)throw new Error("The maximum nested preview depth has been reached.");return{depth:t.depth+1,budget:t.budget}}function qt(t,e){return e?new Promise((r,n)=>{const a=()=>{i(),n(new DOMException("Preview cancelled.","AbortError"))},i=()=>e.removeEventListener("abort",a);e.addEventListener("abort",a,{once:true}),e.aborted&&a(),t.then(o=>{i(),r(o)},o=>{i(),n(o)})}):t}async function xu(t,e,r,n){n==null||n.throwIfAborted();const a=e??0;if(!Number.isSafeInteger(a)||a<0||a>ne.maxEntryBytes)throw new Error("Attachment exceeds the preview size limit.");if(r.budget.expandedBytes+a>ne.maxExpandedBytes)throw new Error("The total expanded preview size limit has been reached.");r.budget.expandedBytes+=a;try{const i=await qt(t(),n);if(n==null||n.throwIfAborted(),i.byteLength>ne.maxEntryBytes||r.budget.expandedBytes-a+i.byteLength>ne.maxExpandedBytes)throw new Error("The expanded preview size limit has been reached.");return r.budget.expandedBytes+=i.byteLength-a,i}catch(i){throw r.budget.expandedBytes-=a,i}}async function ch(t,e,r,n,a){let i=a,o=0;for(;;){n==null||n.throwIfAborted();try{return await qt(t(i),n)}catch(s){const d=ge(s);if(!d||d==="password_cancelled"||!e.requestPassword)throw s;const l=await qt(Promise.resolve(e.requestPassword({name:r,reason:d,attempt:++o,signal:n})),n);if(n==null||n.throwIfAborted(),l===null)throw new ie("password_cancelled");i=l}}}const vu=[{sourceFormat:"psd",targetFormat:"png"},{sourceFormat:"psb",targetFormat:"png"},{sourceFormat:"ai",targetFormat:"pdf"},{sourceFormat:"eps",targetFormat:"pdf"},{sourceFormat:"ps",targetFormat:"pdf"},{sourceFormat:"docx",targetFormat:"docx"},{sourceFormat:"xlsx",targetFormat:"xlsx"},{sourceFormat:"pptx",targetFormat:"pptx"},{sourceFormat:"ppt",targetFormat:"pptx"},{sourceFormat:"pps",targetFormat:"pptx"},{sourceFormat:"pot",targetFormat:"pptx"},{sourceFormat:"pptm",targetFormat:"pptx"},{sourceFormat:"ppsx",targetFormat:"pptx"},{sourceFormat:"ppsm",targetFormat:"pptx"},{sourceFormat:"potx",targetFormat:"pptx"},{sourceFormat:"potm",targetFormat:"pptx"},{sourceFormat:"dps",targetFormat:"pptx"},{sourceFormat:"dpt",targetFormat:"pptx"},{sourceFormat:"odp",targetFormat:"pptx"},{sourceFormat:"otp",targetFormat:"pptx"},{sourceFormat:"fodp",targetFormat:"pptx"},{sourceFormat:"sxi",targetFormat:"pptx"},{sourceFormat:"sti",targetFormat:"pptx"},{sourceFormat:"odg",targetFormat:"pptx"},{sourceFormat:"otg",targetFormat:"pptx"},{sourceFormat:"fodg",targetFormat:"pptx"},{sourceFormat:"sxd",targetFormat:"pptx"},{sourceFormat:"std",targetFormat:"pptx"},{sourceFormat:"doc",targetFormat:"docx"},{sourceFormat:"docm",targetFormat:"docx"},{sourceFormat:"dot",targetFormat:"docx"},{sourceFormat:"dotx",targetFormat:"docx"},{sourceFormat:"dotm",targetFormat:"docx"},{sourceFormat:"wps",targetFormat:"docx"},{sourceFormat:"wpt",targetFormat:"docx"},{sourceFormat:"rtf",targetFormat:"docx"},{sourceFormat:"odt",targetFormat:"docx"},{sourceFormat:"ott",targetFormat:"docx"},{sourceFormat:"fodt",targetFormat:"docx"},{sourceFormat:"sxw",targetFormat:"docx"},{sourceFormat:"stw",targetFormat:"docx"},{sourceFormat:"txt",targetFormat:"docx"},{sourceFormat:"text",targetFormat:"docx"},{sourceFormat:"md",targetFormat:"docx"},{sourceFormat:"markdown",targetFormat:"docx"},{sourceFormat:"mkd",targetFormat:"docx"},{sourceFormat:"mkdn",targetFormat:"docx"},{sourceFormat:"mdown",targetFormat:"docx"},{sourceFormat:"html",targetFormat:"docx"},{sourceFormat:"htm",targetFormat:"docx"},{sourceFormat:"shtml",targetFormat:"docx"},{sourceFormat:"xhtml",targetFormat:"docx"},{sourceFormat:"xht",targetFormat:"docx"},{sourceFormat:"xhtm",targetFormat:"docx"},{sourceFormat:"epub",targetFormat:"docx"},{sourceFormat:"fb2",targetFormat:"docx"},{sourceFormat:"xml",targetFormat:"docx"},{sourceFormat:"rss",targetFormat:"docx"},{sourceFormat:"atom",targetFormat:"docx"},{sourceFormat:"kml",targetFormat:"docx"},{sourceFormat:"gpx",targetFormat:"docx"},{sourceFormat:"ttml",targetFormat:"docx"},{sourceFormat:"dfxp",targetFormat:"docx"},{sourceFormat:"xsd",targetFormat:"docx"},{sourceFormat:"xsl",targetFormat:"docx"},{sourceFormat:"xslt",targetFormat:"docx"},{sourceFormat:"wsdl",targetFormat:"docx"},{sourceFormat:"plist",targetFormat:"docx"},{sourceFormat:"pom",targetFormat:"docx"},{sourceFormat:"yaml",targetFormat:"docx"},{sourceFormat:"yml",targetFormat:"docx"},{sourceFormat:"toml",targetFormat:"docx"},{sourceFormat:"ini",targetFormat:"docx"},{sourceFormat:"log",targetFormat:"docx"},{sourceFormat:"rst",targetFormat:"docx"},{sourceFormat:"rest",targetFormat:"docx"},{sourceFormat:"adoc",targetFormat:"docx"},{sourceFormat:"asciidoc",targetFormat:"docx"},{sourceFormat:"asc",targetFormat:"docx"},{sourceFormat:"tex",targetFormat:"docx"},{sourceFormat:"latex",targetFormat:"docx"},{sourceFormat:"ltx",targetFormat:"docx"},{sourceFormat:"sty",targetFormat:"docx"},{sourceFormat:"cls",targetFormat:"docx"},{sourceFormat:"properties",targetFormat:"docx"},{sourceFormat:"env",targetFormat:"docx"},{sourceFormat:"conf",targetFormat:"docx"},{sourceFormat:"config",targetFormat:"docx"},{sourceFormat:"cfg",targetFormat:"docx"},{sourceFormat:"cnf",targetFormat:"docx"},{sourceFormat:"sql",targetFormat:"docx"},{sourceFormat:"js",targetFormat:"docx"},{sourceFormat:"jsx",targetFormat:"docx"},{sourceFormat:"mjs",targetFormat:"docx"},{sourceFormat:"cjs",targetFormat:"docx"},{sourceFormat:"ts",targetFormat:"docx"},{sourceFormat:"tsx",targetFormat:"docx"},{sourceFormat:"mts",targetFormat:"docx"},{sourceFormat:"cts",targetFormat:"docx"},{sourceFormat:"vue",targetFormat:"docx"},{sourceFormat:"css",targetFormat:"docx"},{sourceFormat:"scss",targetFormat:"docx"},{sourceFormat:"sass",targetFormat:"docx"},{sourceFormat:"less",targetFormat:"docx"},{sourceFormat:"c",targetFormat:"docx"},{sourceFormat:"cpp",targetFormat:"docx"},{sourceFormat:"cc",targetFormat:"docx"},{sourceFormat:"cxx",targetFormat:"docx"},{sourceFormat:"h",targetFormat:"docx"},{sourceFormat:"hpp",targetFormat:"docx"},{sourceFormat:"hh",targetFormat:"docx"},{sourceFormat:"hxx",targetFormat:"docx"},{sourceFormat:"cs",targetFormat:"docx"},{sourceFormat:"go",targetFormat:"docx"},{sourceFormat:"java",targetFormat:"docx"},{sourceFormat:"kt",targetFormat:"docx"},{sourceFormat:"kts",targetFormat:"docx"},{sourceFormat:"lua",targetFormat:"docx"},{sourceFormat:"php",targetFormat:"docx"},{sourceFormat:"py",targetFormat:"docx"},{sourceFormat:"rb",targetFormat:"docx"},{sourceFormat:"rs",targetFormat:"docx"},{sourceFormat:"sh",targetFormat:"docx"},{sourceFormat:"bash",targetFormat:"docx"},{sourceFormat:"bat",targetFormat:"docx"},{sourceFormat:"cmd",targetFormat:"docx"},{sourceFormat:"ps1",targetFormat:"docx"},{sourceFormat:"swift",targetFormat:"docx"},{sourceFormat:"jsonc",targetFormat:"docx"},{sourceFormat:"json5",targetFormat:"docx"},{sourceFormat:"ipynb",targetFormat:"docx"},{sourceFormat:"gql",targetFormat:"docx"},{sourceFormat:"graphql",targetFormat:"docx"},{sourceFormat:"proto",targetFormat:"docx"},{sourceFormat:"diff",targetFormat:"docx"},{sourceFormat:"patch",targetFormat:"docx"},{sourceFormat:"gitignore",targetFormat:"docx"},{sourceFormat:"dockerignore",targetFormat:"docx"},{sourceFormat:"editorconfig",targetFormat:"docx"},{sourceFormat:"r",targetFormat:"docx"},{sourceFormat:"dart",targetFormat:"docx"},{sourceFormat:"scala",targetFormat:"docx"},{sourceFormat:"groovy",targetFormat:"docx"},{sourceFormat:"gradle",targetFormat:"docx"},{sourceFormat:"pl",targetFormat:"docx"},{sourceFormat:"ex",targetFormat:"docx"},{sourceFormat:"erl",targetFormat:"docx"},{sourceFormat:"fs",targetFormat:"docx"},{sourceFormat:"fsi",targetFormat:"docx"},{sourceFormat:"fsx",targetFormat:"docx"},{sourceFormat:"vb",targetFormat:"docx"},{sourceFormat:"clj",targetFormat:"docx"},{sourceFormat:"hs",targetFormat:"docx"},{sourceFormat:"jl",targetFormat:"docx"},{sourceFormat:"zig",targetFormat:"docx"},{sourceFormat:"m",targetFormat:"docx"},{sourceFormat:"matlab",targetFormat:"docx"},{sourceFormat:"svelte",targetFormat:"docx"},{sourceFormat:"astro",targetFormat:"docx"},{sourceFormat:"mdx",targetFormat:"docx"},{sourceFormat:"tf",targetFormat:"docx"},{sourceFormat:"tfvars",targetFormat:"docx"},{sourceFormat:"hcl",targetFormat:"docx"},{sourceFormat:"rego",targetFormat:"docx"},{sourceFormat:"bicep",targetFormat:"docx"},{sourceFormat:"prisma",targetFormat:"docx"},{sourceFormat:"dockerfile",targetFormat:"docx"},{sourceFormat:"cmake",targetFormat:"docx"},{sourceFormat:"make",targetFormat:"docx"},{sourceFormat:"mk",targetFormat:"docx"},{sourceFormat:"zsh",targetFormat:"docx"},{sourceFormat:"fish",targetFormat:"docx"},{sourceFormat:"csproj",targetFormat:"docx"},{sourceFormat:"vbproj",targetFormat:"docx"},{sourceFormat:"fsproj",targetFormat:"docx"},{sourceFormat:"props",targetFormat:"docx"},{sourceFormat:"targets",targetFormat:"docx"},{sourceFormat:"sln",targetFormat:"docx"},{sourceFormat:"cshtml",targetFormat:"docx"},{sourceFormat:"razor",targetFormat:"docx"},{sourceFormat:"mustache",targetFormat:"docx"},{sourceFormat:"hbs",targetFormat:"docx"},{sourceFormat:"liquid",targetFormat:"docx"},{sourceFormat:"jinja",targetFormat:"docx"},{sourceFormat:"twig",targetFormat:"docx"},{sourceFormat:"ejs",targetFormat:"docx"},{sourceFormat:"erb",targetFormat:"docx"},{sourceFormat:"haml",targetFormat:"docx"},{sourceFormat:"slim",targetFormat:"docx"},{sourceFormat:"mermaid",targetFormat:"docx"},{sourceFormat:"mmd",targetFormat:"docx"},{sourceFormat:"puml",targetFormat:"docx"},{sourceFormat:"avsc",targetFormat:"docx"},{sourceFormat:"sol",targetFormat:"docx"},{sourceFormat:"move",targetFormat:"docx"},{sourceFormat:"nim",targetFormat:"docx"},{sourceFormat:"cr",targetFormat:"docx"},{sourceFormat:"ml",targetFormat:"docx"},{sourceFormat:"mli",targetFormat:"docx"},{sourceFormat:"elm",targetFormat:"docx"},{sourceFormat:"rkt",targetFormat:"docx"},{sourceFormat:"lisp",targetFormat:"docx"},{sourceFormat:"scm",targetFormat:"docx"},{sourceFormat:"asm",targetFormat:"docx"},{sourceFormat:"s",targetFormat:"docx"},{sourceFormat:"cu",targetFormat:"docx"},{sourceFormat:"cuh",targetFormat:"docx"},{sourceFormat:"d",targetFormat:"docx"},{sourceFormat:"pas",targetFormat:"docx"},{sourceFormat:"adb",targetFormat:"docx"},{sourceFormat:"ads",targetFormat:"docx"},{sourceFormat:"cob",targetFormat:"docx"},{sourceFormat:"cbl",targetFormat:"docx"},{sourceFormat:"f90",targetFormat:"docx"},{sourceFormat:"f95",targetFormat:"docx"},{sourceFormat:"vhd",targetFormat:"docx"},{sourceFormat:"vhdl",targetFormat:"docx"},{sourceFormat:"sv",targetFormat:"docx"},{sourceFormat:"svh",targetFormat:"docx"},{sourceFormat:"ino",targetFormat:"docx"},{sourceFormat:"glsl",targetFormat:"docx"},{sourceFormat:"vert",targetFormat:"docx"},{sourceFormat:"frag",targetFormat:"docx"},{sourceFormat:"wgsl",targetFormat:"docx"},{sourceFormat:"hlsl",targetFormat:"docx"},{sourceFormat:"rmd",targetFormat:"docx"},{sourceFormat:"qmd",targetFormat:"docx"},{sourceFormat:"bib",targetFormat:"docx"},{sourceFormat:"nix",targetFormat:"docx"},{sourceFormat:"cue",targetFormat:"docx"},{sourceFormat:"dhall",targetFormat:"docx"},{sourceFormat:"org",targetFormat:"docx"},{sourceFormat:"wiki",targetFormat:"docx"},{sourceFormat:"mediawiki",targetFormat:"docx"},{sourceFormat:"textile",targetFormat:"docx"},{sourceFormat:"pod",targetFormat:"docx"},{sourceFormat:"man",targetFormat:"docx"},{sourceFormat:"roff",targetFormat:"docx"},{sourceFormat:"nfo",targetFormat:"docx"},{sourceFormat:"srt",targetFormat:"docx"},{sourceFormat:"vtt",targetFormat:"docx"},{sourceFormat:"sbv",targetFormat:"docx"},{sourceFormat:"ass",targetFormat:"docx"},{sourceFormat:"ssa",targetFormat:"docx"},{sourceFormat:"ics",targetFormat:"docx"},{sourceFormat:"vcf",targetFormat:"docx"},{sourceFormat:"eml",targetFormat:"docx"},{sourceFormat:"mbox",targetFormat:"docx"},{sourceFormat:"msg",targetFormat:"docx"},{sourceFormat:"oft",targetFormat:"docx"},{sourceFormat:"mht",targetFormat:"docx"},{sourceFormat:"mhtml",targetFormat:"docx"},{sourceFormat:"npmrc",targetFormat:"docx"},{sourceFormat:"yarnrc",targetFormat:"docx"},{sourceFormat:"gitattributes",targetFormat:"docx"},{sourceFormat:"gitmodules",targetFormat:"docx"},{sourceFormat:"xls",targetFormat:"xlsx"},{sourceFormat:"xlsm",targetFormat:"xlsx"},{sourceFormat:"xlt",targetFormat:"xlsx"},{sourceFormat:"xltx",targetFormat:"xlsx"},{sourceFormat:"xltm",targetFormat:"xlsx"},{sourceFormat:"et",targetFormat:"xlsx"},{sourceFormat:"ett",targetFormat:"xlsx"},{sourceFormat:"ods",targetFormat:"xlsx"},{sourceFormat:"ots",targetFormat:"xlsx"},{sourceFormat:"fods",targetFormat:"xlsx"},{sourceFormat:"sxc",targetFormat:"xlsx"},{sourceFormat:"stc",targetFormat:"xlsx"},{sourceFormat:"dbf",targetFormat:"xlsx"},{sourceFormat:"slk",targetFormat:"xlsx"},{sourceFormat:"dif",targetFormat:"xlsx"},{sourceFormat:"csv",targetFormat:"xlsx"},{sourceFormat:"tsv",targetFormat:"xlsx"},{sourceFormat:"tab",targetFormat:"xlsx"},{sourceFormat:"psv",targetFormat:"xlsx"},{sourceFormat:"json",targetFormat:"xlsx"},{sourceFormat:"jsonl",targetFormat:"xlsx"},{sourceFormat:"ndjson",targetFormat:"xlsx"},{sourceFormat:"jsonlines",targetFormat:"xlsx"},{sourceFormat:"ldjson",targetFormat:"xlsx"},{sourceFormat:"dng",targetFormat:"jpg"},{sourceFormat:"cr2",targetFormat:"jpg"},{sourceFormat:"cr3",targetFormat:"jpg"},{sourceFormat:"nef",targetFormat:"jpg"},{sourceFormat:"nrw",targetFormat:"jpg"},{sourceFormat:"arw",targetFormat:"jpg"},{sourceFormat:"sr2",targetFormat:"jpg"},{sourceFormat:"srf",targetFormat:"jpg"},{sourceFormat:"orf",targetFormat:"jpg"},{sourceFormat:"rw2",targetFormat:"jpg"},{sourceFormat:"rwl",targetFormat:"jpg"},{sourceFormat:"raf",targetFormat:"jpg"},{sourceFormat:"kdc",targetFormat:"jpg"},{sourceFormat:"x3f",targetFormat:"jpg"},{sourceFormat:"pef",targetFormat:"jpg"},{sourceFormat:"srw",targetFormat:"jpg"},{sourceFormat:"erf",targetFormat:"jpg"},{sourceFormat:"mef",targetFormat:"jpg"},{sourceFormat:"mos",targetFormat:"jpg"},{sourceFormat:"mrw",targetFormat:"jpg"},{sourceFormat:"3fr",targetFormat:"jpg"},{sourceFormat:"iiq",targetFormat:"jpg"},{sourceFormat:"icns",targetFormat:"png"},{sourceFormat:"apk",targetFormat:"png"},{sourceFormat:"ipa",targetFormat:"png"},{sourceFormat:"exe",targetFormat:"png"},{sourceFormat:"dll",targetFormat:"png"},{sourceFormat:"mui",targetFormat:"png"},{sourceFormat:"mun",targetFormat:"png"},{sourceFormat:"ico",targetFormat:"png"},{sourceFormat:"ppm",targetFormat:"png"}],bu=[A(["pptx"],"paged","pptx"),A(["pdf"],"paged","pdf",{contentTypes:["application/pdf"]}),A(["docx"],"flow","docx"),A(["xlsx"],"workbook","xlsx"),A(["csv"],"workbook","xlsx",{contentTypes:["text/csv","application/csv"]}),A(["html","htm","shtml"],"html","html",{targetFormat:"html",contentTypes:["text/html"]}),A(["xhtml","xht","xhtm"],"html","html",{targetFormat:"html",contentTypes:["application/xhtml+xml"]}),A(["json"],"code","text",{contentTypes:["application/json"]}),A(["xml"],"code","text",{contentTypes:["application/xml","text/xml"]}),A(["yaml","yml"],"code","text",{contentTypes:["application/yaml","application/x-yaml","text/yaml","text/x-yaml"]}),A(["toml"],"code","text",{contentTypes:["application/toml","text/toml","text/x-toml"]}),A(["ini"],"code","text",{contentTypes:["text/x-ini"]}),A(["rst","rest"],"code","text",{contentTypes:["text/x-rst","text/prs.fallenstein.rst"]}),A(["adoc","asciidoc","asc"],"code","text",{contentTypes:["text/asciidoc","text/x-asciidoc"]}),A(["tex","latex","ltx","sty","cls"],"code","text",{contentTypes:["application/x-tex","text/x-tex"]}),A(["properties"],"code","text",{contentTypes:["text/x-java-properties"]}),A(["env"],"code","text",{contentTypes:["application/x-env","text/x-env"]}),A(["conf","config","cfg","cnf"],"code","text",{contentTypes:["text/x-config"]}),A(["sql"],"code","text",{contentTypes:["application/sql","application/x-sql","text/x-sql"]}),A(["png"],"image","image",{contentTypes:["image/png"]}),A(["jpg","jpeg"],"image","image",{contentTypes:["image/jpeg"]}),A(["gif"],"image","image",{contentTypes:["image/gif"]}),A(["webp"],"image","image",{contentTypes:["image/webp"]}),A(["avif"],"image","image",{contentTypes:["image/avif"]}),A(["apng"],"image","image",{contentTypes:["image/apng"]}),A(["ico"],"image","image",{contentTypes:["image/x-icon","image/vnd.microsoft.icon"]}),A(["svg"],"image","image",{contentTypes:["image/svg+xml"]}),A(["bmp"],"image","image",{contentTypes:["image/bmp","image/x-ms-bmp"]}),A(["mp4","webm","mov","m4v","ogv","mkv","avi","mpeg","mpg","3gp"],"video","media"),A(["mp3","wav","aac","m4a","flac","ogg","oga","opus"],"audio","media"),A(["epub"],"ebook","ebook",{contentTypes:["application/epub+zip"]}),A(["cbz"],"ebook","ebook",{contentTypes:["application/vnd.comicbook+zip","application/x-cbz"]}),A(["js","jsx","mjs","cjs"],"code","text",{contentTypes:["text/javascript","application/javascript"]}),A(["ts","tsx","mts","cts"],"code","text",{contentTypes:["text/typescript","application/typescript"]}),A(["vue"],"code","text",{contentTypes:["text/x-vue"]}),A(["css"],"code","text",{contentTypes:["text/css"]}),A(["scss","sass"],"code","text",{contentTypes:["text/x-scss","text/x-sass"]}),A(["less"],"code","text",{contentTypes:["text/x-less"]}),A(["c","h"],"code","text",{contentTypes:["text/x-csrc"]}),A(["cpp","cc","cxx","hpp","hh","hxx"],"code","text",{contentTypes:["text/x-c++src"]}),A(["cs"],"code","text",{contentTypes:["text/x-csharp"]}),A(["go"],"code","text",{contentTypes:["text/x-go"]}),A(["java"],"code","text",{contentTypes:["text/x-java-source"]}),A(["kt","kts"],"code","text",{contentTypes:["text/x-kotlin"]}),A(["lua"],"code","text",{contentTypes:["text/x-lua"]}),A(["php"],"code","text",{contentTypes:["application/x-httpd-php","text/x-php"]}),A(["py"],"code","text",{contentTypes:["text/x-python"]}),A(["rb"],"code","text",{contentTypes:["text/x-ruby"]}),A(["rs"],"code","text",{contentTypes:["text/rust","text/x-rustsrc"]}),A(["sh"],"code","text",{contentTypes:["application/x-sh","text/x-shellscript"]}),A(["bat","cmd"],"code","text",{contentTypes:["application/x-msdos-program","text/x-msdos-batch"]}),A(["ps1"],"code","text",{contentTypes:["text/x-powershell"]}),A(["swift"],"code","text",{contentTypes:["text/x-swift"]}),A(["jsonc"],"code","text",{contentTypes:["application/jsonc","text/jsonc"]}),A(["json5"],"code","text",{contentTypes:["application/json5","text/json5"]}),A(["gql","graphql"],"code","text",{contentTypes:["application/graphql","text/graphql"]}),A(["proto"],"code","text",{contentTypes:["application/x-protobuf","text/x-protobuf","text/proto"]}),A(["diff"],"code","text",{contentTypes:["text/x-diff"]}),A(["patch"],"code","text",{contentTypes:["text/x-patch"]}),A(["gitignore"],"code","text",{contentTypes:["text/x-gitignore"]}),A(["dockerignore"],"code","text",{contentTypes:["text/x-dockerignore"]}),A(["editorconfig"],"code","text",{contentTypes:["text/x-editorconfig"]}),A(["r"],"code","text",{contentTypes:["text/x-r","text/r"]}),A(["dart"],"code","text",{contentTypes:["text/x-dart"]}),A(["scala"],"code","text",{contentTypes:["text/x-scala"]}),A(["groovy","gradle"],"code","text",{contentTypes:["text/x-groovy"]}),A(["pl"],"code","text",{contentTypes:["text/x-perl"]}),A(["ex"],"code","text",{contentTypes:["text/x-elixir"]}),A(["erl"],"code","text",{contentTypes:["text/x-erlang"]}),A(["fs","fsi","fsx"],"code","text",{contentTypes:["text/x-fsharp"]}),A(["vb"],"code","text",{contentTypes:["text/x-vb"]}),A(["clj"],"code","text",{contentTypes:["text/x-clojure"]}),A(["hs"],"code","text",{contentTypes:["text/x-haskell"]}),A(["jl"],"code","text",{contentTypes:["text/x-julia"]}),A(["zig"],"code","text",{contentTypes:["text/x-zig"]}),A(["m","matlab"],"code","text",{contentTypes:["text/x-matlab"]}),A(["svelte"],"code","text",{contentTypes:["text/x-svelte"]}),A(["astro"],"code","text",{contentTypes:["text/x-astro"]}),A(["mdx"],"code","text",{contentTypes:["text/mdx","text/x-mdx"]}),A(["tf","tfvars","hcl"],"code","text",{contentTypes:["text/x-hcl"]}),A(["rego"],"code","text",{contentTypes:["text/x-rego"]}),A(["bicep"],"code","text",{contentTypes:["text/x-bicep"]}),A(["prisma"],"code","text",{contentTypes:["text/x-prisma"]}),A(["dockerfile"],"code","text",{contentTypes:["text/x-dockerfile"]}),A(["cmake"],"code","text",{contentTypes:["text/x-cmake"]}),A(["make","mk"],"code","text",{contentTypes:["text/x-makefile"]}),A(["bash","zsh","fish"],"code","text",{contentTypes:["text/x-shellscript"]}),A(["csproj","vbproj","fsproj","props","targets"],"code","text",{contentTypes:["application/x-msbuild"]}),A(["sln"],"code","text",{contentTypes:["text/x-ms-sln"]}),A(["cshtml","razor"],"code","text",{contentTypes:["text/x-cshtml"]}),A(["mustache","hbs"],"code","text",{contentTypes:["text/x-handlebars-template"]}),A(["liquid"],"code","text",{contentTypes:["text/x-liquid"]}),A(["jinja"],"code","text",{contentTypes:["text/x-jinja"]}),A(["twig"],"code","text",{contentTypes:["text/x-twig"]}),A(["ejs"],"code","text",{contentTypes:["text/x-ejs"]}),A(["erb"],"code","text",{contentTypes:["text/x-erb"]}),A(["haml"],"code","text",{contentTypes:["text/x-haml"]}),A(["slim"],"code","text",{contentTypes:["text/x-slim"]}),A(["mermaid","mmd"],"code","text",{contentTypes:["text/vnd.mermaid"]}),A(["puml"],"code","text",{contentTypes:["text/x-plantuml"]}),A(["avsc"],"code","text",{contentTypes:["application/vnd.apache.avro+json"]}),A(["sol"],"code","text",{contentTypes:["text/x-solidity"]}),A(["move"],"code","text",{contentTypes:["text/x-move"]}),A(["nim"],"code","text",{contentTypes:["text/x-nim"]}),A(["cr"],"code","text",{contentTypes:["text/x-crystal"]}),A(["ml","mli"],"code","text",{contentTypes:["text/x-ocaml"]}),A(["elm"],"code","text",{contentTypes:["text/x-elm"]}),A(["rkt"],"code","text",{contentTypes:["text/x-racket"]}),A(["lisp"],"code","text",{contentTypes:["text/x-lisp"]}),A(["scm"],"code","text",{contentTypes:["text/x-scheme"]}),A(["asm","s"],"code","text",{contentTypes:["text/x-asm"]}),A(["cu","cuh"],"code","text",{contentTypes:["text/x-cuda"]}),A(["d"],"code","text",{contentTypes:["text/x-d"]}),A(["pas"],"code","text",{contentTypes:["text/x-pascal"]}),A(["adb","ads"],"code","text",{contentTypes:["text/x-ada"]}),A(["cob","cbl"],"code","text",{contentTypes:["text/x-cobol"]}),A(["f90","f95"],"code","text",{contentTypes:["text/x-fortran"]}),A(["vhd","vhdl"],"code","text",{contentTypes:["text/x-vhdl"]}),A(["sv","svh"],"code","text",{contentTypes:["text/x-systemverilog"]}),A(["ino"],"code","text",{contentTypes:["text/x-arduino"]}),A(["glsl","vert","frag"],"code","text",{contentTypes:["text/x-glsl"]}),A(["wgsl"],"code","text",{contentTypes:["text/wgsl","text/x-wgsl"]}),A(["hlsl"],"code","text",{contentTypes:["text/x-hlsl"]}),A(["rmd"],"code","text",{contentTypes:["text/x-r-markdown"]}),A(["qmd"],"code","text",{contentTypes:["text/x-quarto"]}),A(["bib"],"code","text",{contentTypes:["application/x-bibtex","text/x-bibtex"]}),A(["nix"],"code","text",{contentTypes:["text/x-nix"]}),A(["cue"],"code","text",{contentTypes:["text/x-cue"]}),A(["dhall"],"code","text",{contentTypes:["text/x-dhall"]}),A(["org"],"code","text",{contentTypes:["text/org","text/x-org"]}),A(["wiki","mediawiki"],"code","text",{contentTypes:["text/x-wiki","text/x-mediawiki"]}),A(["textile"],"code","text",{contentTypes:["text/x-textile"]}),A(["pod"],"code","text",{contentTypes:["text/x-pod"]}),A(["man","roff"],"code","text",{contentTypes:["text/troff","application/x-troff","application/x-troff-man"]}),A(["nfo"],"code","text",{contentTypes:["text/x-nfo"]}),A(["npmrc"],"code","text",{contentTypes:["text/x-npmrc"]}),A(["yarnrc"],"code","text",{contentTypes:["text/x-yarnrc"]}),A(["gitattributes"],"code","text",{contentTypes:["text/x-gitattributes"]}),A(["gitmodules"],"code","text",{contentTypes:["text/x-gitmodules"]}),A(["md","markdown","mkd","mkdn","mdown"],"code","text",{contentTypes:["text/markdown","text/x-markdown"]}),A(["txt","log","text"],"text","text",{contentTypes:["text/plain"]}),A(["zip"],"archive","archive",{contentTypes:["application/zip","application/x-zip-compressed"]}),A(["apk"],"archive","archive",{targetFormat:"zip",contentTypes:["application/vnd.android.package-archive"]}),A(["ipa"],"archive","archive",{targetFormat:"zip",contentTypes:["application/x-ios-app"]})],wu=Au(vu),eo=[...bu,...wu];function Fu(t,e={}){const r=lt(t.extension??ir(t.name)),n=ro(t.contentType),a=e.routes??eo,i=r?a.find(s=>s.extensions.includes(r)):a.find(s=>{var d;return n&&((d=s.contentTypes)==null?void 0:d.includes(n))});if(!i)return null;const o=r||i.extensions[0];return{sourceFormat:o,targetFormat:i.targetFormat??o,family:i.family,driverId:i.driverId,conversion:i.conversion}}function ir(t){var o;if(!t)return;const r=(((o=t.split(/[?#]/,1)[0])==null?void 0:o.trim())??"").split(/[\\/]/).pop()??"",n=/\.(7z|zip)\.\d{3,}$/i.exec(r);if(n)return n[1].toLowerCase();if(/\.[r-y]\d{2}$/i.test(r))return"rar";if(/\.z\d{2,}$/i.test(r))return"zip";const a=Su(r);if(a)return a;const i=r.lastIndexOf(".");if(!(i<0||i===r.length-1))return i===0&&r.indexOf(".",1)<0?lt(r.slice(1)):lt(r.slice(i+1))}function Su(t){const e=t.trim().toLowerCase();if(e){if(e==="dockerfile"||e.startsWith("dockerfile."))return"dockerfile";if(e==="makefile"||e==="gnumakefile"||e==="bsdmakefile")return"make";if(e==="cmakelists.txt")return"cmake"}}function lt(t){return String(t??"").trim().replace(/^\./,"").toLowerCase()}function A(t,e,r,n={}){var a;return{extensions:t.map(lt).filter(Boolean),family:e,driverId:r,targetFormat:n.targetFormat?lt(n.targetFormat):void 0,contentTypes:(a=n.contentTypes)==null?void 0:a.map(ro).filter(Boolean),conversion:n.conversion}}function ro(t){return String(t??"").split(";",1)[0].trim().toLowerCase()}function Au(t){const e=new Set;return t.flatMap(r=>{const n=lt(r.sourceFormat),a=lt(r.targetFormat);return!n||!a||n===a||e.has(n)?[]:(e.add(n),a==="jpg"||a==="jpeg"||a==="png"?A([n],"image","image",{targetFormat:a,contentTypes:ka(n),conversion:{required:true,reason:n==="ppm"?"PPM images are decoded to PNG in the WASM conversion core":["psd","psb"].includes(n)?"Photoshop files use their saved merged image (8-bit RGB or grayscale) in the WASM conversion core":["apk","ipa","exe","dll","mui","mun","ico"].includes(n)?"application icons are extracted to PNG in the WASM conversion core":a==="png"?"ICNS files use their embedded PNG icon preview":"camera RAW files use their embedded JPEG preview"}}):A([n],ku(a),a,{targetFormat:a,contentTypes:ka(n),conversion:{required:true,reason:Tu(a)}}))})}function ku(t){switch(t){case"docx":return"flow";case"xlsx":return"workbook";default:return"paged"}}function Tu(t){switch(t){case"pdf":return"AI, EPS and PS artwork uses vector PDF; PostScript interpretation omits built-in font outlines";case"docx":return"legacy or compatible text documents are normalized to DOCX";case"xlsx":return"legacy or compatible spreadsheets are normalized to XLSX";default:return"legacy or compatible presentations are normalized to PPTX"}}function ka(t){switch(t){case"psd":return["image/vnd.adobe.photoshop","image/x-photoshop"];case"psb":return["image/vnd.adobe.photoshop","image/x-photoshop"];case"ai":return["application/illustrator","application/vnd.adobe.illustrator"];case"eps":return["application/eps","application/x-eps","image/x-eps"];case"ps":return["application/postscript"];case"ppm":return["image/x-portable-pixmap"];case"apk":return["application/vnd.android.package-archive"];case"ipa":return["application/x-ios-app"];case"exe":return["application/vnd.microsoft.portable-executable","application/x-msdownload"];case"icns":return["image/icns","image/x-icns","application/x-icns"];case"ppt":case"pps":case"pot":return["application/vnd.ms-powerpoint"];case"dps":return["application/vnd.ms-powerpoint","application/wps-office.dps"];case"dpt":return["application/wps-office.dpt"];case"ppsx":return["application/vnd.openxmlformats-officedocument.presentationml.slideshow"];case"pptm":return["application/vnd.ms-powerpoint.presentation.macroenabled.12"];case"ppsm":return["application/vnd.ms-powerpoint.slideshow.macroenabled.12"];case"potx":return["application/vnd.openxmlformats-officedocument.presentationml.template"];case"potm":return["application/vnd.ms-powerpoint.template.macroenabled.12"];case"odp":return["application/vnd.oasis.opendocument.presentation"];case"otp":return["application/vnd.oasis.opendocument.presentation-template"];case"fodp":return["application/vnd.oasis.opendocument.presentation-flat-xml"];case"sxi":return["application/vnd.sun.xml.impress"];case"sti":return["application/vnd.sun.xml.impress.template"];case"odg":return["application/vnd.oasis.opendocument.graphics"];case"otg":return["application/vnd.oasis.opendocument.graphics-template"];case"fodg":return["application/vnd.oasis.opendocument.graphics-flat-xml"];case"sxd":return["application/vnd.sun.xml.draw"];case"std":return["application/vnd.sun.xml.draw.template"];case"doc":case"dot":return["application/msword"];case"docm":return["application/vnd.ms-word.document.macroenabled.12"];case"dotm":return["application/vnd.ms-word.template.macroenabled.12"];case"dotx":return["application/vnd.openxmlformats-officedocument.wordprocessingml.template"];case"wps":return["application/vnd.ms-works","application/wps-office.wps"];case"wpt":return["application/wps-office.wpt"];case"rtf":return["application/rtf","text/rtf"];case"odt":return["application/vnd.oasis.opendocument.text"];case"ott":return["application/vnd.oasis.opendocument.text-template"];case"fodt":return["application/vnd.oasis.opendocument.text-flat-xml"];case"sxw":return["application/vnd.sun.xml.writer"];case"stw":return["application/vnd.sun.xml.writer.template"];case"txt":case"text":case"log":return["text/plain"];case"md":case"markdown":case"mkd":case"mkdn":case"mdown":return["text/markdown","text/x-markdown"];case"html":case"htm":case"shtml":return["text/html"];case"xhtml":case"xht":case"xhtm":return["application/xhtml+xml","text/html"];case"epub":return["application/epub+zip"];case"fb2":return["application/x-fictionbook+xml"];case"xml":return["application/xml","text/xml"];case"rss":return["application/rss+xml","application/xml","text/xml"];case"atom":return["application/atom+xml","application/xml","text/xml"];case"kml":return["application/vnd.google-earth.kml+xml","application/kml+xml","application/xml","text/xml"];case"gpx":return["application/gpx+xml","application/xml","text/xml"];case"ttml":case"dfxp":return["application/ttml+xml","application/xml","text/xml"];case"xsd":return["application/xsd+xml","application/xml","text/xml"];case"xsl":case"xslt":return["application/xslt+xml","text/xsl","application/xml","text/xml"];case"wsdl":return["application/wsdl+xml","application/xml","text/xml"];case"plist":return["application/x-plist","application/xml","text/xml"];case"pom":return["application/xml","text/xml"];case"yaml":case"yml":return["application/yaml","application/x-yaml","text/yaml","text/x-yaml"];case"toml":return["application/toml","text/toml","text/x-toml"];case"ini":return["text/x-ini"];case"rst":case"rest":return["text/x-rst","text/prs.fallenstein.rst"];case"adoc":case"asciidoc":case"asc":return["text/asciidoc","text/x-asciidoc"];case"tex":case"latex":case"ltx":case"sty":case"cls":return["application/x-tex","text/x-tex"];case"properties":return["text/x-java-properties"];case"env":return["application/x-env","text/x-env"];case"conf":case"config":case"cfg":case"cnf":return["text/x-config"];case"sql":return["application/sql","application/x-sql","text/x-sql"];case"js":case"jsx":case"mjs":case"cjs":return["text/javascript","application/javascript"];case"ts":case"tsx":case"mts":case"cts":return["text/typescript","application/typescript"];case"vue":return["text/x-vue"];case"css":return["text/css"];case"scss":case"sass":return["text/x-scss","text/x-sass"];case"less":return["text/x-less"];case"c":case"h":return["text/x-csrc"];case"cpp":case"cc":case"cxx":case"hpp":case"hh":case"hxx":return["text/x-c++src"];case"cs":return["text/x-csharp"];case"go":return["text/x-go"];case"java":return["text/x-java-source"];case"kt":case"kts":return["text/x-kotlin"];case"lua":return["text/x-lua"];case"php":return["application/x-httpd-php","text/x-php"];case"py":return["text/x-python"];case"rb":return["text/x-ruby"];case"rs":return["text/rust","text/x-rustsrc"];case"sh":case"bash":return["application/x-sh","text/x-shellscript"];case"bat":case"cmd":return["application/x-msdos-program","text/x-msdos-batch"];case"ps1":return["text/x-powershell"];case"swift":return["text/x-swift"];case"jsonc":return["application/jsonc","text/jsonc"];case"json5":return["application/json5","text/json5"];case"ipynb":return["application/x-ipynb+json"];case"gql":case"graphql":return["application/graphql","text/graphql"];case"proto":return["application/x-protobuf","text/x-protobuf","text/proto"];case"diff":return["text/x-diff"];case"patch":return["text/x-patch"];case"gitignore":return["text/x-gitignore"];case"dockerignore":return["text/x-dockerignore"];case"editorconfig":return["text/x-editorconfig"];case"r":return["text/x-r","text/r"];case"dart":return["text/x-dart"];case"scala":return["text/x-scala"];case"groovy":case"gradle":return["text/x-groovy"];case"pl":return["text/x-perl"];case"ex":return["text/x-elixir"];case"erl":return["text/x-erlang"];case"fs":case"fsi":case"fsx":return["text/x-fsharp"];case"vb":return["text/x-vb"];case"clj":return["text/x-clojure"];case"hs":return["text/x-haskell"];case"jl":return["text/x-julia"];case"zig":return["text/x-zig"];case"m":case"matlab":return["text/x-matlab"];case"svelte":return["text/x-svelte"];case"astro":return["text/x-astro"];case"mdx":return["text/mdx","text/x-mdx"];case"tf":case"tfvars":case"hcl":return["text/x-hcl"];case"rego":return["text/x-rego"];case"bicep":return["text/x-bicep"];case"prisma":return["text/x-prisma"];case"dockerfile":return["text/x-dockerfile"];case"cmake":return["text/x-cmake"];case"make":case"mk":return["text/x-makefile"];case"zsh":case"fish":return["text/x-shellscript"];case"csproj":case"vbproj":case"fsproj":case"props":case"targets":return["application/x-msbuild"];case"sln":return["text/x-ms-sln"];case"cshtml":case"razor":return["text/x-cshtml"];case"mustache":case"hbs":return["text/x-handlebars-template"];case"liquid":return["text/x-liquid"];case"jinja":return["text/x-jinja"];case"twig":return["text/x-twig"];case"ejs":return["text/x-ejs"];case"erb":return["text/x-erb"];case"haml":return["text/x-haml"];case"slim":return["text/x-slim"];case"mermaid":case"mmd":return["text/vnd.mermaid"];case"puml":return["text/x-plantuml"];case"avsc":return["application/vnd.apache.avro+json"];case"sol":return["text/x-solidity"];case"move":return["text/x-move"];case"nim":return["text/x-nim"];case"cr":return["text/x-crystal"];case"ml":case"mli":return["text/x-ocaml"];case"elm":return["text/x-elm"];case"rkt":return["text/x-racket"];case"lisp":return["text/x-lisp"];case"scm":return["text/x-scheme"];case"asm":case"s":return["text/x-asm"];case"cu":case"cuh":return["text/x-cuda"];case"d":return["text/x-d"];case"pas":return["text/x-pascal"];case"adb":case"ads":return["text/x-ada"];case"cob":case"cbl":return["text/x-cobol"];case"f90":case"f95":return["text/x-fortran"];case"vhd":case"vhdl":return["text/x-vhdl"];case"sv":case"svh":return["text/x-systemverilog"];case"ino":return["text/x-arduino"];case"glsl":case"vert":case"frag":return["text/x-glsl"];case"wgsl":return["text/wgsl","text/x-wgsl"];case"hlsl":return["text/x-hlsl"];case"rmd":return["text/x-r-markdown"];case"qmd":return["text/x-quarto"];case"bib":return["application/x-bibtex","text/x-bibtex"];case"nix":return["text/x-nix"];case"cue":return["text/x-cue"];case"dhall":return["text/x-dhall"];case"org":return["text/org","text/x-org"];case"wiki":case"mediawiki":return["text/x-wiki","text/x-mediawiki"];case"textile":return["text/x-textile"];case"pod":return["text/x-pod"];case"man":case"roff":return["text/troff","application/x-troff","application/x-troff-man"];case"nfo":return["text/x-nfo"];case"srt":return["application/x-subrip","text/srt"];case"vtt":return["text/vtt"];case"sbv":return["text/x-sbv"];case"ass":return["text/x-ass","application/x-ass"];case"ssa":return["text/x-ssa","application/x-ssa"];case"ics":return["text/calendar"];case"vcf":return["text/vcard","text/x-vcard"];case"eml":return["message/rfc822"];case"mbox":return["application/mbox","application/x-mbox"];case"msg":return["application/vnd.ms-outlook","application/x-msg"];case"oft":return["application/vnd.ms-outlook","application/x-ms-outlook"];case"mht":case"mhtml":return["message/rfc822","multipart/related","application/x-mimearchive"];case"npmrc":return["text/x-npmrc"];case"yarnrc":return["text/x-yarnrc"];case"gitattributes":return["text/x-gitattributes"];case"gitmodules":return["text/x-gitmodules"];case"xls":case"xlt":return["application/vnd.ms-excel"];case"xlsm":return["application/vnd.ms-excel.sheet.macroenabled.12"];case"xltm":return["application/vnd.ms-excel.template.macroenabled.12"];case"et":return["application/vnd.ms-excel","application/wps-office.et"];case"ett":return["application/wps-office.ett"];case"xltx":return["application/vnd.openxmlformats-officedocument.spreadsheetml.template"];case"ods":return["application/vnd.oasis.opendocument.spreadsheet"];case"ots":return["application/vnd.oasis.opendocument.spreadsheet-template"];case"fods":return["application/vnd.oasis.opendocument.spreadsheet-flat-xml"];case"sxc":return["application/vnd.sun.xml.calc"];case"stc":return["application/vnd.sun.xml.calc.template"];case"dbf":return["application/x-dbf","application/dbf","application/vnd.dbf"];case"slk":return["text/spreadsheet","text/x-sylk","application/x-sylk"];case"dif":return["application/x-dif","text/x-dif"];case"csv":return["text/csv","application/csv"];case"tsv":case"tab":return["text/tab-separated-values"];case"psv":return["text/x-pipe-separated-values","text/pipe-separated-values"];case"json":return["application/json"];case"jsonl":case"ndjson":case"jsonlines":case"ldjson":return["application/x-ndjson","application/jsonl","application/jsonlines"];default:return[]}}async function Lu(t,e,r){const n=await nn(t,{signal:r,maxEntryBytes:ne.maxEntryBytes});if(r==null||r.throwIfAborted(),n.size>ne.maxEntries)throw new Error("Document contains too many package entries.");return[...n.values()].filter(a=>!a.directory&&/^(word|xl|ppt)\/embeddings\/[^/]+$/i.test(a.name)).map(a=>{const i=async o=>{r==null||r.throwIfAborted();const s=o??r,d=await xu(()=>a.bytes(void 0,s),a.size,e,s);return{source:d,name:Qr(a.name),size:d.byteLength}};return{id:a.name,name:Qr(a.name),size:a.size,readRaw:i,read:async o=>{const s=await i(o);return Mu(s.source,s.name)}}})}function Qr(t){var e;return((e=t.replace(/\\/g,"/").split("/").pop())==null?void 0:e.replace(/[\u0000-\u001f\u007f]/g,"").trim())||"attachment.bin"}async function Mu(t,e){if([208,207,17,224,161,177,26,225].every((n,a)=>t[a]===n)){const n=await import("./vendor-C8SyXchM.js").then(d=>d.c),a=n.read(t,{type:"array"}),i=n.find(a,"Ole10Native");if(i)return Cu(new Uint8Array(i.content),e);const o=n.find(a,"Package");if(o)return tn(new Uint8Array(o.content),e);const s=n.find(a,"WordDocument")?"doc":n.find(a,"Workbook")||n.find(a,"Book")?"xls":n.find(a,"PowerPoint Document")?"ppt":void 0;if(s)return{source:t,name:no(e,s),extension:s}}return tn(t,e)}async function Cu(t,e){const r=new DataView(t.buffer,t.byteOffset,t.byteLength);if(t.length<6)throw new Error("The embedded OLE attachment is truncated.");const n=r.getUint32(0,true);if(n>t.length-4)throw new Error("The embedded OLE attachment is truncated.");const a=Math.min(t.length,n+4);let i=6;const o=()=>{const l=t.indexOf(0,i);if(l<i||l>=a)throw new Error("Invalid embedded OLE filename.");const u=new TextDecoder().decode(t.subarray(i,l));return i=l+1,u},s=o();if(o(),i+=4,o(),i+4>a)throw new Error("The embedded OLE attachment is truncated.");const d=r.getUint32(i,true);if(i+=4,d>a-i)throw new Error("The embedded OLE attachment is truncated.");return tn(t.slice(i,i+d),Qr(s||e))}function no(t,e){return`${t.replace(/\.[^.]*$/,"")}.${e}`}async function tn(t,e){let r=ir(e);if(r==="bin"||!e.includes(".")){if(new TextDecoder().decode(t.subarray(0,5))==="%PDF-")r="pdf";else if(t[0]===80&&t[1]===75){const a=await nn(t);r=a.has("word/document.xml")?"docx":a.has("xl/workbook.xml")?"xlsx":a.has("ppt/presentation.xml")?"pptx":"zip"}else[82,97,114,33,26,7].every((a,i)=>t[i]===a)?r="rar":[55,122,188,175,39,28].every((a,i)=>t[i]===a)?r="7z":t[0]===31&&t[1]===139?r="gz":t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71?r="png":t[0]===255&&t[1]===216&&(r="jpg");r&&r!=="bin"&&(e=no(e,r))}return{source:t,name:e,extension:r,size:t.byteLength}}const Eu={maxVolumes:256,maxBytes:512*1024*1024};function en(t){let e=/^(.*\.part)(\d+)(\.rar)$/i.exec(t);if(e)return{format:"rar",kind:"rar-part",key:`${e[1]}*.rar`.toLowerCase(),base:e[1],index:Number(e[2])-1,width:e[2].length};if(e=/^(.*\.(7z|zip))\.(\d{3,})$/i.exec(t),e)return{format:e[2].toLowerCase(),kind:"numbered",key:`${e[1]}.*`.toLowerCase(),base:e[1],index:Number(e[3])-1,width:e[3].length};if(e=/^(.*)\.([r-y])(\d{2})$/i.exec(t),e)return{format:"rar",kind:"rar-old",key:`${e[1]}.rar`.toLowerCase(),base:e[1],index:(e[2].toLowerCase().charCodeAt(0)-114)*100+Number(e[3])+1,width:2};if(e=/^(.*)\.rar$/i.exec(t),e)return{format:"rar",kind:"rar-old",key:t.toLowerCase(),base:e[1],index:0,width:2};if(e=/^(.*)\.z(\d{2,})$/i.exec(t),e)return{format:"zip",kind:"zip",key:`${e[1]}.zip`.toLowerCase(),base:e[1],index:Number(e[2])-1,width:e[2].length};if(e=/^(.*)\.zip$/i.exec(t),e)return{format:"zip",kind:"zip",key:t.toLowerCase(),base:e[1],index:1/0,width:2}}function We(t){const e=en(t);return!!(e&&(e.kind==="numbered"||e.kind==="rar-part"||!/\.(rar|zip)$/i.test(t)))}function ju(t,e){const r=en(t);if(!r)return;const n=e.flatMap(s=>{const d=en(s.name);return(d==null?void 0:d.key)===r.key&&d.kind===r.kind?[{file:s,info:d}]:[]}).sort((s,d)=>s.info.index-d.info.index);if(!n.length||n.length===1&&!We(t))return;if(n.length>Eu.maxVolumes)throw new Error("Archive contains too many volumes.");const a=new Set;for(const{info:s}of n){if(a.has(s.index))throw new Error("Duplicate archive volume numbers.");if(s.index<0||!Number.isSafeInteger(s.index)&&!(s.kind==="zip"&&s.index===1/0))throw new Error("Invalid archive volume number.");a.add(s.index)}const i=n.filter(s=>s.info.index!==1/0);for(let s=0;s<i.length;s++)if(i[s].info.index!==s)throw new Error(`Missing archive volume: ${Ru(r,s)}. Select all parts of the archive.`);if(r.kind==="zip"&&!n.some(s=>s.info.index===1/0))throw new Error(`Missing archive volume: ${r.base}.zip. Select all parts of the archive.`);const o=r.kind==="zip"?n[n.length-1].file:n[0].file;return{format:r.format,primary:o,files:[o,...n.map(s=>s.file).filter(s=>s!==o)]}}function Ru(t,e){return t.kind==="rar-part"?`${t.base}${String(e+1).padStart(t.width,"0")}.rar`:t.kind==="numbered"?`${t.base}.${String(e+1).padStart(t.width,"0")}`:t.kind==="zip"?`${t.base}.z${String(e+1).padStart(t.width,"0")}`:e===0?`${t.base}.rar`:`${t.base}.${String.fromCharCode(114+Math.floor((e-1)/100))}${String((e-1)%100).padStart(2,"0")}`}const ao=new WeakMap,or=t=>ao.get(t)??t.fontFamily,rn=(t,e,r="normal")=>JSON.stringify([t.toLowerCase(),e,r]);function io(t,e){const r=n=>{for(const a of(n==null?void 0:n.paragraphs)??[])a.bullet&&e(a.bullet),a.runs.forEach(e)};for(const n of t)for(const a of n.items)a.kind==="text"||a.kind==="shape"?r(a.textFrame):a.kind==="table"&&a.cells.forEach(i=>r(i.textFrame))}function Nu(t){const e=new Map;return io(t,r=>{const n=or(r);if(!n)return;const a=r.bold===void 0?void 0:r.bold?700:400,i=r.italic?"italic":"normal",o=rn(n,a,i);let s=e.get(o);s||e.set(o,s={fontFamily:n,traits:a?{weight:a}:void 0,fontStyle:i}),s.text=((s.text??"")+(r.text??r.char??"")).slice(0,4096)}),[...e.values()]}function $u(t,e){const r=new Map(e.filter(a=>a.fontFamily).map(a=>{var i;return[rn(a.fontFamily,(i=a.traits)==null?void 0:i.weight,a.fontStyle),a.resolvedFontFamily]})),n=new Map(e.filter(a=>{var i;return a.fontFamily&&((i=a.traits)==null?void 0:i.weight)===void 0&&a.fontStyle===void 0}).map(a=>[a.fontFamily.toLowerCase(),a.resolvedFontFamily]));io(t,a=>{const i=or(a);if(!i)return;ao.set(a,i);const o=rn(i,a.bold===void 0?void 0:a.bold?700:400,a.italic?"italic":"normal");a.fontFamily=(r.has(o)?r.get(o):n.get(i.toLowerCase()))??i})}const Tr=/^(serif|sans-serif|monospace|system-ui|ui-serif|ui-sans-serif|ui-monospace|ui-rounded|cursive|fantasy|emoji|math|fangsong)$/i,Iu="BESbswy1234567890\u6C49\u5B57\u304B\u306A\uD55C\uAE00";function Bu(t){const e=new Map,r=a=>{if(!a)return;const i=Mt(a);i&&e.set(i.toLowerCase(),{fontFamily:i})},n=a=>{for(const i of(a==null?void 0:a.paragraphs)??[]){i.bullet&&r(or(i.bullet));for(const o of i.runs)r(or(o))}};for(const a of t)for(const i of a.items)if(i.kind==="text"||i.kind==="shape")n(i.textFrame);else if(i.kind==="table")for(const o of i.cells)n(o.textFrame);return[...e.values()]}function Le(t,e=typeof document>"u"?void 0:document,r={}){var u;const n=new Map,a=new Map;let i;const o=f=>{try{if(i===void 0&&(i=(e==null?void 0:e.createElement("canvas").getContext("2d"))??null),!i)return;i.font=`normal 400 32px ${f}`;const m=i.measureText(Iu).width;return Number.isFinite(m)&&m>0?m:void 0}catch{return}},s=new Map,d=f=>{const m=f.toLowerCase();if(a.has(m))return a.get(m);if(f.includes(",")||/[\x00-\x1f\x7f]/.test(f))return;if(Tr.test(f))return e?true:void 0;let h=false;const g=new Set([f,Ut(f)]);for(const x of["monospace","serif","sans-serif"]){s.has(x)||s.set(x,o(x));const S=s.get(x);for(const y of g){const F=o(`${Pu(y)}, ${x}`);if(F==null||S==null)h=void 0;else if(Math.abs(F-S)>.1)return a.set(m,true),true}}return a.set(m,h),h};for(const f of t){const m=Mt(f.fontFamily??"")||void 0,h=((u=f.fontFile)==null?void 0:u.trim())||void 0;if(!m&&!h)continue;let g=Mt(f.resolvedFontFamily??"")||void 0,x=g??m;const S=f.browserUnsupported||/\.shx$/i.test(h??"");let y=x&&(!S||g)?d(x):void 0;const F=ye(m??"",f.traits);let k,w,T;if(r.substitute&&y===false&&m&&!g&&!S&&!f.embedded){const H=new Map;for(const Y of An(m,f.traits))H.set(Y.toLowerCase(),{fontFamily:Y});for(const Y of r.candidates??[])H.set(Y.fontFamily.toLowerCase(),Y);const z=rr(f,[...H.values()]).find(Y=>!Tr.test(Y.candidate.fontFamily)&&d(Y.candidate.fontFamily)===true);if(z){g=x=z.candidate.fontFamily,y=true,w=z.score,T=z.coverage,k=F.monospace?"monospace":F.style==="handwriting"?"handwriting":F.style==="decorative"?"decorative":F.script==="emoji"?"emoji":F.serif===true?"serif":F.serif===false?"sans-serif":"similar-traits";const Y=z.reasons.filter(D=>["weight","stretch","average-width","PANOSE","glyph-coverage"].includes(D));Y.length&&(k+=`, ${Y.join(", ")}`)}}let N="unknown",I=f.source??"unknown";S&&!g?(N="unsupported",I="fallback"):y===false&&!f.embedded?(N="missing",I="fallback"):y===true&&(N=g&&(S||g.toLowerCase()!==(m==null?void 0:m.toLowerCase()))?"substituted":"available",I=k?"fallback":f.source??(Tr.test(x)?"fallback":"environment"));const C={fontFamily:m,fontFile:h,styleName:f.styleName,resolvedFontFamily:g,status:N,source:I,classification:F,substitutionReason:k,matchScore:w,coverage:T,embedded:f.embedded},M=JSON.stringify([m==null?void 0:m.toLowerCase(),h==null?void 0:h.toLowerCase(),f.styleName,g==null?void 0:g.toLowerCase(),I,F,f.embedded]);n.has(M)||n.set(M,C)}const l=[...n.values()];return{fonts:l,warnings:oo(l)}}function oo(t){const e=new Map,r=n=>{const a=n.toLowerCase();e.has(a)||e.set(a,n)};for(const n of t){const a=n.fontFamily??n.fontFile;a&&(n.status==="unsupported"?r(`Font "${a}" cannot be rendered directly by the browser; fallback fonts may change layout.`):n.status==="missing"?r(`Font "${n.resolvedFontFamily??a}" was not detected; fallback fonts may change layout.`):n.status==="substituted"&&r(n.substitutionReason?`Font "${a}" is automatically substituted with "${n.resolvedFontFamily}" (${n.substitutionReason}); text layout may differ.`:`Font "${a}" is mapped to "${n.resolvedFontFamily}"; text layout may differ.`))}return[...e.values()]}function Pu(t){return`"${t.replace(/["\\]/g,"\\$&")}"`}const Lr="5.2.6",Ou=["https://cdn.jsdelivr.net/npm","https://unpkg.com"],Du=[[0,255],[305,305],[338,339],[699,700],[710,710],[730,730],[732,732],[772,772],[776,776],[809,809],[8192,8303],[8364,8364],[8482,8482],[8593,8593],[8595,8595],[8722,8722],[8725,8725],[65279,65279],[65533,65533]];function Hu(t={}){const e=t.mirrors??Ou;return[["carlito","Carlito","latin",{serif:false,script:"latin"}],["caladea","Caladea","latin",{serif:true,script:"latin"}],["arimo","Arimo","latin",{serif:false,script:"latin"}],["tinos","Tinos","latin",{serif:true,script:"latin"}],["cousine","Cousine","latin",{monospace:true,script:"latin"}],["noto-sans","Noto Sans","latin",{serif:false,script:"latin"}],["noto-serif","Noto Serif","latin",{serif:true,script:"latin"}],["noto-sans-mono","Noto Sans Mono","latin",{monospace:true,script:"latin"}],["noto-sans-sc","Noto Sans SC","chinese-simplified",{serif:false,script:"cjk-sc"}],["noto-sans-tc","Noto Sans TC","chinese-traditional",{serif:false,script:"cjk-tc"}],["noto-sans-jp","Noto Sans JP","japanese",{serif:false,script:"japanese"}],["noto-sans-kr","Noto Sans KR","korean",{serif:false,script:"korean"}],["noto-serif-sc","Noto Serif SC","chinese-simplified",{serif:true,script:"cjk-sc"}],["noto-serif-tc","Noto Serif TC","chinese-traditional",{serif:true,script:"cjk-tc"}],["noto-serif-jp","Noto Serif JP","japanese",{serif:true,script:"japanese"}],["noto-serif-kr","Noto Serif KR","korean",{serif:true,script:"korean"}]].map(([n,a,i,o])=>({id:n,version:Lr,license:`https://cdn.jsdelivr.net/npm/@fontsource/${n}@${Lr}/LICENSE`,fonts:[400,700].flatMap(s=>(i==="latin"&&n!=="noto-sans-mono"?["normal","italic"]:["normal"]).map(d=>({id:`${n}-${i}-${s}-${d}`,fontFamily:a,traits:{style:"text",monospace:false,stretch:100,...o,weight:s},coverage:i==="latin"?Du:void 0,descriptors:{weight:String(s),style:d},sources:e.map(l=>({url:`${l.replace(/\/$/,"")}/@fontsource/${n}@${Lr}/files/${n}-${i}-${s}-${d}.woff2`}))})))}))}const zu={},Ta=new WeakMap,Ee=()=>new DOMException("Font loading aborted.","AbortError"),Yt=t=>{if(t.aborted)throw Ee()},Pt=(t,e,r,n)=>Number.isFinite(t)?Math.max(r,Math.min(n,t)):e;function Ue(t,e){return e.aborted?Promise.reject(Ee()):new Promise((r,n)=>{const a=()=>{e.removeEventListener("abort",a),n(Ee())};e.addEventListener("abort",a,{once:true}),t.then(i=>{e.removeEventListener("abort",a),r(i)},i=>{e.removeEventListener("abort",a),n(i)})})}function Uu(t,e){return new Promise((r,n)=>{const a=()=>{clearTimeout(i),e.removeEventListener("abort",a),n(Ee())},i=setTimeout(()=>{e.removeEventListener("abort",a),r()},t);e.addEventListener("abort",a,{once:true}),e.aborted&&a()})}class Xu{constructor(e,r){E(this,"entries",new Map);E(this,"routes",new Map);E(this,"origins",new Map);E(this,"assets");this.document=e,this.options=r,this.assets=(r.packs??Hu()).flatMap(n=>n.fonts)}async acquire(e,r){Yt(r);let n=this.entries.get(e);if(!n){const s=new AbortController;n={users:0,controller:s,promise:void 0};const d=n;d.promise=this.load(e,s.signal).then(l=>(Yt(s.signal),this.document.fonts.add(l),d.face=l,l)),this.entries.set(e,n)}n.users++;const a=n;let i=false;const o=()=>{i||(i=true,r.removeEventListener("abort",o),--a.users===0&&(a.controller.abort(),a.face&&this.document.fonts.delete(a.face),this.entries.get(e)===a&&this.entries.delete(e)))};r.addEventListener("abort",o,{once:true});try{return await Ue(a.promise,r),Yt(r),{asset:e,release:o}}catch(s){throw o(),s}}async load(e,r){var d,l;const n=((d=this.document.defaultView)==null?void 0:d.FontFace)??globalThis.FontFace;if(!n||!((l=this.document.fonts)!=null&&l.add))throw new Error("FontFace API unavailable.");const a=Date.now()+Pt(this.options.budgetMs,12e3,10,6e4),i=Math.floor(Pt(this.options.maxAttempts,3,1,8));if(e.data){if(e.data.byteLength>Pt(this.options.maxFontBytes,16*1024*1024,1024,64*1024*1024))throw new Error("Font exceeds size limit.");const u=e.data instanceof Uint8Array?e.data.slice().buffer:e.data.slice(0);return this.decode(n,e,u,r,a)}const o=(e.sources??[]).flatMap(u=>{try{const f=new URL(u.url,this.document.baseURI);return/^https?:$/i.test(f.protocol)?[{...u,url:f.href}]:[]}catch{return[]}});let s=0;for(;s<i&&(Yt(r),!(!o.length||Date.now()>=a));){const u=Date.now(),f=o.filter(h=>this.health(h).retryAt<=u).sort((h,g)=>(h.priority??0)-(g.priority??0)||this.cost(h)-this.cost(g));if(!f.length){const h=Math.min(...o.map(g=>this.health(g).retryAt))-u;if(h>=a-u)break;await Uu(h,r);continue}const m=s+1<i?f.slice(0,2):f.slice(0,1);try{return await this.raceRoutes(m,r,async(h,g)=>(s++,this.request(n,e,h,g,a)))}catch{Yt(r)}}throw new Error(`Font "${e.fontFamily}" could not be loaded; local fallbacks remain active.`)}raceRoutes(e,r,n){return new Promise((a,i)=>{let o=false,s=0,d=0;const l=[];let u;const f=()=>{clearTimeout(u),r.removeEventListener("abort",m)},m=()=>{o||(o=true,f(),l.forEach(g=>g.controller.abort()),i(Ee()))},h=()=>{if(o||s>=e.length)return;const g=e[s++],x=new AbortController,S={source:g,controller:x,started:Date.now()};l.push(S),n(g,x.signal).then(y=>{if(!o){o=true,f();for(const F of l)if(F!==S){if(!F.controller.signal.aborted){const k=this.health(F.source);k.latency=Math.max(k.latency??0,Date.now()-F.started),this.origins.set(new URL(F.source.url).origin,k.latency)}F.controller.abort()}a(y)}},y=>{o||(d++,s<e.length?(clearTimeout(u),h()):d===s&&(o=true,f(),i(y)))})};if(r.addEventListener("abort",m,{once:true}),r.aborted){m();return}h(),e.length>1&&(u=setTimeout(h,Pt(this.options.hedgeDelayMs,200,0,5e3)))})}async request(e,r,n,a,i){var f,m;const o=Date.now(),s=new AbortController,d=()=>s.abort();a.addEventListener("abort",d,{once:true});const l=setTimeout(d,Math.min(i-o,Pt(this.options.timeoutMs,4e3,10,3e4)));let u=0;try{const h=await Ue(fetch(n.url,{signal:s.signal,mode:"cors",credentials:n.credentials??"omit",headers:n.headers,cache:"force-cache",referrerPolicy:"no-referrer"}),s.signal);if(!h.ok){const k=h.headers.get("Retry-After");throw k&&(u=/^\d+(?:\.\d+)?$/.test(k)?Number(k)*1e3:Math.max(0,Date.parse(k)-Date.now())),[401,403,404,410].includes(h.status)&&(u=Math.max(u||0,3e5)),(f=h.body)==null||f.cancel().catch(()=>{}),new Error("Font source returned an error.")}const g=Pt(this.options.maxFontBytes,16*1024*1024,1024,64*1024*1024);if(Number(h.headers.get("Content-Length"))>g)throw(m=h.body)==null||m.cancel().catch(()=>{}),new Error("Font exceeds size limit.");const x=await Ue(Yu(h,g,s.signal),s.signal),S=await this.decode(e,r,x,s.signal,i);Yt(a);const y=this.health(n),F=Math.max(1,Date.now()-o);return y.latency=y.latency===void 0?F:y.latency*.7+F*.3,this.origins.set(new URL(n.url).origin,y.latency),y.failures=0,y.retryAt=0,S}catch(h){Yt(a);const g=this.health(n),x=Pt(this.options.backoffMs,500,1,3e4),S=Pt(this.options.maxBackoffMs,3e4,x,3e5);throw g.failures=Math.min(g.failures+1,10),g.retryAt=Date.now()+Math.max(Number.isFinite(u)?u:0,Math.min(S,x*2**(g.failures-1))*(.75+Math.random()*.5)),h}finally{clearTimeout(l),a.removeEventListener("abort",d),s.abort()}}async decode(e,r,n,a,i){const o=new AbortController,s=()=>o.abort();a.addEventListener("abort",s,{once:true});const d=setTimeout(s,Math.max(0,Math.min(i-Date.now(),Pt(this.options.timeoutMs,4e3,10,3e4))));try{Yt(a);const l=new e(r.fontFamily,n,{display:"swap",...r.descriptors});return await Ue(l.load(),o.signal),Yt(a),l}finally{clearTimeout(d),a.removeEventListener("abort",s)}}health(e){const r=JSON.stringify([e.url,e.credentials,e.headers]);let n=this.routes.get(r);return n||this.routes.set(r,n={failures:0,retryAt:0}),n}cost(e){const r=new URL(e.url).origin===new URL(this.document.baseURI).origin,n=this.health(e);return(n.latency??this.origins.get(new URL(e.url).origin)??(r?500:1500))+n.failures*5e3}}async function Yu(t,e,r){var s;if(!((s=t.body)!=null&&s.getReader)){const d=await t.arrayBuffer();if(!d.byteLength||d.byteLength>e)throw new Error("Invalid font response size.");return d}const n=t.body.getReader(),a=[],i=()=>{n.cancel().catch(()=>{})};r.addEventListener("abort",i,{once:true});let o=0;try{for(;;){const{value:u,done:f}=await n.read();if(f)break;if(o+=u.byteLength,o>e)throw new Error("Font exceeds size limit.");a.push(u)}if(!o)throw new Error("Empty font response.");const d=new Uint8Array(o);let l=0;for(const u of a)d.set(u,l),l+=u.byteLength;return d.buffer}catch(d){throw n.cancel().catch(()=>{}),d}finally{r.removeEventListener("abort",i),n.releaseLock()}}function qu(t,e,r){const n=r.fontLoading===true?zu:r.fontLoading||void 0;if(!n||!t.refreshFonts)return{reset(){},destroy(){}};let a=Ta.get(e);a||Ta.set(e,a=new WeakMap);let i=a.get(n);i||a.set(n,i=new Xu(e,n));let o=new AbortController,s=false,d=false,l=false;const u=new Set,f=[],m=[];let h,g;const x=(k,w)=>{if(g=w,h==null||h(),h=void 0,o.abort(),o=new AbortController,f.splice(0).forEach(T=>T.release()),m.length=0,u.clear(),d=false,k){const T=()=>{o.abort(),f.splice(0).forEach(N=>N.release())};k.addEventListener("abort",T,{once:true}),h=()=>k.removeEventListener("abort",T),k.aborted&&T()}},S=()=>{l||s||(l=true,queueMicrotask(()=>{l=false,y()}))},y=async()=>{var Y;const k=t.getState();if(s||d||o.signal.aborted||k.loading||k.error)return;const w=o.signal,T=((Y=t.getFontReferences)==null?void 0:Y.call(t))??(k.fonts??[]).map(D=>({...D,traits:D.classification})),N=D=>JSON.stringify([D.fontFamily,D.fontFile,D.traits,D.resolvedFontFamily,D.fontStyle]),I=T.filter(D=>{const P=N(D);return u.has(P)?false:(u.add(P),true)});if(!I.length)return;d=true;const C=[],M=new Map;let H=0;const z=async()=>{var D,P;for(;H<I.length&&!w.aborted;){const j=I[H++];if(!(j.fontFamily||j.resolvedFontFamily)||j.embedded||(j.browserUnsupported||/\.shx$/i.test(j.fontFile??""))&&!j.resolvedFontFamily)continue;let O=i.assets,$=j;try{let q;try{q=(D=r.fontResolver)==null?void 0:D.call(r,{family:k.family,sourceFormat:g,fontFamily:j.fontFamily,fontFile:j.fontFile,styleName:j.styleName,fontStyle:j.fontStyle})}catch{C.push(`Font resolver failed for "${j.fontFamily}"; pack and local fallbacks remain active.`)}if(q){const _=typeof q=="string"?q:q.fontFamily;_&&($={...j,resolvedFontFamily:_,source:"application"}),typeof q!="string"&&(O=[...q.assets??[],...O],C.push(...q.warnings??[]))}const V=Le([$],e,{substitute:true}).fonts[0],Z=m.filter(_=>_.fontFamily===((V==null?void 0:V.resolvedFontFamily)??$.resolvedFontFamily??$.fontFamily)),st=ye($.fontFamily??"",$.traits),bt=st.weight??400,dt=Z.some(_=>{var ht,wt,ve;const it=(((ht=_.descriptors)==null?void 0:ht.weight)??String(((wt=_.traits)==null?void 0:wt.weight)??400)).split(/\s+/).map(Number);return bt>=it[0]&&bt<=(it[1]??it[0])&&(((ve=_.descriptors)==null?void 0:ve.style)??"normal").startsWith(j.fontStyle??"normal")}),tt=Z.length>0&&!dt;if(dt||!tt&&((V==null?void 0:V.status)==="available"||$.source==="application"&&(V==null?void 0:V.status)==="substituted")){$.resolvedFontFamily&&$.resolvedFontFamily!==j.resolvedFontFamily&&M.set(j,$);continue}const At=$.resolvedFontFamily??$.fontFamily;O=O.filter(_=>{var it;return(((it=_.descriptors)==null?void 0:it.style)??"normal")===(j.fontStyle??"normal")});const ct=O.filter(_=>_.fontFamily.toLowerCase()===At.toLowerCase()).sort((_,it)=>{var ht,wt,ve,Bn;return Math.abs((((ht=_.traits)==null?void 0:ht.weight)??400)-(((wt=j.traits)==null?void 0:wt.weight)??400))-Math.abs((((ve=it.traits)==null?void 0:ve.weight)??400)-(((Bn=j.traits)==null?void 0:Bn.weight)??400))});if(!ct.length&&!$.resolvedFontFamily&&["serif","monospace","style","script"].every(_=>st[_]===void 0))continue;const et=rr({...$,fontFamily:At},O),ut=[...ct,...et.map(_=>_.candidate).filter(_=>!ct.includes(_))];if($.resolvedFontFamily&&ut.splice(0,ut.length,...ct),!ut.length)continue;if(!tt&&n.preferLocal!==false&&(V==null?void 0:V.status)==="substituted"&&!ct.length){const _={fontFamily:V.resolvedFontFamily};if(((P=rr(j,[_,...ut])[0])==null?void 0:P.candidate)===_)continue}const pt=new Set;for(const _ of ut.filter(it=>{const ht=it.fontFamily.toLowerCase();return pt.has(ht)?false:(pt.add(ht),true)}).slice(0,2))try{const it=await i.acquire(_,w);if(w.aborted){it.release();break}f.push(it),m.push(_),M.set(j,{...$,resolvedFontFamily:_.fontFamily,source:$.source==="application"?"application":"fallback"});break}catch{if(w.aborted)break}!w.aborted&&!M.has(j)&&C.push(`Font "${At}" could not be loaded; local fallback fonts remain active.`)}catch{w.aborted||C.push(`Font "${j.fontFamily}" could not be loaded; local fallback fonts remain active.`)}}};try{if(await Promise.all(Array.from({length:Math.floor(Pt(n.concurrency,3,1,8))},z)),w.aborted||s)return;const D=T.map(P=>M.get(P)??P);for(const P of M.values())u.add(N(P));(M.size||C.length)&&await t.refreshFonts({references:D,loaded:[...m],warnings:[...new Set(C)],relayout:M.size>0})}catch{}finally{w.aborted||(d=false,S())}},F=[t.on("rendered",S),t.on("statechange",S)];return{reset:x,destroy(){s=true,F.forEach(k=>k()),x()}}}function _u(t,e){var n,a;const r=Le(t.references,e,{substitute:true,candidates:t.loaded});for(const i of r.fonts){const o=i.resolvedFontFamily??i.fontFamily;if(t.loaded.some(s=>s.fontFamily.toLowerCase()===(o==null?void 0:o.toLowerCase()))&&(i.status=i.resolvedFontFamily&&i.resolvedFontFamily.toLowerCase()!==((n=i.fontFamily)==null?void 0:n.toLowerCase())?"substituted":"available",i.source=((a=t.references.find(s=>s.fontFamily===i.fontFamily))==null?void 0:a.source)??"application",i.status==="substituted"&&i.source==="fallback")){const s=t.references.find(l=>l.fontFamily===i.fontFamily),d=s&&rr(s,t.loaded.filter(l=>l.fontFamily===o))[0];i.substitutionReason=["webfont",...(d==null?void 0:d.reasons)??[]].join(", "),i.matchScore=d==null?void 0:d.score,i.coverage=(d==null?void 0:d.coverage)??"unknown"}}return r.warnings=[...new Set([...oo(r.fonts),...t.warnings])],r}function Wu(t){const e={lines:[]};let r=0;for(const a of t.replace(/^\uFEFF/,"").split(/\r?\n/)){const i=/^\s*\[(ti|ar|al|offset):([^\]]*)\]\s*$/i.exec(a);if(i){const l=i[1].toLowerCase(),u=i[2].trim();l==="offset"?/^[+-]?\d+$/.test(u)&&Number.isFinite(Number(u))&&(r=Number(u)/1e3):e[l==="ti"?"title":l==="ar"?"artist":"album"]=u;continue}const o=[];let s=a.trimStart(),d;for(;d=/^\[(\d{1,5}):([0-5]\d)(?:[.:](\d{1,3}))?\]/.exec(s);)o.push(Number(d[1])*60+Number(d[2])+ +`0.${d[3]??"0"}`),s=s.slice(d[0].length);s=s.replace(/<\d{1,5}:[0-5]\d(?:[.:]\d{1,3})?>/g,"").trim();for(const l of o)e.lines.push({time:l,text:s})}e.lines.sort((a,i)=>a.time-i.time);const n=[];for(const a of e.lines){const i=n[n.length-1],o=a.time-r;(i==null?void 0:i.time)===o?a.text&&!i.text.split(`
10
10
  `).includes(a.text)&&(i.text=[i.text,a.text].filter(Boolean).join(`
11
- `)):n.push({time:o,text:a.text})}return e.lines=n,e}function Ju(t,e){let r=0,n=t.length;for(;r<n;){const a=r+n>>>1;t[a].time<=e?r=a+1:n=a}return r-1}const La=2*1024*1024,Vu=20*1024*1024;class Gu{constructor(e,r,n,a){E(this,"element",G("section","pptxv-audio-player"));E(this,"artwork",G("div","pptxv-audio-artwork"));E(this,"title",G("h2","pptxv-audio-title"));E(this,"details",G("p","pptxv-audio-details"));E(this,"lyricList",G("div","pptxv-audio-lyrics"));E(this,"status",G("p","pptxv-audio-status"));E(this,"play");E(this,"timing");E(this,"labels");E(this,"lyrics",{lines:[]});E(this,"lyricButtons",[]);E(this,"activeLine",-1);E(this,"delay",0);E(this,"lyricsRevision",0);E(this,"coverRevision",0);E(this,"coverRank",0);E(this,"coverUrl",null);E(this,"image",null);var S,k;this.media=e,this.context=r,this.options=n,this.signal=a;const i=/^zh\b/i.test(document.documentElement.lang);this.labels=i?{now:"\u6B63\u5728\u8046\u542C",play:"\u64AD\u653E",pause:"\u6682\u505C",lyrics:"\u6B4C\u8BCD",importLyrics:"\u5BFC\u5165 LRC",cover:"\u66F4\u6362\u5C01\u9762",empty:"\u8BA9\u6BCF\u4E00\u53E5\uFF0C\u90FD\u6709\u56DE\u54CD",hint:"\u5BFC\u5165 LRC \u6B4C\u8BCD\uFF0C\u968F\u97F3\u4E50\u540C\u6B65\u663E\u793A",invalid:"\u672A\u627E\u5230\u6709\u6548\u7684 LRC \u65F6\u95F4\u6807\u7B7E\uFF0C\u8BF7\u68C0\u67E5\u6B4C\u8BCD\u6587\u4EF6\u3002",failed:"\u65E0\u6CD5\u8BFB\u53D6\u6B4C\u8BCD\uFF0C\u8BF7\u91CD\u8BD5\u3002",tooLarge:"\u6B4C\u8BCD\u6587\u4EF6\u8FC7\u5927\uFF08\u6700\u591A 2 MB\uFF09\u3002",imageFailed:"\u65E0\u6CD5\u663E\u793A\u5C01\u9762\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u56FE\u7247\u3002",coverLarge:"\u5C01\u9762\u6587\u4EF6\u8FC7\u5927\uFF08\u6700\u591A 20 MB\uFF09\u3002",repeat:"\u5355\u66F2\u5FAA\u73AF",speed:"\u64AD\u653E\u901F\u5EA6",earlier:"\u6B4C\u8BCD\u63D0\u524D 0.5 \u79D2",later:"\u6B4C\u8BCD\u5EF6\u540E 0.5 \u79D2",timing:"\u6B4C\u8BCD\u504F\u79FB",ready:"\u6B4C\u8BCD\u5DF2\u8F7D\u5165\uFF0C\u70B9\u51FB\u6B4C\u8BCD\u53EF\u8DF3\u8F6C",unavailable:"\u6682\u65F6\u65E0\u6CD5\u64AD\u653E\uFF0C\u8BF7\u4F7F\u7528\u4E0B\u65B9\u64AD\u653E\u63A7\u4EF6\u91CD\u8BD5\u3002"}:{now:"NOW PLAYING",play:"Play",pause:"Pause",lyrics:"Lyrics",importLyrics:"Import LRC",cover:"Change cover",empty:"A little closer to the music",hint:"Import LRC lyrics to follow along",invalid:"No valid LRC timestamps found. Please check the lyrics file.",failed:"Unable to read lyrics. Try again.",tooLarge:"Lyrics file is too large (2 MB maximum).",imageFailed:"Unable to display this cover. Choose another image.",coverLarge:"Cover file is too large (20 MB maximum).",repeat:"Repeat track",speed:"Playback speed",earlier:"Lyrics 0.5 seconds earlier",later:"Lyrics 0.5 seconds later",timing:"Lyrics offset",ready:"Lyrics loaded. Click a line to seek.",unavailable:"Unable to play. Try the playback controls below."},this.element.setAttribute("aria-label",this.labels.now);const o=G("div","pptxv-audio-body"),s=G("div","pptxv-audio-album"),d=G("div","pptxv-audio-placeholder");d.setAttribute("aria-hidden","true"),d.append(G("span","","\u266B")),this.play=this.button(this.labels.play,"","pptxv-audio-play",async()=>{if(!e.paused)e.pause();else try{await e.play()}catch{a.aborted||(this.status.textContent=this.labels.unavailable)}}),this.artwork.append(d,this.play);const l=G("p","pptxv-audio-eyebrow",this.labels.now);s.append(this.artwork,l,this.title,this.details),s.append(this.fileButton(this.labels.cover,"image/*","pptxv-audio-cover-input",async w=>{if(w.size>Vu){this.status.textContent=this.labels.coverLarge;return}this.setCover(w,4)}));const u=G("div","pptxv-audio-lyric-panel"),f=G("div","pptxv-audio-lyric-header");f.append(G("h3","",this.labels.lyrics),this.fileButton(this.labels.importLyrics,".lrc,text/plain","pptxv-audio-lrc-input",async w=>{const T=++this.lyricsRevision;try{const N=await this.readLyrics(w);!a.aborted&&T===this.lyricsRevision&&this.setLyrics(N,true)}catch(N){!a.aborted&&T===this.lyricsRevision&&this.showLyricsError(N)}})),this.lyricList.tabIndex=0,this.lyricList.setAttribute("role","region"),this.lyricList.setAttribute("aria-label",this.labels.lyrics),this.status.setAttribute("role","status"),this.timing=G("div","pptxv-audio-timing");const m=G("output","","0.0s");m.setAttribute("aria-label",this.labels.timing);const h=w=>{this.delay=Math.round((this.delay+w)*10)/10,m.textContent=`${this.delay>0?"+":""}${this.delay.toFixed(1)}s`,this.sync()};this.timing.append(this.button(this.labels.earlier,"\u22120.5s","",()=>h(-.5)),m,this.button(this.labels.later,"+0.5s","",()=>h(.5))),this.timing.hidden=true,u.append(f,this.lyricList,this.timing,this.status),o.append(s,u);const g=G("div","pptxv-audio-footer"),x=G("div","pptxv-audio-extras"),F=this.button(this.labels.repeat,"\u21BB","pptxv-audio-repeat",()=>{e.loop=!e.loop,F.setAttribute("aria-pressed",String(e.loop))});F.setAttribute("aria-pressed","false");const y=G("select","pptxv-audio-speed");y.setAttribute("aria-label",this.labels.speed);for(const w of[.5,.75,1,1.25,1.5,2]){const T=G("option","",`${w}\xD7`);T.value=String(w),T.selected=w===1,y.append(T)}y.addEventListener("change",()=>{e.playbackRate=Number(y.value)},{signal:a}),x.append(F,y),g.append(e,x),this.element.append(o,g),this.updateMetadata(),this.showEmpty(),((S=n.audio)==null?void 0:S.lyrics)!==void 0&&this.setLyrics(n.audio.lyrics),((k=n.audio)==null?void 0:k.cover)!==void 0&&this.setCover(n.audio.cover,3);for(const w of["timeupdate","seeking","seeked","loadedmetadata","play","pause","ended"])e.addEventListener(w,()=>this.sync(),{signal:a});this.sync()}async loadCompanions(){if(!this.options.resourceResolver)return;const e=(this.context.descriptor.name??"").replace(/\\/g,"/").split(/[?#]/,1)[0];if(!e)return;const r=e.replace(/\.[^/.]+$/,""),n=r.slice(0,r.lastIndexOf("/")+1),a=this.lyricsRevision;await Promise.allSettled([(async()=>{var s;if(((s=this.options.audio)==null?void 0:s.lyrics)!==void 0)return;const i=await this.resolve([`${r}.lrc`],"lyrics");if(i===void 0||this.signal.aborted||a!==this.lyricsRevision)return;const o=await this.readLyrics(i);!this.signal.aborted&&a===this.lyricsRevision&&this.setLyrics(o)})().catch(i=>{!this.signal.aborted&&a===this.lyricsRevision&&this.showLyricsError(i)}),(async()=>{var o;if(((o=this.options.audio)==null?void 0:o.cover)!==void 0)return;const i=await this.resolve([`${r}.jpg`,`${r}.png`,`${r}.webp`,`${n}cover.jpg`,`${n}cover.png`,`${n}folder.jpg`],"cover");i!==void 0&&!this.signal.aborted&&this.setCover(i,2)})()])}setCover(e,r=1){var i;if(this.signal.aborted||r<this.coverRank)return;this.coverRank=r;const n=++this.coverRevision;this.revokeCover();const a=G("img","pptxv-native-audio-cover");if(a.alt=`${((i=this.options.audio)==null?void 0:i.title)??this.context.descriptor.name??"Audio"} \u2014 cover`,a.addEventListener("error",()=>{n===this.coverRevision&&(this.revokeCover(),this.coverRank=0,r>=3&&(this.status.textContent=this.labels.imageFailed))},{once:true,signal:this.signal}),typeof e=="string")a.src=e;else{const o=e instanceof Blob?e:new Blob([Ma(e)]);this.coverUrl=URL.createObjectURL(o),a.src=this.coverUrl}this.image=a,this.artwork.prepend(a)}destroy(){this.revokeCover(),this.element.remove()}revokeCover(){var e,r;(e=this.image)==null||e.removeAttribute("src"),(r=this.image)==null||r.remove(),this.image=null,this.coverUrl&&URL.revokeObjectURL(this.coverUrl),this.coverUrl=null}updateMetadata(){var n;const e=this.options.audio;this.title.textContent=(e==null?void 0:e.title)||this.lyrics.title||this.context.descriptor.name||"Audio";const r=[(e==null?void 0:e.artist)||this.lyrics.artist,(e==null?void 0:e.album)||this.lyrics.album].filter(Boolean);this.details.textContent=r.join(" \xB7 ")||(((n=this.context.route)==null?void 0:n.sourceFormat)??this.context.descriptor.extension??"Audio").toUpperCase()}setLyrics(e,r=false){const n=Wu(e);if(!n.lines.some(a=>a.text)||n.lines.length>1e4){this.status.textContent=this.labels.invalid;return}this.lyrics=n,this.activeLine=-1,this.delay=0,this.timing.querySelector("output").textContent="0.0s",this.updateMetadata(),this.lyricButtons=n.lines.map(a=>{const i=this.button("",a.text||"\u266A","pptxv-audio-lyric",()=>{!Number.isFinite(this.media.duration)||this.media.duration<=0||(this.media.currentTime=Math.min(this.media.duration,Math.max(0,a.time+this.delay)),this.sync())});return i.dataset.time=String(a.time),i}),this.lyricList.replaceChildren(...this.lyricButtons),this.lyricList.classList.remove("is-empty"),this.timing.hidden=false,this.status.textContent=r?this.labels.ready:"",this.sync()}showEmpty(){this.lyricList.classList.add("is-empty");const e=G("span","pptxv-audio-empty-icon","\u224B");e.setAttribute("aria-hidden","true"),this.lyricList.append(e,G("p","",this.labels.empty),G("small","",this.labels.hint))}sync(){var o,s;this.element.classList.toggle("is-playing",!this.media.paused&&!this.media.ended);const e=!this.media.paused&&!this.media.ended,r=e?'<path d="M6 5h4v14H6zM14 5h4v14h-4z"/>':'<path d="m8 5 11 7-11 7Z"/>';this.play.innerHTML=`<svg viewBox="0 0 24 24" width="22" height="22" fill="currentColor" aria-hidden="true">${r}</svg>`,this.play.setAttribute("aria-label",e?this.labels.pause:this.labels.play),this.play.title=e?this.labels.pause:this.labels.play;const n=Ju(this.lyrics.lines,this.media.currentTime-this.delay);if(n===this.activeLine)return;const a=this.lyricButtons[this.activeLine];a==null||a.classList.remove("is-active"),a==null||a.removeAttribute("aria-current"),this.activeLine=n;const i=this.lyricButtons[n];if(i){i.classList.add("is-active"),i.setAttribute("aria-current","true");const d=i.offsetTop-(this.lyricList.clientHeight-i.clientHeight)/2,l=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;(s=(o=this.lyricList).scrollTo)==null||s.call(o,{top:Math.max(0,d),behavior:l?"auto":"smooth"})}}button(e,r,n,a){const i=G("button",n,r);return i.type="button",e&&(i.setAttribute("aria-label",e),i.title=e),i.addEventListener("click",a,{signal:this.signal}),i}fileButton(e,r,n,a){const i=G("span","pptxv-audio-file"),o=G("input",n);return o.type="file",o.accept=r,o.hidden=true,o.setAttribute("aria-label",e),o.addEventListener("change",()=>{var d;const s=(d=o.files)==null?void 0:d[0];o.value="",s&&a(s)},{signal:this.signal}),i.append(this.button(e,e,"pptxv-audio-import",()=>o.click()),o),i}async resolve(e,r){var n;for(const a of e){if(this.signal.aborted)return;const i=await this.options.resourceResolver({family:"audio",sourceFormat:((n=this.context.route)==null?void 0:n.sourceFormat)??this.context.descriptor.extension,source:a,name:a.split("/").pop(),relation:r});if(i!=null)if(typeof i=="object"&&!(i instanceof Blob)&&!(i instanceof ArrayBuffer)&&!ArrayBuffer.isView(i)){if(i.source!==void 0)return i.source}else return i}}async readLyrics(e){let r;if(typeof e=="string"){const n=await fetch(e,{signal:this.signal});if(!n.ok)throw new Error(this.labels.failed);if(Number(n.headers.get("Content-Length"))>La)throw new Error(this.labels.tooLarge);r=await n.blob()}else r=e instanceof Blob?e:new Blob([Ma(e)]);if(r.size>La)throw new Error(this.labels.tooLarge);return typeof r.text=="function"?r.text():new Promise((n,a)=>{const i=new FileReader;i.onload=()=>n(String(i.result)),i.onerror=()=>a(new Error(this.labels.failed)),i.readAsText(r)})}showLyricsError(e){this.status.textContent=e instanceof Error&&e.message===this.labels.tooLarge?e.message:this.labels.failed}}function G(t,e="",r){const n=document.createElement(t);return e&&(n.className=e),r!==void 0&&(n.textContent=r),n}function Ma(t){const e=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t);return new Uint8Array(e).buffer}const Zu={play:'<path d="m9 5 11 7-11 7Z" fill="currentColor" stroke="none"/>',pause:'<path d="M8 5v14M16 5v14" stroke-width="4"/>',backward:'<path d="M3 10a9 9 0 1 1 2 8M3 4v6h6"/><text x="12" y="16" text-anchor="middle" fill="currentColor" stroke="none" font-size="10" font-family="system-ui">5</text>',forward:'<path d="M21 10a9 9 0 1 0-2 8M21 4v6h-6"/><text x="12" y="16" text-anchor="middle" fill="currentColor" stroke="none" font-size="10" font-family="system-ui">5</text>',volume:'<path d="M11 4 6 8H3v8h3l5 4ZM15 8a6 6 0 0 1 0 8M18 4a11 11 0 0 1 0 16"/>',muted:'<path d="M11 4 6 8H3v8h3l5 4ZM16 9l6 6M22 9l-6 6"/>',fullscreen:'<path d="M8 3H3v5M16 3h5v5M3 16v5h5M21 16v5h-5"/>',exitFullscreen:'<path d="M3 8h5V3M21 8h-5V3M8 21v-5H3M16 21v-5h5"/>',zoomIn:'<circle cx="10" cy="10" r="7"/><path d="m15 15 6 6M7 10h6M10 7v6"/>',zoomOut:'<circle cx="10" cy="10" r="7"/><path d="m15 15 6 6M7 10h6"/>',reset:'<path d="M3 10a9 9 0 1 1 2 8M3 4v6h6"/>'};function Xe(t,e,r){t.setAttribute("aria-label",e),t.title=e,t.innerHTML=`<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${Zu[r]}</svg>`}function Ca(t){const e=Math.max(0,Math.floor(Number.isFinite(t)?t:0)),r=Math.floor(e/60),n=String(e%60).padStart(2,"0");return r>=60?`${Math.floor(r/60)}:${String(r%60).padStart(2,"0")}:${n}`:`${r}:${n}`}function Ku(t,e){const{signal:r}=e,n=e.mediaName??"video",a=document.createElement("div");a.className="pptxv-video-controls",a.setAttribute("role","group"),a.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} controls`);const i=document.createElement("div");i.className="panoramav-view-controls",i.setAttribute("role","group"),i.setAttribute("aria-label","Panorama view controls");const o=(M,H,z,Y)=>{const D=document.createElement("button");return D.type="button",Xe(D,H,z),D.addEventListener("click",Y,{signal:r}),M.append(D),D};let s,d=false;const l=document.createElement("input");l.className="pptxv-video-timeline",l.type="range",l.min="0",l.step="0.01",l.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} position`);const u=document.createElement("output");u.className="pptxv-video-time";const f=M=>{u.value=`${Ca(M)} / ${Ca(s.duration)}`,l.setAttribute("aria-valuetext",u.value),l.style.setProperty("--pptxv-video-progress",`${s.duration>0?Math.min(100,M/s.duration*100):0}%`)};l.addEventListener("input",()=>{d=true,f(Number(l.value))},{signal:r}),l.addEventListener("change",()=>{const M=Number(l.value);d=false,e.seek(M)},{signal:r}),l.addEventListener("pointercancel",()=>{d=false},{signal:r}),l.addEventListener("blur",()=>{d=false},{signal:r}),a.append(l);const m=document.createElement("div");m.className="pptxv-video-control-row";const h=o(m,`Play ${n}`,"play",e.togglePlayback),g=o(m,`Rewind ${n} 5 seconds`,"backward",()=>e.seek(s.currentTime-5)),x=o(m,`Forward ${n} 5 seconds`,"forward",()=>e.seek(s.currentTime+5));g.className=x.className="pptxv-video-skip",m.append(u);const F=document.createElement("span");F.className="pptxv-video-control-spacer",m.append(F);const y=document.createElement("div");y.className="pptxv-video-volume";const S=o(y,`Unmute ${n}`,"muted",e.toggleMuted),k=document.createElement("input");k.type="range",k.min="0",k.max="1",k.step="0.01",k.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} volume`),k.addEventListener("input",()=>e.setVolume(Number(k.value)),{signal:r}),y.append(k),m.append(y);const w=document.createElement("select");w.className="pptxv-video-rate",w.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} playback speed`),w.title="Playback speed";for(const M of[.5,1,1.5,2]){const H=document.createElement("option");H.value=String(M),H.textContent=`${M}\xD7`,w.append(H)}w.addEventListener("change",()=>e.setPlaybackRate(Number(w.value)),{signal:r}),m.append(w);const T=o(m,"Enter video fullscreen","fullscreen",()=>{e.fullscreen().catch(()=>{T.title="Fullscreen is unavailable in this browser"})});T.disabled=!t.requestFullscreen;const N=()=>{const M=document.fullscreenElement===t;Xe(T,`${M?"Exit":"Enter"} ${n==="video"?"video":"panorama"} fullscreen`,M?"exitFullscreen":"fullscreen"),T.disabled&&(T.title="Fullscreen is unavailable in this browser")};document.addEventListener("fullscreenchange",N,{signal:r}),N(),a.append(m);let I,C;return e.zoom&&e.resetView&&(I=o(i,"Zoom out panorama","zoomOut",()=>{var M;return(M=e.zoom)==null?void 0:M.call(e,-.2)}),C=o(i,"Zoom in panorama","zoomIn",()=>{var M;return(M=e.zoom)==null?void 0:M.call(e,.2)}),o(i,"Reset panorama view","reset",e.resetView),t.append(i)),t.append(a),t.classList.add("pptxv-has-video-controls"),t.tabIndex=0,t.addEventListener("keydown",M=>{if(!(M.altKey||M.ctrlKey||M.metaKey||M.shiftKey||M.target!==t)){switch(M.key.toLowerCase()){case" ":case"k":e.togglePlayback();break;case"arrowleft":e.seek(s.currentTime-5);break;case"arrowright":e.seek(s.currentTime+5);break;case"m":s.audioAvailable&&e.toggleMuted();break;case"f":T.click();break;default:return}M.preventDefault()}},{signal:r}),{addControl(M){m.insertBefore(M,w)},sync(M){const H=!s||s.paused!==M.paused,z=!s||s.audioAvailable!==M.audioAvailable||s.muted!==M.muted||s.volume!==M.volume;s=M,H&&Xe(h,`${s.paused?"Play":"Pause"} ${n}`,s.paused?"play":"pause");const Y=Number.isFinite(s.duration)?Math.max(0,s.duration):0;if(l.max=String(Y||.1),l.disabled=g.disabled=x.disabled=Y<=0,d||(l.value=String(Math.min(s.currentTime,Y)),f(s.currentTime)),z){const D=s.muted||s.volume===0;Xe(S,s.audioAvailable?`${D?"Unmute":"Mute"} ${n}`:"Audio unavailable for this panorama preview",D?"muted":"volume"),S.disabled=k.disabled=!s.audioAvailable,k.hidden=!s.audioAvailable,k.value=String(s.muted?0:s.volume),k.setAttribute("aria-valuetext",`${Math.round(Number(k.value)*100)}%`)}w.value=String(s.playbackRate),I&&(I.disabled=(s.scale??1)<=.5),C&&(C.disabled=(s.scale??1)>=2.4)},remove(){a.remove(),i.remove(),t.classList.remove("pptxv-has-video-controls"),t.removeAttribute("tabindex")}}}function Qu(t,e,r){var d,l;const n=e.controls;e.controls=false;const a=Ku(t,{signal:r,togglePlayback:()=>{e.paused?e.play().catch(()=>{}):e.pause()},seek:u=>{Number.isFinite(e.duration)&&(e.currentTime=Math.max(0,Math.min(u,e.duration)))},toggleMuted:()=>{e.muted=!e.muted,!e.muted&&e.volume===0&&(e.volume=1)},setVolume:u=>{e.volume=u,e.muted=u===0},setPlaybackRate:u=>{e.playbackRate=u},fullscreen:async()=>{var u,f;document.fullscreenElement===t?await((u=document.exitFullscreen)==null?void 0:u.call(document)):await((f=t.requestFullscreen)==null?void 0:f.call(t))}});if(document.pictureInPictureEnabled&&e.requestPictureInPicture){const u=document.createElement("button");u.type="button",u.className="pptxv-video-pip",u.setAttribute("aria-label","Picture in picture"),u.title="Picture in picture",u.innerHTML='<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2"/><rect x="11" y="11" width="8" height="6" rx="1" fill="currentColor"/></svg>',u.addEventListener("click",()=>{(document.pictureInPictureElement===e?document.exitPictureInPicture():e.requestPictureInPicture()).catch(()=>{u.title="Picture in picture is unavailable for this video"})},{signal:r});const f=()=>{const m=document.pictureInPictureElement===e?"Exit picture in picture":"Picture in picture";u.title=m,u.setAttribute("aria-label",m)};e.addEventListener("enterpictureinpicture",f,{signal:r}),e.addEventListener("leavepictureinpicture",f,{signal:r});for(const m of["loadedmetadata","loadeddata","resize"])e.addEventListener(m,()=>{u.disabled=!e.videoWidth},{signal:r});u.disabled=!e.videoWidth,a.addControl(u)}const i=document.createElement("select");i.className="pptxv-video-rate pptxv-video-captions",i.setAttribute("aria-label","Video subtitles"),i.title="Subtitles";const o=()=>{const u=Array.from(e.textTracks).filter(m=>m.kind==="subtitles"||m.kind==="captions");i.hidden=u.length===0,i.replaceChildren();const f=document.createElement("option");f.value="-1",f.textContent="CC off",i.append(f),u.forEach((m,h)=>{const g=document.createElement("option");g.value=String(h),g.textContent=m.label||m.language||`Subtitles ${h+1}`,i.append(g)}),i.value=String(u.findIndex(m=>m.mode==="showing"))};i.addEventListener("change",()=>{Array.from(e.textTracks).filter(f=>f.kind==="subtitles"||f.kind==="captions").forEach((f,m)=>{f.mode=m===Number(i.value)?"showing":"disabled"})},{signal:r});for(const u of["addtrack","removetrack","change"])(l=(d=e.textTracks).addEventListener)==null||l.call(d,u,o,{signal:r});a.addControl(i),o();const s=()=>a.sync({currentTime:e.currentTime,duration:e.duration,paused:e.paused,muted:e.muted,volume:e.volume,playbackRate:e.playbackRate,audioAvailable:true});for(const u of["loadedmetadata","durationchange","timeupdate","seeked","play","pause","ended","volumechange","ratechange"])e.addEventListener(u,s,{signal:r});r.addEventListener("abort",()=>{a.remove(),e.controls=n},{once:true}),s()}const tp=new Set(["png","jpg","jpeg","gif","webp","avif","apng","ico","svg","bmp"]),ep=new Set(["html","htm","shtml","xhtml","xht","xhtm"]),rp=new Set(["mp4","webm","mov","m4v","ogv","mkv","avi","mpeg","mpg","3gp"]),so=new Set(["mp3","wav","aac","m4a","flac","ogg","oga","opus"]),np={mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",m4v:"video/x-m4v",ogv:"video/ogg",mkv:"video/x-matroska",avi:"video/x-msvideo",mpeg:"video/mpeg",mpg:"video/mpeg","3gp":"video/3gpp",mp3:"audio/mpeg",wav:"audio/wav",aac:"audio/aac",m4a:"audio/mp4",flac:"audio/flac",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/opus"},ap=new Set(["txt","log","text"]),ip=new Set(["js","jsx","mjs","cjs","ts","tsx","mts","cts","vue","css","scss","sass","less","json","xml","yaml","yml","toml","ini","rst","rest","adoc","asciidoc","asc","tex","latex","ltx","sty","cls","properties","env","conf","config","cfg","cnf","c","cpp","cc","cxx","h","hpp","hh","hxx","cs","go","java","kt","kts","lua","php","py","rb","rs","sh","bat","cmd","ps1","sql","swift","jsonc","json5","gql","graphql","proto","diff","patch","gitignore","dockerignore","editorconfig","r","dart","scala","groovy","gradle","pl","ex","erl","fs","fsi","fsx","vb","clj","hs","jl","zig","m","matlab","svelte","astro","mdx","tf","tfvars","hcl","rego","bicep","prisma","dockerfile","cmake","make","mk","bash","zsh","fish","csproj","vbproj","fsproj","props","targets","sln","cshtml","razor","mustache","hbs","liquid","jinja","twig","ejs","erb","haml","slim","mermaid","mmd","puml","avsc","sol","move","nim","cr","ml","mli","elm","rkt","lisp","scm","asm","s","cu","cuh","d","pas","adb","ads","cob","cbl","f90","f95","vhd","vhdl","sv","svh","ino","glsl","vert","frag","wgsl","hlsl","rmd","qmd","bib","nix","cue","dhall","org","wiki","mediawiki","textile","pod","man","roff","nfo","npmrc","yarnrc","gitattributes","gitmodules","md","markdown","mkd","mkdn","mdown"]),op=2e5,sp=new Set("bash cmake conf config cfg cnf dockerfile env fish hcl make mk nix npmrc pl powershell py qmd r rb rego sh toml yaml yarnrc zsh".split(" ")),Ea=new Set("ada haskell hs lua sql".split(" ")),cp=new Set("asm clj ini lisp scm".split(" ")),lp=new Set("asciidoc markdown mdx restructuredtext roff textile wiki xml".split(" ")),dp=new Set(`abstract and as async await begin break by case catch class const continue crate create def default defer delete do
11
+ `)):n.push({time:o,text:a.text})}return e.lines=n,e}function Ju(t,e){let r=0,n=t.length;for(;r<n;){const a=r+n>>>1;t[a].time<=e?r=a+1:n=a}return r-1}const La=2*1024*1024,Vu=20*1024*1024;class Gu{constructor(e,r,n,a){E(this,"element",G("section","pptxv-audio-player"));E(this,"artwork",G("div","pptxv-audio-artwork"));E(this,"title",G("h2","pptxv-audio-title"));E(this,"details",G("p","pptxv-audio-details"));E(this,"lyricList",G("div","pptxv-audio-lyrics"));E(this,"status",G("p","pptxv-audio-status"));E(this,"play");E(this,"timing");E(this,"labels");E(this,"lyrics",{lines:[]});E(this,"lyricButtons",[]);E(this,"activeLine",-1);E(this,"delay",0);E(this,"lyricsRevision",0);E(this,"coverRevision",0);E(this,"coverRank",0);E(this,"coverUrl",null);E(this,"image",null);var F,k;this.media=e,this.context=r,this.options=n,this.signal=a;const i=/^zh\b/i.test(document.documentElement.lang);this.labels=i?{now:"\u6B63\u5728\u8046\u542C",play:"\u64AD\u653E",pause:"\u6682\u505C",lyrics:"\u6B4C\u8BCD",importLyrics:"\u5BFC\u5165 LRC",cover:"\u66F4\u6362\u5C01\u9762",empty:"\u8BA9\u6BCF\u4E00\u53E5\uFF0C\u90FD\u6709\u56DE\u54CD",hint:"\u5BFC\u5165 LRC \u6B4C\u8BCD\uFF0C\u968F\u97F3\u4E50\u540C\u6B65\u663E\u793A",invalid:"\u672A\u627E\u5230\u6709\u6548\u7684 LRC \u65F6\u95F4\u6807\u7B7E\uFF0C\u8BF7\u68C0\u67E5\u6B4C\u8BCD\u6587\u4EF6\u3002",failed:"\u65E0\u6CD5\u8BFB\u53D6\u6B4C\u8BCD\uFF0C\u8BF7\u91CD\u8BD5\u3002",tooLarge:"\u6B4C\u8BCD\u6587\u4EF6\u8FC7\u5927\uFF08\u6700\u591A 2 MB\uFF09\u3002",imageFailed:"\u65E0\u6CD5\u663E\u793A\u5C01\u9762\uFF0C\u8BF7\u9009\u62E9\u5176\u4ED6\u56FE\u7247\u3002",coverLarge:"\u5C01\u9762\u6587\u4EF6\u8FC7\u5927\uFF08\u6700\u591A 20 MB\uFF09\u3002",repeat:"\u5355\u66F2\u5FAA\u73AF",speed:"\u64AD\u653E\u901F\u5EA6",earlier:"\u6B4C\u8BCD\u63D0\u524D 0.5 \u79D2",later:"\u6B4C\u8BCD\u5EF6\u540E 0.5 \u79D2",timing:"\u6B4C\u8BCD\u504F\u79FB",ready:"\u6B4C\u8BCD\u5DF2\u8F7D\u5165\uFF0C\u70B9\u51FB\u6B4C\u8BCD\u53EF\u8DF3\u8F6C",unavailable:"\u6682\u65F6\u65E0\u6CD5\u64AD\u653E\uFF0C\u8BF7\u4F7F\u7528\u4E0B\u65B9\u64AD\u653E\u63A7\u4EF6\u91CD\u8BD5\u3002"}:{now:"NOW PLAYING",play:"Play",pause:"Pause",lyrics:"Lyrics",importLyrics:"Import LRC",cover:"Change cover",empty:"A little closer to the music",hint:"Import LRC lyrics to follow along",invalid:"No valid LRC timestamps found. Please check the lyrics file.",failed:"Unable to read lyrics. Try again.",tooLarge:"Lyrics file is too large (2 MB maximum).",imageFailed:"Unable to display this cover. Choose another image.",coverLarge:"Cover file is too large (20 MB maximum).",repeat:"Repeat track",speed:"Playback speed",earlier:"Lyrics 0.5 seconds earlier",later:"Lyrics 0.5 seconds later",timing:"Lyrics offset",ready:"Lyrics loaded. Click a line to seek.",unavailable:"Unable to play. Try the playback controls below."},this.element.setAttribute("aria-label",this.labels.now);const o=G("div","pptxv-audio-body"),s=G("div","pptxv-audio-album"),d=G("div","pptxv-audio-placeholder");d.setAttribute("aria-hidden","true"),d.append(G("span","","\u266B")),this.play=this.button(this.labels.play,"","pptxv-audio-play",async()=>{if(!e.paused)e.pause();else try{await e.play()}catch{a.aborted||(this.status.textContent=this.labels.unavailable)}}),this.artwork.append(d,this.play);const l=G("p","pptxv-audio-eyebrow",this.labels.now);s.append(this.artwork,l,this.title,this.details),s.append(this.fileButton(this.labels.cover,"image/*","pptxv-audio-cover-input",async w=>{if(w.size>Vu){this.status.textContent=this.labels.coverLarge;return}this.setCover(w,4)}));const u=G("div","pptxv-audio-lyric-panel"),f=G("div","pptxv-audio-lyric-header");f.append(G("h3","",this.labels.lyrics),this.fileButton(this.labels.importLyrics,".lrc,text/plain","pptxv-audio-lrc-input",async w=>{const T=++this.lyricsRevision;try{const N=await this.readLyrics(w);!a.aborted&&T===this.lyricsRevision&&this.setLyrics(N,true)}catch(N){!a.aborted&&T===this.lyricsRevision&&this.showLyricsError(N)}})),this.lyricList.tabIndex=0,this.lyricList.setAttribute("role","region"),this.lyricList.setAttribute("aria-label",this.labels.lyrics),this.status.setAttribute("role","status"),this.timing=G("div","pptxv-audio-timing");const m=G("output","","0.0s");m.setAttribute("aria-label",this.labels.timing);const h=w=>{this.delay=Math.round((this.delay+w)*10)/10,m.textContent=`${this.delay>0?"+":""}${this.delay.toFixed(1)}s`,this.sync()};this.timing.append(this.button(this.labels.earlier,"\u22120.5s","",()=>h(-.5)),m,this.button(this.labels.later,"+0.5s","",()=>h(.5))),this.timing.hidden=true,u.append(f,this.lyricList,this.timing,this.status),o.append(s,u);const g=G("div","pptxv-audio-footer"),x=G("div","pptxv-audio-extras"),S=this.button(this.labels.repeat,"\u21BB","pptxv-audio-repeat",()=>{e.loop=!e.loop,S.setAttribute("aria-pressed",String(e.loop))});S.setAttribute("aria-pressed","false");const y=G("select","pptxv-audio-speed");y.setAttribute("aria-label",this.labels.speed);for(const w of[.5,.75,1,1.25,1.5,2]){const T=G("option","",`${w}\xD7`);T.value=String(w),T.selected=w===1,y.append(T)}y.addEventListener("change",()=>{e.playbackRate=Number(y.value)},{signal:a}),x.append(S,y),g.append(e,x),this.element.append(o,g),this.updateMetadata(),this.showEmpty(),((F=n.audio)==null?void 0:F.lyrics)!==void 0&&this.setLyrics(n.audio.lyrics),((k=n.audio)==null?void 0:k.cover)!==void 0&&this.setCover(n.audio.cover,3);for(const w of["timeupdate","seeking","seeked","loadedmetadata","play","pause","ended"])e.addEventListener(w,()=>this.sync(),{signal:a});this.sync()}async loadCompanions(){if(!this.options.resourceResolver)return;const e=(this.context.descriptor.name??"").replace(/\\/g,"/").split(/[?#]/,1)[0];if(!e)return;const r=e.replace(/\.[^/.]+$/,""),n=r.slice(0,r.lastIndexOf("/")+1),a=this.lyricsRevision;await Promise.allSettled([(async()=>{var s;if(((s=this.options.audio)==null?void 0:s.lyrics)!==void 0)return;const i=await this.resolve([`${r}.lrc`],"lyrics");if(i===void 0||this.signal.aborted||a!==this.lyricsRevision)return;const o=await this.readLyrics(i);!this.signal.aborted&&a===this.lyricsRevision&&this.setLyrics(o)})().catch(i=>{!this.signal.aborted&&a===this.lyricsRevision&&this.showLyricsError(i)}),(async()=>{var o;if(((o=this.options.audio)==null?void 0:o.cover)!==void 0)return;const i=await this.resolve([`${r}.jpg`,`${r}.png`,`${r}.webp`,`${n}cover.jpg`,`${n}cover.png`,`${n}folder.jpg`],"cover");i!==void 0&&!this.signal.aborted&&this.setCover(i,2)})()])}setCover(e,r=1){var i;if(this.signal.aborted||r<this.coverRank)return;this.coverRank=r;const n=++this.coverRevision;this.revokeCover();const a=G("img","pptxv-native-audio-cover");if(a.alt=`${((i=this.options.audio)==null?void 0:i.title)??this.context.descriptor.name??"Audio"} \u2014 cover`,a.addEventListener("error",()=>{n===this.coverRevision&&(this.revokeCover(),this.coverRank=0,r>=3&&(this.status.textContent=this.labels.imageFailed))},{once:true,signal:this.signal}),typeof e=="string")a.src=e;else{const o=e instanceof Blob?e:new Blob([Ma(e)]);this.coverUrl=URL.createObjectURL(o),a.src=this.coverUrl}this.image=a,this.artwork.prepend(a)}destroy(){this.revokeCover(),this.element.remove()}revokeCover(){var e,r;(e=this.image)==null||e.removeAttribute("src"),(r=this.image)==null||r.remove(),this.image=null,this.coverUrl&&URL.revokeObjectURL(this.coverUrl),this.coverUrl=null}updateMetadata(){var n;const e=this.options.audio;this.title.textContent=(e==null?void 0:e.title)||this.lyrics.title||this.context.descriptor.name||"Audio";const r=[(e==null?void 0:e.artist)||this.lyrics.artist,(e==null?void 0:e.album)||this.lyrics.album].filter(Boolean);this.details.textContent=r.join(" \xB7 ")||(((n=this.context.route)==null?void 0:n.sourceFormat)??this.context.descriptor.extension??"Audio").toUpperCase()}setLyrics(e,r=false){const n=Wu(e);if(!n.lines.some(a=>a.text)||n.lines.length>1e4){this.status.textContent=this.labels.invalid;return}this.lyrics=n,this.activeLine=-1,this.delay=0,this.timing.querySelector("output").textContent="0.0s",this.updateMetadata(),this.lyricButtons=n.lines.map(a=>{const i=this.button("",a.text||"\u266A","pptxv-audio-lyric",()=>{!Number.isFinite(this.media.duration)||this.media.duration<=0||(this.media.currentTime=Math.min(this.media.duration,Math.max(0,a.time+this.delay)),this.sync())});return i.dataset.time=String(a.time),i}),this.lyricList.replaceChildren(...this.lyricButtons),this.lyricList.classList.remove("is-empty"),this.timing.hidden=false,this.status.textContent=r?this.labels.ready:"",this.sync()}showEmpty(){this.lyricList.classList.add("is-empty");const e=G("span","pptxv-audio-empty-icon","\u224B");e.setAttribute("aria-hidden","true"),this.lyricList.append(e,G("p","",this.labels.empty),G("small","",this.labels.hint))}sync(){var o,s;this.element.classList.toggle("is-playing",!this.media.paused&&!this.media.ended);const e=!this.media.paused&&!this.media.ended,r=e?'<path d="M6 5h4v14H6zM14 5h4v14h-4z"/>':'<path d="m8 5 11 7-11 7Z"/>';this.play.innerHTML=`<svg viewBox="0 0 24 24" width="22" height="22" fill="currentColor" aria-hidden="true">${r}</svg>`,this.play.setAttribute("aria-label",e?this.labels.pause:this.labels.play),this.play.title=e?this.labels.pause:this.labels.play;const n=Ju(this.lyrics.lines,this.media.currentTime-this.delay);if(n===this.activeLine)return;const a=this.lyricButtons[this.activeLine];a==null||a.classList.remove("is-active"),a==null||a.removeAttribute("aria-current"),this.activeLine=n;const i=this.lyricButtons[n];if(i){i.classList.add("is-active"),i.setAttribute("aria-current","true");const d=i.offsetTop-(this.lyricList.clientHeight-i.clientHeight)/2,l=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches;(s=(o=this.lyricList).scrollTo)==null||s.call(o,{top:Math.max(0,d),behavior:l?"auto":"smooth"})}}button(e,r,n,a){const i=G("button",n,r);return i.type="button",e&&(i.setAttribute("aria-label",e),i.title=e),i.addEventListener("click",a,{signal:this.signal}),i}fileButton(e,r,n,a){const i=G("span","pptxv-audio-file"),o=G("input",n);return o.type="file",o.accept=r,o.hidden=true,o.setAttribute("aria-label",e),o.addEventListener("change",()=>{var d;const s=(d=o.files)==null?void 0:d[0];o.value="",s&&a(s)},{signal:this.signal}),i.append(this.button(e,e,"pptxv-audio-import",()=>o.click()),o),i}async resolve(e,r){var n;for(const a of e){if(this.signal.aborted)return;const i=await this.options.resourceResolver({family:"audio",sourceFormat:((n=this.context.route)==null?void 0:n.sourceFormat)??this.context.descriptor.extension,source:a,name:a.split("/").pop(),relation:r});if(i!=null)if(typeof i=="object"&&!(i instanceof Blob)&&!(i instanceof ArrayBuffer)&&!ArrayBuffer.isView(i)){if(i.source!==void 0)return i.source}else return i}}async readLyrics(e){let r;if(typeof e=="string"){const n=await fetch(e,{signal:this.signal});if(!n.ok)throw new Error(this.labels.failed);if(Number(n.headers.get("Content-Length"))>La)throw new Error(this.labels.tooLarge);r=await n.blob()}else r=e instanceof Blob?e:new Blob([Ma(e)]);if(r.size>La)throw new Error(this.labels.tooLarge);return typeof r.text=="function"?r.text():new Promise((n,a)=>{const i=new FileReader;i.onload=()=>n(String(i.result)),i.onerror=()=>a(new Error(this.labels.failed)),i.readAsText(r)})}showLyricsError(e){this.status.textContent=e instanceof Error&&e.message===this.labels.tooLarge?e.message:this.labels.failed}}function G(t,e="",r){const n=document.createElement(t);return e&&(n.className=e),r!==void 0&&(n.textContent=r),n}function Ma(t){const e=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t);return new Uint8Array(e).buffer}const Zu={play:'<path d="m9 5 11 7-11 7Z" fill="currentColor" stroke="none"/>',pause:'<path d="M8 5v14M16 5v14" stroke-width="4"/>',backward:'<path d="M3 10a9 9 0 1 1 2 8M3 4v6h6"/><text x="12" y="16" text-anchor="middle" fill="currentColor" stroke="none" font-size="10" font-family="system-ui">5</text>',forward:'<path d="M21 10a9 9 0 1 0-2 8M21 4v6h-6"/><text x="12" y="16" text-anchor="middle" fill="currentColor" stroke="none" font-size="10" font-family="system-ui">5</text>',volume:'<path d="M11 4 6 8H3v8h3l5 4ZM15 8a6 6 0 0 1 0 8M18 4a11 11 0 0 1 0 16"/>',muted:'<path d="M11 4 6 8H3v8h3l5 4ZM16 9l6 6M22 9l-6 6"/>',fullscreen:'<path d="M8 3H3v5M16 3h5v5M3 16v5h5M21 16v5h-5"/>',exitFullscreen:'<path d="M3 8h5V3M21 8h-5V3M8 21v-5H3M16 21v-5h5"/>',zoomIn:'<circle cx="10" cy="10" r="7"/><path d="m15 15 6 6M7 10h6M10 7v6"/>',zoomOut:'<circle cx="10" cy="10" r="7"/><path d="m15 15 6 6M7 10h6"/>',reset:'<path d="M3 10a9 9 0 1 1 2 8M3 4v6h6"/>'};function Xe(t,e,r){t.setAttribute("aria-label",e),t.title=e,t.innerHTML=`<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${Zu[r]}</svg>`}function Ca(t){const e=Math.max(0,Math.floor(Number.isFinite(t)?t:0)),r=Math.floor(e/60),n=String(e%60).padStart(2,"0");return r>=60?`${Math.floor(r/60)}:${String(r%60).padStart(2,"0")}:${n}`:`${r}:${n}`}function Ku(t,e){const{signal:r}=e,n=e.mediaName??"video",a=document.createElement("div");a.className="pptxv-video-controls",a.setAttribute("role","group"),a.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} controls`);const i=document.createElement("div");i.className="panoramav-view-controls",i.setAttribute("role","group"),i.setAttribute("aria-label","Panorama view controls");const o=(M,H,z,Y)=>{const D=document.createElement("button");return D.type="button",Xe(D,H,z),D.addEventListener("click",Y,{signal:r}),M.append(D),D};let s,d=false;const l=document.createElement("input");l.className="pptxv-video-timeline",l.type="range",l.min="0",l.step="0.01",l.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} position`);const u=document.createElement("output");u.className="pptxv-video-time";const f=M=>{u.value=`${Ca(M)} / ${Ca(s.duration)}`,l.setAttribute("aria-valuetext",u.value),l.style.setProperty("--pptxv-video-progress",`${s.duration>0?Math.min(100,M/s.duration*100):0}%`)};l.addEventListener("input",()=>{d=true,f(Number(l.value))},{signal:r}),l.addEventListener("change",()=>{const M=Number(l.value);d=false,e.seek(M)},{signal:r}),l.addEventListener("pointercancel",()=>{d=false},{signal:r}),l.addEventListener("blur",()=>{d=false},{signal:r}),a.append(l);const m=document.createElement("div");m.className="pptxv-video-control-row";const h=o(m,`Play ${n}`,"play",e.togglePlayback),g=o(m,`Rewind ${n} 5 seconds`,"backward",()=>e.seek(s.currentTime-5)),x=o(m,`Forward ${n} 5 seconds`,"forward",()=>e.seek(s.currentTime+5));g.className=x.className="pptxv-video-skip",m.append(u);const S=document.createElement("span");S.className="pptxv-video-control-spacer",m.append(S);const y=document.createElement("div");y.className="pptxv-video-volume";const F=o(y,`Unmute ${n}`,"muted",e.toggleMuted),k=document.createElement("input");k.type="range",k.min="0",k.max="1",k.step="0.01",k.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} volume`),k.addEventListener("input",()=>e.setVolume(Number(k.value)),{signal:r}),y.append(k),m.append(y);const w=document.createElement("select");w.className="pptxv-video-rate",w.setAttribute("aria-label",`${n==="video"?"Video":"Panorama video"} playback speed`),w.title="Playback speed";for(const M of[.5,1,1.5,2]){const H=document.createElement("option");H.value=String(M),H.textContent=`${M}\xD7`,w.append(H)}w.addEventListener("change",()=>e.setPlaybackRate(Number(w.value)),{signal:r}),m.append(w);const T=o(m,"Enter video fullscreen","fullscreen",()=>{e.fullscreen().catch(()=>{T.title="Fullscreen is unavailable in this browser"})});T.disabled=!t.requestFullscreen;const N=()=>{const M=document.fullscreenElement===t;Xe(T,`${M?"Exit":"Enter"} ${n==="video"?"video":"panorama"} fullscreen`,M?"exitFullscreen":"fullscreen"),T.disabled&&(T.title="Fullscreen is unavailable in this browser")};document.addEventListener("fullscreenchange",N,{signal:r}),N(),a.append(m);let I,C;return e.zoom&&e.resetView&&(I=o(i,"Zoom out panorama","zoomOut",()=>{var M;return(M=e.zoom)==null?void 0:M.call(e,-.2)}),C=o(i,"Zoom in panorama","zoomIn",()=>{var M;return(M=e.zoom)==null?void 0:M.call(e,.2)}),o(i,"Reset panorama view","reset",e.resetView),t.append(i)),t.append(a),t.classList.add("pptxv-has-video-controls"),t.tabIndex=0,t.addEventListener("keydown",M=>{if(!(M.altKey||M.ctrlKey||M.metaKey||M.shiftKey||M.target!==t)){switch(M.key.toLowerCase()){case" ":case"k":e.togglePlayback();break;case"arrowleft":e.seek(s.currentTime-5);break;case"arrowright":e.seek(s.currentTime+5);break;case"m":s.audioAvailable&&e.toggleMuted();break;case"f":T.click();break;default:return}M.preventDefault()}},{signal:r}),{addControl(M){m.insertBefore(M,w)},sync(M){const H=!s||s.paused!==M.paused,z=!s||s.audioAvailable!==M.audioAvailable||s.muted!==M.muted||s.volume!==M.volume;s=M,H&&Xe(h,`${s.paused?"Play":"Pause"} ${n}`,s.paused?"play":"pause");const Y=Number.isFinite(s.duration)?Math.max(0,s.duration):0;if(l.max=String(Y||.1),l.disabled=g.disabled=x.disabled=Y<=0,d||(l.value=String(Math.min(s.currentTime,Y)),f(s.currentTime)),z){const D=s.muted||s.volume===0;Xe(F,s.audioAvailable?`${D?"Unmute":"Mute"} ${n}`:"Audio unavailable for this panorama preview",D?"muted":"volume"),F.disabled=k.disabled=!s.audioAvailable,k.hidden=!s.audioAvailable,k.value=String(s.muted?0:s.volume),k.setAttribute("aria-valuetext",`${Math.round(Number(k.value)*100)}%`)}w.value=String(s.playbackRate),I&&(I.disabled=(s.scale??1)<=.5),C&&(C.disabled=(s.scale??1)>=2.4)},remove(){a.remove(),i.remove(),t.classList.remove("pptxv-has-video-controls"),t.removeAttribute("tabindex")}}}function Qu(t,e,r){var d,l;const n=e.controls;e.controls=false;const a=Ku(t,{signal:r,togglePlayback:()=>{e.paused?e.play().catch(()=>{}):e.pause()},seek:u=>{Number.isFinite(e.duration)&&(e.currentTime=Math.max(0,Math.min(u,e.duration)))},toggleMuted:()=>{e.muted=!e.muted,!e.muted&&e.volume===0&&(e.volume=1)},setVolume:u=>{e.volume=u,e.muted=u===0},setPlaybackRate:u=>{e.playbackRate=u},fullscreen:async()=>{var u,f;document.fullscreenElement===t?await((u=document.exitFullscreen)==null?void 0:u.call(document)):await((f=t.requestFullscreen)==null?void 0:f.call(t))}});if(document.pictureInPictureEnabled&&e.requestPictureInPicture){const u=document.createElement("button");u.type="button",u.className="pptxv-video-pip",u.setAttribute("aria-label","Picture in picture"),u.title="Picture in picture",u.innerHTML='<svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="2" y="4" width="20" height="16" rx="2"/><rect x="11" y="11" width="8" height="6" rx="1" fill="currentColor"/></svg>',u.addEventListener("click",()=>{(document.pictureInPictureElement===e?document.exitPictureInPicture():e.requestPictureInPicture()).catch(()=>{u.title="Picture in picture is unavailable for this video"})},{signal:r});const f=()=>{const m=document.pictureInPictureElement===e?"Exit picture in picture":"Picture in picture";u.title=m,u.setAttribute("aria-label",m)};e.addEventListener("enterpictureinpicture",f,{signal:r}),e.addEventListener("leavepictureinpicture",f,{signal:r});for(const m of["loadedmetadata","loadeddata","resize"])e.addEventListener(m,()=>{u.disabled=!e.videoWidth},{signal:r});u.disabled=!e.videoWidth,a.addControl(u)}const i=document.createElement("select");i.className="pptxv-video-rate pptxv-video-captions",i.setAttribute("aria-label","Video subtitles"),i.title="Subtitles";const o=()=>{const u=Array.from(e.textTracks).filter(m=>m.kind==="subtitles"||m.kind==="captions");i.hidden=u.length===0,i.replaceChildren();const f=document.createElement("option");f.value="-1",f.textContent="CC off",i.append(f),u.forEach((m,h)=>{const g=document.createElement("option");g.value=String(h),g.textContent=m.label||m.language||`Subtitles ${h+1}`,i.append(g)}),i.value=String(u.findIndex(m=>m.mode==="showing"))};i.addEventListener("change",()=>{Array.from(e.textTracks).filter(f=>f.kind==="subtitles"||f.kind==="captions").forEach((f,m)=>{f.mode=m===Number(i.value)?"showing":"disabled"})},{signal:r});for(const u of["addtrack","removetrack","change"])(l=(d=e.textTracks).addEventListener)==null||l.call(d,u,o,{signal:r});a.addControl(i),o();const s=()=>a.sync({currentTime:e.currentTime,duration:e.duration,paused:e.paused,muted:e.muted,volume:e.volume,playbackRate:e.playbackRate,audioAvailable:true});for(const u of["loadedmetadata","durationchange","timeupdate","seeked","play","pause","ended","volumechange","ratechange"])e.addEventListener(u,s,{signal:r});r.addEventListener("abort",()=>{a.remove(),e.controls=n},{once:true}),s()}const tp=new Set(["png","jpg","jpeg","gif","webp","avif","apng","ico","svg","bmp"]),ep=new Set(["html","htm","shtml","xhtml","xht","xhtm"]),rp=new Set(["mp4","webm","mov","m4v","ogv","mkv","avi","mpeg","mpg","3gp"]),so=new Set(["mp3","wav","aac","m4a","flac","ogg","oga","opus"]),np={mp4:"video/mp4",webm:"video/webm",mov:"video/quicktime",m4v:"video/x-m4v",ogv:"video/ogg",mkv:"video/x-matroska",avi:"video/x-msvideo",mpeg:"video/mpeg",mpg:"video/mpeg","3gp":"video/3gpp",mp3:"audio/mpeg",wav:"audio/wav",aac:"audio/aac",m4a:"audio/mp4",flac:"audio/flac",ogg:"audio/ogg",oga:"audio/ogg",opus:"audio/opus"},ap=new Set(["txt","log","text"]),ip=new Set(["js","jsx","mjs","cjs","ts","tsx","mts","cts","vue","css","scss","sass","less","json","xml","yaml","yml","toml","ini","rst","rest","adoc","asciidoc","asc","tex","latex","ltx","sty","cls","properties","env","conf","config","cfg","cnf","c","cpp","cc","cxx","h","hpp","hh","hxx","cs","go","java","kt","kts","lua","php","py","rb","rs","sh","bat","cmd","ps1","sql","swift","jsonc","json5","gql","graphql","proto","diff","patch","gitignore","dockerignore","editorconfig","r","dart","scala","groovy","gradle","pl","ex","erl","fs","fsi","fsx","vb","clj","hs","jl","zig","m","matlab","svelte","astro","mdx","tf","tfvars","hcl","rego","bicep","prisma","dockerfile","cmake","make","mk","bash","zsh","fish","csproj","vbproj","fsproj","props","targets","sln","cshtml","razor","mustache","hbs","liquid","jinja","twig","ejs","erb","haml","slim","mermaid","mmd","puml","avsc","sol","move","nim","cr","ml","mli","elm","rkt","lisp","scm","asm","s","cu","cuh","d","pas","adb","ads","cob","cbl","f90","f95","vhd","vhdl","sv","svh","ino","glsl","vert","frag","wgsl","hlsl","rmd","qmd","bib","nix","cue","dhall","org","wiki","mediawiki","textile","pod","man","roff","nfo","npmrc","yarnrc","gitattributes","gitmodules","md","markdown","mkd","mkdn","mdown"]),op=2e5,sp=new Set("bash cmake conf config cfg cnf dockerfile env fish hcl make mk nix npmrc pl powershell py qmd r rb rego sh toml yaml yarnrc zsh".split(" ")),Ea=new Set("ada haskell hs lua sql".split(" ")),cp=new Set("asm clj ini lisp scm".split(" ")),lp=new Set("asciidoc markdown mdx restructuredtext roff textile wiki xml".split(" ")),dp=new Set(`abstract and as async await begin break by case catch class const continue crate create def default defer delete do
12
12
  drop elif else end enum ensure except export extends false final finally fn for foreach from fun func get global go
13
13
  group having if implements import in include inner insert instanceof interface into is join lambda left let limit loop
14
14
  map match mod move mut namespace new nil nonlocal not null of on operator or order outer override package pass private
15
15
  protected public raise readonly ref return right select self set static struct super switch table then this throw trait
16
- true try type typeof undefined union unsafe update use using values var view virtual void when where while with yield`.trim().split(/\s+/)),up=new Set("false infinity nan nil none null true undefined".split(" ")),pp=new Set("any bigint bool boolean byte char date datetime decimal double float int integer long never number object short string symbol unknown void".split(" ")),hp=/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|`(?:\\[\s\S]|[^`\\])*`/.source,fp=/\b(?:0[xX][\dA-Fa-f](?:_?[\dA-Fa-f])*|0[bB][01](?:_?[01])*|0[oO][0-7](?:_?[0-7])*|\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?)n?\b/.source,mp=/[A-Za-z_$][\w$-]*/.source,gp=/[\[\](){}.,;:+*\/%=&|!<>?~^-]+/.source;class fr{constructor(e){E(this,"listeners",{loading:new Set,rendered:new Set,error:new Set,statechange:new Set,warnings:new Set});E(this,"root");E(this,"createdUrl",null);E(this,"elementLoadController",null);this.host=e,this.root=document.createElement("div"),this.root.className="pptxv-native-preview",this.host.replaceChildren(this.root)}async fullscreen(){await Yp(this.root)}destroy(){this.stopElementLoad(),this.revokeCreatedUrl(),this.root.replaceChildren(),this.root.parentElement===this.host&&this.host.replaceChildren();for(const e of Object.values(this.listeners))e.clear()}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}emit(e,r){for(const n of this.listeners[e])n(r)}setLoading(e){e.loading=true,e.error=null,this.emit("loading",e),this.emit("statechange",e)}beginElementLoad(e,r,n){var o,s;this.stopElementLoad();const a=new AbortController;this.elementLoadController=a;const i=()=>a.abort();return a.signal.addEventListener("abort",()=>{var d;(d=r.signal)==null||d.removeEventListener("abort",i),n(),this.revokeCreatedUrl(),this.root.replaceChildren(),e.loading=false,this.elementLoadController===a&&(this.elementLoadController=null,this.emit("statechange",e))},{once:true}),(o=r.signal)==null||o.addEventListener("abort",i,{once:true}),this.setLoading(e),(s=r.signal)!=null&&s.aborted&&a.abort(),a.signal}stopElementLoad(){const e=this.elementLoadController;this.elementLoadController=null,e==null||e.abort()}setError(e,r){const n=r instanceof Error?r:new Error(String(r));throw e.loading=false,e.error=n.message,this.emit("error",n),this.emit("statechange",e),n}sourceToUrl(e,r){if(this.revokeCreatedUrl(),typeof e=="string")return e;const n=e instanceof Blob?e:new Blob([Nn(e)],r?{type:r}:void 0);return this.createdUrl=URL.createObjectURL(n),this.createdUrl}revokeCreatedUrl(){this.createdUrl&&(URL.revokeObjectURL(this.createdUrl),this.createdUrl=null)}}class yp extends fr{constructor(r,n={}){super(r);E(this,"state");E(this,"scale");E(this,"fitMode");E(this,"image",null);E(this,"panDrag",null);E(this,"handlePointerDown",r2=>{var n2,a;r2.pointerType==="touch"||r2.button!==0||!this.image||this.state.loading||this.panDrag||(this.startPanDrag(r2.pointerId,r2.clientX,r2.clientY),(a=(n2=this.root).setPointerCapture)==null||a.call(n2,r2.pointerId),r2.preventDefault())});E(this,"handleWheel",r2=>{if(!this.image||this.state.loading||this.state.error||!Number.isFinite(r2.deltaY))return;r2.preventDefault();const n2=this.root.getBoundingClientRect(),a=r2.deltaY*(r2.deltaMode===1?16:r2.deltaMode===2?this.root.clientHeight:1);this.zoomAt(Math.min(8,Math.max(.1,this.scale*Math.exp(-a*.002))),{x:r2.clientX-n2.left,y:r2.clientY-n2.top})});E(this,"handleMouseDown",r2=>{r2.button!==0||!this.image||this.state.loading||this.panDrag||(this.startPanDrag(-1,r2.clientX,r2.clientY),r2.preventDefault())});E(this,"handlePointerMove",r2=>{this.movePanDrag(r2.pointerId,r2.clientX,r2.clientY)});E(this,"handlePointerEnd",r2=>{!this.panDrag||r2.pointerId!==this.panDrag.pointerId||this.stopPanDrag(r2.pointerId)});E(this,"handleMouseMove",r2=>{!this.panDrag||this.panDrag.pointerId!==-1||this.movePanDrag(-1,r2.clientX,r2.clientY)});E(this,"handleMouseEnd",()=>{!this.panDrag||this.panDrag.pointerId!==-1||this.stopPanDrag()});this.scale=n.initialScale??1,this.fitMode=n.fit??"contain",this.state={loading:false,error:null,family:"image",warnings:[],capabilities:{zoom:true,fit:true,pan:true,rotate:true,fullscreen:true,download:true},scale:this.scale,rotation:0,panX:0,panY:0},this.root.addEventListener("pointerdown",this.handlePointerDown),this.root.addEventListener("mousedown",this.handleMouseDown),this.root.addEventListener("wheel",this.handleWheel,{passive:false})}async load(r,n){var i,o;this.state={...this.state,family:((i=n.route)==null?void 0:i.family)==="panorama"?"panorama":"image",title:n.descriptor.name,naturalWidth:void 0,naturalHeight:void 0};const a=this.beginElementLoad(this.state,n,()=>{var s;this.stopPanDrag(),(s=this.image)==null||s.removeAttribute("src"),this.image=null});try{ae(a);const s=document.createElement("img");s.className="pptxv-native-image",s.alt=n.descriptor.name??"Image preview",s.decoding="async",s.draggable=false,s.addEventListener("dragstart",d=>d.preventDefault(),{signal:a}),s.addEventListener("load",()=>{a.aborted||(this.state.naturalWidth=s.naturalWidth||void 0,this.state.naturalHeight=s.naturalHeight||void 0,this.state.loading=false,this.state.error=null,this.applyImageStyle(),this.emit("rendered",this.state),this.emit("statechange",this.state))},{signal:a}),s.addEventListener("error",()=>{if(a.aborted)return;this.stopElementLoad();const d=new Error("Failed to load image preview.");this.state.loading=false,this.state.error=d.message,this.emit("error",d),this.emit("statechange",this.state)},{signal:a}),this.image=s,s.src=this.sourceToUrl(r,n.descriptor.contentType),this.root.className="pptxv-native-preview pptxv-native-preview--image",this.root.replaceChildren(s),this.applyImageStyle(),Qi(this.root,{getScale:()=>this.state.scale,setScale:(d,l)=>this.zoomAt(d,l),pan:(d,l)=>this.pan(d,l),enabled:()=>!this.state.loading&&!this.state.error,signal:a})}catch(s){if(a.aborted){(o=n.signal)!=null&&o.aborted&&ae(a);return}this.stopElementLoad(),this.setError(this.state,s)}}destroy(){this.stopPanDrag(),this.root.removeEventListener("pointerdown",this.handlePointerDown),this.root.removeEventListener("mousedown",this.handleMouseDown),this.root.removeEventListener("wheel",this.handleWheel),super.destroy()}getState(){return this.state}setScale(r){this.zoomAt(r)}zoomAt(r,n){if(!Number.isFinite(r))return;this.preserveFittedImageSize();const a=Math.max(.05,r);if(n&&this.scale>0){const i=n.x-this.root.clientWidth/2,o=n.y-this.root.clientHeight/2,s=a/this.scale;this.state.panX=i-(i-this.state.panX)*s,this.state.panY=o-(o-this.state.panY)*s}this.scale=a,this.state.scale=this.scale,this.fitMode="none",this.applyImageStyle(),this.emit("statechange",this.state)}fit(r="contain"){this.fitMode=r,r!=="none"&&(this.image&&(this.image.style.width="",this.image.style.height=""),this.state.scale=1,this.scale=1,this.state.panX=0,this.state.panY=0),this.applyImageStyle(),this.emit("statechange",this.state)}rotate(r=90){Number.isFinite(r)&&(this.state.rotation=Xp(this.state.rotation+r),this.applyImageStyle(),this.emit("statechange",this.state))}pan(r,n){!Number.isFinite(r)||!Number.isFinite(n)||(this.preserveFittedImageSize(),this.state.panX=Number((this.state.panX+r).toFixed(3)),this.state.panY=Number((this.state.panY+n).toFixed(3)),this.fitMode="none",this.applyImageStyle(),this.emit("statechange",this.state))}preserveFittedImageSize(){var r;this.fitMode!=="none"&&((r=this.image)!=null&&r.clientWidth)&&this.image.clientHeight&&(this.image.style.width=`${this.image.clientWidth}px`,this.image.style.height=`${this.image.clientHeight}px`)}applyImageStyle(){this.image&&(this.image.style.transform=`translate(${this.state.panX}px, ${this.state.panY}px) rotate(${this.state.rotation}deg) scale(${this.state.scale})`,this.image.style.maxWidth=this.fitMode==="none"||this.fitMode==="height"?"none":"100%",this.image.style.maxHeight=this.fitMode==="none"||this.fitMode==="width"?"none":"100%")}startPanDrag(r,n,a){if(this.panDrag={pointerId:r,x:n,y:a},this.root.classList.add("is-panning"),r===-1){window.addEventListener("mousemove",this.handleMouseMove),window.addEventListener("mouseup",this.handleMouseEnd);return}window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerEnd),window.addEventListener("pointercancel",this.handlePointerEnd)}movePanDrag(r,n,a){if(!this.panDrag||this.panDrag.pointerId!==r)return;const i=n-this.panDrag.x,o=a-this.panDrag.y;this.panDrag={pointerId:r,x:n,y:a},this.pan(i,o)}stopPanDrag(r){var n,a;r!=null&&((a=(n=this.root).releasePointerCapture)==null||a.call(n,r)),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerEnd),window.removeEventListener("pointercancel",this.handlePointerEnd),window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("mouseup",this.handleMouseEnd),this.root.classList.remove("is-panning"),this.panDrag=null}}class xp extends fr{constructor(){super(...arguments);E(this,"loadGeneration",0);E(this,"loadController",null);E(this,"removeAbortListener",null);E(this,"state",{loading:false,error:null,family:"text",warnings:[],capabilities:{search:true,wordWrap:true,lineNumbers:true,codeHighlight:false,download:true},wrap:true,encoding:"utf-8"})}async load(r,n){var l,u,f,m,h,g;const a=++this.loadGeneration;(l=this.loadController)==null||l.abort(),(u=this.removeAbortListener)==null||u.call(this);const i=new AbortController;this.loadController=i;const o=()=>{i.abort(),a===this.loadGeneration&&(this.root.replaceChildren(),this.state.loading=false,this.emit("statechange",this.state))};(f=n.signal)==null||f.addEventListener("abort",o,{once:true});const s=()=>{var x;return(x=n.signal)==null?void 0:x.removeEventListener("abort",o)};this.removeAbortListener=s;const d=((m=n.route)==null?void 0:m.family)==="code";this.state={...this.state,loading:false,error:null,title:n.descriptor.name,family:d?"code":"text",warnings:[],capabilities:{...this.state.capabilities,codeHighlight:d},language:d?Pp((h=n.route)==null?void 0:h.sourceFormat):void 0,lineCount:void 0,wrap:!d},this.root.replaceChildren(),this.setLoading(this.state);try{(g=n.signal)!=null&&g.aborted&&o(),Mr(i.signal);const x=await Tp(r,{...n,signal:i.signal});if(a!==this.loadGeneration)return;Mr(i.signal);const F=Mp(x),y=document.createElement("div");y.className="pptxv-native-text-shell",y.dataset.family=this.state.family,y.dataset.wrap=String(this.state.wrap);const S=document.createElement("div");S.className="pptxv-native-text-body";const k=document.createElement("div");k.className="pptxv-native-text-gutter",k.setAttribute("aria-hidden","true"),k.textContent=Array.from({length:F},(T,N)=>String(N+1)).join(`
17
- `);const w=document.createElement("pre");w.className="pptxv-native-text",w.dataset.family=this.state.family,w.dataset.wrap=String(this.state.wrap),this.state.language&&(w.dataset.language=this.state.language),d&&x.length<=op?(Op(w,x,this.state.language),w.dataset.highlighted="true"):(w.textContent=x,w.dataset.highlighted="false"),S.replaceChildren(k,w),y.replaceChildren(S),this.state.loading=false,this.state.error=null,this.state.lineCount=F,this.root.className="pptxv-native-preview pptxv-native-preview--text",this.root.replaceChildren(y),this.emit("rendered",this.state),this.emit("statechange",this.state)}catch(x){if(a!==this.loadGeneration)return;this.root.replaceChildren(),this.state.loading=false,Mr(i.signal),this.setError(this.state,x)}finally{s(),a===this.loadGeneration&&(this.loadController=null,this.removeAbortListener=null)}}destroy(){var r,n;this.loadGeneration++,(r=this.loadController)==null||r.abort(),this.loadController=null,(n=this.removeAbortListener)==null||n.call(this),this.removeAbortListener=null,this.state.loading=false,super.destroy();for(const a of Object.values(this.listeners))a.clear()}getState(){return this.state}}class vp extends fr{constructor(){super(...arguments);E(this,"frame",null);E(this,"state",{loading:false,error:null,family:"html",warnings:[],capabilities:{search:false,print:true,download:true,fullscreen:true}})}async load(r,n){var i;this.state={...this.state,loading:false,error:null,title:n.descriptor.name,warnings:[]};const a=this.beginElementLoad(this.state,n,()=>{var o;(o=this.frame)==null||o.removeAttribute("src"),this.frame=null});try{ae(a);const o=document.createElement("iframe");o.className="pptxv-native-html-frame",o.title=n.descriptor.name??"HTML preview",o.setAttribute("sandbox","allow-same-origin allow-popups"),o.referrerPolicy="no-referrer",o.addEventListener("load",()=>{a.aborted||(this.state.loading=false,this.state.error=null,this.emit("rendered",this.state),this.emit("statechange",this.state))},{signal:a}),o.addEventListener("error",()=>{if(a.aborted)return;this.stopElementLoad();const s=new Error("Failed to load HTML preview.");this.state.loading=false,this.state.error=s.message,this.emit("error",s),this.emit("statechange",this.state)},{signal:a}),this.frame=o,o.src=this.sourceToHtmlUrl(r,n),this.root.className="pptxv-native-preview pptxv-native-preview--html",this.root.replaceChildren(o)}catch(o){if(a.aborted){(i=n.signal)!=null&&i.aborted&&ae(a);return}this.stopElementLoad(),this.setError(this.state,o)}}getState(){return this.state}sourceToHtmlUrl(r,n){if(typeof r=="string"&&(lo(r)||!$p(r)))return r;this.revokeCreatedUrl();const a=r instanceof Blob?r:new Blob([Cp(r)],{type:n.descriptor.contentType??"text/html"});return this.createdUrl=URL.createObjectURL(a),this.createdUrl}}class bp extends fr{constructor(r,n={}){super(r);E(this,"state",{loading:false,error:null,family:"video",warnings:[],capabilities:{playback:true,timeline:true,volume:true,fullscreen:true,subtitles:true,download:true},currentTime:0,paused:true,muted:false,volume:1});E(this,"media",null);E(this,"audioPlayer",null);this.options=n}async load(r,n){var o,s,d;const a=Ip(n);this.state={...this.state,loading:false,error:null,title:n.descriptor.name,family:a,capabilities:{...this.state.capabilities,fullscreen:a!=="audio",subtitles:a!=="audio"},duration:void 0,currentTime:0,paused:true,playbackRate:1};const i=this.beginElementLoad(this.state,n,()=>this.releaseMedia());try{ae(i);const l=document.createElement(a==="audio"?"audio":"video");this.media=l,l.className=`pptxv-native-media pptxv-native-media--${a==="audio"?"audio":"video"}`,l.controls=true,l.preload="metadata",l instanceof HTMLVideoElement&&(l.playsInline=true),l.muted=this.state.muted,l.volume=this.state.volume;const u=Bp(n);l.dataset.contentType=u??"",l.dataset.sourceFormat=lt(((o=n.route)==null?void 0:o.sourceFormat)??n.descriptor.extension??"");const f=this.sourceToUrl(r,u);let m=false,h;const g=()=>{i.aborted||(this.syncMediaState(l),!m&&(a==="audio"||l.videoWidth>0)&&(m=true,this.state.loading=false,this.emit("rendered",this.state)),this.emit("statechange",this.state))};l.addEventListener("loadedmetadata",g,{signal:i});for(const F of["loadeddata","canplay","resize"])l.addEventListener(F,g,{signal:i});for(const F of["timeupdate","durationchange","seeking","seeked","ended","ratechange"])l.addEventListener(F,()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i});l.addEventListener("play",()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i}),l.addEventListener("pause",()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i}),l.addEventListener("volumechange",()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i});const x=(F=false)=>{if(i.aborted)return;this.stopElementLoad();const y=new Error(F?"The browser cannot decode this video codec. Use a compatible browser or an optional media converter.":u?`Failed to load media preview (${u}). The browser may not support this codec.`:"Failed to load media preview. The browser may not support this codec.");this.state.loading=false,this.state.error=y.message,this.emit("error",y),this.emit("statechange",this.state)};if(l.addEventListener("error",()=>x(),{signal:i}),a!=="audio"){document.addEventListener("visibilitychange",()=>{h=void 0},{signal:i}),l.addEventListener("loadeddata",()=>{l.videoWidth||x(true)},{signal:i}),l.addEventListener("timeupdate",()=>{i.aborted||(document.visibilityState==="hidden"||l.paused||l.seeking||l.ended||l.readyState<3||l.videoWidth>0?h=void 0:!h||l.currentTime<h.time?h={at:performance.now(),time:l.currentTime}:performance.now()-h.at>=1500&&l.currentTime>h.time&&x(true))},{signal:i});for(const F of["pause","seeking","ended"])l.addEventListener(F,()=>{h=void 0},{signal:i})}if(u){const F=document.createElement("source");F.addEventListener("error",()=>x(),{signal:i}),F.src=f,u!=="video/quicktime"&&(F.type=u),l.appendChild(F)}else l.src=f;if(this.root.className=`pptxv-native-preview pptxv-native-preview--${a==="audio"?"audio":"video"}`,this.root.replaceChildren(l),l instanceof HTMLVideoElement&&Qu(this.root,l,i),a==="audio"){const F=new Gu(l,n,this.options,i);this.audioPlayer=F,this.root.replaceChildren(F.element);const y=Ep(r).then(S=>{if(S&&!i.aborted){const k=new Blob([Nn(S.bytes)],{type:S.mimeType});F.setCover(k)}}).catch(()=>{});if(await Promise.all([y,F.loadCompanions()]),i.aborted){(s=n.signal)!=null&&s.aborted&&ae(i);return}}}catch(l){if(i.aborted){(d=n.signal)!=null&&d.aborted&&ae(i);return}this.stopElementLoad(),this.setError(this.state,l)}}getState(){return this.state}syncMediaState(r){this.state.duration=Number.isFinite(r.duration)?r.duration:void 0,this.state.currentTime=r.currentTime||0,this.state.paused=r.paused,this.state.muted=r.muted,this.state.volume=r.volume,this.state.playbackRate=r.playbackRate,this.state.error=null}releaseMedia(){var n;const r=this.media;this.media=null,r&&(r.pause(),r.removeAttribute("src"),r.querySelectorAll("source").forEach(a=>a.removeAttribute("src")),r.load()),this.state.paused=true,(n=this.audioPlayer)==null||n.destroy(),this.audioPlayer=null}}function wp(){return{id:"image",family:"image",supports:t=>tp.has(lt(t)),createSession:(t,e)=>new yp(t,e)}}function Sp(){return{id:"text",family:"text",supports:t=>ap.has(lt(t))||ip.has(lt(t)),createSession:t=>new xp(t)}}function Fp(){return{id:"media",family:"video",supports:t=>rp.has(lt(t))||so.has(lt(t)),createSession:(t,e)=>new bp(t,e)}}function Ap(){return{id:"html",family:"html",supports:t=>ep.has(lt(t)),createSession:t=>new vp(t)}}function kp(){return[wp(),Sp(),Fp(),Ap()]}async function Tp(t,e){if(typeof t=="string"){if(lo(t))return Lp(t);const r=await fetch(t,{signal:e.signal});if(!r.ok)throw new Error(`Failed to load text preview source: ${r.status} ${r.statusText}`.trim());return r.text()}return ArrayBuffer.isView(t)?new TextDecoder().decode($n(t)):t instanceof ArrayBuffer?new TextDecoder().decode(t):t instanceof Blob?t.text():String(t)}function Lp(t){const e=t.indexOf(",");if(e<0)return t;const r=t.slice(0,e).toLowerCase(),n=t.slice(e+1);return r.endsWith(";base64")?new TextDecoder().decode(Uint8Array.from(atob(n),a=>a.charCodeAt(0))):decodeURIComponent(n)}function Mr(t){if(t.aborted)throw new DOMException("Text preview loading aborted.","AbortError")}function ae(t){if(t.aborted)throw new DOMException("Preview loading aborted.","AbortError")}function Mp(t){if(!t)return 0;let e=1;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n===10?e++:n===13&&(e++,t.charCodeAt(r+1)===10&&r++)}return e}function Cp(t){return typeof t=="string"?t:ArrayBuffer.isView(t)?Nn(t):(t instanceof ArrayBuffer,t)}function Nn(t){if(ArrayBuffer.isView(t)){const e=$n(t);if(e.buffer instanceof ArrayBuffer)return e;const r=new Uint8Array(e.byteLength);return r.set(e),r.buffer}return t}function $n(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}async function Ep(t){if(typeof t=="string")return null;if(t instanceof Blob){const n=t.slice(0,Math.min(t.size,524288));return ja(new Uint8Array(await n.arrayBuffer()))}const e=ArrayBuffer.isView(t)?$n(t):new Uint8Array(t),r=ja(e);return r?{mimeType:r.mimeType,bytes:r.bytes.slice()}:null}function ja(t){if(t.length<10||t[0]!==73||t[1]!==68||t[2]!==51)return null;const e=t[3]??0,r=Ra(t[6]??0,t[7]??0,t[8]??0,t[9]??0);if(!Number.isFinite(r)||r<=0)return null;const n=10,a=Math.min(t.length,n+r);let i=n;for(;i+10<=a;){const o=co(t,i,i+4);if(!o||o==="\0\0\0\0")break;const s=e===4?Ra(t[i+4]??0,t[i+5]??0,t[i+6]??0,t[i+7]??0):Rp(t[i+4]??0,t[i+5]??0,t[i+6]??0,t[i+7]??0);if(i+=10,!Number.isFinite(s)||s<=0||i+s>a)break;if(o==="APIC"){const d=t.subarray(i,i+s),l=jp(d);if(l)return l}i+=s}return null}function jp(t){if(!t.length)return null;const e=t[0]??0;let r=1;const n=Na(t,r);if(!n)return null;const a=n.value||"image/jpeg";if(r=n.nextOffset,r>=t.length)return null;r+=1;const i=e===1||e===2?Np(t,r):Na(t,r);if(r=(i==null?void 0:i.nextOffset)??r,r>=t.length)return null;const o=t.subarray(r);return o.length?{mimeType:a,bytes:o}:null}function Ra(t,e,r,n){return(t&127)<<21|(e&127)<<14|(r&127)<<7|n&127}function Rp(t,e,r,n){return t<<24|e<<16|r<<8|n}function co(t,e,r){const n=t.subarray(e,Math.min(r,t.length));let a="";for(const i of n)a+=String.fromCharCode(i);return a}function Na(t,e){let r=e;for(;r<t.length&&t[r]!==0;)r+=1;return r>=t.length?null:{value:co(t,e,r),nextOffset:r+1}}function Np(t,e){let r=e;for(;r+1<t.length;){if(t[r]===0&&t[r+1]===0){const n=t.subarray(e,r);let a="";try{const i=n.length>=2&&(n[0]===255&&n[1]===254||n[0]===254&&n[1]===255);a=new TextDecoder(i?"utf-16":"utf-16le").decode(n)}catch{a=""}return{value:a,nextOffset:r+2}}r+=2}return null}function lo(t){return t.trimStart().toLowerCase().startsWith("data:")}function $p(t){return t.trimStart().startsWith("<")}function Ip(t){var r,n,a,i;if(((r=t.route)==null?void 0:r.family)==="audio"||((n=t.route)==null?void 0:n.family)==="video"||((a=t.route)==null?void 0:a.family)==="panorama-video")return t.route.family;const e=lt(t.descriptor.extension??((i=t.route)==null?void 0:i.sourceFormat));return so.has(e)?"audio":"video"}function Bp(t){var n,a,i;const e=(a=(n=t.descriptor.contentType)==null?void 0:n.split(";",1)[0])==null?void 0:a.trim().toLowerCase();if(e)return e;const r=lt(((i=t.route)==null?void 0:i.sourceFormat)??t.descriptor.extension??"");return np[r]}function Pp(t){const e=lt(t);return e?{adoc:"asciidoc",asc:"asciidoc",ads:"ada",cjs:"javascript",cbl:"cobol",cc:"cpp",cmd:"batch",cls:"tex",cts:"typescript",cnf:"conf",csproj:"xml",cshtml:"cshtml",cuh:"cuda",cxx:"cpp",frag:"glsl",fsproj:"xml",fsi:"fsharp",fsx:"fsharp",h:"c",hh:"cpp",hpp:"cpp",hxx:"cpp",kts:"kt",latex:"tex",ltx:"tex",man:"roff",mdown:"markdown",m:"matlab",mediawiki:"wiki",mkd:"markdown",mkdn:"markdown",mli:"ocaml",mjs:"javascript",mts:"typescript",npmrc:"ini",props:"xml",ps1:"powershell",qmd:"markdown",rmd:"markdown",s:"asm",targets:"xml",svh:"systemverilog",vert:"glsl",vhd:"vhdl",yarnrc:"ini",yml:"yaml",md:"markdown",markdown:"markdown",sln:"text",rest:"restructuredtext",rst:"restructuredtext",sty:"tex",vbproj:"xml"}[e]??e:void 0}function Op(t,e,r){const n=Dp(r),a=document.createDocumentFragment();let i=0;for(const o of e.matchAll(n)){const s=o.index??i;s>i&&a.append(document.createTextNode(e.slice(i,s)));const d=o[0],l=Hp(o.groups,e,s,d);if(l){const u=document.createElement("span");u.className=`pptxv-token pptxv-token--${l}`,u.textContent=d,a.append(u)}else a.append(document.createTextNode(d));i=s+d.length}i<e.length&&a.append(document.createTextNode(e.slice(i))),t.replaceChildren(a)}function Dp(t){const e=["\\/\\*[\\s\\S]*?\\*\\/","<!--[\\s\\S]*?-->"];return sp.has(t??"")&&e.push("#[^\\r\\n]*"),Ea.has(t??"")&&e.push("--[^\\r\\n]*"),cp.has(t??"")&&e.push(";[^\\r\\n]*"),!lp.has(t??"")&&!Ea.has(t??"")&&e.push("\\/\\/[^\\r\\n]*"),new RegExp(`(?<comment>${e.join("|")})|(?<string>${hp})|(?<number>${fp})|(?<identifier>${mp})|(?<operator>${gp})`,"g")}function Hp(t,e,r,n){if(t!=null&&t.comment)return"comment";if(t!=null&&t.string)return"string";if(t!=null&&t.number)return"number";if(t!=null&&t.operator)return"operator";if(!(t!=null&&t.identifier))return;const a=n.toLowerCase();if(up.has(a))return"literal";if(dp.has(a))return"keyword";if(pp.has(a)||/^[A-Z][A-Za-z0-9_$]*$/.test(n))return"type";const i=zp(e,r-1),o=Up(e,r+n.length);if(e[r-1]==="<"||e[r-2]==="<"&&e[r-1]==="/")return"tag";if(o==="(")return"function";if(i==="."||o===":")return"property"}function zp(t,e){for(;e>=0&&/\s/.test(t[e]);)e-=1;return t[e]}function Up(t,e){for(;e<t.length&&/\s/.test(t[e]);)e+=1;return t[e]}function Xp(t){const e=t%360;return e<0?e+360:e}async function Yp(t){const e=document.fullscreenElement;if(e===t&&document.exitFullscreen){await document.exitFullscreen();return}!e&&t.requestFullscreen&&await t.requestFullscreen()}class qp{constructor(e,r={}){E(this,"viewer");E(this,"fontPresentation",null);E(this,"fontAnalysis",Le([]));E(this,"fontLoading");E(this,"listeners",{loading:new Set,rendered:new Set,error:new Set,statechange:new Set,warnings:new Set});E(this,"unsubscribeViewerEvents");this.host=e,this.viewer=mu(e,Jp(r)),this.unsubscribeViewerEvents=[this.viewer.on("rendered",n=>{this.emit("rendered",this.toState(n)),this.emit("statechange",this.toState(n))}),this.viewer.on("error",n=>{this.emit("error",n),this.emit("statechange",this.getState())}),this.viewer.on("slidechange",n=>{this.emit("statechange",this.toState(n))}),this.viewer.on("scalechange",n=>{this.emit("statechange",this.toState(n))}),this.viewer.on("warnings",()=>{this.emit("warnings",this.getState().warnings)})],this.fontLoading=qu(this,e.ownerDocument,r)}async load(e,r){var a;this.fontLoading.reset(r.signal,((a=r.route)==null?void 0:a.targetFormat)??r.descriptor.extension??"pptx");const n=this.viewer.preview(e);this.emit("loading",this.getState()),this.emit("statechange",this.getState()),await n}destroy(){this.fontLoading.destroy();for(const e of this.unsubscribeViewerEvents)e();this.viewer.destroy(),this.fontPresentation=null,this.fontAnalysis=Le([])}getState(){return this.toState(this.viewer.getState())}getFontReferences(){var e;return Nu(((e=this.fontPresentation)==null?void 0:e.slides)??[])}refreshFonts(e){var r,n;this.fontPresentation&&($u(this.fontPresentation.slides,e.references),this.fontAnalysis=_u(e,this.host.ownerDocument),(e.loaded.length||e.relayout)&&((n=(r=this.viewer).refreshFonts)==null||n.call(r)),this.emit("warnings",this.getState().warnings),this.emit("statechange",this.getState()))}toState(e){return e.presentation!==this.fontPresentation&&(this.fontPresentation=e.presentation,this.fontAnalysis=Le(e.presentation?Bu(e.presentation.slides):[],this.host.ownerDocument)),{...Wp(e),fonts:this.fontAnalysis.fonts.map(r=>({...r,classification:r.classification?{...r.classification}:void 0})),warnings:[...new Set([...e.warnings,...this.fontAnalysis.warnings])]}}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}setScale(e){this.viewer.setScale(e)}fit(e){this.viewer.fit(uo(e))}async fullscreen(){const e=document.fullscreenElement;if(e===this.host&&document.exitFullscreen){await document.exitFullscreen();return}!e&&this.host.requestFullscreen&&await this.host.requestFullscreen()}goToPage(e){this.viewer.goToSlide(e)}next(){this.viewer.next()}prev(){this.viewer.prev()}emit(e,r){for(const n of this.listeners[e])n(r)}}function _p(){return{id:"pptx",family:"paged",supports:t=>t.trim().replace(/^\./,"").toLowerCase()==="pptx",createSession:(t,e)=>new qp(t,e)}}function Wp(t){var e,r;return{loading:t.loading,error:t.error,title:(r=(e=t.presentation)==null?void 0:e.slides[t.currentSlide])==null?void 0:r.title,family:"paged",warnings:t.warnings,capabilities:{zoom:true,fit:true,paged:true,thumbnails:true,fullscreen:true,download:true},pageIndex:t.currentSlide,pageCount:t.slideCount,scale:t.scale,fit:t.fit}}function Jp(t){return{fit:uo(t.fit),initialScale:t.initialScale,minScale:t.minScale,maxScale:t.maxScale,virtual:t.virtual}}function uo(t){if(t==="contain"||t==="width"||t==="none")return t;if(t==="height")return"contain"}class Vp{constructor(e={}){E(this,"drivers",new Map);E(this,"routes");this.routes=e.routes;for(const r of e.drivers??[])this.register(r)}register(e){this.drivers.set(e.id,e)}unregister(e){this.drivers.delete(e)}getDriver(e){return this.drivers.get(e)}listDrivers(){return[...this.drivers.values()]}resolve(e){const r=Su(e,{routes:this.routes});return r?{route:r,driver:this.drivers.get(r.driverId)}:null}}function Gp(t){return new Vp(t)}function Zp(t,e,r,n){const a=t.ownerDocument,i=a.createElement("div");i.className="filens-attachments-shell";const o=a.createElement("div");o.className="filens-attachments-document",i.append(o),t.replaceChildren(i);const s=n(o),d=e.containerContext??to(),l=e.translate??(P=>P),u=new Map,f=[],m=new Set;let h,g,x,F,y,S=[],k,w,T=[],N=[];const I=()=>x?{...x.getState(),loading:false,error:null}:{...s.getState(),warnings:[...s.getState().warnings,...T]},C=(P,j)=>{for(const O of u.get(P)??[])O(j)};for(const P of["loading","rendered","statechange","error","warnings"])f.push(s.on(P,j=>{g||C(P,j)}));const M=()=>{g==null||g.abort(),g=void 0,S.splice(0).forEach(j=>j()),x==null||x.destroy(),x=void 0,F==null||F.remove(),F=void 0,o.hidden=false,y&&(y.hidden=false);const P=w;w=void 0,P!=null&&P.isConnected&&P.focus({preventScroll:true}),C("statechange",I())},H=(P,j)=>{const O=a.createElement("button");return O.type="button",O.textContent=P,O.addEventListener("click",j),O},z=async(P,j)=>{const O=await Je(P.source,{signal:j});j==null||j.throwIfAborted();const $=URL.createObjectURL(new Blob([new Uint8Array(O).buffer],{type:P.contentType??"application/octet-stream"}));m.add($);const q=a.createElement("a");q.href=$,q.download=P.name??"attachment.bin",q.click(),setTimeout(()=>{m.delete($)&&URL.revokeObjectURL($)},1e3)},Y=async(P,j=false)=>{if(!h||h.signal.aborted)return;const O=w??(a.activeElement instanceof HTMLElement?a.activeElement:void 0);M(),w=O;const $=new AbortController;g=$;const q=()=>$.abort(),V=h.signal;V.addEventListener("abort",q,{once:true}),$.signal.addEventListener("abort",()=>V.removeEventListener("abort",q),{once:true});const Z=()=>g===$&&!$.signal.aborted;o.hidden=true,y&&(y.hidden=true),F=a.createElement("div"),F.className="filens-attachment-panel";const st=a.createElement("div");st.className="filens-attachment-navigation";const bt=H(l("Back to document"),M),dt=a.createElement("span");dt.textContent=`${k??l("Document")} \u203A ${P.name}`,st.append(bt,dt);const tt=a.createElement("p");tt.className="filens-attachment-status",tt.setAttribute("role","status"),tt.textContent=l("Loading preview...");const At=a.createElement("div");At.className="filens-attachment-preview",F.append(st,tt,At),i.append(F);const ct=pt=>{if(Z()){if(ge(pt)==="password_cancelled"){M();return}tt.hidden=false,tt.textContent=pt.message,tt.setAttribute("role","alert")}};let et;const ut=async()=>{if(et)return et;try{return await qt(P.read($.signal),$.signal)}catch(pt){if($.signal.throwIfAborted(),ge(pt)||!P.readRaw)throw pt;return qt(P.readRaw($.signal),$.signal)}};st.append(H(l("Download attachment"),()=>{ut().then(pt=>z(pt,$.signal)).catch(ct)})),st.append(H(l("Retry"),()=>{Y(P)})),bt.focus({preventScroll:true});try{const pt=j?d:yu(d);if(et=j?await ut():await qt(P.read($.signal),$.signal),!Z())return;if(!j&&et.name&&(We(et.name)||/\.(rar|zip)$/i.test(et.name)&&N.some(_=>_!==P&&(We(_.name)||/\.bin$/i.test(_.name))))){const _=[{...et,name:et.name}];for(const ht of N)if(!(ht===P||!We(ht.name)&&!/\.(rar|zip|bin)$/i.test(ht.name)))try{const wt=await qt(ht.read($.signal),$.signal);wt.name&&_.push({...wt,name:wt.name})}catch(wt){if($.signal.throwIfAborted(),ge(wt)||wt instanceof Error&&/limit/.test(wt.message))throw wt}const it=ju(et.name,_);it&&(et={...it.primary,archiveVolumes:it.files.slice(1).map(ht=>({name:ht.name,source:ht.source}))})}if(dt.textContent=`${k??l("Document")} \u203A ${et.name??P.name}`,j){await z(et,$.signal),Z()&&M();return}if(!e.previewerFactory)throw new Error(l("No previewer is configured for this attachment."));if(x=e.previewerFactory(At,{...e,containerContext:pt}),S=[x.on("error",ct),x.on("statechange",()=>{Z()&&C("statechange",I())}),x.on("warnings",_=>{Z()&&C("warnings",_)}),x.on("rendered",()=>{Z()&&C("rendered",I())})],await qt(x.preview(et),$.signal),!Z())return;x.getState().error?ct(new Error(x.getState().error)):tt.hidden=true,C("statechange",I())}catch(pt){ct(pt instanceof Error?pt:new Error(String(pt))),Z()&&C("statechange",I())}},D={async load(P,j){h==null||h.abort(),M(),y==null||y.remove(),y=void 0,T=[],N=[];const O=new AbortController;h=O;const $=O.signal,q=j.signal,V=()=>O.abort();q==null||q.addEventListener("abort",V,{once:true}),$.addEventListener("abort",()=>q==null?void 0:q.removeEventListener("abort",V),{once:true}),q!=null&&q.aborted&&h.abort(),k=j.descriptor.name,await s.load(P,{...j,signal:$}),$.throwIfAborted();try{const Z=N=await qt(s.getAttachments?s.getAttachments():["docx","xlsx","pptx"].includes(r)?Lu(await Je(P,{signal:$}),d,$):Promise.resolve([]),$);if($.throwIfAborted(),!Z.length)return;y=a.createElement("details"),y.className="filens-attachments";const st=a.createElement("summary");st.textContent=`${l("Attachments")} (${Z.length})`,y.append(st);const bt=a.createElement("ul");for(const dt of Z){const tt=a.createElement("li");tt.append(H(dt.name,()=>{Y(dt)}),H(l("Download attachment"),()=>{Y(dt,true)})),bt.append(tt)}y.append(bt),i.prepend(y)}catch(Z){if($.aborted)throw Z;T=[l("Some document attachments could not be read.")],C("warnings",I().warnings),C("statechange",I())}},getState:I,on(P,j){let O=u.get(P);return O||u.set(P,O=new Set),O.add(j),()=>O.delete(j)},destroy(){h==null||h.abort(),M(),f.splice(0).forEach(P=>P()),u.clear(),s.destroy();for(const P of m)URL.revokeObjectURL(P);m.clear(),i.remove()}};return new Proxy(s,{get(P,j){if(j in D)return Reflect.get(D,j);const O=x&&j in x?x:P,$=Reflect.get(O,j);return typeof $=="function"?$.bind(O):$}})}class In{constructor(e,r={}){E(this,"registry");E(this,"converter");E(this,"previewOptions");E(this,"listeners",{loading:new Set,rendered:new Set,error:new Set,statechange:new Set,warnings:new Set});E(this,"activeSession",null);E(this,"activeUnsubscribes",[]);E(this,"activeAbortController",null);E(this,"requestToken",0);E(this,"state",Ye());this.host=e,this.registry=r.registry??Gp({drivers:r.drivers??Kp(),routes:r.routes}),this.converter=r.converter,this.previewOptions={containerContext:r.containerContext,translate:r.translate,requestPassword:r.requestPassword,fit:r.fit,initialScale:r.initialScale,minScale:r.minScale,maxScale:r.maxScale,virtual:r.virtual,fontResolver:r.fontResolver,fontLoading:r.fontLoading,resourceResolver:r.resourceResolver,audio:r.audio,previewerFactory:r.previewerFactory??((n,a)=>new In(n,{...a,registry:this.registry,converter:this.converter}))}}async preview(e,r={}){const n=++this.requestToken,a=this.activeAbortController,i=typeof AbortController<"u"?new AbortController:null;this.activeAbortController=i;try{try{this.clearSession()}finally{a==null||a.abort()}if(n!==this.requestToken)return;let o=$a(e,r);if((!this.previewOptions.containerContext||this.previewOptions.containerContext.depth===0)&&(this.previewOptions.containerContext=to()),this.setState({...Ye(),loading:true}),this.emit("loading",this.state),n!==this.requestToken)return;let s=0;for(;;)try{const d=await Cr(this.resolveLoadTarget(o,n,i==null?void 0:i.signal),i==null?void 0:i.signal);if(n!==this.requestToken||!d)return;const l=d.route.targetFormat,u=["docx","xlsx","pptx","pdf"].includes(l)?Zp(this.host,this.previewOptions,l,f=>d.driver.createSession(f,this.previewOptions)):d.driver.createSession(this.host,this.previewOptions);if(n!==this.requestToken){u.destroy();return}if(this.activeSession=u,this.bindSession(u,n),n!==this.requestToken||(await Cr(u.load(d.descriptor.source,{descriptor:d.descriptor,route:d.route,signal:i==null?void 0:i.signal}),i==null?void 0:i.signal),n!==this.requestToken))return;this.setState(this.getState());break}catch(d){const l=ge(d);if(n!==this.requestToken||i!=null&&i.signal.aborted)return;if(!l||l==="password_cancelled"||!this.previewOptions.requestPassword)throw d;if(this.clearSession(),n!==this.requestToken||(this.setState({...Ye(),loading:true}),this.emit("statechange",this.state),n!==this.requestToken))return;const u=await Cr(Promise.resolve(this.previewOptions.requestPassword({name:o.name,reason:l,attempt:++s,signal:i==null?void 0:i.signal})),i==null?void 0:i.signal);if(n!==this.requestToken)return;if(u===null)throw new ie("password_cancelled");o={...o,password:u}}}catch(o){if(n!==this.requestToken||i!=null&&i.signal.aborted)return;const s=o instanceof Error?o:new Error(String(o)),d={...this.getState(),loading:false,error:s.message};try{this.clearSession()}finally{i==null||i.abort()}if(n!==this.requestToken)return;this.activeAbortController=null,this.setState(d),this.emit("error",s)}}destroy(){const e=++this.requestToken,r=this.activeAbortController;this.activeAbortController=null;try{this.clearSession()}finally{r==null||r.abort(),e===this.requestToken&&this.setState(Ye())}}getState(){var e;return this.state.error?this.state:((e=this.activeSession)==null?void 0:e.getState())??this.state}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}setScale(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setScale)==null||n.call(r,e)}fit(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.fit)==null||n.call(r,e)}rotate(e=90){var r,n;(n=(r=this.activeSession)==null?void 0:r.rotate)==null||n.call(r,e)}pan(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.pan)==null||a.call(n,e,r)}async fullscreen(){var e,r;await((r=(e=this.activeSession)==null?void 0:e.fullscreen)==null?void 0:r.call(e))}goToPage(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.goToPage)==null||n.call(r,e)}next(){var e,r;(r=(e=this.activeSession)==null?void 0:e.next)==null||r.call(e)}prev(){var e,r;(r=(e=this.activeSession)==null?void 0:e.prev)==null||r.call(e)}setActiveLayers(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setActiveLayers)==null||n.call(r,e)}toggleLayer(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.toggleLayer)==null||a.call(n,e,r)}selectNode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.selectNode)==null||n.call(r,e)}setNodeVisibility(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.setNodeVisibility)==null||a.call(n,e,r)}toggleNodeVisibility(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.toggleNodeVisibility)==null||a.call(n,e,r)}setExplode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setExplode)==null||n.call(r,e)}setActiveMaterial(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setActiveMaterial)==null||n.call(r,e)}setMeasurementActive(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setMeasurementActive)==null||n.call(r,e)}clearMeasurement(){var e,r;(r=(e=this.activeSession)==null?void 0:e.clearMeasurement)==null||r.call(e)}setMeasurementSnapMode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setMeasurementSnapMode)==null||n.call(r,e)}setMeasurementAxisLock(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setMeasurementAxisLock)==null||n.call(r,e)}setSectionActive(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionActive)==null||n.call(r,e)}setSectionMode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionMode)==null||n.call(r,e)}setSectionAxis(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionAxis)==null||n.call(r,e)}setSectionOffset(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionOffset)==null||n.call(r,e)}setSectionRange(e,r,n){var a,i;(i=(a=this.activeSession)==null?void 0:a.setSectionRange)==null||i.call(a,e,r,n)}clearSection(){var e,r;(r=(e=this.activeSession)==null?void 0:e.clearSection)==null||r.call(e)}setCameraProjection(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setCameraProjection)==null||n.call(r,e)}setCameraViewPreset(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setCameraViewPreset)==null||n.call(r,e)}setDisplayMode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setDisplayMode)==null||n.call(r,e)}setSnapshotBackground(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSnapshotBackground)==null||n.call(r,e)}downloadSnapshot(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.downloadSnapshot)==null||a.call(n,e,r)}async resolveLoadTarget(e,r,n){var u,f,m;const a=this.registry.resolve(e);if(!a)throw new Error(`Unsupported preview format${rh(e)}.`);let i=false;if(!((u=a.route.conversion)!=null&&u.required)&&["docx","xlsx","pptx"].includes(a.route.sourceFormat)){const h=await Je(e.source,{signal:n});if(r!==this.requestToken)return null;e.source=h,i=[208,207,17,224,161,177,26,225].every((g,x)=>h[x]===g)}if(!((f=a.route.conversion)!=null&&f.required)&&!i){if(!a.driver)throw new Error(`No preview driver registered for ${a.route.driverId} (${Er(a.route)}).`);return{descriptor:e,driver:a.driver,route:a.route}}if(!this.converter)throw new Error(`No converter is configured for ${Er(a.route)}${nh(a.route)}.`);const o={descriptor:e,route:a.route,signal:n},s=await this.converter.convert({source:e.source,sourceFormat:a.route.sourceFormat,targetFormat:a.route.targetFormat,name:e.name,password:e.password},o);if(r!==this.requestToken)return null;const d=$a(s.source,{name:e.name,extension:s.format,contentType:s.contentType}),l=this.registry.resolve(d);if(!(l!=null&&l.driver))throw new Error(`No preview driver registered for converted ${s.format} output (${Er(a.route)}; expected driver ${a.route.driverId}).`);return(m=s.warnings)!=null&&m.length&&this.emit("warnings",s.warnings),{descriptor:d,driver:l.driver,route:l.route}}bindSession(e,r){const n=()=>r===this.requestToken&&e===this.activeSession,a=(i,o)=>{if(!n())return;const s=e.on(i,d=>{n()&&o(d)});n()?this.activeUnsubscribes.push(s):s()};a("loading",i=>this.setStateAndEmit("loading",i)),a("rendered",i=>this.setStateAndEmit("rendered",i)),a("statechange",i=>this.setStateAndEmit("statechange",i)),a("warnings",i=>this.emit("warnings",i)),a("error",i=>{ge(i)||(this.setState({...this.getState(),loading:false,error:i.message}),this.emit("error",i))})}setStateAndEmit(e,r){this.setState(r),this.emit(e,r)}setState(e){this.state=e}clearSession(){const e=this.activeUnsubscribes,r=this.activeSession;this.activeUnsubscribes=[],this.activeSession=null;for(const n of e)n();r==null||r.destroy()}emit(e,r){const n=this.requestToken;for(const a of this.listeners[e]){if(n!==this.requestToken)break;a(r)}}}function lh(t,e){return new In(t,e)}function Kp(){return[_p(),...kp()]}function dh(t=[]){return[...t,...eo]}function $a(t,e={}){if(Qp(t)){const n=e.name??t.name;return{...t,...e,name:n,extension:e.extension??t.extension??ir(n),contentType:e.contentType??t.contentType,size:e.size??t.size}}const r=e.name??th(t);return{source:t,...e,name:r,extension:e.extension??ir(r),contentType:e.contentType,size:e.size??eh(t)}}function Ye(){return{loading:false,error:null,family:"unsupported",warnings:[],capabilities:{}}}function Qp(t){return!!(t&&typeof t=="object"&&"source"in t)}function th(t){if(typeof t=="string")return t;if(typeof File<"u"&&t instanceof File)return t.name}function eh(t){if(t instanceof ArrayBuffer||t instanceof Uint8Array)return t.byteLength;if(typeof Blob<"u"&&t instanceof Blob)return t.size}function Cr(t,e){return e?new Promise((r,n)=>{const a=()=>n(Object.assign(new Error("Preview load aborted."),{name:"AbortError"}));t.then(i=>{e.removeEventListener("abort",a),r(i)},i=>{e.removeEventListener("abort",a),n(i)}),e.aborted?a():e.addEventListener("abort",a,{once:true})}):t}function rh(t){const e=t.extension?`.${t.extension}`:void 0,r=t.contentType,a=[t.name,e,r].filter(Boolean);return a.length?` for ${a.join(" / ")}`:""}function Er(t){return`${t.sourceFormat} -> ${t.targetFormat}, family ${t.family}, driver ${t.driverId}`}function nh(t){var e;return(e=t.conversion)!=null&&e.reason?`: ${t.conversion.reason}`:""}export{Eu as A,Zc as B,Fp as C,eo as D,Mu as E,Qr as F,_p as G,Sp as H,Ap as I,lh as J,Qu as K,Li as M,ne as P,qu as a,Qi as b,dh as c,Le as d,Nu as e,$u as f,_u as g,Bu as h,oh as i,Yc as j,ye as k,sh as l,to as m,yu as n,nn as o,ge as p,ch as q,el as r,ju as s,xu as t,We as u,ie as v,oo as w,vu as x,Ku as y,wp as z};
16
+ true try type typeof undefined union unsafe update use using values var view virtual void when where while with yield`.trim().split(/\s+/)),up=new Set("false infinity nan nil none null true undefined".split(" ")),pp=new Set("any bigint bool boolean byte char date datetime decimal double float int integer long never number object short string symbol unknown void".split(" ")),hp=/"(?:\\[\s\S]|[^"\\])*"|'(?:\\[\s\S]|[^'\\])*'|`(?:\\[\s\S]|[^`\\])*`/.source,fp=/\b(?:0[xX][\dA-Fa-f](?:_?[\dA-Fa-f])*|0[bB][01](?:_?[01])*|0[oO][0-7](?:_?[0-7])*|\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?)n?\b/.source,mp=/[A-Za-z_$][\w$-]*/.source,gp=/[\[\](){}.,;:+*\/%=&|!<>?~^-]+/.source;class fr{constructor(e){E(this,"listeners",{loading:new Set,rendered:new Set,error:new Set,statechange:new Set,warnings:new Set});E(this,"root");E(this,"createdUrl",null);E(this,"elementLoadController",null);this.host=e,this.root=document.createElement("div"),this.root.className="pptxv-native-preview",this.host.replaceChildren(this.root)}async fullscreen(){await Yp(this.root)}destroy(){this.stopElementLoad(),this.revokeCreatedUrl(),this.root.replaceChildren(),this.root.parentElement===this.host&&this.host.replaceChildren();for(const e of Object.values(this.listeners))e.clear()}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}emit(e,r){for(const n of this.listeners[e])n(r)}setLoading(e){e.loading=true,e.error=null,this.emit("loading",e),this.emit("statechange",e)}beginElementLoad(e,r,n){var o,s;this.stopElementLoad();const a=new AbortController;this.elementLoadController=a;const i=()=>a.abort();return a.signal.addEventListener("abort",()=>{var d;(d=r.signal)==null||d.removeEventListener("abort",i),n(),this.revokeCreatedUrl(),this.root.replaceChildren(),e.loading=false,this.elementLoadController===a&&(this.elementLoadController=null,this.emit("statechange",e))},{once:true}),(o=r.signal)==null||o.addEventListener("abort",i,{once:true}),this.setLoading(e),(s=r.signal)!=null&&s.aborted&&a.abort(),a.signal}stopElementLoad(){const e=this.elementLoadController;this.elementLoadController=null,e==null||e.abort()}setError(e,r){const n=r instanceof Error?r:new Error(String(r));throw e.loading=false,e.error=n.message,this.emit("error",n),this.emit("statechange",e),n}sourceToUrl(e,r){if(this.revokeCreatedUrl(),typeof e=="string")return e;const n=e instanceof Blob?e:new Blob([Nn(e)],r?{type:r}:void 0);return this.createdUrl=URL.createObjectURL(n),this.createdUrl}revokeCreatedUrl(){this.createdUrl&&(URL.revokeObjectURL(this.createdUrl),this.createdUrl=null)}}class yp extends fr{constructor(r,n={}){super(r);E(this,"state");E(this,"scale");E(this,"fitMode");E(this,"image",null);E(this,"panDrag",null);E(this,"handlePointerDown",r2=>{var n2,a;r2.pointerType==="touch"||r2.button!==0||!this.image||this.state.loading||this.panDrag||(this.startPanDrag(r2.pointerId,r2.clientX,r2.clientY),(a=(n2=this.root).setPointerCapture)==null||a.call(n2,r2.pointerId),r2.preventDefault())});E(this,"handleWheel",r2=>{if(!this.image||this.state.loading||this.state.error||!Number.isFinite(r2.deltaY))return;r2.preventDefault();const n2=this.root.getBoundingClientRect(),a=r2.deltaY*(r2.deltaMode===1?16:r2.deltaMode===2?this.root.clientHeight:1);this.zoomAt(Math.min(8,Math.max(.1,this.scale*Math.exp(-a*.002))),{x:r2.clientX-n2.left,y:r2.clientY-n2.top})});E(this,"handleMouseDown",r2=>{r2.button!==0||!this.image||this.state.loading||this.panDrag||(this.startPanDrag(-1,r2.clientX,r2.clientY),r2.preventDefault())});E(this,"handlePointerMove",r2=>{this.movePanDrag(r2.pointerId,r2.clientX,r2.clientY)});E(this,"handlePointerEnd",r2=>{!this.panDrag||r2.pointerId!==this.panDrag.pointerId||this.stopPanDrag(r2.pointerId)});E(this,"handleMouseMove",r2=>{!this.panDrag||this.panDrag.pointerId!==-1||this.movePanDrag(-1,r2.clientX,r2.clientY)});E(this,"handleMouseEnd",()=>{!this.panDrag||this.panDrag.pointerId!==-1||this.stopPanDrag()});this.scale=n.initialScale??1,this.fitMode=n.fit??"contain",this.state={loading:false,error:null,family:"image",warnings:[],capabilities:{zoom:true,fit:true,pan:true,rotate:true,fullscreen:true,download:true},scale:this.scale,rotation:0,panX:0,panY:0},this.root.addEventListener("pointerdown",this.handlePointerDown),this.root.addEventListener("mousedown",this.handleMouseDown),this.root.addEventListener("wheel",this.handleWheel,{passive:false})}async load(r,n){var i,o;this.state={...this.state,family:((i=n.route)==null?void 0:i.family)==="panorama"?"panorama":"image",title:n.descriptor.name,naturalWidth:void 0,naturalHeight:void 0};const a=this.beginElementLoad(this.state,n,()=>{var s;this.stopPanDrag(),(s=this.image)==null||s.removeAttribute("src"),this.image=null});try{ae(a);const s=document.createElement("img");s.className="pptxv-native-image",s.alt=n.descriptor.name??"Image preview",s.decoding="async",s.draggable=false,s.addEventListener("dragstart",d=>d.preventDefault(),{signal:a}),s.addEventListener("load",()=>{a.aborted||(this.state.naturalWidth=s.naturalWidth||void 0,this.state.naturalHeight=s.naturalHeight||void 0,this.state.loading=false,this.state.error=null,this.applyImageStyle(),this.emit("rendered",this.state),this.emit("statechange",this.state))},{signal:a}),s.addEventListener("error",()=>{if(a.aborted)return;this.stopElementLoad();const d=new Error("Failed to load image preview.");this.state.loading=false,this.state.error=d.message,this.emit("error",d),this.emit("statechange",this.state)},{signal:a}),this.image=s,s.src=this.sourceToUrl(r,n.descriptor.contentType),this.root.className="pptxv-native-preview pptxv-native-preview--image",this.root.replaceChildren(s),this.applyImageStyle(),Qi(this.root,{getScale:()=>this.state.scale,setScale:(d,l)=>this.zoomAt(d,l),pan:(d,l)=>this.pan(d,l),enabled:()=>!this.state.loading&&!this.state.error,signal:a})}catch(s){if(a.aborted){(o=n.signal)!=null&&o.aborted&&ae(a);return}this.stopElementLoad(),this.setError(this.state,s)}}destroy(){this.stopPanDrag(),this.root.removeEventListener("pointerdown",this.handlePointerDown),this.root.removeEventListener("mousedown",this.handleMouseDown),this.root.removeEventListener("wheel",this.handleWheel),super.destroy()}getState(){return this.state}setScale(r){this.zoomAt(r)}zoomAt(r,n){if(!Number.isFinite(r))return;this.preserveFittedImageSize();const a=Math.max(.05,r);if(n&&this.scale>0){const i=n.x-this.root.clientWidth/2,o=n.y-this.root.clientHeight/2,s=a/this.scale;this.state.panX=i-(i-this.state.panX)*s,this.state.panY=o-(o-this.state.panY)*s}this.scale=a,this.state.scale=this.scale,this.fitMode="none",this.applyImageStyle(),this.emit("statechange",this.state)}fit(r="contain"){this.fitMode=r,r!=="none"&&(this.image&&(this.image.style.width="",this.image.style.height=""),this.state.scale=1,this.scale=1,this.state.panX=0,this.state.panY=0),this.applyImageStyle(),this.emit("statechange",this.state)}rotate(r=90){Number.isFinite(r)&&(this.state.rotation=Xp(this.state.rotation+r),this.applyImageStyle(),this.emit("statechange",this.state))}pan(r,n){!Number.isFinite(r)||!Number.isFinite(n)||(this.preserveFittedImageSize(),this.state.panX=Number((this.state.panX+r).toFixed(3)),this.state.panY=Number((this.state.panY+n).toFixed(3)),this.fitMode="none",this.applyImageStyle(),this.emit("statechange",this.state))}preserveFittedImageSize(){var r;this.fitMode!=="none"&&((r=this.image)!=null&&r.clientWidth)&&this.image.clientHeight&&(this.image.style.width=`${this.image.clientWidth}px`,this.image.style.height=`${this.image.clientHeight}px`)}applyImageStyle(){this.image&&(this.image.style.transform=`translate(${this.state.panX}px, ${this.state.panY}px) rotate(${this.state.rotation}deg) scale(${this.state.scale})`,this.image.style.maxWidth=this.fitMode==="none"||this.fitMode==="height"?"none":"100%",this.image.style.maxHeight=this.fitMode==="none"||this.fitMode==="width"?"none":"100%")}startPanDrag(r,n,a){if(this.panDrag={pointerId:r,x:n,y:a},this.root.classList.add("is-panning"),r===-1){window.addEventListener("mousemove",this.handleMouseMove),window.addEventListener("mouseup",this.handleMouseEnd);return}window.addEventListener("pointermove",this.handlePointerMove),window.addEventListener("pointerup",this.handlePointerEnd),window.addEventListener("pointercancel",this.handlePointerEnd)}movePanDrag(r,n,a){if(!this.panDrag||this.panDrag.pointerId!==r)return;const i=n-this.panDrag.x,o=a-this.panDrag.y;this.panDrag={pointerId:r,x:n,y:a},this.pan(i,o)}stopPanDrag(r){var n,a;r!=null&&((a=(n=this.root).releasePointerCapture)==null||a.call(n,r)),window.removeEventListener("pointermove",this.handlePointerMove),window.removeEventListener("pointerup",this.handlePointerEnd),window.removeEventListener("pointercancel",this.handlePointerEnd),window.removeEventListener("mousemove",this.handleMouseMove),window.removeEventListener("mouseup",this.handleMouseEnd),this.root.classList.remove("is-panning"),this.panDrag=null}}class xp extends fr{constructor(){super(...arguments);E(this,"loadGeneration",0);E(this,"loadController",null);E(this,"removeAbortListener",null);E(this,"state",{loading:false,error:null,family:"text",warnings:[],capabilities:{search:true,wordWrap:true,lineNumbers:true,codeHighlight:false,download:true},wrap:true,encoding:"utf-8"})}async load(r,n){var l,u,f,m,h,g;const a=++this.loadGeneration;(l=this.loadController)==null||l.abort(),(u=this.removeAbortListener)==null||u.call(this);const i=new AbortController;this.loadController=i;const o=()=>{i.abort(),a===this.loadGeneration&&(this.root.replaceChildren(),this.state.loading=false,this.emit("statechange",this.state))};(f=n.signal)==null||f.addEventListener("abort",o,{once:true});const s=()=>{var x;return(x=n.signal)==null?void 0:x.removeEventListener("abort",o)};this.removeAbortListener=s;const d=((m=n.route)==null?void 0:m.family)==="code";this.state={...this.state,loading:false,error:null,title:n.descriptor.name,family:d?"code":"text",warnings:[],capabilities:{...this.state.capabilities,codeHighlight:d},language:d?Pp((h=n.route)==null?void 0:h.sourceFormat):void 0,lineCount:void 0,wrap:!d},this.root.replaceChildren(),this.setLoading(this.state);try{(g=n.signal)!=null&&g.aborted&&o(),Mr(i.signal);const x=await Tp(r,{...n,signal:i.signal});if(a!==this.loadGeneration)return;Mr(i.signal);const S=Mp(x),y=document.createElement("div");y.className="pptxv-native-text-shell",y.dataset.family=this.state.family,y.dataset.wrap=String(this.state.wrap);const F=document.createElement("div");F.className="pptxv-native-text-body";const k=document.createElement("div");k.className="pptxv-native-text-gutter",k.setAttribute("aria-hidden","true"),k.textContent=Array.from({length:S},(T,N)=>String(N+1)).join(`
17
+ `);const w=document.createElement("pre");w.className="pptxv-native-text",w.dataset.family=this.state.family,w.dataset.wrap=String(this.state.wrap),this.state.language&&(w.dataset.language=this.state.language),d&&x.length<=op?(Op(w,x,this.state.language),w.dataset.highlighted="true"):(w.textContent=x,w.dataset.highlighted="false"),F.replaceChildren(k,w),y.replaceChildren(F),this.state.loading=false,this.state.error=null,this.state.lineCount=S,this.root.className="pptxv-native-preview pptxv-native-preview--text",this.root.replaceChildren(y),this.emit("rendered",this.state),this.emit("statechange",this.state)}catch(x){if(a!==this.loadGeneration)return;this.root.replaceChildren(),this.state.loading=false,Mr(i.signal),this.setError(this.state,x)}finally{s(),a===this.loadGeneration&&(this.loadController=null,this.removeAbortListener=null)}}destroy(){var r,n;this.loadGeneration++,(r=this.loadController)==null||r.abort(),this.loadController=null,(n=this.removeAbortListener)==null||n.call(this),this.removeAbortListener=null,this.state.loading=false,super.destroy();for(const a of Object.values(this.listeners))a.clear()}getState(){return this.state}}class vp extends fr{constructor(){super(...arguments);E(this,"frame",null);E(this,"state",{loading:false,error:null,family:"html",warnings:[],capabilities:{search:false,print:true,download:true,fullscreen:true}})}async load(r,n){var i;this.state={...this.state,loading:false,error:null,title:n.descriptor.name,warnings:[]};const a=this.beginElementLoad(this.state,n,()=>{var o;(o=this.frame)==null||o.removeAttribute("src"),this.frame=null});try{ae(a);const o=document.createElement("iframe");o.className="pptxv-native-html-frame",o.title=n.descriptor.name??"HTML preview",o.setAttribute("sandbox","allow-same-origin allow-popups"),o.referrerPolicy="no-referrer",o.addEventListener("load",()=>{a.aborted||(this.state.loading=false,this.state.error=null,this.emit("rendered",this.state),this.emit("statechange",this.state))},{signal:a}),o.addEventListener("error",()=>{if(a.aborted)return;this.stopElementLoad();const s=new Error("Failed to load HTML preview.");this.state.loading=false,this.state.error=s.message,this.emit("error",s),this.emit("statechange",this.state)},{signal:a}),this.frame=o,o.src=this.sourceToHtmlUrl(r,n),this.root.className="pptxv-native-preview pptxv-native-preview--html",this.root.replaceChildren(o)}catch(o){if(a.aborted){(i=n.signal)!=null&&i.aborted&&ae(a);return}this.stopElementLoad(),this.setError(this.state,o)}}getState(){return this.state}sourceToHtmlUrl(r,n){if(typeof r=="string"&&(lo(r)||!$p(r)))return r;this.revokeCreatedUrl();const a=r instanceof Blob?r:new Blob([Cp(r)],{type:n.descriptor.contentType??"text/html"});return this.createdUrl=URL.createObjectURL(a),this.createdUrl}}class bp extends fr{constructor(r,n={}){super(r);E(this,"state",{loading:false,error:null,family:"video",warnings:[],capabilities:{playback:true,timeline:true,volume:true,fullscreen:true,subtitles:true,download:true},currentTime:0,paused:true,muted:false,volume:1});E(this,"media",null);E(this,"audioPlayer",null);this.options=n}async load(r,n){var o,s,d;const a=Ip(n);this.state={...this.state,loading:false,error:null,title:n.descriptor.name,family:a,capabilities:{...this.state.capabilities,fullscreen:a!=="audio",subtitles:a!=="audio"},duration:void 0,currentTime:0,paused:true,playbackRate:1};const i=this.beginElementLoad(this.state,n,()=>this.releaseMedia());try{ae(i);const l=document.createElement(a==="audio"?"audio":"video");this.media=l,l.className=`pptxv-native-media pptxv-native-media--${a==="audio"?"audio":"video"}`,l.controls=true,l.preload="metadata",l instanceof HTMLVideoElement&&(l.playsInline=true),l.muted=this.state.muted,l.volume=this.state.volume;const u=Bp(n);l.dataset.contentType=u??"",l.dataset.sourceFormat=lt(((o=n.route)==null?void 0:o.sourceFormat)??n.descriptor.extension??"");const f=this.sourceToUrl(r,u);let m=false,h;const g=()=>{i.aborted||(this.syncMediaState(l),!m&&(a==="audio"||l.videoWidth>0)&&(m=true,this.state.loading=false,this.emit("rendered",this.state)),this.emit("statechange",this.state))};l.addEventListener("loadedmetadata",g,{signal:i});for(const S of["loadeddata","canplay","resize"])l.addEventListener(S,g,{signal:i});for(const S of["timeupdate","durationchange","seeking","seeked","ended","ratechange"])l.addEventListener(S,()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i});l.addEventListener("play",()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i}),l.addEventListener("pause",()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i}),l.addEventListener("volumechange",()=>{i.aborted||(this.syncMediaState(l),this.emit("statechange",this.state))},{signal:i});const x=(S=false)=>{if(i.aborted)return;this.stopElementLoad();const y=new Error(S?"The browser cannot decode this video codec. Use a compatible browser or an optional media converter.":u?`Failed to load media preview (${u}). The browser may not support this codec.`:"Failed to load media preview. The browser may not support this codec.");this.state.loading=false,this.state.error=y.message,this.emit("error",y),this.emit("statechange",this.state)};if(l.addEventListener("error",()=>x(),{signal:i}),a!=="audio"){document.addEventListener("visibilitychange",()=>{h=void 0},{signal:i}),l.addEventListener("loadeddata",()=>{l.videoWidth||x(true)},{signal:i}),l.addEventListener("timeupdate",()=>{i.aborted||(document.visibilityState==="hidden"||l.paused||l.seeking||l.ended||l.readyState<3||l.videoWidth>0?h=void 0:!h||l.currentTime<h.time?h={at:performance.now(),time:l.currentTime}:performance.now()-h.at>=1500&&l.currentTime>h.time&&x(true))},{signal:i});for(const S of["pause","seeking","ended"])l.addEventListener(S,()=>{h=void 0},{signal:i})}if(u){const S=document.createElement("source");S.addEventListener("error",()=>x(),{signal:i}),S.src=f,u!=="video/quicktime"&&(S.type=u),l.appendChild(S)}else l.src=f;if(this.root.className=`pptxv-native-preview pptxv-native-preview--${a==="audio"?"audio":"video"}`,this.root.replaceChildren(l),l instanceof HTMLVideoElement&&Qu(this.root,l,i),a==="audio"){const S=new Gu(l,n,this.options,i);this.audioPlayer=S,this.root.replaceChildren(S.element);const y=Ep(r).then(F=>{if(F&&!i.aborted){const k=new Blob([Nn(F.bytes)],{type:F.mimeType});S.setCover(k)}}).catch(()=>{});if(await Promise.all([y,S.loadCompanions()]),i.aborted){(s=n.signal)!=null&&s.aborted&&ae(i);return}}}catch(l){if(i.aborted){(d=n.signal)!=null&&d.aborted&&ae(i);return}this.stopElementLoad(),this.setError(this.state,l)}}getState(){return this.state}syncMediaState(r){this.state.duration=Number.isFinite(r.duration)?r.duration:void 0,this.state.currentTime=r.currentTime||0,this.state.paused=r.paused,this.state.muted=r.muted,this.state.volume=r.volume,this.state.playbackRate=r.playbackRate,this.state.error=null}releaseMedia(){var n;const r=this.media;this.media=null,r&&(r.pause(),r.removeAttribute("src"),r.querySelectorAll("source").forEach(a=>a.removeAttribute("src")),r.load()),this.state.paused=true,(n=this.audioPlayer)==null||n.destroy(),this.audioPlayer=null}}function wp(){return{id:"image",family:"image",supports:t=>tp.has(lt(t)),createSession:(t,e)=>new yp(t,e)}}function Fp(){return{id:"text",family:"text",supports:t=>ap.has(lt(t))||ip.has(lt(t)),createSession:t=>new xp(t)}}function Sp(){return{id:"media",family:"video",supports:t=>rp.has(lt(t))||so.has(lt(t)),createSession:(t,e)=>new bp(t,e)}}function Ap(){return{id:"html",family:"html",supports:t=>ep.has(lt(t)),createSession:t=>new vp(t)}}function kp(){return[wp(),Fp(),Sp(),Ap()]}async function Tp(t,e){if(typeof t=="string"){if(lo(t))return Lp(t);const r=await fetch(t,{signal:e.signal});if(!r.ok)throw new Error(`Failed to load text preview source: ${r.status} ${r.statusText}`.trim());return r.text()}return ArrayBuffer.isView(t)?new TextDecoder().decode($n(t)):t instanceof ArrayBuffer?new TextDecoder().decode(t):t instanceof Blob?t.text():String(t)}function Lp(t){const e=t.indexOf(",");if(e<0)return t;const r=t.slice(0,e).toLowerCase(),n=t.slice(e+1);return r.endsWith(";base64")?new TextDecoder().decode(Uint8Array.from(atob(n),a=>a.charCodeAt(0))):decodeURIComponent(n)}function Mr(t){if(t.aborted)throw new DOMException("Text preview loading aborted.","AbortError")}function ae(t){if(t.aborted)throw new DOMException("Preview loading aborted.","AbortError")}function Mp(t){if(!t)return 0;let e=1;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);n===10?e++:n===13&&(e++,t.charCodeAt(r+1)===10&&r++)}return e}function Cp(t){return typeof t=="string"?t:ArrayBuffer.isView(t)?Nn(t):(t instanceof ArrayBuffer,t)}function Nn(t){if(ArrayBuffer.isView(t)){const e=$n(t);if(e.buffer instanceof ArrayBuffer)return e;const r=new Uint8Array(e.byteLength);return r.set(e),r.buffer}return t}function $n(t){return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}async function Ep(t){if(typeof t=="string")return null;if(t instanceof Blob){const n=t.slice(0,Math.min(t.size,524288));return ja(new Uint8Array(await n.arrayBuffer()))}const e=ArrayBuffer.isView(t)?$n(t):new Uint8Array(t),r=ja(e);return r?{mimeType:r.mimeType,bytes:r.bytes.slice()}:null}function ja(t){if(t.length<10||t[0]!==73||t[1]!==68||t[2]!==51)return null;const e=t[3]??0,r=Ra(t[6]??0,t[7]??0,t[8]??0,t[9]??0);if(!Number.isFinite(r)||r<=0)return null;const n=10,a=Math.min(t.length,n+r);let i=n;for(;i+10<=a;){const o=co(t,i,i+4);if(!o||o==="\0\0\0\0")break;const s=e===4?Ra(t[i+4]??0,t[i+5]??0,t[i+6]??0,t[i+7]??0):Rp(t[i+4]??0,t[i+5]??0,t[i+6]??0,t[i+7]??0);if(i+=10,!Number.isFinite(s)||s<=0||i+s>a)break;if(o==="APIC"){const d=t.subarray(i,i+s),l=jp(d);if(l)return l}i+=s}return null}function jp(t){if(!t.length)return null;const e=t[0]??0;let r=1;const n=Na(t,r);if(!n)return null;const a=n.value||"image/jpeg";if(r=n.nextOffset,r>=t.length)return null;r+=1;const i=e===1||e===2?Np(t,r):Na(t,r);if(r=(i==null?void 0:i.nextOffset)??r,r>=t.length)return null;const o=t.subarray(r);return o.length?{mimeType:a,bytes:o}:null}function Ra(t,e,r,n){return(t&127)<<21|(e&127)<<14|(r&127)<<7|n&127}function Rp(t,e,r,n){return t<<24|e<<16|r<<8|n}function co(t,e,r){const n=t.subarray(e,Math.min(r,t.length));let a="";for(const i of n)a+=String.fromCharCode(i);return a}function Na(t,e){let r=e;for(;r<t.length&&t[r]!==0;)r+=1;return r>=t.length?null:{value:co(t,e,r),nextOffset:r+1}}function Np(t,e){let r=e;for(;r+1<t.length;){if(t[r]===0&&t[r+1]===0){const n=t.subarray(e,r);let a="";try{const i=n.length>=2&&(n[0]===255&&n[1]===254||n[0]===254&&n[1]===255);a=new TextDecoder(i?"utf-16":"utf-16le").decode(n)}catch{a=""}return{value:a,nextOffset:r+2}}r+=2}return null}function lo(t){return t.trimStart().toLowerCase().startsWith("data:")}function $p(t){return t.trimStart().startsWith("<")}function Ip(t){var r,n,a,i;if(((r=t.route)==null?void 0:r.family)==="audio"||((n=t.route)==null?void 0:n.family)==="video"||((a=t.route)==null?void 0:a.family)==="panorama-video")return t.route.family;const e=lt(t.descriptor.extension??((i=t.route)==null?void 0:i.sourceFormat));return so.has(e)?"audio":"video"}function Bp(t){var n,a,i;const e=(a=(n=t.descriptor.contentType)==null?void 0:n.split(";",1)[0])==null?void 0:a.trim().toLowerCase();if(e)return e;const r=lt(((i=t.route)==null?void 0:i.sourceFormat)??t.descriptor.extension??"");return np[r]}function Pp(t){const e=lt(t);return e?{adoc:"asciidoc",asc:"asciidoc",ads:"ada",cjs:"javascript",cbl:"cobol",cc:"cpp",cmd:"batch",cls:"tex",cts:"typescript",cnf:"conf",csproj:"xml",cshtml:"cshtml",cuh:"cuda",cxx:"cpp",frag:"glsl",fsproj:"xml",fsi:"fsharp",fsx:"fsharp",h:"c",hh:"cpp",hpp:"cpp",hxx:"cpp",kts:"kt",latex:"tex",ltx:"tex",man:"roff",mdown:"markdown",m:"matlab",mediawiki:"wiki",mkd:"markdown",mkdn:"markdown",mli:"ocaml",mjs:"javascript",mts:"typescript",npmrc:"ini",props:"xml",ps1:"powershell",qmd:"markdown",rmd:"markdown",s:"asm",targets:"xml",svh:"systemverilog",vert:"glsl",vhd:"vhdl",yarnrc:"ini",yml:"yaml",md:"markdown",markdown:"markdown",sln:"text",rest:"restructuredtext",rst:"restructuredtext",sty:"tex",vbproj:"xml"}[e]??e:void 0}function Op(t,e,r){const n=Dp(r),a=document.createDocumentFragment();let i=0;for(const o of e.matchAll(n)){const s=o.index??i;s>i&&a.append(document.createTextNode(e.slice(i,s)));const d=o[0],l=Hp(o.groups,e,s,d);if(l){const u=document.createElement("span");u.className=`pptxv-token pptxv-token--${l}`,u.textContent=d,a.append(u)}else a.append(document.createTextNode(d));i=s+d.length}i<e.length&&a.append(document.createTextNode(e.slice(i))),t.replaceChildren(a)}function Dp(t){const e=["\\/\\*[\\s\\S]*?\\*\\/","<!--[\\s\\S]*?-->"];return sp.has(t??"")&&e.push("#[^\\r\\n]*"),Ea.has(t??"")&&e.push("--[^\\r\\n]*"),cp.has(t??"")&&e.push(";[^\\r\\n]*"),!lp.has(t??"")&&!Ea.has(t??"")&&e.push("\\/\\/[^\\r\\n]*"),new RegExp(`(?<comment>${e.join("|")})|(?<string>${hp})|(?<number>${fp})|(?<identifier>${mp})|(?<operator>${gp})`,"g")}function Hp(t,e,r,n){if(t!=null&&t.comment)return"comment";if(t!=null&&t.string)return"string";if(t!=null&&t.number)return"number";if(t!=null&&t.operator)return"operator";if(!(t!=null&&t.identifier))return;const a=n.toLowerCase();if(up.has(a))return"literal";if(dp.has(a))return"keyword";if(pp.has(a)||/^[A-Z][A-Za-z0-9_$]*$/.test(n))return"type";const i=zp(e,r-1),o=Up(e,r+n.length);if(e[r-1]==="<"||e[r-2]==="<"&&e[r-1]==="/")return"tag";if(o==="(")return"function";if(i==="."||o===":")return"property"}function zp(t,e){for(;e>=0&&/\s/.test(t[e]);)e-=1;return t[e]}function Up(t,e){for(;e<t.length&&/\s/.test(t[e]);)e+=1;return t[e]}function Xp(t){const e=t%360;return e<0?e+360:e}async function Yp(t){const e=document.fullscreenElement;if(e===t&&document.exitFullscreen){await document.exitFullscreen();return}!e&&t.requestFullscreen&&await t.requestFullscreen()}class qp{constructor(e,r={}){E(this,"viewer");E(this,"fontPresentation",null);E(this,"fontAnalysis",Le([]));E(this,"fontLoading");E(this,"listeners",{loading:new Set,rendered:new Set,error:new Set,statechange:new Set,warnings:new Set});E(this,"unsubscribeViewerEvents");this.host=e,this.viewer=mu(e,Jp(r)),this.unsubscribeViewerEvents=[this.viewer.on("rendered",n=>{this.emit("rendered",this.toState(n)),this.emit("statechange",this.toState(n))}),this.viewer.on("error",n=>{this.emit("error",n),this.emit("statechange",this.getState())}),this.viewer.on("slidechange",n=>{this.emit("statechange",this.toState(n))}),this.viewer.on("scalechange",n=>{this.emit("statechange",this.toState(n))}),this.viewer.on("warnings",()=>{this.emit("warnings",this.getState().warnings)})],this.fontLoading=qu(this,e.ownerDocument,r)}async load(e,r){var a;this.fontLoading.reset(r.signal,((a=r.route)==null?void 0:a.targetFormat)??r.descriptor.extension??"pptx");const n=this.viewer.preview(e);this.emit("loading",this.getState()),this.emit("statechange",this.getState()),await n}destroy(){this.fontLoading.destroy();for(const e of this.unsubscribeViewerEvents)e();this.viewer.destroy(),this.fontPresentation=null,this.fontAnalysis=Le([])}getState(){return this.toState(this.viewer.getState())}getFontReferences(){var e;return Nu(((e=this.fontPresentation)==null?void 0:e.slides)??[])}refreshFonts(e){var r,n;this.fontPresentation&&($u(this.fontPresentation.slides,e.references),this.fontAnalysis=_u(e,this.host.ownerDocument),(e.loaded.length||e.relayout)&&((n=(r=this.viewer).refreshFonts)==null||n.call(r)),this.emit("warnings",this.getState().warnings),this.emit("statechange",this.getState()))}toState(e){return e.presentation!==this.fontPresentation&&(this.fontPresentation=e.presentation,this.fontAnalysis=Le(e.presentation?Bu(e.presentation.slides):[],this.host.ownerDocument)),{...Wp(e),fonts:this.fontAnalysis.fonts.map(r=>({...r,classification:r.classification?{...r.classification}:void 0})),warnings:[...new Set([...e.warnings,...this.fontAnalysis.warnings])]}}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}setScale(e){this.viewer.setScale(e)}fit(e){this.viewer.fit(uo(e))}async fullscreen(){const e=document.fullscreenElement;if(e===this.host&&document.exitFullscreen){await document.exitFullscreen();return}!e&&this.host.requestFullscreen&&await this.host.requestFullscreen()}goToPage(e){this.viewer.goToSlide(e)}next(){this.viewer.next()}prev(){this.viewer.prev()}emit(e,r){for(const n of this.listeners[e])n(r)}}function _p(){return{id:"pptx",family:"paged",supports:t=>t.trim().replace(/^\./,"").toLowerCase()==="pptx",createSession:(t,e)=>new qp(t,e)}}function Wp(t){var e,r;return{loading:t.loading,error:t.error,title:(r=(e=t.presentation)==null?void 0:e.slides[t.currentSlide])==null?void 0:r.title,family:"paged",warnings:t.warnings,capabilities:{zoom:true,fit:true,paged:true,thumbnails:true,fullscreen:true,download:true},pageIndex:t.currentSlide,pageCount:t.slideCount,scale:t.scale,fit:t.fit}}function Jp(t){return{fit:uo(t.fit),initialScale:t.initialScale,minScale:t.minScale,maxScale:t.maxScale,virtual:t.virtual}}function uo(t){if(t==="contain"||t==="width"||t==="none")return t;if(t==="height")return"contain"}class Vp{constructor(e={}){E(this,"drivers",new Map);E(this,"routes");this.routes=e.routes;for(const r of e.drivers??[])this.register(r)}register(e){this.drivers.set(e.id,e)}unregister(e){this.drivers.delete(e)}getDriver(e){return this.drivers.get(e)}listDrivers(){return[...this.drivers.values()]}resolve(e){const r=Fu(e,{routes:this.routes});return r?{route:r,driver:this.drivers.get(r.driverId)}:null}}function Gp(t){return new Vp(t)}function Zp(t,e,r,n){const a=t.ownerDocument,i=a.createElement("div");i.className="filens-attachments-shell";const o=a.createElement("div");o.className="filens-attachments-document",i.append(o),t.replaceChildren(i);const s=n(o),d=e.containerContext??to(),l=e.translate??(P=>P),u=new Map,f=[],m=new Set;let h,g,x,S,y,F=[],k,w,T=[],N=[];const I=()=>x?{...x.getState(),loading:false,error:null}:{...s.getState(),warnings:[...s.getState().warnings,...T]},C=(P,j)=>{for(const O of u.get(P)??[])O(j)};for(const P of["loading","rendered","statechange","error","warnings"])f.push(s.on(P,j=>{g||C(P,j)}));const M=()=>{g==null||g.abort(),g=void 0,F.splice(0).forEach(j=>j()),x==null||x.destroy(),x=void 0,S==null||S.remove(),S=void 0,o.hidden=false,y&&(y.hidden=false);const P=w;w=void 0,P!=null&&P.isConnected&&P.focus({preventScroll:true}),C("statechange",I())},H=(P,j)=>{const O=a.createElement("button");return O.type="button",O.textContent=P,O.addEventListener("click",j),O},z=async(P,j)=>{const O=await Je(P.source,{signal:j});j==null||j.throwIfAborted();const $=URL.createObjectURL(new Blob([new Uint8Array(O).buffer],{type:P.contentType??"application/octet-stream"}));m.add($);const q=a.createElement("a");q.href=$,q.download=P.name??"attachment.bin",q.click(),setTimeout(()=>{m.delete($)&&URL.revokeObjectURL($)},1e3)},Y=async(P,j=false)=>{if(!h||h.signal.aborted)return;const O=w??(a.activeElement instanceof HTMLElement?a.activeElement:void 0);M(),w=O;const $=new AbortController;g=$;const q=()=>$.abort(),V=h.signal;V.addEventListener("abort",q,{once:true}),$.signal.addEventListener("abort",()=>V.removeEventListener("abort",q),{once:true});const Z=()=>g===$&&!$.signal.aborted;o.hidden=true,y&&(y.hidden=true),S=a.createElement("div"),S.className="filens-attachment-panel";const st=a.createElement("div");st.className="filens-attachment-navigation";const bt=H(l("Back to document"),M),dt=a.createElement("span");dt.textContent=`${k??l("Document")} \u203A ${P.name}`,st.append(bt,dt);const tt=a.createElement("p");tt.className="filens-attachment-status",tt.setAttribute("role","status"),tt.textContent=l("Loading preview...");const At=a.createElement("div");At.className="filens-attachment-preview",S.append(st,tt,At),i.append(S);const ct=pt=>{if(Z()){if(ge(pt)==="password_cancelled"){M();return}tt.hidden=false,tt.textContent=pt.message,tt.setAttribute("role","alert")}};let et;const ut=async()=>{if(et)return et;try{return await qt(P.read($.signal),$.signal)}catch(pt){if($.signal.throwIfAborted(),ge(pt)||!P.readRaw)throw pt;return qt(P.readRaw($.signal),$.signal)}};st.append(H(l("Download attachment"),()=>{ut().then(pt=>z(pt,$.signal)).catch(ct)})),st.append(H(l("Retry"),()=>{Y(P)})),bt.focus({preventScroll:true});try{const pt=j?d:yu(d);if(et=j?await ut():await qt(P.read($.signal),$.signal),!Z())return;if(!j&&et.name&&(We(et.name)||/\.(rar|zip)$/i.test(et.name)&&N.some(_=>_!==P&&(We(_.name)||/\.bin$/i.test(_.name))))){const _=[{...et,name:et.name}];for(const ht of N)if(!(ht===P||!We(ht.name)&&!/\.(rar|zip|bin)$/i.test(ht.name)))try{const wt=await qt(ht.read($.signal),$.signal);wt.name&&_.push({...wt,name:wt.name})}catch(wt){if($.signal.throwIfAborted(),ge(wt)||wt instanceof Error&&/limit/.test(wt.message))throw wt}const it=ju(et.name,_);it&&(et={...it.primary,archiveVolumes:it.files.slice(1).map(ht=>({name:ht.name,source:ht.source}))})}if(dt.textContent=`${k??l("Document")} \u203A ${et.name??P.name}`,j){await z(et,$.signal),Z()&&M();return}if(!e.previewerFactory)throw new Error(l("No previewer is configured for this attachment."));if(x=e.previewerFactory(At,{...e,containerContext:pt}),F=[x.on("error",ct),x.on("statechange",()=>{Z()&&C("statechange",I())}),x.on("warnings",_=>{Z()&&C("warnings",_)}),x.on("rendered",()=>{Z()&&C("rendered",I())})],await qt(x.preview(et),$.signal),!Z())return;x.getState().error?ct(new Error(x.getState().error)):tt.hidden=true,C("statechange",I())}catch(pt){ct(pt instanceof Error?pt:new Error(String(pt))),Z()&&C("statechange",I())}},D={async load(P,j){h==null||h.abort(),M(),y==null||y.remove(),y=void 0,T=[],N=[];const O=new AbortController;h=O;const $=O.signal,q=j.signal,V=()=>O.abort();q==null||q.addEventListener("abort",V,{once:true}),$.addEventListener("abort",()=>q==null?void 0:q.removeEventListener("abort",V),{once:true}),q!=null&&q.aborted&&h.abort(),k=j.descriptor.name,await s.load(P,{...j,signal:$}),$.throwIfAborted();try{const Z=N=await qt(s.getAttachments?s.getAttachments():["docx","xlsx","pptx"].includes(r)?Lu(await Je(P,{signal:$}),d,$):Promise.resolve([]),$);if($.throwIfAborted(),!Z.length)return;y=a.createElement("details"),y.className="filens-attachments";const st=a.createElement("summary");st.textContent=`${l("Attachments")} (${Z.length})`,y.append(st);const bt=a.createElement("ul");for(const dt of Z){const tt=a.createElement("li");tt.append(H(dt.name,()=>{Y(dt)}),H(l("Download attachment"),()=>{Y(dt,true)})),bt.append(tt)}y.append(bt),i.prepend(y)}catch(Z){if($.aborted)throw Z;T=[l("Some document attachments could not be read.")],C("warnings",I().warnings),C("statechange",I())}},getState:I,on(P,j){let O=u.get(P);return O||u.set(P,O=new Set),O.add(j),()=>O.delete(j)},destroy(){h==null||h.abort(),M(),f.splice(0).forEach(P=>P()),u.clear(),s.destroy();for(const P of m)URL.revokeObjectURL(P);m.clear(),i.remove()}};return new Proxy(s,{get(P,j){if(j in D)return Reflect.get(D,j);const O=x&&j in x?x:P,$=Reflect.get(O,j);return typeof $=="function"?$.bind(O):$}})}class In{constructor(e,r={}){E(this,"registry");E(this,"converter");E(this,"previewOptions");E(this,"listeners",{loading:new Set,rendered:new Set,error:new Set,statechange:new Set,warnings:new Set});E(this,"activeSession",null);E(this,"activeUnsubscribes",[]);E(this,"activeAbortController",null);E(this,"requestToken",0);E(this,"state",Ye());this.host=e,this.registry=r.registry??Gp({drivers:r.drivers??Kp(),routes:r.routes}),this.converter=r.converter,this.previewOptions={containerContext:r.containerContext,translate:r.translate,requestPassword:r.requestPassword,fit:r.fit,initialScale:r.initialScale,minScale:r.minScale,maxScale:r.maxScale,virtual:r.virtual,fontResolver:r.fontResolver,fontLoading:r.fontLoading,resourceResolver:r.resourceResolver,audio:r.audio,previewerFactory:r.previewerFactory??((n,a)=>new In(n,{...a,registry:this.registry,converter:this.converter}))}}async preview(e,r={}){const n=++this.requestToken,a=this.activeAbortController,i=typeof AbortController<"u"?new AbortController:null;this.activeAbortController=i;try{try{this.clearSession()}finally{a==null||a.abort()}if(n!==this.requestToken)return;let o=$a(e,r);if((!this.previewOptions.containerContext||this.previewOptions.containerContext.depth===0)&&(this.previewOptions.containerContext=to()),this.setState({...Ye(),loading:true}),this.emit("loading",this.state),n!==this.requestToken)return;let s=0;for(;;)try{const d=await Cr(this.resolveLoadTarget(o,n,i==null?void 0:i.signal),i==null?void 0:i.signal);if(n!==this.requestToken||!d)return;const l=d.route.targetFormat,u=["docx","xlsx","pptx","pdf"].includes(l)?Zp(this.host,this.previewOptions,l,f=>d.driver.createSession(f,this.previewOptions)):d.driver.createSession(this.host,this.previewOptions);if(n!==this.requestToken){u.destroy();return}if(this.activeSession=u,this.bindSession(u,n),n!==this.requestToken||(await Cr(u.load(d.descriptor.source,{descriptor:d.descriptor,route:d.route,signal:i==null?void 0:i.signal}),i==null?void 0:i.signal),n!==this.requestToken))return;this.setState(this.getState());break}catch(d){const l=ge(d);if(n!==this.requestToken||i!=null&&i.signal.aborted)return;if(!l||l==="password_cancelled"||!this.previewOptions.requestPassword)throw d;if(this.clearSession(),n!==this.requestToken||(this.setState({...Ye(),loading:true}),this.emit("statechange",this.state),n!==this.requestToken))return;const u=await Cr(Promise.resolve(this.previewOptions.requestPassword({name:o.name,reason:l,attempt:++s,signal:i==null?void 0:i.signal})),i==null?void 0:i.signal);if(n!==this.requestToken)return;if(u===null)throw new ie("password_cancelled");o={...o,password:u}}}catch(o){if(n!==this.requestToken||i!=null&&i.signal.aborted)return;const s=o instanceof Error?o:new Error(String(o)),d={...this.getState(),loading:false,error:s.message};try{this.clearSession()}finally{i==null||i.abort()}if(n!==this.requestToken)return;this.activeAbortController=null,this.setState(d),this.emit("error",s)}}destroy(){const e=++this.requestToken,r=this.activeAbortController;this.activeAbortController=null;try{this.clearSession()}finally{r==null||r.abort(),e===this.requestToken&&this.setState(Ye())}}getState(){var e;return this.state.error?this.state:((e=this.activeSession)==null?void 0:e.getState())??this.state}on(e,r){return this.listeners[e].add(r),()=>{this.listeners[e].delete(r)}}setScale(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setScale)==null||n.call(r,e)}fit(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.fit)==null||n.call(r,e)}rotate(e=90){var r,n;(n=(r=this.activeSession)==null?void 0:r.rotate)==null||n.call(r,e)}pan(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.pan)==null||a.call(n,e,r)}async fullscreen(){var e,r;await((r=(e=this.activeSession)==null?void 0:e.fullscreen)==null?void 0:r.call(e))}goToPage(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.goToPage)==null||n.call(r,e)}next(){var e,r;(r=(e=this.activeSession)==null?void 0:e.next)==null||r.call(e)}prev(){var e,r;(r=(e=this.activeSession)==null?void 0:e.prev)==null||r.call(e)}setActiveLayers(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setActiveLayers)==null||n.call(r,e)}toggleLayer(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.toggleLayer)==null||a.call(n,e,r)}selectNode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.selectNode)==null||n.call(r,e)}setNodeVisibility(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.setNodeVisibility)==null||a.call(n,e,r)}toggleNodeVisibility(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.toggleNodeVisibility)==null||a.call(n,e,r)}setExplode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setExplode)==null||n.call(r,e)}setActiveMaterial(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setActiveMaterial)==null||n.call(r,e)}setMeasurementActive(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setMeasurementActive)==null||n.call(r,e)}clearMeasurement(){var e,r;(r=(e=this.activeSession)==null?void 0:e.clearMeasurement)==null||r.call(e)}setMeasurementSnapMode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setMeasurementSnapMode)==null||n.call(r,e)}setMeasurementAxisLock(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setMeasurementAxisLock)==null||n.call(r,e)}setSectionActive(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionActive)==null||n.call(r,e)}setSectionMode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionMode)==null||n.call(r,e)}setSectionAxis(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionAxis)==null||n.call(r,e)}setSectionOffset(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSectionOffset)==null||n.call(r,e)}setSectionRange(e,r,n){var a,i;(i=(a=this.activeSession)==null?void 0:a.setSectionRange)==null||i.call(a,e,r,n)}clearSection(){var e,r;(r=(e=this.activeSession)==null?void 0:e.clearSection)==null||r.call(e)}setCameraProjection(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setCameraProjection)==null||n.call(r,e)}setCameraViewPreset(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setCameraViewPreset)==null||n.call(r,e)}setDisplayMode(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setDisplayMode)==null||n.call(r,e)}setSnapshotBackground(e){var r,n;(n=(r=this.activeSession)==null?void 0:r.setSnapshotBackground)==null||n.call(r,e)}downloadSnapshot(e,r){var n,a;(a=(n=this.activeSession)==null?void 0:n.downloadSnapshot)==null||a.call(n,e,r)}async resolveLoadTarget(e,r,n){var u,f,m;const a=this.registry.resolve(e);if(!a)throw new Error(`Unsupported preview format${rh(e)}.`);let i=false;if(!((u=a.route.conversion)!=null&&u.required)&&["docx","xlsx","pptx"].includes(a.route.sourceFormat)){const h=await Je(e.source,{signal:n});if(r!==this.requestToken)return null;e.source=h,i=[208,207,17,224,161,177,26,225].every((g,x)=>h[x]===g)}if(!((f=a.route.conversion)!=null&&f.required)&&!i){if(!a.driver)throw new Error(`No preview driver registered for ${a.route.driverId} (${Er(a.route)}).`);return{descriptor:e,driver:a.driver,route:a.route}}if(!this.converter)throw new Error(`No converter is configured for ${Er(a.route)}${nh(a.route)}.`);const o={descriptor:e,route:a.route,signal:n},s=await this.converter.convert({source:e.source,sourceFormat:a.route.sourceFormat,targetFormat:a.route.targetFormat,name:e.name,password:e.password},o);if(r!==this.requestToken)return null;const d=$a(s.source,{name:e.name,extension:s.format,contentType:s.contentType}),l=this.registry.resolve(d);if(!(l!=null&&l.driver))throw new Error(`No preview driver registered for converted ${s.format} output (${Er(a.route)}; expected driver ${a.route.driverId}).`);return(m=s.warnings)!=null&&m.length&&this.emit("warnings",s.warnings),{descriptor:d,driver:l.driver,route:l.route}}bindSession(e,r){const n=()=>r===this.requestToken&&e===this.activeSession,a=(i,o)=>{if(!n())return;const s=e.on(i,d=>{n()&&o(d)});n()?this.activeUnsubscribes.push(s):s()};a("loading",i=>this.setStateAndEmit("loading",i)),a("rendered",i=>this.setStateAndEmit("rendered",i)),a("statechange",i=>this.setStateAndEmit("statechange",i)),a("warnings",i=>this.emit("warnings",i)),a("error",i=>{ge(i)||(this.setState({...this.getState(),loading:false,error:i.message}),this.emit("error",i))})}setStateAndEmit(e,r){this.setState(r),this.emit(e,r)}setState(e){this.state=e}clearSession(){const e=this.activeUnsubscribes,r=this.activeSession;this.activeUnsubscribes=[],this.activeSession=null;for(const n of e)n();r==null||r.destroy()}emit(e,r){const n=this.requestToken;for(const a of this.listeners[e]){if(n!==this.requestToken)break;a(r)}}}function lh(t,e){return new In(t,e)}function Kp(){return[_p(),...kp()]}function dh(t=[]){return[...t,...eo]}function $a(t,e={}){if(Qp(t)){const n=e.name??t.name;return{...t,...e,name:n,extension:e.extension??t.extension??ir(n),contentType:e.contentType??t.contentType,size:e.size??t.size}}const r=e.name??th(t);return{source:t,...e,name:r,extension:e.extension??ir(r),contentType:e.contentType,size:e.size??eh(t)}}function Ye(){return{loading:false,error:null,family:"unsupported",warnings:[],capabilities:{}}}function Qp(t){return!!(t&&typeof t=="object"&&"source"in t)}function th(t){if(typeof t=="string")return t;if(typeof File<"u"&&t instanceof File)return t.name}function eh(t){if(t instanceof ArrayBuffer||t instanceof Uint8Array)return t.byteLength;if(typeof Blob<"u"&&t instanceof Blob)return t.size}function Cr(t,e){return e?new Promise((r,n)=>{const a=()=>n(Object.assign(new Error("Preview load aborted."),{name:"AbortError"}));t.then(i=>{e.removeEventListener("abort",a),r(i)},i=>{e.removeEventListener("abort",a),n(i)}),e.aborted?a():e.addEventListener("abort",a,{once:true})}):t}function rh(t){const e=t.extension?`.${t.extension}`:void 0,r=t.contentType,a=[t.name,e,r].filter(Boolean);return a.length?` for ${a.join(" / ")}`:""}function Er(t){return`${t.sourceFormat} -> ${t.targetFormat}, family ${t.family}, driver ${t.driverId}`}function nh(t){var e;return(e=t.conversion)!=null&&e.reason?`: ${t.conversion.reason}`:""}export{Eu as A,Zc as B,Sp as C,eo as D,Mu as E,Qr as F,_p as G,Fp as H,Ap as I,lh as J,Qu as K,Li as M,ne as P,qu as a,Qi as b,dh as c,Le as d,Nu as e,$u as f,_u as g,Bu as h,oh as i,Yc as j,ye as k,sh as l,to as m,yu as n,nn as o,ge as p,ch as q,el as r,ju as s,xu as t,We as u,ie as v,oo as w,vu as x,Ku as y,wp as z};