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