filens-preview 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/all-in-one/filens.js +306 -306
- package/dist/split/chunks/{archive-DMapcEqq.js → archive-haip2eOP.js} +1 -1
- package/dist/split/chunks/{browser-video-session-CGI8FpX_.js → browser-video-session-C_14e_mG.js} +1 -1
- package/dist/split/chunks/{cad-BvXJNqHR.js → cad-5oTkbaDV.js} +1 -1
- package/dist/split/chunks/{core-BLayEJn5.js → core-EjELrtsP.js} +2 -2
- package/dist/split/chunks/{diagram-DlpgioZ9.js → diagram-BRcdlitF.js} +1 -1
- package/dist/split/chunks/{docx-Sii3GNtE.js → docx-I39iDYpR.js} +1 -1
- package/dist/split/chunks/{ebook-CLCQfska.js → ebook-BRfadCGl.js} +1 -1
- package/dist/split/chunks/{index-DI_GyFX1.js → index-C4jdVbDq.js} +1 -1
- package/dist/split/chunks/{index-BPK_cNTp.js → index-DkF8PBGR.js} +1 -1
- package/dist/split/chunks/{iwork-Datv3D5d.js → iwork-DXq9Adf7.js} +1 -1
- package/dist/split/chunks/{media-runtime-tb-Q4Sah.js → media-runtime-B6322raw.js} +1 -1
- package/dist/split/chunks/{mindmap-B_GYpiFO.js → mindmap-CyR3TRfx.js} +1 -1
- package/dist/split/chunks/model3d-BEt6INTt.js +55 -0
- package/dist/split/chunks/{panorama-CIdiLIwD.js → panorama-ChsqnvWC.js} +1 -1
- package/dist/split/chunks/vendor-C1aIdQ-w.js +4115 -0
- package/dist/split/chunks/{xlsx-D2NFYc3n.js → xlsx-CITQo0Od.js} +1 -1
- package/dist/split/filens.js +1 -1
- package/package.json +1 -1
- package/dist/split/chunks/model3d-BsIQNF2D.js +0 -55
- package/dist/split/chunks/vendor-CBCxJuSg.js +0 -4115
|
@@ -1,4 +1,4 @@
|
|
|
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-CBCxJuSg.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-CBCxJuSg.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,`
|
|
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
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
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
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,`
|
|
@@ -6,7 +6,7 @@ var po=Object.defineProperty;var ho=(t,e,r)=>e in t?po(t,e,{enumerable:true,conf
|
|
|
6
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">
|
|
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-CBCxJuSg.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,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(`
|
|
10
10
|
`).includes(a.text)&&(i.text=[i.text,a.text].filter(Boolean).join(`
|
|
11
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
|
|
12
12
|
drop elif else end enum ensure except export extends false final finally fn for foreach from fun func get global go
|