@wormhole-foundation/wormhole-connect 2.5.0-beta.8-development → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/aptos-Cutllx5i.js +3 -0
- package/dist/assets/{ccip-DoYNnipC.js → ccip-C6cz5NqJ.js} +1 -1
- package/dist/assets/events-MYC_Tkdh.js +1 -0
- package/dist/assets/{evm-Cg9_Z6ON.js → evm-DzwJdvcV.js} +2 -2
- package/dist/assets/{evm-DSNDNefN.js → evm-LJDXipdh.js} +3 -3
- package/dist/assets/{index-Bhi-Ol-W.js → index-BECoIARf.js} +1 -1
- package/dist/assets/{index-TVGCRxSf.js → index-BO5vFz_J.js} +1 -1
- package/dist/assets/{index-IFf5IHmZ.js → index-BVJL1orJ.js} +1 -1
- package/dist/assets/{index-CuW_tQti.js → index-BwNyYZxM.js} +1 -1
- package/dist/assets/{index-CLAfmegc.js → index-C6UKJUdm.js} +1 -1
- package/dist/assets/index-CJZzjIow.js +1 -0
- package/dist/assets/{index-CItGJ_dO.js → index-CSiH4dly.js} +1 -1
- package/dist/assets/{index-CrZXNnmG.js → index-CqEHg303.js} +1 -1
- package/dist/assets/{index-Ba5OrqB6.js → index-D3R8fZfr.js} +1 -1
- package/dist/assets/{index-DPi-hS0A.js → index-Ds_BlDdN.js} +2 -2
- package/dist/assets/{index-7lgoK4KP.js → index-DwJjUFus.js} +1 -1
- package/dist/assets/{index-mE5izIg0.js → index-Dxpp9NXJ.js} +1 -1
- package/dist/assets/{index-DShwbc4p.js → index-EvC_Tjca.js} +1 -1
- package/dist/assets/{index-TctZ2EQK.js → index-RZp63Yuv.js} +1 -1
- package/dist/assets/{index-CD-O7bSQ.js → index-iiAA6CTH.js} +1 -1
- package/dist/assets/{index-CmR0e8xk.js → index-m7pOREIu.js} +1 -1
- package/dist/assets/{index-D2Ev-0A_.js → index-wwvQRwKh.js} +1 -1
- package/dist/assets/{index.es-e2znZrg8.js → index.es-C9O0OD76.js} +6 -6
- package/dist/assets/solana-B0Eox3vZ.js +2 -0
- package/dist/assets/{solana-DCCw_nmt.js → solana-BGWrrBcM.js} +2 -2
- package/dist/assets/solanaEmbed.esm-C9Mwa0DJ.js +37 -0
- package/dist/assets/{sui-ByNmqUgP.js → sui-COEHPNCD.js} +2 -2
- package/dist/assets/{tokens-BSV7gluG.js → tokens-CzZADlQh.js} +1 -1
- package/dist/main.js +54 -54
- package/dist/src/AppRouter.d.ts.map +1 -1
- package/dist/src/components/v2/Button.d.ts.map +1 -1
- package/dist/src/config/tokens.d.ts +2 -2
- package/dist/src/config/tokens.d.ts.map +1 -1
- package/dist/src/hooks/useAmountValidation.d.ts +1 -1
- package/dist/src/hooks/useAmountValidation.d.ts.map +1 -1
- package/dist/src/hooks/useComputeDestinationTokens.d.ts.map +1 -1
- package/dist/src/hooks/useFetchQuotes.d.ts +1 -1
- package/dist/src/hooks/useFetchQuotes.d.ts.map +1 -1
- package/dist/src/hooks/useSortedRoutesWithQuotes.d.ts +1 -1
- package/dist/src/hooks/useSortedRoutesWithQuotes.d.ts.map +1 -1
- package/dist/src/icons/Chains/APT.d.ts.map +1 -1
- package/dist/src/icons/Chains/OSMO.d.ts.map +1 -1
- package/dist/src/icons/Chains/SOL.d.ts.map +1 -1
- package/dist/src/icons/Chains/SUI.d.ts.map +1 -1
- package/dist/src/icons/Chains/UNI.d.ts.map +1 -1
- package/dist/src/icons/Chains/XLAYER.d.ts.map +1 -1
- package/dist/src/icons/Routes/CCTP.d.ts.map +1 -1
- package/dist/src/icons/SvgDefs.d.ts +4 -0
- package/dist/src/icons/SvgDefs.d.ts.map +1 -0
- package/dist/src/icons/Tokens/BNB.d.ts.map +1 -1
- package/dist/src/icons/Tokens/BUSD.d.ts.map +1 -1
- package/dist/src/icons/Tokens/DAI.d.ts.map +1 -1
- package/dist/src/icons/Tokens/INJ.d.ts.map +1 -1
- package/dist/src/icons/Tokens/NTT.d.ts.map +1 -1
- package/dist/src/icons/Tokens/OSMO.d.ts.map +1 -1
- package/dist/src/icons/Tokens/POLY.d.ts.map +1 -1
- package/dist/src/icons/Tokens/SOL.d.ts.map +1 -1
- package/dist/src/icons/Tokens/USDT.d.ts.map +1 -1
- package/dist/src/icons/Tokens/WBTC.d.ts.map +1 -1
- package/dist/src/routes/operator.d.ts +1 -1
- package/dist/src/routes/operator.d.ts.map +1 -1
- package/dist/src/routes/sdkv2/route.d.ts.map +1 -1
- package/dist/src/theme.d.ts +1 -0
- package/dist/src/theme.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/TokenList.d.ts +2 -0
- package/dist/src/views/v2/Bridge/AssetPicker/TokenList.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
- package/dist/src/views/v2/Bridge/index.d.ts.map +1 -1
- package/lib/{aptos-CzXBQ5wx.mjs → aptos-B90d2PTP.mjs} +2 -2
- package/lib/{aptos-BG8ndPcW.mjs → aptos-C_FrT7AS.mjs} +58 -42
- package/lib/aptos-DCwlKmza.js +2 -0
- package/lib/{aptos-DxDdKfid.js → aptos-DqvJ9s4T.js} +1 -1
- package/lib/{base64-B0sAJgP2.js → base64-__Ifj5MR.js} +1 -1
- package/lib/{base64-BFLeU3MK.mjs → base64-pJGiNLFW.mjs} +1 -1
- package/lib/{ccip-Bm7IOUCL.mjs → ccip-BHcaFKBP.mjs} +1 -1
- package/lib/{ccip-Cbpf1wJo.js → ccip-CXTtFoDa.js} +1 -1
- package/lib/{chunk-IMTC3J2M-DwURKwAV.mjs → chunk-IMTC3J2M-C55Jso7e.mjs} +3 -3
- package/lib/{chunk-IMTC3J2M-BGGrA_WC.js → chunk-IMTC3J2M-D0RBa4sC.js} +1 -1
- package/lib/{evm-l6ukE6CV.mjs → evm-BXk_Na9K.mjs} +6 -6
- package/lib/{evm-defRIE54.js → evm-CJ5QSLD2.js} +2 -2
- package/lib/{evm-1rdXpiv3.mjs → evm-D10FMflO.mjs} +5 -5
- package/lib/{evm-DJcjc-_C.js → evm-DpZu6gRr.js} +3 -3
- package/lib/{index-NgGkgCpa.mjs → index-6T4B560h.mjs} +1 -1
- package/lib/{index-CPcdt_MH.js → index-6fgWKB7X.js} +1 -1
- package/lib/{index-DcKSwYsA.js → index-86IwsVGJ.js} +1 -1
- package/lib/{index-BgOfWrzS.mjs → index-BHPYfzOB.mjs} +3 -3
- package/lib/{index-BsOOcqS5.js → index-BNKGL3iv.js} +1 -1
- package/lib/{index-5NBqfbfS.mjs → index-BPe5meha.mjs} +1 -1
- package/lib/{index-Dxs-J9dD.mjs → index-BVpbj0Tj.mjs} +1 -1
- package/lib/{index-mZitl_HA.mjs → index-BZ29iqdD.mjs} +2 -2
- package/lib/{index-OVEyrgEm.js → index-BkRMdfYl.js} +1 -1
- package/lib/{index-B2xDzy7A.js → index-BoNkxlCs.js} +1 -1
- package/lib/{index-B-3CdahH.js → index-Byf4HvjQ.js} +71 -71
- package/lib/{index-DW-aptRt.mjs → index-C-xYmrin.mjs} +2 -2
- package/lib/{index-pNMjrl4H.js → index-C2Q--ZqR.js} +1 -1
- package/lib/{index-BWOiAGve.js → index-C2ejTmxN.js} +1 -1
- package/lib/{index-DJLQFXCy.js → index-C3h0Dfd5.js} +1 -1
- package/lib/{index-BxQJKr_h.js → index-CM0Su2aL.js} +1 -1
- package/lib/{index-lPrZfOXi.mjs → index-COqG2J4V.mjs} +2 -2
- package/lib/{index-CDRjrfnz.mjs → index-CT3jDbNB.mjs} +1 -1
- package/lib/{index-B2xZ6kt4.mjs → index-C_jwGx2-.mjs} +15720 -13712
- package/lib/{index-DicZFeR7.mjs → index-Cc13Eu8K.mjs} +2 -2
- package/lib/{index-VhqEeF9I.mjs → index-CebPNw3m.mjs} +2 -2
- package/lib/{index-BmCFLdEX.js → index-CecBLn6U.js} +1 -1
- package/lib/{index-BwAyuZmy.mjs → index-ChaEETit.mjs} +1 -1
- package/lib/{index-BloVXId9.js → index-CqJCTEYm.js} +1 -1
- package/lib/{index-Cx9TS0XH.mjs → index-CzpUSFAu.mjs} +8 -10
- package/lib/{index-DYb7vb-V.js → index-D-DskOkz.js} +1 -1
- package/lib/{index-D6N53skz.js → index-D1Cr8uoN.js} +1 -1
- package/lib/{index-CelSnuJI.mjs → index-D1wdtvCl.mjs} +1 -1
- package/lib/{index-Dh8BTmR_.mjs → index-D7QLchCD.mjs} +2 -2
- package/lib/{index-EyD8yuwm.mjs → index-DFp32sYl.mjs} +2 -2
- package/lib/{index-BtsATNxk.js → index-DPk7O7q3.js} +1 -1
- package/lib/index-DU7IijQJ.js +1 -0
- package/lib/{index-IjHFzfzT.mjs → index-Dct0dNGF.mjs} +6 -6
- package/lib/{index-CFJ0wajU.mjs → index-Df-5S1Iv.mjs} +1 -1
- package/lib/{index-BMEVNQXB.js → index-Dhq7Pqaa.js} +1 -1
- package/lib/{index-CVoCwjDl.js → index-DnO1h07I.js} +1 -1
- package/lib/{index-DtqirkNJ.js → index-Dpw575di.js} +1 -1
- package/lib/{index-Bq9Xcog1.js → index-DuNtk_Lq.js} +1 -1
- package/lib/{index-B_MUS6zc.mjs → index-Dv30dU3D.mjs} +1 -1
- package/lib/{index-EDktb6S4.js → index-DyRsrKiv.js} +1 -1
- package/lib/{index-CIC3ywMJ.js → index-DyxZ0b9m.js} +1 -1
- package/lib/{index-8FtdcDhM.mjs → index-PEFZLehv.mjs} +3 -3
- package/lib/{index-CVlcHpc6.mjs → index-R-_MpR3F.mjs} +4 -4
- package/lib/{index-BegFjogX.mjs → index-RI1RY4Ud.mjs} +1 -1
- package/lib/{index-C3dHeQ6j.js → index-Tppnb03H.js} +1 -1
- package/lib/{index-BI7xYeBM.mjs → index-Y21tTELG.mjs} +34 -34
- package/lib/{index-BQqU6Wly.js → index-q9Cykg6J.js} +1 -1
- package/lib/{index-CNIZSAFU.mjs → index-uC7wsV3k.mjs} +1 -1
- package/lib/{index.es-DCm0D4jx.js → index.es-CuL-ucDn.js} +2 -2
- package/lib/{index.es-B_1fLcW-.mjs → index.es-RFQKvkba.mjs} +5 -5
- package/lib/index.js +1 -1
- package/lib/index.mjs +1 -1
- package/lib/{signer-9vI5B7UW.mjs → signer-BtFJ4Ldr.mjs} +3 -3
- package/lib/{signer-BQc7Wphd.js → signer-C7H-eJ3E.js} +1 -1
- package/lib/solana-BFj16l4H.js +1 -0
- package/lib/solana-BKAwRoAY.mjs +17 -0
- package/lib/{solana-CjANz7Fi.mjs → solana-BexPR6DZ.mjs} +4 -4
- package/lib/{solana-DuIMWd_Y.js → solana-YoWC3nvp.js} +1 -1
- package/lib/{solanaEmbed.esm-CIh3hnnF.js → solanaEmbed.esm-CFcNAqXS.js} +1 -1
- package/lib/{solanaEmbed.esm-Ck3n8zZh.mjs → solanaEmbed.esm-YmIZqr64.mjs} +2 -2
- package/lib/src/AppRouter.d.ts.map +1 -1
- package/lib/src/components/v2/Button.d.ts.map +1 -1
- package/lib/src/config/tokens.d.ts +2 -2
- package/lib/src/config/tokens.d.ts.map +1 -1
- package/lib/src/hooks/useAmountValidation.d.ts +1 -1
- package/lib/src/hooks/useAmountValidation.d.ts.map +1 -1
- package/lib/src/hooks/useComputeDestinationTokens.d.ts.map +1 -1
- package/lib/src/hooks/useFetchQuotes.d.ts +1 -1
- package/lib/src/hooks/useFetchQuotes.d.ts.map +1 -1
- package/lib/src/hooks/useSortedRoutesWithQuotes.d.ts +1 -1
- package/lib/src/hooks/useSortedRoutesWithQuotes.d.ts.map +1 -1
- package/lib/src/icons/Chains/APT.d.ts.map +1 -1
- package/lib/src/icons/Chains/OSMO.d.ts.map +1 -1
- package/lib/src/icons/Chains/SOL.d.ts.map +1 -1
- package/lib/src/icons/Chains/SUI.d.ts.map +1 -1
- package/lib/src/icons/Chains/UNI.d.ts.map +1 -1
- package/lib/src/icons/Chains/XLAYER.d.ts.map +1 -1
- package/lib/src/icons/Routes/CCTP.d.ts.map +1 -1
- package/lib/src/icons/SvgDefs.d.ts +4 -0
- package/lib/src/icons/SvgDefs.d.ts.map +1 -0
- package/lib/src/icons/Tokens/BNB.d.ts.map +1 -1
- package/lib/src/icons/Tokens/BUSD.d.ts.map +1 -1
- package/lib/src/icons/Tokens/DAI.d.ts.map +1 -1
- package/lib/src/icons/Tokens/INJ.d.ts.map +1 -1
- package/lib/src/icons/Tokens/NTT.d.ts.map +1 -1
- package/lib/src/icons/Tokens/OSMO.d.ts.map +1 -1
- package/lib/src/icons/Tokens/POLY.d.ts.map +1 -1
- package/lib/src/icons/Tokens/SOL.d.ts.map +1 -1
- package/lib/src/icons/Tokens/USDT.d.ts.map +1 -1
- package/lib/src/icons/Tokens/WBTC.d.ts.map +1 -1
- package/lib/src/routes/operator.d.ts +1 -1
- package/lib/src/routes/operator.d.ts.map +1 -1
- package/lib/src/routes/sdkv2/route.d.ts.map +1 -1
- package/lib/src/theme.d.ts +1 -0
- package/lib/src/theme.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/TokenList.d.ts +2 -0
- package/lib/src/views/v2/Bridge/AssetPicker/TokenList.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/AssetPicker/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/Routes/SingleRoute.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/WalletConnector/index.d.ts.map +1 -1
- package/lib/src/views/v2/Bridge/index.d.ts.map +1 -1
- package/lib/{sui-C3Hk0XoB.js → sui-BjId2Esa.js} +1 -1
- package/lib/{sui-BaNlF5eU.mjs → sui-Bo2iKsrP.mjs} +5 -5
- package/lib/{sui-BDz0ND8Q.js → sui-DXfYVsKj.js} +1 -1
- package/lib/{sui-DXobmCof.mjs → sui-MCAoyjYK.mjs} +1 -1
- package/lib/{tokens-BMcb2BBp.mjs → tokens-CAe3W-fq.mjs} +2 -2
- package/lib/{tokens-Dr0VPGjM.js → tokens-CFa-QGSb.js} +1 -1
- package/package.json +19 -18
- package/dist/assets/aptos-h3S6O6Gp.js +0 -3
- package/dist/assets/index-BMLcq4no.js +0 -1
- package/dist/assets/solana-BNhbIgt5.js +0 -2
- package/dist/assets/solanaEmbed.esm-D6aTKNPa.js +0 -37
- package/dist/src/utils/theme.d.ts +0 -11
- package/dist/src/utils/theme.d.ts.map +0 -1
- package/lib/aptos-BI3SOFlh.js +0 -2
- package/lib/index-BjH74c5e.js +0 -1
- package/lib/solana-3AW1_2QL.js +0 -1
- package/lib/solana-DyGkYgAN.mjs +0 -17
- package/lib/src/utils/theme.d.ts +0 -11
- package/lib/src/utils/theme.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Byf4HvjQ.js");class o extends Error{constructor(r){super(r)}}class s extends o{constructor(){super(...arguments),this.name="TokenOwnerOffCurveError"}}const n=e.struct([e.u32$1("mintAuthorityOption"),e.publicKey("mintAuthority"),e.u64("supply"),e.u8("decimals"),e.bool("isInitialized"),e.u32$1("freezeAuthorityOption"),e.publicKey("freezeAuthority")]);n.span;async function c(t,r,u=!1,i=e.TOKEN_PROGRAM_ID,O=e.ASSOCIATED_TOKEN_PROGRAM_ID){if(!u&&!e.PublicKey.isOnCurve(r.toBuffer()))throw new s;const[A]=await e.PublicKey.findProgramAddress([r.toBuffer(),i.toBuffer(),t.toBuffer()],O);return A}exports.ASSOCIATED_TOKEN_PROGRAM_ID=e.ASSOCIATED_TOKEN_PROGRAM_ID;exports.TOKEN_2022_PROGRAM_ID=e.TOKEN_2022_PROGRAM_ID;exports.TOKEN_PROGRAM_ID=e.TOKEN_PROGRAM_ID;exports.MintLayout=n;exports.TokenError=o;exports.TokenOwnerOffCurveError=s;exports.getAssociatedTokenAddress=c;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const G=require("./index-B-3CdahH.js");var Yr={},sf={exports:{}},Ui={};(function(e){e.fetch=i(G.commonjsGlobal.fetch)&&i(G.commonjsGlobal.ReadableStream),e.writableStream=i(G.commonjsGlobal.WritableStream),e.abortController=i(G.commonjsGlobal.AbortController);var t;function r(){if(t!==void 0)return t;if(G.commonjsGlobal.XMLHttpRequest){t=new G.commonjsGlobal.XMLHttpRequest;try{t.open("GET",G.commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{t=null}}else t=null;return t}function n(a){var o=r();if(!o)return!1;try{return o.responseType=a,o.responseType===a}catch{}return!1}e.arraybuffer=e.fetch||n("arraybuffer"),e.msstream=!e.fetch&&n("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&n("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||(r()?i(r().overrideMimeType):!1);function i(a){return typeof a=="function"}t=null})(Ui);var Xr={},mi={exports:{}},cf=G.eventsExports.EventEmitter,vn,la;function tu(){if(la)return vn;la=1;function e(N,F){var j=Object.keys(N);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(N);F&&(k=k.filter(function(I){return Object.getOwnPropertyDescriptor(N,I).enumerable})),j.push.apply(j,k)}return j}function t(N){for(var F=1;F<arguments.length;F++){var j=arguments[F]!=null?arguments[F]:{};F%2?e(Object(j),!0).forEach(function(k){r(N,k,j[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(j)):e(Object(j)).forEach(function(k){Object.defineProperty(N,k,Object.getOwnPropertyDescriptor(j,k))})}return N}function r(N,F,j){return F=o(F),F in N?Object.defineProperty(N,F,{value:j,enumerable:!0,configurable:!0,writable:!0}):N[F]=j,N}function n(N,F){if(!(N instanceof F))throw new TypeError("Cannot call a class as a function")}function i(N,F){for(var j=0;j<F.length;j++){var k=F[j];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(N,o(k.key),k)}}function a(N,F,j){return F&&i(N.prototype,F),Object.defineProperty(N,"prototype",{writable:!1}),N}function o(N){var F=f(N,"string");return typeof F=="symbol"?F:String(F)}function f(N,F){if(typeof N!="object"||N===null)return N;var j=N[Symbol.toPrimitive];if(j!==void 0){var k=j.call(N,F);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(N)}var d=G.bufferPolyfill,l=d.Buffer,u=G.require$$3,w=u.inspect,g=w&&w.custom||"inspect";function S(N,F,j){l.prototype.copy.call(N,F,j)}return vn=function(){function N(){n(this,N),this.head=null,this.tail=null,this.length=0}return a(N,[{key:"push",value:function(j){var k={data:j,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(j){var k={data:j,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var j=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,j}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(j){if(this.length===0)return"";for(var k=this.head,I=""+k.data;k=k.next;)I+=j+k.data;return I}},{key:"concat",value:function(j){if(this.length===0)return l.alloc(0);for(var k=l.allocUnsafe(j>>>0),I=this.head,R=0;I;)S(I.data,k,R),R+=I.data.length,I=I.next;return k}},{key:"consume",value:function(j,k){var I;return j<this.head.data.length?(I=this.head.data.slice(0,j),this.head.data=this.head.data.slice(j)):j===this.head.data.length?I=this.shift():I=k?this._getString(j):this._getBuffer(j),I}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(j){var k=this.head,I=1,R=k.data;for(j-=R.length;k=k.next;){var P=k.data,T=j>P.length?P.length:j;if(T===P.length?R+=P:R+=P.slice(0,j),j-=T,j===0){T===P.length?(++I,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=P.slice(T));break}++I}return this.length-=I,R}},{key:"_getBuffer",value:function(j){var k=l.allocUnsafe(j),I=this.head,R=1;for(I.data.copy(k),j-=I.data.length;I=I.next;){var P=I.data,T=j>P.length?P.length:j;if(P.copy(k,k.length-j,0,T),j-=T,j===0){T===P.length?(++R,I.next?this.head=I.next:this.head=this.tail=null):(this.head=I,I.data=P.slice(T));break}++R}return this.length-=R,k}},{key:g,value:function(j,k){return w(this,t(t({},k),{},{depth:0,customInspect:!1}))}}]),N}(),vn}function ru(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,G.dist.process.nextTick(wi,this,e)):G.dist.process.nextTick(wi,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?G.dist.process.nextTick(Tr,r):(r._writableState.errorEmitted=!0,G.dist.process.nextTick(ua,r,a)):G.dist.process.nextTick(ua,r,a):t?(G.dist.process.nextTick(Tr,r),t(a)):G.dist.process.nextTick(Tr,r)}),this)}function ua(e,t){wi(e,t),Tr(e)}function Tr(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function nu(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function wi(e,t){e.emit("error",t)}function iu(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var hf={destroy:ru,undestroy:nu,errorOrDestroy:iu},Tt={};function au(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var df={};function Ce(e,t,r){r||(r=Error);function n(a,o,f){return typeof t=="string"?t:t(a,o,f)}var i=function(a){au(o,a);function o(f,d,l){return a.call(this,n(f,d,l))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,df[e]=i}function sa(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function ou(e,t,r){return e.substr(0,t.length)===t}function fu(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function lu(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Ce("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Ce("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&ou(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(fu(e," argument"))i="The ".concat(e," ").concat(n," ").concat(sa(t,"type"));else{var a=lu(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(sa(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);Ce("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ce("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ce("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ce("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ce("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ce("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ce("ERR_STREAM_WRITE_AFTER_END","write after end");Ce("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ce("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ce("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Tt.codes=df;var uu=Tt.codes.ERR_INVALID_OPT_VALUE;function su(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function cu(e,t,r,n){var i=su(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new uu(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}var pf={getHighWaterMark:cu},gn,ca;function yf(){if(ca)return gn;ca=1,gn=z;function e(c){var y=this;this.next=null,this.entry=null,this.finish=function(){E(y,c)}}var t;z.WritableState=q;var r={deprecate:G.requireBrowser()},n=cf,i=G.bufferPolyfill.Buffer,a=(typeof G.commonjsGlobal<"u"?G.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(c){return i.from(c)}function f(c){return i.isBuffer(c)||c instanceof a}var d=hf,l=pf,u=l.getHighWaterMark,w=Tt.codes,g=w.ERR_INVALID_ARG_TYPE,S=w.ERR_METHOD_NOT_IMPLEMENTED,N=w.ERR_MULTIPLE_CALLBACK,F=w.ERR_STREAM_CANNOT_PIPE,j=w.ERR_STREAM_DESTROYED,k=w.ERR_STREAM_NULL_VALUES,I=w.ERR_STREAM_WRITE_AFTER_END,R=w.ERR_UNKNOWN_ENCODING,P=d.errorOrDestroy;G.inherits_browserExports(z,n);function T(){}function q(c,y,m){t=t||Ut(),c=c||{},typeof m!="boolean"&&(m=y instanceof t),this.objectMode=!!c.objectMode,m&&(this.objectMode=this.objectMode||!!c.writableObjectMode),this.highWaterMark=u(this,c,"writableHighWaterMark",m),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var M=c.decodeStrings===!1;this.decodeStrings=!M,this.defaultEncoding=c.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){ae(y,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=c.emitClose!==!1,this.autoDestroy=!!c.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}q.prototype.getBuffer=function(){for(var y=this.bufferedRequest,m=[];y;)m.push(y),y=y.next;return m},function(){try{Object.defineProperty(q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var C;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(C=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(y){return C.call(this,y)?!0:this!==z?!1:y&&y._writableState instanceof q}})):C=function(y){return y instanceof this};function z(c){t=t||Ut();var y=this instanceof t;if(!y&&!C.call(z,this))return new z(c);this._writableState=new q(c,this,y),this.writable=!0,c&&(typeof c.write=="function"&&(this._write=c.write),typeof c.writev=="function"&&(this._writev=c.writev),typeof c.destroy=="function"&&(this._destroy=c.destroy),typeof c.final=="function"&&(this._final=c.final)),n.call(this)}z.prototype.pipe=function(){P(this,new F)};function x(c,y){var m=new I;P(c,m),G.dist.process.nextTick(y,m)}function re(c,y,m,M){var U;return m===null?U=new k:typeof m!="string"&&!y.objectMode&&(U=new g("chunk",["string","Buffer"],m)),U?(P(c,U),G.dist.process.nextTick(M,U),!1):!0}z.prototype.write=function(c,y,m){var M=this._writableState,U=!1,h=!M.objectMode&&f(c);return h&&!i.isBuffer(c)&&(c=o(c)),typeof y=="function"&&(m=y,y=null),h?y="buffer":y||(y=M.defaultEncoding),typeof m!="function"&&(m=T),M.ending?x(this,m):(h||re(this,M,c,m))&&(M.pendingcb++,U=b(this,M,h,c,y,m)),U},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var c=this._writableState;c.corked&&(c.corked--,!c.writing&&!c.corked&&!c.bufferProcessing&&c.bufferedRequest&&Z(this,c))},z.prototype.setDefaultEncoding=function(y){if(typeof y=="string"&&(y=y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((y+"").toLowerCase())>-1))throw new R(y);return this._writableState.defaultEncoding=y,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function J(c,y,m){return!c.objectMode&&c.decodeStrings!==!1&&typeof y=="string"&&(y=i.from(y,m)),y}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function b(c,y,m,M,U,h){if(!m){var p=J(y,M,U);M!==p&&(m=!0,U="buffer",M=p)}var $=y.objectMode?1:M.length;y.length+=$;var K=y.length<y.highWaterMark;if(K||(y.needDrain=!0),y.writing||y.corked){var se=y.lastBufferedRequest;y.lastBufferedRequest={chunk:M,encoding:U,isBuf:m,callback:h,next:null},se?se.next=y.lastBufferedRequest:y.bufferedRequest=y.lastBufferedRequest,y.bufferedRequestCount+=1}else B(c,y,!1,$,M,U,h);return K}function B(c,y,m,M,U,h,p){y.writelen=M,y.writecb=p,y.writing=!0,y.sync=!0,y.destroyed?y.onwrite(new j("write")):m?c._writev(U,y.onwrite):c._write(U,h,y.onwrite),y.sync=!1}function Q(c,y,m,M,U){--y.pendingcb,m?(G.dist.process.nextTick(U,M),G.dist.process.nextTick(A,c,y),c._writableState.errorEmitted=!0,P(c,M)):(U(M),c._writableState.errorEmitted=!0,P(c,M),A(c,y))}function ne(c){c.writing=!1,c.writecb=null,c.length-=c.writelen,c.writelen=0}function ae(c,y){var m=c._writableState,M=m.sync,U=m.writecb;if(typeof U!="function")throw new N;if(ne(m),y)Q(c,m,M,y,U);else{var h=D(m)||c.destroyed;!h&&!m.corked&&!m.bufferProcessing&&m.bufferedRequest&&Z(c,m),M?G.dist.process.nextTick(ue,c,m,h,U):ue(c,m,h,U)}}function ue(c,y,m,M){m||ie(c,y),y.pendingcb--,M(),A(c,y)}function ie(c,y){y.length===0&&y.needDrain&&(y.needDrain=!1,c.emit("drain"))}function Z(c,y){y.bufferProcessing=!0;var m=y.bufferedRequest;if(c._writev&&m&&m.next){var M=y.bufferedRequestCount,U=new Array(M),h=y.corkedRequestsFree;h.entry=m;for(var p=0,$=!0;m;)U[p]=m,m.isBuf||($=!1),m=m.next,p+=1;U.allBuffers=$,B(c,y,!0,y.length,U,"",h.finish),y.pendingcb++,y.lastBufferedRequest=null,h.next?(y.corkedRequestsFree=h.next,h.next=null):y.corkedRequestsFree=new e(y),y.bufferedRequestCount=0}else{for(;m;){var K=m.chunk,se=m.encoding,oe=m.callback,de=y.objectMode?1:K.length;if(B(c,y,!1,de,K,se,oe),m=m.next,y.bufferedRequestCount--,y.writing)break}m===null&&(y.lastBufferedRequest=null)}y.bufferedRequest=m,y.bufferProcessing=!1}z.prototype._write=function(c,y,m){m(new S("_write()"))},z.prototype._writev=null,z.prototype.end=function(c,y,m){var M=this._writableState;return typeof c=="function"?(m=c,c=null,y=null):typeof y=="function"&&(m=y,y=null),c!=null&&this.write(c,y),M.corked&&(M.corked=1,this.uncork()),M.ending||v(this,M,m),this},Object.defineProperty(z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D(c){return c.ending&&c.length===0&&c.bufferedRequest===null&&!c.finished&&!c.writing}function W(c,y){c._final(function(m){y.pendingcb--,m&&P(c,m),y.prefinished=!0,c.emit("prefinish"),A(c,y)})}function _(c,y){!y.prefinished&&!y.finalCalled&&(typeof c._final=="function"&&!y.destroyed?(y.pendingcb++,y.finalCalled=!0,G.dist.process.nextTick(W,c,y)):(y.prefinished=!0,c.emit("prefinish")))}function A(c,y){var m=D(y);if(m&&(_(c,y),y.pendingcb===0&&(y.finished=!0,c.emit("finish"),y.autoDestroy))){var M=c._readableState;(!M||M.autoDestroy&&M.endEmitted)&&c.destroy()}return m}function v(c,y,m){y.ending=!0,A(c,y),m&&(y.finished?G.dist.process.nextTick(m):c.once("finish",m)),y.ended=!0,c.writable=!1}function E(c,y,m){var M=c.entry;for(c.entry=null;M;){var U=M.callback;y.pendingcb--,U(m),M=M.next}y.corkedRequestsFree.next=c}return Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(y){this._writableState&&(this._writableState.destroyed=y)}}),z.prototype.destroy=d.destroy,z.prototype._undestroy=d.undestroy,z.prototype._destroy=function(c,y){y(c)},gn}var _n,ha;function Ut(){if(ha)return _n;ha=1;var e=Object.keys||function(l){var u=[];for(var w in l)u.push(w);return u};_n=o;var t=gf(),r=yf();G.inherits_browserExports(o,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var a=n[i];o.prototype[a]||(o.prototype[a]=r.prototype[a])}function o(l){if(!(this instanceof o))return new o(l);t.call(this,l),r.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",f)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f(){this._writableState.ended||G.dist.process.nextTick(d,this)}function d(l){l.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),_n}var da=Tt.codes.ERR_STREAM_PREMATURE_CLOSE;function hu(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function du(){}function pu(e){return e.setHeader&&typeof e.abort=="function"}function vf(e,t,r){if(typeof t=="function")return vf(e,null,t);t||(t={}),r=hu(r||du);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,a=function(){e.writable||f()},o=e._writableState&&e._writableState.finished,f=function(){i=!1,o=!0,n||r.call(e)},d=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,d=!0,i||r.call(e)},u=function(N){r.call(e,N)},w=function(){var N;if(n&&!d)return(!e._readableState||!e._readableState.ended)&&(N=new da),r.call(e,N);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(N=new da),r.call(e,N)},g=function(){e.req.on("finish",f)};return pu(e)?(e.on("complete",f),e.on("abort",w),e.req?g():e.on("request",g)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",f),t.error!==!1&&e.on("error",u),e.on("close",w),function(){e.removeListener("complete",f),e.removeListener("abort",w),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",f),e.removeListener("end",l),e.removeListener("error",u),e.removeListener("close",w)}}var qi=vf,bn,pa;function yu(){if(pa)return bn;pa=1;var e;function t(R,P,T){return P=r(P),P in R?Object.defineProperty(R,P,{value:T,enumerable:!0,configurable:!0,writable:!0}):R[P]=T,R}function r(R){var P=n(R,"string");return typeof P=="symbol"?P:String(P)}function n(R,P){if(typeof R!="object"||R===null)return R;var T=R[Symbol.toPrimitive];if(T!==void 0){var q=T.call(R,P);if(typeof q!="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(P==="string"?String:Number)(R)}var i=qi,a=Symbol("lastResolve"),o=Symbol("lastReject"),f=Symbol("error"),d=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),w=Symbol("stream");function g(R,P){return{value:R,done:P}}function S(R){var P=R[a];if(P!==null){var T=R[w].read();T!==null&&(R[l]=null,R[a]=null,R[o]=null,P(g(T,!1)))}}function N(R){G.dist.process.nextTick(S,R)}function F(R,P){return function(T,q){R.then(function(){if(P[d]){T(g(void 0,!0));return}P[u](T,q)},q)}}var j=Object.getPrototypeOf(function(){}),k=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var P=this,T=this[f];if(T!==null)return Promise.reject(T);if(this[d])return Promise.resolve(g(void 0,!0));if(this[w].destroyed)return new Promise(function(x,re){G.dist.process.nextTick(function(){P[f]?re(P[f]):x(g(void 0,!0))})});var q=this[l],C;if(q)C=new Promise(F(q,this));else{var z=this[w].read();if(z!==null)return Promise.resolve(g(z,!1));C=new Promise(this[u])}return this[l]=C,C}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var P=this;return new Promise(function(T,q){P[w].destroy(null,function(C){if(C){q(C);return}T(g(void 0,!0))})})}),e),j),I=function(P){var T,q=Object.create(k,(T={},t(T,w,{value:P,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,f,{value:null,writable:!0}),t(T,d,{value:P._readableState.endEmitted,writable:!0}),t(T,u,{value:function(z,x){var re=q[w].read();re?(q[l]=null,q[a]=null,q[o]=null,z(g(re,!1))):(q[a]=z,q[o]=x)},writable:!0}),T));return q[l]=null,i(P,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var z=q[o];z!==null&&(q[l]=null,q[a]=null,q[o]=null,z(C)),q[f]=C;return}var x=q[a];x!==null&&(q[l]=null,q[a]=null,q[o]=null,x(g(void 0,!0))),q[d]=!0}),P.on("readable",N.bind(null,q)),q};return bn=I,bn}var mn,ya;function vu(){return ya||(ya=1,mn=function(){throw new Error("Readable.from is not available in the browser")}),mn}var wn,va;function gf(){if(va)return wn;va=1,wn=x;var e;x.ReadableState=z,G.eventsExports.EventEmitter;var t=function(p,$){return p.listeners($).length},r=cf,n=G.bufferPolyfill.Buffer,i=(typeof G.commonjsGlobal<"u"?G.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(h){return n.from(h)}function o(h){return n.isBuffer(h)||h instanceof i}var f=G.require$$3,d;f&&f.debuglog?d=f.debuglog("stream"):d=function(){};var l=tu(),u=hf,w=pf,g=w.getHighWaterMark,S=Tt.codes,N=S.ERR_INVALID_ARG_TYPE,F=S.ERR_STREAM_PUSH_AFTER_EOF,j=S.ERR_METHOD_NOT_IMPLEMENTED,k=S.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,I,R,P;G.inherits_browserExports(x,r);var T=u.errorOrDestroy,q=["error","close","destroy","pause","resume"];function C(h,p,$){if(typeof h.prependListener=="function")return h.prependListener(p,$);!h._events||!h._events[p]?h.on(p,$):Array.isArray(h._events[p])?h._events[p].unshift($):h._events[p]=[$,h._events[p]]}function z(h,p,$){e=e||Ut(),h=h||{},typeof $!="boolean"&&($=p instanceof e),this.objectMode=!!h.objectMode,$&&(this.objectMode=this.objectMode||!!h.readableObjectMode),this.highWaterMark=g(this,h,"readableHighWaterMark",$),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=h.emitClose!==!1,this.autoDestroy=!!h.autoDestroy,this.destroyed=!1,this.defaultEncoding=h.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,h.encoding&&(I||(I=G.requireString_decoder().StringDecoder),this.decoder=new I(h.encoding),this.encoding=h.encoding)}function x(h){if(e=e||Ut(),!(this instanceof x))return new x(h);var p=this instanceof e;this._readableState=new z(h,this,p),this.readable=!0,h&&(typeof h.read=="function"&&(this._read=h.read),typeof h.destroy=="function"&&(this._destroy=h.destroy)),r.call(this)}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(p){this._readableState&&(this._readableState.destroyed=p)}}),x.prototype.destroy=u.destroy,x.prototype._undestroy=u.undestroy,x.prototype._destroy=function(h,p){p(h)},x.prototype.push=function(h,p){var $=this._readableState,K;return $.objectMode?K=!0:typeof h=="string"&&(p=p||$.defaultEncoding,p!==$.encoding&&(h=n.from(h,p),p=""),K=!0),re(this,h,p,!1,K)},x.prototype.unshift=function(h){return re(this,h,null,!0,!1)};function re(h,p,$,K,se){d("readableAddChunk",p);var oe=h._readableState;if(p===null)oe.reading=!1,ae(h,oe);else{var de;if(se||(de=b(oe,p)),de)T(h,de);else if(oe.objectMode||p&&p.length>0)if(typeof p!="string"&&!oe.objectMode&&Object.getPrototypeOf(p)!==n.prototype&&(p=a(p)),K)oe.endEmitted?T(h,new k):J(h,oe,p,!0);else if(oe.ended)T(h,new F);else{if(oe.destroyed)return!1;oe.reading=!1,oe.decoder&&!$?(p=oe.decoder.write(p),oe.objectMode||p.length!==0?J(h,oe,p,!1):Z(h,oe)):J(h,oe,p,!1)}else K||(oe.reading=!1,Z(h,oe))}return!oe.ended&&(oe.length<oe.highWaterMark||oe.length===0)}function J(h,p,$,K){p.flowing&&p.length===0&&!p.sync?(p.awaitDrain=0,h.emit("data",$)):(p.length+=p.objectMode?1:$.length,K?p.buffer.unshift($):p.buffer.push($),p.needReadable&&ue(h)),Z(h,p)}function b(h,p){var $;return!o(p)&&typeof p!="string"&&p!==void 0&&!h.objectMode&&($=new N("chunk",["string","Buffer","Uint8Array"],p)),$}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(h){I||(I=G.requireString_decoder().StringDecoder);var p=new I(h);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;for(var $=this._readableState.buffer.head,K="";$!==null;)K+=p.write($.data),$=$.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};var B=1073741824;function Q(h){return h>=B?h=B:(h--,h|=h>>>1,h|=h>>>2,h|=h>>>4,h|=h>>>8,h|=h>>>16,h++),h}function ne(h,p){return h<=0||p.length===0&&p.ended?0:p.objectMode?1:h!==h?p.flowing&&p.length?p.buffer.head.data.length:p.length:(h>p.highWaterMark&&(p.highWaterMark=Q(h)),h<=p.length?h:p.ended?p.length:(p.needReadable=!0,0))}x.prototype.read=function(h){d("read",h),h=parseInt(h,10);var p=this._readableState,$=h;if(h!==0&&(p.emittedReadable=!1),h===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return d("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?m(this):ue(this),null;if(h=ne(h,p),h===0&&p.ended)return p.length===0&&m(this),null;var K=p.needReadable;d("need readable",K),(p.length===0||p.length-h<p.highWaterMark)&&(K=!0,d("length less than watermark",K)),p.ended||p.reading?(K=!1,d("reading or ended",K)):K&&(d("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(h=ne($,p)));var se;return h>0?se=y(h,p):se=null,se===null?(p.needReadable=p.length<=p.highWaterMark,h=0):(p.length-=h,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),$!==h&&p.ended&&m(this)),se!==null&&this.emit("data",se),se};function ae(h,p){if(d("onEofChunk"),!p.ended){if(p.decoder){var $=p.decoder.end();$&&$.length&&(p.buffer.push($),p.length+=p.objectMode?1:$.length)}p.ended=!0,p.sync?ue(h):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,ie(h)))}}function ue(h){var p=h._readableState;d("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(d("emitReadable",p.flowing),p.emittedReadable=!0,G.dist.process.nextTick(ie,h))}function ie(h){var p=h._readableState;d("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(h.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,c(h)}function Z(h,p){p.readingMore||(p.readingMore=!0,G.dist.process.nextTick(D,h,p))}function D(h,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){var $=p.length;if(d("maybeReadMore read 0"),h.read(0),$===p.length)break}p.readingMore=!1}x.prototype._read=function(h){T(this,new j("_read()"))},x.prototype.pipe=function(h,p){var $=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=h;break;case 1:K.pipes=[K.pipes,h];break;default:K.pipes.push(h);break}K.pipesCount+=1,d("pipe count=%d opts=%j",K.pipesCount,p);var se=(!p||p.end!==!1)&&h!==G.dist.process.stdout&&h!==G.dist.process.stderr,oe=se?_e:V;K.endEmitted?G.dist.process.nextTick(oe):$.once("end",oe),h.on("unpipe",de);function de(ee,te){d("onunpipe"),ee===$&&te&&te.hasUnpiped===!1&&(te.hasUnpiped=!0,Te())}function _e(){d("onend"),h.end()}var H=W($);h.on("drain",H);var Fe=!1;function Te(){d("cleanup"),h.removeListener("close",s),h.removeListener("finish",O),h.removeListener("drain",H),h.removeListener("error",X),h.removeListener("unpipe",de),$.removeListener("end",_e),$.removeListener("end",V),$.removeListener("data",L),Fe=!0,K.awaitDrain&&(!h._writableState||h._writableState.needDrain)&&H()}$.on("data",L);function L(ee){d("ondata");var te=h.write(ee);d("dest.write",te),te===!1&&((K.pipesCount===1&&K.pipes===h||K.pipesCount>1&&U(K.pipes,h)!==-1)&&!Fe&&(d("false write response, pause",K.awaitDrain),K.awaitDrain++),$.pause())}function X(ee){d("onerror",ee),V(),h.removeListener("error",X),t(h,"error")===0&&T(h,ee)}C(h,"error",X);function s(){h.removeListener("finish",O),V()}h.once("close",s);function O(){d("onfinish"),h.removeListener("close",s),V()}h.once("finish",O);function V(){d("unpipe"),$.unpipe(h)}return h.emit("pipe",$),K.flowing||(d("pipe resume"),$.resume()),h};function W(h){return function(){var $=h._readableState;d("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&t(h,"data")&&($.flowing=!0,c(h))}}x.prototype.unpipe=function(h){var p=this._readableState,$={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return h&&h!==p.pipes?this:(h||(h=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,h&&h.emit("unpipe",this,$),this);if(!h){var K=p.pipes,se=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var oe=0;oe<se;oe++)K[oe].emit("unpipe",this,{hasUnpiped:!1});return this}var de=U(p.pipes,h);return de===-1?this:(p.pipes.splice(de,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),h.emit("unpipe",this,$),this)},x.prototype.on=function(h,p){var $=r.prototype.on.call(this,h,p),K=this._readableState;return h==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):h==="readable"&&!K.endEmitted&&!K.readableListening&&(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,d("on readable",K.length,K.reading),K.length?ue(this):K.reading||G.dist.process.nextTick(A,this)),$},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(h,p){var $=r.prototype.removeListener.call(this,h,p);return h==="readable"&&G.dist.process.nextTick(_,this),$},x.prototype.removeAllListeners=function(h){var p=r.prototype.removeAllListeners.apply(this,arguments);return(h==="readable"||h===void 0)&&G.dist.process.nextTick(_,this),p};function _(h){var p=h._readableState;p.readableListening=h.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:h.listenerCount("data")>0&&h.resume()}function A(h){d("readable nexttick read 0"),h.read(0)}x.prototype.resume=function(){var h=this._readableState;return h.flowing||(d("resume"),h.flowing=!h.readableListening,v(this,h)),h.paused=!1,this};function v(h,p){p.resumeScheduled||(p.resumeScheduled=!0,G.dist.process.nextTick(E,h,p))}function E(h,p){d("resume",p.reading),p.reading||h.read(0),p.resumeScheduled=!1,h.emit("resume"),c(h),p.flowing&&!p.reading&&h.read(0)}x.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function c(h){var p=h._readableState;for(d("flow",p.flowing);p.flowing&&h.read()!==null;);}x.prototype.wrap=function(h){var p=this,$=this._readableState,K=!1;h.on("end",function(){if(d("wrapped end"),$.decoder&&!$.ended){var de=$.decoder.end();de&&de.length&&p.push(de)}p.push(null)}),h.on("data",function(de){if(d("wrapped data"),$.decoder&&(de=$.decoder.write(de)),!($.objectMode&&de==null)&&!(!$.objectMode&&(!de||!de.length))){var _e=p.push(de);_e||(K=!0,h.pause())}});for(var se in h)this[se]===void 0&&typeof h[se]=="function"&&(this[se]=function(_e){return function(){return h[_e].apply(h,arguments)}}(se));for(var oe=0;oe<q.length;oe++)h.on(q[oe],this.emit.bind(this,q[oe]));return this._read=function(de){d("wrapped _read",de),K&&(K=!1,h.resume())},this},typeof Symbol=="function"&&(x.prototype[Symbol.asyncIterator]=function(){return R===void 0&&(R=yu()),R(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(p){this._readableState&&(this._readableState.flowing=p)}}),x._fromList=y,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function y(h,p){if(p.length===0)return null;var $;return p.objectMode?$=p.buffer.shift():!h||h>=p.length?(p.decoder?$=p.buffer.join(""):p.buffer.length===1?$=p.buffer.first():$=p.buffer.concat(p.length),p.buffer.clear()):$=p.buffer.consume(h,p.decoder),$}function m(h){var p=h._readableState;d("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,G.dist.process.nextTick(M,p,h))}function M(h,p){if(d("endReadableNT",h.endEmitted,h.length),!h.endEmitted&&h.length===0&&(h.endEmitted=!0,p.readable=!1,p.emit("end"),h.autoDestroy)){var $=p._writableState;(!$||$.autoDestroy&&$.finished)&&p.destroy()}}typeof Symbol=="function"&&(x.from=function(h,p){return P===void 0&&(P=vu()),P(x,h,p)});function U(h,p){for(var $=0,K=h.length;$<K;$++)if(h[$]===p)return $;return-1}return wn}var _f=at,Jr=Tt.codes,gu=Jr.ERR_METHOD_NOT_IMPLEMENTED,_u=Jr.ERR_MULTIPLE_CALLBACK,bu=Jr.ERR_TRANSFORM_ALREADY_TRANSFORMING,mu=Jr.ERR_TRANSFORM_WITH_LENGTH_0,Qr=Ut();G.inherits_browserExports(at,Qr);function wu(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new _u);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function at(e){if(!(this instanceof at))return new at(e);Qr.call(this,e),this._transformState={afterTransform:wu.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Eu)}function Eu(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){ga(e,t,r)}):ga(this,null,null)}at.prototype.push=function(e,t){return this._transformState.needTransform=!1,Qr.prototype.push.call(this,e,t)};at.prototype._transform=function(e,t,r){r(new gu("_transform()"))};at.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};at.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};at.prototype._destroy=function(e,t){Qr.prototype._destroy.call(this,e,function(r){t(r)})};function ga(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new mu;if(e._transformState.transforming)throw new bu;return e.push(null)}var Su=ir,bf=_f;G.inherits_browserExports(ir,bf);function ir(e){if(!(this instanceof ir))return new ir(e);bf.call(this,e)}ir.prototype._transform=function(e,t,r){r(null,e)};var En;function Ru(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var mf=Tt.codes,Au=mf.ERR_MISSING_ARGS,Ou=mf.ERR_STREAM_DESTROYED;function _a(e){if(e)throw e}function Tu(e){return e.setHeader&&typeof e.abort=="function"}function Iu(e,t,r,n){n=Ru(n);var i=!1;e.on("close",function(){i=!0}),En===void 0&&(En=qi),En(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,Tu(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new Ou("pipe"))}}}function ba(e){e()}function Pu(e,t){return e.pipe(t)}function Nu(e){return!e.length||typeof e[e.length-1]!="function"?_a:e.pop()}function Du(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Nu(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Au("streams");var i,a=t.map(function(o,f){var d=f<t.length-1,l=f>0;return Iu(o,d,l,function(u){i||(i=u),u&&a.forEach(ba),!d&&(a.forEach(ba),n(i))})});return t.reduce(Pu)}var Lu=Du;(function(e,t){t=e.exports=gf(),t.Stream=t,t.Readable=t,t.Writable=yf(),t.Duplex=Ut(),t.Transform=_f,t.PassThrough=Su,t.finished=qi,t.pipeline=Lu})(mi,mi.exports);var wf=mi.exports,ma=Ui,Mu=G.inherits_browserExports,Ef=wf,br=Xr.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},zi=Xr.IncomingMessage=function(e,t,r,n){var i=this;if(Ef.Readable.call(i),i._mode=r,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",function(){G.dist.process.nextTick(function(){i.emit("close")})}),r==="fetch"){let u=function(){o.read().then(function(w){if(!i._destroyed){if(n(w.done),w.done){i.push(null);return}i.push(G.dist.Buffer.from(w.value)),u()}}).catch(function(w){n(!0),i._destroyed||i.emit("error",w)})};if(i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText,t.headers.forEach(function(w,g){i.headers[g.toLowerCase()]=w,i.rawHeaders.push(g,w)}),ma.writableStream){var a=new WritableStream({write:function(w){return n(!1),new Promise(function(g,S){i._destroyed?S():i.push(G.dist.Buffer.from(w))?g():i._resumeFetch=g})},close:function(){n(!0),i._destroyed||i.push(null)},abort:function(w){n(!0),i._destroyed||i.emit("error",w)}});try{t.body.pipeTo(a).catch(function(w){n(!0),i._destroyed||i.emit("error",w)});return}catch{}}var o=t.body.getReader();u()}else{i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText;var f=e.getAllResponseHeaders().split(/\r?\n/);if(f.forEach(function(u){var w=u.match(/^([^:]+):\s*(.*)/);if(w){var g=w[1].toLowerCase();g==="set-cookie"?(i.headers[g]===void 0&&(i.headers[g]=[]),i.headers[g].push(w[2])):i.headers[g]!==void 0?i.headers[g]+=", "+w[2]:i.headers[g]=w[2],i.rawHeaders.push(w[1],w[2])}}),i._charset="x-user-defined",!ma.overrideMimeType){var d=i.rawHeaders["mime-type"];if(d){var l=d.match(/;\s*charset=([^;])(;|$)/);l&&(i._charset=l[1].toLowerCase())}i._charset||(i._charset="utf-8")}}};Mu(zi,Ef.Readable);zi.prototype._read=function(){var e=this,t=e._resumeFetch;t&&(e._resumeFetch=null,t())};zi.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,n=null;switch(t._mode){case"text":if(n=r.responseText,n.length>t._pos){var i=n.substr(t._pos);if(t._charset==="x-user-defined"){for(var a=G.dist.Buffer.alloc(i.length),o=0;o<i.length;o++)a[o]=i.charCodeAt(o)&255;t.push(a)}else t.push(i,t._charset);t._pos=n.length}break;case"arraybuffer":if(r.readyState!==br.DONE||!r.response)break;n=r.response,t.push(G.dist.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==br.LOADING||!n)break;t.push(G.dist.Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==br.LOADING)break;var f=new G.commonjsGlobal.MSStreamReader;f.onprogress=function(){f.result.byteLength>t._pos&&(t.push(G.dist.Buffer.from(new Uint8Array(f.result.slice(t._pos)))),t._pos=f.result.byteLength)},f.onload=function(){e(!0),t.push(null)},f.readAsArrayBuffer(n);break}t._xhr.readyState===br.DONE&&t._mode!=="ms-stream"&&(e(!0),t.push(null))};var bt=Ui,ku=G.inherits_browserExports,Sf=Xr,Zi=wf,Fu=Sf.IncomingMessage,wa=Sf.readyStates;function ju(e,t){return bt.fetch&&t?"fetch":bt.mozchunkedarraybuffer?"moz-chunked-arraybuffer":bt.msstream?"ms-stream":bt.arraybuffer&&e?"arraybuffer":"text"}var De=sf.exports=function(e){var t=this;Zi.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+G.dist.Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(i){t.setHeader(i,e.headers[i])});var r,n=!0;if(e.mode==="disable-fetch"||"requestTimeout"in e&&!bt.abortController)n=!1,r=!0;else if(e.mode==="prefer-streaming")r=!1;else if(e.mode==="allow-wrong-content-type")r=!bt.overrideMimeType;else if(!e.mode||e.mode==="default"||e.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");t._mode=ju(r,n),t._fetchTimer=null,t._socketTimeout=null,t._socketTimer=null,t.on("finish",function(){t._onFinish()})};ku(De,Zi.Writable);De.prototype.setHeader=function(e,t){var r=this,n=e.toLowerCase();$u.indexOf(n)===-1&&(r._headers[n]={name:e,value:t})};De.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null};De.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]};De.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&t.timeout!==0&&e.setTimeout(t.timeout);var r=e._headers,n=null;t.method!=="GET"&&t.method!=="HEAD"&&(n=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var i=[];if(Object.keys(r).forEach(function(d){var l=r[d].name,u=r[d].value;Array.isArray(u)?u.forEach(function(w){i.push([l,w])}):i.push([l,u])}),e._mode==="fetch"){var a=null;if(bt.abortController){var o=new AbortController;a=o.signal,e._fetchAbortController=o,"requestTimeout"in t&&t.requestTimeout!==0&&(e._fetchTimer=G.commonjsGlobal.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}G.commonjsGlobal.fetch(e._opts.url,{method:e._opts.method,headers:i,body:n||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:a}).then(function(d){e._fetchResponse=d,e._resetTimers(!1),e._connect()},function(d){e._resetTimers(!0),e._destroyed||e.emit("error",d)})}else{var f=e._xhr=new G.commonjsGlobal.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(d){G.dist.process.nextTick(function(){e.emit("error",d)});return}"responseType"in f&&(f.responseType=e._mode),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),e._mode==="text"&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),i.forEach(function(d){f.setRequestHeader(d[0],d[1])}),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case wa.LOADING:case wa.DONE:e._onXHRProgress();break}},e._mode==="moz-chunked-arraybuffer"&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{f.send(n)}catch(d){G.dist.process.nextTick(function(){e.emit("error",d)});return}}}};function xu(e){try{var t=e.status;return t!==null&&t!==0}catch{return!1}}De.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),!(!xu(e._xhr)||e._destroyed)&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))};De.prototype._connect=function(){var e=this;e._destroyed||(e._response=new Fu(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))};De.prototype._write=function(e,t,r){var n=this;n._body.push(e),r()};De.prototype._resetTimers=function(e){var t=this;G.commonjsGlobal.clearTimeout(t._socketTimer),t._socketTimer=null,e?(G.commonjsGlobal.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=G.commonjsGlobal.setTimeout(function(){t.emit("timeout")},t._socketTimeout))};De.prototype.abort=De.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)};De.prototype.end=function(e,t,r){var n=this;typeof e=="function"&&(r=e,e=void 0),Zi.Writable.prototype.end.call(n,e,t,r)};De.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)};De.prototype.flushHeaders=function(){};De.prototype.setNoDelay=function(){};De.prototype.setSocketKeepAlive=function(){};var $u=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],Cu=sf.exports,Bu=qu,Uu=Object.prototype.hasOwnProperty;function qu(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Uu.call(r,n)&&(e[n]=r[n])}return e}var zu={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},Ei={exports:{}},Br={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Br.exports;(function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof G.commonjsGlobal=="object"&&G.commonjsGlobal;(a.global===a||a.window===a||a.self===a)&&(r=a);var o,f=2147483647,d=36,l=1,u=26,w=38,g=700,S=72,N=128,F="-",j=/^xn--/,k=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=d-l,T=Math.floor,q=String.fromCharCode,C;function z(D){throw new RangeError(R[D])}function x(D,W){for(var _=D.length,A=[];_--;)A[_]=W(D[_]);return A}function re(D,W){var _=D.split("@"),A="";_.length>1&&(A=_[0]+"@",D=_[1]),D=D.replace(I,".");var v=D.split("."),E=x(v,W).join(".");return A+E}function J(D){for(var W=[],_=0,A=D.length,v,E;_<A;)v=D.charCodeAt(_++),v>=55296&&v<=56319&&_<A?(E=D.charCodeAt(_++),(E&64512)==56320?W.push(((v&1023)<<10)+(E&1023)+65536):(W.push(v),_--)):W.push(v);return W}function b(D){return x(D,function(W){var _="";return W>65535&&(W-=65536,_+=q(W>>>10&1023|55296),W=56320|W&1023),_+=q(W),_}).join("")}function B(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:d}function Q(D,W){return D+22+75*(D<26)-((W!=0)<<5)}function ne(D,W,_){var A=0;for(D=_?T(D/g):D>>1,D+=T(D/W);D>P*u>>1;A+=d)D=T(D/P);return T(A+(P+1)*D/(D+w))}function ae(D){var W=[],_=D.length,A,v=0,E=N,c=S,y,m,M,U,h,p,$,K,se;for(y=D.lastIndexOf(F),y<0&&(y=0),m=0;m<y;++m)D.charCodeAt(m)>=128&&z("not-basic"),W.push(D.charCodeAt(m));for(M=y>0?y+1:0;M<_;){for(U=v,h=1,p=d;M>=_&&z("invalid-input"),$=B(D.charCodeAt(M++)),($>=d||$>T((f-v)/h))&&z("overflow"),v+=$*h,K=p<=c?l:p>=c+u?u:p-c,!($<K);p+=d)se=d-K,h>T(f/se)&&z("overflow"),h*=se;A=W.length+1,c=ne(v-U,A,U==0),T(v/A)>f-E&&z("overflow"),E+=T(v/A),v%=A,W.splice(v++,0,E)}return b(W)}function ue(D){var W,_,A,v,E,c,y,m,M,U,h,p=[],$,K,se,oe;for(D=J(D),$=D.length,W=N,_=0,E=S,c=0;c<$;++c)h=D[c],h<128&&p.push(q(h));for(A=v=p.length,v&&p.push(F);A<$;){for(y=f,c=0;c<$;++c)h=D[c],h>=W&&h<y&&(y=h);for(K=A+1,y-W>T((f-_)/K)&&z("overflow"),_+=(y-W)*K,W=y,c=0;c<$;++c)if(h=D[c],h<W&&++_>f&&z("overflow"),h==W){for(m=_,M=d;U=M<=E?l:M>=E+u?u:M-E,!(m<U);M+=d)oe=m-U,se=d-U,p.push(q(Q(U+oe%se,0))),m=T(oe/se);p.push(q(Q(m,0))),E=ne(_,K,A==v),_=0,++A}++_,++W}return p.join("")}function ie(D){return re(D,function(W){return j.test(W)?ae(W.slice(4).toLowerCase()):W})}function Z(D){return re(D,function(W){return k.test(W)?"xn--"+ue(W):W})}if(o={version:"1.4.1",ucs2:{decode:J,encode:b},decode:ae,encode:ue,toASCII:Z,toUnicode:ie},n&&i)if(e.exports==n)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(n[C]=o[C]);else r.punycode=o})(G.commonjsGlobal)})(Br,Br.exports);var Rf=Br.exports,ot=TypeError,Hi=typeof Map=="function"&&Map.prototype,Sn=Object.getOwnPropertyDescriptor&&Hi?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ur=Hi&&Sn&&typeof Sn.get=="function"?Sn.get:null,Ea=Hi&&Map.prototype.forEach,Wi=typeof Set=="function"&&Set.prototype,Rn=Object.getOwnPropertyDescriptor&&Wi?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,qr=Wi&&Rn&&typeof Rn.get=="function"?Rn.get:null,Sa=Wi&&Set.prototype.forEach,Zu=typeof WeakMap=="function"&&WeakMap.prototype,Jt=Zu?WeakMap.prototype.has:null,Hu=typeof WeakSet=="function"&&WeakSet.prototype,Qt=Hu?WeakSet.prototype.has:null,Wu=typeof WeakRef=="function"&&WeakRef.prototype,Ra=Wu?WeakRef.prototype.deref:null,Gu=Boolean.prototype.valueOf,Vu=Object.prototype.toString,Ku=Function.prototype.toString,Yu=String.prototype.match,Gi=String.prototype.slice,ct=String.prototype.replace,Xu=String.prototype.toUpperCase,Aa=String.prototype.toLowerCase,Af=RegExp.prototype.test,Oa=Array.prototype.concat,Je=Array.prototype.join,Ju=Array.prototype.slice,Ta=Math.floor,Si=typeof BigInt=="function"?BigInt.prototype.valueOf:null,An=Object.getOwnPropertySymbols,Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,qt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",er=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===qt||!0)?Symbol.toStringTag:null,Of=Object.prototype.propertyIsEnumerable,Ia=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Pa(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Af.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-Ta(-e):Ta(e);if(n!==e){var i=String(n),a=Gi.call(t,i.length+1);return ct.call(i,r,"$&_")+"."+ct.call(ct.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ct.call(t,r,"$&_")}var Ai=G.require$$3,Na=Ai.custom,Da=Pf(Na)?Na:null,Tf={__proto__:null,double:'"',single:"'"},Qu={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},en=function e(t,r,n,i){var a=r||{};if(nt(a,"quoteStyle")&&!nt(Tf,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(nt(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=nt(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(nt(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(nt(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Df(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var d=String(t);return f?Pa(t,d):d}if(typeof t=="bigint"){var l=String(t)+"n";return f?Pa(t,l):l}var u=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return Oi(t)?"[Array]":"[Object]";var w=gs(a,n);if(typeof i>"u")i=[];else if(Nf(i,t)>=0)return"[Circular]";function g(B,Q,ne){if(Q&&(i=Ju.call(i),i.push(Q)),ne){var ae={depth:a.depth};return nt(a,"quoteStyle")&&(ae.quoteStyle=a.quoteStyle),e(B,ae,n+1,i)}return e(B,a,n+1,i)}if(typeof t=="function"&&!La(t)){var S=ls(t),N=mr(t,g);return"[Function"+(S?": "+S:" (anonymous)")+"]"+(N.length>0?" { "+Je.call(N,", ")+" }":"")}if(Pf(t)){var F=qt?ct.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ri.call(t);return typeof t=="object"&&!qt?Kt(F):F}if(ps(t)){for(var j="<"+Aa.call(String(t.nodeName)),k=t.attributes||[],I=0;I<k.length;I++)j+=" "+k[I].name+"="+If(es(k[I].value),"double",a);return j+=">",t.childNodes&&t.childNodes.length&&(j+="..."),j+="</"+Aa.call(String(t.nodeName))+">",j}if(Oi(t)){if(t.length===0)return"[]";var R=mr(t,g);return w&&!vs(R)?"["+Ti(R,w)+"]":"[ "+Je.call(R,", ")+" ]"}if(rs(t)){var P=mr(t,g);return!("cause"in Error.prototype)&&"cause"in t&&!Of.call(t,"cause")?"{ ["+String(t)+"] "+Je.call(Oa.call("[cause]: "+g(t.cause),P),", ")+" }":P.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Je.call(P,", ")+" }"}if(typeof t=="object"&&o){if(Da&&typeof t[Da]=="function"&&Ai)return Ai(t,{depth:u-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(us(t)){var T=[];return Ea&&Ea.call(t,function(B,Q){T.push(g(Q,t,!0)+" => "+g(B,t))}),Ma("Map",Ur.call(t),T,w)}if(hs(t)){var q=[];return Sa&&Sa.call(t,function(B){q.push(g(B,t))}),Ma("Set",qr.call(t),q,w)}if(ss(t))return On("WeakMap");if(ds(t))return On("WeakSet");if(cs(t))return On("WeakRef");if(is(t))return Kt(g(Number(t)));if(os(t))return Kt(g(Si.call(t)));if(as(t))return Kt(Gu.call(t));if(ns(t))return Kt(g(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof G.commonjsGlobal<"u"&&t===G.commonjsGlobal)return"{ [object globalThis] }";if(!ts(t)&&!La(t)){var C=mr(t,g),z=Ia?Ia(t)===Object.prototype:t instanceof Object||t.constructor===Object,x=t instanceof Object?"":"null prototype",re=!z&&er&&Object(t)===t&&er in t?Gi.call(vt(t),8,-1):x?"Object":"",J=z||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",b=J+(re||x?"["+Je.call(Oa.call([],re||[],x||[]),": ")+"] ":"");return C.length===0?b+"{}":w?b+"{"+Ti(C,w)+"}":b+"{ "+Je.call(C,", ")+" }"}return String(t)};function If(e,t,r){var n=r.quoteStyle||t,i=Tf[n];return i+e+i}function es(e){return ct.call(String(e),/"/g,""")}function It(e){return!er||!(typeof e=="object"&&(er in e||typeof e[er]<"u"))}function Oi(e){return vt(e)==="[object Array]"&&It(e)}function ts(e){return vt(e)==="[object Date]"&&It(e)}function La(e){return vt(e)==="[object RegExp]"&&It(e)}function rs(e){return vt(e)==="[object Error]"&&It(e)}function ns(e){return vt(e)==="[object String]"&&It(e)}function is(e){return vt(e)==="[object Number]"&&It(e)}function as(e){return vt(e)==="[object Boolean]"&&It(e)}function Pf(e){if(qt)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ri)return!1;try{return Ri.call(e),!0}catch{}return!1}function os(e){if(!e||typeof e!="object"||!Si)return!1;try{return Si.call(e),!0}catch{}return!1}var fs=Object.prototype.hasOwnProperty||function(e){return e in this};function nt(e,t){return fs.call(e,t)}function vt(e){return Vu.call(e)}function ls(e){if(e.name)return e.name;var t=Yu.call(Ku.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Nf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function us(e){if(!Ur||!e||typeof e!="object")return!1;try{Ur.call(e);try{qr.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ss(e){if(!Jt||!e||typeof e!="object")return!1;try{Jt.call(e,Jt);try{Qt.call(e,Qt)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function cs(e){if(!Ra||!e||typeof e!="object")return!1;try{return Ra.call(e),!0}catch{}return!1}function hs(e){if(!qr||!e||typeof e!="object")return!1;try{qr.call(e);try{Ur.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ds(e){if(!Qt||!e||typeof e!="object")return!1;try{Qt.call(e,Qt);try{Jt.call(e,Jt)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ps(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Df(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Df(Gi.call(e,0,t.maxStringLength),t)+n}var i=Qu[t.quoteStyle||"single"];i.lastIndex=0;var a=ct.call(ct.call(e,i,"\\$1"),/[\x00-\x1f]/g,ys);return If(a,"single",t)}function ys(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Xu.call(t.toString(16))}function Kt(e){return"Object("+e+")"}function On(e){return e+" { ? }"}function Ma(e,t,r,n){var i=n?Ti(r,n):Je.call(r,", ");return e+" ("+t+") {"+i+"}"}function vs(e){for(var t=0;t<e.length;t++)if(Nf(e[t],`
|
|
1
|
+
"use strict";const G=require("./index-Byf4HvjQ.js");var Yr={},sf={exports:{}},Ui={};(function(e){e.fetch=i(G.commonjsGlobal.fetch)&&i(G.commonjsGlobal.ReadableStream),e.writableStream=i(G.commonjsGlobal.WritableStream),e.abortController=i(G.commonjsGlobal.AbortController);var t;function r(){if(t!==void 0)return t;if(G.commonjsGlobal.XMLHttpRequest){t=new G.commonjsGlobal.XMLHttpRequest;try{t.open("GET",G.commonjsGlobal.XDomainRequest?"/":"https://example.com")}catch{t=null}}else t=null;return t}function n(a){var o=r();if(!o)return!1;try{return o.responseType=a,o.responseType===a}catch{}return!1}e.arraybuffer=e.fetch||n("arraybuffer"),e.msstream=!e.fetch&&n("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&n("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||(r()?i(r().overrideMimeType):!1);function i(a){return typeof a=="function"}t=null})(Ui);var Xr={},mi={exports:{}},cf=G.eventsExports.EventEmitter,vn,la;function tu(){if(la)return vn;la=1;function e(N,F){var j=Object.keys(N);if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(N);F&&(k=k.filter(function(I){return Object.getOwnPropertyDescriptor(N,I).enumerable})),j.push.apply(j,k)}return j}function t(N){for(var F=1;F<arguments.length;F++){var j=arguments[F]!=null?arguments[F]:{};F%2?e(Object(j),!0).forEach(function(k){r(N,k,j[k])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(j)):e(Object(j)).forEach(function(k){Object.defineProperty(N,k,Object.getOwnPropertyDescriptor(j,k))})}return N}function r(N,F,j){return F=o(F),F in N?Object.defineProperty(N,F,{value:j,enumerable:!0,configurable:!0,writable:!0}):N[F]=j,N}function n(N,F){if(!(N instanceof F))throw new TypeError("Cannot call a class as a function")}function i(N,F){for(var j=0;j<F.length;j++){var k=F[j];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(N,o(k.key),k)}}function a(N,F,j){return F&&i(N.prototype,F),Object.defineProperty(N,"prototype",{writable:!1}),N}function o(N){var F=f(N,"string");return typeof F=="symbol"?F:String(F)}function f(N,F){if(typeof N!="object"||N===null)return N;var j=N[Symbol.toPrimitive];if(j!==void 0){var k=j.call(N,F);if(typeof k!="object")return k;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(N)}var d=G.bufferPolyfill,l=d.Buffer,u=G.require$$3,w=u.inspect,g=w&&w.custom||"inspect";function S(N,F,j){l.prototype.copy.call(N,F,j)}return vn=function(){function N(){n(this,N),this.head=null,this.tail=null,this.length=0}return a(N,[{key:"push",value:function(j){var k={data:j,next:null};this.length>0?this.tail.next=k:this.head=k,this.tail=k,++this.length}},{key:"unshift",value:function(j){var k={data:j,next:this.head};this.length===0&&(this.tail=k),this.head=k,++this.length}},{key:"shift",value:function(){if(this.length!==0){var j=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,j}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(j){if(this.length===0)return"";for(var k=this.head,I=""+k.data;k=k.next;)I+=j+k.data;return I}},{key:"concat",value:function(j){if(this.length===0)return l.alloc(0);for(var k=l.allocUnsafe(j>>>0),I=this.head,R=0;I;)S(I.data,k,R),R+=I.data.length,I=I.next;return k}},{key:"consume",value:function(j,k){var I;return j<this.head.data.length?(I=this.head.data.slice(0,j),this.head.data=this.head.data.slice(j)):j===this.head.data.length?I=this.shift():I=k?this._getString(j):this._getBuffer(j),I}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(j){var k=this.head,I=1,R=k.data;for(j-=R.length;k=k.next;){var P=k.data,T=j>P.length?P.length:j;if(T===P.length?R+=P:R+=P.slice(0,j),j-=T,j===0){T===P.length?(++I,k.next?this.head=k.next:this.head=this.tail=null):(this.head=k,k.data=P.slice(T));break}++I}return this.length-=I,R}},{key:"_getBuffer",value:function(j){var k=l.allocUnsafe(j),I=this.head,R=1;for(I.data.copy(k),j-=I.data.length;I=I.next;){var P=I.data,T=j>P.length?P.length:j;if(P.copy(k,k.length-j,0,T),j-=T,j===0){T===P.length?(++R,I.next?this.head=I.next:this.head=this.tail=null):(this.head=I,I.data=P.slice(T));break}++R}return this.length-=R,k}},{key:g,value:function(j,k){return w(this,t(t({},k),{},{depth:0,customInspect:!1}))}}]),N}(),vn}function ru(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,G.dist.process.nextTick(wi,this,e)):G.dist.process.nextTick(wi,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(a){!t&&a?r._writableState?r._writableState.errorEmitted?G.dist.process.nextTick(Tr,r):(r._writableState.errorEmitted=!0,G.dist.process.nextTick(ua,r,a)):G.dist.process.nextTick(ua,r,a):t?(G.dist.process.nextTick(Tr,r),t(a)):G.dist.process.nextTick(Tr,r)}),this)}function ua(e,t){wi(e,t),Tr(e)}function Tr(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function nu(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function wi(e,t){e.emit("error",t)}function iu(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var hf={destroy:ru,undestroy:nu,errorOrDestroy:iu},Tt={};function au(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var df={};function Ce(e,t,r){r||(r=Error);function n(a,o,f){return typeof t=="string"?t:t(a,o,f)}var i=function(a){au(o,a);function o(f,d,l){return a.call(this,n(f,d,l))||this}return o}(r);i.prototype.name=r.name,i.prototype.code=e,df[e]=i}function sa(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function ou(e,t,r){return e.substr(0,t.length)===t}function fu(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function lu(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Ce("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Ce("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&ou(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(fu(e," argument"))i="The ".concat(e," ").concat(n," ").concat(sa(t,"type"));else{var a=lu(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(sa(t,"type"))}return i+=". Received type ".concat(typeof r),i},TypeError);Ce("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ce("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Ce("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ce("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Ce("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ce("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ce("ERR_STREAM_WRITE_AFTER_END","write after end");Ce("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ce("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Ce("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");Tt.codes=df;var uu=Tt.codes.ERR_INVALID_OPT_VALUE;function su(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function cu(e,t,r,n){var i=su(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var a=n?r:"highWaterMark";throw new uu(a,i)}return Math.floor(i)}return e.objectMode?16:16*1024}var pf={getHighWaterMark:cu},gn,ca;function yf(){if(ca)return gn;ca=1,gn=z;function e(c){var y=this;this.next=null,this.entry=null,this.finish=function(){E(y,c)}}var t;z.WritableState=q;var r={deprecate:G.requireBrowser()},n=cf,i=G.bufferPolyfill.Buffer,a=(typeof G.commonjsGlobal<"u"?G.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(c){return i.from(c)}function f(c){return i.isBuffer(c)||c instanceof a}var d=hf,l=pf,u=l.getHighWaterMark,w=Tt.codes,g=w.ERR_INVALID_ARG_TYPE,S=w.ERR_METHOD_NOT_IMPLEMENTED,N=w.ERR_MULTIPLE_CALLBACK,F=w.ERR_STREAM_CANNOT_PIPE,j=w.ERR_STREAM_DESTROYED,k=w.ERR_STREAM_NULL_VALUES,I=w.ERR_STREAM_WRITE_AFTER_END,R=w.ERR_UNKNOWN_ENCODING,P=d.errorOrDestroy;G.inherits_browserExports(z,n);function T(){}function q(c,y,m){t=t||Ut(),c=c||{},typeof m!="boolean"&&(m=y instanceof t),this.objectMode=!!c.objectMode,m&&(this.objectMode=this.objectMode||!!c.writableObjectMode),this.highWaterMark=u(this,c,"writableHighWaterMark",m),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var M=c.decodeStrings===!1;this.decodeStrings=!M,this.defaultEncoding=c.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(U){ae(y,U)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=c.emitClose!==!1,this.autoDestroy=!!c.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}q.prototype.getBuffer=function(){for(var y=this.bufferedRequest,m=[];y;)m.push(y),y=y.next;return m},function(){try{Object.defineProperty(q.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var C;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(C=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(y){return C.call(this,y)?!0:this!==z?!1:y&&y._writableState instanceof q}})):C=function(y){return y instanceof this};function z(c){t=t||Ut();var y=this instanceof t;if(!y&&!C.call(z,this))return new z(c);this._writableState=new q(c,this,y),this.writable=!0,c&&(typeof c.write=="function"&&(this._write=c.write),typeof c.writev=="function"&&(this._writev=c.writev),typeof c.destroy=="function"&&(this._destroy=c.destroy),typeof c.final=="function"&&(this._final=c.final)),n.call(this)}z.prototype.pipe=function(){P(this,new F)};function x(c,y){var m=new I;P(c,m),G.dist.process.nextTick(y,m)}function re(c,y,m,M){var U;return m===null?U=new k:typeof m!="string"&&!y.objectMode&&(U=new g("chunk",["string","Buffer"],m)),U?(P(c,U),G.dist.process.nextTick(M,U),!1):!0}z.prototype.write=function(c,y,m){var M=this._writableState,U=!1,h=!M.objectMode&&f(c);return h&&!i.isBuffer(c)&&(c=o(c)),typeof y=="function"&&(m=y,y=null),h?y="buffer":y||(y=M.defaultEncoding),typeof m!="function"&&(m=T),M.ending?x(this,m):(h||re(this,M,c,m))&&(M.pendingcb++,U=b(this,M,h,c,y,m)),U},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var c=this._writableState;c.corked&&(c.corked--,!c.writing&&!c.corked&&!c.bufferProcessing&&c.bufferedRequest&&Z(this,c))},z.prototype.setDefaultEncoding=function(y){if(typeof y=="string"&&(y=y.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((y+"").toLowerCase())>-1))throw new R(y);return this._writableState.defaultEncoding=y,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function J(c,y,m){return!c.objectMode&&c.decodeStrings!==!1&&typeof y=="string"&&(y=i.from(y,m)),y}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function b(c,y,m,M,U,h){if(!m){var p=J(y,M,U);M!==p&&(m=!0,U="buffer",M=p)}var $=y.objectMode?1:M.length;y.length+=$;var K=y.length<y.highWaterMark;if(K||(y.needDrain=!0),y.writing||y.corked){var se=y.lastBufferedRequest;y.lastBufferedRequest={chunk:M,encoding:U,isBuf:m,callback:h,next:null},se?se.next=y.lastBufferedRequest:y.bufferedRequest=y.lastBufferedRequest,y.bufferedRequestCount+=1}else B(c,y,!1,$,M,U,h);return K}function B(c,y,m,M,U,h,p){y.writelen=M,y.writecb=p,y.writing=!0,y.sync=!0,y.destroyed?y.onwrite(new j("write")):m?c._writev(U,y.onwrite):c._write(U,h,y.onwrite),y.sync=!1}function Q(c,y,m,M,U){--y.pendingcb,m?(G.dist.process.nextTick(U,M),G.dist.process.nextTick(A,c,y),c._writableState.errorEmitted=!0,P(c,M)):(U(M),c._writableState.errorEmitted=!0,P(c,M),A(c,y))}function ne(c){c.writing=!1,c.writecb=null,c.length-=c.writelen,c.writelen=0}function ae(c,y){var m=c._writableState,M=m.sync,U=m.writecb;if(typeof U!="function")throw new N;if(ne(m),y)Q(c,m,M,y,U);else{var h=D(m)||c.destroyed;!h&&!m.corked&&!m.bufferProcessing&&m.bufferedRequest&&Z(c,m),M?G.dist.process.nextTick(ue,c,m,h,U):ue(c,m,h,U)}}function ue(c,y,m,M){m||ie(c,y),y.pendingcb--,M(),A(c,y)}function ie(c,y){y.length===0&&y.needDrain&&(y.needDrain=!1,c.emit("drain"))}function Z(c,y){y.bufferProcessing=!0;var m=y.bufferedRequest;if(c._writev&&m&&m.next){var M=y.bufferedRequestCount,U=new Array(M),h=y.corkedRequestsFree;h.entry=m;for(var p=0,$=!0;m;)U[p]=m,m.isBuf||($=!1),m=m.next,p+=1;U.allBuffers=$,B(c,y,!0,y.length,U,"",h.finish),y.pendingcb++,y.lastBufferedRequest=null,h.next?(y.corkedRequestsFree=h.next,h.next=null):y.corkedRequestsFree=new e(y),y.bufferedRequestCount=0}else{for(;m;){var K=m.chunk,se=m.encoding,oe=m.callback,de=y.objectMode?1:K.length;if(B(c,y,!1,de,K,se,oe),m=m.next,y.bufferedRequestCount--,y.writing)break}m===null&&(y.lastBufferedRequest=null)}y.bufferedRequest=m,y.bufferProcessing=!1}z.prototype._write=function(c,y,m){m(new S("_write()"))},z.prototype._writev=null,z.prototype.end=function(c,y,m){var M=this._writableState;return typeof c=="function"?(m=c,c=null,y=null):typeof y=="function"&&(m=y,y=null),c!=null&&this.write(c,y),M.corked&&(M.corked=1,this.uncork()),M.ending||v(this,M,m),this},Object.defineProperty(z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function D(c){return c.ending&&c.length===0&&c.bufferedRequest===null&&!c.finished&&!c.writing}function W(c,y){c._final(function(m){y.pendingcb--,m&&P(c,m),y.prefinished=!0,c.emit("prefinish"),A(c,y)})}function _(c,y){!y.prefinished&&!y.finalCalled&&(typeof c._final=="function"&&!y.destroyed?(y.pendingcb++,y.finalCalled=!0,G.dist.process.nextTick(W,c,y)):(y.prefinished=!0,c.emit("prefinish")))}function A(c,y){var m=D(y);if(m&&(_(c,y),y.pendingcb===0&&(y.finished=!0,c.emit("finish"),y.autoDestroy))){var M=c._readableState;(!M||M.autoDestroy&&M.endEmitted)&&c.destroy()}return m}function v(c,y,m){y.ending=!0,A(c,y),m&&(y.finished?G.dist.process.nextTick(m):c.once("finish",m)),y.ended=!0,c.writable=!1}function E(c,y,m){var M=c.entry;for(c.entry=null;M;){var U=M.callback;y.pendingcb--,U(m),M=M.next}y.corkedRequestsFree.next=c}return Object.defineProperty(z.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(y){this._writableState&&(this._writableState.destroyed=y)}}),z.prototype.destroy=d.destroy,z.prototype._undestroy=d.undestroy,z.prototype._destroy=function(c,y){y(c)},gn}var _n,ha;function Ut(){if(ha)return _n;ha=1;var e=Object.keys||function(l){var u=[];for(var w in l)u.push(w);return u};_n=o;var t=gf(),r=yf();G.inherits_browserExports(o,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var a=n[i];o.prototype[a]||(o.prototype[a]=r.prototype[a])}function o(l){if(!(this instanceof o))return new o(l);t.call(this,l),r.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",f)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function f(){this._writableState.ended||G.dist.process.nextTick(d,this)}function d(l){l.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),_n}var da=Tt.codes.ERR_STREAM_PREMATURE_CLOSE;function hu(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function du(){}function pu(e){return e.setHeader&&typeof e.abort=="function"}function vf(e,t,r){if(typeof t=="function")return vf(e,null,t);t||(t={}),r=hu(r||du);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,a=function(){e.writable||f()},o=e._writableState&&e._writableState.finished,f=function(){i=!1,o=!0,n||r.call(e)},d=e._readableState&&e._readableState.endEmitted,l=function(){n=!1,d=!0,i||r.call(e)},u=function(N){r.call(e,N)},w=function(){var N;if(n&&!d)return(!e._readableState||!e._readableState.ended)&&(N=new da),r.call(e,N);if(i&&!o)return(!e._writableState||!e._writableState.ended)&&(N=new da),r.call(e,N)},g=function(){e.req.on("finish",f)};return pu(e)?(e.on("complete",f),e.on("abort",w),e.req?g():e.on("request",g)):i&&!e._writableState&&(e.on("end",a),e.on("close",a)),e.on("end",l),e.on("finish",f),t.error!==!1&&e.on("error",u),e.on("close",w),function(){e.removeListener("complete",f),e.removeListener("abort",w),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",a),e.removeListener("close",a),e.removeListener("finish",f),e.removeListener("end",l),e.removeListener("error",u),e.removeListener("close",w)}}var qi=vf,bn,pa;function yu(){if(pa)return bn;pa=1;var e;function t(R,P,T){return P=r(P),P in R?Object.defineProperty(R,P,{value:T,enumerable:!0,configurable:!0,writable:!0}):R[P]=T,R}function r(R){var P=n(R,"string");return typeof P=="symbol"?P:String(P)}function n(R,P){if(typeof R!="object"||R===null)return R;var T=R[Symbol.toPrimitive];if(T!==void 0){var q=T.call(R,P);if(typeof q!="object")return q;throw new TypeError("@@toPrimitive must return a primitive value.")}return(P==="string"?String:Number)(R)}var i=qi,a=Symbol("lastResolve"),o=Symbol("lastReject"),f=Symbol("error"),d=Symbol("ended"),l=Symbol("lastPromise"),u=Symbol("handlePromise"),w=Symbol("stream");function g(R,P){return{value:R,done:P}}function S(R){var P=R[a];if(P!==null){var T=R[w].read();T!==null&&(R[l]=null,R[a]=null,R[o]=null,P(g(T,!1)))}}function N(R){G.dist.process.nextTick(S,R)}function F(R,P){return function(T,q){R.then(function(){if(P[d]){T(g(void 0,!0));return}P[u](T,q)},q)}}var j=Object.getPrototypeOf(function(){}),k=Object.setPrototypeOf((e={get stream(){return this[w]},next:function(){var P=this,T=this[f];if(T!==null)return Promise.reject(T);if(this[d])return Promise.resolve(g(void 0,!0));if(this[w].destroyed)return new Promise(function(x,re){G.dist.process.nextTick(function(){P[f]?re(P[f]):x(g(void 0,!0))})});var q=this[l],C;if(q)C=new Promise(F(q,this));else{var z=this[w].read();if(z!==null)return Promise.resolve(g(z,!1));C=new Promise(this[u])}return this[l]=C,C}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var P=this;return new Promise(function(T,q){P[w].destroy(null,function(C){if(C){q(C);return}T(g(void 0,!0))})})}),e),j),I=function(P){var T,q=Object.create(k,(T={},t(T,w,{value:P,writable:!0}),t(T,a,{value:null,writable:!0}),t(T,o,{value:null,writable:!0}),t(T,f,{value:null,writable:!0}),t(T,d,{value:P._readableState.endEmitted,writable:!0}),t(T,u,{value:function(z,x){var re=q[w].read();re?(q[l]=null,q[a]=null,q[o]=null,z(g(re,!1))):(q[a]=z,q[o]=x)},writable:!0}),T));return q[l]=null,i(P,function(C){if(C&&C.code!=="ERR_STREAM_PREMATURE_CLOSE"){var z=q[o];z!==null&&(q[l]=null,q[a]=null,q[o]=null,z(C)),q[f]=C;return}var x=q[a];x!==null&&(q[l]=null,q[a]=null,q[o]=null,x(g(void 0,!0))),q[d]=!0}),P.on("readable",N.bind(null,q)),q};return bn=I,bn}var mn,ya;function vu(){return ya||(ya=1,mn=function(){throw new Error("Readable.from is not available in the browser")}),mn}var wn,va;function gf(){if(va)return wn;va=1,wn=x;var e;x.ReadableState=z,G.eventsExports.EventEmitter;var t=function(p,$){return p.listeners($).length},r=cf,n=G.bufferPolyfill.Buffer,i=(typeof G.commonjsGlobal<"u"?G.commonjsGlobal:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(h){return n.from(h)}function o(h){return n.isBuffer(h)||h instanceof i}var f=G.require$$3,d;f&&f.debuglog?d=f.debuglog("stream"):d=function(){};var l=tu(),u=hf,w=pf,g=w.getHighWaterMark,S=Tt.codes,N=S.ERR_INVALID_ARG_TYPE,F=S.ERR_STREAM_PUSH_AFTER_EOF,j=S.ERR_METHOD_NOT_IMPLEMENTED,k=S.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,I,R,P;G.inherits_browserExports(x,r);var T=u.errorOrDestroy,q=["error","close","destroy","pause","resume"];function C(h,p,$){if(typeof h.prependListener=="function")return h.prependListener(p,$);!h._events||!h._events[p]?h.on(p,$):Array.isArray(h._events[p])?h._events[p].unshift($):h._events[p]=[$,h._events[p]]}function z(h,p,$){e=e||Ut(),h=h||{},typeof $!="boolean"&&($=p instanceof e),this.objectMode=!!h.objectMode,$&&(this.objectMode=this.objectMode||!!h.readableObjectMode),this.highWaterMark=g(this,h,"readableHighWaterMark",$),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=h.emitClose!==!1,this.autoDestroy=!!h.autoDestroy,this.destroyed=!1,this.defaultEncoding=h.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,h.encoding&&(I||(I=G.requireString_decoder().StringDecoder),this.decoder=new I(h.encoding),this.encoding=h.encoding)}function x(h){if(e=e||Ut(),!(this instanceof x))return new x(h);var p=this instanceof e;this._readableState=new z(h,this,p),this.readable=!0,h&&(typeof h.read=="function"&&(this._read=h.read),typeof h.destroy=="function"&&(this._destroy=h.destroy)),r.call(this)}Object.defineProperty(x.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(p){this._readableState&&(this._readableState.destroyed=p)}}),x.prototype.destroy=u.destroy,x.prototype._undestroy=u.undestroy,x.prototype._destroy=function(h,p){p(h)},x.prototype.push=function(h,p){var $=this._readableState,K;return $.objectMode?K=!0:typeof h=="string"&&(p=p||$.defaultEncoding,p!==$.encoding&&(h=n.from(h,p),p=""),K=!0),re(this,h,p,!1,K)},x.prototype.unshift=function(h){return re(this,h,null,!0,!1)};function re(h,p,$,K,se){d("readableAddChunk",p);var oe=h._readableState;if(p===null)oe.reading=!1,ae(h,oe);else{var de;if(se||(de=b(oe,p)),de)T(h,de);else if(oe.objectMode||p&&p.length>0)if(typeof p!="string"&&!oe.objectMode&&Object.getPrototypeOf(p)!==n.prototype&&(p=a(p)),K)oe.endEmitted?T(h,new k):J(h,oe,p,!0);else if(oe.ended)T(h,new F);else{if(oe.destroyed)return!1;oe.reading=!1,oe.decoder&&!$?(p=oe.decoder.write(p),oe.objectMode||p.length!==0?J(h,oe,p,!1):Z(h,oe)):J(h,oe,p,!1)}else K||(oe.reading=!1,Z(h,oe))}return!oe.ended&&(oe.length<oe.highWaterMark||oe.length===0)}function J(h,p,$,K){p.flowing&&p.length===0&&!p.sync?(p.awaitDrain=0,h.emit("data",$)):(p.length+=p.objectMode?1:$.length,K?p.buffer.unshift($):p.buffer.push($),p.needReadable&&ue(h)),Z(h,p)}function b(h,p){var $;return!o(p)&&typeof p!="string"&&p!==void 0&&!h.objectMode&&($=new N("chunk",["string","Buffer","Uint8Array"],p)),$}x.prototype.isPaused=function(){return this._readableState.flowing===!1},x.prototype.setEncoding=function(h){I||(I=G.requireString_decoder().StringDecoder);var p=new I(h);this._readableState.decoder=p,this._readableState.encoding=this._readableState.decoder.encoding;for(var $=this._readableState.buffer.head,K="";$!==null;)K+=p.write($.data),$=$.next;return this._readableState.buffer.clear(),K!==""&&this._readableState.buffer.push(K),this._readableState.length=K.length,this};var B=1073741824;function Q(h){return h>=B?h=B:(h--,h|=h>>>1,h|=h>>>2,h|=h>>>4,h|=h>>>8,h|=h>>>16,h++),h}function ne(h,p){return h<=0||p.length===0&&p.ended?0:p.objectMode?1:h!==h?p.flowing&&p.length?p.buffer.head.data.length:p.length:(h>p.highWaterMark&&(p.highWaterMark=Q(h)),h<=p.length?h:p.ended?p.length:(p.needReadable=!0,0))}x.prototype.read=function(h){d("read",h),h=parseInt(h,10);var p=this._readableState,$=h;if(h!==0&&(p.emittedReadable=!1),h===0&&p.needReadable&&((p.highWaterMark!==0?p.length>=p.highWaterMark:p.length>0)||p.ended))return d("read: emitReadable",p.length,p.ended),p.length===0&&p.ended?m(this):ue(this),null;if(h=ne(h,p),h===0&&p.ended)return p.length===0&&m(this),null;var K=p.needReadable;d("need readable",K),(p.length===0||p.length-h<p.highWaterMark)&&(K=!0,d("length less than watermark",K)),p.ended||p.reading?(K=!1,d("reading or ended",K)):K&&(d("do read"),p.reading=!0,p.sync=!0,p.length===0&&(p.needReadable=!0),this._read(p.highWaterMark),p.sync=!1,p.reading||(h=ne($,p)));var se;return h>0?se=y(h,p):se=null,se===null?(p.needReadable=p.length<=p.highWaterMark,h=0):(p.length-=h,p.awaitDrain=0),p.length===0&&(p.ended||(p.needReadable=!0),$!==h&&p.ended&&m(this)),se!==null&&this.emit("data",se),se};function ae(h,p){if(d("onEofChunk"),!p.ended){if(p.decoder){var $=p.decoder.end();$&&$.length&&(p.buffer.push($),p.length+=p.objectMode?1:$.length)}p.ended=!0,p.sync?ue(h):(p.needReadable=!1,p.emittedReadable||(p.emittedReadable=!0,ie(h)))}}function ue(h){var p=h._readableState;d("emitReadable",p.needReadable,p.emittedReadable),p.needReadable=!1,p.emittedReadable||(d("emitReadable",p.flowing),p.emittedReadable=!0,G.dist.process.nextTick(ie,h))}function ie(h){var p=h._readableState;d("emitReadable_",p.destroyed,p.length,p.ended),!p.destroyed&&(p.length||p.ended)&&(h.emit("readable"),p.emittedReadable=!1),p.needReadable=!p.flowing&&!p.ended&&p.length<=p.highWaterMark,c(h)}function Z(h,p){p.readingMore||(p.readingMore=!0,G.dist.process.nextTick(D,h,p))}function D(h,p){for(;!p.reading&&!p.ended&&(p.length<p.highWaterMark||p.flowing&&p.length===0);){var $=p.length;if(d("maybeReadMore read 0"),h.read(0),$===p.length)break}p.readingMore=!1}x.prototype._read=function(h){T(this,new j("_read()"))},x.prototype.pipe=function(h,p){var $=this,K=this._readableState;switch(K.pipesCount){case 0:K.pipes=h;break;case 1:K.pipes=[K.pipes,h];break;default:K.pipes.push(h);break}K.pipesCount+=1,d("pipe count=%d opts=%j",K.pipesCount,p);var se=(!p||p.end!==!1)&&h!==G.dist.process.stdout&&h!==G.dist.process.stderr,oe=se?_e:V;K.endEmitted?G.dist.process.nextTick(oe):$.once("end",oe),h.on("unpipe",de);function de(ee,te){d("onunpipe"),ee===$&&te&&te.hasUnpiped===!1&&(te.hasUnpiped=!0,Te())}function _e(){d("onend"),h.end()}var H=W($);h.on("drain",H);var Fe=!1;function Te(){d("cleanup"),h.removeListener("close",s),h.removeListener("finish",O),h.removeListener("drain",H),h.removeListener("error",X),h.removeListener("unpipe",de),$.removeListener("end",_e),$.removeListener("end",V),$.removeListener("data",L),Fe=!0,K.awaitDrain&&(!h._writableState||h._writableState.needDrain)&&H()}$.on("data",L);function L(ee){d("ondata");var te=h.write(ee);d("dest.write",te),te===!1&&((K.pipesCount===1&&K.pipes===h||K.pipesCount>1&&U(K.pipes,h)!==-1)&&!Fe&&(d("false write response, pause",K.awaitDrain),K.awaitDrain++),$.pause())}function X(ee){d("onerror",ee),V(),h.removeListener("error",X),t(h,"error")===0&&T(h,ee)}C(h,"error",X);function s(){h.removeListener("finish",O),V()}h.once("close",s);function O(){d("onfinish"),h.removeListener("close",s),V()}h.once("finish",O);function V(){d("unpipe"),$.unpipe(h)}return h.emit("pipe",$),K.flowing||(d("pipe resume"),$.resume()),h};function W(h){return function(){var $=h._readableState;d("pipeOnDrain",$.awaitDrain),$.awaitDrain&&$.awaitDrain--,$.awaitDrain===0&&t(h,"data")&&($.flowing=!0,c(h))}}x.prototype.unpipe=function(h){var p=this._readableState,$={hasUnpiped:!1};if(p.pipesCount===0)return this;if(p.pipesCount===1)return h&&h!==p.pipes?this:(h||(h=p.pipes),p.pipes=null,p.pipesCount=0,p.flowing=!1,h&&h.emit("unpipe",this,$),this);if(!h){var K=p.pipes,se=p.pipesCount;p.pipes=null,p.pipesCount=0,p.flowing=!1;for(var oe=0;oe<se;oe++)K[oe].emit("unpipe",this,{hasUnpiped:!1});return this}var de=U(p.pipes,h);return de===-1?this:(p.pipes.splice(de,1),p.pipesCount-=1,p.pipesCount===1&&(p.pipes=p.pipes[0]),h.emit("unpipe",this,$),this)},x.prototype.on=function(h,p){var $=r.prototype.on.call(this,h,p),K=this._readableState;return h==="data"?(K.readableListening=this.listenerCount("readable")>0,K.flowing!==!1&&this.resume()):h==="readable"&&!K.endEmitted&&!K.readableListening&&(K.readableListening=K.needReadable=!0,K.flowing=!1,K.emittedReadable=!1,d("on readable",K.length,K.reading),K.length?ue(this):K.reading||G.dist.process.nextTick(A,this)),$},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function(h,p){var $=r.prototype.removeListener.call(this,h,p);return h==="readable"&&G.dist.process.nextTick(_,this),$},x.prototype.removeAllListeners=function(h){var p=r.prototype.removeAllListeners.apply(this,arguments);return(h==="readable"||h===void 0)&&G.dist.process.nextTick(_,this),p};function _(h){var p=h._readableState;p.readableListening=h.listenerCount("readable")>0,p.resumeScheduled&&!p.paused?p.flowing=!0:h.listenerCount("data")>0&&h.resume()}function A(h){d("readable nexttick read 0"),h.read(0)}x.prototype.resume=function(){var h=this._readableState;return h.flowing||(d("resume"),h.flowing=!h.readableListening,v(this,h)),h.paused=!1,this};function v(h,p){p.resumeScheduled||(p.resumeScheduled=!0,G.dist.process.nextTick(E,h,p))}function E(h,p){d("resume",p.reading),p.reading||h.read(0),p.resumeScheduled=!1,h.emit("resume"),c(h),p.flowing&&!p.reading&&h.read(0)}x.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function c(h){var p=h._readableState;for(d("flow",p.flowing);p.flowing&&h.read()!==null;);}x.prototype.wrap=function(h){var p=this,$=this._readableState,K=!1;h.on("end",function(){if(d("wrapped end"),$.decoder&&!$.ended){var de=$.decoder.end();de&&de.length&&p.push(de)}p.push(null)}),h.on("data",function(de){if(d("wrapped data"),$.decoder&&(de=$.decoder.write(de)),!($.objectMode&&de==null)&&!(!$.objectMode&&(!de||!de.length))){var _e=p.push(de);_e||(K=!0,h.pause())}});for(var se in h)this[se]===void 0&&typeof h[se]=="function"&&(this[se]=function(_e){return function(){return h[_e].apply(h,arguments)}}(se));for(var oe=0;oe<q.length;oe++)h.on(q[oe],this.emit.bind(this,q[oe]));return this._read=function(de){d("wrapped _read",de),K&&(K=!1,h.resume())},this},typeof Symbol=="function"&&(x.prototype[Symbol.asyncIterator]=function(){return R===void 0&&(R=yu()),R(this)}),Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(x.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(x.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(p){this._readableState&&(this._readableState.flowing=p)}}),x._fromList=y,Object.defineProperty(x.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function y(h,p){if(p.length===0)return null;var $;return p.objectMode?$=p.buffer.shift():!h||h>=p.length?(p.decoder?$=p.buffer.join(""):p.buffer.length===1?$=p.buffer.first():$=p.buffer.concat(p.length),p.buffer.clear()):$=p.buffer.consume(h,p.decoder),$}function m(h){var p=h._readableState;d("endReadable",p.endEmitted),p.endEmitted||(p.ended=!0,G.dist.process.nextTick(M,p,h))}function M(h,p){if(d("endReadableNT",h.endEmitted,h.length),!h.endEmitted&&h.length===0&&(h.endEmitted=!0,p.readable=!1,p.emit("end"),h.autoDestroy)){var $=p._writableState;(!$||$.autoDestroy&&$.finished)&&p.destroy()}}typeof Symbol=="function"&&(x.from=function(h,p){return P===void 0&&(P=vu()),P(x,h,p)});function U(h,p){for(var $=0,K=h.length;$<K;$++)if(h[$]===p)return $;return-1}return wn}var _f=at,Jr=Tt.codes,gu=Jr.ERR_METHOD_NOT_IMPLEMENTED,_u=Jr.ERR_MULTIPLE_CALLBACK,bu=Jr.ERR_TRANSFORM_ALREADY_TRANSFORMING,mu=Jr.ERR_TRANSFORM_WITH_LENGTH_0,Qr=Ut();G.inherits_browserExports(at,Qr);function wu(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new _u);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function at(e){if(!(this instanceof at))return new at(e);Qr.call(this,e),this._transformState={afterTransform:wu.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",Eu)}function Eu(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){ga(e,t,r)}):ga(this,null,null)}at.prototype.push=function(e,t){return this._transformState.needTransform=!1,Qr.prototype.push.call(this,e,t)};at.prototype._transform=function(e,t,r){r(new gu("_transform()"))};at.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}};at.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0};at.prototype._destroy=function(e,t){Qr.prototype._destroy.call(this,e,function(r){t(r)})};function ga(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new mu;if(e._transformState.transforming)throw new bu;return e.push(null)}var Su=ir,bf=_f;G.inherits_browserExports(ir,bf);function ir(e){if(!(this instanceof ir))return new ir(e);bf.call(this,e)}ir.prototype._transform=function(e,t,r){r(null,e)};var En;function Ru(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var mf=Tt.codes,Au=mf.ERR_MISSING_ARGS,Ou=mf.ERR_STREAM_DESTROYED;function _a(e){if(e)throw e}function Tu(e){return e.setHeader&&typeof e.abort=="function"}function Iu(e,t,r,n){n=Ru(n);var i=!1;e.on("close",function(){i=!0}),En===void 0&&(En=qi),En(e,{readable:t,writable:r},function(o){if(o)return n(o);i=!0,n()});var a=!1;return function(o){if(!i&&!a){if(a=!0,Tu(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new Ou("pipe"))}}}function ba(e){e()}function Pu(e,t){return e.pipe(t)}function Nu(e){return!e.length||typeof e[e.length-1]!="function"?_a:e.pop()}function Du(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=Nu(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Au("streams");var i,a=t.map(function(o,f){var d=f<t.length-1,l=f>0;return Iu(o,d,l,function(u){i||(i=u),u&&a.forEach(ba),!d&&(a.forEach(ba),n(i))})});return t.reduce(Pu)}var Lu=Du;(function(e,t){t=e.exports=gf(),t.Stream=t,t.Readable=t,t.Writable=yf(),t.Duplex=Ut(),t.Transform=_f,t.PassThrough=Su,t.finished=qi,t.pipeline=Lu})(mi,mi.exports);var wf=mi.exports,ma=Ui,Mu=G.inherits_browserExports,Ef=wf,br=Xr.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},zi=Xr.IncomingMessage=function(e,t,r,n){var i=this;if(Ef.Readable.call(i),i._mode=r,i.headers={},i.rawHeaders=[],i.trailers={},i.rawTrailers=[],i.on("end",function(){G.dist.process.nextTick(function(){i.emit("close")})}),r==="fetch"){let u=function(){o.read().then(function(w){if(!i._destroyed){if(n(w.done),w.done){i.push(null);return}i.push(G.dist.Buffer.from(w.value)),u()}}).catch(function(w){n(!0),i._destroyed||i.emit("error",w)})};if(i._fetchResponse=t,i.url=t.url,i.statusCode=t.status,i.statusMessage=t.statusText,t.headers.forEach(function(w,g){i.headers[g.toLowerCase()]=w,i.rawHeaders.push(g,w)}),ma.writableStream){var a=new WritableStream({write:function(w){return n(!1),new Promise(function(g,S){i._destroyed?S():i.push(G.dist.Buffer.from(w))?g():i._resumeFetch=g})},close:function(){n(!0),i._destroyed||i.push(null)},abort:function(w){n(!0),i._destroyed||i.emit("error",w)}});try{t.body.pipeTo(a).catch(function(w){n(!0),i._destroyed||i.emit("error",w)});return}catch{}}var o=t.body.getReader();u()}else{i._xhr=e,i._pos=0,i.url=e.responseURL,i.statusCode=e.status,i.statusMessage=e.statusText;var f=e.getAllResponseHeaders().split(/\r?\n/);if(f.forEach(function(u){var w=u.match(/^([^:]+):\s*(.*)/);if(w){var g=w[1].toLowerCase();g==="set-cookie"?(i.headers[g]===void 0&&(i.headers[g]=[]),i.headers[g].push(w[2])):i.headers[g]!==void 0?i.headers[g]+=", "+w[2]:i.headers[g]=w[2],i.rawHeaders.push(w[1],w[2])}}),i._charset="x-user-defined",!ma.overrideMimeType){var d=i.rawHeaders["mime-type"];if(d){var l=d.match(/;\s*charset=([^;])(;|$)/);l&&(i._charset=l[1].toLowerCase())}i._charset||(i._charset="utf-8")}}};Mu(zi,Ef.Readable);zi.prototype._read=function(){var e=this,t=e._resumeFetch;t&&(e._resumeFetch=null,t())};zi.prototype._onXHRProgress=function(e){var t=this,r=t._xhr,n=null;switch(t._mode){case"text":if(n=r.responseText,n.length>t._pos){var i=n.substr(t._pos);if(t._charset==="x-user-defined"){for(var a=G.dist.Buffer.alloc(i.length),o=0;o<i.length;o++)a[o]=i.charCodeAt(o)&255;t.push(a)}else t.push(i,t._charset);t._pos=n.length}break;case"arraybuffer":if(r.readyState!==br.DONE||!r.response)break;n=r.response,t.push(G.dist.Buffer.from(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=r.response,r.readyState!==br.LOADING||!n)break;t.push(G.dist.Buffer.from(new Uint8Array(n)));break;case"ms-stream":if(n=r.response,r.readyState!==br.LOADING)break;var f=new G.commonjsGlobal.MSStreamReader;f.onprogress=function(){f.result.byteLength>t._pos&&(t.push(G.dist.Buffer.from(new Uint8Array(f.result.slice(t._pos)))),t._pos=f.result.byteLength)},f.onload=function(){e(!0),t.push(null)},f.readAsArrayBuffer(n);break}t._xhr.readyState===br.DONE&&t._mode!=="ms-stream"&&(e(!0),t.push(null))};var bt=Ui,ku=G.inherits_browserExports,Sf=Xr,Zi=wf,Fu=Sf.IncomingMessage,wa=Sf.readyStates;function ju(e,t){return bt.fetch&&t?"fetch":bt.mozchunkedarraybuffer?"moz-chunked-arraybuffer":bt.msstream?"ms-stream":bt.arraybuffer&&e?"arraybuffer":"text"}var De=sf.exports=function(e){var t=this;Zi.Writable.call(t),t._opts=e,t._body=[],t._headers={},e.auth&&t.setHeader("Authorization","Basic "+G.dist.Buffer.from(e.auth).toString("base64")),Object.keys(e.headers).forEach(function(i){t.setHeader(i,e.headers[i])});var r,n=!0;if(e.mode==="disable-fetch"||"requestTimeout"in e&&!bt.abortController)n=!1,r=!0;else if(e.mode==="prefer-streaming")r=!1;else if(e.mode==="allow-wrong-content-type")r=!bt.overrideMimeType;else if(!e.mode||e.mode==="default"||e.mode==="prefer-fast")r=!0;else throw new Error("Invalid value for opts.mode");t._mode=ju(r,n),t._fetchTimer=null,t._socketTimeout=null,t._socketTimer=null,t.on("finish",function(){t._onFinish()})};ku(De,Zi.Writable);De.prototype.setHeader=function(e,t){var r=this,n=e.toLowerCase();$u.indexOf(n)===-1&&(r._headers[n]={name:e,value:t})};De.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null};De.prototype.removeHeader=function(e){var t=this;delete t._headers[e.toLowerCase()]};De.prototype._onFinish=function(){var e=this;if(!e._destroyed){var t=e._opts;"timeout"in t&&t.timeout!==0&&e.setTimeout(t.timeout);var r=e._headers,n=null;t.method!=="GET"&&t.method!=="HEAD"&&(n=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var i=[];if(Object.keys(r).forEach(function(d){var l=r[d].name,u=r[d].value;Array.isArray(u)?u.forEach(function(w){i.push([l,w])}):i.push([l,u])}),e._mode==="fetch"){var a=null;if(bt.abortController){var o=new AbortController;a=o.signal,e._fetchAbortController=o,"requestTimeout"in t&&t.requestTimeout!==0&&(e._fetchTimer=G.commonjsGlobal.setTimeout(function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()},t.requestTimeout))}G.commonjsGlobal.fetch(e._opts.url,{method:e._opts.method,headers:i,body:n||void 0,mode:"cors",credentials:t.withCredentials?"include":"same-origin",signal:a}).then(function(d){e._fetchResponse=d,e._resetTimers(!1),e._connect()},function(d){e._resetTimers(!0),e._destroyed||e.emit("error",d)})}else{var f=e._xhr=new G.commonjsGlobal.XMLHttpRequest;try{f.open(e._opts.method,e._opts.url,!0)}catch(d){G.dist.process.nextTick(function(){e.emit("error",d)});return}"responseType"in f&&(f.responseType=e._mode),"withCredentials"in f&&(f.withCredentials=!!t.withCredentials),e._mode==="text"&&"overrideMimeType"in f&&f.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in t&&(f.timeout=t.requestTimeout,f.ontimeout=function(){e.emit("requestTimeout")}),i.forEach(function(d){f.setRequestHeader(d[0],d[1])}),e._response=null,f.onreadystatechange=function(){switch(f.readyState){case wa.LOADING:case wa.DONE:e._onXHRProgress();break}},e._mode==="moz-chunked-arraybuffer"&&(f.onprogress=function(){e._onXHRProgress()}),f.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{f.send(n)}catch(d){G.dist.process.nextTick(function(){e.emit("error",d)});return}}}};function xu(e){try{var t=e.status;return t!==null&&t!==0}catch{return!1}}De.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),!(!xu(e._xhr)||e._destroyed)&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))};De.prototype._connect=function(){var e=this;e._destroyed||(e._response=new Fu(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",function(t){e.emit("error",t)}),e.emit("response",e._response))};De.prototype._write=function(e,t,r){var n=this;n._body.push(e),r()};De.prototype._resetTimers=function(e){var t=this;G.commonjsGlobal.clearTimeout(t._socketTimer),t._socketTimer=null,e?(G.commonjsGlobal.clearTimeout(t._fetchTimer),t._fetchTimer=null):t._socketTimeout&&(t._socketTimer=G.commonjsGlobal.setTimeout(function(){t.emit("timeout")},t._socketTimeout))};De.prototype.abort=De.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)};De.prototype.end=function(e,t,r){var n=this;typeof e=="function"&&(r=e,e=void 0),Zi.Writable.prototype.end.call(n,e,t,r)};De.prototype.setTimeout=function(e,t){var r=this;t&&r.once("timeout",t),r._socketTimeout=e,r._resetTimers(!1)};De.prototype.flushHeaders=function(){};De.prototype.setNoDelay=function(){};De.prototype.setSocketKeepAlive=function(){};var $u=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],Cu=sf.exports,Bu=qu,Uu=Object.prototype.hasOwnProperty;function qu(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)Uu.call(r,n)&&(e[n]=r[n])}return e}var zu={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"},Ei={exports:{}},Br={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */Br.exports;(function(e,t){(function(r){var n=t&&!t.nodeType&&t,i=e&&!e.nodeType&&e,a=typeof G.commonjsGlobal=="object"&&G.commonjsGlobal;(a.global===a||a.window===a||a.self===a)&&(r=a);var o,f=2147483647,d=36,l=1,u=26,w=38,g=700,S=72,N=128,F="-",j=/^xn--/,k=/[^\x20-\x7E]/,I=/[\x2E\u3002\uFF0E\uFF61]/g,R={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},P=d-l,T=Math.floor,q=String.fromCharCode,C;function z(D){throw new RangeError(R[D])}function x(D,W){for(var _=D.length,A=[];_--;)A[_]=W(D[_]);return A}function re(D,W){var _=D.split("@"),A="";_.length>1&&(A=_[0]+"@",D=_[1]),D=D.replace(I,".");var v=D.split("."),E=x(v,W).join(".");return A+E}function J(D){for(var W=[],_=0,A=D.length,v,E;_<A;)v=D.charCodeAt(_++),v>=55296&&v<=56319&&_<A?(E=D.charCodeAt(_++),(E&64512)==56320?W.push(((v&1023)<<10)+(E&1023)+65536):(W.push(v),_--)):W.push(v);return W}function b(D){return x(D,function(W){var _="";return W>65535&&(W-=65536,_+=q(W>>>10&1023|55296),W=56320|W&1023),_+=q(W),_}).join("")}function B(D){return D-48<10?D-22:D-65<26?D-65:D-97<26?D-97:d}function Q(D,W){return D+22+75*(D<26)-((W!=0)<<5)}function ne(D,W,_){var A=0;for(D=_?T(D/g):D>>1,D+=T(D/W);D>P*u>>1;A+=d)D=T(D/P);return T(A+(P+1)*D/(D+w))}function ae(D){var W=[],_=D.length,A,v=0,E=N,c=S,y,m,M,U,h,p,$,K,se;for(y=D.lastIndexOf(F),y<0&&(y=0),m=0;m<y;++m)D.charCodeAt(m)>=128&&z("not-basic"),W.push(D.charCodeAt(m));for(M=y>0?y+1:0;M<_;){for(U=v,h=1,p=d;M>=_&&z("invalid-input"),$=B(D.charCodeAt(M++)),($>=d||$>T((f-v)/h))&&z("overflow"),v+=$*h,K=p<=c?l:p>=c+u?u:p-c,!($<K);p+=d)se=d-K,h>T(f/se)&&z("overflow"),h*=se;A=W.length+1,c=ne(v-U,A,U==0),T(v/A)>f-E&&z("overflow"),E+=T(v/A),v%=A,W.splice(v++,0,E)}return b(W)}function ue(D){var W,_,A,v,E,c,y,m,M,U,h,p=[],$,K,se,oe;for(D=J(D),$=D.length,W=N,_=0,E=S,c=0;c<$;++c)h=D[c],h<128&&p.push(q(h));for(A=v=p.length,v&&p.push(F);A<$;){for(y=f,c=0;c<$;++c)h=D[c],h>=W&&h<y&&(y=h);for(K=A+1,y-W>T((f-_)/K)&&z("overflow"),_+=(y-W)*K,W=y,c=0;c<$;++c)if(h=D[c],h<W&&++_>f&&z("overflow"),h==W){for(m=_,M=d;U=M<=E?l:M>=E+u?u:M-E,!(m<U);M+=d)oe=m-U,se=d-U,p.push(q(Q(U+oe%se,0))),m=T(oe/se);p.push(q(Q(m,0))),E=ne(_,K,A==v),_=0,++A}++_,++W}return p.join("")}function ie(D){return re(D,function(W){return j.test(W)?ae(W.slice(4).toLowerCase()):W})}function Z(D){return re(D,function(W){return k.test(W)?"xn--"+ue(W):W})}if(o={version:"1.4.1",ucs2:{decode:J,encode:b},decode:ae,encode:ue,toASCII:Z,toUnicode:ie},n&&i)if(e.exports==n)i.exports=o;else for(C in o)o.hasOwnProperty(C)&&(n[C]=o[C]);else r.punycode=o})(G.commonjsGlobal)})(Br,Br.exports);var Rf=Br.exports,ot=TypeError,Hi=typeof Map=="function"&&Map.prototype,Sn=Object.getOwnPropertyDescriptor&&Hi?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ur=Hi&&Sn&&typeof Sn.get=="function"?Sn.get:null,Ea=Hi&&Map.prototype.forEach,Wi=typeof Set=="function"&&Set.prototype,Rn=Object.getOwnPropertyDescriptor&&Wi?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,qr=Wi&&Rn&&typeof Rn.get=="function"?Rn.get:null,Sa=Wi&&Set.prototype.forEach,Zu=typeof WeakMap=="function"&&WeakMap.prototype,Jt=Zu?WeakMap.prototype.has:null,Hu=typeof WeakSet=="function"&&WeakSet.prototype,Qt=Hu?WeakSet.prototype.has:null,Wu=typeof WeakRef=="function"&&WeakRef.prototype,Ra=Wu?WeakRef.prototype.deref:null,Gu=Boolean.prototype.valueOf,Vu=Object.prototype.toString,Ku=Function.prototype.toString,Yu=String.prototype.match,Gi=String.prototype.slice,ct=String.prototype.replace,Xu=String.prototype.toUpperCase,Aa=String.prototype.toLowerCase,Af=RegExp.prototype.test,Oa=Array.prototype.concat,Je=Array.prototype.join,Ju=Array.prototype.slice,Ta=Math.floor,Si=typeof BigInt=="function"?BigInt.prototype.valueOf:null,An=Object.getOwnPropertySymbols,Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,qt=typeof Symbol=="function"&&typeof Symbol.iterator=="object",er=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===qt||!0)?Symbol.toStringTag:null,Of=Object.prototype.propertyIsEnumerable,Ia=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Pa(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Af.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-Ta(-e):Ta(e);if(n!==e){var i=String(n),a=Gi.call(t,i.length+1);return ct.call(i,r,"$&_")+"."+ct.call(ct.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ct.call(t,r,"$&_")}var Ai=G.require$$3,Na=Ai.custom,Da=Pf(Na)?Na:null,Tf={__proto__:null,double:'"',single:"'"},Qu={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},en=function e(t,r,n,i){var a=r||{};if(nt(a,"quoteStyle")&&!nt(Tf,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(nt(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=nt(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(nt(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(nt(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=a.numericSeparator;if(typeof t>"u")return"undefined";if(t===null)return"null";if(typeof t=="boolean")return t?"true":"false";if(typeof t=="string")return Df(t,a);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var d=String(t);return f?Pa(t,d):d}if(typeof t=="bigint"){var l=String(t)+"n";return f?Pa(t,l):l}var u=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return Oi(t)?"[Array]":"[Object]";var w=gs(a,n);if(typeof i>"u")i=[];else if(Nf(i,t)>=0)return"[Circular]";function g(B,Q,ne){if(Q&&(i=Ju.call(i),i.push(Q)),ne){var ae={depth:a.depth};return nt(a,"quoteStyle")&&(ae.quoteStyle=a.quoteStyle),e(B,ae,n+1,i)}return e(B,a,n+1,i)}if(typeof t=="function"&&!La(t)){var S=ls(t),N=mr(t,g);return"[Function"+(S?": "+S:" (anonymous)")+"]"+(N.length>0?" { "+Je.call(N,", ")+" }":"")}if(Pf(t)){var F=qt?ct.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ri.call(t);return typeof t=="object"&&!qt?Kt(F):F}if(ps(t)){for(var j="<"+Aa.call(String(t.nodeName)),k=t.attributes||[],I=0;I<k.length;I++)j+=" "+k[I].name+"="+If(es(k[I].value),"double",a);return j+=">",t.childNodes&&t.childNodes.length&&(j+="..."),j+="</"+Aa.call(String(t.nodeName))+">",j}if(Oi(t)){if(t.length===0)return"[]";var R=mr(t,g);return w&&!vs(R)?"["+Ti(R,w)+"]":"[ "+Je.call(R,", ")+" ]"}if(rs(t)){var P=mr(t,g);return!("cause"in Error.prototype)&&"cause"in t&&!Of.call(t,"cause")?"{ ["+String(t)+"] "+Je.call(Oa.call("[cause]: "+g(t.cause),P),", ")+" }":P.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+Je.call(P,", ")+" }"}if(typeof t=="object"&&o){if(Da&&typeof t[Da]=="function"&&Ai)return Ai(t,{depth:u-n});if(o!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(us(t)){var T=[];return Ea&&Ea.call(t,function(B,Q){T.push(g(Q,t,!0)+" => "+g(B,t))}),Ma("Map",Ur.call(t),T,w)}if(hs(t)){var q=[];return Sa&&Sa.call(t,function(B){q.push(g(B,t))}),Ma("Set",qr.call(t),q,w)}if(ss(t))return On("WeakMap");if(ds(t))return On("WeakSet");if(cs(t))return On("WeakRef");if(is(t))return Kt(g(Number(t)));if(os(t))return Kt(g(Si.call(t)));if(as(t))return Kt(Gu.call(t));if(ns(t))return Kt(g(String(t)));if(typeof window<"u"&&t===window)return"{ [object Window] }";if(typeof globalThis<"u"&&t===globalThis||typeof G.commonjsGlobal<"u"&&t===G.commonjsGlobal)return"{ [object globalThis] }";if(!ts(t)&&!La(t)){var C=mr(t,g),z=Ia?Ia(t)===Object.prototype:t instanceof Object||t.constructor===Object,x=t instanceof Object?"":"null prototype",re=!z&&er&&Object(t)===t&&er in t?Gi.call(vt(t),8,-1):x?"Object":"",J=z||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",b=J+(re||x?"["+Je.call(Oa.call([],re||[],x||[]),": ")+"] ":"");return C.length===0?b+"{}":w?b+"{"+Ti(C,w)+"}":b+"{ "+Je.call(C,", ")+" }"}return String(t)};function If(e,t,r){var n=r.quoteStyle||t,i=Tf[n];return i+e+i}function es(e){return ct.call(String(e),/"/g,""")}function It(e){return!er||!(typeof e=="object"&&(er in e||typeof e[er]<"u"))}function Oi(e){return vt(e)==="[object Array]"&&It(e)}function ts(e){return vt(e)==="[object Date]"&&It(e)}function La(e){return vt(e)==="[object RegExp]"&&It(e)}function rs(e){return vt(e)==="[object Error]"&&It(e)}function ns(e){return vt(e)==="[object String]"&&It(e)}function is(e){return vt(e)==="[object Number]"&&It(e)}function as(e){return vt(e)==="[object Boolean]"&&It(e)}function Pf(e){if(qt)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Ri)return!1;try{return Ri.call(e),!0}catch{}return!1}function os(e){if(!e||typeof e!="object"||!Si)return!1;try{return Si.call(e),!0}catch{}return!1}var fs=Object.prototype.hasOwnProperty||function(e){return e in this};function nt(e,t){return fs.call(e,t)}function vt(e){return Vu.call(e)}function ls(e){if(e.name)return e.name;var t=Yu.call(Ku.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function Nf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function us(e){if(!Ur||!e||typeof e!="object")return!1;try{Ur.call(e);try{qr.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function ss(e){if(!Jt||!e||typeof e!="object")return!1;try{Jt.call(e,Jt);try{Qt.call(e,Qt)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function cs(e){if(!Ra||!e||typeof e!="object")return!1;try{return Ra.call(e),!0}catch{}return!1}function hs(e){if(!qr||!e||typeof e!="object")return!1;try{qr.call(e);try{Ur.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function ds(e){if(!Qt||!e||typeof e!="object")return!1;try{Qt.call(e,Qt);try{Jt.call(e,Jt)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function ps(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Df(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Df(Gi.call(e,0,t.maxStringLength),t)+n}var i=Qu[t.quoteStyle||"single"];i.lastIndex=0;var a=ct.call(ct.call(e,i,"\\$1"),/[\x00-\x1f]/g,ys);return If(a,"single",t)}function ys(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+Xu.call(t.toString(16))}function Kt(e){return"Object("+e+")"}function On(e){return e+" { ? }"}function Ma(e,t,r,n){var i=n?Ti(r,n):Je.call(r,", ");return e+" ("+t+") {"+i+"}"}function vs(e){for(var t=0;t<e.length;t++)if(Nf(e[t],`
|
|
2
2
|
`)>=0)return!1;return!0}function gs(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=Je.call(Array(e.indent+1)," ");else return null;return{base:r,prev:Je.call(Array(t+1),r)}}function Ti(e,t){if(e.length===0)return"";var r=`
|
|
3
3
|
`+t.prev+t.base;return r+Je.call(e,","+r)+`
|
|
4
4
|
`+t.prev}function mr(e,t){var r=Oi(e),n=[];if(r){n.length=e.length;for(var i=0;i<e.length;i++)n[i]=nt(e,i)?t(e[i],e):""}var a=typeof An=="function"?An(e):[],o;if(qt){o={};for(var f=0;f<a.length;f++)o["$"+a[f]]=a[f]}for(var d in e)nt(e,d)&&(r&&String(Number(d))===d&&d<e.length||qt&&o["$"+d]instanceof Symbol||(Af.call(/[^\w$]/,d)?n.push(t(d,e)+": "+t(e[d],e)):n.push(d+": "+t(e[d],e))));if(typeof An=="function")for(var l=0;l<a.length;l++)Of.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}var _s=en,bs=ot,tn=function(e,t,r){for(var n=e,i;(i=n.next)!=null;n=i)if(i.key===t)return n.next=i.next,r||(i.next=e.next,e.next=i),i},ms=function(e,t){if(e){var r=tn(e,t);return r&&r.value}},ws=function(e,t,r){var n=tn(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},Es=function(e,t){return e?!!tn(e,t):!1},Ss=function(e,t){if(e)return tn(e,t,!0)},Rs=function(){var t,r={assert:function(n){if(!r.has(n))throw new bs("Side channel does not contain "+_s(n))},delete:function(n){var i=t&&t.next,a=Ss(t,n);return a&&i&&i===a&&(t=void 0),!!a},get:function(n){return ms(t,n)},has:function(n){return Es(t,n)},set:function(n,i){t||(t={next:void 0}),ws(t,n,i)}};return r},Vi=Object,As=Error,Os=EvalError,Ts=RangeError,Is=ReferenceError,Lf=SyntaxError,Ps=URIError,Ns=Math.abs,Ds=Math.floor,Ls=Math.max,Ms=Math.min,ks=Math.pow,Fs=Math.round,js=Number.isNaN||function(t){return t!==t},xs=js,$s=function(t){return xs(t)||t===0?t:t<0?-1:1},Cs=Object.getOwnPropertyDescriptor,Ir=Cs;if(Ir)try{Ir([],"length")}catch{Ir=null}var Zt=Ir,Pr=Object.defineProperty||!1;if(Pr)try{Pr({},"a",{value:1})}catch{Pr=!1}var rn=Pr,Ki=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;t[r]=i;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(t,r);if(f.value!==i||f.enumerable!==!0)return!1}return!0},Tn,ka;function Bs(){if(ka)return Tn;ka=1;var e=typeof Symbol<"u"&&Symbol,t=Ki;return Tn=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Tn}var In,Fa;function Mf(){return Fa||(Fa=1,In=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),In}var Pn,ja;function kf(){if(ja)return Pn;ja=1;var e=Vi;return Pn=e.getPrototypeOf||null,Pn}var Nn,xa;function Us(){if(xa)return Nn;xa=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(d,l){for(var u=[],w=0;w<d.length;w+=1)u[w]=d[w];for(var g=0;g<l.length;g+=1)u[g+d.length]=l[g];return u},a=function(d,l){for(var u=[],w=l,g=0;w<d.length;w+=1,g+=1)u[g]=d[w];return u},o=function(f,d){for(var l="",u=0;u<f.length;u+=1)l+=f[u],u+1<f.length&&(l+=d);return l};return Nn=function(d){var l=this;if(typeof l!="function"||t.apply(l)!==n)throw new TypeError(e+l);for(var u=a(arguments,1),w,g=function(){if(this instanceof w){var k=l.apply(this,i(u,arguments));return Object(k)===k?k:this}return l.apply(d,i(u,arguments))},S=r(0,l.length-u.length),N=[],F=0;F<S;F++)N[F]="$"+F;if(w=Function("binder","return function ("+o(N,",")+"){ return binder.apply(this,arguments); }")(g),l.prototype){var j=function(){};j.prototype=l.prototype,w.prototype=new j,j.prototype=null}return w},Nn}var Dn,$a;function sr(){if($a)return Dn;$a=1;var e=Us();return Dn=Function.prototype.bind||e,Dn}var Ln,Ca;function Yi(){return Ca||(Ca=1,Ln=Function.prototype.call),Ln}var Mn,Ba;function Xi(){return Ba||(Ba=1,Mn=Function.prototype.apply),Mn}var qs=typeof Reflect<"u"&&Reflect&&Reflect.apply,zs=sr(),Zs=Xi(),Hs=Yi(),Ws=qs,Ff=Ws||zs.call(Hs,Zs),Gs=sr(),Vs=ot,Ks=Yi(),Ys=Ff,Ji=function(t){if(t.length<1||typeof t[0]!="function")throw new Vs("a function is required");return Ys(Gs,Ks,t)},kn,Ua;function Xs(){if(Ua)return kn;Ua=1;var e=Ji,t=Zt,r;try{r=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!r&&t&&t(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return kn=n&&typeof n.get=="function"?e([n.get]):typeof a=="function"?function(f){return a(f==null?f:i(f))}:!1,kn}var Fn,qa;function jf(){if(qa)return Fn;qa=1;var e=Mf(),t=kf(),r=Xs();return Fn=e?function(i){return e(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:r?function(i){return r(i)}:null,Fn}var jn,za;function xf(){if(za)return jn;za=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=sr();return jn=r.call(e,t),jn}var pe,Js=Vi,Qs=As,ec=Os,tc=Ts,rc=Is,zt=Lf,Ct=ot,nc=Ps,ic=Ns,ac=Ds,oc=Ls,fc=Ms,lc=ks,uc=Fs,sc=$s,$f=Function,xn=function(e){try{return $f('"use strict"; return ('+e+").constructor;")()}catch{}},ar=Zt,cc=rn,$n=function(){throw new Ct},hc=ar?function(){try{return arguments.callee,$n}catch{try{return ar(arguments,"callee").get}catch{return $n}}}():$n,Dt=Bs()(),Ie=jf(),dc=kf(),pc=Mf(),Cf=Xi(),cr=Yi(),jt={},yc=typeof Uint8Array>"u"||!Ie?pe:Ie(Uint8Array),Et={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?pe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?pe:ArrayBuffer,"%ArrayIteratorPrototype%":Dt&&Ie?Ie([][Symbol.iterator]()):pe,"%AsyncFromSyncIteratorPrototype%":pe,"%AsyncFunction%":jt,"%AsyncGenerator%":jt,"%AsyncGeneratorFunction%":jt,"%AsyncIteratorPrototype%":jt,"%Atomics%":typeof Atomics>"u"?pe:Atomics,"%BigInt%":typeof BigInt>"u"?pe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?pe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?pe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?pe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Qs,"%eval%":eval,"%EvalError%":ec,"%Float32Array%":typeof Float32Array>"u"?pe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?pe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?pe:FinalizationRegistry,"%Function%":$f,"%GeneratorFunction%":jt,"%Int8Array%":typeof Int8Array>"u"?pe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?pe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?pe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Dt&&Ie?Ie(Ie([][Symbol.iterator]())):pe,"%JSON%":typeof JSON=="object"?JSON:pe,"%Map%":typeof Map>"u"?pe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Dt||!Ie?pe:Ie(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Js,"%Object.getOwnPropertyDescriptor%":ar,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?pe:Promise,"%Proxy%":typeof Proxy>"u"?pe:Proxy,"%RangeError%":tc,"%ReferenceError%":rc,"%Reflect%":typeof Reflect>"u"?pe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?pe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Dt||!Ie?pe:Ie(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?pe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Dt&&Ie?Ie(""[Symbol.iterator]()):pe,"%Symbol%":Dt?Symbol:pe,"%SyntaxError%":zt,"%ThrowTypeError%":hc,"%TypedArray%":yc,"%TypeError%":Ct,"%Uint8Array%":typeof Uint8Array>"u"?pe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?pe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?pe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?pe:Uint32Array,"%URIError%":nc,"%WeakMap%":typeof WeakMap>"u"?pe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?pe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?pe:WeakSet,"%Function.prototype.call%":cr,"%Function.prototype.apply%":Cf,"%Object.defineProperty%":cc,"%Object.getPrototypeOf%":dc,"%Math.abs%":ic,"%Math.floor%":ac,"%Math.max%":oc,"%Math.min%":fc,"%Math.pow%":lc,"%Math.round%":uc,"%Math.sign%":sc,"%Reflect.getPrototypeOf%":pc};if(Ie)try{null.error}catch(e){var vc=Ie(Ie(e));Et["%Error.prototype%"]=vc}var gc=function e(t){var r;if(t==="%AsyncFunction%")r=xn("async function () {}");else if(t==="%GeneratorFunction%")r=xn("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=xn("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var i=e("%AsyncGenerator%");i&&Ie&&(r=Ie(i.prototype))}return Et[t]=r,r},Za={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},hr=sr(),zr=xf(),_c=hr.call(cr,Array.prototype.concat),bc=hr.call(Cf,Array.prototype.splice),Ha=hr.call(cr,String.prototype.replace),Zr=hr.call(cr,String.prototype.slice),mc=hr.call(cr,RegExp.prototype.exec),wc=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Ec=/\\(\\)?/g,Sc=function(t){var r=Zr(t,0,1),n=Zr(t,-1);if(r==="%"&&n!=="%")throw new zt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new zt("invalid intrinsic syntax, expected opening `%`");var i=[];return Ha(t,wc,function(a,o,f,d){i[i.length]=f?Ha(d,Ec,"$1"):o||a}),i},Rc=function(t,r){var n=t,i;if(zr(Za,n)&&(i=Za[n],n="%"+i[0]+"%"),zr(Et,n)){var a=Et[n];if(a===jt&&(a=gc(n)),typeof a>"u"&&!r)throw new Ct("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new zt("intrinsic "+t+" does not exist!")},dr=function(t,r){if(typeof t!="string"||t.length===0)throw new Ct("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ct('"allowMissing" argument must be a boolean');if(mc(/^%?[^%]*%?$/,t)===null)throw new zt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Sc(t),i=n.length>0?n[0]:"",a=Rc("%"+i+"%",r),o=a.name,f=a.value,d=!1,l=a.alias;l&&(i=l[0],bc(n,_c([0,1],l)));for(var u=1,w=!0;u<n.length;u+=1){var g=n[u],S=Zr(g,0,1),N=Zr(g,-1);if((S==='"'||S==="'"||S==="`"||N==='"'||N==="'"||N==="`")&&S!==N)throw new zt("property names with quotes must have matching quotes");if((g==="constructor"||!w)&&(d=!0),i+="."+g,o="%"+i+"%",zr(Et,o))f=Et[o];else if(f!=null){if(!(g in f)){if(!r)throw new Ct("base intrinsic for "+t+" exists, but the property is not available.");return}if(ar&&u+1>=n.length){var F=ar(f,g);w=!!F,w&&"get"in F&&!("originalValue"in F.get)?f=F.get:f=f[g]}else w=zr(f,g),f=f[g];w&&!d&&(Et[o]=f)}}return f},Bf=dr,Uf=Ji,Ac=Uf([Bf("%String.prototype.indexOf%")]),gt=function(t,r){var n=Bf(t,!!r);return typeof n=="function"&&Ac(t,".prototype.")>-1?Uf([n]):n},Oc=dr,pr=gt,Tc=en,Ic=ot,Wa=Oc("%Map%",!0),Pc=pr("Map.prototype.get",!0),Nc=pr("Map.prototype.set",!0),Dc=pr("Map.prototype.has",!0),Lc=pr("Map.prototype.delete",!0),Mc=pr("Map.prototype.size",!0),qf=!!Wa&&function(){var t,r={assert:function(n){if(!r.has(n))throw new Ic("Side channel does not contain "+Tc(n))},delete:function(n){if(t){var i=Lc(t,n);return Mc(t)===0&&(t=void 0),i}return!1},get:function(n){if(t)return Pc(t,n)},has:function(n){return t?Dc(t,n):!1},set:function(n,i){t||(t=new Wa),Nc(t,n,i)}};return r},kc=dr,nn=gt,Fc=en,wr=qf,jc=ot,Lt=kc("%WeakMap%",!0),xc=nn("WeakMap.prototype.get",!0),$c=nn("WeakMap.prototype.set",!0),Cc=nn("WeakMap.prototype.has",!0),Bc=nn("WeakMap.prototype.delete",!0),Uc=Lt?function(){var t,r,n={assert:function(i){if(!n.has(i))throw new jc("Side channel does not contain "+Fc(i))},delete:function(i){if(Lt&&i&&(typeof i=="object"||typeof i=="function")){if(t)return Bc(t,i)}else if(wr&&r)return r.delete(i);return!1},get:function(i){return Lt&&i&&(typeof i=="object"||typeof i=="function")&&t?xc(t,i):r&&r.get(i)},has:function(i){return Lt&&i&&(typeof i=="object"||typeof i=="function")&&t?Cc(t,i):!!r&&r.has(i)},set:function(i,a){Lt&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Lt),$c(t,i,a)):wr&&(r||(r=wr()),r.set(i,a))}};return n}:wr,qc=ot,zc=en,Zc=Rs,Hc=qf,Wc=Uc,Gc=Wc||Hc||Zc,Vc=function(){var t,r={assert:function(n){if(!r.has(n))throw new qc("Side channel does not contain "+zc(n))},delete:function(n){return!!t&&t.delete(n)},get:function(n){return t&&t.get(n)},has:function(n){return!!t&&t.has(n)},set:function(n,i){t||(t=Gc()),t.set(n,i)}};return r},Kc=String.prototype.replace,Yc=/%20/g,Cn={RFC1738:"RFC1738",RFC3986:"RFC3986"},Qi={default:Cn.RFC3986,formatters:{RFC1738:function(e){return Kc.call(e,Yc,"+")},RFC3986:function(e){return String(e)}},RFC1738:Cn.RFC1738,RFC3986:Cn.RFC3986},Xc=Qi,Bn=Object.prototype.hasOwnProperty,_t=Array.isArray,Ve=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Jc=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(_t(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);r.obj[r.prop]=i}}},zf=function(t,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},i=0;i<t.length;++i)typeof t[i]<"u"&&(n[i]=t[i]);return n},Qc=function e(t,r,n){if(!r)return t;if(typeof r!="object"&&typeof r!="function"){if(_t(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Bn.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var i=t;return _t(t)&&!_t(r)&&(i=zf(t,n)),_t(t)&&_t(r)?(r.forEach(function(a,o){if(Bn.call(t,o)){var f=t[o];f&&typeof f=="object"&&a&&typeof a=="object"?t[o]=e(f,a,n):t.push(a)}else t[o]=a}),t):Object.keys(r).reduce(function(a,o){var f=r[o];return Bn.call(a,o)?a[o]=e(a[o],f,n):a[o]=f,a},i)},eh=function(t,r){return Object.keys(r).reduce(function(n,i){return n[i]=r[i],n},t)},th=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Un=1024,rh=function(t,r,n,i,a){if(t.length===0)return t;var o=t;if(typeof t=="symbol"?o=Symbol.prototype.toString.call(t):typeof t!="string"&&(o=String(t)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(S){return"%26%23"+parseInt(S.slice(2),16)+"%3B"});for(var f="",d=0;d<o.length;d+=Un){for(var l=o.length>=Un?o.slice(d,d+Un):o,u=[],w=0;w<l.length;++w){var g=l.charCodeAt(w);if(g===45||g===46||g===95||g===126||g>=48&&g<=57||g>=65&&g<=90||g>=97&&g<=122||a===Xc.RFC1738&&(g===40||g===41)){u[u.length]=l.charAt(w);continue}if(g<128){u[u.length]=Ve[g];continue}if(g<2048){u[u.length]=Ve[192|g>>6]+Ve[128|g&63];continue}if(g<55296||g>=57344){u[u.length]=Ve[224|g>>12]+Ve[128|g>>6&63]+Ve[128|g&63];continue}w+=1,g=65536+((g&1023)<<10|l.charCodeAt(w)&1023),u[u.length]=Ve[240|g>>18]+Ve[128|g>>12&63]+Ve[128|g>>6&63]+Ve[128|g&63]}f+=u.join("")}return f},nh=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],i=0;i<r.length;++i)for(var a=r[i],o=a.obj[a.prop],f=Object.keys(o),d=0;d<f.length;++d){var l=f[d],u=o[l];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(r.push({obj:o,prop:l}),n.push(u))}return Jc(r),t},ih=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ah=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},oh=function(t,r){return[].concat(t,r)},fh=function(t,r){if(_t(t)){for(var n=[],i=0;i<t.length;i+=1)n.push(r(t[i]));return n}return r(t)},Zf={arrayToObject:zf,assign:eh,combine:oh,compact:nh,decode:th,encode:rh,isBuffer:ah,isRegExp:ih,maybeMap:fh,merge:Qc},Hf=Vc,Nr=Zf,tr=Qi,lh=Object.prototype.hasOwnProperty,Wf={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Xe=Array.isArray,uh=Array.prototype.push,Gf=function(e,t){uh.apply(e,Xe(t)?t:[t])},sh=Date.prototype.toISOString,Ga=tr.default,Ae={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Nr.encode,encodeValuesOnly:!1,filter:void 0,format:Ga,formatter:tr.formatters[Ga],indices:!1,serializeDate:function(t){return sh.call(t)},skipNulls:!1,strictNullHandling:!1},ch=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},qn={},hh=function e(t,r,n,i,a,o,f,d,l,u,w,g,S,N,F,j,k,I){for(var R=t,P=I,T=0,q=!1;(P=P.get(qn))!==void 0&&!q;){var C=P.get(t);if(T+=1,typeof C<"u"){if(C===T)throw new RangeError("Cyclic object value");q=!0}typeof P.get(qn)>"u"&&(T=0)}if(typeof u=="function"?R=u(r,R):R instanceof Date?R=S(R):n==="comma"&&Xe(R)&&(R=Nr.maybeMap(R,function(D){return D instanceof Date?S(D):D})),R===null){if(o)return l&&!j?l(r,Ae.encoder,k,"key",N):r;R=""}if(ch(R)||Nr.isBuffer(R)){if(l){var z=j?r:l(r,Ae.encoder,k,"key",N);return[F(z)+"="+F(l(R,Ae.encoder,k,"value",N))]}return[F(r)+"="+F(String(R))]}var x=[];if(typeof R>"u")return x;var re;if(n==="comma"&&Xe(R))j&&l&&(R=Nr.maybeMap(R,l)),re=[{value:R.length>0?R.join(",")||null:void 0}];else if(Xe(u))re=u;else{var J=Object.keys(R);re=w?J.sort(w):J}var b=d?String(r).replace(/\./g,"%2E"):String(r),B=i&&Xe(R)&&R.length===1?b+"[]":b;if(a&&Xe(R)&&R.length===0)return B+"[]";for(var Q=0;Q<re.length;++Q){var ne=re[Q],ae=typeof ne=="object"&&ne&&typeof ne.value<"u"?ne.value:R[ne];if(!(f&&ae===null)){var ue=g&&d?String(ne).replace(/\./g,"%2E"):String(ne),ie=Xe(R)?typeof n=="function"?n(B,ue):B:B+(g?"."+ue:"["+ue+"]");I.set(t,T);var Z=Hf();Z.set(qn,I),Gf(x,e(ae,ie,n,i,a,o,f,d,n==="comma"&&j&&Xe(R)?null:l,u,w,g,S,N,F,j,k,Z))}}return x},dh=function(t){if(!t)return Ae;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.encodeDotInKeys<"u"&&typeof t.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Ae.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=tr.default;if(typeof t.format<"u"){if(!lh.call(tr.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var i=tr.formatters[n],a=Ae.filter;(typeof t.filter=="function"||Xe(t.filter))&&(a=t.filter);var o;if(t.arrayFormat in Wf?o=t.arrayFormat:"indices"in t?o=t.indices?"indices":"repeat":o=Ae.arrayFormat,"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var f=typeof t.allowDots>"u"?t.encodeDotInKeys===!0?!0:Ae.allowDots:!!t.allowDots;return{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Ae.addQueryPrefix,allowDots:f,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Ae.allowEmptyArrays,arrayFormat:o,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Ae.charsetSentinel,commaRoundTrip:!!t.commaRoundTrip,delimiter:typeof t.delimiter>"u"?Ae.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Ae.encode,encodeDotInKeys:typeof t.encodeDotInKeys=="boolean"?t.encodeDotInKeys:Ae.encodeDotInKeys,encoder:typeof t.encoder=="function"?t.encoder:Ae.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Ae.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Ae.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Ae.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Ae.strictNullHandling}},ph=function(e,t){var r=e,n=dh(t),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):Xe(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof r!="object"||r===null)return"";var f=Wf[n.arrayFormat],d=f==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var l=Hf(),u=0;u<i.length;++u){var w=i[u],g=r[w];n.skipNulls&&g===null||Gf(o,hh(g,w,f,d,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var S=o.join(n.delimiter),N=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?N+="utf8=%26%2310003%3B&":N+="utf8=%E2%9C%93&"),S.length>0?N+S:""},St=Zf,Ii=Object.prototype.hasOwnProperty,Va=Array.isArray,Se={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:St.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},yh=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},Vf=function(e,t,r){if(e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1)return e.split(",");if(t.throwOnLimitExceeded&&r>=t.arrayLimit)throw new RangeError("Array limit exceeded. Only "+t.arrayLimit+" element"+(t.arrayLimit===1?"":"s")+" allowed in an array.");return e},vh="utf8=%26%2310003%3B",gh="utf8=%E2%9C%93",_h=function(t,r){var n={__proto__:null},i=r.ignoreQueryPrefix?t.replace(/^\?/,""):t;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=r.parameterLimit===1/0?void 0:r.parameterLimit,o=i.split(r.delimiter,r.throwOnLimitExceeded?a+1:a);if(r.throwOnLimitExceeded&&o.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var f=-1,d,l=r.charset;if(r.charsetSentinel)for(d=0;d<o.length;++d)o[d].indexOf("utf8=")===0&&(o[d]===gh?l="utf-8":o[d]===vh&&(l="iso-8859-1"),f=d,d=o.length);for(d=0;d<o.length;++d)if(d!==f){var u=o[d],w=u.indexOf("]="),g=w===-1?u.indexOf("="):w+1,S,N;g===-1?(S=r.decoder(u,Se.decoder,l,"key"),N=r.strictNullHandling?null:""):(S=r.decoder(u.slice(0,g),Se.decoder,l,"key"),N=St.maybeMap(Vf(u.slice(g+1),r,Va(n[S])?n[S].length:0),function(j){return r.decoder(j,Se.decoder,l,"value")})),N&&r.interpretNumericEntities&&l==="iso-8859-1"&&(N=yh(String(N))),u.indexOf("[]=")>-1&&(N=Va(N)?[N]:N);var F=Ii.call(n,S);F&&r.duplicates==="combine"?n[S]=St.combine(n[S],N):(!F||r.duplicates==="last")&&(n[S]=N)}return n},bh=function(e,t,r,n){var i=0;if(e.length>0&&e[e.length-1]==="[]"){var a=e.slice(0,-1).join("");i=Array.isArray(t)&&t[a]?t[a].length:0}for(var o=n?t:Vf(t,r,i),f=e.length-1;f>=0;--f){var d,l=e[f];if(l==="[]"&&r.parseArrays)d=r.allowEmptyArrays&&(o===""||r.strictNullHandling&&o===null)?[]:St.combine([],o);else{d=r.plainObjects?{__proto__:null}:{};var u=l.charAt(0)==="["&&l.charAt(l.length-1)==="]"?l.slice(1,-1):l,w=r.decodeDotInKeys?u.replace(/%2E/g,"."):u,g=parseInt(w,10);!r.parseArrays&&w===""?d={0:o}:!isNaN(g)&&l!==w&&String(g)===w&&g>=0&&r.parseArrays&&g<=r.arrayLimit?(d=[],d[g]=o):w!=="__proto__"&&(d[w]=o)}o=d}return o},mh=function(t,r,n,i){if(t){var a=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,o=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,d=n.depth>0&&o.exec(a),l=d?a.slice(0,d.index):a,u=[];if(l){if(!n.plainObjects&&Ii.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var w=0;n.depth>0&&(d=f.exec(a))!==null&&w<n.depth;){if(w+=1,!n.plainObjects&&Ii.call(Object.prototype,d[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(d[1])}if(d){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");u.push("["+a.slice(d.index)+"]")}return bh(u,r,n,i)}},wh=function(t){if(!t)return Se;if(typeof t.allowEmptyArrays<"u"&&typeof t.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof t.decodeDotInKeys<"u"&&typeof t.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(t.decoder!==null&&typeof t.decoder<"u"&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof t.throwOnLimitExceeded<"u"&&typeof t.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof t.charset>"u"?Se.charset:t.charset,n=typeof t.duplicates>"u"?Se.duplicates:t.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof t.allowDots>"u"?t.decodeDotInKeys===!0?!0:Se.allowDots:!!t.allowDots;return{allowDots:i,allowEmptyArrays:typeof t.allowEmptyArrays=="boolean"?!!t.allowEmptyArrays:Se.allowEmptyArrays,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Se.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Se.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Se.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Se.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Se.comma,decodeDotInKeys:typeof t.decodeDotInKeys=="boolean"?t.decodeDotInKeys:Se.decodeDotInKeys,decoder:typeof t.decoder=="function"?t.decoder:Se.decoder,delimiter:typeof t.delimiter=="string"||St.isRegExp(t.delimiter)?t.delimiter:Se.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Se.depth,duplicates:n,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Se.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Se.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Se.plainObjects,strictDepth:typeof t.strictDepth=="boolean"?!!t.strictDepth:Se.strictDepth,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Se.strictNullHandling,throwOnLimitExceeded:typeof t.throwOnLimitExceeded=="boolean"?t.throwOnLimitExceeded:!1}},Eh=function(e,t){var r=wh(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?{__proto__:null}:{};for(var n=typeof e=="string"?_h(e,r):e,i=r.plainObjects?{__proto__:null}:{},a=Object.keys(n),o=0;o<a.length;++o){var f=a[o],d=mh(f,n[f],r,typeof e=="string");i=St.merge(i,d,r)}return r.allowSparse===!0?i:St.compact(i)},Sh=ph,Rh=Eh,Ah=Qi,Oh={formats:Ah,parse:Rh,stringify:Sh};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=Rf,n=Oh;function i(L){return L&&typeof L=="object"&&"default"in L?L:{default:L}}var a=i(r),o=i(n),f=a.default;function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var l=/^([a-z0-9.+-]+:)/i,u=/:[0-9]*$/,w=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,g=["<",">",'"',"`"," ","\r",`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Pt = Object.defineProperty;
|
|
2
2
|
var _t = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var f = (e, t, r) => _t(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { P as c, d as l, bC as A, T as le, bG as z, bF as U, bH as G, bE as S, bD as V, cv as Ge, cw as He, cx as Wt, cy as It, cz as Ut, cA as Nt, cq as O, cd as E, bK as y, cB as T, cC as Ft, cD as ye, c6 as dt, cE as xt, ce as lt, cf as zt, cF as Ot, cG as Q, cH as Lt, ct as H, cu as Z, cI as Dt, cr as qt, cJ as Kt, cK as Vt, cL as Se, cM as Gt, ch as v, cs as Ht, ad as oe, ae as k, c5 as Ce, bR as Zt, am as $, cb as Be, cN as Yt, cO as Qt, K as se, a$ as L, cP as Xt, ci as ft, bW as mt, af as gt } from "./index-
|
|
4
|
+
import { P as c, d as l, bC as A, T as le, bG as z, bF as U, bH as G, bE as S, bD as V, cv as Ge, cw as He, cx as Wt, cy as It, cz as Ut, cA as Nt, cq as O, cd as E, bK as y, cB as T, cC as Ft, cD as ye, c6 as dt, cE as xt, ce as lt, cf as zt, cF as Ot, cG as Q, cH as Lt, ct as H, cu as Z, cI as Dt, cr as qt, cJ as Kt, cK as Vt, cL as Se, cM as Gt, ch as v, cs as Ht, ad as oe, ae as k, c5 as Ce, bR as Zt, am as $, cb as Be, cN as Yt, cO as Qt, K as se, a$ as L, cP as Xt, ci as ft, bW as mt, af as gt } from "./index-C_jwGx2-.mjs";
|
|
5
5
|
const M = new c("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
|
|
6
6
|
new c("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
|
|
7
7
|
const Ae = new c("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"), D = new c("So11111111111111111111111111111111111111112");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var h=Object.defineProperty;var m=(a,e,r)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r;var o=(a,e,r)=>m(a,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-
|
|
1
|
+
"use strict";var h=Object.defineProperty;var m=(a,e,r)=>e in a?h(a,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):a[e]=r;var o=(a,e,r)=>m(a,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./index-Byf4HvjQ.js");class d{constructor(e,r,t,n){o(this,"network");o(this,"chain");o(this,"provider");o(this,"contracts");o(this,"chainId");o(this,"coreBridgePackageId");this.network=e,this.chain=r,this.provider=t,this.contracts=n,this.chainId=c.toChainId(r);const s=n.coreBridge;if(!s)throw new Error(`CoreBridge contract Address for chain ${r} not found`);this.coreBridgePackageId=s}getGuardianSet(e){throw new Error("Method not implemented.")}getMessageFee(){throw new Error("Method not implemented.")}static async fromRpc(e,r){const[t,n]=await c.SuiPlatform.chainFromRpc(e),s=r[n];if(s.network!==t)throw new Error(`Network mismatch: ${s.network} !== ${t}`);return new d(t,n,e,s.contracts)}async*verifyMessage(e,r){throw new Error("Method not implemented.")}async*publishMessage(e,r){throw new Error("Method not implemented.")}async parseTransaction(e){return(await this.parseMessages(e)).map(t=>({emitter:t.emitterAddress,sequence:t.sequence,chain:this.chain}))}async getGuardianSetIndex(){throw new Error("Method not implemented.")}async parseMessages(e){var n;const t=(n=(await this.provider.getTransactionBlock({digest:e,options:{showEvents:!0,showEffects:!0,showInput:!0}})).events)==null?void 0:n.filter(s=>s.type.endsWith("WormholeMessage"));if(!t||t.length==0)throw new Error("WormholeMessage not found");return t.map(s=>{const i=s.parsedJson;return c.createVAA("Uint8Array",{emitterChain:this.chain,emitterAddress:new c.SuiAddress(i.sender).toUniversalAddress(),sequence:BigInt(i.sequence),guardianSet:0,timestamp:Number(i.timestamp),consistencyLevel:i.consistency_level,nonce:i.nonce,signatures:[],payload:new Uint8Array(i.payload)})})}}c.registerProtocol("Sui","WormholeCore",d);exports.SuiWormholeCore=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./index-
|
|
1
|
+
"use strict";const e=require("./index-Byf4HvjQ.js");function I(n,t,o,s){e.ahash(n);const a=e.checkOpts$1({dkLen:32,asyncTick:10},s),{c:d,dkLen:i,asyncTick:r}=a;if(e.anumber(d),e.anumber(i),e.anumber(r),d<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const l=e.toBytes(t),u=e.toBytes(o),f=new Uint8Array(i),p=e.hmac.create(n,l),c=p._cloneInto().update(u);return{c:d,dkLen:i,asyncTick:r,DK:f,PRF:p,PRFSalt:c}}function L(n,t,o,s,a){return n.destroy(),t.destroy(),s&&s.destroy(),a.fill(0),o}function g(n,t,o,s){const{c:a,dkLen:d,DK:i,PRF:r,PRFSalt:l}=I(n,t,o,s);let u;const f=new Uint8Array(4),p=e.createView(f),c=new Uint8Array(r.outputLen);for(let w=1,y=0;y<d;w++,y+=r.outputLen){const m=i.subarray(y,y+r.outputLen);p.setInt32(0,w,!1),(u=l._cloneInto(u)).update(f).digestInto(c),m.set(c.subarray(0,m.length));for(let h=1;h<a;h++){r._cloneInto(u).update(c).digestInto(c);for(let k=0;k<m.length;k++)m[k]^=c[k]}}return L(r,l,i,u,c)}/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */function b(n){if(typeof n!="string")throw new TypeError("invalid mnemonic type: "+typeof n);return n.normalize("NFKD")}function F(n){const t=b(n),o=t.split(" ");if(![12,15,18,21,24].includes(o.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:o}}const S=n=>b("mnemonic"+n);function T(n,t=""){return g(e.sha512,F(n).nfkd,S(t),{c:2048,dkLen:64})}exports.mnemonicToSeedSync=T;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var A = Object.defineProperty;
|
|
2
2
|
var B = (d, e, s) => e in d ? A(d, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[e] = s;
|
|
3
3
|
var o = (d, e, s) => B(d, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
-
import { N as g, l as p, O as w, P as u } from "./chunk-IMTC3J2M-
|
|
5
|
-
import { cX as S, c1 as I, b$ as U, c8 as D,
|
|
6
|
-
import { A as $ } from "./aptos-
|
|
4
|
+
import { N as g, l as p, O as w, P as u } from "./chunk-IMTC3J2M-C55Jso7e.mjs";
|
|
5
|
+
import { cX as S, c1 as I, b$ as U, c8 as D, ap as f, c0 as l, c2 as T, bW as R } from "./index-C_jwGx2-.mjs";
|
|
6
|
+
import { A as $ } from "./aptos-C_FrT7AS.mjs";
|
|
7
7
|
import { A as E } from "./unsignedTransaction-BDOQhqcZ.mjs";
|
|
8
8
|
const N = [
|
|
9
9
|
[
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { dr as He, dt as Wl, d as R, g as sa, b as Hl, aI as oa, ch as L, du as Ye, ds as aa, P as Jl, a$ as Gl } from "./index-
|
|
1
|
+
import { dr as He, dt as Wl, d as R, g as sa, b as Hl, aI as oa, ch as L, du as Ye, ds as aa, P as Jl, a$ as Gl } from "./index-C_jwGx2-.mjs";
|
|
2
2
|
import { d as Yl } from "./dijkstra-BZM-8g-B.mjs";
|
|
3
|
-
import { c as I } from "./index-
|
|
4
|
-
import { r as Ql, a as It, g as xt, i as qe, b as ni, I as Rt, f as Ce, t as fe, w as Hi, c as Si, C as Xl, d as Zl, e as ns, h as eu, j as tu, k as vn, p as ru, l as wn, A as iu, E as pe, m as nu, y as be, P as ss, Q as su, n as ou, T as ca, o as _n, q as bn, s as Qe, _ as au, u as vt } from "./index-
|
|
5
|
-
import { s as la, a as Re, h as ua, L as cu, d as nr, l as lu, e as Ii, g as uu, i as os, k as hu } from "./index-
|
|
3
|
+
import { c as I } from "./index-BPe5meha.mjs";
|
|
4
|
+
import { r as Ql, a as It, g as xt, i as qe, b as ni, I as Rt, f as Ce, t as fe, w as Hi, c as Si, C as Xl, d as Zl, e as ns, h as eu, j as tu, k as vn, p as ru, l as wn, A as iu, E as pe, m as nu, y as be, P as ss, Q as su, n as ou, T as ca, o as _n, q as bn, s as Qe, _ as au, u as vt } from "./index-Cc13Eu8K.mjs";
|
|
5
|
+
import { s as la, a as Re, h as ua, L as cu, d as nr, l as lu, e as Ii, g as uu, i as os, k as hu } from "./index-uC7wsV3k.mjs";
|
|
6
6
|
let du = class extends Ql {
|
|
7
7
|
constructor(e) {
|
|
8
8
|
super(e), this.events = new He.EventEmitter(), this.hasRegisteredEventListeners = !1, this.connection = this.setConnection(e), this.connection.connected && this.registerEventListeners();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var d = Object.defineProperty;
|
|
2
2
|
var h = (i, e, r) => e in i ? d(i, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[e] = r;
|
|
3
3
|
var o = (i, e, r) => h(i, typeof e != "symbol" ? e + "" : e, r);
|
|
4
|
-
import { bK as m, aD as w, cQ as g, aF as p, bW as u } from "./index-
|
|
4
|
+
import { bK as m, aD as w, cQ as g, aF as p, bW as u } from "./index-C_jwGx2-.mjs";
|
|
5
5
|
class c {
|
|
6
6
|
constructor(e, r, t, n) {
|
|
7
7
|
o(this, "network");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const me=Symbol(),se=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):se(e)===Object.prototype||se(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,ne=(e,t=!0)=>{G.set(e,t)},H={},F=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>F(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const v=l.get(n);if((v==null?void 0:v[0])===g)return v[1];const w=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return ne(w,!0),l.set(n,[g,w]),Reflect.ownKeys(n).forEach(k=>{if(Object.getOwnPropertyDescriptor(w,k))return;const O=Reflect.get(n,k),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))ne(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,q]=A.get(O);M.value=c(b,q(),I)}Object.defineProperty(w,k,M)}),Object.preventExtensions(w)},m=new WeakMap,p=[1,1],E=n=>{if(!F(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=p[0];const v=new Set,w=(i,a=++p[0])=>{I!==a&&(I=a,v.forEach(o=>o(i,a)))};let k=p[1];const O=(i=++p[1])=>(k!==i&&!v.size&&(k=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],w(h,o)},b=new Map,q=(i,a)=>{if((H?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(v.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},te=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},fe=i=>(v.add(i),v.size===1&&b.forEach(([o,h],_)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(_));b.set(_,[o,T])}),()=>{v.delete(i),v.size===0&&b.forEach(([o,h],_)=>{h&&(h(),b.set(_,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);te(a);const h=Reflect.deleteProperty(i,a);return h&&w(["delete",[a],o]),h},set(i,a,o,h){const _=Reflect.has(i,a),T=Reflect.get(i,a,h);if(_&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;te(a),F(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,w(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,w(["reject",[a],C])});else{!A.has(o)&&s(o)&&(V=E(o));const C=!x.has(V)&&A.get(V);C&&q(a,C)}return Reflect.set(i,a,V,h),w(["set",[a],o,T]),!0}});m.set(n,$);const pe=[J,O,c,fe];return A.set($,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&($[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),$})=>[E,A,x,e,t,s,r,l,c,m,p],[ye]=be();function j(e={}){return ye(e)}function D(e,t,s){const r=A.get(e);(H?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let p=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,p&&t(c.splice(0))}))});return p=!0,()=>{p=!1,n()}}function ve(e,t){const s=A.get(e);(H?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ee={state:d,subscribe(e){return D(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},u={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return u.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return u.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(u.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!u.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(u.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(u.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ee.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),f=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),ue={state:f,subscribe(e){return D(f.events,()=>e(ve(f.events[f.events.length-1])))},initialize(){f.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(f.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){f.connectedWalletId=e},click(e){if(f.enabled){const t={type:"CLICK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},track(e){if(f.enabled){const t={type:"TRACK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},view(e){if(f.enabled){const t={type:"VIEW",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:L,subscribe(e){return D(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),S={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;ue.initialize(),y.setChains(e.chains),y.setIsAuth(!!e.enableAuthMode),y.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),y.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),u.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,oe=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Oe=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))We.call(t,s)&&re(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=Oe({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",S.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ee=Object.defineProperty,ae=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,je=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Ae.call(t,s)&&ie(e,s,t[s]);return e};const le=u.isMobile(),W=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Me={state:W,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=S.state;if(e==="NONE"||t==="ALL"&&!e)return W.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const p=e.indexOf(c.id),E=e.indexOf(m.id);return p-E}),W.recomendedWallets=l}else{const{chains:s,isAuth:r}=y.state,l=s==null?void 0:s.join(","),c=u.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:u.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:p}=le?await U.getMobileListings(m):await U.getDesktopListings(m);W.recomendedWallets=Object.values(p)}return W.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=S.state,{recomendedWallets:l}=W;if(r==="ALL")return W.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):u.isArray(s)&&(t.excludedIds=s.join(",")),u.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),y.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:p,total:E}=le?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(p),g=m?"search":"wallets";return W[g]={listings:[...W[g].listings,...n],total:E,page:c??1},{listings:n,total:E}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){W.search={listings:[],total:0,page:1}}},N=j({open:!1}),z={state:N,subscribe(e){return D(N,()=>e(N))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=y.state;if(u.removeWalletConnectDeepLink(),y.setWalletConnectUri(e==null?void 0:e.uri),y.setChains(e==null?void 0:e.chains),ee.reset("ConnectWallet"),s&&r)N.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),N.open=!0,t())},200)}})},close(){N.open=!1}};var Ue=Object.defineProperty,ce=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Se.call(t,s)&&de(e,s,t[s]);return e};function ke(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:ke()?"dark":"light"}),Z={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},P=j({open:!1,message:"",variant:"success"}),_e={state:P,subscribe(e){return D(P,()=>e(P))},openToast(e,t){P.open=!0,P.message=e,P.variant=t},closeToast(){P.open=!1}};class Ne{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),S.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-BQqU6Wly.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Te=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Ne},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Te;exports.ne=Z;exports.oe=_e;exports.p=y;exports.se=z;exports.te=Me;exports.y=S;
|
|
1
|
+
"use strict";const me=Symbol(),se=Object.getPrototypeOf,G=new WeakMap,he=e=>e&&(G.has(e)?G.get(e):se(e)===Object.prototype||se(e)===Array.prototype),ge=e=>he(e)&&e[me]||null,ne=(e,t=!0)=>{G.set(e,t)},H={},F=e=>typeof e=="object"&&e!==null,A=new WeakMap,x=new WeakSet,be=(e=Object.is,t=(n,g)=>new Proxy(n,g),s=n=>F(n)&&!x.has(n)&&(Array.isArray(n)||!(Symbol.iterator in n))&&!(n instanceof WeakMap)&&!(n instanceof WeakSet)&&!(n instanceof Error)&&!(n instanceof Number)&&!(n instanceof Date)&&!(n instanceof String)&&!(n instanceof RegExp)&&!(n instanceof ArrayBuffer),r=n=>{switch(n.status){case"fulfilled":return n.value;case"rejected":throw n.reason;default:throw n}},l=new WeakMap,c=(n,g,I=r)=>{const v=l.get(n);if((v==null?void 0:v[0])===g)return v[1];const w=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n));return ne(w,!0),l.set(n,[g,w]),Reflect.ownKeys(n).forEach(k=>{if(Object.getOwnPropertyDescriptor(w,k))return;const O=Reflect.get(n,k),M={value:O,enumerable:!0,configurable:!0};if(x.has(O))ne(O,!1);else if(O instanceof Promise)delete M.value,M.get=()=>I(O);else if(A.has(O)){const[b,q]=A.get(O);M.value=c(b,q(),I)}Object.defineProperty(w,k,M)}),Object.preventExtensions(w)},m=new WeakMap,p=[1,1],E=n=>{if(!F(n))throw new Error("object required");const g=m.get(n);if(g)return g;let I=p[0];const v=new Set,w=(i,a=++p[0])=>{I!==a&&(I=a,v.forEach(o=>o(i,a)))};let k=p[1];const O=(i=++p[1])=>(k!==i&&!v.size&&(k=i,b.forEach(([a])=>{const o=a[1](i);o>I&&(I=o)})),I),M=i=>(a,o)=>{const h=[...a];h[1]=[i,...h[1]],w(h,o)},b=new Map,q=(i,a)=>{if((H?"production":void 0)!=="production"&&b.has(i))throw new Error("prop listener already exists");if(v.size){const o=a[3](M(i));b.set(i,[a,o])}else b.set(i,[a])},te=i=>{var a;const o=b.get(i);o&&(b.delete(i),(a=o[1])==null||a.call(o))},fe=i=>(v.add(i),v.size===1&&b.forEach(([o,h],_)=>{if((H?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const T=o[3](M(_));b.set(_,[o,T])}),()=>{v.delete(i),v.size===0&&b.forEach(([o,h],_)=>{h&&(h(),b.set(_,[o]))})}),J=Array.isArray(n)?[]:Object.create(Object.getPrototypeOf(n)),$=t(J,{deleteProperty(i,a){const o=Reflect.get(i,a);te(a);const h=Reflect.deleteProperty(i,a);return h&&w(["delete",[a],o]),h},set(i,a,o,h){const _=Reflect.has(i,a),T=Reflect.get(i,a,h);if(_&&(e(T,o)||m.has(o)&&e(T,m.get(o))))return!0;te(a),F(o)&&(o=ge(o)||o);let V=o;if(o instanceof Promise)o.then(C=>{o.status="fulfilled",o.value=C,w(["resolve",[a],C])}).catch(C=>{o.status="rejected",o.reason=C,w(["reject",[a],C])});else{!A.has(o)&&s(o)&&(V=E(o));const C=!x.has(V)&&A.get(V);C&&q(a,C)}return Reflect.set(i,a,V,h),w(["set",[a],o,T]),!0}});m.set(n,$);const pe=[J,O,c,fe];return A.set($,pe),Reflect.ownKeys(n).forEach(i=>{const a=Object.getOwnPropertyDescriptor(n,i);"value"in a&&($[i]=n[i],delete a.value,delete a.writable),Object.defineProperty(J,i,a)}),$})=>[E,A,x,e,t,s,r,l,c,m,p],[ye]=be();function j(e={}){return ye(e)}function D(e,t,s){const r=A.get(e);(H?"production":void 0)!=="production"&&!r&&console.warn("Please use proxy object");let l;const c=[],m=r[3];let p=!1;const n=m(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,p&&t(c.splice(0))}))});return p=!0,()=>{p=!1,n()}}function ve(e,t){const s=A.get(e);(H?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[r,l,c]=s;return c(r,l(),t)}const d=j({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),ee={state:d,subscribe(e){return D(d,()=>e(d))},push(e,t){e!==d.view&&(d.view=e,t&&(d.data=t),d.history.push(e))},reset(e){d.view=e,d.history=[e]},replace(e){d.history.length>1&&(d.history[d.history.length-1]=e,d.view=e)},goBack(){if(d.history.length>1){d.history.pop();const[e]=d.history.slice(-1);d.view=e}},setData(e){d.data=e}},u={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return u.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return u.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},formatNativeUrl(e,t,s){if(u.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let r=e;r.includes("://")||(r=e.replaceAll("/","").replaceAll(":",""),r=`${r}://`),r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!u.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let r=e;r.endsWith("/")||(r=`${r}/`),this.setWalletConnectDeepLink(r,s);const l=encodeURIComponent(t);return`${r}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){window.open(e,t,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(u.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(u.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(u.WCM_VERSION,"2.6.2")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=ee.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},we=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),f=j({enabled:we,userSessionId:"",events:[],connectedWalletId:void 0}),ue={state:f,subscribe(e){return D(f.events,()=>e(ve(f.events[f.events.length-1])))},initialize(){f.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(f.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){f.connectedWalletId=e},click(e){if(f.enabled){const t={type:"CLICK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},track(e){if(f.enabled){const t={type:"TRACK",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}},view(e){if(f.enabled){const t={type:"VIEW",name:e.name,userSessionId:f.userSessionId,timestamp:Date.now(),data:e};f.events.push(t)}}},L=j({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),y={state:L,subscribe(e){return D(L,()=>e(L))},setChains(e){L.chains=e},setWalletConnectUri(e){L.walletConnectUri=e},setIsCustomDesktop(e){L.isCustomDesktop=e},setIsCustomMobile(e){L.isCustomMobile=e},setIsDataLoaded(e){L.isDataLoaded=e},setIsUiLoaded(e){L.isUiLoaded=e},setIsAuth(e){L.isAuth=e}},B=j({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),S={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;ue.initialize(),y.setChains(e.chains),y.setIsAuth(!!e.enableAuthMode),y.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),y.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),u.setModalVersionInStorage(),Object.assign(B,e)}};var Ie=Object.defineProperty,oe=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Oe=(e,t)=>{for(var s in t||(t={}))Le.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))We.call(t,s)&&re(e,s,t[s]);return e};const Q="https://explorer-api.walletconnect.com",X="wcm",Y="js-2.6.2";async function K(e,t){const s=Oe({sdkType:X,sdkVersion:Y},t),r=new URL(e,Q);return r.searchParams.append("projectId",S.state.projectId),Object.entries(s).forEach(([l,c])=>{c&&r.searchParams.append(l,String(c))}),(await fetch(r)).json()}const U={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${Q}/w3m/v1/getWalletImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`},getAssetImageUrl(e){return`${Q}/w3m/v1/getAssetImage/${e}?projectId=${S.state.projectId}&sdkType=${X}&sdkVersion=${Y}`}};var Ee=Object.defineProperty,ae=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ie=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,je=(e,t)=>{for(var s in t||(t={}))Ce.call(t,s)&&ie(e,s,t[s]);if(ae)for(var s of ae(t))Ae.call(t,s)&&ie(e,s,t[s]);return e};const le=u.isMobile(),W=j({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),Me={state:W,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=S.state;if(e==="NONE"||t==="ALL"&&!e)return W.recomendedWallets;if(u.isArray(e)){const s={recommendedIds:e.join(",")},{listings:r}=await U.getAllListings(s),l=Object.values(r);l.sort((c,m)=>{const p=e.indexOf(c.id),E=e.indexOf(m.id);return p-E}),W.recomendedWallets=l}else{const{chains:s,isAuth:r}=y.state,l=s==null?void 0:s.join(","),c=u.isArray(t),m={page:1,sdks:r?"auth_v1":void 0,entries:u.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:p}=le?await U.getMobileListings(m):await U.getDesktopListings(m);W.recomendedWallets=Object.values(p)}return W.recomendedWallets},async getWallets(e){const t=je({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:r}=S.state,{recomendedWallets:l}=W;if(r==="ALL")return W.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):u.isArray(s)&&(t.excludedIds=s.join(",")),u.isArray(r)&&(t.excludedIds=[t.excludedIds,r].filter(Boolean).join(",")),y.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:m}=e,{listings:p,total:E}=le?await U.getMobileListings(t):await U.getDesktopListings(t),n=Object.values(p),g=m?"search":"wallets";return W[g]={listings:[...W[g].listings,...n],total:E,page:c??1},{listings:n,total:E}},getWalletImageUrl(e){return U.getWalletImageUrl(e)},getAssetImageUrl(e){return U.getAssetImageUrl(e)},resetSearch(){W.search={listings:[],total:0,page:1}}},N=j({open:!1}),z={state:N,subscribe(e){return D(N,()=>e(N))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:r}=y.state;if(u.removeWalletConnectDeepLink(),y.setWalletConnectUri(e==null?void 0:e.uri),y.setChains(e==null?void 0:e.chains),ee.reset("ConnectWallet"),s&&r)N.open=!0,t();else{const l=setInterval(()=>{const c=y.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),N.open=!0,t())},200)}})},close(){N.open=!1}};var Ue=Object.defineProperty,ce=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,de=(e,t,s)=>t in e?Ue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,De=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&de(e,s,t[s]);if(ce)for(var s of ce(t))Se.call(t,s)&&de(e,s,t[s]);return e};function ke(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=j({themeMode:ke()?"dark":"light"}),Z={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=De({},s))}},P=j({open:!1,message:"",variant:"success"}),_e={state:P,subscribe(e){return D(P,()=>e(P))},openToast(e,t){P.open=!0,P.message=e,P.variant=t},closeToast(){P.open=!1}};class Ne{constructor(t){this.openModal=z.open,this.closeModal=z.close,this.subscribeModal=z.subscribe,this.setTheme=Z.setThemeConfig,Z.setThemeConfig(t),S.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await Promise.resolve().then(()=>require("./index-q9Cykg6J.js"));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),y.setIsUiLoaded(!0)}}}const Te=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:Ne},Symbol.toStringTag,{value:"Module"}));exports.R=ue;exports.T=ee;exports.a=u;exports.index=Te;exports.ne=Z;exports.oe=_e;exports.p=y;exports.se=z;exports.te=Me;exports.y=S;
|