desi76-uis 0.1.4 → 0.1.5
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/dist/public/_app/immutable/chunks/BJ0Rqg4s.js +1 -0
- package/dist/public/_app/immutable/chunks/BMdDwoOW.js +1 -0
- package/dist/public/_app/immutable/chunks/CGdBQPRq.js +1 -0
- package/dist/public/_app/immutable/chunks/CWgYyrry.js +1 -0
- package/dist/public/_app/immutable/chunks/{CK7by8jY.js → Ch8Sg1Yb.js} +1 -1
- package/dist/public/_app/immutable/chunks/{DS7v80KP.js → Cr5YyIwe.js} +1 -1
- package/dist/public/_app/immutable/chunks/D21nCqkP.js +3 -0
- package/dist/public/_app/immutable/chunks/KsMQ8T7s.js +212 -0
- package/dist/public/_app/immutable/chunks/NZTpNUN0.js +1 -0
- package/dist/public/_app/immutable/chunks/jFB1Qau7.js +1 -0
- package/dist/public/_app/immutable/chunks/pm0gKOHf.js +1 -0
- package/dist/public/_app/immutable/entry/app.rWHD6Emv.js +2 -0
- package/dist/public/_app/immutable/entry/start.DoneUc4T.js +1 -0
- package/dist/public/_app/immutable/nodes/{0.BqRHARdi.js → 0.BoCRNJg2.js} +2 -2
- package/dist/public/_app/immutable/nodes/1.BLJtiaWE.js +1 -0
- package/dist/public/_app/immutable/nodes/{2.r7UppAc0.js → 2.BXQOtzzs.js} +1 -1
- package/dist/public/_app/immutable/nodes/{3.DW-iX7zv.js → 3.CjkLacQ9.js} +2 -2
- package/dist/public/_app/version.json +1 -1
- package/dist/public/desi76/catamaran.html +20 -20
- package/dist/public/desi76/voila.html +20 -20
- package/dist/public/index.html +18 -18
- package/package.json +4 -4
- package/dist/public/_app/immutable/chunks/BKdNeMqa.js +0 -1
- package/dist/public/_app/immutable/chunks/BNjcc32Y.js +0 -1
- package/dist/public/_app/immutable/chunks/BOrZJ9wv.js +0 -1
- package/dist/public/_app/immutable/chunks/BxJOUYDg.js +0 -212
- package/dist/public/_app/immutable/chunks/CEHVxybU.js +0 -1
- package/dist/public/_app/immutable/chunks/CWj6FrbW.js +0 -1
- package/dist/public/_app/immutable/chunks/CfOtT4kq.js +0 -3
- package/dist/public/_app/immutable/chunks/CkvDUNFw.js +0 -1
- package/dist/public/_app/immutable/chunks/fGd2jOqN.js +0 -1
- package/dist/public/_app/immutable/entry/app.C55m83Nl.js +0 -2
- package/dist/public/_app/immutable/entry/start.CcMSN52c.js +0 -1
- package/dist/public/_app/immutable/nodes/1.C44HVQn_.js +0 -1
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
var ta=Object.defineProperty;var na=(e,n,t)=>n in e?ta(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var L=(e,n,t)=>na(e,typeof n!="symbol"?n+"":n,t);import{ao as ra,C as sa,ap as Ei,Z as ar,D as mt,N as ia,E as oa,P as us,a9 as aa,V as ua,X as ca,Y as cs,_ as ur,M as tn,aq as la,ar as fa,$ as Fi,J as Si,a0 as da,as as cr,at as ki,a4 as pa,au as ls,av as Wr,aw as fs,ax as Hr,ai as ha,ay as ds,j as ma,az as xa,aA as Da,aB as ga,aC as wa,L as ya,aD as ba,aE as _a,aF as Aa,aG as va,aH as Ca,aI as Ea,aJ as Fa,aK as Sa}from"./fGd2jOqN.js";function Pl(e,n){return n}function ka(e,n,t,r){for(var s=[],i=n.length,o=0;o<i;o++)Da(n[o].e,s,!0);var a=i>0&&s.length===0&&t!==null;if(a){var u=t.parentNode;ga(u),u.append(t),r.clear(),Tt(e,n[0].prev,n[i-1].next)}wa(s,()=>{for(var l=0;l<i;l++){var c=n[l];a||(r.delete(c.k),Tt(e,c.prev,c.next)),ya(c.e,!a)}})}function Bl(e,n,t,r,s,i=null){var o=e,a={flags:n,items:new Map,first:null},u=(n&Ei)!==0;if(u){var l=e;o=mt?ar(ia(l)):l.appendChild(ra())}mt&&oa();var c=null,h=!1,m=aa(()=>{var x=t();return ma(x)?x:x==null?[]:ki(x)});sa(()=>{var x=us(m),y=x.length;if(h&&y===0)return;h=y===0;let f=!1;if(mt){var d=ua(o)===ca;d!==(y===0)&&(o=cs(),ar(o),ur(!1),f=!0)}if(mt){for(var p=null,D,g=0;g<y;g++){if(tn.nodeType===la&&tn.data===fa){o=tn,f=!0,ur(!1);break}var _=x[g],w=r(_,g);D=Ti(tn,a,p,null,_,w,g,s,n,t),a.items.set(w,D),p=D}y>0&&ar(cs())}mt||Ta(x,a,o,s,n,r,t),i!==null&&(y===0?c?Fi(c):c=Si(()=>i(o)):c!==null&&da(c,()=>{c=null})),f&&ur(!0),us(m)}),mt&&(o=tn)}function Ta(e,n,t,r,s,i,o){var U,N,I,q;var a=(s&xa)!==0,u=(s&(Wr|Hr))!==0,l=e.length,c=n.items,h=n.first,m=h,x,y=null,f,d=[],p=[],D,g,_,w;if(a)for(w=0;w<l;w+=1)D=e[w],g=i(D,w),_=c.get(g),_!==void 0&&((U=_.a)==null||U.measure(),(f??(f=new Set)).add(_));for(w=0;w<l;w+=1){if(D=e[w],g=i(D,w),_=c.get(g),_===void 0){var b=m?m.e.nodes_start:t;y=Ti(b,n,y,y===null?n.first:y.next,D,g,w,r,s,o),c.set(g,y),d=[],p=[],m=y.next;continue}if(u&&Pa(_,D,w,s),(_.e.f&cr)!==0&&(Fi(_.e),a&&((N=_.a)==null||N.unfix(),(f??(f=new Set)).delete(_))),_!==m){if(x!==void 0&&x.has(_)){if(d.length<p.length){var v=p[0],A;y=v.prev;var E=d[0],k=d[d.length-1];for(A=0;A<d.length;A+=1)ps(d[A],v,t);for(A=0;A<p.length;A+=1)x.delete(p[A]);Tt(n,E.prev,k.next),Tt(n,y,E),Tt(n,k,v),m=v,y=k,w-=1,d=[],p=[]}else x.delete(_),ps(_,m,t),Tt(n,_.prev,_.next),Tt(n,_,y===null?n.first:y.next),Tt(n,y,_),y=_;continue}for(d=[],p=[];m!==null&&m.k!==g;)(m.e.f&cr)===0&&(x??(x=new Set)).add(m),p.push(m),m=m.next;if(m===null)continue;_=m}d.push(_),y=_,m=_.next}if(m!==null||x!==void 0){for(var F=x===void 0?[]:ki(x);m!==null;)(m.e.f&cr)===0&&F.push(m),m=m.next;var $=F.length;if($>0){var M=(s&Ei)!==0&&l===0?t:null;if(a){for(w=0;w<$;w+=1)(I=F[w].a)==null||I.measure();for(w=0;w<$;w+=1)(q=F[w].a)==null||q.fix()}ka(n,F,M,c)}}a&&pa(()=>{var R;if(f!==void 0)for(_ of f)(R=_.a)==null||R.apply()}),ls.first=n.first&&n.first.e,ls.last=y&&y.e}function Pa(e,n,t,r){(r&Wr)!==0&&fs(e.v,n),(r&Hr)!==0?fs(e.i,t):e.i=t}function Ti(e,n,t,r,s,i,o,a,u,l){var c=(u&Wr)!==0,h=(u&ba)===0,m=c?h?ha(s,!1,!1):ds(s):s,x=(u&Hr)===0?o:ds(o),y={i:x,v:m,k:i,a:null,e:null,prev:t,next:r};try{return y.e=Si(()=>a(e,m,x,l),mt),y.e.prev=t&&t.e,y.e.next=r&&r.e,t===null?n.first=y:(t.next=y,t.e.next=y.e),r!==null&&(r.prev=y,r.e.prev=y.e),y}finally{}}function ps(e,n,t){for(var r=e.next?e.next.e.nodes_start:t,s=n?n.e.nodes_start:t,i=e.e.nodes_start;i!==r;){var o=_a(i);s.before(i),i=o}}function Tt(e,n,t){n===null?e.first=t:(n.next=t,n.e.next=t&&t.e),t!==null&&(t.prev=n,t.e.prev=n&&n.e)}const Ba=Symbol("is custom element"),Ma=Symbol("is html");function Ml(e){if(mt){var n=!1,t=()=>{if(!n){if(n=!0,e.hasAttribute("value")){var r=e.value;hs(e,"value",null),e.value=r}if(e.hasAttribute("checked")){var s=e.checked;hs(e,"checked",null),e.checked=s}}};e.__on_r=t,Fa(t),Sa()}}function Il(e,n){var t=Yr(e);t.value===(t.value=n??void 0)||e.value===n&&(n!==0||e.nodeName!=="PROGRESS")||(e.value=n??"")}function Ll(e,n){var t=Yr(e);t.checked!==(t.checked=n)&&(e.checked=n)}function hs(e,n,t,r){var s=Yr(e);mt&&(s[n]=e.getAttribute(n),n==="src"||n==="srcset"||n==="href"&&e.nodeName==="LINK")||s[n]!==(s[n]=t)&&(n==="loading"&&(e[Aa]=t),t==null?e.removeAttribute(n):typeof t!="string"&&Ia(e).includes(n)?e[n]=t:e.setAttribute(n,t))}function Yr(e){return e.__attributes??(e.__attributes={[Ba]:e.nodeName.includes("-"),[Ma]:e.namespaceURI===va})}var ms=new Map;function Ia(e){var n=ms.get(e.nodeName);if(n)return n;ms.set(e.nodeName,n=[]);for(var t,r=e,s=Element.prototype;s!==r;){t=Ea(r);for(var i in t)t[i].set&&n.push(i);r=Ca(r)}return n}const fn=15,Fr=30,Sr=19,La=29,Un=256,Gr=Un+1+La,xs=2*Gr+1,nn=256,$a=7,Ds=16,gs=17,ws=18,lr=8*2,Vn=-1,Oa=1,_n=2,Na=0,Gt=0,ys=1,Ra=3,Te=4,Qe=0,Pi=1,An=2,et=-2,Ua=-3,Ht=-5;function Zn(e){return Xn(e.map(([n,t])=>new Array(n).fill(t,0,n)))}function Xn(e){return e.reduce((n,t)=>n.concat(Array.isArray(t)?Xn(t):t),[])}const bs=[0,1,2,3].concat(...Zn([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function oe(){const e=this;function n(s){const i=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.extra_bits,u=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,h,m,x,y,f,d=0;for(x=0;x<=fn;x++)s.bl_count[x]=0;for(i[s.heap[s.heap_max]*2+1]=0,c=s.heap_max+1;c<xs;c++)h=s.heap[c],x=i[i[h*2+1]*2+1]+1,x>l&&(x=l,d++),i[h*2+1]=x,!(h>e.max_code)&&(s.bl_count[x]++,y=0,h>=u&&(y=a[h-u]),f=i[h*2],s.opt_len+=f*(x+y),o&&(s.static_len+=f*(o[h*2+1]+y)));if(d!==0){do{for(x=l-1;s.bl_count[x]===0;)x--;s.bl_count[x]--,s.bl_count[x+1]+=2,s.bl_count[l]--,d-=2}while(d>0);for(x=l;x!==0;x--)for(h=s.bl_count[x];h!==0;)m=s.heap[--c],!(m>e.max_code)&&(i[m*2+1]!=x&&(s.opt_len+=(x-i[m*2+1])*i[m*2],i[m*2+1]=x),h--)}}function t(s,i){let o=0;do o|=s&1,s>>>=1,o<<=1;while(--i>0);return o>>>1}function r(s,i,o){const a=[];let u=0,l,c,h;for(l=1;l<=fn;l++)a[l]=u=u+o[l-1]<<1;for(c=0;c<=i;c++)h=s[c*2+1],h!==0&&(s[c*2]=t(a[h]++,h))}e.build_tree=function(s){const i=e.dyn_tree,o=e.stat_desc.static_tree,a=e.stat_desc.elems;let u,l,c=-1,h;for(s.heap_len=0,s.heap_max=xs,u=0;u<a;u++)i[u*2]!==0?(s.heap[++s.heap_len]=c=u,s.depth[u]=0):i[u*2+1]=0;for(;s.heap_len<2;)h=s.heap[++s.heap_len]=c<2?++c:0,i[h*2]=1,s.depth[h]=0,s.opt_len--,o&&(s.static_len-=o[h*2+1]);for(e.max_code=c,u=Math.floor(s.heap_len/2);u>=1;u--)s.pqdownheap(i,u);h=a;do u=s.heap[1],s.heap[1]=s.heap[s.heap_len--],s.pqdownheap(i,1),l=s.heap[1],s.heap[--s.heap_max]=u,s.heap[--s.heap_max]=l,i[h*2]=i[u*2]+i[l*2],s.depth[h]=Math.max(s.depth[u],s.depth[l])+1,i[u*2+1]=i[l*2+1]=h,s.heap[1]=h++,s.pqdownheap(i,1);while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1],n(s),r(i,e.max_code,s.bl_count)}}oe._length_code=[0,1,2,3,4,5,6,7].concat(...Zn([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]]));oe.base_length=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0];oe.base_dist=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576];oe.d_code=function(e){return e<256?bs[e]:bs[256+(e>>>7)]};oe.extra_lbits=[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];oe.extra_dbits=[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];oe.extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];oe.bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function Ae(e,n,t,r,s){const i=this;i.static_tree=e,i.extra_bits=n,i.extra_base=t,i.elems=r,i.max_length=s}const Va=[12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227],qa=Zn([[144,8],[112,9],[24,7],[8,8]]);Ae.static_ltree=Xn(Va.map((e,n)=>[e,qa[n]]));const ja=[0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23],Wa=Zn([[30,5]]);Ae.static_dtree=Xn(ja.map((e,n)=>[e,Wa[n]]));Ae.static_l_desc=new Ae(Ae.static_ltree,oe.extra_lbits,Un+1,Gr,fn);Ae.static_d_desc=new Ae(Ae.static_dtree,oe.extra_dbits,0,Fr,fn);Ae.static_bl_desc=new Ae(null,oe.extra_blbits,0,Sr,$a);const Ha=9,Ya=8;function st(e,n,t,r,s){const i=this;i.good_length=e,i.max_lazy=n,i.nice_length=t,i.max_chain=r,i.func=s}const Bi=0,Ln=1,Rt=2,Je=[new st(0,0,0,0,Bi),new st(4,4,8,4,Ln),new st(4,5,16,8,Ln),new st(4,6,32,32,Ln),new st(4,4,16,16,Rt),new st(8,16,32,32,Rt),new st(8,16,128,128,Rt),new st(8,32,128,256,Rt),new st(32,128,258,1024,Rt),new st(32,258,258,4096,Rt)],vn=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Ue=0,Cn=1,rn=2,En=3,Ga=32,fr=42,Fn=113,sn=666,dr=8,Za=0,pr=1,Xa=2,ue=3,$n=258,Oe=$n+ue+1;function _s(e,n,t,r){const s=e[n*2],i=e[t*2];return s<i||s==i&&r[n]<=r[t]}function Ka(){const e=this;let n,t,r,s,i,o,a,u,l,c,h,m,x,y,f,d,p,D,g,_,w,b,v,A,E,k,F,$,M,U,N,I,q;const R=new oe,fe=new oe,V=new oe;e.depth=[];let pe,W,Z,ke,we,he;e.bl_count=[],e.heap=[],N=[],I=[],q=[];function ft(){l=2*i,h[x-1]=0;for(let C=0;C<x-1;C++)h[C]=0;k=Je[F].max_lazy,M=Je[F].good_length,U=Je[F].nice_length,E=Je[F].max_chain,w=0,p=0,v=0,D=A=ue-1,_=0,m=0}function nt(){let C;for(C=0;C<Gr;C++)N[C*2]=0;for(C=0;C<Fr;C++)I[C*2]=0;for(C=0;C<Sr;C++)q[C*2]=0;N[nn*2]=1,e.opt_len=e.static_len=0,W=Z=0}function bt(){R.dyn_tree=N,R.stat_desc=Ae.static_l_desc,fe.dyn_tree=I,fe.stat_desc=Ae.static_d_desc,V.dyn_tree=q,V.stat_desc=Ae.static_bl_desc,we=0,he=0,ke=8,nt()}e.pqdownheap=function(C,P){const T=e.heap,B=T[P];let O=P<<1;for(;O<=e.heap_len&&(O<e.heap_len&&_s(C,T[O+1],T[O],e.depth)&&O++,!_s(C,B,T[O],e.depth));)T[P]=T[O],P=O,O<<=1;T[P]=B};function _t(C,P){let T=-1,B,O=C[0*2+1],j=0,Q=7,Ce=4;O===0&&(Q=138,Ce=3),C[(P+1)*2+1]=65535;for(let Ke=0;Ke<=P;Ke++)B=O,O=C[(Ke+1)*2+1],!(++j<Q&&B==O)&&(j<Ce?q[B*2]+=j:B!==0?(B!=T&&q[B*2]++,q[Ds*2]++):j<=10?q[gs*2]++:q[ws*2]++,j=0,T=B,O===0?(Q=138,Ce=3):B==O?(Q=6,Ce=3):(Q=7,Ce=4))}function yn(){let C;for(_t(N,R.max_code),_t(I,fe.max_code),V.build_tree(e),C=Sr-1;C>=3&&q[oe.bl_order[C]*2+1]===0;C--);return e.opt_len+=3*(C+1)+5+5+4,C}function Ye(C){e.pending_buf[e.pending++]=C}function dt(C){Ye(C&255),Ye(C>>>8&255)}function Qt(C){Ye(C>>8&255),Ye(C&255&255)}function xe(C,P){let T;const B=P;he>lr-B?(T=C,we|=T<<he&65535,dt(we),we=T>>>lr-he,he+=B-lr):(we|=C<<he&65535,he+=B)}function De(C,P){const T=C*2;xe(P[T]&65535,P[T+1]&65535)}function At(C,P){let T,B=-1,O,j=C[0*2+1],Q=0,Ce=7,Ke=4;for(j===0&&(Ce=138,Ke=3),T=0;T<=P;T++)if(O=j,j=C[(T+1)*2+1],!(++Q<Ce&&O==j)){if(Q<Ke)do De(O,q);while(--Q!==0);else O!==0?(O!=B&&(De(O,q),Q--),De(Ds,q),xe(Q-3,2)):Q<=10?(De(gs,q),xe(Q-3,3)):(De(ws,q),xe(Q-11,7));Q=0,B=O,j===0?(Ce=138,Ke=3):O==j?(Ce=6,Ke=3):(Ce=7,Ke=4)}}function pt(C,P,T){let B;for(xe(C-257,5),xe(P-1,5),xe(T-4,4),B=0;B<T;B++)xe(q[oe.bl_order[B]*2+1],3);At(N,C-1),At(I,P-1)}function Ge(){he==16?(dt(we),we=0,he=0):he>=8&&(Ye(we&255),we>>>=8,he-=8)}function Ze(){xe(pr<<1,3),De(nn,Ae.static_ltree),Ge(),1+ke+10-he<9&&(xe(pr<<1,3),De(nn,Ae.static_ltree),Ge()),ke=7}function ye(C,P){let T,B,O;if(e.dist_buf[W]=C,e.lc_buf[W]=P&255,W++,C===0?N[P*2]++:(Z++,C--,N[(oe._length_code[P]+Un+1)*2]++,I[oe.d_code(C)*2]++),(W&8191)===0&&F>2){for(T=W*8,B=w-p,O=0;O<Fr;O++)T+=I[O*2]*(5+oe.extra_dbits[O]);if(T>>>=3,Z<Math.floor(W/2)&&T<Math.floor(B/2))return!0}return W==pe-1}function rt(C,P){let T,B,O=0,j,Q;if(W!==0)do T=e.dist_buf[O],B=e.lc_buf[O],O++,T===0?De(B,C):(j=oe._length_code[B],De(j+Un+1,C),Q=oe.extra_lbits[j],Q!==0&&(B-=oe.base_length[j],xe(B,Q)),T--,j=oe.d_code(T),De(j,P),Q=oe.extra_dbits[j],Q!==0&&(T-=oe.base_dist[j],xe(T,Q)));while(O<W);De(nn,C),ke=C[nn*2+1]}function Xe(){he>8?dt(we):he>0&&Ye(we&255),we=0,he=0}function sr(C,P,T){Xe(),ke=8,dt(P),dt(~P),e.pending_buf.set(u.subarray(C,C+P),e.pending),e.pending+=P}function bn(C,P,T){xe((Za<<1)+(T?1:0),3),sr(C,P)}function en(C,P,T){let B,O,j=0;F>0?(R.build_tree(e),fe.build_tree(e),j=yn(),B=e.opt_len+3+7>>>3,O=e.static_len+3+7>>>3,O<=B&&(B=O)):B=O=P+5,P+4<=B&&C!=-1?bn(C,P,T):O==B?(xe((pr<<1)+(T?1:0),3),rt(Ae.static_ltree,Ae.static_dtree)):(xe((Xa<<1)+(T?1:0),3),pt(R.max_code+1,fe.max_code+1,j+1),rt(N,I)),nt(),T&&Xe()}function vt(C){en(p>=0?p:-1,w-p,C),p=w,n.flush_pending()}function ir(){let C,P,T,B;do{if(B=l-v-w,B===0&&w===0&&v===0)B=i;else if(B==-1)B--;else if(w>=i+i-Oe){u.set(u.subarray(i,i+i),0),b-=i,w-=i,p-=i,C=x,T=C;do P=h[--T]&65535,h[T]=P>=i?P-i:0;while(--C!==0);C=i,T=C;do P=c[--T]&65535,c[T]=P>=i?P-i:0;while(--C!==0);B+=i}if(n.avail_in===0)return;C=n.read_buf(u,w+v,B),v+=C,v>=ue&&(m=u[w]&255,m=(m<<d^u[w+1]&255)&f)}while(v<Oe&&n.avail_in!==0)}function Jo(C){let P=65535,T;for(P>r-5&&(P=r-5);;){if(v<=1){if(ir(),v===0&&C==Gt)return Ue;if(v===0)break}if(w+=v,v=0,T=p+P,(w===0||w>=T)&&(v=w-T,w=T,vt(!1),n.avail_out===0)||w-p>=i-Oe&&(vt(!1),n.avail_out===0))return Ue}return vt(C==Te),n.avail_out===0?C==Te?rn:Ue:C==Te?En:Cn}function is(C){let P=E,T=w,B,O,j=A;const Q=w>i-Oe?w-(i-Oe):0;let Ce=U;const Ke=a,or=w+$n;let os=u[T+j-1],as=u[T+j];A>=M&&(P>>=2),Ce>v&&(Ce=v);do if(B=C,!(u[B+j]!=as||u[B+j-1]!=os||u[B]!=u[T]||u[++B]!=u[T+1])){T+=2,B++;do;while(u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&u[++T]==u[++B]&&T<or);if(O=$n-(or-T),T=or-$n,O>j){if(b=C,j=O,O>=Ce)break;os=u[T+j-1],as=u[T+j]}}while((C=c[C&Ke]&65535)>Q&&--P!==0);return j<=v?j:v}function zo(C){let P=0,T;for(;;){if(v<Oe){if(ir(),v<Oe&&C==Gt)return Ue;if(v===0)break}if(v>=ue&&(m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w),P!==0&&(w-P&65535)<=i-Oe&&$!=_n&&(D=is(P)),D>=ue)if(T=ye(w-b,D-ue),v-=D,D<=k&&v>=ue){D--;do w++,m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w;while(--D!==0);w++}else w+=D,D=0,m=u[w]&255,m=(m<<d^u[w+1]&255)&f;else T=ye(0,u[w]&255),v--,w++;if(T&&(vt(!1),n.avail_out===0))return Ue}return vt(C==Te),n.avail_out===0?C==Te?rn:Ue:C==Te?En:Cn}function Qo(C){let P=0,T,B;for(;;){if(v<Oe){if(ir(),v<Oe&&C==Gt)return Ue;if(v===0)break}if(v>=ue&&(m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w),A=D,g=b,D=ue-1,P!==0&&A<k&&(w-P&65535)<=i-Oe&&($!=_n&&(D=is(P)),D<=5&&($==Oa||D==ue&&w-b>4096)&&(D=ue-1)),A>=ue&&D<=A){B=w+v-ue,T=ye(w-1-g,A-ue),v-=A-1,A-=2;do++w<=B&&(m=(m<<d^u[w+(ue-1)]&255)&f,P=h[m]&65535,c[w&a]=h[m],h[m]=w);while(--A!==0);if(_=0,D=ue-1,w++,T&&(vt(!1),n.avail_out===0))return Ue}else if(_!==0){if(T=ye(0,u[w-1]&255),T&&vt(!1),w++,v--,n.avail_out===0)return Ue}else _=1,w++,v--}return _!==0&&(T=ye(0,u[w-1]&255),_=0),vt(C==Te),n.avail_out===0?C==Te?rn:Ue:C==Te?En:Cn}function ea(C){return C.total_in=C.total_out=0,C.msg=null,e.pending=0,e.pending_out=0,t=Fn,s=Gt,bt(),ft(),Qe}e.deflateInit=function(C,P,T,B,O,j){return B||(B=dr),O||(O=Ya),j||(j=Na),C.msg=null,P==Vn&&(P=6),O<1||O>Ha||B!=dr||T<9||T>15||P<0||P>9||j<0||j>_n?et:(C.dstate=e,o=T,i=1<<o,a=i-1,y=O+7,x=1<<y,f=x-1,d=Math.floor((y+ue-1)/ue),u=new Uint8Array(i*2),c=[],h=[],pe=1<<O+6,e.pending_buf=new Uint8Array(pe*4),r=pe*4,e.dist_buf=new Uint16Array(pe),e.lc_buf=new Uint8Array(pe),F=P,$=j,ea(C))},e.deflateEnd=function(){return t!=fr&&t!=Fn&&t!=sn?et:(e.lc_buf=null,e.dist_buf=null,e.pending_buf=null,h=null,c=null,u=null,e.dstate=null,t==Fn?Ua:Qe)},e.deflateParams=function(C,P,T){let B=Qe;return P==Vn&&(P=6),P<0||P>9||T<0||T>_n?et:(Je[F].func!=Je[P].func&&C.total_in!==0&&(B=C.deflate(ys)),F!=P&&(F=P,k=Je[F].max_lazy,M=Je[F].good_length,U=Je[F].nice_length,E=Je[F].max_chain),$=T,B)},e.deflateSetDictionary=function(C,P,T){let B=T,O,j=0;if(!P||t!=fr)return et;if(B<ue)return Qe;for(B>i-Oe&&(B=i-Oe,j=T-B),u.set(P.subarray(j,j+B),0),w=B,p=B,m=u[0]&255,m=(m<<d^u[1]&255)&f,O=0;O<=B-ue;O++)m=(m<<d^u[O+(ue-1)]&255)&f,c[O&a]=h[m],h[m]=O;return Qe},e.deflate=function(C,P){let T,B,O,j,Q;if(P>Te||P<0)return et;if(!C.next_out||!C.next_in&&C.avail_in!==0||t==sn&&P!=Te)return C.msg=vn[An-et],et;if(C.avail_out===0)return C.msg=vn[An-Ht],Ht;if(n=C,j=s,s=P,t==fr&&(B=dr+(o-8<<4)<<8,O=(F-1&255)>>1,O>3&&(O=3),B|=O<<6,w!==0&&(B|=Ga),B+=31-B%31,t=Fn,Qt(B)),e.pending!==0){if(n.flush_pending(),n.avail_out===0)return s=-1,Qe}else if(n.avail_in===0&&P<=j&&P!=Te)return n.msg=vn[An-Ht],Ht;if(t==sn&&n.avail_in!==0)return C.msg=vn[An-Ht],Ht;if(n.avail_in!==0||v!==0||P!=Gt&&t!=sn){switch(Q=-1,Je[F].func){case Bi:Q=Jo(P);break;case Ln:Q=zo(P);break;case Rt:Q=Qo(P);break}if((Q==rn||Q==En)&&(t=sn),Q==Ue||Q==rn)return n.avail_out===0&&(s=-1),Qe;if(Q==Cn){if(P==ys)Ze();else if(bn(0,0,!1),P==Ra)for(T=0;T<x;T++)h[T]=0;if(n.flush_pending(),n.avail_out===0)return s=-1,Qe}}return P!=Te?Qe:Pi}}function Mi(){const e=this;e.next_in_index=0,e.next_out_index=0,e.avail_in=0,e.total_in=0,e.avail_out=0,e.total_out=0}Mi.prototype={deflateInit(e,n){const t=this;return t.dstate=new Ka,n||(n=fn),t.dstate.deflateInit(t,e,n)},deflate(e){const n=this;return n.dstate?n.dstate.deflate(n,e):et},deflateEnd(){const e=this;if(!e.dstate)return et;const n=e.dstate.deflateEnd();return e.dstate=null,n},deflateParams(e,n){const t=this;return t.dstate?t.dstate.deflateParams(t,e,n):et},deflateSetDictionary(e,n){const t=this;return t.dstate?t.dstate.deflateSetDictionary(t,e,n):et},read_buf(e,n,t){const r=this;let s=r.avail_in;return s>t&&(s=t),s===0?0:(r.avail_in-=s,e.set(r.next_in.subarray(r.next_in_index,r.next_in_index+s),n),r.next_in_index+=s,r.total_in+=s,s)},flush_pending(){const e=this;let n=e.dstate.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.next_out.set(e.dstate.pending_buf.subarray(e.dstate.pending_out,e.dstate.pending_out+n),e.next_out_index),e.next_out_index+=n,e.dstate.pending_out+=n,e.total_out+=n,e.avail_out-=n,e.dstate.pending-=n,e.dstate.pending===0&&(e.dstate.pending_out=0))}};function Ja(e){const n=this,t=new Mi,r=za(e&&e.chunkSize?e.chunkSize:64*1024),s=Gt,i=new Uint8Array(r);let o=e?e.level:Vn;typeof o>"u"&&(o=Vn),t.deflateInit(o),t.next_out=i,n.append=function(a,u){let l,c,h=0,m=0,x=0;const y=[];if(a.length){t.next_in_index=0,t.next_in=a,t.avail_in=a.length;do{if(t.next_out_index=0,t.avail_out=r,l=t.deflate(s),l!=Qe)throw new Error("deflating: "+t.msg);t.next_out_index&&(t.next_out_index==r?y.push(new Uint8Array(i)):y.push(i.subarray(0,t.next_out_index))),x+=t.next_out_index,u&&t.next_in_index>0&&t.next_in_index!=h&&(u(t.next_in_index),h=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return y.length>1?(c=new Uint8Array(x),y.forEach(function(f){c.set(f,m),m+=f.length})):c=y[0]?new Uint8Array(y[0]):new Uint8Array,c}},n.flush=function(){let a,u,l=0,c=0;const h=[];do{if(t.next_out_index=0,t.avail_out=r,a=t.deflate(Te),a!=Pi&&a!=Qe)throw new Error("deflating: "+t.msg);r-t.avail_out>0&&h.push(i.slice(0,t.next_out_index)),c+=t.next_out_index}while(t.avail_in>0||t.avail_out===0);return t.deflateEnd(),u=new Uint8Array(c),h.forEach(function(m){u.set(m,l),l+=m.length}),u}}function za(e){return e+5*(Math.floor(e/16383)+1)}const Qa=15,te=0,Dt=1,eu=2,Be=-2,ae=-3,As=-4,gt=-5,Re=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],Ii=1440,tu=0,nu=4,ru=9,su=5,iu=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ou=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],au=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],uu=[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,112,112],cu=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],lu=[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],Ct=15;function kr(){const e=this;let n,t,r,s,i,o;function a(l,c,h,m,x,y,f,d,p,D,g){let _,w,b,v,A,E,k,F,$,M,U,N,I,q,R;M=0,A=h;do r[l[c+M]]++,M++,A--;while(A!==0);if(r[0]==h)return f[0]=-1,d[0]=0,te;for(F=d[0],E=1;E<=Ct&&r[E]===0;E++);for(k=E,F<E&&(F=E),A=Ct;A!==0&&r[A]===0;A--);for(b=A,F>A&&(F=A),d[0]=F,q=1<<E;E<A;E++,q<<=1)if((q-=r[E])<0)return ae;if((q-=r[A])<0)return ae;for(r[A]+=q,o[1]=E=0,M=1,I=2;--A!==0;)o[I]=E+=r[M],I++,M++;A=0,M=0;do(E=l[c+M])!==0&&(g[o[E]++]=A),M++;while(++A<h);for(h=o[b],o[0]=A=0,M=0,v=-1,N=-F,i[0]=0,U=0,R=0;k<=b;k++)for(_=r[k];_--!==0;){for(;k>N+F;){if(v++,N+=F,R=b-N,R=R>F?F:R,(w=1<<(E=k-N))>_+1&&(w-=_+1,I=k,E<R))for(;++E<R&&!((w<<=1)<=r[++I]);)w-=r[I];if(R=1<<E,D[0]+R>Ii)return ae;i[v]=U=D[0],D[0]+=R,v!==0?(o[v]=A,s[0]=E,s[1]=F,E=A>>>N-F,s[2]=U-i[v-1]-E,p.set(s,(i[v-1]+E)*3)):f[0]=U}for(s[1]=k-N,M>=h?s[0]=192:g[M]<m?(s[0]=g[M]<256?0:96,s[2]=g[M++]):(s[0]=y[g[M]-m]+16+64,s[2]=x[g[M++]-m]),w=1<<k-N,E=A>>>N;E<R;E+=w)p.set(s,(U+E)*3);for(E=1<<k-1;(A&E)!==0;E>>>=1)A^=E;for(A^=E,$=(1<<N)-1;(A&$)!=o[v];)v--,N-=F,$=(1<<N)-1}return q!==0&&b!=1?gt:te}function u(l){let c;for(n||(n=[],t=[],r=new Int32Array(Ct+1),s=[],i=new Int32Array(Ct),o=new Int32Array(Ct+1)),t.length<l&&(t=[]),c=0;c<l;c++)t[c]=0;for(c=0;c<Ct+1;c++)r[c]=0;for(c=0;c<3;c++)s[c]=0;i.set(r.subarray(0,Ct),0),o.set(r.subarray(0,Ct+1),0)}e.inflate_trees_bits=function(l,c,h,m,x){let y;return u(19),n[0]=0,y=a(l,0,19,19,null,null,h,c,m,n,t),y==ae?x.msg="oversubscribed dynamic bit lengths tree":(y==gt||c[0]===0)&&(x.msg="incomplete dynamic bit lengths tree",y=ae),y},e.inflate_trees_dynamic=function(l,c,h,m,x,y,f,d,p){let D;return u(288),n[0]=0,D=a(h,0,l,257,au,uu,y,m,d,n,t),D!=te||m[0]===0?(D==ae?p.msg="oversubscribed literal/length tree":D!=As&&(p.msg="incomplete literal/length tree",D=ae),D):(u(288),D=a(h,l,c,0,cu,lu,f,x,d,n,t),D!=te||x[0]===0&&l>257?(D==ae?p.msg="oversubscribed distance tree":D==gt?(p.msg="incomplete distance tree",D=ae):D!=As&&(p.msg="empty distance tree with lengths",D=ae),D):te)}}kr.inflate_trees_fixed=function(e,n,t,r){return e[0]=ru,n[0]=su,t[0]=iu,r[0]=ou,te};const Sn=0,vs=1,Cs=2,Es=3,Fs=4,Ss=5,ks=6,hr=7,Ts=8,kn=9;function fu(){const e=this;let n,t=0,r,s=0,i=0,o=0,a=0,u=0,l=0,c=0,h,m=0,x,y=0;function f(d,p,D,g,_,w,b,v){let A,E,k,F,$,M,U,N,I,q,R,fe,V,pe,W,Z;U=v.next_in_index,N=v.avail_in,$=b.bitb,M=b.bitk,I=b.write,q=I<b.read?b.read-I-1:b.end-I,R=Re[d],fe=Re[p];do{for(;M<20;)N--,$|=(v.read_byte(U++)&255)<<M,M+=8;if(A=$&R,E=D,k=g,Z=(k+A)*3,(F=E[Z])===0){$>>=E[Z+1],M-=E[Z+1],b.win[I++]=E[Z+2],q--;continue}do{if($>>=E[Z+1],M-=E[Z+1],(F&16)!==0){for(F&=15,V=E[Z+2]+($&Re[F]),$>>=F,M-=F;M<15;)N--,$|=(v.read_byte(U++)&255)<<M,M+=8;A=$&fe,E=_,k=w,Z=(k+A)*3,F=E[Z];do if($>>=E[Z+1],M-=E[Z+1],(F&16)!==0){for(F&=15;M<F;)N--,$|=(v.read_byte(U++)&255)<<M,M+=8;if(pe=E[Z+2]+($&Re[F]),$>>=F,M-=F,q-=V,I>=pe)W=I-pe,I-W>0&&2>I-W?(b.win[I++]=b.win[W++],b.win[I++]=b.win[W++],V-=2):(b.win.set(b.win.subarray(W,W+2),I),I+=2,W+=2,V-=2);else{W=I-pe;do W+=b.end;while(W<0);if(F=b.end-W,V>F){if(V-=F,I-W>0&&F>I-W)do b.win[I++]=b.win[W++];while(--F!==0);else b.win.set(b.win.subarray(W,W+F),I),I+=F,W+=F,F=0;W=0}}if(I-W>0&&V>I-W)do b.win[I++]=b.win[W++];while(--V!==0);else b.win.set(b.win.subarray(W,W+V),I),I+=V,W+=V,V=0;break}else if((F&64)===0)A+=E[Z+2],A+=$&Re[F],Z=(k+A)*3,F=E[Z];else return v.msg="invalid distance code",V=v.avail_in-N,V=M>>3<V?M>>3:V,N+=V,U-=V,M-=V<<3,b.bitb=$,b.bitk=M,v.avail_in=N,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,ae;while(!0);break}if((F&64)===0){if(A+=E[Z+2],A+=$&Re[F],Z=(k+A)*3,(F=E[Z])===0){$>>=E[Z+1],M-=E[Z+1],b.win[I++]=E[Z+2],q--;break}}else return(F&32)!==0?(V=v.avail_in-N,V=M>>3<V?M>>3:V,N+=V,U-=V,M-=V<<3,b.bitb=$,b.bitk=M,v.avail_in=N,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,Dt):(v.msg="invalid literal/length code",V=v.avail_in-N,V=M>>3<V?M>>3:V,N+=V,U-=V,M-=V<<3,b.bitb=$,b.bitk=M,v.avail_in=N,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,ae)}while(!0)}while(q>=258&&N>=10);return V=v.avail_in-N,V=M>>3<V?M>>3:V,N+=V,U-=V,M-=V<<3,b.bitb=$,b.bitk=M,v.avail_in=N,v.total_in+=U-v.next_in_index,v.next_in_index=U,b.write=I,te}e.init=function(d,p,D,g,_,w){n=Sn,l=d,c=p,h=D,m=g,x=_,y=w,r=null},e.proc=function(d,p,D){let g,_,w,b=0,v=0,A=0,E,k,F,$;for(A=p.next_in_index,E=p.avail_in,b=d.bitb,v=d.bitk,k=d.write,F=k<d.read?d.read-k-1:d.end-k;;)switch(n){case Sn:if(F>=258&&E>=10&&(d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,D=f(l,c,h,m,x,y,d,p),A=p.next_in_index,E=p.avail_in,b=d.bitb,v=d.bitk,k=d.write,F=k<d.read?d.read-k-1:d.end-k,D!=te)){n=D==Dt?hr:kn;break}i=l,r=h,s=m,n=vs;case vs:for(g=i;v<g;){if(E!==0)D=te;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}if(_=(s+(b&Re[g]))*3,b>>>=r[_+1],v-=r[_+1],w=r[_],w===0){o=r[_+2],n=ks;break}if((w&16)!==0){a=w&15,t=r[_+2],n=Cs;break}if((w&64)===0){i=w,s=_/3+r[_+2];break}if((w&32)!==0){n=hr;break}return n=kn,p.msg="invalid literal/length code",D=ae,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);case Cs:for(g=a;v<g;){if(E!==0)D=te;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}t+=b&Re[g],b>>=g,v-=g,i=c,r=x,s=y,n=Es;case Es:for(g=i;v<g;){if(E!==0)D=te;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}if(_=(s+(b&Re[g]))*3,b>>=r[_+1],v-=r[_+1],w=r[_],(w&16)!==0){a=w&15,u=r[_+2],n=Fs;break}if((w&64)===0){i=w,s=_/3+r[_+2];break}return n=kn,p.msg="invalid distance code",D=ae,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);case Fs:for(g=a;v<g;){if(E!==0)D=te;else return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);E--,b|=(p.read_byte(A++)&255)<<v,v+=8}u+=b&Re[g],b>>=g,v-=g,n=Ss;case Ss:for($=k-u;$<0;)$+=d.end;for(;t!==0;){if(F===0&&(k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0&&(d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0)))return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);d.win[k++]=d.win[$++],F--,$==d.end&&($=0),t--}n=Sn;break;case ks:if(F===0&&(k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0&&(d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,k==d.end&&d.read!==0&&(k=0,F=k<d.read?d.read-k-1:d.end-k),F===0)))return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);D=te,d.win[k++]=o,F--,n=Sn;break;case hr:if(v>7&&(v-=8,E++,A--),d.write=k,D=d.inflate_flush(p,D),k=d.write,F=k<d.read?d.read-k-1:d.end-k,d.read!=d.write)return d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);n=Ts;case Ts:return D=Dt,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);case kn:return D=ae,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D);default:return D=Be,d.bitb=b,d.bitk=v,p.avail_in=E,p.total_in+=A-p.next_in_index,p.next_in_index=A,d.write=k,d.inflate_flush(p,D)}},e.free=function(){}}const Ps=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Yt=0,mr=1,Bs=2,Ms=3,Is=4,Ls=5,Tn=6,Pn=7,$s=8,$t=9;function du(e,n){const t=this;let r=Yt,s=0,i=0,o=0,a;const u=[0],l=[0],c=new fu;let h=0,m=new Int32Array(Ii*3);const x=0,y=new kr;t.bitk=0,t.bitb=0,t.win=new Uint8Array(n),t.end=n,t.read=0,t.write=0,t.reset=function(f,d){d&&(d[0]=x),r==Tn&&c.free(f),r=Yt,t.bitk=0,t.bitb=0,t.read=t.write=0},t.reset(e,null),t.inflate_flush=function(f,d){let p,D,g;return D=f.next_out_index,g=t.read,p=(g<=t.write?t.write:t.end)-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==gt&&(d=te),f.avail_out-=p,f.total_out+=p,f.next_out.set(t.win.subarray(g,g+p),D),D+=p,g+=p,g==t.end&&(g=0,t.write==t.end&&(t.write=0),p=t.write-g,p>f.avail_out&&(p=f.avail_out),p!==0&&d==gt&&(d=te),f.avail_out-=p,f.total_out+=p,f.next_out.set(t.win.subarray(g,g+p),D),D+=p,g+=p),f.next_out_index=D,t.read=g,d},t.proc=function(f,d){let p,D,g,_,w,b,v,A;for(_=f.next_in_index,w=f.avail_in,D=t.bitb,g=t.bitk,b=t.write,v=b<t.read?t.read-b-1:t.end-b;;){let E,k,F,$,M,U,N,I;switch(r){case Yt:for(;g<3;){if(w!==0)d=te;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}switch(p=D&7,h=p&1,p>>>1){case 0:D>>>=3,g-=3,p=g&7,D>>>=p,g-=p,r=mr;break;case 1:E=[],k=[],F=[[]],$=[[]],kr.inflate_trees_fixed(E,k,F,$),c.init(E[0],k[0],F[0],0,$[0],0),D>>>=3,g-=3,r=Tn;break;case 2:D>>>=3,g-=3,r=Ms;break;case 3:return D>>>=3,g-=3,r=$t,f.msg="invalid block type",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d)}break;case mr:for(;g<32;){if(w!==0)d=te;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if((~D>>>16&65535)!=(D&65535))return r=$t,f.msg="invalid stored block lengths",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);s=D&65535,D=g=0,r=s!==0?Bs:h!==0?Pn:Yt;break;case Bs:if(w===0||v===0&&(b==t.end&&t.read!==0&&(b=0,v=b<t.read?t.read-b-1:t.end-b),v===0&&(t.write=b,d=t.inflate_flush(f,d),b=t.write,v=b<t.read?t.read-b-1:t.end-b,b==t.end&&t.read!==0&&(b=0,v=b<t.read?t.read-b-1:t.end-b),v===0)))return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);if(d=te,p=s,p>w&&(p=w),p>v&&(p=v),t.win.set(f.read_buf(_,p),b),_+=p,w-=p,b+=p,v-=p,(s-=p)!==0)break;r=h!==0?Pn:Yt;break;case Ms:for(;g<14;){if(w!==0)d=te;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(i=p=D&16383,(p&31)>29||(p>>5&31)>29)return r=$t,f.msg="too many length or distance symbols",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);if(p=258+(p&31)+(p>>5&31),!a||a.length<p)a=[];else for(A=0;A<p;A++)a[A]=0;D>>>=14,g-=14,o=0,r=Is;case Is:for(;o<4+(i>>>10);){for(;g<3;){if(w!==0)d=te;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}a[Ps[o++]]=D&7,D>>>=3,g-=3}for(;o<19;)a[Ps[o++]]=0;if(u[0]=7,p=y.inflate_trees_bits(a,u,l,m,f),p!=te)return d=p,d==ae&&(a=null,r=$t),t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);o=0,r=Ls;case Ls:for(;p=i,!(o>=258+(p&31)+(p>>5&31));){let q,R;for(p=u[0];g<p;){if(w!==0)d=te;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(p=m[(l[0]+(D&Re[p]))*3+1],R=m[(l[0]+(D&Re[p]))*3+2],R<16)D>>>=p,g-=p,a[o++]=R;else{for(A=R==18?7:R-14,q=R==18?11:3;g<p+A;){if(w!==0)d=te;else return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);w--,D|=(f.read_byte(_++)&255)<<g,g+=8}if(D>>>=p,g-=p,q+=D&Re[A],D>>>=A,g-=A,A=o,p=i,A+q>258+(p&31)+(p>>5&31)||R==16&&A<1)return a=null,r=$t,f.msg="invalid bit length repeat",d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);R=R==16?a[A-1]:0;do a[A++]=R;while(--q!==0);o=A}}if(l[0]=-1,M=[],U=[],N=[],I=[],M[0]=9,U[0]=6,p=i,p=y.inflate_trees_dynamic(257+(p&31),1+(p>>5&31),a,M,U,N,I,m,f),p!=te)return p==ae&&(a=null,r=$t),d=p,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);c.init(M[0],U[0],m,N[0],m,I[0]),r=Tn;case Tn:if(t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,(d=c.proc(t,f,d))!=Dt)return t.inflate_flush(f,d);if(d=te,c.free(f),_=f.next_in_index,w=f.avail_in,D=t.bitb,g=t.bitk,b=t.write,v=b<t.read?t.read-b-1:t.end-b,h===0){r=Yt;break}r=Pn;case Pn:if(t.write=b,d=t.inflate_flush(f,d),b=t.write,v=b<t.read?t.read-b-1:t.end-b,t.read!=t.write)return t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);r=$s;case $s:return d=Dt,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);case $t:return d=ae,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d);default:return d=Be,t.bitb=D,t.bitk=g,f.avail_in=w,f.total_in+=_-f.next_in_index,f.next_in_index=_,t.write=b,t.inflate_flush(f,d)}}},t.free=function(f){t.reset(f,null),t.win=null,m=null},t.set_dictionary=function(f,d,p){t.win.set(f.subarray(d,d+p),0),t.read=t.write=p},t.sync_point=function(){return r==mr?1:0}}const pu=32,hu=8,mu=0,Os=1,Ns=2,Rs=3,Us=4,Vs=5,xr=6,on=7,qs=12,Et=13,xu=[0,0,255,255];function Du(){const e=this;e.mode=0,e.method=0,e.was=[0],e.need=0,e.marker=0,e.wbits=0;function n(t){return!t||!t.istate?Be:(t.total_in=t.total_out=0,t.msg=null,t.istate.mode=on,t.istate.blocks.reset(t,null),te)}e.inflateEnd=function(t){return e.blocks&&e.blocks.free(t),e.blocks=null,te},e.inflateInit=function(t,r){return t.msg=null,e.blocks=null,r<8||r>15?(e.inflateEnd(t),Be):(e.wbits=r,t.istate.blocks=new du(t,1<<r),n(t),te)},e.inflate=function(t,r){let s,i;if(!t||!t.istate||!t.next_in)return Be;const o=t.istate;for(r=r==nu?gt:te,s=gt;;)switch(o.mode){case mu:if(t.avail_in===0)return s;if(s=r,t.avail_in--,t.total_in++,((o.method=t.read_byte(t.next_in_index++))&15)!=hu){o.mode=Et,t.msg="unknown compression method",o.marker=5;break}if((o.method>>4)+8>o.wbits){o.mode=Et,t.msg="invalid win size",o.marker=5;break}o.mode=Os;case Os:if(t.avail_in===0)return s;if(s=r,t.avail_in--,t.total_in++,i=t.read_byte(t.next_in_index++)&255,((o.method<<8)+i)%31!==0){o.mode=Et,t.msg="incorrect header check",o.marker=5;break}if((i&pu)===0){o.mode=on;break}o.mode=Ns;case Ns:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,o.need=(t.read_byte(t.next_in_index++)&255)<<24&4278190080,o.mode=Rs;case Rs:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,o.need+=(t.read_byte(t.next_in_index++)&255)<<16&16711680,o.mode=Us;case Us:if(t.avail_in===0)return s;s=r,t.avail_in--,t.total_in++,o.need+=(t.read_byte(t.next_in_index++)&255)<<8&65280,o.mode=Vs;case Vs:return t.avail_in===0?s:(s=r,t.avail_in--,t.total_in++,o.need+=t.read_byte(t.next_in_index++)&255,o.mode=xr,eu);case xr:return o.mode=Et,t.msg="need dictionary",o.marker=0,Be;case on:if(s=o.blocks.proc(t,s),s==ae){o.mode=Et,o.marker=0;break}if(s==te&&(s=r),s!=Dt)return s;s=r,o.blocks.reset(t,o.was),o.mode=qs;case qs:return t.avail_in=0,Dt;case Et:return ae;default:return Be}},e.inflateSetDictionary=function(t,r,s){let i=0,o=s;if(!t||!t.istate||t.istate.mode!=xr)return Be;const a=t.istate;return o>=1<<a.wbits&&(o=(1<<a.wbits)-1,i=s-o),a.blocks.set_dictionary(r,i,o),a.mode=on,te},e.inflateSync=function(t){let r,s,i,o,a;if(!t||!t.istate)return Be;const u=t.istate;if(u.mode!=Et&&(u.mode=Et,u.marker=0),(r=t.avail_in)===0)return gt;for(s=t.next_in_index,i=u.marker;r!==0&&i<4;)t.read_byte(s)==xu[i]?i++:t.read_byte(s)!==0?i=0:i=4-i,s++,r--;return t.total_in+=s-t.next_in_index,t.next_in_index=s,t.avail_in=r,u.marker=i,i!=4?ae:(o=t.total_in,a=t.total_out,n(t),t.total_in=o,t.total_out=a,u.mode=on,te)},e.inflateSyncPoint=function(t){return!t||!t.istate||!t.istate.blocks?Be:t.istate.blocks.sync_point()}}function Li(){}Li.prototype={inflateInit(e){const n=this;return n.istate=new Du,e||(e=Qa),n.istate.inflateInit(n,e)},inflate(e){const n=this;return n.istate?n.istate.inflate(n,e):Be},inflateEnd(){const e=this;if(!e.istate)return Be;const n=e.istate.inflateEnd(e);return e.istate=null,n},inflateSync(){const e=this;return e.istate?e.istate.inflateSync(e):Be},inflateSetDictionary(e,n){const t=this;return t.istate?t.istate.inflateSetDictionary(t,e,n):Be},read_byte(e){return this.next_in[e]},read_buf(e,n){return this.next_in.subarray(e,e+n)}};function gu(e){const n=this,t=new Li,r=e&&e.chunkSize?Math.floor(e.chunkSize*2):128*1024,s=tu,i=new Uint8Array(r);let o=!1;t.inflateInit(),t.next_out=i,n.append=function(a,u){const l=[];let c,h,m=0,x=0,y=0;if(a.length!==0){t.next_in_index=0,t.next_in=a,t.avail_in=a.length;do{if(t.next_out_index=0,t.avail_out=r,t.avail_in===0&&!o&&(t.next_in_index=0,o=!0),c=t.inflate(s),o&&c===gt){if(t.avail_in!==0)throw new Error("inflating: bad input")}else if(c!==te&&c!==Dt)throw new Error("inflating: "+t.msg);if((o||c===Dt)&&t.avail_in===a.length)throw new Error("inflating: bad input");t.next_out_index&&(t.next_out_index===r?l.push(new Uint8Array(i)):l.push(i.subarray(0,t.next_out_index))),y+=t.next_out_index,u&&t.next_in_index>0&&t.next_in_index!=m&&(u(t.next_in_index),m=t.next_in_index)}while(t.avail_in>0||t.avail_out===0);return l.length>1?(h=new Uint8Array(y),l.forEach(function(f){h.set(f,x),x+=f.length})):h=l[0]?new Uint8Array(l[0]):new Uint8Array,h}},n.flush=function(){t.inflateEnd()}}const $e=4294967295,Me=65535,js=8,wu=0,yu=99,bu=67324752,$i=134695760,_u=$i,Au=33639248,vu=101010256,Cu=101075792,Eu=117853008,Tr=22,Oi=20,Ni=56,Fu=Tr+Oi+Ni,Su=1,ku=39169,Tu=10,Pu=1,Ri=21589,Bu=6534,Mu=1,Iu=8,Lu=2048,$u=16,Ou=16384,Ws=73,Dr=420,Nu=20,Hs=45,Ys=51,gr="/",Gs=new Date(2107,11,31),Zs=new Date(1980,0,1),re=void 0,It="undefined",xn="function";class Xs{constructor(n){return class extends TransformStream{constructor(t,r){const s=new n(r);super({transform(i,o){o.enqueue(s.append(i))},flush(i){const o=s.flush();o&&i.enqueue(o)}})}}}}const Ru=64;let Ui=2;try{typeof navigator!=It&&navigator.hardwareConcurrency&&(Ui=navigator.hardwareConcurrency)}catch{}const Uu={chunkSize:512*1024,maxWorkers:Ui,terminateWorkerTimeout:5e3,useWebWorkers:!0,useCompressionStream:!0,workerScripts:re,CompressionStreamNative:typeof CompressionStream!=It&&CompressionStream,DecompressionStreamNative:typeof DecompressionStream!=It&&DecompressionStream},Pt=Object.assign({},Uu);function Vu(){return Pt}function qu(e){return Math.max(e.chunkSize,Ru)}function Zr(e){const{baseURL:n,chunkSize:t,maxWorkers:r,terminateWorkerTimeout:s,useCompressionStream:i,useWebWorkers:o,Deflate:a,Inflate:u,CompressionStream:l,DecompressionStream:c,workerScripts:h}=e;if(Ft("baseURL",n),Ft("chunkSize",t),Ft("maxWorkers",r),Ft("terminateWorkerTimeout",s),Ft("useCompressionStream",i),Ft("useWebWorkers",o),a&&(Pt.CompressionStream=new Xs(a)),u&&(Pt.DecompressionStream=new Xs(u)),Ft("CompressionStream",l),Ft("DecompressionStream",c),h!==re){const{deflate:m,inflate:x}=h;if((m||x)&&(Pt.workerScripts||(Pt.workerScripts={})),m){if(!Array.isArray(m))throw new Error("workerScripts.deflate must be an array");Pt.workerScripts.deflate=m}if(x){if(!Array.isArray(x))throw new Error("workerScripts.inflate must be an array");Pt.workerScripts.inflate=x}}}function Ft(e,n){n!==re&&(Pt[e]=n)}const wr={application:{"andrew-inset":"ez",annodex:"anx","atom+xml":"atom","atomcat+xml":"atomcat","atomserv+xml":"atomsrv",bbolin:"lin","cu-seeme":"cu","davmount+xml":"davmount",dsptype:"tsp",ecmascript:["es","ecma"],futuresplash:"spl",hta:"hta","java-archive":"jar","java-serialized-object":"ser","java-vm":"class",m3g:"m3g","mac-binhex40":"hqx",mathematica:["nb","ma","mb"],msaccess:"mdb",msword:["doc","dot","wiz"],mxf:"mxf",oda:"oda",ogg:"ogx",pdf:"pdf","pgp-keys":"key","pgp-signature":["asc","sig"],"pics-rules":"prf",postscript:["ps","ai","eps","epsi","epsf","eps2","eps3"],rar:"rar","rdf+xml":"rdf","rss+xml":"rss",rtf:"rtf","xhtml+xml":["xhtml","xht"],xml:["xml","xsl","xsd","xpdl"],"xspf+xml":"xspf",zip:"zip","vnd.android.package-archive":"apk","vnd.cinderella":"cdy","vnd.google-earth.kml+xml":"kml","vnd.google-earth.kmz":"kmz","vnd.mozilla.xul+xml":"xul","vnd.ms-excel":["xls","xlb","xlt","xlm","xla","xlc","xlw"],"vnd.ms-pki.seccat":"cat","vnd.ms-pki.stl":"stl","vnd.ms-powerpoint":["ppt","pps","pot","ppa","pwz"],"vnd.oasis.opendocument.chart":"odc","vnd.oasis.opendocument.database":"odb","vnd.oasis.opendocument.formula":"odf","vnd.oasis.opendocument.graphics":"odg","vnd.oasis.opendocument.graphics-template":"otg","vnd.oasis.opendocument.image":"odi","vnd.oasis.opendocument.presentation":"odp","vnd.oasis.opendocument.presentation-template":"otp","vnd.oasis.opendocument.spreadsheet":"ods","vnd.oasis.opendocument.spreadsheet-template":"ots","vnd.oasis.opendocument.text":"odt","vnd.oasis.opendocument.text-master":["odm","otm"],"vnd.oasis.opendocument.text-template":"ott","vnd.oasis.opendocument.text-web":"oth","vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","vnd.openxmlformats-officedocument.spreadsheetml.template":"xltx","vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","vnd.openxmlformats-officedocument.presentationml.slideshow":"ppsx","vnd.openxmlformats-officedocument.presentationml.template":"potx","vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","vnd.openxmlformats-officedocument.wordprocessingml.template":"dotx","vnd.smaf":"mmf","vnd.stardivision.calc":"sdc","vnd.stardivision.chart":"sds","vnd.stardivision.draw":"sda","vnd.stardivision.impress":"sdd","vnd.stardivision.math":["sdf","smf"],"vnd.stardivision.writer":["sdw","vor"],"vnd.stardivision.writer-global":"sgl","vnd.sun.xml.calc":"sxc","vnd.sun.xml.calc.template":"stc","vnd.sun.xml.draw":"sxd","vnd.sun.xml.draw.template":"std","vnd.sun.xml.impress":"sxi","vnd.sun.xml.impress.template":"sti","vnd.sun.xml.math":"sxm","vnd.sun.xml.writer":"sxw","vnd.sun.xml.writer.global":"sxg","vnd.sun.xml.writer.template":"stw","vnd.symbian.install":["sis","sisx"],"vnd.visio":["vsd","vst","vss","vsw","vsdx","vssx","vstx","vssm","vstm"],"vnd.wap.wbxml":"wbxml","vnd.wap.wmlc":"wmlc","vnd.wap.wmlscriptc":"wmlsc","vnd.wordperfect":"wpd","vnd.wordperfect5.1":"wp5","x-123":"wk","x-7z-compressed":"7z","x-abiword":"abw","x-apple-diskimage":"dmg","x-bcpio":"bcpio","x-bittorrent":"torrent","x-cbr":["cbr","cba","cbt","cb7"],"x-cbz":"cbz","x-cdf":["cdf","cda"],"x-cdlink":"vcd","x-chess-pgn":"pgn","x-cpio":"cpio","x-csh":"csh","x-director":["dir","dxr","cst","cct","cxt","w3d","fgd","swa"],"x-dms":"dms","x-doom":"wad","x-dvi":"dvi","x-httpd-eruby":"rhtml","x-font":"pcf.Z","x-freemind":"mm","x-gnumeric":"gnumeric","x-go-sgf":"sgf","x-graphing-calculator":"gcf","x-gtar":["gtar","taz"],"x-hdf":"hdf","x-httpd-php":["phtml","pht","php"],"x-httpd-php-source":"phps","x-httpd-php3":"php3","x-httpd-php3-preprocessed":"php3p","x-httpd-php4":"php4","x-httpd-php5":"php5","x-ica":"ica","x-info":"info","x-internet-signup":["ins","isp"],"x-iphone":"iii","x-iso9660-image":"iso","x-java-jnlp-file":"jnlp","x-jmol":"jmz","x-killustrator":"kil","x-latex":"latex","x-lyx":"lyx","x-lzx":"lzx","x-maker":["frm","fb","fbdoc"],"x-ms-wmd":"wmd","x-msdos-program":["com","exe","bat","dll"],"x-netcdf":["nc"],"x-ns-proxy-autoconfig":["pac","dat"],"x-nwc":"nwc","x-object":"o","x-oz-application":"oza","x-pkcs7-certreqresp":"p7r","x-python-code":["pyc","pyo"],"x-qgis":["qgs","shp","shx"],"x-quicktimeplayer":"qtl","x-redhat-package-manager":["rpm","rpa"],"x-ruby":"rb","x-sh":"sh","x-shar":"shar","x-shockwave-flash":["swf","swfl"],"x-silverlight":"scr","x-stuffit":"sit","x-sv4cpio":"sv4cpio","x-sv4crc":"sv4crc","x-tar":"tar","x-tex-gf":"gf","x-tex-pk":"pk","x-texinfo":["texinfo","texi"],"x-trash":["~","%","bak","old","sik"],"x-ustar":"ustar","x-wais-source":"src","x-wingz":"wz","x-x509-ca-cert":["crt","der","cer"],"x-xcf":"xcf","x-xfig":"fig","x-xpinstall":"xpi",applixware:"aw","atomsvc+xml":"atomsvc","ccxml+xml":"ccxml","cdmi-capability":"cdmia","cdmi-container":"cdmic","cdmi-domain":"cdmid","cdmi-object":"cdmio","cdmi-queue":"cdmiq","docbook+xml":"dbk","dssc+der":"dssc","dssc+xml":"xdssc","emma+xml":"emma","epub+zip":"epub",exi:"exi","font-tdpfr":"pfr","gml+xml":"gml","gpx+xml":"gpx",gxf:"gxf",hyperstudio:"stk","inkml+xml":["ink","inkml"],ipfix:"ipfix","jsonml+json":"jsonml","lost+xml":"lostxml","mads+xml":"mads",marc:"mrc","marcxml+xml":"mrcx","mathml+xml":["mathml","mml"],mbox:"mbox","mediaservercontrol+xml":"mscml","metalink+xml":"metalink","metalink4+xml":"meta4","mets+xml":"mets","mods+xml":"mods",mp21:["m21","mp21"],mp4:"mp4s","oebps-package+xml":"opf","omdoc+xml":"omdoc",onenote:["onetoc","onetoc2","onetmp","onepkg"],oxps:"oxps","patch-ops-error+xml":"xer","pgp-encrypted":"pgp",pkcs10:"p10","pkcs7-mime":["p7m","p7c"],"pkcs7-signature":"p7s",pkcs8:"p8","pkix-attr-cert":"ac","pkix-crl":"crl","pkix-pkipath":"pkipath",pkixcmp:"pki","pls+xml":"pls","prs.cww":"cww","pskc+xml":"pskcxml","reginfo+xml":"rif","relax-ng-compact-syntax":"rnc","resource-lists+xml":"rl","resource-lists-diff+xml":"rld","rls-services+xml":"rs","rpki-ghostbusters":"gbr","rpki-manifest":"mft","rpki-roa":"roa","rsd+xml":"rsd","sbml+xml":"sbml","scvp-cv-request":"scq","scvp-cv-response":"scs","scvp-vp-request":"spq","scvp-vp-response":"spp",sdp:"sdp","set-payment-initiation":"setpay","set-registration-initiation":"setreg","shf+xml":"shf","sparql-query":"rq","sparql-results+xml":"srx",srgs:"gram","srgs+xml":"grxml","sru+xml":"sru","ssdl+xml":"ssdl","ssml+xml":"ssml","tei+xml":["tei","teicorpus"],"thraud+xml":"tfi","timestamped-data":"tsd","vnd.3gpp.pic-bw-large":"plb","vnd.3gpp.pic-bw-small":"psb","vnd.3gpp.pic-bw-var":"pvb","vnd.3gpp2.tcap":"tcap","vnd.3m.post-it-notes":"pwn","vnd.accpac.simply.aso":"aso","vnd.accpac.simply.imp":"imp","vnd.acucobol":"acu","vnd.acucorp":["atc","acutc"],"vnd.adobe.air-application-installer-package+zip":"air","vnd.adobe.formscentral.fcdt":"fcdt","vnd.adobe.fxp":["fxp","fxpl"],"vnd.adobe.xdp+xml":"xdp","vnd.adobe.xfdf":"xfdf","vnd.ahead.space":"ahead","vnd.airzip.filesecure.azf":"azf","vnd.airzip.filesecure.azs":"azs","vnd.amazon.ebook":"azw","vnd.americandynamics.acc":"acc","vnd.amiga.ami":"ami","vnd.anser-web-certificate-issue-initiation":"cii","vnd.anser-web-funds-transfer-initiation":"fti","vnd.antix.game-component":"atx","vnd.apple.installer+xml":"mpkg","vnd.apple.mpegurl":"m3u8","vnd.aristanetworks.swi":"swi","vnd.astraea-software.iota":"iota","vnd.audiograph":"aep","vnd.blueice.multipass":"mpm","vnd.bmi":"bmi","vnd.businessobjects":"rep","vnd.chemdraw+xml":"cdxml","vnd.chipnuts.karaoke-mmd":"mmd","vnd.claymore":"cla","vnd.cloanto.rp9":"rp9","vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"vnd.cluetrust.cartomobile-config":"c11amc","vnd.cluetrust.cartomobile-config-pkg":"c11amz","vnd.commonspace":"csp","vnd.contact.cmsg":"cdbcmsg","vnd.cosmocaller":"cmc","vnd.crick.clicker":"clkx","vnd.crick.clicker.keyboard":"clkk","vnd.crick.clicker.palette":"clkp","vnd.crick.clicker.template":"clkt","vnd.crick.clicker.wordbank":"clkw","vnd.criticaltools.wbs+xml":"wbs","vnd.ctc-posml":"pml","vnd.cups-ppd":"ppd","vnd.curl.car":"car","vnd.curl.pcurl":"pcurl","vnd.dart":"dart","vnd.data-vision.rdz":"rdz","vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"vnd.dece.ttml+xml":["uvt","uvvt"],"vnd.dece.unspecified":["uvx","uvvx"],"vnd.dece.zip":["uvz","uvvz"],"vnd.denovo.fcselayout-link":"fe_launch","vnd.dna":"dna","vnd.dolby.mlp":"mlp","vnd.dpgraph":"dpg","vnd.dreamfactory":"dfac","vnd.ds-keypoint":"kpxx","vnd.dvb.ait":"ait","vnd.dvb.service":"svc","vnd.dynageo":"geo","vnd.ecowin.chart":"mag","vnd.enliven":"nml","vnd.epson.esf":"esf","vnd.epson.msf":"msf","vnd.epson.quickanime":"qam","vnd.epson.salt":"slt","vnd.epson.ssf":"ssf","vnd.eszigno3+xml":["es3","et3"],"vnd.ezpix-album":"ez2","vnd.ezpix-package":"ez3","vnd.fdf":"fdf","vnd.fdsn.mseed":"mseed","vnd.fdsn.seed":["seed","dataless"],"vnd.flographit":"gph","vnd.fluxtime.clip":"ftc","vnd.framemaker":["fm","frame","maker","book"],"vnd.frogans.fnc":"fnc","vnd.frogans.ltf":"ltf","vnd.fsc.weblaunch":"fsc","vnd.fujitsu.oasys":"oas","vnd.fujitsu.oasys2":"oa2","vnd.fujitsu.oasys3":"oa3","vnd.fujitsu.oasysgp":"fg5","vnd.fujitsu.oasysprs":"bh2","vnd.fujixerox.ddd":"ddd","vnd.fujixerox.docuworks":"xdw","vnd.fujixerox.docuworks.binder":"xbd","vnd.fuzzysheet":"fzs","vnd.genomatix.tuxedo":"txd","vnd.geogebra.file":"ggb","vnd.geogebra.tool":"ggt","vnd.geometry-explorer":["gex","gre"],"vnd.geonext":"gxt","vnd.geoplan":"g2w","vnd.geospace":"g3w","vnd.gmx":"gmx","vnd.grafeq":["gqf","gqs"],"vnd.groove-account":"gac","vnd.groove-help":"ghf","vnd.groove-identity-message":"gim","vnd.groove-injector":"grv","vnd.groove-tool-message":"gtm","vnd.groove-tool-template":"tpl","vnd.groove-vcard":"vcg","vnd.hal+xml":"hal","vnd.handheld-entertainment+xml":"zmm","vnd.hbci":"hbci","vnd.hhe.lesson-player":"les","vnd.hp-hpgl":"hpgl","vnd.hp-hpid":"hpid","vnd.hp-hps":"hps","vnd.hp-jlyt":"jlt","vnd.hp-pcl":"pcl","vnd.hp-pclxl":"pclxl","vnd.hydrostatix.sof-data":"sfd-hdstx","vnd.ibm.minipay":"mpy","vnd.ibm.modcap":["afp","listafp","list3820"],"vnd.ibm.rights-management":"irm","vnd.ibm.secure-container":"sc","vnd.iccprofile":["icc","icm"],"vnd.igloader":"igl","vnd.immervision-ivp":"ivp","vnd.immervision-ivu":"ivu","vnd.insors.igm":"igm","vnd.intercon.formnet":["xpw","xpx"],"vnd.intergeo":"i2g","vnd.intu.qbo":"qbo","vnd.intu.qfx":"qfx","vnd.ipunplugged.rcprofile":"rcprofile","vnd.irepository.package+xml":"irp","vnd.is-xpr":"xpr","vnd.isac.fcs":"fcs","vnd.jam":"jam","vnd.jcp.javame.midlet-rms":"rms","vnd.jisp":"jisp","vnd.joost.joda-archive":"joda","vnd.kahootz":["ktz","ktr"],"vnd.kde.karbon":"karbon","vnd.kde.kchart":"chrt","vnd.kde.kformula":"kfo","vnd.kde.kivio":"flw","vnd.kde.kontour":"kon","vnd.kde.kpresenter":["kpr","kpt"],"vnd.kde.kspread":"ksp","vnd.kde.kword":["kwd","kwt"],"vnd.kenameaapp":"htke","vnd.kidspiration":"kia","vnd.kinar":["kne","knp"],"vnd.koan":["skp","skd","skt","skm"],"vnd.kodak-descriptor":"sse","vnd.las.las+xml":"lasxml","vnd.llamagraphics.life-balance.desktop":"lbd","vnd.llamagraphics.life-balance.exchange+xml":"lbe","vnd.lotus-1-2-3":"123","vnd.lotus-approach":"apr","vnd.lotus-freelance":"pre","vnd.lotus-notes":"nsf","vnd.lotus-organizer":"org","vnd.lotus-screencam":"scm","vnd.lotus-wordpro":"lwp","vnd.macports.portpkg":"portpkg","vnd.mcd":"mcd","vnd.medcalcdata":"mc1","vnd.mediastation.cdkey":"cdkey","vnd.mfer":"mwf","vnd.mfmp":"mfm","vnd.micrografx.flo":"flo","vnd.micrografx.igx":"igx","vnd.mif":"mif","vnd.mobius.daf":"daf","vnd.mobius.dis":"dis","vnd.mobius.mbk":"mbk","vnd.mobius.mqy":"mqy","vnd.mobius.msl":"msl","vnd.mobius.plc":"plc","vnd.mobius.txf":"txf","vnd.mophun.application":"mpn","vnd.mophun.certificate":"mpc","vnd.ms-artgalry":"cil","vnd.ms-cab-compressed":"cab","vnd.ms-excel.addin.macroenabled.12":"xlam","vnd.ms-excel.sheet.binary.macroenabled.12":"xlsb","vnd.ms-excel.sheet.macroenabled.12":"xlsm","vnd.ms-excel.template.macroenabled.12":"xltm","vnd.ms-fontobject":"eot","vnd.ms-htmlhelp":"chm","vnd.ms-ims":"ims","vnd.ms-lrm":"lrm","vnd.ms-officetheme":"thmx","vnd.ms-powerpoint.addin.macroenabled.12":"ppam","vnd.ms-powerpoint.presentation.macroenabled.12":"pptm","vnd.ms-powerpoint.slide.macroenabled.12":"sldm","vnd.ms-powerpoint.slideshow.macroenabled.12":"ppsm","vnd.ms-powerpoint.template.macroenabled.12":"potm","vnd.ms-project":["mpp","mpt"],"vnd.ms-word.document.macroenabled.12":"docm","vnd.ms-word.template.macroenabled.12":"dotm","vnd.ms-works":["wps","wks","wcm","wdb"],"vnd.ms-wpl":"wpl","vnd.ms-xpsdocument":"xps","vnd.mseq":"mseq","vnd.musician":"mus","vnd.muvee.style":"msty","vnd.mynfc":"taglet","vnd.neurolanguage.nlu":"nlu","vnd.nitf":["ntf","nitf"],"vnd.noblenet-directory":"nnd","vnd.noblenet-sealer":"nns","vnd.noblenet-web":"nnw","vnd.nokia.n-gage.data":"ngdat","vnd.nokia.n-gage.symbian.install":"n-gage","vnd.nokia.radio-preset":"rpst","vnd.nokia.radio-presets":"rpss","vnd.novadigm.edm":"edm","vnd.novadigm.edx":"edx","vnd.novadigm.ext":"ext","vnd.oasis.opendocument.chart-template":"otc","vnd.oasis.opendocument.formula-template":"odft","vnd.oasis.opendocument.image-template":"oti","vnd.olpc-sugar":"xo","vnd.oma.dd2+xml":"dd2","vnd.openofficeorg.extension":"oxt","vnd.openxmlformats-officedocument.presentationml.slide":"sldx","vnd.osgeo.mapguide.package":"mgp","vnd.osgi.dp":"dp","vnd.osgi.subsystem":"esa","vnd.palm":["pdb","pqa","oprc"],"vnd.pawaafile":"paw","vnd.pg.format":"str","vnd.pg.osasli":"ei6","vnd.picsel":"efif","vnd.pmi.widget":"wg","vnd.pocketlearn":"plf","vnd.powerbuilder6":"pbd","vnd.previewsystems.box":"box","vnd.proteus.magazine":"mgz","vnd.publishare-delta-tree":"qps","vnd.pvi.ptid1":"ptid","vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"vnd.realvnc.bed":"bed","vnd.recordare.musicxml":"mxl","vnd.recordare.musicxml+xml":"musicxml","vnd.rig.cryptonote":"cryptonote","vnd.rn-realmedia":"rm","vnd.rn-realmedia-vbr":"rmvb","vnd.route66.link66+xml":"link66","vnd.sailingtracker.track":"st","vnd.seemail":"see","vnd.sema":"sema","vnd.semd":"semd","vnd.semf":"semf","vnd.shana.informed.formdata":"ifm","vnd.shana.informed.formtemplate":"itp","vnd.shana.informed.interchange":"iif","vnd.shana.informed.package":"ipk","vnd.simtech-mindmapper":["twd","twds"],"vnd.smart.teacher":"teacher","vnd.solent.sdkm+xml":["sdkm","sdkd"],"vnd.spotfire.dxp":"dxp","vnd.spotfire.sfs":"sfs","vnd.stepmania.package":"smzip","vnd.stepmania.stepchart":"sm","vnd.sus-calendar":["sus","susp"],"vnd.svd":"svd","vnd.syncml+xml":"xsm","vnd.syncml.dm+wbxml":"bdm","vnd.syncml.dm+xml":"xdm","vnd.tao.intent-module-archive":"tao","vnd.tcpdump.pcap":["pcap","cap","dmp"],"vnd.tmobile-livetv":"tmo","vnd.trid.tpt":"tpt","vnd.triscape.mxs":"mxs","vnd.trueapp":"tra","vnd.ufdl":["ufd","ufdl"],"vnd.uiq.theme":"utz","vnd.umajin":"umj","vnd.unity":"unityweb","vnd.uoml+xml":"uoml","vnd.vcx":"vcx","vnd.visionary":"vis","vnd.vsf":"vsf","vnd.webturbo":"wtb","vnd.wolfram.player":"nbp","vnd.wqd":"wqd","vnd.wt.stf":"stf","vnd.xara":"xar","vnd.xfdl":"xfdl","vnd.yamaha.hv-dic":"hvd","vnd.yamaha.hv-script":"hvs","vnd.yamaha.hv-voice":"hvp","vnd.yamaha.openscoreformat":"osf","vnd.yamaha.openscoreformat.osfpvg+xml":"osfpvg","vnd.yamaha.smaf-audio":"saf","vnd.yamaha.smaf-phrase":"spf","vnd.yellowriver-custom-menu":"cmp","vnd.zul":["zir","zirz"],"vnd.zzazz.deck+xml":"zaz","voicexml+xml":"vxml",widget:"wgt",winhlp:"hlp","wsdl+xml":"wsdl","wspolicy+xml":"wspolicy","x-ace-compressed":"ace","x-authorware-bin":["aab","x32","u32","vox"],"x-authorware-map":"aam","x-authorware-seg":"aas","x-blorb":["blb","blorb"],"x-bzip":"bz","x-bzip2":["bz2","boz"],"x-cfs-compressed":"cfs","x-chat":"chat","x-conference":"nsc","x-dgc-compressed":"dgc","x-dtbncx+xml":"ncx","x-dtbook+xml":"dtb","x-dtbresource+xml":"res","x-eva":"eva","x-font-bdf":"bdf","x-font-ghostscript":"gsf","x-font-linux-psf":"psf","x-font-pcf":"pcf","x-font-snf":"snf","x-font-ttf":["ttf","ttc"],"x-font-type1":["pfa","pfb","pfm","afm"],"x-freearc":"arc","x-gca-compressed":"gca","x-glulx":"ulx","x-gramps-xml":"gramps","x-install-instructions":"install","x-lzh-compressed":["lzh","lha"],"x-mie":"mie","x-mobipocket-ebook":["prc","mobi"],"x-ms-application":"application","x-ms-shortcut":"lnk","x-ms-xbap":"xbap","x-msbinder":"obd","x-mscardfile":"crd","x-msclip":"clp","application/x-ms-installer":"msi","x-msmediaview":["mvb","m13","m14"],"x-msmetafile":["wmf","wmz","emf","emz"],"x-msmoney":"mny","x-mspublisher":"pub","x-msschedule":"scd","x-msterminal":"trm","x-mswrite":"wri","x-nzb":"nzb","x-pkcs12":["p12","pfx"],"x-pkcs7-certificates":["p7b","spc"],"x-research-info-systems":"ris","x-silverlight-app":"xap","x-sql":"sql","x-stuffitx":"sitx","x-subrip":"srt","x-t3vm-image":"t3","x-tex-tfm":"tfm","x-tgif":"obj","x-xliff+xml":"xlf","x-xz":"xz","x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"xaml+xml":"xaml","xcap-diff+xml":"xdf","xenc+xml":"xenc","xml-dtd":"dtd","xop+xml":"xop","xproc+xml":"xpl","xslt+xml":"xslt","xv+xml":["mxml","xhvml","xvml","xvm"],yang:"yang","yin+xml":"yin",envoy:"evy",fractals:"fif","internet-property-stream":"acx",olescript:"axs","vnd.ms-outlook":"msg","vnd.ms-pkicertstore":"sst","x-compress":"z","x-perfmon":["pma","pmc","pmr","pmw"],"ynd.ms-pkipko":"pko",gzip:["gz","tgz"],"smil+xml":["smi","smil"],"vnd.debian.binary-package":["deb","udeb"],"vnd.hzn-3d-crossword":"x3d","vnd.sqlite3":["db","sqlite","sqlite3","db-wal","sqlite-wal","db-shm","sqlite-shm"],"vnd.wap.sic":"sic","vnd.wap.slc":"slc","x-krita":["kra","krz"],"x-perl":["pm","pl"],yaml:["yaml","yml"]},audio:{amr:"amr","amr-wb":"awb",annodex:"axa",basic:["au","snd"],flac:"flac",midi:["mid","midi","kar","rmi"],mpeg:["mpga","mpega","mp3","m4a","mp2a","m2a","m3a"],mpegurl:"m3u",ogg:["oga","ogg","spx"],"prs.sid":"sid","x-aiff":"aifc","x-gsm":"gsm","x-ms-wma":"wma","x-ms-wax":"wax","x-pn-realaudio":"ram","x-realaudio":"ra","x-sd2":"sd2",adpcm:"adp",mp4:"mp4a",s3m:"s3m",silk:"sil","vnd.dece.audio":["uva","uvva"],"vnd.digital-winds":"eol","vnd.dra":"dra","vnd.dts":"dts","vnd.dts.hd":"dtshd","vnd.lucent.voice":"lvp","vnd.ms-playready.media.pya":"pya","vnd.nuera.ecelp4800":"ecelp4800","vnd.nuera.ecelp7470":"ecelp7470","vnd.nuera.ecelp9600":"ecelp9600","vnd.rip":"rip",webm:"weba","x-caf":"caf","x-matroska":"mka","x-pn-realaudio-plugin":"rmp",xm:"xm",aac:"aac",aiff:["aiff","aif","aff"],opus:"opus",wav:"wav"},chemical:{"x-alchemy":"alc","x-cache":["cac","cache"],"x-cache-csf":"csf","x-cactvs-binary":["cbin","cascii","ctab"],"x-cdx":"cdx","x-chem3d":"c3d","x-cif":"cif","x-cmdf":"cmdf","x-cml":"cml","x-compass":"cpa","x-crossfire":"bsd","x-csml":["csml","csm"],"x-ctx":"ctx","x-cxf":["cxf","cef"],"x-embl-dl-nucleotide":["emb","embl"],"x-gamess-input":["inp","gam","gamin"],"x-gaussian-checkpoint":["fch","fchk"],"x-gaussian-cube":"cub","x-gaussian-input":["gau","gjc","gjf"],"x-gaussian-log":"gal","x-gcg8-sequence":"gcg","x-genbank":"gen","x-hin":"hin","x-isostar":["istr","ist"],"x-jcamp-dx":["jdx","dx"],"x-kinemage":"kin","x-macmolecule":"mcm","x-macromodel-input":"mmod","x-mdl-molfile":"mol","x-mdl-rdfile":"rd","x-mdl-rxnfile":"rxn","x-mdl-sdfile":"sd","x-mdl-tgf":"tgf","x-mmcif":"mcif","x-mol2":"mol2","x-molconn-Z":"b","x-mopac-graph":"gpt","x-mopac-input":["mop","mopcrt","zmt"],"x-mopac-out":"moo","x-ncbi-asn1":"asn","x-ncbi-asn1-ascii":["prt","ent"],"x-ncbi-asn1-binary":"val","x-rosdal":"ros","x-swissprot":"sw","x-vamas-iso14976":"vms","x-vmd":"vmd","x-xtel":"xtel","x-xyz":"xyz"},font:{otf:"otf",woff:"woff",woff2:"woff2"},image:{gif:"gif",ief:"ief",jpeg:["jpeg","jpg","jpe","jfif","jfif-tbnl","jif"],pcx:"pcx",png:"png","svg+xml":["svg","svgz"],tiff:["tiff","tif"],"vnd.djvu":["djvu","djv"],"vnd.wap.wbmp":"wbmp","x-canon-cr2":"cr2","x-canon-crw":"crw","x-cmu-raster":"ras","x-coreldraw":"cdr","x-coreldrawpattern":"pat","x-coreldrawtemplate":"cdt","x-corelphotopaint":"cpt","x-epson-erf":"erf","x-icon":"ico","x-jg":"art","x-jng":"jng","x-nikon-nef":"nef","x-olympus-orf":"orf","x-portable-anymap":"pnm","x-portable-bitmap":"pbm","x-portable-graymap":"pgm","x-portable-pixmap":"ppm","x-rgb":"rgb","x-xbitmap":"xbm","x-xpixmap":"xpm","x-xwindowdump":"xwd",bmp:"bmp",cgm:"cgm",g3fax:"g3",ktx:"ktx","prs.btif":"btif",sgi:"sgi","vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"vnd.dwg":"dwg","vnd.dxf":"dxf","vnd.fastbidsheet":"fbs","vnd.fpx":"fpx","vnd.fst":"fst","vnd.fujixerox.edmics-mmr":"mmr","vnd.fujixerox.edmics-rlc":"rlc","vnd.ms-modi":"mdi","vnd.ms-photo":"wdp","vnd.net-fpx":"npx","vnd.xiff":"xif",webp:"webp","x-3ds":"3ds","x-cmx":"cmx","x-freehand":["fh","fhc","fh4","fh5","fh7"],"x-pict":["pic","pct"],"x-tga":"tga","cis-cod":"cod",avif:"avifs",heic:["heif","heic"],pjpeg:["pjpg"],"vnd.adobe.photoshop":"psd","x-adobe-dng":"dng","x-fuji-raf":"raf","x-icns":"icns","x-kodak-dcr":"dcr","x-kodak-k25":"k25","x-kodak-kdc":"kdc","x-minolta-mrw":"mrw","x-panasonic-raw":["raw","rw2","rwl"],"x-pentax-pef":["pef","ptx"],"x-sigma-x3f":"x3f","x-sony-arw":"arw","x-sony-sr2":"sr2","x-sony-srf":"srf"},message:{rfc822:["eml","mime","mht","mhtml","nws"]},model:{iges:["igs","iges"],mesh:["msh","mesh","silo"],vrml:["wrl","vrml"],"x3d+vrml":["x3dv","x3dvz"],"x3d+xml":"x3dz","x3d+binary":["x3db","x3dbz"],"vnd.collada+xml":"dae","vnd.dwf":"dwf","vnd.gdl":"gdl","vnd.gtw":"gtw","vnd.mts":"mts","vnd.usdz+zip":"usdz","vnd.vtu":"vtu"},text:{"cache-manifest":["manifest","appcache"],calendar:["ics","icz","ifb"],css:"css",csv:"csv",h323:"323",html:["html","htm","shtml","stm"],iuls:"uls",plain:["txt","text","brf","conf","def","list","log","in","bas","diff","ksh"],richtext:"rtx",scriptlet:["sct","wsc"],texmacs:"tm","tab-separated-values":"tsv","vnd.sun.j2me.app-descriptor":"jad","vnd.wap.wml":"wml","vnd.wap.wmlscript":"wmls","x-bibtex":"bib","x-boo":"boo","x-c++hdr":["h++","hpp","hxx","hh"],"x-c++src":["c++","cpp","cxx","cc"],"x-component":"htc","x-dsrc":"d","x-diff":"patch","x-haskell":"hs","x-java":"java","x-literate-haskell":"lhs","x-moc":"moc","x-pascal":["p","pas","pp","inc"],"x-pcs-gcd":"gcd","x-python":"py","x-scala":"scala","x-setext":"etx","x-tcl":["tcl","tk"],"x-tex":["tex","ltx","sty","cls"],"x-vcalendar":"vcs","x-vcard":"vcf",n3:"n3","prs.lines.tag":"dsc",sgml:["sgml","sgm"],troff:["t","tr","roff","man","me","ms"],turtle:"ttl","uri-list":["uri","uris","urls"],vcard:"vcard","vnd.curl":"curl","vnd.curl.dcurl":"dcurl","vnd.curl.scurl":"scurl","vnd.curl.mcurl":"mcurl","vnd.dvb.subtitle":"sub","vnd.fly":"fly","vnd.fmi.flexstor":"flx","vnd.graphviz":"gv","vnd.in3d.3dml":"3dml","vnd.in3d.spot":"spot","x-asm":["s","asm"],"x-c":["c","h","dic"],"x-fortran":["f","for","f77","f90"],"x-opml":"opml","x-nfo":"nfo","x-sfv":"sfv","x-uuencode":"uu",webviewhtml:"htt",javascript:"js",json:"json",markdown:["md","markdown","mdown","markdn"],"vnd.wap.si":"si","vnd.wap.sl":"sl"},video:{avif:"avif","3gpp":"3gp",annodex:"axv",dl:"dl",dv:["dif","dv"],fli:"fli",gl:"gl",mpeg:["mpeg","mpg","mpe","m1v","m2v","mp2","mpa","mpv2"],mp4:["mp4","mp4v","mpg4"],quicktime:["qt","mov"],ogg:"ogv","vnd.mpegurl":["mxu","m4u"],"x-flv":"flv","x-la-asf":["lsf","lsx"],"x-mng":"mng","x-ms-asf":["asf","asx","asr"],"x-ms-wm":"wm","x-ms-wmv":"wmv","x-ms-wmx":"wmx","x-ms-wvx":"wvx","x-msvideo":"avi","x-sgi-movie":"movie","x-matroska":["mpv","mkv","mk3d","mks"],"3gpp2":"3g2",h261:"h261",h263:"h263",h264:"h264",jpeg:"jpgv",jpm:["jpm","jpgm"],mj2:["mj2","mjp2"],"vnd.dece.hd":["uvh","uvvh"],"vnd.dece.mobile":["uvm","uvvm"],"vnd.dece.pd":["uvp","uvvp"],"vnd.dece.sd":["uvs","uvvs"],"vnd.dece.video":["uvv","uvvv"],"vnd.dvb.file":"dvb","vnd.fvt":"fvt","vnd.ms-playready.media.pyv":"pyv","vnd.uvvu.mp4":["uvu","uvvu"],"vnd.vivo":"viv",webm:"webm","x-f4v":"f4v","x-m4v":"m4v","x-ms-vob":"vob","x-smv":"smv",mp2t:"ts"},"x-conference":{"x-cooltalk":"ice"},"x-world":{"x-vrml":["vrm","flr","wrz","xaf","xof"]}};(()=>{const e={};for(const n of Object.keys(wr))for(const t of Object.keys(wr[n])){const r=wr[n][t];if(typeof r=="string")e[r]=n+"/"+t;else for(let s=0;s<r.length;s++)e[r[s]]=n+"/"+t}return e})();const Vi=[];for(let e=0;e<256;e++){let n=e;for(let t=0;t<8;t++)n&1?n=n>>>1^3988292384:n=n>>>1;Vi[e]=n}class Pr{constructor(n){this.crc=n||-1}append(n){let t=this.crc|0;for(let r=0,s=n.length|0;r<s;r++)t=t>>>8^Vi[(t^n[r])&255];this.crc=t}get(){return~this.crc}}class qi extends TransformStream{constructor(){let n;const t=new Pr;super({transform(r,s){t.append(r),s.enqueue(r)},flush(){const r=new Uint8Array(4);new DataView(r.buffer).setUint32(0,t.get()),n.value=r}}),n=this}}function On(e){if(typeof TextEncoder==It){e=unescape(encodeURIComponent(e));const n=new Uint8Array(e.length);for(let t=0;t<n.length;t++)n[t]=e.charCodeAt(t);return n}else return new TextEncoder().encode(e)}const Fe={concat(e,n){if(e.length===0||n.length===0)return e.concat(n);const t=e[e.length-1],r=Fe.getPartial(t);return r===32?e.concat(n):Fe._shiftRight(n,r,t|0,e.slice(0,e.length-1))},bitLength(e){const n=e.length;if(n===0)return 0;const t=e[n-1];return(n-1)*32+Fe.getPartial(t)},clamp(e,n){if(e.length*32<n)return e;e=e.slice(0,Math.ceil(n/32));const t=e.length;return n=n&31,t>0&&n&&(e[t-1]=Fe.partial(n,e[t-1]&2147483648>>n-1,1)),e},partial(e,n,t){return e===32?n:(t?n|0:n<<32-e)+e*1099511627776},getPartial(e){return Math.round(e/1099511627776)||32},_shiftRight(e,n,t,r){for(r===void 0&&(r=[]);n>=32;n-=32)r.push(t),t=0;if(n===0)return r.concat(e);for(let o=0;o<e.length;o++)r.push(t|e[o]>>>n),t=e[o]<<32-n;const s=e.length?e[e.length-1]:0,i=Fe.getPartial(s);return r.push(Fe.partial(n+i&31,n+i>32?t:r.pop(),1)),r}},qn={bytes:{fromBits(e){const t=Fe.bitLength(e)/8,r=new Uint8Array(t);let s;for(let i=0;i<t;i++)(i&3)===0&&(s=e[i/4]),r[i]=s>>>24,s<<=8;return r},toBits(e){const n=[];let t,r=0;for(t=0;t<e.length;t++)r=r<<8|e[t],(t&3)===3&&(n.push(r),r=0);return t&3&&n.push(Fe.partial(8*(t&3),r)),n}}},ji={};ji.sha1=class{constructor(e){const n=this;n.blockSize=512,n._init=[1732584193,4023233417,2562383102,271733878,3285377520],n._key=[1518500249,1859775393,2400959708,3395469782],e?(n._h=e._h.slice(0),n._buffer=e._buffer.slice(0),n._length=e._length):n.reset()}reset(){const e=this;return e._h=e._init.slice(0),e._buffer=[],e._length=0,e}update(e){const n=this;typeof e=="string"&&(e=qn.utf8String.toBits(e));const t=n._buffer=Fe.concat(n._buffer,e),r=n._length,s=n._length=r+Fe.bitLength(e);if(s>9007199254740991)throw new Error("Cannot hash more than 2^53 - 1 bits");const i=new Uint32Array(t);let o=0;for(let a=n.blockSize+r-(n.blockSize+r&n.blockSize-1);a<=s;a+=n.blockSize)n._block(i.subarray(16*o,16*(o+1))),o+=1;return t.splice(0,16*o),n}finalize(){const e=this;let n=e._buffer;const t=e._h;n=Fe.concat(n,[Fe.partial(1,1)]);for(let r=n.length+2;r&15;r++)n.push(0);for(n.push(Math.floor(e._length/4294967296)),n.push(e._length|0);n.length;)e._block(n.splice(0,16));return e.reset(),t}_f(e,n,t,r){if(e<=19)return n&t|~n&r;if(e<=39)return n^t^r;if(e<=59)return n&t|n&r|t&r;if(e<=79)return n^t^r}_S(e,n){return n<<e|n>>>32-e}_block(e){const n=this,t=n._h,r=Array(80);for(let l=0;l<16;l++)r[l]=e[l];let s=t[0],i=t[1],o=t[2],a=t[3],u=t[4];for(let l=0;l<=79;l++){l>=16&&(r[l]=n._S(1,r[l-3]^r[l-8]^r[l-14]^r[l-16]));const c=n._S(5,s)+n._f(l,i,o,a)+u+r[l]+n._key[Math.floor(l/20)]|0;u=a,a=o,o=n._S(30,i),i=s,s=c}t[0]=t[0]+s|0,t[1]=t[1]+i|0,t[2]=t[2]+o|0,t[3]=t[3]+a|0,t[4]=t[4]+u|0}};const Wi={};Wi.aes=class{constructor(e){const n=this;n._tables=[[[],[],[],[],[]],[[],[],[],[],[]]],n._tables[0][0][0]||n._precompute();const t=n._tables[0][4],r=n._tables[1],s=e.length;let i,o,a,u=1;if(s!==4&&s!==6&&s!==8)throw new Error("invalid aes key size");for(n._key=[o=e.slice(0),a=[]],i=s;i<4*s+28;i++){let l=o[i-1];(i%s===0||s===8&&i%s===4)&&(l=t[l>>>24]<<24^t[l>>16&255]<<16^t[l>>8&255]<<8^t[l&255],i%s===0&&(l=l<<8^l>>>24^u<<24,u=u<<1^(u>>7)*283)),o[i]=o[i-s]^l}for(let l=0;i;l++,i--){const c=o[l&3?i:i-4];i<=4||l<4?a[l]=c:a[l]=r[0][t[c>>>24]]^r[1][t[c>>16&255]]^r[2][t[c>>8&255]]^r[3][t[c&255]]}}encrypt(e){return this._crypt(e,0)}decrypt(e){return this._crypt(e,1)}_precompute(){const e=this._tables[0],n=this._tables[1],t=e[4],r=n[4],s=[],i=[];let o,a,u,l;for(let c=0;c<256;c++)i[(s[c]=c<<1^(c>>7)*283)^c]=c;for(let c=o=0;!t[c];c^=a||1,o=i[o]||1){let h=o^o<<1^o<<2^o<<3^o<<4;h=h>>8^h&255^99,t[c]=h,r[h]=c,l=s[u=s[a=s[c]]];let m=l*16843009^u*65537^a*257^c*16843008,x=s[h]*257^h*16843008;for(let y=0;y<4;y++)e[y][c]=x=x<<24^x>>>8,n[y][h]=m=m<<24^m>>>8}for(let c=0;c<5;c++)e[c]=e[c].slice(0),n[c]=n[c].slice(0)}_crypt(e,n){if(e.length!==4)throw new Error("invalid aes block size");const t=this._key[n],r=t.length/4-2,s=[0,0,0,0],i=this._tables[n],o=i[0],a=i[1],u=i[2],l=i[3],c=i[4];let h=e[0]^t[0],m=e[n?3:1]^t[1],x=e[2]^t[2],y=e[n?1:3]^t[3],f=4,d,p,D;for(let g=0;g<r;g++)d=o[h>>>24]^a[m>>16&255]^u[x>>8&255]^l[y&255]^t[f],p=o[m>>>24]^a[x>>16&255]^u[y>>8&255]^l[h&255]^t[f+1],D=o[x>>>24]^a[y>>16&255]^u[h>>8&255]^l[m&255]^t[f+2],y=o[y>>>24]^a[h>>16&255]^u[m>>8&255]^l[x&255]^t[f+3],f+=4,h=d,m=p,x=D;for(let g=0;g<4;g++)s[n?3&-g:g]=c[h>>>24]<<24^c[m>>16&255]<<16^c[x>>8&255]<<8^c[y&255]^t[f++],d=h,h=m,m=x,x=y,y=d;return s}};const ju={getRandomValues(e){const n=new Uint32Array(e.buffer),t=r=>{let s=987654321;const i=4294967295;return function(){return s=36969*(s&65535)+(s>>16)&i,r=18e3*(r&65535)+(r>>16)&i,(((s<<16)+r&i)/4294967296+.5)*(Math.random()>.5?1:-1)}};for(let r=0,s;r<e.length;r+=4){const i=t((s||Math.random())*4294967296);s=i()*987654071,n[r/4]=i()*4294967296|0}return e}},Hi={};Hi.ctrGladman=class{constructor(e,n){this._prf=e,this._initIv=n,this._iv=n}reset(){this._iv=this._initIv}update(e){return this.calculate(this._prf,e,this._iv)}incWord(e){if((e>>24&255)===255){let n=e>>16&255,t=e>>8&255,r=e&255;n===255?(n=0,t===255?(t=0,r===255?r=0:++r):++t):++n,e=0,e+=n<<16,e+=t<<8,e+=r}else e+=1<<24;return e}incCounter(e){(e[0]=this.incWord(e[0]))===0&&(e[1]=this.incWord(e[1]))}calculate(e,n,t){let r;if(!(r=n.length))return[];const s=Fe.bitLength(n);for(let i=0;i<r;i+=4){this.incCounter(t);const o=e.encrypt(t);n[i]^=o[0],n[i+1]^=o[1],n[i+2]^=o[2],n[i+3]^=o[3]}return Fe.clamp(n,s)}};const jt={importKey(e){return new jt.hmacSha1(qn.bytes.toBits(e))},pbkdf2(e,n,t,r){if(t=t||1e4,r<0||t<0)throw new Error("invalid params to pbkdf2");const s=(r>>5)+1<<2;let i,o,a,u,l;const c=new ArrayBuffer(s),h=new DataView(c);let m=0;const x=Fe;for(n=qn.bytes.toBits(n),l=1;m<(s||1);l++){for(i=o=e.encrypt(x.concat(n,[l])),a=1;a<t;a++)for(o=e.encrypt(o),u=0;u<o.length;u++)i[u]^=o[u];for(a=0;m<(s||1)&&a<i.length;a++)h.setInt32(m,i[a]),m+=4}return c.slice(0,r/8)}};jt.hmacSha1=class{constructor(e){const n=this,t=n._hash=ji.sha1,r=[[],[]];n._baseHash=[new t,new t];const s=n._baseHash[0].blockSize/32;e.length>s&&(e=new t().update(e).finalize());for(let i=0;i<s;i++)r[0][i]=e[i]^909522486,r[1][i]=e[i]^1549556828;n._baseHash[0].update(r[0]),n._baseHash[1].update(r[1]),n._resultHash=new t(n._baseHash[0])}reset(){const e=this;e._resultHash=new e._hash(e._baseHash[0]),e._updated=!1}update(e){const n=this;n._updated=!0,n._resultHash.update(e)}digest(){const e=this,n=e._resultHash.finalize(),t=new e._hash(e._baseHash[1]).update(n).finalize();return e.reset(),t}encrypt(e){if(this._updated)throw new Error("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}};const Wu=typeof crypto!=It&&typeof crypto.getRandomValues==xn,Yi="Invalid password",Gi="Invalid signature",Zi="zipjs-abort-check-password";function Xi(e){return Wu?crypto.getRandomValues(e):ju.getRandomValues(e)}const Xt=16,Hu="raw",Ki={name:"PBKDF2"},Yu={name:"HMAC"},Gu="SHA-1",Zu=Object.assign({hash:Yu},Ki),Br=Object.assign({iterations:1e3,hash:{name:Gu}},Ki),Xu=["deriveBits"],dn=[8,12,16],an=[16,24,32],St=10,Ku=[0,0,0,0],Kn=typeof crypto!=It,Dn=Kn&&crypto.subtle,Ji=Kn&&typeof Dn!=It,ct=qn.bytes,Ju=Wi.aes,zu=Hi.ctrGladman,Qu=jt.hmacSha1;let Ks=Kn&&Ji&&typeof Dn.importKey==xn,Js=Kn&&Ji&&typeof Dn.deriveBits==xn;class ec extends TransformStream{constructor({password:n,rawPassword:t,signed:r,encryptionStrength:s,checkPasswordOnly:i}){super({start(){Object.assign(this,{ready:new Promise(o=>this.resolveReady=o),password:eo(n,t),signed:r,strength:s-1,pending:new Uint8Array})},async transform(o,a){const u=this,{password:l,strength:c,resolveReady:h,ready:m}=u;l?(await nc(u,c,l,We(o,0,dn[c]+2)),o=We(o,dn[c]+2),i?a.error(new Error(Zi)):h()):await m;const x=new Uint8Array(o.length-St-(o.length-St)%Xt);a.enqueue(zi(u,o,x,0,St,!0))},async flush(o){const{signed:a,ctr:u,hmac:l,pending:c,ready:h}=this;if(l&&u){await h;const m=We(c,0,c.length-St),x=We(c,c.length-St);let y=new Uint8Array;if(m.length){const f=hn(ct,m);l.update(f);const d=u.update(f);y=pn(ct,d)}if(a){const f=We(pn(ct,l.digest()),0,St);for(let d=0;d<St;d++)if(f[d]!=x[d])throw new Error(Gi)}o.enqueue(y)}}})}}class tc extends TransformStream{constructor({password:n,rawPassword:t,encryptionStrength:r}){let s;super({start(){Object.assign(this,{ready:new Promise(i=>this.resolveReady=i),password:eo(n,t),strength:r-1,pending:new Uint8Array})},async transform(i,o){const a=this,{password:u,strength:l,resolveReady:c,ready:h}=a;let m=new Uint8Array;u?(m=await rc(a,l,u),c()):await h;const x=new Uint8Array(m.length+i.length-i.length%Xt);x.set(m,0),o.enqueue(zi(a,i,x,m.length,0))},async flush(i){const{ctr:o,hmac:a,pending:u,ready:l}=this;if(a&&o){await l;let c=new Uint8Array;if(u.length){const h=o.update(hn(ct,u));a.update(h),c=pn(ct,h)}s.signature=pn(ct,a.digest()).slice(0,St),i.enqueue(Xr(c,s.signature))}}}),s=this}}function zi(e,n,t,r,s,i){const{ctr:o,hmac:a,pending:u}=e,l=n.length-s;u.length&&(n=Xr(u,n),t=oc(t,l-l%Xt));let c;for(c=0;c<=l-Xt;c+=Xt){const h=hn(ct,We(n,c,c+Xt));i&&a.update(h);const m=o.update(h);i||a.update(m),t.set(pn(ct,m),c+r)}return e.pending=We(n,c),t}async function nc(e,n,t,r){const s=await Qi(e,n,t,We(r,0,dn[n])),i=We(r,dn[n]);if(s[0]!=i[0]||s[1]!=i[1])throw new Error(Yi)}async function rc(e,n,t){const r=Xi(new Uint8Array(dn[n])),s=await Qi(e,n,t,r);return Xr(r,s)}async function Qi(e,n,t,r){e.password=null;const s=await sc(Hu,t,Zu,!1,Xu),i=await ic(Object.assign({salt:r},Br),s,8*(an[n]*2+2)),o=new Uint8Array(i),a=hn(ct,We(o,0,an[n])),u=hn(ct,We(o,an[n],an[n]*2)),l=We(o,an[n]*2);return Object.assign(e,{keys:{key:a,authentication:u,passwordVerification:l},ctr:new zu(new Ju(a),Array.from(Ku)),hmac:new Qu(u)}),l}async function sc(e,n,t,r,s){if(Ks)try{return await Dn.importKey(e,n,t,r,s)}catch{return Ks=!1,jt.importKey(n)}else return jt.importKey(n)}async function ic(e,n,t){if(Js)try{return await Dn.deriveBits(e,n,t)}catch{return Js=!1,jt.pbkdf2(n,e.salt,Br.iterations,t)}else return jt.pbkdf2(n,e.salt,Br.iterations,t)}function eo(e,n){return n===re?On(e):n}function Xr(e,n){let t=e;return e.length+n.length&&(t=new Uint8Array(e.length+n.length),t.set(e,0),t.set(n,e.length)),t}function oc(e,n){if(n&&n>e.length){const t=e;e=new Uint8Array(n),e.set(t,0)}return e}function We(e,n,t){return e.subarray(n,t)}function pn(e,n){return e.fromBits(n)}function hn(e,n){return e.toBits(n)}const Jt=12;class ac extends TransformStream{constructor({password:n,passwordVerification:t,checkPasswordOnly:r}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),to(this,n)},transform(s,i){const o=this;if(o.password){const a=zs(o,s.subarray(0,Jt));if(o.password=null,a[Jt-1]!=o.passwordVerification)throw new Error(Yi);s=s.subarray(Jt)}r?i.error(new Error(Zi)):i.enqueue(zs(o,s))}})}}class uc extends TransformStream{constructor({password:n,passwordVerification:t}){super({start(){Object.assign(this,{password:n,passwordVerification:t}),to(this,n)},transform(r,s){const i=this;let o,a;if(i.password){i.password=null;const u=Xi(new Uint8Array(Jt));u[Jt-1]=i.passwordVerification,o=new Uint8Array(r.length+u.length),o.set(Qs(i,u),0),a=Jt}else o=new Uint8Array(r.length),a=0;o.set(Qs(i,r),a),s.enqueue(o)}})}}function zs(e,n){const t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=no(e)^n[r],Kr(e,t[r]);return t}function Qs(e,n){const t=new Uint8Array(n.length);for(let r=0;r<n.length;r++)t[r]=no(e)^n[r],Kr(e,n[r]);return t}function to(e,n){const t=[305419896,591751049,878082192];Object.assign(e,{keys:t,crcKey0:new Pr(t[0]),crcKey2:new Pr(t[2])});for(let r=0;r<n.length;r++)Kr(e,n.charCodeAt(r))}function Kr(e,n){let[t,r,s]=e.keys;e.crcKey0.append([n]),t=~e.crcKey0.get(),r=ei(Math.imul(ei(r+ro(t)),134775813)+1),e.crcKey2.append([r>>>24]),s=~e.crcKey2.get(),e.keys=[t,r,s]}function no(e){const n=e.keys[2]|2;return ro(Math.imul(n,n^1)>>>8)}function ro(e){return e&255}function ei(e){return e&4294967295}const ti="deflate-raw";class cc extends TransformStream{constructor(n,{chunkSize:t,CompressionStream:r,CompressionStreamNative:s}){super({});const{compressed:i,encrypted:o,useCompressionStream:a,zipCrypto:u,signed:l,level:c}=n,h=this;let m,x,y=so(super.readable);(!o||u)&&l&&(m=new qi,y=lt(y,m)),i&&(y=oo(y,a,{level:c,chunkSize:t},s,r)),o&&(u?y=lt(y,new uc(n)):(x=new tc(n),y=lt(y,x))),io(h,y,()=>{let f;o&&!u&&(f=x.signature),(!o||u)&&l&&(f=new DataView(m.value.buffer).getUint32(0)),h.signature=f})}}class lc extends TransformStream{constructor(n,{chunkSize:t,DecompressionStream:r,DecompressionStreamNative:s}){super({});const{zipCrypto:i,encrypted:o,signed:a,signature:u,compressed:l,useCompressionStream:c}=n;let h,m,x=so(super.readable);o&&(i?x=lt(x,new ac(n)):(m=new ec(n),x=lt(x,m))),l&&(x=oo(x,c,{chunkSize:t},s,r)),(!o||i)&&a&&(h=new qi,x=lt(x,h)),io(this,x,()=>{if((!o||i)&&a){const y=new DataView(h.value.buffer);if(u!=y.getUint32(0,!1))throw new Error(Gi)}})}}function so(e){return lt(e,new TransformStream({transform(n,t){n&&n.length&&t.enqueue(n)}}))}function io(e,n,t){n=lt(n,new TransformStream({flush:t})),Object.defineProperty(e,"readable",{get(){return n}})}function oo(e,n,t,r,s){try{const i=n&&r?r:s;e=lt(e,new i(ti,t))}catch{if(n)try{e=lt(e,new s(ti,t))}catch{return e}else return e}return e}function lt(e,n){return e.pipeThrough(n)}const fc="message",dc="start",pc="pull",ni="data",hc="ack",ri="close",ao="deflate",mc="inflate";class xc extends TransformStream{constructor(n,t){super({});const r=this,{codecType:s}=n;let i;s.startsWith(ao)?i=cc:s.startsWith(mc)&&(i=lc);let o=0,a=0;const u=new i(n,t),l=super.readable,c=new TransformStream({transform(m,x){m&&m.length&&(a+=m.length,x.enqueue(m))},flush(){Object.assign(r,{inputSize:a})}}),h=new TransformStream({transform(m,x){m&&m.length&&(o+=m.length,x.enqueue(m))},flush(){const{signature:m}=u;Object.assign(r,{signature:m,outputSize:o,inputSize:a})}});Object.defineProperty(r,"readable",{get(){return l.pipeThrough(c).pipeThrough(u).pipeThrough(h)}})}}class Dc extends TransformStream{constructor(n){let t;super({transform:r,flush(s){t&&t.length&&s.enqueue(t)}});function r(s,i){if(t){const o=new Uint8Array(t.length+s.length);o.set(t),o.set(s,t.length),s=o,t=null}s.length>n?(i.enqueue(s.slice(0,n)),r(s.slice(n),i)):t=s}}}let uo=typeof Worker!=It;class yr{constructor(n,{readable:t,writable:r},{options:s,config:i,streamOptions:o,useWebWorkers:a,transferStreams:u,scripts:l},c){const{signal:h}=o;return Object.assign(n,{busy:!0,readable:t.pipeThrough(new Dc(i.chunkSize)).pipeThrough(new gc(t,o),{signal:h}),writable:r,options:Object.assign({},s),scripts:l,transferStreams:u,terminate(){return new Promise(m=>{const{worker:x,busy:y}=n;x?(y?n.resolveTerminated=m:(x.terminate(),m()),n.interface=null):m()})},onTaskFinished(){const{resolveTerminated:m}=n;m&&(n.resolveTerminated=null,n.terminated=!0,n.worker.terminate(),m()),n.busy=!1,c(n)}}),(a&&uo?wc:co)(n,i)}}class gc extends TransformStream{constructor(n,{onstart:t,onprogress:r,size:s,onend:i}){let o=0;super({async start(){t&&await br(t,s)},async transform(a,u){o+=a.length,r&&await br(r,o,s),u.enqueue(a)},async flush(){n.size=o,i&&await br(i,o)}})}}async function br(e,...n){try{await e(...n)}catch{}}function co(e,n){return{run:()=>yc(e,n)}}function wc(e,n){const{baseURL:t,chunkSize:r}=n;if(!e.interface){let s;try{s=Ac(e.scripts[0],t,e)}catch{return uo=!1,co(e,n)}Object.assign(e,{worker:s,interface:{run:()=>bc(e,{chunkSize:r})}})}return e.interface}async function yc({options:e,readable:n,writable:t,onTaskFinished:r},s){try{const i=new xc(e,s);await n.pipeThrough(i).pipeTo(t,{preventClose:!0,preventAbort:!0});const{signature:o,inputSize:a,outputSize:u}=i;return{signature:o,inputSize:a,outputSize:u}}finally{r()}}async function bc(e,n){let t,r;const s=new Promise((m,x)=>{t=m,r=x});Object.assign(e,{reader:null,writer:null,resolveResult:t,rejectResult:r,result:s});const{readable:i,options:o,scripts:a}=e,{writable:u,closed:l}=_c(e.writable),c=Nn({type:dc,scripts:a.slice(1),options:o,config:n,readable:i,writable:u},e);c||Object.assign(e,{reader:i.getReader(),writer:u.getWriter()});const h=await s;return c||await u.getWriter().close(),await l,h}function _c(e){let n;const t=new Promise(s=>n=s);return{writable:new WritableStream({async write(s){const i=e.getWriter();await i.ready,await i.write(s),i.releaseLock()},close(){n()},abort(s){return e.getWriter().abort(s)}}),closed:t}}let si=!0,ii=!0;function Ac(e,n,t){const r={type:"module"};let s,i;typeof e==xn&&(e=e());try{s=new URL(e,n)}catch{s=e}if(si)try{i=new Worker(s)}catch{si=!1,i=new Worker(s,r)}else i=new Worker(s,r);return i.addEventListener(fc,o=>vc(o,t)),i}function Nn(e,{worker:n,writer:t,onTaskFinished:r,transferStreams:s}){try{const{value:i,readable:o,writable:a}=e,u=[];if(i&&(i.byteLength<i.buffer.byteLength?e.value=i.buffer.slice(0,i.byteLength):e.value=i.buffer,u.push(e.value)),s&&ii?(o&&u.push(o),a&&u.push(a)):e.readable=e.writable=null,u.length)try{return n.postMessage(e,u),!0}catch{ii=!1,e.readable=e.writable=null,n.postMessage(e)}else n.postMessage(e)}catch(i){throw t&&t.releaseLock(),r(),i}}async function vc({data:e},n){const{type:t,value:r,messageId:s,result:i,error:o}=e,{reader:a,writer:u,resolveResult:l,rejectResult:c,onTaskFinished:h}=n;try{if(o){const{message:x,stack:y,code:f,name:d}=o,p=new Error(x);Object.assign(p,{stack:y,code:f,name:d}),m(p)}else{if(t==pc){const{value:x,done:y}=await a.read();Nn({type:ni,value:x,done:y,messageId:s},n)}t==ni&&(await u.ready,await u.write(new Uint8Array(r)),Nn({type:hc,messageId:s},n)),t==ri&&m(null,i)}}catch(x){Nn({type:ri,messageId:s},n),m(x)}function m(x,y){x?c(x):l(y),u&&u.releaseLock(),h()}}let Vt=[];const _r=[];let oi=0;async function Cc(e,n){const{options:t,config:r}=n,{transferStreams:s,useWebWorkers:i,useCompressionStream:o,codecType:a,compressed:u,signed:l,encrypted:c}=t,{workerScripts:h,maxWorkers:m}=r;n.transferStreams=s||s===re;const x=!u&&!l&&!c&&!n.transferStreams;return n.useWebWorkers=!x&&(i||i===re&&r.useWebWorkers),n.scripts=n.useWebWorkers&&h?h[a]:[],t.useCompressionStream=o||o===re&&r.useCompressionStream,(await y()).run();async function y(){const d=Vt.find(p=>!p.busy);if(d)return ai(d),new yr(d,e,n,f);if(Vt.length<m){const p={indexWorker:oi};return oi++,Vt.push(p),new yr(p,e,n,f)}else return new Promise(p=>_r.push({resolve:p,stream:e,workerOptions:n}))}function f(d){if(_r.length){const[{resolve:p,stream:D,workerOptions:g}]=_r.splice(0,1);p(new yr(d,D,g,f))}else d.worker?(ai(d),Ec(d,n)):Vt=Vt.filter(p=>p!=d)}}function Ec(e,n){const{config:t}=n,{terminateWorkerTimeout:r}=t;Number.isFinite(r)&&r>=0&&(e.terminated?e.terminated=!1:e.terminateTimeout=setTimeout(async()=>{Vt=Vt.filter(s=>s!=e);try{await e.terminate()}catch{}},r))}function ai(e){const{terminateTimeout:n}=e;n&&(clearTimeout(n),e.terminateTimeout=null)}function Fc(e,n={}){const t=`const{Array:e,Object:t,Number:n,Math:r,Error:s,Uint8Array:i,Uint16Array:o,Uint32Array:c,Int32Array:f,Map:a,DataView:l,Promise:u,TextEncoder:w,crypto:h,postMessage:d,TransformStream:p,ReadableStream:y,WritableStream:m,CompressionStream:b,DecompressionStream:g}=self,k=void 0,v="undefined",S="function";class z{constructor(e){return class extends p{constructor(t,n){const r=new e(n);super({transform(e,t){t.enqueue(r.append(e))},flush(e){const t=r.flush();t&&e.enqueue(t)}})}}}}const C=[];for(let e=0;256>e;e++){let t=e;for(let e=0;8>e;e++)1&t?t=t>>>1^3988292384:t>>>=1;C[e]=t}class x{constructor(e){this.t=e||-1}append(e){let t=0|this.t;for(let n=0,r=0|e.length;r>n;n++)t=t>>>8^C[255&(t^e[n])];this.t=t}get(){return~this.t}}class A extends p{constructor(){let e;const t=new x;super({transform(e,n){t.append(e),n.enqueue(e)},flush(){const n=new i(4);new l(n.buffer).setUint32(0,t.get()),e.value=n}}),e=this}}const _={concat(e,t){if(0===e.length||0===t.length)return e.concat(t);const n=e[e.length-1],r=_.i(n);return 32===r?e.concat(t):_.o(t,r,0|n,e.slice(0,e.length-1))},l(e){const t=e.length;if(0===t)return 0;const n=e[t-1];return 32*(t-1)+_.i(n)},u(e,t){if(32*e.length<t)return e;const n=(e=e.slice(0,r.ceil(t/32))).length;return t&=31,n>0&&t&&(e[n-1]=_.h(t,e[n-1]&2147483648>>t-1,1)),e},h:(e,t,n)=>32===e?t:(n?0|t:t<<32-e)+1099511627776*e,i:e=>r.round(e/1099511627776)||32,o(e,t,n,r){for(void 0===r&&(r=[]);t>=32;t-=32)r.push(n),n=0;if(0===t)return r.concat(e);for(let s=0;s<e.length;s++)r.push(n|e[s]>>>t),n=e[s]<<32-t;const s=e.length?e[e.length-1]:0,i=_.i(s);return r.push(_.h(t+i&31,t+i>32?n:r.pop(),1)),r}},I={bytes:{p(e){const t=_.l(e)/8,n=new i(t);let r;for(let s=0;t>s;s++)3&s||(r=e[s/4]),n[s]=r>>>24,r<<=8;return n},m(e){const t=[];let n,r=0;for(n=0;n<e.length;n++)r=r<<8|e[n],3&~n||(t.push(r),r=0);return 3&n&&t.push(_.h(8*(3&n),r)),t}}},P=class{constructor(e){const t=this;t.blockSize=512,t.k=[1732584193,4023233417,2562383102,271733878,3285377520],t.v=[1518500249,1859775393,2400959708,3395469782],e?(t.S=e.S.slice(0),t.C=e.C.slice(0),t.A=e.A):t.reset()}reset(){const e=this;return e.S=e.k.slice(0),e.C=[],e.A=0,e}update(e){const t=this;"string"==typeof e&&(e=I._.m(e));const n=t.C=_.concat(t.C,e),r=t.A,i=t.A=r+_.l(e);if(i>9007199254740991)throw new s("Cannot hash more than 2^53 - 1 bits");const o=new c(n);let f=0;for(let e=t.blockSize+r-(t.blockSize+r&t.blockSize-1);i>=e;e+=t.blockSize)t.I(o.subarray(16*f,16*(f+1))),f+=1;return n.splice(0,16*f),t}P(){const e=this;let t=e.C;const n=e.S;t=_.concat(t,[_.h(1,1)]);for(let e=t.length+2;15&e;e++)t.push(0);for(t.push(r.floor(e.A/4294967296)),t.push(0|e.A);t.length;)e.I(t.splice(0,16));return e.reset(),n}D(e,t,n,r){return e>19?e>39?e>59?e>79?void 0:t^n^r:t&n|t&r|n&r:t^n^r:t&n|~t&r}V(e,t){return t<<e|t>>>32-e}I(t){const n=this,s=n.S,i=e(80);for(let e=0;16>e;e++)i[e]=t[e];let o=s[0],c=s[1],f=s[2],a=s[3],l=s[4];for(let e=0;79>=e;e++){16>e||(i[e]=n.V(1,i[e-3]^i[e-8]^i[e-14]^i[e-16]));const t=n.V(5,o)+n.D(e,c,f,a)+l+i[e]+n.v[r.floor(e/20)]|0;l=a,a=f,f=n.V(30,c),c=o,o=t}s[0]=s[0]+o|0,s[1]=s[1]+c|0,s[2]=s[2]+f|0,s[3]=s[3]+a|0,s[4]=s[4]+l|0}},D={getRandomValues(e){const t=new c(e.buffer),n=e=>{let t=987654321;const n=4294967295;return()=>(t=36969*(65535&t)+(t>>16)&n,(((t<<16)+(e=18e3*(65535&e)+(e>>16)&n)&n)/4294967296+.5)*(r.random()>.5?1:-1))};for(let s,i=0;i<e.length;i+=4){const e=n(4294967296*(s||r.random()));s=987654071*e(),t[i/4]=4294967296*e()|0}return e}},V={importKey:e=>new V.R(I.bytes.m(e)),B(e,t,n,r){if(n=n||1e4,0>r||0>n)throw new s("invalid params to pbkdf2");const i=1+(r>>5)<<2;let o,c,f,a,u;const w=new ArrayBuffer(i),h=new l(w);let d=0;const p=_;for(t=I.bytes.m(t),u=1;(i||1)>d;u++){for(o=c=e.encrypt(p.concat(t,[u])),f=1;n>f;f++)for(c=e.encrypt(c),a=0;a<c.length;a++)o[a]^=c[a];for(f=0;(i||1)>d&&f<o.length;f++)h.setInt32(d,o[f]),d+=4}return w.slice(0,r/8)},R:class{constructor(e){const t=this,n=t.M=P,r=[[],[]];t.U=[new n,new n];const s=t.U[0].blockSize/32;e.length>s&&(e=(new n).update(e).P());for(let t=0;s>t;t++)r[0][t]=909522486^e[t],r[1][t]=1549556828^e[t];t.U[0].update(r[0]),t.U[1].update(r[1]),t.K=new n(t.U[0])}reset(){const e=this;e.K=new e.M(e.U[0]),e.N=!1}update(e){this.N=!0,this.K.update(e)}digest(){const e=this,t=e.K.P(),n=new e.M(e.U[1]).update(t).P();return e.reset(),n}encrypt(e){if(this.N)throw new s("encrypt on already updated hmac called!");return this.update(e),this.digest(e)}}},R=typeof h!=v&&typeof h.getRandomValues==S,B="Invalid password",E="Invalid signature",M="zipjs-abort-check-password";function U(e){return R?h.getRandomValues(e):D.getRandomValues(e)}const K=16,N={name:"PBKDF2"},O=t.assign({hash:{name:"HMAC"}},N),T=t.assign({iterations:1e3,hash:{name:"SHA-1"}},N),W=["deriveBits"],j=[8,12,16],H=[16,24,32],L=10,F=[0,0,0,0],q=typeof h!=v,G=q&&h.subtle,J=q&&typeof G!=v,Q=I.bytes,X=class{constructor(e){const t=this;t.O=[[[],[],[],[],[]],[[],[],[],[],[]]],t.O[0][0][0]||t.T();const n=t.O[0][4],r=t.O[1],i=e.length;let o,c,f,a=1;if(4!==i&&6!==i&&8!==i)throw new s("invalid aes key size");for(t.v=[c=e.slice(0),f=[]],o=i;4*i+28>o;o++){let e=c[o-1];(o%i===0||8===i&&o%i===4)&&(e=n[e>>>24]<<24^n[e>>16&255]<<16^n[e>>8&255]<<8^n[255&e],o%i===0&&(e=e<<8^e>>>24^a<<24,a=a<<1^283*(a>>7))),c[o]=c[o-i]^e}for(let e=0;o;e++,o--){const t=c[3&e?o:o-4];f[e]=4>=o||4>e?t:r[0][n[t>>>24]]^r[1][n[t>>16&255]]^r[2][n[t>>8&255]]^r[3][n[255&t]]}}encrypt(e){return this.W(e,0)}decrypt(e){return this.W(e,1)}T(){const e=this.O[0],t=this.O[1],n=e[4],r=t[4],s=[],i=[];let o,c,f,a;for(let e=0;256>e;e++)i[(s[e]=e<<1^283*(e>>7))^e]=e;for(let l=o=0;!n[l];l^=c||1,o=i[o]||1){let i=o^o<<1^o<<2^o<<3^o<<4;i=i>>8^255&i^99,n[l]=i,r[i]=l,a=s[f=s[c=s[l]]];let u=16843009*a^65537*f^257*c^16843008*l,w=257*s[i]^16843008*i;for(let n=0;4>n;n++)e[n][l]=w=w<<24^w>>>8,t[n][i]=u=u<<24^u>>>8}for(let n=0;5>n;n++)e[n]=e[n].slice(0),t[n]=t[n].slice(0)}W(e,t){if(4!==e.length)throw new s("invalid aes block size");const n=this.v[t],r=n.length/4-2,i=[0,0,0,0],o=this.O[t],c=o[0],f=o[1],a=o[2],l=o[3],u=o[4];let w,h,d,p=e[0]^n[0],y=e[t?3:1]^n[1],m=e[2]^n[2],b=e[t?1:3]^n[3],g=4;for(let e=0;r>e;e++)w=c[p>>>24]^f[y>>16&255]^a[m>>8&255]^l[255&b]^n[g],h=c[y>>>24]^f[m>>16&255]^a[b>>8&255]^l[255&p]^n[g+1],d=c[m>>>24]^f[b>>16&255]^a[p>>8&255]^l[255&y]^n[g+2],b=c[b>>>24]^f[p>>16&255]^a[y>>8&255]^l[255&m]^n[g+3],g+=4,p=w,y=h,m=d;for(let e=0;4>e;e++)i[t?3&-e:e]=u[p>>>24]<<24^u[y>>16&255]<<16^u[m>>8&255]<<8^u[255&b]^n[g++],w=p,p=y,y=m,m=b,b=w;return i}},Y=class{constructor(e,t){this.j=e,this.H=t,this.L=t}reset(){this.L=this.H}update(e){return this.F(this.j,e,this.L)}q(e){if(255&~(e>>24))e+=1<<24;else{let t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}return e}G(e){0===(e[0]=this.q(e[0]))&&(e[1]=this.q(e[1]))}F(e,t,n){let r;if(!(r=t.length))return[];const s=_.l(t);for(let s=0;r>s;s+=4){this.G(n);const r=e.encrypt(n);t[s]^=r[0],t[s+1]^=r[1],t[s+2]^=r[2],t[s+3]^=r[3]}return _.u(t,s)}},Z=V.R;let $=q&&J&&typeof G.importKey==S,ee=q&&J&&typeof G.deriveBits==S;class te extends p{constructor({password:e,rawPassword:n,signed:r,encryptionStrength:o,checkPasswordOnly:c}){super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),signed:r,X:o-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:o,J:f,ready:a}=n;r?(await(async(e,t,n,r)=>{const i=await se(e,t,n,ce(r,0,j[t])),o=ce(r,j[t]);if(i[0]!=o[0]||i[1]!=o[1])throw new s(B)})(n,o,r,ce(e,0,j[o]+2)),e=ce(e,j[o]+2),c?t.error(new s(M)):f()):await a;const l=new i(e.length-L-(e.length-L)%K);t.enqueue(re(n,e,l,0,L,!0))},async flush(e){const{signed:t,Y:n,Z:r,pending:o,ready:c}=this;if(r&&n){await c;const f=ce(o,0,o.length-L),a=ce(o,o.length-L);let l=new i;if(f.length){const e=ae(Q,f);r.update(e);const t=n.update(e);l=fe(Q,t)}if(t){const e=ce(fe(Q,r.digest()),0,L);for(let t=0;L>t;t++)if(e[t]!=a[t])throw new s(E)}e.enqueue(l)}}})}}class ne extends p{constructor({password:e,rawPassword:n,encryptionStrength:r}){let s;super({start(){t.assign(this,{ready:new u((e=>this.J=e)),password:ie(e,n),X:r-1,pending:new i})},async transform(e,t){const n=this,{password:r,X:s,J:o,ready:c}=n;let f=new i;r?(f=await(async(e,t,n)=>{const r=U(new i(j[t]));return oe(r,await se(e,t,n,r))})(n,s,r),o()):await c;const a=new i(f.length+e.length-e.length%K);a.set(f,0),t.enqueue(re(n,e,a,f.length,0))},async flush(e){const{Y:t,Z:n,pending:r,ready:o}=this;if(n&&t){await o;let c=new i;if(r.length){const e=t.update(ae(Q,r));n.update(e),c=fe(Q,e)}s.signature=fe(Q,n.digest()).slice(0,L),e.enqueue(oe(c,s.signature))}}}),s=this}}function re(e,t,n,r,s,o){const{Y:c,Z:f,pending:a}=e,l=t.length-s;let u;for(a.length&&(t=oe(a,t),n=((e,t)=>{if(t&&t>e.length){const n=e;(e=new i(t)).set(n,0)}return e})(n,l-l%K)),u=0;l-K>=u;u+=K){const e=ae(Q,ce(t,u,u+K));o&&f.update(e);const s=c.update(e);o||f.update(s),n.set(fe(Q,s),u+r)}return e.pending=ce(t,u),n}async function se(n,r,s,o){n.password=null;const c=await(async(e,t,n,r,s)=>{if(!$)return V.importKey(t);try{return await G.importKey("raw",t,n,!1,s)}catch(e){return $=!1,V.importKey(t)}})(0,s,O,0,W),f=await(async(e,t,n)=>{if(!ee)return V.B(t,e.salt,T.iterations,n);try{return await G.deriveBits(e,t,n)}catch(r){return ee=!1,V.B(t,e.salt,T.iterations,n)}})(t.assign({salt:o},T),c,8*(2*H[r]+2)),a=new i(f),l=ae(Q,ce(a,0,H[r])),u=ae(Q,ce(a,H[r],2*H[r])),w=ce(a,2*H[r]);return t.assign(n,{keys:{key:l,$:u,passwordVerification:w},Y:new Y(new X(l),e.from(F)),Z:new Z(u)}),w}function ie(e,t){return t===k?(e=>{if(typeof w==v){const t=new i((e=unescape(encodeURIComponent(e))).length);for(let n=0;n<t.length;n++)t[n]=e.charCodeAt(n);return t}return(new w).encode(e)})(e):t}function oe(e,t){let n=e;return e.length+t.length&&(n=new i(e.length+t.length),n.set(e,0),n.set(t,e.length)),n}function ce(e,t,n){return e.subarray(t,n)}function fe(e,t){return e.p(t)}function ae(e,t){return e.m(t)}class le extends p{constructor({password:e,passwordVerification:n,checkPasswordOnly:r}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;if(n.password){const t=we(n,e.subarray(0,12));if(n.password=null,t[11]!=n.passwordVerification)throw new s(B);e=e.subarray(12)}r?t.error(new s(M)):t.enqueue(we(n,e))}})}}class ue extends p{constructor({password:e,passwordVerification:n}){super({start(){t.assign(this,{password:e,passwordVerification:n}),de(this,e)},transform(e,t){const n=this;let r,s;if(n.password){n.password=null;const t=U(new i(12));t[11]=n.passwordVerification,r=new i(e.length+t.length),r.set(he(n,t),0),s=12}else r=new i(e.length),s=0;r.set(he(n,e),s),t.enqueue(r)}})}}function we(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,n[r]);return n}function he(e,t){const n=new i(t.length);for(let r=0;r<t.length;r++)n[r]=ye(e)^t[r],pe(e,t[r]);return n}function de(e,n){const r=[305419896,591751049,878082192];t.assign(e,{keys:r,ee:new x(r[0]),te:new x(r[2])});for(let t=0;t<n.length;t++)pe(e,n.charCodeAt(t))}function pe(e,t){let[n,s,i]=e.keys;e.ee.append([t]),n=~e.ee.get(),s=be(r.imul(be(s+me(n)),134775813)+1),e.te.append([s>>>24]),i=~e.te.get(),e.keys=[n,s,i]}function ye(e){const t=2|e.keys[2];return me(r.imul(t,1^t)>>>8)}function me(e){return 255&e}function be(e){return 4294967295&e}const ge="deflate-raw";class ke extends p{constructor(e,{chunkSize:t,CompressionStream:n,CompressionStreamNative:r}){super({});const{compressed:s,encrypted:i,useCompressionStream:o,zipCrypto:c,signed:f,level:a}=e,u=this;let w,h,d=Se(super.readable);i&&!c||!f||(w=new A,d=xe(d,w)),s&&(d=Ce(d,o,{level:a,chunkSize:t},r,n)),i&&(c?d=xe(d,new ue(e)):(h=new ne(e),d=xe(d,h))),ze(u,d,(()=>{let e;i&&!c&&(e=h.signature),i&&!c||!f||(e=new l(w.value.buffer).getUint32(0)),u.signature=e}))}}class ve extends p{constructor(e,{chunkSize:t,DecompressionStream:n,DecompressionStreamNative:r}){super({});const{zipCrypto:i,encrypted:o,signed:c,signature:f,compressed:a,useCompressionStream:u}=e;let w,h,d=Se(super.readable);o&&(i?d=xe(d,new le(e)):(h=new te(e),d=xe(d,h))),a&&(d=Ce(d,u,{chunkSize:t},r,n)),o&&!i||!c||(w=new A,d=xe(d,w)),ze(this,d,(()=>{if((!o||i)&&c){const e=new l(w.value.buffer);if(f!=e.getUint32(0,!1))throw new s(E)}}))}}function Se(e){return xe(e,new p({transform(e,t){e&&e.length&&t.enqueue(e)}}))}function ze(e,n,r){n=xe(n,new p({flush:r})),t.defineProperty(e,"readable",{get:()=>n})}function Ce(e,t,n,r,s){try{e=xe(e,new(t&&r?r:s)(ge,n))}catch(r){if(!t)return e;try{e=xe(e,new s(ge,n))}catch(t){return e}}return e}function xe(e,t){return e.pipeThrough(t)}const Ae="data",_e="close";class Ie extends p{constructor(e,n){super({});const r=this,{codecType:s}=e;let i;s.startsWith("deflate")?i=ke:s.startsWith("inflate")&&(i=ve);let o=0,c=0;const f=new i(e,n),a=super.readable,l=new p({transform(e,t){e&&e.length&&(c+=e.length,t.enqueue(e))},flush(){t.assign(r,{inputSize:c})}}),u=new p({transform(e,t){e&&e.length&&(o+=e.length,t.enqueue(e))},flush(){const{signature:e}=f;t.assign(r,{signature:e,outputSize:o,inputSize:c})}});t.defineProperty(r,"readable",{get:()=>a.pipeThrough(l).pipeThrough(f).pipeThrough(u)})}}class Pe extends p{constructor(e){let t;super({transform:function n(r,s){if(t){const e=new i(t.length+r.length);e.set(t),e.set(r,t.length),r=e,t=null}r.length>e?(s.enqueue(r.slice(0,e)),n(r.slice(e),s)):t=r},flush(e){t&&t.length&&e.enqueue(t)}})}}const De=new a,Ve=new a;let Re,Be=0,Ee=!0;async function Me(e){try{const{options:t,scripts:r,config:s}=e;if(r&&r.length)try{Ee?importScripts.apply(k,r):await Ue(r)}catch(e){Ee=!1,await Ue(r)}self.initCodec&&self.initCodec(),s.CompressionStreamNative=self.CompressionStream,s.DecompressionStreamNative=self.DecompressionStream,self.Deflate&&(s.CompressionStream=new z(self.Deflate)),self.Inflate&&(s.DecompressionStream=new z(self.Inflate));const i={highWaterMark:1},o=e.readable||new y({async pull(e){const t=new u((e=>De.set(Be,e)));Ke({type:"pull",messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER;const{value:r,done:s}=await t;e.enqueue(r),s&&e.close()}},i),c=e.writable||new m({async write(e){let t;const r=new u((e=>t=e));Ve.set(Be,t),Ke({type:Ae,value:e,messageId:Be}),Be=(Be+1)%n.MAX_SAFE_INTEGER,await r}},i),f=new Ie(t,s);Re=new AbortController;const{signal:a}=Re;await o.pipeThrough(f).pipeThrough(new Pe(s.chunkSize)).pipeTo(c,{signal:a,preventClose:!0,preventAbort:!0}),await c.getWriter().close();const{signature:l,inputSize:w,outputSize:h}=f;Ke({type:_e,result:{signature:l,inputSize:w,outputSize:h}})}catch(e){Ne(e)}}async function Ue(e){for(const t of e)await import(t)}function Ke(e){let{value:t}=e;if(t)if(t.length)try{t=new i(t),e.value=t.buffer,d(e,[e.value])}catch(t){d(e)}else d(e);else d(e)}function Ne(e=new s("Unknown error")){const{message:t,stack:n,code:r,name:i}=e;d({error:{message:t,stack:n,code:r,name:i}})}addEventListener("message",(({data:e})=>{const{type:t,messageId:n,value:r,done:s}=e;try{if("start"==t&&Me(e),t==Ae){const e=De.get(n);De.delete(n),e({value:new i(r),done:s})}if("ack"==t){const e=Ve.get(n);Ve.delete(n),e()}t==_e&&Re.abort()}catch(e){Ne(e)}}));const Oe=-2;function Te(t){return We(t.map((([t,n])=>new e(t).fill(n,0,t))))}function We(t){return t.reduce(((t,n)=>t.concat(e.isArray(n)?We(n):n)),[])}const je=[0,1,2,3].concat(...Te([[2,4],[2,5],[4,6],[4,7],[8,8],[8,9],[16,10],[16,11],[32,12],[32,13],[64,14],[64,15],[2,0],[1,16],[1,17],[2,18],[2,19],[4,20],[4,21],[8,22],[8,23],[16,24],[16,25],[32,26],[32,27],[64,28],[64,29]]));function He(){const e=this;function t(e,t){let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}e.ne=n=>{const s=e.re,i=e.ie.se,o=e.ie.oe;let c,f,a,l=-1;for(n.ce=0,n.fe=573,c=0;o>c;c++)0!==s[2*c]?(n.ae[++n.ce]=l=c,n.le[c]=0):s[2*c+1]=0;for(;2>n.ce;)a=n.ae[++n.ce]=2>l?++l:0,s[2*a]=1,n.le[a]=0,n.ue--,i&&(n.we-=i[2*a+1]);for(e.he=l,c=r.floor(n.ce/2);c>=1;c--)n.de(s,c);a=o;do{c=n.ae[1],n.ae[1]=n.ae[n.ce--],n.de(s,1),f=n.ae[1],n.ae[--n.fe]=c,n.ae[--n.fe]=f,s[2*a]=s[2*c]+s[2*f],n.le[a]=r.max(n.le[c],n.le[f])+1,s[2*c+1]=s[2*f+1]=a,n.ae[1]=a++,n.de(s,1)}while(n.ce>=2);n.ae[--n.fe]=n.ae[1],(t=>{const n=e.re,r=e.ie.se,s=e.ie.pe,i=e.ie.ye,o=e.ie.me;let c,f,a,l,u,w,h=0;for(l=0;15>=l;l++)t.be[l]=0;for(n[2*t.ae[t.fe]+1]=0,c=t.fe+1;573>c;c++)f=t.ae[c],l=n[2*n[2*f+1]+1]+1,l>o&&(l=o,h++),n[2*f+1]=l,f>e.he||(t.be[l]++,u=0,i>f||(u=s[f-i]),w=n[2*f],t.ue+=w*(l+u),r&&(t.we+=w*(r[2*f+1]+u)));if(0!==h){do{for(l=o-1;0===t.be[l];)l--;t.be[l]--,t.be[l+1]+=2,t.be[o]--,h-=2}while(h>0);for(l=o;0!==l;l--)for(f=t.be[l];0!==f;)a=t.ae[--c],a>e.he||(n[2*a+1]!=l&&(t.ue+=(l-n[2*a+1])*n[2*a],n[2*a+1]=l),f--)}})(n),((e,n,r)=>{const s=[];let i,o,c,f=0;for(i=1;15>=i;i++)s[i]=f=f+r[i-1]<<1;for(o=0;n>=o;o++)c=e[2*o+1],0!==c&&(e[2*o]=t(s[c]++,c))})(s,e.he,n.be)}}function Le(e,t,n,r,s){const i=this;i.se=e,i.pe=t,i.ye=n,i.oe=r,i.me=s}He.ge=[0,1,2,3,4,5,6,7].concat(...Te([[2,8],[2,9],[2,10],[2,11],[4,12],[4,13],[4,14],[4,15],[8,16],[8,17],[8,18],[8,19],[16,20],[16,21],[16,22],[16,23],[32,24],[32,25],[32,26],[31,27],[1,28]])),He.ke=[0,1,2,3,4,5,6,7,8,10,12,14,16,20,24,28,32,40,48,56,64,80,96,112,128,160,192,224,0],He.ve=[0,1,2,3,4,6,8,12,16,24,32,48,64,96,128,192,256,384,512,768,1024,1536,2048,3072,4096,6144,8192,12288,16384,24576],He.Se=e=>256>e?je[e]:je[256+(e>>>7)],He.ze=[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],He.Ce=[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],He.xe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],He.Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];const Fe=Te([[144,8],[112,9],[24,7],[8,8]]);Le._e=We([12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,19,275,147,403,83,339,211,467,51,307,179,435,115,371,243,499,11,267,139,395,75,331,203,459,43,299,171,427,107,363,235,491,27,283,155,411,91,347,219,475,59,315,187,443,123,379,251,507,7,263,135,391,71,327,199,455,39,295,167,423,103,359,231,487,23,279,151,407,87,343,215,471,55,311,183,439,119,375,247,503,15,271,143,399,79,335,207,463,47,303,175,431,111,367,239,495,31,287,159,415,95,351,223,479,63,319,191,447,127,383,255,511,0,64,32,96,16,80,48,112,8,72,40,104,24,88,56,120,4,68,36,100,20,84,52,116,3,131,67,195,35,163,99,227].map(((e,t)=>[e,Fe[t]])));const qe=Te([[30,5]]);function Ge(e,t,n,r,s){const i=this;i.Ie=e,i.Pe=t,i.De=n,i.Ve=r,i.Re=s}Le.Be=We([0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23].map(((e,t)=>[e,qe[t]]))),Le.Ee=new Le(Le._e,He.ze,257,286,15),Le.Me=new Le(Le.Be,He.Ce,0,30,15),Le.Ue=new Le(null,He.xe,0,19,7);const Je=[new Ge(0,0,0,0,0),new Ge(4,4,8,4,1),new Ge(4,5,16,8,1),new Ge(4,6,32,32,1),new Ge(4,4,16,16,2),new Ge(8,16,32,32,2),new Ge(8,16,128,128,2),new Ge(8,32,128,256,2),new Ge(32,128,258,1024,2),new Ge(32,258,258,4096,2)],Qe=["need dictionary","stream end","","","stream error","data error","","buffer error","",""],Xe=113,Ye=666,Ze=262;function $e(e,t,n,r){const s=e[2*t],i=e[2*n];return i>s||s==i&&r[t]<=r[n]}function et(){const e=this;let t,n,s,c,f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z,C,x,A,_,I,P,D,V,R,B,E,M,U;const K=new He,N=new He,O=new He;let T,W,j,H,L,F;function q(){let t;for(t=0;286>t;t++)E[2*t]=0;for(t=0;30>t;t++)M[2*t]=0;for(t=0;19>t;t++)U[2*t]=0;E[512]=1,e.ue=e.we=0,W=j=0}function G(e,t){let n,r=-1,s=e[1],i=0,o=7,c=4;0===s&&(o=138,c=3),e[2*(t+1)+1]=65535;for(let f=0;t>=f;f++)n=s,s=e[2*(f+1)+1],++i<o&&n==s||(c>i?U[2*n]+=i:0!==n?(n!=r&&U[2*n]++,U[32]++):i>10?U[36]++:U[34]++,i=0,r=n,0===s?(o=138,c=3):n==s?(o=6,c=3):(o=7,c=4))}function J(t){e.Ke[e.pending++]=t}function Q(e){J(255&e),J(e>>>8&255)}function X(e,t){let n;const r=t;F>16-r?(n=e,L|=n<<F&65535,Q(L),L=n>>>16-F,F+=r-16):(L|=e<<F&65535,F+=r)}function Y(e,t){const n=2*e;X(65535&t[n],65535&t[n+1])}function Z(e,t){let n,r,s=-1,i=e[1],o=0,c=7,f=4;for(0===i&&(c=138,f=3),n=0;t>=n;n++)if(r=i,i=e[2*(n+1)+1],++o>=c||r!=i){if(f>o)do{Y(r,U)}while(0!==--o);else 0!==r?(r!=s&&(Y(r,U),o--),Y(16,U),X(o-3,2)):o>10?(Y(18,U),X(o-11,7)):(Y(17,U),X(o-3,3));o=0,s=r,0===i?(c=138,f=3):r==i?(c=6,f=3):(c=7,f=4)}}function $(){16==F?(Q(L),L=0,F=0):8>F||(J(255&L),L>>>=8,F-=8)}function ee(t,n){let s,i,o;if(e.Ne[W]=t,e.Oe[W]=255&n,W++,0===t?E[2*n]++:(j++,t--,E[2*(He.ge[n]+256+1)]++,M[2*He.Se(t)]++),!(8191&W)&&D>2){for(s=8*W,i=C-k,o=0;30>o;o++)s+=M[2*o]*(5+He.Ce[o]);if(s>>>=3,j<r.floor(W/2)&&s<r.floor(i/2))return!0}return W==T-1}function te(t,n){let r,s,i,o,c=0;if(0!==W)do{r=e.Ne[c],s=e.Oe[c],c++,0===r?Y(s,t):(i=He.ge[s],Y(i+256+1,t),o=He.ze[i],0!==o&&(s-=He.ke[i],X(s,o)),r--,i=He.Se(r),Y(i,n),o=He.Ce[i],0!==o&&(r-=He.ve[i],X(r,o)))}while(W>c);Y(256,t),H=t[513]}function ne(){F>8?Q(L):F>0&&J(255&L),L=0,F=0}function re(t,n,r){X(0+(r?1:0),3),((t,n)=>{ne(),H=8,Q(n),Q(~n),e.Ke.set(u.subarray(t,t+n),e.pending),e.pending+=n})(t,n)}function se(n){((t,n,r)=>{let s,i,o=0;D>0?(K.ne(e),N.ne(e),o=(()=>{let t;for(G(E,K.he),G(M,N.he),O.ne(e),t=18;t>=3&&0===U[2*He.Ae[t]+1];t--);return e.ue+=14+3*(t+1),t})(),s=e.ue+3+7>>>3,i=e.we+3+7>>>3,i>s||(s=i)):s=i=n+5,n+4>s||-1==t?i==s?(X(2+(r?1:0),3),te(Le._e,Le.Be)):(X(4+(r?1:0),3),((e,t,n)=>{let r;for(X(e-257,5),X(t-1,5),X(n-4,4),r=0;n>r;r++)X(U[2*He.Ae[r]+1],3);Z(E,e-1),Z(M,t-1)})(K.he+1,N.he+1,o+1),te(E,M)):re(t,n,r),q(),r&&ne()})(0>k?-1:k,C-k,n),k=C,t.Te()}function ie(){let e,n,r,s;do{if(s=w-A-C,0===s&&0===C&&0===A)s=f;else if(-1==s)s--;else if(C>=f+f-Ze){u.set(u.subarray(f,f+f),0),x-=f,C-=f,k-=f,e=y,r=e;do{n=65535&d[--r],d[r]=f>n?0:n-f}while(0!==--e);e=f,r=e;do{n=65535&h[--r],h[r]=f>n?0:n-f}while(0!==--e);s+=f}if(0===t.We)return;e=t.je(u,C+A,s),A+=e,3>A||(p=255&u[C],p=(p<<g^255&u[C+1])&b)}while(Ze>A&&0!==t.We)}function oe(e){let t,n,r=I,s=C,i=_;const o=C>f-Ze?C-(f-Ze):0;let c=B;const a=l,w=C+258;let d=u[s+i-1],p=u[s+i];R>_||(r>>=2),c>A&&(c=A);do{if(t=e,u[t+i]==p&&u[t+i-1]==d&&u[t]==u[s]&&u[++t]==u[s+1]){s+=2,t++;do{}while(u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&u[++s]==u[++t]&&w>s);if(n=258-(w-s),s=w-258,n>i){if(x=e,i=n,n>=c)break;d=u[s+i-1],p=u[s+i]}}}while((e=65535&h[e&a])>o&&0!==--r);return i>A?A:i}e.le=[],e.be=[],e.ae=[],E=[],M=[],U=[],e.de=(t,n)=>{const r=e.ae,s=r[n];let i=n<<1;for(;i<=e.ce&&(i<e.ce&&$e(t,r[i+1],r[i],e.le)&&i++,!$e(t,s,r[i],e.le));)r[n]=r[i],n=i,i<<=1;r[n]=s},e.He=(t,S,x,W,j,G)=>(W||(W=8),j||(j=8),G||(G=0),t.Le=null,-1==S&&(S=6),1>j||j>9||8!=W||9>x||x>15||0>S||S>9||0>G||G>2?Oe:(t.Fe=e,a=x,f=1<<a,l=f-1,m=j+7,y=1<<m,b=y-1,g=r.floor((m+3-1)/3),u=new i(2*f),h=[],d=[],T=1<<j+6,e.Ke=new i(4*T),s=4*T,e.Ne=new o(T),e.Oe=new i(T),D=S,V=G,(t=>(t.qe=t.Ge=0,t.Le=null,e.pending=0,e.Je=0,n=Xe,c=0,K.re=E,K.ie=Le.Ee,N.re=M,N.ie=Le.Me,O.re=U,O.ie=Le.Ue,L=0,F=0,H=8,q(),(()=>{w=2*f,d[y-1]=0;for(let e=0;y-1>e;e++)d[e]=0;P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve,C=0,k=0,A=0,v=_=2,z=0,p=0})(),0))(t))),e.Qe=()=>42!=n&&n!=Xe&&n!=Ye?Oe:(e.Oe=null,e.Ne=null,e.Ke=null,d=null,h=null,u=null,e.Fe=null,n==Xe?-3:0),e.Xe=(e,t,n)=>{let r=0;return-1==t&&(t=6),0>t||t>9||0>n||n>2?Oe:(Je[D].Re!=Je[t].Re&&0!==e.qe&&(r=e.Ye(1)),D!=t&&(D=t,P=Je[D].Pe,R=Je[D].Ie,B=Je[D].De,I=Je[D].Ve),V=n,r)},e.Ze=(e,t,r)=>{let s,i=r,o=0;if(!t||42!=n)return Oe;if(3>i)return 0;for(i>f-Ze&&(i=f-Ze,o=r-i),u.set(t.subarray(o,o+i),0),C=i,k=i,p=255&u[0],p=(p<<g^255&u[1])&b,s=0;i-3>=s;s++)p=(p<<g^255&u[s+2])&b,h[s&l]=d[p],d[p]=s;return 0},e.Ye=(r,i)=>{let o,w,m,I,R;if(i>4||0>i)return Oe;if(!r.$e||!r.et&&0!==r.We||n==Ye&&4!=i)return r.Le=Qe[4],Oe;if(0===r.tt)return r.Le=Qe[7],-5;var B;if(t=r,I=c,c=i,42==n&&(w=8+(a-8<<4)<<8,m=(D-1&255)>>1,m>3&&(m=3),w|=m<<6,0!==C&&(w|=32),w+=31-w%31,n=Xe,J((B=w)>>8&255),J(255&B)),0!==e.pending){if(t.Te(),0===t.tt)return c=-1,0}else if(0===t.We&&I>=i&&4!=i)return t.Le=Qe[7],-5;if(n==Ye&&0!==t.We)return r.Le=Qe[7],-5;if(0!==t.We||0!==A||0!=i&&n!=Ye){switch(R=-1,Je[D].Re){case 0:R=(e=>{let n,r=65535;for(r>s-5&&(r=s-5);;){if(1>=A){if(ie(),0===A&&0==e)return 0;if(0===A)break}if(C+=A,A=0,n=k+r,(0===C||C>=n)&&(A=C-n,C=n,se(!1),0===t.tt))return 0;if(C-k>=f-Ze&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 1:R=(e=>{let n,r=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C),0===r||(C-r&65535)>f-Ze||2!=V&&(v=oe(r)),3>v)n=ee(0,255&u[C]),A--,C++;else if(n=ee(C-x,v-3),A-=v,v>P||3>A)C+=v,v=0,p=255&u[C],p=(p<<g^255&u[C+1])&b;else{v--;do{C++,p=(p<<g^255&u[C+2])&b,r=65535&d[p],h[C&l]=d[p],d[p]=C}while(0!==--v);C++}if(n&&(se(!1),0===t.tt))return 0}return se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i);break;case 2:R=(e=>{let n,r,s=0;for(;;){if(Ze>A){if(ie(),Ze>A&&0==e)return 0;if(0===A)break}if(3>A||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C),_=v,S=x,v=2,0!==s&&P>_&&f-Ze>=(C-s&65535)&&(2!=V&&(v=oe(s)),5>=v&&(1==V||3==v&&C-x>4096)&&(v=2)),3>_||v>_)if(0!==z){if(n=ee(0,255&u[C-1]),n&&se(!1),C++,A--,0===t.tt)return 0}else z=1,C++,A--;else{r=C+A-3,n=ee(C-1-S,_-3),A-=_-1,_-=2;do{++C>r||(p=(p<<g^255&u[C+2])&b,s=65535&d[p],h[C&l]=d[p],d[p]=C)}while(0!==--_);if(z=0,v=2,C++,n&&(se(!1),0===t.tt))return 0}}return 0!==z&&(n=ee(0,255&u[C-1]),z=0),se(4==e),0===t.tt?4==e?2:0:4==e?3:1})(i)}if(2!=R&&3!=R||(n=Ye),0==R||2==R)return 0===t.tt&&(c=-1),0;if(1==R){if(1==i)X(2,3),Y(256,Le._e),$(),9>1+H+10-F&&(X(2,3),Y(256,Le._e),$()),H=7;else if(re(0,0,!1),3==i)for(o=0;y>o;o++)d[o]=0;if(t.Te(),0===t.tt)return c=-1,0}}return 4!=i?0:1}}function tt(){const e=this;e.nt=0,e.rt=0,e.We=0,e.qe=0,e.tt=0,e.Ge=0}function nt(e){const t=new tt,n=(o=e&&e.chunkSize?e.chunkSize:65536)+5*(r.floor(o/16383)+1);var o;const c=new i(n);let f=e?e.level:-1;void 0===f&&(f=-1),t.He(f),t.$e=c,this.append=(e,r)=>{let o,f,a=0,l=0,u=0;const w=[];if(e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,o=t.Ye(0),0!=o)throw new s("deflating: "+t.Le);t.rt&&(t.rt==n?w.push(new i(c)):w.push(c.subarray(0,t.rt))),u+=t.rt,r&&t.nt>0&&t.nt!=a&&(r(t.nt),a=t.nt)}while(t.We>0||0===t.tt);return w.length>1?(f=new i(u),w.forEach((e=>{f.set(e,l),l+=e.length}))):f=w[0]?new i(w[0]):new i,f}},this.flush=()=>{let e,r,o=0,f=0;const a=[];do{if(t.rt=0,t.tt=n,e=t.Ye(4),1!=e&&0!=e)throw new s("deflating: "+t.Le);n-t.tt>0&&a.push(c.slice(0,t.rt)),f+=t.rt}while(t.We>0||0===t.tt);return t.Qe(),r=new i(f),a.forEach((e=>{r.set(e,o),o+=e.length})),r}}tt.prototype={He(e,t){const n=this;return n.Fe=new et,t||(t=15),n.Fe.He(n,e,t)},Ye(e){const t=this;return t.Fe?t.Fe.Ye(t,e):Oe},Qe(){const e=this;if(!e.Fe)return Oe;const t=e.Fe.Qe();return e.Fe=null,t},Xe(e,t){const n=this;return n.Fe?n.Fe.Xe(n,e,t):Oe},Ze(e,t){const n=this;return n.Fe?n.Fe.Ze(n,e,t):Oe},je(e,t,n){const r=this;let s=r.We;return s>n&&(s=n),0===s?0:(r.We-=s,e.set(r.et.subarray(r.nt,r.nt+s),t),r.nt+=s,r.qe+=s,s)},Te(){const e=this;let t=e.Fe.pending;t>e.tt&&(t=e.tt),0!==t&&(e.$e.set(e.Fe.Ke.subarray(e.Fe.Je,e.Fe.Je+t),e.rt),e.rt+=t,e.Fe.Je+=t,e.Ge+=t,e.tt-=t,e.Fe.pending-=t,0===e.Fe.pending&&(e.Fe.Je=0))}};const rt=-2,st=-3,it=-5,ot=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],ct=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],ft=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,192,5,24577],at=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],lt=[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,112,112],ut=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],wt=[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];function ht(){let e,t,n,r,s,i;function o(e,t,o,c,f,a,l,u,w,h,d){let p,y,m,b,g,k,v,S,z,C,x,A,_,I,P;C=0,g=o;do{n[e[t+C]]++,C++,g--}while(0!==g);if(n[0]==o)return l[0]=-1,u[0]=0,0;for(S=u[0],k=1;15>=k&&0===n[k];k++);for(v=k,k>S&&(S=k),g=15;0!==g&&0===n[g];g--);for(m=g,S>g&&(S=g),u[0]=S,I=1<<k;g>k;k++,I<<=1)if(0>(I-=n[k]))return st;if(0>(I-=n[g]))return st;for(n[g]+=I,i[1]=k=0,C=1,_=2;0!==--g;)i[_]=k+=n[C],_++,C++;g=0,C=0;do{0!==(k=e[t+C])&&(d[i[k]++]=g),C++}while(++g<o);for(o=i[m],i[0]=g=0,C=0,b=-1,A=-S,s[0]=0,x=0,P=0;m>=v;v++)for(p=n[v];0!==p--;){for(;v>A+S;){if(b++,A+=S,P=m-A,P=P>S?S:P,(y=1<<(k=v-A))>p+1&&(y-=p+1,_=v,P>k))for(;++k<P&&(y<<=1)>n[++_];)y-=n[_];if(P=1<<k,h[0]+P>1440)return st;s[b]=x=h[0],h[0]+=P,0!==b?(i[b]=g,r[0]=k,r[1]=S,k=g>>>A-S,r[2]=x-s[b-1]-k,w.set(r,3*(s[b-1]+k))):l[0]=x}for(r[1]=v-A,o>C?d[C]<c?(r[0]=256>d[C]?0:96,r[2]=d[C++]):(r[0]=a[d[C]-c]+16+64,r[2]=f[d[C++]-c]):r[0]=192,y=1<<v-A,k=g>>>A;P>k;k+=y)w.set(r,3*(x+k));for(k=1<<v-1;0!==(g&k);k>>>=1)g^=k;for(g^=k,z=(1<<A)-1;(g&z)!=i[b];)b--,A-=S,z=(1<<A)-1}return 0!==I&&1!=m?it:0}function c(o){let c;for(e||(e=[],t=[],n=new f(16),r=[],s=new f(15),i=new f(16)),t.length<o&&(t=[]),c=0;o>c;c++)t[c]=0;for(c=0;16>c;c++)n[c]=0;for(c=0;3>c;c++)r[c]=0;s.set(n.subarray(0,15),0),i.set(n.subarray(0,16),0)}this.st=(n,r,s,i,f)=>{let a;return c(19),e[0]=0,a=o(n,0,19,19,null,null,s,r,i,e,t),a==st?f.Le="oversubscribed dynamic bit lengths tree":a!=it&&0!==r[0]||(f.Le="incomplete dynamic bit lengths tree",a=st),a},this.it=(n,r,s,i,f,a,l,u,w)=>{let h;return c(288),e[0]=0,h=o(s,0,n,257,at,lt,a,i,u,e,t),0!=h||0===i[0]?(h==st?w.Le="oversubscribed literal/length tree":-4!=h&&(w.Le="incomplete literal/length tree",h=st),h):(c(288),h=o(s,n,r,0,ut,wt,l,f,u,e,t),0!=h||0===f[0]&&n>257?(h==st?w.Le="oversubscribed distance tree":h==it?(w.Le="incomplete distance tree",h=st):-4!=h&&(w.Le="empty distance tree with lengths",h=st),h):0)}}function dt(){const e=this;let t,n,r,s,i=0,o=0,c=0,f=0,a=0,l=0,u=0,w=0,h=0,d=0;function p(e,t,n,r,s,i,o,c){let f,a,l,u,w,h,d,p,y,m,b,g,k,v,S,z;d=c.nt,p=c.We,w=o.ot,h=o.ct,y=o.write,m=y<o.read?o.read-y-1:o.end-y,b=ot[e],g=ot[t];do{for(;20>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(f=w&b,a=n,l=r,z=3*(l+f),0!==(u=a[z]))for(;;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15,k=a[z+2]+(w&ot[u]),w>>=u,h-=u;15>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;for(f=w&g,a=s,l=i,z=3*(l+f),u=a[z];;){if(w>>=a[z+1],h-=a[z+1],16&u){for(u&=15;u>h;)p--,w|=(255&c.ft(d++))<<h,h+=8;if(v=a[z+2]+(w&ot[u]),w>>=u,h-=u,m-=k,v>y){S=y-v;do{S+=o.end}while(0>S);if(u=o.end-S,k>u){if(k-=u,y-S>0&&u>y-S)do{o.lt[y++]=o.lt[S++]}while(0!==--u);else o.lt.set(o.lt.subarray(S,S+u),y),y+=u,S+=u,u=0;S=0}}else S=y-v,y-S>0&&2>y-S?(o.lt[y++]=o.lt[S++],o.lt[y++]=o.lt[S++],k-=2):(o.lt.set(o.lt.subarray(S,S+2),y),y+=2,S+=2,k-=2);if(y-S>0&&k>y-S)do{o.lt[y++]=o.lt[S++]}while(0!==--k);else o.lt.set(o.lt.subarray(S,S+k),y),y+=k,S+=k,k=0;break}if(64&u)return c.Le="invalid distance code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st;f+=a[z+2],f+=w&ot[u],z=3*(l+f),u=a[z]}break}if(64&u)return 32&u?(k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,1):(c.Le="invalid literal/length code",k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,st);if(f+=a[z+2],f+=w&ot[u],z=3*(l+f),0===(u=a[z])){w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--;break}}else w>>=a[z+1],h-=a[z+1],o.lt[y++]=a[z+2],m--}while(m>=258&&p>=10);return k=c.We-p,k=k>h>>3?h>>3:k,p+=k,d-=k,h-=k<<3,o.ot=w,o.ct=h,c.We=p,c.qe+=d-c.nt,c.nt=d,o.write=y,0}e.init=(e,i,o,c,f,a)=>{t=0,u=e,w=i,r=o,h=c,s=f,d=a,n=null},e.ut=(e,y,m)=>{let b,g,k,v,S,z,C,x=0,A=0,_=0;for(_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S;;)switch(t){case 0:if(z>=258&&v>=10&&(e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,m=p(u,w,r,h,s,d,e,y),_=y.nt,v=y.We,x=e.ot,A=e.ct,S=e.write,z=S<e.read?e.read-S-1:e.end-S,0!=m)){t=1==m?7:9;break}c=u,n=r,o=h,t=1;case 1:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>>=n[g+1],A-=n[g+1],k=n[g],0===k){f=n[g+2],t=6;break}if(16&k){a=15&k,i=n[g+2],t=2;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}if(32&k){t=7;break}return t=9,y.Le="invalid literal/length code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 2:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}i+=x&ot[b],x>>=b,A-=b,c=w,n=s,o=d,t=3;case 3:for(b=c;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}if(g=3*(o+(x&ot[b])),x>>=n[g+1],A-=n[g+1],k=n[g],16&k){a=15&k,l=n[g+2],t=4;break}if(!(64&k)){c=k,o=g/3+n[g+2];break}return t=9,y.Le="invalid distance code",m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 4:for(b=a;b>A;){if(0===v)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,v--,x|=(255&y.ft(_++))<<A,A+=8}l+=x&ot[b],x>>=b,A-=b,t=5;case 5:for(C=S-l;0>C;)C+=e.end;for(;0!==i;){if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);e.lt[S++]=e.lt[C++],z--,C==e.end&&(C=0),i--}t=0;break;case 6:if(0===z&&(S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z&&(e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,S==e.end&&0!==e.read&&(S=0,z=S<e.read?e.read-S-1:e.end-S),0===z)))return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);m=0,e.lt[S++]=f,z--,t=0;break;case 7:if(A>7&&(A-=8,v++,_--),e.write=S,m=e.wt(y,m),S=e.write,z=S<e.read?e.read-S-1:e.end-S,e.read!=e.write)return e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);t=8;case 8:return m=1,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);case 9:return m=st,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m);default:return m=rt,e.ot=x,e.ct=A,y.We=v,y.qe+=_-y.nt,y.nt=_,e.write=S,e.wt(y,m)}},e.ht=()=>{}}ht.dt=(e,t,n,r)=>(e[0]=9,t[0]=5,n[0]=ct,r[0]=ft,0);const pt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function yt(e,t){const n=this;let r,s=0,o=0,c=0,a=0;const l=[0],u=[0],w=new dt;let h=0,d=new f(4320);const p=new ht;n.ct=0,n.ot=0,n.lt=new i(t),n.end=t,n.read=0,n.write=0,n.reset=(e,t)=>{t&&(t[0]=0),6==s&&w.ht(e),s=0,n.ct=0,n.ot=0,n.read=n.write=0},n.reset(e,null),n.wt=(e,t)=>{let r,s,i;return s=e.rt,i=n.read,r=(i>n.write?n.end:n.write)-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r,i==n.end&&(i=0,n.write==n.end&&(n.write=0),r=n.write-i,r>e.tt&&(r=e.tt),0!==r&&t==it&&(t=0),e.tt-=r,e.Ge+=r,e.$e.set(n.lt.subarray(i,i+r),s),s+=r,i+=r),e.rt=s,n.read=i,t},n.ut=(e,t)=>{let i,f,y,m,b,g,k,v;for(m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g;;){let S,z,C,x,A,_,I,P;switch(s){case 0:for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}switch(i=7&f,h=1&i,i>>>1){case 0:f>>>=3,y-=3,i=7&y,f>>>=i,y-=i,s=1;break;case 1:S=[],z=[],C=[[]],x=[[]],ht.dt(S,z,C,x),w.init(S[0],z[0],C[0],0,x[0],0),f>>>=3,y-=3,s=6;break;case 2:f>>>=3,y-=3,s=3;break;case 3:return f>>>=3,y-=3,s=9,e.Le="invalid block type",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}break;case 1:for(;32>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if((~f>>>16&65535)!=(65535&f))return s=9,e.Le="invalid stored block lengths",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);o=65535&f,f=y=0,s=0!==o?2:0!==h?7:0;break;case 2:if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(0===k&&(g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k&&(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,g==n.end&&0!==n.read&&(g=0,k=g<n.read?n.read-g-1:n.end-g),0===k)))return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(t=0,i=o,i>b&&(i=b),i>k&&(i=k),n.lt.set(e.je(m,i),g),m+=i,b-=i,g+=i,k-=i,0!==(o-=i))break;s=0!==h?7:0;break;case 3:for(;14>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(c=i=16383&f,(31&i)>29||(i>>5&31)>29)return s=9,e.Le="too many length or distance symbols",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);if(i=258+(31&i)+(i>>5&31),!r||r.length<i)r=[];else for(v=0;i>v;v++)r[v]=0;f>>>=14,y-=14,a=0,s=4;case 4:for(;4+(c>>>10)>a;){for(;3>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}r[pt[a++]]=7&f,f>>>=3,y-=3}for(;19>a;)r[pt[a++]]=0;if(l[0]=7,i=p.st(r,l,u,d,e),0!=i)return(t=i)==st&&(r=null,s=9),n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);a=0,s=5;case 5:for(;i=c,258+(31&i)+(i>>5&31)>a;){let o,w;for(i=l[0];i>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(i=d[3*(u[0]+(f&ot[i]))+1],w=d[3*(u[0]+(f&ot[i]))+2],16>w)f>>>=i,y-=i,r[a++]=w;else{for(v=18==w?7:w-14,o=18==w?11:3;i+v>y;){if(0===b)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);t=0,b--,f|=(255&e.ft(m++))<<y,y+=8}if(f>>>=i,y-=i,o+=f&ot[v],f>>>=v,y-=v,v=a,i=c,v+o>258+(31&i)+(i>>5&31)||16==w&&1>v)return r=null,s=9,e.Le="invalid bit length repeat",t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w=16==w?r[v-1]:0;do{r[v++]=w}while(0!==--o);a=v}}if(u[0]=-1,A=[],_=[],I=[],P=[],A[0]=9,_[0]=6,i=c,i=p.it(257+(31&i),1+(i>>5&31),r,A,_,I,P,d,e),0!=i)return i==st&&(r=null,s=9),t=i,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);w.init(A[0],_[0],d,I[0],d,P[0]),s=6;case 6:if(n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,1!=(t=w.ut(n,e,t)))return n.wt(e,t);if(t=0,w.ht(e),m=e.nt,b=e.We,f=n.ot,y=n.ct,g=n.write,k=g<n.read?n.read-g-1:n.end-g,0===h){s=0;break}s=7;case 7:if(n.write=g,t=n.wt(e,t),g=n.write,k=g<n.read?n.read-g-1:n.end-g,n.read!=n.write)return n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);s=8;case 8:return t=1,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);case 9:return t=st,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t);default:return t=rt,n.ot=f,n.ct=y,e.We=b,e.qe+=m-e.nt,e.nt=m,n.write=g,n.wt(e,t)}}},n.ht=e=>{n.reset(e,null),n.lt=null,d=null},n.yt=(e,t,r)=>{n.lt.set(e.subarray(t,t+r),0),n.read=n.write=r},n.bt=()=>1==s?1:0}const mt=13,bt=[0,0,255,255];function gt(){const e=this;function t(e){return e&&e.gt?(e.qe=e.Ge=0,e.Le=null,e.gt.mode=7,e.gt.kt.reset(e,null),0):rt}e.mode=0,e.method=0,e.vt=[0],e.St=0,e.marker=0,e.zt=0,e.Ct=t=>(e.kt&&e.kt.ht(t),e.kt=null,0),e.xt=(n,r)=>(n.Le=null,e.kt=null,8>r||r>15?(e.Ct(n),rt):(e.zt=r,n.gt.kt=new yt(n,1<<r),t(n),0)),e.At=(e,t)=>{let n,r;if(!e||!e.gt||!e.et)return rt;const s=e.gt;for(t=4==t?it:0,n=it;;)switch(s.mode){case 0:if(0===e.We)return n;if(n=t,e.We--,e.qe++,8!=(15&(s.method=e.ft(e.nt++)))){s.mode=mt,e.Le="unknown compression method",s.marker=5;break}if(8+(s.method>>4)>s.zt){s.mode=mt,e.Le="invalid win size",s.marker=5;break}s.mode=1;case 1:if(0===e.We)return n;if(n=t,e.We--,e.qe++,r=255&e.ft(e.nt++),((s.method<<8)+r)%31!=0){s.mode=mt,e.Le="incorrect header check",s.marker=5;break}if(!(32&r)){s.mode=7;break}s.mode=2;case 2:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St=(255&e.ft(e.nt++))<<24&4278190080,s.mode=3;case 3:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<16&16711680,s.mode=4;case 4:if(0===e.We)return n;n=t,e.We--,e.qe++,s.St+=(255&e.ft(e.nt++))<<8&65280,s.mode=5;case 5:return 0===e.We?n:(n=t,e.We--,e.qe++,s.St+=255&e.ft(e.nt++),s.mode=6,2);case 6:return s.mode=mt,e.Le="need dictionary",s.marker=0,rt;case 7:if(n=s.kt.ut(e,n),n==st){s.mode=mt,s.marker=0;break}if(0==n&&(n=t),1!=n)return n;n=t,s.kt.reset(e,s.vt),s.mode=12;case 12:return e.We=0,1;case mt:return st;default:return rt}},e._t=(e,t,n)=>{let r=0,s=n;if(!e||!e.gt||6!=e.gt.mode)return rt;const i=e.gt;return s<1<<i.zt||(s=(1<<i.zt)-1,r=n-s),i.kt.yt(t,r,s),i.mode=7,0},e.It=e=>{let n,r,s,i,o;if(!e||!e.gt)return rt;const c=e.gt;if(c.mode!=mt&&(c.mode=mt,c.marker=0),0===(n=e.We))return it;for(r=e.nt,s=c.marker;0!==n&&4>s;)e.ft(r)==bt[s]?s++:s=0!==e.ft(r)?0:4-s,r++,n--;return e.qe+=r-e.nt,e.nt=r,e.We=n,c.marker=s,4!=s?st:(i=e.qe,o=e.Ge,t(e),e.qe=i,e.Ge=o,c.mode=7,0)},e.Pt=e=>e&&e.gt&&e.gt.kt?e.gt.kt.bt():rt}function kt(){}function vt(e){const t=new kt,n=e&&e.chunkSize?r.floor(2*e.chunkSize):131072,o=new i(n);let c=!1;t.xt(),t.$e=o,this.append=(e,r)=>{const f=[];let a,l,u=0,w=0,h=0;if(0!==e.length){t.nt=0,t.et=e,t.We=e.length;do{if(t.rt=0,t.tt=n,0!==t.We||c||(t.nt=0,c=!0),a=t.At(0),c&&a===it){if(0!==t.We)throw new s("inflating: bad input")}else if(0!==a&&1!==a)throw new s("inflating: "+t.Le);if((c||1===a)&&t.We===e.length)throw new s("inflating: bad input");t.rt&&(t.rt===n?f.push(new i(o)):f.push(o.subarray(0,t.rt))),h+=t.rt,r&&t.nt>0&&t.nt!=u&&(r(t.nt),u=t.nt)}while(t.We>0||0===t.tt);return f.length>1?(l=new i(h),f.forEach((e=>{l.set(e,w),w+=e.length}))):l=f[0]?new i(f[0]):new i,l}},this.flush=()=>{t.Ct()}}kt.prototype={xt(e){const t=this;return t.gt=new gt,e||(e=15),t.gt.xt(t,e)},At(e){const t=this;return t.gt?t.gt.At(t,e):rt},Ct(){const e=this;if(!e.gt)return rt;const t=e.gt.Ct(e);return e.gt=null,t},It(){const e=this;return e.gt?e.gt.It(e):rt},_t(e,t){const n=this;return n.gt?n.gt._t(n,e,t):rt},ft(e){return this.et[e]},je(e,t){return this.et.subarray(e,e+t)}},self.initCodec=()=>{self.Deflate=nt,self.Inflate=vt};
|
|
2
|
-
`,r=()=>n.useDataURI?"data:text/javascript,"+encodeURIComponent(t):URL.createObjectURL(new Blob([t],{type:"text/javascript"}));e({workerScripts:{inflate:[r],deflate:[r]}})}const Sc="Writer iterator completed too soon",kc="text/plain",Tc="Content-Type",Pc=64*1024,lo="writable";class Jr{constructor(){this.size=0}init(){this.initialized=!0}}class fo extends Jr{get readable(){const n=this,{chunkSize:t=Pc}=n,r=new ReadableStream({start(){this.chunkOffset=0},async pull(s){const{offset:i=0,size:o,diskNumberStart:a}=r,{chunkOffset:u}=this,l=o===re?t:Math.min(t,o-u),c=await Mr(n,i+u,l,a);s.enqueue(c),u+t>o||o===re&&!c.length&&l?s.close():this.chunkOffset+=t}});return r}}class Bc extends fo{constructor(n){super(),Object.assign(this,{blob:n,size:n.size})}async readUint8Array(n,t){const r=this,s=n+t;let o=await(n||s<r.size?r.blob.slice(n,s):r.blob).arrayBuffer();return o.byteLength>t&&(o=o.slice(n,s)),new Uint8Array(o)}}class Mc extends Jr{constructor(n){super();const t=this,r=new TransformStream,s=[];n&&s.push([Tc,n]),Object.defineProperty(t,lo,{get(){return r.writable}}),t.blob=new Response(r.readable,{headers:s}).blob()}getData(){return this.blob}}class Ee extends Bc{constructor(n){super(new Blob([n],{type:kc}))}}class Ic extends fo{constructor(n){super(),this.readers=n}async init(){const n=this,{readers:t}=n;n.lastDiskNumber=0,n.lastDiskOffset=0,await Promise.all(t.map(async(r,s)=>{await r.init(),s!=t.length-1&&(n.lastDiskOffset+=r.size),n.size+=r.size})),super.init()}async readUint8Array(n,t,r=0){const s=this,{readers:i}=this;let o,a=r;a==-1&&(a=i.length-1);let u=n;for(;u>=i[a].size;)u-=i[a].size,a++;const l=i[a],c=l.size;if(u+t<=c)o=await Mr(l,u,t);else{const h=c-u;o=new Uint8Array(t),o.set(await Mr(l,u,h)),o.set(await s.readUint8Array(n+h,t-h,r),h)}return s.lastDiskNumber=Math.max(a,s.lastDiskNumber),o}}class ui extends Jr{constructor(n,t=4294967295){super();const r=this;Object.assign(r,{diskNumber:0,diskOffset:0,size:0,maxSize:t,availableSize:t});let s,i,o;const a=new WritableStream({async write(c){const{availableSize:h}=r;if(o)c.length>=h?(await u(c.slice(0,h)),await l(),r.diskOffset+=s.size,r.diskNumber++,o=null,await this.write(c.slice(h))):await u(c);else{const{value:m,done:x}=await n.next();if(x&&!m)throw new Error(Sc);s=m,s.size=0,s.maxSize&&(r.maxSize=s.maxSize),r.availableSize=r.maxSize,await mn(s),i=m.writable,o=i.getWriter(),await this.write(c)}},async close(){await o.ready,await l()}});Object.defineProperty(r,lo,{get(){return a}});async function u(c){const h=c.length;h&&(await o.ready,await o.write(c),s.size+=h,r.size+=h,r.availableSize-=h)}async function l(){i.size=s.size,await o.close()}}}async function mn(e,n){if(e.init&&!e.initialized)await e.init(n);else return Promise.resolve()}function Lc(e){return Array.isArray(e)&&(e=new Ic(e)),e instanceof ReadableStream&&(e={readable:e}),e}function $c(e){e.writable===re&&typeof e.next==xn&&(e=new ui(e)),e instanceof WritableStream&&(e={writable:e});const{writable:n}=e;return n.size===re&&(n.size=0),e instanceof ui||Object.assign(e,{diskNumber:0,diskOffset:0,availableSize:1/0,maxSize:1/0}),e}function Mr(e,n,t,r){return e.readUint8Array(n,t,r)}const Oc="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ".split("");Oc.length==256;const Nc="filename",Rc="rawFilename",Uc="comment",Vc="rawComment",qc="uncompressedSize",jc="compressedSize",Wc="offset",ci="diskNumberStart",po="lastModDate",Hc="rawLastModDate",ho="lastAccessDate",mo="creationDate",xo="internalFileAttribute",Do="internalFileAttributes",go="externalFileAttribute",wo="externalFileAttributes",yo="msDosCompatible",zr="zip64",bo="encrypted",_o="version",Ao="versionMadeBy",vo="zipCrypto",Co="directory",Eo="executable",Yc=[Nc,Rc,jc,qc,po,Hc,Uc,Vc,ho,mo,Wc,ci,ci,xo,Do,go,wo,yo,zr,bo,_o,Ao,vo,Co,Eo,"bitFlag","signature","filenameUTF8","commentUTF8","compressionMethod","extraField","rawExtraField","extraFieldZip64","extraFieldUnicodePath","extraFieldUnicodeComment","extraFieldAES","extraFieldNTFS","extraFieldExtendedTimestamp"];class Fo{constructor(n){Yc.forEach(t=>this[t]=n[t])}}const Gc="File already exists",Zc="Zip file comment exceeds 64KB",Xc="File entry comment exceeds 64KB",Kc="File entry name exceeds 64KB",li="Version exceeds 65535",Jc="The strength must equal 1, 2, or 3",zc="Extra field type exceeds 65535",Qc="Extra field data exceeds 64KB",Qr="Zip64 is not supported (make sure 'keepOrder' is set to 'true')",e0="Undefined uncompressed size",fi=new Uint8Array([7,0,2,0,65,69,3,0,0]);let Ar=0;const di=[];class t0{constructor(n,t={}){n=$c(n);const r=n.availableSize!==re&&n.availableSize>0&&n.availableSize!==1/0&&n.maxSize!==re&&n.maxSize>0&&n.maxSize!==1/0;Object.assign(this,{writer:n,addSplitZipSignature:r,options:t,config:Vu(),files:new Map,filenames:new Set,offset:t.offset===re?n.writable.size:t.offset,pendingEntriesSize:0,pendingAddFileCalls:new Set,bufferedWrites:0})}async add(n="",t,r={}){const s=this,{pendingAddFileCalls:i,config:o}=s;Ar<o.maxWorkers?Ar++:await new Promise(u=>di.push(u));let a;try{if(n=n.trim(),s.filenames.has(n))throw new Error(Gc);return s.filenames.add(n),a=n0(s,n,t,r),i.add(a),await a}catch(u){throw s.filenames.delete(n),u}finally{i.delete(a);const u=di.shift();u?u():Ar--}}async close(n=new Uint8Array,t={}){const r=this,{pendingAddFileCalls:s,writer:i}=this,{writable:o}=i;for(;s.size;)await Promise.allSettled(Array.from(s));return await f0(this,n,t),K(r,t,"preventClose")||await o.getWriter().close(),i.getData?i.getData():o}}async function n0(e,n,t,r){n=n.trim();const s=K(e,r,yo),i=K(e,r,Ao,s?20:768),o=K(e,r,Eo);if(i>Me)throw new Error(li);let a=K(e,r,wo,0);a===0&&(a=K(e,r,go,0)),!r.directory&&n.endsWith(gr)&&(r.directory=!0),K(e,r,Co)?(n.endsWith(gr)||(n+=gr),a===0&&(a=$u,s||(a|=(Ou|Ws|Dr)<<16))):!s&&a===0&&(o?a=(Ws|Dr)<<16:a=Dr<<16);const l=K(e,r,"encodeText",On);let c=l(n);if(c===re&&(c=On(n)),z(c)>Me)throw new Error(Kc);const h=r.comment||"";let m=l(h);if(m===re&&(m=On(h)),z(m)>Me)throw new Error(Xc);const x=K(e,r,_o,Nu);if(x>Me)throw new Error(li);const y=K(e,r,po,new Date),f=K(e,r,ho),d=K(e,r,mo);let p=K(e,r,Do,0);p===0&&(p=K(e,r,xo,0));const D=K(e,r,"passThrough");let g,_;D||(g=K(e,r,"password"),_=K(e,r,"rawPassword"));const w=K(e,r,"encryptionStrength",3),b=K(e,r,vo),v=K(e,r,"extendedTimestamp",!0),A=K(e,r,"keepOrder",!0),E=K(e,r,"level"),k=K(e,r,"useWebWorkers"),F=K(e,r,"bufferedWrite"),$=K(e,r,"dataDescriptorSignature",!1),M=K(e,r,"signal"),U=K(e,r,"useUnicodeFileNames",!0),N=K(e,r,"useCompressionStream"),I=K(e,r,"compressionMethod");let q=K(e,r,"dataDescriptor",!0),R=K(e,r,zr);if(!b&&(g!==re||_!==re)&&!(w>=1&&w<=3))throw new Error(Jc);let fe=new Uint8Array;const{extraField:V}=r;if(V){let Ge=0,Ze=0;V.forEach(ye=>Ge+=4+z(ye)),fe=new Uint8Array(Ge),V.forEach((ye,rt)=>{if(rt>Me)throw new Error(zc);if(z(ye)>Me)throw new Error(Qc);ge(fe,new Uint16Array([rt]),Ze),ge(fe,new Uint16Array([z(ye)]),Ze+2),ge(fe,ye,Ze+4),Ze+=4+z(ye)})}let pe=0,W=0,Z=0;if(D&&({uncompressedSize:Z}=r,Z===re))throw new Error(e0);const ke=R===!0;t&&(t=Lc(t),await mn(t),D?pe=pi(Z):t.size===re?(q=!0,(R||R===re)&&(R=!0,Z=pe=$e+1)):(Z=t.size,pe=pi(Z)));const{diskOffset:we,diskNumber:he,maxSize:ft}=e.writer,nt=ke||Z>$e,bt=ke||pe>$e,_t=ke||e.offset+e.pendingEntriesSize-we>$e,Ye=K(e,r,"supportZip64SplitFile",!0)&&ke||he+Math.ceil(e.pendingEntriesSize/ft)>Me;if(_t||nt||bt||Ye){if(R===!1||!A)throw new Error(Qr);R=!0}R=R||!1;const dt=K(e,r,bo),{signature:Qt}=r;r=Object.assign({},r,{rawFilename:c,rawComment:m,version:x,versionMadeBy:i,lastModDate:y,lastAccessDate:f,creationDate:d,rawExtraField:fe,zip64:R,zip64UncompressedSize:nt,zip64CompressedSize:bt,zip64Offset:_t,zip64DiskNumberStart:Ye,password:g,rawPassword:_,level:!N&&e.config.CompressionStream===re&&e.config.CompressionStreamNative===re?0:E,useWebWorkers:k,encryptionStrength:w,extendedTimestamp:v,zipCrypto:b,bufferedWrite:F,keepOrder:A,useUnicodeFileNames:U,dataDescriptor:q,dataDescriptorSignature:$,signal:M,msDosCompatible:s,internalFileAttribute:p,internalFileAttributes:p,externalFileAttribute:a,externalFileAttributes:a,useCompressionStream:N,passThrough:D,encrypted:!!(g&&z(g)||_&&z(_))||D&&dt,signature:Qt,compressionMethod:I});const xe=i0(r),De=a0(r),At=z(xe.localHeaderArray,De.dataDescriptorArray);W=At+pe,e.options.usdz&&(W+=W+64),e.pendingEntriesSize+=W;let pt;try{pt=await r0(e,n,t,{headerInfo:xe,dataDescriptorInfo:De,metadataSize:At},r)}finally{e.pendingEntriesSize-=W}return Object.assign(pt,{name:n,comment:h,extraField:V}),new Fo(pt)}async function r0(e,n,t,r,s){const{files:i,writer:o}=e,{keepOrder:a,dataDescriptor:u,signal:l}=s,{headerInfo:c}=r,{usdz:h}=e.options,m=Array.from(i.values()).pop();let x={},y,f,d,p,D,g,_;i.set(n,x);try{let A;a&&(A=m&&m.lock,w()),(s.bufferedWrite||e.writerLocked||e.bufferedWrites&&a||!u)&&!h?(g=new TransformStream,_=new Response(g.readable).blob(),g.writable.size=0,y=!0,e.bufferedWrites++,await mn(o)):(g=o,await b()),await mn(g);const{writable:E}=o;let{diskOffset:k}=o;if(e.addSplitZipSignature){delete e.addSplitZipSignature;const $=new Uint8Array(4),M=ve($);J(M,0,$i),await at(E,$),e.offset+=4}h&&o0(r,e.offset-k),y||(await A,await v(E));const{diskNumber:F}=o;if(D=!0,x.diskNumberStart=F,x=await s0(t,g,x,r,e.config,s),D=!1,i.set(n,x),x.filename=n,y){await g.writable.getWriter().close();let $=await _;await A,await b(),p=!0,u||($=await c0(x,$,E,s)),await v(E),x.diskNumberStart=o.diskNumber,k=o.diskOffset,await $.stream().pipeTo(E,{preventClose:!0,preventAbort:!0,signal:l}),E.size+=$.size,p=!1}if(x.offset=e.offset-k,x.zip64)l0(x,s);else if(x.offset>$e)throw new Error(Qr);return e.offset+=x.size,x}catch(A){if(y&&p||!y&&D){if(e.hasCorruptedEntries=!0,A)try{A.corruptedEntry=!0}catch{}y?e.offset+=g.writable.size:e.offset=g.writable.size}throw i.delete(n),A}finally{y&&e.bufferedWrites--,d&&d(),f&&f()}function w(){x.lock=new Promise(A=>d=A)}async function b(){e.writerLocked=!0;const{lockWriter:A}=e;e.lockWriter=new Promise(E=>f=()=>{e.writerLocked=!1,E()}),await A}async function v(A){z(c.localHeaderArray)>o.availableSize&&(o.availableSize=0,await at(A,new Uint8Array))}}async function s0(e,n,{diskNumberStart:t,lock:r},s,i,o){const{headerInfo:a,dataDescriptorInfo:u,metadataSize:l}=s,{localHeaderArray:c,headerArray:h,lastModDate:m,rawLastModDate:x,encrypted:y,compressed:f,version:d,compressionMethod:p,rawExtraFieldExtendedTimestamp:D,extraFieldExtendedTimestampFlag:g,rawExtraFieldNTFS:_,rawExtraFieldAES:w}=a,{dataDescriptorArray:b}=u,{rawFilename:v,lastAccessDate:A,creationDate:E,password:k,rawPassword:F,level:$,zip64:M,zip64UncompressedSize:U,zip64CompressedSize:N,zip64Offset:I,zip64DiskNumberStart:q,zipCrypto:R,dataDescriptor:fe,directory:V,executable:pe,versionMadeBy:W,rawComment:Z,rawExtraField:ke,useWebWorkers:we,onstart:he,onprogress:ft,onend:nt,signal:bt,encryptionStrength:_t,extendedTimestamp:yn,msDosCompatible:Ye,internalFileAttributes:dt,externalFileAttributes:Qt,useCompressionStream:xe,passThrough:De}=o,At={lock:r,versionMadeBy:W,zip64:M,directory:!!V,executable:!!pe,filenameUTF8:!0,rawFilename:v,commentUTF8:!0,rawComment:Z,rawExtraFieldExtendedTimestamp:D,rawExtraFieldNTFS:_,rawExtraFieldAES:w,rawExtraField:ke,extendedTimestamp:yn,msDosCompatible:Ye,internalFileAttributes:dt,externalFileAttributes:Qt,diskNumberStart:t};let{signature:pt,uncompressedSize:Ge}=o,Ze=0;De||(Ge=0);const{writable:ye}=n;if(e){e.chunkSize=qu(i),await at(ye,c);const Xe=e.readable,sr=Xe.size=e.size,bn={options:{codecType:ao,level:$,rawPassword:F,password:k,encryptionStrength:_t,zipCrypto:y&&R,passwordVerification:y&&R&&x>>8&255,signed:!De,compressed:f&&!De,encrypted:y&&!De,useWebWorkers:we,useCompressionStream:xe,transferStreams:!1},config:i,streamOptions:{signal:bt,size:sr,onstart:he,onprogress:ft,onend:nt}},en=await Cc({readable:Xe,writable:ye},bn);Ze=en.outputSize,De||(Ge=en.inputSize,pt=en.signature),ye.size+=Ge}else await at(ye,c);let rt;if(M){let Xe=4;U&&(Xe+=8),N&&(Xe+=8),I&&(Xe+=8),q&&(Xe+=4),rt=new Uint8Array(Xe)}else rt=new Uint8Array;return u0({signature:pt,rawExtraFieldZip64:rt,compressedSize:Ze,uncompressedSize:Ge,headerInfo:a,dataDescriptorInfo:u},o),fe&&await at(ye,b),Object.assign(At,{uncompressedSize:Ge,compressedSize:Ze,lastModDate:m,rawLastModDate:x,creationDate:E,lastAccessDate:A,encrypted:y,zipCrypto:R,size:l+Ze,compressionMethod:p,version:d,headerArray:h,signature:pt,rawExtraFieldZip64:rt,extraFieldExtendedTimestampFlag:g,zip64UncompressedSize:U,zip64CompressedSize:N,zip64Offset:I,zip64DiskNumberStart:q}),At}function i0(e){const{rawFilename:n,lastModDate:t,lastAccessDate:r,creationDate:s,level:i,zip64:o,zipCrypto:a,useUnicodeFileNames:u,dataDescriptor:l,directory:c,rawExtraField:h,encryptionStrength:m,extendedTimestamp:x,encrypted:y}=e;let{version:f,compressionMethod:d}=e;const p=!c&&(i>0||i===re&&d!==0);let D;if(y&&!a){D=new Uint8Array(z(fi)+2);const I=ve(D);ee(I,0,ku),ge(D,fi,2),Ir(I,8,m)}else D=new Uint8Array;let g,_,w;if(x){_=new Uint8Array(9+(r?4:0)+(s?4:0));const I=ve(_);ee(I,0,Ri),ee(I,2,z(_)-4),w=1+(r?2:0)+(s?4:0),Ir(I,4,w);let q=5;J(I,q,Math.floor(t.getTime()/1e3)),q+=4,r&&(J(I,q,Math.floor(r.getTime()/1e3)),q+=4),s&&J(I,q,Math.floor(s.getTime()/1e3));try{g=new Uint8Array(36);const R=ve(g),fe=vr(t);ee(R,0,Tu),ee(R,2,32),ee(R,8,Pu),ee(R,10,24),Ie(R,12,fe),Ie(R,20,vr(r)||fe),Ie(R,28,vr(s)||fe)}catch{g=new Uint8Array}}else g=_=new Uint8Array;let b=0;u&&(b=b|Lu),l&&(b=b|Iu),d===re&&(d=p?js:wu),d==js&&(i>=1&&i<3&&(b=b|6),i>=3&&i<5&&(b=b|1),i===9&&(b=b|2)),o&&(f=f>Hs?f:Hs),y&&(b=b|Mu,a||(f=f>Ys?f:Ys,D[9]=d,d=yu));const v=new Uint8Array(26),A=ve(v);ee(A,0,f),ee(A,2,b),ee(A,4,d);const E=new Uint32Array(1),k=ve(E);let F;t<Zs?F=Zs:t>Gs?F=Gs:F=t,ee(k,0,(F.getHours()<<6|F.getMinutes())<<5|F.getSeconds()/2),ee(k,2,(F.getFullYear()-1980<<4|F.getMonth()+1)<<5|F.getDate());const $=E[0];J(A,6,$),ee(A,22,z(n));const M=z(D,_,g,h);ee(A,24,M);const U=new Uint8Array(30+z(n)+M),N=ve(U);return J(N,0,bu),ge(U,v,4),ge(U,n,30),ge(U,D,30+z(n)),ge(U,_,30+z(n,D)),ge(U,g,30+z(n,D,_)),ge(U,h,30+z(n,D,_,g)),{localHeaderArray:U,headerArray:v,headerView:A,lastModDate:t,rawLastModDate:$,encrypted:y,compressed:p,version:f,compressionMethod:d,extraFieldExtendedTimestampFlag:w,rawExtraFieldExtendedTimestamp:_,rawExtraFieldNTFS:g,rawExtraFieldAES:D,extraFieldLength:M}}function o0(e,n){const{headerInfo:t}=e;let{localHeaderArray:r,extraFieldLength:s}=t,i=ve(r),o=64-(n+z(r))%64;o<4&&(o+=64);const a=new Uint8Array(o),u=ve(a);ee(u,0,Bu),ee(u,2,o-2);const l=r;t.localHeaderArray=r=new Uint8Array(z(l)+o),ge(r,l),ge(r,a,z(l)),i=ve(r),ee(i,28,s+o),e.metadataSize+=o}function a0(e){const{zip64:n,dataDescriptor:t,dataDescriptorSignature:r}=e;let s=new Uint8Array,i,o=0;return t&&(s=new Uint8Array(n?r?24:20:r?16:12),i=ve(s),r&&(o=4,J(i,0,_u))),{dataDescriptorArray:s,dataDescriptorView:i,dataDescriptorOffset:o}}function u0(e,n){const{signature:t,rawExtraFieldZip64:r,compressedSize:s,uncompressedSize:i,headerInfo:o,dataDescriptorInfo:a}=e,{headerView:u,encrypted:l}=o,{dataDescriptorView:c,dataDescriptorOffset:h}=a,{zip64:m,zip64UncompressedSize:x,zip64CompressedSize:y,zipCrypto:f,dataDescriptor:d}=n;if((!l||f)&&t!==re&&(J(u,10,t),d&&J(c,h,t)),m){const p=ve(r);ee(p,0,Su),ee(p,2,z(r)-4);let D=4;x&&(J(u,18,$e),Ie(p,D,BigInt(i)),D+=8),y&&(J(u,14,$e),Ie(p,D,BigInt(s))),d&&(Ie(c,h+4,BigInt(s)),Ie(c,h+12,BigInt(i)))}else J(u,14,s),J(u,18,i),d&&(J(c,h+4,s),J(c,h+8,i))}async function c0(e,n,t,{zipCrypto:r}){let s;s=await n.slice(0,26).arrayBuffer(),s.byteLength!=26&&(s=s.slice(0,26));const i=new DataView(s);return(!e.encrypted||r)&&J(i,14,e.signature),e.zip64?(J(i,18,$e),J(i,22,$e)):(J(i,18,e.compressedSize),J(i,22,e.uncompressedSize)),await at(t,new Uint8Array(s)),n.slice(s.byteLength)}function l0(e,n){const{rawExtraFieldZip64:t,offset:r,diskNumberStart:s}=e,{zip64UncompressedSize:i,zip64CompressedSize:o,zip64Offset:a,zip64DiskNumberStart:u}=n,l=ve(t);let c=4;i&&(c+=8),o&&(c+=8),a&&(Ie(l,c,BigInt(r)),c+=8),u&&J(l,c,s)}async function f0(e,n,t){const{files:r,writer:s}=e,{diskOffset:i,writable:o}=s;let{diskNumber:a}=s,u=0,l=0,c=e.offset-i,h=r.size;for(const[,w]of r){const{rawFilename:b,rawExtraFieldZip64:v,rawExtraFieldAES:A,rawComment:E,rawExtraFieldNTFS:k,rawExtraField:F,extendedTimestamp:$,extraFieldExtendedTimestampFlag:M,lastModDate:U}=w;let N;if($){N=new Uint8Array(9);const I=ve(N);ee(I,0,Ri),ee(I,2,5),Ir(I,4,M),J(I,5,Math.floor(U.getTime()/1e3))}else N=new Uint8Array;w.rawExtraFieldCDExtendedTimestamp=N,l+=46+z(b,E,v,A,k,N,F)}const m=new Uint8Array(l),x=ve(m);await mn(s);let y=0;for(const[w,b]of Array.from(r.values()).entries()){const{offset:v,rawFilename:A,rawExtraFieldZip64:E,rawExtraFieldAES:k,rawExtraFieldCDExtendedTimestamp:F,rawExtraFieldNTFS:$,rawExtraField:M,rawComment:U,versionMadeBy:N,headerArray:I,zip64:q,zip64UncompressedSize:R,zip64CompressedSize:fe,zip64DiskNumberStart:V,zip64Offset:pe,internalFileAttributes:W,externalFileAttributes:Z,diskNumberStart:ke,uncompressedSize:we,compressedSize:he}=b,ft=z(E,k,F,$,M);J(x,u,Au),ee(x,u+4,N);const nt=ve(I);R||J(nt,18,we),fe||J(nt,14,he),ge(m,I,u+6),ee(x,u+30,ft),ee(x,u+32,z(U)),ee(x,u+34,q&&V?Me:ke),ee(x,u+36,W),Z&&J(x,u+38,Z),J(x,u+42,q&&pe?$e:v),ge(m,A,u+46),ge(m,E,u+46+z(A)),ge(m,k,u+46+z(A,E)),ge(m,F,u+46+z(A,E,k)),ge(m,$,u+46+z(A,E,k,F)),ge(m,M,u+46+z(A,E,k,F,$)),ge(m,U,u+46+z(A)+ft);const bt=46+z(A,U)+ft;if(u-y>s.availableSize&&(s.availableSize=0,await at(o,m.slice(y,u)),y=u),u+=bt,t.onprogress)try{await t.onprogress(w+1,r.size,new Fo(b))}catch{}}await at(o,y?m.slice(y):m);let f=s.diskNumber;const{availableSize:d}=s;d<Tr&&f++;let p=K(e,t,zr);if(c>$e||l>$e||h>Me||f>Me){if(p===!1)throw new Error(Qr);p=!0}const D=new Uint8Array(p?Fu:Tr),g=ve(D);u=0,p&&(J(g,0,Cu),Ie(g,4,BigInt(44)),ee(g,12,45),ee(g,14,45),J(g,16,f),J(g,20,a),Ie(g,24,BigInt(h)),Ie(g,32,BigInt(h)),Ie(g,40,BigInt(l)),Ie(g,48,BigInt(c)),J(g,56,Eu),Ie(g,64,BigInt(c)+BigInt(l)),J(g,72,f+1),K(e,t,"supportZip64SplitFile",!0)&&(f=Me,a=Me),h=Me,c=$e,l=$e,u+=Ni+Oi),J(g,u,vu),ee(g,u+4,f),ee(g,u+6,a),ee(g,u+8,h),ee(g,u+10,h),J(g,u+12,l),J(g,u+16,c);const _=z(n);if(_)if(_<=Me)ee(g,u+20,_);else throw new Error(Zc);await at(o,D),_&&await at(o,n)}async function at(e,n){const t=e.getWriter();try{await t.ready,e.size+=z(n),await t.write(n)}finally{t.releaseLock()}}function vr(e){if(e)return(BigInt(e.getTime())+BigInt(116444736e5))*BigInt(1e4)}function K(e,n,t,r){const s=n[t]===re?e.options[t]:n[t];return s===re?r:s}function pi(e){return e+5*(Math.floor(e/16383)+1)}function Ir(e,n,t){e.setUint8(n,t)}function ee(e,n,t){e.setUint16(n,t,!0)}function J(e,n,t){e.setUint32(n,t,!0)}function Ie(e,n,t){e.setBigUint64(n,t,!0)}function ge(e,n,t){e.set(n,t)}function ve(e){return new DataView(e.buffer)}function z(...e){let n=0;return e.forEach(t=>t&&(n+=t.length)),n}let So;try{So=import.meta.url}catch{}Zr({baseURL:So});Fc(Zr);Zr({Deflate:Ja,Inflate:gu});var d0=/[\u1680\u2000-\u200A\u202F\u205F\u3000]/,p0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE83\uDE86-\uDE89\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]/,h0=/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u0860-\u086A\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF9\u1D00-\u1DF9\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312E\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FEA\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDE00-\uDE3E\uDE47\uDE50-\uDE83\uDE86-\uDE99\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F\uDFE0\uDFE1]|\uD821[\uDC00-\uDFEC]|\uD822[\uDC00-\uDEF2]|\uD82C[\uDC00-\uDD1E\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4A\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/,Cr={Space_Separator:d0,ID_Start:p0,ID_Continue:h0},me={isSpaceSeparator(e){return typeof e=="string"&&Cr.Space_Separator.test(e)},isIdStartChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e==="$"||e==="_"||Cr.ID_Start.test(e))},isIdContinueChar(e){return typeof e=="string"&&(e>="a"&&e<="z"||e>="A"&&e<="Z"||e>="0"&&e<="9"||e==="$"||e==="_"||e===""||e===""||Cr.ID_Continue.test(e))},isDigit(e){return typeof e=="string"&&/[0-9]/.test(e)},isHexDigit(e){return typeof e=="string"&&/[0-9A-Fa-f]/.test(e)}};let Lr,Se,xt,jn,Lt,tt,be,es,ln;var m0=function(n,t){Lr=String(n),Se="start",xt=[],jn=0,Lt=1,tt=0,be=void 0,es=void 0,ln=void 0;do be=x0(),w0[Se]();while(be.type!=="eof");return typeof t=="function"?$r({"":ln},"",t):ln};function $r(e,n,t){const r=e[n];if(r!=null&&typeof r=="object")if(Array.isArray(r))for(let s=0;s<r.length;s++){const i=String(s),o=$r(r,i,t);o===void 0?delete r[i]:Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}else for(const s in r){const i=$r(r,s,t);i===void 0?delete r[s]:Object.defineProperty(r,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}return t.call(e,n,r)}let Y,H,cn,ht,X;function x0(){for(Y="default",H="",cn=!1,ht=1;;){X=wt();const e=ko[Y]();if(e)return e}}function wt(){if(Lr[jn])return String.fromCodePoint(Lr.codePointAt(jn))}function S(){const e=wt();return e===`
|
|
3
|
-
`?(Lt++,tt=0):e?tt+=e.length:tt++,e&&(jn+=e.length),e}const ko={default(){switch(X){case" ":case"\v":case"\f":case" ":case" ":case"\uFEFF":case`
|
|
4
|
-
`:case"\r":case"\u2028":case"\u2029":S();return;case"/":S(),Y="comment";return;case void 0:return S(),se("eof")}if(me.isSpaceSeparator(X)){S();return}return ko[Se]()},comment(){switch(X){case"*":S(),Y="multiLineComment";return;case"/":S(),Y="singleLineComment";return}throw ie(S())},multiLineComment(){switch(X){case"*":S(),Y="multiLineCommentAsterisk";return;case void 0:throw ie(S())}S()},multiLineCommentAsterisk(){switch(X){case"*":S();return;case"/":S(),Y="default";return;case void 0:throw ie(S())}S(),Y="multiLineComment"},singleLineComment(){switch(X){case`
|
|
5
|
-
`:case"\r":case"\u2028":case"\u2029":S(),Y="default";return;case void 0:return S(),se("eof")}S()},value(){switch(X){case"{":case"[":return se("punctuator",S());case"n":return S(),Ot("ull"),se("null",null);case"t":return S(),Ot("rue"),se("boolean",!0);case"f":return S(),Ot("alse"),se("boolean",!1);case"-":case"+":S()==="-"&&(ht=-1),Y="sign";return;case".":H=S(),Y="decimalPointLeading";return;case"0":H=S(),Y="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=S(),Y="decimalInteger";return;case"I":return S(),Ot("nfinity"),se("numeric",1/0);case"N":return S(),Ot("aN"),se("numeric",NaN);case'"':case"'":cn=S()==='"',H="",Y="string";return}throw ie(S())},identifierNameStartEscape(){if(X!=="u")throw ie(S());S();const e=Or();switch(e){case"$":case"_":break;default:if(!me.isIdStartChar(e))throw hi();break}H+=e,Y="identifierName"},identifierName(){switch(X){case"$":case"_":case"":case"":H+=S();return;case"\\":S(),Y="identifierNameEscape";return}if(me.isIdContinueChar(X)){H+=S();return}return se("identifier",H)},identifierNameEscape(){if(X!=="u")throw ie(S());S();const e=Or();switch(e){case"$":case"_":case"":case"":break;default:if(!me.isIdContinueChar(e))throw hi();break}H+=e,Y="identifierName"},sign(){switch(X){case".":H=S(),Y="decimalPointLeading";return;case"0":H=S(),Y="zero";return;case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":H=S(),Y="decimalInteger";return;case"I":return S(),Ot("nfinity"),se("numeric",ht*(1/0));case"N":return S(),Ot("aN"),se("numeric",NaN)}throw ie(S())},zero(){switch(X){case".":H+=S(),Y="decimalPoint";return;case"e":case"E":H+=S(),Y="decimalExponent";return;case"x":case"X":H+=S(),Y="hexadecimal";return}return se("numeric",ht*0)},decimalInteger(){switch(X){case".":H+=S(),Y="decimalPoint";return;case"e":case"E":H+=S(),Y="decimalExponent";return}if(me.isDigit(X)){H+=S();return}return se("numeric",ht*Number(H))},decimalPointLeading(){if(me.isDigit(X)){H+=S(),Y="decimalFraction";return}throw ie(S())},decimalPoint(){switch(X){case"e":case"E":H+=S(),Y="decimalExponent";return}if(me.isDigit(X)){H+=S(),Y="decimalFraction";return}return se("numeric",ht*Number(H))},decimalFraction(){switch(X){case"e":case"E":H+=S(),Y="decimalExponent";return}if(me.isDigit(X)){H+=S();return}return se("numeric",ht*Number(H))},decimalExponent(){switch(X){case"+":case"-":H+=S(),Y="decimalExponentSign";return}if(me.isDigit(X)){H+=S(),Y="decimalExponentInteger";return}throw ie(S())},decimalExponentSign(){if(me.isDigit(X)){H+=S(),Y="decimalExponentInteger";return}throw ie(S())},decimalExponentInteger(){if(me.isDigit(X)){H+=S();return}return se("numeric",ht*Number(H))},hexadecimal(){if(me.isHexDigit(X)){H+=S(),Y="hexadecimalInteger";return}throw ie(S())},hexadecimalInteger(){if(me.isHexDigit(X)){H+=S();return}return se("numeric",ht*Number(H))},string(){switch(X){case"\\":S(),H+=D0();return;case'"':if(cn)return S(),se("string",H);H+=S();return;case"'":if(!cn)return S(),se("string",H);H+=S();return;case`
|
|
6
|
-
`:case"\r":throw ie(S());case"\u2028":case"\u2029":y0(X);break;case void 0:throw ie(S())}H+=S()},start(){switch(X){case"{":case"[":return se("punctuator",S())}Y="value"},beforePropertyName(){switch(X){case"$":case"_":H=S(),Y="identifierName";return;case"\\":S(),Y="identifierNameStartEscape";return;case"}":return se("punctuator",S());case'"':case"'":cn=S()==='"',Y="string";return}if(me.isIdStartChar(X)){H+=S(),Y="identifierName";return}throw ie(S())},afterPropertyName(){if(X===":")return se("punctuator",S());throw ie(S())},beforePropertyValue(){Y="value"},afterPropertyValue(){switch(X){case",":case"}":return se("punctuator",S())}throw ie(S())},beforeArrayValue(){if(X==="]")return se("punctuator",S());Y="value"},afterArrayValue(){switch(X){case",":case"]":return se("punctuator",S())}throw ie(S())},end(){throw ie(S())}};function se(e,n){return{type:e,value:n,line:Lt,column:tt}}function Ot(e){for(const n of e){if(wt()!==n)throw ie(S());S()}}function D0(){switch(wt()){case"b":return S(),"\b";case"f":return S(),"\f";case"n":return S(),`
|
|
7
|
-
`;case"r":return S(),"\r";case"t":return S()," ";case"v":return S(),"\v";case"0":if(S(),me.isDigit(wt()))throw ie(S());return"\0";case"x":return S(),g0();case"u":return S(),Or();case`
|
|
8
|
-
`:case"\u2028":case"\u2029":return S(),"";case"\r":return S(),wt()===`
|
|
9
|
-
`&&S(),"";case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":throw ie(S());case void 0:throw ie(S())}return S()}function g0(){let e="",n=wt();if(!me.isHexDigit(n)||(e+=S(),n=wt(),!me.isHexDigit(n)))throw ie(S());return e+=S(),String.fromCodePoint(parseInt(e,16))}function Or(){let e="",n=4;for(;n-- >0;){const t=wt();if(!me.isHexDigit(t))throw ie(S());e+=S()}return String.fromCodePoint(parseInt(e,16))}const w0={start(){if(be.type==="eof")throw Nt();Er()},beforePropertyName(){switch(be.type){case"identifier":case"string":es=be.value,Se="afterPropertyName";return;case"punctuator":Bn();return;case"eof":throw Nt()}},afterPropertyName(){if(be.type==="eof")throw Nt();Se="beforePropertyValue"},beforePropertyValue(){if(be.type==="eof")throw Nt();Er()},beforeArrayValue(){if(be.type==="eof")throw Nt();if(be.type==="punctuator"&&be.value==="]"){Bn();return}Er()},afterPropertyValue(){if(be.type==="eof")throw Nt();switch(be.value){case",":Se="beforePropertyName";return;case"}":Bn()}},afterArrayValue(){if(be.type==="eof")throw Nt();switch(be.value){case",":Se="beforeArrayValue";return;case"]":Bn()}},end(){}};function Er(){let e;switch(be.type){case"punctuator":switch(be.value){case"{":e={};break;case"[":e=[];break}break;case"null":case"boolean":case"numeric":case"string":e=be.value;break}if(ln===void 0)ln=e;else{const n=xt[xt.length-1];Array.isArray(n)?n.push(e):Object.defineProperty(n,es,{value:e,writable:!0,enumerable:!0,configurable:!0})}if(e!==null&&typeof e=="object")xt.push(e),Array.isArray(e)?Se="beforeArrayValue":Se="beforePropertyName";else{const n=xt[xt.length-1];n==null?Se="end":Array.isArray(n)?Se="afterArrayValue":Se="afterPropertyValue"}}function Bn(){xt.pop();const e=xt[xt.length-1];e==null?Se="end":Array.isArray(e)?Se="afterArrayValue":Se="afterPropertyValue"}function ie(e){return Wn(e===void 0?`JSON5: invalid end of input at ${Lt}:${tt}`:`JSON5: invalid character '${To(e)}' at ${Lt}:${tt}`)}function Nt(){return Wn(`JSON5: invalid end of input at ${Lt}:${tt}`)}function hi(){return tt-=5,Wn(`JSON5: invalid identifier character at ${Lt}:${tt}`)}function y0(e){console.warn(`JSON5: '${To(e)}' in strings is not valid ECMAScript; consider escaping`)}function To(e){const n={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};if(n[e])return n[e];if(e<" "){const t=e.charCodeAt(0).toString(16);return"\\x"+("00"+t).substring(t.length)}return e}function Wn(e){const n=new SyntaxError(e);return n.lineNumber=Lt,n.columnNumber=tt,n}var b0=function(n,t,r){const s=[];let i="",o,a,u="",l;if(t!=null&&typeof t=="object"&&!Array.isArray(t)&&(r=t.space,l=t.quote,t=t.replacer),typeof t=="function")a=t;else if(Array.isArray(t)){o=[];for(const f of t){let d;typeof f=="string"?d=f:(typeof f=="number"||f instanceof String||f instanceof Number)&&(d=String(f)),d!==void 0&&o.indexOf(d)<0&&o.push(d)}}return r instanceof Number?r=Number(r):r instanceof String&&(r=String(r)),typeof r=="number"?r>0&&(r=Math.min(10,Math.floor(r)),u=" ".substr(0,r)):typeof r=="string"&&(u=r.substr(0,10)),c("",{"":n});function c(f,d){let p=d[f];switch(p!=null&&(typeof p.toJSON5=="function"?p=p.toJSON5(f):typeof p.toJSON=="function"&&(p=p.toJSON(f))),a&&(p=a.call(d,f,p)),p instanceof Number?p=Number(p):p instanceof String?p=String(p):p instanceof Boolean&&(p=p.valueOf()),p){case null:return"null";case!0:return"true";case!1:return"false"}if(typeof p=="string")return h(p);if(typeof p=="number")return String(p);if(typeof p=="object")return Array.isArray(p)?y(p):m(p)}function h(f){const d={"'":.1,'"':.2},p={"'":"\\'",'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\v":"\\v","\0":"\\0","\u2028":"\\u2028","\u2029":"\\u2029"};let D="";for(let _=0;_<f.length;_++){const w=f[_];switch(w){case"'":case'"':d[w]++,D+=w;continue;case"\0":if(me.isDigit(f[_+1])){D+="\\x00";continue}}if(p[w]){D+=p[w];continue}if(w<" "){let b=w.charCodeAt(0).toString(16);D+="\\x"+("00"+b).substring(b.length);continue}D+=w}const g=l||Object.keys(d).reduce((_,w)=>d[_]<d[w]?_:w);return D=D.replace(new RegExp(g,"g"),p[g]),g+D+g}function m(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let d=i;i=i+u;let p=o||Object.keys(f),D=[];for(const _ of p){const w=c(_,f);if(w!==void 0){let b=x(_)+":";u!==""&&(b+=" "),b+=w,D.push(b)}}let g;if(D.length===0)g="{}";else{let _;if(u==="")_=D.join(","),g="{"+_+"}";else{let w=`,
|
|
10
|
-
`+i;_=D.join(w),g=`{
|
|
11
|
-
`+i+_+`,
|
|
12
|
-
`+d+"}"}}return s.pop(),i=d,g}function x(f){if(f.length===0)return h(f);const d=String.fromCodePoint(f.codePointAt(0));if(!me.isIdStartChar(d))return h(f);for(let p=d.length;p<f.length;p++)if(!me.isIdContinueChar(String.fromCodePoint(f.codePointAt(p))))return h(f);return f}function y(f){if(s.indexOf(f)>=0)throw TypeError("Converting circular structure to JSON5");s.push(f);let d=i;i=i+u;let p=[];for(let g=0;g<f.length;g++){const _=c(String(g),f);p.push(_!==void 0?_:"null")}let D;if(p.length===0)D="[]";else if(u==="")D="["+p.join(",")+"]";else{let g=`,
|
|
13
|
-
`+i,_=p.join(g);D=`[
|
|
14
|
-
`+i+_+`,
|
|
15
|
-
`+d+"]"}return s.pop(),i=d,D}};const _0={parse:m0,stringify:b0};var A0=_0,ts=10**-4;function Le(e){return 180*e/Math.PI}function ne(e){let n=e;return Math.abs(n)<ts&&(n=0),n}function yt(e){let n=e%(2*Math.PI);return n<0&&(n+=2*Math.PI),n}function le(e){let n=yt(e);return n>Math.PI&&(n-=2*Math.PI),n}function ot(e){let n=e%Math.PI;return n<0&&(n+=Math.PI),n}function Ne(e){let n=ot(e);return n>Math.PI/2&&(n-=Math.PI),n}function Nr(e,n,t){const r=le(n)-le(e);return t?yt(r):yt(r)-2*Math.PI}function Po(e,n,t,r){let s=!1;if(ne(le(e-n))===0)s=!0;else if(ne(le(e-t))===0)s=!0;else{const i=Nr(n,t,r),o=Nr(n,e,r);Math.abs(o)<Math.abs(i)&&(s=!0)}return s}function ut(e){return e.toFixed(2)}var de={point:"grey",line:"grey",contour:"green",mainOuter:"SlateBlue",mainInner:"SteelBlue",mainB:"SlateGrey",second:"Violet",secondB:"SlateGrey",dynamics:"Tomato",ruler:"blue",origin:"red",reference:"blue",mouse:"yellow"},Kt=.05;function qt(e,n,t){const r=t.shiftX+(e-t.xMin)*t.scaleX,s=t.shiftY+(n-t.yMin)*t.scaleY;return[r,s]}function $l(e,n,t){const r=(e-t.shiftX)/t.scaleX+t.xMin,s=(n-t.shiftY)/t.scaleY+t.yMin;return[r,s]}function Bo(e,n){if(ne(n.scaleX-Math.abs(n.scaleY))!==0)throw`err683: iAdjust.scaleX and scaleY differ ${n.scaleX} ${n.scaleY}`;if(n.scaleX<0)throw`err684: iAdjust.scaleX ${n.scaleX} is negative`;const t=e*n.scaleX;if(t<0)throw`err685: rRadius for canvas ${t} is negative`;return t}function Rr(){return{init:0,xMin:0,yMin:0,xyDiff:1,shiftX:0,shiftY:0,scaleX:1,scaleY:1}}function Jn(e){return{init:e.init,xMin:e.xMin,yMin:e.yMin,xyDiff:e.xyDiff,shiftX:e.shiftX,shiftY:e.shiftY,scaleX:e.scaleX,scaleY:e.scaleY}}function Ur(e,n,t,r,s,i){const o=Rr(),a=Math.max(n-e,1),u=Math.max(r-t,1),l=s/a,c=i/u;let h=.9*l,m=a;return c<l&&(h=.9*c,m=u),o.init=1,o.xMin=e,o.yMin=t,o.xyDiff=m,o.shiftX=Kt*s,o.scaleX=h,o.shiftY=i-Kt*i,o.scaleY=-1*h,o}function Ol(e,n,t){const r=Jn(t);return r.xMin=e-r.xyDiff/2,r.yMin=n-r.xyDiff/2,r}function Nl(e,n,t,r,s,i){const o=Math.min(e,t),a=Math.max(e,t),u=Math.min(n,r),l=Math.max(n,r);return Ur(o,a,u,l,s,i)}function Rl(e,n){const t=Jn(n),r=(1-e)/2;return t.xMin+=r*n.xyDiff,t.yMin+=r*n.xyDiff,t.xyDiff*=e,t.scaleX*=1/e,t.scaleY*=1/e,t}function Ul(e,n,t,r,s){const i=Jn(s),o=t-e,a=r-n;return i.xMin+=-o,i.yMin+=-a,i}function Vl(e,n,t){const r=Jn(t);if(e>0&&n>0){const s=e/n;r.xyDiff*=s,r.scaleX*=1/s,r.scaleY*=1/s,r.shiftX+=Kt*n-Kt*e,r.shiftY+=(1-Kt)*n-(1-Kt)*e}return r}function zn(e,n){let t=0;if(n>e)throw`err539: ila < ilc ${e} ${n}`;return t=Math.sqrt(e**2-n**2),t}function mi(e,n,t){let r=0;const s=[e,n,t];for(let o=0;o<s.length;o++)if(s[o]<0)throw`err209: l3[${o}] = ${s[o]}`;const i=s.sort(function(o,a){return a-o});if(i[0]>i[1]+i[2])throw`err839: impossible triangle with length ${e}, ${n} and ${t}`;return r=Math.acos((e**2+n**2-t**2)/(2*e*n)),r}function xi(e,n,t){let r=0;const s=[e,n,t];for(let u=0;u<s.length;u++)if(ne(s[u])===0||s[u]<0)throw`err329: negative or zero triangle-args ${u} : ${s[u]}`;const i=ot(n),o=ot(t);if(i+o>Math.PI)throw`err939: impossible triangle with angles ${n} and ${t}`;return r=e*Math.sin(t)/Math.sin(n),r}var qe=class Zt{constructor(n,t,r=0){L(this,"cx");L(this,"cy");L(this,"shape");this.cx=n,this.cy=t,this.shape=r}draw(n,t,r=de.point,s=0){if(isFinite(this.cx)&&isFinite(this.cy)){const i=n.canvas.width*.006999999999999999,o=2*i,[a,u]=qt(this.cx,this.cy,t);let l=s;switch(l===0&&(l=this.shape),n.beginPath(),l){case 2:n.moveTo(a-o,u),n.lineTo(a+o,u),n.moveTo(a,u-o),n.lineTo(a,u+o);break;case 3:n.rect(a-i,u-i,2*i,2*i);break;case 4:n.rect(a-2*i,u-2*i,4*i,4*i);break;case 5:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o),n.lineTo(a-o,u);break;case 6:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 7:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u-o),n.lineTo(a,u+o);break;case 8:n.moveTo(a+o,u),n.lineTo(a-o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 9:n.moveTo(a-o,u),n.lineTo(a+o,u),n.lineTo(a,u+o),n.lineTo(a,u-o);break;case 1:default:n.arc(a,u,i,0,2*Math.PI)}n.strokeStyle=r,n.stroke()}else console.log(`INFO489: point not draw because of infinity ${this.cx} ${this.cy}`)}distanceOrig(){return Math.sqrt(this.cx**2+this.cy**2)}angleOrig(){return Math.atan2(this.cy,this.cx)}getPolar(){return[this.angleOrig(),this.distanceOrig()]}setPolar(n,t){return new Zt(t*Math.cos(n),t*Math.sin(n))}translate(n,t){return new Zt(this.cx+n,this.cy+t)}translatePolar(n,t){return new Zt(this.cx+t*Math.cos(n),this.cy+t*Math.sin(n))}clone(n=0){return new Zt(this.cx,this.cy,n)}rotateOrig(n){const t=this.getPolar();return this.setPolar(t[0]+n,t[1])}scaleOrig(n){const t=this.getPolar();return this.setPolar(t[0],t[1]*n)}rotate(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0]+t,s[1]).translate(n.cx,n.cy)}scale(n,t){const s=this.translate(-1*n.cx,-1*n.cy).getPolar();return this.setPolar(s[0],s[1]*t).translate(n.cx,n.cy)}isEqual(n){return ne(this.cx-n.cx)===0&&ne(this.cy-n.cy)===0}distanceToPoint(n){return Math.sqrt((n.cx-this.cx)**2+(n.cy-this.cy)**2)}angleToPoint(n){if(ne(this.distanceToPoint(n))===0)throw`err434: no angle because points identical ${this.cx} ${n.cx} ${this.cy} ${n.cy}`;return Math.atan2(n.cy-this.cy,n.cx-this.cx)}angleFromToPoints(n,t){const r=this.angleToPoint(n),s=this.angleToPoint(t);return le(s-r)}middlePoint(n){const t=(this.cx+n.cx)/2,r=(this.cy+n.cy)/2;return new Zt(t,r)}equidistantPoint(n,t,r){const s=this.distanceToPoint(n)/2;if(this.isEqual(n))throw`err633: no equidistance because identical point ${this.cx} ${this.cy}`;if(t<s)throw`err392: equidistance ${t} smaller than lp1p2h ${s}`;const i=this.middlePoint(n),o=this.angleToPoint(n)+Math.PI/2,a=Math.sqrt(t**2-s**2),u=i.translatePolar(o,a),l=i.translatePolar(o+Math.PI,a),c=r.distanceToPoint(u),h=r.distanceToPoint(l);if(a!==0&&c===h)throw`err284: magnet point p3 is on line p1p2. cx ${r.cx} cy: ${r.cy}`;let m=u;return h<c&&(m=l),m}};function G(e,n,t=0){return new qe(e,n,t)}function Mo(e){let n=0,t=0,r=0,s=0;if(e.length>0){const i=e[0];if(i.cx===Number.NEGATIVE_INFINITY||i.cx===Number.POSITIVE_INFINITY||i.cy===Number.NEGATIVE_INFINITY||i.cy===Number.POSITIVE_INFINITY)throw`err292: pointMinMax first point with infinity: ${i.cx} ${i.cy}`;n=e[0].cx,t=e[0].cx,r=e[0].cy,s=e[0].cy;for(const o of e)o.cx!==Number.NEGATIVE_INFINITY&&(n=Math.min(n,o.cx)),o.cx!==Number.POSITIVE_INFINITY&&(t=Math.max(t,o.cx)),o.cy!==Number.NEGATIVE_INFINITY&&(r=Math.min(r,o.cy)),o.cy!==Number.POSITIVE_INFINITY&&(s=Math.max(s,o.cy))}return[n,t,r,s]}var v0=class Pe{constructor(n,t,r){L(this,"cx");L(this,"cy");L(this,"ca");this.cx=n,this.cy=t,this.ca=r}draw(n,t,r=de.line){const s=n.canvas.width*2,[i,o]=qt(this.cx-s*Math.cos(this.ca),this.cy-s*Math.sin(this.ca),t),[a,u]=qt(this.cx+2*s*Math.cos(this.ca),this.cy+2*s*Math.sin(this.ca),t);n.beginPath(),n.moveTo(i,o),n.lineTo(a,u),n.strokeStyle=r,n.stroke()}setFromPoints(n,t){return this.cx=n.cx,this.cy=n.cy,this.ca=n.angleToPoint(t),this}getAffine(){const n={quasiVertical:!1,ha:0,hb:0,va:0,vb:0};return Math.abs(Ne(this.ca))>Math.PI/4?(n.quasiVertical=!0,n.va=-1*Math.tan(Ne(this.ca-Math.PI/2)),n.vb=this.cx-n.va*this.cy):(n.ha=Math.tan(Ne(this.ca)),n.hb=this.cy-n.ha*this.cx),n}setAffine(n){const t=new Pe(0,0,0);return n.quasiVertical?(t.ca=Math.PI/2-Math.atan(n.va),t.cx=n.vb,t.cy=0):(t.ca=Math.atan(n.ha),t.cx=0,t.cy=n.hb),t}intersection(n){if(this.isParallel(n))throw`err902: no intersection, lines are parallel ca1: ${this.ca} ca2: ${n.ca}`;let t=0,r=0;const s=this.getAffine(),i=n.getAffine();return s.quasiVertical?i.quasiVertical?(r=(s.vb-i.vb)/(i.va-s.va),t=s.va*r+s.vb):(t=(s.va*i.hb+s.vb)/(1-s.va*i.ha),r=i.ha*t+i.hb):i.quasiVertical?(r=(s.ha*i.vb+s.hb)/(1-s.ha*i.va),t=i.va*r+i.vb):(t=(s.hb-i.hb)/(i.ha-s.ha),r=s.ha*t+s.hb),G(t,r)}getAxisXIntersection(){const n=new Pe(0,0,0);return this.intersection(n).cx}getAxisYIntersection(){const n=new Pe(0,0,Math.PI/2);return this.intersection(n).cy}getAxisXIntersecTri(){let n=1/0;if(ne(Ne(this.ca))!==0){const t=new qe(this.cx,this.cy),r=ot(this.ca),s=t.angleOrig(),i=t.distanceOrig();if(ne(i)===0)n=0;else if(ne(Ne(r-s))===0)n=0;else{const o=Math.min(r,Math.PI-r),a=le(r-s),u=Math.min(Math.abs(a),Math.PI-Math.abs(a));n=Math.sign(a)*xi(i,o,u)}}return n}getAxisYIntersecTri(){let n=1/0;if(ne(Ne(this.ca-Math.PI/2))!==0){const t=new qe(this.cx,this.cy),r=Ne(this.ca),s=t.angleOrig(),i=t.distanceOrig(),o=Ne(r-s);if(ne(i)===0)n=0;else if(ne(o)===0)n=0;else{const a=ot(r-Math.PI/2),u=-1*le(r-s),l=Math.min(a,Math.PI-a),c=Math.min(Math.abs(u),Math.PI-Math.abs(u));n=Math.sign(u)*xi(i,l,c)}}return n}angleOrig(){const t=new qe(this.cx,this.cy).angleOrig(),r=Ne(this.ca),s=-1*le(r-t);let i=0;return s<0&&(i=-Math.PI),ot(Math.PI/2+this.ca)+i}distanceOrig(){const n=this.angleOrig(),t=new qe(this.cx,this.cy),r=t.angleOrig(),s=t.distanceOrig(),i=Ne(r-n);return s*Math.cos(i)}projectOrig(){const n=this.angleOrig(),t=this.distanceOrig();return G(0,0).setPolar(n,t)}translate(n,t){return new Pe(this.cx+n,this.cy+t,this.ca)}rotateOrig(n){const t=new qe(this.cx,this.cy).rotateOrig(n);return new Pe(t.cx,t.cy,le(this.ca+n))}scaleOrig(n){const t=new qe(this.cx,this.cy).scaleOrig(n);return new Pe(t.cx,t.cy,this.ca)}rotate(n,t){const r=new qe(this.cx,this.cy).rotate(n,t);return new Pe(r.cx,r.cy,le(this.ca+t))}scale(n,t){const r=new qe(this.cx,this.cy).scale(n,t);return new Pe(r.cx,r.cy,this.ca)}clone(){const n=new qe(this.cx,this.cy);return new Pe(n.cx,n.cy,this.ca)}lineOrthogonal(n){return new Pe(n.cx,n.cy,this.ca+Math.PI/2)}lineParallel(n){return new Pe(n.cx,n.cy,this.ca)}distanceToPoint(n){let t=0;const r=new qe(this.cx,this.cy),s=r.distanceToPoint(n);if(ne(s)!==0){const i=r.angleToPoint(n),o=Ne(i-this.ca);t=s*Math.abs(Math.sin(o))}return t}projectPoint(n){let t=0;const r=new qe(this.cx,this.cy),s=r.distanceToPoint(n);if(ne(s)!==0){const o=r.angleToPoint(n),a=le(o-this.ca);t=s*Math.cos(a)}return r.translatePolar(this.ca,t)}isParallel(n){return ne(Ne(this.ca-n.ca))===0}isOrthogonal(n){return ne(Ne(Math.PI/2+this.ca-n.ca))===0}isEqual(n){const t=G(n.cx,n.cy),r=this.distanceToPoint(t);return ne(r)===0&&this.isParallel(n)}bisector(n,t){const r=this.intersection(n),s=ot(this.ca),i=ot(n.ca),o=Math.min(s,i),a=Math.max(s,i),u=[o,a,o+Math.PI,a+Math.PI,o],l=r.angleToPoint(t);let c=0;for(let x=0;x<4;x++){const y=le(u[x]-l),f=le(u[x+1]-l);if(y===0||f===0)throw`err419: bad reference point for bisecor ${t.cx} ${t.cy}`;y<0&&f>0&&(c=x)}const m=ot((o+a)/2)+c*Math.PI/2;return new Pe(r.cx,r.cy,m)}lineParallelDistance(n,t,r){const s=G(this.cx,this.cy),i=s.translatePolar(this.ca+Math.PI/2,n),o=s.translatePolar(this.ca-Math.PI/2,n);let a=o,u=t;return ne(this.distanceToPoint(u))===0&&(u=r),u.distanceToPoint(i)<u.distanceToPoint(o)&&(a=i),new Pe(a.cx,a.cy,this.ca)}};function Qn(e,n,t){return new v0(e,n,t)}function gn(e,n){return Qn(0,0,0).setFromPoints(e,n)}function Vr(e,n){if(e.isEqual(n))throw`err546: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const t=e.middlePoint(n),r=ot(e.angleToPoint(n)+Math.PI/2);return Qn(t.cx,t.cy,r)}function C0(e,n,t){if(e.isEqual(n)||n.isEqual(t)||e.isEqual(t))throw`err833: no bisector with two same points cx: ${e.cx} cy: ${e.cy}`;const r=Vr(e,n),s=Vr(n,t);return r.intersection(s)}function ze(e){let n=!1;return(e===0||e===1)&&(n=!0),n}function un(e){let n=!1;return(ze(e)||e===6)&&(n=!0),n}function Rn(e){let n=!1;return(e===3||e===4||e===5)&&(n=!0),n}function Mn(e){let n=!1;return(e===2||Rn(e))&&(n=!0),n}var je=class Io{constructor(n,t,r,s,i=!1,o=!1){L(this,"sType");L(this,"px");L(this,"py");L(this,"radius");L(this,"arcLarge");L(this,"arcCcw");this.sType=n,this.px=t,this.py=r,this.radius=s,this.arcLarge=i,this.arcCcw=o}clone(){return new Io(this.sType,this.px,this.py,this.radius,this.arcLarge,this.arcCcw)}},He=class{constructor(e,n,t,r,s,i,o,a=!1){L(this,"sType");L(this,"p1");L(this,"p2");L(this,"pc");L(this,"radius");L(this,"a1");L(this,"a2");L(this,"arcCcw");this.sType=e,this.p1=n,this.p2=t,this.pc=r,this.radius=s,this.a1=i,this.a2=o,this.arcCcw=a}},E0=class{constructor(){L(this,"debugPoints");L(this,"debugLines");L(this,"logMessage");this.debugPoints=[],this.debugLines=[],this.logMessage=""}addPoint(e){this.debugPoints.push(e)}getPoints(){return this.debugPoints}clearPoints(){this.debugPoints=[]}addLine(e){this.debugLines.push(e)}getLines(){return this.debugLines}clearLines(){this.debugLines=[]}addMsg(e){this.logMessage+=e}getMsg(){return this.logMessage}clearMsg(){this.logMessage=""}},Bt=new E0;function Mt(e,n,t){if(t.sType!==1)throw`err202: arcSeg1To2 has unexpected type ${t.sType}`;const r=G(e,n),s=G(t.px,t.py),i=r.distanceToPoint(s)/2;if(r.isEqual(s))throw`err638: no equidistance because identical point ${r.cx} ${s.cy}`;let o=0;if(ne(t.radius-i)===0)o=0;else{if(t.radius<i)throw`err399: radius ${t.radius} smaller than lp1p2h ${i}`;o=zn(t.radius,i)}const a=r.middlePoint(s),u=r.angleToPoint(s)+Math.PI/2,l=a.translatePolar(u,o),c=a.translatePolar(u+Math.PI,o);let h=l;(!t.arcLarge&&!t.arcCcw||t.arcLarge&&t.arcCcw)&&(h=c);const m=h.angleToPoint(r),x=h.angleToPoint(s);return new He(1,r,s,h,t.radius,m,x,t.arcCcw)}function F0(e){let n=yt(e.a2-e.a1);e.arcCcw||(n=2*Math.PI-n);let t=!1;return n>Math.PI&&(t=!0),new je(1,e.p2.cx,e.p2.cy,e.radius,t,e.arcCcw)}function S0(e,n,t){const r=e.p1,s=e.p2,i=t.p1,o=t.p2;if(!s.isEqual(i))throw`err309: makeCorner-prepare p2 and p2b differ px ${s.cx} ${i.cx} py ${s.cy} ${i.cy}`;let a=s.angleToPoint(r);if(e.sType===1){const f=e.arcCcw?1:-1;a=e.a2-f*Math.PI/2}let u=s.angleToPoint(o);if(t.sType===1){const f=t.arcCcw?1:-1;u=t.a1+f*Math.PI/2}const l=u-a;let h=le(l)/2;if(ne(h)===0){const f=ts*.01;if(e.sType===0&&t.sType===1)h=t.arcCcw?f:-f;else if(e.sType===1&&t.sType===0)h=e.arcCcw?f:-f;else if(e.sType===0&&t.sType===0)throw`err402: prepare aPeakHalf too closed to zero ${h}`}const m=a+h,x=s.translatePolar(m,n.radius);return{s1:e,s2:n,s3:t,ra:n.radius,p1:r,p2:s,p3:o,p4:e.pc,p5:t.pc,p6:x,at1:a,at3:u,abi:m,aph:h}}function Hn(e,n,t){if(n.sType!==1)throw`err510: modifRadius with wrong type ${n.sType}`;const r=e>0?1:-1,s=n.arcCcw?1:-1,i=ne(e)===0?1:r*s,o=n.radius+i*t;if(o<=0)throw`err621: modifRadius with negative modified lenght ${o}`;return o}function ns(e,n,t,r){const s=t.translatePolar(e,n),i=t.translatePolar(e+Math.PI,n),o=r.distanceToPoint(s),a=r.distanceToPoint(i);return o<a?s:i}function Di(e,n,t,r,s){const i=e.translatePolar(n-t,r),o=e.translatePolar(n+t,r),a=s.distanceToPoint(i),u=s.distanceToPoint(o);return a<u?-1:1}function er(e,n){const t=n.clone(),r=e.p1.clone(),s=e.p2;if(e.sType!==0)throw`err103: newStrokeFirst unexpected sType ${e.sType}`;const i=gn(r,s).distanceToPoint(t);if(ne(i)!==0)throw`err104: newStrokeFirst new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(ne(le(a-o))!==0)throw`err105: newStrokeFirst new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err106: newStrokeFirst new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=G(0,0);return new He(0,r,t,c,0,0,0,!1)}function tr(e,n){const t=n.clone(),r=e.p2.clone(),s=e.p1;if(e.sType!==0)throw`err203: newStrokeSecond unexpected sType ${e.sType}`;const i=gn(r,s).distanceToPoint(t);if(ne(i)!==0)throw`err204: newStrokeSecond new point not aligned ${i} ${t.cx} ${t.cy}`;const o=r.angleToPoint(s),a=r.angleToPoint(t);if(ne(le(a-o))!==0)throw`err205: newStrokeSecond new point miss aligned ${o} ${a} ${t.cx} ${t.cy}`;const u=r.distanceToPoint(t),l=r.distanceToPoint(s);if(l<u)throw`err206: newStrokeSecond new point out of scope ${l} ${u} ${t.cx} ${t.cy}`;const c=G(0,0);return new He(0,t,r,c,0,0,0,!1)}function nr(e,n){if(e.sType!==1)throw`err203: newArcFirst unexpected sType ${e.sType}`;const t=e.p1.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!Po(i,e.a1,e.a2,e.arcCcw))throw`err908: newArcFirst a48 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new He(1,t,s,r,e.radius,e.a1,i,e.arcCcw)}function rr(e,n){if(e.sType!==1)throw`err204: newArcSecond unexpected sType ${e.sType}`;const t=e.p2.clone(),r=e.pc.clone(),s=n.clone(),i=r.angleToPoint(s);if(!Po(i,e.a1,e.a2,e.arcCcw))throw`err907: newArcSecond a59 out of scope ${i} ${e.a1} ${e.a2} ${e.arcCcw}`;return new He(1,s,t,r,e.radius,i,e.a2,e.arcCcw)}function wn(e,n,t,r,s,i){const o=e.clone(),a=n.clone(),u=t.clone(),l=u.distanceToPoint(o),c=u.distanceToPoint(a);if(ne(l-r)!==0||ne(c-r)!==0)throw`err610: newRounded not on circle ${r} ${l} ${c}`;const h=u.angleToPoint(o),m=u.angleToPoint(a),x=le(h-i+Math.PI),y=le(m-i+Math.PI);Math.abs(y-x)>Math.PI+ts&&Bt.addMsg(`warn882: newRounded a873 or a972 larger than PI/2 ${ut(x)} ${ut(y)} at ${ut(u.cx)} ${ut(u.cy)}
|
|
16
|
-
`);const f=!(s>0);return new He(1,o,a,u,r,h,m,f)}function k0(e){const n=Math.abs(e.ra/Math.sin(e.aph)),t=n*Math.cos(e.aph),r=e.p2.translatePolar(e.abi,n),s=e.p2.translatePolar(e.at1,t),i=e.p2.translatePolar(e.at3,t),o=[];return o.push(er(e.s1,s)),o.push(wn(s,i,r,e.ra,e.aph,e.abi)),o.push(tr(e.s3,i)),o}function T0(e){const t=gn(e.p1,e.p2).lineParallelDistance(e.ra,e.p6,e.p5),r=t.projectPoint(e.p5),s=r.distanceToPoint(e.p5),i=Hn(e.aph,e.s3,e.ra),o=zn(i,s),a=ns(t.ca,o,r,e.p6),u=e.p5.angleToPoint(a),l=e.p5.translatePolar(u,e.s3.radius),c=e.p2.angleFromToPoints(e.p1,a),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p1),y=e.p2.translatePolar(x,m),f=[];return f.push(er(e.s1,y)),f.push(wn(y,l,a,e.ra,e.aph,e.abi)),f.push(rr(e.s3,l)),f}function P0(e){const t=gn(e.p3,e.p2).lineParallelDistance(e.ra,e.p6,e.p4),r=t.projectPoint(e.p4),s=r.distanceToPoint(e.p4),i=Hn(e.aph,e.s1,e.ra),o=zn(i,s),a=ns(t.ca,o,r,e.p6),u=e.p4.angleToPoint(a),l=e.p4.translatePolar(u,e.s1.radius),c=e.p2.angleFromToPoints(e.p3,a),m=Math.abs(e.ra/Math.sin(c))*Math.cos(c),x=e.p2.angleToPoint(e.p3),y=e.p2.translatePolar(x,m),f=[];return f.push(nr(e.s1,l)),f.push(wn(l,y,a,e.ra,e.aph,e.abi)),f.push(tr(e.s3,y)),f}function B0(e){const n=Hn(e.aph,e.s1,e.ra),t=Hn(e.aph,e.s3,e.ra),r=e.p4.distanceToPoint(e.p5),s=e.p4.angleToPoint(e.p5),i=mi(r,n,t),o=Di(e.p4,s,i,n,e.p6),a=s+o*i,u=e.p4.translatePolar(a,n),l=e.p4.translatePolar(a,e.s1.radius),c=Math.PI+s,h=mi(r,t,n),m=Di(e.p5,c,h,t,e.p6),x=c+m*h,y=e.p5.translatePolar(x,t);if(!y.isEqual(u))throw`err909: roundArcArc p7 anf p7b differ ${u.cx} ${y.cx} ${u.cy} ${y.cy} 0`;const f=e.p5.translatePolar(x,e.s3.radius),d=[];return d.push(nr(e.s1,l)),d.push(wn(l,f,u,e.ra,e.aph,e.abi)),d.push(rr(e.s3,f)),d}function Lo(e){const n=e.abi-2*e.aph,t=e.abi+2*e.aph;let r=e.p6.translatePolar(n,e.ra),s=e.p6.translatePolar(t,e.ra);if(e.s1.sType===1){const u=e.p4.angleFromToPoints(e.p2,e.p6),c=e.p4.angleToPoint(e.p2)+2*u;r=e.p4.translatePolar(c,e.s1.radius)}if(e.s3.sType===1){const u=e.p5.angleFromToPoints(e.p2,e.p6),c=e.p5.angleToPoint(e.p2)+2*u;s=e.p5.translatePolar(c,e.s3.radius)}const i=!(e.aph>0),o=new He(1,r,s,e.p6,e.ra,n,t,i),a=[];return e.s1.sType===0?a.push(er(e.s1,r)):e.s1.sType===1&&a.push(nr(e.s1,r)),a.push(o),e.s3.sType===0?a.push(tr(e.s3,s)):e.s3.sType===1&&a.push(rr(e.s3,s)),a}function gi(e,n,t,r){let s=t,i=t;const o=r.p6.angleFromToPoints(r.p2,t);if(Math.abs(o)>Math.PI/2){i=r.p6.translatePolar(r.abi+e*Math.PI/2,r.ra);const a=Qn(i.cx,i.cy,r.abi);if(n.sType===0)s=gn(n.p1,n.p2).intersection(a);else if(n.sType===1){const u=a.projectPoint(n.pc),l=u.distanceToPoint(n.pc);if(l<n.radius){const c=zn(n.radius,l);s=ns(r.abi,c,u,t)}else Bt.addMsg(`warn222: wideAccess not possible on arc ${ut(n.radius)} ${ut(l)} at ${ut(t.cx)} ${ut(t.cy)}
|
|
17
|
-
`),s=t,i=t}}return[s,i]}function M0(e){const n=Lo(e),t=n[1].arcCcw?1:-1,[r,s]=gi(t,e.s1,n[1].p1,e),[i,o]=gi(-t,e.s3,n[1].p2,e),a=[];if(r.isEqual(s))a.push(n[0]);else{e.s1.sType===0?a.push(er(e.s1,r)):e.s1.sType===1&&a.push(nr(e.s1,r));const u=G(0,0),l=new He(0,r,s,u,0,0,0,!1);a.push(l)}if(a.push(wn(s,o,e.p6,e.ra,e.aph,e.abi)),i.isEqual(o))a.push(n[2]);else{const u=G(0,0),l=new He(0,o,i,u,0,0,0,!1);a.push(l),e.s3.sType===0?a.push(tr(e.s3,i)):e.s3.sType===1&&a.push(rr(e.s3,i))}return a}function wi(e,n,t){const r=S0(e,n,t),s=[];if(n.sType===3)if(e.sType===0&&t.sType===0)s.push(...k0(r));else if(e.sType===0&&t.sType===1)s.push(...T0(r));else if(e.sType===1&&t.sType===0)s.push(...P0(r));else if(e.sType===1&&t.sType===1)s.push(...B0(r));else throw`err123: makeCorner unexpected s1s3.sType ${e.sType} ${t.sType}`;else if(n.sType===4)s.push(...Lo(r));else if(n.sType===5)s.push(...M0(r));else throw`err723: makeCorner unexpected s2.sType ${n.sType}`;return s}function it(e){return e.toFixed(4)}function I0(e,n,t,r=""){let s=r;return s===""&&(s="black"),`<circle cx="${it(e)}" cy="${it(n)}" r="${it(t)}" stroke="${s}" stroke-width="1" fill="none" />`}var L0=class{constructor(){L(this,"pathD");this.pathD=""}addStart(e,n){this.pathD=`M ${it(e)} ${it(n)}`}addStroke(e,n){this.pathD+=` L ${it(e)} ${it(n)}`}addArc(e,n,t,r,s){const i=it(t),o=r?1:0,a=s?1:0;this.pathD+=` A ${i} ${i} 0 ${o} ${a} ${it(e)} ${it(n)}`}stringify(e=""){let n=e;return n===""&&(n="black"),`<path d="${this.pathD} Z" stroke="${n}" stroke-width="1" fill="none" />`}};function $0(){return new L0}var O0=class{constructor(){L(this,"svgStr");L(this,"payloadStr");L(this,"groupActive");this.payloadStr="",this.svgStr="",this.groupActive=!1}addHeader(e,n,t,r){const s=`${e} ${t} ${n} ${r}`;this.svgStr=`<svg width="${n}" height="${r}" viewBox="${s}" xmlns="http://www.w3.org/2000/svg">`}addSvgString(e){this.payloadStr+=e}addGroup(e){if(this.groupActive)throw"err321: group must be closed before opening a new one";this.groupActive=!0,this.payloadStr+=`<g id="${e}">`}closeGroup(){if(!this.groupActive)throw"err331: group is not active so can not be closed";this.groupActive=!1,this.payloadStr+="</g>"}closeSvg(){if(this.svgStr==="")throw"err301: no header set for the svg";if(this.groupActive)throw"err311: group is not closed";this.svgStr+=this.payloadStr,this.svgStr+="</svg>"}stringify(){return this.closeSvg(),this.svgStr}};function N0(){return new O0}function Ve(e){return e.toFixed(4)}var rs=class{constructor(e,n,t,r,s,i,o,a){L(this,"arc");L(this,"p1x");L(this,"p1y");L(this,"radius");L(this,"a1");L(this,"a2");L(this,"p2x");L(this,"p2y");this.arc=e,this.p1x=n,this.p1y=t,this.radius=r,this.a1=s,this.a2=i,this.p2x=o,this.p2y=a}};function R0(e,n,t,r){return new rs(!1,e,n,0,0,0,t,r)}function U0(e,n,t,r,s,i){const o=i?r:s,a=i?s:r,u=Le(yt(o)),l=Le(yt(a));return new rs(!0,e,n,t,u,l,0,0)}function V0(e,n,t){return new rs(!1,e,n,t,0,0,0,0)}var q0=class{constructor(){L(this,"dxfStr");this.dxfStr=`0
|
|
18
|
-
SECTION
|
|
19
|
-
2
|
|
20
|
-
ENTITIES
|
|
21
|
-
`}addCircle(e,n,t){this.dxfStr+=`0
|
|
22
|
-
CIRCLE
|
|
23
|
-
8
|
|
24
|
-
PARAMETRIX
|
|
25
|
-
`,this.dxfStr+=`10
|
|
26
|
-
${Ve(e)}
|
|
27
|
-
20
|
|
28
|
-
${Ve(n)}
|
|
29
|
-
40
|
|
30
|
-
${Ve(t)}
|
|
31
|
-
`}addLine(e,n,t,r){this.dxfStr+=`0
|
|
32
|
-
LINE
|
|
33
|
-
8
|
|
34
|
-
PARAMETRIX
|
|
35
|
-
`,this.dxfStr+=`10
|
|
36
|
-
${Ve(e)}
|
|
37
|
-
20
|
|
38
|
-
${Ve(n)}
|
|
39
|
-
11
|
|
40
|
-
${Ve(t)}
|
|
41
|
-
21
|
|
42
|
-
${Ve(r)}
|
|
43
|
-
`}addArc(e,n,t,r,s){this.dxfStr+=`0
|
|
44
|
-
ARC
|
|
45
|
-
8
|
|
46
|
-
PARAMETRIX
|
|
47
|
-
`,this.dxfStr+=`10
|
|
48
|
-
${Ve(e)}
|
|
49
|
-
20
|
|
50
|
-
${Ve(n)}
|
|
51
|
-
40
|
|
52
|
-
${Ve(t)}
|
|
53
|
-
50
|
|
54
|
-
${Ve(r)}
|
|
55
|
-
51
|
|
56
|
-
${Ve(s)}
|
|
57
|
-
`}close(){this.dxfStr+=`0
|
|
58
|
-
ENDSEC
|
|
59
|
-
0
|
|
60
|
-
EOF
|
|
61
|
-
`}stringify(){return this.close(),this.dxfStr}};function j0(){return new q0}function W0(e,n,t){return{circle:!0,cx:e,cy:n,radius:t}}var H0=class{constructor(){L(this,"seg");this.seg=[]}addStart(e,n){this.seg=[];const t={typ:0,px:e,py:n};this.seg.push(t)}addStroke(e,n){const t={typ:1,px:e,py:n};this.seg.push(t)}addArc(e,n,t,r,s){const i={typ:2,px:e,py:n,radius:t,large:r,ccw:s};this.seg.push(i)}toJson(){return{circle:!1,seg:this.seg}}};function Y0(){return new H0}var $o=class{};function Oo(e,n,t,r){const s=Mt(e,n,t),i=G(s.pc.cx,s.pc.cy),o=yt(s.a2-s.a1),u=(t.arcCcw?o:o-2*Math.PI)/r,l=[];for(let c=1;c<r;c++)l.push(i.translatePolar(s.a1+c*u,t.radius));return l}var G0=class kt extends $o{constructor(t,r,s=""){super();L(this,"circle",!1);L(this,"segments");L(this,"points");L(this,"debugPoints");L(this,"debugLines");L(this,"lastPoint");L(this,"lastPoint2");L(this,"imposedColor");this.segments=[new je(6,t,r,0)],this.points=[],this.debugPoints=[],this.debugLines=[],this.lastPoint=G(t,r),this.lastPoint2=G(t,r),this.imposedColor=s}setLastPoint(t,r){this.lastPoint2=this.lastPoint,this.lastPoint=G(t,r)}getLastPoint(){return this.lastPoint}getFirstPoint(){return G(this.segments[0].px,this.segments[0].py)}addPointA(t,r){if(this.points.length>2)throw`err311: contour add too much point ${t} ${r}`;return this.points.push(G(t,r)),this}addPointAP(t,r){const s=G(0,0).translatePolar(t,r);return this.addPointA(s.cx,s.cy),this}addPointR(t,r){const i=this.getLastPoint().translate(t,r);return this.addPointA(i.cx,i.cy),this}addPointRP(t,r){const i=this.getLastPoint().translatePolar(t,r);return this.addPointA(i.cx,i.cy),this}addSeg(t){return this.segments.push(t),this}addSegStroke(){if(this.points.length!==1)throw`err554: contour addSegStroke with unexpected points.length ${this.points.length}`;const t=this.points.pop();if(t!==void 0){const r=new je(0,t.cx,t.cy,0);t.isEqual(this.getLastPoint())||(this.addSeg(r),this.setLastPoint(t.cx,t.cy))}else throw"err284: contour p1 is undefined";return this}addSegStrokeA(t,r){return this.addPointA(t,r).addSegStroke(),this}addSegStrokeAP(t,r){return this.addPointAP(t,r).addSegStroke(),this}addSegStrokeR(t,r){return this.addPointR(t,r).addSegStroke(),this}addSegStrokeRP(t,r){return this.addPointRP(t,r).addSegStroke(),this}addSegArc(t,r,s){if(this.points.length!==1)throw`err954: contour addSegArc with unexpected points.length ${this.points.length}`;const i=this.points.pop();if(i!==void 0){const o=new je(1,i.cx,i.cy,t,r,s);i.isEqual(this.getLastPoint())?console.log(`warn144: addSegArc last and new point identical ${ut(i.cx)} ${ut(i.cy)}`):(this.addSeg(o),this.setLastPoint(i.cx,i.cy))}else throw"err482: contour p1 is undefined";return this}addSegArc2(){if(this.points.length!==2)throw`err958: contour addSegArc2 with unexpected points.length ${this.points.length}`;const t=this.points.pop(),r=this.points.pop();if(r!==void 0&&t!==void 0){const s=this.getLastPoint(),i=C0(s,r,t),o=i.distanceToPoint(s),a=s.middlePoint(t),u=a.angleToPoint(s),l=a.angleToPoint(r),c=le(l-u);let h=!1,m=!1;if(!a.isEqual(i)){const x=a.angleToPoint(i),y=le(x-u);Math.sign(y)*Math.sign(c)>0&&(h=!0)}Math.sign(c)>0&&(m=!0),this.addPointA(t.cx,t.cy).addSegArc(o,h,m),this.debugPoints.push(r)}else throw"err488: contour p1 or p2 or seg is undefined";return this}addSegArc3(t,r){if(this.points.length!==1)throw`err914: contour addSegArc3 with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=Vr(i,s);let a=s;r&&(a=i);const u=Qn(a.cx,a.cy,t+Math.PI/2),l=o.intersection(u),c=l.distanceToPoint(i),h=i.middlePoint(s),m=a.angleToPoint(h),x=le(t-m);let y=!1;Math.abs(x)>Math.PI/2&&(y=!0);let f=!1;x<0&&(f=!0),r||(f=!f),this.addPointA(s.cx,s.cy).addSegArc(c,y,f),this.debugPoints.push(h),this.debugPoints.push(l)}else throw"err282: contour p1 is undefined";return this}addSeg2Arcs(t,r){if(this.points.length!==1)throw`err214: contour addSeg2Arcs with unexpected points.length ${this.points.length}`;const s=this.points.pop();if(s!==void 0){const i=this.getLastPoint(),o=i.distanceToPoint(s),a=i.angleToPoint(s),u=s.angleToPoint(i),l=le(t-a),c=-1*le(r-u);if(Math.abs(l)>=Math.PI/2)throw`err545: addSeg2Arcs with too large au ${l}`;if(Math.abs(c)>=Math.PI/2)throw`err546: addSeg2Arcs with too large av ${c}`;if(ne(l)===0)throw`err765: addSeg2Arcs with almost zero au ${l}`;if(ne(c)===0)throw`err766: addSeg2Arcs with almost zero av ${c}`;if(Math.sign(l)*Math.sign(c)<1)throw`err767: addSeg2Arcs with au/av bad orientation ${l} ${c}`;const h=Math.tan(l/2),m=Math.tan(c/2),x=o*m/(m+h),y=Math.abs(x/Math.sin(l)),f=x/Math.cos(l/2),d=o*h/(m+h),p=Math.abs(d/Math.sin(c)),D=i.translatePolar(a+l/2,f);let g=!1;Math.sign(l)<0&&(g=!0),this.addPointA(D.cx,D.cy).addSegArc(y,!1,g),this.addPointA(s.cx,s.cy).addSegArc(p,!1,g),this.debugPoints.push(i.translatePolar(a,x)),this.debugPoints.push(i.translatePolar(a+l-Math.sign(l)*Math.PI/2,y)),this.debugPoints.push(s.translatePolar(u-c+Math.sign(l)*Math.PI/2,p))}else throw"err182: contour p1 is undefined";return this}addSegStrokeAifBig(t,r,s,i){const o=this.getLastPoint();if(Math.sqrt((t-o.cx)**2+(r-o.cy)**2)>s)this.addPointA(t,r).addSegStroke();else if(i){const u=this.segments[this.segments.length-1],l=this.lastPoint2;if(this.setLastPoint(l.cx,l.cy),u.sType===0)this.segments.pop(),this.addPointA(t,r).addSegStroke();else if(u.sType===1)this.segments.pop(),this.addPointA(t,r).addSegArc(u.radius,u.arcLarge,u.arcCcw);else throw`err186: addSegStrokeA-ifBig used after eStart or eCorner ${u.sType} at segment ${this.segments.length}`}return this}addCornerPointed(){const t=new je(2,0,0,0);return this.addSeg(t),this}addCornerRounded(t){const r=new je(3,0,0,t);return this.addSeg(r),this}addCornerWidened(t){const r=new je(4,0,0,t);return this.addSeg(r),this}addCornerWideAcc(t){const r=new je(5,0,0,t);return this.addSeg(r),this}closeSegStroke(){const t=this.segments[0].px,r=this.segments[0].py;return this.addSegStrokeA(t,r),this}closeSegArc(t,r,s){const i=this.segments[0].px,o=this.segments[0].py;return this.addPointA(i,o).addSegArc(t,r,s),this}clone(){const t=new kt(this.segments[0].px,this.segments[0].py);for(const r of this.segments){const s=r.clone();s.sType!==6&&(t.addSeg(s),ze(s.sType)&&t.setLastPoint(s.px,s.py))}return t}translate(t,r){const s=this.segments[0].px+t,i=this.segments[0].py+r,o=new kt(s,i);for(const a of this.segments){const u=a.clone();ze(a.sType)&&(u.px+=t,u.py+=r),u.sType!==6&&(o.addSeg(u),ze(u.sType)&&o.setLastPoint(u.px,u.py))}return o}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=G(t,r),a=G(this.segments[0].px,this.segments[0].py).rotate(i,s),u=new kt(a.cx,a.cy);for(const l of this.segments){const c=l.clone();if(ze(l.sType)){const m=G(c.px,c.py).rotate(i,s);c.px=m.cx,c.py=m.cy}c.sType!==6&&(u.addSeg(c),ze(c.sType)&&u.setLastPoint(c.px,c.py))}return u}scale(t,r,s,i=!1){const o=G(t,r),u=G(this.segments[0].px,this.segments[0].py).scale(o,s),l=new kt(u.cx,u.cy);for(const c of this.segments){const h=c.clone();if(ze(c.sType)){const x=G(h.px,h.py).scale(o,s);h.px=x.cx,h.py=x.cy}c.sType===1&&(h.radius*=s),Rn(c.sType)&&i&&(h.radius*=s),h.sType!==6&&(l.addSeg(h),ze(h.sType)&&l.setLastPoint(h.px,h.py))}return l}addPartial(t){if(this.points.length>0)throw`err911: addPartial, points should be used ${this.points.length}`;let r=t;if(t.segments.length>0){const s=t.segments[0],i=this.getLastPoint(),o=s.px-i.cx,a=s.py-i.cy;s.sType===6&&(r=t.translate(-o,-a))}for(const s of r.segments)s.sType!==6&&(this.addSeg(s),ze(s.sType)&&this.setLastPoint(s.px,s.py));return this}draw(t,r,s=de.contour){const i=this.imposedColor===""?s:this.imposedColor;let o=0,a=0;for(const u of this.segments){if(u.sType===0){const[l,c]=qt(o,a,r),[h,m]=qt(u.px,u.py,r);t.beginPath(),t.moveTo(l,c),t.lineTo(h,m),t.strokeStyle=i,t.stroke()}if(u.sType===1)try{const l=Mt(o,a,u),[c,h]=qt(l.pc.cx,l.pc.cy,r),m=Bo(u.radius,r);t.beginPath(),t.arc(c,h,m,-l.a1,-l.a2,u.arcCcw),t.strokeStyle=i,t.stroke()}catch(l){console.log("err413: "+l)}un(u.sType)&&(o=u.px,a=u.py)}}extractSkeleton(){const t=this.segments[0],r=new kt(t.px,t.py);for(const s of this.segments)ze(s.sType)&&r.addSeg(s);return r}generateContour(){Bt.clearPoints(),Bt.clearLines();const t=[],r=[];let s=0,i=0,o=0;for(const c of this.segments){if(c.sType===0){const x=G(i,o),y=G(c.px,c.py),f=G(0,0);t.push(new He(c.sType,x,y,f,0,0,0,!1)),s=1}if(c.sType===1){const x=Mt(i,o,c);t.push(x),s=1}const h=t.at(-1),m=t.at(-2);if(h!==void 0&&m!==void 0&&ze(h.sType)&&Mn(m.sType)){const x=t.pop(),y=t.pop(),f=t.pop();if(f!==void 0&&y!==void 0&&x!==void 0){const d=wi(f,y,x);t.push(...d)}else throw"err603: contour generateContour internal error"}if(Mn(c.sType)){if(s===2)throw`err419: generateContour with two consecutive corners ${c.sType}`;if(s===0&&Rn(c.sType)&&c.radius>0){const x=G(0,0);r.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}if(s===1&&Rn(c.sType)&&c.radius>0){const x=G(0,0);t.push(new He(c.sType,x,x,x,c.radius,0,0,!1))}s=2}un(c.sType)&&(i=c.px,o=c.py)}if(r.length>0)if(s===1)t.push(...r);else throw"err397: contour generateContour Corners defined at end and begining";const a=t.at(-1);if(a!==void 0&&Mn(a.sType)){const c=t[0],h=t.pop(),m=t.pop();if(m!==void 0&&h!==void 0&&c!==void 0){const x=wi(m,h,c);t.push(...x.slice(0,-1));const y=x.at(-1);if(y!==void 0)t[0]=y;else throw"err606: contour generateContour internal error"}else throw"err602: contour generateContour internal error"}const u=t[0],l=new kt(u.p1.cx,u.p1.cy,this.imposedColor);l.debugPoints.push(...Bt.getPoints()),l.debugLines.push(...Bt.getLines());for(const c of t)if(c.sType===0)l.addSegStrokeA(c.p2.cx,c.p2.cy);else if(c.sType===1){const h=F0(c);l.addPointA(c.p2.cx,c.p2.cy).addSegArc(h.radius,h.arcLarge,h.arcCcw)}else throw`err986: contour generateContour unexpected in seg2 Enum ${c.sType}`;return l}generatePoints(t){const r=[];let s=0,i=0;for(const o of this.segments){if(o.sType===1)try{const a=Oo(s,i,o,t);r.push(...a)}catch(a){console.log("err453: "+a)}un(o.sType)&&(s=o.px,i=o.py,r.push(G(s,i)))}return r}getOrientation(t,r,s){const o=t.slice(1);let a=0,u=o.at(-3),l=o.at(-2),c=o.at(-1),h=-1;for(const[x,y]of o.entries()){u=l,l=c,c=y;const f=s?l.cx>r-.001:l.cx<r+.001,d=s?u.cx>r-.001:u.cx<r+.001;if(f&&!d){const p=u.cx-l.cx,D=u.cy-l.cy,g=c.cx-l.cx,_=c.cy-l.cy,w=g*D-_*p;a=Math.sign(w),h=x}}if(a===0)throw`err299: Orientation not found with ${o.length} points and foundIdx ${h}`;return a>0}getEnvelop(){const t=this.generatePoints(24),r=[],s=[];for(const h of t)r.push(h.cx),s.push(h.cy);const i=Math.min(...r),o=Math.max(...r),a=Math.min(...s),u=Math.max(...s),l=this.getOrientation(t,i,!1),c=this.getOrientation(t,o,!0);if(c!==l)throw`err390: orientation unstable ${l} ${c} with ${t.length} points`;return{xMin:i,xMax:o,yMin:a,yMax:u,orientation:l}}generateLines(){const t=[];return t.push(...this.debugLines),t}checkContour(t){if(t.segments[0].sType!==6)throw`err412: contour check first seg is not eStart ${t.segments[0].sType}`;let r=0,s=0;for(const a of t.segments){if(a.sType===1)try{Mt(r,s,a)}catch(u){throw`err778: ${u}`}un(a.sType)&&(r=a.px,s=a.py)}const i=t.segments[0].px,o=t.segments[0].py;if(ne(r-i)!==0||ne(s-o)!==0)throw`err414: contour check, contour is not closed px ${i} ${r} py ${i} ${o}`}check(){Bt.clearMsg(),this.checkContour(this);const t=this.generateContour();return this.checkContour(t),Bt.getMsg()}toSvg(t,r=""){const s=$0();for(const o of this.segments)o.sType===6?s.addStart(o.px,t-o.py):o.sType===0?s.addStroke(o.px,t-o.py):o.sType===1?s.addArc(o.px,t-o.py,o.radius,o.arcLarge,!o.arcCcw):console.log(`err631: contour.toSvg has unknown segment type ${o.sType}`);return s.stringify(r)}toDxfSeg(){const t=[];let r=0,s=0;for(const i of this.segments){if(i.sType===0)t.push(R0(r,s,i.px,i.py));else if(i.sType===1)try{const o=Mt(r,s,i);t.push(U0(o.pc.cx,o.pc.cy,i.radius,o.a1,o.a2,o.arcCcw))}catch(o){console.log("err413: "+o)}un(i.sType)&&(r=i.px,s=i.py)}return t}toPax(){const t=Y0();for(const s of this.segments)s.sType===6?t.addStart(s.px,s.py):s.sType===0?t.addStroke(s.px,s.py):s.sType===1?t.addArc(s.px,s.py,s.radius,s.arcLarge,s.arcCcw):console.log(`err709: contour.toPax has unknown segment type ${s.sType}`);return t.toJson()}getPerimeter(){let t=0;const r=this.generateContour();let s=0,i=0;for(const o of r.segments)if(o.sType===6)s=o.px,i=o.py;else if(o.sType===0){const a=Math.sqrt((o.px-s)**2+(o.py-i)**2);s=o.px,i=o.py,t+=a}else if(o.sType===1){const a=Mt(s,i,o),u=yt(a.a2-a.a1),l=a.arcCcw?u:yt(2*Math.PI-u),c=o.radius*l;s=o.px,i=o.py,t+=c}else console.log(`err760: contour.getPerimeter has unknown segment type ${o.sType}`);return t}generateRevertOrientation(){let t=this.segments[0];const r=new kt(t.px,t.py);let s=this.segments[0],i=!1;for(const o of this.segments.slice().reverse())if(Mn(o.sType))i=!0,t=o;else{if(s.sType!==6){const a=new je(s.sType,o.px,o.py,s.radius,s.arcLarge,!s.arcCcw);r.addSeg(a)}s=o,i&&(r.addSeg(t),i=!1)}return r}},Z0=class Ut extends $o{constructor(t,r,s,i=""){super();L(this,"circle",!0);L(this,"px");L(this,"py");L(this,"radius");L(this,"imposedColor");if(this.px=t,this.py=r,this.radius=s,this.imposedColor=i,s<0)throw`err432: iRadius ${s} is negative at circle ix ${t}, iy ${r}`}clone(){return new Ut(this.px,this.py,this.radius,this.imposedColor)}translate(t,r){return new Ut(this.px+t,this.py+r,this.radius,this.imposedColor)}translatePolar(t,r){return this.translate(r*Math.cos(t),r*Math.sin(t))}rotate(t,r,s){const i=G(t,r),o=G(this.px,this.py).rotate(i,s);return new Ut(o.cx,o.cy,this.radius,this.imposedColor)}draw(t,r,s=de.contour){const[i,o]=qt(this.px,this.py,r),a=Bo(this.radius,r),u=this.imposedColor===""?s:this.imposedColor;t.beginPath(),t.arc(i,o,a,0,2*Math.PI,!0),t.strokeStyle=u,t.stroke()}extractSkeleton(){return new Ut(this.px,this.py,this.radius)}generateContour(){return new Ut(this.px,this.py,this.radius,this.imposedColor)}generatePoints(t){const r=[],s=G(this.px,this.py),i=t*2;r.push(s);for(let o=0;o<i;o++){const a=s.translatePolar(o*2*Math.PI/i,this.radius);r.push(a)}return r}getEnvelop(){return{xMin:this.px-this.radius,xMax:this.px+this.radius,yMin:this.py-this.radius,yMax:this.py+this.radius,orientation:!0}}generateLines(){return[]}check(){return""}toSvg(t,r=""){return I0(this.px,t-this.py,this.radius,r)}toDxfSeg(){const t=[];return t.push(V0(this.px,this.py,this.radius)),t}toPax(){return W0(this.px,this.py,this.radius)}getPerimeter(){return 2*Math.PI*this.radius}generateRevertOrientation(){return new Ut(this.px,this.py,this.radius,this.imposedColor)}};function X0(e,n,t=""){return new G0(e,n,t)}function ql(e,n,t,r=""){return new Z0(e,n,t,r)}var K0=class qr{constructor(){L(this,"pointList");L(this,"lineList");L(this,"vectorList");L(this,"mainList");L(this,"mainBList");L(this,"secondList");L(this,"secondBList");L(this,"dynamicsList");L(this,"xMin");L(this,"xMax");L(this,"yMin");L(this,"yMax");this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[],this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addPoint(n){this.pointList.push(n)}addPoints(n){this.pointList.push(...n)}addLine(n){this.lineList.push(n)}addLines(n){for(const t of n)this.lineList.push(t)}addVector(n){this.vectorList.push(n)}addMainOI(n){const t=[];for(const r of n){const s=r.generateContour();this.addPoints(s.generatePoints(2)),this.addLines(s.generateLines()),t.push(s),this.mainBList.push(r.extractSkeleton())}this.mainList.push(t)}addMainO(n){const t=[n];this.addMainOI(t)}addSecond(n){const t=n.generateContour();this.addPoints(t.generatePoints(2)),this.addLines(t.generateLines()),this.secondList.push(t),this.secondBList.push(n.extractSkeleton())}addDynamics(n){this.addPoints(n.generatePoints(2)),this.addLines(n.generateLines()),this.dynamicsList.push(n)}translate(n,t){const r=new qr;for(const s of this.pointList)r.addPoint(s.translate(n,t));for(const s of this.lineList)r.addLine(s.translate(n,t));for(const s of this.vectorList)r.addVector(s.translate(n,t));for(const s of this.mainList){const i=[];for(const o of s)i.push(o.translate(n,t));r.addMainOI(i)}for(const s of this.secondList)r.addSecond(s.translate(n,t));for(const s of this.dynamicsList)r.addDynamics(s.translate(n,t));return r}translatePolar(n,t){return this.translate(t*Math.cos(n),t*Math.sin(n))}rotate(n,t,r){const s=new qr,i=G(n,t);for(const o of this.pointList)s.addPoint(o.rotate(i,r));for(const o of this.lineList)s.addLine(o.rotate(i,r));for(const o of this.vectorList)s.addVector(o.rotate(i,r));for(const o of this.mainList){const a=[];for(const u of o)a.push(u.rotate(n,t,r));s.addMainOI(a)}for(const o of this.secondList)s.addSecond(o.rotate(n,t,r));for(const o of this.dynamicsList)s.addDynamics(o.rotate(n,t,r));return s}mergeFigure(n,t=!1){for(const r of n.pointList)this.addPoint(r.clone());for(const r of n.lineList)this.addLine(r.clone());for(const r of n.vectorList)this.addVector(r.clone());for(const r of n.mainList){const s=[];for(const i of r)s.push(i.clone());if(t)for(const i of s)this.addSecond(i);else this.addMainOI(s)}for(const r of n.secondList)this.addSecond(r.clone());for(const r of n.dynamicsList)this.addDynamics(r.clone())}mainListC(){const n=[];for(const t of this.mainList)for(const r of t)n.push(r);return n}clear(){this.pointList=[],this.lineList=[],this.vectorList=[],this.mainList=[],this.mainBList=[],this.secondList=[],this.secondBList=[],this.dynamicsList=[]}getMinMax(){[this.xMin,this.xMax,this.yMin,this.yMax]=Mo(this.pointList)}getAdjustFull(n,t){let r=Rr();return this.pointList.length>0&&(this.getMinMax(),r=Ur(this.xMin,this.xMax,this.yMin,this.yMax,n,t)),r}getAdjustZoom(n,t){let r=Rr();if(this.pointList.length>0){this.getMinMax();const s=(this.xMin+this.xMax)/2,i=(this.yMin+this.yMax)/2;r=Ur(s,this.xMax,i,this.yMax,n,t)}return r}quantifyRuler(n,t){const s=n/10/t.scaleX;let i=1e-4;for(;i<s;)i*=10;i/5>s?i/=5:i/2>s&&(i/=2);const o=i*t.scaleX;return[i,o]}drawRuler(n,t,r){const[s,i]=this.quantifyRuler(n.canvas.width,t),o=n.canvas.width-10-i;n.font="15px Arial",n.fillStyle=r,n.fillText(`${s.toFixed(4)}`,o,20),n.beginPath(),n.moveTo(o,25),n.lineTo(o+i,25),n.lineTo(o+i,25+i),n.strokeStyle=r,n.stroke()}draw(n,t,r){if(r.points)for(const s of this.pointList)s.draw(n,t);if(r.lines)for(const s of this.lineList)s.draw(n,t);if(r.vectors)for(const s of this.vectorList)s.draw(n,t);if(r.main)for(const s of this.mainList)for(const[i,o]of s.entries()){let a=de.mainOuter;i>0&&(a=de.mainInner),o.draw(n,t,a)}if(r.mainB)for(const s of this.mainBList)s.draw(n,t,de.mainB);if(r.second)for(const s of this.secondList)s.draw(n,t,de.second);if(r.secondB)for(const s of this.secondBList)s.draw(n,t,de.secondB);if(r.dynamics)for(const s of this.dynamicsList)s.draw(n,t,de.dynamics);if(r.ruler&&this.drawRuler(n,t,de.ruler),r.refframe){for(const s of[10,100,200])G(s,0).draw(n,t,de.reference,2),G(-s,0).draw(n,t,de.reference,2),G(0,s).draw(n,t,de.reference,2),G(0,-s).draw(n,t,de.reference,2);G(0,0).draw(n,t,de.origin,2)}}};function J0(){return new K0}function jr(e){const n=J0();for(const t in e){const r=e[t];for(const s of r.pointList)n.pointList.push(s);for(const s of r.lineList)n.lineList.push(s);for(const s of r.vectorList)n.vectorList.push(s);for(const s of r.mainList)n.mainList.push(s);for(const s of r.mainBList)n.mainBList.push(s);for(const s of r.secondList)n.secondList.push(s);for(const s of r.secondBList)n.secondBList.push(s);for(const s of r.dynamicsList)n.dynamicsList.push(s)}return n}function jl(){return{points:!1,lines:!1,vectors:!1,main:!0,mainB:!1,second:!0,secondB:!1,dynamics:!1,ruler:!0,refframe:!1}}function Wl(e){return{points:e.points,lines:e.lines,vectors:e.vectors,main:e.main,mainB:e.mainB,second:e.second,secondB:e.secondB,dynamics:e.dynamics,ruler:e.ruler,refframe:e.refframe}}var z0=(e=>(e[e.eNumber=0]="eNumber",e[e.eCheckbox=1]="eCheckbox",e[e.eDropdown=2]="eDropdown",e[e.eSectionSeparator=3]="eSectionSeparator",e))(z0||{}),zt={partName:"",params:[],paramSvg:{},sim:{tMax:0,tStep:0,tUpdate:0}};function Hl(e){const n={};for(const t of Object.keys(e))n[t]=e[t].val;return n}function Yl(e,n,t,r=0,s=100,i=1){return{name:e,unit:n,init:t,min:r,max:s,step:i,dropdown:[],pType:0}}function Gl(e){return{name:e,unit:"section-separator",init:0,min:0,max:0,step:0,dropdown:[],pType:3}}var Q0=(e=>(e[e.eLinearOrtho=0]="eLinearOrtho",e[e.eRotate=1]="eRotate",e))(Q0||{}),el=(e=>(e[e.eIdentity=0]="eIdentity",e[e.eIntersection=1]="eIntersection",e[e.eUnion=2]="eUnion",e[e.eSubstraction=3]="eSubstraction",e))(el||{});function Zl(e){return{partName:e,calcErr:!0,logstr:"",fig:{},vol:{extrudes:[],volumes:[]},sub:{}}}var tl=class{figureToPaxF(e){const n=[];for(const t of e){const r=[];for(const s of t)r.push(s.toPax());n.push(r)}return n}getFigures(e){const n={};for(const t in e){const r=this.figureToPaxF(e[t].mainList);n[t]=r}return n}getPaxJson(e,n,t){return{partName:n.partName,pDef:t,params:e,figures:this.getFigures(n.fig),volume:n.vol,subs:n.sub,log:n.logstr}}getPaxStr(e,n,t){const r=this.getPaxJson(e,n,t);return JSON.stringify(r,null,2)}};function Wt(){return new tl}function ss(e){let n=6;return e===1?n=0:e===2&&(n=1),n}function nl(e){return new je(ss(e.typ),e.px,e.py,e.radius,e.large,e.ccw)}function No(e,n,t,r){let s=Math.PI/2;n<2*t&&(s=2*Math.asin(n/(2*t)));const i=Math.min(e,s),o=Math.ceil(r/i),a=r/o;return[o,a]}function Ro(e,n,t,r=Math.PI/6,s=2){const[i,o]=No(r,s,t,2*Math.PI),a=[];for(let c=0;c<i;c++){const h=e+t*Math.cos(c*o),m=n+t*Math.sin(c*o);a.push([h,m])}const u=a[0][0],l=a[0][1];return a.push([u,l]),a}function Uo(e,n,t,r,s,i,o=Math.PI/6,a=2){const u=Nr(r,s,i),[l,c]=No(o,a,t,Math.abs(u)),h=i?c:-c,m=l+1,x=[];for(let y=1;y<m;y++){const f=r+y*h,d=e+t*Math.cos(f),p=n+t*Math.sin(f);x.push([d,p])}return x}var Vo=Math.PI/16,qo=2;function yi(e){return e.toFixed(4)}function bi(e){return e.toString().padStart(3,"0")}function _i(e,n){return[[e,n]]}function rl(e,n,t,r,s,i){return Uo(e,n,t,r,s,i,Vo,qo)}function sl(e,n,t){return Ro(e,n,t,Vo,qo)}function il(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(..._i(s.px,s.py));else if(s.typ===1)n.push(..._i(s.px,s.py));else if(s.typ===2)try{const i=s,o=new je(ss(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Mt(t,r,o);n.push(...rl(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}t=s.px,r=s.py}return n}var ol=class{constructor(){L(this,"pts");L(this,"ptIdx");L(this,"idx");this.pts=[],this.ptIdx=[],this.idx=0}addContour(e){const n=[],t=[];for(const i of e){const[o,a]=i;n.push(`[ ${yi(o)}, ${yi(a)} ]`),t.push(` ${this.idx}`),this.idx+=1}const r=`[ ${n.join(",")} ]`,s=`[ ${t.join(",")} ]`;this.pts.push(r),this.ptIdx.push(s)}getFigure(e){let n="";const t=[],r=[];for(const o of this.pts.keys()){const a=`ca_${e}_${bi(o)}`,u=`cb_${e}_${bi(o)}`;n+=`${a} = ${this.pts[o]};
|
|
62
|
-
`,n+=`${u} = ${this.ptIdx[o]};
|
|
63
|
-
`,t.push(a),r.push(u)}const s=t.join(", "),i=r.join(", ");return n+=`a_${e} = concat(${s});
|
|
64
|
-
`,n+=`b_${e} = [${i}];
|
|
65
|
-
`,n}},al=class{getHeader(){return`// Generated by Parametrix
|
|
66
|
-
`}getOneFigure(e,n){const t=new ol;for(const s of e)for(const i of s)if(i.circle===!0){const o=i,a=sl(o.cx,o.cy,o.radius);t.addContour(a)}else{const a=il(i.seg);t.addContour(a)}return t.getFigure(n)}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`${n}_${r}`);t+=s}return t}getOneExtrude(e){let n="rotate_extrude",t="";return e.extrudeMethod===0&&(e.length===void 0&&console.log("err103: design error: scad-linear_extrude length undefined!"),n="linear_extrude",t=`height = ${e.length}`),`
|
|
67
|
-
module ${e.outName} () {
|
|
68
|
-
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]} ])
|
|
69
|
-
rotate( [ ${Le(e.rotate[0])}, ${Le(e.rotate[1])}, ${Le(e.rotate[2])} ])
|
|
70
|
-
${n}(${t}) polygon(a_${e.face}, b_${e.face});
|
|
71
|
-
}
|
|
72
|
-
`}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="identity";switch(e.boolMethod){case 1:n="intersection";break;case 2:n="union";break;case 3:n="difference";break}const t=[];for(const i of e.inList)t.push(`${i}();`);const r=t.join(`
|
|
73
|
-
`);let s=`
|
|
74
|
-
module ${e.outName} () {
|
|
75
|
-
${n} () {
|
|
76
|
-
${r}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
`;return e.boolMethod===0&&(s=`
|
|
80
|
-
module ${e.outName} () {
|
|
81
|
-
${r}
|
|
82
|
-
}
|
|
83
|
-
`),s}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`
|
|
84
|
-
module ${e.outName} () {
|
|
85
|
-
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]} ])
|
|
86
|
-
rotate( [ ${Le(e.rotate[0])}, ${Le(e.rotate[1])}, ${Le(e.rotate[2])} ])
|
|
87
|
-
${e.subdesign}();
|
|
88
|
-
}
|
|
89
|
-
`}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=Wt().getPaxJson({},r,zt);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
|
|
90
|
-
pax_${e}();
|
|
91
|
-
`}getExportFile(e){let n=this.getHeader();return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function ul(){return new al}var jo=Math.PI/16,Wo=2;function Ai(e){return e.toFixed(4)}function vi(e){return e.toString().padStart(3,"0")}function Ci(e,n){return[[e,n]]}function cl(e,n,t,r,s,i){return Uo(e,n,t,r,s,i,jo,Wo)}function ll(e){const n=[];let t=0,r=0;for(const s of e){if(s.typ===0)n.push(...Ci(s.px,s.py));else if(s.typ===1)n.push(...Ci(s.px,s.py));else if(s.typ===2)try{const i=s,o=new je(ss(i.typ),i.px,i.py,i.radius,i.large,i.ccw),a=Mt(t,r,o);n.push(...cl(a.pc.cx,a.pc.cy,o.radius,a.a1,a.a2,a.arcCcw))}catch(i){console.log("err730: "+i)}t=s.px,r=s.py}return n}function fl(e,n,t){return Ro(e,n,t,jo,Wo)}function Ho(e,n){const t=[];for(const i of e){const[o,a]=i;t.push(`[ ${Ai(o)}, ${Ai(a)} ]`)}const r=`[ ${t.join(`,
|
|
92
|
-
`)} ]`;return`const ${n} = polygon({ points: ${r} });
|
|
93
|
-
|
|
94
|
-
`}function dl(e,n,t,r){const s=fl(e,n,t);return Ho(s,r)}function pl(e,n){const t=ll(e);return Ho(t,n)}function hl(e,n){let t="";const r=e[0];return e.slice(1).length>0?t+=`${n} = subtract( ${e.join(", ")} );
|
|
95
|
-
`:t+=`${n} = ${r};
|
|
96
|
-
`,t}function ml(e,n){let t="";const r=e[0];return e.slice(1).length>0?t+=`${n} = union( ${e.join(", ")} );
|
|
97
|
-
`:t+=`${n} = ${r};
|
|
98
|
-
`,t}var xl=class{getHeader(){return`// Generated by Parametrix
|
|
99
|
-
|
|
100
|
-
const { polygon } = require('@jscad/modeling').primitives;
|
|
101
|
-
//const { subtract } = require('@jscad/modeling').booleans;
|
|
102
|
-
//const { union, intersect, scission, subtract } = require('@jscad/modeling').booleans;
|
|
103
|
-
const { union, intersect, subtract } = require('@jscad/modeling').booleans;
|
|
104
|
-
const { extrudeLinear, extrudeRotate } = require('@jscad/modeling').extrusions;
|
|
105
|
-
const { translate, rotate } = require('@jscad/modeling').transforms;
|
|
106
|
-
|
|
107
|
-
const main = () => {
|
|
108
|
-
|
|
109
|
-
`}getOneFigure(e,n){let t="";const r=[];for(const[s,i]of e.entries()){const o=`face_${n}_Fa${vi(s)}`,a=[];for(const[u,l]of i.entries()){const c=`ctr_${o}_Ctr${vi(u)}`;if(l.circle===!0){const h=l;t+=dl(h.cx,h.cy,h.radius,c)}else t+=pl(l.seg,c);a.push(c)}t+=hl(a,o),r.push(o)}return t+=ml(r,n),t}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`fig_${n}_${r}`);t+=s}return t}getOneExtrude(e){let n="extrudeRotate",t="{segments: 32}";return e.extrudeMethod===0&&(e.length===void 0&&console.log("err079: design error: extrudeLinear length undefined!"),n="extrudeLinear",t=`{height: ${e.length}}`),`
|
|
110
|
-
const ${e.outName} =
|
|
111
|
-
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]}, ],
|
|
112
|
-
rotate( [ ${e.rotate[0]}, ${e.rotate[1]}, ${e.rotate[2]}, ],
|
|
113
|
-
${n}( ${t}, fig_${e.face} )
|
|
114
|
-
)
|
|
115
|
-
);
|
|
116
|
-
|
|
117
|
-
`}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="identity";switch(e.boolMethod){case 1:n="intersect";break;case 2:n="union";break;case 3:n="subtract";break}const t=e.inList.join(", ");let r=`const ${e.outName} = ${n}( ${t} );
|
|
118
|
-
`;return e.boolMethod===0&&(r=`const ${e.outName} = ${e.inList[0]};
|
|
119
|
-
`),r}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`
|
|
120
|
-
const ${e.outName} =
|
|
121
|
-
translate( [ ${e.translate[0]}, ${e.translate[1]}, ${e.translate[2]}, ],
|
|
122
|
-
rotate( [ ${e.rotate[0]}, ${e.rotate[1]}, ${e.rotate[2]}, ],
|
|
123
|
-
${e.subdesign}
|
|
124
|
-
)
|
|
125
|
-
);
|
|
126
|
-
`}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=Wt().getPaxJson({},r,zt);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
|
|
127
|
-
return pax_${e};
|
|
128
|
-
}
|
|
129
|
-
module.exports = { main };
|
|
130
|
-
`}getExportFile(e){let n=this.getHeader();return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function Dl(){return new xl}function ce(e){return e.toFixed(4)}function _e(e){return e.toString().padStart(3,"0")}function gl(e,n,t,r){return`def ${r}():
|
|
131
|
-
# Radius, XYZ-position, orientation
|
|
132
|
-
aCircle = Part.makeCircle(${ce(t)}, App.Vector(${ce(e)}, ${ce(n)}, 0), App.Vector(0, 0, 1))
|
|
133
|
-
aWire = Part.Wire(aCircle)
|
|
134
|
-
rFace = Part.Face(aWire)
|
|
135
|
-
return rFace
|
|
136
|
-
|
|
137
|
-
`}function wl(e,n){let t=`def ${n}():
|
|
138
|
-
`,r=0,s=0,i=0,o=0,a=0;for(const[l,c]of e.entries()){if(c.typ===0)t+=` P${_e(i)} = App.Vector(${ce(c.px)}, ${ce(c.py)}, 0)
|
|
139
|
-
`,i+=1;else if(c.typ===1)t+=` P${_e(i)} = App.Vector(${ce(c.px)}, ${ce(c.py)}, 0)
|
|
140
|
-
`,l<e.length-1?o=i:o=0,t+=` S${_e(a)} = Part.LineSegment(P${_e(i-1)}, P${_e(o)})
|
|
141
|
-
`,i+=1,a+=1;else if(c.typ===2){try{const h=nl(c),m=Oo(r,s,h,2)[0];t+=` P${_e(i)} = App.Vector(${ce(m.cx)}, ${ce(m.cy)}, 0)
|
|
142
|
-
`,i+=1}catch(h){console.log("err730: "+h)}t+=` P${_e(i)} = App.Vector(${ce(c.px)}, ${ce(c.py)}, 0)
|
|
143
|
-
`,l<e.length-1?o=i:o=0,t+=` S${_e(a)} = Part.Arc(P${_e(i-2)}, P${_e(i-1)}, P${_e(o)})
|
|
144
|
-
`,i+=1,a+=1}r=c.px,s=c.py}const u=Array.from({length:a},(l,c)=>`S${_e(c)}`);return t+=` aShape = Part.Shape([${u.join(", ")}])
|
|
145
|
-
aWire = Part.Wire(aShape.Edges)
|
|
146
|
-
subFace = Part.Face(aWire)
|
|
147
|
-
subFace.check()
|
|
148
|
-
return subFace
|
|
149
|
-
|
|
150
|
-
`,t}function yl(e,n){let t=`def ${n}():
|
|
151
|
-
`;const r=[];for(const[o,a]of e.entries()){const u=`FC${_e(o)}`;t+=` ${u} = ${a}()
|
|
152
|
-
`,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?t+=` rOneFace = ${s}.cut([${i.join(", ")}])
|
|
153
|
-
`:t+=` rOneFace = ${s}
|
|
154
|
-
`,t+=` rOneFace.check()
|
|
155
|
-
return rOneFace
|
|
156
|
-
|
|
157
|
-
`,t}function bl(e,n){let t=`def ${n}():
|
|
158
|
-
`;const r=[];for(const[o,a]of e.entries()){const u=`FA${_e(o)}`;t+=` ${u} = ${a}()
|
|
159
|
-
`,r.push(u)}const s=r[0],i=r.slice(1);return i.length>0?t+=` rOneFig = ${s}.fuse([${i.join(", ")}])
|
|
160
|
-
`:t+=` rOneFig = ${s}
|
|
161
|
-
`,t+=` rOneFig.check()
|
|
162
|
-
return rOneFig
|
|
163
|
-
|
|
164
|
-
`,t}var _l=class{getHeader(e){return`# freecad-python generated by Parametrix
|
|
165
|
-
# run the script with:
|
|
166
|
-
# freecad.cmd myScript.py
|
|
167
|
-
|
|
168
|
-
import FreeCAD as App
|
|
169
|
-
import Part
|
|
170
|
-
|
|
171
|
-
#print(sys.argv)
|
|
172
|
-
outFileName = "${e}"
|
|
173
|
-
if (len(sys.argv) == 3):
|
|
174
|
-
outFileName = sys.argv[2]
|
|
175
|
-
print(f"outFileName: {outFileName}")
|
|
176
|
-
|
|
177
|
-
`}getOneFigure(e,n){let t="";const r=[];for(const[s,i]of e.entries()){const o=`face_${n}_Fa${s}`,a=[];for(const[u,l]of i.entries()){const c=`ctr_${o}_Ctr${u}`;if(l.circle===!0){const h=l;t+=gl(h.cx,h.cy,h.radius,c)}else t+=wl(l.seg,c);a.push(c)}t+=yl(a,o),r.push(o)}return t+=bl(r,n),t}getAllFigures(e,n){let t="";for(const r in e){const s=this.getOneFigure(e[r],`${n}_${r}`);t+=s}return t}getOneExtrude(e){let n=`def fex_${e.outName}():
|
|
178
|
-
FIG = ${e.face}()
|
|
179
|
-
`;return e.extrudeMethod===0?(e.length===void 0&&console.log(`err103: ${e.face} ${e.outName} design error: eLinearOrtho length undefined!`),n+=` VEX = FIG.extrude(App.Vector(0, 0, ${e.length}))`):e.extrudeMethod===1&&(n+=" VEX = FIG.revolve(App.Vector(0, 0, 0), App.Vector(0, 1, 0), 360).rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), 90)"),n+=`
|
|
180
|
-
VR1 = VEX.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${ce(Le(e.rotate[0]))})
|
|
181
|
-
VR2 = VR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${ce(Le(e.rotate[1]))})
|
|
182
|
-
VR3 = VR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${ce(Le(e.rotate[2]))})
|
|
183
|
-
VFP = VR3.translate(App.Vector(${ce(e.translate[0])}, ${ce(e.translate[1])}, ${ce(e.translate[2])}))
|
|
184
|
-
return VFP
|
|
185
|
-
${e.outName} = fex_${e.outName}()
|
|
186
|
-
|
|
187
|
-
`,n}getAllExtrudes(e){let n="";for(const t of e){const r=this.getOneExtrude(t);n+=r}return n}getOneVolume(e){let n="";if(e.inList.length===0)console.log(`err215: ${e.outName} has an empty inList`);else if(e.inList.length===1||e.boolMethod===0)n+=`${e.outName} = ${e.inList[0]}
|
|
188
|
-
`;else{const t=e.inList[0],r=e.inList.slice(1);let s="dbg897";switch(e.boolMethod){case 1:s="common";break;case 2:s="fuse";break;case 3:s="cut";break}n+=`def fvol_${e.outName}():
|
|
189
|
-
V000 = ${t}
|
|
190
|
-
`;let i=0;for(const o of r)n+=` V${_e(i+1)} = V${_e(i)}.${s}(${o})
|
|
191
|
-
`,i+=1;n+=` VFC = V${_e(i)}.removeSplitter()
|
|
192
|
-
return VFC
|
|
193
|
-
${e.outName} = fvol_${e.outName}()
|
|
194
|
-
|
|
195
|
-
`}return n}getAllVolumes(e){let n="";for(const t of e){const r=this.getOneVolume(t);n+=r}return n}getAllSubGeoms(e){const n=[];for(const t of e)n.includes(t.subgeom)||n.push(t.subgeom);return n}getOneInherit(e){return`def finh_${e.outName}():
|
|
196
|
-
IVR1 = ${e.subdesign}.rotate(App.Vector(0, 0, 0), App.Vector(1, 0, 0), ${ce(Le(e.rotate[0]))})
|
|
197
|
-
IVR2 = IVR1.rotate(App.Vector(0, 0, 0), App.Vector(0, 1, 0), ${ce(Le(e.rotate[1]))})
|
|
198
|
-
IVR3 = IVR2.rotate(App.Vector(0, 0, 0), App.Vector(0, 0, 1), ${ce(Le(e.rotate[2]))})
|
|
199
|
-
IVF = IVR3.translate(App.Vector(${ce(e.translate[0])}, ${ce(e.translate[1])}, ${ce(e.translate[2])}))
|
|
200
|
-
return IVF
|
|
201
|
-
${e.outName} = finh_${e.outName}()
|
|
202
|
-
|
|
203
|
-
`}getAllInherits(e){let n="";for(const t of e){const r=this.getOneInherit(t);n+=r}return n}getVolume(e){let n="";if(e.inherits!==void 0){const t=this.getAllSubGeoms(e.inherits);for(const r of t){const s=Wt().getPaxJson({},r,zt);n+=this.getAllFigures(s.figures,s.partName),n+=this.getVolume(r.vol)}n+=this.getAllInherits(e.inherits)}return n+=this.getAllExtrudes(e.extrudes),n+=this.getAllVolumes(e.volumes),n}getFooter(e){return`
|
|
204
|
-
pax_${e}.check()
|
|
205
|
-
#pax_${e}.exportBrep(f"{outFileName}.brep")
|
|
206
|
-
#pax_${e}.exportIges(f"{outFileName}.igs")
|
|
207
|
-
#pax_${e}.exportStep(f"{outFileName}.stp")
|
|
208
|
-
pax_${e}.exportStl(f"{outFileName}.stl")
|
|
209
|
-
|
|
210
|
-
`}getExportFile(e){let n=this.getHeader(e.partName);return n+=this.getAllFigures(e.figures,e.partName),n+=this.getVolume(e.volume),n+=this.getFooter(e.partName),n}};function Al(){return new _l}var vl=class{constructor(){L(this,"xMin");L(this,"xMax");L(this,"yMin");L(this,"yMax");L(this,"firstDone");this.firstDone=!1,this.xMin=0,this.xMax=0,this.yMin=0,this.yMax=0}addAContour(e){if(e.length>0){const n=[];this.firstDone&&(n.push(G(this.xMin,this.yMin)),n.push(G(this.xMax,this.yMax)));for(const o of e)n.push(...o.generatePoints(2));const[t,r,s,i]=Mo(n);this.xMin=t,this.xMax=r,this.yMin=s,this.yMax=i}}getViewBox(){const e=Math.round((this.xMax-this.xMin)*1.1)+10,n=Math.round((this.yMax-this.yMin)*1.1)+10,t=Math.round(this.xMin-e*.05),r=Math.round(this.yMin-n*.05);return[t,e,r,n]}},Cl=class{constructor(){L(this,"minMax");L(this,"groups");L(this,"svg");this.minMax=new vl,this.groups=[],this.svg=N0()}addAContour(e,n="",t=de.contour){this.minMax.addAContour(e);const r={gpName:n,gpColor:t,ctrs:e};this.groups.push(r)}makeSvg(e){for(const n of this.groups){n.gpName!==""&&this.svg.addGroup(n.gpName);for(const t of n.ctrs){let r=t.imposedColor;r===""&&(r=n.gpColor),this.svg.addSvgString(t.toSvg(e,r))}n.gpName!==""&&this.svg.closeGroup()}}stringify(){const[e,n,t,r]=this.minMax.getViewBox();return this.svg.addHeader(e,n,t,r),this.makeSvg(this.minMax.yMax+this.minMax.yMin),this.svg.stringify()}};function Yo(){return new Cl}function Yn(e){const n=Yo();return n.addAContour(e),n.stringify()}function In(e){const n=Yo();return n.addAContour(e.mainListC(),"main",de.mainInner),n.addAContour(e.mainBList,"mainB",de.mainB),n.addAContour(e.secondList,"second",de.second),n.addAContour(e.secondBList,"secondB",de.secondB),n.addAContour(e.dynamicsList,"dynamics",de.dynamics),n.stringify()}function Gn(e){const n=j0();for(const r of e)if(r.circle){const s=r.toDxfSeg()[0];n.addCircle(s.p1x,s.p1y,s.radius)}else for(const s of r.toDxfSeg())s.arc?n.addArc(s.p1x,s.p1y,s.radius,s.a1,s.a2):n.addLine(s.p1x,s.p1y,s.p2x,s.p2y);return n.stringify()}function El(e){let n="";return n+=e.logstr,n}function Go(e,n,t){return Wt().getPaxStr(e,n,t)}function Zo(e){const n=Wt().getPaxJson({},e,zt);return ul().getExportFile(n)}function Xo(e){const n=Wt().getPaxJson({},e,zt);return Dl().getExportFile(n)}function Ko(e){const n=Wt().getPaxJson({},e,zt);return Al().getExportFile(n)}async function Fl(e,n,t,r,s){const i=new Mc("application/zip"),o=new t0(i),a=n.partName,u=new Ee(JSON.stringify(e,null,2));await o.add(`param_${a}.json`,u);const l=new Ee(n.logstr);await o.add(`geom_${a}_log.txt`,l);const c=new Ee(r.logstr);await o.add(`geom_${a}_t${t}_log.txt`,c);for(const w in n.fig){const b=new Ee(Yn(n.fig[w].mainListC()));await o.add(`face_${a}_${w}.svg`,b);const v=new Ee(Gn(n.fig[w].mainListC()));await o.add(`face_${a}_${w}.dxf`,v);const A=new Ee(In(n.fig[w]));await o.add(`deco_${a}_${w}.svg`,A);const E=new Ee(In(r.fig[w]));await o.add(`deco_${a}_${w}_t${t}.svg`,E)}const h=jr(n.fig),m=new Ee(Yn(h.mainListC()));await o.add(`face_${a}_all_merged.svg`,m);const x=new Ee(Gn(h.mainListC()));await o.add(`face_${a}_all_merged.dxf`,x);const y=new Ee(In(h));await o.add(`deco_${a}_all_merged.svg`,y);const f=new Ee(In(h));await o.add(`deco_${a}_all_merged_t${t}.svg`,f);const d=new Ee(Go(e,n,s));await o.add(`${a}.pax.json`,d);const p=new Ee(Zo(n));await o.add(`${a}_noarc_openscad.scad`,p);const D=new Ee(Xo(n));await o.add(`${a}_noarc_jscad.js`,D);const g=new Ee(Ko(n));return await o.add(`${a}_freecad.py`,g),await o.close(),await i.getData()}var Sl=(e=>(e[e.eSVG=0]="eSVG",e[e.eSVGALL=1]="eSVGALL",e[e.eDXF=2]="eDXF",e[e.eDXFALL=3]="eDXFALL",e[e.eTXTLOG=4]="eTXTLOG",e[e.ePAX=5]="ePAX",e[e.eOPENSCAD=6]="eOPENSCAD",e[e.eJSCAD=7]="eJSCAD",e[e.eFREECAD=8]="eFREECAD",e[e.eZIP=9]="eZIP",e))(Sl||{});function Xl(e,n,t,r,s){const i=e(0,n);let o="";if(i.calcErr)console.log("err931: error by calling geome ${geome0.calcErr}");else{const a=Object.keys(i.fig);if(s===0)if(a.includes(r)){const u=i.fig[r];o=Yn(u.mainListC())}else console.log(`err749: fileTextContent eFace ${r} invalid`);else if(s===1){const u=jr(i.fig);o=Yn(u.mainListC())}else if(s===2)if(a.includes(r)){const u=i.fig[r];o=Gn(u.mainListC())}else console.log(`err759: fileTextContent eFace ${r} invalid`);else if(s===3){const u=jr(i.fig);o=Gn(u.mainListC())}else s===4?o=El(i):s===5?o=Go(n,i,t):s===6?o=Zo(i):s===7?o=Xo(i):s===8?o=Ko(i):console.log(`err912: unknown exportFormat ${s}`)}return o}async function Kl(e,n,t,r,s){const i=e(0,t),o=e(n,t);let a=new Blob;return!i.calcErr&&!o.calcErr?s===9?a=await Fl(t,i,n,o,r):console.log(`err913: unknown exportFormat ${s}`):console.log("err932: error by calling geome ${geome0.calcErr} ${geome1.calcErr}"),a}function Jl(e){let n="";return e===0||e===1?n="image/svg+xml":e===2||e===3?n="application/dxf":e===4?n="text/plain":e===5?n="application/json":e===6||e===7||e===8?n="text/plain":e===9&&(n="application/zip"),n}function zl(e){let n="";return e===0||e===1?n=".svg":e===2||e===3?n=".dxf":e===4?n=".log":e===5?n=".pax.json":e===6?n="_noarc_openscad.scad":e===7?n="_noarc_jscad.js":e===8?n="_freecad.py":e===9&&(n=".zip"),n}function Ql(e){let n=!1;return e===9&&(n=!0),n}function ef(e,n,t,r){return JSON.stringify({lastModif:e,partName:n,pVal:t,comment:r},null," ")}function tf(e){const n=A0.parse(e),t="lastModif",r="partName",s="pVal",i="comment";let o="";const a={lastModif:"",partName:"",pVal:{},comment:""};if(Object.hasOwn(n,t)&&(a[t]=n[t]),Object.hasOwn(n,r)&&(a[r]=n[r]),Object.hasOwn(n,s)){const u=n[s];for(const l of Object.keys(u)){const c=u[l];if(isNaN(c))throw`err905: ${c} is not a number!`;a[s][l]=c}o+=`info398: parsing file has found ${Object.keys(a[s]).length} parameters
|
|
211
|
-
`}else throw`err489: parameter-json-file has no key ${s}
|
|
212
|
-
`;return Object.hasOwn(n,i)&&(a[i]=n[i]),[a,o]}function nf(e,n,t,r,s=0){return X0(e,n).addCornerRounded(s).addSegStrokeR(t,0).addCornerRounded(s).addSegStrokeR(0,r).addCornerRounded(s).addSegStrokeR(-t,0).addCornerRounded(s).closeSegStroke()}function rf(e){const n=[];n.push("version details:"),n.push(`${e.name} : ${e.version}`),n.push("dependencies:");const t=Object.keys(e.dependencies);for(const[r,s]of t.entries()){const i=s;n.push(`${r+1} : ${s} : ${e.dependencies[i]}`)}return n}export{Ul as A,de as B,Ll as C,Hl as D,el as E,Le as F,Sl as G,Kl as H,Xl as I,zl as J,Ql as K,Jl as L,jr as M,z0 as P,Gl as a,ql as b,X0 as c,Q0 as d,Bl as e,J0 as f,ut as g,nf as h,Zl as i,Pl as j,Il as k,Rr as l,jl as m,Wl as n,Vl as o,Yl as p,ef as q,Ml as r,hs as s,tf as t,Rl as u,rf as v,$l as w,Ol as x,Nl as y,Jn as z};
|