UNPKG

modern-openxml

Version:
74 lines 187 kB
(function(w,Y){typeof exports=="object"&&typeof module<"u"?Y(exports):typeof define=="function"&&define.amd?define(["exports"],Y):(w=typeof globalThis<"u"?globalThis:w||self,Y(w.modernOpenxml={}))})(this,(function(w){"use strict";var Y=Uint8Array,it=Uint16Array,Ne=Int32Array,pe=new Y([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),he=new Y([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ee=new Y([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xn=function(e,t){for(var n=new it(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var a=new Ne(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)a[s]=s-n[r]<<5|r;return{b:n,r:a}},Pn=xn(pe,2),Sn=Pn.b,_e=Pn.r;Sn[28]=258,_e[258]=28;for(var bn=xn(he,0),ka=bn.b,wn=bn.r,Re=new it(32768),Z=0;Z<32768;++Z){var wt=(Z&43690)>>1|(Z&21845)<<1;wt=(wt&52428)>>2|(wt&13107)<<2,wt=(wt&61680)>>4|(wt&3855)<<4,Re[Z]=((wt&65280)>>8|(wt&255)<<8)>>1}for(var ht=(function(e,t,n){for(var r=e.length,a=0,s=new it(t);a<r;++a)e[a]&&++s[e[a]-1];var i=new it(t);for(a=1;a<t;++a)i[a]=i[a-1]+s[a-1]<<1;var o;if(n){o=new it(1<<t);var l=15-t;for(a=0;a<r;++a)if(e[a])for(var c=a<<4|e[a],p=t-e[a],h=i[e[a]-1]++<<p,f=h|(1<<p)-1;h<=f;++h)o[Re[h]>>l]=c}else for(o=new it(r),a=0;a<r;++a)e[a]&&(o[a]=Re[i[e[a]-1]++]>>15-e[a]);return o}),Ct=new Y(288),Z=0;Z<144;++Z)Ct[Z]=8;for(var Z=144;Z<256;++Z)Ct[Z]=9;for(var Z=256;Z<280;++Z)Ct[Z]=7;for(var Z=280;Z<288;++Z)Ct[Z]=8;for(var Ut=new Y(32),Z=0;Z<32;++Z)Ut[Z]=5;var $a=ht(Ct,9,0),Aa=ht(Ct,9,1),Ba=ht(Ut,5,0),Na=ht(Ut,5,1),Ie=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},lt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},De=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},ze=function(e){return(e+7)/8|0},Yt=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new Y(e.subarray(t,n))},Ea=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],rt=function(e,t,n){var r=new Error(t||Ea[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,rt),!n)throw r;return r},_a=function(e,t,n,r){var a=e.length,s=r?r.length:0;if(!a||t.f&&!t.l)return n||new Y(0);var i=!n,o=i||t.i!=2,l=t.i;i&&(n=new Y(a*3));var c=function(dt){var bt=n.length;if(dt>bt){var st=new Y(Math.max(bt*2,dt));st.set(n),n=st}},p=t.f||0,h=t.p||0,f=t.b||0,d=t.l,u=t.d,g=t.m,m=t.n,b=a*8;do{if(!d){p=lt(e,h,1);var S=lt(e,h+1,3);if(h+=3,S)if(S==1)d=Aa,u=Na,g=9,m=5;else if(S==2){var M=lt(e,h,31)+257,v=lt(e,h+10,15)+4,P=M+lt(e,h+5,31)+1;h+=14;for(var E=new Y(P),D=new Y(19),L=0;L<v;++L)D[Ee[L]]=lt(e,h+L*3,7);h+=v*3;for(var A=Ie(D),V=(1<<A)-1,q=ht(D,A,1),L=0;L<P;){var O=q[lt(e,h,V)];h+=O&15;var y=O>>4;if(y<16)E[L++]=y;else{var H=0,$=0;for(y==16?($=3+lt(e,h,3),h+=2,H=E[L-1]):y==17?($=3+lt(e,h,7),h+=3):y==18&&($=11+lt(e,h,127),h+=7);$--;)E[L++]=H}}var R=E.subarray(0,M),j=E.subarray(M);g=Ie(R),m=Ie(j),d=ht(R,g,1),u=ht(j,m,1)}else rt(1);else{var y=ze(h)+4,x=e[y-4]|e[y-3]<<8,T=y+x;if(T>a){l&&rt(0);break}o&&c(f+x),n.set(e.subarray(y,T),f),t.b=f+=x,t.p=h=T*8,t.f=p;continue}if(h>b){l&&rt(0);break}}o&&c(f+131072);for(var I=(1<<g)-1,X=(1<<m)-1,F=h;;F=h){var H=d[De(e,h)&I],_=H>>4;if(h+=H&15,h>b){l&&rt(0);break}if(H||rt(2),_<256)n[f++]=_;else if(_==256){F=h,d=null;break}else{var z=_-254;if(_>264){var L=_-257,B=pe[L];z=lt(e,h,(1<<B)-1)+Sn[L],h+=B}var U=u[De(e,h)&X],nt=U>>4;U||rt(3),h+=U&15;var j=ka[nt];if(nt>3){var B=he[nt];j+=De(e,h)&(1<<B)-1,h+=B}if(h>b){l&&rt(0);break}o&&c(f+131072);var Pt=f+z;if(f<j){var _t=s-j,St=Math.min(j,Pt);for(_t+f<0&&rt(3);f<St;++f)n[f]=r[_t+f]}for(;f<Pt;++f)n[f]=n[f-j]}}t.l=d,t.p=F,t.b=f,t.f=p,d&&(p=1,t.m=g,t.d=u,t.n=m)}while(!p);return f!=n.length&&i?Yt(n,0,f):n.subarray(0,f)},mt=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},Zt=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},qe=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var a=n.length,s=n.slice();if(!a)return{t:Fn,l:0};if(a==1){var i=new Y(n[0].s+1);return i[n[0].s]=1,{t:i,l:1}}n.sort(function(T,M){return T.f-M.f}),n.push({s:-1,f:25001});var o=n[0],l=n[1],c=0,p=1,h=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};p!=a-1;)o=n[n[c].f<n[h].f?c++:h++],l=n[c!=p&&n[c].f<n[h].f?c++:h++],n[p++]={s:-1,f:o.f+l.f,l:o,r:l};for(var f=s[0].s,r=1;r<a;++r)s[r].s>f&&(f=s[r].s);var d=new it(f+1),u=Ge(n[p-1],d,0);if(u>t){var r=0,g=0,m=u-t,b=1<<m;for(s.sort(function(M,v){return d[v.s]-d[M.s]||M.f-v.f});r<a;++r){var S=s[r].s;if(d[S]>t)g+=b-(1<<u-d[S]),d[S]=t;else break}for(g>>=m;g>0;){var y=s[r].s;d[y]<t?g-=1<<t-d[y]++-1:++r}for(;r>=0&&g;--r){var x=s[r].s;d[x]==t&&(--d[x],++g)}u=t}return{t:new Y(d),l:u}},Ge=function(e,t,n){return e.s==-1?Math.max(Ge(e.l,t,n+1),Ge(e.r,t,n+1)):t[e.s]=n},Cn=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new it(++t),r=0,a=e[0],s=1,i=function(l){n[r++]=l},o=1;o<=t;++o)if(e[o]==a&&o!=t)++s;else{if(!a&&s>2){for(;s>138;s-=138)i(32754);s>2&&(i(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(i(a),--s;s>6;s-=6)i(8304);s>2&&(i(s-3<<5|8208),s=0)}for(;s--;)i(a);s=1,a=e[o]}return{c:n.subarray(0,r),n:t}},Kt=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},Tn=function(e,t,n){var r=n.length,a=ze(t+2);e[a]=r&255,e[a+1]=r>>8,e[a+2]=e[a]^255,e[a+3]=e[a+1]^255;for(var s=0;s<r;++s)e[a+s+4]=n[s];return(a+4+r)*8},Mn=function(e,t,n,r,a,s,i,o,l,c,p){mt(t,p++,n),++a[256];for(var h=qe(a,15),f=h.t,d=h.l,u=qe(s,15),g=u.t,m=u.l,b=Cn(f),S=b.c,y=b.n,x=Cn(g),T=x.c,M=x.n,v=new it(19),P=0;P<S.length;++P)++v[S[P]&31];for(var P=0;P<T.length;++P)++v[T[P]&31];for(var E=qe(v,7),D=E.t,L=E.l,A=19;A>4&&!D[Ee[A-1]];--A);var V=c+5<<3,q=Kt(a,Ct)+Kt(s,Ut)+i,O=Kt(a,f)+Kt(s,g)+i+14+3*A+Kt(v,D)+2*v[16]+3*v[17]+7*v[18];if(l>=0&&V<=q&&V<=O)return Tn(t,p,e.subarray(l,l+c));var H,$,R,j;if(mt(t,p,1+(O<q)),p+=2,O<q){H=ht(f,d,0),$=f,R=ht(g,m,0),j=g;var I=ht(D,L,0);mt(t,p,y-257),mt(t,p+5,M-1),mt(t,p+10,A-4),p+=14;for(var P=0;P<A;++P)mt(t,p+3*P,D[Ee[P]]);p+=3*A;for(var X=[S,T],F=0;F<2;++F)for(var _=X[F],P=0;P<_.length;++P){var z=_[P]&31;mt(t,p,I[z]),p+=D[z],z>15&&(mt(t,p,_[P]>>5&127),p+=_[P]>>12)}}else H=$a,$=Ct,R=Ba,j=Ut;for(var P=0;P<o;++P){var B=r[P];if(B>255){var z=B>>18&31;Zt(t,p,H[z+257]),p+=$[z+257],z>7&&(mt(t,p,B>>23&31),p+=pe[z]);var U=B&31;Zt(t,p,R[U]),p+=j[U],U>3&&(Zt(t,p,B>>5&8191),p+=he[U])}else Zt(t,p,H[B]),p+=$[B]}return Zt(t,p,H[256]),p+$[256]},Ra=new Ne([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Fn=new Y(0),Ia=function(e,t,n,r,a,s){var i=s.z||e.length,o=new Y(r+i+5*(1+Math.ceil(i/7e3))+a),l=o.subarray(r,o.length-a),c=s.l,p=(s.r||0)&7;if(t){p&&(l[0]=s.r>>3);for(var h=Ra[t-1],f=h>>13,d=h&8191,u=(1<<n)-1,g=s.p||new it(32768),m=s.h||new it(u+1),b=Math.ceil(n/3),S=2*b,y=function(pt){return(e[pt]^e[pt+1]<<b^e[pt+2]<<S)&u},x=new Ne(25e3),T=new it(288),M=new it(32),v=0,P=0,E=s.i||0,D=0,L=s.w||0,A=0;E+2<i;++E){var V=y(E),q=E&32767,O=m[V];if(g[q]=O,m[V]=q,L<=E){var H=i-E;if((v>7e3||D>24576)&&(H>423||!c)){p=Mn(e,l,0,x,T,M,P,D,A,E-A,p),D=v=P=0,A=E;for(var $=0;$<286;++$)T[$]=0;for(var $=0;$<30;++$)M[$]=0}var R=2,j=0,I=d,X=q-O&32767;if(H>2&&V==y(E-X))for(var F=Math.min(f,H)-1,_=Math.min(32767,E),z=Math.min(258,H);X<=_&&--I&&q!=O;){if(e[E+R]==e[E+R-X]){for(var B=0;B<z&&e[E+B]==e[E+B-X];++B);if(B>R){if(R=B,j=X,B>F)break;for(var U=Math.min(X,B-2),nt=0,$=0;$<U;++$){var Pt=E-X+$&32767,_t=g[Pt],St=Pt-_t&32767;St>nt&&(nt=St,O=Pt)}}}q=O,O=g[q],X+=q-O&32767}if(j){x[D++]=268435456|_e[R]<<18|wn[j];var dt=_e[R]&31,bt=wn[j]&31;P+=pe[dt]+he[bt],++T[257+dt],++M[bt],L=E+R,++v}else x[D++]=e[E],++T[e[E]]}}for(E=Math.max(E,L);E<i;++E)x[D++]=e[E],++T[e[E]];p=Mn(e,l,c,x,T,M,P,D,A,E-A,p),c||(s.r=p&7|l[p/8|0]<<3,p-=7,s.h=m,s.p=g,s.i=E,s.w=L)}else{for(var E=s.w||0;E<i+c;E+=65535){var st=E+65535;st>=i&&(l[p/8|0]=c,st=i),p=Tn(l,p+1,e.subarray(E,st))}s.i=i}return Yt(o,0,r+ze(p)+a)},Da=(function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(n&1&&-306674912)^n>>>1;e[t]=n}return e})(),za=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=Da[n&255^t[r]]^n>>>8;e=n},d:function(){return~e}}},qa=function(e,t,n,r,a){if(!a&&(a={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),i=new Y(s.length+e.length);i.set(s),i.set(e,s.length),e=i,a.w=s.length}return Ia(e,t.level==null?6:t.level,t.mem==null?a.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,a)},Ln=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},ut=function(e,t){return e[t]|e[t+1]<<8},ct=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Ve=function(e,t){return ct(e,t)+ct(e,t+4)*4294967296},et=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Ga(e,t){return qa(e,t||{},0,0)}function Va(e,t){return _a(e,{i:2},t&&t.out,t&&t.dictionary)}var kn=function(e,t,n,r){for(var a in e){var s=e[a],i=t+a,o=r;Array.isArray(s)&&(o=Ln(r,s[1]),s=s[0]),s instanceof Y?n[i]=[s,o]:(n[i+="/"]=[new Y(0),o],kn(s,i,n,r))}},$n=typeof TextEncoder<"u"&&new TextEncoder,Oe=typeof TextDecoder<"u"&&new TextDecoder,Oa=0;try{Oe.decode(Fn,{stream:!0}),Oa=1}catch{}var ja=function(e){for(var t="",n=0;;){var r=e[n++],a=(r>127)+(r>223)+(r>239);if(n+a>e.length)return{s:t,r:Yt(e,n-1)};a?a==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):a&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function An(e,t){var n;if($n)return $n.encode(e);for(var r=e.length,a=new Y(e.length+(e.length>>1)),s=0,i=function(c){a[s++]=c},n=0;n<r;++n){if(s+5>a.length){var o=new Y(s+8+(r-n<<1));o.set(a),a=o}var l=e.charCodeAt(n);l<128||t?i(l):l<2048?(i(192|l>>6),i(128|l&63)):l>55295&&l<57344?(l=65536+(l&1047552)|e.charCodeAt(++n)&1023,i(240|l>>18),i(128|l>>12&63),i(128|l>>6&63),i(128|l&63)):(i(224|l>>12),i(128|l>>6&63),i(128|l&63))}return Yt(a,0,s)}function Wa(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}else{if(Oe)return Oe.decode(e);var a=ja(e),s=a.s,n=a.r;return n.length&&rt(8),s}}var Xa=function(e,t){return t+30+ut(e,t+26)+ut(e,t+28)},Ha=function(e,t,n){var r=ut(e,t+28),a=Wa(e.subarray(t+46,t+46+r),!(ut(e,t+8)&2048)),s=t+46+r,i=ct(e,t+20),o=n&&i==4294967295?Ua(e,s):[i,ct(e,t+24),ct(e,t+42)],l=o[0],c=o[1],p=o[2];return[ut(e,t+10),l,c,a,s+ut(e,t+30)+ut(e,t+32),p]},Ua=function(e,t){for(;ut(e,t)!=1;t+=4+ut(e,t+2));return[Ve(e,t+12),Ve(e,t+4),Ve(e,t+20)]},je=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&rt(9),t+=r+4}return t},Bn=function(e,t,n,r,a,s,i,o){var l=r.length,c=n.extra,p=o&&o.length,h=je(c);et(e,t,i!=null?33639248:67324752),t+=4,i!=null&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(s<0&&8),e[t++]=a&&8,e[t++]=n.compression&255,e[t++]=n.compression>>8;var f=new Date(n.mtime==null?Date.now():n.mtime),d=f.getFullYear()-1980;if((d<0||d>119)&&rt(10),et(e,t,d<<25|f.getMonth()+1<<21|f.getDate()<<16|f.getHours()<<11|f.getMinutes()<<5|f.getSeconds()>>1),t+=4,s!=-1&&(et(e,t,n.crc),et(e,t+4,s<0?-s-2:s),et(e,t+8,n.size)),et(e,t+12,l),et(e,t+14,h),t+=16,i!=null&&(et(e,t,p),et(e,t+6,n.attrs),et(e,t+10,i),t+=14),e.set(r,t),t+=l,h)for(var u in c){var g=c[u],m=g.length;et(e,t,+u),et(e,t+2,m),e.set(g,t+4),t+=4+m}return p&&(e.set(o,t),t+=p),t},Ya=function(e,t,n,r,a){et(e,t,101010256),et(e,t+8,n),et(e,t+10,n),et(e,t+12,r),et(e,t+16,a)};function Za(e,t){t||(t={});var n={},r=[];kn(e,"",n,t);var a=0,s=0;for(var i in n){var o=n[i],l=o[0],c=o[1],p=c.level==0?0:8,h=An(i),f=h.length,d=c.comment,u=d&&An(d),g=u&&u.length,m=je(c.extra);f>65535&&rt(11);var b=p?Ga(l,c):l,S=b.length,y=za();y.p(l),r.push(Ln(c,{size:l.length,crc:y.d(),c:b,f:h,m:u,u:f!=i.length||u&&d.length!=g,o:a,compression:p})),a+=30+f+m+S,s+=76+2*(f+m)+(g||0)+S}for(var x=new Y(s+22),T=a,M=s-a,v=0;v<r.length;++v){var h=r[v];Bn(x,h.o,h,h.f,h.u,h.c.length);var P=30+h.f.length+je(h.extra);x.set(h.c,h.o+P),Bn(x,a,h,h.f,h.u,h.c.length,h.o,h.m),a+=16+P+(h.m?h.m.length:0)}return Ya(x,a,r.length,M,T),x}function Ka(e,t){for(var n={},r=e.length-22;ct(e,r)!=101010256;--r)(!r||e.length-r>65558)&&rt(13);var a=ut(e,r+8);if(!a)return{};var s=ct(e,r+16),i=s==4294967295||a==65535;if(i){var o=ct(e,r-12);i=ct(e,o)==101075792,i&&(a=ct(e,o+32),s=ct(e,o+48))}for(var l=0;l<a;++l){var c=Ha(e,s,i),p=c[0],h=c[1],f=c[2],d=c[3],u=c[4],g=c[5],m=Xa(e,g);s=u,p?p==8?n[d]=Va(e.subarray(m,m+h),{out:new Y(f)}):rt(14,"unknown compression type "+p):n[d]=Yt(e,m,m+h)}return n}let We;function Qa(e){We=e}function Xe(e,t){return We?We(e,t):new globalThis.DOMParser().parseFromString(e,t)}const Lt={asvg:"http://schemas.microsoft.com/office/drawing/2016/SVG/main",p:"http://schemas.openxmlformats.org/presentationml/2006/main",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",a:"http://schemas.openxmlformats.org/drawingml/2006/main",a14:"http://schemas.microsoft.com/office/drawing/2010/main",dgm:"http://schemas.openxmlformats.org/drawingml/2006/diagram",dsp:"http://schemas.microsoft.com/office/drawing/2008/diagram",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",p14:"http://schemas.microsoft.com/office/powerpoint/2010/main",p15:"http://schemas.microsoft.com/office/powerpoint/2012/main",p159:"http://schemas.microsoft.com/office/powerpoint/2015/09/main",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance"};class N{static DPI=72;static encode(t,n){switch(t??=0,n){case"boolean":return t?"1":"0";case"degree":case"ST_Angle":case"ST_PositiveFixedAngle":case"positiveFixedAngle":return String(~~(Number(t)*6e4));case"fontSize":return String(~~(Number(t)*100));case"int":case"unsignedInt":case"number":case"SByteValue":case"ST_TLTimeNodeID":case"ST_ShapeID":return String(~~t);case"string":case"HexBinaryValue":case"StringValue":case"ST_LineEndLength":case"ST_LineEndWidth":return String(~~t);case"emu":case"ST_PositiveCoordinate":case"ST_LineWidth":case"ST_Coordinate32":case"ST_AdjCoordinate":return String(~~(Number(t)/this.DPI*914400));case"dxa":return String(~~(Number(t)/this.DPI*1440));case"percentage":case"ST_Percentage":case"ST_PositivePercentage":case"CT_PositiveFixedPercentage":case"ST_PositiveFixedPercentage":case"positiveFixedPercentage":case"ST_TextSpacingPercentOrPercentString":case"rate":return String(~~(Number(t)*1e5));case"ST_TextSpacingPoint":return String(~~(t*100));case"lineHeight":return String(~~(t*1e5/1.2018-.0034));default:throw new Error(`type not found: ${n}`)}}static decode(t,n){if(t!==void 0){switch(n){case"boolean":return t==="true"||Number(t)===1;case"degree":case"ST_Angle":case"ST_PositiveFixedAngle":case"positiveFixedAngle":return Number(t)/6e4;case"fontSize":return Number(t)/100;case"int":case"unsignedInt":case"number":case"SByteValue":case"ST_TLTimeNodeID":case"ST_ShapeID":return Number(t);case"string":case"HexBinaryValue":case"StringValue":case"ST_LineEndLength":case"ST_LineEndWidth":return String(t);case"emu":case"ST_PositiveCoordinate":case"ST_LineWidth":case"ST_Coordinate32":case"ST_AdjCoordinate":return Number(t)/914400*this.DPI;case"dxa":return Number(t)/1440*this.DPI;case"percentage":case"ST_Percentage":case"ST_PositivePercentage":case"CT_PositiveFixedPercentage":case"ST_PositiveFixedPercentage":case"positiveFixedPercentage":case"ST_TextSpacingPercentOrPercentString":case"rate":return Number(t)/1e5;case"ST_TextSpacingPoint":return Number(t)/100;case"lineHeight":return Number(t)/1e5*1.2018+.0034}throw new Error(`type not found: ${n}`)}}}const Nn={"&sbquo;":"‚","&bdquo;":"„","&hellip;":"…","&permil;":"‰","&circ;":"ˆ","&cent;":"¢","&pound;":"£","&yen;":"¥","&euro;":"€","&sect;":"§","&copy;":"©","&reg;":"®","&trade;":"™","&times;":"×","&divide;":"÷","&fnof;":"ƒ"};class kt{constructor(t,n){this.dom=t,this.namespaces=n,this.doc=t.ownerDocument,this.find=this.find.bind(this),this.get=this.get.bind(this),this.attr=this.attr.bind(this),this.query=this.query.bind(this)}doc;resolver=t=>t&&this.namespaces[t]||null;get name(){return this.dom.nodeName}static fromXML(t="",n=Lt){t=t.replace(/xmlns=".*?"/g,"");for(const s in Nn)t=t.replace(new RegExp(s,"gi"),Nn[s]);const r=Xe(t,"text/xml"),a={};for(const[,s,i]of t.matchAll(/xmlns:(\w)="(.+?)"/g))a[s]=i;return new kt(r.documentElement,{...a,...n})}getDOM(){return this.dom}evaluate(t,n=0){return this.doc.evaluate(t,this.dom,this.resolver,n,null)}query(t,n="node"){switch(n){case"node":{const r=this.evaluate(t,9).singleNodeValue;return r?new kt(r,this.namespaces):void 0}case"nodes":{const r=this.evaluate(t,5),a=[];let s;for(;s=r.iterateNext();)a.push(new kt(s,this.namespaces));return a}default:{let r;return t[0]==="@"&&"getAttribute"in this.dom?r=this.dom.getAttribute(t.substring(1)):r=this.evaluate(t,2).stringValue,N.decode(r||void 0,n)}}}get(t){return this.query(t,"nodes")}find(t){return this.query(t,"node")}attr(t,n="string"){return this.query(t,n)}}function En(e){return`<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" > <Application>Microsoft Office PowerPoint</Application> <PresentationFormat>Widescreen</PresentationFormat> <Slides>${e}</Slides> <Notes>0</Notes> <HiddenSlides>0</HiddenSlides> <ScaleCrop>false</ScaleCrop> <HeadingPairs> <vt:vector size="4" baseType="variant"> <vt:variant> <vt:lpstr>Theme</vt:lpstr> </vt:variant> <vt:variant> <vt:i4>1</vt:i4> </vt:variant> <vt:variant> <vt:lpstr>Slide Titles</vt:lpstr> </vt:variant> <vt:variant> <vt:i4>${e}</vt:i4> </vt:variant> </vt:vector> </HeadingPairs> <TitlesOfParts> <vt:vector size="${e+1}" baseType="lpstr"> <vt:lpstr>Office Theme</vt:lpstr> ${Array.from({length:e}).map(t=>"<vt:lpstr>PowerPoint Presentation</vt:lpstr>").join(` `)} </vt:vector> </TitlesOfParts> <LinksUpToDate>false</LinksUpToDate> <SharedDoc>false</SharedDoc> <HyperlinksChanged>false</HyperlinksChanged> <AppVersion>16.0000</AppVersion> </Properties>`}function _n(e){return{title:e.attr("dc:title/text()","string"),subject:e.attr("dc:subject/text()","string"),creator:e.attr("dc:creator/text()","string"),lastModifiedBy:e.attr("dc:lastModifiedBy/text()","string"),revision:e.attr("dc:revision/text()","string"),modified:e.attr("dcterms:modified/text()","string")}}function Rn(e){const t=new Date,n=`${t.getFullYear()}-${t.getMonth()+1}-${t.getDate()}T${t.getHours()}:${t.getMinutes()}:${t.getSeconds()}Z`;return`<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <dc:title>${e.title??"modern-openxml"}</dc:title> <dc:subject>${e.subject??"modern-openxml"}</dc:subject> <dc:creator>${e.creator??"modern-openxml"}</dc:creator> <cp:lastModifiedBy>${e.lastModifiedBy??"modern-openxml"}</cp:lastModifiedBy> <cp:revision>${e.revision??1}</cp:revision> <dcterms:modified xsi:type="dcterms:W3CDTF">${n}</dcterms:modified> </cp:coreProperties>`}var Ja={grad:.9,turn:360,rad:360/(2*Math.PI)},gt=function(e){return typeof e=="string"?e.length>0:typeof e=="number"},tt=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ot=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e>t?e:t},In=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Dn=function(e){return{r:ot(e.r,0,255),g:ot(e.g,0,255),b:ot(e.b,0,255),a:ot(e.a)}},He=function(e){return{r:tt(e.r),g:tt(e.g),b:tt(e.b),a:tt(e.a,3)}},ts=/^#([0-9a-f]{3,8})$/i,ue=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},zn=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=Math.max(t,n,r),i=s-Math.min(t,n,r),o=i?s===t?(n-r)/i:s===n?2+(r-t)/i:4+(t-n)/i:0;return{h:60*(o<0?o+6:o),s:s?i/s*100:0,v:s/255*100,a}},qn=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var s=Math.floor(t),i=r*(1-n),o=r*(1-(t-s)*n),l=r*(1-(1-t+s)*n),c=s%6;return{r:255*[r,o,i,i,l,r][c],g:255*[l,r,r,o,i,i][c],b:255*[i,i,l,r,r,o][c],a}},Gn=function(e){return{h:In(e.h),s:ot(e.s,0,100),l:ot(e.l,0,100),a:ot(e.a)}},Vn=function(e){return{h:tt(e.h),s:tt(e.s),l:tt(e.l),a:tt(e.a,3)}},On=function(e){return qn((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},Qt=function(e){return{h:(t=zn(e)).h,s:(a=(200-(n=t.s))*(r=t.v)/100)>0&&a<200?n*r/100/(a<=100?a:200-a)*100:0,l:a/2,a:t.a};var t,n,r,a},es=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ns=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,rs=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,as=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jn={string:[[function(e){var t=ts.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?tt(parseInt(e[3]+e[3],16)/255,2):1}:e.length===6||e.length===8?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:e.length===8?tt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=rs.exec(e)||as.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Dn({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=es.exec(e)||ns.exec(e);if(!t)return null;var n,r,a=Gn({h:(n=t[1],r=t[2],r===void 0&&(r="deg"),Number(n)*(Ja[r]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return On(a)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,a=e.a,s=a===void 0?1:a;return gt(t)&&gt(n)&&gt(r)?Dn({r:Number(t),g:Number(n),b:Number(r),a:Number(s)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,a=e.a,s=a===void 0?1:a;if(!gt(t)||!gt(n)||!gt(r))return null;var i=Gn({h:Number(t),s:Number(n),l:Number(r),a:Number(s)});return On(i)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,a=e.a,s=a===void 0?1:a;if(!gt(t)||!gt(n)||!gt(r))return null;var i=(function(o){return{h:In(o.h),s:ot(o.s,0,100),v:ot(o.v,0,100),a:ot(o.a)}})({h:Number(t),s:Number(n),v:Number(r),a:Number(s)});return qn(i)},"hsv"]]},Wn=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},ss=function(e){return typeof e=="string"?Wn(e.trim(),jn.string):typeof e=="object"&&e!==null?Wn(e,jn.object):[null,void 0]},Ue=function(e,t){var n=Qt(e);return{h:n.h,s:ot(n.s+100*t,0,100),l:n.l,a:n.a}},Ye=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},Xn=function(e,t){var n=Qt(e);return{h:n.h,s:n.s,l:ot(n.l+100*t,0,100),a:n.a}},Hn=(function(){function e(t){this.parsed=ss(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return this.parsed!==null},e.prototype.brightness=function(){return tt(Ye(this.rgba),2)},e.prototype.isDark=function(){return Ye(this.rgba)<.5},e.prototype.isLight=function(){return Ye(this.rgba)>=.5},e.prototype.toHex=function(){return t=He(this.rgba),n=t.r,r=t.g,a=t.b,i=(s=t.a)<1?ue(tt(255*s)):"","#"+ue(n)+ue(r)+ue(a)+i;var t,n,r,a,s,i},e.prototype.toRgb=function(){return He(this.rgba)},e.prototype.toRgbString=function(){return t=He(this.rgba),n=t.r,r=t.g,a=t.b,(s=t.a)<1?"rgba("+n+", "+r+", "+a+", "+s+")":"rgb("+n+", "+r+", "+a+")";var t,n,r,a,s},e.prototype.toHsl=function(){return Vn(Qt(this.rgba))},e.prototype.toHslString=function(){return t=Vn(Qt(this.rgba)),n=t.h,r=t.s,a=t.l,(s=t.a)<1?"hsla("+n+", "+r+"%, "+a+"%, "+s+")":"hsl("+n+", "+r+"%, "+a+"%)";var t,n,r,a,s},e.prototype.toHsv=function(){return t=zn(this.rgba),{h:tt(t.h),s:tt(t.s),v:tt(t.v),a:tt(t.a,3)};var t},e.prototype.invert=function(){return ft({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},e.prototype.saturate=function(t){return t===void 0&&(t=.1),ft(Ue(this.rgba,t))},e.prototype.desaturate=function(t){return t===void 0&&(t=.1),ft(Ue(this.rgba,-t))},e.prototype.grayscale=function(){return ft(Ue(this.rgba,-1))},e.prototype.lighten=function(t){return t===void 0&&(t=.1),ft(Xn(this.rgba,t))},e.prototype.darken=function(t){return t===void 0&&(t=.1),ft(Xn(this.rgba,-t))},e.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},e.prototype.alpha=function(t){return typeof t=="number"?ft({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):tt(this.rgba.a,3);var n},e.prototype.hue=function(t){var n=Qt(this.rgba);return typeof t=="number"?ft({h:t,s:n.s,l:n.l,a:n.a}):tt(n.h)},e.prototype.isEqual=function(t){return this.toHex()===ft(t).toHex()},e})(),ft=function(e){return e instanceof Hn?e:new Hn(e)};const is="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let os=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=is[n[e]&63];return t};function Jt(e,t=0,n=10**t){return Math.round(n*e)/n+0}function ls(e){let t;return typeof e=="number"?t={r:e>>24&255,g:e>>16&255,b:e>>8&255,a:(e&255)/255}:t=e,ft(t)}function cs(e){return{r:Jt(e.r),g:Jt(e.g),b:Jt(e.b),a:Jt(e.a,3)}}function fe(e){const t=e.toString(16);return t.length<2?`0${t}`:t}const ps="#000000FF";function hs(e,t=!1){const n=ls(e);if(!n.isValid()){if(typeof e=="string")return e;const o=`Failed to normalizeColor ${e}`;if(t)throw new Error(o);return console.warn(o),ps}const{r,g:a,b:s,a:i}=cs(n.rgba);return`#${fe(r)}${fe(a)}${fe(s)}${fe(Jt(i*255))}`}var de=de||{};de.parse=(function(){const e={linearGradient:/^(-(webkit|o|ms|moz)-)?(linear-gradient)/i,repeatingLinearGradient:/^(-(webkit|o|ms|moz)-)?(repeating-linear-gradient)/i,radialGradient:/^(-(webkit|o|ms|moz)-)?(radial-gradient)/i,repeatingRadialGradient:/^(-(webkit|o|ms|moz)-)?(repeating-radial-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?((\d*\.\d+)|(\d+\.?)))px/,percentageValue:/^(-?((\d*\.\d+)|(\d+\.?)))%/,emValue:/^(-?((\d*\.\d+)|(\d+\.?)))em/,angleValue:/^(-?((\d*\.\d+)|(\d+\.?)))deg/,radianValue:/^(-?((\d*\.\d+)|(\d+\.?)))rad/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^#([0-9a-f]+)/i,literalColor:/^([a-z]+)/i,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,varColor:/^var/i,calcValue:/^calc/i,variableName:/^(--[a-z0-9-,\s#]+)/i,number:/^((\d*\.\d+)|(\d+\.?))/,hslColor:/^hsl/i,hslaColor:/^hsla/i};let t="";function n(F){const _=new Error(`${t}: ${F}`);throw _.source=t,_}function r(){const F=a();return t.length>0&&n("Invalid input not EOF"),F}function a(){return y(s)}function s(){return i("linear-gradient",e.linearGradient,l)||i("repeating-linear-gradient",e.repeatingLinearGradient,l)||i("radial-gradient",e.radialGradient,h)||i("repeating-radial-gradient",e.repeatingRadialGradient,h)}function i(F,_,z){return o(_,B=>{const U=z();return U&&(I(e.comma)||n("Missing comma before color stops")),{type:F,orientation:U,colorStops:y(x)}})}function o(F,_){const z=I(F);if(z){I(e.startCall)||n("Missing (");const B=_(z);return I(e.endCall)||n("Missing )"),B}}function l(){const F=c();if(F)return F;const _=j("position-keyword",e.positionKeywords,1);return _?{type:"directional",value:_.value}:p()}function c(){return j("directional",e.sideOrCorner,1)}function p(){return j("angular",e.angleValue,1)||j("angular",e.radianValue,1)}function h(){let F,_=f(),z;return _&&(F=[],F.push(_),z=t,I(e.comma)&&(_=f(),_?F.push(_):t=z)),F}function f(){let F=d()||u();if(F)F.at=m();else{const _=g();if(_){F=_;const z=m();z&&(F.at=z)}else{const z=m();if(z)F={type:"default-radial",at:z};else{const B=b();B&&(F={type:"default-radial",at:B})}}}return F}function d(){const F=j("shape",/^(circle)/i,0);return F&&(F.style=R()||g()),F}function u(){const F=j("shape",/^(ellipse)/i,0);return F&&(F.style=b()||O()||g()),F}function g(){return j("extent-keyword",e.extentKeywords,1)}function m(){if(j("position",/^at/,0)){const F=b();return F||n("Missing positioning value"),F}}function b(){const F=S();if(F.x||F.y)return{type:"position",value:F}}function S(){return{x:O(),y:O()}}function y(F){let _=F();const z=[];if(_)for(z.push(_);I(e.comma);)_=F(),_?z.push(_):n("One extra comma");return z}function x(){const F=T();return F||n("Expected color definition"),F.length=O(),F}function T(){return v()||A()||L()||E()||P()||D()||M()}function M(){return j("literal",e.literalColor,0)}function v(){return j("hex",e.hexColor,1)}function P(){return o(e.rgbColor,()=>({type:"rgb",value:y(q)}))}function E(){return o(e.rgbaColor,()=>({type:"rgba",value:y(q)}))}function D(){return o(e.varColor,()=>({type:"var",value:V()}))}function L(){return o(e.hslColor,()=>{I(e.percentageValue)&&n("HSL hue value must be a number in degrees (0-360) or normalized (-360 to 360), not a percentage");const _=q();I(e.comma);let z=I(e.percentageValue);const B=z?z[1]:null;I(e.comma),z=I(e.percentageValue);const U=z?z[1]:null;return(!B||!U)&&n("Expected percentage value for saturation and lightness in HSL"),{type:"hsl",value:[_,B,U]}})}function A(){return o(e.hslaColor,()=>{const F=q();I(e.comma);let _=I(e.percentageValue);const z=_?_[1]:null;I(e.comma),_=I(e.percentageValue);const B=_?_[1]:null;I(e.comma);const U=q();return(!z||!B)&&n("Expected percentage value for saturation and lightness in HSLA"),{type:"hsla",value:[F,z,B,U]}})}function V(){return I(e.variableName)[1]}function q(){return I(e.number)[1]}function O(){return j("%",e.percentageValue,1)||H()||$()||R()}function H(){return j("position-keyword",e.positionKeywords,1)}function $(){return o(e.calcValue,()=>{let F=1,_=0;for(;F>0&&_<t.length;){const B=t.charAt(_);B==="("?F++:B===")"&&F--,_++}F>0&&n("Missing closing parenthesis in calc() expression");const z=t.substring(0,_-1);return X(_-1),{type:"calc",value:z}})}function R(){return j("px",e.pixelValue,1)||j("em",e.emValue,1)}function j(F,_,z){const B=I(_);if(B)return{type:F,value:B[z]}}function I(F){let _,z;return z=/^\s+/.exec(t),z&&X(z[0].length),_=F.exec(t),_&&X(_[0].length),_}function X(F){t=t.substr(F)}return function(F){return t=F.toString().trim(),t.endsWith(";")&&(t=t.slice(0,-1)),r()}})(),de.parse.bind(de);var me=me||{};me.stringify=(function(){var e={"visit_linear-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-linear-gradient":function(t){return e.visit_gradient(t)},"visit_radial-gradient":function(t){return e.visit_gradient(t)},"visit_repeating-radial-gradient":function(t){return e.visit_gradient(t)},visit_gradient:function(t){var n=e.visit(t.orientation);return n&&(n+=", "),t.type+"("+n+e.visit(t.colorStops)+")"},visit_shape:function(t){var n=t.value,r=e.visit(t.at),a=e.visit(t.style);return a&&(n+=" "+a),r&&(n+=" at "+r),n},"visit_default-radial":function(t){var n="",r=e.visit(t.at);return r&&(n+=r),n},"visit_extent-keyword":function(t){var n=t.value,r=e.visit(t.at);return r&&(n+=" at "+r),n},"visit_position-keyword":function(t){return t.value},visit_position:function(t){return e.visit(t.value.x)+" "+e.visit(t.value.y)},"visit_%":function(t){return t.value+"%"},visit_em:function(t){return t.value+"em"},visit_px:function(t){return t.value+"px"},visit_calc:function(t){return"calc("+t.value+")"},visit_literal:function(t){return e.visit_color(t.value,t)},visit_hex:function(t){return e.visit_color("#"+t.value,t)},visit_rgb:function(t){return e.visit_color("rgb("+t.value.join(", ")+")",t)},visit_rgba:function(t){return e.visit_color("rgba("+t.value.join(", ")+")",t)},visit_hsl:function(t){return e.visit_color("hsl("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%)",t)},visit_hsla:function(t){return e.visit_color("hsla("+t.value[0]+", "+t.value[1]+"%, "+t.value[2]+"%, "+t.value[3]+")",t)},visit_var:function(t){return e.visit_color("var("+t.value+")",t)},visit_color:function(t,n){var r=t,a=e.visit(n.length);return a&&(r+=" "+a),r},visit_angular:function(t){return t.value+"deg"},visit_directional:function(t){return"to "+t.value},visit_array:function(t){var n="",r=t.length;return t.forEach(function(a,s){n+=e.visit(a),s<r-1&&(n+=", ")}),n},visit_object:function(t){return t.width&&t.height?e.visit(t.width)+" "+e.visit(t.height):""},visit:function(t){if(!t)return"";if(t instanceof Array)return e.visit_array(t);if(typeof t=="object"&&!t.type)return e.visit_object(t);if(t.type){var n=e["visit_"+t.type];if(n)return n(t);throw Error("Missing visitor visit_"+t.type)}else throw Error("Invalid node.")}};return function(t){return e.visit(t)}})(),me.stringify.bind(me);function us(e){return e.startsWith("linear-gradient(")||e.startsWith("radial-gradient(")}const yt=()=>os(10),fs=new Map([["aliceBlue","#F0F8FF"],["antiqueWhite","#FAEBD7"],["aqua","#00FFFF"],["aquamarine","#7FFFD4"],["azure","#F0FFFF"],["beige","#F5F5DC"],["bisque","#FFE4C4"],["black","#000000"],["blanchedAlmond","#FFEBCD"],["blue","#0000FF"],["blueViolet","#8A2BE2"],["brown","#A52A2A"],["burlyWood","#DEB887"],["cadetBlue","#5F9EA0"],["chartreuse","#7FFF00"],["chocolate","#D2691E"],["coral","#FF7F50"],["cornflowerBlue","#6495ED"],["cornsilk","#FFF8DC"],["crimson","#DC143C"],["cyan","#00FFFF"],["darkBlue","#00008B"],["darkCyan","#008B8B"],["darkGoldenrod","#B8860B"],["darkGray","#A9A9A9"],["darkGreen","#006400"],["darkKhaki","#BDB76B"],["darkMagenta","#8B008B"],["darkOliveGreen","#556B2F"],["darkOrange","#FF8C00"],["darkOrchid","#9932CC"],["darkRed","#8B0000"],["darkSalmon","#E9967A"],["darkSeaGreen","#8FBC8F"],["darkSlateBlue","#483D8B"],["darkSlateGray","#2F4F4F"],["darkTurquoise","#00CED1"],["darkViolet","#9400D3"],["deepPink","#FF1493"],["deepSkyBlue","#00BFFF"],["dimGray","#696969"],["dodgerBlue","#1E90FF"],["firebrick","#B22222"],["floralWhite","#FFFAF0"],["forestGreen","#228B22"],["fuchsia","#FF00FF"],["gainsboro","#DCDCDC"],["ghostWhite","#F8F8FF"],["gold","#FFD700"],["goldenrod","#DAA520"],["gray","#808080"],["green","#008000"],["greenYellow","#ADFF2F"],["honeydew","#F0FFF0"],["hotPink","#FF69B4"],["indianRed","#CD5C5C"],["indigo","#4B0082"],["ivory","#FFFFF0"],["khaki","#F0E68C"],["lavender","#E6E6FA"],["lavenderBlush","#FFF0F5"],["lawnGreen","#7CFC00"],["lemonChiffon","#FFFACD"],["lightBlue","#ADD8E6"],["lightCoral","#F08080"],["lightCyan","#E0FFFF"],["lightGoldenrodYellow","#FAFAD2"],["lightGray","#D3D3D3"],["lightGreen","#90EE90"],["lightPink","#FFB6C1"],["lightSalmon","#FFA07A"],["lightSeaGreen","#20B2AA"],["lightSkyBlue","#87CEFA"],["lightSlateGray","#778899"],["lightSteelBlue","#B0C4DE"],["lightYellow","#FFFFE0"],["lime","#00FF00"],["limeGreen","#32CD32"],["linen","#FAF0E6"],["magenta","#FF00FF"],["maroon","#800000"],["mediumAquamarine","#66CDAA"],["mediumBlue","#0000CD"],["mediumOrchid","#BA55D3"],["mediumPurple","#9370DB"],["mediumSeaGreen","#3CB371"],["mediumSlateBlue","#7B68EE"],["mediumSpringGreen","#00FA9A"],["mediumTurquoise","#48D1CC"],["mediumVioletRed","#C71585"],["midnightBlue","#191970"],["mintCream","#F5FFFA"],["mistyRose","#FFE4E1"],["moccasin","#FFE4B5"],["navajoWhite","#FFDEAD"],["navy","#000080"],["oldLace","#FDF5E6"],["olive","#808000"],["oliveDrab","#6B8E23"],["orange","#FFA500"],["orangeRed","#FF4500"],["orchid","#DA70D6"],["paleGoldenrod","#EEE8AA"],["paleGreen","#98FB98"],["paleTurquoise","#AFEEEE"],["paleVioletRed","#DB7093"],["papayaWhip","#FFEFD5"],["peachPuff","#FFDAB9"],["peru","#CD853F"],["pink","#FFC0CB"],["plum","#DDA0DD"],["powderBlue","#B0E0E6"],["purple","#800080"],["red","#FF0000"],["rosyBrown","#BC8F8F"],["royalBlue","#4169E1"],["saddleBrown","#8B4513"],["salmon","#FA8072"],["sandyBrown","#F4A460"],["seaGreen","#2E8B57"],["seaShell","#FFF5EE"],["sienna","#A0522D"],["silver","#C0C0C0"],["skyBlue","#87CEEB"],["slateBlue","#6A5ACD"],["slateGray","#708090"],["snow","#FFFAFA"],["springGreen","#00FF7F"],["steelBlue","#4682B4"],["tan","#D2B48C"],["teal","#008080"],["thistle","#D8BFD8"],["tomato","#FF6347"],["turquoise","#40E0D0"],["violet","#EE82EE"],["wheat","#F5DEB3"],["white","#FFFFFF"],["whiteSmoke","#F5F5F5"],["yellow","#FFFF00"],["yellowGreen","#9ACD32"]]),ds={windowText:"#000000",window:"#FFFFFF",menu:"#F0F0F0",buttonFace:"#F0F0F0",buttonText:"#000000",highlight:"#3399FF",highlightText:"#FFFFFF"},Un=["a:hslClr","a:prstClr","a:schemeClr","a:scrgbClr","a:srgbClr","a:sysClr"],Yn=`*[(${Un.map(e=>`self::${e}`).join(" or ")})]`;function ms(e,t){switch(e.name){case"a:hslClr":return Dt(Zn({h:e.attr("@hue","ST_PositiveFixedAngle"),s:e.attr("@sat","ST_Percentage"),l:e.attr("@lum","ST_Percentage")}));case"a:prstClr":{const n=e.attr("@val");return Dt(fs.get(n)??n)}case"a:schemeClr":{const n=t?.master,r=t?.theme,a=e.attr("@val");let s=a;s=n?.meta?.colorMap?.[s]??s;let i=r?.colorScheme?.[s];return i||(s=r?.extraColorMap?.[s]??s,i=r?.extraColorScheme?.[s]),i?Dt(i):a}case"a:scrgbClr":return Dt({r:e.attr("@r","ST_Percentage"),g:e.attr("@g","ST_Percentage"),b:e.attr("@b","ST_Percentage")});case"a:srgbClr":return Dt(e.attr("@val"));case"a:sysClr":return Dt(ds[e.attr("@val")]??"#000000");default:return"#000000"}}function Tt(e,t){if(e&&!Un.includes(e?.name)&&(e=e.find(Yn)),!e)return;const n=ms(e,t);if(!n||!n.startsWith("#"))return{color:n};const r={...gs(n),a:~~((e.attr("a:alpha/@val","ST_PositivePercentage")??1)*100)/100},a=e.attr("a:lumMod/@val","rate"),s=e.attr("a:lumOff/@val","rate");if(a){const i=ys(r);i.l=i.l*Number(a)+Number(s??0);const o=Zn(i);r.r=o.r,r.g=o.g,r.b=o.b}return{color:hs(r)}}function Ze(e){let t=1e5;if(e==="transparent"&&(e="#0000"),e.startsWith("#"))e=e.substring(1),(e.length===3||e.length===4)&&(e=e.split("").map(n=>n+n).join("")),e.length===8&&(t*=+`0x${e.substring(6,8)}`/255,e=e.substring(0,6));else if(e.startsWith("rgba")){const n=e.match(/rgba\((.+)\)/)?.[1]?.split(",").map(r=>Number(r.trim()));n&&(e=Kn({r:n[0],g:n[1],b:n[2]}),n[3]>1&&(n[3]/=255),t=n[3]*1e5)}else if(e.startsWith("rgb")){const n=e.match(/rgb\((.+)\)/)?.[1]?.split(",").map(r=>Number(r.trim()));n&&(e=Kn({r:n[0],g:n[1],b:n[2]}))}return`<a:srgbClr val="${e}"> <a:alpha val="${Math.floor(t)}"/> </a:srgbClr>`}function Dt(e){return typeof e=="object"?`#${e.r}${e.g}${e.b}`:e.startsWith("#")?e:`#${e}`}function Ke(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Zn(e){const{h:t,s:n,l:r}=e;let a,s,i;if(n===0)a=s=i=r;else{const o=r<.5?r*(1+n):r+n-r*n,l=2*r-o;a=Ke(l,o,t+1/3),s=Ke(l,o,t),i=Ke(l,o,t-1/3)}return{r:Math.round(a*255),g:Math.round(s*255),b:Math.round(i*255)}}function Kn(e){const{r:t,g:n,b:r}=e;return((1<<24)+(t<<16)+(n<<8)+r).toString(16).slice(1)}function gs(e){e=e.replace(/^#/,""),e.length===3&&(e=e.split("").map(a=>a+a).join(""));const t=Number.parseInt(e.substring(0,2),16),n=Number.parseInt(e.substring(2,4),16),r=Number.parseInt(e.substring(4,6),16);return{r:t,g:n,b:r}}function ys(e){let{r:t,g:n,b:r}=e;t/=255,n/=255,r/=255;const a=Math.max(t,n,r),s=Math.min(t,n,r);let i=(a+s)/2,o=i;const l=o;if(a===s)i=o=0;else{const c=a-s;switch(o=l>.5?c/(2-a-s):c/(a+s),a){case t:i=(n-r)/c+(n<r?6:0);break;case n:i=(r-t)/c+2;break;case r:i=(t-n)/c+4;break}i/=6}return{h:i,s:o,l}}function Qe(e){if(!e)return;const t={};return e.get("*").forEach(n=>{t[n.name.replace("a:","")]=Tt(n)?.color}),t}function Qn(e,t){if(!e)return;const n=Tt(e,t);if(!n)return;const r=e.attr("@blurRad","ST_PositiveCoordinate")??0,a=e.attr("@dir","ST_PositiveFixedAngle")??0,s=e.attr("@dist","ST_PositiveCoordinate")??0,i=(a+90)/180*Math.PI;return{...n,offsetX:s*Math.sin(i),offsetY:s*-Math.cos(i),blurRadius:r}}function vs(e,t){const n=Qn(e,t);if(!n)return;const r=e.attr("@sx","ST_Percentage")??1,a=e.attr("@sy","ST_Percentage")??1;return{...n,scaleX:r,scaleY:a}}function xs(e){if(e)return{radius:e.attr("@rad","ST_PositiveCoordinate")??0}}function Je(e,t){if(e)return{innerShadow:Qn(e.find("a:innerShdw"),t),outerShadow:vs(e.find("a:outerShdw"),t),softEdge:xs(e.find("a:softEdge"))}}class zt{forward=new Map;reverse=new Map;constructor(t){for(const n in t)this.set(n,t[n])}set(t,n){this.forward.set(t,n),this.reverse.set(n,t)}getValue(t){return this.forward.get(t)}getKey(t){return this.reverse.get(t)}deleteByKey(t){const n=this.forward.get(t);this.forward.delete(t),n!==void 0&&this.reverse.delete(n)}deleteByValue(t){const n=this.reverse.get(t);this.reverse.delete(t),n!==void 0&&this.forward.delete(n)}}const Jn='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';function tr(e){return`${Jn} ${e}`}function er(e){return e.replace(/\n/g,"").replace(/> +</g,"><").replace(/ +([:\w]+=".+?")/g," $1").replace(/([:\w]+=".+?") +/g,"$1 ")}function C(e,t){return t===void 0?"":`${e}="${t}"`}function G(e){return e.length?` ${e.filter(Boolean).join(" ")}`:""}function W(e,t=1,n=!0){if(!e)return"";const r=Array.from({length:t}).map(()=>" ").join("");return(typeof e=="string"?e.split(` `):e).filter(Boolean).map((a,s)=>n&&s===0?a:`${r}${a}`).join(` `)}function ge(e,t){return t?`<${e}>${t}</${e}>`:""}const Ps=[[/docProps\/app\.xml$/,"app",null],[/docProps\/core\.xml$/,"core",null],[/tableStyles\.xml$/,"tableStyles",null],[/presProps\.xml$/,"presProps",null],[/viewProps\.xml$/,"viewProps",null],[/theme\d+\.xml$/,"theme",null],[/slide\d+\.xml$/,"slide",null],[/colors\d+\.xml$/,"diagramColor",null],[/data\d+\.xml$/,"diagramData",null],[/layout\d+\.xml$/,"diagramLayout",null],[/quickStyle\d+\.xml$/,"diagramStyle",null],[/drawing\d+\.xml$/,"diagramDrawing",null],[/slideLayout\d+\.xml$/,"slideLayout",null],[/slideMaster\d+\.xml$/,"slideMaster",null],[/notesSlide\d+\.xml$/,"notesSlide",null],[/notesMaster\d+\.xml$/,"notesMaster",null],[/presentation\.xml$/,"presentation",null],[/\.rels$/,"relationship","rels"],[/\.svg$/i,"image/svg+xml","svg"],[/\.gif$/i,"image/gif","gif"],[/\.png$/i,"image/png","png"],[/\.jpg$/i,"image/jpeg","jpg"],[/\.jpeg$/i,"image/jpeg","jpeg"],[/\.wmf$/i,"image/x-wmf","wmf"],[/\.mp4$/i,"video/mp4","mp4"],[/\.mp3$/i,"audio/mpeg","mp3"],[/\.fntdata$/i,"font","fntdata"]];function tn(e){for(const[t,n,r]of Ps)if(t.test(e))return[n,r]}const nr={jpeg:"image/jpeg",jpg:"image/jpeg",png:"image/png",webp:"image/webp",svg:"image/svg+xml",mp3:"audio/mpeg",mp4:"video/mp4",mov:"video/quicktime"},Ss=Object.fromEntries(Object.entries(nr).map(([e,t])=>[t,e]));function at(e){if(typeof e!="object"||!e)return e;if(Array.isArray(e))return e.map(n=>at(n));const t={};for(const n in e){const r=e[n];r!=null&&(t[n]=at(r))}return t}function en(...e){const t=[];for(let r of e){if(typeof r!="string")throw new TypeError("All arguments to pathJoin must be strings");r=r.trim(),r!==""&&(r=r.replace(/^\/+|\/+$/g,""),r&&t.push(r))}const n=t.join("/");return rr(n)}function rr(e){const t=e.startsWith("/"),n=e.split("/"),r=[];for(const s of n)s===""||s==="."||(s===".."?r.length>0&&r[r.length-1]!==".."?r.pop():t||r.push(".."):r.push(s));return(t?"/":"")+r.join("/")||(t?"/":".")}const ar=["a:noFill","a:blipFill","p:blipFill","a:gradFill","a:grpFill","a:pattFill","a:solidFill"],$t=`*[(${ar.map(e=>`self::${e}`).join(" or ")})]`;function At(e,t){if(e&&!ar.includes(e?.name)&&(e=e.find($t)),!!e)switch(e.name){case"a:blipFill":case"p:blipFill":return nn(e,t);case"a:solidFill":return{...Tt(e,t)};case"a:gradFill":return sr(e,t);case"a:grpFill":return t?.parents?.length?t.parents[t.parents.length-1]?.fill:void 0;case"a:pattFill":return;case"a:noFill":default:return}}function nn(e,t){if(!e)return;const n=e.attr("a:blip/a:extLst//a:ext/asvg:svgBlip/@r:embed")??e.attr("a:blip/@r:embed");let r;t?.drawing?r=t?.drawing.rels.find(p=>p.id===n)?.path:r=t?.rels?.find(p=>p.id===n)?.path,r=r??n;const a=e.find("a:srcRect"),s=a?at({top:a.attr("@t","ST_Percentage"),right:a.attr("@r","ST_Percentage"),bottom:a.attr("@b","ST_Percentage"),left:a.attr("@l","ST_Percentage")}):void 0,i=e.find("a:stretch/a:fillRect"),o=i?at({top:i.attr("@t","ST_Percentage"),right:i.attr("@r","ST_Percentage"),bottom:i.attr("@b","ST_Percentage"),left:i.attr("@l","ST_Percentage")}):void 0,l=e.find("a:tile"),c=l?at({scaleX:l.attr("@sx","ST_Percentage"),scaleY:l.attr("@sy","ST_Percentage"),alignment:l.attr("@algn"),translateX:l.attr("@tx","ST_Percentage"),translateY:l.attr("@ty","ST_Percentage"),flip:l.attr("@flip")}):void 0;return{image:r,cropRect:s&&Object.keys(s).length>0?s:void 0,stretchRect:o&&Object.keys(o).length>0?o:void 0,dpi:e.attr("@dpi","number"),opacity:e.attr("a:blip/a:alphaModFix/@amt","ST_PositivePercentage"),tile:c&&Object.keys(c).length>0?c:void 0,rotateWithShape:e.attr("@rotWithShape","boolean")}}function sr(e,t){if(!e)return;const n=e.get("a:gsLst/a:gs").map(r=>({...Tt(r,t),offset:r.attr("@pos","positiveFixedPercentage")??0})).filter(({color:r})=>r).sort((r,a)=>r.offset-a.offset);if(n.length)return e.attr("a:path/@path")==="circle"?{radialGradient:{stops:n}}:{linearGradient:{angle:e.attr("a:lin/@ang","positiveFixedAngle")??0,stops:n}}}function te(e,t=!1){if(e){if(e.image||t){const n=t?"p:blipFill":"a:blipFill",r=e.image??e.image;return`<${n}${G([C("dpi",N.encode(e.dpi,"number")),C("rotWithShape",N.encode(e.rotateWithShape,"boolean"))])}> <a:blip${G([C("r:embed",r)])}> ${W([e.opacity!==void 0&&`<a:alphaModFix amt="${N.encode(e.opacity,"ST_PositivePercentage")}" />`])} <a:lum/> </a:blip> <a:srcRect${G([!!e.cropRect?.top&&C("t",N.encode(e.cropRect?.top,"ST_Percentage")),!!e.cropRect?.right&&C("r",N.encode(e.cropRect?.right,"ST_Percentage")),!!e.cropRect?.bottom&&C("b",N.encode(e.cropRect?.bottom,"ST_Percentage")),!!e.cropRect?.left&&C("l",N.encode(e.cropRect?.left,"ST_Percentage"))])}/> <a:stretch> <a:fillRect${G([!!e.stretchRect?.top&&C("t",N.encode(e.stretchRect?.top,"ST_Percentage")),!!e.stretchRect?.right&&C("r",N.encode(e.stretchRect?.right,"ST_Percentage")),!!e.stretchRect?.bottom&&C("b",N.encode(e.stretchRect?.bottom,"ST_Percentage")),!!e.stretchRect?.left&&C("l",N.encode(e.stretchRect?.left,"ST_Percentage"))])}/> </a:stretch> </${n}>`}else{if(e.linearGradient||e.radialGradient)return ir(e);if(e.color)return rn(e.color)}return"<a:noFill/>"}}function rn(e){return`<a:solidFill> ${W(Ze(e))} </a:solidFill>`}function ir(e){const{linearGradient:t}=e;if(t){const{angle:n,stops:r}=t,a=N.encode((n+360)%360,"positiveFixedAngle"),s=r.map(i=>{const{offset:o,color:l}=i;return`<a:gs pos="${o*1e5}"> ${W(Ze(l))} </a:gs>`});return`<a:gradFill> <a:gsLst> ${W(s,2)} </a:gsLst> <a:lin${G([C("ang",a),C("scaled",0)])}/> </a:gradFill>`}else return}function or(e){if(e)return e?.get("*").reduce((t,n)=>{const r=n.name.match(/a:(\w+)Font/)?.[1];return r&&(t[r]=at({complexScript:n.attr("a:cs/@typeface")||void 0,eastasian:n.attr("a:ea/@typeface")||void 0,latin:n.attr("a:latin/@typeface")||void 0,symbol:n.attr("a:sym/@typeface")||void 0})),t},{})}function bs(e,t,n=2){const r=t&&t.length,a=r?t[0]*n:e.length;let s=lr(e,0,a,n,!0);const i=[];if(!s||s.next===s.prev)return i;let o,l,c;if(r&&(s=Fs(e,t,s,n)),e.length>80*n){o=e[0],l=e[1];let p=o,h=l;for(let f=n;f<a;f+=n){const d=e[f],u=e[f+1];d<o&&(o=d),u<l&&(l=u),d>p&&(p=d),u>h&&(h=u)}c=Math.max(p-o,h-l),c=c!==0?32767/c:0}return ee(s,i,n,o,l,c,0),i}function lr(e,t,n,r,a){let s;if(a===Ds(e,t,n,r)>0)for(let i=t;i<n;i+=r)s=ur(i/r|0,e[i],e[i+1],s);else for(let i=n-r;i>=t;i-=r)s=ur(i/r|0,e[i],e[i+1],s);return s&&qt(s,s.next)&&(ae(s),s=s.next),s}function Bt(e,t){if(!e)return e;t||(t=e);let n=e,r;do if(r=!1,!n.steiner&&(qt(n,n.next)||Q(n.prev,n,n.next)===0)){if(ae(n),n=t=n.prev,n===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function ee(e,t,n,r,a,s,i){if(!e)return;!i&&s&&Bs(e,r,a,s);let o=e;for(;e.prev!==e.next;){const l=e.prev,c=e.next;if(s?Cs(e,r,a,s):ws(e)){t.push(l.i,e.i,c.i),ae(e),e=c.next,o=c.next;continue}if(e=c,e===o){i?i===1?(e=Ts(Bt(e),t),ee(e,t,n,r,a,s,2)):i===2&&Ms(e,t,n,r,a,s):ee(Bt(e),t,n,r,a,s,1);break}}}function ws(e){const t=e.prev,n=e,r=e.next;if(Q(t,n,r)>=0)return!1;const a=t.x,s=n.x,i=r.x,o=t.y,l=n.y,c=r.y,p=Math.min(a,s,i),h=Math.min(o,l,c),f=Math.max(a,s,i),d=Math.max(o,l,c);let u=r.next;for(;u!==t;){if(u.x>=p&&u.x<=f&&u.y>=h&&u.y<=d&&ne(a,o,s,l,i,c,u.x,u.y)&&Q(u.prev,u,u.next)>=0)return!1;u=u.next}return!0}function Cs(e,t,n,r){const a=e.prev,s=e,i=e.next;if(Q(a,s,i)>=0)return!1;const o=a.x,l=s.x,c=i.x,p=a.y,h=s.y,f=i.y,d=Math.min(o,l,c),u=Math.min(p,h,f),g=Math.max(o,l,c),m=Math.max(p,h,f),b=an(d,u,t,n,r),S=an(g,m,t,n,r);let y=e.prevZ,x=e.nextZ;for(;y&&y.z>=b&&x&&x.z<=S;){if(y.x>=d&&y.x<=g&&y.y>=u&&y.y<=m&&y!==a&&y!==i&&ne(o,p,l,h,c,f,y.x,y.y)&&Q(y.prev,y,y.next)>=0||(y=y.prevZ,x.x>=d&&x.x<=g&&x.y>=u&&x.y<=m&&x!==a&&x!==i&&ne(o,p,l,h,c,f,x.x,x.y)&&Q(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;y&&y.z>=b;){if(y.x>=d&&y.x<=g&&y.y>=u&&y.y<=m&&y!==a&&y!==i&&ne(o,p,l,h,c,f,y.x,y.y)&&Q(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;x&&x.z<=S;){if(x.x>=d&&x.x<=g&&x.y>=u&&x.y<=m&&x!==a&&x!==i&&ne(o,p,l,h,c,f,x.x,x.y)&&Q(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function Ts(e,t){let n=e;do{const r=n.prev,a=n.next.next;!qt(r,a)&&pr(r,n,n.next,a)&&re(r,a)&&re(a,r)&&(t.push(r.i,n.i,a.i),ae(n),ae(n.next),n=e=a),n=n.next}while(n!==e);return Bt(n)}function Ms(e,t,n,r,a,s){let i=e;do{let o=i.next.next;for(;o!==i.prev;){if(i.i!==o.i&&_s(i,o)){let l=hr(i,o);i=Bt(i,i.next),l=Bt(l,l.next),ee(i,t,n,r,a,s,0),ee(l,t,n,r,a,s,0);return}o=o.next}i=i.next}while(i!==e)}function Fs(e,t,n,r){const a=[];for(let s=0,i=t.length;s<i;s++){const o=t[s]*r,l=s<i-1?t[s+1]*r:e.length,c=lr(e,o,l,r,!1);c===c.next&&(c.steiner=!0),a.push(Es(c))}a.sort(Ls);for(let s=0;s<a.length;s++)n=ks(a[s],n);return n}function Ls(e,t){let n=e.x-t.x;if(n===0&&(n=e.y-t.y,n===0)){const r=(e.next.y-e.y)/(e.next.x-e.x),a=(t.next.y-t.y)/(t.next.x-t.x);n=r-a}return n}function ks(e,t){const n=$s(e,t);if(!n)return t;const r=hr(n,e);return Bt(r,r.next),Bt(n,n.next)}function $s(e,t){let n=t;const r=e.x