diff --git a/404.html b/404.html
index 3c268d3..05aaf6c 100644
--- a/404.html
+++ b/404.html
@@ -38,7 +38,7 @@
-
+
diff --git a/assets/index.142cec87.js b/assets/index.429f2611.js
similarity index 99%
rename from assets/index.142cec87.js
rename to assets/index.429f2611.js
index 2638153..aaeb843 100644
--- a/assets/index.142cec87.js
+++ b/assets/index.429f2611.js
@@ -1,4 +1,4 @@
-import{g as HI}from"./index.ab1a215a.js";function sI(S,t){for(var L=0;Ln[f]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var FB={},uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.normalize=void 0;const tA=47,GB=46,KI=(S,t)=>{let L="",n=0,f=-1,G=0,u;for(let T=0;T<=S.length;++T){if(T2){const v=L.lastIndexOf("/");if(v!==L.length-1){v===-1?(L="",n=0):(L=L.slice(0,v),n=L.length-1-L.lastIndexOf("/")),f=T,G=0;continue}}else if(L.length===2||L.length===1){L="",n=0,f=T,G=0;continue}}t&&(L.length>0?L+="/..":L="..",n=2)}else L.length>0?L+="/"+S.slice(f+1,T):L=S.slice(f+1,T),n=T-f-1;f=T,G=0}else u===GB&&G!==-1?++G:G=-1}return L},LI=S=>{let t=S;if(t.length===0)return".";const L=t.charCodeAt(0)===tA,n=t.charCodeAt(t.length-1)===tA;return t=KI(t,!L),t.length===0&&!L&&(t="."),t.length>0&&n&&(t+="/"),L?"/"+t:t};uA.normalize=LI;var PA={};Object.defineProperty(PA,"__esModule",{value:!0});PA.base64Decode=void 0;function VI(S){return S>64&&S<91?S-65:S>96&&S<123?S-71:S>47&&S<58?S+4:S===43?62:S===47?63:0}function ZI(S){const t=S.replace(/[^A-Za-z0-9+/]/g,""),L=t.length,n=L*3+1>>2,f=new Uint8Array(n);let G,u,T=0,v=0;for(let _=0;_>>(16>>>G&24)&255,G++,v++;T=0}return f}PA.base64Decode=ZI;var _A={},$B={exports:{}};(function(S,t){var L=(()=>{var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f){f=f||{};var G=typeof f<"u"?f:{},u,T;G.ready=new Promise(function(A,B){u=A,T=B});var v=Object.assign({},G),_="./this.program",WA=(A,B)=>{throw B},z=!0,b="";function $(A){return G.locateFile?G.locateFile(A,b):b+A}var r,RA,NA;typeof document<"u"&&document.currentScript&&(b=document.currentScript.src),n&&(b=n),b.indexOf("blob:")!==0?b=b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):b="",r=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.send(null),B.responseText},RA=(A,B,g)=>{var Q=new XMLHttpRequest;Q.open("GET",A,!0),Q.responseType="arraybuffer",Q.onload=()=>{if(Q.status==200||Q.status==0&&Q.response){B(Q.response);return}g()},Q.onerror=g,Q.send(null)};var wA=G.print||console.log.bind(console),p=G.printErr||console.warn.bind(console);Object.assign(G,v),v=null,G.arguments&&G.arguments,G.thisProgram&&(_=G.thisProgram),G.quit&&(WA=G.quit);var AA;G.wasmBinary&&(AA=G.wasmBinary);var dA=G.noExitRuntime||!0;typeof WebAssembly!="object"&&oA("no native wasm support detected");var HA,sA=!1;function $A(A,B){A||oA(B)}var mA=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function CA(A,B,g){for(var Q=B+g,C=B;A[C]&&!(C>=Q);)++C;if(C-B>16&&A.buffer&&mA)return mA.decode(A.subarray(B,C));for(var E="";B>10,56320|o&1023)}}return E}function GA(A,B){return A?CA(gA,A,B):""}function aA(A,B,g,Q){if(!(Q>0))return 0;for(var C=g,E=g+Q-1,D=0;D=55296&&N<=57343){var F=A.charCodeAt(++D);N=65536+((N&1023)<<10)|F&1023}if(N<=127){if(g>=E)break;B[g++]=N}else if(N<=2047){if(g+1>=E)break;B[g++]=192|N>>6,B[g++]=128|N&63}else if(N<=65535){if(g+2>=E)break;B[g++]=224|N>>12,B[g++]=128|N>>6&63,B[g++]=128|N&63}else{if(g+3>=E)break;B[g++]=240|N>>18,B[g++]=128|N>>12&63,B[g++]=128|N>>6&63,B[g++]=128|N&63}}return B[g]=0,g-C}function KA(A,B,g){return aA(A,gA,B,g)}function e(A){for(var B=0,g=0;g=55296&&Q<=57343?(B+=4,++g):B+=3}return B}var FA,W,gA,hA,R,d,MA,kA;function Ag(A){FA=A,G.HEAP8=W=new Int8Array(A),G.HEAP16=hA=new Int16Array(A),G.HEAP32=R=new Int32Array(A),G.HEAPU8=gA=new Uint8Array(A),G.HEAPU16=new Uint16Array(A),G.HEAPU32=d=new Uint32Array(A),G.HEAPF32=MA=new Float32Array(A),G.HEAPF64=kA=new Float64Array(A)}G.INITIAL_MEMORY;var LA,oB=[],UB=[],YB=[];function Bg(){return dA}function gg(){if(G.preRun)for(typeof G.preRun=="function"&&(G.preRun=[G.preRun]);G.preRun.length;)Cg(G.preRun.shift());AB(oB)}function Qg(){!G.noFSInit&&!I.init.initialized&&I.init(),I.ignorePermissions=!1,AB(UB)}function Ig(){if(G.postRun)for(typeof G.postRun=="function"&&(G.postRun=[G.postRun]);G.postRun.length;)Dg(G.postRun.shift());AB(YB)}function Cg(A){oB.unshift(A)}function Eg(A){UB.unshift(A)}function Dg(A){YB.unshift(A)}var SA=0,jA=null;function mI(A){return A}function TA(A){SA++,G.monitorRunDependencies&&G.monitorRunDependencies(SA)}function lA(A){if(SA--,G.monitorRunDependencies&&G.monitorRunDependencies(SA),SA==0&&jA){var B=jA;jA=null,B()}}function oA(A){G.onAbort&&G.onAbort(A),A="Aborted("+A+")",p(A),sA=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw T(B),B}var Ng="data:application/octet-stream;base64,";function iB(A){return A.startsWith(Ng)}var QA;QA="funcfiftlib.wasm",iB(QA)||(QA=$(QA));function RB(A){try{if(A==QA&&AA)return new Uint8Array(AA);throw"both async and sync fetching of the wasm failed"}catch(B){oA(B)}}function Gg(){return!AA&&z&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()}).catch(function(){return RB(QA)}):Promise.resolve().then(function(){return RB(QA)})}function Fg(){var A={a:bQ};function B(D,N){var F=D.exports;G.asm=F,HA=G.asm.Ea,Ag(HA.buffer),LA=G.asm.Ia,Eg(G.asm.Fa),lA()}TA();function g(D){B(D.instance)}function Q(D){return Gg().then(function(N){return WebAssembly.instantiate(N,A)}).then(function(N){return N}).then(D,function(N){p("failed to asynchronously prepare wasm: "+N),oA(N)})}function C(){return!AA&&typeof WebAssembly.instantiateStreaming=="function"&&!iB(QA)&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(D){var N=WebAssembly.instantiateStreaming(D,A);return N.then(g,function(F){return p("wasm streaming compile failed: "+F),p("falling back to ArrayBuffer instantiation"),Q(g)})}):Q(g)}if(G.instantiateWasm)try{var E=G.instantiateWasm(A,B);return E}catch(D){return p("Module.instantiateWasm callback failed with error: "+D),!1}return C().catch(T),{}}var M,X,og={567360:A=>{throw GA(A)}};function Ug(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function AB(A){for(;A.length>0;)A.shift()(G)}function Yg(){var A=new Error;if(!A.stack){try{throw new Error}catch(B){A=B}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function ig(A,B,g="i8"){switch(g.endsWith("*")&&(g="*"),g){case"i1":W[A>>0]=B;break;case"i8":W[A>>0]=B;break;case"i16":hA[A>>1]=B;break;case"i32":R[A>>2]=B;break;case"i64":X=[B>>>0,(M=B,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[A>>2]=X[0],R[A+4>>2]=X[1];break;case"float":MA[A>>2]=B;break;case"double":kA[A>>3]=B;break;case"*":d[A>>2]=B;break;default:oA("invalid type for setValue: "+g)}}function wB(A,B){W.set(A,B)}function Rg(A){return EB(A+24)+24}var pA=[];function wg(A){A.add_ref()}var nA=0;function hg(A){var B=new JA(A);return B.get_caught()||(B.set_caught(!0),nA--),B.set_rethrown(!1),pA.push(B),wg(B),B.get_exception_ptr()}var UA=0;function JA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(B){d[this.ptr+4>>2]=B},this.get_type=function(){return d[this.ptr+4>>2]},this.set_destructor=function(B){d[this.ptr+8>>2]=B},this.get_destructor=function(){return d[this.ptr+8>>2]},this.set_refcount=function(B){R[this.ptr>>2]=B},this.set_caught=function(B){B=B?1:0,W[this.ptr+12>>0]=B},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(B){B=B?1:0,W[this.ptr+13>>0]=B},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(B,g){this.set_adjusted_ptr(0),this.set_type(B),this.set_destructor(g),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var B=R[this.ptr>>2];R[this.ptr>>2]=B+1},this.release_ref=function(){var B=R[this.ptr>>2];return R[this.ptr>>2]=B-1,B===1},this.set_adjusted_ptr=function(B){d[this.ptr+16>>2]=B},this.get_adjusted_ptr=function(){return d[this.ptr+16>>2]},this.get_exception_ptr=function(){var B=xB(this.get_type());if(B)return d[this.excPtr>>2];var g=this.get_adjusted_ptr();return g!==0?g:this.excPtr}}function hB(A){try{return jB(new JA(A).ptr)}catch{}}function l(A){return LA.get(A)}function kg(A){if(A.release_ref()&&!A.get_rethrown()){var B=A.get_destructor();B&&l(B)(A.excPtr),hB(A.excPtr)}}function yg(){H(0);var A=pA.pop();kg(A),UA=0}function ag(A){throw UA||(UA=A),A}function Mg(){var A=UA;if(!A)return O(0),0;var B=new JA(A);B.set_adjusted_ptr(A);var g=B.get_type();if(!g)return O(0),A;for(var Q=Array.prototype.slice.call(arguments),C=0;C>2]=A,A}var m={isAbs:A=>A.charAt(0)==="/",splitPath:A=>{var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return B.exec(A).slice(1)},normalizeArray:(A,B)=>{for(var g=0,Q=A.length-1;Q>=0;Q--){var C=A[Q];C==="."?A.splice(Q,1):C===".."?(A.splice(Q,1),g++):g&&(A.splice(Q,1),g--)}if(B)for(;g;g--)A.unshift("..");return A},normalize:A=>{var B=m.isAbs(A),g=A.substr(-1)==="/";return A=m.normalizeArray(A.split("/").filter(Q=>!!Q),!B).join("/"),!A&&!B&&(A="."),A&&g&&(A+="/"),(B?"/":"")+A},dirname:A=>{var B=m.splitPath(A),g=B[0],Q=B[1];return!g&&!Q?".":(Q&&(Q=Q.substr(0,Q.length-1)),g+Q)},basename:A=>{if(A==="/")return"/";A=m.normalize(A),A=A.replace(/\/$/,"");var B=A.lastIndexOf("/");return B===-1?A:A.substr(B+1)},join:function(){var A=Array.prototype.slice.call(arguments,0);return m.normalize(A.join("/"))},join2:(A,B)=>m.normalize(A+"/"+B)};function Vg(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var A=new Uint8Array(1);return()=>(crypto.getRandomValues(A),A[0])}else return()=>oA("randomDevice")}var YA={resolve:function(){for(var A="",B=!1,g=arguments.length-1;g>=-1&&!B;g--){var Q=g>=0?arguments[g]:I.cwd();if(typeof Q!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!Q)return"";A=Q+"/"+A,B=m.isAbs(Q)}return A=m.normalizeArray(A.split("/").filter(C=>!!C),!B).join("/"),(B?"/":"")+A||"."},relative:(A,B)=>{A=YA.resolve(A).substr(1),B=YA.resolve(B).substr(1);function g(o){for(var h=0;h=0&&o[y]==="";y--);return h>y?[]:o.slice(h,y-h+1)}for(var Q=g(A.split("/")),C=g(B.split("/")),E=Math.min(Q.length,C.length),D=E,N=0;N0?g:e(A)+1,C=new Array(Q),E=aA(A,C,0,C.length);return B&&(C.length=E),C}var cA={ttys:[],init:function(){},shutdown:function(){},register:function(A,B){cA.ttys[A]={input:[],output:[],ops:B},I.registerDevice(A,cA.stream_ops)},stream_ops:{open:function(A){var B=cA.ttys[A.node.rdev];if(!B)throw new I.ErrnoError(43);A.tty=B,A.seekable=!1},close:function(A){A.tty.ops.fsync(A.tty)},fsync:function(A){A.tty.ops.fsync(A.tty)},read:function(A,B,g,Q,C){if(!A.tty||!A.tty.ops.get_char)throw new I.ErrnoError(60);for(var E=0,D=0;Dn[f]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var FB={},uA={};Object.defineProperty(uA,"__esModule",{value:!0});uA.normalize=void 0;const tA=47,GB=46,KI=(S,t)=>{let L="",n=0,f=-1,G=0,u;for(let T=0;T<=S.length;++T){if(T2){const v=L.lastIndexOf("/");if(v!==L.length-1){v===-1?(L="",n=0):(L=L.slice(0,v),n=L.length-1-L.lastIndexOf("/")),f=T,G=0;continue}}else if(L.length===2||L.length===1){L="",n=0,f=T,G=0;continue}}t&&(L.length>0?L+="/..":L="..",n=2)}else L.length>0?L+="/"+S.slice(f+1,T):L=S.slice(f+1,T),n=T-f-1;f=T,G=0}else u===GB&&G!==-1?++G:G=-1}return L},LI=S=>{let t=S;if(t.length===0)return".";const L=t.charCodeAt(0)===tA,n=t.charCodeAt(t.length-1)===tA;return t=KI(t,!L),t.length===0&&!L&&(t="."),t.length>0&&n&&(t+="/"),L?"/"+t:t};uA.normalize=LI;var PA={};Object.defineProperty(PA,"__esModule",{value:!0});PA.base64Decode=void 0;function VI(S){return S>64&&S<91?S-65:S>96&&S<123?S-71:S>47&&S<58?S+4:S===43?62:S===47?63:0}function ZI(S){const t=S.replace(/[^A-Za-z0-9+/]/g,""),L=t.length,n=L*3+1>>2,f=new Uint8Array(n);let G,u,T=0,v=0;for(let _=0;_>>(16>>>G&24)&255,G++,v++;T=0}return f}PA.base64Decode=ZI;var _A={},$B={exports:{}};(function(S,t){var L=(()=>{var n=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f){f=f||{};var G=typeof f<"u"?f:{},u,T;G.ready=new Promise(function(A,B){u=A,T=B});var v=Object.assign({},G),_="./this.program",WA=(A,B)=>{throw B},z=!0,b="";function $(A){return G.locateFile?G.locateFile(A,b):b+A}var r,RA,NA;typeof document<"u"&&document.currentScript&&(b=document.currentScript.src),n&&(b=n),b.indexOf("blob:")!==0?b=b.substr(0,b.replace(/[?#].*/,"").lastIndexOf("/")+1):b="",r=A=>{var B=new XMLHttpRequest;return B.open("GET",A,!1),B.send(null),B.responseText},RA=(A,B,g)=>{var Q=new XMLHttpRequest;Q.open("GET",A,!0),Q.responseType="arraybuffer",Q.onload=()=>{if(Q.status==200||Q.status==0&&Q.response){B(Q.response);return}g()},Q.onerror=g,Q.send(null)};var wA=G.print||console.log.bind(console),p=G.printErr||console.warn.bind(console);Object.assign(G,v),v=null,G.arguments&&G.arguments,G.thisProgram&&(_=G.thisProgram),G.quit&&(WA=G.quit);var AA;G.wasmBinary&&(AA=G.wasmBinary);var dA=G.noExitRuntime||!0;typeof WebAssembly!="object"&&oA("no native wasm support detected");var HA,sA=!1;function $A(A,B){A||oA(B)}var mA=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function CA(A,B,g){for(var Q=B+g,C=B;A[C]&&!(C>=Q);)++C;if(C-B>16&&A.buffer&&mA)return mA.decode(A.subarray(B,C));for(var E="";B>10,56320|o&1023)}}return E}function GA(A,B){return A?CA(gA,A,B):""}function aA(A,B,g,Q){if(!(Q>0))return 0;for(var C=g,E=g+Q-1,D=0;D=55296&&N<=57343){var F=A.charCodeAt(++D);N=65536+((N&1023)<<10)|F&1023}if(N<=127){if(g>=E)break;B[g++]=N}else if(N<=2047){if(g+1>=E)break;B[g++]=192|N>>6,B[g++]=128|N&63}else if(N<=65535){if(g+2>=E)break;B[g++]=224|N>>12,B[g++]=128|N>>6&63,B[g++]=128|N&63}else{if(g+3>=E)break;B[g++]=240|N>>18,B[g++]=128|N>>12&63,B[g++]=128|N>>6&63,B[g++]=128|N&63}}return B[g]=0,g-C}function KA(A,B,g){return aA(A,gA,B,g)}function e(A){for(var B=0,g=0;g=55296&&Q<=57343?(B+=4,++g):B+=3}return B}var FA,W,gA,hA,R,d,MA,kA;function Ag(A){FA=A,G.HEAP8=W=new Int8Array(A),G.HEAP16=hA=new Int16Array(A),G.HEAP32=R=new Int32Array(A),G.HEAPU8=gA=new Uint8Array(A),G.HEAPU16=new Uint16Array(A),G.HEAPU32=d=new Uint32Array(A),G.HEAPF32=MA=new Float32Array(A),G.HEAPF64=kA=new Float64Array(A)}G.INITIAL_MEMORY;var LA,oB=[],UB=[],YB=[];function Bg(){return dA}function gg(){if(G.preRun)for(typeof G.preRun=="function"&&(G.preRun=[G.preRun]);G.preRun.length;)Cg(G.preRun.shift());AB(oB)}function Qg(){!G.noFSInit&&!I.init.initialized&&I.init(),I.ignorePermissions=!1,AB(UB)}function Ig(){if(G.postRun)for(typeof G.postRun=="function"&&(G.postRun=[G.postRun]);G.postRun.length;)Dg(G.postRun.shift());AB(YB)}function Cg(A){oB.unshift(A)}function Eg(A){UB.unshift(A)}function Dg(A){YB.unshift(A)}var SA=0,jA=null;function mI(A){return A}function TA(A){SA++,G.monitorRunDependencies&&G.monitorRunDependencies(SA)}function lA(A){if(SA--,G.monitorRunDependencies&&G.monitorRunDependencies(SA),SA==0&&jA){var B=jA;jA=null,B()}}function oA(A){G.onAbort&&G.onAbort(A),A="Aborted("+A+")",p(A),sA=!0,A+=". Build with -sASSERTIONS for more info.";var B=new WebAssembly.RuntimeError(A);throw T(B),B}var Ng="data:application/octet-stream;base64,";function iB(A){return A.startsWith(Ng)}var QA;QA="funcfiftlib.wasm",iB(QA)||(QA=$(QA));function RB(A){try{if(A==QA&&AA)return new Uint8Array(AA);throw"both async and sync fetching of the wasm failed"}catch(B){oA(B)}}function Gg(){return!AA&&z&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(A){if(!A.ok)throw"failed to load wasm binary file at '"+QA+"'";return A.arrayBuffer()}).catch(function(){return RB(QA)}):Promise.resolve().then(function(){return RB(QA)})}function Fg(){var A={a:bQ};function B(D,N){var F=D.exports;G.asm=F,HA=G.asm.Ea,Ag(HA.buffer),LA=G.asm.Ia,Eg(G.asm.Fa),lA()}TA();function g(D){B(D.instance)}function Q(D){return Gg().then(function(N){return WebAssembly.instantiate(N,A)}).then(function(N){return N}).then(D,function(N){p("failed to asynchronously prepare wasm: "+N),oA(N)})}function C(){return!AA&&typeof WebAssembly.instantiateStreaming=="function"&&!iB(QA)&&typeof fetch=="function"?fetch(QA,{credentials:"same-origin"}).then(function(D){var N=WebAssembly.instantiateStreaming(D,A);return N.then(g,function(F){return p("wasm streaming compile failed: "+F),p("falling back to ArrayBuffer instantiation"),Q(g)})}):Q(g)}if(G.instantiateWasm)try{var E=G.instantiateWasm(A,B);return E}catch(D){return p("Module.instantiateWasm callback failed with error: "+D),!1}return C().catch(T),{}}var M,X,og={567360:A=>{throw GA(A)}};function Ug(A){this.name="ExitStatus",this.message="Program terminated with exit("+A+")",this.status=A}function AB(A){for(;A.length>0;)A.shift()(G)}function Yg(){var A=new Error;if(!A.stack){try{throw new Error}catch(B){A=B}if(!A.stack)return"(no stack trace available)"}return A.stack.toString()}function ig(A,B,g="i8"){switch(g.endsWith("*")&&(g="*"),g){case"i1":W[A>>0]=B;break;case"i8":W[A>>0]=B;break;case"i16":hA[A>>1]=B;break;case"i32":R[A>>2]=B;break;case"i64":X=[B>>>0,(M=B,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[A>>2]=X[0],R[A+4>>2]=X[1];break;case"float":MA[A>>2]=B;break;case"double":kA[A>>3]=B;break;case"*":d[A>>2]=B;break;default:oA("invalid type for setValue: "+g)}}function wB(A,B){W.set(A,B)}function Rg(A){return EB(A+24)+24}var pA=[];function wg(A){A.add_ref()}var nA=0;function hg(A){var B=new JA(A);return B.get_caught()||(B.set_caught(!0),nA--),B.set_rethrown(!1),pA.push(B),wg(B),B.get_exception_ptr()}var UA=0;function JA(A){this.excPtr=A,this.ptr=A-24,this.set_type=function(B){d[this.ptr+4>>2]=B},this.get_type=function(){return d[this.ptr+4>>2]},this.set_destructor=function(B){d[this.ptr+8>>2]=B},this.get_destructor=function(){return d[this.ptr+8>>2]},this.set_refcount=function(B){R[this.ptr>>2]=B},this.set_caught=function(B){B=B?1:0,W[this.ptr+12>>0]=B},this.get_caught=function(){return W[this.ptr+12>>0]!=0},this.set_rethrown=function(B){B=B?1:0,W[this.ptr+13>>0]=B},this.get_rethrown=function(){return W[this.ptr+13>>0]!=0},this.init=function(B,g){this.set_adjusted_ptr(0),this.set_type(B),this.set_destructor(g),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var B=R[this.ptr>>2];R[this.ptr>>2]=B+1},this.release_ref=function(){var B=R[this.ptr>>2];return R[this.ptr>>2]=B-1,B===1},this.set_adjusted_ptr=function(B){d[this.ptr+16>>2]=B},this.get_adjusted_ptr=function(){return d[this.ptr+16>>2]},this.get_exception_ptr=function(){var B=xB(this.get_type());if(B)return d[this.excPtr>>2];var g=this.get_adjusted_ptr();return g!==0?g:this.excPtr}}function hB(A){try{return jB(new JA(A).ptr)}catch{}}function l(A){return LA.get(A)}function kg(A){if(A.release_ref()&&!A.get_rethrown()){var B=A.get_destructor();B&&l(B)(A.excPtr),hB(A.excPtr)}}function yg(){H(0);var A=pA.pop();kg(A),UA=0}function ag(A){throw UA||(UA=A),A}function Mg(){var A=UA;if(!A)return O(0),0;var B=new JA(A);B.set_adjusted_ptr(A);var g=B.get_type();if(!g)return O(0),A;for(var Q=Array.prototype.slice.call(arguments),C=0;C>2]=A,A}var m={isAbs:A=>A.charAt(0)==="/",splitPath:A=>{var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return B.exec(A).slice(1)},normalizeArray:(A,B)=>{for(var g=0,Q=A.length-1;Q>=0;Q--){var C=A[Q];C==="."?A.splice(Q,1):C===".."?(A.splice(Q,1),g++):g&&(A.splice(Q,1),g--)}if(B)for(;g;g--)A.unshift("..");return A},normalize:A=>{var B=m.isAbs(A),g=A.substr(-1)==="/";return A=m.normalizeArray(A.split("/").filter(Q=>!!Q),!B).join("/"),!A&&!B&&(A="."),A&&g&&(A+="/"),(B?"/":"")+A},dirname:A=>{var B=m.splitPath(A),g=B[0],Q=B[1];return!g&&!Q?".":(Q&&(Q=Q.substr(0,Q.length-1)),g+Q)},basename:A=>{if(A==="/")return"/";A=m.normalize(A),A=A.replace(/\/$/,"");var B=A.lastIndexOf("/");return B===-1?A:A.substr(B+1)},join:function(){var A=Array.prototype.slice.call(arguments,0);return m.normalize(A.join("/"))},join2:(A,B)=>m.normalize(A+"/"+B)};function Vg(){if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function"){var A=new Uint8Array(1);return()=>(crypto.getRandomValues(A),A[0])}else return()=>oA("randomDevice")}var YA={resolve:function(){for(var A="",B=!1,g=arguments.length-1;g>=-1&&!B;g--){var Q=g>=0?arguments[g]:I.cwd();if(typeof Q!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!Q)return"";A=Q+"/"+A,B=m.isAbs(Q)}return A=m.normalizeArray(A.split("/").filter(C=>!!C),!B).join("/"),(B?"/":"")+A||"."},relative:(A,B)=>{A=YA.resolve(A).substr(1),B=YA.resolve(B).substr(1);function g(o){for(var h=0;h=0&&o[y]==="";y--);return h>y?[]:o.slice(h,y-h+1)}for(var Q=g(A.split("/")),C=g(B.split("/")),E=Math.min(Q.length,C.length),D=E,N=0;N0?g:e(A)+1,C=new Array(Q),E=aA(A,C,0,C.length);return B&&(C.length=E),C}var cA={ttys:[],init:function(){},shutdown:function(){},register:function(A,B){cA.ttys[A]={input:[],output:[],ops:B},I.registerDevice(A,cA.stream_ops)},stream_ops:{open:function(A){var B=cA.ttys[A.node.rdev];if(!B)throw new I.ErrnoError(43);A.tty=B,A.seekable=!1},close:function(A){A.tty.ops.fsync(A.tty)},fsync:function(A){A.tty.ops.fsync(A.tty)},read:function(A,B,g,Q,C){if(!A.tty||!A.tty.ops.get_char)throw new I.ErrnoError(60);for(var E=0,D=0;D0&&(wA(CA(A.output,0)),A.output=[])}},default_tty1_ops:{put_char:function(A,B){B===null||B===10?(p(CA(A.output,0)),A.output=[]):B!=0&&A.output.push(B)},fsync:function(A){A.output&&A.output.length>0&&(p(CA(A.output,0)),A.output=[])}}};function Zg(A,B){gA.fill(0,A,A+B)}function Wg(A,B){return Math.ceil(A/B)*B}function kB(A){A=Wg(A,65536);var B=qB(65536,A);return B?(Zg(B,A),B):0}var J={ops_table:null,mount:function(A){return J.createNode(null,"/",16895,0)},createNode:function(A,B,g,Q){if(I.isBlkdev(g)||I.isFIFO(g))throw new I.ErrnoError(63);J.ops_table||(J.ops_table={dir:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr,lookup:J.node_ops.lookup,mknod:J.node_ops.mknod,rename:J.node_ops.rename,unlink:J.node_ops.unlink,rmdir:J.node_ops.rmdir,readdir:J.node_ops.readdir,symlink:J.node_ops.symlink},stream:{llseek:J.stream_ops.llseek}},file:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr},stream:{llseek:J.stream_ops.llseek,read:J.stream_ops.read,write:J.stream_ops.write,allocate:J.stream_ops.allocate,mmap:J.stream_ops.mmap,msync:J.stream_ops.msync}},link:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr,readlink:J.node_ops.readlink},stream:{}},chrdev:{node:{getattr:J.node_ops.getattr,setattr:J.node_ops.setattr},stream:I.chrdev_stream_ops}});var C=I.createNode(A,B,g,Q);return I.isDir(C.mode)?(C.node_ops=J.ops_table.dir.node,C.stream_ops=J.ops_table.dir.stream,C.contents={}):I.isFile(C.mode)?(C.node_ops=J.ops_table.file.node,C.stream_ops=J.ops_table.file.stream,C.usedBytes=0,C.contents=null):I.isLink(C.mode)?(C.node_ops=J.ops_table.link.node,C.stream_ops=J.ops_table.link.stream):I.isChrdev(C.mode)&&(C.node_ops=J.ops_table.chrdev.node,C.stream_ops=J.ops_table.chrdev.stream),C.timestamp=Date.now(),A&&(A.contents[B]=C,A.timestamp=C.timestamp),C},getFileDataAsTypedArray:function(A){return A.contents?A.contents.subarray?A.contents.subarray(0,A.usedBytes):new Uint8Array(A.contents):new Uint8Array(0)},expandFileStorage:function(A,B){var g=A.contents?A.contents.length:0;if(!(g>=B)){var Q=1024*1024;B=Math.max(B,g*(g>>0),g!=0&&(B=Math.max(B,256));var C=A.contents;A.contents=new Uint8Array(B),A.usedBytes>0&&A.contents.set(C.subarray(0,A.usedBytes),0)}},resizeFileStorage:function(A,B){if(A.usedBytes!=B)if(B==0)A.contents=null,A.usedBytes=0;else{var g=A.contents;A.contents=new Uint8Array(B),g&&A.contents.set(g.subarray(0,Math.min(B,A.usedBytes))),A.usedBytes=B}},node_ops:{getattr:function(A){var B={};return B.dev=I.isChrdev(A.mode)?A.id:1,B.ino=A.id,B.mode=A.mode,B.nlink=1,B.uid=0,B.gid=0,B.rdev=A.rdev,I.isDir(A.mode)?B.size=4096:I.isFile(A.mode)?B.size=A.usedBytes:I.isLink(A.mode)?B.size=A.link.length:B.size=0,B.atime=new Date(A.timestamp),B.mtime=new Date(A.timestamp),B.ctime=new Date(A.timestamp),B.blksize=4096,B.blocks=Math.ceil(B.size/B.blksize),B},setattr:function(A,B){B.mode!==void 0&&(A.mode=B.mode),B.timestamp!==void 0&&(A.timestamp=B.timestamp),B.size!==void 0&&J.resizeFileStorage(A,B.size)},lookup:function(A,B){throw I.genericErrors[44]},mknod:function(A,B,g,Q){return J.createNode(A,B,g,Q)},rename:function(A,B,g){if(I.isDir(A.mode)){var Q;try{Q=I.lookupNode(B,g)}catch{}if(Q)for(var C in Q.contents)throw new I.ErrnoError(55)}delete A.parent.contents[A.name],A.parent.timestamp=Date.now(),A.name=g,B.contents[g]=A,B.timestamp=A.parent.timestamp,A.parent=B},unlink:function(A,B){delete A.contents[B],A.timestamp=Date.now()},rmdir:function(A,B){var g=I.lookupNode(A,B);for(var Q in g.contents)throw new I.ErrnoError(55);delete A.contents[B],A.timestamp=Date.now()},readdir:function(A){var B=[".",".."];for(var g in A.contents)!A.contents.hasOwnProperty(g)||B.push(g);return B},symlink:function(A,B,g){var Q=J.createNode(A,B,41471,0);return Q.link=g,Q},readlink:function(A){if(!I.isLink(A.mode))throw new I.ErrnoError(28);return A.link}},stream_ops:{read:function(A,B,g,Q,C){var E=A.node.contents;if(C>=A.node.usedBytes)return 0;var D=Math.min(A.node.usedBytes-C,Q);if(D>8&&E.subarray)B.set(E.subarray(C,C+D),g);else for(var N=0;N0||g+B{$A(E,'Loading data file "'+A+'" failed (no arrayBuffer).'),B(new Uint8Array(E)),C&&lA()},E=>{if(g)g();else throw'Loading data file "'+A+'" failed.'}),C&&TA()}var I={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(A,B={})=>{if(A=YA.resolve(I.cwd(),A),!A)return{path:"",node:null};var g={follow_mount:!0,recurse_count:0};if(B=Object.assign(g,B),B.recurse_count>8)throw new I.ErrnoError(32);for(var Q=m.normalizeArray(A.split("/").filter(y=>!!y),!1),C=I.root,E="/",D=0;D40)throw new I.ErrnoError(32)}}return{path:E,node:C}},getPath:A=>{for(var B;;){if(I.isRoot(A)){var g=A.mount.mountpoint;return B?g[g.length-1]!=="/"?g+"/"+B:g+B:g}B=B?A.name+"/"+B:A.name,A=A.parent}},hashName:(A,B)=>{for(var g=0,Q=0;Q>>0)%I.nameTable.length},hashAddNode:A=>{var B=I.hashName(A.parent.id,A.name);A.name_next=I.nameTable[B],I.nameTable[B]=A},hashRemoveNode:A=>{var B=I.hashName(A.parent.id,A.name);if(I.nameTable[B]===A)I.nameTable[B]=A.name_next;else for(var g=I.nameTable[B];g;){if(g.name_next===A){g.name_next=A.name_next;break}g=g.name_next}},lookupNode:(A,B)=>{var g=I.mayLookup(A);if(g)throw new I.ErrnoError(g,A);for(var Q=I.hashName(A.id,B),C=I.nameTable[Q];C;C=C.name_next){var E=C.name;if(C.parent.id===A.id&&E===B)return C}return I.lookup(A,B)},createNode:(A,B,g,Q)=>{var C=new I.FSNode(A,B,g,Q);return I.hashAddNode(C),C},destroyNode:A=>{I.hashRemoveNode(A)},isRoot:A=>A===A.parent,isMountpoint:A=>!!A.mounted,isFile:A=>(A&61440)===32768,isDir:A=>(A&61440)===16384,isLink:A=>(A&61440)===40960,isChrdev:A=>(A&61440)===8192,isBlkdev:A=>(A&61440)===24576,isFIFO:A=>(A&61440)===4096,isSocket:A=>(A&49152)===49152,flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:A=>{var B=I.flagModes[A];if(typeof B>"u")throw new Error("Unknown file open mode: "+A);return B},flagsToPermissionString:A=>{var B=["r","w","rw"][A&3];return A&512&&(B+="w"),B},nodePermissions:(A,B)=>I.ignorePermissions?0:B.includes("r")&&!(A.mode&292)||B.includes("w")&&!(A.mode&146)||B.includes("x")&&!(A.mode&73)?2:0,mayLookup:A=>{var B=I.nodePermissions(A,"x");return B||(A.node_ops.lookup?0:2)},mayCreate:(A,B)=>{try{var g=I.lookupNode(A,B);return 20}catch{}return I.nodePermissions(A,"wx")},mayDelete:(A,B,g)=>{var Q;try{Q=I.lookupNode(A,B)}catch(E){return E.errno}var C=I.nodePermissions(A,"wx");if(C)return C;if(g){if(!I.isDir(Q.mode))return 54;if(I.isRoot(Q)||I.getPath(Q)===I.cwd())return 10}else if(I.isDir(Q.mode))return 31;return 0},mayOpen:(A,B)=>A?I.isLink(A.mode)?32:I.isDir(A.mode)&&(I.flagsToPermissionString(B)!=="r"||B&512)?31:I.nodePermissions(A,I.flagsToPermissionString(B)):44,MAX_OPEN_FDS:4096,nextfd:(A=0,B=I.MAX_OPEN_FDS)=>{for(var g=A;g<=B;g++)if(!I.streams[g])return g;throw new I.ErrnoError(33)},getStream:A=>I.streams[A],createStream:(A,B,g)=>{I.FSStream||(I.FSStream=function(){this.shared={}},I.FSStream.prototype={},Object.defineProperties(I.FSStream.prototype,{object:{get:function(){return this.node},set:function(C){this.node=C}},isRead:{get:function(){return(this.flags&2097155)!==1}},isWrite:{get:function(){return(this.flags&2097155)!==0}},isAppend:{get:function(){return this.flags&1024}},flags:{get:function(){return this.shared.flags},set:function(C){this.shared.flags=C}},position:{get:function(){return this.shared.position},set:function(C){this.shared.position=C}}})),A=Object.assign(new I.FSStream,A);var Q=I.nextfd(B,g);return A.fd=Q,I.streams[Q]=A,A},closeStream:A=>{I.streams[A]=null},chrdev_stream_ops:{open:A=>{var B=I.getDevice(A.node.rdev);A.stream_ops=B.stream_ops,A.stream_ops.open&&A.stream_ops.open(A)},llseek:()=>{throw new I.ErrnoError(70)}},major:A=>A>>8,minor:A=>A&255,makedev:(A,B)=>A<<8|B,registerDevice:(A,B)=>{I.devices[A]={stream_ops:B}},getDevice:A=>I.devices[A],getMounts:A=>{for(var B=[],g=[A];g.length;){var Q=g.pop();B.push(Q),g.push.apply(g,Q.mounts)}return B},syncfs:(A,B)=>{typeof A=="function"&&(B=A,A=!1),I.syncFSRequests++,I.syncFSRequests>1&&p("warning: "+I.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var g=I.getMounts(I.root.mount),Q=0;function C(D){return I.syncFSRequests--,B(D)}function E(D){if(D)return E.errored?void 0:(E.errored=!0,C(D));++Q>=g.length&&C(null)}g.forEach(D=>{if(!D.type.syncfs)return E(null);D.type.syncfs(D,A,E)})},mount:(A,B,g)=>{var Q=g==="/",C=!g,E;if(Q&&I.root)throw new I.ErrnoError(10);if(!Q&&!C){var D=I.lookupPath(g,{follow_mount:!1});if(g=D.path,E=D.node,I.isMountpoint(E))throw new I.ErrnoError(10);if(!I.isDir(E.mode))throw new I.ErrnoError(54)}var N={type:A,opts:B,mountpoint:g,mounts:[]},F=A.mount(N);return F.mount=N,N.root=F,Q?I.root=F:E&&(E.mounted=N,E.mount&&E.mount.mounts.push(N)),F},unmount:A=>{var B=I.lookupPath(A,{follow_mount:!1});if(!I.isMountpoint(B.node))throw new I.ErrnoError(28);var g=B.node,Q=g.mounted,C=I.getMounts(Q);Object.keys(I.nameTable).forEach(D=>{for(var N=I.nameTable[D];N;){var F=N.name_next;C.includes(N.mount)&&I.destroyNode(N),N=F}}),g.mounted=null;var E=g.mount.mounts.indexOf(Q);g.mount.mounts.splice(E,1)},lookup:(A,B)=>A.node_ops.lookup(A,B),mknod:(A,B,g)=>{var Q=I.lookupPath(A,{parent:!0}),C=Q.node,E=m.basename(A);if(!E||E==="."||E==="..")throw new I.ErrnoError(28);var D=I.mayCreate(C,E);if(D)throw new I.ErrnoError(D);if(!C.node_ops.mknod)throw new I.ErrnoError(63);return C.node_ops.mknod(C,E,B,g)},create:(A,B)=>(B=B!==void 0?B:438,B&=4095,B|=32768,I.mknod(A,B,0)),mkdir:(A,B)=>(B=B!==void 0?B:511,B&=1023,B|=16384,I.mknod(A,B,0)),mkdirTree:(A,B)=>{for(var g=A.split("/"),Q="",C=0;C(typeof g>"u"&&(g=B,B=438),B|=8192,I.mknod(A,B,g)),symlink:(A,B)=>{if(!YA.resolve(A))throw new I.ErrnoError(44);var g=I.lookupPath(B,{parent:!0}),Q=g.node;if(!Q)throw new I.ErrnoError(44);var C=m.basename(B),E=I.mayCreate(Q,C);if(E)throw new I.ErrnoError(E);if(!Q.node_ops.symlink)throw new I.ErrnoError(63);return Q.node_ops.symlink(Q,C,A)},rename:(A,B)=>{var g=m.dirname(A),Q=m.dirname(B),C=m.basename(A),E=m.basename(B),D,N,F;if(D=I.lookupPath(A,{parent:!0}),N=D.node,D=I.lookupPath(B,{parent:!0}),F=D.node,!N||!F)throw new I.ErrnoError(44);if(N.mount!==F.mount)throw new I.ErrnoError(75);var o=I.lookupNode(N,C),h=YA.relative(A,Q);if(h.charAt(0)!==".")throw new I.ErrnoError(28);if(h=YA.relative(B,g),h.charAt(0)!==".")throw new I.ErrnoError(55);var y;try{y=I.lookupNode(F,E)}catch{}if(o!==y){var Y=I.isDir(o.mode),i=I.mayDelete(N,C,Y);if(i)throw new I.ErrnoError(i);if(i=y?I.mayDelete(F,E,Y):I.mayCreate(F,E),i)throw new I.ErrnoError(i);if(!N.node_ops.rename)throw new I.ErrnoError(63);if(I.isMountpoint(o)||y&&I.isMountpoint(y))throw new I.ErrnoError(10);if(F!==N&&(i=I.nodePermissions(N,"w"),i))throw new I.ErrnoError(i);I.hashRemoveNode(o);try{N.node_ops.rename(o,F,E)}catch(k){throw k}finally{I.hashAddNode(o)}}},rmdir:A=>{var B=I.lookupPath(A,{parent:!0}),g=B.node,Q=m.basename(A),C=I.lookupNode(g,Q),E=I.mayDelete(g,Q,!0);if(E)throw new I.ErrnoError(E);if(!g.node_ops.rmdir)throw new I.ErrnoError(63);if(I.isMountpoint(C))throw new I.ErrnoError(10);g.node_ops.rmdir(g,Q),I.destroyNode(C)},readdir:A=>{var B=I.lookupPath(A,{follow:!0}),g=B.node;if(!g.node_ops.readdir)throw new I.ErrnoError(54);return g.node_ops.readdir(g)},unlink:A=>{var B=I.lookupPath(A,{parent:!0}),g=B.node;if(!g)throw new I.ErrnoError(44);var Q=m.basename(A),C=I.lookupNode(g,Q),E=I.mayDelete(g,Q,!1);if(E)throw new I.ErrnoError(E);if(!g.node_ops.unlink)throw new I.ErrnoError(63);if(I.isMountpoint(C))throw new I.ErrnoError(10);g.node_ops.unlink(g,Q),I.destroyNode(C)},readlink:A=>{var B=I.lookupPath(A),g=B.node;if(!g)throw new I.ErrnoError(44);if(!g.node_ops.readlink)throw new I.ErrnoError(28);return YA.resolve(I.getPath(g.parent),g.node_ops.readlink(g))},stat:(A,B)=>{var g=I.lookupPath(A,{follow:!B}),Q=g.node;if(!Q)throw new I.ErrnoError(44);if(!Q.node_ops.getattr)throw new I.ErrnoError(63);return Q.node_ops.getattr(Q)},lstat:A=>I.stat(A,!0),chmod:(A,B,g)=>{var Q;if(typeof A=="string"){var C=I.lookupPath(A,{follow:!g});Q=C.node}else Q=A;if(!Q.node_ops.setattr)throw new I.ErrnoError(63);Q.node_ops.setattr(Q,{mode:B&4095|Q.mode&-4096,timestamp:Date.now()})},lchmod:(A,B)=>{I.chmod(A,B,!0)},fchmod:(A,B)=>{var g=I.getStream(A);if(!g)throw new I.ErrnoError(8);I.chmod(g.node,B)},chown:(A,B,g,Q)=>{var C;if(typeof A=="string"){var E=I.lookupPath(A,{follow:!Q});C=E.node}else C=A;if(!C.node_ops.setattr)throw new I.ErrnoError(63);C.node_ops.setattr(C,{timestamp:Date.now()})},lchown:(A,B,g)=>{I.chown(A,B,g,!0)},fchown:(A,B,g)=>{var Q=I.getStream(A);if(!Q)throw new I.ErrnoError(8);I.chown(Q.node,B,g)},truncate:(A,B)=>{if(B<0)throw new I.ErrnoError(28);var g;if(typeof A=="string"){var Q=I.lookupPath(A,{follow:!0});g=Q.node}else g=A;if(!g.node_ops.setattr)throw new I.ErrnoError(63);if(I.isDir(g.mode))throw new I.ErrnoError(31);if(!I.isFile(g.mode))throw new I.ErrnoError(28);var C=I.nodePermissions(g,"w");if(C)throw new I.ErrnoError(C);g.node_ops.setattr(g,{size:B,timestamp:Date.now()})},ftruncate:(A,B)=>{var g=I.getStream(A);if(!g)throw new I.ErrnoError(8);if((g.flags&2097155)===0)throw new I.ErrnoError(28);I.truncate(g.node,B)},utime:(A,B,g)=>{var Q=I.lookupPath(A,{follow:!0}),C=Q.node;C.node_ops.setattr(C,{timestamp:Math.max(B,g)})},open:(A,B,g)=>{if(A==="")throw new I.ErrnoError(44);B=typeof B=="string"?I.modeStringToFlags(B):B,g=typeof g>"u"?438:g,B&64?g=g&4095|32768:g=0;var Q;if(typeof A=="object")Q=A;else{A=m.normalize(A);try{var C=I.lookupPath(A,{follow:!(B&131072)});Q=C.node}catch{}}var E=!1;if(B&64)if(Q){if(B&128)throw new I.ErrnoError(20)}else Q=I.mknod(A,g,0),E=!0;if(!Q)throw new I.ErrnoError(44);if(I.isChrdev(Q.mode)&&(B&=-513),B&65536&&!I.isDir(Q.mode))throw new I.ErrnoError(54);if(!E){var D=I.mayOpen(Q,B);if(D)throw new I.ErrnoError(D)}B&512&&!E&&I.truncate(Q,0),B&=-131713;var N=I.createStream({node:Q,path:I.getPath(Q),flags:B,seekable:!0,position:0,stream_ops:Q.stream_ops,ungotten:[],error:!1});return N.stream_ops.open&&N.stream_ops.open(N),G.logReadFiles&&!(B&1)&&(I.readFiles||(I.readFiles={}),A in I.readFiles||(I.readFiles[A]=1)),N},close:A=>{if(I.isClosed(A))throw new I.ErrnoError(8);A.getdents&&(A.getdents=null);try{A.stream_ops.close&&A.stream_ops.close(A)}catch(B){throw B}finally{I.closeStream(A.fd)}A.fd=null},isClosed:A=>A.fd===null,llseek:(A,B,g)=>{if(I.isClosed(A))throw new I.ErrnoError(8);if(!A.seekable||!A.stream_ops.llseek)throw new I.ErrnoError(70);if(g!=0&&g!=1&&g!=2)throw new I.ErrnoError(28);return A.position=A.stream_ops.llseek(A,B,g),A.ungotten=[],A.position},read:(A,B,g,Q,C)=>{if(Q<0||C<0)throw new I.ErrnoError(28);if(I.isClosed(A))throw new I.ErrnoError(8);if((A.flags&2097155)===1)throw new I.ErrnoError(8);if(I.isDir(A.node.mode))throw new I.ErrnoError(31);if(!A.stream_ops.read)throw new I.ErrnoError(28);var E=typeof C<"u";if(!E)C=A.position;else if(!A.seekable)throw new I.ErrnoError(70);var D=A.stream_ops.read(A,B,g,Q,C);return E||(A.position+=D),D},write:(A,B,g,Q,C,E)=>{if(Q<0||C<0)throw new I.ErrnoError(28);if(I.isClosed(A))throw new I.ErrnoError(8);if((A.flags&2097155)===0)throw new I.ErrnoError(8);if(I.isDir(A.node.mode))throw new I.ErrnoError(31);if(!A.stream_ops.write)throw new I.ErrnoError(28);A.seekable&&A.flags&1024&&I.llseek(A,0,2);var D=typeof C<"u";if(!D)C=A.position;else if(!A.seekable)throw new I.ErrnoError(70);var N=A.stream_ops.write(A,B,g,Q,C,E);return D||(A.position+=N),N},allocate:(A,B,g)=>{if(I.isClosed(A))throw new I.ErrnoError(8);if(B<0||g<=0)throw new I.ErrnoError(28);if((A.flags&2097155)===0)throw new I.ErrnoError(8);if(!I.isFile(A.node.mode)&&!I.isDir(A.node.mode))throw new I.ErrnoError(43);if(!A.stream_ops.allocate)throw new I.ErrnoError(138);A.stream_ops.allocate(A,B,g)},mmap:(A,B,g,Q,C)=>{if((Q&2)!==0&&(C&2)===0&&(A.flags&2097155)!==2)throw new I.ErrnoError(2);if((A.flags&2097155)===1)throw new I.ErrnoError(2);if(!A.stream_ops.mmap)throw new I.ErrnoError(43);return A.stream_ops.mmap(A,B,g,Q,C)},msync:(A,B,g,Q,C)=>!A||!A.stream_ops.msync?0:A.stream_ops.msync(A,B,g,Q,C),munmap:A=>0,ioctl:(A,B,g)=>{if(!A.stream_ops.ioctl)throw new I.ErrnoError(59);return A.stream_ops.ioctl(A,B,g)},readFile:(A,B={})=>{if(B.flags=B.flags||0,B.encoding=B.encoding||"binary",B.encoding!=="utf8"&&B.encoding!=="binary")throw new Error('Invalid encoding type "'+B.encoding+'"');var g,Q=I.open(A,B.flags),C=I.stat(A),E=C.size,D=new Uint8Array(E);return I.read(Q,D,0,E,0),B.encoding==="utf8"?g=CA(D,0):B.encoding==="binary"&&(g=D),I.close(Q),g},writeFile:(A,B,g={})=>{g.flags=g.flags||577;var Q=I.open(A,g.flags,g.mode);if(typeof B=="string"){var C=new Uint8Array(e(B)+1),E=aA(B,C,0,C.length);I.write(Q,C,0,E,void 0,g.canOwn)}else if(ArrayBuffer.isView(B))I.write(Q,B,0,B.byteLength,void 0,g.canOwn);else throw new Error("Unsupported data type");I.close(Q)},cwd:()=>I.currentPath,chdir:A=>{var B=I.lookupPath(A,{follow:!0});if(B.node===null)throw new I.ErrnoError(44);if(!I.isDir(B.node.mode))throw new I.ErrnoError(54);var g=I.nodePermissions(B.node,"x");if(g)throw new I.ErrnoError(g);I.currentPath=B.path},createDefaultDirectories:()=>{I.mkdir("/tmp"),I.mkdir("/home"),I.mkdir("/home/web_user")},createDefaultDevices:()=>{I.mkdir("/dev"),I.registerDevice(I.makedev(1,3),{read:()=>0,write:(B,g,Q,C,E)=>C}),I.mkdev("/dev/null",I.makedev(1,3)),cA.register(I.makedev(5,0),cA.default_tty_ops),cA.register(I.makedev(6,0),cA.default_tty1_ops),I.mkdev("/dev/tty",I.makedev(5,0)),I.mkdev("/dev/tty1",I.makedev(6,0));var A=Vg();I.createDevice("/dev","random",A),I.createDevice("/dev","urandom",A),I.mkdir("/dev/shm"),I.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{I.mkdir("/proc");var A=I.mkdir("/proc/self");I.mkdir("/proc/self/fd"),I.mount({mount:()=>{var B=I.createNode(A,"fd",16895,73);return B.node_ops={lookup:(g,Q)=>{var C=+Q,E=I.getStream(C);if(!E)throw new I.ErrnoError(8);var D={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>E.path}};return D.parent=D,D}},B}},{},"/proc/self/fd")},createStandardStreams:()=>{G.stdin?I.createDevice("/dev","stdin",G.stdin):I.symlink("/dev/tty","/dev/stdin"),G.stdout?I.createDevice("/dev","stdout",null,G.stdout):I.symlink("/dev/tty","/dev/stdout"),G.stderr?I.createDevice("/dev","stderr",null,G.stderr):I.symlink("/dev/tty1","/dev/stderr"),I.open("/dev/stdin",0),I.open("/dev/stdout",1),I.open("/dev/stderr",1)},ensureErrnoError:()=>{I.ErrnoError||(I.ErrnoError=function(B,g){this.node=g,this.setErrno=function(Q){this.errno=Q},this.setErrno(B),this.message="FS error"},I.ErrnoError.prototype=new Error,I.ErrnoError.prototype.constructor=I.ErrnoError,[44].forEach(A=>{I.genericErrors[A]=new I.ErrnoError(A),I.genericErrors[A].stack=""}))},staticInit:()=>{I.ensureErrnoError(),I.nameTable=new Array(4096),I.mount(J,{},"/"),I.createDefaultDirectories(),I.createDefaultDevices(),I.createSpecialDirectories(),I.filesystems={MEMFS:J}},init:(A,B,g)=>{I.init.initialized=!0,I.ensureErrnoError(),G.stdin=A||G.stdin,G.stdout=B||G.stdout,G.stderr=g||G.stderr,I.createStandardStreams()},quit:()=>{I.init.initialized=!1;for(var A=0;A{var g=0;return A&&(g|=365),B&&(g|=146),g},findObject:(A,B)=>{var g=I.analyzePath(A,B);return g.exists?g.object:null},analyzePath:(A,B)=>{try{var g=I.lookupPath(A,{follow:!B});A=g.path}catch{}var Q={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var g=I.lookupPath(A,{parent:!0});Q.parentExists=!0,Q.parentPath=g.path,Q.parentObject=g.node,Q.name=m.basename(A),g=I.lookupPath(A,{follow:!B}),Q.exists=!0,Q.path=g.path,Q.object=g.node,Q.name=g.node.name,Q.isRoot=g.path==="/"}catch(C){Q.error=C.errno}return Q},createPath:(A,B,g,Q)=>{A=typeof A=="string"?A:I.getPath(A);for(var C=B.split("/").reverse();C.length;){var E=C.pop();if(!!E){var D=m.join2(A,E);try{I.mkdir(D)}catch{}A=D}}return D},createFile:(A,B,g,Q,C)=>{var E=m.join2(typeof A=="string"?A:I.getPath(A),B),D=I.getMode(Q,C);return I.create(E,D)},createDataFile:(A,B,g,Q,C,E)=>{var D=B;A&&(A=typeof A=="string"?A:I.getPath(A),D=B?m.join2(A,B):A);var N=I.getMode(Q,C),F=I.create(D,N);if(g){if(typeof g=="string"){for(var o=new Array(g.length),h=0,y=g.length;h{var C=m.join2(typeof A=="string"?A:I.getPath(A),B),E=I.getMode(!!g,!!Q);I.createDevice.major||(I.createDevice.major=64);var D=I.makedev(I.createDevice.major++,0);return I.registerDevice(D,{open:N=>{N.seekable=!1},close:N=>{Q&&Q.buffer&&Q.buffer.length&&Q(10)},read:(N,F,o,h,y)=>{for(var Y=0,i=0;i{for(var Y=0;Y{if(A.isDevice||A.isFolder||A.link||A.contents)return!0;if(typeof XMLHttpRequest<"u")throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(r)try{A.contents=qA(r(A.url),!0),A.usedBytes=A.contents.length}catch{throw new I.ErrnoError(29)}else throw new Error("Cannot load without read() or XMLHttpRequest.")},createLazyFile:(A,B,g,Q,C)=>{function E(){this.lengthKnown=!1,this.chunks=[]}if(E.prototype.get=function(i){if(!(i>this.length-1||i<0)){var k=i%this.chunkSize,Z=i/this.chunkSize|0;return this.getter(Z)[k]}},E.prototype.setDataGetter=function(i){this.getter=i},E.prototype.cacheLength=function(){var i=new XMLHttpRequest;if(i.open("HEAD",g,!1),i.send(null),!(i.status>=200&&i.status<300||i.status===304))throw new Error("Couldn't load "+g+". Status: "+i.status);var k=Number(i.getResponseHeader("Content-length")),Z,c=(Z=i.getResponseHeader("Accept-Ranges"))&&Z==="bytes",q=(Z=i.getResponseHeader("Content-Encoding"))&&Z==="gzip",U=1024*1024;c||(U=k);var a=(x,BA)=>{if(x>BA)throw new Error("invalid range ("+x+", "+BA+") or no bytes requested!");if(BA>k-1)throw new Error("only "+k+" bytes available! programmer error!");var w=new XMLHttpRequest;if(w.open("GET",g,!1),k!==U&&w.setRequestHeader("Range","bytes="+x+"-"+BA),w.responseType="arraybuffer",w.overrideMimeType&&w.overrideMimeType("text/plain; charset=x-user-defined"),w.send(null),!(w.status>=200&&w.status<300||w.status===304))throw new Error("Couldn't load "+g+". Status: "+w.status);return w.response!==void 0?new Uint8Array(w.response||[]):qA(w.responseText||"",!0)},V=this;V.setDataGetter(x=>{var BA=x*U,w=(x+1)*U-1;if(w=Math.min(w,k-1),typeof V.chunks[x]>"u"&&(V.chunks[x]=a(BA,w)),typeof V.chunks[x]>"u")throw new Error("doXHR failed!");return V.chunks[x]}),(q||!k)&&(U=k=1,k=this.getter(0).length,U=k,wA("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=k,this._chunkSize=U,this.lengthKnown=!0},typeof XMLHttpRequest<"u"){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var D,N}else var N={isDevice:!1,url:g};var F=I.createFile(A,B,N,Q,C);N.contents?F.contents=N.contents:N.url&&(F.contents=null,F.url=N.url),Object.defineProperties(F,{usedBytes:{get:function(){return this.contents.length}}});var o={},h=Object.keys(F.stream_ops);h.forEach(Y=>{var i=F.stream_ops[Y];o[Y]=function(){return I.forceLoadFile(F),i.apply(null,arguments)}});function y(Y,i,k,Z,c){var q=Y.node.contents;if(c>=q.length)return 0;var U=Math.min(q.length-c,Z);if(q.slice)for(var a=0;a(I.forceLoadFile(F),y(Y,i,k,Z,c)),o.mmap=(Y,i,k,Z,c)=>{I.forceLoadFile(F);var q=kB(i);if(!q)throw new I.ErrnoError(48);return y(Y,W,q,i,k),{ptr:q,allocated:!0}},F.stream_ops=o,F},createPreloadedFile:(A,B,g,Q,C,E,D,N,F,o)=>{var h=B?YA.resolve(m.join2(A,B)):A;function y(Y){function i(k){o&&o(),N||I.createDataFile(A,B,k,Q,C,F),E&&E(),lA()}Browser.handledByPreloadPlugin(Y,h,i,()=>{D&&D(),lA()})||i(Y)}TA(),typeof g=="string"?dg(g,Y=>y(Y),D):y(g)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(A,B,g)=>{B=B||(()=>{}),g=g||(()=>{});var Q=I.indexedDB();try{var C=Q.open(I.DB_NAME(),I.DB_VERSION)}catch(E){return g(E)}C.onupgradeneeded=()=>{wA("creating db");var E=C.result;E.createObjectStore(I.DB_STORE_NAME)},C.onsuccess=()=>{var E=C.result,D=E.transaction([I.DB_STORE_NAME],"readwrite"),N=D.objectStore(I.DB_STORE_NAME),F=0,o=0,h=A.length;function y(){o==0?B():g()}A.forEach(Y=>{var i=N.put(I.analyzePath(Y).object.contents,Y);i.onsuccess=()=>{F++,F+o==h&&y()},i.onerror=()=>{o++,F+o==h&&y()}}),D.onerror=g},C.onerror=g},loadFilesFromDB:(A,B,g)=>{B=B||(()=>{}),g=g||(()=>{});var Q=I.indexedDB();try{var C=Q.open(I.DB_NAME(),I.DB_VERSION)}catch(E){return g(E)}C.onupgradeneeded=g,C.onsuccess=()=>{var E=C.result;try{var D=E.transaction([I.DB_STORE_NAME],"readonly")}catch(Y){g(Y);return}var N=D.objectStore(I.DB_STORE_NAME),F=0,o=0,h=A.length;function y(){o==0?B():g()}A.forEach(Y=>{var i=N.get(Y);i.onsuccess=()=>{I.analyzePath(Y).exists&&I.unlink(Y),I.createDataFile(m.dirname(Y),m.basename(Y),i.result,!0,!0,!0),F++,F+o==h&&y()},i.onerror=()=>{o++,F+o==h&&y()}}),D.onerror=g},C.onerror=g}},j={DEFAULT_POLLMASK:5,calculateAt:function(A,B,g){if(m.isAbs(B))return B;var Q;if(A===-100)Q=I.cwd();else{var C=I.getStream(A);if(!C)throw new I.ErrnoError(8);Q=C.path}if(B.length==0){if(!g)throw new I.ErrnoError(44);return Q}return m.join2(Q,B)},doStat:function(A,B,g){try{var Q=A(B)}catch(C){if(C&&C.node&&m.normalize(B)!==m.normalize(I.getPath(C.node)))return-54;throw C}return R[g>>2]=Q.dev,R[g+8>>2]=Q.ino,R[g+12>>2]=Q.mode,R[g+16>>2]=Q.nlink,R[g+20>>2]=Q.uid,R[g+24>>2]=Q.gid,R[g+28>>2]=Q.rdev,X=[Q.size>>>0,(M=Q.size,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+40>>2]=X[0],R[g+44>>2]=X[1],R[g+48>>2]=4096,R[g+52>>2]=Q.blocks,X=[Math.floor(Q.atime.getTime()/1e3)>>>0,(M=Math.floor(Q.atime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+56>>2]=X[0],R[g+60>>2]=X[1],R[g+64>>2]=0,X=[Math.floor(Q.mtime.getTime()/1e3)>>>0,(M=Math.floor(Q.mtime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+72>>2]=X[0],R[g+76>>2]=X[1],R[g+80>>2]=0,X=[Math.floor(Q.ctime.getTime()/1e3)>>>0,(M=Math.floor(Q.ctime.getTime()/1e3),+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+88>>2]=X[0],R[g+92>>2]=X[1],R[g+96>>2]=0,X=[Q.ino>>>0,(M=Q.ino,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[g+104>>2]=X[0],R[g+108>>2]=X[1],0},doMsync:function(A,B,g,Q,C){var E=gA.slice(A,A+g);I.msync(B,E,C,g,Q)},varargs:void 0,get:function(){j.varargs+=4;var A=R[j.varargs-4>>2];return A},getStr:function(A){var B=GA(A);return B},getStreamFromFD:function(A){var B=I.getStream(A);if(!B)throw new I.ErrnoError(8);return B}};function mg(A,B,g){j.varargs=g;try{var Q=j.getStreamFromFD(A);switch(B){case 0:{var C=j.get();if(C<0)return-28;var E;return E=I.createStream(Q,C),E.fd}case 1:case 2:return 0;case 3:return Q.flags;case 4:{var C=j.get();return Q.flags|=C,0}case 5:{var C=j.get(),D=0;return hA[C+D>>1]=2,0}case 6:case 7:return 0;case 16:case 8:return-28;case 9:return Lg(28),-1;default:return-28}}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function jg(A,B){try{var g=j.getStreamFromFD(A);return j.doStat(I.stat,g.path,B)}catch(Q){if(typeof I>"u"||!(Q instanceof I.ErrnoError))throw Q;return-Q.errno}}function lg(A,B){try{if(B===0)return-28;var g=I.cwd(),Q=e(g)+1;return B"u"||!(C instanceof I.ErrnoError))throw C;return-C.errno}}function qg(A,B,g){try{var Q=j.getStreamFromFD(A);Q.getdents||(Q.getdents=I.readdir(Q.path));for(var C=280,E=0,D=I.llseek(Q,0,1),N=Math.floor(D/C);N>>0,(M=F,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[B+E>>2]=X[0],R[B+E+4>>2]=X[1],X=[(N+1)*C>>>0,(M=(N+1)*C,+Math.abs(M)>=1?M>0?(Math.min(+Math.floor(M/4294967296),4294967295)|0)>>>0:~~+Math.ceil((M-+(~~M>>>0))/4294967296)>>>0:0)],R[B+E+8>>2]=X[0],R[B+E+12>>2]=X[1],hA[B+E+16>>1]=280,W[B+E+18>>0]=o,KA(h,B+E+19,256),E+=C,N+=1}return I.llseek(Q,N*C,0),E}catch(i){if(typeof I>"u"||!(i instanceof I.ErrnoError))throw i;return-i.errno}}function xg(A,B,g){j.varargs=g;try{var Q=j.getStreamFromFD(A);switch(B){case 21509:case 21505:return Q.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return Q.tty?0:-59;case 21519:{if(!Q.tty)return-59;var C=j.get();return R[C>>2]=0,0}case 21520:return Q.tty?-28:-59;case 21531:{var C=j.get();return I.ioctl(Q,B,C)}case 21523:return Q.tty?0:-59;case 21524:return Q.tty?0:-59;default:return-28}}catch(E){if(typeof I>"u"||!(E instanceof I.ErrnoError))throw E;return-E.errno}}function bg(A,B){try{return A=j.getStr(A),j.doStat(I.lstat,A,B)}catch(g){if(typeof I>"u"||!(g instanceof I.ErrnoError))throw g;return-g.errno}}function Xg(A,B,g,Q){try{B=j.getStr(B);var C=Q&256,E=Q&4096;return Q=Q&-4353,B=j.calculateAt(A,B,E),j.doStat(C?I.lstat:I.stat,B,g)}catch(D){if(typeof I>"u"||!(D instanceof I.ErrnoError))throw D;return-D.errno}}function fg(A,B,g,Q){j.varargs=Q;try{B=j.getStr(B),B=j.calculateAt(A,B);var C=Q?j.get():0;return I.open(B,g,C).fd}catch(E){if(typeof I>"u"||!(E instanceof I.ErrnoError))throw E;return-E.errno}}function tg(A,B,g,Q){try{if(B=j.getStr(B),B=j.calculateAt(A,B),Q<=0)return-28;var C=I.readlink(B),E=Math.min(Q,e(C)),D=W[g+E];return KA(C,g,Q+1),W[g+E]=D,E}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function Tg(A,B){try{return A=j.getStr(A),j.doStat(I.stat,A,B)}catch(g){if(typeof I>"u"||!(g instanceof I.ErrnoError))throw g;return-g.errno}}function pg(){return Date.now()}function ng(A){do{var B=d[A>>2];A+=4;var g=d[A>>2];A+=4;var Q=d[A>>2];A+=4;var C=GA(B);I.createPath("/",m.dirname(C),!0,!0),I.createDataFile(C,null,W.subarray(Q,Q+g),!0,!0,!0)}while(d[A>>2])}var zg=!0;function rg(){return zg}function yB(A){return d[A>>2]+R[A+4>>2]*4294967296}function eg(A,B){var g=new Date(yB(A)*1e3);R[B>>2]=g.getUTCSeconds(),R[B+4>>2]=g.getUTCMinutes(),R[B+8>>2]=g.getUTCHours(),R[B+12>>2]=g.getUTCDate(),R[B+16>>2]=g.getUTCMonth(),R[B+20>>2]=g.getUTCFullYear()-1900,R[B+24>>2]=g.getUTCDay();var Q=Date.UTC(g.getUTCFullYear(),0,1,0,0,0,0),C=(g.getTime()-Q)/(1e3*60*60*24)|0;R[B+28>>2]=C}function Og(A,B){var g=new Date(yB(A)*1e3);R[B>>2]=g.getSeconds(),R[B+4>>2]=g.getMinutes(),R[B+8>>2]=g.getHours(),R[B+12>>2]=g.getDate(),R[B+16>>2]=g.getMonth(),R[B+20>>2]=g.getFullYear()-1900,R[B+24>>2]=g.getDay();var Q=new Date(g.getFullYear(),0,1),C=(g.getTime()-Q.getTime())/(1e3*60*60*24)|0;R[B+28>>2]=C,R[B+36>>2]=-(g.getTimezoneOffset()*60);var E=new Date(g.getFullYear(),6,1).getTimezoneOffset(),D=Q.getTimezoneOffset(),N=(E!=D&&g.getTimezoneOffset()==Math.min(D,E))|0;R[B+32>>2]=N}function vg(A,B,g,Q,C,E){try{var D=I.getStream(C);D&&(g&2&&j.doMsync(A,D,B,Q,E),I.munmap(D))}catch(N){if(typeof I>"u"||!(N instanceof I.ErrnoError))throw N;return-N.errno}}function aB(A){var B=e(A)+1,g=EB(B);return g&&aA(A,W,g,B),g}function ug(A,B,g){var Q=new Date().getFullYear(),C=new Date(Q,0,1),E=new Date(Q,6,1),D=C.getTimezoneOffset(),N=E.getTimezoneOffset(),F=Math.max(D,N);R[A>>2]=F*60,R[B>>2]=Number(D!=N);function o(k){var Z=k.toTimeString().match(/\(([A-Za-z ]+)\)$/);return Z?Z[1]:"GMT"}var h=o(C),y=o(E),Y=aB(h),i=aB(y);N>2]=Y,d[g+4>>2]=i):(d[g>>2]=i,d[g+4>>2]=Y)}function BB(A,B,g){BB.called||(BB.called=!0,ug(A,B,g))}function Pg(){oA("")}var gB=[];function _g(A,B){gB.length=0;var g;for(B>>=2;g=gA[A++];)B+=g!=105&B,gB.push(g==105?R[B]:kA[B++>>1]),++B;return gB}function $g(A,B,g){var Q=_g(B,g);return og[A].apply(null,Q)}var MB;MB=()=>performance.now();function AQ(A){return A<0||A===0&&1/A===-1/0}function BQ(A,B){return(A>>>0)+B*4294967296}function gQ(A,B){return(A>>>0)+(B>>>0)*4294967296}function SB(A,B){if(A<=0)return A;var g=B<=32?Math.abs(1<=g&&(B<=32||A>g)&&(A=-2*g+A),A}function JB(A,B){return A>=0?A:B<=32?2*Math.abs(1<>3],Q+=8):DA=="i64"?(iA=[R[Q>>2],R[Q+4>>2]],Q+=8):(DA="i32",iA=R[Q>>2],Q+=4),iA}for(var D=[],N,F,o;;){var h=g;if(N=W[g>>0],N===0)break;if(F=W[g+1>>0],N==37){var y=!1,Y=!1,i=!1,k=!1,Z=!1;A:for(;;){switch(F){case 43:y=!0;break;case 45:Y=!0;break;case 35:i=!0;break;case 48:if(k)break A;k=!0;break;case 32:Z=!0;break;default:break A}g++,F=W[g+1>>0]}var c=0;if(F==42)c=E("i32"),g++,F=W[g+1>>0];else for(;F>=48&&F<=57;)c=c*10+(F-48),g++,F=W[g+1>>0];var q=!1,U=-1;if(F==46){if(U=0,q=!0,g++,F=W[g+1>>0],F==42)U=E("i32"),g++;else for(;;){var a=W[g+1>>0];if(a<48||a>57)break;U=U*10+(a-48),g++}F=W[g+1>>0]}U<0&&(U=6,q=!1);var V;switch(String.fromCharCode(F)){case"h":var x=W[g+2>>0];x==104?(g++,V=1):V=2;break;case"l":var x=W[g+2>>0];x==108?(g++,V=8):V=4;break;case"L":case"q":case"j":V=8;break;case"z":case"t":case"I":V=4;break;default:V=null}switch(V&&g++,F=W[g+1>>0],String.fromCharCode(F)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":{var BA=F==100||F==105;V=V||4,o=E("i"+V*8);var w;if(V==8&&(o=F==117?gQ(o[0],o[1]):BQ(o[0],o[1])),V<=4){var JI=Math.pow(256,V)-1;o=(BA?SB:JB)(o&JI,V*8)}var XA=Math.abs(o),P="";if(F==100||F==105)w=SB(o,8*V).toString(10);else if(F==117)w=JB(o,8*V).toString(10),o=Math.abs(o);else if(F==111)w=(i?"0":"")+XA.toString(8);else if(F==120||F==88){if(P=i&&o!=0?"0x":"",o<0){o=-o,w=(XA-1).toString(16);for(var PB=[],EA=0;EA=0&&(y?P="+"+P:Z&&(P=" "+P)),w.charAt(0)=="-"&&(P="-"+P,w=w.substr(1));P.length+w.lengthNB&&NB>=-4?(F=(F==103?"f":"F").charCodeAt(0),U-=NB+1):(F=(F==103?"e":"E").charCodeAt(0),U--),fA=Math.min(U,20)}F==101||F==69?(w=o.toExponential(fA),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1))):(F==102||F==70)&&(w=o.toFixed(fA),o===0&&AQ(o)&&(w="-"+w));var IA=w.split("e");if(_B&&!i)for(;IA[0].length>1&&IA[0].includes(".")&&(IA[0].slice(-1)=="0"||IA[0].slice(-1)==".");)IA[0]=IA[0].slice(0,-1);else for(i&&w.indexOf(".")==-1&&(IA[0]+=".");U>fA++;)IA[0]+="0";w=IA[0]+(IA.length>1?"e"+IA[1]:""),F==69&&(w=w.toUpperCase()),o>=0&&(y?w="+"+w:Z&&(w=" "+w))}for(;w.length>0]);else D=D.concat(qA("(null)".substr(0,ZA),!0));if(Y)for(;ZA0;)D.push(32);Y||D.push(E("i8"));break}case"n":{var cI=E("i32*");R[cI>>2]=D.length;break}case"%":{D.push(N);break}default:for(var EA=h;EA>0])}g+=2}else D.push(N),g+=1}return D}function QB(A){if(!A||!A.callee||!A.callee.name)return[null,"",""];A.callee.toString();var B=A.callee.name,g="(",Q=!0;for(var C in A){var E=A[C];Q||(g+=", "),Q=!1,typeof E=="number"||typeof E=="string"?g+=E:g+="("+typeof E+")"}g+=")";var D=A.callee.caller;return A=D?D.arguments:[],Q&&(g=""),[A,B,g]}function VA(A){VA.shown||(VA.shown={}),VA.shown[A]||(VA.shown[A]=1,p(A))}function CQ(A){var B=Yg(),g=B.lastIndexOf("_emscripten_log"),Q=B.lastIndexOf("_emscripten_get_callstack"),C=B.indexOf(`
`,Math.max(g,Q))+1;B=B.slice(C),A&32&&VA("EM_LOG_DEMANGLE is deprecated; ignoring"),A&8&&typeof emscripten_source_map>"u"&&(VA('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),A^=8,A|=16);var E=null;if(A&128)for(E=QB(arguments);E[1].includes("_emscripten_");)E=QB(E[0]);var D=B.split(`
diff --git a/assets/index.ab1a215a.js b/assets/index.d2d7d94d.js
similarity index 99%
rename from assets/index.ab1a215a.js
rename to assets/index.d2d7d94d.js
index 7a15e02..961174c 100644
--- a/assets/index.ab1a215a.js
+++ b/assets/index.d2d7d94d.js
@@ -1075,7 +1075,7 @@ Values:
`+String(Pe)));O(qe);for(var Qe=0;Qe0&&Object.prototype.hasOwnProperty.call(Ce,Ce.length-1))}h.exports=y}),H8=u((i,h)=>{b(),m(),_(),xt(),ce(),h.exports=function(y,S){return function(){for(var f=new Array(arguments.length),g=0;g{b(),m(),_(),xt(),ce();var y=H8(),S=Object.prototype.toString;function f(Be){return Array.isArray(Be)}function g(Be){return typeof Be>"u"}function x(Be){return Be!==null&&!g(Be)&&Be.constructor!==null&&!g(Be.constructor)&&typeof Be.constructor.isBuffer=="function"&&Be.constructor.isBuffer(Be)}function P(Be){return S.call(Be)==="[object ArrayBuffer]"}function O(Be){return S.call(Be)==="[object FormData]"}function B(Be){var Se;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?Se=ArrayBuffer.isView(Be):Se=Be&&Be.buffer&&P(Be.buffer),Se}function N(Be){return typeof Be=="string"}function R(Be){return typeof Be=="number"}function re(Be){return Be!==null&&typeof Be=="object"}function _e(Be){if(S.call(Be)!=="[object Object]")return!1;var Se=Object.getPrototypeOf(Be);return Se===null||Se===Object.prototype}function Ce(Be){return S.call(Be)==="[object Date]"}function qe(Be){return S.call(Be)==="[object File]"}function Ve(Be){return S.call(Be)==="[object Blob]"}function Pe(Be){return S.call(Be)==="[object Function]"}function Qe(Be){return re(Be)&&Pe(Be.pipe)}function et(Be){return S.call(Be)==="[object URLSearchParams]"}function _t(Be){return Be.trim?Be.trim():Be.replace(/^\s+|\s+$/g,"")}function Ue(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function We(Be,Se){if(!(Be===null||typeof Be>"u"))if(typeof Be!="object"&&(Be=[Be]),f(Be))for(var Fe=0,mt=Be.length;Fe{b(),m(),_(),xt(),ce();var y=vs();function S(f){return encodeURIComponent(f).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}h.exports=function(f,g,x){if(!g)return f;var P;if(x)P=x(g);else if(y.isURLSearchParams(g))P=g.toString();else{var O=[];y.forEach(g,function(N,R){N===null||typeof N>"u"||(y.isArray(N)?R=R+"[]":N=[N],y.forEach(N,function(re){y.isDate(re)?re=re.toISOString():y.isObject(re)&&(re=JSON.stringify(re)),O.push(S(R)+"="+S(re))}))}),P=O.join("&")}if(P){var B=f.indexOf("#");B!==-1&&(f=f.slice(0,B)),f+=(f.indexOf("?")===-1?"?":"&")+P}return f}}),Rz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs();function S(){this.handlers=[]}S.prototype.use=function(f,g,x){return this.handlers.push({fulfilled:f,rejected:g,synchronous:x?x.synchronous:!1,runWhen:x?x.runWhen:null}),this.handlers.length-1},S.prototype.eject=function(f){this.handlers[f]&&(this.handlers[f]=null)},S.prototype.forEach=function(f){y.forEach(this.handlers,function(g){g!==null&&f(g)})},h.exports=S}),Pz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs();h.exports=function(S,f){y.forEach(S,function(g,x){x!==f&&x.toUpperCase()===f.toUpperCase()&&(S[f]=g,delete S[x])})}}),V8=u((i,h)=>{b(),m(),_(),xt(),ce(),h.exports=function(y,S,f,g,x){return y.config=S,f&&(y.code=f),y.request=g,y.response=x,y.isAxiosError=!0,y.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},y}}),q8=u((i,h)=>{b(),m(),_(),xt(),ce();var y=V8();h.exports=function(S,f,g,x,P){var O=new Error(S);return y(O,f,g,x,P)}}),Mz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=q8();h.exports=function(S,f,g){var x=g.config.validateStatus;!g.status||!x||x(g.status)?S(g):f(y("Request failed with status code "+g.status,g.config,null,g.request,g))}}),Bz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs();h.exports=y.isStandardBrowserEnv()?function(){return{write:function(S,f,g,x,P,O){var B=[];B.push(S+"="+encodeURIComponent(f)),y.isNumber(g)&&B.push("expires="+new Date(g).toGMTString()),y.isString(x)&&B.push("path="+x),y.isString(P)&&B.push("domain="+P),O===!0&&B.push("secure"),document.cookie=B.join("; ")},read:function(S){var f=document.cookie.match(new RegExp("(^|;\\s*)("+S+")=([^;]*)"));return f?decodeURIComponent(f[3]):null},remove:function(S){this.write(S,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()}),Oz=u((i,h)=>{b(),m(),_(),xt(),ce(),h.exports=function(y){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(y)}}),Uz=u((i,h)=>{b(),m(),_(),xt(),ce(),h.exports=function(y,S){return S?y.replace(/\/+$/,"")+"/"+S.replace(/^\/+/,""):y}}),Lz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=Oz(),S=Uz();h.exports=function(f,g){return f&&!y(g)?S(f,g):g}}),Dz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs(),S=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];h.exports=function(f){var g={},x,P,O;return f&&y.forEach(f.split(`
`),function(B){if(O=B.indexOf(":"),x=y.trim(B.substr(0,O)).toLowerCase(),P=y.trim(B.substr(O+1)),x){if(g[x]&&S.indexOf(x)>=0)return;x==="set-cookie"?g[x]=(g[x]?g[x]:[]).concat([P]):g[x]=g[x]?g[x]+", "+P:P}}),g}}),Nz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs();h.exports=y.isStandardBrowserEnv()?function(){var S=/(msie|trident)/i.test(navigator.userAgent),f=document.createElement("a"),g;function x(P){var O=P;return S&&(f.setAttribute("href",O),O=f.href),f.setAttribute("href",O),{href:f.href,protocol:f.protocol?f.protocol.replace(/:$/,""):"",host:f.host,search:f.search?f.search.replace(/^\?/,""):"",hash:f.hash?f.hash.replace(/^#/,""):"",hostname:f.hostname,port:f.port,pathname:f.pathname.charAt(0)==="/"?f.pathname:"/"+f.pathname}}return g=x(window.location.href),function(P){var O=y.isString(P)?x(P):P;return O.protocol===g.protocol&&O.host===g.host}}():function(){return function(){return!0}}()}),av=u((i,h)=>{b(),m(),_(),xt(),ce();function y(S){this.message=S}y.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},y.prototype.__CANCEL__=!0,h.exports=y}),K8=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs(),S=Mz(),f=Bz(),g=W8(),x=Lz(),P=Dz(),O=Nz(),B=q8(),N=sv(),R=av();h.exports=function(re){return new Promise(function(_e,Ce){var qe=re.data,Ve=re.headers,Pe=re.responseType,Qe;function et(){re.cancelToken&&re.cancelToken.unsubscribe(Qe),re.signal&&re.signal.removeEventListener("abort",Qe)}y.isFormData(qe)&&delete Ve["Content-Type"];var _t=new XMLHttpRequest;if(re.auth){var Ue=re.auth.username||"",We=re.auth.password?unescape(encodeURIComponent(re.auth.password)):"";Ve.Authorization="Basic "+btoa(Ue+":"+We)}var ht=x(re.baseURL,re.url);_t.open(re.method.toUpperCase(),g(ht,re.params,re.paramsSerializer),!0),_t.timeout=re.timeout;function gt(){if(_t){var Be="getAllResponseHeaders"in _t?P(_t.getAllResponseHeaders()):null,Se=!Pe||Pe==="text"||Pe==="json"?_t.responseText:_t.response,Fe={data:Se,status:_t.status,statusText:_t.statusText,headers:Be,config:re,request:_t};S(function(mt){_e(mt),et()},function(mt){Ce(mt),et()},Fe),_t=null}}if("onloadend"in _t?_t.onloadend=gt:_t.onreadystatechange=function(){!_t||_t.readyState!==4||_t.status===0&&!(_t.responseURL&&_t.responseURL.indexOf("file:")===0)||setTimeout(gt)},_t.onabort=function(){_t&&(Ce(B("Request aborted",re,"ECONNABORTED",_t)),_t=null)},_t.onerror=function(){Ce(B("Network Error",re,null,_t)),_t=null},_t.ontimeout=function(){var Be=re.timeout?"timeout of "+re.timeout+"ms exceeded":"timeout exceeded",Se=re.transitional||N.transitional;re.timeoutErrorMessage&&(Be=re.timeoutErrorMessage),Ce(B(Be,re,Se.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",_t)),_t=null},y.isStandardBrowserEnv()){var Je=(re.withCredentials||O(ht))&&re.xsrfCookieName?f.read(re.xsrfCookieName):void 0;Je&&(Ve[re.xsrfHeaderName]=Je)}"setRequestHeader"in _t&&y.forEach(Ve,function(Be,Se){typeof qe>"u"&&Se.toLowerCase()==="content-type"?delete Ve[Se]:_t.setRequestHeader(Se,Be)}),y.isUndefined(re.withCredentials)||(_t.withCredentials=!!re.withCredentials),Pe&&Pe!=="json"&&(_t.responseType=re.responseType),typeof re.onDownloadProgress=="function"&&_t.addEventListener("progress",re.onDownloadProgress),typeof re.onUploadProgress=="function"&&_t.upload&&_t.upload.addEventListener("progress",re.onUploadProgress),(re.cancelToken||re.signal)&&(Qe=function(Be){_t&&(Ce(!Be||Be&&Be.type?new R("canceled"):Be),_t.abort(),_t=null)},re.cancelToken&&re.cancelToken.subscribe(Qe),re.signal&&(re.signal.aborted?Qe():re.signal.addEventListener("abort",Qe))),qe||(qe=null),_t.send(qe)})}}),sv=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs(),S=Pz(),f=V8(),g={"Content-Type":"application/x-www-form-urlencoded"};function x(N,R){!y.isUndefined(N)&&y.isUndefined(N["Content-Type"])&&(N["Content-Type"]=R)}function P(){var N;return(typeof XMLHttpRequest<"u"||typeof k<"u"&&Object.prototype.toString.call(k)==="[object process]")&&(N=K8()),N}function O(N,R,re){if(y.isString(N))try{return(R||JSON.parse)(N),y.trim(N)}catch(_e){if(_e.name!=="SyntaxError")throw _e}return(re||JSON.stringify)(N)}var B={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:P(),transformRequest:[function(N,R){return S(R,"Accept"),S(R,"Content-Type"),y.isFormData(N)||y.isArrayBuffer(N)||y.isBuffer(N)||y.isStream(N)||y.isFile(N)||y.isBlob(N)?N:y.isArrayBufferView(N)?N.buffer:y.isURLSearchParams(N)?(x(R,"application/x-www-form-urlencoded;charset=utf-8"),N.toString()):y.isObject(N)||R&&R["Content-Type"]==="application/json"?(x(R,"application/json"),O(N)):N}],transformResponse:[function(N){var R=this.transitional||B.transitional,re=R&&R.silentJSONParsing,_e=R&&R.forcedJSONParsing,Ce=!re&&this.responseType==="json";if(Ce||_e&&y.isString(N)&&N.length)try{return JSON.parse(N)}catch(qe){if(Ce)throw qe.name==="SyntaxError"?f(qe,this,"E_JSON_PARSE"):qe}return N}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(N){return N>=200&&N<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};y.forEach(["delete","get","head"],function(N){B.headers[N]={}}),y.forEach(["post","put","patch"],function(N){B.headers[N]=y.merge(g)}),h.exports=B}),jz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs(),S=sv();h.exports=function(f,g,x){var P=this||S;return y.forEach(x,function(O){f=O.call(P,f,g)}),f}}),G8=u((i,h)=>{b(),m(),_(),xt(),ce(),h.exports=function(y){return!!(y&&y.__CANCEL__)}}),Fz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs(),S=jz(),f=G8(),g=sv(),x=av();function P(O){if(O.cancelToken&&O.cancelToken.throwIfRequested(),O.signal&&O.signal.aborted)throw new x("canceled")}h.exports=function(O){P(O),O.headers=O.headers||{},O.data=S.call(O,O.data,O.headers,O.transformRequest),O.headers=y.merge(O.headers.common||{},O.headers[O.method]||{},O.headers),y.forEach(["delete","get","head","post","put","patch","common"],function(N){delete O.headers[N]});var B=O.adapter||g.adapter;return B(O).then(function(N){return P(O),N.data=S.call(O,N.data,N.headers,O.transformResponse),N},function(N){return f(N)||(P(O),N&&N.response&&(N.response.data=S.call(O,N.response.data,N.response.headers,O.transformResponse))),Promise.reject(N)})}}),Y8=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs();h.exports=function(S,f){f=f||{};var g={};function x(re,_e){return y.isPlainObject(re)&&y.isPlainObject(_e)?y.merge(re,_e):y.isPlainObject(_e)?y.merge({},_e):y.isArray(_e)?_e.slice():_e}function P(re){if(y.isUndefined(f[re])){if(!y.isUndefined(S[re]))return x(void 0,S[re])}else return x(S[re],f[re])}function O(re){if(!y.isUndefined(f[re]))return x(void 0,f[re])}function B(re){if(y.isUndefined(f[re])){if(!y.isUndefined(S[re]))return x(void 0,S[re])}else return x(void 0,f[re])}function N(re){if(re in f)return x(S[re],f[re]);if(re in S)return x(void 0,S[re])}var R={url:O,method:O,data:O,baseURL:B,transformRequest:B,transformResponse:B,paramsSerializer:B,timeout:B,timeoutMessage:B,withCredentials:B,adapter:B,responseType:B,xsrfCookieName:B,xsrfHeaderName:B,onUploadProgress:B,onDownloadProgress:B,decompress:B,maxContentLength:B,maxBodyLength:B,transport:B,httpAgent:B,httpsAgent:B,cancelToken:B,socketPath:B,responseEncoding:B,validateStatus:N};return y.forEach(Object.keys(S).concat(Object.keys(f)),function(re){var _e=R[re]||P,Ce=_e(re);y.isUndefined(Ce)&&_e!==N||(g[re]=Ce)}),g}}),Q8=u((i,h)=>{b(),m(),_(),xt(),ce(),h.exports={version:"0.25.0"}}),$z=u((i,h)=>{b(),m(),_(),xt(),ce();var y=Q8().version,S={};["object","boolean","number","function","string","symbol"].forEach(function(x,P){S[x]=function(O){return typeof O===x||"a"+(P<1?"n ":" ")+x}});var f={};S.transitional=function(x,P,O){function B(N,R){return"[Axios v"+y+"] Transitional option '"+N+"'"+R+(O?". "+O:"")}return function(N,R,re){if(x===!1)throw new Error(B(R," has been removed"+(P?" in "+P:"")));return P&&!f[R]&&(f[R]=!0,console.warn(B(R," has been deprecated since v"+P+" and will be removed in the near future"))),x?x(N,R,re):!0}};function g(x,P,O){if(typeof x!="object")throw new TypeError("options must be an object");for(var B=Object.keys(x),N=B.length;N-- >0;){var R=B[N],re=P[R];if(re){var _e=x[R],Ce=_e===void 0||re(_e,R,x);if(Ce!==!0)throw new TypeError("option "+R+" must be "+Ce);continue}if(O!==!0)throw Error("Unknown option "+R)}}h.exports={assertOptions:g,validators:S}}),zz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs(),S=W8(),f=Rz(),g=Fz(),x=Y8(),P=$z(),O=P.validators;function B(N){this.defaults=N,this.interceptors={request:new f,response:new f}}B.prototype.request=function(N,R){if(typeof N=="string"?(R=R||{},R.url=N):R=N||{},!R.url)throw new Error("Provided config url is not valid");R=x(this.defaults,R),R.method?R.method=R.method.toLowerCase():this.defaults.method?R.method=this.defaults.method.toLowerCase():R.method="get";var re=R.transitional;re!==void 0&&P.assertOptions(re,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var _e=[],Ce=!0;this.interceptors.request.forEach(function(Ue){typeof Ue.runWhen=="function"&&Ue.runWhen(R)===!1||(Ce=Ce&&Ue.synchronous,_e.unshift(Ue.fulfilled,Ue.rejected))});var qe=[];this.interceptors.response.forEach(function(Ue){qe.push(Ue.fulfilled,Ue.rejected)});var Ve;if(!Ce){var Pe=[g,void 0];for(Array.prototype.unshift.apply(Pe,_e),Pe=Pe.concat(qe),Ve=Promise.resolve(R);Pe.length;)Ve=Ve.then(Pe.shift(),Pe.shift());return Ve}for(var Qe=R;_e.length;){var et=_e.shift(),_t=_e.shift();try{Qe=et(Qe)}catch(Ue){_t(Ue);break}}try{Ve=g(Qe)}catch(Ue){return Promise.reject(Ue)}for(;qe.length;)Ve=Ve.then(qe.shift(),qe.shift());return Ve},B.prototype.getUri=function(N){if(!N.url)throw new Error("Provided config url is not valid");return N=x(this.defaults,N),S(N.url,N.params,N.paramsSerializer).replace(/^\?/,"")},y.forEach(["delete","get","head","options"],function(N){B.prototype[N]=function(R,re){return this.request(x(re||{},{method:N,url:R,data:(re||{}).data}))}}),y.forEach(["post","put","patch"],function(N){B.prototype[N]=function(R,re,_e){return this.request(x(_e||{},{method:N,url:R,data:re}))}}),h.exports=B}),Hz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=av();function S(f){if(typeof f!="function")throw new TypeError("executor must be a function.");var g;this.promise=new Promise(function(P){g=P});var x=this;this.promise.then(function(P){if(x._listeners){var O,B=x._listeners.length;for(O=0;O{b(),m(),_(),xt(),ce(),h.exports=function(y){return function(S){return y.apply(null,S)}}}),Vz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs();h.exports=function(S){return y.isObject(S)&&S.isAxiosError===!0}}),qz=u((i,h)=>{b(),m(),_(),xt(),ce();var y=vs(),S=H8(),f=zz(),g=Y8(),x=sv();function P(B){var N=new f(B),R=S(f.prototype.request,N);return y.extend(R,f.prototype,N),y.extend(R,N),R.create=function(re){return P(g(B,re))},R}var O=P(x);O.Axios=f,O.Cancel=av(),O.CancelToken=Hz(),O.isCancel=G8(),O.VERSION=Q8().version,O.all=function(B){return Promise.all(B)},O.spread=Wz(),O.isAxiosError=Vz(),h.exports=O,h.exports.default=O}),Z8=u((i,h)=>{b(),m(),_(),xt(),ce(),h.exports=qz()}),Kz=u((i,h)=>{h.exports={name:"ton",version:"13.4.1",repository:"https://github.com/ton-core/ton.git",author:"Whales Corp. ",license:"MIT",main:"dist/index.js",files:["dist"],scripts:{docs:"rm -fr docs && typedoc src/index.ts",build:"rm -fr dist && tsc --declaration",test:"jest --verbose --runInBand",release:"yarn build && yarn release-it --npm.yarn1"},devDependencies:{"@release-it/keep-a-changelog":"^3.1.0","@types/jest":"^27.0.1","@types/node":"^16.7.10",buffer:"^6.0.3",expect:"^27.1.0",jest:"^27.1.0","jest-mock":"^27.1.0",karma:"^6.3.4","karma-chrome-launcher":"^3.1.0","karma-jasmine":"^4.0.1","karma-typescript":"^5.5.2","karma-webpack":"^5.0.0",prando:"^6.0.1","release-it":"^15.5.1","ton-core":"^0.48.0","ton-crypto":"3.2.0","ton-emulator":"^2.1.1","ts-jest":"^27.0.5","ts-loader":"^9.2.5","ts-node":"^10.7.0",typedoc:"^0.23.24",typescript:"^4.4.2",webpack:"^5.51.2"},dependencies:{axios:"^0.25.0",dataloader:"^2.0.0","fp-ts":"^2.11.1","io-ts":"^2.2.16","io-ts-reporters":"^2.0.0","symbol.inspect":"1.0.1",teslabot:"^1.3.0"},peerDependencies:{"ton-core":">=0.48.0","ton-crypto":">=3.2.0"},publishConfig:{access:"public",registry:"https://registry.npmjs.org/"},"release-it":{github:{release:!0},plugins:{"@release-it/keep-a-changelog":{filename:"CHANGELOG.md"}}},packageManager:"yarn@3.4.1"}}),X8=u(i=>{b(),m(),_(),xt(),ce();var h=i&&i.__createBinding||(Object.create?function(Fe,mt,$t,hr){hr===void 0&&(hr=$t),Object.defineProperty(Fe,hr,{enumerable:!0,get:function(){return mt[$t]}})}:function(Fe,mt,$t,hr){hr===void 0&&(hr=$t),Fe[hr]=mt[$t]}),y=i&&i.__setModuleDefault||(Object.create?function(Fe,mt){Object.defineProperty(Fe,"default",{enumerable:!0,value:mt})}:function(Fe,mt){Fe.default=mt}),S=i&&i.__importStar||function(Fe){if(Fe&&Fe.__esModule)return Fe;var mt={};if(Fe!=null)for(var $t in Fe)$t!=="default"&&Object.prototype.hasOwnProperty.call(Fe,$t)&&h(mt,Fe,$t);return y(mt,Fe),mt},f=i&&i.__importDefault||function(Fe){return Fe&&Fe.__esModule?Fe:{default:Fe}};Object.defineProperty(i,"__esModule",{value:!0}),i.HttpApi=void 0;var g=S(y_()),x=m_(),P=f(Az()),O=Tz(),B=f(Iz()),N=f(Z8()),R=Kz().version,re=g.type({"@type":g.literal("ton.blockIdExt"),workchain:g.number,shard:g.string,seqno:g.number,root_hash:g.string,file_hash:g.string}),_e=g.type({balance:g.union([g.number,g.string]),state:g.union([g.literal("active"),g.literal("uninitialized"),g.literal("frozen")]),data:g.string,code:g.string,last_transaction_id:g.type({"@type":g.literal("internal.transactionId"),lt:g.string,hash:g.string}),block_id:re,sync_utime:g.number}),Ce=g.type({"@type":g.literal("ok")}),qe=g.type({"@type":g.literal("query.fees"),source_fees:g.type({"@type":g.literal("fees"),in_fwd_fee:g.number,storage_fee:g.number,gas_fee:g.number,fwd_fee:g.number})}),Ve=g.type({gas_used:g.number,exit_code:g.number,stack:g.array(g.unknown)}),Pe=g.union([g.type({"@type":g.literal("msg.dataRaw"),body:g.string}),g.type({"@type":g.literal("msg.dataText"),text:g.string}),g.type({"@type":g.literal("msg.dataDecryptedText"),text:g.string}),g.type({"@type":g.literal("msg.dataEncryptedText"),text:g.string})]),Qe=g.type({source:g.string,destination:g.string,value:g.string,fwd_fee:g.string,ihr_fee:g.string,created_lt:g.string,body_hash:g.string,msg_data:Pe}),et=g.type({data:g.string,utime:g.number,transaction_id:g.type({lt:g.string,hash:g.string}),fee:g.string,storage_fee:g.string,other_fee:g.string,in_msg:g.union([g.undefined,Qe]),out_msgs:g.array(Qe)}),_t=g.array(et),Ue=g.type({state_root_hash:g.string,last:re,init:re}),We=g.type({shards:g.array(re)}),ht=g.type({"@type":g.literal("blocks.shortTxId"),mode:g.number,account:g.string,lt:g.string,hash:g.string}),gt=g.type({id:re,req_count:g.number,incomplete:g.boolean,transactions:g.array(ht)}),Je=class{constructor(Fe,mt,$t,hr){this.namespace=Fe,this.cache=mt,this.codec=$t,this.keyEncoder=hr}async get(Fe){let mt=await this.cache.get(this.namespace,this.keyEncoder(Fe));if(mt){let $t=this.codec.decode(JSON.parse(mt));if((0,x.isRight)($t))return $t.right}return null}async set(Fe,mt){mt!==null?await this.cache.set(this.namespace,this.keyEncoder(Fe),JSON.stringify(mt)):await this.cache.set(this.namespace,this.keyEncoder(Fe),null)}},Be=class{constructor(Fe,mt){this.endpoint=Fe,this.cache=new O.InMemoryCache,this.parameters={timeout:mt?.timeout||3e4,apiKey:mt?.apiKey},this.shardCache=new Je("ton-shard",this.cache,g.array(re),$t=>$t+""),this.shardLoader=new B.default(async $t=>await Promise.all($t.map(async hr=>{let kr=await this.shardCache.get(hr);if(kr)return kr;let qr=(await this.doCall("shards",{seqno:hr},We)).shards;return await this.shardCache.set(hr,qr),qr}))),this.shardTransactionsCache=new Je("ton-shard-tx",this.cache,gt,$t=>$t.workchain+":"+$t.shard+":"+$t.seqno),this.shardTransactionsLoader=new B.default(async $t=>await Promise.all($t.map(async hr=>{let kr=await this.shardTransactionsCache.get(hr);if(kr)return kr;let qr=await this.doCall("getBlockTransactions",{workchain:hr.workchain,seqno:hr.seqno,shard:hr.shard},gt);return await this.shardTransactionsCache.set(hr,qr),qr})),{cacheKeyFn:$t=>$t.workchain+":"+$t.shard+":"+$t.seqno})}getAddressInformation(Fe){return this.doCall("getAddressInformation",{address:Fe.toString()},_e)}async getTransactions(Fe,mt){let $t=mt.inclusive;delete mt.inclusive;let hr;mt.hash&&(hr=yt.from(mt.hash,"base64").toString("hex"));let kr=mt.limit;mt.hash&&mt.lt&&$t!==!0&&kr++;let qr=await this.doCall("getTransactions",{address:Fe.toString(),...mt,limit:kr,hash:hr},_t);return qr.length>kr&&(qr=qr.slice(0,kr)),mt.hash&&mt.lt&&$t!==!0&&qr.shift(),qr}async getMasterchainInfo(){return await this.doCall("getMasterchainInfo",{},Ue)}async getShards(Fe){return await this.shardLoader.load(Fe)}async getBlockTransactions(Fe,mt,$t){return await this.shardTransactionsLoader.load({workchain:Fe,seqno:mt,shard:$t})}async getTransaction(Fe,mt,$t){let hr=yt.from($t,"base64").toString("hex");return(await this.doCall("getTransactions",{address:Fe.toString(),lt:mt,hash:hr,limit:1},_t)).find(qr=>qr.transaction_id.lt===mt&&qr.transaction_id.hash===$t)||null}async callGetMethod(Fe,mt,$t){return await this.doCall("runGetMethod",{address:Fe.toString(),method:mt,stack:Se($t)},Ve)}async sendBoc(Fe){await this.doCall("sendBoc",{boc:Fe.toString("base64")},Ce)}async estimateFee(Fe,mt){return await this.doCall("estimateFee",{address:Fe.toString(),body:mt.body.toBoc().toString("base64"),init_data:mt.initData?mt.initData.toBoc().toString("base64"):"",init_code:mt.initCode?mt.initCode.toBoc().toString("base64"):"",ignore_chksig:mt.ignoreSignature},qe)}async doCall(Fe,mt,$t){let hr={"Content-Type":"application/json","X-Ton-Client-Version":R};this.parameters.apiKey&&(hr["X-API-Key"]=this.parameters.apiKey);let kr=await N.default.post(this.endpoint,JSON.stringify({id:"1",jsonrpc:"2.0",method:Fe,params:mt}),{headers:hr,timeout:this.parameters.timeout});if(kr.status!==200||!kr.data.ok)throw Error("Received error: "+JSON.stringify(kr.data));let qr=$t.decode(kr.data.result);if((0,x.isRight)(qr))return qr.right;throw Error("Malformed response: "+P.default.report(qr).join(", "))}};i.HttpApi=Be;function Se(Fe){let mt=[];for(let $t of Fe)if($t.type==="int")mt.push(["num",$t.value.toString()]);else if($t.type==="cell")mt.push(["tvm.Cell",$t.cell.toBoc().toString("base64")]);else if($t.type==="slice")mt.push(["tvm.Slice",$t.cell.toBoc().toString("base64")]);else if($t.type==="builder")mt.push(["tvm.Builder",$t.cell.toBoc().toString("base64")]);else throw Error("Unsupported stack item type: "+$t.type);return mt}}),Gz=u(i=>{b(),m(),_(),xt(),ce();var h=i&&i.__classPrivateFieldSet||function(B,N,R,re,_e){if(re==="m")throw new TypeError("Private method is not writable");if(re==="a"&&!_e)throw new TypeError("Private accessor was defined without a setter");if(typeof N=="function"?B!==N||!_e:!N.has(B))throw new TypeError("Cannot write private member to an object whose class did not declare it");return re==="a"?_e.call(B,R):_e?_e.value=R:N.set(B,R),R},y=i&&i.__classPrivateFieldGet||function(B,N,R,re){if(R==="a"&&!re)throw new TypeError("Private accessor was defined without a getter");if(typeof N=="function"?B!==N||!re:!N.has(B))throw new TypeError("Cannot read private member from an object whose class did not declare it");return R==="m"?re:R==="a"?re.call(B):re?re.value:N.get(B)},S;Object.defineProperty(i,"__esModule",{value:!0}),i.TonClient=void 0;var f=X8(),g=Ya(),x=class{constructor(B){S.set(this,void 0),this.parameters={endpoint:B.endpoint},h(this,S,new f.HttpApi(this.parameters.endpoint,{timeout:B.timeout,apiKey:B.apiKey,adapter:B.httpAdapter}),"f")}async getBalance(B){return(await this.getContractState(B)).balance}async runMethod(B,N,R=[]){let re=await y(this,S,"f").callGetMethod(B,N,R);if(re.exit_code!==0)throw Error("Unable to execute get method. Got exit_code: "+re.exit_code);return{gas_used:re.gas_used,stack:P(re.stack)}}async callGetMethod(B,N,R=[]){return this.runMethod(B,N,R)}async runMethodWithError(B,N,R=[]){let re=await y(this,S,"f").callGetMethod(B,N,R);return{gas_used:re.gas_used,stack:P(re.stack),exit_code:re.exit_code}}async callGetMethodWithError(B,N,R=[]){return this.runMethodWithError(B,N,R)}async getTransactions(B,N){let R=await y(this,S,"f").getTransactions(B,N),re=[];for(let _e of R)re.push((0,g.loadTransaction)(g.Cell.fromBoc(yt.from(_e.data,"base64"))[0].beginParse()));return re}async getTransaction(B,N,R){let re=await y(this,S,"f").getTransaction(B,N,R);return re?(0,g.loadTransaction)(g.Cell.fromBoc(yt.from(re.data,"base64"))[0].beginParse()):null}async getMasterchainInfo(){let B=await y(this,S,"f").getMasterchainInfo();return{workchain:B.init.workchain,shard:B.last.shard,initSeqno:B.init.seqno,latestSeqno:B.last.seqno}}async getWorkchainShards(B){return(await y(this,S,"f").getShards(B)).map(N=>({workchain:N.workchain,shard:N.shard,seqno:N.seqno}))}async getShardTransactions(B,N,R){let re=await y(this,S,"f").getBlockTransactions(B,N,R);if(re.incomplete)throw Error("Unsupported");return re.transactions.map(_e=>({account:g.Address.parseRaw(_e.account),lt:_e.lt,hash:_e.hash}))}async sendMessage(B){let N=(0,g.beginCell)().store((0,g.storeMessage)(B)).endCell().toBoc();await y(this,S,"f").sendBoc(N)}async sendFile(B){await y(this,S,"f").sendBoc(B)}async estimateExternalMessageFee(B,N){return await y(this,S,"f").estimateFee(B,{body:N.body,initCode:N.initCode,initData:N.initData,ignoreSignature:N.ignoreSignature})}async sendExternalMessage(B,N){if(await this.isContractDeployed(B.address)||!B.init){let R=(0,g.external)({to:B.address,body:N});await this.sendMessage(R)}else{let R=(0,g.external)({to:B.address,init:{code:B.init.code,data:B.init.data},body:N});await this.sendMessage(R)}}async isContractDeployed(B){return(await this.getContractState(B)).state==="active"}async getContractState(B){let N=await y(this,S,"f").getAddressInformation(B),R=BigInt(N.balance),re=N.state;return{balance:R,state:re,code:N.code!==""?yt.from(N.code,"base64"):null,data:N.data!==""?yt.from(N.data,"base64"):null,lastTransaction:N.last_transaction_id.lt!=="0"?{lt:N.last_transaction_id.lt,hash:N.last_transaction_id.hash}:null,blockId:{workchain:N.block_id.workchain,shard:N.block_id.shard,seqno:N.block_id.seqno},timestampt:N.sync_utime}}open(B){return(0,g.openContract)(B,N=>O(this,N.address,N.init))}provider(B,N){return O(this,B,N)}};i.TonClient=x,S=new WeakMap;function P(B){let N=[];for(let R of B)if(R[0]==="num"){let re=R[1];re.startsWith("-")?N.push({type:"int",value:-BigInt(re.slice(1))}):N.push({type:"int",value:BigInt(re)})}else if(R[0]==="null")N.push({type:"null"});else if(R[0]==="cell")N.push({type:"cell",cell:g.Cell.fromBoc(yt.from(R[1].bytes,"base64"))[0]});else if(R[0]==="slice")N.push({type:"slice",cell:g.Cell.fromBoc(yt.from(R[1].bytes,"base64"))[0]});else if(R[0]==="builder")N.push({type:"builder",cell:g.Cell.fromBoc(yt.from(R[1].bytes,"base64"))[0]});else throw Error("Unsupported stack item type: "+R[0]);return new g.TupleReader(N)}function O(B,N,R){return{async getState(){let re=await B.getContractState(N),_e=re.balance,Ce=re.lastTransaction?{lt:BigInt(re.lastTransaction.lt),hash:yt.from(re.lastTransaction.hash,"base64")}:null,qe;if(re.state==="active")qe={type:"active",code:re.code?re.code:null,data:re.data?re.data:null};else if(re.state==="uninitialized")qe={type:"uninit"};else if(re.state==="frozen")qe={type:"frozen",stateHash:yt.alloc(0)};else throw Error("Unsupported state");return{balance:_e,last:Ce,state:qe}},async get(re,_e){return{stack:(await B.callGetMethod(N,re,_e)).stack}},async external(re){let _e=null;R&&!await B.isContractDeployed(N)&&(_e=R);let Ce=(0,g.external)({to:N,init:_e?{code:_e.code,data:_e.data}:null,body:re}),qe=(0,g.beginCell)().store((0,g.storeMessage)(Ce)).endCell().toBoc();await B.sendFile(qe)},async internal(re,_e){let Ce=null;R&&!await B.isContractDeployed(N)&&(Ce=R);let qe=!0;_e.bounce!==null&&_e.bounce!==void 0&&(qe=_e.bounce);let Ve;typeof _e.value=="string"?Ve=(0,g.toNano)(_e.value):Ve=_e.value;let Pe=null;typeof _e.body=="string"?Pe=(0,g.comment)(_e.body):_e.body&&(Pe=_e.body),await re.send({to:N,value:Ve,bounce:qe,sendMode:_e.sendMode,init:Ce,body:Pe})}}}}),Yz=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUrlSafe=void 0;function h(y){for(;y.indexOf("/")>=0;)y=y.replace("/","_");for(;y.indexOf("+")>=0;)y=y.replace("+","-");for(;y.indexOf("=")>=0;)y=y.replace("=","");return y}i.toUrlSafe=h}),Qz=u(i=>{b(),m(),_(),xt(),ce();var h=i&&i.__createBinding||(Object.create?function(Se,Fe,mt,$t){$t===void 0&&($t=mt),Object.defineProperty(Se,$t,{enumerable:!0,get:function(){return Fe[mt]}})}:function(Se,Fe,mt,$t){$t===void 0&&($t=mt),Se[$t]=Fe[mt]}),y=i&&i.__setModuleDefault||(Object.create?function(Se,Fe){Object.defineProperty(Se,"default",{enumerable:!0,value:Fe})}:function(Se,Fe){Se.default=Fe}),S=i&&i.__importStar||function(Se){if(Se&&Se.__esModule)return Se;var Fe={};if(Se!=null)for(var mt in Se)mt!=="default"&&Object.prototype.hasOwnProperty.call(Se,mt)&&h(Fe,Se,mt);return y(Fe,Se),Fe},f=i&&i.__classPrivateFieldSet||function(Se,Fe,mt,$t,hr){if($t==="m")throw new TypeError("Private method is not writable");if($t==="a"&&!hr)throw new TypeError("Private accessor was defined without a setter");if(typeof Fe=="function"?Se!==Fe||!hr:!Fe.has(Se))throw new TypeError("Cannot write private member to an object whose class did not declare it");return $t==="a"?hr.call(Se,mt):hr?hr.value=mt:Fe.set(Se,mt),mt},g=i&&i.__classPrivateFieldGet||function(Se,Fe,mt,$t){if(mt==="a"&&!$t)throw new TypeError("Private accessor was defined without a getter");if(typeof Fe=="function"?Se!==Fe||!$t:!Fe.has(Se))throw new TypeError("Cannot read private member from an object whose class did not declare it");return mt==="m"?$t:mt==="a"?$t.call(Se):$t?$t.value:Fe.get(Se)},x=i&&i.__importDefault||function(Se){return Se&&Se.__esModule?Se:{default:Se}},P,O,B;Object.defineProperty(i,"__esModule",{value:!0}),i.TonClient4=void 0;var N=x(Z8()),R=S(y_()),re=Ya(),_e=Yz(),Ce=class{constructor(Se){P.set(this,void 0),O.set(this,void 0),B.set(this,void 0),f(this,P,Se.endpoint,"f"),f(this,O,Se.timeout||5e3,"f"),f(this,B,Se.httpAdapter,"f")}async getLastBlock(){let Se=await N.default.get(g(this,P,"f")+"/block/latest",{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!Ve.is(Se.data))throw Error("Mailformed response");return Se.data}async getBlock(Se){let Fe=await N.default.get(g(this,P,"f")+"/block/"+Se,{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!Pe.is(Fe.data))throw Error("Mailformed response");if(!Fe.data.exist)throw Error("Block is out of scope");return Fe.data.block}async getBlockByUtime(Se){let Fe=await N.default.get(g(this,P,"f")+"/block/utime/"+Se,{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!Pe.is(Fe.data))throw Error("Mailformed response");if(!Fe.data.exist)throw Error("Block is out of scope");return Fe.data.block}async getAccount(Se,Fe){let mt=await N.default.get(g(this,P,"f")+"/block/"+Se+"/"+Fe.toString({urlSafe:!0}),{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!et.is(mt.data))throw Error("Mailformed response");return mt.data}async getAccountLite(Se,Fe){let mt=await N.default.get(g(this,P,"f")+"/block/"+Se+"/"+Fe.toString({urlSafe:!0})+"/lite",{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!_t.is(mt.data))throw Error("Mailformed response");return mt.data}async isContractDeployed(Se,Fe){return(await this.getAccountLite(Se,Fe)).account.state.type==="active"}async isAccountChanged(Se,Fe,mt){let $t=await N.default.get(g(this,P,"f")+"/block/"+Se+"/"+Fe.toString({urlSafe:!0})+"/changed/"+mt.toString(10),{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!Ue.is($t.data))throw Error("Mailformed response");return $t.data}async getTransaction(Se,Fe,mt){let $t=Fe.toString({urlSafe:!0}),hr=`/block/${Se}/${$t}/tx/${mt.toString(10)}`,kr=await N.default.get(new URL(hr,g(this,P,"f")).href,{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!Be.is(kr.data))throw Error("Mailformed response");let qr=re.Cell.fromBoc(yt.from(kr.data.boc,"base64"))[0];return{tx:(0,re.loadTransaction)(qr.beginParse()),...kr.data}}async getAccountTransactions(Se,Fe,mt){let $t=await N.default.get(g(this,P,"f")+"/account/"+Se.toString({urlSafe:!0})+"/tx/"+Fe.toString(10)+"/"+(0,_e.toUrlSafe)(mt.toString("base64")),{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!Je.is($t.data))throw Error("Mailformed response");let hr=$t.data,kr=[],qr=re.Cell.fromBoc(yt.from(hr.boc,"base64"));for(let jn=0;jn0&&(mt="/"+[...Fe].sort().join(","));let $t=await N.default.get(g(this,P,"f")+"/block/"+Se+"/config"+mt,{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!ht.is($t.data))throw Error("Mailformed response");return $t.data}async runMethod(Se,Fe,mt,$t){let hr=$t&&$t.length>0?"/"+(0,_e.toUrlSafe)((0,re.serializeTuple)($t).toBoc({idx:!1,crc32:!1}).toString("base64")):"",kr=g(this,P,"f")+"/block/"+Se+"/"+Fe.toString({urlSafe:!0})+"/run/"+mt+hr,qr=await N.default.get(kr,{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!We.is(qr.data))throw Error("Mailformed response");let jn=qr.data.resultRaw?(0,re.parseTuple)(re.Cell.fromBoc(yt.from(qr.data.resultRaw,"base64"))[0]):[];return{exitCode:qr.data.exitCode,result:jn,resultRaw:qr.data.resultRaw,block:qr.data.block,shardBlock:qr.data.shardBlock,reader:new re.TupleReader(jn)}}async sendMessage(Se){let Fe=await N.default.post(g(this,P,"f")+"/send",{boc:Se.toString("base64")},{adapter:g(this,B,"f"),timeout:g(this,O,"f")});if(!gt.is(Fe.data))throw Error("Mailformed response");return{status:Fe.data.status}}open(Se){return(0,re.openContract)(Se,Fe=>qe(this,null,Fe.address,Fe.init))}openAt(Se,Fe){return(0,re.openContract)(Fe,mt=>qe(this,Se,mt.address,mt.init))}provider(Se,Fe){return qe(this,null,Se,Fe||null)}providerAt(Se,Fe,mt){return qe(this,Se,Fe,mt||null)}};i.TonClient4=Ce,P=new WeakMap,O=new WeakMap,B=new WeakMap;function qe(Se,Fe,mt,$t){return{async getState(){let hr=Fe;hr===null&&(hr=(await Se.getLastBlock()).last.seqno);let kr=await Se.getAccount(hr,mt),qr=kr.account.last?{lt:BigInt(kr.account.last.lt),hash:yt.from(kr.account.last.hash,"base64")}:null,jn;if(kr.account.state.type==="active")jn={type:"active",code:kr.account.state.code?yt.from(kr.account.state.code,"base64"):null,data:kr.account.state.data?yt.from(kr.account.state.data,"base64"):null};else if(kr.account.state.type==="uninit")jn={type:"uninit"};else if(kr.account.state.type==="frozen")jn={type:"frozen",stateHash:yt.from(kr.account.state.stateHash,"base64")};else throw Error("Unsupported state");return{balance:BigInt(kr.account.balance.coins),last:qr,state:jn}},async get(hr,kr){let qr=Fe;qr===null&&(qr=(await Se.getLastBlock()).last.seqno);let jn=await Se.runMethod(qr,mt,hr,kr);if(jn.exitCode!==0&&jn.exitCode!==1)throw Error("Exit code: "+jn.exitCode);return{stack:new re.TupleReader(jn.result)}},async external(hr){let kr=await Se.getLastBlock(),qr=null;$t&&(await Se.getAccountLite(kr.last.seqno,mt)).account.state.type!=="active"&&(qr=$t);let jn=(0,re.external)({to:mt,init:qr?{code:qr.code,data:qr.data}:null,body:hr}),Qt=(0,re.beginCell)().store((0,re.storeMessage)(jn)).endCell().toBoc();await Se.sendMessage(Qt)},async internal(hr,kr){let qr=await Se.getLastBlock(),jn=null;$t&&(await Se.getAccountLite(qr.last.seqno,mt)).account.state.type!=="active"&&(jn=$t);let Qt=!0;kr.bounce!==null&&kr.bounce!==void 0&&(Qt=kr.bounce);let ti;typeof kr.value=="string"?ti=(0,re.toNano)(kr.value):ti=kr.value;let ii=null;typeof kr.body=="string"?ii=(0,re.comment)(kr.body):kr.body&&(ii=kr.body),await hr.send({to:mt,value:ti,bounce:Qt,sendMode:kr.sendMode,init:jn,body:ii})}}}var Ve=R.type({last:R.type({seqno:R.number,shard:R.string,workchain:R.number,fileHash:R.string,rootHash:R.string}),init:R.type({fileHash:R.string,rootHash:R.string}),stateRootHash:R.string,now:R.number}),Pe=R.union([R.type({exist:R.literal(!1)}),R.type({exist:R.literal(!0),block:R.type({shards:R.array(R.type({workchain:R.number,seqno:R.number,shard:R.string,rootHash:R.string,fileHash:R.string,transactions:R.array(R.type({account:R.string,hash:R.string,lt:R.string}))}))})})]),Qe=R.type({lastPaid:R.number,duePayment:R.union([R.null,R.string]),used:R.type({bits:R.number,cells:R.number,publicCells:R.number})}),et=R.type({account:R.type({state:R.union([R.type({type:R.literal("uninit")}),R.type({type:R.literal("active"),code:R.union([R.string,R.null]),data:R.union([R.string,R.null])}),R.type({type:R.literal("frozen"),stateHash:R.string})]),balance:R.type({coins:R.string}),last:R.union([R.null,R.type({lt:R.string,hash:R.string})]),storageStat:R.union([R.null,Qe])}),block:R.type({workchain:R.number,seqno:R.number,shard:R.string,rootHash:R.string,fileHash:R.string})}),_t=R.type({account:R.type({state:R.union([R.type({type:R.literal("uninit")}),R.type({type:R.literal("active"),codeHash:R.string,dataHash:R.string}),R.type({type:R.literal("frozen"),stateHash:R.string})]),balance:R.type({coins:R.string}),last:R.union([R.null,R.type({lt:R.string,hash:R.string})]),storageStat:R.union([R.null,Qe])})}),Ue=R.type({changed:R.boolean,block:R.type({workchain:R.number,seqno:R.number,shard:R.string,rootHash:R.string,fileHash:R.string})}),We=R.type({exitCode:R.number,resultRaw:R.union([R.string,R.null]),block:R.type({workchain:R.number,seqno:R.number,shard:R.string,rootHash:R.string,fileHash:R.string}),shardBlock:R.type({workchain:R.number,seqno:R.number,shard:R.string,rootHash:R.string,fileHash:R.string})}),ht=R.type({config:R.type({cell:R.string,address:R.string,globalBalance:R.type({coins:R.string})})}),gt=R.type({status:R.number}),Je=R.type({blocks:R.array(R.type({workchain:R.number,seqno:R.number,shard:R.string,rootHash:R.string,fileHash:R.string})),boc:R.string}),Be=R.type({block:R.type({workchain:R.number,seqno:R.number,shard:R.string,rootHash:R.string}),boc:R.string,proof:R.string})}),zc=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.createWalletTransferV4=i.createWalletTransferV3=i.createWalletTransferV2=i.createWalletTransferV1=void 0;var h=Ya(),y=Mp();function S(P){let O=(0,h.beginCell)().storeUint(P.seqno,32);P.message&&(O.storeUint(P.sendMode,8),O.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(P.message))));let B=(0,y.sign)(O.endCell().hash(),P.secretKey);return(0,h.beginCell)().storeBuffer(B).storeBuilder(O).endCell()}i.createWalletTransferV1=S;function f(P){if(P.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let O=(0,h.beginCell)().storeUint(P.seqno,32);if(P.seqno===0)for(let N=0;N<32;N++)O.storeBit(1);else O.storeUint(P.timeout||Math.floor(Date.now()/1e3)+60,32);for(let N of P.messages)O.storeUint(P.sendMode,8),O.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(N)));let B=(0,y.sign)(O.endCell().hash(),P.secretKey);return(0,h.beginCell)().storeBuffer(B).storeBuilder(O).endCell()}i.createWalletTransferV2=f;function g(P){if(P.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let O=(0,h.beginCell)().storeUint(P.walletId,32);if(P.seqno===0)for(let N=0;N<32;N++)O.storeBit(1);else O.storeUint(P.timeout||Math.floor(Date.now()/1e3)+60,32);O.storeUint(P.seqno,32);for(let N of P.messages)O.storeUint(P.sendMode,8),O.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(N)));let B=(0,y.sign)(O.endCell().hash(),P.secretKey);return(0,h.beginCell)().storeBuffer(B).storeBuilder(O).endCell()}i.createWalletTransferV3=g;function x(P){if(P.messages.length>4)throw Error("Maximum number of messages in a single transfer is 4");let O=(0,h.beginCell)().storeUint(P.walletId,32);if(P.seqno===0)for(let N=0;N<32;N++)O.storeBit(1);else O.storeUint(P.timeout||Math.floor(Date.now()/1e3)+60,32);O.storeUint(P.seqno,32),O.storeUint(0,8);for(let N of P.messages)O.storeUint(P.sendMode,8),O.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(N)));let B=(0,y.sign)(O.endCell().hash(),P.secretKey);return(0,h.beginCell)().storeBuffer(B).storeBuilder(O).endCell()}i.createWalletTransferV4=x}),Zz=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV1R1=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let x=h.Cell.fromBoc(yt.from("te6cckEBAQEARAAAhP8AIN2k8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVEH98Ik=","base64"))[0],P=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:x,data:P},this.address=(0,h.contractAddress)(f,{code:x,data:P})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){let g=await f.getState();return g.state.type==="active"?h.Cell.fromBoc(g.state.data)[0].beginParse().loadUint(32):0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV1)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,message:f.message})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,message:(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})});await this.send(f,O)}}}};i.WalletContractV1R1=S}),Xz=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV1R2=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let x=h.Cell.fromBoc(yt.from("te6cckEBAQEAUwAAov8AIN0gggFMl7qXMO1E0NcLH+Ck8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVNDieG8=","base64"))[0],P=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:x,data:P},this.address=(0,h.contractAddress)(f,{code:x,data:P})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV1)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,message:f.message})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,message:(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})});await this.send(f,O)}}}};i.WalletContractV1R2=S}),Jz=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV1R3=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let x=h.Cell.fromBoc(yt.from("te6cckEBAQEAXwAAuv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCBAgDXGCDXCx/tRNDTH9P/0VESuvKhIvkBVBBE+RDyovgAAdMfMSDXSpbTB9QC+wDe0aTIyx/L/8ntVLW4bkI=","base64"))[0],P=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:x,data:P},this.address=(0,h.contractAddress)(f,{code:x,data:P})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV1)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,message:f.message})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,message:(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})});await this.send(f,O)}}}};i.WalletContractV1R3=S}),eH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV2R1=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let x=h.Cell.fromBoc(yt.from("te6cckEBAQEAVwAAqv8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VShNwu2","base64"))[0],P=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:x,data:P},this.address=(0,h.contractAddress)(f,{code:x,data:P})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV2)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,messages:[(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})]});await this.send(f,O)}}}};i.WalletContractV2R1=S}),tH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV2R2=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g){this.workchain=f,this.publicKey=g;let x=h.Cell.fromBoc(yt.from("te6cckEBAQEAYwAAwv8AIN0gggFMl7ohggEznLqxnHGw7UTQ0x/XC//jBOCk8mCDCNcYINMf0x8B+CO78mPtRNDTH9P/0VExuvKhA/kBVBBC+RDyovgAApMg10qW0wfUAvsA6NGkyMsfy//J7VQETNeh","base64"))[0],P=(0,h.beginCell)().storeUint(0,32).storeBuffer(g).endCell();this.init={code:x,data:P},this.address=(0,h.contractAddress)(f,{code:x,data:P})}static create(f){return new S(f.workchain,f.publicKey)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV2)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,messages:[(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})]});await this.send(f,O)}}}};i.WalletContractV2R2=S}),rH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV3R1=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g,x){this.workchain=f,this.publicKey=g,x!=null?this.walletId=x:this.walletId=698983191+f;let P=h.Cell.fromBoc(yt.from("te6cckEBAQEAYgAAwP8AIN0gggFMl7qXMO1E0NcLH+Ck8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVD++buA=","base64"))[0],O=(0,h.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(g).endCell();this.init={code:P,data:O},this.address=(0,h.contractAddress)(f,{code:P,data:O})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV3)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,messages:[(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})]});await this.send(f,O)}}}};i.WalletContractV3R1=S}),nH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV3R2=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g,x){this.workchain=f,this.publicKey=g,x!=null?this.walletId=x:this.walletId=698983191+f;let P=h.Cell.fromBoc(yt.from("te6cckEBAQEAcQAA3v8AIN0gggFMl7ohggEznLqxn3Gw7UTQ0x/THzHXC//jBOCk8mCDCNcYINMf0x/TH/gjE7vyY+1E0NMf0x/T/9FRMrryoVFEuvKiBPkBVBBV+RDyo/gAkyDXSpbTB9QC+wDo0QGkyMsfyx/L/8ntVBC9ba0=","base64"))[0],O=(0,h.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(g).endCell();this.init={code:P,data:O},this.address=(0,h.contractAddress)(f,{code:P,data:O})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV3)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,messages:[(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})]});await this.send(f,O)}}}};i.WalletContractV3R2=S}),iH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.WalletContractV4=void 0;var h=Ya(),y=zc(),S=class{constructor(f,g,x){this.workchain=f,this.publicKey=g,x!=null?this.walletId=x:this.walletId=698983191+f;let P=h.Cell.fromBoc(yt.from("te6ccgECFAEAAtQAART/APSkE/S88sgLAQIBIAIDAgFIBAUE+PKDCNcYINMf0x/THwL4I7vyZO1E0NMf0x/T//QE0VFDuvKhUVG68qIF+QFUEGT5EPKj+AAkpMjLH1JAyx9SMMv/UhD0AMntVPgPAdMHIcAAn2xRkyDXSpbTB9QC+wDoMOAhwAHjACHAAuMAAcADkTDjDQOkyMsfEssfy/8QERITAubQAdDTAyFxsJJfBOAi10nBIJJfBOAC0x8hghBwbHVnvSKCEGRzdHK9sJJfBeAD+kAwIPpEAcjKB8v/ydDtRNCBAUDXIfQEMFyBAQj0Cm+hMbOSXwfgBdM/yCWCEHBsdWe6kjgw4w0DghBkc3RyupJfBuMNBgcCASAICQB4AfoA9AQw+CdvIjBQCqEhvvLgUIIQcGx1Z4MesXCAGFAEywUmzxZY+gIZ9ADLaRfLH1Jgyz8gyYBA+wAGAIpQBIEBCPRZMO1E0IEBQNcgyAHPFvQAye1UAXKwjiOCEGRzdHKDHrFwgBhQBcsFUAPPFiP6AhPLassfyz/JgED7AJJfA+ICASAKCwBZvSQrb2omhAgKBrkPoCGEcNQICEekk30pkQzmkD6f+YN4EoAbeBAUiYcVnzGEAgFYDA0AEbjJftRNDXCx+AA9sp37UTQgQFA1yH0BDACyMoHy//J0AGBAQj0Cm+hMYAIBIA4PABmtznaiaEAga5Drhf/AABmvHfaiaEAQa5DrhY/AAG7SB/oA1NQi+QAFyMoHFcv/ydB3dIAYyMsFywIizxZQBfoCFMtrEszMyXP7AMhAFIEBCPRR8qcCAHCBAQjXGPoA0z/IVCBHgQEI9FHyp4IQbm90ZXB0gBjIywXLAlAGzxZQBPoCFMtqEssfyz/Jc/sAAgBsgQEI1xj6ANM/MFIkgQEI9Fnyp4IQZHN0cnB0gBjIywXLAlAFzxZQA/oCE8tqyx8Syz/Jc/sAAAr0AMntVA==","base64"))[0],O=(0,h.beginCell)().storeUint(0,32).storeUint(this.walletId,32).storeBuffer(this.publicKey).storeBit(0).endCell();this.init={code:P,data:O},this.address=(0,h.contractAddress)(f,{code:P,data:O})}static create(f){return new S(f.workchain,f.publicKey,f.walletId)}async getBalance(f){return(await f.getState()).balance}async getSeqno(f){return(await f.getState()).state.type==="active"?(await f.get("seqno",[])).stack.readNumber():0}async send(f,g){await f.external(g)}async sendTransfer(f,g){let x=this.createTransfer(g);await this.send(f,x)}createTransfer(f){let g=h.SendMode.PAY_GAS_SEPARATELY;return f.sendMode!==null&&f.sendMode!==void 0&&(g=f.sendMode),(0,y.createWalletTransferV4)({seqno:f.seqno,sendMode:g,secretKey:f.secretKey,messages:f.messages,timeout:f.timeout,walletId:this.walletId})}sender(f,g){return{send:async x=>{let P=await this.getSeqno(f),O=this.createTransfer({seqno:P,secretKey:g,sendMode:x.sendMode,messages:[(0,h.internal)({to:x.to,value:x.value,init:x.init,body:x.body,bounce:x.bounce})]});await this.send(f,O)}}}};i.WalletContractV4=S}),oH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.JettonMaster=void 0;var h=Ya(),y=class{constructor(S){this.address=S}static create(S){return new y(S)}async getWalletAddress(S,f){return(await S.get("get_wallet_address",[{type:"slice",cell:(0,h.beginCell)().storeAddress(f).endCell()}])).stack.readAddress()}async getJettonData(S){let f=await S.get("get_jetton_data",[]),g=f.stack.readBigNumber(),x=f.stack.readBoolean(),P=f.stack.readAddress(),O=f.stack.readCell(),B=f.stack.readCell();return{totalSupply:g,mintable:x,adminAddress:P,content:O,walletCode:B}}};i.JettonMaster=y}),aH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.JettonWallet=void 0;var h=class{constructor(y){this.address=y}static create(y){return new h(y)}async getBalance(y){return(await y.getState()).state.type!=="active"?0n:(await y.get("get_wallet_data",[])).stack.readBigNumber()}};i.JettonWallet=h}),J8=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigOrder=void 0;var h=Mp(),y=Ya(),S=class{constructor(f){this.signatures={},this.payload=f}static fromCell(f){let g=f.beginParse(),x=g.loadMaybeRef()?.beginParse(),P=g.asCell(),O=new S(P);if(x){for(;x.remainingBits>0;){let B=x.loadBuffer(64),N=x.loadUint(8);O.signatures[N]=B,x.remainingRefs>0?x=x.loadRef().asSlice():x.skip(1)}x.endParse()}return O}static fromPayload(f){return new S(f)}addSignature(f,g,x){let P=this.payload.hash();if(!(0,h.signVerify)(P,g,x.owners.get(f).slice(0,-1)))throw Error("invalid signature");this.signatures[f]=g}sign(f,g){let x=this.payload.hash();return this.signatures[f]=(0,h.sign)(x,g),x}unionSignatures(f){this.signatures=Object.assign({},this.signatures,f.signatures)}clearSignatures(){this.signatures={}}toCell(f){let g=(0,y.beginCell)().storeBit(0);for(let x in this.signatures){let P=this.signatures[x];g=(0,y.beginCell)().storeBit(1).storeRef((0,y.beginCell)().storeBuffer(P).storeUint(parseInt(x),8).storeBuilder(g).endCell())}return(0,y.beginCell)().storeUint(f,8).storeBuilder(g).storeBuilder(this.payload.asBuilder()).endCell()}};i.MultisigOrder=S}),sH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigOrderBuilder=void 0;var h=Ya(),y=J8(),S=class{constructor(f,g){this.messages=(0,h.beginCell)(),this.queryId=0n,this.walletId=f,this.queryOffset=g||7200}addMessage(f,g){if(this.messages.refs>=4)throw Error("only 4 refs are allowed");this.updateQueryId(),this.messages.storeUint(g,8),this.messages.storeRef((0,h.beginCell)().store((0,h.storeMessageRelaxed)(f)).endCell())}clearMessages(){this.messages=(0,h.beginCell)()}build(){return y.MultisigOrder.fromPayload((0,h.beginCell)().storeUint(this.walletId,32).storeUint(this.queryId,64).storeBuilder(this.messages).endCell())}updateQueryId(){let f=BigInt(Math.floor(Date.now()/1e3+this.queryOffset));this.queryId=f<<32n}};i.MultisigOrderBuilder=S}),lH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigWallet=void 0;var h=Mp(),y=Ya(),S=y.Cell.fromBase64("te6ccgECKwEABBgAART/APSkE/S88sgLAQIBIAIDAgFIBAUE2vIgxwCOgzDbPOCDCNcYIPkBAdMH2zwiwAAToVNxePQOb6Hyn9s8VBq6+RDyoAb0BCD5AQHTH1EYuvKq0z9wUwHwCgHCCAGDCryx8mhTFYBA9A5voSCYDqQgwgryZw7f+COqH1NAufJhVCOjU04gIyEiAgLMBgcCASAMDQIBIAgJAgFmCgsAA9GEAiPymAvHoHN9CYbZ5S7Z4BPHohwhJQAtAKkItdJEqCTItdKlwLUAdAT8ArobBKAATwhbpEx4CBukTDgAdAg10rDAJrUAvALyFjPFszJ4HHXI8gBzxb0AMmACASAODwIBIBQVARW77ZbVA0cFUg2zyCoCAUgQEQIBIBITAXOxHXQgwjXGCD5AQHTB4IB1MTtQ9hTIHj0Dm+h8p/XC/9eMfkQ8qCuAfQEIW6TW3Ey4PkBWNs8AaQBgJwA9rtqA6ADoAPoCAXoCEfyAgPyA3XlP+AXkegAA54tkwAAXrhlXP8EA1WZ2oexAAgEgFhcCASAYGQFRtyVbZ4YmRmpGEAgegc30McJNhFpAADMaYeYuAFrgJhwLb+4cC3d0bhAjAYm1WZtnhqvgb+2xxsoicAgej430pBHEoFpAADHDhBACGuQkuuBk9kUWE5kAOeLKhACQCB6IYFImHFImHFImXEA2YlzNijAjAgEgGhsAF7UGtc4QQDVZnah7EAIBIBwdAgOZOB4fARGsGm2eL4G2CUAjABWt+UEAzJV2oewYQAENqTbPBVfBYCMAFa3f3CCAarM7UPYgAiDbPALyZfgAUENxQxPbPO1UIyoACtP/0wcwBKDbPC+uUyCw8mISsQKkJbNTHLmwJYEA4aojoCi8sPJpggGGoPgBBZcCERACPj4wjo0REB/bPEDXePRDEL0F4lQWW1Rz51YQU9zbPFRxClR6vCQlKCYAIO1E0NMf0wfTB9M/9AT0BNEAXgGOGjDSAAHyo9MH0wdQA9cBIPkBBfkBFbrypFAD4GwhIddKqgIi10m68qtwVCATAAwByMv/ywcE1ts87VT4D3AlblOJvrGYEG4QLVDHXwePGzBUJANQTds8UFWgRlAQSRA6SwlTuds8UFQWf+L4AAeDJaGOLCaAQPSWb6UglDBTA7neII4WODk5CNIAAZfTBzAW8AcFkTDifwgHBZJsMeKz5jAGKicoKQBgcI4pA9CDCNcY0wf0BDBTFnj0Dm+h8qXXC/9URUT5EPKmrlIgsVIDvRShI27mbCIyAH5SML6OIF8D+ACTItdKmALTB9QC+wAC6DJwyMoAQBSAQPRDAvAHjhdxyMsAFMsHEssHWM8BWM8WQBOAQPRDAeIBII6KEEUQNEMA2zztVJJfBuIqABzIyx/LB8sHyz/0APQAyQ=="),f=class{constructor(g,x,P,O,B){this.provider=null,this.owners=y.Dictionary.empty(),this.workchain=x,this.walletId=P,this.k=O;for(let N=0;N{b(),m(),_(),xt(),ce();var h=i&&i.__createBinding||(Object.create?function(et,_t,Ue,We){We===void 0&&(We=Ue),Object.defineProperty(et,We,{enumerable:!0,get:function(){return _t[Ue]}})}:function(et,_t,Ue,We){We===void 0&&(We=Ue),et[We]=_t[Ue]}),y=i&&i.__exportStar||function(et,_t){for(var Ue in et)Ue!=="default"&&!Object.prototype.hasOwnProperty.call(_t,Ue)&&h(_t,et,Ue)};Object.defineProperty(i,"__esModule",{value:!0}),i.MultisigWallet=i.MultisigOrderBuilder=i.MultisigOrder=i.JettonWallet=i.JettonMaster=i.WalletContractV4=i.WalletContractV3R2=i.WalletContractV3R1=i.WalletContractV2R2=i.WalletContractV2R1=i.WalletContractV1R3=i.WalletContractV1R2=i.WalletContractV1R1=i.TonClient4=i.TonClient=i.HttpApi=void 0,y(Ya(),i);var S=X8();Object.defineProperty(i,"HttpApi",{enumerable:!0,get:function(){return S.HttpApi}});var f=Gz();Object.defineProperty(i,"TonClient",{enumerable:!0,get:function(){return f.TonClient}});var g=Qz();Object.defineProperty(i,"TonClient4",{enumerable:!0,get:function(){return g.TonClient4}});var x=Zz();Object.defineProperty(i,"WalletContractV1R1",{enumerable:!0,get:function(){return x.WalletContractV1R1}});var P=Xz();Object.defineProperty(i,"WalletContractV1R2",{enumerable:!0,get:function(){return P.WalletContractV1R2}});var O=Jz();Object.defineProperty(i,"WalletContractV1R3",{enumerable:!0,get:function(){return O.WalletContractV1R3}});var B=eH();Object.defineProperty(i,"WalletContractV2R1",{enumerable:!0,get:function(){return B.WalletContractV2R1}});var N=tH();Object.defineProperty(i,"WalletContractV2R2",{enumerable:!0,get:function(){return N.WalletContractV2R2}});var R=rH();Object.defineProperty(i,"WalletContractV3R1",{enumerable:!0,get:function(){return R.WalletContractV3R1}});var re=nH();Object.defineProperty(i,"WalletContractV3R2",{enumerable:!0,get:function(){return re.WalletContractV3R2}});var _e=iH();Object.defineProperty(i,"WalletContractV4",{enumerable:!0,get:function(){return _e.WalletContractV4}});var Ce=oH();Object.defineProperty(i,"JettonMaster",{enumerable:!0,get:function(){return Ce.JettonMaster}});var qe=aH();Object.defineProperty(i,"JettonWallet",{enumerable:!0,get:function(){return qe.JettonWallet}});var Ve=J8();Object.defineProperty(i,"MultisigOrder",{enumerable:!0,get:function(){return Ve.MultisigOrder}});var Pe=sH();Object.defineProperty(i,"MultisigOrderBuilder",{enumerable:!0,get:function(){return Pe.MultisigOrderBuilder}});var Qe=lH();Object.defineProperty(i,"MultisigWallet",{enumerable:!0,get:function(){return Qe.MultisigWallet}})}),cH=u((i,h)=>{b(),m(),_(),xt(),ce(),function(y,S){S(typeof i=="object"&&typeof h<"u"?i:y.WHATWGFetch={})}(i,function(y){var S=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof S<"u"&&S,f={searchParams:"URLSearchParams"in S,iterable:"Symbol"in S&&"iterator"in Symbol,blob:"FileReader"in S&&"Blob"in S&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in S,arrayBuffer:"ArrayBuffer"in S};function g(Se){return Se&&DataView.prototype.isPrototypeOf(Se)}if(f.arrayBuffer)var x=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],P=ArrayBuffer.isView||function(Se){return Se&&x.indexOf(Object.prototype.toString.call(Se))>-1};function O(Se){if(typeof Se!="string"&&(Se=String(Se)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(Se)||Se==="")throw new TypeError('Invalid character in header field name: "'+Se+'"');return Se.toLowerCase()}function B(Se){return typeof Se!="string"&&(Se=String(Se)),Se}function N(Se){var Fe={next:function(){var mt=Se.shift();return{done:mt===void 0,value:mt}}};return f.iterable&&(Fe[Symbol.iterator]=function(){return Fe}),Fe}function R(Se){this.map={},Se instanceof R?Se.forEach(function(Fe,mt){this.append(mt,Fe)},this):Array.isArray(Se)?Se.forEach(function(Fe){this.append(Fe[0],Fe[1])},this):Se&&Object.getOwnPropertyNames(Se).forEach(function(Fe){this.append(Fe,Se[Fe])},this)}R.prototype.append=function(Se,Fe){Se=O(Se),Fe=B(Fe);var mt=this.map[Se];this.map[Se]=mt?mt+", "+Fe:Fe},R.prototype.delete=function(Se){delete this.map[O(Se)]},R.prototype.get=function(Se){return Se=O(Se),this.has(Se)?this.map[Se]:null},R.prototype.has=function(Se){return this.map.hasOwnProperty(O(Se))},R.prototype.set=function(Se,Fe){this.map[O(Se)]=B(Fe)},R.prototype.forEach=function(Se,Fe){for(var mt in this.map)this.map.hasOwnProperty(mt)&&Se.call(Fe,this.map[mt],mt,this)},R.prototype.keys=function(){var Se=[];return this.forEach(function(Fe,mt){Se.push(mt)}),N(Se)},R.prototype.values=function(){var Se=[];return this.forEach(function(Fe){Se.push(Fe)}),N(Se)},R.prototype.entries=function(){var Se=[];return this.forEach(function(Fe,mt){Se.push([mt,Fe])}),N(Se)},f.iterable&&(R.prototype[Symbol.iterator]=R.prototype.entries);function re(Se){if(Se.bodyUsed)return Promise.reject(new TypeError("Already read"));Se.bodyUsed=!0}function _e(Se){return new Promise(function(Fe,mt){Se.onload=function(){Fe(Se.result)},Se.onerror=function(){mt(Se.error)}})}function Ce(Se){var Fe=new FileReader,mt=_e(Fe);return Fe.readAsArrayBuffer(Se),mt}function qe(Se){var Fe=new FileReader,mt=_e(Fe);return Fe.readAsText(Se),mt}function Ve(Se){for(var Fe=new Uint8Array(Se),mt=new Array(Fe.length),$t=0;$t-1?Fe:Se}function Ue(Se,Fe){if(!(this instanceof Ue))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Fe=Fe||{};var mt=Fe.body;if(Se instanceof Ue){if(Se.bodyUsed)throw new TypeError("Already read");this.url=Se.url,this.credentials=Se.credentials,Fe.headers||(this.headers=new R(Se.headers)),this.method=Se.method,this.mode=Se.mode,this.signal=Se.signal,!mt&&Se._bodyInit!=null&&(mt=Se._bodyInit,Se.bodyUsed=!0)}else this.url=String(Se);if(this.credentials=Fe.credentials||this.credentials||"same-origin",(Fe.headers||!this.headers)&&(this.headers=new R(Fe.headers)),this.method=_t(Fe.method||this.method||"GET"),this.mode=Fe.mode||this.mode||null,this.signal=Fe.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&mt)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(mt),(this.method==="GET"||this.method==="HEAD")&&(Fe.cache==="no-store"||Fe.cache==="no-cache")){var $t=/([?&])_=[^&]*/;if($t.test(this.url))this.url=this.url.replace($t,"$1_="+new Date().getTime());else{var hr=/\?/;this.url+=(hr.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}Ue.prototype.clone=function(){return new Ue(this,{body:this._bodyInit})};function We(Se){var Fe=new FormData;return Se.trim().split("&").forEach(function(mt){if(mt){var $t=mt.split("="),hr=$t.shift().replace(/\+/g," "),kr=$t.join("=").replace(/\+/g," ");Fe.append(decodeURIComponent(hr),decodeURIComponent(kr))}}),Fe}function ht(Se){var Fe=new R,mt=Se.replace(/\r?\n[\t ]+/g," ");return mt.split("\r").map(function($t){return $t.indexOf(`
`)===0?$t.substr(1,$t.length):$t}).forEach(function($t){var hr=$t.split(":"),kr=hr.shift().trim();if(kr){var qr=hr.join(":").trim();Fe.append(kr,qr)}}),Fe}Qe.call(Ue.prototype);function gt(Se,Fe){if(!(this instanceof gt))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Fe||(Fe={}),this.type="default",this.status=Fe.status===void 0?200:Fe.status,this.ok=this.status>=200&&this.status<300,this.statusText=Fe.statusText===void 0?"":""+Fe.statusText,this.headers=new R(Fe.headers),this.url=Fe.url||"",this._initBody(Se)}Qe.call(gt.prototype),gt.prototype.clone=function(){return new gt(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new R(this.headers),url:this.url})},gt.error=function(){var Se=new gt(null,{status:0,statusText:""});return Se.type="error",Se};var Je=[301,302,303,307,308];gt.redirect=function(Se,Fe){if(Je.indexOf(Fe)===-1)throw new RangeError("Invalid status code");return new gt(null,{status:Fe,headers:{location:Se}})},y.DOMException=S.DOMException;try{new y.DOMException}catch{y.DOMException=function(Se,Fe){this.message=Se,this.name=Fe;var mt=Error(Se);this.stack=mt.stack},y.DOMException.prototype=Object.create(Error.prototype),y.DOMException.prototype.constructor=y.DOMException}function Be(Se,Fe){return new Promise(function(mt,$t){var hr=new Ue(Se,Fe);if(hr.signal&&hr.signal.aborted)return $t(new y.DOMException("Aborted","AbortError"));var kr=new XMLHttpRequest;function qr(){kr.abort()}kr.onload=function(){var Qt={status:kr.status,statusText:kr.statusText,headers:ht(kr.getAllResponseHeaders()||"")};Qt.url="responseURL"in kr?kr.responseURL:Qt.headers.get("X-Request-URL");var ti="response"in kr?kr.response:kr.responseText;setTimeout(function(){mt(new gt(ti,Qt))},0)},kr.onerror=function(){setTimeout(function(){$t(new TypeError("Network request failed"))},0)},kr.ontimeout=function(){setTimeout(function(){$t(new TypeError("Network request failed"))},0)},kr.onabort=function(){setTimeout(function(){$t(new y.DOMException("Aborted","AbortError"))},0)};function jn(Qt){try{return Qt===""&&S.location.href?S.location.href:Qt}catch{return Qt}}kr.open(hr.method,jn(hr.url),!0),hr.credentials==="include"?kr.withCredentials=!0:hr.credentials==="omit"&&(kr.withCredentials=!1),"responseType"in kr&&(f.blob?kr.responseType="blob":f.arrayBuffer&&hr.headers.get("Content-Type")&&hr.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(kr.responseType="arraybuffer")),Fe&&typeof Fe.headers=="object"&&!(Fe.headers instanceof R)?Object.getOwnPropertyNames(Fe.headers).forEach(function(Qt){kr.setRequestHeader(Qt,B(Fe.headers[Qt]))}):hr.headers.forEach(function(Qt,ti){kr.setRequestHeader(ti,Qt)}),hr.signal&&(hr.signal.addEventListener("abort",qr),kr.onreadystatechange=function(){kr.readyState===4&&hr.signal.removeEventListener("abort",qr)}),kr.send(typeof hr._bodyInit>"u"?null:hr._bodyInit)})}Be.polyfill=!0,S.fetch||(S.fetch=Be,S.Headers=R,S.Request=Ue,S.Response=gt),y.Headers=R,y.Request=Ue,y.Response=gt,y.fetch=Be,Object.defineProperty(y,"__esModule",{value:!0})})}),dH=u((i,h)=>{b(),m(),_(),xt(),ce(),cH(),h.exports=self.fetch.bind(self)}),fH=u(i=>{b(),m(),_(),xt(),ce();var h=i&&i.__awaiter||function(S,f,g,x){function P(O){return O instanceof g?O:new g(function(B){B(O)})}return new(g||(g=Promise))(function(O,B){function N(_e){try{re(x.next(_e))}catch(Ce){B(Ce)}}function R(_e){try{re(x.throw(_e))}catch(Ce){B(Ce)}}function re(_e){_e.done?O(_e.value):P(_e.value).then(N,R)}re((x=x.apply(S,f||[])).next())})};Object.defineProperty(i,"__esModule",{value:!0}),i.Nodes=void 0,dH();var y=class{constructor(){this.nodeIndex=-1,this.committee=new Set,this.topology=[],this.initTime=0}init(S){return h(this,void 0,void 0,function*(){this.nodeIndex=-1,this.committee.clear(),this.topology=[],this.initTime=Date.now();let f=[];try{f=yield(yield fetch(S)).json()}catch(g){throw new Error(`exception in fetch(${S}): ${g}`)}for(let g of f)g.Healthy==="1"&&this.topology.push(g);if(this.topology.length===0)throw new Error(`no healthy nodes in ${S}`)})}getHealthyFor(S){var f;let g=[];for(let x of this.topology)x.Weight>0&&!((f=x.Mngr)===null||f===void 0)&&f.health[S]&&g.push(x);return g}};i.Nodes=y}),pH=u((i,h)=>{h.exports={name:"@orbs-network/ton-access",version:"2.3.3",description:"Unthrottled anonymous RPC access to TON blockchain via a robust decentralized network",source:"lib/index.js",main:"lib/index.js",types:"lib/index.d.ts",files:["lib/**/*"],scripts:{test:"env mocha -r ts-node/register test/**/*.ts","test:v2":"env mocha -r ts-node/register test/ton-v2.ts","test:v4":"env mocha -r ts-node/register test/ton-v4.ts",cleanup:"rimraf ./lib","build:web:reg":"esbuild ./lib/web.js --bundle --sourcemap --target=es2015 --outfile=./dist/index.js","build:web:min":"esbuild ./lib/web.js --bundle --minify --target=es2015 --outfile=./dist/index.min.js","build:web":"rimraf ./dist && npm run build:web:reg && npm run build:web:min",build:"npm run lint && rimraf ./lib && tsc && npm run build:web",format:'prettier --write "src/**/*.ts"',lint:"tslint -p tsconfig.json",prepare:"npm run build",prepublishOnly:"npm test && npm run lint",preversion:"npm run lint",version:"npm run format && git add -A src",postversion:"git push && git push --tags"},repository:{type:"git",url:"git+https://github.com/orbs-network/ton-access.git"},author:"yuval@orbs.com",license:"MIT",bugs:{url:"https://github.com/orbs-network/ton-access/issues"},homepage:"https://github.com/orbs-network/ton-access#readme",dependencies:{"isomorphic-fetch":"^3.0.0"},devDependencies:{"@types/bn.js":"^5.1.1","@types/chai":"^4.3.4","@types/isomorphic-fetch":"^0.0.36","@types/mocha":"^10.0.0",buffer:"^6.0.3",chai:"^4.3.7",esbuild:"^0.15.14",mocha:"^10.1.0",prettier:"^2.7.1",rimraf:"^3.0.2",ton:"^12.1.3","ton-lite-client":"npm:@truecarry/ton-lite-client@^1.6.1",tonweb:"^0.0.58","ts-node":"^10.9.1",tslib:"^2.4.0",tslint:"^6.1.3","tslint-config-prettier":"^1.18.0"}}}),hH=u(i=>{b(),m(),_(),xt(),ce();var h=i&&i.__awaiter||function(B,N,R,re){function _e(Ce){return Ce instanceof R?Ce:new R(function(qe){qe(Ce)})}return new(R||(R=Promise))(function(Ce,qe){function Ve(et){try{Qe(re.next(et))}catch(_t){qe(_t)}}function Pe(et){try{Qe(re.throw(et))}catch(_t){qe(_t)}}function Qe(et){et.done?Ce(et.value):_e(et.value).then(Ve,Pe)}Qe((re=re.apply(B,N||[])).next())})};Object.defineProperty(i,"__esModule",{value:!0}),i.getHttpV4Endpoint=i.getHttpV4Endpoints=i.getHttpEndpoint=i.getHttpEndpoints=i.Access=void 0;var y=fH(),S=class{constructor(){this.host="ton.access.orbs.network",this.urlVersion=1,this.nodes=new y.Nodes}init(){return h(this,void 0,void 0,function*(){let B=pH();yield this.nodes.init(`https://${this.host}/mngr/nodes?npm_version=${B.version}`)})}makeProtonet(B,N){let R="";switch(B){case"toncenter-api-v2":R+="v2-";break;case"ton-api-v4":R+="v4-";break}return R+=N,R}weightedRandom(B){let N=0;for(let _e of B)N+=_e.Weight;let R=Math.floor(Math.random()*N),re=0;for(let _e of B){if(R>=re&&Ruv,__asyncDelegator:()=>AH,__asyncGenerator:()=>EH,__asyncValues:()=>TH,__await:()=>qg,__awaiter:()=>wH,__classPrivateFieldGet:()=>MH,__classPrivateFieldSet:()=>BH,__createBinding:()=>_H,__decorate:()=>yH,__exportStar:()=>SH,__extends:()=>gH,__generator:()=>xH,__importDefault:()=>PH,__importStar:()=>RH,__makeTemplateObject:()=>IH,__metadata:()=>bH,__param:()=>vH,__read:()=>eA,__rest:()=>mH,__spread:()=>CH,__spreadArrays:()=>kH,__values:()=>__});function gH(i,h){lv(i,h);function y(){this.constructor=i}i.prototype=h===null?Object.create(h):(y.prototype=h.prototype,new y)}function mH(i,h){var y={};for(var S in i)Object.prototype.hasOwnProperty.call(i,S)&&h.indexOf(S)<0&&(y[S]=i[S]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var f=0,S=Object.getOwnPropertySymbols(i);f=0;P--)(x=i[P])&&(g=(f<3?x(g):f>3?x(h,y,g):x(h,y))||g);return f>3&&g&&Object.defineProperty(h,y,g),g}function vH(i,h){return function(y,S){h(y,S,i)}}function bH(i,h){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(i,h)}function wH(i,h,y,S){function f(g){return g instanceof y?g:new y(function(x){x(g)})}return new(y||(y=Promise))(function(g,x){function P(N){try{B(S.next(N))}catch(R){x(R)}}function O(N){try{B(S.throw(N))}catch(R){x(R)}}function B(N){N.done?g(N.value):f(N.value).then(P,O)}B((S=S.apply(i,h||[])).next())})}function xH(i,h){var y={label:0,sent:function(){if(g[0]&1)throw g[1];return g[1]},trys:[],ops:[]},S,f,g,x;return x={next:P(0),throw:P(1),return:P(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function P(B){return function(N){return O([B,N])}}function O(B){if(S)throw new TypeError("Generator is already executing.");for(;y;)try{if(S=1,f&&(g=B[0]&2?f.return:B[0]?f.throw||((g=f.return)&&g.call(f),0):f.next)&&!(g=g.call(f,B[1])).done)return g;switch(f=0,g&&(B=[B[0]&2,g.value]),B[0]){case 0:case 1:g=B;break;case 4:return y.label++,{value:B[1],done:!1};case 5:y.label++,f=B[1],B=[0];continue;case 7:B=y.ops.pop(),y.trys.pop();continue;default:if(g=y.trys,!(g=g.length>0&&g[g.length-1])&&(B[0]===6||B[0]===2)){y=0;continue}if(B[0]===3&&(!g||B[1]>g[0]&&B[1]=i.length&&(i=void 0),{value:i&&i[S++],done:!i}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")}function eA(i,h){var y=typeof Symbol=="function"&&i[Symbol.iterator];if(!y)return i;var S=y.call(i),f,g=[],x;try{for(;(h===void 0||h-- >0)&&!(f=S.next()).done;)g.push(f.value)}catch(P){x={error:P}}finally{try{f&&!f.done&&(y=S.return)&&y.call(S)}finally{if(x)throw x.error}}return g}function CH(){for(var i=[],h=0;h1||P(re,_e)})})}function P(re,_e){try{O(S[re](_e))}catch(Ce){R(g[0][3],Ce)}}function O(re){re.value instanceof qg?Promise.resolve(re.value.v).then(B,N):R(g[0][2],re)}function B(re){P("next",re)}function N(re){P("throw",re)}function R(re,_e){re(_e),g.shift(),g.length&&P(g[0][0],g[0][1])}}function AH(i){var h,y;return h={},S("next"),S("throw",function(f){throw f}),S("return"),h[Symbol.iterator]=function(){return this},h;function S(f,g){h[f]=i[f]?function(x){return(y=!y)?{value:qg(i[f](x)),done:f==="return"}:g?g(x):x}:g}}function TH(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var h=i[Symbol.asyncIterator],y;return h?h.call(i):(i=typeof __=="function"?__(i):i[Symbol.iterator](),y={},S("next"),S("throw"),S("return"),y[Symbol.asyncIterator]=function(){return this},y);function S(g){y[g]=i[g]&&function(x){return new Promise(function(P,O){x=i[g](x),f(P,O,x.done,x.value)})}}function f(g,x,P,O){Promise.resolve(O).then(function(B){g({value:B,done:P})},x)}}function IH(i,h){return Object.defineProperty?Object.defineProperty(i,"raw",{value:h}):i.raw=h,i}function RH(i){if(i&&i.__esModule)return i;var h={};if(i!=null)for(var y in i)Object.hasOwnProperty.call(i,y)&&(h[y]=i[y]);return h.default=i,h}function PH(i){return i&&i.__esModule?i:{default:i}}function MH(i,h){if(!h.has(i))throw new TypeError("attempted to get private field on non-instance");return h.get(i)}function BH(i,h,y){if(!h.has(i))throw new TypeError("attempted to set private field on non-instance");return h.set(i,y),y}var lv,uv,tA=l(()=>{b(),m(),_(),xt(),ce(),lv=function(i,h){return lv=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,S){y.__proto__=S}||function(y,S){for(var f in S)S.hasOwnProperty(f)&&(y[f]=S[f])},lv(i,h)},uv=function(){return uv=Object.assign||function(i){for(var h,y=1,S=arguments.length;y{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.MAX_HASHABLE_LENGTH=i.INIT=i.KEY=i.DIGEST_LENGTH=i.BLOCK_SIZE=void 0,i.BLOCK_SIZE=64,i.DIGEST_LENGTH=32,i.KEY=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i.INIT=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],i.MAX_HASHABLE_LENGTH=Math.pow(2,53)-1}),OH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.RawSha256=void 0;var h=rA(),y=function(){function S(){this.state=Int32Array.from(h.INIT),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return S.prototype.update=function(f){if(this.finished)throw new Error("Attempted to update an already finished hash.");var g=0,x=f.byteLength;if(this.bytesHashed+=x,this.bytesHashed*8>h.MAX_HASHABLE_LENGTH)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;x>0;)this.buffer[this.bufferLength++]=f[g++],x--,this.bufferLength===h.BLOCK_SIZE&&(this.hashBuffer(),this.bufferLength=0)},S.prototype.digest=function(){if(!this.finished){var f=this.bytesHashed*8,g=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),x=this.bufferLength;if(g.setUint8(this.bufferLength++,128),x%h.BLOCK_SIZE>=h.BLOCK_SIZE-8){for(var P=this.bufferLength;P>>24&255,O[P*4+1]=this.state[P]>>>16&255,O[P*4+2]=this.state[P]>>>8&255,O[P*4+3]=this.state[P]>>>0&255;return O},S.prototype.hashBuffer=function(){for(var f=this,g=f.buffer,x=f.state,P=x[0],O=x[1],B=x[2],N=x[3],R=x[4],re=x[5],_e=x[6],Ce=x[7],qe=0;qe>>17|Ve<<15)^(Ve>>>19|Ve<<13)^Ve>>>10;Ve=this.temp[qe-15];var Qe=(Ve>>>7|Ve<<25)^(Ve>>>18|Ve<<14)^Ve>>>3;this.temp[qe]=(Pe+this.temp[qe-7]|0)+(Qe+this.temp[qe-16]|0)}var et=(((R>>>6|R<<26)^(R>>>11|R<<21)^(R>>>25|R<<7))+(R&re^~R&_e)|0)+(Ce+(h.KEY[qe]+this.temp[qe]|0)|0)|0,_t=((P>>>2|P<<30)^(P>>>13|P<<19)^(P>>>22|P<<10))+(P&O^P&B^O&B)|0;Ce=_e,_e=re,re=R,R=N+et|0,N=B,B=O,O=P,P=et+_t|0}x[0]+=P,x[1]+=O,x[2]+=B,x[3]+=N,x[4]+=R,x[5]+=re,x[6]+=_e,x[7]+=Ce},S}();i.RawSha256=y}),UH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUtf8=i.fromUtf8=void 0;var h=S=>{let f=[];for(let g=0,x=S.length;g>6|192,P&63|128);else if(g+1>18|240,O>>12&63|128,O>>6&63|128,O&63|128)}else f.push(P>>12|224,P>>6&63|128,P&63|128)}return Uint8Array.from(f)};i.fromUtf8=h;var y=S=>{let f="";for(let g=0,x=S.length;gB.toString(16)).join("%");f+=decodeURIComponent(O)}else f+=String.fromCharCode((P&15)<<12|(S[++g]&63)<<6|S[++g]&63)}return f};i.toUtf8=y}),LH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUtf8=i.fromUtf8=void 0;function h(S){return new TextEncoder().encode(S)}i.fromUtf8=h;function y(S){return new TextDecoder("utf-8").decode(S)}i.toUtf8=y}),DH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.toUtf8=i.fromUtf8=void 0;var h=UH(),y=LH(),S=g=>typeof TextEncoder=="function"?(0,y.fromUtf8)(g):(0,h.fromUtf8)(g);i.fromUtf8=S;var f=g=>typeof TextDecoder=="function"?(0,y.toUtf8)(g):(0,h.toUtf8)(g);i.toUtf8=f}),NH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.convertToBuffer=void 0;var h=DH(),y=typeof yt<"u"&&yt.from?function(f){return yt.from(f,"utf8")}:h.fromUtf8;function S(f){return f instanceof Uint8Array?f:typeof f=="string"?y(f):ArrayBuffer.isView(f)?new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(f)}i.convertToBuffer=S}),jH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.isEmptyData=void 0;function h(y){return typeof y=="string"?y.length===0:y.byteLength===0}i.isEmptyData=h}),FH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.numToUint8=void 0;function h(y){return new Uint8Array([(y&4278190080)>>24,(y&16711680)>>16,(y&65280)>>8,y&255])}i.numToUint8=h}),$H=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.uint32ArrayFrom=void 0;function h(y){if(!Uint32Array.from){for(var S=new Uint32Array(y.length),f=0;f{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.uint32ArrayFrom=i.numToUint8=i.isEmptyData=i.convertToBuffer=void 0;var h=NH();Object.defineProperty(i,"convertToBuffer",{enumerable:!0,get:function(){return h.convertToBuffer}});var y=jH();Object.defineProperty(i,"isEmptyData",{enumerable:!0,get:function(){return y.isEmptyData}});var S=FH();Object.defineProperty(i,"numToUint8",{enumerable:!0,get:function(){return S.numToUint8}});var f=$H();Object.defineProperty(i,"uint32ArrayFrom",{enumerable:!0,get:function(){return f.uint32ArrayFrom}})}),HH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0}),i.Sha256=void 0;var h=(tA(),v(x_)),y=rA(),S=OH(),f=zH(),g=function(){function P(O){if(this.hash=new S.RawSha256,O){this.outer=new S.RawSha256;var B=x(O),N=new Uint8Array(y.BLOCK_SIZE);N.set(B);for(var R=0;Ry.BLOCK_SIZE){var B=new S.RawSha256;B.update(O),O=B.digest()}var N=new Uint8Array(y.BLOCK_SIZE);return N.set(O),N}}),WH=u(i=>{b(),m(),_(),xt(),ce(),Object.defineProperty(i,"__esModule",{value:!0});var h=(tA(),v(x_));h.__exportStar(HH(),i)}),VH=u((i,h)=>{b(),m(),_(),xt(),ce();var y={exports:{}};function S(tt){return tt instanceof Map?tt.clear=tt.delete=tt.set=function(){throw new Error("map is read-only")}:tt instanceof Set&&(tt.add=tt.clear=tt.delete=function(){throw new Error("set is read-only")}),Object.freeze(tt),Object.getOwnPropertyNames(tt).forEach(function(Ur){var hn=tt[Ur];typeof hn=="object"&&!Object.isFrozen(hn)&&S(hn)}),tt}y.exports=S,y.exports.default=S;var f=class{constructor(tt){tt.data===void 0&&(tt.data={}),this.data=tt.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function g(tt){return tt.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}function x(tt,...Ur){let hn=Object.create(null);for(let zn in tt)hn[zn]=tt[zn];return Ur.forEach(function(zn){for(let It in zn)hn[It]=zn[It]}),hn}var P="",O=tt=>!!tt.scope||tt.sublanguage&&tt.language,B=(tt,{prefix:Ur})=>{if(tt.includes(".")){let hn=tt.split(".");return[`${Ur}${hn.shift()}`,...hn.map((zn,It)=>`${zn}${"_".repeat(It+1)}`)].join(" ")}return`${Ur}${tt}`},N=class{constructor(tt,Ur){this.buffer="",this.classPrefix=Ur.classPrefix,tt.walk(this)}addText(tt){this.buffer+=g(tt)}openNode(tt){if(!O(tt))return;let Ur="";tt.sublanguage?Ur=`language-${tt.language}`:Ur=B(tt.scope,{prefix:this.classPrefix}),this.span(Ur)}closeNode(tt){O(tt)&&(this.buffer+=P)}value(){return this.buffer}span(tt){this.buffer+=``}},R=(tt={})=>{let Ur={children:[]};return Object.assign(Ur,tt),Ur},re=class{constructor(){this.rootNode=R(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(tt){this.top.children.push(tt)}openNode(tt){let Ur=R({scope:tt});this.add(Ur),this.stack.push(Ur)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(tt){return this.constructor._walk(tt,this.rootNode)}static _walk(tt,Ur){return typeof Ur=="string"?tt.addText(Ur):Ur.children&&(tt.openNode(Ur),Ur.children.forEach(hn=>this._walk(tt,hn)),tt.closeNode(Ur)),tt}static _collapse(tt){typeof tt!="string"&&tt.children&&(tt.children.every(Ur=>typeof Ur=="string")?tt.children=[tt.children.join("")]:tt.children.forEach(Ur=>{re._collapse(Ur)}))}},_e=class extends re{constructor(tt){super(),this.options=tt}addKeyword(tt,Ur){tt!==""&&(this.openNode(Ur),this.addText(tt),this.closeNode())}addText(tt){tt!==""&&this.add(tt)}addSublanguage(tt,Ur){let hn=tt.root;hn.sublanguage=!0,hn.language=Ur,this.add(hn)}toHTML(){return new N(this,this.options).value()}finalize(){return!0}};function Ce(tt){return tt?typeof tt=="string"?tt:tt.source:null}function qe(tt){return Qe("(?=",tt,")")}function Ve(tt){return Qe("(?:",tt,")*")}function Pe(tt){return Qe("(?:",tt,")?")}function Qe(...tt){return tt.map(Ur=>Ce(Ur)).join("")}function et(tt){let Ur=tt[tt.length-1];return typeof Ur=="object"&&Ur.constructor===Object?(tt.splice(tt.length-1,1),Ur):{}}function _t(...tt){return"("+(et(tt).capture?"":"?:")+tt.map(Ur=>Ce(Ur)).join("|")+")"}function Ue(tt){return new RegExp(tt.toString()+"|").exec("").length-1}function We(tt,Ur){let hn=tt&&tt.exec(Ur);return hn&&hn.index===0}var ht=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function gt(tt,{joinWith:Ur}){let hn=0;return tt.map(zn=>{hn+=1;let It=hn,Mt=Ce(zn),Vt="";for(;Mt.length>0;){let K=ht.exec(Mt);if(!K){Vt+=Mt;break}Vt+=Mt.substring(0,K.index),Mt=Mt.substring(K.index+K[0].length),K[0][0]==="\\"&&K[1]?Vt+="\\"+String(Number(K[1])+It):(Vt+=K[0],K[0]==="("&&hn++)}return Vt}).map(zn=>`(${zn})`).join(Ur)}var Je=/\b\B/,Be="[a-zA-Z]\\w*",Se="[a-zA-Z_]\\w*",Fe="\\b\\d+(\\.\\d+)?",mt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",$t="\\b(0b[01]+)",hr="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",kr=(tt={})=>{let Ur=/^#![ ]*\//;return tt.binary&&(tt.begin=Qe(Ur,/.*\b/,tt.binary,/\b.*/)),x({scope:"meta",begin:Ur,end:/$/,relevance:0,"on:begin":(hn,zn)=>{hn.index!==0&&zn.ignoreMatch()}},tt)},qr={begin:"\\\\[\\s\\S]",relevance:0},jn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[qr]},Qt={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[qr]},ti={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ii=function(tt,Ur,hn={}){let zn=x({scope:"comment",begin:tt,end:Ur,contains:[]},hn);zn.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let It=_t("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return zn.contains.push({begin:Qe(/[ ]+/,"(",It,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),zn},Si=ii("//","$"),Ci=ii("/\\*","\\*/"),ri=ii("#","$"),ui={scope:"number",begin:Fe,relevance:0},xn={scope:"number",begin:mt,relevance:0},ki={scope:"number",begin:$t,relevance:0},io={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[qr,{begin:/\[/,end:/\]/,relevance:0,contains:[qr]}]}]},Ui={scope:"title",begin:Be,relevance:0},rr={scope:"title",begin:Se,relevance:0},Ir={begin:"\\.\\s*"+Se,relevance:0},ln=function(tt){return Object.assign(tt,{"on:begin":(Ur,hn)=>{hn.data._beginMatch=Ur[1]},"on:end":(Ur,hn)=>{hn.data._beginMatch!==Ur[1]&&hn.ignoreMatch()}})},Vn=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Je,IDENT_RE:Be,UNDERSCORE_IDENT_RE:Se,NUMBER_RE:Fe,C_NUMBER_RE:mt,BINARY_NUMBER_RE:$t,RE_STARTERS_RE:hr,SHEBANG:kr,BACKSLASH_ESCAPE:qr,APOS_STRING_MODE:jn,QUOTE_STRING_MODE:Qt,PHRASAL_WORDS_MODE:ti,COMMENT:ii,C_LINE_COMMENT_MODE:Si,C_BLOCK_COMMENT_MODE:Ci,HASH_COMMENT_MODE:ri,NUMBER_MODE:ui,C_NUMBER_MODE:xn,BINARY_NUMBER_MODE:ki,REGEXP_MODE:io,TITLE_MODE:Ui,UNDERSCORE_TITLE_MODE:rr,METHOD_GUARD:Ir,END_SAME_AS_BEGIN:ln});function Li(tt,Ur){tt.input[tt.index-1]==="."&&Ur.ignoreMatch()}function Qi(tt,Ur){tt.className!==void 0&&(tt.scope=tt.className,delete tt.className)}function ai(tt,Ur){Ur&&tt.beginKeywords&&(tt.begin="\\b("+tt.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",tt.__beforeBegin=Li,tt.keywords=tt.keywords||tt.beginKeywords,delete tt.beginKeywords,tt.relevance===void 0&&(tt.relevance=0))}function _i(tt,Ur){Array.isArray(tt.illegal)&&(tt.illegal=_t(...tt.illegal))}function bi(tt,Ur){if(tt.match){if(tt.begin||tt.end)throw new Error("begin & end are not supported with match");tt.begin=tt.match,delete tt.match}}function oo(tt,Ur){tt.relevance===void 0&&(tt.relevance=1)}var Di=(tt,Ur)=>{if(!tt.beforeMatch)return;if(tt.starts)throw new Error("beforeMatch cannot be used with starts");let hn=Object.assign({},tt);Object.keys(tt).forEach(zn=>{delete tt[zn]}),tt.keywords=hn.keywords,tt.begin=Qe(hn.beforeMatch,qe(hn.begin)),tt.starts={relevance:0,contains:[Object.assign(hn,{endsParent:!0})]},tt.relevance=0,delete hn.beforeMatch},ao=["of","and","for","in","not","or","if","then","parent","list","value"],so="keyword";function Zi(tt,Ur,hn=so){let zn=Object.create(null);return typeof tt=="string"?It(hn,tt.split(" ")):Array.isArray(tt)?It(hn,tt):Object.keys(tt).forEach(function(Mt){Object.assign(zn,Zi(tt[Mt],Ur,Mt))}),zn;function It(Mt,Vt){Ur&&(Vt=Vt.map(K=>K.toLowerCase())),Vt.forEach(function(K){let me=K.split("|");zn[me[0]]=[Mt,So(me[0],me[1])]})}}function So(tt,Ur){return Ur?Number(Ur):Dt(tt)?0:1}function Dt(tt){return ao.includes(tt.toLowerCase())}var He={},Ct=tt=>{console.error(tt)},Ot=(tt,...Ur)=>{console.log(`WARN: ${tt}`,...Ur)},qt=(tt,Ur)=>{He[`${tt}/${Ur}`]||(console.log(`Deprecated as of ${tt}. ${Ur}`),He[`${tt}/${Ur}`]=!0)},ot=new Error;function pt(tt,Ur,{key:hn}){let zn=0,It=tt[hn],Mt={},Vt={};for(let K=1;K<=Ur.length;K++)Vt[K+zn]=It[K],Mt[K+zn]=!0,zn+=Ue(Ur[K-1]);tt[hn]=Vt,tt[hn]._emit=Mt,tt[hn]._multi=!0}function Xe(tt){if(Array.isArray(tt.begin)){if(tt.skip||tt.excludeBegin||tt.returnBegin)throw Ct("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ot;if(typeof tt.beginScope!="object"||tt.beginScope===null)throw Ct("beginScope must be object"),ot;pt(tt,tt.begin,{key:"beginScope"}),tt.begin=gt(tt.begin,{joinWith:""})}}function Rt(tt){if(Array.isArray(tt.end)){if(tt.skip||tt.excludeEnd||tt.returnEnd)throw Ct("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ot;if(typeof tt.endScope!="object"||tt.endScope===null)throw Ct("endScope must be object"),ot;pt(tt,tt.end,{key:"endScope"}),tt.end=gt(tt.end,{joinWith:""})}}function nt(tt){tt.scope&&typeof tt.scope=="object"&&tt.scope!==null&&(tt.beginScope=tt.scope,delete tt.scope)}function Xt(tt){nt(tt),typeof tt.beginScope=="string"&&(tt.beginScope={_wrap:tt.beginScope}),typeof tt.endScope=="string"&&(tt.endScope={_wrap:tt.endScope}),Xe(tt),Rt(tt)}function ur(tt){function Ur(Vt,K){return new RegExp(Ce(Vt),"m"+(tt.case_insensitive?"i":"")+(tt.unicodeRegex?"u":"")+(K?"g":""))}class hn{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(K,me){me.position=this.position++,this.matchIndexes[this.matchAt]=me,this.regexes.push([me,K]),this.matchAt+=Ue(K)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let K=this.regexes.map(me=>me[1]);this.matcherRe=Ur(gt(K,{joinWith:"|"}),!0),this.lastIndex=0}exec(K){this.matcherRe.lastIndex=this.lastIndex;let me=this.matcherRe.exec(K);if(!me)return null;let xe=me.findIndex((ae,z)=>z>0&&ae!==void 0),T=this.matchIndexes[xe];return me.splice(0,xe),Object.assign(me,T)}}class zn{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(K){if(this.multiRegexes[K])return this.multiRegexes[K];let me=new hn;return this.rules.slice(K).forEach(([xe,T])=>me.addRule(xe,T)),me.compile(),this.multiRegexes[K]=me,me}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(K,me){this.rules.push([K,me]),me.type==="begin"&&this.count++}exec(K){let me=this.getMatcher(this.regexIndex);me.lastIndex=this.lastIndex;let xe=me.exec(K);if(this.resumingScanAtSamePosition()&&!(xe&&xe.index===this.lastIndex)){let T=this.getMatcher(0);T.lastIndex=this.lastIndex+1,xe=T.exec(K)}return xe&&(this.regexIndex+=xe.position+1,this.regexIndex===this.count&&this.considerAll()),xe}}function It(Vt){let K=new zn;return Vt.contains.forEach(me=>K.addRule(me.begin,{rule:me,type:"begin"})),Vt.terminatorEnd&&K.addRule(Vt.terminatorEnd,{type:"end"}),Vt.illegal&&K.addRule(Vt.illegal,{type:"illegal"}),K}function Mt(Vt,K){let me=Vt;if(Vt.isCompiled)return me;[Qi,bi,Xt,Di].forEach(T=>T(Vt,K)),tt.compilerExtensions.forEach(T=>T(Vt,K)),Vt.__beforeBegin=null,[ai,_i,oo].forEach(T=>T(Vt,K)),Vt.isCompiled=!0;let xe=null;return typeof Vt.keywords=="object"&&Vt.keywords.$pattern&&(Vt.keywords=Object.assign({},Vt.keywords),xe=Vt.keywords.$pattern,delete Vt.keywords.$pattern),xe=xe||/\w+/,Vt.keywords&&(Vt.keywords=Zi(Vt.keywords,tt.case_insensitive)),me.keywordPatternRe=Ur(xe,!0),K&&(Vt.begin||(Vt.begin=/\B|\b/),me.beginRe=Ur(me.begin),!Vt.end&&!Vt.endsWithParent&&(Vt.end=/\B|\b/),Vt.end&&(me.endRe=Ur(me.end)),me.terminatorEnd=Ce(me.end)||"",Vt.endsWithParent&&K.terminatorEnd&&(me.terminatorEnd+=(Vt.end?"|":"")+K.terminatorEnd)),Vt.illegal&&(me.illegalRe=Ur(Vt.illegal)),Vt.contains||(Vt.contains=[]),Vt.contains=[].concat(...Vt.contains.map(function(T){return zr(T==="self"?Vt:T)})),Vt.contains.forEach(function(T){Mt(T,me)}),Vt.starts&&Mt(Vt.starts,K),me.matcher=It(me),me}if(tt.compilerExtensions||(tt.compilerExtensions=[]),tt.contains&&tt.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return tt.classNameAliases=x(tt.classNameAliases||{}),Mt(tt)}function xr(tt){return tt?tt.endsWithParent||xr(tt.starts):!1}function zr(tt){return tt.variants&&!tt.cachedVariants&&(tt.cachedVariants=tt.variants.map(function(Ur){return x(tt,{variants:null},Ur)})),tt.cachedVariants?tt.cachedVariants:xr(tt)?x(tt,{starts:tt.starts?x(tt.starts):null}):Object.isFrozen(tt)?x(tt):tt}var bt="11.6.0",zt=class extends Error{constructor(tt,Ur){super(tt),this.name="HTMLInjectionError",this.html=Ur}},Ar=g,sn=x,On=Symbol("nomatch"),zi=7,si=function(tt){let Ur=Object.create(null),hn=Object.create(null),zn=[],It=!0,Mt="Could not find the language '{}', did you forget to load/include a language module?",Vt={disableAutodetect:!0,name:"Plain text",contains:[]},K={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:_e};function me(fr){return K.noHighlightRe.test(fr)}function xe(fr){let Kt=fr.className+" ";Kt+=fr.parentNode?fr.parentNode.className:"";let nr=K.languageDetectRe.exec(Kt);if(nr){let Tr=fn(nr[1]);return Tr||(Ot(Mt.replace("{}",nr[1])),Ot("Falling back to no-highlight mode for this block.",fr)),Tr?nr[1]:"no-highlight"}return Kt.split(/\s+/).find(Tr=>me(Tr)||fn(Tr))}function T(fr,Kt,nr){let Tr="",Sr="";typeof Kt=="object"?(Tr=fr,nr=Kt.ignoreIllegals,Sr=Kt.language):(qt("10.7.0","highlight(lang, code, ...args) has been deprecated."),qt("10.7.0",`Please use highlight(code, options) instead.
-https://github.com/highlightjs/highlight.js/issues/2277`),Sr=fr,Tr=Kt),nr===void 0&&(nr=!0);let Mr={code:Tr,language:Sr};Cn("before:highlight",Mr);let $r=Mr.result?Mr.result:ae(Mr.language,Mr.code,nr);return $r.code=Mr.code,Cn("after:highlight",$r),$r}function ae(fr,Kt,nr,Tr){let Sr=Object.create(null);function Mr(En,Hn){return En.keywords[Hn]}function $r(){if(!Bn.keywords){Ii.addText(di);return}let En=0;Bn.keywordPatternRe.lastIndex=0;let Hn=Bn.keywordPatternRe.exec(di),Ei="";for(;Hn;){Ei+=di.substring(En,Hn.index);let fo=Xi.case_insensitive?Hn[0].toLowerCase():Hn[0],Pa=Mr(Bn,fo);if(Pa){let[Ne,Ye]=Pa;if(Ii.addText(Ei),Ei="",Sr[fo]=(Sr[fo]||0)+1,Sr[fo]<=zi&&(Oo+=Ye),Ne.startsWith("_"))Ei+=Hn[0];else{let St=Xi.classNameAliases[Ne]||Ne;Ii.addKeyword(Hn[0],St)}}else Ei+=Hn[0];En=Bn.keywordPatternRe.lastIndex,Hn=Bn.keywordPatternRe.exec(di)}Ei+=di.substring(En),Ii.addText(Ei)}function Dn(){if(di==="")return;let En=null;if(typeof Bn.subLanguage=="string"){if(!Ur[Bn.subLanguage]){Ii.addText(di);return}En=ae(Bn.subLanguage,di,!0,Ao[Bn.subLanguage]),Ao[Bn.subLanguage]=En._top}else En=ne(di,Bn.subLanguage.length?Bn.subLanguage:null);Bn.relevance>0&&(Oo+=En.relevance),Ii.addSublanguage(En._emitter,En.language)}function Nn(){Bn.subLanguage!=null?Dn():$r(),di=""}function Ke(En,Hn){let Ei=1,fo=Hn.length-1;for(;Ei<=fo;){if(!En._emit[Ei]){Ei++;continue}let Pa=Xi.classNameAliases[En[Ei]]||En[Ei],Ne=Hn[Ei];Pa?Ii.addKeyword(Ne,Pa):(di=Ne,$r(),di=""),Ei++}}function ct(En,Hn){return En.scope&&typeof En.scope=="string"&&Ii.openNode(Xi.classNameAliases[En.scope]||En.scope),En.beginScope&&(En.beginScope._wrap?(Ii.addKeyword(di,Xi.classNameAliases[En.beginScope._wrap]||En.beginScope._wrap),di=""):En.beginScope._multi&&(Ke(En.beginScope,Hn),di="")),Bn=Object.create(En,{parent:{value:Bn}}),Bn}function we(En,Hn,Ei){let fo=We(En.endRe,Ei);if(fo){if(En["on:end"]){let Pa=new f(En);En["on:end"](Hn,Pa),Pa.isMatchIgnored&&(fo=!1)}if(fo){for(;En.endsParent&&En.parent;)En=En.parent;return En}}if(En.endsWithParent)return we(En.parent,Hn,Ei)}function pr(En){return Bn.matcher.regexIndex===0?(di+=En[0],1):(Gg=!0,0)}function Jr(En){let Hn=En[0],Ei=En.rule,fo=new f(Ei),Pa=[Ei.__beforeBegin,Ei["on:begin"]];for(let Ne of Pa)if(Ne&&(Ne(En,fo),fo.isMatchIgnored))return pr(Hn);return Ei.skip?di+=Hn:(Ei.excludeBegin&&(di+=Hn),Nn(),!Ei.returnBegin&&!Ei.excludeBegin&&(di=Hn)),ct(Ei,En),Ei.returnBegin?0:Hn.length}function rn(En){let Hn=En[0],Ei=Kt.substring(En.index),fo=we(Bn,En,Ei);if(!fo)return On;let Pa=Bn;Bn.endScope&&Bn.endScope._wrap?(Nn(),Ii.addKeyword(Hn,Bn.endScope._wrap)):Bn.endScope&&Bn.endScope._multi?(Nn(),Ke(Bn.endScope,En)):Pa.skip?di+=Hn:(Pa.returnEnd||Pa.excludeEnd||(di+=Hn),Nn(),Pa.excludeEnd&&(di=Hn));do Bn.scope&&Ii.closeNode(),!Bn.skip&&!Bn.subLanguage&&(Oo+=Bn.relevance),Bn=Bn.parent;while(Bn!==fo.parent);return fo.starts&&ct(fo.starts,En),Pa.returnEnd?0:Hn.length}function Jn(){let En=[];for(let Hn=Bn;Hn!==Xi;Hn=Hn.parent)Hn.scope&&En.unshift(Hn.scope);En.forEach(Hn=>Ii.openNode(Hn))}let wi={};function Bi(En,Hn){let Ei=Hn&&Hn[0];if(di+=En,Ei==null)return Nn(),0;if(wi.type==="begin"&&Hn.type==="end"&&wi.index===Hn.index&&Ei===""){if(di+=Kt.slice(Hn.index,Hn.index+1),!It){let fo=new Error(`0 width match regex (${fr})`);throw fo.languageName=fr,fo.badRule=wi.rule,fo}return 1}if(wi=Hn,Hn.type==="begin")return Jr(Hn);if(Hn.type==="illegal"&&!nr){let fo=new Error('Illegal lexeme "'+Ei+'" for mode "'+(Bn.scope||"")+'"');throw fo.mode=Bn,fo}else if(Hn.type==="end"){let fo=rn(Hn);if(fo!==On)return fo}if(Hn.type==="illegal"&&Ei==="")return 1;if(Kg>1e5&&Kg>Hn.index*3)throw new Error("potential infinite loop, way more iterations than matches");return di+=Ei,Ei.length}let Xi=fn(fr);if(!Xi)throw Ct(Mt.replace("{}",fr)),new Error('Unknown language: "'+fr+'"');let qi=ur(Xi),Co="",Bn=Tr||qi,Ao={},Ii=new K.__emitter(K);Jn();let di="",Oo=0,Ro=0,Kg=0,Gg=!1;try{for(Bn.matcher.considerAll();;){Kg++,Gg?Gg=!1:Bn.matcher.considerAll(),Bn.matcher.lastIndex=Ro;let En=Bn.matcher.exec(Kt);if(!En)break;let Hn=Kt.substring(Ro,En.index),Ei=Bi(Hn,En);Ro=En.index+Ei}return Bi(Kt.substring(Ro)),Ii.closeAllNodes(),Ii.finalize(),Co=Ii.toHTML(),{language:fr,value:Co,relevance:Oo,illegal:!1,_emitter:Ii,_top:Bn}}catch(En){if(En.message&&En.message.includes("Illegal"))return{language:fr,value:Ar(Kt),illegal:!0,relevance:0,_illegalBy:{message:En.message,index:Ro,context:Kt.slice(Ro-100,Ro+100),mode:En.mode,resultSoFar:Co},_emitter:Ii};if(It)return{language:fr,value:Ar(Kt),illegal:!1,relevance:0,errorRaised:En,_emitter:Ii,_top:Bn};throw En}}function z(fr){let Kt={value:Ar(fr),illegal:!1,relevance:0,_top:Vt,_emitter:new K.__emitter(K)};return Kt._emitter.addText(fr),Kt}function ne(fr,Kt){Kt=Kt||K.languages||Object.keys(Ur);let nr=z(fr),Tr=Kt.filter(fn).filter(en).map(Nn=>ae(Nn,fr,!1));Tr.unshift(nr);let Sr=Tr.sort((Nn,Ke)=>{if(Nn.relevance!==Ke.relevance)return Ke.relevance-Nn.relevance;if(Nn.language&&Ke.language){if(fn(Nn.language).supersetOf===Ke.language)return 1;if(fn(Ke.language).supersetOf===Nn.language)return-1}return 0}),[Mr,$r]=Sr,Dn=Mr;return Dn.secondBest=$r,Dn}function he(fr,Kt,nr){let Tr=Kt&&hn[Kt]||nr;fr.classList.add("hljs"),fr.classList.add(`language-${Tr}`)}function X(fr){let Kt=null,nr=xe(fr);if(me(nr))return;if(Cn("before:highlightElement",{el:fr,language:nr}),fr.children.length>0&&(K.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(fr)),K.throwUnescapedHTML))throw new zt("One of your code blocks includes unescaped HTML.",fr.innerHTML);Kt=fr;let Tr=Kt.textContent,Sr=nr?T(Tr,{language:nr,ignoreIllegals:!0}):ne(Tr);fr.innerHTML=Sr.value,he(fr,nr,Sr.language),fr.result={language:Sr.language,re:Sr.relevance,relevance:Sr.relevance},Sr.secondBest&&(fr.secondBest={language:Sr.secondBest.language,relevance:Sr.secondBest.relevance}),Cn("after:highlightElement",{el:fr,result:Sr,text:Tr})}function ge(fr){K=sn(K,fr)}let Te=()=>{Zt(),qt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function st(){Zt(),qt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let at=!1;function Zt(){if(document.readyState==="loading"){at=!0;return}document.querySelectorAll(K.cssSelector).forEach(X)}function _r(){at&&Zt()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",_r,!1);function Yr(fr,Kt){let nr=null;try{nr=Kt(tt)}catch(Tr){if(Ct("Language definition for '{}' could not be registered.".replace("{}",fr)),It)Ct(Tr);else throw Tr;nr=Vt}nr.name||(nr.name=fr),Ur[fr]=nr,nr.rawDefinition=Kt.bind(null,tt),nr.aliases&&Pn(nr.aliases,{languageName:fr})}function Zr(fr){delete Ur[fr];for(let Kt of Object.keys(hn))hn[Kt]===fr&&delete hn[Kt]}function Xr(){return Object.keys(Ur)}function fn(fr){return fr=(fr||"").toLowerCase(),Ur[fr]||Ur[hn[fr]]}function Pn(fr,{languageName:Kt}){typeof fr=="string"&&(fr=[fr]),fr.forEach(nr=>{hn[nr.toLowerCase()]=Kt})}function en(fr){let Kt=fn(fr);return Kt&&!Kt.disableAutodetect}function gn(fr){fr["before:highlightBlock"]&&!fr["before:highlightElement"]&&(fr["before:highlightElement"]=Kt=>{fr["before:highlightBlock"](Object.assign({block:Kt.el},Kt))}),fr["after:highlightBlock"]&&!fr["after:highlightElement"]&&(fr["after:highlightElement"]=Kt=>{fr["after:highlightBlock"](Object.assign({block:Kt.el},Kt))})}function yn(fr){gn(fr),zn.push(fr)}function Cn(fr,Kt){let nr=fr;zn.forEach(function(Tr){Tr[nr]&&Tr[nr](Kt)})}function Mn(fr){return qt("10.7.0","highlightBlock will be removed entirely in v12.0"),qt("10.7.0","Please use highlightElement now."),X(fr)}Object.assign(tt,{highlight:T,highlightAuto:ne,highlightAll:Zt,highlightElement:X,highlightBlock:Mn,configure:ge,initHighlighting:Te,initHighlightingOnLoad:st,registerLanguage:Yr,unregisterLanguage:Zr,listLanguages:Xr,getLanguage:fn,registerAliases:Pn,autoDetection:en,inherit:sn,addPlugin:yn}),tt.debugMode=function(){It=!1},tt.safeMode=function(){It=!0},tt.versionString=bt,tt.regex={concat:Qe,lookahead:qe,either:_t,optional:Pe,anyNumberOfTimes:Ve};for(let fr in Vn)typeof Vn[fr]=="object"&&y.exports(Vn[fr]);return Object.assign(tt,Vn),tt},ci=si({});h.exports=ci,ci.HighlightJS=ci,ci.default=ci}),qH=u((i,h)=>{h.exports="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"}),KH=u((i,h)=>{h.exports="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}"});b(),m(),_(),xt(),ce(),b(),m(),_(),xt(),ce();var Op=p(uH()),GH=p(hH()),YH=p(WH()),QH=Op.Address.parse("EQD-BJSVUJviud_Qv7Ymfd3qzXdrmV525e3YDzWQoHIAiInL"),ZH=Op.Address.parse("EQCsdKYwUaXkgJkz2l0ol6qT_WxeRbE_wBCwnEybmR0u5TO8");function XH(i){let h=new YH.Sha256;return h.update(i),yt.from(h.digestSync())}function JH(i,h){return i.replace("ipfs://",`https://tonsource${h?"-testnet":""}.infura-ipfs.io/ipfs/`)}function nA(i){return BigInt(`0x${i.toString("hex")}`)}var eW={async getSourcesJsonUrl(i,h){let y=new Op.TonClient4({endpoint:h?.httpApiEndpointV4??await(0,GH.getHttpV4Endpoint)({network:h.testnet?"testnet":"mainnet"})}),{last:{seqno:S}}=await y.getLastBlock(),f=new Op.TupleBuilder;f.writeNumber(nA(XH(h?.verifier??"orbs.com"))),f.writeNumber(nA(yt.from(i,"base64")));let{result:g}=await y.runMethod(S,h.testnet?ZH:QH,"get_source_item_address",f.build()),x=new Op.TupleReader(g),P=x.readAddress();if(await y.isContractDeployed(S,P)){let{result:O}=await y.runMethod(S,P,"get_source_item_data");x=new Op.TupleReader(O);let B=x.skip(3).readCell().beginParse();if(B.loadUint(8)!==1)throw new Error("Unsupported version");return B.loadStringTail()}return null},async getSourcesData(i,h){let y=h.ipfsConverter??JH,S=y(i,!!h.testnet),f=await(await fetch(y(i,!!h.testnet))).json();return{files:(await Promise.all(f.sources.map(async g=>{let x=y(g.url,!!h.testnet),P=await fetch(x).then(O=>O.text());return{name:g.filename,content:P,isEntrypoint:g.isEntrypoint}}))).reverse().sort((g,x)=>Number(x.isEntrypoint)-Number(g.isEntrypoint)),verificationDate:new Date(f.verificationDate),compilerSettings:f.compilerSettings,compiler:f.compiler,ipfsHttpLink:S}}};b(),m(),_(),xt(),ce(),b(),m(),_(),xt(),ce();var tW=p(VH(),1),iA=tW.default;b(),m(),_(),xt(),ce(),b(),m(),_(),xt(),ce();var oA='(?!")(`([^`]+)`|((?=_)_|(?=\\{)\\{|(?=\\})\\}|(?![_`{}]))([^;,\\[\\]\\(\\)\\s~.]+))',aA=/\"[^\n\"]+\"[Hhcusa]?/,S_;try{S_=new RegExp("(-?(?!_)([\\d_]+|0x[\\d_a-fA-F]+)|0b[1_0]+)(?=/,/<=/,/=/,/>/,/,/\^/)},{scope:"number",match:/([0-9]+)(.[0-9]+)?(.[0-9]+)?/}]},{scope:"keyword",begin:/#include/,end:/;/,contains:[{scope:"string",match:aA}]},{scope:"number",match:S_},{scope:"string",match:aA},{match:[/\b(const|global)\b/,/\s+/,/\w+/,/\s+/,oA],scope:{1:"keyword",5:"variable.constant"}},{scope:"function",match:new RegExp(oA+"(?=[(])")},{scope:"operator",match:i.regex.either(/<=>/,/>=/,/<=/,/!=/,/==/,/\^>>/,/~>>/,/>>/,/<,/\/%/,/\^%/,/~%/,/\^\//,/~\//,/\+=/,/-=/,/\*=/,/\/=/,/~\/=/,/\^\/=/,/%=/,/\^%=/,/<<=/,/>>=/,/~>>=/,/\^>>=/,/&=/,/\^=/,/\|=/,/\^/,/=/,/~/,/\//,/%/,/-/,/\*/,/\+/,/>/,/,/&/,/\|/,/:/,/\?/)},{scope:"punctuation",match:/[\.;\(\),\[\]~\{\}]/}]}}b(),m(),_(),xt(),ce();var C_=/[0-9A-Za-z$_-]+/,sA=/(::_|::|:_|=:|:)/;function nW(i){return{name:"Fift",aliases:["fift"],case_insensitive:!1,keywords:{keyword:["-roll","-rot|10","-trailing","-trailing0","2constant|10","2drop|10","2dup|10","2over|10","2swap|10","abort","abs","allot","and","anon","atom","bbitrefs","bbits","bl","box","brefs","brembitrefs","brembits","bremrefs","bye","cadr","caddr","car","cddr","cdr","char","chr","cmp","cond","cons","constant","count","cr","create","drop","depth","dictmap","dictmerge","dictnew","does","drop","dup","ed25519_chksign","ed25519_sign","ed25519_sign_uint","emit","exch","exch2|10","execute","explode","find","first","fits","forget","gasrunvm","gasrunvmcode","gasrunvmctx","gasrunvmdict","halt","hash","hashB","hashu","hold","hole","if","ifnot","include","list","minmax","max","min","mod","negate","newkeypair","nil","nip","nop","not","now","null","or","over","pair","pick","quit","remaining","reverse","roll","rot","runvm","runvmcode","runvmctx","runvmdict","sbitrefs","sbits","second","sgn","sign","shash","space","swap","single","skipspc","srefs","ten","third","times","triple","tuck","tuple","type","ufits","uncons","unpair","unsingle","until","untriple","untuple","variable","while","word","words","xor"],literal:["true","false"],type:[],built_in:[]},contains:[{scope:"comment",variants:[i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE],relevance:0},{match:[/\s/,/2?constant/,/\s+/,C_],scope:{2:"keyword",4:"variable.constant"}},{match:[/\s/,/variable/,/\s+/,C_],scope:{2:"keyword",4:"variable"}},{match:[/}/,/\s+/,sA,/\s+/,C_],scope:{1:"punctuation",3:"operator",5:"function"}},{scope:"operator",match:i.regex.either(/!/,/#>/,/#s/,/\$#/,/#/,/\$\+/,/\$,/,/\$\d/,/\$=/,/\$(?=\()/,/\$>smca/,/\$>s/,/\$@\+/,/\$@\?\+/,/\$@\?/,/\$@/,/\$cmp/,/\$len/,/\$pos/,/\$reverse/,/%1<,/\('\)/,/\(-trailing\)/,/\(\.\)/,/\(atom\)/,/\(b\.\)/,/\(compile\)/,/\(create\)/,/\(def\?\)/,/\(dump\)/,/\(execute\)/,/\(forget\)/,/\(number\)/,/\(x\.\)/,/\(\{\)/,/\(\}\)/,/\*\/cmod/,/\*\/c/,/\*\/mod/,/\*\/rmod/,/\*\/r/,/\*\//,/\*>>c/,/\*>>r/,/\*>>/,/\*mod/,/\*/,/\+!/,/\+/,/,/,/-!/,/-/,/-1<,/\._/,/\.dump/,/\.l/,/\.sl/,/\.s/,/\.tc/,/\//,/\/\*/,/\/cmod/,/\/c/,/\/mod/,/\/rmod/,/\/r/,/0!/,/0<=/,/0<>/,/0,/0=/,/0>=/,/0>/,/1\+!/,/1\+/,/1-!/,/1-/,/1<,/1<<1-/,/2\*/,/2\+/,/2-/,/2\//,/2=:/,sA,/<#/,/<<\/c/,/<<\/r/,/<=/,/<>/,/=/,/>>c/,/>>r/,/>>/,/>/,/\?dup/,/@'/,/@/,/B\+/,/B,/,/B=/,/B>Li@\+/,/B>Li@/,/B>Lu@\+/,/B>Lu@/,/B>boc/,/B>file/,/B>i@\+/,/B>i@/,/B>u@\+/,/B>u@/,/B@\?\+/,/B@\+/,/B@\?/,/B@/,/Bcmp/,/BhashB/,/Bhashu/,/Bhash/,/Blen/,/Bx\./,/B\|/,/Li>B/,/Lu>B/,/\[\]/,/\[compile\]/,/\[/,/\]/,/atom\?/,/b\+/,/b\._/,/b\./,/b>idict!\+/,/b>idict!/,/b>sdict!\+/,/b>sdict!/,/b>udict!\+/,/b>udict!/,/b>/,/boc+>B/,/boc>B/,/csr\./,/def\?/,/empty\?/,/eq\?/,/file-exists\?/,/file>B/,/i,/,/i>B/,/i@\+/,/i@/,/i@\?\+/,/i@\?/,/idict!\+/,/idict!/,/idict-/,/idict@-/,/idict@/,/null!/,/null\?/,/pfxdict!\+/,/pfxdict!/,/pfxdict@/,/priv>pub/,/ref@\+/,/ref@/,/ref@\?\+/,/ref@\?/,/s,/,/s>c/,/s>/,/sdict!\+/,/sdict!/,/sdict-/,/sdict@-/,/sdict@/,/smca>\$/,/sr,/,/tuple\?/,/u,/,/u>B/,/u@\+/,/u@\?\+/,/u@\?/,/udict!\+/,/udict!/,/udict-/,/udict@-/,/udict@/,/undef\?/,/x\._/,/x\./,/\|\+/,/\|/,/\|_/,new RegExp("(?<=\\s)\\.(?=\\s)"))},{scope:"number",match:i.regex.either(/(0[xX][0-9a-fA-F]+)/,/(0[bB][01]+)/,/(-?[0-9]+(\/-?[0-9]+)?)/)},{scope:"string",match:/"([^"\r\n\\]|\\.)*"/},{scope:"symbol",match:/[xX]\{[0-9a-fA-F_]*}/,relevance:10},{scope:"symbol",match:/[bB]\{[01]*}/,relevance:10},{scope:"symbol",match:/'[^\s]+/},{scope:"punctuation",match:/[\[\{\}\],]/}]}}b(),m(),_(),xt(),ce();var lA=/[a-zA-Z_][0-9a-zA-Z_]*/;function iW(i){return{name:"TL-B",aliases:["Tlb","tlb","TLB","tl-b","TL-b","Tl-B","Tl-b"],case_insensitive:!1,keywords:{keyword:[],literal:["True","BoolTrue","False","BoolFalse","Null"],type:["Type","Bool","Unit","Maybe","Either","Both","Cell","uint8","uint15","uint16","uint32","uint63","uint64","int8","int16","int32","int64","bits256","bits512"],built_in:[]},contains:[{scope:"comment",variants:[i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE]},{scope:"symbol",match:i.regex.either(/#[0-9a-f]*_?/,/\$[01]*_?/,/##/,/#<=/,/#)},{match:[/=/,/\s+/,lA,/[\s;]/],scope:{1:"operator",3:"type"}},{scope:"variable",match:lA},{scope:"operator",match:i.regex.either(/\+/,/-/,/\*/,/\//,/!=/,/==/,/=/,/\?/,/~/,/\./,/\^/,/<=/,/>=/,/,/>/)},{scope:"number",match:/[0-9]+/},{scope:"punctuation",match:/[;\(\):\[\]\{\}]/}]}}function oW(i){i.registerLanguage("fift",nW),i.registerLanguage("func",rW),i.registerLanguage("tlb",iW)}b(),m(),_(),xt(),ce();var Hc=(i,...h)=>cA("div",i,...h),uA=(i,...h)=>cA("img",i,...h);function aW(i,h){for(let y of h)if(y)switch(typeof y){case"string":let S=document.createTextNode(y);i.appendChild(S);break;default:i.appendChild(y);break}}function sW(i,h){typeof h=="string"?i.setAttribute("style",h):Object.assign(i.style,h)}function lW(i,h){h.split(/\s/).forEach(y=>{y&&i.classList.add(y)})}function uW(i,h){let y=/^on([a-z]+)$/i;for(let S in h)if(S)if(S==="style")sW(i,h[S]);else if(S==="className")lW(i,h[S]);else if(y.test(S)){let f=S.replace(y,"$1").toLowerCase();i.addEventListener(f,h[S])}else i.setAttribute(S,h[S])}function cA(i,h,...y){if(typeof i=="function")return i(h);{let S=document.createElement(i);return h&&typeof h=="object"&&uW(S,h),y&&aW(S,y),S}}b(),m(),_(),xt(),ce();var cW=`