From 04e73ed9bc85eced07a45778e2afad4e9d1b2978 Mon Sep 17 00:00:00 2001 From: Nick Taras Date: Fri, 18 Aug 2023 16:33:51 +1000 Subject: [PATCH] updated package files for updated version --- .../dist/235.c021a217ad7b926f.js | 1 + .../dist/3rdpartylicenses.txt | 25 +++++ .../dist/40.3dccefb5519350f6.js | 1 + .../dist/475.e3436a297ca126a7.js | 1 + .../dist/639.c511f58df2809e7d.js | 1 - .../dist/729.372fe1c47762dd89.js | 1 - ...630973db106.js => 795.f6cd60318a520391.js} | 2 +- .../dist/819.64db6f88feb81de9.js | 1 - .../dist/819.f041a64911f370c9.js | 1 - angular-bare-bones-demo/dist/index.html | 4 +- .../dist/main.58aa68c02ade6f21.js | 1 - .../dist/main.c1a633876c33af4f.js | 1 + .../dist/main.c8cebfa7ad69acc1.js | 1 - .../dist/runtime.022ba78872adf2db.js | 1 - .../dist/runtime.0fc8c89eeeb6f972.js | 1 + .../dist/runtime.1da778669d4d934d.js | 1 - ...473204.css => styles.fea609fc74ab4ced.css} | 2 +- .../build/asset-manifest.json | 35 +++---- .../build/index.html | 2 +- .../build/static/css/main.4c2cf560.css.map | 1 - .../{main.4c2cf560.css => main.77bc0c8b.css} | 4 +- .../build/static/css/main.77bc0c8b.css.map | 1 + .../build/static/js/122.4bb4f528.chunk.js | 2 - .../build/static/js/122.4bb4f528.chunk.js.map | 1 - .../build/static/js/122.cc08ec28.chunk.js | 2 - .../build/static/js/122.cc08ec28.chunk.js.map | 1 - .../build/static/js/266.9883db00.chunk.js | 2 - .../build/static/js/266.9883db00.chunk.js.map | 1 - .../build/static/js/400.a4770748.chunk.js | 2 - .../build/static/js/400.a4770748.chunk.js.map | 1 - .../build/static/js/421.d1683f0a.chunk.js | 2 - .../build/static/js/421.d1683f0a.chunk.js.map | 1 - .../build/static/js/514.3c5535f6.chunk.js | 2 + .../build/static/js/514.3c5535f6.chunk.js.map | 1 + .../build/static/js/578.268d084d.chunk.js | 3 + ....txt => 578.268d084d.chunk.js.LICENSE.txt} | 0 .../build/static/js/578.268d084d.chunk.js.map | 1 + .../build/static/js/6.dda56192.chunk.js | 3 - .../build/static/js/6.dda56192.chunk.js.map | 1 - .../build/static/js/777.10b8d03a.chunk.js | 3 - .../build/static/js/777.10b8d03a.chunk.js.map | 1 - .../build/static/js/805.1ed73b8d.chunk.js | 3 + ....txt => 805.1ed73b8d.chunk.js.LICENSE.txt} | 9 -- .../build/static/js/805.1ed73b8d.chunk.js.map | 1 + .../build/static/js/883.21fdf5eb.chunk.js | 1 + .../build/static/js/972.f02ee82a.chunk.js | 3 - .../build/static/js/972.f02ee82a.chunk.js.map | 1 - .../build/static/js/974.818dd313.chunk.js | 3 + ....txt => 974.818dd313.chunk.js.LICENSE.txt} | 0 .../build/static/js/974.818dd313.chunk.js.map | 1 + .../build/static/js/main.05058634.js | 3 - .../build/static/js/main.05058634.js.map | 1 - .../build/static/js/main.7ee3b0ef.js | 3 + ...CENSE.txt => main.7ee3b0ef.js.LICENSE.txt} | 0 .../build/static/js/main.7ee3b0ef.js.map | 1 + .../build/static/js/main.d3d4f912.js | 3 - .../static/js/main.d3d4f912.js.LICENSE.txt | 93 ------------------- .../build/static/js/main.d3d4f912.js.map | 1 - 58 files changed, 73 insertions(+), 173 deletions(-) create mode 100644 angular-bare-bones-demo/dist/235.c021a217ad7b926f.js create mode 100644 angular-bare-bones-demo/dist/40.3dccefb5519350f6.js create mode 100644 angular-bare-bones-demo/dist/475.e3436a297ca126a7.js delete mode 100644 angular-bare-bones-demo/dist/639.c511f58df2809e7d.js delete mode 100644 angular-bare-bones-demo/dist/729.372fe1c47762dd89.js rename angular-bare-bones-demo/dist/{296.1e4f5630973db106.js => 795.f6cd60318a520391.js} (99%) delete mode 100644 angular-bare-bones-demo/dist/819.64db6f88feb81de9.js delete mode 100644 angular-bare-bones-demo/dist/819.f041a64911f370c9.js delete mode 100644 angular-bare-bones-demo/dist/main.58aa68c02ade6f21.js create mode 100644 angular-bare-bones-demo/dist/main.c1a633876c33af4f.js delete mode 100644 angular-bare-bones-demo/dist/main.c8cebfa7ad69acc1.js delete mode 100644 angular-bare-bones-demo/dist/runtime.022ba78872adf2db.js create mode 100644 angular-bare-bones-demo/dist/runtime.0fc8c89eeeb6f972.js delete mode 100644 angular-bare-bones-demo/dist/runtime.1da778669d4d934d.js rename angular-bare-bones-demo/dist/{styles.cc0799c55a473204.css => styles.fea609fc74ab4ced.css} (99%) delete mode 100644 art-gallery-medium-article-website/build/static/css/main.4c2cf560.css.map rename art-gallery-medium-article-website/build/static/css/{main.4c2cf560.css => main.77bc0c8b.css} (99%) create mode 100644 art-gallery-medium-article-website/build/static/css/main.77bc0c8b.css.map delete mode 100644 art-gallery-medium-article-website/build/static/js/122.4bb4f528.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/122.4bb4f528.chunk.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/122.cc08ec28.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/122.cc08ec28.chunk.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/266.9883db00.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/266.9883db00.chunk.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/400.a4770748.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/400.a4770748.chunk.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/421.d1683f0a.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/421.d1683f0a.chunk.js.map create mode 100644 art-gallery-medium-article-website/build/static/js/514.3c5535f6.chunk.js create mode 100644 art-gallery-medium-article-website/build/static/js/514.3c5535f6.chunk.js.map create mode 100644 art-gallery-medium-article-website/build/static/js/578.268d084d.chunk.js rename art-gallery-medium-article-website/build/static/js/{6.dda56192.chunk.js.LICENSE.txt => 578.268d084d.chunk.js.LICENSE.txt} (100%) create mode 100644 art-gallery-medium-article-website/build/static/js/578.268d084d.chunk.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/6.dda56192.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/6.dda56192.chunk.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/777.10b8d03a.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/777.10b8d03a.chunk.js.map create mode 100644 art-gallery-medium-article-website/build/static/js/805.1ed73b8d.chunk.js rename art-gallery-medium-article-website/build/static/js/{777.10b8d03a.chunk.js.LICENSE.txt => 805.1ed73b8d.chunk.js.LICENSE.txt} (68%) create mode 100644 art-gallery-medium-article-website/build/static/js/805.1ed73b8d.chunk.js.map create mode 100644 art-gallery-medium-article-website/build/static/js/883.21fdf5eb.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/972.f02ee82a.chunk.js delete mode 100644 art-gallery-medium-article-website/build/static/js/972.f02ee82a.chunk.js.map create mode 100644 art-gallery-medium-article-website/build/static/js/974.818dd313.chunk.js rename art-gallery-medium-article-website/build/static/js/{972.f02ee82a.chunk.js.LICENSE.txt => 974.818dd313.chunk.js.LICENSE.txt} (100%) create mode 100644 art-gallery-medium-article-website/build/static/js/974.818dd313.chunk.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/main.05058634.js delete mode 100644 art-gallery-medium-article-website/build/static/js/main.05058634.js.map create mode 100644 art-gallery-medium-article-website/build/static/js/main.7ee3b0ef.js rename art-gallery-medium-article-website/build/static/js/{main.05058634.js.LICENSE.txt => main.7ee3b0ef.js.LICENSE.txt} (100%) create mode 100644 art-gallery-medium-article-website/build/static/js/main.7ee3b0ef.js.map delete mode 100644 art-gallery-medium-article-website/build/static/js/main.d3d4f912.js delete mode 100644 art-gallery-medium-article-website/build/static/js/main.d3d4f912.js.LICENSE.txt delete mode 100644 art-gallery-medium-article-website/build/static/js/main.d3d4f912.js.map diff --git a/angular-bare-bones-demo/dist/235.c021a217ad7b926f.js b/angular-bare-bones-demo/dist/235.c021a217ad7b926f.js new file mode 100644 index 000000000..4b4d4f8bf --- /dev/null +++ b/angular-bare-bones-demo/dist/235.c021a217ad7b926f.js @@ -0,0 +1 @@ +(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[235],{18983:function(Ki,er){!function(B){"use strict";function tn(t){if(Array.isArray(t))return t}function ar(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r=0;--Y){var D=this.tryEntries[Y],ut=D.completion;if("root"===D.tryLoc)return U("end");if(D.tryLoc<=this.prev){var it=o.call(D,"catchLoc"),yt=o.call(D,"finallyLoc");if(it&&yt){if(this.prev=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&o.call(Y,"finallyLoc")&&this.prev=0;--A){var U=this.tryEntries[A];if(U.finallyLoc===_)return this.complete(U.completion,U.afterLoc),At(U),m}},catch:function(_){for(var A=this.tryEntries.length-1;A>=0;--A){var U=this.tryEntries[A];if(U.tryLoc===_){var Y=U.completion;if("throw"===Y.type){var D=Y.arg;At(U)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(_,A,U){return this.delegate={iterator:_t(_),resultName:A,nextLoc:U},"next"===this.method&&(this.arg=void 0),m}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(Xa);var $a,or=Xa.exports(),h=or;try{regeneratorRuntime=or}catch{"object"===(typeof globalThis>"u"?"undefined":z(globalThis))?globalThis.regeneratorRuntime=or:Function("r","regeneratorRuntime = r")(or)}function Qa(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function Fn(t){return tn(t)||Qa(t)||yn(t)||Va()}function q(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function to(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function O(t){for(var n=1;n=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(c){throw c},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,i=!1;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return u=c.done,c},e:function(c){i=!0,o=c},f:function(){try{u||null==r.return||r.return()}finally{if(i)throw o}}}}var Hi="function"==typeof queueMicrotask?queueMicrotask:function(t){return($a||($a=Promise.resolve())).then(t).catch(function(n){return setTimeout(function(){throw n},0)})},Wi=function(){var t,n=[];return{deliver:function(r){return x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:n.push(r),t&&(t(n.shift()),t=void 0);case 2:case"end":return a.stop()}},e)}))()},receive:function(){return new Promise(function(r){var e=n.shift();if(e)return r(e);t=r})}}},Nr="INIT",cn="SUBSCRIBE",nn="UNSUBSCRIBE",Br="UPDATED",no="SNAPSHOT",$="object"===(typeof self>"u"?"undefined":z(self))&&self.self===self&&self||"object"===(typeof global>"u"?"undefined":z(global))&&global.global===global&&global||"object"===(typeof window>"u"?"undefined":z(window))&&window.window===window&&window;$.FCL_REGISTRY=$.FCL_REGISTRY??{};var zt,Ji=0,dt=function(t,n,r){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(function(a,o){var u=e.expectReply||!1,i=null!=e.timeout?e.timeout:5e3;u&&i&&setTimeout(function(){return o(new Error("Timeout: ".concat(i,"ms passed without a response.")))},i);var c={to:t,from:e.from,tag:n,data:r,timeout:i,reply:a,reject:o};try{$.FCL_REGISTRY[t]&&$.FCL_REGISTRY[t].mailbox.deliver(c),u||a(!0)}catch(l){console.error("FCL.Actor -- Could Not Deliver Message",c,$.FCL_REGISTRY[t],l)}})},Xi=function(t){delete $.FCL_REGISTRY[t]},Zi=function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n=x(h.mark(function r(e){var a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if("function"!=typeof t.INIT){o.next=3;break}return o.next=3,t.INIT(e);case 3:return o.next=6,e.receive();case 6:if(a=o.sent,o.prev=7,"EXIT"!==a.tag){o.next=13;break}if("function"!=typeof t.TERMINATE){o.next=12;break}return o.next=12,t.TERMINATE(e,a,a.data||{});case 12:return o.abrupt("break",25);case 13:return o.next=15,t[a.tag](e,a,a.data||{});case 15:o.next=20;break;case 17:o.prev=17,o.t0=o.catch(7),console.error("".concat(e.self()," Error"),a,o.t0);case 20:return o.prev=20,o.abrupt("continue",3);case 23:o.next=3;break;case 25:case"end":return o.stop()}},r,null,[[7,17,20,23]])})),function(r){return n.apply(this,arguments)}},rn=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==n&&(n=++Ji),null!=$.FCL_REGISTRY[n])return n;$.FCL_REGISTRY[n]={addr:n,mailbox:Wi(),subs:new Set,kvs:{},error:null};var r={self:function(){return n},receive:function(){return $.FCL_REGISTRY[n].mailbox.receive()},send:function(e,a,o){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.from=n,dt(e,a,o,u)},sendSelf:function(e,a,o){$.FCL_REGISTRY[n]&&dt(n,e,a,o)},broadcast:function(e,a){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o.from=n;var u,i=bt($.FCL_REGISTRY[n].subs);try{for(i.s();!(u=i.n()).done;)dt(u.value,e,a,o)}catch(l){i.e(l)}finally{i.f()}},subscribe:function(e){return null!=e&&$.FCL_REGISTRY[n].subs.add(e)},unsubscribe:function(e){return null!=e&&$.FCL_REGISTRY[n].subs.delete(e)},subscriberCount:function(){return $.FCL_REGISTRY[n].subs.size},hasSubs:function(){return!!$.FCL_REGISTRY[n].subs.size},put:function(e,a){null!=e&&($.FCL_REGISTRY[n].kvs[e]=a)},get:function(e,a){return $.FCL_REGISTRY[n].kvs[e]??a},delete:function(e){delete $.FCL_REGISTRY[n].kvs[e]},update:function(e,a){null!=e&&($.FCL_REGISTRY[n].kvs[e]=a($.FCL_REGISTRY[n].kvs[e]))},keys:function(){return Object.keys($.FCL_REGISTRY[n].kvs)},all:function(){return $.FCL_REGISTRY[n].kvs},where:function(e){return Object.keys($.FCL_REGISTRY[n].kvs).reduce(function(a,o){return e.test(o)?O(O({},a),{},q({},o,$.FCL_REGISTRY[n].kvs[o])):a},{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach(function(a){return $.FCL_REGISTRY[n].kvs[a]=e[a]})},fatalError:function(e){$.FCL_REGISTRY[n].error=e;var a,o=bt($.FCL_REGISTRY[n].subs);try{for(o.s();!(a=o.n()).done;)dt(a.value,Br)}catch(i){o.e(i)}finally{o.f()}}};return"object"===z(t)&&(t=Zi(t)),Hi(x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t(r);case 2:Xi(n);case 3:case"end":return a.stop()}},e)}))),n};function ur(t,n,r){n(t);var o,e="@EXIT",a=rn((o=x(h.mark(function u(i){var c,l;return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i.send(t,cn);case 1:return d.next=4,i.receive();case 4:if(l=$.FCL_REGISTRY[t].error,(c=d.sent).tag!==e){d.next=9;break}return i.send(t,nn),d.abrupt("return");case 9:if(!l){d.next=13;break}return r(null,l),i.send(t,nn),d.abrupt("return");case 13:r(c.data,null),d.next=1;break;case 16:case"end":return d.stop()}},u)})),function(u){return o.apply(this,arguments)}));return function(){return dt(a,e)}}function ro(t,n){return n(t),dt(t,no,null,{expectReply:!0,timeout:0})}var Yt="config",eo="PUT_CONFIG",ao="GET_CONFIG",oo="GET_ALL_CONFIG",uo="UPDATE_CONFIG",so="DELETE_CONFIG",io="CLEAR_CONFIG",co="WHERE_CONFIG",jn="CONFIG/UPDATED",fo=function(t){return t},lo=(q(zt={},eo,function(t,n,r){var e=r.key,a=r.value;if(null==e)throw new Error("Missing 'key' for config/put.");t.put(e,a),t.broadcast(jn,O({},t.all()))}),q(zt,ao,function(t,n,r){var e=r.key,a=r.fallback;if(null==e)throw new Error("Missing 'key' for config/get");n.reply(t.get(e,a))}),q(zt,oo,function(t,n){n.reply(O({},t.all()))}),q(zt,uo,function(t,n,r){var e=r.key,a=r.fn;if(null==e)throw new Error("Missing 'key' for config/update");t.update(e,a||fo),t.broadcast(jn,O({},t.all()))}),q(zt,so,function(t,n,r){var e=r.key;if(null==e)throw new Error("Missing 'key' for config/delete");t.delete(e),t.broadcast(jn,O({},t.all()))}),q(zt,io,function(t,n){for(var r=0,e=Object.keys(t.all());r1?i[1]:void 0,(n=i.length>0&&void 0!==i[0]?i[0]:[]).length){c.next=4;break}return c.abrupt("return",r);case 4:return e=Fn(n),a=e[0],o=e.slice(1),c.next=7,Ur(a);case 7:if(null!=(u=c.sent)){c.next=10;break}return c.abrupt("return",Fr(o,r));case 10:return c.abrupt("return",u);case 11:case"end":return c.stop()}},t)})),jr.apply(this,arguments)}function sr(){return dt(Yt,oo,null,{expectReply:!0,timeout:10})}function po(t){return dt(Yt,uo,{key:t,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:fo}),j()}function ho(t){return dt(Yt,so,{key:t}),j()}function go(t){return dt(Yt,co,{pattern:t},{expectReply:!0,timeout:10})}function mo(t){return ur(Yt,function(){return rn(lo,Yt)},t)}function vo(t){return dt(Yt,io).then(j(t))}function j(t){return null!=t&&"object"===z(t)&&Object.keys(t).map(function(n){return Lr(n,t[n])}),{put:Lr,get:Ur,all:sr,first:Fr,update:po,delete:ho,where:go,subscribe:mo,overload:yo}}rn(lo,Yt),j.put=Lr,j.get=Ur,j.all=sr,j.first=Fr,j.update=po,j.delete=ho,j.where=go,j.subscribe=mo,j.overload=yo;var $i=function(t){return t};function yo(){var r,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$i;return new Promise((r=x(h.mark(function e(a,o){var u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,sr();case 2:return u=c.sent,c.prev=3,j(t),c.t0=n,c.next=8,sr();case 8:return c.t1=c.sent,c.next=11,(0,c.t0)(c.t1);case 11:return i=c.sent,c.next=14,vo(u);case 14:a(i),c.next=22;break;case 17:return c.prev=17,c.t2=c.catch(3),c.next=21,vo(u);case 21:o(c.t2);case 22:case"end":return c.stop()}},e,null,[[3,17]])})),function(e,a){return r.apply(this,arguments)}))}var bo,wo,Qi={can:!(typeof window>"u"),get:(wo=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",JSON.parse(sessionStorage.getItem(n)));case 1:case"end":return r.stop()}},t)})),function(t){return wo.apply(this,arguments)}),put:(bo=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sessionStorage.setItem(n,JSON.stringify(r)));case 1:case"end":return e.stop()}},t)})),function(t,n){return bo.apply(this,arguments)})};function xo(t){return ko.apply(this,arguments)}function ko(){return(ko=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=Object,r.t1=Object,r.next=4,j().where(n);case 4:return r.t2=r.sent,r.t3=r.t1.entries.call(r.t1,r.t2).map(function(e){var a=Lt(e,2),u=a[1];return[a[0].replace(n,""),u]}),r.abrupt("return",r.t0.fromEntries.call(r.t0,r.t3));case 7:case"end":return r.stop()}},t)}))).apply(this,arguments)}j({"discovery.wallet.method.default":"IFRAME/RPC","fcl.storage.default":Qi});var Ut="1.3.2";function C(t,n){if(!t){var r,e=new Error("INVARIANT ".concat(n));e.stack=e.stack.split("\n").filter(function(i){return!/at invariant/.test(i)}).join("\n");for(var a=arguments.length,o=new Array(a>2?a-2:0),u=2;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nc(t,n){if(n&&("object"===z(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Mr(t)}function Yr(t){var n=Io();return function(){var r,e=Gn(t);if(n){var a=Gn(this).constructor;r=Reflect.construct(e,arguments,a)}else r=e.apply(this,arguments);return nc(this,r)}}wt.deprecate=function(t){var n=t.pkg,r=t.subject,e=t.transition,a=t.level,o=void 0===a?St.warn:a,u=t.message,i=void 0===u?"":u,c=t.callback,l=void 0===c?null:c,d=function(){return wt({title:"".concat(n?n+" ":"","Deprecation Notice"),message:"\n ".concat(r?"".concat((g=r,g.charAt(0).toUpperCase()+g.slice(1))," is deprecated and will cease to work in future releases").concat(n?" of "+n:"","."):"").concat(i?"\n"+i:"").concat(e?"\nYou can learn more (including a guide on common transition paths) here: ".concat(e):"","\n ").trim(),level:o});var g};return"function"==typeof l?x(h.mark(function g(){var v=arguments;return h.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,d();case 2:return m.next=4,l.apply(void 0,v);case 4:return m.abrupt("return",m.sent);case 5:case"end":return m.stop()}},g)})):d()};for(var X={},rc={byteLength:function(t){var n=So(t),e=n[1];return 3*(n[0]+e)/4-e},toByteArray:function(t){var n,r,g,e=So(t),a=e[0],o=e[1],u=new ec(3*(a+(g=o))/4-g),i=0,c=o>0?a-4:a;for(r=0;r>16&255,u[i++]=n>>8&255,u[i++]=255&n;return 2===o&&(n=Ct[t.charCodeAt(r)]<<2|Ct[t.charCodeAt(r+1)]>>4,u[i++]=255&n),1===o&&(n=Ct[t.charCodeAt(r)]<<10|Ct[t.charCodeAt(r+1)]<<4|Ct[t.charCodeAt(r+2)]>>2,u[i++]=n>>8&255,u[i++]=255&n),u},fromByteArray:function(t){for(var n,r=t.length,e=r%3,a=[],o=16383,u=0,i=r-e;ui?i:u+o));return 1===e?a.push(qt[(n=t[r-1])>>2]+qt[n<<4&63]+"=="):2===e&&a.push(qt[(n=(t[r-2]<<8)+t[r-1])>>10]+qt[n>>4&63]+qt[n<<2&63]+"="),a.join("")}},qt=[],Ct=[],ec=typeof Uint8Array<"u"?Uint8Array:Array,qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bn=0,ac=qr.length;bn0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=n),[r,r===n?0:4-r%4]}function oc(t,n,r){for(var a,o=[],u=n;u>18&63]+qt[a>>12&63]+qt[a>>6&63]+qt[63&a]);return o.join("")}Ct["-".charCodeAt(0)]=62,Ct["_".charCodeAt(0)]=63;var Kr={};function fn(t){if(Array.isArray(t)){for(var n=[],r=0;r>1,d=-7,g=r?a-1:0,v=r?-1:1,m=t[n+g];for(g+=v,o=m&(1<<-d)-1,m>>=-d,d+=i;d>0;o=256*o+t[n+g],g+=v,d-=8);for(u=o&(1<<-d)-1,o>>=-d,d+=e;d>0;u=256*u+t[n+g],g+=v,d-=8);if(0===o)o=1-l;else{if(o===c)return u?NaN:1/0*(m?-1:1);u+=Math.pow(2,e),o-=l}return(m?-1:1)*u*Math.pow(2,o-e)},Kr.write=function(t,n,r,e,a,o){var u,i,c,l=8*o-a-1,d=(1<>1,v=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=e?0:o-1,b=e?1:-1,E=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(i=isNaN(n)?1:0,u=d):(u=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-u))<1&&(u--,c*=2),(n+=u+g>=1?v/c:v*Math.pow(2,1-g))*c>=2&&(u++,c/=2),u+g>=d?(i=0,u=d):u+g>=1?(i=(n*c-1)*Math.pow(2,a),u+=g):(i=n*Math.pow(2,g-1)*Math.pow(2,a),u=0));a>=8;t[r+m]=255&i,m+=b,i/=256,a-=8);for(u=u<0;t[r+m]=255&u,m+=b,u/=256,l-=8);t[r+m-b]|=128*E},function(t){var n=rc,r=Kr,e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(s){return+s!=s&&(s=0),u.alloc(+s)},t.INSPECT_MAX_BYTES=50;var a=2147483647;function o(s){if(s>a)throw new RangeError('The value "'+s+'" is invalid for option "size"');var f=new Uint8Array(s);return Object.setPrototypeOf(f,u.prototype),f}function u(s,f,p){if("number"==typeof s){if("string"==typeof f)throw new TypeError('The "string" argument must be of type string. Received type number');return l(s)}return i(s,f,p)}function i(s,f,p){if("string"==typeof s)return function(w,P){if("string"==typeof P&&""!==P||(P="utf8"),!u.isEncoding(P))throw new TypeError("Unknown encoding: "+P);var M=0|m(w,P),tt=o(M),rt=tt.write(w,P);return rt!==M&&(tt=tt.slice(0,rt)),tt}(s,f);if(ArrayBuffer.isView(s))return function(w){if(Vt(w,Uint8Array)){var P=new Uint8Array(w);return g(P.buffer,P.byteOffset,P.byteLength)}return d(w)}(s);if(null==s)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+z(s));if(Vt(s,ArrayBuffer)||s&&Vt(s.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Vt(s,SharedArrayBuffer)||s&&Vt(s.buffer,SharedArrayBuffer)))return g(s,f,p);if("number"==typeof s)throw new TypeError('The "value" argument must not be of type number. Received type number');var y=s.valueOf&&s.valueOf();if(null!=y&&y!==s)return u.from(y,f,p);var k=function(w){if(u.isBuffer(w)){var P=0|v(w.length),M=o(P);return 0===M.length||w.copy(M,0,0,P),M}return void 0!==w.length?"number"!=typeof w.length||Ha(w.length)?o(0):d(w):"Buffer"===w.type&&Array.isArray(w.data)?d(w.data):void 0}(s);if(k)return k;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof s[Symbol.toPrimitive])return u.from(s[Symbol.toPrimitive]("string"),f,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+z(s))}function c(s){if("number"!=typeof s)throw new TypeError('"size" argument must be of type number');if(s<0)throw new RangeError('The value "'+s+'" is invalid for option "size"')}function l(s){return c(s),o(s<0?0:0|v(s))}function d(s){for(var f=s.length<0?0:0|v(s.length),p=o(f),y=0;y=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|s}function m(s,f){if(u.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||Vt(s,ArrayBuffer))return s.byteLength;if("string"!=typeof s)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+z(s));var p=s.length,y=arguments.length>2&&!0===arguments[2];if(!y&&0===p)return 0;for(var k=!1;;)switch(f){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Qt(s).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*p;case"hex":return p>>>1;case"base64":return qi(s).length;default:if(k)return y?-1:Qt(s).length;f=(""+f).toLowerCase(),k=!0}}function b(s,f,p){var y=!1;if((void 0===f||f<0)&&(f=0),f>this.length||((void 0===p||p>this.length)&&(p=this.length),p<=0)||(p>>>=0)<=(f>>>=0))return"";for(s||(s="utf8");;)switch(s){case"hex":return Nt(this,f,p);case"utf8":case"utf-8":return It(this,f,p);case"ascii":return Rt(this,f,p);case"latin1":case"binary":return _t(this,f,p);case"base64":return lt(this,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,f,p);default:if(y)throw new TypeError("Unknown encoding: "+s);s=(s+"").toLowerCase(),y=!0}}function E(s,f,p){var y=s[f];s[f]=s[p],s[p]=y}function S(s,f,p,y,k){if(0===s.length)return-1;if("string"==typeof p?(y=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),Ha(p=+p)&&(p=k?0:s.length-1),p<0&&(p=s.length+p),p>=s.length){if(k)return-1;p=s.length-1}else if(p<0){if(!k)return-1;p=0}if("string"==typeof f&&(f=u.from(f,y)),u.isBuffer(f))return 0===f.length?-1:N(s,f,p,y,k);if("number"==typeof f)return f&=255,"function"==typeof Uint8Array.prototype.indexOf?k?Uint8Array.prototype.indexOf.call(s,f,p):Uint8Array.prototype.lastIndexOf.call(s,f,p):N(s,[f],p,y,k);throw new TypeError("val must be string, number or Buffer")}function N(s,f,p,y,k){var w,P=1,M=s.length,tt=f.length;if(void 0!==y&&("ucs2"===(y=String(y).toLowerCase())||"ucs-2"===y||"utf16le"===y||"utf-16le"===y)){if(s.length<2||f.length<2)return-1;P=2,M/=2,tt/=2,p/=2}function rt(nr,rr){return 1===P?nr[rr]:nr.readUInt16BE(rr*P)}if(k){var nt=-1;for(w=p;wM&&(p=M-tt),w=p;w>=0;w--){for(var Bt=!0,sn=0;snk&&(y=k):y=k;var w,P=f.length;for(y>P/2&&(y=P/2),w=0;w>8,rt.push(P%256),rt.push(M);return rt}(f,s.length-p),s,p,y)}function lt(s,f,p){return n.fromByteArray(0===f&&p===s.length?s:s.slice(f,p))}function It(s,f,p){p=Math.min(s.length,p);for(var y=[],k=f;k239?4:w>223?3:w>191?2:1;if(k+M<=p){var tt=void 0,rt=void 0,nt=void 0,Bt=void 0;switch(M){case 1:w<128&&(P=w);break;case 2:128==(192&(tt=s[k+1]))&&(Bt=(31&w)<<6|63&tt)>127&&(P=Bt);break;case 3:rt=s[k+2],128==(192&(tt=s[k+1]))&&128==(192&rt)&&(Bt=(15&w)<<12|(63&tt)<<6|63&rt)>2047&&(Bt<55296||Bt>57343)&&(P=Bt);break;case 4:rt=s[k+2],nt=s[k+3],128==(192&(tt=s[k+1]))&&128==(192&rt)&&128==(192&nt)&&(Bt=(15&w)<<18|(63&tt)<<12|(63&rt)<<6|63&nt)>65535&&Bt<1114112&&(P=Bt)}}null===P?(P=65533,M=1):P>65535&&(y.push((P-=65536)>>>10&1023|55296),P=56320|1023&P),y.push(P),k+=M}return function(sn){var nr=sn.length;if(nr<=At)return String.fromCharCode.apply(String,sn);for(var rr="",Wa=0;Wa"u"||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(s,f,p){return i(s,f,p)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(s,f,p){return k=f,w=p,c(y=s),y<=0?o(y):void 0!==k?"string"==typeof w?o(y).fill(k,w):o(y).fill(k):o(y);var y,k,w},u.allocUnsafe=function(s){return l(s)},u.allocUnsafeSlow=function(s){return l(s)},u.isBuffer=function(s){return null!=s&&!0===s._isBuffer&&s!==u.prototype},u.compare=function(s,f){if(Vt(s,Uint8Array)&&(s=u.from(s,s.offset,s.byteLength)),Vt(f,Uint8Array)&&(f=u.from(f,f.offset,f.byteLength)),!u.isBuffer(s)||!u.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(s===f)return 0;for(var p=s.length,y=f.length,k=0,w=Math.min(p,y);ky.length?(u.isBuffer(w)||(w=u.from(w)),w.copy(y,k)):Uint8Array.prototype.set.call(y,w,k);else{if(!u.isBuffer(w))throw new TypeError('"list" argument must be an Array of Buffers');w.copy(y,k)}k+=w.length}return y},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var s=this.length;if(s%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var f=0;ff&&(s+=" ... "),""},e&&(u.prototype[e]=u.prototype.inspect),u.prototype.compare=function(s,f,p,y,k){if(Vt(s,Uint8Array)&&(s=u.from(s,s.offset,s.byteLength)),!u.isBuffer(s))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+z(s));if(void 0===f&&(f=0),void 0===p&&(p=s?s.length:0),void 0===y&&(y=0),void 0===k&&(k=this.length),f<0||p>s.length||y<0||k>this.length)throw new RangeError("out of range index");if(y>=k&&f>=p)return 0;if(y>=k)return-1;if(f>=p)return 1;if(this===s)return 0;for(var w=(k>>>=0)-(y>>>=0),P=(p>>>=0)-(f>>>=0),M=Math.min(w,P),tt=this.slice(y,k),rt=s.slice(f,p),nt=0;nt>>=0,isFinite(p)?(p>>>=0,void 0===y&&(y="utf8")):(y=p,p=void 0)}var k=this.length-f;if((void 0===p||p>k)&&(p=k),s.length>0&&(p<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");y||(y="utf8");for(var w=!1;;)switch(y){case"hex":return T(this,s,f,p);case"utf8":case"utf-8":return R(this,s,f,p);case"ascii":case"latin1":case"binary":return L(this,s,f,p);case"base64":return I(this,s,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,s,f,p);default:if(w)throw new TypeError("Unknown encoding: "+y);y=(""+y).toLowerCase(),w=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var At=4096;function Rt(s,f,p){var y="";p=Math.min(s.length,p);for(var k=f;ky)&&(p=y);for(var k="",w=f;wp)throw new RangeError("Trying to access beyond buffer length")}function U(s,f,p,y,k,w){if(!u.isBuffer(s))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>k||fs.length)throw new RangeError("Index out of range")}function Y(s,f,p,y,k){Tt(f,y,k,s,p,7);var w=Number(f&BigInt(4294967295));s[p++]=w,s[p++]=w>>=8,s[p++]=w>>=8,s[p++]=w>>=8;var P=Number(f>>BigInt(32)&BigInt(4294967295));return s[p++]=P,s[p++]=P>>=8,s[p++]=P>>=8,s[p++]=P>>=8,p}function D(s,f,p,y,k){Tt(f,y,k,s,p,7);var w=Number(f&BigInt(4294967295));s[p+7]=w,s[p+6]=w>>=8,s[p+5]=w>>=8,s[p+4]=w>>=8;var P=Number(f>>BigInt(32)&BigInt(4294967295));return s[p+3]=P,s[p+2]=P>>=8,s[p+1]=P>>=8,s[p]=P>>=8,p+8}function ut(s,f,p,y,k,w){if(p+y>s.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function it(s,f,p,y,k){return f=+f,p>>>=0,k||ut(s,0,p,4),r.write(s,f,p,y,23,4),p+4}function yt(s,f,p,y,k){return f=+f,p>>>=0,k||ut(s,0,p,8),r.write(s,f,p,y,52,8),p+8}u.prototype.slice=function(s,f){var p=this.length;(s=~~s)<0?(s+=p)<0&&(s=0):s>p&&(s=p),(f=void 0===f?p:~~f)<0?(f+=p)<0&&(f=0):f>p&&(f=p),f>>=0,f>>>=0,p||A(s,f,this.length);for(var y=this[s],k=1,w=0;++w>>=0,f>>>=0,p||A(s,f,this.length);for(var y=this[s+--f],k=1;f>0&&(k*=256);)y+=this[s+--f]*k;return y},u.prototype.readUint8=u.prototype.readUInt8=function(s,f){return s>>>=0,f||A(s,1,this.length),this[s]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(s,f){return s>>>=0,f||A(s,2,this.length),this[s]|this[s+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(s,f){return s>>>=0,f||A(s,2,this.length),this[s]<<8|this[s+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(s,f){return s>>>=0,f||A(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+16777216*this[s+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(s,f){return s>>>=0,f||A(s,4,this.length),16777216*this[s]+(this[s+1]<<16|this[s+2]<<8|this[s+3])},u.prototype.readBigUInt64LE=un(function(s){$t(s>>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=f+this[++s]*Math.pow(2,8)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,24),k=this[++s]+this[++s]*Math.pow(2,8)+this[++s]*Math.pow(2,16)+p*Math.pow(2,24);return BigInt(y)+(BigInt(k)<>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=f*Math.pow(2,24)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,8)+this[++s],k=this[++s]*Math.pow(2,24)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,8)+p;return(BigInt(y)<>>=0,f>>>=0,p||A(s,f,this.length);for(var y=this[s],k=1,w=0;++w=(k*=128)&&(y-=Math.pow(2,8*f)),y},u.prototype.readIntBE=function(s,f,p){s>>>=0,f>>>=0,p||A(s,f,this.length);for(var y=f,k=1,w=this[s+--y];y>0&&(k*=256);)w+=this[s+--y]*k;return w>=(k*=128)&&(w-=Math.pow(2,8*f)),w},u.prototype.readInt8=function(s,f){return s>>>=0,f||A(s,1,this.length),128&this[s]?-1*(255-this[s]+1):this[s]},u.prototype.readInt16LE=function(s,f){s>>>=0,f||A(s,2,this.length);var p=this[s]|this[s+1]<<8;return 32768&p?4294901760|p:p},u.prototype.readInt16BE=function(s,f){s>>>=0,f||A(s,2,this.length);var p=this[s+1]|this[s]<<8;return 32768&p?4294901760|p:p},u.prototype.readInt32LE=function(s,f){return s>>>=0,f||A(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},u.prototype.readInt32BE=function(s,f){return s>>>=0,f||A(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},u.prototype.readBigInt64LE=un(function(s){$t(s>>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=this[s+4]+this[s+5]*Math.pow(2,8)+this[s+6]*Math.pow(2,16)+(p<<24);return(BigInt(y)<>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=(f<<24)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,8)+this[++s];return(BigInt(y)<>>=0,f||A(s,4,this.length),r.read(this,s,!0,23,4)},u.prototype.readFloatBE=function(s,f){return s>>>=0,f||A(s,4,this.length),r.read(this,s,!1,23,4)},u.prototype.readDoubleLE=function(s,f){return s>>>=0,f||A(s,8,this.length),r.read(this,s,!0,52,8)},u.prototype.readDoubleBE=function(s,f){return s>>>=0,f||A(s,8,this.length),r.read(this,s,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(s,f,p,y){s=+s,f>>>=0,p>>>=0,y||U(this,s,f,p,Math.pow(2,8*p)-1,0);var k=1,w=0;for(this[f]=255&s;++w>>=0,p>>>=0,y||U(this,s,f,p,Math.pow(2,8*p)-1,0);var k=p-1,w=1;for(this[f+k]=255&s;--k>=0&&(w*=256);)this[f+k]=s/w&255;return f+p},u.prototype.writeUint8=u.prototype.writeUInt8=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,1,255,0),this[f]=255&s,f+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,65535,0),this[f]=255&s,this[f+1]=s>>>8,f+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,65535,0),this[f]=s>>>8,this[f+1]=255&s,f+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,4294967295,0),this[f+3]=s>>>24,this[f+2]=s>>>16,this[f+1]=s>>>8,this[f]=255&s,f+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,4294967295,0),this[f]=s>>>24,this[f+1]=s>>>16,this[f+2]=s>>>8,this[f+3]=255&s,f+4},u.prototype.writeBigUInt64LE=un(function(s){return Y(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=un(function(s){return D(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(s,f,p,y){if(s=+s,f>>>=0,!y){var k=Math.pow(2,8*p-1);U(this,s,f,p,k-1,-k)}var w=0,P=1,M=0;for(this[f]=255&s;++w>0)-M&255;return f+p},u.prototype.writeIntBE=function(s,f,p,y){if(s=+s,f>>>=0,!y){var k=Math.pow(2,8*p-1);U(this,s,f,p,k-1,-k)}var w=p-1,P=1,M=0;for(this[f+w]=255&s;--w>=0&&(P*=256);)s<0&&0===M&&0!==this[f+w+1]&&(M=1),this[f+w]=(s/P>>0)-M&255;return f+p},u.prototype.writeInt8=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,1,127,-128),s<0&&(s=255+s+1),this[f]=255&s,f+1},u.prototype.writeInt16LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,32767,-32768),this[f]=255&s,this[f+1]=s>>>8,f+2},u.prototype.writeInt16BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,32767,-32768),this[f]=s>>>8,this[f+1]=255&s,f+2},u.prototype.writeInt32LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,2147483647,-2147483648),this[f]=255&s,this[f+1]=s>>>8,this[f+2]=s>>>16,this[f+3]=s>>>24,f+4},u.prototype.writeInt32BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[f]=s>>>24,this[f+1]=s>>>16,this[f+2]=s>>>8,this[f+3]=255&s,f+4},u.prototype.writeBigInt64LE=un(function(s){return Y(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=un(function(s){return D(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(s,f,p){return it(this,s,f,!0,p)},u.prototype.writeFloatBE=function(s,f,p){return it(this,s,f,!1,p)},u.prototype.writeDoubleLE=function(s,f,p){return yt(this,s,f,!0,p)},u.prototype.writeDoubleBE=function(s,f,p){return yt(this,s,f,!1,p)},u.prototype.copy=function(s,f,p,y){if(!u.isBuffer(s))throw new TypeError("argument should be a Buffer");if(p||(p=0),y||0===y||(y=this.length),f>=s.length&&(f=s.length),f||(f=0),y>0&&y=this.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("sourceEnd out of bounds");y>this.length&&(y=this.length),s.length-f>>=0,p=void 0===p?this.length:p>>>0,s||(s=0),"number"==typeof s)for(w=f;w=y+4;p-=3)f="_".concat(s.slice(p-3,p)).concat(f);return"".concat(s.slice(0,p)).concat(f)}function Tt(s,f,p,y,k,w){if(s>p||s3?0===f||f===BigInt(0)?">= 0".concat(M," and < 2").concat(M," ** ").concat(8*(w+1)).concat(M):">= -(2".concat(M," ** ").concat(8*(w+1)-1).concat(M,") and < 2 ** ")+"".concat(8*(w+1)-1).concat(M):">= ".concat(f).concat(M," and <= ").concat(p).concat(M),new pt.ERR_OUT_OF_RANGE("value",P,s)}var tt,rt,nt;tt=y,nt=w,$t(rt=k,"offset"),void 0!==tt[rt]&&void 0!==tt[rt+nt]||on(rt,tt.length-(nt+1))}function $t(s,f){if("number"!=typeof s)throw new pt.ERR_INVALID_ARG_TYPE(f,"number",s)}function on(s,f,p){throw Math.floor(s)!==s?($t(s,p),new pt.ERR_OUT_OF_RANGE(p||"offset","an integer",s)):f<0?new pt.ERR_BUFFER_OUT_OF_BOUNDS:new pt.ERR_OUT_OF_RANGE(p||"offset",">= ".concat(p?1:0," and <= ").concat(f),s)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(s){return s?"".concat(s," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(s,f){return'The "'.concat(s,'" argument must be of type number. Received type ').concat(z(f))},TypeError),F("ERR_OUT_OF_RANGE",function(s,f,p){var y='The value of "'.concat(s,'" is out of range.'),k=p;return Number.isInteger(p)&&Math.abs(p)>Math.pow(2,32)?k=kt(String(p)):"bigint"==typeof p&&(k=String(p),(p>Math.pow(BigInt(2),BigInt(32))||p<-Math.pow(BigInt(2),BigInt(32)))&&(k=kt(k)),k+="n"),y+" It must be ".concat(f,". Received ").concat(k)},RangeError);var tr=/[^+/0-9A-Za-z-_]/g;function Qt(s,f){var p;f=f||1/0;for(var y=s.length,k=null,w=[],P=0;P55295&&p<57344){if(!k){if(p>56319){(f-=3)>-1&&w.push(239,191,189);continue}if(P+1===y){(f-=3)>-1&&w.push(239,191,189);continue}k=p;continue}if(p<56320){(f-=3)>-1&&w.push(239,191,189),k=p;continue}p=65536+(k-55296<<10|p-56320)}else k&&(f-=3)>-1&&w.push(239,191,189);if(k=null,p<128){if((f-=1)<0)break;w.push(p)}else if(p<2048){if((f-=2)<0)break;w.push(p>>6|192,63&p|128)}else if(p<65536){if((f-=3)<0)break;w.push(p>>12|224,p>>6&63|128,63&p|128)}else{if(!(p<1114112))throw new Error("Invalid code point");if((f-=4)<0)break;w.push(p>>18|240,p>>12&63|128,p>>6&63|128,63&p|128)}}return w}function qi(s){return n.toByteArray(function(f){if((f=(f=f.split("=")[0]).trim().replace(tr,"")).length<2)return"";for(;f.length%4!=0;)f+="=";return f}(s))}function Pr(s,f,p,y){var k;for(k=0;k=f.length||k>=s.length);++k)f[k+p]=s[k];return k}function Vt(s,f){return s instanceof f||null!=s&&null!=s.constructor&&null!=s.constructor.name&&s.constructor.name===f.name}function Ha(s){return s!=s}var fp=function(){for(var s="0123456789abcdef",f=new Array(256),p=0;p<16;++p)for(var y=16*p,k=0;k<16;++k)f[y+k]=s[p]+s[k];return f}();function un(s){return typeof BigInt>"u"?lp:s}function lp(){throw new Error("BigInt not supported")}}(X);var Vr={exports:{}};!function(t,n){var r=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(void 0!==r)return r;throw new Error("unable to locate global object")}();t.exports=n=r.fetch,r.fetch&&(n.default=r.fetch.bind(r)),n.Headers=r.Headers,n.Request=r.Request,n.Response=r.Response}(Vr,Vr.exports);var _o=Vr.exports;function Z(t){return null==t?null:t.replace(/^0x/,"").replace(/^Fx/,"")}function at(t){return null==t?null:"0x"+Z(t)}var Jr=function(t){zr(r,t);var n=Yr(r);function r(e){var a,o=e.error,u=e.hostname,i=e.path,c=e.method,l=e.requestBody,d=e.responseBody,g=e.responseStatusText,v=e.statusCode;Dr(this,r);var m="\n HTTP Request Error: An error occurred when interacting with the Access API.\n ".concat(o?"error=".concat(o):"","\n ").concat(u?"hostname=".concat(u):"","\n ").concat(i?"path=".concat(i):"","\n ").concat(c?"method=".concat(c):"","\n ").concat(l?"requestBody=".concat(l):"","\n ").concat(d?"responseBody=".concat(d):"","\n ").concat(g?"responseStatusText=".concat(g):"","\n ").concat(v?"statusCode=".concat(v):"","\n ");return(a=n.call(this,m)).name="HTTP Request Error",a.statusCode=v,a.errorMessage=o,a}return Gr(r)}(ir(Error));function gt(t){return Xr.apply(this,arguments)}function Xr(){return Xr=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m,b;return h.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return b=function(){return b=x(h.mark(function S(){var N,R=arguments;return h.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return N=R.length>0&&void 0!==R[0]?R[0]:0,L.prev=1,L.next=4,v();case 4:case 14:return L.abrupt("return",L.sent);case 8:if(L.prev=8,L.t0=L.catch(1),![408,429,500,502,503,504].includes(L.t0.statusCode)){L.next=17;break}return L.next=14,new Promise(function(I,W){N1&&void 0!==a[1]?a[1]:{},C((e=a.length>2&&void 0!==a[2]?a[2]:{}).node,"SDK Send Execute Script Error: opts.node must be defined."),C(r.response,"SDK Send Execute Script Error: context.response must be defined."),C(r.Buffer,"SDK Send Execute Script Error: context.Buffer must be defined."),o.next=7,n;case 7:if(!(n=o.sent).block.id){o.next=14;break}return o.next=11,sc(n,r,e);case 11:case 17:case 22:return o.abrupt("return",o.sent);case 14:if(!n.block.height){o.next=20;break}return o.next=17,ic(n,r,e);case 20:return o.next=22,cc(n,r,e);case 23:case"end":return o.stop()}},t)})),ne.apply(this,arguments)}var lc={SHA2_256:1,SHA2_384:2,SHA3_256:3,SHA3_384:4,KMAC128_BLS_BLS12_381:5},pc={ECDSA_P256:1,ECDSA_secp256k1:2,BLS_BLS12_381:3};function dc(t,n,r){return To.apply(this,arguments)}function To(){return(To=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/accounts/".concat(n.account.addr,"?block_height=").concat(n.block.height,"&expand=contracts,keys"),method:"GET",body:null});case 3:return u.abrupt("return",Oo(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function hc(t,n,r){return Co.apply(this,arguments)}function Co(){return(Co=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/accounts/".concat(n.account.addr,"?block_height=sealed&expand=contracts,keys"),method:"GET",body:null});case 3:return u.abrupt("return",Oo(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function Oo(t,n,r){var e,a,o=n.response();return o.tag=t.tag,o.account={address:r.address,balance:Number(r.balance),code:"",contracts:function(u){var i={};if(!u)return i;for(var c=0,l=Object.keys(u);c1&&void 0!==a[1]?a[1]:{},C((e=a.length>2&&void 0!==a[2]?a[2]:{}).node,"SDK Send Get Account Error: opts.node must be defined."),C(r.response,"SDK Send Get Account Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Account Error: context.Buffer must be defined."),o.next=7,n;case 7:if(null===(n=o.sent).block.height){o.next=14;break}return o.next=11,dc(n,r,e);case 11:case 16:return o.abrupt("return",o.sent);case 14:return o.next=16,hc(n,r,e);case 17:case"end":return o.stop()}},t)})),re.apply(this,arguments)}function mc(t,n,r){return Po.apply(this,arguments)}function Po(){return(Po=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks/".concat(n.block.id),method:"GET",body:null});case 3:return u.abrupt("return",ee(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function vc(t,n,r){return No.apply(this,arguments)}function No(){return(No=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks?height=".concat(n.block.height),method:"GET",body:null});case 3:return u.abrupt("return",ee(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function yc(t,n,r){return Bo.apply(this,arguments)}function Bo(){return(Bo=x(h.mark(function t(n,r,e){var a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=e.httpRequest||gt,u=null!==(a=n.block)&&void 0!==a&&a.isSealed?"sealed":"finalized",c.next=4,o({hostname:e.node,path:"/v1/blocks?height=".concat(u),method:"GET",body:null});case 4:return c.abrupt("return",ee(n,r,c.sent));case 6:case"end":return c.stop()}},t)}))).apply(this,arguments)}function ee(t,n,r){var e=r.length?r[0]:null,a=n.response();return a.tag=t.tag,a.blockHeader={id:e.header.id,parentId:e.header.parent_id,height:Number(e.header.height),timestamp:e.header.timestamp},a}function bc(t){return ae.apply(this,arguments)}function ae(){return ae=x(h.mark(function t(n){var r,e,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Block Header Error: opts.node must be defined."),C(r.response,"SDK Send Get Block Header Error: context.response must be defined."),i.next=6,n;case 6:if(o=null!==(n=i.sent).block.height,null===n.block.id){i.next=15;break}return i.next=12,mc(n,r,e);case 12:case 18:case 23:return i.abrupt("return",i.sent);case 15:if(!o){i.next=21;break}return i.next=18,vc(n,r,e);case 21:return i.next=23,yc(n,r,e);case 24:case"end":return i.stop()}},t)})),ae.apply(this,arguments)}function wc(t,n,r){return Lo.apply(this,arguments)}function Lo(){return(Lo=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks/".concat(n.block.id,"?expand=payload"),method:"GET",body:null});case 3:return u.abrupt("return",oe(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function xc(t,n,r){return Uo.apply(this,arguments)}function Uo(){return(Uo=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks?height=".concat(n.block.height,"&expand=payload"),method:"GET",body:null});case 3:return u.abrupt("return",oe(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function kc(t,n,r){return Fo.apply(this,arguments)}function Fo(){return(Fo=x(h.mark(function t(n,r,e){var a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=e.httpRequest||gt,u=null!==(a=n.block)&&void 0!==a&&a.isSealed?"sealed":"final",c.next=4,o({hostname:e.node,path:"/v1/blocks?height=".concat(u,"&expand=payload"),method:"GET",body:null});case 4:return c.abrupt("return",oe(n,r,c.sent));case 6:case"end":return c.stop()}},t)}))).apply(this,arguments)}function oe(t,n,r){var e=r.length?r[0]:null,a=n.response();return a.tag=t.tag,a.block={id:e.header.id,parentId:e.header.parent_id,height:Number(e.header.height),timestamp:e.header.timestamp,collectionGuarantees:e.payload.collection_guarantees.map(function(o){return{collectionId:o.collection_id,signerIds:o.signer_ids}}),blockSeals:e.payload.block_seals.map(function(o){return{blockId:o.block_id,executionReceiptId:o.result_id}})},a}function Ec(t){return ue.apply(this,arguments)}function ue(){return ue=x(h.mark(function t(n){var r,e,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Block Error: opts.node must be defined."),C(r.response,"SDK Send Get Block Error: context.response must be defined."),i.next=6,n;case 6:if(o=null!==(n=i.sent).block.height,null===n.block.id){i.next=15;break}return i.next=12,wc(n,r,e);case 12:case 18:case 23:return i.abrupt("return",i.sent);case 15:if(!o){i.next=21;break}return i.next=18,xc(n,r,e);case 21:return i.next=23,kc(n,r,e);case 24:case"end":return i.stop()}},t)})),ue.apply(this,arguments)}function Ic(t){return se.apply(this,arguments)}function se(){return se=x(h.mark(function t(n){var r,e,a,o,u,i=arguments;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},C((e=i.length>2&&void 0!==i[2]?i[2]:{}).node,"SDK Send Get Collection Error: opts.node must be defined."),C(r.response,"SDK Send Get Collection Error: context.response must be defined."),a=e.httpRequest||gt,c.next=7,a({hostname:e.node,path:"/v1/collections/".concat(n.collection.id,"?expand=transactions"),method:"GET",body:null});case 7:return o=c.sent,(u=r.response()).tag=n.tag,u.collection={id:o.id,transactionIds:o.transactions.map(function(l){return l.id})},c.abrupt("return",u);case 12:case"end":return c.stop()}},t)})),se.apply(this,arguments)}function Sc(t,n,r){return jo.apply(this,arguments)}function jo(){return(jo=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/events?type=".concat(n.events.eventType,"&start_height=").concat(n.events.start,"&end_height=").concat(n.events.end),method:"GET",body:null});case 3:return u.abrupt("return",Go(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function Ac(t,n,r){return Do.apply(this,arguments)}function Do(){return(Do=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/events?type=".concat(n.events.eventType,"&block_ids=").concat(n.events.blockIds.join(",")),method:"GET",body:null});case 3:return u.abrupt("return",Go(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function Go(t,n,r){var e=n.response();return e.tag=t.tag,e.events=[],r.forEach(function(a){return a.events?a.events.forEach(function(o){return e.events.push({blockId:a.block_id,blockHeight:Number(a.block_height),blockTimestamp:a.block_timestamp,type:o.type,transactionId:o.transaction_id,transactionIndex:Number(o.transaction_index),eventIndex:Number(o.event_index),payload:JSON.parse(n.Buffer.from(o.payload,"base64").toString())})}):null}),e}function Rc(t){return ie.apply(this,arguments)}function ie(){return ie=x(h.mark(function t(n){var r,e,a,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Events Error: opts.node must be defined."),C(r.response,"SDK Send Get Events Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Events Error: context.Buffer must be defined."),i.next=7,n;case 7:if(a=null!==(n=i.sent).events.start,o=Array.isArray(n.events.blockIds)&&n.events.blockIds.length>0,C(a||o,"SendGetEventsError: Unable to determine which get events request to send. Either a block height range, or block IDs must be specified."),!a){i.next=17;break}return i.next=14,Sc(n,r,e);case 14:case 19:return i.abrupt("return",i.sent);case 17:return i.next=19,Ac(n,r,e);case 20:case"end":return i.stop()}},t)})),ie.apply(this,arguments)}function _c(t){return ce.apply(this,arguments)}function ce(){return ce=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d=arguments;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return r=d.length>1&&void 0!==d[1]?d[1]:{},C((e=d.length>2&&void 0!==d[2]?d[2]:{}).node,"SDK Send Get Transaction Error: opts.node must be defined."),C(r.response,"SDK Send Get Transaction Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Transaction Error: context.Buffer must be defined."),a=e.httpRequest||gt,g.next=8,n;case 8:return n=g.sent,g.next=11,a({hostname:e.node,path:"/v1/transactions/".concat(n.transaction.id),method:"GET",body:null});case 11:return o=g.sent,u=function(v){return{address:v.address,keyId:Number(v.key_id),sequenceNumber:Number(v.sequence_number)}},i=function(v){return{address:v.address,keyId:Number(v.key_index),signature:v.signature}},c=function(v){return JSON.parse(r.Buffer.from(v,"base64").toString())},(l=r.response()).tag=n.tag,l.transaction={script:r.Buffer.from(o.script,"base64").toString(),args:K(o.arguments.map(c)),referenceBlockId:o.reference_block_id,gasLimit:Number(o.gas_limit),payer:o.payer,proposalKey:o.proposal_key?u(o.proposal_key):o.proposal_key,authorizers:o.authorizers,payloadSignatures:K(o.payload_signatures.map(i)),envelopeSignatures:K(o.envelope_signatures.map(i))},g.abrupt("return",l);case 19:case"end":return g.stop()}},t)})),ce.apply(this,arguments)}var Tc={UNKNOWN:0,PENDING:1,FINALIZED:2,EXECUTED:3,SEALED:4,EXPIRED:5};function Cc(t){return fe.apply(this,arguments)}function fe(){return fe=x(h.mark(function t(n){var r,e,a,o,u,i=arguments;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},C((e=i.length>2&&void 0!==i[2]?i[2]:{}).node,"SDK Send Get Transaction Status Error: opts.node must be defined."),C(r.response,"SDK Send Get Transaction Status Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Transaction Status Error: context.Buffer must be defined."),a=e.httpRequest||gt,c.next=8,n;case 8:return n=c.sent,c.next=11,a({hostname:e.node,path:"/v1/transaction_results/".concat(n.transaction.id),method:"GET",body:null});case 11:return o=c.sent,(u=r.response()).tag=n.tag,u.transactionStatus={blockId:o.block_id,status:Tc[o.status.toUpperCase()]||"",statusString:o.status.toUpperCase(),statusCode:o.status_code,errorMessage:o.error_message,events:o.events.map(function(l){return{type:l.type,transactionId:l.transaction_id,transactionIndex:Number(l.transaction_index),eventIndex:Number(l.event_index),payload:JSON.parse(r.Buffer.from(l.payload,"base64").toString())}})},c.abrupt("return",u);case 16:case"end":return c.stop()}},t)})),fe.apply(this,arguments)}function Oc(t){return le.apply(this,arguments)}function le(){return le=x(h.mark(function t(n){var r,e,a,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Ping Error: opts.node must be defined."),C(r.response,"SDK Send Ping Error: context.response must be defined."),a=e.httpRequest||gt,i.next=7,a({hostname:e.node,path:"/v1/blocks?height=sealed",method:"GET",body:null});case 7:return(o=r.response()).tag=n.tag,i.abrupt("return",o);case 10:case"end":return i.stop()}},t)})),le.apply(this,arguments)}var Pc=function(t){return"".concat(withPrefix(t.addr),"-").concat(t.keyId)};function Nc(t){return pe.apply(this,arguments)}function pe(){return pe=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m,b,E,S,N,T=arguments;return h.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return r=T.length>1&&void 0!==T[1]?T[1]:{},C((e=T.length>2&&void 0!==T[2]?T[2]:{}).node,"SDK Send Transaction Error: opts.node must be defined."),C(r.response,"SDK Send Transaction Error: context.response must be defined."),C(r.Buffer,"SDK Send Transaction Error: context.Buffer must be defined."),a=e.httpRequest||gt,R.next=8,n;case 8:n=R.sent,o=[],u=0,i=Object.values(n.accounts);case 11:if(!(u1&&void 0!==o[1]?o[1]:{},C((a=o.length>2&&void 0!==o[2]?o[2]:{}).node,'SDK Send Error: Either opts.node or "accessNode.api" in config must be defined.'),C(e.ix,"SDK Send Error: context.ix must be defined."),u.next=6,r;case 6:r=u.sent,u.t0=!0,u.next=u.t0===e.ix.isTransaction(r)?10:u.t0===e.ix.isGetTransactionStatus(r)?11:u.t0===e.ix.isGetTransaction(r)?12:u.t0===e.ix.isScript(r)?13:u.t0===e.ix.isGetAccount(r)?14:u.t0===e.ix.isGetEvents(r)?15:u.t0===e.ix.isGetBlock(r)?16:u.t0===e.ix.isGetBlockHeader(r)?17:u.t0===e.ix.isGetCollection(r)?18:u.t0===e.ix.isPing(r)?19:20;break;case 10:return u.abrupt("return",a.sendTransaction?a.sendTransaction(r,e,a):Nc(r,e,a));case 11:return u.abrupt("return",a.sendGetTransactionStatus?a.sendGetTransactionStatus(r,e,a):Cc(r,e,a));case 12:return u.abrupt("return",a.sendGetTransaction?a.sendGetTransaction(r,e,a):_c(r,e,a));case 13:return u.abrupt("return",a.sendExecuteScript?a.sendExecuteScript(r,e,a):fc(r,e,a));case 14:return u.abrupt("return",a.sendGetAccount?a.sendGetAccount(r,e,a):gc(r,e,a));case 15:return u.abrupt("return",a.sendGetEvents?a.sendGetEvents(r,e,a):Rc(r,e,a));case 16:return u.abrupt("return",a.sendGetBlock?a.sendGetBlock(r,e,a):Ec(r,e,a));case 17:return u.abrupt("return",a.sendGetBlockHeader?a.sendGetBlockHeader(r,e,a):bc(r,e,a));case 18:return u.abrupt("return",a.sendGetCollection?a.sendGetCollection(r,e,a):Ic(r,e,a));case 19:return u.abrupt("return",a.sendPing?a.sendPing(r,e,a):Oc(r,e,a));case 20:return u.abrupt("return",r);case 21:case"end":return u.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),he={},Mo={},zo={},Yo={},ge=function(t,n){return function(r,e){var a=2*e,o=2*n;r[a]=t[o],r[a+1]=t[o+1]}};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=ge)&&n.__esModule?n:{default:n};t.default=function(a){for(var o=a.A,u=a.C,i=0;i<25;i+=5){for(var c=0;c<5;c++)(0,r.default)(o,i+c)(u,c);for(var l=0;l<5;l++){var d=2*(i+l),g=(l+1)%5*2,v=(l+2)%5*2;o[d]^=~u[g]&u[v],o[d+1]^=~u[g+1]&u[v+1]}}}}(Yo);var qo={},Ko={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);t.default=n})(Ko),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=Ko)&&n.__esModule?n:{default:n};t.default=function(a){var o=a.A,u=2*a.roundIndex;o[0]^=r.default[u],o[1]^=r.default[u+1]}}(qo);var Ho={},Wo={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1]}(Wo);var Vo={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44]})(Vo),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(Wo),r=a(Vo),e=a(ge);function a(u){return u&&u.__esModule?u:{default:u}}t.default=function(u){var i=u.A,c=u.C,l=u.W;(0,e.default)(i,1)(l,0);for(var d=0,g=0,v=0,m=32,b=0;b<24;b++){var E=n.default[b],S=r.default[b];(0,e.default)(i,E)(c,0),l[v=S<32?0:1]=(d=l[0])<>>(m=32-S),l[(v+1)%2]=g<>>m,(0,e.default)(l,0)(i,E),(0,e.default)(c,0)(l,0)}}}(Ho);var Jo={};function Xo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t.length&&!n.length||!t.length)return r;if(!n.length)return[].concat(K(r),[t[0]]);var e=Fn(t),a=e[0],o=e.slice(1),u=Fn(n),i=u[0],c=u.slice(1);return void 0!==a&&r.push(a),void 0!==i&&r.push(i),Xo(o,c,r)}function Zo(t){return function(n){return"function"==typeof n?(wt.deprecate({pkg:"FCL/SDK",subject:"Interopolation of functions into template literals",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params"}),Zo(t)(n(t))):String(n)}}function cr(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e=0||(d[c]=u[c]);return d}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(e=0;e=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=ge)&&n.__esModule?n:{default:n};t.default=function(a){for(var o=a.A,u=a.C,i=a.D,c=a.W,l=0,d=0,g=0;g<5;g++){var v=2*g,m=2*(g+5),b=2*(g+10),E=2*(g+15),S=2*(g+20);u[v]=o[v]^o[m]^o[b]^o[E]^o[S],u[v+1]=o[v+1]^o[m+1]^o[b+1]^o[E+1]^o[S+1]}for(var N=0;N<5;N++){(0,r.default)(u,(N+1)%5)(c,0),c[0]=(l=c[0])<<1|(d=c[1])>>>31,c[1]=d<<1|l>>>31,i[2*N]=u[(N+4)%5*2]^c[0],i[2*N+1]=u[(N+4)%5*2+1]^c[1];for(var T=0;T<25;T+=5)o[2*(T+N)]^=i[2*N],o[2*(T+N)+1]^=i[2*N+1]}}})(Jo),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(Yo),r=o(qo),e=o(Ho),a=o(Jo);function o(i){return i&&i.__esModule?i:{default:i}}t.default=function(){var i=new Uint32Array(10),c=new Uint32Array(10),l=new Uint32Array(2);return function(d){for(var g=0;g<24;g++)(0,a.default)({A:d,C:i,D:c,W:l}),(0,e.default)({A:d,C:i,W:l}),(0,n.default)({A:d,C:i}),(0,r.default)({A:d,roundIndex:g});i.fill(0),c.fill(0),l.fill(0)}}}(zo),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=X,e=(n=zo)&&n.__esModule?n:{default:n},a=function(i,c){for(var l=0;l>>8,c[l+2]=i[d+1]>>>16,c[l+3]=i[d+1]>>>24,c[l+4]=i[d],c[l+5]=i[d]>>>8,c[l+6]=i[d]>>>16,c[l+7]=i[d]>>>24}return c};t.default=function(i){var c=this,l=i.capacity,d=i.padding,g=(0,e.default)(),v=l/8,m=200-l/4,b=0,E=new Uint32Array(50),S=r.Buffer.allocUnsafe(m);return this.absorb=function(N){for(var T=0;T=m&&(a(S,E),g(E),b=0);return c},this.squeeze=function(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},T={buffer:N.buffer||r.Buffer.allocUnsafe(v),padding:N.padding||d,queue:r.Buffer.allocUnsafe(S.length),state:new Uint32Array(E.length)};S.copy(T.queue);for(var R=0;R0&&void 0!==arguments[0]?arguments[0]:v;if(!this||this.constructor!==b)return new b(S);if(g&&!g.includes(S))throw new Error("Unsupported hash length");var N=new e.default({capacity:S});return this.update=function(T){var R=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(r.Buffer.isBuffer(T))return N.absorb(T),E;if("string"==typeof T)return E.update(r.Buffer.from(T,R));throw new TypeError("Not a string or buffer")},this.digest=function(){var T=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",R="string"==typeof T?{format:T}:T,L=N.squeeze({buffer:R.buffer,padding:R.padding||m});return R.format&&"binary"!==R.format?L.toString(R.format):L},this.reset=function(){return N.reset(),E},this}},o=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:1});t.Keccak=o;var u=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:6});t.SHA3=u;var i=a({allowedSizes:[128,256],defaultSize:256,padding:31});t.SHAKE=i;var c=o;t.SHA3Hash=c,u.SHA3Hash=c,t.default=u}(he);var fr="UNKNOWN",me="SCRIPT",ve="TRANSACTION",ye="GET_TRANSACTION_STATUS",be="GET_ACCOUNT",we="GET_EVENTS",xe="PING",ke="GET_TRANSACTION",Ee="GET_BLOCK",Ie="GET_BLOCK_HEADER",Se="GET_COLLECTION",Re="ACCOUNT",_e="ARGUMENT",Te="authorizer",Ce="payer",Qo="proposer",Lc='{\n "kind":"'.concat(Re,'",\n "tempId":null,\n "addr":null,\n "keyId":null,\n "sequenceNum":null,\n "signature":null,\n "signingFunction":null,\n "resolve":null,\n "role": {\n "proposer":false,\n "authorizer":false,\n "payer":false,\n "param":false\n }\n}'),Uc='{\n "kind":"'.concat(_e,'",\n "tempId":null,\n "value":null,\n "asArgument":null,\n "xform":null,\n "resolve": null,\n "resolveArgument": null\n}'),tu='{\n "tag":"'.concat(fr,'",\n "assigns":{},\n "status":"').concat("OK",'",\n "reason":null,\n "accounts":{},\n "params":{},\n "arguments":{},\n "message": {\n "cadence":null,\n "refBlock":null,\n "computeLimit":null,\n "proposer":null,\n "payer":null,\n "authorizations":[],\n "params":[],\n "arguments":[]\n },\n "proposer":null,\n "authorizations":[],\n "payer":[],\n "events": {\n "eventType":null,\n "start":null,\n "end":null,\n "blockIds":[]\n },\n "transaction": {\n "id":null\n },\n "block": {\n "id":null,\n "height":null,\n "isSealed":null\n },\n "account": {\n "addr":null\n },\n "collection": {\n "id":null\n }\n}'),nu=new Set(Object.keys(JSON.parse(tu))),pr=function(){return JSON.parse(tu)},ru="abcdefghijklmnopqrstuvwxyz0123456789".split(""),Fc=function(){return ru[~~(Math.random()*ru.length)]},Oe=function(){return Array.from({length:10},Fc).join("")},eu=function(t){return"number"==typeof t},au=function(t){return Array.isArray(t)},ou=function(t){return null!==t&&"object"===z(t)},Pe=function(t){return null==t},wn=function(t){return"function"==typeof t},uu=function(t){if(!ou(t)||Pe(t)||eu(t))return!1;var n,r=bt(nu);try{for(r.s();!(n=r.n()).done;)if(!t.hasOwnProperty(n.value))return!1}catch(a){r.e(a)}finally{r.f()}return!0},ht=function(t){return t.status="OK",t},Ne=function(t,n){return t.status="BAD",t.reason=n,t},Ft=function(t){return function(n){return n.tag=t,ht(n)}},su=function(t){return null==t.keyId?t:(C(!isNaN(parseInt(t.keyId)),"account.keyId must be an integer"),O(O({},t),{},{keyId:parseInt(t.keyId)}))},dr=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){C("function"==typeof t||"object"===z(t),"prepAccount must be passed an authorization function or an account object"),C(null!=n.role,"Account must have a role");var e=JSON.parse(Lc),a=n.role,o=Oe();t.authorization&&wn(t.authorization)&&(t={resolve:t.authorization}),!t.authorization&&wn(t)&&(t={resolve:t});var u=t.resolve;return u&&(t.resolve=function(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),d=1;d1&&void 0!==c[1]?c[1]:[],l.prev=1,l.t0=Hc,l.next=5,r;case 5:if(l.t1=l.sent,r=(0,l.t0)(l.t1),!Ue(r)){l.next=9;break}throw new Error("Interaction Error: ".concat(r.reason));case 9:if(e.length){l.next=11;break}return l.abrupt("return",r);case 11:return a=Fn(e),o=a[0],u=a.slice(1),l.next=14,o;case 14:if(!wn(i=l.sent)){l.next=17;break}return l.abrupt("return",gr(i(r),u));case 17:if(!Pe(i)&&i){l.next=19;break}return l.abrupt("return",gr(r,u));case 19:if(!uu(i)){l.next=21;break}return l.abrupt("return",gr(i,u));case 21:throw new Error("Invalid Interaction Composition");case 24:throw l.prev=24,l.t2=l.catch(1),l.t2;case 27:case"end":return l.stop()}},n,null,[[1,24]])}));return function(n){return t.apply(this,arguments)}}(),st=function t(){for(var n=arguments.length,r=new Array(n),e=0;e1&&void 0!==arguments[1]?arguments[1]:Wc;return function(r){return r.assigns[t]=n(r.assigns[t],r),ht(r)}},Fe=Object.freeze({__proto__:null,UNKNOWN:fr,SCRIPT:me,TRANSACTION:ve,GET_TRANSACTION_STATUS:ye,GET_ACCOUNT:be,GET_EVENTS:we,PING:xe,GET_TRANSACTION:ke,GET_BLOCK:Ee,GET_BLOCK_HEADER:Ie,GET_COLLECTION:Se,BAD:"BAD",OK:"OK",ACCOUNT:Re,PARAM:"PARAM",ARGUMENT:_e,AUTHORIZER:Te,PAYER:Ce,PROPOSER:Qo,interaction:pr,uuid:Oe,isNumber:eu,isArray:au,isObj:ou,isNull:Pe,isFn:wn,isInteraction:uu,Ok:ht,Bad:Ne,prepAccount:dr,makeArgument:iu,makeUnknown:jc,makeScript:cu,makeTransaction:fu,makeGetTransactionStatus:lu,makeGetTransaction:pu,makeGetAccount:du,makeGetEvents:hr,makePing:hu,makeGetBlock:gu,makeGetBlockHeader:mu,makeGetCollection:vu,isUnknown:Dc,isScript:Be,isTransaction:en,isGetTransactionStatus:Gc,isGetTransaction:Mc,isGetAccount:Le,isGetEvents:zc,isPing:Yc,isGetBlock:yu,isGetBlockHeader:qc,isGetCollection:Kc,isOk:bu,isBad:Ue,why:wu,isAccount:function(t){return t.kind===Re},isParam:function(t){return"PARAM"===t.kind},isArgument:function(t){return t.kind===_e},pipe:st,get:mr,put:vr,update:xu,destroy:function(t){return function(n){return delete n.assigns[t],ht(n)}}});function yr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return st(pr(),t)}var je=function(){return JSON.parse('{\n "tag":null,\n "transaction":null,\n "transactionStatus":null,\n "transactionId":null,\n "encodedData":null,\n "events":null,\n "account":null,\n "block":null,\n "blockHeader":null,\n "latestBlock":null,\n "collection":null\n}')};function Mn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return st([gu,function(n){return n.block.isSealed=t,ht(n)}])}function xn(t){return st([du,function(n){return n.account.addr=Z(t),ht(n)}])}var Vc=function(){wt.deprecate({pkg:"@onflow/decode",subject:"Operating upon data of the latestBlock field of the response object",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field"})},ot=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r);case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Jc=function(){var t=x(h.mark(function n(){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null);case 1:case"end":return r.stop()}},n)}));return function(){return t.apply(this,arguments)}}(),Xc=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.staticType);case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Zc=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{domain:r.domain,identifier:r.identifier});case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),$c=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{path:r.path,address:r.address,borrowType:r.borrowType});case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Qc=function(){var t=x(h.mark(function n(r,e,a){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!r){o.next=6;break}return o.next=3,kn(r,e,a);case 3:o.t0=o.sent,o.next=7;break;case 6:o.t0=null;case 7:return o.abrupt("return",o.t0);case 8:case"end":return o.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),tf=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{address:r.address,type:r.type});case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),nf=function(){var t=x(h.mark(function n(r,e,a){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Promise.all(r.map(function(u){return new Promise((i=x(h.mark(function c(l){return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.t0=l,d.next=3,kn(u,e,[].concat(K(a),[u.type]));case 3:return d.t1=d.sent,d.abrupt("return",(0,d.t0)(d.t1));case 5:case"end":return d.stop()}},c)})),function(c){return i.apply(this,arguments)}));var i}));case 2:return o.abrupt("return",o.sent);case 3:case"end":return o.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),rf=function(){var t=x(h.mark(function n(r,e,a){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.reduce(function(){var u=x(h.mark(function i(c,l){return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,c;case 2:return c=d.sent,d.next=5,kn(l.key,e,[].concat(K(a),[l.key]));case 5:return d.t0=d.sent,d.next=8,kn(l.value,e,[].concat(K(a),[l.key]));case 8:return c[d.t0]=d.sent,d.abrupt("return",c);case 10:case"end":return d.stop()}},i)}));return function(i,c){return u.apply(this,arguments)}}(),Promise.resolve({}));case 2:return o.abrupt("return",o.sent);case 3:case"end":return o.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),br=function(){var t=x(h.mark(function n(r,e,a){var o,u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.fields.reduce(function(){var c=x(h.mark(function l(d,g){return h.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,d;case 2:return d=v.sent,v.next=5,kn(g.value,e,[].concat(K(a),[g.name]));case 5:return d[g.name]=v.sent,v.abrupt("return",d);case 7:case"end":return v.stop()}},l)}));return function(l,d){return c.apply(this,arguments)}}(),Promise.resolve({}));case 2:if(o=i.sent,!(u=r.id&&Eu(e,r.id))){i.next=10;break}return i.next=7,u(o);case 7:i.t0=i.sent,i.next=11;break;case 10:i.t0=o;case 11:return i.abrupt("return",i.t0);case 12:case"end":return i.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),ku={UInt:ot,Int:ot,UInt8:ot,Int8:ot,UInt16:ot,Int16:ot,UInt32:ot,Int32:ot,UInt64:ot,Int64:ot,UInt128:ot,Int128:ot,UInt256:ot,Int256:ot,Word8:ot,Word16:ot,Word32:ot,Word64:ot,UFix64:ot,Fix64:ot,String:ot,Character:ot,Bool:ot,Address:ot,Void:Jc,Optional:Qc,Reference:tf,Array:nf,Dictionary:rf,Event:br,Resource:br,Struct:br,Enum:br,Type:Xc,Path:Zc,Capability:$c},Eu=function(t,n){var r=Object.keys(t).find(function(e){return/^\/.*\/$/.test(e)?new RegExp(e.substring(1,e.length-1)).test(n):e===n});return n&&r&&t[r]},kn=function(){var t=x(h.mark(function n(r,e,a){var o;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(o=Eu(e,r.type)){u.next=3;break}throw new Error("Undefined Decoder Error: ".concat(r.type,"@").concat(a.join(".")));case 3:return u.next=5,o(r.value,e,a);case 5:return u.abrupt("return",u.sent);case 6:case"end":return u.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),De=function(){var t=x(h.mark(function n(r){var e,a,o,u,i=arguments;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return e=i.length>1&&void 0!==i[1]?i[1]:{},a=i.length>2&&void 0!==i[2]?i[2]:[],o=Object.keys(ku).filter(function(l){return!Object.keys(e).find(function(d){return new RegExp(d).test(l)})}).reduce(function(l,d){return l[d]=ku[d],l},e),u=O(O({},o),e),c.abrupt("return",kn(r,u,a));case 5:case"end":return c.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Jt=function(){var t=x(h.mark(function n(r){var e,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(e=a.length>1&&void 0!==a[1]?a[1]:{},!r.encodedData){o.next=5;break}return o.abrupt("return",De(r.encodedData,e));case 5:if(!r.transactionStatus){o.next=16;break}return o.t0=O,o.t1=O({},r.transactionStatus),o.t2={},o.next=11,Promise.all(r.transactionStatus.events.map(function(){var u=x(h.mark(function i(c){return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.t0=c.type,l.t1=c.transactionId,l.t2=c.transactionIndex,l.t3=c.eventIndex,l.next=6,De(c.payload,e);case 6:return l.t4=l.sent,l.abrupt("return",{type:l.t0,transactionId:l.t1,transactionIndex:l.t2,eventIndex:l.t3,data:l.t4});case 8:case"end":return l.stop()}},i)}));return function(i){return u.apply(this,arguments)}}()));case 11:return o.t3=o.sent,o.t4={events:o.t3},o.abrupt("return",(0,o.t0)(o.t1,o.t2,o.t4));case 16:if(!r.transaction){o.next=20;break}return o.abrupt("return",r.transaction);case 20:if(!r.events){o.next=26;break}return o.next=23,Promise.all(r.events.map(function(){var u=x(h.mark(function i(c){return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.t0=c.blockId,l.t1=c.blockHeight,l.t2=c.blockTimestamp,l.t3=c.type,l.t4=c.transactionId,l.t5=c.transactionIndex,l.t6=c.eventIndex,l.next=9,De(c.payload,e);case 9:return l.t7=l.sent,l.abrupt("return",{blockId:l.t0,blockHeight:l.t1,blockTimestamp:l.t2,type:l.t3,transactionId:l.t4,transactionIndex:l.t5,eventIndex:l.t6,data:l.t7});case 11:case"end":return l.stop()}},i)}));return function(i){return u.apply(this,arguments)}}()));case 23:return o.abrupt("return",o.sent);case 26:if(!r.account){o.next=30;break}return o.abrupt("return",r.account);case 30:if(!r.block){o.next=34;break}return o.abrupt("return",r.block);case 34:if(!r.blockHeader){o.next=38;break}return o.abrupt("return",r.blockHeader);case 38:if(!r.latestBlock){o.next=43;break}return Vc(),o.abrupt("return",r.latestBlock);case 43:if(!r.transactionId){o.next=47;break}return o.abrupt("return",r.transactionId);case 47:if(!r.collection){o.next=49;break}return o.abrupt("return",r.collection);case 49:return o.abrupt("return",null);case 50:case"end":return o.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Iu=function(t){return"function"==typeof t},Su=function(t){return"string"==typeof t};function Au(){return(Au=x(h.mark(function t(n){var r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!en(n)&&!Be(n)){e.next=11;break}if(r=mr(n,"ix.cadence"),C(Iu(r)||Su(r),"Cadence needs to be a function or a string."),!Iu(r)){e.next=7;break}return e.next=6,r({});case 6:r=e.sent;case 7:return C(Su(r),"Cadence needs to be a string at this point."),e.next=10,j().where(/^0x/).then(function(a){return Object.entries(a).reduce(function(o,u){var i=Lt(u,2),l=i[1],d=new RegExp("(\\b"+i[0]+"\\b)","g");return o.replace(d,l)},r)});case 10:n.message.cadence=e.sent;case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}},t)}))).apply(this,arguments)}var Ge=function(t){return"function"==typeof t};function ef(t){return C(null!=z(t.xform),"No type specified for argument: ".concat(t.value)),Ge(t.xform)?t.xform(t.value):Ge(t.xform.asArgument)?t.xform.asArgument(t.value):void C(!1,"Invalid Argument",t)}function Ru(t){return Me.apply(this,arguments)}function Me(){return Me=x(h.mark(function t(n){var r,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(C((r=a.length>1&&void 0!==a[1]?a[1]:3)>0,"Argument Resolve Recursion Limit Exceeded for Arg: ".concat(n.tempId)),!Ge(n.resolveArgument)){o.next=9;break}return o.next=5,n.resolveArgument();case 5:return o.abrupt("return",Ru(o.sent,r-1));case 9:return o.abrupt("return",n);case 10:case"end":return o.stop()}},t)})),Me.apply(this,arguments)}function ze(){return ze=x(h.mark(function t(n){var r,e,a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!en(n)&&!Be(n)){c.next=11;break}r=0,e=Object.entries(n.arguments);case 2:if(!(re.signerIndex?1:r.signerIndexe.keyId?1:r.keyId3&&void 0!==d[3]?d[3]:3,"Account Resolve Recursion Limit Exceeded",{ix:n,accounts:r}),o=[],u=bt(r),g.prev=4,c=h.mark(function v(){var m,b,E,S;return h.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(b=(m=i.value).resolve,m.resolve=null,l=e||m,!vf(b)){N.next=8;break}return N.next=7,b(m,yf(m,n));case 7:m=N.sent;case 8:if(!Array.isArray(m)){N.next=13;break}return N.next=11,qe(n,m,l,a-1);case 11:N.next=30;break;case 13:if(m.addr&&(m.addr=Z(m.addr)),null!=m.addr&&null!=m.keyId&&(m.tempId=Vu(m)),n.accounts[m.tempId]=n.accounts[m.tempId]||m,n.accounts[m.tempId].role.proposer=n.accounts[m.tempId].role.proposer||m.role.proposer,n.accounts[m.tempId].role.payer=n.accounts[m.tempId].role.payer||m.role.payer,n.accounts[m.tempId].role.authorizer=n.accounts[m.tempId].role.authorizer||m.role.authorizer,n.accounts[m.tempId].role.proposer&&n.proposer===l.tempId&&(n.proposer=m.tempId),!n.accounts[m.tempId].role.payer){N.next=29;break}if(n.payer=Array.isArray(n.payer)?Array.from(new Set([].concat(K(n.payer),[m.tempId]).map(function(T){return T===l.tempId?m.tempId:T}))):Array.from(new Set([n.payer,m.tempId].map(function(T){return T===l.tempId?m.tempId:T}))),!(n.payer.length>1)){N.next=29;break}if(E=[],S=[],n.payer=n.payer.reduce(function(T,R){var L=n.accounts[R].addr,I=Vu(n.accounts[R]);return S.push(L),E.includes(I)?T:(E.push(I),[].concat(K(T),[R]))},[]),!(Array.from(new Set(S)).length>1)){N.next=29;break}throw new Error("Payer can not be different accounts");case 29:n.accounts[m.tempId].role.authorizer&&(e?o=Array.from(new Set([].concat(K(o),[m.tempId]))):n.authorizations=n.authorizations.map(function(T){return T===l.tempId?m.tempId:T}));case 30:l.tempId!=m.tempId&&delete n.accounts[l.tempId];case 31:case"end":return N.stop()}},v)}),u.s();case 7:if((i=u.n()).done){g.next=11;break}return g.delegateYield(c(),"t0",9);case 9:g.next=7;break;case 11:g.next=16;break;case 13:g.prev=13,g.t1=g.catch(4),u.e(g.t1);case 16:return g.prev=16,u.f(),g.finish(16);case 19:e&&(n.authorizations=n.authorizations.map(function(v){return v===e.tempId?o:v}).reduce(function(v,m){return Array.isArray(m)?[].concat(K(v),K(m)):[].concat(K(v),[m])},[]));case 20:case"end":return g.stop()}},t,null,[[4,13,16,19]])})),Ke.apply(this,arguments)}function Ju(){return(Ju=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!en(n)){r.next=13;break}return Array.isArray(n.payer)||wt.deprecate({pkg:"FCL",subject:'"ix.payer" must be an array. Support for ix.payer as a singular',message:"See changelog for more info."}),r.prev=2,r.next=5,qe(n,Object.values(n.accounts));case 5:return r.next=7,qe(n,Object.values(n.accounts));case 7:r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),console.error("=== SAD PANDA ===\n\n",r.t0,"\n\n=== SAD PANDA ==="),r.t0;case 13:return r.abrupt("return",n);case 14:case"end":return r.stop()}},t,null,[[2,9]])}))).apply(this,arguments)}function Xu(){return(Xu=x(h.mark(function t(n){var r,e,a,o;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!en(n)){u.next=16;break}return u.prev=1,r=Hu(n),e=Cu($u(n)),u.next=6,Promise.all(r.map(Zu(n,e)));case 6:return a=Wu(n),o=Ou(O(O({},$u(n)),{},{payloadSigs:r.map(function(i){return{address:n.accounts[i].addr,keyId:n.accounts[i].keyId,sig:n.accounts[i].signature}})})),u.next=10,Promise.all(a.map(Zu(n,o)));case 10:u.next=16;break;case 12:throw u.prev=12,u.t0=u.catch(1),console.error("Signatures",u.t0,{ix:n}),u.t0;case 16:return u.abrupt("return",n);case 17:case"end":return u.stop()}},t,null,[[1,12]])}))).apply(this,arguments)}function Zu(t,n){return r=x(h.mark(function e(a){var o;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(null==(o=t.accounts[a]).signature){c.next=3;break}return c.abrupt("return");case 3:return c.next=5,o.signingFunction(bf(o,n,t));case 5:t.accounts[a].signature=c.sent.signature;case 8:case"end":return c.stop()}},e)})),function(e){return r.apply(this,arguments)};var r}function bf(t,n,r){try{return{f_type:"Signable",f_vsn:"1.0.1",message:n,addr:Z(t.addr),keyId:t.keyId,roles:t.role,cadence:r.message.cadence,args:r.message.arguments.map(function(e){return r.arguments[e].asArgument}),data:{},interaction:r,voucher:Yn(r)}}catch(e){throw console.error("buildSignable",e),e}}function $u(t){var n=Z((Array.isArray(t.payer)?t.accounts[t.payer[0]]:t.accounts[t.payer]).addr);return{cadence:t.message.cadence,refBlock:t.message.refBlock||null,computeLimit:t.message.computeLimit,arguments:t.message.arguments.map(function(r){return t.arguments[r].asArgument}),proposalKey:{address:Z(t.accounts[t.proposer].addr),keyId:t.accounts[t.proposer].keyId,sequenceNum:t.accounts[t.proposer].sequenceNum},payer:n,authorizers:t.authorizations.map(function(r){return Z(t.accounts[r].addr)}).reduce(function(r,e){return r.find(function(a){return a===e})?r:[].concat(K(r),[e])},[])}}function Qu(){return(Qu=x(h.mark(function t(n){var r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=mr(n,"ix.validators",[]),e.abrupt("return",st(n,r.map(function(a){return function(o){return a(o,{Ok:ht,Bad:Ne})}})));case 2:case"end":return e.stop()}},t)}))).apply(this,arguments)}function ts(){return(ts=x(h.mark(function t(n){var r,e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:for(r=0,e=Object.keys(n.accounts);r1&&void 0!==arguments[1]?arguments[1]:wf;return r=x(h.mark(function e(a){var o,u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return o=function(c){return["\nAccounts:",{proposer:c.proposer,authorizations:c.authorizations,payer:c.payer},"\n\nDetails:",c.accounts].filter(Boolean)},u=function(){for(var c,l=arguments.length,d=new Array(l),g=0;g1){var e=n[0],a=n[1];return G(function(u,i){var l=i.Bad;return e?(0,i.Ok)(u):l(u,a)})}var o=n[0];return function(u){return o(u,{Ok:ht,Bad:Ne})}}var Ot=function(){var t=x(h.mark(function n(){var r,e,a,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>0&&void 0!==u[0]?u[0]:[],e=u.length>1&&void 0!==u[1]?u[1]:{},i.next=4,j.first(["sdk.transport","sdk.send"],e.send||de);case 4:return G(a=i.sent,"Required value for sdk.transport is not defined in config. See: ".concat("https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21")),i.next=8,j.first(["sdk.resolve"],e.resolve||He);case 8:if(o=i.sent,i.t0=e.node,i.t0){i.next=14;break}return i.next=13,j().get("accessNode.api");case 13:i.t0=i.sent;case 14:return e.node=i.t0,Array.isArray(r)&&(r=st(pr(),r)),i.t1=a,i.next=19,o(r);case 19:return i.t2=i.sent,i.t3={config:j,response:je,ix:Fe,Buffer:X.Buffer},i.t4=e,i.abrupt("return",(0,i.t1)(i.t2,i.t3,i.t4));case 23:case"end":return i.stop()}},n)}));return function(){return t.apply(this,arguments)}}();function Sn(t){return We.apply(this,arguments)}function We(){return We=x(h.mark(function t(n){var e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,j().where(/^decoder\./);case 2:return e=Object.entries(a.sent).map(function(o){var u=Lt(o,2),i=u[0],c=u[1];return[i="/".concat(i.replace(/^decoder\./,""),"$/"),c]}),a.abrupt("return",Jt(n,Object.fromEntries(e)));case 5:case"end":return a.stop()}},t)})),We.apply(this,arguments)}var xf=function(t){zr(r,t);var n=Yr(r);function r(e){var a;Dr(this,r);var o="\n Encode Message From Signable Error: Unable to determine message encoding for signer addresss: ".concat(e,". \n Please ensure the address: ").concat(e," is intended to sign the given transaction as specified by the transaction signable.\n ").trim();return(a=n.call(this,o)).name="Unable To Determine Message Encoding For Signer Addresss",a}return Gr(r)}(ir(Error));function Ve(t){return xu("ix.validators",function(n){return Array.isArray(n)?n.push(t):[t]})}function xr(t){return st([function(n){return n.block.height=t,n},Ve(function(n){if("boolean"==typeof n.block.isSealed)throw new Error("Unable to specify both block height and isSealed.");if(n.block.id)throw new Error("Unable to specify both block height and block id.");return n})])}function Je(t){return st([function(n){return n.block.id=t,ht(n)},Ve(function(n,r){var e=r.Ok,a=r.Bad;return Le(n)?a(n,"Unable to specify a block id with a Get Account interaction."):"boolean"==typeof n.block.isSealed?a(n,"Unable to specify both block id and isSealed."):n.block.height?a(n,"Unable to specify both block id and block height."):e(n)})])}function qn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.sealed,r=void 0!==n&&n,e=t.id,a=t.height,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(!(r&&e||r&&a),'Method: block -- Cannot pass "sealed" with "id" or "height"'),C(!(e&&a),'Method: block -- Cannot pass "id" and "height" simultaneously'),e?Ot([Mn(),Je(e)],o).then(Jt):a?Ot([Mn(),xr(a)],o).then(Jt):Ot([Mn(r)],o).then(Jt)}function os(){return st((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(n){return dr(n,{role:Te})}))}function us(t,n,r){return st([hr,function(e){return e.events.eventType=t,e.events.start=n,e.events.end=r,ht(e)}])}function ss(t){return st([lu,function(n){return n.transaction.id=t,ht(n)}])}function Xe(t){return function(n){return n.message.computeLimit=t,n}}function Ze(){return st((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(iu))}function $e(t,n){return{value:t,xform:n}}function is(t){return Qe.apply(this,arguments)}function Qe(){return Qe=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",dr(n,{role:Qo}));case 1:case"end":return r.stop()}},t)})),Qe.apply(this,arguments)}function cs(t){return ta.apply(this,arguments)}function ta(){return ta=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",dr(n,{role:Ce}));case 1:case"end":return r.stop()}},t)})),ta.apply(this,arguments)}function fs(t){return st([function(n){return n.message.refBlock=t,ht(n)}])}function ls(){return st([cu,vr("ix.cadence",cr.apply(void 0,arguments))])}var kf=[];function ps(){return st([fu,vr("ix.cadence",cr.apply(void 0,arguments)),function(t){return t.message.refBlock=t.message.refBlock||null,t.authorizations=t.authorizations||kf,ht(t)}])}function Ef(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return C(t.account,"mockAccountResponse(ix) -- ix.account is missing",t),C(t.account.addr,"mockAccountResponse(ix) -- ix.account.addr is missing",t),{account:{addr:t.account.addr,keys:Array.from({length:n},function(e,a){return{index:a,sequenceNumber:42}})}}}var If=function(t){return t},Sf=["tempId"];function ds(t){return["SIGNATURE",t.addr,t.keyId].join(".")}function Kn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var r=O(O(O({},n),t),{},{signingFunction:t.signingFunction||n.signingFunction||function(e){return{addr:r.addr,keyId:r.keyId,signature:ds(r)}}});return r}}var hs,na={proposer:!1,authorizer:!1,payer:!1},Af=Object.freeze({__proto__:null,mockSend:function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:If;return n=x(h.mark(function r(e){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e;case 2:e=a.sent,a.t0=!0,a.next=a.t0===Le(e)?6:a.t0===yu(e)?7:8;break;case 6:return a.abrupt("return",Ef(e));case 7:return a.abrupt("return",{tag:"GET_BLOCK",block:{id:"32"}});case 8:return a.abrupt("return",t(e));case 9:case"end":return a.stop()}},r)})),function(r){return n.apply(this,arguments)}},authzFn:Kn,authzResolve:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var r=t.tempId,e=Bc(t,Sf);return O(O({},n),{},{tempId:r||"WITH_RESOLVE",resolve:Kn(e)})}},authzResolveMany:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var r=t.tempId||"AUTHZ_RESOLVE_MANY";return O(O({},n),{},{tempId:r,resolve:function(){return[t.proposer&&Kn(t.proposer)({role:O(O({},na),{},{proposer:!0})})].concat(K(t.authorizations.map(Kn).map(function(e){return e({role:O(O({},na),{},{authorizer:!0})})})),[t.payer&&Kn(t.payer)({role:O(O({},na),{},{payer:!0})})]).filter(Boolean)}})}},sig:ds,idof:function(t){return"".concat(at(t.addr),"-").concat(t.keyId)},run:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return yr([fs("123")].concat(K(t))).then(He)}}),kr=function(t){return function(n){return z(n)===t}},Xt=function(t){return null!=t},Rf=kr("object"),An=kr("string"),gs=kr("function"),_f=kr("number"),Tf="function"==typeof queueMicrotask?queueMicrotask:function(t){return(hs||(hs=Promise.resolve())).then(t).catch(function(n){return setTimeout(function(){throw n},0)})},Cf=function(){var t,n=[];return{deliver:function(r){return x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:n.push(r),t&&(t(n.shift()),t=void 0);case 2:case"end":return a.stop()}},e)}))()},receive:function(){return new Promise(function(r){var e=n.shift();if(e)return r(e);t=r})}}},ms="SUBSCRIBE",ra="UNSUBSCRIBE",Of="UPDATED",Q="object"===(typeof self>"u"?"undefined":z(self))&&self.self===self&&self||"object"===(typeof global>"u"?"undefined":z(global))&&global.global===global&&global||"object"===(typeof window>"u"?"undefined":z(window))&&window.window===window&&window;Q.FCL_REGISTRY=Q.FCL_REGISTRY??{};var Ht,Nf=0,Pt=function(t,n,r){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(function(a,o){var u=e.expectReply||!1,i=null!=e.timeout?e.timeout:5e3;u&&i&&setTimeout(function(){return o(new Error("Timeout: ".concat(i,"ms passed without a response.")))},i);var c={to:t,from:e.from,tag:n,data:r,timeout:i,reply:a,reject:o};try{Q.FCL_REGISTRY[t]&&Q.FCL_REGISTRY[t].mailbox.deliver(c),u||a(!0)}catch(l){console.error("FCL.Actor -- Could Not Deliver Message",c,Q.FCL_REGISTRY[t],l)}})},Bf=function(t){delete Q.FCL_REGISTRY[t]},Lf=function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n=x(h.mark(function r(e){var a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if("function"!=typeof t.INIT){o.next=3;break}return o.next=3,t.INIT(e);case 3:return o.next=6,e.receive();case 6:if(a=o.sent,o.prev=7,"EXIT"!==a.tag){o.next=13;break}if("function"!=typeof t.TERMINATE){o.next=12;break}return o.next=12,t.TERMINATE(e,a,a.data||{});case 12:return o.abrupt("break",25);case 13:return o.next=15,t[a.tag](e,a,a.data||{});case 15:o.next=20;break;case 17:o.prev=17,o.t0=o.catch(7),console.error("".concat(e.self()," Error"),a,o.t0);case 20:return o.prev=20,o.abrupt("continue",3);case 23:o.next=3;break;case 25:case"end":return o.stop()}},r,null,[[7,17,20,23]])})),function(r){return n.apply(this,arguments)}},ea=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==n&&(n=++Nf),null!=Q.FCL_REGISTRY[n])return n;Q.FCL_REGISTRY[n]={addr:n,mailbox:Cf(),subs:new Set,kvs:{},error:null};var r={self:function(){return n},receive:function(){return Q.FCL_REGISTRY[n].mailbox.receive()},send:function(e,a,o){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.from=n,Pt(e,a,o,u)},sendSelf:function(e,a,o){Q.FCL_REGISTRY[n]&&Pt(n,e,a,o)},broadcast:function(e,a){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o.from=n;var u,i=bt(Q.FCL_REGISTRY[n].subs);try{for(i.s();!(u=i.n()).done;)Pt(u.value,e,a,o)}catch(l){i.e(l)}finally{i.f()}},subscribe:function(e){return null!=e&&Q.FCL_REGISTRY[n].subs.add(e)},unsubscribe:function(e){return null!=e&&Q.FCL_REGISTRY[n].subs.delete(e)},subscriberCount:function(){return Q.FCL_REGISTRY[n].subs.size},hasSubs:function(){return!!Q.FCL_REGISTRY[n].subs.size},put:function(e,a){null!=e&&(Q.FCL_REGISTRY[n].kvs[e]=a)},get:function(e,a){return Q.FCL_REGISTRY[n].kvs[e]??a},delete:function(e){delete Q.FCL_REGISTRY[n].kvs[e]},update:function(e,a){null!=e&&(Q.FCL_REGISTRY[n].kvs[e]=a(Q.FCL_REGISTRY[n].kvs[e]))},keys:function(){return Object.keys(Q.FCL_REGISTRY[n].kvs)},all:function(){return Q.FCL_REGISTRY[n].kvs},where:function(e){return Object.keys(Q.FCL_REGISTRY[n].kvs).reduce(function(a,o){return e.test(o)?O(O({},a),{},q({},o,Q.FCL_REGISTRY[n].kvs[o])):a},{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach(function(a){return Q.FCL_REGISTRY[n].kvs[a]=e[a]})},fatalError:function(e){Q.FCL_REGISTRY[n].error=e;var a,o=bt(Q.FCL_REGISTRY[n].subs);try{for(o.s();!(a=o.n()).done;)Pt(a.value,Of)}catch(i){o.e(i)}finally{o.f()}}};return"object"===z(t)&&(t=Lf(t)),Tf(x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t(r);case 2:Bf(n);case 3:case"end":return a.stop()}},e)}))),n},Wt="config",vs="PUT_CONFIG",ys="GET_CONFIG",bs="GET_ALL_CONFIG",ws="UPDATE_CONFIG",xs="DELETE_CONFIG",ks="CLEAR_CONFIG",Es="WHERE_CONFIG",Hn="CONFIG/UPDATED",Is=function(t){return t},Ss=(q(Ht={},vs,function(t,n,r){var e=r.key,a=r.value;if(null==e)throw new Error("Missing 'key' for config/put.");t.put(e,a),t.broadcast(Hn,O({},t.all()))}),q(Ht,ys,function(t,n,r){var e=r.key,a=r.fallback;if(null==e)throw new Error("Missing 'key' for config/get");n.reply(t.get(e,a))}),q(Ht,bs,function(t,n){n.reply(O({},t.all()))}),q(Ht,ws,function(t,n,r){var e=r.key,a=r.fn;if(null==e)throw new Error("Missing 'key' for config/update");t.update(e,a||Is),t.broadcast(Hn,O({},t.all()))}),q(Ht,xs,function(t,n,r){var e=r.key;if(null==e)throw new Error("Missing 'key' for config/delete");t.delete(e),t.broadcast(Hn,O({},t.all()))}),q(Ht,ks,function(t,n){for(var r=0,e=Object.keys(t.all());r1?i[1]:void 0,(n=i.length>0&&void 0!==i[0]?i[0]:[]).length){c.next=4;break}return c.abrupt("return",r);case 4:return e=Fn(n),a=e[0],o=e.slice(1),c.next=7,oa(a);case 7:if(null!=(u=c.sent)){c.next=10;break}return c.abrupt("return",ua(o,r));case 10:return c.abrupt("return",u);case 11:case"end":return c.stop()}},t)})),sa.apply(this,arguments)}function Er(){return Pt(Wt,bs,null,{expectReply:!0,timeout:10})}function As(t){return Pt(Wt,ws,{key:t,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:Is}),Et()}function Rs(t){return Pt(Wt,xs,{key:t}),Et()}function _s(t){return Pt(Wt,Es,{pattern:t},{expectReply:!0,timeout:10})}function Ts(t){return function(n,r,e){ea(Ss,Wt);var u,a="@EXIT",o=ea((u=x(h.mark(function i(c){var l,d;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:c.send(n,ms);case 1:return g.next=4,c.receive();case 4:if(d=Q.FCL_REGISTRY[n].error,(l=g.sent).tag!==a){g.next=9;break}return c.send(n,ra),g.abrupt("return");case 9:if(!d){g.next=13;break}return e(null,d),c.send(n,ra),g.abrupt("return");case 13:e(l.data,null),g.next=1;break;case 16:case"end":return g.stop()}},i)})),function(i){return u.apply(this,arguments)}));return function(){return Pt(o,a)}}(Wt,0,t)}function Cs(t){return Pt(Wt,ks).then(Et(t))}function Et(t){return null!=t&&"object"===z(t)&&Object.keys(t).map(function(n){return aa(n,t[n])}),{put:aa,get:oa,all:Er,first:ua,update:As,delete:Rs,where:_s,subscribe:Ts,overload:Os}}ea(Ss,Wt),Et.put=aa,Et.get=oa,Et.all=Er,Et.first=ua,Et.update=As,Et.delete=Rs,Et.where=_s,Et.subscribe=Ts,Et.overload=Os;var Uf=function(t){return t};function Os(){var r,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uf;return new Promise((r=x(h.mark(function e(a,o){var u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Er();case 2:return u=c.sent,c.prev=3,Et(t),c.t0=n,c.next=8,Er();case 8:return c.t1=c.sent,c.next=11,(0,c.t0)(c.t1);case 11:return i=c.sent,c.next=14,Cs(u);case 14:a(i),c.next=22;break;case 17:return c.prev=17,c.t2=c.catch(3),c.next=21,Cs(u);case 21:o(c.t2);case 22:case"end":return c.stop()}},e,null,[[3,17]])})),function(e,a){return r.apply(this,arguments)}))}var Rn=Object.freeze({debug:5,info:4,log:3,warn:2,error:1}),Ff=function(t){var r=t.message;return["\n %c".concat(t.title,"\n ============================\n\n ").concat(r,"\n\n ============================\n ").replace(/\n[^\S\r\n]+/g,"\n").trim(),,"font-weight:bold;font-family:monospace;"]},Ir=function(){var t=x(h.mark(function n(r){var e,a,o,u,i,c,l,d,g,v,m,b;return h.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return c=r.title,l=r.message,d=r.level,v=void 0!==(g=r.always)&&g,E.next=3,Et.get("logger.level",Rn.warn);case 3:if(m=E.sent,v||!(m8)&&H("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(n[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),n[1]=n[1].padEnd(8,"0"),{type:"UFix64",value:t=n.join(".")}}if(ct(t))return Ns(),{type:"UFix64",value:t.toString()};H("Expected String for UFix64")},function(t){return t}),al=V("Fix64",function(t){if(et(t)){var n=t.split(".");return 2!==n.length&&H("Expected one decimal but found ".concat(n.length," in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),(0==n[1].length||n[1].length>8)&&H("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(n[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),n[1]=n[1].padEnd(8,"0"),{type:"Fix64",value:t=n.join(".")}}if(ct(t))return Ns(),{type:"Fix64",value:t.toString()};H("Expected String for Fix64")},function(t){return t}),ol=V("String",function(t){if(et(t))return{type:"String",value:t};H("Expected String for type String")},function(t){return t}),ul=V("Character",function(t){if(et(t))return{type:"Character",value:t};H("Expected Character for type Character")},function(t){return t}),sl=V("Bool",function(t){if("boolean"==typeof t)return{type:"Bool",value:t};H("Expected Boolean for type Bool")},function(t){return t}),Bs=V("Address",function(t){if(et(t))return{type:"Address",value:t};H("Expected Address for type Address")},function(t){return t}),il=V("Void",function(t){if(!t||Ps(t))return{type:"Void"};H("Expected Void for type Void")},function(t){return t}),cl=V("Reference",function(t){if(pn(t))return{type:"Reference",value:t};H("Expected Object for type Reference")},function(t){return t}),Ls=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return V("Array",function(n){return{type:"Array",value:ln(t)?t.map(function(r,e){return r.asArgument(n[e])}):n.map(function(r){return t.asArgument(r)})}},function(n){return n})},fl=V("Path",function(t){if(pn(t))return et(t.domain)||H("Expected a string for the Path domain but found ".concat(t.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),"storage"!==t.domain&&"private"!==t.domain&&"public"!==t.domain&&H('Expected either "storage", "private" or "public" as the Path domain but found '.concat(t.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),et(t.identifier)||H("Expected a string for the Path identifier but found ".concat(t.identifier,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),{type:"Path",value:{domain:t.domain,identifier:t.identifier}};H("Expected Object for type Path")},function(t){return t}),Us=Object.freeze({__proto__:null,Address:Bs,Array:Ls,Bool:sl,Character:ul,Dictionary:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return V("Dictionary",function(n){if(pn(n))return{type:"Dictionary",value:ln(t)?t.map(function(r,e){return{key:r.key.asArgument(n[e].key),value:r.value.asArgument(n[e].value)}}):ln(n)?n.map(function(r){return{key:t.key.asArgument(r.key),value:t.value.asArgument(r.value)}}):[{key:t.key.asArgument(n.key),value:t.value.asArgument(n.value)}]};H("Expected Object for type Dictionary")},function(n){return n})},Enum:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Enum",function(r){if(pn(r))return{type:"Enum",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Enum")},function(r){return r})},Event:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Event",function(r){if(pn(r))return{type:"Event",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Event")},function(r){return r})},Fix64:al,Identity:jf,Int:Gf,Int128:Xf,Int16:qf,Int256:$f,Int32:Hf,Int64:Vf,Int8:zf,Optional:function(t){return V("Optional",function(n){return{type:"Optional",value:Ps(n)?null:t.asArgument(n)}},function(n){return n})},Path:fl,Reference:cl,Resource:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Resource",function(r){if(pn(r))return{type:"Resource",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Resource")},function(r){return r})},String:ol,Struct:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Struct",function(r){if(pn(r))return{type:"Struct",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Struct")},function(r){return r})},UFix64:el,UInt:Df,UInt128:Jf,UInt16:Yf,UInt256:Zf,UInt32:Kf,UInt64:Wf,UInt8:Mf,Void:il,Word16:tl,Word32:nl,Word64:rl,Word8:Qf,_Array:Ls});function Fs(t){return gs(t)?t($e,Us):[]}function js(t){return Ds.apply(this,arguments)}function Ds(){return(Ds=x(h.mark(function t(n){var r,e;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return C(void 0!==(r=n.url),"retrieve({ url }) -- url must be defined"),o.prev=2,o.next=5,_o(r);case 5:e=o.sent,o.next=11;break;case 8:throw o.prev=8,o.t0=o.catch(2),new Error("httpDocumentResolver Error: Failed to retrieve document.");case 11:if(!e.ok){o.next=17;break}return o.next=14,e.json();case 14:o.t1=o.sent,o.next=18;break;case 17:o.t1=null;case 18:return o.abrupt("return",o.t1);case 20:case"end":return o.stop()}},t,null,[[2,8]])}))).apply(this,arguments)}var Gs=new Map([["http",js],["https",js]]);function ll(t){return Ms.apply(this,arguments)}function Ms(){return(Ms=x(h.mark(function t(n){var r,e,a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return C(void 0!==(r=n.url),"retrieve({ url }) -- url must be defined"),C("string"==typeof r,"retrieve({ url }) -- url must be a string"),c.next=5,j().where(/^document\.resolver\./);case 5:return e=c.sent,Object.keys(e).map(function(l){var d=e[l],g=l.replace(/^document\.resolver\./,"");Gs.set(g,d)}),C(a=/^(.*):\/\/([A-Za-z0-9\-\.]+)(:[0-9]+)?(.*)$/.exec(r),"Failed to parse URL"),o=a[1],C(a,"Failed to parse URL protocol"),C(u=Gs.get(o),"No resolver found for protcol=".concat(o)),c.next=15,u({url:r});case 15:return c.abrupt("return",c.sent);case 17:case"end":return c.stop()}},t)}))).apply(this,arguments)}function Wn(t){if(null==t)return null;if("1.0.0"===t.f_version)return t;throw new Error("normalizeInteractionTemplate Error: Invalid InteractionTemplate")}function zs(t){var n,r,e=t.network,a=t.template;if(G(null!=e,"deriveCadenceByNetwork({ network }) -- network must be defined"),G("string"==typeof e,"deriveCadenceByNetwork({ network }) -- network must be a string"),G(null!=a,"generateDependencyPin({ template }) -- template must be defined"),G("object"===z(a),"generateDependencyPin({ template }) -- template must be an object"),G("InteractionTemplate"===a.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),"1.0.0"===(a=Wn(a)).f_version)return Object.keys(null===(n=a)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.dependencies).map(function(o){var u,i,c,l=Object.values(null===(u=a)||void 0===u||null===(i=u.data)||void 0===i||null===(c=i.dependencies)||void 0===c?void 0:c[o]);G(l,"deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ".concat(o)),G(0===l.length,"deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ".concat(o));var d=l[0],g=null==d?void 0:d[e];return G(g,"deriveCadenceByNetwork -- Could not find ".concat(e," network information for dependency: ").concat(o)),[o,g.address]}).reduce(function(o,u){var i=Lt(u,2),l=i[1],d=new RegExp("(\\b"+i[0]+"\\b)","g");return o.replace(d,l)},a.data.cadence);throw new Error("deriveCadenceByNetwork Error: Unsupported template version")}function pl(t){return ia.apply(this,arguments)}function ia(){return ia=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,b;return h.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return e=n.template,E.next=3,j.get("flow.network");case 3:C(a=E.sent,"FCL configureDependencies Error: Missing configuration value for 'flow.network'"),o={},E.t0=e.f_version,E.next="1.0.0"===E.t0?9:12;break;case 9:for(u=Object.keys(null==e||null===(r=e.data)||void 0===r?void 0:r.dependencies),i=0,c=u;i0,"FCL configureDependencies Error: No contracts found in template for placeholder=".concat(d)),C(b=g[v[0]][a],"FCL configureDependencies Error: No dependency information for placeholder=".concat(d," contract=").concat(v[0]," network=").concat(a)),C(null==b?void 0:b.address,"FCL configureDependencies Error: No address information for placeholder=".concat(d," contract=").concat(v[0]," network=").concat(a)),o[d]=at(null==b?void 0:b.address);return E.abrupt("return",o);case 12:throw new Error("FCL configureDependencies Error: Unsupported template version");case 13:case"end":return E.stop()}},t)})),ia.apply(this,arguments)}function Ys(t){return qs.apply(this,arguments)}function qs(){return(qs=x(h.mark(function t(n){var r;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!An(null==n?void 0:n.template)){a.next=4;break}return a.next=3,ll({url:null==n?void 0:n.template});case 3:n.template=a.sent;case 4:if(r={},null==n||!n.template){a.next=10;break}return n.template=Wn(null==n?void 0:n.template),a.next=9,pl({template:n.template});case 9:r=a.sent;case 10:if(a.t0=n.cadence,a.t0){a.next=19;break}return a.t1=zs,a.t2=n.template,a.next=16,j().get("flow.network");case 16:a.t3=a.sent,a.t4={template:a.t2,network:a.t3},a.t0=(0,a.t1)(a.t4);case 19:return n.cadence=a.t0,n.dependencies=r,a.abrupt("return",n);case 23:case"end":return a.stop()}},t)}))).apply(this,arguments)}function Ks(t,n){return ca.apply(this,arguments)}function ca(){return ca=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(C(Xt(r),"".concat(n,"(opts) -- opts is required")),C(Rf(r),"".concat(n,"(opts) -- opts must be an object")),C(!(r.cadence&&r.template),"".concat(n,"({ template, cadence }) -- cannot pass both cadence and template")),C(Xt(r.cadence||(null==r?void 0:r.template)),"".concat(n,"({ cadence }) -- cadence is required")),C(An(r.cadence)||(null==r?void 0:r.template),"".concat(n,"({ cadence }) -- cadence must be a string")),e.t0=C,e.t1=r.cadence,e.t1){e.next=11;break}return e.next=10,j().get("flow.network");case 10:e.t1=e.sent;case 11:return e.t2=e.t1,e.t3="".concat(n,'(opts) -- Required value for "flow.network" not defined in config. See: ',"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration"),(0,e.t0)(e.t2,e.t3),e.t4=C,e.next=17,j().get("accessNode.api");case 17:e.t5=e.sent,e.t6="".concat(n,'(opts) -- Required value for "accessNode.api" not defined in config. See: ',"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration"),(0,e.t4)(e.t5,e.t6);case 20:case"end":return e.stop()}},t)})),ca.apply(this,arguments)}function dl(t){return Hs.apply(this,arguments)}function Hs(){return(Hs=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Ks("mutate",n));case 1:case"end":return r.stop()}},t)}))).apply(this,arguments)}function hl(t){return Ws.apply(this,arguments)}function Ws(){return(Ws=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Ks("query",n));case 1:case"end":return r.stop()}},t)}))).apply(this,arguments)}function Sr(){return fa.apply(this,arguments)}function fa(){return fa=x(h.mark(function t(){var n,r=arguments;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,hl(n);case 3:return e.next=5,Ys(n);case 5:return n=e.sent,e.abrupt("return",j().overload(n.dependencies||{},x(h.mark(function a(){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",Ot([ls(n.cadence),Ze(Fs(n.args||[])),n.limit&&"number"==typeof n.limit&&Xe(n.limit)]).then(Sn));case 1:case"end":return o.stop()}},a)}))));case 7:case"end":return e.stop()}},t)})),fa.apply(this,arguments)}function gl(t,n){return la.apply(this,arguments)}function la(){return la=x(h.mark(function t(n,r){var e,a,o,u,i;return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(null!=n&&null!=r){l.next=2;break}return l.abrupt("return",[]);case 2:return(e=new URL(n)).searchParams.append("code",r),l.next=6,fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}).then(function(d){return d.json()});case 6:if(a=l.sent,!Array.isArray(a)){l.next=9;break}return l.abrupt("return",a);case 9:if(o=[],Array.isArray(a.authorizations)){u=bt(a.authorizations);try{for(u.s();!(i=u.n()).done;)o.push(O({type:"authz",keyId:a.keyId},i.value))}catch(d){u.e(d)}finally{u.f()}}return null!=a.provider&&o.push(O({type:"authn",id:"wallet-provider#authn"},a.provider)),l.abrupt("return",o);case 13:case"end":return l.stop()}},t)})),la.apply(this,arguments)}function ml(){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[].concat(K(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),K(n))}var _n={f_type:"Service",f_vsn:"1.0.0"},Vs={f_type:"Identity",f_vsn:"1.0.0"},vl={f_type:"USER",f_vsn:"1.0.0"},yl={f_type:"PollingResponse",f_vsn:"1.0.0"},pa={f_type:"CompositeSignature",f_vsn:"1.0.0"};function Js(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({old:t},_n),{},{type:"frame",endpoint:t.endpoint,params:t.params||{},data:t.data||{}})}function Xs(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:"back-channel-rpc",endpoint:t.endpoint,method:t.method,params:t.params||{},data:t.data||{}})}function Zs(t){return null==t?null:(null==t.method&&(t=O(O({},t),{},{type:"local-view",method:"VIEW/IFRAME"})),"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type||"local-view",method:t.method,endpoint:t.endpoint,data:t.data||{},params:t.params||{}}))}var bl={"back-channel-rpc":Xs,"pre-authz":function(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type,uid:t.id,endpoint:t.endpoint,method:t.method,identity:O(O({},Vs),{},{address:at(t.addr),keyId:t.keyId}),params:t.params,data:t.data})},authz:function(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type,uid:t.id,endpoint:t.endpoint,method:t.method,identity:O(O({},Vs),{},{address:at(t.addr),keyId:t.keyId}),params:t.params,data:t.data})},authn:function(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type,uid:t.id,endpoint:t.authn,id:t.pid,provider:{address:at(t.addr),name:t.name,icon:t.icon}})},frame:Js,"open-id":function(t){return null==t?null:"1.0.0"===t.f_vsn?t:null},"user-signature":function(t){if(null==t)return null;if("1.0.0"===t.f_vsn)return t;throw new Error("Invalid user-signature service")},"local-view":Zs,"account-proof":function(t){if(null==t)return null;if("1.0.0"===t.f_vsn)return t;throw new Error("FCL Normalizer Error: Invalid account-proof service")},"authn-refresh":function(t){if(null==t)return null;if("1.0.0"===t.f_vsn)return t;throw new Error("Invalid authn-refresh service")}};function wl(t,n){try{return bl[t.type](t,n)}catch(r){return console.error("Unrecognized FCL Service Type [".concat(t.type,"]"),t,r),t}}function xl(t){return fn([t.provider.address||t.provider.name||"UNSPECIFIED",t.id]).toString("hex")}function kl(t){return t.addr=t.addr?at(t.addr):null,t.paddr=t.paddr?at(t.paddr):null,t}function El(t,n){return n.find(function(r){return r.type===t})}function $s(t){return da.apply(this,arguments)}function da(){return da=x(h.mark(function t(n){var r,e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=kl(n),a.t0=ml,a.t1=n.services||[],a.next=5,gl(n.hks,n.code);case 5:return a.t2=a.sent,r=(0,a.t0)(a.t1,a.t2).map(function(o){return wl(o,n)}),e=El("authn",r),a.abrupt("return",O(O({},vl),{},{addr:at(n.addr),cid:xl(e),loggedIn:!0,services:r,expiresAt:n.expires}));case 9:case"end":return a.stop()}},t)})),da.apply(this,arguments)}function Ar(){var n=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(function(r){return r.type===n})}function Vn(t){var n=new URL(t.endpoint);if(n.searchParams.append("l6n",window.location.origin),null!=t.params)for(var r=0,e=Object.entries(t.params||{});r1&&void 0!==arguments[1]?arguments[1]:{},r=n.method||"POST",e="GET"===r?void 0:JSON.stringify(n.data||t.data||{});return fetch(Vn(t),{method:r,headers:O(O(O({},t.headers||{}),n.headers||{}),{},{"Content-Type":"application/json"}),body:e}).then(function(a){return a.json()})}function Zt(t){var n,r;return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},yl),{},{status:null!==(n=t.status)&&void 0!==n?n:"APPROVED",reason:null!==(r=t.reason)&&void 0!==r?r:null,data:t.compositeSignature||t.data||O({},t)||{},updates:Xs(t.authorizationUpdates),local:Js((t.local||[])[0])})}var ti={"HTTP/GET":"GET","HTTP/POST":"POST"},Il=function(t){return C(ti[t.method],"Invalid Service Method for type back-channel-rpc",{service:t}),ti[t.method]};function ni(t){return ha.apply(this,arguments)}function ha(){return ha=x(h.mark(function t(n){var r,e,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r=a.length>1&&void 0!==a[1]?a[1]:function(){return!0},C(n,"Missing Polling Service",{service:n}),r()){o.next=4;break}throw new Error("Externally Halted");case 4:return o.next=6,Qs(n,{method:Il(n)}).then(Zt);case 6:o.t0=(e=o.sent).status,o.next="APPROVED"===o.t0?10:"DECLINED"===o.t0?11:12;break;case 10:return o.abrupt("return",e.data);case 11:throw new Error("Declined: ".concat(e.reason||"No reason supplied."));case 12:return o.next=14,new Promise(function(u){return setTimeout(u,500)});case 14:return o.abrupt("return",ni(e.updates,r));case 15:case"end":return o.stop()}},t)})),ha.apply(this,arguments)}var Rr="FCL_IFRAME";function ri(t){C(!document.getElementById(Rr),"Attempt at triggering multiple Frames",{src:t});var n=document.createElement("iframe");return n.src=t,n.id=Rr,n.allow="usb *; hid *",n.frameBorder="0",n.style.cssText="\n position:fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n height: 100%;\n width: 100vw;\n display:block;\n background:rgba(0,0,0,0.25);\n z-index: 2147483647;\n box-sizing: border-box;\n color-scheme: light;\n",document.body.append(n),[n.contentWindow,function(){document.getElementById(Rr)&&document.getElementById(Rr).remove()}]}var Dt=null,ei=null;function ai(t){var n;return null==Dt||null!==(n=Dt)&&void 0!==n&&n.closed?Dt=function(r,e,a,o,u){var i=a.top.outerHeight/2+a.top.screenY-385,c=a.top.outerWidth/2+a.top.screenX-320,l=a.open(r,"FCL_POP","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(640,", height=").concat(770,", top=").concat(i,", left=").concat(c));if(!l)throw new Error("Popup failed to open (was it blocked by a popup blocker?)");return l}(t,0,window):(ei!==t&&Dt.location.replace(t),Dt.focus()),ei=t,[Dt,function(){Dt&&!Dt.closed&&Dt.close(),Dt=null}]}var Gt=null,oi=null;function ui(t){var n;if(null==Gt||null!==(n=Gt)&&void 0!==n&&n.closed){if(!(Gt=window.open(t,"_blank")))throw new Error("Tab failed to open (was it blocked by the browser?)")}else oi!==t&&Gt.location.replace(t),Gt.focus();return oi=t,[Gt,function(){Gt&&!Gt.closed&&Gt.close(),Gt=null}]}var Sl={"VIEW/IFRAME":ri,"VIEW/POP":ai,"VIEW/TAB":ui};function Al(t){return ga.apply(this,arguments)}function ga(){return ga=x(h.mark(function t(n){var r,e=arguments;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:{},a.prev=1,a.abrupt("return",Sl[n.method](Vn(n),r));case 5:throw a.prev=5,a.t0=a.catch(1),console.error("execLocal({service, opts = {}})",a.t0,{service:n,opts:r}),a.t0;case 9:case"end":return a.stop()}},t,null,[[1,5]])})),ga.apply(this,arguments)}function si(t){return ma.apply(this,arguments)}function ma(){return ma=x(h.mark(function t(n){var r,e,a,o,u,c,l,d;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return r=n.service,e=n.body,a=n.config,g.next=3,Qs(r,{data:O({fclVersion:Ut,service:{params:r.params,data:r.data,type:r.type},config:a},e)}).then(Zt);case 3:if("APPROVED"!==(o=g.sent).status){g.next=8;break}return g.abrupt("return",o.data);case 8:if("DECLINED"!==o.status){g.next=12;break}throw new Error("Declined: ".concat(o.reason||"No reason supplied."));case 12:if("REDIRECT"!==o.status){g.next=16;break}return g.abrupt("return",o);case 16:if("PENDING"!==o.status){g.next=28;break}return u=!0,g.next=20,Al(Zs(o.local));case 20:return c=Lt(g.sent,2),l=c[1],d=function(){try{l(),u=!1}catch(v){console.error("Frame Close Error",v)}},g.abrupt("return",ni(o.updates,function(){return u}).then(function(v){return d(),v}).catch(function(v){throw console.error(v),d(),v}));case 28:throw console.error("Auto Decline: Invalid Response",{service:r,resp:o}),new Error("Auto Decline: Invalid Response");case 30:case"end":return g.stop()}},t)})),ma.apply(this,arguments)}var ii="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Rl=ii.length;function va(){for(var t="",n=32;n--;)t+=ii[Math.random()*Rl|0];return t}var wa,Jn,ci,xa,_r="FCL:VIEW:CLOSE",ya="FCL:VIEW:READY",ba="FCL:VIEW:RESPONSE",ft=function(t){return"string"==typeof t&&t.toLowerCase()},_l=new Set(["monetizationstart","monetizationpending","monetizationprogress","monetizationstop"]),dn=function(t,n){return console.warn("DEPRECATION NOTICE","Received ".concat(t,", please use ").concat(n," for this and future versions of FCL"))},Tr=function(t){var n=t.close,r=t.send,e=t.onReady,a=t.onResponse,o=t.onMessage;return function(u){try{if("object"!==z(u.data)||_l.has(u.data.type))return;ft(u.data.type)===ft(_r)&&n(),ft(u.data.type)===ft(ya)&&e(u,{send:r,close:n}),ft(u.data.type)===ft(ba)&&a(u,{send:r,close:n}),o(u,{send:r,close:n}),ft(u.data.type)===ft("FCL:FRAME:READY")&&(dn(u.data.type,ya),e(u,{send:r,close:n})),ft(u.data.type)===ft("FCL:FRAME:RESPONSE")&&(dn(u.data.type,ba),a(u,{send:r,close:n})),ft(u.data.type)===ft("FCL:FRAME:CLOSE")&&(dn(u.data.type,_r),n()),ft(u.data.type)===ft("FCL::CHALLENGE::RESPONSE")&&(dn(u.data.type,ba),a(u,{send:r,close:n})),ft(u.data.type)===ft("FCL::AUTHZ_READY")&&(dn(u.data.type,ya),e(u,{send:r,close:n})),ft(u.data.type)===ft("FCL::CHALLENGE::CANCEL")&&(dn(u.data.type,_r),n()),ft(u.data.type)===ft("FCL::CANCEL")&&(dn(u.data.type,_r),n())}catch(i){console.error("Frame Callback Error",i),n()}}},Tn=function(){},Cn=function(){},On=function(){},Pn=function(){},fi={"HTTP/RPC":si,"HTTP/POST":si,"IFRAME/RPC":function(t){var n=t.service,r=t.body,e=t.config,a=t.opts;return new Promise(function(o,u){var i=va(),c=a.includeOlderJsonRpcCall;!function(l){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==l)return{send:Tn,close:Tn};var g=d.onClose||Tn,E=Tr({close:R,send:L,onReady:d.onReady||Tn,onResponse:d.onResponse||Tn,onMessage:d.onMessage||Tn});window.addEventListener("message",E);var S=Lt(ri(Vn(l)),2),N=S[0],T=S[1];return{send:L,close:R};function R(){try{window.removeEventListener("message",E),T(),g()}catch(I){console.error("Frame Close Error",I)}}function L(I){try{N.postMessage(JSON.parse(JSON.stringify(I||{})),"*")}catch(W){console.error("Frame Send Error",I,W)}}}(n,{onReady:function(l,d){return x(h.mark(function g(){var v;return h.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:v=d.send,m.prev=1,v({type:"FCL:VIEW:READY:RESPONSE",fclVersion:Ut,body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),v({fclVersion:Ut,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),c&&v({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params],deprecated:{message:"jsonrpc is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),m.next=10;break;case 7:throw m.prev=7,m.t0=m.catch(1),m.t0;case 10:case"end":return m.stop()}},g,null,[[1,7]])}))()},onResponse:function(l,d){var g=d.close;try{if("object"!==z(l.data))return;var v=Zt(l.data);switch(v.status){case"APPROVED":o(v.data),g();break;case"DECLINED":u("Declined: ".concat(v.reason||"No reason supplied")),g();break;case"REDIRECT":o(v),g();break;default:u("Declined: No reason supplied"),g()}}catch(m){throw console.error("execIframeRPC onResponse error",m),m}},onMessage:function(l,d){var g=d.close;try{if("object"!==z(l.data)||"2.0"!==l.data.jsonrpc||l.data.id!==i)return;var v=Zt(l.data.result);switch(v.status){case"APPROVED":o(v.data),g();break;case"DECLINED":u("Declined: ".concat(v.reason||"No reason supplied")),g();break;case"REDIRECT":o(v),g();break;default:u("Declined: No reason supplied"),g()}}catch(m){throw console.error("execIframeRPC onMessage error",m),m}},onClose:function(){u("Declined: Externally Halted")}})})},"POP/RPC":function(t){var n=t.service,r=t.body,e=t.config,a=t.opts;return new Promise(function(o,u){var i=va(),c=a.redir,l=a.includeOlderJsonRpcCall;!function(d){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==d)return{send:Cn,close:Cn};var v=g.onClose||Cn,S=Tr({close:I,send:W,onReady:g.onReady||Cn,onResponse:g.onResponse||Cn,onMessage:g.onMessage||Cn});window.addEventListener("message",S);var N=Lt(ai(Vn(d)),2),T=N[0],R=N[1],L=setInterval(function(){T&&T.closed&&I()},500);return{send:W,close:I};function I(){try{window.removeEventListener("message",S),clearInterval(L),R(),v()}catch(lt){console.error("Popup Close Error",lt)}}function W(lt){try{T.postMessage(JSON.parse(JSON.stringify(lt||{})),"*")}catch(It){console.error("Popup Send Error",lt,It)}}}(n,{onReady:function(d,g){return x(h.mark(function v(){var m;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:m=g.send,b.prev=1,m({fclVersion:Ut,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),m({fclVersion:Ut,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),l&&m({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]}),b.next=10;break;case 7:throw b.prev=7,b.t0=b.catch(1),b.t0;case 10:case"end":return b.stop()}},v,null,[[1,7]])}))()},onResponse:function(d,g){var v=g.close;try{if("object"!==z(d.data))return;var m=Zt(d.data);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onResponse error",b),b}},onMessage:function(d,g){var v=g.close;try{if("object"!==z(d.data)||"2.0"!==d.data.jsonrpc||d.data.id!==i)return;var m=Zt(d.data.result);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onMessage error",b),b}},onClose:function(){u("Declined: Externally Halted")}})})},"TAB/RPC":function(t){var n=t.service,r=t.body,e=t.config,a=t.opts;return new Promise(function(o,u){var i=va(),c=a.redir,l=a.includeOlderJsonRpcCall;!function(d){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==d)return{send:On,close:On};var v=g.onClose||On,S=Tr({close:I,send:W,onReady:g.onReady||On,onResponse:g.onResponse||On,onMessage:g.onMessage||On});window.addEventListener("message",S);var N=Lt(ui(Vn(d)),2),T=N[0],R=N[1],L=setInterval(function(){T&&T.closed&&I()},500);return{send:W,close:I};function I(){try{window.removeEventListener("message",S),clearInterval(L),R(),v()}catch(lt){console.error("Tab Close Error",lt)}}function W(lt){try{T.postMessage(JSON.parse(JSON.stringify(lt||{})),"*")}catch(It){console.error("Tab Send Error",lt,It)}}}(n,{onReady:function(d,g){return x(h.mark(function v(){var m;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:m=g.send,b.prev=1,m({fclVersion:Ut,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),m({fclVersion:Ut,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),l&&m({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]}),b.next=10;break;case 7:throw b.prev=7,b.t0=b.catch(1),b.t0;case 10:case"end":return b.stop()}},v,null,[[1,7]])}))()},onResponse:function(d,g){var v=g.close;try{if("object"!==z(d.data))return;var m=Zt(d.data);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onResponse error",b),b}},onMessage:function(d,g){var v=g.close;try{if("object"!==z(d.data)||"2.0"!==d.data.jsonrpc||d.data.id!==i)return;var m=Zt(d.data.result);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onMessage error",b),b}},onClose:function(){u("Declined: Externally Halted")}})})},"EXT/RPC":function(t){var n=t.service,r=t.body,e=t.config;return new Promise(function(a,o){!function(u){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==u)return{send:Pn,close:Pn};var c=i.onClose||Pn,v=Tr({close:m,send:b,onReady:i.onReady||Pn,onResponse:i.onResponse||Pn,onMessage:i.onMessage||Pn});return window.addEventListener("message",v),b({service:u}),{send:b,close:m};function m(){try{window.removeEventListener("message",v),c()}catch(E){console.error("Ext Close Error",E)}}function b(E){try{window&&window.postMessage(JSON.parse(JSON.stringify(E||{})),"*")}catch(S){console.error("Ext Send Error",E,S)}}}(n,{onReady:function(u,i){return x(h.mark(function c(){var l;return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:l=i.send,d.prev=1,l({fclVersion:Ut,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),d.next=8;break;case 5:throw d.prev=5,d.t0=d.catch(1),d.t0;case 8:case"end":return d.stop()}},c,null,[[1,5]])}))()},onResponse:function(u,i){var c=i.close;try{if("object"!==z(u.data))return;var l=Zt(u.data);switch(l.status){case"APPROVED":a(l.data),c();break;case"DECLINED":o("Declined: ".concat(l.reason||"No reason supplied")),c();break;case"REDIRECT":a(l),c();break;default:o("Declined: No reason supplied"),c()}}catch(d){throw console.error("execExtRPC onResponse error",d),d}},onClose:function(){o("Declined: Externally Halted")}})})}},Tl=["ServicePlugin"],Cl=["discovery-service"],Xn=(wa=new Set,Jn=new Map(Object.entries(fi)),ci=function(t){return wa=new Set(K(t))},Object.freeze({add:function(t){if(C(Cl.includes(t.type),"Service Plugin type ".concat(t.type," is not supported")),"discovery-service"===t.type){var n=function(a){var o=a.services,u=a.serviceStrategy;C(Array.isArray(o)&&o.length,"Array of Discovery Services is required");var i,c=bt(o);try{for(c.s();!(i=c.n()).done;){var l=i.value;C(Xt(l.f_type)&&"Service"===l.f_type,"Service is required"),C(Xt(l.type)&&"authn"===l.type,"Service must be type authn. Received ".concat(l.type)),C(l.method in fi||u.method===l.method,"Service method ".concat(l.method," is not supported"))}}catch(d){c.e(d)}finally{c.f()}return C(Xt(u),"Service strategy is required"),C(Xt(u.method)&&An(u.method),"Service strategy method is required"),C(Xt(u.exec)&&gs(u.exec),"Service strategy exec function is required"),{discoveryServices:o,serviceStrategy:u}}(t),e=n.serviceStrategy;ci(n.discoveryServices),Jn.has(e.method)?wt({title:"Add Service Plugin",message:"Service strategy for ".concat(e.method," already exists"),level:St.warn}):Jn.set(e.method,e.exec)}},getServices:function(){return K(wa)},getStrategy:function(t){return Jn.get(t)},getStrategies:function(){return K(Jn.keys())}})),Ol=(xa=new Map,Object.freeze({add:function(t){var n,r=function(o){var u;C(o,"No plugins supplied");var i,c=bt(u=Array.isArray(o)?K(o):[o]);try{for(c.s();!(i=c.n()).done;){var l=i.value;C(Xt(l.name),"Plugin name is required"),C(Xt(l.f_type),"Plugin f_type is required"),C(Tl.includes(l.f_type),"Plugin type ".concat(l.f_type," is not supported"))}}catch(d){c.e(d)}finally{c.f()}return u}(t),e=bt(r);try{for(e.s();!(n=e.n()).done;){var a=n.value;xa.set(a.name,a),"ServicePlugin"===a.f_type&&Xn.add(a)}}catch(o){e.e(o)}finally{e.f()}},getPlugins:function(){return xa}})),Pl=function(){var t=x(h.mark(function n(r){var e,a,o,u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return a=r.body,o=r.config,u=r.opts,i=Xn.getStrategy((e=r.service).method),c.abrupt("return",i({service:e,body:a,config:o,opts:u}));case 3:case"end":return c.stop()}},n)}));return function(n){return t.apply(this,arguments)}}();function hn(t){return ka.apply(this,arguments)}function ka(){return ka=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return l=void 0===(c=n.config)?{}:c,g=void 0===(d=n.opts)?{}:d,(i=void 0===(u=n.msg)?{}:u).data=(o=n.service).data,b.next=4,xo(/^service\./);case 4:return b.t0=b.sent,b.next=7,xo(/^app\.detail\./);case 7:return b.t1=b.sent,b.t2=O(O({},l.client),{},{fclVersion:Ut,fclLibrary:"https://github.com/onflow/fcl-js",hostname:null!==(r=null===(e=window)||void 0===e||null===(a=e.location)||void 0===a?void 0:a.hostname)&&void 0!==r?r:null}),v={services:b.t0,app:b.t1,client:b.t2},b.prev=10,b.next=13,Pl({service:o,body:i,config:v,opts:g});case 13:if("REDIRECT"!==(m=b.sent).status){b.next=21;break}return C(o.type===m.data.type,"Cannot shift recursive service type in execService"),b.next=18,hn({service:m.data,msg:i,config:v,opts:g});case 18:return b.abrupt("return",b.sent);case 21:return b.abrupt("return",m);case 22:b.next=28;break;case 24:throw b.prev=24,b.t3=b.catch(10),wt({title:"Error on execService ".concat(null==o?void 0:o.type),message:b.t3,level:St.error}),b.t3;case 28:case"end":return b.stop()}},t,null,[[10,24]])})),ka.apply(this,arguments)}function Ea(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},pa),{},{addr:Z(t.addr||t.address),signature:t.signature||t.sig,keyId:t.keyId})}var Nn,li=function(){var t=x(h.mark(function n(){var r,e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=(null===(r=window)||void 0===r?void 0:r.fcl_extensions)||[],a.abrupt("return",[].concat(K(e),K(Xn.getServices())));case 2:case"end":return a.stop()}},n)}));return function(){return t.apply(this,arguments)}}();function Nl(t){return pi.apply(this,arguments)}function pi(){return(pi=x(h.mark(function t(n){var r,e,a,o,u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,j.get("discovery.authn.include",[]);case 2:return e=i.sent,i.next=5,j.first(["discovery.wallet.method","discovery.wallet.method.default"]);case 5:if(a=i.sent,o=null!=n&&n.method?n.method:a,null===(r=null==n?void 0:n.endpoint)||void 0===r){i.next=11;break}i.t0=r,i.next=14;break;case 11:return i.next=13,j.first(["discovery.wallet","challenge.handshake"]);case 13:i.t0=i.sent;case 14:return C(u=i.t0,'\n If no service is passed to "authenticate," then "discovery.wallet" must be defined in fcl config.\n See: "https://docs.onflow.org/fcl/reference/api/#setting-configuration-values"\n '),i.abrupt("return",O(O({},n),{},{type:"authn",endpoint:u,method:o,discoveryAuthnInclude:e}));case 17:case"end":return i.stop()}},t)}))).apply(this,arguments)}function Bl(t){return Ia.apply(this,arguments)}function Ia(){return Ia=x(h.mark(function t(n){var r,e,a,o,u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return a=n.types,c.next=3,j.get("discovery.authn.endpoint");case 3:return o=c.sent,C(Boolean(o),'"discovery.authn.endpoint" in config must be defined.'),c.next=7,j.get("discovery.authn.include",[]);case 7:return u=c.sent,i=new URL(o),c.t0=fetch,c.t1=i,c.t2={"Content-Type":"application/json"},c.t3=JSON,c.t4=a,c.t5=Ut,c.t6=u,c.next=18,li();case 18:return c.t7=c.sent,c.t8=Xn.getStrategies(),c.t9=null===(r=window)||void 0===r||null===(e=r.navigator)||void 0===e?void 0:e.userAgent,c.t10={type:c.t4,fclVersion:c.t5,include:c.t6,clientServices:c.t7,supportedStrategies:c.t8,userAgent:c.t9},c.t11=c.t3.stringify.call(c.t3,c.t10),c.t12={method:"POST",headers:c.t2,body:c.t11},c.abrupt("return",(0,c.t0)(c.t1,c.t12).then(function(l){return l.json()}));case 25:case"end":return c.stop()}},t)})),Ia.apply(this,arguments)}var di,hi,gn,Zn="authn",gi="UPDATED",mi="UPDATE_RESULTS",Sa=function(){var t=x(h.mark(function n(){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Bl({types:[Zn]});case 3:dt(Zn,mi,{results:e.sent}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),wt({title:"".concat(e.t0.name," Error fetching Discovery API services."),message:e.t0.message,level:St.error});case 10:case"end":return e.stop()}},n,null,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),Ul=(q(Nn={},Nr,(hi=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:typeof window>"u"&&console.warn("\n %cFCL Warning\n ============================\n ".concat('"fcl.discovery" is only available in the browser.',"\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n "),"font-weight:bold;font-family:monospace;"),"complete"===document.readyState?Sa():window.onload=x(h.mark(function o(){return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:Sa();case 1:case"end":return u.stop()}},o)}));case 2:case"end":return r.stop()}},t)})),function(t){return hi.apply(this,arguments)})),q(Nn,mi,function(t,n,r){t.merge(r),t.broadcast(gi,O({},t.all()))}),q(Nn,cn,function(t,n){t.subscribe(n.from),t.send(n.from,gi,O({},t.all()))}),q(Nn,nn,function(t,n){return t.unsubscribe(n.from)}),q(Nn,"SNAPSHOT",(di=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.reply(O({},n.all())));case 1:case"end":return e.stop()}},t)})),function(t,n){return di.apply(this,arguments)})),Nn),vi=function(){return rn(Ul,Zn)},Fl={authn:{subscribe:function(t){return ur(Zn,vi,t)},snapshot:function(){return ro(Zn,vi)},update:function(){return Sa()}}};function Dl(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)||function jl(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)||typeof navigator<"u"&&/iPad/.test(navigator.userAgent)}()}var yi,bi,Gl=function(t){return"function"==typeof t},Mt="CURRENT_USER",Aa="CURRENT_USER/UPDATED",wi="SNAPSHOT",Ra="SET_CURRENT_USER",xi="DEL_CURRENT_USER",_a='{\n "f_type": "User",\n "f_vsn": "1.0.0",\n "addr":null,\n "cid":null,\n "loggedIn":null,\n "expiresAt":null,\n "services":[]\n}',Ml=function(){var t=x(h.mark(function n(r){var e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return e=JSON.parse(_a),o.next=3,r.get(Mt);case 3:if(null==(a=o.sent)||e.f_vsn===a.f_vsn){o.next=7;break}return r.removeItem(Mt),o.abrupt("return",e);case 7:return o.abrupt("return",a||e);case 8:case"end":return o.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),zl=(q(gn={},Nr,function(){var t=x(h.mark(function n(r){var e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return typeof window>"u"&&console.warn('\n %cFCL Warning\n ============================\n "currentUser" is only available in the browser.\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n ',"font-weight:bold;font-family:monospace;"),r.merge(JSON.parse(_a)),o.next=4,j.first(["fcl.storage","fcl.storage.default"]);case 4:if(!(e=o.sent).can){o.next=10;break}return o.next=8,Ml(e);case 8:Yl(a=o.sent)&&r.merge(a);case 10:case"end":return o.stop()}},n)}));return function(n){return t.apply(this,arguments)}}()),q(gn,cn,function(t,n){t.subscribe(n.from),t.send(n.from,Aa,O({},t.all()))}),q(gn,nn,function(t,n){t.unsubscribe(n.from)}),q(gn,wi,(bi=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.reply(O({},n.all()));case 1:case"end":return e.stop()}},t)})),function(t,n){return bi.apply(this,arguments)})),q(gn,Ra,function(){var t=x(h.mark(function n(r,e,a){var o;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return r.merge(a),u.next=3,j.first(["fcl.storage","fcl.storage.default"]);case 3:(o=u.sent).can&&o.put(Mt,r.all()),r.broadcast(Aa,O({},r.all()));case 6:case"end":return u.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}()),q(gn,xi,(yi=x(h.mark(function t(n,r){var e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n.merge(JSON.parse(_a)),a.next=3,j.first(["fcl.storage","fcl.storage.default"]);case 3:(e=a.sent).can&&e.put(Mt,n.all()),n.broadcast(Aa,O({},n.all()));case 6:case"end":return a.stop()}},t)})),function(t,n){return yi.apply(this,arguments)})),gn),Bn=function(){return rn(zl,Mt)};function Yl(t){return null==t.expiresAt||0===t.expiresAt||t.expiresAt>Date.now()}function ql(){return ki.apply(this,arguments)}function ki(){return(ki=x(h.mark(function t(){var n,r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j.get("fcl.accountProof.resolver");case 2:if(Gl(n=e.sent)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,n();case 7:if(null!=(r=e.sent)){e.next=10;break}return e.abrupt("return");case 10:return C("string"==typeof r.appIdentifier,"appIdentifier must be a string"),C(/^[0-9a-f]+$/i.test(r.nonce),"Nonce must be a hex string"),e.abrupt("return",r);case 13:case"end":return e.stop()}},t)}))).apply(this,arguments)}var Kl=function(){var t=x(h.mark(function n(r){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.t0=r.discoveryAuthnInclude,a.next=4,li();case 4:return a.t1=a.sent,a.t2=Xn.getStrategies(),a.t3={discoveryAuthnInclude:a.t0,clientServices:a.t1,supportedStrategies:a.t2},a.abrupt("return",{client:a.t3});case 8:case"end":return a.stop()}},n)}));return function(n){return t.apply(this,arguments)}}();function $n(){return Ta.apply(this,arguments)}function Ta(){return Ta=x(h.mark(function t(){var n,r,e,a,o,u,i,c=arguments;return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(u=void 0!==(o=(e=c.length>0&&void 0!==c[0]?c[0]:{}).redir)&&o,!(a=e.service)||null!=a&&null!==(n=a.provider)&&void 0!==n&&n.is_installed||null==a||null===(r=a.provider)||void 0===r||!r.requires_install){l.next=4;break}return window.location.href=null==a||null===(i=a.provider)||void 0===i?void 0:i.install_link,l.abrupt("return");case 4:return l.abrupt("return",new Promise(function(){var d=x(h.mark(function g(v,m){var b,E,S,N,T,R,L;return h.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return Bn(),b={redir:u},I.next=4,Qn();case 4:return E=I.sent,I.next=7,Nl(a);case 7:return S=I.sent,N=Ar(E.services,"authn-refresh"),I.prev=9,I.next=12,ql();case 12:T=I.sent,I.next=19;break;case 15:return I.prev=15,I.t0=I.catch(9),console.error("Error During Authentication: Could not resolve account proof data.\n ".concat(I.t0)),I.abrupt("return",m(I.t0));case 19:if(!E.loggedIn){I.next=47;break}if(!N){I.next=46;break}return I.prev=21,I.next=24,hn({service:N,msg:T,opts:b});case 24:return R=I.sent,I.t1=dt,I.t2=Mt,I.t3=Ra,I.next=30,$s(R);case 30:I.t4=I.sent,(0,I.t1)(I.t2,I.t3,I.t4),I.next=37;break;case 34:I.prev=34,I.t5=I.catch(21),console.error("Error: Could not refresh authentication.",I.t5);case 37:return I.prev=37,I.t6=v,I.next=41,Qn();case 41:return I.t7=I.sent,I.abrupt("return",(0,I.t6)(I.t7));case 44:I.next=47;break;case 46:return I.abrupt("return",v(E));case 47:return I.prev=47,I.t8=hn,I.t9=S,I.t10=T,I.next=53,Kl(S);case 53:return I.t11=I.sent,I.t12=b,I.t13={service:I.t9,msg:I.t10,config:I.t11,opts:I.t12},I.next=58,(0,I.t8)(I.t13);case 58:return L=I.sent,I.t14=dt,I.t15=Mt,I.t16=Ra,I.next=64,$s(L);case 64:I.t17=I.sent,(0,I.t14)(I.t15,I.t16,I.t17),I.next=71;break;case 68:I.prev=68,I.t18=I.catch(47),console.error("Error while authenticating",I.t18);case 71:return I.prev=71,I.t19=v,I.next=75,Qn();case 75:return I.t20=I.sent,(0,I.t19)(I.t20),I.finish(71);case 78:case"end":return I.stop()}},g,null,[[9,15],[21,34,37,44],[47,68,71,78]])}));return function(g,v){return d.apply(this,arguments)}}()));case 5:case"end":return l.stop()}},t)})),Ta.apply(this,arguments)}function Ei(){Bn(),dt(Mt,xi)}function Hl(t){var d,n={f_type:"PreAuthzResponse",f_vsn:"1.0.0",proposer:((d=t)||{}).proposer,payer:(d||{}).payer||[],authorization:(d||{}).authorization||[]},r=[];null!=n.proposer&&r.push(["PROPOSER",n.proposer]);var e,a=bt(n.payer||[]);try{for(a.s();!(e=a.n()).done;)r.push(["PAYER",e.value])}catch(d){a.e(d)}finally{a.f()}var u,i=bt(n.authorization||[]);try{for(i.s();!(u=i.n()).done;)r.push(["AUTHORIZER",u.value])}catch(d){i.e(d)}finally{i.f()}var l=r.map(function(d){var g=Lt(d,2),v=g[0],m=g[1];return{tempId:[m.identity.address,m.identity.keyId].join("|"),addr:m.identity.address,keyId:m.identity.keyId,signingFunction:function(b){return hn({service:m,msg:b})},role:{proposer:"PROPOSER"===v,payer:"PAYER"===v,authorizer:"AUTHORIZER"===v}}});return l}function Ii(t){return Ca.apply(this,arguments)}function Ca(){return Ca=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return Bn(),r.abrupt("return",O(O({},n),{},{tempId:"CURRENT_USER",resolve:function(e,a){return x(h.mark(function o(){var u,i,c,l;return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,$n({redir:!0});case 2:if(i=Ar((u=d.sent).services,"authz"),!(c=Ar(u.services,"pre-authz"))){d.next=11;break}return d.t0=Hl,d.next=9,hn({service:c,msg:a});case 9:return d.t1=d.sent,d.abrupt("return",(0,d.t0)(d.t1));case 11:if(!i){d.next=14;break}return Dl()&&"WC/RPC"===i.method&&(l=window.open("","_blank")),d.abrupt("return",O(O({},e),{},{tempId:"CURRENT_USER",resolve:null,addr:Z(i.identity.address),keyId:i.identity.keyId,sequenceNum:null,signature:null,signingFunction:function(g){return x(h.mark(function v(){return h.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.t0=Ea,m.next=3,hn({service:i,msg:g,opts:{includeOlderJsonRpcCall:!0,windowRef:l}});case 3:return m.t1=m.sent,m.abrupt("return",(0,m.t0)(m.t1));case 5:case"end":return m.stop()}},v)}))()}}));case 14:throw new Error("No Authz or PreAuthz Service configured for CURRENT_USER");case 15:case"end":return d.stop()}},o)}))()}}));case 2:case"end":return r.stop()}},t)})),Ca.apply(this,arguments)}function Si(t){Bn();var e,n="@EXIT",r=rn((e=x(h.mark(function a(o){var u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:o.send(Mt,cn);case 1:return i.next=4,o.receive();case 4:if((u=i.sent).tag!==n){i.next=8;break}return o.send(Mt,nn),i.abrupt("return");case 8:t(u.data),i.next=1;break;case 11:case"end":return i.stop()}},a)})),function(a){return e.apply(this,arguments)}));return function(){return dt(r,n)}}function Qn(){return Bn(),dt(Mt,wi,null,{expectReply:!0,timeout:0})}function Ai(){return Ri.apply(this,arguments)}function Ri(){return(Ri=x(h.mark(function t(){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$n();case 2:return e.abrupt("return",$e(at(e.sent.addr),Bs));case 5:case"end":return e.stop()}},t)}))).apply(this,arguments)}var Wl=function(t){return C(/^[0-9a-f]+$/i.test(t),"Message must be a hex string"),{message:t}};function _i(t){return Oa.apply(this,arguments)}function Oa(){return Oa=x(h.mark(function t(n){var e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return Bn(),o.next=3,$n({redir:!0});case 3:return C(e=Ar(o.sent.services,"user-signature"),"Current user must have authorized a signing service."),o.prev=6,o.next=9,hn({service:e,msg:Wl(n)});case 9:if(a=o.sent,!Array.isArray(a)){o.next=14;break}return o.abrupt("return",a.map(function(u){return Ea(u)}));case 14:return o.abrupt("return",[Ea(a)]);case 15:o.next=20;break;case 17:return o.prev=17,o.t0=o.catch(6),o.abrupt("return",o.t0);case 20:case"end":return o.stop()}},t,null,[[6,17]])})),Oa.apply(this,arguments)}var xt=function(){return{authenticate:$n,unauthenticate:Ei,authorization:Ii,signUserMessage:_i,subscribe:Si,snapshot:Qn,resolveArgument:Ai}};function Pa(){return Pa=x(h.mark(function t(){var n,r,e,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=a.length>0&&void 0!==a[0]?a[0]:{},o.prev=1,o.next=4,dl(n);case 4:return o.next=6,Ys(n);case 6:return n=o.sent,o.next=9,j().get("fcl.authz",xt().authorization);case 9:return e=o.sent,r=j().overload(n.dependencies||{},x(h.mark(function u(){return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",Ot([ps(n.cadence),Ze(Fs(n.args||[])),n.limit&&_f(n.limit)&&Xe(n.limit),is(n.proposer||n.authz||e),cs(n.payer||n.authz||e),os(n.authorizations||[n.authz||e])]).then(Sn));case 1:case"end":return i.stop()}},u)}))),o.abrupt("return",r);case 14:throw o.prev=14,o.t0=o.catch(1),o.t0;case 17:case"end":return o.stop()}},t,null,[[1,14]])})),Pa.apply(this,arguments)}xt.authenticate=$n,xt.unauthenticate=Ei,xt.authorization=Ii,xt.signUserMessage=_i,xt.subscribe=Si,xt.snapshot=Qn,xt.resolveArgument=Ai;var Ti=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=function(a){var o;return a.deprecated&&console.warn("DEPRECATION NOTICE",a.deprecated.message),null==a||null===(o=a.body)||void 0===o||delete o.interaction,a},e=function(a){var o=a.data;"object"===z(o)&&null!=z(o)&&o.type===t&&n(r(o))};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}},Ln=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(window.location!==window.parent.location)window.parent.postMessage(O(O({},n),{},{type:t}),"*");else{if(!window.opener)throw new Error("Unable to communicate with parent FCL instance");window.opener.postMessage(O(O({},n),{},{type:t}),"*")}},Vl=function(t,n){return X.Buffer.from(t.padEnd(2*n,"0"),"hex")},Ci=function(t){return X.Buffer.from(t.padStart(16,"0"),"hex")},Oi=function(t){return X.Buffer.from(t,"hex")},Pi=function(t){var n=t.address,r=t.nonce,e=t.appIdentifier,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];C(n,"Encode Message For Provable Authn Error: address must be defined"),C(r,"Encode Message For Provable Authn Error: nonce must be defined"),C(e,"Encode Message For Provable Authn Error: appIdentifier must be defined"),C(r.length>=64,"Encode Message For Provable Authn Error: nonce must be minimum of 32 bytes");var o=Vl(X.Buffer.from("FCL-ACCOUNT-PROOF-V0.0").toString("hex"),32);return a?X.Buffer.concat([o,fn([e,Ci(Z(n)),Oi(r)])]).toString("hex"):fn([e,Ci(Z(n)),Oi(r)]).toString("hex")},Jl=Object.freeze({__proto__:null,sendMsgToFCL:Ln,ready:function(t){Ti("FCL:VIEW:READY:RESPONSE",t),Ln("FCL:VIEW:READY")},close:function(){Ln("FCL:VIEW:CLOSE")},approve:function(t){Ln("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"APPROVED",reason:null,data:t})},decline:function(t){Ln("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"DECLINED",reason:t,data:null})},redirect:function(t){Ln("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"REDIRECT",reason:null,data:t})},onMessageFromFCL:Ti,encodeMessageFromSignable:function(t,n){var r,e,a=(r=t.voucher,(e=new Set(r.authorizers)).add(r.proposalKey.address),e.delete(r.payer),Array.from(e).map(at)),o=Array.from(new Set([t.voucher.payer])).map(at),u=a.includes(at(n)),i=o.includes(at(n));if(!u&&!i)throw new xf(n);var c={cadence:t.voucher.cadence,refBlock:t.voucher.refBlock,computeLimit:t.voucher.computeLimit,arguments:t.voucher.arguments,proposalKey:O(O({},t.voucher.proposalKey),{},{address:Z(t.voucher.proposalKey.address)}),payer:Z(t.voucher.payer),authorizers:t.voucher.authorizers.map(Z),payloadSigs:t.voucher.payloadSigs.map(function(l){return O(O({},l),{},{address:Z(l.address)})})};return u?Cu(c):Ou(c)},CompositeSignature:function(t,n,r){this.f_type=pa.f_type,this.f_vsn=pa.f_vsn,this.addr=at(t),this.keyId=Number(n),this.signature=r},encodeAccountProof:Pi,injectExtService:function(t){"authn"===t.type&&null!=t.endpoint?(Array.isArray(window.fcl_extensions)||(window.fcl_extensions=[]),window.fcl_extensions.push(t)):console.warn("Authn service is required")}}),Xl="ACCOUNT_PROOF",Zl="USER_SIGNATURE",Ni=function(t){if(t.appIdentifier){var r=t.address,e=t.nonce,a=t.signatures;return C(An(t.appIdentifier),"verifyAccountProof({ appIdentifier }) -- appIdentifier must be a string"),C(An(r)&&16===Z(r).length,"verifyAccountProof({ address }) -- address must be a valid address"),C(/^[0-9a-f]+$/i.test(e),"nonce must be a hex string"),C(Array.isArray(a)&&a.every(function(c,l,d){return"CompositeSignature"===c.f_type}),"Must include an Array of CompositeSignatures to verify"),C(a.map(function(c){return c.addr}).every(function(c,l,d){return c===d[0]}),"User signatures to be verified must be from a single account address"),!0}var u=t.address,i=t.compSigs;return C(/^[0-9a-f]+$/i.test(t.message),"Signed message must be a hex string"),C(An(u)&&16===Z(u).length,"verifyUserSignatures({ address }) -- address must be a valid address"),C(Array.isArray(i)&&i.every(function(c,l,d){return"CompositeSignature"===c.f_type}),"Must include an Array of CompositeSignatures to verify"),C(i.map(function(c){return c.addr}).every(function(c,l,d){return c===d[0]}),"User signatures to be verified must be from a single account address"),!0},Bi=function(){var t=x(h.mark(function n(r,e){var a,o;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return a="ACCOUNT_PROOF"===r?"verifyAccountProofSignatures":"verifyUserSignatures",i.next=3,j.get("flow.network");case 3:if(o=i.sent){i.next=9;break}return i.next=7,j.get("env");case 7:(o=i.sent)&&wt.deprecate({pkg:"FCL",subject:'Using the "env" configuration key for specifying the flow network',message:'Please use "flow.network" instead.',transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/TRANSITIONS.md#0001-deprecate-env-config-key"});case 9:return C(e.fclCryptoContract||"testnet"===o||"mainnet"===o,"${verifyFunction}({ fclCryptoContract }) -- config.flow.network must be specified (testnet || mainnet) or contract address provided via opts.fclCryptoContract"),i.abrupt("return","\n import FCLCrypto from ".concat(e.fclCryptoContract?e.fclCryptoContract:"testnet"===o?"0x74daa6f9c7ef24b1":"0xb4b82a1c9d21d284","\n\n pub fun main(\n address: Address, \n message: String, \n keyIndices: [Int], \n signatures: [String]\n ): Bool {\n return FCLCrypto.").concat(a,"(address: address, message: message, keyIndices: keyIndices, signatures: signatures)\n }\n "));case 12:case"end":return i.stop()}},n)}));return function(n,r){return t.apply(this,arguments)}}();function Na(){return Na=x(h.mark(function t(n,r){var e,a,o,u,i,c,l,d,g,v,m=arguments;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:u=m.length>2&&void 0!==m[2]?m[2]:{},Ni({appIdentifier:n,address:e=r.address,nonce:a=r.nonce,signatures:o=r.signatures}),i=Pi({address:e,nonce:a,appIdentifier:n},!1),c=[],l=[],d=bt(o);try{for(d.s();!(g=d.n()).done;)c.push((v=g.value).signature),l.push(v.keyId.toString())}catch(E){d.e(E)}finally{d.f()}return b.t0=Sr,b.next=11,Bi(Xl,u);case 11:return b.t1=b.sent,b.t2=function(E,S){return[E(at(e),S.Address),E(i,S.String),E(l,S.Array(S.Int)),E(c,S.Array(S.String))]},b.t3={cadence:b.t1,args:b.t2},b.abrupt("return",(0,b.t0)(b.t3));case 15:case"end":return b.stop()}},t)})),Na.apply(this,arguments)}function Li(t,n){return Ba.apply(this,arguments)}function Ba(){return Ba=x(h.mark(function t(n,r){var e,a,o,u,i,c,l,d=arguments;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:e=d.length>2&&void 0!==d[2]?d[2]:{},a=at(r[0].addr),Ni({message:n,address:a,compSigs:r}),o=[],u=[],i=bt(r);try{for(i.s();!(c=i.n()).done;)o.push((l=c.value).signature),u.push(l.keyId.toString())}catch(v){i.e(v)}finally{i.f()}return g.t0=Sr,g.next=10,Bi(Zl,e);case 10:return g.t1=g.sent,g.t2=function(v,m){return[v(a,m.Address),v(n,m.String),v(u,m.Array(m.Int)),v(o,m.Array(m.String))]},g.t3={cadence:g.t1,args:g.t2},g.abrupt("return",(0,g.t0)(g.t3));case 14:case"end":return g.stop()}},t)})),Ba.apply(this,arguments)}var Un,Cr,$l=Object.freeze({__proto__:null,verifyAccountProof:function(t,n){return Na.apply(this,arguments)},verifyUserSignatures:Li}),Ql=wt.deprecate({pkg:"FCL",subject:"fcl.verifyUserSignatures()",message:"Please use fcl.AppUtils.verifyUserSignatures()",callback:function(t,n){return Li(t,n)}}),tp=function(){var t=x(h.mark(function n(){var r,e,a,o=arguments;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return r=o.length>0&&void 0!==o[0]?o[0]:[],e=o.length>1&&void 0!==o[1]?o[1]:{},u.next=4,j.first(["sdk.resolve"],e.resolve||He);case 4:if(a=u.sent,!Array.isArray(r)){u.next=9;break}return u.next=8,st(pr(),r);case 8:r=u.sent;case 9:return u.t0=JSON,u.t1=Yn,u.next=13,a(r);case 13:return u.t2=u.sent,u.t3=(0,u.t1)(u.t2),u.abrupt("return",u.t0.stringify.call(u.t0,u.t3,null,2));case 16:case"end":return u.stop()}},n)}));return function(){return t.apply(this,arguments)}}(),La="POLL",np=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ot([ss(r)]).then(Sn));case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Ua=function(t){return t.status>=4},Ui=function(t){return t.status>=3},Fi=function(t){return t.status>=2},rp=(q(Un={},Nr,function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.sendSelf(La);case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}()),q(Un,cn,function(t,n){t.subscribe(n.from),t.send(n.from,Br,t.all())}),q(Un,nn,function(t,n){t.unsubscribe(n.from)}),q(Un,no,function(){var t=x(h.mark(function n(r,e){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e.reply(r.all());case 1:case"end":return a.stop()}},n)}));return function(n,r){return t.apply(this,arguments)}}()),q(Un,La,function(){var t=x(h.mark(function n(r){var e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,np(r.self());case 3:e=a.sent,a.next=9;break;case 6:return a.prev=6,a.t0=a.catch(0),a.abrupt("return",r.fatalError(a.t0));case 9:Ua(e)||setTimeout(function(){return r.sendSelf(La)},2500),o=r.all(),u=e,JSON.stringify(o)!==JSON.stringify(u)&&r.broadcast(Br,e),r.merge(e);case 12:case"end":return a.stop()}var o,u},n,null,[[0,6]])}));return function(n){return t.apply(this,arguments)}}()),Un),ji=function(t){if("object"===z(t)&&(t=t.transactionId),null==t)throw new Error("transactionId required");return t},Di=function(t){return rn(rp,ji(t))};function mn(t){function n(e){return ur(ji(t),Di,e)}function r(e){return function(){var o=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).suppress||!1;return new Promise(function(u,i){var c=n(function(l,d){!d&&!l.statusCode||o?e(l)&&(u(l),c()):(i(d||l.errorMessage),c())})})}}return{snapshot:function(){return ro(t,Di)},subscribe:n,onceFinalized:r(Fi),onceExecuted:r(Ui),onceSealed:r(Ua)}}mn.isUnknown=function(t){return t.status>=0},mn.isPending=function(t){return t.status>=1},mn.isFinalized=Fi,mn.isExecuted=Ui,mn.isSealed=Ua,mn.isExpired=function(t){return 5===t.status};var vn="TICK",Or="hwm",Fa=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=setTimeout,e.t1=function(){return r.sendSelf(vn)},e.next=4,j().get("fcl.eventPollRate",1e4);case 4:return e.t2=e.sent,e.abrupt("return",(0,e.t0)(e.t1,e.t2));case 6:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),ep=(q(Cr={},vn,function(){var t=x(h.mark(function n(r){var e,a,u,i;return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(r.hasSubs()){l.next=2;break}return l.abrupt("return");case 2:if(null!=(e=r.get(Or))){l.next=18;break}return l.t0=r,l.t1=Or,l.next=8,qn();case 8:return l.t2=l.sent,l.t0.put.call(l.t0,l.t1,l.t2),l.t3=r,l.t4=vn,l.next=14,Fa(r);case 14:l.t5=l.sent,l.t3.put.call(l.t3,l.t4,l.t5),l.next=34;break;case 18:return l.next=20,qn();case 20:if(r.put(Or,a=l.sent),!(e.height1&&void 0!==d[1]?d[1]:{},G(null!=(r=n.template),"getInteractionTemplateAudits({ template }) -- template must be defined"),G("InteractionTemplate"===(r=Wn(r)).f_type,"getInteractionTemplateAudits({ template }) -- template must be an InteractionTemplate"),g.next=7,Mi({template:r});case 7:if((o=g.sent)===r.id){g.next=11;break}throw wt({title:"getInteractionTemplateAudits Debug Error",message:"Could not recompute and match template ID\n computed: ".concat(o,"\n template: ").concat(r.id,"\n "),level:St.debug}),new Error("getInteractionTemplateAudits Error: Could not recompute and match template ID");case 11:g.t0=r.f_version,g.next="1.0.0"===g.t0?14:33;break;case 14:if(g.t1=e,g.t1){g.next=19;break}return g.next=18,j().get("flow.auditors");case 18:g.t1=g.sent;case 19:if(G(u=g.t1,"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not set"),G(Array.isArray(u),"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not an array"),i=a.flowInteractionAuditContract){g.next=29;break}return g.next=26,j().get("flow.network");case 26:G("mainnet"===(c=g.sent)||"testnet"===c,"getInteractionTemplateAudits Error: Unable to determine address for FlowInteractionTemplateAudit contract. Set configuration for 'fcl.network' to 'mainnet' or 'testnet'"),i="mainnet"===c?"0xfd100e39d50a13e6":"0xf78bfc12d0a786dc";case 29:return g.next=31,Sr({cadence:"\n import FlowInteractionTemplateAudit from ".concat(i,"\n pub fun main(templateId: String, auditors: [Address]): {Address:Bool} {\n return FlowInteractionTemplateAudit.getHasTemplateBeenAuditedByAuditors(templateId: templateId, auditors: auditors)\n }\n "),args:function(v,m){return[v(o,m.String),v(u,m.Array(m.Address))]}});case 31:return g.abrupt("return",g.sent);case 33:throw new Error("getInteractionTemplateAudits Error: Unsupported template version");case 34:case"end":return g.stop()}},t)})),Da.apply(this,arguments)}function zi(t){return{contractName:t.contractName,address:t.address,contract:""}}function op(t){var n,r=[],e=bt(t.match(/import ((\w|,| )+)* from 0x\w+/g)||[]);try{for(e.s();!(n=e.n()).done;){var a,u=/import ((\w+|, |)*) from (0x\w+)/g.exec(n.value),i=bt(u[1].match(/((?:\w+)+),?/g)||[]);try{for(i.s();!(a=i.n()).done;)r.push(zi({address:u[3],contractName:a.value.replace(/,/g,"")}))}catch(l){i.e(l)}finally{i.f()}}}catch(l){e.e(l)}finally{e.f()}return r}function Ga(t){return Ma.apply(this,arguments)}function Ma(){return Ma=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m,b,E=arguments;return h.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:e=n.contractName,a=n.blockHeight,o=E.length>1&&void 0!==E[1]?E[1]:{},G(null!=(r=n.address),"generateDependencyPin({ address }) -- address must be defined"),G(null!=e,"generateDependencyPin({ contractName }) -- contractName must be defined"),G(null!=a,"generateDependencyPin({ blockHeight }) -- blockHeight must be defined"),G("string"==typeof r,"generateDependencyPin({ address }) -- address must be a string"),G("string"==typeof e,"generateDependencyPin({ contractName }) -- contractName must be a string"),G("number"==typeof a,"generateDependencyPin({ blockHeight }) -- blockHeight must be a number"),u=[zi({contractName:e,address:r})],i=0,c=u;case 10:if(!(i1&&void 0!==i[1]?i[1]:{},c.next=4,qn({sealed:!0},a);case 4:return c.abrupt("return",Ga({address:r,contractName:e,blockHeight:null==(o=c.sent)?void 0:o.height},a));case 7:case"end":return c.stop()}},t)})),za.apply(this,arguments)}function up(t){if(null==t)return null;if("1.0.0"===t.f_version)return t;throw new Error("normalizeInteractionTemplateInterface Error: Invalid InteractionTemplateInterface")}function Ya(){return Ya=x(h.mark(function t(n){var r,e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:G(null!=(r=n.templateInterface),"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be defined"),G("object"===z(r),"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be an object"),G("InteractionTemplateInterface"==typeof r.f_type,"generateTemplateInterfaceId({ templateInterface }) -- templateInterface object must be an InteractionTemplate"),r=up(r),o.t0=r.f_version,o.next="1.0.0"===o.t0?8:25;break;case 8:return e=r.data,o.t1=fn,o.next=12,J("InteractionTemplateInterface");case 12:return o.t2=o.sent,o.next=15,J("1.0.0");case 15:return o.t3=o.sent,o.next=18,J(e.flip);case 18:return o.t4=o.sent,o.next=21,Promise.all(Object.keys(e.arguments).map(function(){var u=x(h.mark(function i(c){return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,J(c);case 2:return l.t0=l.sent,l.next=5,J(String(e.arguments[c].index));case 5:return l.t1=l.sent,l.next=8,J(e.arguments[c].type);case 8:return l.t2=l.sent,l.abrupt("return",[l.t0,l.t1,l.t2]);case 10:case"end":return l.stop()}},i)}));return function(i){return u.apply(this,arguments)}}()));case 21:return o.t5=o.sent,o.t6=[o.t2,o.t3,o.t4,o.t5],a=(0,o.t1)(o.t6).toString("hex"),o.abrupt("return",J(a));case 25:throw new Error("generateTemplateInterfaceId Error: Unsupported templateInterface version");case 26:case"end":return o.stop()}},t)})),Ya.apply(this,arguments)}function Yi(t){return qa.apply(this,arguments)}function qa(){return qa=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,g,v,m,S,N,T=arguments;return h.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:e=n.blockHeight,a=n.network,o=T.length>1&&void 0!==T[1]?T[1]:{},G(null!=(r=n.template),"generateDependencyPin({ template }) -- template must be defined"),G("object"===z(r),"generateDependencyPin({ template }) -- template must be an object"),G("InteractionTemplate"===r.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),r=Wn(r),G(null!=a,"generateDependencyPin({ network }) network must be defined"),G(null!=e,"generateDependencyPin({ blockHeight }) blockHeight must be defined"),G("number"==typeof e,"generateDependencyPin({ blockHeight }) blockHeight must be a number"),R.t0=r.f_version,R.next="1.0.0"===R.t0?12:38;break;case 12:u=Object.keys(r.data.dependencies),i=0,c=u;case 14:if(!(i1&&void 0!==i[1]?i[1]:{},c.next=4,qn({sealed:!0});case 4:return c.abrupt("return",Yi({template:r,network:e,blockHeight:null==(o=c.sent)?void 0:o.height},a));case 7:case"end":return c.stop()}},t)})),Ka.apply(this,arguments)}var sp=Object.freeze({__proto__:null,getInteractionTemplateAudits:function(t){return Da.apply(this,arguments)},generateDependencyPin:Ga,generateDependencyPinAtLatestSealedBlock:function(t){return za.apply(this,arguments)},generateTemplateId:Mi,generateTemplateInterfaceId:function(t){return Ya.apply(this,arguments)},verifyDependencyPinsSame:Yi,verifyDependencyPinsSameAtLatestSealedBlock:function(t){return Ka.apply(this,arguments)},deriveCadenceByNetwork:zs,getTemplateMessage:function(t){var n,r,e,a=t.localization,o=void 0===a?"en-US":a,u=t.messageKey,i=t.template;G(u,"getMessage({ messageKey }) -- messageKey must be defined"),G("stirng"==typeof u,"getMessage({ messageKey }) -- messageKey must be a string"),G(o,"getMessage({ localization }) -- localization must be defined"),G("stirng"==typeof o,"getMessage({ localization }) -- localization must be a string"),G(null!=i,"generateTemplateId({ template }) -- template must be defined"),G("object"===z(i),"generateTemplateId({ template }) -- template must be an object"),G("InteractionTemplate"==typeof i.f_type,"generateTemplateId({ template }) -- template object must be an InteractionTemplate");var c=null==i||null===(n=i.data)||void 0===n?void 0:n.messages;return null==c||null===(r=c[u])||void 0===r||null===(e=r.i18n)||void 0===e?void 0:e[o]},getTemplateArgumentMessage:function(t){var n,r,e,a,o,u=t.localization,i=void 0===u?"en-US":u,c=t.argumentLabel,l=t.messageKey,d=t.template;G(l,"getMessage({ messageKey }) -- messageKey must be defined"),G("stirng"==typeof l,"getMessage({ messageKey }) -- messageKey must be a string"),G(c,"getMessage({ argumentLabel }) -- argumentLabel must be defined"),G("stirng"==typeof l,"getMessage({ argumentLabel }) -- argumentLabel must be a string"),G(i,"getMessage({ localization }) -- localization must be defined"),G("stirng"==typeof i,"getMessage({ localization }) -- localization must be a string"),G(null!=d,"generateTemplateId({ template }) -- template must be defined"),G("object"===z(d),"generateTemplateId({ template }) -- template must be an object"),G("InteractionTemplate"==typeof d.f_type,"generateTemplateId({ template }) -- template object must be an InteractionTemplate");var g=null==d||null===(n=d.data)||void 0===n?void 0:n.arguments;return null==g||null===(r=g[c])||void 0===r||null===(e=r.messages)||void 0===e||null===(a=e[l])||void 0===a||null===(o=a.i18n)||void 0===o?void 0:o[i]}}),ip=xt().authorization,cp=Us;B.AppUtils=$l,B.InteractionTemplateUtils=sp,B.TestUtils=Af,B.VERSION=Ut,B.WalletUtils=Jl,B.account=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.height,e=n.id,a=arguments.length>2?arguments[2]:void 0;return C(!(e&&r),'Method: account -- Cannot pass "id" and "height" simultaneously'),e?Ot([xn(t),Je(e)],a).then(Jt):r?Ot([xn(t),xr(r)],a).then(Jt):Ot([xn(t)],a).then(Jt)},B.arg=$e,B.args=Ze,B.atBlockHeight=xr,B.atBlockId=Je,B.authenticate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().authenticate(t)},B.authorization=function(t,n,r,e){return{addr:t,signingFunction:n,keyId:r,sequenceNum:e}},B.authorizations=os,B.authz=ip,B.block=qn,B.build=yr,B.cadence=cr,B.cdc=cr,B.config=j,B.createSignableVoucher=Yn,B.currentUser=xt,B.decode=Sn,B.discovery=Fl,B.display=function(t){return at(t)},B.events=function(t){return{subscribe:function(n){return ur(t,ap,n)}}},B.getAccount=xn,B.getBlock=Mn,B.getBlockHeader=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return st([mu,function(n){return n.block.isSealed=t,ht(n)}])},B.getCollection=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return st([vu,function(n){return n.collection.id=t,n}])},B.getEvents=function(t,n,r){return void 0===n&&void 0===r||wt.deprecate({pkg:"FCL/SDK",subject:"Passing a start and end into getEvents",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder"}),st([hr,function(e){return e.events.eventType=t,e.events.start=n,e.events.end=r,ht(e)}])},B.getEventsAtBlockHeightRange=us,B.getEventsAtBlockIds=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return st([hr,function(r){return r.events.eventType=t,r.events.blockIds=n,ht(r)}])},B.getTransaction=function(t){return st([pu,function(n){return n.transaction.id=t,ht(n)}])},B.getTransactionStatus=ss,B.invariant=G,B.isBad=Ue,B.isOk=bu,B.limit=Xe,B.logIn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().authenticate(t)},B.mutate=function(){return Pa.apply(this,arguments)},B.param=function(t){return wt.deprecate({pkg:"FCL/SDK",message:"The param builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:St.error})},B.params=function(t){return wt.deprecate({pkg:"FCL/SDK",message:"The params builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:St.error})},B.payer=cs,B.ping=function(){return hu},B.pipe=st,B.pluginRegistry=Ol,B.proposer=is,B.query=Sr,B.reauthenticate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().unauthenticate(),xt().authenticate(t)},B.ref=fs,B.sansPrefix=Z,B.script=ls,B.send=Ot,B.serialize=tp,B.signUp=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().authenticate(t)},B.t=cp,B.transaction=ps,B.tx=mn,B.unauthenticate=function(){return xt().unauthenticate()},B.validator=Ve,B.verifyUserSignatures=Ql,B.voucherIntercept=function(t){return vr("ix.voucher-intercept",t)},B.voucherToTxId=function(t){return function(t){var n=new he.SHA3(256);return n.update(X.Buffer.from(t,"hex")),n.digest().toString("hex")}(Ye(function(t){pf(t);var n=Du(t),r=function(e){return e.map(function(a){var u=a.keyId,i=a.sig;return{signerIndex:n.get(a.address),keyId:u,sig:i}}).sort(function(a,o){return a.signerIndex>o.signerIndex?1:a.signerIndexo.keyId?1:a.keyId{"use strict";B.r(er),B.d(er,{getFlowProvider:()=>yn});var tn=B(18983);tn.config({"accessNode.api":"https://rest-mainnet.onflow.org","discovery.wallet":"https://fcl-discovery.onflow.org/authn"});var yn=function(){return tn}}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/3rdpartylicenses.txt b/angular-bare-bones-demo/dist/3rdpartylicenses.txt index 298d74568..678aa32ff 100644 --- a/angular-bare-bones-demo/dist/3rdpartylicenses.txt +++ b/angular-bare-bones-demo/dist/3rdpartylicenses.txt @@ -5200,6 +5200,31 @@ SOFTWARE. +string.prototype.trim +MIT +The MIT License (MIT) + +Copyright (c) 2015 Jordan Harband + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + string_decoder MIT Node.js is licensed for use as follows: diff --git a/angular-bare-bones-demo/dist/40.3dccefb5519350f6.js b/angular-bare-bones-demo/dist/40.3dccefb5519350f6.js new file mode 100644 index 000000000..b4336c62d --- /dev/null +++ b/angular-bare-bones-demo/dist/40.3dccefb5519350f6.js @@ -0,0 +1 @@ +(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[40],{67083:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var R=D(94846);function ee(P,N,E){return void 0===N&&(N=new Uint8Array(2)),void 0===E&&(E=0),N[E+0]=P>>>8,N[E+1]=P>>>0,N}function L(P,N,E){return void 0===N&&(N=new Uint8Array(2)),void 0===E&&(E=0),N[E+0]=P>>>0,N[E+1]=P>>>8,N}function j(P,N){return void 0===N&&(N=0),P[N]<<24|P[N+1]<<16|P[N+2]<<8|P[N+3]}function C(P,N){return void 0===N&&(N=0),(P[N]<<24|P[N+1]<<16|P[N+2]<<8|P[N+3])>>>0}function U(P,N){return void 0===N&&(N=0),P[N+3]<<24|P[N+2]<<16|P[N+1]<<8|P[N]}function ue(P,N){return void 0===N&&(N=0),(P[N+3]<<24|P[N+2]<<16|P[N+1]<<8|P[N])>>>0}function de(P,N,E){return void 0===N&&(N=new Uint8Array(4)),void 0===E&&(E=0),N[E+0]=P>>>24,N[E+1]=P>>>16,N[E+2]=P>>>8,N[E+3]=P>>>0,N}function oe(P,N,E){return void 0===N&&(N=new Uint8Array(4)),void 0===E&&(E=0),N[E+0]=P>>>0,N[E+1]=P>>>8,N[E+2]=P>>>16,N[E+3]=P>>>24,N}function X(P,N,E){return void 0===N&&(N=new Uint8Array(8)),void 0===E&&(E=0),de(P/4294967296>>>0,N,E),de(P>>>0,N,E+4),N}function Z(P,N,E){return void 0===N&&(N=new Uint8Array(8)),void 0===E&&(E=0),oe(P>>>0,N,E),oe(P/4294967296>>>0,N,E+4),N}g.readInt16BE=function re(P,N){return void 0===N&&(N=0),(P[N+0]<<8|P[N+1])<<16>>16},g.readUint16BE=function ne(P,N){return void 0===N&&(N=0),(P[N+0]<<8|P[N+1])>>>0},g.readInt16LE=function ce(P,N){return void 0===N&&(N=0),(P[N+1]<<8|P[N])<<16>>16},g.readUint16LE=function $(P,N){return void 0===N&&(N=0),(P[N+1]<<8|P[N])>>>0},g.writeUint16BE=ee,g.writeInt16BE=ee,g.writeUint16LE=L,g.writeInt16LE=L,g.readInt32BE=j,g.readUint32BE=C,g.readInt32LE=U,g.readUint32LE=ue,g.writeUint32BE=de,g.writeInt32BE=de,g.writeUint32LE=oe,g.writeInt32LE=oe,g.readInt64BE=function I(P,N){void 0===N&&(N=0);var E=j(P,N),H=j(P,N+4);return 4294967296*E+H-4294967296*(H>>31)},g.readUint64BE=function _e(P,N){return void 0===N&&(N=0),4294967296*C(P,N)+C(P,N+4)},g.readInt64LE=function Se(P,N){void 0===N&&(N=0);var E=U(P,N);return 4294967296*U(P,N+4)+E-4294967296*(E>>31)},g.readUint64LE=function xe(P,N){void 0===N&&(N=0);var E=ue(P,N);return 4294967296*ue(P,N+4)+E},g.writeUint64BE=X,g.writeInt64BE=X,g.writeUint64LE=Z,g.writeInt64LE=Z,g.readUintBE=function le(P,N,E){if(void 0===E&&(E=0),P%8!=0)throw new Error("readUintBE supports only bitLengths divisible by 8");if(P/8>N.length-E)throw new Error("readUintBE: array is too short for the given bitLength");for(var H=0,fe=1,J=P/8+E-1;J>=E;J--)H+=N[J]*fe,fe*=256;return H},g.readUintLE=function G(P,N,E){if(void 0===E&&(E=0),P%8!=0)throw new Error("readUintLE supports only bitLengths divisible by 8");if(P/8>N.length-E)throw new Error("readUintLE: array is too short for the given bitLength");for(var H=0,fe=1,J=E;J=H;J--)E[J]=N/fe&255,fe*=256;return E},g.writeUintLE=function M(P,N,E,H){if(void 0===E&&(E=new Uint8Array(P/8)),void 0===H&&(H=0),P%8!=0)throw new Error("writeUintLE supports only bitLengths divisible by 8");if(!R.isSafeInteger(N))throw new Error("writeUintLE value must be an integer");for(var fe=1,J=H;J{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var R=D(67083),re=D(91897);function ce(j,C,U){for(var ue=1634760805,de=857760878,oe=2036477234,I=1797285236,_e=U[3]<<24|U[2]<<16|U[1]<<8|U[0],Se=U[7]<<24|U[6]<<16|U[5]<<8|U[4],xe=U[11]<<24|U[10]<<16|U[9]<<8|U[8],X=U[15]<<24|U[14]<<16|U[13]<<8|U[12],Z=U[19]<<24|U[18]<<16|U[17]<<8|U[16],le=U[23]<<24|U[22]<<16|U[21]<<8|U[20],G=U[27]<<24|U[26]<<16|U[25]<<8|U[24],se=U[31]<<24|U[30]<<16|U[29]<<8|U[28],M=C[3]<<24|C[2]<<16|C[1]<<8|C[0],p=C[7]<<24|C[6]<<16|C[5]<<8|C[4],l=C[11]<<24|C[10]<<16|C[9]<<8|C[8],_=C[15]<<24|C[14]<<16|C[13]<<8|C[12],v=ue,S=de,b=oe,d=I,x=_e,P=Se,N=xe,E=X,H=Z,fe=le,J=G,Re=se,ve=M,we=p,Ce=l,je=_,Le=0;Le<20;Le+=2)x=(x^=H=H+(ve=(ve^=v=v+x|0)>>>16|ve<<16)|0)>>>20|x<<12,P=(P^=fe=fe+(we=(we^=S=S+P|0)>>>16|we<<16)|0)>>>20|P<<12,N=(N^=J=J+(Ce=(Ce^=b=b+N|0)>>>16|Ce<<16)|0)>>>20|N<<12,E=(E^=Re=Re+(je=(je^=d=d+E|0)>>>16|je<<16)|0)>>>20|E<<12,N=(N^=J=J+(Ce=(Ce^=b=b+N|0)>>>24|Ce<<8)|0)>>>25|N<<7,E=(E^=Re=Re+(je=(je^=d=d+E|0)>>>24|je<<8)|0)>>>25|E<<7,P=(P^=fe=fe+(we=(we^=S=S+P|0)>>>24|we<<8)|0)>>>25|P<<7,x=(x^=H=H+(ve=(ve^=v=v+x|0)>>>24|ve<<8)|0)>>>25|x<<7,P=(P^=J=J+(je=(je^=v=v+P|0)>>>16|je<<16)|0)>>>20|P<<12,N=(N^=Re=Re+(ve=(ve^=S=S+N|0)>>>16|ve<<16)|0)>>>20|N<<12,E=(E^=H=H+(we=(we^=b=b+E|0)>>>16|we<<16)|0)>>>20|E<<12,x=(x^=fe=fe+(Ce=(Ce^=d=d+x|0)>>>16|Ce<<16)|0)>>>20|x<<12,E=(E^=H=H+(we=(we^=b=b+E|0)>>>24|we<<8)|0)>>>25|E<<7,x=(x^=fe=fe+(Ce=(Ce^=d=d+x|0)>>>24|Ce<<8)|0)>>>25|x<<7,N=(N^=Re=Re+(ve=(ve^=S=S+N|0)>>>24|ve<<8)|0)>>>25|N<<7,P=(P^=J=J+(je=(je^=v=v+P|0)>>>24|je<<8)|0)>>>25|P<<7;R.writeUint32LE(v+ue|0,j,0),R.writeUint32LE(S+de|0,j,4),R.writeUint32LE(b+oe|0,j,8),R.writeUint32LE(d+I|0,j,12),R.writeUint32LE(x+_e|0,j,16),R.writeUint32LE(P+Se|0,j,20),R.writeUint32LE(N+xe|0,j,24),R.writeUint32LE(E+X|0,j,28),R.writeUint32LE(H+Z|0,j,32),R.writeUint32LE(fe+le|0,j,36),R.writeUint32LE(J+G|0,j,40),R.writeUint32LE(Re+se|0,j,44),R.writeUint32LE(ve+M|0,j,48),R.writeUint32LE(we+p|0,j,52),R.writeUint32LE(Ce+l|0,j,56),R.writeUint32LE(je+_|0,j,60)}function $(j,C,U,ue,de){if(void 0===de&&(de=0),32!==j.length)throw new Error("ChaCha: key size must be 32 bytes");if(ue.length>>=8,C++;if(ue>0)throw new Error("ChaCha: counter overflow")}g.streamXOR=$,g.stream=function ee(j,C,U,ue){return void 0===ue&&(ue=0),re.wipe(U),$(j,C,U,U,ue)}},91573:(Pe,g,D)=>{"use strict";var re=D(25046),ne=D(37852),ce=D(91897),$=D(67083),ee=D(3054);g.Cv=32,g.WH=12,g.pg=16;var L=new Uint8Array(16),j=function(){function C(U){if(this.nonceLength=g.WH,this.tagLength=g.pg,U.length!==g.Cv)throw new Error("ChaCha20Poly1305 needs 32-byte key");this._key=new Uint8Array(U)}return C.prototype.seal=function(U,ue,de,oe){if(U.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");var I=new Uint8Array(16);I.set(U,I.length-U.length);var _e=new Uint8Array(32);re.stream(this._key,I,_e,4);var xe,Se=ue.length+this.tagLength;if(oe){if(oe.length!==Se)throw new Error("ChaCha20Poly1305: incorrect destination length");xe=oe}else xe=new Uint8Array(Se);return re.streamXOR(this._key,I,ue,xe,4),this._authenticate(xe.subarray(xe.length-this.tagLength,xe.length),_e,xe.subarray(0,xe.length-this.tagLength),de),ce.wipe(I),xe},C.prototype.open=function(U,ue,de,oe){if(U.length>16)throw new Error("ChaCha20Poly1305: incorrect nonce length");if(ue.length0&&I.update(L.subarray(oe.length%16))),I.update(de),de.length%16>0&&I.update(L.subarray(de.length%16));var _e=new Uint8Array(8);oe&&$.writeUint64LE(oe.length,_e),I.update(_e),$.writeUint64LE(de.length,_e),I.update(_e);for(var Se=I.digest(),xe=0;xe{"use strict";function re(ce,$){if(ce.length!==$.length)return 0;for(var ee=0,L=0;L>>8}Object.defineProperty(g,"__esModule",{value:!0}),g.select=function D(ce,$,ee){return~(ce-1)&$|ce-1&ee},g.lessOrEqual=function R(ce,$){return(0|ce)-(0|$)-1>>>31&1},g.compare=re,g.equal=function ne(ce,$){return 0!==ce.length&&0!==$.length&&0!==re(ce,$)}},47903:(Pe,g,D)=>{"use strict";g.Xx=g._w=g.aP=g.KS=g.jQ=void 0;D(52632);const ne=D(16);D(91897);function $(Y){const he=new Float64Array(16);if(Y)for(let Q=0;Q>16&1),Q[He-1]&=65535;Q[15]=y[15]-32767-(Q[14]>>16&1);const Ae=Q[15]>>16&1;Q[14]&=65535,Se(y,Q,1-Ae)}for(let K=0;K<16;K++)Y[2*K]=255&y[K],Y[2*K+1]=y[K]>>8}function le(Y){const he=new Uint8Array(32);return xe(he,Y),1&he[0]}function se(Y,he,Q){for(let y=0;y<16;y++)Y[y]=he[y]+Q[y]}function M(Y,he,Q){for(let y=0;y<16;y++)Y[y]=he[y]-Q[y]}function p(Y,he,Q){let y,K,Ae=0,He=0,ot=0,wt=0,ct=0,_t=0,$t=0,Xt=0,gt=0,ft=0,it=0,ut=0,rt=0,Ge=0,ze=0,We=0,Ye=0,lt=0,dt=0,bt=0,Et=0,yt=0,Dt=0,St=0,qr=0,Er=0,cn=0,Rn=0,Kn=0,Pn=0,fn=0,Wt=Q[0],Gt=Q[1],Yt=Q[2],zt=Q[3],ir=Q[4],Zt=Q[5],Qt=Q[6],sr=Q[7],or=Q[8],kt=Q[9],Kt=Q[10],jt=Q[11],er=Q[12],lr=Q[13],ar=Q[14],ur=Q[15];y=he[0],Ae+=y*Wt,He+=y*Gt,ot+=y*Yt,wt+=y*zt,ct+=y*ir,_t+=y*Zt,$t+=y*Qt,Xt+=y*sr,gt+=y*or,ft+=y*kt,it+=y*Kt,ut+=y*jt,rt+=y*er,Ge+=y*lr,ze+=y*ar,We+=y*ur,y=he[1],He+=y*Wt,ot+=y*Gt,wt+=y*Yt,ct+=y*zt,_t+=y*ir,$t+=y*Zt,Xt+=y*Qt,gt+=y*sr,ft+=y*or,it+=y*kt,ut+=y*Kt,rt+=y*jt,Ge+=y*er,ze+=y*lr,We+=y*ar,Ye+=y*ur,y=he[2],ot+=y*Wt,wt+=y*Gt,ct+=y*Yt,_t+=y*zt,$t+=y*ir,Xt+=y*Zt,gt+=y*Qt,ft+=y*sr,it+=y*or,ut+=y*kt,rt+=y*Kt,Ge+=y*jt,ze+=y*er,We+=y*lr,Ye+=y*ar,lt+=y*ur,y=he[3],wt+=y*Wt,ct+=y*Gt,_t+=y*Yt,$t+=y*zt,Xt+=y*ir,gt+=y*Zt,ft+=y*Qt,it+=y*sr,ut+=y*or,rt+=y*kt,Ge+=y*Kt,ze+=y*jt,We+=y*er,Ye+=y*lr,lt+=y*ar,dt+=y*ur,y=he[4],ct+=y*Wt,_t+=y*Gt,$t+=y*Yt,Xt+=y*zt,gt+=y*ir,ft+=y*Zt,it+=y*Qt,ut+=y*sr,rt+=y*or,Ge+=y*kt,ze+=y*Kt,We+=y*jt,Ye+=y*er,lt+=y*lr,dt+=y*ar,bt+=y*ur,y=he[5],_t+=y*Wt,$t+=y*Gt,Xt+=y*Yt,gt+=y*zt,ft+=y*ir,it+=y*Zt,ut+=y*Qt,rt+=y*sr,Ge+=y*or,ze+=y*kt,We+=y*Kt,Ye+=y*jt,lt+=y*er,dt+=y*lr,bt+=y*ar,Et+=y*ur,y=he[6],$t+=y*Wt,Xt+=y*Gt,gt+=y*Yt,ft+=y*zt,it+=y*ir,ut+=y*Zt,rt+=y*Qt,Ge+=y*sr,ze+=y*or,We+=y*kt,Ye+=y*Kt,lt+=y*jt,dt+=y*er,bt+=y*lr,Et+=y*ar,yt+=y*ur,y=he[7],Xt+=y*Wt,gt+=y*Gt,ft+=y*Yt,it+=y*zt,ut+=y*ir,rt+=y*Zt,Ge+=y*Qt,ze+=y*sr,We+=y*or,Ye+=y*kt,lt+=y*Kt,dt+=y*jt,bt+=y*er,Et+=y*lr,yt+=y*ar,Dt+=y*ur,y=he[8],gt+=y*Wt,ft+=y*Gt,it+=y*Yt,ut+=y*zt,rt+=y*ir,Ge+=y*Zt,ze+=y*Qt,We+=y*sr,Ye+=y*or,lt+=y*kt,dt+=y*Kt,bt+=y*jt,Et+=y*er,yt+=y*lr,Dt+=y*ar,St+=y*ur,y=he[9],ft+=y*Wt,it+=y*Gt,ut+=y*Yt,rt+=y*zt,Ge+=y*ir,ze+=y*Zt,We+=y*Qt,Ye+=y*sr,lt+=y*or,dt+=y*kt,bt+=y*Kt,Et+=y*jt,yt+=y*er,Dt+=y*lr,St+=y*ar,qr+=y*ur,y=he[10],it+=y*Wt,ut+=y*Gt,rt+=y*Yt,Ge+=y*zt,ze+=y*ir,We+=y*Zt,Ye+=y*Qt,lt+=y*sr,dt+=y*or,bt+=y*kt,Et+=y*Kt,yt+=y*jt,Dt+=y*er,St+=y*lr,qr+=y*ar,Er+=y*ur,y=he[11],ut+=y*Wt,rt+=y*Gt,Ge+=y*Yt,ze+=y*zt,We+=y*ir,Ye+=y*Zt,lt+=y*Qt,dt+=y*sr,bt+=y*or,Et+=y*kt,yt+=y*Kt,Dt+=y*jt,St+=y*er,qr+=y*lr,Er+=y*ar,cn+=y*ur,y=he[12],rt+=y*Wt,Ge+=y*Gt,ze+=y*Yt,We+=y*zt,Ye+=y*ir,lt+=y*Zt,dt+=y*Qt,bt+=y*sr,Et+=y*or,yt+=y*kt,Dt+=y*Kt,St+=y*jt,qr+=y*er,Er+=y*lr,cn+=y*ar,Rn+=y*ur,y=he[13],Ge+=y*Wt,ze+=y*Gt,We+=y*Yt,Ye+=y*zt,lt+=y*ir,dt+=y*Zt,bt+=y*Qt,Et+=y*sr,yt+=y*or,Dt+=y*kt,St+=y*Kt,qr+=y*jt,Er+=y*er,cn+=y*lr,Rn+=y*ar,Kn+=y*ur,y=he[14],ze+=y*Wt,We+=y*Gt,Ye+=y*Yt,lt+=y*zt,dt+=y*ir,bt+=y*Zt,Et+=y*Qt,yt+=y*sr,Dt+=y*or,St+=y*kt,qr+=y*Kt,Er+=y*jt,cn+=y*er,Rn+=y*lr,Kn+=y*ar,Pn+=y*ur,y=he[15],We+=y*Wt,Ye+=y*Gt,lt+=y*Yt,dt+=y*zt,bt+=y*ir,Et+=y*Zt,yt+=y*Qt,Dt+=y*sr,St+=y*or,qr+=y*kt,Er+=y*Kt,cn+=y*jt,Rn+=y*er,Kn+=y*lr,Pn+=y*ar,fn+=y*ur,Ae+=38*Ye,He+=38*lt,ot+=38*dt,wt+=38*bt,ct+=38*Et,_t+=38*yt,$t+=38*Dt,Xt+=38*St,gt+=38*qr,ft+=38*Er,it+=38*cn,ut+=38*Rn,rt+=38*Kn,Ge+=38*Pn,ze+=38*fn,K=1,y=Ae+K+65535,K=Math.floor(y/65536),Ae=y-65536*K,y=He+K+65535,K=Math.floor(y/65536),He=y-65536*K,y=ot+K+65535,K=Math.floor(y/65536),ot=y-65536*K,y=wt+K+65535,K=Math.floor(y/65536),wt=y-65536*K,y=ct+K+65535,K=Math.floor(y/65536),ct=y-65536*K,y=_t+K+65535,K=Math.floor(y/65536),_t=y-65536*K,y=$t+K+65535,K=Math.floor(y/65536),$t=y-65536*K,y=Xt+K+65535,K=Math.floor(y/65536),Xt=y-65536*K,y=gt+K+65535,K=Math.floor(y/65536),gt=y-65536*K,y=ft+K+65535,K=Math.floor(y/65536),ft=y-65536*K,y=it+K+65535,K=Math.floor(y/65536),it=y-65536*K,y=ut+K+65535,K=Math.floor(y/65536),ut=y-65536*K,y=rt+K+65535,K=Math.floor(y/65536),rt=y-65536*K,y=Ge+K+65535,K=Math.floor(y/65536),Ge=y-65536*K,y=ze+K+65535,K=Math.floor(y/65536),ze=y-65536*K,y=We+K+65535,K=Math.floor(y/65536),We=y-65536*K,Ae+=K-1+37*(K-1),K=1,y=Ae+K+65535,K=Math.floor(y/65536),Ae=y-65536*K,y=He+K+65535,K=Math.floor(y/65536),He=y-65536*K,y=ot+K+65535,K=Math.floor(y/65536),ot=y-65536*K,y=wt+K+65535,K=Math.floor(y/65536),wt=y-65536*K,y=ct+K+65535,K=Math.floor(y/65536),ct=y-65536*K,y=_t+K+65535,K=Math.floor(y/65536),_t=y-65536*K,y=$t+K+65535,K=Math.floor(y/65536),$t=y-65536*K,y=Xt+K+65535,K=Math.floor(y/65536),Xt=y-65536*K,y=gt+K+65535,K=Math.floor(y/65536),gt=y-65536*K,y=ft+K+65535,K=Math.floor(y/65536),ft=y-65536*K,y=it+K+65535,K=Math.floor(y/65536),it=y-65536*K,y=ut+K+65535,K=Math.floor(y/65536),ut=y-65536*K,y=rt+K+65535,K=Math.floor(y/65536),rt=y-65536*K,y=Ge+K+65535,K=Math.floor(y/65536),Ge=y-65536*K,y=ze+K+65535,K=Math.floor(y/65536),ze=y-65536*K,y=We+K+65535,K=Math.floor(y/65536),We=y-65536*K,Ae+=K-1+37*(K-1),Y[0]=Ae,Y[1]=He,Y[2]=ot,Y[3]=wt,Y[4]=ct,Y[5]=_t,Y[6]=$t,Y[7]=Xt,Y[8]=gt,Y[9]=ft,Y[10]=it,Y[11]=ut,Y[12]=rt,Y[13]=Ge,Y[14]=ze,Y[15]=We}function l(Y,he){p(Y,he,he)}function S(Y,he){const Q=$(),y=$(),K=$(),Ae=$(),He=$(),ot=$(),wt=$(),ct=$(),_t=$();M(Q,Y[1],Y[0]),M(_t,he[1],he[0]),p(Q,Q,_t),se(y,Y[0],Y[1]),se(_t,he[0],he[1]),p(y,y,_t),p(K,Y[3],he[3]),p(K,K,U),p(Ae,Y[2],he[2]),se(Ae,Ae,Ae),M(He,y,Q),M(ot,Ae,K),se(wt,Ae,K),se(ct,y,Q),p(Y[0],He,ot),p(Y[1],ct,wt),p(Y[2],wt,ot),p(Y[3],He,ct)}function b(Y,he,Q){for(let y=0;y<4;y++)Se(Y[y],he[y],Q)}function d(Y,he){const Q=$(),y=$(),K=$();(function _(Y,he){const Q=$();let y;for(y=0;y<16;y++)Q[y]=he[y];for(y=253;y>=0;y--)l(Q,Q),2!==y&&4!==y&&p(Q,Q,he);for(y=0;y<16;y++)Y[y]=Q[y]})(K,he[2]),p(Q,he[0],K),p(y,he[1],K),xe(Y,y),Y[31]^=le(Q)<<7}function P(Y,he){const Q=[$(),$(),$(),$()];I(Q[0],ue),I(Q[1],de),I(Q[2],j),p(Q[3],ue,de),function x(Y,he,Q){I(Y[0],L),I(Y[1],j),I(Y[2],j),I(Y[3],L);for(let y=255;y>=0;--y){const K=Q[y/8|0]>>(7&y)&1;b(Y,he,K),S(he,Y),S(Y,Y),b(Y,he,K)}}(Y,Q,he)}g._w=function N(Y){if(Y.length!==g.aP)throw new Error(`ed25519: seed must be ${g.aP} bytes`);const he=(0,ne.hash)(Y);he[0]&=248,he[31]&=127,he[31]|=64;const Q=new Uint8Array(32),y=[$(),$(),$(),$()];P(y,he),d(Q,y);const K=new Uint8Array(64);return K.set(Y),K.set(Q,32),{publicKey:Q,secretKey:K}};const fe=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function J(Y,he){let Q,y,K,Ae;for(y=63;y>=32;--y){for(Q=0,K=y-32,Ae=y-12;K>4)*fe[K],Q=he[K]>>8,he[K]&=255;for(K=0;K<32;K++)he[K]-=Q*fe[K];for(y=0;y<32;y++)he[y+1]+=he[y]>>8,Y[y]=255&he[y]}function Re(Y){const he=new Float64Array(64);for(let Q=0;Q<64;Q++)he[Q]=Y[Q];for(let Q=0;Q<64;Q++)Y[Q]=0;J(Y,he)}g.Xx=function ve(Y,he){const Q=new Float64Array(64),y=[$(),$(),$(),$()],K=(0,ne.hash)(Y.subarray(0,32));K[0]&=248,K[31]&=127,K[31]|=64;const Ae=new Uint8Array(64);Ae.set(K.subarray(32),32);const He=new ne.SHA512;He.update(Ae.subarray(32)),He.update(he);const ot=He.digest();He.clean(),Re(ot),P(y,ot),d(Ae,y),He.reset(),He.update(Ae.subarray(0,32)),He.update(Y.subarray(32)),He.update(he);const wt=He.digest();Re(wt);for(let ct=0;ct<32;ct++)Q[ct]=ot[ct];for(let ct=0;ct<32;ct++)for(let _t=0;_t<32;_t++)Q[ct+_t]+=wt[ct]*K[_t];return J(Ae.subarray(32),Q),Ae}},22266:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.isSerializableHash=function D(R){return typeof R.saveState<"u"&&typeof R.restoreState<"u"&&typeof R.cleanSavedState<"u"}},37651:(Pe,g,D)=>{"use strict";var re=D(56283),ne=D(91897),ce=function(){function $(ee,L,j,C){void 0===j&&(j=new Uint8Array(0)),this._counter=new Uint8Array(1),this._hash=ee,this._info=C;var U=re.hmac(this._hash,j,L);this._hmac=new re.HMAC(ee,U),this._buffer=new Uint8Array(this._hmac.digestLength),this._bufpos=this._buffer.length}return $.prototype._fillBuffer=function(){this._counter[0]++;var ee=this._counter[0];if(0===ee)throw new Error("hkdf: cannot expand more");this._hmac.reset(),ee>1&&this._hmac.update(this._buffer),this._info&&this._hmac.update(this._info),this._hmac.update(this._counter),this._hmac.finish(this._buffer),this._bufpos=0},$.prototype.expand=function(ee){for(var L=new Uint8Array(ee),j=0;j{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var R=D(22266),re=D(3054),ne=D(91897),ce=function(){function ee(L,j){this._finished=!1,this._inner=new L,this._outer=new L,this.blockSize=this._outer.blockSize,this.digestLength=this._outer.digestLength;var C=new Uint8Array(this.blockSize);j.length>this.blockSize?this._inner.update(j).finish(C).clean():C.set(j);for(var U=0;U{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.mul=Math.imul||function D(ee,L){var C=65535&ee,ue=65535&L;return C*ue+((ee>>>16&65535)*ue+C*(L>>>16&65535)<<16>>>0)|0},g.add=function R(ee,L){return ee+L|0},g.sub=function re(ee,L){return ee-L|0},g.rotl=function ne(ee,L){return ee<>>32-L},g.rotr=function ce(ee,L){return ee<<32-L|ee>>>L},g.isInteger=Number.isInteger||function $(ee){return"number"==typeof ee&&isFinite(ee)&&Math.floor(ee)===ee},g.MAX_SAFE_INTEGER=9007199254740991,g.isSafeInteger=function(ee){return g.isInteger(ee)&&ee>=-g.MAX_SAFE_INTEGER&&ee<=g.MAX_SAFE_INTEGER}},37852:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var R=D(3054),re=D(91897);g.DIGEST_LENGTH=16;var ne=function(){function ee(L){this.digestLength=g.DIGEST_LENGTH,this._buffer=new Uint8Array(16),this._r=new Uint16Array(10),this._h=new Uint16Array(10),this._pad=new Uint16Array(8),this._leftover=0,this._fin=0,this._finished=!1;var j=L[0]|L[1]<<8;this._r[0]=8191&j;var C=L[2]|L[3]<<8;this._r[1]=8191&(j>>>13|C<<3);var U=L[4]|L[5]<<8;this._r[2]=7939&(C>>>10|U<<6);var ue=L[6]|L[7]<<8;this._r[3]=8191&(U>>>7|ue<<9);var de=L[8]|L[9]<<8;this._r[4]=255&(ue>>>4|de<<12),this._r[5]=de>>>1&8190;var oe=L[10]|L[11]<<8;this._r[6]=8191&(de>>>14|oe<<2);var I=L[12]|L[13]<<8;this._r[7]=8065&(oe>>>11|I<<5);var _e=L[14]|L[15]<<8;this._r[8]=8191&(I>>>8|_e<<8),this._r[9]=_e>>>5&127,this._pad[0]=L[16]|L[17]<<8,this._pad[1]=L[18]|L[19]<<8,this._pad[2]=L[20]|L[21]<<8,this._pad[3]=L[22]|L[23]<<8,this._pad[4]=L[24]|L[25]<<8,this._pad[5]=L[26]|L[27]<<8,this._pad[6]=L[28]|L[29]<<8,this._pad[7]=L[30]|L[31]<<8}return ee.prototype._blocks=function(L,j,C){for(var U=this._fin?0:2048,ue=this._h[0],de=this._h[1],oe=this._h[2],I=this._h[3],_e=this._h[4],Se=this._h[5],xe=this._h[6],X=this._h[7],Z=this._h[8],le=this._h[9],G=this._r[0],se=this._r[1],M=this._r[2],p=this._r[3],l=this._r[4],_=this._r[5],v=this._r[6],S=this._r[7],b=this._r[8],d=this._r[9];C>=16;){var x=L[j+0]|L[j+1]<<8,P=L[j+2]|L[j+3]<<8,N=L[j+4]|L[j+5]<<8,E=L[j+6]|L[j+7]<<8,H=L[j+8]|L[j+9]<<8,fe=L[j+10]|L[j+11]<<8,J=L[j+12]|L[j+13]<<8,Re=L[j+14]|L[j+15]<<8,ve=0,we=ve;we+=(ue+=8191&x)*G,we+=(de+=8191&(x>>>13|P<<3))*(5*d),we+=(oe+=8191&(P>>>10|N<<6))*(5*b),we+=(I+=8191&(N>>>7|E<<9))*(5*S),ve=(we+=(_e+=8191&(E>>>4|H<<12))*(5*v))>>>13,we&=8191,we+=(Se+=H>>>1&8191)*(5*_),we+=(xe+=8191&(H>>>14|fe<<2))*(5*l),we+=(X+=8191&(fe>>>11|J<<5))*(5*p),we+=(Z+=8191&(J>>>8|Re<<8))*(5*M);var Ce=ve+=(we+=(le+=Re>>>5|U)*(5*se))>>>13;Ce+=ue*se,Ce+=de*G,Ce+=oe*(5*d),Ce+=I*(5*b),ve=(Ce+=_e*(5*S))>>>13,Ce&=8191,Ce+=Se*(5*v),Ce+=xe*(5*_),Ce+=X*(5*l),Ce+=Z*(5*p),ve+=(Ce+=le*(5*M))>>>13,Ce&=8191;var je=ve;je+=ue*M,je+=de*se,je+=oe*G,je+=I*(5*d),ve=(je+=_e*(5*b))>>>13,je&=8191,je+=Se*(5*S),je+=xe*(5*v),je+=X*(5*_),je+=Z*(5*l);var Le=ve+=(je+=le*(5*p))>>>13;Le+=ue*p,Le+=de*M,Le+=oe*se,Le+=I*G,ve=(Le+=_e*(5*d))>>>13,Le&=8191,Le+=Se*(5*b),Le+=xe*(5*S),Le+=X*(5*v),Le+=Z*(5*_);var Y=ve+=(Le+=le*(5*l))>>>13;Y+=ue*l,Y+=de*p,Y+=oe*M,Y+=I*se,ve=(Y+=_e*G)>>>13,Y&=8191,Y+=Se*(5*d),Y+=xe*(5*b),Y+=X*(5*S),Y+=Z*(5*v);var he=ve+=(Y+=le*(5*_))>>>13;he+=ue*_,he+=de*l,he+=oe*p,he+=I*M,ve=(he+=_e*se)>>>13,he&=8191,he+=Se*G,he+=xe*(5*d),he+=X*(5*b),he+=Z*(5*S);var Q=ve+=(he+=le*(5*v))>>>13;Q+=ue*v,Q+=de*_,Q+=oe*l,Q+=I*p,ve=(Q+=_e*M)>>>13,Q&=8191,Q+=Se*se,Q+=xe*G,Q+=X*(5*d),Q+=Z*(5*b);var y=ve+=(Q+=le*(5*S))>>>13;y+=ue*S,y+=de*v,y+=oe*_,y+=I*l,ve=(y+=_e*p)>>>13,y&=8191,y+=Se*M,y+=xe*se,y+=X*G,y+=Z*(5*d);var K=ve+=(y+=le*(5*b))>>>13;K+=ue*b,K+=de*S,K+=oe*v,K+=I*_,ve=(K+=_e*l)>>>13,K&=8191,K+=Se*p,K+=xe*M,K+=X*se,K+=Z*G;var Ae=ve+=(K+=le*(5*d))>>>13;Ae+=ue*d,Ae+=de*b,Ae+=oe*S,Ae+=I*v,ve=(Ae+=_e*_)>>>13,Ae&=8191,Ae+=Se*l,Ae+=xe*p,Ae+=X*M,Ae+=Z*se,ue=we=8191&(ve=(ve=((ve+=(Ae+=le*G)>>>13)<<2)+ve|0)+(we&=8191)|0),de=Ce+=ve>>>=13,oe=je&=8191,I=Le&=8191,_e=Y&=8191,Se=he&=8191,xe=Q&=8191,X=y&=8191,Z=K&=8191,le=Ae&=8191,j+=16,C-=16}this._h[0]=ue,this._h[1]=de,this._h[2]=oe,this._h[3]=I,this._h[4]=_e,this._h[5]=Se,this._h[6]=xe,this._h[7]=X,this._h[8]=Z,this._h[9]=le},ee.prototype.finish=function(L,j){void 0===j&&(j=0);var U,ue,de,oe,C=new Uint16Array(10);if(this._leftover){for(oe=this._leftover,this._buffer[oe++]=1;oe<16;oe++)this._buffer[oe]=0;this._fin=1,this._blocks(this._buffer,0,16)}for(U=this._h[1]>>>13,this._h[1]&=8191,oe=2;oe<10;oe++)this._h[oe]+=U,U=this._h[oe]>>>13,this._h[oe]&=8191;for(this._h[0]+=5*U,U=this._h[0]>>>13,this._h[0]&=8191,this._h[1]+=U,U=this._h[1]>>>13,this._h[1]&=8191,this._h[2]+=U,C[0]=this._h[0]+5,U=C[0]>>>13,C[0]&=8191,oe=1;oe<10;oe++)C[oe]=this._h[oe]+U,U=C[oe]>>>13,C[oe]&=8191;for(C[9]-=8192,ue=(1^U)-1,oe=0;oe<10;oe++)C[oe]&=ue;for(ue=~ue,oe=0;oe<10;oe++)this._h[oe]=this._h[oe]&ue|C[oe];for(this._h[0]=65535&(this._h[0]|this._h[1]<<13),this._h[1]=65535&(this._h[1]>>>3|this._h[2]<<10),this._h[2]=65535&(this._h[2]>>>6|this._h[3]<<7),this._h[3]=65535&(this._h[3]>>>9|this._h[4]<<4),this._h[4]=65535&(this._h[4]>>>12|this._h[5]<<1|this._h[6]<<14),this._h[5]=65535&(this._h[6]>>>2|this._h[7]<<11),this._h[6]=65535&(this._h[7]>>>5|this._h[8]<<8),this._h[7]=65535&(this._h[8]>>>8|this._h[9]<<5),this._h[0]=65535&(de=this._h[0]+this._pad[0]),oe=1;oe<8;oe++)this._h[oe]=65535&(de=(this._h[oe]+this._pad[oe]|0)+(de>>>16)|0);return L[j+0]=this._h[0]>>>0,L[j+1]=this._h[0]>>>8,L[j+2]=this._h[1]>>>0,L[j+3]=this._h[1]>>>8,L[j+4]=this._h[2]>>>0,L[j+5]=this._h[2]>>>8,L[j+6]=this._h[3]>>>0,L[j+7]=this._h[3]>>>8,L[j+8]=this._h[4]>>>0,L[j+9]=this._h[4]>>>8,L[j+10]=this._h[5]>>>0,L[j+11]=this._h[5]>>>8,L[j+12]=this._h[6]>>>0,L[j+13]=this._h[6]>>>8,L[j+14]=this._h[7]>>>0,L[j+15]=this._h[7]>>>8,this._finished=!0,this},ee.prototype.update=function(L){var U,j=0,C=L.length;if(this._leftover){(U=16-this._leftover)>C&&(U=C);for(var ue=0;ue=16&&(this._blocks(L,j,U=C-C%16),j+=U,C-=U),C){for(ue=0;ue{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.randomStringForEntropy=g.randomString=g.randomUint32=g.randomBytes=g.defaultRandomSource=void 0;const R=D(88920),re=D(67083),ne=D(91897);function ce(C,U=g.defaultRandomSource){return U.randomBytes(C)}g.defaultRandomSource=new R.SystemRandomSource,g.randomBytes=ce,g.randomUint32=function $(C=g.defaultRandomSource){const U=ce(4,C),ue=(0,re.readUint32LE)(U);return(0,ne.wipe)(U),ue};const ee="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";function L(C,U=ee,ue=g.defaultRandomSource){if(U.length<2)throw new Error("randomString charset is too short");if(U.length>256)throw new Error("randomString charset is too long");let de="";const oe=U.length,I=256-256%oe;for(;C>0;){const _e=ce(Math.ceil(256*C/I),ue);for(let Se=0;Se<_e.length&&C>0;Se++){const xe=_e[Se];xe{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.BrowserRandomSource=void 0,g.BrowserRandomSource=class R{constructor(){this.isAvailable=!1,this.isInstantiated=!1;const ne=typeof self<"u"?self.crypto||self.msCrypto:null;ne&&void 0!==ne.getRandomValues&&(this._crypto=ne,this.isAvailable=!0,this.isInstantiated=!0)}randomBytes(ne){if(!this.isAvailable||!this._crypto)throw new Error("Browser random byte generator is not available.");const ce=new Uint8Array(ne);for(let $=0;${"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.NodeRandomSource=void 0;const R=D(91897);g.NodeRandomSource=class re{constructor(){this.isAvailable=!1,this.isInstantiated=!1;{const ce=D(19726);ce&&ce.randomBytes&&(this._crypto=ce,this.isAvailable=!0,this.isInstantiated=!0)}}randomBytes(ce){if(!this.isAvailable||!this._crypto)throw new Error("Node.js random byte generator is not available.");let $=this._crypto.randomBytes(ce);if($.length!==ce)throw new Error("NodeRandomSource: got fewer bytes than requested");const ee=new Uint8Array(ce);for(let L=0;L{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.SystemRandomSource=void 0;const R=D(65695),re=D(49398);g.SystemRandomSource=class ne{constructor(){return this.isAvailable=!1,this.name="",this._source=new R.BrowserRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Browser")):(this._source=new re.NodeRandomSource,this._source.isAvailable?(this.isAvailable=!0,void(this.name="Node")):void 0)}randomBytes($){if(!this.isAvailable)throw new Error("System random byte generator is not available.");return this._source.randomBytes($)}}},41027:(Pe,g,D)=>{"use strict";var re=D(67083),ne=D(91897);g.k=32,g.cn=64;var ce=function(){function j(){this.digestLength=g.k,this.blockSize=g.cn,this._state=new Int32Array(8),this._temp=new Int32Array(64),this._buffer=new Uint8Array(128),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return j.prototype._initState=function(){this._state[0]=1779033703,this._state[1]=3144134277,this._state[2]=1013904242,this._state[3]=2773480762,this._state[4]=1359893119,this._state[5]=2600822924,this._state[6]=528734635,this._state[7]=1541459225},j.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},j.prototype.clean=function(){ne.wipe(this._buffer),ne.wipe(this._temp),this.reset()},j.prototype.update=function(C,U){if(void 0===U&&(U=C.length),this._finished)throw new Error("SHA256: can't update because hash was finished.");var ue=0;if(this._bytesHashed+=U,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=C[ue++],U--;this._bufferLength===this.blockSize&&(ee(this._temp,this._state,this._buffer,0,this.blockSize),this._bufferLength=0)}for(U>=this.blockSize&&(ue=ee(this._temp,this._state,C,ue,U),U%=this.blockSize);U>0;)this._buffer[this._bufferLength++]=C[ue++],U--;return this},j.prototype.finish=function(C){if(!this._finished){var U=this._bytesHashed,ue=this._bufferLength,de=U/536870912|0,oe=U<<3,I=U%64<56?64:128;this._buffer[ue]=128;for(var _e=ue+1;_e0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},j.prototype.restoreState=function(C){return this._state.set(C.state),this._bufferLength=C.bufferLength,C.buffer&&this._buffer.set(C.buffer),this._bytesHashed=C.bytesHashed,this._finished=!1,this},j.prototype.cleanSavedState=function(C){ne.wipe(C.state),C.buffer&&ne.wipe(C.buffer),C.bufferLength=0,C.bytesHashed=0},j}();g.mE=ce;var $=new Int32Array([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]);function ee(j,C,U,ue,de){for(;de>=64;){for(var oe=C[0],I=C[1],_e=C[2],Se=C[3],xe=C[4],X=C[5],Z=C[6],le=C[7],G=0;G<16;G++)j[G]=re.readUint32BE(U,ue+4*G);for(G=16;G<64;G++){var M=j[G-2];j[G]=((p=(M>>>17|M<<15)^(M>>>19|M<<13)^M>>>10)+j[G-7]|0)+((l=((M=j[G-15])>>>7|M<<25)^(M>>>18|M<<14)^M>>>3)+j[G-16]|0)}for(G=0;G<64;G++){var p=(((xe>>>6|xe<<26)^(xe>>>11|xe<<21)^(xe>>>25|xe<<7))+(xe&X^~xe&Z)|0)+(le+($[G]+j[G]|0)|0)|0,l=((oe>>>2|oe<<30)^(oe>>>13|oe<<19)^(oe>>>22|oe<<10))+(oe&I^oe&_e^I&_e)|0;le=Z,Z=X,X=xe,xe=Se+p|0,Se=_e,_e=I,I=oe,oe=p+l|0}C[0]+=oe,C[1]+=I,C[2]+=_e,C[3]+=Se,C[4]+=xe,C[5]+=X,C[6]+=Z,C[7]+=le,ue+=64,de-=64}return ue}g.vp=function L(j){var C=new ce;C.update(j);var U=C.digest();return C.clean(),U}},16:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});var R=D(67083),re=D(91897);g.DIGEST_LENGTH=64,g.BLOCK_SIZE=128;var ne=function(){function L(){this.digestLength=g.DIGEST_LENGTH,this.blockSize=g.BLOCK_SIZE,this._stateHi=new Int32Array(8),this._stateLo=new Int32Array(8),this._tempHi=new Int32Array(16),this._tempLo=new Int32Array(16),this._buffer=new Uint8Array(256),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this.reset()}return L.prototype._initState=function(){this._stateHi[0]=1779033703,this._stateHi[1]=3144134277,this._stateHi[2]=1013904242,this._stateHi[3]=2773480762,this._stateHi[4]=1359893119,this._stateHi[5]=2600822924,this._stateHi[6]=528734635,this._stateHi[7]=1541459225,this._stateLo[0]=4089235720,this._stateLo[1]=2227873595,this._stateLo[2]=4271175723,this._stateLo[3]=1595750129,this._stateLo[4]=2917565137,this._stateLo[5]=725511199,this._stateLo[6]=4215389547,this._stateLo[7]=327033209},L.prototype.reset=function(){return this._initState(),this._bufferLength=0,this._bytesHashed=0,this._finished=!1,this},L.prototype.clean=function(){re.wipe(this._buffer),re.wipe(this._tempHi),re.wipe(this._tempLo),this.reset()},L.prototype.update=function(j,C){if(void 0===C&&(C=j.length),this._finished)throw new Error("SHA512: can't update because hash was finished.");var U=0;if(this._bytesHashed+=C,this._bufferLength>0){for(;this._bufferLength0;)this._buffer[this._bufferLength++]=j[U++],C--;this._bufferLength===this.blockSize&&($(this._tempHi,this._tempLo,this._stateHi,this._stateLo,this._buffer,0,this.blockSize),this._bufferLength=0)}for(C>=this.blockSize&&(U=$(this._tempHi,this._tempLo,this._stateHi,this._stateLo,j,U,C),C%=this.blockSize);C>0;)this._buffer[this._bufferLength++]=j[U++],C--;return this},L.prototype.finish=function(j){if(!this._finished){var C=this._bytesHashed,U=this._bufferLength,ue=C/536870912|0,de=C<<3,oe=C%128<112?128:256;this._buffer[U]=128;for(var I=U+1;I0?new Uint8Array(this._buffer):void 0,bufferLength:this._bufferLength,bytesHashed:this._bytesHashed}},L.prototype.restoreState=function(j){return this._stateHi.set(j.stateHi),this._stateLo.set(j.stateLo),this._bufferLength=j.bufferLength,j.buffer&&this._buffer.set(j.buffer),this._bytesHashed=j.bytesHashed,this._finished=!1,this},L.prototype.cleanSavedState=function(j){re.wipe(j.stateHi),re.wipe(j.stateLo),j.buffer&&re.wipe(j.buffer),j.bufferLength=0,j.bytesHashed=0},L}();g.SHA512=ne;var ce=new Int32Array([1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591]);function $(L,j,C,U,ue,de,oe){for(var d,x,P,N,E,H,fe,J,I=C[0],_e=C[1],Se=C[2],xe=C[3],X=C[4],Z=C[5],le=C[6],G=C[7],se=U[0],M=U[1],p=U[2],l=U[3],_=U[4],v=U[5],S=U[6],b=U[7];oe>=128;){for(var Re=0;Re<16;Re++)L[Re]=R.readUint32BE(ue,ve=8*Re+de),j[Re]=R.readUint32BE(ue,ve+4);for(Re=0;Re<80;Re++){var y,$t,Ce=_e,je=Se,Le=xe,Y=X,he=Z,Q=le,Ae=M,He=p,ot=l,wt=_,ct=v,_t=S;if(E=65535&(x=b),H=x>>>16,fe=65535&(d=G),J=d>>>16,E+=65535&(x=(_>>>14|X<<18)^(_>>>18|X<<14)^(X>>>9|_<<23)),H+=x>>>16,fe+=65535&(d=(X>>>14|_<<18)^(X>>>18|_<<14)^(_>>>9|X<<23)),J+=d>>>16,E+=65535&(x=_&v^~_&S),H+=x>>>16,fe+=65535&(d=X&Z^~X&le),J+=d>>>16,E+=65535&(x=ce[2*Re+1]),H+=x>>>16,fe+=65535&(d=ce[2*Re]),J+=d>>>16,H+=(x=j[Re%16])>>>16,fe+=65535&(d=L[Re%16]),J+=d>>>16,fe+=(H+=(E+=65535&x)>>>16)>>>16,E=65535&(x=N=65535&E|H<<16),H=x>>>16,fe=65535&(d=P=65535&fe|(J+=fe>>>16)<<16),J=d>>>16,E+=65535&(x=(se>>>28|I<<4)^(I>>>2|se<<30)^(I>>>7|se<<25)),H+=x>>>16,fe+=65535&(d=(I>>>28|se<<4)^(se>>>2|I<<30)^(se>>>7|I<<25)),J+=d>>>16,H+=(x=se&M^se&p^M&p)>>>16,fe+=65535&(d=I&_e^I&Se^_e&Se),J+=d>>>16,y=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,$t=65535&E|H<<16,E=65535&(x=ot),H=x>>>16,fe=65535&(d=Le),J=d>>>16,H+=(x=N)>>>16,fe+=65535&(d=P),J+=d>>>16,_e=I,Se=Ce,xe=je,X=Le=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,Z=Y,le=he,G=Q,I=y,M=se,p=Ae,l=He,_=ot=65535&E|H<<16,v=wt,S=ct,b=_t,se=$t,Re%16==15)for(var ve=0;ve<16;ve++)E=65535&(x=j[ve]),H=x>>>16,fe=65535&(d=L[ve]),J=d>>>16,E+=65535&(x=j[(ve+9)%16]),H+=x>>>16,fe+=65535&(d=L[(ve+9)%16]),J+=d>>>16,E+=65535&(x=((N=j[(ve+1)%16])>>>1|(P=L[(ve+1)%16])<<31)^(N>>>8|P<<24)^(N>>>7|P<<25)),H+=x>>>16,fe+=65535&(d=(P>>>1|N<<31)^(P>>>8|N<<24)^P>>>7),J+=d>>>16,H+=(x=((N=j[(ve+14)%16])>>>19|(P=L[(ve+14)%16])<<13)^(P>>>29|N<<3)^(N>>>6|P<<26))>>>16,fe+=65535&(d=(P>>>19|N<<13)^(N>>>29|P<<3)^P>>>6),J+=d>>>16,L[ve]=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,j[ve]=65535&E|H<<16}E=65535&(x=se),H=x>>>16,fe=65535&(d=I),J=d>>>16,H+=(x=U[0])>>>16,fe+=65535&(d=C[0]),J+=d>>>16,C[0]=I=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[0]=se=65535&E|H<<16,E=65535&(x=M),H=x>>>16,fe=65535&(d=_e),J=d>>>16,H+=(x=U[1])>>>16,fe+=65535&(d=C[1]),J+=d>>>16,C[1]=_e=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[1]=M=65535&E|H<<16,E=65535&(x=p),H=x>>>16,fe=65535&(d=Se),J=d>>>16,H+=(x=U[2])>>>16,fe+=65535&(d=C[2]),J+=d>>>16,C[2]=Se=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[2]=p=65535&E|H<<16,E=65535&(x=l),H=x>>>16,fe=65535&(d=xe),J=d>>>16,H+=(x=U[3])>>>16,fe+=65535&(d=C[3]),J+=d>>>16,C[3]=xe=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[3]=l=65535&E|H<<16,E=65535&(x=_),H=x>>>16,fe=65535&(d=X),J=d>>>16,H+=(x=U[4])>>>16,fe+=65535&(d=C[4]),J+=d>>>16,C[4]=X=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[4]=_=65535&E|H<<16,E=65535&(x=v),H=x>>>16,fe=65535&(d=Z),J=d>>>16,H+=(x=U[5])>>>16,fe+=65535&(d=C[5]),J+=d>>>16,C[5]=Z=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[5]=v=65535&E|H<<16,E=65535&(x=S),H=x>>>16,fe=65535&(d=le),J=d>>>16,H+=(x=U[6])>>>16,fe+=65535&(d=C[6]),J+=d>>>16,C[6]=le=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[6]=S=65535&E|H<<16,E=65535&(x=b),H=x>>>16,fe=65535&(d=G),J=d>>>16,H+=(x=U[7])>>>16,fe+=65535&(d=C[7]),J+=d>>>16,C[7]=G=65535&(fe+=(H+=(E+=65535&x)>>>16)>>>16)|(J+=fe>>>16)<<16,U[7]=b=65535&E|H<<16,de+=128,oe-=128}return de}g.hash=function ee(L){var j=new ne;j.update(L);var C=j.digest();return j.clean(),C}},91897:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.wipe=function D(R){for(var re=0;re{"use strict";g.gi=g.Au=g.KS=g.kz=void 0;const re=D(52632),ne=D(91897);function ce(G){const se=new Float64Array(16);if(G)for(let M=0;M=0;--E){const H=M[E>>>3]>>>(7&E)&1;j(l,_,H),j(v,S,H),ue(b,l,v),de(l,l,v),ue(v,_,S),de(_,_,S),I(S,b),I(d,l),oe(l,v,l),oe(v,_,b),ue(b,l,v),de(l,l,v),I(_,l),de(v,S,d),oe(l,v,ee),ue(l,l,S),oe(v,v,l),oe(l,S,d),oe(S,_,p),I(_,b),j(l,_,H),j(v,S,H)}for(let E=0;E<16;E++)p[E+16]=l[E],p[E+32]=v[E],p[E+48]=_[E],p[E+64]=S[E];const x=p.subarray(32),P=p.subarray(16);(function _e(G,se){const M=ce();for(let p=0;p<16;p++)M[p]=se[p];for(let p=253;p>=0;p--)I(M,M),2!==p&&4!==p&&oe(M,M,se);for(let p=0;p<16;p++)G[p]=M[p]})(x,x),oe(P,P,x);const N=new Uint8Array(32);return function C(G,se){const M=ce(),p=ce();for(let l=0;l<16;l++)p[l]=se[l];L(p),L(p),L(p);for(let l=0;l<2;l++){M[0]=p[0]-65517;for(let v=1;v<15;v++)M[v]=p[v]-65535-(M[v-1]>>16&1),M[v-1]&=65535;M[15]=p[15]-32767-(M[14]>>16&1);const _=M[15]>>16&1;M[14]&=65535,j(p,M,1-_)}for(let l=0;l<16;l++)G[2*l]=255&p[l],G[2*l+1]=p[l]>>8}(N,P),N}function xe(G){return Se(G,$)}g.Au=function Z(G){const se=(0,re.randomBytes)(32,G),M=function X(G){if(G.length!==g.KS)throw new Error(`x25519: seed must be ${g.KS} bytes`);const se=new Uint8Array(G);return{publicKey:xe(se),secretKey:se}}(se);return(0,ne.wipe)(se),M},g.gi=function le(G,se,M=!1){if(G.length!==g.kz)throw new Error("X25519: incorrect secret key length");if(se.length!==g.kz)throw new Error("X25519: incorrect public key length");const p=Se(G,se);if(M){let l=0;for(let _=0;_{"use strict";D.r(g),D.d(g,{WC_V2_DEFAULT_CHAINS:()=>rv,getWalletConnectV2ProviderInstance:()=>nv});var R={};D.r(R),D.d(R,{identity:()=>Ye});var re={};D.r(re),D.d(re,{base2:()=>lt});var ne={};D.r(ne),D.d(ne,{base8:()=>dt});var ce={};D.r(ce),D.d(ce,{base10:()=>bt});var $={};D.r($),D.d($,{base16:()=>Et,base16upper:()=>yt});var ee={};D.r(ee),D.d(ee,{base36:()=>St,base36upper:()=>qr});var L={};D.r(L),D.d(L,{base64:()=>cn,base64pad:()=>Rn,base64url:()=>Kn,base64urlpad:()=>Pn});var j={};D.r(j),D.d(j,{base256emoji:()=>ir});var C={};D.r(C),D.d(C,{sha256:()=>sr,sha512:()=>or});var U={};D.r(U),D.d(U,{identity:()=>ar});var ue={};D.r(ue),D.d(ue,{code:()=>ea,decode:()=>ta,encode:()=>ln,name:()=>ur});var de={};function oe(u,t,r,o,a,f,m){try{var T=u[f](m),V=T.value}catch(q){return void r(q)}T.done?t(V):Promise.resolve(V).then(o,a)}function I(u){return function(){var t=this,r=arguments;return new Promise(function(o,a){var f=u.apply(t,r);function m(V){oe(f,o,a,m,T,"next",V)}function T(V){oe(f,o,a,m,T,"throw",V)}m(void 0)})}}D.r(de),D.d(de,{code:()=>sa,decode:()=>oa,encode:()=>An,name:()=>ia});var _e=D(93105),Se=D.n(_e),xe=D(3226),X=D(38960),Z=D(66486),le=D(52399);class G extends le.q{constructor(t){super(),this.opts=t,this.protocol="wc",this.version=2}}class M extends le.q{constructor(t,r){super(),this.core=t,this.logger=r,this.records=new Map}}class l extends le.q{constructor(t,r){super(),this.relayer=t,this.logger=r}}class _ extends le.q{constructor(t){super()}}class b extends le.q{constructor(t,r){super(),this.relayer=t,this.logger=r}}class x extends le.q{constructor(t,r){super(),this.core=t,this.logger=r}}function we(u){if("string"!=typeof u)throw new Error("Cannot safe json parse value of type "+typeof u);try{return(u=>{const r=u.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3');return JSON.parse(r,(o,a)=>"string"==typeof a&&a.match(/^\d+n$/)?BigInt(a.substring(0,a.length-1)):a)})(u)}catch{return u}}function Ce(u){return"string"==typeof u?u:(u=>JSON.stringify(u,(t,r)=>"bigint"==typeof r?r.toString()+"n":r))(u)||""}var je=D(47903),Le=D(52632),Y=D(14611);const K="base64url",wt="did",ct="key",_t="base58btc";function it(u){return null!=globalThis.Buffer?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):u}function rt(u=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?it(globalThis.Buffer.allocUnsafe(u)):new Uint8Array(u)}function Ge(u,t){t||(t=u.reduce((a,f)=>a+f.length,0));const r=rt(t);let o=0;for(const a of u)r.set(a,o),o+=a.length;return it(r)}var ze=D(91937),We=D(52141);const Ye=(0,ze.Dp)({prefix:"\0",name:"identity",encode:u=>(0,We.toString)(u),decode:u=>(0,We.fromString)(u)}),lt=(0,ze.ET)({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),dt=(0,ze.ET)({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),bt=(0,ze.kU)({prefix:"9",name:"base10",alphabet:"0123456789"}),Et=(0,ze.ET)({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),yt=(0,ze.ET)({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var Dt=D(83369);const St=(0,ze.kU)({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),qr=(0,ze.kU)({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Er=D(79382);const cn=(0,ze.ET)({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Rn=(0,ze.ET)({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Kn=(0,ze.ET)({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Pn=(0,ze.ET)({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),fn=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Wt=fn.reduce((u,t,r)=>(u[r]=t,u),[]),Gt=fn.reduce((u,t,r)=>(u[t.codePointAt(0)]=r,u),[]),ir=(0,ze.Dp)({prefix:"\u{1f680}",name:"base256emoji",encode:function Yt(u){return u.reduce((t,r)=>t+Wt[r],"")},decode:function zt(u){const t=[];for(const r of u){const o=Gt[r.codePointAt(0)];if(void 0===o)throw new Error(`Non-base256emoji character: ${r}`);t.push(o)}return new Uint8Array(t)}});var Zt=D(48375);const Qt=u=>function(){var t=I(function*(r){return new Uint8Array(yield crypto.subtle.digest(u,r))});return function(r){return t.apply(this,arguments)}}(),sr=(0,Zt.from)({name:"sha2-256",code:18,encode:Qt("SHA-256")}),or=(0,Zt.from)({name:"sha2-512",code:19,encode:Qt("SHA-512")});var kt=D(64106);const er=We.coerce,ar={code:0,name:"identity",encode:er,digest:u=>kt.create(0,er(u))},ur="raw",ea=85,ln=u=>(0,We.coerce)(u),ta=u=>(0,We.coerce)(u),ra=new TextEncoder,na=new TextDecoder,ia="json",sa=512,An=u=>ra.encode(JSON.stringify(u)),oa=u=>JSON.parse(na.decode(u));D(65260);const Ls={...R,...re,...ne,...ce,...$,...Dt,...ee,...Er,...L,...j};function ai(u,t,r,o){return{name:u,prefix:t,encoder:{name:u,prefix:t,encode:r},decoder:{decode:o}}}const Ms=ai("utf8","u",u=>"u"+new TextDecoder("utf8").decode(u),u=>(new TextEncoder).encode(u.substring(1))),es=ai("ascii","a",u=>{let t="a";for(let r=0;r{const t=rt((u=u.substring(1)).length);for(let r=0;r"u")throw new Error("missing sender public key");if(typeof u?.receiverPublicKey>"u")throw new Error("missing receiver public key")}return{type:t,senderPublicKey:u?.senderPublicKey,receiverPublicKey:u?.receiverPublicKey}}function Sc(u){return 1===u.type&&"string"==typeof u.senderPublicKey&&"string"==typeof u.receiverPublicKey}var Ad=Object.defineProperty,Ic=Object.getOwnPropertySymbols,Cd=Object.prototype.hasOwnProperty,Td=Object.prototype.propertyIsEnumerable,Oc=(u,t,r)=>t in u?Ad(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r,Rc=(u,t)=>{for(var r in t||(t={}))Cd.call(t,r)&&Oc(u,r,t[r]);if(Ic)for(var r of Ic(t))Td.call(t,r)&&Oc(u,r,t[r]);return u};const Fd="js";function Sa(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}function Ac(){return!(0,Ci.getDocument)()&&!!(0,Ci.getNavigator)()&&"ReactNative"===navigator.product}function Ia(){return!Sa()&&!!(0,Ci.getNavigator)()}function Oa(){return Ac()?"react-native":Sa()?"node":Ia()?"browser":"unknown"}function $d(u,t,r){const o=function Md(){const u=function is(u){return u?ss(u):typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new ya:typeof navigator<"u"?ss(navigator.userAgent):function fi(){return typeof process<"u"&&process.version?new da(process.version.slice(1)):null}()}();if(null===u)return"unknown";const t=u.os?u.os.replace(" ","").toLowerCase():"unknown";return"browser"===u.type?[t,u.name,u.version].join("-"):[t,u.version].join("-")}(),a=function Bd(){var u;const t=Oa();return"browser"===t?[t,(null==(u=(0,Ci.getLocation)())?void 0:u.host)||"unknown"].join(":"):t}();return[[u,t].join("-"),[Fd,r].join("-"),o,a].join("/")}function pi(u,t){return u.filter(r=>t.includes(r)).length===u.length}function Cc(u){return Object.fromEntries(u.entries())}function Tc(u){return new Map(Object.entries(u))}function Ui(u=Y.FIVE_MINUTES,t){const r=(0,Y.toMiliseconds)(u||Y.FIVE_MINUTES);let o,a,f;return{resolve:m=>{f&&o&&(clearTimeout(f),o(m))},reject:m=>{f&&a&&(clearTimeout(f),a(m))},done:()=>new Promise((m,T)=>{f=setTimeout(()=>{T(new Error(t))},r),o=m,a=T})}}function Qs(u,t,r){return new Promise(function(){var o=I(function*(a,f){const m=setTimeout(()=>f(new Error(r)),t);try{a(yield u)}catch(T){f(T)}clearTimeout(m)});return function(a,f){return o.apply(this,arguments)}}())}function Nc(u,t){if("string"==typeof t&&t.startsWith(`${u}:`))return t;if("topic"===u.toLowerCase()){if("string"!=typeof t)throw new Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===u.toLowerCase()){if("number"!=typeof t)throw new Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw new Error(`Unknown expirer target type: ${u}`)}function Uc(u){const[t,r]=u.split(":"),o={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)o.topic=r;else{if("id"!==t||!Number.isInteger(Number(r)))throw new Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);o.id=Number(r)}return o}function pn(u,t){return(0,Y.fromMiliseconds)((t||Date.now())+(0,Y.toMiliseconds)(u))}function Wn(u){return Date.now()>=(0,Y.toMiliseconds)(u)}function cr(u,t){return`${u}${t?`:${t}`:""}`}function En(u=[],t=[]){return[...new Set([...u,...t])]}function Ra(u){return u?.relay||{protocol:"irn"}}function ks(u){const t=k[u];if(typeof t>"u")throw new Error(`Relay Protocol not supported: ${u}`);return t}var Yd=Object.defineProperty,Fc=Object.getOwnPropertySymbols,qd=Object.prototype.hasOwnProperty,Xd=Object.prototype.propertyIsEnumerable,jc=(u,t,r)=>t in u?Yd(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r;function Qd(u,t="-"){const r={},o="relay"+t;return Object.keys(u).forEach(a=>{if(a.startsWith(o)){const f=a.replace(o,"");r[f]=u[a]}}),r}function Fi(u){const t=[];return u.forEach(r=>{const[o,a]=r.split(":");t.push(`${o}:${a}`)}),t}function Pa(u){return u.includes(":")}function us(u){return Pa(u)?u.split(":")[0]:u}const dp={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},pp={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function Ne(u,t){const{message:r,code:o}=pp[u];return{message:t?`${r} ${t}`:r,code:o}}function fr(u,t){const{message:r,code:o}=dp[u];return{message:t?`${r} ${t}`:r,code:o}}function ji(u,t){return!!Array.isArray(u)&&(!(typeof t<"u"&&u.length)||u.every(t))}function gi(u){return Object.getPrototypeOf(u)===Object.prototype&&Object.keys(u).length}function Ar(u){return typeof u>"u"}function vr(u,t){return!(!t||!Ar(u))||"string"==typeof u&&Boolean(u.trim().length)}function Aa(u,t){return!(!t||!Ar(u))||"number"==typeof u&&!isNaN(u)}function Ca(u){return!(!vr(u,!1)||!u.includes(":"))&&2===u.split(":").length}function $c(u){let t=!0;return ji(u)?u.length&&(t=u.every(r=>vr(r,!1))):t=!1,t}function zc(u,t){let r=null;return Object.values(u).forEach(o=>{if(r)return;const a=function Sp(u,t){let r=null;return $c(u?.methods)?$c(u?.events)||(r=fr("UNSUPPORTED_EVENTS",`${t}, events should be an array of strings or empty array for no events`)):r=fr("UNSUPPORTED_METHODS",`${t}, methods should be an array of strings or empty array for no methods`),r}(o,`${t}, namespace`);a&&(r=a)}),r}function eo(u,t){let r=null;if(u&&gi(u)){const o=zc(u,t);o&&(r=o);const a=function xp(u,t){let r=null;return Object.values(u).forEach(o=>{if(r)return;const a=function Dp(u,t){let r=null;return ji(u)?u.forEach(o=>{r||function yp(u){if(vr(u,!1)&&u.includes(":")){const t=u.split(":");if(3===t.length){const r=t[0]+":"+t[1];return!!t[2]&&Ca(r)}}return!1}(o)||(r=fr("UNSUPPORTED_ACCOUNTS",`${t}, account ${o} should be a string and conform to "namespace:chainId:address" format`))}):r=fr("UNSUPPORTED_ACCOUNTS",`${t}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),r}(o?.accounts,`${t} namespace`);a&&(r=a)}),r}(u,t);a&&(r=a)}else r=Ne("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function Hc(u){return vr(u.protocol,!0)}function Fr(u){return typeof u<"u"&&null!==typeof u}function Jc(u,t){return!(!Ca(t)||!function cp(u){const t=[];return Object.values(u).forEach(r=>{t.push(...Fi(r.accounts))}),t}(u).includes(t))}function Ta(u,t,r){let o=null;const a=function Fp(u){const t={};return Object.keys(u).forEach(r=>{var o;r.includes(":")?t[r]=u[r]:null==(o=u[r].chains)||o.forEach(a=>{t[a]={methods:u[r].methods,events:u[r].events}})}),t}(u),f=function jp(u){const t={};return Object.keys(u).forEach(r=>{r.includes(":")?t[r]=u[r]:Fi(u[r].accounts)?.forEach(a=>{t[a]={accounts:u[r].accounts.filter(f=>f.includes(`${a}:`)),methods:u[r].methods,events:u[r].events}})}),t}(t),m=Object.keys(a),T=Object.keys(f),V=Kc(Object.keys(u)),q=Kc(Object.keys(t)),ge=V.filter(Ie=>!q.includes(Ie));return ge.length&&(o=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces.\n Required: ${ge.toString()}\n Received: ${Object.keys(t).toString()}`)),pi(m,T)||(o=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces.\n Required: ${m.toString()}\n Approved: ${T.toString()}`)),Object.keys(t).forEach(Ie=>{if(!Ie.includes(":")||o)return;const Xe=Fi(t[Ie].accounts);Xe.includes(Ie)||(o=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${Ie}\n Required: ${Ie}\n Approved: ${Xe.toString()}`))}),m.forEach(Ie=>{o||(pi(a[Ie].methods,f[Ie].methods)?pi(a[Ie].events,f[Ie].events)||(o=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${Ie}`)):o=Ne("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${Ie}`))}),o}function Kc(u){return[...new Set(u.map(t=>t.includes(":")?t.split(":")[0]:t))]}var qe=D(22339);class Gn extends qe.IJsonRpcProvider{constructor(t){super(t),this.events=new _e.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(t),this.connection.connected&&this.registerEventListeners()}connect(t=this.connection){var r=this;return I(function*(){yield r.open(t)})()}disconnect(){var t=this;return I(function*(){yield t.close()})()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}request(t,r){var o=this;return I(function*(){return o.requestStrict((0,qe.formatJsonRpcRequest)(t.method,t.params||[],(0,qe.getBigIntRpcId)().toString()),r)})()}requestStrict(t,r){var o=this;return I(function*(){return new Promise(function(){var a=I(function*(f,m){if(!o.connection.connected)try{yield o.open()}catch(T){m(T)}o.events.on(`${t.id}`,T=>{(0,qe.isJsonRpcError)(T)?m(T.error):f(T.result)});try{yield o.connection.send(t,r)}catch(T){m(T)}});return function(f,m){return a.apply(this,arguments)}}())})()}setConnection(t=this.connection){return t}onPayload(t){this.events.emit("payload",t),(0,qe.isJsonRpcResponse)(t)?this.events.emit(`${t.id}`,t):this.events.emit("message",{type:t.method,data:t.params})}onClose(t){t&&3e3===t.code&&this.events.emit("error",new Error(`WebSocket connection closed abnormally with code: ${t.code} ${t.reason?`(${t.reason})`:""}`)),this.events.emit("disconnect")}open(t=this.connection){var r=this;return I(function*(){r.connection===t&&r.connection.connected||(r.connection.connected&&r.close(),"string"==typeof t&&(yield r.connection.open(t),t=r.connection),r.connection=r.setConnection(t),yield r.connection.open(),r.registerEventListeners(),r.events.emit("connect"))})()}close(){var t=this;return I(function*(){yield t.connection.close()})()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",t=>this.onPayload(t)),this.connection.on("close",t=>this.onClose(t)),this.connection.on("error",t=>this.events.emit("error",t)),this.connection.on("register_error",t=>this.onClose()),this.hasRegisteredEventListeners=!0)}}const $p=typeof global<"u"&&typeof global.WebSocket<"u"?global.WebSocket:typeof window<"u"&&typeof window.WebSocket<"u"?window.WebSocket:D(44813);var Jp=D(6856),Kp=D.n(Jp),Gp=function Vp(u,t){if(u.length>=255)throw new TypeError("Alphabet too long");for(var r=new Uint8Array(256),o=0;o>>0,Ct=new Uint8Array(dr);Be[tt];){var Pt=r[Be.charCodeAt(tt)];if(255===Pt)return;for(var vt=0,Ut=dr-1;(0!==Pt||vt>>0)%256>>>0,Pt=Pt/256>>>0;if(0!==Pt)throw new Error("Non-zero carry");Nt=vt,tt++}if(" "!==Be[tt]){for(var It=dr-Nt;It!==dr&&0===Ct[It];)It++;for(var _r=new Uint8Array(Qe+(dr-It)),Xn=Qe;It!==dr;)_r[Xn++]=Ct[It++];return _r}}}return{encode:function Ie(Be){if(Be instanceof Uint8Array||(ArrayBuffer.isView(Be)?Be=new Uint8Array(Be.buffer,Be.byteOffset,Be.byteLength):Array.isArray(Be)&&(Be=Uint8Array.from(Be))),!(Be instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(0===Be.length)return"";for(var tt=0,Qe=0,Nt=0,dr=Be.length;Nt!==dr&&0===Be[Nt];)Nt++,tt++;for(var Ct=(dr-Nt)*ge+1>>>0,Pt=new Uint8Array(Ct);Nt!==dr;){for(var vt=Be[Nt],Ut=0,It=Ct-1;(0!==vt||Ut>>0)%T>>>0,vt=vt/T>>>0;if(0!==vt)throw new Error("Non-zero carry");Qe=Ut,Nt++}for(var _r=Ct-Qe;_r!==Ct&&0===Pt[_r];)_r++;for(var Xn=V.repeat(tt);_r{if(u instanceof Uint8Array&&"Uint8Array"===u.constructor.name)return u;if(u instanceof ArrayBuffer)return new Uint8Array(u);if(ArrayBuffer.isView(u))return new Uint8Array(u.buffer,u.byteOffset,u.byteLength);throw new Error("Unknown type, must be binary type")};class Xp{constructor(t,r,o){this.name=t,this.prefix=r,this.baseEncode=o}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class Zp{constructor(t,r,o){if(this.name=t,this.prefix=r,void 0===r.codePointAt(0))throw new Error("Invalid prefix character");this.prefixCodePoint=r.codePointAt(0),this.baseDecode=o}decode(t){if("string"==typeof t){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(t){return Gc(this,t)}}class Qp{constructor(t){this.decoders=t}or(t){return Gc(this,t)}decode(t){const o=this.decoders[t[0]];if(o)return o.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}const Gc=(u,t)=>new Qp({...u.decoders||{[u.prefix]:u},...t.decoders||{[t.prefix]:t}});class kp{constructor(t,r,o,a){this.name=t,this.prefix=r,this.baseEncode=o,this.baseDecode=a,this.encoder=new Xp(t,r,o),this.decoder=new Zp(t,r,a)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}const to=({name:u,prefix:t,encode:r,decode:o})=>new kp(u,t,r,o),cs=({prefix:u,name:t,alphabet:r})=>{const{encode:o,decode:a}=Gp(r,t);return to({prefix:u,name:t,encode:o,decode:f=>Wc(a(f))})},Dr=({name:u,prefix:t,bitsPerChar:r,alphabet:o})=>to({prefix:t,name:u,encode:a=>((u,t,r)=>{const o="="===t[t.length-1],a=(1<r;)m-=r,f+=t[a&T>>m];if(m&&(f+=t[a&T<((u,t,r,o)=>{const a={};for(let ge=0;ge=8&&(T-=8,m[q++]=255&V>>T)}if(T>=r||255&V<<8-T)throw new SyntaxError("Unexpected end of data");return m})(a,o,r,u)}),rg=to({prefix:"\0",name:"identity",encode:u=>(u=>(new TextDecoder).decode(u))(u),decode:u=>(u=>(new TextEncoder).encode(u))(u)});var ng=Object.freeze({__proto__:null,identity:rg});const ig=Dr({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1});var sg=Object.freeze({__proto__:null,base2:ig});const og=Dr({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3});var ag=Object.freeze({__proto__:null,base8:og});const ug=cs({prefix:"9",name:"base10",alphabet:"0123456789"});var cg=Object.freeze({__proto__:null,base10:ug});const fg=Dr({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),lg=Dr({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4});var hg=Object.freeze({__proto__:null,base16:fg,base16upper:lg});const dg=Dr({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),pg=Dr({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),gg=Dr({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),yg=Dr({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),vg=Dr({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),mg=Dr({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),_g=Dr({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),bg=Dr({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),Eg=Dr({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5});var wg=Object.freeze({__proto__:null,base32:dg,base32upper:pg,base32pad:gg,base32padupper:yg,base32hex:vg,base32hexupper:mg,base32hexpad:_g,base32hexpadupper:bg,base32z:Eg});const Dg=cs({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),xg=cs({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"});var Sg=Object.freeze({__proto__:null,base36:Dg,base36upper:xg});const Ig=cs({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),Og=cs({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var Rg=Object.freeze({__proto__:null,base58btc:Ig,base58flickr:Og});const Pg=Dr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),Ag=Dr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),Cg=Dr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),Tg=Dr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});var Ng=Object.freeze({__proto__:null,base64:Pg,base64pad:Ag,base64url:Cg,base64urlpad:Tg});const Yc=Array.from("\u{1f680}\u{1fa90}\u2604\u{1f6f0}\u{1f30c}\u{1f311}\u{1f312}\u{1f313}\u{1f314}\u{1f315}\u{1f316}\u{1f317}\u{1f318}\u{1f30d}\u{1f30f}\u{1f30e}\u{1f409}\u2600\u{1f4bb}\u{1f5a5}\u{1f4be}\u{1f4bf}\u{1f602}\u2764\u{1f60d}\u{1f923}\u{1f60a}\u{1f64f}\u{1f495}\u{1f62d}\u{1f618}\u{1f44d}\u{1f605}\u{1f44f}\u{1f601}\u{1f525}\u{1f970}\u{1f494}\u{1f496}\u{1f499}\u{1f622}\u{1f914}\u{1f606}\u{1f644}\u{1f4aa}\u{1f609}\u263a\u{1f44c}\u{1f917}\u{1f49c}\u{1f614}\u{1f60e}\u{1f607}\u{1f339}\u{1f926}\u{1f389}\u{1f49e}\u270c\u2728\u{1f937}\u{1f631}\u{1f60c}\u{1f338}\u{1f64c}\u{1f60b}\u{1f497}\u{1f49a}\u{1f60f}\u{1f49b}\u{1f642}\u{1f493}\u{1f929}\u{1f604}\u{1f600}\u{1f5a4}\u{1f603}\u{1f4af}\u{1f648}\u{1f447}\u{1f3b6}\u{1f612}\u{1f92d}\u2763\u{1f61c}\u{1f48b}\u{1f440}\u{1f62a}\u{1f611}\u{1f4a5}\u{1f64b}\u{1f61e}\u{1f629}\u{1f621}\u{1f92a}\u{1f44a}\u{1f973}\u{1f625}\u{1f924}\u{1f449}\u{1f483}\u{1f633}\u270b\u{1f61a}\u{1f61d}\u{1f634}\u{1f31f}\u{1f62c}\u{1f643}\u{1f340}\u{1f337}\u{1f63b}\u{1f613}\u2b50\u2705\u{1f97a}\u{1f308}\u{1f608}\u{1f918}\u{1f4a6}\u2714\u{1f623}\u{1f3c3}\u{1f490}\u2639\u{1f38a}\u{1f498}\u{1f620}\u261d\u{1f615}\u{1f33a}\u{1f382}\u{1f33b}\u{1f610}\u{1f595}\u{1f49d}\u{1f64a}\u{1f639}\u{1f5e3}\u{1f4ab}\u{1f480}\u{1f451}\u{1f3b5}\u{1f91e}\u{1f61b}\u{1f534}\u{1f624}\u{1f33c}\u{1f62b}\u26bd\u{1f919}\u2615\u{1f3c6}\u{1f92b}\u{1f448}\u{1f62e}\u{1f646}\u{1f37b}\u{1f343}\u{1f436}\u{1f481}\u{1f632}\u{1f33f}\u{1f9e1}\u{1f381}\u26a1\u{1f31e}\u{1f388}\u274c\u270a\u{1f44b}\u{1f630}\u{1f928}\u{1f636}\u{1f91d}\u{1f6b6}\u{1f4b0}\u{1f353}\u{1f4a2}\u{1f91f}\u{1f641}\u{1f6a8}\u{1f4a8}\u{1f92c}\u2708\u{1f380}\u{1f37a}\u{1f913}\u{1f619}\u{1f49f}\u{1f331}\u{1f616}\u{1f476}\u{1f974}\u25b6\u27a1\u2753\u{1f48e}\u{1f4b8}\u2b07\u{1f628}\u{1f31a}\u{1f98b}\u{1f637}\u{1f57a}\u26a0\u{1f645}\u{1f61f}\u{1f635}\u{1f44e}\u{1f932}\u{1f920}\u{1f927}\u{1f4cc}\u{1f535}\u{1f485}\u{1f9d0}\u{1f43e}\u{1f352}\u{1f617}\u{1f911}\u{1f30a}\u{1f92f}\u{1f437}\u260e\u{1f4a7}\u{1f62f}\u{1f486}\u{1f446}\u{1f3a4}\u{1f647}\u{1f351}\u2744\u{1f334}\u{1f4a3}\u{1f438}\u{1f48c}\u{1f4cd}\u{1f940}\u{1f922}\u{1f445}\u{1f4a1}\u{1f4a9}\u{1f450}\u{1f4f8}\u{1f47b}\u{1f910}\u{1f92e}\u{1f3bc}\u{1f975}\u{1f6a9}\u{1f34e}\u{1f34a}\u{1f47c}\u{1f48d}\u{1f4e3}\u{1f942}"),Ug=Yc.reduce((u,t,r)=>(u[r]=t,u),[]),Fg=Yc.reduce((u,t,r)=>(u[t.codePointAt(0)]=r,u),[]),Mg=to({prefix:"\u{1f680}",name:"base256emoji",encode:function jg(u){return u.reduce((t,r)=>t+Ug[r],"")},decode:function Lg(u){const t=[];for(const r of u){const o=Fg[r.codePointAt(0)];if(void 0===o)throw new Error(`Non-base256emoji character: ${r}`);t.push(o)}return new Uint8Array(t)}});var Bg=Object.freeze({__proto__:null,base256emoji:Mg}),Jg=Math.pow(2,31),Wg=Math.pow(2,7),Gg=Math.pow(2,14),Yg=Math.pow(2,21),qg=Math.pow(2,28),Xg=Math.pow(2,35),Zg=Math.pow(2,42),Qg=Math.pow(2,49),kg=Math.pow(2,56),e0=Math.pow(2,63),r0={encode:function Xc(u,t,r){t=t||[];for(var o=r=r||0;u>=Jg;)t[r++]=255&u|128,u/=128;for(;-128&u;)t[r++]=255&u|128,u>>>=7;return t[r]=0|u,Xc.bytes=r-o+1,t},decode:function Na(u,o){var m,r=0,a=0,f=o=o||0,T=u.length;do{if(f>=T)throw Na.bytes=0,new RangeError("Could not decode varint");m=u[f++],r+=a<28?(127&m)<=128);return Na.bytes=f-o,r},encodingLength:function(u){return u(Qc.encode(u,t,r),t),ef=u=>Qc.encodingLength(u),Ua=(u,t)=>{const r=t.byteLength,o=ef(u),a=o+ef(r),f=new Uint8Array(a+r);return kc(u,f,0),kc(r,f,o),f.set(t,a),new n0(u,r,t,f)};class n0{constructor(t,r,o,a){this.code=t,this.size=r,this.digest=o,this.bytes=a}}const tf=({name:u,code:t,encode:r})=>new i0(u,t,r);class i0{constructor(t,r,o){this.name=t,this.code=r,this.encode=o}digest(t){if(t instanceof Uint8Array){const r=this.encode(t);return r instanceof Uint8Array?Ua(this.code,r):r.then(o=>Ua(this.code,o))}throw Error("Unknown type, must be binary type")}}const rf=u=>function(){var t=I(function*(r){return new Uint8Array(yield crypto.subtle.digest(u,r))});return function(r){return t.apply(this,arguments)}}(),s0=tf({name:"sha2-256",code:18,encode:rf("SHA-256")}),o0=tf({name:"sha2-512",code:19,encode:rf("SHA-512")});Object.freeze({__proto__:null,sha256:s0,sha512:o0});const sf=Wc;Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:sf,digest:u=>Ua(0,sf(u))}}),new TextEncoder,new TextDecoder;const of={...ng,...sg,...ag,...cg,...hg,...wg,...Sg,...Rg,...Ng,...Bg};function af(u){return null!=globalThis.Buffer?new Uint8Array(u.buffer,u.byteOffset,u.byteLength):u}function uf(u,t,r,o){return{name:u,prefix:t,encoder:{name:u,prefix:t,encode:r},decoder:{decode:o}}}const cf=uf("utf8","u",u=>"u"+new TextDecoder("utf8").decode(u),u=>(new TextEncoder).encode(u.substring(1))),Fa=uf("ascii","a",u=>{let t="a";for(let r=0;r{const t=function f0(u=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?af(globalThis.Buffer.allocUnsafe(u)):new Uint8Array(u)}((u=u.substring(1)).length);for(let r=0;r(this.isInitialized(),this.keychain.has(a)),this.set=function(){var a=I(function*(f,m){o.isInitialized(),o.keychain.set(f,m),yield o.persist()});return function(f,m){return a.apply(this,arguments)}}(),this.get=a=>{this.isInitialized();const f=this.keychain.get(a);if(typeof f>"u"){const{message:m}=Ne("NO_MATCHING_KEY",`${this.name}: ${a}`);throw new Error(m)}return f},this.del=function(){var a=I(function*(f){o.isInitialized(),o.keychain.delete(f),yield o.persist()});return function(f){return a.apply(this,arguments)}}(),this.core=t,this.logger=(0,Z.generateChildLogger)(r,this.name)}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setKeyChain(t){var r=this;return I(function*(){yield r.core.storage.setItem(r.storageKey,Cc(t))})()}getKeyChain(){var t=this;return I(function*(){const r=yield t.core.storage.getItem(t.storageKey);return typeof r<"u"?Tc(r):void 0})()}persist(){var t=this;return I(function*(){yield t.setKeyChain(t.keychain)})()}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}}class $0{constructor(t,r,o){var a=this;this.core=t,this.logger=r,this.name="crypto",this.initialized=!1,this.init=I(function*(){a.initialized||(yield a.keychain.init(),a.initialized=!0)}),this.hasKeys=f=>(this.isInitialized(),this.keychain.has(f)),this.getClientId=I(function*(){return a.isInitialized(),$s(Hs(yield a.getClientSeed()).publicKey)}),this.generateKeyPair=()=>{this.isInitialized();const f=function wd(){const u=Js.Au();return{privateKey:wr(u.secretKey,Pr),publicKey:wr(u.publicKey,Pr)}}();return this.setPrivateKey(f.publicKey,f.privateKey)},this.signJWT=function(){var f=I(function*(m){a.isInitialized();const V=Hs(yield a.getClientSeed()),q=Da();return yield function fa(u,t,r,o){return Pi.apply(this,arguments)}(q,m,v0,V)});return function(m){return f.apply(this,arguments)}}(),this.generateSharedKey=(f,m,T)=>{this.isInitialized();const q=function Dd(u,t){const r=Js.gi(Ir(u,Pr),Ir(t,Pr));return wr(new Vn.t(ns.mE,r).expand(32),Pr)}(this.getPrivateKey(f),m);return this.setSymKey(q,T)},this.setSymKey=function(){var f=I(function*(m,T){a.isInitialized();const V=T||function xd(u){return wr((0,ns.vp)(Ir(u,Pr)),Pr)}(m);return yield a.keychain.set(V,m),V});return function(m,T){return f.apply(this,arguments)}}(),this.deleteKeyPair=function(){var f=I(function*(m){a.isInitialized(),yield a.keychain.del(m)});return function(m){return f.apply(this,arguments)}}(),this.deleteSymKey=function(){var f=I(function*(m){a.isInitialized(),yield a.keychain.del(m)});return function(m){return f.apply(this,arguments)}}(),this.encode=function(){var f=I(function*(m,T,V){a.isInitialized();const q=xc(V),ge=Ce(T);if(Sc(q)){const Be=q.senderPublicKey,tt=q.receiverPublicKey;m=yield a.generateSharedKey(Be,tt)}const Ie=a.getSymKey(m),{type:Xe,senderPublicKey:xt}=q;return function Id(u){const t=function Sd(u){return Ir(`${u}`,"base10")}(typeof u.type<"u"?u.type:0);if(1===as(t)&&typeof u.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");const r=typeof u.senderPublicKey<"u"?Ir(u.senderPublicKey,Pr):void 0,o=typeof u.iv<"u"?Ir(u.iv,Pr):(0,Le.randomBytes)(12);return function Rd(u){if(1===as(u.type)){if(typeof u.senderPublicKey>"u")throw new Error("Missing sender public key for type 1 envelope");return wr(Ge([u.type,u.senderPublicKey,u.iv,u.sealed]),_a)}return wr(Ge([u.type,u.iv,u.sealed]),_a)}({type:t,sealed:new ci.OK(Ir(u.symKey,Pr)).seal(o,Ir(u.message,ba)),iv:o,senderPublicKey:r})}({type:Xe,symKey:Ie,message:ge,senderPublicKey:xt})});return function(m,T,V){return f.apply(this,arguments)}}(),this.decode=function(){var f=I(function*(m,T,V){a.isInitialized();const q=function Pd(u,t){const r=Zs(u);return xc({type:as(r.type),senderPublicKey:typeof r.senderPublicKey<"u"?wr(r.senderPublicKey,Pr):void 0,receiverPublicKey:t?.receiverPublicKey})}(T,V);if(Sc(q)){const Xe=q.receiverPublicKey,xt=q.senderPublicKey;m=yield a.generateSharedKey(Xe,xt)}const Ie=function Od(u){const t=new ci.OK(Ir(u.symKey,Pr)),{sealed:r,iv:o}=Zs(u.encoded),a=t.open(o,r);if(null===a)throw new Error("Failed to decrypt");return wr(a,ba)}({symKey:a.getSymKey(m),encoded:T});return we(Ie)});return function(m,T,V){return f.apply(this,arguments)}}(),this.getPayloadType=f=>as(Zs(f).type),this.getPayloadSenderPublicKey=f=>{const m=Zs(f);return m.senderPublicKey?wr(m.senderPublicKey,Pr):void 0},this.core=t,this.logger=(0,Z.generateChildLogger)(r,this.name),this.keychain=o||new B0(this.core,this.logger)}get context(){return(0,Z.getLoggerContext)(this.logger)}setPrivateKey(t,r){var o=this;return I(function*(){return yield o.keychain.set(t,r),t})()}getPrivateKey(t){return this.keychain.get(t)}getClientSeed(){var t=this;return I(function*(){let r="";try{r=t.keychain.get(lf)}catch{r=Da(),yield t.keychain.set(lf,r)}return function h0(u,t="utf8"){const r=l0[t];if(!r)throw new Error(`Unsupported encoding "${t}"`);return"utf8"!==t&&"utf-8"!==t||null==globalThis.Buffer||null==globalThis.Buffer.from?r.decoder.decode(`${r.prefix}${u}`):af(globalThis.Buffer.from(u,"utf-8"))}(r,"base16")})()}getSymKey(t){return this.keychain.get(t)}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}}class z0 extends class p{constructor(t,r){this.logger=t,this.core=r}}{constructor(t,r){var o;super(t,r),o=this,this.logger=t,this.core=r,this.messages=new Map,this.name="messages",this.version="0.3",this.initialized=!1,this.storagePrefix=Yn,this.init=I(function*(){if(!o.initialized){o.logger.trace("Initialized");try{const a=yield o.getRelayerMessages();typeof a<"u"&&(o.messages=a),o.logger.debug(`Successfully Restored records for ${o.name}`),o.logger.trace({type:"method",method:"restore",size:o.messages.size})}catch(a){o.logger.debug(`Failed to Restore records for ${o.name}`),o.logger.error(a)}finally{o.initialized=!0}}}),this.set=function(){var a=I(function*(f,m){o.isInitialized();const T=hi(m);let V=o.messages.get(f);return typeof V>"u"&&(V={}),typeof V[T]<"u"||(V[T]=m,o.messages.set(f,V),yield o.persist()),T});return function(f,m){return a.apply(this,arguments)}}(),this.get=a=>{this.isInitialized();let f=this.messages.get(a);return typeof f>"u"&&(f={}),f},this.has=(a,f)=>(this.isInitialized(),typeof this.get(a)[hi(f)]<"u"),this.del=function(){var a=I(function*(f){o.isInitialized(),o.messages.delete(f),yield o.persist()});return function(f){return a.apply(this,arguments)}}(),this.logger=(0,Z.generateChildLogger)(t,this.name),this.core=r}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}setRelayerMessages(t){var r=this;return I(function*(){yield r.core.storage.setItem(r.storageKey,Cc(t))})()}getRelayerMessages(){var t=this;return I(function*(){const r=yield t.core.storage.getItem(t.storageKey);return typeof r<"u"?Tc(r):void 0})()}persist(){var t=this;return I(function*(){yield t.setRelayerMessages(t.messages)})()}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}}class H0 extends l{constructor(t,r){var o;super(t,r),o=this,this.relayer=t,this.logger=r,this.events=new _e.EventEmitter,this.name="publisher",this.queue=new Map,this.publishTimeout=1e4,this.publish=function(){var a=I(function*(f,m,T){o.logger.debug("Publishing Payload"),o.logger.trace({type:"method",method:"publish",params:{topic:f,message:m,opts:T}});try{const V=T?.ttl||w0,q=Ra(T),ge=T?.prompt||!1,Ie=T?.tag||0,Xe={topic:f,message:m,opts:{ttl:V,relay:q,prompt:ge,tag:Ie}},xt=hi(m);o.queue.set(xt,Xe);try{yield yield Qs(o.rpcPublish(f,m,V,q,ge,Ie),o.publishTimeout),o.relayer.events.emit("relayer_publish",Xe)}catch{return o.logger.debug("Publishing Payload stalled"),void o.relayer.events.emit("relayer_connection_stalled")}o.onPublish(xt,Xe),o.logger.debug("Successfully Published Payload"),o.logger.trace({type:"method",method:"publish",params:{topic:f,message:m,opts:T}})}catch(V){throw o.logger.debug("Failed to Publish Payload"),o.logger.error(V),V}});return function(f,m,T){return a.apply(this,arguments)}}(),this.on=(a,f)=>{this.events.on(a,f)},this.once=(a,f)=>{this.events.once(a,f)},this.off=(a,f)=>{this.events.off(a,f)},this.removeListener=(a,f)=>{this.events.removeListener(a,f)},this.relayer=t,this.logger=(0,Z.generateChildLogger)(r,this.name),this.registerEventListeners()}get context(){return(0,Z.getLoggerContext)(this.logger)}rpcPublish(t,r,o,a,f,m){var T,V,q,ge;const Ie={method:ks(a.protocol).publish,params:{topic:t,message:r,ttl:o,prompt:f,tag:m}};return Ar(null==(T=Ie.params)?void 0:T.prompt)&&(null==(V=Ie.params)||delete V.prompt),Ar(null==(q=Ie.params)?void 0:q.tag)&&(null==(ge=Ie.params)||delete ge.tag),this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:Ie}),this.relayer.request(Ie)}onPublish(t,r){this.queue.delete(t)}checkQueue(){var t=this;this.queue.forEach(function(){var r=I(function*(o){const{topic:a,message:f,opts:m}=o;yield t.publish(a,f,m)});return function(o){return r.apply(this,arguments)}}())}registerEventListeners(){this.relayer.core.heartbeat.on(X.HEARTBEAT_EVENTS.pulse,()=>{this.checkQueue()})}}class J0{constructor(){this.map=new Map,this.set=(t,r)=>{const o=this.get(t);this.exists(t,r)||this.map.set(t,[...o,r])},this.get=t=>this.map.get(t)||[],this.exists=(t,r)=>this.get(t).includes(r),this.delete=(t,r)=>{if(typeof r>"u")return void this.map.delete(t);if(!this.map.has(t))return;const o=this.get(t);if(!this.exists(t,r))return;const a=o.filter(f=>f!==r);a.length?this.map.set(t,a):this.map.delete(t)},this.clear=()=>{this.map.clear()}}get topics(){return Array.from(this.map.keys())}}var K0=Object.defineProperty,V0=Object.defineProperties,W0=Object.getOwnPropertyDescriptors,yf=Object.getOwnPropertySymbols,G0=Object.prototype.hasOwnProperty,Y0=Object.prototype.propertyIsEnumerable,vf=(u,t,r)=>t in u?K0(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r,hs=(u,t)=>{for(var r in t||(t={}))G0.call(t,r)&&vf(u,r,t[r]);if(yf)for(var r of yf(t))Y0.call(t,r)&&vf(u,r,t[r]);return u},La=(u,t)=>V0(u,W0(t));class q0 extends b{constructor(t,r){var o;super(t,r),o=this,this.relayer=t,this.logger=r,this.subscriptions=new Map,this.topicMap=new J0,this.events=new _e.EventEmitter,this.name="subscription",this.version="0.3",this.pending=new Map,this.cached=[],this.initialized=!1,this.pendingSubscriptionWatchLabel="pending_sub_watch_label",this.pollingInterval=20,this.storagePrefix=Yn,this.subscribeTimeout=1e4,this.restartInProgress=!1,this.batchSubscribeTopicsLimit=500,this.init=I(function*(){o.initialized||(o.logger.trace("Initialized"),yield o.restart(),o.registerEventListeners(),o.onEnable(),o.clientId=yield o.relayer.core.crypto.getClientId())}),this.subscribe=function(){var a=I(function*(f,m){yield o.restartToComplete(),o.isInitialized(),o.logger.debug("Subscribing Topic"),o.logger.trace({type:"method",method:"subscribe",params:{topic:f,opts:m}});try{const T=Ra(m),V={topic:f,relay:T};o.pending.set(f,V);const q=yield o.rpcSubscribe(f,T);return o.onSubscribe(q,V),o.logger.debug("Successfully Subscribed Topic"),o.logger.trace({type:"method",method:"subscribe",params:{topic:f,opts:m}}),q}catch(T){throw o.logger.debug("Failed to Subscribe Topic"),o.logger.error(T),T}});return function(f,m){return a.apply(this,arguments)}}(),this.unsubscribe=function(){var a=I(function*(f,m){yield o.restartToComplete(),o.isInitialized(),typeof m?.id<"u"?yield o.unsubscribeById(f,m.id,m):yield o.unsubscribeByTopic(f,m)});return function(f,m){return a.apply(this,arguments)}}(),this.isSubscribed=function(){var a=I(function*(f){return!!o.topics.includes(f)||(yield new Promise((m,T)=>{const V=new Y.Watch;V.start(o.pendingSubscriptionWatchLabel);const q=setInterval(()=>{!o.pending.has(f)&&o.topics.includes(f)&&(clearInterval(q),V.stop(o.pendingSubscriptionWatchLabel),m(!0)),V.elapsed(o.pendingSubscriptionWatchLabel)>=T0&&(clearInterval(q),V.stop(o.pendingSubscriptionWatchLabel),T(!1))},o.pollingInterval)}))});return function(f){return a.apply(this,arguments)}}(),this.on=(a,f)=>{this.events.on(a,f)},this.once=(a,f)=>{this.events.once(a,f)},this.off=(a,f)=>{this.events.off(a,f)},this.removeListener=(a,f)=>{this.events.removeListener(a,f)},this.restart=I(function*(){o.restartInProgress=!0,yield o.restore(),yield o.reset(),o.restartInProgress=!1}),this.relayer=t,this.logger=(0,Z.generateChildLogger)(r,this.name),this.clientId=""}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}hasSubscription(t,r){let o=!1;try{o=this.getSubscription(t).topic===r}catch{}return o}onEnable(){this.cached=[],this.initialized=!0}onDisable(){this.cached=this.values,this.subscriptions.clear(),this.topicMap.clear()}unsubscribeByTopic(t,r){var o=this;return I(function*(){const a=o.topicMap.get(t);yield Promise.all(a.map(function(){var f=I(function*(m){return yield o.unsubscribeById(t,m,r)});return function(m){return f.apply(this,arguments)}}()))})()}unsubscribeById(t,r,o){var a=this;return I(function*(){a.logger.debug("Unsubscribing Topic"),a.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:o}});try{const f=Ra(o);yield a.rpcUnsubscribe(t,r,f);const m=fr("USER_DISCONNECTED",`${a.name}, ${t}`);yield a.onUnsubscribe(t,r,m),a.logger.debug("Successfully Unsubscribed Topic"),a.logger.trace({type:"method",method:"unsubscribe",params:{topic:t,id:r,opts:o}})}catch(f){throw a.logger.debug("Failed to Unsubscribe Topic"),a.logger.error(f),f}})()}rpcSubscribe(t,r){var o=this;return I(function*(){const a={method:ks(r.protocol).subscribe,params:{topic:t}};o.logger.debug("Outgoing Relay Payload"),o.logger.trace({type:"payload",direction:"outgoing",request:a});try{yield yield Qs(o.relayer.request(a),o.subscribeTimeout)}catch{o.logger.debug("Outgoing Relay Subscribe Payload stalled"),o.relayer.events.emit("relayer_connection_stalled")}return hi(t+o.clientId)})()}rpcBatchSubscribe(t){var r=this;return I(function*(){if(!t.length)return;const a={method:ks(t[0].relay.protocol).batchSubscribe,params:{topics:t.map(f=>f.topic)}};r.logger.debug("Outgoing Relay Payload"),r.logger.trace({type:"payload",direction:"outgoing",request:a});try{return yield yield Qs(r.relayer.request(a),r.subscribeTimeout)}catch{r.logger.debug("Outgoing Relay Payload stalled"),r.relayer.events.emit("relayer_connection_stalled")}})()}rpcUnsubscribe(t,r,o){const a={method:ks(o.protocol).unsubscribe,params:{topic:t,id:r}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:a}),this.relayer.request(a)}onSubscribe(t,r){this.setSubscription(t,La(hs({},r),{id:t})),this.pending.delete(r.topic)}onBatchSubscribe(t){t.length&&t.forEach(r=>{this.setSubscription(r.id,hs({},r)),this.pending.delete(r.topic)})}onUnsubscribe(t,r,o){var a=this;return I(function*(){a.events.removeAllListeners(r),a.hasSubscription(r,t)&&a.deleteSubscription(r,o),yield a.relayer.messages.del(t)})()}setRelayerSubscriptions(t){var r=this;return I(function*(){yield r.relayer.core.storage.setItem(r.storageKey,t)})()}getRelayerSubscriptions(){var t=this;return I(function*(){return yield t.relayer.core.storage.getItem(t.storageKey)})()}setSubscription(t,r){this.subscriptions.has(t)||(this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:t,subscription:r}),this.addSubscription(t,r))}addSubscription(t,r){this.subscriptions.set(t,hs({},r)),this.topicMap.set(r.topic,t),this.events.emit(wn_created,r)}getSubscription(t){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:t});const r=this.subscriptions.get(t);if(!r){const{message:o}=Ne("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(o)}return r}deleteSubscription(t,r){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:t,reason:r});const o=this.getSubscription(t);this.subscriptions.delete(t),this.topicMap.delete(o.topic,t),this.events.emit(wn_deleted,La(hs({},o),{reason:r}))}persist(){var t=this;return I(function*(){yield t.setRelayerSubscriptions(t.values),t.events.emit("subscription_sync")})()}reset(){var t=this;return I(function*(){if(t.cached.length){const r=Math.ceil(t.cached.length/t.batchSubscribeTopicsLimit);for(let o=0;o"u"||!r.length)return;if(t.subscriptions.size){const{message:o}=Ne("RESTORE_WILL_OVERRIDE",t.name);throw t.logger.error(o),t.logger.error(`${t.name}: ${JSON.stringify(t.values)}`),new Error(o)}t.cached=r,t.logger.debug(`Successfully Restored subscriptions for ${t.name}`),t.logger.trace({type:"method",method:"restore",subscriptions:t.values})}catch(r){t.logger.debug(`Failed to Restore subscriptions for ${t.name}`),t.logger.error(r)}})()}batchSubscribe(t){var r=this;return I(function*(){if(!t.length)return;const o=yield r.rpcBatchSubscribe(t);ji(o)&&r.onBatchSubscribe(o.map((a,f)=>La(hs({},t[f]),{id:a})))})()}onConnect(){var t=this;return I(function*(){t.restartInProgress||(yield t.restart(),t.onEnable())})()}onDisconnect(){this.onDisable()}checkPending(){var t=this;return I(function*(){if(t.relayer.transportExplicitlyClosed)return;const r=[];t.pending.forEach(o=>{r.push(o)}),yield t.batchSubscribe(r)})()}registerEventListeners(){var t=this;this.relayer.core.heartbeat.on(X.HEARTBEAT_EVENTS.pulse,I(function*(){yield t.checkPending()})),this.relayer.on("relayer_connect",I(function*(){yield t.onConnect()})),this.relayer.on("relayer_disconnect",()=>{this.onDisconnect()}),this.events.on(wn_created,function(){var r=I(function*(o){const a=wn_created;t.logger.info(`Emitting ${a}`),t.logger.debug({type:"event",event:a,data:o}),yield t.persist()});return function(o){return r.apply(this,arguments)}}()),this.events.on(wn_deleted,function(){var r=I(function*(o){const a=wn_deleted;t.logger.info(`Emitting ${a}`),t.logger.debug({type:"event",event:a,data:o}),yield t.persist()});return function(o){return r.apply(this,arguments)}}())}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}restartToComplete(){var t=this;return I(function*(){t.restartInProgress&&(yield new Promise(r=>{const o=setInterval(()=>{t.restartInProgress||(clearInterval(o),r())},t.pollingInterval)}))})()}}var X0=Object.defineProperty,mf=Object.getOwnPropertySymbols,Z0=Object.prototype.hasOwnProperty,Q0=Object.prototype.propertyIsEnumerable,_f=(u,t,r)=>t in u?X0(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r;class ey extends _{constructor(t){var r;super(t),r=this,this.protocol="wc",this.version=2,this.events=new _e.EventEmitter,this.name="relayer",this.transportExplicitlyClosed=!1,this.initialized=!1,this.reconnecting=!1,this.connectionStatusPollingInterval=20,this.staleConnectionErrors=["socket hang up","socket stalled"],this.request=function(){var o=I(function*(a){r.logger.debug("Publishing Request Payload");try{return yield r.toEstablishConnection(),yield r.provider.request(a)}catch(f){throw r.logger.debug("Failed to Publish Request"),r.logger.error(f),f}});return function(a){return o.apply(this,arguments)}}(),this.core=t.core,this.logger=typeof t.logger<"u"&&"string"!=typeof t.logger?(0,Z.generateChildLogger)(t.logger,this.name):(0,Z.pino)((0,Z.getDefaultLoggerOptions)({level:t.logger||"error"})),this.messages=new z0(this.logger,t.core),this.subscriber=new q0(this,this.logger),this.publisher=new H0(this,this.logger),this.relayUrl=t?.relayUrl||df,this.projectId=t.projectId,this.provider={}}init(){var t=this;return I(function*(){t.logger.trace("Initialized"),yield t.createProvider(),yield Promise.all([t.messages.init(),t.transportOpen(),t.subscriber.init()]),t.registerEventListeners(),t.initialized=!0})()}get context(){return(0,Z.getLoggerContext)(this.logger)}get connected(){return this.provider.connection.connected}get connecting(){return this.provider.connection.connecting}publish(t,r,o){var a=this;return I(function*(){a.isInitialized(),yield a.publisher.publish(t,r,o),yield a.recordMessageEvent({topic:t,message:r,publishedAt:Date.now()})})()}subscribe(t,r){var o=this;return I(function*(){o.isInitialized();let a="";return yield Promise.all([new Promise(f=>{o.subscriber.once(wn_created,m=>{m.topic===t&&f()})}),new Promise(function(){var f=I(function*(m){a=yield o.subscriber.subscribe(t,r),m()});return function(m){return f.apply(this,arguments)}}())]),a})()}unsubscribe(t,r){var o=this;return I(function*(){o.isInitialized(),yield o.subscriber.unsubscribe(t,r)})()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}transportClose(){var t=this;return I(function*(){t.transportExplicitlyClosed=!0,t.connected&&(yield t.provider.disconnect(),t.events.emit("relayer_transport_closed"))})()}transportOpen(t){var r=this;return I(function*(){if(r.transportExplicitlyClosed=!1,!r.reconnecting){r.relayUrl=t||r.relayUrl,r.reconnecting=!0;try{yield Promise.all([new Promise(o=>{r.initialized||o(),r.subscriber.once("subscription_resubscribed",()=>{o()})}),yield Promise.race([new Promise(function(){var o=I(function*(a,f){yield Qs(r.provider.connect(),5e3,"socket stalled").catch(m=>f(m)).then(()=>a()).finally(()=>r.removeListener("relayer_transport_closed",r.rejectTransportOpen))});return function(a,f){return o.apply(this,arguments)}}()),new Promise(o=>r.once("relayer_transport_closed",r.rejectTransportOpen))])])}catch(o){if(r.logger.error(o),!r.isConnectionStalled(o.message))throw o;r.events.emit("relayer_transport_closed")}finally{r.reconnecting=!1}}})()}restartTransport(t){var r=this;return I(function*(){r.transportExplicitlyClosed||(r.relayUrl=t||r.relayUrl,r.connected&&(yield Promise.all([new Promise(o=>{r.provider.once("disconnect",()=>{o()})}),r.transportClose()])),yield r.createProvider(),yield r.transportOpen())})()}isConnectionStalled(t){return this.staleConnectionErrors.some(r=>t.includes(r))}rejectTransportOpen(){throw new Error("closeTransport called before connection was established")}createProvider(){var t=this;return I(function*(){const r=yield t.core.crypto.signJWT(t.relayUrl);t.provider=new Gn(new class zp{constructor(t){if(this.url=t,this.events=new _e.EventEmitter,this.registering=!1,!(0,qe.isWsUrl)(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);this.url=t}get connected(){return typeof this.socket<"u"}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}open(t=this.url){var r=this;return I(function*(){yield r.register(t)})()}close(){var t=this;return I(function*(){return new Promise((r,o)=>{typeof t.socket>"u"?o(new Error("Connection already closed")):(t.socket.onclose=a=>{t.onClose(a),r()},t.socket.close())})})()}send(t,r){var o=this;return I(function*(){typeof o.socket>"u"&&(o.socket=yield o.register());try{o.socket.send(Ce(t))}catch(a){o.onError(t.id,a)}})()}register(t=this.url){if(!(0,qe.isWsUrl)(t))throw new Error(`Provided URL is not compatible with WebSocket connection: ${t}`);if(this.registering){const r=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=r||this.events.listenerCount("open")>=r)&&this.events.setMaxListeners(r+1),new Promise((o,a)=>{this.events.once("register_error",f=>{this.resetMaxListeners(),a(f)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return a(new Error("WebSocket connection is missing or invalid"));o(this.socket)})})}return this.url=t,this.registering=!0,new Promise((r,o)=>{const a=(0,qe.isReactNative)()?void 0:{rejectUnauthorized:!(0,qe.isLocalhostUrl)(t)},f=new $p(t,[],a);typeof window<"u"?f.onerror=m=>{o(this.emitError(m.error))}:f.on("error",m=>{o(this.emitError(m))}),f.onopen=()=>{this.onOpen(f),r(f)}})}onOpen(t){t.onmessage=r=>this.onPayload(r),t.onclose=r=>this.onClose(r),this.socket=t,this.registering=!1,this.events.emit("open")}onClose(t){this.socket=void 0,this.registering=!1,this.events.emit("close",t)}onPayload(t){if(typeof t.data>"u")return;const r="string"==typeof t.data?we(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const o=this.parseError(r),a=o.message||o.toString(),f=(0,qe.formatJsonRpcError)(t,a);this.events.emit("payload",f)}parseError(t,r=this.url){return(0,qe.parseConnectionError)(t,r,"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(t){const r=this.parseError(new Error((null==t?void 0:t.message)||`WebSocket connection failed for URL: ${this.url}`));return this.events.emit("register_error",r),r}}(function zd({protocol:u,version:t,relayUrl:r,sdkVersion:o,auth:a,projectId:f,useOnCloseEvent:m}){const T=r.split("?"),V=$d(u,t,o),ge=function jd(u,t){let r=Ti.parse(u);return r=Rc(Rc({},r),t),Ti.stringify(r)}(T[1]||"",{auth:a,ua:V,projectId:f,useOnCloseEvent:m||void 0});return T[0]+"?"+ge}({sdkVersion:"2.7.2",protocol:t.protocol,version:t.version,relayUrl:t.relayUrl,projectId:t.projectId,auth:r,useOnCloseEvent:!0}))),t.registerProviderListeners()})()}recordMessageEvent(t){var r=this;return I(function*(){const{topic:o,message:a}=t;yield r.messages.set(o,a)})()}shouldIgnoreMessageEvent(t){var r=this;return I(function*(){const{topic:o,message:a}=t;return!(yield r.subscriber.isSubscribed(o))||r.messages.has(o,a)})()}onProviderPayload(t){var r=this;return I(function*(){if(r.logger.debug("Incoming Relay Payload"),r.logger.trace({type:"payload",direction:"incoming",payload:t}),(0,qe.isJsonRpcRequest)(t)){if(!t.method.endsWith("_subscription"))return;const o=t.params,{topic:a,message:f,publishedAt:m}=o.data,T={topic:a,message:f,publishedAt:m};r.logger.debug("Emitting Relayer Payload"),r.logger.trace(((u,t)=>{for(var r in t||(t={}))Z0.call(t,r)&&_f(u,r,t[r]);if(mf)for(var r of mf(t))Q0.call(t,r)&&_f(u,r,t[r]);return u})({type:"event",event:o.id},T)),r.events.emit(o.id,T),yield r.acknowledgePayload(t),yield r.onMessageEvent(T)}})()}onMessageEvent(t){var r=this;return I(function*(){(yield r.shouldIgnoreMessageEvent(t))||(r.events.emit("relayer_message",t),yield r.recordMessageEvent(t))})()}acknowledgePayload(t){var r=this;return I(function*(){const o=(0,qe.formatJsonRpcResult)(t.id,!0);yield r.provider.connection.send(o)})()}registerProviderListeners(){this.provider.on("payload",t=>this.onProviderPayload(t)),this.provider.on("connect",()=>{this.events.emit("relayer_connect")}),this.provider.on("disconnect",()=>{this.onProviderDisconnect()}),this.provider.on("error",t=>{this.logger.error(t),this.events.emit("relayer_error",t)})}registerEventListeners(){var t=this;this.events.on("relayer_connection_stalled",I(function*(){yield t.restartTransport()}))}onProviderDisconnect(){this.events.emit("relayer_disconnect"),this.attemptToReconnect()}attemptToReconnect(){var t=this;this.transportExplicitlyClosed||setTimeout(I(function*(){yield t.restartTransport()}),(0,Y.toMiliseconds)(O0))}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}toEstablishConnection(){var t=this;return I(function*(){if(!t.connected){if(t.connecting)return yield new Promise(r=>{const o=setInterval(()=>{t.connected&&(clearInterval(o),r())},t.connectionStatusPollingInterval)});yield t.restartTransport()}})()}}var ty=Object.defineProperty,bf=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,ny=Object.prototype.propertyIsEnumerable,Ef=(u,t,r)=>t in u?ty(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r,wf=(u,t)=>{for(var r in t||(t={}))ry.call(t,r)&&Ef(u,r,t[r]);if(bf)for(var r of bf(t))ny.call(t,r)&&Ef(u,r,t[r]);return u};class ro extends class v{constructor(t,r,o,a){this.core=t,this.logger=r,this.name=o}}{constructor(t,r,o,a=Yn,f){var m;super(t,r,o,a),m=this,this.core=t,this.logger=r,this.name=o,this.map=new Map,this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Yn,this.init=I(function*(){m.initialized||(m.logger.trace("Initialized"),yield m.restore(),m.cached.forEach(T=>{m.getKey&&null!==T&&!Ar(T)?m.map.set(m.getKey(T),T):function mp(u){var t;return null==(t=u?.proposer)?void 0:t.publicKey}(T)?m.map.set(T.id,T):function _p(u){return u?.topic}(T)&&m.map.set(T.topic,T)}),m.cached=[],m.initialized=!0)}),this.set=function(){var T=I(function*(V,q){m.isInitialized(),m.map.has(V)?yield m.update(V,q):(m.logger.debug("Setting value"),m.logger.trace({type:"method",method:"set",key:V,value:q}),m.map.set(V,q),yield m.persist())});return function(V,q){return T.apply(this,arguments)}}(),this.get=T=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:T}),this.getData(T)),this.getAll=T=>(this.isInitialized(),T?this.values.filter(V=>Object.keys(T).every(q=>Kp()(V[q],T[q]))):this.values),this.update=function(){var T=I(function*(V,q){m.isInitialized(),m.logger.debug("Updating value"),m.logger.trace({type:"method",method:"update",key:V,update:q});const ge=wf(wf({},m.getData(V)),q);m.map.set(V,ge),yield m.persist()});return function(V,q){return T.apply(this,arguments)}}(),this.delete=function(){var T=I(function*(V,q){m.isInitialized(),m.map.has(V)&&(m.logger.debug("Deleting value"),m.logger.trace({type:"method",method:"delete",key:V,reason:q}),m.map.delete(V),yield m.persist())});return function(V,q){return T.apply(this,arguments)}}(),this.logger=(0,Z.generateChildLogger)(r,this.name),this.storagePrefix=a,this.getKey=f}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}setDataStore(t){var r=this;return I(function*(){yield r.core.storage.setItem(r.storageKey,t)})()}getDataStore(){var t=this;return I(function*(){return yield t.core.storage.getItem(t.storageKey)})()}getData(t){const r=this.map.get(t);if(!r){const{message:o}=Ne("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(o),new Error(o)}return r}persist(){var t=this;return I(function*(){yield t.setDataStore(t.values)})()}restore(){var t=this;return I(function*(){try{const r=yield t.getDataStore();if(typeof r>"u"||!r.length)return;if(t.map.size){const{message:o}=Ne("RESTORE_WILL_OVERRIDE",t.name);throw t.logger.error(o),new Error(o)}t.cached=r,t.logger.debug(`Successfully Restored value for ${t.name}`),t.logger.trace({type:"method",method:"restore",value:t.values})}catch(r){t.logger.debug(`Failed to Restore value for ${t.name}`),t.logger.error(r)}})()}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}}class iy{constructor(t,r){var o=this;this.core=t,this.logger=r,this.name="pairing",this.version="0.3",this.events=new(Se()),this.initialized=!1,this.storagePrefix=Yn,this.ignoredPayloadTypes=[1],this.registeredMethods=[],this.init=I(function*(){o.initialized||(yield o.pairings.init(),yield o.cleanup(),o.registerRelayerEvents(),o.registerExpirerEvents(),o.initialized=!0,o.logger.trace("Initialized"))}),this.register=({methods:a})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...a])]},this.create=I(function*(){o.isInitialized();const a=Da(),f=yield o.core.crypto.setSymKey(a),m=pn(Y.FIVE_MINUTES),T={protocol:"irn"},V={topic:f,expiry:m,relay:T,active:!1},q=function tp(u){return`${u.protocol}:${u.topic}@${u.version}?`+Ti.stringify(((u,t)=>{for(var r in t||(t={}))qd.call(t,r)&&jc(u,r,t[r]);if(Fc)for(var r of Fc(t))Xd.call(t,r)&&jc(u,r,t[r]);return u})({symKey:u.symKey},function ep(u,t="-"){const o={};return Object.keys(u).forEach(a=>{u[a]&&(o["relay"+t+a]=u[a])}),o}(u.relay)))}({protocol:o.core.protocol,version:o.core.version,topic:f,symKey:a,relay:T});return yield o.pairings.set(f,V),yield o.core.relayer.subscribe(f),o.core.expirer.set(f,m),{topic:f,uri:q}}),this.pair=function(){var a=I(function*(f){o.isInitialized(),o.isValidPair(f);const{topic:m,symKey:T,relay:V}=function kd(u){const t=u.indexOf(":"),r=-1!==u.indexOf("?")?u.indexOf("?"):void 0,o=u.substring(0,t),a=u.substring(t+1,r).split("@"),f=typeof r<"u"?u.substring(r):"",m=Ti.parse(f);return{protocol:o,topic:a[0],version:parseInt(a[1],10),symKey:m.symKey,relay:Qd(m)}}(f.uri);if(o.pairings.keys.includes(m))throw new Error(`Pairing already exists: ${m}`);if(o.core.crypto.hasKeys(m))throw new Error(`Keychain already exists: ${m}`);const q=pn(Y.FIVE_MINUTES),ge={topic:m,relay:V,expiry:q,active:!1};return yield o.pairings.set(m,ge),yield o.core.crypto.setSymKey(T,m),yield o.core.relayer.subscribe(m,{relay:V}),o.core.expirer.set(m,q),f.activatePairing&&(yield o.activate({topic:m})),ge});return function(f){return a.apply(this,arguments)}}(),this.activate=function(){var a=I(function*({topic:f}){o.isInitialized();const m=pn(Y.THIRTY_DAYS);yield o.pairings.update(f,{active:!0,expiry:m}),o.core.expirer.set(f,m)});return function(f){return a.apply(this,arguments)}}(),this.ping=function(){var a=I(function*(f){o.isInitialized(),yield o.isValidPing(f);const{topic:m}=f;if(o.pairings.keys.includes(m)){const T=yield o.sendRequest(m,"wc_pairingPing",{}),{done:V,resolve:q,reject:ge}=Ui();o.events.once(cr("pairing_ping",T),({error:Ie})=>{Ie?ge(Ie):q()}),yield V()}});return function(f){return a.apply(this,arguments)}}(),this.updateExpiry=function(){var a=I(function*({topic:f,expiry:m}){o.isInitialized(),yield o.pairings.update(f,{expiry:m})});return function(f){return a.apply(this,arguments)}}(),this.updateMetadata=function(){var a=I(function*({topic:f,metadata:m}){o.isInitialized(),yield o.pairings.update(f,{peerMetadata:m})});return function(f){return a.apply(this,arguments)}}(),this.getPairings=()=>(this.isInitialized(),this.pairings.values),this.disconnect=function(){var a=I(function*(f){o.isInitialized(),yield o.isValidDisconnect(f);const{topic:m}=f;o.pairings.keys.includes(m)&&(yield o.sendRequest(m,"wc_pairingDelete",fr("USER_DISCONNECTED")),yield o.deletePairing(m))});return function(f){return a.apply(this,arguments)}}(),this.sendRequest=function(){var a=I(function*(f,m,T){const V=(0,qe.formatJsonRpcRequest)(m,T),q=yield o.core.crypto.encode(f,V),ge=ls[m].req;return o.core.history.set(f,V),yield o.core.relayer.publish(f,q,ge),V.id});return function(f,m,T){return a.apply(this,arguments)}}(),this.sendResult=function(){var a=I(function*(f,m,T){const V=(0,qe.formatJsonRpcResult)(f,T),q=yield o.core.crypto.encode(m,V),ge=yield o.core.history.get(m,f),Ie=ls[ge.request.method].res;yield o.core.relayer.publish(m,q,Ie),yield o.core.history.resolve(V)});return function(f,m,T){return a.apply(this,arguments)}}(),this.sendError=function(){var a=I(function*(f,m,T){const V=(0,qe.formatJsonRpcError)(f,T),q=yield o.core.crypto.encode(m,V),ge=yield o.core.history.get(m,f),Ie=ls[ge.request.method]?ls[ge.request.method].res:ls.unregistered_method.res;yield o.core.relayer.publish(m,q,Ie),yield o.core.history.resolve(V)});return function(f,m,T){return a.apply(this,arguments)}}(),this.deletePairing=function(){var a=I(function*(f,m){yield o.core.relayer.unsubscribe(f),yield Promise.all([o.pairings.delete(f,fr("USER_DISCONNECTED")),o.core.crypto.deleteSymKey(f),m?Promise.resolve():o.core.expirer.del(f)])});return function(f,m){return a.apply(this,arguments)}}(),this.cleanup=I(function*(){const a=o.pairings.getAll().filter(f=>Wn(f.expiry));yield Promise.all(a.map(f=>o.deletePairing(f.topic)))}),this.onRelayEventRequest=a=>{const{topic:f,payload:m}=a,T=m.method;if(this.pairings.keys.includes(f))switch(T){case"wc_pairingPing":return this.onPairingPingRequest(f,m);case"wc_pairingDelete":return this.onPairingDeleteRequest(f,m);default:return this.onUnknownRpcMethodRequest(f,m)}},this.onRelayEventResponse=function(){var a=I(function*(f){const{topic:m,payload:T}=f,V=(yield o.core.history.get(m,T.id)).request.method;if(o.pairings.keys.includes(m))return"wc_pairingPing"===V?o.onPairingPingResponse(m,T):o.onUnknownRpcMethodResponse(V)});return function(f){return a.apply(this,arguments)}}(),this.onPairingPingRequest=function(){var a=I(function*(f,m){const{id:T}=m;try{o.isValidPing({topic:f}),yield o.sendResult(T,f,!0),o.events.emit("pairing_ping",{id:T,topic:f})}catch(V){yield o.sendError(T,f,V),o.logger.error(V)}});return function(f,m){return a.apply(this,arguments)}}(),this.onPairingPingResponse=(a,f)=>{const{id:m}=f;setTimeout(()=>{(0,qe.isJsonRpcResult)(f)?this.events.emit(cr("pairing_ping",m),{}):(0,qe.isJsonRpcError)(f)&&this.events.emit(cr("pairing_ping",m),{error:f.error})},500)},this.onPairingDeleteRequest=function(){var a=I(function*(f,m){const{id:T}=m;try{o.isValidDisconnect({topic:f}),yield o.deletePairing(f),o.events.emit("pairing_delete",{id:T,topic:f})}catch(V){yield o.sendError(T,f,V),o.logger.error(V)}});return function(f,m){return a.apply(this,arguments)}}(),this.onUnknownRpcMethodRequest=function(){var a=I(function*(f,m){const{id:T,method:V}=m;try{if(o.registeredMethods.includes(V))return;const q=fr("WC_METHOD_UNSUPPORTED",V);yield o.sendError(T,f,q),o.logger.error(q)}catch(q){yield o.sendError(T,f,q),o.logger.error(q)}});return function(f,m){return a.apply(this,arguments)}}(),this.onUnknownRpcMethodResponse=a=>{this.registeredMethods.includes(a)||this.logger.error(fr("WC_METHOD_UNSUPPORTED",a))},this.isValidPair=a=>{if(!Fr(a)){const{message:f}=Ne("MISSING_OR_INVALID",`pair() params: ${a}`);throw new Error(f)}if(!function vp(u){if(vr(u,!1))try{return typeof new URL(u)<"u"}catch{return!1}return!1}(a.uri)){const{message:f}=Ne("MISSING_OR_INVALID",`pair() uri: ${a.uri}`);throw new Error(f)}},this.isValidPing=function(){var a=I(function*(f){if(!Fr(f)){const{message:T}=Ne("MISSING_OR_INVALID",`ping() params: ${f}`);throw new Error(T)}const{topic:m}=f;yield o.isValidPairingTopic(m)});return function(f){return a.apply(this,arguments)}}(),this.isValidDisconnect=function(){var a=I(function*(f){if(!Fr(f)){const{message:T}=Ne("MISSING_OR_INVALID",`disconnect() params: ${f}`);throw new Error(T)}const{topic:m}=f;yield o.isValidPairingTopic(m)});return function(f){return a.apply(this,arguments)}}(),this.isValidPairingTopic=function(){var a=I(function*(f){if(!vr(f,!1)){const{message:m}=Ne("MISSING_OR_INVALID",`pairing topic should be a string: ${f}`);throw new Error(m)}if(!o.pairings.keys.includes(f)){const{message:m}=Ne("NO_MATCHING_KEY",`pairing topic doesn't exist: ${f}`);throw new Error(m)}if(Wn(o.pairings.get(f).expiry)){yield o.deletePairing(f);const{message:m}=Ne("EXPIRED",`pairing topic: ${f}`);throw new Error(m)}});return function(f){return a.apply(this,arguments)}}(),this.core=t,this.logger=(0,Z.generateChildLogger)(r,this.name),this.pairings=new ro(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Z.getLoggerContext)(this.logger)}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){var t=this;this.core.relayer.on("relayer_message",function(){var r=I(function*(o){const{topic:a,message:f}=o;if(t.ignoredPayloadTypes.includes(t.core.crypto.getPayloadType(f)))return;const m=yield t.core.crypto.decode(a,f);(0,qe.isJsonRpcRequest)(m)?(t.core.history.set(a,m),t.onRelayEventRequest({topic:a,payload:m})):(0,qe.isJsonRpcResponse)(m)&&(yield t.core.history.resolve(m),t.onRelayEventResponse({topic:a,payload:m}))});return function(o){return r.apply(this,arguments)}}())}registerExpirerEvents(){var t=this;this.core.expirer.on(Zr_expired,function(){var r=I(function*(o){const{topic:a}=Uc(o.target);a&&t.pairings.keys.includes(a)&&(yield t.deletePairing(a,!0),t.events.emit("pairing_expire",{topic:a}))});return function(o){return r.apply(this,arguments)}}())}}class sy extends M{constructor(t,r){var o;super(t,r),o=this,this.core=t,this.logger=r,this.records=new Map,this.events=new _e.EventEmitter,this.name="history",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Yn,this.init=I(function*(){o.initialized||(o.logger.trace("Initialized"),yield o.restore(),o.cached.forEach(a=>o.records.set(a.id,a)),o.cached=[],o.registerEventListeners(),o.initialized=!0)}),this.set=(a,f,m)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:a,request:f,chainId:m}),this.records.has(f.id))return;const T={id:f.id,topic:a,request:{method:f.method,params:f.params||null},chainId:m};this.records.set(T.id,T),this.events.emit("history_created",T)},this.resolve=function(){var a=I(function*(f){if(o.isInitialized(),o.logger.debug("Updating JSON-RPC response history record"),o.logger.trace({type:"method",method:"update",response:f}),!o.records.has(f.id))return;const m=yield o.getRecord(f.id);typeof m.response>"u"&&(m.response=(0,qe.isJsonRpcError)(f)?{error:f.error}:{result:f.result},o.records.set(m.id,m),o.events.emit("history_updated",m))});return function(f){return a.apply(this,arguments)}}(),this.get=function(){var a=I(function*(f,m){return o.isInitialized(),o.logger.debug("Getting record"),o.logger.trace({type:"method",method:"get",topic:f,id:m}),yield o.getRecord(m)});return function(f,m){return a.apply(this,arguments)}}(),this.delete=(a,f)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:f}),this.values.forEach(m=>{if(m.topic===a){if(typeof f<"u"&&m.id!==f)return;this.records.delete(m.id),this.events.emit("history_deleted",m)}})},this.exists=function(){var a=I(function*(f,m){return o.isInitialized(),!!o.records.has(m)&&(yield o.getRecord(m)).topic===f});return function(f,m){return a.apply(this,arguments)}}(),this.on=(a,f)=>{this.events.on(a,f)},this.once=(a,f)=>{this.events.once(a,f)},this.off=(a,f)=>{this.events.off(a,f)},this.removeListener=(a,f)=>{this.events.removeListener(a,f)},this.logger=(0,Z.generateChildLogger)(r,this.name)}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){const t=[];return this.values.forEach(r=>{if(typeof r.response<"u")return;const o={topic:r.topic,request:(0,qe.formatJsonRpcRequest)(r.request.method,r.request.params,r.id),chainId:r.chainId};return t.push(o)}),t}setJsonRpcRecords(t){var r=this;return I(function*(){yield r.core.storage.setItem(r.storageKey,t)})()}getJsonRpcRecords(){var t=this;return I(function*(){return yield t.core.storage.getItem(t.storageKey)})()}getRecord(t){this.isInitialized();const r=this.records.get(t);if(!r){const{message:o}=Ne("NO_MATCHING_KEY",`${this.name}: ${t}`);throw new Error(o)}return r}persist(){var t=this;return I(function*(){yield t.setJsonRpcRecords(t.values),t.events.emit("history_sync")})()}restore(){var t=this;return I(function*(){try{const r=yield t.getJsonRpcRecords();if(typeof r>"u"||!r.length)return;if(t.records.size){const{message:o}=Ne("RESTORE_WILL_OVERRIDE",t.name);throw t.logger.error(o),new Error(o)}t.cached=r,t.logger.debug(`Successfully Restored records for ${t.name}`),t.logger.trace({type:"method",method:"restore",records:t.values})}catch(r){t.logger.debug(`Failed to Restore records for ${t.name}`),t.logger.error(r)}})()}registerEventListeners(){this.events.on("history_created",t=>{const r="history_created";this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on("history_updated",t=>{const r="history_updated";this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()}),this.events.on("history_deleted",t=>{const r="history_deleted";this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,record:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}}class oy extends x{constructor(t,r){var o;super(t,r),o=this,this.core=t,this.logger=r,this.expirations=new Map,this.events=new _e.EventEmitter,this.name="expirer",this.version="0.3",this.cached=[],this.initialized=!1,this.storagePrefix=Yn,this.init=I(function*(){o.initialized||(o.logger.trace("Initialized"),yield o.restore(),o.cached.forEach(a=>o.expirations.set(a.target,a)),o.cached=[],o.registerEventListeners(),o.initialized=!0)}),this.has=a=>{try{const f=this.formatTarget(a);return typeof this.getExpiration(f)<"u"}catch{return!1}},this.set=(a,f)=>{this.isInitialized();const m=this.formatTarget(a),T={target:m,expiry:f};this.expirations.set(m,T),this.checkExpiry(m,T),this.events.emit("expirer_created",{target:m,expiration:T})},this.get=a=>{this.isInitialized();const f=this.formatTarget(a);return this.getExpiration(f)},this.del=a=>{if(this.isInitialized(),this.has(a)){const f=this.formatTarget(a),m=this.getExpiration(f);this.expirations.delete(f),this.events.emit("expirer_deleted",{target:f,expiration:m})}},this.on=(a,f)=>{this.events.on(a,f)},this.once=(a,f)=>{this.events.once(a,f)},this.off=(a,f)=>{this.events.off(a,f)},this.removeListener=(a,f)=>{this.events.removeListener(a,f)},this.logger=(0,Z.generateChildLogger)(r,this.name)}get context(){return(0,Z.getLoggerContext)(this.logger)}get storageKey(){return this.storagePrefix+this.version+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(t){if("string"==typeof t)return function Vd(u){return Nc("topic",u)}(t);if("number"==typeof t)return function Wd(u){return Nc("id",u)}(t);const{message:r}=Ne("UNKNOWN_TYPE","Target type: "+typeof t);throw new Error(r)}setExpirations(t){var r=this;return I(function*(){yield r.core.storage.setItem(r.storageKey,t)})()}getExpirations(){var t=this;return I(function*(){return yield t.core.storage.getItem(t.storageKey)})()}persist(){var t=this;return I(function*(){yield t.setExpirations(t.values),t.events.emit("expirer_sync")})()}restore(){var t=this;return I(function*(){try{const r=yield t.getExpirations();if(typeof r>"u"||!r.length)return;if(t.expirations.size){const{message:o}=Ne("RESTORE_WILL_OVERRIDE",t.name);throw t.logger.error(o),new Error(o)}t.cached=r,t.logger.debug(`Successfully Restored expirations for ${t.name}`),t.logger.trace({type:"method",method:"restore",expirations:t.values})}catch(r){t.logger.debug(`Failed to Restore expirations for ${t.name}`),t.logger.error(r)}})()}getExpiration(t){const r=this.expirations.get(t);if(!r){const{message:o}=Ne("NO_MATCHING_KEY",`${this.name}: ${t}`);throw this.logger.error(o),new Error(o)}return r}checkExpiry(t,r){const{expiry:o}=r;(0,Y.toMiliseconds)(o)-Date.now()<=0&&this.expire(t,r)}expire(t,r){this.expirations.delete(t),this.events.emit(Zr_expired,{target:t,expiration:r})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((t,r)=>this.checkExpiry(r,t))}registerEventListeners(){this.core.heartbeat.on(X.HEARTBEAT_EVENTS.pulse,()=>this.checkExpirations()),this.events.on("expirer_created",t=>{const r="expirer_created";this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on(Zr_expired,t=>{const r=Zr_expired;this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()}),this.events.on("expirer_deleted",t=>{const r="expirer_deleted";this.logger.info(`Emitting ${r}`),this.logger.debug({type:"event",event:r,data:t}),this.persist()})}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}}class ay extends class N{constructor(t,r){this.projectId=t,this.logger=r}}{constructor(t,r){var o;super(t,r),o=this,this.projectId=t,this.logger=r,this.name=pf,this.initialized=!1,this.init=function(){var a=I(function*(f){Ac()||!Ia()||(o.verifyUrl=f?.verifyUrl||gf,yield o.createIframe())});return function(f){return a.apply(this,arguments)}}(),this.register=function(){var a=I(function*(f){var m;o.initialized||(yield o.init()),o.iframe&&(null==(m=o.iframe.contentWindow)||m.postMessage(f.attestationId,o.verifyUrl),o.logger.info(`postMessage sent: ${f.attestationId} ${o.verifyUrl}`))});return function(f){return a.apply(this,arguments)}}(),this.resolve=function(){var a=I(function*(f){var m;if(o.isDevEnv)return"";o.logger.info(`resolving attestation: ${f.attestationId}`);const T=o.startAbortTimer(Y.FIVE_SECONDS),V=yield fetch(`${o.verifyUrl}/attestation/${f.attestationId}`,{signal:o.abortController.signal});return clearTimeout(T),200===V.status?null==(m=yield V.json())?void 0:m.origin:""});return function(f){return a.apply(this,arguments)}}(),this.createIframe=I(function*(){try{const a=o.startAbortTimer(Y.FIVE_SECONDS);yield Promise.race([new Promise((f,m)=>{const T=document.createElement("iframe");T.setAttribute("id",pf),T.setAttribute("src",`${o.verifyUrl}/${o.projectId}`),T.style.display="none",T.addEventListener("load",()=>{o.initialized=!0,clearTimeout(a),f()}),T.addEventListener("error",V=>{m(V)}),document.body.append(T),o.iframe=T}),new Promise(f=>{o.abortController.signal.addEventListener("abort",()=>{f("iframe load timeout")})})])}catch(a){o.logger.error(`Verify iframe failed to load: ${o.verifyUrl}`),o.logger.error(a)}}),this.logger=(0,Z.generateChildLogger)(r,this.name),this.verifyUrl=gf,this.abortController=new AbortController,this.isDevEnv=Sa()&&process.env.IS_VITEST}get context(){return(0,Z.getLoggerContext)(this.logger)}startAbortTimer(t){return setTimeout(()=>this.abortController.abort(),pn(t))}}var uy=Object.defineProperty,Df=Object.getOwnPropertySymbols,cy=Object.prototype.hasOwnProperty,fy=Object.prototype.propertyIsEnumerable,xf=(u,t,r)=>t in u?uy(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r,Sf=(u,t)=>{for(var r in t||(t={}))cy.call(t,r)&&xf(u,r,t[r]);if(Df)for(var r of Df(t))fy.call(t,r)&&xf(u,r,t[r]);return u};class Ma extends G{constructor(t){super(t),this.protocol="wc",this.version=2,this.name="core",this.events=new _e.EventEmitter,this.initialized=!1,this.on=(o,a)=>this.events.on(o,a),this.once=(o,a)=>this.events.once(o,a),this.off=(o,a)=>this.events.off(o,a),this.removeListener=(o,a)=>this.events.removeListener(o,a),this.projectId=t?.projectId,this.relayUrl=t?.relayUrl||df;const r=typeof t?.logger<"u"&&"string"!=typeof t?.logger?t.logger:(0,Z.pino)((0,Z.getDefaultLoggerOptions)({level:t?.logger||"error"}));this.logger=(0,Z.generateChildLogger)(r,this.name),this.heartbeat=new X.HeartBeat,this.crypto=new $0(this,this.logger,t?.keychain),this.history=new sy(this,this.logger),this.expirer=new oy(this,this.logger),this.storage=null!=t&&t.storage?t.storage:new xe.ZP(Sf(Sf({},g0),t?.storageOptions)),this.relayer=new ey({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new iy(this,this.logger),this.verify=new ay(this.projectId||"",this.logger)}static init(t){return I(function*(){const r=new Ma(t);return yield r.initialize(),r})()}get context(){return(0,Z.getLoggerContext)(this.logger)}start(){var t=this;return I(function*(){t.initialized||(yield t.initialize())})()}initialize(){var t=this;return I(function*(){t.logger.trace("Initialized");try{yield t.crypto.init(),yield t.history.init(),yield t.expirer.init(),yield t.relayer.init(),yield t.heartbeat.init(),yield t.pairing.init(),t.initialized=!0,t.logger.info("Core Initialization Success")}catch(r){throw t.logger.warn(`Core Initialization Failure at epoch ${Date.now()}`,r),t.logger.error(r.message),r}})()}}const ly=Ma,Ba="wc@2:client:",Pf="Proposal expired",no=Y.SEVEN_DAYS,ds={wc_sessionPropose:{req:{ttl:Y.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:Y.FIVE_MINUTES,prompt:!1,tag:1101}},wc_sessionSettle:{req:{ttl:Y.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:Y.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:Y.ONE_DAY,prompt:!1,tag:1104},res:{ttl:Y.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:Y.ONE_DAY,prompt:!1,tag:1106},res:{ttl:Y.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:Y.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:Y.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:Y.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:Y.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:Y.ONE_DAY,prompt:!1,tag:1112},res:{ttl:Y.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:Y.THIRTY_SECONDS,prompt:!1,tag:1114},res:{ttl:Y.THIRTY_SECONDS,prompt:!1,tag:1115}}},za={min:Y.FIVE_MINUTES,max:Y.SEVEN_DAYS},yy=["wc_sessionPropose","wc_sessionRequest","wc_authRequest"];var vy=Object.defineProperty,my=Object.defineProperties,_y=Object.getOwnPropertyDescriptors,Af=Object.getOwnPropertySymbols,by=Object.prototype.hasOwnProperty,Ey=Object.prototype.propertyIsEnumerable,Cf=(u,t,r)=>t in u?vy(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r,Qr=(u,t)=>{for(var r in t||(t={}))by.call(t,r)&&Cf(u,r,t[r]);if(Af)for(var r of Af(t))Ey.call(t,r)&&Cf(u,r,t[r]);return u},Ha=(u,t)=>my(u,_y(t));class wy extends class J{constructor(t){this.client=t}}{constructor(t){var r;super(t),r=this,this.name="engine",this.events=new(Se()),this.initialized=!1,this.ignoredPayloadTypes=[1],this.init=I(function*(){r.initialized||(yield r.cleanup(),r.registerRelayerEvents(),r.registerExpirerEvents(),r.client.core.pairing.register({methods:Object.keys(ds)}),r.initialized=!0)}),this.connect=function(){var o=I(function*(a){r.isInitialized();const f=Ha(Qr({},a),{requiredNamespaces:a.requiredNamespaces||{},optionalNamespaces:a.optionalNamespaces||{}});yield r.isValidConnect(f);const{pairingTopic:m,requiredNamespaces:T,optionalNamespaces:V,sessionProperties:q,relays:ge}=f;let Xe,Ie=m,xt=!1;if(Ie&&(xt=r.client.core.pairing.pairings.get(Ie).active),!Ie||!xt){const{topic:vt,uri:Ut}=yield r.client.core.pairing.create();Ie=vt,Xe=Ut}const Be=yield r.client.core.crypto.generateKeyPair(),tt=Qr({requiredNamespaces:T,optionalNamespaces:V,relays:ge??[{protocol:"irn"}],proposer:{publicKey:Be,metadata:r.client.metadata}},q&&{sessionProperties:q}),{reject:Qe,resolve:Nt,done:dr}=Ui(Y.FIVE_MINUTES,Pf);if(r.events.once(cr("session_connect"),function(){var vt=I(function*({error:Ut,session:It}){if(Ut)Qe(Ut);else if(It){It.self.publicKey=Be;const _r=Ha(Qr({},It),{requiredNamespaces:It.requiredNamespaces,optionalNamespaces:It.optionalNamespaces});yield r.client.session.set(It.topic,_r),yield r.setExpiry(It.topic,It.expiry),Ie&&(yield r.client.core.pairing.updateMetadata({topic:Ie,metadata:It.peer.metadata})),Nt(_r)}});return function(Ut){return vt.apply(this,arguments)}}()),!Ie){const{message:vt}=Ne("NO_MATCHING_KEY",`connect() pairing topic: ${Ie}`);throw new Error(vt)}const Ct=yield r.sendRequest(Ie,"wc_sessionPropose",tt),Pt=pn(Y.FIVE_MINUTES);return yield r.setProposal(Ct,Qr({id:Ct,expiry:Pt},tt)),{uri:Xe,approval:dr}});return function(a){return o.apply(this,arguments)}}(),this.pair=function(){var o=I(function*(a){return r.isInitialized(),yield r.client.core.pairing.pair(a)});return function(a){return o.apply(this,arguments)}}(),this.approve=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidApprove(a);const{id:f,relayProtocol:m,namespaces:T,sessionProperties:V}=a,q=r.client.proposal.get(f);let{pairingTopic:ge,proposer:Ie,requiredNamespaces:Xe,optionalNamespaces:xt}=q;ge=ge||"",gi(Xe)||(Xe=function hp(u,t){const r=eo(u,t);if(r)throw new Error(r.message);const o={};for(const[a,f]of Object.entries(u))o[a]={methods:f.methods,events:f.events,chains:f.accounts.map(m=>`${m.split(":")[0]}:${m.split(":")[1]}`)};return o}(T,"approve()"));const Be=yield r.client.core.crypto.generateKeyPair(),tt=Ie.publicKey,Qe=yield r.client.core.crypto.generateSharedKey(Be,tt);ge&&f&&(yield r.client.core.pairing.updateMetadata({topic:ge,metadata:Ie.metadata}),yield r.sendResult(f,ge,{relay:{protocol:m??"irn"},responderPublicKey:Be}),yield r.client.proposal.delete(f,fr("USER_DISCONNECTED")),yield r.client.core.pairing.activate({topic:ge}));const Nt=Qr({relay:{protocol:m??"irn"},namespaces:T,requiredNamespaces:Xe,optionalNamespaces:xt,pairingTopic:ge,controller:{publicKey:Be,metadata:r.client.metadata},expiry:pn(no)},V&&{sessionProperties:V});yield r.client.core.relayer.subscribe(Qe),yield r.sendRequest(Qe,"wc_sessionSettle",Nt);const dr=Ha(Qr({},Nt),{topic:Qe,pairingTopic:ge,acknowledged:!1,self:Nt.controller,peer:{publicKey:Ie.publicKey,metadata:Ie.metadata},controller:Be});return yield r.client.session.set(Qe,dr),yield r.setExpiry(Qe,pn(no)),{topic:Qe,acknowledged:()=>new Promise(Ct=>Ct(r.client.session.get(Qe)))}});return function(a){return o.apply(this,arguments)}}(),this.reject=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidReject(a);const{id:f,reason:m}=a,{pairingTopic:T}=r.client.proposal.get(f);T&&(yield r.sendError(f,T,m),yield r.client.proposal.delete(f,fr("USER_DISCONNECTED")))});return function(a){return o.apply(this,arguments)}}(),this.update=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidUpdate(a);const{topic:f,namespaces:m}=a,T=yield r.sendRequest(f,"wc_sessionUpdate",{namespaces:m}),{done:V,resolve:q,reject:ge}=Ui();return r.events.once(cr("session_update",T),({error:Ie})=>{Ie?ge(Ie):q()}),yield r.client.session.update(f,{namespaces:m}),{acknowledged:V}});return function(a){return o.apply(this,arguments)}}(),this.extend=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidExtend(a);const{topic:f}=a,m=yield r.sendRequest(f,"wc_sessionExtend",{}),{done:T,resolve:V,reject:q}=Ui();return r.events.once(cr("session_extend",m),({error:ge})=>{ge?q(ge):V()}),yield r.setExpiry(f,pn(no)),{acknowledged:T}});return function(a){return o.apply(this,arguments)}}(),this.request=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidRequest(a);const{chainId:f,request:m,topic:T,expiry:V}=a,q=yield r.sendRequest(T,"wc_sessionRequest",{request:m,chainId:f},V),{done:ge,resolve:Ie,reject:Xe}=Ui(V);return r.events.once(cr("session_request",q),({error:xt,result:Be})=>{xt?Xe(xt):Ie(Be)}),r.client.events.emit("session_request_sent",{topic:T,request:m,chainId:f,id:q}),yield ge()});return function(a){return o.apply(this,arguments)}}(),this.respond=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidRespond(a);const{topic:f,response:m}=a,{id:T}=m;(0,qe.isJsonRpcResult)(m)?yield r.sendResult(T,f,m.result):(0,qe.isJsonRpcError)(m)&&(yield r.sendError(T,f,m.error)),r.deletePendingSessionRequest(a.response.id,{message:"fulfilled",code:0})});return function(a){return o.apply(this,arguments)}}(),this.ping=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidPing(a);const{topic:f}=a;if(r.client.session.keys.includes(f)){const m=yield r.sendRequest(f,"wc_sessionPing",{}),{done:T,resolve:V,reject:q}=Ui();r.events.once(cr("session_ping",m),({error:ge})=>{ge?q(ge):V()}),yield T()}else r.client.core.pairing.pairings.keys.includes(f)&&(yield r.client.core.pairing.ping({topic:f}))});return function(a){return o.apply(this,arguments)}}(),this.emit=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidEmit(a);const{topic:f,event:m,chainId:T}=a;yield r.sendRequest(f,"wc_sessionEvent",{event:m,chainId:T})});return function(a){return o.apply(this,arguments)}}(),this.disconnect=function(){var o=I(function*(a){r.isInitialized(),yield r.isValidDisconnect(a);const{topic:f}=a;r.client.session.keys.includes(f)?(yield r.sendRequest(f,"wc_sessionDelete",fr("USER_DISCONNECTED")),yield r.deleteSession(f)):yield r.client.core.pairing.disconnect({topic:f})});return function(a){return o.apply(this,arguments)}}(),this.find=o=>(this.isInitialized(),this.client.session.getAll().filter(a=>function gp(u,t){const{requiredNamespaces:r}=t,o=Object.keys(u.namespaces),a=Object.keys(r);let f=!0;return!!pi(a,o)&&(o.forEach(m=>{const{accounts:T,methods:V,events:q}=u.namespaces[m],ge=Fi(T),Ie=r[m];pi(Hr(m,Ie),ge)&&pi(Ie.methods,V)&&pi(Ie.events,q)||(f=!1)}),f)}(a,o))),this.getPendingSessionRequests=()=>(this.isInitialized(),this.client.pendingRequest.getAll()),this.deleteSession=function(){var o=I(function*(a,f){const{self:m}=r.client.session.get(a);yield r.client.core.relayer.unsubscribe(a),yield Promise.all([r.client.session.delete(a,fr("USER_DISCONNECTED")),r.client.core.crypto.deleteKeyPair(m.publicKey),r.client.core.crypto.deleteSymKey(a),f?Promise.resolve():r.client.core.expirer.del(a)])});return function(a,f){return o.apply(this,arguments)}}(),this.deleteProposal=function(){var o=I(function*(a,f){yield Promise.all([r.client.proposal.delete(a,fr("USER_DISCONNECTED")),f?Promise.resolve():r.client.core.expirer.del(a)])});return function(a,f){return o.apply(this,arguments)}}(),this.deletePendingSessionRequest=function(){var o=I(function*(a,f,m=!1){yield Promise.all([r.client.pendingRequest.delete(a,f),m?Promise.resolve():r.client.core.expirer.del(a)])});return function(a,f){return o.apply(this,arguments)}}(),this.setExpiry=function(){var o=I(function*(a,f){r.client.session.keys.includes(a)&&(yield r.client.session.update(a,{expiry:f})),r.client.core.expirer.set(a,f)});return function(a,f){return o.apply(this,arguments)}}(),this.setProposal=function(){var o=I(function*(a,f){yield r.client.proposal.set(a,f),r.client.core.expirer.set(a,f.expiry)});return function(a,f){return o.apply(this,arguments)}}(),this.setPendingSessionRequest=function(){var o=I(function*(a){const f=ds.wc_sessionRequest.req.ttl,{id:m,topic:T,params:V}=a;yield r.client.pendingRequest.set(m,{id:m,topic:T,params:V}),f&&r.client.core.expirer.set(m,pn(f))});return function(a){return o.apply(this,arguments)}}(),this.sendRequest=function(){var o=I(function*(a,f,m,T){const V=(0,qe.formatJsonRpcRequest)(f,m);if(Ia()&&yy.includes(f)){const Ie=hi(JSON.stringify(V));yield r.client.core.verify.register({attestationId:Ie})}const q=yield r.client.core.crypto.encode(a,V),ge=ds[f].req;return T&&(ge.ttl=T),r.client.core.history.set(a,V),r.client.core.relayer.publish(a,q,ge),V.id});return function(a,f,m,T){return o.apply(this,arguments)}}(),this.sendResult=function(){var o=I(function*(a,f,m){const T=(0,qe.formatJsonRpcResult)(a,m),V=yield r.client.core.crypto.encode(f,T),q=yield r.client.core.history.get(f,a);r.client.core.relayer.publish(f,V,ds[q.request.method].res),yield r.client.core.history.resolve(T)});return function(a,f,m){return o.apply(this,arguments)}}(),this.sendError=function(){var o=I(function*(a,f,m){const T=(0,qe.formatJsonRpcError)(a,m),V=yield r.client.core.crypto.encode(f,T),q=yield r.client.core.history.get(f,a);r.client.core.relayer.publish(f,V,ds[q.request.method].res),yield r.client.core.history.resolve(T)});return function(a,f,m){return o.apply(this,arguments)}}(),this.cleanup=I(function*(){const o=[],a=[];r.client.session.getAll().forEach(f=>{Wn(f.expiry)&&o.push(f.topic)}),r.client.proposal.getAll().forEach(f=>{Wn(f.expiry)&&a.push(f.id)}),yield Promise.all([...o.map(f=>r.deleteSession(f)),...a.map(f=>r.deleteProposal(f))])}),this.onRelayEventRequest=o=>{const{topic:a,payload:f}=o,m=f.method;switch(m){case"wc_sessionPropose":return this.onSessionProposeRequest(a,f);case"wc_sessionSettle":return this.onSessionSettleRequest(a,f);case"wc_sessionUpdate":return this.onSessionUpdateRequest(a,f);case"wc_sessionExtend":return this.onSessionExtendRequest(a,f);case"wc_sessionPing":return this.onSessionPingRequest(a,f);case"wc_sessionDelete":return this.onSessionDeleteRequest(a,f);case"wc_sessionRequest":return this.onSessionRequest(a,f);case"wc_sessionEvent":return this.onSessionEventRequest(a,f);default:return this.client.logger.info(`Unsupported request method ${m}`)}},this.onRelayEventResponse=function(){var o=I(function*(a){const{topic:f,payload:m}=a,T=(yield r.client.core.history.get(f,m.id)).request.method;switch(T){case"wc_sessionPropose":return r.onSessionProposeResponse(f,m);case"wc_sessionSettle":return r.onSessionSettleResponse(f,m);case"wc_sessionUpdate":return r.onSessionUpdateResponse(f,m);case"wc_sessionExtend":return r.onSessionExtendResponse(f,m);case"wc_sessionPing":return r.onSessionPingResponse(f,m);case"wc_sessionRequest":return r.onSessionRequestResponse(f,m);default:return r.client.logger.info(`Unsupported response method ${T}`)}});return function(a){return o.apply(this,arguments)}}(),this.onSessionProposeRequest=function(){var o=I(function*(a,f){const{params:m,id:T}=f;try{r.isValidConnect(Qr({},f.params));const V=pn(Y.FIVE_MINUTES),q=Qr({id:T,pairingTopic:a,expiry:V},m);yield r.setProposal(T,q);const ge=hi(JSON.stringify(f)),Ie=yield r.getVerifyContext(ge,q.proposer.metadata);r.client.events.emit("session_proposal",{id:T,params:q,context:Ie})}catch(V){yield r.sendError(T,a,V),r.client.logger.error(V)}});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionProposeResponse=function(){var o=I(function*(a,f){const{id:m}=f;if((0,qe.isJsonRpcResult)(f)){const{result:T}=f;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:T});const V=r.client.proposal.get(m);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:V});const q=V.proposer.publicKey;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:q});const ge=T.responderPublicKey;r.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:ge});const Ie=yield r.client.core.crypto.generateSharedKey(q,ge);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",sessionTopic:Ie});const Xe=yield r.client.core.relayer.subscribe(Ie);r.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:Xe}),yield r.client.core.pairing.activate({topic:a})}else(0,qe.isJsonRpcError)(f)&&(yield r.client.proposal.delete(m,fr("USER_DISCONNECTED")),r.events.emit(cr("session_connect"),{error:f.error}))});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionSettleRequest=function(){var o=I(function*(a,f){const{id:m,params:T}=f;try{r.isValidSessionSettleRequest(T);const{relay:V,controller:q,expiry:ge,namespaces:Ie,requiredNamespaces:Xe,optionalNamespaces:xt,sessionProperties:Be,pairingTopic:tt}=f.params,Qe=Qr({topic:a,relay:V,expiry:ge,namespaces:Ie,acknowledged:!0,pairingTopic:tt,requiredNamespaces:Xe,optionalNamespaces:xt,controller:q.publicKey,self:{publicKey:"",metadata:r.client.metadata},peer:{publicKey:q.publicKey,metadata:q.metadata}},Be&&{sessionProperties:Be});yield r.sendResult(f.id,a,!0),r.events.emit(cr("session_connect"),{session:Qe})}catch(V){yield r.sendError(m,a,V),r.client.logger.error(V)}});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionSettleResponse=function(){var o=I(function*(a,f){const{id:m}=f;(0,qe.isJsonRpcResult)(f)?(yield r.client.session.update(a,{acknowledged:!0}),r.events.emit(cr("session_approve",m),{})):(0,qe.isJsonRpcError)(f)&&(yield r.client.session.delete(a,fr("USER_DISCONNECTED")),r.events.emit(cr("session_approve",m),{error:f.error}))});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionUpdateRequest=function(){var o=I(function*(a,f){const{params:m,id:T}=f;try{r.isValidUpdate(Qr({topic:a},m)),yield r.client.session.update(a,{namespaces:m.namespaces}),yield r.sendResult(T,a,!0),r.client.events.emit("session_update",{id:T,topic:a,params:m})}catch(V){yield r.sendError(T,a,V),r.client.logger.error(V)}});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionUpdateResponse=(o,a)=>{const{id:f}=a;(0,qe.isJsonRpcResult)(a)?this.events.emit(cr("session_update",f),{}):(0,qe.isJsonRpcError)(a)&&this.events.emit(cr("session_update",f),{error:a.error})},this.onSessionExtendRequest=function(){var o=I(function*(a,f){const{id:m}=f;try{r.isValidExtend({topic:a}),yield r.setExpiry(a,pn(no)),yield r.sendResult(m,a,!0),r.client.events.emit("session_extend",{id:m,topic:a})}catch(T){yield r.sendError(m,a,T),r.client.logger.error(T)}});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionExtendResponse=(o,a)=>{const{id:f}=a;(0,qe.isJsonRpcResult)(a)?this.events.emit(cr("session_extend",f),{}):(0,qe.isJsonRpcError)(a)&&this.events.emit(cr("session_extend",f),{error:a.error})},this.onSessionPingRequest=function(){var o=I(function*(a,f){const{id:m}=f;try{r.isValidPing({topic:a}),yield r.sendResult(m,a,!0),r.client.events.emit("session_ping",{id:m,topic:a})}catch(T){yield r.sendError(m,a,T),r.client.logger.error(T)}});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionPingResponse=(o,a)=>{const{id:f}=a;setTimeout(()=>{(0,qe.isJsonRpcResult)(a)?this.events.emit(cr("session_ping",f),{}):(0,qe.isJsonRpcError)(a)&&this.events.emit(cr("session_ping",f),{error:a.error})},500)},this.onSessionDeleteRequest=function(){var o=I(function*(a,f){const{id:m}=f;try{r.isValidDisconnect({topic:a,reason:f.params}),yield Promise.all([new Promise(T=>{r.client.core.relayer.once("relayer_publish",I(function*(){T(yield r.deleteSession(a))}))}),r.sendResult(m,a,!0)]),r.client.events.emit("session_delete",{id:m,topic:a})}catch(T){yield r.sendError(m,a,T),r.client.logger.error(T)}});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionRequest=function(){var o=I(function*(a,f){const{id:m,params:T}=f;try{r.isValidRequest(Qr({topic:a},T)),yield r.setPendingSessionRequest({id:m,topic:a,params:T});const V=hi(JSON.stringify(f)),q=r.client.session.get(a),ge=yield r.getVerifyContext(V,q.peer.metadata);r.client.events.emit("session_request",{id:m,topic:a,params:T,context:ge})}catch(V){yield r.sendError(m,a,V),r.client.logger.error(V)}});return function(a,f){return o.apply(this,arguments)}}(),this.onSessionRequestResponse=(o,a)=>{const{id:f}=a;(0,qe.isJsonRpcResult)(a)?this.events.emit(cr("session_request",f),{result:a.result}):(0,qe.isJsonRpcError)(a)&&this.events.emit(cr("session_request",f),{error:a.error})},this.onSessionEventRequest=function(){var o=I(function*(a,f){const{id:m,params:T}=f;try{r.isValidEmit(Qr({topic:a},T)),r.client.events.emit("session_event",{id:m,topic:a,params:T})}catch(V){yield r.sendError(m,a,V),r.client.logger.error(V)}});return function(a,f){return o.apply(this,arguments)}}(),this.isValidConnect=function(){var o=I(function*(a){if(!Fr(a)){const{message:ge}=Ne("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(a)}`);throw new Error(ge)}const{pairingTopic:f,requiredNamespaces:m,optionalNamespaces:T,sessionProperties:V,relays:q}=a;if(Ar(f)||(yield r.isValidPairingTopic(f)),!function Op(u,t){let r=!1;return t&&!u?r=!0:u&&ji(u)&&u.length&&u.forEach(o=>{r=Hc(o)}),r}(q,!0)){const{message:ge}=Ne("MISSING_OR_INVALID",`connect() relays: ${q}`);throw new Error(ge)}!Ar(m)&&0!==gi(m)&&r.validateNamespaces(m,"requiredNamespaces"),!Ar(T)&&0!==gi(T)&&r.validateNamespaces(T,"optionalNamespaces"),Ar(V)||r.validateSessionProps(V,"sessionProperties")});return function(a){return o.apply(this,arguments)}}(),this.validateNamespaces=(o,a)=>{const f=function Ip(u,t,r){let o=null;if(u&&gi(u)){const a=zc(u,t);a&&(o=a);const f=function wp(u,t){let r=null;return Object.entries(u).forEach(([o,a])=>{if(r)return;const f=function Ep(u,t,r){let o=null;return ji(t)?t.forEach(a=>{o||(!Ca(a)||!a.includes(u))&&(o=fr("UNSUPPORTED_CHAINS",`${r}, chain ${a} should be a string and conform to "namespace:chainId" format`))}):o=fr("UNSUPPORTED_CHAINS",`${r}, chains ${t} should be an array of strings conforming to "namespace:chainId" format`),o}(o,Hr(o,a),`${t} requiredNamespace`);f&&(r=f)}),r}(u,t);f&&(o=f)}else o=Ne("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return o}(o,"connect()",a);if(f)throw new Error(f.message)},this.isValidApprove=function(){var o=I(function*(a){if(!Fr(a))throw new Error(Ne("MISSING_OR_INVALID",`approve() params: ${a}`).message);const{id:f,namespaces:m,relayProtocol:T,sessionProperties:V}=a;yield r.isValidProposalId(f);const q=r.client.proposal.get(f),ge=eo(m,"approve()");if(ge)throw new Error(ge.message);const Ie=Ta(q.requiredNamespaces,m,"approve()");if(Ie)throw new Error(Ie.message);if(!vr(T,!0)){const{message:Xe}=Ne("MISSING_OR_INVALID",`approve() relayProtocol: ${T}`);throw new Error(Xe)}Ar(V)||r.validateSessionProps(V,"sessionProperties")});return function(a){return o.apply(this,arguments)}}(),this.isValidReject=function(){var o=I(function*(a){if(!Fr(a)){const{message:T}=Ne("MISSING_OR_INVALID",`reject() params: ${a}`);throw new Error(T)}const{id:f,reason:m}=a;if(yield r.isValidProposalId(f),!function Pp(u){return!!(u&&"object"==typeof u&&u.code&&Aa(u.code,!1)&&u.message&&vr(u.message,!1))}(m)){const{message:T}=Ne("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(m)}`);throw new Error(T)}});return function(a){return o.apply(this,arguments)}}(),this.isValidSessionSettleRequest=o=>{if(!Fr(o)){const{message:ge}=Ne("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${o}`);throw new Error(ge)}const{relay:a,controller:f,namespaces:m,expiry:T}=o;if(!Hc(a)){const{message:ge}=Ne("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw new Error(ge)}const V=function bp(u,t){let r=null;return vr(u?.publicKey,!1)||(r=Ne("MISSING_OR_INVALID",`${t} controller public key should be a string`)),r}(f,"onSessionSettleRequest()");if(V)throw new Error(V.message);const q=eo(m,"onSessionSettleRequest()");if(q)throw new Error(q.message);if(Wn(T)){const{message:ge}=Ne("EXPIRED","onSessionSettleRequest()");throw new Error(ge)}},this.isValidUpdate=function(){var o=I(function*(a){if(!Fr(a)){const{message:ge}=Ne("MISSING_OR_INVALID",`update() params: ${a}`);throw new Error(ge)}const{topic:f,namespaces:m}=a;yield r.isValidSessionTopic(f);const T=r.client.session.get(f),V=eo(m,"update()");if(V)throw new Error(V.message);const q=Ta(T.requiredNamespaces,m,"update()");if(q)throw new Error(q.message)});return function(a){return o.apply(this,arguments)}}(),this.isValidExtend=function(){var o=I(function*(a){if(!Fr(a)){const{message:m}=Ne("MISSING_OR_INVALID",`extend() params: ${a}`);throw new Error(m)}const{topic:f}=a;yield r.isValidSessionTopic(f)});return function(a){return o.apply(this,arguments)}}(),this.isValidRequest=function(){var o=I(function*(a){if(!Fr(a)){const{message:ge}=Ne("MISSING_OR_INVALID",`request() params: ${a}`);throw new Error(ge)}const{topic:f,request:m,chainId:T,expiry:V}=a;yield r.isValidSessionTopic(f);const{namespaces:q}=r.client.session.get(f);if(!Jc(q,T)){const{message:ge}=Ne("MISSING_OR_INVALID",`request() chainId: ${T}`);throw new Error(ge)}if(!function Ap(u){return!(Ar(u)||!vr(u.method,!1))}(m)){const{message:ge}=Ne("MISSING_OR_INVALID",`request() ${JSON.stringify(m)}`);throw new Error(ge)}if(!function Np(u,t,r){return!!vr(r,!1)&&function fp(u,t){const r=[];return Object.values(u).forEach(o=>{Fi(o.accounts).includes(t)&&r.push(...o.methods)}),r}(u,t).includes(r)}(q,T,m.method)){const{message:ge}=Ne("MISSING_OR_INVALID",`request() method: ${m.method}`);throw new Error(ge)}if(V&&!function Lp(u,t){return Aa(u,!1)&&u<=t.max&&u>=t.min}(V,za)){const{message:ge}=Ne("MISSING_OR_INVALID",`request() expiry: ${V}. Expiry must be a number (in seconds) between ${za.min} and ${za.max}`);throw new Error(ge)}});return function(a){return o.apply(this,arguments)}}(),this.isValidRespond=function(){var o=I(function*(a){if(!Fr(a)){const{message:T}=Ne("MISSING_OR_INVALID",`respond() params: ${a}`);throw new Error(T)}const{topic:f,response:m}=a;if(yield r.isValidSessionTopic(f),!function Cp(u){return!(Ar(u)||Ar(u.result)&&Ar(u.error)||!Aa(u.id,!1)||!vr(u.jsonrpc,!1))}(m)){const{message:T}=Ne("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(m)}`);throw new Error(T)}});return function(a){return o.apply(this,arguments)}}(),this.isValidPing=function(){var o=I(function*(a){if(!Fr(a)){const{message:m}=Ne("MISSING_OR_INVALID",`ping() params: ${a}`);throw new Error(m)}const{topic:f}=a;yield r.isValidSessionOrPairingTopic(f)});return function(a){return o.apply(this,arguments)}}(),this.isValidEmit=function(){var o=I(function*(a){if(!Fr(a)){const{message:q}=Ne("MISSING_OR_INVALID",`emit() params: ${a}`);throw new Error(q)}const{topic:f,event:m,chainId:T}=a;yield r.isValidSessionTopic(f);const{namespaces:V}=r.client.session.get(f);if(!Jc(V,T)){const{message:q}=Ne("MISSING_OR_INVALID",`emit() chainId: ${T}`);throw new Error(q)}if(!function Tp(u){return!(Ar(u)||!vr(u.name,!1))}(m)){const{message:q}=Ne("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(m)}`);throw new Error(q)}if(!function Up(u,t,r){return!!vr(r,!1)&&function lp(u,t){const r=[];return Object.values(u).forEach(o=>{Fi(o.accounts).includes(t)&&r.push(...o.events)}),r}(u,t).includes(r)}(V,T,m.name)){const{message:q}=Ne("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(m)}`);throw new Error(q)}});return function(a){return o.apply(this,arguments)}}(),this.isValidDisconnect=function(){var o=I(function*(a){if(!Fr(a)){const{message:m}=Ne("MISSING_OR_INVALID",`disconnect() params: ${a}`);throw new Error(m)}const{topic:f}=a;yield r.isValidSessionOrPairingTopic(f)});return function(a){return o.apply(this,arguments)}}(),this.getVerifyContext=function(){var o=I(function*(a,f){const m={verified:{verifyUrl:f.verifyUrl||"",validation:"UNKNOWN",origin:f.url||""}};try{const T=yield r.client.core.verify.resolve({attestationId:a,verifyUrl:f.verifyUrl});T&&(m.verified.origin=T,m.verified.validation=T===f.url?"VALID":"INVALID")}catch(T){r.client.logger.error(T)}return r.client.logger.info(`Verify context: ${JSON.stringify(m)}`),m});return function(a,f){return o.apply(this,arguments)}}(),this.validateSessionProps=(o,a)=>{Object.values(o).forEach(f=>{if(!vr(f,!1)){const{message:m}=Ne("MISSING_OR_INVALID",`${a} must be in Record format. Received: ${JSON.stringify(f)}`);throw new Error(m)}})}}isInitialized(){if(!this.initialized){const{message:t}=Ne("NOT_INITIALIZED",this.name);throw new Error(t)}}registerRelayerEvents(){var t=this;this.client.core.relayer.on("relayer_message",function(){var r=I(function*(o){const{topic:a,message:f}=o;if(t.ignoredPayloadTypes.includes(t.client.core.crypto.getPayloadType(f)))return;const m=yield t.client.core.crypto.decode(a,f);(0,qe.isJsonRpcRequest)(m)?(t.client.core.history.set(a,m),t.onRelayEventRequest({topic:a,payload:m})):(0,qe.isJsonRpcResponse)(m)&&(yield t.client.core.history.resolve(m),t.onRelayEventResponse({topic:a,payload:m}))});return function(o){return r.apply(this,arguments)}}())}registerExpirerEvents(){var t=this;this.client.core.expirer.on(Zr_expired,function(){var r=I(function*(o){const{topic:a,id:f}=Uc(o.target);if(f&&t.client.pendingRequest.keys.includes(f))return yield t.deletePendingSessionRequest(f,Ne("EXPIRED"),!0);a?t.client.session.keys.includes(a)&&(yield t.deleteSession(a,!0),t.client.events.emit("session_expire",{topic:a})):f&&(yield t.deleteProposal(f,!0),t.client.events.emit("proposal_expire",{id:f}))});return function(o){return r.apply(this,arguments)}}())}isValidPairingTopic(t){if(!vr(t,!1)){const{message:r}=Ne("MISSING_OR_INVALID",`pairing topic should be a string: ${t}`);throw new Error(r)}if(!this.client.core.pairing.pairings.keys.includes(t)){const{message:r}=Ne("NO_MATCHING_KEY",`pairing topic doesn't exist: ${t}`);throw new Error(r)}if(Wn(this.client.core.pairing.pairings.get(t).expiry)){const{message:r}=Ne("EXPIRED",`pairing topic: ${t}`);throw new Error(r)}}isValidSessionTopic(t){var r=this;return I(function*(){if(!vr(t,!1)){const{message:o}=Ne("MISSING_OR_INVALID",`session topic should be a string: ${t}`);throw new Error(o)}if(!r.client.session.keys.includes(t)){const{message:o}=Ne("NO_MATCHING_KEY",`session topic doesn't exist: ${t}`);throw new Error(o)}if(Wn(r.client.session.get(t).expiry)){yield r.deleteSession(t);const{message:o}=Ne("EXPIRED",`session topic: ${t}`);throw new Error(o)}})()}isValidSessionOrPairingTopic(t){var r=this;return I(function*(){if(r.client.session.keys.includes(t))yield r.isValidSessionTopic(t);else{if(!r.client.core.pairing.pairings.keys.includes(t)){if(vr(t,!1)){const{message:o}=Ne("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${t}`);throw new Error(o)}{const{message:o}=Ne("MISSING_OR_INVALID",`session or pairing topic should be a string: ${t}`);throw new Error(o)}}r.isValidPairingTopic(t)}})()}isValidProposalId(t){var r=this;return I(function*(){if(!function Rp(u){return"number"==typeof u}(t)){const{message:o}=Ne("MISSING_OR_INVALID",`proposal id should be a number: ${t}`);throw new Error(o)}if(!r.client.proposal.keys.includes(t)){const{message:o}=Ne("NO_MATCHING_KEY",`proposal id doesn't exist: ${t}`);throw new Error(o)}if(Wn(r.client.proposal.get(t).expiry)){yield r.deleteProposal(t);const{message:o}=Ne("EXPIRED",`proposal id: ${t}`);throw new Error(o)}})()}}class Dy extends ro{constructor(t,r){super(t,r,"proposal",Ba),this.core=t,this.logger=r}}class xy extends ro{constructor(t,r){super(t,r,"session",Ba),this.core=t,this.logger=r}}class Sy extends ro{constructor(t,r){super(t,r,"request",Ba,o=>o.id),this.core=t,this.logger=r}}class Ja extends class H{constructor(t){this.opts=t,this.protocol="wc",this.version=2}}{constructor(t){var r;super(t),r=this,this.protocol="wc",this.version=2,this.name="client",this.events=new _e.EventEmitter,this.on=(a,f)=>this.events.on(a,f),this.once=(a,f)=>this.events.once(a,f),this.off=(a,f)=>this.events.off(a,f),this.removeListener=(a,f)=>this.events.removeListener(a,f),this.removeAllListeners=a=>this.events.removeAllListeners(a),this.connect=function(){var a=I(function*(f){try{return yield r.engine.connect(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.pair=function(){var a=I(function*(f){try{return yield r.engine.pair(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.approve=function(){var a=I(function*(f){try{return yield r.engine.approve(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.reject=function(){var a=I(function*(f){try{return yield r.engine.reject(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.update=function(){var a=I(function*(f){try{return yield r.engine.update(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.extend=function(){var a=I(function*(f){try{return yield r.engine.extend(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.request=function(){var a=I(function*(f){try{return yield r.engine.request(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.respond=function(){var a=I(function*(f){try{return yield r.engine.respond(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.ping=function(){var a=I(function*(f){try{return yield r.engine.ping(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.emit=function(){var a=I(function*(f){try{return yield r.engine.emit(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.disconnect=function(){var a=I(function*(f){try{return yield r.engine.disconnect(f)}catch(m){throw r.logger.error(m.message),m}});return function(f){return a.apply(this,arguments)}}(),this.find=a=>{try{return this.engine.find(a)}catch(f){throw this.logger.error(f.message),f}},this.getPendingSessionRequests=()=>{try{return this.engine.getPendingSessionRequests()}catch(a){throw this.logger.error(a.message),a}},this.name=t?.name||"client",this.metadata=t?.metadata||function Ld(){return(0,ma.D)()||{name:"",description:"",url:"",icons:[""]}}();const o=typeof t?.logger<"u"&&"string"!=typeof t?.logger?t.logger:(0,Z.pino)((0,Z.getDefaultLoggerOptions)({level:t?.logger||"error"}));this.core=t?.core||new ly(t),this.logger=(0,Z.generateChildLogger)(o,this.name),this.session=new xy(this.core,this.logger),this.proposal=new Dy(this.core,this.logger),this.pendingRequest=new Sy(this.core,this.logger),this.engine=new wy(this)}static init(t){return I(function*(){const r=new Ja(t);return yield r.initialize(),r})()}get context(){return(0,Z.getLoggerContext)(this.logger)}get pairing(){return this.core.pairing.pairings}initialize(){var t=this;return I(function*(){t.logger.trace("Initialized");try{yield t.core.start(),yield t.session.init(),yield t.proposal.init(),yield t.pendingRequest.init(),yield t.engine.init(),t.core.verify.init({verifyUrl:t.metadata.verifyUrl}),t.logger.info("SignClient Initialization Success")}catch(r){throw t.logger.info("SignClient Initialization Failure"),t.logger.error(r.message),r}})()}}var Iy=D(75630),Tf=D.n(Iy);const Nf={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class Ff{constructor(t){if(this.url=t,this.events=new _e.EventEmitter,this.isAvailable=!1,this.registering=!1,!(0,qe.isHttpUrl)(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);this.url=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}off(t,r){this.events.off(t,r)}removeListener(t,r){this.events.removeListener(t,r)}open(t=this.url){var r=this;return I(function*(){yield r.register(t)})()}close(){var t=this;return I(function*(){if(!t.isAvailable)throw new Error("Connection already closed");t.onClose()})()}send(t,r){var o=this;return I(function*(){o.isAvailable||(yield o.register());try{const a=Ce(t),m=yield(yield Tf()(o.url,Object.assign(Object.assign({},Nf),{body:a}))).json();o.onPayload({data:m})}catch(a){o.onError(t.id,a)}})()}register(t=this.url){var r=this;return I(function*(){if(!(0,qe.isHttpUrl)(t))throw new Error(`Provided URL is not compatible with HTTP connection: ${t}`);if(r.registering){const o=r.events.getMaxListeners();return(r.events.listenerCount("register_error")>=o||r.events.listenerCount("open")>=o)&&r.events.setMaxListeners(o+1),new Promise((a,f)=>{r.events.once("register_error",m=>{r.resetMaxListeners(),f(m)}),r.events.once("open",()=>{if(r.resetMaxListeners(),typeof r.isAvailable>"u")return f(new Error("HTTP connection is missing or invalid"));a()})})}r.url=t,r.registering=!0;try{const o=Ce({id:1,jsonrpc:"2.0",method:"test",params:[]});yield Tf()(t,Object.assign(Object.assign({},Nf),{body:o})),r.onOpen()}catch(o){const a=r.parseError(o);throw r.events.emit("register_error",a),r.onClose(),a}})()}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(t){if(typeof t.data>"u")return;const r="string"==typeof t.data?we(t.data):t.data;this.events.emit("payload",r)}onError(t,r){const o=this.parseError(r),a=o.message||o.toString(),f=(0,qe.formatJsonRpcError)(t,a);this.events.emit("payload",f)}parseError(t,r=this.url){return(0,qe.parseConnectionError)(t,r,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}const Li=Ff,Lf="wc@2:universal_provider:";var u,t,ps=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ka={exports:{}};u=Ka,t=Ka.exports,function(){var r,m="Expected a function",V="__lodash_hash_undefined__",ge="__lodash_placeholder__",vi=1/0,Zn=9007199254740991,xn=4294967295,dv=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],Mi="[object Arguments]",ao="[object Array]",gs="[object Boolean]",ys="[object Date]",uo="[object Error]",co="[object Function]",Kf="[object GeneratorFunction]",gn="[object Map]",vs="[object Number]",Un="[object Object]",Vf="[object Promise]",ms="[object RegExp]",yn="[object Set]",_s="[object String]",fo="[object Symbol]",bs="[object WeakMap]",Es="[object ArrayBuffer]",Bi="[object DataView]",qa="[object Float32Array]",Xa="[object Float64Array]",Za="[object Int8Array]",Qa="[object Int16Array]",ka="[object Int32Array]",eu="[object Uint8Array]",tu="[object Uint8ClampedArray]",ru="[object Uint16Array]",nu="[object Uint32Array]",bv=/\b__p \+= '';/g,Ev=/\b(__p \+=) '' \+/g,wv=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Wf=/&(?:amp|lt|gt|quot|#39);/g,Gf=/[&<>"']/g,Dv=RegExp(Wf.source),xv=RegExp(Gf.source),Sv=/<%-([\s\S]+?)%>/g,Iv=/<%([\s\S]+?)%>/g,Yf=/<%=([\s\S]+?)%>/g,Ov=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rv=/^\w*$/,Pv=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,iu=/[\\^$.*+?()[\]{}|]/g,Av=RegExp(iu.source),su=/^\s+/,Cv=/\s/,Tv=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Nv=/\{\n\/\* \[wrapped with (.+)\] \*/,Uv=/,? & /,Fv=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jv=/[()=,{}\[\]\/\s]/,Lv=/\\(\\)?/g,Mv=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qf=/\w*$/,Bv=/^[-+]0x[0-9a-f]+$/i,$v=/^0b[01]+$/i,zv=/^\[object .+?Constructor\]$/,Hv=/^0o[0-7]+$/i,Jv=/^(?:0|[1-9]\d*)$/,Kv=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lo=/($^)/,Vv=/['\n\r\u2028\u2029\\]/g,ho="\\ud800-\\udfff",Xf="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zf="\\u2700-\\u27bf",Qf="a-z\\xdf-\\xf6\\xf8-\\xff",kf="A-Z\\xc0-\\xd6\\xd8-\\xde",el="\\ufe0e\\ufe0f",tl="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kv="["+ho+"]",rl="["+tl+"]",po="["+Xf+"]",nl="\\d+",e1="["+Zf+"]",il="["+Qf+"]",sl="[^"+ho+tl+nl+Zf+Qf+kf+"]",au="\\ud83c[\\udffb-\\udfff]",ol="[^"+ho+"]",uu="(?:\\ud83c[\\udde6-\\uddff]){2}",cu="[\\ud800-\\udbff][\\udc00-\\udfff]",$i="["+kf+"]",ul="(?:"+il+"|"+sl+")",r1="(?:"+$i+"|"+sl+")",cl="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",fl="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",ll="(?:"+po+"|"+au+")?",hl="["+el+"]?",dl=hl+ll+"(?:\\u200d(?:"+[ol,uu,cu].join("|")+")"+hl+ll+")*",o1="(?:"+[e1,uu,cu].join("|")+")"+dl,a1="(?:"+[ol+po+"?",po,uu,cu,kv].join("|")+")",u1=RegExp("['\u2019]","g"),c1=RegExp(po,"g"),fu=RegExp(au+"(?="+au+")|"+a1+dl,"g"),f1=RegExp([$i+"?"+il+"+"+cl+"(?="+[rl,$i,"$"].join("|")+")",r1+"+"+fl+"(?="+[rl,$i+ul,"$"].join("|")+")",$i+"?"+ul+"+"+cl,$i+"+"+fl,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",nl,o1].join("|"),"g"),l1=RegExp("[\\u200d"+ho+Xf+el+"]"),h1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,d1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],p1=-1,Bt={};Bt[qa]=Bt[Xa]=Bt[Za]=Bt[Qa]=Bt[ka]=Bt[eu]=Bt[tu]=Bt[ru]=Bt[nu]=!0,Bt[Mi]=Bt[ao]=Bt[Es]=Bt[gs]=Bt[Bi]=Bt[ys]=Bt[uo]=Bt[co]=Bt[gn]=Bt[vs]=Bt[Un]=Bt[ms]=Bt[yn]=Bt[_s]=Bt[bs]=!1;var Lt={};Lt[Mi]=Lt[ao]=Lt[Es]=Lt[Bi]=Lt[gs]=Lt[ys]=Lt[qa]=Lt[Xa]=Lt[Za]=Lt[Qa]=Lt[ka]=Lt[gn]=Lt[vs]=Lt[Un]=Lt[ms]=Lt[yn]=Lt[_s]=Lt[fo]=Lt[eu]=Lt[tu]=Lt[ru]=Lt[nu]=!0,Lt[uo]=Lt[co]=Lt[bs]=!1;var m1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_1=parseFloat,b1=parseInt,pl="object"==typeof ps&&ps&&ps.Object===Object&&ps,E1="object"==typeof self&&self&&self.Object===Object&&self,xr=pl||E1||Function("return this")(),lu=t&&!t.nodeType&&t,mi=lu&&u&&!u.nodeType&&u,gl=mi&&mi.exports===lu,hu=gl&&pl.process,en=function(){try{return mi&&mi.require&&mi.require("util").types||hu&&hu.binding&&hu.binding("util")}catch{}}(),yl=en&&en.isArrayBuffer,vl=en&&en.isDate,ml=en&&en.isMap,_l=en&&en.isRegExp,bl=en&&en.isSet,El=en&&en.isTypedArray;function Jr(te,me,ye){switch(ye.length){case 0:return te.call(me);case 1:return te.call(me,ye[0]);case 2:return te.call(me,ye[0],ye[1]);case 3:return te.call(me,ye[0],ye[1],ye[2])}return te.apply(me,ye)}function w1(te,me,ye,Fe){for(var ke=-1,Ot=null==te?0:te.length;++ke-1}function du(te,me,ye){for(var Fe=-1,ke=null==te?0:te.length;++Fe-1;);return ye}function Pl(te,me){for(var ye=te.length;ye--&&zi(me,te[ye],0)>-1;);return ye}function C1(te,me){for(var ye=te.length,Fe=0;ye--;)te[ye]===me&&++Fe;return Fe}var T1=vu({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),N1=vu({"&":"&","<":"<",">":">",'"':""","'":"'"});function U1(te){return"\\"+m1[te]}function Hi(te){return l1.test(te)}function Eu(te){var me=-1,ye=Array(te.size);return te.forEach(function(Fe,ke){ye[++me]=[ke,Fe]}),ye}function Al(te,me){return function(ye){return te(me(ye))}}function ei(te,me){for(var ye=-1,Fe=te.length,ke=0,Ot=[];++ye",""":'"',"'":"'"}),Ki=function te(me){var e,ye=(me=null==me?xr:Ki.defaults(xr.Object(),me,Ki.pick(xr,d1))).Array,Fe=me.Date,ke=me.Error,Ot=me.Function,pr=me.Math,Ft=me.Object,wu=me.RegExp,W1=me.String,rn=me.TypeError,mo=ye.prototype,Vi=Ft.prototype,_o=me["__core-js_shared__"],bo=Ot.prototype.toString,At=Vi.hasOwnProperty,Y1=0,Tl=(e=/[^.]+$/.exec(_o&&_o.keys&&_o.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",Eo=Vi.toString,q1=bo.call(Ft),X1=xr._,Z1=wu("^"+bo.call(At).replace(iu,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),wo=gl?me.Buffer:r,ti=me.Symbol,Do=me.Uint8Array,Nl=wo?wo.allocUnsafe:r,xo=Al(Ft.getPrototypeOf,Ft),Ul=Ft.create,Fl=Vi.propertyIsEnumerable,So=mo.splice,jl=ti?ti.isConcatSpreadable:r,Ds=ti?ti.iterator:r,_i=ti?ti.toStringTag:r,Io=function(){try{var e=xi(Ft,"defineProperty");return e({},"",{}),e}catch{}}(),Q1=me.clearTimeout!==xr.clearTimeout&&me.clearTimeout,k1=Fe&&Fe.now!==xr.Date.now&&Fe.now,em=me.setTimeout!==xr.setTimeout&&me.setTimeout,Oo=pr.ceil,Ro=pr.floor,Du=Ft.getOwnPropertySymbols,tm=wo?wo.isBuffer:r,Ll=me.isFinite,rm=mo.join,nm=Al(Ft.keys,Ft),gr=pr.max,Or=pr.min,im=Fe.now,sm=me.parseInt,Ml=pr.random,om=mo.reverse,xu=xi(me,"DataView"),xs=xi(me,"Map"),Su=xi(me,"Promise"),Wi=xi(me,"Set"),Ss=xi(me,"WeakMap"),Is=xi(Ft,"create"),Po=Ss&&new Ss,Gi={},am=Si(xu),um=Si(xs),cm=Si(Su),fm=Si(Wi),lm=Si(Ss),Ao=ti?ti.prototype:r,Os=Ao?Ao.valueOf:r,Bl=Ao?Ao.toString:r;function O(e){if(qt(e)&&!et(e)&&!(e instanceof pt)){if(e instanceof nn)return e;if(At.call(e,"__wrapped__"))return $h(e)}return new nn(e)}var Yi=function(){function e(){}return function(n){if(!Vt(n))return{};if(Ul)return Ul(n);e.prototype=n;var s=new e;return e.prototype=r,s}}();function Co(){}function nn(e,n){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=r}function pt(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=xn,this.__views__=[]}function bi(e){var n=-1,s=null==e?0:e.length;for(this.clear();++n=n?e:n)),e}function sn(e,n,s,h,w,A){var B,W=1&n,ae=2&n,be=4&n;if(s&&(B=w?s(e,h,w,A):s(e)),B!==r)return B;if(!Vt(e))return e;var Ee=et(e);if(Ee){if(B=function R_(e){var n=e.length,s=new e.constructor(n);return n&&"string"==typeof e[0]&&At.call(e,"index")&&(s.index=e.index,s.input=e.input),s}(e),!W)return jr(e,B)}else{var Oe=Rr(e),Te=Oe==co||Oe==Kf;if(oi(e))return hh(e,W);if(Oe==Un||Oe==Mi||Te&&!w){if(B=ae||Te?{}:Ch(e),!W)return ae?function v_(e,n){return In(e,Ph(e),n)}(e,function $m(e,n){return e&&In(n,Mr(n),e)}(B,e)):function y_(e,n){return In(e,Xu(e),n)}(e,Hl(B,e))}else{if(!Lt[Oe])return w?e:{};B=function P_(e,n,s){var h=e.constructor;switch(n){case Es:return Ju(e);case gs:case ys:return new h(+e);case Bi:return function h_(e,n){var s=n?Ju(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}(e,s);case qa:case Xa:case Za:case Qa:case ka:case eu:case tu:case ru:case nu:return dh(e,s);case gn:return new h;case vs:case _s:return new h(e);case ms:return function d_(e){var n=new e.constructor(e.source,qf.exec(e));return n.lastIndex=e.lastIndex,n}(e);case yn:return new h;case fo:return function p_(e){return Os?Ft(Os.call(e)):{}}(e)}}(e,Oe,W)}}A||(A=new mn);var Me=A.get(e);if(Me)return Me;A.set(e,B),od(e)?e.forEach(function(Ve){B.add(sn(Ve,n,s,Ve,e,A))}):id(e)&&e.forEach(function(Ve,ht){B.set(ht,sn(Ve,n,s,ht,e,A))});var st=Ee?r:(be?ae?Gu:Wu:ae?Mr:br)(e);return tn(st||e,function(Ve,ht){st&&(Ve=e[ht=Ve]),Rs(B,ht,sn(Ve,n,s,ht,e,A))}),B}function Jl(e,n,s){var h=s.length;if(null==e)return!h;for(e=Ft(e);h--;){var w=s[h],B=e[w];if(B===r&&!(w in e)||!(0,n[w])(B))return!1}return!0}function Kl(e,n,s){if("function"!=typeof e)throw new rn(m);return Fs(function(){e.apply(r,s)},n)}function Ps(e,n,s,h){var w=-1,A=go,B=!0,W=e.length,ae=[],be=n.length;if(!W)return ae;s&&(n=Jt(n,Kr(s))),h?(A=du,B=!1):n.length>=200&&(A=ws,B=!1,n=new Ei(n));e:for(;++w-1},Fn.prototype.set=function xm(e,n){var s=this.__data__,h=To(s,e);return h<0?(++this.size,s.push([e,n])):s[h][1]=n,this},jn.prototype.clear=function Sm(){this.size=0,this.__data__={hash:new bi,map:new(xs||Fn),string:new bi}},jn.prototype.delete=function Im(e){var n=Ko(this,e).delete(e);return this.size-=n?1:0,n},jn.prototype.get=function Om(e){return Ko(this,e).get(e)},jn.prototype.has=function Rm(e){return Ko(this,e).has(e)},jn.prototype.set=function Pm(e,n){var s=Ko(this,e),h=s.size;return s.set(e,n),this.size+=s.size==h?0:1,this},Ei.prototype.add=Ei.prototype.push=function Am(e){return this.__data__.set(e,V),this},Ei.prototype.has=function Cm(e){return this.__data__.has(e)},mn.prototype.clear=function Tm(){this.__data__=new Fn,this.size=0},mn.prototype.delete=function Nm(e){var n=this.__data__,s=n.delete(e);return this.size=n.size,s},mn.prototype.get=function Um(e){return this.__data__.get(e)},mn.prototype.has=function Fm(e){return this.__data__.has(e)},mn.prototype.set=function jm(e,n){var s=this.__data__;if(s instanceof Fn){var h=s.__data__;if(!xs||h.length<199)return h.push([e,n]),this.size=++s.size,this;s=this.__data__=new jn(h)}return s.set(e,n),this.size=s.size,this};var ri=vh(Sn),Vl=vh(Pu,!0);function Hm(e,n){var s=!0;return ri(e,function(h,w,A){return s=!!n(h,w,A)}),s}function No(e,n,s){for(var h=-1,w=e.length;++h0&&s(W)?n>1?Sr(W,n-1,s,h,w):kn(w,W):h||(w[w.length]=W)}return w}var Ru=mh(),Gl=mh(!0);function Sn(e,n){return e&&Ru(e,n,br)}function Pu(e,n){return e&&Gl(e,n,br)}function Uo(e,n){return Qn(n,function(s){return zn(e[s])})}function Di(e,n){for(var s=0,h=(n=ii(n,e)).length;null!=e&&sn}function Km(e,n){return null!=e&&At.call(e,n)}function Vm(e,n){return null!=e&&n in Ft(e)}function Cu(e,n,s){for(var h=s?du:go,w=e[0].length,A=e.length,B=A,W=ye(A),ae=1/0,be=[];B--;){var Ee=e[B];B&&n&&(Ee=Jt(Ee,Kr(n))),ae=Or(Ee.length,ae),W[B]=!s&&(n||w>=120&&Ee.length>=120)?new Ei(B&&Ee):r}Ee=e[0];var Oe=-1,Te=W[0];e:for(;++Oe=W?ae:ae*("desc"==s[h]?-1:1)}return e.index-n.index}(A,B,s)})}function nh(e,n,s){for(var h=-1,w=n.length,A={};++h-1;)W!==e&&So.call(W,ae,1),So.call(e,ae,1);return e}function ih(e,n){for(var s=e?n.length:0,h=s-1;s--;){var w=n[s];if(s==h||w!==A){var A=w;$n(w)?So.call(e,w,1):Bu(e,w)}}return e}function ju(e,n){return e+Ro(Ml()*(n-e+1))}function Lu(e,n){var s="";if(!e||n<1||n>Zn)return s;do{n%2&&(s+=e),(n=Ro(n/2))&&(e+=e)}while(n);return s}function at(e,n){return ec(Uh(e,n,Br),e+"")}function o_(e){return zl(ki(e))}function a_(e,n){var s=ki(e);return Vo(s,wi(n,0,s.length))}function Ts(e,n,s,h){if(!Vt(e))return e;for(var w=-1,A=(n=ii(n,e)).length,B=A-1,W=e;null!=W&&++ww?0:w+n),(s=s>w?w:s)<0&&(s+=w),w=n>s?0:s-n>>>0,n>>>=0;for(var A=ye(w);++h>>1,B=e[A];null!==B&&!Wr(B)&&(s?B<=n:B=200){var be=n?null:E_(e);if(be)return vo(be);B=!1,w=ws,ae=new Ei}else ae=n?[]:W;e:for(;++h=h?e:on(e,n,s)}var lh=Q1||function(e){return xr.clearTimeout(e)};function hh(e,n){if(n)return e.slice();var s=e.length,h=Nl?Nl(s):new e.constructor(s);return e.copy(h),h}function Ju(e){var n=new e.constructor(e.byteLength);return new Do(n).set(new Do(e)),n}function dh(e,n){var s=n?Ju(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function ph(e,n){if(e!==n){var s=e!==r,h=null===e,w=e==e,A=Wr(e),B=n!==r,W=null===n,ae=n==n,be=Wr(n);if(!W&&!be&&!A&&e>n||A&&B&&ae&&!W&&!be||h&&B&&ae||!s&&ae||!w)return 1;if(!h&&!A&&!be&&e1?s[w-1]:r,B=w>2?s[2]:r;for(A=e.length>3&&"function"==typeof A?(w--,A):r,B&&Tr(s[0],s[1],B)&&(A=w<3?r:A,w=1),n=Ft(n);++h-1?w[A?n[B]:B]:r}}function Eh(e){return Bn(function(n){var s=n.length,h=s,w=nn.prototype.thru;for(e&&n.reverse();h--;){var A=n[h];if("function"!=typeof A)throw new rn(m);if(w&&!B&&"wrapper"==Jo(A))var B=new nn([],!0)}for(h=B?h:s;++h1&&mt.reverse(),Ee&&aeW))return!1;var be=A.get(e),Ee=A.get(n);if(be&&Ee)return be==n&&Ee==e;var Oe=-1,Te=!0,Me=2&s?new Ei:r;for(A.set(e,n),A.set(n,e);++Oe-1&&e%1==0&&e1?"& ":"")+n[h],n=n.join(s>2?", ":" "),e.replace(Tv,"{\n/* [wrapped with "+n+"] */\n")}(h,function $_(e,n){return tn(dv,function(s){var h="_."+s[0];n&s[1]&&!go(e,h)&&e.push(h)}),e.sort()}(function O_(e){var n=e.match(Nv);return n?n[1].split(Uv):[]}(h),s)))}function Mh(e){var n=0,s=0;return function(){var h=im(),w=16-(h-s);if(s=h,w>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(r,arguments)}}function Vo(e,n){var s=-1,h=e.length,w=h-1;for(n=n===r?h:n;++s1?e[n-1]:r;return s="function"==typeof s?(e.pop(),s):r,Wh(e,s)});function Gh(e){var n=O(e);return n.__chain__=!0,n}function Wo(e,n){return n(e)}var Jb=Bn(function(e){var n=e.length,s=n?e[0]:0,h=this.__wrapped__,w=function(A){return Ou(A,e)};return!(n>1||this.__actions__.length)&&h instanceof pt&&$n(s)?((h=h.slice(s,+s+(n?1:0))).__actions__.push({func:Wo,args:[w],thisArg:r}),new nn(h,this.__chain__).thru(function(A){return n&&!A.length&&A.push(r),A})):this.thru(w)}),Zb=Mo(function(e,n,s){At.call(e,s)?++e[s]:Ln(e,s,1)}),eE=bh(zh),tE=bh(Hh);function Yh(e,n){return(et(e)?tn:ri)(e,Je(n,3))}function qh(e,n){return(et(e)?D1:Vl)(e,Je(n,3))}var sE=Mo(function(e,n,s){At.call(e,s)?e[s].push(n):Ln(e,s,[n])}),aE=at(function(e,n,s){var h=-1,w="function"==typeof n,A=Lr(e)?ye(e.length):[];return ri(e,function(B){A[++h]=w?Jr(n,B,s):As(B,n,s)}),A}),uE=Mo(function(e,n,s){Ln(e,s,n)});function Go(e,n){return(et(e)?Jt:Ql)(e,Je(n,3))}var fE=Mo(function(e,n,s){e[s?0:1].push(n)},function(){return[[],[]]}),_E=at(function(e,n){if(null==e)return[];var s=n.length;return s>1&&Tr(e,n[0],n[1])?n=[]:s>2&&Tr(n[0],n[1],n[2])&&(n=[n[0]]),rh(e,Sr(n,1),[])}),Yo=k1||function(){return xr.Date.now()};function Xh(e,n,s){return n=s?r:n,Mn(e,128,r,r,r,r,n=e&&null==n?e.length:n)}function Zh(e,n){var s;if("function"!=typeof n)throw new rn(m);return e=nt(e),function(){return--e>0&&(s=n.apply(this,arguments)),e<=1&&(n=r),s}}var nc=at(function(e,n,s){var h=1;if(s.length){var w=ei(s,Zi(nc));h|=32}return Mn(e,h,n,s,w)}),Qh=at(function(e,n,s){var h=3;if(s.length){var w=ei(s,Zi(Qh));h|=32}return Mn(n,h,e,s,w)});function td(e,n,s){var h,w,A,B,W,ae,be=0,Ee=!1,Oe=!1,Te=!0;if("function"!=typeof e)throw new rn(m);function Me(nr){var bn=h,Jn=w;return h=w=r,be=nr,B=e.apply(Jn,bn)}function Ke(nr){return be=nr,W=Fs(ht,n),Ee?Me(nr):B}function Ve(nr){var bn=nr-ae;return ae===r||bn>=n||bn<0||Oe&&nr-be>=A}function ht(){var nr=Yo();if(Ve(nr))return mt(nr);W=Fs(ht,function st(nr){var bd=n-(nr-ae);return Oe?Or(bd,A-(nr-be)):bd}(nr))}function mt(nr){return W=r,Te&&h?Me(nr):(h=w=r,B)}function Yr(){var nr=Yo(),bn=Ve(nr);if(h=arguments,w=this,ae=nr,bn){if(W===r)return Ke(ae);if(Oe)return lh(W),W=Fs(ht,n),Me(ae)}return W===r&&(W=Fs(ht,n)),B}return n=un(n)||0,Vt(s)&&(Ee=!!s.leading,A=(Oe="maxWait"in s)?gr(un(s.maxWait)||0,n):A,Te="trailing"in s?!!s.trailing:Te),Yr.cancel=function Gr(){W!==r&&lh(W),be=0,h=ae=w=W=r},Yr.flush=function Nr(){return W===r?B:mt(Yo())},Yr}var EE=at(function(e,n){return Kl(e,1,n)}),wE=at(function(e,n,s){return Kl(e,un(n)||0,s)});function qo(e,n){if("function"!=typeof e||null!=n&&"function"!=typeof n)throw new rn(m);var s=function(){var h=arguments,w=n?n.apply(this,h):h[0],A=s.cache;if(A.has(w))return A.get(w);var B=e.apply(this,h);return s.cache=A.set(w,B)||A,B};return s.cache=new(qo.Cache||jn),s}function Xo(e){if("function"!=typeof e)throw new rn(m);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}qo.Cache=jn;var SE=l_(function(e,n){var s=(n=1==n.length&&et(n[0])?Jt(n[0],Kr(Je())):Jt(Sr(n,1),Kr(Je()))).length;return at(function(h){for(var w=-1,A=Or(h.length,s);++w=n}),Ii=ql(function(){return arguments}())?ql:function(e){return qt(e)&&At.call(e,"callee")&&!Fl.call(e,"callee")},et=ye.isArray,$E=yl?Kr(yl):function Ym(e){return qt(e)&&Cr(e)==Es};function Lr(e){return null!=e&&Zo(e.length)&&!zn(e)}function rr(e){return qt(e)&&Lr(e)}var oi=tm||gc,HE=vl?Kr(vl):function qm(e){return qt(e)&&Cr(e)==ys};function sc(e){if(!qt(e))return!1;var n=Cr(e);return n==uo||"[object DOMException]"==n||"string"==typeof e.message&&"string"==typeof e.name&&!js(e)}function zn(e){if(!Vt(e))return!1;var n=Cr(e);return n==co||n==Kf||"[object AsyncFunction]"==n||"[object Proxy]"==n}function nd(e){return"number"==typeof e&&e==nt(e)}function Zo(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=Zn}function Vt(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)}function qt(e){return null!=e&&"object"==typeof e}var id=ml?Kr(ml):function Zm(e){return qt(e)&&Rr(e)==gn};function sd(e){return"number"==typeof e||qt(e)&&Cr(e)==vs}function js(e){if(!qt(e)||Cr(e)!=Un)return!1;var n=xo(e);if(null===n)return!0;var s=At.call(n,"constructor")&&n.constructor;return"function"==typeof s&&s instanceof s&&bo.call(s)==q1}var oc=_l?Kr(_l):function Qm(e){return qt(e)&&Cr(e)==ms},od=bl?Kr(bl):function km(e){return qt(e)&&Rr(e)==yn};function Qo(e){return"string"==typeof e||!et(e)&&qt(e)&&Cr(e)==_s}function Wr(e){return"symbol"==typeof e||qt(e)&&Cr(e)==fo}var Qi=El?Kr(El):function e_(e){return qt(e)&&Zo(e.length)&&!!Bt[Cr(e)]},i3=Ho(Uu),s3=Ho(function(e,n){return e<=n});function ad(e){if(!e)return[];if(Lr(e))return Qo(e)?vn(e):jr(e);if(Ds&&e[Ds])return function L1(te){for(var me,ye=[];!(me=te.next()).done;)ye.push(me.value);return ye}(e[Ds]());var n=Rr(e);return(n==gn?Eu:n==yn?vo:ki)(e)}function Hn(e){return e?(e=un(e))===vi||e===-vi?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function nt(e){var n=Hn(e),s=n%1;return n==n?s?n-s:n:0}function ud(e){return e?wi(nt(e),0,xn):0}function un(e){if("number"==typeof e)return e;if(Wr(e))return NaN;if(Vt(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=Vt(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=Ol(e);var s=$v.test(e);return s||Hv.test(e)?b1(e.slice(2),s?2:8):Bv.test(e)?NaN:+e}function cd(e){return In(e,Mr(e))}function Rt(e){return null==e?"":Vr(e)}var a3=qi(function(e,n){if(Us(n)||Lr(n))In(n,br(n),e);else for(var s in n)At.call(n,s)&&Rs(e,s,n[s])}),fd=qi(function(e,n){In(n,Mr(n),e)}),ko=qi(function(e,n,s,h){In(n,Mr(n),e,h)}),u3=qi(function(e,n,s,h){In(n,br(n),e,h)}),c3=Bn(Ou),l3=at(function(e,n){e=Ft(e);var s=-1,h=n.length,w=h>2?n[2]:r;for(w&&Tr(n[0],n[1],w)&&(h=1);++s1),A}),In(e,Gu(e),s),h&&(s=sn(s,7,w_));for(var w=n.length;w--;)Bu(s,n[w]);return s}),A3=Bn(function(e,n){return null==e?{}:function n_(e,n){return nh(e,n,function(s,h){return uc(e,h)})}(e,n)});function hd(e,n){if(null==e)return{};var s=Jt(Gu(e),function(h){return[h]});return n=Je(n),nh(e,s,function(h,w){return n(h,w[0])})}var dd=Sh(br),pd=Sh(Mr);function ki(e){return null==e?[]:bu(e,br(e))}var H3=Xi(function(e,n,s){return n=n.toLowerCase(),e+(s?gd(n):n)});function gd(e){return cc(Rt(e).toLowerCase())}function yd(e){return(e=Rt(e))&&e.replace(Kv,T1).replace(c1,"")}var W3=Xi(function(e,n,s){return e+(s?"-":"")+n.toLowerCase()}),G3=Xi(function(e,n,s){return e+(s?" ":"")+n.toLowerCase()}),Y3=_h("toLowerCase"),tw=Xi(function(e,n,s){return e+(s?"_":"")+n.toLowerCase()}),nw=Xi(function(e,n,s){return e+(s?" ":"")+cc(n)}),dw=Xi(function(e,n,s){return e+(s?" ":"")+n.toUpperCase()}),cc=_h("toUpperCase");function vd(e,n,s){return e=Rt(e),(n=s?r:n)===r?function j1(te){return h1.test(te)}(e)?function K1(te){return te.match(f1)||[]}(e):function O1(te){return te.match(Fv)||[]}(e):e.match(n)||[]}var md=at(function(e,n){try{return Jr(e,r,n)}catch(s){return sc(s)?s:new ke(s)}}),pw=Bn(function(e,n){return tn(n,function(s){s=On(s),Ln(e,s,nc(e[s],e))}),e});function fc(e){return function(){return e}}var mw=Eh(),_w=Eh(!0);function Br(e){return e}function lc(e){return Zl("function"==typeof e?e:sn(e,1))}var ww=at(function(e,n){return function(s){return As(s,e,n)}}),Dw=at(function(e,n){return function(s){return As(e,s,n)}});function hc(e,n,s){var h=br(n),w=Uo(n,h);null==s&&(!Vt(n)||!w.length&&h.length)&&(s=n,n=e,e=this,w=Uo(n,br(n)));var A=!(Vt(s)&&"chain"in s&&!s.chain),B=zn(e);return tn(w,function(W){var ae=n[W];e[W]=ae,B&&(e.prototype[W]=function(){var be=this.__chain__;if(A||be){var Ee=e(this.__wrapped__),Oe=Ee.__actions__=jr(this.__actions__);return Oe.push({func:ae,args:arguments,thisArg:e}),Ee.__chain__=be,Ee}return ae.apply(e,kn([this.value()],arguments))})}),e}function dc(){}var Iw=Ku(Jt),Ow=Ku(wl),Rw=Ku(gu);function _d(e){return Zu(e)?yu(On(e)):function i_(e){return function(n){return Di(n,e)}}(e)}var Aw=Dh(),Cw=Dh(!0);function pc(){return[]}function gc(){return!1}var Mw=$o(function(e,n){return e+n},0),Bw=Vu("ceil"),$w=$o(function(e,n){return e/n},1),zw=Vu("floor"),Yw=$o(function(e,n){return e*n},1),qw=Vu("round"),Xw=$o(function(e,n){return e-n},0);return O.after=function bE(e,n){if("function"!=typeof n)throw new rn(m);return e=nt(e),function(){if(--e<1)return n.apply(this,arguments)}},O.ary=Xh,O.assign=a3,O.assignIn=fd,O.assignInWith=ko,O.assignWith=u3,O.at=c3,O.before=Zh,O.bind=nc,O.bindAll=pw,O.bindKey=Qh,O.castArray=function TE(){if(!arguments.length)return[];var e=arguments[0];return et(e)?e:[e]},O.chain=Gh,O.chunk=function z_(e,n,s){n=(s?Tr(e,n,s):n===r)?1:gr(nt(n),0);var h=null==e?0:e.length;if(!h||n<1)return[];for(var w=0,A=0,B=ye(Oo(h/n));ww?0:w+s),(h=h===r||h>w?w:nt(h))<0&&(h+=w),h=s>h?0:ud(h);s>>0)?(e=Rt(e))&&("string"==typeof n||null!=n&&!oc(n))&&!(n=Vr(n))&&Hi(e)?si(vn(e),0,s):e.split(n,s):[]},O.spread=function RE(e,n){if("function"!=typeof e)throw new rn(m);return n=null==n?0:gr(nt(n),0),at(function(s){var h=s[n],w=si(s,0,n);return h&&kn(w,h),Jr(e,this,w)})},O.tail=function Db(e){var n=null==e?0:e.length;return n?on(e,1,n):[]},O.take=function xb(e,n,s){return e&&e.length?on(e,0,(n=s||n===r?1:nt(n))<0?0:n):[]},O.takeRight=function Sb(e,n,s){var h=null==e?0:e.length;return h?on(e,(n=h-(n=s||n===r?1:nt(n)))<0?0:n,h):[]},O.takeRightWhile=function Ib(e,n){return e&&e.length?Lo(e,Je(n,3),!1,!0):[]},O.takeWhile=function Ob(e,n){return e&&e.length?Lo(e,Je(n,3)):[]},O.tap=function Hb(e,n){return n(e),e},O.throttle=function PE(e,n,s){var h=!0,w=!0;if("function"!=typeof e)throw new rn(m);return Vt(s)&&(h="leading"in s?!!s.leading:h,w="trailing"in s?!!s.trailing:w),td(e,n,{leading:h,maxWait:n,trailing:w})},O.thru=Wo,O.toArray=ad,O.toPairs=dd,O.toPairsIn=pd,O.toPath=function jw(e){return et(e)?Jt(e,On):Wr(e)?[e]:jr(Bh(Rt(e)))},O.toPlainObject=cd,O.transform=function U3(e,n,s){var h=et(e),w=h||oi(e)||Qi(e);if(n=Je(n,4),null==s){var A=e&&e.constructor;s=w?h?new A:[]:Vt(e)&&zn(A)?Yi(xo(e)):{}}return(w?tn:Sn)(e,function(B,W,ae){return n(s,B,W,ae)}),s},O.unary=function AE(e){return Xh(e,1)},O.union=Rb,O.unionBy=Pb,O.unionWith=Ab,O.uniq=function Cb(e){return e&&e.length?ni(e):[]},O.uniqBy=function Tb(e,n){return e&&e.length?ni(e,Je(n,2)):[]},O.uniqWith=function Nb(e,n){return n="function"==typeof n?n:r,e&&e.length?ni(e,r,n):[]},O.unset=function F3(e,n){return null==e||Bu(e,n)},O.unzip=rc,O.unzipWith=Wh,O.update=function j3(e,n,s){return null==e?e:uh(e,n,Hu(s))},O.updateWith=function L3(e,n,s,h){return h="function"==typeof h?h:r,null==e?e:uh(e,n,Hu(s),h)},O.values=ki,O.valuesIn=function M3(e){return null==e?[]:bu(e,Mr(e))},O.without=Ub,O.words=vd,O.wrap=function CE(e,n){return ic(Hu(n),e)},O.xor=Fb,O.xorBy=jb,O.xorWith=Lb,O.zip=Mb,O.zipObject=function Bb(e,n){return fh(e||[],n||[],Rs)},O.zipObjectDeep=function $b(e,n){return fh(e||[],n||[],Ts)},O.zipWith=zb,O.entries=dd,O.entriesIn=pd,O.extend=fd,O.extendWith=ko,hc(O,O),O.add=Mw,O.attempt=md,O.camelCase=H3,O.capitalize=gd,O.ceil=Bw,O.clamp=function B3(e,n,s){return s===r&&(s=n,n=r),s!==r&&(s=(s=un(s))==s?s:0),n!==r&&(n=(n=un(n))==n?n:0),wi(un(e),n,s)},O.clone=function NE(e){return sn(e,4)},O.cloneDeep=function FE(e){return sn(e,5)},O.cloneDeepWith=function jE(e,n){return sn(e,5,n="function"==typeof n?n:r)},O.cloneWith=function UE(e,n){return sn(e,4,n="function"==typeof n?n:r)},O.conformsTo=function LE(e,n){return null==n||Jl(e,n,br(n))},O.deburr=yd,O.defaultTo=function vw(e,n){return null==e||e!=e?n:e},O.divide=$w,O.endsWith=function J3(e,n,s){e=Rt(e),n=Vr(n);var h=e.length,w=s=s===r?h:wi(nt(s),0,h);return(s-=n.length)>=0&&e.slice(s,w)==n},O.eq=_n,O.escape=function K3(e){return(e=Rt(e))&&xv.test(e)?e.replace(Gf,N1):e},O.escapeRegExp=function V3(e){return(e=Rt(e))&&Av.test(e)?e.replace(iu,"\\$&"):e},O.every=function Qb(e,n,s){var h=et(e)?wl:Hm;return s&&Tr(e,n,s)&&(n=r),h(e,Je(n,3))},O.find=eE,O.findIndex=zh,O.findKey=function d3(e,n){return Dl(e,Je(n,3),Sn)},O.findLast=tE,O.findLastIndex=Hh,O.findLastKey=function p3(e,n){return Dl(e,Je(n,3),Pu)},O.floor=zw,O.forEach=Yh,O.forEachRight=qh,O.forIn=function g3(e,n){return null==e?e:Ru(e,Je(n,3),Mr)},O.forInRight=function y3(e,n){return null==e?e:Gl(e,Je(n,3),Mr)},O.forOwn=function v3(e,n){return e&&Sn(e,Je(n,3))},O.forOwnRight=function m3(e,n){return e&&Pu(e,Je(n,3))},O.get=ac,O.gt=ME,O.gte=BE,O.has=function E3(e,n){return null!=e&&Ah(e,n,Km)},O.hasIn=uc,O.head=Kh,O.identity=Br,O.includes=function oE(e,n,s,h){e=Lr(e)?e:ki(e),s=s&&!h?nt(s):0;var w=e.length;return s<0&&(s=gr(w+s,0)),Qo(e)?s<=w&&e.indexOf(n,s)>-1:!!w&&zi(e,n,s)>-1},O.indexOf=function tb(e,n,s){var h=null==e?0:e.length;if(!h)return-1;var w=null==s?0:nt(s);return w<0&&(w=gr(h+w,0)),zi(e,n,w)},O.inRange=function $3(e,n,s){return n=Hn(n),s===r?(s=n,n=0):s=Hn(s),function Wm(e,n,s){return e>=Or(n,s)&&e=-Zn&&e<=Zn},O.isSet=od,O.isString=Qo,O.isSymbol=Wr,O.isTypedArray=Qi,O.isUndefined=function t3(e){return e===r},O.isWeakMap=function r3(e){return qt(e)&&Rr(e)==bs},O.isWeakSet=function n3(e){return qt(e)&&"[object WeakSet]"==Cr(e)},O.join=function ob(e,n){return null==e?"":rm.call(e,n)},O.kebabCase=W3,O.last=an,O.lastIndexOf=function ab(e,n,s){var h=null==e?0:e.length;if(!h)return-1;var w=h;return s!==r&&(w=(w=nt(s))<0?gr(h+w,0):Or(w,h-1)),n==n?function $1(te,me,ye){for(var Fe=ye+1;Fe--;)if(te[Fe]===me)return Fe;return Fe}(e,n,w):yo(e,xl,w,!0)},O.lowerCase=G3,O.lowerFirst=Y3,O.lt=i3,O.lte=s3,O.max=function Hw(e){return e&&e.length?No(e,Br,Au):r},O.maxBy=function Jw(e,n){return e&&e.length?No(e,Je(n,2),Au):r},O.mean=function Kw(e){return Sl(e,Br)},O.meanBy=function Vw(e,n){return Sl(e,Je(n,2))},O.min=function Ww(e){return e&&e.length?No(e,Br,Uu):r},O.minBy=function Gw(e,n){return e&&e.length?No(e,Je(n,2),Uu):r},O.stubArray=pc,O.stubFalse=gc,O.stubObject=function Tw(){return{}},O.stubString=function Nw(){return""},O.stubTrue=function Uw(){return!0},O.multiply=Yw,O.nth=function ub(e,n){return e&&e.length?th(e,nt(n)):r},O.noConflict=function xw(){return xr._===this&&(xr._=X1),this},O.noop=dc,O.now=Yo,O.pad=function q3(e,n,s){e=Rt(e);var h=(n=nt(n))?Ji(e):0;if(!n||h>=n)return e;var w=(n-h)/2;return zo(Ro(w),s)+e+zo(Oo(w),s)},O.padEnd=function X3(e,n,s){e=Rt(e);var h=(n=nt(n))?Ji(e):0;return n&&hn){var h=e;e=n,n=h}if(s||e%1||n%1){var w=Ml();return Or(e+w*(n-e+_1("1e-"+((w+"").length-1))),n)}return ju(e,n)},O.reduce=function lE(e,n,s){var h=et(e)?pu:Il,w=arguments.length<3;return h(e,Je(n,4),s,w,ri)},O.reduceRight=function hE(e,n,s){var h=et(e)?x1:Il,w=arguments.length<3;return h(e,Je(n,4),s,w,Vl)},O.repeat=function k3(e,n,s){return n=(s?Tr(e,n,s):n===r)?1:nt(n),Lu(Rt(e),n)},O.replace=function ew(){var e=arguments,n=Rt(e[0]);return e.length<3?n:n.replace(e[1],e[2])},O.result=function C3(e,n,s){var h=-1,w=(n=ii(n,e)).length;for(w||(w=1,e=r);++hZn)return[];var s=xn,h=Or(e,xn);n=Je(n),e-=xn;for(var w=_u(h,n);++s=A)return e;var W=s-Ji(h);if(W<1)return h;var ae=B?si(B,0,W).join(""):e.slice(0,W);if(w===r)return ae+h;if(B&&(W+=ae.length-W),oc(w)){if(e.slice(W).search(w)){var be,Ee=ae;for(w.global||(w=wu(w.source,Rt(qf.exec(w))+"g")),w.lastIndex=0;be=w.exec(Ee);)var Oe=be.index;ae=ae.slice(0,Oe===r?W:Oe)}}else if(e.indexOf(Vr(w),W)!=W){var Te=ae.lastIndexOf(w);Te>-1&&(ae=ae.slice(0,Te))}return ae+h},O.unescape=function hw(e){return(e=Rt(e))&&Dv.test(e)?e.replace(Wf,z1):e},O.uniqueId=function Lw(e){var n=++Y1;return Rt(e)+n},O.upperCase=dw,O.upperFirst=cc,O.each=Yh,O.eachRight=qh,O.first=Kh,hc(O,function(){var e={};return Sn(O,function(n,s){At.call(O.prototype,s)||(e[s]=n)}),e}(),{chain:!1}),O.VERSION="4.17.21",tn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){O[e].placeholder=O}),tn(["drop","take"],function(e,n){pt.prototype[e]=function(s){s=s===r?1:gr(nt(s),0);var h=this.__filtered__&&!n?new pt(this):this.clone();return h.__filtered__?h.__takeCount__=Or(s,h.__takeCount__):h.__views__.push({size:Or(s,xn),type:e+(h.__dir__<0?"Right":"")}),h},pt.prototype[e+"Right"]=function(s){return this.reverse()[e](s).reverse()}}),tn(["filter","map","takeWhile"],function(e,n){var s=n+1,h=1==s||3==s;pt.prototype[e]=function(w){var A=this.clone();return A.__iteratees__.push({iteratee:Je(w,3),type:s}),A.__filtered__=A.__filtered__||h,A}}),tn(["head","last"],function(e,n){var s="take"+(n?"Right":"");pt.prototype[e]=function(){return this[s](1).value()[0]}}),tn(["initial","tail"],function(e,n){var s="drop"+(n?"":"Right");pt.prototype[e]=function(){return this.__filtered__?new pt(this):this[s](1)}}),pt.prototype.compact=function(){return this.filter(Br)},pt.prototype.find=function(e){return this.filter(e).head()},pt.prototype.findLast=function(e){return this.reverse().find(e)},pt.prototype.invokeMap=at(function(e,n){return"function"==typeof e?new pt(this):this.map(function(s){return As(s,e,n)})}),pt.prototype.reject=function(e){return this.filter(Xo(Je(e)))},pt.prototype.slice=function(e,n){e=nt(e);var s=this;return s.__filtered__&&(e>0||n<0)?new pt(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),n!==r&&(s=(n=nt(n))<0?s.dropRight(-n):s.take(n-e)),s)},pt.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},pt.prototype.toArray=function(){return this.take(xn)},Sn(pt.prototype,function(e,n){var s=/^(?:filter|find|map|reject)|While$/.test(n),h=/^(?:head|last)$/.test(n),w=O[h?"take"+("last"==n?"Right":""):n],A=h||/^find/.test(n);w&&(O.prototype[n]=function(){var B=this.__wrapped__,W=h?[1]:arguments,ae=B instanceof pt,be=W[0],Ee=ae||et(B),Oe=function(ht){var mt=w.apply(O,kn([ht],W));return h&&Te?mt[0]:mt};Ee&&s&&"function"==typeof be&&1!=be.length&&(ae=Ee=!1);var Te=this.__chain__,Me=!!this.__actions__.length,Ke=A&&!Te,st=ae&&!Me;if(!A&&Ee){B=st?B:new pt(this);var Ve=e.apply(B,W);return Ve.__actions__.push({func:Wo,args:[Oe],thisArg:r}),new nn(Ve,Te)}return Ke&&st?e.apply(this,W):(Ve=this.thru(Oe),Ke?h?Ve.value()[0]:Ve.value():Ve)})}),tn(["pop","push","shift","sort","splice","unshift"],function(e){var n=mo[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",h=/^(?:pop|shift)$/.test(e);O.prototype[e]=function(){var w=arguments;if(h&&!this.__chain__){var A=this.value();return n.apply(et(A)?A:[],w)}return this[s](function(B){return n.apply(et(B)?B:[],w)})}}),Sn(pt.prototype,function(e,n){var s=O[n];if(s){var h=s.name+"";At.call(Gi,h)||(Gi[h]=[]),Gi[h].push({name:n,func:s})}}),Gi[Bo(r,2).name]=[{name:"wrapper",func:r}],pt.prototype.clone=function hm(){var e=new pt(this.__wrapped__);return e.__actions__=jr(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=jr(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=jr(this.__views__),e},pt.prototype.reverse=function dm(){if(this.__filtered__){var e=new pt(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},pt.prototype.value=function pm(){var e=this.__wrapped__.value(),n=this.__dir__,s=et(e),h=n<0,w=s?e.length:0,A=function I_(e,n,s){for(var h=-1,w=s.length;++h=this.__values__.length;return{done:e,value:e?r:this.__values__[this.__index__++]}},O.prototype.plant=function Yb(e){for(var n,s=this;s instanceof Co;){var h=$h(s);h.__index__=0,h.__values__=r,n?w.__wrapped__=h:n=h;var w=h;s=s.__wrapped__}return w.__wrapped__=e,n},O.prototype.reverse=function qb(){var e=this.__wrapped__;if(e instanceof pt){var n=e;return this.__actions__.length&&(n=new pt(this)),(n=n.reverse()).__actions__.push({func:Wo,args:[tc],thisArg:r}),new nn(n,this.__chain__)}return this.thru(tc)},O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=function Xb(){return ch(this.__wrapped__,this.__actions__)},O.prototype.first=O.prototype.head,Ds&&(O.prototype[Ds]=function Gb(){return this}),O}();mi?((mi.exports=Ki)._=Ki,lu._=Ki):xr._=Ki}.call(ps);var Cy=Object.defineProperty,Ty=Object.defineProperties,Ny=Object.getOwnPropertyDescriptors,Mf=Object.getOwnPropertySymbols,Uy=Object.prototype.hasOwnProperty,Fy=Object.prototype.propertyIsEnumerable,Bf=(u,t,r)=>t in u?Cy(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r,io=(u,t)=>{for(var r in t||(t={}))Uy.call(t,r)&&Bf(u,r,t[r]);if(Mf)for(var r of Mf(t))Fy.call(t,r)&&Bf(u,r,t[r]);return u},jy=(u,t)=>Ty(u,Ny(t));function kr(u,t,r){let o;const a=Va(u);return t.rpcMap&&(o=t.rpcMap[a]),o||(o=`https://rpc.walletconnect.com/v1?chainId=eip155:${a}&projectId=${r}`),o}function Va(u){return u.includes("eip155")?Number(u.split(":")[1]):Number(u)}function $f(u){var t,r,o,a;const f={};if(!gi(u))return f;for(const[m,T]of Object.entries(u)){const V=Pa(m)?[m]:T.chains,q=T.methods||[],ge=T.events||[],Ie=T.rpcMap||{},Xe=us(m);f[Xe]=jy(io(io({},f[Xe]),T),{chains:En(V,null==(t=f[Xe])?void 0:t.chains),methods:En(q,null==(r=f[Xe])?void 0:r.methods),events:En(ge,null==(o=f[Xe])?void 0:o.events),rpcMap:io(io({},Ie),null==(a=f[Xe])?void 0:a.rpcMap)})}return f}const yi=(u,t)=>{const r=o=>{o.request!==t.request||o.topic!==t.topic||(u.events.removeListener("session_request_sent",r),function zy(u,t){Wa.apply(this,arguments)}(t,u.core.storage))};u.on("session_request_sent",r)};function Wa(){return Wa=I(function*(u,t){try{const r=yield t.getItem("WALLETCONNECT_DEEPLINK_CHOICE");if(!r)return;const a=("string"==typeof r?JSON.parse(r):r)?.href;if("string"!=typeof a)return;a.endsWith("/")&&a.slice(0,-1);const f=`${a}/wc?requestId=${u.id}&sessionTopic=${u.topic}`,m=Oa();"browser"===m?window.open(f,"_self","noreferrer noopener"):"react-native"===m&&(yield Object(function(){var V=new Error("Cannot find module 'react-native'");throw V.code="MODULE_NOT_FOUND",V}())(f))}catch(r){console.error(r)}}),Wa.apply(this,arguments)}class Hy{constructor(t){this.name="polkadot",this.namespace=t.namespace,this.events=t.events,this.client=t.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?(yi(this.client,t),this.client.request(t)):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const o=r||kr(`${this.name}:${t}`,this.namespace);if(!o)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,o)}this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t&&t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2])||[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var o;t[r]=this.createHttpProvider(r,null==(o=this.namespace.rpcMap)?void 0:o[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const o=this.createHttpProvider(t,r);o&&(this.httpProviders[t]=o)}createHttpProvider(t,r){const o=r||kr(t,this.namespace);return typeof o>"u"?void 0:new Gn(new Li(o))}}class Jy{constructor(t){this.name="eip155",this.namespace=t.namespace,this.client=t.client,this.events=t.events,this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain())}request(t){var r=this;return I(function*(){var o;switch(t.request.method){case"eth_requestAccounts":case"eth_accounts":return r.getAccounts();case"wallet_switchEthereumChain":return r.handleSwitchChain(t.request.params?null==(o=t.request.params[0])?void 0:o.chainId:"0x0"),null;case"eth_chainId":return parseInt(r.getDefaultChain())}return r.namespace.methods.includes(t.request.method)?(yi(r.client,t),yield r.client.request(t)):r.getHttpProvider().request(t.request)})()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}setDefaultChain(t,r){const o=Va(t);if(!this.httpProviders[o]){const a=r||kr(`${this.name}:${o}`,this.namespace,this.client.core.projectId);if(!a)throw new Error(`No RPC url provided for chainId: ${o}`);this.setHttpProvider(o,a)}this.chainId=o,this.events.emit("default_chain_changed",`${this.name}:${o}`)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}createHttpProvider(t,r){const o=r||kr(`${this.name}:${t}`,this.namespace,this.client.core.projectId);return typeof o>"u"?void 0:new Gn(new Ff(o))}setHttpProvider(t,r){const o=this.createHttpProvider(t,r);o&&(this.httpProviders[t]=o)}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var o;const a=Va(r);t[a]=this.createHttpProvider(a,null==(o=this.namespace.rpcMap)?void 0:o[r])}),t}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}getHttpProvider(){const t=this.chainId,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}handleSwitchChain(t){const r=parseInt(t,16);(function Ly(u,t){if(!t.includes(u))throw new Error(`Chain '${u}' not approved. Please use one of the following: ${t.toString()}`)})(`${this.name}:${r}`,this.namespace.chains),this.setDefaultChain(`${r}`)}}class Ky{constructor(t){this.name="solana",this.namespace=t.namespace,this.events=t.events,this.client=t.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?(yi(this.client,t),this.client.request(t)):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(!this.httpProviders[t]){const o=r||kr(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,o)}this.chainId=t,this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var o;t[r]=this.createHttpProvider(r,null==(o=this.namespace.rpcMap)?void 0:o[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const o=this.createHttpProvider(t,r);o&&(this.httpProviders[t]=o)}createHttpProvider(t,r){const o=r||kr(t,this.namespace,this.client.core.projectId);return typeof o>"u"?void 0:new Gn(new Li(o))}}class Vy{constructor(t){this.name="cosmos",this.namespace=t.namespace,this.events=t.events,this.client=t.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?(yi(this.client,t),this.client.request(t)):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const o=r||kr(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,o)}this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var o;t[r]=this.createHttpProvider(r,null==(o=this.namespace.rpcMap)?void 0:o[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const o=this.createHttpProvider(t,r);o&&(this.httpProviders[t]=o)}createHttpProvider(t,r){const o=r||kr(t,this.namespace,this.client.core.projectId);return typeof o>"u"?void 0:new Gn(new Li(o))}}class Wy{constructor(t){this.name="cip34",this.namespace=t.namespace,this.events=t.events,this.client=t.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}request(t){return this.namespace.methods.includes(t.request.method)?(yi(this.client,t),this.client.request(t)):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(this.chainId=t,!this.httpProviders[t]){const o=r||this.getCardanoRPCUrl(t);if(!o)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,o)}this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{const o=this.getCardanoRPCUrl(r);t[r]=this.createHttpProvider(r,o)}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}getCardanoRPCUrl(t){const r=this.namespace.rpcMap;if(r)return r[t]}setHttpProvider(t,r){const o=this.createHttpProvider(t,r);o&&(this.httpProviders[t]=o)}createHttpProvider(t,r){const o=r||this.getCardanoRPCUrl(t);return typeof o>"u"?void 0:new Gn(new Li(o))}}class Gy{constructor(t){this.name="elrond",this.namespace=t.namespace,this.events=t.events,this.client=t.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?(yi(this.client,t),this.client.request(t)):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(!this.httpProviders[t]){const o=r||kr(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,o)}this.chainId=t,this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var o;t[r]=this.createHttpProvider(r,null==(o=this.namespace.rpcMap)?void 0:o[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const o=this.createHttpProvider(t,r);o&&(this.httpProviders[t]=o)}createHttpProvider(t,r){const o=r||kr(t,this.namespace,this.client.core.projectId);return typeof o>"u"?void 0:new Gn(new Li(o))}}class Yy{constructor(t){this.name="multiversx",this.namespace=t.namespace,this.events=t.events,this.client=t.client,this.chainId=this.getDefaultChain(),this.httpProviders=this.createHttpProviders()}updateNamespace(t){this.namespace=Object.assign(this.namespace,t)}requestAccounts(){return this.getAccounts()}request(t){return this.namespace.methods.includes(t.request.method)?(yi(this.client,t),this.client.request(t)):this.getHttpProvider().request(t.request)}setDefaultChain(t,r){if(!this.httpProviders[t]){const o=r||kr(`${this.name}:${t}`,this.namespace,this.client.core.projectId);if(!o)throw new Error(`No RPC url provided for chainId: ${t}`);this.setHttpProvider(t,o)}this.chainId=t,this.events.emit("default_chain_changed",`${this.name}:${this.chainId}`)}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;const t=this.namespace.chains[0];if(!t)throw new Error("ChainId not found");return t.split(":")[1]}getAccounts(){const t=this.namespace.accounts;return t?[...new Set(t.filter(r=>r.split(":")[1]===this.chainId.toString()).map(r=>r.split(":")[2]))]:[]}createHttpProviders(){const t={};return this.namespace.chains.forEach(r=>{var o;t[r]=this.createHttpProvider(r,null==(o=this.namespace.rpcMap)?void 0:o[r])}),t}getHttpProvider(){const t=`${this.name}:${this.chainId}`,r=this.httpProviders[t];if(typeof r>"u")throw new Error(`JSON-RPC provider for ${t} not found`);return r}setHttpProvider(t,r){const o=this.createHttpProvider(t,r);o&&(this.httpProviders[t]=o)}createHttpProvider(t,r){const o=r||kr(t,this.namespace,this.client.core.projectId);return typeof o>"u"?void 0:new Gn(new Li(o))}}var qy=Object.defineProperty,Xy=Object.defineProperties,Zy=Object.getOwnPropertyDescriptors,zf=Object.getOwnPropertySymbols,Qy=Object.prototype.hasOwnProperty,ky=Object.prototype.propertyIsEnumerable,Hf=(u,t,r)=>t in u?qy(u,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):u[t]=r,so=(u,t)=>{for(var r in t||(t={}))Qy.call(t,r)&&Hf(u,r,t[r]);if(zf)for(var r of zf(t))ky.call(t,r)&&Hf(u,r,t[r]);return u},Ga=(u,t)=>Xy(u,Zy(t));class Ya{constructor(t){this.events=new(Se()),this.rpcProviders={},this.shouldAbortPairingAttempt=!1,this.maxPairingAttempts=10,this.providerOpts=t,this.logger=typeof t?.logger<"u"&&"string"!=typeof t?.logger?t.logger:(0,Z.pino)((0,Z.getDefaultLoggerOptions)({level:t?.logger||"error"}))}static init(t){return I(function*(){const r=new Ya(t);return yield r.initialize(),r})()}request(t,r){var o=this;return I(function*(){const[a,f]=o.validateChain(r);if(!o.session)throw new Error("Please call connect() before request()");return yield o.getProvider(a).request({request:so({},t),chainId:`${a}:${f}`,topic:o.session.topic})})()}sendAsync(t,r,o){this.request(t,o).then(a=>r(null,a)).catch(a=>r(a,void 0))}enable(){var t=this;return I(function*(){if(!t.client)throw new Error("Sign Client not initialized");return t.session||(yield t.connect({namespaces:t.namespaces,optionalNamespaces:t.optionalNamespaces,sessionProperties:t.sessionProperties})),yield t.requestAccounts()})()}disconnect(){var t=this;return I(function*(){var r;if(!t.session)throw new Error("Please call connect() before enable()");yield t.client.disconnect({topic:null==(r=t.session)?void 0:r.topic,reason:fr("USER_DISCONNECTED")}),yield t.cleanup()})()}connect(t){var r=this;return I(function*(){if(!r.client)throw new Error("Sign Client not initialized");if(r.setNamespaces(t),yield r.cleanupPendingPairings(),!t.skipPairing)return yield r.pair(t.pairingTopic)})()}on(t,r){this.events.on(t,r)}once(t,r){this.events.once(t,r)}removeListener(t,r){this.events.removeListener(t,r)}off(t,r){this.events.off(t,r)}get isWalletConnect(){return!0}pair(t){var r=this;return I(function*(){r.shouldAbortPairingAttempt=!1;let o=0;do{if(r.shouldAbortPairingAttempt)throw new Error("Pairing aborted");if(o>=r.maxPairingAttempts)throw new Error("Max auto pairing attempts reached");const{uri:a,approval:f}=yield r.client.connect({pairingTopic:t,requiredNamespaces:r.namespaces,optionalNamespaces:r.optionalNamespaces,sessionProperties:r.sessionProperties});a&&(r.uri=a,r.events.emit("display_uri",a)),yield f().then(m=>{r.session=m}).catch(m=>{if(m.message!==Pf)throw m;o++})}while(!r.session);return r.onConnect(),r.session})()}setDefaultChain(t,r){try{const[o,a]=this.validateChain(t);this.getProvider(o).setDefaultChain(a,r)}catch(o){if(!/Please call connect/.test(o.message))throw o}}cleanupPendingPairings(t={}){var r=this;return I(function*(){r.logger.info("Cleaning up inactive pairings...");const o=r.client.pairing.getAll();if(ji(o)){for(const a of o)t.deletePairings?r.client.core.expirer.set(a.topic,0):yield r.client.core.relayer.subscriber.unsubscribe(a.topic);r.logger.info(`Inactive pairings cleared: ${o.length}`)}})()}abortPairingAttempt(){this.shouldAbortPairingAttempt=!0}checkStorage(){var t=this;return I(function*(){t.namespaces=(yield t.getFromStore("namespaces"))||{},t.optionalNamespaces=(yield t.getFromStore("optionalNamespaces"))||{},t.client.session.length&&(t.session=t.client.session.get(t.client.session.keys[t.client.session.keys.length-1]),t.createProviders())})()}initialize(){var t=this;return I(function*(){t.logger.trace("Initialized"),yield t.createClient(),yield t.checkStorage(),t.registerEventListeners()})()}createClient(){var t=this;return I(function*(){t.client=t.providerOpts.client||(yield Ja.init({logger:t.providerOpts.logger||"error",relayUrl:t.providerOpts.relayUrl||"wss://relay.walletconnect.com",projectId:t.providerOpts.projectId,metadata:t.providerOpts.metadata,storageOptions:t.providerOpts.storageOptions,name:t.providerOpts.name})),t.logger.trace("SignClient Initialized")})()}createProviders(){if(!this.client)throw new Error("Sign Client not initialized");if(!this.session)throw new Error("Session not initialized. Please call connect() before enable()");[...new Set(Object.keys(this.session.namespaces).map(t=>us(t)))].forEach(t=>{if(!this.session)return;const r=function By(u,t){const r=Object.keys(t.namespaces).filter(a=>a.includes(u));if(!r.length)return[];const o=[];return r.forEach(a=>{o.push(...t.namespaces[a].accounts)}),o}(t,this.session),o=function My(u){return u.map(t=>`${t.split(":")[0]}:${t.split(":")[1]}`)}(r),a=function $y(u,t={}){const r=$f(u),o=$f(t);return Ka.exports.merge(r,o)}(this.namespaces,this.optionalNamespaces),f=Ga(so({},a[t]),{accounts:r,chains:o});switch(t){case"eip155":this.rpcProviders[t]=new Jy({client:this.client,namespace:f,events:this.events});break;case"solana":this.rpcProviders[t]=new Ky({client:this.client,namespace:f,events:this.events});break;case"cosmos":this.rpcProviders[t]=new Vy({client:this.client,namespace:f,events:this.events});break;case"polkadot":this.rpcProviders[t]=new Hy({client:this.client,namespace:f,events:this.events});break;case"cip34":this.rpcProviders[t]=new Wy({client:this.client,namespace:f,events:this.events});break;case"elrond":this.rpcProviders[t]=new Gy({client:this.client,namespace:f,events:this.events});break;case"multiversx":this.rpcProviders[t]=new Yy({client:this.client,namespace:f,events:this.events})}})}registerEventListeners(){var t=this;if(typeof this.client>"u")throw new Error("Sign Client is not initialized");this.client.on("session_ping",r=>{this.events.emit("session_ping",r)}),this.client.on("session_event",r=>{const{params:o}=r,{event:a}=o;"accountsChanged"===a.name?this.events.emit("accountsChanged",a.data):"chainChanged"===a.name?this.onChainChanged(o.chainId):this.events.emit(a.name,a.data),this.events.emit("session_event",r)}),this.client.on("session_update",({topic:r,params:o})=>{var a;const{namespaces:f}=o,m=null==(a=this.client)?void 0:a.session.get(r);this.session=Ga(so({},m),{namespaces:f}),this.onSessionUpdate(),this.events.emit("session_update",{topic:r,params:o})}),this.client.on("session_delete",function(){var r=I(function*(o){yield t.cleanup(),t.events.emit("session_delete",o),t.events.emit("disconnect",Ga(so({},fr("USER_DISCONNECTED")),{data:o.topic}))});return function(o){return r.apply(this,arguments)}}()),this.on("default_chain_changed",r=>{this.onChainChanged(r,!0)})}getProvider(t){if(!this.rpcProviders[t])throw new Error(`Provider not found: ${t}`);return this.rpcProviders[t]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(t=>{var r;this.getProvider(t).updateNamespace(null==(r=this.session)?void 0:r.namespaces[t])})}setNamespaces(t){const{namespaces:r,optionalNamespaces:o,sessionProperties:a}=t;if(!r||!Object.keys(r).length)throw new Error("Namespaces must be not empty");this.namespaces=r,this.optionalNamespaces=o,this.sessionProperties=a,this.persist("namespaces",r),this.persist("optionalNamespaces",o)}validateChain(t){const[r,o]=t?.split(":")||["",""];if(r&&!Object.keys(this.namespaces).map(m=>us(m)).includes(r))throw new Error(`Namespace '${r}' is not configured. Please call connect() first with namespace config.`);if(r&&o)return[r,o];const a=us(Object.keys(this.namespaces)[0]);return[a,this.rpcProviders[a].getDefaultChain()]}requestAccounts(){var t=this;return I(function*(){const[r]=t.validateChain();return yield t.getProvider(r).requestAccounts()})()}onChainChanged(t,r=!1){var o;const[a,f]=this.validateChain(t);r||this.getProvider(a).setDefaultChain(f),(null!=(o=this.namespaces[a])?o:this.namespaces[`${a}:${f}`]).defaultChain=f,this.persist("namespaces",this.namespaces),this.events.emit("chainChanged",f)}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}cleanup(){var t=this;return I(function*(){t.session=void 0,yield t.cleanupPendingPairings({deletePairings:!0})})()}persist(t,r){this.client.core.storage.setItem(`${Lf}/${t}`,r)}getFromStore(t){var r=this;return I(function*(){return yield r.client.core.storage.getItem(`${Lf}/${t}`)})()}}var rv=["eip155:1"],nv=function(){return function(u,t,r,o){return new(r||(r=Promise))(function(f,m){function T(ge){try{q(o.next(ge))}catch(Ie){m(Ie)}}function V(ge){try{q(o.throw(ge))}catch(Ie){m(Ie)}}function q(ge){ge.done?f(ge.value):function a(f){return f instanceof r?f:new r(function(m){m(f)})}(ge.value).then(T,V)}q((o=o.apply(u,t||[])).next())})}(void 0,void 0,void 0,function(){return function(u,t){var o,a,f,m,r={label:0,sent:function(){if(1&f[0])throw f[1];return f[1]},trys:[],ops:[]};return m={next:T(0),throw:T(1),return:T(2)},"function"==typeof Symbol&&(m[Symbol.iterator]=function(){return this}),m;function T(q){return function(ge){return function V(q){if(o)throw new TypeError("Generator is already executing.");for(;m&&(m=0,q[0]&&(r=0)),r;)try{if(o=1,a&&(f=2&q[0]?a.return:q[0]?a.throw||((f=a.return)&&f.call(a),0):a.next)&&!(f=f.call(a,q[1])).done)return f;switch(a=0,f&&(q=[2&q[0],f.value]),q[0]){case 0:case 1:f=q;break;case 4:return r.label++,{value:q[1],done:!1};case 5:r.label++,a=q[1],q=[0];continue;case 7:q=r.ops.pop(),r.trys.pop();continue;default:if(!(f=(f=r.trys).length>0&&f[f.length-1])&&(6===q[0]||2===q[0])){r=0;continue}if(3===q[0]&&(!f||q[1]>f[0]&&q[1]{"use strict";function D(){return(null==global?void 0:global.crypto)||(null==global?void 0:global.msCrypto)||{}}function R(){const ne=D();return ne.subtle||ne.webkitSubtle}Object.defineProperty(g,"__esModule",{value:!0}),g.isBrowserCryptoAvailable=g.getSubtleCrypto=g.getBrowerCrypto=void 0,g.getBrowerCrypto=D,g.getSubtleCrypto=R,g.isBrowserCryptoAvailable=function re(){return!!D()&&!!R()}},69537:(Pe,g)=>{"use strict";function D(){return typeof document>"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product}function R(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"}Object.defineProperty(g,"__esModule",{value:!0}),g.isBrowser=g.isNode=g.isReactNative=void 0,g.isReactNative=D,g.isNode=R,g.isBrowser=function re(){return!D()&&!R()}},38572:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});const R=D(33172);R.__exportStar(D(5158),g),R.__exportStar(D(69537),g)},52399:(Pe,g,D)=>{"use strict";D.d(g,{q:()=>R});class R{}},1577:(Pe,g,D)=>{"use strict";D.r(g),D.d(g,{IEvents:()=>R.q});var R=D(52399)},63029:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.HEARTBEAT_EVENTS=g.HEARTBEAT_INTERVAL=void 0;const R=D(14611);g.HEARTBEAT_INTERVAL=R.FIVE_SECONDS,g.HEARTBEAT_EVENTS={pulse:"heartbeat_pulse"}},76505:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),D(83411).__exportStar(D(63029),g)},33435:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.HeartBeat=void 0;const R=D(83411),re=D(93105),ne=D(14611),ce=D(76157),$=D(76505);class ee extends ce.IHeartBeat{constructor(j){super(j),this.events=new re.EventEmitter,this.interval=$.HEARTBEAT_INTERVAL,this.interval=(null==j?void 0:j.interval)||$.HEARTBEAT_INTERVAL}static init(j){return R.__awaiter(this,void 0,void 0,function*(){const C=new ee(j);return yield C.init(),C})}init(){return R.__awaiter(this,void 0,void 0,function*(){yield this.initialize()})}stop(){clearInterval(this.intervalRef)}on(j,C){this.events.on(j,C)}once(j,C){this.events.once(j,C)}off(j,C){this.events.off(j,C)}removeListener(j,C){this.events.removeListener(j,C)}initialize(){return R.__awaiter(this,void 0,void 0,function*(){this.intervalRef=setInterval(()=>this.pulse(),ne.toMiliseconds(this.interval))})}pulse(){this.events.emit($.HEARTBEAT_EVENTS.pulse)}}g.HeartBeat=ee},38960:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});const R=D(83411);R.__exportStar(D(33435),g),R.__exportStar(D(76157),g),R.__exportStar(D(76505),g)},41760:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.IHeartBeat=void 0;const R=D(1577);g.IHeartBeat=class re extends R.IEvents{constructor(ce){super()}}},76157:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),D(83411).__exportStar(D(41760),g)},45643:(Pe,g,D)=>{"use strict";D.d(g,{IJsonRpcProvider:()=>ne.x0});var R=D(14966);D.o(R,"IJsonRpcProvider")&&D.d(g,{IJsonRpcProvider:function(){return R.IJsonRpcProvider}}),D.o(R,"isHttpUrl")&&D.d(g,{isHttpUrl:function(){return R.isHttpUrl}}),D.o(R,"isJsonRpcError")&&D.d(g,{isJsonRpcError:function(){return R.isJsonRpcError}}),D.o(R,"isJsonRpcRequest")&&D.d(g,{isJsonRpcRequest:function(){return R.isJsonRpcRequest}}),D.o(R,"isJsonRpcResponse")&&D.d(g,{isJsonRpcResponse:function(){return R.isJsonRpcResponse}}),D.o(R,"isJsonRpcResult")&&D.d(g,{isJsonRpcResult:function(){return R.isJsonRpcResult}}),D.o(R,"isLocalhostUrl")&&D.d(g,{isLocalhostUrl:function(){return R.isLocalhostUrl}}),D.o(R,"isReactNative")&&D.d(g,{isReactNative:function(){return R.isReactNative}}),D.o(R,"isWsUrl")&&D.d(g,{isWsUrl:function(){return R.isWsUrl}});var ne=D(81104),ce=D(12817);D.o(ce,"isHttpUrl")&&D.d(g,{isHttpUrl:function(){return ce.isHttpUrl}}),D.o(ce,"isJsonRpcError")&&D.d(g,{isJsonRpcError:function(){return ce.isJsonRpcError}}),D.o(ce,"isJsonRpcRequest")&&D.d(g,{isJsonRpcRequest:function(){return ce.isJsonRpcRequest}}),D.o(ce,"isJsonRpcResponse")&&D.d(g,{isJsonRpcResponse:function(){return ce.isJsonRpcResponse}}),D.o(ce,"isJsonRpcResult")&&D.d(g,{isJsonRpcResult:function(){return ce.isJsonRpcResult}}),D.o(ce,"isLocalhostUrl")&&D.d(g,{isLocalhostUrl:function(){return ce.isLocalhostUrl}}),D.o(ce,"isReactNative")&&D.d(g,{isReactNative:function(){return ce.isReactNative}}),D.o(ce,"isWsUrl")&&D.d(g,{isWsUrl:function(){return ce.isWsUrl}})},14966:()=>{},81104:(Pe,g,D)=>{"use strict";D.d(g,{x0:()=>ce});class ce extends class ne extends class R{}{constructor(){super()}}{constructor(ee){super()}}},12817:()=>{},52885:(Pe,g,D)=>{"use strict";D.d(g,{CA:()=>ee,JV:()=>U,O4:()=>$,dQ:()=>L,xK:()=>C});const $="INTERNAL_ERROR",ee="SERVER_ERROR",L=[-32700,-32600,-32601,-32602,-32603],C={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[$]:{code:-32603,message:"Internal error"},[ee]:{code:-32e3,message:"Server error"}},U=ee},84275:(Pe,g,D)=>{"use strict";var R=D(38572);D.o(R,"IJsonRpcProvider")&&D.d(g,{IJsonRpcProvider:function(){return R.IJsonRpcProvider}}),D.o(R,"formatJsonRpcError")&&D.d(g,{formatJsonRpcError:function(){return R.formatJsonRpcError}}),D.o(R,"formatJsonRpcRequest")&&D.d(g,{formatJsonRpcRequest:function(){return R.formatJsonRpcRequest}}),D.o(R,"formatJsonRpcResult")&&D.d(g,{formatJsonRpcResult:function(){return R.formatJsonRpcResult}}),D.o(R,"getBigIntRpcId")&&D.d(g,{getBigIntRpcId:function(){return R.getBigIntRpcId}}),D.o(R,"isHttpUrl")&&D.d(g,{isHttpUrl:function(){return R.isHttpUrl}}),D.o(R,"isJsonRpcError")&&D.d(g,{isJsonRpcError:function(){return R.isJsonRpcError}}),D.o(R,"isJsonRpcRequest")&&D.d(g,{isJsonRpcRequest:function(){return R.isJsonRpcRequest}}),D.o(R,"isJsonRpcResponse")&&D.d(g,{isJsonRpcResponse:function(){return R.isJsonRpcResponse}}),D.o(R,"isJsonRpcResult")&&D.d(g,{isJsonRpcResult:function(){return R.isJsonRpcResult}}),D.o(R,"isLocalhostUrl")&&D.d(g,{isLocalhostUrl:function(){return R.isLocalhostUrl}}),D.o(R,"isReactNative")&&D.d(g,{isReactNative:function(){return R.isReactNative}}),D.o(R,"isWsUrl")&&D.d(g,{isWsUrl:function(){return R.isWsUrl}})},93938:(Pe,g,D)=>{"use strict";D.d(g,{CX:()=>j,L2:()=>ee,by:()=>$,i5:()=>ne});var R=D(52885);function ne(C){return R.dQ.includes(C)}function $(C){return Object.keys(R.xK).includes(C)?R.xK[C]:R.xK[R.JV]}function ee(C){return Object.values(R.xK).find(ue=>ue.code===C)||R.xK[R.JV]}function j(C,U,ue){return C.message.includes("getaddrinfo ENOTFOUND")||C.message.includes("connect ECONNREFUSED")?new Error(`Unavailable ${ue} RPC url at ${U}`):C}},90863:(Pe,g,D)=>{"use strict";D.d(g,{CS:()=>ce,RI:()=>L,sT:()=>$,tm:()=>ee});var R=D(93938),re=D(52885);function ne(C=3){return Date.now()*Math.pow(10,C)+Math.floor(Math.random()*Math.pow(10,C))}function ce(C=6){return BigInt(ne(C))}function $(C,U,ue){return{id:ue||ne(),jsonrpc:"2.0",method:C,params:U}}function ee(C,U){return{id:C,jsonrpc:"2.0",result:U}}function L(C,U,ue){return{id:C,jsonrpc:"2.0",error:j(U,ue)}}function j(C,U){return typeof C>"u"?(0,R.by)(re.O4):("string"==typeof C&&(C=Object.assign(Object.assign({},(0,R.by)(re.CA)),{message:C})),typeof U<"u"&&(C.data=U),(0,R.i5)(C.code)&&(C=(0,R.L2)(C.code)),C)}},22339:(Pe,g,D)=>{"use strict";D.d(g,{formatJsonRpcError:()=>ce.RI,formatJsonRpcRequest:()=>ce.sT,formatJsonRpcResult:()=>ce.tm,getBigIntRpcId:()=>ce.CS,isHttpUrl:()=>ee.jK,isJsonRpcError:()=>L.jg,isJsonRpcRequest:()=>L.DW,isJsonRpcResponse:()=>L.u,isJsonRpcResult:()=>L.k4,isLocalhostUrl:()=>ee.JF,isWsUrl:()=>ee.UZ,parseConnectionError:()=>re.CX}),D(52885);var re=D(93938),ne=D(84275);D.o(ne,"IJsonRpcProvider")&&D.d(g,{IJsonRpcProvider:function(){return ne.IJsonRpcProvider}}),D.o(ne,"formatJsonRpcError")&&D.d(g,{formatJsonRpcError:function(){return ne.formatJsonRpcError}}),D.o(ne,"formatJsonRpcRequest")&&D.d(g,{formatJsonRpcRequest:function(){return ne.formatJsonRpcRequest}}),D.o(ne,"formatJsonRpcResult")&&D.d(g,{formatJsonRpcResult:function(){return ne.formatJsonRpcResult}}),D.o(ne,"getBigIntRpcId")&&D.d(g,{getBigIntRpcId:function(){return ne.getBigIntRpcId}}),D.o(ne,"isHttpUrl")&&D.d(g,{isHttpUrl:function(){return ne.isHttpUrl}}),D.o(ne,"isJsonRpcError")&&D.d(g,{isJsonRpcError:function(){return ne.isJsonRpcError}}),D.o(ne,"isJsonRpcRequest")&&D.d(g,{isJsonRpcRequest:function(){return ne.isJsonRpcRequest}}),D.o(ne,"isJsonRpcResponse")&&D.d(g,{isJsonRpcResponse:function(){return ne.isJsonRpcResponse}}),D.o(ne,"isJsonRpcResult")&&D.d(g,{isJsonRpcResult:function(){return ne.isJsonRpcResult}}),D.o(ne,"isLocalhostUrl")&&D.d(g,{isLocalhostUrl:function(){return ne.isLocalhostUrl}}),D.o(ne,"isReactNative")&&D.d(g,{isReactNative:function(){return ne.isReactNative}}),D.o(ne,"isWsUrl")&&D.d(g,{isWsUrl:function(){return ne.isWsUrl}});var ce=D(90863),$=D(72265);D.o($,"IJsonRpcProvider")&&D.d(g,{IJsonRpcProvider:function(){return $.IJsonRpcProvider}}),D.o($,"isHttpUrl")&&D.d(g,{isHttpUrl:function(){return $.isHttpUrl}}),D.o($,"isJsonRpcError")&&D.d(g,{isJsonRpcError:function(){return $.isJsonRpcError}}),D.o($,"isJsonRpcRequest")&&D.d(g,{isJsonRpcRequest:function(){return $.isJsonRpcRequest}}),D.o($,"isJsonRpcResponse")&&D.d(g,{isJsonRpcResponse:function(){return $.isJsonRpcResponse}}),D.o($,"isJsonRpcResult")&&D.d(g,{isJsonRpcResult:function(){return $.isJsonRpcResult}}),D.o($,"isLocalhostUrl")&&D.d(g,{isLocalhostUrl:function(){return $.isLocalhostUrl}}),D.o($,"isReactNative")&&D.d(g,{isReactNative:function(){return $.isReactNative}}),D.o($,"isWsUrl")&&D.d(g,{isWsUrl:function(){return $.isWsUrl}});var ee=D(96796),L=D(9087)},72265:(Pe,g,D)=>{"use strict";D.d(g,{IJsonRpcProvider:()=>R.IJsonRpcProvider});var R=D(45643);D.o(R,"isHttpUrl")&&D.d(g,{isHttpUrl:function(){return R.isHttpUrl}}),D.o(R,"isJsonRpcError")&&D.d(g,{isJsonRpcError:function(){return R.isJsonRpcError}}),D.o(R,"isJsonRpcRequest")&&D.d(g,{isJsonRpcRequest:function(){return R.isJsonRpcRequest}}),D.o(R,"isJsonRpcResponse")&&D.d(g,{isJsonRpcResponse:function(){return R.isJsonRpcResponse}}),D.o(R,"isJsonRpcResult")&&D.d(g,{isJsonRpcResult:function(){return R.isJsonRpcResult}}),D.o(R,"isLocalhostUrl")&&D.d(g,{isLocalhostUrl:function(){return R.isLocalhostUrl}}),D.o(R,"isReactNative")&&D.d(g,{isReactNative:function(){return R.isReactNative}}),D.o(R,"isWsUrl")&&D.d(g,{isWsUrl:function(){return R.isWsUrl}})},96796:(Pe,g,D)=>{"use strict";function ce(j,C){const U=function ne(j){const C=j.match(new RegExp(/^\w+:/,"gi"));if(C&&C.length)return C[0]}(j);return!(typeof U>"u")&&new RegExp(C).test(U)}function $(j){return ce(j,"^https?:")}function ee(j){return ce(j,"^wss?:")}function L(j){return new RegExp("wss?://localhost(:d{2,5})?").test(j)}D.d(g,{JF:()=>L,UZ:()=>ee,jK:()=>$})},9087:(Pe,g,D)=>{"use strict";function R(L){return"object"==typeof L&&"id"in L&&"jsonrpc"in L&&"2.0"===L.jsonrpc}function re(L){return R(L)&&"method"in L}function ne(L){return R(L)&&(ce(L)||$(L))}function ce(L){return"result"in L}function $(L){return"error"in L}D.d(g,{DW:()=>re,jg:()=>$,k4:()=>ce,u:()=>ne})},3226:(Pe,g,D)=>{"use strict";const re=D(57436),ne=D(28898),ce=re.__importDefault(D(87733)),$=D(54653);g.ZP=class ee{constructor(){this.localStorage=ce.default}getKeys(){return re.__awaiter(this,void 0,void 0,function*(){return Object.keys(this.localStorage)})}getEntries(){return re.__awaiter(this,void 0,void 0,function*(){return Object.entries(this.localStorage).map($.parseEntry)})}getItem(j){return re.__awaiter(this,void 0,void 0,function*(){const C=this.localStorage.getItem(j);if(null!==C)return ne.safeJsonParse(C)})}setItem(j,C){return re.__awaiter(this,void 0,void 0,function*(){this.localStorage.setItem(j,ne.safeJsonStringify(C))})}removeItem(j){return re.__awaiter(this,void 0,void 0,function*(){this.localStorage.removeItem(j)})}}},87733:Pe=>{"use strict";!function(){let g;function D(){}g=D,g.prototype.getItem=function(R){return this.hasOwnProperty(R)?String(this[R]):null},g.prototype.setItem=function(R,re){this[R]=String(re)},g.prototype.removeItem=function(R){delete this[R]},g.prototype.clear=function(){const R=this;Object.keys(R).forEach(function(re){R[re]=void 0,delete R[re]})},g.prototype.key=function(R){return R=R||0,Object.keys(this)[R]},g.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),Pe.exports=typeof global<"u"&&global.localStorage?global.localStorage:typeof window<"u"&&window.localStorage?window.localStorage:new D}()},54653:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});const R=D(57436);R.__exportStar(D(87402),g),R.__exportStar(D(94164),g)},87402:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.IKeyValueStorage=void 0,g.IKeyValueStorage=class D{}},94164:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.parseEntry=void 0;const R=D(28898);g.parseEntry=function re(ne){var ce;return[ne[0],R.safeJsonParse(null!==(ce=ne[1])&&void 0!==ce?ce:"")]}},73671:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.PINO_CUSTOM_CONTEXT_KEY=g.PINO_LOGGER_DEFAULTS=void 0,g.PINO_LOGGER_DEFAULTS={level:"info"},g.PINO_CUSTOM_CONTEXT_KEY="custom_context"},66486:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.pino=void 0;const R=D(17978),re=R.__importDefault(D(22694));Object.defineProperty(g,"pino",{enumerable:!0,get:function(){return re.default}}),R.__exportStar(D(73671),g),R.__exportStar(D(70769),g)},70769:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.generateChildLogger=g.formatChildLoggerContext=g.getLoggerContext=g.setBrowserLoggerContext=g.getBrowserLoggerContext=g.getDefaultLoggerOptions=void 0;const R=D(73671);function ne(j,C=R.PINO_CUSTOM_CONTEXT_KEY){return j[C]||""}function ce(j,C,U=R.PINO_CUSTOM_CONTEXT_KEY){return j[U]=C,j}function $(j,C=R.PINO_CUSTOM_CONTEXT_KEY){let U="";return U=typeof j.bindings>"u"?ne(j,C):j.bindings().context||"",U}function ee(j,C,U=R.PINO_CUSTOM_CONTEXT_KEY){const ue=$(j,U);return ue.trim()?`${ue}/${C}`:C}g.getDefaultLoggerOptions=function re(j){return Object.assign(Object.assign({},j),{level:(null==j?void 0:j.level)||R.PINO_LOGGER_DEFAULTS.level})},g.getBrowserLoggerContext=ne,g.setBrowserLoggerContext=ce,g.getLoggerContext=$,g.formatChildLoggerContext=ee,g.generateChildLogger=function L(j,C,U=R.PINO_CUSTOM_CONTEXT_KEY){const ue=ee(j,C,U);return ce(j.child({context:ue}),ue,U)}},45785:()=>{},58083:()=>{},78847:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});const R=D(80017);R.__exportStar(D(77662),g),R.__exportStar(D(28456),g)},77662:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.ONE_THOUSAND=g.ONE_HUNDRED=void 0,g.ONE_HUNDRED=100,g.ONE_THOUSAND=1e3},28456:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.ONE_YEAR=g.FOUR_WEEKS=g.THREE_WEEKS=g.TWO_WEEKS=g.ONE_WEEK=g.THIRTY_DAYS=g.SEVEN_DAYS=g.FIVE_DAYS=g.THREE_DAYS=g.ONE_DAY=g.TWENTY_FOUR_HOURS=g.TWELVE_HOURS=g.SIX_HOURS=g.THREE_HOURS=g.ONE_HOUR=g.SIXTY_MINUTES=g.THIRTY_MINUTES=g.TEN_MINUTES=g.FIVE_MINUTES=g.ONE_MINUTE=g.SIXTY_SECONDS=g.THIRTY_SECONDS=g.TEN_SECONDS=g.FIVE_SECONDS=g.ONE_SECOND=void 0,g.ONE_SECOND=1,g.FIVE_SECONDS=5,g.TEN_SECONDS=10,g.THIRTY_SECONDS=30,g.SIXTY_SECONDS=60,g.ONE_MINUTE=g.SIXTY_SECONDS,g.FIVE_MINUTES=5*g.ONE_MINUTE,g.TEN_MINUTES=10*g.ONE_MINUTE,g.THIRTY_MINUTES=30*g.ONE_MINUTE,g.SIXTY_MINUTES=60*g.ONE_MINUTE,g.ONE_HOUR=g.SIXTY_MINUTES,g.THREE_HOURS=3*g.ONE_HOUR,g.SIX_HOURS=6*g.ONE_HOUR,g.TWELVE_HOURS=12*g.ONE_HOUR,g.TWENTY_FOUR_HOURS=24*g.ONE_HOUR,g.ONE_DAY=g.TWENTY_FOUR_HOURS,g.THREE_DAYS=3*g.ONE_DAY,g.FIVE_DAYS=5*g.ONE_DAY,g.SEVEN_DAYS=7*g.ONE_DAY,g.THIRTY_DAYS=30*g.ONE_DAY,g.ONE_WEEK=g.SEVEN_DAYS,g.TWO_WEEKS=2*g.ONE_WEEK,g.THREE_WEEKS=3*g.ONE_WEEK,g.FOUR_WEEKS=4*g.ONE_WEEK,g.ONE_YEAR=365*g.ONE_DAY},14611:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});const R=D(80017);R.__exportStar(D(47344),g),R.__exportStar(D(1429),g),R.__exportStar(D(40214),g),R.__exportStar(D(78847),g)},40214:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),D(80017).__exportStar(D(47997),g)},47997:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.IWatch=void 0,g.IWatch=class D{}},45442:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.fromMiliseconds=g.toMiliseconds=void 0;const R=D(78847);g.toMiliseconds=function re(ce){return ce*R.ONE_THOUSAND},g.fromMiliseconds=function ne(ce){return Math.floor(ce/R.ONE_THOUSAND)}},67406:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.delay=void 0,g.delay=function D(R){return new Promise(re=>{setTimeout(()=>{re(!0)},R)})}},47344:(Pe,g,D)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0});const R=D(80017);R.__exportStar(D(67406),g),R.__exportStar(D(45442),g)},1429:(Pe,g)=>{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.Watch=void 0;class D{constructor(){this.timestamps=new Map}start(re){if(this.timestamps.has(re))throw new Error(`Watch already started for label: ${re}`);this.timestamps.set(re,{started:Date.now()})}stop(re){const ne=this.get(re);if(typeof ne.elapsed<"u")throw new Error(`Watch already stopped for label: ${re}`);const ce=Date.now()-ne.started;this.timestamps.set(re,{started:ne.started,elapsed:ce})}get(re){const ne=this.timestamps.get(re);if(typeof ne>"u")throw new Error(`No timestamp found for label: ${re}`);return ne}elapsed(re){const ne=this.get(re);return ne.elapsed||Date.now()-ne.started}}g.Watch=D,g.default=D},37167:(Pe,g)=>{"use strict";function D(de){let oe;return typeof window<"u"&&typeof window[de]<"u"&&(oe=window[de]),oe}function R(de){const oe=D(de);if(!oe)throw new Error(`${de} is not defined in Window`);return oe}Object.defineProperty(g,"__esModule",{value:!0}),g.getLocalStorage=g.getLocalStorageOrThrow=g.getCrypto=g.getCryptoOrThrow=g.getLocation=g.getLocationOrThrow=g.getNavigator=g.getNavigatorOrThrow=g.getDocument=g.getDocumentOrThrow=g.getFromWindowOrThrow=g.getFromWindow=void 0,g.getFromWindow=D,g.getFromWindowOrThrow=R,g.getDocumentOrThrow=function re(){return R("document")},g.getDocument=function ne(){return D("document")},g.getNavigatorOrThrow=function ce(){return R("navigator")},g.getNavigator=function $(){return D("navigator")},g.getLocationOrThrow=function ee(){return R("location")},g.getLocation=function L(){return D("location")},g.getCryptoOrThrow=function j(){return R("crypto")},g.getCrypto=function C(){return D("crypto")},g.getLocalStorageOrThrow=function U(){return R("localStorage")},g.getLocalStorage=function ue(){return D("localStorage")}},78359:(Pe,g,D)=>{"use strict";g.D=void 0;const re=D(37167);g.D=function ne(){let ce,$;try{ce=re.getDocumentOrThrow(),$=re.getLocationOrThrow()}catch{return null}function L(..._e){const Se=ce.getElementsByTagName("meta");for(let xe=0;xeX.getAttribute(le)).filter(le=>!!le&&_e.includes(le));if(Z.length&&Z){const le=X.getAttribute("content");if(le)return le}}return""}const U=function j(){let _e=L("name","og:site_name","og:title","twitter:title");return _e||(_e=ce.title),_e}();return{description:function C(){return L("description","og:description","twitter:description","keywords")}(),url:$.origin,icons:function ee(){const _e=ce.getElementsByTagName("link"),Se=[];for(let xe=0;xe<_e.length;xe++){const X=_e[xe],Z=X.getAttribute("rel");if(Z&&Z.toLowerCase().indexOf("icon")>-1){const le=X.getAttribute("href");if(le)if(-1===le.toLowerCase().indexOf("https:")&&-1===le.toLowerCase().indexOf("http:")&&0!==le.indexOf("//")){let G=$.protocol+"//"+$.host;if(0===le.indexOf("/"))G+=le;else{const se=$.pathname.split("/");se.pop(),G+=se.join("/")+"/"+le}Se.push(G)}else 0===le.indexOf("//")?Se.push($.protocol+le):Se.push(le)}}return Se}(),name:U}}},75630:function(Pe,g){var ne,D=typeof self<"u"?self:this,R=function(){function ne(){this.fetch=!1,this.DOMException=D.DOMException}return ne.prototype=D,new ne}();ne=R,function($){var ee_searchParams="URLSearchParams"in ne,ee_iterable="Symbol"in ne&&"iterator"in Symbol,ee_blob="FileReader"in ne&&"Blob"in ne&&function(){try{return new Blob,!0}catch{return!1}}(),ee_formData="FormData"in ne,ee_arrayBuffer="ArrayBuffer"in ne;if(ee_arrayBuffer)var j=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],C=ArrayBuffer.isView||function(b){return b&&j.indexOf(Object.prototype.toString.call(b))>-1};function U(b){if("string"!=typeof b&&(b=String(b)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(b))throw new TypeError("Invalid character in header field name");return b.toLowerCase()}function ue(b){return"string"!=typeof b&&(b=String(b)),b}function de(b){var d={next:function(){var x=b.shift();return{done:void 0===x,value:x}}};return ee_iterable&&(d[Symbol.iterator]=function(){return d}),d}function oe(b){this.map={},b instanceof oe?b.forEach(function(d,x){this.append(x,d)},this):Array.isArray(b)?b.forEach(function(d){this.append(d[0],d[1])},this):b&&Object.getOwnPropertyNames(b).forEach(function(d){this.append(d,b[d])},this)}function I(b){if(b.bodyUsed)return Promise.reject(new TypeError("Already read"));b.bodyUsed=!0}function _e(b){return new Promise(function(d,x){b.onload=function(){d(b.result)},b.onerror=function(){x(b.error)}})}function Se(b){var d=new FileReader,x=_e(d);return d.readAsArrayBuffer(b),x}function Z(b){if(b.slice)return b.slice(0);var d=new Uint8Array(b.byteLength);return d.set(new Uint8Array(b)),d.buffer}function le(){return this.bodyUsed=!1,this._initBody=function(b){this._bodyInit=b,b?"string"==typeof b?this._bodyText=b:ee_blob&&Blob.prototype.isPrototypeOf(b)?this._bodyBlob=b:ee_formData&&FormData.prototype.isPrototypeOf(b)?this._bodyFormData=b:ee_searchParams&&URLSearchParams.prototype.isPrototypeOf(b)?this._bodyText=b.toString():ee_arrayBuffer&&ee_blob&&function L(b){return b&&DataView.prototype.isPrototypeOf(b)}(b)?(this._bodyArrayBuffer=Z(b.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):ee_arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(b)||C(b))?this._bodyArrayBuffer=Z(b):this._bodyText=b=Object.prototype.toString.call(b):this._bodyText="",this.headers.get("content-type")||("string"==typeof b?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):ee_searchParams&&URLSearchParams.prototype.isPrototypeOf(b)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},ee_blob&&(this.blob=function(){var b=I(this);if(b)return b;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?I(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Se)}),this.text=function(){var b=I(this);if(b)return b;if(this._bodyBlob)return function xe(b){var d=new FileReader,x=_e(d);return d.readAsText(b),x}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function X(b){for(var d=new Uint8Array(b),x=new Array(d.length),P=0;P-1?d:b}(d.method||this.method||"GET"),this.mode=d.mode||this.mode||null,this.signal=d.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&x)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(x)}function p(b){var d=new FormData;return b.trim().split("&").forEach(function(x){if(x){var P=x.split("="),N=P.shift().replace(/\+/g," "),E=P.join("=").replace(/\+/g," ");d.append(decodeURIComponent(N),decodeURIComponent(E))}}),d}function l(b){var d=new oe;return b.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(P){var N=P.split(":"),E=N.shift().trim();if(E){var H=N.join(":").trim();d.append(E,H)}}),d}function _(b,d){d||(d={}),this.type="default",this.status=void 0===d.status?200:d.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in d?d.statusText:"OK",this.headers=new oe(d.headers),this.url=d.url||"",this._initBody(b)}M.prototype.clone=function(){return new M(this,{body:this._bodyInit})},le.call(M.prototype),le.call(_.prototype),_.prototype.clone=function(){return new _(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new oe(this.headers),url:this.url})},_.error=function(){var b=new _(null,{status:0,statusText:""});return b.type="error",b};var v=[301,302,303,307,308];_.redirect=function(b,d){if(-1===v.indexOf(d))throw new RangeError("Invalid status code");return new _(null,{status:d,headers:{location:b}})},$.DOMException=ne.DOMException;try{new $.DOMException}catch{$.DOMException=function(d,x){this.message=d,this.name=x;var P=Error(d);this.stack=P.stack},$.DOMException.prototype=Object.create(Error.prototype),$.DOMException.prototype.constructor=$.DOMException}function S(b,d){return new Promise(function(x,P){var N=new M(b,d);if(N.signal&&N.signal.aborted)return P(new $.DOMException("Aborted","AbortError"));var E=new XMLHttpRequest;function H(){E.abort()}E.onload=function(){var fe={status:E.status,statusText:E.statusText,headers:l(E.getAllResponseHeaders()||"")};fe.url="responseURL"in E?E.responseURL:fe.headers.get("X-Request-URL"),x(new _("response"in E?E.response:E.responseText,fe))},E.onerror=function(){P(new TypeError("Network request failed"))},E.ontimeout=function(){P(new TypeError("Network request failed"))},E.onabort=function(){P(new $.DOMException("Aborted","AbortError"))},E.open(N.method,N.url,!0),"include"===N.credentials?E.withCredentials=!0:"omit"===N.credentials&&(E.withCredentials=!1),"responseType"in E&&ee_blob&&(E.responseType="blob"),N.headers.forEach(function(fe,J){E.setRequestHeader(J,fe)}),N.signal&&(N.signal.addEventListener("abort",H),E.onreadystatechange=function(){4===E.readyState&&N.signal.removeEventListener("abort",H)}),E.send(typeof N._bodyInit>"u"?null:N._bodyInit)})}S.polyfill=!0,ne.fetch||(ne.fetch=S,ne.Headers=oe,ne.Request=M,ne.Response=_),$.Headers=oe,$.Request=M,$.Response=_,$.fetch=S,Object.defineProperty($,"__esModule",{value:!0})}({}),R.fetch.ponyfill=!0,delete R.fetch.polyfill;var re=R;(g=re.fetch).default=re.fetch,g.fetch=re.fetch,g.Headers=re.Headers,g.Request=re.Request,g.Response=re.Response,Pe.exports=g},65361:Pe=>{"use strict";var g="%[a-f0-9]{2}",D=new RegExp("("+g+")|([^%]+?)","gi"),R=new RegExp("("+g+")+","gi");function re($,ee){try{return[decodeURIComponent($.join(""))]}catch{}if(1===$.length)return $;var L=$.slice(0,ee=ee||1),j=$.slice(ee);return Array.prototype.concat.call([],re(L),re(j))}function ne($){try{return decodeURIComponent($)}catch{for(var ee=$.match(D)||[],L=1;L{"use strict";Pe.exports=function(g,D){for(var R={},re=Object.keys(g),ne=Array.isArray(D),ce=0;ce{Pe=D.nmd(Pe);var re="__lodash_hash_undefined__",$=9007199254740991,ee="[object Arguments]",L="[object Array]",C="[object Boolean]",U="[object Date]",ue="[object Error]",de="[object Function]",I="[object Map]",_e="[object Number]",xe="[object Object]",X="[object Promise]",le="[object RegExp]",G="[object Set]",se="[object String]",l="[object WeakMap]",_="[object ArrayBuffer]",v="[object DataView]",Re=/^\[object .+?Constructor\]$/,ve=/^(?:0|[1-9]\d*)$/,we={};we["[object Float32Array]"]=we["[object Float64Array]"]=we["[object Int8Array]"]=we["[object Int16Array]"]=we["[object Int32Array]"]=we["[object Uint8Array]"]=we["[object Uint8ClampedArray]"]=we["[object Uint16Array]"]=we["[object Uint32Array]"]=!0,we[ee]=we[L]=we[_]=we[C]=we[v]=we[U]=we[ue]=we[de]=we[I]=we[_e]=we[xe]=we[le]=we[G]=we[se]=we[l]=!1;var Ce="object"==typeof global&&global&&global.Object===Object&&global,je="object"==typeof self&&self&&self.Object===Object&&self,Le=Ce||je||Function("return this")(),Y=g&&!g.nodeType&&g,he=Y&&Pe&&!Pe.nodeType&&Pe,Q=he&&he.exports===Y,y=Q&&Ce.process,K=function(){try{return y&&y.binding&&y.binding("util")}catch{}}(),Ae=K&&K.isTypedArray;function wt(F,k){for(var De=-1,Ue=null==F?0:F.length;++Detr))return!1;var Mt=Ze.get(F);if(Mt&&Ze.get(k))return Mt==k;var Ur=-1,Xr=!0,yr=2&De?new ai:void 0;for(Ze.set(F,k),Ze.set(k,F);++Ur-1},ln.prototype.set=function sa(F,k){var De=this.__data__,Ue=ts(De,F);return Ue<0?(++this.size,De.push([F,k])):De[Ue][1]=k,this},An.prototype.clear=function oa(){this.size=0,this.__data__={hash:new jt,map:new(fn||ln),string:new jt}},An.prototype.delete=function yc(F){var k=ci(this,F).delete(F);return this.size-=k?1:0,k},An.prototype.get=function Ls(F){return ci(this,F).get(F)},An.prototype.has=function vc(F){return ci(this,F).has(F)},An.prototype.set=function mc(F,k){var De=ci(this,F),Ue=De.size;return De.set(F,k),this.size+=De.size==Ue?0:1,this},ai.prototype.add=ai.prototype.push=function Ms(F){return this.__data__.set(F,re),this},ai.prototype.has=function es(F){return this.__data__.has(F)},Cn.prototype.clear=function Bs(){this.__data__=new ln,this.size=0},Cn.prototype.delete=function wr(F){var k=this.__data__,De=k.delete(F);return this.size=k.size,De},Cn.prototype.get=function Ir(F){return this.__data__.get(F)},Cn.prototype.has=function Oi(F){return this.__data__.has(F)},Cn.prototype.set=function Ri(F,k){var De=this.__data__;if(De instanceof ln){var Ue=De.__data__;if(!fn||Ue.length<199)return Ue.push([F,k]),this.size=++De.size,this;De=this.__data__=new An(Ue)}return De.set(F,k),this.size=De.size,this};var Js=cn?function(F){return null==F?[]:(F=Object(F),function He(F,k){for(var De=-1,Ue=null==F?0:F.length,Tt=0,Ze=[];++De-1&&F%1==0&&F-1&&F%1==0&&F<=$}function Ys(F){var k=typeof F;return null!=F&&("object"==k||"function"==k)}function fi(F){return null!=F&&"object"==typeof F}var qs=Ae?function _t(F){return function(k){return F(k)}}(Ae):function Hs(F){return fi(F)&&ss(F.length)&&!!we[ui(F)]};function Ci(F){return function Ws(F){return null!=F&&ss(F.length)&&!va(F)}(F)?function $s(F,k){var De=Ai(F),Ue=!De&&Vs(F),Tt=!De&&!Ue&&is(F),Ze=!De&&!Ue&&!Tt&&qs(F),Ht=De||Ue||Tt||Ze,tr=Ht?function ct(F,k){for(var De=-1,Ue=Array(F);++De{"use strict";const R=D(82915),re=D(65361),ne=D(95967),ce=D(10979),ee=Symbol("encodeFragmentIdentifier");function C(X){if("string"!=typeof X||1!==X.length)throw new TypeError("arrayFormatSeparator must be single character string")}function U(X,Z){return Z.encode?Z.strict?R(X):encodeURIComponent(X):X}function ue(X,Z){return Z.decode?re(X):X}function de(X){return Array.isArray(X)?X.sort():"object"==typeof X?de(Object.keys(X)).sort((Z,le)=>Number(Z)-Number(le)).map(Z=>X[Z]):X}function oe(X){const Z=X.indexOf("#");return-1!==Z&&(X=X.slice(0,Z)),X}function _e(X){const Z=(X=oe(X)).indexOf("?");return-1===Z?"":X.slice(Z+1)}function Se(X,Z){return Z.parseNumbers&&!Number.isNaN(Number(X))&&"string"==typeof X&&""!==X.trim()?X=Number(X):Z.parseBooleans&&null!==X&&("true"===X.toLowerCase()||"false"===X.toLowerCase())&&(X="true"===X.toLowerCase()),X}function xe(X,Z){C((Z=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},Z)).arrayFormatSeparator);const le=function j(X){let Z;switch(X.arrayFormat){case"index":return(le,G,se)=>{Z=/\[(\d*)\]$/.exec(le),le=le.replace(/\[\d*\]$/,""),Z?(void 0===se[le]&&(se[le]={}),se[le][Z[1]]=G):se[le]=G};case"bracket":return(le,G,se)=>{Z=/(\[\])$/.exec(le),se[le=le.replace(/\[\]$/,"")]=Z?void 0!==se[le]?[].concat(se[le],G):[G]:G};case"colon-list-separator":return(le,G,se)=>{Z=/(:list)$/.exec(le),se[le=le.replace(/:list$/,"")]=Z?void 0!==se[le]?[].concat(se[le],G):[G]:G};case"comma":case"separator":return(le,G,se)=>{const M="string"==typeof G&&G.includes(X.arrayFormatSeparator),p="string"==typeof G&&!M&&ue(G,X).includes(X.arrayFormatSeparator);G=p?ue(G,X):G;const l=M||p?G.split(X.arrayFormatSeparator).map(_=>ue(_,X)):null===G?G:ue(G,X);se[le]=l};case"bracket-separator":return(le,G,se)=>{const M=/(\[\])$/.test(le);if(le=le.replace(/\[\]$/,""),!M)return void(se[le]=G&&ue(G,X));const p=null===G?[]:G.split(X.arrayFormatSeparator).map(l=>ue(l,X));se[le]=void 0!==se[le]?[].concat(se[le],p):p};default:return(le,G,se)=>{se[le]=void 0!==se[le]?[].concat(se[le],G):G}}}(Z),G=Object.create(null);if("string"!=typeof X||!(X=X.trim().replace(/^[?#&]/,"")))return G;for(const se of X.split("&")){if(""===se)continue;let[M,p]=ne(Z.decode?se.replace(/\+/g," "):se,"=");p=void 0===p?null:["comma","separator","bracket-separator"].includes(Z.arrayFormat)?p:ue(p,Z),le(ue(M,Z),p,G)}for(const se of Object.keys(G)){const M=G[se];if("object"==typeof M&&null!==M)for(const p of Object.keys(M))M[p]=Se(M[p],Z);else G[se]=Se(M,Z)}return!1===Z.sort?G:(!0===Z.sort?Object.keys(G).sort():Object.keys(G).sort(Z.sort)).reduce((se,M)=>{const p=G[M];return se[M]=Boolean(p)&&"object"==typeof p&&!Array.isArray(p)?de(p):p,se},Object.create(null))}g.extract=_e,g.parse=xe,g.stringify=(X,Z)=>{if(!X)return"";C((Z=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},Z)).arrayFormatSeparator);const le=p=>Z.skipNull&&(X=>null==X)(X[p])||Z.skipEmptyString&&""===X[p],G=function L(X){switch(X.arrayFormat){case"index":return Z=>(le,G)=>{const se=le.length;return void 0===G||X.skipNull&&null===G||X.skipEmptyString&&""===G?le:null===G?[...le,[U(Z,X),"[",se,"]"].join("")]:[...le,[U(Z,X),"[",U(se,X),"]=",U(G,X)].join("")]};case"bracket":return Z=>(le,G)=>void 0===G||X.skipNull&&null===G||X.skipEmptyString&&""===G?le:null===G?[...le,[U(Z,X),"[]"].join("")]:[...le,[U(Z,X),"[]=",U(G,X)].join("")];case"colon-list-separator":return Z=>(le,G)=>void 0===G||X.skipNull&&null===G||X.skipEmptyString&&""===G?le:null===G?[...le,[U(Z,X),":list="].join("")]:[...le,[U(Z,X),":list=",U(G,X)].join("")];case"comma":case"separator":case"bracket-separator":{const Z="bracket-separator"===X.arrayFormat?"[]=":"=";return le=>(G,se)=>void 0===se||X.skipNull&&null===se||X.skipEmptyString&&""===se?G:(se=null===se?"":se,0===G.length?[[U(le,X),Z,U(se,X)].join("")]:[[G,U(se,X)].join(X.arrayFormatSeparator)])}default:return Z=>(le,G)=>void 0===G||X.skipNull&&null===G||X.skipEmptyString&&""===G?le:null===G?[...le,U(Z,X)]:[...le,[U(Z,X),"=",U(G,X)].join("")]}}(Z),se={};for(const p of Object.keys(X))le(p)||(se[p]=X[p]);const M=Object.keys(se);return!1!==Z.sort&&M.sort(Z.sort),M.map(p=>{const l=X[p];return void 0===l?"":null===l?U(p,Z):Array.isArray(l)?0===l.length&&"bracket-separator"===Z.arrayFormat?U(p,Z)+"[]":l.reduce(G(p),[]).join("&"):U(p,Z)+"="+U(l,Z)}).filter(p=>p.length>0).join("&")},g.parseUrl=(X,Z)=>{Z=Object.assign({decode:!0},Z);const[le,G]=ne(X,"#");return Object.assign({url:le.split("?")[0]||"",query:xe(_e(X),Z)},Z&&Z.parseFragmentIdentifier&&G?{fragmentIdentifier:ue(G,Z)}:{})},g.stringifyUrl=(X,Z)=>{Z=Object.assign({encode:!0,strict:!0,[ee]:!0},Z);const le=oe(X.url).split("?")[0]||"",G=g.extract(X.url),se=g.parse(G,{sort:!1}),M=Object.assign(se,X.query);let p=g.stringify(M,Z);p&&(p=`?${p}`);let l=function I(X){let Z="";const le=X.indexOf("#");return-1!==le&&(Z=X.slice(le)),Z}(X.url);return X.fragmentIdentifier&&(l=`#${Z[ee]?U(X.fragmentIdentifier,Z):X.fragmentIdentifier}`),`${le}${p}${l}`},g.pick=(X,Z,le)=>{le=Object.assign({parseFragmentIdentifier:!0,[ee]:!1},le);const{url:G,query:se,fragmentIdentifier:M}=g.parseUrl(X,le);return g.stringifyUrl({url:G,query:ce(se,Z),fragmentIdentifier:M},le)},g.exclude=(X,Z,le)=>{const G=Array.isArray(Z)?se=>!Z.includes(se):(se,M)=>!Z(se,M);return g.pick(X,G,le)}},71778:Pe=>{"use strict";function g(R){try{return JSON.stringify(R)}catch{return'"[Circular]"'}}Pe.exports=function D(R,re,ne){var ce=ne&&ne.stringify||g;if("object"==typeof R&&null!==R){var ee=re.length+1;if(1===ee)return R;var L=new Array(ee);L[0]=ce(R);for(var j=1;j-1?de:0,R.charCodeAt(I+1)){case 100:case 102:if(ue>=C||null==re[ue])break;de=C||null==re[ue])break;de=C||void 0===re[ue])break;de",de=I+2,I++;break}U+=ce(re[ue]),de=I+2,I++;break;case 115:if(ue>=C)break;de{"use strict";Object.defineProperty(g,"__esModule",{value:!0}),g.safeJsonParse=function D(re){if("string"!=typeof re)throw new Error("Cannot safe json parse value of type "+typeof re);try{return JSON.parse(re)}catch{return re}},g.safeJsonStringify=function R(re){return"string"==typeof re?re:JSON.stringify(re,(ne,ce)=>typeof ce>"u"?null:ce)}},95967:Pe=>{"use strict";Pe.exports=(g,D)=>{if("string"!=typeof g||"string"!=typeof D)throw new TypeError("Expected the arguments to be of type `string`");if(""===D)return[g];const R=g.indexOf(D);return-1===R?[g]:[g.slice(0,R),g.slice(R+D.length)]}},82915:Pe=>{"use strict";Pe.exports=g=>encodeURIComponent(g).replace(/[!'()*]/g,D=>`%${D.charCodeAt(0).toString(16).toUpperCase()}`)},44813:Pe=>{"use strict";Pe.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},33172:(Pe,g,D)=>{"use strict";D.r(g),D.d(g,{__assign:()=>ne,__asyncDelegator:()=>X,__asyncGenerator:()=>xe,__asyncValues:()=>Z,__await:()=>Se,__awaiter:()=>j,__classPrivateFieldGet:()=>M,__classPrivateFieldSet:()=>p,__createBinding:()=>U,__decorate:()=>$,__exportStar:()=>ue,__extends:()=>re,__generator:()=>C,__importDefault:()=>se,__importStar:()=>G,__makeTemplateObject:()=>le,__metadata:()=>L,__param:()=>ee,__read:()=>oe,__rest:()=>ce,__spread:()=>I,__spreadArrays:()=>_e,__values:()=>de});var R=function(l,_){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,S){v.__proto__=S}||function(v,S){for(var b in S)S.hasOwnProperty(b)&&(v[b]=S[b])})(l,_)};function re(l,_){function v(){this.constructor=l}R(l,_),l.prototype=null===_?Object.create(_):(v.prototype=_.prototype,new v)}var ne=function(){return ne=Object.assign||function(_){for(var v,S=1,b=arguments.length;S=0;P--)(x=l[P])&&(d=(b<3?x(d):b>3?x(_,v,d):x(_,v))||d);return b>3&&d&&Object.defineProperty(_,v,d),d}function ee(l,_){return function(v,S){_(v,S,l)}}function L(l,_){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(l,_)}function j(l,_,v,S){return new(v||(v=Promise))(function(d,x){function P(H){try{E(S.next(H))}catch(fe){x(fe)}}function N(H){try{E(S.throw(H))}catch(fe){x(fe)}}function E(H){H.done?d(H.value):function b(d){return d instanceof v?d:new v(function(x){x(d)})}(H.value).then(P,N)}E((S=S.apply(l,_||[])).next())})}function C(l,_){var S,b,d,x,v={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return x={next:P(0),throw:P(1),return:P(2)},"function"==typeof Symbol&&(x[Symbol.iterator]=function(){return this}),x;function P(E){return function(H){return function N(E){if(S)throw new TypeError("Generator is already executing.");for(;v;)try{if(S=1,b&&(d=2&E[0]?b.return:E[0]?b.throw||((d=b.return)&&d.call(b),0):b.next)&&!(d=d.call(b,E[1])).done)return d;switch(b=0,d&&(E=[2&E[0],d.value]),E[0]){case 0:case 1:d=E;break;case 4:return v.label++,{value:E[1],done:!1};case 5:v.label++,b=E[1],E=[0];continue;case 7:E=v.ops.pop(),v.trys.pop();continue;default:if(!(d=(d=v.trys).length>0&&d[d.length-1])&&(6===E[0]||2===E[0])){v=0;continue}if(3===E[0]&&(!d||E[1]>d[0]&&E[1]=l.length&&(l=void 0),{value:l&&l[S++],done:!l}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")}function oe(l,_){var v="function"==typeof Symbol&&l[Symbol.iterator];if(!v)return l;var b,x,S=v.call(l),d=[];try{for(;(void 0===_||_-- >0)&&!(b=S.next()).done;)d.push(b.value)}catch(P){x={error:P}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(x)throw x.error}}return d}function I(){for(var l=[],_=0;_1||P(J,Re)})})}function P(J,Re){try{!function N(J){J.value instanceof Se?Promise.resolve(J.value.v).then(E,H):fe(d[0][2],J)}(S[J](Re))}catch(ve){fe(d[0][3],ve)}}function E(J){P("next",J)}function H(J){P("throw",J)}function fe(J,Re){J(Re),d.shift(),d.length&&P(d[0][0],d[0][1])}}function X(l){var _,v;return _={},S("next"),S("throw",function(b){throw b}),S("return"),_[Symbol.iterator]=function(){return this},_;function S(b,d){_[b]=l[b]?function(x){return(v=!v)?{value:Se(l[b](x)),done:"return"===b}:d?d(x):x}:d}}function Z(l){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v,_=l[Symbol.asyncIterator];return _?_.call(l):(l=de(l),v={},S("next"),S("throw"),S("return"),v[Symbol.asyncIterator]=function(){return this},v);function S(d){v[d]=l[d]&&function(x){return new Promise(function(P,N){!function b(d,x,P,N){Promise.resolve(N).then(function(E){d({value:E,done:P})},x)}(P,N,(x=l[d](x)).done,x.value)})}}}function le(l,_){return Object.defineProperty?Object.defineProperty(l,"raw",{value:_}):l.raw=_,l}function G(l){if(l&&l.__esModule)return l;var _={};if(null!=l)for(var v in l)Object.hasOwnProperty.call(l,v)&&(_[v]=l[v]);return _.default=l,_}function se(l){return l&&l.__esModule?l:{default:l}}function M(l,_){if(!_.has(l))throw new TypeError("attempted to get private field on non-instance");return _.get(l)}function p(l,_,v){if(!_.has(l))throw new TypeError("attempted to set private field on non-instance");return _.set(l,v),v}},83411:(Pe,g,D)=>{"use strict";D.r(g),D.d(g,{__assign:()=>ne,__asyncDelegator:()=>X,__asyncGenerator:()=>xe,__asyncValues:()=>Z,__await:()=>Se,__awaiter:()=>j,__classPrivateFieldGet:()=>M,__classPrivateFieldSet:()=>p,__createBinding:()=>U,__decorate:()=>$,__exportStar:()=>ue,__extends:()=>re,__generator:()=>C,__importDefault:()=>se,__importStar:()=>G,__makeTemplateObject:()=>le,__metadata:()=>L,__param:()=>ee,__read:()=>oe,__rest:()=>ce,__spread:()=>I,__spreadArrays:()=>_e,__values:()=>de});var R=function(l,_){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,S){v.__proto__=S}||function(v,S){for(var b in S)S.hasOwnProperty(b)&&(v[b]=S[b])})(l,_)};function re(l,_){function v(){this.constructor=l}R(l,_),l.prototype=null===_?Object.create(_):(v.prototype=_.prototype,new v)}var ne=function(){return ne=Object.assign||function(_){for(var v,S=1,b=arguments.length;S=0;P--)(x=l[P])&&(d=(b<3?x(d):b>3?x(_,v,d):x(_,v))||d);return b>3&&d&&Object.defineProperty(_,v,d),d}function ee(l,_){return function(v,S){_(v,S,l)}}function L(l,_){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(l,_)}function j(l,_,v,S){return new(v||(v=Promise))(function(d,x){function P(H){try{E(S.next(H))}catch(fe){x(fe)}}function N(H){try{E(S.throw(H))}catch(fe){x(fe)}}function E(H){H.done?d(H.value):function b(d){return d instanceof v?d:new v(function(x){x(d)})}(H.value).then(P,N)}E((S=S.apply(l,_||[])).next())})}function C(l,_){var S,b,d,x,v={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return x={next:P(0),throw:P(1),return:P(2)},"function"==typeof Symbol&&(x[Symbol.iterator]=function(){return this}),x;function P(E){return function(H){return function N(E){if(S)throw new TypeError("Generator is already executing.");for(;v;)try{if(S=1,b&&(d=2&E[0]?b.return:E[0]?b.throw||((d=b.return)&&d.call(b),0):b.next)&&!(d=d.call(b,E[1])).done)return d;switch(b=0,d&&(E=[2&E[0],d.value]),E[0]){case 0:case 1:d=E;break;case 4:return v.label++,{value:E[1],done:!1};case 5:v.label++,b=E[1],E=[0];continue;case 7:E=v.ops.pop(),v.trys.pop();continue;default:if(!(d=(d=v.trys).length>0&&d[d.length-1])&&(6===E[0]||2===E[0])){v=0;continue}if(3===E[0]&&(!d||E[1]>d[0]&&E[1]=l.length&&(l=void 0),{value:l&&l[S++],done:!l}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")}function oe(l,_){var v="function"==typeof Symbol&&l[Symbol.iterator];if(!v)return l;var b,x,S=v.call(l),d=[];try{for(;(void 0===_||_-- >0)&&!(b=S.next()).done;)d.push(b.value)}catch(P){x={error:P}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(x)throw x.error}}return d}function I(){for(var l=[],_=0;_1||P(J,Re)})})}function P(J,Re){try{!function N(J){J.value instanceof Se?Promise.resolve(J.value.v).then(E,H):fe(d[0][2],J)}(S[J](Re))}catch(ve){fe(d[0][3],ve)}}function E(J){P("next",J)}function H(J){P("throw",J)}function fe(J,Re){J(Re),d.shift(),d.length&&P(d[0][0],d[0][1])}}function X(l){var _,v;return _={},S("next"),S("throw",function(b){throw b}),S("return"),_[Symbol.iterator]=function(){return this},_;function S(b,d){_[b]=l[b]?function(x){return(v=!v)?{value:Se(l[b](x)),done:"return"===b}:d?d(x):x}:d}}function Z(l){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v,_=l[Symbol.asyncIterator];return _?_.call(l):(l=de(l),v={},S("next"),S("throw"),S("return"),v[Symbol.asyncIterator]=function(){return this},v);function S(d){v[d]=l[d]&&function(x){return new Promise(function(P,N){!function b(d,x,P,N){Promise.resolve(N).then(function(E){d({value:E,done:P})},x)}(P,N,(x=l[d](x)).done,x.value)})}}}function le(l,_){return Object.defineProperty?Object.defineProperty(l,"raw",{value:_}):l.raw=_,l}function G(l){if(l&&l.__esModule)return l;var _={};if(null!=l)for(var v in l)Object.hasOwnProperty.call(l,v)&&(_[v]=l[v]);return _.default=l,_}function se(l){return l&&l.__esModule?l:{default:l}}function M(l,_){if(!_.has(l))throw new TypeError("attempted to get private field on non-instance");return _.get(l)}function p(l,_,v){if(!_.has(l))throw new TypeError("attempted to set private field on non-instance");return _.set(l,v),v}},57436:(Pe,g,D)=>{"use strict";D.r(g),D.d(g,{__assign:()=>ne,__asyncDelegator:()=>X,__asyncGenerator:()=>xe,__asyncValues:()=>Z,__await:()=>Se,__awaiter:()=>j,__classPrivateFieldGet:()=>M,__classPrivateFieldSet:()=>p,__createBinding:()=>U,__decorate:()=>$,__exportStar:()=>ue,__extends:()=>re,__generator:()=>C,__importDefault:()=>se,__importStar:()=>G,__makeTemplateObject:()=>le,__metadata:()=>L,__param:()=>ee,__read:()=>oe,__rest:()=>ce,__spread:()=>I,__spreadArrays:()=>_e,__values:()=>de});var R=function(l,_){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,S){v.__proto__=S}||function(v,S){for(var b in S)S.hasOwnProperty(b)&&(v[b]=S[b])})(l,_)};function re(l,_){function v(){this.constructor=l}R(l,_),l.prototype=null===_?Object.create(_):(v.prototype=_.prototype,new v)}var ne=function(){return ne=Object.assign||function(_){for(var v,S=1,b=arguments.length;S=0;P--)(x=l[P])&&(d=(b<3?x(d):b>3?x(_,v,d):x(_,v))||d);return b>3&&d&&Object.defineProperty(_,v,d),d}function ee(l,_){return function(v,S){_(v,S,l)}}function L(l,_){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(l,_)}function j(l,_,v,S){return new(v||(v=Promise))(function(d,x){function P(H){try{E(S.next(H))}catch(fe){x(fe)}}function N(H){try{E(S.throw(H))}catch(fe){x(fe)}}function E(H){H.done?d(H.value):function b(d){return d instanceof v?d:new v(function(x){x(d)})}(H.value).then(P,N)}E((S=S.apply(l,_||[])).next())})}function C(l,_){var S,b,d,x,v={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return x={next:P(0),throw:P(1),return:P(2)},"function"==typeof Symbol&&(x[Symbol.iterator]=function(){return this}),x;function P(E){return function(H){return function N(E){if(S)throw new TypeError("Generator is already executing.");for(;v;)try{if(S=1,b&&(d=2&E[0]?b.return:E[0]?b.throw||((d=b.return)&&d.call(b),0):b.next)&&!(d=d.call(b,E[1])).done)return d;switch(b=0,d&&(E=[2&E[0],d.value]),E[0]){case 0:case 1:d=E;break;case 4:return v.label++,{value:E[1],done:!1};case 5:v.label++,b=E[1],E=[0];continue;case 7:E=v.ops.pop(),v.trys.pop();continue;default:if(!(d=(d=v.trys).length>0&&d[d.length-1])&&(6===E[0]||2===E[0])){v=0;continue}if(3===E[0]&&(!d||E[1]>d[0]&&E[1]=l.length&&(l=void 0),{value:l&&l[S++],done:!l}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")}function oe(l,_){var v="function"==typeof Symbol&&l[Symbol.iterator];if(!v)return l;var b,x,S=v.call(l),d=[];try{for(;(void 0===_||_-- >0)&&!(b=S.next()).done;)d.push(b.value)}catch(P){x={error:P}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(x)throw x.error}}return d}function I(){for(var l=[],_=0;_1||P(J,Re)})})}function P(J,Re){try{!function N(J){J.value instanceof Se?Promise.resolve(J.value.v).then(E,H):fe(d[0][2],J)}(S[J](Re))}catch(ve){fe(d[0][3],ve)}}function E(J){P("next",J)}function H(J){P("throw",J)}function fe(J,Re){J(Re),d.shift(),d.length&&P(d[0][0],d[0][1])}}function X(l){var _,v;return _={},S("next"),S("throw",function(b){throw b}),S("return"),_[Symbol.iterator]=function(){return this},_;function S(b,d){_[b]=l[b]?function(x){return(v=!v)?{value:Se(l[b](x)),done:"return"===b}:d?d(x):x}:d}}function Z(l){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v,_=l[Symbol.asyncIterator];return _?_.call(l):(l=de(l),v={},S("next"),S("throw"),S("return"),v[Symbol.asyncIterator]=function(){return this},v);function S(d){v[d]=l[d]&&function(x){return new Promise(function(P,N){!function b(d,x,P,N){Promise.resolve(N).then(function(E){d({value:E,done:P})},x)}(P,N,(x=l[d](x)).done,x.value)})}}}function le(l,_){return Object.defineProperty?Object.defineProperty(l,"raw",{value:_}):l.raw=_,l}function G(l){if(l&&l.__esModule)return l;var _={};if(null!=l)for(var v in l)Object.hasOwnProperty.call(l,v)&&(_[v]=l[v]);return _.default=l,_}function se(l){return l&&l.__esModule?l:{default:l}}function M(l,_){if(!_.has(l))throw new TypeError("attempted to get private field on non-instance");return _.get(l)}function p(l,_,v){if(!_.has(l))throw new TypeError("attempted to set private field on non-instance");return _.set(l,v),v}},17978:(Pe,g,D)=>{"use strict";D.r(g),D.d(g,{__assign:()=>ne,__asyncDelegator:()=>X,__asyncGenerator:()=>xe,__asyncValues:()=>Z,__await:()=>Se,__awaiter:()=>j,__classPrivateFieldGet:()=>M,__classPrivateFieldSet:()=>p,__createBinding:()=>U,__decorate:()=>$,__exportStar:()=>ue,__extends:()=>re,__generator:()=>C,__importDefault:()=>se,__importStar:()=>G,__makeTemplateObject:()=>le,__metadata:()=>L,__param:()=>ee,__read:()=>oe,__rest:()=>ce,__spread:()=>I,__spreadArrays:()=>_e,__values:()=>de});var R=function(l,_){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,S){v.__proto__=S}||function(v,S){for(var b in S)S.hasOwnProperty(b)&&(v[b]=S[b])})(l,_)};function re(l,_){function v(){this.constructor=l}R(l,_),l.prototype=null===_?Object.create(_):(v.prototype=_.prototype,new v)}var ne=function(){return ne=Object.assign||function(_){for(var v,S=1,b=arguments.length;S=0;P--)(x=l[P])&&(d=(b<3?x(d):b>3?x(_,v,d):x(_,v))||d);return b>3&&d&&Object.defineProperty(_,v,d),d}function ee(l,_){return function(v,S){_(v,S,l)}}function L(l,_){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(l,_)}function j(l,_,v,S){return new(v||(v=Promise))(function(d,x){function P(H){try{E(S.next(H))}catch(fe){x(fe)}}function N(H){try{E(S.throw(H))}catch(fe){x(fe)}}function E(H){H.done?d(H.value):function b(d){return d instanceof v?d:new v(function(x){x(d)})}(H.value).then(P,N)}E((S=S.apply(l,_||[])).next())})}function C(l,_){var S,b,d,x,v={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return x={next:P(0),throw:P(1),return:P(2)},"function"==typeof Symbol&&(x[Symbol.iterator]=function(){return this}),x;function P(E){return function(H){return function N(E){if(S)throw new TypeError("Generator is already executing.");for(;v;)try{if(S=1,b&&(d=2&E[0]?b.return:E[0]?b.throw||((d=b.return)&&d.call(b),0):b.next)&&!(d=d.call(b,E[1])).done)return d;switch(b=0,d&&(E=[2&E[0],d.value]),E[0]){case 0:case 1:d=E;break;case 4:return v.label++,{value:E[1],done:!1};case 5:v.label++,b=E[1],E=[0];continue;case 7:E=v.ops.pop(),v.trys.pop();continue;default:if(!(d=(d=v.trys).length>0&&d[d.length-1])&&(6===E[0]||2===E[0])){v=0;continue}if(3===E[0]&&(!d||E[1]>d[0]&&E[1]=l.length&&(l=void 0),{value:l&&l[S++],done:!l}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")}function oe(l,_){var v="function"==typeof Symbol&&l[Symbol.iterator];if(!v)return l;var b,x,S=v.call(l),d=[];try{for(;(void 0===_||_-- >0)&&!(b=S.next()).done;)d.push(b.value)}catch(P){x={error:P}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(x)throw x.error}}return d}function I(){for(var l=[],_=0;_1||P(J,Re)})})}function P(J,Re){try{!function N(J){J.value instanceof Se?Promise.resolve(J.value.v).then(E,H):fe(d[0][2],J)}(S[J](Re))}catch(ve){fe(d[0][3],ve)}}function E(J){P("next",J)}function H(J){P("throw",J)}function fe(J,Re){J(Re),d.shift(),d.length&&P(d[0][0],d[0][1])}}function X(l){var _,v;return _={},S("next"),S("throw",function(b){throw b}),S("return"),_[Symbol.iterator]=function(){return this},_;function S(b,d){_[b]=l[b]?function(x){return(v=!v)?{value:Se(l[b](x)),done:"return"===b}:d?d(x):x}:d}}function Z(l){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v,_=l[Symbol.asyncIterator];return _?_.call(l):(l=de(l),v={},S("next"),S("throw"),S("return"),v[Symbol.asyncIterator]=function(){return this},v);function S(d){v[d]=l[d]&&function(x){return new Promise(function(P,N){!function b(d,x,P,N){Promise.resolve(N).then(function(E){d({value:E,done:P})},x)}(P,N,(x=l[d](x)).done,x.value)})}}}function le(l,_){return Object.defineProperty?Object.defineProperty(l,"raw",{value:_}):l.raw=_,l}function G(l){if(l&&l.__esModule)return l;var _={};if(null!=l)for(var v in l)Object.hasOwnProperty.call(l,v)&&(_[v]=l[v]);return _.default=l,_}function se(l){return l&&l.__esModule?l:{default:l}}function M(l,_){if(!_.has(l))throw new TypeError("attempted to get private field on non-instance");return _.get(l)}function p(l,_,v){if(!_.has(l))throw new TypeError("attempted to set private field on non-instance");return _.set(l,v),v}},80017:(Pe,g,D)=>{"use strict";D.r(g),D.d(g,{__assign:()=>ne,__asyncDelegator:()=>X,__asyncGenerator:()=>xe,__asyncValues:()=>Z,__await:()=>Se,__awaiter:()=>j,__classPrivateFieldGet:()=>M,__classPrivateFieldSet:()=>p,__createBinding:()=>U,__decorate:()=>$,__exportStar:()=>ue,__extends:()=>re,__generator:()=>C,__importDefault:()=>se,__importStar:()=>G,__makeTemplateObject:()=>le,__metadata:()=>L,__param:()=>ee,__read:()=>oe,__rest:()=>ce,__spread:()=>I,__spreadArrays:()=>_e,__values:()=>de});var R=function(l,_){return(R=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,S){v.__proto__=S}||function(v,S){for(var b in S)S.hasOwnProperty(b)&&(v[b]=S[b])})(l,_)};function re(l,_){function v(){this.constructor=l}R(l,_),l.prototype=null===_?Object.create(_):(v.prototype=_.prototype,new v)}var ne=function(){return ne=Object.assign||function(_){for(var v,S=1,b=arguments.length;S=0;P--)(x=l[P])&&(d=(b<3?x(d):b>3?x(_,v,d):x(_,v))||d);return b>3&&d&&Object.defineProperty(_,v,d),d}function ee(l,_){return function(v,S){_(v,S,l)}}function L(l,_){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(l,_)}function j(l,_,v,S){return new(v||(v=Promise))(function(d,x){function P(H){try{E(S.next(H))}catch(fe){x(fe)}}function N(H){try{E(S.throw(H))}catch(fe){x(fe)}}function E(H){H.done?d(H.value):function b(d){return d instanceof v?d:new v(function(x){x(d)})}(H.value).then(P,N)}E((S=S.apply(l,_||[])).next())})}function C(l,_){var S,b,d,x,v={label:0,sent:function(){if(1&d[0])throw d[1];return d[1]},trys:[],ops:[]};return x={next:P(0),throw:P(1),return:P(2)},"function"==typeof Symbol&&(x[Symbol.iterator]=function(){return this}),x;function P(E){return function(H){return function N(E){if(S)throw new TypeError("Generator is already executing.");for(;v;)try{if(S=1,b&&(d=2&E[0]?b.return:E[0]?b.throw||((d=b.return)&&d.call(b),0):b.next)&&!(d=d.call(b,E[1])).done)return d;switch(b=0,d&&(E=[2&E[0],d.value]),E[0]){case 0:case 1:d=E;break;case 4:return v.label++,{value:E[1],done:!1};case 5:v.label++,b=E[1],E=[0];continue;case 7:E=v.ops.pop(),v.trys.pop();continue;default:if(!(d=(d=v.trys).length>0&&d[d.length-1])&&(6===E[0]||2===E[0])){v=0;continue}if(3===E[0]&&(!d||E[1]>d[0]&&E[1]=l.length&&(l=void 0),{value:l&&l[S++],done:!l}}};throw new TypeError(_?"Object is not iterable.":"Symbol.iterator is not defined.")}function oe(l,_){var v="function"==typeof Symbol&&l[Symbol.iterator];if(!v)return l;var b,x,S=v.call(l),d=[];try{for(;(void 0===_||_-- >0)&&!(b=S.next()).done;)d.push(b.value)}catch(P){x={error:P}}finally{try{b&&!b.done&&(v=S.return)&&v.call(S)}finally{if(x)throw x.error}}return d}function I(){for(var l=[],_=0;_1||P(J,Re)})})}function P(J,Re){try{!function N(J){J.value instanceof Se?Promise.resolve(J.value.v).then(E,H):fe(d[0][2],J)}(S[J](Re))}catch(ve){fe(d[0][3],ve)}}function E(J){P("next",J)}function H(J){P("throw",J)}function fe(J,Re){J(Re),d.shift(),d.length&&P(d[0][0],d[0][1])}}function X(l){var _,v;return _={},S("next"),S("throw",function(b){throw b}),S("return"),_[Symbol.iterator]=function(){return this},_;function S(b,d){_[b]=l[b]?function(x){return(v=!v)?{value:Se(l[b](x)),done:"return"===b}:d?d(x):x}:d}}function Z(l){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var v,_=l[Symbol.asyncIterator];return _?_.call(l):(l=de(l),v={},S("next"),S("throw"),S("return"),v[Symbol.asyncIterator]=function(){return this},v);function S(d){v[d]=l[d]&&function(x){return new Promise(function(P,N){!function b(d,x,P,N){Promise.resolve(N).then(function(E){d({value:E,done:P})},x)}(P,N,(x=l[d](x)).done,x.value)})}}}function le(l,_){return Object.defineProperty?Object.defineProperty(l,"raw",{value:_}):l.raw=_,l}function G(l){if(l&&l.__esModule)return l;var _={};if(null!=l)for(var v in l)Object.hasOwnProperty.call(l,v)&&(_[v]=l[v]);return _.default=l,_}function se(l){return l&&l.__esModule?l:{default:l}}function M(l,_){if(!_.has(l))throw new TypeError("attempted to get private field on non-instance");return _.get(l)}function p(l,_,v){if(!_.has(l))throw new TypeError("attempted to set private field on non-instance");return _.set(l,v),v}},22694:(Pe,g,D)=>{"use strict";const R=D(71778);Pe.exports=$;const re=function se(){function M(p){return typeof p<"u"&&p}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return M(self)||M(window)||M(this)||{}}}().console||{},ne={mapHttpRequest:_e,mapHttpResponse:_e,wrapRequestSerializer:Se,wrapResponseSerializer:Se,wrapErrorSerializer:Se,req:_e,res:_e,err:function oe(M){const p={type:M.constructor.name,msg:M.message,stack:M.stack};for(const l in M)void 0===p[l]&&(p[l]=M[l]);return p}};function $(M){(M=M||{}).browser=M.browser||{};const p=M.browser.transmit;if(p&&"function"!=typeof p.send)throw Error("pino: transmit option must have a send function");const l=M.browser.write||re;M.browser.write&&(M.browser.asObject=!0);const _=M.serializers||{},v=function ce(M,p){return Array.isArray(M)?M.filter(function(_){return"!stdSerializers.err"!==_}):!0===M&&Object.keys(p)}(M.browser.serialize,_);let S=M.browser.serialize;Array.isArray(M.browser.serialize)&&M.browser.serialize.indexOf("!stdSerializers.err")>-1&&(S=!1),"function"==typeof l&&(l.error=l.fatal=l.warn=l.info=l.debug=l.trace=l),!1===M.enabled&&(M.level="silent");const d=M.level||"info",x=Object.create(l);x.log||(x.log=xe),Object.defineProperty(x,"levelVal",{get:function N(){return"silent"===this.level?1/0:this.levels.values[this.level]}}),Object.defineProperty(x,"level",{get:function E(){return this._level},set:function H(J){if("silent"!==J&&!this.levels.values[J])throw Error("unknown level "+J);this._level=J,ee(P,x,"error","log"),ee(P,x,"fatal","error"),ee(P,x,"warn","error"),ee(P,x,"info","log"),ee(P,x,"debug","log"),ee(P,x,"trace","log")}});const P={transmit:p,serialize:v,asObject:M.browser.asObject,levels:["error","fatal","warn","info","debug","trace"],timestamp:I(M)};return x.levels=$.levels,x.level=d,x.setMaxListeners=x.getMaxListeners=x.emit=x.addListener=x.on=x.prependListener=x.once=x.prependOnceListener=x.removeListener=x.removeAllListeners=x.listeners=x.listenerCount=x.eventNames=x.write=x.flush=xe,x.serializers=_,x._serialize=v,x._stdErrSerialize=S,x.child=function fe(J,Re){if(!J)throw new Error("missing bindings for child Pino");Re=Re||{},v&&J.serializers&&(Re.serializers=J.serializers);const ve=Re.serializers;if(v&&ve){var we=Object.assign({},_,ve),Ce=!0===M.browser.serialize?Object.keys(we):v;delete J.serializers,C([J],Ce,we,this._stdErrSerialize)}function je(Le){this._childLevel=1+(0|Le._childLevel),this.error=U(Le,J,"error"),this.fatal=U(Le,J,"fatal"),this.warn=U(Le,J,"warn"),this.info=U(Le,J,"info"),this.debug=U(Le,J,"debug"),this.trace=U(Le,J,"trace"),we&&(this.serializers=we,this._serialize=Ce),p&&(this._logEvent=de([].concat(Le._logEvent.bindings,J)))}return je.prototype=this,new je(this)},p&&(x._logEvent=de()),x}function ee(M,p,l,_){const v=Object.getPrototypeOf(p);p[l]=p.levelVal>p.levels.values[l]?xe:v[l]?v[l]:re[l]||re[_]||xe,function L(M,p,l){!M.transmit&&p[l]===xe||(p[l]=function(_){return function(){const S=M.timestamp(),b=new Array(arguments.length),d=Object.getPrototypeOf&&Object.getPrototypeOf(this)===re?re:this;for(var x=0;x-1&&S in l&&(M[v][S]=l[S](M[v][S]))}function U(M,p,l){return function(){const _=new Array(1+arguments.length);_[0]=p;for(var v=1;v<_.length;v++)_[v]=arguments[v-1];return M[l].apply(this,_)}}function ue(M,p,l){const _=p.send,v=p.ts,S=p.methodLevel,b=p.methodValue,d=p.val,x=M._logEvent.bindings;C(l,M._serialize||Object.keys(M.serializers),M.serializers,void 0===M._stdErrSerialize||M._stdErrSerialize),M._logEvent.ts=v,M._logEvent.messages=l.filter(function(P){return-1===x.indexOf(P)}),M._logEvent.level.label=S,M._logEvent.level.value=b,_(S,M._logEvent,d),M._logEvent=de(x)}function de(M){return{ts:0,messages:[],bindings:M||[],level:{label:"",value:0}}}function I(M){return"function"==typeof M.timestamp?M.timestamp:!1===M.timestamp?X:Z}function _e(){return{}}function Se(M){return M}function xe(){}function X(){return!1}function Z(){return Date.now()}$.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},$.stdSerializers=ne,$.stdTimeFunctions=Object.assign({},{nullTime:X,epochTime:Z,unixTime:function le(){return Math.round(Date.now()/1e3)},isoTime:function G(){return new Date(Date.now()).toISOString()}})}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/475.e3436a297ca126a7.js b/angular-bare-bones-demo/dist/475.e3436a297ca126a7.js new file mode 100644 index 000000000..5492aee69 --- /dev/null +++ b/angular-bare-bones-demo/dist/475.e3436a297ca126a7.js @@ -0,0 +1 @@ +(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[475],{84713:(Q,_,b)=>{"use strict";b.r(_),b.d(_,{detectEnv:()=>C,detectOS:()=>k,formatIOSMobile:()=>de,formatMobileRegistry:()=>m,formatMobileRegistryEntry:()=>l,getClientMeta:()=>ce,getCrypto:()=>Pe,getCryptoOrThrow:()=>Fe,getDappRegistryUrl:()=>t,getDocument:()=>G,getDocumentOrThrow:()=>j,getFromWindow:()=>D,getFromWindowOrThrow:()=>J,getLocal:()=>Ne,getLocalStorage:()=>ie,getLocalStorageOrThrow:()=>ue,getLocation:()=>le,getLocationOrThrow:()=>ge,getMobileLinkRegistry:()=>Oe,getMobileRegistryEntry:()=>Ue,getNavigator:()=>re,getNavigatorOrThrow:()=>q,getWalletRegistryUrl:()=>e,isAndroid:()=>V,isBrowser:()=>Y,isIOS:()=>K,isMobile:()=>H,isNode:()=>$,mobileLinkChoiceKey:()=>fe,removeLocal:()=>Ie,safeJsonParse:()=>Se,safeJsonStringify:()=>be,saveMobileLinkInfo:()=>ve,setLocal:()=>Ae});var f=b(99611),s=b(81496),d=function h(y,S,P){this.name=y,this.version=S,this.os=P,this.type="browser"},a=function h(y){this.version=y,this.type="node",this.name="node",this.os=process.platform},g=function h(y,S,P,X){this.name=y,this.version=S,this.os=P,this.bot=X,this.type="bot-device"},w=function h(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},u=function h(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},M=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,N=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],U=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function I(h){var y=function O(h){return""!==h&&N.reduce(function(y,S){var P=S[0];if(y)return y;var oe=S[1].exec(h);return!!oe&&[P,oe]},!1)}(h);if(!y)return null;var S=y[0],P=y[1];if("searchbot"===S)return new w;var X=P[1]&&P[1].split(/[._]/).slice(0,3);X?X.length<3&&(X=function(){for(var h=0,y=0,S=arguments.length;y"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new u:typeof navigator<"u"?I(navigator.userAgent):function v(){return typeof process<"u"&&process.version?new a(process.version.slice(1)):null}()}(h)}function k(){const h=C();return h&&h.os?h.os:void 0}function V(){const h=k();return!!h&&h.toLowerCase().includes("android")}function K(){const h=k();return!!h&&(h.toLowerCase().includes("ios")||h.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function H(){return!!k()&&(V()||K())}function $(){const h=C();return!(!h||!h.name)&&"node"===h.name.toLowerCase()}function Y(){return!$()&&!!re()}const D=s.getFromWindow,J=s.getFromWindowOrThrow,j=s.getDocumentOrThrow,G=s.getDocument,q=s.getNavigatorOrThrow,re=s.getNavigator,ge=s.getLocationOrThrow,le=s.getLocation,Fe=s.getCryptoOrThrow,Pe=s.getCrypto,ue=s.getLocalStorageOrThrow,ie=s.getLocalStorage;function ce(){return f.D()}const Se=function Be(h){if("string"!=typeof h)throw new Error("Cannot safe json parse value of type "+typeof h);try{return JSON.parse(h)}catch{return h}},be=function ye(h){return"string"==typeof h?h:JSON.stringify(h)};function Ae(h,y){const S=be(y),P=ie();P&&P.setItem(h,S)}function Ne(h){let y=null,S=null;const P=ie();return P&&(S=P.getItem(h)),y=S&&Se(S),y}function Ie(h){const y=ie();y&&y.removeItem(h)}const fe="WALLETCONNECT_DEEPLINK_CHOICE";function de(h,y){const S=encodeURIComponent(h);return y.universalLink?`${y.universalLink}/wc?uri=${S}`:y.deepLink?`${y.deepLink}${y.deepLink.endsWith(":")?"//":"/"}wc?uri=${S}`:""}function ve(h){const y=h.href.split("?")[0];Ae(fe,Object.assign(Object.assign({},h),{href:y}))}function Ue(h,y){return h.filter(S=>S.name.toLowerCase().includes(y.toLowerCase()))[0]}function Oe(h,y){let S=h;return y&&(S=y.map(P=>Ue(h,P)).filter(Boolean)),S}const n="https://registry.walletconnect.com";function e(){return n+"/api/v2/wallets"}function t(){return n+"/api/v2/dapps"}function l(h,y="mobile"){var S;return{name:h.name||"",shortName:h.metadata.shortName||"",color:h.metadata.colors.primary||"",logo:null!==(S=h.image_url.sm)&&void 0!==S?S:"",universalLink:h[y].universal||"",deepLink:h[y].native||""}}function m(h,y="mobile"){return Object.values(h).filter(S=>!!S[y].universal||!!S[y].native).map(S=>l(S,y))}},81496:(Q,_)=>{"use strict";function b(N){let U;return typeof window<"u"&&typeof window[N]<"u"&&(U=window[N]),U}function f(N){const U=b(N);if(!U)throw new Error(`${N} is not defined in Window`);return U}Object.defineProperty(_,"__esModule",{value:!0}),_.getLocalStorage=_.getLocalStorageOrThrow=_.getCrypto=_.getCryptoOrThrow=_.getLocation=_.getLocationOrThrow=_.getNavigator=_.getNavigatorOrThrow=_.getDocument=_.getDocumentOrThrow=_.getFromWindowOrThrow=_.getFromWindow=void 0,_.getFromWindow=b,_.getFromWindowOrThrow=f,_.getDocumentOrThrow=function s(){return f("document")},_.getDocument=function c(){return b("document")},_.getNavigatorOrThrow=function d(){return f("navigator")},_.getNavigator=function a(){return b("navigator")},_.getLocationOrThrow=function g(){return f("location")},_.getLocation=function w(){return b("location")},_.getCryptoOrThrow=function u(){return f("crypto")},_.getCrypto=function T(){return b("crypto")},_.getLocalStorageOrThrow=function M(){return f("localStorage")},_.getLocalStorage=function W(){return b("localStorage")}},99611:(Q,_,b)=>{"use strict";_.D=void 0;const s=b(81496);_.D=function c(){let d,a;try{d=s.getDocumentOrThrow(),a=s.getLocationOrThrow()}catch{return null}function w(...O){const z=d.getElementsByTagName("meta");for(let I=0;Ix.getAttribute(p)).filter(p=>!!p&&O.includes(p));if(v.length&&v){const p=x.getAttribute("content");if(p)return p}}return""}const M=function u(){let O=w("name","og:site_name","og:title","twitter:title");return O||(O=d.title),O}();return{description:function T(){return w("description","og:description","twitter:description","keywords")}(),url:a.origin,icons:function g(){const O=d.getElementsByTagName("link"),z=[];for(let I=0;I-1){const p=x.getAttribute("href");if(p)if(-1===p.toLowerCase().indexOf("https:")&&-1===p.toLowerCase().indexOf("http:")&&0!==p.indexOf("//")){let C=a.protocol+"//"+a.host;if(0===p.indexOf("/"))C+=p;else{const k=a.pathname.split("/");k.pop(),C+=k.join("/")+"/"+p}z.push(C)}else 0===p.indexOf("//")?z.push(a.protocol+p):z.push(p)}}return z}(),name:M}}},25475:(Q,_,b)=>{function f(n){return n&&"object"==typeof n&&"default"in n?n.default:n}var s=b(84713),c=f(b(6877)),d=f(b(96967)),a=b(83312);typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var O="walletconnect-wrapper",z="walletconnect-style-sheet",I="walletconnect-qrcode-modal",v="walletconnect-qrcode-text";function C(n){return a.createElement("div",{className:"walletconnect-modal__header"},a.createElement("img",{src:"data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",className:"walletconnect-modal__headerLogo"}),a.createElement("p",null,"WalletConnect"),a.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:n.onClose},a.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},a.createElement("div",{className:"walletconnect-modal__close__line1"}),a.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function k(n){return a.createElement("a",{className:"walletconnect-connect__button",href:n.href,id:"walletconnect-connect-button-"+n.name,onClick:n.onClick,rel:"noopener noreferrer",style:{backgroundColor:n.color},target:"_blank"},n.name)}function K(n){var e=n.color,m=n.logo;return a.createElement("a",{className:"walletconnect-modal__base__row",href:n.href,onClick:n.onClick,rel:"noopener noreferrer",target:"_blank"},a.createElement("h3",{className:"walletconnect-modal__base__row__h3"},n.name),a.createElement("div",{className:"walletconnect-modal__base__row__right"},a.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+m+"') "+e,backgroundSize:"100%"}}),a.createElement("img",{src:"data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function H(n){var l=n.name,y=window.innerWidth<768?(l.length>8?2.5:2.7)+"vw":"inherit";return a.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n.href,onClick:n.onClick,rel:"noopener noreferrer",target:"_blank"},a.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+n.logo+"') "+n.color,backgroundSize:"100%"}}),a.createElement("div",{style:{fontSize:y},className:"walletconnect-connect__button__text"},l))}function D(n){var e=s.isAndroid(),t=a.useState(""),l=t[0],m=t[1],h=a.useState(""),y=h[0],S=h[1],P=a.useState(1),X=P[0],oe=P[1],ee=y?n.links.filter(function(we){return we.name.toLowerCase().includes(y.toLowerCase())}):n.links,he=n.errorMessage,Le=y||ee.length>5,Me=Math.ceil(ee.length/12),He=[12*(X-1)+1,12*X],Ye=ee.length?ee.filter(function(we,Ee){return Ee+1>=He[0]&&Ee+1<=He[1]}):[],Je=!e&&Me>1,Ve=void 0;return a.createElement("div",null,a.createElement("p",{id:v,className:"walletconnect-qrcode__text"},e?n.text.connect_mobile_wallet:n.text.choose_preferred_wallet),!e&&a.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:l,onChange:function Ge(we){m(we.target.value),clearTimeout(Ve),we.target.value?Ve=setTimeout(function(){S(we.target.value),oe(1)},1e3):(m(""),S(""),oe(1))}}),a.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":Le&&ee.length?"__wrap":"")},e?a.createElement(k,{name:n.text.connect,color:"rgb(64, 153, 255)",href:n.uri,onClick:a.useCallback(function(){s.saveMobileLinkInfo({name:"Unknown",href:n.uri})},[])}):Ye.length?Ye.map(function(we){var Ee=we.color,Te=we.name,We=we.shortName,Qe=we.logo,ke=s.formatIOSMobile(n.uri,we),ze=a.useCallback(function(){s.saveMobileLinkInfo({name:Te,href:ke})},[Ye]);return Le?a.createElement(H,{color:Ee,href:ke,name:We||Te,logo:Qe,onClick:ze}):a.createElement(K,{color:Ee,href:ke,name:Te,logo:Qe,onClick:ze})}):a.createElement(a.Fragment,null,a.createElement("p",null,he.length?n.errorMessage:n.links.length&&!ee.length?n.text.no_wallets_found:n.text.loading))),Je&&a.createElement("div",{className:"walletconnect-modal__footer"},Array(Me).fill(0).map(function(we,Ee){var Te=Ee+1;return a.createElement("a",{style:{margin:"auto 10px",fontWeight:X===Te?"bold":"normal"},onClick:function(){return oe(Te)}},Te)})))}function J(n){var e=!!n.message.trim();return a.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},n.message)}function G(n){var e=a.useState(""),t=e[0],l=e[1],m=a.useState(""),h=m[0],y=m[1];return a.useEffect(function(){try{return Promise.resolve(function(n){try{var e="";return Promise.resolve(c.toString(n,{margin:0,type:"svg"})).then(function(t){return"string"==typeof t&&(e=t.replace("0||a.useEffect(function(){!function(){try{if(e)return Promise.resolve();y(!0);var qe=function M(n,e){try{var t=n()}catch(l){return e(l)}return t&&t.then?t.then(void 0,e):t}(function(){var $e=n.qrcodeModalOptions&&n.qrcodeModalOptions.registryUrl?n.qrcodeModalOptions.registryUrl:s.getWalletRegistryUrl();return Promise.resolve(fetch($e)).then(function(Ze){return Promise.resolve(Ze.json()).then(function(Xe){var Ke=s.getMobileLinkRegistry(s.formatMobileRegistry(Xe.listings,t?"mobile":"desktop"),l);y(!1),X(!0),ke(Ke.length?"":n.text.no_supported_wallets),Te(Ke);var je=1===Ke.length;je&&(Ye(s.formatIOSMobile(n.uri,Ke[0])),he(!0)),Ge(je)})})},function($e){y(!1),X(!0),ke(n.text.something_went_wrong),console.error($e)});Promise.resolve(qe&&qe.then?qe.then(function(){}):void 0)}catch($e){return Promise.reject($e)}}()})};ze();var tt=t?ee:!ee;return a.createElement("div",{id:I,className:"walletconnect-qrcode__base animated fadeIn"},a.createElement("div",{className:"walletconnect-modal__base"},a.createElement(C,{onClose:n.onClose}),Ve&&ee?a.createElement("div",{className:"walletconnect-modal__single_wallet"},a.createElement("a",{onClick:function(){return s.saveMobileLinkInfo({name:Ee[0].name,href:He})},href:He,rel:"noopener noreferrer",target:"_blank"},n.text.connect_with+" "+(Ve?Ee[0].name:"")+" \u203a")):e||h||!h&&Ee.length?a.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(tt?" right__selected":"")},a.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),t?a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return he(!1),ze()}},n.text.mobile),a.createElement("a",{onClick:function(){return he(!0)}},n.text.qrcode)):a.createElement(a.Fragment,null,a.createElement("a",{onClick:function(){return he(!0)}},n.text.qrcode),a.createElement("a",{onClick:function(){return he(!1),ze()}},n.text.desktop))):null,a.createElement("div",null,ee||!e&&!h&&!Ee.length?a.createElement(G,Object.assign({},Le)):a.createElement(D,Object.assign({},Le,{links:Ee,errorMessage:Qe})))))}var Be={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function be(){var n=s.getDocumentOrThrow(),e=n.getElementById(I);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout(function(){var t=n.getElementById(O);t&&n.body.removeChild(t)},300))}function Ae(n){return function(){be(),n&&n()}}function Ne(){var n=s.getNavigatorOrThrow().language.split("-")[0]||"en";return Be[n]||Be.en}var de=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};Q.exports={open:function ve(n,e,t){console.log(n),de()?function g(n){c.toString(n,{type:"terminal"}).then(console.log)}(n):function Ie(n,e,t){!function ye(){var n=s.getDocumentOrThrow(),e=n.getElementById(z);e&&n.head.removeChild(e);var t=n.createElement("style");t.setAttribute("id",z),t.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',n.head.appendChild(t)}();var l=function Se(){var n=s.getDocumentOrThrow(),e=n.createElement("div");return e.setAttribute("id",O),n.body.appendChild(e),e}();a.render(a.createElement(q,{text:Ne(),uri:n,onClose:Ae(e),qrcodeModalOptions:t}),l)}(n,e,t)},close:function Ue(){de()||function fe(){be()}()}}},96967:(Q,_,b)=>{"use strict";var f=b(35311),s={"text/plain":"Text","text/html":"Url",default:"Text"};Q.exports=function a(g,w){var u,T,M,W,N,U,R=!1;w||(w={}),u=w.debug||!1;try{if(M=f(),W=document.createRange(),N=document.getSelection(),(U=document.createElement("span")).textContent=g,U.ariaHidden="true",U.style.all="unset",U.style.position="fixed",U.style.top=0,U.style.clip="rect(0, 0, 0, 0)",U.style.whiteSpace="pre",U.style.webkitUserSelect="text",U.style.MozUserSelect="text",U.style.msUserSelect="text",U.style.userSelect="text",U.addEventListener("copy",function(z){z.stopPropagation(),w.format&&(z.preventDefault(),typeof z.clipboardData>"u"?(u&&console.warn("unable to use e.clipboardData"),u&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),window.clipboardData.setData(s[w.format]||s.default,g)):(z.clipboardData.clearData(),z.clipboardData.setData(w.format,g))),w.onCopy&&(z.preventDefault(),w.onCopy(z.clipboardData))}),document.body.appendChild(U),W.selectNodeContents(U),N.addRange(W),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");R=!0}catch(z){u&&console.error("unable to copy using execCommand: ",z),u&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(w.format||"text",g),w.onCopy&&w.onCopy(window.clipboardData),R=!0}catch(I){u&&console.error("unable to copy using clipboardData: ",I),u&&console.error("falling back to prompt"),T=function d(g){var w=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return g.replace(/#{\s*key\s*}/g,w)}("message"in w?w.message:"Copy to clipboard: #{key}, Enter"),window.prompt(T,g)}}finally{N&&("function"==typeof N.removeRange?N.removeRange(W):N.removeAllRanges()),U&&document.body.removeChild(U),M()}return R}},78333:Q=>{"use strict";var _={single_source_shortest_paths:function(b,f,s){var c={},d={};d[f]=0;var g,w,u,T,M,N,a=_.PriorityQueue.make();for(a.push(f,0);!a.empty();)for(u in T=(g=a.pop()).cost,M=b[w=g.value]||{})M.hasOwnProperty(u)&&(N=T+M[u],(typeof d[u]>"u"||d[u]>N)&&(d[u]=N,a.push(u,N),c[u]=w));if(typeof s<"u"&&typeof d[s]>"u"){var O=["Could not find a path from ",f," to ",s,"."].join("");throw new Error(O)}return c},extract_shortest_path_from_predecessor_list:function(b,f){for(var s=[],c=f;c;)s.push(c),c=b[c];return s.reverse(),s},find_path:function(b,f,s){var c=_.single_source_shortest_paths(b,f,s);return _.extract_shortest_path_from_predecessor_list(c,s)},PriorityQueue:{make:function(b){var c,f=_.PriorityQueue,s={};for(c in b=b||{},f)f.hasOwnProperty(c)&&(s[c]=f[c]);return s.queue=[],s.sorter=b.sorter||f.default_sorter,s},default_sorter:function(b,f){return b.cost-f.cost},push:function(b,f){this.queue.push({value:b,cost:f}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};Q.exports=_},75105:Q=>{var _={}.toString;Q.exports=Array.isArray||function(b){return"[object Array]"==_.call(b)}},83312:(Q,_,b)=>{"use strict";b.r(_),b.d(_,{Children:()=>Ge,Component:()=>x,Fragment:()=>I,PureComponent:()=>Me,Suspense:()=>Te,SuspenseList:()=>ke,cloneElement:()=>lt,createContext:()=>ue,createElement:()=>R,createFactory:()=>at,createPortal:()=>qe,createRef:()=>z,default:()=>dt,findDOMNode:()=>ct,forwardRef:()=>Je,hydrate:()=>rt,isValidElement:()=>ot,lazy:()=>Qe,memo:()=>He,render:()=>Xe,unmountComponentAtNode:()=>ut,unstable_batchedUpdates:()=>st,useCallback:()=>l,useContext:()=>m,useDebugValue:()=>h,useEffect:()=>Ue,useErrorBoundary:()=>y,useImperativeHandle:()=>e,useLayoutEffect:()=>Oe,useMemo:()=>t,useReducer:()=>ve,useRef:()=>n,useState:()=>de,version:()=>ft});var f,c,d,a,g,w,u,T={},M=[],W=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function N(r,o){for(var i in o)r[i]=o[i];return r}function U(r){var o=r.parentNode;o&&o.removeChild(r)}function R(r,o,i){var E,L=arguments,A={};for(E in o)"key"!==E&&"ref"!==E&&(A[E]=o[E]);if(arguments.length>3)for(i=[i],E=3;E2&&(o.children=M.slice.call(arguments,2)),i={},o)"key"!==E&&"ref"!==E&&(i[E]=o[E]);return O(r.type,i,o.key||r.key,o.ref||r.ref,null)}function ue(r){var o={},i={__c:"__cC"+u++,__:r,Consumer:function(E,L){return E.children(L)},Provider:function(E){var L,A=this;return this.getChildContext||(L=[],this.getChildContext=function(){return o[i.__c]=A,o},this.shouldComponentUpdate=function(Z){A.props.value!==Z.value&&L.some(function(te){te.context=Z.value,C(te)})},this.sub=function(Z){L.push(Z);var te=Z.componentWillUnmount;Z.componentWillUnmount=function(){L.splice(L.indexOf(Z),1),te&&te.call(Z)}}),E.children}};return i.Consumer.contextType=i,i.Provider.__=i,i}f={__e:function(r,o){for(var i,E;o=o.__;)if((i=o.__c)&&!i.__)try{if(i.constructor&&null!=i.constructor.getDerivedStateFromError&&(E=!0,i.setState(i.constructor.getDerivedStateFromError(r))),null!=i.componentDidCatch&&(E=!0,i.componentDidCatch(r)),E)return C(i.__E=i)}catch(L){r=L}throw r}},x.prototype.setState=function(r,o){var i;i=this.__s!==this.state?this.__s:this.__s=N({},this.state),"function"==typeof r&&(r=r(i,this.props)),r&&N(i,r),null!=r&&this.__v&&(o&&this.__h.push(o),C(this))},x.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),C(this))},x.prototype.render=I,c=[],d=0,a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,w=T,u=0;var ie,ce,Be,ye=0,Se=[],be=f.__r,Ae=f.diffed,Ne=f.__c,Ie=f.unmount;function fe(r,o){f.__h&&f.__h(ce,r,ye||o),ye=0;var i=ce.__H||(ce.__H={__:[],__h:[]});return r>=i.__.length&&i.__.push({}),i.__[r]}function de(r){return ye=1,ve(ee,r)}function ve(r,o,i){var E=fe(ie++,2);return E.__c||(E.__c=ce,E.__=[i?i(o):ee(void 0,o),function(L){var A=r(E.__[0],L);E.__[0]!==A&&(E.__[0]=A,E.__c.setState({}))}]),E.__}function Ue(r,o){var i=fe(ie++,3);!f.__s&&oe(i.__H,o)&&(i.__=r,i.__H=o,ce.__H.__h.push(i))}function Oe(r,o){var i=fe(ie++,4);!f.__s&&oe(i.__H,o)&&(i.__=r,i.__H=o,ce.__h.push(i))}function n(r){return ye=5,t(function(){return{current:r}},[])}function e(r,o,i){ye=6,Oe(function(){"function"==typeof r?r(o()):r&&(r.current=o())},null==i?i:i.concat(r))}function t(r,o){var i=fe(ie++,7);return oe(i.__H,o)?(i.__H=o,i.__h=r,i.__=r()):i.__}function l(r,o){return ye=8,t(function(){return r},o)}function m(r){var o=ce.context[r.__c],i=fe(ie++,9);return i.__c=r,o?(null==i.__&&(i.__=!0,o.sub(ce)),o.props.value):r.__}function h(r,o){f.useDebugValue&&f.useDebugValue(o?o(r):r)}function y(r){var o=fe(ie++,10),i=de();return o.__=r,ce.componentDidCatch||(ce.componentDidCatch=function(E){o.__&&o.__(E),i[1](E)}),[i[0],function(){i[1](void 0)}]}function S(){Se.some(function(r){if(r.__P)try{r.__H.__h.forEach(P),r.__H.__h.forEach(X),r.__H.__h=[]}catch(o){return r.__H.__h=[],f.__e(o,r.__v),!0}}),Se=[]}function P(r){r.t&&r.t()}function X(r){var o=r.__();"function"==typeof o&&(r.t=o)}function oe(r,o){return!r||o.some(function(i,E){return i!==r[E]})}function ee(r,o){return"function"==typeof o?o(r):o}function he(r,o){for(var i in o)r[i]=o[i];return r}function Le(r,o){for(var i in r)if("__source"!==i&&!(i in o))return!0;for(var E in o)if("__source"!==E&&r[E]!==o[E])return!0;return!1}f.__r=function(r){be&&be(r),ie=0,(ce=r.__c).__H&&(ce.__H.__h.forEach(P),ce.__H.__h.forEach(X),ce.__H.__h=[])},f.diffed=function(r){Ae&&Ae(r);var o=r.__c;if(o){var i=o.__H;i&&i.__h.length&&(1!==Se.push(o)&&Be===f.requestAnimationFrame||((Be=f.requestAnimationFrame)||function(E){var L,A=function(){clearTimeout(Z),cancelAnimationFrame(L),setTimeout(E)},Z=setTimeout(A,100);typeof window<"u"&&(L=requestAnimationFrame(A))})(S))}},f.__c=function(r,o){o.some(function(i){try{i.__h.forEach(P),i.__h=i.__h.filter(function(E){return!E.__||X(E)})}catch(E){o.some(function(L){L.__h&&(L.__h=[])}),o=[],f.__e(E,i.__v)}}),Ne&&Ne(r,o)},f.unmount=function(r){Ie&&Ie(r);var o=r.__c;if(o){var i=o.__H;if(i)try{i.__.forEach(function(E){return E.t&&E.t()})}catch(E){f.__e(E,o.__v)}}};var Me=function(r){var o,i;function E(L){var A;return(A=r.call(this,L)||this).isPureReactComponent=!0,A}return i=r,(o=E).prototype=Object.create(i.prototype),o.prototype.constructor=o,o.__proto__=i,E.prototype.shouldComponentUpdate=function(L,A){return Le(this.props,L)||Le(this.state,A)},E}(x);function He(r,o){function i(L){var A=this.props.ref,Z=A==L.ref;return!Z&&A&&(A.call?A(null):A.current=null),o?!o(this.props,L)||!Z:Le(this.props,L)}function E(L){return this.shouldComponentUpdate=i,R(r,he({},L))}return E.prototype.isReactComponent=!0,E.displayName="Memo("+(r.displayName||r.name)+")",E.t=!0,E}var Ye=f.__b;function Je(r){function o(i){var E=he({},i);return delete E.ref,r(E,i.ref)}return o.prototype.isReactComponent=o.t=!0,o.displayName="ForwardRef("+(r.displayName||r.name)+")",o}f.__b=function(r){r.type&&r.type.t&&r.ref&&(r.props.ref=r.ref,r.ref=null),Ye&&Ye(r)};var Ve=function(r,o){return r?K(r).reduce(function(i,E,L){return i.concat(o(E,L))},[]):null},Ge={map:Ve,forEach:Ve,count:function(r){return r?K(r).length:0},only:function(r){if(1!==(r=K(r)).length)throw new Error("Children.only() expects only one child.");return r[0]},toArray:K},we=f.__e;function Ee(r){return r&&((r=he({},r)).__c=null,r.__k=r.__k&&r.__k.map(Ee)),r}function Te(){this.__u=0,this.o=null,this.__b=null}function We(r){var o=r.__.__c;return o&&o.u&&o.u(r)}function Qe(r){var o,i,E;function L(A){if(o||(o=r()).then(function(Z){i=Z.default||Z},function(Z){E=Z}),E)throw E;if(!i)throw o;return R(i,A)}return L.displayName="Lazy",L.t=!0,L}function ke(){this.i=null,this.l=null}f.__e=function(r,o,i){if(r.then)for(var E,L=o;L=L.__;)if((E=L.__c)&&E.__c)return E.__c(r,o.__c);we(r,o,i)},(Te.prototype=new x).__c=function(r,o){var i=this;null==i.o&&(i.o=[]),i.o.push(o);var E=We(i.__v),L=!1,A=function(){L||(L=!0,E?E(Z):Z())};o.__c=o.componentWillUnmount,o.componentWillUnmount=function(){A(),o.__c&&o.__c()};var Z=function(){var te;if(!--i.__u)for(i.__v.__k[0]=i.state.u,i.setState({u:i.__b=null});te=i.o.pop();)te.forceUpdate()};i.__u++||i.setState({u:i.__b=i.__v.__k[0]}),r.then(A,A)},Te.prototype.render=function(r,o){return this.__b&&(this.__v.__k[0]=Ee(this.__b),this.__b=null),[R(x,null,o.u?null:r.children),o.u&&r.fallback]};var ze=function(r,o,i){if(++i[1]===i[0]&&r.l.delete(o),r.props.revealOrder&&("t"!==r.props.revealOrder[0]||!r.l.size))for(i=r.i;i;){for(;i.length>3;)i.pop()();if(i[1]{var f=b(50436),s=b(51191),c=b(32158),d=b(173);function a(g,w,u,T,M){var W=[].slice.call(arguments,1),N=W.length,U="function"==typeof W[N-1];if(!U&&!f())throw new Error("Callback required as last argument");if(!U){if(N<1)throw new Error("Too few arguments provided");return 1===N?(u=w,w=T=void 0):2===N&&!w.getContext&&(T=u,u=w,w=void 0),new Promise(function(O,z){try{var I=s.create(u,T);O(g(I,w,T))}catch(x){z(x)}})}if(N<2)throw new Error("Too few arguments provided");2===N?(M=u,u=w,w=T=void 0):3===N&&(w.getContext&&typeof M>"u"?(M=T,T=void 0):(M=T,T=u,u=w,w=void 0));try{var R=s.create(u,T);M(null,g(R,w,T))}catch(O){M(O)}}_.create=s.create,_.toCanvas=a.bind(null,c.render),_.toDataURL=a.bind(null,c.renderToDataURL),_.toString=a.bind(null,function(g,w,u){return d.render(g,u)})},50436:Q=>{Q.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},76448:(Q,_,b)=>{var f=b(55402).getSymbolSize;_.getRowColCoords=function(c){if(1===c)return[];for(var d=Math.floor(c/7)+2,a=f(c),g=145===a?26:2*Math.ceil((a-13)/(2*d-2)),w=[a-7],u=1;u{var f=b(93141),s=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function c(d){this.mode=f.ALPHANUMERIC,this.data=d}c.getBitsLength=function(a){return 11*Math.floor(a/2)+a%2*6},c.prototype.getLength=function(){return this.data.length},c.prototype.getBitsLength=function(){return c.getBitsLength(this.data.length)},c.prototype.write=function(a){var g;for(g=0;g+2<=this.data.length;g+=2){var w=45*s.indexOf(this.data[g]);w+=s.indexOf(this.data[g+1]),a.put(w,11)}this.data.length%2&&a.put(s.indexOf(this.data[g]),6)},Q.exports=c},57258:Q=>{function _(){this.buffer=[],this.length=0}_.prototype={get:function(b){var f=Math.floor(b/8);return 1==(this.buffer[f]>>>7-b%8&1)},put:function(b,f){for(var s=0;s>>f-s-1&1))},getLengthInBits:function(){return this.length},putBit:function(b){var f=Math.floor(this.length/8);this.buffer.length<=f&&this.buffer.push(0),b&&(this.buffer[f]|=128>>>this.length%8),this.length++}},Q.exports=_},8104:(Q,_,b)=>{var f=b(39657);function s(c){if(!c||c<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=c,this.data=f.alloc(c*c),this.reservedBit=f.alloc(c*c)}s.prototype.set=function(c,d,a,g){var w=c*this.size+d;this.data[w]=a,g&&(this.reservedBit[w]=!0)},s.prototype.get=function(c,d){return this.data[c*this.size+d]},s.prototype.xor=function(c,d,a){this.data[c*this.size+d]^=a},s.prototype.isReserved=function(c,d){return this.reservedBit[c*this.size+d]},Q.exports=s},62860:(Q,_,b)=>{var f=b(39657),s=b(93141);function c(d){this.mode=s.BYTE,this.data=f.from(d)}c.getBitsLength=function(a){return 8*a},c.prototype.getLength=function(){return this.data.length},c.prototype.getBitsLength=function(){return c.getBitsLength(this.data.length)},c.prototype.write=function(d){for(var a=0,g=this.data.length;a{var f=b(3997),s=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],c=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];_.getBlocksCount=function(a,g){switch(g){case f.L:return s[4*(a-1)+0];case f.M:return s[4*(a-1)+1];case f.Q:return s[4*(a-1)+2];case f.H:return s[4*(a-1)+3];default:return}},_.getTotalCodewordsCount=function(a,g){switch(g){case f.L:return c[4*(a-1)+0];case f.M:return c[4*(a-1)+1];case f.Q:return c[4*(a-1)+2];case f.H:return c[4*(a-1)+3];default:return}}},3997:(Q,_)=>{_.L={bit:1},_.M={bit:0},_.Q={bit:3},_.H={bit:2},_.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},_.from=function(s,c){if(_.isValid(s))return s;try{return function b(f){if("string"!=typeof f)throw new Error("Param is not a string");switch(f.toLowerCase()){case"l":case"low":return _.L;case"m":case"medium":return _.M;case"q":case"quartile":return _.Q;case"h":case"high":return _.H;default:throw new Error("Unknown EC Level: "+f)}}(s)}catch{return c}}},21224:(Q,_,b)=>{var f=b(55402).getSymbolSize;_.getPositions=function(d){var a=f(d);return[[0,0],[a-7,0],[0,a-7]]}},34482:(Q,_,b)=>{var f=b(55402),d=f.getBCHDigit(1335);_.getEncodedBits=function(g,w){for(var u=g.bit<<3|w,T=u<<10;f.getBCHDigit(T)-d>=0;)T^=1335<{var f=b(39657),s=f.alloc(512),c=f.alloc(256);(function(){for(var a=1,g=0;g<255;g++)s[g]=a,c[a]=g,256&(a<<=1)&&(a^=285);for(g=255;g<512;g++)s[g]=s[g-255]})(),_.log=function(a){if(a<1)throw new Error("log("+a+")");return c[a]},_.exp=function(a){return s[a]},_.mul=function(a,g){return 0===a||0===g?0:s[c[a]+c[g]]}},51909:(Q,_,b)=>{var f=b(93141),s=b(55402);function c(d){this.mode=f.KANJI,this.data=d}c.getBitsLength=function(a){return 13*a},c.prototype.getLength=function(){return this.data.length},c.prototype.getBitsLength=function(){return c.getBitsLength(this.data.length)},c.prototype.write=function(d){var a;for(a=0;a=33088&&g<=40956)g-=33088;else{if(!(g>=57408&&g<=60351))throw new Error("Invalid SJIS character: "+this.data[a]+"\nMake sure your charset is UTF-8");g-=49472}d.put(g=192*(g>>>8&255)+(255&g),13)}},Q.exports=c},41976:(Q,_)=>{_.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function f(s,c,d){switch(s){case _.Patterns.PATTERN000:return(c+d)%2==0;case _.Patterns.PATTERN001:return c%2==0;case _.Patterns.PATTERN010:return d%3==0;case _.Patterns.PATTERN011:return(c+d)%3==0;case _.Patterns.PATTERN100:return(Math.floor(c/2)+Math.floor(d/3))%2==0;case _.Patterns.PATTERN101:return c*d%2+c*d%3==0;case _.Patterns.PATTERN110:return(c*d%2+c*d%3)%2==0;case _.Patterns.PATTERN111:return(c*d%3+(c+d)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}}_.isValid=function(c){return null!=c&&""!==c&&!isNaN(c)&&c>=0&&c<=7},_.from=function(c){return _.isValid(c)?parseInt(c,10):void 0},_.getPenaltyN1=function(c){for(var d=c.size,a=0,g=0,w=0,u=null,T=null,M=0;M=5&&(a+=g-5+3),u=N,g=1),(N=c.get(W,M))===T?w++:(w>=5&&(a+=w-5+3),T=N,w=1)}g>=5&&(a+=g-5+3),w>=5&&(a+=w-5+3)}return a},_.getPenaltyN2=function(c){for(var d=c.size,a=0,g=0;g=10&&(1488===g||93===g)&&a++,w=w<<1&2047|c.get(T,u),T>=10&&(1488===w||93===w)&&a++}return 40*a},_.getPenaltyN4=function(c){for(var d=0,a=c.data.length,g=0;g{var f=b(74200),s=b(22679);_.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},_.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},_.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},_.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},_.MIXED={bit:-1},_.getCharCountIndicator=function(a,g){if(!a.ccBits)throw new Error("Invalid mode: "+a);if(!f.isValid(g))throw new Error("Invalid version: "+g);return g>=1&&g<10?a.ccBits[0]:g<27?a.ccBits[1]:a.ccBits[2]},_.getBestModeForData=function(a){return s.testNumeric(a)?_.NUMERIC:s.testAlphanumeric(a)?_.ALPHANUMERIC:s.testKanji(a)?_.KANJI:_.BYTE},_.toString=function(a){if(a&&a.id)return a.id;throw new Error("Invalid mode")},_.isValid=function(a){return a&&a.bit&&a.ccBits},_.from=function(a,g){if(_.isValid(a))return a;try{return function c(d){if("string"!=typeof d)throw new Error("Param is not a string");switch(d.toLowerCase()){case"numeric":return _.NUMERIC;case"alphanumeric":return _.ALPHANUMERIC;case"kanji":return _.KANJI;case"byte":return _.BYTE;default:throw new Error("Unknown mode: "+d)}}(a)}catch{return g}}},50580:(Q,_,b)=>{var f=b(93141);function s(c){this.mode=f.NUMERIC,this.data=c.toString()}s.getBitsLength=function(d){return 10*Math.floor(d/3)+(d%3?d%3*3+1:0)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(d){var a,g,w;for(a=0;a+3<=this.data.length;a+=3)g=this.data.substr(a,3),w=parseInt(g,10),d.put(w,10);var u=this.data.length-a;u>0&&(g=this.data.substr(a),w=parseInt(g,10),d.put(w,3*u+1))},Q.exports=s},70830:(Q,_,b)=>{var f=b(39657),s=b(10567);_.mul=function(d,a){for(var g=f.alloc(d.length+a.length-1),w=0;w=0;){for(var w=g[0],u=0;u{var f=b(39657),s=b(55402),c=b(3997),d=b(57258),a=b(8104),g=b(76448),w=b(21224),u=b(41976),T=b(67291),M=b(56041),W=b(90160),N=b(34482),U=b(93141),R=b(71769),O=b(75105);function p(H,$,Y){var j,G,D=H.size,J=N.getEncodedBits($,Y);for(j=0;j<15;j++)H.set(j<6?j:j<8?j+1:D-15+j,8,G=1==(J>>j&1),!0),H.set(8,j<8?D-j-1:j<9?15-j-1+1:15-j-1,G,!0);H.set(D-8,8,1,!0)}function K(H,$,Y,D){var J;if(O(H))J=R.fromArray(H);else{if("string"!=typeof H)throw new Error("Invalid data");var j=$;if(!j){var G=R.rawSplit(H);j=W.getBestVersionForData(G,Y)}J=R.fromString(H,j||40)}var q=W.getBestVersionForData(J,Y);if(!q)throw new Error("The amount of data is too big to be stored in a QR Code");if($){if($=0&&q<=6&&(0===re||6===re)||re>=0&&re<=6&&(0===q||6===q)||q>=2&&q<=4&&re>=2&&re<=4,!0)}(le,$),function I(H){for(var $=H.size,Y=8;Y<$-8;Y++){var D=Y%2==0;H.set(Y,6,D,!0),H.set(6,Y,D,!0)}}(le),function x(H,$){for(var Y=g.getPositions($),D=0;D=7&&function v(H,$){for(var J,j,G,Y=H.size,D=W.getEncodedBits($),q=0;q<18;q++)J=Math.floor(q/3),H.set(J,j=q%3+Y-8-3,G=1==(D>>q&1),!0),H.set(j,J,G,!0)}(le,$),function C(H,$){for(var Y=H.size,D=-1,J=Y-1,j=7,G=0,q=Y-1;q>0;q-=2)for(6===q&&q--;;){for(var re=0;re<2;re++)if(!H.isReserved(J,q-re)){var ge=!1;G<$.length&&(ge=1==($[G]>>>j&1)),H.set(J,q-re,ge),-1==--j&&(G++,j=7)}if((J+=D)<0||Y<=J){J-=D,D=-D;break}}}(le,re),isNaN(D)&&(D=u.getBestMask(le,p.bind(null,le,Y))),u.applyMask(D,le),p(le,Y,D),{modules:le,version:$,errorCorrectionLevel:Y,maskPattern:D,segments:J}}_.create=function($,Y){if(typeof $>"u"||""===$)throw new Error("No input text");var J,j,D=c.M;return typeof Y<"u"&&(D=c.from(Y.errorCorrectionLevel,c.M),J=W.from(Y.version),j=u.from(Y.maskPattern),Y.toSJISFunc&&s.setToSJISFunction(Y.toSJISFunc)),K($,J,D,j)}},56041:(Q,_,b)=>{var f=b(39657),s=b(70830),c=b(97177).lW;function d(a){this.genPoly=void 0,this.degree=a,this.degree&&this.initialize(this.degree)}d.prototype.initialize=function(g){this.degree=g,this.genPoly=s.generateECPolynomial(this.degree)},d.prototype.encode=function(g){if(!this.genPoly)throw new Error("Encoder not initialized");var w=f.alloc(this.degree),u=c.concat([g,w],g.length+this.degree),T=s.mod(u,this.genPoly),M=this.degree-T.length;if(M>0){var W=f.alloc(this.degree);return T.copy(W,M),W}return T},Q.exports=d},22679:(Q,_)=>{var b="[0-9]+",s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",c="(?:(?![A-Z0-9 $%*+\\-./:]|"+(s=s.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";_.KANJI=new RegExp(s,"g"),_.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),_.BYTE=new RegExp(c,"g"),_.NUMERIC=new RegExp(b,"g"),_.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var d=new RegExp("^"+s+"$"),a=new RegExp("^"+b+"$"),g=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_.testKanji=function(u){return d.test(u)},_.testNumeric=function(u){return a.test(u)},_.testAlphanumeric=function(u){return g.test(u)}},71769:(Q,_,b)=>{var f=b(93141),s=b(50580),c=b(42793),d=b(62860),a=b(51909),g=b(22679),w=b(55402),u=b(78333);function T(I){return unescape(encodeURIComponent(I)).length}function M(I,x,v){for(var C,p=[];null!==(C=I.exec(v));)p.push({data:C[0],index:C.index,mode:x,length:C[0].length});return p}function W(I){var p,C,x=M(g.NUMERIC,f.NUMERIC,I),v=M(g.ALPHANUMERIC,f.ALPHANUMERIC,I);return w.isKanjiModeEnabled()?(p=M(g.BYTE,f.BYTE,I),C=M(g.KANJI,f.KANJI,I)):(p=M(g.BYTE_KANJI,f.BYTE,I),C=[]),x.concat(v,p,C).sort(function(V,K){return V.index-K.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function N(I,x){switch(x){case f.NUMERIC:return s.getBitsLength(I);case f.ALPHANUMERIC:return c.getBitsLength(I);case f.KANJI:return a.getBitsLength(I);case f.BYTE:return d.getBitsLength(I)}}function z(I,x){var v,p=f.getBestModeForData(I);if((v=f.from(x,p))!==f.BYTE&&v.bit=0?x[x.length-1]:null;return p&&p.mode===v.mode?(x[x.length-1].data+=v.data,x):(x.push(v),x)},[])}(K))},_.rawSplit=function(x){return _.fromArray(W(x,w.isKanjiModeEnabled()))}},55402:(Q,_)=>{var b,f=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_.getSymbolSize=function(c){if(!c)throw new Error('"version" cannot be null or undefined');if(c<1||c>40)throw new Error('"version" should be in range from 1 to 40');return 4*c+17},_.getSymbolTotalCodewords=function(c){return f[c]},_.getBCHDigit=function(s){for(var c=0;0!==s;)c++,s>>>=1;return c},_.setToSJISFunction=function(c){if("function"!=typeof c)throw new Error('"toSJISFunc" is not a valid function.');b=c},_.isKanjiModeEnabled=function(){return typeof b<"u"},_.toSJIS=function(c){return b(c)}},74200:(Q,_)=>{_.isValid=function(f){return!isNaN(f)&&f>=1&&f<=40}},90160:(Q,_,b)=>{var f=b(55402),s=b(67291),c=b(3997),d=b(93141),a=b(74200),g=b(75105),u=f.getBCHDigit(7973);function M(U,R){return d.getCharCountIndicator(U,R)+4}function W(U,R){var O=0;return U.forEach(function(z){var I=M(z.mode,R);O+=I+z.getBitsLength()}),O}_.from=function(R,O){return a.isValid(R)?parseInt(R,10):O},_.getCapacity=function(R,O,z){if(!a.isValid(R))throw new Error("Invalid QR Code version");typeof z>"u"&&(z=d.BYTE);var v=8*(f.getSymbolTotalCodewords(R)-s.getTotalCodewordsCount(R,O));if(z===d.MIXED)return v;var p=v-M(z,R);switch(z){case d.NUMERIC:return Math.floor(p/10*3);case d.ALPHANUMERIC:return Math.floor(p/11*2);case d.KANJI:return Math.floor(p/13);default:return Math.floor(p/8)}},_.getBestVersionForData=function(R,O){var z,I=c.from(O,c.M);if(g(R)){if(R.length>1)return function N(U,R){for(var O=1;O<=40;O++)if(W(U,O)<=_.getCapacity(O,R,d.MIXED))return O}(R,I);if(0===R.length)return 1;z=R[0]}else z=R;return function T(U,R,O){for(var z=1;z<=40;z++)if(R<=_.getCapacity(z,O,U))return z}(z.mode,z.getLength(),I)},_.getEncodedBits=function(R){if(!a.isValid(R)||R<7)throw new Error("Invalid QR Code version");for(var O=R<<12;f.getBCHDigit(O)-u>=0;)O^=7973<{var f=b(5726);_.render=function(a,g,w){var u=w,T=g;typeof u>"u"&&(!g||!g.getContext)&&(u=g,g=void 0),g||(T=function c(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),u=f.getOptions(u);var M=f.getImageWidth(a.modules.size,u),W=T.getContext("2d"),N=W.createImageData(M,M);return f.qrToImageData(N.data,a,u),function s(d,a,g){d.clearRect(0,0,a.width,a.height),a.style||(a.style={}),a.height=g,a.width=g,a.style.height=g+"px",a.style.width=g+"px"}(W,T,M),W.putImageData(N,0,0),T},_.renderToDataURL=function(a,g,w){var u=w;return typeof u>"u"&&(!g||!g.getContext)&&(u=g,g=void 0),u||(u={}),_.render(a,g,u).toDataURL(u.type||"image/png",(u.rendererOpts||{}).quality)}},173:(Q,_,b)=>{var f=b(5726);function s(a,g){var w=a.a/255,u=g+'="'+a.hex+'"';return w<1?u+" "+g+'-opacity="'+w.toFixed(2).slice(1)+'"':u}function c(a,g,w){var u=a+g;return typeof w<"u"&&(u+=" "+w),u}_.render=function(g,w,u){var T=f.getOptions(w),M=g.modules.size,W=g.modules.data,N=M+2*T.margin,U=T.color.light.a?"':"",R="0&&U>0&&a[N-1]||(u+=M?c("M",U+w,.5+R+w):c("m",T,0),T=0,M=!1),U+1',I=''+U+R+"\n";return"function"==typeof u&&u(null,I),I}},5726:(Q,_)=>{function b(f){if("number"==typeof f&&(f=f.toString()),"string"!=typeof f)throw new Error("Color should be defined as hex string");var s=f.slice().replace("#","").split("");if(s.length<3||5===s.length||s.length>8)throw new Error("Invalid hex color: "+f);(3===s.length||4===s.length)&&(s=Array.prototype.concat.apply([],s.map(function(d){return[d,d]}))),6===s.length&&s.push("F","F");var c=parseInt(s.join(""),16);return{r:c>>24&255,g:c>>16&255,b:c>>8&255,a:255&c,hex:"#"+s.slice(0,6).join("")}}_.getOptions=function(s){s||(s={}),s.color||(s.color={});var d=s.width&&s.width>=21?s.width:void 0;return{width:d,scale:d?4:s.scale||4,margin:typeof s.margin>"u"||null===s.margin||s.margin<0?4:s.margin,color:{dark:b(s.color.dark||"#000000ff"),light:b(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},_.getScale=function(s,c){return c.width&&c.width>=s+2*c.margin?c.width/(s+2*c.margin):c.scale},_.getImageWidth=function(s,c){var d=_.getScale(s,c);return Math.floor((s+2*c.margin)*d)},_.qrToImageData=function(s,c,d){for(var a=c.modules.size,g=c.modules.data,w=_.getScale(a,d),u=Math.floor((a+2*d.margin)*w),T=d.margin*w,M=[d.color.light,d.color.dark],W=0;W=T&&N>=T&&W{"use strict";var f=b(75105),c=(d.TYPED_ARRAY_SUPPORT=function s(){try{var x=new Uint8Array(1);return x.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===x.foo()}catch{return!1}}())?2147483647:1073741823;function d(x,v,p){return d.TYPED_ARRAY_SUPPORT||this instanceof d?"number"==typeof x?u(this,x):function I(x,v,p,C){if("number"==typeof v)throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&v instanceof ArrayBuffer?function W(x,v,p,C){if(p<0||v.byteLength=c)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+c.toString(16)+" bytes");return 0|x}function w(x,v){var p;return d.TYPED_ARRAY_SUPPORT?(p=new Uint8Array(v)).__proto__=d.prototype:(null===(p=x)&&(p=new d(v)),p.length=v),p}function u(x,v){var p=w(x,v<0?0:0|a(v));if(!d.TYPED_ARRAY_SUPPORT)for(var C=0;C55295&&p<57344){if(!k){if(p>56319){(v-=3)>-1&&V.push(239,191,189);continue}if(K+1===C){(v-=3)>-1&&V.push(239,191,189);continue}k=p;continue}if(p<56320){(v-=3)>-1&&V.push(239,191,189),k=p;continue}p=65536+(k-55296<<10|p-56320)}else k&&(v-=3)>-1&&V.push(239,191,189);if(k=null,p<128){if((v-=1)<0)break;V.push(p)}else if(p<2048){if((v-=2)<0)break;V.push(p>>6|192,63&p|128)}else if(p<65536){if((v-=3)<0)break;V.push(p>>12|224,p>>6&63|128,63&p|128)}else{if(!(p<1114112))throw new Error("Invalid code point");if((v-=4)<0)break;V.push(p>>18|240,p>>12&63|128,p>>6&63|128,63&p|128)}}return V}function R(x){return d.isBuffer(x)?x.length:typeof ArrayBuffer<"u"&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(x)||x instanceof ArrayBuffer)?x.byteLength:("string"!=typeof x&&(x=""+x),0===x.length?0:U(x).length)}d.TYPED_ARRAY_SUPPORT&&(d.prototype.__proto__=Uint8Array.prototype,d.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&d[Symbol.species]===d&&Object.defineProperty(d,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),d.prototype.write=function(v,p,C){void 0===p||void 0===C&&"string"==typeof p?(C=this.length,p=0):isFinite(p)&&(p|=0,isFinite(C)?C|=0:C=void 0);var k=this.length-p;if((void 0===C||C>k)&&(C=k),v.length>0&&(C<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function z(x,v,p,C){return function O(x,v,p,C){for(var k=0;k=v.length||k>=x.length);++k)v[k+p]=x[k];return k}(U(v,x.length-p),x,p,C)}(this,v,p,C)},d.prototype.slice=function(v,p){var k,C=this.length;if((v=~~v)<0?(v+=C)<0&&(v=0):v>C&&(v=C),(p=void 0===p?C:~~p)<0?(p+=C)<0&&(p=0):p>C&&(p=C),p=v.length&&(p=v.length),p||(p=0),k>0&&k=this.length)throw new RangeError("sourceStart out of bounds");if(k<0)throw new RangeError("sourceEnd out of bounds");k>this.length&&(k=this.length),v.length-p=0;--K)v[K+p]=this[K+C];else if(V<1e3||!d.TYPED_ARRAY_SUPPORT)for(K=0;K>>=0,C=void 0===C?this.length:C>>>0,v||(v=0),"number"==typeof v)for(V=p;V{"use strict";var s=b(96434),c=b(12658),d="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;_.lW=u,_.h2=50;var a=2147483647;function w(n){if(n>a)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,u.prototype),e}function u(n,e,t){if("number"==typeof n){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return N(n)}return T(n,e,t)}function T(n,e,t){if("string"==typeof n)return function U(n,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=0|p(n,e),l=w(t),m=l.write(n,e);return m!==t&&(l=l.slice(0,m)),l}(n,e);if(ArrayBuffer.isView(n))return function O(n){if(ve(n,Uint8Array)){var e=new Uint8Array(n);return z(e.buffer,e.byteOffset,e.byteLength)}return R(n)}(n);if(null==n)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(ve(n,ArrayBuffer)||n&&ve(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ve(n,SharedArrayBuffer)||n&&ve(n.buffer,SharedArrayBuffer)))return z(n,e,t);if("number"==typeof n)throw new TypeError('The "value" argument must not be of type number. Received type number');var l=n.valueOf&&n.valueOf();if(null!=l&&l!==n)return u.from(l,e,t);var m=function I(n){if(u.isBuffer(n)){var e=0|x(n.length),t=w(e);return 0===t.length||n.copy(t,0,0,e),t}return void 0!==n.length?"number"!=typeof n.length||Ue(n.length)?w(0):R(n):"Buffer"===n.type&&Array.isArray(n.data)?R(n.data):void 0}(n);if(m)return m;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof n[Symbol.toPrimitive])return u.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}function M(n){if("number"!=typeof n)throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function N(n){return M(n),w(n<0?0:0|x(n))}function R(n){for(var e=n.length<0?0:0|x(n.length),t=w(e),l=0;l=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|n}function p(n,e){if(u.isBuffer(n))return n.length;if(ArrayBuffer.isView(n)||ve(n,ArrayBuffer))return n.byteLength;if("string"!=typeof n)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);var t=n.length,l=arguments.length>2&&!0===arguments[2];if(!l&&0===t)return 0;for(var m=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Ae(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return fe(n).length;default:if(m)return l?-1:Ae(n).length;e=(""+e).toLowerCase(),m=!0}}function C(n,e,t){var l=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===t||t>this.length)&&(t=this.length),t<=0)||(t>>>=0)<=(e>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return Fe(this,e,t);case"utf8":case"utf-8":return G(this,e,t);case"ascii":return ge(this,e,t);case"latin1":case"binary":return le(this,e,t);case"base64":return j(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,e,t);default:if(l)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),l=!0}}function k(n,e,t){var l=n[e];n[e]=n[t],n[t]=l}function V(n,e,t,l,m){if(0===n.length)return-1;if("string"==typeof t?(l=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),Ue(t=+t)&&(t=m?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(m)return-1;t=n.length-1}else if(t<0){if(!m)return-1;t=0}if("string"==typeof e&&(e=u.from(e,l)),u.isBuffer(e))return 0===e.length?-1:K(n,e,t,l,m);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?m?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):K(n,[e],t,l,m);throw new TypeError("val must be string, number or Buffer")}function K(n,e,t,l,m){var X,h=1,y=n.length,S=e.length;if(void 0!==l&&("ucs2"===(l=String(l).toLowerCase())||"ucs-2"===l||"utf16le"===l||"utf-16le"===l)){if(n.length<2||e.length<2)return-1;h=2,y/=2,S/=2,t/=2}function P(Le,Me){return 1===h?Le[Me]:Le.readUInt16BE(Me*h)}if(m){var oe=-1;for(X=t;Xy&&(t=y-S),X=t;X>=0;X--){for(var ee=!0,he=0;hem&&(l=m):l=m;var h=e.length;l>h/2&&(l=h/2);for(var y=0;y>8,h.push(t%256),h.push(l);return h}(e,n.length-t),n,t,l)}function j(n,e,t){return s.fromByteArray(0===e&&t===n.length?n:n.slice(e,t))}function G(n,e,t){t=Math.min(n.length,t);for(var l=[],m=e;m239?4:h>223?3:h>191?2:1;if(m+S<=t)switch(S){case 1:h<128&&(y=h);break;case 2:128==(192&(P=n[m+1]))&&(ee=(31&h)<<6|63&P)>127&&(y=ee);break;case 3:X=n[m+2],128==(192&(P=n[m+1]))&&128==(192&X)&&(ee=(15&h)<<12|(63&P)<<6|63&X)>2047&&(ee<55296||ee>57343)&&(y=ee);break;case 4:X=n[m+2],oe=n[m+3],128==(192&(P=n[m+1]))&&128==(192&X)&&128==(192&oe)&&(ee=(15&h)<<18|(63&P)<<12|(63&X)<<6|63&oe)>65535&&ee<1114112&&(y=ee)}null===y?(y=65533,S=1):y>65535&&(l.push((y-=65536)>>>10&1023|55296),y=56320|1023&y),l.push(y),m+=S}return function re(n){var e=n.length;if(e<=q)return String.fromCharCode.apply(String,n);for(var t="",l=0;lm.length?u.from(y).copy(m,h):Uint8Array.prototype.set.call(m,y,h);else{if(!u.isBuffer(y))throw new TypeError('"list" argument must be an Array of Buffers');y.copy(m,h)}h+=y.length}return m},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},d&&(u.prototype[d]=u.prototype.inspect),u.prototype.compare=function(e,t,l,m,h){if(ve(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===l&&(l=e?e.length:0),void 0===m&&(m=0),void 0===h&&(h=this.length),t<0||l>e.length||m<0||h>this.length)throw new RangeError("out of range index");if(m>=h&&t>=l)return 0;if(m>=h)return-1;if(t>=l)return 1;if(this===e)return 0;for(var y=(h>>>=0)-(m>>>=0),S=(l>>>=0)-(t>>>=0),P=Math.min(y,S),X=this.slice(m,h),oe=e.slice(t,l),ee=0;ee>>=0,isFinite(l)?(l>>>=0,void 0===m&&(m="utf8")):(m=l,l=void 0)}var h=this.length-t;if((void 0===l||l>h)&&(l=h),e.length>0&&(l<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");m||(m="utf8");for(var y=!1;;)switch(m){case"hex":return H(this,e,t,l);case"utf8":case"utf-8":return $(this,e,t,l);case"ascii":case"latin1":case"binary":return Y(this,e,t,l);case"base64":return D(this,e,t,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,e,t,l);default:if(y)throw new TypeError("Unknown encoding: "+m);m=(""+m).toLowerCase(),y=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var q=4096;function ge(n,e,t){var l="";t=Math.min(n.length,t);for(var m=e;ml)&&(t=l);for(var m="",h=e;ht)throw new RangeError("Trying to access beyond buffer length")}function ie(n,e,t,l,m,h){if(!u.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>m||en.length)throw new RangeError("Index out of range")}function ce(n,e,t,l,m,h){if(t+l>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Be(n,e,t,l,m){return e=+e,t>>>=0,m||ce(n,0,t,4),c.write(n,e,t,l,23,4),t+4}function ye(n,e,t,l,m){return e=+e,t>>>=0,m||ce(n,0,t,8),c.write(n,e,t,l,52,8),t+8}u.prototype.slice=function(e,t){var l=this.length;(e=~~e)<0?(e+=l)<0&&(e=0):e>l&&(e=l),(t=void 0===t?l:~~t)<0?(t+=l)<0&&(t=0):t>l&&(t=l),t>>=0,t>>>=0,l||ue(e,t,this.length);for(var m=this[e],h=1,y=0;++y>>=0,t>>>=0,l||ue(e,t,this.length);for(var m=this[e+--t],h=1;t>0&&(h*=256);)m+=this[e+--t]*h;return m},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||ue(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||ue(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||ue(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||ue(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||ue(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,l){e>>>=0,t>>>=0,l||ue(e,t,this.length);for(var m=this[e],h=1,y=0;++y=(h*=128)&&(m-=Math.pow(2,8*t)),m},u.prototype.readIntBE=function(e,t,l){e>>>=0,t>>>=0,l||ue(e,t,this.length);for(var m=t,h=1,y=this[e+--m];m>0&&(h*=256);)y+=this[e+--m]*h;return y>=(h*=128)&&(y-=Math.pow(2,8*t)),y},u.prototype.readInt8=function(e,t){return e>>>=0,t||ue(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||ue(e,2,this.length);var l=this[e]|this[e+1]<<8;return 32768&l?4294901760|l:l},u.prototype.readInt16BE=function(e,t){e>>>=0,t||ue(e,2,this.length);var l=this[e+1]|this[e]<<8;return 32768&l?4294901760|l:l},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||ue(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||ue(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||ue(e,4,this.length),c.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||ue(e,4,this.length),c.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||ue(e,8,this.length),c.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||ue(e,8,this.length),c.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,l,m){e=+e,t>>>=0,l>>>=0,m||ie(this,e,t,l,Math.pow(2,8*l)-1,0);var y=1,S=0;for(this[t]=255&e;++S>>=0,l>>>=0,m||ie(this,e,t,l,Math.pow(2,8*l)-1,0);var y=l-1,S=1;for(this[t+y]=255&e;--y>=0&&(S*=256);)this[t+y]=e/S&255;return t+l},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,l,m){if(e=+e,t>>>=0,!m){var h=Math.pow(2,8*l-1);ie(this,e,t,l,h-1,-h)}var y=0,S=1,P=0;for(this[t]=255&e;++y>0)-P&255;return t+l},u.prototype.writeIntBE=function(e,t,l,m){if(e=+e,t>>>=0,!m){var h=Math.pow(2,8*l-1);ie(this,e,t,l,h-1,-h)}var y=l-1,S=1,P=0;for(this[t+y]=255&e;--y>=0&&(S*=256);)e<0&&0===P&&0!==this[t+y+1]&&(P=1),this[t+y]=(e/S>>0)-P&255;return t+l},u.prototype.writeInt8=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,l){return Be(this,e,t,!0,l)},u.prototype.writeFloatBE=function(e,t,l){return Be(this,e,t,!1,l)},u.prototype.writeDoubleLE=function(e,t,l){return ye(this,e,t,!0,l)},u.prototype.writeDoubleBE=function(e,t,l){return ye(this,e,t,!1,l)},u.prototype.copy=function(e,t,l,m){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(l||(l=0),!m&&0!==m&&(m=this.length),t>=e.length&&(t=e.length),t||(t=0),m>0&&m=this.length)throw new RangeError("Index out of range");if(m<0)throw new RangeError("sourceEnd out of bounds");m>this.length&&(m=this.length),e.length-t>>=0,l=void 0===l?this.length:l>>>0,e||(e=0),"number"==typeof e)for(y=t;y55295&&t<57344){if(!m){if(t>56319){(e-=3)>-1&&h.push(239,191,189);continue}if(y+1===l){(e-=3)>-1&&h.push(239,191,189);continue}m=t;continue}if(t<56320){(e-=3)>-1&&h.push(239,191,189),m=t;continue}t=65536+(m-55296<<10|t-56320)}else m&&(e-=3)>-1&&h.push(239,191,189);if(m=null,t<128){if((e-=1)<0)break;h.push(t)}else if(t<2048){if((e-=2)<0)break;h.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;h.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;h.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return h}function fe(n){return s.toByteArray(function be(n){if((n=(n=n.split("=")[0]).trim().replace(Se,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function de(n,e,t,l){for(var m=0;m=e.length||m>=n.length);++m)e[m+t]=n[m];return m}function ve(n,e){return n instanceof e||null!=n&&null!=n.constructor&&null!=n.constructor.name&&n.constructor.name===e.name}function Ue(n){return n!=n}var Oe=function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var l=16*t,m=0;m<16;++m)e[l+m]=n[t]+n[m];return e}()},35311:Q=>{Q.exports=function(){var _=document.getSelection();if(!_.rangeCount)return function(){};for(var b=document.activeElement,f=[],s=0;s<_.rangeCount;s++)f.push(_.getRangeAt(s));switch(b.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":b.blur();break;default:b=null}return _.removeAllRanges(),function(){"Caret"===_.type&&_.removeAllRanges(),_.rangeCount||f.forEach(function(c){_.addRange(c)}),b&&b.focus()}}}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/639.c511f58df2809e7d.js b/angular-bare-bones-demo/dist/639.c511f58df2809e7d.js deleted file mode 100644 index 1d5c1f772..000000000 --- a/angular-bare-bones-demo/dist/639.c511f58df2809e7d.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[639],{43317:(K,_,y)=>{"use strict";y.r(_),y.d(_,{detectEnv:()=>C,detectOS:()=>L,formatIOSMobile:()=>de,formatMobileRegistry:()=>v,formatMobileRegistryEntry:()=>l,getClientMeta:()=>ce,getCrypto:()=>Pe,getCryptoOrThrow:()=>Ue,getDappRegistryUrl:()=>t,getDocument:()=>G,getDocumentOrThrow:()=>j,getFromWindow:()=>z,getFromWindowOrThrow:()=>Q,getLocal:()=>Ne,getLocalStorage:()=>ie,getLocalStorageOrThrow:()=>ue,getLocation:()=>le,getLocationOrThrow:()=>ge,getMobileLinkRegistry:()=>Oe,getMobileRegistryEntry:()=>Fe,getNavigator:()=>re,getNavigatorOrThrow:()=>q,getWalletRegistryUrl:()=>e,isAndroid:()=>V,isBrowser:()=>Y,isIOS:()=>J,isMobile:()=>H,isNode:()=>$,mobileLinkChoiceKey:()=>fe,removeLocal:()=>Re,safeJsonParse:()=>Se,safeJsonStringify:()=>be,saveMobileLinkInfo:()=>ve,setLocal:()=>Ae});var c=y(53905),d=y(36418),f=function g(b,M,W){this.name=b,this.version=M,this.os=W,this.type="browser"},i=function g(b){this.version=b,this.type="node",this.name="node",this.os=process.platform},h=function g(b,M,W,X){this.name=b,this.version=M,this.os=W,this.bot=X,this.type="bot-device"},w=function g(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},u=function g(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},I=/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,N=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],A=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function F(g){var b=function R(g){return""!==g&&N.reduce(function(b,M){var W=M[0];if(b)return b;var oe=M[1].exec(g);return!!oe&&[W,oe]},!1)}(g);if(!b)return null;var M=b[0],W=b[1];if("searchbot"===M)return new w;var X=W[1]&&W[1].split(/[._]/).slice(0,3);X?X.length<3&&(X=function(){for(var g=0,b=0,M=arguments.length;b"u"&&typeof navigator<"u"&&"ReactNative"===navigator.product?new u:typeof navigator<"u"?F(navigator.userAgent):function m(){return typeof process<"u"&&process.version?new i(process.version.slice(1)):null}()}(g)}function L(){const g=C();return g&&g.os?g.os:void 0}function V(){const g=L();return!!g&&g.toLowerCase().includes("android")}function J(){const g=L();return!!g&&(g.toLowerCase().includes("ios")||g.toLowerCase().includes("mac")&&navigator.maxTouchPoints>1)}function H(){return!!L()&&(V()||J())}function $(){const g=C();return!(!g||!g.name)&&"node"===g.name.toLowerCase()}function Y(){return!$()&&!!re()}const z=d.getFromWindow,Q=d.getFromWindowOrThrow,j=d.getDocumentOrThrow,G=d.getDocument,q=d.getNavigatorOrThrow,re=d.getNavigator,ge=d.getLocationOrThrow,le=d.getLocation,Ue=d.getCryptoOrThrow,Pe=d.getCrypto,ue=d.getLocalStorageOrThrow,ie=d.getLocalStorage;function ce(){return c.D()}const Se=function ke(g){if("string"!=typeof g)throw new Error("Cannot safe json parse value of type "+typeof g);try{return JSON.parse(g)}catch{return g}},be=function ye(g){return"string"==typeof g?g:JSON.stringify(g)};function Ae(g,b){const M=be(b),W=ie();W&&W.setItem(g,M)}function Ne(g){let b=null,M=null;const W=ie();return W&&(M=W.getItem(g)),b=M&&Se(M),b}function Re(g){const b=ie();b&&b.removeItem(g)}const fe="WALLETCONNECT_DEEPLINK_CHOICE";function de(g,b){const M=encodeURIComponent(g);return b.universalLink?`${b.universalLink}/wc?uri=${M}`:b.deepLink?`${b.deepLink}${b.deepLink.endsWith(":")?"//":"/"}wc?uri=${M}`:""}function ve(g){const b=g.href.split("?")[0];Ae(fe,Object.assign(Object.assign({},g),{href:b}))}function Fe(g,b){return g.filter(M=>M.name.toLowerCase().includes(b.toLowerCase()))[0]}function Oe(g,b){let M=g;return b&&(M=b.map(W=>Fe(g,W)).filter(Boolean)),M}const n="https://registry.walletconnect.com";function e(){return n+"/api/v2/wallets"}function t(){return n+"/api/v2/dapps"}function l(g,b="mobile"){var M;return{name:g.name||"",shortName:g.metadata.shortName||"",color:g.metadata.colors.primary||"",logo:null!==(M=g.image_url.sm)&&void 0!==M?M:"",universalLink:g[b].universal||"",deepLink:g[b].native||""}}function v(g,b="mobile"){return Object.values(g).filter(M=>!!M[b].universal||!!M[b].native).map(M=>l(M,b))}},36418:(K,_)=>{"use strict";function y(N){let A;return typeof window<"u"&&typeof window[N]<"u"&&(A=window[N]),A}function c(N){const A=y(N);if(!A)throw new Error(`${N} is not defined in Window`);return A}Object.defineProperty(_,"__esModule",{value:!0}),_.getLocalStorage=_.getLocalStorageOrThrow=_.getCrypto=_.getCryptoOrThrow=_.getLocation=_.getLocationOrThrow=_.getNavigator=_.getNavigatorOrThrow=_.getDocument=_.getDocumentOrThrow=_.getFromWindowOrThrow=_.getFromWindow=void 0,_.getFromWindow=y,_.getFromWindowOrThrow=c,_.getDocumentOrThrow=function d(){return c("document")},_.getDocument=function s(){return y("document")},_.getNavigatorOrThrow=function f(){return c("navigator")},_.getNavigator=function i(){return y("navigator")},_.getLocationOrThrow=function h(){return c("location")},_.getLocation=function w(){return y("location")},_.getCryptoOrThrow=function u(){return c("crypto")},_.getCrypto=function B(){return y("crypto")},_.getLocalStorageOrThrow=function I(){return c("localStorage")},_.getLocalStorage=function P(){return y("localStorage")}},53905:(K,_,y)=>{"use strict";_.D=void 0;const d=y(36418);_.D=function s(){let f,i;try{f=d.getDocumentOrThrow(),i=d.getLocationOrThrow()}catch{return null}function w(...R){const D=f.getElementsByTagName("meta");for(let F=0;Fx.getAttribute(p)).filter(p=>!!p&&R.includes(p));if(m.length&&m){const p=x.getAttribute("content");if(p)return p}}return""}const I=function u(){let R=w("name","og:site_name","og:title","twitter:title");return R||(R=f.title),R}();return{description:function B(){return w("description","og:description","twitter:description","keywords")}(),url:i.origin,icons:function h(){const R=f.getElementsByTagName("link"),D=[];for(let F=0;F-1){const p=x.getAttribute("href");if(p)if(-1===p.toLowerCase().indexOf("https:")&&-1===p.toLowerCase().indexOf("http:")&&0!==p.indexOf("//")){let C=i.protocol+"//"+i.host;if(0===p.indexOf("/"))C+=p;else{const L=i.pathname.split("/");L.pop(),C+=L.join("/")+"/"+p}D.push(C)}else 0===p.indexOf("//")?D.push(i.protocol+p):D.push(p)}}return D}(),name:I}}},62639:(K,_,y)=>{function c(n){return n&&"object"==typeof n&&"default"in n?n.default:n}var d=y(43317),s=c(y(26084)),f=c(y(83040)),i=y(24023);typeof Symbol<"u"&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),typeof Symbol<"u"&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator")));var R="walletconnect-wrapper",D="walletconnect-style-sheet",F="walletconnect-qrcode-modal",m="walletconnect-qrcode-text";function C(n){return i.createElement("div",{className:"walletconnect-modal__header"},i.createElement("img",{src:"data:image/svg+xml,%3Csvg height='185' viewBox='0 0 300 185' width='300' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m61.4385429 36.2562612c48.9112241-47.8881663 128.2119871-47.8881663 177.1232091 0l5.886545 5.7634174c2.445561 2.3944081 2.445561 6.2765112 0 8.6709204l-20.136695 19.715503c-1.222781 1.1972051-3.2053 1.1972051-4.428081 0l-8.100584-7.9311479c-34.121692-33.4079817-89.443886-33.4079817-123.5655788 0l-8.6750562 8.4936051c-1.2227816 1.1972041-3.205301 1.1972041-4.4280806 0l-20.1366949-19.7155031c-2.4455612-2.3944092-2.4455612-6.2765122 0-8.6709204zm218.7677961 40.7737449 17.921697 17.546897c2.445549 2.3943969 2.445563 6.2764769.000031 8.6708899l-80.810171 79.121134c-2.445544 2.394426-6.410582 2.394453-8.85616.000062-.00001-.00001-.000022-.000022-.000032-.000032l-57.354143-56.154572c-.61139-.598602-1.60265-.598602-2.21404 0-.000004.000004-.000007.000008-.000011.000011l-57.3529212 56.154531c-2.4455368 2.394432-6.4105755 2.394472-8.8561612.000087-.0000143-.000014-.0000296-.000028-.0000449-.000044l-80.81241943-79.122185c-2.44556021-2.394408-2.44556021-6.2765115 0-8.6709197l17.92172963-17.5468673c2.4455602-2.3944082 6.4105989-2.3944082 8.8561602 0l57.3549775 56.155357c.6113908.598602 1.602649.598602 2.2140398 0 .0000092-.000009.0000174-.000017.0000265-.000024l57.3521031-56.155333c2.445505-2.3944633 6.410544-2.3945531 8.856161-.0002.000034.0000336.000068.0000673.000101.000101l57.354902 56.155432c.61139.598601 1.60265.598601 2.21404 0l57.353975-56.1543249c2.445561-2.3944092 6.410599-2.3944092 8.85616 0z' fill='%233b99fc'/%3E%3C/svg%3E",className:"walletconnect-modal__headerLogo"}),i.createElement("p",null,"WalletConnect"),i.createElement("div",{className:"walletconnect-modal__close__wrapper",onClick:n.onClose},i.createElement("div",{id:"walletconnect-qrcode-close",className:"walletconnect-modal__close__icon"},i.createElement("div",{className:"walletconnect-modal__close__line1"}),i.createElement("div",{className:"walletconnect-modal__close__line2"}))))}function L(n){return i.createElement("a",{className:"walletconnect-connect__button",href:n.href,id:"walletconnect-connect-button-"+n.name,onClick:n.onClick,rel:"noopener noreferrer",style:{backgroundColor:n.color},target:"_blank"},n.name)}function J(n){var e=n.color,v=n.logo;return i.createElement("a",{className:"walletconnect-modal__base__row",href:n.href,onClick:n.onClick,rel:"noopener noreferrer",target:"_blank"},i.createElement("h3",{className:"walletconnect-modal__base__row__h3"},n.name),i.createElement("div",{className:"walletconnect-modal__base__row__right"},i.createElement("div",{className:"walletconnect-modal__base__row__right__app-icon",style:{background:"url('"+v+"') "+e,backgroundSize:"100%"}}),i.createElement("img",{src:"data:image/svg+xml,%3Csvg fill='none' height='18' viewBox='0 0 8 18' width='8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath clip-rule='evenodd' d='m.586301.213898c-.435947.33907-.5144813.967342-.175411 1.403292l4.87831 6.27212c.28087.36111.28087.86677 0 1.22788l-4.878311 6.27211c-.33907.436-.260536 1.0642.175412 1.4033.435949.3391 1.064219.2605 1.403289-.1754l4.87832-6.2721c.84259-1.08336.84259-2.60034 0-3.68367l-4.87832-6.27212c-.33907-.4359474-.96734-.514482-1.403289-.175412z' fill='%233c4252' fill-rule='evenodd'/%3E%3C/svg%3E",className:"walletconnect-modal__base__row__right__caret"})))}function H(n){var l=n.name,b=window.innerWidth<768?(l.length>8?2.5:2.7)+"vw":"inherit";return i.createElement("a",{className:"walletconnect-connect__button__icon_anchor",href:n.href,onClick:n.onClick,rel:"noopener noreferrer",target:"_blank"},i.createElement("div",{className:"walletconnect-connect__button__icon",style:{background:"url('"+n.logo+"') "+n.color,backgroundSize:"100%"}}),i.createElement("div",{style:{fontSize:b},className:"walletconnect-connect__button__text"},l))}function z(n){var e=d.isAndroid(),t=i.useState(""),l=t[0],v=t[1],g=i.useState(""),b=g[0],M=g[1],W=i.useState(1),X=W[0],oe=W[1],ee=b?n.links.filter(function(we){return we.name.toLowerCase().includes(b.toLowerCase())}):n.links,he=n.errorMessage,Le=b||ee.length>5,Me=Math.ceil(ee.length/12),He=[12*(X-1)+1,12*X],Ye=ee.length?ee.filter(function(we,Ee){return Ee+1>=He[0]&&Ee+1<=He[1]}):[],Je=!e&&Me>1,Ve=void 0;return i.createElement("div",null,i.createElement("p",{id:m,className:"walletconnect-qrcode__text"},e?n.text.connect_mobile_wallet:n.text.choose_preferred_wallet),!e&&i.createElement("input",{className:"walletconnect-search__input",placeholder:"Search",value:l,onChange:function Ge(we){v(we.target.value),clearTimeout(Ve),we.target.value?Ve=setTimeout(function(){M(we.target.value),oe(1)},1e3):(v(""),M(""),oe(1))}}),i.createElement("div",{className:"walletconnect-connect__buttons__wrapper"+(e?"__android":Le&&ee.length?"__wrap":"")},e?i.createElement(L,{name:n.text.connect,color:"rgb(64, 153, 255)",href:n.uri,onClick:i.useCallback(function(){d.saveMobileLinkInfo({name:"Unknown",href:n.uri})},[])}):Ye.length?Ye.map(function(we){var Ee=we.color,Be=we.name,We=we.shortName,Qe=we.logo,Te=d.formatIOSMobile(n.uri,we),ze=i.useCallback(function(){d.saveMobileLinkInfo({name:Be,href:Te})},[Ye]);return Le?i.createElement(H,{color:Ee,href:Te,name:We||Be,logo:Qe,onClick:ze}):i.createElement(J,{color:Ee,href:Te,name:Be,logo:Qe,onClick:ze})}):i.createElement(i.Fragment,null,i.createElement("p",null,he.length?n.errorMessage:n.links.length&&!ee.length?n.text.no_wallets_found:n.text.loading))),Je&&i.createElement("div",{className:"walletconnect-modal__footer"},Array(Me).fill(0).map(function(we,Ee){var Be=Ee+1;return i.createElement("a",{style:{margin:"auto 10px",fontWeight:X===Be?"bold":"normal"},onClick:function(){return oe(Be)}},Be)})))}function Q(n){var e=!!n.message.trim();return i.createElement("div",{className:"walletconnect-qrcode__notification"+(e?" notification__show":"")},n.message)}function G(n){var e=i.useState(""),t=e[0],l=e[1],v=i.useState(""),g=v[0],b=v[1];return i.useEffect(function(){try{return Promise.resolve(function(n){try{var e="";return Promise.resolve(s.toString(n,{margin:0,type:"svg"})).then(function(t){return"string"==typeof t&&(e=t.replace("0||i.useEffect(function(){!function(){try{if(e)return Promise.resolve();b(!0);var qe=function I(n,e){try{var t=n()}catch(l){return e(l)}return t&&t.then?t.then(void 0,e):t}(function(){var $e=n.qrcodeModalOptions&&n.qrcodeModalOptions.registryUrl?n.qrcodeModalOptions.registryUrl:d.getWalletRegistryUrl();return Promise.resolve(fetch($e)).then(function(Ze){return Promise.resolve(Ze.json()).then(function(Xe){var Ke=d.getMobileLinkRegistry(d.formatMobileRegistry(Xe.listings,t?"mobile":"desktop"),l);b(!1),X(!0),Te(Ke.length?"":n.text.no_supported_wallets),Be(Ke);var je=1===Ke.length;je&&(Ye(d.formatIOSMobile(n.uri,Ke[0])),he(!0)),Ge(je)})})},function($e){b(!1),X(!0),Te(n.text.something_went_wrong),console.error($e)});Promise.resolve(qe&&qe.then?qe.then(function(){}):void 0)}catch($e){return Promise.reject($e)}}()})};ze();var tt=t?ee:!ee;return i.createElement("div",{id:F,className:"walletconnect-qrcode__base animated fadeIn"},i.createElement("div",{className:"walletconnect-modal__base"},i.createElement(C,{onClose:n.onClose}),Ve&&ee?i.createElement("div",{className:"walletconnect-modal__single_wallet"},i.createElement("a",{onClick:function(){return d.saveMobileLinkInfo({name:Ee[0].name,href:He})},href:He,rel:"noopener noreferrer",target:"_blank"},n.text.connect_with+" "+(Ve?Ee[0].name:"")+" \u203a")):e||g||!g&&Ee.length?i.createElement("div",{className:"walletconnect-modal__mobile__toggle"+(tt?" right__selected":"")},i.createElement("div",{className:"walletconnect-modal__mobile__toggle_selector"}),t?i.createElement(i.Fragment,null,i.createElement("a",{onClick:function(){return he(!1),ze()}},n.text.mobile),i.createElement("a",{onClick:function(){return he(!0)}},n.text.qrcode)):i.createElement(i.Fragment,null,i.createElement("a",{onClick:function(){return he(!0)}},n.text.qrcode),i.createElement("a",{onClick:function(){return he(!1),ze()}},n.text.desktop))):null,i.createElement("div",null,ee||!e&&!g&&!Ee.length?i.createElement(G,Object.assign({},Le)):i.createElement(z,Object.assign({},Le,{links:Ee,errorMessage:Qe})))))}var ke={de:{choose_preferred_wallet:"W\xe4hle bevorzugte Wallet",connect_mobile_wallet:"Verbinde mit Mobile Wallet",scan_qrcode_with_wallet:"Scanne den QR-code mit einer WalletConnect kompatiblen Wallet",connect:"Verbinden",qrcode:"QR-Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"In die Zwischenablage kopieren",copied_to_clipboard:"In die Zwischenablage kopiert!",connect_with:"Verbinden mit Hilfe von",loading:"Laden...",something_went_wrong:"Etwas ist schief gelaufen",no_supported_wallets:"Es gibt noch keine unterst\xfctzten Wallet",no_wallets_found:"keine Wallet gefunden"},en:{choose_preferred_wallet:"Choose your preferred wallet",connect_mobile_wallet:"Connect to Mobile Wallet",scan_qrcode_with_wallet:"Scan QR code with a WalletConnect-compatible wallet",connect:"Connect",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copy to clipboard",copied_to_clipboard:"Copied to clipboard!",connect_with:"Connect with",loading:"Loading...",something_went_wrong:"Something went wrong",no_supported_wallets:"There are no supported wallets yet",no_wallets_found:"No wallets found"},es:{choose_preferred_wallet:"Elige tu billetera preferida",connect_mobile_wallet:"Conectar a billetera m\xf3vil",scan_qrcode_with_wallet:"Escanea el c\xf3digo QR con una billetera compatible con WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vil",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Conectar mediante",loading:"Cargando...",something_went_wrong:"Algo sali\xf3 mal",no_supported_wallets:"Todav\xeda no hay billeteras compatibles",no_wallets_found:"No se encontraron billeteras"},fr:{choose_preferred_wallet:"Choisissez votre portefeuille pr\xe9f\xe9r\xe9",connect_mobile_wallet:"Se connecter au portefeuille mobile",scan_qrcode_with_wallet:"Scannez le QR code avec un portefeuille compatible WalletConnect",connect:"Se connecter",qrcode:"QR Code",mobile:"Mobile",desktop:"Desktop",copy_to_clipboard:"Copier",copied_to_clipboard:"Copi\xe9!",connect_with:"Connectez-vous \xe0 l'aide de",loading:"Chargement...",something_went_wrong:"Quelque chose a mal tourn\xe9",no_supported_wallets:"Il n'y a pas encore de portefeuilles pris en charge",no_wallets_found:"Aucun portefeuille trouv\xe9"},ko:{choose_preferred_wallet:"\uc6d0\ud558\ub294 \uc9c0\uac11\uc744 \uc120\ud0dd\ud558\uc138\uc694",connect_mobile_wallet:"\ubaa8\ubc14\uc77c \uc9c0\uac11\uacfc \uc5f0\uacb0",scan_qrcode_with_wallet:"WalletConnect \uc9c0\uc6d0 \uc9c0\uac11\uc5d0\uc11c QR\ucf54\ub4dc\ub97c \uc2a4\uce94\ud558\uc138\uc694",connect:"\uc5f0\uacb0",qrcode:"QR \ucf54\ub4dc",mobile:"\ubaa8\ubc14\uc77c",desktop:"\ub370\uc2a4\ud06c\ud0d1",copy_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac",copied_to_clipboard:"\ud074\ub9bd\ubcf4\ub4dc\uc5d0 \ubcf5\uc0ac\ub418\uc5c8\uc2b5\ub2c8\ub2e4!",connect_with:"\uc640 \uc5f0\uacb0\ud558\ub2e4",loading:"\ub85c\ub4dc \uc911...",something_went_wrong:"\ubb38\uc81c\uac00 \ubc1c\uc0dd\ud588\uc2b5\ub2c8\ub2e4.",no_supported_wallets:"\uc544\uc9c1 \uc9c0\uc6d0\ub418\ub294 \uc9c0\uac11\uc774 \uc5c6\uc2b5\ub2c8\ub2e4",no_wallets_found:"\uc9c0\uac11\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4"},pt:{choose_preferred_wallet:"Escolha sua carteira preferida",connect_mobile_wallet:"Conectar-se \xe0 carteira m\xf3vel",scan_qrcode_with_wallet:"Ler o c\xf3digo QR com uma carteira compat\xedvel com WalletConnect",connect:"Conectar",qrcode:"C\xf3digo QR",mobile:"M\xf3vel",desktop:"Desktop",copy_to_clipboard:"Copiar",copied_to_clipboard:"Copiado!",connect_with:"Ligar por meio de",loading:"Carregamento...",something_went_wrong:"Algo correu mal",no_supported_wallets:"Ainda n\xe3o h\xe1 carteiras suportadas",no_wallets_found:"Nenhuma carteira encontrada"},zh:{choose_preferred_wallet:"\u9009\u62e9\u4f60\u7684\u94b1\u5305",connect_mobile_wallet:"\u8fde\u63a5\u81f3\u79fb\u52a8\u7aef\u94b1\u5305",scan_qrcode_with_wallet:"\u4f7f\u7528\u517c\u5bb9 WalletConnect \u7684\u94b1\u5305\u626b\u63cf\u4e8c\u7ef4\u7801",connect:"\u8fde\u63a5",qrcode:"\u4e8c\u7ef4\u7801",mobile:"\u79fb\u52a8",desktop:"\u684c\u9762",copy_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f",copied_to_clipboard:"\u590d\u5236\u5230\u526a\u8d34\u677f\u6210\u529f\uff01",connect_with:"\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u8fde\u63a5",loading:"\u6b63\u5728\u52a0\u8f7d...",something_went_wrong:"\u51fa\u4e86\u95ee\u9898",no_supported_wallets:"\u76ee\u524d\u8fd8\u6ca1\u6709\u652f\u6301\u7684\u94b1\u5305",no_wallets_found:"\u6ca1\u6709\u627e\u5230\u94b1\u5305"},fa:{choose_preferred_wallet:"\u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0631\u062f \u0646\u0638\u0631 \u062e\u0648\u062f \u0631\u0627 \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",connect_mobile_wallet:"\u0628\u0647 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0645\u0648\u0628\u0627\u06cc\u0644 \u0648\u0635\u0644 \u0634\u0648\u06cc\u062f",scan_qrcode_with_wallet:"\u06a9\u062f QR \u0631\u0627 \u0628\u0627 \u06cc\u06a9 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u0633\u0627\u0632\u06af\u0627\u0631 \u0628\u0627 WalletConnect \u0627\u0633\u06a9\u0646 \u06a9\u0646\u06cc\u062f",connect:"\u0627\u062a\u0635\u0627\u0644",qrcode:"\u06a9\u062f QR",mobile:"\u0633\u06cc\u0627\u0631",desktop:"\u062f\u0633\u06a9\u062a\u0627\u067e",copy_to_clipboard:"\u06a9\u067e\u06cc \u0628\u0647 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f",copied_to_clipboard:"\u062f\u0631 \u06a9\u0644\u06cc\u067e \u0628\u0648\u0631\u062f \u06a9\u067e\u06cc \u0634\u062f!",connect_with:"\u0627\u0631\u062a\u0628\u0627\u0637 \u0628\u0627",loading:"...\u0628\u0627\u0631\u06af\u0630\u0627\u0631\u06cc",something_went_wrong:"\u0645\u0634\u06a9\u0644\u06cc \u067e\u06cc\u0634 \u0622\u0645\u062f",no_supported_wallets:"\u0647\u0646\u0648\u0632 \u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u06cc \u0634\u062f\u0647 \u0627\u06cc \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f",no_wallets_found:"\u0647\u06cc\u0686 \u06a9\u06cc\u0641 \u067e\u0648\u0644\u06cc \u067e\u06cc\u062f\u0627 \u0646\u0634\u062f"}};function be(){var n=d.getDocumentOrThrow(),e=n.getElementById(F);e&&(e.className=e.className.replace("fadeIn","fadeOut"),setTimeout(function(){var t=n.getElementById(R);t&&n.body.removeChild(t)},300))}function Ae(n){return function(){be(),n&&n()}}function Ne(){var n=d.getNavigatorOrThrow().language.split("-")[0]||"en";return ke[n]||ke.en}var de=function(){return typeof process<"u"&&typeof process.versions<"u"&&typeof process.versions.node<"u"};K.exports={open:function ve(n,e,t){console.log(n),de()?function h(n){s.toString(n,{type:"terminal"}).then(console.log)}(n):function Re(n,e,t){!function ye(){var n=d.getDocumentOrThrow(),e=n.getElementById(D);e&&n.head.removeChild(e);var t=n.createElement("style");t.setAttribute("id",D),t.innerText=':root {\n --animation-duration: 300ms;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n\n.animated {\n animation-duration: var(--animation-duration);\n animation-fill-mode: both;\n}\n\n.fadeIn {\n animation-name: fadeIn;\n}\n\n.fadeOut {\n animation-name: fadeOut;\n}\n\n#walletconnect-wrapper {\n -webkit-user-select: none;\n align-items: center;\n display: flex;\n height: 100%;\n justify-content: center;\n left: 0;\n pointer-events: none;\n position: fixed;\n top: 0;\n user-select: none;\n width: 100%;\n z-index: 99999999999999;\n}\n\n.walletconnect-modal__headerLogo {\n height: 21px;\n}\n\n.walletconnect-modal__header p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n align-items: flex-start;\n display: flex;\n flex: 1;\n margin-left: 5px;\n}\n\n.walletconnect-modal__close__wrapper {\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 10000;\n background: white;\n border-radius: 26px;\n padding: 6px;\n box-sizing: border-box;\n width: 26px;\n height: 26px;\n cursor: pointer;\n}\n\n.walletconnect-modal__close__icon {\n position: relative;\n top: 7px;\n right: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n transform: rotate(45deg);\n}\n\n.walletconnect-modal__close__line1 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n}\n\n.walletconnect-modal__close__line2 {\n position: absolute;\n width: 100%;\n border: 1px solid rgb(48, 52, 59);\n transform: rotate(90deg);\n}\n\n.walletconnect-qrcode__base {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n background: rgba(37, 41, 46, 0.95);\n height: 100%;\n left: 0;\n pointer-events: auto;\n position: fixed;\n top: 0;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n width: 100%;\n will-change: opacity;\n padding: 40px;\n box-sizing: border-box;\n}\n\n.walletconnect-qrcode__text {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 10px 0 20px 0;\n text-align: center;\n width: 100%;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-qrcode__text {\n font-size: 4vw;\n }\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-qrcode__text {\n font-size: 14px;\n }\n}\n\n.walletconnect-qrcode__image {\n width: calc(100% - 30px);\n box-sizing: border-box;\n cursor: none;\n margin: 0 auto;\n}\n\n.walletconnect-qrcode__notification {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n font-size: 16px;\n padding: 16px 20px;\n border-radius: 16px;\n text-align: center;\n transition: all 0.1s ease-in-out;\n background: white;\n color: black;\n margin-bottom: -60px;\n opacity: 0;\n}\n\n.walletconnect-qrcode__notification.notification__show {\n opacity: 1;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__header {\n height: 130px;\n }\n .walletconnect-modal__base {\n overflow: auto;\n }\n}\n\n@media only screen and (min-device-width: 415px) and (max-width: 768px) {\n #content {\n max-width: 768px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 375px) and (max-width: 415px) {\n #content {\n max-width: 414px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (min-width: 320px) and (max-width: 375px) {\n #content {\n max-width: 375px;\n box-sizing: border-box;\n }\n}\n\n@media only screen and (max-width: 320px) {\n #content {\n max-width: 320px;\n box-sizing: border-box;\n }\n}\n\n.walletconnect-modal__base {\n -webkit-font-smoothing: antialiased;\n background: #ffffff;\n border-radius: 24px;\n box-shadow: 0 10px 50px 5px rgba(0, 0, 0, 0.4);\n font-family: ui-rounded, "SF Pro Rounded", "SF Pro Text", medium-content-sans-serif-font,\n -apple-system, BlinkMacSystemFont, ui-sans-serif, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell,\n "Open Sans", "Helvetica Neue", sans-serif;\n margin-top: 41px;\n padding: 24px 24px 22px;\n pointer-events: auto;\n position: relative;\n text-align: center;\n transition: 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n will-change: transform;\n overflow: visible;\n transform: translateY(-50%);\n top: 50%;\n max-width: 500px;\n margin: auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__base {\n padding: 24px 12px;\n }\n}\n\n.walletconnect-modal__base .hidden {\n transform: translateY(150%);\n transition: 0.125s cubic-bezier(0.4, 0, 1, 1);\n}\n\n.walletconnect-modal__header {\n align-items: center;\n display: flex;\n height: 26px;\n left: 0;\n justify-content: space-between;\n position: absolute;\n top: -42px;\n width: 100%;\n}\n\n.walletconnect-modal__base .wc-logo {\n align-items: center;\n display: flex;\n height: 26px;\n margin-top: 15px;\n padding-bottom: 15px;\n pointer-events: auto;\n}\n\n.walletconnect-modal__base .wc-logo div {\n background-color: #3399ff;\n height: 21px;\n margin-right: 5px;\n mask-image: url("images/wc-logo.svg") center no-repeat;\n width: 32px;\n}\n\n.walletconnect-modal__base .wc-logo p {\n color: #ffffff;\n font-size: 20px;\n font-weight: 600;\n margin: 0;\n}\n\n.walletconnect-modal__base h2 {\n color: rgba(60, 66, 82, 0.6);\n font-size: 16px;\n font-weight: 600;\n letter-spacing: 0;\n line-height: 1.1875em;\n margin: 0 0 19px 0;\n text-align: center;\n width: 100%;\n}\n\n.walletconnect-modal__base__row {\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n align-items: center;\n border-radius: 20px;\n cursor: pointer;\n display: flex;\n height: 56px;\n justify-content: space-between;\n padding: 0 15px;\n position: relative;\n margin: 0px 0px 8px;\n text-align: left;\n transition: 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n will-change: transform;\n text-decoration: none;\n}\n\n.walletconnect-modal__base__row:hover {\n background: rgba(60, 66, 82, 0.06);\n}\n\n.walletconnect-modal__base__row:active {\n background: rgba(60, 66, 82, 0.06);\n transform: scale(0.975);\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n}\n\n.walletconnect-modal__base__row__h3 {\n color: #25292e;\n font-size: 20px;\n font-weight: 700;\n margin: 0;\n padding-bottom: 3px;\n}\n\n.walletconnect-modal__base__row__right {\n align-items: center;\n display: flex;\n justify-content: center;\n}\n\n.walletconnect-modal__base__row__right__app-icon {\n border-radius: 8px;\n height: 34px;\n margin: 0 11px 2px 0;\n width: 34px;\n background-size: 100%;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-modal__base__row__right__caret {\n height: 18px;\n opacity: 0.3;\n transition: 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);\n width: 8px;\n will-change: opacity;\n}\n\n.walletconnect-modal__base__row:hover .caret,\n.walletconnect-modal__base__row:active .caret {\n opacity: 0.6;\n}\n\n.walletconnect-modal__mobile__toggle {\n width: 80%;\n display: flex;\n margin: 0 auto;\n position: relative;\n overflow: hidden;\n border-radius: 8px;\n margin-bottom: 18px;\n background: #d4d5d9;\n}\n\n.walletconnect-modal__single_wallet {\n display: flex;\n justify-content: center;\n margin-top: 7px;\n margin-bottom: 18px;\n}\n\n.walletconnect-modal__single_wallet a {\n cursor: pointer;\n color: rgb(64, 153, 255);\n font-size: 21px;\n font-weight: 800;\n text-decoration: none !important;\n margin: 0 auto;\n}\n\n.walletconnect-modal__mobile__toggle_selector {\n width: calc(50% - 8px);\n background: white;\n position: absolute;\n border-radius: 5px;\n height: calc(100% - 8px);\n top: 4px;\n transition: all 0.2s ease-in-out;\n transform: translate3d(4px, 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle.right__selected .walletconnect-modal__mobile__toggle_selector {\n transform: translate3d(calc(100% + 12px), 0, 0);\n}\n\n.walletconnect-modal__mobile__toggle a {\n font-size: 12px;\n width: 50%;\n text-align: center;\n padding: 8px;\n margin: 0;\n font-weight: 600;\n z-index: 1;\n}\n\n.walletconnect-modal__footer {\n display: flex;\n justify-content: center;\n margin-top: 20px;\n}\n\n@media only screen and (max-width: 768px) {\n .walletconnect-modal__footer {\n margin-top: 5vw;\n }\n}\n\n.walletconnect-modal__footer a {\n cursor: pointer;\n color: #898d97;\n font-size: 15px;\n margin: 0 auto;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-modal__footer a {\n font-size: 14px;\n }\n}\n\n.walletconnect-connect__buttons__wrapper {\n max-height: 44vh;\n}\n\n.walletconnect-connect__buttons__wrapper__android {\n margin: 50% 0;\n}\n\n.walletconnect-connect__buttons__wrapper__wrap {\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n margin: 10px 0;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__buttons__wrapper__wrap {\n margin-top: 40px;\n }\n}\n\n.walletconnect-connect__button {\n background-color: rgb(64, 153, 255);\n padding: 12px;\n border-radius: 8px;\n text-decoration: none;\n color: rgb(255, 255, 255);\n font-weight: 500;\n}\n\n.walletconnect-connect__button__icon_anchor {\n cursor: pointer;\n display: flex;\n justify-content: flex-start;\n align-items: center;\n margin: 8px;\n width: 42px;\n justify-self: center;\n flex-direction: column;\n text-decoration: none !important;\n}\n\n@media only screen and (max-width: 320px) {\n .walletconnect-connect__button__icon_anchor {\n margin: 4px;\n }\n}\n\n.walletconnect-connect__button__icon {\n border-radius: 10px;\n height: 42px;\n margin: 0;\n width: 42px;\n background-size: cover !important;\n box-shadow: 0 4px 12px 0 rgba(37, 41, 46, 0.25);\n}\n\n.walletconnect-connect__button__text {\n color: #424952;\n font-size: 2.7vw;\n text-decoration: none !important;\n padding: 0;\n margin-top: 1.8vw;\n font-weight: 600;\n}\n\n@media only screen and (min-width: 768px) {\n .walletconnect-connect__button__text {\n font-size: 16px;\n margin-top: 12px;\n }\n}\n\n.walletconnect-search__input {\n border: none;\n background: #d4d5d9;\n border-style: none;\n padding: 8px 16px;\n outline: none;\n font-style: normal;\n font-stretch: normal;\n font-size: 16px;\n font-style: normal;\n font-stretch: normal;\n line-height: normal;\n letter-spacing: normal;\n text-align: left;\n border-radius: 8px;\n width: calc(100% - 16px);\n margin: 0;\n margin-bottom: 8px;\n}\n',n.head.appendChild(t)}();var l=function Se(){var n=d.getDocumentOrThrow(),e=n.createElement("div");return e.setAttribute("id",R),n.body.appendChild(e),e}();i.render(i.createElement(q,{text:Ne(),uri:n,onClose:Ae(e),qrcodeModalOptions:t}),l)}(n,e,t)},close:function Fe(){de()||function fe(){be()}()}}},46402:(K,_)=>{"use strict";_.byteLength=function w(A){var k=h(A),D=k[1];return 3*(k[0]+D)/4-D},_.toByteArray=function B(A){var k,C,R=h(A),D=R[0],F=R[1],x=new d(function u(A,k,R){return 3*(k+R)/4-R}(0,D,F)),m=0,p=F>0?D-4:D;for(C=0;C>16&255,x[m++]=k>>8&255,x[m++]=255&k;return 2===F&&(k=c[A.charCodeAt(C)]<<2|c[A.charCodeAt(C+1)]>>4,x[m++]=255&k),1===F&&(k=c[A.charCodeAt(C)]<<10|c[A.charCodeAt(C+1)]<<4|c[A.charCodeAt(C+2)]>>2,x[m++]=k>>8&255,x[m++]=255&k),x},_.fromByteArray=function N(A){for(var k,R=A.length,D=R%3,F=[],x=16383,m=0,p=R-D;mp?p:m+x));return 1===D?F.push(y[(k=A[R-1])>>2]+y[k<<4&63]+"=="):2===D&&F.push(y[(k=(A[R-2]<<8)+A[R-1])>>10]+y[k>>4&63]+y[k<<2&63]+"="),F.join("")};for(var y=[],c=[],d=typeof Uint8Array<"u"?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,i=s.length;f0)throw new Error("Invalid string. Length must be a multiple of 4");var R=A.indexOf("=");return-1===R&&(R=k),[R,R===k?0:4-R%4]}function I(A){return y[A>>18&63]+y[A>>12&63]+y[A>>6&63]+y[63&A]}function P(A,k,R){for(var F=[],x=k;x{"use strict";var c=y(37753),d={"text/plain":"Text","text/html":"Url",default:"Text"};K.exports=function i(h,w){var u,B,I,P,N,A,k=!1;w||(w={}),u=w.debug||!1;try{if(I=c(),P=document.createRange(),N=document.getSelection(),(A=document.createElement("span")).textContent=h,A.ariaHidden="true",A.style.all="unset",A.style.position="fixed",A.style.top=0,A.style.clip="rect(0, 0, 0, 0)",A.style.whiteSpace="pre",A.style.webkitUserSelect="text",A.style.MozUserSelect="text",A.style.msUserSelect="text",A.style.userSelect="text",A.addEventListener("copy",function(D){D.stopPropagation(),w.format&&(D.preventDefault(),typeof D.clipboardData>"u"?(u&&console.warn("unable to use e.clipboardData"),u&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),window.clipboardData.setData(d[w.format]||d.default,h)):(D.clipboardData.clearData(),D.clipboardData.setData(w.format,h))),w.onCopy&&(D.preventDefault(),w.onCopy(D.clipboardData))}),document.body.appendChild(A),P.selectNodeContents(A),N.addRange(P),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");k=!0}catch(D){u&&console.error("unable to copy using execCommand: ",D),u&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(w.format||"text",h),w.onCopy&&w.onCopy(window.clipboardData),k=!0}catch(F){u&&console.error("unable to copy using clipboardData: ",F),u&&console.error("falling back to prompt"),B=function f(h){var w=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return h.replace(/#{\s*key\s*}/g,w)}("message"in w?w.message:"Copy to clipboard: #{key}, Enter"),window.prompt(B,h)}}finally{N&&("function"==typeof N.removeRange?N.removeRange(P):N.removeAllRanges()),A&&document.body.removeChild(A),I()}return k}},12015:K=>{"use strict";var _={single_source_shortest_paths:function(y,c,d){var s={},f={};f[c]=0;var h,w,u,B,I,N,i=_.PriorityQueue.make();for(i.push(c,0);!i.empty();)for(u in B=(h=i.pop()).cost,I=y[w=h.value]||{})I.hasOwnProperty(u)&&(N=B+I[u],(typeof f[u]>"u"||f[u]>N)&&(f[u]=N,i.push(u,N),s[u]=w));if(typeof d<"u"&&typeof f[d]>"u"){var R=["Could not find a path from ",c," to ",d,"."].join("");throw new Error(R)}return s},extract_shortest_path_from_predecessor_list:function(y,c){for(var d=[],s=c;s;)d.push(s),s=y[s];return d.reverse(),d},find_path:function(y,c,d){var s=_.single_source_shortest_paths(y,c,d);return _.extract_shortest_path_from_predecessor_list(s,d)},PriorityQueue:{make:function(y){var s,c=_.PriorityQueue,d={};for(s in y=y||{},c)c.hasOwnProperty(s)&&(d[s]=c[s]);return d.queue=[],d.sorter=y.sorter||c.default_sorter,d},default_sorter:function(y,c){return y.cost-c.cost},push:function(y,c){this.queue.push({value:y,cost:c}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};K.exports=_},74144:(K,_)=>{_.read=function(y,c,d,s,f){var i,h,w=8*f-s-1,u=(1<>1,I=-7,P=d?f-1:0,N=d?-1:1,A=y[c+P];for(P+=N,i=A&(1<<-I)-1,A>>=-I,I+=w;I>0;i=256*i+y[c+P],P+=N,I-=8);for(h=i&(1<<-I)-1,i>>=-I,I+=s;I>0;h=256*h+y[c+P],P+=N,I-=8);if(0===i)i=1-B;else{if(i===u)return h?NaN:1/0*(A?-1:1);h+=Math.pow(2,s),i-=B}return(A?-1:1)*h*Math.pow(2,i-s)},_.write=function(y,c,d,s,f,i){var h,w,u,B=8*i-f-1,I=(1<>1,N=23===f?Math.pow(2,-24)-Math.pow(2,-77):0,A=s?0:i-1,k=s?1:-1,R=c<0||0===c&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(w=isNaN(c)?1:0,h=I):(h=Math.floor(Math.log(c)/Math.LN2),c*(u=Math.pow(2,-h))<1&&(h--,u*=2),(c+=h+P>=1?N/u:N*Math.pow(2,1-P))*u>=2&&(h++,u/=2),h+P>=I?(w=0,h=I):h+P>=1?(w=(c*u-1)*Math.pow(2,f),h+=P):(w=c*Math.pow(2,P-1)*Math.pow(2,f),h=0));f>=8;y[d+A]=255&w,A+=k,w/=256,f-=8);for(h=h<0;y[d+A]=255&h,A+=k,h/=256,B-=8);y[d+A-k]|=128*R}},17613:K=>{var _={}.toString;K.exports=Array.isArray||function(y){return"[object Array]"==_.call(y)}},24023:(K,_,y)=>{"use strict";y.r(_),y.d(_,{Children:()=>Ge,Component:()=>x,Fragment:()=>F,PureComponent:()=>Me,Suspense:()=>Be,SuspenseList:()=>Te,cloneElement:()=>lt,createContext:()=>ue,createElement:()=>k,createFactory:()=>at,createPortal:()=>qe,createRef:()=>D,default:()=>dt,findDOMNode:()=>ct,forwardRef:()=>Je,hydrate:()=>rt,isValidElement:()=>ot,lazy:()=>Qe,memo:()=>He,render:()=>Xe,unmountComponentAtNode:()=>ut,unstable_batchedUpdates:()=>st,useCallback:()=>l,useContext:()=>v,useDebugValue:()=>g,useEffect:()=>Fe,useErrorBoundary:()=>b,useImperativeHandle:()=>e,useLayoutEffect:()=>Oe,useMemo:()=>t,useReducer:()=>ve,useRef:()=>n,useState:()=>de,version:()=>ft});var c,s,f,i,h,w,u,B={},I=[],P=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function N(r,o){for(var a in o)r[a]=o[a];return r}function A(r){var o=r.parentNode;o&&o.removeChild(r)}function k(r,o,a){var E,U=arguments,T={};for(E in o)"key"!==E&&"ref"!==E&&(T[E]=o[E]);if(arguments.length>3)for(a=[a],E=3;E2&&(o.children=I.slice.call(arguments,2)),a={},o)"key"!==E&&"ref"!==E&&(a[E]=o[E]);return R(r.type,a,o.key||r.key,o.ref||r.ref,null)}function ue(r){var o={},a={__c:"__cC"+u++,__:r,Consumer:function(E,U){return E.children(U)},Provider:function(E){var U,T=this;return this.getChildContext||(U=[],this.getChildContext=function(){return o[a.__c]=T,o},this.shouldComponentUpdate=function(Z){T.props.value!==Z.value&&U.some(function(te){te.context=Z.value,C(te)})},this.sub=function(Z){U.push(Z);var te=Z.componentWillUnmount;Z.componentWillUnmount=function(){U.splice(U.indexOf(Z),1),te&&te.call(Z)}}),E.children}};return a.Consumer.contextType=a,a.Provider.__=a,a}c={__e:function(r,o){for(var a,E;o=o.__;)if((a=o.__c)&&!a.__)try{if(a.constructor&&null!=a.constructor.getDerivedStateFromError&&(E=!0,a.setState(a.constructor.getDerivedStateFromError(r))),null!=a.componentDidCatch&&(E=!0,a.componentDidCatch(r)),E)return C(a.__E=a)}catch(U){r=U}throw r}},x.prototype.setState=function(r,o){var a;a=this.__s!==this.state?this.__s:this.__s=N({},this.state),"function"==typeof r&&(r=r(a,this.props)),r&&N(a,r),null!=r&&this.__v&&(o&&this.__h.push(o),C(this))},x.prototype.forceUpdate=function(r){this.__v&&(this.__e=!0,r&&this.__h.push(r),C(this))},x.prototype.render=F,s=[],f=0,i="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,w=B,u=0;var ie,ce,ke,ye=0,Se=[],be=c.__r,Ae=c.diffed,Ne=c.__c,Re=c.unmount;function fe(r,o){c.__h&&c.__h(ce,r,ye||o),ye=0;var a=ce.__H||(ce.__H={__:[],__h:[]});return r>=a.__.length&&a.__.push({}),a.__[r]}function de(r){return ye=1,ve(ee,r)}function ve(r,o,a){var E=fe(ie++,2);return E.__c||(E.__c=ce,E.__=[a?a(o):ee(void 0,o),function(U){var T=r(E.__[0],U);E.__[0]!==T&&(E.__[0]=T,E.__c.setState({}))}]),E.__}function Fe(r,o){var a=fe(ie++,3);!c.__s&&oe(a.__H,o)&&(a.__=r,a.__H=o,ce.__H.__h.push(a))}function Oe(r,o){var a=fe(ie++,4);!c.__s&&oe(a.__H,o)&&(a.__=r,a.__H=o,ce.__h.push(a))}function n(r){return ye=5,t(function(){return{current:r}},[])}function e(r,o,a){ye=6,Oe(function(){"function"==typeof r?r(o()):r&&(r.current=o())},null==a?a:a.concat(r))}function t(r,o){var a=fe(ie++,7);return oe(a.__H,o)?(a.__H=o,a.__h=r,a.__=r()):a.__}function l(r,o){return ye=8,t(function(){return r},o)}function v(r){var o=ce.context[r.__c],a=fe(ie++,9);return a.__c=r,o?(null==a.__&&(a.__=!0,o.sub(ce)),o.props.value):r.__}function g(r,o){c.useDebugValue&&c.useDebugValue(o?o(r):r)}function b(r){var o=fe(ie++,10),a=de();return o.__=r,ce.componentDidCatch||(ce.componentDidCatch=function(E){o.__&&o.__(E),a[1](E)}),[a[0],function(){a[1](void 0)}]}function M(){Se.some(function(r){if(r.__P)try{r.__H.__h.forEach(W),r.__H.__h.forEach(X),r.__H.__h=[]}catch(o){return r.__H.__h=[],c.__e(o,r.__v),!0}}),Se=[]}function W(r){r.t&&r.t()}function X(r){var o=r.__();"function"==typeof o&&(r.t=o)}function oe(r,o){return!r||o.some(function(a,E){return a!==r[E]})}function ee(r,o){return"function"==typeof o?o(r):o}function he(r,o){for(var a in o)r[a]=o[a];return r}function Le(r,o){for(var a in r)if("__source"!==a&&!(a in o))return!0;for(var E in o)if("__source"!==E&&r[E]!==o[E])return!0;return!1}c.__r=function(r){be&&be(r),ie=0,(ce=r.__c).__H&&(ce.__H.__h.forEach(W),ce.__H.__h.forEach(X),ce.__H.__h=[])},c.diffed=function(r){Ae&&Ae(r);var o=r.__c;if(o){var a=o.__H;a&&a.__h.length&&(1!==Se.push(o)&&ke===c.requestAnimationFrame||((ke=c.requestAnimationFrame)||function(E){var U,T=function(){clearTimeout(Z),cancelAnimationFrame(U),setTimeout(E)},Z=setTimeout(T,100);typeof window<"u"&&(U=requestAnimationFrame(T))})(M))}},c.__c=function(r,o){o.some(function(a){try{a.__h.forEach(W),a.__h=a.__h.filter(function(E){return!E.__||X(E)})}catch(E){o.some(function(U){U.__h&&(U.__h=[])}),o=[],c.__e(E,a.__v)}}),Ne&&Ne(r,o)},c.unmount=function(r){Re&&Re(r);var o=r.__c;if(o){var a=o.__H;if(a)try{a.__.forEach(function(E){return E.t&&E.t()})}catch(E){c.__e(E,o.__v)}}};var Me=function(r){var o,a;function E(U){var T;return(T=r.call(this,U)||this).isPureReactComponent=!0,T}return a=r,(o=E).prototype=Object.create(a.prototype),o.prototype.constructor=o,o.__proto__=a,E.prototype.shouldComponentUpdate=function(U,T){return Le(this.props,U)||Le(this.state,T)},E}(x);function He(r,o){function a(U){var T=this.props.ref,Z=T==U.ref;return!Z&&T&&(T.call?T(null):T.current=null),o?!o(this.props,U)||!Z:Le(this.props,U)}function E(U){return this.shouldComponentUpdate=a,k(r,he({},U))}return E.prototype.isReactComponent=!0,E.displayName="Memo("+(r.displayName||r.name)+")",E.t=!0,E}var Ye=c.__b;function Je(r){function o(a){var E=he({},a);return delete E.ref,r(E,a.ref)}return o.prototype.isReactComponent=o.t=!0,o.displayName="ForwardRef("+(r.displayName||r.name)+")",o}c.__b=function(r){r.type&&r.type.t&&r.ref&&(r.props.ref=r.ref,r.ref=null),Ye&&Ye(r)};var Ve=function(r,o){return r?J(r).reduce(function(a,E,U){return a.concat(o(E,U))},[]):null},Ge={map:Ve,forEach:Ve,count:function(r){return r?J(r).length:0},only:function(r){if(1!==(r=J(r)).length)throw new Error("Children.only() expects only one child.");return r[0]},toArray:J},we=c.__e;function Ee(r){return r&&((r=he({},r)).__c=null,r.__k=r.__k&&r.__k.map(Ee)),r}function Be(){this.__u=0,this.o=null,this.__b=null}function We(r){var o=r.__.__c;return o&&o.u&&o.u(r)}function Qe(r){var o,a,E;function U(T){if(o||(o=r()).then(function(Z){a=Z.default||Z},function(Z){E=Z}),E)throw E;if(!a)throw o;return k(a,T)}return U.displayName="Lazy",U.t=!0,U}function Te(){this.i=null,this.l=null}c.__e=function(r,o,a){if(r.then)for(var E,U=o;U=U.__;)if((E=U.__c)&&E.__c)return E.__c(r,o.__c);we(r,o,a)},(Be.prototype=new x).__c=function(r,o){var a=this;null==a.o&&(a.o=[]),a.o.push(o);var E=We(a.__v),U=!1,T=function(){U||(U=!0,E?E(Z):Z())};o.__c=o.componentWillUnmount,o.componentWillUnmount=function(){T(),o.__c&&o.__c()};var Z=function(){var te;if(!--a.__u)for(a.__v.__k[0]=a.state.u,a.setState({u:a.__b=null});te=a.o.pop();)te.forceUpdate()};a.__u++||a.setState({u:a.__b=a.__v.__k[0]}),r.then(T,T)},Be.prototype.render=function(r,o){return this.__b&&(this.__v.__k[0]=Ee(this.__b),this.__b=null),[k(x,null,o.u?null:r.children),o.u&&r.fallback]};var ze=function(r,o,a){if(++a[1]===a[0]&&r.l.delete(o),r.props.revealOrder&&("t"!==r.props.revealOrder[0]||!r.l.size))for(a=r.i;a;){for(;a.length>3;)a.pop()();if(a[1]{var c=y(14939),d=y(19931),s=y(52874),f=y(75049);function i(h,w,u,B,I){var P=[].slice.call(arguments,1),N=P.length,A="function"==typeof P[N-1];if(!A&&!c())throw new Error("Callback required as last argument");if(!A){if(N<1)throw new Error("Too few arguments provided");return 1===N?(u=w,w=B=void 0):2===N&&!w.getContext&&(B=u,u=w,w=void 0),new Promise(function(R,D){try{var F=d.create(u,B);R(h(F,w,B))}catch(x){D(x)}})}if(N<2)throw new Error("Too few arguments provided");2===N?(I=u,u=w,w=B=void 0):3===N&&(w.getContext&&typeof I>"u"?(I=B,B=void 0):(I=B,B=u,u=w,w=void 0));try{var k=d.create(u,B);I(null,h(k,w,B))}catch(R){I(R)}}_.create=d.create,_.toCanvas=i.bind(null,s.render),_.toDataURL=i.bind(null,s.renderToDataURL),_.toString=i.bind(null,function(h,w,u){return f.render(h,u)})},14939:K=>{K.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},73023:(K,_,y)=>{var c=y(33392).getSymbolSize;_.getRowColCoords=function(s){if(1===s)return[];for(var f=Math.floor(s/7)+2,i=c(s),h=145===i?26:2*Math.ceil((i-13)/(2*f-2)),w=[i-7],u=1;u{var c=y(12956),d=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function s(f){this.mode=c.ALPHANUMERIC,this.data=f}s.getBitsLength=function(i){return 11*Math.floor(i/2)+i%2*6},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(i){var h;for(h=0;h+2<=this.data.length;h+=2){var w=45*d.indexOf(this.data[h]);w+=d.indexOf(this.data[h+1]),i.put(w,11)}this.data.length%2&&i.put(d.indexOf(this.data[h]),6)},K.exports=s},85924:K=>{function _(){this.buffer=[],this.length=0}_.prototype={get:function(y){var c=Math.floor(y/8);return 1==(this.buffer[c]>>>7-y%8&1)},put:function(y,c){for(var d=0;d>>c-d-1&1))},getLengthInBits:function(){return this.length},putBit:function(y){var c=Math.floor(this.length/8);this.buffer.length<=c&&this.buffer.push(0),y&&(this.buffer[c]|=128>>>this.length%8),this.length++}},K.exports=_},51907:(K,_,y)=>{var c=y(68623);function d(s){if(!s||s<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=s,this.data=c.alloc(s*s),this.reservedBit=c.alloc(s*s)}d.prototype.set=function(s,f,i,h){var w=s*this.size+f;this.data[w]=i,h&&(this.reservedBit[w]=!0)},d.prototype.get=function(s,f){return this.data[s*this.size+f]},d.prototype.xor=function(s,f,i){this.data[s*this.size+f]^=i},d.prototype.isReserved=function(s,f){return this.reservedBit[s*this.size+f]},K.exports=d},59556:(K,_,y)=>{var c=y(68623),d=y(12956);function s(f){this.mode=d.BYTE,this.data=c.from(f)}s.getBitsLength=function(i){return 8*i},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(f){for(var i=0,h=this.data.length;i{var c=y(46942),d=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],s=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];_.getBlocksCount=function(i,h){switch(h){case c.L:return d[4*(i-1)+0];case c.M:return d[4*(i-1)+1];case c.Q:return d[4*(i-1)+2];case c.H:return d[4*(i-1)+3];default:return}},_.getTotalCodewordsCount=function(i,h){switch(h){case c.L:return s[4*(i-1)+0];case c.M:return s[4*(i-1)+1];case c.Q:return s[4*(i-1)+2];case c.H:return s[4*(i-1)+3];default:return}}},46942:(K,_)=>{_.L={bit:1},_.M={bit:0},_.Q={bit:3},_.H={bit:2},_.isValid=function(d){return d&&typeof d.bit<"u"&&d.bit>=0&&d.bit<4},_.from=function(d,s){if(_.isValid(d))return d;try{return function y(c){if("string"!=typeof c)throw new Error("Param is not a string");switch(c.toLowerCase()){case"l":case"low":return _.L;case"m":case"medium":return _.M;case"q":case"quartile":return _.Q;case"h":case"high":return _.H;default:throw new Error("Unknown EC Level: "+c)}}(d)}catch{return s}}},6402:(K,_,y)=>{var c=y(33392).getSymbolSize;_.getPositions=function(f){var i=c(f);return[[0,0],[i-7,0],[0,i-7]]}},83861:(K,_,y)=>{var c=y(33392),f=c.getBCHDigit(1335);_.getEncodedBits=function(h,w){for(var u=h.bit<<3|w,B=u<<10;c.getBCHDigit(B)-f>=0;)B^=1335<{var c=y(68623),d=c.alloc(512),s=c.alloc(256);(function(){for(var i=1,h=0;h<255;h++)d[h]=i,s[i]=h,256&(i<<=1)&&(i^=285);for(h=255;h<512;h++)d[h]=d[h-255]})(),_.log=function(i){if(i<1)throw new Error("log("+i+")");return s[i]},_.exp=function(i){return d[i]},_.mul=function(i,h){return 0===i||0===h?0:d[s[i]+s[h]]}},38918:(K,_,y)=>{var c=y(12956),d=y(33392);function s(f){this.mode=c.KANJI,this.data=f}s.getBitsLength=function(i){return 13*i},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(f){var i;for(i=0;i=33088&&h<=40956)h-=33088;else{if(!(h>=57408&&h<=60351))throw new Error("Invalid SJIS character: "+this.data[i]+"\nMake sure your charset is UTF-8");h-=49472}f.put(h=192*(h>>>8&255)+(255&h),13)}},K.exports=s},73119:(K,_)=>{_.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function c(d,s,f){switch(d){case _.Patterns.PATTERN000:return(s+f)%2==0;case _.Patterns.PATTERN001:return s%2==0;case _.Patterns.PATTERN010:return f%3==0;case _.Patterns.PATTERN011:return(s+f)%3==0;case _.Patterns.PATTERN100:return(Math.floor(s/2)+Math.floor(f/3))%2==0;case _.Patterns.PATTERN101:return s*f%2+s*f%3==0;case _.Patterns.PATTERN110:return(s*f%2+s*f%3)%2==0;case _.Patterns.PATTERN111:return(s*f%3+(s+f)%2)%2==0;default:throw new Error("bad maskPattern:"+d)}}_.isValid=function(s){return null!=s&&""!==s&&!isNaN(s)&&s>=0&&s<=7},_.from=function(s){return _.isValid(s)?parseInt(s,10):void 0},_.getPenaltyN1=function(s){for(var f=s.size,i=0,h=0,w=0,u=null,B=null,I=0;I=5&&(i+=h-5+3),u=N,h=1),(N=s.get(P,I))===B?w++:(w>=5&&(i+=w-5+3),B=N,w=1)}h>=5&&(i+=h-5+3),w>=5&&(i+=w-5+3)}return i},_.getPenaltyN2=function(s){for(var f=s.size,i=0,h=0;h=10&&(1488===h||93===h)&&i++,w=w<<1&2047|s.get(B,u),B>=10&&(1488===w||93===w)&&i++}return 40*i},_.getPenaltyN4=function(s){for(var f=0,i=s.data.length,h=0;h{var c=y(8081),d=y(94563);_.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},_.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},_.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},_.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},_.MIXED={bit:-1},_.getCharCountIndicator=function(i,h){if(!i.ccBits)throw new Error("Invalid mode: "+i);if(!c.isValid(h))throw new Error("Invalid version: "+h);return h>=1&&h<10?i.ccBits[0]:h<27?i.ccBits[1]:i.ccBits[2]},_.getBestModeForData=function(i){return d.testNumeric(i)?_.NUMERIC:d.testAlphanumeric(i)?_.ALPHANUMERIC:d.testKanji(i)?_.KANJI:_.BYTE},_.toString=function(i){if(i&&i.id)return i.id;throw new Error("Invalid mode")},_.isValid=function(i){return i&&i.bit&&i.ccBits},_.from=function(i,h){if(_.isValid(i))return i;try{return function s(f){if("string"!=typeof f)throw new Error("Param is not a string");switch(f.toLowerCase()){case"numeric":return _.NUMERIC;case"alphanumeric":return _.ALPHANUMERIC;case"kanji":return _.KANJI;case"byte":return _.BYTE;default:throw new Error("Unknown mode: "+f)}}(i)}catch{return h}}},18570:(K,_,y)=>{var c=y(12956);function d(s){this.mode=c.NUMERIC,this.data=s.toString()}d.getBitsLength=function(f){return 10*Math.floor(f/3)+(f%3?f%3*3+1:0)},d.prototype.getLength=function(){return this.data.length},d.prototype.getBitsLength=function(){return d.getBitsLength(this.data.length)},d.prototype.write=function(f){var i,h,w;for(i=0;i+3<=this.data.length;i+=3)h=this.data.substr(i,3),w=parseInt(h,10),f.put(w,10);var u=this.data.length-i;u>0&&(h=this.data.substr(i),w=parseInt(h,10),f.put(w,3*u+1))},K.exports=d},87137:(K,_,y)=>{var c=y(68623),d=y(1642);_.mul=function(f,i){for(var h=c.alloc(f.length+i.length-1),w=0;w=0;){for(var w=h[0],u=0;u{var c=y(68623),d=y(33392),s=y(46942),f=y(85924),i=y(51907),h=y(73023),w=y(6402),u=y(73119),B=y(43534),I=y(96252),P=y(66264),N=y(83861),A=y(12956),k=y(72107),R=y(17613);function p(H,$,Y){var j,G,z=H.size,Q=N.getEncodedBits($,Y);for(j=0;j<15;j++)H.set(j<6?j:j<8?j+1:z-15+j,8,G=1==(Q>>j&1),!0),H.set(8,j<8?z-j-1:j<9?15-j-1+1:15-j-1,G,!0);H.set(z-8,8,1,!0)}function J(H,$,Y,z){var Q;if(R(H))Q=k.fromArray(H);else{if("string"!=typeof H)throw new Error("Invalid data");var j=$;if(!j){var G=k.rawSplit(H);j=P.getBestVersionForData(G,Y)}Q=k.fromString(H,j||40)}var q=P.getBestVersionForData(Q,Y);if(!q)throw new Error("The amount of data is too big to be stored in a QR Code");if($){if($=0&&q<=6&&(0===re||6===re)||re>=0&&re<=6&&(0===q||6===q)||q>=2&&q<=4&&re>=2&&re<=4,!0)}(le,$),function F(H){for(var $=H.size,Y=8;Y<$-8;Y++){var z=Y%2==0;H.set(Y,6,z,!0),H.set(6,Y,z,!0)}}(le),function x(H,$){for(var Y=h.getPositions($),z=0;z=7&&function m(H,$){for(var Q,j,G,Y=H.size,z=P.getEncodedBits($),q=0;q<18;q++)Q=Math.floor(q/3),H.set(Q,j=q%3+Y-8-3,G=1==(z>>q&1),!0),H.set(j,Q,G,!0)}(le,$),function C(H,$){for(var Y=H.size,z=-1,Q=Y-1,j=7,G=0,q=Y-1;q>0;q-=2)for(6===q&&q--;;){for(var re=0;re<2;re++)if(!H.isReserved(Q,q-re)){var ge=!1;G<$.length&&(ge=1==($[G]>>>j&1)),H.set(Q,q-re,ge),-1==--j&&(G++,j=7)}if((Q+=z)<0||Y<=Q){Q-=z,z=-z;break}}}(le,re),isNaN(z)&&(z=u.getBestMask(le,p.bind(null,le,Y))),u.applyMask(z,le),p(le,Y,z),{modules:le,version:$,errorCorrectionLevel:Y,maskPattern:z,segments:Q}}_.create=function($,Y){if(typeof $>"u"||""===$)throw new Error("No input text");var Q,j,z=s.M;return typeof Y<"u"&&(z=s.from(Y.errorCorrectionLevel,s.M),Q=P.from(Y.version),j=u.from(Y.maskPattern),Y.toSJISFunc&&d.setToSJISFunction(Y.toSJISFunc)),J($,Q,z,j)}},96252:(K,_,y)=>{var c=y(68623),d=y(87137),s=y(67086).lW;function f(i){this.genPoly=void 0,this.degree=i,this.degree&&this.initialize(this.degree)}f.prototype.initialize=function(h){this.degree=h,this.genPoly=d.generateECPolynomial(this.degree)},f.prototype.encode=function(h){if(!this.genPoly)throw new Error("Encoder not initialized");var w=c.alloc(this.degree),u=s.concat([h,w],h.length+this.degree),B=d.mod(u,this.genPoly),I=this.degree-B.length;if(I>0){var P=c.alloc(this.degree);return B.copy(P,I),P}return B},K.exports=f},94563:(K,_)=>{var y="[0-9]+",d="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",s="(?:(?![A-Z0-9 $%*+\\-./:]|"+(d=d.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";_.KANJI=new RegExp(d,"g"),_.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),_.BYTE=new RegExp(s,"g"),_.NUMERIC=new RegExp(y,"g"),_.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");var f=new RegExp("^"+d+"$"),i=new RegExp("^"+y+"$"),h=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");_.testKanji=function(u){return f.test(u)},_.testNumeric=function(u){return i.test(u)},_.testAlphanumeric=function(u){return h.test(u)}},72107:(K,_,y)=>{var c=y(12956),d=y(18570),s=y(3799),f=y(59556),i=y(38918),h=y(94563),w=y(33392),u=y(12015);function B(F){return unescape(encodeURIComponent(F)).length}function I(F,x,m){for(var C,p=[];null!==(C=F.exec(m));)p.push({data:C[0],index:C.index,mode:x,length:C[0].length});return p}function P(F){var p,C,x=I(h.NUMERIC,c.NUMERIC,F),m=I(h.ALPHANUMERIC,c.ALPHANUMERIC,F);return w.isKanjiModeEnabled()?(p=I(h.BYTE,c.BYTE,F),C=I(h.KANJI,c.KANJI,F)):(p=I(h.BYTE_KANJI,c.BYTE,F),C=[]),x.concat(m,p,C).sort(function(V,J){return V.index-J.index}).map(function(V){return{data:V.data,mode:V.mode,length:V.length}})}function N(F,x){switch(x){case c.NUMERIC:return d.getBitsLength(F);case c.ALPHANUMERIC:return s.getBitsLength(F);case c.KANJI:return i.getBitsLength(F);case c.BYTE:return f.getBitsLength(F)}}function D(F,x){var m,p=c.getBestModeForData(F);if((m=c.from(x,p))!==c.BYTE&&m.bit=0?x[x.length-1]:null;return p&&p.mode===m.mode?(x[x.length-1].data+=m.data,x):(x.push(m),x)},[])}(J))},_.rawSplit=function(x){return _.fromArray(P(x,w.isKanjiModeEnabled()))}},33392:(K,_)=>{var y,c=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];_.getSymbolSize=function(s){if(!s)throw new Error('"version" cannot be null or undefined');if(s<1||s>40)throw new Error('"version" should be in range from 1 to 40');return 4*s+17},_.getSymbolTotalCodewords=function(s){return c[s]},_.getBCHDigit=function(d){for(var s=0;0!==d;)s++,d>>>=1;return s},_.setToSJISFunction=function(s){if("function"!=typeof s)throw new Error('"toSJISFunc" is not a valid function.');y=s},_.isKanjiModeEnabled=function(){return typeof y<"u"},_.toSJIS=function(s){return y(s)}},8081:(K,_)=>{_.isValid=function(c){return!isNaN(c)&&c>=1&&c<=40}},66264:(K,_,y)=>{var c=y(33392),d=y(43534),s=y(46942),f=y(12956),i=y(8081),h=y(17613),u=c.getBCHDigit(7973);function I(A,k){return f.getCharCountIndicator(A,k)+4}function P(A,k){var R=0;return A.forEach(function(D){var F=I(D.mode,k);R+=F+D.getBitsLength()}),R}_.from=function(k,R){return i.isValid(k)?parseInt(k,10):R},_.getCapacity=function(k,R,D){if(!i.isValid(k))throw new Error("Invalid QR Code version");typeof D>"u"&&(D=f.BYTE);var m=8*(c.getSymbolTotalCodewords(k)-d.getTotalCodewordsCount(k,R));if(D===f.MIXED)return m;var p=m-I(D,k);switch(D){case f.NUMERIC:return Math.floor(p/10*3);case f.ALPHANUMERIC:return Math.floor(p/11*2);case f.KANJI:return Math.floor(p/13);default:return Math.floor(p/8)}},_.getBestVersionForData=function(k,R){var D,F=s.from(R,s.M);if(h(k)){if(k.length>1)return function N(A,k){for(var R=1;R<=40;R++)if(P(A,R)<=_.getCapacity(R,k,f.MIXED))return R}(k,F);if(0===k.length)return 1;D=k[0]}else D=k;return function B(A,k,R){for(var D=1;D<=40;D++)if(k<=_.getCapacity(D,R,A))return D}(D.mode,D.getLength(),F)},_.getEncodedBits=function(k){if(!i.isValid(k)||k<7)throw new Error("Invalid QR Code version");for(var R=k<<12;c.getBCHDigit(R)-u>=0;)R^=7973<{var c=y(98347);_.render=function(i,h,w){var u=w,B=h;typeof u>"u"&&(!h||!h.getContext)&&(u=h,h=void 0),h||(B=function s(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),u=c.getOptions(u);var I=c.getImageWidth(i.modules.size,u),P=B.getContext("2d"),N=P.createImageData(I,I);return c.qrToImageData(N.data,i,u),function d(f,i,h){f.clearRect(0,0,i.width,i.height),i.style||(i.style={}),i.height=h,i.width=h,i.style.height=h+"px",i.style.width=h+"px"}(P,B,I),P.putImageData(N,0,0),B},_.renderToDataURL=function(i,h,w){var u=w;return typeof u>"u"&&(!h||!h.getContext)&&(u=h,h=void 0),u||(u={}),_.render(i,h,u).toDataURL(u.type||"image/png",(u.rendererOpts||{}).quality)}},75049:(K,_,y)=>{var c=y(98347);function d(i,h){var w=i.a/255,u=h+'="'+i.hex+'"';return w<1?u+" "+h+'-opacity="'+w.toFixed(2).slice(1)+'"':u}function s(i,h,w){var u=i+h;return typeof w<"u"&&(u+=" "+w),u}_.render=function(h,w,u){var B=c.getOptions(w),I=h.modules.size,P=h.modules.data,N=I+2*B.margin,A=B.color.light.a?"':"",k="0&&A>0&&i[N-1]||(u+=I?s("M",A+w,.5+k+w):s("m",B,0),B=0,I=!1),A+1',F=''+A+k+"\n";return"function"==typeof u&&u(null,F),F}},98347:(K,_)=>{function y(c){if("number"==typeof c&&(c=c.toString()),"string"!=typeof c)throw new Error("Color should be defined as hex string");var d=c.slice().replace("#","").split("");if(d.length<3||5===d.length||d.length>8)throw new Error("Invalid hex color: "+c);(3===d.length||4===d.length)&&(d=Array.prototype.concat.apply([],d.map(function(f){return[f,f]}))),6===d.length&&d.push("F","F");var s=parseInt(d.join(""),16);return{r:s>>24&255,g:s>>16&255,b:s>>8&255,a:255&s,hex:"#"+d.slice(0,6).join("")}}_.getOptions=function(d){d||(d={}),d.color||(d.color={});var f=d.width&&d.width>=21?d.width:void 0;return{width:f,scale:f?4:d.scale||4,margin:typeof d.margin>"u"||null===d.margin||d.margin<0?4:d.margin,color:{dark:y(d.color.dark||"#000000ff"),light:y(d.color.light||"#ffffffff")},type:d.type,rendererOpts:d.rendererOpts||{}}},_.getScale=function(d,s){return s.width&&s.width>=d+2*s.margin?s.width/(d+2*s.margin):s.scale},_.getImageWidth=function(d,s){var f=_.getScale(d,s);return Math.floor((d+2*s.margin)*f)},_.qrToImageData=function(d,s,f){for(var i=s.modules.size,h=s.modules.data,w=_.getScale(i,f),u=Math.floor((i+2*f.margin)*w),B=f.margin*w,I=[f.color.light,f.color.dark],P=0;P=B&&N>=B&&P{"use strict";var c=y(17613),s=(f.TYPED_ARRAY_SUPPORT=function d(){try{var x=new Uint8Array(1);return x.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===x.foo()}catch{return!1}}())?2147483647:1073741823;function f(x,m,p){return f.TYPED_ARRAY_SUPPORT||this instanceof f?"number"==typeof x?u(this,x):function F(x,m,p,C){if("number"==typeof m)throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&m instanceof ArrayBuffer?function P(x,m,p,C){if(p<0||m.byteLength=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|x}function w(x,m){var p;return f.TYPED_ARRAY_SUPPORT?(p=new Uint8Array(m)).__proto__=f.prototype:(null===(p=x)&&(p=new f(m)),p.length=m),p}function u(x,m){var p=w(x,m<0?0:0|i(m));if(!f.TYPED_ARRAY_SUPPORT)for(var C=0;C55295&&p<57344){if(!L){if(p>56319){(m-=3)>-1&&V.push(239,191,189);continue}if(J+1===C){(m-=3)>-1&&V.push(239,191,189);continue}L=p;continue}if(p<56320){(m-=3)>-1&&V.push(239,191,189),L=p;continue}p=65536+(L-55296<<10|p-56320)}else L&&(m-=3)>-1&&V.push(239,191,189);if(L=null,p<128){if((m-=1)<0)break;V.push(p)}else if(p<2048){if((m-=2)<0)break;V.push(p>>6|192,63&p|128)}else if(p<65536){if((m-=3)<0)break;V.push(p>>12|224,p>>6&63|128,63&p|128)}else{if(!(p<1114112))throw new Error("Invalid code point");if((m-=4)<0)break;V.push(p>>18|240,p>>12&63|128,p>>6&63|128,63&p|128)}}return V}function k(x){return f.isBuffer(x)?x.length:typeof ArrayBuffer<"u"&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(x)||x instanceof ArrayBuffer)?x.byteLength:("string"!=typeof x&&(x=""+x),0===x.length?0:A(x).length)}f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1})),f.prototype.write=function(m,p,C){void 0===p||void 0===C&&"string"==typeof p?(C=this.length,p=0):isFinite(p)&&(p|=0,isFinite(C)?C|=0:C=void 0);var L=this.length-p;if((void 0===C||C>L)&&(C=L),m.length>0&&(C<0||p<0)||p>this.length)throw new RangeError("Attempt to write outside buffer bounds");return function D(x,m,p,C){return function R(x,m,p,C){for(var L=0;L=m.length||L>=x.length);++L)m[L+p]=x[L];return L}(A(m,x.length-p),x,p,C)}(this,m,p,C)},f.prototype.slice=function(m,p){var L,C=this.length;if((m=~~m)<0?(m+=C)<0&&(m=0):m>C&&(m=C),(p=void 0===p?C:~~p)<0?(p+=C)<0&&(p=0):p>C&&(p=C),p=m.length&&(p=m.length),p||(p=0),L>0&&L=this.length)throw new RangeError("sourceStart out of bounds");if(L<0)throw new RangeError("sourceEnd out of bounds");L>this.length&&(L=this.length),m.length-p=0;--J)m[J+p]=this[J+C];else if(V<1e3||!f.TYPED_ARRAY_SUPPORT)for(J=0;J>>=0,C=void 0===C?this.length:C>>>0,m||(m=0),"number"==typeof m)for(V=p;V{"use strict";var d=y(46402),s=y(74144),f="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;_.lW=u,_.h2=50;var i=2147483647;function w(n){if(n>i)throw new RangeError('The value "'+n+'" is invalid for option "size"');var e=new Uint8Array(n);return Object.setPrototypeOf(e,u.prototype),e}function u(n,e,t){if("number"==typeof n){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return N(n)}return B(n,e,t)}function B(n,e,t){if("string"==typeof n)return function A(n,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var t=0|p(n,e),l=w(t),v=l.write(n,e);return v!==t&&(l=l.slice(0,v)),l}(n,e);if(ArrayBuffer.isView(n))return function R(n){if(ve(n,Uint8Array)){var e=new Uint8Array(n);return D(e.buffer,e.byteOffset,e.byteLength)}return k(n)}(n);if(null==n)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n);if(ve(n,ArrayBuffer)||n&&ve(n.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ve(n,SharedArrayBuffer)||n&&ve(n.buffer,SharedArrayBuffer)))return D(n,e,t);if("number"==typeof n)throw new TypeError('The "value" argument must not be of type number. Received type number');var l=n.valueOf&&n.valueOf();if(null!=l&&l!==n)return u.from(l,e,t);var v=function F(n){if(u.isBuffer(n)){var e=0|x(n.length),t=w(e);return 0===t.length||n.copy(t,0,0,e),t}return void 0!==n.length?"number"!=typeof n.length||Fe(n.length)?w(0):k(n):"Buffer"===n.type&&Array.isArray(n.data)?k(n.data):void 0}(n);if(v)return v;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof n[Symbol.toPrimitive])return u.from(n[Symbol.toPrimitive]("string"),e,t);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof n)}function I(n){if("number"!=typeof n)throw new TypeError('"size" argument must be of type number');if(n<0)throw new RangeError('The value "'+n+'" is invalid for option "size"')}function N(n){return I(n),w(n<0?0:0|x(n))}function k(n){for(var e=n.length<0?0:0|x(n.length),t=w(e),l=0;l=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|n}function p(n,e){if(u.isBuffer(n))return n.length;if(ArrayBuffer.isView(n)||ve(n,ArrayBuffer))return n.byteLength;if("string"!=typeof n)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof n);var t=n.length,l=arguments.length>2&&!0===arguments[2];if(!l&&0===t)return 0;for(var v=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":return Ae(n).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return fe(n).length;default:if(v)return l?-1:Ae(n).length;e=(""+e).toLowerCase(),v=!0}}function C(n,e,t){var l=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===t||t>this.length)&&(t=this.length),t<=0)||(t>>>=0)<=(e>>>=0))return"";for(n||(n="utf8");;)switch(n){case"hex":return Ue(this,e,t);case"utf8":case"utf-8":return G(this,e,t);case"ascii":return ge(this,e,t);case"latin1":case"binary":return le(this,e,t);case"base64":return j(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,e,t);default:if(l)throw new TypeError("Unknown encoding: "+n);n=(n+"").toLowerCase(),l=!0}}function L(n,e,t){var l=n[e];n[e]=n[t],n[t]=l}function V(n,e,t,l,v){if(0===n.length)return-1;if("string"==typeof t?(l=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),Fe(t=+t)&&(t=v?0:n.length-1),t<0&&(t=n.length+t),t>=n.length){if(v)return-1;t=n.length-1}else if(t<0){if(!v)return-1;t=0}if("string"==typeof e&&(e=u.from(e,l)),u.isBuffer(e))return 0===e.length?-1:J(n,e,t,l,v);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?v?Uint8Array.prototype.indexOf.call(n,e,t):Uint8Array.prototype.lastIndexOf.call(n,e,t):J(n,[e],t,l,v);throw new TypeError("val must be string, number or Buffer")}function J(n,e,t,l,v){var X,g=1,b=n.length,M=e.length;if(void 0!==l&&("ucs2"===(l=String(l).toLowerCase())||"ucs-2"===l||"utf16le"===l||"utf-16le"===l)){if(n.length<2||e.length<2)return-1;g=2,b/=2,M/=2,t/=2}function W(Le,Me){return 1===g?Le[Me]:Le.readUInt16BE(Me*g)}if(v){var oe=-1;for(X=t;Xb&&(t=b-M),X=t;X>=0;X--){for(var ee=!0,he=0;hev&&(l=v):l=v;var g=e.length;l>g/2&&(l=g/2);for(var b=0;b>8,g.push(t%256),g.push(l);return g}(e,n.length-t),n,t,l)}function j(n,e,t){return d.fromByteArray(0===e&&t===n.length?n:n.slice(e,t))}function G(n,e,t){t=Math.min(n.length,t);for(var l=[],v=e;v239?4:g>223?3:g>191?2:1;if(v+M<=t)switch(M){case 1:g<128&&(b=g);break;case 2:128==(192&(W=n[v+1]))&&(ee=(31&g)<<6|63&W)>127&&(b=ee);break;case 3:X=n[v+2],128==(192&(W=n[v+1]))&&128==(192&X)&&(ee=(15&g)<<12|(63&W)<<6|63&X)>2047&&(ee<55296||ee>57343)&&(b=ee);break;case 4:X=n[v+2],oe=n[v+3],128==(192&(W=n[v+1]))&&128==(192&X)&&128==(192&oe)&&(ee=(15&g)<<18|(63&W)<<12|(63&X)<<6|63&oe)>65535&&ee<1114112&&(b=ee)}null===b?(b=65533,M=1):b>65535&&(l.push((b-=65536)>>>10&1023|55296),b=56320|1023&b),l.push(b),v+=M}return function re(n){var e=n.length;if(e<=q)return String.fromCharCode.apply(String,n);for(var t="",l=0;lv.length?u.from(b).copy(v,g):Uint8Array.prototype.set.call(v,b,g);else{if(!u.isBuffer(b))throw new TypeError('"list" argument must be an Array of Buffers');b.copy(v,g)}g+=b.length}return v},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tt&&(e+=" ... "),""},f&&(u.prototype[f]=u.prototype.inspect),u.prototype.compare=function(e,t,l,v,g){if(ve(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===l&&(l=e?e.length:0),void 0===v&&(v=0),void 0===g&&(g=this.length),t<0||l>e.length||v<0||g>this.length)throw new RangeError("out of range index");if(v>=g&&t>=l)return 0;if(v>=g)return-1;if(t>=l)return 1;if(this===e)return 0;for(var b=(g>>>=0)-(v>>>=0),M=(l>>>=0)-(t>>>=0),W=Math.min(b,M),X=this.slice(v,g),oe=e.slice(t,l),ee=0;ee>>=0,isFinite(l)?(l>>>=0,void 0===v&&(v="utf8")):(v=l,l=void 0)}var g=this.length-t;if((void 0===l||l>g)&&(l=g),e.length>0&&(l<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");v||(v="utf8");for(var b=!1;;)switch(v){case"hex":return H(this,e,t,l);case"utf8":case"utf-8":return $(this,e,t,l);case"ascii":case"latin1":case"binary":return Y(this,e,t,l);case"base64":return z(this,e,t,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,e,t,l);default:if(b)throw new TypeError("Unknown encoding: "+v);v=(""+v).toLowerCase(),b=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var q=4096;function ge(n,e,t){var l="";t=Math.min(n.length,t);for(var v=e;vl)&&(t=l);for(var v="",g=e;gt)throw new RangeError("Trying to access beyond buffer length")}function ie(n,e,t,l,v,g){if(!u.isBuffer(n))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>v||en.length)throw new RangeError("Index out of range")}function ce(n,e,t,l,v,g){if(t+l>n.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function ke(n,e,t,l,v){return e=+e,t>>>=0,v||ce(n,0,t,4),s.write(n,e,t,l,23,4),t+4}function ye(n,e,t,l,v){return e=+e,t>>>=0,v||ce(n,0,t,8),s.write(n,e,t,l,52,8),t+8}u.prototype.slice=function(e,t){var l=this.length;(e=~~e)<0?(e+=l)<0&&(e=0):e>l&&(e=l),(t=void 0===t?l:~~t)<0?(t+=l)<0&&(t=0):t>l&&(t=l),t>>=0,t>>>=0,l||ue(e,t,this.length);for(var v=this[e],g=1,b=0;++b>>=0,t>>>=0,l||ue(e,t,this.length);for(var v=this[e+--t],g=1;t>0&&(g*=256);)v+=this[e+--t]*g;return v},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||ue(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||ue(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||ue(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||ue(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||ue(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,l){e>>>=0,t>>>=0,l||ue(e,t,this.length);for(var v=this[e],g=1,b=0;++b=(g*=128)&&(v-=Math.pow(2,8*t)),v},u.prototype.readIntBE=function(e,t,l){e>>>=0,t>>>=0,l||ue(e,t,this.length);for(var v=t,g=1,b=this[e+--v];v>0&&(g*=256);)b+=this[e+--v]*g;return b>=(g*=128)&&(b-=Math.pow(2,8*t)),b},u.prototype.readInt8=function(e,t){return e>>>=0,t||ue(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||ue(e,2,this.length);var l=this[e]|this[e+1]<<8;return 32768&l?4294901760|l:l},u.prototype.readInt16BE=function(e,t){e>>>=0,t||ue(e,2,this.length);var l=this[e+1]|this[e]<<8;return 32768&l?4294901760|l:l},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||ue(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||ue(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return e>>>=0,t||ue(e,4,this.length),s.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||ue(e,4,this.length),s.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||ue(e,8,this.length),s.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||ue(e,8,this.length),s.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,l,v){e=+e,t>>>=0,l>>>=0,v||ie(this,e,t,l,Math.pow(2,8*l)-1,0);var b=1,M=0;for(this[t]=255&e;++M>>=0,l>>>=0,v||ie(this,e,t,l,Math.pow(2,8*l)-1,0);var b=l-1,M=1;for(this[t+b]=255&e;--b>=0&&(M*=256);)this[t+b]=e/M&255;return t+l},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeIntLE=function(e,t,l,v){if(e=+e,t>>>=0,!v){var g=Math.pow(2,8*l-1);ie(this,e,t,l,g-1,-g)}var b=0,M=1,W=0;for(this[t]=255&e;++b>0)-W&255;return t+l},u.prototype.writeIntBE=function(e,t,l,v){if(e=+e,t>>>=0,!v){var g=Math.pow(2,8*l-1);ie(this,e,t,l,g-1,-g)}var b=l-1,M=1,W=0;for(this[t+b]=255&e;--b>=0&&(M*=256);)e<0&&0===W&&0!==this[t+b+1]&&(W=1),this[t+b]=(e/M>>0)-W&255;return t+l},u.prototype.writeInt8=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,l){return e=+e,t>>>=0,l||ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeFloatLE=function(e,t,l){return ke(this,e,t,!0,l)},u.prototype.writeFloatBE=function(e,t,l){return ke(this,e,t,!1,l)},u.prototype.writeDoubleLE=function(e,t,l){return ye(this,e,t,!0,l)},u.prototype.writeDoubleBE=function(e,t,l){return ye(this,e,t,!1,l)},u.prototype.copy=function(e,t,l,v){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(l||(l=0),!v&&0!==v&&(v=this.length),t>=e.length&&(t=e.length),t||(t=0),v>0&&v=this.length)throw new RangeError("Index out of range");if(v<0)throw new RangeError("sourceEnd out of bounds");v>this.length&&(v=this.length),e.length-t>>=0,l=void 0===l?this.length:l>>>0,e||(e=0),"number"==typeof e)for(b=t;b55295&&t<57344){if(!v){if(t>56319){(e-=3)>-1&&g.push(239,191,189);continue}if(b+1===l){(e-=3)>-1&&g.push(239,191,189);continue}v=t;continue}if(t<56320){(e-=3)>-1&&g.push(239,191,189),v=t;continue}t=65536+(v-55296<<10|t-56320)}else v&&(e-=3)>-1&&g.push(239,191,189);if(v=null,t<128){if((e-=1)<0)break;g.push(t)}else if(t<2048){if((e-=2)<0)break;g.push(t>>6|192,63&t|128)}else if(t<65536){if((e-=3)<0)break;g.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;g.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return g}function fe(n){return d.toByteArray(function be(n){if((n=(n=n.split("=")[0]).trim().replace(Se,"")).length<2)return"";for(;n.length%4!=0;)n+="=";return n}(n))}function de(n,e,t,l){for(var v=0;v=e.length||v>=n.length);++v)e[v+t]=n[v];return v}function ve(n,e){return n instanceof e||null!=n&&null!=n.constructor&&null!=n.constructor.name&&n.constructor.name===e.name}function Fe(n){return n!=n}var Oe=function(){for(var n="0123456789abcdef",e=new Array(256),t=0;t<16;++t)for(var l=16*t,v=0;v<16;++v)e[l+v]=n[t]+n[v];return e}()},37753:K=>{K.exports=function(){var _=document.getSelection();if(!_.rangeCount)return function(){};for(var y=document.activeElement,c=[],d=0;d<_.rangeCount;d++)c.push(_.getRangeAt(d));switch(y.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":y.blur();break;default:y=null}return _.removeAllRanges(),function(){"Caret"===_.type&&_.removeAllRanges(),_.rangeCount||c.forEach(function(s){_.addRange(s)}),y&&y.focus()}}}}]); \ No newline at end of file diff --git a/angular-bare-bones-demo/dist/729.372fe1c47762dd89.js b/angular-bare-bones-demo/dist/729.372fe1c47762dd89.js deleted file mode 100644 index 7f929eeb9..000000000 --- a/angular-bare-bones-demo/dist/729.372fe1c47762dd89.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkAngular_bare_bones_demo=self.webpackChunkAngular_bare_bones_demo||[]).push([[729],{28729:(Ki,er,B)=>{"use strict";B.r(er),B.d(er,{getFlowProvider:()=>yn});var tn=B(53431);tn.config({"accessNode.api":"https://rest-mainnet.onflow.org","discovery.wallet":"https://fcl-discovery.onflow.org/authn"});var yn=function(){return tn}},53431:function(Ki,er){!function(B){"use strict";function tn(t){if(Array.isArray(t))return t}function ar(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r=0;--Y){var D=this.tryEntries[Y],ut=D.completion;if("root"===D.tryLoc)return U("end");if(D.tryLoc<=this.prev){var it=o.call(D,"catchLoc"),yt=o.call(D,"finallyLoc");if(it&&yt){if(this.prev=0;--U){var Y=this.tryEntries[U];if(Y.tryLoc<=this.prev&&o.call(Y,"finallyLoc")&&this.prev=0;--A){var U=this.tryEntries[A];if(U.finallyLoc===_)return this.complete(U.completion,U.afterLoc),At(U),m}},catch:function(_){for(var A=this.tryEntries.length-1;A>=0;--A){var U=this.tryEntries[A];if(U.tryLoc===_){var Y=U.completion;if("throw"===Y.type){var D=Y.arg;At(U)}return D}}throw new Error("illegal catch attempt")},delegateYield:function(_,A,U){return this.delegate={iterator:_t(_),resultName:A,nextLoc:U},"next"===this.method&&(this.arg=void 0),m}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}(Xa);var $a,or=Xa.exports(),h=or;try{regeneratorRuntime=or}catch{"object"===(typeof globalThis>"u"?"undefined":z(globalThis))?globalThis.regeneratorRuntime=or:Function("r","regeneratorRuntime = r")(or)}function Qa(t){if(typeof Symbol<"u"&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function Fn(t){return tn(t)||Qa(t)||yn(t)||Va()}function q(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}function to(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,e)}return r}function O(t){for(var n=1;n=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(c){throw c},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,i=!1;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return u=c.done,c},e:function(c){i=!0,o=c},f:function(){try{u||null==r.return||r.return()}finally{if(i)throw o}}}}var Hi="function"==typeof queueMicrotask?queueMicrotask:function(t){return($a||($a=Promise.resolve())).then(t).catch(function(n){return setTimeout(function(){throw n},0)})},Wi=function(){var t,n=[];return{deliver:function(r){return x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:n.push(r),t&&(t(n.shift()),t=void 0);case 2:case"end":return a.stop()}},e)}))()},receive:function(){return new Promise(function(r){var e=n.shift();if(e)return r(e);t=r})}}},Nr="INIT",cn="SUBSCRIBE",nn="UNSUBSCRIBE",Br="UPDATED",no="SNAPSHOT",$="object"===(typeof self>"u"?"undefined":z(self))&&self.self===self&&self||"object"===(typeof global>"u"?"undefined":z(global))&&global.global===global&&global||"object"===(typeof window>"u"?"undefined":z(window))&&window.window===window&&window;$.FCL_REGISTRY=$.FCL_REGISTRY??{};var zt,Ji=0,dt=function(t,n,r){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(function(a,o){var u=e.expectReply||!1,i=null!=e.timeout?e.timeout:5e3;u&&i&&setTimeout(function(){return o(new Error("Timeout: ".concat(i,"ms passed without a response.")))},i);var c={to:t,from:e.from,tag:n,data:r,timeout:i,reply:a,reject:o};try{$.FCL_REGISTRY[t]&&$.FCL_REGISTRY[t].mailbox.deliver(c),u||a(!0)}catch(l){console.error("FCL.Actor -- Could Not Deliver Message",c,$.FCL_REGISTRY[t],l)}})},Xi=function(t){delete $.FCL_REGISTRY[t]},Zi=function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n=x(h.mark(function r(e){var a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if("function"!=typeof t.INIT){o.next=3;break}return o.next=3,t.INIT(e);case 3:return o.next=6,e.receive();case 6:if(a=o.sent,o.prev=7,"EXIT"!==a.tag){o.next=13;break}if("function"!=typeof t.TERMINATE){o.next=12;break}return o.next=12,t.TERMINATE(e,a,a.data||{});case 12:return o.abrupt("break",25);case 13:return o.next=15,t[a.tag](e,a,a.data||{});case 15:o.next=20;break;case 17:o.prev=17,o.t0=o.catch(7),console.error("".concat(e.self()," Error"),a,o.t0);case 20:return o.prev=20,o.abrupt("continue",3);case 23:o.next=3;break;case 25:case"end":return o.stop()}},r,null,[[7,17,20,23]])})),function(r){return n.apply(this,arguments)}},rn=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==n&&(n=++Ji),null!=$.FCL_REGISTRY[n])return n;$.FCL_REGISTRY[n]={addr:n,mailbox:Wi(),subs:new Set,kvs:{},error:null};var r={self:function(){return n},receive:function(){return $.FCL_REGISTRY[n].mailbox.receive()},send:function(e,a,o){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.from=n,dt(e,a,o,u)},sendSelf:function(e,a,o){$.FCL_REGISTRY[n]&&dt(n,e,a,o)},broadcast:function(e,a){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o.from=n;var u,i=bt($.FCL_REGISTRY[n].subs);try{for(i.s();!(u=i.n()).done;)dt(u.value,e,a,o)}catch(l){i.e(l)}finally{i.f()}},subscribe:function(e){return null!=e&&$.FCL_REGISTRY[n].subs.add(e)},unsubscribe:function(e){return null!=e&&$.FCL_REGISTRY[n].subs.delete(e)},subscriberCount:function(){return $.FCL_REGISTRY[n].subs.size},hasSubs:function(){return!!$.FCL_REGISTRY[n].subs.size},put:function(e,a){null!=e&&($.FCL_REGISTRY[n].kvs[e]=a)},get:function(e,a){return $.FCL_REGISTRY[n].kvs[e]??a},delete:function(e){delete $.FCL_REGISTRY[n].kvs[e]},update:function(e,a){null!=e&&($.FCL_REGISTRY[n].kvs[e]=a($.FCL_REGISTRY[n].kvs[e]))},keys:function(){return Object.keys($.FCL_REGISTRY[n].kvs)},all:function(){return $.FCL_REGISTRY[n].kvs},where:function(e){return Object.keys($.FCL_REGISTRY[n].kvs).reduce(function(a,o){return e.test(o)?O(O({},a),{},q({},o,$.FCL_REGISTRY[n].kvs[o])):a},{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach(function(a){return $.FCL_REGISTRY[n].kvs[a]=e[a]})},fatalError:function(e){$.FCL_REGISTRY[n].error=e;var a,o=bt($.FCL_REGISTRY[n].subs);try{for(o.s();!(a=o.n()).done;)dt(a.value,Br)}catch(i){o.e(i)}finally{o.f()}}};return"object"===z(t)&&(t=Zi(t)),Hi(x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t(r);case 2:Xi(n);case 3:case"end":return a.stop()}},e)}))),n};function ur(t,n,r){n(t);var o,e="@EXIT",a=rn((o=x(h.mark(function u(i){var c,l;return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:i.send(t,cn);case 1:return d.next=4,i.receive();case 4:if(l=$.FCL_REGISTRY[t].error,(c=d.sent).tag!==e){d.next=9;break}return i.send(t,nn),d.abrupt("return");case 9:if(!l){d.next=13;break}return r(null,l),i.send(t,nn),d.abrupt("return");case 13:r(c.data,null),d.next=1;break;case 16:case"end":return d.stop()}},u)})),function(u){return o.apply(this,arguments)}));return function(){return dt(a,e)}}function ro(t,n){return n(t),dt(t,no,null,{expectReply:!0,timeout:0})}var Yt="config",eo="PUT_CONFIG",ao="GET_CONFIG",oo="GET_ALL_CONFIG",uo="UPDATE_CONFIG",so="DELETE_CONFIG",io="CLEAR_CONFIG",co="WHERE_CONFIG",jn="CONFIG/UPDATED",fo=function(t){return t},lo=(q(zt={},eo,function(t,n,r){var e=r.key,a=r.value;if(null==e)throw new Error("Missing 'key' for config/put.");t.put(e,a),t.broadcast(jn,O({},t.all()))}),q(zt,ao,function(t,n,r){var e=r.key,a=r.fallback;if(null==e)throw new Error("Missing 'key' for config/get");n.reply(t.get(e,a))}),q(zt,oo,function(t,n){n.reply(O({},t.all()))}),q(zt,uo,function(t,n,r){var e=r.key,a=r.fn;if(null==e)throw new Error("Missing 'key' for config/update");t.update(e,a||fo),t.broadcast(jn,O({},t.all()))}),q(zt,so,function(t,n,r){var e=r.key;if(null==e)throw new Error("Missing 'key' for config/delete");t.delete(e),t.broadcast(jn,O({},t.all()))}),q(zt,io,function(t,n){for(var r=0,e=Object.keys(t.all());r1?i[1]:void 0,(n=i.length>0&&void 0!==i[0]?i[0]:[]).length){c.next=4;break}return c.abrupt("return",r);case 4:return e=Fn(n),a=e[0],o=e.slice(1),c.next=7,Ur(a);case 7:if(null!=(u=c.sent)){c.next=10;break}return c.abrupt("return",Fr(o,r));case 10:return c.abrupt("return",u);case 11:case"end":return c.stop()}},t)})),jr.apply(this,arguments)}function sr(){return dt(Yt,oo,null,{expectReply:!0,timeout:10})}function po(t){return dt(Yt,uo,{key:t,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:fo}),j()}function ho(t){return dt(Yt,so,{key:t}),j()}function go(t){return dt(Yt,co,{pattern:t},{expectReply:!0,timeout:10})}function mo(t){return ur(Yt,function(){return rn(lo,Yt)},t)}function vo(t){return dt(Yt,io).then(j(t))}function j(t){return null!=t&&"object"===z(t)&&Object.keys(t).map(function(n){return Lr(n,t[n])}),{put:Lr,get:Ur,all:sr,first:Fr,update:po,delete:ho,where:go,subscribe:mo,overload:yo}}rn(lo,Yt),j.put=Lr,j.get=Ur,j.all=sr,j.first=Fr,j.update=po,j.delete=ho,j.where=go,j.subscribe=mo,j.overload=yo;var $i=function(t){return t};function yo(){var r,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$i;return new Promise((r=x(h.mark(function e(a,o){var u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,sr();case 2:return u=c.sent,c.prev=3,j(t),c.t0=n,c.next=8,sr();case 8:return c.t1=c.sent,c.next=11,(0,c.t0)(c.t1);case 11:return i=c.sent,c.next=14,vo(u);case 14:a(i),c.next=22;break;case 17:return c.prev=17,c.t2=c.catch(3),c.next=21,vo(u);case 21:o(c.t2);case 22:case"end":return c.stop()}},e,null,[[3,17]])})),function(e,a){return r.apply(this,arguments)}))}var bo,wo,Qi={can:!(typeof window>"u"),get:(wo=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",JSON.parse(sessionStorage.getItem(n)));case 1:case"end":return r.stop()}},t)})),function(t){return wo.apply(this,arguments)}),put:(bo=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",sessionStorage.setItem(n,JSON.stringify(r)));case 1:case"end":return e.stop()}},t)})),function(t,n){return bo.apply(this,arguments)})};function xo(t){return ko.apply(this,arguments)}function ko(){return(ko=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=Object,r.t1=Object,r.next=4,j().where(n);case 4:return r.t2=r.sent,r.t3=r.t1.entries.call(r.t1,r.t2).map(function(e){var a=Lt(e,2),u=a[1];return[a[0].replace(n,""),u]}),r.abrupt("return",r.t0.fromEntries.call(r.t0,r.t3));case 7:case"end":return r.stop()}},t)}))).apply(this,arguments)}j({"discovery.wallet.method.default":"IFRAME/RPC","fcl.storage.default":Qi});var Ut="1.3.2";function C(t,n){if(!t){var r,e=new Error("INVARIANT ".concat(n));e.stack=e.stack.split("\n").filter(function(i){return!/at invariant/.test(i)}).join("\n");for(var a=arguments.length,o=new Array(a>2?a-2:0),u=2;u"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nc(t,n){if(n&&("object"===z(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Mr(t)}function Yr(t){var n=Io();return function(){var r,e=Gn(t);if(n){var a=Gn(this).constructor;r=Reflect.construct(e,arguments,a)}else r=e.apply(this,arguments);return nc(this,r)}}wt.deprecate=function(t){var n=t.pkg,r=t.subject,e=t.transition,a=t.level,o=void 0===a?St.warn:a,u=t.message,i=void 0===u?"":u,c=t.callback,l=void 0===c?null:c,d=function(){return wt({title:"".concat(n?n+" ":"","Deprecation Notice"),message:"\n ".concat(r?"".concat((g=r,g.charAt(0).toUpperCase()+g.slice(1))," is deprecated and will cease to work in future releases").concat(n?" of "+n:"","."):"").concat(i?"\n"+i:"").concat(e?"\nYou can learn more (including a guide on common transition paths) here: ".concat(e):"","\n ").trim(),level:o});var g};return"function"==typeof l?x(h.mark(function g(){var v=arguments;return h.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,d();case 2:return m.next=4,l.apply(void 0,v);case 4:return m.abrupt("return",m.sent);case 5:case"end":return m.stop()}},g)})):d()};for(var X={},rc={byteLength:function(t){var n=So(t),e=n[1];return 3*(n[0]+e)/4-e},toByteArray:function(t){var n,r,g,e=So(t),a=e[0],o=e[1],u=new ec(3*(a+(g=o))/4-g),i=0,c=o>0?a-4:a;for(r=0;r>16&255,u[i++]=n>>8&255,u[i++]=255&n;return 2===o&&(n=Ct[t.charCodeAt(r)]<<2|Ct[t.charCodeAt(r+1)]>>4,u[i++]=255&n),1===o&&(n=Ct[t.charCodeAt(r)]<<10|Ct[t.charCodeAt(r+1)]<<4|Ct[t.charCodeAt(r+2)]>>2,u[i++]=n>>8&255,u[i++]=255&n),u},fromByteArray:function(t){for(var n,r=t.length,e=r%3,a=[],o=16383,u=0,i=r-e;ui?i:u+o));return 1===e?a.push(qt[(n=t[r-1])>>2]+qt[n<<4&63]+"=="):2===e&&a.push(qt[(n=(t[r-2]<<8)+t[r-1])>>10]+qt[n>>4&63]+qt[n<<2&63]+"="),a.join("")}},qt=[],Ct=[],ec=typeof Uint8Array<"u"?Uint8Array:Array,qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bn=0,ac=qr.length;bn0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=n),[r,r===n?0:4-r%4]}function oc(t,n,r){for(var a,o=[],u=n;u>18&63]+qt[a>>12&63]+qt[a>>6&63]+qt[63&a]);return o.join("")}Ct["-".charCodeAt(0)]=62,Ct["_".charCodeAt(0)]=63;var Kr={};function fn(t){if(Array.isArray(t)){for(var n=[],r=0;r>1,d=-7,g=r?a-1:0,v=r?-1:1,m=t[n+g];for(g+=v,o=m&(1<<-d)-1,m>>=-d,d+=i;d>0;o=256*o+t[n+g],g+=v,d-=8);for(u=o&(1<<-d)-1,o>>=-d,d+=e;d>0;u=256*u+t[n+g],g+=v,d-=8);if(0===o)o=1-l;else{if(o===c)return u?NaN:1/0*(m?-1:1);u+=Math.pow(2,e),o-=l}return(m?-1:1)*u*Math.pow(2,o-e)},Kr.write=function(t,n,r,e,a,o){var u,i,c,l=8*o-a-1,d=(1<>1,v=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,m=e?0:o-1,b=e?1:-1,E=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(i=isNaN(n)?1:0,u=d):(u=Math.floor(Math.log(n)/Math.LN2),n*(c=Math.pow(2,-u))<1&&(u--,c*=2),(n+=u+g>=1?v/c:v*Math.pow(2,1-g))*c>=2&&(u++,c/=2),u+g>=d?(i=0,u=d):u+g>=1?(i=(n*c-1)*Math.pow(2,a),u+=g):(i=n*Math.pow(2,g-1)*Math.pow(2,a),u=0));a>=8;t[r+m]=255&i,m+=b,i/=256,a-=8);for(u=u<0;t[r+m]=255&u,m+=b,u/=256,l-=8);t[r+m-b]|=128*E},function(t){var n=rc,r=Kr,e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(s){return+s!=s&&(s=0),u.alloc(+s)},t.INSPECT_MAX_BYTES=50;var a=2147483647;function o(s){if(s>a)throw new RangeError('The value "'+s+'" is invalid for option "size"');var f=new Uint8Array(s);return Object.setPrototypeOf(f,u.prototype),f}function u(s,f,p){if("number"==typeof s){if("string"==typeof f)throw new TypeError('The "string" argument must be of type string. Received type number');return l(s)}return i(s,f,p)}function i(s,f,p){if("string"==typeof s)return function(w,P){if("string"==typeof P&&""!==P||(P="utf8"),!u.isEncoding(P))throw new TypeError("Unknown encoding: "+P);var M=0|m(w,P),tt=o(M),rt=tt.write(w,P);return rt!==M&&(tt=tt.slice(0,rt)),tt}(s,f);if(ArrayBuffer.isView(s))return function(w){if(Vt(w,Uint8Array)){var P=new Uint8Array(w);return g(P.buffer,P.byteOffset,P.byteLength)}return d(w)}(s);if(null==s)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+z(s));if(Vt(s,ArrayBuffer)||s&&Vt(s.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Vt(s,SharedArrayBuffer)||s&&Vt(s.buffer,SharedArrayBuffer)))return g(s,f,p);if("number"==typeof s)throw new TypeError('The "value" argument must not be of type number. Received type number');var y=s.valueOf&&s.valueOf();if(null!=y&&y!==s)return u.from(y,f,p);var k=function(w){if(u.isBuffer(w)){var P=0|v(w.length),M=o(P);return 0===M.length||w.copy(M,0,0,P),M}return void 0!==w.length?"number"!=typeof w.length||Ha(w.length)?o(0):d(w):"Buffer"===w.type&&Array.isArray(w.data)?d(w.data):void 0}(s);if(k)return k;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof s[Symbol.toPrimitive])return u.from(s[Symbol.toPrimitive]("string"),f,p);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+z(s))}function c(s){if("number"!=typeof s)throw new TypeError('"size" argument must be of type number');if(s<0)throw new RangeError('The value "'+s+'" is invalid for option "size"')}function l(s){return c(s),o(s<0?0:0|v(s))}function d(s){for(var f=s.length<0?0:0|v(s.length),p=o(f),y=0;y=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|s}function m(s,f){if(u.isBuffer(s))return s.length;if(ArrayBuffer.isView(s)||Vt(s,ArrayBuffer))return s.byteLength;if("string"!=typeof s)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+z(s));var p=s.length,y=arguments.length>2&&!0===arguments[2];if(!y&&0===p)return 0;for(var k=!1;;)switch(f){case"ascii":case"latin1":case"binary":return p;case"utf8":case"utf-8":return Qt(s).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*p;case"hex":return p>>>1;case"base64":return qi(s).length;default:if(k)return y?-1:Qt(s).length;f=(""+f).toLowerCase(),k=!0}}function b(s,f,p){var y=!1;if((void 0===f||f<0)&&(f=0),f>this.length||((void 0===p||p>this.length)&&(p=this.length),p<=0)||(p>>>=0)<=(f>>>=0))return"";for(s||(s="utf8");;)switch(s){case"hex":return Nt(this,f,p);case"utf8":case"utf-8":return It(this,f,p);case"ascii":return Rt(this,f,p);case"latin1":case"binary":return _t(this,f,p);case"base64":return lt(this,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,f,p);default:if(y)throw new TypeError("Unknown encoding: "+s);s=(s+"").toLowerCase(),y=!0}}function E(s,f,p){var y=s[f];s[f]=s[p],s[p]=y}function S(s,f,p,y,k){if(0===s.length)return-1;if("string"==typeof p?(y=p,p=0):p>2147483647?p=2147483647:p<-2147483648&&(p=-2147483648),Ha(p=+p)&&(p=k?0:s.length-1),p<0&&(p=s.length+p),p>=s.length){if(k)return-1;p=s.length-1}else if(p<0){if(!k)return-1;p=0}if("string"==typeof f&&(f=u.from(f,y)),u.isBuffer(f))return 0===f.length?-1:N(s,f,p,y,k);if("number"==typeof f)return f&=255,"function"==typeof Uint8Array.prototype.indexOf?k?Uint8Array.prototype.indexOf.call(s,f,p):Uint8Array.prototype.lastIndexOf.call(s,f,p):N(s,[f],p,y,k);throw new TypeError("val must be string, number or Buffer")}function N(s,f,p,y,k){var w,P=1,M=s.length,tt=f.length;if(void 0!==y&&("ucs2"===(y=String(y).toLowerCase())||"ucs-2"===y||"utf16le"===y||"utf-16le"===y)){if(s.length<2||f.length<2)return-1;P=2,M/=2,tt/=2,p/=2}function rt(nr,rr){return 1===P?nr[rr]:nr.readUInt16BE(rr*P)}if(k){var nt=-1;for(w=p;wM&&(p=M-tt),w=p;w>=0;w--){for(var Bt=!0,sn=0;snk&&(y=k):y=k;var w,P=f.length;for(y>P/2&&(y=P/2),w=0;w>8,rt.push(P%256),rt.push(M);return rt}(f,s.length-p),s,p,y)}function lt(s,f,p){return n.fromByteArray(0===f&&p===s.length?s:s.slice(f,p))}function It(s,f,p){p=Math.min(s.length,p);for(var y=[],k=f;k239?4:w>223?3:w>191?2:1;if(k+M<=p){var tt=void 0,rt=void 0,nt=void 0,Bt=void 0;switch(M){case 1:w<128&&(P=w);break;case 2:128==(192&(tt=s[k+1]))&&(Bt=(31&w)<<6|63&tt)>127&&(P=Bt);break;case 3:rt=s[k+2],128==(192&(tt=s[k+1]))&&128==(192&rt)&&(Bt=(15&w)<<12|(63&tt)<<6|63&rt)>2047&&(Bt<55296||Bt>57343)&&(P=Bt);break;case 4:rt=s[k+2],nt=s[k+3],128==(192&(tt=s[k+1]))&&128==(192&rt)&&128==(192&nt)&&(Bt=(15&w)<<18|(63&tt)<<12|(63&rt)<<6|63&nt)>65535&&Bt<1114112&&(P=Bt)}}null===P?(P=65533,M=1):P>65535&&(y.push((P-=65536)>>>10&1023|55296),P=56320|1023&P),y.push(P),k+=M}return function(sn){var nr=sn.length;if(nr<=At)return String.fromCharCode.apply(String,sn);for(var rr="",Wa=0;Wa"u"||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(s,f,p){return i(s,f,p)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(s,f,p){return k=f,w=p,c(y=s),y<=0?o(y):void 0!==k?"string"==typeof w?o(y).fill(k,w):o(y).fill(k):o(y);var y,k,w},u.allocUnsafe=function(s){return l(s)},u.allocUnsafeSlow=function(s){return l(s)},u.isBuffer=function(s){return null!=s&&!0===s._isBuffer&&s!==u.prototype},u.compare=function(s,f){if(Vt(s,Uint8Array)&&(s=u.from(s,s.offset,s.byteLength)),Vt(f,Uint8Array)&&(f=u.from(f,f.offset,f.byteLength)),!u.isBuffer(s)||!u.isBuffer(f))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(s===f)return 0;for(var p=s.length,y=f.length,k=0,w=Math.min(p,y);ky.length?(u.isBuffer(w)||(w=u.from(w)),w.copy(y,k)):Uint8Array.prototype.set.call(y,w,k);else{if(!u.isBuffer(w))throw new TypeError('"list" argument must be an Array of Buffers');w.copy(y,k)}k+=w.length}return y},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var s=this.length;if(s%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var f=0;ff&&(s+=" ... "),""},e&&(u.prototype[e]=u.prototype.inspect),u.prototype.compare=function(s,f,p,y,k){if(Vt(s,Uint8Array)&&(s=u.from(s,s.offset,s.byteLength)),!u.isBuffer(s))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+z(s));if(void 0===f&&(f=0),void 0===p&&(p=s?s.length:0),void 0===y&&(y=0),void 0===k&&(k=this.length),f<0||p>s.length||y<0||k>this.length)throw new RangeError("out of range index");if(y>=k&&f>=p)return 0;if(y>=k)return-1;if(f>=p)return 1;if(this===s)return 0;for(var w=(k>>>=0)-(y>>>=0),P=(p>>>=0)-(f>>>=0),M=Math.min(w,P),tt=this.slice(y,k),rt=s.slice(f,p),nt=0;nt>>=0,isFinite(p)?(p>>>=0,void 0===y&&(y="utf8")):(y=p,p=void 0)}var k=this.length-f;if((void 0===p||p>k)&&(p=k),s.length>0&&(p<0||f<0)||f>this.length)throw new RangeError("Attempt to write outside buffer bounds");y||(y="utf8");for(var w=!1;;)switch(y){case"hex":return T(this,s,f,p);case"utf8":case"utf-8":return R(this,s,f,p);case"ascii":case"latin1":case"binary":return L(this,s,f,p);case"base64":return I(this,s,f,p);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,s,f,p);default:if(w)throw new TypeError("Unknown encoding: "+y);y=(""+y).toLowerCase(),w=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var At=4096;function Rt(s,f,p){var y="";p=Math.min(s.length,p);for(var k=f;ky)&&(p=y);for(var k="",w=f;wp)throw new RangeError("Trying to access beyond buffer length")}function U(s,f,p,y,k,w){if(!u.isBuffer(s))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>k||fs.length)throw new RangeError("Index out of range")}function Y(s,f,p,y,k){Tt(f,y,k,s,p,7);var w=Number(f&BigInt(4294967295));s[p++]=w,s[p++]=w>>=8,s[p++]=w>>=8,s[p++]=w>>=8;var P=Number(f>>BigInt(32)&BigInt(4294967295));return s[p++]=P,s[p++]=P>>=8,s[p++]=P>>=8,s[p++]=P>>=8,p}function D(s,f,p,y,k){Tt(f,y,k,s,p,7);var w=Number(f&BigInt(4294967295));s[p+7]=w,s[p+6]=w>>=8,s[p+5]=w>>=8,s[p+4]=w>>=8;var P=Number(f>>BigInt(32)&BigInt(4294967295));return s[p+3]=P,s[p+2]=P>>=8,s[p+1]=P>>=8,s[p]=P>>=8,p+8}function ut(s,f,p,y,k,w){if(p+y>s.length)throw new RangeError("Index out of range");if(p<0)throw new RangeError("Index out of range")}function it(s,f,p,y,k){return f=+f,p>>>=0,k||ut(s,0,p,4),r.write(s,f,p,y,23,4),p+4}function yt(s,f,p,y,k){return f=+f,p>>>=0,k||ut(s,0,p,8),r.write(s,f,p,y,52,8),p+8}u.prototype.slice=function(s,f){var p=this.length;(s=~~s)<0?(s+=p)<0&&(s=0):s>p&&(s=p),(f=void 0===f?p:~~f)<0?(f+=p)<0&&(f=0):f>p&&(f=p),f>>=0,f>>>=0,p||A(s,f,this.length);for(var y=this[s],k=1,w=0;++w>>=0,f>>>=0,p||A(s,f,this.length);for(var y=this[s+--f],k=1;f>0&&(k*=256);)y+=this[s+--f]*k;return y},u.prototype.readUint8=u.prototype.readUInt8=function(s,f){return s>>>=0,f||A(s,1,this.length),this[s]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(s,f){return s>>>=0,f||A(s,2,this.length),this[s]|this[s+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(s,f){return s>>>=0,f||A(s,2,this.length),this[s]<<8|this[s+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(s,f){return s>>>=0,f||A(s,4,this.length),(this[s]|this[s+1]<<8|this[s+2]<<16)+16777216*this[s+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(s,f){return s>>>=0,f||A(s,4,this.length),16777216*this[s]+(this[s+1]<<16|this[s+2]<<8|this[s+3])},u.prototype.readBigUInt64LE=un(function(s){$t(s>>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=f+this[++s]*Math.pow(2,8)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,24),k=this[++s]+this[++s]*Math.pow(2,8)+this[++s]*Math.pow(2,16)+p*Math.pow(2,24);return BigInt(y)+(BigInt(k)<>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=f*Math.pow(2,24)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,8)+this[++s],k=this[++s]*Math.pow(2,24)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,8)+p;return(BigInt(y)<>>=0,f>>>=0,p||A(s,f,this.length);for(var y=this[s],k=1,w=0;++w=(k*=128)&&(y-=Math.pow(2,8*f)),y},u.prototype.readIntBE=function(s,f,p){s>>>=0,f>>>=0,p||A(s,f,this.length);for(var y=f,k=1,w=this[s+--y];y>0&&(k*=256);)w+=this[s+--y]*k;return w>=(k*=128)&&(w-=Math.pow(2,8*f)),w},u.prototype.readInt8=function(s,f){return s>>>=0,f||A(s,1,this.length),128&this[s]?-1*(255-this[s]+1):this[s]},u.prototype.readInt16LE=function(s,f){s>>>=0,f||A(s,2,this.length);var p=this[s]|this[s+1]<<8;return 32768&p?4294901760|p:p},u.prototype.readInt16BE=function(s,f){s>>>=0,f||A(s,2,this.length);var p=this[s+1]|this[s]<<8;return 32768&p?4294901760|p:p},u.prototype.readInt32LE=function(s,f){return s>>>=0,f||A(s,4,this.length),this[s]|this[s+1]<<8|this[s+2]<<16|this[s+3]<<24},u.prototype.readInt32BE=function(s,f){return s>>>=0,f||A(s,4,this.length),this[s]<<24|this[s+1]<<16|this[s+2]<<8|this[s+3]},u.prototype.readBigInt64LE=un(function(s){$t(s>>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=this[s+4]+this[s+5]*Math.pow(2,8)+this[s+6]*Math.pow(2,16)+(p<<24);return(BigInt(y)<>>=0,"offset");var f=this[s],p=this[s+7];void 0!==f&&void 0!==p||on(s,this.length-8);var y=(f<<24)+this[++s]*Math.pow(2,16)+this[++s]*Math.pow(2,8)+this[++s];return(BigInt(y)<>>=0,f||A(s,4,this.length),r.read(this,s,!0,23,4)},u.prototype.readFloatBE=function(s,f){return s>>>=0,f||A(s,4,this.length),r.read(this,s,!1,23,4)},u.prototype.readDoubleLE=function(s,f){return s>>>=0,f||A(s,8,this.length),r.read(this,s,!0,52,8)},u.prototype.readDoubleBE=function(s,f){return s>>>=0,f||A(s,8,this.length),r.read(this,s,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(s,f,p,y){s=+s,f>>>=0,p>>>=0,y||U(this,s,f,p,Math.pow(2,8*p)-1,0);var k=1,w=0;for(this[f]=255&s;++w>>=0,p>>>=0,y||U(this,s,f,p,Math.pow(2,8*p)-1,0);var k=p-1,w=1;for(this[f+k]=255&s;--k>=0&&(w*=256);)this[f+k]=s/w&255;return f+p},u.prototype.writeUint8=u.prototype.writeUInt8=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,1,255,0),this[f]=255&s,f+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,65535,0),this[f]=255&s,this[f+1]=s>>>8,f+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,65535,0),this[f]=s>>>8,this[f+1]=255&s,f+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,4294967295,0),this[f+3]=s>>>24,this[f+2]=s>>>16,this[f+1]=s>>>8,this[f]=255&s,f+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,4294967295,0),this[f]=s>>>24,this[f+1]=s>>>16,this[f+2]=s>>>8,this[f+3]=255&s,f+4},u.prototype.writeBigUInt64LE=un(function(s){return Y(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=un(function(s){return D(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(s,f,p,y){if(s=+s,f>>>=0,!y){var k=Math.pow(2,8*p-1);U(this,s,f,p,k-1,-k)}var w=0,P=1,M=0;for(this[f]=255&s;++w>0)-M&255;return f+p},u.prototype.writeIntBE=function(s,f,p,y){if(s=+s,f>>>=0,!y){var k=Math.pow(2,8*p-1);U(this,s,f,p,k-1,-k)}var w=p-1,P=1,M=0;for(this[f+w]=255&s;--w>=0&&(P*=256);)s<0&&0===M&&0!==this[f+w+1]&&(M=1),this[f+w]=(s/P>>0)-M&255;return f+p},u.prototype.writeInt8=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,1,127,-128),s<0&&(s=255+s+1),this[f]=255&s,f+1},u.prototype.writeInt16LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,32767,-32768),this[f]=255&s,this[f+1]=s>>>8,f+2},u.prototype.writeInt16BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,2,32767,-32768),this[f]=s>>>8,this[f+1]=255&s,f+2},u.prototype.writeInt32LE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,2147483647,-2147483648),this[f]=255&s,this[f+1]=s>>>8,this[f+2]=s>>>16,this[f+3]=s>>>24,f+4},u.prototype.writeInt32BE=function(s,f,p){return s=+s,f>>>=0,p||U(this,s,f,4,2147483647,-2147483648),s<0&&(s=4294967295+s+1),this[f]=s>>>24,this[f+1]=s>>>16,this[f+2]=s>>>8,this[f+3]=255&s,f+4},u.prototype.writeBigInt64LE=un(function(s){return Y(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=un(function(s){return D(this,s,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(s,f,p){return it(this,s,f,!0,p)},u.prototype.writeFloatBE=function(s,f,p){return it(this,s,f,!1,p)},u.prototype.writeDoubleLE=function(s,f,p){return yt(this,s,f,!0,p)},u.prototype.writeDoubleBE=function(s,f,p){return yt(this,s,f,!1,p)},u.prototype.copy=function(s,f,p,y){if(!u.isBuffer(s))throw new TypeError("argument should be a Buffer");if(p||(p=0),y||0===y||(y=this.length),f>=s.length&&(f=s.length),f||(f=0),y>0&&y=this.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("sourceEnd out of bounds");y>this.length&&(y=this.length),s.length-f>>=0,p=void 0===p?this.length:p>>>0,s||(s=0),"number"==typeof s)for(w=f;w=y+4;p-=3)f="_".concat(s.slice(p-3,p)).concat(f);return"".concat(s.slice(0,p)).concat(f)}function Tt(s,f,p,y,k,w){if(s>p||s3?0===f||f===BigInt(0)?">= 0".concat(M," and < 2").concat(M," ** ").concat(8*(w+1)).concat(M):">= -(2".concat(M," ** ").concat(8*(w+1)-1).concat(M,") and < 2 ** ")+"".concat(8*(w+1)-1).concat(M):">= ".concat(f).concat(M," and <= ").concat(p).concat(M),new pt.ERR_OUT_OF_RANGE("value",P,s)}var tt,rt,nt;tt=y,nt=w,$t(rt=k,"offset"),void 0!==tt[rt]&&void 0!==tt[rt+nt]||on(rt,tt.length-(nt+1))}function $t(s,f){if("number"!=typeof s)throw new pt.ERR_INVALID_ARG_TYPE(f,"number",s)}function on(s,f,p){throw Math.floor(s)!==s?($t(s,p),new pt.ERR_OUT_OF_RANGE(p||"offset","an integer",s)):f<0?new pt.ERR_BUFFER_OUT_OF_BOUNDS:new pt.ERR_OUT_OF_RANGE(p||"offset",">= ".concat(p?1:0," and <= ").concat(f),s)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(s){return s?"".concat(s," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(s,f){return'The "'.concat(s,'" argument must be of type number. Received type ').concat(z(f))},TypeError),F("ERR_OUT_OF_RANGE",function(s,f,p){var y='The value of "'.concat(s,'" is out of range.'),k=p;return Number.isInteger(p)&&Math.abs(p)>Math.pow(2,32)?k=kt(String(p)):"bigint"==typeof p&&(k=String(p),(p>Math.pow(BigInt(2),BigInt(32))||p<-Math.pow(BigInt(2),BigInt(32)))&&(k=kt(k)),k+="n"),y+" It must be ".concat(f,". Received ").concat(k)},RangeError);var tr=/[^+/0-9A-Za-z-_]/g;function Qt(s,f){var p;f=f||1/0;for(var y=s.length,k=null,w=[],P=0;P55295&&p<57344){if(!k){if(p>56319){(f-=3)>-1&&w.push(239,191,189);continue}if(P+1===y){(f-=3)>-1&&w.push(239,191,189);continue}k=p;continue}if(p<56320){(f-=3)>-1&&w.push(239,191,189),k=p;continue}p=65536+(k-55296<<10|p-56320)}else k&&(f-=3)>-1&&w.push(239,191,189);if(k=null,p<128){if((f-=1)<0)break;w.push(p)}else if(p<2048){if((f-=2)<0)break;w.push(p>>6|192,63&p|128)}else if(p<65536){if((f-=3)<0)break;w.push(p>>12|224,p>>6&63|128,63&p|128)}else{if(!(p<1114112))throw new Error("Invalid code point");if((f-=4)<0)break;w.push(p>>18|240,p>>12&63|128,p>>6&63|128,63&p|128)}}return w}function qi(s){return n.toByteArray(function(f){if((f=(f=f.split("=")[0]).trim().replace(tr,"")).length<2)return"";for(;f.length%4!=0;)f+="=";return f}(s))}function Pr(s,f,p,y){var k;for(k=0;k=f.length||k>=s.length);++k)f[k+p]=s[k];return k}function Vt(s,f){return s instanceof f||null!=s&&null!=s.constructor&&null!=s.constructor.name&&s.constructor.name===f.name}function Ha(s){return s!=s}var fp=function(){for(var s="0123456789abcdef",f=new Array(256),p=0;p<16;++p)for(var y=16*p,k=0;k<16;++k)f[y+k]=s[p]+s[k];return f}();function un(s){return typeof BigInt>"u"?lp:s}function lp(){throw new Error("BigInt not supported")}}(X);var Vr={exports:{}};!function(t,n){var r=function(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(void 0!==r)return r;throw new Error("unable to locate global object")}();t.exports=n=r.fetch,r.fetch&&(n.default=r.fetch.bind(r)),n.Headers=r.Headers,n.Request=r.Request,n.Response=r.Response}(Vr,Vr.exports);var _o=Vr.exports;function Z(t){return null==t?null:t.replace(/^0x/,"").replace(/^Fx/,"")}function at(t){return null==t?null:"0x"+Z(t)}var Jr=function(t){zr(r,t);var n=Yr(r);function r(e){var a,o=e.error,u=e.hostname,i=e.path,c=e.method,l=e.requestBody,d=e.responseBody,g=e.responseStatusText,v=e.statusCode;Dr(this,r);var m="\n HTTP Request Error: An error occurred when interacting with the Access API.\n ".concat(o?"error=".concat(o):"","\n ").concat(u?"hostname=".concat(u):"","\n ").concat(i?"path=".concat(i):"","\n ").concat(c?"method=".concat(c):"","\n ").concat(l?"requestBody=".concat(l):"","\n ").concat(d?"responseBody=".concat(d):"","\n ").concat(g?"responseStatusText=".concat(g):"","\n ").concat(v?"statusCode=".concat(v):"","\n ");return(a=n.call(this,m)).name="HTTP Request Error",a.statusCode=v,a.errorMessage=o,a}return Gr(r)}(ir(Error));function gt(t){return Xr.apply(this,arguments)}function Xr(){return Xr=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m,b;return h.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return b=function(){return b=x(h.mark(function S(){var N,R=arguments;return h.wrap(function(L){for(;;)switch(L.prev=L.next){case 0:return N=R.length>0&&void 0!==R[0]?R[0]:0,L.prev=1,L.next=4,v();case 4:case 14:return L.abrupt("return",L.sent);case 8:if(L.prev=8,L.t0=L.catch(1),![408,429,500,502,503,504].includes(L.t0.statusCode)){L.next=17;break}return L.next=14,new Promise(function(I,W){N1&&void 0!==a[1]?a[1]:{},C((e=a.length>2&&void 0!==a[2]?a[2]:{}).node,"SDK Send Execute Script Error: opts.node must be defined."),C(r.response,"SDK Send Execute Script Error: context.response must be defined."),C(r.Buffer,"SDK Send Execute Script Error: context.Buffer must be defined."),o.next=7,n;case 7:if(!(n=o.sent).block.id){o.next=14;break}return o.next=11,sc(n,r,e);case 11:case 17:case 22:return o.abrupt("return",o.sent);case 14:if(!n.block.height){o.next=20;break}return o.next=17,ic(n,r,e);case 20:return o.next=22,cc(n,r,e);case 23:case"end":return o.stop()}},t)})),ne.apply(this,arguments)}var lc={SHA2_256:1,SHA2_384:2,SHA3_256:3,SHA3_384:4,KMAC128_BLS_BLS12_381:5},pc={ECDSA_P256:1,ECDSA_secp256k1:2,BLS_BLS12_381:3};function dc(t,n,r){return To.apply(this,arguments)}function To(){return(To=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/accounts/".concat(n.account.addr,"?block_height=").concat(n.block.height,"&expand=contracts,keys"),method:"GET",body:null});case 3:return u.abrupt("return",Oo(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function hc(t,n,r){return Co.apply(this,arguments)}function Co(){return(Co=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/accounts/".concat(n.account.addr,"?block_height=sealed&expand=contracts,keys"),method:"GET",body:null});case 3:return u.abrupt("return",Oo(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function Oo(t,n,r){var e,a,o=n.response();return o.tag=t.tag,o.account={address:r.address,balance:Number(r.balance),code:"",contracts:function(u){var i={};if(!u)return i;for(var c=0,l=Object.keys(u);c1&&void 0!==a[1]?a[1]:{},C((e=a.length>2&&void 0!==a[2]?a[2]:{}).node,"SDK Send Get Account Error: opts.node must be defined."),C(r.response,"SDK Send Get Account Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Account Error: context.Buffer must be defined."),o.next=7,n;case 7:if(null===(n=o.sent).block.height){o.next=14;break}return o.next=11,dc(n,r,e);case 11:case 16:return o.abrupt("return",o.sent);case 14:return o.next=16,hc(n,r,e);case 17:case"end":return o.stop()}},t)})),re.apply(this,arguments)}function mc(t,n,r){return Po.apply(this,arguments)}function Po(){return(Po=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks/".concat(n.block.id),method:"GET",body:null});case 3:return u.abrupt("return",ee(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function vc(t,n,r){return No.apply(this,arguments)}function No(){return(No=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks?height=".concat(n.block.height),method:"GET",body:null});case 3:return u.abrupt("return",ee(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function yc(t,n,r){return Bo.apply(this,arguments)}function Bo(){return(Bo=x(h.mark(function t(n,r,e){var a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=e.httpRequest||gt,u=null!==(a=n.block)&&void 0!==a&&a.isSealed?"sealed":"finalized",c.next=4,o({hostname:e.node,path:"/v1/blocks?height=".concat(u),method:"GET",body:null});case 4:return c.abrupt("return",ee(n,r,c.sent));case 6:case"end":return c.stop()}},t)}))).apply(this,arguments)}function ee(t,n,r){var e=r.length?r[0]:null,a=n.response();return a.tag=t.tag,a.blockHeader={id:e.header.id,parentId:e.header.parent_id,height:Number(e.header.height),timestamp:e.header.timestamp},a}function bc(t){return ae.apply(this,arguments)}function ae(){return ae=x(h.mark(function t(n){var r,e,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Block Header Error: opts.node must be defined."),C(r.response,"SDK Send Get Block Header Error: context.response must be defined."),i.next=6,n;case 6:if(o=null!==(n=i.sent).block.height,null===n.block.id){i.next=15;break}return i.next=12,mc(n,r,e);case 12:case 18:case 23:return i.abrupt("return",i.sent);case 15:if(!o){i.next=21;break}return i.next=18,vc(n,r,e);case 21:return i.next=23,yc(n,r,e);case 24:case"end":return i.stop()}},t)})),ae.apply(this,arguments)}function wc(t,n,r){return Lo.apply(this,arguments)}function Lo(){return(Lo=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks/".concat(n.block.id,"?expand=payload"),method:"GET",body:null});case 3:return u.abrupt("return",oe(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function xc(t,n,r){return Uo.apply(this,arguments)}function Uo(){return(Uo=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/blocks?height=".concat(n.block.height,"&expand=payload"),method:"GET",body:null});case 3:return u.abrupt("return",oe(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function kc(t,n,r){return Fo.apply(this,arguments)}function Fo(){return(Fo=x(h.mark(function t(n,r,e){var a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return o=e.httpRequest||gt,u=null!==(a=n.block)&&void 0!==a&&a.isSealed?"sealed":"final",c.next=4,o({hostname:e.node,path:"/v1/blocks?height=".concat(u,"&expand=payload"),method:"GET",body:null});case 4:return c.abrupt("return",oe(n,r,c.sent));case 6:case"end":return c.stop()}},t)}))).apply(this,arguments)}function oe(t,n,r){var e=r.length?r[0]:null,a=n.response();return a.tag=t.tag,a.block={id:e.header.id,parentId:e.header.parent_id,height:Number(e.header.height),timestamp:e.header.timestamp,collectionGuarantees:e.payload.collection_guarantees.map(function(o){return{collectionId:o.collection_id,signerIds:o.signer_ids}}),blockSeals:e.payload.block_seals.map(function(o){return{blockId:o.block_id,executionReceiptId:o.result_id}})},a}function Ec(t){return ue.apply(this,arguments)}function ue(){return ue=x(h.mark(function t(n){var r,e,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Block Error: opts.node must be defined."),C(r.response,"SDK Send Get Block Error: context.response must be defined."),i.next=6,n;case 6:if(o=null!==(n=i.sent).block.height,null===n.block.id){i.next=15;break}return i.next=12,wc(n,r,e);case 12:case 18:case 23:return i.abrupt("return",i.sent);case 15:if(!o){i.next=21;break}return i.next=18,xc(n,r,e);case 21:return i.next=23,kc(n,r,e);case 24:case"end":return i.stop()}},t)})),ue.apply(this,arguments)}function Ic(t){return se.apply(this,arguments)}function se(){return se=x(h.mark(function t(n){var r,e,a,o,u,i=arguments;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},C((e=i.length>2&&void 0!==i[2]?i[2]:{}).node,"SDK Send Get Collection Error: opts.node must be defined."),C(r.response,"SDK Send Get Collection Error: context.response must be defined."),a=e.httpRequest||gt,c.next=7,a({hostname:e.node,path:"/v1/collections/".concat(n.collection.id,"?expand=transactions"),method:"GET",body:null});case 7:return o=c.sent,(u=r.response()).tag=n.tag,u.collection={id:o.id,transactionIds:o.transactions.map(function(l){return l.id})},c.abrupt("return",u);case 12:case"end":return c.stop()}},t)})),se.apply(this,arguments)}function Sc(t,n,r){return jo.apply(this,arguments)}function jo(){return(jo=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/events?type=".concat(n.events.eventType,"&start_height=").concat(n.events.start,"&end_height=").concat(n.events.end),method:"GET",body:null});case 3:return u.abrupt("return",Go(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function Ac(t,n,r){return Do.apply(this,arguments)}function Do(){return(Do=x(h.mark(function t(n,r,e){var a;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return a=e.httpRequest||gt,u.next=3,a({hostname:e.node,path:"/v1/events?type=".concat(n.events.eventType,"&block_ids=").concat(n.events.blockIds.join(",")),method:"GET",body:null});case 3:return u.abrupt("return",Go(n,r,u.sent));case 5:case"end":return u.stop()}},t)}))).apply(this,arguments)}function Go(t,n,r){var e=n.response();return e.tag=t.tag,e.events=[],r.forEach(function(a){return a.events?a.events.forEach(function(o){return e.events.push({blockId:a.block_id,blockHeight:Number(a.block_height),blockTimestamp:a.block_timestamp,type:o.type,transactionId:o.transaction_id,transactionIndex:Number(o.transaction_index),eventIndex:Number(o.event_index),payload:JSON.parse(n.Buffer.from(o.payload,"base64").toString())})}):null}),e}function Rc(t){return ie.apply(this,arguments)}function ie(){return ie=x(h.mark(function t(n){var r,e,a,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Get Events Error: opts.node must be defined."),C(r.response,"SDK Send Get Events Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Events Error: context.Buffer must be defined."),i.next=7,n;case 7:if(a=null!==(n=i.sent).events.start,o=Array.isArray(n.events.blockIds)&&n.events.blockIds.length>0,C(a||o,"SendGetEventsError: Unable to determine which get events request to send. Either a block height range, or block IDs must be specified."),!a){i.next=17;break}return i.next=14,Sc(n,r,e);case 14:case 19:return i.abrupt("return",i.sent);case 17:return i.next=19,Ac(n,r,e);case 20:case"end":return i.stop()}},t)})),ie.apply(this,arguments)}function _c(t){return ce.apply(this,arguments)}function ce(){return ce=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d=arguments;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return r=d.length>1&&void 0!==d[1]?d[1]:{},C((e=d.length>2&&void 0!==d[2]?d[2]:{}).node,"SDK Send Get Transaction Error: opts.node must be defined."),C(r.response,"SDK Send Get Transaction Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Transaction Error: context.Buffer must be defined."),a=e.httpRequest||gt,g.next=8,n;case 8:return n=g.sent,g.next=11,a({hostname:e.node,path:"/v1/transactions/".concat(n.transaction.id),method:"GET",body:null});case 11:return o=g.sent,u=function(v){return{address:v.address,keyId:Number(v.key_id),sequenceNumber:Number(v.sequence_number)}},i=function(v){return{address:v.address,keyId:Number(v.key_index),signature:v.signature}},c=function(v){return JSON.parse(r.Buffer.from(v,"base64").toString())},(l=r.response()).tag=n.tag,l.transaction={script:r.Buffer.from(o.script,"base64").toString(),args:K(o.arguments.map(c)),referenceBlockId:o.reference_block_id,gasLimit:Number(o.gas_limit),payer:o.payer,proposalKey:o.proposal_key?u(o.proposal_key):o.proposal_key,authorizers:o.authorizers,payloadSignatures:K(o.payload_signatures.map(i)),envelopeSignatures:K(o.envelope_signatures.map(i))},g.abrupt("return",l);case 19:case"end":return g.stop()}},t)})),ce.apply(this,arguments)}var Tc={UNKNOWN:0,PENDING:1,FINALIZED:2,EXECUTED:3,SEALED:4,EXPIRED:5};function Cc(t){return fe.apply(this,arguments)}function fe(){return fe=x(h.mark(function t(n){var r,e,a,o,u,i=arguments;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},C((e=i.length>2&&void 0!==i[2]?i[2]:{}).node,"SDK Send Get Transaction Status Error: opts.node must be defined."),C(r.response,"SDK Send Get Transaction Status Error: context.response must be defined."),C(r.Buffer,"SDK Send Get Transaction Status Error: context.Buffer must be defined."),a=e.httpRequest||gt,c.next=8,n;case 8:return n=c.sent,c.next=11,a({hostname:e.node,path:"/v1/transaction_results/".concat(n.transaction.id),method:"GET",body:null});case 11:return o=c.sent,(u=r.response()).tag=n.tag,u.transactionStatus={blockId:o.block_id,status:Tc[o.status.toUpperCase()]||"",statusString:o.status.toUpperCase(),statusCode:o.status_code,errorMessage:o.error_message,events:o.events.map(function(l){return{type:l.type,transactionId:l.transaction_id,transactionIndex:Number(l.transaction_index),eventIndex:Number(l.event_index),payload:JSON.parse(r.Buffer.from(l.payload,"base64").toString())}})},c.abrupt("return",u);case 16:case"end":return c.stop()}},t)})),fe.apply(this,arguments)}function Oc(t){return le.apply(this,arguments)}function le(){return le=x(h.mark(function t(n){var r,e,a,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>1&&void 0!==u[1]?u[1]:{},C((e=u.length>2&&void 0!==u[2]?u[2]:{}).node,"SDK Send Ping Error: opts.node must be defined."),C(r.response,"SDK Send Ping Error: context.response must be defined."),a=e.httpRequest||gt,i.next=7,a({hostname:e.node,path:"/v1/blocks?height=sealed",method:"GET",body:null});case 7:return(o=r.response()).tag=n.tag,i.abrupt("return",o);case 10:case"end":return i.stop()}},t)})),le.apply(this,arguments)}var Pc=function(t){return"".concat(withPrefix(t.addr),"-").concat(t.keyId)};function Nc(t){return pe.apply(this,arguments)}function pe(){return pe=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m,b,E,S,N,T=arguments;return h.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:return r=T.length>1&&void 0!==T[1]?T[1]:{},C((e=T.length>2&&void 0!==T[2]?T[2]:{}).node,"SDK Send Transaction Error: opts.node must be defined."),C(r.response,"SDK Send Transaction Error: context.response must be defined."),C(r.Buffer,"SDK Send Transaction Error: context.Buffer must be defined."),a=e.httpRequest||gt,R.next=8,n;case 8:n=R.sent,o=[],u=0,i=Object.values(n.accounts);case 11:if(!(u1&&void 0!==o[1]?o[1]:{},C((a=o.length>2&&void 0!==o[2]?o[2]:{}).node,'SDK Send Error: Either opts.node or "accessNode.api" in config must be defined.'),C(e.ix,"SDK Send Error: context.ix must be defined."),u.next=6,r;case 6:r=u.sent,u.t0=!0,u.next=u.t0===e.ix.isTransaction(r)?10:u.t0===e.ix.isGetTransactionStatus(r)?11:u.t0===e.ix.isGetTransaction(r)?12:u.t0===e.ix.isScript(r)?13:u.t0===e.ix.isGetAccount(r)?14:u.t0===e.ix.isGetEvents(r)?15:u.t0===e.ix.isGetBlock(r)?16:u.t0===e.ix.isGetBlockHeader(r)?17:u.t0===e.ix.isGetCollection(r)?18:u.t0===e.ix.isPing(r)?19:20;break;case 10:return u.abrupt("return",a.sendTransaction?a.sendTransaction(r,e,a):Nc(r,e,a));case 11:return u.abrupt("return",a.sendGetTransactionStatus?a.sendGetTransactionStatus(r,e,a):Cc(r,e,a));case 12:return u.abrupt("return",a.sendGetTransaction?a.sendGetTransaction(r,e,a):_c(r,e,a));case 13:return u.abrupt("return",a.sendExecuteScript?a.sendExecuteScript(r,e,a):fc(r,e,a));case 14:return u.abrupt("return",a.sendGetAccount?a.sendGetAccount(r,e,a):gc(r,e,a));case 15:return u.abrupt("return",a.sendGetEvents?a.sendGetEvents(r,e,a):Rc(r,e,a));case 16:return u.abrupt("return",a.sendGetBlock?a.sendGetBlock(r,e,a):Ec(r,e,a));case 17:return u.abrupt("return",a.sendGetBlockHeader?a.sendGetBlockHeader(r,e,a):bc(r,e,a));case 18:return u.abrupt("return",a.sendGetCollection?a.sendGetCollection(r,e,a):Ic(r,e,a));case 19:return u.abrupt("return",a.sendPing?a.sendPing(r,e,a):Oc(r,e,a));case 20:return u.abrupt("return",r);case 21:case"end":return u.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),he={},Mo={},zo={},Yo={},ge=function(t,n){return function(r,e){var a=2*e,o=2*n;r[a]=t[o],r[a+1]=t[o+1]}};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=ge)&&n.__esModule?n:{default:n};t.default=function(a){for(var o=a.A,u=a.C,i=0;i<25;i+=5){for(var c=0;c<5;c++)(0,r.default)(o,i+c)(u,c);for(var l=0;l<5;l++){var d=2*(i+l),g=(l+1)%5*2,v=(l+2)%5*2;o[d]^=~u[g]&u[v],o[d+1]^=~u[g+1]&u[v+1]}}}}(Yo);var qo={},Ko={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=new Uint32Array([0,1,0,32898,2147483648,32906,2147483648,2147516416,0,32907,0,2147483649,2147483648,2147516545,2147483648,32777,0,138,0,136,0,2147516425,0,2147483658,0,2147516555,2147483648,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,0,32778,2147483648,2147483658,2147483648,2147516545,2147483648,32896,0,2147483649,2147483648,2147516424]);t.default=n})(Ko),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=Ko)&&n.__esModule?n:{default:n};t.default=function(a){var o=a.A,u=2*a.roundIndex;o[0]^=r.default[u],o[1]^=r.default[u+1]}}(qo);var Ho={},Wo={};!function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=[10,7,11,17,18,3,5,16,8,21,24,4,15,23,19,13,12,2,20,14,22,9,6,1]}(Wo);var Vo={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=[1,3,6,10,15,21,28,36,45,55,2,14,27,41,56,8,25,43,62,18,39,61,20,44]})(Vo),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(Wo),r=a(Vo),e=a(ge);function a(u){return u&&u.__esModule?u:{default:u}}t.default=function(u){var i=u.A,c=u.C,l=u.W;(0,e.default)(i,1)(l,0);for(var d=0,g=0,v=0,m=32,b=0;b<24;b++){var E=n.default[b],S=r.default[b];(0,e.default)(i,E)(c,0),l[v=S<32?0:1]=(d=l[0])<>>(m=32-S),l[(v+1)%2]=g<>>m,(0,e.default)(l,0)(i,E),(0,e.default)(c,0)(l,0)}}}(Ho);var Jo={};function Xo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(!t.length&&!n.length||!t.length)return r;if(!n.length)return[].concat(K(r),[t[0]]);var e=Fn(t),a=e[0],o=e.slice(1),u=Fn(n),i=u[0],c=u.slice(1);return void 0!==a&&r.push(a),void 0!==i&&r.push(i),Xo(o,c,r)}function Zo(t){return function(n){return"function"==typeof n?(wt.deprecate({pkg:"FCL/SDK",subject:"Interopolation of functions into template literals",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params"}),Zo(t)(n(t))):String(n)}}function cr(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),e=1;e=0||(d[c]=u[c]);return d}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(e=0;e=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=(n=ge)&&n.__esModule?n:{default:n};t.default=function(a){for(var o=a.A,u=a.C,i=a.D,c=a.W,l=0,d=0,g=0;g<5;g++){var v=2*g,m=2*(g+5),b=2*(g+10),E=2*(g+15),S=2*(g+20);u[v]=o[v]^o[m]^o[b]^o[E]^o[S],u[v+1]=o[v+1]^o[m+1]^o[b+1]^o[E+1]^o[S+1]}for(var N=0;N<5;N++){(0,r.default)(u,(N+1)%5)(c,0),c[0]=(l=c[0])<<1|(d=c[1])>>>31,c[1]=d<<1|l>>>31,i[2*N]=u[(N+4)%5*2]^c[0],i[2*N+1]=u[(N+4)%5*2+1]^c[1];for(var T=0;T<25;T+=5)o[2*(T+N)]^=i[2*N],o[2*(T+N)+1]^=i[2*N+1]}}})(Jo),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(Yo),r=o(qo),e=o(Ho),a=o(Jo);function o(i){return i&&i.__esModule?i:{default:i}}t.default=function(){var i=new Uint32Array(10),c=new Uint32Array(10),l=new Uint32Array(2);return function(d){for(var g=0;g<24;g++)(0,a.default)({A:d,C:i,D:c,W:l}),(0,e.default)({A:d,C:i,W:l}),(0,n.default)({A:d,C:i}),(0,r.default)({A:d,roundIndex:g});i.fill(0),c.fill(0),l.fill(0)}}}(zo),function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,r=X,e=(n=zo)&&n.__esModule?n:{default:n},a=function(i,c){for(var l=0;l>>8,c[l+2]=i[d+1]>>>16,c[l+3]=i[d+1]>>>24,c[l+4]=i[d],c[l+5]=i[d]>>>8,c[l+6]=i[d]>>>16,c[l+7]=i[d]>>>24}return c};t.default=function(i){var c=this,l=i.capacity,d=i.padding,g=(0,e.default)(),v=l/8,m=200-l/4,b=0,E=new Uint32Array(50),S=r.Buffer.allocUnsafe(m);return this.absorb=function(N){for(var T=0;T=m&&(a(S,E),g(E),b=0);return c},this.squeeze=function(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},T={buffer:N.buffer||r.Buffer.allocUnsafe(v),padding:N.padding||d,queue:r.Buffer.allocUnsafe(S.length),state:new Uint32Array(E.length)};S.copy(T.queue);for(var R=0;R0&&void 0!==arguments[0]?arguments[0]:v;if(!this||this.constructor!==b)return new b(S);if(g&&!g.includes(S))throw new Error("Unsupported hash length");var N=new e.default({capacity:S});return this.update=function(T){var R=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";if(r.Buffer.isBuffer(T))return N.absorb(T),E;if("string"==typeof T)return E.update(r.Buffer.from(T,R));throw new TypeError("Not a string or buffer")},this.digest=function(){var T=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"binary",R="string"==typeof T?{format:T}:T,L=N.squeeze({buffer:R.buffer,padding:R.padding||m});return R.format&&"binary"!==R.format?L.toString(R.format):L},this.reset=function(){return N.reset(),E},this}},o=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:1});t.Keccak=o;var u=a({allowedSizes:[224,256,384,512],defaultSize:512,padding:6});t.SHA3=u;var i=a({allowedSizes:[128,256],defaultSize:256,padding:31});t.SHAKE=i;var c=o;t.SHA3Hash=c,u.SHA3Hash=c,t.default=u}(he);var fr="UNKNOWN",me="SCRIPT",ve="TRANSACTION",ye="GET_TRANSACTION_STATUS",be="GET_ACCOUNT",we="GET_EVENTS",xe="PING",ke="GET_TRANSACTION",Ee="GET_BLOCK",Ie="GET_BLOCK_HEADER",Se="GET_COLLECTION",Re="ACCOUNT",_e="ARGUMENT",Te="authorizer",Ce="payer",Qo="proposer",Lc='{\n "kind":"'.concat(Re,'",\n "tempId":null,\n "addr":null,\n "keyId":null,\n "sequenceNum":null,\n "signature":null,\n "signingFunction":null,\n "resolve":null,\n "role": {\n "proposer":false,\n "authorizer":false,\n "payer":false,\n "param":false\n }\n}'),Uc='{\n "kind":"'.concat(_e,'",\n "tempId":null,\n "value":null,\n "asArgument":null,\n "xform":null,\n "resolve": null,\n "resolveArgument": null\n}'),tu='{\n "tag":"'.concat(fr,'",\n "assigns":{},\n "status":"').concat("OK",'",\n "reason":null,\n "accounts":{},\n "params":{},\n "arguments":{},\n "message": {\n "cadence":null,\n "refBlock":null,\n "computeLimit":null,\n "proposer":null,\n "payer":null,\n "authorizations":[],\n "params":[],\n "arguments":[]\n },\n "proposer":null,\n "authorizations":[],\n "payer":[],\n "events": {\n "eventType":null,\n "start":null,\n "end":null,\n "blockIds":[]\n },\n "transaction": {\n "id":null\n },\n "block": {\n "id":null,\n "height":null,\n "isSealed":null\n },\n "account": {\n "addr":null\n },\n "collection": {\n "id":null\n }\n}'),nu=new Set(Object.keys(JSON.parse(tu))),pr=function(){return JSON.parse(tu)},ru="abcdefghijklmnopqrstuvwxyz0123456789".split(""),Fc=function(){return ru[~~(Math.random()*ru.length)]},Oe=function(){return Array.from({length:10},Fc).join("")},eu=function(t){return"number"==typeof t},au=function(t){return Array.isArray(t)},ou=function(t){return null!==t&&"object"===z(t)},Pe=function(t){return null==t},wn=function(t){return"function"==typeof t},uu=function(t){if(!ou(t)||Pe(t)||eu(t))return!1;var n,r=bt(nu);try{for(r.s();!(n=r.n()).done;)if(!t.hasOwnProperty(n.value))return!1}catch(a){r.e(a)}finally{r.f()}return!0},ht=function(t){return t.status="OK",t},Ne=function(t,n){return t.status="BAD",t.reason=n,t},Ft=function(t){return function(n){return n.tag=t,ht(n)}},su=function(t){return null==t.keyId?t:(C(!isNaN(parseInt(t.keyId)),"account.keyId must be an integer"),O(O({},t),{},{keyId:parseInt(t.keyId)}))},dr=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){C("function"==typeof t||"object"===z(t),"prepAccount must be passed an authorization function or an account object"),C(null!=n.role,"Account must have a role");var e=JSON.parse(Lc),a=n.role,o=Oe();t.authorization&&wn(t.authorization)&&(t={resolve:t.authorization}),!t.authorization&&wn(t)&&(t={resolve:t});var u=t.resolve;return u&&(t.resolve=function(i){for(var c=arguments.length,l=new Array(c>1?c-1:0),d=1;d1&&void 0!==c[1]?c[1]:[],l.prev=1,l.t0=Hc,l.next=5,r;case 5:if(l.t1=l.sent,r=(0,l.t0)(l.t1),!Ue(r)){l.next=9;break}throw new Error("Interaction Error: ".concat(r.reason));case 9:if(e.length){l.next=11;break}return l.abrupt("return",r);case 11:return a=Fn(e),o=a[0],u=a.slice(1),l.next=14,o;case 14:if(!wn(i=l.sent)){l.next=17;break}return l.abrupt("return",gr(i(r),u));case 17:if(!Pe(i)&&i){l.next=19;break}return l.abrupt("return",gr(r,u));case 19:if(!uu(i)){l.next=21;break}return l.abrupt("return",gr(i,u));case 21:throw new Error("Invalid Interaction Composition");case 24:throw l.prev=24,l.t2=l.catch(1),l.t2;case 27:case"end":return l.stop()}},n,null,[[1,24]])}));return function(n){return t.apply(this,arguments)}}(),st=function t(){for(var n=arguments.length,r=new Array(n),e=0;e1&&void 0!==arguments[1]?arguments[1]:Wc;return function(r){return r.assigns[t]=n(r.assigns[t],r),ht(r)}},Fe=Object.freeze({__proto__:null,UNKNOWN:fr,SCRIPT:me,TRANSACTION:ve,GET_TRANSACTION_STATUS:ye,GET_ACCOUNT:be,GET_EVENTS:we,PING:xe,GET_TRANSACTION:ke,GET_BLOCK:Ee,GET_BLOCK_HEADER:Ie,GET_COLLECTION:Se,BAD:"BAD",OK:"OK",ACCOUNT:Re,PARAM:"PARAM",ARGUMENT:_e,AUTHORIZER:Te,PAYER:Ce,PROPOSER:Qo,interaction:pr,uuid:Oe,isNumber:eu,isArray:au,isObj:ou,isNull:Pe,isFn:wn,isInteraction:uu,Ok:ht,Bad:Ne,prepAccount:dr,makeArgument:iu,makeUnknown:jc,makeScript:cu,makeTransaction:fu,makeGetTransactionStatus:lu,makeGetTransaction:pu,makeGetAccount:du,makeGetEvents:hr,makePing:hu,makeGetBlock:gu,makeGetBlockHeader:mu,makeGetCollection:vu,isUnknown:Dc,isScript:Be,isTransaction:en,isGetTransactionStatus:Gc,isGetTransaction:Mc,isGetAccount:Le,isGetEvents:zc,isPing:Yc,isGetBlock:yu,isGetBlockHeader:qc,isGetCollection:Kc,isOk:bu,isBad:Ue,why:wu,isAccount:function(t){return t.kind===Re},isParam:function(t){return"PARAM"===t.kind},isArgument:function(t){return t.kind===_e},pipe:st,get:mr,put:vr,update:xu,destroy:function(t){return function(n){return delete n.assigns[t],ht(n)}}});function yr(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return st(pr(),t)}var je=function(){return JSON.parse('{\n "tag":null,\n "transaction":null,\n "transactionStatus":null,\n "transactionId":null,\n "encodedData":null,\n "events":null,\n "account":null,\n "block":null,\n "blockHeader":null,\n "latestBlock":null,\n "collection":null\n}')};function Mn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return st([gu,function(n){return n.block.isSealed=t,ht(n)}])}function xn(t){return st([du,function(n){return n.account.addr=Z(t),ht(n)}])}var Vc=function(){wt.deprecate({pkg:"@onflow/decode",subject:"Operating upon data of the latestBlock field of the response object",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field"})},ot=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r);case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Jc=function(){var t=x(h.mark(function n(){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",null);case 1:case"end":return r.stop()}},n)}));return function(){return t.apply(this,arguments)}}(),Xc=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.staticType);case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Zc=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{domain:r.domain,identifier:r.identifier});case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),$c=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{path:r.path,address:r.address,borrowType:r.borrowType});case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Qc=function(){var t=x(h.mark(function n(r,e,a){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(!r){o.next=6;break}return o.next=3,kn(r,e,a);case 3:o.t0=o.sent,o.next=7;break;case 6:o.t0=null;case 7:return o.abrupt("return",o.t0);case 8:case"end":return o.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),tf=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{address:r.address,type:r.type});case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),nf=function(){var t=x(h.mark(function n(r,e,a){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,Promise.all(r.map(function(u){return new Promise((i=x(h.mark(function c(l){return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.t0=l,d.next=3,kn(u,e,[].concat(K(a),[u.type]));case 3:return d.t1=d.sent,d.abrupt("return",(0,d.t0)(d.t1));case 5:case"end":return d.stop()}},c)})),function(c){return i.apply(this,arguments)}));var i}));case 2:return o.abrupt("return",o.sent);case 3:case"end":return o.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),rf=function(){var t=x(h.mark(function n(r,e,a){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,r.reduce(function(){var u=x(h.mark(function i(c,l){return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,c;case 2:return c=d.sent,d.next=5,kn(l.key,e,[].concat(K(a),[l.key]));case 5:return d.t0=d.sent,d.next=8,kn(l.value,e,[].concat(K(a),[l.key]));case 8:return c[d.t0]=d.sent,d.abrupt("return",c);case 10:case"end":return d.stop()}},i)}));return function(i,c){return u.apply(this,arguments)}}(),Promise.resolve({}));case 2:return o.abrupt("return",o.sent);case 3:case"end":return o.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),br=function(){var t=x(h.mark(function n(r,e,a){var o,u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,r.fields.reduce(function(){var c=x(h.mark(function l(d,g){return h.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,d;case 2:return d=v.sent,v.next=5,kn(g.value,e,[].concat(K(a),[g.name]));case 5:return d[g.name]=v.sent,v.abrupt("return",d);case 7:case"end":return v.stop()}},l)}));return function(l,d){return c.apply(this,arguments)}}(),Promise.resolve({}));case 2:if(o=i.sent,!(u=r.id&&Eu(e,r.id))){i.next=10;break}return i.next=7,u(o);case 7:i.t0=i.sent,i.next=11;break;case 10:i.t0=o;case 11:return i.abrupt("return",i.t0);case 12:case"end":return i.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),ku={UInt:ot,Int:ot,UInt8:ot,Int8:ot,UInt16:ot,Int16:ot,UInt32:ot,Int32:ot,UInt64:ot,Int64:ot,UInt128:ot,Int128:ot,UInt256:ot,Int256:ot,Word8:ot,Word16:ot,Word32:ot,Word64:ot,UFix64:ot,Fix64:ot,String:ot,Character:ot,Bool:ot,Address:ot,Void:Jc,Optional:Qc,Reference:tf,Array:nf,Dictionary:rf,Event:br,Resource:br,Struct:br,Enum:br,Type:Xc,Path:Zc,Capability:$c},Eu=function(t,n){var r=Object.keys(t).find(function(e){return/^\/.*\/$/.test(e)?new RegExp(e.substring(1,e.length-1)).test(n):e===n});return n&&r&&t[r]},kn=function(){var t=x(h.mark(function n(r,e,a){var o;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(o=Eu(e,r.type)){u.next=3;break}throw new Error("Undefined Decoder Error: ".concat(r.type,"@").concat(a.join(".")));case 3:return u.next=5,o(r.value,e,a);case 5:return u.abrupt("return",u.sent);case 6:case"end":return u.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}(),De=function(){var t=x(h.mark(function n(r){var e,a,o,u,i=arguments;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return e=i.length>1&&void 0!==i[1]?i[1]:{},a=i.length>2&&void 0!==i[2]?i[2]:[],o=Object.keys(ku).filter(function(l){return!Object.keys(e).find(function(d){return new RegExp(d).test(l)})}).reduce(function(l,d){return l[d]=ku[d],l},e),u=O(O({},o),e),c.abrupt("return",kn(r,u,a));case 5:case"end":return c.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Jt=function(){var t=x(h.mark(function n(r){var e,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(e=a.length>1&&void 0!==a[1]?a[1]:{},!r.encodedData){o.next=5;break}return o.abrupt("return",De(r.encodedData,e));case 5:if(!r.transactionStatus){o.next=16;break}return o.t0=O,o.t1=O({},r.transactionStatus),o.t2={},o.next=11,Promise.all(r.transactionStatus.events.map(function(){var u=x(h.mark(function i(c){return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.t0=c.type,l.t1=c.transactionId,l.t2=c.transactionIndex,l.t3=c.eventIndex,l.next=6,De(c.payload,e);case 6:return l.t4=l.sent,l.abrupt("return",{type:l.t0,transactionId:l.t1,transactionIndex:l.t2,eventIndex:l.t3,data:l.t4});case 8:case"end":return l.stop()}},i)}));return function(i){return u.apply(this,arguments)}}()));case 11:return o.t3=o.sent,o.t4={events:o.t3},o.abrupt("return",(0,o.t0)(o.t1,o.t2,o.t4));case 16:if(!r.transaction){o.next=20;break}return o.abrupt("return",r.transaction);case 20:if(!r.events){o.next=26;break}return o.next=23,Promise.all(r.events.map(function(){var u=x(h.mark(function i(c){return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.t0=c.blockId,l.t1=c.blockHeight,l.t2=c.blockTimestamp,l.t3=c.type,l.t4=c.transactionId,l.t5=c.transactionIndex,l.t6=c.eventIndex,l.next=9,De(c.payload,e);case 9:return l.t7=l.sent,l.abrupt("return",{blockId:l.t0,blockHeight:l.t1,blockTimestamp:l.t2,type:l.t3,transactionId:l.t4,transactionIndex:l.t5,eventIndex:l.t6,data:l.t7});case 11:case"end":return l.stop()}},i)}));return function(i){return u.apply(this,arguments)}}()));case 23:return o.abrupt("return",o.sent);case 26:if(!r.account){o.next=30;break}return o.abrupt("return",r.account);case 30:if(!r.block){o.next=34;break}return o.abrupt("return",r.block);case 34:if(!r.blockHeader){o.next=38;break}return o.abrupt("return",r.blockHeader);case 38:if(!r.latestBlock){o.next=43;break}return Vc(),o.abrupt("return",r.latestBlock);case 43:if(!r.transactionId){o.next=47;break}return o.abrupt("return",r.transactionId);case 47:if(!r.collection){o.next=49;break}return o.abrupt("return",r.collection);case 49:return o.abrupt("return",null);case 50:case"end":return o.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Iu=function(t){return"function"==typeof t},Su=function(t){return"string"==typeof t};function Au(){return(Au=x(h.mark(function t(n){var r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!en(n)&&!Be(n)){e.next=11;break}if(r=mr(n,"ix.cadence"),C(Iu(r)||Su(r),"Cadence needs to be a function or a string."),!Iu(r)){e.next=7;break}return e.next=6,r({});case 6:r=e.sent;case 7:return C(Su(r),"Cadence needs to be a string at this point."),e.next=10,j().where(/^0x/).then(function(a){return Object.entries(a).reduce(function(o,u){var i=Lt(u,2),l=i[1],d=new RegExp("(\\b"+i[0]+"\\b)","g");return o.replace(d,l)},r)});case 10:n.message.cadence=e.sent;case 11:return e.abrupt("return",n);case 12:case"end":return e.stop()}},t)}))).apply(this,arguments)}var Ge=function(t){return"function"==typeof t};function ef(t){return C(null!=z(t.xform),"No type specified for argument: ".concat(t.value)),Ge(t.xform)?t.xform(t.value):Ge(t.xform.asArgument)?t.xform.asArgument(t.value):void C(!1,"Invalid Argument",t)}function Ru(t){return Me.apply(this,arguments)}function Me(){return Me=x(h.mark(function t(n){var r,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(C((r=a.length>1&&void 0!==a[1]?a[1]:3)>0,"Argument Resolve Recursion Limit Exceeded for Arg: ".concat(n.tempId)),!Ge(n.resolveArgument)){o.next=9;break}return o.next=5,n.resolveArgument();case 5:return o.abrupt("return",Ru(o.sent,r-1));case 9:return o.abrupt("return",n);case 10:case"end":return o.stop()}},t)})),Me.apply(this,arguments)}function ze(){return ze=x(h.mark(function t(n){var r,e,a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(!en(n)&&!Be(n)){c.next=11;break}r=0,e=Object.entries(n.arguments);case 2:if(!(re.signerIndex?1:r.signerIndexe.keyId?1:r.keyId3&&void 0!==d[3]?d[3]:3,"Account Resolve Recursion Limit Exceeded",{ix:n,accounts:r}),o=[],u=bt(r),g.prev=4,c=h.mark(function v(){var m,b,E,S;return h.wrap(function(N){for(;;)switch(N.prev=N.next){case 0:if(b=(m=i.value).resolve,m.resolve=null,l=e||m,!vf(b)){N.next=8;break}return N.next=7,b(m,yf(m,n));case 7:m=N.sent;case 8:if(!Array.isArray(m)){N.next=13;break}return N.next=11,qe(n,m,l,a-1);case 11:N.next=30;break;case 13:if(m.addr&&(m.addr=Z(m.addr)),null!=m.addr&&null!=m.keyId&&(m.tempId=Vu(m)),n.accounts[m.tempId]=n.accounts[m.tempId]||m,n.accounts[m.tempId].role.proposer=n.accounts[m.tempId].role.proposer||m.role.proposer,n.accounts[m.tempId].role.payer=n.accounts[m.tempId].role.payer||m.role.payer,n.accounts[m.tempId].role.authorizer=n.accounts[m.tempId].role.authorizer||m.role.authorizer,n.accounts[m.tempId].role.proposer&&n.proposer===l.tempId&&(n.proposer=m.tempId),!n.accounts[m.tempId].role.payer){N.next=29;break}if(n.payer=Array.isArray(n.payer)?Array.from(new Set([].concat(K(n.payer),[m.tempId]).map(function(T){return T===l.tempId?m.tempId:T}))):Array.from(new Set([n.payer,m.tempId].map(function(T){return T===l.tempId?m.tempId:T}))),!(n.payer.length>1)){N.next=29;break}if(E=[],S=[],n.payer=n.payer.reduce(function(T,R){var L=n.accounts[R].addr,I=Vu(n.accounts[R]);return S.push(L),E.includes(I)?T:(E.push(I),[].concat(K(T),[R]))},[]),!(Array.from(new Set(S)).length>1)){N.next=29;break}throw new Error("Payer can not be different accounts");case 29:n.accounts[m.tempId].role.authorizer&&(e?o=Array.from(new Set([].concat(K(o),[m.tempId]))):n.authorizations=n.authorizations.map(function(T){return T===l.tempId?m.tempId:T}));case 30:l.tempId!=m.tempId&&delete n.accounts[l.tempId];case 31:case"end":return N.stop()}},v)}),u.s();case 7:if((i=u.n()).done){g.next=11;break}return g.delegateYield(c(),"t0",9);case 9:g.next=7;break;case 11:g.next=16;break;case 13:g.prev=13,g.t1=g.catch(4),u.e(g.t1);case 16:return g.prev=16,u.f(),g.finish(16);case 19:e&&(n.authorizations=n.authorizations.map(function(v){return v===e.tempId?o:v}).reduce(function(v,m){return Array.isArray(m)?[].concat(K(v),K(m)):[].concat(K(v),[m])},[]));case 20:case"end":return g.stop()}},t,null,[[4,13,16,19]])})),Ke.apply(this,arguments)}function Ju(){return(Ju=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!en(n)){r.next=13;break}return Array.isArray(n.payer)||wt.deprecate({pkg:"FCL",subject:'"ix.payer" must be an array. Support for ix.payer as a singular',message:"See changelog for more info."}),r.prev=2,r.next=5,qe(n,Object.values(n.accounts));case 5:return r.next=7,qe(n,Object.values(n.accounts));case 7:r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(2),console.error("=== SAD PANDA ===\n\n",r.t0,"\n\n=== SAD PANDA ==="),r.t0;case 13:return r.abrupt("return",n);case 14:case"end":return r.stop()}},t,null,[[2,9]])}))).apply(this,arguments)}function Xu(){return(Xu=x(h.mark(function t(n){var r,e,a,o;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:if(!en(n)){u.next=16;break}return u.prev=1,r=Hu(n),e=Cu($u(n)),u.next=6,Promise.all(r.map(Zu(n,e)));case 6:return a=Wu(n),o=Ou(O(O({},$u(n)),{},{payloadSigs:r.map(function(i){return{address:n.accounts[i].addr,keyId:n.accounts[i].keyId,sig:n.accounts[i].signature}})})),u.next=10,Promise.all(a.map(Zu(n,o)));case 10:u.next=16;break;case 12:throw u.prev=12,u.t0=u.catch(1),console.error("Signatures",u.t0,{ix:n}),u.t0;case 16:return u.abrupt("return",n);case 17:case"end":return u.stop()}},t,null,[[1,12]])}))).apply(this,arguments)}function Zu(t,n){return r=x(h.mark(function e(a){var o;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:if(null==(o=t.accounts[a]).signature){c.next=3;break}return c.abrupt("return");case 3:return c.next=5,o.signingFunction(bf(o,n,t));case 5:t.accounts[a].signature=c.sent.signature;case 8:case"end":return c.stop()}},e)})),function(e){return r.apply(this,arguments)};var r}function bf(t,n,r){try{return{f_type:"Signable",f_vsn:"1.0.1",message:n,addr:Z(t.addr),keyId:t.keyId,roles:t.role,cadence:r.message.cadence,args:r.message.arguments.map(function(e){return r.arguments[e].asArgument}),data:{},interaction:r,voucher:Yn(r)}}catch(e){throw console.error("buildSignable",e),e}}function $u(t){var n=Z((Array.isArray(t.payer)?t.accounts[t.payer[0]]:t.accounts[t.payer]).addr);return{cadence:t.message.cadence,refBlock:t.message.refBlock||null,computeLimit:t.message.computeLimit,arguments:t.message.arguments.map(function(r){return t.arguments[r].asArgument}),proposalKey:{address:Z(t.accounts[t.proposer].addr),keyId:t.accounts[t.proposer].keyId,sequenceNum:t.accounts[t.proposer].sequenceNum},payer:n,authorizers:t.authorizations.map(function(r){return Z(t.accounts[r].addr)}).reduce(function(r,e){return r.find(function(a){return a===e})?r:[].concat(K(r),[e])},[])}}function Qu(){return(Qu=x(h.mark(function t(n){var r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=mr(n,"ix.validators",[]),e.abrupt("return",st(n,r.map(function(a){return function(o){return a(o,{Ok:ht,Bad:Ne})}})));case 2:case"end":return e.stop()}},t)}))).apply(this,arguments)}function ts(){return(ts=x(h.mark(function t(n){var r,e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:for(r=0,e=Object.keys(n.accounts);r1&&void 0!==arguments[1]?arguments[1]:wf;return r=x(h.mark(function e(a){var o,u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return o=function(c){return["\nAccounts:",{proposer:c.proposer,authorizations:c.authorizations,payer:c.payer},"\n\nDetails:",c.accounts].filter(Boolean)},u=function(){for(var c,l=arguments.length,d=new Array(l),g=0;g1){var e=n[0],a=n[1];return G(function(u,i){var l=i.Bad;return e?(0,i.Ok)(u):l(u,a)})}var o=n[0];return function(u){return o(u,{Ok:ht,Bad:Ne})}}var Ot=function(){var t=x(h.mark(function n(){var r,e,a,o,u=arguments;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=u.length>0&&void 0!==u[0]?u[0]:[],e=u.length>1&&void 0!==u[1]?u[1]:{},i.next=4,j.first(["sdk.transport","sdk.send"],e.send||de);case 4:return G(a=i.sent,"Required value for sdk.transport is not defined in config. See: ".concat("https://github.com/onflow/fcl-js/blob/master/packages/sdk/CHANGELOG.md#0057-alpha1----2022-01-21")),i.next=8,j.first(["sdk.resolve"],e.resolve||He);case 8:if(o=i.sent,i.t0=e.node,i.t0){i.next=14;break}return i.next=13,j().get("accessNode.api");case 13:i.t0=i.sent;case 14:return e.node=i.t0,Array.isArray(r)&&(r=st(pr(),r)),i.t1=a,i.next=19,o(r);case 19:return i.t2=i.sent,i.t3={config:j,response:je,ix:Fe,Buffer:X.Buffer},i.t4=e,i.abrupt("return",(0,i.t1)(i.t2,i.t3,i.t4));case 23:case"end":return i.stop()}},n)}));return function(){return t.apply(this,arguments)}}();function Sn(t){return We.apply(this,arguments)}function We(){return We=x(h.mark(function t(n){var e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,j().where(/^decoder\./);case 2:return e=Object.entries(a.sent).map(function(o){var u=Lt(o,2),i=u[0],c=u[1];return[i="/".concat(i.replace(/^decoder\./,""),"$/"),c]}),a.abrupt("return",Jt(n,Object.fromEntries(e)));case 5:case"end":return a.stop()}},t)})),We.apply(this,arguments)}var xf=function(t){zr(r,t);var n=Yr(r);function r(e){var a;Dr(this,r);var o="\n Encode Message From Signable Error: Unable to determine message encoding for signer addresss: ".concat(e,". \n Please ensure the address: ").concat(e," is intended to sign the given transaction as specified by the transaction signable.\n ").trim();return(a=n.call(this,o)).name="Unable To Determine Message Encoding For Signer Addresss",a}return Gr(r)}(ir(Error));function Ve(t){return xu("ix.validators",function(n){return Array.isArray(n)?n.push(t):[t]})}function xr(t){return st([function(n){return n.block.height=t,n},Ve(function(n){if("boolean"==typeof n.block.isSealed)throw new Error("Unable to specify both block height and isSealed.");if(n.block.id)throw new Error("Unable to specify both block height and block id.");return n})])}function Je(t){return st([function(n){return n.block.id=t,ht(n)},Ve(function(n,r){var e=r.Ok,a=r.Bad;return Le(n)?a(n,"Unable to specify a block id with a Get Account interaction."):"boolean"==typeof n.block.isSealed?a(n,"Unable to specify both block id and isSealed."):n.block.height?a(n,"Unable to specify both block id and block height."):e(n)})])}function qn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.sealed,r=void 0!==n&&n,e=t.id,a=t.height,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return C(!(r&&e||r&&a),'Method: block -- Cannot pass "sealed" with "id" or "height"'),C(!(e&&a),'Method: block -- Cannot pass "id" and "height" simultaneously'),e?Ot([Mn(),Je(e)],o).then(Jt):a?Ot([Mn(),xr(a)],o).then(Jt):Ot([Mn(r)],o).then(Jt)}function os(){return st((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(function(n){return dr(n,{role:Te})}))}function us(t,n,r){return st([hr,function(e){return e.events.eventType=t,e.events.start=n,e.events.end=r,ht(e)}])}function ss(t){return st([lu,function(n){return n.transaction.id=t,ht(n)}])}function Xe(t){return function(n){return n.message.computeLimit=t,n}}function Ze(){return st((arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(iu))}function $e(t,n){return{value:t,xform:n}}function is(t){return Qe.apply(this,arguments)}function Qe(){return Qe=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",dr(n,{role:Qo}));case 1:case"end":return r.stop()}},t)})),Qe.apply(this,arguments)}function cs(t){return ta.apply(this,arguments)}function ta(){return ta=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",dr(n,{role:Ce}));case 1:case"end":return r.stop()}},t)})),ta.apply(this,arguments)}function fs(t){return st([function(n){return n.message.refBlock=t,ht(n)}])}function ls(){return st([cu,vr("ix.cadence",cr.apply(void 0,arguments))])}var kf=[];function ps(){return st([fu,vr("ix.cadence",cr.apply(void 0,arguments)),function(t){return t.message.refBlock=t.message.refBlock||null,t.authorizations=t.authorizations||kf,ht(t)}])}function Ef(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return C(t.account,"mockAccountResponse(ix) -- ix.account is missing",t),C(t.account.addr,"mockAccountResponse(ix) -- ix.account.addr is missing",t),{account:{addr:t.account.addr,keys:Array.from({length:n},function(e,a){return{index:a,sequenceNumber:42}})}}}var If=function(t){return t},Sf=["tempId"];function ds(t){return["SIGNATURE",t.addr,t.keyId].join(".")}function Kn(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var r=O(O(O({},n),t),{},{signingFunction:t.signingFunction||n.signingFunction||function(e){return{addr:r.addr,keyId:r.keyId,signature:ds(r)}}});return r}}var hs,na={proposer:!1,authorizer:!1,payer:!1},Af=Object.freeze({__proto__:null,mockSend:function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:If;return n=x(h.mark(function r(e){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,e;case 2:e=a.sent,a.t0=!0,a.next=a.t0===Le(e)?6:a.t0===yu(e)?7:8;break;case 6:return a.abrupt("return",Ef(e));case 7:return a.abrupt("return",{tag:"GET_BLOCK",block:{id:"32"}});case 8:return a.abrupt("return",t(e));case 9:case"end":return a.stop()}},r)})),function(r){return n.apply(this,arguments)}},authzFn:Kn,authzResolve:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var r=t.tempId,e=Bc(t,Sf);return O(O({},n),{},{tempId:r||"WITH_RESOLVE",resolve:Kn(e)})}},authzResolveMany:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(n){var r=t.tempId||"AUTHZ_RESOLVE_MANY";return O(O({},n),{},{tempId:r,resolve:function(){return[t.proposer&&Kn(t.proposer)({role:O(O({},na),{},{proposer:!0})})].concat(K(t.authorizations.map(Kn).map(function(e){return e({role:O(O({},na),{},{authorizer:!0})})})),[t.payer&&Kn(t.payer)({role:O(O({},na),{},{payer:!0})})]).filter(Boolean)}})}},sig:ds,idof:function(t){return"".concat(at(t.addr),"-").concat(t.keyId)},run:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return yr([fs("123")].concat(K(t))).then(He)}}),kr=function(t){return function(n){return z(n)===t}},Xt=function(t){return null!=t},Rf=kr("object"),An=kr("string"),gs=kr("function"),_f=kr("number"),Tf="function"==typeof queueMicrotask?queueMicrotask:function(t){return(hs||(hs=Promise.resolve())).then(t).catch(function(n){return setTimeout(function(){throw n},0)})},Cf=function(){var t,n=[];return{deliver:function(r){return x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:n.push(r),t&&(t(n.shift()),t=void 0);case 2:case"end":return a.stop()}},e)}))()},receive:function(){return new Promise(function(r){var e=n.shift();if(e)return r(e);t=r})}}},ms="SUBSCRIBE",ra="UNSUBSCRIBE",Of="UPDATED",Q="object"===(typeof self>"u"?"undefined":z(self))&&self.self===self&&self||"object"===(typeof global>"u"?"undefined":z(global))&&global.global===global&&global||"object"===(typeof window>"u"?"undefined":z(window))&&window.window===window&&window;Q.FCL_REGISTRY=Q.FCL_REGISTRY??{};var Ht,Nf=0,Pt=function(t,n,r){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return new Promise(function(a,o){var u=e.expectReply||!1,i=null!=e.timeout?e.timeout:5e3;u&&i&&setTimeout(function(){return o(new Error("Timeout: ".concat(i,"ms passed without a response.")))},i);var c={to:t,from:e.from,tag:n,data:r,timeout:i,reply:a,reject:o};try{Q.FCL_REGISTRY[t]&&Q.FCL_REGISTRY[t].mailbox.deliver(c),u||a(!0)}catch(l){console.error("FCL.Actor -- Could Not Deliver Message",c,Q.FCL_REGISTRY[t],l)}})},Bf=function(t){delete Q.FCL_REGISTRY[t]},Lf=function(){var n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n=x(h.mark(function r(e){var a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if("function"!=typeof t.INIT){o.next=3;break}return o.next=3,t.INIT(e);case 3:return o.next=6,e.receive();case 6:if(a=o.sent,o.prev=7,"EXIT"!==a.tag){o.next=13;break}if("function"!=typeof t.TERMINATE){o.next=12;break}return o.next=12,t.TERMINATE(e,a,a.data||{});case 12:return o.abrupt("break",25);case 13:return o.next=15,t[a.tag](e,a,a.data||{});case 15:o.next=20;break;case 17:o.prev=17,o.t0=o.catch(7),console.error("".concat(e.self()," Error"),a,o.t0);case 20:return o.prev=20,o.abrupt("continue",3);case 23:o.next=3;break;case 25:case"end":return o.stop()}},r,null,[[7,17,20,23]])})),function(r){return n.apply(this,arguments)}},ea=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null==n&&(n=++Nf),null!=Q.FCL_REGISTRY[n])return n;Q.FCL_REGISTRY[n]={addr:n,mailbox:Cf(),subs:new Set,kvs:{},error:null};var r={self:function(){return n},receive:function(){return Q.FCL_REGISTRY[n].mailbox.receive()},send:function(e,a,o){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return u.from=n,Pt(e,a,o,u)},sendSelf:function(e,a,o){Q.FCL_REGISTRY[n]&&Pt(n,e,a,o)},broadcast:function(e,a){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};o.from=n;var u,i=bt(Q.FCL_REGISTRY[n].subs);try{for(i.s();!(u=i.n()).done;)Pt(u.value,e,a,o)}catch(l){i.e(l)}finally{i.f()}},subscribe:function(e){return null!=e&&Q.FCL_REGISTRY[n].subs.add(e)},unsubscribe:function(e){return null!=e&&Q.FCL_REGISTRY[n].subs.delete(e)},subscriberCount:function(){return Q.FCL_REGISTRY[n].subs.size},hasSubs:function(){return!!Q.FCL_REGISTRY[n].subs.size},put:function(e,a){null!=e&&(Q.FCL_REGISTRY[n].kvs[e]=a)},get:function(e,a){return Q.FCL_REGISTRY[n].kvs[e]??a},delete:function(e){delete Q.FCL_REGISTRY[n].kvs[e]},update:function(e,a){null!=e&&(Q.FCL_REGISTRY[n].kvs[e]=a(Q.FCL_REGISTRY[n].kvs[e]))},keys:function(){return Object.keys(Q.FCL_REGISTRY[n].kvs)},all:function(){return Q.FCL_REGISTRY[n].kvs},where:function(e){return Object.keys(Q.FCL_REGISTRY[n].kvs).reduce(function(a,o){return e.test(o)?O(O({},a),{},q({},o,Q.FCL_REGISTRY[n].kvs[o])):a},{})},merge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.keys(e).forEach(function(a){return Q.FCL_REGISTRY[n].kvs[a]=e[a]})},fatalError:function(e){Q.FCL_REGISTRY[n].error=e;var a,o=bt(Q.FCL_REGISTRY[n].subs);try{for(o.s();!(a=o.n()).done;)Pt(a.value,Of)}catch(i){o.e(i)}finally{o.f()}}};return"object"===z(t)&&(t=Lf(t)),Tf(x(h.mark(function e(){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t(r);case 2:Bf(n);case 3:case"end":return a.stop()}},e)}))),n},Wt="config",vs="PUT_CONFIG",ys="GET_CONFIG",bs="GET_ALL_CONFIG",ws="UPDATE_CONFIG",xs="DELETE_CONFIG",ks="CLEAR_CONFIG",Es="WHERE_CONFIG",Hn="CONFIG/UPDATED",Is=function(t){return t},Ss=(q(Ht={},vs,function(t,n,r){var e=r.key,a=r.value;if(null==e)throw new Error("Missing 'key' for config/put.");t.put(e,a),t.broadcast(Hn,O({},t.all()))}),q(Ht,ys,function(t,n,r){var e=r.key,a=r.fallback;if(null==e)throw new Error("Missing 'key' for config/get");n.reply(t.get(e,a))}),q(Ht,bs,function(t,n){n.reply(O({},t.all()))}),q(Ht,ws,function(t,n,r){var e=r.key,a=r.fn;if(null==e)throw new Error("Missing 'key' for config/update");t.update(e,a||Is),t.broadcast(Hn,O({},t.all()))}),q(Ht,xs,function(t,n,r){var e=r.key;if(null==e)throw new Error("Missing 'key' for config/delete");t.delete(e),t.broadcast(Hn,O({},t.all()))}),q(Ht,ks,function(t,n){for(var r=0,e=Object.keys(t.all());r1?i[1]:void 0,(n=i.length>0&&void 0!==i[0]?i[0]:[]).length){c.next=4;break}return c.abrupt("return",r);case 4:return e=Fn(n),a=e[0],o=e.slice(1),c.next=7,oa(a);case 7:if(null!=(u=c.sent)){c.next=10;break}return c.abrupt("return",ua(o,r));case 10:return c.abrupt("return",u);case 11:case"end":return c.stop()}},t)})),sa.apply(this,arguments)}function Er(){return Pt(Wt,bs,null,{expectReply:!0,timeout:10})}function As(t){return Pt(Wt,ws,{key:t,fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:Is}),Et()}function Rs(t){return Pt(Wt,xs,{key:t}),Et()}function _s(t){return Pt(Wt,Es,{pattern:t},{expectReply:!0,timeout:10})}function Ts(t){return function(n,r,e){ea(Ss,Wt);var u,a="@EXIT",o=ea((u=x(h.mark(function i(c){var l,d;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:c.send(n,ms);case 1:return g.next=4,c.receive();case 4:if(d=Q.FCL_REGISTRY[n].error,(l=g.sent).tag!==a){g.next=9;break}return c.send(n,ra),g.abrupt("return");case 9:if(!d){g.next=13;break}return e(null,d),c.send(n,ra),g.abrupt("return");case 13:e(l.data,null),g.next=1;break;case 16:case"end":return g.stop()}},i)})),function(i){return u.apply(this,arguments)}));return function(){return Pt(o,a)}}(Wt,0,t)}function Cs(t){return Pt(Wt,ks).then(Et(t))}function Et(t){return null!=t&&"object"===z(t)&&Object.keys(t).map(function(n){return aa(n,t[n])}),{put:aa,get:oa,all:Er,first:ua,update:As,delete:Rs,where:_s,subscribe:Ts,overload:Os}}ea(Ss,Wt),Et.put=aa,Et.get=oa,Et.all=Er,Et.first=ua,Et.update=As,Et.delete=Rs,Et.where=_s,Et.subscribe=Ts,Et.overload=Os;var Uf=function(t){return t};function Os(){var r,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Uf;return new Promise((r=x(h.mark(function e(a,o){var u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return c.next=2,Er();case 2:return u=c.sent,c.prev=3,Et(t),c.t0=n,c.next=8,Er();case 8:return c.t1=c.sent,c.next=11,(0,c.t0)(c.t1);case 11:return i=c.sent,c.next=14,Cs(u);case 14:a(i),c.next=22;break;case 17:return c.prev=17,c.t2=c.catch(3),c.next=21,Cs(u);case 21:o(c.t2);case 22:case"end":return c.stop()}},e,null,[[3,17]])})),function(e,a){return r.apply(this,arguments)}))}var Rn=Object.freeze({debug:5,info:4,log:3,warn:2,error:1}),Ff=function(t){var r=t.message;return["\n %c".concat(t.title,"\n ============================\n\n ").concat(r,"\n\n ============================\n ").replace(/\n[^\S\r\n]+/g,"\n").trim(),,"font-weight:bold;font-family:monospace;"]},Ir=function(){var t=x(h.mark(function n(r){var e,a,o,u,i,c,l,d,g,v,m,b;return h.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return c=r.title,l=r.message,d=r.level,v=void 0!==(g=r.always)&&g,E.next=3,Et.get("logger.level",Rn.warn);case 3:if(m=E.sent,v||!(m8)&&H("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(n[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),n[1]=n[1].padEnd(8,"0"),{type:"UFix64",value:t=n.join(".")}}if(ct(t))return Ns(),{type:"UFix64",value:t.toString()};H("Expected String for UFix64")},function(t){return t}),al=V("Fix64",function(t){if(et(t)){var n=t.split(".");return 2!==n.length&&H("Expected one decimal but found ".concat(n.length," in the [U]Fix64 value. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),(0==n[1].length||n[1].length>8)&&H("Expected at least one digit, and at most 8 digits following the decimal of the [U]Fix64 value but found ".concat(n[1].length," digits. Find out more about [U]Fix64 types here: https://docs.onflow.org/cadence/json-cadence-spec/#fixed-point-numbers")),n[1]=n[1].padEnd(8,"0"),{type:"Fix64",value:t=n.join(".")}}if(ct(t))return Ns(),{type:"Fix64",value:t.toString()};H("Expected String for Fix64")},function(t){return t}),ol=V("String",function(t){if(et(t))return{type:"String",value:t};H("Expected String for type String")},function(t){return t}),ul=V("Character",function(t){if(et(t))return{type:"Character",value:t};H("Expected Character for type Character")},function(t){return t}),sl=V("Bool",function(t){if("boolean"==typeof t)return{type:"Bool",value:t};H("Expected Boolean for type Bool")},function(t){return t}),Bs=V("Address",function(t){if(et(t))return{type:"Address",value:t};H("Expected Address for type Address")},function(t){return t}),il=V("Void",function(t){if(!t||Ps(t))return{type:"Void"};H("Expected Void for type Void")},function(t){return t}),cl=V("Reference",function(t){if(pn(t))return{type:"Reference",value:t};H("Expected Object for type Reference")},function(t){return t}),Ls=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return V("Array",function(n){return{type:"Array",value:ln(t)?t.map(function(r,e){return r.asArgument(n[e])}):n.map(function(r){return t.asArgument(r)})}},function(n){return n})},fl=V("Path",function(t){if(pn(t))return et(t.domain)||H("Expected a string for the Path domain but found ".concat(t.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),"storage"!==t.domain&&"private"!==t.domain&&"public"!==t.domain&&H('Expected either "storage", "private" or "public" as the Path domain but found '.concat(t.domain,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),et(t.identifier)||H("Expected a string for the Path identifier but found ".concat(t.identifier,". Find out more about the Path type here: https://docs.onflow.org/cadence/json-cadence-spec/#path")),{type:"Path",value:{domain:t.domain,identifier:t.identifier}};H("Expected Object for type Path")},function(t){return t}),Us=Object.freeze({__proto__:null,Address:Bs,Array:Ls,Bool:sl,Character:ul,Dictionary:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return V("Dictionary",function(n){if(pn(n))return{type:"Dictionary",value:ln(t)?t.map(function(r,e){return{key:r.key.asArgument(n[e].key),value:r.value.asArgument(n[e].value)}}):ln(n)?n.map(function(r){return{key:t.key.asArgument(r.key),value:t.value.asArgument(r.value)}}):[{key:t.key.asArgument(n.key),value:t.value.asArgument(n.value)}]};H("Expected Object for type Dictionary")},function(n){return n})},Enum:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Enum",function(r){if(pn(r))return{type:"Enum",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Enum")},function(r){return r})},Event:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Event",function(r){if(pn(r))return{type:"Event",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Event")},function(r){return r})},Fix64:al,Identity:jf,Int:Gf,Int128:Xf,Int16:qf,Int256:$f,Int32:Hf,Int64:Vf,Int8:zf,Optional:function(t){return V("Optional",function(n){return{type:"Optional",value:Ps(n)?null:t.asArgument(n)}},function(n){return n})},Path:fl,Reference:cl,Resource:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Resource",function(r){if(pn(r))return{type:"Resource",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Resource")},function(r){return r})},String:ol,Struct:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return V("Struct",function(r){if(pn(r))return{type:"Struct",value:{id:t,fields:ln(n)?n.map(function(e,a){return{name:r.fields[a].name,value:e.value.asArgument(r.fields[a].value)}}):r.fields.map(function(e){return{name:e.name,value:n.value.asArgument(e.value)}})}};H("Expected Object for type Struct")},function(r){return r})},UFix64:el,UInt:Df,UInt128:Jf,UInt16:Yf,UInt256:Zf,UInt32:Kf,UInt64:Wf,UInt8:Mf,Void:il,Word16:tl,Word32:nl,Word64:rl,Word8:Qf,_Array:Ls});function Fs(t){return gs(t)?t($e,Us):[]}function js(t){return Ds.apply(this,arguments)}function Ds(){return(Ds=x(h.mark(function t(n){var r,e;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return C(void 0!==(r=n.url),"retrieve({ url }) -- url must be defined"),o.prev=2,o.next=5,_o(r);case 5:e=o.sent,o.next=11;break;case 8:throw o.prev=8,o.t0=o.catch(2),new Error("httpDocumentResolver Error: Failed to retrieve document.");case 11:if(!e.ok){o.next=17;break}return o.next=14,e.json();case 14:o.t1=o.sent,o.next=18;break;case 17:o.t1=null;case 18:return o.abrupt("return",o.t1);case 20:case"end":return o.stop()}},t,null,[[2,8]])}))).apply(this,arguments)}var Gs=new Map([["http",js],["https",js]]);function ll(t){return Ms.apply(this,arguments)}function Ms(){return(Ms=x(h.mark(function t(n){var r,e,a,o,u;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return C(void 0!==(r=n.url),"retrieve({ url }) -- url must be defined"),C("string"==typeof r,"retrieve({ url }) -- url must be a string"),c.next=5,j().where(/^document\.resolver\./);case 5:return e=c.sent,Object.keys(e).map(function(l){var d=e[l],g=l.replace(/^document\.resolver\./,"");Gs.set(g,d)}),C(a=/^(.*):\/\/([A-Za-z0-9\-\.]+)(:[0-9]+)?(.*)$/.exec(r),"Failed to parse URL"),o=a[1],C(a,"Failed to parse URL protocol"),C(u=Gs.get(o),"No resolver found for protcol=".concat(o)),c.next=15,u({url:r});case 15:return c.abrupt("return",c.sent);case 17:case"end":return c.stop()}},t)}))).apply(this,arguments)}function Wn(t){if(null==t)return null;if("1.0.0"===t.f_version)return t;throw new Error("normalizeInteractionTemplate Error: Invalid InteractionTemplate")}function zs(t){var n,r,e=t.network,a=t.template;if(G(null!=e,"deriveCadenceByNetwork({ network }) -- network must be defined"),G("string"==typeof e,"deriveCadenceByNetwork({ network }) -- network must be a string"),G(null!=a,"generateDependencyPin({ template }) -- template must be defined"),G("object"===z(a),"generateDependencyPin({ template }) -- template must be an object"),G("InteractionTemplate"===a.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),"1.0.0"===(a=Wn(a)).f_version)return Object.keys(null===(n=a)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.dependencies).map(function(o){var u,i,c,l=Object.values(null===(u=a)||void 0===u||null===(i=u.data)||void 0===i||null===(c=i.dependencies)||void 0===c?void 0:c[o]);G(l,"deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ".concat(o)),G(0===l.length,"deriveCadenceByNetwork -- Could not find contracts for dependency placeholder: ".concat(o));var d=l[0],g=null==d?void 0:d[e];return G(g,"deriveCadenceByNetwork -- Could not find ".concat(e," network information for dependency: ").concat(o)),[o,g.address]}).reduce(function(o,u){var i=Lt(u,2),l=i[1],d=new RegExp("(\\b"+i[0]+"\\b)","g");return o.replace(d,l)},a.data.cadence);throw new Error("deriveCadenceByNetwork Error: Unsupported template version")}function pl(t){return ia.apply(this,arguments)}function ia(){return ia=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,b;return h.wrap(function(E){for(;;)switch(E.prev=E.next){case 0:return e=n.template,E.next=3,j.get("flow.network");case 3:C(a=E.sent,"FCL configureDependencies Error: Missing configuration value for 'flow.network'"),o={},E.t0=e.f_version,E.next="1.0.0"===E.t0?9:12;break;case 9:for(u=Object.keys(null==e||null===(r=e.data)||void 0===r?void 0:r.dependencies),i=0,c=u;i0,"FCL configureDependencies Error: No contracts found in template for placeholder=".concat(d)),C(b=g[v[0]][a],"FCL configureDependencies Error: No dependency information for placeholder=".concat(d," contract=").concat(v[0]," network=").concat(a)),C(null==b?void 0:b.address,"FCL configureDependencies Error: No address information for placeholder=".concat(d," contract=").concat(v[0]," network=").concat(a)),o[d]=at(null==b?void 0:b.address);return E.abrupt("return",o);case 12:throw new Error("FCL configureDependencies Error: Unsupported template version");case 13:case"end":return E.stop()}},t)})),ia.apply(this,arguments)}function Ys(t){return qs.apply(this,arguments)}function qs(){return(qs=x(h.mark(function t(n){var r;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(!An(null==n?void 0:n.template)){a.next=4;break}return a.next=3,ll({url:null==n?void 0:n.template});case 3:n.template=a.sent;case 4:if(r={},null==n||!n.template){a.next=10;break}return n.template=Wn(null==n?void 0:n.template),a.next=9,pl({template:n.template});case 9:r=a.sent;case 10:if(a.t0=n.cadence,a.t0){a.next=19;break}return a.t1=zs,a.t2=n.template,a.next=16,j().get("flow.network");case 16:a.t3=a.sent,a.t4={template:a.t2,network:a.t3},a.t0=(0,a.t1)(a.t4);case 19:return n.cadence=a.t0,n.dependencies=r,a.abrupt("return",n);case 23:case"end":return a.stop()}},t)}))).apply(this,arguments)}function Ks(t,n){return ca.apply(this,arguments)}function ca(){return ca=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(C(Xt(r),"".concat(n,"(opts) -- opts is required")),C(Rf(r),"".concat(n,"(opts) -- opts must be an object")),C(!(r.cadence&&r.template),"".concat(n,"({ template, cadence }) -- cannot pass both cadence and template")),C(Xt(r.cadence||(null==r?void 0:r.template)),"".concat(n,"({ cadence }) -- cadence is required")),C(An(r.cadence)||(null==r?void 0:r.template),"".concat(n,"({ cadence }) -- cadence must be a string")),e.t0=C,e.t1=r.cadence,e.t1){e.next=11;break}return e.next=10,j().get("flow.network");case 10:e.t1=e.sent;case 11:return e.t2=e.t1,e.t3="".concat(n,'(opts) -- Required value for "flow.network" not defined in config. See: ',"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration"),(0,e.t0)(e.t2,e.t3),e.t4=C,e.next=17,j().get("accessNode.api");case 17:e.t5=e.sent,e.t6="".concat(n,'(opts) -- Required value for "accessNode.api" not defined in config. See: ',"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/src/exec/query.md#configuration"),(0,e.t4)(e.t5,e.t6);case 20:case"end":return e.stop()}},t)})),ca.apply(this,arguments)}function dl(t){return Hs.apply(this,arguments)}function Hs(){return(Hs=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Ks("mutate",n));case 1:case"end":return r.stop()}},t)}))).apply(this,arguments)}function hl(t){return Ws.apply(this,arguments)}function Ws(){return(Ws=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.abrupt("return",Ks("query",n));case 1:case"end":return r.stop()}},t)}))).apply(this,arguments)}function Sr(){return fa.apply(this,arguments)}function fa(){return fa=x(h.mark(function t(){var n,r=arguments;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,hl(n);case 3:return e.next=5,Ys(n);case 5:return n=e.sent,e.abrupt("return",j().overload(n.dependencies||{},x(h.mark(function a(){return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",Ot([ls(n.cadence),Ze(Fs(n.args||[])),n.limit&&"number"==typeof n.limit&&Xe(n.limit)]).then(Sn));case 1:case"end":return o.stop()}},a)}))));case 7:case"end":return e.stop()}},t)})),fa.apply(this,arguments)}function gl(t,n){return la.apply(this,arguments)}function la(){return la=x(h.mark(function t(n,r){var e,a,o,u,i;return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(null!=n&&null!=r){l.next=2;break}return l.abrupt("return",[]);case 2:return(e=new URL(n)).searchParams.append("code",r),l.next=6,fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}}).then(function(d){return d.json()});case 6:if(a=l.sent,!Array.isArray(a)){l.next=9;break}return l.abrupt("return",a);case 9:if(o=[],Array.isArray(a.authorizations)){u=bt(a.authorizations);try{for(u.s();!(i=u.n()).done;)o.push(O({type:"authz",keyId:a.keyId},i.value))}catch(d){u.e(d)}finally{u.f()}}return null!=a.provider&&o.push(O({type:"authn",id:"wallet-provider#authn"},a.provider)),l.abrupt("return",o);case 13:case"end":return l.stop()}},t)})),la.apply(this,arguments)}function ml(){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return[].concat(K(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]),K(n))}var _n={f_type:"Service",f_vsn:"1.0.0"},Vs={f_type:"Identity",f_vsn:"1.0.0"},vl={f_type:"USER",f_vsn:"1.0.0"},yl={f_type:"PollingResponse",f_vsn:"1.0.0"},pa={f_type:"CompositeSignature",f_vsn:"1.0.0"};function Js(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({old:t},_n),{},{type:"frame",endpoint:t.endpoint,params:t.params||{},data:t.data||{}})}function Xs(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:"back-channel-rpc",endpoint:t.endpoint,method:t.method,params:t.params||{},data:t.data||{}})}function Zs(t){return null==t?null:(null==t.method&&(t=O(O({},t),{},{type:"local-view",method:"VIEW/IFRAME"})),"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type||"local-view",method:t.method,endpoint:t.endpoint,data:t.data||{},params:t.params||{}}))}var bl={"back-channel-rpc":Xs,"pre-authz":function(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type,uid:t.id,endpoint:t.endpoint,method:t.method,identity:O(O({},Vs),{},{address:at(t.addr),keyId:t.keyId}),params:t.params,data:t.data})},authz:function(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type,uid:t.id,endpoint:t.endpoint,method:t.method,identity:O(O({},Vs),{},{address:at(t.addr),keyId:t.keyId}),params:t.params,data:t.data})},authn:function(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},_n),{},{type:t.type,uid:t.id,endpoint:t.authn,id:t.pid,provider:{address:at(t.addr),name:t.name,icon:t.icon}})},frame:Js,"open-id":function(t){return null==t?null:"1.0.0"===t.f_vsn?t:null},"user-signature":function(t){if(null==t)return null;if("1.0.0"===t.f_vsn)return t;throw new Error("Invalid user-signature service")},"local-view":Zs,"account-proof":function(t){if(null==t)return null;if("1.0.0"===t.f_vsn)return t;throw new Error("FCL Normalizer Error: Invalid account-proof service")},"authn-refresh":function(t){if(null==t)return null;if("1.0.0"===t.f_vsn)return t;throw new Error("Invalid authn-refresh service")}};function wl(t,n){try{return bl[t.type](t,n)}catch(r){return console.error("Unrecognized FCL Service Type [".concat(t.type,"]"),t,r),t}}function xl(t){return fn([t.provider.address||t.provider.name||"UNSPECIFIED",t.id]).toString("hex")}function kl(t){return t.addr=t.addr?at(t.addr):null,t.paddr=t.paddr?at(t.paddr):null,t}function El(t,n){return n.find(function(r){return r.type===t})}function $s(t){return da.apply(this,arguments)}function da(){return da=x(h.mark(function t(n){var r,e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n=kl(n),a.t0=ml,a.t1=n.services||[],a.next=5,gl(n.hks,n.code);case 5:return a.t2=a.sent,r=(0,a.t0)(a.t1,a.t2).map(function(o){return wl(o,n)}),e=El("authn",r),a.abrupt("return",O(O({},vl),{},{addr:at(n.addr),cid:xl(e),loggedIn:!0,services:r,expiresAt:n.expires}));case 9:case"end":return a.stop()}},t)})),da.apply(this,arguments)}function Ar(){var n=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find(function(r){return r.type===n})}function Vn(t){var n=new URL(t.endpoint);if(n.searchParams.append("l6n",window.location.origin),null!=t.params)for(var r=0,e=Object.entries(t.params||{});r1&&void 0!==arguments[1]?arguments[1]:{},r=n.method||"POST",e="GET"===r?void 0:JSON.stringify(n.data||t.data||{});return fetch(Vn(t),{method:r,headers:O(O(O({},t.headers||{}),n.headers||{}),{},{"Content-Type":"application/json"}),body:e}).then(function(a){return a.json()})}function Zt(t){var n,r;return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},yl),{},{status:null!==(n=t.status)&&void 0!==n?n:"APPROVED",reason:null!==(r=t.reason)&&void 0!==r?r:null,data:t.compositeSignature||t.data||O({},t)||{},updates:Xs(t.authorizationUpdates),local:Js((t.local||[])[0])})}var ti={"HTTP/GET":"GET","HTTP/POST":"POST"},Il=function(t){return C(ti[t.method],"Invalid Service Method for type back-channel-rpc",{service:t}),ti[t.method]};function ni(t){return ha.apply(this,arguments)}function ha(){return ha=x(h.mark(function t(n){var r,e,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(r=a.length>1&&void 0!==a[1]?a[1]:function(){return!0},C(n,"Missing Polling Service",{service:n}),r()){o.next=4;break}throw new Error("Externally Halted");case 4:return o.next=6,Qs(n,{method:Il(n)}).then(Zt);case 6:o.t0=(e=o.sent).status,o.next="APPROVED"===o.t0?10:"DECLINED"===o.t0?11:12;break;case 10:return o.abrupt("return",e.data);case 11:throw new Error("Declined: ".concat(e.reason||"No reason supplied."));case 12:return o.next=14,new Promise(function(u){return setTimeout(u,500)});case 14:return o.abrupt("return",ni(e.updates,r));case 15:case"end":return o.stop()}},t)})),ha.apply(this,arguments)}var Rr="FCL_IFRAME";function ri(t){C(!document.getElementById(Rr),"Attempt at triggering multiple Frames",{src:t});var n=document.createElement("iframe");return n.src=t,n.id=Rr,n.allow="usb *; hid *",n.frameBorder="0",n.style.cssText="\n position:fixed;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n height: 100%;\n width: 100vw;\n display:block;\n background:rgba(0,0,0,0.25);\n z-index: 2147483647;\n box-sizing: border-box;\n color-scheme: light;\n",document.body.append(n),[n.contentWindow,function(){document.getElementById(Rr)&&document.getElementById(Rr).remove()}]}var Dt=null,ei=null;function ai(t){var n;return null==Dt||null!==(n=Dt)&&void 0!==n&&n.closed?Dt=function(r,e,a,o,u){var i=a.top.outerHeight/2+a.top.screenY-385,c=a.top.outerWidth/2+a.top.screenX-320,l=a.open(r,"FCL_POP","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(640,", height=").concat(770,", top=").concat(i,", left=").concat(c));if(!l)throw new Error("Popup failed to open (was it blocked by a popup blocker?)");return l}(t,0,window):(ei!==t&&Dt.location.replace(t),Dt.focus()),ei=t,[Dt,function(){Dt&&!Dt.closed&&Dt.close(),Dt=null}]}var Gt=null,oi=null;function ui(t){var n;if(null==Gt||null!==(n=Gt)&&void 0!==n&&n.closed){if(!(Gt=window.open(t,"_blank")))throw new Error("Tab failed to open (was it blocked by the browser?)")}else oi!==t&&Gt.location.replace(t),Gt.focus();return oi=t,[Gt,function(){Gt&&!Gt.closed&&Gt.close(),Gt=null}]}var Sl={"VIEW/IFRAME":ri,"VIEW/POP":ai,"VIEW/TAB":ui};function Al(t){return ga.apply(this,arguments)}function ga(){return ga=x(h.mark(function t(n){var r,e=arguments;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=e.length>1&&void 0!==e[1]?e[1]:{},a.prev=1,a.abrupt("return",Sl[n.method](Vn(n),r));case 5:throw a.prev=5,a.t0=a.catch(1),console.error("execLocal({service, opts = {}})",a.t0,{service:n,opts:r}),a.t0;case 9:case"end":return a.stop()}},t,null,[[1,5]])})),ga.apply(this,arguments)}function si(t){return ma.apply(this,arguments)}function ma(){return ma=x(h.mark(function t(n){var r,e,a,o,u,c,l,d;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return r=n.service,e=n.body,a=n.config,g.next=3,Qs(r,{data:O({fclVersion:Ut,service:{params:r.params,data:r.data,type:r.type},config:a},e)}).then(Zt);case 3:if("APPROVED"!==(o=g.sent).status){g.next=8;break}return g.abrupt("return",o.data);case 8:if("DECLINED"!==o.status){g.next=12;break}throw new Error("Declined: ".concat(o.reason||"No reason supplied."));case 12:if("REDIRECT"!==o.status){g.next=16;break}return g.abrupt("return",o);case 16:if("PENDING"!==o.status){g.next=28;break}return u=!0,g.next=20,Al(Zs(o.local));case 20:return c=Lt(g.sent,2),l=c[1],d=function(){try{l(),u=!1}catch(v){console.error("Frame Close Error",v)}},g.abrupt("return",ni(o.updates,function(){return u}).then(function(v){return d(),v}).catch(function(v){throw console.error(v),d(),v}));case 28:throw console.error("Auto Decline: Invalid Response",{service:r,resp:o}),new Error("Auto Decline: Invalid Response");case 30:case"end":return g.stop()}},t)})),ma.apply(this,arguments)}var ii="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",Rl=ii.length;function va(){for(var t="",n=32;n--;)t+=ii[Math.random()*Rl|0];return t}var wa,Jn,ci,xa,_r="FCL:VIEW:CLOSE",ya="FCL:VIEW:READY",ba="FCL:VIEW:RESPONSE",ft=function(t){return"string"==typeof t&&t.toLowerCase()},_l=new Set(["monetizationstart","monetizationpending","monetizationprogress","monetizationstop"]),dn=function(t,n){return console.warn("DEPRECATION NOTICE","Received ".concat(t,", please use ").concat(n," for this and future versions of FCL"))},Tr=function(t){var n=t.close,r=t.send,e=t.onReady,a=t.onResponse,o=t.onMessage;return function(u){try{if("object"!==z(u.data)||_l.has(u.data.type))return;ft(u.data.type)===ft(_r)&&n(),ft(u.data.type)===ft(ya)&&e(u,{send:r,close:n}),ft(u.data.type)===ft(ba)&&a(u,{send:r,close:n}),o(u,{send:r,close:n}),ft(u.data.type)===ft("FCL:FRAME:READY")&&(dn(u.data.type,ya),e(u,{send:r,close:n})),ft(u.data.type)===ft("FCL:FRAME:RESPONSE")&&(dn(u.data.type,ba),a(u,{send:r,close:n})),ft(u.data.type)===ft("FCL:FRAME:CLOSE")&&(dn(u.data.type,_r),n()),ft(u.data.type)===ft("FCL::CHALLENGE::RESPONSE")&&(dn(u.data.type,ba),a(u,{send:r,close:n})),ft(u.data.type)===ft("FCL::AUTHZ_READY")&&(dn(u.data.type,ya),e(u,{send:r,close:n})),ft(u.data.type)===ft("FCL::CHALLENGE::CANCEL")&&(dn(u.data.type,_r),n()),ft(u.data.type)===ft("FCL::CANCEL")&&(dn(u.data.type,_r),n())}catch(i){console.error("Frame Callback Error",i),n()}}},Tn=function(){},Cn=function(){},On=function(){},Pn=function(){},fi={"HTTP/RPC":si,"HTTP/POST":si,"IFRAME/RPC":function(t){var n=t.service,r=t.body,e=t.config,a=t.opts;return new Promise(function(o,u){var i=va(),c=a.includeOlderJsonRpcCall;!function(l){var d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==l)return{send:Tn,close:Tn};var g=d.onClose||Tn,E=Tr({close:R,send:L,onReady:d.onReady||Tn,onResponse:d.onResponse||Tn,onMessage:d.onMessage||Tn});window.addEventListener("message",E);var S=Lt(ri(Vn(l)),2),N=S[0],T=S[1];return{send:L,close:R};function R(){try{window.removeEventListener("message",E),T(),g()}catch(I){console.error("Frame Close Error",I)}}function L(I){try{N.postMessage(JSON.parse(JSON.stringify(I||{})),"*")}catch(W){console.error("Frame Send Error",I,W)}}}(n,{onReady:function(l,d){return x(h.mark(function g(){var v;return h.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:v=d.send,m.prev=1,v({type:"FCL:VIEW:READY:RESPONSE",fclVersion:Ut,body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),v({fclVersion:Ut,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),c&&v({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params],deprecated:{message:"jsonrpc is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),m.next=10;break;case 7:throw m.prev=7,m.t0=m.catch(1),m.t0;case 10:case"end":return m.stop()}},g,null,[[1,7]])}))()},onResponse:function(l,d){var g=d.close;try{if("object"!==z(l.data))return;var v=Zt(l.data);switch(v.status){case"APPROVED":o(v.data),g();break;case"DECLINED":u("Declined: ".concat(v.reason||"No reason supplied")),g();break;case"REDIRECT":o(v),g();break;default:u("Declined: No reason supplied"),g()}}catch(m){throw console.error("execIframeRPC onResponse error",m),m}},onMessage:function(l,d){var g=d.close;try{if("object"!==z(l.data)||"2.0"!==l.data.jsonrpc||l.data.id!==i)return;var v=Zt(l.data.result);switch(v.status){case"APPROVED":o(v.data),g();break;case"DECLINED":u("Declined: ".concat(v.reason||"No reason supplied")),g();break;case"REDIRECT":o(v),g();break;default:u("Declined: No reason supplied"),g()}}catch(m){throw console.error("execIframeRPC onMessage error",m),m}},onClose:function(){u("Declined: Externally Halted")}})})},"POP/RPC":function(t){var n=t.service,r=t.body,e=t.config,a=t.opts;return new Promise(function(o,u){var i=va(),c=a.redir,l=a.includeOlderJsonRpcCall;!function(d){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==d)return{send:Cn,close:Cn};var v=g.onClose||Cn,S=Tr({close:I,send:W,onReady:g.onReady||Cn,onResponse:g.onResponse||Cn,onMessage:g.onMessage||Cn});window.addEventListener("message",S);var N=Lt(ai(Vn(d)),2),T=N[0],R=N[1],L=setInterval(function(){T&&T.closed&&I()},500);return{send:W,close:I};function I(){try{window.removeEventListener("message",S),clearInterval(L),R(),v()}catch(lt){console.error("Popup Close Error",lt)}}function W(lt){try{T.postMessage(JSON.parse(JSON.stringify(lt||{})),"*")}catch(It){console.error("Popup Send Error",lt,It)}}}(n,{onReady:function(d,g){return x(h.mark(function v(){var m;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:m=g.send,b.prev=1,m({fclVersion:Ut,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),m({fclVersion:Ut,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),l&&m({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]}),b.next=10;break;case 7:throw b.prev=7,b.t0=b.catch(1),b.t0;case 10:case"end":return b.stop()}},v,null,[[1,7]])}))()},onResponse:function(d,g){var v=g.close;try{if("object"!==z(d.data))return;var m=Zt(d.data);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onResponse error",b),b}},onMessage:function(d,g){var v=g.close;try{if("object"!==z(d.data)||"2.0"!==d.data.jsonrpc||d.data.id!==i)return;var m=Zt(d.data.result);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onMessage error",b),b}},onClose:function(){u("Declined: Externally Halted")}})})},"TAB/RPC":function(t){var n=t.service,r=t.body,e=t.config,a=t.opts;return new Promise(function(o,u){var i=va(),c=a.redir,l=a.includeOlderJsonRpcCall;!function(d){var g=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==d)return{send:On,close:On};var v=g.onClose||On,S=Tr({close:I,send:W,onReady:g.onReady||On,onResponse:g.onResponse||On,onMessage:g.onMessage||On});window.addEventListener("message",S);var N=Lt(ui(Vn(d)),2),T=N[0],R=N[1],L=setInterval(function(){T&&T.closed&&I()},500);return{send:W,close:I};function I(){try{window.removeEventListener("message",S),clearInterval(L),R(),v()}catch(lt){console.error("Tab Close Error",lt)}}function W(lt){try{T.postMessage(JSON.parse(JSON.stringify(lt||{})),"*")}catch(It){console.error("Tab Send Error",lt,It)}}}(n,{onReady:function(d,g){return x(h.mark(function v(){var m;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:m=g.send,b.prev=1,m({fclVersion:Ut,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),m({fclVersion:Ut,type:"FCL:FRAME:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e,deprecated:{message:"FCL:FRAME:READY:RESPONSE is deprecated and replaced with type: FCL:VIEW:READY:RESPONSE"}}),l&&m({jsonrpc:"2.0",id:i,method:"fcl:sign",params:[r,n.params]}),b.next=10;break;case 7:throw b.prev=7,b.t0=b.catch(1),b.t0;case 10:case"end":return b.stop()}},v,null,[[1,7]])}))()},onResponse:function(d,g){var v=g.close;try{if("object"!==z(d.data))return;var m=Zt(d.data);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onResponse error",b),b}},onMessage:function(d,g){var v=g.close;try{if("object"!==z(d.data)||"2.0"!==d.data.jsonrpc||d.data.id!==i)return;var m=Zt(d.data.result);switch(m.status){case"APPROVED":o(m.data),!c&&v();break;case"DECLINED":u("Declined: ".concat(m.reason||"No reason supplied")),v();break;case"REDIRECT":o(m),v();break;default:u("Declined: No reason supplied"),v()}}catch(b){throw console.error("execPopRPC onMessage error",b),b}},onClose:function(){u("Declined: Externally Halted")}})})},"EXT/RPC":function(t){var n=t.service,r=t.body,e=t.config;return new Promise(function(a,o){!function(u){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==u)return{send:Pn,close:Pn};var c=i.onClose||Pn,v=Tr({close:m,send:b,onReady:i.onReady||Pn,onResponse:i.onResponse||Pn,onMessage:i.onMessage||Pn});return window.addEventListener("message",v),b({service:u}),{send:b,close:m};function m(){try{window.removeEventListener("message",v),c()}catch(E){console.error("Ext Close Error",E)}}function b(E){try{window&&window.postMessage(JSON.parse(JSON.stringify(E||{})),"*")}catch(S){console.error("Ext Send Error",E,S)}}}(n,{onReady:function(u,i){return x(h.mark(function c(){var l;return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:l=i.send,d.prev=1,l({fclVersion:Ut,type:"FCL:VIEW:READY:RESPONSE",body:r,service:{params:n.params,data:n.data,type:n.type},config:e}),d.next=8;break;case 5:throw d.prev=5,d.t0=d.catch(1),d.t0;case 8:case"end":return d.stop()}},c,null,[[1,5]])}))()},onResponse:function(u,i){var c=i.close;try{if("object"!==z(u.data))return;var l=Zt(u.data);switch(l.status){case"APPROVED":a(l.data),c();break;case"DECLINED":o("Declined: ".concat(l.reason||"No reason supplied")),c();break;case"REDIRECT":a(l),c();break;default:o("Declined: No reason supplied"),c()}}catch(d){throw console.error("execExtRPC onResponse error",d),d}},onClose:function(){o("Declined: Externally Halted")}})})}},Tl=["ServicePlugin"],Cl=["discovery-service"],Xn=(wa=new Set,Jn=new Map(Object.entries(fi)),ci=function(t){return wa=new Set(K(t))},Object.freeze({add:function(t){if(C(Cl.includes(t.type),"Service Plugin type ".concat(t.type," is not supported")),"discovery-service"===t.type){var n=function(a){var o=a.services,u=a.serviceStrategy;C(Array.isArray(o)&&o.length,"Array of Discovery Services is required");var i,c=bt(o);try{for(c.s();!(i=c.n()).done;){var l=i.value;C(Xt(l.f_type)&&"Service"===l.f_type,"Service is required"),C(Xt(l.type)&&"authn"===l.type,"Service must be type authn. Received ".concat(l.type)),C(l.method in fi||u.method===l.method,"Service method ".concat(l.method," is not supported"))}}catch(d){c.e(d)}finally{c.f()}return C(Xt(u),"Service strategy is required"),C(Xt(u.method)&&An(u.method),"Service strategy method is required"),C(Xt(u.exec)&&gs(u.exec),"Service strategy exec function is required"),{discoveryServices:o,serviceStrategy:u}}(t),e=n.serviceStrategy;ci(n.discoveryServices),Jn.has(e.method)?wt({title:"Add Service Plugin",message:"Service strategy for ".concat(e.method," already exists"),level:St.warn}):Jn.set(e.method,e.exec)}},getServices:function(){return K(wa)},getStrategy:function(t){return Jn.get(t)},getStrategies:function(){return K(Jn.keys())}})),Ol=(xa=new Map,Object.freeze({add:function(t){var n,r=function(o){var u;C(o,"No plugins supplied");var i,c=bt(u=Array.isArray(o)?K(o):[o]);try{for(c.s();!(i=c.n()).done;){var l=i.value;C(Xt(l.name),"Plugin name is required"),C(Xt(l.f_type),"Plugin f_type is required"),C(Tl.includes(l.f_type),"Plugin type ".concat(l.f_type," is not supported"))}}catch(d){c.e(d)}finally{c.f()}return u}(t),e=bt(r);try{for(e.s();!(n=e.n()).done;){var a=n.value;xa.set(a.name,a),"ServicePlugin"===a.f_type&&Xn.add(a)}}catch(o){e.e(o)}finally{e.f()}},getPlugins:function(){return xa}})),Pl=function(){var t=x(h.mark(function n(r){var e,a,o,u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return a=r.body,o=r.config,u=r.opts,i=Xn.getStrategy((e=r.service).method),c.abrupt("return",i({service:e,body:a,config:o,opts:u}));case 3:case"end":return c.stop()}},n)}));return function(n){return t.apply(this,arguments)}}();function hn(t){return ka.apply(this,arguments)}function ka(){return ka=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return l=void 0===(c=n.config)?{}:c,g=void 0===(d=n.opts)?{}:d,(i=void 0===(u=n.msg)?{}:u).data=(o=n.service).data,b.next=4,xo(/^service\./);case 4:return b.t0=b.sent,b.next=7,xo(/^app\.detail\./);case 7:return b.t1=b.sent,b.t2=O(O({},l.client),{},{fclVersion:Ut,fclLibrary:"https://github.com/onflow/fcl-js",hostname:null!==(r=null===(e=window)||void 0===e||null===(a=e.location)||void 0===a?void 0:a.hostname)&&void 0!==r?r:null}),v={services:b.t0,app:b.t1,client:b.t2},b.prev=10,b.next=13,Pl({service:o,body:i,config:v,opts:g});case 13:if("REDIRECT"!==(m=b.sent).status){b.next=21;break}return C(o.type===m.data.type,"Cannot shift recursive service type in execService"),b.next=18,hn({service:m.data,msg:i,config:v,opts:g});case 18:return b.abrupt("return",b.sent);case 21:return b.abrupt("return",m);case 22:b.next=28;break;case 24:throw b.prev=24,b.t3=b.catch(10),wt({title:"Error on execService ".concat(null==o?void 0:o.type),message:b.t3,level:St.error}),b.t3;case 28:case"end":return b.stop()}},t,null,[[10,24]])})),ka.apply(this,arguments)}function Ea(t){return null==t?null:"1.0.0"===t.f_vsn?t:O(O({},pa),{},{addr:Z(t.addr||t.address),signature:t.signature||t.sig,keyId:t.keyId})}var Nn,li=function(){var t=x(h.mark(function n(){var r,e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=(null===(r=window)||void 0===r?void 0:r.fcl_extensions)||[],a.abrupt("return",[].concat(K(e),K(Xn.getServices())));case 2:case"end":return a.stop()}},n)}));return function(){return t.apply(this,arguments)}}();function Nl(t){return pi.apply(this,arguments)}function pi(){return(pi=x(h.mark(function t(n){var r,e,a,o,u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,j.get("discovery.authn.include",[]);case 2:return e=i.sent,i.next=5,j.first(["discovery.wallet.method","discovery.wallet.method.default"]);case 5:if(a=i.sent,o=null!=n&&n.method?n.method:a,null===(r=null==n?void 0:n.endpoint)||void 0===r){i.next=11;break}i.t0=r,i.next=14;break;case 11:return i.next=13,j.first(["discovery.wallet","challenge.handshake"]);case 13:i.t0=i.sent;case 14:return C(u=i.t0,'\n If no service is passed to "authenticate," then "discovery.wallet" must be defined in fcl config.\n See: "https://docs.onflow.org/fcl/reference/api/#setting-configuration-values"\n '),i.abrupt("return",O(O({},n),{},{type:"authn",endpoint:u,method:o,discoveryAuthnInclude:e}));case 17:case"end":return i.stop()}},t)}))).apply(this,arguments)}function Bl(t){return Ia.apply(this,arguments)}function Ia(){return Ia=x(h.mark(function t(n){var r,e,a,o,u,i;return h.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:return a=n.types,c.next=3,j.get("discovery.authn.endpoint");case 3:return o=c.sent,C(Boolean(o),'"discovery.authn.endpoint" in config must be defined.'),c.next=7,j.get("discovery.authn.include",[]);case 7:return u=c.sent,i=new URL(o),c.t0=fetch,c.t1=i,c.t2={"Content-Type":"application/json"},c.t3=JSON,c.t4=a,c.t5=Ut,c.t6=u,c.next=18,li();case 18:return c.t7=c.sent,c.t8=Xn.getStrategies(),c.t9=null===(r=window)||void 0===r||null===(e=r.navigator)||void 0===e?void 0:e.userAgent,c.t10={type:c.t4,fclVersion:c.t5,include:c.t6,clientServices:c.t7,supportedStrategies:c.t8,userAgent:c.t9},c.t11=c.t3.stringify.call(c.t3,c.t10),c.t12={method:"POST",headers:c.t2,body:c.t11},c.abrupt("return",(0,c.t0)(c.t1,c.t12).then(function(l){return l.json()}));case 25:case"end":return c.stop()}},t)})),Ia.apply(this,arguments)}var di,hi,gn,Zn="authn",gi="UPDATED",mi="UPDATE_RESULTS",Sa=function(){var t=x(h.mark(function n(){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,Bl({types:[Zn]});case 3:dt(Zn,mi,{results:e.sent}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),wt({title:"".concat(e.t0.name," Error fetching Discovery API services."),message:e.t0.message,level:St.error});case 10:case"end":return e.stop()}},n,null,[[0,7]])}));return function(){return t.apply(this,arguments)}}(),Ul=(q(Nn={},Nr,(hi=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:typeof window>"u"&&console.warn("\n %cFCL Warning\n ============================\n ".concat('"fcl.discovery" is only available in the browser.',"\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n "),"font-weight:bold;font-family:monospace;"),"complete"===document.readyState?Sa():window.onload=x(h.mark(function o(){return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:Sa();case 1:case"end":return u.stop()}},o)}));case 2:case"end":return r.stop()}},t)})),function(t){return hi.apply(this,arguments)})),q(Nn,mi,function(t,n,r){t.merge(r),t.broadcast(gi,O({},t.all()))}),q(Nn,cn,function(t,n){t.subscribe(n.from),t.send(n.from,gi,O({},t.all()))}),q(Nn,nn,function(t,n){return t.unsubscribe(n.from)}),q(Nn,"SNAPSHOT",(di=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.reply(O({},n.all())));case 1:case"end":return e.stop()}},t)})),function(t,n){return di.apply(this,arguments)})),Nn),vi=function(){return rn(Ul,Zn)},Fl={authn:{subscribe:function(t){return ur(Zn,vi,t)},snapshot:function(){return ro(Zn,vi)},update:function(){return Sa()}}};function Dl(){return typeof navigator<"u"&&/android/i.test(navigator.userAgent)||function jl(){return typeof navigator<"u"&&/iPhone|iPod/.test(navigator.userAgent)||typeof navigator<"u"&&/iPad/.test(navigator.userAgent)}()}var yi,bi,Gl=function(t){return"function"==typeof t},Mt="CURRENT_USER",Aa="CURRENT_USER/UPDATED",wi="SNAPSHOT",Ra="SET_CURRENT_USER",xi="DEL_CURRENT_USER",_a='{\n "f_type": "User",\n "f_vsn": "1.0.0",\n "addr":null,\n "cid":null,\n "loggedIn":null,\n "expiresAt":null,\n "services":[]\n}',Ml=function(){var t=x(h.mark(function n(r){var e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return e=JSON.parse(_a),o.next=3,r.get(Mt);case 3:if(null==(a=o.sent)||e.f_vsn===a.f_vsn){o.next=7;break}return r.removeItem(Mt),o.abrupt("return",e);case 7:return o.abrupt("return",a||e);case 8:case"end":return o.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),zl=(q(gn={},Nr,function(){var t=x(h.mark(function n(r){var e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return typeof window>"u"&&console.warn('\n %cFCL Warning\n ============================\n "currentUser" is only available in the browser.\n For more info, please see the docs: https://docs.onflow.org/fcl/\n ============================\n ',"font-weight:bold;font-family:monospace;"),r.merge(JSON.parse(_a)),o.next=4,j.first(["fcl.storage","fcl.storage.default"]);case 4:if(!(e=o.sent).can){o.next=10;break}return o.next=8,Ml(e);case 8:Yl(a=o.sent)&&r.merge(a);case 10:case"end":return o.stop()}},n)}));return function(n){return t.apply(this,arguments)}}()),q(gn,cn,function(t,n){t.subscribe(n.from),t.send(n.from,Aa,O({},t.all()))}),q(gn,nn,function(t,n){t.unsubscribe(n.from)}),q(gn,wi,(bi=x(h.mark(function t(n,r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.reply(O({},n.all()));case 1:case"end":return e.stop()}},t)})),function(t,n){return bi.apply(this,arguments)})),q(gn,Ra,function(){var t=x(h.mark(function n(r,e,a){var o;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return r.merge(a),u.next=3,j.first(["fcl.storage","fcl.storage.default"]);case 3:(o=u.sent).can&&o.put(Mt,r.all()),r.broadcast(Aa,O({},r.all()));case 6:case"end":return u.stop()}},n)}));return function(n,r,e){return t.apply(this,arguments)}}()),q(gn,xi,(yi=x(h.mark(function t(n,r){var e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return n.merge(JSON.parse(_a)),a.next=3,j.first(["fcl.storage","fcl.storage.default"]);case 3:(e=a.sent).can&&e.put(Mt,n.all()),n.broadcast(Aa,O({},n.all()));case 6:case"end":return a.stop()}},t)})),function(t,n){return yi.apply(this,arguments)})),gn),Bn=function(){return rn(zl,Mt)};function Yl(t){return null==t.expiresAt||0===t.expiresAt||t.expiresAt>Date.now()}function ql(){return ki.apply(this,arguments)}function ki(){return(ki=x(h.mark(function t(){var n,r;return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j.get("fcl.accountProof.resolver");case 2:if(Gl(n=e.sent)){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,n();case 7:if(null!=(r=e.sent)){e.next=10;break}return e.abrupt("return");case 10:return C("string"==typeof r.appIdentifier,"appIdentifier must be a string"),C(/^[0-9a-f]+$/i.test(r.nonce),"Nonce must be a hex string"),e.abrupt("return",r);case 13:case"end":return e.stop()}},t)}))).apply(this,arguments)}var Kl=function(){var t=x(h.mark(function n(r){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.t0=r.discoveryAuthnInclude,a.next=4,li();case 4:return a.t1=a.sent,a.t2=Xn.getStrategies(),a.t3={discoveryAuthnInclude:a.t0,clientServices:a.t1,supportedStrategies:a.t2},a.abrupt("return",{client:a.t3});case 8:case"end":return a.stop()}},n)}));return function(n){return t.apply(this,arguments)}}();function $n(){return Ta.apply(this,arguments)}function Ta(){return Ta=x(h.mark(function t(){var n,r,e,a,o,u,i,c=arguments;return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(u=void 0!==(o=(e=c.length>0&&void 0!==c[0]?c[0]:{}).redir)&&o,!(a=e.service)||null!=a&&null!==(n=a.provider)&&void 0!==n&&n.is_installed||null==a||null===(r=a.provider)||void 0===r||!r.requires_install){l.next=4;break}return window.location.href=null==a||null===(i=a.provider)||void 0===i?void 0:i.install_link,l.abrupt("return");case 4:return l.abrupt("return",new Promise(function(){var d=x(h.mark(function g(v,m){var b,E,S,N,T,R,L;return h.wrap(function(I){for(;;)switch(I.prev=I.next){case 0:return Bn(),b={redir:u},I.next=4,Qn();case 4:return E=I.sent,I.next=7,Nl(a);case 7:return S=I.sent,N=Ar(E.services,"authn-refresh"),I.prev=9,I.next=12,ql();case 12:T=I.sent,I.next=19;break;case 15:return I.prev=15,I.t0=I.catch(9),console.error("Error During Authentication: Could not resolve account proof data.\n ".concat(I.t0)),I.abrupt("return",m(I.t0));case 19:if(!E.loggedIn){I.next=47;break}if(!N){I.next=46;break}return I.prev=21,I.next=24,hn({service:N,msg:T,opts:b});case 24:return R=I.sent,I.t1=dt,I.t2=Mt,I.t3=Ra,I.next=30,$s(R);case 30:I.t4=I.sent,(0,I.t1)(I.t2,I.t3,I.t4),I.next=37;break;case 34:I.prev=34,I.t5=I.catch(21),console.error("Error: Could not refresh authentication.",I.t5);case 37:return I.prev=37,I.t6=v,I.next=41,Qn();case 41:return I.t7=I.sent,I.abrupt("return",(0,I.t6)(I.t7));case 44:I.next=47;break;case 46:return I.abrupt("return",v(E));case 47:return I.prev=47,I.t8=hn,I.t9=S,I.t10=T,I.next=53,Kl(S);case 53:return I.t11=I.sent,I.t12=b,I.t13={service:I.t9,msg:I.t10,config:I.t11,opts:I.t12},I.next=58,(0,I.t8)(I.t13);case 58:return L=I.sent,I.t14=dt,I.t15=Mt,I.t16=Ra,I.next=64,$s(L);case 64:I.t17=I.sent,(0,I.t14)(I.t15,I.t16,I.t17),I.next=71;break;case 68:I.prev=68,I.t18=I.catch(47),console.error("Error while authenticating",I.t18);case 71:return I.prev=71,I.t19=v,I.next=75,Qn();case 75:return I.t20=I.sent,(0,I.t19)(I.t20),I.finish(71);case 78:case"end":return I.stop()}},g,null,[[9,15],[21,34,37,44],[47,68,71,78]])}));return function(g,v){return d.apply(this,arguments)}}()));case 5:case"end":return l.stop()}},t)})),Ta.apply(this,arguments)}function Ei(){Bn(),dt(Mt,xi)}function Hl(t){var d,n={f_type:"PreAuthzResponse",f_vsn:"1.0.0",proposer:((d=t)||{}).proposer,payer:(d||{}).payer||[],authorization:(d||{}).authorization||[]},r=[];null!=n.proposer&&r.push(["PROPOSER",n.proposer]);var e,a=bt(n.payer||[]);try{for(a.s();!(e=a.n()).done;)r.push(["PAYER",e.value])}catch(d){a.e(d)}finally{a.f()}var u,i=bt(n.authorization||[]);try{for(i.s();!(u=i.n()).done;)r.push(["AUTHORIZER",u.value])}catch(d){i.e(d)}finally{i.f()}var l=r.map(function(d){var g=Lt(d,2),v=g[0],m=g[1];return{tempId:[m.identity.address,m.identity.keyId].join("|"),addr:m.identity.address,keyId:m.identity.keyId,signingFunction:function(b){return hn({service:m,msg:b})},role:{proposer:"PROPOSER"===v,payer:"PAYER"===v,authorizer:"AUTHORIZER"===v}}});return l}function Ii(t){return Ca.apply(this,arguments)}function Ca(){return Ca=x(h.mark(function t(n){return h.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return Bn(),r.abrupt("return",O(O({},n),{},{tempId:"CURRENT_USER",resolve:function(e,a){return x(h.mark(function o(){var u,i,c,l;return h.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=2,$n({redir:!0});case 2:if(i=Ar((u=d.sent).services,"authz"),!(c=Ar(u.services,"pre-authz"))){d.next=11;break}return d.t0=Hl,d.next=9,hn({service:c,msg:a});case 9:return d.t1=d.sent,d.abrupt("return",(0,d.t0)(d.t1));case 11:if(!i){d.next=14;break}return Dl()&&"WC/RPC"===i.method&&(l=window.open("","_blank")),d.abrupt("return",O(O({},e),{},{tempId:"CURRENT_USER",resolve:null,addr:Z(i.identity.address),keyId:i.identity.keyId,sequenceNum:null,signature:null,signingFunction:function(g){return x(h.mark(function v(){return h.wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.t0=Ea,m.next=3,hn({service:i,msg:g,opts:{includeOlderJsonRpcCall:!0,windowRef:l}});case 3:return m.t1=m.sent,m.abrupt("return",(0,m.t0)(m.t1));case 5:case"end":return m.stop()}},v)}))()}}));case 14:throw new Error("No Authz or PreAuthz Service configured for CURRENT_USER");case 15:case"end":return d.stop()}},o)}))()}}));case 2:case"end":return r.stop()}},t)})),Ca.apply(this,arguments)}function Si(t){Bn();var e,n="@EXIT",r=rn((e=x(h.mark(function a(o){var u;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:o.send(Mt,cn);case 1:return i.next=4,o.receive();case 4:if((u=i.sent).tag!==n){i.next=8;break}return o.send(Mt,nn),i.abrupt("return");case 8:t(u.data),i.next=1;break;case 11:case"end":return i.stop()}},a)})),function(a){return e.apply(this,arguments)}));return function(){return dt(r,n)}}function Qn(){return Bn(),dt(Mt,wi,null,{expectReply:!0,timeout:0})}function Ai(){return Ri.apply(this,arguments)}function Ri(){return(Ri=x(h.mark(function t(){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$n();case 2:return e.abrupt("return",$e(at(e.sent.addr),Bs));case 5:case"end":return e.stop()}},t)}))).apply(this,arguments)}var Wl=function(t){return C(/^[0-9a-f]+$/i.test(t),"Message must be a hex string"),{message:t}};function _i(t){return Oa.apply(this,arguments)}function Oa(){return Oa=x(h.mark(function t(n){var e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return Bn(),o.next=3,$n({redir:!0});case 3:return C(e=Ar(o.sent.services,"user-signature"),"Current user must have authorized a signing service."),o.prev=6,o.next=9,hn({service:e,msg:Wl(n)});case 9:if(a=o.sent,!Array.isArray(a)){o.next=14;break}return o.abrupt("return",a.map(function(u){return Ea(u)}));case 14:return o.abrupt("return",[Ea(a)]);case 15:o.next=20;break;case 17:return o.prev=17,o.t0=o.catch(6),o.abrupt("return",o.t0);case 20:case"end":return o.stop()}},t,null,[[6,17]])})),Oa.apply(this,arguments)}var xt=function(){return{authenticate:$n,unauthenticate:Ei,authorization:Ii,signUserMessage:_i,subscribe:Si,snapshot:Qn,resolveArgument:Ai}};function Pa(){return Pa=x(h.mark(function t(){var n,r,e,a=arguments;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return n=a.length>0&&void 0!==a[0]?a[0]:{},o.prev=1,o.next=4,dl(n);case 4:return o.next=6,Ys(n);case 6:return n=o.sent,o.next=9,j().get("fcl.authz",xt().authorization);case 9:return e=o.sent,r=j().overload(n.dependencies||{},x(h.mark(function u(){return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return i.abrupt("return",Ot([ps(n.cadence),Ze(Fs(n.args||[])),n.limit&&_f(n.limit)&&Xe(n.limit),is(n.proposer||n.authz||e),cs(n.payer||n.authz||e),os(n.authorizations||[n.authz||e])]).then(Sn));case 1:case"end":return i.stop()}},u)}))),o.abrupt("return",r);case 14:throw o.prev=14,o.t0=o.catch(1),o.t0;case 17:case"end":return o.stop()}},t,null,[[1,14]])})),Pa.apply(this,arguments)}xt.authenticate=$n,xt.unauthenticate=Ei,xt.authorization=Ii,xt.signUserMessage=_i,xt.subscribe=Si,xt.snapshot=Qn,xt.resolveArgument=Ai;var Ti=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},r=function(a){var o;return a.deprecated&&console.warn("DEPRECATION NOTICE",a.deprecated.message),null==a||null===(o=a.body)||void 0===o||delete o.interaction,a},e=function(a){var o=a.data;"object"===z(o)&&null!=z(o)&&o.type===t&&n(r(o))};return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}},Ln=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(window.location!==window.parent.location)window.parent.postMessage(O(O({},n),{},{type:t}),"*");else{if(!window.opener)throw new Error("Unable to communicate with parent FCL instance");window.opener.postMessage(O(O({},n),{},{type:t}),"*")}},Vl=function(t,n){return X.Buffer.from(t.padEnd(2*n,"0"),"hex")},Ci=function(t){return X.Buffer.from(t.padStart(16,"0"),"hex")},Oi=function(t){return X.Buffer.from(t,"hex")},Pi=function(t){var n=t.address,r=t.nonce,e=t.appIdentifier,a=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];C(n,"Encode Message For Provable Authn Error: address must be defined"),C(r,"Encode Message For Provable Authn Error: nonce must be defined"),C(e,"Encode Message For Provable Authn Error: appIdentifier must be defined"),C(r.length>=64,"Encode Message For Provable Authn Error: nonce must be minimum of 32 bytes");var o=Vl(X.Buffer.from("FCL-ACCOUNT-PROOF-V0.0").toString("hex"),32);return a?X.Buffer.concat([o,fn([e,Ci(Z(n)),Oi(r)])]).toString("hex"):fn([e,Ci(Z(n)),Oi(r)]).toString("hex")},Jl=Object.freeze({__proto__:null,sendMsgToFCL:Ln,ready:function(t){Ti("FCL:VIEW:READY:RESPONSE",t),Ln("FCL:VIEW:READY")},close:function(){Ln("FCL:VIEW:CLOSE")},approve:function(t){Ln("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"APPROVED",reason:null,data:t})},decline:function(t){Ln("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"DECLINED",reason:t,data:null})},redirect:function(t){Ln("FCL:VIEW:RESPONSE",{f_type:"PollingResponse",f_vsn:"1.0.0",status:"REDIRECT",reason:null,data:t})},onMessageFromFCL:Ti,encodeMessageFromSignable:function(t,n){var r,e,a=(r=t.voucher,(e=new Set(r.authorizers)).add(r.proposalKey.address),e.delete(r.payer),Array.from(e).map(at)),o=Array.from(new Set([t.voucher.payer])).map(at),u=a.includes(at(n)),i=o.includes(at(n));if(!u&&!i)throw new xf(n);var c={cadence:t.voucher.cadence,refBlock:t.voucher.refBlock,computeLimit:t.voucher.computeLimit,arguments:t.voucher.arguments,proposalKey:O(O({},t.voucher.proposalKey),{},{address:Z(t.voucher.proposalKey.address)}),payer:Z(t.voucher.payer),authorizers:t.voucher.authorizers.map(Z),payloadSigs:t.voucher.payloadSigs.map(function(l){return O(O({},l),{},{address:Z(l.address)})})};return u?Cu(c):Ou(c)},CompositeSignature:function(t,n,r){this.f_type=pa.f_type,this.f_vsn=pa.f_vsn,this.addr=at(t),this.keyId=Number(n),this.signature=r},encodeAccountProof:Pi,injectExtService:function(t){"authn"===t.type&&null!=t.endpoint?(Array.isArray(window.fcl_extensions)||(window.fcl_extensions=[]),window.fcl_extensions.push(t)):console.warn("Authn service is required")}}),Xl="ACCOUNT_PROOF",Zl="USER_SIGNATURE",Ni=function(t){if(t.appIdentifier){var r=t.address,e=t.nonce,a=t.signatures;return C(An(t.appIdentifier),"verifyAccountProof({ appIdentifier }) -- appIdentifier must be a string"),C(An(r)&&16===Z(r).length,"verifyAccountProof({ address }) -- address must be a valid address"),C(/^[0-9a-f]+$/i.test(e),"nonce must be a hex string"),C(Array.isArray(a)&&a.every(function(c,l,d){return"CompositeSignature"===c.f_type}),"Must include an Array of CompositeSignatures to verify"),C(a.map(function(c){return c.addr}).every(function(c,l,d){return c===d[0]}),"User signatures to be verified must be from a single account address"),!0}var u=t.address,i=t.compSigs;return C(/^[0-9a-f]+$/i.test(t.message),"Signed message must be a hex string"),C(An(u)&&16===Z(u).length,"verifyUserSignatures({ address }) -- address must be a valid address"),C(Array.isArray(i)&&i.every(function(c,l,d){return"CompositeSignature"===c.f_type}),"Must include an Array of CompositeSignatures to verify"),C(i.map(function(c){return c.addr}).every(function(c,l,d){return c===d[0]}),"User signatures to be verified must be from a single account address"),!0},Bi=function(){var t=x(h.mark(function n(r,e){var a,o;return h.wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return a="ACCOUNT_PROOF"===r?"verifyAccountProofSignatures":"verifyUserSignatures",i.next=3,j.get("flow.network");case 3:if(o=i.sent){i.next=9;break}return i.next=7,j.get("env");case 7:(o=i.sent)&&wt.deprecate({pkg:"FCL",subject:'Using the "env" configuration key for specifying the flow network',message:'Please use "flow.network" instead.',transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/fcl/TRANSITIONS.md#0001-deprecate-env-config-key"});case 9:return C(e.fclCryptoContract||"testnet"===o||"mainnet"===o,"${verifyFunction}({ fclCryptoContract }) -- config.flow.network must be specified (testnet || mainnet) or contract address provided via opts.fclCryptoContract"),i.abrupt("return","\n import FCLCrypto from ".concat(e.fclCryptoContract?e.fclCryptoContract:"testnet"===o?"0x74daa6f9c7ef24b1":"0xb4b82a1c9d21d284","\n\n pub fun main(\n address: Address, \n message: String, \n keyIndices: [Int], \n signatures: [String]\n ): Bool {\n return FCLCrypto.").concat(a,"(address: address, message: message, keyIndices: keyIndices, signatures: signatures)\n }\n "));case 12:case"end":return i.stop()}},n)}));return function(n,r){return t.apply(this,arguments)}}();function Na(){return Na=x(h.mark(function t(n,r){var e,a,o,u,i,c,l,d,g,v,m=arguments;return h.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:u=m.length>2&&void 0!==m[2]?m[2]:{},Ni({appIdentifier:n,address:e=r.address,nonce:a=r.nonce,signatures:o=r.signatures}),i=Pi({address:e,nonce:a,appIdentifier:n},!1),c=[],l=[],d=bt(o);try{for(d.s();!(g=d.n()).done;)c.push((v=g.value).signature),l.push(v.keyId.toString())}catch(E){d.e(E)}finally{d.f()}return b.t0=Sr,b.next=11,Bi(Xl,u);case 11:return b.t1=b.sent,b.t2=function(E,S){return[E(at(e),S.Address),E(i,S.String),E(l,S.Array(S.Int)),E(c,S.Array(S.String))]},b.t3={cadence:b.t1,args:b.t2},b.abrupt("return",(0,b.t0)(b.t3));case 15:case"end":return b.stop()}},t)})),Na.apply(this,arguments)}function Li(t,n){return Ba.apply(this,arguments)}function Ba(){return Ba=x(h.mark(function t(n,r){var e,a,o,u,i,c,l,d=arguments;return h.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:e=d.length>2&&void 0!==d[2]?d[2]:{},a=at(r[0].addr),Ni({message:n,address:a,compSigs:r}),o=[],u=[],i=bt(r);try{for(i.s();!(c=i.n()).done;)o.push((l=c.value).signature),u.push(l.keyId.toString())}catch(v){i.e(v)}finally{i.f()}return g.t0=Sr,g.next=10,Bi(Zl,e);case 10:return g.t1=g.sent,g.t2=function(v,m){return[v(a,m.Address),v(n,m.String),v(u,m.Array(m.Int)),v(o,m.Array(m.String))]},g.t3={cadence:g.t1,args:g.t2},g.abrupt("return",(0,g.t0)(g.t3));case 14:case"end":return g.stop()}},t)})),Ba.apply(this,arguments)}var Un,Cr,$l=Object.freeze({__proto__:null,verifyAccountProof:function(t,n){return Na.apply(this,arguments)},verifyUserSignatures:Li}),Ql=wt.deprecate({pkg:"FCL",subject:"fcl.verifyUserSignatures()",message:"Please use fcl.AppUtils.verifyUserSignatures()",callback:function(t,n){return Li(t,n)}}),tp=function(){var t=x(h.mark(function n(){var r,e,a,o=arguments;return h.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return r=o.length>0&&void 0!==o[0]?o[0]:[],e=o.length>1&&void 0!==o[1]?o[1]:{},u.next=4,j.first(["sdk.resolve"],e.resolve||He);case 4:if(a=u.sent,!Array.isArray(r)){u.next=9;break}return u.next=8,st(pr(),r);case 8:r=u.sent;case 9:return u.t0=JSON,u.t1=Yn,u.next=13,a(r);case 13:return u.t2=u.sent,u.t3=(0,u.t1)(u.t2),u.abrupt("return",u.t0.stringify.call(u.t0,u.t3,null,2));case 16:case"end":return u.stop()}},n)}));return function(){return t.apply(this,arguments)}}(),La="POLL",np=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Ot([ss(r)]).then(Sn));case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),Ua=function(t){return t.status>=4},Ui=function(t){return t.status>=3},Fi=function(t){return t.status>=2},rp=(q(Un={},Nr,function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.sendSelf(La);case 1:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}()),q(Un,cn,function(t,n){t.subscribe(n.from),t.send(n.from,Br,t.all())}),q(Un,nn,function(t,n){t.unsubscribe(n.from)}),q(Un,no,function(){var t=x(h.mark(function n(r,e){return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:e.reply(r.all());case 1:case"end":return a.stop()}},n)}));return function(n,r){return t.apply(this,arguments)}}()),q(Un,La,function(){var t=x(h.mark(function n(r){var e;return h.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,np(r.self());case 3:e=a.sent,a.next=9;break;case 6:return a.prev=6,a.t0=a.catch(0),a.abrupt("return",r.fatalError(a.t0));case 9:Ua(e)||setTimeout(function(){return r.sendSelf(La)},2500),o=r.all(),u=e,JSON.stringify(o)!==JSON.stringify(u)&&r.broadcast(Br,e),r.merge(e);case 12:case"end":return a.stop()}var o,u},n,null,[[0,6]])}));return function(n){return t.apply(this,arguments)}}()),Un),ji=function(t){if("object"===z(t)&&(t=t.transactionId),null==t)throw new Error("transactionId required");return t},Di=function(t){return rn(rp,ji(t))};function mn(t){function n(e){return ur(ji(t),Di,e)}function r(e){return function(){var o=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).suppress||!1;return new Promise(function(u,i){var c=n(function(l,d){!d&&!l.statusCode||o?e(l)&&(u(l),c()):(i(d||l.errorMessage),c())})})}}return{snapshot:function(){return ro(t,Di)},subscribe:n,onceFinalized:r(Fi),onceExecuted:r(Ui),onceSealed:r(Ua)}}mn.isUnknown=function(t){return t.status>=0},mn.isPending=function(t){return t.status>=1},mn.isFinalized=Fi,mn.isExecuted=Ui,mn.isSealed=Ua,mn.isExpired=function(t){return 5===t.status};var vn="TICK",Or="hwm",Fa=function(){var t=x(h.mark(function n(r){return h.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=setTimeout,e.t1=function(){return r.sendSelf(vn)},e.next=4,j().get("fcl.eventPollRate",1e4);case 4:return e.t2=e.sent,e.abrupt("return",(0,e.t0)(e.t1,e.t2));case 6:case"end":return e.stop()}},n)}));return function(n){return t.apply(this,arguments)}}(),ep=(q(Cr={},vn,function(){var t=x(h.mark(function n(r){var e,a,u,i;return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(r.hasSubs()){l.next=2;break}return l.abrupt("return");case 2:if(null!=(e=r.get(Or))){l.next=18;break}return l.t0=r,l.t1=Or,l.next=8,qn();case 8:return l.t2=l.sent,l.t0.put.call(l.t0,l.t1,l.t2),l.t3=r,l.t4=vn,l.next=14,Fa(r);case 14:l.t5=l.sent,l.t3.put.call(l.t3,l.t4,l.t5),l.next=34;break;case 18:return l.next=20,qn();case 20:if(r.put(Or,a=l.sent),!(e.height1&&void 0!==d[1]?d[1]:{},G(null!=(r=n.template),"getInteractionTemplateAudits({ template }) -- template must be defined"),G("InteractionTemplate"===(r=Wn(r)).f_type,"getInteractionTemplateAudits({ template }) -- template must be an InteractionTemplate"),g.next=7,Mi({template:r});case 7:if((o=g.sent)===r.id){g.next=11;break}throw wt({title:"getInteractionTemplateAudits Debug Error",message:"Could not recompute and match template ID\n computed: ".concat(o,"\n template: ").concat(r.id,"\n "),level:St.debug}),new Error("getInteractionTemplateAudits Error: Could not recompute and match template ID");case 11:g.t0=r.f_version,g.next="1.0.0"===g.t0?14:33;break;case 14:if(g.t1=e,g.t1){g.next=19;break}return g.next=18,j().get("flow.auditors");case 18:g.t1=g.sent;case 19:if(G(u=g.t1,"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not set"),G(Array.isArray(u),"getInteractionTemplateAudits Error: Required configuration for 'fcl.auditors' is not an array"),i=a.flowInteractionAuditContract){g.next=29;break}return g.next=26,j().get("flow.network");case 26:G("mainnet"===(c=g.sent)||"testnet"===c,"getInteractionTemplateAudits Error: Unable to determine address for FlowInteractionTemplateAudit contract. Set configuration for 'fcl.network' to 'mainnet' or 'testnet'"),i="mainnet"===c?"0xfd100e39d50a13e6":"0xf78bfc12d0a786dc";case 29:return g.next=31,Sr({cadence:"\n import FlowInteractionTemplateAudit from ".concat(i,"\n pub fun main(templateId: String, auditors: [Address]): {Address:Bool} {\n return FlowInteractionTemplateAudit.getHasTemplateBeenAuditedByAuditors(templateId: templateId, auditors: auditors)\n }\n "),args:function(v,m){return[v(o,m.String),v(u,m.Array(m.Address))]}});case 31:return g.abrupt("return",g.sent);case 33:throw new Error("getInteractionTemplateAudits Error: Unsupported template version");case 34:case"end":return g.stop()}},t)})),Da.apply(this,arguments)}function zi(t){return{contractName:t.contractName,address:t.address,contract:""}}function op(t){var n,r=[],e=bt(t.match(/import ((\w|,| )+)* from 0x\w+/g)||[]);try{for(e.s();!(n=e.n()).done;){var a,u=/import ((\w+|, |)*) from (0x\w+)/g.exec(n.value),i=bt(u[1].match(/((?:\w+)+),?/g)||[]);try{for(i.s();!(a=i.n()).done;)r.push(zi({address:u[3],contractName:a.value.replace(/,/g,"")}))}catch(l){i.e(l)}finally{i.f()}}}catch(l){e.e(l)}finally{e.f()}return r}function Ga(t){return Ma.apply(this,arguments)}function Ma(){return Ma=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,d,g,v,m,b,E=arguments;return h.wrap(function(S){for(;;)switch(S.prev=S.next){case 0:e=n.contractName,a=n.blockHeight,o=E.length>1&&void 0!==E[1]?E[1]:{},G(null!=(r=n.address),"generateDependencyPin({ address }) -- address must be defined"),G(null!=e,"generateDependencyPin({ contractName }) -- contractName must be defined"),G(null!=a,"generateDependencyPin({ blockHeight }) -- blockHeight must be defined"),G("string"==typeof r,"generateDependencyPin({ address }) -- address must be a string"),G("string"==typeof e,"generateDependencyPin({ contractName }) -- contractName must be a string"),G("number"==typeof a,"generateDependencyPin({ blockHeight }) -- blockHeight must be a number"),u=[zi({contractName:e,address:r})],i=0,c=u;case 10:if(!(i1&&void 0!==i[1]?i[1]:{},c.next=4,qn({sealed:!0},a);case 4:return c.abrupt("return",Ga({address:r,contractName:e,blockHeight:null==(o=c.sent)?void 0:o.height},a));case 7:case"end":return c.stop()}},t)})),za.apply(this,arguments)}function up(t){if(null==t)return null;if("1.0.0"===t.f_version)return t;throw new Error("normalizeInteractionTemplateInterface Error: Invalid InteractionTemplateInterface")}function Ya(){return Ya=x(h.mark(function t(n){var r,e,a;return h.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:G(null!=(r=n.templateInterface),"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be defined"),G("object"===z(r),"generateTemplateInterfaceId({ templateInterface }) -- templateInterface must be an object"),G("InteractionTemplateInterface"==typeof r.f_type,"generateTemplateInterfaceId({ templateInterface }) -- templateInterface object must be an InteractionTemplate"),r=up(r),o.t0=r.f_version,o.next="1.0.0"===o.t0?8:25;break;case 8:return e=r.data,o.t1=fn,o.next=12,J("InteractionTemplateInterface");case 12:return o.t2=o.sent,o.next=15,J("1.0.0");case 15:return o.t3=o.sent,o.next=18,J(e.flip);case 18:return o.t4=o.sent,o.next=21,Promise.all(Object.keys(e.arguments).map(function(){var u=x(h.mark(function i(c){return h.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,J(c);case 2:return l.t0=l.sent,l.next=5,J(String(e.arguments[c].index));case 5:return l.t1=l.sent,l.next=8,J(e.arguments[c].type);case 8:return l.t2=l.sent,l.abrupt("return",[l.t0,l.t1,l.t2]);case 10:case"end":return l.stop()}},i)}));return function(i){return u.apply(this,arguments)}}()));case 21:return o.t5=o.sent,o.t6=[o.t2,o.t3,o.t4,o.t5],a=(0,o.t1)(o.t6).toString("hex"),o.abrupt("return",J(a));case 25:throw new Error("generateTemplateInterfaceId Error: Unsupported templateInterface version");case 26:case"end":return o.stop()}},t)})),Ya.apply(this,arguments)}function Yi(t){return qa.apply(this,arguments)}function qa(){return qa=x(h.mark(function t(n){var r,e,a,o,u,i,c,l,g,v,m,S,N,T=arguments;return h.wrap(function(R){for(;;)switch(R.prev=R.next){case 0:e=n.blockHeight,a=n.network,o=T.length>1&&void 0!==T[1]?T[1]:{},G(null!=(r=n.template),"generateDependencyPin({ template }) -- template must be defined"),G("object"===z(r),"generateDependencyPin({ template }) -- template must be an object"),G("InteractionTemplate"===r.f_type,"generateDependencyPin({ template }) -- template must be an InteractionTemplate"),r=Wn(r),G(null!=a,"generateDependencyPin({ network }) network must be defined"),G(null!=e,"generateDependencyPin({ blockHeight }) blockHeight must be defined"),G("number"==typeof e,"generateDependencyPin({ blockHeight }) blockHeight must be a number"),R.t0=r.f_version,R.next="1.0.0"===R.t0?12:38;break;case 12:u=Object.keys(r.data.dependencies),i=0,c=u;case 14:if(!(i1&&void 0!==i[1]?i[1]:{},c.next=4,qn({sealed:!0});case 4:return c.abrupt("return",Yi({template:r,network:e,blockHeight:null==(o=c.sent)?void 0:o.height},a));case 7:case"end":return c.stop()}},t)})),Ka.apply(this,arguments)}var sp=Object.freeze({__proto__:null,getInteractionTemplateAudits:function(t){return Da.apply(this,arguments)},generateDependencyPin:Ga,generateDependencyPinAtLatestSealedBlock:function(t){return za.apply(this,arguments)},generateTemplateId:Mi,generateTemplateInterfaceId:function(t){return Ya.apply(this,arguments)},verifyDependencyPinsSame:Yi,verifyDependencyPinsSameAtLatestSealedBlock:function(t){return Ka.apply(this,arguments)},deriveCadenceByNetwork:zs,getTemplateMessage:function(t){var n,r,e,a=t.localization,o=void 0===a?"en-US":a,u=t.messageKey,i=t.template;G(u,"getMessage({ messageKey }) -- messageKey must be defined"),G("stirng"==typeof u,"getMessage({ messageKey }) -- messageKey must be a string"),G(o,"getMessage({ localization }) -- localization must be defined"),G("stirng"==typeof o,"getMessage({ localization }) -- localization must be a string"),G(null!=i,"generateTemplateId({ template }) -- template must be defined"),G("object"===z(i),"generateTemplateId({ template }) -- template must be an object"),G("InteractionTemplate"==typeof i.f_type,"generateTemplateId({ template }) -- template object must be an InteractionTemplate");var c=null==i||null===(n=i.data)||void 0===n?void 0:n.messages;return null==c||null===(r=c[u])||void 0===r||null===(e=r.i18n)||void 0===e?void 0:e[o]},getTemplateArgumentMessage:function(t){var n,r,e,a,o,u=t.localization,i=void 0===u?"en-US":u,c=t.argumentLabel,l=t.messageKey,d=t.template;G(l,"getMessage({ messageKey }) -- messageKey must be defined"),G("stirng"==typeof l,"getMessage({ messageKey }) -- messageKey must be a string"),G(c,"getMessage({ argumentLabel }) -- argumentLabel must be defined"),G("stirng"==typeof l,"getMessage({ argumentLabel }) -- argumentLabel must be a string"),G(i,"getMessage({ localization }) -- localization must be defined"),G("stirng"==typeof i,"getMessage({ localization }) -- localization must be a string"),G(null!=d,"generateTemplateId({ template }) -- template must be defined"),G("object"===z(d),"generateTemplateId({ template }) -- template must be an object"),G("InteractionTemplate"==typeof d.f_type,"generateTemplateId({ template }) -- template object must be an InteractionTemplate");var g=null==d||null===(n=d.data)||void 0===n?void 0:n.arguments;return null==g||null===(r=g[c])||void 0===r||null===(e=r.messages)||void 0===e||null===(a=e[l])||void 0===a||null===(o=a.i18n)||void 0===o?void 0:o[i]}}),ip=xt().authorization,cp=Us;B.AppUtils=$l,B.InteractionTemplateUtils=sp,B.TestUtils=Af,B.VERSION=Ut,B.WalletUtils=Jl,B.account=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.height,e=n.id,a=arguments.length>2?arguments[2]:void 0;return C(!(e&&r),'Method: account -- Cannot pass "id" and "height" simultaneously'),e?Ot([xn(t),Je(e)],a).then(Jt):r?Ot([xn(t),xr(r)],a).then(Jt):Ot([xn(t)],a).then(Jt)},B.arg=$e,B.args=Ze,B.atBlockHeight=xr,B.atBlockId=Je,B.authenticate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().authenticate(t)},B.authorization=function(t,n,r,e){return{addr:t,signingFunction:n,keyId:r,sequenceNum:e}},B.authorizations=os,B.authz=ip,B.block=qn,B.build=yr,B.cadence=cr,B.cdc=cr,B.config=j,B.createSignableVoucher=Yn,B.currentUser=xt,B.decode=Sn,B.discovery=Fl,B.display=function(t){return at(t)},B.events=function(t){return{subscribe:function(n){return ur(t,ap,n)}}},B.getAccount=xn,B.getBlock=Mn,B.getBlockHeader=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return st([mu,function(n){return n.block.isSealed=t,ht(n)}])},B.getCollection=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return st([vu,function(n){return n.collection.id=t,n}])},B.getEvents=function(t,n,r){return void 0===n&&void 0===r||wt.deprecate({pkg:"FCL/SDK",subject:"Passing a start and end into getEvents",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder"}),st([hr,function(e){return e.events.eventType=t,e.events.start=n,e.events.end=r,ht(e)}])},B.getEventsAtBlockHeightRange=us,B.getEventsAtBlockIds=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return st([hr,function(r){return r.events.eventType=t,r.events.blockIds=n,ht(r)}])},B.getTransaction=function(t){return st([pu,function(n){return n.transaction.id=t,ht(n)}])},B.getTransactionStatus=ss,B.invariant=G,B.isBad=Ue,B.isOk=bu,B.limit=Xe,B.logIn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().authenticate(t)},B.mutate=function(){return Pa.apply(this,arguments)},B.param=function(t){return wt.deprecate({pkg:"FCL/SDK",message:"The param builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:St.error})},B.params=function(t){return wt.deprecate({pkg:"FCL/SDK",message:"The params builder has been removed from the Flow JS-SDK/FCL.",transition:"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params",level:St.error})},B.payer=cs,B.ping=function(){return hu},B.pipe=st,B.pluginRegistry=Ol,B.proposer=is,B.query=Sr,B.reauthenticate=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().unauthenticate(),xt().authenticate(t)},B.ref=fs,B.sansPrefix=Z,B.script=ls,B.send=Ot,B.serialize=tp,B.signUp=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return xt().authenticate(t)},B.t=cp,B.transaction=ps,B.tx=mn,B.unauthenticate=function(){return xt().unauthenticate()},B.validator=Ve,B.verifyUserSignatures=Ql,B.voucherIntercept=function(t){return vr("ix.voucher-intercept",t)},B.voucherToTxId=function(t){return function(t){var n=new he.SHA3(256);return n.update(X.Buffer.from(t,"hex")),n.digest().toString("hex")}(Ye(function(t){pf(t);var n=Du(t),r=function(e){return e.map(function(a){var u=a.keyId,i=a.sig;return{signerIndex:n.get(a.address),keyId:u,sig:i}}).sort(function(a,o){return a.signerIndex>o.signerIndex?1:a.signerIndexo.keyId?1:a.keyId{"use strict";Fe.r(Ze),Fe.d(Ze,{getTorusProviderInstance:()=>Me});var Ie=Fe(37838),$e=Fe.n(Ie),Me=function(){return Ye=void 0,ze=void 0,Ge=function(){return function(Ye,ze){var Ge,C,t,n,Te={label:0,sent:function(){if(1&t[0])throw t[1];return t[1]},trys:[],ops:[]};return n={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function o(d){return function(p){return function c(d){if(Ge)throw new TypeError("Generator is already executing.");for(;n&&(n=0,d[0]&&(Te=0)),Te;)try{if(Ge=1,C&&(t=2&d[0]?C.return:d[0]?C.throw||((t=C.return)&&t.call(C),0):C.next)&&!(t=t.call(C,d[1])).done)return t;switch(C=0,t&&(d=[2&d[0],t.value]),d[0]){case 0:case 1:t=d;break;case 4:return Te.label++,{value:d[1],done:!1};case 5:Te.label++,C=d[1],d=[0];continue;case 7:d=Te.ops.pop(),Te.trys.pop();continue;default:if(!(t=(t=Te.trys).length>0&&t[t.length-1])&&(6===d[0]||2===d[0])){Te=0;continue}if(3===d[0]&&(!t||d[1]>t[0]&&d[1]{var Ie=Fe(91052).default,$e=Fe(48243).default,Oe=Fe(69466).default,xe=Fe(94745).default,Me=Fe(91291).default;self,je.exports=(()=>(()=>{var Ye={4320:function(C,t,n){"use strict";var o=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(t,"__esModule",{value:!0}),t.EthereumProviderError=t.JsonRpcError=void 0;const c=n(2451),d=o(n(4445)),p=n(8164);class s extends Error{constructor(a,y,b){if(!Number.isInteger(a))throw new Error('"code" must be an integer.');if(!y||"string"!=typeof y)throw new Error('"message" must be a non-empty string.');super(y),this.code=a,void 0!==b&&(this.data=b)}serialize(){const a={code:this.code,message:this.message};return void 0!==this.data&&(a.data=this.data,(0,c.isPlainObject)(this.data)&&(a.data.cause=(0,p.serializeCause)(this.data.cause))),this.stack&&(a.stack=this.stack),a}toString(){return(0,d.default)(this.serialize(),e,2)}}function e(i,a){if("[Circular]"!==a)return a}t.JsonRpcError=s,t.EthereumProviderError=class extends s{constructor(i,a,y){if(b=i,!(Number.isInteger(b)&&b>=1e3&&b<=4999))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');var b;super(i,a,y)}}},537:(C,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},2546:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerErrors=t.rpcErrors=void 0;const o=n(4320),c=n(537),d=n(8164);function p(i,a){const[y,b]=e(a);return new o.JsonRpcError(i,y??(0,d.getMessageFromCode)(i),b)}function s(i,a){const[y,b]=e(a);return new o.EthereumProviderError(i,y??(0,d.getMessageFromCode)(i),b)}function e(i){if(i){if("string"==typeof i)return[i];if("object"==typeof i&&!Array.isArray(i)){const{message:a,data:y}=i;if(a&&"string"!=typeof a)throw new Error("Must specify string message.");return[a??void 0,y]}}return[]}t.rpcErrors={parse:i=>p(c.errorCodes.rpc.parse,i),invalidRequest:i=>p(c.errorCodes.rpc.invalidRequest,i),invalidParams:i=>p(c.errorCodes.rpc.invalidParams,i),methodNotFound:i=>p(c.errorCodes.rpc.methodNotFound,i),internal:i=>p(c.errorCodes.rpc.internal,i),server:i=>{if(!i||"object"!=typeof i||Array.isArray(i))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:a}=i;if(!Number.isInteger(a)||a>-32005||a<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return p(a,i)},invalidInput:i=>p(c.errorCodes.rpc.invalidInput,i),resourceNotFound:i=>p(c.errorCodes.rpc.resourceNotFound,i),resourceUnavailable:i=>p(c.errorCodes.rpc.resourceUnavailable,i),transactionRejected:i=>p(c.errorCodes.rpc.transactionRejected,i),methodNotSupported:i=>p(c.errorCodes.rpc.methodNotSupported,i),limitExceeded:i=>p(c.errorCodes.rpc.limitExceeded,i)},t.providerErrors={userRejectedRequest:i=>s(c.errorCodes.provider.userRejectedRequest,i),unauthorized:i=>s(c.errorCodes.provider.unauthorized,i),unsupportedMethod:i=>s(c.errorCodes.provider.unsupportedMethod,i),disconnected:i=>s(c.errorCodes.provider.disconnected,i),chainDisconnected:i=>s(c.errorCodes.provider.chainDisconnected,i),custom:i=>{if(!i||"object"!=typeof i||Array.isArray(i))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:a,message:y,data:b}=i;if(!y||"string"!=typeof y)throw new Error('"message" must be a nonempty string');return new o.EthereumProviderError(a,y,b)}}},9428:(C,t,n)=>{"use strict";t.PY=t.Xy=t.yd=void 0;var o=n(4320);Object.defineProperty(t,"yd",{enumerable:!0,get:function(){return o.EthereumProviderError}});var c=n(8164);Object.defineProperty(t,"Xy",{enumerable:!0,get:function(){return c.serializeError}});var d=n(2546);Object.defineProperty(t,"PY",{enumerable:!0,get:function(){return d.rpcErrors}}),n(537)},8164:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCause=t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const o=n(2451),c=n(537),d=c.errorCodes.rpc.internal,p={code:d,message:s(d)};function s(y,b="Unspecified error message. This is a bug, please report it."){if(e(y)){const g=y.toString();if((0,o.hasProperty)(c.errorValues,g))return c.errorValues[g].message;if((E=y)>=-32099&&E<=-32e3)return t.JSON_RPC_SERVER_ERROR_MESSAGE}var E;return b}function e(y){return Number.isInteger(y)}function i(y){return Array.isArray(y)?y.map(b=>(0,o.isValidJson)(b)?b:(0,o.isObject)(b)?a(b):null):(0,o.isObject)(y)?a(y):(0,o.isValidJson)(y)?y:null}function a(y){return Object.getOwnPropertyNames(y).reduce((b,g)=>{const E=y[g];return(0,o.isValidJson)(E)&&(b[g]=E),b},{})}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=s,t.isValidCode=e,t.serializeError=function(y,{fallbackError:b=p,shouldIncludeStack:g=!0}={}){if(!(0,o.isJsonRpcError)(b))throw new Error("Must provide fallback error with integer number code and string message.");const E=(v=b,(A=y)&&"object"==typeof A&&"serialize"in A&&"function"==typeof A.serialize?A.serialize():(0,o.isJsonRpcError)(A)?A:{...v,data:{cause:i(A)}});var A,v;return g||delete E.stack,E},t.serializeCause=i},1422:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertExhaustive=t.assertStruct=t.assert=t.AssertionError=void 0;const o=n(7884);function c(p,s){return e=p,Boolean("string"==typeof(null===(a=null===(i=null==e?void 0:e.prototype)||void 0===i?void 0:i.constructor)||void 0===a?void 0:a.name))?new p({message:s}):p({message:s});var e,i,a}class d extends Error{constructor(s){super(s.message),this.code="ERR_ASSERTION"}}t.AssertionError=d,t.assert=function(p,s="Assertion failed.",e=d){if(!p)throw s instanceof Error?s:c(e,s)},t.assertStruct=function(p,s,e="Assertion failed",i=d){try{(0,o.assert)(p,s)}catch(a){throw c(i,`${e}: ${function(y){const b="object"==typeof(g=y)&&null!==g&&"message"in g?y.message:String(y);var g;return b.endsWith(".")?b.slice(0,-1):b}(a)}.`)}},t.assertExhaustive=function(p){throw new Error("Invalid branch reached. Should be detected during compilation.")}},7207:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.base64=void 0;const o=n(7884),c=n(1422);t.base64=(d,p={})=>{var s,e;const i=null!==(s=p.paddingRequired)&&void 0!==s&&s,a=null!==(e=p.characterSet)&&void 0!==e?e:"base64";let y,b;return"base64"===a?y=String.raw`[A-Za-z0-9+\/]`:((0,c.assert)("base64url"===a),y=String.raw`[-_A-Za-z0-9]`),b=i?new RegExp(`^(?:${y}{4})*(?:${y}{3}=|${y}{2}==)?$`,"u"):new RegExp(`^(?:${y}{4})*(?:${y}{2,3}|${y}{3}=|${y}{2}==)?$`,"u"),(0,o.pattern)(d,b)}},8476:(C,t,n)=>{"use strict";var o=n(8764).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.createDataView=t.concatBytes=t.valueToBytes=t.stringToBytes=t.numberToBytes=t.signedBigIntToBytes=t.bigIntToBytes=t.hexToBytes=t.bytesToString=t.bytesToNumber=t.bytesToSignedBigInt=t.bytesToBigInt=t.bytesToHex=t.assertIsBytes=t.isBytes=void 0;const c=n(1422),d=n(2009),i=function(){const O=[];return()=>{if(0===O.length)for(let L=0;L<256;L++)O.push(L.toString(16).padStart(2,"0"));return O}}();function a(O){return O instanceof Uint8Array}function y(O){(0,c.assert)(a(O),"Value must be a Uint8Array.")}function b(O){if(y(O),0===O.length)return"0x";const L=i(),I=new Array(O.length);for(let k=0;k=BigInt(0),"Value must be a non-negative bigint."),E(O.toString(16))}function v(O){return(0,c.assert)("number"==typeof O,"Value must be a number."),(0,c.assert)(O>=0,"Value must be a non-negative number."),(0,c.assert)(Number.isSafeInteger(O),"Value is not a safe integer. Use `bigIntToBytes` instead."),E(O.toString(16))}function _(O){return(0,c.assert)("string"==typeof O,"Value must be a string."),(new TextEncoder).encode(O)}function P(O){if("bigint"==typeof O)return A(O);if("number"==typeof O)return v(O);if("string"==typeof O)return O.startsWith("0x")?E(O):_(O);if(a(O))return O;throw new TypeError(`Unsupported value type: "${typeof O}".`)}t.isBytes=a,t.assertIsBytes=y,t.bytesToHex=b,t.bytesToBigInt=g,t.bytesToSignedBigInt=function(O){y(O);let L=BigInt(0);for(const I of O)L=(L<0,"Byte length must be greater than 0."),(0,c.assert)(function(F,G){(0,c.assert)(G>0);const B=F>>BigInt(31);return!((~F&B)+(F&~B)>>BigInt(8*G-1))}(O,L),"Byte length is too small to represent the given value.");let I=O;const k=new Uint8Array(L);for(let F=0;F>=BigInt(8);return k.reverse()},t.numberToBytes=v,t.stringToBytes=_,t.valueToBytes=P,t.concatBytes=function(O){const L=new Array(O.length);let I=0;for(let F=0;F{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChecksumStruct=void 0;const o=n(7884),c=n(7207);t.ChecksumStruct=(0,o.size)((0,c.base64)((0,o.string)(),{paddingRequired:!0}),44,44)},3557:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHex=t.createBytes=t.createBigInt=t.createNumber=void 0;const o=n(7884),c=n(1422),d=n(8476),p=n(2009),s=(0,o.union)([(0,o.number)(),(0,o.bigint)(),(0,o.string)(),p.StrictHexStruct]),e=(0,o.coerce)((0,o.number)(),s,Number),i=(0,o.coerce)((0,o.bigint)(),s,BigInt),a=((0,o.union)([p.StrictHexStruct,(0,o.instance)(Uint8Array)]),(0,o.coerce)((0,o.instance)(Uint8Array),(0,o.union)([p.StrictHexStruct]),d.hexToBytes)),y=(0,o.coerce)(p.StrictHexStruct,(0,o.instance)(Uint8Array),d.bytesToHex);t.createNumber=function(b){try{const g=(0,o.create)(b,e);return(0,c.assert)(Number.isFinite(g),`Expected a number-like value, got "${b}".`),g}catch(g){throw g instanceof o.StructError?new Error(`Expected a number-like value, got "${b}".`):g}},t.createBigInt=function(b){try{return(0,o.create)(b,i)}catch(g){throw g instanceof o.StructError?new Error(`Expected a number-like value, got "${String(g.value)}".`):g}},t.createBytes=function(b){if("string"==typeof b&&"0x"===b.toLowerCase())return new Uint8Array;try{return(0,o.create)(b,a)}catch(g){throw g instanceof o.StructError?new Error(`Expected a bytes-like value, got "${String(g.value)}".`):g}},t.createHex=function(b){if(b instanceof Uint8Array&&0===b.length||"string"==typeof b&&"0x"===b.toLowerCase())return"0x";try{return(0,o.create)(b,y)}catch(g){throw g instanceof o.StructError?new Error(`Expected a bytes-like value, got "${String(g.value)}".`):g}}},4283:function(C,t){"use strict";var n,o,c=this&&this.__classPrivateFieldSet||function(e,i,a,y,b){if("m"===y)throw new TypeError("Private method is not writable");if("a"===y&&!b)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof i?e!==i||!b:!i.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===y?b.call(e,a):b?b.value=a:i.set(e,a),a},d=this&&this.__classPrivateFieldGet||function(e,i,a,y){if("a"===a&&!y)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof i?e!==i||!y:!i.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?y:"a"===a?y.call(e):y?y.value:i.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.FrozenSet=t.FrozenMap=void 0;class p{constructor(i){n.set(this,void 0),c(this,n,new Map(i),"f"),Object.freeze(this)}get size(){return d(this,n,"f").size}[(n=new WeakMap,Symbol.iterator)](){return d(this,n,"f")[Symbol.iterator]()}entries(){return d(this,n,"f").entries()}forEach(i,a){return d(this,n,"f").forEach((y,b,g)=>i.call(a,y,b,this))}get(i){return d(this,n,"f").get(i)}has(i){return d(this,n,"f").has(i)}keys(){return d(this,n,"f").keys()}values(){return d(this,n,"f").values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map(([i,a])=>`${String(i)} => ${String(a)}`).join(", ")} `:""}}`}}t.FrozenMap=p;class s{constructor(i){o.set(this,void 0),c(this,o,new Set(i),"f"),Object.freeze(this)}get size(){return d(this,o,"f").size}[(o=new WeakMap,Symbol.iterator)](){return d(this,o,"f")[Symbol.iterator]()}entries(){return d(this,o,"f").entries()}forEach(i,a){return d(this,o,"f").forEach((y,b,g)=>i.call(a,y,b,this))}has(i){return d(this,o,"f").has(i)}keys(){return d(this,o,"f").keys()}values(){return d(this,o,"f").values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map(i=>String(i)).join(", ")} `:""}}`}}t.FrozenSet=s,Object.freeze(p),Object.freeze(p.prototype),Object.freeze(s),Object.freeze(s.prototype)},5345:(C,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2009:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.remove0x=t.add0x=t.assertIsStrictHexString=t.assertIsHexString=t.isStrictHexString=t.isHexString=t.StrictHexStruct=t.HexStruct=void 0;const o=n(7884),c=n(1422);function d(s){return(0,o.is)(s,t.HexStruct)}function p(s){return(0,o.is)(s,t.StrictHexStruct)}t.HexStruct=(0,o.pattern)((0,o.string)(),/^(?:0x)?[0-9a-f]+$/iu),t.StrictHexStruct=(0,o.pattern)((0,o.string)(),/^0x[0-9a-f]+$/iu),t.isHexString=d,t.isStrictHexString=p,t.assertIsHexString=function(s){(0,c.assert)(d(s),"Value must be a hexadecimal string.")},t.assertIsStrictHexString=function(s){(0,c.assert)(p(s),'Value must be a hexadecimal string, starting with "0x".')},t.add0x=function(s){return s.startsWith("0x")?s:s.startsWith("0X")?`0x${s.substring(2)}`:`0x${s}`},t.remove0x=function(s){return s.startsWith("0x")||s.startsWith("0X")?s.substring(2):s}},2451:function(C,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(d,p,s,e){void 0===e&&(e=s);var i=Object.getOwnPropertyDescriptor(p,s);i&&!("get"in i?!p.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return p[s]}}),Object.defineProperty(d,e,i)}:function(d,p,s,e){void 0===e&&(e=s),d[e]=p[s]}),c=this&&this.__exportStar||function(d,p){for(var s in d)"default"===s||Object.prototype.hasOwnProperty.call(p,s)||o(p,d,s)};Object.defineProperty(t,"__esModule",{value:!0}),c(n(1422),t),c(n(7207),t),c(n(8476),t),c(n(5013),t),c(n(3557),t),c(n(4283),t),c(n(5345),t),c(n(2009),t),c(n(2497),t),c(n(3732),t),c(n(160),t),c(n(6215),t),c(n(9679),t),c(n(9108),t),c(n(7772),t),c(n(7749),t),c(n(8426),t)},2497:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getJsonRpcIdValidator=t.assertIsJsonRpcError=t.isJsonRpcError=t.assertIsJsonRpcFailure=t.isJsonRpcFailure=t.assertIsJsonRpcSuccess=t.isJsonRpcSuccess=t.assertIsJsonRpcResponse=t.isJsonRpcResponse=t.assertIsPendingJsonRpcResponse=t.isPendingJsonRpcResponse=t.JsonRpcResponseStruct=t.JsonRpcFailureStruct=t.JsonRpcSuccessStruct=t.PendingJsonRpcResponseStruct=t.assertIsJsonRpcRequest=t.isJsonRpcRequest=t.assertIsJsonRpcNotification=t.isJsonRpcNotification=t.JsonRpcNotificationStruct=t.JsonRpcRequestStruct=t.JsonRpcParamsStruct=t.JsonRpcErrorStruct=t.JsonRpcIdStruct=t.JsonRpcVersionStruct=t.jsonrpc2=t.getJsonSize=t.isValidJson=t.JsonStruct=t.UnsafeJsonStruct=void 0;const o=n(7884),c=n(1422);t.UnsafeJsonStruct=(0,o.union)([(0,o.literal)(null),(0,o.boolean)(),(0,o.define)("finite number",d=>(0,o.is)(d,(0,o.number)())&&Number.isFinite(d)),(0,o.string)(),(0,o.array)((0,o.lazy)(()=>t.UnsafeJsonStruct)),(0,o.record)((0,o.string)(),(0,o.lazy)(()=>t.UnsafeJsonStruct))]),t.JsonStruct=(0,o.define)("Json",(d,p)=>{function s(e,i){const a=[...i.validator(e,p)];return!(a.length>0)||a}try{const e=s(d,t.UnsafeJsonStruct);return!0!==e?e:s(JSON.parse(JSON.stringify(d)),t.UnsafeJsonStruct)}catch(e){return e instanceof RangeError&&"Circular reference detected"}}),t.isValidJson=function(d){return(0,o.is)(d,t.JsonStruct)},t.getJsonSize=function(d){(0,c.assertStruct)(d,t.JsonStruct,"Invalid JSON value");const p=JSON.stringify(d);return(new TextEncoder).encode(p).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=(0,o.literal)(t.jsonrpc2),t.JsonRpcIdStruct=(0,o.nullable)((0,o.union)([(0,o.number)(),(0,o.string)()])),t.JsonRpcErrorStruct=(0,o.object)({code:(0,o.integer)(),message:(0,o.string)(),data:(0,o.optional)(t.JsonStruct),stack:(0,o.optional)((0,o.string)())}),t.JsonRpcParamsStruct=(0,o.optional)((0,o.union)([(0,o.record)((0,o.string)(),t.JsonStruct),(0,o.array)(t.JsonStruct)])),t.JsonRpcRequestStruct=(0,o.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,method:(0,o.string)(),params:t.JsonRpcParamsStruct}),t.JsonRpcNotificationStruct=(0,o.omit)(t.JsonRpcRequestStruct,["id"]),t.isJsonRpcNotification=function(d){return(0,o.is)(d,t.JsonRpcNotificationStruct)},t.assertIsJsonRpcNotification=function(d,p){(0,c.assertStruct)(d,t.JsonRpcNotificationStruct,"Invalid JSON-RPC notification",p)},t.isJsonRpcRequest=function(d){return(0,o.is)(d,t.JsonRpcRequestStruct)},t.assertIsJsonRpcRequest=function(d,p){(0,c.assertStruct)(d,t.JsonRpcRequestStruct,"Invalid JSON-RPC request",p)},t.PendingJsonRpcResponseStruct=(0,o.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:(0,o.optional)((0,o.unknown)()),error:(0,o.optional)(t.JsonRpcErrorStruct)}),t.JsonRpcSuccessStruct=(0,o.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,result:t.JsonStruct}),t.JsonRpcFailureStruct=(0,o.object)({id:t.JsonRpcIdStruct,jsonrpc:t.JsonRpcVersionStruct,error:t.JsonRpcErrorStruct}),t.JsonRpcResponseStruct=(0,o.union)([t.JsonRpcSuccessStruct,t.JsonRpcFailureStruct]),t.isPendingJsonRpcResponse=function(d){return(0,o.is)(d,t.PendingJsonRpcResponseStruct)},t.assertIsPendingJsonRpcResponse=function(d,p){(0,c.assertStruct)(d,t.PendingJsonRpcResponseStruct,"Invalid pending JSON-RPC response",p)},t.isJsonRpcResponse=function(d){return(0,o.is)(d,t.JsonRpcResponseStruct)},t.assertIsJsonRpcResponse=function(d,p){(0,c.assertStruct)(d,t.JsonRpcResponseStruct,"Invalid JSON-RPC response",p)},t.isJsonRpcSuccess=function(d){return(0,o.is)(d,t.JsonRpcSuccessStruct)},t.assertIsJsonRpcSuccess=function(d,p){(0,c.assertStruct)(d,t.JsonRpcSuccessStruct,"Invalid JSON-RPC success response",p)},t.isJsonRpcFailure=function(d){return(0,o.is)(d,t.JsonRpcFailureStruct)},t.assertIsJsonRpcFailure=function(d,p){(0,c.assertStruct)(d,t.JsonRpcFailureStruct,"Invalid JSON-RPC failure response",p)},t.isJsonRpcError=function(d){return(0,o.is)(d,t.JsonRpcErrorStruct)},t.assertIsJsonRpcError=function(d,p){(0,c.assertStruct)(d,t.JsonRpcErrorStruct,"Invalid JSON-RPC error",p)},t.getJsonRpcIdValidator=function(d){const{permitEmptyString:p,permitFractions:s,permitNull:e}=Object.assign({permitEmptyString:!0,permitFractions:!1,permitNull:!0},d);return i=>Boolean("number"==typeof i&&(s||Number.isInteger(i))||"string"==typeof i&&(p||i.length>0)||e&&null===i)}},3732:(C,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},160:function(C,t,n){"use strict";var o=this&&this.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.createModuleLogger=t.createProjectLogger=void 0;const c=(0,o(n(1227)).default)("metamask");t.createProjectLogger=function(d){return c.extend(d)},t.createModuleLogger=function(d,p){return d.extend(p)}},6215:(C,t)=>{"use strict";function n(c){return c.charCodeAt(0)<=127}var o;Object.defineProperty(t,"__esModule",{value:!0}),t.calculateNumberSize=t.calculateStringSize=t.isASCII=t.isPlainObject=t.ESCAPE_CHARACTERS_REGEXP=t.JsonSize=t.hasProperty=t.isObject=t.isNullOrUndefined=t.isNonEmptyArray=void 0,t.isNonEmptyArray=function(c){return Array.isArray(c)&&c.length>0},t.isNullOrUndefined=function(c){return null==c},t.isObject=function(c){return Boolean(c)&&"object"==typeof c&&!Array.isArray(c)},t.hasProperty=(c,d)=>Object.hasOwnProperty.call(c,d),(o=t.JsonSize||(t.JsonSize={}))[o.Null=4]="Null",o[o.Comma=1]="Comma",o[o.Wrapper=1]="Wrapper",o[o.True=4]="True",o[o.False=5]="False",o[o.Quote=1]="Quote",o[o.Colon=1]="Colon",o[o.Date=24]="Date",t.ESCAPE_CHARACTERS_REGEXP=/"|\\|\n|\r|\t/gu,t.isPlainObject=function(c){if("object"!=typeof c||null===c)return!1;try{let d=c;for(;null!==Object.getPrototypeOf(d);)d=Object.getPrototypeOf(d);return Object.getPrototypeOf(c)===d}catch{return!1}},t.isASCII=n,t.calculateStringSize=function(c){var d;return c.split("").reduce((p,s)=>n(s)?p+1:p+2,0)+(null!==(d=c.match(t.ESCAPE_CHARACTERS_REGEXP))&&void 0!==d?d:[]).length},t.calculateNumberSize=function(c){return c.toString().length}},9679:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hexToBigInt=t.hexToNumber=t.bigIntToHex=t.numberToHex=void 0;const o=n(1422),c=n(2009);t.numberToHex=d=>((0,o.assert)("number"==typeof d,"Value must be a number."),(0,o.assert)(d>=0,"Value must be a non-negative number."),(0,o.assert)(Number.isSafeInteger(d),"Value is not a safe integer. Use `bigIntToHex` instead."),(0,c.add0x)(d.toString(16))),t.bigIntToHex=d=>((0,o.assert)("bigint"==typeof d,"Value must be a bigint."),(0,o.assert)(d>=0,"Value must be a non-negative bigint."),(0,c.add0x)(d.toString(16))),t.hexToNumber=d=>{(0,c.assertIsHexString)(d);const p=parseInt(d,16);return(0,o.assert)(Number.isSafeInteger(p),"Value is not a safe integer. Use `hexToBigInt` instead."),p},t.hexToBigInt=d=>((0,c.assertIsHexString)(d),BigInt((0,c.add0x)(d)))},9108:(C,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7772:(C,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.timeSince=t.inMilliseconds=t.Duration=void 0,(n=t.Duration||(t.Duration={}))[n.Millisecond=1]="Millisecond",n[n.Second=1e3]="Second",n[n.Minute=6e4]="Minute",n[n.Hour=36e5]="Hour",n[n.Day=864e5]="Day",n[n.Week=6048e5]="Week",n[n.Year=31536e6]="Year";const o=(c,d)=>{if(p=c,!(Number.isInteger(p)&&p>=0))throw new Error(`"${d}" must be a non-negative integer. Received: "${c}".`);var p};t.inMilliseconds=function(c,d){return o(c,"count"),c*d},t.timeSince=function(c){return o(c,"timestamp"),Date.now()-c}},7749:(C,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8426:(C,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.satisfiesVersionRange=t.gtRange=t.gtVersion=t.assertIsSemVerRange=t.assertIsSemVerVersion=t.isValidSemVerRange=t.isValidSemVerVersion=t.VersionRangeStruct=t.VersionStruct=void 0;const o=n(5393),c=n(7884),d=n(1422);t.VersionStruct=(0,c.refine)((0,c.string)(),"Version",p=>null!==(0,o.valid)(p)||`Expected SemVer version, got "${p}"`),t.VersionRangeStruct=(0,c.refine)((0,c.string)(),"Version range",p=>null!==(0,o.validRange)(p)||`Expected SemVer range, got "${p}"`),t.isValidSemVerVersion=function(p){return(0,c.is)(p,t.VersionStruct)},t.isValidSemVerRange=function(p){return(0,c.is)(p,t.VersionRangeStruct)},t.assertIsSemVerVersion=function(p){(0,d.assertStruct)(p,t.VersionStruct)},t.assertIsSemVerRange=function(p){(0,d.assertStruct)(p,t.VersionRangeStruct)},t.gtVersion=function(p,s){return(0,o.gt)(p,s)},t.gtRange=function(p,s){return(0,o.gtr)(p,s)},t.satisfiesVersionRange=function(p,s){return(0,o.satisfies)(p,s,{includePrerelease:!0})}},3066:(C,t,n)=>{"use strict";const o=n(4403),c=Symbol("max"),d=Symbol("length"),p=Symbol("lengthCalculator"),s=Symbol("allowStale"),e=Symbol("maxAge"),i=Symbol("dispose"),a=Symbol("noDisposeOnSet"),y=Symbol("lruList"),b=Symbol("cache"),g=Symbol("updateAgeOnGet"),E=()=>1,A=(I,k,F)=>{const G=I[b].get(k);if(G){const B=G.value;if(v(I,B)){if(P(I,G),!I[s])return}else F&&(I[g]&&(G.value.now=Date.now()),I[y].unshiftNode(G));return B.value}},v=(I,k)=>{if(!k||!k.maxAge&&!I[e])return!1;const F=Date.now()-k.now;return k.maxAge?F>k.maxAge:I[e]&&F>I[e]},_=I=>{if(I[d]>I[c])for(let k=I[y].tail;I[d]>I[c]&&null!==k;){const F=k.prev;P(I,k),k=F}},P=(I,k)=>{if(k){const F=k.value;I[i]&&I[i](F.key,F.value),I[d]-=F.length,I[b].delete(F.key),I[y].removeNode(k)}};class O{constructor(k,F,G,B,T){this.key=k,this.value=F,this.length=G,this.now=B,this.maxAge=T||0}}const L=(I,k,F,G)=>{let B=F.value;v(I,B)&&(P(I,F),I[s]||(B=void 0)),B&&k.call(G,B.value,B.key,I)};C.exports=class{constructor(I){if("number"==typeof I&&(I={max:I}),I||(I={}),I.max&&("number"!=typeof I.max||I.max<0))throw new TypeError("max must be a non-negative number");this[c]=I.max||1/0;const k=I.length||E;if(this[p]="function"!=typeof k?E:k,this[s]=I.stale||!1,I.maxAge&&"number"!=typeof I.maxAge)throw new TypeError("maxAge must be a number");this[e]=I.maxAge||0,this[i]=I.dispose,this[a]=I.noDisposeOnSet||!1,this[g]=I.updateAgeOnGet||!1,this.reset()}set max(I){if("number"!=typeof I||I<0)throw new TypeError("max must be a non-negative number");this[c]=I||1/0,_(this)}get max(){return this[c]}set allowStale(I){this[s]=!!I}get allowStale(){return this[s]}set maxAge(I){if("number"!=typeof I)throw new TypeError("maxAge must be a non-negative number");this[e]=I,_(this)}get maxAge(){return this[e]}set lengthCalculator(I){"function"!=typeof I&&(I=E),I!==this[p]&&(this[p]=I,this[d]=0,this[y].forEach(k=>{k.length=this[p](k.value,k.key),this[d]+=k.length})),_(this)}get lengthCalculator(){return this[p]}get length(){return this[d]}get itemCount(){return this[y].length}rforEach(I,k){k=k||this;for(let F=this[y].tail;null!==F;){const G=F.prev;L(this,I,F,k),F=G}}forEach(I,k){k=k||this;for(let F=this[y].head;null!==F;){const G=F.next;L(this,I,F,k),F=G}}keys(){return this[y].toArray().map(I=>I.key)}values(){return this[y].toArray().map(I=>I.value)}reset(){this[i]&&this[y]&&this[y].length&&this[y].forEach(I=>this[i](I.key,I.value)),this[b]=new Map,this[y]=new o,this[d]=0}dump(){return this[y].map(I=>!v(this,I)&&{k:I.key,v:I.value,e:I.now+(I.maxAge||0)}).toArray().filter(I=>I)}dumpLru(){return this[y]}set(I,k,F){if((F=F||this[e])&&"number"!=typeof F)throw new TypeError("maxAge must be a number");const G=F?Date.now():0,B=this[p](k,I);if(this[b].has(I)){if(B>this[c])return P(this,this[b].get(I)),!1;const Q=this[b].get(I).value;return this[i]&&(this[a]||this[i](I,Q.value)),Q.now=G,Q.maxAge=F,Q.value=k,this[d]+=B-Q.length,Q.length=B,this.get(I),_(this),!0}const T=new O(I,k,B,G,F);return T.length>this[c]?(this[i]&&this[i](I,k),!1):(this[d]+=T.length,this[y].unshift(T),this[b].set(I,this[y].head),_(this),!0)}has(I){if(!this[b].has(I))return!1;const k=this[b].get(I).value;return!v(this,k)}get(I){return A(this,I,!0)}peek(I){return A(this,I,!1)}pop(){const I=this[y].tail;return I?(P(this,I),I.value):null}del(I){P(this,this[b].get(I))}load(I){this.reset();const k=Date.now();for(let F=I.length-1;F>=0;F--){const G=I[F],B=G.e||0;if(0===B)this.set(G.k,G.v);else{const T=B-k;T>0&&this.set(G.k,G.v,T)}}}prune(){this[b].forEach((I,k)=>A(this,k,!1))}}},7809:(C,t,n)=>{const o=Symbol("SemVer ANY");class c{static get ANY(){return o}constructor(g,E){if(E=d(E),g instanceof c){if(g.loose===!!E.loose)return g;g=g.value}g=g.trim().split(/\s+/).join(" "),i("comparator",g,E),this.options=E,this.loose=!!E.loose,this.parse(g),this.value=this.semver===o?"":this.operator+this.semver.version,i("comp",this)}parse(g){const A=g.match(this.options.loose?p[s.COMPARATORLOOSE]:p[s.COMPARATOR]);if(!A)throw new TypeError(`Invalid comparator: ${g}`);this.operator=void 0!==A[1]?A[1]:"","="===this.operator&&(this.operator=""),this.semver=A[2]?new a(A[2],this.options.loose):o}toString(){return this.value}test(g){if(i("Comparator.test",g,this.options.loose),this.semver===o||g===o)return!0;if("string"==typeof g)try{g=new a(g,this.options)}catch{return!1}return e(g,this.operator,this.semver,this.options)}intersects(g,E){if(!(g instanceof c))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new y(g.value,E).test(this.value):""===g.operator?""===g.value||new y(this.value,E).test(g.semver):!((E=d(E)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===g.value)||!E.includePrerelease&&(this.value.startsWith("<0.0.0")||g.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!g.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!g.operator.startsWith("<"))&&(this.semver.version!==g.semver.version||!this.operator.includes("=")||!g.operator.includes("="))&&!(e(this.semver,"<",g.semver,E)&&this.operator.startsWith(">")&&g.operator.startsWith("<"))&&!(e(this.semver,">",g.semver,E)&&this.operator.startsWith("<")&&g.operator.startsWith(">")))}}C.exports=c;const d=n(3459),{safeRe:p,t:s}=n(8416),e=n(2928),i=n(2494),a=n(808),y=n(5579)},5579:(C,t,n)=>{class o{constructor(U,ie){if(ie=d(ie),U instanceof o)return U.loose===!!ie.loose&&U.includePrerelease===!!ie.includePrerelease?U:new o(U.raw,ie);if(U instanceof p)return this.raw=U.value,this.set=[[U]],this.format(),this;if(this.options=ie,this.loose=!!ie.loose,this.includePrerelease=!!ie.includePrerelease,this.raw=U.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(K=>this.parseRange(K)).filter(K=>K.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const K=this.set[0];if(this.set=this.set.filter(X=>!v(X[0])),0===this.set.length)this.set=[K];else if(this.set.length>1)for(const X of this.set)if(1===X.length&&_(X[0])){this.set=[X];break}}this.format()}format(){return this.range=this.set.map(U=>U.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(U){const ie=((this.options.includePrerelease&&E)|(this.options.loose&&A))+":"+U,K=c.get(ie);if(K)return K;const X=this.options.loose;U=U.replace(X?i[a.HYPHENRANGELOOSE]:i[a.HYPHENRANGE],ge(this.options.includePrerelease)),s("hyphen replace",U),U=U.replace(i[a.COMPARATORTRIM],y),s("comparator trim",U);let ee=(U=(U=U.replace(i[a.TILDETRIM],b)).replace(i[a.CARETTRIM],g)).split(" ").map(se=>O(se,this.options)).join(" ").split(/\s+/).map(se=>D(se,this.options));X&&(ee=ee.filter(se=>(s("loose invalid filter",se,this.options),!!se.match(i[a.COMPARATORLOOSE])))),s("range list",ee);const Z=new Map,W=ee.map(se=>new p(se,this.options));for(const se of W){if(v(se))return[se];Z.set(se.value,se)}Z.size>1&&Z.has("")&&Z.delete("");const ue=[...Z.values()];return c.set(ie,ue),ue}intersects(U,ie){if(!(U instanceof o))throw new TypeError("a Range is required");return this.set.some(K=>P(K,ie)&&U.set.some(X=>P(X,ie)&&K.every(te=>X.every(ee=>te.intersects(ee,ie)))))}test(U){if(!U)return!1;if("string"==typeof U)try{U=new e(U,this.options)}catch{return!1}for(let ie=0;ie"<0.0.0-0"===re.value,_=re=>""===re.value,P=(re,U)=>{let ie=!0;const K=re.slice();let X=K.pop();for(;ie&&K.length;)ie=K.every(te=>X.intersects(te,U)),X=K.pop();return ie},O=(re,U)=>(s("comp",re,U),re=F(re,U),s("caret",re),re=I(re,U),s("tildes",re),re=B(re,U),s("xrange",re),re=Q(re,U),s("stars",re),re),L=re=>!re||"x"===re.toLowerCase()||"*"===re,I=(re,U)=>re.trim().split(/\s+/).map(ie=>k(ie,U)).join(" "),k=(re,U)=>re.replace(U.loose?i[a.TILDELOOSE]:i[a.TILDE],(K,X,te,ee,Z)=>{let W;return s("tilde",re,K,X,te,ee,Z),L(X)?W="":L(te)?W=`>=${X}.0.0 <${+X+1}.0.0-0`:L(ee)?W=`>=${X}.${te}.0 <${X}.${+te+1}.0-0`:Z?(s("replaceTilde pr",Z),W=`>=${X}.${te}.${ee}-${Z} <${X}.${+te+1}.0-0`):W=`>=${X}.${te}.${ee} <${X}.${+te+1}.0-0`,s("tilde return",W),W}),F=(re,U)=>re.trim().split(/\s+/).map(ie=>G(ie,U)).join(" "),G=(re,U)=>{s("caret",re,U);const K=U.includePrerelease?"-0":"";return re.replace(U.loose?i[a.CARETLOOSE]:i[a.CARET],(X,te,ee,Z,W)=>{let ue;return s("caret",re,X,te,ee,Z,W),L(te)?ue="":L(ee)?ue=`>=${te}.0.0${K} <${+te+1}.0.0-0`:L(Z)?ue="0"===te?`>=${te}.${ee}.0${K} <${te}.${+ee+1}.0-0`:`>=${te}.${ee}.0${K} <${+te+1}.0.0-0`:W?(s("replaceCaret pr",W),ue="0"===te?"0"===ee?`>=${te}.${ee}.${Z}-${W} <${te}.${ee}.${+Z+1}-0`:`>=${te}.${ee}.${Z}-${W} <${te}.${+ee+1}.0-0`:`>=${te}.${ee}.${Z}-${W} <${+te+1}.0.0-0`):(s("no pr"),ue="0"===te?"0"===ee?`>=${te}.${ee}.${Z}${K} <${te}.${ee}.${+Z+1}-0`:`>=${te}.${ee}.${Z}${K} <${te}.${+ee+1}.0-0`:`>=${te}.${ee}.${Z} <${+te+1}.0.0-0`),s("caret return",ue),ue})},B=(re,U)=>(s("replaceXRanges",re,U),re.split(/\s+/).map(ie=>T(ie,U)).join(" ")),T=(re,U)=>(re=re.trim()).replace(U.loose?i[a.XRANGELOOSE]:i[a.XRANGE],(K,X,te,ee,Z,W)=>{s("xRange",re,K,X,te,ee,Z,W);const ue=L(te),se=ue||L(ee),me=se||L(Z);return"="===X&&me&&(X=""),W=U.includePrerelease?"-0":"",ue?K=">"===X||"<"===X?"<0.0.0-0":"*":X&&me?(se&&(ee=0),Z=0,">"===X?(X=">=",se?(te=+te+1,ee=0,Z=0):(ee=+ee+1,Z=0)):"<="===X&&(X="<",se?te=+te+1:ee=+ee+1),"<"===X&&(W="-0"),K=`${X+te}.${ee}.${Z}${W}`):se?K=`>=${te}.0.0${W} <${+te+1}.0.0-0`:me&&(K=`>=${te}.${ee}.0${W} <${te}.${+ee+1}.0-0`),s("xRange return",K),K}),Q=(re,U)=>(s("replaceStars",re,U),re.trim().replace(i[a.STAR],"")),D=(re,U)=>(s("replaceGTE0",re,U),re.trim().replace(i[U.includePrerelease?a.GTE0PRE:a.GTE0],"")),ge=re=>(U,ie,K,X,te,ee,Z,W,ue,se,me,ve,Se)=>`${ie=L(K)?"":L(X)?`>=${K}.0.0${re?"-0":""}`:L(te)?`>=${K}.${X}.0${re?"-0":""}`:ee?`>=${ie}`:`>=${ie}${re?"-0":""}`} ${W=L(ue)?"":L(se)?`<${+ue+1}.0.0-0`:L(me)?`<${ue}.${+se+1}.0-0`:ve?`<=${ue}.${se}.${me}-${ve}`:re?`<${ue}.${se}.${+me+1}-0`:`<=${W}`}`.trim(),we=(re,U,ie)=>{for(let K=0;K0){const X=re[K].semver;if(X.major===U.major&&X.minor===U.minor&&X.patch===U.patch)return!0}return!1}return!0}},808:(C,t,n)=>{const o=n(2494),{MAX_LENGTH:c,MAX_SAFE_INTEGER:d}=n(1493),{safeRe:p,t:s}=n(8416),e=n(3459),{compareIdentifiers:i}=n(9417);class a{constructor(b,g){if(g=e(g),b instanceof a){if(b.loose===!!g.loose&&b.includePrerelease===!!g.includePrerelease)return b;b=b.version}else if("string"!=typeof b)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof b}".`);if(b.length>c)throw new TypeError(`version is longer than ${c} characters`);o("SemVer",b,g),this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease;const E=b.trim().match(g.loose?p[s.LOOSE]:p[s.FULL]);if(!E)throw new TypeError(`Invalid Version: ${b}`);if(this.raw=b,this.major=+E[1],this.minor=+E[2],this.patch=+E[3],this.major>d||this.major<0)throw new TypeError("Invalid major version");if(this.minor>d||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>d||this.patch<0)throw new TypeError("Invalid patch version");this.prerelease=E[4]?E[4].split(".").map(A=>{if(/^[0-9]+$/.test(A)){const v=+A;if(v>=0&&v=0;)"number"==typeof this.prerelease[v]&&(this.prerelease[v]++,v=-2);if(-1===v){if(g===this.prerelease.join(".")&&!1===E)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(A)}}if(g){let v=[g,A];!1===E&&(v=[g]),0===i(this.prerelease[0],g)?isNaN(this.prerelease[1])&&(this.prerelease=v):this.prerelease=v}break}default:throw new Error(`invalid increment argument: ${b}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}C.exports=a},7321:(C,t,n)=>{const o=n(9706);C.exports=(c,d)=>{const p=o(c.trim().replace(/^[=v]+/,""),d);return p?p.version:null}},2928:(C,t,n)=>{const o=n(6393),c=n(3),d=n(690),p=n(6155),s=n(1675),e=n(8800);C.exports=(i,a,y,b)=>{switch(a){case"===":return"object"==typeof i&&(i=i.version),"object"==typeof y&&(y=y.version),i===y;case"!==":return"object"==typeof i&&(i=i.version),"object"==typeof y&&(y=y.version),i!==y;case"":case"=":case"==":return o(i,y,b);case"!=":return c(i,y,b);case">":return d(i,y,b);case">=":return p(i,y,b);case"<":return s(i,y,b);case"<=":return e(i,y,b);default:throw new TypeError(`Invalid operator: ${a}`)}}},5054:(C,t,n)=>{const o=n(808),c=n(9706),{safeRe:d,t:p}=n(8416);C.exports=(s,e)=>{if(s instanceof o)return s;if("number"==typeof s&&(s=String(s)),"string"!=typeof s)return null;let i=null;if((e=e||{}).rtl){let a;for(;(a=d[p.COERCERTL].exec(s))&&(!i||i.index+i[0].length!==s.length);)i&&a.index+a[0].length===i.index+i[0].length||(i=a),d[p.COERCERTL].lastIndex=a.index+a[1].length+a[2].length;d[p.COERCERTL].lastIndex=-1}else i=s.match(d[p.COERCE]);return null===i?null:c(`${i[2]}.${i[3]||"0"}.${i[4]||"0"}`,e)}},9457:(C,t,n)=>{const o=n(808);C.exports=(c,d,p)=>{const s=new o(c,p),e=new o(d,p);return s.compare(e)||s.compareBuild(e)}},8992:(C,t,n)=>{const o=n(6837);C.exports=(c,d)=>o(c,d,!0)},6837:(C,t,n)=>{const o=n(808);C.exports=(c,d,p)=>new o(c,p).compare(new o(d,p))},9603:(C,t,n)=>{const o=n(9706);C.exports=(c,d)=>{const p=o(c,null,!0),s=o(d,null,!0),e=p.compare(s);if(0===e)return null;const i=e>0,a=i?p:s,y=i?s:p,b=!!a.prerelease.length;if(y.prerelease.length&&!b)return y.patch||y.minor?a.patch?"patch":a.minor?"minor":"major":"major";const g=b?"pre":"";return p.major!==s.major?g+"major":p.minor!==s.minor?g+"minor":p.patch!==s.patch?g+"patch":"prerelease"}},6393:(C,t,n)=>{const o=n(6837);C.exports=(c,d,p)=>0===o(c,d,p)},690:(C,t,n)=>{const o=n(6837);C.exports=(c,d,p)=>o(c,d,p)>0},6155:(C,t,n)=>{const o=n(6837);C.exports=(c,d,p)=>o(c,d,p)>=0},624:(C,t,n)=>{const o=n(808);C.exports=(c,d,p,s,e)=>{"string"==typeof p&&(e=s,s=p,p=void 0);try{return new o(c instanceof o?c.version:c,p).inc(d,s,e).version}catch{return null}}},1675:(C,t,n)=>{const o=n(6837);C.exports=(c,d,p)=>o(c,d,p)<0},8800:(C,t,n)=>{const o=n(6837);C.exports=(c,d,p)=>o(c,d,p)<=0},745:(C,t,n)=>{const o=n(808);C.exports=(c,d)=>new o(c,d).major},1561:(C,t,n)=>{const o=n(808);C.exports=(c,d)=>new o(c,d).minor},3:(C,t,n)=>{const o=n(6837);C.exports=(c,d,p)=>0!==o(c,d,p)},9706:(C,t,n)=>{const o=n(808);C.exports=(c,d,p=!1)=>{if(c instanceof o)return c;try{return new o(c,d)}catch(s){if(!p)return null;throw s}}},8660:(C,t,n)=>{const o=n(808);C.exports=(c,d)=>new o(c,d).patch},7674:(C,t,n)=>{const o=n(9706);C.exports=(c,d)=>{const p=o(c,d);return p&&p.prerelease.length?p.prerelease:null}},3370:(C,t,n)=>{const o=n(6837);C.exports=(c,d,p)=>o(d,c,p)},6646:(C,t,n)=>{const o=n(9457);C.exports=(c,d)=>c.sort((p,s)=>o(s,p,d))},7819:(C,t,n)=>{const o=n(5579);C.exports=(c,d,p)=>{try{d=new o(d,p)}catch{return!1}return d.test(c)}},3124:(C,t,n)=>{const o=n(9457);C.exports=(c,d)=>c.sort((p,s)=>o(p,s,d))},5557:(C,t,n)=>{const o=n(9706);C.exports=(c,d)=>{const p=o(c,d);return p?p.version:null}},5393:(C,t,n)=>{const o=n(8416),c=n(1493),d=n(808),p=n(9417),s=n(9706),e=n(5557),i=n(7321),a=n(624),y=n(9603),b=n(745),g=n(1561),E=n(8660),A=n(7674),v=n(6837),_=n(3370),P=n(8992),O=n(9457),L=n(3124),I=n(6646),k=n(690),F=n(1675),G=n(6393),B=n(3),T=n(6155),Q=n(8800),D=n(2928),ge=n(5054),we=n(7809),re=n(5579),U=n(7819),ie=n(458),K=n(6449),X=n(1940),te=n(442),ee=n(7677),Z=n(9455),W=n(7922),ue=n(3670),se=n(451),me=n(4501),ve=n(4854);C.exports={parse:s,valid:e,clean:i,inc:a,diff:y,major:b,minor:g,patch:E,prerelease:A,compare:v,rcompare:_,compareLoose:P,compareBuild:O,sort:L,rsort:I,gt:k,lt:F,eq:G,neq:B,gte:T,lte:Q,cmp:D,coerce:ge,Comparator:we,Range:re,satisfies:U,toComparators:ie,maxSatisfying:K,minSatisfying:X,minVersion:te,validRange:ee,outside:Z,gtr:W,ltr:ue,intersects:se,simplifyRange:me,subset:ve,SemVer:d,re:o.re,src:o.src,tokens:o.t,SEMVER_SPEC_VERSION:c.SEMVER_SPEC_VERSION,RELEASE_TYPES:c.RELEASE_TYPES,compareIdentifiers:p.compareIdentifiers,rcompareIdentifiers:p.rcompareIdentifiers}},1493:C=>{C.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},2494:(C,t,n)=>{var o=n(4155);const c="object"==typeof o&&o.env&&o.env.NODE_DEBUG&&/\bsemver\b/i.test(o.env.NODE_DEBUG)?(...d)=>console.error("SEMVER",...d):()=>{};C.exports=c},9417:C=>{const t=/^[0-9]+$/,n=(o,c)=>{const d=t.test(o),p=t.test(c);return d&&p&&(o=+o,c=+c),o===c?0:d&&!p?-1:p&&!d?1:on(c,o)}},3459:C=>{const t=Object.freeze({loose:!0}),n=Object.freeze({});C.exports=o=>o?"object"!=typeof o?t:o:n},8416:(C,t,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:o}=n(1493),c=n(2494),d=(t=C.exports={}).re=[],p=t.safeRe=[],s=t.src=[],e=t.t={};let i=0;const a=(y,b,g)=>{const E=b.split("\\s*").join("\\s{0,1}").split("\\s+").join("\\s"),A=i++;c(y,A,b),e[y]=A,s[A]=b,d[A]=new RegExp(b,g?"g":void 0),p[A]=new RegExp(E,g?"g":void 0)};a("NUMERICIDENTIFIER","0|[1-9]\\d*"),a("NUMERICIDENTIFIERLOOSE","[0-9]+"),a("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),a("MAINVERSION",`(${s[e.NUMERICIDENTIFIER]})\\.(${s[e.NUMERICIDENTIFIER]})\\.(${s[e.NUMERICIDENTIFIER]})`),a("MAINVERSIONLOOSE",`(${s[e.NUMERICIDENTIFIERLOOSE]})\\.(${s[e.NUMERICIDENTIFIERLOOSE]})\\.(${s[e.NUMERICIDENTIFIERLOOSE]})`),a("PRERELEASEIDENTIFIER",`(?:${s[e.NUMERICIDENTIFIER]}|${s[e.NONNUMERICIDENTIFIER]})`),a("PRERELEASEIDENTIFIERLOOSE",`(?:${s[e.NUMERICIDENTIFIERLOOSE]}|${s[e.NONNUMERICIDENTIFIER]})`),a("PRERELEASE",`(?:-(${s[e.PRERELEASEIDENTIFIER]}(?:\\.${s[e.PRERELEASEIDENTIFIER]})*))`),a("PRERELEASELOOSE",`(?:-?(${s[e.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[e.PRERELEASEIDENTIFIERLOOSE]})*))`),a("BUILDIDENTIFIER","[0-9A-Za-z-]+"),a("BUILD",`(?:\\+(${s[e.BUILDIDENTIFIER]}(?:\\.${s[e.BUILDIDENTIFIER]})*))`),a("FULLPLAIN",`v?${s[e.MAINVERSION]}${s[e.PRERELEASE]}?${s[e.BUILD]}?`),a("FULL",`^${s[e.FULLPLAIN]}$`),a("LOOSEPLAIN",`[v=\\s]*${s[e.MAINVERSIONLOOSE]}${s[e.PRERELEASELOOSE]}?${s[e.BUILD]}?`),a("LOOSE",`^${s[e.LOOSEPLAIN]}$`),a("GTLT","((?:<|>)?=?)"),a("XRANGEIDENTIFIERLOOSE",`${s[e.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),a("XRANGEIDENTIFIER",`${s[e.NUMERICIDENTIFIER]}|x|X|\\*`),a("XRANGEPLAIN",`[v=\\s]*(${s[e.XRANGEIDENTIFIER]})(?:\\.(${s[e.XRANGEIDENTIFIER]})(?:\\.(${s[e.XRANGEIDENTIFIER]})(?:${s[e.PRERELEASE]})?${s[e.BUILD]}?)?)?`),a("XRANGEPLAINLOOSE",`[v=\\s]*(${s[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[e.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[e.XRANGEIDENTIFIERLOOSE]})(?:${s[e.PRERELEASELOOSE]})?${s[e.BUILD]}?)?)?`),a("XRANGE",`^${s[e.GTLT]}\\s*${s[e.XRANGEPLAIN]}$`),a("XRANGELOOSE",`^${s[e.GTLT]}\\s*${s[e.XRANGEPLAINLOOSE]}$`),a("COERCE",`(^|[^\\d])(\\d{1,${o}})(?:\\.(\\d{1,${o}}))?(?:\\.(\\d{1,${o}}))?(?:$|[^\\d])`),a("COERCERTL",s[e.COERCE],!0),a("LONETILDE","(?:~>?)"),a("TILDETRIM",`(\\s*)${s[e.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",a("TILDE",`^${s[e.LONETILDE]}${s[e.XRANGEPLAIN]}$`),a("TILDELOOSE",`^${s[e.LONETILDE]}${s[e.XRANGEPLAINLOOSE]}$`),a("LONECARET","(?:\\^)"),a("CARETTRIM",`(\\s*)${s[e.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",a("CARET",`^${s[e.LONECARET]}${s[e.XRANGEPLAIN]}$`),a("CARETLOOSE",`^${s[e.LONECARET]}${s[e.XRANGEPLAINLOOSE]}$`),a("COMPARATORLOOSE",`^${s[e.GTLT]}\\s*(${s[e.LOOSEPLAIN]})$|^$`),a("COMPARATOR",`^${s[e.GTLT]}\\s*(${s[e.FULLPLAIN]})$|^$`),a("COMPARATORTRIM",`(\\s*)${s[e.GTLT]}\\s*(${s[e.LOOSEPLAIN]}|${s[e.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",a("HYPHENRANGE",`^\\s*(${s[e.XRANGEPLAIN]})\\s+-\\s+(${s[e.XRANGEPLAIN]})\\s*$`),a("HYPHENRANGELOOSE",`^\\s*(${s[e.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[e.XRANGEPLAINLOOSE]})\\s*$`),a("STAR","(<|>)?=?\\s*\\*"),a("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),a("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},7922:(C,t,n)=>{const o=n(9455);C.exports=(c,d,p)=>o(c,d,">",p)},451:(C,t,n)=>{const o=n(5579);C.exports=(c,d,p)=>(c=new o(c,p),d=new o(d,p),c.intersects(d,p))},3670:(C,t,n)=>{const o=n(9455);C.exports=(c,d,p)=>o(c,d,"<",p)},6449:(C,t,n)=>{const o=n(808),c=n(5579);C.exports=(d,p,s)=>{let e=null,i=null,a=null;try{a=new c(p,s)}catch{return null}return d.forEach(y=>{a.test(y)&&(e&&-1!==i.compare(y)||(e=y,i=new o(e,s)))}),e}},1940:(C,t,n)=>{const o=n(808),c=n(5579);C.exports=(d,p,s)=>{let e=null,i=null,a=null;try{a=new c(p,s)}catch{return null}return d.forEach(y=>{a.test(y)&&(e&&1!==i.compare(y)||(e=y,i=new o(e,s)))}),e}},442:(C,t,n)=>{const o=n(808),c=n(5579),d=n(690);C.exports=(p,s)=>{p=new c(p,s);let e=new o("0.0.0");if(p.test(e)||(e=new o("0.0.0-0"),p.test(e)))return e;e=null;for(let i=0;i{const g=new o(b.semver.version);switch(b.operator){case">":0===g.prerelease.length?g.patch++:g.prerelease.push(0),g.raw=g.format();case"":case">=":y&&!d(g,y)||(y=g);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${b.operator}`)}}),!y||e&&!d(e,y)||(e=y)}return e&&p.test(e)?e:null}},9455:(C,t,n)=>{const o=n(808),c=n(7809),{ANY:d}=c,p=n(5579),s=n(7819),e=n(690),i=n(1675),a=n(8800),y=n(6155);C.exports=(b,g,E,A)=>{let v,_,P,O,L;switch(b=new o(b,A),g=new p(g,A),E){case">":v=e,_=a,P=i,O=">",L=">=";break;case"<":v=i,_=y,P=e,O="<",L="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(s(b,g,A))return!1;for(let I=0;I{B.semver===d&&(B=new c(">=0.0.0")),F=F||B,G=G||B,v(B.semver,F.semver,A)?F=B:P(B.semver,G.semver,A)&&(G=B)}),F.operator===O||F.operator===L||(!G.operator||G.operator===O)&&_(b,G.semver)||G.operator===L&&P(b,G.semver))return!1}return!0}},4501:(C,t,n)=>{const o=n(7819),c=n(6837);C.exports=(d,p,s)=>{const e=[];let i=null,a=null;const y=d.sort((A,v)=>c(A,v,s));for(const A of y)o(A,p,s)?(a=A,i||(i=A)):(a&&e.push([i,a]),a=null,i=null);i&&e.push([i,null]);const b=[];for(const[A,v]of e)b.push(A===v?A:v||A!==y[0]?v?A===y[0]?`<=${v}`:`${A} - ${v}`:`>=${A}`:"*");const g=b.join(" || "),E="string"==typeof p.raw?p.raw:String(p);return g.length{const o=n(5579),c=n(7809),{ANY:d}=c,p=n(7819),s=n(6837),e=[new c(">=0.0.0-0")],i=[new c(">=0.0.0")],a=(g,E,A)=>{if(g===E)return!0;if(1===g.length&&g[0].semver===d){if(1===E.length&&E[0].semver===d)return!0;g=A.includePrerelease?e:i}if(1===E.length&&E[0].semver===d){if(A.includePrerelease)return!0;E=i}const v=new Set;let _,P,O,L,I,k,F;for(const T of g)">"===T.operator||">="===T.operator?_=y(_,T,A):"<"===T.operator||"<="===T.operator?P=b(P,T,A):v.add(T.semver);if(v.size>1||_&&P&&(O=s(_.semver,P.semver,A),O>0||0===O&&(">="!==_.operator||"<="!==P.operator)))return null;for(const T of v){if(_&&!p(T,String(_),A)||P&&!p(T,String(P),A))return null;for(const Q of E)if(!p(T,String(Q),A))return!1;return!0}let G=!(!P||A.includePrerelease||!P.semver.prerelease.length)&&P.semver,B=!(!_||A.includePrerelease||!_.semver.prerelease.length)&&_.semver;G&&1===G.prerelease.length&&"<"===P.operator&&0===G.prerelease[0]&&(G=!1);for(const T of E){if(F=F||">"===T.operator||">="===T.operator,k=k||"<"===T.operator||"<="===T.operator,_)if(B&&T.semver.prerelease&&T.semver.prerelease.length&&T.semver.major===B.major&&T.semver.minor===B.minor&&T.semver.patch===B.patch&&(B=!1),">"===T.operator||">="===T.operator){if(L=y(_,T,A),L===T&&L!==_)return!1}else if(">="===_.operator&&!p(_.semver,String(T),A))return!1;if(P)if(G&&T.semver.prerelease&&T.semver.prerelease.length&&T.semver.major===G.major&&T.semver.minor===G.minor&&T.semver.patch===G.patch&&(G=!1),"<"===T.operator||"<="===T.operator){if(I=b(P,T,A),I===T&&I!==P)return!1}else if("<="===P.operator&&!p(P.semver,String(T),A))return!1;if(!T.operator&&(P||_)&&0!==O)return!1}return!(_&&k&&!P&&0!==O||P&&F&&!_&&0!==O||B||G)},y=(g,E,A)=>{if(!g)return E;const v=s(g.semver,E.semver,A);return v>0?g:v<0||">"===E.operator&&">="===g.operator?E:g},b=(g,E,A)=>{if(!g)return E;const v=s(g.semver,E.semver,A);return v<0?g:v>0||"<"===E.operator&&"<="===g.operator?E:g};C.exports=(g,E,A={})=>{if(g===E)return!0;g=new o(g,A),E=new o(E,A);let v=!1;e:for(const _ of g.set){for(const P of E.set){const O=a(_,P,A);if(v=v||null!==O,O)continue e}if(v)return!1}return!0}},458:(C,t,n)=>{const o=n(5579);C.exports=(c,d)=>new o(c,d).set.map(p=>p.map(s=>s.value).join(" ").trim().split(" "))},7677:(C,t,n)=>{const o=n(5579);C.exports=(c,d)=>{try{return new o(c,d).range||"*"}catch{return null}}},9332:C=>{"use strict";C.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let n=this.head;n;n=n.next)yield n.value}}},4403:(C,t,n)=>{"use strict";function o(e){var i=this;if(i instanceof o||(i=new o),i.tail=null,i.head=null,i.length=0,e&&"function"==typeof e.forEach)e.forEach(function(b){i.push(b)});else if(arguments.length>0)for(var a=0,y=arguments.length;a1)a=i;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");y=this.head.next,a=this.head.value}for(var b=0;null!==y;b++)a=e(a,y.value,b),y=y.next;return a},o.prototype.reduceReverse=function(e,i){var a,y=this.tail;if(arguments.length>1)a=i;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");y=this.tail.prev,a=this.tail.value}for(var b=this.length-1;null!==y;b--)a=e(a,y.value,b),y=y.prev;return a},o.prototype.toArray=function(){for(var e=new Array(this.length),i=0,a=this.head;null!==a;i++)e[i]=a.value,a=a.next;return e},o.prototype.toArrayReverse=function(){for(var e=new Array(this.length),i=0,a=this.tail;null!==a;i++)e[i]=a.value,a=a.prev;return e},o.prototype.slice=function(e,i){(i=i||this.length)<0&&(i+=this.length),(e=e||0)<0&&(e+=this.length);var a=new o;if(ithis.length&&(i=this.length);for(var y=0,b=this.head;null!==b&&ythis.length&&(i=this.length);for(var y=this.length,b=this.tail;null!==b&&y>i;y--)b=b.prev;for(;null!==b&&y>e;y--,b=b.prev)a.push(b.value);return a},o.prototype.splice=function(e,i,...a){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var y=0,b=this.head;null!==b&&y{"use strict";const{AbortController:t,AbortSignal:n}=typeof self<"u"?self:typeof window<"u"?window:void 0;C.exports=t,C.exports.AbortSignal=n,C.exports.default=t},9742:(C,t)=>{"use strict";t.byteLength=function(i){var a=s(i),b=a[1];return 3*(a[0]+b)/4-b},t.toByteArray=function(i){var a,y,L,b=s(i),g=b[0],E=b[1],A=new c(3*(g+(L=E))/4-L),v=0,_=E>0?g-4:g;for(y=0;y<_;y+=4)a=o[i.charCodeAt(y)]<<18|o[i.charCodeAt(y+1)]<<12|o[i.charCodeAt(y+2)]<<6|o[i.charCodeAt(y+3)],A[v++]=a>>16&255,A[v++]=a>>8&255,A[v++]=255&a;return 2===E&&(a=o[i.charCodeAt(y)]<<2|o[i.charCodeAt(y+1)]>>4,A[v++]=255&a),1===E&&(a=o[i.charCodeAt(y)]<<10|o[i.charCodeAt(y+1)]<<4|o[i.charCodeAt(y+2)]>>2,A[v++]=a>>8&255,A[v++]=255&a),A},t.fromByteArray=function(i){for(var a,y=i.length,b=y%3,g=[],E=16383,A=0,v=y-b;Av?v:A+E));return 1===b?g.push(n[(a=i[y-1])>>2]+n[a<<4&63]+"=="):2===b&&g.push(n[(a=(i[y-2]<<8)+i[y-1])>>10]+n[a>>4&63]+n[a<<2&63]+"="),g.join("")};for(var n=[],o=[],c=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0;p<64;++p)n[p]=d[p],o[d.charCodeAt(p)]=p;function s(i){var a=i.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=i.indexOf("=");return-1===y&&(y=a),[y,y===a?0:4-y%4]}function e(i,a,y){for(var g,E=[],A=a;A>18&63]+n[g>>12&63]+n[g>>6&63]+n[63&g]);return E.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},8764:(C,t,n)=>{"use strict";const o=n(9742),c=n(645),d="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=e,t.SlowBuffer=function(r){return+r!=r&&(r=0),e.alloc(+r)},t.INSPECT_MAX_BYTES=50;const p=2147483647;function s(r){if(r>p)throw new RangeError('The value "'+r+'" is invalid for option "size"');const l=new Uint8Array(r);return Object.setPrototypeOf(l,e.prototype),l}function e(r,l,h){if("number"==typeof r){if("string"==typeof l)throw new TypeError('The "string" argument must be of type string. Received type number');return y(r)}return i(r,l,h)}function i(r,l,h){if("string"==typeof r)return function(m,V){if("string"==typeof V&&""!==V||(V="utf8"),!e.isEncoding(V))throw new TypeError("Unknown encoding: "+V);const S=0|A(m,V);let N=s(S);const j=N.write(m,V);return j!==S&&(N=N.slice(0,j)),N}(r,l);if(ArrayBuffer.isView(r))return function(m){if($(m,Uint8Array)){const V=new Uint8Array(m);return g(V.buffer,V.byteOffset,V.byteLength)}return b(m)}(r);if(null==r)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r);if($(r,ArrayBuffer)||r&&$(r.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($(r,SharedArrayBuffer)||r&&$(r.buffer,SharedArrayBuffer)))return g(r,l,h);if("number"==typeof r)throw new TypeError('The "value" argument must not be of type number. Received type number');const M=r.valueOf&&r.valueOf();if(null!=M&&M!==r)return e.from(M,l,h);const f=function(m){if(e.isBuffer(m)){const V=0|E(m.length),S=s(V);return 0===S.length||m.copy(S,0,0,V),S}return void 0!==m.length?"number"!=typeof m.length||z(m.length)?s(0):b(m):"Buffer"===m.type&&Array.isArray(m.data)?b(m.data):void 0}(r);if(f)return f;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof r[Symbol.toPrimitive])return e.from(r[Symbol.toPrimitive]("string"),l,h);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof r)}function a(r){if("number"!=typeof r)throw new TypeError('"size" argument must be of type number');if(r<0)throw new RangeError('The value "'+r+'" is invalid for option "size"')}function y(r){return a(r),s(r<0?0:0|E(r))}function b(r){const l=r.length<0?0:0|E(r.length),h=s(l);for(let M=0;M=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|r}function A(r,l){if(e.isBuffer(r))return r.length;if(ArrayBuffer.isView(r)||$(r,ArrayBuffer))return r.byteLength;if("string"!=typeof r)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof r);const h=r.length,M=arguments.length>2&&!0===arguments[2];if(!M&&0===h)return 0;let f=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return h;case"utf8":case"utf-8":return ce(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*h;case"hex":return h>>>1;case"base64":return ye(r).length;default:if(f)return M?-1:ce(r).length;l=(""+l).toLowerCase(),f=!0}}function v(r,l,h){let M=!1;if((void 0===l||l<0)&&(l=0),l>this.length||((void 0===h||h>this.length)&&(h=this.length),h<=0)||(h>>>=0)<=(l>>>=0))return"";for(r||(r="utf8");;)switch(r){case"hex":return we(this,l,h);case"utf8":case"utf-8":return T(this,l,h);case"ascii":return D(this,l,h);case"latin1":case"binary":return ge(this,l,h);case"base64":return B(this,l,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,l,h);default:if(M)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),M=!0}}function _(r,l,h){const M=r[l];r[l]=r[h],r[h]=M}function P(r,l,h,M,f){if(0===r.length)return-1;if("string"==typeof h?(M=h,h=0):h>2147483647?h=2147483647:h<-2147483648&&(h=-2147483648),z(h=+h)&&(h=f?0:r.length-1),h<0&&(h=r.length+h),h>=r.length){if(f)return-1;h=r.length-1}else if(h<0){if(!f)return-1;h=0}if("string"==typeof l&&(l=e.from(l,M)),e.isBuffer(l))return 0===l.length?-1:O(r,l,h,M,f);if("number"==typeof l)return l&=255,"function"==typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(r,l,h):Uint8Array.prototype.lastIndexOf.call(r,l,h):O(r,[l],h,M,f);throw new TypeError("val must be string, number or Buffer")}function O(r,l,h,M,f){let m,V=1,S=r.length,N=l.length;if(void 0!==M&&("ucs2"===(M=String(M).toLowerCase())||"ucs-2"===M||"utf16le"===M||"utf-16le"===M)){if(r.length<2||l.length<2)return-1;V=2,S/=2,N/=2,h/=2}function j(J,le){return 1===V?J[le]:J.readUInt16BE(le*V)}if(f){let J=-1;for(m=h;mS&&(h=S-N),m=h;m>=0;m--){let J=!0;for(let le=0;lef&&(M=f):M=f;const m=l.length;let V;for(M>m/2&&(M=m/2),V=0;V>8,N=V%256,j.push(N),j.push(S);return j}(l,r.length-h),r,h,M)}function B(r,l,h){return o.fromByteArray(0===l&&h===r.length?r:r.slice(l,h))}function T(r,l,h){h=Math.min(r.length,h);const M=[];let f=l;for(;f239?4:m>223?3:m>191?2:1;if(f+S<=h){let N,j,J,le;switch(S){case 1:m<128&&(V=m);break;case 2:N=r[f+1],128==(192&N)&&(le=(31&m)<<6|63&N,le>127&&(V=le));break;case 3:N=r[f+1],j=r[f+2],128==(192&N)&&128==(192&j)&&(le=(15&m)<<12|(63&N)<<6|63&j,le>2047&&(le<55296||le>57343)&&(V=le));break;case 4:N=r[f+1],j=r[f+2],J=r[f+3],128==(192&N)&&128==(192&j)&&128==(192&J)&&(le=(15&m)<<18|(63&N)<<12|(63&j)<<6|63&J,le>65535&&le<1114112&&(V=le))}}null===V?(V=65533,S=1):V>65535&&(V-=65536,M.push(V>>>10&1023|55296),V=56320|1023&V),M.push(V),f+=S}return function(m){const V=m.length;if(V<=Q)return String.fromCharCode.apply(String,m);let S="",N=0;for(;N"u"||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),e.poolSize=8192,e.from=function(r,l,h){return i(r,l,h)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array),e.alloc=function(r,l,h){return f=l,m=h,a(M=r),M<=0?s(M):void 0!==f?"string"==typeof m?s(M).fill(f,m):s(M).fill(f):s(M);var M,f,m},e.allocUnsafe=function(r){return y(r)},e.allocUnsafeSlow=function(r){return y(r)},e.isBuffer=function(r){return null!=r&&!0===r._isBuffer&&r!==e.prototype},e.compare=function(r,l){if($(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),$(l,Uint8Array)&&(l=e.from(l,l.offset,l.byteLength)),!e.isBuffer(r)||!e.isBuffer(l))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===l)return 0;let h=r.length,M=l.length;for(let f=0,m=Math.min(h,M);fM.length?(e.isBuffer(m)||(m=e.from(m)),m.copy(M,f)):Uint8Array.prototype.set.call(M,m,f);else{if(!e.isBuffer(m))throw new TypeError('"list" argument must be an Array of Buffers');m.copy(M,f)}f+=m.length}return M},e.byteLength=A,e.prototype._isBuffer=!0,e.prototype.swap16=function(){const r=this.length;if(r%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let l=0;ll&&(r+=" ... "),""},d&&(e.prototype[d]=e.prototype.inspect),e.prototype.compare=function(r,l,h,M,f){if($(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(r))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof r);if(void 0===l&&(l=0),void 0===h&&(h=r?r.length:0),void 0===M&&(M=0),void 0===f&&(f=this.length),l<0||h>r.length||M<0||f>this.length)throw new RangeError("out of range index");if(M>=f&&l>=h)return 0;if(M>=f)return-1;if(l>=h)return 1;if(this===r)return 0;let m=(f>>>=0)-(M>>>=0),V=(h>>>=0)-(l>>>=0);const S=Math.min(m,V),N=this.slice(M,f),j=r.slice(l,h);for(let J=0;J>>=0,isFinite(h)?(h>>>=0,void 0===M&&(M="utf8")):(M=h,h=void 0)}const f=this.length-l;if((void 0===h||h>f)&&(h=f),r.length>0&&(h<0||l<0)||l>this.length)throw new RangeError("Attempt to write outside buffer bounds");M||(M="utf8");let m=!1;for(;;)switch(M){case"hex":return L(this,r,l,h);case"utf8":case"utf-8":return I(this,r,l,h);case"ascii":case"latin1":case"binary":return k(this,r,l,h);case"base64":return F(this,r,l,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,r,l,h);default:if(m)throw new TypeError("Unknown encoding: "+M);M=(""+M).toLowerCase(),m=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Q=4096;function D(r,l,h){let M="";h=Math.min(r.length,h);for(let f=l;fM)&&(h=M);let f="";for(let m=l;mh)throw new RangeError("Trying to access beyond buffer length")}function ie(r,l,h,M,f,m){if(!e.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>f||lr.length)throw new RangeError("Index out of range")}function K(r,l,h,M,f){me(l,M,f,r,h,7);let m=Number(l&BigInt(4294967295));r[h++]=m,m>>=8,r[h++]=m,m>>=8,r[h++]=m,m>>=8,r[h++]=m;let V=Number(l>>BigInt(32)&BigInt(4294967295));return r[h++]=V,V>>=8,r[h++]=V,V>>=8,r[h++]=V,V>>=8,r[h++]=V,h}function X(r,l,h,M,f){me(l,M,f,r,h,7);let m=Number(l&BigInt(4294967295));r[h+7]=m,m>>=8,r[h+6]=m,m>>=8,r[h+5]=m,m>>=8,r[h+4]=m;let V=Number(l>>BigInt(32)&BigInt(4294967295));return r[h+3]=V,V>>=8,r[h+2]=V,V>>=8,r[h+1]=V,V>>=8,r[h]=V,h+8}function te(r,l,h,M,f,m){if(h+M>r.length)throw new RangeError("Index out of range");if(h<0)throw new RangeError("Index out of range")}function ee(r,l,h,M,f){return l=+l,h>>>=0,f||te(r,0,h,4),c.write(r,l,h,M,23,4),h+4}function Z(r,l,h,M,f){return l=+l,h>>>=0,f||te(r,0,h,8),c.write(r,l,h,M,52,8),h+8}e.prototype.slice=function(r,l){const h=this.length;(r=~~r)<0?(r+=h)<0&&(r=0):r>h&&(r=h),(l=void 0===l?h:~~l)<0?(l+=h)<0&&(l=0):l>h&&(l=h),l>>=0,l>>>=0,h||U(r,l,this.length);let M=this[r],f=1,m=0;for(;++m>>=0,l>>>=0,h||U(r,l,this.length);let M=this[r+--l],f=1;for(;l>0&&(f*=256);)M+=this[r+--l]*f;return M},e.prototype.readUint8=e.prototype.readUInt8=function(r,l){return r>>>=0,l||U(r,1,this.length),this[r]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(r,l){return r>>>=0,l||U(r,2,this.length),this[r]|this[r+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(r,l){return r>>>=0,l||U(r,2,this.length),this[r]<<8|this[r+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(r,l){return r>>>=0,l||U(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(r,l){return r>>>=0,l||U(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},e.prototype.readBigUInt64LE=fe(function(r){ve(r>>>=0,"offset");const l=this[r],h=this[r+7];void 0!==l&&void 0!==h||Se(r,this.length-8);const M=l+256*this[++r]+65536*this[++r]+this[++r]*2**24,f=this[++r]+256*this[++r]+65536*this[++r]+h*2**24;return BigInt(M)+(BigInt(f)<>>=0,"offset");const l=this[r],h=this[r+7];void 0!==l&&void 0!==h||Se(r,this.length-8);const M=l*2**24+65536*this[++r]+256*this[++r]+this[++r],f=this[++r]*2**24+65536*this[++r]+256*this[++r]+h;return(BigInt(M)<>>=0,l>>>=0,h||U(r,l,this.length);let M=this[r],f=1,m=0;for(;++m=f&&(M-=Math.pow(2,8*l)),M},e.prototype.readIntBE=function(r,l,h){r>>>=0,l>>>=0,h||U(r,l,this.length);let M=l,f=1,m=this[r+--M];for(;M>0&&(f*=256);)m+=this[r+--M]*f;return f*=128,m>=f&&(m-=Math.pow(2,8*l)),m},e.prototype.readInt8=function(r,l){return r>>>=0,l||U(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},e.prototype.readInt16LE=function(r,l){r>>>=0,l||U(r,2,this.length);const h=this[r]|this[r+1]<<8;return 32768&h?4294901760|h:h},e.prototype.readInt16BE=function(r,l){r>>>=0,l||U(r,2,this.length);const h=this[r+1]|this[r]<<8;return 32768&h?4294901760|h:h},e.prototype.readInt32LE=function(r,l){return r>>>=0,l||U(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},e.prototype.readInt32BE=function(r,l){return r>>>=0,l||U(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},e.prototype.readBigInt64LE=fe(function(r){ve(r>>>=0,"offset");const l=this[r],h=this[r+7];return void 0!==l&&void 0!==h||Se(r,this.length-8),(BigInt(this[r+4]+256*this[r+5]+65536*this[r+6]+(h<<24))<>>=0,"offset");const l=this[r],h=this[r+7];void 0!==l&&void 0!==h||Se(r,this.length-8);const M=(l<<24)+65536*this[++r]+256*this[++r]+this[++r];return(BigInt(M)<>>=0,l||U(r,4,this.length),c.read(this,r,!0,23,4)},e.prototype.readFloatBE=function(r,l){return r>>>=0,l||U(r,4,this.length),c.read(this,r,!1,23,4)},e.prototype.readDoubleLE=function(r,l){return r>>>=0,l||U(r,8,this.length),c.read(this,r,!0,52,8)},e.prototype.readDoubleBE=function(r,l){return r>>>=0,l||U(r,8,this.length),c.read(this,r,!1,52,8)},e.prototype.writeUintLE=e.prototype.writeUIntLE=function(r,l,h,M){r=+r,l>>>=0,h>>>=0,M||ie(this,r,l,h,Math.pow(2,8*h)-1,0);let f=1,m=0;for(this[l]=255&r;++m>>=0,h>>>=0,M||ie(this,r,l,h,Math.pow(2,8*h)-1,0);let f=h-1,m=1;for(this[l+f]=255&r;--f>=0&&(m*=256);)this[l+f]=r/m&255;return l+h},e.prototype.writeUint8=e.prototype.writeUInt8=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,1,255,0),this[l]=255&r,l+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,2,65535,0),this[l]=255&r,this[l+1]=r>>>8,l+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,2,65535,0),this[l]=r>>>8,this[l+1]=255&r,l+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,4,4294967295,0),this[l+3]=r>>>24,this[l+2]=r>>>16,this[l+1]=r>>>8,this[l]=255&r,l+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,4,4294967295,0),this[l]=r>>>24,this[l+1]=r>>>16,this[l+2]=r>>>8,this[l+3]=255&r,l+4},e.prototype.writeBigUInt64LE=fe(function(r,l=0){return K(this,r,l,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=fe(function(r,l=0){return X(this,r,l,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(r,l,h,M){if(r=+r,l>>>=0,!M){const S=Math.pow(2,8*h-1);ie(this,r,l,h,S-1,-S)}let f=0,m=1,V=0;for(this[l]=255&r;++f>0)-V&255;return l+h},e.prototype.writeIntBE=function(r,l,h,M){if(r=+r,l>>>=0,!M){const S=Math.pow(2,8*h-1);ie(this,r,l,h,S-1,-S)}let f=h-1,m=1,V=0;for(this[l+f]=255&r;--f>=0&&(m*=256);)r<0&&0===V&&0!==this[l+f+1]&&(V=1),this[l+f]=(r/m>>0)-V&255;return l+h},e.prototype.writeInt8=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,1,127,-128),r<0&&(r=255+r+1),this[l]=255&r,l+1},e.prototype.writeInt16LE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,2,32767,-32768),this[l]=255&r,this[l+1]=r>>>8,l+2},e.prototype.writeInt16BE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,2,32767,-32768),this[l]=r>>>8,this[l+1]=255&r,l+2},e.prototype.writeInt32LE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,4,2147483647,-2147483648),this[l]=255&r,this[l+1]=r>>>8,this[l+2]=r>>>16,this[l+3]=r>>>24,l+4},e.prototype.writeInt32BE=function(r,l,h){return r=+r,l>>>=0,h||ie(this,r,l,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[l]=r>>>24,this[l+1]=r>>>16,this[l+2]=r>>>8,this[l+3]=255&r,l+4},e.prototype.writeBigInt64LE=fe(function(r,l=0){return K(this,r,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=fe(function(r,l=0){return X(this,r,l,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeFloatLE=function(r,l,h){return ee(this,r,l,!0,h)},e.prototype.writeFloatBE=function(r,l,h){return ee(this,r,l,!1,h)},e.prototype.writeDoubleLE=function(r,l,h){return Z(this,r,l,!0,h)},e.prototype.writeDoubleBE=function(r,l,h){return Z(this,r,l,!1,h)},e.prototype.copy=function(r,l,h,M){if(!e.isBuffer(r))throw new TypeError("argument should be a Buffer");if(h||(h=0),M||0===M||(M=this.length),l>=r.length&&(l=r.length),l||(l=0),M>0&&M=this.length)throw new RangeError("Index out of range");if(M<0)throw new RangeError("sourceEnd out of bounds");M>this.length&&(M=this.length),r.length-l>>=0,h=void 0===h?this.length:h>>>0,r||(r=0),"number"==typeof r)for(f=l;f=M+4;h-=3)l=`_${r.slice(h-3,h)}${l}`;return`${r.slice(0,h)}${l}`}function me(r,l,h,M,f,m){if(r>h||r3?0===l||l===BigInt(0)?`>= 0${V} and < 2${V} ** ${8*(m+1)}${V}`:`>= -(2${V} ** ${8*(m+1)-1}${V}) and < 2 ** ${8*(m+1)-1}${V}`:`>= ${l}${V} and <= ${h}${V}`,new W.ERR_OUT_OF_RANGE("value",S,r)}var V,S,N;V=M,N=m,ve(S=f,"offset"),void 0!==V[S]&&void 0!==V[S+N]||Se(S,V.length-(N+1))}function ve(r,l){if("number"!=typeof r)throw new W.ERR_INVALID_ARG_TYPE(l,"number",r)}function Se(r,l,h){throw Math.floor(r)!==r?(ve(r,h),new W.ERR_OUT_OF_RANGE(h||"offset","an integer",r)):l<0?new W.ERR_BUFFER_OUT_OF_BOUNDS:new W.ERR_OUT_OF_RANGE(h||"offset",`>= ${h?1:0} and <= ${l}`,r)}ue("ERR_BUFFER_OUT_OF_BOUNDS",function(r){return r?`${r} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ue("ERR_INVALID_ARG_TYPE",function(r,l){return`The "${r}" argument must be of type number. Received type ${typeof l}`},TypeError),ue("ERR_OUT_OF_RANGE",function(r,l,h){let M=`The value of "${r}" is out of range.`,f=h;return Number.isInteger(h)&&Math.abs(h)>4294967296?f=se(String(h)):"bigint"==typeof h&&(f=String(h),(h>BigInt(2)**BigInt(32)||h<-(BigInt(2)**BigInt(32)))&&(f=se(f)),f+="n"),M+=` It must be ${l}. Received ${f}`,M},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function ce(r,l){let h;l=l||1/0;const M=r.length;let f=null;const m=[];for(let V=0;V55295&&h<57344){if(!f){if(h>56319){(l-=3)>-1&&m.push(239,191,189);continue}if(V+1===M){(l-=3)>-1&&m.push(239,191,189);continue}f=h;continue}if(h<56320){(l-=3)>-1&&m.push(239,191,189),f=h;continue}h=65536+(f-55296<<10|h-56320)}else f&&(l-=3)>-1&&m.push(239,191,189);if(f=null,h<128){if((l-=1)<0)break;m.push(h)}else if(h<2048){if((l-=2)<0)break;m.push(h>>6|192,63&h|128)}else if(h<65536){if((l-=3)<0)break;m.push(h>>12|224,h>>6&63|128,63&h|128)}else{if(!(h<1114112))throw new Error("Invalid code point");if((l-=4)<0)break;m.push(h>>18|240,h>>12&63|128,h>>6&63|128,63&h|128)}}return m}function ye(r){return o.toByteArray(function(l){if((l=(l=l.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;l.length%4!=0;)l+="=";return l}(r))}function _e(r,l,h,M){let f;for(f=0;f=l.length||f>=r.length);++f)l[f+h]=r[f];return f}function $(r,l){return r instanceof l||null!=r&&null!=r.constructor&&null!=r.constructor.name&&r.constructor.name===l.name}function z(r){return r!=r}const ae=function(){const r="0123456789abcdef",l=new Array(256);for(let h=0;h<16;++h){const M=16*h;for(let f=0;f<16;++f)l[M+f]=r[h]+r[f]}return l}();function fe(r){return typeof BigInt>"u"?de:r}function de(){throw new Error("BigInt not supported")}},1227:(C,t,n)=>{var o=n(4155);t.formatArgs=function(d){if(d[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+d[0]+(this.useColors?"%c ":" ")+"+"+C.exports.humanize(this.diff),!this.useColors)return;const p="color: "+this.color;d.splice(1,0,p,"color: inherit");let s=0,e=0;d[0].replace(/%[a-zA-Z%]/g,i=>{"%%"!==i&&(s++,"%c"===i&&(e=s))}),d.splice(e,0,p)},t.save=function(d){try{d?t.storage.setItem("debug",d):t.storage.removeItem("debug")}catch{}},t.load=function(){let d;try{d=t.storage.getItem("debug")}catch{}return!d&&void 0!==o&&"env"in o&&(d=o.env.DEBUG),d},t.useColors=function(){return!(typeof window>"u"||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||(typeof navigator>"u"||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch{}}(),t.destroy=(()=>{let d=!1;return()=>{d||(d=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),C.exports=n(2447)(t);const{formatters:c}=C.exports;c.j=function(d){try{return JSON.stringify(d)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}}},2447:(C,t,n)=>{C.exports=function(o){function c(s){let e,i,a,y=null;function b(...g){if(!b.enabled)return;const E=b,A=Number(new Date);E.diff=A-(e||A),E.prev=e,E.curr=A,e=A,g[0]=c.coerce(g[0]),"string"!=typeof g[0]&&g.unshift("%O");let _=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(P,O)=>{if("%%"===P)return"%";_++;const L=c.formatters[O];return"function"==typeof L&&(P=L.call(E,g[_]),g.splice(_,1),_--),P}),c.formatArgs.call(E,g),(E.log||c.log).apply(E,g)}return b.namespace=s,b.useColors=c.useColors(),b.color=c.selectColor(s),b.extend=d,b.destroy=c.destroy,Object.defineProperty(b,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==y?y:(i!==c.namespaces&&(i=c.namespaces,a=c.enabled(s)),a),set:g=>{y=g}}),"function"==typeof c.init&&c.init(b),b}function d(s,e){const i=c(this.namespace+(void 0===e?":":e)+s);return i.log=this.log,i}function p(s){return s.toString().substring(2,s.toString().length-2).replace(/\.\*\?$/,"*")}return c.debug=c,c.default=c,c.coerce=function(s){return s instanceof Error?s.stack||s.message:s},c.disable=function(){const s=[...c.names.map(p),...c.skips.map(p).map(e=>"-"+e)].join(",");return c.enable(""),s},c.enable=function(s){let e;c.save(s),c.namespaces=s,c.names=[],c.skips=[];const i=("string"==typeof s?s:"").split(/[\s,]+/),a=i.length;for(e=0;e{c[s]=o[s]}),c.names=[],c.skips=[],c.formatters={},c.selectColor=function(s){let e=0;for(let i=0;i{var o=n(4155),c=n(778),d=function(){},p=function(s,e,i){if("function"==typeof e)return p(s,null,e);e||(e={}),i=c(i||d);var F,a=s._writableState,y=s._readableState,b=e.readable||!1!==e.readable&&s.readable,g=e.writable||!1!==e.writable&&s.writable,E=!1,A=function(){s.writable||v()},v=function(){g=!1,b||i.call(s)},_=function(){b=!1,g||i.call(s)},P=function(F){i.call(s,F?new Error("exited with error code: "+F):null)},O=function(F){i.call(s,F)},L=function(){o.nextTick(I)},I=function(){if(!E)return(!b||y&&y.ended&&!y.destroyed)&&(!g||a&&a.ended&&!a.destroyed)?void 0:i.call(s,new Error("premature close"))},k=function(){s.req.on("finish",v)};return(F=s).setHeader&&"function"==typeof F.abort?(s.on("complete",v),s.on("abort",L),s.req?k():s.on("request",k)):g&&!a&&(s.on("end",A),s.on("close",A)),function(F){return F.stdio&&Array.isArray(F.stdio)&&3===F.stdio.length}(s)&&s.on("exit",P),s.on("end",_),s.on("finish",v),!1!==e.error&&s.on("error",O),s.on("close",L),function(){E=!0,s.removeListener("complete",v),s.removeListener("abort",L),s.removeListener("request",k),s.req&&s.req.removeListener("finish",v),s.removeListener("end",A),s.removeListener("close",A),s.removeListener("finish",v),s.removeListener("exit",P),s.removeListener("end",_),s.removeListener("error",O),s.removeListener("close",L)}};C.exports=p},7187:C=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,o=n&&"function"==typeof n.apply?n.apply:function(v,_,P){return Function.prototype.apply.call(v,_,P)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(v){return Object.getOwnPropertyNames(v).concat(Object.getOwnPropertySymbols(v))}:function(v){return Object.getOwnPropertyNames(v)};var c=Number.isNaN||function(v){return v!=v};function d(){d.init.call(this)}C.exports=d,C.exports.once=function(v,_){return new Promise(function(P,O){function L(k){v.removeListener(_,I),O(k)}function I(){"function"==typeof v.removeListener&&v.removeListener("error",L),P([].slice.call(arguments))}var k;A(v,_,I,{once:!0}),"error"!==_&&("function"==typeof(k=v).on&&A(k,"error",L,{once:!0}))})},d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var p=10;function s(v){if("function"!=typeof v)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}function e(v){return void 0===v._maxListeners?d.defaultMaxListeners:v._maxListeners}function i(v,_,P,O){var L,I,k;if(s(P),void 0===(I=v._events)?(I=v._events=Object.create(null),v._eventsCount=0):(void 0!==I.newListener&&(v.emit("newListener",_,P.listener?P.listener:P),I=v._events),k=I[_]),void 0===k)k=I[_]=P,++v._eventsCount;else if("function"==typeof k?k=I[_]=O?[P,k]:[k,P]:O?k.unshift(P):k.push(P),(L=e(v))>0&&k.length>L&&!k.warned){k.warned=!0;var G=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(_)+" listeners added. Use emitter.setMaxListeners() to increase limit");G.name="MaxListenersExceededWarning",G.emitter=v,G.type=_,G.count=k.length,console&&console.warn&&console.warn(G)}return v}function a(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(v,_,P){var O={fired:!1,wrapFn:void 0,target:v,type:_,listener:P},L=a.bind(O);return L.listener=P,O.wrapFn=L,L}function b(v,_,P){var O=v._events;if(void 0===O)return[];var L=O[_];return void 0===L?[]:"function"==typeof L?P?[L.listener||L]:[L]:P?function(I){for(var k=new Array(I.length),F=0;F0&&(I=_[0]),I instanceof Error)throw I;var k=new Error("Unhandled error."+(I?" ("+I.message+")":""));throw k.context=I,k}var F=L[v];if(void 0===F)return!1;if("function"==typeof F)o(F,this,_);else{var G=F.length,B=E(F,G);for(P=0;P=0;I--)if(P[I]===_||P[I].listener===_){k=P[I].listener,L=I;break}if(L<0)return this;0===L?P.shift():function(F,G){for(;G+1=0;O--)this.removeListener(v,_[O]);return this},d.prototype.listeners=function(v){return b(this,v,!0)},d.prototype.rawListeners=function(v){return b(this,v,!1)},d.listenerCount=function(v,_){return"function"==typeof v.listenerCount?v.listenerCount(_):g.call(v,_)},d.prototype.listenerCount=g,d.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},4063:C=>{"use strict";C.exports=function t(n,o){if(n===o)return!0;if(n&&o&&"object"==typeof n&&"object"==typeof o){if(n.constructor!==o.constructor)return!1;var c,d,p;if(Array.isArray(n)){if((c=n.length)!=o.length)return!1;for(d=c;0!=d--;)if(!t(n[d],o[d]))return!1;return!0}if(n.constructor===RegExp)return n.source===o.source&&n.flags===o.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===o.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===o.toString();if((c=(p=Object.keys(n)).length)!==Object.keys(o).length)return!1;for(d=c;0!=d--;)if(!Object.prototype.hasOwnProperty.call(o,p[d]))return!1;for(d=c;0!=d--;){var s=p[d];if(!t(n[s],o[s]))return!1}return!0}return n!=n&&o!=o}},4445:C=>{C.exports=p,p.default=p,p.stable=a,p.stableStringify=a;var t="[...]",n="[Circular]",o=[],c=[];function d(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function p(g,E,A,v){var _;void 0===v&&(v=d()),e(g,"",0,[],void 0,0,v);try{_=0===c.length?JSON.stringify(g,E,A):JSON.stringify(g,b(E),A)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var P=o.pop();4===P.length?Object.defineProperty(P[0],P[1],P[3]):P[0][P[1]]=P[2]}}return _}function s(g,E,A,v){var _=Object.getOwnPropertyDescriptor(v,A);void 0!==_.get?_.configurable?(Object.defineProperty(v,A,{value:g}),o.push([v,A,E,_])):c.push([E,A,g]):(v[A]=g,o.push([v,A,E]))}function e(g,E,A,v,_,P,O){var L;if(P+=1,"object"==typeof g&&null!==g){for(L=0;LO.depthLimit||void 0!==O.edgesLimit&&A+1>O.edgesLimit)return void s(t,g,E,_);if(v.push(g),Array.isArray(g))for(L=0;LE?1:0}function a(g,E,A,v){void 0===v&&(v=d());var _,P=y(g,"",0,[],void 0,0,v)||g;try{_=0===c.length?JSON.stringify(P,E,A):JSON.stringify(P,b(E),A)}catch{return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==o.length;){var O=o.pop();4===O.length?Object.defineProperty(O[0],O[1],O[3]):O[0][O[1]]=O[2]}}return _}function y(g,E,A,v,_,P,O){var L;if(P+=1,"object"==typeof g&&null!==g){for(L=0;LO.depthLimit||void 0!==O.edgesLimit&&A+1>O.edgesLimit)return void s(t,g,E,_);if(v.push(g),Array.isArray(g))for(L=0;L0)for(var v=0;v{t.read=function(n,o,c,d,p){var s,e,i=8*p-d-1,a=(1<>1,b=-7,g=c?p-1:0,E=c?-1:1,A=n[o+g];for(g+=E,s=A&(1<<-b)-1,A>>=-b,b+=i;b>0;s=256*s+n[o+g],g+=E,b-=8);for(e=s&(1<<-b)-1,s>>=-b,b+=d;b>0;e=256*e+n[o+g],g+=E,b-=8);if(0===s)s=1-y;else{if(s===a)return e?NaN:1/0*(A?-1:1);e+=Math.pow(2,d),s-=y}return(A?-1:1)*e*Math.pow(2,s-d)},t.write=function(n,o,c,d,p,s){var e,i,a,y=8*s-p-1,b=(1<>1,E=23===p?Math.pow(2,-24)-Math.pow(2,-77):0,A=d?0:s-1,v=d?1:-1,_=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(i=isNaN(o)?1:0,e=b):(e=Math.floor(Math.log(o)/Math.LN2),o*(a=Math.pow(2,-e))<1&&(e--,a*=2),(o+=e+g>=1?E/a:E*Math.pow(2,1-g))*a>=2&&(e++,a/=2),e+g>=b?(i=0,e=b):e+g>=1?(i=(o*a-1)*Math.pow(2,p),e+=g):(i=o*Math.pow(2,g-1)*Math.pow(2,p),e=0));p>=8;n[c+A]=255&i,A+=v,i/=256,p-=8);for(e=e<0;n[c+A]=255&e,A+=v,e/=256,y-=8);n[c+A-v]|=128*_}},4970:C=>{"use strict";const t=n=>null!==n&&"object"==typeof n&&"function"==typeof n.pipe;t.writable=n=>t(n)&&!1!==n.writable&&"function"==typeof n._write&&"object"==typeof n._writableState,t.readable=n=>t(n)&&!1!==n.readable&&"function"==typeof n._read&&"object"==typeof n._readableState,t.duplex=n=>t.writable(n)&&t.readable(n),t.transform=n=>t.duplex(n)&&"function"==typeof n._transform,C.exports=t},2378:(C,t,n)=>{C=n.nmd(C);var o="__lodash_hash_undefined__",c=9007199254740991,d="[object Arguments]",s="[object Function]",a="[object Object]",g=/^\[object .+?Constructor\]$/,E=/^(?:0|[1-9]\d*)$/,A={};A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A[d]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object Boolean]"]=A["[object DataView]"]=A["[object Date]"]=A["[object Error]"]=A[s]=A["[object Map]"]=A["[object Number]"]=A[a]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object WeakMap]"]=!1;var v,_,P,O="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,L="object"==typeof self&&self&&self.Object===Object&&self,I=O||L||Function("return this")(),k=t&&!t.nodeType&&t,F=k&&C&&!C.nodeType&&C,G=F&&F.exports===k,B=G&&O.process,T=function(){try{return F&&F.require&&F.require("util").types||B&&B.binding&&B.binding("util")}catch{}}(),Q=T&&T.isTypedArray,D=Array.prototype,we=Object.prototype,re=I["__core-js_shared__"],U=Function.prototype.toString,ie=we.hasOwnProperty,K=(v=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",X=we.toString,te=U.call(Object),ee=RegExp("^"+U.call(ie).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=G?I.Buffer:void 0,W=I.Symbol,ue=I.Uint8Array,se=(_=Object.getPrototypeOf,P=Object,function(Y){return _(P(Y))}),me=Object.create,ve=we.propertyIsEnumerable,Se=D.splice,H=W?W.toStringTag:void 0,ce=function(){try{var Y=Re(Object,"defineProperty");return Y({},"",{}),Y}catch{}}(),ye=Z?Z.isBuffer:void 0,_e=Math.max,$=Date.now,z=Re(I,"Map"),ae=Re(Object,"create"),fe=function(){function Y(){}return function(R){if(!rt(R))return{};if(me)return me(R);Y.prototype=R;var u=new Y;return Y.prototype=void 0,u}}();function de(Y){var R=-1,u=null==Y?0:Y.length;for(this.clear();++R-1},r.prototype.set=function(Y,R){var u=this.__data__,w=m(u,Y);return w<0?(++this.size,u.push([Y,R])):u[w][1]=R,this},l.prototype.clear=function(){this.size=0,this.__data__={hash:new de,map:new(z||r),string:new de}},l.prototype.delete=function(Y){var R=le(this,Y).delete(Y);return this.size-=R?1:0,R},l.prototype.get=function(Y){return le(this,Y).get(Y)},l.prototype.has=function(Y){return le(this,Y).has(Y)},l.prototype.set=function(Y,R){var u=le(this,Y),w=u.size;return u.set(Y,R),this.size+=u.size==w?0:1,this},h.prototype.clear=function(){this.__data__=new r,this.size=0},h.prototype.delete=function(Y){var R=this.__data__,u=R.delete(Y);return this.size=R.size,u},h.prototype.get=function(Y){return this.__data__.get(Y)},h.prototype.has=function(Y){return this.__data__.has(Y)},h.prototype.set=function(Y,R){var u=this.__data__;if(u instanceof r){var w=u.__data__;if(!z||w.length<199)return w.push([Y,R]),this.size=++u.size,this;u=this.__data__=new l(w)}return u.set(Y,R),this.size=u.size,this};var J=ce?function(Y,R){return ce(Y,"toString",{configurable:!0,enumerable:!1,value:(u=R,function(){return u}),writable:!0});var u}:gt;function le(Y,R){var u,w,x=Y.__data__;return("string"==(w=typeof(u=R))||"number"==w||"symbol"==w||"boolean"==w?"__proto__"!==u:null===u)?x["string"==typeof R?"string":"hash"]:x.map}function Re(Y,R){var w,u=null==(w=Y)?void 0:w[R];return function(w){return!(!rt(w)||function(x){return!!K&&K in x}(w))&&(st(w)?ee:g).test(function(x){if(null!=x){try{return U.call(x)}catch{}try{return x+""}catch{}}return""}(w))}(u)?u:void 0}function Ce(Y,R){var u=typeof Y;return!!(R=R??c)&&("number"==u||"symbol"!=u&&E.test(Y))&&Y>-1&&Y%1==0&&Y0){if(++R>=800)return arguments[0]}else R=0;return Y.apply(void 0,arguments)});function We(Y,R){return Y===R||Y!=Y&&R!=R}var Ve=N(function(){return arguments}())?N:function(Y){return nt(Y)&&ie.call(Y,"callee")&&!ve.call(Y,"callee")},Je=Array.isArray;function He(Y){return null!=Y&&ft(Y.length)&&!st(Y)}var ct=ye||function(){return!1};function st(Y){if(!rt(Y))return!1;var R=S(Y);return R==s||"[object GeneratorFunction]"==R||"[object AsyncFunction]"==R||"[object Proxy]"==R}function ft(Y){return"number"==typeof Y&&Y>-1&&Y%1==0&&Y<=c}function rt(Y){var R=typeof Y;return null!=Y&&("object"==R||"function"==R)}function nt(Y){return null!=Y&&"object"==typeof Y}var ht=Q?function(Y){return function(R){return Y(R)}}(Q):function(Y){return nt(Y)&&ft(Y.length)&&!!A[S(Y)]};function pt(Y){return He(Y)?function(R,u){var w=Je(R),x=!w&&Ve(R),q=!w&&!x&&ct(R),ne=!w&&!x&&!q&&ht(R),oe=w||x||q||ne,he=oe?function(Ee,Ae){for(var Le=-1,Ne=Array(Ee);++Le1?R[w-1]:void 0,q=w>2?R[2]:void 0;for(x=at.length>3&&"function"==typeof x?(w--,x):void 0,q&&function(oe,he,pe){if(!rt(pe))return!1;var be=typeof he;return!!("number"==be?He(pe)&&Ce(he,pe.length):"string"==be&&he in pe)&&We(pe[he],oe)}(R[0],R[1],q)&&(x=w<3?void 0:x,w=1),Y=Object(Y);++u=0&&D<=G.levels.SILENT))throw"log.setLevel() called with invalid level: "+D;if(F=D,!1!==ge&&function(we){var re=(a[we]||"silent").toUpperCase();if(typeof window!==e&&B){try{return void(window.localStorage[B]=re)}catch{}try{window.document.cookie=encodeURIComponent(B)+"="+re+";"}catch{}}}(D),g.call(G,D,L),typeof console===e&&D{var t=1e3,n=60*t,o=60*n,c=24*o;function d(p,s,e,i){var a=s>=1.5*e;return Math.round(p/e)+" "+i+(a?"s":"")}C.exports=function(p,s){s=s||{};var e,i,y,b,a=typeof p;if("string"===a&&p.length>0)return function(y){if(!((y=String(y)).length>100)){var b=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(y);if(b){var g=parseFloat(b[1]);switch((b[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*g;case"weeks":case"week":case"w":return 6048e5*g;case"days":case"day":case"d":return g*c;case"hours":case"hour":case"hrs":case"hr":case"h":return g*o;case"minutes":case"minute":case"mins":case"min":case"m":return g*n;case"seconds":case"second":case"secs":case"sec":case"s":return g*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return g;default:return}}}}(p);if("number"===a&&isFinite(p))return s.long?(e=p,(i=Math.abs(e))>=c?d(e,i,c,"day"):i>=o?d(e,i,o,"hour"):i>=n?d(e,i,n,"minute"):i>=t?d(e,i,t,"second"):e+" ms"):(y=p,(b=Math.abs(y))>=c?Math.round(y/c)+"d":b>=o?Math.round(y/o)+"h":b>=n?Math.round(y/n)+"m":b>=t?Math.round(y/t)+"s":y+"ms");throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(p))}},778:(C,t,n)=>{var o=n(2479);function c(p){var s=function(){return s.called?s.value:(s.called=!0,s.value=p.apply(this,arguments))};return s.called=!1,s}function d(p){var s=function(){if(s.called)throw new Error(s.onceError);return s.called=!0,s.value=p.apply(this,arguments)};return s.onceError=(p.name||"Function wrapped with `once`")+" shouldn't be called more than once",s.called=!1,s}C.exports=o(c),C.exports.strict=o(d),c.proto=c(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return c(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return d(this)},configurable:!0})})},4155:C=>{var t,n,o=C.exports={};function c(){throw new Error("setTimeout has not been defined")}function d(){throw new Error("clearTimeout has not been defined")}function p(A){if(t===setTimeout)return setTimeout(A,0);if((t===c||!t)&&setTimeout)return t=setTimeout,setTimeout(A,0);try{return t(A,0)}catch{try{return t.call(null,A,0)}catch{return t.call(this,A,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:c}catch{t=c}try{n="function"==typeof clearTimeout?clearTimeout:d}catch{n=d}}();var s,e=[],i=!1,a=-1;function y(){i&&s&&(i=!1,s.length?e=s.concat(e):a=-1,e.length&&b())}function b(){if(!i){var A=p(y);i=!0;for(var v=e.length;v;){for(s=e,e=[];++a1)for(var _=1;_{var o=n(4155),c=n(778),d=n(2840),p=n(1156),s=function(){},e=/^v?\.0/.test(o.version),i=function(b){return"function"==typeof b},a=function(b){b()},y=function(b,g){return b.pipe(g)};C.exports=function(){var b,g=Array.prototype.slice.call(arguments),E=i(g[g.length-1]||s)&&g.pop()||s;if(Array.isArray(g[0])&&(g=g[0]),g.length<2)throw new Error("pump requires two streams per minimum");var A=g.map(function(v,_){var P=_0,function(O){b||(b=O),O&&A.forEach(a),P||(A.forEach(a),E(b))})});return g.reduce(y)}},196:(C,t,n)=>{"use strict";const{AbortError:o,codes:c}=n(4381),{isNodeStream:d,isWebStream:p,kControllerErrorFunction:s}=n(5874),e=n(8610),{ERR_INVALID_ARG_TYPE:i}=c;C.exports.addAbortSignal=function(a,y){if(((b,g)=>{if("object"!=typeof b||!("aborted"in b))throw new i("signal","AbortSignal",b)})(a),!d(y)&&!p(y))throw new i("stream",["ReadableStream","WritableStream","Stream"],y);return C.exports.addAbortSignalNoValidate(a,y)},C.exports.addAbortSignalNoValidate=function(a,y){if("object"!=typeof a||!("aborted"in a))return y;const b=d(y)?()=>{y.destroy(new o(void 0,{cause:a.reason}))}:()=>{y[s](new o(void 0,{cause:a.reason}))};return a.aborted?b():(a.addEventListener("abort",b),e(y,()=>a.removeEventListener("abort",b))),y}},7327:(C,t,n)=>{"use strict";const{StringPrototypeSlice:o,SymbolIterator:c,TypedArrayPrototypeSet:d,Uint8Array:p}=n(9061),{Buffer:s}=n(8764),{inspect:e}=n(6087);C.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(i){const a={data:i,next:null};this.length>0?this.tail.next=a:this.head=a,this.tail=a,++this.length}unshift(i){const a={data:i,next:this.head};0===this.length&&(this.tail=a),this.head=a,++this.length}shift(){if(0===this.length)return;const i=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,i}clear(){this.head=this.tail=null,this.length=0}join(i){if(0===this.length)return"";let a=this.head,y=""+a.data;for(;null!==(a=a.next);)y+=i+a.data;return y}concat(i){if(0===this.length)return s.alloc(0);const a=s.allocUnsafe(i>>>0);let y=this.head,b=0;for(;y;)d(a,y.data,b),b+=y.data.length,y=y.next;return a}consume(i,a){const y=this.head.data;if(ig.length)){i===g.length?(a+=g,++b,this.head=y.next?y.next:this.tail=null):(a+=o(g,0,i),this.head=y,y.data=o(g,i));break}a+=g,i-=g.length,++b}while(null!==(y=y.next));return this.length-=b,a}_getBuffer(i){const a=s.allocUnsafe(i),y=i;let b=this.head,g=0;do{const E=b.data;if(!(i>E.length)){i===E.length?(d(a,E,y-i),++g,this.head=b.next?b.next:this.tail=null):(d(a,new p(E.buffer,E.byteOffset,i),y-i),this.head=b,b.data=E.slice(i));break}d(a,E,y-i),i-=E.length,++g}while(null!==(b=b.next));return this.length-=g,a}[Symbol.for("nodejs.util.inspect.custom")](i,a){return e(this,{...a,depth:0,customInspect:!1})}}},299:(C,t,n)=>{"use strict";const{pipeline:o}=n(9946),c=n(8672),{destroyer:d}=n(1195),{isNodeStream:p,isReadable:s,isWritable:e,isWebStream:i,isTransformStream:a,isWritableStream:y,isReadableStream:b}=n(5874),{AbortError:g,codes:{ERR_INVALID_ARG_VALUE:E,ERR_MISSING_ARGS:A}}=n(4381),v=n(8610);C.exports=function(..._){if(0===_.length)throw new A("streams");if(1===_.length)return c.from(_[0]);const P=[..._];if("function"==typeof _[0]&&(_[0]=c.from(_[0])),"function"==typeof _[_.length-1]){const D=_.length-1;_[D]=c.from(_[D])}for(let D=0;D<_.length;++D)if(p(_[D])||i(_[D])){if(D<_.length-1&&!(s(_[D])||b(_[D])||a(_[D])))throw new E(`streams[${D}]`,P[D],"must be readable");if(D>0&&!(e(_[D])||y(_[D])||a(_[D])))throw new E(`streams[${D}]`,P[D],"must be writable")}let O,L,I,k,F;const G=_[0],B=o(_,function(D){const ge=k;k=null,ge?ge(D):D?F.destroy(D):Q||T||F.destroy()}),T=!!(e(G)||y(G)||a(G)),Q=!!(s(B)||b(B)||a(B));if(F=new c({writableObjectMode:!(null==G||!G.writableObjectMode),readableObjectMode:!(null==B||!B.writableObjectMode),writable:T,readable:Q}),T){if(p(G))F._write=function(ge,we,re){G.write(ge,we)?re():O=re},F._final=function(ge){G.end(),L=ge},G.on("drain",function(){if(O){const ge=O;O=null,ge()}});else if(i(G)){const ge=(a(G)?G.writable:G).getWriter();F._write=function(){var we=Ie(function*(re,U,ie){try{yield ge.ready,ge.write(re).catch(()=>{}),ie()}catch(K){ie(K)}});return function(re,U,ie){return we.apply(this,arguments)}}(),F._final=function(){var we=Ie(function*(re){try{yield ge.ready,ge.close().catch(()=>{}),L=re}catch(U){re(U)}});return function(re){return we.apply(this,arguments)}}()}const D=a(B)?B.readable:B;v(D,()=>{if(L){const ge=L;L=null,ge()}})}if(Q)if(p(B))B.on("readable",function(){if(I){const D=I;I=null,D()}}),B.on("end",function(){F.push(null)}),F._read=function(){for(;;){const D=B.read();if(null===D)return void(I=F._read);if(!F.push(D))return}};else if(i(B)){const D=(a(B)?B.readable:B).getReader();F._read=Ie(function*(){for(;;)try{const{value:ge,done:we}=yield D.read();if(!F.push(ge))return;if(we)return void F.push(null)}catch{return}})}return F._destroy=function(D,ge){D||null===k||(D=new g),I=null,O=null,L=null,null===k?ge(D):(k=ge,p(B)&&d(B,D))},F}},1195:(C,t,n)=>{"use strict";const o=n(4155),{aggregateTwoErrors:c,codes:{ERR_MULTIPLE_CALLBACK:d},AbortError:p}=n(4381),{Symbol:s}=n(9061),{kDestroyed:e,isDestroyed:i,isFinished:a,isServerRequest:y}=n(5874),b=s("kDestroy"),g=s("kConstruct");function E(B,T,Q){B&&(T&&!T.errored&&(T.errored=B),Q&&!Q.errored&&(Q.errored=B))}function A(B,T,Q){let D=!1;function ge(we){if(D)return;D=!0;const re=B._readableState,U=B._writableState;E(we,U,re),U&&(U.closed=!0),re&&(re.closed=!0),"function"==typeof Q&&Q(we),we?o.nextTick(v,B,we):o.nextTick(_,B)}try{B._destroy(T||null,ge)}catch(we){ge(we)}}function v(B,T){P(B,T),_(B)}function _(B){const T=B._readableState,Q=B._writableState;Q&&(Q.closeEmitted=!0),T&&(T.closeEmitted=!0),(null!=Q&&Q.emitClose||null!=T&&T.emitClose)&&B.emit("close")}function P(B,T){const Q=B._readableState,D=B._writableState;null!=D&&D.errorEmitted||null!=Q&&Q.errorEmitted||(D&&(D.errorEmitted=!0),Q&&(Q.errorEmitted=!0),B.emit("error",T))}function O(B,T,Q){const D=B._readableState,ge=B._writableState;if(null!=ge&&ge.destroyed||null!=D&&D.destroyed)return this;null!=D&&D.autoDestroy||null!=ge&&ge.autoDestroy?B.destroy(T):T&&(ge&&!ge.errored&&(ge.errored=T),D&&!D.errored&&(D.errored=T),Q?o.nextTick(P,B,T):P(B,T))}function L(B){let T=!1;function Q(D){if(T)return void O(B,D??new d);T=!0;const ge=B._readableState,we=B._writableState,re=we||ge;ge&&(ge.constructed=!0),we&&(we.constructed=!0),re.destroyed?B.emit(b,D):D?O(B,D,!0):o.nextTick(I,B)}try{B._construct(D=>{o.nextTick(Q,D)})}catch(D){o.nextTick(Q,D)}}function I(B){B.emit(g)}function k(B){return(null==B?void 0:B.setHeader)&&"function"==typeof B.abort}function F(B){B.emit("close")}function G(B,T){B.emit("error",T),o.nextTick(F,B)}C.exports={construct:function(B,T){if("function"!=typeof B._construct)return;const Q=B._readableState,D=B._writableState;Q&&(Q.constructed=!1),D&&(D.constructed=!1),B.once(g,T),B.listenerCount(g)>1||o.nextTick(L,B)},destroyer:function(B,T){B&&!i(B)&&(T||a(B)||(T=new p),y(B)?(B.socket=null,B.destroy(T)):k(B)?B.abort():k(B.req)?B.req.abort():"function"==typeof B.destroy?B.destroy(T):"function"==typeof B.close?B.close():T?o.nextTick(G,B,T):o.nextTick(F,B),B.destroyed||(B[e]=!0))},destroy:function(B,T){const Q=this._readableState,D=this._writableState,ge=D||Q;return null!=D&&D.destroyed||null!=Q&&Q.destroyed?("function"==typeof T&&T(),this):(E(B,D,Q),D&&(D.destroyed=!0),Q&&(Q.destroyed=!0),ge.constructed?A(this,B,T):this.once(b,function(we){A(this,c(we,B),T)}),this)},undestroy:function(){const B=this._readableState,T=this._writableState;B&&(B.constructed=!0,B.closed=!1,B.closeEmitted=!1,B.destroyed=!1,B.errored=null,B.errorEmitted=!1,B.reading=!1,B.ended=!1===B.readable,B.endEmitted=!1===B.readable),T&&(T.constructed=!0,T.destroyed=!1,T.closed=!1,T.closeEmitted=!1,T.errored=null,T.errorEmitted=!1,T.finalCalled=!1,T.prefinished=!1,T.ended=!1===T.writable,T.ending=!1===T.writable,T.finished=!1===T.writable)},errorOrDestroy:O}},8672:(C,t,n)=>{"use strict";const{ObjectDefineProperties:o,ObjectGetOwnPropertyDescriptor:c,ObjectKeys:d,ObjectSetPrototypeOf:p}=n(9061);C.exports=i;const s=n(911),e=n(6304);p(i.prototype,s.prototype),p(i,s);{const g=d(e.prototype);for(let E=0;E{const o=n(4155),c=n(8764),{isReadable:d,isWritable:p,isIterable:s,isNodeStream:e,isReadableNodeStream:i,isWritableNodeStream:a,isDuplexNodeStream:y}=n(5874),b=n(8610),{AbortError:g,codes:{ERR_INVALID_ARG_TYPE:E,ERR_INVALID_RETURN_VALUE:A}}=n(4381),{destroyer:v}=n(1195),_=n(8672),P=n(911),{createDeferredPromise:O}=n(6087),L=n(6307),I=globalThis.Blob||c.Blob,k=void 0!==I?function(Q){return Q instanceof I}:function(Q){return!1},F=globalThis.AbortController||n(8599).AbortController,{FunctionPrototypeCall:G}=n(9061);class B extends _{constructor(D){super(D),!1===(null==D?void 0:D.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==D?void 0:D.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function T(Q){const D=Q.readable&&"function"!=typeof Q.readable.read?P.wrap(Q.readable):Q.readable,ge=Q.writable;let we,re,U,ie,K,X=!!d(D),te=!!p(ge);function ee(Z){const W=ie;ie=null,W?W(Z):Z&&K.destroy(Z)}return K=new B({readableObjectMode:!(null==D||!D.readableObjectMode),writableObjectMode:!(null==ge||!ge.writableObjectMode),readable:X,writable:te}),te&&(b(ge,Z=>{te=!1,Z&&v(D,Z),ee(Z)}),K._write=function(Z,W,ue){ge.write(Z,W)?ue():we=ue},K._final=function(Z){ge.end(),re=Z},ge.on("drain",function(){if(we){const Z=we;we=null,Z()}}),ge.on("finish",function(){if(re){const Z=re;re=null,Z()}})),X&&(b(D,Z=>{X=!1,Z&&v(D,Z),ee(Z)}),D.on("readable",function(){if(U){const Z=U;U=null,Z()}}),D.on("end",function(){K.push(null)}),K._read=function(){for(;;){const Z=D.read();if(null===Z)return void(U=K._read);if(!K.push(Z))return}}),K._destroy=function(Z,W){Z||null===ie||(Z=new g),U=null,we=null,re=null,null===ie?W(Z):(ie=W,v(ge,Z),v(D,Z))},K}C.exports=function Q(D,ge){if(y(D))return D;if(i(D))return T({readable:D});if(a(D))return T({writable:D});if(e(D))return T({writable:!1,readable:!1});if("function"==typeof D){const{value:re,write:U,final:ie,destroy:K}=function(te){let{promise:ee,resolve:Z}=O();const W=new F,ue=W.signal;return{value:te(Me(function*(){for(;;){const se=ee;ee=null;const{chunk:me,done:ve,cb:Se}=yield xe(se);if(o.nextTick(Se),ve)return;if(ue.aborted)throw new g(void 0,{cause:ue.reason});({promise:ee,resolve:Z}=O()),yield me}})(),{signal:ue}),write(se,me,ve){const Se=Z;Z=null,Se({chunk:se,done:!1,cb:ve})},final(se){const me=Z;Z=null,me({done:!0,cb:se})},destroy(se,me){W.abort(),me(se)}}}(D);if(s(re))return L(B,re,{objectMode:!0,write:U,final:ie,destroy:K});const X=null==re?void 0:re.then;if("function"==typeof X){let te;const ee=G(X,re,Z=>{if(null!=Z)throw new A("nully","body",Z)},Z=>{v(te,Z)});return te=new B({objectMode:!0,readable:!1,write:U,final(Z){ie(Ie(function*(){try{yield ee,o.nextTick(Z,null)}catch(W){o.nextTick(Z,W)}}))},destroy:K})}throw new A("Iterable, AsyncIterable or AsyncFunction",ge,re)}if(k(D))return Q(D.arrayBuffer());if(s(D))return L(B,D,{objectMode:!0,writable:!1});if("object"==typeof(null==D?void 0:D.writable)||"object"==typeof(null==D?void 0:D.readable))return T({readable:null!=D&&D.readable?i(null==D?void 0:D.readable)?null==D?void 0:D.readable:Q(D.readable):void 0,writable:null!=D&&D.writable?a(null==D?void 0:D.writable)?null==D?void 0:D.writable:Q(D.writable):void 0});const we=null==D?void 0:D.then;if("function"==typeof we){let re;return G(we,D,U=>{null!=U&&re.push(U),re.push(null)},U=>{v(re,U)}),re=new B({objectMode:!0,writable:!1,read(){}})}throw new E(ge,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],D)}},8610:(C,t,n)=>{const o=n(4155),{AbortError:c,codes:d}=n(4381),{ERR_INVALID_ARG_TYPE:p,ERR_STREAM_PREMATURE_CLOSE:s}=d,{kEmptyObject:e,once:i}=n(6087),{validateAbortSignal:a,validateFunction:y,validateObject:b,validateBoolean:g}=n(6547),{Promise:E,PromisePrototypeThen:A}=n(9061),{isClosed:v,isReadable:_,isReadableNodeStream:P,isReadableStream:O,isReadableFinished:L,isReadableErrored:I,isWritable:k,isWritableNodeStream:F,isWritableStream:G,isWritableFinished:B,isWritableErrored:T,isNodeStream:Q,willEmitClose:D,kIsClosedPromise:ge}=n(5874),we=()=>{};function re(U,ie,K){var X,te;if(2===arguments.length?(K=ie,ie=e):null==ie?ie=e:b(ie,"options"),y(K,"callback"),a(ie.signal,"options.signal"),K=i(K),O(U)||G(U))return function(de,r,l){let h=!1,M=we;if(r.signal)if(M=()=>{h=!0,l.call(de,new c(void 0,{cause:r.signal.reason}))},r.signal.aborted)o.nextTick(M);else{const m=l;l=i((...V)=>{r.signal.removeEventListener("abort",M),m.apply(de,V)}),r.signal.addEventListener("abort",M)}const f=(...m)=>{h||o.nextTick(()=>l.apply(de,m))};return A(de[ge].promise,f,f),we}(U,ie,K);if(!Q(U))throw new p("stream",["ReadableStream","WritableStream","Stream"],U);const ee=null!==(X=ie.readable)&&void 0!==X?X:P(U),Z=null!==(te=ie.writable)&&void 0!==te?te:F(U),W=U._writableState,ue=U._readableState,se=()=>{U.writable||Se()};let me=D(U)&&P(U)===ee&&F(U)===Z,ve=B(U,!1);const Se=()=>{ve=!0,U.destroyed&&(me=!1),(!me||U.readable&&!ee)&&(ee&&!H||K.call(U))};let H=L(U,!1);const ce=()=>{H=!0,U.destroyed&&(me=!1),(!me||U.writable&&!Z)&&(Z&&!ve||K.call(U))},ye=de=>{K.call(U,de)};let _e=v(U);const $=()=>{_e=!0;const de=T(U)||I(U);return de&&"boolean"!=typeof de?K.call(U,de):ee&&!H&&P(U,!0)&&!L(U,!1)?K.call(U,new s):!Z||ve||B(U,!1)?void K.call(U):K.call(U,new s)},z=()=>{_e=!0;const de=T(U)||I(U);if(de&&"boolean"!=typeof de)return K.call(U,de);K.call(U)},ae=()=>{U.req.on("finish",Se)};var de;(de=U).setHeader&&"function"==typeof de.abort?(U.on("complete",Se),me||U.on("abort",$),U.req?ae():U.on("request",ae)):Z&&!W&&(U.on("end",se),U.on("close",se)),me||"boolean"!=typeof U.aborted||U.on("aborted",$),U.on("end",ce),U.on("finish",Se),!1!==ie.error&&U.on("error",ye),U.on("close",$),_e?o.nextTick($):null!=W&&W.errorEmitted||null!=ue&&ue.errorEmitted?me||o.nextTick(z):(ee||me&&!_(U)||!ve&&!1!==k(U))&&(Z||me&&!k(U)||!H&&!1!==_(U))?ue&&U.req&&U.aborted&&o.nextTick(z):o.nextTick(z);const fe=()=>{K=we,U.removeListener("aborted",$),U.removeListener("complete",Se),U.removeListener("abort",$),U.removeListener("request",ae),U.req&&U.req.removeListener("finish",Se),U.removeListener("end",se),U.removeListener("close",se),U.removeListener("finish",Se),U.removeListener("end",ce),U.removeListener("error",ye),U.removeListener("close",$)};if(ie.signal&&!_e){const de=()=>{const r=K;fe(),r.call(U,new c(void 0,{cause:ie.signal.reason}))};if(ie.signal.aborted)o.nextTick(de);else{const r=K;K=i((...l)=>{ie.signal.removeEventListener("abort",de),r.apply(U,l)}),ie.signal.addEventListener("abort",de)}}return fe}C.exports=re,C.exports.finished=function(U,ie){var K;let X=!1;return null===ie&&(ie=e),null!==(K=ie)&&void 0!==K&&K.cleanup&&(g(ie.cleanup,"cleanup"),X=ie.cleanup),new E((te,ee)=>{const Z=re(U,ie,W=>{X&&Z(),W?ee(W):te()})})}},6307:(C,t,n)=>{"use strict";const o=n(4155),{PromisePrototypeThen:c,SymbolAsyncIterator:d,SymbolIterator:p}=n(9061),{Buffer:s}=n(8764),{ERR_INVALID_ARG_TYPE:e,ERR_STREAM_NULL_VALUES:i}=n(4381).codes;C.exports=function(a,y,b){let g,E;if("string"==typeof y||y instanceof s)return new a({objectMode:!0,...b,read(){this.push(y),this.push(null)}});if(y&&y[d])E=!0,g=y[d]();else{if(!y||!y[p])throw new e("iterable",["Iterable"],y);E=!1,g=y[p]()}const A=new a({objectMode:!0,highWaterMark:1,...b});let v=!1;return A._read=function(){v||(v=!0,Ie(function*(){for(;;){try{const{value:_,done:P}=E?yield g.next():g.next();if(P)A.push(null);else{const O=_&&"function"==typeof _.then?yield _:_;if(null===O)throw v=!1,new i;if(A.push(O))continue;v=!1}}catch(_){A.destroy(_)}break}})())},A._destroy=function(_,P){var O;c((O=Ie(function*(L){if(null!=L&&"function"==typeof g.throw){const{value:F,done:G}=yield g.throw(L);if(yield F,G)return}if("function"==typeof g.return){const{value:F}=yield g.return();yield F}}),function(L){return O.apply(this,arguments)})(_),()=>o.nextTick(P,_),O=>o.nextTick(P,O||_))},A}},4870:(C,t,n)=>{"use strict";const{ArrayIsArray:o,ObjectSetPrototypeOf:c}=n(9061),{EventEmitter:d}=n(7187);function p(e){d.call(this,e)}function s(e,i,a){if("function"==typeof e.prependListener)return e.prependListener(i,a);e._events&&e._events[i]?o(e._events[i])?e._events[i].unshift(a):e._events[i]=[a,e._events[i]]:e.on(i,a)}c(p.prototype,d.prototype),c(p,d),p.prototype.pipe=function(e,i){const a=this;function y(P){e.writable&&!1===e.write(P)&&a.pause&&a.pause()}function b(){a.readable&&a.resume&&a.resume()}a.on("data",y),e.on("drain",b),e._isStdio||i&&!1===i.end||(a.on("end",E),a.on("close",A));let g=!1;function E(){g||(g=!0,e.end())}function A(){g||(g=!0,"function"==typeof e.destroy&&e.destroy())}function v(P){_(),0===d.listenerCount(this,"error")&&this.emit("error",P)}function _(){a.removeListener("data",y),e.removeListener("drain",b),a.removeListener("end",E),a.removeListener("close",A),a.removeListener("error",v),e.removeListener("error",v),a.removeListener("end",_),a.removeListener("close",_),e.removeListener("close",_)}return s(a,"error",v),s(e,"error",v),a.on("end",_),a.on("close",_),e.on("close",_),e.emit("pipe",a),e},C.exports={Stream:p,prependListener:s}},4382:(C,t,n)=>{"use strict";const o=globalThis.AbortController||n(8599).AbortController,{codes:{ERR_INVALID_ARG_VALUE:c,ERR_INVALID_ARG_TYPE:d,ERR_MISSING_ARGS:p,ERR_OUT_OF_RANGE:s},AbortError:e}=n(4381),{validateAbortSignal:i,validateInteger:a,validateObject:y}=n(6547),b=n(9061).Symbol("kWeak"),{finished:g}=n(8610),E=n(299),{addAbortSignalNoValidate:A}=n(196),{isWritable:v,isNodeStream:_}=n(5874),{ArrayPrototypePush:P,MathFloor:O,Number:L,NumberIsNaN:I,Promise:k,PromiseReject:F,PromisePrototypeThen:G,Symbol:B}=n(9061),T=B("kEmpty"),Q=B("kEof");function D(K,X){if("function"!=typeof K)throw new d("fn",["Function","AsyncFunction"],K);null!=X&&y(X,"options"),null!=(null==X?void 0:X.signal)&&i(X.signal,"options.signal");let te=1;return null!=(null==X?void 0:X.concurrency)&&(te=O(X.concurrency)),a(te,"concurrency",1),Me(function*(){var ee,Z;const W=new o,ue=this,se=[],me=W.signal,ve={signal:me},Se=()=>W.abort();let H,ce;null!=X&&null!==(ee=X.signal)&&void 0!==ee&&ee.aborted&&Se(),null==X||null===(Z=X.signal)||void 0===Z||Z.addEventListener("abort",Se);let ye=!1;function _e(){ye=!0}Ie(function*(){try{var ae,$=!1,z=!1;try{for(var de,fe=Oe(ue);$=!(de=yield fe.next()).done;$=!1){let h=de.value;var r;if(ye)return;if(me.aborted)throw new e;try{h=K(h,ve)}catch(M){h=F(M)}h!==T&&("function"==typeof(null===(r=h)||void 0===r?void 0:r.catch)&&h.catch(_e),se.push(h),H&&(H(),H=null),!ye&&se.length&&se.length>=te&&(yield new k(M=>{ce=M})))}}catch(h){z=!0,ae=h}finally{try{$&&null!=fe.return&&(yield fe.return())}finally{if(z)throw ae}}se.push(Q)}catch(h){const M=F(h);G(M,void 0,_e),se.push(M)}finally{var l;ye=!0,H&&(H(),H=null),null==X||null===(l=X.signal)||void 0===l||l.removeEventListener("abort",Se)}})();try{for(;;){for(;se.length>0;){const $=yield xe(se[0]);if($===Q)return;if(me.aborted)throw new e;$!==T&&(yield $),se.shift(),ce&&(ce(),ce=null)}yield xe(new k($=>{H=$}))}}finally{W.abort(),ye=!0,ce&&(ce(),ce=null)}}).call(this)}function ge(K){return we.apply(this,arguments)}function we(){return(we=Ie(function*(K,X){var Z,te=!1,ee=!1;try{for(var W=Oe(re.call(this,K,X));te=!(yield W.next()).done;te=!1)return!0}catch(se){ee=!0,Z=se}finally{try{te&&null!=W.return&&(yield W.return())}finally{if(ee)throw Z}}return!1})).apply(this,arguments)}function re(K,X){if("function"!=typeof K)throw new d("fn",["Function","AsyncFunction"],K);return D.call(this,function(){var te=Ie(function*(ee,Z){return(yield K(ee,Z))?ee:T});return function(ee,Z){return te.apply(this,arguments)}}(),X)}class U extends p{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function ie(K){if(K=L(K),I(K))return 0;if(K<0)throw new s("number",">= 0",K);return K}var K;C.exports.streamReturningOperators={asIndexedPairs:function(K){return null!=K&&y(K,"options"),null!=(null==K?void 0:K.signal)&&i(K.signal,"options.signal"),Me(function*(){let X=0;var Z,te=!1,ee=!1;try{for(var ue,W=Oe(this);te=!(ue=yield xe(W.next())).done;te=!1){const me=ue.value;var se;if(null!=K&&null!==(se=K.signal)&&void 0!==se&&se.aborted)throw new e({cause:K.signal.reason});yield[X++,me]}}catch(me){ee=!0,Z=me}finally{try{te&&null!=W.return&&(yield xe(W.return()))}finally{if(ee)throw Z}}}).call(this)},drop:function(K,X){return null!=X&&y(X,"options"),null!=(null==X?void 0:X.signal)&&i(X.signal,"options.signal"),K=ie(K),Me(function*(){var te;if(null!=X&&null!==(te=X.signal)&&void 0!==te&&te.aborted)throw new e;var W,ee=!1,Z=!1;try{for(var se,ue=Oe(this);ee=!(se=yield xe(ue.next())).done;ee=!1){const ve=se.value;var me;if(null!=X&&null!==(me=X.signal)&&void 0!==me&&me.aborted)throw new e;K--<=0&&(yield ve)}}catch(ve){Z=!0,W=ve}finally{try{ee&&null!=ue.return&&(yield xe(ue.return()))}finally{if(Z)throw W}}}).call(this)},filter:re,flatMap:function(K,X){const te=D.call(this,K,X);return Me(function*(){var W,ee=!1,Z=!1;try{for(var se,ue=Oe(te);ee=!(se=yield xe(ue.next())).done;ee=!1){const me=se.value;yield*$e(Oe(me),xe)}}catch(me){Z=!0,W=me}finally{try{ee&&null!=ue.return&&(yield xe(ue.return()))}finally{if(Z)throw W}}}).call(this)},map:D,take:function(K,X){return null!=X&&y(X,"options"),null!=(null==X?void 0:X.signal)&&i(X.signal,"options.signal"),K=ie(K),Me(function*(){var te;if(null!=X&&null!==(te=X.signal)&&void 0!==te&&te.aborted)throw new e;var W,ee=!1,Z=!1;try{for(var se,ue=Oe(this);ee=!(se=yield xe(ue.next())).done;ee=!1){const ve=se.value;var me;if(null!=X&&null!==(me=X.signal)&&void 0!==me&&me.aborted)throw new e;if(!(K-- >0))return;yield ve}}catch(ve){Z=!0,W=ve}finally{try{ee&&null!=ue.return&&(yield xe(ue.return()))}finally{if(Z)throw W}}}).call(this)},compose:function(K,X){if(null!=X&&y(X,"options"),null!=(null==X?void 0:X.signal)&&i(X.signal,"options.signal"),_(K)&&!v(K))throw new c("stream",K,"must be writable");const te=E(this,K);return null!=X&&X.signal&&A(X.signal,te),te}},C.exports.promiseReturningOperators={every:(K=Ie(function*(X,te){if("function"!=typeof X)throw new d("fn",["Function","AsyncFunction"],X);return!(yield ge.call(this,Ie(function*(...ee){return!(yield X(...ee))}),te))}),function(te){return K.apply(this,arguments)}),forEach:function(){var K=Ie(function*(X,te){if("function"!=typeof X)throw new d("fn",["Function","AsyncFunction"],X);var W,ee=!1,Z=!1;try{for(var ue=Oe(D.call(this,function(){var me=Ie(function*(ve,Se){return yield X(ve,Se),T});return function(ve,Se){return me.apply(this,arguments)}}(),te));ee=!(yield ue.next()).done;ee=!1);}catch(me){Z=!0,W=me}finally{try{ee&&null!=ue.return&&(yield ue.return())}finally{if(Z)throw W}}});return function(te,ee){return K.apply(this,arguments)}}(),reduce:function(){var K=Ie(function*(X,te,ee){var Z;if("function"!=typeof X)throw new d("reducer",["Function","AsyncFunction"],X);null!=ee&&y(ee,"options"),null!=(null==ee?void 0:ee.signal)&&i(ee.signal,"options.signal");let W=arguments.length>1;if(null!=ee&&null!==(Z=ee.signal)&&void 0!==Z&&Z.aborted){const $=new e(void 0,{cause:ee.signal.reason});throw this.once("error",()=>{}),yield g(this.destroy($)),$}const ue=new o,se=ue.signal;null!=ee&&ee.signal&&ee.signal.addEventListener("abort",()=>ue.abort(),{once:!0,[b]:this});let me=!1;try{var H,ve=!1,Se=!1;try{for(var ye,ce=Oe(this);ve=!(ye=yield ce.next()).done;ve=!1){const $=ye.value;var _e;if(me=!0,null!=ee&&null!==(_e=ee.signal)&&void 0!==_e&&_e.aborted)throw new e;W?te=yield X(te,$,{signal:se}):(te=$,W=!0)}}catch($){Se=!0,H=$}finally{try{ve&&null!=ce.return&&(yield ce.return())}finally{if(Se)throw H}}if(!me&&!W)throw new U}finally{ue.abort()}return te});return function(te,ee,Z){return K.apply(this,arguments)}}(),toArray:function(){var K=Ie(function*(X){null!=X&&y(X,"options"),null!=(null==X?void 0:X.signal)&&i(X.signal,"options.signal");const te=[];var W,ee=!1,Z=!1;try{for(var se,ue=Oe(this);ee=!(se=yield ue.next()).done;ee=!1){const ve=se.value;var me;if(null!=X&&null!==(me=X.signal)&&void 0!==me&&me.aborted)throw new e(void 0,{cause:X.signal.reason});P(te,ve)}}catch(ve){Z=!0,W=ve}finally{try{ee&&null!=ue.return&&(yield ue.return())}finally{if(Z)throw W}}return te});return function(te){return K.apply(this,arguments)}}(),some:ge,find:function(){var K=Ie(function*(X,te){var W,ee=!1,Z=!1;try{for(var se,ue=Oe(re.call(this,X,te));ee=!(se=yield ue.next()).done;ee=!1)return se.value}catch(me){Z=!0,W=me}finally{try{ee&&null!=ue.return&&(yield ue.return())}finally{if(Z)throw W}}});return function(te,ee){return K.apply(this,arguments)}}()}},917:(C,t,n)=>{"use strict";const{ObjectSetPrototypeOf:o}=n(9061);C.exports=d;const c=n(1161);function d(p){if(!(this instanceof d))return new d(p);c.call(this,p)}o(d.prototype,c.prototype),o(d,c),d.prototype._transform=function(p,s,e){e(null,p)}},9946:(C,t,n)=>{const o=n(4155),{ArrayIsArray:c,Promise:d,SymbolAsyncIterator:p}=n(9061),s=n(8610),{once:e}=n(6087),i=n(1195),a=n(8672),{aggregateTwoErrors:y,codes:{ERR_INVALID_ARG_TYPE:b,ERR_INVALID_RETURN_VALUE:g,ERR_MISSING_ARGS:E,ERR_STREAM_DESTROYED:A,ERR_STREAM_PREMATURE_CLOSE:v},AbortError:_}=n(4381),{validateFunction:P,validateAbortSignal:O}=n(6547),{isIterable:L,isReadable:I,isReadableNodeStream:k,isNodeStream:F,isTransformStream:G,isWebStream:B,isReadableStream:T,isReadableEnded:Q}=n(5874),D=globalThis.AbortController||n(8599).AbortController;let ge,we;function re(W,ue,se){let me=!1;return W.on("close",()=>{me=!0}),{destroy:ve=>{me||(me=!0,i.destroyer(W,ve||new A("pipe")))},cleanup:s(W,{readable:ue,writable:se},ve=>{me=!ve})}}function U(W){if(L(W))return W;if(k(W))return(ue=Me(function*(se){we||(we=n(911)),yield*$e(Oe(we.prototype[p].call(se)),xe)}),function(se){return ue.apply(this,arguments)})(W);var ue;throw new b("val",["Readable","Iterable","AsyncIterable"],W)}function ie(W,ue,se,me){return K.apply(this,arguments)}function K(){return(K=Ie(function*(W,ue,se,{end:me}){let ve,Se=null;const H=de=>{if(de&&(ve=de),Se){const r=Se;Se=null,r()}},ce=()=>new d((de,r)=>{ve?r(ve):Se=()=>{ve?r(ve):de()}});ue.on("drain",H);const ye=s(ue,{readable:!1},H);try{ue.writableNeedDrain&&(yield ce());var z,_e=!1,$=!1;try{for(var fe,ae=Oe(W);_e=!(fe=yield ae.next()).done;_e=!1)ue.write(fe.value)||(yield ce())}catch(de){$=!0,z=de}finally{try{_e&&null!=ae.return&&(yield ae.return())}finally{if($)throw z}}me&&ue.end(),yield ce(),se()}catch(de){se(ve!==de?y(ve,de):de)}finally{ye(),ue.off("drain",H)}})).apply(this,arguments)}function X(W,ue,se,me){return te.apply(this,arguments)}function te(){return(te=Ie(function*(W,ue,se,{end:me}){G(ue)&&(ue=ue.writable);const ve=ue.getWriter();try{var ce,Se=!1,H=!1;try{for(var _e,ye=Oe(W);Se=!(_e=yield ye.next()).done;Se=!1){const $=_e.value;yield ve.ready,ve.write($).catch(()=>{})}}catch($){H=!0,ce=$}finally{try{Se&&null!=ye.return&&(yield ye.return())}finally{if(H)throw ce}}yield ve.ready,me&&(yield ve.close()),se()}catch($){try{yield ve.abort($),se($)}catch(z){se(z)}}})).apply(this,arguments)}function ee(W,ue,se){if(1===W.length&&c(W[0])&&(W=W[0]),W.length<2)throw new E("streams");const me=new D,ve=me.signal,Se=null==se?void 0:se.signal,H=[];function ce(){de(new _)}let ye,_e;O(Se,"options.signal"),null==Se||Se.addEventListener("abort",ce);const $=[];let z,ae=0;function fe(M){de(M,0==--ae)}function de(M,f){if(!M||ye&&"ERR_STREAM_PREMATURE_CLOSE"!==ye.code||(ye=M),ye||f){for(;$.length;)$.shift()(ye);null==Se||Se.removeEventListener("abort",ce),me.abort(),f&&(ye||H.forEach(m=>m()),o.nextTick(ue,ye,_e))}}for(let M=0;M0,S=m||!1!==(null==se?void 0:se.end),N=M===W.length-1;if(F(f)){let j=function(J){J&&"AbortError"!==J.name&&"ERR_STREAM_PREMATURE_CLOSE"!==J.code&&fe(J)};if(S){const{destroy:J,cleanup:le}=re(f,m,V);$.push(J),I(f)&&N&&H.push(le)}f.on("error",j),I(f)&&N&&H.push(()=>{f.removeListener("error",j)})}if(0===M)if("function"==typeof f){if(z=f({signal:ve}),!L(z))throw new g("Iterable, AsyncIterable or Stream","source",z)}else z=L(f)||k(f)||G(f)?f:a.from(f);else if("function"==typeof f){var r;if(z=G(z)?U(null===(r=z)||void 0===r?void 0:r.readable):U(z),z=f(z,{signal:ve}),m){if(!L(z,!0))throw new g("AsyncIterable",`transform[${M-1}]`,z)}else{var l;ge||(ge=n(917));const j=new ge({objectMode:!0}),J=null===(l=z)||void 0===l?void 0:l.then;if("function"==typeof J)ae++,J.call(z,Ce=>{_e=Ce,null!=Ce&&j.write(Ce),S&&j.end(),o.nextTick(fe)},Ce=>{j.destroy(Ce),o.nextTick(fe,Ce)});else if(L(z,!0))ae++,ie(z,j,fe,{end:S});else{if(!T(z)&&!G(z))throw new g("AsyncIterable or Promise","destination",z);ae++,ie(z.readable||z,j,fe,{end:S})}z=j;const{destroy:le,cleanup:Re}=re(z,!1,!0);$.push(le),N&&H.push(Re)}}else if(F(f)){if(k(z)){ae+=2;const j=Z(z,f,fe,{end:S});I(f)&&N&&H.push(j)}else if(G(z)||T(z))ae++,ie(z.readable||z,f,fe,{end:S});else{if(!L(z))throw new b("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],z);ae++,ie(z,f,fe,{end:S})}z=f}else if(B(f)){if(k(z))ae++,X(U(z),f,fe,{end:S});else if(T(z)||L(z))ae++,X(z,f,fe,{end:S});else{if(!G(z))throw new b("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],z);ae++,X(z.readable,f,fe,{end:S})}z=f}else z=a.from(f)}return(null!=ve&&ve.aborted||null!=Se&&Se.aborted)&&o.nextTick(ce),z}function Z(W,ue,se,{end:me}){let ve=!1;if(ue.on("close",()=>{ve||se(new v)}),W.pipe(ue,{end:!1}),me){let H=function(){ve=!0,ue.end()};Q(W)?o.nextTick(H):W.once("end",H)}else se();return s(W,{readable:!0,writable:!1},H=>{const ce=W._readableState;H&&"ERR_STREAM_PREMATURE_CLOSE"===H.code&&ce&&ce.ended&&!ce.errored&&!ce.errorEmitted?W.once("end",se).once("error",se):se(H)}),s(ue,{readable:!1,writable:!0},se)}C.exports={pipelineImpl:ee,pipeline:function(...W){return ee(W,e((P((ue=W)[ue.length-1],"streams[stream.length - 1]"),ue.pop())));var ue}}},911:(C,t,n)=>{const o=n(4155),{ArrayPrototypeIndexOf:c,NumberIsInteger:d,NumberIsNaN:p,NumberParseInt:s,ObjectDefineProperties:e,ObjectKeys:i,ObjectSetPrototypeOf:a,Promise:y,SafeSet:b,SymbolAsyncIterator:g,Symbol:E}=n(9061);C.exports=W,W.ReadableState=Z;const{EventEmitter:A}=n(7187),{Stream:v,prependListener:_}=n(4870),{Buffer:P}=n(8764),{addAbortSignal:O}=n(196),L=n(8610);let I=n(6087).debuglog("stream",f=>{I=f});const k=n(7327),F=n(1195),{getHighWaterMark:G,getDefaultHighWaterMark:B}=n(2457),{aggregateTwoErrors:T,codes:{ERR_INVALID_ARG_TYPE:Q,ERR_METHOD_NOT_IMPLEMENTED:D,ERR_OUT_OF_RANGE:ge,ERR_STREAM_PUSH_AFTER_EOF:we,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:re}}=n(4381),{validateObject:U}=n(6547),ie=E("kPaused"),{StringDecoder:K}=n(2553),X=n(6307);a(W.prototype,v.prototype),a(W,v);const te=()=>{},{errorOrDestroy:ee}=F;function Z(f,m,V){"boolean"!=typeof V&&(V=m instanceof n(8672)),this.objectMode=!(!f||!f.objectMode),V&&(this.objectMode=this.objectMode||!(!f||!f.readableObjectMode)),this.highWaterMark=f?G(this,f,"readableHighWaterMark",V):B(!1),this.buffer=new k,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[ie]=null,this.errorEmitted=!1,this.emitClose=!f||!1!==f.emitClose,this.autoDestroy=!f||!1!==f.autoDestroy,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=f&&f.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,f&&f.encoding&&(this.decoder=new K(f.encoding),this.encoding=f.encoding)}function W(f){if(!(this instanceof W))return new W(f);const m=this instanceof n(8672);this._readableState=new Z(f,this,m),f&&("function"==typeof f.read&&(this._read=f.read),"function"==typeof f.destroy&&(this._destroy=f.destroy),"function"==typeof f.construct&&(this._construct=f.construct),f.signal&&!m&&O(f.signal,this)),v.call(this,f),F.construct(this,()=>{this._readableState.needReadable&&H(this,this._readableState)})}function ue(f,m,V,S){I("readableAddChunk",m);const N=f._readableState;let j;if(N.objectMode||("string"==typeof m?N.encoding!==(V=V||N.defaultEncoding)&&(S&&N.encoding?m=P.from(m,V).toString(N.encoding):(m=P.from(m,V),V="")):m instanceof P?V="":v._isUint8Array(m)?(m=v._uint8ArrayToBuffer(m),V=""):null!=m&&(j=new Q("chunk",["string","Buffer","Uint8Array"],m))),j)ee(f,j);else if(null===m)N.reading=!1,function(J,le){if(I("onEofChunk"),!le.ended){if(le.decoder){const Re=le.decoder.end();Re&&Re.length&&(le.buffer.push(Re),le.length+=le.objectMode?1:Re.length)}le.ended=!0,le.sync?ve(J):(le.needReadable=!1,le.emittedReadable=!0,Se(J))}}(f,N);else if(N.objectMode||m&&m.length>0)if(S)if(N.endEmitted)ee(f,new re);else{if(N.destroyed||N.errored)return!1;se(f,N,m,!0)}else if(N.ended)ee(f,new we);else{if(N.destroyed||N.errored)return!1;N.reading=!1,N.decoder&&!V?(m=N.decoder.write(m),N.objectMode||0!==m.length?se(f,N,m,!1):H(f,N)):se(f,N,m,!1)}else S||(N.reading=!1,H(f,N));return!N.ended&&(N.length0?(m.multiAwaitDrain?m.awaitDrainWriters.clear():m.awaitDrainWriters=null,m.dataEmitted=!0,f.emit("data",V)):(m.length+=m.objectMode?1:V.length,S?m.buffer.unshift(V):m.buffer.push(V),m.needReadable&&ve(f)),H(f,m)}function me(f,m){return f<=0||0===m.length&&m.ended?0:m.objectMode?1:p(f)?m.flowing&&m.length?m.buffer.first().length:m.length:f<=m.length?f:m.ended?m.length:0}function ve(f){const m=f._readableState;I("emitReadable",m.needReadable,m.emittedReadable),m.needReadable=!1,m.emittedReadable||(I("emitReadable",m.flowing),m.emittedReadable=!0,o.nextTick(Se,f))}function Se(f){const m=f._readableState;I("emitReadable_",m.destroyed,m.length,m.ended),m.destroyed||m.errored||!m.length&&!m.ended||(f.emit("readable"),m.emittedReadable=!1),m.needReadable=!m.flowing&&!m.ended&&m.length<=m.highWaterMark,z(f)}function H(f,m){!m.readingMore&&m.constructed&&(m.readingMore=!0,o.nextTick(ce,f,m))}function ce(f,m){for(;!m.reading&&!m.ended&&(m.length0,m.resumeScheduled&&!1===m[ie]?m.flowing=!0:f.listenerCount("data")>0?f.resume():m.readableListening||(m.flowing=null)}function _e(f){I("readable nexttick read 0"),f.read(0)}function $(f,m){I("resume",m.reading),m.reading||f.read(0),m.resumeScheduled=!1,f.emit("resume"),z(f),m.flowing&&!m.reading&&f.read(0)}function z(f){const m=f._readableState;for(I("flow",m.flowing);m.flowing&&null!==f.read(););}function ae(f,m){"function"!=typeof f.read&&(f=W.wrap(f,{objectMode:!0}));const V=(S=Me(function*(N,j){let J,le=te;function Re(Pe){this===N?(le(),le=te):le=Pe}N.on("readable",Re);const Ce=L(N,{writable:!1},Pe=>{J=Pe?T(J,Pe):null,le(),le=te});try{for(;;){const Pe=N.destroyed?null:N.read();if(null!==Pe)yield Pe;else{if(J)throw J;if(null===J)return;yield xe(new y(Re))}}}catch(Pe){throw J=T(J,Pe),J}finally{!J&&!1===(null==j?void 0:j.destroyOnReturn)||void 0!==J&&!N._readableState.autoDestroy?(N.off("readable",Re),Ce()):F.destroyer(N,null)}}),function(N,j){return S.apply(this,arguments)})(f,m);var S;return V.stream=f,V}function fe(f,m){if(0===m.length)return null;let V;return m.objectMode?V=m.buffer.shift():!f||f>=m.length?(V=m.decoder?m.buffer.join(""):1===m.buffer.length?m.buffer.first():m.buffer.concat(m.length),m.buffer.clear()):V=m.buffer.consume(f,m.decoder),V}function de(f){const m=f._readableState;I("endReadable",m.endEmitted),m.endEmitted||(m.ended=!0,o.nextTick(r,m,f))}function r(f,m){if(I("endReadableNT",f.endEmitted,f.length),!f.errored&&!f.closeEmitted&&!f.endEmitted&&0===f.length)if(f.endEmitted=!0,m.emit("end"),m.writable&&!1===m.allowHalfOpen)o.nextTick(l,m);else if(f.autoDestroy){const V=m._writableState;(!V||V.autoDestroy&&(V.finished||!1===V.writable))&&m.destroy()}}function l(f){f.writable&&!f.writableEnded&&!f.destroyed&&f.end()}let h;function M(){return void 0===h&&(h={}),h}W.prototype.destroy=F.destroy,W.prototype._undestroy=F.undestroy,W.prototype._destroy=function(f,m){m(f)},W.prototype[A.captureRejectionSymbol]=function(f){this.destroy(f)},W.prototype.push=function(f,m){return ue(this,f,m,!1)},W.prototype.unshift=function(f,m){return ue(this,f,m,!0)},W.prototype.isPaused=function(){const f=this._readableState;return!0===f[ie]||!1===f.flowing},W.prototype.setEncoding=function(f){const m=new K(f);this._readableState.decoder=m,this._readableState.encoding=this._readableState.decoder.encoding;const V=this._readableState.buffer;let S="";for(const N of V)S+=m.write(N);return V.clear(),""!==S&&V.push(S),this._readableState.length=S.length,this},W.prototype.read=function(f){I("read",f),void 0===f?f=NaN:d(f)||(f=s(f,10));const m=this._readableState,V=f;if(f>m.highWaterMark&&(m.highWaterMark=function(j){if(j>1073741824)throw new ge("size","<= 1GiB",j);return j--,j|=j>>>1,j|=j>>>2,j|=j>>>4,j|=j>>>8,j|=j>>>16,++j}(f)),0!==f&&(m.emittedReadable=!1),0===f&&m.needReadable&&((0!==m.highWaterMark?m.length>=m.highWaterMark:m.length>0)||m.ended))return I("read: emitReadable",m.length,m.ended),0===m.length&&m.ended?de(this):ve(this),null;if(0===(f=me(f,m))&&m.ended)return 0===m.length&&de(this),null;let S,N=m.needReadable;if(I("need readable",N),(0===m.length||m.length-f0?fe(f,m):null,null===S?(m.needReadable=m.length<=m.highWaterMark,f=0):(m.length-=f,m.multiAwaitDrain?m.awaitDrainWriters.clear():m.awaitDrainWriters=null),0===m.length&&(m.ended||(m.needReadable=!0),V!==f&&m.ended&&de(this)),null===S||m.errorEmitted||m.closeEmitted||(m.dataEmitted=!0,this.emit("data",S)),S},W.prototype._read=function(f){throw new D("_read()")},W.prototype.pipe=function(f,m){const V=this,S=this._readableState;1===S.pipes.length&&(S.multiAwaitDrain||(S.multiAwaitDrain=!0,S.awaitDrainWriters=new b(S.awaitDrainWriters?[S.awaitDrainWriters]:[]))),S.pipes.push(f),I("pipe count=%d opts=%j",S.pipes.length,m);const N=m&&!1===m.end||f===o.stdout||f===o.stderr?We:j;function j(){I("onend"),f.end()}let J;S.endEmitted?o.nextTick(N):V.once("end",N),f.on("unpipe",function Ve(Je,He){I("onunpipe"),Je===V&&He&&!1===He.hasUnpiped&&(He.hasUnpiped=!0,I("cleanup"),f.removeListener("close",ke),f.removeListener("finish",De),J&&f.removeListener("drain",J),f.removeListener("error",Pe),f.removeListener("unpipe",Ve),V.removeListener("end",j),V.removeListener("end",We),V.removeListener("data",Ce),le=!0,J&&S.awaitDrainWriters&&(!f._writableState||f._writableState.needDrain)&&J())});let le=!1;function Re(){var Ve,Je;le||(1===S.pipes.length&&S.pipes[0]===f?(I("false write response, pause",0),S.awaitDrainWriters=f,S.multiAwaitDrain=!1):S.pipes.length>1&&S.pipes.includes(f)&&(I("false write response, pause",S.awaitDrainWriters.size),S.awaitDrainWriters.add(f)),V.pause()),J||(Ve=V,Je=f,J=function(){const He=Ve._readableState;He.awaitDrainWriters===Je?(I("pipeOnDrain",1),He.awaitDrainWriters=null):He.multiAwaitDrain&&(I("pipeOnDrain",He.awaitDrainWriters.size),He.awaitDrainWriters.delete(Je)),He.awaitDrainWriters&&0!==He.awaitDrainWriters.size||!Ve.listenerCount("data")||Ve.resume()},f.on("drain",J))}function Ce(Ve){I("ondata");const Je=f.write(Ve);I("dest.write",Je),!1===Je&&Re()}function Pe(Ve){if(I("onerror",Ve),We(),f.removeListener("error",Pe),0===f.listenerCount("error")){const Je=f._writableState||f._readableState;Je&&!Je.errorEmitted?ee(f,Ve):f.emit("error",Ve)}}function ke(){f.removeListener("finish",De),We()}function De(){I("onfinish"),f.removeListener("close",ke),We()}function We(){I("unpipe"),V.unpipe(f)}return V.on("data",Ce),_(f,"error",Pe),f.once("close",ke),f.once("finish",De),f.emit("pipe",V),!0===f.writableNeedDrain?S.flowing&&Re():S.flowing||(I("pipe resume"),V.resume()),f},W.prototype.unpipe=function(f){const m=this._readableState;if(0===m.pipes.length)return this;if(!f){const S=m.pipes;m.pipes=[],this.pause();for(let N=0;N0,!1!==S.flowing&&this.resume()):"readable"===f&&(S.endEmitted||S.readableListening||(S.readableListening=S.needReadable=!0,S.flowing=!1,S.emittedReadable=!1,I("on readable",S.length,S.reading),S.length?ve(this):S.reading||o.nextTick(_e,this))),V},W.prototype.off=W.prototype.removeListener=function(f,m){const V=v.prototype.removeListener.call(this,f,m);return"readable"===f&&o.nextTick(ye,this),V},W.prototype.removeAllListeners=function(f){const m=v.prototype.removeAllListeners.apply(this,arguments);return"readable"!==f&&void 0!==f||o.nextTick(ye,this),m},W.prototype.resume=function(){const f=this._readableState;return f.flowing||(I("resume"),f.flowing=!f.readableListening,this,(V=f).resumeScheduled||(V.resumeScheduled=!0,o.nextTick($,this,V))),f[ie]=!1,this;var V},W.prototype.pause=function(){return I("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(I("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[ie]=!0,this},W.prototype.wrap=function(f){let m=!1;f.on("data",S=>{!this.push(S)&&f.pause&&(m=!0,f.pause())}),f.on("end",()=>{this.push(null)}),f.on("error",S=>{ee(this,S)}),f.on("close",()=>{this.destroy()}),f.on("destroy",()=>{this.destroy()}),this._read=()=>{m&&f.resume&&(m=!1,f.resume())};const V=i(f);for(let S=1;S{"use strict";const{MathFloor:o,NumberIsInteger:c}=n(9061),{ERR_INVALID_ARG_VALUE:d}=n(4381).codes;function p(s){return s?16:16384}C.exports={getHighWaterMark:function(s,e,i,a){const y=null!=(b=e).highWaterMark?b.highWaterMark:a?b[i]:null;var b;if(null!=y){if(!c(y)||y<0)throw new d(a?`options.${i}`:"options.highWaterMark",y);return o(y)}return p(s.objectMode)},getDefaultHighWaterMark:p}},1161:(C,t,n)=>{"use strict";const{ObjectSetPrototypeOf:o,Symbol:c}=n(9061);C.exports=i;const{ERR_METHOD_NOT_IMPLEMENTED:d}=n(4381).codes,p=n(8672),{getHighWaterMark:s}=n(2457);o(i.prototype,p.prototype),o(i,p);const e=c("kCallback");function i(b){if(!(this instanceof i))return new i(b);const g=b?s(this,b,"readableHighWaterMark",!0):null;0===g&&(b={...b,highWaterMark:null,readableHighWaterMark:g,writableHighWaterMark:b.writableHighWaterMark||0}),p.call(this,b),this._readableState.sync=!1,this[e]=null,b&&("function"==typeof b.transform&&(this._transform=b.transform),"function"==typeof b.flush&&(this._flush=b.flush)),this.on("prefinish",y)}function a(b){"function"!=typeof this._flush||this.destroyed?(this.push(null),b&&b()):this._flush((g,E)=>{g?b?b(g):this.destroy(g):(null!=E&&this.push(E),this.push(null),b&&b())})}function y(){this._final!==a&&a.call(this)}i.prototype._final=a,i.prototype._transform=function(b,g,E){throw new d("_transform()")},i.prototype._write=function(b,g,E){const A=this._readableState,v=this._writableState,_=A.length;this._transform(b,g,(P,O)=>{P?E(P):(null!=O&&this.push(O),v.ended||_===A.length||A.length{"use strict";const{Symbol:o,SymbolAsyncIterator:c,SymbolIterator:d,SymbolFor:p}=n(9061),s=o("kDestroyed"),e=o("kIsErrored"),i=o("kIsReadable"),a=o("kIsDisturbed"),y=p("nodejs.webstream.isClosedPromise"),b=p("nodejs.webstream.controllerErrorFunction");function g(T,Q=!1){var D;return!(!T||"function"!=typeof T.pipe||"function"!=typeof T.on||Q&&("function"!=typeof T.pause||"function"!=typeof T.resume)||T._writableState&&!1===(null===(D=T._readableState)||void 0===D?void 0:D.readable)||T._writableState&&!T._readableState)}function E(T){var Q;return!(!T||"function"!=typeof T.write||"function"!=typeof T.on||T._readableState&&!1===(null===(Q=T._writableState)||void 0===Q?void 0:Q.writable))}function A(T){return T&&(T._readableState||T._writableState||"function"==typeof T.write&&"function"==typeof T.on||"function"==typeof T.pipe&&"function"==typeof T.on)}function v(T){return!(!T||A(T)||"function"!=typeof T.pipeThrough||"function"!=typeof T.getReader||"function"!=typeof T.cancel)}function _(T){return!(!T||A(T)||"function"!=typeof T.getWriter||"function"!=typeof T.abort)}function P(T){return!(!T||A(T)||"object"!=typeof T.readable||"object"!=typeof T.writable)}function O(T){if(!A(T))return null;const ge=T._writableState||T._readableState;return!!(T.destroyed||T[s]||null!=ge&&ge.destroyed)}function L(T){if(!E(T))return null;if(!0===T.writableEnded)return!0;const Q=T._writableState;return(null==Q||!Q.errored)&&("boolean"!=typeof(null==Q?void 0:Q.ended)?null:Q.ended)}function I(T,Q){if(!g(T))return null;const D=T._readableState;return(null==D||!D.errored)&&("boolean"!=typeof(null==D?void 0:D.endEmitted)?null:!!(D.endEmitted||!1===Q&&!0===D.ended&&0===D.length))}function k(T){return T&&null!=T[i]?T[i]:"boolean"!=typeof(null==T?void 0:T.readable)?null:!O(T)&&g(T)&&T.readable&&!I(T)}function F(T){return"boolean"!=typeof(null==T?void 0:T.writable)?null:!O(T)&&E(T)&&T.writable&&!L(T)}function G(T){return"boolean"==typeof T._closed&&"boolean"==typeof T._defaultKeepAlive&&"boolean"==typeof T._removedConnection&&"boolean"==typeof T._removedContLen}function B(T){return"boolean"==typeof T._sent100&&G(T)}C.exports={kDestroyed:s,isDisturbed:function(T){var Q;return!(!T||!(null!==(Q=T[a])&&void 0!==Q?Q:T.readableDidRead||T.readableAborted))},kIsDisturbed:a,isErrored:function(T){var Q,D,ge,we,re,U,ie,K,X,te;return!(!T||!(null!==(Q=null!==(D=null!==(ge=null!==(we=null!==(re=null!==(U=T[e])&&void 0!==U?U:T.readableErrored)&&void 0!==re?re:T.writableErrored)&&void 0!==we?we:null===(ie=T._readableState)||void 0===ie?void 0:ie.errorEmitted)&&void 0!==ge?ge:null===(K=T._writableState)||void 0===K?void 0:K.errorEmitted)&&void 0!==D?D:null===(X=T._readableState)||void 0===X?void 0:X.errored)&&void 0!==Q?Q:null===(te=T._writableState)||void 0===te?void 0:te.errored))},kIsErrored:e,isReadable:k,kIsReadable:i,kIsClosedPromise:y,kControllerErrorFunction:b,isClosed:function(T){if(!A(T))return null;if("boolean"==typeof T.closed)return T.closed;const Q=T._writableState,D=T._readableState;return"boolean"==typeof(null==Q?void 0:Q.closed)||"boolean"==typeof(null==D?void 0:D.closed)?(null==Q?void 0:Q.closed)||(null==D?void 0:D.closed):"boolean"==typeof T._closed&&G(T)?T._closed:null},isDestroyed:O,isDuplexNodeStream:function(T){return!(!T||"function"!=typeof T.pipe||!T._readableState||"function"!=typeof T.on||"function"!=typeof T.write)},isFinished:function(T,Q){return A(T)?!(!O(T)&&(!1!==(null==Q?void 0:Q.readable)&&k(T)||!1!==(null==Q?void 0:Q.writable)&&F(T))):null},isIterable:function(T,Q){return null!=T&&(!0===Q?"function"==typeof T[c]:!1===Q?"function"==typeof T[d]:"function"==typeof T[c]||"function"==typeof T[d])},isReadableNodeStream:g,isReadableStream:v,isReadableEnded:function(T){if(!g(T))return null;if(!0===T.readableEnded)return!0;const Q=T._readableState;return!(!Q||Q.errored)&&("boolean"!=typeof(null==Q?void 0:Q.ended)?null:Q.ended)},isReadableFinished:I,isReadableErrored:function(T){var Q,D;return A(T)?T.readableErrored?T.readableErrored:null!==(Q=null===(D=T._readableState)||void 0===D?void 0:D.errored)&&void 0!==Q?Q:null:null},isNodeStream:A,isWebStream:function(T){return v(T)||_(T)||P(T)},isWritable:F,isWritableNodeStream:E,isWritableStream:_,isWritableEnded:L,isWritableFinished:function(T,Q){if(!E(T))return null;if(!0===T.writableFinished)return!0;const D=T._writableState;return(null==D||!D.errored)&&("boolean"!=typeof(null==D?void 0:D.finished)?null:!!(D.finished||!1===Q&&!0===D.ended&&0===D.length))},isWritableErrored:function(T){var Q,D;return A(T)?T.writableErrored?T.writableErrored:null!==(Q=null===(D=T._writableState)||void 0===D?void 0:D.errored)&&void 0!==Q?Q:null:null},isServerRequest:function(T){var Q;return"boolean"==typeof T._consuming&&"boolean"==typeof T._dumped&&void 0===(null===(Q=T.req)||void 0===Q?void 0:Q.upgradeOrConnect)},isServerResponse:B,willEmitClose:function(T){if(!A(T))return null;const ge=T._writableState||T._readableState;return!ge&&B(T)||!!(ge&&ge.autoDestroy&&ge.emitClose&&!1===ge.closed)},isTransformStream:P}},6304:(C,t,n)=>{const o=n(4155),{ArrayPrototypeSlice:c,Error:d,FunctionPrototypeSymbolHasInstance:p,ObjectDefineProperty:s,ObjectDefineProperties:e,ObjectSetPrototypeOf:i,StringPrototypeToLowerCase:a,Symbol:y,SymbolHasInstance:b}=n(9061);C.exports=K,K.WritableState=U;const{EventEmitter:g}=n(7187),E=n(4870).Stream,{Buffer:A}=n(8764),v=n(1195),{addAbortSignal:_}=n(196),{getHighWaterMark:P,getDefaultHighWaterMark:O}=n(2457),{ERR_INVALID_ARG_TYPE:L,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_MULTIPLE_CALLBACK:k,ERR_STREAM_CANNOT_PIPE:F,ERR_STREAM_DESTROYED:G,ERR_STREAM_ALREADY_FINISHED:B,ERR_STREAM_NULL_VALUES:T,ERR_STREAM_WRITE_AFTER_END:Q,ERR_UNKNOWN_ENCODING:D}=n(4381).codes,{errorOrDestroy:ge}=v;function we(){}i(K.prototype,E.prototype),i(K,E);const re=y("kOnFinished");function U($,z,ae){"boolean"!=typeof ae&&(ae=z instanceof n(8672)),this.objectMode=!(!$||!$.objectMode),ae&&(this.objectMode=this.objectMode||!(!$||!$.writableObjectMode)),this.highWaterMark=$?P(this,$,"writableHighWaterMark",ae):O(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!($&&!1===$.decodeStrings),this.defaultEncoding=$&&$.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=Z.bind(void 0,z),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,ie(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!$||!1!==$.emitClose,this.autoDestroy=!$||!1!==$.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[re]=[]}function ie($){$.buffered=[],$.bufferedIndex=0,$.allBuffers=!0,$.allNoop=!0}function K($){const z=this instanceof n(8672);if(!z&&!p(K,this))return new K($);this._writableState=new U($,this,z),$&&("function"==typeof $.write&&(this._write=$.write),"function"==typeof $.writev&&(this._writev=$.writev),"function"==typeof $.destroy&&(this._destroy=$.destroy),"function"==typeof $.final&&(this._final=$.final),"function"==typeof $.construct&&(this._construct=$.construct),$.signal&&_($.signal,this)),E.call(this,$),v.construct(this,()=>{const ae=this._writableState;ae.writing||me(this,ae),Se(this,ae)})}function X($,z,ae,fe){const de=$._writableState;if("function"==typeof ae)fe=ae,ae=de.defaultEncoding;else{if(ae){if("buffer"!==ae&&!A.isEncoding(ae))throw new D(ae)}else ae=de.defaultEncoding;"function"!=typeof fe&&(fe=we)}if(null===z)throw new T;if(!de.objectMode)if("string"==typeof z)!1!==de.decodeStrings&&(z=A.from(z,ae),ae="buffer");else if(z instanceof A)ae="buffer";else{if(!E._isUint8Array(z))throw new L("chunk",["string","Buffer","Uint8Array"],z);z=E._uint8ArrayToBuffer(z),ae="buffer"}let r;return de.ending?r=new Q:de.destroyed&&(r=new G("write")),r?(o.nextTick(fe,r),ge($,r,!0),r):(de.pendingcb++,function(l,h,M,f,m){const V=h.objectMode?1:M.length;h.length+=V;const S=h.lengthae.bufferedIndex&&me($,ae),fe?null!==ae.afterWriteTickInfo&&ae.afterWriteTickInfo.cb===de?ae.afterWriteTickInfo.count++:(ae.afterWriteTickInfo={count:1,cb:de,stream:$,state:ae},o.nextTick(W,ae.afterWriteTickInfo)):ue($,ae,1,de))):ge($,new k)}function W({stream:$,state:z,count:ae,cb:fe}){return z.afterWriteTickInfo=null,ue($,z,ae,fe)}function ue($,z,ae,fe){for(!z.ending&&!$.destroyed&&0===z.length&&z.needDrain&&(z.needDrain=!1,$.emit("drain"));ae-- >0;)z.pendingcb--,fe();z.destroyed&&se(z),Se($,z)}function se($){if($.writing)return;for(let de=$.bufferedIndex;de<$.buffered.length;++de){var z;const{chunk:r,callback:l}=$.buffered[de];$.length-=$.objectMode?1:r.length,l(null!==(z=$.errored)&&void 0!==z?z:new G("write"))}const ae=$[re].splice(0);for(let de=0;de1&&$._writev){z.pendingcb-=r-1;const h=z.allNoop?we:f=>{for(let m=l;m256?(ae.splice(0,l),z.bufferedIndex=0):z.bufferedIndex=l}z.bufferProcessing=!1}function ve($){return $.ending&&!$.destroyed&&$.constructed&&0===$.length&&!$.errored&&0===$.buffered.length&&!$.finished&&!$.writing&&!$.errorEmitted&&!$.closeEmitted}function Se($,z,ae){var fe,de;ve(z)&&(fe=$,(de=z).prefinished||de.finalCalled||("function"!=typeof fe._final||de.destroyed?(de.prefinished=!0,fe.emit("prefinish")):(de.finalCalled=!0,function(r,l){let h=!1;function M(f){if(h)ge(r,f??k());else if(h=!0,l.pendingcb--,f){const m=l[re].splice(0);for(let V=0;V{ve(de)?H(fe,de):de.pendingcb--},$,z)):ve(z)&&(z.pendingcb++,H($,z))))}function H($,z){z.pendingcb--,z.finished=!0;const ae=z[re].splice(0);for(let fe=0;fe{"use strict";const{ArrayIsArray:o,ArrayPrototypeIncludes:c,ArrayPrototypeJoin:d,ArrayPrototypeMap:p,NumberIsInteger:s,NumberIsNaN:e,NumberMAX_SAFE_INTEGER:i,NumberMIN_SAFE_INTEGER:a,NumberParseInt:y,ObjectPrototypeHasOwnProperty:b,RegExpPrototypeExec:g,String:E,StringPrototypeToUpperCase:A,StringPrototypeTrim:v}=n(9061),{hideStackFrames:_,codes:{ERR_SOCKET_BAD_PORT:P,ERR_INVALID_ARG_TYPE:O,ERR_INVALID_ARG_VALUE:L,ERR_OUT_OF_RANGE:I,ERR_UNKNOWN_SIGNAL:k}}=n(4381),{normalizeEncoding:F}=n(6087),{isAsyncFunction:G,isArrayBufferView:B}=n(6087).types,T={},Q=/^[0-7]+$/,D=_((H,ce,ye=a,_e=i)=>{if("number"!=typeof H)throw new O(ce,"number",H);if(!s(H))throw new I(ce,"an integer",H);if(H_e)throw new I(ce,`>= ${ye} && <= ${_e}`,H)}),ge=_((H,ce,ye=-2147483648,_e=2147483647)=>{if("number"!=typeof H)throw new O(ce,"number",H);if(!s(H))throw new I(ce,"an integer",H);if(H_e)throw new I(ce,`>= ${ye} && <= ${_e}`,H)}),we=_((H,ce,ye=!1)=>{if("number"!=typeof H)throw new O(ce,"number",H);if(!s(H))throw new I(ce,"an integer",H);const _e=ye?1:0,$=4294967295;if(H<_e||H>$)throw new I(ce,`>= ${_e} && <= ${$}`,H)});function re(H,ce){if("string"!=typeof H)throw new O(ce,"string",H)}const U=_((H,ce,ye)=>{if(!c(ye,H)){const _e=d(p(ye,$=>"string"==typeof $?`'${$}'`:E($)),", ");throw new L(ce,H,"must be one of: "+_e)}});function ie(H,ce){if("boolean"!=typeof H)throw new O(ce,"boolean",H)}function K(H,ce,ye){return null!=H&&b(H,ce)?H[ce]:ye}const X=_((H,ce,ye=null)=>{const _e=K(ye,"allowArray",!1),$=K(ye,"allowFunction",!1);if(!K(ye,"nullable",!1)&&null===H||!_e&&o(H)||"object"!=typeof H&&(!$||"function"!=typeof H))throw new O(ce,"Object",H)}),te=_((H,ce)=>{if(null!=H&&"object"!=typeof H&&"function"!=typeof H)throw new O(ce,"a dictionary",H)}),ee=_((H,ce,ye=0)=>{if(!o(H))throw new O(ce,"Array",H);if(H.length{if(!B(H))throw new O(ce,["Buffer","TypedArray","DataView"],H)}),W=_((H,ce)=>{if(void 0!==H&&(null===H||"object"!=typeof H||!("aborted"in H)))throw new O(ce,"AbortSignal",H)}),ue=_((H,ce)=>{if("function"!=typeof H)throw new O(ce,"Function",H)}),se=_((H,ce)=>{if("function"!=typeof H||G(H))throw new O(ce,"Function",H)}),me=_((H,ce)=>{if(void 0!==H)throw new O(ce,"undefined",H)}),ve=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function Se(H,ce){if(void 0===H||!g(ve,H))throw new L(ce,H,'must be an array or string of format "; rel=preload; as=style"')}C.exports={isInt32:function(H){return H===(0|H)},isUint32:function(H){return H===H>>>0},parseFileMode:function(H,ce,ye){if(void 0===H&&(H=ye),"string"==typeof H){if(null===g(Q,H))throw new L(ce,H,"must be a 32-bit unsigned integer or an octal string");H=y(H,8)}return we(H,ce),H},validateArray:ee,validateStringArray:function(H,ce){ee(H,ce);for(let ye=0;ye_e||(null!=ye||null!=_e)&&e(H))throw new I(ce,`${null!=ye?`>= ${ye}`:""}${null!=ye&&null!=_e?" && ":""}${null!=_e?`<= ${_e}`:""}`,H)},validateObject:X,validateOneOf:U,validatePlainFunction:se,validatePort:function(H,ce="Port",ye=!0){if("number"!=typeof H&&"string"!=typeof H||"string"==typeof H&&0===v(H).length||+H!=+H>>>0||H>65535||0===H&&!ye)throw new P(ce,H,ye);return 0|H},validateSignalName:function(H,ce="signal"){if(re(H,ce),void 0===T[H])throw void 0!==T[A(H)]?new k(H+" (signals must use all capital letters)"):new k(H)},validateString:re,validateUint32:we,validateUndefined:me,validateUnion:function(H,ce,ye){if(!c(ye,H))throw new O(ce,`('${d(ye,"|")}')`,H)},validateAbortSignal:W,validateLinkHeaderValue:function(H){if("string"==typeof H)return Se(H,"hints"),H;if(o(H)){const ce=H.length;let ye="";if(0===ce)return ye;for(let _e=0;_e; rel=preload; as=style"')}}},9827:(C,t,n)=>{"use strict";const o=n(5099),c=n(7854),d=o.Readable.destroy;C.exports=o.Readable,C.exports._uint8ArrayToBuffer=o._uint8ArrayToBuffer,C.exports._isUint8Array=o._isUint8Array,C.exports.isDisturbed=o.isDisturbed,C.exports.isErrored=o.isErrored,C.exports.isReadable=o.isReadable,C.exports.Readable=o.Readable,C.exports.Writable=o.Writable,C.exports.Duplex=o.Duplex,C.exports.Transform=o.Transform,C.exports.PassThrough=o.PassThrough,C.exports.addAbortSignal=o.addAbortSignal,C.exports.finished=o.finished,C.exports.destroy=o.destroy,C.exports.destroy=d,C.exports.pipeline=o.pipeline,C.exports.compose=o.compose,Object.defineProperty(o,"promises",{configurable:!0,enumerable:!0,get:()=>c}),C.exports.Stream=o.Stream,C.exports.default=C.exports},4381:(C,t,n)=>{"use strict";const{format:o,inspect:c,AggregateError:d}=n(6087),p=globalThis.AggregateError||d,s=Symbol("kIsNodeError"),e=["string","function","number","object","Function","Object","boolean","bigint","symbol"],i=/^([A-Z][a-z0-9]*)+$/,a={};function y(v,_){if(!v)throw new a.ERR_INTERNAL_ASSERTION(_)}function b(v){let _="",P=v.length;const O="-"===v[0]?1:0;for(;P>=O+4;P-=3)_=`_${v.slice(P-3,P)}${_}`;return`${v.slice(0,P)}${_}`}function g(v,_,P){P||(P=Error);class O extends P{constructor(...I){super(function(k,F,G){if("function"==typeof F)return y(F.length<=G.length,`Code: ${k}; The provided arguments length (${G.length}) does not match the required ones (${F.length}).`),F(...G);const B=(F.match(/%[dfijoOs]/g)||[]).length;return y(B===G.length,`Code: ${k}; The provided arguments length (${G.length}) does not match the required ones (${B}).`),0===G.length?F:o(F,...G)}(v,_,I))}toString(){return`${this.name} [${v}]: ${this.message}`}}Object.defineProperties(O.prototype,{name:{value:P.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${v}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),O.prototype.code=v,O.prototype[s]=!0,a[v]=O}function E(v){return Object.defineProperty(v,"name",{value:"__node_internal_"+v.name}),v}class A extends Error{constructor(_="The operation was aborted",P){if(void 0!==P&&"object"!=typeof P)throw new a.ERR_INVALID_ARG_TYPE("options","Object",P);super(_,P),this.code="ABORT_ERR",this.name="AbortError"}}g("ERR_ASSERTION","%s",Error),g("ERR_INVALID_ARG_TYPE",(v,_,P)=>{y("string"==typeof v,"'name' must be a string"),Array.isArray(_)||(_=[_]);let O="The ";v.endsWith(" argument")?O+=`${v} `:O+=`"${v}" ${v.includes(".")?"property":"argument"} `,O+="must be ";const L=[],I=[],k=[];for(const G of _)y("string"==typeof G,"All expected entries have to be of type string"),e.includes(G)?L.push(G.toLowerCase()):i.test(G)?I.push(G):(y("object"!==G,'The value "object" should be written as "Object"'),k.push(G));if(I.length>0){const G=L.indexOf("object");-1!==G&&(L.splice(L,G,1),I.push("Object"))}if(L.length>0){switch(L.length){case 1:O+=`of type ${L[0]}`;break;case 2:O+=`one of type ${L[0]} or ${L[1]}`;break;default:{const G=L.pop();O+=`one of type ${L.join(", ")}, or ${G}`}}(I.length>0||k.length>0)&&(O+=" or ")}if(I.length>0){switch(I.length){case 1:O+=`an instance of ${I[0]}`;break;case 2:O+=`an instance of ${I[0]} or ${I[1]}`;break;default:{const G=I.pop();O+=`an instance of ${I.join(", ")}, or ${G}`}}k.length>0&&(O+=" or ")}switch(k.length){case 0:break;case 1:k[0].toLowerCase()!==k[0]&&(O+="an "),O+=`${k[0]}`;break;case 2:O+=`one of ${k[0]} or ${k[1]}`;break;default:{const G=k.pop();O+=`one of ${k.join(", ")}, or ${G}`}}if(null==P)O+=`. Received ${P}`;else if("function"==typeof P&&P.name)O+=`. Received function ${P.name}`;else if("object"==typeof P){var F;null!==(F=P.constructor)&&void 0!==F&&F.name?O+=`. Received an instance of ${P.constructor.name}`:O+=`. Received ${c(P,{depth:-1})}`}else{let G=c(P,{colors:!1});G.length>25&&(G=`${G.slice(0,25)}...`),O+=`. Received type ${typeof P} (${G})`}return O},TypeError),g("ERR_INVALID_ARG_VALUE",(v,_,P="is invalid")=>{let O=c(_);return O.length>128&&(O=O.slice(0,128)+"..."),`The ${v.includes(".")?"property":"argument"} '${v}' ${P}. Received ${O}`},TypeError),g("ERR_INVALID_RETURN_VALUE",(v,_,P)=>{var O;return`Expected ${v} to be returned from the "${_}" function but got ${null!=P&&null!==(O=P.constructor)&&void 0!==O&&O.name?`instance of ${P.constructor.name}`:"type "+typeof P}.`},TypeError),g("ERR_MISSING_ARGS",(...v)=>{let _;y(v.length>0,"At least one arg needs to be specified");const P=v.length;switch(v=(Array.isArray(v)?v:[v]).map(O=>`"${O}"`).join(" or "),P){case 1:_+=`The ${v[0]} argument`;break;case 2:_+=`The ${v[0]} and ${v[1]} arguments`;break;default:{const O=v.pop();_+=`The ${v.join(", ")}, and ${O} arguments`}}return`${_} must be specified`},TypeError),g("ERR_OUT_OF_RANGE",(v,_,P)=>{let O;return y(_,'Missing "range" argument'),Number.isInteger(P)&&Math.abs(P)>4294967296?O=b(String(P)):"bigint"==typeof P?(O=String(P),(P>2n**32n||P<-(2n**32n))&&(O=b(O)),O+="n"):O=c(P),`The value of "${v}" is out of range. It must be ${_}. Received ${O}`},RangeError),g("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),g("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),g("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),g("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),g("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),g("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),g("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),g("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),g("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),g("ERR_STREAM_WRITE_AFTER_END","write after end",Error),g("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),C.exports={AbortError:A,aggregateTwoErrors:E(function(v,_){if(v&&_&&v!==_){if(Array.isArray(_.errors))return _.errors.push(v),_;const P=new p([_,v],_.message);return P.code=_.code,P}return v||_}),hideStackFrames:E,codes:a}},9061:C=>{"use strict";C.exports={ArrayIsArray:t=>Array.isArray(t),ArrayPrototypeIncludes:(t,n)=>t.includes(n),ArrayPrototypeIndexOf:(t,n)=>t.indexOf(n),ArrayPrototypeJoin:(t,n)=>t.join(n),ArrayPrototypeMap:(t,n)=>t.map(n),ArrayPrototypePop:(t,n)=>t.pop(n),ArrayPrototypePush:(t,n)=>t.push(n),ArrayPrototypeSlice:(t,n,o)=>t.slice(n,o),Error,FunctionPrototypeCall:(t,n,...o)=>t.call(n,...o),FunctionPrototypeSymbolHasInstance:(t,n)=>Function.prototype[Symbol.hasInstance].call(t,n),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(t,n)=>Object.defineProperties(t,n),ObjectDefineProperty:(t,n,o)=>Object.defineProperty(t,n,o),ObjectGetOwnPropertyDescriptor:(t,n)=>Object.getOwnPropertyDescriptor(t,n),ObjectKeys:t=>Object.keys(t),ObjectSetPrototypeOf:(t,n)=>Object.setPrototypeOf(t,n),Promise,PromisePrototypeCatch:(t,n)=>t.catch(n),PromisePrototypeThen:(t,n,o)=>t.then(n,o),PromiseReject:t=>Promise.reject(t),ReflectApply:Reflect.apply,RegExpPrototypeTest:(t,n)=>t.test(n),SafeSet:Set,String,StringPrototypeSlice:(t,n,o)=>t.slice(n,o),StringPrototypeToLowerCase:t=>t.toLowerCase(),StringPrototypeToUpperCase:t=>t.toUpperCase(),StringPrototypeTrim:t=>t.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet:(t,n,o)=>t.set(n,o),Uint8Array}},6087:(C,t,n)=>{"use strict";const o=n(8764),c=Object.getPrototypeOf(Ie(function*(){})).constructor,d=globalThis.Blob||o.Blob,p=void 0!==d?function(e){return e instanceof d}:function(e){return!1};class s extends Error{constructor(i){if(!Array.isArray(i))throw new TypeError("Expected input to be an Array, got "+typeof i);let a="";for(let y=0;y{e=a,i=y}),resolve:e,reject:i}},promisify:e=>new Promise((i,a)=>{e((y,...b)=>y?a(y):i(...b))}),debuglog:()=>function(){},format:(e,...i)=>e.replace(/%([sdifj])/g,function(...[a,y]){const b=i.shift();return"f"===y?b.toFixed(6):"j"===y?JSON.stringify(b):"s"===y&&"object"==typeof b?`${b.constructor!==Object?b.constructor.name:""} {}`.trim():b.toString()}),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:p},C.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},5099:(C,t,n)=>{const{Buffer:o}=n(8764),{ObjectDefineProperty:c,ObjectKeys:d,ReflectApply:p}=n(9061),{promisify:{custom:s}}=n(6087),{streamReturningOperators:e,promiseReturningOperators:i}=n(4382),{codes:{ERR_ILLEGAL_CONSTRUCTOR:a}}=n(4381),y=n(299),{pipeline:b}=n(9946),{destroyer:g}=n(1195),E=n(8610),A=n(7854),v=n(5874),_=C.exports=n(4870).Stream;_.isDisturbed=v.isDisturbed,_.isErrored=v.isErrored,_.isReadable=v.isReadable,_.Readable=n(911);for(const L of d(e)){let k=function(...F){if(new.target)throw a();return _.Readable.from(p(I,this,F))};const I=e[L];c(k,"name",{__proto__:null,value:I.name}),c(k,"length",{__proto__:null,value:I.length}),c(_.Readable.prototype,L,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}for(const L of d(i)){let k=function(...G){if(new.target)throw a();return p(I,this,G)};const I=i[L];c(k,"name",{__proto__:null,value:I.name}),c(k,"length",{__proto__:null,value:I.length}),c(_.Readable.prototype,L,{__proto__:null,value:k,enumerable:!1,configurable:!0,writable:!0})}_.Writable=n(6304),_.Duplex=n(8672),_.Transform=n(1161),_.PassThrough=n(917),_.pipeline=b;const{addAbortSignal:P}=n(196);_.addAbortSignal=P,_.finished=E,_.destroy=g,_.compose=y,c(_,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>A}),c(b,s,{__proto__:null,enumerable:!0,get:()=>A.pipeline}),c(E,s,{__proto__:null,enumerable:!0,get:()=>A.finished}),_.Stream=_,_._isUint8Array=function(L){return L instanceof Uint8Array},_._uint8ArrayToBuffer=function(L){return o.from(L.buffer,L.byteOffset,L.byteLength)}},7854:(C,t,n)=>{"use strict";const{ArrayPrototypePop:o,Promise:c}=n(9061),{isIterable:d,isNodeStream:p,isWebStream:s}=n(5874),{pipelineImpl:e}=n(9946),{finished:i}=n(8610);n(5099),C.exports={finished:i,pipeline:function(...a){return new c((y,b)=>{let g,E;const A=a[a.length-1];if(A&&"object"==typeof A&&!p(A)&&!d(A)&&!s(A)){const v=o(a);g=v.signal,E=v.end}e(a,(v,_)=>{v?b(v):y(_)},{signal:g,end:E})})}}},9509:(C,t,n)=>{var o=n(8764),c=o.Buffer;function d(s,e){for(var i in s)e[i]=s[i]}function p(s,e,i){return c(s,e,i)}c.from&&c.alloc&&c.allocUnsafe&&c.allocUnsafeSlow?C.exports=o:(d(o,t),t.Buffer=p),p.prototype=Object.create(c.prototype),d(c,p),p.from=function(s,e,i){if("number"==typeof s)throw new TypeError("Argument must not be a number");return c(s,e,i)},p.alloc=function(s,e,i){if("number"!=typeof s)throw new TypeError("Argument must be a number");var a=c(s);return void 0!==e?"string"==typeof i?a.fill(e,i):a.fill(e):a.fill(0),a},p.allocUnsafe=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return c(s)},p.allocUnsafeSlow=function(s){if("number"!=typeof s)throw new TypeError("Argument must be a number");return o.SlowBuffer(s)}},2553:(C,t,n)=>{"use strict";var o=n(9509).Buffer,c=o.isEncoding||function(E){switch((E=""+E)&&E.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function d(E){var A;switch(this.encoding=function(v){var _=function(P){if(!P)return"utf8";for(var O;;)switch(P){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return P;default:if(O)return;P=(""+P).toLowerCase(),O=!0}}(v);if("string"!=typeof _&&(o.isEncoding===c||!c(v)))throw new Error("Unknown encoding: "+v);return _||v}(E),this.encoding){case"utf16le":this.text=e,this.end=i,A=4;break;case"utf8":this.fillLast=s,A=4;break;case"base64":this.text=a,this.end=y,A=3;break;default:return this.write=b,void(this.end=g)}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(A)}function p(E){return E<=127?0:E>>5==6?2:E>>4==14?3:E>>3==30?4:E>>6==2?-1:-2}function s(E){var A=this.lastTotal-this.lastNeed,v=function(_,P,O){if(128!=(192&P[0]))return _.lastNeed=0,"\ufffd";if(_.lastNeed>1&&P.length>1){if(128!=(192&P[1]))return _.lastNeed=1,"\ufffd";if(_.lastNeed>2&&P.length>2&&128!=(192&P[2]))return _.lastNeed=2,"\ufffd"}}(this,E);return void 0!==v?v:this.lastNeed<=E.length?(E.copy(this.lastChar,A,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(E.copy(this.lastChar,A,0,E.length),void(this.lastNeed-=E.length))}function e(E,A){if((E.length-A)%2==0){var v=E.toString("utf16le",A);if(v){var _=v.charCodeAt(v.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",A,E.length-1)}function i(E){var A=E&&E.length?this.write(E):"";return this.lastNeed?A+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):A}function a(E,A){var v=(E.length-A)%3;return 0===v?E.toString("base64",A):(this.lastNeed=3-v,this.lastTotal=3,1===v?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",A,E.length-v))}function y(E){var A=E&&E.length?this.write(E):"";return this.lastNeed?A+this.lastChar.toString("base64",0,3-this.lastNeed):A}function b(E){return E.toString(this.encoding)}function g(E){return E&&E.length?this.write(E):""}t.StringDecoder=d,d.prototype.write=function(E){if(0===E.length)return"";var A,v;if(this.lastNeed){if(void 0===(A=this.fillLast(E)))return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v=0?(k>0&&(P.lastNeed=k-1),k):--I=0?(k>0&&(P.lastNeed=k-2),k):--I=0?(k>0&&(2===k?k=0:P.lastNeed=k-3),k):0}(this,E,A);if(!this.lastNeed)return E.toString("utf8",A);this.lastTotal=v;var _=E.length-(v-this.lastNeed);return E.copy(this.lastChar,0,_),E.toString("utf8",A,_)},d.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length}},2479:C=>{C.exports=function t(n,o){if(n&&o)return t(n)(o);if("function"!=typeof n)throw new TypeError("need wrapper function");return Object.keys(n).forEach(function(d){c[d]=n[d]}),c;function c(){for(var d=new Array(arguments.length),p=0;p{},7884:(C,t,n)=>{"use strict";n.r(t),n.d(t,{Struct:()=>a,StructError:()=>o,any:()=>B,array:()=>T,assert:()=>y,assign:()=>v,bigint:()=>Q,boolean:()=>D,coerce:()=>z,create:()=>b,date:()=>ge,defaulted:()=>ae,define:()=>_,deprecated:()=>P,dynamic:()=>O,empty:()=>de,enums:()=>we,func:()=>re,instance:()=>U,integer:()=>ie,intersection:()=>K,is:()=>E,lazy:()=>L,literal:()=>X,map:()=>te,mask:()=>g,max:()=>l,min:()=>h,never:()=>ee,nonempty:()=>M,nullable:()=>Z,number:()=>W,object:()=>ue,omit:()=>I,optional:()=>se,partial:()=>k,pattern:()=>f,pick:()=>F,record:()=>me,refine:()=>V,regexp:()=>ve,set:()=>Se,size:()=>m,string:()=>H,struct:()=>G,trimmed:()=>fe,tuple:()=>ce,type:()=>ye,union:()=>_e,unknown:()=>$,validate:()=>A});class o extends TypeError{constructor(N,j){let J;const{message:le,explanation:Re,...Ce}=N,{path:Pe}=N,ke=0===Pe.length?le:`At path: ${Pe.join(".")} -- ${le}`;super(Re??ke),null!=Re&&(this.cause=ke),Object.assign(this,Ce),this.name=this.constructor.name,this.failures=()=>J??(J=[N,...j()])}}function c(S){return"object"==typeof S&&null!=S}function d(S){if("[object Object]"!==Object.prototype.toString.call(S))return!1;const N=Object.getPrototypeOf(S);return null===N||N===Object.prototype}function p(S){return"symbol"==typeof S?S.toString():"string"==typeof S?JSON.stringify(S):`${S}`}function s(S,N,j,J){if(!0===S)return;!1===S?S={}:"string"==typeof S&&(S={message:S});const{path:le,branch:Re}=N,{type:Ce}=j,{refinement:Pe,message:ke=`Expected a value of type \`${Ce}\`${Pe?` with refinement \`${Pe}\``:""}, but received: \`${p(J)}\``}=S;return{value:J,type:Ce,refinement:Pe,key:le[le.length-1],path:le,branch:Re,...S,message:ke}}function*e(S,N,j,J){var le;c(le=S)&&"function"==typeof le[Symbol.iterator]||(S=[S]);for(const Re of S){const Ce=s(Re,N,j,J);Ce&&(yield Ce)}}function*i(S,N,j={}){const{path:J=[],branch:le=[S],coerce:Re=!1,mask:Ce=!1}=j,Pe={path:J,branch:le};if(Re&&(S=N.coercer(S,Pe),Ce&&"type"!==N.type&&c(N.schema)&&c(S)&&!Array.isArray(S)))for(const De in S)void 0===N.schema[De]&&delete S[De];let ke="valid";for(const De of N.validator(S,Pe))De.explanation=j.message,ke="not_valid",yield[De,void 0];for(let[De,We,Ve]of N.entries(S,Pe)){const Je=i(We,Ve,{path:void 0===De?J:[...J,De],branch:void 0===De?le:[...le,We],coerce:Re,mask:Ce,message:j.message});for(const He of Je)He[0]?(ke=null!=He[0].refinement?"not_refined":"not_valid",yield[He[0],void 0]):Re&&(We=He[1],void 0===De?S=We:S instanceof Map?S.set(De,We):S instanceof Set?S.add(We):c(S)&&(void 0!==We||De in S)&&(S[De]=We))}if("not_valid"!==ke)for(const De of N.refiner(S,Pe))De.explanation=j.message,ke="not_refined",yield[De,void 0];"valid"===ke&&(yield[void 0,S])}class a{constructor(N){const{type:j,schema:J,validator:le,refiner:Re,coercer:Ce=(ke=>ke),entries:Pe=function*(){}}=N;this.type=j,this.schema=J,this.entries=Pe,this.coercer=Ce,this.validator=le?(ke,De)=>e(le(ke,De),De,this,ke):()=>[],this.refiner=Re?(ke,De)=>e(Re(ke,De),De,this,ke):()=>[]}assert(N,j){return y(N,this,j)}create(N,j){return b(N,this,j)}is(N){return E(N,this)}mask(N,j){return g(N,this,j)}validate(N,j={}){return A(N,this,j)}}function y(S,N,j){const J=A(S,N,{message:j});if(J[0])throw J[0]}function b(S,N,j){const J=A(S,N,{coerce:!0,message:j});if(J[0])throw J[0];return J[1]}function g(S,N,j){const J=A(S,N,{coerce:!0,mask:!0,message:j});if(J[0])throw J[0];return J[1]}function E(S,N){return!A(S,N)[0]}function A(S,N,j={}){const J=i(S,N,j),le=function(Re){const{done:Ce,value:Pe}=Re.next();return Ce?void 0:Pe}(J);return le[0]?[new o(le[0],function*(){for(const Re of J)Re[0]&&(yield Re[0])}),void 0]:[void 0,le[1]]}function v(...S){const N="type"===S[0].type,j=S.map(le=>le.schema),J=Object.assign({},...j);return N?ye(J):ue(J)}function _(S,N){return new a({type:S,schema:null,validator:N})}function P(S,N){return new a({...S,refiner:(j,J)=>void 0===j||S.refiner(j,J),validator:(j,J)=>void 0===j||(N(j,J),S.validator(j,J))})}function O(S){return new a({type:"dynamic",schema:null,*entries(N,j){yield*S(N,j).entries(N,j)},validator:(N,j)=>S(N,j).validator(N,j),coercer:(N,j)=>S(N,j).coercer(N,j),refiner:(N,j)=>S(N,j).refiner(N,j)})}function L(S){let N;return new a({type:"lazy",schema:null,*entries(j,J){N??(N=S()),yield*N.entries(j,J)},validator:(j,J)=>(N??(N=S()),N.validator(j,J)),coercer:(j,J)=>(N??(N=S()),N.coercer(j,J)),refiner:(j,J)=>(N??(N=S()),N.refiner(j,J))})}function I(S,N){const{schema:j}=S,J={...j};for(const le of N)delete J[le];return"type"===S.type?ye(J):ue(J)}function k(S){const N=S instanceof a?{...S.schema}:{...S};for(const j in N)N[j]=se(N[j]);return ue(N)}function F(S,N){const{schema:j}=S,J={};for(const le of N)J[le]=j[le];return ue(J)}function G(S,N){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),_(S,N)}function B(){return _("any",()=>!0)}function T(S){return new a({type:"array",schema:S,*entries(N){if(S&&Array.isArray(N))for(const[j,J]of N.entries())yield[j,J,S]},coercer:N=>Array.isArray(N)?N.slice():N,validator:N=>Array.isArray(N)||`Expected an array value, but received: ${p(N)}`})}function Q(){return _("bigint",S=>"bigint"==typeof S)}function D(){return _("boolean",S=>"boolean"==typeof S)}function ge(){return _("date",S=>S instanceof Date&&!isNaN(S.getTime())||`Expected a valid \`Date\` object, but received: ${p(S)}`)}function we(S){const N={},j=S.map(J=>p(J)).join();for(const J of S)N[J]=J;return new a({type:"enums",schema:N,validator:J=>S.includes(J)||`Expected one of \`${j}\`, but received: ${p(J)}`})}function re(){return _("func",S=>"function"==typeof S||`Expected a function, but received: ${p(S)}`)}function U(S){return _("instance",N=>N instanceof S||`Expected a \`${S.name}\` instance, but received: ${p(N)}`)}function ie(){return _("integer",S=>"number"==typeof S&&!isNaN(S)&&Number.isInteger(S)||`Expected an integer, but received: ${p(S)}`)}function K(S){return new a({type:"intersection",schema:null,*entries(N,j){for(const J of S)yield*J.entries(N,j)},*validator(N,j){for(const J of S)yield*J.validator(N,j)},*refiner(N,j){for(const J of S)yield*J.refiner(N,j)}})}function X(S){const N=p(S),j=typeof S;return new a({type:"literal",schema:"string"===j||"number"===j||"boolean"===j?S:null,validator:J=>J===S||`Expected the literal \`${N}\`, but received: ${p(J)}`})}function te(S,N){return new a({type:"map",schema:null,*entries(j){if(S&&N&&j instanceof Map)for(const[J,le]of j.entries())yield[J,J,S],yield[J,le,N]},coercer:j=>j instanceof Map?new Map(j):j,validator:j=>j instanceof Map||`Expected a \`Map\` object, but received: ${p(j)}`})}function ee(){return _("never",()=>!1)}function Z(S){return new a({...S,validator:(N,j)=>null===N||S.validator(N,j),refiner:(N,j)=>null===N||S.refiner(N,j)})}function W(){return _("number",S=>"number"==typeof S&&!isNaN(S)||`Expected a number, but received: ${p(S)}`)}function ue(S){const N=S?Object.keys(S):[],j=ee();return new a({type:"object",schema:S||null,*entries(J){if(S&&c(J)){const le=new Set(Object.keys(J));for(const Re of N)le.delete(Re),yield[Re,J[Re],S[Re]];for(const Re of le)yield[Re,J[Re],j]}},validator:J=>c(J)||`Expected an object, but received: ${p(J)}`,coercer:J=>c(J)?{...J}:J})}function se(S){return new a({...S,validator:(N,j)=>void 0===N||S.validator(N,j),refiner:(N,j)=>void 0===N||S.refiner(N,j)})}function me(S,N){return new a({type:"record",schema:null,*entries(j){if(c(j))for(const J in j){const le=j[J];yield[J,J,S],yield[J,le,N]}},validator:j=>c(j)||`Expected an object, but received: ${p(j)}`})}function ve(){return _("regexp",S=>S instanceof RegExp)}function Se(S){return new a({type:"set",schema:null,*entries(N){if(S&&N instanceof Set)for(const j of N)yield[j,j,S]},coercer:N=>N instanceof Set?new Set(N):N,validator:N=>N instanceof Set||`Expected a \`Set\` object, but received: ${p(N)}`})}function H(){return _("string",S=>"string"==typeof S||`Expected a string, but received: ${p(S)}`)}function ce(S){const N=ee();return new a({type:"tuple",schema:null,*entries(j){if(Array.isArray(j)){const J=Math.max(S.length,j.length);for(let le=0;leArray.isArray(j)||`Expected an array, but received: ${p(j)}`})}function ye(S){const N=Object.keys(S);return new a({type:"type",schema:S,*entries(j){if(c(j))for(const J of N)yield[J,j[J],S[J]]},validator:j=>c(j)||`Expected an object, but received: ${p(j)}`,coercer:j=>c(j)?{...j}:j})}function _e(S){const N=S.map(j=>j.type).join(" | ");return new a({type:"union",schema:null,coercer(j){for(const J of S){const[le,Re]=J.validate(j,{coerce:!0});if(!le)return Re}return j},validator(j,J){const le=[];for(const Re of S){const[...Ce]=i(j,Re,J),[Pe]=Ce;if(!Pe[0])return[];for(const[ke]of Ce)ke&&le.push(ke)}return[`Expected the value to satisfy a union of \`${N}\`, but received: ${p(j)}`,...le]}})}function $(){return _("unknown",()=>!0)}function z(S,N,j){return new a({...S,coercer:(J,le)=>E(J,N)?S.coercer(j(J,le),le):S.coercer(J,le)})}function ae(S,N,j={}){return z(S,$(),J=>{const le="function"==typeof N?N():N;if(void 0===J)return le;if(!j.strict&&d(J)&&d(le)){const Re={...J};let Ce=!1;for(const Pe in le)void 0===Re[Pe]&&(Re[Pe]=le[Pe],Ce=!0);if(Ce)return Re}return J})}function fe(S){return z(S,H(),N=>N.trim())}function de(S){return V(S,"empty",N=>{const j=r(N);return 0===j||`Expected an empty ${S.type} but received one with a size of \`${j}\``})}function r(S){return S instanceof Map||S instanceof Set?S.size:S.length}function l(S,N,j={}){const{exclusive:J}=j;return V(S,"max",le=>J?leJ?le>N:le>=N||`Expected a ${S.type} greater than ${J?"":"or equal to "}${N} but received \`${le}\``)}function M(S){return V(S,"nonempty",N=>r(N)>0||`Expected a nonempty ${S.type} but received an empty one`)}function f(S,N){return V(S,"pattern",j=>N.test(j)||`Expected a ${S.type} matching \`/${N.source}/\` but received "${j}"`)}function m(S,N,j=N){const J=`Expected a ${S.type}`,le=N===j?`of \`${N}\``:`between \`${N}\` and \`${j}\``;return V(S,"size",Re=>{if("number"==typeof Re||Re instanceof Date)return N<=Re&&Re<=j||`${J} ${le} but received \`${Re}\``;if(Re instanceof Map||Re instanceof Set){const{size:Ce}=Re;return N<=Ce&&Ce<=j||`${J} with a size ${le} but received one with a size of \`${Ce}\``}{const{length:Ce}=Re;return N<=Ce&&Ce<=j||`${J} with a length ${le} but received one with a length of \`${Ce}\``}})}function V(S,N,j){return new a({...S,*refiner(J,le){yield*S.refiner(J,le);const Re=e(j(J,le),le,S,J);for(const Ce of Re)yield{...Ce,refinement:N}}})}}},ze={};function Te(C){var t=ze[C];if(void 0!==t)return t.exports;var n=ze[C]={id:C,loaded:!1,exports:{}};return Ye[C].call(n.exports,n,n.exports,Te),n.loaded=!0,n.exports}Te.n=C=>{var t=C&&C.__esModule?()=>C.default:()=>C;return Te.d(t,{a:t}),t},Te.d=(C,t)=>{for(var n in t)Te.o(t,n)&&!Te.o(C,n)&&Object.defineProperty(C,n,{enumerable:!0,get:t[n]})},Te.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),Te.o=(C,t)=>Object.prototype.hasOwnProperty.call(C,t),Te.r=C=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(C,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(C,"__esModule",{value:!0})},Te.nmd=C=>(C.paths=[],C.children||(C.children=[]),C);var Ge={};return(()=>{"use strict";function C(R){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(R)}function t(R,u,w){return q=function(ne,oe){if("object"!==C(ne)||null===ne)return ne;var he=ne[Symbol.toPrimitive];if(void 0!==he){var pe=he.call(ne,"string");if("object"!==C(pe))return pe;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(ne)}(u),(u="symbol"===C(q)?q:String(q))in R?Object.defineProperty(R,u,{value:w,enumerable:!0,configurable:!0,writable:!0}):R[u]=w,R;var q}Te.r(Ge),Te.d(Ge,{BUTTON_POSITION:()=>se,PAYMENT_PROVIDER:()=>Z,SUPPORTED_PAYMENT_NETWORK:()=>W,TORUS_BUILD_ENV:()=>ue,TorusInpageProvider:()=>Je,WALLET_OPENLOGIN_VERIFIER_MAP:()=>ee,WALLET_VERIFIERS:()=>te,default:()=>Y});var n=Te(2378),o=Te.n(n),c=Te(2043),d=Te.n(c);function p(R,u){var w=Object.keys(R);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(R);u&&(x=x.filter(function(q){return Object.getOwnPropertyDescriptor(R,q).enumerable})),w.push.apply(w,x)}return w}function s(R){for(var u=1;u1&&void 0!==arguments[1]?arguments[1]:{};const x={mode:"cors",headers:{}};(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useAPIKey&&(x.headers=s(s({},x.headers),function(){const oe={};return i&&(oe["x-api-key"]=i),oe}()));const q=o()(x,w,{method:"GET"}),ne=yield(oe=Ie(function*(he,pe){let be=null;try{be=new URL(he)}catch{}return fetch(he,pe)}),function(he,pe){return oe.apply(this,arguments)})(u,q);var oe;if(ne.ok)return ne.json();throw function(oe){e.info(`Response: ${oe.status} ${oe.statusText}`),e.info(`Url: ${oe.url}`)}(ne),ne});return function(w){return R.apply(this,arguments)}}();var b=Te(9827),g=Te(7187),E=Te(4445),A=Te.n(E),v=Te(9428),_=Te(2840),P=Te.n(_),O=Te(778),L=Te.n(O),I=Te(4286),k=Te.n(I);function F(){}const G="ACK";class B extends b.Duplex{constructor(u){let{name:w,target:x,targetWindow:q=window,targetOrigin:ne="*"}=u;if(super({objectMode:!0}),t(this,"_init",void 0),t(this,"_haveSyn",void 0),t(this,"_name",void 0),t(this,"_target",void 0),t(this,"_targetWindow",void 0),t(this,"_targetOrigin",void 0),t(this,"_onMessage",void 0),t(this,"_synIntervalId",void 0),!w||!x)throw new Error("Invalid input.");this._init=!1,this._haveSyn=!1,this._name=w,this._target=x,this._targetWindow=q,this._targetOrigin=ne,this._onMessage=this.onMessage.bind(this),this._synIntervalId=null,window.addEventListener("message",this._onMessage,!1),this._handShake()}_break(){this.cork(),this._write("BRK",null,F),this._haveSyn=!1,this._init=!1}_handShake(){this._write("SYN",null,F),this.cork()}_onData(u){if(this._init)if("BRK"===u)this._break();else try{this.push(u)}catch(w){this.emit("error",w)}else"SYN"===u?(this._haveSyn=!0,this._write(G,null,F)):u===G&&(this._init=!0,this._haveSyn||this._write(G,null,F),this.uncork())}_postMessage(u){this._targetWindow.postMessage({target:this._target,data:u},this._targetOrigin)}onMessage(u){const w=u.data;"*"!==this._targetOrigin&&u.origin!==this._targetOrigin||u.source!==this._targetWindow||"object"!=typeof w||w.target!==this._name||!w.data||this._onData(w.data)}_read(){}_write(u,w,x){this._postMessage(u),x()}_destroy(){window.removeEventListener("message",this._onMessage,!1)}}function T(R,u,w){try{Reflect.apply(R,u,w)}catch(x){setTimeout(()=>{throw x})}}class Q extends g.EventEmitter{emit(u){let w="error"===u;const x=this._events;if(void 0!==x)w=w&&void 0===x.error;else if(!w)return!1;for(var q=arguments.length,ne=new Array(q>1?q-1:0),oe=1;oe0&&([pe]=ne),pe instanceof Error)throw pe;const be=new Error("Unhandled error."+(pe?` (${pe.message})`:""));throw be.context=pe,be}const he=x[u];if(void 0===he)return!1;if("function"==typeof he)T(he,this,ne);else{const pe=he.length,be=function(Ee){const Ae=Ee.length,Le=new Array(Ae);for(let Ne=0;Ne{const oe=pe=>{const be=pe||w.error;be&&(w.error=(0,v.Xy)(be)),ne([be,!0])},he=pe=>{w.error?oe(w.error):(pe&&("function"!=typeof pe&&oe(new D({code:-32603,message:"JRPCEngine: 'next' return handlers must be functions"})),q.push(pe)),ne([null,!1]))};try{x(u,w,he,oe)}catch(pe){oe(pe)}})}static _runReturnHandlers(u){return Ie(function*(){for(const w of u)yield new Promise((x,q)=>{w(ne=>ne?q(ne):x())})})()}static _checkForCompletion(u,w,x){if(!("result"in w)&&!("error"in w))throw new D({code:-32603,message:"Response has no error or result for request"});if(!x)throw new D({code:-32603,message:"Nothing ended request"})}push(u){this._middleware.push(u)}handle(u,w){if(w&&"function"!=typeof w)throw new Error('"callback" must be a function if provided.');return Array.isArray(u)?w?this._handleBatch(u,w):this._handleBatch(u):w?this._handle(u,w):this._promiseHandle(u)}asMiddleware(){var u=this;return function(){var w=Ie(function*(x,q,ne,oe){try{const[he,pe,be]=yield we._runAllMiddleware(x,q,u._middleware);return pe?(yield we._runReturnHandlers(be),oe(he)):ne(function(){var Ee=Ie(function*(Ae){try{yield we._runReturnHandlers(be)}catch(Le){return Ae(Le)}return Ae()});return function(Ae){return Ee.apply(this,arguments)}}())}catch(he){return oe(he)}});return function(x,q,ne,oe){return w.apply(this,arguments)}}()}_handleBatch(u,w){var x=this;return Ie(function*(){try{const q=yield Promise.all(u.map(x._promiseHandle.bind(x)));return w?w(null,q):q}catch(q){if(w)return w(q);throw q}})()}_promiseHandle(u){return new Promise(w=>{this._handle(u,(x,q)=>{w(q)})})}_handle(u,w){var x=this;return Ie(function*(){if(!u||Array.isArray(u)||"object"!=typeof u){const he=new D({code:-32603,message:"request must be plain object"});return w(he,{id:void 0,jsonrpc:"2.0",error:he})}if("string"!=typeof u.method){const he=new D({code:-32603,message:"method must be string"});return w(he,{id:u.id,jsonrpc:"2.0",error:he})}const q=function(he){for(var pe=1;pe0&&void 0!==arguments[0]?arguments[0]:{}),{},{objectMode:!0})),t(this,"_substreams",void 0),t(this,"getStream",void 0),this._substreams={}}createStream(u){if(!u)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[u])throw new Error(`ObjectMultiplex - Substream for name "${u}" already exists`);const w=new re({parent:this,name:u});return this._substreams[u]=w,function(x,q){const ne=L()(oe=>w.destroy(oe||void 0));P()(x,{readable:!1},ne),P()(x,{writable:!1},ne)}(this),w}ignoreStream(u){if(!u)throw new Error("ObjectMultiplex - name must not be empty");if(this._substreams[u])throw new Error(`ObjectMultiplex - Substream for name "${u}" already exists`);this._substreams[u]=K}_read(){}_write(u,w,x){const{name:q,data:ne}=u;if(!q)return window.console.warn(`ObjectMultiplex - malformed chunk without name "${u}"`),x();const oe=this._substreams[q];return oe?(oe!==K&&oe.push(ne),x()):(window.console.warn(`ObjectMultiplex - orphaned data for stream "${q}"`),x())}}const te={GOOGLE:"google",FACEBOOK:"facebook",TWITCH:"twitch",REDDIT:"reddit",DISCORD:"discord",EMAIL_PASSWORDLESS:"torus-auth0-email-passwordless"},ee={[te.GOOGLE]:"tkey-google",[te.FACEBOOK]:"tkey-facebook",[te.TWITCH]:"tkey-twitch",[te.REDDIT]:"tkey-reddit",[te.DISCORD]:"tkey-discord",[te.EMAIL_PASSWORDLESS]:"tkey-auth0-email-passwordless"},Z={MOONPAY:"moonpay",WYRE:"wyre",RAMPNETWORK:"rampnetwork",XANPOOL:"xanpool",MERCURYO:"mercuryo",TRANSAK:"transak",BANXA:"banxa"},W={MAINNET:"mainnet",MATIC:"matic",BSC_MAINNET:"bsc_mainnet",AVALANCHE_MAINNET:"avalanche_mainnet",XDAI:"xdai",ARBITRUM_MAINNET:"arbitrum_mainnet",OPTIMISM_MAINNET:"optimism_mainnet"},ue={PRODUCTION:"production",DEVELOPMENT:"development",BINANCE:"binance",TESTING:"testing",LRC:"lrc",BETA:"beta",BNB:"bnb",POLYGON:"polygon",ALPHA:"alpha"},se={BOTTOM_LEFT:"bottom-left",TOP_LEFT:"top-left",BOTTOM_RIGHT:"bottom-right",TOP_RIGHT:"top-right"},me={[Z.MOONPAY]:["AUD","BGN","BRL","CAD","CHF","CNY","COP","CZK","DKK","DOP","EGP","EUR","GBP","HKD","HRK","IDR","ILS","JPY","JOD","KES","KRW","KWD","LKR","MAD","MXN","MYR","NGN","NOK","NZD","OMR","PEN","PKR","PLN","RON","RUB","SEK","SGD","THB","TRY","TWD","USD","VND","ZAR"],[Z.WYRE]:["USD","EUR","GBP","AUD","CAD","NZD","CNY","ARS","BRL","CHF","CLP","COP","CZK","DKK","HKD","ILS","INR","ISK","JPY","KRW","MXN","MYR","NOK","PHP","PLN","SEK","SGD","THB","VND","ZAR"],[Z.RAMPNETWORK]:["USD","EUR","GBP","BMD","BAM","BWP","BRL","BGN","COP","CRC","CZK","DKK","DOP","GEL","GTQ","HNL","HUF","ISK","INR","ILS","KZT","KES","KWD","LAK","MKD","MYR","MXN","MDL","MZN","NZD","NGN","PYG","PEN","PLN","RON","RSD","SGD","ZAR","LKR","SEK","CHF","TJS","THB","UYU"],[Z.XANPOOL]:["SGD","HKD","THB","PHP","INR","IDR","MYR","AUD","NZD","KRW"],[Z.MERCURYO]:["EUR","USD","GBP","TRY","JPY","BRL","NGN","VND","MXN","KRW","PLN","SEK","CHF","CAD","CZK","DKK","BGN","HKD","AUD","INR"],[Z.TRANSAK]:["ARS","AUD","BBD","BGN","BMD","BRL","CAD","CHF","CLP","CRC","CZK","DKK","DOP","EUR","FJD","FKP","GBP","GIP","HRK","HUF","IDR","ILS","ISK","JMD","JPY","KES","KRW","MDL","MXN","MYR","NOK","NZD","PEN","PHP","PLN","PYG","RON","SEK","SGD","THB","TRY","TZS","USD","ZAR"],[Z.BANXA]:["AUD","CAD","CZK","DKK","EUR","GBP","HKD","JPY","NOK","NZD","NZD","PLN","RUB","SEK","SGD","TRY","USD"]},ve=new Set(["ETH","USDT","USDC","TUSD","EOSDT","USD","DAI","GUSD","DKKT","PAX","ILS","RUB","BYN","EUR","GBP","JPY","KRW","PLN","MXN","AUD","BRL","CAD","CHF","KPW","LAK","LBP","LKR","XOF","CNHT","DOGE","UAH","TRY","HKD","XJP","SGD","USC","NZD","NGN","RUR","COP","GHS","EGP","IDR","BHD","CRC","PEN","AED","DOP","PKR","HUF","VND","XAR","LTC","RON","OMR","MYR","DKK","UGX","ZMW","SAR","SEK","GEL","RWF","IRR","TZS","CNY","VEF","BDT","HRK","CLP","THB","XAF","ARS","UYU","SZL","KZT","NOK","KES","PAB","INR","CZK","MAD","TWD","PHP","ZAR","BOB","CDF","DASH","VES","ISK","MWK","BAM","TTD","XRP","JOD","RSD","HNL","BGN","GTQ","BWP","XMR","MMK","QAR","AOA","KWD","MUR","WUSD","WEUR","WAVES","WTRY","LRD","LSL","LYD","AWG","MDL","BTO","EURS","CHFT","MKD","MNT","MOP","MRO","MVR","VOLLAR","CKUSD","KHR","VUV","BITCNY","QC","BBD","NAD","NPR","PGK","PYG","BIF","BMD","BND","XLM","BNB","SCR","BAT","CRO","HT","KCS","LEO","LINK","MKR","NPXS","OMG","REP","ZB","ZIL","ZRX","BCH","BZD","CUP","CVE","DJF","DZD","ERN","ETB","FJD","FKP","BUSD","ANCT","ALL","AMD","ANG","CNYX","IQD","UZS","TND","GGP","XAU","KGS","GIP","JMD","ZEC","USDP","BSV","EMC2","SNT","GTO","POWR","EUSD","EURT","BCY","BTS","ATM","BLOCKPAY","ARDR","AMP","B2X","BITGOLD","BITEUR","ATB","BITUSD","AGRS","DFXT","HIKEN","BIX","KNC","EOS","COB","COSS","BMH","NANO","BDG","BNT","XVG","LKK1Y","LKK","USDK","EURN","NZDT","JSE","GMD","GNF","GYD","YER","XPF","HTG","SLL","SOS","WST","SVC","SYP","NEO","KMF","JUMP","AYA","BLAST","WGR","BCN","BTG","URALS","INN","USDQ","CNH","HUSD","BKRW","NZDX","EURX","CADX","USDEX","JPYX","AUDX","VNDC","EON","GBPX","CHFX","USDJ","IDRT","USDS","USDN","BIDR","IDK","BSD","BTN","KYD","NIO","SBD","SDG","SHP","TOP","XCD","XCHF","CNYT","GYEN","ZUSD","GOLD","TRX","TRYB","PLATC","STRAX","UST","GLM","VAI","BRZ","DDRST","XAUT","MIM"]);function Se(R){return me[R].filter(u=>ve.has(u))}const H={[Z.MOONPAY]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"4.5% or 5 USD",line3:"2,000\u20ac/day, 10,000\u20ac/mo",supportPage:"https://help.moonpay.io/en/",minOrderValue:24.99,maxOrderValue:5e4,validCurrencies:Se(Z.MOONPAY),validCryptoCurrenciesByChain:{[W.MAINNET]:[{value:"aave",display:"AAVE"},{value:"bat",display:"BAT"},{value:"dai",display:"DAI"},{value:"eth",display:"ETH"},{value:"mkr",display:"MKR"},{value:"matic",display:"MATIC"},{value:"usdt",display:"USDT"},{value:"uni",display:"UNI"},{value:"usdc",display:"USDC"},{value:"weth",display:"WETH"}],[W.MATIC]:[{value:"eth_polygon",display:"ETH"},{value:"matic_polygon",display:"MATIC"},{value:"usdc_polygon",display:"USDC"},{value:"usdt_polygon",display:"USDT"}],[W.BSC_MAINNET]:[{value:"bnb_bsc",display:"BNB"},{value:"busd_bsc",display:"BUSD"}],[W.AVALANCHE_MAINNET]:[{value:"avax_cchain",display:"AVAX"},{value:"usdc_cchain",display:"USDC"}],[W.ARBITRUM_MAINNET]:[{value:"eth_arbitrum",display:"ETH"},{value:"usdc_arbitrum",display:"USDC"}],[W.OPTIMISM_MAINNET]:[{value:"eth_optimism",display:"ETH"},{value:"usdc_optimism",display:"USDC"}]},includeFees:!0,api:!0,enforceMax:!1},[Z.WYRE]:{line1:"Apple Pay/ Debit/ Credit Card",line2:"4.9% + 30\xa2 or 5 USD",line3:"$250/day",supportPage:"https://support.sendwyre.com/en/",minOrderValue:5,maxOrderValue:500,validCurrencies:Se(Z.WYRE),validCryptoCurrenciesByChain:{[W.MAINNET]:[{value:"AAVE",display:"AAVE"},{value:"COMP",display:"COMP"},{value:"BAT",display:"BAT"},{value:"BUSD",display:"BUSD"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"WBTC",display:"WBTC"},{value:"MKR",display:"MKR"},{value:"UNI",display:"UNI"},{value:"WETH",display:"WETH"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[W.MATIC]:[{value:"mUSDC",display:"USDC"},{value:"MATIC",display:"MATIC"},{value:"MWETH",display:"WETH"}],[W.AVALANCHE_MAINNET]:[{value:"AVAXC",display:"AVAX"},{value:"AVAXCUSDC",display:"USDC"}],[W.BSC_MAINNET]:[{value:"BNB",display:"BNB"},{value:"BBUSD",display:"BUSD"}]},includeFees:!1,api:!0,enforceMax:!1},[Z.RAMPNETWORK]:{line1:"Debit Card/
Apple Pay/ Bank transfer",line2:"0.49% - 2.9%",line3:"5,000\u20ac/purchase, 20,000\u20ac/mo",supportPage:"https://instant.ramp.network/",minOrderValue:50,maxOrderValue:2e4,validCurrencies:Se(Z.RAMPNETWORK),validCryptoCurrenciesByChain:{[W.MAINNET]:[{value:"ETH",display:"ETH"},{value:"DAI",display:"DAI"},{value:"BAT",display:"BAT"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[W.MATIC]:[{value:"MATIC_BAT",display:"BAT"},{value:"MATIC_DAI",display:"DAI"},{value:"MATIC_MATIC",display:"MATIC"},{value:"MATIC_USDC",display:"USDC"},{value:"MATIC_USDT",display:"USDT"}],[W.AVALANCHE_MAINNET]:[{value:"AVAX_AVAX",display:"AVAX"},{value:"AVAX_USDC",display:"USDC"},{value:"AVAX_USDT",display:"USDT"}],[W.ARBITRUM_MAINNET]:[{value:"ARBITRUM_ETH",display:"ETH"},{value:"ARBITRUM_USDC.e\t",display:"USDC"},{value:"ARBITRUM_USDT",display:"USDT"}],[W.OPTIMISM_MAINNET]:[{value:"OPTIMISM_DAI",display:"DAI"},{value:"OPTIMISM_OPTIMISM",display:"OPTIMISM"},{value:"OPTIMISM_USDC",display:"USDC"},{value:"OPTIMISM_USDT",display:"USDT"}],[W.BSC_MAINNET]:[{value:"BSC_BNB",display:"BNB"},{value:"BSC_BUSD",display:"BUSD"}]},includeFees:!0,api:!0,receiveHint:"walletTopUp.receiveHintRamp",enforceMax:!1},[Z.XANPOOL]:{line1:"PayNow/ InstaPay/ FPS/ GoJekPay/ UPI/ PromptPay/
ViettelPay/ DuitNow",line2:"2.5% buying, 3% selling",line3:"$2,500 / day",supportPage:"mailto:support@xanpool.com",minOrderValue:100,maxOrderValue:2500,validCurrencies:Se(Z.XANPOOL),validCryptoCurrenciesByChain:{[W.MAINNET]:[{value:"ETH",display:"ETH"},{value:"USDT",display:"USDT"},{value:"USDC",display:"USDC"}]},includeFees:!0,api:!0,sell:!0,enforceMax:!1},[Z.MERCURYO]:{line1:"Credit/ Debit Card/ Apple Pay",line2:"3.95% or 4 USD",line3:"10,000\u20ac/day, 25,000\u20ac/mo",supportPage:"mailto:support@mercuryo.io",minOrderValue:30,maxOrderValue:5e3,validCurrencies:Se(Z.MERCURYO),validCryptoCurrenciesByChain:{[W.MAINNET]:[{value:"ETH",display:"ETH"},{value:"BAT",display:"BAT"},{value:"USDT",display:"USDT"},{value:"DAI",display:"DAI"}],[W.BSC_MAINNET]:[{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"},{value:"1INCH",display:"1INCH"}],[W.AVALANCHE_MAINNET]:[{value:"AVAX",display:"AVAX"}],[W.MATIC]:[{value:"MATIC",display:"MATIC"}]},includeFees:!0,api:!0,enforceMax:!1},[Z.TRANSAK]:{line1:"Apple & Google Pay / Credit/Debit Card
Bangkok Bank Mobile & iPay
Bank Transfer (sepa/gbp) / SCB Mobile & Easy",line2:"0.99% - 5.5% or 5 USD",line3:"$5,000/day, $28,000/mo",supportPage:"https://support.transak.com/hc/en-US",minOrderValue:30,maxOrderValue:500,validCurrencies:Se(Z.TRANSAK),validCryptoCurrenciesByChain:{[W.MAINNET]:[{value:"1INCH",display:"1INCH"},{value:"BAT",display:"BAT"},{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"ETH",display:"ETH"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"}],[W.MATIC]:[{value:"BAT",display:"BAT"},{value:"AAVE",display:"AAVE"},{value:"DAI",display:"DAI"},{value:"MATIC",display:"MATIC"},{value:"USDC",display:"USDC"},{value:"USDT",display:"USDT"},{value:"WETH",display:"WETH"}],[W.BSC_MAINNET]:[{value:"BAT",display:"BAT"},{value:"BNB",display:"BNB"},{value:"BUSD",display:"BUSD"}],[W.AVALANCHE_MAINNET]:[{value:"AVAX",display:"AVAX"}],[W.OPTIMISM_MAINNET]:[{value:"ETH",display:"ETH"},{value:"USDC",display:"USDC"}],[W.ARBITRUM_MAINNET]:[{value:"USDC",display:"USDC"},{value:"ETH",display:"ETH"}]},includeFees:!0,enforceMax:!0},[Z.BANXA]:{line1:"Debit Card/
Apple Pay/ Bank transfer",line2:"0.49% - 2.9%",line3:"5,000\u20ac/purchase, 20,000\u20ac/mo",supportPage:"https://support.banxa.com",minOrderValue:20,maxOrderValue:15e3,validCurrencies:Se(Z.BANXA),validCryptoCurrenciesByChain:{[W.MAINNET]:[{value:"ETH",display:"ETH"},{value:"DAI",display:"DAI"},{value:"MKR",display:"MKR"},{value:"USDT",display:"USDT"},{value:"BUSD",display:"BUSD"},{value:"USDC",display:"USDC"},{value:"BAT",display:"BAT"},{value:"AAVE",display:"AAVE"},{value:"COMP",display:"COMP"},{value:"UNI",display:"UNI"}],[W.MATIC]:[{value:"MATIC",display:"MATIC"}]},includeFees:!0,enforceMax:!0}},ce={supportedVerifierList:Object.values(te),paymentProviders:H,api:"https://api.tor.us",translations:{en:{embed:{continue:"Continue",actionRequired:"Authorization required",pendingAction:"Click continue to proceed with your request in a popup",cookiesRequired:"Cookies Required",enableCookies:"Please enable cookies in your browser preferences to access Torus",clickHere:"More Info"}},de:{embed:{continue:"Fortsetzen",actionRequired:"Autorisierung erforderlich",pendingAction:"Klicken Sie in einem Popup auf Weiter, um mit Ihrer Anfrage fortzufahren",cookiesRequired:"Cookies ben\xf6tigt",enableCookies:"Bitte aktivieren Sie Cookies in Ihren Browsereinstellungen, um auf Torus zuzugreifen",clickHere:"Mehr Info"}},ja:{embed:{continue:"\u7d99\u7d9a\u3059\u308b",actionRequired:"\u8a8d\u8a3c\u304c\u5fc5\u8981\u3067\u3059",pendingAction:"\u7d9a\u884c\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u3001\u30dd\u30c3\u30d7\u30a2\u30c3\u30d7\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u7d9a\u884c\u3057\u307e\u3059",cookiesRequired:"\u5fc5\u8981\u306a\u30af\u30c3\u30ad\u30fc",enableCookies:"Torus\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u306b\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u8a2d\u5b9a\u3067Cookie\u3092\u6709\u52b9\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002",clickHere:"\u8a73\u3057\u304f\u306f"}},ko:{embed:{continue:"\uacc4\uc18d\ud558\ub2e4",actionRequired:"\uc2b9\uc778 \ud544\uc694",pendingAction:"\ud31d\uc5c5\uc5d0\uc11c \uc694\uccad\uc744 \uc9c4\ud589\ud558\ub824\uba74 \uacc4\uc18d\uc744 \ud074\ub9ad\ud558\uc2ed\uc2dc\uc624.",cookiesRequired:"\ucfe0\ud0a4 \ud544\uc694",enableCookies:"\ube0c\ub77c\uc6b0\uc800 \ud658\uacbd \uc124\uc815\uc5d0\uc11c \ucfe0\ud0a4\ub97c \ud65c\uc131\ud654\ud558\uc5ec Torus\uc5d0 \uc561\uc138\uc2a4\ud558\uc2ed\uc2dc\uc624.",clickHere:"\ub354 \ub9ce\uc740 \uc815\ubcf4"}},zh:{embed:{continue:"\u7ee7\u7eed",actionRequired:"\u9700\u8981\u6388\u6743",pendingAction:"\u5355\u51fb\u7ee7\u7eed\u4ee5\u5728\u5f39\u51fa\u7a97\u53e3\u4e2d\u7ee7\u7eed\u60a8\u7684\u8bf7\u6c42",cookiesRequired:"\u5fc5\u586bCookie",enableCookies:"\u8bf7\u5728\u60a8\u7684\u6d4f\u89c8\u5668\u9996\u9009\u9879\u4e2d\u542f\u7528cookie\u4ee5\u8bbf\u95eeTorus\u3002",clickHere:"\u66f4\u591a\u4fe1\u606f"}}},prodTorusUrl:"",localStorageKeyPrefix:"torus-"},ye=R=>{const u=window.document.createElement("template"),w=R.trim();return u.innerHTML=w,u.content.firstChild},_e=(R,u,w)=>{const x=q=>{w(q),R.removeListener(u,x)};R.on(u,x)};var $=Te(4063),z=Te.n($),ae=Te(4970);const fe=d().getLogger("torus-embed"),de={errors:{disconnected:()=>"Torus: Lost connection to Torus.",permanentlyDisconnected:()=>"Torus: Disconnected from iframe. Page reload required.",sendSiteMetadata:()=>"Torus: Failed to send site metadata. This is an internal error, please report this bug.",unsupportedSync:R=>`Torus: The Torus Ethereum provider does not support synchronous methods like ${R} without a callback parameter.`,invalidDuplexStream:()=>"Must provide a Node.js-style duplex stream.",invalidOptions:(R,u)=>`Invalid options. Received: { maxEventListeners: ${R}, shouldSendMetadata: ${u} }`,invalidRequestArgs:()=>"Expected a single, non-array, object argument.",invalidRequestMethod:()=>"'args.method' must be a non-empty string.",invalidRequestParams:()=>"'args.params' must be an object or array if provided.",invalidLoggerObject:()=>"'args.logger' must be an object if provided.",invalidLoggerMethod:R=>`'args.logger' must include required method '${R}'.`},info:{connected:R=>`Torus: Connected to chain with ID "${R}".`},warnings:{enableDeprecation:'Torus: ""ethereum.enable()" is deprecated and may be removed in the future. Please use "ethereum.send("eth_requestAccounts")" instead. For more information, see: https://eips.ethereum.org/EIPS/eip-1102',sendDeprecation:'Torus: "ethereum.send(...)" is deprecated and may be removed in the future. Please use "ethereum.sendAsync(...)" or "ethereum.request(...)" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',events:{close:'Torus: The event "close" is deprecated and may be removed in the future. Please use "disconnect" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',data:'Torus: The event "data" is deprecated and will be removed in the future.Use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193#message',networkChanged:'Torus: The event "networkChanged" is deprecated and may be removed in the future. Please use "chainChanged" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193',notification:'Torus: The event "notification" is deprecated and may be removed in the future. Please use "message" instead.\nFor more information, see: https://eips.ethereum.org/EIPS/eip-1193'},publicConfigStore:'Torus: The property "publicConfigStore" is deprecated and WILL be removed in the future.'}};function r(R,u){var w=Object.keys(R);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(R);u&&(x=x.filter(function(q){return Object.getOwnPropertyDescriptor(R,q).enumerable})),w.push.apply(w,x)}return w}function l(R){for(var u=1;uthis.push(w),this.obsStore=u,this.obsStore.subscribe(this.handler)}pipe(u,w){const x=super.pipe(u,w);return u.write(this.obsStore.getState()),x}_write(u,w,x){this.obsStore.putState(u),x()}_read(u){}_destroy(u,w){this.obsStore.unsubscribe(this.handler),super._destroy(u,w)}}function f(R,u){var w=Object.keys(R);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(R);u&&(x=x.filter(function(q){return Object.getOwnPropertyDescriptor(R,q).enumerable})),w.push.apply(w,x)}return w}function m(R){for(var u=1;u0&&w.emit("error",x)}const N=()=>Math.random().toString(36).slice(2),j=function(){var R=Ie(function*(u,w){let x,q,oe=w.version||"2.2.5";try{if(("binance"===u||"production"===u)&&!w.version){let he;he=ce.prodTorusUrl?{data:ce.prodTorusUrl}:yield y(`${ce.api}/latestversion?name=@toruslabs/torus-embed&version=2.2.5`,{},{useAPIKey:!0}),oe=he.data,ce.prodTorusUrl=he.data}}catch(he){fe.error(he,"unable to fetch latest version")}switch(fe.info("version used: ",oe),u){case"binance":x=`https://binance.tor.us/v${oe}`,q="info";break;case"testing":x="https://testing.tor.us",q="debug";break;case"bnb":x="https://bnb.tor.us",q="error";break;case"polygon":x="https://polygon.tor.us",q="error";break;case"lrc":x="https://lrc.tor.us",q="debug";break;case"beta":x="https://beta.tor.us",q="debug";break;case"development":x="http://localhost:4050",q="debug";break;case"alpha":x="https://alpha.tor.us",q="debug";break;default:x=`https://app.tor.us/v${oe}`,q="error"}return{torusUrl:x,logLevel:q}});return function(w,x){return R.apply(this,arguments)}}(),J=()=>{let R=window.navigator.language||"en-US";const u=R.split("-");return R=Object.prototype.hasOwnProperty.call(ce.translations,u[0])?u[0]:"en",R},le=["eth_subscription"],Re=()=>{},Ce="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=660,width=375",Pe="directories=0,titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=450";function ke(R,u){var w=Object.keys(R);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(R);u&&(x=x.filter(function(q){return Object.getOwnPropertyDescriptor(R,q).enumerable})),w.push.apply(w,x)}return w}function De(R){for(var u=1;u2&&void 0!==arguments[2])||arguments[2];return(x,q)=>x||q.error?u(x||q.error):!w||Array.isArray(q)?R(q):R(q.result)};class Ve extends Q{constructor(u){let{maxEventListeners:w=100,shouldSendMetadata:x=!0,jsonRpcStreamName:q="provider"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(super(),t(this,"chainId",void 0),t(this,"selectedAddress",void 0),t(this,"_rpcEngine",void 0),t(this,"networkVersion",void 0),t(this,"shouldSendMetadata",void 0),t(this,"isTorus",void 0),t(this,"_publicConfigStore",void 0),t(this,"tryPreopenHandle",void 0),t(this,"enable",void 0),t(this,"_state",void 0),t(this,"_jsonRpcConnection",void 0),t(this,"_sentWarnings",{enable:!1,experimentalMethods:!1,send:!1,publicConfigStore:!1,events:{close:!1,data:!1,networkChanged:!1,notification:!1}}),!(0,ae.duplex)(u))throw new Error(de.errors.invalidDuplexStream());this.isTorus=!0,this.setMaxListeners(w),this._state=De({},Ve._defaultState),this.selectedAddress=null,this.networkVersion=null,this.chainId=null,this.shouldSendMetadata=x,this._handleAccountsChanged=this._handleAccountsChanged.bind(this),this._handleChainChanged=this._handleChainChanged.bind(this),this._handleUnlockStateChanged=this._handleUnlockStateChanged.bind(this),this._handleConnect=this._handleConnect.bind(this),this._handleDisconnect=this._handleDisconnect.bind(this),this._handleStreamDisconnect=this._handleStreamDisconnect.bind(this),this._sendSync=this._sendSync.bind(this),this._rpcRequest=this._rpcRequest.bind(this),this._warnOfDeprecation=this._warnOfDeprecation.bind(this),this._initializeState=this._initializeState.bind(this),this.request=this.request.bind(this),this.send=this.send.bind(this),this.sendAsync=this.sendAsync.bind(this);const ne=new X;k()(u,ne,u,this._handleStreamDisconnect.bind(this,"MetaMask")),this._publicConfigStore=new h({storageKey:"Metamask-Config"}),k()(ne.createStream("publicConfig"),new M(this._publicConfigStore),S.bind(this,"MetaMask PublicConfigStore")),ne.ignoreStream("phishing"),this.on("connect",()=>{this._state.isConnected=!0});const he=function(){const be={},Ee=new Q,Ae=new b.Duplex({objectMode:!0,read:function(){return!1},write:function(Le,Ne,Ue){let Be;try{Le.id?function(Ke){const tt=be[Ke.id];if(!tt)throw new Error(`StreamMiddleware - Unknown response id "${Ke.id}"`);delete be[Ke.id],Object.assign(tt.res,Ke),setTimeout(tt.end)}(Le):Ee.emit("notification",Ke=Le)}catch(Ke){Be=Ke}var Ke;Ue(Be)}});return{events:Ee,middleware:(Le,Ne,Ue,Be)=>{Ae.push(Le),be[Le.id]={req:Le,res:Ne,next:Ue,end:Be}},stream:Ae}}();k()(he.stream,ne.createStream(q),he.stream,this._handleStreamDisconnect.bind(this,"MetaMask RpcProvider"));const pe=new we;pe.push((be,Ee,Ae,Le)=>{const Ne=be.id,Ue=Math.random().toString(36).slice(2);be.id=Ue,Ee.id=Ue,Ae(Be=>{be.id=Ne,Ee.id=Ne,Be()})}),pe.push((be,Ee,Ae)=>{"string"==typeof be.method&&be.method||(Ee.error=v.PY.invalidRequest({message:"The request 'method' must be a non-empty string.",data:m(m({},be||{}),{},{cause:"The request 'method' must be a non-empty string."})})),Ae(Le=>{const{error:Ne}=Ee;return Ne&&fe.error(`MetaMask - RPC Error: ${Ne.message}`,Ne),Le()})}),pe.push(he.middleware),this._rpcEngine=pe,he.events.on("notification",be=>{const{method:Ee,params:Ae}=be;"wallet_accountsChanged"===Ee?this._handleAccountsChanged(Ae):"wallet_unlockStateChanged"===Ee?this._handleUnlockStateChanged(Ae):"wallet_chainChanged"===Ee?this._handleChainChanged(Ae):le.includes(be.method)&&(this.emit("data",be),this.emit("notification",Ae.result),this.emit("message",{type:Ee,data:Ae}))})}get publicConfigStore(){return this._sentWarnings.publicConfigStore||(fe.warn(de.warnings.publicConfigStore),this._sentWarnings.publicConfigStore=!0),this._publicConfigStore}isConnected(){return this._state.isConnected}request(u){var w=this;return Ie(function*(){if(!u||"object"!=typeof u||Array.isArray(u))throw v.PY.invalidRequest({message:de.errors.invalidRequestArgs(),data:De(De({},u||{}),{},{cause:de.errors.invalidRequestArgs()})});const{method:x,params:q}=u;if("string"!=typeof x||0===x.length)throw v.PY.invalidRequest({message:de.errors.invalidRequestMethod(),data:De(De({},u||{}),{},{cause:de.errors.invalidRequestArgs()})});if(void 0!==q&&!Array.isArray(q)&&("object"!=typeof q||null===q))throw v.PY.invalidRequest({message:de.errors.invalidRequestParams(),data:De(De({},u||{}),{},{cause:de.errors.invalidRequestArgs()})});return new Promise((ne,oe)=>{w._rpcRequest({method:x,params:q},We(ne,oe))})})()}sendAsync(u,w){this._rpcRequest(u,w)}addListener(u,w){return this._warnOfDeprecation(u),super.addListener(u,w)}on(u,w){return this._warnOfDeprecation(u),super.on(u,w)}once(u,w){return this._warnOfDeprecation(u),super.once(u,w)}prependListener(u,w){return this._warnOfDeprecation(u),super.prependListener(u,w)}prependOnceListener(u,w){return this._warnOfDeprecation(u),super.prependOnceListener(u,w)}_initializeState(){var u=this;return Ie(function*(){try{const{accounts:w,chainId:x,isUnlocked:q,networkVersion:ne}=yield u.request({method:"wallet_getProviderState"});u.emit("connect",{chainId:x}),u._handleChainChanged({chainId:x,networkVersion:ne}),u._handleUnlockStateChanged({accounts:w,isUnlocked:q}),u._handleAccountsChanged(w)}catch(w){fe.error("MetaMask: Failed to get initial state. Please report this bug.",w)}finally{fe.info("initialized state"),u._state.initialized=!0,u.emit("_initialized")}})()}_rpcRequest(u,w){let x=arguments.length>2&&void 0!==arguments[2]&&arguments[2],q=w;const ne=u;if(!Array.isArray(ne))if(ne.jsonrpc||(ne.jsonrpc="2.0"),"eth_accounts"===ne.method||"eth_requestAccounts"===ne.method)q=(oe,he)=>{this._handleAccountsChanged(he.result||[],"eth_accounts"===ne.method,x),w(oe,he)};else if("wallet_getProviderState"===ne.method)return void this._rpcEngine.handle(u,q);this.tryPreopenHandle(ne,q)}send(u,w){return this._sentWarnings.send||(fe.warn(de.warnings.sendDeprecation),this._sentWarnings.send=!0),"string"!=typeof u||w&&!Array.isArray(w)?u&&"object"==typeof u&&"function"==typeof w?this._rpcRequest(u,w):this._sendSync(u):new Promise((x,q)=>{try{this._rpcRequest({method:u,params:w},We(x,q,!1))}catch(ne){q(ne)}})}_sendSync(u){let w;switch(u.method){case"eth_accounts":w=this.selectedAddress?[this.selectedAddress]:[];break;case"eth_coinbase":w=this.selectedAddress||null;break;case"eth_uninstallFilter":this._rpcRequest(u,Re),w=!0;break;case"net_version":w=this.networkVersion||null;break;default:throw new Error(de.errors.unsupportedSync(u.method))}return{id:u.id,jsonrpc:u.jsonrpc,result:w}}_handleConnect(u){this._state.isConnected||(this._state.isConnected=!0,this.emit("connect",{chainId:u}),fe.debug(de.info.connected(u)))}_handleDisconnect(u,w){if(this._state.isConnected||!this._state.isPermanentlyDisconnected&&!u){let x;this._state.isConnected=!1,u?(x=new v.yd(1013,w||de.errors.disconnected()),fe.debug(x)):(x=new v.yd(1011,w||de.errors.permanentlyDisconnected()),fe.error(x),this.chainId=null,this._state.accounts=null,this.selectedAddress=null,this._state.isUnlocked=!1,this._state.isPermanentlyDisconnected=!0),this.emit("disconnect",x)}}_handleStreamDisconnect(u,w){S(u,w,this),this._handleDisconnect(!1,w?w.message:void 0)}_handleAccountsChanged(u){let w=arguments.length>1&&void 0!==arguments[1]&&arguments[1],x=arguments.length>2&&void 0!==arguments[2]&&arguments[2],q=u;Array.isArray(q)||(fe.error("MetaMask: Received non-array accounts parameter. Please report this bug.",q),q=[]);for(const ne of u)if("string"!=typeof ne){fe.error("MetaMask: Received non-string account. Please report this bug.",u),q=[];break}z()(this._state.accounts,q)||(w&&Array.isArray(this._state.accounts)&&this._state.accounts.length>0&&!x&&fe.error('MetaMask: "eth_accounts" unexpectedly updated accounts. Please report this bug.',q),this._state.accounts=q,this.emit("accountsChanged",q)),this.selectedAddress!==q[0]&&(this.selectedAddress=q[0]||null)}_handleChainChanged(){let{chainId:u,networkVersion:w}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};u&&w?"loading"===w?this._handleDisconnect(!0):(this._handleConnect(u),u!==this.chainId&&(this.chainId=u,this._state.initialized&&this.emit("chainChanged",this.chainId))):fe.error("MetaMask: Received invalid network parameters. Please report this bug.",{chainId:u,networkVersion:w})}_handleUnlockStateChanged(){let{accounts:u,isUnlocked:w}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"boolean"==typeof w?w!==this._state.isUnlocked&&(this._state.isUnlocked=w,this._handleAccountsChanged(u||[])):fe.error("MetaMask: Received invalid isUnlocked parameter. Please report this bug.",{isUnlocked:w})}_warnOfDeprecation(u){!1===this._sentWarnings.events[u]&&(fe.warn(de.warnings.events[u]),this._sentWarnings.events[u]=!0)}}t(Ve,"_defaultState",{accounts:null,isConnected:!1,isUnlocked:!1,initialized:!1,isPermanentlyDisconnected:!1,hasEmittedConnection:!1});const Je=Ve,ct=class He extends g.EventEmitter{constructor(u){let{url:w,target:x,features:q}=u;super(),t(this,"url",void 0),t(this,"target",void 0),t(this,"features",void 0),t(this,"window",void 0),t(this,"windowTimer",void 0),t(this,"iClosedWindow",void 0),this.url=w,this.target=x||"_blank",this.features=q||function(){const ne=void 0!==window.screenLeft?window.screenLeft:window.screenX,oe=void 0!==window.screenTop?window.screenTop:window.screenY,he=window.innerWidth?window.innerWidth:document.documentElement.clientWidth?document.documentElement.clientWidth:window.screen.width,pe=window.innerHeight?window.innerHeight:document.documentElement.clientHeight?document.documentElement.clientHeight:window.screen.height,be=Math.abs((he-1200)/2/1+ne);return`titlebar=0,toolbar=0,status=0,location=0,menubar=0,height=700,width=1200,top=${Math.abs((pe-700)/2/1+oe)},left=${be}`}(),this.window=void 0,this.windowTimer=void 0,this.iClosedWindow=!1,this._setupTimer()}_setupTimer(){this.windowTimer=Number(setInterval(()=>{this.window&&this.window.closed&&(clearInterval(this.windowTimer),this.iClosedWindow||this.emit("close"),this.iClosedWindow=!1,this.window=void 0),void 0===this.window&&clearInterval(this.windowTimer)},500))}open(){var u;this.window=window.open(this.url.href,this.target,this.features),null!==(u=this.window)&&void 0!==u&&u.focus&&this.window.focus()}close(){this.iClosedWindow=!0,this.window&&this.window.close()}redirect(u){u?window.location.replace(this.url.href):window.location.href=this.url.href}};function st(R){return new Promise((u,w)=>{try{const x=document.createElement("img");x.onload=()=>u(!0),x.onerror=()=>u(!1),x.src=R}catch(x){w(x)}})}const ft=R=>{const{document:u}=R,w=u.querySelector('head > meta[property="og:site_name"]');if(w)return w.content;const x=u.querySelector('head > meta[name="title"]');return x?x.content:u.title&&u.title.length>0?u.title:R.location.hostname};function rt(R){return nt.apply(this,arguments)}function nt(){return(nt=Ie(function*(R){const{document:u}=R;let w=u.querySelector('head > link[rel="shortcut icon"]');return w&&(yield st(w.href))?w.href:(w=Array.from(u.querySelectorAll('head > link[rel="icon"]')).find(x=>Boolean(x.href)),w&&(yield st(w.href))?w.href:null)})).apply(this,arguments)}var ht=Te(8764).Buffer;const pt=["host","chainId","networkName"];function at(R,u){var w=Object.keys(R);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(R);u&&(x=x.filter(function(q){return Object.getOwnPropertyDescriptor(R,q).enumerable})),w.push.apply(w,x)}return w}function vt(R){for(var u=1;u"u")return;const R=document.createElement("link"),{torusUrl:u}=yield j("production",{version:""});R.href=`${u}/popup`,R.crossOrigin="anonymous",R.type="text/html",R.rel="prefetch",R.relList&&R.relList.supports&&R.relList.supports("prefetch")&&document.head.appendChild(R)}catch(R){fe.warn(R)}})();const Y=class{constructor(){let{buttonPosition:R=se.BOTTOM_LEFT,buttonSize:u=56,modalZIndex:w=99999,apiKey:x="torus-default"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t(this,"buttonPosition",se.BOTTOM_LEFT),t(this,"buttonSize",void 0),t(this,"torusUrl",void 0),t(this,"torusIframe",void 0),t(this,"styleLink",void 0),t(this,"isLoggedIn",void 0),t(this,"isInitialized",void 0),t(this,"torusWidgetVisibility",void 0),t(this,"torusAlert",void 0),t(this,"apiKey",void 0),t(this,"modalZIndex",void 0),t(this,"alertZIndex",void 0),t(this,"torusAlertContainer",void 0),t(this,"isIframeFullScreen",void 0),t(this,"whiteLabel",void 0),t(this,"requestedVerifier",void 0),t(this,"currentVerifier",void 0),t(this,"embedTranslations",void 0),t(this,"ethereum",void 0),t(this,"provider",void 0),t(this,"communicationMux",void 0),t(this,"isLoginCallback",void 0),t(this,"paymentProviders",ce.paymentProviders),t(this,"loginHint",""),t(this,"useWalletConnect",void 0),t(this,"isCustomLogin",!1),this.buttonPosition=R,this.buttonSize=u,this.torusUrl="",this.isLoggedIn=!1,this.isInitialized=!1,this.torusWidgetVisibility=!0,this.requestedVerifier="",this.currentVerifier="",this.apiKey=x,function a(R){i=R}(x),this.modalZIndex=w,this.alertZIndex=w+1e3,this.isIframeFullScreen=!1}init(){var R=arguments,u=this;return Ie(function*(){let{buildEnv:w=ue.PRODUCTION,enableLogging:x=!1,network:q={host:"mainnet",chainId:null,networkName:"",blockExplorer:"",ticker:"",tickerName:""},loginConfig:ne={},showTorusButton:oe=!0,integrity:he={version:""},whiteLabel:pe,useWalletConnect:be=!1,mfaLevel:Ee="default"}=R.length>0&&void 0!==R[0]?R[0]:{};if(u.isInitialized)throw new Error("Already initialized");const{torusUrl:Ae,logLevel:Le}=yield j(w,he);fe.info(Ae,"url loaded"),u.torusUrl=Ae,u.whiteLabel=pe,u.useWalletConnect=be,u.isCustomLogin=!!(ne&&Object.keys(ne).length>0)||!!(pe&&Object.keys(pe).length>0),fe.setDefaultLevel(Le),x?fe.enableAll():fe.disableAll(),u.torusWidgetVisibility=oe;const Ne=new URL(Ae);Ne.pathname.endsWith("/")?Ne.pathname+="popup":Ne.pathname+="/popup",Ne.hash=`#isCustomLogin=${u.isCustomLogin}`,u.torusIframe=ye(`