edge-core-js 2.44.0 → 2.45.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/types.js CHANGED
@@ -113,7 +113,6 @@ const asLoginRequestBody = cleaners.asObject({
113
113
  lra1: cleaners.asOptional(asBase64),
114
114
  recoveryAuth: cleaners.asOptional(asBase64) // lra1
115
115
  });
116
-
117
116
  const asLoginResponseBody = cleaners.asObject({
118
117
  // The response payload:
119
118
  results: cleaners.asOptional(cleaners.asUnknown),
@@ -322,6 +321,7 @@ const wasUsernameInfoPayload = cleaners.uncleaner(asUsernameInfoPayload);
322
321
  * and the GUI should just show them with a stack trace & generic message,
323
322
  * since the program has basically crashed at that point.
324
323
  */
324
+
325
325
  /**
326
326
  * Thrown when the login server requires a CAPTCHA.
327
327
  *
@@ -555,19 +555,19 @@ function PinDisabledError(message) {
555
555
  */
556
556
  function PendingFundsError(message = 'Not enough confirmed funds') {
557
557
  if (!(this instanceof PendingFundsError)) throw new TypeError("Class constructor PendingFundsError cannot be invoked without 'new'");
558
- var _this10;
559
- function _super10(message) {
560
- _this10 = new Error(message);
561
- Object.defineProperty(_this10, "constructor", {
558
+ var _this0;
559
+ function _super0(message) {
560
+ _this0 = new Error(message);
561
+ Object.defineProperty(_this0, "constructor", {
562
562
  value: PendingFundsError,
563
563
  configurable: true,
564
564
  writable: true
565
565
  });
566
- return _this10;
566
+ return _this0;
567
567
  }
568
- _super10(message);
569
- _this10.name = 'PendingFundsError';
570
- return _this10;
568
+ _super0(message);
569
+ _this0.name = 'PendingFundsError';
570
+ return _this0;
571
571
  }
572
572
 
573
573
  /**
@@ -575,19 +575,19 @@ function PendingFundsError(message = 'Not enough confirmed funds') {
575
575
  */
576
576
  function SameCurrencyError(message = 'Wallets can not be the same currency') {
577
577
  if (!(this instanceof SameCurrencyError)) throw new TypeError("Class constructor SameCurrencyError cannot be invoked without 'new'");
578
- var _this11;
579
- function _super11(message) {
580
- _this11 = new Error(message);
581
- Object.defineProperty(_this11, "constructor", {
578
+ var _this1;
579
+ function _super1(message) {
580
+ _this1 = new Error(message);
581
+ Object.defineProperty(_this1, "constructor", {
582
582
  value: SameCurrencyError,
583
583
  configurable: true,
584
584
  writable: true
585
585
  });
586
- return _this11;
586
+ return _this1;
587
587
  }
588
- _super11(message);
589
- _this11.name = 'SameCurrencyError';
590
- return _this11;
588
+ _super1(message);
589
+ _this1.name = 'SameCurrencyError';
590
+ return _this1;
591
591
  }
592
592
 
593
593
  /**
@@ -595,19 +595,19 @@ function SameCurrencyError(message = 'Wallets can not be the same currency') {
595
595
  */
596
596
  function SpendToSelfError(message = 'Spending to self') {
597
597
  if (!(this instanceof SpendToSelfError)) throw new TypeError("Class constructor SpendToSelfError cannot be invoked without 'new'");
598
- var _this12;
599
- function _super12(message) {
600
- _this12 = new Error(message);
601
- Object.defineProperty(_this12, "constructor", {
598
+ var _this10;
599
+ function _super10(message) {
600
+ _this10 = new Error(message);
601
+ Object.defineProperty(_this10, "constructor", {
602
602
  value: SpendToSelfError,
603
603
  configurable: true,
604
604
  writable: true
605
605
  });
606
- return _this12;
606
+ return _this10;
607
607
  }
608
- _super12(message);
609
- _this12.name = 'SpendToSelfError';
610
- return _this12;
608
+ _super10(message);
609
+ _this10.name = 'SpendToSelfError';
610
+ return _this10;
611
611
  }
612
612
 
613
613
  /**
@@ -617,23 +617,23 @@ function SpendToSelfError(message = 'Spending to self') {
617
617
  */
618
618
  function SwapAboveLimitError(swapInfo, nativeMax, direction = 'from') {
619
619
  if (!(this instanceof SwapAboveLimitError)) throw new TypeError("Class constructor SwapAboveLimitError cannot be invoked without 'new'");
620
- var _this13;
621
- function _super13(message) {
622
- _this13 = new Error(message);
623
- Object.defineProperty(_this13, "constructor", {
620
+ var _this11;
621
+ function _super11(message) {
622
+ _this11 = new Error(message);
623
+ Object.defineProperty(_this11, "constructor", {
624
624
  value: SwapAboveLimitError,
625
625
  configurable: true,
626
626
  writable: true
627
627
  });
628
- return _this13;
628
+ return _this11;
629
629
  }
630
- _super13('Amount is too high');
631
- _this13.name = 'SwapAboveLimitError';
632
- _this13.pluginId = swapInfo.pluginId;
633
- _this13.swapPluginId = swapInfo.pluginId;
634
- _this13.nativeMax = nativeMax ?? '';
635
- _this13.direction = direction;
636
- return _this13;
630
+ _super11('Amount is too high');
631
+ _this11.name = 'SwapAboveLimitError';
632
+ _this11.pluginId = swapInfo.pluginId;
633
+ _this11.swapPluginId = swapInfo.pluginId;
634
+ _this11.nativeMax = nativeMax ?? '';
635
+ _this11.direction = direction;
636
+ return _this11;
637
637
  }
638
638
 
639
639
  /**
@@ -643,23 +643,23 @@ function SwapAboveLimitError(swapInfo, nativeMax, direction = 'from') {
643
643
  */
644
644
  function SwapBelowLimitError(swapInfo, nativeMin, direction = 'from') {
645
645
  if (!(this instanceof SwapBelowLimitError)) throw new TypeError("Class constructor SwapBelowLimitError cannot be invoked without 'new'");
646
- var _this14;
647
- function _super14(message) {
648
- _this14 = new Error(message);
649
- Object.defineProperty(_this14, "constructor", {
646
+ var _this12;
647
+ function _super12(message) {
648
+ _this12 = new Error(message);
649
+ Object.defineProperty(_this12, "constructor", {
650
650
  value: SwapBelowLimitError,
651
651
  configurable: true,
652
652
  writable: true
653
653
  });
654
- return _this14;
654
+ return _this12;
655
655
  }
656
- _super14('Amount is too low');
657
- _this14.name = 'SwapBelowLimitError';
658
- _this14.pluginId = swapInfo.pluginId;
659
- _this14.swapPluginId = swapInfo.pluginId;
660
- _this14.nativeMin = nativeMin ?? '';
661
- _this14.direction = direction;
662
- return _this14;
656
+ _super12('Amount is too low');
657
+ _this12.name = 'SwapBelowLimitError';
658
+ _this12.pluginId = swapInfo.pluginId;
659
+ _this12.swapPluginId = swapInfo.pluginId;
660
+ _this12.nativeMin = nativeMin ?? '';
661
+ _this12.direction = direction;
662
+ return _this12;
663
663
  }
664
664
 
665
665
  /**
@@ -667,15 +667,15 @@ function SwapBelowLimitError(swapInfo, nativeMin, direction = 'from') {
667
667
  */
668
668
  function SwapCurrencyError(swapInfo, request) {
669
669
  if (!(this instanceof SwapCurrencyError)) throw new TypeError("Class constructor SwapCurrencyError cannot be invoked without 'new'");
670
- var _this15;
671
- function _super15(message) {
672
- _this15 = new Error(message);
673
- Object.defineProperty(_this15, "constructor", {
670
+ var _this13;
671
+ function _super13(message) {
672
+ _this13 = new Error(message);
673
+ Object.defineProperty(_this13, "constructor", {
674
674
  value: SwapCurrencyError,
675
675
  configurable: true,
676
676
  writable: true
677
677
  });
678
- return _this15;
678
+ return _this13;
679
679
  }
680
680
  const {
681
681
  fromWallet,
@@ -687,12 +687,12 @@ function SwapCurrencyError(swapInfo, request) {
687
687
  const toPluginId = toWallet.currencyConfig.currencyInfo.pluginId;
688
688
  const fromString = `${fromPluginId}:${String(fromTokenId)}`;
689
689
  const toString = `${toPluginId}:${String(toTokenId)}`;
690
- _super15(`${swapInfo.displayName} does not support ${fromString} to ${toString}`);
691
- _this15.name = 'SwapCurrencyError';
692
- _this15.pluginId = swapInfo.pluginId;
693
- _this15.fromTokenId = fromTokenId ?? null;
694
- _this15.toTokenId = toTokenId ?? null;
695
- return _this15;
690
+ _super13(`${swapInfo.displayName} does not support ${fromString} to ${toString}`);
691
+ _this13.name = 'SwapCurrencyError';
692
+ _this13.pluginId = swapInfo.pluginId;
693
+ _this13.fromTokenId = fromTokenId ?? null;
694
+ _this13.toTokenId = toTokenId ?? null;
695
+ return _this13;
696
696
  }
697
697
  /**
698
698
  * The user is not allowed to swap these coins for some reason
@@ -704,54 +704,54 @@ function SwapCurrencyError(swapInfo, request) {
704
704
  */
705
705
  function SwapPermissionError(swapInfo, reason) {
706
706
  if (!(this instanceof SwapPermissionError)) throw new TypeError("Class constructor SwapPermissionError cannot be invoked without 'new'");
707
- var _this16;
708
- function _super16(message) {
709
- _this16 = new Error(message);
710
- Object.defineProperty(_this16, "constructor", {
707
+ var _this14;
708
+ function _super14(message) {
709
+ _this14 = new Error(message);
710
+ Object.defineProperty(_this14, "constructor", {
711
711
  value: SwapPermissionError,
712
712
  configurable: true,
713
713
  writable: true
714
714
  });
715
- return _this16;
715
+ return _this14;
716
716
  }
717
- if (reason != null) _super16(reason);else _super16('You are not allowed to make this trade');
718
- _this16.name = 'SwapPermissionError';
719
- _this16.pluginId = swapInfo.pluginId;
720
- _this16.reason = reason;
721
- return _this16;
717
+ if (reason != null) _super14(reason);else _super14('You are not allowed to make this trade');
718
+ _this14.name = 'SwapPermissionError';
719
+ _this14.pluginId = swapInfo.pluginId;
720
+ _this14.reason = reason;
721
+ return _this14;
722
722
  }
723
723
 
724
724
  // Address requirements for certain swap flows (extend as needed):
725
725
 
726
726
  function SwapAddressError(swapInfo, opts) {
727
727
  if (!(this instanceof SwapAddressError)) throw new TypeError("Class constructor SwapAddressError cannot be invoked without 'new'");
728
- var _this17;
729
- function _super17(message) {
730
- _this17 = new Error(message);
731
- Object.defineProperty(_this17, "constructor", {
728
+ var _this15;
729
+ function _super15(message) {
730
+ _this15 = new Error(message);
731
+ Object.defineProperty(_this15, "constructor", {
732
732
  value: SwapAddressError,
733
733
  configurable: true,
734
734
  writable: true
735
735
  });
736
- return _this17;
736
+ return _this15;
737
737
  }
738
738
  const {
739
739
  reason
740
740
  } = opts;
741
741
  switch (reason) {
742
742
  case 'mustMatch':
743
- _super17('This swap requires from and to wallets to have the same address');
743
+ _super15('This swap requires from and to wallets to have the same address');
744
744
  break;
745
745
  case 'mustBeActivated':
746
- _super17('The destination wallet must be activated to receive this swap.');
746
+ _super15('The destination wallet must be activated to receive this swap.');
747
747
  break;
748
748
  default:
749
- _super17('Invalid swap address');
749
+ _super15('Invalid swap address');
750
750
  }
751
- _this17.name = 'SwapAddressError';
752
- _this17.swapPluginId = swapInfo.pluginId;
753
- _this17.reason = reason;
754
- return _this17;
751
+ _this15.name = 'SwapAddressError';
752
+ _this15.swapPluginId = swapInfo.pluginId;
753
+ _this15.reason = reason;
754
+ return _this15;
755
755
  }
756
756
 
757
757
  /**
@@ -764,19 +764,19 @@ function SwapAddressError(swapInfo, opts) {
764
764
  */
765
765
  function UsernameError(message = 'Invalid username') {
766
766
  if (!(this instanceof UsernameError)) throw new TypeError("Class constructor UsernameError cannot be invoked without 'new'");
767
- var _this18;
768
- function _super18(message) {
769
- _this18 = new Error(message);
770
- Object.defineProperty(_this18, "constructor", {
767
+ var _this16;
768
+ function _super16(message) {
769
+ _this16 = new Error(message);
770
+ Object.defineProperty(_this16, "constructor", {
771
771
  value: UsernameError,
772
772
  configurable: true,
773
773
  writable: true
774
774
  });
775
- return _this18;
775
+ return _this16;
776
776
  }
777
- _super18(message);
778
- _this18.name = 'UsernameError';
779
- return _this18;
777
+ _super16(message);
778
+ _this16.name = 'UsernameError';
779
+ return _this16;
780
780
  }
781
781
  function asMaybeError(name) {
782
782
  return function asError(raw) {
@@ -1,2 +0,0 @@
1
- /*! For license information please see 27cab3e7ba7549594ad5.js.LICENSE.txt */
2
- !function(){"use strict";var e="undefined"!=typeof document?document.currentScript:null;function n(e,n,t,r){return new(t||(t=Promise))((function(i,o){function _(e){try{c(r.next(e))}catch(n){o(n)}}function s(e){try{c(r.throw(e))}catch(n){o(n)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(_,s)}c((r=r.apply(e,n||[])).next())}))}function t(e,n,t,r){function i(e,n,t){var r=t?WebAssembly.instantiateStreaming:WebAssembly.instantiate,i=t?WebAssembly.compileStreaming:WebAssembly.compile;return n?r(e,n):i(e)}var o=null;if(n)return i(fetch(n),r,!0);var _=globalThis.atob(t),s=_.length;o=new Uint8Array(new ArrayBuffer(s));for(var c=0;c<s;c++)o[c]=_.charCodeAt(c);if(e){var a=new WebAssembly.Module(o);return r?new WebAssembly.Instance(a,r):a}return i(o,r,!1)}let r;"function"==typeof SuppressedError&&SuppressedError;let i=0,o=null;function _(){return null!==o&&0!==o.byteLength||(o=new Uint8Array(r.memory.buffer)),o}const s="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},c="function"==typeof s.encodeInto?function(e,n){return s.encodeInto(e,n)}:function(e,n){const t=s.encode(e);return n.set(t),{read:e.length,written:t.length}};function a(e,n,t){if(void 0===t){const t=s.encode(e),r=n(t.length,1)>>>0;return _().subarray(r,r+t.length).set(t),i=t.length,r}let r=e.length,o=n(r,1)>>>0;const a=_();let u=0;for(;u<r;u++){const n=e.charCodeAt(u);if(n>127)break;a[o+u]=n}if(u!==r){0!==u&&(e=e.slice(u)),o=t(o,r,r=u+3*e.length,1)>>>0;const n=_().subarray(o+u,o+r);u+=c(e,n).written,o=t(o,r,u,1)>>>0}return i=u,o}let u=null;function f(){return(null===u||!0===u.buffer.detached||void 0===u.buffer.detached&&u.buffer!==r.memory.buffer)&&(u=new DataView(r.memory.buffer)),u}function b(e){const n=r.__externref_table_alloc();return r.__wbindgen_export_4.set(n,e),n}function g(e,n){try{return e.apply(this,n)}catch(t){const e=b(t);r.__wbindgen_exn_store(e)}}const l="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};function w(e,n){return e>>>=0,l.decode(_().subarray(e,e+n))}function d(e){return null==e}function m(e,n){return e>>>=0,_().subarray(e/1,e/1+n)}"undefined"!=typeof TextDecoder&&l.decode();const h="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>{r.__wbindgen_export_6.get(e.dtor)(e.a,e.b)}));function p(e,n,t,i){const o={a:e,b:n,cnt:1,dtor:t},_=(...e)=>{o.cnt++;const n=o.a;o.a=0;try{return i(n,o.b,...e)}finally{0==--o.cnt?(r.__wbindgen_export_6.get(o.dtor)(n,o.b),h.unregister(o)):o.a=n}};return _.original=o,h.register(_,o,o),_}function y(e){const n=typeof e;if("number"==n||"boolean"==n||null==e)return`${e}`;if("string"==n)return`"${e}"`;if("symbol"==n){const n=e.description;return null==n?"Symbol":`Symbol(${n})`}if("function"==n){const n=e.name;return"string"==typeof n&&n.length>0?`Function(${n})`:"Function"}if(Array.isArray(e)){const n=e.length;let t="[";n>0&&(t+=y(e[0]));for(let r=1;r<n;r++)t+=", "+y(e[r]);return t+="]",t}const t=/\[object ([^\]]+)\]/.exec(toString.call(e));let r;if(!(t&&t.length>1))return toString.call(e);if(r=t[1],"Object"==r)try{return"Object("+JSON.stringify(e)+")"}catch(i){return"Object"}return e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:r}function v(e,n){const t=a(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i,s=function(e,n){const t=n(1*e.length,1)>>>0;return _().set(e,t/1),i=e.length,t}(n,r.__wbindgen_malloc),c=i;return r.send_client_data(t,o,s,c)}function x(e){const n=r.__wbindgen_export_4.get(e);return r.__externref_table_dealloc(e),n}function R(){const e=r.mix_fetch_initialised();if(e[2])throw x(e[1]);return 0!==e[0]}function E(e){const n=a(e,r.__wbindgen_malloc,r.__wbindgen_realloc),t=i;return r.start_new_mixnet_connection(n,t)}function T(e){const n=a(e,r.__wbindgen_malloc,r.__wbindgen_realloc),t=i;return r.finish_mixnet_connection(n,t)}function S(e,n,t){const i=r.closure743_externref_shim_multivalue_shim(e,n,t);if(i[1])throw x(i[0])}function j(e,n,t){r.closure830_externref_shim(e,n,t)}function I(e,n){r._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h061f9c2866052d32(e,n)}function F(e,n){r._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h67f1322bcb5f40b5(e,n)}function A(e,n){r._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hb7fef82722851829(e,n)}function k(e,n,t){r.closure2203_externref_shim(e,n,t)}function O(e,n){r._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h7ea245616776fb08(e,n)}function U(e,n){r._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h75596235482477c3(e,n)}function W(e,n,t){r.closure2326_externref_shim(e,n,t)}const C=["blob","arraybuffer"],D=["pending","done"],z=["readonly","readwrite","versionchange","readwriteflush","cleanup"],M=["default","no-store","reload","no-cache","force-cache","only-if-cached"],L=["omit","same-origin","include"],B=["same-origin","no-cors","cors","navigate"];"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_acknowledgementswasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_anonymoussendertag_free(e>>>0,1)));const P="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_clientstorage_free(e>>>0,1)));class N{static __wrap(e){e>>>=0;const n=Object.create(N.prototype);return n.__wbg_ptr=e,P.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,P.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_clientstorage_free(e,0)}static new_unencrypted(e){const n=a(e,r.__wbindgen_malloc,r.__wbindgen_realloc),t=i;return r.clientstorage_new_unencrypted(n,t)}constructor(e,n){const t=a(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i,_=a(n,r.__wbindgen_malloc,r.__wbindgen_realloc),s=i;return r.clientstorage_new(t,o,_,s)}static new_async(e,n){const t=a(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;var _=d(n)?0:a(n,r.__wbindgen_malloc,r.__wbindgen_realloc),s=i;return r.clientstorage_new_async(t,o,_,s)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_covertrafficwasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_debugwasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_forgetmewasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_gatewayconnectionwasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_mixfetch_free(e>>>0,1)));const q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_mixfetchclient_free(e>>>0,1)));class G{static __wrap(e){e>>>=0;const n=Object.create(G.prototype);return n.__wbg_ptr=e,q.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,q.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_mixfetchclient_free(e,0)}disconnect(){return r.mixfetchclient_disconnect(this.__wbg_ptr)}self_address(){let e,n;try{const t=r.mixfetchclient_self_address(this.__wbg_ptr);return e=t[0],n=t[1],w(t[0],t[1])}finally{r.__wbindgen_free(e,n,1)}}constructor(e,n,t,o){!function(e,n){if(!(e instanceof n))throw new Error(`expected instance of ${n.name}`)}(e,$);var _=e.__destroy_into_raw(),s=d(t)?0:a(t,r.__wbindgen_malloc,r.__wbindgen_realloc),c=i,u=d(o)?0:a(o,r.__wbindgen_malloc,r.__wbindgen_realloc),f=i;return r.mixfetchclient_new(_,n,s,c,u,f)}active(){return 0!==r.mixfetchclient_active(this.__wbg_ptr)}}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_mixfetchclientbuilder_free(e>>>0,1)));const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>r.__wbg_mixfetchconfig_free(e>>>0,1)));class ${static __wrap(e){e>>>=0;const n=Object.create($.prototype);return n.__wbg_ptr=e,V.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();r.__wbg_mixfetchconfig_free(e,0)}with_mix_fetch_timeout(e){const n=this.__destroy_into_raw(),t=r.mixfetchconfig_with_mix_fetch_timeout(n,e);return $.__wrap(t)}constructor(e,n){const t=a(e,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i,_=r.mixfetchconfig_new(t,o,d(n)?0:b(n));if(_[2])throw x(_[1]);return this.__wbg_ptr=_[0]>>>0,V.register(this,this.__wbg_ptr,this),this}}function H(){const e={wbg:{}};return e.wbg.__wbg_String_8f0eb39a4a4c2f66=function(e,n){const t=a(String(n),r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;f().setInt32(e+4,o,!0),f().setInt32(e+0,t,!0)},e.wbg.__wbg_String_eecc4a11987127d6=function(e,n){const t=a(String(n),r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;f().setInt32(e+4,o,!0),f().setInt32(e+0,t,!0)},e.wbg.__wbg_Window_41559019033ede94=function(e){return e.Window},e.wbg.__wbg_WorkerGlobalScope_d324bffbeaef9f3a=function(e){return e.WorkerGlobalScope},e.wbg.__wbg_abort_410ec47a64ac6117=function(e,n){e.abort(n)},e.wbg.__wbg_abort_775ef1d17fc65868=function(e){e.abort()},e.wbg.__wbg_abort_99fc644e2c79c9fb=function(){return g((function(e){e.abort()}),arguments)},e.wbg.__wbg_addEventListener_84ae3eac6e15480a=function(){return g((function(e,n,t,r,i){e.addEventListener(w(n,t),r,i)}),arguments)},e.wbg.__wbg_addEventListener_90e553fdce254421=function(){return g((function(e,n,t,r){e.addEventListener(w(n,t),r)}),arguments)},e.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return g((function(e,n,t,r,i){e.append(w(n,t),w(r,i))}),arguments)},e.wbg.__wbg_arrayBuffer_d1b44c4390db422f=function(){return g((function(e){return e.arrayBuffer()}),arguments)},e.wbg.__wbg_bound_f2afc3766d4545cf=function(){return g((function(e,n,t,r){return IDBKeyRange.bound(e,n,0!==t,0!==r)}),arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(e){return e.buffer},e.wbg.__wbg_call_672a4d21634d4a24=function(){return g((function(e,n){return e.call(n)}),arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return g((function(e,n,t){return e.call(n,t)}),arguments)},e.wbg.__wbg_clearInterval_dd1e598f425db353=function(e){return clearInterval(e)},e.wbg.__wbg_clearTimeout_3b5c565a5ec539dd=function(e){return clearTimeout(e)},e.wbg.__wbg_clientstorage_new=function(e){return N.__wrap(e)},e.wbg.__wbg_close_2893b7d056a0627d=function(){return g((function(e){e.close()}),arguments)},e.wbg.__wbg_code_f4ec1e6e2e1b0417=function(e){return e.code},e.wbg.__wbg_commit_a54edce65f3858f2=function(){return g((function(e){e.commit()}),arguments)},e.wbg.__wbg_count_9dbedee4d2474ff8=function(){return g((function(e,n){return e.count(n)}),arguments)},e.wbg.__wbg_createObjectStore_e566459f7161f82f=function(){return g((function(e,n,t){return e.createObjectStore(w(n,t))}),arguments)},e.wbg.__wbg_crypto_574e78ad8b13b65f=function(e){return e.crypto},e.wbg.__wbg_data_432d9c3df2630942=function(e){return e.data},e.wbg.__wbg_dispatchEvent_9e259d7c1d603dfb=function(){return g((function(e,n){return e.dispatchEvent(n)}),arguments)},e.wbg.__wbg_done_769e5ede4b31c67b=function(e){return e.done},e.wbg.__wbg_entries_2a52db465d0421fb=function(e){return e.entries()},e.wbg.__wbg_entries_3265d4158b33e5dc=function(e){return Object.entries(e)},e.wbg.__wbg_error_3cfd4be637595be7=function(e,n){console.error(w(e,n))},e.wbg.__wbg_error_e98c298703cffa97=function(e,n){console.error(w(e,n))},e.wbg.__wbg_error_ff4ddaabdfc5dbb3=function(){return g((function(e){const n=e.error;return d(n)?0:b(n)}),arguments)},e.wbg.__wbg_fetch_16dcf1cfbbc66b3c=function(e){return fetch(e)},e.wbg.__wbg_fetch_509096533071c657=function(e,n){return e.fetch(n)},e.wbg.__wbg_from_2a5d3e218e67aa85=function(e){return Array.from(e)},e.wbg.__wbg_getAllKeys_b11d8835dc4be0e8=function(){return g((function(e){return e.getAllKeys()}),arguments)},e.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return g((function(e,n){e.getRandomValues(n)}),arguments)},e.wbg.__wbg_getTime_46267b1c24877e30=function(e){return e.getTime()},e.wbg.__wbg_get_67b2ba62fc30de12=function(){return g((function(e,n){return Reflect.get(e,n)}),arguments)},e.wbg.__wbg_get_8da03f81f6a1111e=function(){return g((function(e,n){return e.get(n)}),arguments)},e.wbg.__wbg_get_b9b93047fe3cf45b=function(e,n){return e[n>>>0]},e.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(e,n){return e[n]},e.wbg.__wbg_getwithrefkey_6550b2c093d2eb18=function(e,n){return e[n]},e.wbg.__wbg_global_f5c2926e57ba457f=function(e){return e.global},e.wbg.__wbg_goWasmCloseRemoteSocket_992b677524fcede8=function(e,n){let t,i;try{t=e,i=n,__go_rs_bridge__.goWasmCloseRemoteSocket(w(e,n))}finally{r.__wbindgen_free(t,i,1)}},e.wbg.__wbg_goWasmInjectConnError_b927894206725a9c=function(e,n,t,i){let o,_,s,c;try{o=e,_=n,s=t,c=i,__go_rs_bridge__.goWasmInjectConnError(w(e,n),w(t,i))}finally{r.__wbindgen_free(o,_,1),r.__wbindgen_free(s,c,1)}},e.wbg.__wbg_goWasmInjectServerData_40f1c53f7ca870d5=function(e,n,t,i){let o,_;try{o=e,_=n;var s=m(t,i).slice();r.__wbindgen_free(t,1*i,1),__go_rs_bridge__.goWasmInjectServerData(w(e,n),s)}finally{r.__wbindgen_free(o,_,1)}},e.wbg.__wbg_goWasmSetMixFetchRequestTimeout_74f591ac382a0775=function(e){__go_rs_bridge__.goWasmSetMixFetchRequestTimeout(e>>>0)},e.wbg.__wbg_has_a5ea9117f258a0ec=function(){return g((function(e,n){return Reflect.has(e,n)}),arguments)},e.wbg.__wbg_headers_9cb51cfd2ac780a4=function(e){return e.headers},e.wbg.__wbg_indexedDB_54f01430b1e194e8=function(){return g((function(e){const n=e.indexedDB;return d(n)?0:b(n)}),arguments)},e.wbg.__wbg_indexedDB_b1f49280282046f8=function(){return g((function(e){const n=e.indexedDB;return d(n)?0:b(n)}),arguments)},e.wbg.__wbg_indexedDB_f6b47b0dc333fd2f=function(){return g((function(e){const n=e.indexedDB;return d(n)?0:b(n)}),arguments)},e.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(e){let n;try{n=e instanceof ArrayBuffer}catch(t){n=!1}return n},e.wbg.__wbg_instanceof_DomException_ed1ccb7aaf39034c=function(e){let n;try{n=e instanceof DOMException}catch(t){n=!1}return n},e.wbg.__wbg_instanceof_Error_4d54113b22d20306=function(e){let n;try{n=e instanceof Error}catch(t){n=!1}return n},e.wbg.__wbg_instanceof_IdbDatabase_a3ef009ca00059f9=function(e){let n;try{n=e instanceof IDBDatabase}catch(t){n=!1}return n},e.wbg.__wbg_instanceof_IdbRequest_4813c3f207666aa4=function(e){let n;try{n=e instanceof IDBRequest}catch(t){n=!1}return n},e.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(e){let n;try{n=e instanceof Response}catch(t){n=!1}return n},e.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(e){let n;try{n=e instanceof Uint8Array}catch(t){n=!1}return n},e.wbg.__wbg_isArray_a1eab7e0d067391b=function(e){return Array.isArray(e)},e.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(e){return Number.isSafeInteger(e)},e.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},e.wbg.__wbg_length_a446193dc22c12f8=function(e){return e.length},e.wbg.__wbg_length_e2d2a49132c1b256=function(e){return e.length},e.wbg.__wbg_log_72cb694afa6a0fe7=function(e,n){console.log(w(e,n))},e.wbg.__wbg_lowerBound_1872d19f5bcf83c6=function(){return g((function(e,n){return IDBKeyRange.lowerBound(e,0!==n)}),arguments)},e.wbg.__wbg_message_5c5d919204d42400=function(e,n){const t=a(n.message,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;f().setInt32(e+4,o,!0),f().setInt32(e+0,t,!0)},e.wbg.__wbg_message_97a2af9b89d693a3=function(e){return e.message},e.wbg.__wbg_mixfetchclient_new=function(e){return G.__wrap(e)},e.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(e){return e.msCrypto},e.wbg.__wbg_name_0b327d569f00ebee=function(e){return e.name},e.wbg.__wbg_name_f2d27098bfd843e7=function(e,n){const t=a(n.name,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;f().setInt32(e+4,o,!0),f().setInt32(e+0,t,!0)},e.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},e.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return g((function(){return new Headers}),arguments)},e.wbg.__wbg_new_23a2665fac83c611=function(e,n){try{var t={a:e,b:n};const i=new Promise(((e,n)=>{const i=t.a;t.a=0;try{return function(e,n,t,i){r.closure2942_externref_shim(e,n,t,i)}(i,t.b,e,n)}finally{t.a=i}}));return i}finally{t.a=t.b=0}},e.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},e.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},e.wbg.__wbg_new_78feb108b6472713=function(){return new Array},e.wbg.__wbg_new_92c54fc74574ef55=function(){return g((function(e,n){return new WebSocket(w(e,n))}),arguments)},e.wbg.__wbg_new_a12002a7f91c75be=function(e){return new Uint8Array(e)},e.wbg.__wbg_new_c68d7209be747379=function(e,n){return new Error(w(e,n))},e.wbg.__wbg_new_e25e5aab09ff45db=function(){return g((function(){return new AbortController}),arguments)},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(e,n){return new Function(w(e,n))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(e,n,t){return new Uint8Array(e,n>>>0,t>>>0)},e.wbg.__wbg_newwitheventinitdict_502dbfa1b3d2fcbc=function(){return g((function(e,n,t){return new CloseEvent(w(e,n),t)}),arguments)},e.wbg.__wbg_newwithlength_a381634e90c276d4=function(e){return new Uint8Array(e>>>0)},e.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return g((function(e,n,t){return new Request(w(e,n),t)}),arguments)},e.wbg.__wbg_next_25feadfc0913fea9=function(e){return e.next},e.wbg.__wbg_next_6574e1a8a62d1055=function(){return g((function(e){return e.next()}),arguments)},e.wbg.__wbg_node_905d3e251edff8a2=function(e){return e.node},e.wbg.__wbg_now_e1163c67115ff874=function(e){return e.now()},e.wbg.__wbg_objectStore_21878d46d25b64b6=function(){return g((function(e,n,t){return e.objectStore(w(n,t))}),arguments)},e.wbg.__wbg_oldVersion_e8337811e52861c6=function(e){return e.oldVersion},e.wbg.__wbg_open_e0c0b2993eb596e1=function(){return g((function(e,n,t,r){return e.open(w(n,t),r>>>0)}),arguments)},e.wbg.__wbg_performance_7fe0928f3ab059e5=function(e){return e.performance},e.wbg.__wbg_postMessage_83a8d58d3fcb6c13=function(){return g((function(e,n){e.postMessage(n)}),arguments)},e.wbg.__wbg_process_dc0fbacc7c1c06f7=function(e){return e.process},e.wbg.__wbg_put_066faa31a6a88f5b=function(){return g((function(e,n,t){return e.put(n,t)}),arguments)},e.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(e){queueMicrotask(e)},e.wbg.__wbg_queueMicrotask_d3219def82552485=function(e){return e.queueMicrotask},e.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return g((function(e,n){e.randomFillSync(n)}),arguments)},e.wbg.__wbg_readyState_4013cfdf4f22afb0=function(e){const n=e.readyState;return(D.indexOf(n)+1||3)-1},e.wbg.__wbg_readyState_7ef6e63c349899ed=function(e){return e.readyState},e.wbg.__wbg_reason_49f1cede8bcf23dd=function(e,n){const t=a(n.reason,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;f().setInt32(e+4,o,!0),f().setInt32(e+0,t,!0)},e.wbg.__wbg_reject_b3fcf99063186ff7=function(e){return Promise.reject(e)},e.wbg.__wbg_removeEventListener_056dfe8c3d6c58f9=function(){return g((function(e,n,t,r){e.removeEventListener(w(n,t),r)}),arguments)},e.wbg.__wbg_require_60cc747a6bc5215a=function(){return g((function(){return module.require}),arguments)},e.wbg.__wbg_resolve_4851785c9c5f573d=function(e){return Promise.resolve(e)},e.wbg.__wbg_result_f29afabdf2c05826=function(){return g((function(e){return e.result}),arguments)},e.wbg.__wbg_send_0293179ba074ffb4=function(){return g((function(e,n,t){e.send(w(n,t))}),arguments)},e.wbg.__wbg_send_fc0c204e8a1757f4=function(){return g((function(e,n,t){e.send(m(n,t))}),arguments)},e.wbg.__wbg_setInterval_ed3b5e3c3ebb8a6d=function(){return g((function(e,n){return setInterval(e,n)}),arguments)},e.wbg.__wbg_setTimeout_42370cb3051b8c2c=function(){return g((function(e,n,t){return e.setTimeout(n,t)}),arguments)},e.wbg.__wbg_setTimeout_8f06012fba12034e=function(e,n){globalThis.setTimeout(e,n)},e.wbg.__wbg_setTimeout_cb2a856ba8315e7a=function(e,n){return setTimeout(e,n)},e.wbg.__wbg_set_37837023f3d740e8=function(e,n,t){e[n>>>0]=t},e.wbg.__wbg_set_3f1d0b984ed272ed=function(e,n,t){e[n]=t},e.wbg.__wbg_set_65595bdd868b3009=function(e,n,t){e.set(n,t>>>0)},e.wbg.__wbg_set_8fc6bf8a5b1071d1=function(e,n,t){return e.set(n,t)},e.wbg.__wbg_setbinaryType_92fa1ffd873b327c=function(e,n){e.binaryType=C[n]},e.wbg.__wbg_setbody_5923b78a95eedf29=function(e,n){e.body=n},e.wbg.__wbg_setcache_12f17c3a980650e4=function(e,n){e.cache=M[n]},e.wbg.__wbg_setcode_156060465a2f8f79=function(e,n){e.code=n},e.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(e,n){e.credentials=L[n]},e.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(e,n){e.headers=n},e.wbg.__wbg_setmethod_3c5280fe5d890842=function(e,n,t){e.method=w(n,t)},e.wbg.__wbg_setmode_5dc300b865044b65=function(e,n){e.mode=B[n]},e.wbg.__wbg_setonabort_3bf4db6614fa98e9=function(e,n){e.onabort=n},e.wbg.__wbg_setonce_0cb80aea26303a35=function(e,n){e.once=0!==n},e.wbg.__wbg_setoncomplete_4d19df0dadb7c4d4=function(e,n){e.oncomplete=n},e.wbg.__wbg_setonerror_b0d9d723b8fddbbb=function(e,n){e.onerror=n},e.wbg.__wbg_setonerror_d7e3056cc6e56085=function(e,n){e.onerror=n},e.wbg.__wbg_setonsuccess_afa464ee777a396d=function(e,n){e.onsuccess=n},e.wbg.__wbg_setonupgradeneeded_fcf7ce4f2eb0cb5f=function(e,n){e.onupgradeneeded=n},e.wbg.__wbg_setreason_d29ac0402eeeb81a=function(e,n,t){e.reason=w(n,t)},e.wbg.__wbg_setsignal_75b21ef3a81de905=function(e,n){e.signal=n},e.wbg.__wbg_signal_aaf9ad74119f20a4=function(e){return e.signal},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const e="undefined"==typeof global?null:global;return d(e)?0:b(e)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const e="undefined"==typeof globalThis?null:globalThis;return d(e)?0:b(e)},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const e="undefined"==typeof self?null:self;return d(e)?0:b(e)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const e="undefined"==typeof window?null:window;return d(e)?0:b(e)},e.wbg.__wbg_status_f6360336ca686bf0=function(e){return e.status},e.wbg.__wbg_subarray_aa9065fa9dc5df96=function(e,n,t){return e.subarray(n>>>0,t>>>0)},e.wbg.__wbg_target_0a62d9d79a2a1ede=function(e){const n=e.target;return d(n)?0:b(n)},e.wbg.__wbg_text_7805bea50de2af49=function(){return g((function(e){return e.text()}),arguments)},e.wbg.__wbg_then_44b73946d2fb3e7d=function(e,n){return e.then(n)},e.wbg.__wbg_then_48b406749878a531=function(e,n,t){return e.then(n,t)},e.wbg.__wbg_toString_5285597960676b7b=function(e){return e.toString()},e.wbg.__wbg_toString_c813bbd34d063839=function(e){return e.toString()},e.wbg.__wbg_transaction_7d452475ef3c3c33=function(e){return e.transaction},e.wbg.__wbg_transaction_babc423936946a37=function(){return g((function(e,n,t,r){return e.transaction(w(n,t),z[r])}),arguments)},e.wbg.__wbg_upperBound_76a00814e81f6891=function(){return g((function(e,n){return IDBKeyRange.upperBound(e,0!==n)}),arguments)},e.wbg.__wbg_url_ae10c34ca209681d=function(e,n){const t=a(n.url,r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;f().setInt32(e+4,o,!0),f().setInt32(e+0,t,!0)},e.wbg.__wbg_value_cd1ffa7b1ab794f1=function(e){return e.value},e.wbg.__wbg_versions_c01dfd4722a88165=function(e){return e.versions},e.wbg.__wbg_warn_a2e6ac466681f75e=function(e,n){console.warn(w(e,n))},e.wbg.__wbg_wasClean_605b4fd66d44354a=function(e){return e.wasClean},e.wbg.__wbindgen_as_number=function(e){return+e},e.wbg.__wbindgen_bigint_from_i64=function(e){return e},e.wbg.__wbindgen_bigint_from_u64=function(e){return BigInt.asUintN(64,e)},e.wbg.__wbindgen_bigint_get_as_i64=function(e,n){const t="bigint"==typeof n?n:void 0;f().setBigInt64(e+8,d(t)?BigInt(0):t,!0),f().setInt32(e+0,!d(t),!0)},e.wbg.__wbindgen_boolean_get=function(e){return"boolean"==typeof e?e?1:0:2},e.wbg.__wbindgen_cb_drop=function(e){const n=e.original;if(1==n.cnt--)return n.a=0,!0;return!1},e.wbg.__wbindgen_closure_wrapper3948=function(e,n,t){return p(e,n,744,S)},e.wbg.__wbindgen_closure_wrapper4932=function(e,n,t){return p(e,n,831,j)},e.wbg.__wbindgen_closure_wrapper4933=function(e,n,t){return p(e,n,829,I)},e.wbg.__wbindgen_closure_wrapper5925=function(e,n,t){return p(e,n,1132,F)},e.wbg.__wbindgen_closure_wrapper8465=function(e,n,t){return p(e,n,1996,A)},e.wbg.__wbindgen_closure_wrapper9290=function(e,n,t){return p(e,n,2202,k)},e.wbg.__wbindgen_closure_wrapper9292=function(e,n,t){return p(e,n,2202,O)},e.wbg.__wbindgen_closure_wrapper9294=function(e,n,t){return p(e,n,2202,k)},e.wbg.__wbindgen_closure_wrapper9296=function(e,n,t){return p(e,n,2202,k)},e.wbg.__wbindgen_closure_wrapper9742=function(e,n,t){return p(e,n,2316,U)},e.wbg.__wbindgen_closure_wrapper9780=function(e,n,t){return p(e,n,2327,W)},e.wbg.__wbindgen_debug_string=function(e,n){const t=a(y(n),r.__wbindgen_malloc,r.__wbindgen_realloc),o=i;f().setInt32(e+4,o,!0),f().setInt32(e+0,t,!0)},e.wbg.__wbindgen_error_new=function(e,n){return new Error(w(e,n))},e.wbg.__wbindgen_in=function(e,n){return e in n},e.wbg.__wbindgen_init_externref_table=function(){const e=r.__wbindgen_export_4,n=e.grow(4);e.set(0,void 0),e.set(n+0,void 0),e.set(n+1,null),e.set(n+2,!0),e.set(n+3,!1)},e.wbg.__wbindgen_is_bigint=function(e){return"bigint"==typeof e},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof e},e.wbg.__wbindgen_is_null=function(e){return null===e},e.wbg.__wbindgen_is_object=function(e){return"object"==typeof e&&null!==e},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof e},e.wbg.__wbindgen_is_undefined=function(e){return void 0===e},e.wbg.__wbindgen_jsval_eq=function(e,n){return e===n},e.wbg.__wbindgen_jsval_loose_eq=function(e,n){return e==n},e.wbg.__wbindgen_memory=function(){return r.memory},e.wbg.__wbindgen_number_get=function(e,n){const t="number"==typeof n?n:void 0;f().setFloat64(e+8,d(t)?0:t,!0),f().setInt32(e+0,!d(t),!0)},e.wbg.__wbindgen_number_new=function(e){return e},e.wbg.__wbindgen_string_get=function(e,n){const t="string"==typeof n?n:void 0;var o=d(t)?0:a(t,r.__wbindgen_malloc,r.__wbindgen_realloc),_=i;f().setInt32(e+4,_,!0),f().setInt32(e+0,o,!0)},e.wbg.__wbindgen_string_new=function(e,n){return w(e,n)},e.wbg.__wbindgen_throw=function(e,n){throw new Error(w(e,n))},e}async function K(n){if(void 0!==r)return r;void 0!==n&&(Object.getPrototypeOf(n)===Object.prototype?({module_or_path:n}=n):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===n&&(n=new URL("mix_fetch_wasm_bg.wasm",e&&"SCRIPT"===e.tagName.toUpperCase()&&e.src||new URL("worker.js",document.baseURI).href));const t=H();("string"==typeof n||"function"==typeof Request&&n instanceof Request||"function"==typeof URL&&n instanceof URL)&&(n=fetch(n));const{instance:i,module:_}=await async function(e,n){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,n)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,n)}{const t=await WebAssembly.instantiate(e,n);return t instanceof WebAssembly.Instance?{instance:t,module:e}:t}}(await n,t);return function(e,n){return r=e.exports,K.__wbindgen_wasm_module=n,u=null,o=null,r.__wbindgen_start(),r}(i,_)}function Y(){return n(this,void 0,void 0,(function*(){const e=yield t(0,new URL("go_conn.wasm",import.meta.url),null,n);var n;const r=new Go,i=yield WebAssembly.instantiate(e,r.importObject);r.run(i)}))}function J(){return n(this,void 0,void 0,(function*(){const e=yield t(0,new URL("mix_fetch_wasm_bg.wasm",import.meta.url),null,n);var n;yield K(e),console.log("Loaded RUST WASM"),yield Y(),console.log("Loaded GO WASM"),r.set_panic_hook(),function(){const e={send_client_data:v,start_new_mixnet_connection:E,mix_fetch_initialised:R,finish_mixnet_connection:T};self.__rs_go_bridge__=e}()}))}"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_mixfetchdebug_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_remembermewasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_replysurbswasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_statsreportingwasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_topologywasm_free(e>>>0,1))),"undefined"==typeof FinalizationRegistry||new FinalizationRegistry((e=>r.__wbg_trafficwasm_free(e>>>0,1))),(()=>{const e=()=>{const e=new Error("not implemented");return e.code="ENOSYS",e};if(!globalThis.fs){let n="";globalThis.fs={constants:{O_WRONLY:-1,O_RDWR:-1,O_CREAT:-1,O_TRUNC:-1,O_APPEND:-1,O_EXCL:-1,O_DIRECTORY:-1},writeSync(e,r){n+=t.decode(r);const i=n.lastIndexOf("\n");return-1!=i&&(console.log(n.substring(0,i)),n=n.substring(i+1)),r.length},write(n,t,r,i,o,_){if(0!==r||i!==t.length||null!==o)return void _(e());_(null,this.writeSync(n,t))},chmod(n,t,r){r(e())},chown(n,t,r,i){i(e())},close(n,t){t(e())},fchmod(n,t,r){r(e())},fchown(n,t,r,i){i(e())},fstat(n,t){t(e())},fsync(e,n){n(null)},ftruncate(n,t,r){r(e())},lchown(n,t,r,i){i(e())},link(n,t,r){r(e())},lstat(n,t){t(e())},mkdir(n,t,r){r(e())},open(n,t,r,i){i(e())},read(n,t,r,i,o,_){_(e())},readdir(n,t){t(e())},readlink(n,t){t(e())},rename(n,t,r){r(e())},rmdir(n,t){t(e())},stat(n,t){t(e())},symlink(n,t,r){r(e())},truncate(n,t,r){r(e())},unlink(n,t){t(e())},utimes(n,t,r,i){i(e())}}}if(globalThis.process||(globalThis.process={getuid(){return-1},getgid(){return-1},geteuid(){return-1},getegid(){return-1},getgroups(){throw e()},pid:-1,ppid:-1,umask(){throw e()},cwd(){throw e()},chdir(){throw e()}}),globalThis.path||(globalThis.path={resolve(...e){return e.join("/")}}),!globalThis.crypto)throw new Error("globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)");if(!globalThis.performance)throw new Error("globalThis.performance is not available, polyfill required (performance.now only)");if(!globalThis.TextEncoder)throw new Error("globalThis.TextEncoder is not available, polyfill required");if(!globalThis.TextDecoder)throw new Error("globalThis.TextDecoder is not available, polyfill required");const n=new TextEncoder("utf-8"),t=new TextDecoder("utf-8");globalThis.Go=class{constructor(){this.argv=["js"],this.env={},this.exit=e=>{0!==e&&console.warn("exit code:",e)},this._exitPromise=new Promise((e=>{this._resolveExitPromise=e})),this._pendingEvent=null,this._scheduledTimeouts=new Map,this._nextCallbackTimeoutID=1;const e=(e,n)=>{this.mem.setUint32(e+0,n,!0),this.mem.setUint32(e+4,Math.floor(n/4294967296),!0)},r=e=>this.mem.getUint32(e+0,!0)+4294967296*this.mem.getInt32(e+4,!0),i=e=>{const n=this.mem.getFloat64(e,!0);if(0===n)return;if(!isNaN(n))return n;const t=this.mem.getUint32(e,!0);return this._values[t]},o=(e,n)=>{const t=2146959360;if("number"==typeof n&&0!==n)return isNaN(n)?(this.mem.setUint32(e+4,t,!0),void this.mem.setUint32(e,0,!0)):void this.mem.setFloat64(e,n,!0);if(void 0===n)return void this.mem.setFloat64(e,0,!0);let r=this._ids.get(n);void 0===r&&(r=this._idPool.pop(),void 0===r&&(r=this._values.length),this._values[r]=n,this._goRefCounts[r]=0,this._ids.set(n,r)),this._goRefCounts[r]++;let i=0;switch(typeof n){case"object":null!==n&&(i=1);break;case"string":i=2;break;case"symbol":i=3;break;case"function":i=4}this.mem.setUint32(e+4,t|i,!0),this.mem.setUint32(e,r,!0)},_=e=>{const n=r(e+0),t=r(e+8);return new Uint8Array(this._inst.exports.mem.buffer,n,t)},s=e=>{const n=r(e+0),t=r(e+8),o=new Array(t);for(let r=0;r<t;r++)o[r]=i(n+8*r);return o},c=e=>{const n=r(e+0),i=r(e+8);return t.decode(new DataView(this._inst.exports.mem.buffer,n,i))},a=Date.now()-performance.now();this.importObject={_gotest:{add:(e,n)=>e+n,callExport:(e,n)=>(this._inst.exports.testExport0(),this._inst.exports.testExport(e,n))},gojs:{"runtime.wasmExit":e=>{e>>>=0;const n=this.mem.getInt32(e+8,!0);this.exited=!0,delete this._inst,delete this._values,delete this._goRefCounts,delete this._ids,delete this._idPool,this.exit(n)},"runtime.wasmWrite":e=>{const n=r((e>>>=0)+8),t=r(e+16),i=this.mem.getInt32(e+24,!0);fs.writeSync(n,new Uint8Array(this._inst.exports.mem.buffer,t,i))},"runtime.resetMemoryDataView":e=>{this.mem=new DataView(this._inst.exports.mem.buffer)},"runtime.nanotime1":n=>{e((n>>>=0)+8,1e6*(a+performance.now()))},"runtime.walltime":n=>{n>>>=0;const t=(new Date).getTime();e(n+8,t/1e3),this.mem.setInt32(n+16,t%1e3*1e6,!0)},"runtime.scheduleTimeoutEvent":e=>{e>>>=0;const n=this._nextCallbackTimeoutID;this._nextCallbackTimeoutID++,this._scheduledTimeouts.set(n,setTimeout((()=>{for(this._resume();this._scheduledTimeouts.has(n);)console.warn("scheduleTimeoutEvent: missed timeout event"),this._resume()}),r(e+8))),this.mem.setInt32(e+16,n,!0)},"runtime.clearTimeoutEvent":e=>{e>>>=0;const n=this.mem.getInt32(e+8,!0);clearTimeout(this._scheduledTimeouts.get(n)),this._scheduledTimeouts.delete(n)},"runtime.getRandomData":e=>{e>>>=0,crypto.getRandomValues(_(e+8))},"syscall/js.finalizeRef":e=>{e>>>=0;const n=this.mem.getUint32(e+8,!0);if(this._goRefCounts[n]--,0===this._goRefCounts[n]){const e=this._values[n];this._values[n]=null,this._ids.delete(e),this._idPool.push(n)}},"syscall/js.stringVal":e=>{o((e>>>=0)+24,c(e+8))},"syscall/js.valueGet":e=>{e>>>=0;const n=Reflect.get(i(e+8),c(e+16));e=this._inst.exports.getsp()>>>0,o(e+32,n)},"syscall/js.valueSet":e=>{e>>>=0,Reflect.set(i(e+8),c(e+16),i(e+32))},"syscall/js.valueDelete":e=>{e>>>=0,Reflect.deleteProperty(i(e+8),c(e+16))},"syscall/js.valueIndex":e=>{o((e>>>=0)+24,Reflect.get(i(e+8),r(e+16)))},"syscall/js.valueSetIndex":e=>{e>>>=0,Reflect.set(i(e+8),r(e+16),i(e+24))},"syscall/js.valueCall":e=>{e>>>=0;try{const n=i(e+8),t=Reflect.get(n,c(e+16)),r=s(e+32),_=Reflect.apply(t,n,r);e=this._inst.exports.getsp()>>>0,o(e+56,_),this.mem.setUint8(e+64,1)}catch(n){e=this._inst.exports.getsp()>>>0,o(e+56,n),this.mem.setUint8(e+64,0)}},"syscall/js.valueInvoke":e=>{e>>>=0;try{const n=i(e+8),t=s(e+16),r=Reflect.apply(n,void 0,t);e=this._inst.exports.getsp()>>>0,o(e+40,r),this.mem.setUint8(e+48,1)}catch(n){e=this._inst.exports.getsp()>>>0,o(e+40,n),this.mem.setUint8(e+48,0)}},"syscall/js.valueNew":e=>{e>>>=0;try{const n=i(e+8),t=s(e+16),r=Reflect.construct(n,t);e=this._inst.exports.getsp()>>>0,o(e+40,r),this.mem.setUint8(e+48,1)}catch(n){e=this._inst.exports.getsp()>>>0,o(e+40,n),this.mem.setUint8(e+48,0)}},"syscall/js.valueLength":n=>{e((n>>>=0)+16,parseInt(i(n+8).length))},"syscall/js.valuePrepareString":t=>{t>>>=0;const r=n.encode(String(i(t+8)));o(t+16,r),e(t+24,r.length)},"syscall/js.valueLoadString":e=>{const n=i((e>>>=0)+8);_(e+16).set(n)},"syscall/js.valueInstanceOf":e=>{e>>>=0,this.mem.setUint8(e+24,i(e+8)instanceof i(e+16)?1:0)},"syscall/js.copyBytesToGo":n=>{const t=_((n>>>=0)+8),r=i(n+32);if(!(r instanceof Uint8Array||r instanceof Uint8ClampedArray))return void this.mem.setUint8(n+48,0);const o=r.subarray(0,t.length);t.set(o),e(n+40,o.length),this.mem.setUint8(n+48,1)},"syscall/js.copyBytesToJS":n=>{const t=i((n>>>=0)+8),r=_(n+16);if(!(t instanceof Uint8Array||t instanceof Uint8ClampedArray))return void this.mem.setUint8(n+48,0);const o=r.subarray(0,t.length);t.set(o),e(n+40,o.length),this.mem.setUint8(n+48,1)},debug:e=>{console.log(e)}}}}async run(e){if(!(e instanceof WebAssembly.Instance))throw new Error("Go.run: WebAssembly.Instance expected");this._inst=e,this.mem=new DataView(this._inst.exports.mem.buffer),this._values=[NaN,0,null,!0,!1,globalThis,this],this._goRefCounts=new Array(this._values.length).fill(1/0),this._ids=new Map([[0,1],[null,2],[!0,3],[!1,4],[globalThis,5],[this,6]]),this._idPool=[],this.exited=!1;let t=4096;const r=e=>{const r=t,i=n.encode(e+"\0");return new Uint8Array(this.mem.buffer,t,i.length).set(i),t+=i.length,t%8!=0&&(t+=8-t%8),r},i=this.argv.length,o=[];this.argv.forEach((e=>{o.push(r(e))})),o.push(0);Object.keys(this.env).sort().forEach((e=>{o.push(r(`${e}=${this.env[e]}`))})),o.push(0);const _=t;o.forEach((e=>{this.mem.setUint32(t,e,!0),this.mem.setUint32(t+4,0,!0),t+=8}));if(t>=12288)throw new Error("total length of command line and environment variables exceeds limit");this._inst.exports.run(i,_),this.exited&&this._resolveExitPromise(),await this._exitPromise}_resume(){if(this.exited)throw new Error("Go program has already exited");this._inst.exports.resume(),this.exited&&this._resolveExitPromise()}_makeFuncWrapper(e){const n=this;return function(){const t={id:e,this:this,args:arguments};return n._pendingEvent=t,n._resume(),t.result}}}})();const X=Symbol("Comlink.proxy"),Q=Symbol("Comlink.endpoint"),Z=Symbol("Comlink.releaseProxy"),ee=Symbol("Comlink.finalizer"),ne=Symbol("Comlink.thrown"),te=e=>"object"==typeof e&&null!==e||"function"==typeof e,re={canHandle:e=>te(e)&&e[X],serialize(e){const{port1:n,port2:t}=new MessageChannel;return oe(e,n),[t,[t]]},deserialize(e){return e.start(),function(e,n){const t=new Map;return e.addEventListener("message",(function(e){const{data:n}=e;if(!n||!n.id)return;const r=t.get(n.id);if(r)try{r(n)}finally{t.delete(n.id)}})),fe(e,t,[],n)}(e)}},ie=new Map([["proxy",re],["throw",{canHandle:e=>te(e)&&ne in e,serialize({value:e}){let n;return n=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[n,[]]},deserialize(e){if(e.isError)throw Object.assign(new Error(e.value.message),e.value);throw e.value}}]]);function oe(e,n=globalThis,t=["*"]){n.addEventListener("message",(function r(i){if(!i||!i.data)return;if(!function(e,n){for(const t of e){if(n===t||"*"===t)return!0;if(t instanceof RegExp&&t.test(n))return!0}return!1}(t,i.origin))return void console.warn(`Invalid origin '${i.origin}' for comlink proxy`);const{id:o,type:_,path:s}=Object.assign({path:[]},i.data),c=(i.data.argumentList||[]).map(we);let a;try{const n=s.slice(0,-1).reduce(((e,n)=>e[n]),e),t=s.reduce(((e,n)=>e[n]),e);switch(_){case"GET":a=t;break;case"SET":n[s.slice(-1)[0]]=we(i.data.value),a=!0;break;case"APPLY":a=t.apply(n,c);break;case"CONSTRUCT":a=function(e){return Object.assign(e,{[X]:!0})}(new t(...c));break;case"ENDPOINT":{const{port1:n,port2:t}=new MessageChannel;oe(e,t),a=function(e,n){return ge.set(e,n),e}(n,[n])}break;case"RELEASE":a=void 0;break;default:return}}catch(u){a={value:u,[ne]:0}}Promise.resolve(a).catch((e=>({value:e,[ne]:0}))).then((t=>{const[i,s]=le(t);n.postMessage(Object.assign(Object.assign({},i),{id:o}),s),"RELEASE"===_&&(n.removeEventListener("message",r),_e(n),ee in e&&"function"==typeof e[ee]&&e[ee]())})).catch((e=>{const[t,r]=le({value:new TypeError("Unserializable return value"),[ne]:0});n.postMessage(Object.assign(Object.assign({},t),{id:o}),r)}))})),n.start&&n.start()}function _e(e){(function(e){return"MessagePort"===e.constructor.name})(e)&&e.close()}function se(e){if(e)throw new Error("Proxy has been released and is not useable")}function ce(e){return de(e,new Map,{type:"RELEASE"}).then((()=>{_e(e)}))}const ae=new WeakMap,ue="FinalizationRegistry"in globalThis&&new FinalizationRegistry((e=>{const n=(ae.get(e)||0)-1;ae.set(e,n),0===n&&ce(e)}));function fe(e,n,t=[],r=function(){}){let i=!1;const o=new Proxy(r,{get(r,_){if(se(i),_===Z)return()=>{!function(e){ue&&ue.unregister(e)}(o),ce(e),n.clear(),i=!0};if("then"===_){if(0===t.length)return{then:()=>o};const r=de(e,n,{type:"GET",path:t.map((e=>e.toString()))}).then(we);return r.then.bind(r)}return fe(e,n,[...t,_])},set(r,o,_){se(i);const[s,c]=le(_);return de(e,n,{type:"SET",path:[...t,o].map((e=>e.toString())),value:s},c).then(we)},apply(r,o,_){se(i);const s=t[t.length-1];if(s===Q)return de(e,n,{type:"ENDPOINT"}).then(we);if("bind"===s)return fe(e,n,t.slice(0,-1));const[c,a]=be(_);return de(e,n,{type:"APPLY",path:t.map((e=>e.toString())),argumentList:c},a).then(we)},construct(r,o){se(i);const[_,s]=be(o);return de(e,n,{type:"CONSTRUCT",path:t.map((e=>e.toString())),argumentList:_},s).then(we)}});return function(e,n){const t=(ae.get(n)||0)+1;ae.set(n,t),ue&&ue.register(e,n,e)}(o,e),o}function be(e){const n=e.map(le);return[n.map((e=>e[0])),(t=n.map((e=>e[1])),Array.prototype.concat.apply([],t))];var t}const ge=new WeakMap;function le(e){for(const[n,t]of ie)if(t.canHandle(e)){const[r,i]=t.serialize(e);return[{type:"HANDLER",name:n,value:r},i]}return[{type:"RAW",value:e},ge.get(e)||[]]}function we(e){switch(e.type){case"HANDLER":return ie.get(e.name).deserialize(e.value);case"RAW":return e.value}}function de(e,n,t,r){return new Promise((i=>{const o=new Array(4).fill(0).map((()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16))).join("-");n.set(o,i),e.start&&e.start(),e.postMessage(Object.assign({id:o},t),r)}))}var me;!function(e){e.Loaded="Loaded"}(me||(me={}));const he={uint8array:["application/octet-stream"],json:["application/json","text/json",/application\/json.*/,/text\/json\+.*/],text:["text/plain",/text\/plain.*/,"text/html",/text\/html.*/],formData:["application/x-www-form-urlencoded","multipart/form-data"],blob:[/image\/.*/,/video\/.*/],fallback:"blob"},pe=(e,t)=>n(void 0,void 0,void 0,(function*(){switch(t){case"uint8array":return{uint8array:new Uint8Array(yield e.arrayBuffer())};case"json":case"text":return{text:yield e.text()};case"blob":{const n=yield e.blob();return{blobUrl:URL.createObjectURL(n)}}case"formData":{const n={},t=yield e.formData();for(const e of t.entries()){const[t,r]=e;n[t]=r}return{formData:n}}default:return{}}})),ye=(e,n)=>{if(!n)return!1;if(!e)return!1;for(let t=0;t<n.length;t+=1){const r=n[t];if("string"==typeof r&&e===r)return!0;if(r.test&&r.test(e))return!0}return!1},ve=(e,t)=>n(void 0,void 0,void 0,(function*(){const n=Object.assign(Object.assign({},he),t),r=(e=>{if(e)return e.headers.has("Content-Type")?e.headers.get("Content-Type"):e.headers.has("content-type")?e.headers.get("content-type"):void 0})(e);return r?ye(r,n.uint8array)?pe(e,"uint8array"):ye(r,n.json)?pe(e,"json"):ye(r,n.text)?pe(e,"text"):ye(r,n.formData)?pe(e,"formData"):ye(r,n.blob)?pe(e,"blob"):{}:e.body?pe(e,(null==t?void 0:t.fallback)||"blob"):{}})),xe=e=>self.postMessage(e);function Re(){return n(this,void 0,void 0,(function*(){const{mixFetch:e}=self;let t=he;oe({mixFetch:(r,i)=>n(this,void 0,void 0,(function*(){console.log("[Worker] --- mixFetch ---",{url:r,args:i});const n=yield e(r,i);console.log("[Worker]",{response:n,json:JSON.stringify(n,null,2)});const o=yield ve(n,t);console.log("[Worker]",{bodyResponse:o});const _={};n.headers.forEach(((e,n)=>{_[n]=e}));const s={body:o,url:n.url,headers:_,status:n.status,statusText:n.statusText,type:n.type,ok:n.ok,redirected:n.redirected};return console.log("[Worker]",{output:s}),s})),setupMixFetch:e=>n(this,void 0,void 0,(function*(){console.log("[Worker] --- setupMixFetch ---",{opts:e}),(null==e?void 0:e.responseBodyConfigMap)&&(t=e.responseBodyConfigMap),yield function(e){return r.setupMixFetch(e)}(e||{})})),disconnectMixFetch:()=>n(this,void 0,void 0,(function*(){console.log("[Worker] --- disconnectMixFetch ---"),yield r.disconnectMixFetch()}))}),xe({kind:me.Loaded,args:{loaded:!0}})}))}(function(){return n(this,void 0,void 0,(function*(){yield J(),yield Re()}))})().catch((e=>console.error("Unhandled exception in mixFetch worker",e)))}();