@vezham/hooks 0.2.0-beta-v0xcli → 0.2.0-poc-env-1

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.
Files changed (3) hide show
  1. package/index.js +21 -19
  2. package/index.mjs +1622 -1460
  3. package/package.json +9 -9
package/index.mjs CHANGED
@@ -1,32 +1,268 @@
1
- import w, { forwardRef as cr, isValidElement as dt, useLayoutEffect as ur, useEffect as z, useState as B, useCallback as O, useRef as H, useMemo as dr } from "react";
2
- import fr from "react-dom";
3
- const hr = process.env.NODE_ENV !== "production";
4
- process.env.NODE_ENV;
5
- process.env.NODE_ENV;
6
- const Ce = "v0xapp", pr = () => (/* @__PURE__ */ new Date()).toISOString(), je = (e, t, n) => `[vezham] [${pr()}] [${e}] [${t}] ${n}`, ft = () => !hr, U = {
7
- log: (e = Ce, t, n) => {
1
+ import w, { forwardRef as yr, isValidElement as wt, useLayoutEffect as br, useEffect as H, useState as P, useCallback as R, useRef as z, useMemo as vr } from "react";
2
+ import Er from "react-dom";
3
+ var qe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4
+ function Sr(e) {
5
+ return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
6
+ }
7
+ function xr(e) {
8
+ if (e.__esModule) return e;
9
+ var t = e.default;
10
+ if (typeof t == "function") {
11
+ var n = function r() {
12
+ return this instanceof r ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
13
+ };
14
+ n.prototype = t.prototype;
15
+ } else n = {};
16
+ return Object.defineProperty(n, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
17
+ var o = Object.getOwnPropertyDescriptor(e, r);
18
+ Object.defineProperty(n, r, o.get ? o : {
19
+ enumerable: !0,
20
+ get: function() {
21
+ return e[r];
22
+ }
23
+ });
24
+ }), n;
25
+ }
26
+ var ue = { exports: {} };
27
+ const Tr = {}, _r = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28
+ __proto__: null,
29
+ default: Tr
30
+ }, Symbol.toStringTag, { value: "Module" })), rt = /* @__PURE__ */ xr(_r), Rr = "16.4.7", Or = {
31
+ version: Rr
32
+ }, Ot = rt, Bt = rt, Nr = rt, Ar = rt, Cr = Or, Ft = Cr.version, kr = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
33
+ function Lr(e) {
34
+ const t = {};
35
+ let n = e.toString();
36
+ n = n.replace(/\r\n?/mg, `
37
+ `);
38
+ let r;
39
+ for (; (r = kr.exec(n)) != null; ) {
40
+ const o = r[1];
41
+ let s = r[2] || "";
42
+ s = s.trim();
43
+ const a = s[0];
44
+ s = s.replace(/^(['"`])([\s\S]*)\1$/mg, "$2"), a === '"' && (s = s.replace(/\\n/g, `
45
+ `), s = s.replace(/\\r/g, "\r")), t[o] = s;
46
+ }
47
+ return t;
48
+ }
49
+ function Dr(e) {
50
+ const t = Nn(e), n = B.configDotenv({ path: t });
51
+ if (!n.parsed) {
52
+ const a = new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);
53
+ throw a.code = "MISSING_DATA", a;
54
+ }
55
+ const r = On(e).split(","), o = r.length;
56
+ let s;
57
+ for (let a = 0; a < o; a++)
58
+ try {
59
+ const i = r[a].trim(), u = Pr(n, i);
60
+ s = B.decrypt(u.ciphertext, u.key);
61
+ break;
62
+ } catch (i) {
63
+ if (a + 1 >= o)
64
+ throw i;
65
+ }
66
+ return B.parse(s);
67
+ }
68
+ function Mr(e) {
69
+ console.log(`[dotenv@${Ft}][INFO] ${e}`);
70
+ }
71
+ function Ir(e) {
72
+ console.log(`[dotenv@${Ft}][WARN] ${e}`);
73
+ }
74
+ function Ze(e) {
75
+ console.log(`[dotenv@${Ft}][DEBUG] ${e}`);
76
+ }
77
+ function On(e) {
78
+ return e && e.DOTENV_KEY && e.DOTENV_KEY.length > 0 ? e.DOTENV_KEY : process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0 ? process.env.DOTENV_KEY : "";
79
+ }
80
+ function Pr(e, t) {
81
+ let n;
82
+ try {
83
+ n = new URL(t);
84
+ } catch (i) {
85
+ if (i.code === "ERR_INVALID_URL") {
86
+ const u = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
87
+ throw u.code = "INVALID_DOTENV_KEY", u;
88
+ }
89
+ throw i;
90
+ }
91
+ const r = n.password;
92
+ if (!r) {
93
+ const i = new Error("INVALID_DOTENV_KEY: Missing key part");
94
+ throw i.code = "INVALID_DOTENV_KEY", i;
95
+ }
96
+ const o = n.searchParams.get("environment");
97
+ if (!o) {
98
+ const i = new Error("INVALID_DOTENV_KEY: Missing environment part");
99
+ throw i.code = "INVALID_DOTENV_KEY", i;
100
+ }
101
+ const s = `DOTENV_VAULT_${o.toUpperCase()}`, a = e.parsed[s];
102
+ if (!a) {
103
+ const i = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);
104
+ throw i.code = "NOT_FOUND_DOTENV_ENVIRONMENT", i;
105
+ }
106
+ return { ciphertext: a, key: r };
107
+ }
108
+ function Nn(e) {
109
+ let t = null;
110
+ if (e && e.path && e.path.length > 0)
111
+ if (Array.isArray(e.path))
112
+ for (const n of e.path)
113
+ Ot.existsSync(n) && (t = n.endsWith(".vault") ? n : `${n}.vault`);
114
+ else
115
+ t = e.path.endsWith(".vault") ? e.path : `${e.path}.vault`;
116
+ else
117
+ t = Bt.resolve(process.cwd(), ".env.vault");
118
+ return Ot.existsSync(t) ? t : null;
119
+ }
120
+ function Xt(e) {
121
+ return e[0] === "~" ? Bt.join(Nr.homedir(), e.slice(1)) : e;
122
+ }
123
+ function Br(e) {
124
+ Mr("Loading env from encrypted .env.vault");
125
+ const t = B._parseVault(e);
126
+ let n = process.env;
127
+ return e && e.processEnv != null && (n = e.processEnv), B.populate(n, t, e), { parsed: t };
128
+ }
129
+ function Fr(e) {
130
+ const t = Bt.resolve(process.cwd(), ".env");
131
+ let n = "utf8";
132
+ const r = !!(e && e.debug);
133
+ e && e.encoding ? n = e.encoding : r && Ze("No encoding is specified. UTF-8 is used by default");
134
+ let o = [t];
135
+ if (e && e.path)
136
+ if (!Array.isArray(e.path))
137
+ o = [Xt(e.path)];
138
+ else {
139
+ o = [];
140
+ for (const u of e.path)
141
+ o.push(Xt(u));
142
+ }
143
+ let s;
144
+ const a = {};
145
+ for (const u of o)
146
+ try {
147
+ const c = B.parse(Ot.readFileSync(u, { encoding: n }));
148
+ B.populate(a, c, e);
149
+ } catch (c) {
150
+ r && Ze(`Failed to load ${u} ${c.message}`), s = c;
151
+ }
152
+ let i = process.env;
153
+ return e && e.processEnv != null && (i = e.processEnv), B.populate(i, a, e), s ? { parsed: a, error: s } : { parsed: a };
154
+ }
155
+ function Ur(e) {
156
+ if (On(e).length === 0)
157
+ return B.configDotenv(e);
158
+ const t = Nn(e);
159
+ return t ? B._configVault(e) : (Ir(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`), B.configDotenv(e));
160
+ }
161
+ function jr(e, t) {
162
+ const n = Buffer.from(t.slice(-64), "hex");
163
+ let r = Buffer.from(e, "base64");
164
+ const o = r.subarray(0, 12), s = r.subarray(-16);
165
+ r = r.subarray(12, -16);
166
+ try {
167
+ const a = Ar.createDecipheriv("aes-256-gcm", n, o);
168
+ return a.setAuthTag(s), `${a.update(r)}${a.final()}`;
169
+ } catch (a) {
170
+ const i = a instanceof RangeError, u = a.message === "Invalid key length", c = a.message === "Unsupported state or unable to authenticate data";
171
+ if (i || u) {
172
+ const d = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
173
+ throw d.code = "INVALID_DOTENV_KEY", d;
174
+ } else if (c) {
175
+ const d = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
176
+ throw d.code = "DECRYPTION_FAILED", d;
177
+ } else
178
+ throw a;
179
+ }
180
+ }
181
+ function $r(e, t, n = {}) {
182
+ const r = !!(n && n.debug), o = !!(n && n.override);
183
+ if (typeof t != "object") {
184
+ const s = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
185
+ throw s.code = "OBJECT_REQUIRED", s;
186
+ }
187
+ for (const s of Object.keys(t))
188
+ Object.prototype.hasOwnProperty.call(e, s) ? (o === !0 && (e[s] = t[s]), r && Ze(o === !0 ? `"${s}" is already defined and WAS overwritten` : `"${s}" is already defined and was NOT overwritten`)) : e[s] = t[s];
189
+ }
190
+ const B = {
191
+ configDotenv: Fr,
192
+ _configVault: Br,
193
+ _parseVault: Dr,
194
+ config: Ur,
195
+ decrypt: jr,
196
+ parse: Lr,
197
+ populate: $r
198
+ };
199
+ ue.exports.configDotenv = B.configDotenv;
200
+ ue.exports._configVault = B._configVault;
201
+ ue.exports._parseVault = B._parseVault;
202
+ ue.exports.config = B.config;
203
+ ue.exports.decrypt = B.decrypt;
204
+ ue.exports.parse = B.parse;
205
+ ue.exports.populate = B.populate;
206
+ ue.exports = B;
207
+ var Hr = ue.exports;
208
+ const Re = {};
209
+ process.env.DOTENV_CONFIG_ENCODING != null && (Re.encoding = process.env.DOTENV_CONFIG_ENCODING);
210
+ process.env.DOTENV_CONFIG_PATH != null && (Re.path = process.env.DOTENV_CONFIG_PATH);
211
+ process.env.DOTENV_CONFIG_DEBUG != null && (Re.debug = process.env.DOTENV_CONFIG_DEBUG);
212
+ process.env.DOTENV_CONFIG_OVERRIDE != null && (Re.override = process.env.DOTENV_CONFIG_OVERRIDE);
213
+ process.env.DOTENV_CONFIG_DOTENV_KEY != null && (Re.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY);
214
+ var zr = Re;
215
+ const Vr = /^dotenv_config_(encoding|path|debug|override|DOTENV_KEY)=(.+)$/;
216
+ var qr = function(t) {
217
+ return t.reduce(function(n, r) {
218
+ const o = r.match(Vr);
219
+ return o && (n[o[1]] = o[2]), n;
220
+ }, {});
221
+ };
222
+ (function() {
223
+ Hr.config(
224
+ Object.assign(
225
+ {},
226
+ zr,
227
+ qr(process.argv)
228
+ )
229
+ );
230
+ })();
231
+ const Wr = { BASE_URL: "/", DEV: !1, MODE: "production", PROD: !0, SSR: !1 };
232
+ console.log("import");
233
+ console.table({ ...Wr });
234
+ console.log("process");
235
+ console.table({ ...process.env });
236
+ const ie = { ...process.env };
237
+ console.table(ie);
238
+ const Kr = ie.NODE_ENV !== "production", Yr = ie.V_IS_DEBUG === "true", Le = ie.V_APP_NAME || "v0xapp", Qt = ie.V_BASE_API_URL || "api", Jr = () => Qt === "local" ? ie.V_MOCK_LOCAL_API_URL : Qt === "mock" ? ie.V_MOCK_API_URL : config.domain_type === IAM.DomainType.SANDBOX ? ie.V_APP_SANDBOX_API_URL : config.domain_type === IAM.DomainType.DC ? ie.V_APP_DC_API_URL : ie.V_APP_API_URL, Gr = () => (/* @__PURE__ */ new Date()).toISOString(), De = (e, t, n) => `[vezham] [${Gr()}] [${e}] [${t}] ${n}`, yt = () => !Kr, j = {
239
+ log: (e = Le, t, n) => {
8
240
  console.log(
9
- je("LOG", e, t),
241
+ De("LOG", e, t),
10
242
  n || ""
11
243
  );
12
244
  },
13
- debug: (e = Ce, t, n) => {
245
+ debug: (e = Le, t, n) => {
246
+ Yr && console.info(
247
+ De("DEBUG", e, t),
248
+ n || ""
249
+ );
14
250
  },
15
- info: (e = Ce, t, n) => {
16
- ft() || console.info(
17
- je("INFO", e, t),
251
+ info: (e = Le, t, n) => {
252
+ yt() || console.info(
253
+ De("INFO", e, t),
18
254
  n || ""
19
255
  );
20
256
  },
21
- warn: (e = Ce, t, n) => {
22
- ft() || console.warn(
23
- je("WARN", e, t),
257
+ warn: (e = Le, t, n) => {
258
+ yt() || console.warn(
259
+ De("WARN", e, t),
24
260
  n || ""
25
261
  );
26
262
  },
27
- error: (e = Ce, t, n) => {
28
- ft() || console.error(
29
- je("ERROR", e, t),
263
+ error: (e = Le, t, n) => {
264
+ yt() || console.error(
265
+ De("ERROR", e, t),
30
266
  n || ""
31
267
  );
32
268
  }
@@ -37,20 +273,20 @@ const Ce = "v0xapp", pr = () => (/* @__PURE__ */ new Date()).toISOString(), je =
37
273
  // else console.trace(log_msg, object)
38
274
  // }
39
275
  };
40
- var mr = (e) => {
276
+ var Xr = (e) => {
41
277
  switch (e) {
42
278
  case "success":
43
- return yr;
279
+ return eo;
44
280
  case "info":
45
- return vr;
281
+ return no;
46
282
  case "warning":
47
- return br;
283
+ return to;
48
284
  case "error":
49
- return Sr;
285
+ return ro;
50
286
  default:
51
287
  return null;
52
288
  }
53
- }, gr = Array(12).fill(0), wr = ({ visible: e, className: t }) => w.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, w.createElement("div", { className: "sonner-spinner" }, gr.map((n, r) => w.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), yr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), br = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), vr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), Sr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), xr = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, w.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), w.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), Er = () => {
289
+ }, Qr = Array(12).fill(0), Zr = ({ visible: e, className: t }) => w.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, w.createElement("div", { className: "sonner-spinner" }, Qr.map((n, r) => w.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), eo = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), to = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), no = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), ro = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, w.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), oo = w.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, w.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), w.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), so = () => {
54
290
  let [e, t] = w.useState(document.hidden);
55
291
  return w.useEffect(() => {
56
292
  let n = () => {
@@ -58,7 +294,7 @@ var mr = (e) => {
58
294
  };
59
295
  return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
60
296
  }, []), e;
61
- }, St = 1, Rr = class {
297
+ }, Nt = 1, ao = class {
62
298
  constructor() {
63
299
  this.subscribe = (e) => (this.subscribers.push(e), () => {
64
300
  let t = this.subscribers.indexOf(e);
@@ -69,233 +305,233 @@ var mr = (e) => {
69
305
  this.publish(e), this.toasts = [...this.toasts, e];
70
306
  }, this.create = (e) => {
71
307
  var t;
72
- let { message: n, ...r } = e, o = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : St++, a = this.toasts.find((i) => i.id === o), s = e.dismissible === void 0 ? !0 : e.dismissible;
73
- return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), a ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish({ ...i, ...e, id: o, title: n }), { ...i, ...e, id: o, dismissible: s, title: n }) : i) : this.addToast({ title: n, ...r, dismissible: s, id: o }), o;
308
+ let { message: n, ...r } = e, o = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Nt++, s = this.toasts.find((i) => i.id === o), a = e.dismissible === void 0 ? !0 : e.dismissible;
309
+ return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), s ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish({ ...i, ...e, id: o, title: n }), { ...i, ...e, id: o, dismissible: a, title: n }) : i) : this.addToast({ title: n, ...r, dismissible: a, id: o }), o;
74
310
  }, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
75
311
  this.subscribers.forEach((n) => n({ id: t.id, dismiss: !0 }));
76
312
  }), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
77
313
  if (!t) return;
78
314
  let n;
79
315
  t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
80
- let r = e instanceof Promise ? e : e(), o = n !== void 0, a, s = r.then(async (u) => {
81
- if (a = ["resolve", u], w.isValidElement(u)) o = !1, this.create({ id: n, type: "default", message: u });
82
- else if (Or(u) && !u.ok) {
316
+ let r = e instanceof Promise ? e : e(), o = n !== void 0, s, a = r.then(async (u) => {
317
+ if (s = ["resolve", u], w.isValidElement(u)) o = !1, this.create({ id: n, type: "default", message: u });
318
+ else if (lo(u) && !u.ok) {
83
319
  o = !1;
84
- let c = typeof t.error == "function" ? await t.error(`HTTP error! status: ${u.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${u.status}`) : t.description;
85
- this.create({ id: n, type: "error", message: c, description: f });
320
+ let c = typeof t.error == "function" ? await t.error(`HTTP error! status: ${u.status}`) : t.error, d = typeof t.description == "function" ? await t.description(`HTTP error! status: ${u.status}`) : t.description;
321
+ this.create({ id: n, type: "error", message: c, description: d });
86
322
  } else if (t.success !== void 0) {
87
323
  o = !1;
88
- let c = typeof t.success == "function" ? await t.success(u) : t.success, f = typeof t.description == "function" ? await t.description(u) : t.description;
89
- this.create({ id: n, type: "success", message: c, description: f });
324
+ let c = typeof t.success == "function" ? await t.success(u) : t.success, d = typeof t.description == "function" ? await t.description(u) : t.description;
325
+ this.create({ id: n, type: "success", message: c, description: d });
90
326
  }
91
327
  }).catch(async (u) => {
92
- if (a = ["reject", u], t.error !== void 0) {
328
+ if (s = ["reject", u], t.error !== void 0) {
93
329
  o = !1;
94
- let c = typeof t.error == "function" ? await t.error(u) : t.error, f = typeof t.description == "function" ? await t.description(u) : t.description;
95
- this.create({ id: n, type: "error", message: c, description: f });
330
+ let c = typeof t.error == "function" ? await t.error(u) : t.error, d = typeof t.description == "function" ? await t.description(u) : t.description;
331
+ this.create({ id: n, type: "error", message: c, description: d });
96
332
  }
97
333
  }).finally(() => {
98
334
  var u;
99
335
  o && (this.dismiss(n), n = void 0), (u = t.finally) == null || u.call(t);
100
- }), i = () => new Promise((u, c) => s.then(() => a[0] === "reject" ? c(a[1]) : u(a[1])).catch(c));
336
+ }), i = () => new Promise((u, c) => a.then(() => s[0] === "reject" ? c(s[1]) : u(s[1])).catch(c));
101
337
  return typeof n != "string" && typeof n != "number" ? { unwrap: i } : Object.assign(n, { unwrap: i });
102
338
  }, this.custom = (e, t) => {
103
- let n = (t == null ? void 0 : t.id) || St++;
339
+ let n = (t == null ? void 0 : t.id) || Nt++;
104
340
  return this.create({ jsx: e(n), id: n, ...t }), n;
105
341
  }, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
106
342
  }
107
- }, W = new Rr(), Tr = (e, t) => {
108
- let n = (t == null ? void 0 : t.id) || St++;
343
+ }, W = new ao(), io = (e, t) => {
344
+ let n = (t == null ? void 0 : t.id) || Nt++;
109
345
  return W.addToast({ title: e, ...t, id: n }), n;
110
- }, Or = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", kr = Tr, Cr = () => W.toasts, Ar = () => W.getActiveToasts(), Nr = Object.assign(kr, { success: W.success, info: W.info, warning: W.warning, error: W.error, custom: W.custom, message: W.message, promise: W.promise, dismiss: W.dismiss, loading: W.loading }, { getHistory: Cr, getToasts: Ar });
111
- function Lr(e, { insertAt: t } = {}) {
346
+ }, lo = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", co = io, uo = () => W.toasts, fo = () => W.getActiveToasts(), po = Object.assign(co, { success: W.success, info: W.info, warning: W.warning, error: W.error, custom: W.custom, message: W.message, promise: W.promise, dismiss: W.dismiss, loading: W.loading }, { getHistory: uo, getToasts: fo });
347
+ function ho(e, { insertAt: t } = {}) {
112
348
  if (typeof document > "u") return;
113
349
  let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
114
350
  r.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(r, n.firstChild) : n.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
115
351
  }
116
- Lr(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
352
+ ho(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
117
353
  `);
118
- function ze(e) {
354
+ function We(e) {
119
355
  return e.label !== void 0;
120
356
  }
121
- var _r = 3, Mr = "32px", Pr = "16px", qt = 4e3, Ir = 356, Br = 14, Dr = 20, Fr = 200;
122
- function te(...e) {
357
+ var mo = 3, go = "32px", wo = "16px", Zt = 4e3, yo = 356, bo = 14, vo = 20, Eo = 200;
358
+ function ne(...e) {
123
359
  return e.filter(Boolean).join(" ");
124
360
  }
125
- function Ur(e) {
361
+ function So(e) {
126
362
  let [t, n] = e.split("-"), r = [];
127
363
  return t && r.push(t), n && r.push(n), r;
128
364
  }
129
- var jr = (e) => {
130
- var t, n, r, o, a, s, i, u, c, f, p;
131
- let { invert: h, toast: l, unstyled: g, interacting: m, setHeights: y, visibleToasts: R, heights: x, index: T, toasts: F, expanded: L, removeToast: S, defaultRichColors: P, closeButton: q, style: oe, cancelButtonStyle: ot, actionButtonStyle: Pe, className: ae = "", descriptionClassName: Ie = "", duration: we, position: Be, gap: de, loadingIcon: ie, expandByDefault: De, classNames: E, icons: V, closeButtonAriaLabel: st = "Close toast", pauseWhenPageIsHidden: A } = e, [N, M] = w.useState(null), [$, ye] = w.useState(null), [I, at] = w.useState(!1), [Te, Fe] = w.useState(!1), [Oe, it] = w.useState(!1), [It, Xn] = w.useState(!1), [Gn, Bt] = w.useState(!1), [Qn, lt] = w.useState(0), [Zn, Dt] = w.useState(0), ke = w.useRef(l.duration || we || qt), Ft = w.useRef(null), fe = w.useRef(null), er = T === 0, tr = T + 1 <= R, X = l.type, be = l.dismissible !== !1, nr = l.className || "", rr = l.descriptionClassName || "", Ue = w.useMemo(() => x.findIndex((b) => b.toastId === l.id) || 0, [x, l.id]), or = w.useMemo(() => {
365
+ var xo = (e) => {
366
+ var t, n, r, o, s, a, i, u, c, d, h;
367
+ let { invert: p, toast: l, unstyled: g, interacting: m, setHeights: y, visibleToasts: T, heights: S, index: _, toasts: U, expanded: k, removeToast: E, defaultRichColors: M, closeButton: V, style: se, cancelButtonStyle: ut, actionButtonStyle: Ue, className: le = "", descriptionClassName: je = "", duration: ve, position: $e, gap: he, loadingIcon: ce, expandByDefault: He, classNames: x, icons: Y, closeButtonAriaLabel: dt = "Close toast", pauseWhenPageIsHidden: A } = e, [C, D] = w.useState(null), [q, Ee] = w.useState(null), [I, ft] = w.useState(!1), [Ae, ze] = w.useState(!1), [Ce, pt] = w.useState(!1), [zt, sr] = w.useState(!1), [ar, Vt] = w.useState(!1), [ir, ht] = w.useState(0), [lr, qt] = w.useState(0), ke = w.useRef(l.duration || ve || Zt), Wt = w.useRef(null), me = w.useRef(null), cr = _ === 0, ur = _ + 1 <= T, X = l.type, Se = l.dismissible !== !1, dr = l.className || "", fr = l.descriptionClassName || "", Ve = w.useMemo(() => S.findIndex((b) => b.toastId === l.id) || 0, [S, l.id]), pr = w.useMemo(() => {
132
368
  var b;
133
- return (b = l.closeButton) != null ? b : q;
134
- }, [l.closeButton, q]), Ut = w.useMemo(() => l.duration || we || qt, [l.duration, we]), ct = w.useRef(0), ve = w.useRef(0), jt = w.useRef(0), Se = w.useRef(null), [sr, ar] = Be.split("-"), zt = w.useMemo(() => x.reduce((b, k, _) => _ >= Ue ? b : b + k.height, 0), [x, Ue]), Ht = Er(), ir = l.invert || h, ut = X === "loading";
135
- ve.current = w.useMemo(() => Ue * de + zt, [Ue, zt]), w.useEffect(() => {
136
- ke.current = Ut;
137
- }, [Ut]), w.useEffect(() => {
138
- at(!0);
369
+ return (b = l.closeButton) != null ? b : V;
370
+ }, [l.closeButton, V]), Kt = w.useMemo(() => l.duration || ve || Zt, [l.duration, ve]), mt = w.useRef(0), xe = w.useRef(0), Yt = w.useRef(0), Te = w.useRef(null), [hr, mr] = $e.split("-"), Jt = w.useMemo(() => S.reduce((b, O, L) => L >= Ve ? b : b + O.height, 0), [S, Ve]), Gt = so(), gr = l.invert || p, gt = X === "loading";
371
+ xe.current = w.useMemo(() => Ve * he + Jt, [Ve, Jt]), w.useEffect(() => {
372
+ ke.current = Kt;
373
+ }, [Kt]), w.useEffect(() => {
374
+ ft(!0);
139
375
  }, []), w.useEffect(() => {
140
- let b = fe.current;
376
+ let b = me.current;
141
377
  if (b) {
142
- let k = b.getBoundingClientRect().height;
143
- return Dt(k), y((_) => [{ toastId: l.id, height: k, position: l.position }, ..._]), () => y((_) => _.filter((Q) => Q.toastId !== l.id));
378
+ let O = b.getBoundingClientRect().height;
379
+ return qt(O), y((L) => [{ toastId: l.id, height: O, position: l.position }, ...L]), () => y((L) => L.filter((Z) => Z.toastId !== l.id));
144
380
  }
145
381
  }, [y, l.id]), w.useLayoutEffect(() => {
146
382
  if (!I) return;
147
- let b = fe.current, k = b.style.height;
383
+ let b = me.current, O = b.style.height;
148
384
  b.style.height = "auto";
149
- let _ = b.getBoundingClientRect().height;
150
- b.style.height = k, Dt(_), y((Q) => Q.find((Z) => Z.toastId === l.id) ? Q.map((Z) => Z.toastId === l.id ? { ...Z, height: _ } : Z) : [{ toastId: l.id, height: _, position: l.position }, ...Q]);
385
+ let L = b.getBoundingClientRect().height;
386
+ b.style.height = O, qt(L), y((Z) => Z.find((ee) => ee.toastId === l.id) ? Z.map((ee) => ee.toastId === l.id ? { ...ee, height: L } : ee) : [{ toastId: l.id, height: L, position: l.position }, ...Z]);
151
387
  }, [I, l.title, l.description, y, l.id]);
152
- let le = w.useCallback(() => {
153
- Fe(!0), lt(ve.current), y((b) => b.filter((k) => k.toastId !== l.id)), setTimeout(() => {
154
- S(l);
155
- }, Fr);
156
- }, [l, S, y, ve]);
388
+ let de = w.useCallback(() => {
389
+ ze(!0), ht(xe.current), y((b) => b.filter((O) => O.toastId !== l.id)), setTimeout(() => {
390
+ E(l);
391
+ }, Eo);
392
+ }, [l, E, y, xe]);
157
393
  w.useEffect(() => {
158
394
  if (l.promise && X === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
159
395
  let b;
160
- return L || m || A && Ht ? (() => {
161
- if (jt.current < ct.current) {
162
- let k = (/* @__PURE__ */ new Date()).getTime() - ct.current;
163
- ke.current = ke.current - k;
396
+ return k || m || A && Gt ? (() => {
397
+ if (Yt.current < mt.current) {
398
+ let O = (/* @__PURE__ */ new Date()).getTime() - mt.current;
399
+ ke.current = ke.current - O;
164
400
  }
165
- jt.current = (/* @__PURE__ */ new Date()).getTime();
166
- })() : ke.current !== 1 / 0 && (ct.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
167
- var k;
168
- (k = l.onAutoClose) == null || k.call(l, l), le();
401
+ Yt.current = (/* @__PURE__ */ new Date()).getTime();
402
+ })() : ke.current !== 1 / 0 && (mt.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
403
+ var O;
404
+ (O = l.onAutoClose) == null || O.call(l, l), de();
169
405
  }, ke.current)), () => clearTimeout(b);
170
- }, [L, m, l, X, A, Ht, le]), w.useEffect(() => {
171
- l.delete && le();
172
- }, [le, l.delete]);
173
- function lr() {
174
- var b, k, _;
175
- return V != null && V.loading ? w.createElement("div", { className: te(E == null ? void 0 : E.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": X === "loading" }, V.loading) : ie ? w.createElement("div", { className: te(E == null ? void 0 : E.loader, (k = l == null ? void 0 : l.classNames) == null ? void 0 : k.loader, "sonner-loader"), "data-visible": X === "loading" }, ie) : w.createElement(wr, { className: te(E == null ? void 0 : E.loader, (_ = l == null ? void 0 : l.classNames) == null ? void 0 : _.loader), visible: X === "loading" });
176
- }
177
- return w.createElement("li", { tabIndex: 0, ref: fe, className: te(ae, nr, E == null ? void 0 : E.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, E == null ? void 0 : E.default, E == null ? void 0 : E[X], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[X]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : P, "data-styled": !(l.jsx || l.unstyled || g), "data-mounted": I, "data-promise": !!l.promise, "data-swiped": Gn, "data-removed": Te, "data-visible": tr, "data-y-position": sr, "data-x-position": ar, "data-index": T, "data-front": er, "data-swiping": Oe, "data-dismissible": be, "data-type": X, "data-invert": ir, "data-swipe-out": It, "data-swipe-direction": $, "data-expanded": !!(L || De && I), style: { "--index": T, "--toasts-before": T, "--z-index": F.length - T, "--offset": `${Te ? Qn : ve.current}px`, "--initial-height": De ? "auto" : `${Zn}px`, ...oe, ...l.style }, onDragEnd: () => {
178
- it(!1), M(null), Se.current = null;
406
+ }, [k, m, l, X, A, Gt, de]), w.useEffect(() => {
407
+ l.delete && de();
408
+ }, [de, l.delete]);
409
+ function wr() {
410
+ var b, O, L;
411
+ return Y != null && Y.loading ? w.createElement("div", { className: ne(x == null ? void 0 : x.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": X === "loading" }, Y.loading) : ce ? w.createElement("div", { className: ne(x == null ? void 0 : x.loader, (O = l == null ? void 0 : l.classNames) == null ? void 0 : O.loader, "sonner-loader"), "data-visible": X === "loading" }, ce) : w.createElement(Zr, { className: ne(x == null ? void 0 : x.loader, (L = l == null ? void 0 : l.classNames) == null ? void 0 : L.loader), visible: X === "loading" });
412
+ }
413
+ return w.createElement("li", { tabIndex: 0, ref: me, className: ne(le, dr, x == null ? void 0 : x.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, x == null ? void 0 : x.default, x == null ? void 0 : x[X], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[X]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : M, "data-styled": !(l.jsx || l.unstyled || g), "data-mounted": I, "data-promise": !!l.promise, "data-swiped": ar, "data-removed": Ae, "data-visible": ur, "data-y-position": hr, "data-x-position": mr, "data-index": _, "data-front": cr, "data-swiping": Ce, "data-dismissible": Se, "data-type": X, "data-invert": gr, "data-swipe-out": zt, "data-swipe-direction": q, "data-expanded": !!(k || He && I), style: { "--index": _, "--toasts-before": _, "--z-index": U.length - _, "--offset": `${Ae ? ir : xe.current}px`, "--initial-height": He ? "auto" : `${lr}px`, ...se, ...l.style }, onDragEnd: () => {
414
+ pt(!1), D(null), Te.current = null;
179
415
  }, onPointerDown: (b) => {
180
- ut || !be || (Ft.current = /* @__PURE__ */ new Date(), lt(ve.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (it(!0), Se.current = { x: b.clientX, y: b.clientY }));
416
+ gt || !Se || (Wt.current = /* @__PURE__ */ new Date(), ht(xe.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (pt(!0), Te.current = { x: b.clientX, y: b.clientY }));
181
417
  }, onPointerUp: () => {
182
- var b, k, _, Q;
183
- if (It || !be) return;
184
- Se.current = null;
185
- let Z = Number(((b = fe.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ce = Number(((k = fe.current) == null ? void 0 : k.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), he = (/* @__PURE__ */ new Date()).getTime() - ((_ = Ft.current) == null ? void 0 : _.getTime()), ee = N === "x" ? Z : ce, ue = Math.abs(ee) / he;
186
- if (Math.abs(ee) >= Dr || ue > 0.11) {
187
- lt(ve.current), (Q = l.onDismiss) == null || Q.call(l, l), ye(N === "x" ? Z > 0 ? "right" : "left" : ce > 0 ? "down" : "up"), le(), Xn(!0), Bt(!1);
418
+ var b, O, L, Z;
419
+ if (zt || !Se) return;
420
+ Te.current = null;
421
+ let ee = Number(((b = me.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), fe = Number(((O = me.current) == null ? void 0 : O.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), ge = (/* @__PURE__ */ new Date()).getTime() - ((L = Wt.current) == null ? void 0 : L.getTime()), te = C === "x" ? ee : fe, pe = Math.abs(te) / ge;
422
+ if (Math.abs(te) >= vo || pe > 0.11) {
423
+ ht(xe.current), (Z = l.onDismiss) == null || Z.call(l, l), Ee(C === "x" ? ee > 0 ? "right" : "left" : fe > 0 ? "down" : "up"), de(), sr(!0), Vt(!1);
188
424
  return;
189
425
  }
190
- it(!1), M(null);
426
+ pt(!1), D(null);
191
427
  }, onPointerMove: (b) => {
192
- var k, _, Q, Z;
193
- if (!Se.current || !be || ((k = window.getSelection()) == null ? void 0 : k.toString().length) > 0) return;
194
- let ce = b.clientY - Se.current.y, he = b.clientX - Se.current.x, ee = (_ = e.swipeDirections) != null ? _ : Ur(Be);
195
- !N && (Math.abs(he) > 1 || Math.abs(ce) > 1) && M(Math.abs(he) > Math.abs(ce) ? "x" : "y");
196
- let ue = { x: 0, y: 0 };
197
- N === "y" ? (ee.includes("top") || ee.includes("bottom")) && (ee.includes("top") && ce < 0 || ee.includes("bottom") && ce > 0) && (ue.y = ce) : N === "x" && (ee.includes("left") || ee.includes("right")) && (ee.includes("left") && he < 0 || ee.includes("right") && he > 0) && (ue.x = he), (Math.abs(ue.x) > 0 || Math.abs(ue.y) > 0) && Bt(!0), (Q = fe.current) == null || Q.style.setProperty("--swipe-amount-x", `${ue.x}px`), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-y", `${ue.y}px`);
198
- } }, or && !l.jsx ? w.createElement("button", { "aria-label": st, "data-disabled": ut, "data-close-button": !0, onClick: ut || !be ? () => {
428
+ var O, L, Z, ee;
429
+ if (!Te.current || !Se || ((O = window.getSelection()) == null ? void 0 : O.toString().length) > 0) return;
430
+ let fe = b.clientY - Te.current.y, ge = b.clientX - Te.current.x, te = (L = e.swipeDirections) != null ? L : So($e);
431
+ !C && (Math.abs(ge) > 1 || Math.abs(fe) > 1) && D(Math.abs(ge) > Math.abs(fe) ? "x" : "y");
432
+ let pe = { x: 0, y: 0 };
433
+ C === "y" ? (te.includes("top") || te.includes("bottom")) && (te.includes("top") && fe < 0 || te.includes("bottom") && fe > 0) && (pe.y = fe) : C === "x" && (te.includes("left") || te.includes("right")) && (te.includes("left") && ge < 0 || te.includes("right") && ge > 0) && (pe.x = ge), (Math.abs(pe.x) > 0 || Math.abs(pe.y) > 0) && Vt(!0), (Z = me.current) == null || Z.style.setProperty("--swipe-amount-x", `${pe.x}px`), (ee = me.current) == null || ee.style.setProperty("--swipe-amount-y", `${pe.y}px`);
434
+ } }, pr && !l.jsx ? w.createElement("button", { "aria-label": dt, "data-disabled": gt, "data-close-button": !0, onClick: gt || !Se ? () => {
199
435
  } : () => {
200
436
  var b;
201
- le(), (b = l.onDismiss) == null || b.call(l, l);
202
- }, className: te(E == null ? void 0 : E.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (a = V == null ? void 0 : V.close) != null ? a : xr) : null, l.jsx || dt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : w.createElement(w.Fragment, null, X || l.icon || l.promise ? w.createElement("div", { "data-icon": "", className: te(E == null ? void 0 : E.icon, (s = l == null ? void 0 : l.classNames) == null ? void 0 : s.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || lr() : null, l.type !== "loading" ? l.icon || (V == null ? void 0 : V[X]) || mr(X) : null) : null, w.createElement("div", { "data-content": "", className: te(E == null ? void 0 : E.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, w.createElement("div", { "data-title": "", className: te(E == null ? void 0 : E.title, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? w.createElement("div", { "data-description": "", className: te(Ie, rr, E == null ? void 0 : E.description, (c = l == null ? void 0 : l.classNames) == null ? void 0 : c.description) }, typeof l.description == "function" ? l.description() : l.description) : null), dt(l.cancel) ? l.cancel : l.cancel && ze(l.cancel) ? w.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || ot, onClick: (b) => {
203
- var k, _;
204
- ze(l.cancel) && be && ((_ = (k = l.cancel).onClick) == null || _.call(k, b), le());
205
- }, className: te(E == null ? void 0 : E.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, dt(l.action) ? l.action : l.action && ze(l.action) ? w.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Pe, onClick: (b) => {
206
- var k, _;
207
- ze(l.action) && ((_ = (k = l.action).onClick) == null || _.call(k, b), !b.defaultPrevented && le());
208
- }, className: te(E == null ? void 0 : E.actionButton, (p = l == null ? void 0 : l.classNames) == null ? void 0 : p.actionButton) }, l.action.label) : null));
437
+ de(), (b = l.onDismiss) == null || b.call(l, l);
438
+ }, className: ne(x == null ? void 0 : x.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (s = Y == null ? void 0 : Y.close) != null ? s : oo) : null, l.jsx || wt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : w.createElement(w.Fragment, null, X || l.icon || l.promise ? w.createElement("div", { "data-icon": "", className: ne(x == null ? void 0 : x.icon, (a = l == null ? void 0 : l.classNames) == null ? void 0 : a.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || wr() : null, l.type !== "loading" ? l.icon || (Y == null ? void 0 : Y[X]) || Xr(X) : null) : null, w.createElement("div", { "data-content": "", className: ne(x == null ? void 0 : x.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, w.createElement("div", { "data-title": "", className: ne(x == null ? void 0 : x.title, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? w.createElement("div", { "data-description": "", className: ne(je, fr, x == null ? void 0 : x.description, (c = l == null ? void 0 : l.classNames) == null ? void 0 : c.description) }, typeof l.description == "function" ? l.description() : l.description) : null), wt(l.cancel) ? l.cancel : l.cancel && We(l.cancel) ? w.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || ut, onClick: (b) => {
439
+ var O, L;
440
+ We(l.cancel) && Se && ((L = (O = l.cancel).onClick) == null || L.call(O, b), de());
441
+ }, className: ne(x == null ? void 0 : x.cancelButton, (d = l == null ? void 0 : l.classNames) == null ? void 0 : d.cancelButton) }, l.cancel.label) : null, wt(l.action) ? l.action : l.action && We(l.action) ? w.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Ue, onClick: (b) => {
442
+ var O, L;
443
+ We(l.action) && ((L = (O = l.action).onClick) == null || L.call(O, b), !b.defaultPrevented && de());
444
+ }, className: ne(x == null ? void 0 : x.actionButton, (h = l == null ? void 0 : l.classNames) == null ? void 0 : h.actionButton) }, l.action.label) : null));
209
445
  };
210
- function $t() {
446
+ function en() {
211
447
  if (typeof window > "u" || typeof document > "u") return "ltr";
212
448
  let e = document.documentElement.getAttribute("dir");
213
449
  return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
214
450
  }
215
- function zr(e, t) {
451
+ function To(e, t) {
216
452
  let n = {};
217
453
  return [e, t].forEach((r, o) => {
218
- let a = o === 1, s = a ? "--mobile-offset" : "--offset", i = a ? Pr : Mr;
454
+ let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? wo : go;
219
455
  function u(c) {
220
- ["top", "right", "bottom", "left"].forEach((f) => {
221
- n[`${s}-${f}`] = typeof c == "number" ? `${c}px` : c;
456
+ ["top", "right", "bottom", "left"].forEach((d) => {
457
+ n[`${a}-${d}`] = typeof c == "number" ? `${c}px` : c;
222
458
  });
223
459
  }
224
460
  typeof r == "number" || typeof r == "string" ? u(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((c) => {
225
- r[c] === void 0 ? n[`${s}-${c}`] = i : n[`${s}-${c}`] = typeof r[c] == "number" ? `${r[c]}px` : r[c];
461
+ r[c] === void 0 ? n[`${a}-${c}`] = i : n[`${a}-${c}`] = typeof r[c] == "number" ? `${r[c]}px` : r[c];
226
462
  }) : u(i);
227
463
  }), n;
228
464
  }
229
- cr(function(e, t) {
230
- let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: a, closeButton: s, className: i, offset: u, mobileOffset: c, theme: f = "light", richColors: p, duration: h, style: l, visibleToasts: g = _r, toastOptions: m, dir: y = $t(), gap: R = Br, loadingIcon: x, icons: T, containerAriaLabel: F = "Notifications", pauseWhenPageIsHidden: L } = e, [S, P] = w.useState([]), q = w.useMemo(() => Array.from(new Set([r].concat(S.filter((A) => A.position).map((A) => A.position)))), [S, r]), [oe, ot] = w.useState([]), [Pe, ae] = w.useState(!1), [Ie, we] = w.useState(!1), [Be, de] = w.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), ie = w.useRef(null), De = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = w.useRef(null), V = w.useRef(!1), st = w.useCallback((A) => {
231
- P((N) => {
232
- var M;
233
- return (M = N.find(($) => $.id === A.id)) != null && M.delete || W.dismiss(A.id), N.filter(({ id: $ }) => $ !== A.id);
465
+ yr(function(e, t) {
466
+ let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: u, mobileOffset: c, theme: d = "light", richColors: h, duration: p, style: l, visibleToasts: g = mo, toastOptions: m, dir: y = en(), gap: T = bo, loadingIcon: S, icons: _, containerAriaLabel: U = "Notifications", pauseWhenPageIsHidden: k } = e, [E, M] = w.useState([]), V = w.useMemo(() => Array.from(new Set([r].concat(E.filter((A) => A.position).map((A) => A.position)))), [E, r]), [se, ut] = w.useState([]), [Ue, le] = w.useState(!1), [je, ve] = w.useState(!1), [$e, he] = w.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), ce = w.useRef(null), He = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = w.useRef(null), Y = w.useRef(!1), dt = w.useCallback((A) => {
467
+ M((C) => {
468
+ var D;
469
+ return (D = C.find((q) => q.id === A.id)) != null && D.delete || W.dismiss(A.id), C.filter(({ id: q }) => q !== A.id);
234
470
  });
235
471
  }, []);
236
472
  return w.useEffect(() => W.subscribe((A) => {
237
473
  if (A.dismiss) {
238
- P((N) => N.map((M) => M.id === A.id ? { ...M, delete: !0 } : M));
474
+ M((C) => C.map((D) => D.id === A.id ? { ...D, delete: !0 } : D));
239
475
  return;
240
476
  }
241
477
  setTimeout(() => {
242
- fr.flushSync(() => {
243
- P((N) => {
244
- let M = N.findIndex(($) => $.id === A.id);
245
- return M !== -1 ? [...N.slice(0, M), { ...N[M], ...A }, ...N.slice(M + 1)] : [A, ...N];
478
+ Er.flushSync(() => {
479
+ M((C) => {
480
+ let D = C.findIndex((q) => q.id === A.id);
481
+ return D !== -1 ? [...C.slice(0, D), { ...C[D], ...A }, ...C.slice(D + 1)] : [A, ...C];
246
482
  });
247
483
  });
248
484
  });
249
485
  }), []), w.useEffect(() => {
250
- if (f !== "system") {
251
- de(f);
486
+ if (d !== "system") {
487
+ he(d);
252
488
  return;
253
489
  }
254
- if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? de("dark") : de("light")), typeof window > "u") return;
490
+ if (d === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? he("dark") : he("light")), typeof window > "u") return;
255
491
  let A = window.matchMedia("(prefers-color-scheme: dark)");
256
492
  try {
257
- A.addEventListener("change", ({ matches: N }) => {
258
- de(N ? "dark" : "light");
493
+ A.addEventListener("change", ({ matches: C }) => {
494
+ he(C ? "dark" : "light");
259
495
  });
260
496
  } catch {
261
- A.addListener(({ matches: M }) => {
497
+ A.addListener(({ matches: D }) => {
262
498
  try {
263
- de(M ? "dark" : "light");
264
- } catch ($) {
265
- console.error($);
499
+ he(D ? "dark" : "light");
500
+ } catch (q) {
501
+ console.error(q);
266
502
  }
267
503
  });
268
504
  }
269
- }, [f]), w.useEffect(() => {
270
- S.length <= 1 && ae(!1);
271
- }, [S]), w.useEffect(() => {
272
- let A = (N) => {
273
- var M, $;
274
- o.every((ye) => N[ye] || N.code === ye) && (ae(!0), (M = ie.current) == null || M.focus()), N.code === "Escape" && (document.activeElement === ie.current || ($ = ie.current) != null && $.contains(document.activeElement)) && ae(!1);
505
+ }, [d]), w.useEffect(() => {
506
+ E.length <= 1 && le(!1);
507
+ }, [E]), w.useEffect(() => {
508
+ let A = (C) => {
509
+ var D, q;
510
+ o.every((Ee) => C[Ee] || C.code === Ee) && (le(!0), (D = ce.current) == null || D.focus()), C.code === "Escape" && (document.activeElement === ce.current || (q = ce.current) != null && q.contains(document.activeElement)) && le(!1);
275
511
  };
276
512
  return document.addEventListener("keydown", A), () => document.removeEventListener("keydown", A);
277
513
  }, [o]), w.useEffect(() => {
278
- if (ie.current) return () => {
279
- E.current && (E.current.focus({ preventScroll: !0 }), E.current = null, V.current = !1);
514
+ if (ce.current) return () => {
515
+ x.current && (x.current.focus({ preventScroll: !0 }), x.current = null, Y.current = !1);
280
516
  };
281
- }, [ie.current]), w.createElement("section", { ref: t, "aria-label": `${F} ${De}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, q.map((A, N) => {
282
- var M;
283
- let [$, ye] = A.split("-");
284
- return S.length ? w.createElement("ol", { key: A, dir: y === "auto" ? $t() : y, tabIndex: -1, ref: ie, className: i, "data-sonner-toaster": !0, "data-theme": Be, "data-y-position": $, "data-lifted": Pe && S.length > 1 && !a, "data-x-position": ye, style: { "--front-toast-height": `${((M = oe[0]) == null ? void 0 : M.height) || 0}px`, "--width": `${Ir}px`, "--gap": `${R}px`, ...l, ...zr(u, c) }, onBlur: (I) => {
285
- V.current && !I.currentTarget.contains(I.relatedTarget) && (V.current = !1, E.current && (E.current.focus({ preventScroll: !0 }), E.current = null));
517
+ }, [ce.current]), w.createElement("section", { ref: t, "aria-label": `${U} ${He}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, V.map((A, C) => {
518
+ var D;
519
+ let [q, Ee] = A.split("-");
520
+ return E.length ? w.createElement("ol", { key: A, dir: y === "auto" ? en() : y, tabIndex: -1, ref: ce, className: i, "data-sonner-toaster": !0, "data-theme": $e, "data-y-position": q, "data-lifted": Ue && E.length > 1 && !s, "data-x-position": Ee, style: { "--front-toast-height": `${((D = se[0]) == null ? void 0 : D.height) || 0}px`, "--width": `${yo}px`, "--gap": `${T}px`, ...l, ...To(u, c) }, onBlur: (I) => {
521
+ Y.current && !I.currentTarget.contains(I.relatedTarget) && (Y.current = !1, x.current && (x.current.focus({ preventScroll: !0 }), x.current = null));
286
522
  }, onFocus: (I) => {
287
- I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || V.current || (V.current = !0, E.current = I.relatedTarget);
288
- }, onMouseEnter: () => ae(!0), onMouseMove: () => ae(!0), onMouseLeave: () => {
289
- Ie || ae(!1);
290
- }, onDragEnd: () => ae(!1), onPointerDown: (I) => {
291
- I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || we(!0);
292
- }, onPointerUp: () => we(!1) }, S.filter((I) => !I.position && N === 0 || I.position === A).map((I, at) => {
293
- var Te, Fe;
294
- return w.createElement(jr, { key: I.id, icons: T, index: at, toast: I, defaultRichColors: p, duration: (Te = m == null ? void 0 : m.duration) != null ? Te : h, className: m == null ? void 0 : m.className, descriptionClassName: m == null ? void 0 : m.descriptionClassName, invert: n, visibleToasts: g, closeButton: (Fe = m == null ? void 0 : m.closeButton) != null ? Fe : s, interacting: Ie, position: A, style: m == null ? void 0 : m.style, unstyled: m == null ? void 0 : m.unstyled, classNames: m == null ? void 0 : m.classNames, cancelButtonStyle: m == null ? void 0 : m.cancelButtonStyle, actionButtonStyle: m == null ? void 0 : m.actionButtonStyle, removeToast: st, toasts: S.filter((Oe) => Oe.position == I.position), heights: oe.filter((Oe) => Oe.position == I.position), setHeights: ot, expandByDefault: a, gap: R, loadingIcon: x, expanded: Pe, pauseWhenPageIsHidden: L, swipeDirections: e.swipeDirections });
523
+ I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || Y.current || (Y.current = !0, x.current = I.relatedTarget);
524
+ }, onMouseEnter: () => le(!0), onMouseMove: () => le(!0), onMouseLeave: () => {
525
+ je || le(!1);
526
+ }, onDragEnd: () => le(!1), onPointerDown: (I) => {
527
+ I.target instanceof HTMLElement && I.target.dataset.dismissible === "false" || ve(!0);
528
+ }, onPointerUp: () => ve(!1) }, E.filter((I) => !I.position && C === 0 || I.position === A).map((I, ft) => {
529
+ var Ae, ze;
530
+ return w.createElement(xo, { key: I.id, icons: _, index: ft, toast: I, defaultRichColors: h, duration: (Ae = m == null ? void 0 : m.duration) != null ? Ae : p, className: m == null ? void 0 : m.className, descriptionClassName: m == null ? void 0 : m.descriptionClassName, invert: n, visibleToasts: g, closeButton: (ze = m == null ? void 0 : m.closeButton) != null ? ze : a, interacting: je, position: A, style: m == null ? void 0 : m.style, unstyled: m == null ? void 0 : m.unstyled, classNames: m == null ? void 0 : m.classNames, cancelButtonStyle: m == null ? void 0 : m.cancelButtonStyle, actionButtonStyle: m == null ? void 0 : m.actionButtonStyle, removeToast: dt, toasts: E.filter((Ce) => Ce.position == I.position), heights: se.filter((Ce) => Ce.position == I.position), setHeights: ut, expandByDefault: s, gap: T, loadingIcon: S, expanded: Ue, pauseWhenPageIsHidden: k, swipeDirections: e.swipeDirections });
295
531
  })) : null;
296
532
  }));
297
533
  });
298
- function Hr() {
534
+ function _o() {
299
535
  return { toast: async ({
300
536
  id: t,
301
537
  title: n,
@@ -305,163 +541,159 @@ function Hr() {
305
541
  onClick: () => {
306
542
  }
307
543
  },
308
- ...a
544
+ ...s
309
545
  }) => {
310
- const s = { description: r };
311
- o.label && (s.action = { label: o.label, onClick: o.onClick }), Nr(n, s);
546
+ const a = { description: r };
547
+ o.label && (a.action = { label: o.label, onClick: o.onClick }), po(n, a);
312
548
  } };
313
549
  }
314
- var He = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
315
- function qr(e) {
316
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
317
- }
318
- var $r = "Expected a function", Wt = NaN, Wr = "[object Symbol]", Jr = /^\s+|\s+$/g, Vr = /^[-+]0x[0-9a-f]+$/i, Kr = /^0b[01]+$/i, Yr = /^0o[0-7]+$/i, Xr = parseInt, Gr = typeof He == "object" && He && He.Object === Object && He, Qr = typeof self == "object" && self && self.Object === Object && self, Zr = Gr || Qr || Function("return this")(), eo = Object.prototype, to = eo.toString, no = Math.max, ro = Math.min, ht = function() {
319
- return Zr.Date.now();
550
+ var Ro = "Expected a function", tn = NaN, Oo = "[object Symbol]", No = /^\s+|\s+$/g, Ao = /^[-+]0x[0-9a-f]+$/i, Co = /^0b[01]+$/i, ko = /^0o[0-7]+$/i, Lo = parseInt, Do = typeof qe == "object" && qe && qe.Object === Object && qe, Mo = typeof self == "object" && self && self.Object === Object && self, Io = Do || Mo || Function("return this")(), Po = Object.prototype, Bo = Po.toString, Fo = Math.max, Uo = Math.min, bt = function() {
551
+ return Io.Date.now();
320
552
  };
321
- function oo(e, t, n) {
322
- var r, o, a, s, i, u, c = 0, f = !1, p = !1, h = !0;
553
+ function jo(e, t, n) {
554
+ var r, o, s, a, i, u, c = 0, d = !1, h = !1, p = !0;
323
555
  if (typeof e != "function")
324
- throw new TypeError($r);
325
- t = Jt(t) || 0, xt(n) && (f = !!n.leading, p = "maxWait" in n, a = p ? no(Jt(n.maxWait) || 0, t) : a, h = "trailing" in n ? !!n.trailing : h);
326
- function l(S) {
327
- var P = r, q = o;
328
- return r = o = void 0, c = S, s = e.apply(q, P), s;
556
+ throw new TypeError(Ro);
557
+ t = nn(t) || 0, At(n) && (d = !!n.leading, h = "maxWait" in n, s = h ? Fo(nn(n.maxWait) || 0, t) : s, p = "trailing" in n ? !!n.trailing : p);
558
+ function l(E) {
559
+ var M = r, V = o;
560
+ return r = o = void 0, c = E, a = e.apply(V, M), a;
329
561
  }
330
- function g(S) {
331
- return c = S, i = setTimeout(R, t), f ? l(S) : s;
562
+ function g(E) {
563
+ return c = E, i = setTimeout(T, t), d ? l(E) : a;
332
564
  }
333
- function m(S) {
334
- var P = S - u, q = S - c, oe = t - P;
335
- return p ? ro(oe, a - q) : oe;
565
+ function m(E) {
566
+ var M = E - u, V = E - c, se = t - M;
567
+ return h ? Uo(se, s - V) : se;
336
568
  }
337
- function y(S) {
338
- var P = S - u, q = S - c;
339
- return u === void 0 || P >= t || P < 0 || p && q >= a;
569
+ function y(E) {
570
+ var M = E - u, V = E - c;
571
+ return u === void 0 || M >= t || M < 0 || h && V >= s;
340
572
  }
341
- function R() {
342
- var S = ht();
343
- if (y(S))
344
- return x(S);
345
- i = setTimeout(R, m(S));
573
+ function T() {
574
+ var E = bt();
575
+ if (y(E))
576
+ return S(E);
577
+ i = setTimeout(T, m(E));
346
578
  }
347
- function x(S) {
348
- return i = void 0, h && r ? l(S) : (r = o = void 0, s);
579
+ function S(E) {
580
+ return i = void 0, p && r ? l(E) : (r = o = void 0, a);
349
581
  }
350
- function T() {
582
+ function _() {
351
583
  i !== void 0 && clearTimeout(i), c = 0, r = u = o = i = void 0;
352
584
  }
353
- function F() {
354
- return i === void 0 ? s : x(ht());
585
+ function U() {
586
+ return i === void 0 ? a : S(bt());
355
587
  }
356
- function L() {
357
- var S = ht(), P = y(S);
358
- if (r = arguments, o = this, u = S, P) {
588
+ function k() {
589
+ var E = bt(), M = y(E);
590
+ if (r = arguments, o = this, u = E, M) {
359
591
  if (i === void 0)
360
592
  return g(u);
361
- if (p)
362
- return i = setTimeout(R, t), l(u);
593
+ if (h)
594
+ return i = setTimeout(T, t), l(u);
363
595
  }
364
- return i === void 0 && (i = setTimeout(R, t)), s;
596
+ return i === void 0 && (i = setTimeout(T, t)), a;
365
597
  }
366
- return L.cancel = T, L.flush = F, L;
598
+ return k.cancel = _, k.flush = U, k;
367
599
  }
368
- function xt(e) {
600
+ function At(e) {
369
601
  var t = typeof e;
370
602
  return !!e && (t == "object" || t == "function");
371
603
  }
372
- function so(e) {
604
+ function $o(e) {
373
605
  return !!e && typeof e == "object";
374
606
  }
375
- function ao(e) {
376
- return typeof e == "symbol" || so(e) && to.call(e) == Wr;
607
+ function Ho(e) {
608
+ return typeof e == "symbol" || $o(e) && Bo.call(e) == Oo;
377
609
  }
378
- function Jt(e) {
610
+ function nn(e) {
379
611
  if (typeof e == "number")
380
612
  return e;
381
- if (ao(e))
382
- return Wt;
383
- if (xt(e)) {
613
+ if (Ho(e))
614
+ return tn;
615
+ if (At(e)) {
384
616
  var t = typeof e.valueOf == "function" ? e.valueOf() : e;
385
- e = xt(t) ? t + "" : t;
617
+ e = At(t) ? t + "" : t;
386
618
  }
387
619
  if (typeof e != "string")
388
620
  return e === 0 ? e : +e;
389
- e = e.replace(Jr, "");
390
- var n = Kr.test(e);
391
- return n || Yr.test(e) ? Xr(e.slice(2), n ? 2 : 8) : Vr.test(e) ? Wt : +e;
621
+ e = e.replace(No, "");
622
+ var n = Co.test(e);
623
+ return n || ko.test(e) ? Lo(e.slice(2), n ? 2 : 8) : Ao.test(e) ? tn : +e;
392
624
  }
393
- var io = oo;
394
- const Vt = /* @__PURE__ */ qr(io);
395
- function lo(e = !1) {
625
+ var zo = jo;
626
+ const rn = /* @__PURE__ */ Sr(zo);
627
+ function Vo(e = !1) {
396
628
  if (typeof e != "boolean")
397
629
  throw new Error("defaultValue must be `true` or `false`");
398
- const [t, n] = B(e), r = O(() => {
630
+ const [t, n] = P(e), r = R(() => {
399
631
  n(!0);
400
- }, []), o = O(() => {
632
+ }, []), o = R(() => {
401
633
  n(!1);
402
- }, []), a = O(() => {
403
- n((s) => !s);
634
+ }, []), s = R(() => {
635
+ n((a) => !a);
404
636
  }, []);
405
- return { value: t, setValue: n, setTrue: r, setFalse: o, toggle: a };
637
+ return { value: t, setValue: n, setTrue: r, setFalse: o, toggle: s };
406
638
  }
407
- var ne = typeof window < "u" ? ur : z;
408
- function Y(e, t, n, r) {
409
- const o = H(t);
410
- ne(() => {
639
+ var re = typeof window < "u" ? br : H;
640
+ function G(e, t, n, r) {
641
+ const o = z(t);
642
+ re(() => {
411
643
  o.current = t;
412
- }, [t]), z(() => {
413
- const a = (n == null ? void 0 : n.current) ?? window;
414
- if (!(a && a.addEventListener)) return;
415
- const s = (i) => {
644
+ }, [t]), H(() => {
645
+ const s = (n == null ? void 0 : n.current) ?? window;
646
+ if (!(s && s.addEventListener)) return;
647
+ const a = (i) => {
416
648
  o.current(i);
417
649
  };
418
- return a.addEventListener(e, s, r), () => {
419
- a.removeEventListener(e, s, r);
650
+ return s.addEventListener(e, a, r), () => {
651
+ s.removeEventListener(e, a, r);
420
652
  };
421
653
  }, [e, n, r]);
422
654
  }
423
- function la(e) {
424
- Y("click", (t) => {
655
+ function za(e) {
656
+ G("click", (t) => {
425
657
  e(t);
426
658
  });
427
659
  }
428
- var pt = "useCopyToClipboard";
429
- function ca() {
430
- const [e, t] = B(null), { toast: n } = Hr(), r = O(async (a) => {
660
+ var vt = "useCopyToClipboard";
661
+ function Va() {
662
+ const [e, t] = P(null), { toast: n } = _o(), r = R(async (s) => {
431
663
  if (!(navigator != null && navigator.clipboard))
432
- return U.log(pt, "not supported"), !1;
664
+ return j.log(vt, "not supported"), !1;
433
665
  try {
434
- return await navigator.clipboard.writeText(a), t(a), !0;
435
- } catch (s) {
436
- return U.error(pt, "Copy failed", s), t(null), !1;
666
+ return await navigator.clipboard.writeText(s), t(s), !0;
667
+ } catch (a) {
668
+ return j.error(vt, "Copy failed", a), t(null), !1;
437
669
  }
438
670
  }, []);
439
- return { value: e, copy: r, copyWithToast: async (a = "", s = "copied to clipboard") => {
440
- const i = await r(a);
441
- return i && (U.debug(pt, s), n({ title: s })), i;
671
+ return { value: e, copy: r, copyWithToast: async (s = "", a = "copied to clipboard") => {
672
+ const i = await r(s);
673
+ return i && (j.debug(vt, a), n({ title: a })), i;
442
674
  } };
443
675
  }
444
- function co(e) {
445
- const [t, n] = B(e ?? 0), r = O(() => {
446
- n((s) => s + 1);
447
- }, []), o = O(() => {
448
- n((s) => s - 1);
449
- }, []), a = O(() => {
676
+ function qo(e) {
677
+ const [t, n] = P(e ?? 0), r = R(() => {
678
+ n((a) => a + 1);
679
+ }, []), o = R(() => {
680
+ n((a) => a - 1);
681
+ }, []), s = R(() => {
450
682
  n(e ?? 0);
451
683
  }, [e]);
452
684
  return {
453
685
  count: t,
454
686
  increment: r,
455
687
  decrement: o,
456
- reset: a,
688
+ reset: s,
457
689
  setCount: n
458
690
  };
459
691
  }
460
- function uo(e, t) {
461
- const n = H(e);
462
- ne(() => {
692
+ function Wo(e, t) {
693
+ const n = z(e);
694
+ re(() => {
463
695
  n.current = e;
464
- }, [e]), z(() => {
696
+ }, [e]), H(() => {
465
697
  if (t === null)
466
698
  return;
467
699
  const r = setInterval(() => {
@@ -472,7 +704,7 @@ function uo(e, t) {
472
704
  };
473
705
  }, [t]);
474
706
  }
475
- function ua({
707
+ function qa({
476
708
  countStart: e,
477
709
  countStop: t = 0,
478
710
  intervalMs: n = 1e3,
@@ -480,236 +712,236 @@ function ua({
480
712
  }) {
481
713
  const {
482
714
  count: o,
483
- increment: a,
484
- decrement: s,
715
+ increment: s,
716
+ decrement: a,
485
717
  reset: i
486
- } = co(e), {
718
+ } = qo(e), {
487
719
  value: u,
488
720
  setTrue: c,
489
- setFalse: f
490
- } = lo(!1), p = O(() => {
491
- f(), i();
492
- }, [f, i]), h = O(() => {
721
+ setFalse: d
722
+ } = Vo(!1), h = R(() => {
723
+ d(), i();
724
+ }, [d, i]), p = R(() => {
493
725
  if (o === t) {
494
- f();
726
+ d();
495
727
  return;
496
728
  }
497
- r ? a() : s();
498
- }, [o, t, s, a, r, f]);
499
- return uo(h, u ? n : null), [o, { startCountdown: c, stopCountdown: f, resetCountdown: p }];
729
+ r ? s() : a();
730
+ }, [o, t, a, s, r, d]);
731
+ return Wo(p, u ? n : null), [o, { startCountdown: c, stopCountdown: d, resetCountdown: h }];
500
732
  }
501
- function Ye(e) {
502
- const t = H(() => {
733
+ function et(e) {
734
+ const t = z(() => {
503
735
  throw new Error("Cannot call an event handler while rendering.");
504
736
  });
505
- return ne(() => {
737
+ return re(() => {
506
738
  t.current = e;
507
- }, [e]), O((...n) => {
739
+ }, [e]), R((...n) => {
508
740
  var r;
509
741
  return (r = t.current) == null ? void 0 : r.call(t, ...n);
510
742
  }, [t]);
511
743
  }
512
- var Ae = "useLocalStorage", mt = typeof window > "u";
513
- function bn(e, t, n = {}) {
514
- const { initializeWithValue: r = !0 } = n, o = O(
515
- (h) => n.serializer ? n.serializer(h) : JSON.stringify(h),
744
+ var Me = "useLocalStorage", Et = typeof window > "u";
745
+ function An(e, t, n = {}) {
746
+ const { initializeWithValue: r = !0 } = n, o = R(
747
+ (p) => n.serializer ? n.serializer(p) : JSON.stringify(p),
516
748
  [n]
517
- ), a = O(
518
- (h) => {
749
+ ), s = R(
750
+ (p) => {
519
751
  if (n.deserializer)
520
- return n.deserializer(h);
521
- if (h === "undefined")
752
+ return n.deserializer(p);
753
+ if (p === "undefined")
522
754
  return;
523
755
  const l = t instanceof Function ? t() : t;
524
756
  let g;
525
757
  try {
526
- g = JSON.parse(h);
758
+ g = JSON.parse(p);
527
759
  } catch (m) {
528
- return U.error(Ae, "Error parsing JSON:", m), l;
760
+ return j.error(Me, "Error parsing JSON:", m), l;
529
761
  }
530
762
  return g;
531
763
  },
532
764
  [n, t]
533
- ), s = O(() => {
534
- const h = t instanceof Function ? t() : t;
535
- if (mt)
536
- return h;
765
+ ), a = R(() => {
766
+ const p = t instanceof Function ? t() : t;
767
+ if (Et)
768
+ return p;
537
769
  try {
538
770
  const l = window.localStorage.getItem(e);
539
- return l ? a(l) : h;
771
+ return l ? s(l) : p;
540
772
  } catch (l) {
541
- return U.error(
542
- Ae,
773
+ return j.error(
774
+ Me,
543
775
  `Error reading localStorage key “${e}”:`,
544
776
  l
545
- ), h;
777
+ ), p;
546
778
  }
547
- }, [t, e, a]), [i, u] = B(() => r ? s() : t instanceof Function ? t() : t), c = Ye((h) => {
548
- mt && U.warn(
549
- Ae,
779
+ }, [t, e, s]), [i, u] = P(() => r ? a() : t instanceof Function ? t() : t), c = et((p) => {
780
+ Et && j.warn(
781
+ Me,
550
782
  `Tried setting localStorage key “${e}” even though environment is not a client`
551
783
  );
552
784
  try {
553
- const l = h instanceof Function ? h(s()) : h;
785
+ const l = p instanceof Function ? p(a()) : p;
554
786
  window.localStorage.setItem(e, o(l)), u(l), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
555
787
  } catch (l) {
556
- U.warn(
557
- Ae,
788
+ j.warn(
789
+ Me,
558
790
  `Error setting localStorage key “${e}”:`,
559
791
  l
560
792
  );
561
793
  }
562
- }), f = Ye(() => {
563
- mt && U.warn(
564
- Ae,
794
+ }), d = et(() => {
795
+ Et && j.warn(
796
+ Me,
565
797
  `Tried removing localStorage key “${e}” even though environment is not a client`
566
798
  );
567
- const h = t instanceof Function ? t() : t;
568
- window.localStorage.removeItem(e), u(h), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
799
+ const p = t instanceof Function ? t() : t;
800
+ window.localStorage.removeItem(e), u(p), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
569
801
  });
570
- z(() => {
571
- u(s());
802
+ H(() => {
803
+ u(a());
572
804
  }, [e]);
573
- const p = O(
574
- (h) => {
575
- h.key && h.key !== e || u(s());
805
+ const h = R(
806
+ (p) => {
807
+ p.key && p.key !== e || u(a());
576
808
  },
577
- [e, s]
809
+ [e, a]
578
810
  );
579
- return Y("storage", p), Y("local-storage", p), [i, c, f];
811
+ return G("storage", h), G("local-storage", h), [i, c, d];
580
812
  }
581
- var fo = typeof window > "u";
582
- function vn(e, {
813
+ var Ko = typeof window > "u";
814
+ function Cn(e, {
583
815
  defaultValue: t = !1,
584
816
  initializeWithValue: n = !0
585
817
  } = {}) {
586
- const r = (i) => fo ? t : window.matchMedia(i).matches, [o, a] = B(() => n ? r(e) : t);
587
- function s() {
588
- a(r(e));
818
+ const r = (i) => Ko ? t : window.matchMedia(i).matches, [o, s] = P(() => n ? r(e) : t);
819
+ function a() {
820
+ s(r(e));
589
821
  }
590
- return ne(() => {
822
+ return re(() => {
591
823
  const i = window.matchMedia(e);
592
- return s(), i.addListener ? i.addListener(s) : i.addEventListener("change", s), () => {
593
- i.removeListener ? i.removeListener(s) : i.removeEventListener("change", s);
824
+ return a(), i.addListener ? i.addListener(a) : i.addEventListener("change", a), () => {
825
+ i.removeListener ? i.removeListener(a) : i.removeEventListener("change", a);
594
826
  };
595
827
  }, [e]), o;
596
828
  }
597
- var ho = "(prefers-color-scheme: dark)", po = "usehooks-ts-dark-mode";
598
- function da(e = {}) {
829
+ var Yo = "(prefers-color-scheme: dark)", Jo = "usehooks-ts-dark-mode";
830
+ function Wa(e = {}) {
599
831
  const {
600
832
  defaultValue: t,
601
- localStorageKey: n = po,
833
+ localStorageKey: n = Jo,
602
834
  initializeWithValue: r = !0
603
- } = e, o = vn(ho, {
835
+ } = e, o = Cn(Yo, {
604
836
  initializeWithValue: r,
605
837
  defaultValue: t
606
- }), [a, s] = bn(
838
+ }), [s, a] = An(
607
839
  n,
608
840
  t ?? o ?? !1,
609
841
  { initializeWithValue: r }
610
842
  );
611
- return ne(() => {
612
- o !== a && s(o);
843
+ return re(() => {
844
+ o !== s && a(o);
613
845
  }, [o]), {
614
- isDarkMode: a,
846
+ isDarkMode: s,
615
847
  toggle: () => {
616
- s((i) => !i);
848
+ a((i) => !i);
617
849
  },
618
850
  enable: () => {
619
- s(!0);
851
+ a(!0);
620
852
  },
621
853
  disable: () => {
622
- s(!1);
854
+ a(!1);
623
855
  },
624
856
  set: (i) => {
625
- s(i);
857
+ a(i);
626
858
  }
627
859
  };
628
860
  }
629
- function Sn(e) {
630
- const t = H(e);
631
- t.current = e, z(
861
+ function kn(e) {
862
+ const t = z(e);
863
+ t.current = e, H(
632
864
  () => () => {
633
865
  t.current();
634
866
  },
635
867
  []
636
868
  );
637
869
  }
638
- function Lt(e, t = 500, n) {
639
- const r = H();
640
- Sn(() => {
870
+ function Ut(e, t = 500, n) {
871
+ const r = z();
872
+ kn(() => {
641
873
  r.current && r.current.cancel();
642
874
  });
643
- const o = dr(() => {
644
- const a = Vt(e, t, n), s = (...i) => a(...i);
645
- return s.cancel = () => {
646
- a.cancel();
647
- }, s.isPending = () => !!r.current, s.flush = () => a.flush(), s;
875
+ const o = vr(() => {
876
+ const s = rn(e, t, n), a = (...i) => s(...i);
877
+ return a.cancel = () => {
878
+ s.cancel();
879
+ }, a.isPending = () => !!r.current, a.flush = () => s.flush(), a;
648
880
  }, [e, t, n]);
649
- return z(() => {
650
- r.current = Vt(e, t, n);
881
+ return H(() => {
882
+ r.current = rn(e, t, n);
651
883
  }, [e, t, n]), o;
652
884
  }
653
- function fa(e, t, n) {
654
- const r = (n == null ? void 0 : n.equalityFn) ?? ((c, f) => c === f), o = e instanceof Function ? e() : e, [a, s] = B(o), i = H(o), u = Lt(
655
- s,
885
+ function Ka(e, t, n) {
886
+ const r = (n == null ? void 0 : n.equalityFn) ?? ((c, d) => c === d), o = e instanceof Function ? e() : e, [s, a] = P(o), i = z(o), u = Ut(
887
+ a,
656
888
  t,
657
889
  n
658
890
  );
659
- return r(i.current, o) || (u(o), i.current = o), [a, u];
891
+ return r(i.current, o) || (u(o), i.current = o), [s, u];
660
892
  }
661
- function ha(e, t = {}) {
662
- const { preserveTitleOnUnmount: n = !0 } = t, r = H(null);
663
- ne(() => {
893
+ function Ya(e, t = {}) {
894
+ const { preserveTitleOnUnmount: n = !0 } = t, r = z(null);
895
+ re(() => {
664
896
  r.current = window.document.title;
665
- }, []), ne(() => {
897
+ }, []), re(() => {
666
898
  window.document.title = e;
667
- }, [e]), Sn(() => {
899
+ }, [e]), kn(() => {
668
900
  !n && r.current && (window.document.title = r.current);
669
901
  });
670
902
  }
671
- function mo() {
672
- const e = H(!0);
903
+ function Go() {
904
+ const e = z(!0);
673
905
  return e.current ? (e.current = !1, !0) : e.current;
674
906
  }
675
- function pa(e, t) {
676
- const n = mo();
677
- z(() => {
907
+ function Ja(e, t) {
908
+ const n = Go();
909
+ H(() => {
678
910
  if (!n)
679
911
  return e();
680
912
  }, t);
681
913
  }
682
- function ma(e) {
683
- const [t, n] = B(!1), r = () => {
914
+ function Ga(e) {
915
+ const [t, n] = P(!1), r = () => {
684
916
  n(!0);
685
917
  }, o = () => {
686
918
  n(!1);
687
919
  };
688
- return Y("mouseenter", r, e), Y("mouseleave", o, e), t;
920
+ return G("mouseenter", r, e), G("mouseleave", o, e), t;
689
921
  }
690
- function ga({
922
+ function Xa({
691
923
  threshold: e = 0,
692
924
  root: t = null,
693
925
  rootMargin: n = "0%",
694
926
  freezeOnceVisible: r = !1,
695
927
  initialIsIntersecting: o = !1,
696
- onChange: a
928
+ onChange: s
697
929
  } = {}) {
698
- var s;
699
- const [i, u] = B(null), [c, f] = B(() => ({
930
+ var a;
931
+ const [i, u] = P(null), [c, d] = P(() => ({
700
932
  isIntersecting: o,
701
933
  entry: void 0
702
- })), p = H();
703
- p.current = a;
704
- const h = ((s = c.entry) == null ? void 0 : s.isIntersecting) && r;
705
- z(() => {
706
- if (!i || !("IntersectionObserver" in window) || h) return;
934
+ })), h = z();
935
+ h.current = s;
936
+ const p = ((a = c.entry) == null ? void 0 : a.isIntersecting) && r;
937
+ H(() => {
938
+ if (!i || !("IntersectionObserver" in window) || p) return;
707
939
  const m = new IntersectionObserver(
708
940
  (y) => {
709
- const R = Array.isArray(m.thresholds) ? m.thresholds : [m.thresholds];
710
- y.forEach((x) => {
711
- const T = x.isIntersecting && R.some((F) => x.intersectionRatio >= F);
712
- f({ isIntersecting: T, entry: x }), p.current && p.current(T, x);
941
+ const T = Array.isArray(m.thresholds) ? m.thresholds : [m.thresholds];
942
+ y.forEach((S) => {
943
+ const _ = S.isIntersecting && T.some((U) => S.intersectionRatio >= U);
944
+ d({ isIntersecting: _, entry: S }), h.current && h.current(_, S);
713
945
  });
714
946
  },
715
947
  { threshold: e, root: t, rootMargin: n }
@@ -723,14 +955,14 @@ function ga({
723
955
  JSON.stringify(e),
724
956
  t,
725
957
  n,
726
- h,
958
+ p,
727
959
  r
728
960
  ]);
729
- const l = H(null);
730
- z(() => {
961
+ const l = z(null);
962
+ H(() => {
731
963
  var m;
732
- !i && ((m = c.entry) != null && m.target) && !r && !h && l.current !== c.entry.target && (l.current = c.entry.target, f({ isIntersecting: o, entry: void 0 }));
733
- }, [i, c.entry, r, h, o]);
964
+ !i && ((m = c.entry) != null && m.target) && !r && !p && l.current !== c.entry.target && (l.current = c.entry.target, d({ isIntersecting: o, entry: void 0 }));
965
+ }, [i, c.entry, r, p, o]);
734
966
  const g = [
735
967
  u,
736
968
  !!c.isIntersecting,
@@ -738,59 +970,59 @@ function ga({
738
970
  ];
739
971
  return g.ref = g[0], g.isIntersecting = g[1], g.entry = g[2], g;
740
972
  }
741
- function wa() {
742
- const [e, t] = B(!1);
743
- return z(() => {
973
+ function Qa() {
974
+ const [e, t] = P(!1);
975
+ return H(() => {
744
976
  t(!0);
745
977
  }, []), e;
746
978
  }
747
- function go() {
748
- const e = H(!1);
749
- return z(() => (e.current = !0, () => {
979
+ function Xo() {
980
+ const e = z(!1);
981
+ return H(() => (e.current = !0, () => {
750
982
  e.current = !1;
751
- }), []), O(() => e.current, []);
983
+ }), []), R(() => e.current, []);
752
984
  }
753
- function ya(e = /* @__PURE__ */ new Map()) {
754
- const [t, n] = B(new Map(e)), r = {
755
- set: O((o, a) => {
756
- n((s) => {
757
- const i = new Map(s);
758
- return i.set(o, a), i;
985
+ function Za(e = /* @__PURE__ */ new Map()) {
986
+ const [t, n] = P(new Map(e)), r = {
987
+ set: R((o, s) => {
988
+ n((a) => {
989
+ const i = new Map(a);
990
+ return i.set(o, s), i;
759
991
  });
760
992
  }, []),
761
- setAll: O((o) => {
993
+ setAll: R((o) => {
762
994
  n(() => new Map(o));
763
995
  }, []),
764
- remove: O((o) => {
765
- n((a) => {
766
- const s = new Map(a);
767
- return s.delete(o), s;
996
+ remove: R((o) => {
997
+ n((s) => {
998
+ const a = new Map(s);
999
+ return a.delete(o), a;
768
1000
  });
769
1001
  }, []),
770
- reset: O(() => {
1002
+ reset: R(() => {
771
1003
  n(() => /* @__PURE__ */ new Map());
772
1004
  }, [])
773
1005
  };
774
1006
  return [t, r];
775
1007
  }
776
- function ba(e, t, n = "mousedown", r = {}) {
777
- Y(
1008
+ function ei(e, t, n = "mousedown", r = {}) {
1009
+ G(
778
1010
  n,
779
1011
  (o) => {
780
- const a = o.target;
781
- if (!(a != null && a.isConnected))
1012
+ const s = o.target;
1013
+ if (!(s != null && s.isConnected))
782
1014
  return;
783
- (Array.isArray(e) ? e.filter((i) => !!i.current).every((i) => i.current && !i.current.contains(a)) : e.current && !e.current.contains(a)) && t(o);
1015
+ (Array.isArray(e) ? e.filter((i) => !!i.current).every((i) => i.current && !i.current.contains(s)) : e.current && !e.current.contains(s)) && t(o);
784
1016
  },
785
1017
  void 0,
786
1018
  r
787
1019
  );
788
1020
  }
789
- var Kt = typeof window > "u";
790
- function va(e, t = {}) {
1021
+ var on = typeof window > "u";
1022
+ function ti(e, t = {}) {
791
1023
  let { initializeWithValue: n = !0 } = t;
792
- Kt && (n = !1);
793
- const r = O(
1024
+ on && (n = !1);
1025
+ const r = R(
794
1026
  (u) => {
795
1027
  if (t.deserializer)
796
1028
  return t.deserializer(u);
@@ -799,14 +1031,14 @@ function va(e, t = {}) {
799
1031
  let c;
800
1032
  try {
801
1033
  c = JSON.parse(u);
802
- } catch (f) {
803
- return console.error("Error parsing JSON:", f), null;
1034
+ } catch (d) {
1035
+ return console.error("Error parsing JSON:", d), null;
804
1036
  }
805
1037
  return c;
806
1038
  },
807
1039
  [t]
808
- ), o = O(() => {
809
- if (Kt)
1040
+ ), o = R(() => {
1041
+ if (on)
810
1042
  return null;
811
1043
  try {
812
1044
  const u = window.localStorage.getItem(e);
@@ -814,42 +1046,42 @@ function va(e, t = {}) {
814
1046
  } catch (u) {
815
1047
  return console.warn(`Error reading localStorage key “${e}”:`, u), null;
816
1048
  }
817
- }, [e, r]), [a, s] = B(() => {
1049
+ }, [e, r]), [s, a] = P(() => {
818
1050
  if (n)
819
1051
  return o();
820
1052
  });
821
- z(() => {
822
- s(o());
1053
+ H(() => {
1054
+ a(o());
823
1055
  }, [e]);
824
- const i = O(
1056
+ const i = R(
825
1057
  (u) => {
826
- u.key && u.key !== e || s(o());
1058
+ u.key && u.key !== e || a(o());
827
1059
  },
828
1060
  [e, o]
829
1061
  );
830
- return Y("storage", i), Y("local-storage", i), a;
1062
+ return G("storage", i), G("local-storage", i), s;
831
1063
  }
832
- var Yt = {
1064
+ var sn = {
833
1065
  width: void 0,
834
1066
  height: void 0
835
1067
  };
836
- function Sa(e) {
837
- const { ref: t, box: n = "content-box" } = e, [{ width: r, height: o }, a] = B(Yt), s = go(), i = H({ ...Yt }), u = H(void 0);
838
- return u.current = e.onResize, z(() => {
1068
+ function ni(e) {
1069
+ const { ref: t, box: n = "content-box" } = e, [{ width: r, height: o }, s] = P(sn), a = Xo(), i = z({ ...sn }), u = z(void 0);
1070
+ return u.current = e.onResize, H(() => {
839
1071
  if (!t.current || typeof window > "u" || !("ResizeObserver" in window)) return;
840
- const c = new ResizeObserver(([f]) => {
841
- const p = n === "border-box" ? "borderBoxSize" : n === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", h = Xt(f, p, "inlineSize"), l = Xt(f, p, "blockSize");
842
- if (i.current.width !== h || i.current.height !== l) {
843
- const m = { width: h, height: l };
844
- i.current.width = h, i.current.height = l, u.current ? u.current(m) : s() && a(m);
1072
+ const c = new ResizeObserver(([d]) => {
1073
+ const h = n === "border-box" ? "borderBoxSize" : n === "device-pixel-content-box" ? "devicePixelContentBoxSize" : "contentBoxSize", p = an(d, h, "inlineSize"), l = an(d, h, "blockSize");
1074
+ if (i.current.width !== p || i.current.height !== l) {
1075
+ const m = { width: p, height: l };
1076
+ i.current.width = p, i.current.height = l, u.current ? u.current(m) : a() && s(m);
845
1077
  }
846
1078
  });
847
1079
  return c.observe(t.current, { box: n }), () => {
848
1080
  c.disconnect();
849
1081
  };
850
- }, [n, t, s]), { width: r, height: o };
1082
+ }, [n, t, a]), { width: r, height: o };
851
1083
  }
852
- function Xt(e, t, n) {
1084
+ function an(e, t, n) {
853
1085
  return e[t] ? Array.isArray(e[t]) ? (
854
1086
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
855
1087
  e[t][0][n]
@@ -858,49 +1090,49 @@ function Xt(e, t, n) {
858
1090
  e[t][n]
859
1091
  ) : t === "contentBoxSize" ? e.contentRect[n === "inlineSize" ? "width" : "height"] : void 0;
860
1092
  }
861
- var Gt = typeof window > "u";
862
- function xa(e = {}) {
1093
+ var ln = typeof window > "u";
1094
+ function ri(e = {}) {
863
1095
  let { initializeWithValue: t = !0 } = e;
864
- Gt && (t = !1);
1096
+ ln && (t = !1);
865
1097
  const n = () => {
866
- if (!Gt)
1098
+ if (!ln)
867
1099
  return window.screen;
868
- }, [r, o] = B(() => {
1100
+ }, [r, o] = P(() => {
869
1101
  if (t)
870
1102
  return n();
871
- }), a = Lt(
1103
+ }), s = Ut(
872
1104
  o,
873
1105
  e.debounceDelay
874
1106
  );
875
- function s() {
876
- const i = n(), u = e.debounceDelay ? a : o;
1107
+ function a() {
1108
+ const i = n(), u = e.debounceDelay ? s : o;
877
1109
  if (i) {
878
1110
  const {
879
1111
  width: c,
880
- height: f,
881
- availHeight: p,
882
- availWidth: h,
1112
+ height: d,
1113
+ availHeight: h,
1114
+ availWidth: p,
883
1115
  colorDepth: l,
884
1116
  orientation: g,
885
1117
  pixelDepth: m
886
1118
  } = i;
887
1119
  u({
888
1120
  width: c,
889
- height: f,
890
- availHeight: p,
891
- availWidth: h,
1121
+ height: d,
1122
+ availHeight: h,
1123
+ availWidth: p,
892
1124
  colorDepth: l,
893
1125
  orientation: g,
894
1126
  pixelDepth: m
895
1127
  });
896
1128
  }
897
1129
  }
898
- return Y("resize", s), ne(() => {
899
- s();
1130
+ return G("resize", a), re(() => {
1131
+ a();
900
1132
  }, []), r;
901
1133
  }
902
- var qe = /* @__PURE__ */ new Map();
903
- function wo(e) {
1134
+ var Ke = /* @__PURE__ */ new Map();
1135
+ function Qo(e) {
904
1136
  const t = document.querySelector(
905
1137
  `script[src="${e}"]`
906
1138
  ), n = t == null ? void 0 : t.getAttribute("data-status");
@@ -909,174 +1141,174 @@ function wo(e) {
909
1141
  status: n
910
1142
  };
911
1143
  }
912
- function Ea(e, t) {
913
- const [n, r] = B(() => !e || t != null && t.shouldPreventLoad ? "idle" : typeof window > "u" ? "loading" : qe.get(e) ?? "loading");
914
- return z(() => {
1144
+ function oi(e, t) {
1145
+ const [n, r] = P(() => !e || t != null && t.shouldPreventLoad ? "idle" : typeof window > "u" ? "loading" : Ke.get(e) ?? "loading");
1146
+ return H(() => {
915
1147
  if (!e || t != null && t.shouldPreventLoad)
916
1148
  return;
917
- const o = qe.get(e);
1149
+ const o = Ke.get(e);
918
1150
  if (o === "ready" || o === "error") {
919
1151
  r(o);
920
1152
  return;
921
1153
  }
922
- const a = wo(e);
923
- let s = a.node;
924
- if (s)
925
- r(a.status ?? o ?? "loading");
1154
+ const s = Qo(e);
1155
+ let a = s.node;
1156
+ if (a)
1157
+ r(s.status ?? o ?? "loading");
926
1158
  else {
927
- s = document.createElement("script"), s.src = e, s.async = !0, t != null && t.id && (s.id = t.id), s.setAttribute("data-status", "loading"), document.body.appendChild(s);
1159
+ a = document.createElement("script"), a.src = e, a.async = !0, t != null && t.id && (a.id = t.id), a.setAttribute("data-status", "loading"), document.body.appendChild(a);
928
1160
  const u = (c) => {
929
- const f = c.type === "load" ? "ready" : "error";
930
- s == null || s.setAttribute("data-status", f);
1161
+ const d = c.type === "load" ? "ready" : "error";
1162
+ a == null || a.setAttribute("data-status", d);
931
1163
  };
932
- s.addEventListener("load", u), s.addEventListener("error", u);
1164
+ a.addEventListener("load", u), a.addEventListener("error", u);
933
1165
  }
934
1166
  const i = (u) => {
935
1167
  const c = u.type === "load" ? "ready" : "error";
936
- r(c), qe.set(e, c);
1168
+ r(c), Ke.set(e, c);
937
1169
  };
938
- return s.addEventListener("load", i), s.addEventListener("error", i), () => {
939
- s && (s.removeEventListener("load", i), s.removeEventListener("error", i)), s && (t != null && t.removeOnUnmount) && (s.remove(), qe.delete(e));
1170
+ return a.addEventListener("load", i), a.addEventListener("error", i), () => {
1171
+ a && (a.removeEventListener("load", i), a.removeEventListener("error", i)), a && (t != null && t.removeOnUnmount) && (a.remove(), Ke.delete(e));
940
1172
  };
941
1173
  }, [e, t == null ? void 0 : t.shouldPreventLoad, t == null ? void 0 : t.removeOnUnmount, t == null ? void 0 : t.id]), n;
942
1174
  }
943
- var yo = typeof window > "u";
944
- function Ra(e = {}) {
945
- const { autoLock: t = !0, lockTarget: n, widthReflow: r = !0 } = e, [o, a] = B(!1), s = H(null), i = H(null), u = () => {
946
- if (s.current) {
947
- const { overflow: f, paddingRight: p } = s.current.style;
948
- if (i.current = { overflow: f, paddingRight: p }, r) {
949
- const h = s.current === document.body ? window.innerWidth : s.current.offsetWidth, l = parseInt(window.getComputedStyle(s.current).paddingRight, 10) || 0, g = h - s.current.scrollWidth;
950
- s.current.style.paddingRight = `${g + l}px`;
1175
+ var Zo = typeof window > "u";
1176
+ function si(e = {}) {
1177
+ const { autoLock: t = !0, lockTarget: n, widthReflow: r = !0 } = e, [o, s] = P(!1), a = z(null), i = z(null), u = () => {
1178
+ if (a.current) {
1179
+ const { overflow: d, paddingRight: h } = a.current.style;
1180
+ if (i.current = { overflow: d, paddingRight: h }, r) {
1181
+ const p = a.current === document.body ? window.innerWidth : a.current.offsetWidth, l = parseInt(window.getComputedStyle(a.current).paddingRight, 10) || 0, g = p - a.current.scrollWidth;
1182
+ a.current.style.paddingRight = `${g + l}px`;
951
1183
  }
952
- s.current.style.overflow = "hidden", a(!0);
1184
+ a.current.style.overflow = "hidden", s(!0);
953
1185
  }
954
1186
  }, c = () => {
955
- s.current && i.current && (s.current.style.overflow = i.current.overflow, r && (s.current.style.paddingRight = i.current.paddingRight)), a(!1);
1187
+ a.current && i.current && (a.current.style.overflow = i.current.overflow, r && (a.current.style.paddingRight = i.current.paddingRight)), s(!1);
956
1188
  };
957
- return ne(() => {
958
- if (!yo)
959
- return n && (s.current = typeof n == "string" ? document.querySelector(n) : n), s.current || (s.current = document.body), t && u(), () => {
1189
+ return re(() => {
1190
+ if (!Zo)
1191
+ return n && (a.current = typeof n == "string" ? document.querySelector(n) : n), a.current || (a.current = document.body), t && u(), () => {
960
1192
  c();
961
1193
  };
962
1194
  }, [t, n, r]), { isLocked: o, lock: u, unlock: c };
963
1195
  }
964
- var gt = typeof window > "u";
965
- function Ta(e, t, n = {}) {
966
- const { initializeWithValue: r = !0 } = n, o = O(
967
- (h) => n.serializer ? n.serializer(h) : JSON.stringify(h),
1196
+ var St = typeof window > "u";
1197
+ function ai(e, t, n = {}) {
1198
+ const { initializeWithValue: r = !0 } = n, o = R(
1199
+ (p) => n.serializer ? n.serializer(p) : JSON.stringify(p),
968
1200
  [n]
969
- ), a = O(
970
- (h) => {
1201
+ ), s = R(
1202
+ (p) => {
971
1203
  if (n.deserializer)
972
- return n.deserializer(h);
973
- if (h === "undefined")
1204
+ return n.deserializer(p);
1205
+ if (p === "undefined")
974
1206
  return;
975
1207
  const l = t instanceof Function ? t() : t;
976
1208
  let g;
977
1209
  try {
978
- g = JSON.parse(h);
1210
+ g = JSON.parse(p);
979
1211
  } catch (m) {
980
1212
  return console.error("Error parsing JSON:", m), l;
981
1213
  }
982
1214
  return g;
983
1215
  },
984
1216
  [n, t]
985
- ), s = O(() => {
986
- const h = t instanceof Function ? t() : t;
987
- if (gt)
988
- return h;
1217
+ ), a = R(() => {
1218
+ const p = t instanceof Function ? t() : t;
1219
+ if (St)
1220
+ return p;
989
1221
  try {
990
1222
  const l = window.sessionStorage.getItem(e);
991
- return l ? a(l) : h;
1223
+ return l ? s(l) : p;
992
1224
  } catch (l) {
993
- return console.warn(`Error reading sessionStorage key “${e}”:`, l), h;
1225
+ return console.warn(`Error reading sessionStorage key “${e}”:`, l), p;
994
1226
  }
995
- }, [t, e, a]), [i, u] = B(() => r ? s() : t instanceof Function ? t() : t), c = Ye((h) => {
996
- gt && console.warn(
1227
+ }, [t, e, s]), [i, u] = P(() => r ? a() : t instanceof Function ? t() : t), c = et((p) => {
1228
+ St && console.warn(
997
1229
  `Tried setting sessionStorage key “${e}” even though environment is not a client`
998
1230
  );
999
1231
  try {
1000
- const l = h instanceof Function ? h(s()) : h;
1232
+ const l = p instanceof Function ? p(a()) : p;
1001
1233
  window.sessionStorage.setItem(e, o(l)), u(l), window.dispatchEvent(new StorageEvent("session-storage", { key: e }));
1002
1234
  } catch (l) {
1003
1235
  console.warn(`Error setting sessionStorage key “${e}”:`, l);
1004
1236
  }
1005
- }), f = Ye(() => {
1006
- gt && console.warn(
1237
+ }), d = et(() => {
1238
+ St && console.warn(
1007
1239
  `Tried removing sessionStorage key “${e}” even though environment is not a client`
1008
1240
  );
1009
- const h = t instanceof Function ? t() : t;
1010
- window.sessionStorage.removeItem(e), u(h), window.dispatchEvent(new StorageEvent("session-storage", { key: e }));
1241
+ const p = t instanceof Function ? t() : t;
1242
+ window.sessionStorage.removeItem(e), u(p), window.dispatchEvent(new StorageEvent("session-storage", { key: e }));
1011
1243
  });
1012
- z(() => {
1013
- u(s());
1244
+ H(() => {
1245
+ u(a());
1014
1246
  }, [e]);
1015
- const p = O(
1016
- (h) => {
1017
- h.key && h.key !== e || u(s());
1247
+ const h = R(
1248
+ (p) => {
1249
+ p.key && p.key !== e || u(a());
1018
1250
  },
1019
- [e, s]
1251
+ [e, a]
1020
1252
  );
1021
- return Y("storage", p), Y("session-storage", p), [i, c, f];
1253
+ return G("storage", h), G("session-storage", h), [i, c, d];
1022
1254
  }
1023
- function Oa(e) {
1024
- const [t, n] = B(1), r = t + 1 <= e, o = t - 1 > 0, a = O(
1255
+ function ii(e) {
1256
+ const [t, n] = P(1), r = t + 1 <= e, o = t - 1 > 0, s = R(
1025
1257
  (c) => {
1026
- const f = c instanceof Function ? c(t) : c;
1027
- if (f >= 1 && f <= e) {
1028
- n(f);
1258
+ const d = c instanceof Function ? c(t) : c;
1259
+ if (d >= 1 && d <= e) {
1260
+ n(d);
1029
1261
  return;
1030
1262
  }
1031
1263
  throw new Error("Step not valid");
1032
1264
  },
1033
1265
  [e, t]
1034
- ), s = O(() => {
1266
+ ), a = R(() => {
1035
1267
  r && n((c) => c + 1);
1036
- }, [r]), i = O(() => {
1268
+ }, [r]), i = R(() => {
1037
1269
  o && n((c) => c - 1);
1038
- }, [o]), u = O(() => {
1270
+ }, [o]), u = R(() => {
1039
1271
  n(1);
1040
1272
  }, []);
1041
1273
  return [
1042
1274
  t,
1043
1275
  {
1044
- goToNextStep: s,
1276
+ goToNextStep: a,
1045
1277
  goToPrevStep: i,
1046
1278
  canGoToNextStep: r,
1047
1279
  canGoToPrevStep: o,
1048
- setStep: a,
1280
+ setStep: s,
1049
1281
  reset: u
1050
1282
  }
1051
1283
  ];
1052
1284
  }
1053
- var bo = "(prefers-color-scheme: dark)", vo = "usehooks-ts-ternary-dark-mode";
1054
- function ka({
1285
+ var es = "(prefers-color-scheme: dark)", ts = "usehooks-ts-ternary-dark-mode";
1286
+ function li({
1055
1287
  defaultValue: e = "system",
1056
- localStorageKey: t = vo,
1288
+ localStorageKey: t = ts,
1057
1289
  initializeWithValue: n = !0
1058
1290
  } = {}) {
1059
- const r = vn(bo, { initializeWithValue: n }), [o, a] = bn(t, e, {
1291
+ const r = Cn(es, { initializeWithValue: n }), [o, s] = An(t, e, {
1060
1292
  initializeWithValue: n
1061
1293
  });
1062
1294
  return {
1063
1295
  isDarkMode: o === "dark" || o === "system" && r,
1064
1296
  ternaryDarkMode: o,
1065
- setTernaryDarkMode: a,
1297
+ setTernaryDarkMode: s,
1066
1298
  toggleTernaryDarkMode: () => {
1067
1299
  const u = ["light", "system", "dark"];
1068
- a((c) => {
1069
- const f = (u.indexOf(c) + 1) % u.length;
1070
- return u[f];
1300
+ s((c) => {
1301
+ const d = (u.indexOf(c) + 1) % u.length;
1302
+ return u[d];
1071
1303
  });
1072
1304
  }
1073
1305
  };
1074
1306
  }
1075
- function Ca(e, t) {
1076
- const n = H(e);
1077
- ne(() => {
1307
+ function ci(e, t) {
1308
+ const n = z(e);
1309
+ re(() => {
1078
1310
  n.current = e;
1079
- }, [e]), z(() => {
1311
+ }, [e]), H(() => {
1080
1312
  if (!t && t !== 0)
1081
1313
  return;
1082
1314
  const r = setTimeout(() => {
@@ -1087,78 +1319,78 @@ function Ca(e, t) {
1087
1319
  };
1088
1320
  }, [t]);
1089
1321
  }
1090
- function Aa(e) {
1091
- const [t, n] = B(!!e), r = O(() => {
1322
+ function ui(e) {
1323
+ const [t, n] = P(!!e), r = R(() => {
1092
1324
  n((o) => !o);
1093
1325
  }, []);
1094
1326
  return [t, r, n];
1095
1327
  }
1096
- var So = typeof window > "u";
1097
- function Na(e = {}) {
1328
+ var ns = typeof window > "u";
1329
+ function di(e = {}) {
1098
1330
  let { initializeWithValue: t = !0 } = e;
1099
- So && (t = !1);
1100
- const [n, r] = B(() => t ? {
1331
+ ns && (t = !1);
1332
+ const [n, r] = P(() => t ? {
1101
1333
  width: window.innerWidth,
1102
1334
  height: window.innerHeight
1103
1335
  } : {
1104
1336
  width: void 0,
1105
1337
  height: void 0
1106
- }), o = Lt(
1338
+ }), o = Ut(
1107
1339
  r,
1108
1340
  e.debounceDelay
1109
1341
  );
1110
- function a() {
1342
+ function s() {
1111
1343
  (e.debounceDelay ? o : r)({
1112
1344
  width: window.innerWidth,
1113
1345
  height: window.innerHeight
1114
1346
  });
1115
1347
  }
1116
- return Y("resize", a), ne(() => {
1117
- a();
1348
+ return G("resize", s), re(() => {
1349
+ s();
1118
1350
  }, []), n;
1119
1351
  }
1120
- function xn(e, t) {
1352
+ function Ln(e, t) {
1121
1353
  return function() {
1122
1354
  return e.apply(t, arguments);
1123
1355
  };
1124
1356
  }
1125
- const { toString: xo } = Object.prototype, { getPrototypeOf: _t } = Object, Qe = /* @__PURE__ */ ((e) => (t) => {
1126
- const n = xo.call(t);
1357
+ const { toString: rs } = Object.prototype, { getPrototypeOf: jt } = Object, ot = /* @__PURE__ */ ((e) => (t) => {
1358
+ const n = rs.call(t);
1127
1359
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
1128
- })(/* @__PURE__ */ Object.create(null)), re = (e) => (e = e.toLowerCase(), (t) => Qe(t) === e), Ze = (e) => (t) => typeof t === e, { isArray: Ee } = Array, Le = Ze("undefined");
1129
- function Eo(e) {
1130
- return e !== null && !Le(e) && e.constructor !== null && !Le(e.constructor) && K(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1360
+ })(/* @__PURE__ */ Object.create(null)), oe = (e) => (e = e.toLowerCase(), (t) => ot(t) === e), st = (e) => (t) => typeof t === e, { isArray: Oe } = Array, Pe = st("undefined");
1361
+ function os(e) {
1362
+ return e !== null && !Pe(e) && e.constructor !== null && !Pe(e.constructor) && J(e.constructor.isBuffer) && e.constructor.isBuffer(e);
1131
1363
  }
1132
- const En = re("ArrayBuffer");
1133
- function Ro(e) {
1364
+ const Dn = oe("ArrayBuffer");
1365
+ function ss(e) {
1134
1366
  let t;
1135
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && En(e.buffer), t;
1367
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Dn(e.buffer), t;
1136
1368
  }
1137
- const To = Ze("string"), K = Ze("function"), Rn = Ze("number"), et = (e) => e !== null && typeof e == "object", Oo = (e) => e === !0 || e === !1, Je = (e) => {
1138
- if (Qe(e) !== "object")
1369
+ const as = st("string"), J = st("function"), Mn = st("number"), at = (e) => e !== null && typeof e == "object", is = (e) => e === !0 || e === !1, Ge = (e) => {
1370
+ if (ot(e) !== "object")
1139
1371
  return !1;
1140
- const t = _t(e);
1372
+ const t = jt(e);
1141
1373
  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
1142
- }, ko = re("Date"), Co = re("File"), Ao = re("Blob"), No = re("FileList"), Lo = (e) => et(e) && K(e.pipe), _o = (e) => {
1374
+ }, ls = oe("Date"), cs = oe("File"), us = oe("Blob"), ds = oe("FileList"), fs = (e) => at(e) && J(e.pipe), ps = (e) => {
1143
1375
  let t;
1144
- return e && (typeof FormData == "function" && e instanceof FormData || K(e.append) && ((t = Qe(e)) === "formdata" || // detect form-data instance
1145
- t === "object" && K(e.toString) && e.toString() === "[object FormData]"));
1146
- }, Mo = re("URLSearchParams"), [Po, Io, Bo, Do] = ["ReadableStream", "Request", "Response", "Headers"].map(re), Fo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1147
- function _e(e, t, { allOwnKeys: n = !1 } = {}) {
1376
+ return e && (typeof FormData == "function" && e instanceof FormData || J(e.append) && ((t = ot(e)) === "formdata" || // detect form-data instance
1377
+ t === "object" && J(e.toString) && e.toString() === "[object FormData]"));
1378
+ }, hs = oe("URLSearchParams"), [ms, gs, ws, ys] = ["ReadableStream", "Request", "Response", "Headers"].map(oe), bs = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
1379
+ function Be(e, t, { allOwnKeys: n = !1 } = {}) {
1148
1380
  if (e === null || typeof e > "u")
1149
1381
  return;
1150
1382
  let r, o;
1151
- if (typeof e != "object" && (e = [e]), Ee(e))
1383
+ if (typeof e != "object" && (e = [e]), Oe(e))
1152
1384
  for (r = 0, o = e.length; r < o; r++)
1153
1385
  t.call(null, e[r], r, e);
1154
1386
  else {
1155
- const a = n ? Object.getOwnPropertyNames(e) : Object.keys(e), s = a.length;
1387
+ const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = s.length;
1156
1388
  let i;
1157
- for (r = 0; r < s; r++)
1158
- i = a[r], t.call(null, e[i], i, e);
1389
+ for (r = 0; r < a; r++)
1390
+ i = s[r], t.call(null, e[i], i, e);
1159
1391
  }
1160
1392
  }
1161
- function Tn(e, t) {
1393
+ function In(e, t) {
1162
1394
  t = t.toLowerCase();
1163
1395
  const n = Object.keys(e);
1164
1396
  let r = n.length, o;
@@ -1167,75 +1399,75 @@ function Tn(e, t) {
1167
1399
  return o;
1168
1400
  return null;
1169
1401
  }
1170
- const pe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, On = (e) => !Le(e) && e !== pe;
1171
- function Et() {
1172
- const { caseless: e } = On(this) && this || {}, t = {}, n = (r, o) => {
1173
- const a = e && Tn(t, o) || o;
1174
- Je(t[a]) && Je(r) ? t[a] = Et(t[a], r) : Je(r) ? t[a] = Et({}, r) : Ee(r) ? t[a] = r.slice() : t[a] = r;
1402
+ const we = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Pn = (e) => !Pe(e) && e !== we;
1403
+ function Ct() {
1404
+ const { caseless: e } = Pn(this) && this || {}, t = {}, n = (r, o) => {
1405
+ const s = e && In(t, o) || o;
1406
+ Ge(t[s]) && Ge(r) ? t[s] = Ct(t[s], r) : Ge(r) ? t[s] = Ct({}, r) : Oe(r) ? t[s] = r.slice() : t[s] = r;
1175
1407
  };
1176
1408
  for (let r = 0, o = arguments.length; r < o; r++)
1177
- arguments[r] && _e(arguments[r], n);
1409
+ arguments[r] && Be(arguments[r], n);
1178
1410
  return t;
1179
1411
  }
1180
- const Uo = (e, t, n, { allOwnKeys: r } = {}) => (_e(t, (o, a) => {
1181
- n && K(o) ? e[a] = xn(o, n) : e[a] = o;
1182
- }, { allOwnKeys: r }), e), jo = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zo = (e, t, n, r) => {
1412
+ const vs = (e, t, n, { allOwnKeys: r } = {}) => (Be(t, (o, s) => {
1413
+ n && J(o) ? e[s] = Ln(o, n) : e[s] = o;
1414
+ }, { allOwnKeys: r }), e), Es = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ss = (e, t, n, r) => {
1183
1415
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
1184
1416
  value: t.prototype
1185
1417
  }), n && Object.assign(e.prototype, n);
1186
- }, Ho = (e, t, n, r) => {
1187
- let o, a, s;
1418
+ }, xs = (e, t, n, r) => {
1419
+ let o, s, a;
1188
1420
  const i = {};
1189
1421
  if (t = t || {}, e == null) return t;
1190
1422
  do {
1191
- for (o = Object.getOwnPropertyNames(e), a = o.length; a-- > 0; )
1192
- s = o[a], (!r || r(s, e, t)) && !i[s] && (t[s] = e[s], i[s] = !0);
1193
- e = n !== !1 && _t(e);
1423
+ for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
1424
+ a = o[s], (!r || r(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
1425
+ e = n !== !1 && jt(e);
1194
1426
  } while (e && (!n || n(e, t)) && e !== Object.prototype);
1195
1427
  return t;
1196
- }, qo = (e, t, n) => {
1428
+ }, Ts = (e, t, n) => {
1197
1429
  e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
1198
1430
  const r = e.indexOf(t, n);
1199
1431
  return r !== -1 && r === n;
1200
- }, $o = (e) => {
1432
+ }, _s = (e) => {
1201
1433
  if (!e) return null;
1202
- if (Ee(e)) return e;
1434
+ if (Oe(e)) return e;
1203
1435
  let t = e.length;
1204
- if (!Rn(t)) return null;
1436
+ if (!Mn(t)) return null;
1205
1437
  const n = new Array(t);
1206
1438
  for (; t-- > 0; )
1207
1439
  n[t] = e[t];
1208
1440
  return n;
1209
- }, Wo = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _t(Uint8Array)), Jo = (e, t) => {
1441
+ }, Rs = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && jt(Uint8Array)), Os = (e, t) => {
1210
1442
  const r = (e && e[Symbol.iterator]).call(e);
1211
1443
  let o;
1212
1444
  for (; (o = r.next()) && !o.done; ) {
1213
- const a = o.value;
1214
- t.call(e, a[0], a[1]);
1445
+ const s = o.value;
1446
+ t.call(e, s[0], s[1]);
1215
1447
  }
1216
- }, Vo = (e, t) => {
1448
+ }, Ns = (e, t) => {
1217
1449
  let n;
1218
1450
  const r = [];
1219
1451
  for (; (n = e.exec(t)) !== null; )
1220
1452
  r.push(n);
1221
1453
  return r;
1222
- }, Ko = re("HTMLFormElement"), Yo = (e) => e.toLowerCase().replace(
1454
+ }, As = oe("HTMLFormElement"), Cs = (e) => e.toLowerCase().replace(
1223
1455
  /[-_\s]([a-z\d])(\w*)/g,
1224
1456
  function(n, r, o) {
1225
1457
  return r.toUpperCase() + o;
1226
1458
  }
1227
- ), Qt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Xo = re("RegExp"), kn = (e, t) => {
1459
+ ), cn = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ks = oe("RegExp"), Bn = (e, t) => {
1228
1460
  const n = Object.getOwnPropertyDescriptors(e), r = {};
1229
- _e(n, (o, a) => {
1230
- let s;
1231
- (s = t(o, a, e)) !== !1 && (r[a] = s || o);
1461
+ Be(n, (o, s) => {
1462
+ let a;
1463
+ (a = t(o, s, e)) !== !1 && (r[s] = a || o);
1232
1464
  }), Object.defineProperties(e, r);
1233
- }, Go = (e) => {
1234
- kn(e, (t, n) => {
1235
- if (K(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1465
+ }, Ls = (e) => {
1466
+ Bn(e, (t, n) => {
1467
+ if (J(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1236
1468
  return !1;
1237
1469
  const r = e[n];
1238
- if (K(r)) {
1470
+ if (J(r)) {
1239
1471
  if (t.enumerable = !1, "writable" in t) {
1240
1472
  t.writable = !1;
1241
1473
  return;
@@ -1245,104 +1477,104 @@ const Uo = (e, t, n, { allOwnKeys: r } = {}) => (_e(t, (o, a) => {
1245
1477
  });
1246
1478
  }
1247
1479
  });
1248
- }, Qo = (e, t) => {
1480
+ }, Ds = (e, t) => {
1249
1481
  const n = {}, r = (o) => {
1250
- o.forEach((a) => {
1251
- n[a] = !0;
1482
+ o.forEach((s) => {
1483
+ n[s] = !0;
1252
1484
  });
1253
1485
  };
1254
- return Ee(e) ? r(e) : r(String(e).split(t)), n;
1255
- }, Zo = () => {
1256
- }, es = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1257
- function ts(e) {
1258
- return !!(e && K(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
1486
+ return Oe(e) ? r(e) : r(String(e).split(t)), n;
1487
+ }, Ms = () => {
1488
+ }, Is = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
1489
+ function Ps(e) {
1490
+ return !!(e && J(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
1259
1491
  }
1260
- const ns = (e) => {
1492
+ const Bs = (e) => {
1261
1493
  const t = new Array(10), n = (r, o) => {
1262
- if (et(r)) {
1494
+ if (at(r)) {
1263
1495
  if (t.indexOf(r) >= 0)
1264
1496
  return;
1265
1497
  if (!("toJSON" in r)) {
1266
1498
  t[o] = r;
1267
- const a = Ee(r) ? [] : {};
1268
- return _e(r, (s, i) => {
1269
- const u = n(s, o + 1);
1270
- !Le(u) && (a[i] = u);
1271
- }), t[o] = void 0, a;
1499
+ const s = Oe(r) ? [] : {};
1500
+ return Be(r, (a, i) => {
1501
+ const u = n(a, o + 1);
1502
+ !Pe(u) && (s[i] = u);
1503
+ }), t[o] = void 0, s;
1272
1504
  }
1273
1505
  }
1274
1506
  return r;
1275
1507
  };
1276
1508
  return n(e, 0);
1277
- }, rs = re("AsyncFunction"), os = (e) => e && (et(e) || K(e)) && K(e.then) && K(e.catch), Cn = ((e, t) => e ? setImmediate : t ? ((n, r) => (pe.addEventListener("message", ({ source: o, data: a }) => {
1278
- o === pe && a === n && r.length && r.shift()();
1509
+ }, Fs = oe("AsyncFunction"), Us = (e) => e && (at(e) || J(e)) && J(e.then) && J(e.catch), Fn = ((e, t) => e ? setImmediate : t ? ((n, r) => (we.addEventListener("message", ({ source: o, data: s }) => {
1510
+ o === we && s === n && r.length && r.shift()();
1279
1511
  }, !1), (o) => {
1280
- r.push(o), pe.postMessage(n, "*");
1512
+ r.push(o), we.postMessage(n, "*");
1281
1513
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1282
1514
  typeof setImmediate == "function",
1283
- K(pe.postMessage)
1284
- ), ss = typeof queueMicrotask < "u" ? queueMicrotask.bind(pe) : typeof process < "u" && process.nextTick || Cn, d = {
1285
- isArray: Ee,
1286
- isArrayBuffer: En,
1287
- isBuffer: Eo,
1288
- isFormData: _o,
1289
- isArrayBufferView: Ro,
1290
- isString: To,
1291
- isNumber: Rn,
1292
- isBoolean: Oo,
1293
- isObject: et,
1294
- isPlainObject: Je,
1295
- isReadableStream: Po,
1296
- isRequest: Io,
1297
- isResponse: Bo,
1298
- isHeaders: Do,
1299
- isUndefined: Le,
1300
- isDate: ko,
1301
- isFile: Co,
1302
- isBlob: Ao,
1303
- isRegExp: Xo,
1304
- isFunction: K,
1305
- isStream: Lo,
1306
- isURLSearchParams: Mo,
1307
- isTypedArray: Wo,
1308
- isFileList: No,
1309
- forEach: _e,
1310
- merge: Et,
1311
- extend: Uo,
1312
- trim: Fo,
1313
- stripBOM: jo,
1314
- inherits: zo,
1315
- toFlatObject: Ho,
1316
- kindOf: Qe,
1317
- kindOfTest: re,
1318
- endsWith: qo,
1319
- toArray: $o,
1320
- forEachEntry: Jo,
1321
- matchAll: Vo,
1322
- isHTMLForm: Ko,
1323
- hasOwnProperty: Qt,
1324
- hasOwnProp: Qt,
1515
+ J(we.postMessage)
1516
+ ), js = typeof queueMicrotask < "u" ? queueMicrotask.bind(we) : typeof process < "u" && process.nextTick || Fn, f = {
1517
+ isArray: Oe,
1518
+ isArrayBuffer: Dn,
1519
+ isBuffer: os,
1520
+ isFormData: ps,
1521
+ isArrayBufferView: ss,
1522
+ isString: as,
1523
+ isNumber: Mn,
1524
+ isBoolean: is,
1525
+ isObject: at,
1526
+ isPlainObject: Ge,
1527
+ isReadableStream: ms,
1528
+ isRequest: gs,
1529
+ isResponse: ws,
1530
+ isHeaders: ys,
1531
+ isUndefined: Pe,
1532
+ isDate: ls,
1533
+ isFile: cs,
1534
+ isBlob: us,
1535
+ isRegExp: ks,
1536
+ isFunction: J,
1537
+ isStream: fs,
1538
+ isURLSearchParams: hs,
1539
+ isTypedArray: Rs,
1540
+ isFileList: ds,
1541
+ forEach: Be,
1542
+ merge: Ct,
1543
+ extend: vs,
1544
+ trim: bs,
1545
+ stripBOM: Es,
1546
+ inherits: Ss,
1547
+ toFlatObject: xs,
1548
+ kindOf: ot,
1549
+ kindOfTest: oe,
1550
+ endsWith: Ts,
1551
+ toArray: _s,
1552
+ forEachEntry: Os,
1553
+ matchAll: Ns,
1554
+ isHTMLForm: As,
1555
+ hasOwnProperty: cn,
1556
+ hasOwnProp: cn,
1325
1557
  // an alias to avoid ESLint no-prototype-builtins detection
1326
- reduceDescriptors: kn,
1327
- freezeMethods: Go,
1328
- toObjectSet: Qo,
1329
- toCamelCase: Yo,
1330
- noop: Zo,
1331
- toFiniteNumber: es,
1332
- findKey: Tn,
1333
- global: pe,
1334
- isContextDefined: On,
1335
- isSpecCompliantForm: ts,
1336
- toJSONObject: ns,
1337
- isAsyncFn: rs,
1338
- isThenable: os,
1339
- setImmediate: Cn,
1340
- asap: ss
1558
+ reduceDescriptors: Bn,
1559
+ freezeMethods: Ls,
1560
+ toObjectSet: Ds,
1561
+ toCamelCase: Cs,
1562
+ noop: Ms,
1563
+ toFiniteNumber: Is,
1564
+ findKey: In,
1565
+ global: we,
1566
+ isContextDefined: Pn,
1567
+ isSpecCompliantForm: Ps,
1568
+ toJSONObject: Bs,
1569
+ isAsyncFn: Fs,
1570
+ isThenable: Us,
1571
+ setImmediate: Fn,
1572
+ asap: js
1341
1573
  };
1342
1574
  function v(e, t, n, r, o) {
1343
1575
  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
1344
1576
  }
1345
- d.inherits(v, Error, {
1577
+ f.inherits(v, Error, {
1346
1578
  toJSON: function() {
1347
1579
  return {
1348
1580
  // Standard
@@ -1357,13 +1589,13 @@ d.inherits(v, Error, {
1357
1589
  columnNumber: this.columnNumber,
1358
1590
  stack: this.stack,
1359
1591
  // Axios
1360
- config: d.toJSONObject(this.config),
1592
+ config: f.toJSONObject(this.config),
1361
1593
  code: this.code,
1362
1594
  status: this.status
1363
1595
  };
1364
1596
  }
1365
1597
  });
1366
- const An = v.prototype, Nn = {};
1598
+ const Un = v.prototype, jn = {};
1367
1599
  [
1368
1600
  "ERR_BAD_OPTION_VALUE",
1369
1601
  "ERR_BAD_OPTION",
@@ -1379,96 +1611,96 @@ const An = v.prototype, Nn = {};
1379
1611
  "ERR_INVALID_URL"
1380
1612
  // eslint-disable-next-line func-names
1381
1613
  ].forEach((e) => {
1382
- Nn[e] = { value: e };
1614
+ jn[e] = { value: e };
1383
1615
  });
1384
- Object.defineProperties(v, Nn);
1385
- Object.defineProperty(An, "isAxiosError", { value: !0 });
1386
- v.from = (e, t, n, r, o, a) => {
1387
- const s = Object.create(An);
1388
- return d.toFlatObject(e, s, function(u) {
1616
+ Object.defineProperties(v, jn);
1617
+ Object.defineProperty(Un, "isAxiosError", { value: !0 });
1618
+ v.from = (e, t, n, r, o, s) => {
1619
+ const a = Object.create(Un);
1620
+ return f.toFlatObject(e, a, function(u) {
1389
1621
  return u !== Error.prototype;
1390
- }, (i) => i !== "isAxiosError"), v.call(s, e.message, t, n, r, o), s.cause = e, s.name = e.name, a && Object.assign(s, a), s;
1622
+ }, (i) => i !== "isAxiosError"), v.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
1391
1623
  };
1392
- const as = null;
1393
- function Rt(e) {
1394
- return d.isPlainObject(e) || d.isArray(e);
1624
+ const $s = null;
1625
+ function kt(e) {
1626
+ return f.isPlainObject(e) || f.isArray(e);
1395
1627
  }
1396
- function Ln(e) {
1397
- return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
1628
+ function $n(e) {
1629
+ return f.endsWith(e, "[]") ? e.slice(0, -2) : e;
1398
1630
  }
1399
- function Zt(e, t, n) {
1400
- return e ? e.concat(t).map(function(o, a) {
1401
- return o = Ln(o), !n && a ? "[" + o + "]" : o;
1631
+ function un(e, t, n) {
1632
+ return e ? e.concat(t).map(function(o, s) {
1633
+ return o = $n(o), !n && s ? "[" + o + "]" : o;
1402
1634
  }).join(n ? "." : "") : t;
1403
1635
  }
1404
- function is(e) {
1405
- return d.isArray(e) && !e.some(Rt);
1636
+ function Hs(e) {
1637
+ return f.isArray(e) && !e.some(kt);
1406
1638
  }
1407
- const ls = d.toFlatObject(d, {}, null, function(t) {
1639
+ const zs = f.toFlatObject(f, {}, null, function(t) {
1408
1640
  return /^is[A-Z]/.test(t);
1409
1641
  });
1410
- function tt(e, t, n) {
1411
- if (!d.isObject(e))
1642
+ function it(e, t, n) {
1643
+ if (!f.isObject(e))
1412
1644
  throw new TypeError("target must be an object");
1413
- t = t || new FormData(), n = d.toFlatObject(n, {
1645
+ t = t || new FormData(), n = f.toFlatObject(n, {
1414
1646
  metaTokens: !0,
1415
1647
  dots: !1,
1416
1648
  indexes: !1
1417
1649
  }, !1, function(m, y) {
1418
- return !d.isUndefined(y[m]);
1650
+ return !f.isUndefined(y[m]);
1419
1651
  });
1420
- const r = n.metaTokens, o = n.visitor || f, a = n.dots, s = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && d.isSpecCompliantForm(t);
1421
- if (!d.isFunction(o))
1652
+ const r = n.metaTokens, o = n.visitor || d, s = n.dots, a = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && f.isSpecCompliantForm(t);
1653
+ if (!f.isFunction(o))
1422
1654
  throw new TypeError("visitor must be a function");
1423
1655
  function c(g) {
1424
1656
  if (g === null) return "";
1425
- if (d.isDate(g))
1657
+ if (f.isDate(g))
1426
1658
  return g.toISOString();
1427
- if (!u && d.isBlob(g))
1659
+ if (!u && f.isBlob(g))
1428
1660
  throw new v("Blob is not supported. Use a Buffer instead.");
1429
- return d.isArrayBuffer(g) || d.isTypedArray(g) ? u && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
1661
+ return f.isArrayBuffer(g) || f.isTypedArray(g) ? u && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g;
1430
1662
  }
1431
- function f(g, m, y) {
1432
- let R = g;
1663
+ function d(g, m, y) {
1664
+ let T = g;
1433
1665
  if (g && !y && typeof g == "object") {
1434
- if (d.endsWith(m, "{}"))
1666
+ if (f.endsWith(m, "{}"))
1435
1667
  m = r ? m : m.slice(0, -2), g = JSON.stringify(g);
1436
- else if (d.isArray(g) && is(g) || (d.isFileList(g) || d.endsWith(m, "[]")) && (R = d.toArray(g)))
1437
- return m = Ln(m), R.forEach(function(T, F) {
1438
- !(d.isUndefined(T) || T === null) && t.append(
1668
+ else if (f.isArray(g) && Hs(g) || (f.isFileList(g) || f.endsWith(m, "[]")) && (T = f.toArray(g)))
1669
+ return m = $n(m), T.forEach(function(_, U) {
1670
+ !(f.isUndefined(_) || _ === null) && t.append(
1439
1671
  // eslint-disable-next-line no-nested-ternary
1440
- s === !0 ? Zt([m], F, a) : s === null ? m : m + "[]",
1441
- c(T)
1672
+ a === !0 ? un([m], U, s) : a === null ? m : m + "[]",
1673
+ c(_)
1442
1674
  );
1443
1675
  }), !1;
1444
1676
  }
1445
- return Rt(g) ? !0 : (t.append(Zt(y, m, a), c(g)), !1);
1677
+ return kt(g) ? !0 : (t.append(un(y, m, s), c(g)), !1);
1446
1678
  }
1447
- const p = [], h = Object.assign(ls, {
1448
- defaultVisitor: f,
1679
+ const h = [], p = Object.assign(zs, {
1680
+ defaultVisitor: d,
1449
1681
  convertValue: c,
1450
- isVisitable: Rt
1682
+ isVisitable: kt
1451
1683
  });
1452
1684
  function l(g, m) {
1453
- if (!d.isUndefined(g)) {
1454
- if (p.indexOf(g) !== -1)
1685
+ if (!f.isUndefined(g)) {
1686
+ if (h.indexOf(g) !== -1)
1455
1687
  throw Error("Circular reference detected in " + m.join("."));
1456
- p.push(g), d.forEach(g, function(R, x) {
1457
- (!(d.isUndefined(R) || R === null) && o.call(
1688
+ h.push(g), f.forEach(g, function(T, S) {
1689
+ (!(f.isUndefined(T) || T === null) && o.call(
1458
1690
  t,
1459
- R,
1460
- d.isString(x) ? x.trim() : x,
1691
+ T,
1692
+ f.isString(S) ? S.trim() : S,
1461
1693
  m,
1462
- h
1463
- )) === !0 && l(R, m ? m.concat(x) : [x]);
1464
- }), p.pop();
1694
+ p
1695
+ )) === !0 && l(T, m ? m.concat(S) : [S]);
1696
+ }), h.pop();
1465
1697
  }
1466
1698
  }
1467
- if (!d.isObject(e))
1699
+ if (!f.isObject(e))
1468
1700
  throw new TypeError("data must be an object");
1469
1701
  return l(e), t;
1470
1702
  }
1471
- function en(e) {
1703
+ function dn(e) {
1472
1704
  const t = {
1473
1705
  "!": "%21",
1474
1706
  "'": "%27",
@@ -1482,40 +1714,40 @@ function en(e) {
1482
1714
  return t[r];
1483
1715
  });
1484
1716
  }
1485
- function Mt(e, t) {
1486
- this._pairs = [], e && tt(e, this, t);
1717
+ function $t(e, t) {
1718
+ this._pairs = [], e && it(e, this, t);
1487
1719
  }
1488
- const _n = Mt.prototype;
1489
- _n.append = function(t, n) {
1720
+ const Hn = $t.prototype;
1721
+ Hn.append = function(t, n) {
1490
1722
  this._pairs.push([t, n]);
1491
1723
  };
1492
- _n.toString = function(t) {
1724
+ Hn.toString = function(t) {
1493
1725
  const n = t ? function(r) {
1494
- return t.call(this, r, en);
1495
- } : en;
1726
+ return t.call(this, r, dn);
1727
+ } : dn;
1496
1728
  return this._pairs.map(function(o) {
1497
1729
  return n(o[0]) + "=" + n(o[1]);
1498
1730
  }, "").join("&");
1499
1731
  };
1500
- function cs(e) {
1732
+ function Vs(e) {
1501
1733
  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1502
1734
  }
1503
- function Mn(e, t, n) {
1735
+ function zn(e, t, n) {
1504
1736
  if (!t)
1505
1737
  return e;
1506
- const r = n && n.encode || cs;
1507
- d.isFunction(n) && (n = {
1738
+ const r = n && n.encode || Vs;
1739
+ f.isFunction(n) && (n = {
1508
1740
  serialize: n
1509
1741
  });
1510
1742
  const o = n && n.serialize;
1511
- let a;
1512
- if (o ? a = o(t, n) : a = d.isURLSearchParams(t) ? t.toString() : new Mt(t, n).toString(r), a) {
1513
- const s = e.indexOf("#");
1514
- s !== -1 && (e = e.slice(0, s)), e += (e.indexOf("?") === -1 ? "?" : "&") + a;
1743
+ let s;
1744
+ if (o ? s = o(t, n) : s = f.isURLSearchParams(t) ? t.toString() : new $t(t, n).toString(r), s) {
1745
+ const a = e.indexOf("#");
1746
+ a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
1515
1747
  }
1516
1748
  return e;
1517
1749
  }
1518
- class tn {
1750
+ class fn {
1519
1751
  constructor() {
1520
1752
  this.handlers = [];
1521
1753
  }
@@ -1564,117 +1796,117 @@ class tn {
1564
1796
  * @returns {void}
1565
1797
  */
1566
1798
  forEach(t) {
1567
- d.forEach(this.handlers, function(r) {
1799
+ f.forEach(this.handlers, function(r) {
1568
1800
  r !== null && t(r);
1569
1801
  });
1570
1802
  }
1571
1803
  }
1572
- const Pn = {
1804
+ const Vn = {
1573
1805
  silentJSONParsing: !0,
1574
1806
  forcedJSONParsing: !0,
1575
1807
  clarifyTimeoutError: !1
1576
- }, us = typeof URLSearchParams < "u" ? URLSearchParams : Mt, ds = typeof FormData < "u" ? FormData : null, fs = typeof Blob < "u" ? Blob : null, hs = {
1808
+ }, qs = typeof URLSearchParams < "u" ? URLSearchParams : $t, Ws = typeof FormData < "u" ? FormData : null, Ks = typeof Blob < "u" ? Blob : null, Ys = {
1577
1809
  isBrowser: !0,
1578
1810
  classes: {
1579
- URLSearchParams: us,
1580
- FormData: ds,
1581
- Blob: fs
1811
+ URLSearchParams: qs,
1812
+ FormData: Ws,
1813
+ Blob: Ks
1582
1814
  },
1583
1815
  protocols: ["http", "https", "file", "blob", "url", "data"]
1584
- }, Pt = typeof window < "u" && typeof document < "u", Tt = typeof navigator == "object" && navigator || void 0, ps = Pt && (!Tt || ["ReactNative", "NativeScript", "NS"].indexOf(Tt.product) < 0), ms = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1585
- self instanceof WorkerGlobalScope && typeof self.importScripts == "function", gs = Pt && window.location.href || "http://localhost", ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1816
+ }, Ht = typeof window < "u" && typeof document < "u", Lt = typeof navigator == "object" && navigator || void 0, Js = Ht && (!Lt || ["ReactNative", "NativeScript", "NS"].indexOf(Lt.product) < 0), Gs = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
1817
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xs = Ht && window.location.href || "http://localhost", Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1586
1818
  __proto__: null,
1587
- hasBrowserEnv: Pt,
1588
- hasStandardBrowserEnv: ps,
1589
- hasStandardBrowserWebWorkerEnv: ms,
1590
- navigator: Tt,
1591
- origin: gs
1592
- }, Symbol.toStringTag, { value: "Module" })), j = {
1593
- ...ws,
1594
- ...hs
1819
+ hasBrowserEnv: Ht,
1820
+ hasStandardBrowserEnv: Js,
1821
+ hasStandardBrowserWebWorkerEnv: Gs,
1822
+ navigator: Lt,
1823
+ origin: Xs
1824
+ }, Symbol.toStringTag, { value: "Module" })), $ = {
1825
+ ...Qs,
1826
+ ...Ys
1595
1827
  };
1596
- function ys(e, t) {
1597
- return tt(e, new j.classes.URLSearchParams(), Object.assign({
1598
- visitor: function(n, r, o, a) {
1599
- return j.isNode && d.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
1828
+ function Zs(e, t) {
1829
+ return it(e, new $.classes.URLSearchParams(), Object.assign({
1830
+ visitor: function(n, r, o, s) {
1831
+ return $.isNode && f.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1600
1832
  }
1601
1833
  }, t));
1602
1834
  }
1603
- function bs(e) {
1604
- return d.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1835
+ function ea(e) {
1836
+ return f.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
1605
1837
  }
1606
- function vs(e) {
1838
+ function ta(e) {
1607
1839
  const t = {}, n = Object.keys(e);
1608
1840
  let r;
1609
1841
  const o = n.length;
1610
- let a;
1842
+ let s;
1611
1843
  for (r = 0; r < o; r++)
1612
- a = n[r], t[a] = e[a];
1844
+ s = n[r], t[s] = e[s];
1613
1845
  return t;
1614
1846
  }
1615
- function In(e) {
1616
- function t(n, r, o, a) {
1617
- let s = n[a++];
1618
- if (s === "__proto__") return !0;
1619
- const i = Number.isFinite(+s), u = a >= n.length;
1620
- return s = !s && d.isArray(o) ? o.length : s, u ? (d.hasOwnProp(o, s) ? o[s] = [o[s], r] : o[s] = r, !i) : ((!o[s] || !d.isObject(o[s])) && (o[s] = []), t(n, r, o[s], a) && d.isArray(o[s]) && (o[s] = vs(o[s])), !i);
1847
+ function qn(e) {
1848
+ function t(n, r, o, s) {
1849
+ let a = n[s++];
1850
+ if (a === "__proto__") return !0;
1851
+ const i = Number.isFinite(+a), u = s >= n.length;
1852
+ return a = !a && f.isArray(o) ? o.length : a, u ? (f.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !f.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && f.isArray(o[a]) && (o[a] = ta(o[a])), !i);
1621
1853
  }
1622
- if (d.isFormData(e) && d.isFunction(e.entries)) {
1854
+ if (f.isFormData(e) && f.isFunction(e.entries)) {
1623
1855
  const n = {};
1624
- return d.forEachEntry(e, (r, o) => {
1625
- t(bs(r), o, n, 0);
1856
+ return f.forEachEntry(e, (r, o) => {
1857
+ t(ea(r), o, n, 0);
1626
1858
  }), n;
1627
1859
  }
1628
1860
  return null;
1629
1861
  }
1630
- function Ss(e, t, n) {
1631
- if (d.isString(e))
1862
+ function na(e, t, n) {
1863
+ if (f.isString(e))
1632
1864
  try {
1633
- return (t || JSON.parse)(e), d.trim(e);
1865
+ return (t || JSON.parse)(e), f.trim(e);
1634
1866
  } catch (r) {
1635
1867
  if (r.name !== "SyntaxError")
1636
1868
  throw r;
1637
1869
  }
1638
1870
  return (n || JSON.stringify)(e);
1639
1871
  }
1640
- const Me = {
1641
- transitional: Pn,
1872
+ const Fe = {
1873
+ transitional: Vn,
1642
1874
  adapter: ["xhr", "http", "fetch"],
1643
1875
  transformRequest: [function(t, n) {
1644
- const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, a = d.isObject(t);
1645
- if (a && d.isHTMLForm(t) && (t = new FormData(t)), d.isFormData(t))
1646
- return o ? JSON.stringify(In(t)) : t;
1647
- if (d.isArrayBuffer(t) || d.isBuffer(t) || d.isStream(t) || d.isFile(t) || d.isBlob(t) || d.isReadableStream(t))
1876
+ const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = f.isObject(t);
1877
+ if (s && f.isHTMLForm(t) && (t = new FormData(t)), f.isFormData(t))
1878
+ return o ? JSON.stringify(qn(t)) : t;
1879
+ if (f.isArrayBuffer(t) || f.isBuffer(t) || f.isStream(t) || f.isFile(t) || f.isBlob(t) || f.isReadableStream(t))
1648
1880
  return t;
1649
- if (d.isArrayBufferView(t))
1881
+ if (f.isArrayBufferView(t))
1650
1882
  return t.buffer;
1651
- if (d.isURLSearchParams(t))
1883
+ if (f.isURLSearchParams(t))
1652
1884
  return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
1653
1885
  let i;
1654
- if (a) {
1886
+ if (s) {
1655
1887
  if (r.indexOf("application/x-www-form-urlencoded") > -1)
1656
- return ys(t, this.formSerializer).toString();
1657
- if ((i = d.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1888
+ return Zs(t, this.formSerializer).toString();
1889
+ if ((i = f.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
1658
1890
  const u = this.env && this.env.FormData;
1659
- return tt(
1891
+ return it(
1660
1892
  i ? { "files[]": t } : t,
1661
1893
  u && new u(),
1662
1894
  this.formSerializer
1663
1895
  );
1664
1896
  }
1665
1897
  }
1666
- return a || o ? (n.setContentType("application/json", !1), Ss(t)) : t;
1898
+ return s || o ? (n.setContentType("application/json", !1), na(t)) : t;
1667
1899
  }],
1668
1900
  transformResponse: [function(t) {
1669
- const n = this.transitional || Me.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1670
- if (d.isResponse(t) || d.isReadableStream(t))
1901
+ const n = this.transitional || Fe.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
1902
+ if (f.isResponse(t) || f.isReadableStream(t))
1671
1903
  return t;
1672
- if (t && d.isString(t) && (r && !this.responseType || o)) {
1673
- const s = !(n && n.silentJSONParsing) && o;
1904
+ if (t && f.isString(t) && (r && !this.responseType || o)) {
1905
+ const a = !(n && n.silentJSONParsing) && o;
1674
1906
  try {
1675
1907
  return JSON.parse(t);
1676
1908
  } catch (i) {
1677
- if (s)
1909
+ if (a)
1678
1910
  throw i.name === "SyntaxError" ? v.from(i, v.ERR_BAD_RESPONSE, this, null, this.response) : i;
1679
1911
  }
1680
1912
  }
@@ -1690,8 +1922,8 @@ const Me = {
1690
1922
  maxContentLength: -1,
1691
1923
  maxBodyLength: -1,
1692
1924
  env: {
1693
- FormData: j.classes.FormData,
1694
- Blob: j.classes.Blob
1925
+ FormData: $.classes.FormData,
1926
+ Blob: $.classes.Blob
1695
1927
  },
1696
1928
  validateStatus: function(t) {
1697
1929
  return t >= 200 && t < 300;
@@ -1703,10 +1935,10 @@ const Me = {
1703
1935
  }
1704
1936
  }
1705
1937
  };
1706
- d.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1707
- Me.headers[e] = {};
1938
+ f.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
1939
+ Fe.headers[e] = {};
1708
1940
  });
1709
- const xs = d.toObjectSet([
1941
+ const ra = f.toObjectSet([
1710
1942
  "age",
1711
1943
  "authorization",
1712
1944
  "content-length",
@@ -1724,131 +1956,131 @@ const xs = d.toObjectSet([
1724
1956
  "referer",
1725
1957
  "retry-after",
1726
1958
  "user-agent"
1727
- ]), Es = (e) => {
1959
+ ]), oa = (e) => {
1728
1960
  const t = {};
1729
1961
  let n, r, o;
1730
1962
  return e && e.split(`
1731
- `).forEach(function(s) {
1732
- o = s.indexOf(":"), n = s.substring(0, o).trim().toLowerCase(), r = s.substring(o + 1).trim(), !(!n || t[n] && xs[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
1963
+ `).forEach(function(a) {
1964
+ o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && ra[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
1733
1965
  }), t;
1734
- }, nn = Symbol("internals");
1735
- function Ne(e) {
1966
+ }, pn = Symbol("internals");
1967
+ function Ie(e) {
1736
1968
  return e && String(e).trim().toLowerCase();
1737
1969
  }
1738
- function Ve(e) {
1739
- return e === !1 || e == null ? e : d.isArray(e) ? e.map(Ve) : String(e);
1970
+ function Xe(e) {
1971
+ return e === !1 || e == null ? e : f.isArray(e) ? e.map(Xe) : String(e);
1740
1972
  }
1741
- function Rs(e) {
1973
+ function sa(e) {
1742
1974
  const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1743
1975
  let r;
1744
1976
  for (; r = n.exec(e); )
1745
1977
  t[r[1]] = r[2];
1746
1978
  return t;
1747
1979
  }
1748
- const Ts = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1749
- function wt(e, t, n, r, o) {
1750
- if (d.isFunction(r))
1980
+ const aa = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
1981
+ function xt(e, t, n, r, o) {
1982
+ if (f.isFunction(r))
1751
1983
  return r.call(this, t, n);
1752
- if (o && (t = n), !!d.isString(t)) {
1753
- if (d.isString(r))
1984
+ if (o && (t = n), !!f.isString(t)) {
1985
+ if (f.isString(r))
1754
1986
  return t.indexOf(r) !== -1;
1755
- if (d.isRegExp(r))
1987
+ if (f.isRegExp(r))
1756
1988
  return r.test(t);
1757
1989
  }
1758
1990
  }
1759
- function Os(e) {
1991
+ function ia(e) {
1760
1992
  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
1761
1993
  }
1762
- function ks(e, t) {
1763
- const n = d.toCamelCase(" " + t);
1994
+ function la(e, t) {
1995
+ const n = f.toCamelCase(" " + t);
1764
1996
  ["get", "set", "has"].forEach((r) => {
1765
1997
  Object.defineProperty(e, r + n, {
1766
- value: function(o, a, s) {
1767
- return this[r].call(this, t, o, a, s);
1998
+ value: function(o, s, a) {
1999
+ return this[r].call(this, t, o, s, a);
1768
2000
  },
1769
2001
  configurable: !0
1770
2002
  });
1771
2003
  });
1772
2004
  }
1773
- let J = class {
2005
+ let K = class {
1774
2006
  constructor(t) {
1775
2007
  t && this.set(t);
1776
2008
  }
1777
2009
  set(t, n, r) {
1778
2010
  const o = this;
1779
- function a(i, u, c) {
1780
- const f = Ne(u);
1781
- if (!f)
2011
+ function s(i, u, c) {
2012
+ const d = Ie(u);
2013
+ if (!d)
1782
2014
  throw new Error("header name must be a non-empty string");
1783
- const p = d.findKey(o, f);
1784
- (!p || o[p] === void 0 || c === !0 || c === void 0 && o[p] !== !1) && (o[p || u] = Ve(i));
1785
- }
1786
- const s = (i, u) => d.forEach(i, (c, f) => a(c, f, u));
1787
- if (d.isPlainObject(t) || t instanceof this.constructor)
1788
- s(t, n);
1789
- else if (d.isString(t) && (t = t.trim()) && !Ts(t))
1790
- s(Es(t), n);
1791
- else if (d.isHeaders(t))
2015
+ const h = f.findKey(o, d);
2016
+ (!h || o[h] === void 0 || c === !0 || c === void 0 && o[h] !== !1) && (o[h || u] = Xe(i));
2017
+ }
2018
+ const a = (i, u) => f.forEach(i, (c, d) => s(c, d, u));
2019
+ if (f.isPlainObject(t) || t instanceof this.constructor)
2020
+ a(t, n);
2021
+ else if (f.isString(t) && (t = t.trim()) && !aa(t))
2022
+ a(oa(t), n);
2023
+ else if (f.isHeaders(t))
1792
2024
  for (const [i, u] of t.entries())
1793
- a(u, i, r);
2025
+ s(u, i, r);
1794
2026
  else
1795
- t != null && a(n, t, r);
2027
+ t != null && s(n, t, r);
1796
2028
  return this;
1797
2029
  }
1798
2030
  get(t, n) {
1799
- if (t = Ne(t), t) {
1800
- const r = d.findKey(this, t);
2031
+ if (t = Ie(t), t) {
2032
+ const r = f.findKey(this, t);
1801
2033
  if (r) {
1802
2034
  const o = this[r];
1803
2035
  if (!n)
1804
2036
  return o;
1805
2037
  if (n === !0)
1806
- return Rs(o);
1807
- if (d.isFunction(n))
2038
+ return sa(o);
2039
+ if (f.isFunction(n))
1808
2040
  return n.call(this, o, r);
1809
- if (d.isRegExp(n))
2041
+ if (f.isRegExp(n))
1810
2042
  return n.exec(o);
1811
2043
  throw new TypeError("parser must be boolean|regexp|function");
1812
2044
  }
1813
2045
  }
1814
2046
  }
1815
2047
  has(t, n) {
1816
- if (t = Ne(t), t) {
1817
- const r = d.findKey(this, t);
1818
- return !!(r && this[r] !== void 0 && (!n || wt(this, this[r], r, n)));
2048
+ if (t = Ie(t), t) {
2049
+ const r = f.findKey(this, t);
2050
+ return !!(r && this[r] !== void 0 && (!n || xt(this, this[r], r, n)));
1819
2051
  }
1820
2052
  return !1;
1821
2053
  }
1822
2054
  delete(t, n) {
1823
2055
  const r = this;
1824
2056
  let o = !1;
1825
- function a(s) {
1826
- if (s = Ne(s), s) {
1827
- const i = d.findKey(r, s);
1828
- i && (!n || wt(r, r[i], i, n)) && (delete r[i], o = !0);
2057
+ function s(a) {
2058
+ if (a = Ie(a), a) {
2059
+ const i = f.findKey(r, a);
2060
+ i && (!n || xt(r, r[i], i, n)) && (delete r[i], o = !0);
1829
2061
  }
1830
2062
  }
1831
- return d.isArray(t) ? t.forEach(a) : a(t), o;
2063
+ return f.isArray(t) ? t.forEach(s) : s(t), o;
1832
2064
  }
1833
2065
  clear(t) {
1834
2066
  const n = Object.keys(this);
1835
2067
  let r = n.length, o = !1;
1836
2068
  for (; r--; ) {
1837
- const a = n[r];
1838
- (!t || wt(this, this[a], a, t, !0)) && (delete this[a], o = !0);
2069
+ const s = n[r];
2070
+ (!t || xt(this, this[s], s, t, !0)) && (delete this[s], o = !0);
1839
2071
  }
1840
2072
  return o;
1841
2073
  }
1842
2074
  normalize(t) {
1843
2075
  const n = this, r = {};
1844
- return d.forEach(this, (o, a) => {
1845
- const s = d.findKey(r, a);
1846
- if (s) {
1847
- n[s] = Ve(o), delete n[a];
2076
+ return f.forEach(this, (o, s) => {
2077
+ const a = f.findKey(r, s);
2078
+ if (a) {
2079
+ n[a] = Xe(o), delete n[s];
1848
2080
  return;
1849
2081
  }
1850
- const i = t ? Os(a) : String(a).trim();
1851
- i !== a && delete n[a], n[i] = Ve(o), r[i] = !0;
2082
+ const i = t ? ia(s) : String(s).trim();
2083
+ i !== s && delete n[s], n[i] = Xe(o), r[i] = !0;
1852
2084
  }), this;
1853
2085
  }
1854
2086
  concat(...t) {
@@ -1856,8 +2088,8 @@ let J = class {
1856
2088
  }
1857
2089
  toJSON(t) {
1858
2090
  const n = /* @__PURE__ */ Object.create(null);
1859
- return d.forEach(this, (r, o) => {
1860
- r != null && r !== !1 && (n[o] = t && d.isArray(r) ? r.join(", ") : r);
2091
+ return f.forEach(this, (r, o) => {
2092
+ r != null && r !== !1 && (n[o] = t && f.isArray(r) ? r.join(", ") : r);
1861
2093
  }), n;
1862
2094
  }
1863
2095
  [Symbol.iterator]() {
@@ -1878,18 +2110,18 @@ let J = class {
1878
2110
  return n.forEach((o) => r.set(o)), r;
1879
2111
  }
1880
2112
  static accessor(t) {
1881
- const r = (this[nn] = this[nn] = {
2113
+ const r = (this[pn] = this[pn] = {
1882
2114
  accessors: {}
1883
2115
  }).accessors, o = this.prototype;
1884
- function a(s) {
1885
- const i = Ne(s);
1886
- r[i] || (ks(o, s), r[i] = !0);
2116
+ function s(a) {
2117
+ const i = Ie(a);
2118
+ r[i] || (la(o, a), r[i] = !0);
1887
2119
  }
1888
- return d.isArray(t) ? t.forEach(a) : a(t), this;
2120
+ return f.isArray(t) ? t.forEach(s) : s(t), this;
1889
2121
  }
1890
2122
  };
1891
- J.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1892
- d.reduceDescriptors(J.prototype, ({ value: e }, t) => {
2123
+ K.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
2124
+ f.reduceDescriptors(K.prototype, ({ value: e }, t) => {
1893
2125
  let n = t[0].toUpperCase() + t.slice(1);
1894
2126
  return {
1895
2127
  get: () => e,
@@ -1898,24 +2130,24 @@ d.reduceDescriptors(J.prototype, ({ value: e }, t) => {
1898
2130
  }
1899
2131
  };
1900
2132
  });
1901
- d.freezeMethods(J);
1902
- function yt(e, t) {
1903
- const n = this || Me, r = t || n, o = J.from(r.headers);
1904
- let a = r.data;
1905
- return d.forEach(e, function(i) {
1906
- a = i.call(n, a, o.normalize(), t ? t.status : void 0);
1907
- }), o.normalize(), a;
1908
- }
1909
- function Bn(e) {
2133
+ f.freezeMethods(K);
2134
+ function Tt(e, t) {
2135
+ const n = this || Fe, r = t || n, o = K.from(r.headers);
2136
+ let s = r.data;
2137
+ return f.forEach(e, function(i) {
2138
+ s = i.call(n, s, o.normalize(), t ? t.status : void 0);
2139
+ }), o.normalize(), s;
2140
+ }
2141
+ function Wn(e) {
1910
2142
  return !!(e && e.__CANCEL__);
1911
2143
  }
1912
- function Re(e, t, n) {
2144
+ function Ne(e, t, n) {
1913
2145
  v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
1914
2146
  }
1915
- d.inherits(Re, v, {
2147
+ f.inherits(Ne, v, {
1916
2148
  __CANCEL__: !0
1917
2149
  });
1918
- function Dn(e, t, n) {
2150
+ function Kn(e, t, n) {
1919
2151
  const r = n.config.validateStatus;
1920
2152
  !n.status || !r || r(n.status) ? e(n) : t(new v(
1921
2153
  "Request failed with status code " + n.status,
@@ -1925,73 +2157,73 @@ function Dn(e, t, n) {
1925
2157
  n
1926
2158
  ));
1927
2159
  }
1928
- function Cs(e) {
2160
+ function ca(e) {
1929
2161
  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
1930
2162
  return t && t[1] || "";
1931
2163
  }
1932
- function As(e, t) {
2164
+ function ua(e, t) {
1933
2165
  e = e || 10;
1934
2166
  const n = new Array(e), r = new Array(e);
1935
- let o = 0, a = 0, s;
2167
+ let o = 0, s = 0, a;
1936
2168
  return t = t !== void 0 ? t : 1e3, function(u) {
1937
- const c = Date.now(), f = r[a];
1938
- s || (s = c), n[o] = u, r[o] = c;
1939
- let p = a, h = 0;
1940
- for (; p !== o; )
1941
- h += n[p++], p = p % e;
1942
- if (o = (o + 1) % e, o === a && (a = (a + 1) % e), c - s < t)
2169
+ const c = Date.now(), d = r[s];
2170
+ a || (a = c), n[o] = u, r[o] = c;
2171
+ let h = s, p = 0;
2172
+ for (; h !== o; )
2173
+ p += n[h++], h = h % e;
2174
+ if (o = (o + 1) % e, o === s && (s = (s + 1) % e), c - a < t)
1943
2175
  return;
1944
- const l = f && c - f;
1945
- return l ? Math.round(h * 1e3 / l) : void 0;
2176
+ const l = d && c - d;
2177
+ return l ? Math.round(p * 1e3 / l) : void 0;
1946
2178
  };
1947
2179
  }
1948
- function Ns(e, t) {
1949
- let n = 0, r = 1e3 / t, o, a;
1950
- const s = (c, f = Date.now()) => {
1951
- n = f, o = null, a && (clearTimeout(a), a = null), e.apply(null, c);
2180
+ function da(e, t) {
2181
+ let n = 0, r = 1e3 / t, o, s;
2182
+ const a = (c, d = Date.now()) => {
2183
+ n = d, o = null, s && (clearTimeout(s), s = null), e.apply(null, c);
1952
2184
  };
1953
2185
  return [(...c) => {
1954
- const f = Date.now(), p = f - n;
1955
- p >= r ? s(c, f) : (o = c, a || (a = setTimeout(() => {
1956
- a = null, s(o);
1957
- }, r - p)));
1958
- }, () => o && s(o)];
2186
+ const d = Date.now(), h = d - n;
2187
+ h >= r ? a(c, d) : (o = c, s || (s = setTimeout(() => {
2188
+ s = null, a(o);
2189
+ }, r - h)));
2190
+ }, () => o && a(o)];
1959
2191
  }
1960
- const Xe = (e, t, n = 3) => {
2192
+ const tt = (e, t, n = 3) => {
1961
2193
  let r = 0;
1962
- const o = As(50, 250);
1963
- return Ns((a) => {
1964
- const s = a.loaded, i = a.lengthComputable ? a.total : void 0, u = s - r, c = o(u), f = s <= i;
1965
- r = s;
1966
- const p = {
1967
- loaded: s,
2194
+ const o = ua(50, 250);
2195
+ return da((s) => {
2196
+ const a = s.loaded, i = s.lengthComputable ? s.total : void 0, u = a - r, c = o(u), d = a <= i;
2197
+ r = a;
2198
+ const h = {
2199
+ loaded: a,
1968
2200
  total: i,
1969
- progress: i ? s / i : void 0,
2201
+ progress: i ? a / i : void 0,
1970
2202
  bytes: u,
1971
2203
  rate: c || void 0,
1972
- estimated: c && i && f ? (i - s) / c : void 0,
1973
- event: a,
2204
+ estimated: c && i && d ? (i - a) / c : void 0,
2205
+ event: s,
1974
2206
  lengthComputable: i != null,
1975
2207
  [t ? "download" : "upload"]: !0
1976
2208
  };
1977
- e(p);
2209
+ e(h);
1978
2210
  }, n);
1979
- }, rn = (e, t) => {
2211
+ }, hn = (e, t) => {
1980
2212
  const n = e != null;
1981
2213
  return [(r) => t[0]({
1982
2214
  lengthComputable: n,
1983
2215
  total: e,
1984
2216
  loaded: r
1985
2217
  }), t[1]];
1986
- }, on = (e) => (...t) => d.asap(() => e(...t)), Ls = j.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, j.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1987
- new URL(j.origin),
1988
- j.navigator && /(msie|trident)/i.test(j.navigator.userAgent)
1989
- ) : () => !0, _s = j.hasStandardBrowserEnv ? (
2218
+ }, mn = (e) => (...t) => f.asap(() => e(...t)), fa = $.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, $.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
2219
+ new URL($.origin),
2220
+ $.navigator && /(msie|trident)/i.test($.navigator.userAgent)
2221
+ ) : () => !0, pa = $.hasStandardBrowserEnv ? (
1990
2222
  // Standard browser envs support document.cookie
1991
2223
  {
1992
- write(e, t, n, r, o, a) {
1993
- const s = [e + "=" + encodeURIComponent(t)];
1994
- d.isNumber(n) && s.push("expires=" + new Date(n).toGMTString()), d.isString(r) && s.push("path=" + r), d.isString(o) && s.push("domain=" + o), a === !0 && s.push("secure"), document.cookie = s.join("; ");
2224
+ write(e, t, n, r, o, s) {
2225
+ const a = [e + "=" + encodeURIComponent(t)];
2226
+ f.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), f.isString(r) && a.push("path=" + r), f.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
1995
2227
  },
1996
2228
  read(e) {
1997
2229
  const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
@@ -2013,183 +2245,183 @@ const Xe = (e, t, n = 3) => {
2013
2245
  }
2014
2246
  }
2015
2247
  );
2016
- function Ms(e) {
2248
+ function ha(e) {
2017
2249
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
2018
2250
  }
2019
- function Ps(e, t) {
2251
+ function ma(e, t) {
2020
2252
  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
2021
2253
  }
2022
- function Fn(e, t, n) {
2023
- let r = !Ms(t);
2024
- return e && r || n == !1 ? Ps(e, t) : t;
2254
+ function Yn(e, t, n) {
2255
+ let r = !ha(t);
2256
+ return e && r || n == !1 ? ma(e, t) : t;
2025
2257
  }
2026
- const sn = (e) => e instanceof J ? { ...e } : e;
2027
- function ge(e, t) {
2258
+ const gn = (e) => e instanceof K ? { ...e } : e;
2259
+ function be(e, t) {
2028
2260
  t = t || {};
2029
2261
  const n = {};
2030
- function r(c, f, p, h) {
2031
- return d.isPlainObject(c) && d.isPlainObject(f) ? d.merge.call({ caseless: h }, c, f) : d.isPlainObject(f) ? d.merge({}, f) : d.isArray(f) ? f.slice() : f;
2032
- }
2033
- function o(c, f, p, h) {
2034
- if (d.isUndefined(f)) {
2035
- if (!d.isUndefined(c))
2036
- return r(void 0, c, p, h);
2037
- } else return r(c, f, p, h);
2038
- }
2039
- function a(c, f) {
2040
- if (!d.isUndefined(f))
2041
- return r(void 0, f);
2042
- }
2043
- function s(c, f) {
2044
- if (d.isUndefined(f)) {
2045
- if (!d.isUndefined(c))
2262
+ function r(c, d, h, p) {
2263
+ return f.isPlainObject(c) && f.isPlainObject(d) ? f.merge.call({ caseless: p }, c, d) : f.isPlainObject(d) ? f.merge({}, d) : f.isArray(d) ? d.slice() : d;
2264
+ }
2265
+ function o(c, d, h, p) {
2266
+ if (f.isUndefined(d)) {
2267
+ if (!f.isUndefined(c))
2268
+ return r(void 0, c, h, p);
2269
+ } else return r(c, d, h, p);
2270
+ }
2271
+ function s(c, d) {
2272
+ if (!f.isUndefined(d))
2273
+ return r(void 0, d);
2274
+ }
2275
+ function a(c, d) {
2276
+ if (f.isUndefined(d)) {
2277
+ if (!f.isUndefined(c))
2046
2278
  return r(void 0, c);
2047
- } else return r(void 0, f);
2279
+ } else return r(void 0, d);
2048
2280
  }
2049
- function i(c, f, p) {
2050
- if (p in t)
2051
- return r(c, f);
2052
- if (p in e)
2281
+ function i(c, d, h) {
2282
+ if (h in t)
2283
+ return r(c, d);
2284
+ if (h in e)
2053
2285
  return r(void 0, c);
2054
2286
  }
2055
2287
  const u = {
2056
- url: a,
2057
- method: a,
2058
- data: a,
2059
- baseURL: s,
2060
- transformRequest: s,
2061
- transformResponse: s,
2062
- paramsSerializer: s,
2063
- timeout: s,
2064
- timeoutMessage: s,
2065
- withCredentials: s,
2066
- withXSRFToken: s,
2067
- adapter: s,
2068
- responseType: s,
2069
- xsrfCookieName: s,
2070
- xsrfHeaderName: s,
2071
- onUploadProgress: s,
2072
- onDownloadProgress: s,
2073
- decompress: s,
2074
- maxContentLength: s,
2075
- maxBodyLength: s,
2076
- beforeRedirect: s,
2077
- transport: s,
2078
- httpAgent: s,
2079
- httpsAgent: s,
2080
- cancelToken: s,
2081
- socketPath: s,
2082
- responseEncoding: s,
2288
+ url: s,
2289
+ method: s,
2290
+ data: s,
2291
+ baseURL: a,
2292
+ transformRequest: a,
2293
+ transformResponse: a,
2294
+ paramsSerializer: a,
2295
+ timeout: a,
2296
+ timeoutMessage: a,
2297
+ withCredentials: a,
2298
+ withXSRFToken: a,
2299
+ adapter: a,
2300
+ responseType: a,
2301
+ xsrfCookieName: a,
2302
+ xsrfHeaderName: a,
2303
+ onUploadProgress: a,
2304
+ onDownloadProgress: a,
2305
+ decompress: a,
2306
+ maxContentLength: a,
2307
+ maxBodyLength: a,
2308
+ beforeRedirect: a,
2309
+ transport: a,
2310
+ httpAgent: a,
2311
+ httpsAgent: a,
2312
+ cancelToken: a,
2313
+ socketPath: a,
2314
+ responseEncoding: a,
2083
2315
  validateStatus: i,
2084
- headers: (c, f, p) => o(sn(c), sn(f), p, !0)
2316
+ headers: (c, d, h) => o(gn(c), gn(d), h, !0)
2085
2317
  };
2086
- return d.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
2087
- const p = u[f] || o, h = p(e[f], t[f], f);
2088
- d.isUndefined(h) && p !== i || (n[f] = h);
2318
+ return f.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
2319
+ const h = u[d] || o, p = h(e[d], t[d], d);
2320
+ f.isUndefined(p) && h !== i || (n[d] = p);
2089
2321
  }), n;
2090
2322
  }
2091
- const Un = (e) => {
2092
- const t = ge({}, e);
2093
- let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: a, headers: s, auth: i } = t;
2094
- t.headers = s = J.from(s), t.url = Mn(Fn(t.baseURL, t.url), e.params, e.paramsSerializer), i && s.set(
2323
+ const Jn = (e) => {
2324
+ const t = be({}, e);
2325
+ let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: i } = t;
2326
+ t.headers = a = K.from(a), t.url = zn(Yn(t.baseURL, t.url), e.params, e.paramsSerializer), i && a.set(
2095
2327
  "Authorization",
2096
2328
  "Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
2097
2329
  );
2098
2330
  let u;
2099
- if (d.isFormData(n)) {
2100
- if (j.hasStandardBrowserEnv || j.hasStandardBrowserWebWorkerEnv)
2101
- s.setContentType(void 0);
2102
- else if ((u = s.getContentType()) !== !1) {
2103
- const [c, ...f] = u ? u.split(";").map((p) => p.trim()).filter(Boolean) : [];
2104
- s.setContentType([c || "multipart/form-data", ...f].join("; "));
2331
+ if (f.isFormData(n)) {
2332
+ if ($.hasStandardBrowserEnv || $.hasStandardBrowserWebWorkerEnv)
2333
+ a.setContentType(void 0);
2334
+ else if ((u = a.getContentType()) !== !1) {
2335
+ const [c, ...d] = u ? u.split(";").map((h) => h.trim()).filter(Boolean) : [];
2336
+ a.setContentType([c || "multipart/form-data", ...d].join("; "));
2105
2337
  }
2106
2338
  }
2107
- if (j.hasStandardBrowserEnv && (r && d.isFunction(r) && (r = r(t)), r || r !== !1 && Ls(t.url))) {
2108
- const c = o && a && _s.read(a);
2109
- c && s.set(o, c);
2339
+ if ($.hasStandardBrowserEnv && (r && f.isFunction(r) && (r = r(t)), r || r !== !1 && fa(t.url))) {
2340
+ const c = o && s && pa.read(s);
2341
+ c && a.set(o, c);
2110
2342
  }
2111
2343
  return t;
2112
- }, Is = typeof XMLHttpRequest < "u", Bs = Is && function(e) {
2344
+ }, ga = typeof XMLHttpRequest < "u", wa = ga && function(e) {
2113
2345
  return new Promise(function(n, r) {
2114
- const o = Un(e);
2115
- let a = o.data;
2116
- const s = J.from(o.headers).normalize();
2117
- let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = o, f, p, h, l, g;
2346
+ const o = Jn(e);
2347
+ let s = o.data;
2348
+ const a = K.from(o.headers).normalize();
2349
+ let { responseType: i, onUploadProgress: u, onDownloadProgress: c } = o, d, h, p, l, g;
2118
2350
  function m() {
2119
- l && l(), g && g(), o.cancelToken && o.cancelToken.unsubscribe(f), o.signal && o.signal.removeEventListener("abort", f);
2351
+ l && l(), g && g(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
2120
2352
  }
2121
2353
  let y = new XMLHttpRequest();
2122
2354
  y.open(o.method.toUpperCase(), o.url, !0), y.timeout = o.timeout;
2123
- function R() {
2355
+ function T() {
2124
2356
  if (!y)
2125
2357
  return;
2126
- const T = J.from(
2358
+ const _ = K.from(
2127
2359
  "getAllResponseHeaders" in y && y.getAllResponseHeaders()
2128
- ), L = {
2360
+ ), k = {
2129
2361
  data: !i || i === "text" || i === "json" ? y.responseText : y.response,
2130
2362
  status: y.status,
2131
2363
  statusText: y.statusText,
2132
- headers: T,
2364
+ headers: _,
2133
2365
  config: e,
2134
2366
  request: y
2135
2367
  };
2136
- Dn(function(P) {
2137
- n(P), m();
2138
- }, function(P) {
2139
- r(P), m();
2140
- }, L), y = null;
2141
- }
2142
- "onloadend" in y ? y.onloadend = R : y.onreadystatechange = function() {
2143
- !y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(R);
2368
+ Kn(function(M) {
2369
+ n(M), m();
2370
+ }, function(M) {
2371
+ r(M), m();
2372
+ }, k), y = null;
2373
+ }
2374
+ "onloadend" in y ? y.onloadend = T : y.onreadystatechange = function() {
2375
+ !y || y.readyState !== 4 || y.status === 0 && !(y.responseURL && y.responseURL.indexOf("file:") === 0) || setTimeout(T);
2144
2376
  }, y.onabort = function() {
2145
2377
  y && (r(new v("Request aborted", v.ECONNABORTED, e, y)), y = null);
2146
2378
  }, y.onerror = function() {
2147
2379
  r(new v("Network Error", v.ERR_NETWORK, e, y)), y = null;
2148
2380
  }, y.ontimeout = function() {
2149
- let F = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
2150
- const L = o.transitional || Pn;
2151
- o.timeoutErrorMessage && (F = o.timeoutErrorMessage), r(new v(
2152
- F,
2153
- L.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
2381
+ let U = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
2382
+ const k = o.transitional || Vn;
2383
+ o.timeoutErrorMessage && (U = o.timeoutErrorMessage), r(new v(
2384
+ U,
2385
+ k.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
2154
2386
  e,
2155
2387
  y
2156
2388
  )), y = null;
2157
- }, a === void 0 && s.setContentType(null), "setRequestHeader" in y && d.forEach(s.toJSON(), function(F, L) {
2158
- y.setRequestHeader(L, F);
2159
- }), d.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), i && i !== "json" && (y.responseType = o.responseType), c && ([h, g] = Xe(c, !0), y.addEventListener("progress", h)), u && y.upload && ([p, l] = Xe(u), y.upload.addEventListener("progress", p), y.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (f = (T) => {
2160
- y && (r(!T || T.type ? new Re(null, e, y) : T), y.abort(), y = null);
2161
- }, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
2162
- const x = Cs(o.url);
2163
- if (x && j.protocols.indexOf(x) === -1) {
2164
- r(new v("Unsupported protocol " + x + ":", v.ERR_BAD_REQUEST, e));
2389
+ }, s === void 0 && a.setContentType(null), "setRequestHeader" in y && f.forEach(a.toJSON(), function(U, k) {
2390
+ y.setRequestHeader(k, U);
2391
+ }), f.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), i && i !== "json" && (y.responseType = o.responseType), c && ([p, g] = tt(c, !0), y.addEventListener("progress", p)), u && y.upload && ([h, l] = tt(u), y.upload.addEventListener("progress", h), y.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (d = (_) => {
2392
+ y && (r(!_ || _.type ? new Ne(null, e, y) : _), y.abort(), y = null);
2393
+ }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
2394
+ const S = ca(o.url);
2395
+ if (S && $.protocols.indexOf(S) === -1) {
2396
+ r(new v("Unsupported protocol " + S + ":", v.ERR_BAD_REQUEST, e));
2165
2397
  return;
2166
2398
  }
2167
- y.send(a || null);
2399
+ y.send(s || null);
2168
2400
  });
2169
- }, Ds = (e, t) => {
2401
+ }, ya = (e, t) => {
2170
2402
  const { length: n } = e = e ? e.filter(Boolean) : [];
2171
2403
  if (t || n) {
2172
2404
  let r = new AbortController(), o;
2173
- const a = function(c) {
2405
+ const s = function(c) {
2174
2406
  if (!o) {
2175
2407
  o = !0, i();
2176
- const f = c instanceof Error ? c : this.reason;
2177
- r.abort(f instanceof v ? f : new Re(f instanceof Error ? f.message : f));
2408
+ const d = c instanceof Error ? c : this.reason;
2409
+ r.abort(d instanceof v ? d : new Ne(d instanceof Error ? d.message : d));
2178
2410
  }
2179
2411
  };
2180
- let s = t && setTimeout(() => {
2181
- s = null, a(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
2412
+ let a = t && setTimeout(() => {
2413
+ a = null, s(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
2182
2414
  }, t);
2183
2415
  const i = () => {
2184
- e && (s && clearTimeout(s), s = null, e.forEach((c) => {
2185
- c.unsubscribe ? c.unsubscribe(a) : c.removeEventListener("abort", a);
2416
+ e && (a && clearTimeout(a), a = null, e.forEach((c) => {
2417
+ c.unsubscribe ? c.unsubscribe(s) : c.removeEventListener("abort", s);
2186
2418
  }), e = null);
2187
2419
  };
2188
- e.forEach((c) => c.addEventListener("abort", a));
2420
+ e.forEach((c) => c.addEventListener("abort", s));
2189
2421
  const { signal: u } = r;
2190
- return u.unsubscribe = () => d.asap(i), u;
2422
+ return u.unsubscribe = () => f.asap(i), u;
2191
2423
  }
2192
- }, Fs = function* (e, t) {
2424
+ }, ba = function* (e, t) {
2193
2425
  let n = e.byteLength;
2194
2426
  if (n < t) {
2195
2427
  yield e;
@@ -2198,10 +2430,10 @@ const Un = (e) => {
2198
2430
  let r = 0, o;
2199
2431
  for (; r < n; )
2200
2432
  o = r + t, yield e.slice(r, o), r = o;
2201
- }, Us = async function* (e, t) {
2202
- for await (const n of js(e))
2203
- yield* Fs(n, t);
2204
- }, js = async function* (e) {
2433
+ }, va = async function* (e, t) {
2434
+ for await (const n of Ea(e))
2435
+ yield* ba(n, t);
2436
+ }, Ea = async function* (e) {
2205
2437
  if (e[Symbol.asyncIterator]) {
2206
2438
  yield* e;
2207
2439
  return;
@@ -2217,25 +2449,25 @@ const Un = (e) => {
2217
2449
  } finally {
2218
2450
  await t.cancel();
2219
2451
  }
2220
- }, an = (e, t, n, r) => {
2221
- const o = Us(e, t);
2222
- let a = 0, s, i = (u) => {
2223
- s || (s = !0, r && r(u));
2452
+ }, wn = (e, t, n, r) => {
2453
+ const o = va(e, t);
2454
+ let s = 0, a, i = (u) => {
2455
+ a || (a = !0, r && r(u));
2224
2456
  };
2225
2457
  return new ReadableStream({
2226
2458
  async pull(u) {
2227
2459
  try {
2228
- const { done: c, value: f } = await o.next();
2460
+ const { done: c, value: d } = await o.next();
2229
2461
  if (c) {
2230
2462
  i(), u.close();
2231
2463
  return;
2232
2464
  }
2233
- let p = f.byteLength;
2465
+ let h = d.byteLength;
2234
2466
  if (n) {
2235
- let h = a += p;
2236
- n(h);
2467
+ let p = s += h;
2468
+ n(p);
2237
2469
  }
2238
- u.enqueue(new Uint8Array(f));
2470
+ u.enqueue(new Uint8Array(d));
2239
2471
  } catch (c) {
2240
2472
  throw i(c), c;
2241
2473
  }
@@ -2246,15 +2478,15 @@ const Un = (e) => {
2246
2478
  }, {
2247
2479
  highWaterMark: 2
2248
2480
  });
2249
- }, nt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", jn = nt && typeof ReadableStream == "function", zs = nt && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), zn = (e, ...t) => {
2481
+ }, lt = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Gn = lt && typeof ReadableStream == "function", Sa = lt && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Xn = (e, ...t) => {
2250
2482
  try {
2251
2483
  return !!e(...t);
2252
2484
  } catch {
2253
2485
  return !1;
2254
2486
  }
2255
- }, Hs = jn && zn(() => {
2487
+ }, xa = Gn && Xn(() => {
2256
2488
  let e = !1;
2257
- const t = new Request(j.origin, {
2489
+ const t = new Request($.origin, {
2258
2490
  body: new ReadableStream(),
2259
2491
  method: "POST",
2260
2492
  get duplex() {
@@ -2262,124 +2494,124 @@ const Un = (e) => {
2262
2494
  }
2263
2495
  }).headers.has("Content-Type");
2264
2496
  return e && !t;
2265
- }), ln = 64 * 1024, Ot = jn && zn(() => d.isReadableStream(new Response("").body)), Ge = {
2266
- stream: Ot && ((e) => e.body)
2497
+ }), yn = 64 * 1024, Dt = Gn && Xn(() => f.isReadableStream(new Response("").body)), nt = {
2498
+ stream: Dt && ((e) => e.body)
2267
2499
  };
2268
- nt && ((e) => {
2500
+ lt && ((e) => {
2269
2501
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
2270
- !Ge[t] && (Ge[t] = d.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
2502
+ !nt[t] && (nt[t] = f.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
2271
2503
  throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
2272
2504
  });
2273
2505
  });
2274
2506
  })(new Response());
2275
- const qs = async (e) => {
2507
+ const Ta = async (e) => {
2276
2508
  if (e == null)
2277
2509
  return 0;
2278
- if (d.isBlob(e))
2510
+ if (f.isBlob(e))
2279
2511
  return e.size;
2280
- if (d.isSpecCompliantForm(e))
2281
- return (await new Request(j.origin, {
2512
+ if (f.isSpecCompliantForm(e))
2513
+ return (await new Request($.origin, {
2282
2514
  method: "POST",
2283
2515
  body: e
2284
2516
  }).arrayBuffer()).byteLength;
2285
- if (d.isArrayBufferView(e) || d.isArrayBuffer(e))
2517
+ if (f.isArrayBufferView(e) || f.isArrayBuffer(e))
2286
2518
  return e.byteLength;
2287
- if (d.isURLSearchParams(e) && (e = e + ""), d.isString(e))
2288
- return (await zs(e)).byteLength;
2289
- }, $s = async (e, t) => {
2290
- const n = d.toFiniteNumber(e.getContentLength());
2291
- return n ?? qs(t);
2292
- }, Ws = nt && (async (e) => {
2519
+ if (f.isURLSearchParams(e) && (e = e + ""), f.isString(e))
2520
+ return (await Sa(e)).byteLength;
2521
+ }, _a = async (e, t) => {
2522
+ const n = f.toFiniteNumber(e.getContentLength());
2523
+ return n ?? Ta(t);
2524
+ }, Ra = lt && (async (e) => {
2293
2525
  let {
2294
2526
  url: t,
2295
2527
  method: n,
2296
2528
  data: r,
2297
2529
  signal: o,
2298
- cancelToken: a,
2299
- timeout: s,
2530
+ cancelToken: s,
2531
+ timeout: a,
2300
2532
  onDownloadProgress: i,
2301
2533
  onUploadProgress: u,
2302
2534
  responseType: c,
2303
- headers: f,
2304
- withCredentials: p = "same-origin",
2305
- fetchOptions: h
2306
- } = Un(e);
2535
+ headers: d,
2536
+ withCredentials: h = "same-origin",
2537
+ fetchOptions: p
2538
+ } = Jn(e);
2307
2539
  c = c ? (c + "").toLowerCase() : "text";
2308
- let l = Ds([o, a && a.toAbortSignal()], s), g;
2540
+ let l = ya([o, s && s.toAbortSignal()], a), g;
2309
2541
  const m = l && l.unsubscribe && (() => {
2310
2542
  l.unsubscribe();
2311
2543
  });
2312
2544
  let y;
2313
2545
  try {
2314
- if (u && Hs && n !== "get" && n !== "head" && (y = await $s(f, r)) !== 0) {
2315
- let L = new Request(t, {
2546
+ if (u && xa && n !== "get" && n !== "head" && (y = await _a(d, r)) !== 0) {
2547
+ let k = new Request(t, {
2316
2548
  method: "POST",
2317
2549
  body: r,
2318
2550
  duplex: "half"
2319
- }), S;
2320
- if (d.isFormData(r) && (S = L.headers.get("content-type")) && f.setContentType(S), L.body) {
2321
- const [P, q] = rn(
2551
+ }), E;
2552
+ if (f.isFormData(r) && (E = k.headers.get("content-type")) && d.setContentType(E), k.body) {
2553
+ const [M, V] = hn(
2322
2554
  y,
2323
- Xe(on(u))
2555
+ tt(mn(u))
2324
2556
  );
2325
- r = an(L.body, ln, P, q);
2557
+ r = wn(k.body, yn, M, V);
2326
2558
  }
2327
2559
  }
2328
- d.isString(p) || (p = p ? "include" : "omit");
2329
- const R = "credentials" in Request.prototype;
2560
+ f.isString(h) || (h = h ? "include" : "omit");
2561
+ const T = "credentials" in Request.prototype;
2330
2562
  g = new Request(t, {
2331
- ...h,
2563
+ ...p,
2332
2564
  signal: l,
2333
2565
  method: n.toUpperCase(),
2334
- headers: f.normalize().toJSON(),
2566
+ headers: d.normalize().toJSON(),
2335
2567
  body: r,
2336
2568
  duplex: "half",
2337
- credentials: R ? p : void 0
2569
+ credentials: T ? h : void 0
2338
2570
  });
2339
- let x = await fetch(g);
2340
- const T = Ot && (c === "stream" || c === "response");
2341
- if (Ot && (i || T && m)) {
2342
- const L = {};
2343
- ["status", "statusText", "headers"].forEach((oe) => {
2344
- L[oe] = x[oe];
2571
+ let S = await fetch(g);
2572
+ const _ = Dt && (c === "stream" || c === "response");
2573
+ if (Dt && (i || _ && m)) {
2574
+ const k = {};
2575
+ ["status", "statusText", "headers"].forEach((se) => {
2576
+ k[se] = S[se];
2345
2577
  });
2346
- const S = d.toFiniteNumber(x.headers.get("content-length")), [P, q] = i && rn(
2347
- S,
2348
- Xe(on(i), !0)
2578
+ const E = f.toFiniteNumber(S.headers.get("content-length")), [M, V] = i && hn(
2579
+ E,
2580
+ tt(mn(i), !0)
2349
2581
  ) || [];
2350
- x = new Response(
2351
- an(x.body, ln, P, () => {
2352
- q && q(), m && m();
2582
+ S = new Response(
2583
+ wn(S.body, yn, M, () => {
2584
+ V && V(), m && m();
2353
2585
  }),
2354
- L
2586
+ k
2355
2587
  );
2356
2588
  }
2357
2589
  c = c || "text";
2358
- let F = await Ge[d.findKey(Ge, c) || "text"](x, e);
2359
- return !T && m && m(), await new Promise((L, S) => {
2360
- Dn(L, S, {
2361
- data: F,
2362
- headers: J.from(x.headers),
2363
- status: x.status,
2364
- statusText: x.statusText,
2590
+ let U = await nt[f.findKey(nt, c) || "text"](S, e);
2591
+ return !_ && m && m(), await new Promise((k, E) => {
2592
+ Kn(k, E, {
2593
+ data: U,
2594
+ headers: K.from(S.headers),
2595
+ status: S.status,
2596
+ statusText: S.statusText,
2365
2597
  config: e,
2366
2598
  request: g
2367
2599
  });
2368
2600
  });
2369
- } catch (R) {
2370
- throw m && m(), R && R.name === "TypeError" && /fetch/i.test(R.message) ? Object.assign(
2601
+ } catch (T) {
2602
+ throw m && m(), T && T.name === "TypeError" && /fetch/i.test(T.message) ? Object.assign(
2371
2603
  new v("Network Error", v.ERR_NETWORK, e, g),
2372
2604
  {
2373
- cause: R.cause || R
2605
+ cause: T.cause || T
2374
2606
  }
2375
- ) : v.from(R, R && R.code, e, g);
2607
+ ) : v.from(T, T && T.code, e, g);
2376
2608
  }
2377
- }), kt = {
2378
- http: as,
2379
- xhr: Bs,
2380
- fetch: Ws
2609
+ }), Mt = {
2610
+ http: $s,
2611
+ xhr: wa,
2612
+ fetch: Ra
2381
2613
  };
2382
- d.forEach(kt, (e, t) => {
2614
+ f.forEach(Mt, (e, t) => {
2383
2615
  if (e) {
2384
2616
  try {
2385
2617
  Object.defineProperty(e, "name", { value: t });
@@ -2388,113 +2620,113 @@ d.forEach(kt, (e, t) => {
2388
2620
  Object.defineProperty(e, "adapterName", { value: t });
2389
2621
  }
2390
2622
  });
2391
- const cn = (e) => `- ${e}`, Js = (e) => d.isFunction(e) || e === null || e === !1, Hn = {
2623
+ const bn = (e) => `- ${e}`, Oa = (e) => f.isFunction(e) || e === null || e === !1, Qn = {
2392
2624
  getAdapter: (e) => {
2393
- e = d.isArray(e) ? e : [e];
2625
+ e = f.isArray(e) ? e : [e];
2394
2626
  const { length: t } = e;
2395
2627
  let n, r;
2396
2628
  const o = {};
2397
- for (let a = 0; a < t; a++) {
2398
- n = e[a];
2399
- let s;
2400
- if (r = n, !Js(n) && (r = kt[(s = String(n)).toLowerCase()], r === void 0))
2401
- throw new v(`Unknown adapter '${s}'`);
2629
+ for (let s = 0; s < t; s++) {
2630
+ n = e[s];
2631
+ let a;
2632
+ if (r = n, !Oa(n) && (r = Mt[(a = String(n)).toLowerCase()], r === void 0))
2633
+ throw new v(`Unknown adapter '${a}'`);
2402
2634
  if (r)
2403
2635
  break;
2404
- o[s || "#" + a] = r;
2636
+ o[a || "#" + s] = r;
2405
2637
  }
2406
2638
  if (!r) {
2407
- const a = Object.entries(o).map(
2639
+ const s = Object.entries(o).map(
2408
2640
  ([i, u]) => `adapter ${i} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
2409
2641
  );
2410
- let s = t ? a.length > 1 ? `since :
2411
- ` + a.map(cn).join(`
2412
- `) : " " + cn(a[0]) : "as no adapter specified";
2642
+ let a = t ? s.length > 1 ? `since :
2643
+ ` + s.map(bn).join(`
2644
+ `) : " " + bn(s[0]) : "as no adapter specified";
2413
2645
  throw new v(
2414
- "There is no suitable adapter to dispatch the request " + s,
2646
+ "There is no suitable adapter to dispatch the request " + a,
2415
2647
  "ERR_NOT_SUPPORT"
2416
2648
  );
2417
2649
  }
2418
2650
  return r;
2419
2651
  },
2420
- adapters: kt
2652
+ adapters: Mt
2421
2653
  };
2422
- function bt(e) {
2654
+ function _t(e) {
2423
2655
  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
2424
- throw new Re(null, e);
2656
+ throw new Ne(null, e);
2425
2657
  }
2426
- function un(e) {
2427
- return bt(e), e.headers = J.from(e.headers), e.data = yt.call(
2658
+ function vn(e) {
2659
+ return _t(e), e.headers = K.from(e.headers), e.data = Tt.call(
2428
2660
  e,
2429
2661
  e.transformRequest
2430
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Hn.getAdapter(e.adapter || Me.adapter)(e).then(function(r) {
2431
- return bt(e), r.data = yt.call(
2662
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Qn.getAdapter(e.adapter || Fe.adapter)(e).then(function(r) {
2663
+ return _t(e), r.data = Tt.call(
2432
2664
  e,
2433
2665
  e.transformResponse,
2434
2666
  r
2435
- ), r.headers = J.from(r.headers), r;
2667
+ ), r.headers = K.from(r.headers), r;
2436
2668
  }, function(r) {
2437
- return Bn(r) || (bt(e), r && r.response && (r.response.data = yt.call(
2669
+ return Wn(r) || (_t(e), r && r.response && (r.response.data = Tt.call(
2438
2670
  e,
2439
2671
  e.transformResponse,
2440
2672
  r.response
2441
- ), r.response.headers = J.from(r.response.headers))), Promise.reject(r);
2673
+ ), r.response.headers = K.from(r.response.headers))), Promise.reject(r);
2442
2674
  });
2443
2675
  }
2444
- const qn = "1.8.2", rt = {};
2676
+ const Zn = "1.8.2", ct = {};
2445
2677
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
2446
- rt[e] = function(r) {
2678
+ ct[e] = function(r) {
2447
2679
  return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
2448
2680
  };
2449
2681
  });
2450
- const dn = {};
2451
- rt.transitional = function(t, n, r) {
2452
- function o(a, s) {
2453
- return "[Axios v" + qn + "] Transitional option '" + a + "'" + s + (r ? ". " + r : "");
2682
+ const En = {};
2683
+ ct.transitional = function(t, n, r) {
2684
+ function o(s, a) {
2685
+ return "[Axios v" + Zn + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
2454
2686
  }
2455
- return (a, s, i) => {
2687
+ return (s, a, i) => {
2456
2688
  if (t === !1)
2457
2689
  throw new v(
2458
- o(s, " has been removed" + (n ? " in " + n : "")),
2690
+ o(a, " has been removed" + (n ? " in " + n : "")),
2459
2691
  v.ERR_DEPRECATED
2460
2692
  );
2461
- return n && !dn[s] && (dn[s] = !0, console.warn(
2693
+ return n && !En[a] && (En[a] = !0, console.warn(
2462
2694
  o(
2463
- s,
2695
+ a,
2464
2696
  " has been deprecated since v" + n + " and will be removed in the near future"
2465
2697
  )
2466
- )), t ? t(a, s, i) : !0;
2698
+ )), t ? t(s, a, i) : !0;
2467
2699
  };
2468
2700
  };
2469
- rt.spelling = function(t) {
2701
+ ct.spelling = function(t) {
2470
2702
  return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
2471
2703
  };
2472
- function Vs(e, t, n) {
2704
+ function Na(e, t, n) {
2473
2705
  if (typeof e != "object")
2474
2706
  throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
2475
2707
  const r = Object.keys(e);
2476
2708
  let o = r.length;
2477
2709
  for (; o-- > 0; ) {
2478
- const a = r[o], s = t[a];
2479
- if (s) {
2480
- const i = e[a], u = i === void 0 || s(i, a, e);
2710
+ const s = r[o], a = t[s];
2711
+ if (a) {
2712
+ const i = e[s], u = i === void 0 || a(i, s, e);
2481
2713
  if (u !== !0)
2482
- throw new v("option " + a + " must be " + u, v.ERR_BAD_OPTION_VALUE);
2714
+ throw new v("option " + s + " must be " + u, v.ERR_BAD_OPTION_VALUE);
2483
2715
  continue;
2484
2716
  }
2485
2717
  if (n !== !0)
2486
- throw new v("Unknown option " + a, v.ERR_BAD_OPTION);
2718
+ throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
2487
2719
  }
2488
2720
  }
2489
- const Ke = {
2490
- assertOptions: Vs,
2491
- validators: rt
2492
- }, se = Ke.validators;
2493
- let me = class {
2721
+ const Qe = {
2722
+ assertOptions: Na,
2723
+ validators: ct
2724
+ }, ae = Qe.validators;
2725
+ let ye = class {
2494
2726
  constructor(t) {
2495
2727
  this.defaults = t, this.interceptors = {
2496
- request: new tn(),
2497
- response: new tn()
2728
+ request: new fn(),
2729
+ response: new fn()
2498
2730
  };
2499
2731
  }
2500
2732
  /**
@@ -2512,10 +2744,10 @@ let me = class {
2512
2744
  if (r instanceof Error) {
2513
2745
  let o = {};
2514
2746
  Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
2515
- const a = o.stack ? o.stack.replace(/^.+\n/, "") : "";
2747
+ const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
2516
2748
  try {
2517
- r.stack ? a && !String(r.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (r.stack += `
2518
- ` + a) : r.stack = a;
2749
+ r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += `
2750
+ ` + s) : r.stack = s;
2519
2751
  } catch {
2520
2752
  }
2521
2753
  }
@@ -2523,31 +2755,31 @@ let me = class {
2523
2755
  }
2524
2756
  }
2525
2757
  _request(t, n) {
2526
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ge(this.defaults, n);
2527
- const { transitional: r, paramsSerializer: o, headers: a } = n;
2528
- r !== void 0 && Ke.assertOptions(r, {
2529
- silentJSONParsing: se.transitional(se.boolean),
2530
- forcedJSONParsing: se.transitional(se.boolean),
2531
- clarifyTimeoutError: se.transitional(se.boolean)
2532
- }, !1), o != null && (d.isFunction(o) ? n.paramsSerializer = {
2758
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = be(this.defaults, n);
2759
+ const { transitional: r, paramsSerializer: o, headers: s } = n;
2760
+ r !== void 0 && Qe.assertOptions(r, {
2761
+ silentJSONParsing: ae.transitional(ae.boolean),
2762
+ forcedJSONParsing: ae.transitional(ae.boolean),
2763
+ clarifyTimeoutError: ae.transitional(ae.boolean)
2764
+ }, !1), o != null && (f.isFunction(o) ? n.paramsSerializer = {
2533
2765
  serialize: o
2534
- } : Ke.assertOptions(o, {
2535
- encode: se.function,
2536
- serialize: se.function
2537
- }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Ke.assertOptions(n, {
2538
- baseUrl: se.spelling("baseURL"),
2539
- withXsrfToken: se.spelling("withXSRFToken")
2766
+ } : Qe.assertOptions(o, {
2767
+ encode: ae.function,
2768
+ serialize: ae.function
2769
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Qe.assertOptions(n, {
2770
+ baseUrl: ae.spelling("baseURL"),
2771
+ withXsrfToken: ae.spelling("withXSRFToken")
2540
2772
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2541
- let s = a && d.merge(
2542
- a.common,
2543
- a[n.method]
2773
+ let a = s && f.merge(
2774
+ s.common,
2775
+ s[n.method]
2544
2776
  );
2545
- a && d.forEach(
2777
+ s && f.forEach(
2546
2778
  ["delete", "get", "head", "post", "put", "patch", "common"],
2547
2779
  (g) => {
2548
- delete a[g];
2780
+ delete s[g];
2549
2781
  }
2550
- ), n.headers = J.concat(s, a);
2782
+ ), n.headers = K.concat(a, s);
2551
2783
  const i = [];
2552
2784
  let u = !0;
2553
2785
  this.interceptors.request.forEach(function(m) {
@@ -2557,17 +2789,17 @@ let me = class {
2557
2789
  this.interceptors.response.forEach(function(m) {
2558
2790
  c.push(m.fulfilled, m.rejected);
2559
2791
  });
2560
- let f, p = 0, h;
2792
+ let d, h = 0, p;
2561
2793
  if (!u) {
2562
- const g = [un.bind(this), void 0];
2563
- for (g.unshift.apply(g, i), g.push.apply(g, c), h = g.length, f = Promise.resolve(n); p < h; )
2564
- f = f.then(g[p++], g[p++]);
2565
- return f;
2794
+ const g = [vn.bind(this), void 0];
2795
+ for (g.unshift.apply(g, i), g.push.apply(g, c), p = g.length, d = Promise.resolve(n); h < p; )
2796
+ d = d.then(g[h++], g[h++]);
2797
+ return d;
2566
2798
  }
2567
- h = i.length;
2799
+ p = i.length;
2568
2800
  let l = n;
2569
- for (p = 0; p < h; ) {
2570
- const g = i[p++], m = i[p++];
2801
+ for (h = 0; h < p; ) {
2802
+ const g = i[h++], m = i[h++];
2571
2803
  try {
2572
2804
  l = g(l);
2573
2805
  } catch (y) {
@@ -2576,69 +2808,69 @@ let me = class {
2576
2808
  }
2577
2809
  }
2578
2810
  try {
2579
- f = un.call(this, l);
2811
+ d = vn.call(this, l);
2580
2812
  } catch (g) {
2581
2813
  return Promise.reject(g);
2582
2814
  }
2583
- for (p = 0, h = c.length; p < h; )
2584
- f = f.then(c[p++], c[p++]);
2585
- return f;
2815
+ for (h = 0, p = c.length; h < p; )
2816
+ d = d.then(c[h++], c[h++]);
2817
+ return d;
2586
2818
  }
2587
2819
  getUri(t) {
2588
- t = ge(this.defaults, t);
2589
- const n = Fn(t.baseURL, t.url, t.allowAbsoluteUrls);
2590
- return Mn(n, t.params, t.paramsSerializer);
2820
+ t = be(this.defaults, t);
2821
+ const n = Yn(t.baseURL, t.url, t.allowAbsoluteUrls);
2822
+ return zn(n, t.params, t.paramsSerializer);
2591
2823
  }
2592
2824
  };
2593
- d.forEach(["delete", "get", "head", "options"], function(t) {
2594
- me.prototype[t] = function(n, r) {
2595
- return this.request(ge(r || {}, {
2825
+ f.forEach(["delete", "get", "head", "options"], function(t) {
2826
+ ye.prototype[t] = function(n, r) {
2827
+ return this.request(be(r || {}, {
2596
2828
  method: t,
2597
2829
  url: n,
2598
2830
  data: (r || {}).data
2599
2831
  }));
2600
2832
  };
2601
2833
  });
2602
- d.forEach(["post", "put", "patch"], function(t) {
2834
+ f.forEach(["post", "put", "patch"], function(t) {
2603
2835
  function n(r) {
2604
- return function(a, s, i) {
2605
- return this.request(ge(i || {}, {
2836
+ return function(s, a, i) {
2837
+ return this.request(be(i || {}, {
2606
2838
  method: t,
2607
2839
  headers: r ? {
2608
2840
  "Content-Type": "multipart/form-data"
2609
2841
  } : {},
2610
- url: a,
2611
- data: s
2842
+ url: s,
2843
+ data: a
2612
2844
  }));
2613
2845
  };
2614
2846
  }
2615
- me.prototype[t] = n(), me.prototype[t + "Form"] = n(!0);
2847
+ ye.prototype[t] = n(), ye.prototype[t + "Form"] = n(!0);
2616
2848
  });
2617
- let Ks = class $n {
2849
+ let Aa = class er {
2618
2850
  constructor(t) {
2619
2851
  if (typeof t != "function")
2620
2852
  throw new TypeError("executor must be a function.");
2621
2853
  let n;
2622
- this.promise = new Promise(function(a) {
2623
- n = a;
2854
+ this.promise = new Promise(function(s) {
2855
+ n = s;
2624
2856
  });
2625
2857
  const r = this;
2626
2858
  this.promise.then((o) => {
2627
2859
  if (!r._listeners) return;
2628
- let a = r._listeners.length;
2629
- for (; a-- > 0; )
2630
- r._listeners[a](o);
2860
+ let s = r._listeners.length;
2861
+ for (; s-- > 0; )
2862
+ r._listeners[s](o);
2631
2863
  r._listeners = null;
2632
2864
  }), this.promise.then = (o) => {
2633
- let a;
2634
- const s = new Promise((i) => {
2635
- r.subscribe(i), a = i;
2865
+ let s;
2866
+ const a = new Promise((i) => {
2867
+ r.subscribe(i), s = i;
2636
2868
  }).then(o);
2637
- return s.cancel = function() {
2638
- r.unsubscribe(a);
2639
- }, s;
2640
- }, t(function(a, s, i) {
2641
- r.reason || (r.reason = new Re(a, s, i), n(r.reason));
2869
+ return a.cancel = function() {
2870
+ r.unsubscribe(s);
2871
+ }, a;
2872
+ }, t(function(s, a, i) {
2873
+ r.reason || (r.reason = new Ne(s, a, i), n(r.reason));
2642
2874
  });
2643
2875
  }
2644
2876
  /**
@@ -2680,22 +2912,22 @@ let Ks = class $n {
2680
2912
  static source() {
2681
2913
  let t;
2682
2914
  return {
2683
- token: new $n(function(o) {
2915
+ token: new er(function(o) {
2684
2916
  t = o;
2685
2917
  }),
2686
2918
  cancel: t
2687
2919
  };
2688
2920
  }
2689
2921
  };
2690
- function Ys(e) {
2922
+ function Ca(e) {
2691
2923
  return function(n) {
2692
2924
  return e.apply(null, n);
2693
2925
  };
2694
2926
  }
2695
- function Xs(e) {
2696
- return d.isObject(e) && e.isAxiosError === !0;
2927
+ function ka(e) {
2928
+ return f.isObject(e) && e.isAxiosError === !0;
2697
2929
  }
2698
- const Ct = {
2930
+ const It = {
2699
2931
  Continue: 100,
2700
2932
  SwitchingProtocols: 101,
2701
2933
  Processing: 102,
@@ -2760,153 +2992,83 @@ const Ct = {
2760
2992
  NotExtended: 510,
2761
2993
  NetworkAuthenticationRequired: 511
2762
2994
  };
2763
- Object.entries(Ct).forEach(([e, t]) => {
2764
- Ct[t] = e;
2995
+ Object.entries(It).forEach(([e, t]) => {
2996
+ It[t] = e;
2765
2997
  });
2766
- function Wn(e) {
2767
- const t = new me(e), n = xn(me.prototype.request, t);
2768
- return d.extend(n, me.prototype, t, { allOwnKeys: !0 }), d.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2769
- return Wn(ge(e, o));
2998
+ function tr(e) {
2999
+ const t = new ye(e), n = Ln(ye.prototype.request, t);
3000
+ return f.extend(n, ye.prototype, t, { allOwnKeys: !0 }), f.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
3001
+ return tr(be(e, o));
2770
3002
  }, n;
2771
3003
  }
2772
- const C = Wn(Me);
2773
- C.Axios = me;
2774
- C.CanceledError = Re;
2775
- C.CancelToken = Ks;
2776
- C.isCancel = Bn;
2777
- C.VERSION = qn;
2778
- C.toFormData = tt;
2779
- C.AxiosError = v;
2780
- C.Cancel = C.CanceledError;
2781
- C.all = function(t) {
3004
+ const N = tr(Fe);
3005
+ N.Axios = ye;
3006
+ N.CanceledError = Ne;
3007
+ N.CancelToken = Aa;
3008
+ N.isCancel = Wn;
3009
+ N.VERSION = Zn;
3010
+ N.toFormData = it;
3011
+ N.AxiosError = v;
3012
+ N.Cancel = N.CanceledError;
3013
+ N.all = function(t) {
2782
3014
  return Promise.all(t);
2783
3015
  };
2784
- C.spread = Ys;
2785
- C.isAxiosError = Xs;
2786
- C.mergeConfig = ge;
2787
- C.AxiosHeaders = J;
2788
- C.formToJSON = (e) => In(d.isHTMLForm(e) ? new FormData(e) : e);
2789
- C.getAdapter = Hn.getAdapter;
2790
- C.HttpStatusCode = Ct;
2791
- C.default = C;
3016
+ N.spread = Ca;
3017
+ N.isAxiosError = ka;
3018
+ N.mergeConfig = be;
3019
+ N.AxiosHeaders = K;
3020
+ N.formToJSON = (e) => qn(f.isHTMLForm(e) ? new FormData(e) : e);
3021
+ N.getAdapter = Qn.getAdapter;
3022
+ N.HttpStatusCode = It;
3023
+ N.default = N;
2792
3024
  const {
2793
- Axios: Ma,
2794
- AxiosError: Pa,
2795
- CanceledError: Ia,
2796
- isCancel: Ba,
2797
- CancelToken: Da,
2798
- VERSION: Fa,
2799
- all: Ua,
2800
- Cancel: ja,
2801
- isAxiosError: za,
2802
- spread: Ha,
2803
- toFormData: qa,
2804
- AxiosHeaders: $a,
2805
- HttpStatusCode: Wa,
2806
- formToJSON: Ja,
2807
- getAdapter: Va,
2808
- mergeConfig: Ka
2809
- } = C;
2810
- var At = /* @__PURE__ */ ((e) => (e[e.DEFAULT = 0] = "DEFAULT", e[e.SANDBOX = 1] = "SANDBOX", e[e.DC = 2] = "DC", e))(At || {}), fn;
2811
- ((e) => {
2812
- function t(n) {
2813
- switch (n) {
2814
- case "_23":
2815
- return 2 / 3;
2816
- case "_32":
2817
- return 3 / 2;
2818
- case "square":
2819
- return 1 / 1;
2820
- case "sd":
2821
- return 4 / 3;
2822
- case "hd":
2823
- return 16 / 9;
2824
- case "digital":
2825
- return 21 / 9;
2826
- case "imax_film":
2827
- return 14 / 10;
2828
- case "imax_digital":
2829
- return 19 / 10;
2830
- }
2831
- }
2832
- e.toNumber = t;
2833
- })(fn || (fn = {}));
2834
- const Jn = (e, t) => {
2835
- let n = 0;
2836
- typeof e == "string" ? n = e.length : n = e;
2837
- const r = n.toString().split("").reduce((o, a) => (o += parseInt(a), o), 0) || 0;
2838
- return r >= t ? Jn(r, t) : r;
2839
- };
2840
- var hn;
2841
- ((e) => {
2842
- function t(r) {
2843
- return `vc-${r}`;
2844
- }
2845
- e.toStyle = t;
2846
- function n(r = "") {
2847
- const o = [
2848
- "gray",
2849
- "gold",
2850
- "bronze",
2851
- "brown",
2852
- "yellow",
2853
- "amber",
2854
- "orange",
2855
- "tomato",
2856
- "red",
2857
- "ruby",
2858
- "crimson",
2859
- "pink",
2860
- "plum",
2861
- "purple",
2862
- "violet",
2863
- "iris",
2864
- "indigo",
2865
- "blue",
2866
- "cyan",
2867
- "teal",
2868
- "jade",
2869
- "green",
2870
- "grass",
2871
- "lime",
2872
- "mint",
2873
- "sky"
2874
- ];
2875
- return `vc-${o[Jn(r, o.length)]}`;
2876
- }
2877
- e.toAvatar = n;
2878
- })(hn || (hn = {}));
2879
- const Nt = "useAxios", Gs = async (e = (n) => {
2880
- }, t) => (t.domain_type === At.SANDBOX || (t.domain_type, At.DC), t.baseURL = void 0, U.debug(Nt, `baseURL::${t.baseURL}`), e(t), t), Qs = async (e = (n) => {
3025
+ Axios: hi,
3026
+ AxiosError: mi,
3027
+ CanceledError: gi,
3028
+ isCancel: wi,
3029
+ CancelToken: yi,
3030
+ VERSION: bi,
3031
+ all: vi,
3032
+ Cancel: Ei,
3033
+ isAxiosError: Si,
3034
+ spread: xi,
3035
+ toFormData: Ti,
3036
+ AxiosHeaders: _i,
3037
+ HttpStatusCode: Ri,
3038
+ formToJSON: Oi,
3039
+ getAdapter: Ni,
3040
+ mergeConfig: Ai
3041
+ } = N, Pt = "useAxios", La = async (e = (n) => {
3042
+ }, t) => (t.baseURL = Jr(), j.debug(Pt, `baseURL::${t.baseURL}`), e(t), t), Da = async (e = (n) => {
2881
3043
  }, t) => {
2882
3044
  var r;
2883
3045
  if (e(t), t.response.status !== 500) {
2884
3046
  if (t.response.status <= 401)
2885
- return U.info(Nt, t.response.data.meta), Promise.reject(t.response.data.meta);
3047
+ return j.info(Pt, t.response.data.meta), Promise.reject(t.response.data.meta);
2886
3048
  if (t.response.status === 404)
2887
- return U.info(Nt, t.response.data.meta), Promise.reject(t.response.data.meta);
3049
+ return j.info(Pt, t.response.data.meta), Promise.reject(t.response.data.meta);
2888
3050
  }
2889
3051
  let n;
2890
3052
  try {
2891
3053
  let o = "";
2892
- t.request.config && t.request.config.token_type ? o = t.request.config.token_type : t.response.config && t.response.config.token_type && (o = t.response.config.token_type), n = C(t.response.config);
3054
+ t.request.config && t.request.config.token_type ? o = t.request.config.token_type : t.response.config && t.response.config.token_type && (o = t.response.config.token_type), n = N(t.response.config);
2893
3055
  } catch (o) {
2894
3056
  (r = o == null ? void 0 : o.data) != null && r.meta ? n = Promise.reject(o.data.meta) : o.data ? n = Promise.reject(o.data) : n = Promise.reject(o);
2895
3057
  }
2896
3058
  return n;
2897
- }, $e = "useAxios", Ya = ({ onRequest: e, onError: t }) => {
2898
- C.interceptors.request.use((n) => Gs(e, n)), C.interceptors.response.use(
3059
+ }, Ye = "useAxios", Ci = ({ onRequest: e, onError: t }) => {
3060
+ N.interceptors.request.use((n) => La(e, n)), N.interceptors.response.use(
2899
3061
  (n) => n.data.data,
2900
- (n) => Qs(t, n)
2901
- ), C.defaults.headers.common["content-type"] = "application/json";
2902
- }, Xa = {
2903
- get: async (e, t) => (U.debug($e, `[get] url | ${e}`), C.get(e, t)),
2904
- post: async (e, t, n) => (U.debug($e, `[post] url | ${e} | payload | ${t}`), C.post(e, t, n)),
2905
- put: async (e, t, n) => (U.debug($e, `[put] url | ${e} | payload | ${t}`), C.put(e, t, n)),
2906
- delete: async (e, t) => (U.debug($e, `[delete] url | ${e}`), C.delete(e, t))
3062
+ (n) => Da(t, n)
3063
+ ), N.defaults.headers.common["content-type"] = "application/json";
3064
+ }, ki = {
3065
+ get: async (e, t) => (j.debug(Ye, `[get] url | ${e}`), N.get(e, t)),
3066
+ post: async (e, t, n) => (j.debug(Ye, `[post] url | ${e} | payload | ${t}`), N.post(e, t, n)),
3067
+ put: async (e, t, n) => (j.debug(Ye, `[put] url | ${e} | payload | ${t}`), N.put(e, t, n)),
3068
+ delete: async (e, t) => (j.debug(Ye, `[delete] url | ${e}`), N.delete(e, t))
2907
3069
  };
2908
- var G = /* @__PURE__ */ ((e) => (e.MINI_MOBILE = "mob-sm", e.MOBILE_PORTRAIT = "mob", e.MOBILE_LANDSCAPE = "mob-l", e.MOBILE_LANDSCAPE_XL = "mob-xl", e.TAB_PORTRAIT = "tab", e.TAB_LANDSCAPE = "tab-l", e.LAPTOP = "lap", e.DESKTOP = "desk", e))(G || {});
2909
- const pn = {
3070
+ var Q = /* @__PURE__ */ ((e) => (e.MINI_MOBILE = "mob-sm", e.MOBILE_PORTRAIT = "mob", e.MOBILE_LANDSCAPE = "mob-l", e.MOBILE_LANDSCAPE_XL = "mob-xl", e.TAB_PORTRAIT = "tab", e.TAB_LANDSCAPE = "tab-l", e.LAPTOP = "lap", e.DESKTOP = "desk", e))(Q || {});
3071
+ const Sn = {
2910
3072
  /* suresh/NOTE: iPhone 15 device size */
2911
3073
  iphone_15: { width: { min: 850, max: 854 }, height: { min: 390, max: 395 } },
2912
3074
  /* suresh/NOTE: Iphone 14 pro max device size */
@@ -2972,18 +3134,18 @@ const pn = {
2972
3134
  },
2973
3135
  /* suresh/NOTE: Nokia N9 device size */
2974
3136
  nokia_n9: { width: { min: 853, max: 855 }, height: { min: 478, max: 482 } }
2975
- }, Vn = () => ({ width: window.innerWidth, height: window.innerHeight }), Zs = ({ width: e, height: t }) => {
2976
- const { width: n, height: r } = Vn();
3137
+ }, nr = () => ({ width: window.innerWidth, height: window.innerHeight }), Ma = ({ width: e, height: t }) => {
3138
+ const { width: n, height: r } = nr();
2977
3139
  return e.min <= n && e.max >= n && t.min <= r && t.max >= r;
2978
- }, ea = () => {
2979
- for (const r of Object.keys(pn)) {
2980
- const o = pn[r];
2981
- if (Zs(o))
2982
- return o.vdevice || G.MOBILE_LANDSCAPE_XL;
2983
- }
2984
- const { width: e, height: t } = Vn(), n = t >= e;
2985
- return e <= 320 ? G.MINI_MOBILE : e <= 480 && e >= 320 ? G.MOBILE_PORTRAIT : e <= 767 && e >= 481 ? G.MOBILE_LANDSCAPE : e <= 1024 && e >= 768 ? n ? G.TAB_PORTRAIT : G.TAB_LANDSCAPE : e <= 1280 && e >= 1025 ? G.LAPTOP : (e >= 1281, G.DESKTOP);
2986
- }, ta = ["h1", "h3", "blockquote", "br"], na = {
3140
+ }, Ia = () => {
3141
+ for (const r of Object.keys(Sn)) {
3142
+ const o = Sn[r];
3143
+ if (Ma(o))
3144
+ return o.vdevice || Q.MOBILE_LANDSCAPE_XL;
3145
+ }
3146
+ const { width: e, height: t } = nr(), n = t >= e;
3147
+ return e <= 320 ? Q.MINI_MOBILE : e <= 480 && e >= 320 ? Q.MOBILE_PORTRAIT : e <= 767 && e >= 481 ? Q.MOBILE_LANDSCAPE : e <= 1024 && e >= 768 ? n ? Q.TAB_PORTRAIT : Q.TAB_LANDSCAPE : e <= 1280 && e >= 1025 ? Q.LAPTOP : (e >= 1281, Q.DESKTOP);
3148
+ }, Pa = ["h1", "h3", "blockquote", "br"], Ba = {
2987
3149
  strong: "*",
2988
3150
  b: "*",
2989
3151
  i: "_",
@@ -2996,7 +3158,7 @@ const pn = {
2996
3158
  h3: "### ",
2997
3159
  br: `
2998
3160
  `
2999
- }, D = {
3161
+ }, F = {
3000
3162
  bold: /(^|\s|[{\[])\*{1,2}(.*?\S *)?\*{1,2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
3001
3163
  // *md*
3002
3164
  italic: /(^|\s|[{\[])\_(.*?\S *)?\_(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
@@ -3038,13 +3200,13 @@ const pn = {
3038
3200
  // vtypes
3039
3201
  gdrive_url: /(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,
3040
3202
  vtype: /(?:vtype=(?:'|"|&quot;)(image|audio|video)(?:'|"|&quot;))/
3041
- }, vt = (e) => e.replace(/\*/g, "&ast;").replace(/\_/g, "&#95;").replace(/\~/g, "&#126;"), ra = (e) => e.replace(/&ast;/g, "*").replace(/&#95;/g, "_").replace(/&#126;/g, "~"), mn = (e) => (e && typeof e == "string" && (e = e.replace(/&#39;|&#x27;/g, "'").replace(/&quot;/g, '"').replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&").replace(/&#x2F;/g, "/").replace(/&nbsp;/g, " ").replace(/%2C/g, ",")), e), xe = (e, t) => {
3203
+ }, Rt = (e) => e.replace(/\*/g, "&ast;").replace(/\_/g, "&#95;").replace(/\~/g, "&#126;"), Fa = (e) => e.replace(/&ast;/g, "*").replace(/&#95;/g, "_").replace(/&#126;/g, "~"), xn = (e) => (e && typeof e == "string" && (e = e.replace(/&#39;|&#x27;/g, "'").replace(/&quot;/g, '"').replace(/&gt;/g, ">").replace(/&lt;/g, "<").replace(/&amp;/g, "&").replace(/&#x2F;/g, "/").replace(/&nbsp;/g, " ").replace(/%2C/g, ",")), e), _e = (e, t) => {
3042
3204
  let n = "", r = "";
3043
3205
  return (e[0] === `
3044
3206
  ` || e[0] === " ") && (n = e[0]), (e[e.length - 1] === `
3045
3207
  ` || e[e.length - 1] === " ") && (r = e[e.length - 1]), n + t + r;
3046
- }, gn = (e) => new RegExp(`<${e}.*?/?>`, "gm"), wn = (e) => {
3047
- let t = e.match(D.gdrive_url);
3208
+ }, Tn = (e) => new RegExp(`<${e}.*?/?>`, "gm"), _n = (e) => {
3209
+ let t = e.match(F.gdrive_url);
3048
3210
  if (t && t.length > 1 && t[1])
3049
3211
  return `http://docs.google.com/uc?export=open&id=${t[1]}`;
3050
3212
  if (e.startsWith("@")) {
@@ -3053,58 +3215,58 @@ const pn = {
3053
3215
  return `http://docs.google.com/uc?export=open&id=${n[1]}`;
3054
3216
  }
3055
3217
  return e;
3056
- }, yn = (e = "", t = "", n = "", r = "") => {
3218
+ }, Rn = (e = "", t = "", n = "", r = "") => {
3057
3219
  let o = "image";
3058
3220
  if (r.length) {
3059
- let a = r.match(D.vtype);
3060
- a && a.length > 1 && a[1] && (o = a[1]);
3221
+ let s = r.match(F.vtype);
3222
+ s && s.length > 1 && s[1] && (o = s[1]);
3061
3223
  }
3062
3224
  return o == "audio" ? `<audio vmd="audio" controls ${r}>
3063
3225
  <source src="${n}" type="audio/mp3"/>
3064
3226
  </audio>` : o == "video" ? `<video vmd="video" controls ${r}>
3065
3227
  <source src="${n}" type="video/mp4"/>
3066
3228
  </video>` : `<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`;
3067
- }, Ga = {
3068
- applyReverseMarkdown: (e) => (e = e.replace(gn("br"), `
3069
- `), e = mn(e), e = Markdown.reverseAnchor(e), e = e.replace(gn("hr"), " --- "), e = Markdown.reverseRecursive(e), e.trim()),
3229
+ }, Li = {
3230
+ applyReverseMarkdown: (e) => (e = e.replace(Tn("br"), `
3231
+ `), e = xn(e), e = Markdown.reverseAnchor(e), e = e.replace(Tn("hr"), " --- "), e = Markdown.reverseRecursive(e), e.trim()),
3070
3232
  reverseRecursive: (e) => {
3071
3233
  let n = new DOMParser().parseFromString(e, "text/html").body.childNodes, r = e === `
3072
3234
  ` ? `
3073
3235
  ` : "";
3074
3236
  return Array.from(n).forEach((o) => {
3075
- let a = o.nodeType === Node.TEXT_NODE, s = !a && o.tagName.toLowerCase();
3237
+ let s = o.nodeType === Node.TEXT_NODE, a = !s && o.tagName.toLowerCase();
3076
3238
  const i = o.innerText;
3077
3239
  if (i && (i.trim() || i.includes(`
3078
- `)) || a || s === "br") {
3079
- if (a)
3240
+ `)) || s || a === "br") {
3241
+ if (s)
3080
3242
  return r += o.data;
3081
- let u = na[s] || "", c = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
3243
+ let u = Ba[a] || "", c = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
3082
3244
  r += !c.trim() && c.includes(`
3083
3245
  `) ? `
3084
3246
  ` : "";
3085
- let f = c[c.length - 1] === `
3086
- `, p = ta.includes(s) ? "" : u;
3087
- r += u + (f ? c.slice(0, c.length - 1) + p + `
3088
- ` : c + p);
3247
+ let d = c[c.length - 1] === `
3248
+ `, h = Pa.includes(a) ? "" : u;
3249
+ r += u + (d ? c.slice(0, c.length - 1) + h + `
3250
+ ` : c + h);
3089
3251
  }
3090
3252
  }), r;
3091
3253
  },
3092
3254
  reverseAnchor: (e) => {
3093
- let { anchor_tag: t, href: n } = D;
3094
- return e.replace(t, (r, o, a) => {
3095
- const s = a;
3255
+ let { anchor_tag: t, href: n } = F;
3256
+ return e.replace(t, (r, o, s) => {
3257
+ const a = s;
3096
3258
  let i;
3097
3259
  return o.replace(n, (u, c) => {
3098
3260
  i = c;
3099
- }), i.includes("mailto:") ? i.replace("mailto:", "") : `${e[e.indexOf(r) - 1] !== " " ? " " : ""}[${s}](${encodeURI(i)})`;
3261
+ }), i.includes("mailto:") ? i.replace("mailto:", "") : `${e[e.indexOf(r) - 1] !== " " ? " " : ""}[${a}](${encodeURI(i)})`;
3100
3262
  });
3101
3263
  },
3102
3264
  // md-apply
3103
- applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e = mn(e), e = e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/<br>/g, `
3104
- `).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e = ra(e), '<div class="vmd">' + e + "</div>"),
3105
- applyRecursive: (e, t = !1) => (e = e.replace(D.bold, Markdown.getBoldHTML), e = e.replace(D.italic, Markdown.getItalicHTML), e = e.replace(D.underline, Markdown.getUnderLineHTML), e = e.replace(D.strike, Markdown.getStrikeHTML), e = e.replace(D.line, Markdown.getLineHTML), e = e.replace(D.bullet, Markdown.getBulletHTML), e = e.replace(D.numlist, Markdown.getNumlistHTML), t || (e = e.replace(D.video, Markdown.getVideoHTML), e = e.replace(D.image, Markdown.getImageHTML)), e = e.replace(D.link, Markdown.getLinkHTML), e),
3106
- applyOnce: (e) => (e = e.replace(D.blockquote, Markdown.getBlockQuoteHTML), e = e.replace(D.heading, Markdown.getHeadingHTML), e = e.replace(D.codeblock, Markdown.getCodeblockHTML), e = e.replace(D.monospace, Markdown.getMonoSpaceHTML), e),
3107
- applyNextLine: (e) => e.replace(D.nextline, Markdown.getNextLineHTML),
3265
+ applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e = xn(e), e = e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/<br>/g, `
3266
+ `).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e = Fa(e), '<div class="vmd">' + e + "</div>"),
3267
+ applyRecursive: (e, t = !1) => (e = e.replace(F.bold, Markdown.getBoldHTML), e = e.replace(F.italic, Markdown.getItalicHTML), e = e.replace(F.underline, Markdown.getUnderLineHTML), e = e.replace(F.strike, Markdown.getStrikeHTML), e = e.replace(F.line, Markdown.getLineHTML), e = e.replace(F.bullet, Markdown.getBulletHTML), e = e.replace(F.numlist, Markdown.getNumlistHTML), t || (e = e.replace(F.video, Markdown.getVideoHTML), e = e.replace(F.image, Markdown.getImageHTML)), e = e.replace(F.link, Markdown.getLinkHTML), e),
3268
+ applyOnce: (e) => (e = e.replace(F.blockquote, Markdown.getBlockQuoteHTML), e = e.replace(F.heading, Markdown.getHeadingHTML), e = e.replace(F.codeblock, Markdown.getCodeblockHTML), e = e.replace(F.monospace, Markdown.getMonoSpaceHTML), e),
3269
+ applyNextLine: (e) => e.replace(F.nextline, Markdown.getNextLineHTML),
3108
3270
  // md-helper
3109
3271
  getBoldHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "*" || n[n.length - 1] === "*" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strong vmd="bold">' + Markdown.applyRecursive(n) + "</strong> ",
3110
3272
  getItalicHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "_" || n[n.length - 1] === "_" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <i vmd="italic">' + Markdown.applyRecursive(n) + "</i> ",
@@ -3112,34 +3274,34 @@ const pn = {
3112
3274
  getStrikeHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "~" || n[n.length - 1] === "~" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strike vmd="strike">' + Markdown.applyRecursive(n) + "</strike> ",
3113
3275
  getHeadingHTML: (e, t, n) => {
3114
3276
  let r = t.length;
3115
- return xe(
3277
+ return _e(
3116
3278
  e,
3117
- " <h" + r + ` vmd="h${r}">` + vt(n) + "</h" + r + "> "
3279
+ " <h" + r + ` vmd="h${r}">` + Rt(n) + "</h" + r + "> "
3118
3280
  );
3119
3281
  },
3120
- getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? xe(
3282
+ getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? _e(
3121
3283
  e,
3122
3284
  ' <blockquote vmd="blockquote"><p>' + Markdown.applyRecursive(t) + "</p></blockquote> "
3123
3285
  ) : e),
3124
- getMonoSpaceHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "`" || n[n.length - 1] === "`" || n[0] === " " && n[n.length - 1] === " " ? e : t + ' <code vmd="monospace" class="code">&ldquo;' + vt(n) + "&rdquo;</code> ",
3286
+ getMonoSpaceHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "`" || n[n.length - 1] === "`" || n[0] === " " && n[n.length - 1] === " " ? e : t + ' <code vmd="monospace" class="code">&ldquo;' + Rt(n) + "&rdquo;</code> ",
3125
3287
  getCodeblockHTML: (e, t, n) => n.trim().length === 0 ? e : t + ' <pre vmd="codeblock"> ' + Markdown.applyRecursive(n) + "</pre>",
3126
3288
  getNextLineHTML: (e, t, n, r) => t + ' <br vmd="br" > ' + r,
3127
3289
  getLineHTML: (e, t, n, r) => t + '<hr vmd="line" class="hr w100">' + Markdown.applyRecursive(r.trim()),
3128
3290
  getLinkHTML: (e, t, n, r, o) => {
3129
- var a = r.startsWith("www.") ? "http://" + r : r;
3291
+ var s = r.startsWith("www.") ? "http://" + r : r;
3130
3292
  return t + ` <a vmd="link" href="${encodeURI(
3131
- a
3132
- )}" rel="noopener noreferrer" ${o}>${vt(n)}</a>`;
3293
+ s
3294
+ )}" rel="noopener noreferrer" ${o}>${Rt(n)}</a>`;
3133
3295
  },
3134
3296
  getImageHTML: (e, t, n, r, o) => {
3135
- let a = yn(t, r, wn(n), o);
3136
- return xe(e, a);
3297
+ let s = Rn(t, r, _n(n), o);
3298
+ return _e(e, s);
3137
3299
  },
3138
- getVideoHTML: (e, t, n, r, o, a, s, i) => {
3139
- let u = yn(t, r, wn(n), o);
3140
- return xe(
3300
+ getVideoHTML: (e, t, n, r, o, s, a, i) => {
3301
+ let u = Rn(t, r, _n(n), o);
3302
+ return _e(
3141
3303
  e,
3142
- `<a vmd="hyperlink" href="${a}" title="${s}" rel="noreferrer" ${i}>${u}</a>`
3304
+ `<a vmd="hyperlink" href="${s}" title="${a}" rel="noreferrer" ${i}>${u}</a>`
3143
3305
  );
3144
3306
  },
3145
3307
  getBulletHTML: (e) => {
@@ -3147,29 +3309,29 @@ const pn = {
3147
3309
  if (e.replace(/\s/g, "").replace(/\*/g, "").length == 0)
3148
3310
  return e;
3149
3311
  } else return e;
3150
- return xe(
3312
+ return _e(
3151
3313
  e,
3152
3314
  ' <ul vmd="list-bullet" style="list-style-type: disc; list-style: inherit;">' + ((n) => {
3153
3315
  let r = "";
3154
3316
  for (var o = n.split(`
3155
- `), a = 0; a < o.length; a++)
3156
- o[a] = o[a].replace(/[\-|●|○]/, "-"), o[a].includes("-") && (r += o[a].replace(/\-/, ' <li style="list-style: inherit"> ') + "</li> ");
3317
+ `), s = 0; s < o.length; s++)
3318
+ o[s] = o[s].replace(/[\-|●|○]/, "-"), o[s].includes("-") && (r += o[s].replace(/\-/, ' <li style="list-style: inherit"> ') + "</li> ");
3157
3319
  return r;
3158
3320
  })(e) + "</ul> "
3159
3321
  );
3160
3322
  },
3161
- getNumlistHTML: (e) => isNaN(e) ? xe(
3323
+ getNumlistHTML: (e) => isNaN(e) ? _e(
3162
3324
  e,
3163
3325
  ' <ol vmd="list-number">' + ((n) => {
3164
3326
  let r = "";
3165
3327
  for (var o = n.split(`
3166
- `), a = 0; a < o.length; a++)
3167
- o[a] = o[a].replace(/(\d)*(\.)/, "-"), o[a].includes("-") && (r += o[a].replace(/\-/, '<li style="list-style: decimal"> ') + "</li>");
3328
+ `), s = 0; s < o.length; s++)
3329
+ o[s] = o[s].replace(/(\d)*(\.)/, "-"), o[s].includes("-") && (r += o[s].replace(/\-/, '<li style="list-style: decimal"> ') + "</li>");
3168
3330
  return r;
3169
3331
  })(e) + "</ol> "
3170
3332
  ) : e
3171
3333
  };
3172
- function Qa() {
3334
+ function Di() {
3173
3335
  return { toTop: () => {
3174
3336
  window.scrollTo({
3175
3337
  top: 0,
@@ -3180,106 +3342,106 @@ function Qa() {
3180
3342
  top: window.innerHeight,
3181
3343
  behavior: "smooth"
3182
3344
  });
3183
- }, byId: (o = "", a = !0) => {
3184
- const s = document.getElementById(o);
3345
+ }, byId: (o = "", s = !0) => {
3346
+ const a = document.getElementById(o);
3185
3347
  let i = "start";
3186
- if (a) {
3187
- const u = ea();
3188
- i = u === G.MINI_MOBILE || u === G.MOBILE_PORTRAIT ? "start" : "center";
3348
+ if (s) {
3349
+ const u = Ia();
3350
+ i = u === Q.MINI_MOBILE || u === Q.MOBILE_PORTRAIT ? "start" : "center";
3189
3351
  }
3190
- s == null || s.scrollIntoView({
3352
+ a == null || a.scrollIntoView({
3191
3353
  behavior: "smooth",
3192
3354
  block: i
3193
3355
  });
3194
3356
  }, byIdOffSet: (o = "") => {
3195
- const a = document.getElementById(o), s = 75, i = document.body.getBoundingClientRect().top, f = a.getBoundingClientRect().top - i - s;
3357
+ const s = document.getElementById(o), a = 75, i = document.body.getBoundingClientRect().top, d = s.getBoundingClientRect().top - i - a;
3196
3358
  window.scroll({
3197
- top: f,
3359
+ top: d,
3198
3360
  behavior: "smooth"
3199
3361
  });
3200
3362
  } };
3201
3363
  }
3202
- function Za({
3364
+ function Mi({
3203
3365
  meta: e = !1,
3204
3366
  ctrl: t = !1,
3205
3367
  shift: n = !1,
3206
3368
  key: r,
3207
3369
  handler: o
3208
3370
  }) {
3209
- Y("keydown", (a) => {
3210
- if (a.metaKey === e) {
3211
- if (a.ctrlKey !== t) return;
3212
- if (a.shiftKey !== n) return;
3213
- a.key === r && (a.stopImmediatePropagation(), a.preventDefault(), a.stopPropagation(), o());
3371
+ G("keydown", (s) => {
3372
+ if (s.metaKey === e) {
3373
+ if (s.ctrlKey !== t) return;
3374
+ if (s.shiftKey !== n) return;
3375
+ s.key === r && (s.stopImmediatePropagation(), s.preventDefault(), s.stopPropagation(), o());
3214
3376
  }
3215
3377
  });
3216
3378
  }
3217
- const oa = "useStore";
3218
- let Kn = "v0xapp", Yn = "1.0.5-alpha";
3219
- function We(e) {
3220
- return `vezham-ls-${Kn}-${Yn}-${e}`;
3379
+ const Ua = "useStore";
3380
+ let rr = "v0xapp", or = "1.0.5-alpha";
3381
+ function Je(e) {
3382
+ return `vezham-ls-${rr}-${or}-${e}`;
3221
3383
  }
3222
- const ei = (e) => {
3223
- e.pretext && (Kn = e.pretext), e.version && (Yn = e.version);
3224
- }, sa = {
3384
+ const Ii = (e) => {
3385
+ e.pretext && (rr = e.pretext), e.version && (or = e.version);
3386
+ }, ja = {
3225
3387
  get: (e, t) => {
3226
3388
  try {
3227
- const n = window.localStorage.getItem(We(e));
3389
+ const n = window.localStorage.getItem(Je(e));
3228
3390
  return n && n !== "undefined" ? n : t || "";
3229
3391
  } catch (n) {
3230
- return U.error(oa, `key | ${We(e)} | err: `, n), t || "";
3392
+ return j.error(Ua, `key | ${Je(e)} | err: `, n), t || "";
3231
3393
  }
3232
3394
  },
3233
- has: (e) => !!sa.get(e),
3234
- set: (e, t) => window.localStorage.setItem(We(e), t),
3235
- delete: (e) => window.localStorage.removeItem(We(e)),
3395
+ has: (e) => !!ja.get(e),
3396
+ set: (e, t) => window.localStorage.setItem(Je(e), t),
3397
+ delete: (e) => window.localStorage.removeItem(Je(e)),
3236
3398
  purge: () => window.localStorage.clear()
3237
3399
  };
3238
3400
  export {
3239
- ea as GetDevice,
3240
- G as Vdevice,
3241
- Ya as defineAxios,
3242
- ei as defineStore,
3243
- Xa as useAxios,
3244
- lo as useBoolean,
3245
- la as useClickAnyWhere,
3246
- ca as useCopyToClipboard,
3247
- ua as useCountdown,
3248
- co as useCounter,
3249
- da as useDarkMode,
3250
- Lt as useDebounceCallback,
3251
- fa as useDebounceValue,
3252
- ha as useDocumentTitle,
3253
- pa as useEffect,
3254
- Ye as useEventCallback,
3255
- Y as useEventListener,
3256
- ma as useHover,
3257
- ga as useIntersectionObserver,
3258
- uo as useInterval,
3259
- wa as useIsClient,
3260
- mo as useIsFirstRender,
3261
- go as useIsMounted,
3262
- ne as useIsomorphicLayoutEffect,
3263
- bn as useLocalStorage,
3264
- U as useLogger,
3265
- ya as useMap,
3266
- Ga as useMarkdown,
3267
- vn as useMediaQuery,
3268
- ba as useOnClickOutside,
3269
- va as useReadLocalStorage,
3270
- Sa as useResizeObserver,
3271
- xa as useScreen,
3272
- Ea as useScript,
3273
- Ra as useScrollLock,
3274
- Qa as useScrollTo,
3275
- Ta as useSessionStorage,
3276
- Za as useShortcut,
3277
- Oa as useStep,
3278
- sa as useStore,
3279
- ka as useTernaryDarkMode,
3280
- Ca as useTimeout,
3281
- Hr as useToast,
3282
- Aa as useToggle,
3283
- Sn as useUnmount,
3284
- Na as useWindowSize
3401
+ Ia as GetDevice,
3402
+ Q as Vdevice,
3403
+ Ci as defineAxios,
3404
+ Ii as defineStore,
3405
+ ki as useAxios,
3406
+ Vo as useBoolean,
3407
+ za as useClickAnyWhere,
3408
+ Va as useCopyToClipboard,
3409
+ qa as useCountdown,
3410
+ qo as useCounter,
3411
+ Wa as useDarkMode,
3412
+ Ut as useDebounceCallback,
3413
+ Ka as useDebounceValue,
3414
+ Ya as useDocumentTitle,
3415
+ Ja as useEffect,
3416
+ et as useEventCallback,
3417
+ G as useEventListener,
3418
+ Ga as useHover,
3419
+ Xa as useIntersectionObserver,
3420
+ Wo as useInterval,
3421
+ Qa as useIsClient,
3422
+ Go as useIsFirstRender,
3423
+ Xo as useIsMounted,
3424
+ re as useIsomorphicLayoutEffect,
3425
+ An as useLocalStorage,
3426
+ j as useLogger,
3427
+ Za as useMap,
3428
+ Li as useMarkdown,
3429
+ Cn as useMediaQuery,
3430
+ ei as useOnClickOutside,
3431
+ ti as useReadLocalStorage,
3432
+ ni as useResizeObserver,
3433
+ ri as useScreen,
3434
+ oi as useScript,
3435
+ si as useScrollLock,
3436
+ Di as useScrollTo,
3437
+ ai as useSessionStorage,
3438
+ Mi as useShortcut,
3439
+ ii as useStep,
3440
+ ja as useStore,
3441
+ li as useTernaryDarkMode,
3442
+ ci as useTimeout,
3443
+ _o as useToast,
3444
+ ui as useToggle,
3445
+ kn as useUnmount,
3446
+ di as useWindowSize
3285
3447
  };