@edgex-web/components 0.1.0-beta.24 → 0.1.0-beta.26

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/index.esm.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var Ta = Object.defineProperty;
2
- var Na = (e, t, n) => t in e ? Ta(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var _e = (e, t, n) => Na(e, typeof t != "symbol" ? t + "" : t, n);
2
+ var Ca = (e, t, n) => t in e ? Ta(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var _e = (e, t, n) => Ca(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as j from "react";
5
- import z, { createContext as Se, useContext as he, useMemo as re, useCallback as X, forwardRef as io, createElement as An, useRef as ee, useEffect as ye, useState as te, useLayoutEffect as Bn, Fragment as ke, isValidElement as Ca, cloneElement as Aa, useId as Mt, useReducer as Pa, useSyncExternalStore as $a, useImperativeHandle as rs } from "react";
5
+ import z, { createContext as Se, useContext as he, useMemo as re, useCallback as X, forwardRef as io, createElement as Pn, useRef as ee, useEffect as ye, useState as te, useLayoutEffect as Bn, Fragment as ke, isValidElement as Na, cloneElement as Pa, useId as Mt, useReducer as Aa, useSyncExternalStore as $a, useImperativeHandle as rs } from "react";
6
6
  import * as on from "react-dom";
7
7
  import os, { createPortal as is, flushSync as tn } from "react-dom";
8
8
  function La(e) {
9
9
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
10
10
  }
11
- var Ar = { exports: {} }, Qt = {};
11
+ var Pr = { exports: {} }, Qt = {};
12
12
  /**
13
13
  * @license React
14
14
  * react-jsx-runtime.production.min.js
@@ -79,17 +79,17 @@ function Ia() {
79
79
  // with.
80
80
  $.$$typeof === v || $.getModuleId !== void 0));
81
81
  }
82
- function P($, B, Y) {
82
+ function A($, B, Y) {
83
83
  var Q = $.displayName;
84
84
  if (Q)
85
85
  return Q;
86
86
  var ae = B.displayName || B.name || "";
87
87
  return ae !== "" ? Y + "(" + ae + ")" : Y;
88
88
  }
89
- function A($) {
89
+ function P($) {
90
90
  return $.displayName || "Context";
91
91
  }
92
- function N($) {
92
+ function C($) {
93
93
  if ($ == null)
94
94
  return null;
95
95
  if (typeof $.tag == "number" && y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof $ == "function")
@@ -114,19 +114,19 @@ function Ia() {
114
114
  switch ($.$$typeof) {
115
115
  case c:
116
116
  var B = $;
117
- return A(B) + ".Consumer";
117
+ return P(B) + ".Consumer";
118
118
  case l:
119
119
  var Y = $;
120
- return A(Y._context) + ".Provider";
120
+ return P(Y._context) + ".Provider";
121
121
  case s:
122
- return P($, $.render, "ForwardRef");
122
+ return A($, $.render, "ForwardRef");
123
123
  case d:
124
124
  var Q = $.displayName || null;
125
- return Q !== null ? Q : N($.type) || "Memo";
125
+ return Q !== null ? Q : C($.type) || "Memo";
126
126
  case p: {
127
127
  var ae = $, ue = ae._payload, se = ae._init;
128
128
  try {
129
- return N(se(ue));
129
+ return C(se(ue));
130
130
  } catch {
131
131
  return null;
132
132
  }
@@ -134,14 +134,14 @@ function Ia() {
134
134
  }
135
135
  return null;
136
136
  }
137
- var E = Object.assign, S = 0, O, C, x, D, _, U, V;
137
+ var E = Object.assign, S = 0, O, N, x, D, _, U, V;
138
138
  function G() {
139
139
  }
140
140
  G.__reactDisabledLog = !0;
141
141
  function q() {
142
142
  {
143
143
  if (S === 0) {
144
- O = console.log, C = console.info, x = console.warn, D = console.error, _ = console.group, U = console.groupCollapsed, V = console.groupEnd;
144
+ O = console.log, N = console.info, x = console.warn, D = console.error, _ = console.group, U = console.groupCollapsed, V = console.groupEnd;
145
145
  var $ = {
146
146
  configurable: !0,
147
147
  enumerable: !0,
@@ -174,7 +174,7 @@ function Ia() {
174
174
  value: O
175
175
  }),
176
176
  info: E({}, $, {
177
- value: C
177
+ value: N
178
178
  }),
179
179
  warn: E({}, $, {
180
180
  value: x
@@ -210,16 +210,16 @@ function Ia() {
210
210
  ` + H + $;
211
211
  }
212
212
  }
213
- var fe = !1, Ae;
213
+ var fe = !1, Pe;
214
214
  {
215
- var Pe = typeof WeakMap == "function" ? WeakMap : Map;
216
- Ae = new Pe();
215
+ var Ae = typeof WeakMap == "function" ? WeakMap : Map;
216
+ Pe = new Ae();
217
217
  }
218
218
  function rt($, B) {
219
219
  if (!$ || fe)
220
220
  return "";
221
221
  {
222
- var Y = Ae.get($);
222
+ var Y = Pe.get($);
223
223
  if (Y !== void 0)
224
224
  return Y;
225
225
  }
@@ -264,17 +264,17 @@ function Ia() {
264
264
  } catch ($e) {
265
265
  if ($e && Q && typeof $e.stack == "string") {
266
266
  for (var oe = $e.stack.split(`
267
- `), Ne = Q.stack.split(`
268
- `), ve = oe.length - 1, be = Ne.length - 1; ve >= 1 && be >= 0 && oe[ve] !== Ne[be]; )
267
+ `), Ce = Q.stack.split(`
268
+ `), ve = oe.length - 1, be = Ce.length - 1; ve >= 1 && be >= 0 && oe[ve] !== Ce[be]; )
269
269
  be--;
270
270
  for (; ve >= 1 && be >= 0; ve--, be--)
271
- if (oe[ve] !== Ne[be]) {
271
+ if (oe[ve] !== Ce[be]) {
272
272
  if (ve !== 1 || be !== 1)
273
273
  do
274
- if (ve--, be--, be < 0 || oe[ve] !== Ne[be]) {
274
+ if (ve--, be--, be < 0 || oe[ve] !== Ce[be]) {
275
275
  var Be = `
276
276
  ` + oe[ve].replace(" at new ", " at ");
277
- return $.displayName && Be.includes("<anonymous>") && (Be = Be.replace("<anonymous>", $.displayName)), typeof $ == "function" && Ae.set($, Be), Be;
277
+ return $.displayName && Be.includes("<anonymous>") && (Be = Be.replace("<anonymous>", $.displayName)), typeof $ == "function" && Pe.set($, Be), Be;
278
278
  }
279
279
  while (ve >= 1 && be >= 0);
280
280
  break;
@@ -283,8 +283,8 @@ function Ia() {
283
283
  } finally {
284
284
  fe = !1, K.current = ue, W(), Error.prepareStackTrace = ae;
285
285
  }
286
- var kt = $ ? $.displayName || $.name : "", Ct = kt ? Z(kt) : "";
287
- return typeof $ == "function" && Ae.set($, Ct), Ct;
286
+ var kt = $ ? $.displayName || $.name : "", Nt = kt ? Z(kt) : "";
287
+ return typeof $ == "function" && Pe.set($, Nt), Nt;
288
288
  }
289
289
  function Oe($, B, Y) {
290
290
  return rt($, !1);
@@ -338,8 +338,8 @@ function Ia() {
338
338
  var oe = void 0;
339
339
  try {
340
340
  if (typeof $[se] != "function") {
341
- var Ne = Error((Q || "React class") + ": " + Y + " type `" + se + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof $[se] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
- throw Ne.name = "Invariant Violation", Ne;
341
+ var Ce = Error((Q || "React class") + ": " + Y + " type `" + se + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof $[se] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
+ throw Ce.name = "Invariant Violation", Ce;
343
343
  }
344
344
  oe = $[se](B, se, Q, Y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
345
345
  } catch (ve) {
@@ -451,8 +451,8 @@ function Ia() {
451
451
  };
452
452
  function ha($, B, Y, Q, ae) {
453
453
  {
454
- var ue, se = {}, oe = null, Ne = null;
455
- Y !== void 0 && (Uo(Y), oe = "" + Y), ua(B) && (Uo(B.key), oe = "" + B.key), ca(B) && (Ne = B.ref, fa(B, ae));
454
+ var ue, se = {}, oe = null, Ce = null;
455
+ Y !== void 0 && (Uo(Y), oe = "" + Y), ua(B) && (Uo(B.key), oe = "" + B.key), ca(B) && (Ce = B.ref, fa(B, ae));
456
456
  for (ue in B)
457
457
  Xt.call(B, ue) && !aa.hasOwnProperty(ue) && (se[ue] = B[ue]);
458
458
  if ($ && $.defaultProps) {
@@ -460,11 +460,11 @@ function Ia() {
460
460
  for (ue in ve)
461
461
  se[ue] === void 0 && (se[ue] = ve[ue]);
462
462
  }
463
- if (oe || Ne) {
463
+ if (oe || Ce) {
464
464
  var be = typeof $ == "function" ? $.displayName || $.name || "Unknown" : $;
465
- oe && da(se, be), Ne && pa(se, be);
465
+ oe && da(se, be), Ce && pa(se, be);
466
466
  }
467
- return ma($, oe, Ne, ae, Q, Vo.current, se);
467
+ return ma($, oe, Ce, ae, Q, Vo.current, se);
468
468
  }
469
469
  }
470
470
  var rr = L.ReactCurrentOwner, Go = L.ReactDebugCurrentFrame;
@@ -483,7 +483,7 @@ function Ia() {
483
483
  function Yo() {
484
484
  {
485
485
  if (rr.current) {
486
- var $ = N(rr.current.type);
486
+ var $ = C(rr.current.type);
487
487
  if ($)
488
488
  return `
489
489
 
@@ -518,7 +518,7 @@ Check the top-level render call using <` + Y + ">.");
518
518
  return;
519
519
  Ko[Y] = !0;
520
520
  var Q = "";
521
- $ && $._owner && $._owner !== rr.current && (Q = " It was passed a child from " + N($._owner.type) + "."), _t($), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', Y, Q), _t(null);
521
+ $ && $._owner && $._owner !== rr.current && (Q = " It was passed a child from " + C($._owner.type) + "."), _t($), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', Y, Q), _t(null);
522
522
  }
523
523
  }
524
524
  function Xo($, B) {
@@ -555,11 +555,11 @@ Check the top-level render call using <` + Y + ">.");
555
555
  else
556
556
  return;
557
557
  if (Y) {
558
- var Q = N(B);
558
+ var Q = C(B);
559
559
  oa(Y, $.props, "prop", Q, $);
560
560
  } else if (B.PropTypes !== void 0 && !or) {
561
561
  or = !0;
562
- var ae = N(B);
562
+ var ae = C(B);
563
563
  y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", ae || "Unknown");
564
564
  }
565
565
  typeof B.getDefaultProps == "function" && !B.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
@@ -584,10 +584,10 @@ Check the top-level render call using <` + Y + ">.");
584
584
  if (!se) {
585
585
  var oe = "";
586
586
  ($ === void 0 || typeof $ == "object" && $ !== null && Object.keys($).length === 0) && (oe += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
587
- var Ne = ga();
588
- Ne ? oe += Ne : oe += Yo();
587
+ var Ce = ga();
588
+ Ce ? oe += Ce : oe += Yo();
589
589
  var ve;
590
- $ === null ? ve = "null" : nr($) ? ve = "array" : $ !== void 0 && $.$$typeof === t ? (ve = "<" + (N($.type) || "Unknown") + " />", oe = " Did you accidentally export a JSX literal instead of a component?") : ve = typeof $, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ve, oe);
590
+ $ === null ? ve = "null" : nr($) ? ve = "array" : $ !== void 0 && $.$$typeof === t ? (ve = "<" + (C($.type) || "Unknown") + " />", oe = " Did you accidentally export a JSX literal instead of a component?") : ve = typeof $, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ve, oe);
591
591
  }
592
592
  var be = ha($, B, Y, ae, ue);
593
593
  if (be == null)
@@ -606,17 +606,17 @@ Check the top-level render call using <` + Y + ">.");
606
606
  Xo(Be, $);
607
607
  }
608
608
  if (Xt.call(B, "key")) {
609
- var Ct = N($), $e = Object.keys(B).filter(function(Oa) {
609
+ var Nt = C($), $e = Object.keys(B).filter(function(Oa) {
610
610
  return Oa !== "key";
611
611
  }), sr = $e.length > 0 ? "{key: someKey, " + $e.join(": ..., ") + ": ...}" : "{key: someKey}";
612
- if (!Qo[Ct + sr]) {
612
+ if (!Qo[Nt + sr]) {
613
613
  var Sa = $e.length > 0 ? "{" + $e.join(": ..., ") + ": ...}" : "{}";
614
614
  y(`A props object containing a "key" prop is being spread into JSX:
615
615
  let props = %s;
616
616
  <%s {...props} />
617
617
  React keys must be passed directly to JSX without using spread:
618
618
  let props = %s;
619
- <%s key={someKey} {...props} />`, sr, Ct, Sa, Ct), Qo[Ct + sr] = !0;
619
+ <%s key={someKey} {...props} />`, sr, Nt, Sa, Nt), Qo[Nt + sr] = !0;
620
620
  }
621
621
  }
622
622
  return $ === r ? xa(be) : ba(be), be;
@@ -632,8 +632,8 @@ React keys must be passed directly to JSX without using spread:
632
632
  Jt.Fragment = r, Jt.jsx = Ea, Jt.jsxs = Ra;
633
633
  }()), Jt;
634
634
  }
635
- process.env.NODE_ENV === "production" ? Ar.exports = Da() : Ar.exports = Ia();
636
- var R = Ar.exports;
635
+ process.env.NODE_ENV === "production" ? Pr.exports = Da() : Pr.exports = Ia();
636
+ var R = Pr.exports;
637
637
  const Ma = {
638
638
  // 充值相关
639
639
  deposit: {
@@ -648,6 +648,7 @@ const Ma = {
648
648
  max: "最大",
649
649
  arrivalTime: "到账时间",
650
650
  minDeposit: "最小充值金额",
651
+ minDepositParsed: "最少充值 {{amount}} {{token}}",
651
652
  maxDeposit: "最大充值金额",
652
653
  depositTipFor25w: "单笔充值金额上限为 250,000。若充值金额大于250,000,请使用Ethereum链充值。",
653
654
  depositAllTip: `仅支持发送 {{coin}} ({{v}}) 资产到此地址。
@@ -692,6 +693,7 @@ const Ma = {
692
693
  max: "Max",
693
694
  arrivalTime: "Arrival Time",
694
695
  minDeposit: "Minimum Deposit Amount",
696
+ minDepositParsed: "Min. Deposit {{amount}} {{token}}",
695
697
  maxDeposit: "Maximum Deposit Amount",
696
698
  depositTipFor25w: "The maximum amount per deposit is 250,000. If your deposit exceeds 250,000, please use the Ethereum chain.",
697
699
  depositAllTip: `Only {{coin}} ({{v}}) is supported for deposits to this address.
@@ -736,6 +738,7 @@ const Ma = {
736
738
  max: "最大",
737
739
  arrivalTime: "着金予定時間",
738
740
  minDeposit: "最低入金額",
741
+ minDepositParsed: "最低入金額 {{amount}} {{token}}",
739
742
  maxDeposit: "最大入金額",
740
743
  depositTipFor25w: "1回の入金上限額は250,000です。250,000を超える場合は、Ethereumチェーンでの入金をご利用ください。",
741
744
  depositAllTip: `このアドレスは{{coin}}({{v}})専用です。他通貨は送金しないでください。
@@ -780,6 +783,7 @@ const Ma = {
780
783
  max: "Максимум",
781
784
  arrivalTime: "Время поступления",
782
785
  minDeposit: "Минимальная сумма депозита",
786
+ minDepositParsed: "Мин. депозит {{amount}} {{token}}",
783
787
  maxDeposit: "Максимальная сумма депозита",
784
788
  depositTipFor25w: "Максимальная сумма одного пополнения — 250 000. Если сумма превышает 250 000, пожалуйста, используйте сеть Ethereum для пополнения.",
785
789
  depositAllTip: `На этот адрес можно внести только {{coin}} ({{v}}).
@@ -824,6 +828,7 @@ const Ma = {
824
828
  max: "最大",
825
829
  arrivalTime: "到帳時間",
826
830
  minDeposit: "最小儲值金額",
831
+ minDepositParsed: "最少充值 {{amount}} {{token}}",
827
832
  maxDeposit: "最大儲值金額",
828
833
  depositTipFor25w: "單筆充值金額上限為 250,000。若充值金額大於 250,000,請使用 Ethereum 鏈充值。",
829
834
  depositAllTip: `僅支援發送 {{coin}} ({{v}}) 資產到此位址。
@@ -866,18 +871,18 @@ const Ma = {
866
871
  "ru-RU": _a,
867
872
  "zh-CN": Ma,
868
873
  "zh-TW": ka
869
- }, Pr = "en-US", Fh = {
874
+ }, Ar = "en-US", Fh = {
870
875
  "en-US": "English",
871
876
  "zh-CN": "简体中文",
872
877
  "zh-TW": "繁體中文",
873
878
  "ja-JP": "日本語",
874
879
  "ru-RU": "Русский"
875
- }, Wa = (e) => ss.includes(e) ? ti[e] : ti[Pr], Ba = (e) => ss.includes(e), ls = Se(null), _h = ({
880
+ }, Wa = (e) => ss.includes(e) ? ti[e] : ti[Ar], Ba = (e) => ss.includes(e), ls = Se(null), _h = ({
876
881
  config: e,
877
882
  children: t
878
883
  }) => {
879
884
  const n = re(() => {
880
- const r = e.locale || Pr, o = Ba(r) ? r : Pr, i = Wa(o);
885
+ const r = e.locale || Ar, o = Ba(r) ? r : Ar, i = Wa(o);
881
886
  return {
882
887
  ...e,
883
888
  currentLocale: o,
@@ -905,7 +910,7 @@ function as(e) {
905
910
  suffix: ""
906
911
  }, w = "0123456789abcdefghijklmnopqrstuvwxyz", L = !0;
907
912
  function y(m, v) {
908
- var b, P, A, N, E, S, O, C, x = this;
913
+ var b, A, P, C, E, S, O, N, x = this;
909
914
  if (!(x instanceof y)) return new y(m, v);
910
915
  if (v == null) {
911
916
  if (m && m._isBigNumber === !0) {
@@ -914,58 +919,58 @@ function as(e) {
914
919
  }
915
920
  if ((S = typeof m == "number") && m * 0 == 0) {
916
921
  if (x.s = 1 / m < 0 ? (m = -m, -1) : 1, m === ~~m) {
917
- for (N = 0, E = m; E >= 10; E /= 10, N++) ;
918
- N > d ? x.c = x.e = null : (x.e = N, x.c = [m]);
922
+ for (C = 0, E = m; E >= 10; E /= 10, C++) ;
923
+ C > d ? x.c = x.e = null : (x.e = C, x.c = [m]);
919
924
  return;
920
925
  }
921
- C = String(m);
926
+ N = String(m);
922
927
  } else {
923
- if (!Va.test(C = String(m))) return r(x, C, S);
924
- x.s = C.charCodeAt(0) == 45 ? (C = C.slice(1), -1) : 1;
928
+ if (!Va.test(N = String(m))) return r(x, N, S);
929
+ x.s = N.charCodeAt(0) == 45 ? (N = N.slice(1), -1) : 1;
925
930
  }
926
- (N = C.indexOf(".")) > -1 && (C = C.replace(".", "")), (E = C.search(/e/i)) > 0 ? (N < 0 && (N = E), N += +C.slice(E + 1), C = C.substring(0, E)) : N < 0 && (N = C.length);
931
+ (C = N.indexOf(".")) > -1 && (N = N.replace(".", "")), (E = N.search(/e/i)) > 0 ? (C < 0 && (C = E), C += +N.slice(E + 1), N = N.substring(0, E)) : C < 0 && (C = N.length);
927
932
  } else {
928
933
  if (pe(v, 2, w.length, "Base"), v == 10 && L)
929
934
  return x = new y(m), F(x, l + x.e + 1, c);
930
- if (C = String(m), S = typeof m == "number") {
931
- if (m * 0 != 0) return r(x, C, S, v);
932
- if (x.s = 1 / m < 0 ? (C = C.slice(1), -1) : 1, y.DEBUG && C.replace(/^0\.0*|\./, "").length > 15)
935
+ if (N = String(m), S = typeof m == "number") {
936
+ if (m * 0 != 0) return r(x, N, S, v);
937
+ if (x.s = 1 / m < 0 ? (N = N.slice(1), -1) : 1, y.DEBUG && N.replace(/^0\.0*|\./, "").length > 15)
933
938
  throw Error(ni + m);
934
939
  } else
935
- x.s = C.charCodeAt(0) === 45 ? (C = C.slice(1), -1) : 1;
936
- for (b = w.slice(0, v), N = E = 0, O = C.length; E < O; E++)
937
- if (b.indexOf(P = C.charAt(E)) < 0) {
938
- if (P == ".") {
939
- if (E > N) {
940
- N = O;
940
+ x.s = N.charCodeAt(0) === 45 ? (N = N.slice(1), -1) : 1;
941
+ for (b = w.slice(0, v), C = E = 0, O = N.length; E < O; E++)
942
+ if (b.indexOf(A = N.charAt(E)) < 0) {
943
+ if (A == ".") {
944
+ if (E > C) {
945
+ C = O;
941
946
  continue;
942
947
  }
943
- } else if (!A && (C == C.toUpperCase() && (C = C.toLowerCase()) || C == C.toLowerCase() && (C = C.toUpperCase()))) {
944
- A = !0, E = -1, N = 0;
948
+ } else if (!P && (N == N.toUpperCase() && (N = N.toLowerCase()) || N == N.toLowerCase() && (N = N.toUpperCase()))) {
949
+ P = !0, E = -1, C = 0;
945
950
  continue;
946
951
  }
947
952
  return r(x, String(m), S, v);
948
953
  }
949
- S = !1, C = n(C, v, 10, x.s), (N = C.indexOf(".")) > -1 ? C = C.replace(".", "") : N = C.length;
954
+ S = !1, N = n(N, v, 10, x.s), (C = N.indexOf(".")) > -1 ? N = N.replace(".", "") : C = N.length;
950
955
  }
951
- for (E = 0; C.charCodeAt(E) === 48; E++) ;
952
- for (O = C.length; C.charCodeAt(--O) === 48; ) ;
953
- if (C = C.slice(E, ++O)) {
956
+ for (E = 0; N.charCodeAt(E) === 48; E++) ;
957
+ for (O = N.length; N.charCodeAt(--O) === 48; ) ;
958
+ if (N = N.slice(E, ++O)) {
954
959
  if (O -= E, S && y.DEBUG && O > 15 && (m > ar || m !== ze(m)))
955
960
  throw Error(ni + x.s * m);
956
- if ((N = N - E - 1) > d)
961
+ if ((C = C - E - 1) > d)
957
962
  x.c = x.e = null;
958
- else if (N < u)
963
+ else if (C < u)
959
964
  x.c = [x.e = 0];
960
965
  else {
961
- if (x.e = N, x.c = [], E = (N + 1) % J, N < 0 && (E += J), E < O) {
962
- for (E && x.c.push(+C.slice(0, E)), O -= J; E < O; )
963
- x.c.push(+C.slice(E, E += J));
964
- E = J - (C = C.slice(E)).length;
966
+ if (x.e = C, x.c = [], E = (C + 1) % J, C < 0 && (E += J), E < O) {
967
+ for (E && x.c.push(+N.slice(0, E)), O -= J; E < O; )
968
+ x.c.push(+N.slice(E, E += J));
969
+ E = J - (N = N.slice(E)).length;
965
970
  } else
966
971
  E -= O;
967
- for (; E--; C += "0") ;
968
- x.c.push(+C);
972
+ for (; E--; N += "0") ;
973
+ x.c.push(+N);
969
974
  }
970
975
  } else
971
976
  x.c = [x.e = 0];
@@ -1016,20 +1021,20 @@ function as(e) {
1016
1021
  }, y.isBigNumber = function(m) {
1017
1022
  if (!m || m._isBigNumber !== !0) return !1;
1018
1023
  if (!y.DEBUG) return !0;
1019
- var v, b, P = m.c, A = m.e, N = m.s;
1020
- e: if ({}.toString.call(P) == "[object Array]") {
1021
- if ((N === 1 || N === -1) && A >= -we && A <= we && A === ze(A)) {
1022
- if (P[0] === 0) {
1023
- if (A === 0 && P.length === 1) return !0;
1024
+ var v, b, A = m.c, P = m.e, C = m.s;
1025
+ e: if ({}.toString.call(A) == "[object Array]") {
1026
+ if ((C === 1 || C === -1) && P >= -we && P <= we && P === ze(P)) {
1027
+ if (A[0] === 0) {
1028
+ if (P === 0 && A.length === 1) return !0;
1024
1029
  break e;
1025
1030
  }
1026
- if (v = (A + 1) % J, v < 1 && (v += J), String(P[0]).length == v) {
1027
- for (v = 0; v < P.length; v++)
1028
- if (b = P[v], b < 0 || b >= Ze || b !== ze(b)) break e;
1031
+ if (v = (P + 1) % J, v < 1 && (v += J), String(A[0]).length == v) {
1032
+ for (v = 0; v < A.length; v++)
1033
+ if (b = A[v], b < 0 || b >= Ze || b !== ze(b)) break e;
1029
1034
  if (b !== 0) return !0;
1030
1035
  }
1031
1036
  }
1032
- } else if (P === null && A === null && (N === null || N === 1 || N === -1))
1037
+ } else if (A === null && P === null && (C === null || C === 1 || C === -1))
1033
1038
  return !0;
1034
1039
  throw Error(Le + "Invalid BigNumber: " + m);
1035
1040
  }, y.maximum = y.max = function() {
@@ -1043,115 +1048,115 @@ function as(e) {
1043
1048
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
1044
1049
  };
1045
1050
  return function(b) {
1046
- var P, A, N, E, S, O = 0, C = [], x = new y(i);
1051
+ var A, P, C, E, S, O = 0, N = [], x = new y(i);
1047
1052
  if (b == null ? b = l : pe(b, 0, we), E = lr(b / J), p)
1048
1053
  if (crypto.getRandomValues) {
1049
- for (P = crypto.getRandomValues(new Uint32Array(E *= 2)); O < E; )
1050
- S = P[O] * 131072 + (P[O + 1] >>> 11), S >= 9e15 ? (A = crypto.getRandomValues(new Uint32Array(2)), P[O] = A[0], P[O + 1] = A[1]) : (C.push(S % 1e14), O += 2);
1054
+ for (A = crypto.getRandomValues(new Uint32Array(E *= 2)); O < E; )
1055
+ S = A[O] * 131072 + (A[O + 1] >>> 11), S >= 9e15 ? (P = crypto.getRandomValues(new Uint32Array(2)), A[O] = P[0], A[O + 1] = P[1]) : (N.push(S % 1e14), O += 2);
1051
1056
  O = E / 2;
1052
1057
  } else if (crypto.randomBytes) {
1053
- for (P = crypto.randomBytes(E *= 7); O < E; )
1054
- S = (P[O] & 31) * 281474976710656 + P[O + 1] * 1099511627776 + P[O + 2] * 4294967296 + P[O + 3] * 16777216 + (P[O + 4] << 16) + (P[O + 5] << 8) + P[O + 6], S >= 9e15 ? crypto.randomBytes(7).copy(P, O) : (C.push(S % 1e14), O += 7);
1058
+ for (A = crypto.randomBytes(E *= 7); O < E; )
1059
+ S = (A[O] & 31) * 281474976710656 + A[O + 1] * 1099511627776 + A[O + 2] * 4294967296 + A[O + 3] * 16777216 + (A[O + 4] << 16) + (A[O + 5] << 8) + A[O + 6], S >= 9e15 ? crypto.randomBytes(7).copy(A, O) : (N.push(S % 1e14), O += 7);
1055
1060
  O = E / 7;
1056
1061
  } else
1057
1062
  throw p = !1, Error(Le + "crypto unavailable");
1058
1063
  if (!p)
1059
1064
  for (; O < E; )
1060
- S = v(), S < 9e15 && (C[O++] = S % 1e14);
1061
- for (E = C[--O], b %= J, E && b && (S = cr[J - b], C[O] = ze(E / S) * S); C[O] === 0; C.pop(), O--) ;
1065
+ S = v(), S < 9e15 && (N[O++] = S % 1e14);
1066
+ for (E = N[--O], b %= J, E && b && (S = cr[J - b], N[O] = ze(E / S) * S); N[O] === 0; N.pop(), O--) ;
1062
1067
  if (O < 0)
1063
- C = [N = 0];
1068
+ N = [C = 0];
1064
1069
  else {
1065
- for (N = -1; C[0] === 0; C.splice(0, 1), N -= J) ;
1066
- for (O = 1, S = C[0]; S >= 10; S /= 10, O++) ;
1067
- O < J && (N -= J - O);
1070
+ for (C = -1; N[0] === 0; N.splice(0, 1), C -= J) ;
1071
+ for (O = 1, S = N[0]; S >= 10; S /= 10, O++) ;
1072
+ O < J && (C -= J - O);
1068
1073
  }
1069
- return x.e = N, x.c = C, x;
1074
+ return x.e = C, x.c = N, x;
1070
1075
  };
1071
1076
  }(), y.sum = function() {
1072
1077
  for (var m = 1, v = arguments, b = new y(v[0]); m < v.length; ) b = b.plus(v[m++]);
1073
1078
  return b;
1074
1079
  }, n = /* @__PURE__ */ function() {
1075
1080
  var m = "0123456789";
1076
- function v(b, P, A, N) {
1077
- for (var E, S = [0], O, C = 0, x = b.length; C < x; ) {
1078
- for (O = S.length; O--; S[O] *= P) ;
1079
- for (S[0] += N.indexOf(b.charAt(C++)), E = 0; E < S.length; E++)
1080
- S[E] > A - 1 && (S[E + 1] == null && (S[E + 1] = 0), S[E + 1] += S[E] / A | 0, S[E] %= A);
1081
+ function v(b, A, P, C) {
1082
+ for (var E, S = [0], O, N = 0, x = b.length; N < x; ) {
1083
+ for (O = S.length; O--; S[O] *= A) ;
1084
+ for (S[0] += C.indexOf(b.charAt(N++)), E = 0; E < S.length; E++)
1085
+ S[E] > P - 1 && (S[E + 1] == null && (S[E + 1] = 0), S[E + 1] += S[E] / P | 0, S[E] %= P);
1081
1086
  }
1082
1087
  return S.reverse();
1083
1088
  }
1084
- return function(b, P, A, N, E) {
1085
- var S, O, C, x, D, _, U, V, G = b.indexOf("."), q = l, W = c;
1086
- for (G >= 0 && (x = h, h = 0, b = b.replace(".", ""), V = new y(P), _ = V.pow(b.length - G), h = x, V.c = v(
1089
+ return function(b, A, P, C, E) {
1090
+ var S, O, N, x, D, _, U, V, G = b.indexOf("."), q = l, W = c;
1091
+ for (G >= 0 && (x = h, h = 0, b = b.replace(".", ""), V = new y(A), _ = V.pow(b.length - G), h = x, V.c = v(
1087
1092
  pt(Ue(_.c), _.e, "0"),
1088
1093
  10,
1089
- A,
1094
+ P,
1090
1095
  m
1091
- ), V.e = V.c.length), U = v(b, P, A, E ? (S = w, m) : (S = m, w)), C = x = U.length; U[--x] == 0; U.pop()) ;
1096
+ ), V.e = V.c.length), U = v(b, A, P, E ? (S = w, m) : (S = m, w)), N = x = U.length; U[--x] == 0; U.pop()) ;
1092
1097
  if (!U[0]) return S.charAt(0);
1093
- if (G < 0 ? --C : (_.c = U, _.e = C, _.s = N, _ = t(_, V, q, W, A), U = _.c, D = _.r, C = _.e), O = C + q + 1, G = U[O], x = A / 2, D = D || O < 0 || U[O + 1] != null, D = W < 4 ? (G != null || D) && (W == 0 || W == (_.s < 0 ? 3 : 2)) : G > x || G == x && (W == 4 || D || W == 6 && U[O - 1] & 1 || W == (_.s < 0 ? 8 : 7)), O < 1 || !U[0])
1098
+ if (G < 0 ? --N : (_.c = U, _.e = N, _.s = C, _ = t(_, V, q, W, P), U = _.c, D = _.r, N = _.e), O = N + q + 1, G = U[O], x = P / 2, D = D || O < 0 || U[O + 1] != null, D = W < 4 ? (G != null || D) && (W == 0 || W == (_.s < 0 ? 3 : 2)) : G > x || G == x && (W == 4 || D || W == 6 && U[O - 1] & 1 || W == (_.s < 0 ? 8 : 7)), O < 1 || !U[0])
1094
1099
  b = D ? pt(S.charAt(1), -q, S.charAt(0)) : S.charAt(0);
1095
1100
  else {
1096
1101
  if (U.length = O, D)
1097
- for (--A; ++U[--O] > A; )
1098
- U[O] = 0, O || (++C, U = [1].concat(U));
1102
+ for (--P; ++U[--O] > P; )
1103
+ U[O] = 0, O || (++N, U = [1].concat(U));
1099
1104
  for (x = U.length; !U[--x]; ) ;
1100
1105
  for (G = 0, b = ""; G <= x; b += S.charAt(U[G++])) ;
1101
- b = pt(b, C, S.charAt(0));
1106
+ b = pt(b, N, S.charAt(0));
1102
1107
  }
1103
1108
  return b;
1104
1109
  };
1105
1110
  }(), t = /* @__PURE__ */ function() {
1106
- function m(P, A, N) {
1107
- var E, S, O, C, x = 0, D = P.length, _ = A % wt, U = A / wt | 0;
1108
- for (P = P.slice(); D--; )
1109
- O = P[D] % wt, C = P[D] / wt | 0, E = U * O + C * _, S = _ * O + E % wt * wt + x, x = (S / N | 0) + (E / wt | 0) + U * C, P[D] = S % N;
1110
- return x && (P = [x].concat(P)), P;
1111
+ function m(A, P, C) {
1112
+ var E, S, O, N, x = 0, D = A.length, _ = P % wt, U = P / wt | 0;
1113
+ for (A = A.slice(); D--; )
1114
+ O = A[D] % wt, N = A[D] / wt | 0, E = U * O + N * _, S = _ * O + E % wt * wt + x, x = (S / C | 0) + (E / wt | 0) + U * N, A[D] = S % C;
1115
+ return x && (A = [x].concat(A)), A;
1111
1116
  }
1112
- function v(P, A, N, E) {
1117
+ function v(A, P, C, E) {
1113
1118
  var S, O;
1114
- if (N != E)
1115
- O = N > E ? 1 : -1;
1119
+ if (C != E)
1120
+ O = C > E ? 1 : -1;
1116
1121
  else
1117
- for (S = O = 0; S < N; S++)
1118
- if (P[S] != A[S]) {
1119
- O = P[S] > A[S] ? 1 : -1;
1122
+ for (S = O = 0; S < C; S++)
1123
+ if (A[S] != P[S]) {
1124
+ O = A[S] > P[S] ? 1 : -1;
1120
1125
  break;
1121
1126
  }
1122
1127
  return O;
1123
1128
  }
1124
- function b(P, A, N, E) {
1125
- for (var S = 0; N--; )
1126
- P[N] -= S, S = P[N] < A[N] ? 1 : 0, P[N] = S * E + P[N] - A[N];
1127
- for (; !P[0] && P.length > 1; P.splice(0, 1)) ;
1129
+ function b(A, P, C, E) {
1130
+ for (var S = 0; C--; )
1131
+ A[C] -= S, S = A[C] < P[C] ? 1 : 0, A[C] = S * E + A[C] - P[C];
1132
+ for (; !A[0] && A.length > 1; A.splice(0, 1)) ;
1128
1133
  }
1129
- return function(P, A, N, E, S) {
1130
- var O, C, x, D, _, U, V, G, q, W, K, H, Z, fe, Ae, Pe, rt, Oe = P.s == A.s ? 1 : -1, xe = P.c, ce = A.c;
1134
+ return function(A, P, C, E, S) {
1135
+ var O, N, x, D, _, U, V, G, q, W, K, H, Z, fe, Pe, Ae, rt, Oe = A.s == P.s ? 1 : -1, xe = A.c, ce = P.c;
1131
1136
  if (!xe || !xe[0] || !ce || !ce[0])
1132
1137
  return new y(
1133
1138
  // Return NaN if either NaN, or both Infinity or 0.
1134
- !P.s || !A.s || (xe ? ce && xe[0] == ce[0] : !ce) ? NaN : (
1139
+ !A.s || !P.s || (xe ? ce && xe[0] == ce[0] : !ce) ? NaN : (
1135
1140
  // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
1136
1141
  xe && xe[0] == 0 || !ce ? Oe * 0 : Oe / 0
1137
1142
  )
1138
1143
  );
1139
- for (G = new y(Oe), q = G.c = [], C = P.e - A.e, Oe = N + C + 1, S || (S = Ze, C = He(P.e / J) - He(A.e / J), Oe = Oe / J | 0), x = 0; ce[x] == (xe[x] || 0); x++) ;
1140
- if (ce[x] > (xe[x] || 0) && C--, Oe < 0)
1144
+ for (G = new y(Oe), q = G.c = [], N = A.e - P.e, Oe = C + N + 1, S || (S = Ze, N = He(A.e / J) - He(P.e / J), Oe = Oe / J | 0), x = 0; ce[x] == (xe[x] || 0); x++) ;
1145
+ if (ce[x] > (xe[x] || 0) && N--, Oe < 0)
1141
1146
  q.push(1), D = !0;
1142
1147
  else {
1143
- for (fe = xe.length, Pe = ce.length, x = 0, Oe += 2, _ = ze(S / (ce[0] + 1)), _ > 1 && (ce = m(ce, _, S), xe = m(xe, _, S), Pe = ce.length, fe = xe.length), Z = Pe, W = xe.slice(0, Pe), K = W.length; K < Pe; W[K++] = 0) ;
1144
- rt = ce.slice(), rt = [0].concat(rt), Ae = ce[0], ce[1] >= S / 2 && Ae++;
1148
+ for (fe = xe.length, Ae = ce.length, x = 0, Oe += 2, _ = ze(S / (ce[0] + 1)), _ > 1 && (ce = m(ce, _, S), xe = m(xe, _, S), Ae = ce.length, fe = xe.length), Z = Ae, W = xe.slice(0, Ae), K = W.length; K < Ae; W[K++] = 0) ;
1149
+ rt = ce.slice(), rt = [0].concat(rt), Pe = ce[0], ce[1] >= S / 2 && Pe++;
1145
1150
  do {
1146
- if (_ = 0, O = v(ce, W, Pe, K), O < 0) {
1147
- if (H = W[0], Pe != K && (H = H * S + (W[1] || 0)), _ = ze(H / Ae), _ > 1)
1151
+ if (_ = 0, O = v(ce, W, Ae, K), O < 0) {
1152
+ if (H = W[0], Ae != K && (H = H * S + (W[1] || 0)), _ = ze(H / Pe), _ > 1)
1148
1153
  for (_ >= S && (_ = S - 1), U = m(ce, _, S), V = U.length, K = W.length; v(U, W, V, K) == 1; )
1149
- _--, b(U, Pe < V ? rt : ce, V, S), V = U.length, O = 1;
1154
+ _--, b(U, Ae < V ? rt : ce, V, S), V = U.length, O = 1;
1150
1155
  else
1151
1156
  _ == 0 && (O = _ = 1), U = ce.slice(), V = U.length;
1152
1157
  if (V < K && (U = [0].concat(U)), b(W, U, K, S), K = W.length, O == -1)
1153
- for (; v(ce, W, Pe, K) < 1; )
1154
- _++, b(W, Pe < K ? rt : ce, K, S), K = W.length;
1158
+ for (; v(ce, W, Ae, K) < 1; )
1159
+ _++, b(W, Ae < K ? rt : ce, K, S), K = W.length;
1155
1160
  } else O === 0 && (_++, W = [0]);
1156
1161
  q[x++] = _, W[0] ? W[K++] = xe[Z] || 0 : (W = [xe[Z]], K = 1);
1157
1162
  } while ((Z++ < fe || W[0] != null) && Oe--);
@@ -1159,89 +1164,89 @@ function as(e) {
1159
1164
  }
1160
1165
  if (S == Ze) {
1161
1166
  for (x = 1, Oe = q[0]; Oe >= 10; Oe /= 10, x++) ;
1162
- F(G, N + (G.e = x + C * J - 1) + 1, E, D);
1167
+ F(G, C + (G.e = x + N * J - 1) + 1, E, D);
1163
1168
  } else
1164
- G.e = C, G.r = +D;
1169
+ G.e = N, G.r = +D;
1165
1170
  return G;
1166
1171
  };
1167
1172
  }();
1168
- function T(m, v, b, P) {
1169
- var A, N, E, S, O;
1173
+ function T(m, v, b, A) {
1174
+ var P, C, E, S, O;
1170
1175
  if (b == null ? b = c : pe(b, 0, 8), !m.c) return m.toString();
1171
- if (A = m.c[0], E = m.e, v == null)
1172
- O = Ue(m.c), O = P == 1 || P == 2 && (E <= s || E >= a) ? vn(O, E) : pt(O, E, "0");
1173
- else if (m = F(new y(m), v, b), N = m.e, O = Ue(m.c), S = O.length, P == 1 || P == 2 && (v <= N || N <= s)) {
1176
+ if (P = m.c[0], E = m.e, v == null)
1177
+ O = Ue(m.c), O = A == 1 || A == 2 && (E <= s || E >= a) ? vn(O, E) : pt(O, E, "0");
1178
+ else if (m = F(new y(m), v, b), C = m.e, O = Ue(m.c), S = O.length, A == 1 || A == 2 && (v <= C || C <= s)) {
1174
1179
  for (; S < v; O += "0", S++) ;
1175
- O = vn(O, N);
1176
- } else if (v -= E + (P === 2 && N > E), O = pt(O, N, "0"), N + 1 > S) {
1180
+ O = vn(O, C);
1181
+ } else if (v -= E + (A === 2 && C > E), O = pt(O, C, "0"), C + 1 > S) {
1177
1182
  if (--v > 0) for (O += "."; v--; O += "0") ;
1178
- } else if (v += N - S, v > 0)
1179
- for (N + 1 == S && (O += "."); v--; O += "0") ;
1180
- return m.s < 0 && A ? "-" + O : O;
1183
+ } else if (v += C - S, v > 0)
1184
+ for (C + 1 == S && (O += "."); v--; O += "0") ;
1185
+ return m.s < 0 && P ? "-" + O : O;
1181
1186
  }
1182
1187
  function I(m, v) {
1183
- for (var b, P, A = 1, N = new y(m[0]); A < m.length; A++)
1184
- P = new y(m[A]), (!P.s || (b = At(N, P)) === v || b === 0 && N.s === v) && (N = P);
1185
- return N;
1188
+ for (var b, A, P = 1, C = new y(m[0]); P < m.length; P++)
1189
+ A = new y(m[P]), (!A.s || (b = Pt(C, A)) === v || b === 0 && C.s === v) && (C = A);
1190
+ return C;
1186
1191
  }
1187
1192
  function M(m, v, b) {
1188
- for (var P = 1, A = v.length; !v[--A]; v.pop()) ;
1189
- for (A = v[0]; A >= 10; A /= 10, P++) ;
1190
- return (b = P + b * J - 1) > d ? m.c = m.e = null : b < u ? m.c = [m.e = 0] : (m.e = b, m.c = v), m;
1193
+ for (var A = 1, P = v.length; !v[--P]; v.pop()) ;
1194
+ for (P = v[0]; P >= 10; P /= 10, A++) ;
1195
+ return (b = A + b * J - 1) > d ? m.c = m.e = null : b < u ? m.c = [m.e = 0] : (m.e = b, m.c = v), m;
1191
1196
  }
1192
1197
  r = /* @__PURE__ */ function() {
1193
- var m = /^(-?)0([xbo])(?=\w[\w.]*$)/i, v = /^([^.]+)\.$/, b = /^\.([^.]+)$/, P = /^-?(Infinity|NaN)$/, A = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1194
- return function(N, E, S, O) {
1195
- var C, x = S ? E : E.replace(A, "");
1196
- if (P.test(x))
1197
- N.s = isNaN(x) ? null : x < 0 ? -1 : 1;
1198
+ var m = /^(-?)0([xbo])(?=\w[\w.]*$)/i, v = /^([^.]+)\.$/, b = /^\.([^.]+)$/, A = /^-?(Infinity|NaN)$/, P = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
1199
+ return function(C, E, S, O) {
1200
+ var N, x = S ? E : E.replace(P, "");
1201
+ if (A.test(x))
1202
+ C.s = isNaN(x) ? null : x < 0 ? -1 : 1;
1198
1203
  else {
1199
1204
  if (!S && (x = x.replace(m, function(D, _, U) {
1200
- return C = (U = U.toLowerCase()) == "x" ? 16 : U == "b" ? 2 : 8, !O || O == C ? _ : D;
1201
- }), O && (C = O, x = x.replace(v, "$1").replace(b, "0.$1")), E != x))
1202
- return new y(x, C);
1205
+ return N = (U = U.toLowerCase()) == "x" ? 16 : U == "b" ? 2 : 8, !O || O == N ? _ : D;
1206
+ }), O && (N = O, x = x.replace(v, "$1").replace(b, "0.$1")), E != x))
1207
+ return new y(x, N);
1203
1208
  if (y.DEBUG)
1204
1209
  throw Error(Le + "Not a" + (O ? " base " + O : "") + " number: " + E);
1205
- N.s = null;
1210
+ C.s = null;
1206
1211
  }
1207
- N.c = N.e = null;
1212
+ C.c = C.e = null;
1208
1213
  };
1209
1214
  }();
1210
- function F(m, v, b, P) {
1211
- var A, N, E, S, O, C, x, D = m.c, _ = cr;
1215
+ function F(m, v, b, A) {
1216
+ var P, C, E, S, O, N, x, D = m.c, _ = cr;
1212
1217
  if (D) {
1213
1218
  e: {
1214
- for (A = 1, S = D[0]; S >= 10; S /= 10, A++) ;
1215
- if (N = v - A, N < 0)
1216
- N += J, E = v, O = D[C = 0], x = ze(O / _[A - E - 1] % 10);
1217
- else if (C = lr((N + 1) / J), C >= D.length)
1218
- if (P) {
1219
- for (; D.length <= C; D.push(0)) ;
1220
- O = x = 0, A = 1, N %= J, E = N - J + 1;
1219
+ for (P = 1, S = D[0]; S >= 10; S /= 10, P++) ;
1220
+ if (C = v - P, C < 0)
1221
+ C += J, E = v, O = D[N = 0], x = ze(O / _[P - E - 1] % 10);
1222
+ else if (N = lr((C + 1) / J), N >= D.length)
1223
+ if (A) {
1224
+ for (; D.length <= N; D.push(0)) ;
1225
+ O = x = 0, P = 1, C %= J, E = C - J + 1;
1221
1226
  } else
1222
1227
  break e;
1223
1228
  else {
1224
- for (O = S = D[C], A = 1; S >= 10; S /= 10, A++) ;
1225
- N %= J, E = N - J + A, x = E < 0 ? 0 : ze(O / _[A - E - 1] % 10);
1229
+ for (O = S = D[N], P = 1; S >= 10; S /= 10, P++) ;
1230
+ C %= J, E = C - J + P, x = E < 0 ? 0 : ze(O / _[P - E - 1] % 10);
1226
1231
  }
1227
- if (P = P || v < 0 || // Are there any non-zero digits after the rounding digit?
1232
+ if (A = A || v < 0 || // Are there any non-zero digits after the rounding digit?
1228
1233
  // The expression n % pows10[d - j - 1] returns all digits of n to the right
1229
1234
  // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
1230
- D[C + 1] != null || (E < 0 ? O : O % _[A - E - 1]), P = b < 4 ? (x || P) && (b == 0 || b == (m.s < 0 ? 3 : 2)) : x > 5 || x == 5 && (b == 4 || P || b == 6 && // Check whether the digit to the left of the rounding digit is odd.
1231
- (N > 0 ? E > 0 ? O / _[A - E] : 0 : D[C - 1]) % 10 & 1 || b == (m.s < 0 ? 8 : 7)), v < 1 || !D[0])
1232
- return D.length = 0, P ? (v -= m.e + 1, D[0] = _[(J - v % J) % J], m.e = -v || 0) : D[0] = m.e = 0, m;
1233
- if (N == 0 ? (D.length = C, S = 1, C--) : (D.length = C + 1, S = _[J - N], D[C] = E > 0 ? ze(O / _[A - E] % _[E]) * S : 0), P)
1235
+ D[N + 1] != null || (E < 0 ? O : O % _[P - E - 1]), A = b < 4 ? (x || A) && (b == 0 || b == (m.s < 0 ? 3 : 2)) : x > 5 || x == 5 && (b == 4 || A || b == 6 && // Check whether the digit to the left of the rounding digit is odd.
1236
+ (C > 0 ? E > 0 ? O / _[P - E] : 0 : D[N - 1]) % 10 & 1 || b == (m.s < 0 ? 8 : 7)), v < 1 || !D[0])
1237
+ return D.length = 0, A ? (v -= m.e + 1, D[0] = _[(J - v % J) % J], m.e = -v || 0) : D[0] = m.e = 0, m;
1238
+ if (C == 0 ? (D.length = N, S = 1, N--) : (D.length = N + 1, S = _[J - C], D[N] = E > 0 ? ze(O / _[P - E] % _[E]) * S : 0), A)
1234
1239
  for (; ; )
1235
- if (C == 0) {
1236
- for (N = 1, E = D[0]; E >= 10; E /= 10, N++) ;
1240
+ if (N == 0) {
1241
+ for (C = 1, E = D[0]; E >= 10; E /= 10, C++) ;
1237
1242
  for (E = D[0] += S, S = 1; E >= 10; E /= 10, S++) ;
1238
- N != S && (m.e++, D[0] == Ze && (D[0] = 1));
1243
+ C != S && (m.e++, D[0] == Ze && (D[0] = 1));
1239
1244
  break;
1240
1245
  } else {
1241
- if (D[C] += S, D[C] != Ze) break;
1242
- D[C--] = 0, S = 1;
1246
+ if (D[N] += S, D[N] != Ze) break;
1247
+ D[N--] = 0, S = 1;
1243
1248
  }
1244
- for (N = D.length; D[--N] === 0; D.pop()) ;
1249
+ for (C = D.length; D[--C] === 0; D.pop()) ;
1245
1250
  }
1246
1251
  m.e > d ? m.c = m.e = null : m.e < u && (m.c = [m.e = 0]);
1247
1252
  }
@@ -1255,66 +1260,66 @@ function as(e) {
1255
1260
  var m = new y(this);
1256
1261
  return m.s < 0 && (m.s = 1), m;
1257
1262
  }, o.comparedTo = function(m, v) {
1258
- return At(this, new y(m, v));
1263
+ return Pt(this, new y(m, v));
1259
1264
  }, o.decimalPlaces = o.dp = function(m, v) {
1260
- var b, P, A, N = this;
1265
+ var b, A, P, C = this;
1261
1266
  if (m != null)
1262
- return pe(m, 0, we), v == null ? v = c : pe(v, 0, 8), F(new y(N), m + N.e + 1, v);
1263
- if (!(b = N.c)) return null;
1264
- if (P = ((A = b.length - 1) - He(this.e / J)) * J, A = b[A]) for (; A % 10 == 0; A /= 10, P--) ;
1265
- return P < 0 && (P = 0), P;
1267
+ return pe(m, 0, we), v == null ? v = c : pe(v, 0, 8), F(new y(C), m + C.e + 1, v);
1268
+ if (!(b = C.c)) return null;
1269
+ if (A = ((P = b.length - 1) - He(this.e / J)) * J, P = b[P]) for (; P % 10 == 0; P /= 10, A--) ;
1270
+ return A < 0 && (A = 0), A;
1266
1271
  }, o.dividedBy = o.div = function(m, v) {
1267
1272
  return t(this, new y(m, v), l, c);
1268
1273
  }, o.dividedToIntegerBy = o.idiv = function(m, v) {
1269
1274
  return t(this, new y(m, v), 0, 1);
1270
1275
  }, o.exponentiatedBy = o.pow = function(m, v) {
1271
- var b, P, A, N, E, S, O, C, x, D = this;
1276
+ var b, A, P, C, E, S, O, N, x, D = this;
1272
1277
  if (m = new y(m), m.c && !m.isInteger())
1273
1278
  throw Error(Le + "Exponent not an integer: " + k(m));
1274
1279
  if (v != null && (v = new y(v)), S = m.e > 14, !D.c || !D.c[0] || D.c[0] == 1 && !D.e && D.c.length == 1 || !m.c || !m.c[0])
1275
1280
  return x = new y(Math.pow(+k(D), S ? m.s * (2 - gn(m)) : +k(m))), v ? x.mod(v) : x;
1276
1281
  if (O = m.s < 0, v) {
1277
1282
  if (v.c ? !v.c[0] : !v.s) return new y(NaN);
1278
- P = !O && D.isInteger() && v.isInteger(), P && (D = D.mod(v));
1283
+ A = !O && D.isInteger() && v.isInteger(), A && (D = D.mod(v));
1279
1284
  } else {
1280
1285
  if (m.e > 9 && (D.e > 0 || D.e < -1 || (D.e == 0 ? D.c[0] > 1 || S && D.c[1] >= 24e7 : D.c[0] < 8e13 || S && D.c[0] <= 9999975e7)))
1281
- return N = D.s < 0 && gn(m) ? -0 : 0, D.e > -1 && (N = 1 / N), new y(O ? 1 / N : N);
1282
- h && (N = lr(h / J + 2));
1286
+ return C = D.s < 0 && gn(m) ? -0 : 0, D.e > -1 && (C = 1 / C), new y(O ? 1 / C : C);
1287
+ h && (C = lr(h / J + 2));
1283
1288
  }
1284
- for (S ? (b = new y(0.5), O && (m.s = 1), C = gn(m)) : (A = Math.abs(+k(m)), C = A % 2), x = new y(i); ; ) {
1285
- if (C) {
1289
+ for (S ? (b = new y(0.5), O && (m.s = 1), N = gn(m)) : (P = Math.abs(+k(m)), N = P % 2), x = new y(i); ; ) {
1290
+ if (N) {
1286
1291
  if (x = x.times(D), !x.c) break;
1287
- N ? x.c.length > N && (x.c.length = N) : P && (x = x.mod(v));
1292
+ C ? x.c.length > C && (x.c.length = C) : A && (x = x.mod(v));
1288
1293
  }
1289
- if (A) {
1290
- if (A = ze(A / 2), A === 0) break;
1291
- C = A % 2;
1294
+ if (P) {
1295
+ if (P = ze(P / 2), P === 0) break;
1296
+ N = P % 2;
1292
1297
  } else if (m = m.times(b), F(m, m.e + 1, 1), m.e > 14)
1293
- C = gn(m);
1298
+ N = gn(m);
1294
1299
  else {
1295
- if (A = +k(m), A === 0) break;
1296
- C = A % 2;
1300
+ if (P = +k(m), P === 0) break;
1301
+ N = P % 2;
1297
1302
  }
1298
- D = D.times(D), N ? D.c && D.c.length > N && (D.c.length = N) : P && (D = D.mod(v));
1303
+ D = D.times(D), C ? D.c && D.c.length > C && (D.c.length = C) : A && (D = D.mod(v));
1299
1304
  }
1300
- return P ? x : (O && (x = i.div(x)), v ? x.mod(v) : N ? F(x, h, c, E) : x);
1305
+ return A ? x : (O && (x = i.div(x)), v ? x.mod(v) : C ? F(x, h, c, E) : x);
1301
1306
  }, o.integerValue = function(m) {
1302
1307
  var v = new y(this);
1303
1308
  return m == null ? m = c : pe(m, 0, 8), F(v, v.e + 1, m);
1304
1309
  }, o.isEqualTo = o.eq = function(m, v) {
1305
- return At(this, new y(m, v)) === 0;
1310
+ return Pt(this, new y(m, v)) === 0;
1306
1311
  }, o.isFinite = function() {
1307
1312
  return !!this.c;
1308
1313
  }, o.isGreaterThan = o.gt = function(m, v) {
1309
- return At(this, new y(m, v)) > 0;
1314
+ return Pt(this, new y(m, v)) > 0;
1310
1315
  }, o.isGreaterThanOrEqualTo = o.gte = function(m, v) {
1311
- return (v = At(this, new y(m, v))) === 1 || v === 0;
1316
+ return (v = Pt(this, new y(m, v))) === 1 || v === 0;
1312
1317
  }, o.isInteger = function() {
1313
1318
  return !!this.c && He(this.e / J) > this.c.length - 2;
1314
1319
  }, o.isLessThan = o.lt = function(m, v) {
1315
- return At(this, new y(m, v)) < 0;
1320
+ return Pt(this, new y(m, v)) < 0;
1316
1321
  }, o.isLessThanOrEqualTo = o.lte = function(m, v) {
1317
- return (v = At(this, new y(m, v))) === -1 || v === 0;
1322
+ return (v = Pt(this, new y(m, v))) === -1 || v === 0;
1318
1323
  }, o.isNaN = function() {
1319
1324
  return !this.s;
1320
1325
  }, o.isNegative = function() {
@@ -1324,12 +1329,12 @@ function as(e) {
1324
1329
  }, o.isZero = function() {
1325
1330
  return !!this.c && this.c[0] == 0;
1326
1331
  }, o.minus = function(m, v) {
1327
- var b, P, A, N, E = this, S = E.s;
1332
+ var b, A, P, C, E = this, S = E.s;
1328
1333
  if (m = new y(m, v), v = m.s, !S || !v) return new y(NaN);
1329
1334
  if (S != v)
1330
1335
  return m.s = -v, E.plus(m);
1331
- var O = E.e / J, C = m.e / J, x = E.c, D = m.c;
1332
- if (!O || !C) {
1336
+ var O = E.e / J, N = m.e / J, x = E.c, D = m.c;
1337
+ if (!O || !N) {
1333
1338
  if (!x || !D) return x ? (m.s = -v, m) : new y(D ? E : NaN);
1334
1339
  if (!x[0] || !D[0])
1335
1340
  return D[0] ? (m.s = -v, m) : new y(x[0] ? E : (
@@ -1337,86 +1342,86 @@ function as(e) {
1337
1342
  c == 3 ? -0 : 0
1338
1343
  ));
1339
1344
  }
1340
- if (O = He(O), C = He(C), x = x.slice(), S = O - C) {
1341
- for ((N = S < 0) ? (S = -S, A = x) : (C = O, A = D), A.reverse(), v = S; v--; A.push(0)) ;
1342
- A.reverse();
1345
+ if (O = He(O), N = He(N), x = x.slice(), S = O - N) {
1346
+ for ((C = S < 0) ? (S = -S, P = x) : (N = O, P = D), P.reverse(), v = S; v--; P.push(0)) ;
1347
+ P.reverse();
1343
1348
  } else
1344
- for (P = (N = (S = x.length) < (v = D.length)) ? S : v, S = v = 0; v < P; v++)
1349
+ for (A = (C = (S = x.length) < (v = D.length)) ? S : v, S = v = 0; v < A; v++)
1345
1350
  if (x[v] != D[v]) {
1346
- N = x[v] < D[v];
1351
+ C = x[v] < D[v];
1347
1352
  break;
1348
1353
  }
1349
- if (N && (A = x, x = D, D = A, m.s = -m.s), v = (P = D.length) - (b = x.length), v > 0) for (; v--; x[b++] = 0) ;
1350
- for (v = Ze - 1; P > S; ) {
1351
- if (x[--P] < D[P]) {
1352
- for (b = P; b && !x[--b]; x[b] = v) ;
1353
- --x[b], x[P] += Ze;
1354
+ if (C && (P = x, x = D, D = P, m.s = -m.s), v = (A = D.length) - (b = x.length), v > 0) for (; v--; x[b++] = 0) ;
1355
+ for (v = Ze - 1; A > S; ) {
1356
+ if (x[--A] < D[A]) {
1357
+ for (b = A; b && !x[--b]; x[b] = v) ;
1358
+ --x[b], x[A] += Ze;
1354
1359
  }
1355
- x[P] -= D[P];
1360
+ x[A] -= D[A];
1356
1361
  }
1357
- for (; x[0] == 0; x.splice(0, 1), --C) ;
1358
- return x[0] ? M(m, x, C) : (m.s = c == 3 ? -1 : 1, m.c = [m.e = 0], m);
1362
+ for (; x[0] == 0; x.splice(0, 1), --N) ;
1363
+ return x[0] ? M(m, x, N) : (m.s = c == 3 ? -1 : 1, m.c = [m.e = 0], m);
1359
1364
  }, o.modulo = o.mod = function(m, v) {
1360
- var b, P, A = this;
1361
- return m = new y(m, v), !A.c || !m.s || m.c && !m.c[0] ? new y(NaN) : !m.c || A.c && !A.c[0] ? new y(A) : (f == 9 ? (P = m.s, m.s = 1, b = t(A, m, 0, 3), m.s = P, b.s *= P) : b = t(A, m, 0, f), m = A.minus(b.times(m)), !m.c[0] && f == 1 && (m.s = A.s), m);
1365
+ var b, A, P = this;
1366
+ return m = new y(m, v), !P.c || !m.s || m.c && !m.c[0] ? new y(NaN) : !m.c || P.c && !P.c[0] ? new y(P) : (f == 9 ? (A = m.s, m.s = 1, b = t(P, m, 0, 3), m.s = A, b.s *= A) : b = t(P, m, 0, f), m = P.minus(b.times(m)), !m.c[0] && f == 1 && (m.s = P.s), m);
1362
1367
  }, o.multipliedBy = o.times = function(m, v) {
1363
- var b, P, A, N, E, S, O, C, x, D, _, U, V, G, q, W = this, K = W.c, H = (m = new y(m, v)).c;
1368
+ var b, A, P, C, E, S, O, N, x, D, _, U, V, G, q, W = this, K = W.c, H = (m = new y(m, v)).c;
1364
1369
  if (!K || !H || !K[0] || !H[0])
1365
1370
  return !W.s || !m.s || K && !K[0] && !H || H && !H[0] && !K ? m.c = m.e = m.s = null : (m.s *= W.s, !K || !H ? m.c = m.e = null : (m.c = [0], m.e = 0)), m;
1366
- for (P = He(W.e / J) + He(m.e / J), m.s *= W.s, O = K.length, D = H.length, O < D && (V = K, K = H, H = V, A = O, O = D, D = A), A = O + D, V = []; A--; V.push(0)) ;
1367
- for (G = Ze, q = wt, A = D; --A >= 0; ) {
1368
- for (b = 0, _ = H[A] % q, U = H[A] / q | 0, E = O, N = A + E; N > A; )
1369
- C = K[--E] % q, x = K[E] / q | 0, S = U * C + x * _, C = _ * C + S % q * q + V[N] + b, b = (C / G | 0) + (S / q | 0) + U * x, V[N--] = C % G;
1370
- V[N] = b;
1371
+ for (A = He(W.e / J) + He(m.e / J), m.s *= W.s, O = K.length, D = H.length, O < D && (V = K, K = H, H = V, P = O, O = D, D = P), P = O + D, V = []; P--; V.push(0)) ;
1372
+ for (G = Ze, q = wt, P = D; --P >= 0; ) {
1373
+ for (b = 0, _ = H[P] % q, U = H[P] / q | 0, E = O, C = P + E; C > P; )
1374
+ N = K[--E] % q, x = K[E] / q | 0, S = U * N + x * _, N = _ * N + S % q * q + V[C] + b, b = (N / G | 0) + (S / q | 0) + U * x, V[C--] = N % G;
1375
+ V[C] = b;
1371
1376
  }
1372
- return b ? ++P : V.splice(0, 1), M(m, V, P);
1377
+ return b ? ++A : V.splice(0, 1), M(m, V, A);
1373
1378
  }, o.negated = function() {
1374
1379
  var m = new y(this);
1375
1380
  return m.s = -m.s || null, m;
1376
1381
  }, o.plus = function(m, v) {
1377
- var b, P = this, A = P.s;
1378
- if (m = new y(m, v), v = m.s, !A || !v) return new y(NaN);
1379
- if (A != v)
1380
- return m.s = -v, P.minus(m);
1381
- var N = P.e / J, E = m.e / J, S = P.c, O = m.c;
1382
- if (!N || !E) {
1383
- if (!S || !O) return new y(A / 0);
1384
- if (!S[0] || !O[0]) return O[0] ? m : new y(S[0] ? P : A * 0);
1385
- }
1386
- if (N = He(N), E = He(E), S = S.slice(), A = N - E) {
1387
- for (A > 0 ? (E = N, b = O) : (A = -A, b = S), b.reverse(); A--; b.push(0)) ;
1382
+ var b, A = this, P = A.s;
1383
+ if (m = new y(m, v), v = m.s, !P || !v) return new y(NaN);
1384
+ if (P != v)
1385
+ return m.s = -v, A.minus(m);
1386
+ var C = A.e / J, E = m.e / J, S = A.c, O = m.c;
1387
+ if (!C || !E) {
1388
+ if (!S || !O) return new y(P / 0);
1389
+ if (!S[0] || !O[0]) return O[0] ? m : new y(S[0] ? A : P * 0);
1390
+ }
1391
+ if (C = He(C), E = He(E), S = S.slice(), P = C - E) {
1392
+ for (P > 0 ? (E = C, b = O) : (P = -P, b = S), b.reverse(); P--; b.push(0)) ;
1388
1393
  b.reverse();
1389
1394
  }
1390
- for (A = S.length, v = O.length, A - v < 0 && (b = O, O = S, S = b, v = A), A = 0; v; )
1391
- A = (S[--v] = S[v] + O[v] + A) / Ze | 0, S[v] = Ze === S[v] ? 0 : S[v] % Ze;
1392
- return A && (S = [A].concat(S), ++E), M(m, S, E);
1395
+ for (P = S.length, v = O.length, P - v < 0 && (b = O, O = S, S = b, v = P), P = 0; v; )
1396
+ P = (S[--v] = S[v] + O[v] + P) / Ze | 0, S[v] = Ze === S[v] ? 0 : S[v] % Ze;
1397
+ return P && (S = [P].concat(S), ++E), M(m, S, E);
1393
1398
  }, o.precision = o.sd = function(m, v) {
1394
- var b, P, A, N = this;
1399
+ var b, A, P, C = this;
1395
1400
  if (m != null && m !== !!m)
1396
- return pe(m, 1, we), v == null ? v = c : pe(v, 0, 8), F(new y(N), m, v);
1397
- if (!(b = N.c)) return null;
1398
- if (A = b.length - 1, P = A * J + 1, A = b[A]) {
1399
- for (; A % 10 == 0; A /= 10, P--) ;
1400
- for (A = b[0]; A >= 10; A /= 10, P++) ;
1401
+ return pe(m, 1, we), v == null ? v = c : pe(v, 0, 8), F(new y(C), m, v);
1402
+ if (!(b = C.c)) return null;
1403
+ if (P = b.length - 1, A = P * J + 1, P = b[P]) {
1404
+ for (; P % 10 == 0; P /= 10, A--) ;
1405
+ for (P = b[0]; P >= 10; P /= 10, A++) ;
1401
1406
  }
1402
- return m && N.e + 1 > P && (P = N.e + 1), P;
1407
+ return m && C.e + 1 > A && (A = C.e + 1), A;
1403
1408
  }, o.shiftedBy = function(m) {
1404
1409
  return pe(m, -ar, ar), this.times("1e" + m);
1405
1410
  }, o.squareRoot = o.sqrt = function() {
1406
- var m, v, b, P, A, N = this, E = N.c, S = N.s, O = N.e, C = l + 4, x = new y("0.5");
1411
+ var m, v, b, A, P, C = this, E = C.c, S = C.s, O = C.e, N = l + 4, x = new y("0.5");
1407
1412
  if (S !== 1 || !E || !E[0])
1408
- return new y(!S || S < 0 && (!E || E[0]) ? NaN : E ? N : 1 / 0);
1409
- if (S = Math.sqrt(+k(N)), S == 0 || S == 1 / 0 ? (v = Ue(E), (v.length + O) % 2 == 0 && (v += "0"), S = Math.sqrt(+v), O = He((O + 1) / 2) - (O < 0 || O % 2), S == 1 / 0 ? v = "5e" + O : (v = S.toExponential(), v = v.slice(0, v.indexOf("e") + 1) + O), b = new y(v)) : b = new y(S + ""), b.c[0]) {
1410
- for (O = b.e, S = O + C, S < 3 && (S = 0); ; )
1411
- if (A = b, b = x.times(A.plus(t(N, A, C, 1))), Ue(A.c).slice(0, S) === (v = Ue(b.c)).slice(0, S))
1412
- if (b.e < O && --S, v = v.slice(S - 3, S + 1), v == "9999" || !P && v == "4999") {
1413
- if (!P && (F(A, A.e + l + 2, 0), A.times(A).eq(N))) {
1414
- b = A;
1413
+ return new y(!S || S < 0 && (!E || E[0]) ? NaN : E ? C : 1 / 0);
1414
+ if (S = Math.sqrt(+k(C)), S == 0 || S == 1 / 0 ? (v = Ue(E), (v.length + O) % 2 == 0 && (v += "0"), S = Math.sqrt(+v), O = He((O + 1) / 2) - (O < 0 || O % 2), S == 1 / 0 ? v = "5e" + O : (v = S.toExponential(), v = v.slice(0, v.indexOf("e") + 1) + O), b = new y(v)) : b = new y(S + ""), b.c[0]) {
1415
+ for (O = b.e, S = O + N, S < 3 && (S = 0); ; )
1416
+ if (P = b, b = x.times(P.plus(t(C, P, N, 1))), Ue(P.c).slice(0, S) === (v = Ue(b.c)).slice(0, S))
1417
+ if (b.e < O && --S, v = v.slice(S - 3, S + 1), v == "9999" || !A && v == "4999") {
1418
+ if (!A && (F(P, P.e + l + 2, 0), P.times(P).eq(C))) {
1419
+ b = P;
1415
1420
  break;
1416
1421
  }
1417
- C += 4, S += 4, P = 1;
1422
+ N += 4, S += 4, A = 1;
1418
1423
  } else {
1419
- (!+v || !+v.slice(1) && v.charAt(0) == "5") && (F(b, b.e + l + 2, 1), m = !b.times(b).eq(N));
1424
+ (!+v || !+v.slice(1) && v.charAt(0) == "5") && (F(b, b.e + l + 2, 1), m = !b.times(b).eq(C));
1420
1425
  break;
1421
1426
  }
1422
1427
  }
@@ -1426,40 +1431,40 @@ function as(e) {
1426
1431
  }, o.toFixed = function(m, v) {
1427
1432
  return m != null && (pe(m, 0, we), m = m + this.e + 1), T(this, m, v);
1428
1433
  }, o.toFormat = function(m, v, b) {
1429
- var P, A = this;
1434
+ var A, P = this;
1430
1435
  if (b == null)
1431
1436
  m != null && v && typeof v == "object" ? (b = v, v = null) : m && typeof m == "object" ? (b = m, m = v = null) : b = g;
1432
1437
  else if (typeof b != "object")
1433
1438
  throw Error(Le + "Argument not an object: " + b);
1434
- if (P = A.toFixed(m, v), A.c) {
1435
- var N, E = P.split("."), S = +b.groupSize, O = +b.secondaryGroupSize, C = b.groupSeparator || "", x = E[0], D = E[1], _ = A.s < 0, U = _ ? x.slice(1) : x, V = U.length;
1436
- if (O && (N = S, S = O, O = N, V -= N), S > 0 && V > 0) {
1437
- for (N = V % S || S, x = U.substr(0, N); N < V; N += S) x += C + U.substr(N, S);
1438
- O > 0 && (x += C + U.slice(N)), _ && (x = "-" + x);
1439
+ if (A = P.toFixed(m, v), P.c) {
1440
+ var C, E = A.split("."), S = +b.groupSize, O = +b.secondaryGroupSize, N = b.groupSeparator || "", x = E[0], D = E[1], _ = P.s < 0, U = _ ? x.slice(1) : x, V = U.length;
1441
+ if (O && (C = S, S = O, O = C, V -= C), S > 0 && V > 0) {
1442
+ for (C = V % S || S, x = U.substr(0, C); C < V; C += S) x += N + U.substr(C, S);
1443
+ O > 0 && (x += N + U.slice(C)), _ && (x = "-" + x);
1439
1444
  }
1440
- P = D ? x + (b.decimalSeparator || "") + ((O = +b.fractionGroupSize) ? D.replace(
1445
+ A = D ? x + (b.decimalSeparator || "") + ((O = +b.fractionGroupSize) ? D.replace(
1441
1446
  new RegExp("\\d{" + O + "}\\B", "g"),
1442
1447
  "$&" + (b.fractionGroupSeparator || "")
1443
1448
  ) : D) : x;
1444
1449
  }
1445
- return (b.prefix || "") + P + (b.suffix || "");
1450
+ return (b.prefix || "") + A + (b.suffix || "");
1446
1451
  }, o.toFraction = function(m) {
1447
- var v, b, P, A, N, E, S, O, C, x, D, _, U = this, V = U.c;
1452
+ var v, b, A, P, C, E, S, O, N, x, D, _, U = this, V = U.c;
1448
1453
  if (m != null && (S = new y(m), !S.isInteger() && (S.c || S.s !== 1) || S.lt(i)))
1449
1454
  throw Error(Le + "Argument " + (S.isInteger() ? "out of range: " : "not an integer: ") + k(S));
1450
1455
  if (!V) return new y(U);
1451
- for (v = new y(i), C = b = new y(i), P = O = new y(i), _ = Ue(V), N = v.e = _.length - U.e - 1, v.c[0] = cr[(E = N % J) < 0 ? J + E : E], m = !m || S.comparedTo(v) > 0 ? N > 0 ? v : C : S, E = d, d = 1 / 0, S = new y(_), O.c[0] = 0; x = t(S, v, 0, 1), A = b.plus(x.times(P)), A.comparedTo(m) != 1; )
1452
- b = P, P = A, C = O.plus(x.times(A = C)), O = A, v = S.minus(x.times(A = v)), S = A;
1453
- return A = t(m.minus(b), P, 0, 1), O = O.plus(A.times(C)), b = b.plus(A.times(P)), O.s = C.s = U.s, N = N * 2, D = t(C, P, N, c).minus(U).abs().comparedTo(
1454
- t(O, b, N, c).minus(U).abs()
1455
- ) < 1 ? [C, P] : [O, b], d = E, D;
1456
+ for (v = new y(i), N = b = new y(i), A = O = new y(i), _ = Ue(V), C = v.e = _.length - U.e - 1, v.c[0] = cr[(E = C % J) < 0 ? J + E : E], m = !m || S.comparedTo(v) > 0 ? C > 0 ? v : N : S, E = d, d = 1 / 0, S = new y(_), O.c[0] = 0; x = t(S, v, 0, 1), P = b.plus(x.times(A)), P.comparedTo(m) != 1; )
1457
+ b = A, A = P, N = O.plus(x.times(P = N)), O = P, v = S.minus(x.times(P = v)), S = P;
1458
+ return P = t(m.minus(b), A, 0, 1), O = O.plus(P.times(N)), b = b.plus(P.times(A)), O.s = N.s = U.s, C = C * 2, D = t(N, A, C, c).minus(U).abs().comparedTo(
1459
+ t(O, b, C, c).minus(U).abs()
1460
+ ) < 1 ? [N, A] : [O, b], d = E, D;
1456
1461
  }, o.toNumber = function() {
1457
1462
  return +k(this);
1458
1463
  }, o.toPrecision = function(m, v) {
1459
1464
  return m != null && pe(m, 1, we), T(this, m, v, 2);
1460
1465
  }, o.toString = function(m) {
1461
- var v, b = this, P = b.s, A = b.e;
1462
- return A === null ? P ? (v = "Infinity", P < 0 && (v = "-" + v)) : v = "NaN" : (m == null ? v = A <= s || A >= a ? vn(Ue(b.c), A) : pt(Ue(b.c), A, "0") : m === 10 && L ? (b = F(new y(b), l + A + 1, c), v = pt(Ue(b.c), b.e, "0")) : (pe(m, 2, w.length, "Base"), v = n(pt(Ue(b.c), A, "0"), 10, m, P, !0)), P < 0 && b.c[0] && (v = "-" + v)), v;
1466
+ var v, b = this, A = b.s, P = b.e;
1467
+ return P === null ? A ? (v = "Infinity", A < 0 && (v = "-" + v)) : v = "NaN" : (m == null ? v = P <= s || P >= a ? vn(Ue(b.c), P) : pt(Ue(b.c), P, "0") : m === 10 && L ? (b = F(new y(b), l + P + 1, c), v = pt(Ue(b.c), b.e, "0")) : (pe(m, 2, w.length, "Base"), v = n(pt(Ue(b.c), P, "0"), 10, m, A, !0)), A < 0 && b.c[0] && (v = "-" + v)), v;
1463
1468
  }, o.valueOf = o.toJSON = function() {
1464
1469
  return k(this);
1465
1470
  }, o._isBigNumber = !0, o[Symbol.toStringTag] = "BigNumber", o[Symbol.for("nodejs.util.inspect.custom")] = o.valueOf, e != null && y.set(e), y;
@@ -1476,7 +1481,7 @@ function Ue(e) {
1476
1481
  for (o = i.length; i.charCodeAt(--o) === 48; ) ;
1477
1482
  return i.slice(0, o + 1 || 1);
1478
1483
  }
1479
- function At(e, t) {
1484
+ function Pt(e, t) {
1480
1485
  var n, r, o = e.c, i = t.c, l = e.s, c = t.s, s = e.e, a = t.e;
1481
1486
  if (!l || !c) return null;
1482
1487
  if (n = o && !o[0], r = i && !i[0], n || r) return n ? r ? 0 : -c : l;
@@ -1631,7 +1636,7 @@ const Ka = io(
1631
1636
  children: i,
1632
1637
  iconNode: l,
1633
1638
  ...c
1634
- }, s) => An(
1639
+ }, s) => Pn(
1635
1640
  "svg",
1636
1641
  {
1637
1642
  ref: s,
@@ -1645,7 +1650,7 @@ const Ka = io(
1645
1650
  ...c
1646
1651
  },
1647
1652
  [
1648
- ...l.map(([a, u]) => An(a, u)),
1653
+ ...l.map(([a, u]) => Pn(a, u)),
1649
1654
  ...Array.isArray(i) ? i : [i]
1650
1655
  ]
1651
1656
  )
@@ -1658,7 +1663,7 @@ const Ka = io(
1658
1663
  */
1659
1664
  const qa = (e, t) => {
1660
1665
  const n = io(
1661
- ({ className: r, ...o }, i) => An(Ka, {
1666
+ ({ className: r, ...o }, i) => Pn(Ka, {
1662
1667
  ref: i,
1663
1668
  iconNode: t,
1664
1669
  className: cs(
@@ -1710,8 +1715,8 @@ class Qa extends fs {
1710
1715
  return "mpc";
1711
1716
  }
1712
1717
  getDisplayAddress() {
1713
- var n, r;
1714
- return ((n = this.smartWallet) == null ? void 0 : n.address) || ((r = this.currentActiveAccount) == null ? void 0 : r.ethAddress) || "";
1718
+ var n;
1719
+ return ((n = this.smartWallet) == null ? void 0 : n.address) || "";
1715
1720
  }
1716
1721
  isApprovalRequired() {
1717
1722
  return !1;
@@ -1878,10 +1883,10 @@ function ec(e) {
1878
1883
  return r == null ? void 0 : r(...n);
1879
1884
  }, []);
1880
1885
  }
1881
- const Nt = (e) => {
1886
+ const Ct = (e) => {
1882
1887
  var t;
1883
1888
  return (t = e == null ? void 0 : e.ownerDocument) !== null && t !== void 0 ? t : document;
1884
- }, Pt = (e) => e && "window" in e && e.window === e ? e : Nt(e).defaultView || window;
1889
+ }, At = (e) => e && "window" in e && e.window === e ? e : Ct(e).defaultView || window;
1885
1890
  function tc(e) {
1886
1891
  return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
1887
1892
  }
@@ -2056,7 +2061,7 @@ function co(e, t) {
2056
2061
  function pc(e) {
2057
2062
  return !(e.metaKey || !ao() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
2058
2063
  }
2059
- function Pn(e) {
2064
+ function An(e) {
2060
2065
  Lt = !0, pc(e) && (un = "keyboard", co("keyboard", e));
2061
2066
  }
2062
2067
  function Ye(e) {
@@ -2072,12 +2077,12 @@ function ws() {
2072
2077
  Lt = !1, Dr = !0;
2073
2078
  }
2074
2079
  function Ir(e) {
2075
- if (typeof window > "u" || typeof document > "u" || nn.get(Pt(e))) return;
2076
- const t = Pt(e), n = Nt(e);
2080
+ if (typeof window > "u" || typeof document > "u" || nn.get(At(e))) return;
2081
+ const t = At(e), n = Ct(e);
2077
2082
  let r = t.HTMLElement.prototype.focus;
2078
2083
  t.HTMLElement.prototype.focus = function() {
2079
2084
  Lt = !0, r.apply(this, arguments);
2080
- }, n.addEventListener("keydown", Pn, !0), n.addEventListener("keyup", Pn, !0), n.addEventListener("click", xs, !0), t.addEventListener("focus", ys, !0), t.addEventListener("blur", ws, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", Ye, !0), n.addEventListener("pointermove", Ye, !0), n.addEventListener("pointerup", Ye, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", Ye, !0), n.addEventListener("mousemove", Ye, !0), n.addEventListener("mouseup", Ye, !0)), t.addEventListener("beforeunload", () => {
2085
+ }, n.addEventListener("keydown", An, !0), n.addEventListener("keyup", An, !0), n.addEventListener("click", xs, !0), t.addEventListener("focus", ys, !0), t.addEventListener("blur", ws, !1), typeof PointerEvent < "u" ? (n.addEventListener("pointerdown", Ye, !0), n.addEventListener("pointermove", Ye, !0), n.addEventListener("pointerup", Ye, !0)) : process.env.NODE_ENV === "test" && (n.addEventListener("mousedown", Ye, !0), n.addEventListener("mousemove", Ye, !0), n.addEventListener("mouseup", Ye, !0)), t.addEventListener("beforeunload", () => {
2081
2086
  Es(e);
2082
2087
  }, {
2083
2088
  once: !0
@@ -2086,11 +2091,11 @@ function Ir(e) {
2086
2091
  });
2087
2092
  }
2088
2093
  const Es = (e, t) => {
2089
- const n = Pt(e), r = Nt(e);
2090
- t && r.removeEventListener("DOMContentLoaded", t), nn.has(n) && (n.HTMLElement.prototype.focus = nn.get(n).focus, r.removeEventListener("keydown", Pn, !0), r.removeEventListener("keyup", Pn, !0), r.removeEventListener("click", xs, !0), n.removeEventListener("focus", ys, !0), n.removeEventListener("blur", ws, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", Ye, !0), r.removeEventListener("pointermove", Ye, !0), r.removeEventListener("pointerup", Ye, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", Ye, !0), r.removeEventListener("mousemove", Ye, !0), r.removeEventListener("mouseup", Ye, !0)), nn.delete(n));
2094
+ const n = At(e), r = Ct(e);
2095
+ t && r.removeEventListener("DOMContentLoaded", t), nn.has(n) && (n.HTMLElement.prototype.focus = nn.get(n).focus, r.removeEventListener("keydown", An, !0), r.removeEventListener("keyup", An, !0), r.removeEventListener("click", xs, !0), n.removeEventListener("focus", ys, !0), n.removeEventListener("blur", ws, !1), typeof PointerEvent < "u" ? (r.removeEventListener("pointerdown", Ye, !0), r.removeEventListener("pointermove", Ye, !0), r.removeEventListener("pointerup", Ye, !0)) : process.env.NODE_ENV === "test" && (r.removeEventListener("mousedown", Ye, !0), r.removeEventListener("mousemove", Ye, !0), r.removeEventListener("mouseup", Ye, !0)), nn.delete(n));
2091
2096
  };
2092
2097
  function mc(e) {
2093
- const t = Nt(e);
2098
+ const t = Ct(e);
2094
2099
  let n;
2095
2100
  return t.readyState !== "loading" ? Ir(e) : (n = () => {
2096
2101
  Ir(e);
@@ -2112,8 +2117,8 @@ const hc = /* @__PURE__ */ new Set([
2112
2117
  "reset"
2113
2118
  ]);
2114
2119
  function gc(e, t, n) {
2115
- let r = Nt(n == null ? void 0 : n.target);
2116
- const o = typeof window < "u" ? Pt(n == null ? void 0 : n.target).HTMLInputElement : HTMLInputElement, i = typeof window < "u" ? Pt(n == null ? void 0 : n.target).HTMLTextAreaElement : HTMLTextAreaElement, l = typeof window < "u" ? Pt(n == null ? void 0 : n.target).HTMLElement : HTMLElement, c = typeof window < "u" ? Pt(n == null ? void 0 : n.target).KeyboardEvent : KeyboardEvent;
2120
+ let r = Ct(n == null ? void 0 : n.target);
2121
+ const o = typeof window < "u" ? At(n == null ? void 0 : n.target).HTMLInputElement : HTMLInputElement, i = typeof window < "u" ? At(n == null ? void 0 : n.target).HTMLTextAreaElement : HTMLTextAreaElement, l = typeof window < "u" ? At(n == null ? void 0 : n.target).HTMLElement : HTMLElement, c = typeof window < "u" ? At(n == null ? void 0 : n.target).KeyboardEvent : KeyboardEvent;
2117
2122
  return e = e || r.activeElement instanceof o && !hc.has(r.activeElement.type) || r.activeElement instanceof i || r.activeElement instanceof l && r.activeElement.isContentEditable, !(e && t === "keyboard" && n instanceof c && !dc[n.key]);
2118
2123
  }
2119
2124
  function vc(e, t, n) {
@@ -2135,7 +2140,7 @@ function bc(e) {
2135
2140
  r,
2136
2141
  o
2137
2142
  ]), l = bs(i), c = X((s) => {
2138
- const a = Nt(s.target), u = a ? $r(a) : $r();
2143
+ const a = Ct(s.target), u = a ? $r(a) : $r();
2139
2144
  s.target === s.currentTarget && u === hs(s.nativeEvent) && (n && n(s), o && o(!0), l(s));
2140
2145
  }, [
2141
2146
  o,
@@ -2161,7 +2166,7 @@ function xc(e) {
2161
2166
  c
2162
2167
  ]), a = bs(s), u = X((d) => {
2163
2168
  if (!d.currentTarget.contains(d.target)) return;
2164
- const p = Nt(d.target), f = $r(p);
2169
+ const p = Ct(d.target), f = $r(p);
2165
2170
  if (!i.current.isFocusWithin && f === hs(d.nativeEvent)) {
2166
2171
  r && r(d), o && o(!0), i.current.isFocusWithin = !0, a(d);
2167
2172
  let h = d.currentTarget;
@@ -2226,7 +2231,7 @@ function wc(e) {
2226
2231
  if (c.pointerType = w, o || w === "touch" || c.isHovered || !g.currentTarget.contains(g.target)) return;
2227
2232
  c.isHovered = !0;
2228
2233
  let L = g.currentTarget;
2229
- c.target = L, s(Nt(g.target), "pointerover", (y) => {
2234
+ c.target = L, s(Ct(g.target), "pointerover", (y) => {
2230
2235
  c.isHovered && c.target && !ms(c.target, y.target) && f(y, y.pointerType);
2231
2236
  }, {
2232
2237
  capture: !0
@@ -2400,10 +2405,10 @@ function Tc(e) {
2400
2405
  let t = e.width / 2, n = e.height / 2;
2401
2406
  return { top: e.clientY - n, right: e.clientX + t, bottom: e.clientY + n, left: e.clientX - t };
2402
2407
  }
2403
- function Nc(e, t) {
2408
+ function Cc(e, t) {
2404
2409
  return !(!e || !t || e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom);
2405
2410
  }
2406
- function Cc({ disabled: e = !1 } = {}) {
2411
+ function Nc({ disabled: e = !1 } = {}) {
2407
2412
  let t = ee(null), [n, r] = te(!1), o = Gt(), i = ie(() => {
2408
2413
  t.current = null, r(!1), o.dispose();
2409
2414
  }), l = ie((c) => {
@@ -2414,7 +2419,7 @@ function Cc({ disabled: e = !1 } = {}) {
2414
2419
  o.addEventListener(s, "pointerup", i, !1), o.addEventListener(s, "pointermove", (a) => {
2415
2420
  if (t.current) {
2416
2421
  let u = Tc(a);
2417
- r(Nc(u, t.current.getBoundingClientRect()));
2422
+ r(Cc(u, t.current.getBoundingClientRect()));
2418
2423
  }
2419
2424
  }, !1), o.addEventListener(s, "pointercancel", i, !1);
2420
2425
  }
@@ -2422,9 +2427,9 @@ function Cc({ disabled: e = !1 } = {}) {
2422
2427
  });
2423
2428
  return { pressed: n, pressProps: e ? {} : { onPointerDown: l, onPointerUp: i, onClick: i } };
2424
2429
  }
2425
- let Ac = Se(void 0);
2430
+ let Pc = Se(void 0);
2426
2431
  function uo() {
2427
- return he(Ac);
2432
+ return he(Pc);
2428
2433
  }
2429
2434
  function jr(...e) {
2430
2435
  return Array.from(new Set(e.flatMap((t) => typeof t == "string" ? t.split(" ") : []))).filter(Boolean).join(" ");
@@ -2440,9 +2445,9 @@ function Xe(e, t, ...n) {
2440
2445
  var Ln = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ln || {}), Rt = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Rt || {});
2441
2446
  function We() {
2442
2447
  let e = $c();
2443
- return X((t) => Pc({ mergeRefs: e, ...t }), [e]);
2448
+ return X((t) => Ac({ mergeRefs: e, ...t }), [e]);
2444
2449
  }
2445
- function Pc({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: o, visible: i = !0, name: l, mergeRefs: c }) {
2450
+ function Ac({ ourProps: e, theirProps: t, slot: n, defaultTag: r, features: o, visible: i = !0, name: l, mergeRefs: c }) {
2446
2451
  c = c ?? Lc;
2447
2452
  let s = Os(t, e);
2448
2453
  if (i) return xn(s, n, r, l, c);
@@ -2473,7 +2478,7 @@ function xn(e, t = {}, n, r, o) {
2473
2478
  for (let h of f) d[`data-${h}`] = "";
2474
2479
  }
2475
2480
  }
2476
- if (i === ke && (Object.keys(Et(s)).length > 0 || Object.keys(Et(d)).length > 0)) if (!Ca(u) || Array.isArray(u) && u.length > 1) {
2481
+ if (i === ke && (Object.keys(Et(s)).length > 0 || Object.keys(Et(d)).length > 0)) if (!Na(u) || Array.isArray(u) && u.length > 1) {
2477
2482
  if (Object.keys(Et(s)).length > 0) throw new Error(['Passing props on "Fragment"!', "", `The current component <${r} /> is rendering a "Fragment".`, "However we need to passthrough the following props:", Object.keys(Et(s)).concat(Object.keys(Et(d))).map((p) => ` - ${p}`).join(`
2478
2483
  `), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".', "Render a single element as the child so that we can forward the props onto that element."].map((p) => ` - ${p}`).join(`
2479
2484
  `)].join(`
@@ -2481,9 +2486,9 @@ function xn(e, t = {}, n, r, o) {
2481
2486
  } else {
2482
2487
  let p = u.props, f = p == null ? void 0 : p.className, h = typeof f == "function" ? (...L) => jr(f(...L), s.className) : jr(f, s.className), g = h ? { className: h } : {}, w = Os(u.props, Et(dr(s, ["ref"])));
2483
2488
  for (let L in d) L in w && delete d[L];
2484
- return Aa(u, Object.assign({}, w, d, a, { ref: o(Dc(u), a.ref) }, g));
2489
+ return Pa(u, Object.assign({}, w, d, a, { ref: o(Dc(u), a.ref) }, g));
2485
2490
  }
2486
- return An(i, Object.assign({}, dr(s, ["ref"]), i !== ke && a, i !== ke && d), u);
2491
+ return Pn(i, Object.assign({}, dr(s, ["ref"]), i !== ke && a, i !== ke && d), u);
2487
2492
  }
2488
2493
  function $c() {
2489
2494
  let e = ee([]), t = X((n) => {
@@ -2552,16 +2557,16 @@ function Mc(e) {
2552
2557
  let [t] = te(e);
2553
2558
  return t;
2554
2559
  }
2555
- function Ns(e = {}, t = null, n = []) {
2556
- for (let [r, o] of Object.entries(e)) As(n, Cs(t, r), o);
2560
+ function Cs(e = {}, t = null, n = []) {
2561
+ for (let [r, o] of Object.entries(e)) Ps(n, Ns(t, r), o);
2557
2562
  return n;
2558
2563
  }
2559
- function Cs(e, t) {
2564
+ function Ns(e, t) {
2560
2565
  return e ? e + "[" + t + "]" : t;
2561
2566
  }
2562
- function As(e, t, n) {
2563
- if (Array.isArray(n)) for (let [r, o] of n.entries()) As(e, Cs(t, r.toString()), o);
2564
- else n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : Ns(n, t, e);
2567
+ function Ps(e, t, n) {
2568
+ if (Array.isArray(n)) for (let [r, o] of n.entries()) Ps(e, Ns(t, r.toString()), o);
2569
+ else n instanceof Date ? e.push([t, n.toISOString()]) : typeof n == "boolean" ? e.push([t, n ? "1" : "0"]) : typeof n == "string" ? e.push([t, n]) : typeof n == "number" ? e.push([t, `${n}`]) : n == null ? e.push([t, ""]) : Cs(n, t, e);
2565
2570
  }
2566
2571
  function jc(e) {
2567
2572
  var t, n;
@@ -2581,7 +2586,7 @@ function _c(e, t) {
2581
2586
  let { features: r = 1, ...o } = e, i = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = o["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
2582
2587
  return We()({ ourProps: i, theirProps: o, slot: {}, defaultTag: Fc, name: "Hidden" });
2583
2588
  }
2584
- let Ps = Fe(_c), kc = Se(null);
2589
+ let As = Fe(_c), kc = Se(null);
2585
2590
  function Wc({ children: e }) {
2586
2591
  let t = he(kc);
2587
2592
  if (!t) return z.createElement(z.Fragment, null, e);
@@ -2592,7 +2597,7 @@ function Bc({ data: e, form: t, disabled: n, onReset: r, overrides: o }) {
2592
2597
  let [i, l] = te(null), c = Gt();
2593
2598
  return ye(() => {
2594
2599
  if (r && i) return c.addEventListener(i, "reset", r);
2595
- }, [i, t, r]), z.createElement(Wc, null, z.createElement(Uc, { setForm: l, formId: t }), Ns(e).map(([s, a]) => z.createElement(Ps, { features: fo.Hidden, ...Et({ key: s, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: n, name: s, value: a, ...o }) })));
2600
+ }, [i, t, r]), z.createElement(Wc, null, z.createElement(Uc, { setForm: l, formId: t }), Cs(e).map(([s, a]) => z.createElement(As, { features: fo.Hidden, ...Et({ key: s, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: t, disabled: n, name: s, value: a, ...o }) })));
2596
2601
  }
2597
2602
  function Uc({ setForm: e, formId: t }) {
2598
2603
  return ye(() => {
@@ -2600,7 +2605,7 @@ function Uc({ setForm: e, formId: t }) {
2600
2605
  let n = document.getElementById(t);
2601
2606
  n && e(n);
2602
2607
  }
2603
- }, [e, t]), t ? null : z.createElement(Ps, { features: fo.Hidden, as: "input", type: "hidden", hidden: !0, readOnly: !0, ref: (n) => {
2608
+ }, [e, t]), t ? null : z.createElement(As, { features: fo.Hidden, as: "input", type: "hidden", hidden: !0, readOnly: !0, ref: (n) => {
2604
2609
  if (!n) return;
2605
2610
  let r = n.closest("form");
2606
2611
  r && e(r);
@@ -2760,7 +2765,7 @@ function au(e) {
2760
2765
  return { width: t, height: n };
2761
2766
  }
2762
2767
  function cu(e, t = !1) {
2763
- let [n, r] = Pa(() => ({}), {}), o = re(() => au(e), [e, n]);
2768
+ let [n, r] = Aa(() => ({}), {}), o = re(() => au(e), [e, n]);
2764
2769
  return de(() => {
2765
2770
  if (!e) return;
2766
2771
  let i = new ResizeObserver(r);
@@ -3083,16 +3088,16 @@ function Gs(e, t = 0) {
3083
3088
  return !1;
3084
3089
  } });
3085
3090
  }
3086
- var Nu = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Nu || {});
3091
+ var Cu = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Cu || {});
3087
3092
  typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
3088
3093
  e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
3089
3094
  }, !0), document.addEventListener("click", (e) => {
3090
3095
  e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
3091
3096
  }, !0));
3092
- let Cu = ["textarea", "input"].join(",");
3093
- function Au(e) {
3097
+ let Nu = ["textarea", "input"].join(",");
3098
+ function Pu(e) {
3094
3099
  var t, n;
3095
- return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Cu)) != null ? n : !1;
3100
+ return (n = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Nu)) != null ? n : !1;
3096
3101
  }
3097
3102
  function Ys(e, t = (n) => n) {
3098
3103
  return e.slice().sort((n, r) => {
@@ -3102,7 +3107,7 @@ function Ys(e, t = (n) => n) {
3102
3107
  return l & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : l & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
3103
3108
  });
3104
3109
  }
3105
- function Pu(e, t) {
3110
+ function Au(e, t) {
3106
3111
  return $u(Hs(), t, { relativeTo: e });
3107
3112
  }
3108
3113
  function $u(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: o = [] } = {}) {
@@ -3129,7 +3134,7 @@ function $u(e, t, { sorted: n = !0, relativeTo: r = null, skipElements: o = [] }
3129
3134
  }
3130
3135
  p = l[f], p == null || p.focus(a), u += c;
3131
3136
  } while (p !== i.activeElement);
3132
- return t & 6 && Au(p) && p.select(), 2;
3137
+ return t & 6 && Pu(p) && p.select(), 2;
3133
3138
  }
3134
3139
  function Ks() {
3135
3140
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
@@ -3434,7 +3439,7 @@ function vo(e) {
3434
3439
  function le(e) {
3435
3440
  return Hn() ? e instanceof Element || e instanceof Ie(e).Element : !1;
3436
3441
  }
3437
- function Ce(e) {
3442
+ function Ne(e) {
3438
3443
  return Hn() ? e instanceof HTMLElement || e instanceof Ie(e).HTMLElement : !1;
3439
3444
  }
3440
3445
  function Ur(e) {
@@ -3471,7 +3476,7 @@ function bo(e) {
3471
3476
  }
3472
3477
  function lf(e) {
3473
3478
  let t = vt(e);
3474
- for (; Ce(t) && !gt(t); ) {
3479
+ for (; Ne(t) && !gt(t); ) {
3475
3480
  if (bo(t))
3476
3481
  return t;
3477
3482
  if (Gn(t))
@@ -3513,7 +3518,7 @@ function vt(e) {
3513
3518
  }
3514
3519
  function Qs(e) {
3515
3520
  const t = vt(e);
3516
- return gt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Ce(t) && dn(t) ? t : Qs(t);
3521
+ return gt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Ne(t) && dn(t) ? t : Qs(t);
3517
3522
  }
3518
3523
  function Ot(e, t, n) {
3519
3524
  var r;
@@ -3708,16 +3713,16 @@ var yf = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
3708
3713
  return t.tagName === "INPUT";
3709
3714
  }, Tf = function(t) {
3710
3715
  return rl(t) && t.type === "hidden";
3711
- }, Nf = function(t) {
3716
+ }, Cf = function(t) {
3712
3717
  var n = t.tagName === "DETAILS" && Array.prototype.slice.apply(t.children).some(function(r) {
3713
3718
  return r.tagName === "SUMMARY";
3714
3719
  });
3715
3720
  return n;
3716
- }, Cf = function(t, n) {
3721
+ }, Nf = function(t, n) {
3717
3722
  for (var r = 0; r < t.length; r++)
3718
3723
  if (t[r].checked && t[r].form === n)
3719
3724
  return t[r];
3720
- }, Af = function(t) {
3725
+ }, Pf = function(t) {
3721
3726
  if (!t.name)
3722
3727
  return !0;
3723
3728
  var n = t.form || Mn(t), r = function(c) {
@@ -3731,12 +3736,12 @@ var yf = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
3731
3736
  } catch (l) {
3732
3737
  return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", l.message), !1;
3733
3738
  }
3734
- var i = Cf(o, t.form);
3739
+ var i = Nf(o, t.form);
3735
3740
  return !i || i === t;
3736
- }, Pf = function(t) {
3741
+ }, Af = function(t) {
3737
3742
  return rl(t) && t.type === "radio";
3738
3743
  }, $f = function(t) {
3739
- return Pf(t) && !Af(t);
3744
+ return Af(t) && !Pf(t);
3740
3745
  }, Lf = function(t) {
3741
3746
  var n, r = t && Mn(t), o = (n = r) === null || n === void 0 ? void 0 : n.host, i = !1;
3742
3747
  if (r && r !== t) {
@@ -3793,7 +3798,7 @@ var yf = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
3793
3798
  // because we're limited in the type of selectors we can use in JSDom (see related
3794
3799
  // note related to `candidateSelectors`)
3795
3800
  jn(n) || Tf(n) || Df(n, t) || // For a details element with a summary, the summary element gets the focus
3796
- Nf(n) || If(n));
3801
+ Cf(n) || If(n));
3797
3802
  }, Ei = function(t, n) {
3798
3803
  return !($f(n) || nl(n) < 0 || !Mf(t, n));
3799
3804
  }, jf = function(t) {
@@ -4001,14 +4006,14 @@ const kf = (e) => ({
4001
4006
  }, f = yo(o), h = xo(f), g = await l.getDimensions(a), w = f === "y", L = w ? "top" : "left", y = w ? "bottom" : "right", T = w ? "clientHeight" : "clientWidth", I = i.reference[h] + i.reference[f] - p[f] - i.floating[h], M = p[f] - i.reference[f], F = await (l.getOffsetParent == null ? void 0 : l.getOffsetParent(a));
4002
4007
  let k = F ? F[T] : 0;
4003
4008
  (!k || !await (l.isElement == null ? void 0 : l.isElement(F))) && (k = c.floating[T] || i.floating[h]);
4004
- const m = I / 2 - M / 2, v = k / 2 - g[h] / 2 - 1, b = bt(d[L], v), P = bt(d[y], v), A = b, N = k - g[h] - P, E = k / 2 - g[h] / 2 + m, S = zr(A, E, N), O = !s.arrow && Kt(o) != null && E !== S && i.reference[h] / 2 - (E < A ? b : P) - g[h] / 2 < 0, C = O ? E < A ? E - A : E - N : 0;
4009
+ const m = I / 2 - M / 2, v = k / 2 - g[h] / 2 - 1, b = bt(d[L], v), A = bt(d[y], v), P = b, C = k - g[h] - A, E = k / 2 - g[h] / 2 + m, S = zr(P, E, C), O = !s.arrow && Kt(o) != null && E !== S && i.reference[h] / 2 - (E < P ? b : A) - g[h] / 2 < 0, N = O ? E < P ? E - P : E - C : 0;
4005
4010
  return {
4006
- [f]: p[f] + C,
4011
+ [f]: p[f] + N,
4007
4012
  data: {
4008
4013
  [f]: S,
4009
- centerOffset: E - S - C,
4014
+ centerOffset: E - S - N,
4010
4015
  ...O && {
4011
- alignmentOffset: C
4016
+ alignmentOffset: N
4012
4017
  }
4013
4018
  },
4014
4019
  reset: O
@@ -4050,8 +4055,8 @@ const kf = (e) => ({
4050
4055
  placement: o,
4051
4056
  overflows: v
4052
4057
  }], !v.every((E) => E <= 0)) {
4053
- var P, A;
4054
- const E = (((P = i.flip) == null ? void 0 : P.index) || 0) + 1, S = k[E];
4058
+ var A, P;
4059
+ const E = (((A = i.flip) == null ? void 0 : A.index) || 0) + 1, S = k[E];
4055
4060
  if (S && (!(d === "alignment" ? y !== ht(S) : !1) || // We leave the current main axis only if every placement on that axis
4056
4061
  // overflows the main axis.
4057
4062
  b.every((x) => ht(x.placement) === y ? x.overflows[0] > 0 : !0)))
@@ -4064,12 +4069,12 @@ const kf = (e) => ({
4064
4069
  placement: S
4065
4070
  }
4066
4071
  };
4067
- let O = (A = b.filter((C) => C.overflows[0] <= 0).sort((C, x) => C.overflows[1] - x.overflows[1])[0]) == null ? void 0 : A.placement;
4072
+ let O = (P = b.filter((N) => N.overflows[0] <= 0).sort((N, x) => N.overflows[1] - x.overflows[1])[0]) == null ? void 0 : P.placement;
4068
4073
  if (!O)
4069
4074
  switch (f) {
4070
4075
  case "bestFit": {
4071
- var N;
4072
- const C = (N = b.filter((x) => {
4076
+ var C;
4077
+ const N = (C = b.filter((x) => {
4073
4078
  if (F) {
4074
4079
  const D = ht(x.placement);
4075
4080
  return D === y || // Create a bias to the `y` side axis due to horizontal
@@ -4077,8 +4082,8 @@ const kf = (e) => ({
4077
4082
  D === "y";
4078
4083
  }
4079
4084
  return !0;
4080
- }).map((x) => [x.placement, x.overflows.filter((D) => D > 0).reduce((D, _) => D + _, 0)]).sort((x, D) => x[1] - D[1])[0]) == null ? void 0 : N[0];
4081
- C && (O = C);
4085
+ }).map((x) => [x.placement, x.overflows.filter((D) => D > 0).reduce((D, _) => D + _, 0)]).sort((x, D) => x[1] - D[1])[0]) == null ? void 0 : C[0];
4086
+ N && (O = N);
4082
4087
  break;
4083
4088
  }
4084
4089
  case "initialPlacement":
@@ -4225,8 +4230,8 @@ const Vf = function(e) {
4225
4230
  const y = g - u.top - u.bottom, T = h - u.left - u.right, I = bt(g - u[w], y), M = bt(h - u[L], T), F = !t.middlewareData.shift;
4226
4231
  let k = I, m = M;
4227
4232
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (m = T), (r = t.middlewareData.shift) != null && r.enabled.y && (k = y), F && !p) {
4228
- const b = Te(u.left, 0), P = Te(u.right, 0), A = Te(u.top, 0), N = Te(u.bottom, 0);
4229
- f ? m = h - 2 * (b !== 0 || P !== 0 ? b + P : Te(u.left, u.right)) : k = g - 2 * (A !== 0 || N !== 0 ? A + N : Te(u.top, u.bottom));
4233
+ const b = Te(u.left, 0), A = Te(u.right, 0), P = Te(u.top, 0), C = Te(u.bottom, 0);
4234
+ f ? m = h - 2 * (b !== 0 || A !== 0 ? b + A : Te(u.left, u.right)) : k = g - 2 * (P !== 0 || C !== 0 ? P + C : Te(u.top, u.bottom));
4230
4235
  }
4231
4236
  await s({
4232
4237
  ...t,
@@ -4245,7 +4250,7 @@ const Vf = function(e) {
4245
4250
  function il(e) {
4246
4251
  const t = Qe(e);
4247
4252
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
4248
- const o = Ce(e), i = o ? e.offsetWidth : n, l = o ? e.offsetHeight : r, c = sn(n) !== i || sn(r) !== l;
4253
+ const o = Ne(e), i = o ? e.offsetWidth : n, l = o ? e.offsetHeight : r, c = sn(n) !== i || sn(r) !== l;
4249
4254
  return c && (n = i, r = l), {
4250
4255
  width: n,
4251
4256
  height: r,
@@ -4257,7 +4262,7 @@ function wo(e) {
4257
4262
  }
4258
4263
  function zt(e) {
4259
4264
  const t = wo(e);
4260
- if (!Ce(t))
4265
+ if (!Ne(t))
4261
4266
  return ct(1);
4262
4267
  const n = t.getBoundingClientRect(), {
4263
4268
  width: r,
@@ -4328,8 +4333,8 @@ function Kf(e) {
4328
4333
  scrollLeft: 0,
4329
4334
  scrollTop: 0
4330
4335
  }, a = ct(1);
4331
- const u = ct(0), d = Ce(r);
4332
- if ((d || !d && !i) && ((Yt(r) !== "body" || dn(l)) && (s = Kn(r)), Ce(r))) {
4336
+ const u = ct(0), d = Ne(r);
4337
+ if ((d || !d && !i) && ((Yt(r) !== "body" || dn(l)) && (s = Kn(r)), Ne(r))) {
4333
4338
  const f = Dt(r);
4334
4339
  a = zt(r), u.x = f.x + r.clientLeft, u.y = f.y + r.clientTop;
4335
4340
  }
@@ -4378,7 +4383,7 @@ function Qf(e, t) {
4378
4383
  }
4379
4384
  const Jf = /* @__PURE__ */ new Set(["absolute", "fixed"]);
4380
4385
  function Zf(e, t) {
4381
- const n = Dt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Ce(e) ? zt(e) : ct(1), l = e.clientWidth * i.x, c = e.clientHeight * i.y, s = o * i.x, a = r * i.y;
4386
+ const n = Dt(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, i = Ne(e) ? zt(e) : ct(1), l = e.clientWidth * i.x, c = e.clientHeight * i.y, s = o * i.x, a = r * i.y;
4382
4387
  return {
4383
4388
  width: l,
4384
4389
  height: c,
@@ -4451,7 +4456,7 @@ function nd(e) {
4451
4456
  };
4452
4457
  }
4453
4458
  function rd(e, t, n) {
4454
- const r = Ce(t), o = dt(t), i = n === "fixed", l = Dt(e, !0, i, t);
4459
+ const r = Ne(t), o = dt(t), i = n === "fixed", l = Dt(e, !0, i, t);
4455
4460
  let c = {
4456
4461
  scrollLeft: 0,
4457
4462
  scrollTop: 0
@@ -4478,7 +4483,7 @@ function br(e) {
4478
4483
  return Qe(e).position === "static";
4479
4484
  }
4480
4485
  function Ti(e, t) {
4481
- if (!Ce(e) || Qe(e).position === "fixed")
4486
+ if (!Ne(e) || Qe(e).position === "fixed")
4482
4487
  return null;
4483
4488
  if (t)
4484
4489
  return t(e);
@@ -4489,7 +4494,7 @@ function cl(e, t) {
4489
4494
  const n = Ie(e);
4490
4495
  if (Gn(e))
4491
4496
  return n;
4492
- if (!Ce(e)) {
4497
+ if (!Ne(e)) {
4493
4498
  let o = vt(e);
4494
4499
  for (; o && !gt(o); ) {
4495
4500
  if (le(o) && !br(o))
@@ -4615,7 +4620,7 @@ function fl(e, t, n, r) {
4615
4620
  }), d == null || d(), (L = f) == null || L.disconnect(), f = null, s && cancelAnimationFrame(h);
4616
4621
  };
4617
4622
  }
4618
- const xr = qn, ad = Vf, cd = zf, ud = Wf, fd = Hf, Ni = kf, dd = (e, t, n) => {
4623
+ const xr = qn, ad = Vf, cd = zf, ud = Wf, fd = Hf, Ci = kf, dd = (e, t, n) => {
4619
4624
  const r = /* @__PURE__ */ new Map(), o = {
4620
4625
  platform: sd,
4621
4626
  ...n
@@ -4663,7 +4668,7 @@ function Fn(e, t) {
4663
4668
  function dl(e) {
4664
4669
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
4665
4670
  }
4666
- function Ci(e, t) {
4671
+ function Ni(e, t) {
4667
4672
  const n = dl(e);
4668
4673
  return Math.round(t * n) / n;
4669
4674
  }
@@ -4700,7 +4705,7 @@ function pl(e) {
4700
4705
  x !== F.current && (F.current = x, g(x));
4701
4706
  }, []), T = j.useCallback((x) => {
4702
4707
  x !== k.current && (k.current = x, L(x));
4703
- }, []), I = i || h, M = l || w, F = j.useRef(null), k = j.useRef(null), m = j.useRef(u), v = s != null, b = yr(s), P = yr(o), A = yr(a), N = j.useCallback(() => {
4708
+ }, []), I = i || h, M = l || w, F = j.useRef(null), k = j.useRef(null), m = j.useRef(u), v = s != null, b = yr(s), A = yr(o), P = yr(a), C = j.useCallback(() => {
4704
4709
  if (!F.current || !k.current)
4705
4710
  return;
4706
4711
  const x = {
@@ -4708,20 +4713,20 @@ function pl(e) {
4708
4713
  strategy: n,
4709
4714
  middleware: p
4710
4715
  };
4711
- P.current && (x.platform = P.current), dd(F.current, k.current, x).then((D) => {
4716
+ A.current && (x.platform = A.current), dd(F.current, k.current, x).then((D) => {
4712
4717
  const _ = {
4713
4718
  ...D,
4714
4719
  // The floating element's position may be recomputed while it's closed
4715
4720
  // but still mounted (such as when transitioning out). To ensure
4716
4721
  // `isPositioned` will be `false` initially on the next open, avoid
4717
4722
  // setting it to `true` when `open === false` (must be specified).
4718
- isPositioned: A.current !== !1
4723
+ isPositioned: P.current !== !1
4719
4724
  };
4720
4725
  E.current && !Fn(m.current, _) && (m.current = _, on.flushSync(() => {
4721
4726
  d(_);
4722
4727
  }));
4723
4728
  });
4724
- }, [p, t, n, P, A]);
4729
+ }, [p, t, n, A, P]);
4725
4730
  Tn(() => {
4726
4731
  a === !1 && m.current.isPositioned && (m.current.isPositioned = !1, d((x) => ({
4727
4732
  ...x,
@@ -4734,10 +4739,10 @@ function pl(e) {
4734
4739
  }), []), Tn(() => {
4735
4740
  if (I && (F.current = I), M && (k.current = M), I && M) {
4736
4741
  if (b.current)
4737
- return b.current(I, M, N);
4738
- N();
4742
+ return b.current(I, M, C);
4743
+ C();
4739
4744
  }
4740
- }, [I, M, N, b, v]);
4745
+ }, [I, M, C, b, v]);
4741
4746
  const S = j.useMemo(() => ({
4742
4747
  reference: F,
4743
4748
  floating: k,
@@ -4746,7 +4751,7 @@ function pl(e) {
4746
4751
  }), [y, T]), O = j.useMemo(() => ({
4747
4752
  reference: I,
4748
4753
  floating: M
4749
- }), [I, M]), C = j.useMemo(() => {
4754
+ }), [I, M]), N = j.useMemo(() => {
4750
4755
  const x = {
4751
4756
  position: n,
4752
4757
  left: 0,
@@ -4754,7 +4759,7 @@ function pl(e) {
4754
4759
  };
4755
4760
  if (!O.floating)
4756
4761
  return x;
4757
- const D = Ci(O.floating, u.x), _ = Ci(O.floating, u.y);
4762
+ const D = Ni(O.floating, u.x), _ = Ni(O.floating, u.y);
4758
4763
  return c ? {
4759
4764
  ...x,
4760
4765
  transform: "translate(" + D + "px, " + _ + "px)",
@@ -4769,11 +4774,11 @@ function pl(e) {
4769
4774
  }, [n, c, O.floating, u.x, u.y]);
4770
4775
  return j.useMemo(() => ({
4771
4776
  ...u,
4772
- update: N,
4777
+ update: C,
4773
4778
  refs: S,
4774
4779
  elements: O,
4775
- floatingStyles: C
4776
- }), [u, N, S, O, C]);
4780
+ floatingStyles: N
4781
+ }), [u, C, S, O, N]);
4777
4782
  }
4778
4783
  const hd = (e) => {
4779
4784
  function t(n) {
@@ -4787,10 +4792,10 @@ const hd = (e) => {
4787
4792
  element: r,
4788
4793
  padding: o
4789
4794
  } = typeof e == "function" ? e(n) : e;
4790
- return r && t(r) ? r.current != null ? Ni({
4795
+ return r && t(r) ? r.current != null ? Ci({
4791
4796
  element: r.current,
4792
4797
  padding: o
4793
- }).fn(n) : {} : r ? Ni({
4798
+ }).fn(n) : {} : r ? Ci({
4794
4799
  element: r,
4795
4800
  padding: o
4796
4801
  }).fn(n) : {};
@@ -4828,18 +4833,18 @@ function vl(e) {
4828
4833
  }, []);
4829
4834
  }
4830
4835
  var Yr = typeof document < "u" ? Bn : ye;
4831
- let Ai = !1, yd = 0;
4832
- const Pi = () => (
4836
+ let Pi = !1, yd = 0;
4837
+ const Ai = () => (
4833
4838
  // Ensure the id is unique with multiple independent versions of Floating UI
4834
4839
  // on <React 18
4835
4840
  "floating-ui-" + Math.random().toString(36).slice(2, 6) + yd++
4836
4841
  );
4837
4842
  function wd() {
4838
- const [e, t] = j.useState(() => Ai ? Pi() : void 0);
4843
+ const [e, t] = j.useState(() => Pi ? Ai() : void 0);
4839
4844
  return Yr(() => {
4840
- e == null && t(Pi());
4845
+ e == null && t(Ai());
4841
4846
  }, []), j.useEffect(() => {
4842
- Ai = !0;
4847
+ Pi = !0;
4843
4848
  }, []), e;
4844
4849
  }
4845
4850
  const Ed = gl.useId, Rd = Ed || wd;
@@ -4879,16 +4884,16 @@ function Td() {
4879
4884
  }
4880
4885
  };
4881
4886
  }
4882
- const Nd = /* @__PURE__ */ j.createContext(null), Cd = /* @__PURE__ */ j.createContext(null), Ad = () => {
4887
+ const Cd = /* @__PURE__ */ j.createContext(null), Nd = /* @__PURE__ */ j.createContext(null), Pd = () => {
4883
4888
  var e;
4884
- return ((e = j.useContext(Nd)) == null ? void 0 : e.id) || null;
4885
- }, Pd = () => j.useContext(Cd), $d = "data-floating-ui-focusable";
4889
+ return ((e = j.useContext(Cd)) == null ? void 0 : e.id) || null;
4890
+ }, Ad = () => j.useContext(Nd), $d = "data-floating-ui-focusable";
4886
4891
  function Ld(e) {
4887
4892
  const {
4888
4893
  open: t = !1,
4889
4894
  onOpenChange: n,
4890
4895
  elements: r
4891
- } = e, o = Rd(), i = j.useRef({}), [l] = j.useState(() => Td()), c = Ad() != null;
4896
+ } = e, o = Rd(), i = j.useRef({}), [l] = j.useState(() => Td()), c = Pd() != null;
4892
4897
  if (process.env.NODE_ENV !== "production") {
4893
4898
  const f = r.reference;
4894
4899
  f && !le(f) && Od("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
@@ -4928,7 +4933,7 @@ function Dd(e) {
4928
4933
  floating: null,
4929
4934
  ...e.elements
4930
4935
  }
4931
- }), r = e.rootContext || n, o = r.elements, [i, l] = j.useState(null), [c, s] = j.useState(null), u = (o == null ? void 0 : o.domReference) || i, d = j.useRef(null), p = Pd();
4936
+ }), r = e.rootContext || n, o = r.elements, [i, l] = j.useState(null), [c, s] = j.useState(null), u = (o == null ? void 0 : o.domReference) || i, d = j.useRef(null), p = Ad();
4932
4937
  Yr(() => {
4933
4938
  u && (d.current = u);
4934
4939
  }, [u]);
@@ -5076,10 +5081,10 @@ const Md = (e) => ({
5076
5081
  }, I = await xr(Di(T, h.scrollHeight + g + p.clientTop), u), M = await xr(T, {
5077
5082
  ...u,
5078
5083
  elementContext: "reference"
5079
- }), F = Te(0, I.top), k = T.y + F, b = (h.scrollHeight > h.clientHeight ? (P) => P : sn)(Te(0, h.scrollHeight + (w && y || L ? g * 2 : 0) - F - Te(0, I.bottom)));
5084
+ }), F = Te(0, I.top), k = T.y + F, b = (h.scrollHeight > h.clientHeight ? (A) => A : sn)(Te(0, h.scrollHeight + (w && y || L ? g * 2 : 0) - F - Te(0, I.bottom)));
5080
5085
  if (h.style.maxHeight = b + "px", h.scrollTop = F, o) {
5081
- const P = h.offsetHeight < f.offsetHeight * bt(c, n.current.length) - 1 || M.top >= -s || M.bottom >= -s;
5082
- on.flushSync(() => o(P));
5086
+ const A = h.offsetHeight < f.offsetHeight * bt(c, n.current.length) - 1 || M.top >= -s || M.bottom >= -s;
5087
+ on.flushSync(() => o(A));
5083
5088
  }
5084
5089
  return r && (r.current = await xr(Di({
5085
5090
  ...T,
@@ -5185,30 +5190,30 @@ function Ud({ children: e, enabled: t = !0 }) {
5185
5190
  de(() => {
5186
5191
  a && i(0);
5187
5192
  }, [a]);
5188
- let { refs: L, floatingStyles: y, context: T } = Dd({ open: a, placement: g === "selection" ? w === "center" ? "bottom" : `bottom-${w}` : w === "center" ? `${g}` : `${g}-${w}`, strategy: "absolute", transform: !1, middleware: [Eo({ mainAxis: g === "selection" ? 0 : d, crossAxis: p }), ml({ padding: f }), g !== "selection" && hl({ padding: f }), g === "selection" && h ? Md({ ...h, padding: f, overflowRef: l, offset: o, minItemsVisible: Ii, referenceOverflowThreshold: f, onFallbackChange(P) {
5189
- var A, N;
5190
- if (!P) return;
5193
+ let { refs: L, floatingStyles: y, context: T } = Dd({ open: a, placement: g === "selection" ? w === "center" ? "bottom" : `bottom-${w}` : w === "center" ? `${g}` : `${g}-${w}`, strategy: "absolute", transform: !1, middleware: [Eo({ mainAxis: g === "selection" ? 0 : d, crossAxis: p }), ml({ padding: f }), g !== "selection" && hl({ padding: f }), g === "selection" && h ? Md({ ...h, padding: f, overflowRef: l, offset: o, minItemsVisible: Ii, referenceOverflowThreshold: f, onFallbackChange(A) {
5194
+ var P, C;
5195
+ if (!A) return;
5191
5196
  let E = T.elements.floating;
5192
5197
  if (!E) return;
5193
- let S = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0, O = Math.min(Ii, E.childElementCount), C = 0, x = 0;
5194
- for (let D of (N = (A = T.elements.floating) == null ? void 0 : A.childNodes) != null ? N : []) if (yt(D)) {
5198
+ let S = parseFloat(getComputedStyle(E).scrollPaddingBottom) || 0, O = Math.min(Ii, E.childElementCount), N = 0, x = 0;
5199
+ for (let D of (C = (P = T.elements.floating) == null ? void 0 : P.childNodes) != null ? C : []) if (yt(D)) {
5195
5200
  let _ = D.offsetTop, U = _ + D.clientHeight + S, V = E.scrollTop, G = V + E.clientHeight;
5196
5201
  if (_ >= V && U <= G) O--;
5197
5202
  else {
5198
- x = Math.max(0, Math.min(U, G) - Math.max(_, V)), C = D.clientHeight;
5203
+ x = Math.max(0, Math.min(U, G) - Math.max(_, V)), N = D.clientHeight;
5199
5204
  break;
5200
5205
  }
5201
5206
  }
5202
5207
  O >= 1 && i((D) => {
5203
- let _ = C * O - x + S;
5208
+ let _ = N * O - x + S;
5204
5209
  return D >= _ ? D : _;
5205
5210
  });
5206
- } }) : null, gd({ padding: f, apply({ availableWidth: P, availableHeight: A, elements: N }) {
5207
- Object.assign(N.floating.style, { overflow: "auto", maxWidth: `${P}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${A}px)` });
5211
+ } }) : null, gd({ padding: f, apply({ availableWidth: A, availableHeight: P, elements: C }) {
5212
+ Object.assign(C.floating.style, { overflow: "auto", maxWidth: `${A}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${P}px)` });
5208
5213
  } })].filter(Boolean), whileElementsMounted: fl }), [I = g, M = w] = T.placement.split("-");
5209
5214
  g === "selection" && (I = "selection");
5210
- let F = re(() => ({ anchor: [I, M].filter(Boolean).join(" ") }), [I, M]), k = jd(T, { overflowRef: l, onChange: i }), { getReferenceProps: m, getFloatingProps: v } = Id([k]), b = ie((P) => {
5211
- s(P), L.setFloating(P);
5215
+ let F = re(() => ({ anchor: [I, M].filter(Boolean).join(" ") }), [I, M]), k = jd(T, { overflowRef: l, onChange: i }), { getReferenceProps: m, getFloatingProps: v } = Id([k]), b = ie((A) => {
5216
+ s(A), L.setFloating(A);
5212
5217
  });
5213
5218
  return j.createElement(Ro.Provider, { value: r }, j.createElement(qt.Provider, { value: { setFloating: b, setReference: L.setReference, styles: y, getReferenceProps: m, getFloatingProps: v, slot: F } }, e));
5214
5219
  }
@@ -5457,26 +5462,26 @@ function Ol(e, t) {
5457
5462
  });
5458
5463
  return re(() => ({ children: r, register: c, unregister: l, onStart: d, onStop: p, wait: a, chains: u }), [c, l, r, d, p, u, a]);
5459
5464
  }
5460
- let Tl = ke, Nl = Ln.RenderStrategy;
5465
+ let Tl = ke, Cl = Ln.RenderStrategy;
5461
5466
  function cp(e, t) {
5462
5467
  var n, r;
5463
- let { transition: o = !0, beforeEnter: i, afterEnter: l, beforeLeave: c, afterLeave: s, enter: a, enterFrom: u, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo: g, ...w } = e, [L, y] = te(null), T = ee(null), I = Sl(e), M = Je(...I ? [T, t, y] : t === null ? [] : [t]), F = (n = w.unmount) == null || n ? Rt.Unmount : Rt.Hidden, { show: k, appear: m, initial: v } = lp(), [b, P] = te(k ? "visible" : "hidden"), A = ap(), { register: N, unregister: E } = A;
5464
- de(() => N(T), [N, T]), de(() => {
5468
+ let { transition: o = !0, beforeEnter: i, afterEnter: l, beforeLeave: c, afterLeave: s, enter: a, enterFrom: u, enterTo: d, entered: p, leave: f, leaveFrom: h, leaveTo: g, ...w } = e, [L, y] = te(null), T = ee(null), I = Sl(e), M = Je(...I ? [T, t, y] : t === null ? [] : [t]), F = (n = w.unmount) == null || n ? Rt.Unmount : Rt.Hidden, { show: k, appear: m, initial: v } = lp(), [b, A] = te(k ? "visible" : "hidden"), P = ap(), { register: C, unregister: E } = P;
5469
+ de(() => C(T), [C, T]), de(() => {
5465
5470
  if (F === Rt.Hidden && T.current) {
5466
5471
  if (k && b !== "visible") {
5467
- P("visible");
5472
+ A("visible");
5468
5473
  return;
5469
5474
  }
5470
- return Xe(b, { hidden: () => E(T), visible: () => N(T) });
5475
+ return Xe(b, { hidden: () => E(T), visible: () => C(T) });
5471
5476
  }
5472
- }, [b, T, N, E, k, F]);
5477
+ }, [b, T, C, E, k, F]);
5473
5478
  let S = To();
5474
5479
  de(() => {
5475
5480
  if (I && S && b === "visible" && T.current === null) throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?");
5476
5481
  }, [T, b, S, I]);
5477
- let O = v && !m, C = m && k && v, x = ee(!1), D = Ol(() => {
5478
- x.current || (P("hidden"), E(T));
5479
- }, A), _ = ie((H) => {
5482
+ let O = v && !m, N = m && k && v, x = ee(!1), D = Ol(() => {
5483
+ x.current || (A("hidden"), E(T));
5484
+ }, P), _ = ie((H) => {
5480
5485
  x.current = !0;
5481
5486
  let Z = H ? "enter" : "leave";
5482
5487
  D.onStart(T, Z, (fe) => {
@@ -5486,15 +5491,15 @@ function cp(e, t) {
5486
5491
  let Z = H ? "enter" : "leave";
5487
5492
  x.current = !1, D.onStop(T, Z, (fe) => {
5488
5493
  fe === "enter" ? l == null || l() : fe === "leave" && (s == null || s());
5489
- }), Z === "leave" && !Zn(D) && (P("hidden"), E(T));
5494
+ }), Z === "leave" && !Zn(D) && (A("hidden"), E(T));
5490
5495
  });
5491
5496
  ye(() => {
5492
5497
  I && o || (_(k), U(k));
5493
5498
  }, [k, I, o]);
5494
- let V = !(!o || !I || !S || O), [, G] = Xs(V, L, k, { start: _, end: U }), q = Et({ ref: M, className: ((r = jr(w.className, C && a, C && u, G.enter && a, G.enter && G.closed && u, G.enter && !G.closed && d, G.leave && f, G.leave && !G.closed && h, G.leave && G.closed && g, !G.transition && k && p)) == null ? void 0 : r.trim()) || void 0, ...qs(G) }), W = 0;
5499
+ let V = !(!o || !I || !S || O), [, G] = Xs(V, L, k, { start: _, end: U }), q = Et({ ref: M, className: ((r = jr(w.className, N && a, N && u, G.enter && a, G.enter && G.closed && u, G.enter && !G.closed && d, G.leave && f, G.leave && !G.closed && h, G.leave && G.closed && g, !G.transition && k && p)) == null ? void 0 : r.trim()) || void 0, ...qs(G) }), W = 0;
5495
5500
  b === "visible" && (W |= tt.Open), b === "hidden" && (W |= tt.Closed), k && b === "hidden" && (W |= tt.Opening), !k && b === "visible" && (W |= tt.Closing);
5496
5501
  let K = We();
5497
- return z.createElement(Jn.Provider, { value: D }, z.createElement(xl, { value: W }, K({ ourProps: q, theirProps: w, defaultTag: Tl, features: Nl, visible: b === "visible", name: "Transition.Child" })));
5502
+ return z.createElement(Jn.Provider, { value: D }, z.createElement(xl, { value: W }, K({ ourProps: q, theirProps: w, defaultTag: Tl, features: Cl, visible: b === "visible", name: "Transition.Child" })));
5498
5503
  }
5499
5504
  function up(e, t) {
5500
5505
  let { show: n, appear: r = !1, unmount: o = !0, ...i } = e, l = ee(null), c = Sl(e), s = Je(...c ? [l, t] : t === null ? [] : [t]);
@@ -5518,13 +5523,13 @@ function up(e, t) {
5518
5523
  var M;
5519
5524
  f && h(!1), (M = e.beforeLeave) == null || M.call(e);
5520
5525
  }), I = We();
5521
- return z.createElement(Jn.Provider, { value: p }, z.createElement(Qn.Provider, { value: w }, I({ ourProps: { ...L, as: ke, children: z.createElement(Cl, { ref: s, ...L, ...i, beforeEnter: y, beforeLeave: T }) }, theirProps: {}, defaultTag: ke, features: Nl, visible: u === "visible", name: "Transition" })));
5526
+ return z.createElement(Jn.Provider, { value: p }, z.createElement(Qn.Provider, { value: w }, I({ ourProps: { ...L, as: ke, children: z.createElement(Nl, { ref: s, ...L, ...i, beforeEnter: y, beforeLeave: T }) }, theirProps: {}, defaultTag: ke, features: Cl, visible: u === "visible", name: "Transition" })));
5522
5527
  }
5523
5528
  function fp(e, t) {
5524
5529
  let n = he(Qn) !== null, r = Oo() !== null;
5525
- return z.createElement(z.Fragment, null, !n && r ? z.createElement(Kr, { ref: t, ...e }) : z.createElement(Cl, { ref: t, ...e }));
5530
+ return z.createElement(z.Fragment, null, !n && r ? z.createElement(Kr, { ref: t, ...e }) : z.createElement(Nl, { ref: t, ...e }));
5526
5531
  }
5527
- let Kr = Fe(up), Cl = Fe(cp), dp = Fe(fp), Al = Object.assign(Kr, { Child: dp, Root: Kr });
5532
+ let Kr = Fe(up), Nl = Fe(cp), dp = Fe(fp), Pl = Object.assign(Kr, { Child: dp, Root: Kr });
5528
5533
  function pp(e, t) {
5529
5534
  let n = ee({ left: 0, top: 0 });
5530
5535
  if (de(() => {
@@ -5573,7 +5578,7 @@ function hp(e) {
5573
5578
  return t.current = o, n.current = i, i;
5574
5579
  });
5575
5580
  }
5576
- var gp = Object.defineProperty, vp = (e, t, n) => t in e ? gp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _i = (e, t, n) => (vp(e, typeof t != "symbol" ? t + "" : t, n), n), Re = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Re || {}), st = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(st || {}), Nn = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Nn || {}), Pl = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.RegisterOptions = 5] = "RegisterOptions", e[e.UnregisterOptions = 6] = "UnregisterOptions", e[e.SetButtonElement = 7] = "SetButtonElement", e[e.SetOptionsElement = 8] = "SetOptionsElement", e[e.SortOptions = 9] = "SortOptions", e))(Pl || {});
5581
+ var gp = Object.defineProperty, vp = (e, t, n) => t in e ? gp(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, _i = (e, t, n) => (vp(e, typeof t != "symbol" ? t + "" : t, n), n), Re = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Re || {}), st = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(st || {}), Cn = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(Cn || {}), Al = ((e) => (e[e.OpenListbox = 0] = "OpenListbox", e[e.CloseListbox = 1] = "CloseListbox", e[e.GoToOption = 2] = "GoToOption", e[e.Search = 3] = "Search", e[e.ClearSearch = 4] = "ClearSearch", e[e.RegisterOptions = 5] = "RegisterOptions", e[e.UnregisterOptions = 6] = "UnregisterOptions", e[e.SetButtonElement = 7] = "SetButtonElement", e[e.SetOptionsElement = 8] = "SetOptionsElement", e[e.SortOptions = 9] = "SortOptions", e))(Al || {});
5577
5582
  function ki(e, t = (n) => n) {
5578
5583
  let n = e.activeOptionIndex !== null ? e.options[e.activeOptionIndex] : null, r = Ys(t(e.options.slice()), (i) => i.dataRef.current.domRef.current), o = n ? r.indexOf(n) : null;
5579
5584
  return o === -1 && (o = null), { options: r, activeOptionIndex: o };
@@ -5639,7 +5644,7 @@ let bp = { 1(e) {
5639
5644
  }
5640
5645
  return { ...e, options: n, activationTrigger: 1 };
5641
5646
  }, 7: (e, t) => e.buttonElement === t.element ? e : { ...e, buttonElement: t.element }, 8: (e, t) => e.optionsElement === t.element ? e : { ...e, optionsElement: t.element }, 9: (e) => e.pendingShouldSort ? { ...e, ...ki(e), pendingShouldSort: !1 } : e };
5642
- class No extends Ws {
5647
+ class Co extends Ws {
5643
5648
  constructor(t) {
5644
5649
  super(t), _i(this, "actions", { onChange: (n) => {
5645
5650
  let { onChange: r, compare: o, mode: i, value: l } = this.state.dataRef.current;
@@ -5705,14 +5710,14 @@ class No extends Ws {
5705
5710
  }
5706
5711
  }
5707
5712
  static new({ id: t, __demoMode: n = !1 }) {
5708
- return new No({ id: t, dataRef: { current: {} }, listboxState: n ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, buttonElement: null, optionsElement: null, pendingShouldSort: !1, pendingFocus: { focus: me.Nothing }, __demoMode: n });
5713
+ return new Co({ id: t, dataRef: { current: {} }, listboxState: n ? 0 : 1, options: [], searchQuery: "", activeOptionIndex: null, activationTrigger: 1, buttonElement: null, optionsElement: null, pendingShouldSort: !1, pendingFocus: { focus: me.Nothing }, __demoMode: n });
5709
5714
  }
5710
5715
  reduce(t, n) {
5711
5716
  return Xe(n.type, bp, t, n);
5712
5717
  }
5713
5718
  }
5714
5719
  const $l = Se(null);
5715
- function Co(e) {
5720
+ function No(e) {
5716
5721
  let t = he($l);
5717
5722
  if (t === null) {
5718
5723
  let n = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
@@ -5721,7 +5726,7 @@ function Co(e) {
5721
5726
  return t;
5722
5727
  }
5723
5728
  function Ll({ id: e, __demoMode: t = !1 }) {
5724
- let n = re(() => No.new({ id: e, __demoMode: t }), []);
5729
+ let n = re(() => Co.new({ id: e, __demoMode: t }), []);
5725
5730
  return wl(() => n.dispose()), n;
5726
5731
  }
5727
5732
  let er = Se(null);
@@ -5742,18 +5747,18 @@ function yp(e, t) {
5742
5747
  de(() => {
5743
5748
  M.state.dataRef.current = b;
5744
5749
  }, [b]);
5745
- let P = qe(M, (V) => V.listboxState), A = ho.get(null), N = qe(A, X((V) => A.selectors.isTop(V, n), [A, n])), [E, S] = qe(M, (V) => [V.buttonElement, V.optionsElement]);
5746
- Iu(N, [E, S], (V, G) => {
5747
- M.send({ type: Pl.CloseListbox }), Gs(G, go.Loose) || (V.preventDefault(), E == null || E.focus());
5750
+ let A = qe(M, (V) => V.listboxState), P = ho.get(null), C = qe(P, X((V) => P.selectors.isTop(V, n), [P, n])), [E, S] = qe(M, (V) => [V.buttonElement, V.optionsElement]);
5751
+ Iu(C, [E, S], (V, G) => {
5752
+ M.send({ type: Al.CloseListbox }), Gs(G, go.Loose) || (V.preventDefault(), E == null || E.focus());
5748
5753
  });
5749
- let O = re(() => ({ open: P === Re.Open, disabled: d, invalid: u, value: T }), [P, d, u, T]), [C, x] = tu({ inherit: !0 }), D = { ref: L }, _ = X(() => {
5754
+ let O = re(() => ({ open: A === Re.Open, disabled: d, invalid: u, value: T }), [A, d, u, T]), [N, x] = tu({ inherit: !0 }), D = { ref: L }, _ = X(() => {
5750
5755
  if (y !== void 0) return I == null ? void 0 : I(y);
5751
5756
  }, [I, y]), U = We();
5752
- return z.createElement(x, { value: C, props: { htmlFor: E == null ? void 0 : E.id }, slot: { open: P === Re.Open, disabled: d } }, z.createElement(Ud, null, z.createElement($l.Provider, { value: M }, z.createElement(er.Provider, { value: b }, z.createElement(xl, { value: Xe(P, { [Re.Open]: tt.Open, [Re.Closed]: tt.Closed }) }, c != null && T != null && z.createElement(Bc, { disabled: d, data: { [c]: T }, form: l, onReset: _ }), U({ ourProps: D, theirProps: g, slot: O, defaultTag: xp, name: "Listbox" }))))));
5757
+ return z.createElement(x, { value: N, props: { htmlFor: E == null ? void 0 : E.id }, slot: { open: A === Re.Open, disabled: d } }, z.createElement(Ud, null, z.createElement($l.Provider, { value: M }, z.createElement(er.Provider, { value: b }, z.createElement(xl, { value: Xe(A, { [Re.Open]: tt.Open, [Re.Closed]: tt.Closed }) }, c != null && T != null && z.createElement(Bc, { disabled: d, data: { [c]: T }, form: l, onReset: _ }), U({ ourProps: D, theirProps: g, slot: O, defaultTag: xp, name: "Listbox" }))))));
5753
5758
  }
5754
5759
  let wp = "button";
5755
5760
  function Ep(e, t) {
5756
- let n = Mt(), r = $s(), o = pn("Listbox.Button"), i = Co("Listbox.Button"), { id: l = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: s = !1, ...a } = e, u = Je(t, _d(), i.actions.setButtonElement), d = kd(), [p, f, h] = qe(i, (x) => [x.listboxState, x.buttonElement, x.optionsElement]), g = p === Re.Open;
5761
+ let n = Mt(), r = $s(), o = pn("Listbox.Button"), i = No("Listbox.Button"), { id: l = r || `headlessui-listbox-button-${n}`, disabled: c = o.disabled || !1, autoFocus: s = !1, ...a } = e, u = Je(t, _d(), i.actions.setButtonElement), d = kd(), [p, f, h] = qe(i, (x) => [x.listboxState, x.buttonElement, x.optionsElement]), g = p === Re.Open;
5757
5762
  Fu(g, { trigger: f, action: X((x) => {
5758
5763
  if (f != null && f.contains(x.target)) return yn.Ignore;
5759
5764
  let D = x.target.closest('[role="option"]:not([data-disabled])');
@@ -5788,30 +5793,30 @@ function Ep(e, t) {
5788
5793
  T.current = x.pointerType, x.pointerType === "mouse" && y(x);
5789
5794
  }), M = ie((x) => {
5790
5795
  T.current !== "mouse" && y(x);
5791
- }), F = ie((x) => x.preventDefault()), k = Fs([l]), m = Qc(), { isFocusVisible: v, focusProps: b } = Ec({ autoFocus: s }), { isHovered: P, hoverProps: A } = wc({ isDisabled: c }), { pressed: N, pressProps: E } = Cc({ disabled: c }), S = re(() => ({ open: p === Re.Open, active: N || p === Re.Open, disabled: c, invalid: o.invalid, value: o.value, hover: P, focus: v, autofocus: s }), [p, o.value, c, P, v, N, o.invalid, s]), O = qe(i, (x) => x.listboxState === Re.Open), C = Ts(d(), { ref: u, id: l, type: _u(e, f), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": O, "aria-labelledby": k, "aria-describedby": m, disabled: c || void 0, autoFocus: s, onKeyDown: w, onKeyUp: L, onKeyPress: F, onPointerDown: I, onClick: M }, b, A, E);
5792
- return We()({ ourProps: C, theirProps: a, slot: S, defaultTag: wp, name: "Listbox.Button" });
5796
+ }), F = ie((x) => x.preventDefault()), k = Fs([l]), m = Qc(), { isFocusVisible: v, focusProps: b } = Ec({ autoFocus: s }), { isHovered: A, hoverProps: P } = wc({ isDisabled: c }), { pressed: C, pressProps: E } = Nc({ disabled: c }), S = re(() => ({ open: p === Re.Open, active: C || p === Re.Open, disabled: c, invalid: o.invalid, value: o.value, hover: A, focus: v, autofocus: s }), [p, o.value, c, A, v, C, o.invalid, s]), O = qe(i, (x) => x.listboxState === Re.Open), N = Ts(d(), { ref: u, id: l, type: _u(e, f), "aria-haspopup": "listbox", "aria-controls": h == null ? void 0 : h.id, "aria-expanded": O, "aria-labelledby": k, "aria-describedby": m, disabled: c || void 0, autoFocus: s, onKeyDown: w, onKeyUp: L, onKeyPress: F, onPointerDown: I, onClick: M }, b, P, E);
5797
+ return We()({ ourProps: N, theirProps: a, slot: S, defaultTag: wp, name: "Listbox.Button" });
5793
5798
  }
5794
5799
  let Dl = Se(!1), Rp = "div", Sp = Ln.RenderStrategy | Ln.Static;
5795
5800
  function Op(e, t) {
5796
5801
  let n = Mt(), { id: r = `headlessui-listbox-options-${n}`, anchor: o, portal: i = !1, modal: l = !0, transition: c = !1, ...s } = e, a = Fd(o), [u, d] = te(null);
5797
5802
  a && (i = !0);
5798
- let p = pn("Listbox.Options"), f = Co("Listbox.Options"), [h, g, w, L] = qe(f, (H) => [H.listboxState, H.buttonElement, H.optionsElement, H.__demoMode]), y = Br(g), T = Br(w), I = Oo(), [M, F] = Xs(c, u, I !== null ? (I & tt.Open) === tt.Open : h === Re.Open);
5803
+ let p = pn("Listbox.Options"), f = No("Listbox.Options"), [h, g, w, L] = qe(f, (H) => [H.listboxState, H.buttonElement, H.optionsElement, H.__demoMode]), y = Br(g), T = Br(w), I = Oo(), [M, F] = Xs(c, u, I !== null ? (I & tt.Open) === tt.Open : h === Re.Open);
5799
5804
  Eu(M, g, f.actions.closeListbox);
5800
5805
  let k = L ? !1 : l && h === Re.Open;
5801
5806
  Gu(k, T);
5802
5807
  let m = L ? !1 : l && h === Re.Open;
5803
5808
  wu(m, { allowed: X(() => [g, w], [g, w]) });
5804
- let v = h !== Re.Open, b = pp(v, g) ? !1 : M, P = M && h === Re.Closed, A = Hd(P, p.value), N = ie((H) => p.compare(A, H)), E = qe(f, (H) => {
5809
+ let v = h !== Re.Open, b = pp(v, g) ? !1 : M, A = M && h === Re.Closed, P = Hd(A, p.value), C = ie((H) => p.compare(P, H)), E = qe(f, (H) => {
5805
5810
  var Z;
5806
5811
  if (a == null || !((Z = a == null ? void 0 : a.to) != null && Z.includes("selection"))) return null;
5807
- let fe = H.options.findIndex((Ae) => N(Ae.dataRef.current.value));
5812
+ let fe = H.options.findIndex((Pe) => C(Pe.dataRef.current.value));
5808
5813
  return fe === -1 && (fe = 0), fe;
5809
5814
  }), S = (() => {
5810
5815
  if (a == null) return;
5811
5816
  if (E === null) return { ...a, inner: void 0 };
5812
5817
  let H = Array.from(p.listRef.current.values());
5813
5818
  return { ...a, inner: { listRef: { current: H }, index: E } };
5814
- })(), [O, C] = Bd(S), x = Wd(), D = Je(t, a ? O : null, f.actions.setOptionsElement, d), _ = Gt();
5819
+ })(), [O, N] = Bd(S), x = Wd(), D = Je(t, a ? O : null, f.actions.setOptionsElement, d), _ = Gt();
5815
5820
  ye(() => {
5816
5821
  var H;
5817
5822
  let Z = w;
@@ -5824,8 +5829,8 @@ function Op(e, t) {
5824
5829
  if (f.state.searchQuery !== "") return H.preventDefault(), H.stopPropagation(), f.actions.search(H.key);
5825
5830
  case Ee.Enter:
5826
5831
  if (H.preventDefault(), H.stopPropagation(), f.state.activeOptionIndex !== null) {
5827
- let { dataRef: Ae } = f.state.options[f.state.activeOptionIndex];
5828
- f.actions.onChange(Ae.current.value);
5832
+ let { dataRef: Pe } = f.state.options[f.state.activeOptionIndex];
5833
+ f.actions.onChange(Pe.current.value);
5829
5834
  }
5830
5835
  p.mode === st.Single && (tn(() => f.actions.closeListbox()), (Z = f.state.buttonElement) == null || Z.focus({ preventScroll: !0 }));
5831
5836
  break;
@@ -5843,7 +5848,7 @@ function Op(e, t) {
5843
5848
  H.preventDefault(), H.stopPropagation(), tn(() => f.actions.closeListbox()), (fe = f.state.buttonElement) == null || fe.focus({ preventScroll: !0 });
5844
5849
  return;
5845
5850
  case Ee.Tab:
5846
- H.preventDefault(), H.stopPropagation(), tn(() => f.actions.closeListbox()), Pu(f.state.buttonElement, H.shiftKey ? Wr.Previous : Wr.Next);
5851
+ H.preventDefault(), H.stopPropagation(), tn(() => f.actions.closeListbox()), Au(f.state.buttonElement, H.shiftKey ? Wr.Previous : Wr.Next);
5847
5852
  break;
5848
5853
  default:
5849
5854
  H.key.length === 1 && (f.actions.search(H.key), _.setTimeout(() => f.actions.clearSearch(), 350));
@@ -5852,44 +5857,44 @@ function Op(e, t) {
5852
5857
  }), V = qe(f, (H) => {
5853
5858
  var Z;
5854
5859
  return (Z = H.buttonElement) == null ? void 0 : Z.id;
5855
- }), G = re(() => ({ open: h === Re.Open }), [h]), q = Ts(a ? x() : {}, { id: r, ref: D, "aria-activedescendant": qe(f, f.selectors.activeDescendantId), "aria-multiselectable": p.mode === st.Multi ? !0 : void 0, "aria-labelledby": V, "aria-orientation": p.orientation, onKeyDown: U, role: "listbox", tabIndex: h === Re.Open ? 0 : void 0, style: { ...s.style, ...C, "--button-width": cu(g, !0).width }, ...qs(F) }), W = We(), K = re(() => p.mode === st.Multi ? p : { ...p, isSelected: N }, [p, N]);
5860
+ }), G = re(() => ({ open: h === Re.Open }), [h]), q = Ts(a ? x() : {}, { id: r, ref: D, "aria-activedescendant": qe(f, f.selectors.activeDescendantId), "aria-multiselectable": p.mode === st.Multi ? !0 : void 0, "aria-labelledby": V, "aria-orientation": p.orientation, onKeyDown: U, role: "listbox", tabIndex: h === Re.Open ? 0 : void 0, style: { ...s.style, ...N, "--button-width": cu(g, !0).width }, ...qs(F) }), W = We(), K = re(() => p.mode === st.Multi ? p : { ...p, isSelected: C }, [p, C]);
5856
5861
  return z.createElement(op, { enabled: i ? e.static || M : !1, ownerDocument: y }, z.createElement(er.Provider, { value: K }, W({ ourProps: q, theirProps: s, slot: G, defaultTag: Rp, features: Sp, visible: b, name: "Listbox.Options" })));
5857
5862
  }
5858
5863
  let Tp = "div";
5859
- function Np(e, t) {
5860
- let n = Mt(), { id: r = `headlessui-listbox-option-${n}`, disabled: o = !1, value: i, ...l } = e, c = he(Dl) === !0, s = pn("Listbox.Option"), a = Co("Listbox.Option"), u = qe(a, (b) => a.selectors.isActive(b, r)), d = s.isSelected(i), p = ee(null), f = hp(p), h = jt({ disabled: o, value: i, domRef: p, get textValue() {
5864
+ function Cp(e, t) {
5865
+ let n = Mt(), { id: r = `headlessui-listbox-option-${n}`, disabled: o = !1, value: i, ...l } = e, c = he(Dl) === !0, s = pn("Listbox.Option"), a = No("Listbox.Option"), u = qe(a, (b) => a.selectors.isActive(b, r)), d = s.isSelected(i), p = ee(null), f = hp(p), h = jt({ disabled: o, value: i, domRef: p, get textValue() {
5861
5866
  return f();
5862
5867
  } }), g = Je(t, p, (b) => {
5863
5868
  b ? s.listRef.current.set(r, b) : s.listRef.current.delete(r);
5864
5869
  }), w = qe(a, (b) => a.selectors.shouldScrollIntoView(b, r));
5865
5870
  de(() => {
5866
5871
  if (w) return nt().requestAnimationFrame(() => {
5867
- var b, P;
5868
- (P = (b = p.current) == null ? void 0 : b.scrollIntoView) == null || P.call(b, { block: "nearest" });
5872
+ var b, A;
5873
+ (A = (b = p.current) == null ? void 0 : b.scrollIntoView) == null || A.call(b, { block: "nearest" });
5869
5874
  });
5870
5875
  }, [w, p]), de(() => {
5871
5876
  if (!c) return a.actions.registerOption(r, h), () => a.actions.unregisterOption(r);
5872
5877
  }, [h, r, c]);
5873
5878
  let L = ie((b) => {
5874
- var P;
5879
+ var A;
5875
5880
  if (o) return b.preventDefault();
5876
- a.actions.onChange(i), s.mode === st.Single && (tn(() => a.actions.closeListbox()), (P = a.state.buttonElement) == null || P.focus({ preventScroll: !0 }));
5881
+ a.actions.onChange(i), s.mode === st.Single && (tn(() => a.actions.closeListbox()), (A = a.state.buttonElement) == null || A.focus({ preventScroll: !0 }));
5877
5882
  }), y = ie(() => {
5878
5883
  if (o) return a.actions.goToOption({ focus: me.Nothing });
5879
5884
  a.actions.goToOption({ focus: me.Specific, id: r });
5880
5885
  }), T = Yu(), I = ie((b) => T.update(b)), M = ie((b) => {
5881
- T.wasMoved(b) && (o || u && a.state.activationTrigger === Nn.Pointer || a.actions.goToOption({ focus: me.Specific, id: r }, Nn.Pointer));
5886
+ T.wasMoved(b) && (o || u && a.state.activationTrigger === Cn.Pointer || a.actions.goToOption({ focus: me.Specific, id: r }, Cn.Pointer));
5882
5887
  }), F = ie((b) => {
5883
- T.wasMoved(b) && (o || u && a.state.activationTrigger === Nn.Pointer && a.actions.goToOption({ focus: me.Nothing }));
5888
+ T.wasMoved(b) && (o || u && a.state.activationTrigger === Cn.Pointer && a.actions.goToOption({ focus: me.Nothing }));
5884
5889
  }), k = re(() => ({ active: u, focus: u, selected: d, disabled: o, selectedOption: d && c }), [u, d, o, c]), m = c ? {} : { id: r, ref: g, role: "option", tabIndex: o === !0 ? void 0 : -1, "aria-disabled": o === !0 ? !0 : void 0, "aria-selected": d, disabled: void 0, onClick: L, onFocus: y, onPointerEnter: I, onMouseEnter: I, onPointerMove: M, onMouseMove: M, onPointerLeave: F, onMouseLeave: F }, v = We();
5885
5890
  return !d && c ? null : v({ ourProps: m, theirProps: l, slot: k, defaultTag: Tp, name: "Listbox.Option" });
5886
5891
  }
5887
- let Cp = ke;
5888
- function Ap(e, t) {
5892
+ let Np = ke;
5893
+ function Pp(e, t) {
5889
5894
  let { options: n, placeholder: r, ...o } = e, i = { ref: Je(t) }, l = pn("ListboxSelectedOption"), c = re(() => ({}), []), s = l.value === void 0 || l.value === null || l.mode === st.Multi && Array.isArray(l.value) && l.value.length === 0, a = We();
5890
- return z.createElement(Dl.Provider, { value: !0 }, a({ ourProps: i, theirProps: { ...o, children: z.createElement(z.Fragment, null, r && s ? r : n) }, slot: c, defaultTag: Cp, name: "ListboxSelectedOption" }));
5895
+ return z.createElement(Dl.Provider, { value: !0 }, a({ ourProps: i, theirProps: { ...o, children: z.createElement(z.Fragment, null, r && s ? r : n) }, slot: c, defaultTag: Np, name: "ListboxSelectedOption" }));
5891
5896
  }
5892
- let Pp = Fe(yp), $p = Fe(Ep), Lp = iu, Dp = Fe(Op), Ip = Fe(Np), Mp = Fe(Ap), St = Object.assign(Pp, { Button: $p, Label: Lp, Options: Dp, Option: Ip, SelectedOption: Mp });
5897
+ let Ap = Fe(yp), $p = Fe(Ep), Lp = iu, Dp = Fe(Op), Ip = Fe(Cp), Mp = Fe(Pp), St = Object.assign(Ap, { Button: $p, Label: Lp, Options: Dp, Option: Ip, SelectedOption: Mp });
5893
5898
  function jp({
5894
5899
  title: e,
5895
5900
  titleId: t,
@@ -5982,7 +5987,7 @@ const Il = /* @__PURE__ */ j.forwardRef(jp), Fp = ({
5982
5987
  }
5983
5988
  ),
5984
5989
  /* @__PURE__ */ R.jsx(
5985
- Al,
5990
+ Pl,
5986
5991
  {
5987
5992
  as: ke,
5988
5993
  enter: "transition ease-out duration-100",
@@ -6106,7 +6111,7 @@ const Il = /* @__PURE__ */ j.forwardRef(jp), Fp = ({
6106
6111
  }
6107
6112
  ),
6108
6113
  /* @__PURE__ */ R.jsx(
6109
- Al,
6114
+ Pl,
6110
6115
  {
6111
6116
  as: ke,
6112
6117
  enter: "transition ease-out duration-100",
@@ -6158,7 +6163,7 @@ const Il = /* @__PURE__ */ j.forwardRef(jp), Fp = ({
6158
6163
  ] })
6159
6164
  }
6160
6165
  ) });
6161
- }, Ao = ({
6166
+ }, Po = ({
6162
6167
  currentActiveChain: e,
6163
6168
  chainList: t,
6164
6169
  onChainChange: n,
@@ -6225,7 +6230,7 @@ const Il = /* @__PURE__ */ j.forwardRef(jp), Fp = ({
6225
6230
  const r = n.split("."), o = r[0];
6226
6231
  let i = r[1] || "";
6227
6232
  return i.length > 6 && (i = i.substring(0, 6)), i = i.replace(/0+$/, ""), i ? (i.length === 1 && (i += "0"), o + "." + i) : o + ".00";
6228
- }, Po = (e, t = "0") => {
6233
+ }, Ao = (e, t = "0") => {
6229
6234
  if (/[^0-9.]/.test(e))
6230
6235
  return {
6231
6236
  isValid: !1,
@@ -6251,7 +6256,7 @@ const Il = /* @__PURE__ */ j.forwardRef(jp), Fp = ({
6251
6256
  const o = e.split(".");
6252
6257
  if (o.length === 2 && o[1].length > 6) {
6253
6258
  const s = o[0] + "." + o[1].substring(0, 6);
6254
- return Po(s, t);
6259
+ return Ao(s, t);
6255
6260
  }
6256
6261
  const i = parseFloat(e), l = parseFloat(t);
6257
6262
  return !isNaN(i) && !isNaN(l) && i > l ? {
@@ -6298,11 +6303,11 @@ const Il = /* @__PURE__ */ j.forwardRef(jp), Fp = ({
6298
6303
  }
6299
6304
  ], $o = {
6300
6305
  wallet: "mpc",
6301
- ethAddress: "0x1234567890123456789012345678901234567890",
6302
- accountId: "123",
6303
- l2Key: "0x123"
6306
+ ethAddress: "",
6307
+ accountId: "",
6308
+ l2Key: ""
6304
6309
  }, Lo = {
6305
- address: "0x1234567890123456789012345678901234567890"
6310
+ address: ""
6306
6311
  }, Do = {
6307
6312
  multiChain: { minDeposit: 10 }
6308
6313
  };
@@ -7209,7 +7214,7 @@ var vm = function() {
7209
7214
  T.current = E, typeof n == "function" ? n(E) : n && (n.current = E);
7210
7215
  },
7211
7216
  [n]
7212
- ), [F, k] = z.useState(!1), { margin: m, cells: v, numCells: b, calculatedImageSettings: P } = Kl({
7217
+ ), [F, k] = z.useState(!1), { margin: m, cells: v, numCells: b, calculatedImageSettings: A } = Kl({
7213
7218
  value: o,
7214
7219
  level: l,
7215
7220
  minVersion: u,
@@ -7225,10 +7230,10 @@ var vm = function() {
7225
7230
  if (!S)
7226
7231
  return;
7227
7232
  let O = v;
7228
- const C = I.current, x = P != null && C !== null && C.complete && C.naturalHeight !== 0 && C.naturalWidth !== 0;
7229
- x && P.excavation != null && (O = Yl(
7233
+ const N = I.current, x = A != null && N !== null && N.complete && N.naturalHeight !== 0 && N.naturalWidth !== 0;
7234
+ x && A.excavation != null && (O = Yl(
7230
7235
  v,
7231
- P.excavation
7236
+ A.excavation
7232
7237
  ));
7233
7238
  const D = window.devicePixelRatio || 1;
7234
7239
  E.height = E.width = i * D;
@@ -7237,20 +7242,20 @@ var vm = function() {
7237
7242
  U.forEach(function(G, q) {
7238
7243
  G && S.fillRect(q + m, V + m, 1, 1);
7239
7244
  });
7240
- }), P && (S.globalAlpha = P.opacity), x && S.drawImage(
7241
- C,
7242
- P.x + m,
7243
- P.y + m,
7244
- P.w,
7245
- P.h
7245
+ }), A && (S.globalAlpha = A.opacity), x && S.drawImage(
7246
+ N,
7247
+ A.x + m,
7248
+ A.y + m,
7249
+ A.w,
7250
+ A.h
7246
7251
  );
7247
7252
  }
7248
7253
  }), z.useEffect(() => {
7249
7254
  k(!1);
7250
7255
  }, [y]);
7251
- const A = Jr({ height: i, width: i }, w);
7252
- let N = null;
7253
- return y != null && (N = /* @__PURE__ */ z.createElement(
7256
+ const P = Jr({ height: i, width: i }, w);
7257
+ let C = null;
7258
+ return y != null && (C = /* @__PURE__ */ z.createElement(
7254
7259
  "img",
7255
7260
  {
7256
7261
  src: y,
@@ -7260,18 +7265,18 @@ var vm = function() {
7260
7265
  k(!0);
7261
7266
  },
7262
7267
  ref: I,
7263
- crossOrigin: P == null ? void 0 : P.crossOrigin
7268
+ crossOrigin: A == null ? void 0 : A.crossOrigin
7264
7269
  }
7265
7270
  )), /* @__PURE__ */ z.createElement(z.Fragment, null, /* @__PURE__ */ z.createElement(
7266
7271
  "canvas",
7267
7272
  Jr({
7268
- style: A,
7273
+ style: P,
7269
7274
  height: i,
7270
7275
  width: i,
7271
7276
  ref: M,
7272
7277
  role: "img"
7273
7278
  }, L)
7274
- ), N);
7279
+ ), C);
7275
7280
  }
7276
7281
  );
7277
7282
  bm.displayName = "QRCodeCanvas";
@@ -7419,7 +7424,7 @@ function lt(e) {
7419
7424
  return (e == null ? void 0 : e.ownerDocument) || document;
7420
7425
  }
7421
7426
  function Ql(e) {
7422
- return Ce(e) && e.matches(Rm);
7427
+ return Ne(e) && e.matches(Rm);
7423
7428
  }
7424
7429
  function Om(e) {
7425
7430
  if (!e || Em()) return !0;
@@ -7432,22 +7437,22 @@ function Om(e) {
7432
7437
  function Tm(e) {
7433
7438
  return e ? e.hasAttribute(Hi) ? e : e.querySelector("[" + Hi + "]") || e : null;
7434
7439
  }
7435
- function Cn(e, t, n) {
7440
+ function Nn(e, t, n) {
7436
7441
  return n === void 0 && (n = !0), e.filter((o) => {
7437
7442
  var i;
7438
7443
  return o.parentId === t && (!n || ((i = o.context) == null ? void 0 : i.open));
7439
- }).flatMap((o) => [o, ...Cn(e, o.id, n)]);
7444
+ }).flatMap((o) => [o, ...Nn(e, o.id, n)]);
7440
7445
  }
7441
- function Nm(e) {
7446
+ function Cm(e) {
7442
7447
  return "nativeEvent" in e;
7443
7448
  }
7444
7449
  function cn(e, t) {
7445
7450
  const n = ["mouse", "pen"];
7446
7451
  return t || n.push("", void 0), n.includes(e);
7447
7452
  }
7448
- var Cm = typeof document < "u", Am = function() {
7449
- }, ut = Cm ? Bn : Am;
7450
- const Pm = {
7453
+ var Nm = typeof document < "u", Pm = function() {
7454
+ }, ut = Nm ? Bn : Pm;
7455
+ const Am = {
7451
7456
  ...j
7452
7457
  };
7453
7458
  function Sn(e) {
@@ -7456,7 +7461,7 @@ function Sn(e) {
7456
7461
  t.current = e;
7457
7462
  }), t;
7458
7463
  }
7459
- const $m = Pm.useInsertionEffect, Lm = $m || ((e) => e());
7464
+ const $m = Am.useInsertionEffect, Lm = $m || ((e) => e());
7460
7465
  function it(e) {
7461
7466
  const t = j.useRef(() => {
7462
7467
  if (process.env.NODE_ENV !== "production")
@@ -7592,47 +7597,47 @@ function Hm(e, t) {
7592
7597
  restMs: d = 0,
7593
7598
  move: p = !0
7594
7599
  } = t, f = Fo(), h = jo(), g = Sn(a), w = Sn(s), L = Sn(n), y = Sn(d), T = j.useRef(), I = j.useRef(-1), M = j.useRef(), F = j.useRef(-1), k = j.useRef(!0), m = j.useRef(!1), v = j.useRef(() => {
7595
- }), b = j.useRef(!1), P = it(() => {
7596
- var C;
7597
- const x = (C = o.current.openEvent) == null ? void 0 : C.type;
7600
+ }), b = j.useRef(!1), A = it(() => {
7601
+ var N;
7602
+ const x = (N = o.current.openEvent) == null ? void 0 : N.type;
7598
7603
  return (x == null ? void 0 : x.includes("mouse")) && x !== "mousedown";
7599
7604
  });
7600
7605
  j.useEffect(() => {
7601
7606
  if (!c) return;
7602
- function C(x) {
7607
+ function N(x) {
7603
7608
  let {
7604
7609
  open: D
7605
7610
  } = x;
7606
7611
  D || (Ge(I), Ge(F), k.current = !0, b.current = !1);
7607
7612
  }
7608
- return i.on("openchange", C), () => {
7609
- i.off("openchange", C);
7613
+ return i.on("openchange", N), () => {
7614
+ i.off("openchange", N);
7610
7615
  };
7611
7616
  }, [c, i]), j.useEffect(() => {
7612
7617
  if (!c || !g.current || !n) return;
7613
- function C(D) {
7614
- P() && r(!1, D, "hover");
7618
+ function N(D) {
7619
+ A() && r(!1, D, "hover");
7615
7620
  }
7616
7621
  const x = lt(l.floating).documentElement;
7617
- return x.addEventListener("mouseleave", C), () => {
7618
- x.removeEventListener("mouseleave", C);
7622
+ return x.addEventListener("mouseleave", N), () => {
7623
+ x.removeEventListener("mouseleave", N);
7619
7624
  };
7620
- }, [l.floating, n, r, c, g, P]);
7621
- const A = j.useCallback(function(C, x, D) {
7625
+ }, [l.floating, n, r, c, g, A]);
7626
+ const P = j.useCallback(function(N, x, D) {
7622
7627
  x === void 0 && (x = !0), D === void 0 && (D = "hover");
7623
7628
  const _ = Or(w.current, "close", T.current);
7624
- _ && !M.current ? (Ge(I), I.current = window.setTimeout(() => r(!1, C, D), _)) : x && (Ge(I), r(!1, C, D));
7625
- }, [w, r]), N = it(() => {
7629
+ _ && !M.current ? (Ge(I), I.current = window.setTimeout(() => r(!1, N, D), _)) : x && (Ge(I), r(!1, N, D));
7630
+ }, [w, r]), C = it(() => {
7626
7631
  v.current(), M.current = void 0;
7627
7632
  }), E = it(() => {
7628
7633
  if (m.current) {
7629
- const C = lt(l.floating).body;
7630
- C.style.pointerEvents = "", C.removeAttribute(Qi), m.current = !1;
7634
+ const N = lt(l.floating).body;
7635
+ N.style.pointerEvents = "", N.removeAttribute(Qi), m.current = !1;
7631
7636
  }
7632
7637
  }), S = it(() => o.current.openEvent ? ["click", "mousedown"].includes(o.current.openEvent.type) : !1);
7633
7638
  j.useEffect(() => {
7634
7639
  if (!c) return;
7635
- function C(V) {
7640
+ function N(V) {
7636
7641
  if (Ge(I), k.current = !1, u && !cn(T.current) || Tr(y.current) > 0 && !Or(w.current, "open"))
7637
7642
  return;
7638
7643
  const G = Or(w.current, "open", T.current);
@@ -7654,7 +7659,7 @@ function Hm(e, t) {
7654
7659
  x: V.clientX,
7655
7660
  y: V.clientY,
7656
7661
  onClose() {
7657
- E(), N(), S() || A(V, !0, "safe-polygon");
7662
+ E(), C(), S() || P(V, !0, "safe-polygon");
7658
7663
  }
7659
7664
  });
7660
7665
  const W = M.current;
@@ -7663,7 +7668,7 @@ function Hm(e, t) {
7663
7668
  };
7664
7669
  return;
7665
7670
  }
7666
- (T.current === "touch" ? !Ht(l.floating, V.relatedTarget) : !0) && A(V);
7671
+ (T.current === "touch" ? !Ht(l.floating, V.relatedTarget) : !0) && P(V);
7667
7672
  }
7668
7673
  function D(V) {
7669
7674
  S() || o.current.floatingContext && (g.current == null || g.current({
@@ -7672,7 +7677,7 @@ function Hm(e, t) {
7672
7677
  x: V.clientX,
7673
7678
  y: V.clientY,
7674
7679
  onClose() {
7675
- E(), N(), S() || A(V);
7680
+ E(), C(), S() || P(V);
7676
7681
  }
7677
7682
  })(V));
7678
7683
  }
@@ -7680,19 +7685,19 @@ function Hm(e, t) {
7680
7685
  Ge(I);
7681
7686
  }
7682
7687
  function U(V) {
7683
- S() || A(V, !1);
7688
+ S() || P(V, !1);
7684
7689
  }
7685
7690
  if (le(l.domReference)) {
7686
7691
  const V = l.domReference, G = l.floating;
7687
- return n && V.addEventListener("mouseleave", D), p && V.addEventListener("mousemove", C, {
7692
+ return n && V.addEventListener("mouseleave", D), p && V.addEventListener("mousemove", N, {
7688
7693
  once: !0
7689
- }), V.addEventListener("mouseenter", C), V.addEventListener("mouseleave", x), G && (G.addEventListener("mouseleave", D), G.addEventListener("mouseenter", _), G.addEventListener("mouseleave", U)), () => {
7690
- n && V.removeEventListener("mouseleave", D), p && V.removeEventListener("mousemove", C), V.removeEventListener("mouseenter", C), V.removeEventListener("mouseleave", x), G && (G.removeEventListener("mouseleave", D), G.removeEventListener("mouseenter", _), G.removeEventListener("mouseleave", U));
7694
+ }), V.addEventListener("mouseenter", N), V.addEventListener("mouseleave", x), G && (G.addEventListener("mouseleave", D), G.addEventListener("mouseenter", _), G.addEventListener("mouseleave", U)), () => {
7695
+ n && V.removeEventListener("mouseleave", D), p && V.removeEventListener("mousemove", N), V.removeEventListener("mouseenter", N), V.removeEventListener("mouseleave", x), G && (G.removeEventListener("mouseleave", D), G.removeEventListener("mouseenter", _), G.removeEventListener("mouseleave", U));
7691
7696
  };
7692
7697
  }
7693
- }, [l, c, e, u, p, A, N, E, r, n, L, f, w, g, o, S, y]), ut(() => {
7694
- var C;
7695
- if (c && n && (C = g.current) != null && (C = C.__options) != null && C.blockPointerEvents && P()) {
7698
+ }, [l, c, e, u, p, P, C, E, r, n, L, f, w, g, o, S, y]), ut(() => {
7699
+ var N;
7700
+ if (c && n && (N = g.current) != null && (N = N.__options) != null && N.blockPointerEvents && A()) {
7696
7701
  m.current = !0;
7697
7702
  const D = l.floating;
7698
7703
  if (le(l.domReference) && D) {
@@ -7705,18 +7710,18 @@ function Hm(e, t) {
7705
7710
  };
7706
7711
  }
7707
7712
  }
7708
- }, [c, n, h, l, f, g, P]), ut(() => {
7709
- n || (T.current = void 0, b.current = !1, N(), E());
7710
- }, [n, N, E]), j.useEffect(() => () => {
7711
- N(), Ge(I), Ge(F), E();
7712
- }, [c, l.domReference, N, E]);
7713
+ }, [c, n, h, l, f, g, A]), ut(() => {
7714
+ n || (T.current = void 0, b.current = !1, C(), E());
7715
+ }, [n, C, E]), j.useEffect(() => () => {
7716
+ C(), Ge(I), Ge(F), E();
7717
+ }, [c, l.domReference, C, E]);
7713
7718
  const O = j.useMemo(() => {
7714
- function C(x) {
7719
+ function N(x) {
7715
7720
  T.current = x.pointerType;
7716
7721
  }
7717
7722
  return {
7718
- onPointerDown: C,
7719
- onPointerEnter: C,
7723
+ onPointerDown: N,
7724
+ onPointerEnter: N,
7720
7725
  onMouseMove(x) {
7721
7726
  const {
7722
7727
  nativeEvent: D
@@ -7858,10 +7863,10 @@ function Ym(e) {
7858
7863
  }
7859
7864
  const Km = () => j.useContext(ta);
7860
7865
  function es(e) {
7861
- return Ce(e.target) && e.target.tagName === "BUTTON";
7866
+ return Ne(e.target) && e.target.tagName === "BUTTON";
7862
7867
  }
7863
7868
  function qm(e) {
7864
- return Ce(e.target) && e.target.tagName === "A";
7869
+ return Ne(e.target) && e.target.tagName === "A";
7865
7870
  }
7866
7871
  function ts(e) {
7867
7872
  return Ql(e);
@@ -7951,10 +7956,10 @@ function Zm(e, t) {
7951
7956
  var S;
7952
7957
  if (!n || !l || !c || E.key !== "Escape" || k.current)
7953
7958
  return;
7954
- const O = (S = i.current.floatingContext) == null ? void 0 : S.nodeId, C = g ? Cn(g.nodesRef.current, O) : [];
7955
- if (!T && (E.stopPropagation(), C.length > 0)) {
7959
+ const O = (S = i.current.floatingContext) == null ? void 0 : S.nodeId, N = g ? Nn(g.nodesRef.current, O) : [];
7960
+ if (!T && (E.stopPropagation(), N.length > 0)) {
7956
7961
  let x = !0;
7957
- if (C.forEach((D) => {
7962
+ if (N.forEach((D) => {
7958
7963
  var _;
7959
7964
  if ((_ = D.context) != null && _.open && !D.context.dataRef.current.__escapeKeyBubbles) {
7960
7965
  x = !1;
@@ -7963,20 +7968,20 @@ function Zm(e, t) {
7963
7968
  }), !x)
7964
7969
  return;
7965
7970
  }
7966
- r(!1, Nm(E) ? E.nativeEvent : E, "escape-key");
7971
+ r(!1, Cm(E) ? E.nativeEvent : E, "escape-key");
7967
7972
  }), v = it((E) => {
7968
7973
  var S;
7969
7974
  const O = () => {
7970
- var C;
7971
- m(E), (C = Wt(E)) == null || C.removeEventListener("keydown", O);
7975
+ var N;
7976
+ m(E), (N = Wt(E)) == null || N.removeEventListener("keydown", O);
7972
7977
  };
7973
7978
  (S = Wt(E)) == null || S.addEventListener("keydown", O);
7974
7979
  }), b = it((E) => {
7975
7980
  var S;
7976
7981
  const O = i.current.insideReactTree;
7977
7982
  i.current.insideReactTree = !1;
7978
- const C = y.current;
7979
- if (y.current = !1, a === "click" && C || O || typeof L == "function" && !L(E))
7983
+ const N = y.current;
7984
+ if (y.current = !1, a === "click" && N || O || typeof L == "function" && !L(E))
7980
7985
  return;
7981
7986
  const x = Wt(E), D = "[" + mn("inert") + "]", _ = lt(o.floating).querySelectorAll(D);
7982
7987
  let U = le(x) ? x : null;
@@ -7991,18 +7996,18 @@ function Zm(e, t) {
7991
7996
  // element was injected after the floating element rendered.
7992
7997
  Array.from(_).every((W) => !Ht(U, W)))
7993
7998
  return;
7994
- if (Ce(x) && N) {
7995
- const W = gt(x), K = Qe(x), H = /auto|scroll/, Z = W || H.test(K.overflowX), fe = W || H.test(K.overflowY), Ae = Z && x.clientWidth > 0 && x.scrollWidth > x.clientWidth, Pe = fe && x.clientHeight > 0 && x.scrollHeight > x.clientHeight, rt = K.direction === "rtl", Oe = Pe && (rt ? E.offsetX <= x.offsetWidth - x.clientWidth : E.offsetX > x.clientWidth), xe = Ae && E.offsetY > x.clientHeight;
7999
+ if (Ne(x) && C) {
8000
+ const W = gt(x), K = Qe(x), H = /auto|scroll/, Z = W || H.test(K.overflowX), fe = W || H.test(K.overflowY), Pe = Z && x.clientWidth > 0 && x.scrollWidth > x.clientWidth, Ae = fe && x.clientHeight > 0 && x.scrollHeight > x.clientHeight, rt = K.direction === "rtl", Oe = Ae && (rt ? E.offsetX <= x.offsetWidth - x.clientWidth : E.offsetX > x.clientWidth), xe = Pe && E.offsetY > x.clientHeight;
7996
8001
  if (Oe || xe)
7997
8002
  return;
7998
8003
  }
7999
- const V = (S = i.current.floatingContext) == null ? void 0 : S.nodeId, G = g && Cn(g.nodesRef.current, V).some((W) => {
8004
+ const V = (S = i.current.floatingContext) == null ? void 0 : S.nodeId, G = g && Nn(g.nodesRef.current, V).some((W) => {
8000
8005
  var K;
8001
8006
  return Rr(E, (K = W.context) == null ? void 0 : K.elements.floating);
8002
8007
  });
8003
8008
  if (Rr(E, o.floating) || Rr(E, o.domReference) || G)
8004
8009
  return;
8005
- const q = g ? Cn(g.nodesRef.current, V) : [];
8010
+ const q = g ? Nn(g.nodesRef.current, V) : [];
8006
8011
  if (q.length > 0) {
8007
8012
  let W = !0;
8008
8013
  if (q.forEach((K) => {
@@ -8015,11 +8020,11 @@ function Zm(e, t) {
8015
8020
  return;
8016
8021
  }
8017
8022
  r(!1, E, "outside-press");
8018
- }), P = it((E) => {
8023
+ }), A = it((E) => {
8019
8024
  var S;
8020
8025
  const O = () => {
8021
- var C;
8022
- b(E), (C = Wt(E)) == null || C.removeEventListener(a, O);
8026
+ var N;
8027
+ b(E), (N = Wt(E)) == null || N.removeEventListener(a, O);
8023
8028
  };
8024
8029
  (S = Wt(E)) == null || S.addEventListener(a, O);
8025
8030
  });
@@ -8034,7 +8039,7 @@ function Zm(e, t) {
8034
8039
  function O() {
8035
8040
  window.clearTimeout(E), k.current = !0;
8036
8041
  }
8037
- function C() {
8042
+ function N() {
8038
8043
  E = window.setTimeout(
8039
8044
  () => {
8040
8045
  k.current = !1;
@@ -8045,7 +8050,7 @@ function Zm(e, t) {
8045
8050
  );
8046
8051
  }
8047
8052
  const x = lt(o.floating);
8048
- c && (x.addEventListener("keydown", M ? v : m, M), x.addEventListener("compositionstart", O), x.addEventListener("compositionend", C)), L && x.addEventListener(a, F ? P : b, F);
8053
+ c && (x.addEventListener("keydown", M ? v : m, M), x.addEventListener("compositionstart", O), x.addEventListener("compositionend", N)), L && x.addEventListener(a, F ? A : b, F);
8049
8054
  let D = [];
8050
8055
  return p && (le(o.domReference) && (D = Ot(o.domReference)), le(o.floating) && (D = D.concat(Ot(o.floating))), !le(o.reference) && o.reference && o.reference.contextElement && (D = D.concat(Ot(o.reference.contextElement)))), D = D.filter((_) => {
8051
8056
  var U;
@@ -8055,14 +8060,14 @@ function Zm(e, t) {
8055
8060
  passive: !0
8056
8061
  });
8057
8062
  }), () => {
8058
- c && (x.removeEventListener("keydown", M ? v : m, M), x.removeEventListener("compositionstart", O), x.removeEventListener("compositionend", C)), L && x.removeEventListener(a, F ? P : b, F), D.forEach((_) => {
8063
+ c && (x.removeEventListener("keydown", M ? v : m, M), x.removeEventListener("compositionstart", O), x.removeEventListener("compositionend", N)), L && x.removeEventListener(a, F ? A : b, F), D.forEach((_) => {
8059
8064
  _.removeEventListener("scroll", S);
8060
8065
  }), window.clearTimeout(E);
8061
8066
  };
8062
- }, [i, o, c, L, a, n, r, p, l, T, I, m, M, v, b, F, P]), j.useEffect(() => {
8067
+ }, [i, o, c, L, a, n, r, p, l, T, I, m, M, v, b, F, A]), j.useEffect(() => {
8063
8068
  i.current.insideReactTree = !1;
8064
8069
  }, [i, L, a]);
8065
- const A = j.useMemo(() => ({
8070
+ const P = j.useMemo(() => ({
8066
8071
  onKeyDown: m,
8067
8072
  ...u && {
8068
8073
  [Qm[d]]: (E) => {
@@ -8074,7 +8079,7 @@ function Zm(e, t) {
8074
8079
  }
8075
8080
  }
8076
8081
  }
8077
- }), [m, r, u, d]), N = j.useMemo(() => ({
8082
+ }), [m, r, u, d]), C = j.useMemo(() => ({
8078
8083
  onKeyDown: m,
8079
8084
  onMouseDown() {
8080
8085
  y.current = !0;
@@ -8087,9 +8092,9 @@ function Zm(e, t) {
8087
8092
  }
8088
8093
  }), [m, a, i]);
8089
8094
  return j.useMemo(() => l ? {
8090
- reference: A,
8091
- floating: N
8092
- } : {}, [l, A, N]);
8095
+ reference: P,
8096
+ floating: C
8097
+ } : {}, [l, P, C]);
8093
8098
  }
8094
8099
  function eh(e) {
8095
8100
  const {
@@ -8186,7 +8191,7 @@ function th(e) {
8186
8191
  elements: L
8187
8192
  }), [f, w, L, y]);
8188
8193
  }
8189
- function Nr() {
8194
+ function Cr() {
8190
8195
  return wm() && Xl();
8191
8196
  }
8192
8197
  function nh(e, t) {
@@ -8205,7 +8210,7 @@ function nh(e, t) {
8205
8210
  if (!c) return;
8206
8211
  const f = Ie(l.domReference);
8207
8212
  function h() {
8208
- !n && Ce(l.domReference) && l.domReference === eo(lt(l.domReference)) && (a.current = !0);
8213
+ !n && Ne(l.domReference) && l.domReference === eo(lt(l.domReference)) && (a.current = !0);
8209
8214
  }
8210
8215
  function g() {
8211
8216
  d.current = !0;
@@ -8213,8 +8218,8 @@ function nh(e, t) {
8213
8218
  function w() {
8214
8219
  d.current = !1;
8215
8220
  }
8216
- return f.addEventListener("blur", h), Nr() && (f.addEventListener("keydown", g, !0), f.addEventListener("pointerdown", w, !0)), () => {
8217
- f.removeEventListener("blur", h), Nr() && (f.removeEventListener("keydown", g, !0), f.removeEventListener("pointerdown", w, !0));
8221
+ return f.addEventListener("blur", h), Cr() && (f.addEventListener("keydown", g, !0), f.addEventListener("pointerdown", w, !0)), () => {
8222
+ f.removeEventListener("blur", h), Cr() && (f.removeEventListener("keydown", g, !0), f.removeEventListener("pointerdown", w, !0));
8218
8223
  };
8219
8224
  }, [l.domReference, n, c]), j.useEffect(() => {
8220
8225
  if (!c) return;
@@ -8238,7 +8243,7 @@ function nh(e, t) {
8238
8243
  if (a.current) return;
8239
8244
  const h = Wt(f.nativeEvent);
8240
8245
  if (s && le(h)) {
8241
- if (Nr() && !f.relatedTarget) {
8246
+ if (Cr() && !f.relatedTarget) {
8242
8247
  if (!d.current && !Ql(h))
8243
8248
  return;
8244
8249
  } else if (!Om(h))
@@ -8260,7 +8265,7 @@ function nh(e, t) {
8260
8265
  reference: p
8261
8266
  } : {}, [c, p]);
8262
8267
  }
8263
- function Cr(e, t, n) {
8268
+ function Nr(e, t, n) {
8264
8269
  const r = /* @__PURE__ */ new Map(), o = n === "item";
8265
8270
  let i = e;
8266
8271
  if (o && e) {
@@ -8300,15 +8305,15 @@ function Cr(e, t, n) {
8300
8305
  function rh(e) {
8301
8306
  e === void 0 && (e = []);
8302
8307
  const t = e.map((c) => c == null ? void 0 : c.reference), n = e.map((c) => c == null ? void 0 : c.floating), r = e.map((c) => c == null ? void 0 : c.item), o = j.useCallback(
8303
- (c) => Cr(c, e, "reference"),
8308
+ (c) => Nr(c, e, "reference"),
8304
8309
  // eslint-disable-next-line react-hooks/exhaustive-deps
8305
8310
  t
8306
8311
  ), i = j.useCallback(
8307
- (c) => Cr(c, e, "floating"),
8312
+ (c) => Nr(c, e, "floating"),
8308
8313
  // eslint-disable-next-line react-hooks/exhaustive-deps
8309
8314
  n
8310
8315
  ), l = j.useCallback(
8311
- (c) => Cr(c, e, "item"),
8316
+ (c) => Nr(c, e, "item"),
8312
8317
  // eslint-disable-next-line react-hooks/exhaustive-deps
8313
8318
  r
8314
8319
  );
@@ -8529,7 +8534,7 @@ const Wn = ({
8529
8534
  var c;
8530
8535
  const { t: i } = ft(), l = z.useMemo(() => Up(n || {}), [n]);
8531
8536
  return /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
8532
- /* @__PURE__ */ R.jsx("div", { className: "flex justify-center mt-4 mb-3", children: /* @__PURE__ */ R.jsx("div", { className: "bg-white rounded-lg", children: /* @__PURE__ */ R.jsx(
8537
+ /* @__PURE__ */ R.jsx("div", { className: "flex justify-center mt-4 mb-3", children: (e == null ? void 0 : e.getDisplayAddress()) && /* @__PURE__ */ R.jsx("div", { className: "bg-white rounded-lg", children: /* @__PURE__ */ R.jsx(
8533
8538
  ql,
8534
8539
  {
8535
8540
  value: (e == null ? void 0 : e.getDisplayAddress()) || "",
@@ -8540,7 +8545,7 @@ const Wn = ({
8540
8545
  marginSize: 0
8541
8546
  }
8542
8547
  ) }) }),
8543
- /* @__PURE__ */ R.jsxs("div", { className: "flex items-center justify-between bg-fill-input-primary rounded-lg py-2 px-3 mb-3", children: [
8548
+ (e == null ? void 0 : e.getDisplayAddress()) && /* @__PURE__ */ R.jsxs("div", { className: "flex items-center justify-between bg-fill-input-primary rounded-lg py-2 px-3 mb-3", children: [
8544
8549
  /* @__PURE__ */ R.jsx("span", { className: "flex-1 text-text-primary text-sm font-medium break-all mr-3", children: e == null ? void 0 : e.getDisplayAddress() }),
8545
8550
  /* @__PURE__ */ R.jsx(
8546
8551
  cm,
@@ -8661,7 +8666,7 @@ const Wn = ({
8661
8666
  );
8662
8667
  return !e || e.length === 0 ? /* @__PURE__ */ R.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ R.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) : f ? /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
8663
8668
  /* @__PURE__ */ R.jsx(
8664
- Ao,
8669
+ Po,
8665
8670
  {
8666
8671
  currentActiveChain: f,
8667
8672
  chainList: e,
@@ -8776,7 +8781,7 @@ const Wn = ({
8776
8781
  }
8777
8782
  }, [o == null ? void 0 : o.chainId, s]);
8778
8783
  const y = (I) => {
8779
- const M = I.target.value, F = w(), k = Po(M, F);
8784
+ const M = I.target.value, F = w(), k = Ao(M, F);
8780
8785
  if (k.isValid)
8781
8786
  u(k.formattedValue), k.errorType;
8782
8787
  else
@@ -9187,22 +9192,22 @@ const mh = (e) => {
9187
9192
  M(W), g == null || g(W);
9188
9193
  },
9189
9194
  [g]
9190
- ), b = z.useRef(!0), P = z.useRef(I), A = z.useRef(y);
9195
+ ), b = z.useRef(!0), A = z.useRef(I), P = z.useRef(y);
9191
9196
  z.useEffect(() => {
9192
9197
  if (b.current) {
9193
- b.current = !1, P.current = I, A.current = y;
9198
+ b.current = !1, A.current = I, P.current = y;
9194
9199
  return;
9195
9200
  }
9196
- (P.current !== I || A.current !== y) && (k(""), P.current = I, A.current = y);
9201
+ (A.current !== I || P.current !== y) && (k(""), A.current = I, P.current = y);
9197
9202
  }, [I, y]);
9198
- const N = e && e.length > 0 ? e.find((W) => W.chainId === y) || e[0] : null, E = (q = N == null ? void 0 : N.tokenList) == null ? void 0 : q.find(
9203
+ const C = e && e.length > 0 ? e.find((W) => W.chainId === y) || e[0] : null, E = (q = C == null ? void 0 : C.tokenList) == null ? void 0 : q.find(
9199
9204
  (W) => W.token === I
9200
- ), S = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: O, queryComponents: C } = ra({
9205
+ ), S = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: O, queryComponents: N } = ra({
9201
9206
  account: S,
9202
9207
  chainId: y,
9203
9208
  contractAddress: void 0,
9204
9209
  // 暂时不传入合约地址
9205
- tokens: (N == null ? void 0 : N.tokenList) || [],
9210
+ tokens: (C == null ? void 0 : C.tokenList) || [],
9206
9211
  wagmiHooks: a
9207
9212
  }), x = re(() => {
9208
9213
  var K;
@@ -9218,17 +9223,16 @@ const mh = (e) => {
9218
9223
  disabled: !1,
9219
9224
  isNetworkSwitch: !0
9220
9225
  };
9221
- const W = parseFloat(F || "0"), K = 10, H = x || "0", Z = Wp(F, H, D);
9226
+ const W = parseFloat(F || "0"), K = 10, Z = Wp(F, x || "0", D);
9222
9227
  return !F || W === 0 || !D ? {
9223
9228
  text: w("deposit.confirmDeposit"),
9224
9229
  disabled: !0,
9225
9230
  isNetworkSwitch: !1
9226
- } : W > parseFloat(H) ? {
9227
- text: "Insufficient Balance",
9228
- disabled: !0,
9229
- isNetworkSwitch: !1
9230
9231
  } : W < K ? {
9231
- text: `Min Deposit ${K} ${I}`,
9232
+ text: w("deposit.minDepositParsed", {
9233
+ amount: K,
9234
+ token: I
9235
+ }),
9232
9236
  disabled: !0,
9233
9237
  isNetworkSwitch: !1
9234
9238
  } : {
@@ -9267,12 +9271,12 @@ const mh = (e) => {
9267
9271
  return !(a != null && a.useBalance) || !(a != null && a.useReadContract) || !(a != null && a.useAccount) ? /* @__PURE__ */ R.jsxs("div", { className: "p-6 text-center", children: [
9268
9272
  /* @__PURE__ */ R.jsx("p", { className: "text-red-500", children: "缺少必要的 wagmi hooks" }),
9269
9273
  /* @__PURE__ */ R.jsx("p", { className: "text-sm text-gray-500 mt-2", children: "请确保传入了 useBalance, useReadContract, useAccount" })
9270
- ] }) : !e || e.length === 0 ? /* @__PURE__ */ R.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ R.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) : N ? /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
9271
- C,
9274
+ ] }) : !e || e.length === 0 ? /* @__PURE__ */ R.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ R.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) : C ? /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
9275
+ N,
9272
9276
  /* @__PURE__ */ R.jsx(
9273
- Ao,
9277
+ Po,
9274
9278
  {
9275
- currentActiveChain: N,
9279
+ currentActiveChain: C,
9276
9280
  chainList: e,
9277
9281
  onChainChange: m,
9278
9282
  curSelectToken: I,
@@ -9290,7 +9294,7 @@ const mh = (e) => {
9290
9294
  allowance: E == null ? void 0 : E.allowance
9291
9295
  },
9292
9296
  approved: D,
9293
- currentActiveChain: N,
9297
+ currentActiveChain: C,
9294
9298
  currentEquity: l || 0,
9295
9299
  amount: F,
9296
9300
  decimals: (E == null ? void 0 : E.decimals) || 6,
@@ -9524,7 +9528,7 @@ const Rh = ({
9524
9528
  }
9525
9529
  return e || "0";
9526
9530
  }, [e, o, n == null ? void 0 : n.chainId]), p = re(() => r || "0", [r]), f = (w) => {
9527
- const L = w.target.value, T = Po(L, p || "0");
9531
+ const L = w.target.value, T = Ao(L, p || "0");
9528
9532
  if (T.isValid)
9529
9533
  c(T.formattedValue), T.errorType;
9530
9534
  else
@@ -9725,7 +9729,7 @@ const Th = z.forwardRef((e, t) => {
9725
9729
  );
9726
9730
  });
9727
9731
  Th.displayName = "WithdrawManager";
9728
- const Nh = (e) => {
9732
+ const Ch = (e) => {
9729
9733
  if (!je) {
9730
9734
  console.error(
9731
9735
  "WithdrawManager not initialized. Make sure to render <WithdrawManager /> in your app."
@@ -9733,7 +9737,7 @@ const Nh = (e) => {
9733
9737
  return;
9734
9738
  }
9735
9739
  je.openWithdraw(e || { chains: [] });
9736
- }, Ch = () => {
9740
+ }, Nh = () => {
9737
9741
  if (!je) {
9738
9742
  console.error(
9739
9743
  "WithdrawManager not initialized. Make sure to render <WithdrawManager /> in your app."
@@ -9741,7 +9745,7 @@ const Nh = (e) => {
9741
9745
  return;
9742
9746
  }
9743
9747
  je.closeWithdraw();
9744
- }, Ah = (e) => {
9748
+ }, Ph = (e) => {
9745
9749
  if (!je) {
9746
9750
  console.error(
9747
9751
  "WithdrawManager not initialized. Make sure to render <WithdrawManager /> in your app."
@@ -9757,12 +9761,12 @@ const Nh = (e) => {
9757
9761
  return;
9758
9762
  }
9759
9763
  je.setWithdrawLoading(e);
9760
- }, Ph = () => je ? je.isOpen() : !1, $h = () => je ? je.isLoading() : !1, Kh = () => ({
9761
- openWithdraw: Nh,
9762
- closeWithdraw: Ch,
9763
- updateWithdrawOptions: Ah,
9764
+ }, Ah = () => je ? je.isOpen() : !1, $h = () => je ? je.isLoading() : !1, Kh = () => ({
9765
+ openWithdraw: Ch,
9766
+ closeWithdraw: Nh,
9767
+ updateWithdrawOptions: Ph,
9764
9768
  setWithdrawLoading: oo,
9765
- isOpen: Ph,
9769
+ isOpen: Ah,
9766
9770
  isLoading: $h
9767
9771
  }), Lh = ({
9768
9772
  chains: e,
@@ -9801,23 +9805,23 @@ const Nh = (e) => {
9801
9805
  y(q), f == null || f(q);
9802
9806
  },
9803
9807
  [f]
9804
- ), P = X(
9808
+ ), A = X(
9805
9809
  (q) => {
9806
9810
  I(q), h == null || h(q);
9807
9811
  },
9808
9812
  [h]
9809
- ), A = z.useRef(!0), N = z.useRef(T), E = z.useRef(L);
9813
+ ), P = z.useRef(!0), C = z.useRef(T), E = z.useRef(L);
9810
9814
  z.useEffect(() => {
9811
- if (A.current) {
9812
- A.current = !1, N.current = T, E.current = L;
9815
+ if (P.current) {
9816
+ P.current = !1, C.current = T, E.current = L;
9813
9817
  return;
9814
9818
  }
9815
- (N.current !== T || E.current !== L) && (F(""), N.current = T, E.current = L);
9819
+ (C.current !== T || E.current !== L) && (F(""), C.current = T, E.current = L);
9816
9820
  }, [T, L]);
9817
9821
  const S = e && e.length > 0 ? e.find((q) => q.chainId === L) || e[0] : null, O = (G = S == null ? void 0 : S.tokenList) == null ? void 0 : G.find(
9818
9822
  (q) => q.token === T
9819
- ), C = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: x, queryComponents: D } = ra({
9820
- account: C,
9823
+ ), N = o == null ? void 0 : o.getDisplayAddress(), { multicallResult: x, queryComponents: D } = ra({
9824
+ account: N,
9821
9825
  chainId: L,
9822
9826
  contractAddress: void 0,
9823
9827
  // 暂时不传入合约地址
@@ -9873,13 +9877,13 @@ const Nh = (e) => {
9873
9877
  ] }) : !e || e.length === 0 ? /* @__PURE__ */ R.jsx("div", { className: "text-center py-8", children: /* @__PURE__ */ R.jsx("p", { className: "text-gray-400", children: "No chains available" }) }) : S ? /* @__PURE__ */ R.jsxs(R.Fragment, { children: [
9874
9878
  D,
9875
9879
  /* @__PURE__ */ R.jsx(
9876
- Ao,
9880
+ Po,
9877
9881
  {
9878
9882
  currentActiveChain: S,
9879
9883
  chainList: e,
9880
9884
  onChainChange: b,
9881
9885
  curSelectToken: T,
9882
- onTokenChange: P,
9886
+ onTokenChange: A,
9883
9887
  walletType: "evm"
9884
9888
  }
9885
9889
  ),
@@ -10026,7 +10030,7 @@ const Nh = (e) => {
10026
10030
  export {
10027
10031
  _o as ChromeLoader,
10028
10032
  _h as ComponentProvider,
10029
- Pr as DEFAULT_LOCALE,
10033
+ Ar as DEFAULT_LOCALE,
10030
10034
  yh as Deposit,
10031
10035
  ph as DepositManager,
10032
10036
  Fh as LOCALE_NAMES,
@@ -10036,16 +10040,16 @@ export {
10036
10040
  Dh as Withdraw,
10037
10041
  Th as WithdrawManager,
10038
10042
  hh as closeDeposit,
10039
- Ch as closeWithdraw,
10043
+ Nh as closeWithdraw,
10040
10044
  kh as formatThousands,
10041
10045
  bh as isDepositLoading,
10042
10046
  $h as isWithdrawLoading,
10043
10047
  mh as openDeposit,
10044
- Nh as openWithdraw,
10048
+ Ch as openWithdraw,
10045
10049
  ro as setDepositLoading,
10046
10050
  oo as setWithdrawLoading,
10047
10051
  gh as updateDepositOptions,
10048
- Ah as updateWithdrawOptions,
10052
+ Ph as updateWithdrawOptions,
10049
10053
  Ua as useComponentConfig,
10050
10054
  Wh as useDeposit,
10051
10055
  Yh as useDepositManager,