@adaptive-ai/sdk 0.1.16 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
1
  # adaptive-ai sdk
2
2
 
3
3
  SDK for building adaptive.ai apps.
4
+
5
+ To make changes:
6
+ 1. increment the version, merge+publish it
7
+ 2. update the sdk version in the template, and release that
@@ -1,8 +1,8 @@
1
- import {useState,useEffect,useRef,useCallback}from'react';import {useMutation}from'@tanstack/react-query';import {identity}from'lodash';import {nanoid}from'nanoid';import yt from'superjson';import {rpcClient,RpcError}from'typed-rpc';var An=Object.create;var bt=Object.defineProperty;var vn=Object.getOwnPropertyDescriptor;var _n=Object.getOwnPropertyNames;var bn=Object.getPrototypeOf,En=Object.prototype.hasOwnProperty;var Ze=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var Sn=(i,r,S,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of _n(r))!En.call(i,e)&&e!==S&&bt(i,e,{get:()=>r[e],enumerable:!(c=vn(r,e))||c.enumerable});return i};var Et=(i,r,S)=>(S=i!=null?An(bn(i)):{},Sn(bt(S,"default",{value:i,enumerable:true}),i));var Ft=Ze((nt,rt)=>{(i=>{let r=(()=>{let R=0;return {escape:function(s){return s.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")},isDataUrl:function(s){return s.search(/^(data:)/)!==-1},canvasToBlob:function(s){return s.toBlob?new Promise(function(w){s.toBlob(w);}):(w=>new Promise(function(b){var A=a(w.toDataURL().split(",")[1]),T=A.length,m=new Uint8Array(T);for(let h=0;h<T;h++)m[h]=A.charCodeAt(h);b(new Blob([m],{type:"image/png"}));}))(s)},resolveUrl:function(s,w){var b=globalThis.document.implementation.createHTMLDocument(),A=b.createElement("base"),T=(b.head.appendChild(A),b.createElement("a"));return b.body.appendChild(T),A.href=w,T.href=s,T.href},getAndEncode:function(s){let w=y.impl.urlCache.find(function(b){return b.url===s});return w||(w={url:s,promise:null},y.impl.urlCache.push(w)),w.promise===null&&(y.impl.options.cacheBust&&(s+=(/\?/.test(s)?"&":"?")+new Date().getTime()),w.promise=new Promise(function(b){let A=new XMLHttpRequest;function T(P){console.error(P),b("");}function m(){var P=y.impl.options.imagePlaceholder;P?b(P):T("Status:"+A.status+" while fetching resource: "+s);}if(A.timeout=y.impl.options.httpTimeout,A.onerror=m,A.ontimeout=m,A.onloadend=function(){if(A.readyState===XMLHttpRequest.DONE){var P=A.status;if(P===0&&s.toLowerCase().startsWith("file://")||200<=P&&P<=300&&A.response!==null){P=A.response,P instanceof Blob||T("Expected response to be a Blob, but got: "+typeof P);let x=new globalThis.FileReader;x.onloadend=function(){var O=x.result;b(O);};try{x.readAsDataURL(P);}catch(O){T("Failed to read the response as Data URL: "+O.toString());}}else m();}},0<y.impl.options.useCredentialsFilters.length&&(y.impl.options.useCredentials=0<y.impl.options.useCredentialsFilters.filter(P=>0<=s.search(P)).length),y.impl.options.useCredentials&&(A.withCredentials=true),y.impl.options.corsImg&&s.indexOf("http")===0&&s.indexOf(globalThis.window.location.origin)===-1){var h=(y.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";A.open(h,(y.impl.options.corsImg.url||"").replace("#{cors}",s),true);let P=false,x=y.impl.options.corsImg.headers||{},O=(Object.keys(x).forEach(function(H){x[H].indexOf("application/json")!==-1&&(P=true),A.setRequestHeader(H,x[H]);}),(H=>{try{return JSON.parse(JSON.stringify(H))}catch(D){T("corsImg.data is missing or invalid:"+D.toString());}})(y.impl.options.corsImg.data||""));Object.keys(O).forEach(function(H){typeof O[H]=="string"&&(O[H]=O[H].replace("#{cors}",s));}),A.responseType="blob",A.send(P?JSON.stringify(O):O);}else A.open("GET",s,true),A.responseType="blob",A.send();})),w.promise},uid:function(){return "u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+R++},asArray:function(s){var w=[],b=s.length;for(let A=0;A<b;A++)w.push(s[A]);return w},escapeXhtml:function(s){return s.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(s){return s!=="data:,"?new Promise(function(w,b){let A=globalThis.document.createElementNS("http://www.w3.org/2000/svg","svg"),T=new globalThis.Image;y.impl.options.useCredentials&&(T.crossOrigin="use-credentials"),T.onload=function(){globalThis.document.body.removeChild(A),globalThis.window&&globalThis.window.requestAnimationFrame?globalThis.window.requestAnimationFrame(function(){w(T);}):w(T);},T.onerror=m=>{globalThis.document.body.removeChild(A),b(m);},A.appendChild(T),T.src=s,globalThis.document.body.appendChild(A);}):Promise.resolve()},width:function(s){var w=_(s,"width");if(!isNaN(w))return w;var w=_(s,"border-left-width"),b=_(s,"border-right-width");return s.scrollWidth+w+b},height:function(s){var w=_(s,"height");if(!isNaN(w))return w;var w=_(s,"border-top-width"),b=_(s,"border-bottom-width");return s.scrollHeight+w+b},getWindow:g,isElement:u,isElementHostForOpenShadowRoot:function(s){return u(s)&&s.shadowRoot!==null},isShadowRoot:U,isInShadowRoot:d,isHTMLElement:function(s){return s instanceof g(s).HTMLElement},isHTMLCanvasElement:function(s){return s instanceof g(s).HTMLCanvasElement},isHTMLInputElement:function(s){return s instanceof g(s).HTMLInputElement},isHTMLImageElement:function(s){return s instanceof g(s).HTMLImageElement},isHTMLLinkElement:function(s){return s instanceof g(s).HTMLLinkElement},isHTMLScriptElement:function(s){return s instanceof g(s).HTMLScriptElement},isHTMLStyleElement:function(s){return s instanceof g(s).HTMLStyleElement},isHTMLTextAreaElement:function(s){return s instanceof g(s).HTMLTextAreaElement},isShadowSlotElement:function(s){return d(s)&&s instanceof g(s).HTMLSlotElement},isSVGElement:function(s){return s instanceof g(s).SVGElement},isSVGRectElement:function(s){return s instanceof g(s).SVGRectElement},isDimensionMissing:function(s){return isNaN(s)||s<=0}};function g(s){return s=s?s.ownerDocument:void 0,(s?s.defaultView:void 0)||globalThis.window||i}function U(s){return s instanceof g(s).ShadowRoot}function d(s){return s!=null&&s.getRootNode!==void 0&&U(s.getRootNode())}function u(s){return s instanceof g(s).Element}function _(s,w){if(s.nodeType===E){let b=o(s).getPropertyValue(w);if(b.slice(-2)==="px")return b=b.slice(0,-2),parseFloat(b)}return NaN}})(),S=(()=>{let R=/url\(\s*(["']?)((?:\\.|[^\\)])+)\1\s*\)/gm;return {inlineAll:function(_,s,w){return g(_)?Promise.resolve(_).then(U).then(function(b){let A=Promise.resolve(_);return b.forEach(function(T){A=A.then(function(m){return u(m,T,s,w)});}),A}):Promise.resolve(_)},shouldProcess:g,impl:{readUrls:U,inline:u,urlAsRegex:d}};function g(_){return _.search(R)!==-1}function U(_){for(var s,w=[];(s=R.exec(_))!==null;)w.push(s[2]);return w.filter(function(b){return !r.isDataUrl(b)})}function d(_){return new RegExp(`url\\((["']?)(${r.escape(_)})\\1\\)`,"gm")}function u(_,s,w,b){return Promise.resolve(s).then(function(A){return w?r.resolveUrl(A,w):A}).then(b||r.getAndEncode).then(function(A){var T=d(s);return _.replace(T,`url($1${A}$1)`)})}})(),c={resolveAll:function(){return e().then(function(R){return Promise.all(R.map(function(g){return g.resolve()}))}).then(function(R){return R.join(`
2
- `)})},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(globalThis.document.styleSheets)).then(function(g){let U=[];return g.forEach(function(d){var u=Object.getPrototypeOf(d);if(Object.prototype.hasOwnProperty.call(u,"cssRules"))try{r.asArray(d.cssRules||[]).forEach(U.push.bind(U));}catch(_){console.error("domtoimage: Error while reading CSS rules from: "+d.href,_.toString());}}),U}).then(function(g){return g.filter(function(U){return U.type===CSSRule.FONT_FACE_RULE}).filter(function(U){return S.shouldProcess(U.style.getPropertyValue("src"))})}).then(function(g){return g.map(R)});function R(g){return {resolve:function(){var U=(g.parentStyleSheet||{}).href;return S.inlineAll(g.cssText,U)},src:function(){return g.style.getPropertyValue("src")}}}}let t={inlineAll:function R(g){if(!r.isElement(g))return Promise.resolve(g);return U(g).then(function(){return r.isHTMLImageElement(g)?p(g).inline():Promise.all(r.asArray(g.childNodes).map(function(d){return R(d)}))});function U(d){let u=["background","background-image"],_=u.map(function(s){let w=d.style.getPropertyValue(s),b=d.style.getPropertyPriority(s);return w?S.inlineAll(w).then(function(A){d.style.setProperty(s,A,b);}):Promise.resolve()});return Promise.all(_).then(function(){return d})}},impl:{newImage:p}};function p(R){return {inline:function(g){return r.isDataUrl(R.src)?Promise.resolve():Promise.resolve(R.src).then(g||r.getAndEncode).then(function(U){return new Promise(function(d){R.onload=d,R.onerror=d,R.src=U;})})}}}let l={copyDefaultStyles:true,imagePlaceholder:void 0,cacheBust:false,useCredentials:false,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},y={toSvg:n,toPng:function(R,g){return f(R,g).then(function(U){return U.toDataURL()})},toJpeg:function(R,g){return f(R,g).then(function(U){return U.toDataURL("image/jpeg",(g?g.quality:void 0)||1)})},toBlob:function(R,g){return f(R,g).then(r.canvasToBlob)},toPixelData:function(R,g){return f(R,g).then(function(U){return U.getContext("2d").getImageData(0,0,r.width(R),r.height(R)).data})},toCanvas:f,impl:{fontFaces:c,images:t,util:r,inliner:S,urlCache:[],options:{},copyOptions:function(R){R.copyDefaultStyles===void 0?y.impl.options.copyDefaultStyles=l.copyDefaultStyles:y.impl.options.copyDefaultStyles=R.copyDefaultStyles,y.impl.options.imagePlaceholder=(R.imagePlaceholder===void 0?l:R).imagePlaceholder,y.impl.options.cacheBust=(R.cacheBust===void 0?l:R).cacheBust,y.impl.options.corsImg=(R.corsImg===void 0?l:R).corsImg,y.impl.options.useCredentials=(R.useCredentials===void 0?l:R).useCredentials,y.impl.options.useCredentialsFilters=(R.useCredentialsFilters===void 0?l:R).useCredentialsFilters,y.impl.options.httpTimeout=(R.httpTimeout===void 0?l:R).httpTimeout,y.impl.options.styleCaching=(R.styleCaching===void 0?l:R).styleCaching;}}},E=(typeof nt=="object"&&typeof rt=="object"?rt.exports=y:i.domtoimage=y,(globalThis.Node===void 0?void 0:globalThis.Node.ELEMENT_NODE)||1),o=(i===void 0?void 0:i.getComputedStyle)||(globalThis.window===void 0?void 0:globalThis.window.getComputedStyle)||globalThis.getComputedStyle,a=(i===void 0?void 0:i.atob)||(globalThis.window===void 0?void 0:globalThis.window.atob)||globalThis.atob;function n(R,g){y.impl.util.getWindow(R);let d=(g=g||{},y.impl.copyOptions(g),[]);return Promise.resolve(R).then(function(u){if(u.nodeType===E)return u;var _=u,s=globalThis.document.createElement("span");return _.replaceWith(s),s.append(u),d.push({child:_,wrapper:s}),s}).then(function(u){return (function _(s,w,b,A){let T=w.filter;if(s===v||r.isHTMLScriptElement(s)||r.isHTMLStyleElement(s)||r.isHTMLLinkElement(s)||b!==null&&T&&!T(s))return Promise.resolve();return Promise.resolve(s).then(m).then(h).then(function(D){return O(D,x(s))}).then(P).then(function(D){return H(D,s)});function m(D){return r.isHTMLCanvasElement(D)?r.makeImage(D.toDataURL()):D.cloneNode(false)}function h(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,false),Promise.resolve(D)}function P(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,true),Promise.resolve(D)}function x(D){return r.isElementHostForOpenShadowRoot(D)?D.shadowRoot:D}function O(D,Q){let B=K(Q),F=Promise.resolve();if(B.length!==0){let V=o($(Q));r.asArray(B).forEach(function(z){F=F.then(function(){return _(z,w,V).then(function(q){q&&D.appendChild(q);})});});}return F.then(function(){return D});function $(V){return r.isShadowRoot(V)?V.host:V}function K(V){if(r.isShadowSlotElement(V)){let z=V.assignedNodes();if(z&&0<z.length)return z}return V.childNodes}}function H(D,Q){return !r.isElement(D)||r.isShadowSlotElement(Q)?Promise.resolve(D):Promise.resolve().then(F).then($).then(K).then(V).then(B).then(function(){return D});function B(){r.isHTMLImageElement(D)&&(D.removeAttribute("loading"),Q.srcset||Q.sizes)&&(D.removeAttribute("srcset"),D.removeAttribute("sizes"),D.src=Q.currentSrc||Q.src);}function F(){function z(G,W){W.font=G.font,W.fontFamily=G.fontFamily,W.fontFeatureSettings=G.fontFeatureSettings,W.fontKerning=G.fontKerning,W.fontSize=G.fontSize,W.fontStretch=G.fontStretch,W.fontStyle=G.fontStyle,W.fontVariant=G.fontVariant,W.fontVariantCaps=G.fontVariantCaps,W.fontVariantEastAsian=G.fontVariantEastAsian,W.fontVariantLigatures=G.fontVariantLigatures,W.fontVariantNumeric=G.fontVariantNumeric,W.fontVariationSettings=G.fontVariationSettings,W.fontWeight=G.fontWeight;}function q(G,W){let ie=o(G);ie.cssText?(W.style.cssText=ie.cssText,z(ie,W.style)):(I(w,G,ie,b,W),b===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(ae=>W.style.removeProperty(ae)),["left","right","top","bottom"].forEach(ae=>{W.style.getPropertyValue(ae)&&W.style.setProperty(ae,"0px");})));}q(Q,D);}function $(){let z=r.uid();function q(G){let W=o(Q,G),ie=W.getPropertyValue("content");if(ie!==""&&ie!=="none"){let Y=function(){let J=`.${z}:`+G,ne=(W.cssText?oe:j)();return globalThis.document.createTextNode(J+`{${ne}}`);function oe(){return `${W.cssText} content: ${ie};`}function j(){return r.asArray(W).map(ee).join("; ")+";";function ee(X){let le=W.getPropertyValue(X),ge=W.getPropertyPriority(X)?" !important":"";return X+": "+le+ge}}};let Z=D.getAttribute("class")||"",te=(D.setAttribute("class",Z+" "+z),globalThis.document.createElement("style"));te.appendChild(Y()),D.appendChild(te);}}[":before",":after"].forEach(function(G){q(G);});}function K(){r.isHTMLTextAreaElement(Q)&&(D.innerHTML=Q.value),r.isHTMLInputElement(Q)&&D.setAttribute("value",Q.value);}function V(){r.isSVGElement(D)&&(D.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.isSVGRectElement(D))&&["width","height"].forEach(function(z){let q=D.getAttribute(z);q&&D.style.setProperty(z,q);});}}})(u,g,null)}).then(g.disableEmbedFonts?Promise.resolve(R):C).then(g.disableInlineImages?Promise.resolve(R):M).then(function(u){g.bgcolor&&(u.style.backgroundColor=g.bgcolor),g.width&&(u.style.width=g.width+"px"),g.height&&(u.style.height=g.height+"px"),g.style&&Object.keys(g.style).forEach(function(s){u.style[s]=g.style[s];});let _=null;return typeof g.onclone=="function"&&(_=g.onclone(u)),Promise.resolve(_).then(function(){return u})}).then(function(u){let _=g.width||r.width(R),s=g.height||r.height(R);return Promise.resolve(u).then(function(w){return w.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(w)}).then(r.escapeXhtml).then(function(w){var b=(r.isDimensionMissing(_)?' width="100%"':` width="${_}"`)+(r.isDimensionMissing(s)?' height="100%"':` height="${s}"`);return `<svg xmlns="http://www.w3.org/2000/svg"${(r.isDimensionMissing(_)?"":` width="${_}"`)+(r.isDimensionMissing(s)?"":` height="${s}"`)}><foreignObject${b}>${w}</foreignObject></svg>`}).then(function(w){return "data:image/svg+xml;charset=utf-8,"+w})}).then(function(u){for(;0<d.length;){var _=d.pop();_.wrapper.replaceWith(_.child);}return u}).then(function(u){return y.impl.urlCache=[],v&&(globalThis.document.body.removeChild(v),v=null),N&&clearTimeout(N),N=setTimeout(()=>{N=null,k={};},2e4),u})}function f(R,g){return n(R,g=g||{}).then(r.makeImage).then(function(U){var d=typeof g.scale!="number"?1:g.scale,u=((s,w)=>{let b=g.width||r.width(s),A=g.height||r.height(s);return r.isDimensionMissing(b)&&(b=r.isDimensionMissing(A)?300:2*A),r.isDimensionMissing(A)&&(A=b/2),(s=globalThis.document.createElement("canvas")).width=b*w,s.height=A*w,g.bgcolor&&((w=s.getContext("2d")).fillStyle=g.bgcolor,w.fillRect(0,0,s.width,s.height)),s})(R,d),_=u.getContext("2d");return _.msImageSmoothingEnabled=false,_.imageSmoothingEnabled=false,U&&(_.scale(d,d),_.drawImage(U,0,0)),u})}let v=null;function C(R){return c.resolveAll().then(function(g){var U;return g!==""&&(U=globalThis.document.createElement("style"),R.appendChild(U),U.appendChild(globalThis.document.createTextNode(g))),R})}function M(R){return t.inlineAll(R).then(function(){return R})}function I(R,g,U,d,u){let _=y.impl.options.copyDefaultStyles?((w,b)=>{var A,T=(P=>(w.styleCaching!=="relaxed"?P:P.filter((x,O,H)=>O===0||O===H.length-1)).join(">"))(b=(P=>{var x=[];do if(P.nodeType===E){var O=P.tagName;if(x.push(O),L.includes(O))break}while(P=P.parentNode);return x})(b));{if(k[T])return k[T];b=((P,x)=>{let O=P.body;do{var H=x.pop(),H=P.createElement(H);O.appendChild(H),O=H;}while(0<x.length);return O.textContent="\u200B",O})((A=(()=>{if(v)return v.contentWindow;x=globalThis.document.characterSet||"UTF-8",P=(P=globalThis.document.doctype)?(`<!DOCTYPE ${F(P.name)} ${F(P.publicId)} `+F(P.systemId)).trim()+">":"",(v=globalThis.document.createElement("iframe")).id="domtoimage-sandbox-"+r.uid(),v.style.top="-9999px",v.style.visibility="hidden",v.style.position="fixed",globalThis.document.body.appendChild(v);var P,x,O=v,H="domtoimage-sandbox";try{return O.contentWindow.document.write(P+`<html><head><meta charset='${x}'><title>${H}</title></head><body></body></html>`),O.contentWindow}catch{}var D=globalThis.document.createElement("meta");D.setAttribute("charset",x);try{var Q=globalThis.document.implementation.createHTMLDocument(H),B=(Q.head.appendChild(D),P+Q.documentElement.outerHTML);return O.setAttribute("srcdoc",B),O.contentWindow}catch{}return O.contentDocument.head.appendChild(D),O.contentDocument.title=H,O.contentWindow;function F($){var K;return $?((K=globalThis.document.createElement("div")).innerText=$,K.innerHTML):""}})()).document,b),A=((P,x)=>{let O={},H=P.getComputedStyle(x);return r.asArray(H).forEach(function(D){O[D]=D==="width"||D==="height"?"auto":H.getPropertyValue(D);}),O})(A,b);var m=b;do{var h=m.parentElement;h!==null&&h.removeChild(m),m=h;}while(m&&m.tagName!=="BODY");return k[T]=A}})(R,g):{},s=u.style;r.asArray(U).forEach(function(w){var b,A,T,m;R.filterStyles&&!R.filterStyles(g,w)||(A=U.getPropertyValue(w),T=_[w],b=d?d.getPropertyValue(w):void 0,s.getPropertyValue(w))||(A!==T||d&&A!==b)&&(T=U.getPropertyPriority(w),b=s,A=A,T=T,m=0<=["background-clip"].indexOf(w=w),T?(b.setProperty(w,A,T),m&&b.setProperty("-webkit-"+w,A,T)):(b.setProperty(w,A),m&&b.setProperty("-webkit-"+w,A)));});}let N=null,k={},L=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];})(nt);});var kt=Ze(()=>{});var on=Ze((Or,rn)=>{var ht=typeof Map=="function"&&Map.prototype,ot=Object.getOwnPropertyDescriptor&&ht?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ke=ht&&ot&&typeof ot.get=="function"?ot.get:null,Nt=ht&&Map.prototype.forEach,pt=typeof Set=="function"&&Set.prototype,it=Object.getOwnPropertyDescriptor&&pt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xe=pt&&it&&typeof it.get=="function"?it.get:null,Bt=pt&&Set.prototype.forEach,Mn=typeof WeakMap=="function"&&WeakMap.prototype,ke=Mn?WeakMap.prototype.has:null,Ln=typeof WeakSet=="function"&&WeakSet.prototype,Ne=Ln?WeakSet.prototype.has:null,Dn=typeof WeakRef=="function"&&WeakRef.prototype,Ht=Dn?WeakRef.prototype.deref:null,Fn=Boolean.prototype.valueOf,kn=Object.prototype.toString,Nn=Function.prototype.toString,Bn=String.prototype.match,gt=String.prototype.slice,Ee=String.prototype.replace,Hn=String.prototype.toUpperCase,Qt=String.prototype.toLowerCase,Yt=RegExp.prototype.test,$t=Array.prototype.concat,we=Array.prototype.join,Qn=Array.prototype.slice,Wt=Math.floor,lt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,at=Object.getOwnPropertySymbols,ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Me=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Be=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Me||true)?Symbol.toStringTag:null,Jt=Object.prototype.propertyIsEnumerable,zt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function Gt(i,r){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||Yt.call(/e/,r))return r;var S=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var c=i<0?-Wt(-i):Wt(i);if(c!==i){var e=String(c),t=gt.call(r,e.length+1);return Ee.call(e,S,"$&_")+"."+Ee.call(Ee.call(t,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(r,S,"$&_")}var ut=kt(),Vt=ut.custom,qt=en(Vt)?Vt:null,Zt={__proto__:null,double:'"',single:"'"},$n={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};rn.exports=function i(r,S,c,e){var t=S||{};if(ve(t,"quoteStyle")&&!ve(Zt,t.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(t,"maxStringLength")&&(typeof t.maxStringLength=="number"?t.maxStringLength<0&&t.maxStringLength!==1/0:t.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var p=ve(t,"customInspect")?t.customInspect:true;if(typeof p!="boolean"&&p!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(t,"indent")&&t.indent!==null&&t.indent!==" "&&!(parseInt(t.indent,10)===t.indent&&t.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(t,"numericSeparator")&&typeof t.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=t.numericSeparator;if(typeof r>"u")return "undefined";if(r===null)return "null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return nn(r,t);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var y=String(r);return l?Gt(r,y):y}if(typeof r=="bigint"){var E=String(r)+"n";return l?Gt(r,E):E}var o=typeof t.depth>"u"?5:t.depth;if(typeof c>"u"&&(c=0),c>=o&&o>0&&typeof r=="object")return ft(r)?"[Array]":"[Object]";var a=ar(t,c);if(typeof e>"u")e=[];else if(tn(e,r)>=0)return "[Circular]";function n(b,A,T){if(A&&(e=Qn.call(e),e.push(A)),T){var m={depth:t.depth};return ve(t,"quoteStyle")&&(m.quoteStyle=t.quoteStyle),i(b,m,c+1,e)}return i(b,t,c+1,e)}if(typeof r=="function"&&!Kt(r)){var f=Jn(r),v=qe(r,n);return "[Function"+(f?": "+f:" (anonymous)")+"]"+(v.length>0?" { "+we.call(v,", ")+" }":"")}if(en(r)){var C=Me?Ee.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):ct.call(r);return typeof r=="object"&&!Me?Fe(C):C}if(rr(r)){for(var M="<"+Qt.call(String(r.nodeName)),I=r.attributes||[],N=0;N<I.length;N++)M+=" "+I[N].name+"="+jt(Wn(I[N].value),"double",t);return M+=">",r.childNodes&&r.childNodes.length&&(M+="..."),M+="</"+Qt.call(String(r.nodeName))+">",M}if(ft(r)){if(r.length===0)return "[]";var k=qe(r,n);return a&&!ir(k)?"["+dt(k,a)+"]":"[ "+we.call(k,", ")+" ]"}if(Gn(r)){var L=qe(r,n);return !("cause"in Error.prototype)&&"cause"in r&&!Jt.call(r,"cause")?"{ ["+String(r)+"] "+we.call($t.call("[cause]: "+n(r.cause),L),", ")+" }":L.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+we.call(L,", ")+" }"}if(typeof r=="object"&&p){if(qt&&typeof r[qt]=="function"&&ut)return ut(r,{depth:o-c});if(p!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(Zn(r)){var R=[];return Nt&&Nt.call(r,function(b,A){R.push(n(A,r,true)+" => "+n(b,r));}),Xt("Map",Ke.call(r),R,a)}if(tr(r)){var g=[];return Bt&&Bt.call(r,function(b){g.push(n(b,r));}),Xt("Set",Xe.call(r),g,a)}if(jn(r))return st("WeakMap");if(nr(r))return st("WeakSet");if(er(r))return st("WeakRef");if(qn(r))return Fe(n(Number(r)));if(Xn(r))return Fe(n(lt.call(r)));if(Kn(r))return Fe(Fn.call(r));if(Vn(r))return Fe(n(String(r)));if(typeof globalThis.window<"u"&&r===globalThis.window)return "{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||typeof global<"u"&&r===global)return "{ [object globalThis] }";if(!zn(r)&&!Kt(r)){var U=qe(r,n),d=zt?zt(r)===Object.prototype:r instanceof Object||r.constructor===Object,u=r instanceof Object?"":"null prototype",_=!d&&Be&&Object(r)===r&&Be in r?gt.call(Se(r),8,-1):u?"Object":"",s=d||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",w=s+(_||u?"["+we.call($t.call([],_||[],u||[]),": ")+"] ":"");return U.length===0?w+"{}":a?w+"{"+dt(U,a)+"}":w+"{ "+we.call(U,", ")+" }"}return String(r)};function jt(i,r,S){var c=S.quoteStyle||r,e=Zt[c];return e+i+e}function Wn(i){return Ee.call(String(i),/"/g,"&quot;")}function Ue(i){return !Be||!(typeof i=="object"&&(Be in i||typeof i[Be]<"u"))}function ft(i){return Se(i)==="[object Array]"&&Ue(i)}function zn(i){return Se(i)==="[object Date]"&&Ue(i)}function Kt(i){return Se(i)==="[object RegExp]"&&Ue(i)}function Gn(i){return Se(i)==="[object Error]"&&Ue(i)}function Vn(i){return Se(i)==="[object String]"&&Ue(i)}function qn(i){return Se(i)==="[object Number]"&&Ue(i)}function Kn(i){return Se(i)==="[object Boolean]"&&Ue(i)}function en(i){if(Me)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return true;if(!i||typeof i!="object"||!ct)return false;try{return ct.call(i),!0}catch{}return false}function Xn(i){if(!i||typeof i!="object"||!lt)return false;try{return lt.call(i),!0}catch{}return false}var Yn=Object.prototype.hasOwnProperty||function(i){return i in this};function ve(i,r){return Yn.call(i,r)}function Se(i){return kn.call(i)}function Jn(i){if(i.name)return i.name;var r=Bn.call(Nn.call(i),/^function\s*([\w$]+)/);return r?r[1]:null}function tn(i,r){if(i.indexOf)return i.indexOf(r);for(var S=0,c=i.length;S<c;S++)if(i[S]===r)return S;return -1}function Zn(i){if(!Ke||!i||typeof i!="object")return false;try{Ke.call(i);try{Xe.call(i);}catch{return !0}return i instanceof Map}catch{}return false}function jn(i){if(!ke||!i||typeof i!="object")return false;try{ke.call(i,ke);try{Ne.call(i,Ne);}catch{return !0}return i instanceof WeakMap}catch{}return false}function er(i){if(!Ht||!i||typeof i!="object")return false;try{return Ht.call(i),!0}catch{}return false}function tr(i){if(!Xe||!i||typeof i!="object")return false;try{Xe.call(i);try{Ke.call(i);}catch{return !0}return i instanceof Set}catch{}return false}function nr(i){if(!Ne||!i||typeof i!="object")return false;try{Ne.call(i,Ne);try{ke.call(i,ke);}catch{return !0}return i instanceof WeakSet}catch{}return false}function rr(i){return !i||typeof i!="object"?false:typeof HTMLElement<"u"&&i instanceof HTMLElement?true:typeof i.nodeName=="string"&&typeof i.getAttribute=="function"}function nn(i,r){if(i.length>r.maxStringLength){var S=i.length-r.maxStringLength,c="... "+S+" more character"+(S>1?"s":"");return nn(gt.call(i,0,r.maxStringLength),r)+c}var e=$n[r.quoteStyle||"single"];e.lastIndex=0;var t=Ee.call(Ee.call(i,e,"\\$1"),/[\x00-\x1f]/g,or);return jt(t,"single",r)}function or(i){var r=i.charCodeAt(0),S={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return S?"\\"+S:"\\x"+(r<16?"0":"")+Hn.call(r.toString(16))}function Fe(i){return "Object("+i+")"}function st(i){return i+" { ? }"}function Xt(i,r,S,c){var e=c?dt(S,c):we.call(S,", ");return i+" ("+r+") {"+e+"}"}function ir(i){for(var r=0;r<i.length;r++)if(tn(i[r],`
1
+ import {useState,useEffect,useRef,useCallback}from'react';import {useMutation}from'@tanstack/react-query';import {identity}from'lodash';import {nanoid}from'nanoid';import yt from'superjson';import {rpcClient,RpcError}from'typed-rpc';var An=Object.create;var bt=Object.defineProperty;var vn=Object.getOwnPropertyDescriptor;var _n=Object.getOwnPropertyNames;var bn=Object.getPrototypeOf,En=Object.prototype.hasOwnProperty;var Ze=(i,r)=>()=>(r||i((r={exports:{}}).exports,r),r.exports);var Sn=(i,r,S,c)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of _n(r))!En.call(i,e)&&e!==S&&bt(i,e,{get:()=>r[e],enumerable:!(c=vn(r,e))||c.enumerable});return i};var Et=(i,r,S)=>(S=i!=null?An(bn(i)):{},Sn(bt(S,"default",{value:i,enumerable:true}),i));var Ft=Ze((nt,rt)=>{(i=>{let r=(()=>{let R=0;return {escape:function(s){return s.replace(/([.*+?^${}()|[\]/\\])/g,"\\$1")},isDataUrl:function(s){return s.search(/^(data:)/)!==-1},canvasToBlob:function(s){return s.toBlob?new Promise(function(w){s.toBlob(w);}):(w=>new Promise(function(b){var A=a(w.toDataURL().split(",")[1]),T=A.length,m=new Uint8Array(T);for(let h=0;h<T;h++)m[h]=A.charCodeAt(h);b(new Blob([m],{type:"image/png"}));}))(s)},resolveUrl:function(s,w){var b=globalThis.document.implementation.createHTMLDocument(),A=b.createElement("base"),T=(b.head.appendChild(A),b.createElement("a"));return b.body.appendChild(T),A.href=w,T.href=s,T.href},getAndEncode:function(s){let w=y.impl.urlCache.find(function(b){return b.url===s});return w||(w={url:s,promise:null},y.impl.urlCache.push(w)),w.promise===null&&(y.impl.options.cacheBust&&(s+=(/\?/.test(s)?"&":"?")+new Date().getTime()),w.promise=new Promise(function(b){let A=new XMLHttpRequest;function T(L){console.error(L),b("");}function m(){var L=y.impl.options.imagePlaceholder;L?b(L):T("Status:"+A.status+" while fetching resource: "+s);}if(A.timeout=y.impl.options.httpTimeout,A.onerror=m,A.ontimeout=m,A.onloadend=function(){if(A.readyState===XMLHttpRequest.DONE){var L=A.status;if(L===0&&s.toLowerCase().startsWith("file://")||200<=L&&L<=300&&A.response!==null){L=A.response,L instanceof Blob||T("Expected response to be a Blob, but got: "+typeof L);let x=new globalThis.FileReader;x.onloadend=function(){var U=x.result;b(U);};try{x.readAsDataURL(L);}catch(U){T("Failed to read the response as Data URL: "+U.toString());}}else m();}},0<y.impl.options.useCredentialsFilters.length&&(y.impl.options.useCredentials=0<y.impl.options.useCredentialsFilters.filter(L=>0<=s.search(L)).length),y.impl.options.useCredentials&&(A.withCredentials=true),y.impl.options.corsImg&&s.indexOf("http")===0&&s.indexOf(globalThis.window.location.origin)===-1){var h=(y.impl.options.corsImg.method||"GET").toUpperCase()==="POST"?"POST":"GET";A.open(h,(y.impl.options.corsImg.url||"").replace("#{cors}",s),true);let L=false,x=y.impl.options.corsImg.headers||{},U=(Object.keys(x).forEach(function(H){x[H].indexOf("application/json")!==-1&&(L=true),A.setRequestHeader(H,x[H]);}),(H=>{try{return JSON.parse(JSON.stringify(H))}catch(D){T("corsImg.data is missing or invalid:"+D.toString());}})(y.impl.options.corsImg.data||""));Object.keys(U).forEach(function(H){typeof U[H]=="string"&&(U[H]=U[H].replace("#{cors}",s));}),A.responseType="blob",A.send(L?JSON.stringify(U):U);}else A.open("GET",s,true),A.responseType="blob",A.send();})),w.promise},uid:function(){return "u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+R++},asArray:function(s){var w=[],b=s.length;for(let A=0;A<b;A++)w.push(s[A]);return w},escapeXhtml:function(s){return s.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(s){return s!=="data:,"?new Promise(function(w,b){let A=globalThis.document.createElementNS("http://www.w3.org/2000/svg","svg"),T=new globalThis.Image;y.impl.options.useCredentials&&(T.crossOrigin="use-credentials"),T.onload=function(){globalThis.document.body.removeChild(A),globalThis.window&&globalThis.window.requestAnimationFrame?globalThis.window.requestAnimationFrame(function(){w(T);}):w(T);},T.onerror=m=>{globalThis.document.body.removeChild(A),b(m);},A.appendChild(T),T.src=s,globalThis.document.body.appendChild(A);}):Promise.resolve()},width:function(s){var w=_(s,"width");if(!isNaN(w))return w;var w=_(s,"border-left-width"),b=_(s,"border-right-width");return s.scrollWidth+w+b},height:function(s){var w=_(s,"height");if(!isNaN(w))return w;var w=_(s,"border-top-width"),b=_(s,"border-bottom-width");return s.scrollHeight+w+b},getWindow:p,isElement:u,isElementHostForOpenShadowRoot:function(s){return u(s)&&s.shadowRoot!==null},isShadowRoot:O,isInShadowRoot:f,isHTMLElement:function(s){return s instanceof p(s).HTMLElement},isHTMLCanvasElement:function(s){return s instanceof p(s).HTMLCanvasElement},isHTMLInputElement:function(s){return s instanceof p(s).HTMLInputElement},isHTMLImageElement:function(s){return s instanceof p(s).HTMLImageElement},isHTMLLinkElement:function(s){return s instanceof p(s).HTMLLinkElement},isHTMLScriptElement:function(s){return s instanceof p(s).HTMLScriptElement},isHTMLStyleElement:function(s){return s instanceof p(s).HTMLStyleElement},isHTMLTextAreaElement:function(s){return s instanceof p(s).HTMLTextAreaElement},isShadowSlotElement:function(s){return f(s)&&s instanceof p(s).HTMLSlotElement},isSVGElement:function(s){return s instanceof p(s).SVGElement},isSVGRectElement:function(s){return s instanceof p(s).SVGRectElement},isDimensionMissing:function(s){return isNaN(s)||s<=0}};function p(s){return s=s?s.ownerDocument:void 0,(s?s.defaultView:void 0)||globalThis.window||i}function O(s){return s instanceof p(s).ShadowRoot}function f(s){return s!=null&&s.getRootNode!==void 0&&O(s.getRootNode())}function u(s){return s instanceof p(s).Element}function _(s,w){if(s.nodeType===E){let b=o(s).getPropertyValue(w);if(b.slice(-2)==="px")return b=b.slice(0,-2),parseFloat(b)}return NaN}})(),S=(()=>{let R=/url\(\s*(["']?)((?:\\.|[^\\)])+)\1\s*\)/gm;return {inlineAll:function(_,s,w){return p(_)?Promise.resolve(_).then(O).then(function(b){let A=Promise.resolve(_);return b.forEach(function(T){A=A.then(function(m){return u(m,T,s,w)});}),A}):Promise.resolve(_)},shouldProcess:p,impl:{readUrls:O,inline:u,urlAsRegex:f}};function p(_){return _.search(R)!==-1}function O(_){for(var s,w=[];(s=R.exec(_))!==null;)w.push(s[2]);return w.filter(function(b){return !r.isDataUrl(b)})}function f(_){return new RegExp(`url\\((["']?)(${r.escape(_)})\\1\\)`,"gm")}function u(_,s,w,b){return Promise.resolve(s).then(function(A){return w?r.resolveUrl(A,w):A}).then(b||r.getAndEncode).then(function(A){var T=f(s);return _.replace(T,`url($1${A}$1)`)})}})(),c={resolveAll:function(){return e().then(function(R){return Promise.all(R.map(function(p){return p.resolve()}))}).then(function(R){return R.join(`
2
+ `)})},impl:{readAll:e}};function e(){return Promise.resolve(r.asArray(globalThis.document.styleSheets)).then(function(p){let O=[];return p.forEach(function(f){var u=Object.getPrototypeOf(f);if(Object.prototype.hasOwnProperty.call(u,"cssRules"))try{r.asArray(f.cssRules||[]).forEach(O.push.bind(O));}catch(_){console.error("domtoimage: Error while reading CSS rules from: "+f.href,_.toString());}}),O}).then(function(p){return p.filter(function(O){return O.type===CSSRule.FONT_FACE_RULE}).filter(function(O){return S.shouldProcess(O.style.getPropertyValue("src"))})}).then(function(p){return p.map(R)});function R(p){return {resolve:function(){var O=(p.parentStyleSheet||{}).href;return S.inlineAll(p.cssText,O)},src:function(){return p.style.getPropertyValue("src")}}}}let t={inlineAll:function R(p){if(!r.isElement(p))return Promise.resolve(p);return O(p).then(function(){return r.isHTMLImageElement(p)?g(p).inline():Promise.all(r.asArray(p.childNodes).map(function(f){return R(f)}))});function O(f){let u=["background","background-image"],_=u.map(function(s){let w=f.style.getPropertyValue(s),b=f.style.getPropertyPriority(s);return w?S.inlineAll(w).then(function(A){f.style.setProperty(s,A,b);}):Promise.resolve()});return Promise.all(_).then(function(){return f})}},impl:{newImage:g}};function g(R){return {inline:function(p){return r.isDataUrl(R.src)?Promise.resolve():Promise.resolve(R.src).then(p||r.getAndEncode).then(function(O){return new Promise(function(f){R.onload=f,R.onerror=f,R.src=O;})})}}}let l={copyDefaultStyles:true,imagePlaceholder:void 0,cacheBust:false,useCredentials:false,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0},y={toSvg:n,toPng:function(R,p){return d(R,p).then(function(O){return O.toDataURL()})},toJpeg:function(R,p){return d(R,p).then(function(O){return O.toDataURL("image/jpeg",(p?p.quality:void 0)||1)})},toBlob:function(R,p){return d(R,p).then(r.canvasToBlob)},toPixelData:function(R,p){return d(R,p).then(function(O){return O.getContext("2d").getImageData(0,0,r.width(R),r.height(R)).data})},toCanvas:d,impl:{fontFaces:c,images:t,util:r,inliner:S,urlCache:[],options:{},copyOptions:function(R){R.copyDefaultStyles===void 0?y.impl.options.copyDefaultStyles=l.copyDefaultStyles:y.impl.options.copyDefaultStyles=R.copyDefaultStyles,y.impl.options.imagePlaceholder=(R.imagePlaceholder===void 0?l:R).imagePlaceholder,y.impl.options.cacheBust=(R.cacheBust===void 0?l:R).cacheBust,y.impl.options.corsImg=(R.corsImg===void 0?l:R).corsImg,y.impl.options.useCredentials=(R.useCredentials===void 0?l:R).useCredentials,y.impl.options.useCredentialsFilters=(R.useCredentialsFilters===void 0?l:R).useCredentialsFilters,y.impl.options.httpTimeout=(R.httpTimeout===void 0?l:R).httpTimeout,y.impl.options.styleCaching=(R.styleCaching===void 0?l:R).styleCaching;}}},E=(typeof nt=="object"&&typeof rt=="object"?rt.exports=y:i.domtoimage=y,(globalThis.Node===void 0?void 0:globalThis.Node.ELEMENT_NODE)||1),o=(i===void 0?void 0:i.getComputedStyle)||(globalThis.window===void 0?void 0:globalThis.window.getComputedStyle)||globalThis.getComputedStyle,a=(i===void 0?void 0:i.atob)||(globalThis.window===void 0?void 0:globalThis.window.atob)||globalThis.atob;function n(R,p){y.impl.util.getWindow(R);let f=(p=p||{},y.impl.copyOptions(p),[]);return Promise.resolve(R).then(function(u){if(u.nodeType===E)return u;var _=u,s=globalThis.document.createElement("span");return _.replaceWith(s),s.append(u),f.push({child:_,wrapper:s}),s}).then(function(u){return (function _(s,w,b,A){let T=w.filter;if(s===v||r.isHTMLScriptElement(s)||r.isHTMLStyleElement(s)||r.isHTMLLinkElement(s)||b!==null&&T&&!T(s))return Promise.resolve();return Promise.resolve(s).then(m).then(h).then(function(D){return U(D,x(s))}).then(L).then(function(D){return H(D,s)});function m(D){return r.isHTMLCanvasElement(D)?r.makeImage(D.toDataURL()):D.cloneNode(false)}function h(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,false),Promise.resolve(D)}function L(D){return w.adjustClonedNode&&w.adjustClonedNode(s,D,true),Promise.resolve(D)}function x(D){return r.isElementHostForOpenShadowRoot(D)?D.shadowRoot:D}function U(D,Q){let N=K(Q),F=Promise.resolve();if(N.length!==0){let V=o($(Q));r.asArray(N).forEach(function(z){F=F.then(function(){return _(z,w,V).then(function(q){q&&D.appendChild(q);})});});}return F.then(function(){return D});function $(V){return r.isShadowRoot(V)?V.host:V}function K(V){if(r.isShadowSlotElement(V)){let z=V.assignedNodes();if(z&&0<z.length)return z}return V.childNodes}}function H(D,Q){return !r.isElement(D)||r.isShadowSlotElement(Q)?Promise.resolve(D):Promise.resolve().then(F).then($).then(K).then(V).then(N).then(function(){return D});function N(){r.isHTMLImageElement(D)&&(D.removeAttribute("loading"),Q.srcset||Q.sizes)&&(D.removeAttribute("srcset"),D.removeAttribute("sizes"),D.src=Q.currentSrc||Q.src);}function F(){function z(G,W){W.font=G.font,W.fontFamily=G.fontFamily,W.fontFeatureSettings=G.fontFeatureSettings,W.fontKerning=G.fontKerning,W.fontSize=G.fontSize,W.fontStretch=G.fontStretch,W.fontStyle=G.fontStyle,W.fontVariant=G.fontVariant,W.fontVariantCaps=G.fontVariantCaps,W.fontVariantEastAsian=G.fontVariantEastAsian,W.fontVariantLigatures=G.fontVariantLigatures,W.fontVariantNumeric=G.fontVariantNumeric,W.fontVariationSettings=G.fontVariationSettings,W.fontWeight=G.fontWeight;}function q(G,W){let ie=o(G);ie.cssText?(W.style.cssText=ie.cssText,z(ie,W.style)):(I(w,G,ie,b,W),b===null&&(["inset-block","inset-block-start","inset-block-end"].forEach(ae=>W.style.removeProperty(ae)),["left","right","top","bottom"].forEach(ae=>{W.style.getPropertyValue(ae)&&W.style.setProperty(ae,"0px");})));}q(Q,D);}function $(){let z=r.uid();function q(G){let W=o(Q,G),ie=W.getPropertyValue("content");if(ie!==""&&ie!=="none"){let Y=function(){let J=`.${z}:`+G,ne=(W.cssText?oe:j)();return globalThis.document.createTextNode(J+`{${ne}}`);function oe(){return `${W.cssText} content: ${ie};`}function j(){return r.asArray(W).map(ee).join("; ")+";";function ee(X){let le=W.getPropertyValue(X),ge=W.getPropertyPriority(X)?" !important":"";return X+": "+le+ge}}};let Z=D.getAttribute("class")||"",te=(D.setAttribute("class",Z+" "+z),globalThis.document.createElement("style"));te.appendChild(Y()),D.appendChild(te);}}[":before",":after"].forEach(function(G){q(G);});}function K(){r.isHTMLTextAreaElement(Q)&&(D.innerHTML=Q.value),r.isHTMLInputElement(Q)&&D.setAttribute("value",Q.value);}function V(){r.isSVGElement(D)&&(D.setAttribute("xmlns","http://www.w3.org/2000/svg"),r.isSVGRectElement(D))&&["width","height"].forEach(function(z){let q=D.getAttribute(z);q&&D.style.setProperty(z,q);});}}})(u,p,null)}).then(p.disableEmbedFonts?Promise.resolve(R):C).then(p.disableInlineImages?Promise.resolve(R):M).then(function(u){p.bgcolor&&(u.style.backgroundColor=p.bgcolor),p.width&&(u.style.width=p.width+"px"),p.height&&(u.style.height=p.height+"px"),p.style&&Object.keys(p.style).forEach(function(s){u.style[s]=p.style[s];});let _=null;return typeof p.onclone=="function"&&(_=p.onclone(u)),Promise.resolve(_).then(function(){return u})}).then(function(u){let _=p.width||r.width(R),s=p.height||r.height(R);return Promise.resolve(u).then(function(w){return w.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),new XMLSerializer().serializeToString(w)}).then(r.escapeXhtml).then(function(w){var b=(r.isDimensionMissing(_)?' width="100%"':` width="${_}"`)+(r.isDimensionMissing(s)?' height="100%"':` height="${s}"`);return `<svg xmlns="http://www.w3.org/2000/svg"${(r.isDimensionMissing(_)?"":` width="${_}"`)+(r.isDimensionMissing(s)?"":` height="${s}"`)}><foreignObject${b}>${w}</foreignObject></svg>`}).then(function(w){return "data:image/svg+xml;charset=utf-8,"+w})}).then(function(u){for(;0<f.length;){var _=f.pop();_.wrapper.replaceWith(_.child);}return u}).then(function(u){return y.impl.urlCache=[],v&&(globalThis.document.body.removeChild(v),v=null),B&&clearTimeout(B),B=setTimeout(()=>{B=null,k={};},2e4),u})}function d(R,p){return n(R,p=p||{}).then(r.makeImage).then(function(O){var f=typeof p.scale!="number"?1:p.scale,u=((s,w)=>{let b=p.width||r.width(s),A=p.height||r.height(s);return r.isDimensionMissing(b)&&(b=r.isDimensionMissing(A)?300:2*A),r.isDimensionMissing(A)&&(A=b/2),(s=globalThis.document.createElement("canvas")).width=b*w,s.height=A*w,p.bgcolor&&((w=s.getContext("2d")).fillStyle=p.bgcolor,w.fillRect(0,0,s.width,s.height)),s})(R,f),_=u.getContext("2d");return _.msImageSmoothingEnabled=false,_.imageSmoothingEnabled=false,O&&(_.scale(f,f),_.drawImage(O,0,0)),u})}let v=null;function C(R){return c.resolveAll().then(function(p){var O;return p!==""&&(O=globalThis.document.createElement("style"),R.appendChild(O),O.appendChild(globalThis.document.createTextNode(p))),R})}function M(R){return t.inlineAll(R).then(function(){return R})}function I(R,p,O,f,u){let _=y.impl.options.copyDefaultStyles?((w,b)=>{var A,T=(L=>(w.styleCaching!=="relaxed"?L:L.filter((x,U,H)=>U===0||U===H.length-1)).join(">"))(b=(L=>{var x=[];do if(L.nodeType===E){var U=L.tagName;if(x.push(U),P.includes(U))break}while(L=L.parentNode);return x})(b));{if(k[T])return k[T];b=((L,x)=>{let U=L.body;do{var H=x.pop(),H=L.createElement(H);U.appendChild(H),U=H;}while(0<x.length);return U.textContent="\u200B",U})((A=(()=>{if(v)return v.contentWindow;x=globalThis.document.characterSet||"UTF-8",L=(L=globalThis.document.doctype)?(`<!DOCTYPE ${F(L.name)} ${F(L.publicId)} `+F(L.systemId)).trim()+">":"",(v=globalThis.document.createElement("iframe")).id="domtoimage-sandbox-"+r.uid(),v.style.top="-9999px",v.style.visibility="hidden",v.style.position="fixed",globalThis.document.body.appendChild(v);var L,x,U=v,H="domtoimage-sandbox";try{return U.contentWindow.document.write(L+`<html><head><meta charset='${x}'><title>${H}</title></head><body></body></html>`),U.contentWindow}catch{}var D=globalThis.document.createElement("meta");D.setAttribute("charset",x);try{var Q=globalThis.document.implementation.createHTMLDocument(H),N=(Q.head.appendChild(D),L+Q.documentElement.outerHTML);return U.setAttribute("srcdoc",N),U.contentWindow}catch{}return U.contentDocument.head.appendChild(D),U.contentDocument.title=H,U.contentWindow;function F($){var K;return $?((K=globalThis.document.createElement("div")).innerText=$,K.innerHTML):""}})()).document,b),A=((L,x)=>{let U={},H=L.getComputedStyle(x);return r.asArray(H).forEach(function(D){U[D]=D==="width"||D==="height"?"auto":H.getPropertyValue(D);}),U})(A,b);var m=b;do{var h=m.parentElement;h!==null&&h.removeChild(m),m=h;}while(m&&m.tagName!=="BODY");return k[T]=A}})(R,p):{},s=u.style;r.asArray(O).forEach(function(w){var b,A,T,m;R.filterStyles&&!R.filterStyles(p,w)||(A=O.getPropertyValue(w),T=_[w],b=f?f.getPropertyValue(w):void 0,s.getPropertyValue(w))||(A!==T||f&&A!==b)&&(T=O.getPropertyPriority(w),b=s,A=A,T=T,m=0<=["background-clip"].indexOf(w=w),T?(b.setProperty(w,A,T),m&&b.setProperty("-webkit-"+w,A,T)):(b.setProperty(w,A),m&&b.setProperty("-webkit-"+w,A)));});}let B=null,k={},P=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"];})(nt);});var kt=Ze(()=>{});var on=Ze((Ur,rn)=>{var ht=typeof Map=="function"&&Map.prototype,ot=Object.getOwnPropertyDescriptor&&ht?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ke=ht&&ot&&typeof ot.get=="function"?ot.get:null,Bt=ht&&Map.prototype.forEach,pt=typeof Set=="function"&&Set.prototype,it=Object.getOwnPropertyDescriptor&&pt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Xe=pt&&it&&typeof it.get=="function"?it.get:null,Nt=pt&&Set.prototype.forEach,Mn=typeof WeakMap=="function"&&WeakMap.prototype,ke=Mn?WeakMap.prototype.has:null,Ln=typeof WeakSet=="function"&&WeakSet.prototype,Be=Ln?WeakSet.prototype.has:null,Dn=typeof WeakRef=="function"&&WeakRef.prototype,Ht=Dn?WeakRef.prototype.deref:null,Fn=Boolean.prototype.valueOf,kn=Object.prototype.toString,Bn=Function.prototype.toString,Nn=String.prototype.match,gt=String.prototype.slice,Ee=String.prototype.replace,Hn=String.prototype.toUpperCase,Qt=String.prototype.toLowerCase,Yt=RegExp.prototype.test,$t=Array.prototype.concat,we=Array.prototype.join,Qn=Array.prototype.slice,Wt=Math.floor,lt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,at=Object.getOwnPropertySymbols,ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Me=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ne=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Me||true)?Symbol.toStringTag:null,Jt=Object.prototype.propertyIsEnumerable,zt=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(i){return i.__proto__}:null);function Gt(i,r){if(i===1/0||i===-1/0||i!==i||i&&i>-1e3&&i<1e3||Yt.call(/e/,r))return r;var S=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof i=="number"){var c=i<0?-Wt(-i):Wt(i);if(c!==i){var e=String(c),t=gt.call(r,e.length+1);return Ee.call(e,S,"$&_")+"."+Ee.call(Ee.call(t,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(r,S,"$&_")}var ut=kt(),Vt=ut.custom,qt=en(Vt)?Vt:null,Zt={__proto__:null,double:'"',single:"'"},$n={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};rn.exports=function i(r,S,c,e){var t=S||{};if(ve(t,"quoteStyle")&&!ve(Zt,t.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ve(t,"maxStringLength")&&(typeof t.maxStringLength=="number"?t.maxStringLength<0&&t.maxStringLength!==1/0:t.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var g=ve(t,"customInspect")?t.customInspect:true;if(typeof g!="boolean"&&g!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ve(t,"indent")&&t.indent!==null&&t.indent!==" "&&!(parseInt(t.indent,10)===t.indent&&t.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ve(t,"numericSeparator")&&typeof t.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=t.numericSeparator;if(typeof r>"u")return "undefined";if(r===null)return "null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return nn(r,t);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var y=String(r);return l?Gt(r,y):y}if(typeof r=="bigint"){var E=String(r)+"n";return l?Gt(r,E):E}var o=typeof t.depth>"u"?5:t.depth;if(typeof c>"u"&&(c=0),c>=o&&o>0&&typeof r=="object")return ft(r)?"[Array]":"[Object]";var a=ar(t,c);if(typeof e>"u")e=[];else if(tn(e,r)>=0)return "[Circular]";function n(b,A,T){if(A&&(e=Qn.call(e),e.push(A)),T){var m={depth:t.depth};return ve(t,"quoteStyle")&&(m.quoteStyle=t.quoteStyle),i(b,m,c+1,e)}return i(b,t,c+1,e)}if(typeof r=="function"&&!Kt(r)){var d=Jn(r),v=qe(r,n);return "[Function"+(d?": "+d:" (anonymous)")+"]"+(v.length>0?" { "+we.call(v,", ")+" }":"")}if(en(r)){var C=Me?Ee.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):ct.call(r);return typeof r=="object"&&!Me?Fe(C):C}if(rr(r)){for(var M="<"+Qt.call(String(r.nodeName)),I=r.attributes||[],B=0;B<I.length;B++)M+=" "+I[B].name+"="+jt(Wn(I[B].value),"double",t);return M+=">",r.childNodes&&r.childNodes.length&&(M+="..."),M+="</"+Qt.call(String(r.nodeName))+">",M}if(ft(r)){if(r.length===0)return "[]";var k=qe(r,n);return a&&!ir(k)?"["+dt(k,a)+"]":"[ "+we.call(k,", ")+" ]"}if(Gn(r)){var P=qe(r,n);return !("cause"in Error.prototype)&&"cause"in r&&!Jt.call(r,"cause")?"{ ["+String(r)+"] "+we.call($t.call("[cause]: "+n(r.cause),P),", ")+" }":P.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+we.call(P,", ")+" }"}if(typeof r=="object"&&g){if(qt&&typeof r[qt]=="function"&&ut)return ut(r,{depth:o-c});if(g!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(Zn(r)){var R=[];return Bt&&Bt.call(r,function(b,A){R.push(n(A,r,true)+" => "+n(b,r));}),Xt("Map",Ke.call(r),R,a)}if(tr(r)){var p=[];return Nt&&Nt.call(r,function(b){p.push(n(b,r));}),Xt("Set",Xe.call(r),p,a)}if(jn(r))return st("WeakMap");if(nr(r))return st("WeakSet");if(er(r))return st("WeakRef");if(qn(r))return Fe(n(Number(r)));if(Xn(r))return Fe(n(lt.call(r)));if(Kn(r))return Fe(Fn.call(r));if(Vn(r))return Fe(n(String(r)));if(typeof globalThis.window<"u"&&r===globalThis.window)return "{ [object Window] }";if(typeof globalThis<"u"&&r===globalThis||typeof global<"u"&&r===global)return "{ [object globalThis] }";if(!zn(r)&&!Kt(r)){var O=qe(r,n),f=zt?zt(r)===Object.prototype:r instanceof Object||r.constructor===Object,u=r instanceof Object?"":"null prototype",_=!f&&Ne&&Object(r)===r&&Ne in r?gt.call(Se(r),8,-1):u?"Object":"",s=f||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",w=s+(_||u?"["+we.call($t.call([],_||[],u||[]),": ")+"] ":"");return O.length===0?w+"{}":a?w+"{"+dt(O,a)+"}":w+"{ "+we.call(O,", ")+" }"}return String(r)};function jt(i,r,S){var c=S.quoteStyle||r,e=Zt[c];return e+i+e}function Wn(i){return Ee.call(String(i),/"/g,"&quot;")}function Oe(i){return !Ne||!(typeof i=="object"&&(Ne in i||typeof i[Ne]<"u"))}function ft(i){return Se(i)==="[object Array]"&&Oe(i)}function zn(i){return Se(i)==="[object Date]"&&Oe(i)}function Kt(i){return Se(i)==="[object RegExp]"&&Oe(i)}function Gn(i){return Se(i)==="[object Error]"&&Oe(i)}function Vn(i){return Se(i)==="[object String]"&&Oe(i)}function qn(i){return Se(i)==="[object Number]"&&Oe(i)}function Kn(i){return Se(i)==="[object Boolean]"&&Oe(i)}function en(i){if(Me)return i&&typeof i=="object"&&i instanceof Symbol;if(typeof i=="symbol")return true;if(!i||typeof i!="object"||!ct)return false;try{return ct.call(i),!0}catch{}return false}function Xn(i){if(!i||typeof i!="object"||!lt)return false;try{return lt.call(i),!0}catch{}return false}var Yn=Object.prototype.hasOwnProperty||function(i){return i in this};function ve(i,r){return Yn.call(i,r)}function Se(i){return kn.call(i)}function Jn(i){if(i.name)return i.name;var r=Nn.call(Bn.call(i),/^function\s*([\w$]+)/);return r?r[1]:null}function tn(i,r){if(i.indexOf)return i.indexOf(r);for(var S=0,c=i.length;S<c;S++)if(i[S]===r)return S;return -1}function Zn(i){if(!Ke||!i||typeof i!="object")return false;try{Ke.call(i);try{Xe.call(i);}catch{return !0}return i instanceof Map}catch{}return false}function jn(i){if(!ke||!i||typeof i!="object")return false;try{ke.call(i,ke);try{Be.call(i,Be);}catch{return !0}return i instanceof WeakMap}catch{}return false}function er(i){if(!Ht||!i||typeof i!="object")return false;try{return Ht.call(i),!0}catch{}return false}function tr(i){if(!Xe||!i||typeof i!="object")return false;try{Xe.call(i);try{Ke.call(i);}catch{return !0}return i instanceof Set}catch{}return false}function nr(i){if(!Be||!i||typeof i!="object")return false;try{Be.call(i,Be);try{ke.call(i,ke);}catch{return !0}return i instanceof WeakSet}catch{}return false}function rr(i){return !i||typeof i!="object"?false:typeof HTMLElement<"u"&&i instanceof HTMLElement?true:typeof i.nodeName=="string"&&typeof i.getAttribute=="function"}function nn(i,r){if(i.length>r.maxStringLength){var S=i.length-r.maxStringLength,c="... "+S+" more character"+(S>1?"s":"");return nn(gt.call(i,0,r.maxStringLength),r)+c}var e=$n[r.quoteStyle||"single"];e.lastIndex=0;var t=Ee.call(Ee.call(i,e,"\\$1"),/[\x00-\x1f]/g,or);return jt(t,"single",r)}function or(i){var r=i.charCodeAt(0),S={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return S?"\\"+S:"\\x"+(r<16?"0":"")+Hn.call(r.toString(16))}function Fe(i){return "Object("+i+")"}function st(i){return i+" { ? }"}function Xt(i,r,S,c){var e=c?dt(S,c):we.call(S,", ");return i+" ("+r+") {"+e+"}"}function ir(i){for(var r=0;r<i.length;r++)if(tn(i[r],`
3
3
  `)>=0)return false;return true}function ar(i,r){var S;if(i.indent===" ")S=" ";else if(typeof i.indent=="number"&&i.indent>0)S=we.call(Array(i.indent+1)," ");else return null;return {base:S,prev:we.call(Array(r+1),S)}}function dt(i,r){if(i.length===0)return "";var S=`
4
4
  `+r.prev+r.base;return S+we.call(i,","+S)+`
5
- `+r.prev}function qe(i,r){var S=ft(i),c=[];if(S){c.length=i.length;for(var e=0;e<i.length;e++)c[e]=ve(i,e)?r(i[e],i):"";}var t=typeof at=="function"?at(i):[],p;if(Me){p={};for(var l=0;l<t.length;l++)p["$"+t[l]]=t[l];}for(var y in i)ve(i,y)&&(S&&String(Number(y))===y&&y<i.length||Me&&p["$"+y]instanceof Symbol||(Yt.call(/[^\w$]/,y)?c.push(r(y,i)+": "+r(i[y],i)):c.push(y+": "+r(i[y],i))));if(typeof at=="function")for(var E=0;E<t.length;E++)Jt.call(i,t[E])&&c.push("["+r(t[E])+"]: "+r(i[t[E]],i));return c}});function Tn(i,r){return r.forEach((function(S){S&&typeof S!="string"&&!Array.isArray(S)&&Object.keys(S).forEach((function(c){if(c!=="default"&&!(c in i)){var e=Object.getOwnPropertyDescriptor(S,c);Object.defineProperty(i,c,e.get?e:{enumerable:true,get:function(){return S[c]}});}}));})),Object.freeze(i)}function Tt(i,r){return new Promise((function(S,c){let e;return In(i).then((function(t){try{return e=t,S(new Blob([r.slice(0,2),e,r.slice(2)],{type:"image/jpeg"}))}catch(p){return c(p)}}),c)}))}var In=i=>new Promise(((r,S)=>{let c=new globalThis.FileReader;c.addEventListener("load",(({target:{result:e}})=>{let t=new DataView(e),p=0;if(t.getUint16(p)!==65496)return S("not a valid JPEG");for(p+=2;;){let l=t.getUint16(p);if(l===65498)break;let y=t.getUint16(p+2);if(l===65505&&t.getUint32(p+4)===1165519206){let E=p+10,o;switch(t.getUint16(E)){case 18761:o=true;break;case 19789:o=false;break;default:return S("TIFF header contains invalid endian")}if(t.getUint16(E+2,o)!==42)return S("TIFF header contains invalid version");let a=t.getUint32(E+4,o),n=E+a+2+12*t.getUint16(E+a,o);for(let f=E+a+2;f<n;f+=12)if(t.getUint16(f,o)==274){if(t.getUint16(f+2,o)!==3)return S("Orientation data type is invalid");if(t.getUint32(f+4,o)!==1)return S("Orientation data count is invalid");t.setUint16(f+8,1,o);break}return r(e.slice(p,p+2+y))}p+=2+y;}return r(new Blob)})),c.readAsArrayBuffer(i);})),$e={},Rn={get exports(){return $e},set exports(i){$e=i;}};(function(i){var r,S,c={};Rn.exports=c,c.parse=function(e,t){for(var p=c.bin.readUshort,l=c.bin.readUint,y=0,E={},o=new Uint8Array(e),a=o.length-4;l(o,a)!=101010256;)a--;y=a,y+=4;var n=p(o,y+=4);p(o,y+=2);var f=l(o,y+=2),v=l(o,y+=4);y+=4,y=v;for(var C=0;C<n;C++){l(o,y),y+=4,y+=4,y+=4,l(o,y+=4),f=l(o,y+=4);var M=l(o,y+=4),I=p(o,y+=4),N=p(o,y+2),k=p(o,y+4);y+=6;var L=l(o,y+=8);y+=4,y+=I+N+k,c._readLocal(o,L,E,f,M,t);}return E},c._readLocal=function(e,t,p,l,y,E){var o=c.bin.readUshort,a=c.bin.readUint;a(e,t),o(e,t+=4),o(e,t+=2);var n=o(e,t+=2);a(e,t+=2),a(e,t+=4),t+=4;var f=o(e,t+=8),v=o(e,t+=2);t+=2;var C=c.bin.readUTF8(e,t,f);if(t+=f,t+=v,E)p[C]={size:y,csize:l};else {var M=new Uint8Array(e.buffer,t);if(n==0)p[C]=new Uint8Array(M.buffer.slice(t,t+l));else {if(n!=8)throw "unknown compression method: "+n;var I=new Uint8Array(y);c.inflateRaw(M,I),p[C]=I;}}},c.inflateRaw=function(e,t){return c.F.inflate(e,t)},c.inflate=function(e,t){return e[0],e[1],c.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},c.deflate=function(e,t){t==null&&(t={level:6});var p=0,l=new Uint8Array(50+Math.floor(1.1*e.length));l[p]=120,l[p+1]=156,p+=2,p=c.F.deflateRaw(e,l,p,t.level);var y=c.adler(e,0,e.length);return l[p+0]=y>>>24&255,l[p+1]=y>>>16&255,l[p+2]=y>>>8&255,l[p+3]=y>>>0&255,new Uint8Array(l.buffer,0,p+4)},c.deflateRaw=function(e,t){t==null&&(t={level:6});var p=new Uint8Array(50+Math.floor(1.1*e.length)),l=c.F.deflateRaw(e,p,l,t.level);return new Uint8Array(p.buffer,0,l)},c.encode=function(e,t){t==null&&(t=false);var p=0,l=c.bin.writeUint,y=c.bin.writeUshort,E={};for(var o in e){var a=!c._noNeed(o)&&!t,n=e[o],f=c.crc.crc(n,0,n.length);E[o]={cpr:a,usize:n.length,crc:f,file:a?c.deflateRaw(n):n};}for(var o in E)p+=E[o].file.length+30+46+2*c.bin.sizeUTF8(o);p+=22;var v=new Uint8Array(p),C=0,M=[];for(var o in E){var I=E[o];M.push(C),C=c._writeHeader(v,C,o,I,0);}var N=0,k=C;for(var o in E)I=E[o],M.push(C),C=c._writeHeader(v,C,o,I,1,M[N++]);var L=C-k;return l(v,C,101010256),C+=4,y(v,C+=4,N),y(v,C+=2,N),l(v,C+=2,L),l(v,C+=4,k),C+=4,C+=2,v.buffer},c._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return "png,jpg,jpeg,zip".indexOf(t)!=-1},c._writeHeader=function(e,t,p,l,y,E){var o=c.bin.writeUint,a=c.bin.writeUshort,n=l.file;return o(e,t,y==0?67324752:33639248),t+=4,y==1&&(t+=2),a(e,t,20),a(e,t+=2,0),a(e,t+=2,l.cpr?8:0),o(e,t+=2,0),o(e,t+=4,l.crc),o(e,t+=4,n.length),o(e,t+=4,l.usize),a(e,t+=4,c.bin.sizeUTF8(p)),a(e,t+=2,0),t+=2,y==1&&(t+=2,t+=2,o(e,t+=6,E),t+=4),t+=c.bin.writeUTF8(e,t,p),y==0&&(e.set(n,t),t+=n.length),t},c.crc={table:(function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var p=t,l=0;l<8;l++)1&p?p=3988292384^p>>>1:p>>>=1;e[t]=p;}return e})(),update:function(e,t,p,l){for(var y=0;y<l;y++)e=c.crc.table[255&(e^t[p+y])]^e>>>8;return e},crc:function(e,t,p){return 4294967295^c.crc.update(4294967295,e,t,p)}},c.adler=function(e,t,p){for(var l=1,y=0,E=t,o=t+p;E<o;){for(var a=Math.min(E+5552,o);E<a;)y+=l+=e[E++];l%=65521,y%=65521;}return y<<16|l},c.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,p){e[t]=255&p,e[t+1]=p>>8&255;},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,p){e[t]=255&p,e[t+1]=p>>8&255,e[t+2]=p>>16&255,e[t+3]=p>>24&255;},readASCII:function(e,t,p){for(var l="",y=0;y<p;y++)l+=String.fromCharCode(e[t+y]);return l},writeASCII:function(e,t,p){for(var l=0;l<p.length;l++)e[t+l]=p.charCodeAt(l);},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,p){for(var l,y="",E=0;E<p;E++)y+="%"+c.bin.pad(e[t+E].toString(16));try{l=decodeURIComponent(y);}catch{return c.bin.readASCII(e,t,p)}return l},writeUTF8:function(e,t,p){for(var l=p.length,y=0,E=0;E<l;E++){var o=p.charCodeAt(E);if((4294967168&o)==0)e[t+y]=o,y++;else if((4294965248&o)==0)e[t+y]=192|o>>6,e[t+y+1]=128|o>>0&63,y+=2;else if((4294901760&o)==0)e[t+y]=224|o>>12,e[t+y+1]=128|o>>6&63,e[t+y+2]=128|o>>0&63,y+=3;else {if((4292870144&o)!=0)throw "e";e[t+y]=240|o>>18,e[t+y+1]=128|o>>12&63,e[t+y+2]=128|o>>6&63,e[t+y+3]=128|o>>0&63,y+=4;}}return y},sizeUTF8:function(e){for(var t=e.length,p=0,l=0;l<t;l++){var y=e.charCodeAt(l);if((4294967168&y)==0)p++;else if((4294965248&y)==0)p+=2;else if((4294901760&y)==0)p+=3;else {if((4292870144&y)!=0)throw "e";p+=4;}}return p}},c.F={},c.F.deflateRaw=function(e,t,p,l){var y=[[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]][l],E=c.F.U,o=c.F._goodIndex;c.F._hash;var a=c.F._putsE,n=0,f=p<<3,v=0,C=e.length;if(l==0){for(;n<C;)a(t,f,n+(s=Math.min(65535,C-n))==C?1:0),f=c.F._copyExact(e,n,s,t,f+8),n+=s;return f>>>3}var M=E.lits,I=E.strt,N=E.prev,k=0,L=0,R=0,g=0,U=0,d=0;for(C>2&&(I[d=c.F._hash(e,0)]=0),n=0;n<C;n++){if(U=d,n+1<C-2){d=c.F._hash(e,n+1);var u=n+1&32767;N[u]=I[d],I[d]=u;}if(v<=n){(k>14e3||L>26697)&&C-n>100&&(v<n&&(M[k]=n-v,k+=2,v=n),f=c.F._writeBlock(n==C-1||v==C?1:0,M,k,g,e,R,n-R,t,f),k=L=g=0,R=n);var _=0;n<C-2&&(_=c.F._bestMatch(e,n,N,U,Math.min(y[2],C-n),y[3]));var s=_>>>16,w=65535&_;if(_!=0){w=65535&_;var b=o(s=_>>>16,E.of0);E.lhst[257+b]++;var A=o(w,E.df0);E.dhst[A]++,g+=E.exb[b]+E.dxb[A],M[k]=s<<23|n-v,M[k+1]=w<<16|b<<8|A,k+=2,v=n+s;}else E.lhst[e[n]]++;L++;}}for(R==n&&e.length!=0||(v<n&&(M[k]=n-v,k+=2,v=n),f=c.F._writeBlock(1,M,k,g,e,R,n-R,t,f),k=0,L=0,k=L=g=0,R=n);(7&f)!=0;)f++;return f>>>3},c.F._bestMatch=function(e,t,p,l,y,E){var o=32767&t,a=p[o],n=o-a+32768&32767;if(a==o||l!=c.F._hash(e,t-n))return 0;for(var f=0,v=0,C=Math.min(32767,t);n<=C&&--E!=0&&a!=o;){if(f==0||e[t+f]==e[t+f-n]){var M=c.F._howLong(e,t,n);if(M>f){if(v=n,(f=M)>=y)break;n+2<M&&(M=n+2);for(var I=0,N=0;N<M-2;N++){var k=t-n+N+32768&32767,L=k-p[k]+32768&32767;L>I&&(I=L,a=k);}}}n+=(o=a)-(a=p[o])+32768&32767;}return f<<16|v},c.F._howLong=function(e,t,p){if(e[t]!=e[t-p]||e[t+1]!=e[t+1-p]||e[t+2]!=e[t+2-p])return 0;var l=t,y=Math.min(e.length,t+258);for(t+=3;t<y&&e[t]==e[t-p];)t++;return t-l},c.F._hash=function(e,t){return (e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},c.saved=0,c.F._writeBlock=function(e,t,p,l,y,E,o,a,n){var f,v,C,M,I,N,k,L,R,g=c.F.U,U=c.F._putsF,d=c.F._putsE;g.lhst[256]++,v=(f=c.F.getTrees())[0],C=f[1],M=f[2],I=f[3],N=f[4],k=f[5],L=f[6],R=f[7];var u=32+((n+3&7)==0?0:8-(n+3&7))+(o<<3),_=l+c.F.contSize(g.fltree,g.lhst)+c.F.contSize(g.fdtree,g.dhst),s=l+c.F.contSize(g.ltree,g.lhst)+c.F.contSize(g.dtree,g.dhst);s+=14+3*k+c.F.contSize(g.itree,g.ihst)+(2*g.ihst[16]+3*g.ihst[17]+7*g.ihst[18]);for(var w=0;w<286;w++)g.lhst[w]=0;for(w=0;w<30;w++)g.dhst[w]=0;for(w=0;w<19;w++)g.ihst[w]=0;var b=u<_&&u<s?0:_<s?1:2;if(U(a,n,e),U(a,n+1,b),n+=3,b==0){for(;(7&n)!=0;)n++;n=c.F._copyExact(y,E,o,a,n);}else {var A,T;if(b==1&&(A=g.fltree,T=g.fdtree),b==2){c.F.makeCodes(g.ltree,v),c.F.revCodes(g.ltree,v),c.F.makeCodes(g.dtree,C),c.F.revCodes(g.dtree,C),c.F.makeCodes(g.itree,M),c.F.revCodes(g.itree,M),A=g.ltree,T=g.dtree,d(a,n,I-257),d(a,n+=5,N-1),d(a,n+=5,k-4),n+=4;for(var m=0;m<k;m++)d(a,n+3*m,g.itree[1+(g.ordr[m]<<1)]);n+=3*k,n=c.F._codeTiny(L,g.itree,a,n),n=c.F._codeTiny(R,g.itree,a,n);}for(var h=E,P=0;P<p;P+=2){for(var x=t[P],O=x>>>23,H=h+(8388607&x);h<H;)n=c.F._writeLit(y[h++],A,a,n);if(O!=0){var D=t[P+1],Q=D>>16,B=D>>8&255,F=255&D;d(a,n=c.F._writeLit(257+B,A,a,n),O-g.of0[B]),n+=g.exb[B],U(a,n=c.F._writeLit(F,T,a,n),Q-g.df0[F]),n+=g.dxb[F],h+=O;}}n=c.F._writeLit(256,A,a,n);}return n},c.F._copyExact=function(e,t,p,l,y){var E=y>>>3;return l[E]=p,l[E+1]=p>>>8,l[E+2]=255-l[E],l[E+3]=255-l[E+1],E+=4,l.set(new Uint8Array(e.buffer,t,p),E),y+(p+4<<3)},c.F.getTrees=function(){for(var e=c.F.U,t=c.F._hufTree(e.lhst,e.ltree,15),p=c.F._hufTree(e.dhst,e.dtree,15),l=[],y=c.F._lenCodes(e.ltree,l),E=[],o=c.F._lenCodes(e.dtree,E),a=0;a<l.length;a+=2)e.ihst[l[a]]++;for(a=0;a<E.length;a+=2)e.ihst[E[a]]++;for(var n=c.F._hufTree(e.ihst,e.itree,7),f=19;f>4&&e.itree[1+(e.ordr[f-1]<<1)]==0;)f--;return [t,p,n,y,o,f,l,E]},c.F.getSecond=function(e){for(var t=[],p=0;p<e.length;p+=2)t.push(e[p+1]);return t},c.F.nonZero=function(e){for(var t="",p=0;p<e.length;p+=2)e[p+1]!=0&&(t+=(p>>1)+",");return t},c.F.contSize=function(e,t){for(var p=0,l=0;l<t.length;l++)p+=t[l]*e[1+(l<<1)];return p},c.F._codeTiny=function(e,t,p,l){for(var y=0;y<e.length;y+=2){var E=e[y],o=e[y+1];l=c.F._writeLit(E,t,p,l);var a=E==16?2:E==17?3:7;E>15&&(c.F._putsE(p,l,o,a),l+=a);}return l},c.F._lenCodes=function(e,t){for(var p=e.length;p!=2&&e[p-1]==0;)p-=2;for(var l=0;l<p;l+=2){var y=e[l+1],E=l+3<p?e[l+3]:-1,o=l+5<p?e[l+5]:-1,a=l==0?-1:e[l-1];if(y==0&&E==y&&o==y){for(var n=l+5;n+2<p&&e[n+2]==y;)n+=2;(f=Math.min(n+1-l>>>1,138))<11?t.push(17,f-3):t.push(18,f-11),l+=2*f-2;}else if(y==a&&E==y&&o==y){for(n=l+5;n+2<p&&e[n+2]==y;)n+=2;var f=Math.min(n+1-l>>>1,6);t.push(16,f-3),l+=2*f-2;}else t.push(y,0);}return p>>>1},c.F._hufTree=function(e,t,p){var l=[],y=e.length,E=t.length,o=0;for(o=0;o<E;o+=2)t[o]=0,t[o+1]=0;for(o=0;o<y;o++)e[o]!=0&&l.push({lit:o,f:e[o]});var a=l.length,n=l.slice(0);if(a==0)return 0;if(a==1){var f=l[0].lit;return n=f==0?1:0,t[1+(f<<1)]=1,t[1+(n<<1)]=1,1}l.sort((function(L,R){return L.f-R.f}));var v=l[0],C=l[1],M=0,I=1,N=2;for(l[0]={lit:-1,f:v.f+C.f,l:v,r:C,d:0};I!=a-1;)v=M!=I&&(N==a||l[M].f<l[N].f)?l[M++]:l[N++],C=M!=I&&(N==a||l[M].f<l[N].f)?l[M++]:l[N++],l[I++]={lit:-1,f:v.f+C.f,l:v,r:C};var k=c.F.setDepth(l[I-1],0);for(k>p&&(c.F.restrictDepth(n,p,k),k=p),o=0;o<a;o++)t[1+(n[o].lit<<1)]=n[o].d;return k},c.F.setDepth=function(e,t){return e.lit!=-1?(e.d=t,t):Math.max(c.F.setDepth(e.l,t+1),c.F.setDepth(e.r,t+1))},c.F.restrictDepth=function(e,t,p){var l=0,y=1<<p-t,E=0;for(e.sort((function(a,n){return n.d==a.d?a.f-n.f:n.d-a.d})),l=0;l<e.length&&e[l].d>t;l++){var o=e[l].d;e[l].d=t,E+=y-(1<<p-o);}for(E>>>=p-t;E>0;)(o=e[l].d)<t?(e[l].d++,E-=1<<t-o-1):l++;for(;l>=0;l--)e[l].d==t&&E<0&&(e[l].d--,E++);E!=0&&console.log("debt left");},c.F._goodIndex=function(e,t){var p=0;return t[16|p]<=e&&(p|=16),t[8|p]<=e&&(p|=8),t[4|p]<=e&&(p|=4),t[2|p]<=e&&(p|=2),t[1|p]<=e&&(p|=1),p},c.F._writeLit=function(e,t,p,l){return c.F._putsF(p,l,t[e<<1]),l+t[1+(e<<1)]},c.F.inflate=function(e,t){var p=Uint8Array;if(e[0]==3&&e[1]==0)return t||new p(0);var l=c.F,y=l._bitsF,E=l._bitsE,o=l._decodeTiny,a=l.makeCodes,n=l.codes2map,f=l._get17,v=l.U,C=t==null;C&&(t=new p(e.length>>>2<<3));for(var M,I,N=0,k=0,L=0,R=0,g=0,U=0,d=0,u=0,_=0;N==0;)if(N=y(e,_,1),k=y(e,_+1,2),_+=3,k!=0){if(C&&(t=c.F._check(t,u+(1<<17))),k==1&&(M=v.flmap,I=v.fdmap,U=511,d=31),k==2){L=E(e,_,5)+257,R=E(e,_+5,5)+1,g=E(e,_+10,4)+4,_+=14;for(var s=0;s<38;s+=2)v.itree[s]=0,v.itree[s+1]=0;var w=1;for(s=0;s<g;s++){var b=E(e,_+3*s,3);v.itree[1+(v.ordr[s]<<1)]=b,b>w&&(w=b);}_+=3*g,a(v.itree,w),n(v.itree,w,v.imap),M=v.lmap,I=v.dmap,_=o(v.imap,(1<<w)-1,L+R,e,_,v.ttree);var A=l._copyOut(v.ttree,0,L,v.ltree);U=(1<<A)-1;var T=l._copyOut(v.ttree,L,R,v.dtree);d=(1<<T)-1,a(v.ltree,A),n(v.ltree,A,M),a(v.dtree,T),n(v.dtree,T,I);}for(;;){var m=M[f(e,_)&U];_+=15&m;var h=m>>>4;if(!(h>>>8))t[u++]=h;else {if(h==256)break;var P=u+h-254;if(h>264){var x=v.ldef[h-257];P=u+(x>>>3)+E(e,_,7&x),_+=7&x;}var O=I[f(e,_)&d];_+=15&O;var H=O>>>4,D=v.ddef[H],Q=(D>>>4)+y(e,_,15&D);for(_+=15&D,C&&(t=c.F._check(t,u+(1<<17)));u<P;)t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q];u=P;}}}else {(7&_)!=0&&(_+=8-(7&_));var B=4+(_>>>3),F=e[B-4]|e[B-3]<<8;C&&(t=c.F._check(t,u+F)),t.set(new p(e.buffer,e.byteOffset+B,F),u),_=B+F<<3,u+=F;}return t.length==u?t:t.slice(0,u)},c.F._check=function(e,t){var p=e.length;if(t<=p)return e;var l=new Uint8Array(Math.max(p<<1,t));return l.set(e,0),l},c.F._decodeTiny=function(e,t,p,l,y,E){for(var o=c.F._bitsE,a=c.F._get17,n=0;n<p;){var f=e[a(l,y)&t];y+=15&f;var v=f>>>4;if(v<=15)E[n]=v,n++;else {var C=0,M=0;v==16?(M=3+o(l,y,2),y+=2,C=E[n-1]):v==17?(M=3+o(l,y,3),y+=3):v==18&&(M=11+o(l,y,7),y+=7);for(var I=n+M;n<I;)E[n]=C,n++;}}return y},c.F._copyOut=function(e,t,p,l){for(var y=0,E=0,o=l.length>>>1;E<p;){var a=e[E+t];l[E<<1]=0,l[1+(E<<1)]=a,a>y&&(y=a),E++;}for(;E<o;)l[E<<1]=0,l[1+(E<<1)]=0,E++;return y},c.F.makeCodes=function(e,t){for(var p,l,y,E,o=c.F.U,a=e.length,n=o.bl_count,f=0;f<=t;f++)n[f]=0;for(f=1;f<a;f+=2)n[e[f]]++;var v=o.next_code;for(p=0,n[0]=0,l=1;l<=t;l++)p=p+n[l-1]<<1,v[l]=p;for(y=0;y<a;y+=2)(E=e[y+1])!=0&&(e[y]=v[E],v[E]++);},c.F.codes2map=function(e,t,p){for(var l=e.length,y=c.F.U.rev15,E=0;E<l;E+=2)if(e[E+1]!=0)for(var o=E>>1,a=e[E+1],n=o<<4|a,f=t-a,v=e[E]<<f,C=v+(1<<f);v!=C;)p[y[v]>>>15-t]=n,v++;},c.F.revCodes=function(e,t){for(var p=c.F.U.rev15,l=15-t,y=0;y<e.length;y+=2){var E=e[y]<<t-e[y+1];e[y]=p[E]>>>l;}},c.F._putsE=function(e,t,p){p<<=7&t;var l=t>>>3;e[l]|=p,e[l+1]|=p>>>8;},c.F._putsF=function(e,t,p){p<<=7&t;var l=t>>>3;e[l]|=p,e[l+1]|=p>>>8,e[l+2]|=p>>>16;},c.F._bitsE=function(e,t,p){return (e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<p)-1},c.F._bitsF=function(e,t,p){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<p)-1},c.F._get17=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},c.F._get25=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},c.F.U=(r=Uint16Array,S=Uint32Array,{next_code:new r(16),bl_count:new r(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 r(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 S(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new S(286),dhst:new S(30),ihst:new S(19),lits:new S(15e3),strt:new r(65536),prev:new r(32768)}),(function(){for(var e=c.F.U,t=0;t<32768;t++){var p=t;p=(4278255360&(p=(4042322160&(p=(3435973836&(p=(2863311530&p)>>>1|(1431655765&p)<<1))>>>2|(858993459&p)<<2))>>>4|(252645135&p)<<4))>>>8|(16711935&p)<<8,e.rev15[t]=(p>>>16|p<<16)>>>17;}function l(y,E,o){for(;E--!=0;)y.push(0,o);}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];l(e.fltree,144,8),l(e.fltree,112,9),l(e.fltree,24,7),l(e.fltree,8,8),c.F.makeCodes(e.fltree,9),c.F.codes2map(e.fltree,9,e.flmap),c.F.revCodes(e.fltree,9),l(e.fdtree,32,5),c.F.makeCodes(e.fdtree,5),c.F.codes2map(e.fdtree,5,e.fdmap),c.F.revCodes(e.fdtree,5),l(e.itree,19,0),l(e.ltree,286,0),l(e.dtree,30,0),l(e.ttree,320,0);})();})();var Cn=Tn({__proto__:null,default:$e},[$e]),pe=(function(){var i={nextZero(o,a){for(;o[a]!=0;)a++;return a},readUshort:(o,a)=>o[a]<<8|o[a+1],writeUshort(o,a,n){o[a]=n>>8&255,o[a+1]=255&n;},readUint:(o,a)=>16777216*o[a]+(o[a+1]<<16|o[a+2]<<8|o[a+3]),writeUint(o,a,n){o[a]=n>>24&255,o[a+1]=n>>16&255,o[a+2]=n>>8&255,o[a+3]=255&n;},readASCII(o,a,n){let f="";for(let v=0;v<n;v++)f+=String.fromCharCode(o[a+v]);return f},writeASCII(o,a,n){for(let f=0;f<n.length;f++)o[a+f]=n.charCodeAt(f);},readBytes(o,a,n){let f=[];for(let v=0;v<n;v++)f.push(o[a+v]);return f},pad:o=>o.length<2?`0${o}`:o,readUTF8(o,a,n){let f,v="";for(let C=0;C<n;C++)v+=`%${i.pad(o[a+C].toString(16))}`;try{f=decodeURIComponent(v);}catch{return i.readASCII(o,a,n)}return f}};function r(o,a,n,f){let v=a*n,C=t(f),M=Math.ceil(a*C/8),I=new Uint8Array(4*v),N=new Uint32Array(I.buffer),{ctype:k}=f,{depth:L}=f,R=i.readUshort;if(k==6){let x=v<<2;if(L==8)for(var g=0;g<x;g+=4)I[g]=o[g],I[g+1]=o[g+1],I[g+2]=o[g+2],I[g+3]=o[g+3];if(L==16)for(g=0;g<x;g++)I[g]=o[g<<1];}else if(k==2){let x=f.tabs.tRNS;if(x==null){if(L==8)for(g=0;g<v;g++){var U=3*g;N[g]=255<<24|o[U+2]<<16|o[U+1]<<8|o[U];}if(L==16)for(g=0;g<v;g++)U=6*g,N[g]=255<<24|o[U+4]<<16|o[U+2]<<8|o[U];}else {var d=x[0];let O=x[1],H=x[2];if(L==8)for(g=0;g<v;g++){var u=g<<2;U=3*g,N[g]=255<<24|o[U+2]<<16|o[U+1]<<8|o[U],o[U]==d&&o[U+1]==O&&o[U+2]==H&&(I[u+3]=0);}if(L==16)for(g=0;g<v;g++)u=g<<2,U=6*g,N[g]=255<<24|o[U+4]<<16|o[U+2]<<8|o[U],R(o,U)==d&&R(o,U+2)==O&&R(o,U+4)==H&&(I[u+3]=0);}}else if(k==3){let x=f.tabs.PLTE,O=f.tabs.tRNS,H=O?O.length:0;if(L==1)for(var _=0;_<n;_++){var s=_*M,w=_*a;for(g=0;g<a;g++){u=w+g<<2;var b=3*(A=o[s+(g>>3)]>>7-((7&g)<<0)&1);I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?O[A]:255;}}if(L==2)for(_=0;_<n;_++)for(s=_*M,w=_*a,g=0;g<a;g++)u=w+g<<2,b=3*(A=o[s+(g>>2)]>>6-((3&g)<<1)&3),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?O[A]:255;if(L==4)for(_=0;_<n;_++)for(s=_*M,w=_*a,g=0;g<a;g++)u=w+g<<2,b=3*(A=o[s+(g>>1)]>>4-((1&g)<<2)&15),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?O[A]:255;if(L==8)for(g=0;g<v;g++){var A;u=g<<2,b=3*(A=o[g]),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?O[A]:255;}}else if(k==4){if(L==8)for(g=0;g<v;g++){u=g<<2;var T=o[m=g<<1];I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=o[m+1];}if(L==16)for(g=0;g<v;g++){var m;u=g<<2,T=o[m=g<<2],I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=o[m+2];}}else if(k==0)for(d=f.tabs.tRNS?f.tabs.tRNS:-1,_=0;_<n;_++){let x=_*M,O=_*a;if(L==1)for(var h=0;h<a;h++){var P=(T=255*(o[x+(h>>>3)]>>>7-(7&h)&1))==255*d?0:255;N[O+h]=P<<24|T<<16|T<<8|T;}else if(L==2)for(h=0;h<a;h++)P=(T=85*(o[x+(h>>>2)]>>>6-((3&h)<<1)&3))==85*d?0:255,N[O+h]=P<<24|T<<16|T<<8|T;else if(L==4)for(h=0;h<a;h++)P=(T=17*(o[x+(h>>>1)]>>>4-((1&h)<<2)&15))==17*d?0:255,N[O+h]=P<<24|T<<16|T<<8|T;else if(L==8)for(h=0;h<a;h++)P=(T=o[x+h])==d?0:255,N[O+h]=P<<24|T<<16|T<<8|T;else if(L==16)for(h=0;h<a;h++)T=o[x+(h<<1)],P=R(o,x+(h<<1))==d?0:255,N[O+h]=P<<24|T<<16|T<<8|T;}return I}function S(o,a,n,f){let v=t(o),C=Math.ceil(n*v/8),M=new Uint8Array((C+1+o.interlace)*f);return a=o.tabs.CgBI?e(a,M):c(a,M),o.interlace==0?a=p(a,o,0,n,f):o.interlace==1&&(a=(function(N,k){let L=k.width,R=k.height,g=t(k),U=g>>3,d=Math.ceil(L*g/8),u=new Uint8Array(R*d),_=0,s=[0,0,4,0,2,0,1],w=[0,4,0,2,0,1,0],b=[8,8,8,4,4,2,2],A=[8,8,4,4,2,2,1],T=0;for(;T<7;){let h=b[T],P=A[T],x=0,O=0,H=s[T];for(;H<R;)H+=h,O++;let D=w[T];for(;D<L;)D+=P,x++;let Q=Math.ceil(x*g/8);p(N,k,_,x,O);let B=0,F=s[T];for(;F<R;){let $=w[T],K=_+B*Q<<3;for(;$<L;){var m;if(g==1&&(m=(m=N[K>>3])>>7-(7&K)&1,u[F*d+($>>3)]|=m<<7-((7&$)<<0)),g==2&&(m=(m=N[K>>3])>>6-(7&K)&3,u[F*d+($>>2)]|=m<<6-((3&$)<<1)),g==4&&(m=(m=N[K>>3])>>4-(7&K)&15,u[F*d+($>>1)]|=m<<4-((1&$)<<2)),g>=8){let V=F*d+$*U;for(let z=0;z<U;z++)u[V+z]=N[(K>>3)+z];}K+=g,$+=P;}B++,F+=h;}x*O!=0&&(_+=O*(1+Q)),T+=1;}return u})(a,o)),a}function c(o,a){return e(new Uint8Array(o.buffer,2,o.length-6),a)}var e=(function(){let o={H:{}};return o.H.N=function(a,n){let f=Uint8Array,v,C,M=0,I=0,N=0,k=0,L=0,R=0,g=0,U=0,d=0;if(a[0]==3&&a[1]==0)return n||new f(0);let u=o.H,_=u.b,s=u.e,w=u.R,b=u.n,A=u.A,T=u.Z,m=u.m,h=n==null;for(h&&(n=new f(a.length>>>2<<5));M==0;)if(M=_(a,d,1),I=_(a,d+1,2),d+=3,I!=0){if(h&&(n=o.H.W(n,U+(1<<17))),I==1&&(v=m.J,C=m.h,R=511,g=31),I==2){N=s(a,d,5)+257,k=s(a,d+5,5)+1,L=s(a,d+10,4)+4,d+=14;let x=1;for(var P=0;P<38;P+=2)m.Q[P]=0,m.Q[P+1]=0;for(P=0;P<L;P++){let D=s(a,d+3*P,3);m.Q[1+(m.X[P]<<1)]=D,D>x&&(x=D);}d+=3*L,b(m.Q,x),A(m.Q,x,m.u),v=m.w,C=m.d,d=w(m.u,(1<<x)-1,N+k,a,d,m.v);let O=u.V(m.v,0,N,m.C);R=(1<<O)-1;let H=u.V(m.v,N,k,m.D);g=(1<<H)-1,b(m.C,O),A(m.C,O,v),b(m.D,H),A(m.D,H,C);}for(;;){let x=v[T(a,d)&R];d+=15&x;let O=x>>>4;if(!(O>>>8))n[U++]=O;else {if(O==256)break;{let H=U+O-254;if(O>264){let $=m.q[O-257];H=U+($>>>3)+s(a,d,7&$),d+=7&$;}let D=C[T(a,d)&g];d+=15&D;let Q=D>>>4,B=m.c[Q],F=(B>>>4)+_(a,d,15&B);for(d+=15&B;U<H;)n[U]=n[U++-F],n[U]=n[U++-F],n[U]=n[U++-F],n[U]=n[U++-F];U=H;}}}}else {(7&d)!=0&&(d+=8-(7&d));let x=4+(d>>>3),O=a[x-4]|a[x-3]<<8;h&&(n=o.H.W(n,U+O)),n.set(new f(a.buffer,a.byteOffset+x,O),U),d=x+O<<3,U+=O;}return n.length==U?n:n.slice(0,U)},o.H.W=function(a,n){let f=a.length;if(n<=f)return a;let v=new Uint8Array(f<<1);return v.set(a,0),v},o.H.R=function(a,n,f,v,C,M){let I=o.H.e,N=o.H.Z,k=0;for(;k<f;){let L=a[N(v,C)&n];C+=15&L;let R=L>>>4;if(R<=15)M[k]=R,k++;else {let g=0,U=0;R==16?(U=3+I(v,C,2),C+=2,g=M[k-1]):R==17?(U=3+I(v,C,3),C+=3):R==18&&(U=11+I(v,C,7),C+=7);let d=k+U;for(;k<d;)M[k]=g,k++;}}return C},o.H.V=function(a,n,f,v){let C=0,M=0,I=v.length>>>1;for(;M<f;){let N=a[M+n];v[M<<1]=0,v[1+(M<<1)]=N,N>C&&(C=N),M++;}for(;M<I;)v[M<<1]=0,v[1+(M<<1)]=0,M++;return C},o.H.n=function(a,n){let f=o.H.m,v=a.length,C,M,I,N,k=f.j;for(var L=0;L<=n;L++)k[L]=0;for(L=1;L<v;L+=2)k[a[L]]++;let R=f.K;for(C=0,k[0]=0,M=1;M<=n;M++)C=C+k[M-1]<<1,R[M]=C;for(I=0;I<v;I+=2)N=a[I+1],N!=0&&(a[I]=R[N],R[N]++);},o.H.A=function(a,n,f){let v=a.length,C=o.H.m.r;for(let M=0;M<v;M+=2)if(a[M+1]!=0){let I=M>>1,N=a[M+1],k=I<<4|N,L=n-N,R=a[M]<<L,g=R+(1<<L);for(;R!=g;)f[C[R]>>>15-n]=k,R++;}},o.H.l=function(a,n){let f=o.H.m.r,v=15-n;for(let C=0;C<a.length;C+=2){let M=a[C]<<n-a[C+1];a[C]=f[M]>>>v;}},o.H.M=function(a,n,f){f<<=7&n;let v=n>>>3;a[v]|=f,a[v+1]|=f>>>8;},o.H.I=function(a,n,f){f<<=7&n;let v=n>>>3;a[v]|=f,a[v+1]|=f>>>8,a[v+2]|=f>>>16;},o.H.e=function(a,n,f){return (a[n>>>3]|a[1+(n>>>3)]<<8)>>>(7&n)&(1<<f)-1},o.H.b=function(a,n,f){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)&(1<<f)-1},o.H.Z=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)},o.H.i=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16|a[3+(n>>>3)]<<24)>>>(7&n)},o.H.m=(function(){let a=Uint16Array,n=Uint32Array;return {K:new a(16),j:new a(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 a(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 n(32),J:new a(512),_:[],h:new a(32),$:[],w:new a(32768),C:[],v:[],d:new a(32768),D:[],u:new a(512),Q:[],r:new a(32768),s:new n(286),Y:new n(30),a:new n(19),t:new n(15e3),k:new a(65536),g:new a(32768)}})(),(function(){let a=o.H.m;for(var n=0;n<32768;n++){let v=n;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,a.r[n]=(v>>>16|v<<16)>>>17;}function f(v,C,M){for(;C--!=0;)v.push(0,M);}for(n=0;n<32;n++)a.q[n]=a.S[n]<<3|a.T[n],a.c[n]=a.p[n]<<4|a.z[n];f(a._,144,8),f(a._,112,9),f(a._,24,7),f(a._,8,8),o.H.n(a._,9),o.H.A(a._,9,a.J),o.H.l(a._,9),f(a.$,32,5),o.H.n(a.$,5),o.H.A(a.$,5,a.h),o.H.l(a.$,5),f(a.Q,19,0),f(a.C,286,0),f(a.D,30,0),f(a.v,320,0);})(),o.H.N})();function t(o){return [1,null,3,1,2,null,4][o.ctype]*o.depth}function p(o,a,n,f,v){let C=t(a),M=Math.ceil(f*C/8),I,N;C=Math.ceil(C/8);let k=o[n],L=0;if(k>1&&(o[n]=[0,0,1][k-2]),k==3)for(L=C;L<M;L++)o[L+1]=o[L+1]+(o[L+1-C]>>>1)&255;for(let R=0;R<v;R++)if(I=n+R*M,N=I+R+1,k=o[N-1],L=0,k==0)for(;L<M;L++)o[I+L]=o[N+L];else if(k==1){for(;L<C;L++)o[I+L]=o[N+L];for(;L<M;L++)o[I+L]=o[N+L]+o[I+L-C];}else if(k==2)for(;L<M;L++)o[I+L]=o[N+L]+o[I+L-M];else if(k==3){for(;L<C;L++)o[I+L]=o[N+L]+(o[I+L-M]>>>1);for(;L<M;L++)o[I+L]=o[N+L]+(o[I+L-M]+o[I+L-C]>>>1);}else {for(;L<C;L++)o[I+L]=o[N+L]+l(0,o[I+L-M],0);for(;L<M;L++)o[I+L]=o[N+L]+l(o[I+L-C],o[I+L-M],o[I+L-C-M]);}return o}function l(o,a,n){let f=o+a-n,v=f-o,C=f-a,M=f-n;return v*v<=C*C&&v*v<=M*M?o:C*C<=M*M?a:n}function y(o,a,n){n.width=i.readUint(o,a),a+=4,n.height=i.readUint(o,a),a+=4,n.depth=o[a],a++,n.ctype=o[a],a++,n.compress=o[a],a++,n.filter=o[a],a++,n.interlace=o[a],a++;}function E(o,a,n,f,v,C,M,I,N){let k=Math.min(a,v),L=Math.min(n,C),R=0,g=0;for(let T=0;T<L;T++)for(let m=0;m<k;m++)if(M>=0&&I>=0?(R=T*a+m<<2,g=(I+T)*v+M+m<<2):(R=(-I+T)*a-M+m<<2,g=T*v+m<<2),N==0)f[g]=o[R],f[g+1]=o[R+1],f[g+2]=o[R+2],f[g+3]=o[R+3];else if(N==1){var U=o[R+3]*.00392156862745098,d=o[R]*U,u=o[R+1]*U,_=o[R+2]*U,s=f[g+3]*(1/255),w=f[g]*s,b=f[g+1]*s,A=f[g+2]*s;let h=1-U,P=U+s*h,x=P==0?0:1/P;f[g+3]=255*P,f[g+0]=(d+w*h)*x,f[g+1]=(u+b*h)*x,f[g+2]=(_+A*h)*x;}else if(N==2)U=o[R+3],d=o[R],u=o[R+1],_=o[R+2],s=f[g+3],w=f[g],b=f[g+1],A=f[g+2],U==s&&d==w&&u==b&&_==A?(f[g]=0,f[g+1]=0,f[g+2]=0,f[g+3]=0):(f[g]=d,f[g+1]=u,f[g+2]=_,f[g+3]=U);else if(N==3){if(U=o[R+3],d=o[R],u=o[R+1],_=o[R+2],s=f[g+3],w=f[g],b=f[g+1],A=f[g+2],U==s&&d==w&&u==b&&_==A)continue;if(U<220&&s>20)return false}return true}return {decode:function(a){let n=new Uint8Array(a),f=8,v=i,C=v.readUshort,M=v.readUint,I={tabs:{},frames:[]},N=new Uint8Array(n.length),k,L=0,R=0,g=[137,80,78,71,13,10,26,10];for(var U=0;U<8;U++)if(n[U]!=g[U])throw "The input is not a PNG file!";for(;f<n.length;){let T=v.readUint(n,f);f+=4;let m=v.readASCII(n,f,4);if(f+=4,m=="IHDR")y(n,f,I);else if(m=="iCCP"){for(var d=f;n[d]!=0;)d++;v.readASCII(n,f,d-f),n[d+1];let h=n.slice(d+2,f+T),P=null;try{P=c(h);}catch{P=e(h);}I.tabs[m]=P;}else if(m=="CgBI")I.tabs[m]=n.slice(f,f+4);else if(m=="IDAT"){for(U=0;U<T;U++)N[L+U]=n[f+U];L+=T;}else if(m=="acTL")I.tabs[m]={num_frames:M(n,f),num_plays:M(n,f+4)},k=new Uint8Array(n.length);else if(m=="fcTL"){R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height),R=0);let h={x:M(n,f+12),y:M(n,f+16),width:M(n,f+4),height:M(n,f+8)},P=C(n,f+22);P=C(n,f+20)/(P==0?100:P);let x={rect:h,delay:Math.round(1e3*P),dispose:n[f+24],blend:n[f+25]};I.frames.push(x);}else if(m=="fdAT"){for(U=0;U<T-4;U++)k[R+U]=n[f+U+4];R+=T-4;}else if(m=="pHYs")I.tabs[m]=[v.readUint(n,f),v.readUint(n,f+4),n[f+8]];else if(m=="cHRM")for(I.tabs[m]=[],U=0;U<8;U++)I.tabs[m].push(v.readUint(n,f+4*U));else if(m=="tEXt"||m=="zTXt"){I.tabs[m]==null&&(I.tabs[m]={});var u=v.nextZero(n,f),_=v.readASCII(n,f,u-f),s=f+T-u-1;if(m=="tEXt")b=v.readASCII(n,u+1,s);else {var w=c(n.slice(u+2,u+2+s));b=v.readUTF8(w,0,w.length);}I.tabs[m][_]=b;}else if(m=="iTXt"){I.tabs[m]==null&&(I.tabs[m]={}),u=0,d=f,u=v.nextZero(n,d),_=v.readASCII(n,d,u-d);let h=n[d=u+1];var b;n[d+1],d+=2,u=v.nextZero(n,d),v.readASCII(n,d,u-d),d=u+1,u=v.nextZero(n,d),v.readUTF8(n,d,u-d),s=T-((d=u+1)-f),h==0?b=v.readUTF8(n,d,s):(w=c(n.slice(d,d+s)),b=v.readUTF8(w,0,w.length)),I.tabs[m][_]=b;}else if(m=="PLTE")I.tabs[m]=v.readBytes(n,f,T);else if(m=="hIST"){let h=I.tabs.PLTE.length/3;for(I.tabs[m]=[],U=0;U<h;U++)I.tabs[m].push(C(n,f+2*U));}else if(m=="tRNS")I.ctype==3?I.tabs[m]=v.readBytes(n,f,T):I.ctype==0?I.tabs[m]=C(n,f):I.ctype==2&&(I.tabs[m]=[C(n,f),C(n,f+2),C(n,f+4)]);else if(m=="gAMA")I.tabs[m]=v.readUint(n,f)/1e5;else if(m=="sRGB")I.tabs[m]=n[f];else if(m=="bKGD")I.ctype==0||I.ctype==4?I.tabs[m]=[C(n,f)]:I.ctype==2||I.ctype==6?I.tabs[m]=[C(n,f),C(n,f+2),C(n,f+4)]:I.ctype==3&&(I.tabs[m]=n[f]);else if(m=="IEND")break;f+=T,v.readUint(n,f),f+=4;}var A;return R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height)),I.data=S(I,N,I.width,I.height),delete I.compress,delete I.interlace,delete I.filter,I},toRGBA8:function(a){let n=a.width,f=a.height;if(a.tabs.acTL==null)return [r(a.data,n,f,a).buffer];let v=[];a.frames[0].data==null&&(a.frames[0].data=a.data);let C=n*f*4,M=new Uint8Array(C),I=new Uint8Array(C),N=new Uint8Array(C);for(let L=0;L<a.frames.length;L++){let R=a.frames[L],g=R.rect.x,U=R.rect.y,d=R.rect.width,u=R.rect.height,_=r(R.data,d,u,a);if(L!=0)for(var k=0;k<C;k++)N[k]=M[k];if(R.blend==0?E(_,d,u,M,n,f,g,U,0):R.blend==1&&E(_,d,u,M,n,f,g,U,1),v.push(M.buffer.slice(0)),R.dispose!=0){if(R.dispose==1)E(I,d,u,M,n,f,g,U,0);else if(R.dispose==2)for(k=0;k<C;k++)M[k]=N[k];}}return v},_paeth:l,_copyTile:E,_bin:i}})();(function(){let{_copyTile:i}=pe,{_bin:r}=pe,S=pe._paeth;var c={table:(function(){let d=new Uint32Array(256);for(let u=0;u<256;u++){let _=u;for(let s=0;s<8;s++)1&_?_=3988292384^_>>>1:_>>>=1;d[u]=_;}return d})(),update(d,u,_,s){for(let w=0;w<s;w++)d=c.table[255&(d^u[_+w])]^d>>>8;return d},crc:(d,u,_)=>4294967295^c.update(4294967295,d,u,_)};function e(d,u,_,s){u[_]+=d[0]*s>>4,u[_+1]+=d[1]*s>>4,u[_+2]+=d[2]*s>>4,u[_+3]+=d[3]*s>>4;}function t(d){return Math.max(0,Math.min(255,d))}function p(d,u){let _=d[0]-u[0],s=d[1]-u[1],w=d[2]-u[2],b=d[3]-u[3];return _*_+s*s+w*w+b*b}function l(d,u,_,s,w,b,A){A==null&&(A=1);let T=s.length,m=[];for(var h=0;h<T;h++){let F=s[h];m.push([F>>>0&255,F>>>8&255,F>>>16&255,F>>>24&255]);}for(h=0;h<T;h++){let F=4294967295;for(var P=0,x=0;x<T;x++){var O=p(m[h],m[x]);x!=h&&O<F&&(F=O,P=x);}}let H=new Uint32Array(w.buffer),D=new Int16Array(u*_*4),Q=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<Q.length;h++)Q[h]=255*((Q[h]+.5)/16-.5);for(let F=0;F<_;F++)for(let $=0;$<u;$++){var B;h=4*(F*u+$),A!=2?B=[t(d[h]+D[h]),t(d[h+1]+D[h+1]),t(d[h+2]+D[h+2]),t(d[h+3]+D[h+3])]:(O=Q[4*(3&F)+(3&$)],B=[t(d[h]+O),t(d[h+1]+O),t(d[h+2]+O),t(d[h+3]+O)]),P=0;let K=16777215;for(x=0;x<T;x++){let q=p(B,m[x]);q<K&&(K=q,P=x);}let V=m[P],z=[B[0]-V[0],B[1]-V[1],B[2]-V[2],B[3]-V[3]];A==1&&($!=u-1&&e(z,D,h+4,7),F!=_-1&&($!=0&&e(z,D,h+4*u-4,3),e(z,D,h+4*u,5),$!=u-1&&e(z,D,h+4*u+4,1))),b[h>>2]=P,H[h>>2]=s[P];}}function y(d,u,_,s,w){w==null&&(w={});let{crc:b}=c,A=r.writeUint,T=r.writeUshort,m=r.writeASCII,h=8,P=d.frames.length>1,x,O=false,H=33+(P?20:0);if(w.sRGB!=null&&(H+=13),w.pHYs!=null&&(H+=21),w.iCCP!=null&&(x=pako.deflate(w.iCCP),H+=21+x.length+4),d.ctype==3){for(var D=d.plte.length,Q=0;Q<D;Q++)d.plte[Q]>>>24!=255&&(O=true);H+=8+3*D+4+(O?8+1*D+4:0);}for(var B=0;B<d.frames.length;B++)P&&(H+=38),H+=(V=d.frames[B]).cimg.length+12,B!=0&&(H+=4);H+=12;let F=new Uint8Array(H),$=[137,80,78,71,13,10,26,10];for(Q=0;Q<8;Q++)F[Q]=$[Q];if(A(F,h,13),h+=4,m(F,h,"IHDR"),h+=4,A(F,h,u),h+=4,A(F,h,_),h+=4,F[h]=d.depth,h++,F[h]=d.ctype,h++,F[h]=0,h++,F[h]=0,h++,F[h]=0,h++,A(F,h,b(F,h-17,17)),h+=4,w.sRGB!=null&&(A(F,h,1),h+=4,m(F,h,"sRGB"),h+=4,F[h]=w.sRGB,h++,A(F,h,b(F,h-5,5)),h+=4),w.iCCP!=null){let z=13+x.length;A(F,h,z),h+=4,m(F,h,"iCCP"),h+=4,m(F,h,"ICC profile"),h+=11,h+=2,F.set(x,h),h+=x.length,A(F,h,b(F,h-(z+4),z+4)),h+=4;}if(w.pHYs!=null&&(A(F,h,9),h+=4,m(F,h,"pHYs"),h+=4,A(F,h,w.pHYs[0]),h+=4,A(F,h,w.pHYs[1]),h+=4,F[h]=w.pHYs[2],h++,A(F,h,b(F,h-13,13)),h+=4),P&&(A(F,h,8),h+=4,m(F,h,"acTL"),h+=4,A(F,h,d.frames.length),h+=4,A(F,h,w.loop!=null?w.loop:0),h+=4,A(F,h,b(F,h-12,12)),h+=4),d.ctype==3){for(A(F,h,3*(D=d.plte.length)),h+=4,m(F,h,"PLTE"),h+=4,Q=0;Q<D;Q++){let z=3*Q,q=d.plte[Q],G=255&q,W=q>>>8&255,ie=q>>>16&255;F[h+z+0]=G,F[h+z+1]=W,F[h+z+2]=ie;}if(h+=3*D,A(F,h,b(F,h-3*D-4,3*D+4)),h+=4,O){for(A(F,h,D),h+=4,m(F,h,"tRNS"),h+=4,Q=0;Q<D;Q++)F[h+Q]=d.plte[Q]>>>24&255;h+=D,A(F,h,b(F,h-D-4,D+4)),h+=4;}}let K=0;for(B=0;B<d.frames.length;B++){var V=d.frames[B];P&&(A(F,h,26),h+=4,m(F,h,"fcTL"),h+=4,A(F,h,K++),h+=4,A(F,h,V.rect.width),h+=4,A(F,h,V.rect.height),h+=4,A(F,h,V.rect.x),h+=4,A(F,h,V.rect.y),h+=4,T(F,h,s[B]),h+=2,T(F,h,1e3),h+=2,F[h]=V.dispose,h++,F[h]=V.blend,h++,A(F,h,b(F,h-30,30)),h+=4);let z=V.cimg;A(F,h,(D=z.length)+(B==0?0:4)),h+=4;let q=h;m(F,h,B==0?"IDAT":"fdAT"),h+=4,B!=0&&(A(F,h,K++),h+=4),F.set(z,h),h+=D,A(F,h,b(F,q,h-q)),h+=4;}return A(F,h,0),h+=4,m(F,h,"IEND"),h+=4,A(F,h,b(F,h-4,4)),h+=4,F.buffer}function E(d,u,_){for(let s=0;s<d.frames.length;s++){let w=d.frames[s];w.rect.width;let b=w.rect.height,A=new Uint8Array(b*w.bpl+b);w.cimg=f(w.img,b,w.bpp,w.bpl,A,u,_);}}function o(d,u,_,s,w){let b=w[0],A=w[1],T=w[2],m=w[3],h=w[4],P=w[5],x=6,O=8,H=255;for(var D=0;D<d.length;D++){let te=new Uint8Array(d[D]);for(var Q=te.length,B=0;B<Q;B+=4)H&=te[B+3];}let F=H!=255,$=(function(Y,J,ne,oe,j,ue){let ee=[];for(var X=0;X<Y.length;X++){let ce=new Uint8Array(Y[X]),he=new Uint32Array(ce.buffer);var le;let de=0,Ae=0,me=J,Ie=ne,Ye=oe?1:0;if(X!=0){let yn=ue||oe||X==1||ee[X-2].dispose!=0?1:2,Je=0,vt=1e9;for(let Le=0;Le<yn;Le++){var ge=new Uint8Array(Y[X-1-Le]);let wn=new Uint32Array(Y[X-1-Le]),_e=J,be=ne,Oe=-1,De=-1;for(let Re=0;Re<ne;Re++)for(let Ce=0;Ce<J;Ce++)he[se=Re*J+Ce]!=wn[se]&&(Ce<_e&&(_e=Ce),Ce>Oe&&(Oe=Ce),Re<be&&(be=Re),Re>De&&(De=Re));Oe==-1&&(_e=be=Oe=De=0),j&&((1&_e)==1&&_e--,(1&be)==1&&be--);let _t=(Oe-_e+1)*(De-be+1);_t<vt&&(vt=_t,Je=Le,de=_e,Ae=be,me=Oe-_e+1,Ie=De-be+1);}ge=new Uint8Array(Y[X-1-Je]),Je==1&&(ee[X-1].dispose=2),le=new Uint8Array(me*Ie*4),i(ge,J,ne,le,me,Ie,-de,-Ae,0),Ye=i(ce,J,ne,le,me,Ie,-de,-Ae,3)?1:0,Ye==1?n(ce,J,ne,le,{x:de,y:Ae,width:me,height:Ie}):i(ce,J,ne,le,me,Ie,-de,-Ae,0);}else le=ce.slice(0);ee.push({rect:{x:de,y:Ae,width:me,height:Ie},img:le,blend:Ye,dispose:0});}if(oe)for(X=0;X<ee.length;X++){if((Te=ee[X]).blend==1)continue;let ce=Te.rect,he=ee[X-1].rect,de=Math.min(ce.x,he.x),Ae=Math.min(ce.y,he.y),me={x:de,y:Ae,width:Math.max(ce.x+ce.width,he.x+he.width)-de,height:Math.max(ce.y+ce.height,he.y+he.height)-Ae};ee[X-1].dispose=1,X-1!=0&&a(Y,J,ne,ee,X-1,me,j),a(Y,J,ne,ee,X,me,j);}let He=0;if(Y.length!=1)for(var se=0;se<ee.length;se++){var Te;He+=(Te=ee[se]).rect.width*Te.rect.height;}return ee})(d,u,_,b,A,T),K={},V=[],z=[];if(s!=0){let te=[];for(B=0;B<$.length;B++)te.push($[B].img.buffer);let Y=(function(j){let ue=0;for(var ee=0;ee<j.length;ee++)ue+=j[ee].byteLength;let X=new Uint8Array(ue),le=0;for(ee=0;ee<j.length;ee++){let ge=new Uint8Array(j[ee]),He=ge.length;for(let se=0;se<He;se+=4){let Te=ge[se],ce=ge[se+1],he=ge[se+2],de=ge[se+3];de==0&&(Te=ce=he=0),X[le+se]=Te,X[le+se+1]=ce,X[le+se+2]=he,X[le+se+3]=de;}le+=He;}return X.buffer})(te),J=C(Y,s);for(B=0;B<J.plte.length;B++)V.push(J.plte[B].est.rgba);let ne=0;for(B=0;B<$.length;B++){let oe=(G=$[B]).img.length;var q=new Uint8Array(J.inds.buffer,ne>>2,oe>>2);z.push(q);let j=new Uint8Array(J.abuf,ne,oe);P&&l(G.img,G.rect.width,G.rect.height,V,j,q),G.img.set(j),ne+=oe;}}else for(D=0;D<$.length;D++){var G=$[D];let te=new Uint32Array(G.img.buffer);var W=G.rect.width;for(Q=te.length,q=new Uint8Array(Q),z.push(q),B=0;B<Q;B++){let Y=te[B];if(B!=0&&Y==te[B-1])q[B]=q[B-1];else if(B>W&&Y==te[B-W])q[B]=q[B-W];else {let J=K[Y];if(J==null&&(K[Y]=J=V.length,V.push(Y),V.length>=300))break;q[B]=J;}}}let ie=V.length;for(ie<=256&&h==0&&(O=ie<=2?1:ie<=4?2:ie<=16?4:8,O=Math.max(O,m)),D=0;D<$.length;D++){(G=$[D]).rect.x,G.rect.y,W=G.rect.width;let te=G.rect.height,Y=G.img;new Uint32Array(Y.buffer);let J=4*W,ne=4;if(ie<=256&&h==0){J=Math.ceil(O*W/8);var ae=new Uint8Array(J*te);let oe=z[D];for(let j=0;j<te;j++){B=j*J;let ue=j*W;if(O==8)for(var Z=0;Z<W;Z++)ae[B+Z]=oe[ue+Z];else if(O==4)for(Z=0;Z<W;Z++)ae[B+(Z>>1)]|=oe[ue+Z]<<4-4*(1&Z);else if(O==2)for(Z=0;Z<W;Z++)ae[B+(Z>>2)]|=oe[ue+Z]<<6-2*(3&Z);else if(O==1)for(Z=0;Z<W;Z++)ae[B+(Z>>3)]|=oe[ue+Z]<<7-1*(7&Z);}Y=ae,x=3,ne=1;}else if(F==0&&$.length==1){ae=new Uint8Array(W*te*3);let oe=W*te;for(B=0;B<oe;B++){let j=3*B,ue=4*B;ae[j]=Y[ue],ae[j+1]=Y[ue+1],ae[j+2]=Y[ue+2];}Y=ae,x=2,ne=3,J=3*W;}G.img=Y,G.bpl=J,G.bpp=ne;}return {ctype:x,depth:O,plte:V,frames:$}}function a(d,u,_,s,w,b,A){let T=Uint8Array,m=Uint32Array,h=new T(d[w-1]),P=new m(d[w-1]),x=w+1<d.length?new T(d[w+1]):null,O=new T(d[w]),H=new m(O.buffer),D=u,Q=_,B=-1,F=-1;for(let K=0;K<b.height;K++)for(let V=0;V<b.width;V++){let z=b.x+V,q=b.y+K,G=q*u+z,W=H[G];W==0||s[w-1].dispose==0&&P[G]==W&&(x==null||x[4*G+3]!=0)||(z<D&&(D=z),z>B&&(B=z),q<Q&&(Q=q),q>F&&(F=q));}B==-1&&(D=Q=B=F=0),A&&((1&D)==1&&D--,(1&Q)==1&&Q--),b={x:D,y:Q,width:B-D+1,height:F-Q+1};let $=s[w];$.rect=b,$.blend=1,$.img=new Uint8Array(b.width*b.height*4),s[w-1].dispose==0?(i(h,u,_,$.img,b.width,b.height,-b.x,-b.y,0),n(O,u,_,$.img,b)):i(O,u,_,$.img,b.width,b.height,-b.x,-b.y,0);}function n(d,u,_,s,w){i(d,u,_,s,w.width,w.height,-w.x,-w.y,2);}function f(d,u,_,s,w,b,A){let T=[],m,h=[0,1,2,3,4];b!=-1?h=[b]:(u*s>5e5||_==1)&&(h=[0]),A&&(m={level:0});let P=Cn;for(var x=0;x<h.length;x++){for(let D=0;D<u;D++)v(w,d,D,s,_,h[x]);T.push(P.deflate(w,m));}let O,H=1e9;for(x=0;x<T.length;x++)T[x].length<H&&(O=x,H=T[x].length);return T[O]}function v(d,u,_,s,w,b){let A=_*s,T=A+_;if(d[T]=b,T++,b==0)if(s<500)for(var m=0;m<s;m++)d[T+m]=u[A+m];else d.set(new Uint8Array(u.buffer,A,s),T);else if(b==1){for(m=0;m<w;m++)d[T+m]=u[A+m];for(m=w;m<s;m++)d[T+m]=u[A+m]-u[A+m-w]+256&255;}else if(_==0){for(m=0;m<w;m++)d[T+m]=u[A+m];if(b==2)for(m=w;m<s;m++)d[T+m]=u[A+m];if(b==3)for(m=w;m<s;m++)d[T+m]=u[A+m]-(u[A+m-w]>>1)+256&255;if(b==4)for(m=w;m<s;m++)d[T+m]=u[A+m]-S(u[A+m-w],0,0)+256&255;}else {if(b==2)for(m=0;m<s;m++)d[T+m]=u[A+m]+256-u[A+m-s]&255;if(b==3){for(m=0;m<w;m++)d[T+m]=u[A+m]+256-(u[A+m-s]>>1)&255;for(m=w;m<s;m++)d[T+m]=u[A+m]+256-(u[A+m-s]+u[A+m-w]>>1)&255;}if(b==4){for(m=0;m<w;m++)d[T+m]=u[A+m]+256-S(0,u[A+m-s],0)&255;for(m=w;m<s;m++)d[T+m]=u[A+m]+256-S(u[A+m-w],u[A+m-s],u[A+m-w-s])&255;}}}function C(d,u){let _=new Uint8Array(d),s=_.slice(0),w=new Uint32Array(s.buffer),b=M(s,u),A=b[0],T=b[1],m=_.length,h=new Uint8Array(m>>2),P;if(_.length<2e7)for(var x=0;x<m;x+=4)P=I(A,O=_[x]*(1/255),H=_[x+1]*(1/255),D=_[x+2]*(1/255),Q=_[x+3]*(1/255)),h[x>>2]=P.ind,w[x>>2]=P.est.rgba;else for(x=0;x<m;x+=4){var O=_[x]*.00392156862745098,H=_[x+1]*(1/255),D=_[x+2]*(1/255),Q=_[x+3]*(1/255);for(P=A;P.left;)P=N(P.est,O,H,D,Q)<=0?P.left:P.right;h[x>>2]=P.ind,w[x>>2]=P.est.rgba;}return {abuf:s.buffer,inds:h,plte:T}}function M(d,u,_){_==null&&(_=1e-4);let s=new Uint32Array(d.buffer),w={i0:0,i1:d.length,bst:null,est:null,tdst:0,left:null,right:null};w.bst=R(d,w.i0,w.i1),w.est=g(w.bst);let b=[w];for(;b.length<u;){let T=0,m=0;for(var A=0;A<b.length;A++)b[A].est.L>T&&(T=b[A].est.L,m=A);if(T<_)break;let h=b[m],P=k(d,s,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=P||h.i1<=P){h.est.L=0;continue}let x={i0:h.i0,i1:P,bst:null,est:null,tdst:0,left:null,right:null};x.bst=R(d,x.i0,x.i1),x.est=g(x.bst);let O={i0:P,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};for(O.bst={R:[],m:[],N:h.bst.N-x.bst.N},A=0;A<16;A++)O.bst.R[A]=h.bst.R[A]-x.bst.R[A];for(A=0;A<4;A++)O.bst.m[A]=h.bst.m[A]-x.bst.m[A];O.est=g(O.bst),h.left=x,h.right=O,b[m]=x,b.push(O);}for(b.sort(((T,m)=>m.bst.N-T.bst.N)),A=0;A<b.length;A++)b[A].ind=A;return [w,b]}function I(d,u,_,s,w){if(d.left==null)return d.tdst=(function(x,O,H,D,Q){let B=O-x[0],F=H-x[1],$=D-x[2],K=Q-x[3];return B*B+F*F+$*$+K*K})(d.est.q,u,_,s,w),d;let b=N(d.est,u,_,s,w),A=d.left,T=d.right;b>0&&(A=d.right,T=d.left);let m=I(A,u,_,s,w);if(m.tdst<=b*b)return m;let h=I(T,u,_,s,w);return h.tdst<m.tdst?h:m}function N(d,u,_,s,w){let{e:b}=d;return b[0]*u+b[1]*_+b[2]*s+b[3]*w-d.eMq}function k(d,u,_,s,w,b){for(s-=4;_<s;){for(;L(d,_,w)<=b;)_+=4;for(;L(d,s,w)>b;)s-=4;if(_>=s)break;let A=u[_>>2];u[_>>2]=u[s>>2],u[s>>2]=A,_+=4,s-=4;}for(;L(d,_,w)>b;)_-=4;return _+4}function L(d,u,_){return d[u]*_[0]+d[u+1]*_[1]+d[u+2]*_[2]+d[u+3]*_[3]}function R(d,u,_){let s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=[0,0,0,0],b=_-u>>2;for(let A=u;A<_;A+=4){let T=d[A]*.00392156862745098,m=d[A+1]*(1/255),h=d[A+2]*(1/255),P=d[A+3]*(1/255);w[0]+=T,w[1]+=m,w[2]+=h,w[3]+=P,s[0]+=T*T,s[1]+=T*m,s[2]+=T*h,s[3]+=T*P,s[5]+=m*m,s[6]+=m*h,s[7]+=m*P,s[10]+=h*h,s[11]+=h*P,s[15]+=P*P;}return s[4]=s[1],s[8]=s[2],s[9]=s[6],s[12]=s[3],s[13]=s[7],s[14]=s[11],{R:s,m:w,N:b}}function g(d){let{R:u}=d,{m:_}=d,{N:s}=d,w=_[0],b=_[1],A=_[2],T=_[3],m=s==0?0:1/s,h=[u[0]-w*w*m,u[1]-w*b*m,u[2]-w*A*m,u[3]-w*T*m,u[4]-b*w*m,u[5]-b*b*m,u[6]-b*A*m,u[7]-b*T*m,u[8]-A*w*m,u[9]-A*b*m,u[10]-A*A*m,u[11]-A*T*m,u[12]-T*w*m,u[13]-T*b*m,u[14]-T*A*m,u[15]-T*T*m],P=h,x=U,O=[Math.random(),Math.random(),Math.random(),Math.random()],H=0,D=0;if(s!=0)for(let B=0;B<16&&(O=x.multVec(P,O),D=Math.sqrt(x.dot(O,O)),O=x.sml(1/D,O),!(B!=0&&Math.abs(D-H)<1e-9));B++)H=D;let Q=[w*m,b*m,A*m,T*m];return {Cov:h,q:Q,e:O,L:H,eMq255:x.dot(x.sml(255,Q),O),eMq:x.dot(O,Q),rgba:(Math.round(255*Q[3])<<24|Math.round(255*Q[2])<<16|Math.round(255*Q[1])<<8|Math.round(255*Q[0])<<0)>>>0}}var U={multVec:(d,u)=>[d[0]*u[0]+d[1]*u[1]+d[2]*u[2]+d[3]*u[3],d[4]*u[0]+d[5]*u[1]+d[6]*u[2]+d[7]*u[3],d[8]*u[0]+d[9]*u[1]+d[10]*u[2]+d[11]*u[3],d[12]*u[0]+d[13]*u[1]+d[14]*u[2]+d[15]*u[3]],dot:(d,u)=>d[0]*u[0]+d[1]*u[1]+d[2]*u[2]+d[3]*u[3],sml:(d,u)=>[d*u[0],d*u[1],d*u[2],d*u[3]]};pe.encode=function(u,_,s,w,b,A,T){w==null&&(w=0),T==null&&(T=false);let m=o(u,_,s,w,[false,false,false,0,T,false]);return E(m,-1),y(m,_,s,b,A)},pe.encodeLL=function(u,_,s,w,b,A,T,m){let h={ctype:0+(w==1?0:2)+(b==0?0:4),depth:A,frames:[]},P=(w+b)*A,x=P*_;for(let O=0;O<u.length;O++)h.frames.push({rect:{x:0,y:0,width:_,height:s},img:new Uint8Array(u[O]),blend:0,dispose:1,bpp:Math.ceil(P/8),bpl:Math.ceil(x/8)});return E(h,0,true),y(h,_,s,T,m)},pe.encode.compress=o,pe.encode.dither=l,pe.quantize=C,pe.quantize.getKDtree=M,pe.quantize.getNearest=I;})();var It={toArrayBuffer(i,r){let S=i.width,c=i.height,e=S<<2,t=i.getContext("2d").getImageData(0,0,S,c),p=new Uint32Array(t.data.buffer),l=(32*S+31)/32<<2,y=l*c,E=122+y,o=new ArrayBuffer(E),a=new DataView(o),n=1<<20,f,v,C,M,I=n,N=0,k=0,L=0;function R(d){a.setUint16(k,d,true),k+=2;}function g(d){a.setUint32(k,d,true),k+=4;}function U(d){k+=d;}R(19778),g(E),U(4),g(122),g(108),g(S),g(-c>>>0),R(1),R(32),g(3),g(y),g(2835),g(2835),U(8),g(16711680),g(65280),g(255),g(4278190080),g(1466527264),(function d(){for(;N<c&&I>0;){for(M=122+N*l,f=0;f<e;)I--,v=p[L++],C=v>>>24,a.setUint32(M+f,v<<8|C),f+=4;N++;}L<p.length?(I=n,setTimeout(d,It._dly)):r(o);})();},toBlob(i,r){this.toArrayBuffer(i,(S=>{r(new Blob([S],{type:"image/bmp"}));}));},_dly:9},fe={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},xn={[fe.CHROME]:16384,[fe.FIREFOX]:11180,[fe.DESKTOP_SAFARI]:16384,[fe.IE]:8192,[fe.IOS]:4096,[fe.ETC]:8192},et=typeof globalThis.window<"u",Rt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,We=et&&globalThis.window.cordova&&globalThis.window.cordova.require&&globalThis.window.cordova.require("cordova/modulemapper"),Un=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"File")||typeof File<"u"&&File),Ct=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"FileReader")||typeof globalThis.FileReader<"u"&&globalThis.FileReader);function tt(i,r,S=Date.now()){return new Promise((c=>{let e=i.split(","),t=e[0].match(/:(.*?);/)[1],p=globalThis.atob(e[1]),l=p.length,y=new Uint8Array(l);for(;l--;)y[l]=p.charCodeAt(l);let E=new Blob([y],{type:t});E.name=r,E.lastModified=S,c(E);}))}function xt(i){return new Promise(((r,S)=>{let c=new Ct;c.onload=()=>r(c.result),c.onerror=e=>S(e),c.readAsDataURL(i);}))}function Ut(i){return new Promise(((r,S)=>{let c=new globalThis.Image;c.onload=()=>r(c),c.onerror=e=>S(e),c.src=i;}))}function xe(){if(xe.cachedResult!==void 0)return xe.cachedResult;let i=fe.ETC,{userAgent:r}=navigator;return /Chrom(e|ium)/i.test(r)?i=fe.CHROME:/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)?i=fe.IOS:/Safari/i.test(r)?i=fe.DESKTOP_SAFARI:/Firefox/i.test(r)?i=fe.FIREFOX:(/MSIE/i.test(r)||globalThis.document.documentMode)&&(i=fe.IE),xe.cachedResult=i,xe.cachedResult}function Ot(i,r){let S=xe(),c=xn[S],e=i,t=r,p=e*t,l=e>t?t/e:e/t;for(;p>c*c;){let y=(c+e)/2,E=(c+t)/2;y<E?(t=E,e=E*l):(t=y*l,e=y),p=e*t;}return {width:e,height:t}}function Ve(i,r){let S,c;try{if(S=new OffscreenCanvas(i,r),c=S.getContext("2d"),c===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{S=globalThis.document.createElement("canvas"),c=S.getContext("2d");}return S.width=i,S.height=r,[S,c]}function Pt(i,r){let{width:S,height:c}=Ot(i.width,i.height),[e,t]=Ve(S,c);return r&&/jpe?g/.test(r)&&(t.fillStyle="white",t.fillRect(0,0,e.width,e.height)),t.drawImage(i,0,0,e.width,e.height),e}function Qe(){return Qe.cachedResult!==void 0||(Qe.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof globalThis.document<"u"&&"ontouchend"in globalThis.document),Qe.cachedResult}function ze(i,r={}){return new Promise((function(S,c){let e,t;var p=function(){try{return t=Pt(e,r.fileType||i.type),S([e,t])}catch(y){return c(y)}},l=function(y){try{var E=function(o){try{throw o}catch(a){return c(a)}};try{let o;return xt(i).then((function(a){try{return o=a,Ut(o).then((function(n){try{return e=n,(function(){try{return p()}catch(f){return c(f)}})()}catch(f){return E(f)}}),E)}catch(n){return E(n)}}),E)}catch(o){E(o);}}catch(o){return c(o)}};try{if(Qe()||[fe.DESKTOP_SAFARI,fe.MOBILE_SAFARI].includes(xe()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(i).then((function(y){try{return e=y,p()}catch{return l()}}),l)}catch{l();}}))}function Ge(i,r,S,c,e=1){return new Promise((function(t,p){let l;if(r==="image/png"){let a,n,f;return a=i.getContext("2d"),{data:n}=a.getImageData(0,0,i.width,i.height),f=pe.encode([n.buffer],i.width,i.height,4096*e),l=new Blob([f],{type:r}),l.name=S,l.lastModified=c,y.call(this)}{let a=function(){return y.call(this)};if(r==="image/bmp")return new Promise((n=>It.toBlob(i,n))).then(function(n){try{return l=n,l.name=S,l.lastModified=c,a.call(this)}catch(f){return p(f)}}.bind(this),p);{let n=function(){return a.call(this)};if(typeof OffscreenCanvas=="function"&&i instanceof OffscreenCanvas)return i.convertToBlob({type:r,quality:e}).then(function(f){try{return l=f,l.name=S,l.lastModified=c,n.call(this)}catch(v){return p(v)}}.bind(this),p);{let f;return f=i.toDataURL(r,e),tt(f,S,c).then(function(v){try{return l=v,n.call(this)}catch(C){return p(C)}}.bind(this),p)}}}function y(){return t(l)}}))}function ye(i){i.width=0,i.height=0;}function Pe(){return new Promise((function(i,r){let c,e,t,p;return Pe.cachedResult!==void 0?i(Pe.cachedResult):(tt("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(l){try{return c=l,ze(c).then((function(y){try{return e=y[1],Ge(e,c.type,c.name,c.lastModified).then((function(E){try{return t=E,ye(e),ze(t).then((function(o){try{return p=o[0],Pe.cachedResult=p.width===1&&p.height===2,i(Pe.cachedResult)}catch(a){return r(a)}}),r)}catch(o){return r(o)}}),r)}catch(E){return r(E)}}),r)}catch(y){return r(y)}}),r))}))}function Mt(i){return new Promise(((r,S)=>{let c=new Ct;c.onload=e=>{let t=new DataView(e.target.result);if(t.getUint16(0,false)!=65496)return r(-2);let p=t.byteLength,l=2;for(;l<p;){if(t.getUint16(l+2,false)<=8)return r(-1);let y=t.getUint16(l,false);if(l+=2,y==65505){if(t.getUint32(l+=2,false)!=1165519206)return r(-1);let E=t.getUint16(l+=6,false)==18761;l+=t.getUint32(l+4,E);let o=t.getUint16(l,E);l+=2;for(let a=0;a<o;a++)if(t.getUint16(l+12*a,E)==274)return r(t.getUint16(l+12*a+8,E))}else {if((65280&y)!=65280)break;l+=t.getUint16(l,false);}}return r(-1)},c.onerror=e=>S(e),c.readAsArrayBuffer(i);}))}function Lt(i,r){let{width:S}=i,{height:c}=i,{maxWidthOrHeight:e}=r,t,p=i;return isFinite(e)&&(S>e||c>e)&&([p,t]=Ve(S,c),S>c?(p.width=e,p.height=c/S*e):(p.width=S/c*e,p.height=e),t.drawImage(i,0,0,p.width,p.height),ye(i)),p}function Dt(i,r){let{width:S}=i,{height:c}=i,[e,t]=Ve(S,c);switch(r>4&&r<9?(e.width=c,e.height=S):(e.width=S,e.height=c),r){case 2:t.transform(-1,0,0,1,S,0);break;case 3:t.transform(-1,0,0,-1,S,c);break;case 4:t.transform(1,0,0,-1,0,c);break;case 5:t.transform(0,1,1,0,0,0);break;case 6:t.transform(0,1,-1,0,c,0);break;case 7:t.transform(0,-1,-1,0,c,S);break;case 8:t.transform(0,-1,1,0,0,S);}return t.drawImage(i,0,0,S,c),ye(i),e}function St(i,r,S=0){return new Promise((function(c,e){let t,p,l,y,E,o,a,n,f,v,C,M,I,N,k,L,R,g,U,d;function u(s=5){if(r.signal&&r.signal.aborted)throw r.signal.reason;t+=s,r.onProgress(Math.min(t,100));}function _(s){if(r.signal&&r.signal.aborted)throw r.signal.reason;t=Math.min(Math.max(s,t),100),r.onProgress(t);}return t=S,p=r.maxIteration||10,l=1024*r.maxSizeMB*1024,u(),ze(i,r).then(function(s){try{return [,y]=s,u(),E=Lt(y,r),u(),new Promise((function(w,b){var A;if(!(A=r.exifOrientation))return Mt(i).then(function(m){try{return A=m,T.call(this)}catch(h){return b(h)}}.bind(this),b);function T(){return w(A)}return T.call(this)})).then(function(w){try{return o=w,u(),Pe().then(function(b){try{return a=b?E:Dt(E,o),u(),n=r.initialQuality||1,f=r.fileType||i.type,Ge(a,f,i.name,i.lastModified,n).then(function(A){try{{let P=function(){if(p--&&(k>l||k>I)){let O,H;return O=d?.95*U.width:U.width,H=d?.95*U.height:U.height,[R,g]=Ve(O,H),g.drawImage(U,0,0,O,H),n*=f==="image/png"?.85:.95,Ge(R,f,i.name,i.lastModified,n).then((function(D){try{return L=D,ye(U),U=R,k=L.size,_(Math.min(99,Math.floor((N-k)/(N-l)*100))),P}catch(Q){return e(Q)}}),e)}return [1]},x=function(){return ye(U),ye(R),ye(E),ye(a),ye(y),_(100),c(L)};var m=P,h=x;if(v=A,u(),C=v.size>l,M=v.size>i.size,!C&&!M)return _(100),c(v);var T;return I=i.size,N=v.size,k=N,U=a,d=!r.alwaysKeepResolution&&C,(T=function(O){for(;O;){if(O.then)return void O.then(T,e);try{if(O.pop){if(O.length)return O.pop()?x.call(this):O;O=P;}else O=O.call(this);}catch(H){return e(H)}}}.bind(this))(P)}}catch(P){return e(P)}}.bind(this),e)}catch(A){return e(A)}}.bind(this),e)}catch(b){return e(b)}}.bind(this),e)}catch(w){return e(w)}}.bind(this),e)}))}var On=`
5
+ `+r.prev}function qe(i,r){var S=ft(i),c=[];if(S){c.length=i.length;for(var e=0;e<i.length;e++)c[e]=ve(i,e)?r(i[e],i):"";}var t=typeof at=="function"?at(i):[],g;if(Me){g={};for(var l=0;l<t.length;l++)g["$"+t[l]]=t[l];}for(var y in i)ve(i,y)&&(S&&String(Number(y))===y&&y<i.length||Me&&g["$"+y]instanceof Symbol||(Yt.call(/[^\w$]/,y)?c.push(r(y,i)+": "+r(i[y],i)):c.push(y+": "+r(i[y],i))));if(typeof at=="function")for(var E=0;E<t.length;E++)Jt.call(i,t[E])&&c.push("["+r(t[E])+"]: "+r(i[t[E]],i));return c}});function Tn(i,r){return r.forEach((function(S){S&&typeof S!="string"&&!Array.isArray(S)&&Object.keys(S).forEach((function(c){if(c!=="default"&&!(c in i)){var e=Object.getOwnPropertyDescriptor(S,c);Object.defineProperty(i,c,e.get?e:{enumerable:true,get:function(){return S[c]}});}}));})),Object.freeze(i)}function Tt(i,r){return new Promise((function(S,c){let e;return In(i).then((function(t){try{return e=t,S(new Blob([r.slice(0,2),e,r.slice(2)],{type:"image/jpeg"}))}catch(g){return c(g)}}),c)}))}var In=i=>new Promise(((r,S)=>{let c=new globalThis.FileReader;c.addEventListener("load",(({target:{result:e}})=>{let t=new DataView(e),g=0;if(t.getUint16(g)!==65496)return S("not a valid JPEG");for(g+=2;;){let l=t.getUint16(g);if(l===65498)break;let y=t.getUint16(g+2);if(l===65505&&t.getUint32(g+4)===1165519206){let E=g+10,o;switch(t.getUint16(E)){case 18761:o=true;break;case 19789:o=false;break;default:return S("TIFF header contains invalid endian")}if(t.getUint16(E+2,o)!==42)return S("TIFF header contains invalid version");let a=t.getUint32(E+4,o),n=E+a+2+12*t.getUint16(E+a,o);for(let d=E+a+2;d<n;d+=12)if(t.getUint16(d,o)==274){if(t.getUint16(d+2,o)!==3)return S("Orientation data type is invalid");if(t.getUint32(d+4,o)!==1)return S("Orientation data count is invalid");t.setUint16(d+8,1,o);break}return r(e.slice(g,g+2+y))}g+=2+y;}return r(new Blob)})),c.readAsArrayBuffer(i);})),$e={},Rn={get exports(){return $e},set exports(i){$e=i;}};(function(i){var r,S,c={};Rn.exports=c,c.parse=function(e,t){for(var g=c.bin.readUshort,l=c.bin.readUint,y=0,E={},o=new Uint8Array(e),a=o.length-4;l(o,a)!=101010256;)a--;y=a,y+=4;var n=g(o,y+=4);g(o,y+=2);var d=l(o,y+=2),v=l(o,y+=4);y+=4,y=v;for(var C=0;C<n;C++){l(o,y),y+=4,y+=4,y+=4,l(o,y+=4),d=l(o,y+=4);var M=l(o,y+=4),I=g(o,y+=4),B=g(o,y+2),k=g(o,y+4);y+=6;var P=l(o,y+=8);y+=4,y+=I+B+k,c._readLocal(o,P,E,d,M,t);}return E},c._readLocal=function(e,t,g,l,y,E){var o=c.bin.readUshort,a=c.bin.readUint;a(e,t),o(e,t+=4),o(e,t+=2);var n=o(e,t+=2);a(e,t+=2),a(e,t+=4),t+=4;var d=o(e,t+=8),v=o(e,t+=2);t+=2;var C=c.bin.readUTF8(e,t,d);if(t+=d,t+=v,E)g[C]={size:y,csize:l};else {var M=new Uint8Array(e.buffer,t);if(n==0)g[C]=new Uint8Array(M.buffer.slice(t,t+l));else {if(n!=8)throw "unknown compression method: "+n;var I=new Uint8Array(y);c.inflateRaw(M,I),g[C]=I;}}},c.inflateRaw=function(e,t){return c.F.inflate(e,t)},c.inflate=function(e,t){return e[0],e[1],c.inflateRaw(new Uint8Array(e.buffer,e.byteOffset+2,e.length-6),t)},c.deflate=function(e,t){t==null&&(t={level:6});var g=0,l=new Uint8Array(50+Math.floor(1.1*e.length));l[g]=120,l[g+1]=156,g+=2,g=c.F.deflateRaw(e,l,g,t.level);var y=c.adler(e,0,e.length);return l[g+0]=y>>>24&255,l[g+1]=y>>>16&255,l[g+2]=y>>>8&255,l[g+3]=y>>>0&255,new Uint8Array(l.buffer,0,g+4)},c.deflateRaw=function(e,t){t==null&&(t={level:6});var g=new Uint8Array(50+Math.floor(1.1*e.length)),l=c.F.deflateRaw(e,g,l,t.level);return new Uint8Array(g.buffer,0,l)},c.encode=function(e,t){t==null&&(t=false);var g=0,l=c.bin.writeUint,y=c.bin.writeUshort,E={};for(var o in e){var a=!c._noNeed(o)&&!t,n=e[o],d=c.crc.crc(n,0,n.length);E[o]={cpr:a,usize:n.length,crc:d,file:a?c.deflateRaw(n):n};}for(var o in E)g+=E[o].file.length+30+46+2*c.bin.sizeUTF8(o);g+=22;var v=new Uint8Array(g),C=0,M=[];for(var o in E){var I=E[o];M.push(C),C=c._writeHeader(v,C,o,I,0);}var B=0,k=C;for(var o in E)I=E[o],M.push(C),C=c._writeHeader(v,C,o,I,1,M[B++]);var P=C-k;return l(v,C,101010256),C+=4,y(v,C+=4,B),y(v,C+=2,B),l(v,C+=2,P),l(v,C+=4,k),C+=4,C+=2,v.buffer},c._noNeed=function(e){var t=e.split(".").pop().toLowerCase();return "png,jpg,jpeg,zip".indexOf(t)!=-1},c._writeHeader=function(e,t,g,l,y,E){var o=c.bin.writeUint,a=c.bin.writeUshort,n=l.file;return o(e,t,y==0?67324752:33639248),t+=4,y==1&&(t+=2),a(e,t,20),a(e,t+=2,0),a(e,t+=2,l.cpr?8:0),o(e,t+=2,0),o(e,t+=4,l.crc),o(e,t+=4,n.length),o(e,t+=4,l.usize),a(e,t+=4,c.bin.sizeUTF8(g)),a(e,t+=2,0),t+=2,y==1&&(t+=2,t+=2,o(e,t+=6,E),t+=4),t+=c.bin.writeUTF8(e,t,g),y==0&&(e.set(n,t),t+=n.length),t},c.crc={table:(function(){for(var e=new Uint32Array(256),t=0;t<256;t++){for(var g=t,l=0;l<8;l++)1&g?g=3988292384^g>>>1:g>>>=1;e[t]=g;}return e})(),update:function(e,t,g,l){for(var y=0;y<l;y++)e=c.crc.table[255&(e^t[g+y])]^e>>>8;return e},crc:function(e,t,g){return 4294967295^c.crc.update(4294967295,e,t,g)}},c.adler=function(e,t,g){for(var l=1,y=0,E=t,o=t+g;E<o;){for(var a=Math.min(E+5552,o);E<a;)y+=l+=e[E++];l%=65521,y%=65521;}return y<<16|l},c.bin={readUshort:function(e,t){return e[t]|e[t+1]<<8},writeUshort:function(e,t,g){e[t]=255&g,e[t+1]=g>>8&255;},readUint:function(e,t){return 16777216*e[t+3]+(e[t+2]<<16|e[t+1]<<8|e[t])},writeUint:function(e,t,g){e[t]=255&g,e[t+1]=g>>8&255,e[t+2]=g>>16&255,e[t+3]=g>>24&255;},readASCII:function(e,t,g){for(var l="",y=0;y<g;y++)l+=String.fromCharCode(e[t+y]);return l},writeASCII:function(e,t,g){for(var l=0;l<g.length;l++)e[t+l]=g.charCodeAt(l);},pad:function(e){return e.length<2?"0"+e:e},readUTF8:function(e,t,g){for(var l,y="",E=0;E<g;E++)y+="%"+c.bin.pad(e[t+E].toString(16));try{l=decodeURIComponent(y);}catch{return c.bin.readASCII(e,t,g)}return l},writeUTF8:function(e,t,g){for(var l=g.length,y=0,E=0;E<l;E++){var o=g.charCodeAt(E);if((4294967168&o)==0)e[t+y]=o,y++;else if((4294965248&o)==0)e[t+y]=192|o>>6,e[t+y+1]=128|o>>0&63,y+=2;else if((4294901760&o)==0)e[t+y]=224|o>>12,e[t+y+1]=128|o>>6&63,e[t+y+2]=128|o>>0&63,y+=3;else {if((4292870144&o)!=0)throw "e";e[t+y]=240|o>>18,e[t+y+1]=128|o>>12&63,e[t+y+2]=128|o>>6&63,e[t+y+3]=128|o>>0&63,y+=4;}}return y},sizeUTF8:function(e){for(var t=e.length,g=0,l=0;l<t;l++){var y=e.charCodeAt(l);if((4294967168&y)==0)g++;else if((4294965248&y)==0)g+=2;else if((4294901760&y)==0)g+=3;else {if((4292870144&y)!=0)throw "e";g+=4;}}return g}},c.F={},c.F.deflateRaw=function(e,t,g,l){var y=[[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]][l],E=c.F.U,o=c.F._goodIndex;c.F._hash;var a=c.F._putsE,n=0,d=g<<3,v=0,C=e.length;if(l==0){for(;n<C;)a(t,d,n+(s=Math.min(65535,C-n))==C?1:0),d=c.F._copyExact(e,n,s,t,d+8),n+=s;return d>>>3}var M=E.lits,I=E.strt,B=E.prev,k=0,P=0,R=0,p=0,O=0,f=0;for(C>2&&(I[f=c.F._hash(e,0)]=0),n=0;n<C;n++){if(O=f,n+1<C-2){f=c.F._hash(e,n+1);var u=n+1&32767;B[u]=I[f],I[f]=u;}if(v<=n){(k>14e3||P>26697)&&C-n>100&&(v<n&&(M[k]=n-v,k+=2,v=n),d=c.F._writeBlock(n==C-1||v==C?1:0,M,k,p,e,R,n-R,t,d),k=P=p=0,R=n);var _=0;n<C-2&&(_=c.F._bestMatch(e,n,B,O,Math.min(y[2],C-n),y[3]));var s=_>>>16,w=65535&_;if(_!=0){w=65535&_;var b=o(s=_>>>16,E.of0);E.lhst[257+b]++;var A=o(w,E.df0);E.dhst[A]++,p+=E.exb[b]+E.dxb[A],M[k]=s<<23|n-v,M[k+1]=w<<16|b<<8|A,k+=2,v=n+s;}else E.lhst[e[n]]++;P++;}}for(R==n&&e.length!=0||(v<n&&(M[k]=n-v,k+=2,v=n),d=c.F._writeBlock(1,M,k,p,e,R,n-R,t,d),k=0,P=0,k=P=p=0,R=n);(7&d)!=0;)d++;return d>>>3},c.F._bestMatch=function(e,t,g,l,y,E){var o=32767&t,a=g[o],n=o-a+32768&32767;if(a==o||l!=c.F._hash(e,t-n))return 0;for(var d=0,v=0,C=Math.min(32767,t);n<=C&&--E!=0&&a!=o;){if(d==0||e[t+d]==e[t+d-n]){var M=c.F._howLong(e,t,n);if(M>d){if(v=n,(d=M)>=y)break;n+2<M&&(M=n+2);for(var I=0,B=0;B<M-2;B++){var k=t-n+B+32768&32767,P=k-g[k]+32768&32767;P>I&&(I=P,a=k);}}}n+=(o=a)-(a=g[o])+32768&32767;}return d<<16|v},c.F._howLong=function(e,t,g){if(e[t]!=e[t-g]||e[t+1]!=e[t+1-g]||e[t+2]!=e[t+2-g])return 0;var l=t,y=Math.min(e.length,t+258);for(t+=3;t<y&&e[t]==e[t-g];)t++;return t-l},c.F._hash=function(e,t){return (e[t]<<8|e[t+1])+(e[t+2]<<4)&65535},c.saved=0,c.F._writeBlock=function(e,t,g,l,y,E,o,a,n){var d,v,C,M,I,B,k,P,R,p=c.F.U,O=c.F._putsF,f=c.F._putsE;p.lhst[256]++,v=(d=c.F.getTrees())[0],C=d[1],M=d[2],I=d[3],B=d[4],k=d[5],P=d[6],R=d[7];var u=32+((n+3&7)==0?0:8-(n+3&7))+(o<<3),_=l+c.F.contSize(p.fltree,p.lhst)+c.F.contSize(p.fdtree,p.dhst),s=l+c.F.contSize(p.ltree,p.lhst)+c.F.contSize(p.dtree,p.dhst);s+=14+3*k+c.F.contSize(p.itree,p.ihst)+(2*p.ihst[16]+3*p.ihst[17]+7*p.ihst[18]);for(var w=0;w<286;w++)p.lhst[w]=0;for(w=0;w<30;w++)p.dhst[w]=0;for(w=0;w<19;w++)p.ihst[w]=0;var b=u<_&&u<s?0:_<s?1:2;if(O(a,n,e),O(a,n+1,b),n+=3,b==0){for(;(7&n)!=0;)n++;n=c.F._copyExact(y,E,o,a,n);}else {var A,T;if(b==1&&(A=p.fltree,T=p.fdtree),b==2){c.F.makeCodes(p.ltree,v),c.F.revCodes(p.ltree,v),c.F.makeCodes(p.dtree,C),c.F.revCodes(p.dtree,C),c.F.makeCodes(p.itree,M),c.F.revCodes(p.itree,M),A=p.ltree,T=p.dtree,f(a,n,I-257),f(a,n+=5,B-1),f(a,n+=5,k-4),n+=4;for(var m=0;m<k;m++)f(a,n+3*m,p.itree[1+(p.ordr[m]<<1)]);n+=3*k,n=c.F._codeTiny(P,p.itree,a,n),n=c.F._codeTiny(R,p.itree,a,n);}for(var h=E,L=0;L<g;L+=2){for(var x=t[L],U=x>>>23,H=h+(8388607&x);h<H;)n=c.F._writeLit(y[h++],A,a,n);if(U!=0){var D=t[L+1],Q=D>>16,N=D>>8&255,F=255&D;f(a,n=c.F._writeLit(257+N,A,a,n),U-p.of0[N]),n+=p.exb[N],O(a,n=c.F._writeLit(F,T,a,n),Q-p.df0[F]),n+=p.dxb[F],h+=U;}}n=c.F._writeLit(256,A,a,n);}return n},c.F._copyExact=function(e,t,g,l,y){var E=y>>>3;return l[E]=g,l[E+1]=g>>>8,l[E+2]=255-l[E],l[E+3]=255-l[E+1],E+=4,l.set(new Uint8Array(e.buffer,t,g),E),y+(g+4<<3)},c.F.getTrees=function(){for(var e=c.F.U,t=c.F._hufTree(e.lhst,e.ltree,15),g=c.F._hufTree(e.dhst,e.dtree,15),l=[],y=c.F._lenCodes(e.ltree,l),E=[],o=c.F._lenCodes(e.dtree,E),a=0;a<l.length;a+=2)e.ihst[l[a]]++;for(a=0;a<E.length;a+=2)e.ihst[E[a]]++;for(var n=c.F._hufTree(e.ihst,e.itree,7),d=19;d>4&&e.itree[1+(e.ordr[d-1]<<1)]==0;)d--;return [t,g,n,y,o,d,l,E]},c.F.getSecond=function(e){for(var t=[],g=0;g<e.length;g+=2)t.push(e[g+1]);return t},c.F.nonZero=function(e){for(var t="",g=0;g<e.length;g+=2)e[g+1]!=0&&(t+=(g>>1)+",");return t},c.F.contSize=function(e,t){for(var g=0,l=0;l<t.length;l++)g+=t[l]*e[1+(l<<1)];return g},c.F._codeTiny=function(e,t,g,l){for(var y=0;y<e.length;y+=2){var E=e[y],o=e[y+1];l=c.F._writeLit(E,t,g,l);var a=E==16?2:E==17?3:7;E>15&&(c.F._putsE(g,l,o,a),l+=a);}return l},c.F._lenCodes=function(e,t){for(var g=e.length;g!=2&&e[g-1]==0;)g-=2;for(var l=0;l<g;l+=2){var y=e[l+1],E=l+3<g?e[l+3]:-1,o=l+5<g?e[l+5]:-1,a=l==0?-1:e[l-1];if(y==0&&E==y&&o==y){for(var n=l+5;n+2<g&&e[n+2]==y;)n+=2;(d=Math.min(n+1-l>>>1,138))<11?t.push(17,d-3):t.push(18,d-11),l+=2*d-2;}else if(y==a&&E==y&&o==y){for(n=l+5;n+2<g&&e[n+2]==y;)n+=2;var d=Math.min(n+1-l>>>1,6);t.push(16,d-3),l+=2*d-2;}else t.push(y,0);}return g>>>1},c.F._hufTree=function(e,t,g){var l=[],y=e.length,E=t.length,o=0;for(o=0;o<E;o+=2)t[o]=0,t[o+1]=0;for(o=0;o<y;o++)e[o]!=0&&l.push({lit:o,f:e[o]});var a=l.length,n=l.slice(0);if(a==0)return 0;if(a==1){var d=l[0].lit;return n=d==0?1:0,t[1+(d<<1)]=1,t[1+(n<<1)]=1,1}l.sort((function(P,R){return P.f-R.f}));var v=l[0],C=l[1],M=0,I=1,B=2;for(l[0]={lit:-1,f:v.f+C.f,l:v,r:C,d:0};I!=a-1;)v=M!=I&&(B==a||l[M].f<l[B].f)?l[M++]:l[B++],C=M!=I&&(B==a||l[M].f<l[B].f)?l[M++]:l[B++],l[I++]={lit:-1,f:v.f+C.f,l:v,r:C};var k=c.F.setDepth(l[I-1],0);for(k>g&&(c.F.restrictDepth(n,g,k),k=g),o=0;o<a;o++)t[1+(n[o].lit<<1)]=n[o].d;return k},c.F.setDepth=function(e,t){return e.lit!=-1?(e.d=t,t):Math.max(c.F.setDepth(e.l,t+1),c.F.setDepth(e.r,t+1))},c.F.restrictDepth=function(e,t,g){var l=0,y=1<<g-t,E=0;for(e.sort((function(a,n){return n.d==a.d?a.f-n.f:n.d-a.d})),l=0;l<e.length&&e[l].d>t;l++){var o=e[l].d;e[l].d=t,E+=y-(1<<g-o);}for(E>>>=g-t;E>0;)(o=e[l].d)<t?(e[l].d++,E-=1<<t-o-1):l++;for(;l>=0;l--)e[l].d==t&&E<0&&(e[l].d--,E++);E!=0&&console.log("debt left");},c.F._goodIndex=function(e,t){var g=0;return t[16|g]<=e&&(g|=16),t[8|g]<=e&&(g|=8),t[4|g]<=e&&(g|=4),t[2|g]<=e&&(g|=2),t[1|g]<=e&&(g|=1),g},c.F._writeLit=function(e,t,g,l){return c.F._putsF(g,l,t[e<<1]),l+t[1+(e<<1)]},c.F.inflate=function(e,t){var g=Uint8Array;if(e[0]==3&&e[1]==0)return t||new g(0);var l=c.F,y=l._bitsF,E=l._bitsE,o=l._decodeTiny,a=l.makeCodes,n=l.codes2map,d=l._get17,v=l.U,C=t==null;C&&(t=new g(e.length>>>2<<3));for(var M,I,B=0,k=0,P=0,R=0,p=0,O=0,f=0,u=0,_=0;B==0;)if(B=y(e,_,1),k=y(e,_+1,2),_+=3,k!=0){if(C&&(t=c.F._check(t,u+(1<<17))),k==1&&(M=v.flmap,I=v.fdmap,O=511,f=31),k==2){P=E(e,_,5)+257,R=E(e,_+5,5)+1,p=E(e,_+10,4)+4,_+=14;for(var s=0;s<38;s+=2)v.itree[s]=0,v.itree[s+1]=0;var w=1;for(s=0;s<p;s++){var b=E(e,_+3*s,3);v.itree[1+(v.ordr[s]<<1)]=b,b>w&&(w=b);}_+=3*p,a(v.itree,w),n(v.itree,w,v.imap),M=v.lmap,I=v.dmap,_=o(v.imap,(1<<w)-1,P+R,e,_,v.ttree);var A=l._copyOut(v.ttree,0,P,v.ltree);O=(1<<A)-1;var T=l._copyOut(v.ttree,P,R,v.dtree);f=(1<<T)-1,a(v.ltree,A),n(v.ltree,A,M),a(v.dtree,T),n(v.dtree,T,I);}for(;;){var m=M[d(e,_)&O];_+=15&m;var h=m>>>4;if(!(h>>>8))t[u++]=h;else {if(h==256)break;var L=u+h-254;if(h>264){var x=v.ldef[h-257];L=u+(x>>>3)+E(e,_,7&x),_+=7&x;}var U=I[d(e,_)&f];_+=15&U;var H=U>>>4,D=v.ddef[H],Q=(D>>>4)+y(e,_,15&D);for(_+=15&D,C&&(t=c.F._check(t,u+(1<<17)));u<L;)t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q],t[u]=t[u++-Q];u=L;}}}else {(7&_)!=0&&(_+=8-(7&_));var N=4+(_>>>3),F=e[N-4]|e[N-3]<<8;C&&(t=c.F._check(t,u+F)),t.set(new g(e.buffer,e.byteOffset+N,F),u),_=N+F<<3,u+=F;}return t.length==u?t:t.slice(0,u)},c.F._check=function(e,t){var g=e.length;if(t<=g)return e;var l=new Uint8Array(Math.max(g<<1,t));return l.set(e,0),l},c.F._decodeTiny=function(e,t,g,l,y,E){for(var o=c.F._bitsE,a=c.F._get17,n=0;n<g;){var d=e[a(l,y)&t];y+=15&d;var v=d>>>4;if(v<=15)E[n]=v,n++;else {var C=0,M=0;v==16?(M=3+o(l,y,2),y+=2,C=E[n-1]):v==17?(M=3+o(l,y,3),y+=3):v==18&&(M=11+o(l,y,7),y+=7);for(var I=n+M;n<I;)E[n]=C,n++;}}return y},c.F._copyOut=function(e,t,g,l){for(var y=0,E=0,o=l.length>>>1;E<g;){var a=e[E+t];l[E<<1]=0,l[1+(E<<1)]=a,a>y&&(y=a),E++;}for(;E<o;)l[E<<1]=0,l[1+(E<<1)]=0,E++;return y},c.F.makeCodes=function(e,t){for(var g,l,y,E,o=c.F.U,a=e.length,n=o.bl_count,d=0;d<=t;d++)n[d]=0;for(d=1;d<a;d+=2)n[e[d]]++;var v=o.next_code;for(g=0,n[0]=0,l=1;l<=t;l++)g=g+n[l-1]<<1,v[l]=g;for(y=0;y<a;y+=2)(E=e[y+1])!=0&&(e[y]=v[E],v[E]++);},c.F.codes2map=function(e,t,g){for(var l=e.length,y=c.F.U.rev15,E=0;E<l;E+=2)if(e[E+1]!=0)for(var o=E>>1,a=e[E+1],n=o<<4|a,d=t-a,v=e[E]<<d,C=v+(1<<d);v!=C;)g[y[v]>>>15-t]=n,v++;},c.F.revCodes=function(e,t){for(var g=c.F.U.rev15,l=15-t,y=0;y<e.length;y+=2){var E=e[y]<<t-e[y+1];e[y]=g[E]>>>l;}},c.F._putsE=function(e,t,g){g<<=7&t;var l=t>>>3;e[l]|=g,e[l+1]|=g>>>8;},c.F._putsF=function(e,t,g){g<<=7&t;var l=t>>>3;e[l]|=g,e[l+1]|=g>>>8,e[l+2]|=g>>>16;},c.F._bitsE=function(e,t,g){return (e[t>>>3]|e[1+(t>>>3)]<<8)>>>(7&t)&(1<<g)-1},c.F._bitsF=function(e,t,g){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)&(1<<g)-1},c.F._get17=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16)>>>(7&t)},c.F._get25=function(e,t){return (e[t>>>3]|e[1+(t>>>3)]<<8|e[2+(t>>>3)]<<16|e[3+(t>>>3)]<<24)>>>(7&t)},c.F.U=(r=Uint16Array,S=Uint32Array,{next_code:new r(16),bl_count:new r(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 r(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 S(32),flmap:new r(512),fltree:[],fdmap:new r(32),fdtree:[],lmap:new r(32768),ltree:[],ttree:[],dmap:new r(32768),dtree:[],imap:new r(512),itree:[],rev15:new r(32768),lhst:new S(286),dhst:new S(30),ihst:new S(19),lits:new S(15e3),strt:new r(65536),prev:new r(32768)}),(function(){for(var e=c.F.U,t=0;t<32768;t++){var g=t;g=(4278255360&(g=(4042322160&(g=(3435973836&(g=(2863311530&g)>>>1|(1431655765&g)<<1))>>>2|(858993459&g)<<2))>>>4|(252645135&g)<<4))>>>8|(16711935&g)<<8,e.rev15[t]=(g>>>16|g<<16)>>>17;}function l(y,E,o){for(;E--!=0;)y.push(0,o);}for(t=0;t<32;t++)e.ldef[t]=e.of0[t]<<3|e.exb[t],e.ddef[t]=e.df0[t]<<4|e.dxb[t];l(e.fltree,144,8),l(e.fltree,112,9),l(e.fltree,24,7),l(e.fltree,8,8),c.F.makeCodes(e.fltree,9),c.F.codes2map(e.fltree,9,e.flmap),c.F.revCodes(e.fltree,9),l(e.fdtree,32,5),c.F.makeCodes(e.fdtree,5),c.F.codes2map(e.fdtree,5,e.fdmap),c.F.revCodes(e.fdtree,5),l(e.itree,19,0),l(e.ltree,286,0),l(e.dtree,30,0),l(e.ttree,320,0);})();})();var Cn=Tn({__proto__:null,default:$e},[$e]),pe=(function(){var i={nextZero(o,a){for(;o[a]!=0;)a++;return a},readUshort:(o,a)=>o[a]<<8|o[a+1],writeUshort(o,a,n){o[a]=n>>8&255,o[a+1]=255&n;},readUint:(o,a)=>16777216*o[a]+(o[a+1]<<16|o[a+2]<<8|o[a+3]),writeUint(o,a,n){o[a]=n>>24&255,o[a+1]=n>>16&255,o[a+2]=n>>8&255,o[a+3]=255&n;},readASCII(o,a,n){let d="";for(let v=0;v<n;v++)d+=String.fromCharCode(o[a+v]);return d},writeASCII(o,a,n){for(let d=0;d<n.length;d++)o[a+d]=n.charCodeAt(d);},readBytes(o,a,n){let d=[];for(let v=0;v<n;v++)d.push(o[a+v]);return d},pad:o=>o.length<2?`0${o}`:o,readUTF8(o,a,n){let d,v="";for(let C=0;C<n;C++)v+=`%${i.pad(o[a+C].toString(16))}`;try{d=decodeURIComponent(v);}catch{return i.readASCII(o,a,n)}return d}};function r(o,a,n,d){let v=a*n,C=t(d),M=Math.ceil(a*C/8),I=new Uint8Array(4*v),B=new Uint32Array(I.buffer),{ctype:k}=d,{depth:P}=d,R=i.readUshort;if(k==6){let x=v<<2;if(P==8)for(var p=0;p<x;p+=4)I[p]=o[p],I[p+1]=o[p+1],I[p+2]=o[p+2],I[p+3]=o[p+3];if(P==16)for(p=0;p<x;p++)I[p]=o[p<<1];}else if(k==2){let x=d.tabs.tRNS;if(x==null){if(P==8)for(p=0;p<v;p++){var O=3*p;B[p]=255<<24|o[O+2]<<16|o[O+1]<<8|o[O];}if(P==16)for(p=0;p<v;p++)O=6*p,B[p]=255<<24|o[O+4]<<16|o[O+2]<<8|o[O];}else {var f=x[0];let U=x[1],H=x[2];if(P==8)for(p=0;p<v;p++){var u=p<<2;O=3*p,B[p]=255<<24|o[O+2]<<16|o[O+1]<<8|o[O],o[O]==f&&o[O+1]==U&&o[O+2]==H&&(I[u+3]=0);}if(P==16)for(p=0;p<v;p++)u=p<<2,O=6*p,B[p]=255<<24|o[O+4]<<16|o[O+2]<<8|o[O],R(o,O)==f&&R(o,O+2)==U&&R(o,O+4)==H&&(I[u+3]=0);}}else if(k==3){let x=d.tabs.PLTE,U=d.tabs.tRNS,H=U?U.length:0;if(P==1)for(var _=0;_<n;_++){var s=_*M,w=_*a;for(p=0;p<a;p++){u=w+p<<2;var b=3*(A=o[s+(p>>3)]>>7-((7&p)<<0)&1);I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;}}if(P==2)for(_=0;_<n;_++)for(s=_*M,w=_*a,p=0;p<a;p++)u=w+p<<2,b=3*(A=o[s+(p>>2)]>>6-((3&p)<<1)&3),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;if(P==4)for(_=0;_<n;_++)for(s=_*M,w=_*a,p=0;p<a;p++)u=w+p<<2,b=3*(A=o[s+(p>>1)]>>4-((1&p)<<2)&15),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;if(P==8)for(p=0;p<v;p++){var A;u=p<<2,b=3*(A=o[p]),I[u]=x[b],I[u+1]=x[b+1],I[u+2]=x[b+2],I[u+3]=A<H?U[A]:255;}}else if(k==4){if(P==8)for(p=0;p<v;p++){u=p<<2;var T=o[m=p<<1];I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=o[m+1];}if(P==16)for(p=0;p<v;p++){var m;u=p<<2,T=o[m=p<<2],I[u]=T,I[u+1]=T,I[u+2]=T,I[u+3]=o[m+2];}}else if(k==0)for(f=d.tabs.tRNS?d.tabs.tRNS:-1,_=0;_<n;_++){let x=_*M,U=_*a;if(P==1)for(var h=0;h<a;h++){var L=(T=255*(o[x+(h>>>3)]>>>7-(7&h)&1))==255*f?0:255;B[U+h]=L<<24|T<<16|T<<8|T;}else if(P==2)for(h=0;h<a;h++)L=(T=85*(o[x+(h>>>2)]>>>6-((3&h)<<1)&3))==85*f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;else if(P==4)for(h=0;h<a;h++)L=(T=17*(o[x+(h>>>1)]>>>4-((1&h)<<2)&15))==17*f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;else if(P==8)for(h=0;h<a;h++)L=(T=o[x+h])==f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;else if(P==16)for(h=0;h<a;h++)T=o[x+(h<<1)],L=R(o,x+(h<<1))==f?0:255,B[U+h]=L<<24|T<<16|T<<8|T;}return I}function S(o,a,n,d){let v=t(o),C=Math.ceil(n*v/8),M=new Uint8Array((C+1+o.interlace)*d);return a=o.tabs.CgBI?e(a,M):c(a,M),o.interlace==0?a=g(a,o,0,n,d):o.interlace==1&&(a=(function(B,k){let P=k.width,R=k.height,p=t(k),O=p>>3,f=Math.ceil(P*p/8),u=new Uint8Array(R*f),_=0,s=[0,0,4,0,2,0,1],w=[0,4,0,2,0,1,0],b=[8,8,8,4,4,2,2],A=[8,8,4,4,2,2,1],T=0;for(;T<7;){let h=b[T],L=A[T],x=0,U=0,H=s[T];for(;H<R;)H+=h,U++;let D=w[T];for(;D<P;)D+=L,x++;let Q=Math.ceil(x*p/8);g(B,k,_,x,U);let N=0,F=s[T];for(;F<R;){let $=w[T],K=_+N*Q<<3;for(;$<P;){var m;if(p==1&&(m=(m=B[K>>3])>>7-(7&K)&1,u[F*f+($>>3)]|=m<<7-((7&$)<<0)),p==2&&(m=(m=B[K>>3])>>6-(7&K)&3,u[F*f+($>>2)]|=m<<6-((3&$)<<1)),p==4&&(m=(m=B[K>>3])>>4-(7&K)&15,u[F*f+($>>1)]|=m<<4-((1&$)<<2)),p>=8){let V=F*f+$*O;for(let z=0;z<O;z++)u[V+z]=B[(K>>3)+z];}K+=p,$+=L;}N++,F+=h;}x*U!=0&&(_+=U*(1+Q)),T+=1;}return u})(a,o)),a}function c(o,a){return e(new Uint8Array(o.buffer,2,o.length-6),a)}var e=(function(){let o={H:{}};return o.H.N=function(a,n){let d=Uint8Array,v,C,M=0,I=0,B=0,k=0,P=0,R=0,p=0,O=0,f=0;if(a[0]==3&&a[1]==0)return n||new d(0);let u=o.H,_=u.b,s=u.e,w=u.R,b=u.n,A=u.A,T=u.Z,m=u.m,h=n==null;for(h&&(n=new d(a.length>>>2<<5));M==0;)if(M=_(a,f,1),I=_(a,f+1,2),f+=3,I!=0){if(h&&(n=o.H.W(n,O+(1<<17))),I==1&&(v=m.J,C=m.h,R=511,p=31),I==2){B=s(a,f,5)+257,k=s(a,f+5,5)+1,P=s(a,f+10,4)+4,f+=14;let x=1;for(var L=0;L<38;L+=2)m.Q[L]=0,m.Q[L+1]=0;for(L=0;L<P;L++){let D=s(a,f+3*L,3);m.Q[1+(m.X[L]<<1)]=D,D>x&&(x=D);}f+=3*P,b(m.Q,x),A(m.Q,x,m.u),v=m.w,C=m.d,f=w(m.u,(1<<x)-1,B+k,a,f,m.v);let U=u.V(m.v,0,B,m.C);R=(1<<U)-1;let H=u.V(m.v,B,k,m.D);p=(1<<H)-1,b(m.C,U),A(m.C,U,v),b(m.D,H),A(m.D,H,C);}for(;;){let x=v[T(a,f)&R];f+=15&x;let U=x>>>4;if(!(U>>>8))n[O++]=U;else {if(U==256)break;{let H=O+U-254;if(U>264){let $=m.q[U-257];H=O+($>>>3)+s(a,f,7&$),f+=7&$;}let D=C[T(a,f)&p];f+=15&D;let Q=D>>>4,N=m.c[Q],F=(N>>>4)+_(a,f,15&N);for(f+=15&N;O<H;)n[O]=n[O++-F],n[O]=n[O++-F],n[O]=n[O++-F],n[O]=n[O++-F];O=H;}}}}else {(7&f)!=0&&(f+=8-(7&f));let x=4+(f>>>3),U=a[x-4]|a[x-3]<<8;h&&(n=o.H.W(n,O+U)),n.set(new d(a.buffer,a.byteOffset+x,U),O),f=x+U<<3,O+=U;}return n.length==O?n:n.slice(0,O)},o.H.W=function(a,n){let d=a.length;if(n<=d)return a;let v=new Uint8Array(d<<1);return v.set(a,0),v},o.H.R=function(a,n,d,v,C,M){let I=o.H.e,B=o.H.Z,k=0;for(;k<d;){let P=a[B(v,C)&n];C+=15&P;let R=P>>>4;if(R<=15)M[k]=R,k++;else {let p=0,O=0;R==16?(O=3+I(v,C,2),C+=2,p=M[k-1]):R==17?(O=3+I(v,C,3),C+=3):R==18&&(O=11+I(v,C,7),C+=7);let f=k+O;for(;k<f;)M[k]=p,k++;}}return C},o.H.V=function(a,n,d,v){let C=0,M=0,I=v.length>>>1;for(;M<d;){let B=a[M+n];v[M<<1]=0,v[1+(M<<1)]=B,B>C&&(C=B),M++;}for(;M<I;)v[M<<1]=0,v[1+(M<<1)]=0,M++;return C},o.H.n=function(a,n){let d=o.H.m,v=a.length,C,M,I,B,k=d.j;for(var P=0;P<=n;P++)k[P]=0;for(P=1;P<v;P+=2)k[a[P]]++;let R=d.K;for(C=0,k[0]=0,M=1;M<=n;M++)C=C+k[M-1]<<1,R[M]=C;for(I=0;I<v;I+=2)B=a[I+1],B!=0&&(a[I]=R[B],R[B]++);},o.H.A=function(a,n,d){let v=a.length,C=o.H.m.r;for(let M=0;M<v;M+=2)if(a[M+1]!=0){let I=M>>1,B=a[M+1],k=I<<4|B,P=n-B,R=a[M]<<P,p=R+(1<<P);for(;R!=p;)d[C[R]>>>15-n]=k,R++;}},o.H.l=function(a,n){let d=o.H.m.r,v=15-n;for(let C=0;C<a.length;C+=2){let M=a[C]<<n-a[C+1];a[C]=d[M]>>>v;}},o.H.M=function(a,n,d){d<<=7&n;let v=n>>>3;a[v]|=d,a[v+1]|=d>>>8;},o.H.I=function(a,n,d){d<<=7&n;let v=n>>>3;a[v]|=d,a[v+1]|=d>>>8,a[v+2]|=d>>>16;},o.H.e=function(a,n,d){return (a[n>>>3]|a[1+(n>>>3)]<<8)>>>(7&n)&(1<<d)-1},o.H.b=function(a,n,d){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)&(1<<d)-1},o.H.Z=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16)>>>(7&n)},o.H.i=function(a,n){return (a[n>>>3]|a[1+(n>>>3)]<<8|a[2+(n>>>3)]<<16|a[3+(n>>>3)]<<24)>>>(7&n)},o.H.m=(function(){let a=Uint16Array,n=Uint32Array;return {K:new a(16),j:new a(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 a(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 n(32),J:new a(512),_:[],h:new a(32),$:[],w:new a(32768),C:[],v:[],d:new a(32768),D:[],u:new a(512),Q:[],r:new a(32768),s:new n(286),Y:new n(30),a:new n(19),t:new n(15e3),k:new a(65536),g:new a(32768)}})(),(function(){let a=o.H.m;for(var n=0;n<32768;n++){let v=n;v=(2863311530&v)>>>1|(1431655765&v)<<1,v=(3435973836&v)>>>2|(858993459&v)<<2,v=(4042322160&v)>>>4|(252645135&v)<<4,v=(4278255360&v)>>>8|(16711935&v)<<8,a.r[n]=(v>>>16|v<<16)>>>17;}function d(v,C,M){for(;C--!=0;)v.push(0,M);}for(n=0;n<32;n++)a.q[n]=a.S[n]<<3|a.T[n],a.c[n]=a.p[n]<<4|a.z[n];d(a._,144,8),d(a._,112,9),d(a._,24,7),d(a._,8,8),o.H.n(a._,9),o.H.A(a._,9,a.J),o.H.l(a._,9),d(a.$,32,5),o.H.n(a.$,5),o.H.A(a.$,5,a.h),o.H.l(a.$,5),d(a.Q,19,0),d(a.C,286,0),d(a.D,30,0),d(a.v,320,0);})(),o.H.N})();function t(o){return [1,null,3,1,2,null,4][o.ctype]*o.depth}function g(o,a,n,d,v){let C=t(a),M=Math.ceil(d*C/8),I,B;C=Math.ceil(C/8);let k=o[n],P=0;if(k>1&&(o[n]=[0,0,1][k-2]),k==3)for(P=C;P<M;P++)o[P+1]=o[P+1]+(o[P+1-C]>>>1)&255;for(let R=0;R<v;R++)if(I=n+R*M,B=I+R+1,k=o[B-1],P=0,k==0)for(;P<M;P++)o[I+P]=o[B+P];else if(k==1){for(;P<C;P++)o[I+P]=o[B+P];for(;P<M;P++)o[I+P]=o[B+P]+o[I+P-C];}else if(k==2)for(;P<M;P++)o[I+P]=o[B+P]+o[I+P-M];else if(k==3){for(;P<C;P++)o[I+P]=o[B+P]+(o[I+P-M]>>>1);for(;P<M;P++)o[I+P]=o[B+P]+(o[I+P-M]+o[I+P-C]>>>1);}else {for(;P<C;P++)o[I+P]=o[B+P]+l(0,o[I+P-M],0);for(;P<M;P++)o[I+P]=o[B+P]+l(o[I+P-C],o[I+P-M],o[I+P-C-M]);}return o}function l(o,a,n){let d=o+a-n,v=d-o,C=d-a,M=d-n;return v*v<=C*C&&v*v<=M*M?o:C*C<=M*M?a:n}function y(o,a,n){n.width=i.readUint(o,a),a+=4,n.height=i.readUint(o,a),a+=4,n.depth=o[a],a++,n.ctype=o[a],a++,n.compress=o[a],a++,n.filter=o[a],a++,n.interlace=o[a],a++;}function E(o,a,n,d,v,C,M,I,B){let k=Math.min(a,v),P=Math.min(n,C),R=0,p=0;for(let T=0;T<P;T++)for(let m=0;m<k;m++)if(M>=0&&I>=0?(R=T*a+m<<2,p=(I+T)*v+M+m<<2):(R=(-I+T)*a-M+m<<2,p=T*v+m<<2),B==0)d[p]=o[R],d[p+1]=o[R+1],d[p+2]=o[R+2],d[p+3]=o[R+3];else if(B==1){var O=o[R+3]*.00392156862745098,f=o[R]*O,u=o[R+1]*O,_=o[R+2]*O,s=d[p+3]*(1/255),w=d[p]*s,b=d[p+1]*s,A=d[p+2]*s;let h=1-O,L=O+s*h,x=L==0?0:1/L;d[p+3]=255*L,d[p+0]=(f+w*h)*x,d[p+1]=(u+b*h)*x,d[p+2]=(_+A*h)*x;}else if(B==2)O=o[R+3],f=o[R],u=o[R+1],_=o[R+2],s=d[p+3],w=d[p],b=d[p+1],A=d[p+2],O==s&&f==w&&u==b&&_==A?(d[p]=0,d[p+1]=0,d[p+2]=0,d[p+3]=0):(d[p]=f,d[p+1]=u,d[p+2]=_,d[p+3]=O);else if(B==3){if(O=o[R+3],f=o[R],u=o[R+1],_=o[R+2],s=d[p+3],w=d[p],b=d[p+1],A=d[p+2],O==s&&f==w&&u==b&&_==A)continue;if(O<220&&s>20)return false}return true}return {decode:function(a){let n=new Uint8Array(a),d=8,v=i,C=v.readUshort,M=v.readUint,I={tabs:{},frames:[]},B=new Uint8Array(n.length),k,P=0,R=0,p=[137,80,78,71,13,10,26,10];for(var O=0;O<8;O++)if(n[O]!=p[O])throw "The input is not a PNG file!";for(;d<n.length;){let T=v.readUint(n,d);d+=4;let m=v.readASCII(n,d,4);if(d+=4,m=="IHDR")y(n,d,I);else if(m=="iCCP"){for(var f=d;n[f]!=0;)f++;v.readASCII(n,d,f-d),n[f+1];let h=n.slice(f+2,d+T),L=null;try{L=c(h);}catch{L=e(h);}I.tabs[m]=L;}else if(m=="CgBI")I.tabs[m]=n.slice(d,d+4);else if(m=="IDAT"){for(O=0;O<T;O++)B[P+O]=n[d+O];P+=T;}else if(m=="acTL")I.tabs[m]={num_frames:M(n,d),num_plays:M(n,d+4)},k=new Uint8Array(n.length);else if(m=="fcTL"){R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height),R=0);let h={x:M(n,d+12),y:M(n,d+16),width:M(n,d+4),height:M(n,d+8)},L=C(n,d+22);L=C(n,d+20)/(L==0?100:L);let x={rect:h,delay:Math.round(1e3*L),dispose:n[d+24],blend:n[d+25]};I.frames.push(x);}else if(m=="fdAT"){for(O=0;O<T-4;O++)k[R+O]=n[d+O+4];R+=T-4;}else if(m=="pHYs")I.tabs[m]=[v.readUint(n,d),v.readUint(n,d+4),n[d+8]];else if(m=="cHRM")for(I.tabs[m]=[],O=0;O<8;O++)I.tabs[m].push(v.readUint(n,d+4*O));else if(m=="tEXt"||m=="zTXt"){I.tabs[m]==null&&(I.tabs[m]={});var u=v.nextZero(n,d),_=v.readASCII(n,d,u-d),s=d+T-u-1;if(m=="tEXt")b=v.readASCII(n,u+1,s);else {var w=c(n.slice(u+2,u+2+s));b=v.readUTF8(w,0,w.length);}I.tabs[m][_]=b;}else if(m=="iTXt"){I.tabs[m]==null&&(I.tabs[m]={}),u=0,f=d,u=v.nextZero(n,f),_=v.readASCII(n,f,u-f);let h=n[f=u+1];var b;n[f+1],f+=2,u=v.nextZero(n,f),v.readASCII(n,f,u-f),f=u+1,u=v.nextZero(n,f),v.readUTF8(n,f,u-f),s=T-((f=u+1)-d),h==0?b=v.readUTF8(n,f,s):(w=c(n.slice(f,f+s)),b=v.readUTF8(w,0,w.length)),I.tabs[m][_]=b;}else if(m=="PLTE")I.tabs[m]=v.readBytes(n,d,T);else if(m=="hIST"){let h=I.tabs.PLTE.length/3;for(I.tabs[m]=[],O=0;O<h;O++)I.tabs[m].push(C(n,d+2*O));}else if(m=="tRNS")I.ctype==3?I.tabs[m]=v.readBytes(n,d,T):I.ctype==0?I.tabs[m]=C(n,d):I.ctype==2&&(I.tabs[m]=[C(n,d),C(n,d+2),C(n,d+4)]);else if(m=="gAMA")I.tabs[m]=v.readUint(n,d)/1e5;else if(m=="sRGB")I.tabs[m]=n[d];else if(m=="bKGD")I.ctype==0||I.ctype==4?I.tabs[m]=[C(n,d)]:I.ctype==2||I.ctype==6?I.tabs[m]=[C(n,d),C(n,d+2),C(n,d+4)]:I.ctype==3&&(I.tabs[m]=n[d]);else if(m=="IEND")break;d+=T,v.readUint(n,d),d+=4;}var A;return R!=0&&((A=I.frames[I.frames.length-1]).data=S(I,k.slice(0,R),A.rect.width,A.rect.height)),I.data=S(I,B,I.width,I.height),delete I.compress,delete I.interlace,delete I.filter,I},toRGBA8:function(a){let n=a.width,d=a.height;if(a.tabs.acTL==null)return [r(a.data,n,d,a).buffer];let v=[];a.frames[0].data==null&&(a.frames[0].data=a.data);let C=n*d*4,M=new Uint8Array(C),I=new Uint8Array(C),B=new Uint8Array(C);for(let P=0;P<a.frames.length;P++){let R=a.frames[P],p=R.rect.x,O=R.rect.y,f=R.rect.width,u=R.rect.height,_=r(R.data,f,u,a);if(P!=0)for(var k=0;k<C;k++)B[k]=M[k];if(R.blend==0?E(_,f,u,M,n,d,p,O,0):R.blend==1&&E(_,f,u,M,n,d,p,O,1),v.push(M.buffer.slice(0)),R.dispose!=0){if(R.dispose==1)E(I,f,u,M,n,d,p,O,0);else if(R.dispose==2)for(k=0;k<C;k++)M[k]=B[k];}}return v},_paeth:l,_copyTile:E,_bin:i}})();(function(){let{_copyTile:i}=pe,{_bin:r}=pe,S=pe._paeth;var c={table:(function(){let f=new Uint32Array(256);for(let u=0;u<256;u++){let _=u;for(let s=0;s<8;s++)1&_?_=3988292384^_>>>1:_>>>=1;f[u]=_;}return f})(),update(f,u,_,s){for(let w=0;w<s;w++)f=c.table[255&(f^u[_+w])]^f>>>8;return f},crc:(f,u,_)=>4294967295^c.update(4294967295,f,u,_)};function e(f,u,_,s){u[_]+=f[0]*s>>4,u[_+1]+=f[1]*s>>4,u[_+2]+=f[2]*s>>4,u[_+3]+=f[3]*s>>4;}function t(f){return Math.max(0,Math.min(255,f))}function g(f,u){let _=f[0]-u[0],s=f[1]-u[1],w=f[2]-u[2],b=f[3]-u[3];return _*_+s*s+w*w+b*b}function l(f,u,_,s,w,b,A){A==null&&(A=1);let T=s.length,m=[];for(var h=0;h<T;h++){let F=s[h];m.push([F>>>0&255,F>>>8&255,F>>>16&255,F>>>24&255]);}for(h=0;h<T;h++){let F=4294967295;for(var L=0,x=0;x<T;x++){var U=g(m[h],m[x]);x!=h&&U<F&&(F=U,L=x);}}let H=new Uint32Array(w.buffer),D=new Int16Array(u*_*4),Q=[0,8,2,10,12,4,14,6,3,11,1,9,15,7,13,5];for(h=0;h<Q.length;h++)Q[h]=255*((Q[h]+.5)/16-.5);for(let F=0;F<_;F++)for(let $=0;$<u;$++){var N;h=4*(F*u+$),A!=2?N=[t(f[h]+D[h]),t(f[h+1]+D[h+1]),t(f[h+2]+D[h+2]),t(f[h+3]+D[h+3])]:(U=Q[4*(3&F)+(3&$)],N=[t(f[h]+U),t(f[h+1]+U),t(f[h+2]+U),t(f[h+3]+U)]),L=0;let K=16777215;for(x=0;x<T;x++){let q=g(N,m[x]);q<K&&(K=q,L=x);}let V=m[L],z=[N[0]-V[0],N[1]-V[1],N[2]-V[2],N[3]-V[3]];A==1&&($!=u-1&&e(z,D,h+4,7),F!=_-1&&($!=0&&e(z,D,h+4*u-4,3),e(z,D,h+4*u,5),$!=u-1&&e(z,D,h+4*u+4,1))),b[h>>2]=L,H[h>>2]=s[L];}}function y(f,u,_,s,w){w==null&&(w={});let{crc:b}=c,A=r.writeUint,T=r.writeUshort,m=r.writeASCII,h=8,L=f.frames.length>1,x,U=false,H=33+(L?20:0);if(w.sRGB!=null&&(H+=13),w.pHYs!=null&&(H+=21),w.iCCP!=null&&(x=pako.deflate(w.iCCP),H+=21+x.length+4),f.ctype==3){for(var D=f.plte.length,Q=0;Q<D;Q++)f.plte[Q]>>>24!=255&&(U=true);H+=8+3*D+4+(U?8+1*D+4:0);}for(var N=0;N<f.frames.length;N++)L&&(H+=38),H+=(V=f.frames[N]).cimg.length+12,N!=0&&(H+=4);H+=12;let F=new Uint8Array(H),$=[137,80,78,71,13,10,26,10];for(Q=0;Q<8;Q++)F[Q]=$[Q];if(A(F,h,13),h+=4,m(F,h,"IHDR"),h+=4,A(F,h,u),h+=4,A(F,h,_),h+=4,F[h]=f.depth,h++,F[h]=f.ctype,h++,F[h]=0,h++,F[h]=0,h++,F[h]=0,h++,A(F,h,b(F,h-17,17)),h+=4,w.sRGB!=null&&(A(F,h,1),h+=4,m(F,h,"sRGB"),h+=4,F[h]=w.sRGB,h++,A(F,h,b(F,h-5,5)),h+=4),w.iCCP!=null){let z=13+x.length;A(F,h,z),h+=4,m(F,h,"iCCP"),h+=4,m(F,h,"ICC profile"),h+=11,h+=2,F.set(x,h),h+=x.length,A(F,h,b(F,h-(z+4),z+4)),h+=4;}if(w.pHYs!=null&&(A(F,h,9),h+=4,m(F,h,"pHYs"),h+=4,A(F,h,w.pHYs[0]),h+=4,A(F,h,w.pHYs[1]),h+=4,F[h]=w.pHYs[2],h++,A(F,h,b(F,h-13,13)),h+=4),L&&(A(F,h,8),h+=4,m(F,h,"acTL"),h+=4,A(F,h,f.frames.length),h+=4,A(F,h,w.loop!=null?w.loop:0),h+=4,A(F,h,b(F,h-12,12)),h+=4),f.ctype==3){for(A(F,h,3*(D=f.plte.length)),h+=4,m(F,h,"PLTE"),h+=4,Q=0;Q<D;Q++){let z=3*Q,q=f.plte[Q],G=255&q,W=q>>>8&255,ie=q>>>16&255;F[h+z+0]=G,F[h+z+1]=W,F[h+z+2]=ie;}if(h+=3*D,A(F,h,b(F,h-3*D-4,3*D+4)),h+=4,U){for(A(F,h,D),h+=4,m(F,h,"tRNS"),h+=4,Q=0;Q<D;Q++)F[h+Q]=f.plte[Q]>>>24&255;h+=D,A(F,h,b(F,h-D-4,D+4)),h+=4;}}let K=0;for(N=0;N<f.frames.length;N++){var V=f.frames[N];L&&(A(F,h,26),h+=4,m(F,h,"fcTL"),h+=4,A(F,h,K++),h+=4,A(F,h,V.rect.width),h+=4,A(F,h,V.rect.height),h+=4,A(F,h,V.rect.x),h+=4,A(F,h,V.rect.y),h+=4,T(F,h,s[N]),h+=2,T(F,h,1e3),h+=2,F[h]=V.dispose,h++,F[h]=V.blend,h++,A(F,h,b(F,h-30,30)),h+=4);let z=V.cimg;A(F,h,(D=z.length)+(N==0?0:4)),h+=4;let q=h;m(F,h,N==0?"IDAT":"fdAT"),h+=4,N!=0&&(A(F,h,K++),h+=4),F.set(z,h),h+=D,A(F,h,b(F,q,h-q)),h+=4;}return A(F,h,0),h+=4,m(F,h,"IEND"),h+=4,A(F,h,b(F,h-4,4)),h+=4,F.buffer}function E(f,u,_){for(let s=0;s<f.frames.length;s++){let w=f.frames[s];w.rect.width;let b=w.rect.height,A=new Uint8Array(b*w.bpl+b);w.cimg=d(w.img,b,w.bpp,w.bpl,A,u,_);}}function o(f,u,_,s,w){let b=w[0],A=w[1],T=w[2],m=w[3],h=w[4],L=w[5],x=6,U=8,H=255;for(var D=0;D<f.length;D++){let te=new Uint8Array(f[D]);for(var Q=te.length,N=0;N<Q;N+=4)H&=te[N+3];}let F=H!=255,$=(function(Y,J,ne,oe,j,ue){let ee=[];for(var X=0;X<Y.length;X++){let ce=new Uint8Array(Y[X]),he=new Uint32Array(ce.buffer);var le;let de=0,Ae=0,me=J,Ie=ne,Ye=oe?1:0;if(X!=0){let yn=ue||oe||X==1||ee[X-2].dispose!=0?1:2,Je=0,vt=1e9;for(let Le=0;Le<yn;Le++){var ge=new Uint8Array(Y[X-1-Le]);let wn=new Uint32Array(Y[X-1-Le]),_e=J,be=ne,Ue=-1,De=-1;for(let Re=0;Re<ne;Re++)for(let Ce=0;Ce<J;Ce++)he[se=Re*J+Ce]!=wn[se]&&(Ce<_e&&(_e=Ce),Ce>Ue&&(Ue=Ce),Re<be&&(be=Re),Re>De&&(De=Re));Ue==-1&&(_e=be=Ue=De=0),j&&((1&_e)==1&&_e--,(1&be)==1&&be--);let _t=(Ue-_e+1)*(De-be+1);_t<vt&&(vt=_t,Je=Le,de=_e,Ae=be,me=Ue-_e+1,Ie=De-be+1);}ge=new Uint8Array(Y[X-1-Je]),Je==1&&(ee[X-1].dispose=2),le=new Uint8Array(me*Ie*4),i(ge,J,ne,le,me,Ie,-de,-Ae,0),Ye=i(ce,J,ne,le,me,Ie,-de,-Ae,3)?1:0,Ye==1?n(ce,J,ne,le,{x:de,y:Ae,width:me,height:Ie}):i(ce,J,ne,le,me,Ie,-de,-Ae,0);}else le=ce.slice(0);ee.push({rect:{x:de,y:Ae,width:me,height:Ie},img:le,blend:Ye,dispose:0});}if(oe)for(X=0;X<ee.length;X++){if((Te=ee[X]).blend==1)continue;let ce=Te.rect,he=ee[X-1].rect,de=Math.min(ce.x,he.x),Ae=Math.min(ce.y,he.y),me={x:de,y:Ae,width:Math.max(ce.x+ce.width,he.x+he.width)-de,height:Math.max(ce.y+ce.height,he.y+he.height)-Ae};ee[X-1].dispose=1,X-1!=0&&a(Y,J,ne,ee,X-1,me,j),a(Y,J,ne,ee,X,me,j);}let He=0;if(Y.length!=1)for(var se=0;se<ee.length;se++){var Te;He+=(Te=ee[se]).rect.width*Te.rect.height;}return ee})(f,u,_,b,A,T),K={},V=[],z=[];if(s!=0){let te=[];for(N=0;N<$.length;N++)te.push($[N].img.buffer);let Y=(function(j){let ue=0;for(var ee=0;ee<j.length;ee++)ue+=j[ee].byteLength;let X=new Uint8Array(ue),le=0;for(ee=0;ee<j.length;ee++){let ge=new Uint8Array(j[ee]),He=ge.length;for(let se=0;se<He;se+=4){let Te=ge[se],ce=ge[se+1],he=ge[se+2],de=ge[se+3];de==0&&(Te=ce=he=0),X[le+se]=Te,X[le+se+1]=ce,X[le+se+2]=he,X[le+se+3]=de;}le+=He;}return X.buffer})(te),J=C(Y,s);for(N=0;N<J.plte.length;N++)V.push(J.plte[N].est.rgba);let ne=0;for(N=0;N<$.length;N++){let oe=(G=$[N]).img.length;var q=new Uint8Array(J.inds.buffer,ne>>2,oe>>2);z.push(q);let j=new Uint8Array(J.abuf,ne,oe);L&&l(G.img,G.rect.width,G.rect.height,V,j,q),G.img.set(j),ne+=oe;}}else for(D=0;D<$.length;D++){var G=$[D];let te=new Uint32Array(G.img.buffer);var W=G.rect.width;for(Q=te.length,q=new Uint8Array(Q),z.push(q),N=0;N<Q;N++){let Y=te[N];if(N!=0&&Y==te[N-1])q[N]=q[N-1];else if(N>W&&Y==te[N-W])q[N]=q[N-W];else {let J=K[Y];if(J==null&&(K[Y]=J=V.length,V.push(Y),V.length>=300))break;q[N]=J;}}}let ie=V.length;for(ie<=256&&h==0&&(U=ie<=2?1:ie<=4?2:ie<=16?4:8,U=Math.max(U,m)),D=0;D<$.length;D++){(G=$[D]).rect.x,G.rect.y,W=G.rect.width;let te=G.rect.height,Y=G.img;new Uint32Array(Y.buffer);let J=4*W,ne=4;if(ie<=256&&h==0){J=Math.ceil(U*W/8);var ae=new Uint8Array(J*te);let oe=z[D];for(let j=0;j<te;j++){N=j*J;let ue=j*W;if(U==8)for(var Z=0;Z<W;Z++)ae[N+Z]=oe[ue+Z];else if(U==4)for(Z=0;Z<W;Z++)ae[N+(Z>>1)]|=oe[ue+Z]<<4-4*(1&Z);else if(U==2)for(Z=0;Z<W;Z++)ae[N+(Z>>2)]|=oe[ue+Z]<<6-2*(3&Z);else if(U==1)for(Z=0;Z<W;Z++)ae[N+(Z>>3)]|=oe[ue+Z]<<7-1*(7&Z);}Y=ae,x=3,ne=1;}else if(F==0&&$.length==1){ae=new Uint8Array(W*te*3);let oe=W*te;for(N=0;N<oe;N++){let j=3*N,ue=4*N;ae[j]=Y[ue],ae[j+1]=Y[ue+1],ae[j+2]=Y[ue+2];}Y=ae,x=2,ne=3,J=3*W;}G.img=Y,G.bpl=J,G.bpp=ne;}return {ctype:x,depth:U,plte:V,frames:$}}function a(f,u,_,s,w,b,A){let T=Uint8Array,m=Uint32Array,h=new T(f[w-1]),L=new m(f[w-1]),x=w+1<f.length?new T(f[w+1]):null,U=new T(f[w]),H=new m(U.buffer),D=u,Q=_,N=-1,F=-1;for(let K=0;K<b.height;K++)for(let V=0;V<b.width;V++){let z=b.x+V,q=b.y+K,G=q*u+z,W=H[G];W==0||s[w-1].dispose==0&&L[G]==W&&(x==null||x[4*G+3]!=0)||(z<D&&(D=z),z>N&&(N=z),q<Q&&(Q=q),q>F&&(F=q));}N==-1&&(D=Q=N=F=0),A&&((1&D)==1&&D--,(1&Q)==1&&Q--),b={x:D,y:Q,width:N-D+1,height:F-Q+1};let $=s[w];$.rect=b,$.blend=1,$.img=new Uint8Array(b.width*b.height*4),s[w-1].dispose==0?(i(h,u,_,$.img,b.width,b.height,-b.x,-b.y,0),n(U,u,_,$.img,b)):i(U,u,_,$.img,b.width,b.height,-b.x,-b.y,0);}function n(f,u,_,s,w){i(f,u,_,s,w.width,w.height,-w.x,-w.y,2);}function d(f,u,_,s,w,b,A){let T=[],m,h=[0,1,2,3,4];b!=-1?h=[b]:(u*s>5e5||_==1)&&(h=[0]),A&&(m={level:0});let L=Cn;for(var x=0;x<h.length;x++){for(let D=0;D<u;D++)v(w,f,D,s,_,h[x]);T.push(L.deflate(w,m));}let U,H=1e9;for(x=0;x<T.length;x++)T[x].length<H&&(U=x,H=T[x].length);return T[U]}function v(f,u,_,s,w,b){let A=_*s,T=A+_;if(f[T]=b,T++,b==0)if(s<500)for(var m=0;m<s;m++)f[T+m]=u[A+m];else f.set(new Uint8Array(u.buffer,A,s),T);else if(b==1){for(m=0;m<w;m++)f[T+m]=u[A+m];for(m=w;m<s;m++)f[T+m]=u[A+m]-u[A+m-w]+256&255;}else if(_==0){for(m=0;m<w;m++)f[T+m]=u[A+m];if(b==2)for(m=w;m<s;m++)f[T+m]=u[A+m];if(b==3)for(m=w;m<s;m++)f[T+m]=u[A+m]-(u[A+m-w]>>1)+256&255;if(b==4)for(m=w;m<s;m++)f[T+m]=u[A+m]-S(u[A+m-w],0,0)+256&255;}else {if(b==2)for(m=0;m<s;m++)f[T+m]=u[A+m]+256-u[A+m-s]&255;if(b==3){for(m=0;m<w;m++)f[T+m]=u[A+m]+256-(u[A+m-s]>>1)&255;for(m=w;m<s;m++)f[T+m]=u[A+m]+256-(u[A+m-s]+u[A+m-w]>>1)&255;}if(b==4){for(m=0;m<w;m++)f[T+m]=u[A+m]+256-S(0,u[A+m-s],0)&255;for(m=w;m<s;m++)f[T+m]=u[A+m]+256-S(u[A+m-w],u[A+m-s],u[A+m-w-s])&255;}}}function C(f,u){let _=new Uint8Array(f),s=_.slice(0),w=new Uint32Array(s.buffer),b=M(s,u),A=b[0],T=b[1],m=_.length,h=new Uint8Array(m>>2),L;if(_.length<2e7)for(var x=0;x<m;x+=4)L=I(A,U=_[x]*(1/255),H=_[x+1]*(1/255),D=_[x+2]*(1/255),Q=_[x+3]*(1/255)),h[x>>2]=L.ind,w[x>>2]=L.est.rgba;else for(x=0;x<m;x+=4){var U=_[x]*.00392156862745098,H=_[x+1]*(1/255),D=_[x+2]*(1/255),Q=_[x+3]*(1/255);for(L=A;L.left;)L=B(L.est,U,H,D,Q)<=0?L.left:L.right;h[x>>2]=L.ind,w[x>>2]=L.est.rgba;}return {abuf:s.buffer,inds:h,plte:T}}function M(f,u,_){_==null&&(_=1e-4);let s=new Uint32Array(f.buffer),w={i0:0,i1:f.length,bst:null,est:null,tdst:0,left:null,right:null};w.bst=R(f,w.i0,w.i1),w.est=p(w.bst);let b=[w];for(;b.length<u;){let T=0,m=0;for(var A=0;A<b.length;A++)b[A].est.L>T&&(T=b[A].est.L,m=A);if(T<_)break;let h=b[m],L=k(f,s,h.i0,h.i1,h.est.e,h.est.eMq255);if(h.i0>=L||h.i1<=L){h.est.L=0;continue}let x={i0:h.i0,i1:L,bst:null,est:null,tdst:0,left:null,right:null};x.bst=R(f,x.i0,x.i1),x.est=p(x.bst);let U={i0:L,i1:h.i1,bst:null,est:null,tdst:0,left:null,right:null};for(U.bst={R:[],m:[],N:h.bst.N-x.bst.N},A=0;A<16;A++)U.bst.R[A]=h.bst.R[A]-x.bst.R[A];for(A=0;A<4;A++)U.bst.m[A]=h.bst.m[A]-x.bst.m[A];U.est=p(U.bst),h.left=x,h.right=U,b[m]=x,b.push(U);}for(b.sort(((T,m)=>m.bst.N-T.bst.N)),A=0;A<b.length;A++)b[A].ind=A;return [w,b]}function I(f,u,_,s,w){if(f.left==null)return f.tdst=(function(x,U,H,D,Q){let N=U-x[0],F=H-x[1],$=D-x[2],K=Q-x[3];return N*N+F*F+$*$+K*K})(f.est.q,u,_,s,w),f;let b=B(f.est,u,_,s,w),A=f.left,T=f.right;b>0&&(A=f.right,T=f.left);let m=I(A,u,_,s,w);if(m.tdst<=b*b)return m;let h=I(T,u,_,s,w);return h.tdst<m.tdst?h:m}function B(f,u,_,s,w){let{e:b}=f;return b[0]*u+b[1]*_+b[2]*s+b[3]*w-f.eMq}function k(f,u,_,s,w,b){for(s-=4;_<s;){for(;P(f,_,w)<=b;)_+=4;for(;P(f,s,w)>b;)s-=4;if(_>=s)break;let A=u[_>>2];u[_>>2]=u[s>>2],u[s>>2]=A,_+=4,s-=4;}for(;P(f,_,w)>b;)_-=4;return _+4}function P(f,u,_){return f[u]*_[0]+f[u+1]*_[1]+f[u+2]*_[2]+f[u+3]*_[3]}function R(f,u,_){let s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],w=[0,0,0,0],b=_-u>>2;for(let A=u;A<_;A+=4){let T=f[A]*.00392156862745098,m=f[A+1]*(1/255),h=f[A+2]*(1/255),L=f[A+3]*(1/255);w[0]+=T,w[1]+=m,w[2]+=h,w[3]+=L,s[0]+=T*T,s[1]+=T*m,s[2]+=T*h,s[3]+=T*L,s[5]+=m*m,s[6]+=m*h,s[7]+=m*L,s[10]+=h*h,s[11]+=h*L,s[15]+=L*L;}return s[4]=s[1],s[8]=s[2],s[9]=s[6],s[12]=s[3],s[13]=s[7],s[14]=s[11],{R:s,m:w,N:b}}function p(f){let{R:u}=f,{m:_}=f,{N:s}=f,w=_[0],b=_[1],A=_[2],T=_[3],m=s==0?0:1/s,h=[u[0]-w*w*m,u[1]-w*b*m,u[2]-w*A*m,u[3]-w*T*m,u[4]-b*w*m,u[5]-b*b*m,u[6]-b*A*m,u[7]-b*T*m,u[8]-A*w*m,u[9]-A*b*m,u[10]-A*A*m,u[11]-A*T*m,u[12]-T*w*m,u[13]-T*b*m,u[14]-T*A*m,u[15]-T*T*m],L=h,x=O,U=[Math.random(),Math.random(),Math.random(),Math.random()],H=0,D=0;if(s!=0)for(let N=0;N<16&&(U=x.multVec(L,U),D=Math.sqrt(x.dot(U,U)),U=x.sml(1/D,U),!(N!=0&&Math.abs(D-H)<1e-9));N++)H=D;let Q=[w*m,b*m,A*m,T*m];return {Cov:h,q:Q,e:U,L:H,eMq255:x.dot(x.sml(255,Q),U),eMq:x.dot(U,Q),rgba:(Math.round(255*Q[3])<<24|Math.round(255*Q[2])<<16|Math.round(255*Q[1])<<8|Math.round(255*Q[0])<<0)>>>0}}var O={multVec:(f,u)=>[f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]*u[3],f[4]*u[0]+f[5]*u[1]+f[6]*u[2]+f[7]*u[3],f[8]*u[0]+f[9]*u[1]+f[10]*u[2]+f[11]*u[3],f[12]*u[0]+f[13]*u[1]+f[14]*u[2]+f[15]*u[3]],dot:(f,u)=>f[0]*u[0]+f[1]*u[1]+f[2]*u[2]+f[3]*u[3],sml:(f,u)=>[f*u[0],f*u[1],f*u[2],f*u[3]]};pe.encode=function(u,_,s,w,b,A,T){w==null&&(w=0),T==null&&(T=false);let m=o(u,_,s,w,[false,false,false,0,T,false]);return E(m,-1),y(m,_,s,b,A)},pe.encodeLL=function(u,_,s,w,b,A,T,m){let h={ctype:0+(w==1?0:2)+(b==0?0:4),depth:A,frames:[]},L=(w+b)*A,x=L*_;for(let U=0;U<u.length;U++)h.frames.push({rect:{x:0,y:0,width:_,height:s},img:new Uint8Array(u[U]),blend:0,dispose:1,bpp:Math.ceil(L/8),bpl:Math.ceil(x/8)});return E(h,0,true),y(h,_,s,T,m)},pe.encode.compress=o,pe.encode.dither=l,pe.quantize=C,pe.quantize.getKDtree=M,pe.quantize.getNearest=I;})();var It={toArrayBuffer(i,r){let S=i.width,c=i.height,e=S<<2,t=i.getContext("2d").getImageData(0,0,S,c),g=new Uint32Array(t.data.buffer),l=(32*S+31)/32<<2,y=l*c,E=122+y,o=new ArrayBuffer(E),a=new DataView(o),n=1<<20,d,v,C,M,I=n,B=0,k=0,P=0;function R(f){a.setUint16(k,f,true),k+=2;}function p(f){a.setUint32(k,f,true),k+=4;}function O(f){k+=f;}R(19778),p(E),O(4),p(122),p(108),p(S),p(-c>>>0),R(1),R(32),p(3),p(y),p(2835),p(2835),O(8),p(16711680),p(65280),p(255),p(4278190080),p(1466527264),(function f(){for(;B<c&&I>0;){for(M=122+B*l,d=0;d<e;)I--,v=g[P++],C=v>>>24,a.setUint32(M+d,v<<8|C),d+=4;B++;}P<g.length?(I=n,setTimeout(f,It._dly)):r(o);})();},toBlob(i,r){this.toArrayBuffer(i,(S=>{r(new Blob([S],{type:"image/bmp"}));}));},_dly:9},fe={CHROME:"CHROME",FIREFOX:"FIREFOX",DESKTOP_SAFARI:"DESKTOP_SAFARI",IE:"IE",IOS:"IOS",ETC:"ETC"},xn={[fe.CHROME]:16384,[fe.FIREFOX]:11180,[fe.DESKTOP_SAFARI]:16384,[fe.IE]:8192,[fe.IOS]:4096,[fe.ETC]:8192},et=typeof globalThis.window<"u",Rt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,We=et&&globalThis.window.cordova&&globalThis.window.cordova.require&&globalThis.window.cordova.require("cordova/modulemapper"),On=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"File")||typeof File<"u"&&File),Ct=(et||Rt)&&(We&&We.getOriginalSymbol(globalThis.window,"FileReader")||typeof globalThis.FileReader<"u"&&globalThis.FileReader);function tt(i,r,S=Date.now()){return new Promise((c=>{let e=i.split(","),t=e[0].match(/:(.*?);/)[1],g=globalThis.atob(e[1]),l=g.length,y=new Uint8Array(l);for(;l--;)y[l]=g.charCodeAt(l);let E=new Blob([y],{type:t});E.name=r,E.lastModified=S,c(E);}))}function xt(i){return new Promise(((r,S)=>{let c=new Ct;c.onload=()=>r(c.result),c.onerror=e=>S(e),c.readAsDataURL(i);}))}function Ot(i){return new Promise(((r,S)=>{let c=new globalThis.Image;c.onload=()=>r(c),c.onerror=e=>S(e),c.src=i;}))}function xe(){if(xe.cachedResult!==void 0)return xe.cachedResult;let i=fe.ETC,{userAgent:r}=navigator;return /Chrom(e|ium)/i.test(r)?i=fe.CHROME:/iP(ad|od|hone)/i.test(r)&&/WebKit/i.test(r)?i=fe.IOS:/Safari/i.test(r)?i=fe.DESKTOP_SAFARI:/Firefox/i.test(r)?i=fe.FIREFOX:(/MSIE/i.test(r)||globalThis.document.documentMode)&&(i=fe.IE),xe.cachedResult=i,xe.cachedResult}function Ut(i,r){let S=xe(),c=xn[S],e=i,t=r,g=e*t,l=e>t?t/e:e/t;for(;g>c*c;){let y=(c+e)/2,E=(c+t)/2;y<E?(t=E,e=E*l):(t=y*l,e=y),g=e*t;}return {width:e,height:t}}function Ve(i,r){let S,c;try{if(S=new OffscreenCanvas(i,r),c=S.getContext("2d"),c===null)throw new Error("getContext of OffscreenCanvas returns null")}catch{S=globalThis.document.createElement("canvas"),c=S.getContext("2d");}return S.width=i,S.height=r,[S,c]}function Pt(i,r){let{width:S,height:c}=Ut(i.width,i.height),[e,t]=Ve(S,c);return r&&/jpe?g/.test(r)&&(t.fillStyle="white",t.fillRect(0,0,e.width,e.height)),t.drawImage(i,0,0,e.width,e.height),e}function Qe(){return Qe.cachedResult!==void 0||(Qe.cachedResult=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&typeof globalThis.document<"u"&&"ontouchend"in globalThis.document),Qe.cachedResult}function ze(i,r={}){return new Promise((function(S,c){let e,t;var g=function(){try{return t=Pt(e,r.fileType||i.type),S([e,t])}catch(y){return c(y)}},l=function(y){try{var E=function(o){try{throw o}catch(a){return c(a)}};try{let o;return xt(i).then((function(a){try{return o=a,Ot(o).then((function(n){try{return e=n,(function(){try{return g()}catch(d){return c(d)}})()}catch(d){return E(d)}}),E)}catch(n){return E(n)}}),E)}catch(o){E(o);}}catch(o){return c(o)}};try{if(Qe()||[fe.DESKTOP_SAFARI,fe.MOBILE_SAFARI].includes(xe()))throw new Error("Skip createImageBitmap on IOS and Safari");return createImageBitmap(i).then((function(y){try{return e=y,g()}catch{return l()}}),l)}catch{l();}}))}function Ge(i,r,S,c,e=1){return new Promise((function(t,g){let l;if(r==="image/png"){let a,n,d;return a=i.getContext("2d"),{data:n}=a.getImageData(0,0,i.width,i.height),d=pe.encode([n.buffer],i.width,i.height,4096*e),l=new Blob([d],{type:r}),l.name=S,l.lastModified=c,y.call(this)}{let a=function(){return y.call(this)};if(r==="image/bmp")return new Promise((n=>It.toBlob(i,n))).then(function(n){try{return l=n,l.name=S,l.lastModified=c,a.call(this)}catch(d){return g(d)}}.bind(this),g);{let n=function(){return a.call(this)};if(typeof OffscreenCanvas=="function"&&i instanceof OffscreenCanvas)return i.convertToBlob({type:r,quality:e}).then(function(d){try{return l=d,l.name=S,l.lastModified=c,n.call(this)}catch(v){return g(v)}}.bind(this),g);{let d;return d=i.toDataURL(r,e),tt(d,S,c).then(function(v){try{return l=v,n.call(this)}catch(C){return g(C)}}.bind(this),g)}}}function y(){return t(l)}}))}function ye(i){i.width=0,i.height=0;}function Pe(){return new Promise((function(i,r){let c,e,t,g;return Pe.cachedResult!==void 0?i(Pe.cachedResult):(tt("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAEAAgMBEQACEQEDEQH/xABKAAEAAAAAAAAAAAAAAAAAAAALEAEAAAAAAAAAAAAAAAAAAAAAAQEAAAAAAAAAAAAAAAAAAAAAEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwA/8H//2Q==","test.jpg",Date.now()).then((function(l){try{return c=l,ze(c).then((function(y){try{return e=y[1],Ge(e,c.type,c.name,c.lastModified).then((function(E){try{return t=E,ye(e),ze(t).then((function(o){try{return g=o[0],Pe.cachedResult=g.width===1&&g.height===2,i(Pe.cachedResult)}catch(a){return r(a)}}),r)}catch(o){return r(o)}}),r)}catch(E){return r(E)}}),r)}catch(y){return r(y)}}),r))}))}function Mt(i){return new Promise(((r,S)=>{let c=new Ct;c.onload=e=>{let t=new DataView(e.target.result);if(t.getUint16(0,false)!=65496)return r(-2);let g=t.byteLength,l=2;for(;l<g;){if(t.getUint16(l+2,false)<=8)return r(-1);let y=t.getUint16(l,false);if(l+=2,y==65505){if(t.getUint32(l+=2,false)!=1165519206)return r(-1);let E=t.getUint16(l+=6,false)==18761;l+=t.getUint32(l+4,E);let o=t.getUint16(l,E);l+=2;for(let a=0;a<o;a++)if(t.getUint16(l+12*a,E)==274)return r(t.getUint16(l+12*a+8,E))}else {if((65280&y)!=65280)break;l+=t.getUint16(l,false);}}return r(-1)},c.onerror=e=>S(e),c.readAsArrayBuffer(i);}))}function Lt(i,r){let{width:S}=i,{height:c}=i,{maxWidthOrHeight:e}=r,t,g=i;return isFinite(e)&&(S>e||c>e)&&([g,t]=Ve(S,c),S>c?(g.width=e,g.height=c/S*e):(g.width=S/c*e,g.height=e),t.drawImage(i,0,0,g.width,g.height),ye(i)),g}function Dt(i,r){let{width:S}=i,{height:c}=i,[e,t]=Ve(S,c);switch(r>4&&r<9?(e.width=c,e.height=S):(e.width=S,e.height=c),r){case 2:t.transform(-1,0,0,1,S,0);break;case 3:t.transform(-1,0,0,-1,S,c);break;case 4:t.transform(1,0,0,-1,0,c);break;case 5:t.transform(0,1,1,0,0,0);break;case 6:t.transform(0,1,-1,0,c,0);break;case 7:t.transform(0,-1,-1,0,c,S);break;case 8:t.transform(0,-1,1,0,0,S);}return t.drawImage(i,0,0,S,c),ye(i),e}function St(i,r,S=0){return new Promise((function(c,e){let t,g,l,y,E,o,a,n,d,v,C,M,I,B,k,P,R,p,O,f;function u(s=5){if(r.signal&&r.signal.aborted)throw r.signal.reason;t+=s,r.onProgress(Math.min(t,100));}function _(s){if(r.signal&&r.signal.aborted)throw r.signal.reason;t=Math.min(Math.max(s,t),100),r.onProgress(t);}return t=S,g=r.maxIteration||10,l=1024*r.maxSizeMB*1024,u(),ze(i,r).then(function(s){try{return [,y]=s,u(),E=Lt(y,r),u(),new Promise((function(w,b){var A;if(!(A=r.exifOrientation))return Mt(i).then(function(m){try{return A=m,T.call(this)}catch(h){return b(h)}}.bind(this),b);function T(){return w(A)}return T.call(this)})).then(function(w){try{return o=w,u(),Pe().then(function(b){try{return a=b?E:Dt(E,o),u(),n=r.initialQuality||1,d=r.fileType||i.type,Ge(a,d,i.name,i.lastModified,n).then(function(A){try{{let L=function(){if(g--&&(k>l||k>I)){let U,H;return U=f?.95*O.width:O.width,H=f?.95*O.height:O.height,[R,p]=Ve(U,H),p.drawImage(O,0,0,U,H),n*=d==="image/png"?.85:.95,Ge(R,d,i.name,i.lastModified,n).then((function(D){try{return P=D,ye(O),O=R,k=P.size,_(Math.min(99,Math.floor((B-k)/(B-l)*100))),L}catch(Q){return e(Q)}}),e)}return [1]},x=function(){return ye(O),ye(R),ye(E),ye(a),ye(y),_(100),c(P)};var m=L,h=x;if(v=A,u(),C=v.size>l,M=v.size>i.size,!C&&!M)return _(100),c(v);var T;return I=i.size,B=v.size,k=B,O=a,f=!r.alwaysKeepResolution&&C,(T=function(U){for(;U;){if(U.then)return void U.then(T,e);try{if(U.pop){if(U.length)return U.pop()?x.call(this):U;U=L;}else U=U.call(this);}catch(H){return e(H)}}}.bind(this))(L)}}catch(L){return e(L)}}.bind(this),e)}catch(A){return e(A)}}.bind(this),e)}catch(b){return e(b)}}.bind(this),e)}catch(w){return e(w)}}.bind(this),e)}))}var Un=`
6
6
  let scriptImported = false
7
7
  self.addEventListener('message', async (e) => {
8
8
  const { file, id, imageCompressionLibUrl, options } = e.data
@@ -21,7 +21,7 @@ self.addEventListener('message', async (e) => {
21
21
  self.postMessage({ error: e.message + '\\n' + e.stack, id })
22
22
  }
23
23
  })
24
- `,je;function Pn(i,r){return new Promise(((S,c)=>{je||(je=(function(p){let l=[];return l.push(p),URL.createObjectURL(new Blob(l))})(On));let e=new Worker(je);e.addEventListener("message",(function(p){if(r.signal&&r.signal.aborted)e.terminate();else if(p.data.progress===void 0){if(p.data.error)return c(new Error(p.data.error)),void e.terminate();S(p.data.file),e.terminate();}else r.onProgress(p.data.progress);})),e.addEventListener("error",c),r.signal&&r.signal.addEventListener("abort",(()=>{c(r.signal.reason),e.terminate();})),e.postMessage({file:i,imageCompressionLibUrl:r.libURL,options:{...r,onProgress:void 0,signal:void 0}});}))}function re(i,r){return new Promise((function(S,c){let e,t,p,l,y,E;if(e={...r},p=0,{onProgress:l}=e,e.maxSizeMB=e.maxSizeMB||Number.POSITIVE_INFINITY,y=typeof e.useWebWorker!="boolean"||e.useWebWorker,delete e.useWebWorker,e.onProgress=f=>{p=f,typeof l=="function"&&l(p);},!(i instanceof Blob||i instanceof Un))return c(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(i.type))return c(new Error("The file given is not an image"));if(E=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!y||typeof Worker!="function"||E)return St(i,e).then(function(f){try{return t=f,n.call(this)}catch(v){return c(v)}}.bind(this),c);var o=function(){try{return n.call(this)}catch(f){return c(f)}}.bind(this),a=function(f){try{return St(i,e).then((function(v){try{return t=v,o()}catch(C){return c(C)}}),c)}catch(v){return c(v)}};try{return e.libURL=e.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Pn(i,e).then((function(f){try{return t=f,o()}catch{return a()}}),a)}catch{a();}function n(){try{t.name=i.name,t.lastModified=i.lastModified;}catch{}try{e.preserveExif&&i.type==="image/jpeg"&&(!e.fileType||e.fileType&&e.fileType===i.type)&&(t=Tt(i,t));}catch{}return S(t)}}))}re.getDataUrlFromFile=xt,re.getFilefromDataUrl=tt,re.loadImage=Ut,re.drawImageInCanvas=Pt,re.drawFileInCanvas=ze,re.canvasToFile=Ge,re.getExifOrientation=Mt,re.handleMaxWidthOrHeight=Lt,re.followExifOrientation=Dt,re.cleanupCanvasMemory=ye,re.isAutoOrientationInBrowser=Pe,re.approximateBelowMaximumCanvasSizeOfBrowser=Ot,re.copyExifWithoutOrientation=Tt,re.getBrowserName=xe,re.version="2.0.2";var gn=Et(Ft()),mn=Et(on());function cr(i){let r=globalThis.document.getElementById("__AUTH_DRAWER"),S=globalThis.document.querySelector(".__drawer_container"),c=globalThis.document.querySelector(".__auth_close_button");r&&c&&S?.classList.contains("__hidden")&&(S.classList.remove("__hidden"),r.src=i,r.onload=()=>{c.classList.remove("__hidden"),r.classList.remove("__hidden"),r.contentWindow?.focus();});}function an(){if(globalThis.document.getElementById("__AUTH_DRAWER"))return;let i=globalThis.document.createElement("style");i.innerHTML=`
24
+ `,je;function Pn(i,r){return new Promise(((S,c)=>{je||(je=(function(g){let l=[];return l.push(g),URL.createObjectURL(new Blob(l))})(Un));let e=new Worker(je);e.addEventListener("message",(function(g){if(r.signal&&r.signal.aborted)e.terminate();else if(g.data.progress===void 0){if(g.data.error)return c(new Error(g.data.error)),void e.terminate();S(g.data.file),e.terminate();}else r.onProgress(g.data.progress);})),e.addEventListener("error",c),r.signal&&r.signal.addEventListener("abort",(()=>{c(r.signal.reason),e.terminate();})),e.postMessage({file:i,imageCompressionLibUrl:r.libURL,options:{...r,onProgress:void 0,signal:void 0}});}))}function re(i,r){return new Promise((function(S,c){let e,t,g,l,y,E;if(e={...r},g=0,{onProgress:l}=e,e.maxSizeMB=e.maxSizeMB||Number.POSITIVE_INFINITY,y=typeof e.useWebWorker!="boolean"||e.useWebWorker,delete e.useWebWorker,e.onProgress=d=>{g=d,typeof l=="function"&&l(g);},!(i instanceof Blob||i instanceof On))return c(new Error("The file given is not an instance of Blob or File"));if(!/^image/.test(i.type))return c(new Error("The file given is not an image"));if(E=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,!y||typeof Worker!="function"||E)return St(i,e).then(function(d){try{return t=d,n.call(this)}catch(v){return c(v)}}.bind(this),c);var o=function(){try{return n.call(this)}catch(d){return c(d)}}.bind(this),a=function(d){try{return St(i,e).then((function(v){try{return t=v,o()}catch(C){return c(C)}}),c)}catch(v){return c(v)}};try{return e.libURL=e.libURL||"https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js",Pn(i,e).then((function(d){try{return t=d,o()}catch{return a()}}),a)}catch{a();}function n(){try{t.name=i.name,t.lastModified=i.lastModified;}catch{}try{e.preserveExif&&i.type==="image/jpeg"&&(!e.fileType||e.fileType&&e.fileType===i.type)&&(t=Tt(i,t));}catch{}return S(t)}}))}re.getDataUrlFromFile=xt,re.getFilefromDataUrl=tt,re.loadImage=Ot,re.drawImageInCanvas=Pt,re.drawFileInCanvas=ze,re.canvasToFile=Ge,re.getExifOrientation=Mt,re.handleMaxWidthOrHeight=Lt,re.followExifOrientation=Dt,re.cleanupCanvasMemory=ye,re.isAutoOrientationInBrowser=Pe,re.approximateBelowMaximumCanvasSizeOfBrowser=Ut,re.copyExifWithoutOrientation=Tt,re.getBrowserName=xe,re.version="2.0.2";var gn=Et(Ft()),mn=Et(on());function cr(i){let r=globalThis.document.getElementById("__AUTH_DRAWER"),S=globalThis.document.querySelector(".__drawer_container"),c=globalThis.document.querySelector(".__auth_close_button");r&&c&&S?.classList.contains("__hidden")&&(S.classList.remove("__hidden"),r.src=i,r.onload=()=>{c.classList.remove("__hidden"),r.classList.remove("__hidden"),r.contentWindow?.focus();});}function an(){if(globalThis.document.getElementById("__AUTH_DRAWER"))return;let i=globalThis.document.createElement("style");i.innerHTML=`
25
25
  .__button_container * {
26
26
  font-family: -apple-system,
27
27
  BlinkMacSystemFont,
@@ -226,7 +226,7 @@ self.addEventListener('message', async (e) => {
226
226
  max-width: 100%;
227
227
  }
228
228
  }
229
- `,globalThis.document.head.appendChild(i);let r=globalThis.document.createElement("div");r.className="__drawer_container __hidden";let S=globalThis.document.createElement("iframe");S.className="__drawer_frame __hidden",S.id="__AUTH_DRAWER",S.setAttribute("allow","fullscreen; camera; microphone; gyroscope; accelerometer; clipboard-write; clipboard-read; autoplay; geolocation; display-capture; picture-in-picture; payment; midi; bluetooth; web-share; screen-wake-lock; xr-spatial-tracking; encrypted-media; idle-detection; hid; serial; window-management"),S.loading="eager",S.referrerPolicy="unsafe-url",S.title="Login";let c=globalThis.document.createElement("div");c.setAttribute("alt","Close"),c.className="__auth_close_button",r.appendChild(S),r.appendChild(c),globalThis.document.body.appendChild(r);let e=globalThis.document.querySelector(".__auth_close_button"),t=new Map;function p(){r.classList.add("__hidden"),S.classList.add("__hidden"),t.forEach(({cleanup:l})=>l());}globalThis.window.__REQUEST_CONNECTION__=(l,y)=>{let E=globalThis.document.createElement("iframe");return E.className="__drawer_frame __hidden",E.id=`__AUTH_DRAWER_${y}`,E.setAttribute("allow","fullscreen; camera; microphone; gyroscope; accelerometer; clipboard-write; clipboard-read; autoplay; geolocation; display-capture; picture-in-picture; payment; midi; bluetooth; web-share; screen-wake-lock; xr-spatial-tracking; encrypted-media; idle-detection; hid; serial; window-management"),E.loading="eager",E.referrerPolicy="unsafe-url",E.title="Connect",E.src=l,r.appendChild(E),r.classList.add("__hidden"),new Promise(o=>{let a=()=>{globalThis.window.removeEventListener("message",n),t.delete(y);try{E.remove();}catch{}},n=f=>{if(f.source!==E.contentWindow)return;let v=f.data||{};v.type==="REQUEST_CONNECTION_RESULT"&&v.connectId===y&&(a(),o(v));};t.set(y,{iframe:E,cleanup:a}),globalThis.window.addEventListener("message",n);})},globalThis.window.addEventListener("message",l=>{!l.data||typeof l.data!="object"||l.data.type==="closeAuthDrawer"&&p();}),e?.addEventListener("click",p),r.addEventListener("click",l=>{l.target===r&&p();});}var mt=i=>{let{email:r,phoneNumber:S}=i??{},c=r??S,e=new URLSearchParams;i&&"redirectUri"in i&&i.redirectUri?e.set("returnTo",i.redirectUri):e.set("returnTo",globalThis.window.location.pathname+globalThis.window.location.search),c&&e.set("identity",c),e.set("stripped","true");let t=globalThis.window.__APP_ID__;cr(`${globalThis.window.__ROOT_URL__}/setup/${t}?${e.toString()}`);};function ur(i={}){let[r,S]=useState({userId:void 0,status:"loading",signIn:mt,providers:[]});return useEffect(()=>{(async()=>{try{let t=await(await fetch("/api/session",{method:"POST",headers:{"Content-Type":"application/json","x-guest-api-internal":"session",...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{}}})).json()??{};S({userId:t.userId??null,status:"authenticated",signIn:mt,providers:t?.providers??[]});}catch{if(i.required){let t=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),p=globalThis.window.__APP_ID__;globalThis.window.top?globalThis.window.top.location.href=`${globalThis.window.__ROOT_URL__}/setup/${p}?returnTo=${t}`:globalThis.window.location.href=`${globalThis.window.__ROOT_URL__}/setup/${p}?returnTo=${t}`;}else S({userId:null,status:"unauthenticated",signIn:mt,providers:[]});}})();},[i.required]),r}async function fr(i){let r=`c_${Math.random().toString(36).slice(2)}_${Date.now()}`,S=new URLSearchParams;S.set("connectId",r),S.set("provider",i.provider),S.set("mode",i.mode??"get_or_request"),i.scope&&i.scope.length>0&&S.set("scope",i.scope.join(",")),typeof globalThis.window<"u"&&globalThis.window.__APP_ID__&&S.set("appId",globalThis.window.__APP_ID__);let c=`${globalThis.window.__ROOT_URL__}/connect-drawer?${S.toString()}`;return await globalThis.window.__REQUEST_CONNECTION__(c,r)}async function ln({channelId:i,initialData:r,broadcastOnly:S,onUpdate:c}){let e=r,t=0,p=globalThis.window.__REALTIME_DOMAIN__;if(S)return {getData(){return e},setData(y){e=y,fetch(`https://${p}/${i}`,{method:"POST",body:yt.stringify(e)}).catch(console.error),c?.(y);},destroy(){}};let l=new WebSocket(`wss://${p}/${i}`);return new Promise((y,E)=>{function o(v){try{let C=JSON.parse(v.data.toString());C?.id&&C.id>t?(e=yt.parse(C.payload),c?.(e),t=C.id):console.error("Invalid message:",v.data);}catch{console.error("Error parsing message:",v.data);}}function a(v){f(),E(v);}function n(){y({getData(){return e},setData(v){e=v,c?.(v),l.send(yt.stringify(v));},destroy:f});}function f(){l.removeEventListener("message",o),l.removeEventListener("error",a),l.removeEventListener("open",n),l.close();}l.addEventListener("message",o),l.addEventListener("error",a),l.addEventListener("open",n);})}function cn(i,r){let S=useRef(null),[c,e]=useState(0);return useEffect(()=>((async()=>i&&(S.current=await ln({channelId:i,initialData:r,onUpdate:()=>{e(t=>t+1);}})))(),S.current?.destroy),[i,e]),[S.current?.getData(),S.current?.setData??identity]}function wr(i){let[r,S]=useState(null),[c]=cn(r,void 0),e=i.mutationFn;if(!e)throw new Error("useRealtimeMutation requires a mutationFn option.");let t=useCallback(async l=>{let y=nanoid(32);return S(y),await e({...l,__channelId:y})},[i?.mutationFn]);return {...useMutation({...i,mutationFn:t}),data:c}}function un(i){return i?.message?.startsWith("__MISSING AUTH FOR SCOPE")}function hn(i){return i[0]}function _r(i){let S=i?.message?.slice("__MISSING AUTH FOR SCOPE:".length+1).trim()??"",c=JSON.parse(atob(S.split(" ")?.[0])),e=c?.provider,t=c?.scope;return {provider:e,scope:t,isPopup:i?.message?.endsWith("--popup"),accountId:c?.accountId}}var br=60,Er=30*1e3,wt=0,pn=Date.now(),At=false;function Sr(){return rpcClient({transport:async(i,r)=>{let S=Date.now();if(S-pn>=Er)pn=S,wt=0,At=false;else if(wt>=br)throw At||(globalThis.window.dispatchEvent(new Event("rate-limit-exceeded")),At=true),new RpcError("Rate limit exceeded",-32e3,{status:429});wt++;let c="/api/"+i.method,e=i.params&&hn(i.params)?.__channelId;e&&delete hn(i.params)?.__channelId;let t=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e?{"x-channel-id":e}:{},...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{},"x-boxman-box-id":globalThis.window.__BOX_ID__},body:yt.stringify(i),signal:r});if(!t.ok){let l=t.statusText,y=-32e3;try{let{message:E,code:o}=await t.json();E&&(l=E),o&&(y=o);}catch{}throw l.trim()===""&&(l=`Request failed with status: ${t.status}`),new RpcError(l,y,{status:t.status})}let p=yt.deserialize(await t.json());if(un(p.error)){let l=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),y=_r(p.error),E=[`returnTo=${l}`,y.provider?`&provider=${y.provider}`:"",y.scope?`&scope=${y.scope.join(",")}`:"",y.accountId?`&accountId=${y.accountId}`:""].filter(Boolean).join("&");if(y.isPopup){globalThis.window.__OPEN_AUTH_DRAWER__(`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}&stripped=true`);return}let o=globalThis.window.top??globalThis.window;return o.location.href=`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}`,null}return p}})}function Xr(i){return new Promise(r=>{let S=new globalThis.FileReader;S.onload=()=>{r(S.result);},S.readAsDataURL(i);})}function Tr(){let i={...globalThis.window.console};function r(S,c){let e=(0, mn.default)(c,{depth:5,maxStringLength:512,indent:2});fetch("/_logger",{method:"POST",body:`[console.${S.toLowerCase()}] ${e}`}).catch(()=>{});}globalThis.window.console.log=(...S)=>{r("LOG",S),i.log(...S);},globalThis.window.console.error=(...S)=>{r("ERROR",S),i.error(...S);},globalThis.window.console.info=(...S)=>{r("INFO",S),i.info(...S);},globalThis.window.console.warn=(...S)=>{r("WARN",S),i.warn(...S);};}function Ir(){function i(r,S=globalThis.window.parent,c="*"){S?.postMessage({...r,source:"iframe"},{targetOrigin:c});}globalThis.window.addEventListener("message",async r=>{let{origin:S,source:c,data:e}=r,{type:t}=e;if(t==="screenshot"){let p=globalThis.window.getComputedStyle(globalThis.document.body).backgroundColor,l=await gn.default.toPng(globalThis.document.body,{bgcolor:p,style:{transform:"translateY("+-globalThis.window.scrollY+"px)"},width:globalThis.window.innerWidth,height:globalThis.window.innerHeight,copyDefaultStyles:false}),y=await fetch(l).then(n=>n.blob()),E=await re(y,{maxSizeMB:4,maxWidthOrHeight:1920,useWebWorker:false}),a={type:"screenshot",payload:{screenshot:await re.getDataUrlFromFile(E)}};i(a,c,S);}});}function Yr({appId:i,rootUrl:r,baseUrl:S,isTesting:c,realtimeDomain:e,boxId:t}){typeof globalThis.window>"u"||globalThis.window.__APP_ID__||(globalThis.window.__APP_ID__=i,globalThis.window.__ROOT_URL__=r,globalThis.window.__BASE_URL__=S,globalThis.window.__IS_TESTING__=c,globalThis.window.__REALTIME_DOMAIN__=e,globalThis.window.__BOX_ID__=t,Ir(),Tr(),an(),globalThis.window.onerror=function(p){console.error("Global JS error:",p);},globalThis.window.onunhandledrejection=function(p){console.error("Unhandled promise rejection:",p.reason);});}function Jr(){return globalThis.window.__BASE_URL__}/*! Bundled license information:
229
+ `,globalThis.document.head.appendChild(i);let r=globalThis.document.createElement("div");r.className="__drawer_container __hidden";let S=globalThis.document.createElement("iframe");S.className="__drawer_frame __hidden",S.id="__AUTH_DRAWER",S.setAttribute("allow","fullscreen; camera; microphone; gyroscope; accelerometer; clipboard-write; clipboard-read; autoplay; geolocation; display-capture; picture-in-picture; payment; midi; bluetooth; web-share; screen-wake-lock; xr-spatial-tracking; encrypted-media; idle-detection; hid; serial; window-management"),S.loading="eager",S.referrerPolicy="unsafe-url",S.title="Login";let c=globalThis.document.createElement("div");c.setAttribute("alt","Close"),c.className="__auth_close_button",r.appendChild(S),r.appendChild(c),globalThis.document.body.appendChild(r);let e=globalThis.document.querySelector(".__auth_close_button"),t=new Map;function g(){r.classList.add("__hidden"),S.classList.add("__hidden"),t.forEach(({popup:y,cleanup:E})=>{E();try{y?.close();}catch{}});}let l=globalThis.document.createElement("iframe");l.style.display="none",l.id="__CONNECT_LISTENER",l.src=`${globalThis.window.__ROOT_URL__}/connect-listener`,globalThis.document.body.appendChild(l),globalThis.window.__REQUEST_CONNECTION__=y=>{let{connectId:E,provider:o,scope:a,mode:n,appId:d}=y,v=new URL("/connect",globalThis.window.__ROOT_URL__);v.searchParams.set("connectId",E),v.searchParams.set("provider",o),a&&v.searchParams.set("scope",a),n&&v.searchParams.set("mode",n),d&&v.searchParams.set("appId",d);let C=Math.min(720,Math.floor(globalThis.window.screen.availWidth*.9)),M=Math.min(800,Math.floor(globalThis.window.screen.availHeight*.9)),I=Math.floor(globalThis.window.screenX+(globalThis.window.outerWidth-C)/2),B=Math.floor(globalThis.window.screenY+(globalThis.window.outerHeight-M)/2),k=`popup=yes,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=${C},height=${M},left=${I},top=${B}`,P=globalThis.window.open(v.toString(),`ac1_connect_${E}`,k);return P?new Promise(R=>{let p=()=>{globalThis.window.removeEventListener("message",O),globalThis.window.clearInterval(f),t.delete(E);},O=u=>{let _=u.data||{};if(_.type==="connect:result"&&_.connectId===E){p();try{P?.close();}catch{}_.status==="error"?R({status:"error",connectId:E,error:_.error,errorDescription:_.errorDescription}):R({status:"connected",connectId:E,connections:_.connections??[]});}},f=globalThis.window.setInterval(()=>{P?.closed&&(p(),R({status:"error",connectId:E,error:"popup_closed",errorDescription:"The connect window was closed before finishing."}));},250);t.set(E,{popup:P,cleanup:p}),globalThis.window.addEventListener("message",O);}):Promise.resolve({status:"error",connectId:E,error:"popup_blocked",errorDescription:"Popup was blocked by the browser."})},globalThis.window.addEventListener("message",y=>{!y.data||typeof y.data!="object"||y.data.type==="closeAuthDrawer"&&g();}),e?.addEventListener("click",g),r.addEventListener("click",y=>{y.target===r&&g();});}var mt=i=>{let{email:r,phoneNumber:S}=i??{},c=r??S,e=new URLSearchParams;i&&"redirectUri"in i&&i.redirectUri?e.set("returnTo",i.redirectUri):e.set("returnTo",globalThis.window.location.pathname+globalThis.window.location.search),c&&e.set("identity",c),e.set("stripped","true");let t=globalThis.window.__APP_ID__;cr(`${globalThis.window.__ROOT_URL__}/setup/${t}?${e.toString()}`);};function ur(i={}){let[r,S]=useState({userId:void 0,status:"loading",signIn:mt,providers:[]});return useEffect(()=>{(async()=>{try{let t=await(await fetch("/api/session",{method:"POST",headers:{"Content-Type":"application/json","x-guest-api-internal":"session",...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{}}})).json()??{};S({userId:t.userId??null,status:"authenticated",signIn:mt,providers:t?.providers??[]});}catch{if(i.required){let t=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),g=globalThis.window.__APP_ID__;globalThis.window.top?globalThis.window.top.location.href=`${globalThis.window.__ROOT_URL__}/setup/${g}?returnTo=${t}`:globalThis.window.location.href=`${globalThis.window.__ROOT_URL__}/setup/${g}?returnTo=${t}`;}else S({userId:null,status:"unauthenticated",signIn:mt,providers:[]});}})();},[i.required]),r}async function fr(i){let r=`c_${Math.random().toString(36).slice(2)}_${Date.now()}`;return await globalThis.window.__REQUEST_CONNECTION__({connectId:r,provider:i.provider,scope:i.scope?.join(","),mode:i.mode??"get_or_request",appId:globalThis.window.__APP_ID__})}async function ln({channelId:i,initialData:r,broadcastOnly:S,onUpdate:c}){let e=r,t=0,g=globalThis.window.__REALTIME_DOMAIN__;if(S)return {getData(){return e},setData(y){e=y,fetch(`https://${g}/${i}`,{method:"POST",body:yt.stringify(e)}).catch(console.error),c?.(y);},destroy(){}};let l=new WebSocket(`wss://${g}/${i}`);return new Promise((y,E)=>{function o(v){try{let C=JSON.parse(v.data.toString());C?.id&&C.id>t?(e=yt.parse(C.payload),c?.(e),t=C.id):console.error("Invalid message:",v.data);}catch{console.error("Error parsing message:",v.data);}}function a(v){d(),E(v);}function n(){y({getData(){return e},setData(v){e=v,c?.(v),l.send(yt.stringify(v));},destroy:d});}function d(){l.removeEventListener("message",o),l.removeEventListener("error",a),l.removeEventListener("open",n),l.close();}l.addEventListener("message",o),l.addEventListener("error",a),l.addEventListener("open",n);})}function cn(i,r){let S=useRef(null),[c,e]=useState(0);return useEffect(()=>((async()=>i&&(S.current=await ln({channelId:i,initialData:r,onUpdate:()=>{e(t=>t+1);}})))(),S.current?.destroy),[i,e]),[S.current?.getData(),S.current?.setData??identity]}function wr(i){let[r,S]=useState(null),[c]=cn(r,void 0),e=i.mutationFn;if(!e)throw new Error("useRealtimeMutation requires a mutationFn option.");let t=useCallback(async l=>{let y=nanoid(32);return S(y),await e({...l,__channelId:y})},[i?.mutationFn]);return {...useMutation({...i,mutationFn:t}),data:c}}function un(i){return i?.message?.startsWith("__MISSING AUTH FOR SCOPE")}function hn(i){return i[0]}function _r(i){let S=i?.message?.slice("__MISSING AUTH FOR SCOPE:".length+1).trim()??"",c=JSON.parse(atob(S.split(" ")?.[0])),e=c?.provider,t=c?.scope;return {provider:e,scope:t,isPopup:i?.message?.endsWith("--popup"),accountId:c?.accountId}}var br=60,Er=30*1e3,wt=0,pn=Date.now(),At=false;function Sr(){return rpcClient({transport:async(i,r)=>{let S=Date.now();if(S-pn>=Er)pn=S,wt=0,At=false;else if(wt>=br)throw At||(globalThis.window.dispatchEvent(new Event("rate-limit-exceeded")),At=true),new RpcError("Rate limit exceeded",-32e3,{status:429});wt++;let c="/api/"+i.method,e=i.params&&hn(i.params)?.__channelId;e&&delete hn(i.params)?.__channelId;let t=await fetch(c,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json",...e?{"x-channel-id":e}:{},...globalThis.window.__IS_TESTING__?{"x-is-testing":"true"}:{},"x-boxman-box-id":globalThis.window.__BOX_ID__},body:yt.stringify(i),signal:r});if(!t.ok){let l=t.statusText,y=-32e3;try{let{message:E,code:o}=await t.json();E&&(l=E),o&&(y=o);}catch{}throw l.trim()===""&&(l=`Request failed with status: ${t.status}`),new RpcError(l,y,{status:t.status})}let g=yt.deserialize(await t.json());if(un(g.error)){let l=encodeURIComponent(globalThis.window.location.pathname+globalThis.window.location.search),y=_r(g.error),E=[`returnTo=${l}`,y.provider?`&provider=${y.provider}`:"",y.scope?`&scope=${y.scope.join(",")}`:"",y.accountId?`&accountId=${y.accountId}`:""].filter(Boolean).join("&");if(y.isPopup){globalThis.window.__OPEN_AUTH_DRAWER__(`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}&stripped=true`);return}let o=globalThis.window.top??globalThis.window;return o.location.href=`${globalThis.window.__ROOT_URL__}/setup/${globalThis.window.__APP_ID__}?${E}`,null}return g}})}function Xr(i){return new Promise(r=>{let S=new globalThis.FileReader;S.onload=()=>{r(S.result);},S.readAsDataURL(i);})}function Tr(){let i={...globalThis.window.console};function r(S,c){let e=(0, mn.default)(c,{depth:5,maxStringLength:512,indent:2});fetch("/_logger",{method:"POST",body:`[console.${S.toLowerCase()}] ${e}`}).catch(()=>{});}globalThis.window.console.log=(...S)=>{r("LOG",S),i.log(...S);},globalThis.window.console.error=(...S)=>{r("ERROR",S),i.error(...S);},globalThis.window.console.info=(...S)=>{r("INFO",S),i.info(...S);},globalThis.window.console.warn=(...S)=>{r("WARN",S),i.warn(...S);};}function Ir(){function i(r,S=globalThis.window.parent,c="*"){S?.postMessage({...r,source:"iframe"},{targetOrigin:c});}globalThis.window.addEventListener("message",async r=>{let{origin:S,source:c,data:e}=r,{type:t}=e;if(t==="screenshot"){let g=globalThis.window.getComputedStyle(globalThis.document.body).backgroundColor,l=await gn.default.toPng(globalThis.document.body,{bgcolor:g,style:{transform:"translateY("+-globalThis.window.scrollY+"px)"},width:globalThis.window.innerWidth,height:globalThis.window.innerHeight,copyDefaultStyles:false}),y=await fetch(l).then(n=>n.blob()),E=await re(y,{maxSizeMB:4,maxWidthOrHeight:1920,useWebWorker:false}),a={type:"screenshot",payload:{screenshot:await re.getDataUrlFromFile(E)}};i(a,c,S);}});}function Yr({appId:i,rootUrl:r,baseUrl:S,isTesting:c,realtimeDomain:e,boxId:t}){typeof globalThis.window>"u"||globalThis.window.__APP_ID__||(globalThis.window.__APP_ID__=i,globalThis.window.__ROOT_URL__=r,globalThis.window.__BASE_URL__=S,globalThis.window.__IS_TESTING__=c,globalThis.window.__REALTIME_DOMAIN__=e,globalThis.window.__BOX_ID__=t,Ir(),Tr(),an(),globalThis.window.onerror=function(g){console.error("Global JS error:",g);},globalThis.window.onunhandledrejection=function(g){console.error("Unhandled promise rejection:",g.reason);});}function Jr(){return globalThis.window.__BASE_URL__}/*! Bundled license information:
230
230
 
231
231
  dom-to-image-more/dist/dom-to-image-more.min.js:
232
232
  (*! dom-to-image-more 23-10-2025 *)
@@ -1609,35 +1609,54 @@ declare const coerce: {
1609
1609
  date: (typeof ZodDate)["create"];
1610
1610
  };
1611
1611
  declare const NEVER: never;
1612
- declare const boxmanCronSchema: z.ZodObject<{
1613
- slug: z.ZodString;
1614
- schedule: z.ZodString;
1615
- rpcEndpoint: z.ZodString;
1616
- isEnabled: z.ZodDefault<z.ZodBoolean>;
1617
- stopAt: z.ZodOptional<z.ZodString>;
1618
- maxExecutions: z.ZodOptional<z.ZodNumber>;
1619
- timezone: z.ZodOptional<z.ZodString>;
1612
+ export declare const appConfigSchema: z.ZodObject<{
1613
+ crons: z.ZodArray<z.ZodObject<{
1614
+ slug: z.ZodString;
1615
+ schedule: z.ZodString;
1616
+ rpcEndpoint: z.ZodString;
1617
+ isEnabled: z.ZodDefault<z.ZodBoolean>;
1618
+ stopAt: z.ZodOptional<z.ZodString>;
1619
+ maxExecutions: z.ZodOptional<z.ZodNumber>;
1620
+ timezone: z.ZodOptional<z.ZodString>;
1621
+ }, "strip", z.ZodTypeAny, {
1622
+ slug: string;
1623
+ schedule: string;
1624
+ rpcEndpoint: string;
1625
+ isEnabled: boolean;
1626
+ stopAt?: string | undefined;
1627
+ maxExecutions?: number | undefined;
1628
+ timezone?: string | undefined;
1629
+ }, {
1630
+ slug: string;
1631
+ schedule: string;
1632
+ rpcEndpoint: string;
1633
+ isEnabled?: boolean | undefined;
1634
+ stopAt?: string | undefined;
1635
+ maxExecutions?: number | undefined;
1636
+ timezone?: string | undefined;
1637
+ }>, "many">;
1620
1638
  }, "strip", z.ZodTypeAny, {
1621
- slug: string;
1622
- schedule: string;
1623
- rpcEndpoint: string;
1624
- isEnabled: boolean;
1625
- stopAt?: string | undefined;
1626
- maxExecutions?: number | undefined;
1627
- timezone?: string | undefined;
1639
+ crons: {
1640
+ slug: string;
1641
+ schedule: string;
1642
+ rpcEndpoint: string;
1643
+ isEnabled: boolean;
1644
+ stopAt?: string | undefined;
1645
+ maxExecutions?: number | undefined;
1646
+ timezone?: string | undefined;
1647
+ }[];
1628
1648
  }, {
1629
- slug: string;
1630
- schedule: string;
1631
- rpcEndpoint: string;
1632
- isEnabled?: boolean | undefined;
1633
- stopAt?: string | undefined;
1634
- maxExecutions?: number | undefined;
1635
- timezone?: string | undefined;
1649
+ crons: {
1650
+ slug: string;
1651
+ schedule: string;
1652
+ rpcEndpoint: string;
1653
+ isEnabled?: boolean | undefined;
1654
+ stopAt?: string | undefined;
1655
+ maxExecutions?: number | undefined;
1656
+ timezone?: string | undefined;
1657
+ }[];
1636
1658
  }>;
1637
- export type BoxmanCron = z.infer<typeof boxmanCronSchema>;
1638
- export type AppConfig = {
1639
- crons: BoxmanCron[];
1640
- };
1659
+ export type AppConfig = z.infer<typeof appConfigSchema>;
1641
1660
  declare const AuthProvider: {
1642
1661
  readonly AC1: "AC1";
1643
1662
  readonly GITHUB_USER: "GITHUB_USER";
@@ -3082,12 +3101,16 @@ declare let client: {
3082
3101
  orientation?: "portrait" | "landscape" | undefined;
3083
3102
  scrollToPage?: number | undefined;
3084
3103
  returnPageText?: boolean | undefined;
3104
+ environment?: "development" | "production" | undefined;
3105
+ onBehalfOfCurrentUser?: boolean | undefined;
3085
3106
  };
3086
3107
  _input_out: {
3087
3108
  url: string;
3088
3109
  showClickTargets: boolean;
3089
3110
  orientation: "portrait" | "landscape";
3090
3111
  returnPageText: boolean;
3112
+ environment: "development" | "production";
3113
+ onBehalfOfCurrentUser: boolean;
3091
3114
  clickOnTargetIndex?: number | undefined;
3092
3115
  scrollToPage?: number | undefined;
3093
3116
  };
@@ -3557,6 +3580,103 @@ declare let client: {
3557
3580
  body?: undefined;
3558
3581
  }>>;
3559
3582
  };
3583
+ sendPushNotification: {
3584
+ mutate: _trpc_client.Resolver<_trpc_server.BuildProcedure<"mutation", {
3585
+ _config: _trpc_server.RootConfig<{
3586
+ ctx: {
3587
+ appId: string;
3588
+ versionId: string;
3589
+ appName: string;
3590
+ appSubdomain: string;
3591
+ userId: string;
3592
+ isTesting: boolean;
3593
+ rpcMethod: string;
3594
+ requestId: string;
3595
+ type?: undefined;
3596
+ dbUrl?: string | null | undefined;
3597
+ userIdActual?: string | null | undefined;
3598
+ channelId?: string | null | undefined;
3599
+ } | {
3600
+ type: "BOXMAN_REQUEST";
3601
+ boxId: string;
3602
+ isDevelopment: boolean | null;
3603
+ appId?: string | null | undefined;
3604
+ rpcMethod?: string | null | undefined;
3605
+ requestId?: string | null | undefined;
3606
+ channelId?: string | null | undefined;
3607
+ platformUserId?: string | null | undefined;
3608
+ agent?: string | null | undefined;
3609
+ sessionId?: string | null | undefined;
3610
+ pushToken?: string | null | undefined;
3611
+ };
3612
+ meta: object;
3613
+ errorShape: {
3614
+ data: {
3615
+ zodError: typeToFlattenedError<any, string> | null;
3616
+ code: _trpc_server_rpc.TRPC_ERROR_CODE_KEY;
3617
+ httpStatus: number;
3618
+ path?: string;
3619
+ stack?: string;
3620
+ };
3621
+ message: string;
3622
+ code: _trpc_server_rpc.TRPC_ERROR_CODE_NUMBER;
3623
+ };
3624
+ transformer: typeof superjson;
3625
+ }>;
3626
+ _meta: object;
3627
+ _ctx_out: {
3628
+ type: undefined;
3629
+ appId: string;
3630
+ versionId: string;
3631
+ dbUrl: string | null | undefined;
3632
+ appName: string;
3633
+ appSubdomain: string;
3634
+ userId: string;
3635
+ userIdActual: string | null | undefined;
3636
+ isTesting: boolean;
3637
+ rpcMethod: string;
3638
+ requestId: string;
3639
+ channelId: string | null | undefined;
3640
+ } | {
3641
+ type: "BOXMAN_REQUEST";
3642
+ appId: string | null | undefined;
3643
+ boxId: string;
3644
+ rpcMethod: string | null | undefined;
3645
+ requestId: string | null | undefined;
3646
+ channelId: string | null | undefined;
3647
+ platformUserId: string | null | undefined;
3648
+ isDevelopment: boolean | null;
3649
+ agent: string | null | undefined;
3650
+ sessionId: string | null | undefined;
3651
+ pushToken: string | null | undefined;
3652
+ };
3653
+ _input_in: {
3654
+ body: string;
3655
+ title: string;
3656
+ data?: {
3657
+ appId?: string | undefined;
3658
+ } | undefined;
3659
+ subtitle?: string | undefined;
3660
+ sound?: string | undefined;
3661
+ badge?: number | undefined;
3662
+ };
3663
+ _input_out: {
3664
+ body: string;
3665
+ title: string;
3666
+ data?: {
3667
+ appId?: string | undefined;
3668
+ } | undefined;
3669
+ subtitle?: string | undefined;
3670
+ sound?: string | undefined;
3671
+ badge?: number | undefined;
3672
+ };
3673
+ _output_in: typeof _trpc_server.unsetMarker;
3674
+ _output_out: typeof _trpc_server.unsetMarker;
3675
+ }, {
3676
+ ok: true;
3677
+ ticketCount: number;
3678
+ }>>;
3679
+ };
3560
3680
  health: {
3561
3681
  query: _trpc_client.Resolver<_trpc_server.BuildProcedure<"query", {
3562
3682
  _config: _trpc_server.RootConfig<{
@@ -1,2 +1,2 @@
1
- import {createTRPCProxyClient,httpLink}from'@trpc/client';import {AsyncLocalStorage}from'async_hooks';import y from'superjson';function S(e){let r=Object.create(null);for(let t in e){let n=e[t];r[n]=t;}return r}var w={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};S(w);S(w);typeof window>"u"||"Deno"in window||globalThis.process?.env?.NODE_ENV==="test"||!!globalThis.process?.env?.JEST_WORKER_ID||!!globalThis.process?.env?.VITEST_WORKER_ID;var _=class e extends Error{static prefix="__MISSING AUTH FOR SCOPE";static jsonRpcCode=-32001;constructor({provider:r,scope:t,accountId:n,popup:o=false}){let s=btoa(JSON.stringify({provider:r,scope:t,accountId:n}));super(`${e.prefix}: ${s}${o?" --popup":" end"}`);}jsonRpcError(){return {code:e.jsonRpcCode,message:this.message}}static check(r){return r?.message?.startsWith(e.prefix)}};var z=createTRPCProxyClient({transformer:y,links:[]});function je({baseUrl:e,realtimeDomain:r,guestServicesUrl:t}){globalThis.env||(globalThis.env={},globalThis.env.BASE_URL=e,globalThis.env.REALTIME_DOMAIN=r,globalThis.env.GUEST_SERVICES_URL=t,z=createTRPCProxyClient({transformer:y,links:[httpLink({url:t,transformer:y,headers:()=>{let n=C();if(!n)throw new Error("Missing request context");return {"x-request-id":n.requestId}}})]}),console.log("Adaptive SDK server environment initialized"));}var G=new AsyncLocalStorage,fe=new Proxy({},{get(e,r){return async t=>{if(globalThis.env===void 0)throw new Error("Adaptive SDK server environment is not initialized. Please call initializeServerEnvironment first.");let o=z[r];if(!o||typeof o.mutate!="function")throw new Error(`Property "${String(r)}" is not a mutation procedure`);return o.mutate(t)}}});function C(){return G.getStore()}function Le(e){let r=C();r&&Object.assign(r,e);}async function $e(e,r){return G.run(e,r)}function Ve(){return globalThis.env.BASE_URL}var A=null;function Be(){return A}function Ye({channelId:e,onUpdate:r}){let t=new WebSocket(`wss://${globalThis.env.REALTIME_DOMAIN}/${e}`),n=-1;function o(s){r&&(A=Date.now());try{let i=JSON.parse(s.data.toString());if(i?.id&&i.id>n){let d=y.parse(i.payload);r?.(d),n=i.id;}}catch{}}return t.addEventListener("message",o),{destroy(){t.close(),t.removeEventListener("message",o);}}}async function Y({channelId:e,data:r}){A=Date.now(),await fetch(`https://${globalThis.env.REALTIME_DOMAIN}/${e}`,{method:"POST",body:y.stringify(r)}).catch(console.error);}async function Ke(){let e,r=C()?.channelId;if(!r)throw new Error("API's using `startRealtimeResponse` must be called via `useRealtimeMutation`.");return {next(t){e=t,Y({channelId:r,data:t});},end(){return Y({channelId:r,data:e}),e}}}function K(e){throw new _({provider:"AC1",popup:true})}async function He(e){let r=await fe.getCurrentUser();if(r?.error==="SEED")throw new Error('Call to "getAuth" in seed function is not allowed. Seed functions should not depend on user data.');if(r.userId)return {userId:r.userId,status:"authenticated",signIn:K,providers:r.providers};if(e?.required)throw new _({provider:"AC1"});return {userId:null,status:"unauthenticated",signIn:K,providers:[]}}
2
- export{He as getAuth,Ve as getBaseUrl,Be as getLastStreamTime,Ye as getRealtimeStore,C as getRequestContext,je as initializeServerEnvironment,fe as mcp,$e as runWithContext,Y as setRealtimeStore,Le as setRequestContext,Ke as startRealtimeResponse};
1
+ import {z as z$1}from'zod';import {createTRPCProxyClient,httpLink}from'@trpc/client';import {AsyncLocalStorage}from'async_hooks';import _ from'superjson';var W=z$1.object({slug:z$1.string(),schedule:z$1.string(),rpcEndpoint:z$1.string(),isEnabled:z$1.boolean().default(true),stopAt:z$1.string().datetime().optional(),maxExecutions:z$1.number().optional(),timezone:z$1.string().optional()}),J=z$1.object({crons:z$1.array(W)});function v(e){let r=Object.create(null);for(let t in e){let n=e[t];r[n]=t;}return r}var h={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};v(h);v(h);typeof window>"u"||"Deno"in window||globalThis.process?.env?.NODE_ENV==="test"||!!globalThis.process?.env?.JEST_WORKER_ID||!!globalThis.process?.env?.VITEST_WORKER_ID;var g=class e extends Error{static prefix="__MISSING AUTH FOR SCOPE";static jsonRpcCode=-32001;constructor({provider:r,scope:t,accountId:n,popup:o=false}){let s=btoa(JSON.stringify({provider:r,scope:t,accountId:n}));super(`${e.prefix}: ${s}${o?" --popup":" end"}`);}jsonRpcError(){return {code:e.jsonRpcCode,message:this.message}}static check(r){return r?.message?.startsWith(e.prefix)}};var G=createTRPCProxyClient({transformer:_,links:[]});function ze({baseUrl:e,realtimeDomain:r,guestServicesUrl:t}){globalThis.env||(globalThis.env={},globalThis.env.BASE_URL=e,globalThis.env.REALTIME_DOMAIN=r,globalThis.env.GUEST_SERVICES_URL=t,G=createTRPCProxyClient({transformer:_,links:[httpLink({url:t,transformer:_,headers:()=>{let n=A();if(!n)throw new Error("Missing request context");return {"x-request-id":n.requestId}}})]}),console.log("Adaptive SDK server environment initialized"));}var Q=new AsyncLocalStorage,me=new Proxy({},{get(e,r){return async t=>{if(globalThis.env===void 0)throw new Error("Adaptive SDK server environment is not initialized. Please call initializeServerEnvironment first.");let o=G[r];if(!o||typeof o.mutate!="function")throw new Error(`Property "${String(r)}" is not a mutation procedure`);return o.mutate(t)}}});function A(){return Q.getStore()}function Ke(e){let r=A();r&&Object.assign(r,e);}async function He(e,r){return Q.run(e,r)}function Ge(){return globalThis.env.BASE_URL}var N=null;function Qe(){return N}function We({channelId:e,onUpdate:r}){let t=new WebSocket(`wss://${globalThis.env.REALTIME_DOMAIN}/${e}`),n=-1;function o(s){r&&(N=Date.now());try{let i=JSON.parse(s.data.toString());if(i?.id&&i.id>n){let d=_.parse(i.payload);r?.(d),n=i.id;}}catch{}}return t.addEventListener("message",o),{destroy(){t.close(),t.removeEventListener("message",o);}}}async function z({channelId:e,data:r}){N=Date.now(),await fetch(`https://${globalThis.env.REALTIME_DOMAIN}/${e}`,{method:"POST",body:_.stringify(r)}).catch(console.error);}async function Je(){let e,r=A()?.channelId;if(!r)throw new Error("API's using `startRealtimeResponse` must be called via `useRealtimeMutation`.");return {next(t){e=t,z({channelId:r,data:t});},end(){return z({channelId:r,data:e}),e}}}function K(e){throw new g({provider:"AC1",popup:true})}async function Ze(e){let r=await me.getCurrentUser();if(r?.error==="SEED")throw new Error('Call to "getAuth" in seed function is not allowed. Seed functions should not depend on user data.');if(r.userId)return {userId:r.userId,status:"authenticated",signIn:K,providers:r.providers};if(e?.required)throw new g({provider:"AC1"});return {userId:null,status:"unauthenticated",signIn:K,providers:[]}}
2
+ export{J as appConfigSchema,Ze as getAuth,Ge as getBaseUrl,Qe as getLastStreamTime,We as getRealtimeStore,A as getRequestContext,ze as initializeServerEnvironment,me as mcp,He as runWithContext,z as setRealtimeStore,Ke as setRequestContext,Je as startRealtimeResponse};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptive-ai/sdk",
3
- "version": "0.1.16",
3
+ "version": "0.1.18",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {