@zyzgroup/core-web 0.0.47 → 0.0.49

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.
@@ -39,7 +39,7 @@
39
39
  `)re=0,be=0,fe=0,ce+=ve*F;else{var Te=fe&&v.glyphs[K[ze-1]]||{},be=v.glyphs[K[ze]];re+=fe?(Te.w||v.w)+(Te.k&&Te.k[K[ze]]||0)+v.w*L:0,fe=1}be&&be.d&&(ne+=l.transformPath(be.d,["t",re*B,ce*B,"s",B,B,de,ue,"t",(b-de)/B,(S-ue)/B]))}}return this.path(ne).attr({fill:"#000",stroke:"none"})},u.add=function(b){if(l.is(b,"array"))for(var S,A=this.set(),v=0,C=b.length;v<C;v++)S=b[v]||{},c[p](S.type)&&A.push(this[S.type]().attr(S));return A},l.format=function(b,S){var A=l.is(S,ae)?[0][m](S):arguments;return b&&l.is(b,"string")&&A.length-1&&(b=b.replace(f,function(v,C){return A[++C]==null?O:A[C]})),b||O},l.fullfill=(Zi=/\{([^\}]+)\}/g,Xr=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,function(b,S){return String(b).replace(Zi,function(A,v){return function(C,R,L){var F=L;return R.replace(Xr,function(B,K,re,fe,ne){K=K||fe,F&&(K in F&&(F=F[K]),typeof F=="function"&&ne&&(F=F()))}),F=(F==null||F==L?C:F)+""}(A,v,S)})}),l.ninja=function(){if(y.was)g.win.Raphael=y.is;else{window.Raphael=void 0;try{delete window.Raphael}catch{}}return l},l.st=Qt,o.on("raphael.DOMload",function(){h=!0}),(Kr=document).readyState==null&&Kr.addEventListener&&(Kr.addEventListener("DOMContentLoaded",Zr=function(){Kr.removeEventListener("DOMContentLoaded",Zr,!1),Kr.readyState="complete"},!1),Kr.readyState="loading"),function b(){/in/.test(Kr.readyState)?setTimeout(b,9):l.eve("raphael.DOMload")}(),l}.apply(i,a))===void 0||(t.exports=n)},function(t,i,s){var a,n;a=[s(0),s(3),s(4)],(n=function(o){return o}.apply(i,a))===void 0||(t.exports=n)},function(t,i,s){var a,n,o,l,h,u,d,c,f,p,g,y,_,T;l="hasOwnProperty",h=/[\.\/]/,u=/\s*,\s*/,d=function(m,w){return m-w},c={n:{}},f=function(){for(var m=0,w=this.length;m<w;m++)if(this[m]!==void 0)return this[m]},p=function(){for(var m=this.length;--m;)if(this[m]!==void 0)return this[m]},g=Object.prototype.toString,y=String,_=Array.isArray||function(m){return m instanceof Array||g.call(m)=="[object Array]"},(T=function(m,w){var O,k=o,I=Array.prototype.slice.call(arguments,2),$=T.listeners(m),G=0,U=[],V={},X=[],te=n;X.firstDefined=f,X.lastDefined=p,n=m,o=0;for(var ee=0,oe=$.length;ee<oe;ee++)"zIndex"in $[ee]&&(U.push($[ee].zIndex),$[ee].zIndex<0&&(V[$[ee].zIndex]=$[ee]));for(U.sort(d);U[G]<0;)if(O=V[U[G++]],X.push(O.apply(w,I)),o)return o=k,X;for(ee=0;ee<oe;ee++)if("zIndex"in(O=$[ee]))if(O.zIndex==U[G]){if(X.push(O.apply(w,I)),o)break;do if((O=V[U[++G]])&&X.push(O.apply(w,I)),o)break;while(O)}else V[O.zIndex]=O;else if(X.push(O.apply(w,I)),o)break;return o=k,n=te,X})._events=c,T.listeners=function(m){var w,O,k,I,$,G,U,V,X=_(m)?m:m.split(h),te=c,ee=[te],oe=[];for(I=0,$=X.length;I<$;I++){for(V=[],G=0,U=ee.length;G<U;G++)for(O=[(te=ee[G].n)[X[I]],te["*"]],k=2;k--;)(w=O[k])&&(V.push(w),oe=oe.concat(w.f||[]));ee=V}return oe},T.separator=function(m){m?(m="["+(m=y(m).replace(/(?=[\.\^\]\[\-])/g,"\\"))+"]",h=new RegExp(m)):h=/[\.\/]/},T.on=function(m,w){if(typeof w!="function")return function(){};for(var O=_(m)?_(m[0])?m:[m]:y(m).split(u),k=0,I=O.length;k<I;k++)(function($){for(var G,U=_($)?$:y($).split(h),V=c,X=0,te=U.length;X<te;X++)V=(V=V.n).hasOwnProperty(U[X])&&V[U[X]]||(V[U[X]]={n:{}});for(V.f=V.f||[],X=0,te=V.f.length;X<te;X++)if(V.f[X]==w){G=!0;break}!G&&V.f.push(w)})(O[k]);return function($){+$==+$&&(w.zIndex=+$)}},T.f=function(m){var w=[].slice.call(arguments,1);return function(){T.apply(null,[m,null].concat(w).concat([].slice.call(arguments,0)))}},T.stop=function(){o=1},T.nt=function(m){var w=_(n)?n.join("."):n;return m?new RegExp("(?:\\.|\\/|^)"+m+"(?:\\.|\\/|$)").test(w):w},T.nts=function(){return _(n)?n:n.split(h)},T.off=T.unbind=function(m,w){if(m){var O=_(m)?_(m[0])?m:[m]:y(m).split(u);if(O.length>1)for(var k=0,I=O.length;k<I;k++)T.off(O[k],w);else{O=_(m)?m:y(m).split(h);var $,G,U,V,X,te=[c];for(k=0,I=O.length;k<I;k++)for(V=0;V<te.length;V+=U.length-2){if(U=[V,1],$=te[V].n,O[k]!="*")$[O[k]]&&U.push($[O[k]]);else for(G in $)$[l](G)&&U.push($[G]);te.splice.apply(te,U)}for(k=0,I=te.length;k<I;k++)for($=te[k];$.n;){if(w){if($.f){for(V=0,X=$.f.length;V<X;V++)if($.f[V]==w){$.f.splice(V,1);break}!$.f.length&&delete $.f}for(G in $.n)if($.n[l](G)&&$.n[G].f){var ee=$.n[G].f;for(V=0,X=ee.length;V<X;V++)if(ee[V]==w){ee.splice(V,1);break}!ee.length&&delete $.n[G].f}}else for(G in delete $.f,$.n)$.n[l](G)&&$.n[G].f&&delete $.n[G].f;$=$.n}}}else T._events=c={n:{}}},T.once=function(m,w){var O=function(){return T.off(m,O),w.apply(this,arguments)};return T.on(m,O)},T.version="0.5.0",T.toString=function(){return"You are running Eve 0.5.0"},t.exports?t.exports=T:(a=function(){return T}.apply(i,[]))===void 0||(t.exports=a)},function(t,i,s){var a,n;a=[s(0)],(n=function(o){if(!o||o.svg){var l="hasOwnProperty",h=String,u=parseFloat,d=parseInt,c=Math,f=c.max,p=c.abs,g=c.pow,y=/[, ]+/,_=o.eve,T="",m=" ",w="http://www.w3.org/1999/xlink",O={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},k={};o.toString=function(){return`Your browser supports SVG.
40
40
  You are running Raphaël `+this.version};var I=function(M,E){if(E)for(var z in typeof M=="string"&&(M=I(M)),E)E[l](z)&&(z.substring(0,6)=="xlink:"?M.setAttributeNS(w,z.substring(6),h(E[z])):M.setAttribute(z,h(E[z])));else(M=o._g.doc.createElementNS("http://www.w3.org/2000/svg",M)).style&&(M.style.webkitTapHighlightColor="rgba(0,0,0,0)");return M},$=function(M,E){var z="linear",P=M.id+E,D=.5,j=.5,N=M.node,H=M.paper,q=N.style,x=o._g.doc.getElementById(P);if(!x){if(E=(E=h(E).replace(o._radial_gradient,function(Ue,Ve,Oe){if(z="radial",Ve&&Oe){D=u(Ve);var ut=2*((j=u(Oe))>.5)-1;g(D-.5,2)+g(j-.5,2)>.25&&(j=c.sqrt(.25-g(D-.5,2))*ut+.5)&&j!=.5&&(j=j.toFixed(5)-1e-5*ut)}return T})).split(/\s*\-\s*/),z=="linear"){var ie=E.shift();if(ie=-u(ie),isNaN(ie))return null;var ge=[0,0,c.cos(o.rad(ie)),c.sin(o.rad(ie))],Pe=1/(f(p(ge[2]),p(ge[3]))||1);ge[2]*=Pe,ge[3]*=Pe,ge[2]<0&&(ge[0]=-ge[2],ge[2]=0),ge[3]<0&&(ge[1]=-ge[3],ge[3]=0)}var $e=o._parseDots(E);if(!$e)return null;if(P=P.replace(/[\(\)\s,\xb0#]/g,"_"),M.gradient&&P!=M.gradient.id&&(H.defs.removeChild(M.gradient),delete M.gradient),!M.gradient){x=I(z+"Gradient",{id:P}),M.gradient=x,I(x,z=="radial"?{fx:D,fy:j}:{x1:ge[0],y1:ge[1],x2:ge[2],y2:ge[3],gradientTransform:M.matrix.invert()}),H.defs.appendChild(x);for(var Se=0,Ae=$e.length;Se<Ae;Se++)x.appendChild(I("stop",{offset:$e[Se].offset?$e[Se].offset:Se?"100%":"0%","stop-color":$e[Se].color||"#fff","stop-opacity":isFinite($e[Se].opacity)?$e[Se].opacity:1}))}}return I(N,{fill:G(P),opacity:1,"fill-opacity":1}),q.fill=T,q.opacity=1,q.fillOpacity=1,1},G=function(M){if((E=document.documentMode)&&(E===9||E===10))return"url('#"+M+"')";var E,z=document.location;return"url('"+(z.protocol+"//"+z.host+z.pathname+z.search)+"#"+M+"')"},U=function(M){var E=M.getBBox(1);I(M.pattern,{patternTransform:M.matrix.invert()+" translate("+E.x+","+E.y+")"})},V=function(M,E,z){if(M.type=="path"){for(var P,D,j,N,H,q=h(E).toLowerCase().split("-"),x=M.paper,ie=z?"end":"start",ge=M.node,Pe=M.attrs,$e=Pe["stroke-width"],Se=q.length,Ae="classic",Ue=3,Ve=3,Oe=5;Se--;)switch(q[Se]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":Ae=q[Se];break;case"wide":Ve=5;break;case"narrow":Ve=2;break;case"long":Ue=5;break;case"short":Ue=2}if(Ae=="open"?(Ue+=2,Ve+=2,Oe+=2,j=1,N=z?4:1,H={fill:"none",stroke:Pe.stroke}):(N=j=Ue/2,H={fill:Pe.stroke,stroke:"none"}),M._.arrows?z?(M._.arrows.endPath&&k[M._.arrows.endPath]--,M._.arrows.endMarker&&k[M._.arrows.endMarker]--):(M._.arrows.startPath&&k[M._.arrows.startPath]--,M._.arrows.startMarker&&k[M._.arrows.startMarker]--):M._.arrows={},Ae!="none"){var ut="raphael-marker-"+Ae,Je="raphael-marker-"+ie+Ae+Ue+Ve+"-obj"+M.id;o._g.doc.getElementById(ut)?k[ut]++:(x.defs.appendChild(I(I("path"),{"stroke-linecap":"round",d:O[Ae],id:ut})),k[ut]=1);var ct,We=o._g.doc.getElementById(Je);We?(k[Je]++,ct=We.getElementsByTagName("use")[0]):(We=I(I("marker"),{id:Je,markerHeight:Ve,markerWidth:Ue,orient:"auto",refX:N,refY:Ve/2}),ct=I(I("use"),{"xlink:href":"#"+ut,transform:(z?"rotate(180 "+Ue/2+" "+Ve/2+") ":T)+"scale("+Ue/Oe+","+Ve/Oe+")","stroke-width":(1/((Ue/Oe+Ve/Oe)/2)).toFixed(4)}),We.appendChild(ct),x.defs.appendChild(We),k[Je]=1),I(ct,H);var Nt=j*(Ae!="diamond"&&Ae!="oval");z?(P=M._.arrows.startdx*$e||0,D=o.getTotalLength(Pe.path)-Nt*$e):(P=Nt*$e,D=o.getTotalLength(Pe.path)-(M._.arrows.enddx*$e||0)),(H={})["marker-"+ie]="url(#"+Je+")",(D||P)&&(H.d=o.getSubpath(Pe.path,P,D)),I(ge,H),M._.arrows[ie+"Path"]=ut,M._.arrows[ie+"Marker"]=Je,M._.arrows[ie+"dx"]=Nt,M._.arrows[ie+"Type"]=Ae,M._.arrows[ie+"String"]=E}else z?(P=M._.arrows.startdx*$e||0,D=o.getTotalLength(Pe.path)-P):(P=0,D=o.getTotalLength(Pe.path)-(M._.arrows.enddx*$e||0)),M._.arrows[ie+"Path"]&&I(ge,{d:o.getSubpath(Pe.path,P,D)}),delete M._.arrows[ie+"Path"],delete M._.arrows[ie+"Marker"],delete M._.arrows[ie+"dx"],delete M._.arrows[ie+"Type"],delete M._.arrows[ie+"String"];for(H in k)if(k[l](H)&&!k[H]){var Rt=o._g.doc.getElementById(H);Rt&&Rt.parentNode.removeChild(Rt)}}},X={"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},te=function(M,E,z){if(E=X[h(E).toLowerCase()]){for(var P=M.attrs["stroke-width"]||"1",D={round:P,square:P,butt:0}[M.attrs["stroke-linecap"]||z["stroke-linecap"]]||0,j=[],N=E.length;N--;)j[N]=E[N]*P+(N%2?1:-1)*D;I(M.node,{"stroke-dasharray":j.join(",")})}else I(M.node,{"stroke-dasharray":"none"})},ee=function(M,E){var z=M.node,P=M.attrs,D=z.style.visibility;for(var j in z.style.visibility="hidden",E)if(E[l](j)){if(!o._availableAttrs[l](j))continue;var N=E[j];switch(P[j]=N,j){case"blur":M.blur(N);break;case"title":var H=z.getElementsByTagName("title");if(H.length&&(H=H[0]))H.firstChild.nodeValue=N;else{H=I("title");var q=o._g.doc.createTextNode(N);H.appendChild(q),z.appendChild(H)}break;case"href":case"target":var x=z.parentNode;if(x.tagName.toLowerCase()!="a"){var ie=I("a");x.insertBefore(ie,z),ie.appendChild(z),x=ie}j=="target"?x.setAttributeNS(w,"show",N=="blank"?"new":N):x.setAttributeNS(w,j,N);break;case"cursor":z.style.cursor=N;break;case"transform":M.transform(N);break;case"arrow-start":V(M,N);break;case"arrow-end":V(M,N,1);break;case"clip-rect":var ge=h(N).split(y);if(ge.length==4){M.clip&&M.clip.parentNode.parentNode.removeChild(M.clip.parentNode);var Pe=I("clipPath"),$e=I("rect");Pe.id=o.createUUID(),I($e,{x:ge[0],y:ge[1],width:ge[2],height:ge[3]}),Pe.appendChild($e),M.paper.defs.appendChild(Pe),I(z,{"clip-path":"url(#"+Pe.id+")"}),M.clip=$e}if(!N){var Se=z.getAttribute("clip-path");if(Se){var Ae=o._g.doc.getElementById(Se.replace(/(^url\(#|\)$)/g,T));Ae&&Ae.parentNode.removeChild(Ae),I(z,{"clip-path":T}),delete M.clip}}break;case"path":M.type=="path"&&(I(z,{d:N?P.path=o._pathToAbsolute(N):"M0,0"}),M._.dirty=1,M._.arrows&&("startString"in M._.arrows&&V(M,M._.arrows.startString),"endString"in M._.arrows&&V(M,M._.arrows.endString,1)));break;case"width":if(z.setAttribute(j,N),M._.dirty=1,!P.fx)break;j="x",N=P.x;case"x":P.fx&&(N=-P.x-(P.width||0));case"rx":if(j=="rx"&&M.type=="rect")break;case"cx":z.setAttribute(j,N),M.pattern&&U(M),M._.dirty=1;break;case"height":if(z.setAttribute(j,N),M._.dirty=1,!P.fy)break;j="y",N=P.y;case"y":P.fy&&(N=-P.y-(P.height||0));case"ry":if(j=="ry"&&M.type=="rect")break;case"cy":z.setAttribute(j,N),M.pattern&&U(M),M._.dirty=1;break;case"r":M.type=="rect"?I(z,{rx:N,ry:N}):z.setAttribute(j,N),M._.dirty=1;break;case"src":M.type=="image"&&z.setAttributeNS(w,"href",N);break;case"stroke-width":M._.sx==1&&M._.sy==1||(N/=f(p(M._.sx),p(M._.sy))||1),z.setAttribute(j,N),P["stroke-dasharray"]&&te(M,P["stroke-dasharray"],E),M._.arrows&&("startString"in M._.arrows&&V(M,M._.arrows.startString),"endString"in M._.arrows&&V(M,M._.arrows.endString,1));break;case"stroke-dasharray":te(M,N,E);break;case"fill":var Ue=h(N).match(o._ISURL);if(Ue){Pe=I("pattern");var Ve=I("image");Pe.id=o.createUUID(),I(Pe,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),I(Ve,{x:0,y:0,"xlink:href":Ue[1]}),Pe.appendChild(Ve),function(We){o._preload(Ue[1],function(){var Nt=this.offsetWidth,Rt=this.offsetHeight;I(We,{width:Nt,height:Rt}),I(Ve,{width:Nt,height:Rt})})}(Pe),M.paper.defs.appendChild(Pe),I(z,{fill:"url(#"+Pe.id+")"}),M.pattern=Pe,M.pattern&&U(M);break}var Oe=o.getRGB(N);if(Oe.error){if((M.type=="circle"||M.type=="ellipse"||h(N).charAt()!="r")&&$(M,N)){if("opacity"in P||"fill-opacity"in P){var ut=o._g.doc.getElementById(z.getAttribute("fill").replace(/^url\(#|\)$/g,T));if(ut){var Je=ut.getElementsByTagName("stop");I(Je[Je.length-1],{"stop-opacity":("opacity"in P?P.opacity:1)*("fill-opacity"in P?P["fill-opacity"]:1)})}}P.gradient=N,P.fill="none";break}}else delete E.gradient,delete P.gradient,!o.is(P.opacity,"undefined")&&o.is(E.opacity,"undefined")&&I(z,{opacity:P.opacity}),!o.is(P["fill-opacity"],"undefined")&&o.is(E["fill-opacity"],"undefined")&&I(z,{"fill-opacity":P["fill-opacity"]});Oe[l]("opacity")&&I(z,{"fill-opacity":Oe.opacity>1?Oe.opacity/100:Oe.opacity});case"stroke":Oe=o.getRGB(N),z.setAttribute(j,Oe.hex),j=="stroke"&&Oe[l]("opacity")&&I(z,{"stroke-opacity":Oe.opacity>1?Oe.opacity/100:Oe.opacity}),j=="stroke"&&M._.arrows&&("startString"in M._.arrows&&V(M,M._.arrows.startString),"endString"in M._.arrows&&V(M,M._.arrows.endString,1));break;case"gradient":(M.type=="circle"||M.type=="ellipse"||h(N).charAt()!="r")&&$(M,N);break;case"opacity":P.gradient&&!P[l]("stroke-opacity")&&I(z,{"stroke-opacity":N>1?N/100:N});case"fill-opacity":if(P.gradient){(ut=o._g.doc.getElementById(z.getAttribute("fill").replace(/^url\(#|\)$/g,T)))&&(Je=ut.getElementsByTagName("stop"),I(Je[Je.length-1],{"stop-opacity":N}));break}default:j=="font-size"&&(N=d(N,10)+"px");var ct=j.replace(/(\-.)/g,function(We){return We.substring(1).toUpperCase()});z.style[ct]=N,M._.dirty=1,z.setAttribute(j,N)}}oe(M,E),z.style.visibility=D},oe=function(M,E){if(M.type=="text"&&(E[l]("text")||E[l]("font")||E[l]("font-size")||E[l]("x")||E[l]("y"))){var z=M.attrs,P=M.node,D=P.firstChild?d(o._g.doc.defaultView.getComputedStyle(P.firstChild,T).getPropertyValue("font-size"),10):10;if(E[l]("text")){for(z.text=E.text;P.firstChild;)P.removeChild(P.firstChild);for(var j,N=h(E.text).split(`
41
41
  `),H=[],q=0,x=N.length;q<x;q++)j=I("tspan"),q&&I(j,{dy:1.2*D,x:z.x}),j.appendChild(o._g.doc.createTextNode(N[q])),P.appendChild(j),H[q]=j}else for(q=0,x=(H=P.getElementsByTagName("tspan")).length;q<x;q++)q?I(H[q],{dy:1.2*D,x:z.x}):I(H[0],{dy:0});I(P,{x:z.x,y:z.y}),M._.dirty=1;var ie=M._getBBox(),ge=z.y-(ie.y+ie.height/2);ge&&o.is(ge,"finite")&&I(H[0],{dy:ge})}},Ce=function(M){return M.parentNode&&M.parentNode.tagName.toLowerCase()==="a"?M.parentNode:M},we=function(M,E){this[0]=this.node=M,M.raphael=!0,this.id=("0000"+(Math.random()*Math.pow(36,5)<<0).toString(36)).slice(-5),M.raphaelid=this.id,this.matrix=o.matrix(),this.realPath=null,this.paper=E,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!E.bottom&&(E.bottom=this),this.prev=E.top,E.top&&(E.top.next=this),E.top=this,this.next=null},_e=o.el;we.prototype=_e,_e.constructor=we,o._engine.path=function(M,E){var z=I("path");E.canvas&&E.canvas.appendChild(z);var P=new we(z,E);return P.type="path",ee(P,{fill:"none",stroke:"#000",path:M}),P},_e.rotate=function(M,E,z){if(this.removed)return this;if((M=h(M).split(y)).length-1&&(E=u(M[1]),z=u(M[2])),M=u(M[0]),z==null&&(E=z),E==null||z==null){var P=this.getBBox(1);E=P.x+P.width/2,z=P.y+P.height/2}return this.transform(this._.transform.concat([["r",M,E,z]])),this},_e.scale=function(M,E,z,P){if(this.removed)return this;if((M=h(M).split(y)).length-1&&(E=u(M[1]),z=u(M[2]),P=u(M[3])),M=u(M[0]),E==null&&(E=M),P==null&&(z=P),z==null||P==null)var D=this.getBBox(1);return z=z??D.x+D.width/2,P=P??D.y+D.height/2,this.transform(this._.transform.concat([["s",M,E,z,P]])),this},_e.translate=function(M,E){return this.removed?this:((M=h(M).split(y)).length-1&&(E=u(M[1])),M=u(M[0])||0,E=+E||0,this.transform(this._.transform.concat([["t",M,E]])),this)},_e.transform=function(M){var E=this._;if(M==null)return E.transform;if(o._extractTransform(this,M),this.clip&&I(this.clip,{transform:this.matrix.invert()}),this.pattern&&U(this),this.node&&I(this.node,{transform:this.matrix}),E.sx!=1||E.sy!=1){var z=this.attrs[l]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":z})}return this},_e.hide=function(){return this.removed||(this.node.style.display="none"),this},_e.show=function(){return this.removed||(this.node.style.display=""),this},_e.remove=function(){var M=Ce(this.node);if(!this.removed&&M.parentNode){var E=this.paper;for(var z in E.__set__&&E.__set__.exclude(this),_.unbind("raphael.*.*."+this.id),this.gradient&&E.defs.removeChild(this.gradient),o._tear(this,E),M.parentNode.removeChild(M),this.removeData(),this)this[z]=typeof this[z]=="function"?o._removedFactory(z):null;this.removed=!0}},_e._getBBox=function(){if(this.node.style.display=="none"){this.show();var M=!0}var E,z=!1;this.paper.canvas.parentElement?E=this.paper.canvas.parentElement.style:this.paper.canvas.parentNode&&(E=this.paper.canvas.parentNode.style),E&&E.display=="none"&&(z=!0,E.display="");var P={};try{P=this.node.getBBox()}catch{P={x:this.node.clientLeft,y:this.node.clientTop,width:this.node.clientWidth,height:this.node.clientHeight}}finally{P=P||{},z&&(E.display="none")}return M&&this.hide(),P},_e.attr=function(M,E){if(this.removed)return this;if(M==null){var z={};for(var P in this.attrs)this.attrs[l](P)&&(z[P]=this.attrs[P]);return z.gradient&&z.fill=="none"&&(z.fill=z.gradient)&&delete z.gradient,z.transform=this._.transform,z}if(E==null&&o.is(M,"string")){if(M=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(M=="transform")return this._.transform;for(var D=M.split(y),j={},N=0,H=D.length;N<H;N++)(M=D[N])in this.attrs?j[M]=this.attrs[M]:o.is(this.paper.customAttributes[M],"function")?j[M]=this.paper.customAttributes[M].def:j[M]=o._availableAttrs[M];return H-1?j:j[D[0]]}if(E==null&&o.is(M,"array")){for(j={},N=0,H=M.length;N<H;N++)j[M[N]]=this.attr(M[N]);return j}if(E!=null){var q={};q[M]=E}else M!=null&&o.is(M,"object")&&(q=M);for(var x in q)_("raphael.attr."+x+"."+this.id,this,q[x]);for(x in this.paper.customAttributes)if(this.paper.customAttributes[l](x)&&q[l](x)&&o.is(this.paper.customAttributes[x],"function")){var ie=this.paper.customAttributes[x].apply(this,[].concat(q[x]));for(var ge in this.attrs[x]=q[x],ie)ie[l](ge)&&(q[ge]=ie[ge])}return ee(this,q),this},_e.toFront=function(){if(this.removed)return this;var M=Ce(this.node);M.parentNode.appendChild(M);var E=this.paper;return E.top!=this&&o._tofront(this,E),this},_e.toBack=function(){if(this.removed)return this;var M=Ce(this.node),E=M.parentNode;return E.insertBefore(M,E.firstChild),o._toback(this,this.paper),this.paper,this},_e.insertAfter=function(M){if(this.removed||!M)return this;var E=Ce(this.node),z=Ce(M.node||M[M.length-1].node);return z.nextSibling?z.parentNode.insertBefore(E,z.nextSibling):z.parentNode.appendChild(E),o._insertafter(this,M,this.paper),this},_e.insertBefore=function(M){if(this.removed||!M)return this;var E=Ce(this.node),z=Ce(M.node||M[0].node);return z.parentNode.insertBefore(E,z),o._insertbefore(this,M,this.paper),this},_e.blur=function(M){var E=this;if(+M!=0){var z=I("filter"),P=I("feGaussianBlur");E.attrs.blur=M,z.id=o.createUUID(),I(P,{stdDeviation:+M||1.5}),z.appendChild(P),E.paper.defs.appendChild(z),E._blur=z,I(E.node,{filter:"url(#"+z.id+")"})}else E._blur&&(E._blur.parentNode.removeChild(E._blur),delete E._blur,delete E.attrs.blur),E.node.removeAttribute("filter");return E},o._engine.circle=function(M,E,z,P){var D=I("circle");M.canvas&&M.canvas.appendChild(D);var j=new we(D,M);return j.attrs={cx:E,cy:z,r:P,fill:"none",stroke:"#000"},j.type="circle",I(D,j.attrs),j},o._engine.rect=function(M,E,z,P,D,j){var N=I("rect");M.canvas&&M.canvas.appendChild(N);var H=new we(N,M);return H.attrs={x:E,y:z,width:P,height:D,rx:j||0,ry:j||0,fill:"none",stroke:"#000"},H.type="rect",I(N,H.attrs),H},o._engine.ellipse=function(M,E,z,P,D){var j=I("ellipse");M.canvas&&M.canvas.appendChild(j);var N=new we(j,M);return N.attrs={cx:E,cy:z,rx:P,ry:D,fill:"none",stroke:"#000"},N.type="ellipse",I(j,N.attrs),N},o._engine.image=function(M,E,z,P,D,j){var N=I("image");I(N,{x:z,y:P,width:D,height:j,preserveAspectRatio:"none"}),N.setAttributeNS(w,"href",E),M.canvas&&M.canvas.appendChild(N);var H=new we(N,M);return H.attrs={x:z,y:P,width:D,height:j,src:E},H.type="image",H},o._engine.text=function(M,E,z,P){var D=I("text");M.canvas&&M.canvas.appendChild(D);var j=new we(D,M);return j.attrs={x:E,y:z,"text-anchor":"middle",text:P,"font-family":o._availableAttrs["font-family"],"font-size":o._availableAttrs["font-size"],stroke:"none",fill:"#000"},j.type="text",ee(j,j.attrs),j},o._engine.setSize=function(M,E){return this.width=M||this.width,this.height=E||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},o._engine.create=function(){var M=o._getContainer.apply(0,arguments),E=M&&M.container;if(!E)throw new Error("SVG container not found.");var z,P=M.x,D=M.y,j=M.width,N=M.height,H=I("svg"),q="overflow:hidden;";return P=P||0,D=D||0,I(H,{height:N=N||342,version:1.1,width:j=j||512,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"}),E==1?(H.style.cssText=q+"position:absolute;left:"+P+"px;top:"+D+"px",o._g.doc.body.appendChild(H),z=1):(H.style.cssText=q+"position:relative",E.firstChild?E.insertBefore(H,E.firstChild):E.appendChild(H)),(E=new o._Paper).width=j,E.height=N,E.canvas=H,E.clear(),E._left=E._top=0,z&&(E.renderfix=function(){}),E.renderfix(),E},o._engine.setViewBox=function(M,E,z,P,D){_("raphael.setViewBox",this,this._viewBox,[M,E,z,P,D]);var j,N,H=this.getSize(),q=f(z/H.width,P/H.height),x=this.top,ie=D?"xMidYMid meet":"xMinYMin";for(M==null?(this._vbSize&&(q=1),delete this._vbSize,j="0 0 "+this.width+m+this.height):(this._vbSize=q,j=M+m+E+m+z+m+P),I(this.canvas,{viewBox:j,preserveAspectRatio:ie});q&&x;)N="stroke-width"in x.attrs?x.attrs["stroke-width"]:1,x.attr({"stroke-width":N}),x._.dirty=1,x._.dirtyT=1,x=x.prev;return this._viewBox=[M,E,z,P,!!D],this},o.prototype.renderfix=function(){var M,E=this.canvas,z=E.style;try{M=E.getScreenCTM()||E.createSVGMatrix()}catch{M=E.createSVGMatrix()}var P=-M.e%1,D=-M.f%1;(P||D)&&(P&&(this._left=(this._left+P)%1,z.left=this._left+"px"),D&&(this._top=(this._top+D)%1,z.top=this._top+"px"))},o.prototype.clear=function(){o.eve("raphael.clear",this);for(var M=this.canvas;M.firstChild;)M.removeChild(M.firstChild);this.bottom=this.top=null,(this.desc=I("desc")).appendChild(o._g.doc.createTextNode("Created with Raphaël "+o.version)),M.appendChild(this.desc),M.appendChild(this.defs=I("defs"))},o.prototype.remove=function(){for(var M in _("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this)this[M]=typeof this[M]=="function"?o._removedFactory(M):null};var ae=o.st;for(var Z in _e)_e[l](Z)&&!ae[l](Z)&&(ae[Z]=function(M){return function(){var E=arguments;return this.forEach(function(z){z[M].apply(z,E)})}}(Z))}}.apply(i,a))===void 0||(t.exports=n)},function(t,i,s){var a,n;a=[s(0)],(n=function(o){if(!o||o.vml){var l="hasOwnProperty",h=String,u=parseFloat,d=Math,c=d.round,f=d.max,p=d.min,g=d.abs,y=/[, ]+/,_=o.eve,T=" ",m="",w={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},O=/([clmz]),?([^clmz]*)/gi,k=/ progid:\S+Blur\([^\)]+\)/g,I=/-?[^,\s-]+/g,$="position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",G=21600,U={path:1,rect:1,image:1},V={circle:1,ellipse:1},X=function(E,z,P){var D=o.matrix();return D.rotate(-E,.5,.5),{dx:D.x(z,P),dy:D.y(z,P)}},te=function(E,z,P,D,j,N){var H=E._,q=E.matrix,x=H.fillpos,ie=E.node,ge=ie.style,Pe=1,$e="",Se=G/z,Ae=G/P;if(ge.visibility="hidden",z&&P){if(ie.coordsize=g(Se)+T+g(Ae),ge.rotation=N*(z*P<0?-1:1),N){var Ue=X(N,D,j);D=Ue.dx,j=Ue.dy}if(z<0&&($e+="x"),P<0&&($e+=" y")&&(Pe=-1),ge.flip=$e,ie.coordorigin=D*-Se+T+j*-Ae,x||H.fillsize){var Ve=ie.getElementsByTagName("fill");Ve=Ve&&Ve[0],ie.removeChild(Ve),x&&(Ue=X(N,q.x(x[0],x[1]),q.y(x[0],x[1])),Ve.position=Ue.dx*Pe+T+Ue.dy*Pe),H.fillsize&&(Ve.size=H.fillsize[0]*g(z)+T+H.fillsize[1]*g(P)),ie.appendChild(Ve)}ge.visibility="visible"}};o.toString=function(){return`Your browser doesn’t support SVG. Falling down to VML.
42
- You are running Raphaël `+this.version};var ee,oe=function(E,z,P){for(var D=h(z).toLowerCase().split("-"),j=P?"end":"start",N=D.length,H="classic",q="medium",x="medium";N--;)switch(D[N]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":H=D[N];break;case"wide":case"narrow":x=D[N];break;case"long":case"short":q=D[N]}var ie=E.node.getElementsByTagName("stroke")[0];ie[j+"arrow"]=H,ie[j+"arrowlength"]=q,ie[j+"arrowwidth"]=x},Ce=function(E,z){E.attrs=E.attrs||{};var P=E.node,D=E.attrs,j=P.style,N=U[E.type]&&(z.x!=D.x||z.y!=D.y||z.width!=D.width||z.height!=D.height||z.cx!=D.cx||z.cy!=D.cy||z.rx!=D.rx||z.ry!=D.ry||z.r!=D.r),H=V[E.type]&&(D.cx!=z.cx||D.cy!=z.cy||D.r!=z.r||D.rx!=z.rx||D.ry!=z.ry),q=E;for(var x in z)z[l](x)&&(D[x]=z[x]);if(N&&(D.path=o._getPath[E.type](E),E._.dirty=1),z.href&&(P.href=z.href),z.title&&(P.title=z.title),z.target&&(P.target=z.target),z.cursor&&(j.cursor=z.cursor),"blur"in z&&E.blur(z.blur),(z.path&&E.type=="path"||N)&&(P.path=function(Vt){var qr=/[ahqstv]/gi,si=o._pathToAbsolute;if(h(Vt).match(qr)&&(si=o._path2curve),qr=/[clmz]/g,si==o._pathToAbsolute&&!h(Vt).match(qr)){var kt=h(Vt).replace(O,function(Oa,ni,oi){var Sr=[],qi=ni.toLowerCase()=="m",li=w[ni];return oi.replace(I,function(Yr){qi&&Sr.length==2&&(li+=Sr+w[ni=="m"?"l":"L"],Sr=[]),Sr.push(c(Yr*G))}),li+Sr});return kt}var Nr,mr,Wi=si(Vt);kt=[];for(var ai=0,Ti=Wi.length;ai<Ti;ai++){Nr=Wi[ai],(mr=Wi[ai][0].toLowerCase())=="z"&&(mr="x");for(var wr=1,Ot=Nr.length;wr<Ot;wr++)mr+=c(Nr[wr]*G)+(wr!=Ot-1?",":m);kt.push(mr)}return kt.join(T)}(~h(D.path).toLowerCase().indexOf("r")?o._pathToAbsolute(D.path):D.path),E._.dirty=1,E.type=="image"&&(E._.fillpos=[D.x,D.y],E._.fillsize=[D.width,D.height],te(E,1,1,0,0,0))),"transform"in z&&E.transform(z.transform),H){var ie=+D.cx,ge=+D.cy,Pe=+D.rx||+D.r||0,$e=+D.ry||+D.r||0;P.path=o.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",c((ie-Pe)*G),c((ge-$e)*G),c((ie+Pe)*G),c((ge+$e)*G),c(ie*G)),E._.dirty=1}if("clip-rect"in z){var Se=h(z["clip-rect"]).split(y);if(Se.length==4){Se[2]=+Se[2]+ +Se[0],Se[3]=+Se[3]+ +Se[1];var Ae=P.clipRect||o._g.doc.createElement("div"),Ue=Ae.style;Ue.clip=o.format("rect({1}px {2}px {3}px {0}px)",Se),P.clipRect||(Ue.position="absolute",Ue.top=0,Ue.left=0,Ue.width=E.paper.width+"px",Ue.height=E.paper.height+"px",P.parentNode.insertBefore(Ae,P),Ae.appendChild(P),P.clipRect=Ae)}z["clip-rect"]||P.clipRect&&(P.clipRect.style.clip="auto")}if(E.textpath){var Ve=E.textpath.style;z.font&&(Ve.font=z.font),z["font-family"]&&(Ve.fontFamily='"'+z["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,m)+'"'),z["font-size"]&&(Ve.fontSize=z["font-size"]),z["font-weight"]&&(Ve.fontWeight=z["font-weight"]),z["font-style"]&&(Ve.fontStyle=z["font-style"])}if("arrow-start"in z&&oe(q,z["arrow-start"]),"arrow-end"in z&&oe(q,z["arrow-end"],1),z.opacity!=null||z.fill!=null||z.src!=null||z.stroke!=null||z["stroke-width"]!=null||z["stroke-opacity"]!=null||z["fill-opacity"]!=null||z["stroke-dasharray"]!=null||z["stroke-miterlimit"]!=null||z["stroke-linejoin"]!=null||z["stroke-linecap"]!=null){var Oe=P.getElementsByTagName("fill");if(!(Oe=Oe&&Oe[0])&&(Oe=ee("fill")),E.type=="image"&&z.src&&(Oe.src=z.src),z.fill&&(Oe.on=!0),Oe.on!=null&&z.fill!="none"&&z.fill!==null||(Oe.on=!1),Oe.on&&z.fill){var ut=h(z.fill).match(o._ISURL);if(ut){Oe.parentNode==P&&P.removeChild(Oe),Oe.rotate=!0,Oe.src=ut[1],Oe.type="tile";var Je=E.getBBox(1);Oe.position=Je.x+T+Je.y,E._.fillpos=[Je.x,Je.y],o._preload(ut[1],function(){E._.fillsize=[this.offsetWidth,this.offsetHeight]})}else Oe.color=o.getRGB(z.fill).hex,Oe.src=m,Oe.type="solid",o.getRGB(z.fill).error&&(q.type in{circle:1,ellipse:1}||h(z.fill).charAt()!="r")&&we(q,z.fill,Oe)&&(D.fill="none",D.gradient=z.fill,Oe.rotate=!1)}if("fill-opacity"in z||"opacity"in z){var ct=((+D["fill-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+o.getRGB(z.fill).o+1||2)-1);ct=p(f(ct,0),1),Oe.opacity=ct,Oe.src&&(Oe.color="none")}P.appendChild(Oe);var We=P.getElementsByTagName("stroke")&&P.getElementsByTagName("stroke")[0],Nt=!1;!We&&(Nt=We=ee("stroke")),(z.stroke&&z.stroke!="none"||z["stroke-width"]||z["stroke-opacity"]!=null||z["stroke-dasharray"]||z["stroke-miterlimit"]||z["stroke-linejoin"]||z["stroke-linecap"])&&(We.on=!0),(z.stroke=="none"||z.stroke===null||We.on==null||z.stroke==0||z["stroke-width"]==0)&&(We.on=!1);var Rt=o.getRGB(z.stroke);We.on&&z.stroke&&(We.color=Rt.hex),ct=((+D["stroke-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+Rt.o+1||2)-1);var rr=.75*(u(z["stroke-width"])||1);if(ct=p(f(ct,0),1),z["stroke-width"]==null&&(rr=D["stroke-width"]),z["stroke-width"]&&(We.weight=rr),rr&&rr<1&&(ct*=rr)&&(We.weight=1),We.opacity=ct,z["stroke-linejoin"]&&(We.joinstyle=z["stroke-linejoin"]||"miter"),We.miterlimit=z["stroke-miterlimit"]||8,z["stroke-linecap"]&&(We.endcap=z["stroke-linecap"]=="butt"?"flat":z["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in z){var Cr={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};We.dashstyle=Cr[l](z["stroke-dasharray"])?Cr[z["stroke-dasharray"]]:m}Nt&&P.appendChild(We)}if(q.type=="text"){q.paper.canvas.style.display=m;var fr=q.paper.span,Lt=D.font&&D.font.match(/\d+(?:\.\d*)?(?=px)/);j=fr.style,D.font&&(j.font=D.font),D["font-family"]&&(j.fontFamily=D["font-family"]),D["font-weight"]&&(j.fontWeight=D["font-weight"]),D["font-style"]&&(j.fontStyle=D["font-style"]),Lt=u(D["font-size"]||Lt&&Lt[0])||10,j.fontSize=100*Lt+"px",q.textpath.string&&(fr.innerHTML=h(q.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var nr=fr.getBoundingClientRect();q.W=D.w=(nr.right-nr.left)/100,q.H=D.h=(nr.bottom-nr.top)/100,q.X=D.x,q.Y=D.y+q.H/2,("x"in z||"y"in z)&&(q.path.v=o.format("m{0},{1}l{2},{1}",c(D.x*G),c(D.y*G),c(D.x*G)+1));for(var $r=["x","y","text","font","font-family","font-weight","font-style","font-size"],Dr=0,Wr=$r.length;Dr<Wr;Dr++)if($r[Dr]in z){q._.dirty=1;break}switch(D["text-anchor"]){case"start":q.textpath.style["v-text-align"]="left",q.bbx=q.W/2;break;case"end":q.textpath.style["v-text-align"]="right",q.bbx=-q.W/2;break;default:q.textpath.style["v-text-align"]="center",q.bbx=0}q.textpath.style["v-text-kern"]=!0}},we=function(E,z,P){E.attrs=E.attrs||{},E.attrs;var D=Math.pow,j="linear",N=".5 .5";if(E.attrs.gradient=z,z=(z=h(z).replace(o._radial_gradient,function(Pe,$e,Se){return j="radial",$e&&Se&&($e=u($e),Se=u(Se),D($e-.5,2)+D(Se-.5,2)>.25&&(Se=d.sqrt(.25-D($e-.5,2))*(2*(Se>.5)-1)+.5),N=$e+T+Se),m})).split(/\s*\-\s*/),j=="linear"){var H=z.shift();if(H=-u(H),isNaN(H))return null}var q=o._parseDots(z);if(!q)return null;if(E=E.shape||E.node,q.length){E.removeChild(P),P.on=!0,P.method="none",P.color=q[0].color,P.color2=q[q.length-1].color;for(var x=[],ie=0,ge=q.length;ie<ge;ie++)q[ie].offset&&x.push(q[ie].offset+T+q[ie].color);P.colors=x.length?x.join():"0% "+P.color,j=="radial"?(P.type="gradientTitle",P.focus="100%",P.focussize="0 0",P.focusposition=N,P.angle=0):(P.type="gradient",P.angle=(270-H)%360),E.appendChild(P)}return 1},_e=function(E,z){this[0]=this.node=E,E.raphael=!0,this.id=o._oid++,E.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=z,this.matrix=o.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!z.bottom&&(z.bottom=this),this.prev=z.top,z.top&&(z.top.next=this),z.top=this,this.next=null},ae=o.el;_e.prototype=ae,ae.constructor=_e,ae.transform=function(E){if(E==null)return this._.transform;var z,P=this.paper._viewBoxShift,D=P?"s"+[P.scale,P.scale]+"-1-1t"+[P.dx,P.dy]:m;P&&(z=E=h(E).replace(/\.{3}|\u2026/g,this._.transform||m)),o._extractTransform(this,D+E);var j,N=this.matrix.clone(),H=this.skew,q=this.node,x=~h(this.attrs.fill).indexOf("-"),ie=!h(this.attrs.fill).indexOf("url(");if(N.translate(1,1),ie||x||this.type=="image")if(H.matrix="1 0 0 1",H.offset="0 0",j=N.split(),x&&j.noRotation||!j.isSimple){q.style.filter=N.toFilter();var ge=this.getBBox(),Pe=this.getBBox(1),$e=ge.x-Pe.x,Se=ge.y-Pe.y;q.coordorigin=$e*-G+T+Se*-G,te(this,1,1,$e,Se,0)}else q.style.filter=m,te(this,j.scalex,j.scaley,j.dx,j.dy,j.rotate);else q.style.filter=m,H.matrix=h(N),H.offset=N.offset();return z!==null&&(this._.transform=z,o._extractTransform(this,z)),this},ae.rotate=function(E,z,P){if(this.removed)return this;if(E!=null){if((E=h(E).split(y)).length-1&&(z=u(E[1]),P=u(E[2])),E=u(E[0]),P==null&&(z=P),z==null||P==null){var D=this.getBBox(1);z=D.x+D.width/2,P=D.y+D.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",E,z,P]])),this}},ae.translate=function(E,z){return this.removed?this:((E=h(E).split(y)).length-1&&(z=u(E[1])),E=u(E[0])||0,z=+z||0,this._.bbox&&(this._.bbox.x+=E,this._.bbox.y+=z),this.transform(this._.transform.concat([["t",E,z]])),this)},ae.scale=function(E,z,P,D){if(this.removed)return this;if((E=h(E).split(y)).length-1&&(z=u(E[1]),P=u(E[2]),D=u(E[3]),isNaN(P)&&(P=null),isNaN(D)&&(D=null)),E=u(E[0]),z==null&&(z=E),D==null&&(P=D),P==null||D==null)var j=this.getBBox(1);return P=P??j.x+j.width/2,D=D??j.y+j.height/2,this.transform(this._.transform.concat([["s",E,z,P,D]])),this._.dirtyT=1,this},ae.hide=function(){return!this.removed&&(this.node.style.display="none"),this},ae.show=function(){return!this.removed&&(this.node.style.display=m),this},ae.auxGetBBox=o.el.getBBox,ae.getBBox=function(){var E=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var z={},P=1/this.paper._viewBoxShift.scale;return z.x=E.x-this.paper._viewBoxShift.dx,z.x*=P,z.y=E.y-this.paper._viewBoxShift.dy,z.y*=P,z.width=E.width*P,z.height=E.height*P,z.x2=z.x+z.width,z.y2=z.y+z.height,z}return E},ae._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},ae.remove=function(){if(!this.removed&&this.node.parentNode){for(var E in this.paper.__set__&&this.paper.__set__.exclude(this),o.eve.unbind("raphael.*.*."+this.id),o._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;this.removed=!0}},ae.attr=function(E,z){if(this.removed)return this;if(E==null){var P={};for(var D in this.attrs)this.attrs[l](D)&&(P[D]=this.attrs[D]);return P.gradient&&P.fill=="none"&&(P.fill=P.gradient)&&delete P.gradient,P.transform=this._.transform,P}if(z==null&&o.is(E,"string")){if(E=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var j=E.split(y),N={},H=0,q=j.length;H<q;H++)(E=j[H])in this.attrs?N[E]=this.attrs[E]:o.is(this.paper.customAttributes[E],"function")?N[E]=this.paper.customAttributes[E].def:N[E]=o._availableAttrs[E];return q-1?N:N[j[0]]}if(this.attrs&&z==null&&o.is(E,"array")){for(N={},H=0,q=E.length;H<q;H++)N[E[H]]=this.attr(E[H]);return N}var x;for(var ie in z!=null&&((x={})[E]=z),z==null&&o.is(E,"object")&&(x=E),x)_("raphael.attr."+ie+"."+this.id,this,x[ie]);if(x){for(ie in this.paper.customAttributes)if(this.paper.customAttributes[l](ie)&&x[l](ie)&&o.is(this.paper.customAttributes[ie],"function")){var ge=this.paper.customAttributes[ie].apply(this,[].concat(x[ie]));for(var Pe in this.attrs[ie]=x[ie],ge)ge[l](Pe)&&(x[Pe]=ge[Pe])}x.text&&this.type=="text"&&(this.textpath.string=x.text),Ce(this,x)}return this},ae.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&o._tofront(this,this.paper),this},ae.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),o._toback(this,this.paper)),this)},ae.insertAfter=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[E.length-1]),E.node.nextSibling?E.node.parentNode.insertBefore(this.node,E.node.nextSibling):E.node.parentNode.appendChild(this.node),o._insertafter(this,E,this.paper),this)},ae.insertBefore=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[0]),E.node.parentNode.insertBefore(this.node,E.node),o._insertbefore(this,E,this.paper),this)},ae.blur=function(E){var z=this.node.runtimeStyle,P=z.filter;return P=P.replace(k,m),+E!=0?(this.attrs.blur=E,z.filter=P+T+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+E||1.5)+")",z.margin=o.format("-{0}px 0 0 -{0}px",c(+E||1.5))):(z.filter=P,z.margin=0,delete this.attrs.blur),this},o._engine.path=function(E,z){var P=ee("shape");P.style.cssText=$,P.coordsize=G+T+G,P.coordorigin=z.coordorigin;var D=new _e(P,z),j={fill:"none",stroke:"#000"};E&&(j.path=E),D.type="path",D.path=[],D.Path=m,Ce(D,j),z.canvas&&z.canvas.appendChild(P);var N=ee("skew");return N.on=!0,P.appendChild(N),D.skew=N,D.transform(m),D},o._engine.rect=function(E,z,P,D,j,N){var H=o._rectPath(z,P,D,j,N),q=E.path(H),x=q.attrs;return q.X=x.x=z,q.Y=x.y=P,q.W=x.width=D,q.H=x.height=j,x.r=N,x.path=H,q.type="rect",q},o._engine.ellipse=function(E,z,P,D,j){var N=E.path();return N.attrs,N.X=z-D,N.Y=P-j,N.W=2*D,N.H=2*j,N.type="ellipse",Ce(N,{cx:z,cy:P,rx:D,ry:j}),N},o._engine.circle=function(E,z,P,D){var j=E.path();return j.attrs,j.X=z-D,j.Y=P-D,j.W=j.H=2*D,j.type="circle",Ce(j,{cx:z,cy:P,r:D}),j},o._engine.image=function(E,z,P,D,j,N){var H=o._rectPath(P,D,j,N),q=E.path(H).attr({stroke:"none"}),x=q.attrs,ie=q.node,ge=ie.getElementsByTagName("fill")[0];return x.src=z,q.X=x.x=P,q.Y=x.y=D,q.W=x.width=j,q.H=x.height=N,x.path=H,q.type="image",ge.parentNode==ie&&ie.removeChild(ge),ge.rotate=!0,ge.src=z,ge.type="tile",q._.fillpos=[P,D],q._.fillsize=[j,N],ie.appendChild(ge),te(q,1,1,0,0,0),q},o._engine.text=function(E,z,P,D){var j=ee("shape"),N=ee("path"),H=ee("textpath");z=z||0,P=P||0,D=D||"",N.v=o.format("m{0},{1}l{2},{1}",c(z*G),c(P*G),c(z*G)+1),N.textpathok=!0,H.string=h(D),H.on=!0,j.style.cssText=$,j.coordsize=G+T+G,j.coordorigin="0 0";var q=new _e(j,E),x={fill:"#000",stroke:"none",font:o._availableAttrs.font,text:D};q.shape=j,q.path=N,q.textpath=H,q.type="text",q.attrs.text=h(D),q.attrs.x=z,q.attrs.y=P,q.attrs.w=1,q.attrs.h=1,Ce(q,x),j.appendChild(H),j.appendChild(N),E.canvas.appendChild(j);var ie=ee("skew");return ie.on=!0,j.appendChild(ie),q.skew=ie,q.transform(m),q},o._engine.setSize=function(E,z){var P=this.canvas.style;return this.width=E,this.height=z,E==+E&&(E+="px"),z==+z&&(z+="px"),P.width=E,P.height=z,P.clip="rect(0 "+E+" "+z+" 0)",this._viewBox&&o._engine.setViewBox.apply(this,this._viewBox),this},o._engine.setViewBox=function(E,z,P,D,j){o.eve("raphael.setViewBox",this,this._viewBox,[E,z,P,D,j]);var N,H,q=this.getSize(),x=q.width,ie=q.height;return j&&(P*(N=ie/D)<x&&(E-=(x-P*N)/2/N),D*(H=x/P)<ie&&(z-=(ie-D*H)/2/H)),this._viewBox=[E,z,P,D,!!j],this._viewBoxShift={dx:-E,dy:-z,scale:q},this.forEach(function(ge){ge.transform("...")}),this},o._engine.initWin=function(E){var z=E.document;z.styleSheets.length<31?z.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):z.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!z.namespaces.rvml&&z.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),ee=function(P){return z.createElement("<rvml:"+P+' class="rvml">')}}catch{ee=function(D){return z.createElement("<"+D+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},o._engine.initWin(o._g.win),o._engine.create=function(){var E=o._getContainer.apply(0,arguments),z=E.container,P=E.height,D=E.width,j=E.x,N=E.y;if(!z)throw new Error("VML container not found.");var H=new o._Paper,q=H.canvas=o._g.doc.createElement("div"),x=q.style;return j=j||0,N=N||0,D=D||512,P=P||342,H.width=D,H.height=P,D==+D&&(D+="px"),P==+P&&(P+="px"),H.coordsize=216e5+T+216e5,H.coordorigin="0 0",H.span=o._g.doc.createElement("span"),H.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",q.appendChild(H.span),x.cssText=o.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",D,P),z==1?(o._g.doc.body.appendChild(q),x.left=j+"px",x.top=N+"px",x.position="absolute"):z.firstChild?z.insertBefore(q,z.firstChild):z.appendChild(q),H.renderfix=function(){},H},o.prototype.clear=function(){o.eve("raphael.clear",this),this.canvas.innerHTML=m,this.span=o._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},o.prototype.remove=function(){for(var E in o.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;return!0};var Z=o.st;for(var M in ae)ae[l](M)&&!Z[l](M)&&(Z[M]=function(E){return function(){var z=arguments;return this.forEach(function(P){P[E].apply(P,z)})}}(M))}}.apply(i,a))===void 0||(t.exports=n)}])})})(o4);var BT=o4.exports;const hr=_r(BT);class cn{points;constructor(e=[]){this.points=e}toSVGPathData(){const e=[];for(let t=0,i=this.length;t<i;t++)e.push([t===0?"M":"L",this.points[t].x,this.points[t].y]);return e}toSVGPathD(){let e="";for(let t=0,i=this.length;t<i;t++)e+=(t===0?"M":"L")+this.points[t].x+","+this.points[t].y;return e}get length(){return this.points.length}addPoint(e){this.points.push(e)}getPoint(e){return this.points[e]}isContainPoint(e){const t=e.x,i=e.y,s=this.length;let a=!1;const n=2e-10;for(let o=0,l=s-1;o<s;l=o,o++){const h=this.points[o].x,u=this.points[o].y,d=this.points[l].x,c=this.points[l].y;if(h===t&&u===i||d===t&&c===i||i===u&&i===c)return!0;if(i>=u&&i<c||i<u&&i>=c){const f=(d-h)/(c-u),p=h+f*(i-u);if(p===t||Math.abs(p-t)<n)return!0;p>t&&(a=!a)}}return a}[Symbol.iterator](){let e=0;return{next:()=>({value:e>=this.length-1?this.points[++e]:void 0,done:e>=this.length})}}static generateInMultiplePoint(e,t,i,s,a=1){const n=new cn;for(let o=0;o<=a*i;o+=1){const l=Math.floor(o/a)/i*2*Math.PI,h=e+Math.cos(l)*s,u=t+Math.sin(l)*s;n.addPoint(new Ct({x:h,y:u}))}return n}}hr.easing_formulas.swing=function(r){return r+Math.sin(r*Math.PI*2)/2},hr.easing_formulas.may_cause_seizures=function(r){return r+.2*Math.random()-.1};function VT(r,e,t){let i;return r&&typeof r=="object"&&r.canvas?i=r:r&&(typeof r=="string"||r instanceof HTMLElement)?i=hr(r,e,t):i=hr(0,0,e,t),i}hr.fn.importSVG=function(r,e){const t=HT.fromRawSVG(r);return t.toRaphael(this,(i,s)=>{t.save(),e&&e(i),s(),t.restore()}),this},hr.fn.NPolygonPath=function(r,e,t,i,s=2){return{shape:this.path(cn.generateInMultiplePoint(r,e,t,i,s).toSVGPathD()),afterPath:cn.generateInMultiplePoint(r,e,t*s,i,1).toSVGPathD()}},hr.fn.zoom=function(r=1){return this.setViewBox(0,0,this.width/r,this.height/r),this},hr.fn.brickwall=function(r,e,t,i,s){for(var a=i/s,n=t/3,o={fill:"firebrick",stroke:"#CCC"},l=0;l<s;l+=1){var h=this.rect(0,0,n,a).attr(o),u=this.rect(0,0,2*n,a).attr(o);l%2?(h.transform("T"+r+","+(e+l*a)),u.transform("T"+(r+n)+","+(e+l*a))):(u.transform("T"+r+","+(e+l*a)),h.transform("T"+(r+2*n)+","+(e+l*a)))}},hr.fn.rosetta=function(r,e,t,i,s){const a=Ms.generateRosetta(r,e,t,i,s);return a.center,this.path(a.toSVGPathD())},hr.fn.moon=function(r){r=r||{},r.r=typeof r.r=="number"?r.r:100,r.phase=typeof r.phase=="number"?r.phase:.25,r.x=typeof r.x=="number"?r.x:0,r.y=typeof r.y=="number"?r.y:0,this.circle(r.r+r.x,r.r+r.y,r.r).attr({"stroke-width":0,fill:"#999"});function e(i){i=typeof i=="number"?i:.25,i=Math.max(0,Math.min(1,i)),i=(i-.5)*2;let s="M"+r.r+",0";s+="a"+r.r+","+r.r+" 0 0,0 0,"+r.r*2;let a=i>0?0:1;return i=Math.abs(i),i=i||1e-4,r.inner_r=r.r/Math.pow(i,.5),s+="M"+r.r+","+r.r*2,s+="a"+r.inner_r+","+r.inner_r+" 0 0,"+a+" 0,"+r.r*-2,s}var t=this.path(e(r.phase)).attr({"stroke-width":0,stroke:"#999",fill:"#FF9"}).transform("T"+r.x+","+r.y);return{setPhase:function(i){t.attr("path",e(i))}}},hr.fn.star=function(r,e,t){let i="M"+r+","+(e-t);for(var s=0;s<6;s+=1){const a=270+s*144,n=r+t*Math.cos(a*Math.PI/180),o=e+t*Math.sin(a*Math.PI/180);i+="L"+n+","+o}return this.path(i).attr("stroke-width",0).attr("fill","red")},hr.fn.heart=function(r=150,e=300){let t="M"+r+","+e;return t+="l120,-175a50,50 0 0,0 -120,-75a50,50 0 0,0 -120,75l120,175",this.path(t).attr("stroke","red").attr("fill","pink")},hr.el.redder=function(){const r=hr.getRGB(this.attr("fill"));r.r+=51,this.attr("fill","rgb("+r.r+","+r.g+","+r.b+")")},hr.installCustomAttributes=function(r){r.customAttributes.redness=function(e){const t=255*(1-e/100);return{fill:"rgb(255,"+t+", "+t+")"}},r.customAttributes.progress=function(e){const t=this.data("progresspath"),i=this.attr(),s={x:0,y:0},a=this.data("progresstrail");if(!t)return{transform:"t0,0"};Object.prototype.hasOwnProperty.call(i,"width")&&(s.x=-this.attr("width")/2,s.y=-this.attr("height")/2);const n=t.getTotalLength(),o=t.getPointAtLength(e*n);return a&&a.attr("path",t.getSubpath(0,e*n)),{transform:"t"+(o.x+s.x)+","+(o.y+s.y)+"r"+o.alpha}}};const Ph=hr;class is{pgs=[];history=[];save(){this.history.push(cf(this.pgs))}restore(){const e=this.history.pop();e&&(this.pgs=e)}get size(){let e=0,t=0;return this.pgs.forEach(i=>{const s=i.pg;if(s){const[a,n,o,l]=s.bounds,[h,u]=s.size;e=Math.max(e,a,a+h,o),t=Math.max(t,n,n+u,l)}}),[Math.ceil(e),Math.ceil(t)]}static fromRawSVG(e){return is.fromRawSVGUseRappar(e)}static fromRawSVGUseRappar(e){const t=new is,i=i4(e);for(let s=0,a=i.length;s<a;s++){const n=i[s];if(n.type=="viewbox"&&n.width&&n.height)continue;const o={attrs:{}};for(const l in n)l==="type"||l==="path"||l==="transform"||(o.attrs[l]=n[l]);switch(n.type){case"path":o.d=n.path,o.pg=Ms.fromSVGPathD(n.path,n.transform);break}t.pgs.push(o)}return t}toRaphael(e,t){let i;e instanceof HTMLElement?i=Ph(HTMLElement):typeof e=="string"?i=Ph(document.getElementById(e)):i=e;const[s,a]=this.size;i.setSize(s,a);const n=(o=!1)=>{for(let l=0,h=this.pgs.length;l<h;l++){const u=this.pgs[l];if(u.pg&&(u.raphaelPath?u.raphaelPath.attr("path",u.pg.toSVGPathD()):u.raphaelPath=i.path(u.pg.toSVGPathD()),u.raphaelPath.attr(u.attrs)),o&&t){const d=c=>{const{x:f,y:p}=Ur(i.canvas,c),g=this.pgs.find(y=>y.raphaelPath?.isPointInside(f,p));g&&t?.(g,n)};u.raphaelPath?.unclick(d),u.raphaelPath?.click(d)}}};return n(!0),i}toCanvasOperation(e,t){let i;typeof e=="string"?i=document.getElementById(e):i=e;const[s,a]=this.size;i.width=s,i.height=a;const n=new zh(i),o=()=>{n.clearRect(0,0,s,a);for(let h=0,u=this.pgs.length;h<u;h++){const d=this.pgs[h];d.pg&&(n.save(),this.toCanvasAttrs(n,d.attrs),d.pg.toCanvas(n),d.attrs.stroke!=="none"&&n.stroke(),d.attrs.fill!=="none"&&n.fill(),n.restore())}};o();const l=h=>{const{x:u,y:d}=Ur(n.canvas,h),c=this.pgs.find(f=>f.pg?.isPointInPath(u,d));c&&t?.(c,o)};return i.removeEventListener("click",l),i.addEventListener("click",l),n}toCanvasAttrs(e,t){for(const i in t){const s=t[i];switch(i){case"fill":e.fillStyle=String(s);break;case"stroke":e.strokeStyle=String(s);break;case"stroke-width":e.lineWidth=Number(s);break;case"stroke-linecap":e.lineCap=s;break;case"stroke-linejoin":e.lineJoin=s;break}}}static toDownloadSVGElement(e,t="shape"){ah(bc(e),`${t}.svg`)}toDownloadSVGElement(e,t="shape"){return is.toDownloadSVGElement(e,t),this}static toDownloadSVGString(e,t="shape"){ah(sh(e),`${t}.svg`)}toDownloadSVGString(e,t="shape"){return is.toDownloadSVGString(e,t),this}static getSVGDOM(e){if(e instanceof HTMLObjectElement||e instanceof HTMLIFrameElement)return e.contentDocument;if(e instanceof HTMLEmbedElement)return e.getSVGDocument()}}const HT=is;class zh{canvas;context;customContext;constructor(e){this.canvas=e,this.context=e.getContext("2d",{willReadFrequently:!0}),this.customContext=new fn({canvas:this.canvas,width:this.canvas.width,height:this.canvas.height})}set lineWidth(e){this.context.lineWidth=e,this.customContext.lineWidth=e}get lineWidth(){return this.context.lineWidth}set lineCap(e){this.context.lineCap=e,this.customContext.lineCap=e}get lineCap(){return this.context.lineCap}set lineJoin(e){this.context.lineJoin=e,this.customContext.lineCap=e}get lineJoin(){return this.context.lineJoin}set lineDashOffset(e){this.context.lineDashOffset=e,this.customContext.lineDashOffset=e}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(e){this.context.miterLimit=e,this.customContext.miterLimit=e}get miterLimit(){return this.context.miterLimit}set globalAlpha(e){this.context.globalAlpha=e,this.customContext.globalAlpha=e}get globalAlpha(){return this.context.globalAlpha}set fillStyle(e){typeof e=="string"||e instanceof CanvasGradient||e instanceof CanvasPattern?(this.context.fillStyle=e,this.customContext.fillStyle=e):(this.context.fillStyle=e.gradient,this.customContext.fillStyle=e.gradientCustom)}get fillStyle(){return this.context.fillStyle}set strokeStyle(e){typeof e=="string"||e instanceof CanvasGradient||e instanceof CanvasPattern?(this.context.strokeStyle=e,this.customContext.strokeStyle=e):(this.context.strokeStyle=e.gradient,this.customContext.strokeStyle=e.gradientCustom)}get strokeStyle(){return this.context.strokeStyle}set font(e){this.context.font=e,this.customContext.font=e}get font(){return this.context.font}fill(){return this.context.fill(),this.customContext.fill(),this}fillRect(e,t,i,s){return this.context.fillRect(e,t,i,s),this.customContext.fillRect(e,t,i,s),this}fillText(e,t,i,s){return this.context.fillText(e,t,i,s),this.customContext.fillText(e,t,i),this}setLineDash(e){return this.context.setLineDash(e),this.customContext.setLineDash(e),this}stroke(){return this.context.stroke(),this.customContext.stroke(),this}strokeText(e,t,i,s){return this.context.strokeText(e,t,i,s),this.customContext.strokeText(e,t,i),this}strokeRect(e,t,i,s){return this.context.strokeRect(e,t,i,s),this.customContext.strokeRect(e,t,i,s),this}clearRect(e=0,t=0,i=this.canvas.width,s=this.canvas.height){return this.context.clearRect(e,t,i,s),this.customContext.clearRect(e,t,i,s),this}save(){return this.context.save(),this.customContext.save(),this}restore(){return this.context.restore(),this.customContext.restore(),this}beginPath(){return this.context.beginPath(),this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext.closePath(),this}moveTo(e,t){return this.context.moveTo(e,t),this.customContext.moveTo(e,t),this}lineTo(e,t){return this.context.lineTo(e,t),this.customContext.lineTo(e,t),this}arc(e,t,i,s,a,n){return this.context.arc(e,t,i,s,a,n),this.customContext.arc(e,t,i,s,a,n?-1:1),this}arcTo(e,t,i,s,a){return this.context.arcTo(e,t,i,s,a),this.customContext.arcTo(e,t,i,s,a),this}quadraticCurveTo(e,t,i,s){return this.context.quadraticCurveTo(e,t,i,s),this.customContext.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,a,n){return this.context.bezierCurveTo(e,t,i,s,a,n),this.customContext.bezierCurveTo(e,t,i,s,a,n),this}rect(e,t,i,s){return this.context.rect(e,t,i,s),this.customContext.rect(e,t,i,s),this}translate(e,t){return this.context.translate(e,t),this.customContext.translate(e,t),this}rotate(e){return this.context.rotate(e),this.customContext.rotate(e),this}scale(e,t){return this.context.scale(e,t),this.customContext.scale(e,t),this}createLinearGradient(e,t,i,s,a){const n=this.context.createLinearGradient(e,t,i,s),o=this.customContext.createLinearGradient(e,t,i,s);return a&&Object.keys(a).forEach(l=>{const h=parseFloat(l);n.addColorStop(h,a[h]),o.addColorStop(h,a[h])}),{gradient:n,gradientCustom:o}}createRadialGradient(e,t,i,s,a,n,o){const l=this.context.createRadialGradient(e,t,i,s,a,n),h=this.customContext.createRadialGradient(e,t,i,s,a,n);return o&&Object.keys(o).forEach(u=>{const d=parseFloat(u);l.addColorStop(d,o[d]),h.addColorStop(d,o[d])}),{gradient:l,gradientCustom:h}}drawImage(e,t=0,i=0){return this.context.drawImage(e,t,i),this.customContext.drawImage(e,t,i),this}getImageData(e,t,i,s,a){return this.context.getImageData(e,t,i,s,a)}putImageData(e,t=0,i=0){return this.context.putImageData(e,t,i)}toRawSVG(){const e=this.customContext.getSerializedSvg(!0),t=this.customContext.getSvg();return{raw:e,element:t}}toSVGOperation(){const{raw:e}=this.toRawSVG();return is.fromRawSVG(e)}}(function(){let r=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(e){const t=new Date().getTime(),i=Math.max(0,16-(t-r)),s=window.setTimeout(function(){e(t+i)},i);return r=t+i,s}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})})();const kh=r=>{function e(t){const i=window.requestAnimationFrame(e);r(t,i)}return window.requestAnimationFrame(e)},WT=()=>Math.random()*16777215,qT=()=>`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`,YT=()=>`#${(~~(Math.random()*(1<<24))).toString(16)}`,l4=function(r){let e="00000"+(r|0).toString(16);return e="#"+e.substring(e.length-6),e},h4=function(r,e=1){const t=r>>16&255,i=r>>8&255,s=r&255,a=e<0?0:e>1?1:e;return a===1?"rgb("+t+","+i+","+s+")":"rgba("+t+","+i+","+s+","+a+")"},kl=function(r){return r[0]==="#"&&(r=r.slice(1)),parseInt(r,16)},Eh=function(r,e=1){const t=kl(r);return h4(t,e)},XT=r=>{const t=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(r);return t?"#"+((1<<24)+(parseInt(t[1])<<16)+(parseInt(t[2])<<8)+parseInt(t[3])).toString(16).slice(1):""};function KT(r,e,t,i){let s,a,n;r=r/360,e=e/100,t=t/100;const o=Math.floor(r*6),l=r*6-o,h=t*(1-e),u=t*(1-l*e),d=t*(1-(1-l)*e);switch(o%6){case 0:s=t,a=d,n=h;break;case 1:s=u,a=t,n=h;break;case 2:s=h,a=t,n=d;break;case 3:s=h,a=u,n=t;break;case 4:s=d,a=h,n=t;break;case 5:default:s=t,a=h,n=u;break}return{r:Math.round(s*255),g:Math.round(a*255),b:Math.round(n*255),a:i??1}}function ZT(r,e,t,i){const s=Math.max(r,e,t),a=Math.min(r,e,t),n=s-a,o=s===0?0:n/s,l=s/255;let h;switch(s){case a:h=0;break;case r:h=e-t+n*(e<t?6:0),h/=6*n;break;case e:h=t-r+n*2,h/=6*n;break;case t:default:h=r-e+n*4,h/=6*n;break}return{h:Math.round(h*360),s:Math.round(o*100),v:Math.round(l*100),a:i??1}}function JT(r,e){let t=parseInt(r.substring(1,3),16),i=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);t==0&&(t=32),i==0&&(i=32),s==0&&(s=32),t=t*(100+e)/100,i=i*(100+e)/100,s=s*(100+e)/100,t=t<255?t:255,i=i<255?i:255,s=s<255?s:255,t=Math.round(t),i=Math.round(i),s=Math.round(s);const a=t.toString(16).length==1?"0"+t.toString(16):t.toString(16),n=i.toString(16).length==1?"0"+i.toString(16):i.toString(16),o=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+n+o}class QT extends c2{container;ctx;config;mouse;keyboard;resizeObserver;installedPlugins=new Map;animateFrameID;constructor(e,t={}){super(),this.container=e,this.ctx=new zh(this.container),this.config=pf(t,cT),e instanceof HTMLCanvasElement&&(this.config.width=e.width,this.config.height=e.height),this.resizeObserver=new ResizeObserver(i=>{const{width:s,height:a}=i[0].contentRect;this.emit("resizeRoot",s,a)}),this.resizeObserver.observe(this.container),this.mouse=new vT(this),this.keyboard=new mT(this)}renderFrame(e){kh((t,i)=>{this.animateFrameID=i,e(this)})}destroyFrame(){typeof this.animateFrameID<"u"&&window.cancelAnimationFrame(this.animateFrameID)}destroy(){this.removeAllListeners(),this.destroyPlugin(Array.from(this.installedPlugins.keys())),this.resizeObserver.disconnect(),this.mouse?.destroy(),this.keyboard?.destroy(),this.destroyFrame()}drawMouseMoveLine(e={}){switch(e.type){case"brush":e.typeOptions=e.typeOptions||{brush_size:10,brush_density:50,brush_color:"#000000"};const t=this.ctx.getImageData(0,0,this.config.width,this.config.height),i=t.data,s=kl(e.typeOptions.brush_color);let a=!1;this.on("mouseDown",()=>{a=!0}),this.on("mouseUp",()=>{a=!1}),this.on("mouseMove",()=>{if(a){for(let n=0;n<e.typeOptions.brush_density;n++){const o=Math.random()*Math.PI*2,l=Math.random()*e.typeOptions.brush_size,h=this.mouse.point.x+Math.cos(o)*l|0,u=this.mouse.point.y+Math.sin(o)*l|0,d=(h+u*t.width)*4;i[d]=s>>16&255,i[d+1]=s>>8&255,i[d+2]=s&255,i[d+3]=255}this.ctx.putImageData(t)}});break;case"line":default:this.on("mouseDown",()=>{this.ctx.beginPath(),this.ctx.moveTo(this.mouse.point.x,this.mouse.point.y)}),this.on("mouseMove",()=>{this.ctx.lineTo(this.mouse.point.x,this.mouse.point.y),e.extra?.(this),this.ctx.stroke()}),this.on("mouseUp",()=>{this.ctx.closePath()})}}use(e,...t){return this.installedPlugins.has(e.name)||(this.installedPlugins.set(e.name,e),e.install(this,...t)),this}getPlugin(e){return this.installedPlugins.get(e)}getPlugins(e){return e.map(t=>this.getPlugin(t))}enablePlugin(e){return Array.isArray(e)||(e=[e]),this.getPlugins(e)?.forEach(i=>i?.enable?.()),this}disablePlugin(e){return Array.isArray(e)||(e=[e]),this.getPlugins(e)?.forEach(i=>i?.disable?.()),this}destroyPlugin(e){return Array.isArray(e)||(e=[e]),this.getPlugins(e)?.forEach(i=>i?.destroy()),this}isPluginEnable(e){return this.getPlugin(e)?.isEnabled?.()??!1}}const xT={colorPrimary:tt.getCSSVar("--color-primary"),colorRed:tt.getCSSVar("--color-red"),colorOrange:tt.getCSSVar("--color-orange"),colorYellow:tt.getCSSVar("--color-yellow"),colorGreen:tt.getCSSVar("--color-green"),colorBlue:tt.getCSSVar("--color-blue"),colorPurple:tt.getCSSVar("--color-purple"),colorBlack:tt.getCSSVar("--color-black"),colorGray0:tt.getCSSVar("--color-gray-0"),colorGray3:tt.getCSSVar("--color-gray-3"),colorGray6:tt.getCSSVar("--color-gray-6"),colorGray9:tt.getCSSVar("--color-gray-9"),colorGrayCC:tt.getCSSVar("--color-gray-cc"),colorGrayDD:tt.getCSSVar("--color-gray-dd"),colorGrayE6:tt.getCSSVar("--color-gray-e6"),colorGrayEE:tt.getCSSVar("--color-gray-ee"),colorGrayEF:tt.getCSSVar("--color-gray-ef"),colorGrayF5:tt.getCSSVar("--color-gray-f5"),colorGrayFF:tt.getCSSVar("--color-gray-ff"),fontLineHeight:tt.getCSSVar("--font-line-height"),fontSize32:tt.getCSSVar("--font-size-32"),fontSize24:tt.getCSSVar("--font-size-24"),fontSize18:tt.getCSSVar("--font-size-18"),fontSize16:tt.getCSSVar("--font-size-16"),fontSize14:tt.getCSSVar("--font-size-14"),fontSize12:tt.getCSSVar("--font-size-12"),fontSize11:tt.getCSSVar("--font-size-11"),gap4:tt.getCSSVar("-Gap-4"),gap8:tt.getCSSVar("-Gap-8"),gap12:tt.getCSSVar("-Gap-12"),gap16:tt.getCSSVar("-Gap-16"),gap20:tt.getCSSVar("-Gap-20"),gap40:tt.getCSSVar("-Gap-40"),height44:tt.getCSSVar("--height-44"),height32:tt.getCSSVar("--height-32"),borderRadius:tt.getCSSVar("--border-radius")};function eC(r){return btoa(encodeURIComponent(r)).replaceAll("+","*").replaceAll("/","-").replaceAll("=","")}function tC(r){let e=r.replaceAll("*","+").replaceAll("-","/");const t=e.length%4;return t&&(e=e.padEnd(e.length+(4-t),"=")),decodeURIComponent(atob(e))}function Ah(r=window.location.href){return Do(URL)?new URL(r):u4(r)}function u4(r=window.location.href){const e="(?<protocol>https?:)",t="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",s="(?<search>(?:\\?[^#]*)?)",a="(?<hash>(?:#.*)?)",o=new RegExp(`^${e}//${t}${i}${s}${a}$`).exec(r);return{href:r,protocol:o?.groups?.protocol??"",host:o?.groups?.host??"",hostname:o?.groups?.hostname??"",port:o?.groups?.port??"",pathname:o?.groups?.pathname??"",search:o?.groups?.search??"",hash:o?.groups?.hash??""}}function rC(r){const e=Ah(r);return e.protocol==="http:"||e.protocol==="https:"}function f4(r=window.location.href){const e=Ah(r),t=e.href.indexOf(e.hash);return e.hash&&t>=0?e.href.substring(0,t):e.href}function iC(r=location.search){r=decodeURIComponent(r).replace(/^[#?&]/,"");const e={};if(!r)return e;const t=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let i=t.exec(r);for(;i;)e[i[1]]=i[2],i=t.exec(r);return e}function sC(r){return Array.from(new URLSearchParams(r)).reduce((e,[t,i])=>Object.assign({},e,{[t]:e[t]?(Array.isArray(e[t])?e[t]:[e[t]]).concat(i):i}),{})}function d4(r){let e="";for(const t in r)e&&(e+="&"),e+=`${t}=${r[t]}`;return e}function aC(r){return new URLSearchParams(r).toString()}function Mh(r){return"?"+[...r.entries()].map(e=>encodeURIComponent(e[0])+"="+encodeURIComponent(e[1]instanceof File?e[1].name:e[1])).join("&")}function El(r,e){return r.indexOf("?")>=0?r+e.replace(/^\?/,"&"):r.replace(/(?:\?.*)?$/,e.replace(/^[&?]/,"?"))}function nC(r){let e="";new MutationObserver(function(i){window.location.href!==e&&(e=window.location.href,r&&r(location.href))}).observe(document,{attributes:!0,childList:!0,subtree:!0})}function oC(r){window.addEventListener("hashchange",()=>{r(location.hash)})}function lC(r){window.addEventListener("popstate",r,!1)}var c4={exports:{}};(function(r){var e={};r.exports=e,e.parse=function(t,i){for(var s=e.bin.readUshort,a=e.bin.readUint,h=0,n={},o=new Uint8Array(t),l=o.length-4;a(o,l)!=101010256;)l--;var h=l;h+=4,h+=4;var u=s(o,h);h+=2,s(o,h),h+=2;var d=a(o,h);h+=4;var c=a(o,h);h+=4,h=c;for(var f=0;f<u;f++){a(o,h),h+=4,h+=4,h+=4,h+=4,a(o,h),h+=4;var d=a(o,h);h+=4;var p=a(o,h);h+=4;var g=s(o,h),y=s(o,h+2),_=s(o,h+4);h+=6,h+=8;var T=a(o,h);h+=4,h+=g+y+_,e._readLocal(o,T,n,d,p,i)}return n},e._readLocal=function(t,i,s,a,n,o){var l=e.bin.readUshort,h=e.bin.readUint;h(t,i),i+=4,l(t,i),i+=2,l(t,i),i+=2;var u=l(t,i);i+=2,h(t,i),i+=4,h(t,i),i+=4,i+=8;var d=l(t,i);i+=2;var c=l(t,i);i+=2;var f=e.bin.readUTF8(t,i,d);if(i+=d,i+=c,o){s[f]={size:n,csize:a};return}var p=new Uint8Array(t.buffer,i);if(u==0)s[f]=new Uint8Array(p.buffer.slice(i,i+a));else if(u==8){var g=new Uint8Array(n);e.inflateRaw(p,g),s[f]=g}else throw"unknown compression method: "+u},e.inflateRaw=function(t,i){return e.F.inflate(t,i)},e.inflate=function(t,i){return t[0],t[1],e.inflateRaw(new Uint8Array(t.buffer,t.byteOffset+2,t.length-6),i)},e.deflate=function(t,i){i==null&&(i={level:6});var s=0,a=new Uint8Array(50+Math.floor(t.length*1.1));a[s]=120,a[s+1]=156,s+=2,s=e.F.deflateRaw(t,a,s,i.level);var n=e.adler(t,0,t.length);return a[s+0]=n>>>24&255,a[s+1]=n>>>16&255,a[s+2]=n>>>8&255,a[s+3]=n>>>0&255,new Uint8Array(a.buffer,0,s+4)},e.deflateRaw=function(t,i){i==null&&(i={level:6});var s=new Uint8Array(50+Math.floor(t.length*1.1)),a=e.F.deflateRaw(t,s,a,i.level);return new Uint8Array(s.buffer,0,a)},e.encode=function(t,i){i==null&&(i=!1);var s=0,a=e.bin.writeUint,n=e.bin.writeUshort,o={};for(var l in t){var h=!e._noNeed(l)&&!i,u=t[l],d=e.crc.crc(u,0,u.length);o[l]={cpr:h,usize:u.length,crc:d,file:h?e.deflateRaw(u):u}}for(var l in o)s+=o[l].file.length+30+46+2*e.bin.sizeUTF8(l);s+=22;var c=new Uint8Array(s),f=0,p=[];for(var l in o){var g=o[l];p.push(f),f=e._writeHeader(c,f,l,g,0)}var y=0,_=f;for(var l in o){var g=o[l];p.push(f),f=e._writeHeader(c,f,l,g,1,p[y++])}var T=f-_;return a(c,f,101010256),f+=4,f+=4,n(c,f,y),f+=2,n(c,f,y),f+=2,a(c,f,T),f+=4,a(c,f,_),f+=4,f+=2,c.buffer},e._noNeed=function(t){var i=t.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(i)!=-1},e._writeHeader=function(t,i,s,a,n,o){var l=e.bin.writeUint,h=e.bin.writeUshort,u=a.file;l(t,i,n==0?67324752:33639248),i+=4,n==1&&(i+=2),h(t,i,20),i+=2,h(t,i,0),i+=2,h(t,i,a.cpr?8:0),i+=2,l(t,i,0),i+=4,l(t,i,a.crc),i+=4,l(t,i,u.length),i+=4,l(t,i,a.usize),i+=4,h(t,i,e.bin.sizeUTF8(s)),i+=2,h(t,i,0),i+=2,n==1&&(i+=2,i+=2,i+=6,l(t,i,o),i+=4);var d=e.bin.writeUTF8(t,i,s);return i+=d,n==0&&(t.set(u,i),i+=u.length),i},e.crc={table:function(){for(var t=new Uint32Array(256),i=0;i<256;i++){for(var s=i,a=0;a<8;a++)s&1?s=3988292384^s>>>1:s=s>>>1;t[i]=s}return t}(),update:function(t,i,s,a){for(var n=0;n<a;n++)t=e.crc.table[(t^i[s+n])&255]^t>>>8;return t},crc:function(t,i,s){return e.crc.update(4294967295,t,i,s)^4294967295}},e.adler=function(t,i,s){for(var a=1,n=0,o=i,l=i+s;o<l;){for(var h=Math.min(o+5552,l);o<h;)a+=t[o++],n+=a;a=a%65521,n=n%65521}return n<<16|a},e.bin={readUshort:function(t,i){return t[i]|t[i+1]<<8},writeUshort:function(t,i,s){t[i]=s&255,t[i+1]=s>>8&255},readUint:function(t,i){return t[i+3]*(256*256*256)+(t[i+2]<<16|t[i+1]<<8|t[i])},writeUint:function(t,i,s){t[i]=s&255,t[i+1]=s>>8&255,t[i+2]=s>>16&255,t[i+3]=s>>24&255},readASCII:function(t,i,s){for(var a="",n=0;n<s;n++)a+=String.fromCharCode(t[i+n]);return a},writeASCII:function(t,i,s){for(var a=0;a<s.length;a++)t[i+a]=s.charCodeAt(a)},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,i,s){for(var a="",n,o=0;o<s;o++)a+="%"+e.bin.pad(t[i+o].toString(16));try{n=decodeURIComponent(a)}catch{return e.bin.readASCII(t,i,s)}return n},writeUTF8:function(t,i,s){for(var a=s.length,n=0,o=0;o<a;o++){var l=s.charCodeAt(o);if(!(l&4294967295-128+1))t[i+n]=l,n++;else if(!(l&4294967295-2048+1))t[i+n]=192|l>>6,t[i+n+1]=128|l>>0&63,n+=2;else if(!(l&4294967295-65536+1))t[i+n]=224|l>>12,t[i+n+1]=128|l>>6&63,t[i+n+2]=128|l>>0&63,n+=3;else if(!(l&4294967295-(1<<21)+1))t[i+n]=240|l>>18,t[i+n+1]=128|l>>12&63,t[i+n+2]=128|l>>6&63,t[i+n+3]=128|l>>0&63,n+=4;else throw"e"}return n},sizeUTF8:function(t){for(var i=t.length,s=0,a=0;a<i;a++){var n=t.charCodeAt(a);if(!(n&4294967295-128+1))s++;else if(!(n&4294967295-2048+1))s+=2;else if(!(n&4294967295-65536+1))s+=3;else if(!(n&4294967295-(1<<21)+1))s+=4;else throw"e"}return s}},e.F={},e.F.deflateRaw=function(t,i,s,a){var n=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]],o=n[a],l=e.F.U,h=e.F._goodIndex;e.F._hash;var u=e.F._putsE,d=0,c=s<<3,f=0,p=t.length;if(a==0){for(;d<p;){var g=Math.min(65535,p-d);u(i,c,d+g==p?1:0),c=e.F._copyExact(t,d,g,i,c+8),d+=g}return c>>>3}var y=l.lits,_=l.strt,T=l.prev,m=0,w=0,O=0,k=0,I=0,$=0;for(p>2&&($=e.F._hash(t,0),_[$]=0),d=0;d<p;d++){if(I=$,d+1<p-2){$=e.F._hash(t,d+1);var G=d+1&32767;T[G]=_[$],_[$]=G}if(f<=d){(m>14e3||w>26697)&&p-d>100&&(f<d&&(y[m]=d-f,m+=2,f=d),c=e.F._writeBlock(d==p-1||f==p?1:0,y,m,k,t,O,d-O,i,c),m=w=k=0,O=d);var U=0;d<p-2&&(U=e.F._bestMatch(t,d,T,I,Math.min(o[2],p-d),o[3]));var g=U>>>16,V=U&65535;if(U!=0){var g=U>>>16,V=U&65535,X=h(g,l.of0);l.lhst[257+X]++;var te=h(V,l.df0);l.dhst[te]++,k+=l.exb[X]+l.dxb[te],y[m]=g<<23|d-f,y[m+1]=V<<16|X<<8|te,m+=2,f=d+g}else l.lhst[t[d]]++;w++}}for((O!=d||t.length==0)&&(f<d&&(y[m]=d-f,m+=2,f=d),c=e.F._writeBlock(1,y,m,k,t,O,d-O,i,c),m=0,w=0,m=w=k=0,O=d);c&7;)c++;return c>>>3},e.F._bestMatch=function(t,i,s,a,n,o){var l=i&32767,h=s[l],u=l-h+32768&32767;if(h==l||a!=e.F._hash(t,i-u))return 0;for(var d=0,c=0,f=Math.min(32767,i);u<=f&&--o!=0&&h!=l;){if(d==0||t[i+d]==t[i+d-u]){var p=e.F._howLong(t,i,u);if(p>d){if(d=p,c=u,d>=n)break;u+2<p&&(p=u+2);for(var g=0,y=0;y<p-2;y++){var _=i-u+y+32768&32767,T=s[_],m=_-T+32768&32767;m>g&&(g=m,h=_)}}}l=h,h=s[l],u+=l-h+32768&32767}return d<<16|c},e.F._howLong=function(t,i,s){if(t[i]!=t[i-s]||t[i+1]!=t[i+1-s]||t[i+2]!=t[i+2-s])return 0;var a=i,n=Math.min(t.length,i+258);for(i+=3;i<n&&t[i]==t[i-s];)i++;return i-a},e.F._hash=function(t,i){return(t[i]<<8|t[i+1])+(t[i+2]<<4)&65535},e.saved=0,e.F._writeBlock=function(t,i,s,a,n,o,l,h,u){var d=e.F.U,c=e.F._putsF,f=e.F._putsE,p,g,y,_,T,m,w,O,k;d.lhst[256]++,p=e.F.getTrees(),g=p[0],y=p[1],_=p[2],T=p[3],m=p[4],w=p[5],O=p[6],k=p[7];var I=(u+3&7?8-(u+3&7):0)+32+(l<<3),$=a+e.F.contSize(d.fltree,d.lhst)+e.F.contSize(d.fdtree,d.dhst),G=a+e.F.contSize(d.ltree,d.lhst)+e.F.contSize(d.dtree,d.dhst);G+=14+3*w+e.F.contSize(d.itree,d.ihst)+(d.ihst[16]*2+d.ihst[17]*3+d.ihst[18]*7);for(var U=0;U<286;U++)d.lhst[U]=0;for(var U=0;U<30;U++)d.dhst[U]=0;for(var U=0;U<19;U++)d.ihst[U]=0;var V=I<$&&I<G?0:$<G?1:2;if(c(h,u,t),c(h,u+1,V),u+=3,V==0){for(;u&7;)u++;u=e.F._copyExact(n,o,l,h,u)}else{var X,te;if(V==1&&(X=d.fltree,te=d.fdtree),V==2){e.F.makeCodes(d.ltree,g),e.F.revCodes(d.ltree,g),e.F.makeCodes(d.dtree,y),e.F.revCodes(d.dtree,y),e.F.makeCodes(d.itree,_),e.F.revCodes(d.itree,_),X=d.ltree,te=d.dtree,f(h,u,T-257),u+=5,f(h,u,m-1),u+=5,f(h,u,w-4),u+=4;for(var ee=0;ee<w;ee++)f(h,u+ee*3,d.itree[(d.ordr[ee]<<1)+1]);u+=3*w,u=e.F._codeTiny(O,d.itree,h,u),u=e.F._codeTiny(k,d.itree,h,u)}for(var oe=o,Ce=0;Ce<s;Ce+=2){for(var we=i[Ce],_e=we>>>23,ae=oe+(we&(1<<23)-1);oe<ae;)u=e.F._writeLit(n[oe++],X,h,u);if(_e!=0){var Z=i[Ce+1],M=Z>>16,E=Z>>8&255,z=Z&255;u=e.F._writeLit(257+E,X,h,u),f(h,u,_e-d.of0[E]),u+=d.exb[E],u=e.F._writeLit(z,te,h,u),c(h,u,M-d.df0[z]),u+=d.dxb[z],oe+=_e}}u=e.F._writeLit(256,X,h,u)}return u},e.F._copyExact=function(t,i,s,a,n){var o=n>>>3;return a[o]=s,a[o+1]=s>>>8,a[o+2]=255-a[o],a[o+3]=255-a[o+1],o+=4,a.set(new Uint8Array(t.buffer,i,s),o),n+(s+4<<3)},e.F.getTrees=function(){for(var t=e.F.U,i=e.F._hufTree(t.lhst,t.ltree,15),s=e.F._hufTree(t.dhst,t.dtree,15),a=[],n=e.F._lenCodes(t.ltree,a),o=[],l=e.F._lenCodes(t.dtree,o),h=0;h<a.length;h+=2)t.ihst[a[h]]++;for(var h=0;h<o.length;h+=2)t.ihst[o[h]]++;for(var u=e.F._hufTree(t.ihst,t.itree,7),d=19;d>4&&t.itree[(t.ordr[d-1]<<1)+1]==0;)d--;return[i,s,u,n,l,d,a,o]},e.F.getSecond=function(t){for(var i=[],s=0;s<t.length;s+=2)i.push(t[s+1]);return i},e.F.nonZero=function(t){for(var i="",s=0;s<t.length;s+=2)t[s+1]!=0&&(i+=(s>>1)+",");return i},e.F.contSize=function(t,i){for(var s=0,a=0;a<i.length;a++)s+=i[a]*t[(a<<1)+1];return s},e.F._codeTiny=function(t,i,s,a){for(var n=0;n<t.length;n+=2){var o=t[n],l=t[n+1];a=e.F._writeLit(o,i,s,a);var h=o==16?2:o==17?3:7;o>15&&(e.F._putsE(s,a,l,h),a+=h)}return a},e.F._lenCodes=function(t,i){for(var s=t.length;s!=2&&t[s-1]==0;)s-=2;for(var a=0;a<s;a+=2){var n=t[a+1],o=a+3<s?t[a+3]:-1,l=a+5<s?t[a+5]:-1,h=a==0?-1:t[a-1];if(n==0&&o==n&&l==n){for(var u=a+5;u+2<s&&t[u+2]==n;)u+=2;var d=Math.min(u+1-a>>>1,138);d<11?i.push(17,d-3):i.push(18,d-11),a+=d*2-2}else if(n==h&&o==n&&l==n){for(var u=a+5;u+2<s&&t[u+2]==n;)u+=2;var d=Math.min(u+1-a>>>1,6);i.push(16,d-3),a+=d*2-2}else i.push(n,0)}return s>>>1},e.F._hufTree=function(t,i,s){var a=[],n=t.length,o=i.length,l=0;for(l=0;l<o;l+=2)i[l]=0,i[l+1]=0;for(l=0;l<n;l++)t[l]!=0&&a.push({lit:l,f:t[l]});var h=a.length,u=a.slice(0);if(h==0)return 0;if(h==1){var d=a[0].lit,u=d==0?1:0;return i[(d<<1)+1]=1,i[(u<<1)+1]=1,1}a.sort(function(T,m){return T.f-m.f});var c=a[0],f=a[1],p=0,g=1,y=2;for(a[0]={lit:-1,f:c.f+f.f,l:c,r:f,d:0};g!=h-1;)p!=g&&(y==h||a[p].f<a[y].f)?c=a[p++]:c=a[y++],p!=g&&(y==h||a[p].f<a[y].f)?f=a[p++]:f=a[y++],a[g++]={lit:-1,f:c.f+f.f,l:c,r:f};var _=e.F.setDepth(a[g-1],0);for(_>s&&(e.F.restrictDepth(u,s,_),_=s),l=0;l<h;l++)i[(u[l].lit<<1)+1]=u[l].d;return _},e.F.setDepth=function(t,i){return t.lit!=-1?(t.d=i,i):Math.max(e.F.setDepth(t.l,i+1),e.F.setDepth(t.r,i+1))},e.F.restrictDepth=function(t,i,s){var a=0,n=1<<s-i,o=0;for(t.sort(function(h,u){return u.d==h.d?h.f-u.f:u.d-h.d}),a=0;a<t.length&&t[a].d>i;a++){var l=t[a].d;t[a].d=i,o+=n-(1<<s-l)}for(o=o>>>s-i;o>0;){var l=t[a].d;l<i?(t[a].d++,o-=1<<i-l-1):a++}for(;a>=0;a--)t[a].d==i&&o<0&&(t[a].d--,o++);o!=0&&console.log("debt left")},e.F._goodIndex=function(t,i){var s=0;return i[s|16]<=t&&(s|=16),i[s|8]<=t&&(s|=8),i[s|4]<=t&&(s|=4),i[s|2]<=t&&(s|=2),i[s|1]<=t&&(s|=1),s},e.F._writeLit=function(t,i,s,a){return e.F._putsF(s,a,i[t<<1]),a+i[(t<<1)+1]},e.F.inflate=function(t,i){var s=Uint8Array;if(t[0]==3&&t[1]==0)return i||new s(0);var a=e.F,n=a._bitsF,o=a._bitsE,l=a._decodeTiny,h=a.makeCodes,u=a.codes2map,d=a._get17,c=a.U,f=i==null;f&&(i=new s(t.length>>>2<<3));for(var p=0,g=0,y=0,_=0,T=0,m=0,w=0,O=0,k=0,I,$;p==0;){if(p=n(t,k,1),g=n(t,k+1,2),k+=3,g==0){k&7&&(k+=8-(k&7));var G=(k>>>3)+4,U=t[G-4]|t[G-3]<<8;f&&(i=e.F._check(i,O+U)),i.set(new s(t.buffer,t.byteOffset+G,U),O),k=G+U<<3,O+=U;continue}if(f&&(i=e.F._check(i,O+(1<<17))),g==1&&(I=c.flmap,$=c.fdmap,m=512-1,w=32-1),g==2){y=o(t,k,5)+257,_=o(t,k+5,5)+1,T=o(t,k+10,4)+4,k+=14;for(var V=0;V<38;V+=2)c.itree[V]=0,c.itree[V+1]=0;for(var X=1,V=0;V<T;V++){var te=o(t,k+V*3,3);c.itree[(c.ordr[V]<<1)+1]=te,te>X&&(X=te)}k+=3*T,h(c.itree,X),u(c.itree,X,c.imap),I=c.lmap,$=c.dmap,k=l(c.imap,(1<<X)-1,y+_,t,k,c.ttree);var ee=a._copyOut(c.ttree,0,y,c.ltree);m=(1<<ee)-1;var oe=a._copyOut(c.ttree,y,_,c.dtree);w=(1<<oe)-1,h(c.ltree,ee),u(c.ltree,ee,I),h(c.dtree,oe),u(c.dtree,oe,$)}for(;;){var Ce=I[d(t,k)&m];k+=Ce&15;var we=Ce>>>4;if(!(we>>>8))i[O++]=we;else{if(we==256)break;var _e=O+we-254;if(we>264){var ae=c.ldef[we-257];_e=O+(ae>>>3)+o(t,k,ae&7),k+=ae&7}var Z=$[d(t,k)&w];k+=Z&15;var M=Z>>>4,E=c.ddef[M],z=(E>>>4)+n(t,k,E&15);for(k+=E&15,f&&(i=e.F._check(i,O+(1<<17)));O<_e;)i[O]=i[O++-z],i[O]=i[O++-z],i[O]=i[O++-z],i[O]=i[O++-z];O=_e}}}return i.length==O?i:i.slice(0,O)},e.F._check=function(t,i){var s=t.length;if(i<=s)return t;var a=new Uint8Array(Math.max(s<<1,i));return a.set(t,0),a},e.F._decodeTiny=function(t,i,s,a,n,o){for(var l=e.F._bitsE,h=e.F._get17,u=0;u<s;){var d=t[h(a,n)&i];n+=d&15;var c=d>>>4;if(c<=15)o[u]=c,u++;else{var f=0,p=0;c==16?(p=3+l(a,n,2),n+=2,f=o[u-1]):c==17?(p=3+l(a,n,3),n+=3):c==18&&(p=11+l(a,n,7),n+=7);for(var g=u+p;u<g;)o[u]=f,u++}}return n},e.F._copyOut=function(t,i,s,a){for(var n=0,o=0,l=a.length>>>1;o<s;){var h=t[o+i];a[o<<1]=0,a[(o<<1)+1]=h,h>n&&(n=h),o++}for(;o<l;)a[o<<1]=0,a[(o<<1)+1]=0,o++;return n},e.F.makeCodes=function(t,i){for(var s=e.F.U,a=t.length,n,o,l,h,u,d=s.bl_count,h=0;h<=i;h++)d[h]=0;for(h=1;h<a;h+=2)d[t[h]]++;var c=s.next_code;for(n=0,d[0]=0,o=1;o<=i;o++)n=n+d[o-1]<<1,c[o]=n;for(l=0;l<a;l+=2)u=t[l+1],u!=0&&(t[l]=c[u],c[u]++)},e.F.codes2map=function(t,i,s){for(var a=t.length,n=e.F.U,o=n.rev15,l=0;l<a;l+=2)if(t[l+1]!=0)for(var h=l>>1,u=t[l+1],d=h<<4|u,c=i-u,f=t[l]<<c,p=f+(1<<c);f!=p;){var g=o[f]>>>15-i;s[g]=d,f++}},e.F.revCodes=function(t,i){for(var s=e.F.U.rev15,a=15-i,n=0;n<t.length;n+=2){var o=t[n]<<i-t[n+1];t[n]=s[o]>>>a}},e.F._putsE=function(t,i,s){s=s<<(i&7);var a=i>>>3;t[a]|=s,t[a+1]|=s>>>8},e.F._putsF=function(t,i,s){s=s<<(i&7);var a=i>>>3;t[a]|=s,t[a+1]|=s>>>8,t[a+2]|=s>>>16},e.F._bitsE=function(t,i,s){return(t[i>>>3]|t[(i>>>3)+1]<<8)>>>(i&7)&(1<<s)-1},e.F._bitsF=function(t,i,s){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16)>>>(i&7)&(1<<s)-1},e.F._get17=function(t,i){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16)>>>(i&7)},e.F._get25=function(t,i){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16|t[(i>>>3)+3]<<24)>>>(i&7)},e.F.U=function(){var t=Uint16Array,i=Uint32Array;return{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[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,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[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,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new i(286),dhst:new i(30),ihst:new i(19),lits:new i(15e3),strt:new t(65536),prev:new t(32768)}}(),function(){for(var t=e.F.U,i=32768,s=0;s<i;s++){var a=s;a=(a&2863311530)>>>1|(a&1431655765)<<1,a=(a&3435973836)>>>2|(a&858993459)<<2,a=(a&4042322160)>>>4|(a&252645135)<<4,a=(a&4278255360)>>>8|(a&16711935)<<8,t.rev15[s]=(a>>>16|a<<16)>>>17}function n(o,l,h){for(;l--!=0;)o.push(0,h)}for(var s=0;s<32;s++)t.ldef[s]=t.of0[s]<<3|t.exb[s],t.ddef[s]=t.df0[s]<<4|t.dxb[s];n(t.fltree,144,8),n(t.fltree,255-143,9),n(t.fltree,279-255,7),n(t.fltree,287-279,8),e.F.makeCodes(t.fltree,9),e.F.codes2map(t.fltree,9,t.flmap),e.F.revCodes(t.fltree,9),n(t.fdtree,32,5),e.F.makeCodes(t.fdtree,5),e.F.codes2map(t.fdtree,5,t.fdmap),e.F.revCodes(t.fdtree,5),n(t.itree,19,0),n(t.ltree,286,0),n(t.dtree,30,0),n(t.ttree,320,0)}()})(c4);var hC=c4.exports;const p4=_r(hC);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const uC=4,g4=0,v4=1,fC=2;function fa(r){let e=r.length;for(;--e>=0;)r[e]=0}const dC=0,m4=1,cC=2,pC=3,gC=258,Rh=29,pn=256,gn=pn+1+Rh,da=30,Oh=19,b4=2*gn+1,Rs=15,Ih=16,vC=7,$h=256,y4=16,_4=17,T4=18,Dh=new Uint8Array([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]),Al=new Uint8Array([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]),mC=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),C4=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bC=512,Oi=new Array((gn+2)*2);fa(Oi);const vn=new Array(da*2);fa(vn);const mn=new Array(bC);fa(mn);const bn=new Array(gC-pC+1);fa(bn);const Nh=new Array(Rh);fa(Nh);const Ml=new Array(da);fa(Ml);function Lh(r,e,t,i,s){this.static_tree=r,this.extra_bits=e,this.extra_base=t,this.elems=i,this.max_length=s,this.has_stree=r&&r.length}let w4,S4,P4;function Fh(r,e){this.dyn_tree=r,this.max_code=0,this.stat_desc=e}const z4=r=>r<256?mn[r]:mn[256+(r>>>7)],yn=(r,e)=>{r.pending_buf[r.pending++]=e&255,r.pending_buf[r.pending++]=e>>>8&255},Tr=(r,e,t)=>{r.bi_valid>Ih-t?(r.bi_buf|=e<<r.bi_valid&65535,yn(r,r.bi_buf),r.bi_buf=e>>Ih-r.bi_valid,r.bi_valid+=t-Ih):(r.bi_buf|=e<<r.bi_valid&65535,r.bi_valid+=t)},pi=(r,e,t)=>{Tr(r,t[e*2],t[e*2+1])},k4=(r,e)=>{let t=0;do t|=r&1,r>>>=1,t<<=1;while(--e>0);return t>>>1},yC=r=>{r.bi_valid===16?(yn(r,r.bi_buf),r.bi_buf=0,r.bi_valid=0):r.bi_valid>=8&&(r.pending_buf[r.pending++]=r.bi_buf&255,r.bi_buf>>=8,r.bi_valid-=8)},_C=(r,e)=>{const t=e.dyn_tree,i=e.max_code,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,n=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,u,d,c,f,p,g=0;for(c=0;c<=Rs;c++)r.bl_count[c]=0;for(t[r.heap[r.heap_max]*2+1]=0,h=r.heap_max+1;h<b4;h++)u=r.heap[h],c=t[t[u*2+1]*2+1]+1,c>l&&(c=l,g++),t[u*2+1]=c,!(u>i)&&(r.bl_count[c]++,f=0,u>=o&&(f=n[u-o]),p=t[u*2],r.opt_len+=p*(c+f),a&&(r.static_len+=p*(s[u*2+1]+f)));if(g!==0){do{for(c=l-1;r.bl_count[c]===0;)c--;r.bl_count[c]--,r.bl_count[c+1]+=2,r.bl_count[l]--,g-=2}while(g>0);for(c=l;c!==0;c--)for(u=r.bl_count[c];u!==0;)d=r.heap[--h],!(d>i)&&(t[d*2+1]!==c&&(r.opt_len+=(c-t[d*2+1])*t[d*2],t[d*2+1]=c),u--)}},E4=(r,e,t)=>{const i=new Array(Rs+1);let s=0,a,n;for(a=1;a<=Rs;a++)s=s+t[a-1]<<1,i[a]=s;for(n=0;n<=e;n++){let o=r[n*2+1];o!==0&&(r[n*2]=k4(i[o]++,o))}},TC=()=>{let r,e,t,i,s;const a=new Array(Rs+1);for(t=0,i=0;i<Rh-1;i++)for(Nh[i]=t,r=0;r<1<<Dh[i];r++)bn[t++]=i;for(bn[t-1]=i,s=0,i=0;i<16;i++)for(Ml[i]=s,r=0;r<1<<Al[i];r++)mn[s++]=i;for(s>>=7;i<da;i++)for(Ml[i]=s<<7,r=0;r<1<<Al[i]-7;r++)mn[256+s++]=i;for(e=0;e<=Rs;e++)a[e]=0;for(r=0;r<=143;)Oi[r*2+1]=8,r++,a[8]++;for(;r<=255;)Oi[r*2+1]=9,r++,a[9]++;for(;r<=279;)Oi[r*2+1]=7,r++,a[7]++;for(;r<=287;)Oi[r*2+1]=8,r++,a[8]++;for(E4(Oi,gn+1,a),r=0;r<da;r++)vn[r*2+1]=5,vn[r*2]=k4(r,5);w4=new Lh(Oi,Dh,pn+1,gn,Rs),S4=new Lh(vn,Al,0,da,Rs),P4=new Lh(new Array(0),mC,0,Oh,vC)},A4=r=>{let e;for(e=0;e<gn;e++)r.dyn_ltree[e*2]=0;for(e=0;e<da;e++)r.dyn_dtree[e*2]=0;for(e=0;e<Oh;e++)r.bl_tree[e*2]=0;r.dyn_ltree[$h*2]=1,r.opt_len=r.static_len=0,r.sym_next=r.matches=0},M4=r=>{r.bi_valid>8?yn(r,r.bi_buf):r.bi_valid>0&&(r.pending_buf[r.pending++]=r.bi_buf),r.bi_buf=0,r.bi_valid=0},R4=(r,e,t,i)=>{const s=e*2,a=t*2;return r[s]<r[a]||r[s]===r[a]&&i[e]<=i[t]},Uh=(r,e,t)=>{const i=r.heap[t];let s=t<<1;for(;s<=r.heap_len&&(s<r.heap_len&&R4(e,r.heap[s+1],r.heap[s],r.depth)&&s++,!R4(e,i,r.heap[s],r.depth));)r.heap[t]=r.heap[s],t=s,s<<=1;r.heap[t]=i},O4=(r,e,t)=>{let i,s,a=0,n,o;if(r.sym_next!==0)do i=r.pending_buf[r.sym_buf+a++]&255,i+=(r.pending_buf[r.sym_buf+a++]&255)<<8,s=r.pending_buf[r.sym_buf+a++],i===0?pi(r,s,e):(n=bn[s],pi(r,n+pn+1,e),o=Dh[n],o!==0&&(s-=Nh[n],Tr(r,s,o)),i--,n=z4(i),pi(r,n,t),o=Al[n],o!==0&&(i-=Ml[n],Tr(r,i,o)));while(a<r.sym_next);pi(r,$h,e)},Gh=(r,e)=>{const t=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.elems;let n,o,l=-1,h;for(r.heap_len=0,r.heap_max=b4,n=0;n<a;n++)t[n*2]!==0?(r.heap[++r.heap_len]=l=n,r.depth[n]=0):t[n*2+1]=0;for(;r.heap_len<2;)h=r.heap[++r.heap_len]=l<2?++l:0,t[h*2]=1,r.depth[h]=0,r.opt_len--,s&&(r.static_len-=i[h*2+1]);for(e.max_code=l,n=r.heap_len>>1;n>=1;n--)Uh(r,t,n);h=a;do n=r.heap[1],r.heap[1]=r.heap[r.heap_len--],Uh(r,t,1),o=r.heap[1],r.heap[--r.heap_max]=n,r.heap[--r.heap_max]=o,t[h*2]=t[n*2]+t[o*2],r.depth[h]=(r.depth[n]>=r.depth[o]?r.depth[n]:r.depth[o])+1,t[n*2+1]=t[o*2+1]=h,r.heap[1]=h++,Uh(r,t,1);while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],_C(r,e),E4(t,l,r.bl_count)},I4=(r,e,t)=>{let i,s=-1,a,n=e[0*2+1],o=0,l=7,h=4;for(n===0&&(l=138,h=3),e[(t+1)*2+1]=65535,i=0;i<=t;i++)a=n,n=e[(i+1)*2+1],!(++o<l&&a===n)&&(o<h?r.bl_tree[a*2]+=o:a!==0?(a!==s&&r.bl_tree[a*2]++,r.bl_tree[y4*2]++):o<=10?r.bl_tree[_4*2]++:r.bl_tree[T4*2]++,o=0,s=a,n===0?(l=138,h=3):a===n?(l=6,h=3):(l=7,h=4))},$4=(r,e,t)=>{let i,s=-1,a,n=e[0*2+1],o=0,l=7,h=4;for(n===0&&(l=138,h=3),i=0;i<=t;i++)if(a=n,n=e[(i+1)*2+1],!(++o<l&&a===n)){if(o<h)do pi(r,a,r.bl_tree);while(--o!==0);else a!==0?(a!==s&&(pi(r,a,r.bl_tree),o--),pi(r,y4,r.bl_tree),Tr(r,o-3,2)):o<=10?(pi(r,_4,r.bl_tree),Tr(r,o-3,3)):(pi(r,T4,r.bl_tree),Tr(r,o-11,7));o=0,s=a,n===0?(l=138,h=3):a===n?(l=6,h=3):(l=7,h=4)}},CC=r=>{let e;for(I4(r,r.dyn_ltree,r.l_desc.max_code),I4(r,r.dyn_dtree,r.d_desc.max_code),Gh(r,r.bl_desc),e=Oh-1;e>=3&&r.bl_tree[C4[e]*2+1]===0;e--);return r.opt_len+=3*(e+1)+5+5+4,e},wC=(r,e,t,i)=>{let s;for(Tr(r,e-257,5),Tr(r,t-1,5),Tr(r,i-4,4),s=0;s<i;s++)Tr(r,r.bl_tree[C4[s]*2+1],3);$4(r,r.dyn_ltree,e-1),$4(r,r.dyn_dtree,t-1)},SC=r=>{let e=4093624447,t;for(t=0;t<=31;t++,e>>>=1)if(e&1&&r.dyn_ltree[t*2]!==0)return g4;if(r.dyn_ltree[9*2]!==0||r.dyn_ltree[10*2]!==0||r.dyn_ltree[13*2]!==0)return v4;for(t=32;t<pn;t++)if(r.dyn_ltree[t*2]!==0)return v4;return g4};let D4=!1;const PC=r=>{D4||(TC(),D4=!0),r.l_desc=new Fh(r.dyn_ltree,w4),r.d_desc=new Fh(r.dyn_dtree,S4),r.bl_desc=new Fh(r.bl_tree,P4),r.bi_buf=0,r.bi_valid=0,A4(r)},N4=(r,e,t,i)=>{Tr(r,(dC<<1)+(i?1:0),3),M4(r),yn(r,t),yn(r,~t),t&&r.pending_buf.set(r.window.subarray(e,e+t),r.pending),r.pending+=t},zC=r=>{Tr(r,m4<<1,3),pi(r,$h,Oi),yC(r)},kC=(r,e,t,i)=>{let s,a,n=0;r.level>0?(r.strm.data_type===fC&&(r.strm.data_type=SC(r)),Gh(r,r.l_desc),Gh(r,r.d_desc),n=CC(r),s=r.opt_len+3+7>>>3,a=r.static_len+3+7>>>3,a<=s&&(s=a)):s=a=t+5,t+4<=s&&e!==-1?N4(r,e,t,i):r.strategy===uC||a===s?(Tr(r,(m4<<1)+(i?1:0),3),O4(r,Oi,vn)):(Tr(r,(cC<<1)+(i?1:0),3),wC(r,r.l_desc.max_code+1,r.d_desc.max_code+1,n+1),O4(r,r.dyn_ltree,r.dyn_dtree)),A4(r),i&&M4(r)},EC=(r,e,t)=>(r.pending_buf[r.sym_buf+r.sym_next++]=e,r.pending_buf[r.sym_buf+r.sym_next++]=e>>8,r.pending_buf[r.sym_buf+r.sym_next++]=t,e===0?r.dyn_ltree[t*2]++:(r.matches++,e--,r.dyn_ltree[(bn[t]+pn+1)*2]++,r.dyn_dtree[z4(e)*2]++),r.sym_next===r.sym_end);var AC=PC,MC=N4,RC=kC,OC=EC,IC=zC,$C={_tr_init:AC,_tr_stored_block:MC,_tr_flush_block:RC,_tr_tally:OC,_tr_align:IC},_n=(r,e,t,i)=>{let s=r&65535|0,a=r>>>16&65535|0,n=0;for(;t!==0;){n=t>2e3?2e3:t,t-=n;do s=s+e[i++]|0,a=a+s|0;while(--n);s%=65521,a%=65521}return s|a<<16|0};const DC=()=>{let r,e=[];for(var t=0;t<256;t++){r=t;for(var i=0;i<8;i++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e},NC=new Uint32Array(DC());var xt=(r,e,t,i)=>{const s=NC,a=i+t;r^=-1;for(let n=i;n<a;n++)r=r>>>8^s[(r^e[n])&255];return r^-1},Os={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Is={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:LC,_tr_stored_block:jh,_tr_flush_block:FC,_tr_tally:ss,_tr_align:UC}=$C,{Z_NO_FLUSH:as,Z_PARTIAL_FLUSH:GC,Z_FULL_FLUSH:jC,Z_FINISH:jr,Z_BLOCK:L4,Z_OK:ar,Z_STREAM_END:F4,Z_STREAM_ERROR:gi,Z_DATA_ERROR:BC,Z_BUF_ERROR:Bh,Z_DEFAULT_COMPRESSION:VC,Z_FILTERED:HC,Z_HUFFMAN_ONLY:Rl,Z_RLE:WC,Z_FIXED:qC,Z_DEFAULT_STRATEGY:YC,Z_UNKNOWN:XC,Z_DEFLATED:Ol}=Is,KC=9,ZC=15,JC=8,QC=29,Vh=256+1+QC,xC=30,ew=19,tw=2*Vh+1,rw=15,nt=3,ns=258,vi=ns+nt+1,iw=32,ca=42,Hh=57,Wh=69,qh=73,Yh=91,Xh=103,$s=113,Tn=666,vr=1,pa=2,Ds=3,ga=4,sw=3,Ns=(r,e)=>(r.msg=Os[e],e),U4=r=>r*2-(r>4?9:0),os=r=>{let e=r.length;for(;--e>=0;)r[e]=0},aw=r=>{let e,t,i,s=r.w_size;e=r.hash_size,i=e;do t=r.head[--i],r.head[i]=t>=s?t-s:0;while(--e);e=s,i=e;do t=r.prev[--i],r.prev[i]=t>=s?t-s:0;while(--e)};let ls=(r,e,t)=>(e<<r.hash_shift^t)&r.hash_mask;const Ar=r=>{const e=r.state;let t=e.pending;t>r.avail_out&&(t=r.avail_out),t!==0&&(r.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+t),r.next_out),r.next_out+=t,e.pending_out+=t,r.total_out+=t,r.avail_out-=t,e.pending-=t,e.pending===0&&(e.pending_out=0))},Mr=(r,e)=>{FC(r,r.block_start>=0?r.block_start:-1,r.strstart-r.block_start,e),r.block_start=r.strstart,Ar(r.strm)},pt=(r,e)=>{r.pending_buf[r.pending++]=e},Cn=(r,e)=>{r.pending_buf[r.pending++]=e>>>8&255,r.pending_buf[r.pending++]=e&255},Kh=(r,e,t,i)=>{let s=r.avail_in;return s>i&&(s=i),s===0?0:(r.avail_in-=s,e.set(r.input.subarray(r.next_in,r.next_in+s),t),r.state.wrap===1?r.adler=_n(r.adler,e,s,t):r.state.wrap===2&&(r.adler=xt(r.adler,e,s,t)),r.next_in+=s,r.total_in+=s,s)},G4=(r,e)=>{let t=r.max_chain_length,i=r.strstart,s,a,n=r.prev_length,o=r.nice_match;const l=r.strstart>r.w_size-vi?r.strstart-(r.w_size-vi):0,h=r.window,u=r.w_mask,d=r.prev,c=r.strstart+ns;let f=h[i+n-1],p=h[i+n];r.prev_length>=r.good_match&&(t>>=2),o>r.lookahead&&(o=r.lookahead);do if(s=e,!(h[s+n]!==p||h[s+n-1]!==f||h[s]!==h[i]||h[++s]!==h[i+1])){i+=2,s++;do;while(h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&i<c);if(a=ns-(c-i),i=c-ns,a>n){if(r.match_start=e,n=a,a>=o)break;f=h[i+n-1],p=h[i+n]}}while((e=d[e&u])>l&&--t!==0);return n<=r.lookahead?n:r.lookahead},va=r=>{const e=r.w_size;let t,i,s;do{if(i=r.window_size-r.lookahead-r.strstart,r.strstart>=e+(e-vi)&&(r.window.set(r.window.subarray(e,e+e-i),0),r.match_start-=e,r.strstart-=e,r.block_start-=e,r.insert>r.strstart&&(r.insert=r.strstart),aw(r),i+=e),r.strm.avail_in===0)break;if(t=Kh(r.strm,r.window,r.strstart+r.lookahead,i),r.lookahead+=t,r.lookahead+r.insert>=nt)for(s=r.strstart-r.insert,r.ins_h=r.window[s],r.ins_h=ls(r,r.ins_h,r.window[s+1]);r.insert&&(r.ins_h=ls(r,r.ins_h,r.window[s+nt-1]),r.prev[s&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=s,s++,r.insert--,!(r.lookahead+r.insert<nt)););}while(r.lookahead<vi&&r.strm.avail_in!==0)},j4=(r,e)=>{let t=r.pending_buf_size-5>r.w_size?r.w_size:r.pending_buf_size-5,i,s,a,n=0,o=r.strm.avail_in;do{if(i=65535,a=r.bi_valid+42>>3,r.strm.avail_out<a||(a=r.strm.avail_out-a,s=r.strstart-r.block_start,i>s+r.strm.avail_in&&(i=s+r.strm.avail_in),i>a&&(i=a),i<t&&(i===0&&e!==jr||e===as||i!==s+r.strm.avail_in)))break;n=e===jr&&i===s+r.strm.avail_in?1:0,jh(r,0,0,n),r.pending_buf[r.pending-4]=i,r.pending_buf[r.pending-3]=i>>8,r.pending_buf[r.pending-2]=~i,r.pending_buf[r.pending-1]=~i>>8,Ar(r.strm),s&&(s>i&&(s=i),r.strm.output.set(r.window.subarray(r.block_start,r.block_start+s),r.strm.next_out),r.strm.next_out+=s,r.strm.avail_out-=s,r.strm.total_out+=s,r.block_start+=s,i-=s),i&&(Kh(r.strm,r.strm.output,r.strm.next_out,i),r.strm.next_out+=i,r.strm.avail_out-=i,r.strm.total_out+=i)}while(n===0);return o-=r.strm.avail_in,o&&(o>=r.w_size?(r.matches=2,r.window.set(r.strm.input.subarray(r.strm.next_in-r.w_size,r.strm.next_in),0),r.strstart=r.w_size,r.insert=r.strstart):(r.window_size-r.strstart<=o&&(r.strstart-=r.w_size,r.window.set(r.window.subarray(r.w_size,r.w_size+r.strstart),0),r.matches<2&&r.matches++,r.insert>r.strstart&&(r.insert=r.strstart)),r.window.set(r.strm.input.subarray(r.strm.next_in-o,r.strm.next_in),r.strstart),r.strstart+=o,r.insert+=o>r.w_size-r.insert?r.w_size-r.insert:o),r.block_start=r.strstart),r.high_water<r.strstart&&(r.high_water=r.strstart),n?ga:e!==as&&e!==jr&&r.strm.avail_in===0&&r.strstart===r.block_start?pa:(a=r.window_size-r.strstart,r.strm.avail_in>a&&r.block_start>=r.w_size&&(r.block_start-=r.w_size,r.strstart-=r.w_size,r.window.set(r.window.subarray(r.w_size,r.w_size+r.strstart),0),r.matches<2&&r.matches++,a+=r.w_size,r.insert>r.strstart&&(r.insert=r.strstart)),a>r.strm.avail_in&&(a=r.strm.avail_in),a&&(Kh(r.strm,r.window,r.strstart,a),r.strstart+=a,r.insert+=a>r.w_size-r.insert?r.w_size-r.insert:a),r.high_water<r.strstart&&(r.high_water=r.strstart),a=r.bi_valid+42>>3,a=r.pending_buf_size-a>65535?65535:r.pending_buf_size-a,t=a>r.w_size?r.w_size:a,s=r.strstart-r.block_start,(s>=t||(s||e===jr)&&e!==as&&r.strm.avail_in===0&&s<=a)&&(i=s>a?a:s,n=e===jr&&r.strm.avail_in===0&&i===s?1:0,jh(r,r.block_start,i,n),r.block_start+=i,Ar(r.strm)),n?Ds:vr)},Zh=(r,e)=>{let t,i;for(;;){if(r.lookahead<vi){if(va(r),r.lookahead<vi&&e===as)return vr;if(r.lookahead===0)break}if(t=0,r.lookahead>=nt&&(r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart),t!==0&&r.strstart-t<=r.w_size-vi&&(r.match_length=G4(r,t)),r.match_length>=nt)if(i=ss(r,r.strstart-r.match_start,r.match_length-nt),r.lookahead-=r.match_length,r.match_length<=r.max_lazy_match&&r.lookahead>=nt){r.match_length--;do r.strstart++,r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;while(--r.match_length!==0);r.strstart++}else r.strstart+=r.match_length,r.match_length=0,r.ins_h=r.window[r.strstart],r.ins_h=ls(r,r.ins_h,r.window[r.strstart+1]);else i=ss(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++;if(i&&(Mr(r,!1),r.strm.avail_out===0))return vr}return r.insert=r.strstart<nt-1?r.strstart:nt-1,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa},ma=(r,e)=>{let t,i,s;for(;;){if(r.lookahead<vi){if(va(r),r.lookahead<vi&&e===as)return vr;if(r.lookahead===0)break}if(t=0,r.lookahead>=nt&&(r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart),r.prev_length=r.match_length,r.prev_match=r.match_start,r.match_length=nt-1,t!==0&&r.prev_length<r.max_lazy_match&&r.strstart-t<=r.w_size-vi&&(r.match_length=G4(r,t),r.match_length<=5&&(r.strategy===HC||r.match_length===nt&&r.strstart-r.match_start>4096)&&(r.match_length=nt-1)),r.prev_length>=nt&&r.match_length<=r.prev_length){s=r.strstart+r.lookahead-nt,i=ss(r,r.strstart-1-r.prev_match,r.prev_length-nt),r.lookahead-=r.prev_length-1,r.prev_length-=2;do++r.strstart<=s&&(r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart);while(--r.prev_length!==0);if(r.match_available=0,r.match_length=nt-1,r.strstart++,i&&(Mr(r,!1),r.strm.avail_out===0))return vr}else if(r.match_available){if(i=ss(r,0,r.window[r.strstart-1]),i&&Mr(r,!1),r.strstart++,r.lookahead--,r.strm.avail_out===0)return vr}else r.match_available=1,r.strstart++,r.lookahead--}return r.match_available&&(i=ss(r,0,r.window[r.strstart-1]),r.match_available=0),r.insert=r.strstart<nt-1?r.strstart:nt-1,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa},nw=(r,e)=>{let t,i,s,a;const n=r.window;for(;;){if(r.lookahead<=ns){if(va(r),r.lookahead<=ns&&e===as)return vr;if(r.lookahead===0)break}if(r.match_length=0,r.lookahead>=nt&&r.strstart>0&&(s=r.strstart-1,i=n[s],i===n[++s]&&i===n[++s]&&i===n[++s])){a=r.strstart+ns;do;while(i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&s<a);r.match_length=ns-(a-s),r.match_length>r.lookahead&&(r.match_length=r.lookahead)}if(r.match_length>=nt?(t=ss(r,1,r.match_length-nt),r.lookahead-=r.match_length,r.strstart+=r.match_length,r.match_length=0):(t=ss(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++),t&&(Mr(r,!1),r.strm.avail_out===0))return vr}return r.insert=0,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa},ow=(r,e)=>{let t;for(;;){if(r.lookahead===0&&(va(r),r.lookahead===0)){if(e===as)return vr;break}if(r.match_length=0,t=ss(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++,t&&(Mr(r,!1),r.strm.avail_out===0))return vr}return r.insert=0,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa};function mi(r,e,t,i,s){this.good_length=r,this.max_lazy=e,this.nice_length=t,this.max_chain=i,this.func=s}const wn=[new mi(0,0,0,0,j4),new mi(4,4,8,4,Zh),new mi(4,5,16,8,Zh),new mi(4,6,32,32,Zh),new mi(4,4,16,16,ma),new mi(8,16,32,32,ma),new mi(8,16,128,128,ma),new mi(8,32,128,256,ma),new mi(32,128,258,1024,ma),new mi(32,258,258,4096,ma)],lw=r=>{r.window_size=2*r.w_size,os(r.head),r.max_lazy_match=wn[r.level].max_lazy,r.good_match=wn[r.level].good_length,r.nice_match=wn[r.level].nice_length,r.max_chain_length=wn[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=nt-1,r.match_available=0,r.ins_h=0};function hw(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ol,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(tw*2),this.dyn_dtree=new Uint16Array((2*xC+1)*2),this.bl_tree=new Uint16Array((2*ew+1)*2),os(this.dyn_ltree),os(this.dyn_dtree),os(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(rw+1),this.heap=new Uint16Array(2*Vh+1),os(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Vh+1),os(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Sn=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.status!==ca&&e.status!==Hh&&e.status!==Wh&&e.status!==qh&&e.status!==Yh&&e.status!==Xh&&e.status!==$s&&e.status!==Tn?1:0},B4=r=>{if(Sn(r))return Ns(r,gi);r.total_in=r.total_out=0,r.data_type=XC;const e=r.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?Hh:e.wrap?ca:$s,r.adler=e.wrap===2?0:1,e.last_flush=-2,LC(e),ar},V4=r=>{const e=B4(r);return e===ar&&lw(r.state),e},uw=(r,e)=>Sn(r)||r.state.wrap!==2?gi:(r.state.gzhead=e,ar),H4=(r,e,t,i,s,a)=>{if(!r)return gi;let n=1;if(e===VC&&(e=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),s<1||s>KC||t!==Ol||i<8||i>15||e<0||e>9||a<0||a>qC||i===8&&n!==1)return Ns(r,gi);i===8&&(i=9);const o=new hw;return r.state=o,o.strm=r,o.status=ca,o.wrap=n,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=s+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+nt-1)/nt),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<s+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=e,o.strategy=a,o.method=t,V4(r)},fw=(r,e)=>H4(r,e,Ol,ZC,JC,YC),dw=(r,e)=>{if(Sn(r)||e>L4||e<0)return r?Ns(r,gi):gi;const t=r.state;if(!r.output||r.avail_in!==0&&!r.input||t.status===Tn&&e!==jr)return Ns(r,r.avail_out===0?Bh:gi);const i=t.last_flush;if(t.last_flush=e,t.pending!==0){if(Ar(r),r.avail_out===0)return t.last_flush=-1,ar}else if(r.avail_in===0&&U4(e)<=U4(i)&&e!==jr)return Ns(r,Bh);if(t.status===Tn&&r.avail_in!==0)return Ns(r,Bh);if(t.status===ca&&t.wrap===0&&(t.status=$s),t.status===ca){let s=Ol+(t.w_bits-8<<4)<<8,a=-1;if(t.strategy>=Rl||t.level<2?a=0:t.level<6?a=1:t.level===6?a=2:a=3,s|=a<<6,t.strstart!==0&&(s|=iw),s+=31-s%31,Cn(t,s),t.strstart!==0&&(Cn(t,r.adler>>>16),Cn(t,r.adler&65535)),r.adler=1,t.status=$s,Ar(r),t.pending!==0)return t.last_flush=-1,ar}if(t.status===Hh){if(r.adler=0,pt(t,31),pt(t,139),pt(t,8),t.gzhead)pt(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),pt(t,t.gzhead.time&255),pt(t,t.gzhead.time>>8&255),pt(t,t.gzhead.time>>16&255),pt(t,t.gzhead.time>>24&255),pt(t,t.level===9?2:t.strategy>=Rl||t.level<2?4:0),pt(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(pt(t,t.gzhead.extra.length&255),pt(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(r.adler=xt(r.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=Wh;else if(pt(t,0),pt(t,0),pt(t,0),pt(t,0),pt(t,0),pt(t,t.level===9?2:t.strategy>=Rl||t.level<2?4:0),pt(t,sw),t.status=$s,Ar(r),t.pending!==0)return t.last_flush=-1,ar}if(t.status===Wh){if(t.gzhead.extra){let s=t.pending,a=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+a>t.pending_buf_size;){let o=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+o),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),t.gzindex+=o,Ar(r),t.pending!==0)return t.last_flush=-1,ar;s=0,a-=o}let n=new Uint8Array(t.gzhead.extra);t.pending_buf.set(n.subarray(t.gzindex,t.gzindex+a),t.pending),t.pending+=a,t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),t.gzindex=0}t.status=qh}if(t.status===qh){if(t.gzhead.name){let s=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),Ar(r),t.pending!==0)return t.last_flush=-1,ar;s=0}t.gzindex<t.gzhead.name.length?a=t.gzhead.name.charCodeAt(t.gzindex++)&255:a=0,pt(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),t.gzindex=0}t.status=Yh}if(t.status===Yh){if(t.gzhead.comment){let s=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),Ar(r),t.pending!==0)return t.last_flush=-1,ar;s=0}t.gzindex<t.gzhead.comment.length?a=t.gzhead.comment.charCodeAt(t.gzindex++)&255:a=0,pt(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s))}t.status=Xh}if(t.status===Xh){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(Ar(r),t.pending!==0))return t.last_flush=-1,ar;pt(t,r.adler&255),pt(t,r.adler>>8&255),r.adler=0}if(t.status=$s,Ar(r),t.pending!==0)return t.last_flush=-1,ar}if(r.avail_in!==0||t.lookahead!==0||e!==as&&t.status!==Tn){let s=t.level===0?j4(t,e):t.strategy===Rl?ow(t,e):t.strategy===WC?nw(t,e):wn[t.level].func(t,e);if((s===Ds||s===ga)&&(t.status=Tn),s===vr||s===Ds)return r.avail_out===0&&(t.last_flush=-1),ar;if(s===pa&&(e===GC?UC(t):e!==L4&&(jh(t,0,0,!1),e===jC&&(os(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Ar(r),r.avail_out===0))return t.last_flush=-1,ar}return e!==jr?ar:t.wrap<=0?F4:(t.wrap===2?(pt(t,r.adler&255),pt(t,r.adler>>8&255),pt(t,r.adler>>16&255),pt(t,r.adler>>24&255),pt(t,r.total_in&255),pt(t,r.total_in>>8&255),pt(t,r.total_in>>16&255),pt(t,r.total_in>>24&255)):(Cn(t,r.adler>>>16),Cn(t,r.adler&65535)),Ar(r),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?ar:F4)},cw=r=>{if(Sn(r))return gi;const e=r.state.status;return r.state=null,e===$s?Ns(r,BC):ar},pw=(r,e)=>{let t=e.length;if(Sn(r))return gi;const i=r.state,s=i.wrap;if(s===2||s===1&&i.status!==ca||i.lookahead)return gi;if(s===1&&(r.adler=_n(r.adler,e,t,0)),i.wrap=0,t>=i.w_size){s===0&&(os(i.head),i.strstart=0,i.block_start=0,i.insert=0);let l=new Uint8Array(i.w_size);l.set(e.subarray(t-i.w_size,t),0),e=l,t=i.w_size}const a=r.avail_in,n=r.next_in,o=r.input;for(r.avail_in=t,r.next_in=0,r.input=e,va(i);i.lookahead>=nt;){let l=i.strstart,h=i.lookahead-(nt-1);do i.ins_h=ls(i,i.ins_h,i.window[l+nt-1]),i.prev[l&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=l,l++;while(--h);i.strstart=l,i.lookahead=nt-1,va(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=nt-1,i.match_available=0,r.next_in=n,r.input=o,r.avail_in=a,i.wrap=s,ar};var gw=fw,vw=H4,mw=V4,bw=B4,yw=uw,_w=dw,Tw=cw,Cw=pw,ww="pako deflate (from Nodeca project)",Pn={deflateInit:gw,deflateInit2:vw,deflateReset:mw,deflateResetKeep:bw,deflateSetHeader:yw,deflate:_w,deflateEnd:Tw,deflateSetDictionary:Cw,deflateInfo:ww};const Sw=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var Pw=function(r){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)Sw(t,i)&&(r[i]=t[i])}}return r},zw=r=>{let e=0;for(let i=0,s=r.length;i<s;i++)e+=r[i].length;const t=new Uint8Array(e);for(let i=0,s=0,a=r.length;i<a;i++){let n=r[i];t.set(n,s),s+=n.length}return t},Il={assign:Pw,flattenChunks:zw};let W4=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{W4=!1}const zn=new Uint8Array(256);for(let r=0;r<256;r++)zn[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;zn[254]=zn[254]=1;var kw=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let e,t,i,s,a,n=r.length,o=0;for(s=0;s<n;s++)t=r.charCodeAt(s),(t&64512)===55296&&s+1<n&&(i=r.charCodeAt(s+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),s++)),o+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(o),a=0,s=0;a<o;s++)t=r.charCodeAt(s),(t&64512)===55296&&s+1<n&&(i=r.charCodeAt(s+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),s++)),t<128?e[a++]=t:t<2048?(e[a++]=192|t>>>6,e[a++]=128|t&63):t<65536?(e[a++]=224|t>>>12,e[a++]=128|t>>>6&63,e[a++]=128|t&63):(e[a++]=240|t>>>18,e[a++]=128|t>>>12&63,e[a++]=128|t>>>6&63,e[a++]=128|t&63);return e};const Ew=(r,e)=>{if(e<65534&&r.subarray&&W4)return String.fromCharCode.apply(null,r.length===e?r:r.subarray(0,e));let t="";for(let i=0;i<e;i++)t+=String.fromCharCode(r[i]);return t};var Aw=(r,e)=>{const t=e||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,e));let i,s;const a=new Array(t*2);for(s=0,i=0;i<t;){let n=r[i++];if(n<128){a[s++]=n;continue}let o=zn[n];if(o>4){a[s++]=65533,i+=o-1;continue}for(n&=o===2?31:o===3?15:7;o>1&&i<t;)n=n<<6|r[i++]&63,o--;if(o>1){a[s++]=65533;continue}n<65536?a[s++]=n:(n-=65536,a[s++]=55296|n>>10&1023,a[s++]=56320|n&1023)}return Ew(a,s)},Mw=(r,e)=>{e=e||r.length,e>r.length&&(e=r.length);let t=e-1;for(;t>=0&&(r[t]&192)===128;)t--;return t<0||t===0?e:t+zn[r[t]]>e?t:e},kn={string2buf:kw,buf2string:Aw,utf8border:Mw};function Rw(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var q4=Rw;const Y4=Object.prototype.toString,{Z_NO_FLUSH:Ow,Z_SYNC_FLUSH:Iw,Z_FULL_FLUSH:$w,Z_FINISH:Dw,Z_OK:$l,Z_STREAM_END:Nw,Z_DEFAULT_COMPRESSION:Lw,Z_DEFAULT_STRATEGY:Fw,Z_DEFLATED:Uw}=Is;function En(r){this.options=Il.assign({level:Lw,method:Uw,chunkSize:16384,windowBits:15,memLevel:8,strategy:Fw},r||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new q4,this.strm.avail_out=0;let t=Pn.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(t!==$l)throw new Error(Os[t]);if(e.header&&Pn.deflateSetHeader(this.strm,e.header),e.dictionary){let i;if(typeof e.dictionary=="string"?i=kn.string2buf(e.dictionary):Y4.call(e.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(e.dictionary):i=e.dictionary,t=Pn.deflateSetDictionary(this.strm,i),t!==$l)throw new Error(Os[t]);this._dict_set=!0}}En.prototype.push=function(r,e){const t=this.strm,i=this.options.chunkSize;let s,a;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?Dw:Ow,typeof r=="string"?t.input=kn.string2buf(r):Y4.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(a===Iw||a===$w)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(s=Pn.deflate(t,a),s===Nw)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),s=Pn.deflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===$l;if(t.avail_out===0){this.onData(t.output);continue}if(a>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0},En.prototype.onData=function(r){this.chunks.push(r)},En.prototype.onEnd=function(r){r===$l&&(this.result=Il.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function Jh(r,e){const t=new En(e);if(t.push(r,!0),t.err)throw t.msg||Os[t.err];return t.result}function Gw(r,e){return e=e||{},e.raw=!0,Jh(r,e)}function jw(r,e){return e=e||{},e.gzip=!0,Jh(r,e)}var Bw=En,Vw=Jh,Hw=Gw,Ww=jw,qw=Is,Yw={Deflate:Bw,deflate:Vw,deflateRaw:Hw,gzip:Ww,constants:qw};const Dl=16209,Xw=16191;var Kw=function(e,t){let i,s,a,n,o,l,h,u,d,c,f,p,g,y,_,T,m,w,O,k,I,$,G,U;const V=e.state;i=e.next_in,G=e.input,s=i+(e.avail_in-5),a=e.next_out,U=e.output,n=a-(t-e.avail_out),o=a+(e.avail_out-257),l=V.dmax,h=V.wsize,u=V.whave,d=V.wnext,c=V.window,f=V.hold,p=V.bits,g=V.lencode,y=V.distcode,_=(1<<V.lenbits)-1,T=(1<<V.distbits)-1;e:do{p<15&&(f+=G[i++]<<p,p+=8,f+=G[i++]<<p,p+=8),m=g[f&_];t:for(;;){if(w=m>>>24,f>>>=w,p-=w,w=m>>>16&255,w===0)U[a++]=m&65535;else if(w&16){O=m&65535,w&=15,w&&(p<w&&(f+=G[i++]<<p,p+=8),O+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=G[i++]<<p,p+=8,f+=G[i++]<<p,p+=8),m=y[f&T];r:for(;;){if(w=m>>>24,f>>>=w,p-=w,w=m>>>16&255,w&16){if(k=m&65535,w&=15,p<w&&(f+=G[i++]<<p,p+=8,p<w&&(f+=G[i++]<<p,p+=8)),k+=f&(1<<w)-1,k>l){e.msg="invalid distance too far back",V.mode=Dl;break e}if(f>>>=w,p-=w,w=a-n,k>w){if(w=k-w,w>u&&V.sane){e.msg="invalid distance too far back",V.mode=Dl;break e}if(I=0,$=c,d===0){if(I+=h-w,w<O){O-=w;do U[a++]=c[I++];while(--w);I=a-k,$=U}}else if(d<w){if(I+=h+d-w,w-=d,w<O){O-=w;do U[a++]=c[I++];while(--w);if(I=0,d<O){w=d,O-=w;do U[a++]=c[I++];while(--w);I=a-k,$=U}}}else if(I+=d-w,w<O){O-=w;do U[a++]=c[I++];while(--w);I=a-k,$=U}for(;O>2;)U[a++]=$[I++],U[a++]=$[I++],U[a++]=$[I++],O-=3;O&&(U[a++]=$[I++],O>1&&(U[a++]=$[I++]))}else{I=a-k;do U[a++]=U[I++],U[a++]=U[I++],U[a++]=U[I++],O-=3;while(O>2);O&&(U[a++]=U[I++],O>1&&(U[a++]=U[I++]))}}else if(w&64){e.msg="invalid distance code",V.mode=Dl;break e}else{m=y[(m&65535)+(f&(1<<w)-1)];continue r}break}}else if(w&64)if(w&32){V.mode=Xw;break e}else{e.msg="invalid literal/length code",V.mode=Dl;break e}else{m=g[(m&65535)+(f&(1<<w)-1)];continue t}break}}while(i<s&&a<o);O=p>>3,i-=O,p-=O<<3,f&=(1<<p)-1,e.next_in=i,e.next_out=a,e.avail_in=i<s?5+(s-i):5-(i-s),e.avail_out=a<o?257+(o-a):257-(a-o),V.hold=f,V.bits=p};const ba=15,X4=852,K4=592,Z4=0,Qh=1,J4=2,Zw=new Uint16Array([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]),Jw=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Qw=new Uint16Array([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,0,0]),xw=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var An=(r,e,t,i,s,a,n,o)=>{const l=o.bits;let h=0,u=0,d=0,c=0,f=0,p=0,g=0,y=0,_=0,T=0,m,w,O,k,I,$=null,G;const U=new Uint16Array(ba+1),V=new Uint16Array(ba+1);let X=null,te,ee,oe;for(h=0;h<=ba;h++)U[h]=0;for(u=0;u<i;u++)U[e[t+u]]++;for(f=l,c=ba;c>=1&&U[c]===0;c--);if(f>c&&(f=c),c===0)return s[a++]=1<<24|64<<16|0,s[a++]=1<<24|64<<16|0,o.bits=1,0;for(d=1;d<c&&U[d]===0;d++);for(f<d&&(f=d),y=1,h=1;h<=ba;h++)if(y<<=1,y-=U[h],y<0)return-1;if(y>0&&(r===Z4||c!==1))return-1;for(V[1]=0,h=1;h<ba;h++)V[h+1]=V[h]+U[h];for(u=0;u<i;u++)e[t+u]!==0&&(n[V[e[t+u]]++]=u);if(r===Z4?($=X=n,G=20):r===Qh?($=Zw,X=Jw,G=257):($=Qw,X=xw,G=0),T=0,u=0,h=d,I=a,p=f,g=0,O=-1,_=1<<f,k=_-1,r===Qh&&_>X4||r===J4&&_>K4)return 1;for(;;){te=h-g,n[u]+1<G?(ee=0,oe=n[u]):n[u]>=G?(ee=X[n[u]-G],oe=$[n[u]-G]):(ee=32+64,oe=0),m=1<<h-g,w=1<<p,d=w;do w-=m,s[I+(T>>g)+w]=te<<24|ee<<16|oe|0;while(w!==0);for(m=1<<h-1;T&m;)m>>=1;if(m!==0?(T&=m-1,T+=m):T=0,u++,--U[h]===0){if(h===c)break;h=e[t+n[u]]}if(h>f&&(T&k)!==O){for(g===0&&(g=f),I+=d,p=h-g,y=1<<p;p+g<c&&(y-=U[p+g],!(y<=0));)p++,y<<=1;if(_+=1<<p,r===Qh&&_>X4||r===J4&&_>K4)return 1;O=T&k,s[O]=f<<24|p<<16|I-a|0}}return T!==0&&(s[I+T]=h-g<<24|64<<16|0),o.bits=f,0};const eS=0,Q4=1,x4=2,{Z_FINISH:ep,Z_BLOCK:tS,Z_TREES:Nl,Z_OK:Ls,Z_STREAM_END:rS,Z_NEED_DICT:iS,Z_STREAM_ERROR:Br,Z_DATA_ERROR:tp,Z_MEM_ERROR:rp,Z_BUF_ERROR:sS,Z_DEFLATED:ip}=Is,Ll=16180,sp=16181,np=16182,op=16183,lp=16184,hp=16185,up=16186,fp=16187,dp=16188,cp=16189,Fl=16190,Ii=16191,xh=16192,pp=16193,eu=16194,gp=16195,vp=16196,mp=16197,bp=16198,Ul=16199,Gl=16200,yp=16201,_p=16202,Tp=16203,Cp=16204,wp=16205,tu=16206,Sp=16207,Pp=16208,At=16209,zp=16210,kp=16211,aS=852,nS=592,oS=15,Ep=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function lS(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Fs=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.mode<Ll||e.mode>kp?1:0},Ap=r=>{if(Fs(r))return Br;const e=r.state;return r.total_in=r.total_out=e.total=0,r.msg="",e.wrap&&(r.adler=e.wrap&1),e.mode=Ll,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(aS),e.distcode=e.distdyn=new Int32Array(nS),e.sane=1,e.back=-1,Ls},Mp=r=>{if(Fs(r))return Br;const e=r.state;return e.wsize=0,e.whave=0,e.wnext=0,Ap(r)},Rp=(r,e)=>{let t;if(Fs(r))return Br;const i=r.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Br:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,Mp(r))},Op=(r,e)=>{if(!r)return Br;const t=new lS;r.state=t,t.strm=r,t.window=null,t.mode=Ll;const i=Rp(r,e);return i!==Ls&&(r.state=null),i},hS=r=>Op(r,oS);let Ip=!0,ru,iu;const uS=r=>{if(Ip){ru=new Int32Array(512),iu=new Int32Array(32);let e=0;for(;e<144;)r.lens[e++]=8;for(;e<256;)r.lens[e++]=9;for(;e<280;)r.lens[e++]=7;for(;e<288;)r.lens[e++]=8;for(An(Q4,r.lens,0,288,ru,0,r.work,{bits:9}),e=0;e<32;)r.lens[e++]=5;An(x4,r.lens,0,32,iu,0,r.work,{bits:5}),Ip=!1}r.lencode=ru,r.lenbits=9,r.distcode=iu,r.distbits=5},$p=(r,e,t,i)=>{let s;const a=r.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),i>=a.wsize?(a.window.set(e.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(s=a.wsize-a.wnext,s>i&&(s=i),a.window.set(e.subarray(t-i,t-i+s),a.wnext),i-=s,i?(a.window.set(e.subarray(t-i,t),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0},fS=(r,e)=>{let t,i,s,a,n,o,l,h,u,d,c,f,p,g,y=0,_,T,m,w,O,k,I,$;const G=new Uint8Array(4);let U,V;const X=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Fs(r)||!r.output||!r.input&&r.avail_in!==0)return Br;t=r.state,t.mode===Ii&&(t.mode=xh),n=r.next_out,s=r.output,l=r.avail_out,a=r.next_in,i=r.input,o=r.avail_in,h=t.hold,u=t.bits,d=o,c=l,$=Ls;e:for(;;)switch(t.mode){case Ll:if(t.wrap===0){t.mode=xh;break}for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.wrap&2&&h===35615){t.wbits===0&&(t.wbits=15),t.check=0,G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0),h=0,u=0,t.mode=sp;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((h&255)<<8)+(h>>8))%31){r.msg="incorrect header check",t.mode=At;break}if((h&15)!==ip){r.msg="unknown compression method",t.mode=At;break}if(h>>>=4,u-=4,I=(h&15)+8,t.wbits===0&&(t.wbits=I),I>15||I>t.wbits){r.msg="invalid window size",t.mode=At;break}t.dmax=1<<t.wbits,t.flags=0,r.adler=t.check=1,t.mode=h&512?cp:Ii,h=0,u=0;break;case sp:for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.flags=h,(t.flags&255)!==ip){r.msg="unknown compression method",t.mode=At;break}if(t.flags&57344){r.msg="unknown header flags set",t.mode=At;break}t.head&&(t.head.text=h>>8&1),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0)),h=0,u=0,t.mode=np;case np:for(;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.head&&(t.head.time=h),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,G[2]=h>>>16&255,G[3]=h>>>24&255,t.check=xt(t.check,G,4,0)),h=0,u=0,t.mode=op;case op:for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.head&&(t.head.xflags=h&255,t.head.os=h>>8),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0)),h=0,u=0,t.mode=lp;case lp:if(t.flags&1024){for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.length=h,t.head&&(t.head.extra_len=h),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0)),h=0,u=0}else t.head&&(t.head.extra=null);t.mode=hp;case hp:if(t.flags&1024&&(f=t.length,f>o&&(f=o),f&&(t.head&&(I=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(a,a+f),I)),t.flags&512&&t.wrap&4&&(t.check=xt(t.check,i,f,a)),o-=f,a+=f,t.length-=f),t.length))break e;t.length=0,t.mode=up;case up:if(t.flags&2048){if(o===0)break e;f=0;do I=i[a+f++],t.head&&I&&t.length<65536&&(t.head.name+=String.fromCharCode(I));while(I&&f<o);if(t.flags&512&&t.wrap&4&&(t.check=xt(t.check,i,f,a)),o-=f,a+=f,I)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=fp;case fp:if(t.flags&4096){if(o===0)break e;f=0;do I=i[a+f++],t.head&&I&&t.length<65536&&(t.head.comment+=String.fromCharCode(I));while(I&&f<o);if(t.flags&512&&t.wrap&4&&(t.check=xt(t.check,i,f,a)),o-=f,a+=f,I)break e}else t.head&&(t.head.comment=null);t.mode=dp;case dp:if(t.flags&512){for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.wrap&4&&h!==(t.check&65535)){r.msg="header crc mismatch",t.mode=At;break}h=0,u=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),r.adler=t.check=0,t.mode=Ii;break;case cp:for(;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}r.adler=t.check=Ep(h),h=0,u=0,t.mode=Fl;case Fl:if(t.havedict===0)return r.next_out=n,r.avail_out=l,r.next_in=a,r.avail_in=o,t.hold=h,t.bits=u,iS;r.adler=t.check=1,t.mode=Ii;case Ii:if(e===tS||e===Nl)break e;case xh:if(t.last){h>>>=u&7,u-=u&7,t.mode=tu;break}for(;u<3;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}switch(t.last=h&1,h>>>=1,u-=1,h&3){case 0:t.mode=pp;break;case 1:if(uS(t),t.mode=Ul,e===Nl){h>>>=2,u-=2;break e}break;case 2:t.mode=vp;break;case 3:r.msg="invalid block type",t.mode=At}h>>>=2,u-=2;break;case pp:for(h>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if((h&65535)!==(h>>>16^65535)){r.msg="invalid stored block lengths",t.mode=At;break}if(t.length=h&65535,h=0,u=0,t.mode=eu,e===Nl)break e;case eu:t.mode=gp;case gp:if(f=t.length,f){if(f>o&&(f=o),f>l&&(f=l),f===0)break e;s.set(i.subarray(a,a+f),n),o-=f,a+=f,l-=f,n+=f,t.length-=f;break}t.mode=Ii;break;case vp:for(;u<14;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.nlen=(h&31)+257,h>>>=5,u-=5,t.ndist=(h&31)+1,h>>>=5,u-=5,t.ncode=(h&15)+4,h>>>=4,u-=4,t.nlen>286||t.ndist>30){r.msg="too many length or distance symbols",t.mode=At;break}t.have=0,t.mode=mp;case mp:for(;t.have<t.ncode;){for(;u<3;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.lens[X[t.have++]]=h&7,h>>>=3,u-=3}for(;t.have<19;)t.lens[X[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,U={bits:t.lenbits},$=An(eS,t.lens,0,19,t.lencode,0,t.work,U),t.lenbits=U.bits,$){r.msg="invalid code lengths set",t.mode=At;break}t.have=0,t.mode=bp;case bp:for(;t.have<t.nlen+t.ndist;){for(;y=t.lencode[h&(1<<t.lenbits)-1],_=y>>>24,T=y>>>16&255,m=y&65535,!(_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(m<16)h>>>=_,u-=_,t.lens[t.have++]=m;else{if(m===16){for(V=_+2;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(h>>>=_,u-=_,t.have===0){r.msg="invalid bit length repeat",t.mode=At;break}I=t.lens[t.have-1],f=3+(h&3),h>>>=2,u-=2}else if(m===17){for(V=_+3;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=_,u-=_,I=0,f=3+(h&7),h>>>=3,u-=3}else{for(V=_+7;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=_,u-=_,I=0,f=11+(h&127),h>>>=7,u-=7}if(t.have+f>t.nlen+t.ndist){r.msg="invalid bit length repeat",t.mode=At;break}for(;f--;)t.lens[t.have++]=I}}if(t.mode===At)break;if(t.lens[256]===0){r.msg="invalid code -- missing end-of-block",t.mode=At;break}if(t.lenbits=9,U={bits:t.lenbits},$=An(Q4,t.lens,0,t.nlen,t.lencode,0,t.work,U),t.lenbits=U.bits,$){r.msg="invalid literal/lengths set",t.mode=At;break}if(t.distbits=6,t.distcode=t.distdyn,U={bits:t.distbits},$=An(x4,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,U),t.distbits=U.bits,$){r.msg="invalid distances set",t.mode=At;break}if(t.mode=Ul,e===Nl)break e;case Ul:t.mode=Gl;case Gl:if(o>=6&&l>=258){r.next_out=n,r.avail_out=l,r.next_in=a,r.avail_in=o,t.hold=h,t.bits=u,Kw(r,c),n=r.next_out,s=r.output,l=r.avail_out,a=r.next_in,i=r.input,o=r.avail_in,h=t.hold,u=t.bits,t.mode===Ii&&(t.back=-1);break}for(t.back=0;y=t.lencode[h&(1<<t.lenbits)-1],_=y>>>24,T=y>>>16&255,m=y&65535,!(_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(T&&!(T&240)){for(w=_,O=T,k=m;y=t.lencode[k+((h&(1<<w+O)-1)>>w)],_=y>>>24,T=y>>>16&255,m=y&65535,!(w+_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=w,u-=w,t.back+=w}if(h>>>=_,u-=_,t.back+=_,t.length=m,T===0){t.mode=wp;break}if(T&32){t.back=-1,t.mode=Ii;break}if(T&64){r.msg="invalid literal/length code",t.mode=At;break}t.extra=T&15,t.mode=yp;case yp:if(t.extra){for(V=t.extra;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.length+=h&(1<<t.extra)-1,h>>>=t.extra,u-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=_p;case _p:for(;y=t.distcode[h&(1<<t.distbits)-1],_=y>>>24,T=y>>>16&255,m=y&65535,!(_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(!(T&240)){for(w=_,O=T,k=m;y=t.distcode[k+((h&(1<<w+O)-1)>>w)],_=y>>>24,T=y>>>16&255,m=y&65535,!(w+_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=w,u-=w,t.back+=w}if(h>>>=_,u-=_,t.back+=_,T&64){r.msg="invalid distance code",t.mode=At;break}t.offset=m,t.extra=T&15,t.mode=Tp;case Tp:if(t.extra){for(V=t.extra;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.offset+=h&(1<<t.extra)-1,h>>>=t.extra,u-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){r.msg="invalid distance too far back",t.mode=At;break}t.mode=Cp;case Cp:if(l===0)break e;if(f=c-l,t.offset>f){if(f=t.offset-f,f>t.whave&&t.sane){r.msg="invalid distance too far back",t.mode=At;break}f>t.wnext?(f-=t.wnext,p=t.wsize-f):p=t.wnext-f,f>t.length&&(f=t.length),g=t.window}else g=s,p=n-t.offset,f=t.length;f>l&&(f=l),l-=f,t.length-=f;do s[n++]=g[p++];while(--f);t.length===0&&(t.mode=Gl);break;case wp:if(l===0)break e;s[n++]=t.length,l--,t.mode=Gl;break;case tu:if(t.wrap){for(;u<32;){if(o===0)break e;o--,h|=i[a++]<<u,u+=8}if(c-=l,r.total_out+=c,t.total+=c,t.wrap&4&&c&&(r.adler=t.check=t.flags?xt(t.check,s,c,n-c):_n(t.check,s,c,n-c)),c=l,t.wrap&4&&(t.flags?h:Ep(h))!==t.check){r.msg="incorrect data check",t.mode=At;break}h=0,u=0}t.mode=Sp;case Sp:if(t.wrap&&t.flags){for(;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.wrap&4&&h!==(t.total&4294967295)){r.msg="incorrect length check",t.mode=At;break}h=0,u=0}t.mode=Pp;case Pp:$=rS;break e;case At:$=tp;break e;case zp:return rp;case kp:default:return Br}return r.next_out=n,r.avail_out=l,r.next_in=a,r.avail_in=o,t.hold=h,t.bits=u,(t.wsize||c!==r.avail_out&&t.mode<At&&(t.mode<tu||e!==ep))&&$p(r,r.output,r.next_out,c-r.avail_out),d-=r.avail_in,c-=r.avail_out,r.total_in+=d,r.total_out+=c,t.total+=c,t.wrap&4&&c&&(r.adler=t.check=t.flags?xt(t.check,s,c,r.next_out-c):_n(t.check,s,c,r.next_out-c)),r.data_type=t.bits+(t.last?64:0)+(t.mode===Ii?128:0)+(t.mode===Ul||t.mode===eu?256:0),(d===0&&c===0||e===ep)&&$===Ls&&($=sS),$},dS=r=>{if(Fs(r))return Br;let e=r.state;return e.window&&(e.window=null),r.state=null,Ls},cS=(r,e)=>{if(Fs(r))return Br;const t=r.state;return t.wrap&2?(t.head=e,e.done=!1,Ls):Br},pS=(r,e)=>{const t=e.length;let i,s,a;return Fs(r)||(i=r.state,i.wrap!==0&&i.mode!==Fl)?Br:i.mode===Fl&&(s=1,s=_n(s,e,t,0),s!==i.check)?tp:(a=$p(r,e,t,t),a?(i.mode=zp,rp):(i.havedict=1,Ls))};var gS=Mp,vS=Rp,mS=Ap,bS=hS,yS=Op,_S=fS,TS=dS,CS=cS,wS=pS,SS="pako inflate (from Nodeca project)",$i={inflateReset:gS,inflateReset2:vS,inflateResetKeep:mS,inflateInit:bS,inflateInit2:yS,inflate:_S,inflateEnd:TS,inflateGetHeader:CS,inflateSetDictionary:wS,inflateInfo:SS};function PS(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var zS=PS;const Dp=Object.prototype.toString,{Z_NO_FLUSH:kS,Z_FINISH:ES,Z_OK:Mn,Z_STREAM_END:su,Z_NEED_DICT:au,Z_STREAM_ERROR:AS,Z_DATA_ERROR:Np,Z_MEM_ERROR:MS}=Is;function Rn(r){this.options=Il.assign({chunkSize:1024*64,windowBits:15,to:""},r||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(r&&r.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new q4,this.strm.avail_out=0;let t=$i.inflateInit2(this.strm,e.windowBits);if(t!==Mn)throw new Error(Os[t]);if(this.header=new zS,$i.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=kn.string2buf(e.dictionary):Dp.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=$i.inflateSetDictionary(this.strm,e.dictionary),t!==Mn)))throw new Error(Os[t])}Rn.prototype.push=function(r,e){const t=this.strm,i=this.options.chunkSize,s=this.options.dictionary;let a,n,o;if(this.ended)return!1;for(e===~~e?n=e:n=e===!0?ES:kS,Dp.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),a=$i.inflate(t,n),a===au&&s&&(a=$i.inflateSetDictionary(t,s),a===Mn?a=$i.inflate(t,n):a===Np&&(a=au));t.avail_in>0&&a===su&&t.state.wrap>0&&r[t.next_in]!==0;)$i.inflateReset(t),a=$i.inflate(t,n);switch(a){case AS:case Np:case au:case MS:return this.onEnd(a),this.ended=!0,!1}if(o=t.avail_out,t.next_out&&(t.avail_out===0||a===su))if(this.options.to==="string"){let l=kn.utf8border(t.output,t.next_out),h=t.next_out-l,u=kn.buf2string(t.output,l);t.next_out=h,t.avail_out=i-h,h&&t.output.set(t.output.subarray(l,l+h),0),this.onData(u)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===Mn&&o===0)){if(a===su)return a=$i.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0},Rn.prototype.onData=function(r){this.chunks.push(r)},Rn.prototype.onEnd=function(r){r===Mn&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Il.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function nu(r,e){const t=new Rn(e);if(t.push(r),t.err)throw t.msg||Os[t.err];return t.result}function RS(r,e){return e=e||{},e.raw=!0,nu(r,e)}var OS=Rn,IS=nu,$S=RS,DS=nu,NS=Is,LS={Inflate:OS,inflate:IS,inflateRaw:$S,ungzip:DS,constants:NS};const{Deflate:FS,deflate:US,deflateRaw:GS,gzip:jS}=Yw,{Inflate:BS,inflate:VS,inflateRaw:HS,ungzip:WS}=LS;var qS=FS,YS=US,XS=GS,KS=jS,ZS=BS,JS=VS,QS=HS,xS=WS,eP=Is,tP={Deflate:qS,deflate:YS,deflateRaw:XS,gzip:KS,Inflate:ZS,inflate:JS,inflateRaw:QS,ungzip:xS,constants:eP};const ye={};ye.toRGBA8=function(r){const e=r.width,t=r.height;if(r.tabs.acTL===null)return[ye.toRGBA8.decodeImage(r.data,e,t,r).buffer];const i=[];r.frames[0].data===null&&(r.frames[0].data=r.data);const s=e*t*4,a=new Uint8Array(s),n=new Uint8Array(s),o=new Uint8Array(s);for(let l=0;l<r.frames.length;l++){const h=r.frames[l],u=h.rect.x,d=h.rect.y,c=h.rect.width,f=h.rect.height,p=ye.toRGBA8.decodeImage(h.data,c,f,r);if(l!==0)for(let g=0;g<s;g++)o[g]=a[g];if(h.blend===0?ye._copyTile(p,c,f,a,e,t,u,d,0):h.blend===1&&ye._copyTile(p,c,f,a,e,t,u,d,1),i.push(a.buffer.slice(0)),h.dispose===1)ye._copyTile(n,c,f,a,e,t,u,d,0);else if(h.dispose===2)for(let g=0;g<s;g++)a[g]=o[g]}return i},ye.toRGBA8.decodeImage=function(r,e,t,i){const s=e*t,a=ye.decode._getBPP(i),n=Math.ceil(e*a/8),o=new Uint8Array(s*4),l=new Uint32Array(o.buffer),h=i.ctype,u=i.depth,d=ye._bin.readUshort;if(h===6){const c=s<<2;if(u===8)for(let f=0;f<c;f+=4)o[f]=r[f],o[f+1]=r[f+1],o[f+2]=r[f+2],o[f+3]=r[f+3];if(u===16)for(let f=0;f<c;f++)o[f]=r[f<<1]}else if(h===2){const c=i.tabs.tRNS;if(c===null){if(u===8)for(let f=0;f<s;f++){const p=f*3;l[f]=255<<24|r[p+2]<<16|r[p+1]<<8|r[p]}if(u===16)for(let f=0;f<s;f++){const p=f*6;l[f]=255<<24|r[p+4]<<16|r[p+2]<<8|r[p]}}else{const f=c[0],p=c[1],g=c[2];if(u===8)for(let y=0;y<s;y++){const _=y<<2,T=y*3;l[y]=255<<24|r[T+2]<<16|r[T+1]<<8|r[T],r[T]===f&&r[T+1]===p&&r[T+2]===g&&(o[_+3]=0)}if(u===16)for(let y=0;y<s;y++){const _=y<<2,T=y*6;l[y]=255<<24|r[T+4]<<16|r[T+2]<<8|r[T],d(r,T)===f&&d(r,T+2)===p&&d(r,T+4)===g&&(o[_+3]=0)}}}else if(h===3){const c=i.tabs.PLTE,f=i.tabs.tRNS,p=f?f.length:0;if(u===1)for(let g=0;g<t;g++){const y=g*n,_=g*e;for(let T=0;T<e;T++){const m=_+T<<2,w=r[y+(T>>3)]>>7-((T&7)<<0)&1,O=3*w;o[m]=c[O],o[m+1]=c[O+1],o[m+2]=c[O+2],o[m+3]=w<p?f[w]:255}}if(u===2)for(let g=0;g<t;g++){const y=g*n,_=g*e;for(let T=0;T<e;T++){const m=_+T<<2,w=r[y+(T>>2)]>>6-((T&3)<<1)&3,O=3*w;o[m]=c[O],o[m+1]=c[O+1],o[m+2]=c[O+2],o[m+3]=w<p?f[w]:255}}if(u===4)for(let g=0;g<t;g++){const y=g*n,_=g*e;for(let T=0;T<e;T++){const m=_+T<<2,w=r[y+(T>>1)]>>4-((T&1)<<2)&15,O=3*w;o[m]=c[O],o[m+1]=c[O+1],o[m+2]=c[O+2],o[m+3]=w<p?f[w]:255}}if(u===8)for(let g=0;g<s;g++){const y=g<<2,_=r[g],T=3*_;o[y]=c[T],o[y+1]=c[T+1],o[y+2]=c[T+2],o[y+3]=_<p?f[_]:255}}else if(h===4){if(u===8)for(let c=0;c<s;c++){const f=c<<2,p=c<<1,g=r[p];o[f]=g,o[f+1]=g,o[f+2]=g,o[f+3]=r[p+1]}if(u===16)for(let c=0;c<s;c++){const f=c<<2,p=c<<2,g=r[p];o[f]=g,o[f+1]=g,o[f+2]=g,o[f+3]=r[p+2]}}else if(h===0){const c=i.tabs.tRNS?i.tabs.tRNS:-1;for(let f=0;f<t;f++){const p=f*n,g=f*e;if(u===1)for(let y=0;y<e;y++){const _=255*(r[p+(y>>>3)]>>>7-(y&7)&1),T=_===c*255?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===2)for(let y=0;y<e;y++){const _=85*(r[p+(y>>>2)]>>>6-((y&3)<<1)&3),T=_===c*85?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===4)for(let y=0;y<e;y++){const _=17*(r[p+(y>>>1)]>>>4-((y&1)<<2)&15),T=_===c*17?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===8)for(let y=0;y<e;y++){const _=r[p+y],T=_===c?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===16)for(let y=0;y<e;y++){const _=r[p+(y<<1)],T=d(r,p+(y<<1))===c?0:255;l[g+y]=T<<24|_<<16|_<<8|_}}}return o},ye.decode=function(r){const e=new Uint8Array(r);let t=8;const i=ye._bin,s=i.readUshort,a=i.readUint,n={tabs:{},frames:[]},o=new Uint8Array(e.length);let l=0,h,u=0;const d=[137,80,78,71,13,10,26,10];for(let c=0;c<8;c++)if(e[c]!==d[c])throw"The input is not a PNG file!";for(;t<e.length;){const c=i.readUint(e,t);t+=4;const f=i.readASCII(e,t,4);if(t+=4,f==="IHDR")ye.decode._IHDR(e,t,n);else if(f==="CgBI")n.tabs[f]=e.slice(t,t+4);else if(f==="IDAT"){for(let p=0;p<c;p++)o[l+p]=e[t+p];l+=c}else if(f==="acTL")n.tabs[f]={num_frames:a(e,t),num_plays:a(e,t+4)},h=new Uint8Array(e.length);else if(f==="fcTL"){if(u!==0){const _=n.frames[n.frames.length-1];_.data=ye.decode._decompress(n,h.slice(0,u),_.rect.width,_.rect.height),u=0}const p={x:a(e,t+12),y:a(e,t+16),width:a(e,t+4),height:a(e,t+8)};let g=s(e,t+22);g=s(e,t+20)/(g===0?100:g);const y={rect:p,delay:Math.round(g*1e3),dispose:e[t+24],blend:e[t+25]};n.frames.push(y)}else if(f==="fdAT"){for(let p=0;p<c-4;p++)h[u+p]=e[t+p+4];u+=c-4}else if(f==="pHYs")n.tabs[f]=[i.readUint(e,t),i.readUint(e,t+4),e[t+8]];else if(f==="cHRM"){n.tabs[f]=[];for(let p=0;p<8;p++)n.tabs[f].push(i.readUint(e,t+p*4))}else if(f==="tEXt"||f==="zTXt"){n.tabs[f]===null&&(n.tabs[f]={});const p=i.nextZero(e,t),g=i.readASCII(e,t,p-t);let y;const _=t+c-p-1;if(f==="tEXt")y=i.readASCII(e,p+1,_);else{const T=ye.decode._inflate(e.slice(p+2,p+2+_));y=i.readUTF8(T,0,T.length)}n.tabs[f][g]=y}else if(f==="iTXt"){n.tabs[f]==null&&(n.tabs[f]={});let p=0,g=t;p=i.nextZero(e,g);const y=i.readASCII(e,g,p-g);g=p+1;const _=e[g];g+=2,p=i.nextZero(e,g),g=p+1,p=i.nextZero(e,g),g=p+1;let T;const m=c-(g-t);if(_===0)T=i.readUTF8(e,g,m);else{const w=ye.decode._inflate(e.slice(g,g+m));T=i.readUTF8(w,0,w.length)}n.tabs[f][y]=T}else if(f==="PLTE")n.tabs[f]=i.readBytes(e,t,c);else if(f==="hIST"){const p=n.tabs.PLTE.length/3;n.tabs[f]=[];for(let g=0;g<p;g++)n.tabs[f].push(s(e,t+g*2))}else if(f==="tRNS")n.ctype===3?n.tabs[f]=i.readBytes(e,t,c):n.ctype===0?n.tabs[f]=s(e,t):n.ctype===2&&(n.tabs[f]=[s(e,t),s(e,t+2),s(e,t+4)]);else if(f==="gAMA")n.tabs[f]=i.readUint(e,t)/1e5;else if(f==="sRGB")n.tabs[f]=e[t];else if(f==="bKGD")n.ctype===0||n.ctype===4?n.tabs[f]=[s(e,t)]:n.ctype===2||n.ctype===6?n.tabs[f]=[s(e,t),s(e,t+2),s(e,t+4)]:n.ctype===3&&(n.tabs[f]=e[t]);else if(f==="IEND")break;t+=c,t+=4}if(u!==0){const c=n.frames[n.frames.length-1];c.data=ye.decode._decompress(n,h.slice(0,u),c.rect.width,c.rect.height),u=0}return n.data=ye.decode._decompress(n,o,n.width,n.height),delete n.compress,delete n.interlace,delete n.filter,n},ye.decode._decompress=function(r,e,t,i){const s=ye.decode._getBPP(r),a=Math.ceil(t*s/8),n=new Uint8Array((a+1+r.interlace)*i);return r.tabs.CgBI?e=ye.inflateRaw(e,n):e=ye.decode._inflate(e,n),r.interlace===0?e=ye.decode._filterZero(e,r,0,t,i):r.interlace===1&&(e=ye.decode._readInterlace(e,r)),e},ye.decode._inflate=function(r,e){return ye.inflateRaw(new Uint8Array(r.buffer,2,r.length-6),e)},ye.inflateRaw=function(){const r={};return r.H={},r.H.N=function(e,t){const i=Uint8Array;let s=0,a=0,n=0,o=0,l=0,h=0,u=0,d=0,c=0,f,p;if(e[0]===3&&e[1]===0)return t||new i(0);const g=r.H,y=g.b,_=g.e,T=g.R,m=g.n,w=g.A,O=g.Z,k=g.m,I=t===null;for(I&&(t=new i(e.length>>>2<<3));s===0;){if(s=y(e,c,1),a=y(e,c+1,2),c+=3,a===0){c&7&&(c+=8-(c&7));const $=(c>>>3)+4,G=e[$-4]|e[$-3]<<8;I&&(t=r.H.W(t,d+G)),t.set(new i(e.buffer,e.byteOffset+$,G),d),c=$+G<<3,d+=G;continue}if(I&&(t=r.H.W(t,d+(1<<17))),a===1&&(f=k.J,p=k.h,h=512-1,u=32-1),a===2){n=_(e,c,5)+257,o=_(e,c+5,5)+1,l=_(e,c+10,4)+4,c+=14;let $=1;for(let V=0;V<38;V+=2)k.Q[V]=0,k.Q[V+1]=0;for(let V=0;V<l;V++){const X=_(e,c+V*3,3);k.Q[(k.X[V]<<1)+1]=X,X>$&&($=X)}c+=3*l,m(k.Q,$),w(k.Q,$,k.u),f=k.w,p=k.d,c=T(k.u,(1<<$)-1,n+o,e,c,k.v);const G=g.V(k.v,0,n,k.C);h=(1<<G)-1;const U=g.V(k.v,n,o,k.D);u=(1<<U)-1,m(k.C,G),w(k.C,G,f),m(k.D,U),w(k.D,U,p)}for(;;){const $=f[O(e,c)&h];c+=$&15;const G=$>>>4;if(!(G>>>8))t[d++]=G;else{if(G===256)break;{let U=d+G-254;if(G>264){const oe=k.q[G-257];U=d+(oe>>>3)+_(e,c,oe&7),c+=oe&7}const V=p[O(e,c)&u];c+=V&15;const X=V>>>4,te=k.c[X],ee=(te>>>4)+y(e,c,te&15);for(c+=te&15;d<U;)t[d]=t[d++-ee],t[d]=t[d++-ee],t[d]=t[d++-ee],t[d]=t[d++-ee];d=U}}}}return t.length===d?t:t.slice(0,d)},r.H.W=function(e,t){const i=e.length;if(t<=i)return e;const s=new Uint8Array(i<<1);return s.set(e,0),s},r.H.R=function(e,t,i,s,a,n){const o=r.H.e,l=r.H.Z;let h=0;for(;h<i;){const u=e[l(s,a)&t];a+=u&15;const d=u>>>4;if(d<=15)n[h]=d,h++;else{let c=0,f=0;d===16?(f=3+o(s,a,2),a+=2,c=n[h-1]):d===17?(f=3+o(s,a,3),a+=3):d===18&&(f=11+o(s,a,7),a+=7);const p=h+f;for(;h<p;)n[h]=c,h++}}return a},r.H.V=function(e,t,i,s){let a=0,n=0;const o=s.length>>>1;for(;n<i;){const l=e[n+t];s[n<<1]=0,s[(n<<1)+1]=l,l>a&&(a=l),n++}for(;n<o;)s[n<<1]=0,s[(n<<1)+1]=0,n++;return a},r.H.n=function(e,t){const i=r.H.m,s=e.length;let a,n,o,l,h;const u=i.j;for(let c=0;c<=t;c++)u[c]=0;for(l=1;l<s;l+=2)u[e[l]]++;const d=i.K;for(a=0,u[0]=0,n=1;n<=t;n++)a=a+u[n-1]<<1,d[n]=a;for(o=0;o<s;o+=2)h=e[o+1],h!==0&&(e[o]=d[h],d[h]++)},r.H.A=function(e,t,i){const s=e.length,n=r.H.m.r;for(let o=0;o<s;o+=2)if(e[o+1]!==0){const l=o>>1,h=e[o+1],u=l<<4|h,d=t-h;let c=e[o]<<d;const f=c+(1<<d);for(;c!==f;){const p=n[c]>>>15-t;i[p]=u,c++}}},r.H.l=function(e,t){const i=r.H.m.r,s=15-t;for(let a=0;a<e.length;a+=2){const n=e[a]<<t-e[a+1];e[a]=i[n]>>>s}},r.H.M=function(e,t,i){i=i<<(t&7);const s=t>>>3;e[s]|=i,e[s+1]|=i>>>8},r.H.I=function(e,t,i){i=i<<(t&7);const s=t>>>3;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},r.H.e=function(e,t,i){return(e[t>>>3]|e[(t>>>3)+1]<<8)>>>(t&7)&(1<<i)-1},r.H.b=function(e,t,i){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)&(1<<i)-1},r.H.Z=function(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)},r.H.i=function(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16|e[(t>>>3)+3]<<24)>>>(t&7)},r.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[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,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const e=r.H.m,t=32768;for(let s=0;s<t;s++){let a=s;a=(a&2863311530)>>>1|(a&1431655765)<<1,a=(a&3435973836)>>>2|(a&858993459)<<2,a=(a&4042322160)>>>4|(a&252645135)<<4,a=(a&4278255360)>>>8|(a&16711935)<<8,e.r[s]=(a>>>16|a<<16)>>>17}function i(s,a,n){for(;a--!==0;)s.push(0,n)}for(let s=0;s<32;s++)e.q[s]=e.S[s]<<3|e.T[s],e.c[s]=e.p[s]<<4|e.z[s];i(e._,144,8),i(e._,255-143,9),i(e._,279-255,7),i(e._,287-279,8),r.H.n(e._,9),r.H.A(e._,9,e.J),r.H.l(e._,9),i(e.$,32,5),r.H.n(e.$,5),r.H.A(e.$,5,e.h),r.H.l(e.$,5),i(e.Q,19,0),i(e.C,286,0),i(e.D,30,0),i(e.v,320,0)}(),r.H.N}(),ye.decode._readInterlace=function(r,e){const t=e.width,i=e.height,s=ye.decode._getBPP(e),a=s>>3,n=Math.ceil(t*s/8),o=new Uint8Array(i*n);let l=0;const h=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],c=[8,8,4,4,2,2,1];let f=0;for(;f<7;){const p=d[f],g=c[f];let y=0,_=0,T=h[f];for(;T<i;)T+=p,_++;let m=u[f];for(;m<t;)m+=g,y++;const w=Math.ceil(y*s/8);ye.decode._filterZero(r,e,l,y,_);let O=0,k=h[f];for(;k<i;){let I=u[f],$=l+O*w<<3;for(;I<t;){if(s===1){let G=r[$>>3];G=G>>7-($&7)&1,o[k*n+(I>>3)]|=G<<7-((I&7)<<0)}if(s===2){let G=r[$>>3];G=G>>6-($&7)&3,o[k*n+(I>>2)]|=G<<6-((I&3)<<1)}if(s===4){let G=r[$>>3];G=G>>4-($&7)&15,o[k*n+(I>>1)]|=G<<4-((I&1)<<2)}if(s>=8){const G=k*n+I*a;for(let U=0;U<a;U++)o[G+U]=r[($>>3)+U]}$+=s,I+=g}O++,k+=p}y*_!==0&&(l+=_*(1+w)),f=f+1}return o},ye.decode._getBPP=function(r){return[1,null,3,1,2,null,4][r.ctype]*r.depth},ye.decode._filterZero=function(r,e,t,i,s){let a=ye.decode._getBPP(e);const n=Math.ceil(i*a/8),o=ye.decode._paeth;a=Math.ceil(a/8);let l=0,h=1,u=r[t],d=0;if(u>1&&(r[t]=[0,0,1][u-2]),u===3)for(d=a;d<n;d++)r[d+1]=r[d+1]+(r[d+1-a]>>>1)&255;for(let c=0;c<s;c++)if(l=t+c*n,h=l+c+1,u=r[h-1],d=0,u===0)for(;d<n;d++)r[l+d]=r[h+d];else if(u===1){for(;d<a;d++)r[l+d]=r[h+d];for(;d<n;d++)r[l+d]=r[h+d]+r[l+d-a]}else if(u===2)for(;d<n;d++)r[l+d]=r[h+d]+r[l+d-n];else if(u===3){for(;d<a;d++)r[l+d]=r[h+d]+(r[l+d-n]>>>1);for(;d<n;d++)r[l+d]=r[h+d]+(r[l+d-n]+r[l+d-a]>>>1)}else{for(;d<a;d++)r[l+d]=r[h+d]+o(0,r[l+d-n],0);for(;d<n;d++)r[l+d]=r[h+d]+o(r[l+d-a],r[l+d-n],r[l+d-a-n])}return r},ye.decode._paeth=function(r,e,t){const i=r+e-t,s=i-r,a=i-e,n=i-t;return s*s<=a*a&&s*s<=n*n?r:a*a<=n*n?e:t},ye.decode._IHDR=function(r,e,t){const i=ye._bin;t.width=i.readUint(r,e),e+=4,t.height=i.readUint(r,e),e+=4,t.depth=r[e],e++,t.ctype=r[e],e++,t.compress=r[e],e++,t.filter=r[e],e++,t.interlace=r[e],e++},ye._bin={nextZero:function(r,e){for(;r[e]!==0;)e++;return e},readUshort:function(r,e){return r[e]<<8|r[e+1]},writeUshort:function(r,e,t){r[e]=t>>8&255,r[e+1]=t&255},readUint:function(r,e){return r[e]*(256*256*256)+(r[e+1]<<16|r[e+2]<<8|r[e+3])},writeUint:function(r,e,t){r[e]=t>>24&255,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t&255},readASCII:function(r,e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(r[e+s]);return i},writeASCII:function(r,e,t){for(let i=0;i<t.length;i++)r[e+i]=t.charCodeAt(i)},readBytes:function(r,e,t){const i=[];for(let s=0;s<t;s++)i.push(r[e+s]);return i},pad:function(r){return r.length<2?"0"+r:r},readUTF8:function(r,e,t){let i="",s;for(let a=0;a<t;a++)i+="%"+ye._bin.pad(r[e+a].toString(16));try{s=decodeURIComponent(i)}catch{return ye._bin.readASCII(r,e,t)}return s}},ye._copyTile=function(r,e,t,i,s,a,n,o,l){const h=Math.min(e,s),u=Math.min(t,a);let d=0,c=0;for(let f=0;f<u;f++)for(let p=0;p<h;p++)if(n>=0&&o>=0?(d=f*e+p<<2,c=(o+f)*s+n+p<<2):(d=(-o+f)*e-n+p<<2,c=f*s+p<<2),l===0)i[c]=r[d],i[c+1]=r[d+1],i[c+2]=r[d+2],i[c+3]=r[d+3];else if(l===1){const g=r[d+3]*.00392156862745098,y=r[d]*g,_=r[d+1]*g,T=r[d+2]*g,m=i[c+3]*(1/255),w=i[c]*m,O=i[c+1]*m,k=i[c+2]*m,I=1-g,$=g+m*I,G=$===0?0:1/$;i[c+3]=255*$,i[c+0]=(y+w*I)*G,i[c+1]=(_+O*I)*G,i[c+2]=(T+k*I)*G}else if(l===2){const g=r[d+3],y=r[d],_=r[d+1],T=r[d+2],m=i[c+3],w=i[c],O=i[c+1],k=i[c+2];g===m&&y===w&&_===O&&T===k?(i[c]=0,i[c+1]=0,i[c+2]=0,i[c+3]=0):(i[c]=y,i[c+1]=_,i[c+2]=T,i[c+3]=g)}else if(l===3){const g=r[d+3],y=r[d],_=r[d+1],T=r[d+2],m=i[c+3],w=i[c],O=i[c+1],k=i[c+2];if(g===m&&y===w&&_===O&&T===k)continue;if(g<220&&m>20)return!1}return!0},ye.encode=function(r,e,t,i,s,a,n){i===null&&(i=0),n===null&&(n=!1);const o=ye.encode.compress(r,e,t,i,[!1,!1,!1,0,n]);return ye.encode.compressPNG(o,-1),ye.encode._main(o,e,t,s,a)},ye.encodeLL=function(r,e,t,i,s,a,n,o){const l={ctype:0+(i===1?0:2)+(s===0?0:4),depth:a,frames:[]},h=(i+s)*a,u=h*e;for(let c=0;c<r.length;c++)l.frames.push({rect:{x:0,y:0,width:e,height:t},img:new Uint8Array(r[c]),blend:0,dispose:1,bpp:Math.ceil(h/8),bpl:Math.ceil(u/8)});return ye.encode.compressPNG(l,0,!0),ye.encode._main(l,e,t,n,o)},ye.encode._main=function(r,e,t,i,s){s||(s={});const a=ye.crc.crc,n=ye._bin.writeUint,o=ye._bin.writeUshort,l=ye._bin.writeASCII;let h=8;const u=r.frames.length>1;let d=!1,c=8+(16+5+4)+(u?20:0);if(s.sRGB!==null&&s.sRGB!==void 0&&(c+=8+1+4),s.pHYs!==null&&s.pHYs!==void 0&&(c+=8+9+4),r.ctype===3){const y=r.plte.length;for(let _=0;_<y;_++)r.plte[_]>>>24!==255&&(d=!0);c+=8+y*3+4+(d?8+y*1+4:0)}for(let y=0;y<r.frames.length;y++){const _=r.frames[y];u&&(c+=38),c+=_.cimg.length+12,y!==0&&(c+=4)}c+=12;const f=new Uint8Array(c),p=[137,80,78,71,13,10,26,10];for(let y=0;y<8;y++)f[y]=p[y];if(n(f,h,13),h+=4,l(f,h,"IHDR"),h+=4,n(f,h,e),h+=4,n(f,h,t),h+=4,f[h]=r.depth,h++,f[h]=r.ctype,h++,f[h]=0,h++,f[h]=0,h++,f[h]=0,h++,n(f,h,a(f,h-17,17)),h+=4,s.sRGB!==null&&s.sRGB!==void 0&&(n(f,h,1),h+=4,l(f,h,"sRGB"),h+=4,f[h]=s.sRGB,h++,n(f,h,a(f,h-5,5)),h+=4),s.pHYs!==null&&s.pHYs!==void 0&&(n(f,h,9),h+=4,l(f,h,"pHYs"),h+=4,n(f,h,s.pHYs[0]),h+=4,n(f,h,s.pHYs[1]),h+=4,f[h]=s.pHYs[2],h++,n(f,h,a(f,h-13,13)),h+=4),u&&(n(f,h,8),h+=4,l(f,h,"acTL"),h+=4,n(f,h,r.frames.length),h+=4,n(f,h,s.loop!=null?s.loop:0),h+=4,n(f,h,a(f,h-12,12)),h+=4),r.ctype===3){const y=r.plte.length;n(f,h,y*3),h+=4,l(f,h,"PLTE"),h+=4;for(let _=0;_<y;_++){const T=_*3,m=r.plte[_],w=m&255,O=m>>>8&255,k=m>>>16&255;f[h+T+0]=w,f[h+T+1]=O,f[h+T+2]=k}if(h+=y*3,n(f,h,a(f,h-y*3-4,y*3+4)),h+=4,d){n(f,h,y),h+=4,l(f,h,"tRNS"),h+=4;for(let _=0;_<y;_++)f[h+_]=r.plte[_]>>>24&255;h+=y,n(f,h,a(f,h-y-4,y+4)),h+=4}}let g=0;for(let y=0;y<r.frames.length;y++){const _=r.frames[y];u&&(n(f,h,26),h+=4,l(f,h,"fcTL"),h+=4,n(f,h,g++),h+=4,n(f,h,_.rect.width),h+=4,n(f,h,_.rect.height),h+=4,n(f,h,_.rect.x),h+=4,n(f,h,_.rect.y),h+=4,o(f,h,i[y]),h+=2,o(f,h,1e3),h+=2,f[h]=_.dispose,h++,f[h]=_.blend,h++,n(f,h,a(f,h-30,30)),h+=4);const T=_.cimg,m=T.length;n(f,h,m+(y===0?0:4)),h+=4;const w=h;l(f,h,y===0?"IDAT":"fdAT"),h+=4,y!==0&&(n(f,h,g++),h+=4),f.set(T,h),h+=m,n(f,h,a(f,w,h-w)),h+=4}return n(f,h,0),h+=4,l(f,h,"IEND"),h+=4,n(f,h,a(f,h-4,4)),h+=4,f.buffer},ye.encode.compressPNG=function(r,e,t){for(let i=0;i<r.frames.length;i++){const s=r.frames[i],a=s.rect.height,n=new Uint8Array(a*s.bpl+a);s.cimg=ye.encode._filterZero(s.img,a,s.bpp,s.bpl,n,e,t)}},ye.encode.compress=function(r,e,t,i,s){const a=s[0],n=s[1],o=s[2],l=s[3],h=s[4];let u=6,d=8,c=255;for(let m=0;m<r.length;m++){const w=new Uint8Array(r[m]),O=w.length;for(let k=0;k<O;k+=4)c&=w[k+3]}const f=c!==255,p=ye.encode.framize(r,e,t,a,n,o),g={},y=[],_=[];if(i!==0){const m=[];for(let $=0;$<p.length;$++)m.push(p[$].img.buffer);const w=ye.encode.concatRGBA(m),O=ye.quantize(w,i);let k=0;const I=new Uint8Array(O.abuf);for(let $=0;$<p.length;$++){const G=p[$].img,U=G.length;_.push(new Uint8Array(O.inds.buffer,k>>2,U>>2));for(let V=0;V<U;V+=4)G[V]=I[k+V],G[V+1]=I[k+V+1],G[V+2]=I[k+V+2],G[V+3]=I[k+V+3];k+=U}for(let $=0;$<O.plte.length;$++)y.push(O.plte[$].est.rgba)}else for(let m=0;m<p.length;m++){const w=p[m],O=new Uint32Array(w.img.buffer),k=w.rect.width,I=O.length,$=new Uint8Array(I);_.push($);for(let G=0;G<I;G++){const U=O[G];if(G!==0&&U===O[G-1])$[G]=$[G-1];else if(G>k&&U===O[G-k])$[G]=$[G-k];else{let V=g[U];if(V===null&&(g[U]=V=y.length,y.push(U),y.length>=300))break;$[G]=V}}}const T=y.length;T<=256&&h===!1&&(T<=2?d=1:T<=4?d=2:T<=16?d=4:d=8,d=Math.max(d,l));for(let m=0;m<p.length;m++){const w=p[m],O=w.rect.width,k=w.rect.height;let I=w.img,$=4*O,G=4;if(T<=256&&h===!1){$=Math.ceil(d*O/8);const U=new Uint8Array($*k),V=_[m];for(let X=0;X<k;X++){const te=X*$,ee=X*O;if(d===8)for(let oe=0;oe<O;oe++)U[te+oe]=V[ee+oe];else if(d===4)for(let oe=0;oe<O;oe++)U[te+(oe>>1)]|=V[ee+oe]<<4-(oe&1)*4;else if(d===2)for(let oe=0;oe<O;oe++)U[te+(oe>>2)]|=V[ee+oe]<<6-(oe&3)*2;else if(d===1)for(let oe=0;oe<O;oe++)U[te+(oe>>3)]|=V[ee+oe]<<7-(oe&7)*1}I=U,u=3,G=1}else if(f===!1&&p.length===1){const U=new Uint8Array(O*k*3),V=O*k;for(let X=0;X<V;X++){const te=X*3,ee=X*4;U[te]=I[ee],U[te+1]=I[ee+1],U[te+2]=I[ee+2]}I=U,u=2,G=3,$=3*O}w.img=I,w.bpl=$,w.bpp=G}return{ctype:u,depth:d,plte:y,frames:p}},ye.encode.framize=function(r,e,t,i,s,a){const n=[];for(let o=0;o<r.length;o++){const l=new Uint8Array(r[o]),h=new Uint32Array(l.buffer);let u,d=0,c=0,f=e,p=t,g=i?1:0;if(o!==0){const y=a||i||o===1||n[o-2].dispose!==0?1:2;let _=0,T=1e9;for(let w=0;w<y;w++){const O=new Uint32Array(r[o-1-w]);let k=e,I=t,$=-1,G=-1;for(let V=0;V<t;V++)for(let X=0;X<e;X++){const te=V*e+X;h[te]!==O[te]&&(X<k&&(k=X),X>$&&($=X),V<I&&(I=V),V>G&&(G=V))}$===-1&&(k=I=$=G=0),s&&((k&1)===1&&k--,(I&1)===1&&I--);const U=($-k+1)*(G-I+1);U<T&&(T=U,_=w,d=k,c=I,f=$-k+1,p=G-I+1)}const m=new Uint8Array(r[o-1-_]);_===1&&(n[o-1].dispose=2),u=new Uint8Array(f*p*4),ye._copyTile(m,e,t,u,f,p,-d,-c,0),g=ye._copyTile(l,e,t,u,f,p,-d,-c,3)?1:0,g===1?ye.encode._prepareDiff(l,e,t,u,{x:d,y:c,width:f,height:p}):ye._copyTile(l,e,t,u,f,p,-d,-c,0)}else u=l.slice(0);n.push({rect:{x:d,y:c,width:f,height:p},img:u,blend:g,dispose:0})}if(i)for(let o=0;o<n.length;o++){const l=n[o];if(l.blend===1)continue;const h=l.rect,u=n[o-1].rect,d=Math.min(h.x,u.x),c=Math.min(h.y,u.y),f=Math.max(h.x+h.width,u.x+u.width),p=Math.max(h.y+h.height,u.y+u.height),g={x:d,y:c,width:f-d,height:p-c};n[o-1].dispose=1,o-1!==0&&ye.encode._updateFrame(r,e,t,n,o-1,g,s),ye.encode._updateFrame(r,e,t,n,o,g,s)}return n},ye.encode._updateFrame=function(r,e,t,i,s,a,n){const o=Uint8Array,l=Uint32Array,h=new o(r[s-1]),u=new l(r[s-1]),d=s+1<r.length?new o(r[s+1]):null,c=new o(r[s]),f=new l(c.buffer);let p=e,g=t,y=-1,_=-1;for(let m=0;m<a.height;m++)for(let w=0;w<a.width;w++){const O=a.x+w,k=a.y+m,I=k*e+O,$=f[I];$===0||i[s-1].dispose===0&&u[I]===$&&(d===null||d[I*4+3]!==0)||(O<p&&(p=O),O>y&&(y=O),k<g&&(g=k),k>_&&(_=k))}y===-1&&(p=g=y=_=0),n&&((p&1)===1&&p--,(g&1)===1&&g--),a={x:p,y:g,width:y-p+1,height:_-g+1};const T=i[s];T.rect=a,T.blend=1,T.img=new Uint8Array(a.width*a.height*4),i[s-1].dispose===0?(ye._copyTile(h,e,t,T.img,a.width,a.height,-a.x,-a.y,0),ye.encode._prepareDiff(c,e,t,T.img,a)):ye._copyTile(c,e,t,T.img,a.width,a.height,-a.x,-a.y,0)},ye.encode._prepareDiff=function(r,e,t,i,s){ye._copyTile(r,e,t,i,s.width,s.height,-s.x,-s.y,2)},ye.encode._filterZero=function(r,e,t,i,s,a,n){const o=[];let l=[0,1,2,3,4];a!==-1?l=[a]:(e*i>5e5||t===1)&&(l=[0]);let h;n&&(h={level:0});const u=s.length>1e7&&p4!=null?p4:tP;for(let f=0;f<l.length;f++){for(let p=0;p<e;p++)ye.encode._filterLine(s,r,p,i,t,l[f]);o.push(u.deflate(s,h))}let d,c=1e9;for(let f=0;f<o.length;f++)o[f].length<c&&(d=f,c=o[f].length);return o[d]},ye.encode._filterLine=function(r,e,t,i,s,a){const n=t*i;let o=n+t;const l=ye.decode._paeth;if(r[o]=a,o++,a===0)if(i<500)for(let h=0;h<i;h++)r[o+h]=e[n+h];else r.set(new Uint8Array(e.buffer,n,i),o);else if(a===1){for(let h=0;h<s;h++)r[o+h]=e[n+h];for(let h=s;h<i;h++)r[o+h]=e[n+h]-e[n+h-s]+256&255}else if(t===0){for(let h=0;h<s;h++)r[o+h]=e[n+h];if(a===2)for(let h=s;h<i;h++)r[o+h]=e[n+h];if(a===3)for(let h=s;h<i;h++)r[o+h]=e[n+h]-(e[n+h-s]>>1)+256&255;if(a===4)for(let h=s;h<i;h++)r[o+h]=e[n+h]-l(e[n+h-s],0,0)+256&255}else{if(a===2)for(let h=0;h<i;h++)r[o+h]=e[n+h]+256-e[n+h-i]&255;if(a===3){for(let h=0;h<s;h++)r[o+h]=e[n+h]+256-(e[n+h-i]>>1)&255;for(let h=s;h<i;h++)r[o+h]=e[n+h]+256-(e[n+h-i]+e[n+h-s]>>1)&255}if(a===4){for(let h=0;h<s;h++)r[o+h]=e[n+h]+256-l(0,e[n+h-i],0)&255;for(let h=s;h<i;h++)r[o+h]=e[n+h]+256-l(e[n+h-s],e[n+h-i],e[n+h-s-i])&255}}},ye.crc={table:function(){const r=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let i=0;i<8;i++)t&1?t=3988292384^t>>>1:t=t>>>1;r[e]=t}return r}(),update:function(r,e,t,i){for(let s=0;s<i;s++)r=ye.crc.table[(r^e[t+s])&255]^r>>>8;return r},crc:function(r,e,t){return ye.crc.update(4294967295,r,e,t)^4294967295}},ye.quantize=function(r,e){const t=new Uint8Array(r),i=t.slice(0),s=new Uint32Array(i.buffer),a=ye.quantize.getKDtree(i,e),n=a[0],o=a[1],l=ye.quantize.planeDst,h=t,u=s,d=h.length,c=new Uint8Array(t.length>>2);let f;if(t.length<2e7)for(let p=0;p<d;p+=4){const g=h[p]*.00392156862745098,y=h[p+1]*(1/255),_=h[p+2]*(1/255),T=h[p+3]*(1/255);f=ye.quantize.getNearest(n,g,y,_,T),c[p>>2]=f.ind,u[p>>2]=f.est.rgba}else for(let p=0;p<d;p+=4){const g=h[p]*.00392156862745098,y=h[p+1]*(1/255),_=h[p+2]*(1/255),T=h[p+3]*(1/255);for(f=n;f.left;)f=l(f.est,g,y,_,T)<=0?f.left:f.right;c[p>>2]=f.ind,u[p>>2]=f.est.rgba}return{abuf:i.buffer,inds:c,plte:o}},ye.quantize.getKDtree=function(r,e,t){t===null&&(t=1e-4);const i=new Uint32Array(r.buffer),s={i0:0,i1:r.length,bst:null,est:null,tdst:0,left:null,right:null};s.bst=ye.quantize.stats(r,s.i0,s.i1),s.est=ye.quantize.estats(s.bst);const a=[s];for(;a.length<e;){let n=0,o=0;for(let f=0;f<a.length;f++)a[f].est.L>n&&(n=a[f].est.L,o=f);if(n<t)break;const l=a[o],h=ye.quantize.splitPixels(r,i,l.i0,l.i1,l.est.e,l.est.eMq255);if(l.i0>=h||l.i1<=h){l.est.L=0;continue}const d={i0:l.i0,i1:h,bst:null,est:null,tdst:0,left:null,right:null};d.bst=ye.quantize.stats(r,d.i0,d.i1),d.est=ye.quantize.estats(d.bst);const c={i0:h,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};c.bst={R:[],m:[],N:l.bst.N-d.bst.N};for(let f=0;f<16;f++)c.bst.R[f]=l.bst.R[f]-d.bst.R[f];for(let f=0;f<4;f++)c.bst.m[f]=l.bst.m[f]-d.bst.m[f];c.est=ye.quantize.estats(c.bst),l.left=d,l.right=c,a[o]=d,a.push(c)}a.sort(function(n,o){return o.bst.N-n.bst.N});for(let n=0;n<a.length;n++)a[n].ind=n;return[s,a]},ye.quantize.getNearest=function(r,e,t,i,s){if(r.left==null)return r.tdst=ye.quantize.dist(r.est.q,e,t,i,s),r;const a=ye.quantize.planeDst(r.est,e,t,i,s);let n=r.left,o=r.right;a>0&&(n=r.right,o=r.left);const l=ye.quantize.getNearest(n,e,t,i,s);if(l.tdst<=a*a)return l;const h=ye.quantize.getNearest(o,e,t,i,s);return h.tdst<l.tdst?h:l},ye.quantize.planeDst=function(r,e,t,i,s){const a=r.e;return a[0]*e+a[1]*t+a[2]*i+a[3]*s-r.eMq},ye.quantize.dist=function(r,e,t,i,s){const a=e-r[0],n=t-r[1],o=i-r[2],l=s-r[3];return a*a+n*n+o*o+l*l},ye.quantize.splitPixels=function(r,e,t,i,s,a){const n=ye.quantize.vecDot;for(i-=4;t<i;){for(;n(r,t,s)<=a;)t+=4;for(;n(r,i,s)>a;)i-=4;if(t>=i)break;const o=e[t>>2];e[t>>2]=e[i>>2],e[i>>2]=o,t+=4,i-=4}for(;n(r,t,s)>a;)t-=4;return t+4},ye.quantize.vecDot=function(r,e,t){return r[e]*t[0]+r[e+1]*t[1]+r[e+2]*t[2]+r[e+3]*t[3]},ye.quantize.stats=function(r,e,t){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=[0,0,0,0],a=t-e>>2;for(let n=e;n<t;n+=4){const o=r[n]*.00392156862745098,l=r[n+1]*(1/255),h=r[n+2]*(1/255),u=r[n+3]*(1/255);s[0]+=o,s[1]+=l,s[2]+=h,s[3]+=u,i[0]+=o*o,i[1]+=o*l,i[2]+=o*h,i[3]+=o*u,i[5]+=l*l,i[6]+=l*h,i[7]+=l*u,i[10]+=h*h,i[11]+=h*u,i[15]+=u*u}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:s,N:a}},ye.quantize.estats=function(r){const e=r.R,t=r.m,i=r.N,s=t[0],a=t[1],n=t[2],o=t[3],l=i===0?0:1/i,h=[e[0]-s*s*l,e[1]-s*a*l,e[2]-s*n*l,e[3]-s*o*l,e[4]-a*s*l,e[5]-a*a*l,e[6]-a*n*l,e[7]-a*o*l,e[8]-n*s*l,e[9]-n*a*l,e[10]-n*n*l,e[11]-n*o*l,e[12]-o*s*l,e[13]-o*a*l,e[14]-o*n*l,e[15]-o*o*l],u=h,d=ye.M4;let c=[Math.random(),Math.random(),Math.random(),Math.random()],f=0,p=0;if(i!==0)for(let _=0;_<16&&(c=d.multVec(u,c),p=Math.sqrt(d.dot(c,c)),c=d.sml(1/p,c),!(_!==0&&Math.abs(p-f)<1e-9));_++)f=p;const g=[s*l,a*l,n*l,o*l],y=d.dot(d.sml(255,g),c);return{Cov:h,q:g,e:c,L:f,eMq255:y,eMq:d.dot(c,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0])<<0)>>>0}},ye.M4={multVec:function(r,e){return[r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3],r[4]*e[0]+r[5]*e[1]+r[6]*e[2]+r[7]*e[3],r[8]*e[0]+r[9]*e[1]+r[10]*e[2]+r[11]*e[3],r[12]*e[0]+r[13]*e[1]+r[14]*e[2]+r[15]*e[3]]},dot:function(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]},sml:function(r,e){return[r*e[0],r*e[1],r*e[2],r*e[3]]}},ye.encode.concatRGBA=function(r){let e=0;for(let s=0;s<r.length;s++)e+=r[s].byteLength;const t=new Uint8Array(e);let i=0;for(let s=0;s<r.length;s++){const a=new Uint8Array(r[s]),n=a.length;for(let o=0;o<n;o+=4){let l=a[o],h=a[o+1],u=a[o+2];const d=a[o+3];d===0&&(l=h=u=0),t[i+o]=l,t[i+o+1]=h,t[i+o+2]=u,t[i+o+3]=d}i+=n}return t.buffer};const jl=new Map,ou=(r,e)=>{if(jl.has(r))return e(null,jl.get(r));const t=new Image;t.onload=function(){jl.set(r,{width:t.width,height:t.height,element:t}),e(null,jl.get(r))},t.onerror=function(i){e(i,null)},t.src=r},rP=(r,e)=>{for(let t=0,i=r.length;t<i;t++){const s=r[t],{type:a}=s;if(a.split("/")[0]!=="image")return;const o=new FileReader;o.onload=function(l){if(!l.target)return e("no reader target",null);const h=l.target.result,u=ff(h),d=new Blob([h]);lu(d,(c,f)=>{if(!f)return e(c,null);ou(f,(p,g)=>{if(!g)return e(p,null);Lp(f,(y,_)=>{if(!_)return e(y,null);const T={name:s.name,fileType:u,size:s.size,width:g.width,height:g.height,imgUrl:f,imageData:_,blob:d};return e(null,T)})})})},o.readAsArrayBuffer(s)}},Lp=(r,e)=>{ou(r,(t,i)=>{if(!i)return e(t,null);const s=document.createElement("canvas"),a=s.getContext("2d");s.width=i.width,s.height=i.height,a.drawImage(i.element,0,0,s.width,s.height);const n=a.getImageData(0,0,s.width,s.height);return e(null,n)})},iP=(r,e=0,t=0)=>{const i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=t,s.drawImage(r,0,0,e,t),s.getImageData(0,0,e,t)},sP=(r,e=0,t=0)=>{const i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=t,s.drawImage(r,0,0,e,t),s.getImageData(0,0,e,t)},aP=r=>{const e=r.width,t=r.height,i=e*t*3,s=i+54,a=[66,77,s&255,s>>8&255,s>>16&255,s>>24&255,0,0,0,0,54,0,0,0],n=[40,0,0,0,e&255,e>>8&255,e>>16&255,e>>24&255,t&255,t>>8&255,t>>16&255,t>>24&255,1,0,24,0,0,0,0,0,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=(4-e*3%4)%4,l=r.data;let h="";const u=e<<2;let d=t;const c=String.fromCharCode;do{const p=u*(d-1);let g="";for(let y=0;y<e;y++){const _=y<<2;g+=c(l[p+_+2])+c(l[p+_+1])+c(l[p+_])}for(let y=0;y<o;y++)g+=String.fromCharCode(0);h+=g}while(--d);function f(p){if(!window.btoa)throw"btoa undefined";let g="";if(typeof p=="string")g=p;else for(let y=0;y<p.length;y++)g+=String.fromCharCode(p[y]);return btoa(g)}return f(a.concat(n))+f(h)},nP=r=>{const{width:e,height:t}=r,i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=t,s.putImageData(r,0,0,0,0,e,t),i.toDataURL("image/png")},oP=(r,e,t)=>{const{width:i,height:s}=r,a=document.createElement("canvas"),n=a.getContext("2d");a.width=i,a.height=s,n.putImageData(r,0,0,0,0,i,s);const o=`image/${e?e.toLowerCase():"png"}`;a.toBlob(l=>{t?.(null,l)},o,1)},lu=(r,e)=>{const t=new FileReader;t.onload=function(i){i.target?e(null,i.target.result):e("can't readAsDataURL",null)},t.readAsDataURL(r)},lP=(r,e)=>{lu(r,function(t,i){if(i){const s=new Image;s.src=i}else e(t)})};function hP(r){const e=[],t=[],i=[];let s=0;for(let l=0,h=r.data.length;l<h;l+=4)e[s]=r.data[l],t[s]=r.data[l+1],i[s]=r.data[l+2],s+=1;const a=hu(e),n=hu(t),o=hu(i);return"rgb("+a+","+n+","+o+")"}function hu(r){const e={},t=[],i=[];for(let o=0;o<r.length;o++)e[r[o]]?t.push(r[o]):e[r[o]]=1;let s=0;for(let o=0;o<t.length;o++){s=0;for(let l=0;l<t.length;l++)t[o]===t[l]&&(s+=1),i[o]=s}const a=Math.max.apply(null,i);let n=0;for(;n<i.length;n++)if(i[n]===a)return;return t[n]}const uP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[(n*t+t-o-1)*4],s[l+1]=e[(n*t+t-o-1)*4+1],s[l+2]=e[(n*t+t-o-1)*4+2],s[l+3]=e[(n*t+t-o-1)*4+3]}return new ImageData(s,t,i)},fP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[((i-n-1)*t+o)*4],s[l+1]=e[((i-n-1)*t+o)*4+1],s[l+2]=e[((i-n-1)*t+o)*4+2],s[l+3]=e[((i-n-1)*t+o)*4+3]}return new ImageData(s,t,i)},dP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<t;n++)for(let o=0;o<i;o++){const l=(n*i+o)*4;s[l]=e[(o*t+t-n-1)*4],s[l+1]=e[(o*t+t-n-1)*4+1],s[l+2]=e[(o*t+t-n-1)*4+2],s[l+3]=e[(o*t+t-n-1)*4+3]}return new ImageData(s,i,t)},cP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<t;n++)for(let o=0;o<i;o++){const l=(n*i+o)*4;s[l]=e[((i-o-1)*t+n)*4],s[l+1]=e[((i-o-1)*t+n)*4+1],s[l+2]=e[((i-o-1)*t+n)*4+2],s[l+3]=e[((i-o-1)*t+n)*4+3]}return new ImageData(s,i,t)},pP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l]+e[l+1]+e[l+2])/3;s[l]=h,s[l+1]=h,s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},gP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=.2126*e[l]+.7152*e[l+1]+.0722*e[l+2];s[l]=h,s[l+1]=h,s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},vP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,u=(e[l]+e[l+1]+e[l+2])/3>127?255:0;s[l]=u,s[l+1]=u,s[l+2]=u,s[l+3]=e[l+3]}return new ImageData(s,t,i)},mP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=255-e[l],s[l+1]=255-e[l+1],s[l+2]=255-e[l+2],s[l+3]=e[l+3]}return new ImageData(s,t,i)},bP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=0,s[l+2]=0,s[l+3]=e[l+3]}return new ImageData(s,t,i)},yP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=0,s[l+1]=e[l+1],s[l+2]=0,s[l+3]=e[l+3]}return new ImageData(s,t,i)},_P=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=0,s[l+1]=0,s[l+2]=e[l+2],s[l+3]=e[l+3]}return new ImageData(s,t,i)},TP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=e[l+1],s[l+2]=0,s[l+3]=e[l+3]}return new ImageData(s,t,i)},CP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=0,s[l+2]=e[l+1],s[l+3]=e[l+3]}return new ImageData(s,t,i)},wP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=0,s[l+1]=e[l+1],s[l+2]=e[l+1],s[l+3]=e[l+3]}return new ImageData(s,t,i)},SP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l+1]+e[l+2])/2;s[l]=e[l],s[l+1]=h,s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},PP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l]+e[l+2])/2;s[l]=h,s[l+1]=e[l+1],s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},zP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l]+e[l+1])/2;s[l]=h,s[l+1]=h,s[l+2]=e[l+2],s[l+3]=e[l+3]}return new ImageData(s,t,i)},kP=r=>Fp(r,[-1,-1,-1,-1,9,-1,-1,-1,-1]),EP=r=>Fp(r,[-1,-1,-1,-1,8,-1,-1,-1,-1]),AP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=e[l+1],s[l+2]=e[l+2],s[l+3]=255}return new ImageData(s,t,i)},MP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;if(e[l+3]===0)s[l]=255,s[l+1]=255,s[l+2]=255,s[l+3]=255;else{const h=Up([e[l],e[l+1],e[l+2],e[l+3]],[255,255,255,255]);s[l]=h[0],s[l+1]=h[1],s[l+2]=h[2],s[l+3]=h[3]}}return new ImageData(s,t,i)},RP=(r,e,t,i,s,a=!1,n)=>{const{data:o,width:l,height:h}=r;let u=s,d=i,c=e,f=t;if(u<0?u=0:u>l&&(u=l),d<0?d=0:d>h&&(d=h),c<1?c=1:c>l&&(c=l),f<1?f=1:f>h&&(f=h),u+c>l&&(c=l-u),d+f>h&&(f=h-d),a){const p=new Uint8ClampedArray(o.length);for(let y=0;y<h;y++)for(let _=0;_<l;_++){const T=(y*l+_)*4;_>=u&&_<=u+c&&y>=d&&y<=d+f?(p[T]=o[T],p[T+1]=o[T+1],p[T+2]=o[T+2],p[T+3]=o[T+3]):(p[T]=255,p[T+1]=255,p[T+2]=255,p[T+3]=n&&["JPG","JPEG"].includes(n.toUpperCase())?255:0)}return new ImageData(p,l,h)}else{const p=new Uint8ClampedArray(c*f*4);for(let y=d;y<=d+f;y++)for(let _=u;_<=u+c;_++){const T=((y-d)*c+_-u)*4,m=(y*l+_)*4;p[T]=o[m],p[T+1]=o[m+1],p[T+2]=o[m+2],p[T+3]=o[m+3]}return new ImageData(p,c,f)}},OP=(r,e,t,i)=>{const{data:s,width:a,height:n}=r;let o=e;o>Math.floor(a/2)&&(o=Math.floor(a/2)),o>Math.floor(n/2)&&(o=Math.floor(n/2)),o<0&&(o=0);const l=new Uint8ClampedArray(s.length);for(let u=0;u<n;u++)for(let d=0;d<a;d++){const c=(u*a+d)*4;let f=-1;d<o?u<o?f=Math.sqrt(Math.pow(o-d-1,2)+Math.pow(o-u-1,2)):u>n-o-1&&(f=Math.sqrt(Math.pow(o-d-1,2)+Math.pow(u-(n-o),2))):d>a-o-1&&(u<o?f=Math.sqrt(Math.pow(d-(a-o),2)+Math.pow(o-u-1,2)):u>n-o-1&&(f=Math.sqrt(Math.pow(d-(a-o),2)+Math.pow(u-(n-o),2)))),Math.round(f)>o?(l[c]=255,l[c+1]=255,l[c+2]=255,l[c+3]=i||t.toUpperCase()==="PNG"?0:255):(l[c]=s[c],l[c+1]=s[c+1],l[c+2]=s[c+2],l[c+3]=i||t.toUpperCase()==="PNG"?s[c+3]:255)}return new ImageData(l,a,n)},IP=(r,e,t,i,s,a=1e4)=>{const n=new Image;n.src=r;const o=document.createElement("canvas"),l=o.getContext("2d");return o.width=a,o.height=a,l.drawImage(n,0,0,e,t,0,0,i,s),l.getImageData(0,0,i,s)},$P=(r,e)=>{const{data:t,width:i,height:s}=r,a=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let l=0;l<i;l++){const h=(o*i+l)*4;a[h]=Math.max(Math.min(t[h]+e,255),0),a[h+1]=Math.max(Math.min(t[h+1]+e,255),0),a[h+2]=Math.max(Math.min(t[h+2]+e,255),0),a[h+3]=t[h+3]}return new ImageData(a,i,s)},DP=(r,e,t=!1)=>{const{data:i,width:s,height:a}=r,n=new Uint8ClampedArray(i.length);for(let l=0;l<a;l++)for(let h=0;h<s;h++){const u=(l*s+h)*4;i[u+3]===0?(n[u]=255,n[u+1]=255,n[u+2]=255):(n[u]=i[u],n[u+1]=i[u+1],n[u+2]=i[u+2]);let d=i[u+3];t?d=Math.max(Math.min(Math.floor(255*e),255),0):d=Math.max(Math.min(Math.floor(d+255*e),255),0),n[u+3]=d}return new ImageData(n,s,a)},NP=(r,e,t,i)=>{const{data:s,width:a,height:n}=r,{data:o,width:l,height:h}=e;let u=t,d=i;t+h>n&&(u=n-h),i+l>a&&(d=a-l);const c=new Uint8ClampedArray(s.length);for(let p=0;p<n;p++)for(let g=0;g<a;g++){const y=(p*a+g)*4;if(g<d||g>d+l||p<=u||p>=u+h)c[y]=s[y],c[y+1]=s[y+1],c[y+2]=s[y+2],c[y+3]=s[y+3];else{const _=(p*a+g-((u+1)*a+(p-(u+1))*(a-l))+l-d-1)*4,T=[o[_],o[_+1],o[_+2],o[_+3]],m=[s[y],s[y+1],s[y+2],s[y+3]],w=Up(T,m);c[y]=w[0],c[y+1]=w[1],c[y+2]=w[2],c[y+3]=w[3]}}return new ImageData(c,a,n)},LP=(r,e,t,i,s,a=10)=>{const{data:n,width:o,height:l}=r;let h=s,u=i,d=e,c=t;h<0?h=0:h>o&&(h=o),u<0?u=0:u>l&&(u=l),d<1?d=1:d>o&&(d=o),c<1?c=1:c>l&&(c=l),h+d>o&&(d=o-h),u+c>l&&(c=l-u);const f=new Uint8ClampedArray(n.length);for(let g=0;g<l;g++)for(let y=0;y<o;y++){const _=(g*o+y)*4;if(y>=h&&y<=h+d&&g>=u&&g<=u+c){const T=Math.floor((y-h)/a),m=Math.floor((g-u)/a);let w=Math.floor(a*(T+1)-a/2+h),O=Math.floor(a*(m+1)-a/2+u);w>o-1&&(w=o-1),O>l-1&&(O=l-1);const k=(O*o+w)*4;f[_]=n[k],f[_+1]=n[k+1],f[_+2]=n[k+2],f[_+3]=n[k+3]}else f[_]=n[_],f[_+1]=n[_+1],f[_+2]=n[_+2],f[_+3]=n[_+3]}return new ImageData(f,o,l)},FP=async(r,e,t,i,s,a)=>{const n=s/100;if(["JPG","JPEG"].includes(i.toUpperCase())){const o=new Image;o.src=r;const l=document.createElement("canvas"),h=l.getContext("2d");l.width=e,l.height=t,h.drawImage(o,0,0,e,t),l.toBlob(u=>{a(u)},`image/${i.toLowerCase()}`,n)}else{const o=Math.floor(n*256),l=ye.encode([r.data.buffer],e,t,o),h=new Blob([l]);a&&a(h)}},UP=(r,e,t={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}})=>{if(e&&t){const{data:i,width:s,height:a}=r,{data:n}=e,o=new Uint8ClampedArray(i.length),{backgroundColor:l,changeIntoColor:h}=t;for(let d=0;d<a;d++)for(let c=0;c<s;c++){const f=(d*s+c)*4,p=n[f],g=n[f+1],y=n[f+2],_=n[f+3];p===l.r&&g===l.g&&y===l.b&&_===l.a&&h.a!==0?(o[f]=h.r,o[f+1]=h.g,o[f+2]=h.b,o[f+3]=h.a):(o[f]=i[f],o[f+1]=i[f+1],o[f+2]=i[f+2],o[f+3]=i[f+3])}return new ImageData(o,s,a)}return r},Fp=(r,e)=>{const{data:t,width:i,height:s}=r,a=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let l=0;l<i;l++){const h=(o*i+l)*4;for(let u=0;u<3;u++){const d=h+u;l===0||l===i-1||o===0||o===s-1?a[d]=t[d]:a[d]=e[0]*t[d-i*4-4]+e[1]*t[d-i*4]+e[2]*t[d-i*4+4]+e[3]*t[d-4]+e[4]*t[d]+e[5]*t[d+4]+e[6]*t[d+i*4-4]+e[7]*t[d+i*4]+e[8]*t[d+i*4+4]}a[h+3]=t[h+3]}return new ImageData(a,i,s)},Up=(r,e)=>{if(r&&r.length===4&&e&&e.length===4){const t=r[3],i=e[3];if(t===255||i===0)return r;if(t===0)return e;{const s=t/255,a=i/255,n=Math.max(Math.min(Math.floor(r[0]*s+e[0]*a*(1-s)),255),0),o=Math.max(Math.min(Math.floor(r[1]*s+e[1]*a*(1-s)),255),0),l=Math.max(Math.min(Math.floor(r[2]*s+e[2]*a*(1-s)),255),0),h=Math.max(Math.min(Math.floor((s+a*(1-s))*255),255),0);return[n,o,l,h]}}return[255,255,255,255]},Gp=function(r,e,t){const i=new Array(r*r),s=function(o){const l=o;let h=0,u=0;return{write(d,c){if(d>>>c)throw new Error("length over");for(;h+c>=8;)l.writeByte(255&(d<<h|u)),c-=8-h,d>>>=8-h,u=0,h=0;u=d<<h|u,h=h+c},flush(){h>0&&l.writeByte(u)}}},a=function(o){const l=1<<o,h=(1<<o)+1;let u=o+1;const d=n();for(let y=0;y<l;y++)d.add(String.fromCharCode(y));d.add(String.fromCharCode(l)),d.add(String.fromCharCode(h));const c=df(),f=s(c);f.write(l,u);let p=0,g=String.fromCharCode(i[p]);for(p+=1;p<i.length;){const y=String.fromCharCode(i[p]);p+=1,d.contains(g+y)?g=g+y:(f.write(d.indexOf(g),u),d.size()<4095&&(d.size()==1<<u&&(u+=1),d.add(g+y)),g=y)}return f.write(d.indexOf(g),u),f.write(h,u),f.flush(),c.toByteArray()},n=function(){const o={};let l=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);o[h]=l,l+=1},size(){return l},indexOf(h){return o[h]},contains(h){return typeof o[h]<"u"}}};return{setPixel(o,l,h){i[l*r+o]=h},write(o){o.writeString("GIF87a"),o.writeShort(r),o.writeShort(r),o.writeByte(128),o.writeByte(0),o.writeByte(0),o.writeByte(ea("0x"+e[1]+e[2])),o.writeByte(ea("0x"+e[3]+e[4])),o.writeByte(ea("0x"+e[5]+e[6])),o.writeByte(ea("0x"+t[1]+t[2])),o.writeByte(ea("0x"+t[3]+t[4])),o.writeByte(ea("0x"+t[5]+t[6])),o.writeString(","),o.writeShort(0),o.writeShort(0),o.writeShort(r),o.writeShort(r),o.writeByte(0);const l=2,h=a(l);o.writeByte(l);let u=0;for(;h.length-u>255;)o.writeByte(255),o.writeBytes(h,u,255),u+=255;o.writeByte(h.length-u),o.writeBytes(h,u,h.length-u),o.writeByte(0),o.writeString(";")}}},jp=function(r,e,t,i){const s=Gp(r,e,t);for(let h=0;h<r;h++)for(let u=0;u<r;u++)s.setPixel(u,h,i(u,h));const a=df();s.write(a);const n=x6(),o=a.toByteArray();for(let h=0,u=o.length;h<u;h++)n.writeByte(o[h]);n.flush();let l="";return l+="data:image/gif;base64,",l+=n,l},Rr={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},On={M:0,L:1,H:2,Q:3},hs={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},er={glog:function(r){if(r<1)throw new Error("glog("+r+")");return er.LOG_TABLE[r]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return er.EXP_TABLE[r]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let r=0;r<8;r++)er.EXP_TABLE[r]=1<<r;for(let r=8;r<256;r++)er.EXP_TABLE[r]=er.EXP_TABLE[r-4]^er.EXP_TABLE[r-5]^er.EXP_TABLE[r-6]^er.EXP_TABLE[r-8];for(let r=0;r<255;r++)er.LOG_TABLE[er.EXP_TABLE[r]]=r;const Mt={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(r){let e=r<<10;for(;Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G15)>=0;)e^=Mt.G15<<Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G15);return(r<<10|e)^Mt.G15_MASK},getBCHTypeNumber:function(r){let e=r<<12;for(;Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G18)>=0;)e^=Mt.G18<<Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G18);return r<<12|e},getBCHDigit:function(r){let e=0;for(;r!=0;)e++,r>>>=1;return e},getPatternPosition:function(r){return Mt.PATTERN_POSITION_TABLE[r-1]},getMask:function(r,e,t){switch(r){case hs.PATTERN000:return(e+t)%2==0;case hs.PATTERN001:return e%2==0;case hs.PATTERN010:return t%3==0;case hs.PATTERN011:return(e+t)%3==0;case hs.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2==0;case hs.PATTERN101:return e*t%2+e*t%3==0;case hs.PATTERN110:return(e*t%2+e*t%3)%2==0;case hs.PATTERN111:return(e*t%3+(e+t)%2)%2==0;default:throw new Error("bad maskPattern:"+r)}},getErrorCorrectPolynomial:function(r){let e=new ya([1],0);for(let t=0;t<r;t++)e=e.multiply(new ya([1,er.gexp(t)],0));return e},getLengthInBits:function(r,e){if(1<=e&&e<10)switch(r){case Rr.MODE_NUMBER:return 10;case Rr.MODE_ALPHA_NUM:return 9;case Rr.MODE_8BIT_BYTE:return 8;case Rr.MODE_KANJI:return 8;default:throw new Error("mode:"+r)}else if(e<27)switch(r){case Rr.MODE_NUMBER:return 12;case Rr.MODE_ALPHA_NUM:return 11;case Rr.MODE_8BIT_BYTE:return 16;case Rr.MODE_KANJI:return 10;default:throw new Error("mode:"+r)}else if(e<41)switch(r){case Rr.MODE_NUMBER:return 14;case Rr.MODE_ALPHA_NUM:return 13;case Rr.MODE_8BIT_BYTE:return 16;case Rr.MODE_KANJI:return 12;default:throw new Error("mode:"+r)}else throw new Error("type:"+e)},getLostPoint:function(r){const e=r.getModuleCount();let t=0;for(let a=0;a<e;a++)for(let n=0;n<e;n++){let o=0;const l=r.isDark(a,n);for(let h=-1;h<=1;h++)if(!(a+h<0||e<=a+h))for(let u=-1;u<=1;u++)n+u<0||e<=n+u||h==0&&u==0||l==r.isDark(a+h,n+u)&&o++;o>5&&(t+=3+o-5)}for(let a=0;a<e-1;a++)for(let n=0;n<e-1;n++){let o=0;r.isDark(a,n)&&o++,r.isDark(a+1,n)&&o++,r.isDark(a,n+1)&&o++,r.isDark(a+1,n+1)&&o++,(o==0||o==4)&&(t+=3)}for(let a=0;a<e;a++)for(let n=0;n<e-6;n++)r.isDark(a,n)&&!r.isDark(a,n+1)&&r.isDark(a,n+2)&&r.isDark(a,n+3)&&r.isDark(a,n+4)&&!r.isDark(a,n+5)&&r.isDark(a,n+6)&&(t+=40);for(let a=0;a<e;a++)for(let n=0;n<e-6;n++)r.isDark(n,a)&&!r.isDark(n+1,a)&&r.isDark(n+2,a)&&r.isDark(n+3,a)&&r.isDark(n+4,a)&&!r.isDark(n+5,a)&&r.isDark(n+6,a)&&(t+=40);let i=0;for(let a=0;a<e;a++)for(let n=0;n<e;n++)r.isDark(n,a)&&i++;const s=Math.abs(100*i/e/e-50)/5;return t+=s*10,t}};class ya{num;constructor(e,t){if(e.length==null)throw new Error(e.length+"/"+t);let i=0;for(;i<e.length&&e[i]==0;)i++;this.num=new Array(e.length-i+t);for(let s=0;s<e.length-i;s++)this.num[s]=e[s+i]}get(e){return this.num[e]}getLength(){return this.num.length}multiply(e){const t=new Array(this.getLength()+e.getLength()-1);for(let i=0;i<this.getLength();i++)for(let s=0;s<e.getLength();s++)t[i+s]^=er.gexp(er.glog(this.get(i))+er.glog(e.get(s)));return new ya(t,0)}mod(e){if(this.getLength()-e.getLength()<0)return this;const t=er.glog(this.get(0))-er.glog(e.get(0)),i=new Array(this.getLength());for(let s=0;s<this.getLength();s++)i[s]=this.get(s);for(let s=0;s<e.getLength();s++)i[s]^=er.gexp(er.glog(e.get(s))+t);return new ya(i,0).mod(e)}}class Di{totalCount;dataCount;constructor(e,t){this.totalCount=e,this.dataCount=t}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(e,t){const i=Di.getRsBlockTable(e,t);if(i==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);const s=i.length/3,a=[];for(let n=0;n<s;n++){const o=i[n*3+0],l=i[n*3+1],h=i[n*3+2];for(let u=0;u<o;u++)a.push(new Di(l,h))}return a}static getRsBlockTable(e,t){switch(t){case On.L:return Di.RS_BLOCK_TABLE[(e-1)*4+0];case On.M:return Di.RS_BLOCK_TABLE[(e-1)*4+1];case On.Q:return Di.RS_BLOCK_TABLE[(e-1)*4+2];case On.H:return Di.RS_BLOCK_TABLE[(e-1)*4+3];default:return}}}class Bp{buffer;length;constructor(){this.buffer=[],this.length=0}get(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1}put(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)==1)}getLengthInBits(){return this.length}putBit(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}}class GP{mode;data;constructor(e){this.mode=Rr.MODE_8BIT_BYTE,this.data=e}getLength(){return this.data.length}write(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data.charCodeAt(t),8)}}class us{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(e,t){this.typeNumber=e,this.errorCorrectLevel=On[t],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(e){const t=new GP(e);this.dataList.push(t),this.dataCache=null}isDark(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let e=1;for(e=1;e<40;e++){const t=Di.getRSBlocks(e,this.errorCorrectLevel),i=new Bp;let s=0;for(let a=0;a<t.length;a++)s+=t[a].dataCount;for(let a=0;a<this.dataList.length;a++){const n=this.dataList[a];i.put(n.mode,4),i.put(n.getLength(),Mt.getLengthInBits(n.mode,e)),n.write(i)}if(i.getLengthInBits()<=s*8)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++)this.modules[i][s]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=us.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)}setupPositionProbePattern(e,t){for(let i=-1;i<=7;i++)if(!(e+i<=-1||this.moduleCount<=e+i))for(let s=-1;s<=7;s++)t+s<=-1||this.moduleCount<=t+s||(0<=i&&i<=6&&(s==0||s==6)||0<=s&&s<=6&&(i==0||i==6)||2<=i&&i<=4&&2<=s&&s<=4?this.modules[e+i][t+s]=!0:this.modules[e+i][t+s]=!1)}getBestMaskPattern(){let e=0,t=0;for(let i=0;i<8;i++){this.makeImpl(!0,i);const s=Mt.getLostPoint(this);(i==0||e>s)&&(e=s,t=i)}return t}createMovieClip(e,t,i){const s=e.createEmptyMovieClip(t,i),a=1;this.make();for(let n=0;n<this.modules.length;n++){const o=n*a;for(let l=0;l<this.modules[n].length;l++){const h=l*a;this.modules[n][l]&&(s.beginFill(0,100),s.moveTo(h,o),s.lineTo(h+a,o),s.lineTo(h+a,o+a),s.lineTo(h,o+a),s.endFill())}}return s}setupTimingPattern(){for(let e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(let e=8;e<this.moduleCount-8;e++)this.modules[6][e]==null&&(this.modules[6][e]=e%2==0)}setupPositionAdjustPattern(){const e=Mt.getPatternPosition(this.typeNumber);for(let t=0;t<e.length;t++)for(let i=0;i<e.length;i++){const s=e[t],a=e[i];if(this.modules[s][a]==null)for(let n=-2;n<=2;n++)for(let o=-2;o<=2;o++)n==-2||n==2||o==-2||o==2||n==0&&o==0?this.modules[s+n][a+o]=!0:this.modules[s+n][a+o]=!1}}setupTypeNumber(e){const t=Mt.getBCHTypeNumber(this.typeNumber);for(let i=0;i<18;i++){const s=!e&&(t>>i&1)==1;this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=s}for(let i=0;i<18;i++){const s=!e&&(t>>i&1)==1;this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=s}}setupTypeInfo(e,t){const i=this.errorCorrectLevel<<3|t,s=Mt.getBCHTypeInfo(i);for(let a=0;a<15;a++){const n=!e&&(s>>a&1)==1;a<6?this.modules[a][8]=n:a<8?this.modules[a+1][8]=n:this.modules[this.moduleCount-15+a][8]=n}for(let a=0;a<15;a++){const n=!e&&(s>>a&1)==1;a<8?this.modules[8][this.moduleCount-a-1]=n:a<9?this.modules[8][15-a-1+1]=n:this.modules[8][15-a-1]=n}this.modules[this.moduleCount-8][8]=!e}mapData(e,t){let i=-1,s=this.moduleCount-1,a=7,n=0;for(let o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(let l=0;l<2;l++)if(this.modules[s][o-l]==null){let h=!1;n<e.length&&(h=(e[n]>>>a&1)==1),Mt.getMask(t,s,o-l)&&(h=!h),this.modules[s][o-l]=h,a--,a==-1&&(n++,a=7)}if(s+=i,s<0||this.moduleCount<=s){s-=i,i=-i;break}}}static createData(e,t,i){const s=Di.getRSBlocks(e,t),a=new Bp;for(let o=0;o<i.length;o++){const l=i[o];a.put(l.mode,4),a.put(l.getLength(),Mt.getLengthInBits(l.mode,e)),l.write(a)}let n=0;for(let o=0;o<s.length;o++)n+=s[o].dataCount;if(a.getLengthInBits()>n*8)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+n*8+")");for(a.getLengthInBits()+4<=n*8&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=n*8||(a.put(us.PAD0,8),a.getLengthInBits()>=n*8));)a.put(us.PAD1,8);return us.createBytes(a,s)}static createBytes(e,t){let i=0,s=0,a=0;const n=new Array(t.length),o=new Array(t.length);for(let d=0;d<t.length;d++){const c=t[d].dataCount,f=t[d].totalCount-c;s=Math.max(s,c),a=Math.max(a,f),n[d]=new Array(c);for(let _=0;_<n[d].length;_++)n[d][_]=255&e.buffer[_+i];i+=c;const p=Mt.getErrorCorrectPolynomial(f),y=new ya(n[d],p.getLength()-1).mod(p);o[d]=new Array(p.getLength()-1);for(let _=0;_<o[d].length;_++){const T=_+y.getLength()-o[d].length;o[d][_]=T>=0?y.get(T):0}}let l=0;for(let d=0;d<t.length;d++)l+=t[d].totalCount;const h=new Array(l);let u=0;for(let d=0;d<s;d++)for(let c=0;c<t.length;c++)d<n[c].length&&(h[u++]=n[c][d]);for(let d=0;d<a;d++)for(let c=0;c<t.length;c++)d<o[c].length&&(h[u++]=o[c][d]);return h}}const Vp=Math.ceil,In=Math.floor,Hp=Math.round;function jP(r,e){const t=uf(r),i=e?.ecc||"H",s=e?.size||256,a=-1,n=e?.padding||0,o=e?.color||"#000000",l=e?.background||"#ffffff",h=new us(a,i);h.addData(t),h.make();const u=h.getModuleCount(),d=(s-n*2)/u,c=n,f=s-n;return jp(s,o,l,function(p,g){if(c<=p&&p<f&&c<=g&&g<f){const y=In((p-c)/d),_=In((g-c)/d);return h.isDark(_,y)?0:1}else return 1})}function BP(r,e){const t=e.x||0,i=e.y||0,s=uf(r),a=e.ctx,n=e.ecc||"H",o=typeof e.size=="number"?In(e.size):256,l=e.padding||0,h=-1,u=e.color||"#000000",d=e.background||"#ffffff",c=new us(h,n);c.addData(s),c.make();const f=c.getModuleCount(),p=(o-l*2)/f;a.fillStyle=d,a.fillRect(t,i,o,o);for(let g=0;g<f;g++)for(let y=0;y<f;y++){const _=Vp((y+1)*p)-In(y*p),T=Vp((g+1)*p)-In(g*p);a.fillStyle=c.isDark(g,y)?u:d,a.fillRect(t+Hp(y*p)+l,i+Hp(g*p)+l,_,T)}}function uu(){let r=null;if(window.ActiveXObject){const e=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let t=0;t<e.length;t++)try{r=new window.ActiveXObject(e[t]);break}catch{continue}}else r=new XMLHttpRequest;return r}function VP(r){if(!r.action)return{url:"",data:"",boundary:""};const e=r.method.toLowerCase()==="get",t=r.method.toLowerCase()==="post";let i=r.action,s="";const a="---------------------------"+Date.now().toString(16);if(window.FormData)s=new FormData(r),e&&(i=El(i,Mh(s)));else if(e){let n="";for(let o=0;o<r.elements.length;o++){const l=r.elements[o];if(!l.hasAttribute("name"))continue;const h=l.nodeName.toUpperCase()==="INPUT"?l.getAttribute("type")?.toUpperCase():"TEXT";if(h==="FILE")for(let u=0,d=l.files?.length??0;u<d;n+="&"+encodeURIComponent(l.name)+"="+encodeURIComponent(l.files?.[u++].name??""));else(h!=="RADIO"&&h!=="CHECKBOX"||l.checked)&&(n+="&"+encodeURIComponent(l.name)+"="+encodeURIComponent(l.value))}i=El(i,n)}else if(t){const n=[];if(r.enctype==="application/x-www-form-urlencoded"){for(let o=0;o<r.elements.length;o++){const l=r.elements[o];l.hasAttribute("name")&&n.push(encodeURIComponent(l.name)+"="+encodeURIComponent(l.value))}s=n.join("&")}else if(r.enctype==="text/plain"){for(let o=0;o<r.elements.length;o++){const l=r.elements[o];l.hasAttribute("name")&&n.push(l.name+"="+l.value)}s=n.join(`\r
42
+ You are running Raphaël `+this.version};var ee,oe=function(E,z,P){for(var D=h(z).toLowerCase().split("-"),j=P?"end":"start",N=D.length,H="classic",q="medium",x="medium";N--;)switch(D[N]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":H=D[N];break;case"wide":case"narrow":x=D[N];break;case"long":case"short":q=D[N]}var ie=E.node.getElementsByTagName("stroke")[0];ie[j+"arrow"]=H,ie[j+"arrowlength"]=q,ie[j+"arrowwidth"]=x},Ce=function(E,z){E.attrs=E.attrs||{};var P=E.node,D=E.attrs,j=P.style,N=U[E.type]&&(z.x!=D.x||z.y!=D.y||z.width!=D.width||z.height!=D.height||z.cx!=D.cx||z.cy!=D.cy||z.rx!=D.rx||z.ry!=D.ry||z.r!=D.r),H=V[E.type]&&(D.cx!=z.cx||D.cy!=z.cy||D.r!=z.r||D.rx!=z.rx||D.ry!=z.ry),q=E;for(var x in z)z[l](x)&&(D[x]=z[x]);if(N&&(D.path=o._getPath[E.type](E),E._.dirty=1),z.href&&(P.href=z.href),z.title&&(P.title=z.title),z.target&&(P.target=z.target),z.cursor&&(j.cursor=z.cursor),"blur"in z&&E.blur(z.blur),(z.path&&E.type=="path"||N)&&(P.path=function(Vt){var qr=/[ahqstv]/gi,si=o._pathToAbsolute;if(h(Vt).match(qr)&&(si=o._path2curve),qr=/[clmz]/g,si==o._pathToAbsolute&&!h(Vt).match(qr)){var kt=h(Vt).replace(O,function(Oa,ni,oi){var Sr=[],qi=ni.toLowerCase()=="m",li=w[ni];return oi.replace(I,function(Yr){qi&&Sr.length==2&&(li+=Sr+w[ni=="m"?"l":"L"],Sr=[]),Sr.push(c(Yr*G))}),li+Sr});return kt}var Nr,mr,Wi=si(Vt);kt=[];for(var ai=0,Ti=Wi.length;ai<Ti;ai++){Nr=Wi[ai],(mr=Wi[ai][0].toLowerCase())=="z"&&(mr="x");for(var wr=1,Ot=Nr.length;wr<Ot;wr++)mr+=c(Nr[wr]*G)+(wr!=Ot-1?",":m);kt.push(mr)}return kt.join(T)}(~h(D.path).toLowerCase().indexOf("r")?o._pathToAbsolute(D.path):D.path),E._.dirty=1,E.type=="image"&&(E._.fillpos=[D.x,D.y],E._.fillsize=[D.width,D.height],te(E,1,1,0,0,0))),"transform"in z&&E.transform(z.transform),H){var ie=+D.cx,ge=+D.cy,Pe=+D.rx||+D.r||0,$e=+D.ry||+D.r||0;P.path=o.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",c((ie-Pe)*G),c((ge-$e)*G),c((ie+Pe)*G),c((ge+$e)*G),c(ie*G)),E._.dirty=1}if("clip-rect"in z){var Se=h(z["clip-rect"]).split(y);if(Se.length==4){Se[2]=+Se[2]+ +Se[0],Se[3]=+Se[3]+ +Se[1];var Ae=P.clipRect||o._g.doc.createElement("div"),Ue=Ae.style;Ue.clip=o.format("rect({1}px {2}px {3}px {0}px)",Se),P.clipRect||(Ue.position="absolute",Ue.top=0,Ue.left=0,Ue.width=E.paper.width+"px",Ue.height=E.paper.height+"px",P.parentNode.insertBefore(Ae,P),Ae.appendChild(P),P.clipRect=Ae)}z["clip-rect"]||P.clipRect&&(P.clipRect.style.clip="auto")}if(E.textpath){var Ve=E.textpath.style;z.font&&(Ve.font=z.font),z["font-family"]&&(Ve.fontFamily='"'+z["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,m)+'"'),z["font-size"]&&(Ve.fontSize=z["font-size"]),z["font-weight"]&&(Ve.fontWeight=z["font-weight"]),z["font-style"]&&(Ve.fontStyle=z["font-style"])}if("arrow-start"in z&&oe(q,z["arrow-start"]),"arrow-end"in z&&oe(q,z["arrow-end"],1),z.opacity!=null||z.fill!=null||z.src!=null||z.stroke!=null||z["stroke-width"]!=null||z["stroke-opacity"]!=null||z["fill-opacity"]!=null||z["stroke-dasharray"]!=null||z["stroke-miterlimit"]!=null||z["stroke-linejoin"]!=null||z["stroke-linecap"]!=null){var Oe=P.getElementsByTagName("fill");if(!(Oe=Oe&&Oe[0])&&(Oe=ee("fill")),E.type=="image"&&z.src&&(Oe.src=z.src),z.fill&&(Oe.on=!0),Oe.on!=null&&z.fill!="none"&&z.fill!==null||(Oe.on=!1),Oe.on&&z.fill){var ut=h(z.fill).match(o._ISURL);if(ut){Oe.parentNode==P&&P.removeChild(Oe),Oe.rotate=!0,Oe.src=ut[1],Oe.type="tile";var Je=E.getBBox(1);Oe.position=Je.x+T+Je.y,E._.fillpos=[Je.x,Je.y],o._preload(ut[1],function(){E._.fillsize=[this.offsetWidth,this.offsetHeight]})}else Oe.color=o.getRGB(z.fill).hex,Oe.src=m,Oe.type="solid",o.getRGB(z.fill).error&&(q.type in{circle:1,ellipse:1}||h(z.fill).charAt()!="r")&&we(q,z.fill,Oe)&&(D.fill="none",D.gradient=z.fill,Oe.rotate=!1)}if("fill-opacity"in z||"opacity"in z){var ct=((+D["fill-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+o.getRGB(z.fill).o+1||2)-1);ct=p(f(ct,0),1),Oe.opacity=ct,Oe.src&&(Oe.color="none")}P.appendChild(Oe);var We=P.getElementsByTagName("stroke")&&P.getElementsByTagName("stroke")[0],Nt=!1;!We&&(Nt=We=ee("stroke")),(z.stroke&&z.stroke!="none"||z["stroke-width"]||z["stroke-opacity"]!=null||z["stroke-dasharray"]||z["stroke-miterlimit"]||z["stroke-linejoin"]||z["stroke-linecap"])&&(We.on=!0),(z.stroke=="none"||z.stroke===null||We.on==null||z.stroke==0||z["stroke-width"]==0)&&(We.on=!1);var Rt=o.getRGB(z.stroke);We.on&&z.stroke&&(We.color=Rt.hex),ct=((+D["stroke-opacity"]+1||2)-1)*((+D.opacity+1||2)-1)*((+Rt.o+1||2)-1);var rr=.75*(u(z["stroke-width"])||1);if(ct=p(f(ct,0),1),z["stroke-width"]==null&&(rr=D["stroke-width"]),z["stroke-width"]&&(We.weight=rr),rr&&rr<1&&(ct*=rr)&&(We.weight=1),We.opacity=ct,z["stroke-linejoin"]&&(We.joinstyle=z["stroke-linejoin"]||"miter"),We.miterlimit=z["stroke-miterlimit"]||8,z["stroke-linecap"]&&(We.endcap=z["stroke-linecap"]=="butt"?"flat":z["stroke-linecap"]=="square"?"square":"round"),"stroke-dasharray"in z){var Cr={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};We.dashstyle=Cr[l](z["stroke-dasharray"])?Cr[z["stroke-dasharray"]]:m}Nt&&P.appendChild(We)}if(q.type=="text"){q.paper.canvas.style.display=m;var fr=q.paper.span,Lt=D.font&&D.font.match(/\d+(?:\.\d*)?(?=px)/);j=fr.style,D.font&&(j.font=D.font),D["font-family"]&&(j.fontFamily=D["font-family"]),D["font-weight"]&&(j.fontWeight=D["font-weight"]),D["font-style"]&&(j.fontStyle=D["font-style"]),Lt=u(D["font-size"]||Lt&&Lt[0])||10,j.fontSize=100*Lt+"px",q.textpath.string&&(fr.innerHTML=h(q.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var nr=fr.getBoundingClientRect();q.W=D.w=(nr.right-nr.left)/100,q.H=D.h=(nr.bottom-nr.top)/100,q.X=D.x,q.Y=D.y+q.H/2,("x"in z||"y"in z)&&(q.path.v=o.format("m{0},{1}l{2},{1}",c(D.x*G),c(D.y*G),c(D.x*G)+1));for(var $r=["x","y","text","font","font-family","font-weight","font-style","font-size"],Dr=0,Wr=$r.length;Dr<Wr;Dr++)if($r[Dr]in z){q._.dirty=1;break}switch(D["text-anchor"]){case"start":q.textpath.style["v-text-align"]="left",q.bbx=q.W/2;break;case"end":q.textpath.style["v-text-align"]="right",q.bbx=-q.W/2;break;default:q.textpath.style["v-text-align"]="center",q.bbx=0}q.textpath.style["v-text-kern"]=!0}},we=function(E,z,P){E.attrs=E.attrs||{},E.attrs;var D=Math.pow,j="linear",N=".5 .5";if(E.attrs.gradient=z,z=(z=h(z).replace(o._radial_gradient,function(Pe,$e,Se){return j="radial",$e&&Se&&($e=u($e),Se=u(Se),D($e-.5,2)+D(Se-.5,2)>.25&&(Se=d.sqrt(.25-D($e-.5,2))*(2*(Se>.5)-1)+.5),N=$e+T+Se),m})).split(/\s*\-\s*/),j=="linear"){var H=z.shift();if(H=-u(H),isNaN(H))return null}var q=o._parseDots(z);if(!q)return null;if(E=E.shape||E.node,q.length){E.removeChild(P),P.on=!0,P.method="none",P.color=q[0].color,P.color2=q[q.length-1].color;for(var x=[],ie=0,ge=q.length;ie<ge;ie++)q[ie].offset&&x.push(q[ie].offset+T+q[ie].color);P.colors=x.length?x.join():"0% "+P.color,j=="radial"?(P.type="gradientTitle",P.focus="100%",P.focussize="0 0",P.focusposition=N,P.angle=0):(P.type="gradient",P.angle=(270-H)%360),E.appendChild(P)}return 1},_e=function(E,z){this[0]=this.node=E,E.raphael=!0,this.id=o._oid++,E.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=z,this.matrix=o.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!z.bottom&&(z.bottom=this),this.prev=z.top,z.top&&(z.top.next=this),z.top=this,this.next=null},ae=o.el;_e.prototype=ae,ae.constructor=_e,ae.transform=function(E){if(E==null)return this._.transform;var z,P=this.paper._viewBoxShift,D=P?"s"+[P.scale,P.scale]+"-1-1t"+[P.dx,P.dy]:m;P&&(z=E=h(E).replace(/\.{3}|\u2026/g,this._.transform||m)),o._extractTransform(this,D+E);var j,N=this.matrix.clone(),H=this.skew,q=this.node,x=~h(this.attrs.fill).indexOf("-"),ie=!h(this.attrs.fill).indexOf("url(");if(N.translate(1,1),ie||x||this.type=="image")if(H.matrix="1 0 0 1",H.offset="0 0",j=N.split(),x&&j.noRotation||!j.isSimple){q.style.filter=N.toFilter();var ge=this.getBBox(),Pe=this.getBBox(1),$e=ge.x-Pe.x,Se=ge.y-Pe.y;q.coordorigin=$e*-G+T+Se*-G,te(this,1,1,$e,Se,0)}else q.style.filter=m,te(this,j.scalex,j.scaley,j.dx,j.dy,j.rotate);else q.style.filter=m,H.matrix=h(N),H.offset=N.offset();return z!==null&&(this._.transform=z,o._extractTransform(this,z)),this},ae.rotate=function(E,z,P){if(this.removed)return this;if(E!=null){if((E=h(E).split(y)).length-1&&(z=u(E[1]),P=u(E[2])),E=u(E[0]),P==null&&(z=P),z==null||P==null){var D=this.getBBox(1);z=D.x+D.width/2,P=D.y+D.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",E,z,P]])),this}},ae.translate=function(E,z){return this.removed?this:((E=h(E).split(y)).length-1&&(z=u(E[1])),E=u(E[0])||0,z=+z||0,this._.bbox&&(this._.bbox.x+=E,this._.bbox.y+=z),this.transform(this._.transform.concat([["t",E,z]])),this)},ae.scale=function(E,z,P,D){if(this.removed)return this;if((E=h(E).split(y)).length-1&&(z=u(E[1]),P=u(E[2]),D=u(E[3]),isNaN(P)&&(P=null),isNaN(D)&&(D=null)),E=u(E[0]),z==null&&(z=E),D==null&&(P=D),P==null||D==null)var j=this.getBBox(1);return P=P??j.x+j.width/2,D=D??j.y+j.height/2,this.transform(this._.transform.concat([["s",E,z,P,D]])),this._.dirtyT=1,this},ae.hide=function(){return!this.removed&&(this.node.style.display="none"),this},ae.show=function(){return!this.removed&&(this.node.style.display=m),this},ae.auxGetBBox=o.el.getBBox,ae.getBBox=function(){var E=this.auxGetBBox();if(this.paper&&this.paper._viewBoxShift){var z={},P=1/this.paper._viewBoxShift.scale;return z.x=E.x-this.paper._viewBoxShift.dx,z.x*=P,z.y=E.y-this.paper._viewBoxShift.dy,z.y*=P,z.width=E.width*P,z.height=E.height*P,z.x2=z.x+z.width,z.y2=z.y+z.height,z}return E},ae._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},ae.remove=function(){if(!this.removed&&this.node.parentNode){for(var E in this.paper.__set__&&this.paper.__set__.exclude(this),o.eve.unbind("raphael.*.*."+this.id),o._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;this.removed=!0}},ae.attr=function(E,z){if(this.removed)return this;if(E==null){var P={};for(var D in this.attrs)this.attrs[l](D)&&(P[D]=this.attrs[D]);return P.gradient&&P.fill=="none"&&(P.fill=P.gradient)&&delete P.gradient,P.transform=this._.transform,P}if(z==null&&o.is(E,"string")){if(E=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;for(var j=E.split(y),N={},H=0,q=j.length;H<q;H++)(E=j[H])in this.attrs?N[E]=this.attrs[E]:o.is(this.paper.customAttributes[E],"function")?N[E]=this.paper.customAttributes[E].def:N[E]=o._availableAttrs[E];return q-1?N:N[j[0]]}if(this.attrs&&z==null&&o.is(E,"array")){for(N={},H=0,q=E.length;H<q;H++)N[E[H]]=this.attr(E[H]);return N}var x;for(var ie in z!=null&&((x={})[E]=z),z==null&&o.is(E,"object")&&(x=E),x)_("raphael.attr."+ie+"."+this.id,this,x[ie]);if(x){for(ie in this.paper.customAttributes)if(this.paper.customAttributes[l](ie)&&x[l](ie)&&o.is(this.paper.customAttributes[ie],"function")){var ge=this.paper.customAttributes[ie].apply(this,[].concat(x[ie]));for(var Pe in this.attrs[ie]=x[ie],ge)ge[l](Pe)&&(x[Pe]=ge[Pe])}x.text&&this.type=="text"&&(this.textpath.string=x.text),Ce(this,x)}return this},ae.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&o._tofront(this,this.paper),this},ae.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),o._toback(this,this.paper)),this)},ae.insertAfter=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[E.length-1]),E.node.nextSibling?E.node.parentNode.insertBefore(this.node,E.node.nextSibling):E.node.parentNode.appendChild(this.node),o._insertafter(this,E,this.paper),this)},ae.insertBefore=function(E){return this.removed?this:(E.constructor==o.st.constructor&&(E=E[0]),E.node.parentNode.insertBefore(this.node,E.node),o._insertbefore(this,E,this.paper),this)},ae.blur=function(E){var z=this.node.runtimeStyle,P=z.filter;return P=P.replace(k,m),+E!=0?(this.attrs.blur=E,z.filter=P+T+" progid:DXImageTransform.Microsoft.Blur(pixelradius="+(+E||1.5)+")",z.margin=o.format("-{0}px 0 0 -{0}px",c(+E||1.5))):(z.filter=P,z.margin=0,delete this.attrs.blur),this},o._engine.path=function(E,z){var P=ee("shape");P.style.cssText=$,P.coordsize=G+T+G,P.coordorigin=z.coordorigin;var D=new _e(P,z),j={fill:"none",stroke:"#000"};E&&(j.path=E),D.type="path",D.path=[],D.Path=m,Ce(D,j),z.canvas&&z.canvas.appendChild(P);var N=ee("skew");return N.on=!0,P.appendChild(N),D.skew=N,D.transform(m),D},o._engine.rect=function(E,z,P,D,j,N){var H=o._rectPath(z,P,D,j,N),q=E.path(H),x=q.attrs;return q.X=x.x=z,q.Y=x.y=P,q.W=x.width=D,q.H=x.height=j,x.r=N,x.path=H,q.type="rect",q},o._engine.ellipse=function(E,z,P,D,j){var N=E.path();return N.attrs,N.X=z-D,N.Y=P-j,N.W=2*D,N.H=2*j,N.type="ellipse",Ce(N,{cx:z,cy:P,rx:D,ry:j}),N},o._engine.circle=function(E,z,P,D){var j=E.path();return j.attrs,j.X=z-D,j.Y=P-D,j.W=j.H=2*D,j.type="circle",Ce(j,{cx:z,cy:P,r:D}),j},o._engine.image=function(E,z,P,D,j,N){var H=o._rectPath(P,D,j,N),q=E.path(H).attr({stroke:"none"}),x=q.attrs,ie=q.node,ge=ie.getElementsByTagName("fill")[0];return x.src=z,q.X=x.x=P,q.Y=x.y=D,q.W=x.width=j,q.H=x.height=N,x.path=H,q.type="image",ge.parentNode==ie&&ie.removeChild(ge),ge.rotate=!0,ge.src=z,ge.type="tile",q._.fillpos=[P,D],q._.fillsize=[j,N],ie.appendChild(ge),te(q,1,1,0,0,0),q},o._engine.text=function(E,z,P,D){var j=ee("shape"),N=ee("path"),H=ee("textpath");z=z||0,P=P||0,D=D||"",N.v=o.format("m{0},{1}l{2},{1}",c(z*G),c(P*G),c(z*G)+1),N.textpathok=!0,H.string=h(D),H.on=!0,j.style.cssText=$,j.coordsize=G+T+G,j.coordorigin="0 0";var q=new _e(j,E),x={fill:"#000",stroke:"none",font:o._availableAttrs.font,text:D};q.shape=j,q.path=N,q.textpath=H,q.type="text",q.attrs.text=h(D),q.attrs.x=z,q.attrs.y=P,q.attrs.w=1,q.attrs.h=1,Ce(q,x),j.appendChild(H),j.appendChild(N),E.canvas.appendChild(j);var ie=ee("skew");return ie.on=!0,j.appendChild(ie),q.skew=ie,q.transform(m),q},o._engine.setSize=function(E,z){var P=this.canvas.style;return this.width=E,this.height=z,E==+E&&(E+="px"),z==+z&&(z+="px"),P.width=E,P.height=z,P.clip="rect(0 "+E+" "+z+" 0)",this._viewBox&&o._engine.setViewBox.apply(this,this._viewBox),this},o._engine.setViewBox=function(E,z,P,D,j){o.eve("raphael.setViewBox",this,this._viewBox,[E,z,P,D,j]);var N,H,q=this.getSize(),x=q.width,ie=q.height;return j&&(P*(N=ie/D)<x&&(E-=(x-P*N)/2/N),D*(H=x/P)<ie&&(z-=(ie-D*H)/2/H)),this._viewBox=[E,z,P,D,!!j],this._viewBoxShift={dx:-E,dy:-z,scale:q},this.forEach(function(ge){ge.transform("...")}),this},o._engine.initWin=function(E){var z=E.document;z.styleSheets.length<31?z.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)"):z.styleSheets[0].addRule(".rvml","behavior:url(#default#VML)");try{!z.namespaces.rvml&&z.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),ee=function(P){return z.createElement("<rvml:"+P+' class="rvml">')}}catch{ee=function(D){return z.createElement("<"+D+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},o._engine.initWin(o._g.win),o._engine.create=function(){var E=o._getContainer.apply(0,arguments),z=E.container,P=E.height,D=E.width,j=E.x,N=E.y;if(!z)throw new Error("VML container not found.");var H=new o._Paper,q=H.canvas=o._g.doc.createElement("div"),x=q.style;return j=j||0,N=N||0,D=D||512,P=P||342,H.width=D,H.height=P,D==+D&&(D+="px"),P==+P&&(P+="px"),H.coordsize=216e5+T+216e5,H.coordorigin="0 0",H.span=o._g.doc.createElement("span"),H.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",q.appendChild(H.span),x.cssText=o.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",D,P),z==1?(o._g.doc.body.appendChild(q),x.left=j+"px",x.top=N+"px",x.position="absolute"):z.firstChild?z.insertBefore(q,z.firstChild):z.appendChild(q),H.renderfix=function(){},H},o.prototype.clear=function(){o.eve("raphael.clear",this),this.canvas.innerHTML=m,this.span=o._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},o.prototype.remove=function(){for(var E in o.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas),this)this[E]=typeof this[E]=="function"?o._removedFactory(E):null;return!0};var Z=o.st;for(var M in ae)ae[l](M)&&!Z[l](M)&&(Z[M]=function(E){return function(){var z=arguments;return this.forEach(function(P){P[E].apply(P,z)})}}(M))}}.apply(i,a))===void 0||(t.exports=n)}])})})(o4);var BT=o4.exports;const hr=_r(BT);class cn{points;constructor(e=[]){this.points=e}toSVGPathData(){const e=[];for(let t=0,i=this.length;t<i;t++)e.push([t===0?"M":"L",this.points[t].x,this.points[t].y]);return e}toSVGPathD(){let e="";for(let t=0,i=this.length;t<i;t++)e+=(t===0?"M":"L")+this.points[t].x+","+this.points[t].y;return e}get length(){return this.points.length}addPoint(e){this.points.push(e)}getPoint(e){return this.points[e]}isContainPoint(e){const t=e.x,i=e.y,s=this.length;let a=!1;const n=2e-10;for(let o=0,l=s-1;o<s;l=o,o++){const h=this.points[o].x,u=this.points[o].y,d=this.points[l].x,c=this.points[l].y;if(h===t&&u===i||d===t&&c===i||i===u&&i===c)return!0;if(i>=u&&i<c||i<u&&i>=c){const f=(d-h)/(c-u),p=h+f*(i-u);if(p===t||Math.abs(p-t)<n)return!0;p>t&&(a=!a)}}return a}[Symbol.iterator](){let e=0;return{next:()=>({value:e>=this.length-1?this.points[++e]:void 0,done:e>=this.length})}}static generateInMultiplePoint(e,t,i,s,a=1){const n=new cn;for(let o=0;o<=a*i;o+=1){const l=Math.floor(o/a)/i*2*Math.PI,h=e+Math.cos(l)*s,u=t+Math.sin(l)*s;n.addPoint(new Ct({x:h,y:u}))}return n}}hr.easing_formulas.swing=function(r){return r+Math.sin(r*Math.PI*2)/2},hr.easing_formulas.may_cause_seizures=function(r){return r+.2*Math.random()-.1};function VT(r,e,t){let i;return r&&typeof r=="object"&&r.canvas?i=r:r&&(typeof r=="string"||r instanceof HTMLElement)?i=hr(r,e,t):i=hr(0,0,e,t),i}hr.fn.importSVG=function(r,e){const t=HT.fromRawSVG(r);return t.toRaphael(this,(i,s)=>{t.save(),e&&e(i),s(),t.restore()}),this},hr.fn.NPolygonPath=function(r,e,t,i,s=2){return{shape:this.path(cn.generateInMultiplePoint(r,e,t,i,s).toSVGPathD()),afterPath:cn.generateInMultiplePoint(r,e,t*s,i,1).toSVGPathD()}},hr.fn.zoom=function(r=1){return this.setViewBox(0,0,this.width/r,this.height/r),this},hr.fn.brickwall=function(r,e,t,i,s){for(var a=i/s,n=t/3,o={fill:"firebrick",stroke:"#CCC"},l=0;l<s;l+=1){var h=this.rect(0,0,n,a).attr(o),u=this.rect(0,0,2*n,a).attr(o);l%2?(h.transform("T"+r+","+(e+l*a)),u.transform("T"+(r+n)+","+(e+l*a))):(u.transform("T"+r+","+(e+l*a)),h.transform("T"+(r+2*n)+","+(e+l*a)))}},hr.fn.rosetta=function(r,e,t,i,s){const a=Ms.generateRosetta(r,e,t,i,s);return a.center,this.path(a.toSVGPathD())},hr.fn.moon=function(r){r=r||{},r.r=typeof r.r=="number"?r.r:100,r.phase=typeof r.phase=="number"?r.phase:.25,r.x=typeof r.x=="number"?r.x:0,r.y=typeof r.y=="number"?r.y:0,this.circle(r.r+r.x,r.r+r.y,r.r).attr({"stroke-width":0,fill:"#999"});function e(i){i=typeof i=="number"?i:.25,i=Math.max(0,Math.min(1,i)),i=(i-.5)*2;let s="M"+r.r+",0";s+="a"+r.r+","+r.r+" 0 0,0 0,"+r.r*2;let a=i>0?0:1;return i=Math.abs(i),i=i||1e-4,r.inner_r=r.r/Math.pow(i,.5),s+="M"+r.r+","+r.r*2,s+="a"+r.inner_r+","+r.inner_r+" 0 0,"+a+" 0,"+r.r*-2,s}var t=this.path(e(r.phase)).attr({"stroke-width":0,stroke:"#999",fill:"#FF9"}).transform("T"+r.x+","+r.y);return{setPhase:function(i){t.attr("path",e(i))}}},hr.fn.star=function(r,e,t){let i="M"+r+","+(e-t);for(var s=0;s<6;s+=1){const a=270+s*144,n=r+t*Math.cos(a*Math.PI/180),o=e+t*Math.sin(a*Math.PI/180);i+="L"+n+","+o}return this.path(i).attr("stroke-width",0).attr("fill","red")},hr.fn.heart=function(r=150,e=300){let t="M"+r+","+e;return t+="l120,-175a50,50 0 0,0 -120,-75a50,50 0 0,0 -120,75l120,175",this.path(t).attr("stroke","red").attr("fill","pink")},hr.el.redder=function(){const r=hr.getRGB(this.attr("fill"));r.r+=51,this.attr("fill","rgb("+r.r+","+r.g+","+r.b+")")},hr.installCustomAttributes=function(r){r.customAttributes.redness=function(e){const t=255*(1-e/100);return{fill:"rgb(255,"+t+", "+t+")"}},r.customAttributes.progress=function(e){const t=this.data("progresspath"),i=this.attr(),s={x:0,y:0},a=this.data("progresstrail");if(!t)return{transform:"t0,0"};Object.prototype.hasOwnProperty.call(i,"width")&&(s.x=-this.attr("width")/2,s.y=-this.attr("height")/2);const n=t.getTotalLength(),o=t.getPointAtLength(e*n);return a&&a.attr("path",t.getSubpath(0,e*n)),{transform:"t"+(o.x+s.x)+","+(o.y+s.y)+"r"+o.alpha}}};const Ph=hr;class is{pgs=[];history=[];save(){this.history.push(cf(this.pgs))}restore(){const e=this.history.pop();e&&(this.pgs=e)}get size(){let e=0,t=0;return this.pgs.forEach(i=>{const s=i.pg;if(s){const[a,n,o,l]=s.bounds,[h,u]=s.size;e=Math.max(e,a,a+h,o),t=Math.max(t,n,n+u,l)}}),[Math.ceil(e),Math.ceil(t)]}static fromRawSVG(e){return is.fromRawSVGUseRappar(e)}static fromRawSVGUseRappar(e){const t=new is,i=i4(e);for(let s=0,a=i.length;s<a;s++){const n=i[s];if(n.type=="viewbox"&&n.width&&n.height)continue;const o={attrs:{}};for(const l in n)l==="type"||l==="path"||l==="transform"||(o.attrs[l]=n[l]);switch(n.type){case"path":o.d=n.path,o.pg=Ms.fromSVGPathD(n.path,n.transform);break}t.pgs.push(o)}return t}toRaphael(e,t){let i;e instanceof HTMLElement?i=Ph(HTMLElement):typeof e=="string"?i=Ph(document.getElementById(e)):i=e;const[s,a]=this.size;i.setSize(s,a);const n=(o=!1)=>{for(let l=0,h=this.pgs.length;l<h;l++){const u=this.pgs[l];if(u.pg&&(u.raphaelPath?u.raphaelPath.attr("path",u.pg.toSVGPathD()):u.raphaelPath=i.path(u.pg.toSVGPathD()),u.raphaelPath.attr(u.attrs)),o&&t){const d=c=>{const{x:f,y:p}=Ur(i.canvas,c),g=this.pgs.find(y=>y.raphaelPath?.isPointInside(f,p));g&&t?.(g,n)};u.raphaelPath?.unclick(d),u.raphaelPath?.click(d)}}};return n(!0),i}toCanvasOperation(e,t){let i;typeof e=="string"?i=document.getElementById(e):i=e;const[s,a]=this.size;i.width=s,i.height=a;const n=new zh(i),o=()=>{n.clearRect(0,0,s,a);for(let h=0,u=this.pgs.length;h<u;h++){const d=this.pgs[h];d.pg&&(n.save(),this.toCanvasAttrs(n,d.attrs),d.pg.toCanvas(n),d.attrs.stroke!=="none"&&n.stroke(),d.attrs.fill!=="none"&&n.fill(),n.restore())}};o();const l=h=>{const{x:u,y:d}=Ur(n.canvas,h),c=this.pgs.find(f=>f.pg?.isPointInPath(u,d));c&&t?.(c,o)};return i.removeEventListener("click",l),i.addEventListener("click",l),n}toCanvasAttrs(e,t){for(const i in t){const s=t[i];switch(i){case"fill":e.fillStyle=String(s);break;case"stroke":e.strokeStyle=String(s);break;case"stroke-width":e.lineWidth=Number(s);break;case"stroke-linecap":e.lineCap=s;break;case"stroke-linejoin":e.lineJoin=s;break}}}static toDownloadSVGElement(e,t="shape"){ah(bc(e),`${t}.svg`)}toDownloadSVGElement(e,t="shape"){return is.toDownloadSVGElement(e,t),this}static toDownloadSVGString(e,t="shape"){ah(sh(e),`${t}.svg`)}toDownloadSVGString(e,t="shape"){return is.toDownloadSVGString(e,t),this}static getSVGDOM(e){if(e instanceof HTMLObjectElement||e instanceof HTMLIFrameElement)return e.contentDocument;if(e instanceof HTMLEmbedElement)return e.getSVGDocument()}}const HT=is;class zh{canvas;context;customContext;constructor(e){this.canvas=e,this.context=e.getContext("2d",{willReadFrequently:!0}),this.customContext=new fn({canvas:this.canvas,width:this.canvas.width,height:this.canvas.height})}set lineWidth(e){this.context.lineWidth=e,this.customContext.lineWidth=e}get lineWidth(){return this.context.lineWidth}set lineCap(e){this.context.lineCap=e,this.customContext.lineCap=e}get lineCap(){return this.context.lineCap}set lineJoin(e){this.context.lineJoin=e,this.customContext.lineCap=e}get lineJoin(){return this.context.lineJoin}set lineDashOffset(e){this.context.lineDashOffset=e,this.customContext.lineDashOffset=e}get lineDashOffset(){return this.context.lineDashOffset}set miterLimit(e){this.context.miterLimit=e,this.customContext.miterLimit=e}get miterLimit(){return this.context.miterLimit}set globalAlpha(e){this.context.globalAlpha=e,this.customContext.globalAlpha=e}get globalAlpha(){return this.context.globalAlpha}set fillStyle(e){typeof e=="string"||e instanceof CanvasGradient||e instanceof CanvasPattern?(this.context.fillStyle=e,this.customContext.fillStyle=e):(this.context.fillStyle=e.gradient,this.customContext.fillStyle=e.gradientCustom)}get fillStyle(){return this.context.fillStyle}set strokeStyle(e){typeof e=="string"||e instanceof CanvasGradient||e instanceof CanvasPattern?(this.context.strokeStyle=e,this.customContext.strokeStyle=e):(this.context.strokeStyle=e.gradient,this.customContext.strokeStyle=e.gradientCustom)}get strokeStyle(){return this.context.strokeStyle}set font(e){this.context.font=e,this.customContext.font=e}get font(){return this.context.font}fill(){return this.context.fill(),this.customContext.fill(),this}fillRect(e,t,i,s){return this.context.fillRect(e,t,i,s),this.customContext.fillRect(e,t,i,s),this}fillText(e,t,i,s){return this.context.fillText(e,t,i,s),this.customContext.fillText(e,t,i),this}setLineDash(e){return this.context.setLineDash(e),this.customContext.setLineDash(e),this}stroke(){return this.context.stroke(),this.customContext.stroke(),this}strokeText(e,t,i,s){return this.context.strokeText(e,t,i,s),this.customContext.strokeText(e,t,i),this}strokeRect(e,t,i,s){return this.context.strokeRect(e,t,i,s),this.customContext.strokeRect(e,t,i,s),this}clearRect(e=0,t=0,i=this.canvas.width,s=this.canvas.height){return this.context.clearRect(e,t,i,s),this.customContext.clearRect(e,t,i,s),this}save(){return this.context.save(),this.customContext.save(),this}restore(){return this.context.restore(),this.customContext.restore(),this}beginPath(){return this.context.beginPath(),this.customContext.beginPath(),this}closePath(){return this.context.closePath(),this.customContext.closePath(),this}moveTo(e,t){return this.context.moveTo(e,t),this.customContext.moveTo(e,t),this}lineTo(e,t){return this.context.lineTo(e,t),this.customContext.lineTo(e,t),this}arc(e,t,i,s,a,n){return this.context.arc(e,t,i,s,a,n),this.customContext.arc(e,t,i,s,a,n?-1:1),this}arcTo(e,t,i,s,a){return this.context.arcTo(e,t,i,s,a),this.customContext.arcTo(e,t,i,s,a),this}quadraticCurveTo(e,t,i,s){return this.context.quadraticCurveTo(e,t,i,s),this.customContext.quadraticCurveTo(e,t,i,s),this}bezierCurveTo(e,t,i,s,a,n){return this.context.bezierCurveTo(e,t,i,s,a,n),this.customContext.bezierCurveTo(e,t,i,s,a,n),this}rect(e,t,i,s){return this.context.rect(e,t,i,s),this.customContext.rect(e,t,i,s),this}translate(e,t){return this.context.translate(e,t),this.customContext.translate(e,t),this}rotate(e){return this.context.rotate(e),this.customContext.rotate(e),this}scale(e,t){return this.context.scale(e,t),this.customContext.scale(e,t),this}createLinearGradient(e,t,i,s,a){const n=this.context.createLinearGradient(e,t,i,s),o=this.customContext.createLinearGradient(e,t,i,s);return a&&Object.keys(a).forEach(l=>{const h=parseFloat(l);n.addColorStop(h,a[h]),o.addColorStop(h,a[h])}),{gradient:n,gradientCustom:o}}createRadialGradient(e,t,i,s,a,n,o){const l=this.context.createRadialGradient(e,t,i,s,a,n),h=this.customContext.createRadialGradient(e,t,i,s,a,n);return o&&Object.keys(o).forEach(u=>{const d=parseFloat(u);l.addColorStop(d,o[d]),h.addColorStop(d,o[d])}),{gradient:l,gradientCustom:h}}drawImage(e,t=0,i=0){return this.context.drawImage(e,t,i),this.customContext.drawImage(e,t,i),this}getImageData(e,t,i,s,a){return this.context.getImageData(e,t,i,s,a)}putImageData(e,t=0,i=0){return this.context.putImageData(e,t,i)}toRawSVG(){const e=this.customContext.getSerializedSvg(!0),t=this.customContext.getSvg();return{raw:e,element:t}}toSVGOperation(){const{raw:e}=this.toRawSVG();return is.fromRawSVG(e)}}(function(){let r=0;window.requestAnimationFrame||(window.requestAnimationFrame=function(e){const t=new Date().getTime(),i=Math.max(0,16-(t-r)),s=window.setTimeout(function(){e(t+i)},i);return r=t+i,s}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})})();const kh=r=>{function e(t){const i=window.requestAnimationFrame(e);r(t,i)}return window.requestAnimationFrame(e)},WT=()=>Math.random()*16777215,qT=()=>`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`,YT=()=>`#${(~~(Math.random()*(1<<24))).toString(16)}`,l4=function(r){let e="00000"+(r|0).toString(16);return e="#"+e.substring(e.length-6),e},h4=function(r,e=1){const t=r>>16&255,i=r>>8&255,s=r&255,a=e<0?0:e>1?1:e;return a===1?"rgb("+t+","+i+","+s+")":"rgba("+t+","+i+","+s+","+a+")"},kl=function(r){return r[0]==="#"&&(r=r.slice(1)),parseInt(r,16)},Eh=function(r,e=1){const t=kl(r);return h4(t,e)},XT=r=>{const t=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?\.?\d*)\s*\)/gi.exec(r);return t?"#"+((1<<24)+(parseInt(t[1])<<16)+(parseInt(t[2])<<8)+parseInt(t[3])).toString(16).slice(1):""};function KT(r,e,t,i){let s,a,n;r=r/360,e=e/100,t=t/100;const o=Math.floor(r*6),l=r*6-o,h=t*(1-e),u=t*(1-l*e),d=t*(1-(1-l)*e);switch(o%6){case 0:s=t,a=d,n=h;break;case 1:s=u,a=t,n=h;break;case 2:s=h,a=t,n=d;break;case 3:s=h,a=u,n=t;break;case 4:s=d,a=h,n=t;break;case 5:default:s=t,a=h,n=u;break}return{r:Math.round(s*255),g:Math.round(a*255),b:Math.round(n*255),a:i??1}}function ZT(r,e,t,i){const s=Math.max(r,e,t),a=Math.min(r,e,t),n=s-a,o=s===0?0:n/s,l=s/255;let h;switch(s){case a:h=0;break;case r:h=e-t+n*(e<t?6:0),h/=6*n;break;case e:h=t-r+n*2,h/=6*n;break;case t:default:h=r-e+n*4,h/=6*n;break}return{h:Math.round(h*360),s:Math.round(o*100),v:Math.round(l*100),a:i??1}}function JT(r,e){let t=parseInt(r.substring(1,3),16),i=parseInt(r.substring(3,5),16),s=parseInt(r.substring(5,7),16);t==0&&(t=32),i==0&&(i=32),s==0&&(s=32),t=t*(100+e)/100,i=i*(100+e)/100,s=s*(100+e)/100,t=t<255?t:255,i=i<255?i:255,s=s<255?s:255,t=Math.round(t),i=Math.round(i),s=Math.round(s);const a=t.toString(16).length==1?"0"+t.toString(16):t.toString(16),n=i.toString(16).length==1?"0"+i.toString(16):i.toString(16),o=s.toString(16).length==1?"0"+s.toString(16):s.toString(16);return"#"+a+n+o}class QT extends c2{container;ctx;config;mouse;keyboard;resizeObserver;installedPlugins=new Map;animateFrameID;constructor(e,t={}){super(),this.container=e,this.ctx=new zh(this.container),this.config=pf(t,cT),e instanceof HTMLCanvasElement&&(this.config.width=e.width,this.config.height=e.height),this.resizeObserver=new ResizeObserver(i=>{const{width:s,height:a}=i[0].contentRect;this.emit("resizeRoot",s,a)}),this.resizeObserver.observe(this.container),this.mouse=new vT(this),this.keyboard=new mT(this)}renderFrame(e){kh((t,i)=>{this.animateFrameID=i,e(this)})}destroyFrame(){typeof this.animateFrameID<"u"&&window.cancelAnimationFrame(this.animateFrameID)}destroy(){this.removeAllListeners(),this.destroyPlugin(Array.from(this.installedPlugins.keys())),this.resizeObserver.disconnect(),this.mouse?.destroy(),this.keyboard?.destroy(),this.destroyFrame()}drawMouseMoveLine(e={}){switch(e.type){case"brush":e.typeOptions=e.typeOptions||{brush_size:10,brush_density:50,brush_color:"#000000"};const t=this.ctx.getImageData(0,0,this.config.width,this.config.height),i=t.data,s=kl(e.typeOptions.brush_color);let a=!1;this.on("mouseDown",()=>{a=!0}),this.on("mouseUp",()=>{a=!1}),this.on("mouseMove",()=>{if(a){for(let n=0;n<e.typeOptions.brush_density;n++){const o=Math.random()*Math.PI*2,l=Math.random()*e.typeOptions.brush_size,h=this.mouse.point.x+Math.cos(o)*l|0,u=this.mouse.point.y+Math.sin(o)*l|0,d=(h+u*t.width)*4;i[d]=s>>16&255,i[d+1]=s>>8&255,i[d+2]=s&255,i[d+3]=255}this.ctx.putImageData(t)}});break;case"line":default:this.on("mouseDown",()=>{this.ctx.beginPath(),this.ctx.moveTo(this.mouse.point.x,this.mouse.point.y)}),this.on("mouseMove",()=>{this.ctx.lineTo(this.mouse.point.x,this.mouse.point.y),e.extra?.(this),this.ctx.stroke()}),this.on("mouseUp",()=>{this.ctx.closePath()})}}use(e,...t){return this.installedPlugins.has(e.name)||(this.installedPlugins.set(e.name,e),e.install(this,...t)),this}getPlugin(e){return this.installedPlugins.get(e)}getPlugins(e){return e.map(t=>this.getPlugin(t))}enablePlugin(e){return Array.isArray(e)||(e=[e]),this.getPlugins(e)?.forEach(i=>i?.enable?.()),this}disablePlugin(e){return Array.isArray(e)||(e=[e]),this.getPlugins(e)?.forEach(i=>i?.disable?.()),this}destroyPlugin(e){return Array.isArray(e)||(e=[e]),this.getPlugins(e)?.forEach(i=>i?.destroy()),this}isPluginEnable(e){return this.getPlugin(e)?.isEnabled?.()??!1}}const xT={colorPrimary:tt.getCSSVar("--color-primary"),colorRed:tt.getCSSVar("--color-red"),colorOrange:tt.getCSSVar("--color-orange"),colorYellow:tt.getCSSVar("--color-yellow"),colorGreen:tt.getCSSVar("--color-green"),colorBlue:tt.getCSSVar("--color-blue"),colorPurple:tt.getCSSVar("--color-purple"),colorBlack:tt.getCSSVar("--color-black"),colorGray0:tt.getCSSVar("--color-gray-0"),colorGray3:tt.getCSSVar("--color-gray-3"),colorGray6:tt.getCSSVar("--color-gray-6"),colorGray9:tt.getCSSVar("--color-gray-9"),colorGrayCC:tt.getCSSVar("--color-gray-cc"),colorGrayDD:tt.getCSSVar("--color-gray-dd"),colorGrayE6:tt.getCSSVar("--color-gray-e6"),colorGrayEE:tt.getCSSVar("--color-gray-ee"),colorGrayEF:tt.getCSSVar("--color-gray-ef"),colorGrayF5:tt.getCSSVar("--color-gray-f5"),colorGrayFF:tt.getCSSVar("--color-gray-ff"),fontLineHeight:tt.getCSSVar("--font-line-height"),fontSize32:tt.getCSSVar("--font-size-32"),fontSize24:tt.getCSSVar("--font-size-24"),fontSize18:tt.getCSSVar("--font-size-18"),fontSize16:tt.getCSSVar("--font-size-16"),fontSize14:tt.getCSSVar("--font-size-14"),fontSize12:tt.getCSSVar("--font-size-12"),fontSize11:tt.getCSSVar("--font-size-11"),gap4:tt.getCSSVar("--gap-4"),gap8:tt.getCSSVar("--gap-8"),gap12:tt.getCSSVar("--gap-12"),gap16:tt.getCSSVar("--gap-16"),gap20:tt.getCSSVar("--gap-20"),gap40:tt.getCSSVar("--gap-40"),height44:tt.getCSSVar("--height-44"),height32:tt.getCSSVar("--height-32"),borderRadius:tt.getCSSVar("--border-radius")};function eC(r){return btoa(encodeURIComponent(r)).replaceAll("+","*").replaceAll("/","-").replaceAll("=","")}function tC(r){let e=r.replaceAll("*","+").replaceAll("-","/");const t=e.length%4;return t&&(e=e.padEnd(e.length+(4-t),"=")),decodeURIComponent(atob(e))}function Ah(r=window.location.href){return Do(URL)?new URL(r):u4(r)}function u4(r=window.location.href){const e="(?<protocol>https?:)",t="(?<host>(?<hostname>[^/#?:]+)(?::(?<port>\\d+))?)",i="(?<pathname>(?:\\/[^/#?]+)*\\/?)",s="(?<search>(?:\\?[^#]*)?)",a="(?<hash>(?:#.*)?)",o=new RegExp(`^${e}//${t}${i}${s}${a}$`).exec(r);return{href:r,protocol:o?.groups?.protocol??"",host:o?.groups?.host??"",hostname:o?.groups?.hostname??"",port:o?.groups?.port??"",pathname:o?.groups?.pathname??"",search:o?.groups?.search??"",hash:o?.groups?.hash??""}}function rC(r){const e=Ah(r);return e.protocol==="http:"||e.protocol==="https:"}function f4(r=window.location.href){const e=Ah(r),t=e.href.indexOf(e.hash);return e.hash&&t>=0?e.href.substring(0,t):e.href}function iC(r=location.search){r=decodeURIComponent(r).replace(/^[#?&]/,"");const e={};if(!r)return e;const t=/(?:^|&)([^&=]*)=?([^&]*?)(?=&|$)/y;let i=t.exec(r);for(;i;)e[i[1]]=i[2],i=t.exec(r);return e}function sC(r){return Array.from(new URLSearchParams(r)).reduce((e,[t,i])=>Object.assign({},e,{[t]:e[t]?(Array.isArray(e[t])?e[t]:[e[t]]).concat(i):i}),{})}function d4(r){let e="";for(const t in r)e&&(e+="&"),e+=`${t}=${r[t]}`;return e}function aC(r){return new URLSearchParams(r).toString()}function Mh(r){return"?"+[...r.entries()].map(e=>encodeURIComponent(e[0])+"="+encodeURIComponent(e[1]instanceof File?e[1].name:e[1])).join("&")}function El(r,e){return r.indexOf("?")>=0?r+e.replace(/^\?/,"&"):r.replace(/(?:\?.*)?$/,e.replace(/^[&?]/,"?"))}function nC(r){let e="";new MutationObserver(function(i){window.location.href!==e&&(e=window.location.href,r&&r(location.href))}).observe(document,{attributes:!0,childList:!0,subtree:!0})}function oC(r){window.addEventListener("hashchange",()=>{r(location.hash)})}function lC(r){window.addEventListener("popstate",r,!1)}var c4={exports:{}};(function(r){var e={};r.exports=e,e.parse=function(t,i){for(var s=e.bin.readUshort,a=e.bin.readUint,h=0,n={},o=new Uint8Array(t),l=o.length-4;a(o,l)!=101010256;)l--;var h=l;h+=4,h+=4;var u=s(o,h);h+=2,s(o,h),h+=2;var d=a(o,h);h+=4;var c=a(o,h);h+=4,h=c;for(var f=0;f<u;f++){a(o,h),h+=4,h+=4,h+=4,h+=4,a(o,h),h+=4;var d=a(o,h);h+=4;var p=a(o,h);h+=4;var g=s(o,h),y=s(o,h+2),_=s(o,h+4);h+=6,h+=8;var T=a(o,h);h+=4,h+=g+y+_,e._readLocal(o,T,n,d,p,i)}return n},e._readLocal=function(t,i,s,a,n,o){var l=e.bin.readUshort,h=e.bin.readUint;h(t,i),i+=4,l(t,i),i+=2,l(t,i),i+=2;var u=l(t,i);i+=2,h(t,i),i+=4,h(t,i),i+=4,i+=8;var d=l(t,i);i+=2;var c=l(t,i);i+=2;var f=e.bin.readUTF8(t,i,d);if(i+=d,i+=c,o){s[f]={size:n,csize:a};return}var p=new Uint8Array(t.buffer,i);if(u==0)s[f]=new Uint8Array(p.buffer.slice(i,i+a));else if(u==8){var g=new Uint8Array(n);e.inflateRaw(p,g),s[f]=g}else throw"unknown compression method: "+u},e.inflateRaw=function(t,i){return e.F.inflate(t,i)},e.inflate=function(t,i){return t[0],t[1],e.inflateRaw(new Uint8Array(t.buffer,t.byteOffset+2,t.length-6),i)},e.deflate=function(t,i){i==null&&(i={level:6});var s=0,a=new Uint8Array(50+Math.floor(t.length*1.1));a[s]=120,a[s+1]=156,s+=2,s=e.F.deflateRaw(t,a,s,i.level);var n=e.adler(t,0,t.length);return a[s+0]=n>>>24&255,a[s+1]=n>>>16&255,a[s+2]=n>>>8&255,a[s+3]=n>>>0&255,new Uint8Array(a.buffer,0,s+4)},e.deflateRaw=function(t,i){i==null&&(i={level:6});var s=new Uint8Array(50+Math.floor(t.length*1.1)),a=e.F.deflateRaw(t,s,a,i.level);return new Uint8Array(s.buffer,0,a)},e.encode=function(t,i){i==null&&(i=!1);var s=0,a=e.bin.writeUint,n=e.bin.writeUshort,o={};for(var l in t){var h=!e._noNeed(l)&&!i,u=t[l],d=e.crc.crc(u,0,u.length);o[l]={cpr:h,usize:u.length,crc:d,file:h?e.deflateRaw(u):u}}for(var l in o)s+=o[l].file.length+30+46+2*e.bin.sizeUTF8(l);s+=22;var c=new Uint8Array(s),f=0,p=[];for(var l in o){var g=o[l];p.push(f),f=e._writeHeader(c,f,l,g,0)}var y=0,_=f;for(var l in o){var g=o[l];p.push(f),f=e._writeHeader(c,f,l,g,1,p[y++])}var T=f-_;return a(c,f,101010256),f+=4,f+=4,n(c,f,y),f+=2,n(c,f,y),f+=2,a(c,f,T),f+=4,a(c,f,_),f+=4,f+=2,c.buffer},e._noNeed=function(t){var i=t.split(".").pop().toLowerCase();return"png,jpg,jpeg,zip".indexOf(i)!=-1},e._writeHeader=function(t,i,s,a,n,o){var l=e.bin.writeUint,h=e.bin.writeUshort,u=a.file;l(t,i,n==0?67324752:33639248),i+=4,n==1&&(i+=2),h(t,i,20),i+=2,h(t,i,0),i+=2,h(t,i,a.cpr?8:0),i+=2,l(t,i,0),i+=4,l(t,i,a.crc),i+=4,l(t,i,u.length),i+=4,l(t,i,a.usize),i+=4,h(t,i,e.bin.sizeUTF8(s)),i+=2,h(t,i,0),i+=2,n==1&&(i+=2,i+=2,i+=6,l(t,i,o),i+=4);var d=e.bin.writeUTF8(t,i,s);return i+=d,n==0&&(t.set(u,i),i+=u.length),i},e.crc={table:function(){for(var t=new Uint32Array(256),i=0;i<256;i++){for(var s=i,a=0;a<8;a++)s&1?s=3988292384^s>>>1:s=s>>>1;t[i]=s}return t}(),update:function(t,i,s,a){for(var n=0;n<a;n++)t=e.crc.table[(t^i[s+n])&255]^t>>>8;return t},crc:function(t,i,s){return e.crc.update(4294967295,t,i,s)^4294967295}},e.adler=function(t,i,s){for(var a=1,n=0,o=i,l=i+s;o<l;){for(var h=Math.min(o+5552,l);o<h;)a+=t[o++],n+=a;a=a%65521,n=n%65521}return n<<16|a},e.bin={readUshort:function(t,i){return t[i]|t[i+1]<<8},writeUshort:function(t,i,s){t[i]=s&255,t[i+1]=s>>8&255},readUint:function(t,i){return t[i+3]*(256*256*256)+(t[i+2]<<16|t[i+1]<<8|t[i])},writeUint:function(t,i,s){t[i]=s&255,t[i+1]=s>>8&255,t[i+2]=s>>16&255,t[i+3]=s>>24&255},readASCII:function(t,i,s){for(var a="",n=0;n<s;n++)a+=String.fromCharCode(t[i+n]);return a},writeASCII:function(t,i,s){for(var a=0;a<s.length;a++)t[i+a]=s.charCodeAt(a)},pad:function(t){return t.length<2?"0"+t:t},readUTF8:function(t,i,s){for(var a="",n,o=0;o<s;o++)a+="%"+e.bin.pad(t[i+o].toString(16));try{n=decodeURIComponent(a)}catch{return e.bin.readASCII(t,i,s)}return n},writeUTF8:function(t,i,s){for(var a=s.length,n=0,o=0;o<a;o++){var l=s.charCodeAt(o);if(!(l&4294967295-128+1))t[i+n]=l,n++;else if(!(l&4294967295-2048+1))t[i+n]=192|l>>6,t[i+n+1]=128|l>>0&63,n+=2;else if(!(l&4294967295-65536+1))t[i+n]=224|l>>12,t[i+n+1]=128|l>>6&63,t[i+n+2]=128|l>>0&63,n+=3;else if(!(l&4294967295-(1<<21)+1))t[i+n]=240|l>>18,t[i+n+1]=128|l>>12&63,t[i+n+2]=128|l>>6&63,t[i+n+3]=128|l>>0&63,n+=4;else throw"e"}return n},sizeUTF8:function(t){for(var i=t.length,s=0,a=0;a<i;a++){var n=t.charCodeAt(a);if(!(n&4294967295-128+1))s++;else if(!(n&4294967295-2048+1))s+=2;else if(!(n&4294967295-65536+1))s+=3;else if(!(n&4294967295-(1<<21)+1))s+=4;else throw"e"}return s}},e.F={},e.F.deflateRaw=function(t,i,s,a){var n=[[0,0,0,0,0],[4,4,8,4,0],[4,5,16,8,0],[4,6,16,16,0],[4,10,16,32,0],[8,16,32,32,0],[8,16,128,128,0],[8,32,128,256,0],[32,128,258,1024,1],[32,258,258,4096,1]],o=n[a],l=e.F.U,h=e.F._goodIndex;e.F._hash;var u=e.F._putsE,d=0,c=s<<3,f=0,p=t.length;if(a==0){for(;d<p;){var g=Math.min(65535,p-d);u(i,c,d+g==p?1:0),c=e.F._copyExact(t,d,g,i,c+8),d+=g}return c>>>3}var y=l.lits,_=l.strt,T=l.prev,m=0,w=0,O=0,k=0,I=0,$=0;for(p>2&&($=e.F._hash(t,0),_[$]=0),d=0;d<p;d++){if(I=$,d+1<p-2){$=e.F._hash(t,d+1);var G=d+1&32767;T[G]=_[$],_[$]=G}if(f<=d){(m>14e3||w>26697)&&p-d>100&&(f<d&&(y[m]=d-f,m+=2,f=d),c=e.F._writeBlock(d==p-1||f==p?1:0,y,m,k,t,O,d-O,i,c),m=w=k=0,O=d);var U=0;d<p-2&&(U=e.F._bestMatch(t,d,T,I,Math.min(o[2],p-d),o[3]));var g=U>>>16,V=U&65535;if(U!=0){var g=U>>>16,V=U&65535,X=h(g,l.of0);l.lhst[257+X]++;var te=h(V,l.df0);l.dhst[te]++,k+=l.exb[X]+l.dxb[te],y[m]=g<<23|d-f,y[m+1]=V<<16|X<<8|te,m+=2,f=d+g}else l.lhst[t[d]]++;w++}}for((O!=d||t.length==0)&&(f<d&&(y[m]=d-f,m+=2,f=d),c=e.F._writeBlock(1,y,m,k,t,O,d-O,i,c),m=0,w=0,m=w=k=0,O=d);c&7;)c++;return c>>>3},e.F._bestMatch=function(t,i,s,a,n,o){var l=i&32767,h=s[l],u=l-h+32768&32767;if(h==l||a!=e.F._hash(t,i-u))return 0;for(var d=0,c=0,f=Math.min(32767,i);u<=f&&--o!=0&&h!=l;){if(d==0||t[i+d]==t[i+d-u]){var p=e.F._howLong(t,i,u);if(p>d){if(d=p,c=u,d>=n)break;u+2<p&&(p=u+2);for(var g=0,y=0;y<p-2;y++){var _=i-u+y+32768&32767,T=s[_],m=_-T+32768&32767;m>g&&(g=m,h=_)}}}l=h,h=s[l],u+=l-h+32768&32767}return d<<16|c},e.F._howLong=function(t,i,s){if(t[i]!=t[i-s]||t[i+1]!=t[i+1-s]||t[i+2]!=t[i+2-s])return 0;var a=i,n=Math.min(t.length,i+258);for(i+=3;i<n&&t[i]==t[i-s];)i++;return i-a},e.F._hash=function(t,i){return(t[i]<<8|t[i+1])+(t[i+2]<<4)&65535},e.saved=0,e.F._writeBlock=function(t,i,s,a,n,o,l,h,u){var d=e.F.U,c=e.F._putsF,f=e.F._putsE,p,g,y,_,T,m,w,O,k;d.lhst[256]++,p=e.F.getTrees(),g=p[0],y=p[1],_=p[2],T=p[3],m=p[4],w=p[5],O=p[6],k=p[7];var I=(u+3&7?8-(u+3&7):0)+32+(l<<3),$=a+e.F.contSize(d.fltree,d.lhst)+e.F.contSize(d.fdtree,d.dhst),G=a+e.F.contSize(d.ltree,d.lhst)+e.F.contSize(d.dtree,d.dhst);G+=14+3*w+e.F.contSize(d.itree,d.ihst)+(d.ihst[16]*2+d.ihst[17]*3+d.ihst[18]*7);for(var U=0;U<286;U++)d.lhst[U]=0;for(var U=0;U<30;U++)d.dhst[U]=0;for(var U=0;U<19;U++)d.ihst[U]=0;var V=I<$&&I<G?0:$<G?1:2;if(c(h,u,t),c(h,u+1,V),u+=3,V==0){for(;u&7;)u++;u=e.F._copyExact(n,o,l,h,u)}else{var X,te;if(V==1&&(X=d.fltree,te=d.fdtree),V==2){e.F.makeCodes(d.ltree,g),e.F.revCodes(d.ltree,g),e.F.makeCodes(d.dtree,y),e.F.revCodes(d.dtree,y),e.F.makeCodes(d.itree,_),e.F.revCodes(d.itree,_),X=d.ltree,te=d.dtree,f(h,u,T-257),u+=5,f(h,u,m-1),u+=5,f(h,u,w-4),u+=4;for(var ee=0;ee<w;ee++)f(h,u+ee*3,d.itree[(d.ordr[ee]<<1)+1]);u+=3*w,u=e.F._codeTiny(O,d.itree,h,u),u=e.F._codeTiny(k,d.itree,h,u)}for(var oe=o,Ce=0;Ce<s;Ce+=2){for(var we=i[Ce],_e=we>>>23,ae=oe+(we&(1<<23)-1);oe<ae;)u=e.F._writeLit(n[oe++],X,h,u);if(_e!=0){var Z=i[Ce+1],M=Z>>16,E=Z>>8&255,z=Z&255;u=e.F._writeLit(257+E,X,h,u),f(h,u,_e-d.of0[E]),u+=d.exb[E],u=e.F._writeLit(z,te,h,u),c(h,u,M-d.df0[z]),u+=d.dxb[z],oe+=_e}}u=e.F._writeLit(256,X,h,u)}return u},e.F._copyExact=function(t,i,s,a,n){var o=n>>>3;return a[o]=s,a[o+1]=s>>>8,a[o+2]=255-a[o],a[o+3]=255-a[o+1],o+=4,a.set(new Uint8Array(t.buffer,i,s),o),n+(s+4<<3)},e.F.getTrees=function(){for(var t=e.F.U,i=e.F._hufTree(t.lhst,t.ltree,15),s=e.F._hufTree(t.dhst,t.dtree,15),a=[],n=e.F._lenCodes(t.ltree,a),o=[],l=e.F._lenCodes(t.dtree,o),h=0;h<a.length;h+=2)t.ihst[a[h]]++;for(var h=0;h<o.length;h+=2)t.ihst[o[h]]++;for(var u=e.F._hufTree(t.ihst,t.itree,7),d=19;d>4&&t.itree[(t.ordr[d-1]<<1)+1]==0;)d--;return[i,s,u,n,l,d,a,o]},e.F.getSecond=function(t){for(var i=[],s=0;s<t.length;s+=2)i.push(t[s+1]);return i},e.F.nonZero=function(t){for(var i="",s=0;s<t.length;s+=2)t[s+1]!=0&&(i+=(s>>1)+",");return i},e.F.contSize=function(t,i){for(var s=0,a=0;a<i.length;a++)s+=i[a]*t[(a<<1)+1];return s},e.F._codeTiny=function(t,i,s,a){for(var n=0;n<t.length;n+=2){var o=t[n],l=t[n+1];a=e.F._writeLit(o,i,s,a);var h=o==16?2:o==17?3:7;o>15&&(e.F._putsE(s,a,l,h),a+=h)}return a},e.F._lenCodes=function(t,i){for(var s=t.length;s!=2&&t[s-1]==0;)s-=2;for(var a=0;a<s;a+=2){var n=t[a+1],o=a+3<s?t[a+3]:-1,l=a+5<s?t[a+5]:-1,h=a==0?-1:t[a-1];if(n==0&&o==n&&l==n){for(var u=a+5;u+2<s&&t[u+2]==n;)u+=2;var d=Math.min(u+1-a>>>1,138);d<11?i.push(17,d-3):i.push(18,d-11),a+=d*2-2}else if(n==h&&o==n&&l==n){for(var u=a+5;u+2<s&&t[u+2]==n;)u+=2;var d=Math.min(u+1-a>>>1,6);i.push(16,d-3),a+=d*2-2}else i.push(n,0)}return s>>>1},e.F._hufTree=function(t,i,s){var a=[],n=t.length,o=i.length,l=0;for(l=0;l<o;l+=2)i[l]=0,i[l+1]=0;for(l=0;l<n;l++)t[l]!=0&&a.push({lit:l,f:t[l]});var h=a.length,u=a.slice(0);if(h==0)return 0;if(h==1){var d=a[0].lit,u=d==0?1:0;return i[(d<<1)+1]=1,i[(u<<1)+1]=1,1}a.sort(function(T,m){return T.f-m.f});var c=a[0],f=a[1],p=0,g=1,y=2;for(a[0]={lit:-1,f:c.f+f.f,l:c,r:f,d:0};g!=h-1;)p!=g&&(y==h||a[p].f<a[y].f)?c=a[p++]:c=a[y++],p!=g&&(y==h||a[p].f<a[y].f)?f=a[p++]:f=a[y++],a[g++]={lit:-1,f:c.f+f.f,l:c,r:f};var _=e.F.setDepth(a[g-1],0);for(_>s&&(e.F.restrictDepth(u,s,_),_=s),l=0;l<h;l++)i[(u[l].lit<<1)+1]=u[l].d;return _},e.F.setDepth=function(t,i){return t.lit!=-1?(t.d=i,i):Math.max(e.F.setDepth(t.l,i+1),e.F.setDepth(t.r,i+1))},e.F.restrictDepth=function(t,i,s){var a=0,n=1<<s-i,o=0;for(t.sort(function(h,u){return u.d==h.d?h.f-u.f:u.d-h.d}),a=0;a<t.length&&t[a].d>i;a++){var l=t[a].d;t[a].d=i,o+=n-(1<<s-l)}for(o=o>>>s-i;o>0;){var l=t[a].d;l<i?(t[a].d++,o-=1<<i-l-1):a++}for(;a>=0;a--)t[a].d==i&&o<0&&(t[a].d--,o++);o!=0&&console.log("debt left")},e.F._goodIndex=function(t,i){var s=0;return i[s|16]<=t&&(s|=16),i[s|8]<=t&&(s|=8),i[s|4]<=t&&(s|=4),i[s|2]<=t&&(s|=2),i[s|1]<=t&&(s|=1),s},e.F._writeLit=function(t,i,s,a){return e.F._putsF(s,a,i[t<<1]),a+i[(t<<1)+1]},e.F.inflate=function(t,i){var s=Uint8Array;if(t[0]==3&&t[1]==0)return i||new s(0);var a=e.F,n=a._bitsF,o=a._bitsE,l=a._decodeTiny,h=a.makeCodes,u=a.codes2map,d=a._get17,c=a.U,f=i==null;f&&(i=new s(t.length>>>2<<3));for(var p=0,g=0,y=0,_=0,T=0,m=0,w=0,O=0,k=0,I,$;p==0;){if(p=n(t,k,1),g=n(t,k+1,2),k+=3,g==0){k&7&&(k+=8-(k&7));var G=(k>>>3)+4,U=t[G-4]|t[G-3]<<8;f&&(i=e.F._check(i,O+U)),i.set(new s(t.buffer,t.byteOffset+G,U),O),k=G+U<<3,O+=U;continue}if(f&&(i=e.F._check(i,O+(1<<17))),g==1&&(I=c.flmap,$=c.fdmap,m=512-1,w=32-1),g==2){y=o(t,k,5)+257,_=o(t,k+5,5)+1,T=o(t,k+10,4)+4,k+=14;for(var V=0;V<38;V+=2)c.itree[V]=0,c.itree[V+1]=0;for(var X=1,V=0;V<T;V++){var te=o(t,k+V*3,3);c.itree[(c.ordr[V]<<1)+1]=te,te>X&&(X=te)}k+=3*T,h(c.itree,X),u(c.itree,X,c.imap),I=c.lmap,$=c.dmap,k=l(c.imap,(1<<X)-1,y+_,t,k,c.ttree);var ee=a._copyOut(c.ttree,0,y,c.ltree);m=(1<<ee)-1;var oe=a._copyOut(c.ttree,y,_,c.dtree);w=(1<<oe)-1,h(c.ltree,ee),u(c.ltree,ee,I),h(c.dtree,oe),u(c.dtree,oe,$)}for(;;){var Ce=I[d(t,k)&m];k+=Ce&15;var we=Ce>>>4;if(!(we>>>8))i[O++]=we;else{if(we==256)break;var _e=O+we-254;if(we>264){var ae=c.ldef[we-257];_e=O+(ae>>>3)+o(t,k,ae&7),k+=ae&7}var Z=$[d(t,k)&w];k+=Z&15;var M=Z>>>4,E=c.ddef[M],z=(E>>>4)+n(t,k,E&15);for(k+=E&15,f&&(i=e.F._check(i,O+(1<<17)));O<_e;)i[O]=i[O++-z],i[O]=i[O++-z],i[O]=i[O++-z],i[O]=i[O++-z];O=_e}}}return i.length==O?i:i.slice(0,O)},e.F._check=function(t,i){var s=t.length;if(i<=s)return t;var a=new Uint8Array(Math.max(s<<1,i));return a.set(t,0),a},e.F._decodeTiny=function(t,i,s,a,n,o){for(var l=e.F._bitsE,h=e.F._get17,u=0;u<s;){var d=t[h(a,n)&i];n+=d&15;var c=d>>>4;if(c<=15)o[u]=c,u++;else{var f=0,p=0;c==16?(p=3+l(a,n,2),n+=2,f=o[u-1]):c==17?(p=3+l(a,n,3),n+=3):c==18&&(p=11+l(a,n,7),n+=7);for(var g=u+p;u<g;)o[u]=f,u++}}return n},e.F._copyOut=function(t,i,s,a){for(var n=0,o=0,l=a.length>>>1;o<s;){var h=t[o+i];a[o<<1]=0,a[(o<<1)+1]=h,h>n&&(n=h),o++}for(;o<l;)a[o<<1]=0,a[(o<<1)+1]=0,o++;return n},e.F.makeCodes=function(t,i){for(var s=e.F.U,a=t.length,n,o,l,h,u,d=s.bl_count,h=0;h<=i;h++)d[h]=0;for(h=1;h<a;h+=2)d[t[h]]++;var c=s.next_code;for(n=0,d[0]=0,o=1;o<=i;o++)n=n+d[o-1]<<1,c[o]=n;for(l=0;l<a;l+=2)u=t[l+1],u!=0&&(t[l]=c[u],c[u]++)},e.F.codes2map=function(t,i,s){for(var a=t.length,n=e.F.U,o=n.rev15,l=0;l<a;l+=2)if(t[l+1]!=0)for(var h=l>>1,u=t[l+1],d=h<<4|u,c=i-u,f=t[l]<<c,p=f+(1<<c);f!=p;){var g=o[f]>>>15-i;s[g]=d,f++}},e.F.revCodes=function(t,i){for(var s=e.F.U.rev15,a=15-i,n=0;n<t.length;n+=2){var o=t[n]<<i-t[n+1];t[n]=s[o]>>>a}},e.F._putsE=function(t,i,s){s=s<<(i&7);var a=i>>>3;t[a]|=s,t[a+1]|=s>>>8},e.F._putsF=function(t,i,s){s=s<<(i&7);var a=i>>>3;t[a]|=s,t[a+1]|=s>>>8,t[a+2]|=s>>>16},e.F._bitsE=function(t,i,s){return(t[i>>>3]|t[(i>>>3)+1]<<8)>>>(i&7)&(1<<s)-1},e.F._bitsF=function(t,i,s){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16)>>>(i&7)&(1<<s)-1},e.F._get17=function(t,i){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16)>>>(i&7)},e.F._get25=function(t,i){return(t[i>>>3]|t[(i>>>3)+1]<<8|t[(i>>>3)+2]<<16|t[(i>>>3)+3]<<24)>>>(i&7)},e.F.U=function(){var t=Uint16Array,i=Uint32Array;return{next_code:new t(16),bl_count:new t(16),ordr:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],of0:[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,999,999,999],exb:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],ldef:new t(32),df0:[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,65535,65535],dxb:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],ddef:new i(32),flmap:new t(512),fltree:[],fdmap:new t(32),fdtree:[],lmap:new t(32768),ltree:[],ttree:[],dmap:new t(32768),dtree:[],imap:new t(512),itree:[],rev15:new t(32768),lhst:new i(286),dhst:new i(30),ihst:new i(19),lits:new i(15e3),strt:new t(65536),prev:new t(32768)}}(),function(){for(var t=e.F.U,i=32768,s=0;s<i;s++){var a=s;a=(a&2863311530)>>>1|(a&1431655765)<<1,a=(a&3435973836)>>>2|(a&858993459)<<2,a=(a&4042322160)>>>4|(a&252645135)<<4,a=(a&4278255360)>>>8|(a&16711935)<<8,t.rev15[s]=(a>>>16|a<<16)>>>17}function n(o,l,h){for(;l--!=0;)o.push(0,h)}for(var s=0;s<32;s++)t.ldef[s]=t.of0[s]<<3|t.exb[s],t.ddef[s]=t.df0[s]<<4|t.dxb[s];n(t.fltree,144,8),n(t.fltree,255-143,9),n(t.fltree,279-255,7),n(t.fltree,287-279,8),e.F.makeCodes(t.fltree,9),e.F.codes2map(t.fltree,9,t.flmap),e.F.revCodes(t.fltree,9),n(t.fdtree,32,5),e.F.makeCodes(t.fdtree,5),e.F.codes2map(t.fdtree,5,t.fdmap),e.F.revCodes(t.fdtree,5),n(t.itree,19,0),n(t.ltree,286,0),n(t.dtree,30,0),n(t.ttree,320,0)}()})(c4);var hC=c4.exports;const p4=_r(hC);/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const uC=4,g4=0,v4=1,fC=2;function fa(r){let e=r.length;for(;--e>=0;)r[e]=0}const dC=0,m4=1,cC=2,pC=3,gC=258,Rh=29,pn=256,gn=pn+1+Rh,da=30,Oh=19,b4=2*gn+1,Rs=15,Ih=16,vC=7,$h=256,y4=16,_4=17,T4=18,Dh=new Uint8Array([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]),Al=new Uint8Array([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]),mC=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),C4=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),bC=512,Oi=new Array((gn+2)*2);fa(Oi);const vn=new Array(da*2);fa(vn);const mn=new Array(bC);fa(mn);const bn=new Array(gC-pC+1);fa(bn);const Nh=new Array(Rh);fa(Nh);const Ml=new Array(da);fa(Ml);function Lh(r,e,t,i,s){this.static_tree=r,this.extra_bits=e,this.extra_base=t,this.elems=i,this.max_length=s,this.has_stree=r&&r.length}let w4,S4,P4;function Fh(r,e){this.dyn_tree=r,this.max_code=0,this.stat_desc=e}const z4=r=>r<256?mn[r]:mn[256+(r>>>7)],yn=(r,e)=>{r.pending_buf[r.pending++]=e&255,r.pending_buf[r.pending++]=e>>>8&255},Tr=(r,e,t)=>{r.bi_valid>Ih-t?(r.bi_buf|=e<<r.bi_valid&65535,yn(r,r.bi_buf),r.bi_buf=e>>Ih-r.bi_valid,r.bi_valid+=t-Ih):(r.bi_buf|=e<<r.bi_valid&65535,r.bi_valid+=t)},pi=(r,e,t)=>{Tr(r,t[e*2],t[e*2+1])},k4=(r,e)=>{let t=0;do t|=r&1,r>>>=1,t<<=1;while(--e>0);return t>>>1},yC=r=>{r.bi_valid===16?(yn(r,r.bi_buf),r.bi_buf=0,r.bi_valid=0):r.bi_valid>=8&&(r.pending_buf[r.pending++]=r.bi_buf&255,r.bi_buf>>=8,r.bi_valid-=8)},_C=(r,e)=>{const t=e.dyn_tree,i=e.max_code,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,n=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,u,d,c,f,p,g=0;for(c=0;c<=Rs;c++)r.bl_count[c]=0;for(t[r.heap[r.heap_max]*2+1]=0,h=r.heap_max+1;h<b4;h++)u=r.heap[h],c=t[t[u*2+1]*2+1]+1,c>l&&(c=l,g++),t[u*2+1]=c,!(u>i)&&(r.bl_count[c]++,f=0,u>=o&&(f=n[u-o]),p=t[u*2],r.opt_len+=p*(c+f),a&&(r.static_len+=p*(s[u*2+1]+f)));if(g!==0){do{for(c=l-1;r.bl_count[c]===0;)c--;r.bl_count[c]--,r.bl_count[c+1]+=2,r.bl_count[l]--,g-=2}while(g>0);for(c=l;c!==0;c--)for(u=r.bl_count[c];u!==0;)d=r.heap[--h],!(d>i)&&(t[d*2+1]!==c&&(r.opt_len+=(c-t[d*2+1])*t[d*2],t[d*2+1]=c),u--)}},E4=(r,e,t)=>{const i=new Array(Rs+1);let s=0,a,n;for(a=1;a<=Rs;a++)s=s+t[a-1]<<1,i[a]=s;for(n=0;n<=e;n++){let o=r[n*2+1];o!==0&&(r[n*2]=k4(i[o]++,o))}},TC=()=>{let r,e,t,i,s;const a=new Array(Rs+1);for(t=0,i=0;i<Rh-1;i++)for(Nh[i]=t,r=0;r<1<<Dh[i];r++)bn[t++]=i;for(bn[t-1]=i,s=0,i=0;i<16;i++)for(Ml[i]=s,r=0;r<1<<Al[i];r++)mn[s++]=i;for(s>>=7;i<da;i++)for(Ml[i]=s<<7,r=0;r<1<<Al[i]-7;r++)mn[256+s++]=i;for(e=0;e<=Rs;e++)a[e]=0;for(r=0;r<=143;)Oi[r*2+1]=8,r++,a[8]++;for(;r<=255;)Oi[r*2+1]=9,r++,a[9]++;for(;r<=279;)Oi[r*2+1]=7,r++,a[7]++;for(;r<=287;)Oi[r*2+1]=8,r++,a[8]++;for(E4(Oi,gn+1,a),r=0;r<da;r++)vn[r*2+1]=5,vn[r*2]=k4(r,5);w4=new Lh(Oi,Dh,pn+1,gn,Rs),S4=new Lh(vn,Al,0,da,Rs),P4=new Lh(new Array(0),mC,0,Oh,vC)},A4=r=>{let e;for(e=0;e<gn;e++)r.dyn_ltree[e*2]=0;for(e=0;e<da;e++)r.dyn_dtree[e*2]=0;for(e=0;e<Oh;e++)r.bl_tree[e*2]=0;r.dyn_ltree[$h*2]=1,r.opt_len=r.static_len=0,r.sym_next=r.matches=0},M4=r=>{r.bi_valid>8?yn(r,r.bi_buf):r.bi_valid>0&&(r.pending_buf[r.pending++]=r.bi_buf),r.bi_buf=0,r.bi_valid=0},R4=(r,e,t,i)=>{const s=e*2,a=t*2;return r[s]<r[a]||r[s]===r[a]&&i[e]<=i[t]},Uh=(r,e,t)=>{const i=r.heap[t];let s=t<<1;for(;s<=r.heap_len&&(s<r.heap_len&&R4(e,r.heap[s+1],r.heap[s],r.depth)&&s++,!R4(e,i,r.heap[s],r.depth));)r.heap[t]=r.heap[s],t=s,s<<=1;r.heap[t]=i},O4=(r,e,t)=>{let i,s,a=0,n,o;if(r.sym_next!==0)do i=r.pending_buf[r.sym_buf+a++]&255,i+=(r.pending_buf[r.sym_buf+a++]&255)<<8,s=r.pending_buf[r.sym_buf+a++],i===0?pi(r,s,e):(n=bn[s],pi(r,n+pn+1,e),o=Dh[n],o!==0&&(s-=Nh[n],Tr(r,s,o)),i--,n=z4(i),pi(r,n,t),o=Al[n],o!==0&&(i-=Ml[n],Tr(r,i,o)));while(a<r.sym_next);pi(r,$h,e)},Gh=(r,e)=>{const t=e.dyn_tree,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.elems;let n,o,l=-1,h;for(r.heap_len=0,r.heap_max=b4,n=0;n<a;n++)t[n*2]!==0?(r.heap[++r.heap_len]=l=n,r.depth[n]=0):t[n*2+1]=0;for(;r.heap_len<2;)h=r.heap[++r.heap_len]=l<2?++l:0,t[h*2]=1,r.depth[h]=0,r.opt_len--,s&&(r.static_len-=i[h*2+1]);for(e.max_code=l,n=r.heap_len>>1;n>=1;n--)Uh(r,t,n);h=a;do n=r.heap[1],r.heap[1]=r.heap[r.heap_len--],Uh(r,t,1),o=r.heap[1],r.heap[--r.heap_max]=n,r.heap[--r.heap_max]=o,t[h*2]=t[n*2]+t[o*2],r.depth[h]=(r.depth[n]>=r.depth[o]?r.depth[n]:r.depth[o])+1,t[n*2+1]=t[o*2+1]=h,r.heap[1]=h++,Uh(r,t,1);while(r.heap_len>=2);r.heap[--r.heap_max]=r.heap[1],_C(r,e),E4(t,l,r.bl_count)},I4=(r,e,t)=>{let i,s=-1,a,n=e[0*2+1],o=0,l=7,h=4;for(n===0&&(l=138,h=3),e[(t+1)*2+1]=65535,i=0;i<=t;i++)a=n,n=e[(i+1)*2+1],!(++o<l&&a===n)&&(o<h?r.bl_tree[a*2]+=o:a!==0?(a!==s&&r.bl_tree[a*2]++,r.bl_tree[y4*2]++):o<=10?r.bl_tree[_4*2]++:r.bl_tree[T4*2]++,o=0,s=a,n===0?(l=138,h=3):a===n?(l=6,h=3):(l=7,h=4))},$4=(r,e,t)=>{let i,s=-1,a,n=e[0*2+1],o=0,l=7,h=4;for(n===0&&(l=138,h=3),i=0;i<=t;i++)if(a=n,n=e[(i+1)*2+1],!(++o<l&&a===n)){if(o<h)do pi(r,a,r.bl_tree);while(--o!==0);else a!==0?(a!==s&&(pi(r,a,r.bl_tree),o--),pi(r,y4,r.bl_tree),Tr(r,o-3,2)):o<=10?(pi(r,_4,r.bl_tree),Tr(r,o-3,3)):(pi(r,T4,r.bl_tree),Tr(r,o-11,7));o=0,s=a,n===0?(l=138,h=3):a===n?(l=6,h=3):(l=7,h=4)}},CC=r=>{let e;for(I4(r,r.dyn_ltree,r.l_desc.max_code),I4(r,r.dyn_dtree,r.d_desc.max_code),Gh(r,r.bl_desc),e=Oh-1;e>=3&&r.bl_tree[C4[e]*2+1]===0;e--);return r.opt_len+=3*(e+1)+5+5+4,e},wC=(r,e,t,i)=>{let s;for(Tr(r,e-257,5),Tr(r,t-1,5),Tr(r,i-4,4),s=0;s<i;s++)Tr(r,r.bl_tree[C4[s]*2+1],3);$4(r,r.dyn_ltree,e-1),$4(r,r.dyn_dtree,t-1)},SC=r=>{let e=4093624447,t;for(t=0;t<=31;t++,e>>>=1)if(e&1&&r.dyn_ltree[t*2]!==0)return g4;if(r.dyn_ltree[9*2]!==0||r.dyn_ltree[10*2]!==0||r.dyn_ltree[13*2]!==0)return v4;for(t=32;t<pn;t++)if(r.dyn_ltree[t*2]!==0)return v4;return g4};let D4=!1;const PC=r=>{D4||(TC(),D4=!0),r.l_desc=new Fh(r.dyn_ltree,w4),r.d_desc=new Fh(r.dyn_dtree,S4),r.bl_desc=new Fh(r.bl_tree,P4),r.bi_buf=0,r.bi_valid=0,A4(r)},N4=(r,e,t,i)=>{Tr(r,(dC<<1)+(i?1:0),3),M4(r),yn(r,t),yn(r,~t),t&&r.pending_buf.set(r.window.subarray(e,e+t),r.pending),r.pending+=t},zC=r=>{Tr(r,m4<<1,3),pi(r,$h,Oi),yC(r)},kC=(r,e,t,i)=>{let s,a,n=0;r.level>0?(r.strm.data_type===fC&&(r.strm.data_type=SC(r)),Gh(r,r.l_desc),Gh(r,r.d_desc),n=CC(r),s=r.opt_len+3+7>>>3,a=r.static_len+3+7>>>3,a<=s&&(s=a)):s=a=t+5,t+4<=s&&e!==-1?N4(r,e,t,i):r.strategy===uC||a===s?(Tr(r,(m4<<1)+(i?1:0),3),O4(r,Oi,vn)):(Tr(r,(cC<<1)+(i?1:0),3),wC(r,r.l_desc.max_code+1,r.d_desc.max_code+1,n+1),O4(r,r.dyn_ltree,r.dyn_dtree)),A4(r),i&&M4(r)},EC=(r,e,t)=>(r.pending_buf[r.sym_buf+r.sym_next++]=e,r.pending_buf[r.sym_buf+r.sym_next++]=e>>8,r.pending_buf[r.sym_buf+r.sym_next++]=t,e===0?r.dyn_ltree[t*2]++:(r.matches++,e--,r.dyn_ltree[(bn[t]+pn+1)*2]++,r.dyn_dtree[z4(e)*2]++),r.sym_next===r.sym_end);var AC=PC,MC=N4,RC=kC,OC=EC,IC=zC,$C={_tr_init:AC,_tr_stored_block:MC,_tr_flush_block:RC,_tr_tally:OC,_tr_align:IC},_n=(r,e,t,i)=>{let s=r&65535|0,a=r>>>16&65535|0,n=0;for(;t!==0;){n=t>2e3?2e3:t,t-=n;do s=s+e[i++]|0,a=a+s|0;while(--n);s%=65521,a%=65521}return s|a<<16|0};const DC=()=>{let r,e=[];for(var t=0;t<256;t++){r=t;for(var i=0;i<8;i++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e},NC=new Uint32Array(DC());var xt=(r,e,t,i)=>{const s=NC,a=i+t;r^=-1;for(let n=i;n<a;n++)r=r>>>8^s[(r^e[n])&255];return r^-1},Os={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Is={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:LC,_tr_stored_block:jh,_tr_flush_block:FC,_tr_tally:ss,_tr_align:UC}=$C,{Z_NO_FLUSH:as,Z_PARTIAL_FLUSH:GC,Z_FULL_FLUSH:jC,Z_FINISH:jr,Z_BLOCK:L4,Z_OK:ar,Z_STREAM_END:F4,Z_STREAM_ERROR:gi,Z_DATA_ERROR:BC,Z_BUF_ERROR:Bh,Z_DEFAULT_COMPRESSION:VC,Z_FILTERED:HC,Z_HUFFMAN_ONLY:Rl,Z_RLE:WC,Z_FIXED:qC,Z_DEFAULT_STRATEGY:YC,Z_UNKNOWN:XC,Z_DEFLATED:Ol}=Is,KC=9,ZC=15,JC=8,QC=29,Vh=256+1+QC,xC=30,ew=19,tw=2*Vh+1,rw=15,nt=3,ns=258,vi=ns+nt+1,iw=32,ca=42,Hh=57,Wh=69,qh=73,Yh=91,Xh=103,$s=113,Tn=666,vr=1,pa=2,Ds=3,ga=4,sw=3,Ns=(r,e)=>(r.msg=Os[e],e),U4=r=>r*2-(r>4?9:0),os=r=>{let e=r.length;for(;--e>=0;)r[e]=0},aw=r=>{let e,t,i,s=r.w_size;e=r.hash_size,i=e;do t=r.head[--i],r.head[i]=t>=s?t-s:0;while(--e);e=s,i=e;do t=r.prev[--i],r.prev[i]=t>=s?t-s:0;while(--e)};let ls=(r,e,t)=>(e<<r.hash_shift^t)&r.hash_mask;const Ar=r=>{const e=r.state;let t=e.pending;t>r.avail_out&&(t=r.avail_out),t!==0&&(r.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+t),r.next_out),r.next_out+=t,e.pending_out+=t,r.total_out+=t,r.avail_out-=t,e.pending-=t,e.pending===0&&(e.pending_out=0))},Mr=(r,e)=>{FC(r,r.block_start>=0?r.block_start:-1,r.strstart-r.block_start,e),r.block_start=r.strstart,Ar(r.strm)},pt=(r,e)=>{r.pending_buf[r.pending++]=e},Cn=(r,e)=>{r.pending_buf[r.pending++]=e>>>8&255,r.pending_buf[r.pending++]=e&255},Kh=(r,e,t,i)=>{let s=r.avail_in;return s>i&&(s=i),s===0?0:(r.avail_in-=s,e.set(r.input.subarray(r.next_in,r.next_in+s),t),r.state.wrap===1?r.adler=_n(r.adler,e,s,t):r.state.wrap===2&&(r.adler=xt(r.adler,e,s,t)),r.next_in+=s,r.total_in+=s,s)},G4=(r,e)=>{let t=r.max_chain_length,i=r.strstart,s,a,n=r.prev_length,o=r.nice_match;const l=r.strstart>r.w_size-vi?r.strstart-(r.w_size-vi):0,h=r.window,u=r.w_mask,d=r.prev,c=r.strstart+ns;let f=h[i+n-1],p=h[i+n];r.prev_length>=r.good_match&&(t>>=2),o>r.lookahead&&(o=r.lookahead);do if(s=e,!(h[s+n]!==p||h[s+n-1]!==f||h[s]!==h[i]||h[++s]!==h[i+1])){i+=2,s++;do;while(h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&h[++i]===h[++s]&&i<c);if(a=ns-(c-i),i=c-ns,a>n){if(r.match_start=e,n=a,a>=o)break;f=h[i+n-1],p=h[i+n]}}while((e=d[e&u])>l&&--t!==0);return n<=r.lookahead?n:r.lookahead},va=r=>{const e=r.w_size;let t,i,s;do{if(i=r.window_size-r.lookahead-r.strstart,r.strstart>=e+(e-vi)&&(r.window.set(r.window.subarray(e,e+e-i),0),r.match_start-=e,r.strstart-=e,r.block_start-=e,r.insert>r.strstart&&(r.insert=r.strstart),aw(r),i+=e),r.strm.avail_in===0)break;if(t=Kh(r.strm,r.window,r.strstart+r.lookahead,i),r.lookahead+=t,r.lookahead+r.insert>=nt)for(s=r.strstart-r.insert,r.ins_h=r.window[s],r.ins_h=ls(r,r.ins_h,r.window[s+1]);r.insert&&(r.ins_h=ls(r,r.ins_h,r.window[s+nt-1]),r.prev[s&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=s,s++,r.insert--,!(r.lookahead+r.insert<nt)););}while(r.lookahead<vi&&r.strm.avail_in!==0)},j4=(r,e)=>{let t=r.pending_buf_size-5>r.w_size?r.w_size:r.pending_buf_size-5,i,s,a,n=0,o=r.strm.avail_in;do{if(i=65535,a=r.bi_valid+42>>3,r.strm.avail_out<a||(a=r.strm.avail_out-a,s=r.strstart-r.block_start,i>s+r.strm.avail_in&&(i=s+r.strm.avail_in),i>a&&(i=a),i<t&&(i===0&&e!==jr||e===as||i!==s+r.strm.avail_in)))break;n=e===jr&&i===s+r.strm.avail_in?1:0,jh(r,0,0,n),r.pending_buf[r.pending-4]=i,r.pending_buf[r.pending-3]=i>>8,r.pending_buf[r.pending-2]=~i,r.pending_buf[r.pending-1]=~i>>8,Ar(r.strm),s&&(s>i&&(s=i),r.strm.output.set(r.window.subarray(r.block_start,r.block_start+s),r.strm.next_out),r.strm.next_out+=s,r.strm.avail_out-=s,r.strm.total_out+=s,r.block_start+=s,i-=s),i&&(Kh(r.strm,r.strm.output,r.strm.next_out,i),r.strm.next_out+=i,r.strm.avail_out-=i,r.strm.total_out+=i)}while(n===0);return o-=r.strm.avail_in,o&&(o>=r.w_size?(r.matches=2,r.window.set(r.strm.input.subarray(r.strm.next_in-r.w_size,r.strm.next_in),0),r.strstart=r.w_size,r.insert=r.strstart):(r.window_size-r.strstart<=o&&(r.strstart-=r.w_size,r.window.set(r.window.subarray(r.w_size,r.w_size+r.strstart),0),r.matches<2&&r.matches++,r.insert>r.strstart&&(r.insert=r.strstart)),r.window.set(r.strm.input.subarray(r.strm.next_in-o,r.strm.next_in),r.strstart),r.strstart+=o,r.insert+=o>r.w_size-r.insert?r.w_size-r.insert:o),r.block_start=r.strstart),r.high_water<r.strstart&&(r.high_water=r.strstart),n?ga:e!==as&&e!==jr&&r.strm.avail_in===0&&r.strstart===r.block_start?pa:(a=r.window_size-r.strstart,r.strm.avail_in>a&&r.block_start>=r.w_size&&(r.block_start-=r.w_size,r.strstart-=r.w_size,r.window.set(r.window.subarray(r.w_size,r.w_size+r.strstart),0),r.matches<2&&r.matches++,a+=r.w_size,r.insert>r.strstart&&(r.insert=r.strstart)),a>r.strm.avail_in&&(a=r.strm.avail_in),a&&(Kh(r.strm,r.window,r.strstart,a),r.strstart+=a,r.insert+=a>r.w_size-r.insert?r.w_size-r.insert:a),r.high_water<r.strstart&&(r.high_water=r.strstart),a=r.bi_valid+42>>3,a=r.pending_buf_size-a>65535?65535:r.pending_buf_size-a,t=a>r.w_size?r.w_size:a,s=r.strstart-r.block_start,(s>=t||(s||e===jr)&&e!==as&&r.strm.avail_in===0&&s<=a)&&(i=s>a?a:s,n=e===jr&&r.strm.avail_in===0&&i===s?1:0,jh(r,r.block_start,i,n),r.block_start+=i,Ar(r.strm)),n?Ds:vr)},Zh=(r,e)=>{let t,i;for(;;){if(r.lookahead<vi){if(va(r),r.lookahead<vi&&e===as)return vr;if(r.lookahead===0)break}if(t=0,r.lookahead>=nt&&(r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart),t!==0&&r.strstart-t<=r.w_size-vi&&(r.match_length=G4(r,t)),r.match_length>=nt)if(i=ss(r,r.strstart-r.match_start,r.match_length-nt),r.lookahead-=r.match_length,r.match_length<=r.max_lazy_match&&r.lookahead>=nt){r.match_length--;do r.strstart++,r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart;while(--r.match_length!==0);r.strstart++}else r.strstart+=r.match_length,r.match_length=0,r.ins_h=r.window[r.strstart],r.ins_h=ls(r,r.ins_h,r.window[r.strstart+1]);else i=ss(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++;if(i&&(Mr(r,!1),r.strm.avail_out===0))return vr}return r.insert=r.strstart<nt-1?r.strstart:nt-1,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa},ma=(r,e)=>{let t,i,s;for(;;){if(r.lookahead<vi){if(va(r),r.lookahead<vi&&e===as)return vr;if(r.lookahead===0)break}if(t=0,r.lookahead>=nt&&(r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart),r.prev_length=r.match_length,r.prev_match=r.match_start,r.match_length=nt-1,t!==0&&r.prev_length<r.max_lazy_match&&r.strstart-t<=r.w_size-vi&&(r.match_length=G4(r,t),r.match_length<=5&&(r.strategy===HC||r.match_length===nt&&r.strstart-r.match_start>4096)&&(r.match_length=nt-1)),r.prev_length>=nt&&r.match_length<=r.prev_length){s=r.strstart+r.lookahead-nt,i=ss(r,r.strstart-1-r.prev_match,r.prev_length-nt),r.lookahead-=r.prev_length-1,r.prev_length-=2;do++r.strstart<=s&&(r.ins_h=ls(r,r.ins_h,r.window[r.strstart+nt-1]),t=r.prev[r.strstart&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=r.strstart);while(--r.prev_length!==0);if(r.match_available=0,r.match_length=nt-1,r.strstart++,i&&(Mr(r,!1),r.strm.avail_out===0))return vr}else if(r.match_available){if(i=ss(r,0,r.window[r.strstart-1]),i&&Mr(r,!1),r.strstart++,r.lookahead--,r.strm.avail_out===0)return vr}else r.match_available=1,r.strstart++,r.lookahead--}return r.match_available&&(i=ss(r,0,r.window[r.strstart-1]),r.match_available=0),r.insert=r.strstart<nt-1?r.strstart:nt-1,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa},nw=(r,e)=>{let t,i,s,a;const n=r.window;for(;;){if(r.lookahead<=ns){if(va(r),r.lookahead<=ns&&e===as)return vr;if(r.lookahead===0)break}if(r.match_length=0,r.lookahead>=nt&&r.strstart>0&&(s=r.strstart-1,i=n[s],i===n[++s]&&i===n[++s]&&i===n[++s])){a=r.strstart+ns;do;while(i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&i===n[++s]&&s<a);r.match_length=ns-(a-s),r.match_length>r.lookahead&&(r.match_length=r.lookahead)}if(r.match_length>=nt?(t=ss(r,1,r.match_length-nt),r.lookahead-=r.match_length,r.strstart+=r.match_length,r.match_length=0):(t=ss(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++),t&&(Mr(r,!1),r.strm.avail_out===0))return vr}return r.insert=0,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa},ow=(r,e)=>{let t;for(;;){if(r.lookahead===0&&(va(r),r.lookahead===0)){if(e===as)return vr;break}if(r.match_length=0,t=ss(r,0,r.window[r.strstart]),r.lookahead--,r.strstart++,t&&(Mr(r,!1),r.strm.avail_out===0))return vr}return r.insert=0,e===jr?(Mr(r,!0),r.strm.avail_out===0?Ds:ga):r.sym_next&&(Mr(r,!1),r.strm.avail_out===0)?vr:pa};function mi(r,e,t,i,s){this.good_length=r,this.max_lazy=e,this.nice_length=t,this.max_chain=i,this.func=s}const wn=[new mi(0,0,0,0,j4),new mi(4,4,8,4,Zh),new mi(4,5,16,8,Zh),new mi(4,6,32,32,Zh),new mi(4,4,16,16,ma),new mi(8,16,32,32,ma),new mi(8,16,128,128,ma),new mi(8,32,128,256,ma),new mi(32,128,258,1024,ma),new mi(32,258,258,4096,ma)],lw=r=>{r.window_size=2*r.w_size,os(r.head),r.max_lazy_match=wn[r.level].max_lazy,r.good_match=wn[r.level].good_length,r.nice_match=wn[r.level].nice_length,r.max_chain_length=wn[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=nt-1,r.match_available=0,r.ins_h=0};function hw(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ol,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(tw*2),this.dyn_dtree=new Uint16Array((2*xC+1)*2),this.bl_tree=new Uint16Array((2*ew+1)*2),os(this.dyn_ltree),os(this.dyn_dtree),os(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(rw+1),this.heap=new Uint16Array(2*Vh+1),os(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Vh+1),os(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Sn=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.status!==ca&&e.status!==Hh&&e.status!==Wh&&e.status!==qh&&e.status!==Yh&&e.status!==Xh&&e.status!==$s&&e.status!==Tn?1:0},B4=r=>{if(Sn(r))return Ns(r,gi);r.total_in=r.total_out=0,r.data_type=XC;const e=r.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?Hh:e.wrap?ca:$s,r.adler=e.wrap===2?0:1,e.last_flush=-2,LC(e),ar},V4=r=>{const e=B4(r);return e===ar&&lw(r.state),e},uw=(r,e)=>Sn(r)||r.state.wrap!==2?gi:(r.state.gzhead=e,ar),H4=(r,e,t,i,s,a)=>{if(!r)return gi;let n=1;if(e===VC&&(e=6),i<0?(n=0,i=-i):i>15&&(n=2,i-=16),s<1||s>KC||t!==Ol||i<8||i>15||e<0||e>9||a<0||a>qC||i===8&&n!==1)return Ns(r,gi);i===8&&(i=9);const o=new hw;return r.state=o,o.strm=r,o.status=ca,o.wrap=n,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=s+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+nt-1)/nt),o.window=new Uint8Array(o.w_size*2),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<s+6,o.pending_buf_size=o.lit_bufsize*4,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=(o.lit_bufsize-1)*3,o.level=e,o.strategy=a,o.method=t,V4(r)},fw=(r,e)=>H4(r,e,Ol,ZC,JC,YC),dw=(r,e)=>{if(Sn(r)||e>L4||e<0)return r?Ns(r,gi):gi;const t=r.state;if(!r.output||r.avail_in!==0&&!r.input||t.status===Tn&&e!==jr)return Ns(r,r.avail_out===0?Bh:gi);const i=t.last_flush;if(t.last_flush=e,t.pending!==0){if(Ar(r),r.avail_out===0)return t.last_flush=-1,ar}else if(r.avail_in===0&&U4(e)<=U4(i)&&e!==jr)return Ns(r,Bh);if(t.status===Tn&&r.avail_in!==0)return Ns(r,Bh);if(t.status===ca&&t.wrap===0&&(t.status=$s),t.status===ca){let s=Ol+(t.w_bits-8<<4)<<8,a=-1;if(t.strategy>=Rl||t.level<2?a=0:t.level<6?a=1:t.level===6?a=2:a=3,s|=a<<6,t.strstart!==0&&(s|=iw),s+=31-s%31,Cn(t,s),t.strstart!==0&&(Cn(t,r.adler>>>16),Cn(t,r.adler&65535)),r.adler=1,t.status=$s,Ar(r),t.pending!==0)return t.last_flush=-1,ar}if(t.status===Hh){if(r.adler=0,pt(t,31),pt(t,139),pt(t,8),t.gzhead)pt(t,(t.gzhead.text?1:0)+(t.gzhead.hcrc?2:0)+(t.gzhead.extra?4:0)+(t.gzhead.name?8:0)+(t.gzhead.comment?16:0)),pt(t,t.gzhead.time&255),pt(t,t.gzhead.time>>8&255),pt(t,t.gzhead.time>>16&255),pt(t,t.gzhead.time>>24&255),pt(t,t.level===9?2:t.strategy>=Rl||t.level<2?4:0),pt(t,t.gzhead.os&255),t.gzhead.extra&&t.gzhead.extra.length&&(pt(t,t.gzhead.extra.length&255),pt(t,t.gzhead.extra.length>>8&255)),t.gzhead.hcrc&&(r.adler=xt(r.adler,t.pending_buf,t.pending,0)),t.gzindex=0,t.status=Wh;else if(pt(t,0),pt(t,0),pt(t,0),pt(t,0),pt(t,0),pt(t,t.level===9?2:t.strategy>=Rl||t.level<2?4:0),pt(t,sw),t.status=$s,Ar(r),t.pending!==0)return t.last_flush=-1,ar}if(t.status===Wh){if(t.gzhead.extra){let s=t.pending,a=(t.gzhead.extra.length&65535)-t.gzindex;for(;t.pending+a>t.pending_buf_size;){let o=t.pending_buf_size-t.pending;if(t.pending_buf.set(t.gzhead.extra.subarray(t.gzindex,t.gzindex+o),t.pending),t.pending=t.pending_buf_size,t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),t.gzindex+=o,Ar(r),t.pending!==0)return t.last_flush=-1,ar;s=0,a-=o}let n=new Uint8Array(t.gzhead.extra);t.pending_buf.set(n.subarray(t.gzindex,t.gzindex+a),t.pending),t.pending+=a,t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),t.gzindex=0}t.status=qh}if(t.status===qh){if(t.gzhead.name){let s=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),Ar(r),t.pending!==0)return t.last_flush=-1,ar;s=0}t.gzindex<t.gzhead.name.length?a=t.gzhead.name.charCodeAt(t.gzindex++)&255:a=0,pt(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),t.gzindex=0}t.status=Yh}if(t.status===Yh){if(t.gzhead.comment){let s=t.pending,a;do{if(t.pending===t.pending_buf_size){if(t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s)),Ar(r),t.pending!==0)return t.last_flush=-1,ar;s=0}t.gzindex<t.gzhead.comment.length?a=t.gzhead.comment.charCodeAt(t.gzindex++)&255:a=0,pt(t,a)}while(a!==0);t.gzhead.hcrc&&t.pending>s&&(r.adler=xt(r.adler,t.pending_buf,t.pending-s,s))}t.status=Xh}if(t.status===Xh){if(t.gzhead.hcrc){if(t.pending+2>t.pending_buf_size&&(Ar(r),t.pending!==0))return t.last_flush=-1,ar;pt(t,r.adler&255),pt(t,r.adler>>8&255),r.adler=0}if(t.status=$s,Ar(r),t.pending!==0)return t.last_flush=-1,ar}if(r.avail_in!==0||t.lookahead!==0||e!==as&&t.status!==Tn){let s=t.level===0?j4(t,e):t.strategy===Rl?ow(t,e):t.strategy===WC?nw(t,e):wn[t.level].func(t,e);if((s===Ds||s===ga)&&(t.status=Tn),s===vr||s===Ds)return r.avail_out===0&&(t.last_flush=-1),ar;if(s===pa&&(e===GC?UC(t):e!==L4&&(jh(t,0,0,!1),e===jC&&(os(t.head),t.lookahead===0&&(t.strstart=0,t.block_start=0,t.insert=0))),Ar(r),r.avail_out===0))return t.last_flush=-1,ar}return e!==jr?ar:t.wrap<=0?F4:(t.wrap===2?(pt(t,r.adler&255),pt(t,r.adler>>8&255),pt(t,r.adler>>16&255),pt(t,r.adler>>24&255),pt(t,r.total_in&255),pt(t,r.total_in>>8&255),pt(t,r.total_in>>16&255),pt(t,r.total_in>>24&255)):(Cn(t,r.adler>>>16),Cn(t,r.adler&65535)),Ar(r),t.wrap>0&&(t.wrap=-t.wrap),t.pending!==0?ar:F4)},cw=r=>{if(Sn(r))return gi;const e=r.state.status;return r.state=null,e===$s?Ns(r,BC):ar},pw=(r,e)=>{let t=e.length;if(Sn(r))return gi;const i=r.state,s=i.wrap;if(s===2||s===1&&i.status!==ca||i.lookahead)return gi;if(s===1&&(r.adler=_n(r.adler,e,t,0)),i.wrap=0,t>=i.w_size){s===0&&(os(i.head),i.strstart=0,i.block_start=0,i.insert=0);let l=new Uint8Array(i.w_size);l.set(e.subarray(t-i.w_size,t),0),e=l,t=i.w_size}const a=r.avail_in,n=r.next_in,o=r.input;for(r.avail_in=t,r.next_in=0,r.input=e,va(i);i.lookahead>=nt;){let l=i.strstart,h=i.lookahead-(nt-1);do i.ins_h=ls(i,i.ins_h,i.window[l+nt-1]),i.prev[l&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=l,l++;while(--h);i.strstart=l,i.lookahead=nt-1,va(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=nt-1,i.match_available=0,r.next_in=n,r.input=o,r.avail_in=a,i.wrap=s,ar};var gw=fw,vw=H4,mw=V4,bw=B4,yw=uw,_w=dw,Tw=cw,Cw=pw,ww="pako deflate (from Nodeca project)",Pn={deflateInit:gw,deflateInit2:vw,deflateReset:mw,deflateResetKeep:bw,deflateSetHeader:yw,deflate:_w,deflateEnd:Tw,deflateSetDictionary:Cw,deflateInfo:ww};const Sw=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var Pw=function(r){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)Sw(t,i)&&(r[i]=t[i])}}return r},zw=r=>{let e=0;for(let i=0,s=r.length;i<s;i++)e+=r[i].length;const t=new Uint8Array(e);for(let i=0,s=0,a=r.length;i<a;i++){let n=r[i];t.set(n,s),s+=n.length}return t},Il={assign:Pw,flattenChunks:zw};let W4=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{W4=!1}const zn=new Uint8Array(256);for(let r=0;r<256;r++)zn[r]=r>=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;zn[254]=zn[254]=1;var kw=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let e,t,i,s,a,n=r.length,o=0;for(s=0;s<n;s++)t=r.charCodeAt(s),(t&64512)===55296&&s+1<n&&(i=r.charCodeAt(s+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),s++)),o+=t<128?1:t<2048?2:t<65536?3:4;for(e=new Uint8Array(o),a=0,s=0;a<o;s++)t=r.charCodeAt(s),(t&64512)===55296&&s+1<n&&(i=r.charCodeAt(s+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),s++)),t<128?e[a++]=t:t<2048?(e[a++]=192|t>>>6,e[a++]=128|t&63):t<65536?(e[a++]=224|t>>>12,e[a++]=128|t>>>6&63,e[a++]=128|t&63):(e[a++]=240|t>>>18,e[a++]=128|t>>>12&63,e[a++]=128|t>>>6&63,e[a++]=128|t&63);return e};const Ew=(r,e)=>{if(e<65534&&r.subarray&&W4)return String.fromCharCode.apply(null,r.length===e?r:r.subarray(0,e));let t="";for(let i=0;i<e;i++)t+=String.fromCharCode(r[i]);return t};var Aw=(r,e)=>{const t=e||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,e));let i,s;const a=new Array(t*2);for(s=0,i=0;i<t;){let n=r[i++];if(n<128){a[s++]=n;continue}let o=zn[n];if(o>4){a[s++]=65533,i+=o-1;continue}for(n&=o===2?31:o===3?15:7;o>1&&i<t;)n=n<<6|r[i++]&63,o--;if(o>1){a[s++]=65533;continue}n<65536?a[s++]=n:(n-=65536,a[s++]=55296|n>>10&1023,a[s++]=56320|n&1023)}return Ew(a,s)},Mw=(r,e)=>{e=e||r.length,e>r.length&&(e=r.length);let t=e-1;for(;t>=0&&(r[t]&192)===128;)t--;return t<0||t===0?e:t+zn[r[t]]>e?t:e},kn={string2buf:kw,buf2string:Aw,utf8border:Mw};function Rw(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var q4=Rw;const Y4=Object.prototype.toString,{Z_NO_FLUSH:Ow,Z_SYNC_FLUSH:Iw,Z_FULL_FLUSH:$w,Z_FINISH:Dw,Z_OK:$l,Z_STREAM_END:Nw,Z_DEFAULT_COMPRESSION:Lw,Z_DEFAULT_STRATEGY:Fw,Z_DEFLATED:Uw}=Is;function En(r){this.options=Il.assign({level:Lw,method:Uw,chunkSize:16384,windowBits:15,memLevel:8,strategy:Fw},r||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new q4,this.strm.avail_out=0;let t=Pn.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(t!==$l)throw new Error(Os[t]);if(e.header&&Pn.deflateSetHeader(this.strm,e.header),e.dictionary){let i;if(typeof e.dictionary=="string"?i=kn.string2buf(e.dictionary):Y4.call(e.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(e.dictionary):i=e.dictionary,t=Pn.deflateSetDictionary(this.strm,i),t!==$l)throw new Error(Os[t]);this._dict_set=!0}}En.prototype.push=function(r,e){const t=this.strm,i=this.options.chunkSize;let s,a;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?Dw:Ow,typeof r=="string"?t.input=kn.string2buf(r):Y4.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){if(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),(a===Iw||a===$w)&&t.avail_out<=6){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(s=Pn.deflate(t,a),s===Nw)return t.next_out>0&&this.onData(t.output.subarray(0,t.next_out)),s=Pn.deflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===$l;if(t.avail_out===0){this.onData(t.output);continue}if(a>0&&t.next_out>0){this.onData(t.output.subarray(0,t.next_out)),t.avail_out=0;continue}if(t.avail_in===0)break}return!0},En.prototype.onData=function(r){this.chunks.push(r)},En.prototype.onEnd=function(r){r===$l&&(this.result=Il.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function Jh(r,e){const t=new En(e);if(t.push(r,!0),t.err)throw t.msg||Os[t.err];return t.result}function Gw(r,e){return e=e||{},e.raw=!0,Jh(r,e)}function jw(r,e){return e=e||{},e.gzip=!0,Jh(r,e)}var Bw=En,Vw=Jh,Hw=Gw,Ww=jw,qw=Is,Yw={Deflate:Bw,deflate:Vw,deflateRaw:Hw,gzip:Ww,constants:qw};const Dl=16209,Xw=16191;var Kw=function(e,t){let i,s,a,n,o,l,h,u,d,c,f,p,g,y,_,T,m,w,O,k,I,$,G,U;const V=e.state;i=e.next_in,G=e.input,s=i+(e.avail_in-5),a=e.next_out,U=e.output,n=a-(t-e.avail_out),o=a+(e.avail_out-257),l=V.dmax,h=V.wsize,u=V.whave,d=V.wnext,c=V.window,f=V.hold,p=V.bits,g=V.lencode,y=V.distcode,_=(1<<V.lenbits)-1,T=(1<<V.distbits)-1;e:do{p<15&&(f+=G[i++]<<p,p+=8,f+=G[i++]<<p,p+=8),m=g[f&_];t:for(;;){if(w=m>>>24,f>>>=w,p-=w,w=m>>>16&255,w===0)U[a++]=m&65535;else if(w&16){O=m&65535,w&=15,w&&(p<w&&(f+=G[i++]<<p,p+=8),O+=f&(1<<w)-1,f>>>=w,p-=w),p<15&&(f+=G[i++]<<p,p+=8,f+=G[i++]<<p,p+=8),m=y[f&T];r:for(;;){if(w=m>>>24,f>>>=w,p-=w,w=m>>>16&255,w&16){if(k=m&65535,w&=15,p<w&&(f+=G[i++]<<p,p+=8,p<w&&(f+=G[i++]<<p,p+=8)),k+=f&(1<<w)-1,k>l){e.msg="invalid distance too far back",V.mode=Dl;break e}if(f>>>=w,p-=w,w=a-n,k>w){if(w=k-w,w>u&&V.sane){e.msg="invalid distance too far back",V.mode=Dl;break e}if(I=0,$=c,d===0){if(I+=h-w,w<O){O-=w;do U[a++]=c[I++];while(--w);I=a-k,$=U}}else if(d<w){if(I+=h+d-w,w-=d,w<O){O-=w;do U[a++]=c[I++];while(--w);if(I=0,d<O){w=d,O-=w;do U[a++]=c[I++];while(--w);I=a-k,$=U}}}else if(I+=d-w,w<O){O-=w;do U[a++]=c[I++];while(--w);I=a-k,$=U}for(;O>2;)U[a++]=$[I++],U[a++]=$[I++],U[a++]=$[I++],O-=3;O&&(U[a++]=$[I++],O>1&&(U[a++]=$[I++]))}else{I=a-k;do U[a++]=U[I++],U[a++]=U[I++],U[a++]=U[I++],O-=3;while(O>2);O&&(U[a++]=U[I++],O>1&&(U[a++]=U[I++]))}}else if(w&64){e.msg="invalid distance code",V.mode=Dl;break e}else{m=y[(m&65535)+(f&(1<<w)-1)];continue r}break}}else if(w&64)if(w&32){V.mode=Xw;break e}else{e.msg="invalid literal/length code",V.mode=Dl;break e}else{m=g[(m&65535)+(f&(1<<w)-1)];continue t}break}}while(i<s&&a<o);O=p>>3,i-=O,p-=O<<3,f&=(1<<p)-1,e.next_in=i,e.next_out=a,e.avail_in=i<s?5+(s-i):5-(i-s),e.avail_out=a<o?257+(o-a):257-(a-o),V.hold=f,V.bits=p};const ba=15,X4=852,K4=592,Z4=0,Qh=1,J4=2,Zw=new Uint16Array([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]),Jw=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Qw=new Uint16Array([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,0,0]),xw=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var An=(r,e,t,i,s,a,n,o)=>{const l=o.bits;let h=0,u=0,d=0,c=0,f=0,p=0,g=0,y=0,_=0,T=0,m,w,O,k,I,$=null,G;const U=new Uint16Array(ba+1),V=new Uint16Array(ba+1);let X=null,te,ee,oe;for(h=0;h<=ba;h++)U[h]=0;for(u=0;u<i;u++)U[e[t+u]]++;for(f=l,c=ba;c>=1&&U[c]===0;c--);if(f>c&&(f=c),c===0)return s[a++]=1<<24|64<<16|0,s[a++]=1<<24|64<<16|0,o.bits=1,0;for(d=1;d<c&&U[d]===0;d++);for(f<d&&(f=d),y=1,h=1;h<=ba;h++)if(y<<=1,y-=U[h],y<0)return-1;if(y>0&&(r===Z4||c!==1))return-1;for(V[1]=0,h=1;h<ba;h++)V[h+1]=V[h]+U[h];for(u=0;u<i;u++)e[t+u]!==0&&(n[V[e[t+u]]++]=u);if(r===Z4?($=X=n,G=20):r===Qh?($=Zw,X=Jw,G=257):($=Qw,X=xw,G=0),T=0,u=0,h=d,I=a,p=f,g=0,O=-1,_=1<<f,k=_-1,r===Qh&&_>X4||r===J4&&_>K4)return 1;for(;;){te=h-g,n[u]+1<G?(ee=0,oe=n[u]):n[u]>=G?(ee=X[n[u]-G],oe=$[n[u]-G]):(ee=32+64,oe=0),m=1<<h-g,w=1<<p,d=w;do w-=m,s[I+(T>>g)+w]=te<<24|ee<<16|oe|0;while(w!==0);for(m=1<<h-1;T&m;)m>>=1;if(m!==0?(T&=m-1,T+=m):T=0,u++,--U[h]===0){if(h===c)break;h=e[t+n[u]]}if(h>f&&(T&k)!==O){for(g===0&&(g=f),I+=d,p=h-g,y=1<<p;p+g<c&&(y-=U[p+g],!(y<=0));)p++,y<<=1;if(_+=1<<p,r===Qh&&_>X4||r===J4&&_>K4)return 1;O=T&k,s[O]=f<<24|p<<16|I-a|0}}return T!==0&&(s[I+T]=h-g<<24|64<<16|0),o.bits=f,0};const eS=0,Q4=1,x4=2,{Z_FINISH:ep,Z_BLOCK:tS,Z_TREES:Nl,Z_OK:Ls,Z_STREAM_END:rS,Z_NEED_DICT:iS,Z_STREAM_ERROR:Br,Z_DATA_ERROR:tp,Z_MEM_ERROR:rp,Z_BUF_ERROR:sS,Z_DEFLATED:ip}=Is,Ll=16180,sp=16181,np=16182,op=16183,lp=16184,hp=16185,up=16186,fp=16187,dp=16188,cp=16189,Fl=16190,Ii=16191,xh=16192,pp=16193,eu=16194,gp=16195,vp=16196,mp=16197,bp=16198,Ul=16199,Gl=16200,yp=16201,_p=16202,Tp=16203,Cp=16204,wp=16205,tu=16206,Sp=16207,Pp=16208,At=16209,zp=16210,kp=16211,aS=852,nS=592,oS=15,Ep=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function lS(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Fs=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.mode<Ll||e.mode>kp?1:0},Ap=r=>{if(Fs(r))return Br;const e=r.state;return r.total_in=r.total_out=e.total=0,r.msg="",e.wrap&&(r.adler=e.wrap&1),e.mode=Ll,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(aS),e.distcode=e.distdyn=new Int32Array(nS),e.sane=1,e.back=-1,Ls},Mp=r=>{if(Fs(r))return Br;const e=r.state;return e.wsize=0,e.whave=0,e.wnext=0,Ap(r)},Rp=(r,e)=>{let t;if(Fs(r))return Br;const i=r.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Br:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,Mp(r))},Op=(r,e)=>{if(!r)return Br;const t=new lS;r.state=t,t.strm=r,t.window=null,t.mode=Ll;const i=Rp(r,e);return i!==Ls&&(r.state=null),i},hS=r=>Op(r,oS);let Ip=!0,ru,iu;const uS=r=>{if(Ip){ru=new Int32Array(512),iu=new Int32Array(32);let e=0;for(;e<144;)r.lens[e++]=8;for(;e<256;)r.lens[e++]=9;for(;e<280;)r.lens[e++]=7;for(;e<288;)r.lens[e++]=8;for(An(Q4,r.lens,0,288,ru,0,r.work,{bits:9}),e=0;e<32;)r.lens[e++]=5;An(x4,r.lens,0,32,iu,0,r.work,{bits:5}),Ip=!1}r.lencode=ru,r.lenbits=9,r.distcode=iu,r.distbits=5},$p=(r,e,t,i)=>{let s;const a=r.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),i>=a.wsize?(a.window.set(e.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(s=a.wsize-a.wnext,s>i&&(s=i),a.window.set(e.subarray(t-i,t-i+s),a.wnext),i-=s,i?(a.window.set(e.subarray(t-i,t),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=s))),0},fS=(r,e)=>{let t,i,s,a,n,o,l,h,u,d,c,f,p,g,y=0,_,T,m,w,O,k,I,$;const G=new Uint8Array(4);let U,V;const X=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Fs(r)||!r.output||!r.input&&r.avail_in!==0)return Br;t=r.state,t.mode===Ii&&(t.mode=xh),n=r.next_out,s=r.output,l=r.avail_out,a=r.next_in,i=r.input,o=r.avail_in,h=t.hold,u=t.bits,d=o,c=l,$=Ls;e:for(;;)switch(t.mode){case Ll:if(t.wrap===0){t.mode=xh;break}for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.wrap&2&&h===35615){t.wbits===0&&(t.wbits=15),t.check=0,G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0),h=0,u=0,t.mode=sp;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((h&255)<<8)+(h>>8))%31){r.msg="incorrect header check",t.mode=At;break}if((h&15)!==ip){r.msg="unknown compression method",t.mode=At;break}if(h>>>=4,u-=4,I=(h&15)+8,t.wbits===0&&(t.wbits=I),I>15||I>t.wbits){r.msg="invalid window size",t.mode=At;break}t.dmax=1<<t.wbits,t.flags=0,r.adler=t.check=1,t.mode=h&512?cp:Ii,h=0,u=0;break;case sp:for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.flags=h,(t.flags&255)!==ip){r.msg="unknown compression method",t.mode=At;break}if(t.flags&57344){r.msg="unknown header flags set",t.mode=At;break}t.head&&(t.head.text=h>>8&1),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0)),h=0,u=0,t.mode=np;case np:for(;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.head&&(t.head.time=h),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,G[2]=h>>>16&255,G[3]=h>>>24&255,t.check=xt(t.check,G,4,0)),h=0,u=0,t.mode=op;case op:for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.head&&(t.head.xflags=h&255,t.head.os=h>>8),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0)),h=0,u=0,t.mode=lp;case lp:if(t.flags&1024){for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.length=h,t.head&&(t.head.extra_len=h),t.flags&512&&t.wrap&4&&(G[0]=h&255,G[1]=h>>>8&255,t.check=xt(t.check,G,2,0)),h=0,u=0}else t.head&&(t.head.extra=null);t.mode=hp;case hp:if(t.flags&1024&&(f=t.length,f>o&&(f=o),f&&(t.head&&(I=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(a,a+f),I)),t.flags&512&&t.wrap&4&&(t.check=xt(t.check,i,f,a)),o-=f,a+=f,t.length-=f),t.length))break e;t.length=0,t.mode=up;case up:if(t.flags&2048){if(o===0)break e;f=0;do I=i[a+f++],t.head&&I&&t.length<65536&&(t.head.name+=String.fromCharCode(I));while(I&&f<o);if(t.flags&512&&t.wrap&4&&(t.check=xt(t.check,i,f,a)),o-=f,a+=f,I)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=fp;case fp:if(t.flags&4096){if(o===0)break e;f=0;do I=i[a+f++],t.head&&I&&t.length<65536&&(t.head.comment+=String.fromCharCode(I));while(I&&f<o);if(t.flags&512&&t.wrap&4&&(t.check=xt(t.check,i,f,a)),o-=f,a+=f,I)break e}else t.head&&(t.head.comment=null);t.mode=dp;case dp:if(t.flags&512){for(;u<16;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.wrap&4&&h!==(t.check&65535)){r.msg="header crc mismatch",t.mode=At;break}h=0,u=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),r.adler=t.check=0,t.mode=Ii;break;case cp:for(;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}r.adler=t.check=Ep(h),h=0,u=0,t.mode=Fl;case Fl:if(t.havedict===0)return r.next_out=n,r.avail_out=l,r.next_in=a,r.avail_in=o,t.hold=h,t.bits=u,iS;r.adler=t.check=1,t.mode=Ii;case Ii:if(e===tS||e===Nl)break e;case xh:if(t.last){h>>>=u&7,u-=u&7,t.mode=tu;break}for(;u<3;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}switch(t.last=h&1,h>>>=1,u-=1,h&3){case 0:t.mode=pp;break;case 1:if(uS(t),t.mode=Ul,e===Nl){h>>>=2,u-=2;break e}break;case 2:t.mode=vp;break;case 3:r.msg="invalid block type",t.mode=At}h>>>=2,u-=2;break;case pp:for(h>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if((h&65535)!==(h>>>16^65535)){r.msg="invalid stored block lengths",t.mode=At;break}if(t.length=h&65535,h=0,u=0,t.mode=eu,e===Nl)break e;case eu:t.mode=gp;case gp:if(f=t.length,f){if(f>o&&(f=o),f>l&&(f=l),f===0)break e;s.set(i.subarray(a,a+f),n),o-=f,a+=f,l-=f,n+=f,t.length-=f;break}t.mode=Ii;break;case vp:for(;u<14;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.nlen=(h&31)+257,h>>>=5,u-=5,t.ndist=(h&31)+1,h>>>=5,u-=5,t.ncode=(h&15)+4,h>>>=4,u-=4,t.nlen>286||t.ndist>30){r.msg="too many length or distance symbols",t.mode=At;break}t.have=0,t.mode=mp;case mp:for(;t.have<t.ncode;){for(;u<3;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.lens[X[t.have++]]=h&7,h>>>=3,u-=3}for(;t.have<19;)t.lens[X[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,U={bits:t.lenbits},$=An(eS,t.lens,0,19,t.lencode,0,t.work,U),t.lenbits=U.bits,$){r.msg="invalid code lengths set",t.mode=At;break}t.have=0,t.mode=bp;case bp:for(;t.have<t.nlen+t.ndist;){for(;y=t.lencode[h&(1<<t.lenbits)-1],_=y>>>24,T=y>>>16&255,m=y&65535,!(_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(m<16)h>>>=_,u-=_,t.lens[t.have++]=m;else{if(m===16){for(V=_+2;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(h>>>=_,u-=_,t.have===0){r.msg="invalid bit length repeat",t.mode=At;break}I=t.lens[t.have-1],f=3+(h&3),h>>>=2,u-=2}else if(m===17){for(V=_+3;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=_,u-=_,I=0,f=3+(h&7),h>>>=3,u-=3}else{for(V=_+7;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=_,u-=_,I=0,f=11+(h&127),h>>>=7,u-=7}if(t.have+f>t.nlen+t.ndist){r.msg="invalid bit length repeat",t.mode=At;break}for(;f--;)t.lens[t.have++]=I}}if(t.mode===At)break;if(t.lens[256]===0){r.msg="invalid code -- missing end-of-block",t.mode=At;break}if(t.lenbits=9,U={bits:t.lenbits},$=An(Q4,t.lens,0,t.nlen,t.lencode,0,t.work,U),t.lenbits=U.bits,$){r.msg="invalid literal/lengths set",t.mode=At;break}if(t.distbits=6,t.distcode=t.distdyn,U={bits:t.distbits},$=An(x4,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,U),t.distbits=U.bits,$){r.msg="invalid distances set",t.mode=At;break}if(t.mode=Ul,e===Nl)break e;case Ul:t.mode=Gl;case Gl:if(o>=6&&l>=258){r.next_out=n,r.avail_out=l,r.next_in=a,r.avail_in=o,t.hold=h,t.bits=u,Kw(r,c),n=r.next_out,s=r.output,l=r.avail_out,a=r.next_in,i=r.input,o=r.avail_in,h=t.hold,u=t.bits,t.mode===Ii&&(t.back=-1);break}for(t.back=0;y=t.lencode[h&(1<<t.lenbits)-1],_=y>>>24,T=y>>>16&255,m=y&65535,!(_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(T&&!(T&240)){for(w=_,O=T,k=m;y=t.lencode[k+((h&(1<<w+O)-1)>>w)],_=y>>>24,T=y>>>16&255,m=y&65535,!(w+_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=w,u-=w,t.back+=w}if(h>>>=_,u-=_,t.back+=_,t.length=m,T===0){t.mode=wp;break}if(T&32){t.back=-1,t.mode=Ii;break}if(T&64){r.msg="invalid literal/length code",t.mode=At;break}t.extra=T&15,t.mode=yp;case yp:if(t.extra){for(V=t.extra;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.length+=h&(1<<t.extra)-1,h>>>=t.extra,u-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=_p;case _p:for(;y=t.distcode[h&(1<<t.distbits)-1],_=y>>>24,T=y>>>16&255,m=y&65535,!(_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(!(T&240)){for(w=_,O=T,k=m;y=t.distcode[k+((h&(1<<w+O)-1)>>w)],_=y>>>24,T=y>>>16&255,m=y&65535,!(w+_<=u);){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}h>>>=w,u-=w,t.back+=w}if(h>>>=_,u-=_,t.back+=_,T&64){r.msg="invalid distance code",t.mode=At;break}t.offset=m,t.extra=T&15,t.mode=Tp;case Tp:if(t.extra){for(V=t.extra;u<V;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}t.offset+=h&(1<<t.extra)-1,h>>>=t.extra,u-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){r.msg="invalid distance too far back",t.mode=At;break}t.mode=Cp;case Cp:if(l===0)break e;if(f=c-l,t.offset>f){if(f=t.offset-f,f>t.whave&&t.sane){r.msg="invalid distance too far back",t.mode=At;break}f>t.wnext?(f-=t.wnext,p=t.wsize-f):p=t.wnext-f,f>t.length&&(f=t.length),g=t.window}else g=s,p=n-t.offset,f=t.length;f>l&&(f=l),l-=f,t.length-=f;do s[n++]=g[p++];while(--f);t.length===0&&(t.mode=Gl);break;case wp:if(l===0)break e;s[n++]=t.length,l--,t.mode=Gl;break;case tu:if(t.wrap){for(;u<32;){if(o===0)break e;o--,h|=i[a++]<<u,u+=8}if(c-=l,r.total_out+=c,t.total+=c,t.wrap&4&&c&&(r.adler=t.check=t.flags?xt(t.check,s,c,n-c):_n(t.check,s,c,n-c)),c=l,t.wrap&4&&(t.flags?h:Ep(h))!==t.check){r.msg="incorrect data check",t.mode=At;break}h=0,u=0}t.mode=Sp;case Sp:if(t.wrap&&t.flags){for(;u<32;){if(o===0)break e;o--,h+=i[a++]<<u,u+=8}if(t.wrap&4&&h!==(t.total&4294967295)){r.msg="incorrect length check",t.mode=At;break}h=0,u=0}t.mode=Pp;case Pp:$=rS;break e;case At:$=tp;break e;case zp:return rp;case kp:default:return Br}return r.next_out=n,r.avail_out=l,r.next_in=a,r.avail_in=o,t.hold=h,t.bits=u,(t.wsize||c!==r.avail_out&&t.mode<At&&(t.mode<tu||e!==ep))&&$p(r,r.output,r.next_out,c-r.avail_out),d-=r.avail_in,c-=r.avail_out,r.total_in+=d,r.total_out+=c,t.total+=c,t.wrap&4&&c&&(r.adler=t.check=t.flags?xt(t.check,s,c,r.next_out-c):_n(t.check,s,c,r.next_out-c)),r.data_type=t.bits+(t.last?64:0)+(t.mode===Ii?128:0)+(t.mode===Ul||t.mode===eu?256:0),(d===0&&c===0||e===ep)&&$===Ls&&($=sS),$},dS=r=>{if(Fs(r))return Br;let e=r.state;return e.window&&(e.window=null),r.state=null,Ls},cS=(r,e)=>{if(Fs(r))return Br;const t=r.state;return t.wrap&2?(t.head=e,e.done=!1,Ls):Br},pS=(r,e)=>{const t=e.length;let i,s,a;return Fs(r)||(i=r.state,i.wrap!==0&&i.mode!==Fl)?Br:i.mode===Fl&&(s=1,s=_n(s,e,t,0),s!==i.check)?tp:(a=$p(r,e,t,t),a?(i.mode=zp,rp):(i.havedict=1,Ls))};var gS=Mp,vS=Rp,mS=Ap,bS=hS,yS=Op,_S=fS,TS=dS,CS=cS,wS=pS,SS="pako inflate (from Nodeca project)",$i={inflateReset:gS,inflateReset2:vS,inflateResetKeep:mS,inflateInit:bS,inflateInit2:yS,inflate:_S,inflateEnd:TS,inflateGetHeader:CS,inflateSetDictionary:wS,inflateInfo:SS};function PS(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var zS=PS;const Dp=Object.prototype.toString,{Z_NO_FLUSH:kS,Z_FINISH:ES,Z_OK:Mn,Z_STREAM_END:su,Z_NEED_DICT:au,Z_STREAM_ERROR:AS,Z_DATA_ERROR:Np,Z_MEM_ERROR:MS}=Is;function Rn(r){this.options=Il.assign({chunkSize:1024*64,windowBits:15,to:""},r||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(r&&r.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new q4,this.strm.avail_out=0;let t=$i.inflateInit2(this.strm,e.windowBits);if(t!==Mn)throw new Error(Os[t]);if(this.header=new zS,$i.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=kn.string2buf(e.dictionary):Dp.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=$i.inflateSetDictionary(this.strm,e.dictionary),t!==Mn)))throw new Error(Os[t])}Rn.prototype.push=function(r,e){const t=this.strm,i=this.options.chunkSize,s=this.options.dictionary;let a,n,o;if(this.ended)return!1;for(e===~~e?n=e:n=e===!0?ES:kS,Dp.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),a=$i.inflate(t,n),a===au&&s&&(a=$i.inflateSetDictionary(t,s),a===Mn?a=$i.inflate(t,n):a===Np&&(a=au));t.avail_in>0&&a===su&&t.state.wrap>0&&r[t.next_in]!==0;)$i.inflateReset(t),a=$i.inflate(t,n);switch(a){case AS:case Np:case au:case MS:return this.onEnd(a),this.ended=!0,!1}if(o=t.avail_out,t.next_out&&(t.avail_out===0||a===su))if(this.options.to==="string"){let l=kn.utf8border(t.output,t.next_out),h=t.next_out-l,u=kn.buf2string(t.output,l);t.next_out=h,t.avail_out=i-h,h&&t.output.set(t.output.subarray(l,l+h),0),this.onData(u)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out));if(!(a===Mn&&o===0)){if(a===su)return a=$i.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0)break}}return!0},Rn.prototype.onData=function(r){this.chunks.push(r)},Rn.prototype.onEnd=function(r){r===Mn&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Il.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function nu(r,e){const t=new Rn(e);if(t.push(r),t.err)throw t.msg||Os[t.err];return t.result}function RS(r,e){return e=e||{},e.raw=!0,nu(r,e)}var OS=Rn,IS=nu,$S=RS,DS=nu,NS=Is,LS={Inflate:OS,inflate:IS,inflateRaw:$S,ungzip:DS,constants:NS};const{Deflate:FS,deflate:US,deflateRaw:GS,gzip:jS}=Yw,{Inflate:BS,inflate:VS,inflateRaw:HS,ungzip:WS}=LS;var qS=FS,YS=US,XS=GS,KS=jS,ZS=BS,JS=VS,QS=HS,xS=WS,eP=Is,tP={Deflate:qS,deflate:YS,deflateRaw:XS,gzip:KS,Inflate:ZS,inflate:JS,inflateRaw:QS,ungzip:xS,constants:eP};const ye={};ye.toRGBA8=function(r){const e=r.width,t=r.height;if(r.tabs.acTL===null)return[ye.toRGBA8.decodeImage(r.data,e,t,r).buffer];const i=[];r.frames[0].data===null&&(r.frames[0].data=r.data);const s=e*t*4,a=new Uint8Array(s),n=new Uint8Array(s),o=new Uint8Array(s);for(let l=0;l<r.frames.length;l++){const h=r.frames[l],u=h.rect.x,d=h.rect.y,c=h.rect.width,f=h.rect.height,p=ye.toRGBA8.decodeImage(h.data,c,f,r);if(l!==0)for(let g=0;g<s;g++)o[g]=a[g];if(h.blend===0?ye._copyTile(p,c,f,a,e,t,u,d,0):h.blend===1&&ye._copyTile(p,c,f,a,e,t,u,d,1),i.push(a.buffer.slice(0)),h.dispose===1)ye._copyTile(n,c,f,a,e,t,u,d,0);else if(h.dispose===2)for(let g=0;g<s;g++)a[g]=o[g]}return i},ye.toRGBA8.decodeImage=function(r,e,t,i){const s=e*t,a=ye.decode._getBPP(i),n=Math.ceil(e*a/8),o=new Uint8Array(s*4),l=new Uint32Array(o.buffer),h=i.ctype,u=i.depth,d=ye._bin.readUshort;if(h===6){const c=s<<2;if(u===8)for(let f=0;f<c;f+=4)o[f]=r[f],o[f+1]=r[f+1],o[f+2]=r[f+2],o[f+3]=r[f+3];if(u===16)for(let f=0;f<c;f++)o[f]=r[f<<1]}else if(h===2){const c=i.tabs.tRNS;if(c===null){if(u===8)for(let f=0;f<s;f++){const p=f*3;l[f]=255<<24|r[p+2]<<16|r[p+1]<<8|r[p]}if(u===16)for(let f=0;f<s;f++){const p=f*6;l[f]=255<<24|r[p+4]<<16|r[p+2]<<8|r[p]}}else{const f=c[0],p=c[1],g=c[2];if(u===8)for(let y=0;y<s;y++){const _=y<<2,T=y*3;l[y]=255<<24|r[T+2]<<16|r[T+1]<<8|r[T],r[T]===f&&r[T+1]===p&&r[T+2]===g&&(o[_+3]=0)}if(u===16)for(let y=0;y<s;y++){const _=y<<2,T=y*6;l[y]=255<<24|r[T+4]<<16|r[T+2]<<8|r[T],d(r,T)===f&&d(r,T+2)===p&&d(r,T+4)===g&&(o[_+3]=0)}}}else if(h===3){const c=i.tabs.PLTE,f=i.tabs.tRNS,p=f?f.length:0;if(u===1)for(let g=0;g<t;g++){const y=g*n,_=g*e;for(let T=0;T<e;T++){const m=_+T<<2,w=r[y+(T>>3)]>>7-((T&7)<<0)&1,O=3*w;o[m]=c[O],o[m+1]=c[O+1],o[m+2]=c[O+2],o[m+3]=w<p?f[w]:255}}if(u===2)for(let g=0;g<t;g++){const y=g*n,_=g*e;for(let T=0;T<e;T++){const m=_+T<<2,w=r[y+(T>>2)]>>6-((T&3)<<1)&3,O=3*w;o[m]=c[O],o[m+1]=c[O+1],o[m+2]=c[O+2],o[m+3]=w<p?f[w]:255}}if(u===4)for(let g=0;g<t;g++){const y=g*n,_=g*e;for(let T=0;T<e;T++){const m=_+T<<2,w=r[y+(T>>1)]>>4-((T&1)<<2)&15,O=3*w;o[m]=c[O],o[m+1]=c[O+1],o[m+2]=c[O+2],o[m+3]=w<p?f[w]:255}}if(u===8)for(let g=0;g<s;g++){const y=g<<2,_=r[g],T=3*_;o[y]=c[T],o[y+1]=c[T+1],o[y+2]=c[T+2],o[y+3]=_<p?f[_]:255}}else if(h===4){if(u===8)for(let c=0;c<s;c++){const f=c<<2,p=c<<1,g=r[p];o[f]=g,o[f+1]=g,o[f+2]=g,o[f+3]=r[p+1]}if(u===16)for(let c=0;c<s;c++){const f=c<<2,p=c<<2,g=r[p];o[f]=g,o[f+1]=g,o[f+2]=g,o[f+3]=r[p+2]}}else if(h===0){const c=i.tabs.tRNS?i.tabs.tRNS:-1;for(let f=0;f<t;f++){const p=f*n,g=f*e;if(u===1)for(let y=0;y<e;y++){const _=255*(r[p+(y>>>3)]>>>7-(y&7)&1),T=_===c*255?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===2)for(let y=0;y<e;y++){const _=85*(r[p+(y>>>2)]>>>6-((y&3)<<1)&3),T=_===c*85?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===4)for(let y=0;y<e;y++){const _=17*(r[p+(y>>>1)]>>>4-((y&1)<<2)&15),T=_===c*17?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===8)for(let y=0;y<e;y++){const _=r[p+y],T=_===c?0:255;l[g+y]=T<<24|_<<16|_<<8|_}else if(u===16)for(let y=0;y<e;y++){const _=r[p+(y<<1)],T=d(r,p+(y<<1))===c?0:255;l[g+y]=T<<24|_<<16|_<<8|_}}}return o},ye.decode=function(r){const e=new Uint8Array(r);let t=8;const i=ye._bin,s=i.readUshort,a=i.readUint,n={tabs:{},frames:[]},o=new Uint8Array(e.length);let l=0,h,u=0;const d=[137,80,78,71,13,10,26,10];for(let c=0;c<8;c++)if(e[c]!==d[c])throw"The input is not a PNG file!";for(;t<e.length;){const c=i.readUint(e,t);t+=4;const f=i.readASCII(e,t,4);if(t+=4,f==="IHDR")ye.decode._IHDR(e,t,n);else if(f==="CgBI")n.tabs[f]=e.slice(t,t+4);else if(f==="IDAT"){for(let p=0;p<c;p++)o[l+p]=e[t+p];l+=c}else if(f==="acTL")n.tabs[f]={num_frames:a(e,t),num_plays:a(e,t+4)},h=new Uint8Array(e.length);else if(f==="fcTL"){if(u!==0){const _=n.frames[n.frames.length-1];_.data=ye.decode._decompress(n,h.slice(0,u),_.rect.width,_.rect.height),u=0}const p={x:a(e,t+12),y:a(e,t+16),width:a(e,t+4),height:a(e,t+8)};let g=s(e,t+22);g=s(e,t+20)/(g===0?100:g);const y={rect:p,delay:Math.round(g*1e3),dispose:e[t+24],blend:e[t+25]};n.frames.push(y)}else if(f==="fdAT"){for(let p=0;p<c-4;p++)h[u+p]=e[t+p+4];u+=c-4}else if(f==="pHYs")n.tabs[f]=[i.readUint(e,t),i.readUint(e,t+4),e[t+8]];else if(f==="cHRM"){n.tabs[f]=[];for(let p=0;p<8;p++)n.tabs[f].push(i.readUint(e,t+p*4))}else if(f==="tEXt"||f==="zTXt"){n.tabs[f]===null&&(n.tabs[f]={});const p=i.nextZero(e,t),g=i.readASCII(e,t,p-t);let y;const _=t+c-p-1;if(f==="tEXt")y=i.readASCII(e,p+1,_);else{const T=ye.decode._inflate(e.slice(p+2,p+2+_));y=i.readUTF8(T,0,T.length)}n.tabs[f][g]=y}else if(f==="iTXt"){n.tabs[f]==null&&(n.tabs[f]={});let p=0,g=t;p=i.nextZero(e,g);const y=i.readASCII(e,g,p-g);g=p+1;const _=e[g];g+=2,p=i.nextZero(e,g),g=p+1,p=i.nextZero(e,g),g=p+1;let T;const m=c-(g-t);if(_===0)T=i.readUTF8(e,g,m);else{const w=ye.decode._inflate(e.slice(g,g+m));T=i.readUTF8(w,0,w.length)}n.tabs[f][y]=T}else if(f==="PLTE")n.tabs[f]=i.readBytes(e,t,c);else if(f==="hIST"){const p=n.tabs.PLTE.length/3;n.tabs[f]=[];for(let g=0;g<p;g++)n.tabs[f].push(s(e,t+g*2))}else if(f==="tRNS")n.ctype===3?n.tabs[f]=i.readBytes(e,t,c):n.ctype===0?n.tabs[f]=s(e,t):n.ctype===2&&(n.tabs[f]=[s(e,t),s(e,t+2),s(e,t+4)]);else if(f==="gAMA")n.tabs[f]=i.readUint(e,t)/1e5;else if(f==="sRGB")n.tabs[f]=e[t];else if(f==="bKGD")n.ctype===0||n.ctype===4?n.tabs[f]=[s(e,t)]:n.ctype===2||n.ctype===6?n.tabs[f]=[s(e,t),s(e,t+2),s(e,t+4)]:n.ctype===3&&(n.tabs[f]=e[t]);else if(f==="IEND")break;t+=c,t+=4}if(u!==0){const c=n.frames[n.frames.length-1];c.data=ye.decode._decompress(n,h.slice(0,u),c.rect.width,c.rect.height),u=0}return n.data=ye.decode._decompress(n,o,n.width,n.height),delete n.compress,delete n.interlace,delete n.filter,n},ye.decode._decompress=function(r,e,t,i){const s=ye.decode._getBPP(r),a=Math.ceil(t*s/8),n=new Uint8Array((a+1+r.interlace)*i);return r.tabs.CgBI?e=ye.inflateRaw(e,n):e=ye.decode._inflate(e,n),r.interlace===0?e=ye.decode._filterZero(e,r,0,t,i):r.interlace===1&&(e=ye.decode._readInterlace(e,r)),e},ye.decode._inflate=function(r,e){return ye.inflateRaw(new Uint8Array(r.buffer,2,r.length-6),e)},ye.inflateRaw=function(){const r={};return r.H={},r.H.N=function(e,t){const i=Uint8Array;let s=0,a=0,n=0,o=0,l=0,h=0,u=0,d=0,c=0,f,p;if(e[0]===3&&e[1]===0)return t||new i(0);const g=r.H,y=g.b,_=g.e,T=g.R,m=g.n,w=g.A,O=g.Z,k=g.m,I=t===null;for(I&&(t=new i(e.length>>>2<<3));s===0;){if(s=y(e,c,1),a=y(e,c+1,2),c+=3,a===0){c&7&&(c+=8-(c&7));const $=(c>>>3)+4,G=e[$-4]|e[$-3]<<8;I&&(t=r.H.W(t,d+G)),t.set(new i(e.buffer,e.byteOffset+$,G),d),c=$+G<<3,d+=G;continue}if(I&&(t=r.H.W(t,d+(1<<17))),a===1&&(f=k.J,p=k.h,h=512-1,u=32-1),a===2){n=_(e,c,5)+257,o=_(e,c+5,5)+1,l=_(e,c+10,4)+4,c+=14;let $=1;for(let V=0;V<38;V+=2)k.Q[V]=0,k.Q[V+1]=0;for(let V=0;V<l;V++){const X=_(e,c+V*3,3);k.Q[(k.X[V]<<1)+1]=X,X>$&&($=X)}c+=3*l,m(k.Q,$),w(k.Q,$,k.u),f=k.w,p=k.d,c=T(k.u,(1<<$)-1,n+o,e,c,k.v);const G=g.V(k.v,0,n,k.C);h=(1<<G)-1;const U=g.V(k.v,n,o,k.D);u=(1<<U)-1,m(k.C,G),w(k.C,G,f),m(k.D,U),w(k.D,U,p)}for(;;){const $=f[O(e,c)&h];c+=$&15;const G=$>>>4;if(!(G>>>8))t[d++]=G;else{if(G===256)break;{let U=d+G-254;if(G>264){const oe=k.q[G-257];U=d+(oe>>>3)+_(e,c,oe&7),c+=oe&7}const V=p[O(e,c)&u];c+=V&15;const X=V>>>4,te=k.c[X],ee=(te>>>4)+y(e,c,te&15);for(c+=te&15;d<U;)t[d]=t[d++-ee],t[d]=t[d++-ee],t[d]=t[d++-ee],t[d]=t[d++-ee];d=U}}}}return t.length===d?t:t.slice(0,d)},r.H.W=function(e,t){const i=e.length;if(t<=i)return e;const s=new Uint8Array(i<<1);return s.set(e,0),s},r.H.R=function(e,t,i,s,a,n){const o=r.H.e,l=r.H.Z;let h=0;for(;h<i;){const u=e[l(s,a)&t];a+=u&15;const d=u>>>4;if(d<=15)n[h]=d,h++;else{let c=0,f=0;d===16?(f=3+o(s,a,2),a+=2,c=n[h-1]):d===17?(f=3+o(s,a,3),a+=3):d===18&&(f=11+o(s,a,7),a+=7);const p=h+f;for(;h<p;)n[h]=c,h++}}return a},r.H.V=function(e,t,i,s){let a=0,n=0;const o=s.length>>>1;for(;n<i;){const l=e[n+t];s[n<<1]=0,s[(n<<1)+1]=l,l>a&&(a=l),n++}for(;n<o;)s[n<<1]=0,s[(n<<1)+1]=0,n++;return a},r.H.n=function(e,t){const i=r.H.m,s=e.length;let a,n,o,l,h;const u=i.j;for(let c=0;c<=t;c++)u[c]=0;for(l=1;l<s;l+=2)u[e[l]]++;const d=i.K;for(a=0,u[0]=0,n=1;n<=t;n++)a=a+u[n-1]<<1,d[n]=a;for(o=0;o<s;o+=2)h=e[o+1],h!==0&&(e[o]=d[h],d[h]++)},r.H.A=function(e,t,i){const s=e.length,n=r.H.m.r;for(let o=0;o<s;o+=2)if(e[o+1]!==0){const l=o>>1,h=e[o+1],u=l<<4|h,d=t-h;let c=e[o]<<d;const f=c+(1<<d);for(;c!==f;){const p=n[c]>>>15-t;i[p]=u,c++}}},r.H.l=function(e,t){const i=r.H.m.r,s=15-t;for(let a=0;a<e.length;a+=2){const n=e[a]<<t-e[a+1];e[a]=i[n]>>>s}},r.H.M=function(e,t,i){i=i<<(t&7);const s=t>>>3;e[s]|=i,e[s+1]|=i>>>8},r.H.I=function(e,t,i){i=i<<(t&7);const s=t>>>3;e[s]|=i,e[s+1]|=i>>>8,e[s+2]|=i>>>16},r.H.e=function(e,t,i){return(e[t>>>3]|e[(t>>>3)+1]<<8)>>>(t&7)&(1<<i)-1},r.H.b=function(e,t,i){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)&(1<<i)-1},r.H.Z=function(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16)>>>(t&7)},r.H.i=function(e,t){return(e[t>>>3]|e[(t>>>3)+1]<<8|e[(t>>>3)+2]<<16|e[(t>>>3)+3]<<24)>>>(t&7)},r.H.m=function(){const e=Uint16Array,t=Uint32Array;return{K:new e(16),j:new e(16),X:[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],S:[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,999,999,999],T:[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0],q:new e(32),p:[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,65535,65535],z:[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0],c:new t(32),J:new e(512),_:[],h:new e(32),$:[],w:new e(32768),C:[],v:[],d:new e(32768),D:[],u:new e(512),Q:[],r:new e(32768),s:new t(286),Y:new t(30),a:new t(19),t:new t(15e3),k:new e(65536),g:new e(32768)}}(),function(){const e=r.H.m,t=32768;for(let s=0;s<t;s++){let a=s;a=(a&2863311530)>>>1|(a&1431655765)<<1,a=(a&3435973836)>>>2|(a&858993459)<<2,a=(a&4042322160)>>>4|(a&252645135)<<4,a=(a&4278255360)>>>8|(a&16711935)<<8,e.r[s]=(a>>>16|a<<16)>>>17}function i(s,a,n){for(;a--!==0;)s.push(0,n)}for(let s=0;s<32;s++)e.q[s]=e.S[s]<<3|e.T[s],e.c[s]=e.p[s]<<4|e.z[s];i(e._,144,8),i(e._,255-143,9),i(e._,279-255,7),i(e._,287-279,8),r.H.n(e._,9),r.H.A(e._,9,e.J),r.H.l(e._,9),i(e.$,32,5),r.H.n(e.$,5),r.H.A(e.$,5,e.h),r.H.l(e.$,5),i(e.Q,19,0),i(e.C,286,0),i(e.D,30,0),i(e.v,320,0)}(),r.H.N}(),ye.decode._readInterlace=function(r,e){const t=e.width,i=e.height,s=ye.decode._getBPP(e),a=s>>3,n=Math.ceil(t*s/8),o=new Uint8Array(i*n);let l=0;const h=[0,0,4,0,2,0,1],u=[0,4,0,2,0,1,0],d=[8,8,8,4,4,2,2],c=[8,8,4,4,2,2,1];let f=0;for(;f<7;){const p=d[f],g=c[f];let y=0,_=0,T=h[f];for(;T<i;)T+=p,_++;let m=u[f];for(;m<t;)m+=g,y++;const w=Math.ceil(y*s/8);ye.decode._filterZero(r,e,l,y,_);let O=0,k=h[f];for(;k<i;){let I=u[f],$=l+O*w<<3;for(;I<t;){if(s===1){let G=r[$>>3];G=G>>7-($&7)&1,o[k*n+(I>>3)]|=G<<7-((I&7)<<0)}if(s===2){let G=r[$>>3];G=G>>6-($&7)&3,o[k*n+(I>>2)]|=G<<6-((I&3)<<1)}if(s===4){let G=r[$>>3];G=G>>4-($&7)&15,o[k*n+(I>>1)]|=G<<4-((I&1)<<2)}if(s>=8){const G=k*n+I*a;for(let U=0;U<a;U++)o[G+U]=r[($>>3)+U]}$+=s,I+=g}O++,k+=p}y*_!==0&&(l+=_*(1+w)),f=f+1}return o},ye.decode._getBPP=function(r){return[1,null,3,1,2,null,4][r.ctype]*r.depth},ye.decode._filterZero=function(r,e,t,i,s){let a=ye.decode._getBPP(e);const n=Math.ceil(i*a/8),o=ye.decode._paeth;a=Math.ceil(a/8);let l=0,h=1,u=r[t],d=0;if(u>1&&(r[t]=[0,0,1][u-2]),u===3)for(d=a;d<n;d++)r[d+1]=r[d+1]+(r[d+1-a]>>>1)&255;for(let c=0;c<s;c++)if(l=t+c*n,h=l+c+1,u=r[h-1],d=0,u===0)for(;d<n;d++)r[l+d]=r[h+d];else if(u===1){for(;d<a;d++)r[l+d]=r[h+d];for(;d<n;d++)r[l+d]=r[h+d]+r[l+d-a]}else if(u===2)for(;d<n;d++)r[l+d]=r[h+d]+r[l+d-n];else if(u===3){for(;d<a;d++)r[l+d]=r[h+d]+(r[l+d-n]>>>1);for(;d<n;d++)r[l+d]=r[h+d]+(r[l+d-n]+r[l+d-a]>>>1)}else{for(;d<a;d++)r[l+d]=r[h+d]+o(0,r[l+d-n],0);for(;d<n;d++)r[l+d]=r[h+d]+o(r[l+d-a],r[l+d-n],r[l+d-a-n])}return r},ye.decode._paeth=function(r,e,t){const i=r+e-t,s=i-r,a=i-e,n=i-t;return s*s<=a*a&&s*s<=n*n?r:a*a<=n*n?e:t},ye.decode._IHDR=function(r,e,t){const i=ye._bin;t.width=i.readUint(r,e),e+=4,t.height=i.readUint(r,e),e+=4,t.depth=r[e],e++,t.ctype=r[e],e++,t.compress=r[e],e++,t.filter=r[e],e++,t.interlace=r[e],e++},ye._bin={nextZero:function(r,e){for(;r[e]!==0;)e++;return e},readUshort:function(r,e){return r[e]<<8|r[e+1]},writeUshort:function(r,e,t){r[e]=t>>8&255,r[e+1]=t&255},readUint:function(r,e){return r[e]*(256*256*256)+(r[e+1]<<16|r[e+2]<<8|r[e+3])},writeUint:function(r,e,t){r[e]=t>>24&255,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t&255},readASCII:function(r,e,t){let i="";for(let s=0;s<t;s++)i+=String.fromCharCode(r[e+s]);return i},writeASCII:function(r,e,t){for(let i=0;i<t.length;i++)r[e+i]=t.charCodeAt(i)},readBytes:function(r,e,t){const i=[];for(let s=0;s<t;s++)i.push(r[e+s]);return i},pad:function(r){return r.length<2?"0"+r:r},readUTF8:function(r,e,t){let i="",s;for(let a=0;a<t;a++)i+="%"+ye._bin.pad(r[e+a].toString(16));try{s=decodeURIComponent(i)}catch{return ye._bin.readASCII(r,e,t)}return s}},ye._copyTile=function(r,e,t,i,s,a,n,o,l){const h=Math.min(e,s),u=Math.min(t,a);let d=0,c=0;for(let f=0;f<u;f++)for(let p=0;p<h;p++)if(n>=0&&o>=0?(d=f*e+p<<2,c=(o+f)*s+n+p<<2):(d=(-o+f)*e-n+p<<2,c=f*s+p<<2),l===0)i[c]=r[d],i[c+1]=r[d+1],i[c+2]=r[d+2],i[c+3]=r[d+3];else if(l===1){const g=r[d+3]*.00392156862745098,y=r[d]*g,_=r[d+1]*g,T=r[d+2]*g,m=i[c+3]*(1/255),w=i[c]*m,O=i[c+1]*m,k=i[c+2]*m,I=1-g,$=g+m*I,G=$===0?0:1/$;i[c+3]=255*$,i[c+0]=(y+w*I)*G,i[c+1]=(_+O*I)*G,i[c+2]=(T+k*I)*G}else if(l===2){const g=r[d+3],y=r[d],_=r[d+1],T=r[d+2],m=i[c+3],w=i[c],O=i[c+1],k=i[c+2];g===m&&y===w&&_===O&&T===k?(i[c]=0,i[c+1]=0,i[c+2]=0,i[c+3]=0):(i[c]=y,i[c+1]=_,i[c+2]=T,i[c+3]=g)}else if(l===3){const g=r[d+3],y=r[d],_=r[d+1],T=r[d+2],m=i[c+3],w=i[c],O=i[c+1],k=i[c+2];if(g===m&&y===w&&_===O&&T===k)continue;if(g<220&&m>20)return!1}return!0},ye.encode=function(r,e,t,i,s,a,n){i===null&&(i=0),n===null&&(n=!1);const o=ye.encode.compress(r,e,t,i,[!1,!1,!1,0,n]);return ye.encode.compressPNG(o,-1),ye.encode._main(o,e,t,s,a)},ye.encodeLL=function(r,e,t,i,s,a,n,o){const l={ctype:0+(i===1?0:2)+(s===0?0:4),depth:a,frames:[]},h=(i+s)*a,u=h*e;for(let c=0;c<r.length;c++)l.frames.push({rect:{x:0,y:0,width:e,height:t},img:new Uint8Array(r[c]),blend:0,dispose:1,bpp:Math.ceil(h/8),bpl:Math.ceil(u/8)});return ye.encode.compressPNG(l,0,!0),ye.encode._main(l,e,t,n,o)},ye.encode._main=function(r,e,t,i,s){s||(s={});const a=ye.crc.crc,n=ye._bin.writeUint,o=ye._bin.writeUshort,l=ye._bin.writeASCII;let h=8;const u=r.frames.length>1;let d=!1,c=8+(16+5+4)+(u?20:0);if(s.sRGB!==null&&s.sRGB!==void 0&&(c+=8+1+4),s.pHYs!==null&&s.pHYs!==void 0&&(c+=8+9+4),r.ctype===3){const y=r.plte.length;for(let _=0;_<y;_++)r.plte[_]>>>24!==255&&(d=!0);c+=8+y*3+4+(d?8+y*1+4:0)}for(let y=0;y<r.frames.length;y++){const _=r.frames[y];u&&(c+=38),c+=_.cimg.length+12,y!==0&&(c+=4)}c+=12;const f=new Uint8Array(c),p=[137,80,78,71,13,10,26,10];for(let y=0;y<8;y++)f[y]=p[y];if(n(f,h,13),h+=4,l(f,h,"IHDR"),h+=4,n(f,h,e),h+=4,n(f,h,t),h+=4,f[h]=r.depth,h++,f[h]=r.ctype,h++,f[h]=0,h++,f[h]=0,h++,f[h]=0,h++,n(f,h,a(f,h-17,17)),h+=4,s.sRGB!==null&&s.sRGB!==void 0&&(n(f,h,1),h+=4,l(f,h,"sRGB"),h+=4,f[h]=s.sRGB,h++,n(f,h,a(f,h-5,5)),h+=4),s.pHYs!==null&&s.pHYs!==void 0&&(n(f,h,9),h+=4,l(f,h,"pHYs"),h+=4,n(f,h,s.pHYs[0]),h+=4,n(f,h,s.pHYs[1]),h+=4,f[h]=s.pHYs[2],h++,n(f,h,a(f,h-13,13)),h+=4),u&&(n(f,h,8),h+=4,l(f,h,"acTL"),h+=4,n(f,h,r.frames.length),h+=4,n(f,h,s.loop!=null?s.loop:0),h+=4,n(f,h,a(f,h-12,12)),h+=4),r.ctype===3){const y=r.plte.length;n(f,h,y*3),h+=4,l(f,h,"PLTE"),h+=4;for(let _=0;_<y;_++){const T=_*3,m=r.plte[_],w=m&255,O=m>>>8&255,k=m>>>16&255;f[h+T+0]=w,f[h+T+1]=O,f[h+T+2]=k}if(h+=y*3,n(f,h,a(f,h-y*3-4,y*3+4)),h+=4,d){n(f,h,y),h+=4,l(f,h,"tRNS"),h+=4;for(let _=0;_<y;_++)f[h+_]=r.plte[_]>>>24&255;h+=y,n(f,h,a(f,h-y-4,y+4)),h+=4}}let g=0;for(let y=0;y<r.frames.length;y++){const _=r.frames[y];u&&(n(f,h,26),h+=4,l(f,h,"fcTL"),h+=4,n(f,h,g++),h+=4,n(f,h,_.rect.width),h+=4,n(f,h,_.rect.height),h+=4,n(f,h,_.rect.x),h+=4,n(f,h,_.rect.y),h+=4,o(f,h,i[y]),h+=2,o(f,h,1e3),h+=2,f[h]=_.dispose,h++,f[h]=_.blend,h++,n(f,h,a(f,h-30,30)),h+=4);const T=_.cimg,m=T.length;n(f,h,m+(y===0?0:4)),h+=4;const w=h;l(f,h,y===0?"IDAT":"fdAT"),h+=4,y!==0&&(n(f,h,g++),h+=4),f.set(T,h),h+=m,n(f,h,a(f,w,h-w)),h+=4}return n(f,h,0),h+=4,l(f,h,"IEND"),h+=4,n(f,h,a(f,h-4,4)),h+=4,f.buffer},ye.encode.compressPNG=function(r,e,t){for(let i=0;i<r.frames.length;i++){const s=r.frames[i],a=s.rect.height,n=new Uint8Array(a*s.bpl+a);s.cimg=ye.encode._filterZero(s.img,a,s.bpp,s.bpl,n,e,t)}},ye.encode.compress=function(r,e,t,i,s){const a=s[0],n=s[1],o=s[2],l=s[3],h=s[4];let u=6,d=8,c=255;for(let m=0;m<r.length;m++){const w=new Uint8Array(r[m]),O=w.length;for(let k=0;k<O;k+=4)c&=w[k+3]}const f=c!==255,p=ye.encode.framize(r,e,t,a,n,o),g={},y=[],_=[];if(i!==0){const m=[];for(let $=0;$<p.length;$++)m.push(p[$].img.buffer);const w=ye.encode.concatRGBA(m),O=ye.quantize(w,i);let k=0;const I=new Uint8Array(O.abuf);for(let $=0;$<p.length;$++){const G=p[$].img,U=G.length;_.push(new Uint8Array(O.inds.buffer,k>>2,U>>2));for(let V=0;V<U;V+=4)G[V]=I[k+V],G[V+1]=I[k+V+1],G[V+2]=I[k+V+2],G[V+3]=I[k+V+3];k+=U}for(let $=0;$<O.plte.length;$++)y.push(O.plte[$].est.rgba)}else for(let m=0;m<p.length;m++){const w=p[m],O=new Uint32Array(w.img.buffer),k=w.rect.width,I=O.length,$=new Uint8Array(I);_.push($);for(let G=0;G<I;G++){const U=O[G];if(G!==0&&U===O[G-1])$[G]=$[G-1];else if(G>k&&U===O[G-k])$[G]=$[G-k];else{let V=g[U];if(V===null&&(g[U]=V=y.length,y.push(U),y.length>=300))break;$[G]=V}}}const T=y.length;T<=256&&h===!1&&(T<=2?d=1:T<=4?d=2:T<=16?d=4:d=8,d=Math.max(d,l));for(let m=0;m<p.length;m++){const w=p[m],O=w.rect.width,k=w.rect.height;let I=w.img,$=4*O,G=4;if(T<=256&&h===!1){$=Math.ceil(d*O/8);const U=new Uint8Array($*k),V=_[m];for(let X=0;X<k;X++){const te=X*$,ee=X*O;if(d===8)for(let oe=0;oe<O;oe++)U[te+oe]=V[ee+oe];else if(d===4)for(let oe=0;oe<O;oe++)U[te+(oe>>1)]|=V[ee+oe]<<4-(oe&1)*4;else if(d===2)for(let oe=0;oe<O;oe++)U[te+(oe>>2)]|=V[ee+oe]<<6-(oe&3)*2;else if(d===1)for(let oe=0;oe<O;oe++)U[te+(oe>>3)]|=V[ee+oe]<<7-(oe&7)*1}I=U,u=3,G=1}else if(f===!1&&p.length===1){const U=new Uint8Array(O*k*3),V=O*k;for(let X=0;X<V;X++){const te=X*3,ee=X*4;U[te]=I[ee],U[te+1]=I[ee+1],U[te+2]=I[ee+2]}I=U,u=2,G=3,$=3*O}w.img=I,w.bpl=$,w.bpp=G}return{ctype:u,depth:d,plte:y,frames:p}},ye.encode.framize=function(r,e,t,i,s,a){const n=[];for(let o=0;o<r.length;o++){const l=new Uint8Array(r[o]),h=new Uint32Array(l.buffer);let u,d=0,c=0,f=e,p=t,g=i?1:0;if(o!==0){const y=a||i||o===1||n[o-2].dispose!==0?1:2;let _=0,T=1e9;for(let w=0;w<y;w++){const O=new Uint32Array(r[o-1-w]);let k=e,I=t,$=-1,G=-1;for(let V=0;V<t;V++)for(let X=0;X<e;X++){const te=V*e+X;h[te]!==O[te]&&(X<k&&(k=X),X>$&&($=X),V<I&&(I=V),V>G&&(G=V))}$===-1&&(k=I=$=G=0),s&&((k&1)===1&&k--,(I&1)===1&&I--);const U=($-k+1)*(G-I+1);U<T&&(T=U,_=w,d=k,c=I,f=$-k+1,p=G-I+1)}const m=new Uint8Array(r[o-1-_]);_===1&&(n[o-1].dispose=2),u=new Uint8Array(f*p*4),ye._copyTile(m,e,t,u,f,p,-d,-c,0),g=ye._copyTile(l,e,t,u,f,p,-d,-c,3)?1:0,g===1?ye.encode._prepareDiff(l,e,t,u,{x:d,y:c,width:f,height:p}):ye._copyTile(l,e,t,u,f,p,-d,-c,0)}else u=l.slice(0);n.push({rect:{x:d,y:c,width:f,height:p},img:u,blend:g,dispose:0})}if(i)for(let o=0;o<n.length;o++){const l=n[o];if(l.blend===1)continue;const h=l.rect,u=n[o-1].rect,d=Math.min(h.x,u.x),c=Math.min(h.y,u.y),f=Math.max(h.x+h.width,u.x+u.width),p=Math.max(h.y+h.height,u.y+u.height),g={x:d,y:c,width:f-d,height:p-c};n[o-1].dispose=1,o-1!==0&&ye.encode._updateFrame(r,e,t,n,o-1,g,s),ye.encode._updateFrame(r,e,t,n,o,g,s)}return n},ye.encode._updateFrame=function(r,e,t,i,s,a,n){const o=Uint8Array,l=Uint32Array,h=new o(r[s-1]),u=new l(r[s-1]),d=s+1<r.length?new o(r[s+1]):null,c=new o(r[s]),f=new l(c.buffer);let p=e,g=t,y=-1,_=-1;for(let m=0;m<a.height;m++)for(let w=0;w<a.width;w++){const O=a.x+w,k=a.y+m,I=k*e+O,$=f[I];$===0||i[s-1].dispose===0&&u[I]===$&&(d===null||d[I*4+3]!==0)||(O<p&&(p=O),O>y&&(y=O),k<g&&(g=k),k>_&&(_=k))}y===-1&&(p=g=y=_=0),n&&((p&1)===1&&p--,(g&1)===1&&g--),a={x:p,y:g,width:y-p+1,height:_-g+1};const T=i[s];T.rect=a,T.blend=1,T.img=new Uint8Array(a.width*a.height*4),i[s-1].dispose===0?(ye._copyTile(h,e,t,T.img,a.width,a.height,-a.x,-a.y,0),ye.encode._prepareDiff(c,e,t,T.img,a)):ye._copyTile(c,e,t,T.img,a.width,a.height,-a.x,-a.y,0)},ye.encode._prepareDiff=function(r,e,t,i,s){ye._copyTile(r,e,t,i,s.width,s.height,-s.x,-s.y,2)},ye.encode._filterZero=function(r,e,t,i,s,a,n){const o=[];let l=[0,1,2,3,4];a!==-1?l=[a]:(e*i>5e5||t===1)&&(l=[0]);let h;n&&(h={level:0});const u=s.length>1e7&&p4!=null?p4:tP;for(let f=0;f<l.length;f++){for(let p=0;p<e;p++)ye.encode._filterLine(s,r,p,i,t,l[f]);o.push(u.deflate(s,h))}let d,c=1e9;for(let f=0;f<o.length;f++)o[f].length<c&&(d=f,c=o[f].length);return o[d]},ye.encode._filterLine=function(r,e,t,i,s,a){const n=t*i;let o=n+t;const l=ye.decode._paeth;if(r[o]=a,o++,a===0)if(i<500)for(let h=0;h<i;h++)r[o+h]=e[n+h];else r.set(new Uint8Array(e.buffer,n,i),o);else if(a===1){for(let h=0;h<s;h++)r[o+h]=e[n+h];for(let h=s;h<i;h++)r[o+h]=e[n+h]-e[n+h-s]+256&255}else if(t===0){for(let h=0;h<s;h++)r[o+h]=e[n+h];if(a===2)for(let h=s;h<i;h++)r[o+h]=e[n+h];if(a===3)for(let h=s;h<i;h++)r[o+h]=e[n+h]-(e[n+h-s]>>1)+256&255;if(a===4)for(let h=s;h<i;h++)r[o+h]=e[n+h]-l(e[n+h-s],0,0)+256&255}else{if(a===2)for(let h=0;h<i;h++)r[o+h]=e[n+h]+256-e[n+h-i]&255;if(a===3){for(let h=0;h<s;h++)r[o+h]=e[n+h]+256-(e[n+h-i]>>1)&255;for(let h=s;h<i;h++)r[o+h]=e[n+h]+256-(e[n+h-i]+e[n+h-s]>>1)&255}if(a===4){for(let h=0;h<s;h++)r[o+h]=e[n+h]+256-l(0,e[n+h-i],0)&255;for(let h=s;h<i;h++)r[o+h]=e[n+h]+256-l(e[n+h-s],e[n+h-i],e[n+h-s-i])&255}}},ye.crc={table:function(){const r=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let i=0;i<8;i++)t&1?t=3988292384^t>>>1:t=t>>>1;r[e]=t}return r}(),update:function(r,e,t,i){for(let s=0;s<i;s++)r=ye.crc.table[(r^e[t+s])&255]^r>>>8;return r},crc:function(r,e,t){return ye.crc.update(4294967295,r,e,t)^4294967295}},ye.quantize=function(r,e){const t=new Uint8Array(r),i=t.slice(0),s=new Uint32Array(i.buffer),a=ye.quantize.getKDtree(i,e),n=a[0],o=a[1],l=ye.quantize.planeDst,h=t,u=s,d=h.length,c=new Uint8Array(t.length>>2);let f;if(t.length<2e7)for(let p=0;p<d;p+=4){const g=h[p]*.00392156862745098,y=h[p+1]*(1/255),_=h[p+2]*(1/255),T=h[p+3]*(1/255);f=ye.quantize.getNearest(n,g,y,_,T),c[p>>2]=f.ind,u[p>>2]=f.est.rgba}else for(let p=0;p<d;p+=4){const g=h[p]*.00392156862745098,y=h[p+1]*(1/255),_=h[p+2]*(1/255),T=h[p+3]*(1/255);for(f=n;f.left;)f=l(f.est,g,y,_,T)<=0?f.left:f.right;c[p>>2]=f.ind,u[p>>2]=f.est.rgba}return{abuf:i.buffer,inds:c,plte:o}},ye.quantize.getKDtree=function(r,e,t){t===null&&(t=1e-4);const i=new Uint32Array(r.buffer),s={i0:0,i1:r.length,bst:null,est:null,tdst:0,left:null,right:null};s.bst=ye.quantize.stats(r,s.i0,s.i1),s.est=ye.quantize.estats(s.bst);const a=[s];for(;a.length<e;){let n=0,o=0;for(let f=0;f<a.length;f++)a[f].est.L>n&&(n=a[f].est.L,o=f);if(n<t)break;const l=a[o],h=ye.quantize.splitPixels(r,i,l.i0,l.i1,l.est.e,l.est.eMq255);if(l.i0>=h||l.i1<=h){l.est.L=0;continue}const d={i0:l.i0,i1:h,bst:null,est:null,tdst:0,left:null,right:null};d.bst=ye.quantize.stats(r,d.i0,d.i1),d.est=ye.quantize.estats(d.bst);const c={i0:h,i1:l.i1,bst:null,est:null,tdst:0,left:null,right:null};c.bst={R:[],m:[],N:l.bst.N-d.bst.N};for(let f=0;f<16;f++)c.bst.R[f]=l.bst.R[f]-d.bst.R[f];for(let f=0;f<4;f++)c.bst.m[f]=l.bst.m[f]-d.bst.m[f];c.est=ye.quantize.estats(c.bst),l.left=d,l.right=c,a[o]=d,a.push(c)}a.sort(function(n,o){return o.bst.N-n.bst.N});for(let n=0;n<a.length;n++)a[n].ind=n;return[s,a]},ye.quantize.getNearest=function(r,e,t,i,s){if(r.left==null)return r.tdst=ye.quantize.dist(r.est.q,e,t,i,s),r;const a=ye.quantize.planeDst(r.est,e,t,i,s);let n=r.left,o=r.right;a>0&&(n=r.right,o=r.left);const l=ye.quantize.getNearest(n,e,t,i,s);if(l.tdst<=a*a)return l;const h=ye.quantize.getNearest(o,e,t,i,s);return h.tdst<l.tdst?h:l},ye.quantize.planeDst=function(r,e,t,i,s){const a=r.e;return a[0]*e+a[1]*t+a[2]*i+a[3]*s-r.eMq},ye.quantize.dist=function(r,e,t,i,s){const a=e-r[0],n=t-r[1],o=i-r[2],l=s-r[3];return a*a+n*n+o*o+l*l},ye.quantize.splitPixels=function(r,e,t,i,s,a){const n=ye.quantize.vecDot;for(i-=4;t<i;){for(;n(r,t,s)<=a;)t+=4;for(;n(r,i,s)>a;)i-=4;if(t>=i)break;const o=e[t>>2];e[t>>2]=e[i>>2],e[i>>2]=o,t+=4,i-=4}for(;n(r,t,s)>a;)t-=4;return t+4},ye.quantize.vecDot=function(r,e,t){return r[e]*t[0]+r[e+1]*t[1]+r[e+2]*t[2]+r[e+3]*t[3]},ye.quantize.stats=function(r,e,t){const i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],s=[0,0,0,0],a=t-e>>2;for(let n=e;n<t;n+=4){const o=r[n]*.00392156862745098,l=r[n+1]*(1/255),h=r[n+2]*(1/255),u=r[n+3]*(1/255);s[0]+=o,s[1]+=l,s[2]+=h,s[3]+=u,i[0]+=o*o,i[1]+=o*l,i[2]+=o*h,i[3]+=o*u,i[5]+=l*l,i[6]+=l*h,i[7]+=l*u,i[10]+=h*h,i[11]+=h*u,i[15]+=u*u}return i[4]=i[1],i[8]=i[2],i[9]=i[6],i[12]=i[3],i[13]=i[7],i[14]=i[11],{R:i,m:s,N:a}},ye.quantize.estats=function(r){const e=r.R,t=r.m,i=r.N,s=t[0],a=t[1],n=t[2],o=t[3],l=i===0?0:1/i,h=[e[0]-s*s*l,e[1]-s*a*l,e[2]-s*n*l,e[3]-s*o*l,e[4]-a*s*l,e[5]-a*a*l,e[6]-a*n*l,e[7]-a*o*l,e[8]-n*s*l,e[9]-n*a*l,e[10]-n*n*l,e[11]-n*o*l,e[12]-o*s*l,e[13]-o*a*l,e[14]-o*n*l,e[15]-o*o*l],u=h,d=ye.M4;let c=[Math.random(),Math.random(),Math.random(),Math.random()],f=0,p=0;if(i!==0)for(let _=0;_<16&&(c=d.multVec(u,c),p=Math.sqrt(d.dot(c,c)),c=d.sml(1/p,c),!(_!==0&&Math.abs(p-f)<1e-9));_++)f=p;const g=[s*l,a*l,n*l,o*l],y=d.dot(d.sml(255,g),c);return{Cov:h,q:g,e:c,L:f,eMq255:y,eMq:d.dot(c,g),rgba:(Math.round(255*g[3])<<24|Math.round(255*g[2])<<16|Math.round(255*g[1])<<8|Math.round(255*g[0])<<0)>>>0}},ye.M4={multVec:function(r,e){return[r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3],r[4]*e[0]+r[5]*e[1]+r[6]*e[2]+r[7]*e[3],r[8]*e[0]+r[9]*e[1]+r[10]*e[2]+r[11]*e[3],r[12]*e[0]+r[13]*e[1]+r[14]*e[2]+r[15]*e[3]]},dot:function(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]+r[3]*e[3]},sml:function(r,e){return[r*e[0],r*e[1],r*e[2],r*e[3]]}},ye.encode.concatRGBA=function(r){let e=0;for(let s=0;s<r.length;s++)e+=r[s].byteLength;const t=new Uint8Array(e);let i=0;for(let s=0;s<r.length;s++){const a=new Uint8Array(r[s]),n=a.length;for(let o=0;o<n;o+=4){let l=a[o],h=a[o+1],u=a[o+2];const d=a[o+3];d===0&&(l=h=u=0),t[i+o]=l,t[i+o+1]=h,t[i+o+2]=u,t[i+o+3]=d}i+=n}return t.buffer};const jl=new Map,ou=(r,e)=>{if(jl.has(r))return e(null,jl.get(r));const t=new Image;t.onload=function(){jl.set(r,{width:t.width,height:t.height,element:t}),e(null,jl.get(r))},t.onerror=function(i){e(i,null)},t.src=r},rP=(r,e)=>{for(let t=0,i=r.length;t<i;t++){const s=r[t],{type:a}=s;if(a.split("/")[0]!=="image")return;const o=new FileReader;o.onload=function(l){if(!l.target)return e("no reader target",null);const h=l.target.result,u=ff(h),d=new Blob([h]);lu(d,(c,f)=>{if(!f)return e(c,null);ou(f,(p,g)=>{if(!g)return e(p,null);Lp(f,(y,_)=>{if(!_)return e(y,null);const T={name:s.name,fileType:u,size:s.size,width:g.width,height:g.height,imgUrl:f,imageData:_,blob:d};return e(null,T)})})})},o.readAsArrayBuffer(s)}},Lp=(r,e)=>{ou(r,(t,i)=>{if(!i)return e(t,null);const s=document.createElement("canvas"),a=s.getContext("2d");s.width=i.width,s.height=i.height,a.drawImage(i.element,0,0,s.width,s.height);const n=a.getImageData(0,0,s.width,s.height);return e(null,n)})},iP=(r,e=0,t=0)=>{const i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=t,s.drawImage(r,0,0,e,t),s.getImageData(0,0,e,t)},sP=(r,e=0,t=0)=>{const i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=t,s.drawImage(r,0,0,e,t),s.getImageData(0,0,e,t)},aP=r=>{const e=r.width,t=r.height,i=e*t*3,s=i+54,a=[66,77,s&255,s>>8&255,s>>16&255,s>>24&255,0,0,0,0,54,0,0,0],n=[40,0,0,0,e&255,e>>8&255,e>>16&255,e>>24&255,t&255,t>>8&255,t>>16&255,t>>24&255,1,0,24,0,0,0,0,0,i&255,i>>8&255,i>>16&255,i>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],o=(4-e*3%4)%4,l=r.data;let h="";const u=e<<2;let d=t;const c=String.fromCharCode;do{const p=u*(d-1);let g="";for(let y=0;y<e;y++){const _=y<<2;g+=c(l[p+_+2])+c(l[p+_+1])+c(l[p+_])}for(let y=0;y<o;y++)g+=String.fromCharCode(0);h+=g}while(--d);function f(p){if(!window.btoa)throw"btoa undefined";let g="";if(typeof p=="string")g=p;else for(let y=0;y<p.length;y++)g+=String.fromCharCode(p[y]);return btoa(g)}return f(a.concat(n))+f(h)},nP=r=>{const{width:e,height:t}=r,i=document.createElement("canvas"),s=i.getContext("2d");return i.width=e,i.height=t,s.putImageData(r,0,0,0,0,e,t),i.toDataURL("image/png")},oP=(r,e,t)=>{const{width:i,height:s}=r,a=document.createElement("canvas"),n=a.getContext("2d");a.width=i,a.height=s,n.putImageData(r,0,0,0,0,i,s);const o=`image/${e?e.toLowerCase():"png"}`;a.toBlob(l=>{t?.(null,l)},o,1)},lu=(r,e)=>{const t=new FileReader;t.onload=function(i){i.target?e(null,i.target.result):e("can't readAsDataURL",null)},t.readAsDataURL(r)},lP=(r,e)=>{lu(r,function(t,i){if(i){const s=new Image;s.src=i}else e(t)})};function hP(r){const e=[],t=[],i=[];let s=0;for(let l=0,h=r.data.length;l<h;l+=4)e[s]=r.data[l],t[s]=r.data[l+1],i[s]=r.data[l+2],s+=1;const a=hu(e),n=hu(t),o=hu(i);return"rgb("+a+","+n+","+o+")"}function hu(r){const e={},t=[],i=[];for(let o=0;o<r.length;o++)e[r[o]]?t.push(r[o]):e[r[o]]=1;let s=0;for(let o=0;o<t.length;o++){s=0;for(let l=0;l<t.length;l++)t[o]===t[l]&&(s+=1),i[o]=s}const a=Math.max.apply(null,i);let n=0;for(;n<i.length;n++)if(i[n]===a)return;return t[n]}const uP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[(n*t+t-o-1)*4],s[l+1]=e[(n*t+t-o-1)*4+1],s[l+2]=e[(n*t+t-o-1)*4+2],s[l+3]=e[(n*t+t-o-1)*4+3]}return new ImageData(s,t,i)},fP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[((i-n-1)*t+o)*4],s[l+1]=e[((i-n-1)*t+o)*4+1],s[l+2]=e[((i-n-1)*t+o)*4+2],s[l+3]=e[((i-n-1)*t+o)*4+3]}return new ImageData(s,t,i)},dP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<t;n++)for(let o=0;o<i;o++){const l=(n*i+o)*4;s[l]=e[(o*t+t-n-1)*4],s[l+1]=e[(o*t+t-n-1)*4+1],s[l+2]=e[(o*t+t-n-1)*4+2],s[l+3]=e[(o*t+t-n-1)*4+3]}return new ImageData(s,i,t)},cP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<t;n++)for(let o=0;o<i;o++){const l=(n*i+o)*4;s[l]=e[((i-o-1)*t+n)*4],s[l+1]=e[((i-o-1)*t+n)*4+1],s[l+2]=e[((i-o-1)*t+n)*4+2],s[l+3]=e[((i-o-1)*t+n)*4+3]}return new ImageData(s,i,t)},pP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l]+e[l+1]+e[l+2])/3;s[l]=h,s[l+1]=h,s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},gP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=.2126*e[l]+.7152*e[l+1]+.0722*e[l+2];s[l]=h,s[l+1]=h,s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},vP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,u=(e[l]+e[l+1]+e[l+2])/3>127?255:0;s[l]=u,s[l+1]=u,s[l+2]=u,s[l+3]=e[l+3]}return new ImageData(s,t,i)},mP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=255-e[l],s[l+1]=255-e[l+1],s[l+2]=255-e[l+2],s[l+3]=e[l+3]}return new ImageData(s,t,i)},bP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=0,s[l+2]=0,s[l+3]=e[l+3]}return new ImageData(s,t,i)},yP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=0,s[l+1]=e[l+1],s[l+2]=0,s[l+3]=e[l+3]}return new ImageData(s,t,i)},_P=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=0,s[l+1]=0,s[l+2]=e[l+2],s[l+3]=e[l+3]}return new ImageData(s,t,i)},TP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=e[l+1],s[l+2]=0,s[l+3]=e[l+3]}return new ImageData(s,t,i)},CP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=0,s[l+2]=e[l+1],s[l+3]=e[l+3]}return new ImageData(s,t,i)},wP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=0,s[l+1]=e[l+1],s[l+2]=e[l+1],s[l+3]=e[l+3]}return new ImageData(s,t,i)},SP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l+1]+e[l+2])/2;s[l]=e[l],s[l+1]=h,s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},PP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l]+e[l+2])/2;s[l]=h,s[l+1]=e[l+1],s[l+2]=h,s[l+3]=e[l+3]}return new ImageData(s,t,i)},zP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4,h=(e[l]+e[l+1])/2;s[l]=h,s[l+1]=h,s[l+2]=e[l+2],s[l+3]=e[l+3]}return new ImageData(s,t,i)},kP=r=>Fp(r,[-1,-1,-1,-1,9,-1,-1,-1,-1]),EP=r=>Fp(r,[-1,-1,-1,-1,8,-1,-1,-1,-1]),AP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;s[l]=e[l],s[l+1]=e[l+1],s[l+2]=e[l+2],s[l+3]=255}return new ImageData(s,t,i)},MP=r=>{const{data:e,width:t,height:i}=r,s=new Uint8ClampedArray(e.length);for(let n=0;n<i;n++)for(let o=0;o<t;o++){const l=(n*t+o)*4;if(e[l+3]===0)s[l]=255,s[l+1]=255,s[l+2]=255,s[l+3]=255;else{const h=Up([e[l],e[l+1],e[l+2],e[l+3]],[255,255,255,255]);s[l]=h[0],s[l+1]=h[1],s[l+2]=h[2],s[l+3]=h[3]}}return new ImageData(s,t,i)},RP=(r,e,t,i,s,a=!1,n)=>{const{data:o,width:l,height:h}=r;let u=s,d=i,c=e,f=t;if(u<0?u=0:u>l&&(u=l),d<0?d=0:d>h&&(d=h),c<1?c=1:c>l&&(c=l),f<1?f=1:f>h&&(f=h),u+c>l&&(c=l-u),d+f>h&&(f=h-d),a){const p=new Uint8ClampedArray(o.length);for(let y=0;y<h;y++)for(let _=0;_<l;_++){const T=(y*l+_)*4;_>=u&&_<=u+c&&y>=d&&y<=d+f?(p[T]=o[T],p[T+1]=o[T+1],p[T+2]=o[T+2],p[T+3]=o[T+3]):(p[T]=255,p[T+1]=255,p[T+2]=255,p[T+3]=n&&["JPG","JPEG"].includes(n.toUpperCase())?255:0)}return new ImageData(p,l,h)}else{const p=new Uint8ClampedArray(c*f*4);for(let y=d;y<=d+f;y++)for(let _=u;_<=u+c;_++){const T=((y-d)*c+_-u)*4,m=(y*l+_)*4;p[T]=o[m],p[T+1]=o[m+1],p[T+2]=o[m+2],p[T+3]=o[m+3]}return new ImageData(p,c,f)}},OP=(r,e,t,i)=>{const{data:s,width:a,height:n}=r;let o=e;o>Math.floor(a/2)&&(o=Math.floor(a/2)),o>Math.floor(n/2)&&(o=Math.floor(n/2)),o<0&&(o=0);const l=new Uint8ClampedArray(s.length);for(let u=0;u<n;u++)for(let d=0;d<a;d++){const c=(u*a+d)*4;let f=-1;d<o?u<o?f=Math.sqrt(Math.pow(o-d-1,2)+Math.pow(o-u-1,2)):u>n-o-1&&(f=Math.sqrt(Math.pow(o-d-1,2)+Math.pow(u-(n-o),2))):d>a-o-1&&(u<o?f=Math.sqrt(Math.pow(d-(a-o),2)+Math.pow(o-u-1,2)):u>n-o-1&&(f=Math.sqrt(Math.pow(d-(a-o),2)+Math.pow(u-(n-o),2)))),Math.round(f)>o?(l[c]=255,l[c+1]=255,l[c+2]=255,l[c+3]=i||t.toUpperCase()==="PNG"?0:255):(l[c]=s[c],l[c+1]=s[c+1],l[c+2]=s[c+2],l[c+3]=i||t.toUpperCase()==="PNG"?s[c+3]:255)}return new ImageData(l,a,n)},IP=(r,e,t,i,s,a=1e4)=>{const n=new Image;n.src=r;const o=document.createElement("canvas"),l=o.getContext("2d");return o.width=a,o.height=a,l.drawImage(n,0,0,e,t,0,0,i,s),l.getImageData(0,0,i,s)},$P=(r,e)=>{const{data:t,width:i,height:s}=r,a=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let l=0;l<i;l++){const h=(o*i+l)*4;a[h]=Math.max(Math.min(t[h]+e,255),0),a[h+1]=Math.max(Math.min(t[h+1]+e,255),0),a[h+2]=Math.max(Math.min(t[h+2]+e,255),0),a[h+3]=t[h+3]}return new ImageData(a,i,s)},DP=(r,e,t=!1)=>{const{data:i,width:s,height:a}=r,n=new Uint8ClampedArray(i.length);for(let l=0;l<a;l++)for(let h=0;h<s;h++){const u=(l*s+h)*4;i[u+3]===0?(n[u]=255,n[u+1]=255,n[u+2]=255):(n[u]=i[u],n[u+1]=i[u+1],n[u+2]=i[u+2]);let d=i[u+3];t?d=Math.max(Math.min(Math.floor(255*e),255),0):d=Math.max(Math.min(Math.floor(d+255*e),255),0),n[u+3]=d}return new ImageData(n,s,a)},NP=(r,e,t,i)=>{const{data:s,width:a,height:n}=r,{data:o,width:l,height:h}=e;let u=t,d=i;t+h>n&&(u=n-h),i+l>a&&(d=a-l);const c=new Uint8ClampedArray(s.length);for(let p=0;p<n;p++)for(let g=0;g<a;g++){const y=(p*a+g)*4;if(g<d||g>d+l||p<=u||p>=u+h)c[y]=s[y],c[y+1]=s[y+1],c[y+2]=s[y+2],c[y+3]=s[y+3];else{const _=(p*a+g-((u+1)*a+(p-(u+1))*(a-l))+l-d-1)*4,T=[o[_],o[_+1],o[_+2],o[_+3]],m=[s[y],s[y+1],s[y+2],s[y+3]],w=Up(T,m);c[y]=w[0],c[y+1]=w[1],c[y+2]=w[2],c[y+3]=w[3]}}return new ImageData(c,a,n)},LP=(r,e,t,i,s,a=10)=>{const{data:n,width:o,height:l}=r;let h=s,u=i,d=e,c=t;h<0?h=0:h>o&&(h=o),u<0?u=0:u>l&&(u=l),d<1?d=1:d>o&&(d=o),c<1?c=1:c>l&&(c=l),h+d>o&&(d=o-h),u+c>l&&(c=l-u);const f=new Uint8ClampedArray(n.length);for(let g=0;g<l;g++)for(let y=0;y<o;y++){const _=(g*o+y)*4;if(y>=h&&y<=h+d&&g>=u&&g<=u+c){const T=Math.floor((y-h)/a),m=Math.floor((g-u)/a);let w=Math.floor(a*(T+1)-a/2+h),O=Math.floor(a*(m+1)-a/2+u);w>o-1&&(w=o-1),O>l-1&&(O=l-1);const k=(O*o+w)*4;f[_]=n[k],f[_+1]=n[k+1],f[_+2]=n[k+2],f[_+3]=n[k+3]}else f[_]=n[_],f[_+1]=n[_+1],f[_+2]=n[_+2],f[_+3]=n[_+3]}return new ImageData(f,o,l)},FP=async(r,e,t,i,s,a)=>{const n=s/100;if(["JPG","JPEG"].includes(i.toUpperCase())){const o=new Image;o.src=r;const l=document.createElement("canvas"),h=l.getContext("2d");l.width=e,l.height=t,h.drawImage(o,0,0,e,t),l.toBlob(u=>{a(u)},`image/${i.toLowerCase()}`,n)}else{const o=Math.floor(n*256),l=ye.encode([r.data.buffer],e,t,o),h=new Blob([l]);a&&a(h)}},UP=(r,e,t={backgroundColor:{r:0,g:0,b:0,a:255},changeIntoColor:{r:0,g:0,b:0,a:0}})=>{if(e&&t){const{data:i,width:s,height:a}=r,{data:n}=e,o=new Uint8ClampedArray(i.length),{backgroundColor:l,changeIntoColor:h}=t;for(let d=0;d<a;d++)for(let c=0;c<s;c++){const f=(d*s+c)*4,p=n[f],g=n[f+1],y=n[f+2],_=n[f+3];p===l.r&&g===l.g&&y===l.b&&_===l.a&&h.a!==0?(o[f]=h.r,o[f+1]=h.g,o[f+2]=h.b,o[f+3]=h.a):(o[f]=i[f],o[f+1]=i[f+1],o[f+2]=i[f+2],o[f+3]=i[f+3])}return new ImageData(o,s,a)}return r},Fp=(r,e)=>{const{data:t,width:i,height:s}=r,a=new Uint8ClampedArray(t.length);for(let o=0;o<s;o++)for(let l=0;l<i;l++){const h=(o*i+l)*4;for(let u=0;u<3;u++){const d=h+u;l===0||l===i-1||o===0||o===s-1?a[d]=t[d]:a[d]=e[0]*t[d-i*4-4]+e[1]*t[d-i*4]+e[2]*t[d-i*4+4]+e[3]*t[d-4]+e[4]*t[d]+e[5]*t[d+4]+e[6]*t[d+i*4-4]+e[7]*t[d+i*4]+e[8]*t[d+i*4+4]}a[h+3]=t[h+3]}return new ImageData(a,i,s)},Up=(r,e)=>{if(r&&r.length===4&&e&&e.length===4){const t=r[3],i=e[3];if(t===255||i===0)return r;if(t===0)return e;{const s=t/255,a=i/255,n=Math.max(Math.min(Math.floor(r[0]*s+e[0]*a*(1-s)),255),0),o=Math.max(Math.min(Math.floor(r[1]*s+e[1]*a*(1-s)),255),0),l=Math.max(Math.min(Math.floor(r[2]*s+e[2]*a*(1-s)),255),0),h=Math.max(Math.min(Math.floor((s+a*(1-s))*255),255),0);return[n,o,l,h]}}return[255,255,255,255]},Gp=function(r,e,t){const i=new Array(r*r),s=function(o){const l=o;let h=0,u=0;return{write(d,c){if(d>>>c)throw new Error("length over");for(;h+c>=8;)l.writeByte(255&(d<<h|u)),c-=8-h,d>>>=8-h,u=0,h=0;u=d<<h|u,h=h+c},flush(){h>0&&l.writeByte(u)}}},a=function(o){const l=1<<o,h=(1<<o)+1;let u=o+1;const d=n();for(let y=0;y<l;y++)d.add(String.fromCharCode(y));d.add(String.fromCharCode(l)),d.add(String.fromCharCode(h));const c=df(),f=s(c);f.write(l,u);let p=0,g=String.fromCharCode(i[p]);for(p+=1;p<i.length;){const y=String.fromCharCode(i[p]);p+=1,d.contains(g+y)?g=g+y:(f.write(d.indexOf(g),u),d.size()<4095&&(d.size()==1<<u&&(u+=1),d.add(g+y)),g=y)}return f.write(d.indexOf(g),u),f.write(h,u),f.flush(),c.toByteArray()},n=function(){const o={};let l=0;return{add(h){if(this.contains(h))throw new Error("dup key:"+h);o[h]=l,l+=1},size(){return l},indexOf(h){return o[h]},contains(h){return typeof o[h]<"u"}}};return{setPixel(o,l,h){i[l*r+o]=h},write(o){o.writeString("GIF87a"),o.writeShort(r),o.writeShort(r),o.writeByte(128),o.writeByte(0),o.writeByte(0),o.writeByte(ea("0x"+e[1]+e[2])),o.writeByte(ea("0x"+e[3]+e[4])),o.writeByte(ea("0x"+e[5]+e[6])),o.writeByte(ea("0x"+t[1]+t[2])),o.writeByte(ea("0x"+t[3]+t[4])),o.writeByte(ea("0x"+t[5]+t[6])),o.writeString(","),o.writeShort(0),o.writeShort(0),o.writeShort(r),o.writeShort(r),o.writeByte(0);const l=2,h=a(l);o.writeByte(l);let u=0;for(;h.length-u>255;)o.writeByte(255),o.writeBytes(h,u,255),u+=255;o.writeByte(h.length-u),o.writeBytes(h,u,h.length-u),o.writeByte(0),o.writeString(";")}}},jp=function(r,e,t,i){const s=Gp(r,e,t);for(let h=0;h<r;h++)for(let u=0;u<r;u++)s.setPixel(u,h,i(u,h));const a=df();s.write(a);const n=x6(),o=a.toByteArray();for(let h=0,u=o.length;h<u;h++)n.writeByte(o[h]);n.flush();let l="";return l+="data:image/gif;base64,",l+=n,l},Rr={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},On={M:0,L:1,H:2,Q:3},hs={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},er={glog:function(r){if(r<1)throw new Error("glog("+r+")");return er.LOG_TABLE[r]},gexp:function(r){for(;r<0;)r+=255;for(;r>=256;)r-=255;return er.EXP_TABLE[r]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)};for(let r=0;r<8;r++)er.EXP_TABLE[r]=1<<r;for(let r=8;r<256;r++)er.EXP_TABLE[r]=er.EXP_TABLE[r-4]^er.EXP_TABLE[r-5]^er.EXP_TABLE[r-6]^er.EXP_TABLE[r-8];for(let r=0;r<255;r++)er.LOG_TABLE[er.EXP_TABLE[r]]=r;const Mt={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(r){let e=r<<10;for(;Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G15)>=0;)e^=Mt.G15<<Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G15);return(r<<10|e)^Mt.G15_MASK},getBCHTypeNumber:function(r){let e=r<<12;for(;Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G18)>=0;)e^=Mt.G18<<Mt.getBCHDigit(e)-Mt.getBCHDigit(Mt.G18);return r<<12|e},getBCHDigit:function(r){let e=0;for(;r!=0;)e++,r>>>=1;return e},getPatternPosition:function(r){return Mt.PATTERN_POSITION_TABLE[r-1]},getMask:function(r,e,t){switch(r){case hs.PATTERN000:return(e+t)%2==0;case hs.PATTERN001:return e%2==0;case hs.PATTERN010:return t%3==0;case hs.PATTERN011:return(e+t)%3==0;case hs.PATTERN100:return(Math.floor(e/2)+Math.floor(t/3))%2==0;case hs.PATTERN101:return e*t%2+e*t%3==0;case hs.PATTERN110:return(e*t%2+e*t%3)%2==0;case hs.PATTERN111:return(e*t%3+(e+t)%2)%2==0;default:throw new Error("bad maskPattern:"+r)}},getErrorCorrectPolynomial:function(r){let e=new ya([1],0);for(let t=0;t<r;t++)e=e.multiply(new ya([1,er.gexp(t)],0));return e},getLengthInBits:function(r,e){if(1<=e&&e<10)switch(r){case Rr.MODE_NUMBER:return 10;case Rr.MODE_ALPHA_NUM:return 9;case Rr.MODE_8BIT_BYTE:return 8;case Rr.MODE_KANJI:return 8;default:throw new Error("mode:"+r)}else if(e<27)switch(r){case Rr.MODE_NUMBER:return 12;case Rr.MODE_ALPHA_NUM:return 11;case Rr.MODE_8BIT_BYTE:return 16;case Rr.MODE_KANJI:return 10;default:throw new Error("mode:"+r)}else if(e<41)switch(r){case Rr.MODE_NUMBER:return 14;case Rr.MODE_ALPHA_NUM:return 13;case Rr.MODE_8BIT_BYTE:return 16;case Rr.MODE_KANJI:return 12;default:throw new Error("mode:"+r)}else throw new Error("type:"+e)},getLostPoint:function(r){const e=r.getModuleCount();let t=0;for(let a=0;a<e;a++)for(let n=0;n<e;n++){let o=0;const l=r.isDark(a,n);for(let h=-1;h<=1;h++)if(!(a+h<0||e<=a+h))for(let u=-1;u<=1;u++)n+u<0||e<=n+u||h==0&&u==0||l==r.isDark(a+h,n+u)&&o++;o>5&&(t+=3+o-5)}for(let a=0;a<e-1;a++)for(let n=0;n<e-1;n++){let o=0;r.isDark(a,n)&&o++,r.isDark(a+1,n)&&o++,r.isDark(a,n+1)&&o++,r.isDark(a+1,n+1)&&o++,(o==0||o==4)&&(t+=3)}for(let a=0;a<e;a++)for(let n=0;n<e-6;n++)r.isDark(a,n)&&!r.isDark(a,n+1)&&r.isDark(a,n+2)&&r.isDark(a,n+3)&&r.isDark(a,n+4)&&!r.isDark(a,n+5)&&r.isDark(a,n+6)&&(t+=40);for(let a=0;a<e;a++)for(let n=0;n<e-6;n++)r.isDark(n,a)&&!r.isDark(n+1,a)&&r.isDark(n+2,a)&&r.isDark(n+3,a)&&r.isDark(n+4,a)&&!r.isDark(n+5,a)&&r.isDark(n+6,a)&&(t+=40);let i=0;for(let a=0;a<e;a++)for(let n=0;n<e;n++)r.isDark(n,a)&&i++;const s=Math.abs(100*i/e/e-50)/5;return t+=s*10,t}};class ya{num;constructor(e,t){if(e.length==null)throw new Error(e.length+"/"+t);let i=0;for(;i<e.length&&e[i]==0;)i++;this.num=new Array(e.length-i+t);for(let s=0;s<e.length-i;s++)this.num[s]=e[s+i]}get(e){return this.num[e]}getLength(){return this.num.length}multiply(e){const t=new Array(this.getLength()+e.getLength()-1);for(let i=0;i<this.getLength();i++)for(let s=0;s<e.getLength();s++)t[i+s]^=er.gexp(er.glog(this.get(i))+er.glog(e.get(s)));return new ya(t,0)}mod(e){if(this.getLength()-e.getLength()<0)return this;const t=er.glog(this.get(0))-er.glog(e.get(0)),i=new Array(this.getLength());for(let s=0;s<this.getLength();s++)i[s]=this.get(s);for(let s=0;s<e.getLength();s++)i[s]^=er.gexp(er.glog(e.get(s))+t);return new ya(i,0).mod(e)}}class Di{totalCount;dataCount;constructor(e,t){this.totalCount=e,this.dataCount=t}static RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]];static getRSBlocks(e,t){const i=Di.getRsBlockTable(e,t);if(i==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);const s=i.length/3,a=[];for(let n=0;n<s;n++){const o=i[n*3+0],l=i[n*3+1],h=i[n*3+2];for(let u=0;u<o;u++)a.push(new Di(l,h))}return a}static getRsBlockTable(e,t){switch(t){case On.L:return Di.RS_BLOCK_TABLE[(e-1)*4+0];case On.M:return Di.RS_BLOCK_TABLE[(e-1)*4+1];case On.Q:return Di.RS_BLOCK_TABLE[(e-1)*4+2];case On.H:return Di.RS_BLOCK_TABLE[(e-1)*4+3];default:return}}}class Bp{buffer;length;constructor(){this.buffer=[],this.length=0}get(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1}put(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)==1)}getLengthInBits(){return this.length}putBit(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}}class GP{mode;data;constructor(e){this.mode=Rr.MODE_8BIT_BYTE,this.data=e}getLength(){return this.data.length}write(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data.charCodeAt(t),8)}}class us{static PAD0=236;static PAD1=17;typeNumber;errorCorrectLevel;modules;moduleCount;dataCache;dataList;constructor(e,t){this.typeNumber=e,this.errorCorrectLevel=On[t],this.modules=[],this.moduleCount=0,this.dataCache=null,this.dataList=[]}addData(e){const t=new GP(e);this.dataList.push(t),this.dataCache=null}isDark(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]}getModuleCount(){return this.moduleCount}make(){if(this.typeNumber<1){let e=1;for(e=1;e<40;e++){const t=Di.getRSBlocks(e,this.errorCorrectLevel),i=new Bp;let s=0;for(let a=0;a<t.length;a++)s+=t[a].dataCount;for(let a=0;a<this.dataList.length;a++){const n=this.dataList[a];i.put(n.mode,4),i.put(n.getLength(),Mt.getLengthInBits(n.mode,e)),n.write(i)}if(i.getLengthInBits()<=s*8)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())}makeImpl(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(let i=0;i<this.moduleCount;i++){this.modules[i]=new Array(this.moduleCount);for(let s=0;s<this.moduleCount;s++)this.modules[i][s]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=us.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)}setupPositionProbePattern(e,t){for(let i=-1;i<=7;i++)if(!(e+i<=-1||this.moduleCount<=e+i))for(let s=-1;s<=7;s++)t+s<=-1||this.moduleCount<=t+s||(0<=i&&i<=6&&(s==0||s==6)||0<=s&&s<=6&&(i==0||i==6)||2<=i&&i<=4&&2<=s&&s<=4?this.modules[e+i][t+s]=!0:this.modules[e+i][t+s]=!1)}getBestMaskPattern(){let e=0,t=0;for(let i=0;i<8;i++){this.makeImpl(!0,i);const s=Mt.getLostPoint(this);(i==0||e>s)&&(e=s,t=i)}return t}createMovieClip(e,t,i){const s=e.createEmptyMovieClip(t,i),a=1;this.make();for(let n=0;n<this.modules.length;n++){const o=n*a;for(let l=0;l<this.modules[n].length;l++){const h=l*a;this.modules[n][l]&&(s.beginFill(0,100),s.moveTo(h,o),s.lineTo(h+a,o),s.lineTo(h+a,o+a),s.lineTo(h,o+a),s.endFill())}}return s}setupTimingPattern(){for(let e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(let e=8;e<this.moduleCount-8;e++)this.modules[6][e]==null&&(this.modules[6][e]=e%2==0)}setupPositionAdjustPattern(){const e=Mt.getPatternPosition(this.typeNumber);for(let t=0;t<e.length;t++)for(let i=0;i<e.length;i++){const s=e[t],a=e[i];if(this.modules[s][a]==null)for(let n=-2;n<=2;n++)for(let o=-2;o<=2;o++)n==-2||n==2||o==-2||o==2||n==0&&o==0?this.modules[s+n][a+o]=!0:this.modules[s+n][a+o]=!1}}setupTypeNumber(e){const t=Mt.getBCHTypeNumber(this.typeNumber);for(let i=0;i<18;i++){const s=!e&&(t>>i&1)==1;this.modules[Math.floor(i/3)][i%3+this.moduleCount-8-3]=s}for(let i=0;i<18;i++){const s=!e&&(t>>i&1)==1;this.modules[i%3+this.moduleCount-8-3][Math.floor(i/3)]=s}}setupTypeInfo(e,t){const i=this.errorCorrectLevel<<3|t,s=Mt.getBCHTypeInfo(i);for(let a=0;a<15;a++){const n=!e&&(s>>a&1)==1;a<6?this.modules[a][8]=n:a<8?this.modules[a+1][8]=n:this.modules[this.moduleCount-15+a][8]=n}for(let a=0;a<15;a++){const n=!e&&(s>>a&1)==1;a<8?this.modules[8][this.moduleCount-a-1]=n:a<9?this.modules[8][15-a-1+1]=n:this.modules[8][15-a-1]=n}this.modules[this.moduleCount-8][8]=!e}mapData(e,t){let i=-1,s=this.moduleCount-1,a=7,n=0;for(let o=this.moduleCount-1;o>0;o-=2)for(o==6&&o--;;){for(let l=0;l<2;l++)if(this.modules[s][o-l]==null){let h=!1;n<e.length&&(h=(e[n]>>>a&1)==1),Mt.getMask(t,s,o-l)&&(h=!h),this.modules[s][o-l]=h,a--,a==-1&&(n++,a=7)}if(s+=i,s<0||this.moduleCount<=s){s-=i,i=-i;break}}}static createData(e,t,i){const s=Di.getRSBlocks(e,t),a=new Bp;for(let o=0;o<i.length;o++){const l=i[o];a.put(l.mode,4),a.put(l.getLength(),Mt.getLengthInBits(l.mode,e)),l.write(a)}let n=0;for(let o=0;o<s.length;o++)n+=s[o].dataCount;if(a.getLengthInBits()>n*8)throw new Error("code length overflow. ("+a.getLengthInBits()+">"+n*8+")");for(a.getLengthInBits()+4<=n*8&&a.put(0,4);a.getLengthInBits()%8!=0;)a.putBit(!1);for(;!(a.getLengthInBits()>=n*8||(a.put(us.PAD0,8),a.getLengthInBits()>=n*8));)a.put(us.PAD1,8);return us.createBytes(a,s)}static createBytes(e,t){let i=0,s=0,a=0;const n=new Array(t.length),o=new Array(t.length);for(let d=0;d<t.length;d++){const c=t[d].dataCount,f=t[d].totalCount-c;s=Math.max(s,c),a=Math.max(a,f),n[d]=new Array(c);for(let _=0;_<n[d].length;_++)n[d][_]=255&e.buffer[_+i];i+=c;const p=Mt.getErrorCorrectPolynomial(f),y=new ya(n[d],p.getLength()-1).mod(p);o[d]=new Array(p.getLength()-1);for(let _=0;_<o[d].length;_++){const T=_+y.getLength()-o[d].length;o[d][_]=T>=0?y.get(T):0}}let l=0;for(let d=0;d<t.length;d++)l+=t[d].totalCount;const h=new Array(l);let u=0;for(let d=0;d<s;d++)for(let c=0;c<t.length;c++)d<n[c].length&&(h[u++]=n[c][d]);for(let d=0;d<a;d++)for(let c=0;c<t.length;c++)d<o[c].length&&(h[u++]=o[c][d]);return h}}const Vp=Math.ceil,In=Math.floor,Hp=Math.round;function jP(r,e){const t=uf(r),i=e?.ecc||"H",s=e?.size||256,a=-1,n=e?.padding||0,o=e?.color||"#000000",l=e?.background||"#ffffff",h=new us(a,i);h.addData(t),h.make();const u=h.getModuleCount(),d=(s-n*2)/u,c=n,f=s-n;return jp(s,o,l,function(p,g){if(c<=p&&p<f&&c<=g&&g<f){const y=In((p-c)/d),_=In((g-c)/d);return h.isDark(_,y)?0:1}else return 1})}function BP(r,e){const t=e.x||0,i=e.y||0,s=uf(r),a=e.ctx,n=e.ecc||"H",o=typeof e.size=="number"?In(e.size):256,l=e.padding||0,h=-1,u=e.color||"#000000",d=e.background||"#ffffff",c=new us(h,n);c.addData(s),c.make();const f=c.getModuleCount(),p=(o-l*2)/f;a.fillStyle=d,a.fillRect(t,i,o,o);for(let g=0;g<f;g++)for(let y=0;y<f;y++){const _=Vp((y+1)*p)-In(y*p),T=Vp((g+1)*p)-In(g*p);a.fillStyle=c.isDark(g,y)?u:d,a.fillRect(t+Hp(y*p)+l,i+Hp(g*p)+l,_,T)}}function uu(){let r=null;if(window.ActiveXObject){const e=["Microsoft.XMLHTTP","MSXML6.XMLHTTP","MSXML5.XMLHTTP","MSXML4.XMLHTTP","MSXML3.XMLHTTP","MSXML2.XMLHTTP","MSXML.XMLHTTP"];for(let t=0;t<e.length;t++)try{r=new window.ActiveXObject(e[t]);break}catch{continue}}else r=new XMLHttpRequest;return r}function VP(r){if(!r.action)return{url:"",data:"",boundary:""};const e=r.method.toLowerCase()==="get",t=r.method.toLowerCase()==="post";let i=r.action,s="";const a="---------------------------"+Date.now().toString(16);if(window.FormData)s=new FormData(r),e&&(i=El(i,Mh(s)));else if(e){let n="";for(let o=0;o<r.elements.length;o++){const l=r.elements[o];if(!l.hasAttribute("name"))continue;const h=l.nodeName.toUpperCase()==="INPUT"?l.getAttribute("type")?.toUpperCase():"TEXT";if(h==="FILE")for(let u=0,d=l.files?.length??0;u<d;n+="&"+encodeURIComponent(l.name)+"="+encodeURIComponent(l.files?.[u++].name??""));else(h!=="RADIO"&&h!=="CHECKBOX"||l.checked)&&(n+="&"+encodeURIComponent(l.name)+"="+encodeURIComponent(l.value))}i=El(i,n)}else if(t){const n=[];if(r.enctype==="application/x-www-form-urlencoded"){for(let o=0;o<r.elements.length;o++){const l=r.elements[o];l.hasAttribute("name")&&n.push(encodeURIComponent(l.name)+"="+encodeURIComponent(l.value))}s=n.join("&")}else if(r.enctype==="text/plain"){for(let o=0;o<r.elements.length;o++){const l=r.elements[o];l.hasAttribute("name")&&n.push(l.name+"="+l.value)}s=n.join(`\r
43
43
  `)}else if(r.enctype==="multipart/form-data"){for(let o=0;o<r.elements.length;o++){const l=r.elements[o];if(!l.hasAttribute("name"))continue;if((l.nodeName.toUpperCase()==="INPUT"?l.getAttribute("type")?.toUpperCase():"TEXT")==="FILE")for(let u=0,d=l.files?.length??0;u<d;u++){const c=l.files?.[u];n.push('Content-Disposition: form-data; name="'+l.name+'"; filename="'+c?.name+`"\r
44
44
  Content-Type: `+c?.type+`\r
45
45
  \r