@panosen/agent-ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,2449 @@
1
+
2
+ (function() {
3
+ if (typeof document !== 'undefined') {
4
+ var style = document.createElement('style');
5
+ style.textContent = "@charset \"UTF-8\";._container_pv14e_1{height:100%;-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);padding:20px;display:flex;gap:12px;align-items:flex-start;box-sizing:border-box;position:relative}._input_pv14e_12{flex:1;height:100%;padding:12px 18px;background:color-mix(in srgb,var(--theme-input-border) 10%,transparent);border:1px solid var(--theme-input-border);border-radius:12px;font-family:inherit;font-size:14px;color:var(--theme-input-color);line-height:1.6;resize:none;outline:none;transition:all .3s ease;box-sizing:border-box;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 2px 8px var(--theme-input-shadow)}._input_pv14e_12::placeholder{color:var(--theme-input-placeholder-color);opacity:.6}._input_pv14e_12:disabled{background:var(--theme-input-disabled-background);color:var(--theme-input-disabled-color);cursor:not-allowed;border-color:var(--theme-input-disabled-border);opacity:.6}._submit_pv14e_42{padding:12px 32px;color:var(--theme-submit-color);border:1px solid var(--theme-submit-border);background:color-mix(in srgb,var(--theme-submit-background) 10%,transparent);border-radius:12px;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;position:relative;overflow:hidden;transition:all .3s ease;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 2px 8px var(--theme-shadow-message-user)}._submit_pv14e_42:hover:not(:disabled){background:var(--theme-submit-hover-background);box-shadow:0 4px 16px var(--theme-shadow-message-user);transform:translateY(-2px)}._submit_pv14e_42:active:not(:disabled){transform:translateY(0);box-shadow:0 2px 8px var(--theme-shadow-message-user)}._submit_pv14e_42:disabled{cursor:not-allowed;transform:none;opacity:.5;background:color-mix(in srgb,var(--theme-submit-background) 5%,transparent)}._panel_1qg86_2{width:100%;height:100%;display:flex;flex-direction:column;position:relative;overflow:hidden;background-color:var(--theme-background-color)}._panel_1qg86_2:after{content:\"\";position:absolute;top:0;left:-100%;width:100%;height:2px;background:linear-gradient(90deg,transparent,var(--theme-animation-gradient-start),var(--theme-animation-gradient-mid),var(--theme-animation-gradient-end));animation:_scanLine_1qg86_1 3s ease-in-out infinite}._content_1qg86_24{flex:1;display:flex;flex-direction:column;overflow:hidden;position:relative;z-index:1}._error_1qg86_34{padding:16px 24px;background:var(--theme-error-background);color:var(--theme-error-color);border:1px solid var(--theme-error-border);border-left:4px solid var(--theme-error-border-left);margin:10px 20px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);animation:_errorPulse_1qg86_1 2s ease-in-out infinite}@keyframes _gridMove_1qg86_1{0%{transform:translate(0)}to{transform:translate(50px,50px)}}@keyframes _scanLine_1qg86_1{0%,to{left:-100%;opacity:0}50%{opacity:1}to{left:100%}}@keyframes _errorPulse_1qg86_1{0%,to{box-shadow:0 4px 16px var(--theme-error-shadow-color)}50%{box-shadow:0 4px 24px var(--theme-error-shadow-color);opacity:1.2}}._loading_21l9u_1{display:flex;align-items:center;gap:12px;padding:16px 20px;background:var(--theme-message-loading);border:1px solid rgba(59,130,246,.2);border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);margin:8px 0}._loading_21l9u_1 ._content_21l9u_12{display:flex;align-items:center;gap:8px;color:#bfdbfe;font-size:13px;font-weight:500}._loading_21l9u_1 ._dot_21l9u_20{width:8px;height:8px;background:linear-gradient(135deg,#3b82f6,#8b5cf6);border-radius:50%;animation:_bounce_21l9u_1 1.4s infinite ease-in-out}._loading_21l9u_1 ._dot_21l9u_20:nth-child(1){animation-delay:-.32s}._loading_21l9u_1 ._dot_21l9u_20:nth-child(2){animation-delay:-.16s}._loading_21l9u_1 ._dot_21l9u_20:nth-child(3){animation-delay:0s}._time_21l9u_37{color:#64748b;font-size:10px;margin-bottom:4px;opacity:0;transition:opacity .3s;pointer-events:none;font-family:Courier New,monospace}._message_21l9u_47{display:flex;flex-direction:column;animation:_fadeIn_21l9u_1 .4s ease-out;margin:12px 0}._message_21l9u_47:hover ._time_21l9u_37{opacity:1}._message_21l9u_47._user_21l9u_56{align-items:flex-end}._message_21l9u_47._user_21l9u_56 ._content_21l9u_12{background:color-mix(in srgb,var(--theme-message-user) 10%,transparent);border:1px solid var(--theme-message-user);box-shadow:0 2px 8px color-mix(in srgb,var(--theme-message-user) 30%,transparent);color:var(--theme-text-color)}._message_21l9u_47._user_21l9u_56 ._time_21l9u_37{color:#6ee7b7}._message_21l9u_47._assistant_21l9u_68{align-items:flex-start}._message_21l9u_47._assistant_21l9u_68 ._content_21l9u_12{background:color-mix(in srgb,var(--theme-message-assistant) 10%,transparent);border:1px solid var(--theme-message-assistant);box-shadow:0 2px 8px color-mix(in srgb,var(--theme-message-assistant) 30%,transparent);color:var(--theme-text-color)}._message_21l9u_47._assistant_21l9u_68 ._time_21l9u_37{color:#93c5fd}._tool_21l9u_81{display:inline-flex;align-items:center;gap:10px;padding:12px 20px;background:color-mix(in srgb,var(--theme-message-tool) 10%,transparent);border:1px solid var(--theme-message-tool);border-radius:10px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 2px 8px color-mix(in srgb,var(--theme-message-tool) 30%,transparent);transition:all .3s ease;font-size:13px;font-weight:500;color:var(--theme-text-color);position:relative;overflow:hidden}._tool_21l9u_81 ._toolIcon_21l9u_98{font-size:18px;z-index:1}._tool_21l9u_81._completed_21l9u_102 ._toolIcon_21l9u_98{animation:_checkBounce_21l9u_1 .6s ease-out}._content_21l9u_12{max-width:70%;padding:12px 18px;color:#f1f5f9;line-height:1.6;word-wrap:break-word;white-space:pre-wrap;border-radius:12px;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);position:relative;font-size:14px}@keyframes _fadeIn_21l9u_1{0%{opacity:0;transform:translateY(12px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes _bounce_21l9u_1{0%,10%,to{transform:scale(0);opacity:.5}40%{transform:scale(1);opacity:1}}@keyframes _checkBounce_21l9u_1{0%{transform:scale(.5)}50%{transform:scale(1.2)}to{transform:scale(1)}}._list_1hmfq_3{flex:1;overflow-y:auto;padding:24px;background:transparent;position:relative}._list_1hmfq_3::-webkit-scrollbar{width:6px;background:transparent}._list_1hmfq_3::-webkit-scrollbar-track{background:var(--theme-list-scrollbar-track);border-radius:3px;margin:4px 0}._list_1hmfq_3::-webkit-scrollbar-thumb{background:var(--theme-list-scrollbar-thumb);border-radius:3px;transition:all .2s ease}._list_1hmfq_3::-webkit-scrollbar-thumb:hover{background:var(--theme-list-scrollbar-thumb-hover);box-shadow:0 0 8px var(--theme-list-scrollbar-glow)}._welcome_1hmfq_31{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:var(--theme-list-welcome-color);text-align:center;position:relative}._title_1hmfq_42{font-size:32px;margin-bottom:20px;background:linear-gradient(135deg,var(--theme-list-welcome-title-gradient-start) 0%,var(--theme-list-welcome-title-gradient-mid) 50%,var(--theme-list-welcome-title-gradient-end) 100%);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;font-weight:700;letter-spacing:1px;position:relative;z-index:1;text-shadow:0 0 30px var(--theme-list-welcome-title-text-shadow)}._content_1hmfq_56{font-size:16px;color:var(--theme-list-welcome-content-color);position:relative;z-index:1;max-width:400px;line-height:1.6}@media(max-width:768px){._title_1hmfq_42{font-size:24px}._content_1hmfq_56{font-size:14px}}._splitter_1iw6n_2{background:transparent}._h_1iw6n_7{display:flex;width:100%;height:100vh;overflow:hidden;position:relative}._v_1iw6n_16{display:flex;flex-direction:column;width:100%;height:100%;overflow:hidden;position:relative}._left_1iw6n_26{background-color:transparent;min-width:200px;flex-shrink:0}._right_1iw6n_32{display:flex;flex-direction:column;min-width:300px;flex:1}._top_1iw6n_40{min-height:200px;flex-shrink:0;display:flex;flex-direction:column}._bottom_1iw6n_47{display:flex;flex-direction:column;flex:1}._rh_1iw6n_54{width:4px;background-color:#3b82f64d;cursor:col-resize;flex-shrink:0;transition:background-color .2s;-webkit-user-select:none;user-select:none;position:relative}._rh_1iw6n_54:before{content:\"\";position:absolute;inset:0 -4px}._rh_1iw6n_54:hover{background-color:#3b82f699;box-shadow:0 0 12px #3b82f680}._rh_1iw6n_54:active{background-color:#3b82f6cc;box-shadow:0 0 16px #3b82f6b3}._rv_1iw6n_84{height:4px;background-color:#3b82f64d;cursor:row-resize;flex-shrink:0;transition:background-color .2s;-webkit-user-select:none;user-select:none;position:relative}._rv_1iw6n_84:before{content:\"\";position:absolute;inset:-4px 0}._rv_1iw6n_84:hover{background-color:#3b82f699;box-shadow:0 0 12px #3b82f680}._rv_1iw6n_84:active{background-color:#3b82f6cc;box-shadow:0 0 16px #3b82f6b3}@media(max-width:768px){._h_1iw6n_7{flex-direction:column}._left_1iw6n_26{width:100%;height:60px;min-width:auto}._right_1iw6n_32{height:calc(100vh - 60px);min-width:auto}._rh_1iw6n_54{display:none}}@media(max-width:768px){._top_1iw6n_40{height:60px;min-height:auto;border-bottom:1px solid #e0e0e0}._bottom_1iw6n_47{height:calc(100vh - 60px);min-height:auto}._rv_1iw6n_84{display:none}}\n";
6
+ document.head.appendChild(style);
7
+ }
8
+ })();
9
+ import { jsx as w, jsxs as U, Fragment as Lt } from "react/jsx-runtime";
10
+ import _e, { createContext as kt, useContext as Bt, useState as K, useRef as Ft, useEffect as Ut, useCallback as vt } from "react";
11
+ const Mt = "_container_pv14e_1", It = "_input_pv14e_12", jt = "_submit_pv14e_42", Re = {
12
+ container: Mt,
13
+ input: It,
14
+ submit: jt
15
+ }, $t = "_panel_1qg86_2", qt = "_error_1qg86_34", Ie = {
16
+ panel: $t,
17
+ error: qt
18
+ }, Ht = "_loading_21l9u_1", zt = "_content_21l9u_12", Wt = "_dot_21l9u_20", Gt = "_bounce_21l9u_1", Vt = "_time_21l9u_37", Jt = "_message_21l9u_47", Kt = "_fadeIn_21l9u_1", Xt = "_user_21l9u_56", Yt = "_assistant_21l9u_68", Qt = "_tool_21l9u_81", Zt = "_toolIcon_21l9u_98", en = "_completed_21l9u_102", tn = "_checkBounce_21l9u_1", P = {
19
+ loading: Ht,
20
+ content: zt,
21
+ dot: Wt,
22
+ bounce: Gt,
23
+ time: Vt,
24
+ message: Jt,
25
+ fadeIn: Kt,
26
+ user: Xt,
27
+ assistant: Yt,
28
+ tool: Qt,
29
+ toolIcon: Zt,
30
+ completed: en,
31
+ checkBounce: tn
32
+ }, nn = "_list_1hmfq_3", rn = "_welcome_1hmfq_31", sn = "_title_1hmfq_42", on = "_content_1hmfq_56", Z = {
33
+ list: nn,
34
+ welcome: rn,
35
+ title: sn,
36
+ content: on
37
+ }, an = "_splitter_1iw6n_2", ln = "_h_1iw6n_7", cn = "_v_1iw6n_16", un = "_left_1iw6n_26", dn = "_right_1iw6n_32", fn = "_top_1iw6n_40", hn = "_bottom_1iw6n_47", pn = "_rh_1iw6n_54", mn = "_rv_1iw6n_84", j = {
38
+ splitter: an,
39
+ h: ln,
40
+ v: cn,
41
+ left: un,
42
+ right: dn,
43
+ top: fn,
44
+ bottom: hn,
45
+ rh: pn,
46
+ rv: mn
47
+ }, bn = {
48
+ backgroundColor: "#ffffff",
49
+ textColor: "#1f2937",
50
+ errorBackground: "#fee2e2",
51
+ errorColor: "#dc2626",
52
+ errorBorder: "#ef4444",
53
+ errorBorderLeft: "#ef4444",
54
+ animationGradientStart: "#3b82f6",
55
+ animationGradientMid: "#8b5cf6",
56
+ animationGradientEnd: "#ec4899",
57
+ messageLoading: "rgba(59, 130, 246, 0.15)",
58
+ messageUser: "#10b981",
59
+ messageAssistant: "#3b82f6",
60
+ messageTool: "#f97316",
61
+ inputBorder: "#10b981",
62
+ inputColor: "#1e293b",
63
+ inputPlaceholderColor: "#64748b",
64
+ inputShadow: "rgba(16, 185, 129, 0.3)",
65
+ inputDisabledBackground: "#f1f5f9",
66
+ inputDisabledColor: "#94a3b8",
67
+ inputDisabledBorder: "#10b981",
68
+ submitBackground: "transparent",
69
+ submitBorder: "#3b82f6",
70
+ submitColor: "#3b82f6",
71
+ submitHoverBackground: "#f1f5f5",
72
+ listScrollbarTrack: "rgba(226, 232, 240, 0.4)",
73
+ listScrollbarThumb: "linear-gradient(180deg, #60a5fa, #a78bfa)",
74
+ listScrollbarThumbHover: "linear-gradient(180deg, #3b82f6, #8b5cf6)",
75
+ listScrollbarGlow: "rgba(59, 130, 246, 0.4)",
76
+ listWelcomeColor: "#94a3b8",
77
+ listWelcomeTitleGradientStart: "#60a5fa",
78
+ listWelcomeTitleGradientMid: "#a78bfa",
79
+ listWelcomeTitleGradientEnd: "#f472b6",
80
+ listWelcomeTitleTextShadow: "#60a5fa",
81
+ listWelcomeContentColor: "#94a3b8"
82
+ }, yn = {
83
+ backgroundColor: "#1a1a2e",
84
+ textColor: "#e5e7eb",
85
+ errorBackground: "#ef4444",
86
+ errorColor: "#fca5a5",
87
+ errorBorder: "#ef4444",
88
+ errorBorderLeft: "#ef4444",
89
+ animationGradientStart: "#3b82f6",
90
+ animationGradientMid: "#8b5cf6",
91
+ animationGradientEnd: "transparent",
92
+ messageLoading: "rgba(59, 130, 246, 0.2)",
93
+ messageUser: "#10b981",
94
+ messageAssistant: "#3b82f6",
95
+ messageTool: "#f97316",
96
+ inputBorder: "#10b981",
97
+ inputColor: "#f1f5f9",
98
+ inputPlaceholderColor: "#94a3b8",
99
+ inputShadow: "rgba(16, 185, 129, 0.4)",
100
+ inputDisabledBackground: "#1e293b",
101
+ inputDisabledColor: "#64748b",
102
+ inputDisabledBorder: "#10b981",
103
+ submitBackground: "transparent",
104
+ submitBorder: "#3b82f6",
105
+ submitColor: "#3b82f6",
106
+ submitHoverBackground: "#273449",
107
+ listScrollbarTrack: "rgba(30, 41, 59, 0.5)",
108
+ listScrollbarThumb: "linear-gradient(180deg, #60a5fa, #a78bfa)",
109
+ listScrollbarThumbHover: "linear-gradient(180deg, #3b82f6, #c084fc)",
110
+ listScrollbarGlow: "rgba(96, 165, 250, 0.6)",
111
+ listWelcomeColor: "#94a3b8",
112
+ listWelcomeTitleGradientStart: "#60a5fa",
113
+ listWelcomeTitleGradientMid: "#a78bfa",
114
+ listWelcomeTitleGradientEnd: "#f472b6",
115
+ listWelcomeTitleTextShadow: "#60a5fa",
116
+ listWelcomeContentColor: "#94a3b8"
117
+ }, rt = (t) => typeof t == "string" ? t === "light" ? bn : yn : { ...rt(t.base), ...t.tokens }, st = kt(void 0), Sn = ({ children: t, theme: e }) => {
118
+ const n = rt(e);
119
+ return /* @__PURE__ */ w(st.Provider, { value: { tokens: n }, children: t });
120
+ }, gn = () => {
121
+ const t = Bt(st);
122
+ if (t === void 0)
123
+ throw new Error("useTheme must be used within a ThemeProvider");
124
+ return t;
125
+ }, wn = "user", De = "assistant", En = "tool", ot = "loading", me = "text", it = "tool", ws = "preparing", Es = "processing", _s = "completed";
126
+ function _n(t) {
127
+ return t.type === ot;
128
+ }
129
+ function Rn(t) {
130
+ return t.type === me;
131
+ }
132
+ function Tn(t) {
133
+ return t.type === it;
134
+ }
135
+ const xn = {
136
+ preparing: { icon: "⏳", label: "准备中" },
137
+ processing: { icon: "⚙️", label: "处理中" },
138
+ completed: { icon: "✓", label: "完成" }
139
+ }, On = ({ message: t }) => {
140
+ const { role: e, timestamp: n } = t;
141
+ if (_n(t))
142
+ return /* @__PURE__ */ U("div", { className: `${P.loading}`, children: [
143
+ /* @__PURE__ */ w("span", { className: P.dot }),
144
+ /* @__PURE__ */ w("span", { className: P.dot }),
145
+ /* @__PURE__ */ w("span", { className: P.dot }),
146
+ /* @__PURE__ */ w("span", { children: t.content })
147
+ ] });
148
+ const r = new Date(n).toLocaleTimeString("zh-CN", { hour: "2-digit", minute: "2-digit" });
149
+ if (Rn(t))
150
+ return /* @__PURE__ */ U("div", { className: `${P.message} ${P[e]}`, children: [
151
+ /* @__PURE__ */ w("span", { className: P.time, children: r }),
152
+ /* @__PURE__ */ w("div", { className: P.content, children: t.content.trimEnd() })
153
+ ] });
154
+ if (Tn(t)) {
155
+ const s = xn[t.toolStatus];
156
+ return /* @__PURE__ */ U("div", { className: `${P.message}`, children: [
157
+ /* @__PURE__ */ w("span", { className: P.time, children: r }),
158
+ /* @__PURE__ */ U("div", { className: `${P.tool} ${P[`${t.toolStatus}`]}`, children: [
159
+ /* @__PURE__ */ w("span", { className: P.toolIcon, children: s.icon }),
160
+ /* @__PURE__ */ U("span", { children: [
161
+ t.name,
162
+ " - ",
163
+ t.toolStatus
164
+ ] })
165
+ ] })
166
+ ] });
167
+ }
168
+ return null;
169
+ }, Cn = ({ messages: t }) => {
170
+ const e = _e.useRef(null), n = _e.useRef(null);
171
+ return _e.useEffect(() => {
172
+ n.current && e.current && (n.current.scrollTop = n.current.scrollHeight);
173
+ }, [t]), t.length === 0 ? /* @__PURE__ */ w("div", { className: Z.list, ref: n, children: /* @__PURE__ */ U("div", { className: Z.welcome, children: [
174
+ /* @__PURE__ */ w("h2", { className: Z.title, children: "欢迎使用智能对话助手" }),
175
+ /* @__PURE__ */ w("p", { className: Z.content, children: "请在下方输入框中输入您的问题,我会尽力为您解答。" })
176
+ ] }) }) : /* @__PURE__ */ U("div", { className: Z.list, ref: n, children: [
177
+ t.map((r) => /* @__PURE__ */ w(On, { message: r }, r.id)),
178
+ /* @__PURE__ */ w("div", { ref: e })
179
+ ] });
180
+ }, An = ({ onSendMessage: t, disabled: e }) => {
181
+ const [n, r] = K(""), s = async (o) => {
182
+ o.preventDefault(), !(!n.trim() || e) && (await t(n.trim()), r(""));
183
+ };
184
+ return /* @__PURE__ */ U("div", { className: Re.container, children: [
185
+ /* @__PURE__ */ w(
186
+ "textarea",
187
+ {
188
+ className: Re.input,
189
+ value: n,
190
+ onChange: (o) => r(o.target.value),
191
+ placeholder: "输入您的问题... (Enter 发送,Shift+Enter 换行)",
192
+ disabled: e
193
+ }
194
+ ),
195
+ /* @__PURE__ */ w("button", { className: Re.submit, type: "submit", onClick: s, disabled: e || !n.trim(), children: e ? "发送中..." : "发送" })
196
+ ] });
197
+ }, je = (t, e) => t.endsWith("%") ? parseFloat(t) : (t.endsWith("px"), parseFloat(t) / e * 100), Nn = (t, e, n) => {
198
+ let r;
199
+ return t !== void 0 ? r = je(t, n) : e !== void 0 ? r = 100 - je(e, n) : r = 50, Math.max(15, Math.min(85, r));
200
+ }, Pn = (t, e = 15, n = 85) => Math.max(e, Math.min(n, t)), Dn = ({
201
+ mode: t,
202
+ left: e,
203
+ right: n,
204
+ leftWidth: r,
205
+ rightWidth: s,
206
+ top: o,
207
+ bottom: i,
208
+ topHeight: a,
209
+ bottomHeight: u
210
+ }) => {
211
+ const [d, f] = K(null), [p, S] = K(!1), y = Ft(null), c = t === "horizontal";
212
+ Ut(() => {
213
+ if (!y.current) return;
214
+ const k = y.current.getBoundingClientRect(), H = c ? k.width : k.height, M = Nn(
215
+ c ? r : a,
216
+ c ? s : u,
217
+ H
218
+ );
219
+ f(M);
220
+ }, [c, r, s, a, u]);
221
+ const m = vt(() => {
222
+ S(!0);
223
+ const k = (V) => {
224
+ if (!y.current) return;
225
+ const B = y.current.getBoundingClientRect(), M = c ? V.clientX - B.left : V.clientY - B.top, I = c ? B.width : B.height, ae = M / I * 100, D = Pn(ae);
226
+ f(D);
227
+ }, H = () => {
228
+ S(!1), window.removeEventListener("mousemove", k), window.removeEventListener("mouseup", H);
229
+ };
230
+ window.addEventListener("mousemove", k), window.addEventListener("mouseup", H);
231
+ }, [c]), h = d ?? 50, _ = c ? j.h : j.v, g = c ? j.left : j.top, E = c ? j.right : j.bottom, T = c ? j.rh : j.rv, x = c ? "col-resize" : "row-resize", v = c ? { width: `${h}%` } : { height: `${h}%` }, C = c ? e : o, Q = c ? n : i;
232
+ return /* @__PURE__ */ U("div", { className: `${j.splitter} ${_}`, ref: y, children: [
233
+ /* @__PURE__ */ w("div", { className: g, style: v, children: C }),
234
+ /* @__PURE__ */ w(
235
+ "div",
236
+ {
237
+ className: T,
238
+ onMouseDown: m,
239
+ style: { cursor: x }
240
+ }
241
+ ),
242
+ /* @__PURE__ */ w("div", { className: E, children: Q })
243
+ ] });
244
+ };
245
+ function at(t, e) {
246
+ return function() {
247
+ return t.apply(e, arguments);
248
+ };
249
+ }
250
+ const { toString: Ln } = Object.prototype, { getPrototypeOf: Le } = Object, { iterator: be, toStringTag: lt } = Symbol, ye = /* @__PURE__ */ ((t) => (e) => {
251
+ const n = Ln.call(e);
252
+ return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
253
+ })(/* @__PURE__ */ Object.create(null)), L = (t) => (t = t.toLowerCase(), (e) => ye(e) === t), Se = (t) => (e) => typeof e === t, { isArray: Y } = Array, X = Se("undefined");
254
+ function ne(t) {
255
+ return t !== null && !X(t) && t.constructor !== null && !X(t.constructor) && A(t.constructor.isBuffer) && t.constructor.isBuffer(t);
256
+ }
257
+ const ct = L("ArrayBuffer");
258
+ function kn(t) {
259
+ let e;
260
+ return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && ct(t.buffer), e;
261
+ }
262
+ const Bn = Se("string"), A = Se("function"), ut = Se("number"), re = (t) => t !== null && typeof t == "object", Fn = (t) => t === !0 || t === !1, de = (t) => {
263
+ if (ye(t) !== "object")
264
+ return !1;
265
+ const e = Le(t);
266
+ return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(lt in t) && !(be in t);
267
+ }, Un = (t) => {
268
+ if (!re(t) || ne(t))
269
+ return !1;
270
+ try {
271
+ return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
272
+ } catch {
273
+ return !1;
274
+ }
275
+ }, vn = L("Date"), Mn = L("File"), In = L("Blob"), jn = L("FileList"), $n = (t) => re(t) && A(t.pipe), qn = (t) => {
276
+ let e;
277
+ return t && (typeof FormData == "function" && t instanceof FormData || A(t.append) && ((e = ye(t)) === "formdata" || // detect form-data instance
278
+ e === "object" && A(t.toString) && t.toString() === "[object FormData]"));
279
+ }, Hn = L("URLSearchParams"), [zn, Wn, Gn, Vn] = ["ReadableStream", "Request", "Response", "Headers"].map(L), Jn = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
280
+ function se(t, e, { allOwnKeys: n = !1 } = {}) {
281
+ if (t === null || typeof t > "u")
282
+ return;
283
+ let r, s;
284
+ if (typeof t != "object" && (t = [t]), Y(t))
285
+ for (r = 0, s = t.length; r < s; r++)
286
+ e.call(null, t[r], r, t);
287
+ else {
288
+ if (ne(t))
289
+ return;
290
+ const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
291
+ let a;
292
+ for (r = 0; r < i; r++)
293
+ a = o[r], e.call(null, t[a], a, t);
294
+ }
295
+ }
296
+ function dt(t, e) {
297
+ if (ne(t))
298
+ return null;
299
+ e = e.toLowerCase();
300
+ const n = Object.keys(t);
301
+ let r = n.length, s;
302
+ for (; r-- > 0; )
303
+ if (s = n[r], e === s.toLowerCase())
304
+ return s;
305
+ return null;
306
+ }
307
+ const z = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ft = (t) => !X(t) && t !== z;
308
+ function Ce() {
309
+ const { caseless: t, skipUndefined: e } = ft(this) && this || {}, n = {}, r = (s, o) => {
310
+ const i = t && dt(n, o) || o;
311
+ de(n[i]) && de(s) ? n[i] = Ce(n[i], s) : de(s) ? n[i] = Ce({}, s) : Y(s) ? n[i] = s.slice() : (!e || !X(s)) && (n[i] = s);
312
+ };
313
+ for (let s = 0, o = arguments.length; s < o; s++)
314
+ arguments[s] && se(arguments[s], r);
315
+ return n;
316
+ }
317
+ const Kn = (t, e, n, { allOwnKeys: r } = {}) => (se(e, (s, o) => {
318
+ n && A(s) ? Object.defineProperty(t, o, {
319
+ value: at(s, n),
320
+ writable: !0,
321
+ enumerable: !0,
322
+ configurable: !0
323
+ }) : Object.defineProperty(t, o, {
324
+ value: s,
325
+ writable: !0,
326
+ enumerable: !0,
327
+ configurable: !0
328
+ });
329
+ }, { allOwnKeys: r }), t), Xn = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Yn = (t, e, n, r) => {
330
+ t.prototype = Object.create(e.prototype, r), Object.defineProperty(t.prototype, "constructor", {
331
+ value: t,
332
+ writable: !0,
333
+ enumerable: !1,
334
+ configurable: !0
335
+ }), Object.defineProperty(t, "super", {
336
+ value: e.prototype
337
+ }), n && Object.assign(t.prototype, n);
338
+ }, Qn = (t, e, n, r) => {
339
+ let s, o, i;
340
+ const a = {};
341
+ if (e = e || {}, t == null) return e;
342
+ do {
343
+ for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
344
+ i = s[o], (!r || r(i, t, e)) && !a[i] && (e[i] = t[i], a[i] = !0);
345
+ t = n !== !1 && Le(t);
346
+ } while (t && (!n || n(t, e)) && t !== Object.prototype);
347
+ return e;
348
+ }, Zn = (t, e, n) => {
349
+ t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
350
+ const r = t.indexOf(e, n);
351
+ return r !== -1 && r === n;
352
+ }, er = (t) => {
353
+ if (!t) return null;
354
+ if (Y(t)) return t;
355
+ let e = t.length;
356
+ if (!ut(e)) return null;
357
+ const n = new Array(e);
358
+ for (; e-- > 0; )
359
+ n[e] = t[e];
360
+ return n;
361
+ }, tr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && Le(Uint8Array)), nr = (t, e) => {
362
+ const r = (t && t[be]).call(t);
363
+ let s;
364
+ for (; (s = r.next()) && !s.done; ) {
365
+ const o = s.value;
366
+ e.call(t, o[0], o[1]);
367
+ }
368
+ }, rr = (t, e) => {
369
+ let n;
370
+ const r = [];
371
+ for (; (n = t.exec(e)) !== null; )
372
+ r.push(n);
373
+ return r;
374
+ }, sr = L("HTMLFormElement"), or = (t) => t.toLowerCase().replace(
375
+ /[-_\s]([a-z\d])(\w*)/g,
376
+ function(n, r, s) {
377
+ return r.toUpperCase() + s;
378
+ }
379
+ ), $e = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), ir = L("RegExp"), ht = (t, e) => {
380
+ const n = Object.getOwnPropertyDescriptors(t), r = {};
381
+ se(n, (s, o) => {
382
+ let i;
383
+ (i = e(s, o, t)) !== !1 && (r[o] = i || s);
384
+ }), Object.defineProperties(t, r);
385
+ }, ar = (t) => {
386
+ ht(t, (e, n) => {
387
+ if (A(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
388
+ return !1;
389
+ const r = t[n];
390
+ if (A(r)) {
391
+ if (e.enumerable = !1, "writable" in e) {
392
+ e.writable = !1;
393
+ return;
394
+ }
395
+ e.set || (e.set = () => {
396
+ throw Error("Can not rewrite read-only method '" + n + "'");
397
+ });
398
+ }
399
+ });
400
+ }, lr = (t, e) => {
401
+ const n = {}, r = (s) => {
402
+ s.forEach((o) => {
403
+ n[o] = !0;
404
+ });
405
+ };
406
+ return Y(t) ? r(t) : r(String(t).split(e)), n;
407
+ }, cr = () => {
408
+ }, ur = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
409
+ function dr(t) {
410
+ return !!(t && A(t.append) && t[lt] === "FormData" && t[be]);
411
+ }
412
+ const fr = (t) => {
413
+ const e = new Array(10), n = (r, s) => {
414
+ if (re(r)) {
415
+ if (e.indexOf(r) >= 0)
416
+ return;
417
+ if (ne(r))
418
+ return r;
419
+ if (!("toJSON" in r)) {
420
+ e[s] = r;
421
+ const o = Y(r) ? [] : {};
422
+ return se(r, (i, a) => {
423
+ const u = n(i, s + 1);
424
+ !X(u) && (o[a] = u);
425
+ }), e[s] = void 0, o;
426
+ }
427
+ }
428
+ return r;
429
+ };
430
+ return n(t, 0);
431
+ }, hr = L("AsyncFunction"), pr = (t) => t && (re(t) || A(t)) && A(t.then) && A(t.catch), pt = ((t, e) => t ? setImmediate : e ? ((n, r) => (z.addEventListener("message", ({ source: s, data: o }) => {
432
+ s === z && o === n && r.length && r.shift()();
433
+ }, !1), (s) => {
434
+ r.push(s), z.postMessage(n, "*");
435
+ }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
436
+ typeof setImmediate == "function",
437
+ A(z.postMessage)
438
+ ), mr = typeof queueMicrotask < "u" ? queueMicrotask.bind(z) : typeof process < "u" && process.nextTick || pt, br = (t) => t != null && A(t[be]), l = {
439
+ isArray: Y,
440
+ isArrayBuffer: ct,
441
+ isBuffer: ne,
442
+ isFormData: qn,
443
+ isArrayBufferView: kn,
444
+ isString: Bn,
445
+ isNumber: ut,
446
+ isBoolean: Fn,
447
+ isObject: re,
448
+ isPlainObject: de,
449
+ isEmptyObject: Un,
450
+ isReadableStream: zn,
451
+ isRequest: Wn,
452
+ isResponse: Gn,
453
+ isHeaders: Vn,
454
+ isUndefined: X,
455
+ isDate: vn,
456
+ isFile: Mn,
457
+ isBlob: In,
458
+ isRegExp: ir,
459
+ isFunction: A,
460
+ isStream: $n,
461
+ isURLSearchParams: Hn,
462
+ isTypedArray: tr,
463
+ isFileList: jn,
464
+ forEach: se,
465
+ merge: Ce,
466
+ extend: Kn,
467
+ trim: Jn,
468
+ stripBOM: Xn,
469
+ inherits: Yn,
470
+ toFlatObject: Qn,
471
+ kindOf: ye,
472
+ kindOfTest: L,
473
+ endsWith: Zn,
474
+ toArray: er,
475
+ forEachEntry: nr,
476
+ matchAll: rr,
477
+ isHTMLForm: sr,
478
+ hasOwnProperty: $e,
479
+ hasOwnProp: $e,
480
+ // an alias to avoid ESLint no-prototype-builtins detection
481
+ reduceDescriptors: ht,
482
+ freezeMethods: ar,
483
+ toObjectSet: lr,
484
+ toCamelCase: or,
485
+ noop: cr,
486
+ toFiniteNumber: ur,
487
+ findKey: dt,
488
+ global: z,
489
+ isContextDefined: ft,
490
+ isSpecCompliantForm: dr,
491
+ toJSONObject: fr,
492
+ isAsyncFn: hr,
493
+ isThenable: pr,
494
+ setImmediate: pt,
495
+ asap: mr,
496
+ isIterable: br
497
+ };
498
+ let b = class mt extends Error {
499
+ static from(e, n, r, s, o, i) {
500
+ const a = new mt(e.message, n || e.code, r, s, o);
501
+ return a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
502
+ }
503
+ /**
504
+ * Create an Error with the specified message, config, error code, request and response.
505
+ *
506
+ * @param {string} message The error message.
507
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
508
+ * @param {Object} [config] The config.
509
+ * @param {Object} [request] The request.
510
+ * @param {Object} [response] The response.
511
+ *
512
+ * @returns {Error} The created error.
513
+ */
514
+ constructor(e, n, r, s, o) {
515
+ super(e), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status);
516
+ }
517
+ toJSON() {
518
+ return {
519
+ // Standard
520
+ message: this.message,
521
+ name: this.name,
522
+ // Microsoft
523
+ description: this.description,
524
+ number: this.number,
525
+ // Mozilla
526
+ fileName: this.fileName,
527
+ lineNumber: this.lineNumber,
528
+ columnNumber: this.columnNumber,
529
+ stack: this.stack,
530
+ // Axios
531
+ config: l.toJSONObject(this.config),
532
+ code: this.code,
533
+ status: this.status
534
+ };
535
+ }
536
+ };
537
+ b.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
538
+ b.ERR_BAD_OPTION = "ERR_BAD_OPTION";
539
+ b.ECONNABORTED = "ECONNABORTED";
540
+ b.ETIMEDOUT = "ETIMEDOUT";
541
+ b.ERR_NETWORK = "ERR_NETWORK";
542
+ b.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
543
+ b.ERR_DEPRECATED = "ERR_DEPRECATED";
544
+ b.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
545
+ b.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
546
+ b.ERR_CANCELED = "ERR_CANCELED";
547
+ b.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
548
+ b.ERR_INVALID_URL = "ERR_INVALID_URL";
549
+ const yr = null;
550
+ function Ae(t) {
551
+ return l.isPlainObject(t) || l.isArray(t);
552
+ }
553
+ function bt(t) {
554
+ return l.endsWith(t, "[]") ? t.slice(0, -2) : t;
555
+ }
556
+ function qe(t, e, n) {
557
+ return t ? t.concat(e).map(function(s, o) {
558
+ return s = bt(s), !n && o ? "[" + s + "]" : s;
559
+ }).join(n ? "." : "") : e;
560
+ }
561
+ function Sr(t) {
562
+ return l.isArray(t) && !t.some(Ae);
563
+ }
564
+ const gr = l.toFlatObject(l, {}, null, function(e) {
565
+ return /^is[A-Z]/.test(e);
566
+ });
567
+ function ge(t, e, n) {
568
+ if (!l.isObject(t))
569
+ throw new TypeError("target must be an object");
570
+ e = e || new FormData(), n = l.toFlatObject(n, {
571
+ metaTokens: !0,
572
+ dots: !1,
573
+ indexes: !1
574
+ }, !1, function(m, h) {
575
+ return !l.isUndefined(h[m]);
576
+ });
577
+ const r = n.metaTokens, s = n.visitor || f, o = n.dots, i = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && l.isSpecCompliantForm(e);
578
+ if (!l.isFunction(s))
579
+ throw new TypeError("visitor must be a function");
580
+ function d(c) {
581
+ if (c === null) return "";
582
+ if (l.isDate(c))
583
+ return c.toISOString();
584
+ if (l.isBoolean(c))
585
+ return c.toString();
586
+ if (!u && l.isBlob(c))
587
+ throw new b("Blob is not supported. Use a Buffer instead.");
588
+ return l.isArrayBuffer(c) || l.isTypedArray(c) ? u && typeof Blob == "function" ? new Blob([c]) : Buffer.from(c) : c;
589
+ }
590
+ function f(c, m, h) {
591
+ let _ = c;
592
+ if (c && !h && typeof c == "object") {
593
+ if (l.endsWith(m, "{}"))
594
+ m = r ? m : m.slice(0, -2), c = JSON.stringify(c);
595
+ else if (l.isArray(c) && Sr(c) || (l.isFileList(c) || l.endsWith(m, "[]")) && (_ = l.toArray(c)))
596
+ return m = bt(m), _.forEach(function(E, T) {
597
+ !(l.isUndefined(E) || E === null) && e.append(
598
+ // eslint-disable-next-line no-nested-ternary
599
+ i === !0 ? qe([m], T, o) : i === null ? m : m + "[]",
600
+ d(E)
601
+ );
602
+ }), !1;
603
+ }
604
+ return Ae(c) ? !0 : (e.append(qe(h, m, o), d(c)), !1);
605
+ }
606
+ const p = [], S = Object.assign(gr, {
607
+ defaultVisitor: f,
608
+ convertValue: d,
609
+ isVisitable: Ae
610
+ });
611
+ function y(c, m) {
612
+ if (!l.isUndefined(c)) {
613
+ if (p.indexOf(c) !== -1)
614
+ throw Error("Circular reference detected in " + m.join("."));
615
+ p.push(c), l.forEach(c, function(_, g) {
616
+ (!(l.isUndefined(_) || _ === null) && s.call(
617
+ e,
618
+ _,
619
+ l.isString(g) ? g.trim() : g,
620
+ m,
621
+ S
622
+ )) === !0 && y(_, m ? m.concat(g) : [g]);
623
+ }), p.pop();
624
+ }
625
+ }
626
+ if (!l.isObject(t))
627
+ throw new TypeError("data must be an object");
628
+ return y(t), e;
629
+ }
630
+ function He(t) {
631
+ const e = {
632
+ "!": "%21",
633
+ "'": "%27",
634
+ "(": "%28",
635
+ ")": "%29",
636
+ "~": "%7E",
637
+ "%20": "+",
638
+ "%00": "\0"
639
+ };
640
+ return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g, function(r) {
641
+ return e[r];
642
+ });
643
+ }
644
+ function ke(t, e) {
645
+ this._pairs = [], t && ge(t, this, e);
646
+ }
647
+ const yt = ke.prototype;
648
+ yt.append = function(e, n) {
649
+ this._pairs.push([e, n]);
650
+ };
651
+ yt.toString = function(e) {
652
+ const n = e ? function(r) {
653
+ return e.call(this, r, He);
654
+ } : He;
655
+ return this._pairs.map(function(s) {
656
+ return n(s[0]) + "=" + n(s[1]);
657
+ }, "").join("&");
658
+ };
659
+ function wr(t) {
660
+ return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
661
+ }
662
+ function St(t, e, n) {
663
+ if (!e)
664
+ return t;
665
+ const r = n && n.encode || wr, s = l.isFunction(n) ? {
666
+ serialize: n
667
+ } : n, o = s && s.serialize;
668
+ let i;
669
+ if (o ? i = o(e, s) : i = l.isURLSearchParams(e) ? e.toString() : new ke(e, s).toString(r), i) {
670
+ const a = t.indexOf("#");
671
+ a !== -1 && (t = t.slice(0, a)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
672
+ }
673
+ return t;
674
+ }
675
+ class ze {
676
+ constructor() {
677
+ this.handlers = [];
678
+ }
679
+ /**
680
+ * Add a new interceptor to the stack
681
+ *
682
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
683
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
684
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
685
+ *
686
+ * @return {Number} An ID used to remove interceptor later
687
+ */
688
+ use(e, n, r) {
689
+ return this.handlers.push({
690
+ fulfilled: e,
691
+ rejected: n,
692
+ synchronous: r ? r.synchronous : !1,
693
+ runWhen: r ? r.runWhen : null
694
+ }), this.handlers.length - 1;
695
+ }
696
+ /**
697
+ * Remove an interceptor from the stack
698
+ *
699
+ * @param {Number} id The ID that was returned by `use`
700
+ *
701
+ * @returns {void}
702
+ */
703
+ eject(e) {
704
+ this.handlers[e] && (this.handlers[e] = null);
705
+ }
706
+ /**
707
+ * Clear all interceptors from the stack
708
+ *
709
+ * @returns {void}
710
+ */
711
+ clear() {
712
+ this.handlers && (this.handlers = []);
713
+ }
714
+ /**
715
+ * Iterate over all the registered interceptors
716
+ *
717
+ * This method is particularly useful for skipping over any
718
+ * interceptors that may have become `null` calling `eject`.
719
+ *
720
+ * @param {Function} fn The function to call for each interceptor
721
+ *
722
+ * @returns {void}
723
+ */
724
+ forEach(e) {
725
+ l.forEach(this.handlers, function(r) {
726
+ r !== null && e(r);
727
+ });
728
+ }
729
+ }
730
+ const gt = {
731
+ silentJSONParsing: !0,
732
+ forcedJSONParsing: !0,
733
+ clarifyTimeoutError: !1
734
+ }, Er = typeof URLSearchParams < "u" ? URLSearchParams : ke, _r = typeof FormData < "u" ? FormData : null, Rr = typeof Blob < "u" ? Blob : null, Tr = {
735
+ isBrowser: !0,
736
+ classes: {
737
+ URLSearchParams: Er,
738
+ FormData: _r,
739
+ Blob: Rr
740
+ },
741
+ protocols: ["http", "https", "file", "blob", "url", "data"]
742
+ }, Be = typeof window < "u" && typeof document < "u", Ne = typeof navigator == "object" && navigator || void 0, xr = Be && (!Ne || ["ReactNative", "NativeScript", "NS"].indexOf(Ne.product) < 0), Or = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
743
+ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Cr = Be && window.location.href || "http://localhost", Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
744
+ __proto__: null,
745
+ hasBrowserEnv: Be,
746
+ hasStandardBrowserEnv: xr,
747
+ hasStandardBrowserWebWorkerEnv: Or,
748
+ navigator: Ne,
749
+ origin: Cr
750
+ }, Symbol.toStringTag, { value: "Module" })), O = {
751
+ ...Ar,
752
+ ...Tr
753
+ };
754
+ function Nr(t, e) {
755
+ return ge(t, new O.classes.URLSearchParams(), {
756
+ visitor: function(n, r, s, o) {
757
+ return O.isNode && l.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
758
+ },
759
+ ...e
760
+ });
761
+ }
762
+ function Pr(t) {
763
+ return l.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
764
+ }
765
+ function Dr(t) {
766
+ const e = {}, n = Object.keys(t);
767
+ let r;
768
+ const s = n.length;
769
+ let o;
770
+ for (r = 0; r < s; r++)
771
+ o = n[r], e[o] = t[o];
772
+ return e;
773
+ }
774
+ function wt(t) {
775
+ function e(n, r, s, o) {
776
+ let i = n[o++];
777
+ if (i === "__proto__") return !0;
778
+ const a = Number.isFinite(+i), u = o >= n.length;
779
+ return i = !i && l.isArray(s) ? s.length : i, u ? (l.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !a) : ((!s[i] || !l.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && l.isArray(s[i]) && (s[i] = Dr(s[i])), !a);
780
+ }
781
+ if (l.isFormData(t) && l.isFunction(t.entries)) {
782
+ const n = {};
783
+ return l.forEachEntry(t, (r, s) => {
784
+ e(Pr(r), s, n, 0);
785
+ }), n;
786
+ }
787
+ return null;
788
+ }
789
+ function Lr(t, e, n) {
790
+ if (l.isString(t))
791
+ try {
792
+ return (e || JSON.parse)(t), l.trim(t);
793
+ } catch (r) {
794
+ if (r.name !== "SyntaxError")
795
+ throw r;
796
+ }
797
+ return (n || JSON.stringify)(t);
798
+ }
799
+ const oe = {
800
+ transitional: gt,
801
+ adapter: ["xhr", "http", "fetch"],
802
+ transformRequest: [function(e, n) {
803
+ const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = l.isObject(e);
804
+ if (o && l.isHTMLForm(e) && (e = new FormData(e)), l.isFormData(e))
805
+ return s ? JSON.stringify(wt(e)) : e;
806
+ if (l.isArrayBuffer(e) || l.isBuffer(e) || l.isStream(e) || l.isFile(e) || l.isBlob(e) || l.isReadableStream(e))
807
+ return e;
808
+ if (l.isArrayBufferView(e))
809
+ return e.buffer;
810
+ if (l.isURLSearchParams(e))
811
+ return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
812
+ let a;
813
+ if (o) {
814
+ if (r.indexOf("application/x-www-form-urlencoded") > -1)
815
+ return Nr(e, this.formSerializer).toString();
816
+ if ((a = l.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
817
+ const u = this.env && this.env.FormData;
818
+ return ge(
819
+ a ? { "files[]": e } : e,
820
+ u && new u(),
821
+ this.formSerializer
822
+ );
823
+ }
824
+ }
825
+ return o || s ? (n.setContentType("application/json", !1), Lr(e)) : e;
826
+ }],
827
+ transformResponse: [function(e) {
828
+ const n = this.transitional || oe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
829
+ if (l.isResponse(e) || l.isReadableStream(e))
830
+ return e;
831
+ if (e && l.isString(e) && (r && !this.responseType || s)) {
832
+ const i = !(n && n.silentJSONParsing) && s;
833
+ try {
834
+ return JSON.parse(e, this.parseReviver);
835
+ } catch (a) {
836
+ if (i)
837
+ throw a.name === "SyntaxError" ? b.from(a, b.ERR_BAD_RESPONSE, this, null, this.response) : a;
838
+ }
839
+ }
840
+ return e;
841
+ }],
842
+ /**
843
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
844
+ * timeout is not created.
845
+ */
846
+ timeout: 0,
847
+ xsrfCookieName: "XSRF-TOKEN",
848
+ xsrfHeaderName: "X-XSRF-TOKEN",
849
+ maxContentLength: -1,
850
+ maxBodyLength: -1,
851
+ env: {
852
+ FormData: O.classes.FormData,
853
+ Blob: O.classes.Blob
854
+ },
855
+ validateStatus: function(e) {
856
+ return e >= 200 && e < 300;
857
+ },
858
+ headers: {
859
+ common: {
860
+ Accept: "application/json, text/plain, */*",
861
+ "Content-Type": void 0
862
+ }
863
+ }
864
+ };
865
+ l.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
866
+ oe.headers[t] = {};
867
+ });
868
+ const kr = l.toObjectSet([
869
+ "age",
870
+ "authorization",
871
+ "content-length",
872
+ "content-type",
873
+ "etag",
874
+ "expires",
875
+ "from",
876
+ "host",
877
+ "if-modified-since",
878
+ "if-unmodified-since",
879
+ "last-modified",
880
+ "location",
881
+ "max-forwards",
882
+ "proxy-authorization",
883
+ "referer",
884
+ "retry-after",
885
+ "user-agent"
886
+ ]), Br = (t) => {
887
+ const e = {};
888
+ let n, r, s;
889
+ return t && t.split(`
890
+ `).forEach(function(i) {
891
+ s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || e[n] && kr[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
892
+ }), e;
893
+ }, We = /* @__PURE__ */ Symbol("internals");
894
+ function ee(t) {
895
+ return t && String(t).trim().toLowerCase();
896
+ }
897
+ function fe(t) {
898
+ return t === !1 || t == null ? t : l.isArray(t) ? t.map(fe) : String(t);
899
+ }
900
+ function Fr(t) {
901
+ const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
902
+ let r;
903
+ for (; r = n.exec(t); )
904
+ e[r[1]] = r[2];
905
+ return e;
906
+ }
907
+ const Ur = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
908
+ function Te(t, e, n, r, s) {
909
+ if (l.isFunction(r))
910
+ return r.call(this, e, n);
911
+ if (s && (e = n), !!l.isString(e)) {
912
+ if (l.isString(r))
913
+ return e.indexOf(r) !== -1;
914
+ if (l.isRegExp(r))
915
+ return r.test(e);
916
+ }
917
+ }
918
+ function vr(t) {
919
+ return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
920
+ }
921
+ function Mr(t, e) {
922
+ const n = l.toCamelCase(" " + e);
923
+ ["get", "set", "has"].forEach((r) => {
924
+ Object.defineProperty(t, r + n, {
925
+ value: function(s, o, i) {
926
+ return this[r].call(this, e, s, o, i);
927
+ },
928
+ configurable: !0
929
+ });
930
+ });
931
+ }
932
+ let N = class {
933
+ constructor(e) {
934
+ e && this.set(e);
935
+ }
936
+ set(e, n, r) {
937
+ const s = this;
938
+ function o(a, u, d) {
939
+ const f = ee(u);
940
+ if (!f)
941
+ throw new Error("header name must be a non-empty string");
942
+ const p = l.findKey(s, f);
943
+ (!p || s[p] === void 0 || d === !0 || d === void 0 && s[p] !== !1) && (s[p || u] = fe(a));
944
+ }
945
+ const i = (a, u) => l.forEach(a, (d, f) => o(d, f, u));
946
+ if (l.isPlainObject(e) || e instanceof this.constructor)
947
+ i(e, n);
948
+ else if (l.isString(e) && (e = e.trim()) && !Ur(e))
949
+ i(Br(e), n);
950
+ else if (l.isObject(e) && l.isIterable(e)) {
951
+ let a = {}, u, d;
952
+ for (const f of e) {
953
+ if (!l.isArray(f))
954
+ throw TypeError("Object iterator must return a key-value pair");
955
+ a[d = f[0]] = (u = a[d]) ? l.isArray(u) ? [...u, f[1]] : [u, f[1]] : f[1];
956
+ }
957
+ i(a, n);
958
+ } else
959
+ e != null && o(n, e, r);
960
+ return this;
961
+ }
962
+ get(e, n) {
963
+ if (e = ee(e), e) {
964
+ const r = l.findKey(this, e);
965
+ if (r) {
966
+ const s = this[r];
967
+ if (!n)
968
+ return s;
969
+ if (n === !0)
970
+ return Fr(s);
971
+ if (l.isFunction(n))
972
+ return n.call(this, s, r);
973
+ if (l.isRegExp(n))
974
+ return n.exec(s);
975
+ throw new TypeError("parser must be boolean|regexp|function");
976
+ }
977
+ }
978
+ }
979
+ has(e, n) {
980
+ if (e = ee(e), e) {
981
+ const r = l.findKey(this, e);
982
+ return !!(r && this[r] !== void 0 && (!n || Te(this, this[r], r, n)));
983
+ }
984
+ return !1;
985
+ }
986
+ delete(e, n) {
987
+ const r = this;
988
+ let s = !1;
989
+ function o(i) {
990
+ if (i = ee(i), i) {
991
+ const a = l.findKey(r, i);
992
+ a && (!n || Te(r, r[a], a, n)) && (delete r[a], s = !0);
993
+ }
994
+ }
995
+ return l.isArray(e) ? e.forEach(o) : o(e), s;
996
+ }
997
+ clear(e) {
998
+ const n = Object.keys(this);
999
+ let r = n.length, s = !1;
1000
+ for (; r--; ) {
1001
+ const o = n[r];
1002
+ (!e || Te(this, this[o], o, e, !0)) && (delete this[o], s = !0);
1003
+ }
1004
+ return s;
1005
+ }
1006
+ normalize(e) {
1007
+ const n = this, r = {};
1008
+ return l.forEach(this, (s, o) => {
1009
+ const i = l.findKey(r, o);
1010
+ if (i) {
1011
+ n[i] = fe(s), delete n[o];
1012
+ return;
1013
+ }
1014
+ const a = e ? vr(o) : String(o).trim();
1015
+ a !== o && delete n[o], n[a] = fe(s), r[a] = !0;
1016
+ }), this;
1017
+ }
1018
+ concat(...e) {
1019
+ return this.constructor.concat(this, ...e);
1020
+ }
1021
+ toJSON(e) {
1022
+ const n = /* @__PURE__ */ Object.create(null);
1023
+ return l.forEach(this, (r, s) => {
1024
+ r != null && r !== !1 && (n[s] = e && l.isArray(r) ? r.join(", ") : r);
1025
+ }), n;
1026
+ }
1027
+ [Symbol.iterator]() {
1028
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1029
+ }
1030
+ toString() {
1031
+ return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
1032
+ `);
1033
+ }
1034
+ getSetCookie() {
1035
+ return this.get("set-cookie") || [];
1036
+ }
1037
+ get [Symbol.toStringTag]() {
1038
+ return "AxiosHeaders";
1039
+ }
1040
+ static from(e) {
1041
+ return e instanceof this ? e : new this(e);
1042
+ }
1043
+ static concat(e, ...n) {
1044
+ const r = new this(e);
1045
+ return n.forEach((s) => r.set(s)), r;
1046
+ }
1047
+ static accessor(e) {
1048
+ const r = (this[We] = this[We] = {
1049
+ accessors: {}
1050
+ }).accessors, s = this.prototype;
1051
+ function o(i) {
1052
+ const a = ee(i);
1053
+ r[a] || (Mr(s, i), r[a] = !0);
1054
+ }
1055
+ return l.isArray(e) ? e.forEach(o) : o(e), this;
1056
+ }
1057
+ };
1058
+ N.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1059
+ l.reduceDescriptors(N.prototype, ({ value: t }, e) => {
1060
+ let n = e[0].toUpperCase() + e.slice(1);
1061
+ return {
1062
+ get: () => t,
1063
+ set(r) {
1064
+ this[n] = r;
1065
+ }
1066
+ };
1067
+ });
1068
+ l.freezeMethods(N);
1069
+ function xe(t, e) {
1070
+ const n = this || oe, r = e || n, s = N.from(r.headers);
1071
+ let o = r.data;
1072
+ return l.forEach(t, function(a) {
1073
+ o = a.call(n, o, s.normalize(), e ? e.status : void 0);
1074
+ }), s.normalize(), o;
1075
+ }
1076
+ function Et(t) {
1077
+ return !!(t && t.__CANCEL__);
1078
+ }
1079
+ let ie = class extends b {
1080
+ /**
1081
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
1082
+ *
1083
+ * @param {string=} message The message.
1084
+ * @param {Object=} config The config.
1085
+ * @param {Object=} request The request.
1086
+ *
1087
+ * @returns {CanceledError} The created error.
1088
+ */
1089
+ constructor(e, n, r) {
1090
+ super(e ?? "canceled", b.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
1091
+ }
1092
+ };
1093
+ function _t(t, e, n) {
1094
+ const r = n.config.validateStatus;
1095
+ !n.status || !r || r(n.status) ? t(n) : e(new b(
1096
+ "Request failed with status code " + n.status,
1097
+ [b.ERR_BAD_REQUEST, b.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
1098
+ n.config,
1099
+ n.request,
1100
+ n
1101
+ ));
1102
+ }
1103
+ function Ir(t) {
1104
+ const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
1105
+ return e && e[1] || "";
1106
+ }
1107
+ function jr(t, e) {
1108
+ t = t || 10;
1109
+ const n = new Array(t), r = new Array(t);
1110
+ let s = 0, o = 0, i;
1111
+ return e = e !== void 0 ? e : 1e3, function(u) {
1112
+ const d = Date.now(), f = r[o];
1113
+ i || (i = d), n[s] = u, r[s] = d;
1114
+ let p = o, S = 0;
1115
+ for (; p !== s; )
1116
+ S += n[p++], p = p % t;
1117
+ if (s = (s + 1) % t, s === o && (o = (o + 1) % t), d - i < e)
1118
+ return;
1119
+ const y = f && d - f;
1120
+ return y ? Math.round(S * 1e3 / y) : void 0;
1121
+ };
1122
+ }
1123
+ function $r(t, e) {
1124
+ let n = 0, r = 1e3 / e, s, o;
1125
+ const i = (d, f = Date.now()) => {
1126
+ n = f, s = null, o && (clearTimeout(o), o = null), t(...d);
1127
+ };
1128
+ return [(...d) => {
1129
+ const f = Date.now(), p = f - n;
1130
+ p >= r ? i(d, f) : (s = d, o || (o = setTimeout(() => {
1131
+ o = null, i(s);
1132
+ }, r - p)));
1133
+ }, () => s && i(s)];
1134
+ }
1135
+ const pe = (t, e, n = 3) => {
1136
+ let r = 0;
1137
+ const s = jr(50, 250);
1138
+ return $r((o) => {
1139
+ const i = o.loaded, a = o.lengthComputable ? o.total : void 0, u = i - r, d = s(u), f = i <= a;
1140
+ r = i;
1141
+ const p = {
1142
+ loaded: i,
1143
+ total: a,
1144
+ progress: a ? i / a : void 0,
1145
+ bytes: u,
1146
+ rate: d || void 0,
1147
+ estimated: d && a && f ? (a - i) / d : void 0,
1148
+ event: o,
1149
+ lengthComputable: a != null,
1150
+ [e ? "download" : "upload"]: !0
1151
+ };
1152
+ t(p);
1153
+ }, n);
1154
+ }, Ge = (t, e) => {
1155
+ const n = t != null;
1156
+ return [(r) => e[0]({
1157
+ lengthComputable: n,
1158
+ total: t,
1159
+ loaded: r
1160
+ }), e[1]];
1161
+ }, Ve = (t) => (...e) => l.asap(() => t(...e)), qr = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, O.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
1162
+ new URL(O.origin),
1163
+ O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
1164
+ ) : () => !0, Hr = O.hasStandardBrowserEnv ? (
1165
+ // Standard browser envs support document.cookie
1166
+ {
1167
+ write(t, e, n, r, s, o, i) {
1168
+ if (typeof document > "u") return;
1169
+ const a = [`${t}=${encodeURIComponent(e)}`];
1170
+ l.isNumber(n) && a.push(`expires=${new Date(n).toUTCString()}`), l.isString(r) && a.push(`path=${r}`), l.isString(s) && a.push(`domain=${s}`), o === !0 && a.push("secure"), l.isString(i) && a.push(`SameSite=${i}`), document.cookie = a.join("; ");
1171
+ },
1172
+ read(t) {
1173
+ if (typeof document > "u") return null;
1174
+ const e = document.cookie.match(new RegExp("(?:^|; )" + t + "=([^;]*)"));
1175
+ return e ? decodeURIComponent(e[1]) : null;
1176
+ },
1177
+ remove(t) {
1178
+ this.write(t, "", Date.now() - 864e5, "/");
1179
+ }
1180
+ }
1181
+ ) : (
1182
+ // Non-standard browser env (web workers, react-native) lack needed support.
1183
+ {
1184
+ write() {
1185
+ },
1186
+ read() {
1187
+ return null;
1188
+ },
1189
+ remove() {
1190
+ }
1191
+ }
1192
+ );
1193
+ function zr(t) {
1194
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
1195
+ }
1196
+ function Wr(t, e) {
1197
+ return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
1198
+ }
1199
+ function Rt(t, e, n) {
1200
+ let r = !zr(e);
1201
+ return t && (r || n == !1) ? Wr(t, e) : e;
1202
+ }
1203
+ const Je = (t) => t instanceof N ? { ...t } : t;
1204
+ function G(t, e) {
1205
+ e = e || {};
1206
+ const n = {};
1207
+ function r(d, f, p, S) {
1208
+ return l.isPlainObject(d) && l.isPlainObject(f) ? l.merge.call({ caseless: S }, d, f) : l.isPlainObject(f) ? l.merge({}, f) : l.isArray(f) ? f.slice() : f;
1209
+ }
1210
+ function s(d, f, p, S) {
1211
+ if (l.isUndefined(f)) {
1212
+ if (!l.isUndefined(d))
1213
+ return r(void 0, d, p, S);
1214
+ } else return r(d, f, p, S);
1215
+ }
1216
+ function o(d, f) {
1217
+ if (!l.isUndefined(f))
1218
+ return r(void 0, f);
1219
+ }
1220
+ function i(d, f) {
1221
+ if (l.isUndefined(f)) {
1222
+ if (!l.isUndefined(d))
1223
+ return r(void 0, d);
1224
+ } else return r(void 0, f);
1225
+ }
1226
+ function a(d, f, p) {
1227
+ if (p in e)
1228
+ return r(d, f);
1229
+ if (p in t)
1230
+ return r(void 0, d);
1231
+ }
1232
+ const u = {
1233
+ url: o,
1234
+ method: o,
1235
+ data: o,
1236
+ baseURL: i,
1237
+ transformRequest: i,
1238
+ transformResponse: i,
1239
+ paramsSerializer: i,
1240
+ timeout: i,
1241
+ timeoutMessage: i,
1242
+ withCredentials: i,
1243
+ withXSRFToken: i,
1244
+ adapter: i,
1245
+ responseType: i,
1246
+ xsrfCookieName: i,
1247
+ xsrfHeaderName: i,
1248
+ onUploadProgress: i,
1249
+ onDownloadProgress: i,
1250
+ decompress: i,
1251
+ maxContentLength: i,
1252
+ maxBodyLength: i,
1253
+ beforeRedirect: i,
1254
+ transport: i,
1255
+ httpAgent: i,
1256
+ httpsAgent: i,
1257
+ cancelToken: i,
1258
+ socketPath: i,
1259
+ responseEncoding: i,
1260
+ validateStatus: a,
1261
+ headers: (d, f, p) => s(Je(d), Je(f), p, !0)
1262
+ };
1263
+ return l.forEach(Object.keys({ ...t, ...e }), function(f) {
1264
+ const p = u[f] || s, S = p(t[f], e[f], f);
1265
+ l.isUndefined(S) && p !== a || (n[f] = S);
1266
+ }), n;
1267
+ }
1268
+ const Tt = (t) => {
1269
+ const e = G({}, t);
1270
+ let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: a } = e;
1271
+ if (e.headers = i = N.from(i), e.url = St(Rt(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && i.set(
1272
+ "Authorization",
1273
+ "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1274
+ ), l.isFormData(n)) {
1275
+ if (O.hasStandardBrowserEnv || O.hasStandardBrowserWebWorkerEnv)
1276
+ i.setContentType(void 0);
1277
+ else if (l.isFunction(n.getHeaders)) {
1278
+ const u = n.getHeaders(), d = ["content-type", "content-length"];
1279
+ Object.entries(u).forEach(([f, p]) => {
1280
+ d.includes(f.toLowerCase()) && i.set(f, p);
1281
+ });
1282
+ }
1283
+ }
1284
+ if (O.hasStandardBrowserEnv && (r && l.isFunction(r) && (r = r(e)), r || r !== !1 && qr(e.url))) {
1285
+ const u = s && o && Hr.read(o);
1286
+ u && i.set(s, u);
1287
+ }
1288
+ return e;
1289
+ }, Gr = typeof XMLHttpRequest < "u", Vr = Gr && function(t) {
1290
+ return new Promise(function(n, r) {
1291
+ const s = Tt(t);
1292
+ let o = s.data;
1293
+ const i = N.from(s.headers).normalize();
1294
+ let { responseType: a, onUploadProgress: u, onDownloadProgress: d } = s, f, p, S, y, c;
1295
+ function m() {
1296
+ y && y(), c && c(), s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
1297
+ }
1298
+ let h = new XMLHttpRequest();
1299
+ h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
1300
+ function _() {
1301
+ if (!h)
1302
+ return;
1303
+ const E = N.from(
1304
+ "getAllResponseHeaders" in h && h.getAllResponseHeaders()
1305
+ ), x = {
1306
+ data: !a || a === "text" || a === "json" ? h.responseText : h.response,
1307
+ status: h.status,
1308
+ statusText: h.statusText,
1309
+ headers: E,
1310
+ config: t,
1311
+ request: h
1312
+ };
1313
+ _t(function(C) {
1314
+ n(C), m();
1315
+ }, function(C) {
1316
+ r(C), m();
1317
+ }, x), h = null;
1318
+ }
1319
+ "onloadend" in h ? h.onloadend = _ : h.onreadystatechange = function() {
1320
+ !h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(_);
1321
+ }, h.onabort = function() {
1322
+ h && (r(new b("Request aborted", b.ECONNABORTED, t, h)), h = null);
1323
+ }, h.onerror = function(T) {
1324
+ const x = T && T.message ? T.message : "Network Error", v = new b(x, b.ERR_NETWORK, t, h);
1325
+ v.event = T || null, r(v), h = null;
1326
+ }, h.ontimeout = function() {
1327
+ let T = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
1328
+ const x = s.transitional || gt;
1329
+ s.timeoutErrorMessage && (T = s.timeoutErrorMessage), r(new b(
1330
+ T,
1331
+ x.clarifyTimeoutError ? b.ETIMEDOUT : b.ECONNABORTED,
1332
+ t,
1333
+ h
1334
+ )), h = null;
1335
+ }, o === void 0 && i.setContentType(null), "setRequestHeader" in h && l.forEach(i.toJSON(), function(T, x) {
1336
+ h.setRequestHeader(x, T);
1337
+ }), l.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), a && a !== "json" && (h.responseType = s.responseType), d && ([S, c] = pe(d, !0), h.addEventListener("progress", S)), u && h.upload && ([p, y] = pe(u), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", y)), (s.cancelToken || s.signal) && (f = (E) => {
1338
+ h && (r(!E || E.type ? new ie(null, t, h) : E), h.abort(), h = null);
1339
+ }, s.cancelToken && s.cancelToken.subscribe(f), s.signal && (s.signal.aborted ? f() : s.signal.addEventListener("abort", f)));
1340
+ const g = Ir(s.url);
1341
+ if (g && O.protocols.indexOf(g) === -1) {
1342
+ r(new b("Unsupported protocol " + g + ":", b.ERR_BAD_REQUEST, t));
1343
+ return;
1344
+ }
1345
+ h.send(o || null);
1346
+ });
1347
+ }, Jr = (t, e) => {
1348
+ const { length: n } = t = t ? t.filter(Boolean) : [];
1349
+ if (e || n) {
1350
+ let r = new AbortController(), s;
1351
+ const o = function(d) {
1352
+ if (!s) {
1353
+ s = !0, a();
1354
+ const f = d instanceof Error ? d : this.reason;
1355
+ r.abort(f instanceof b ? f : new ie(f instanceof Error ? f.message : f));
1356
+ }
1357
+ };
1358
+ let i = e && setTimeout(() => {
1359
+ i = null, o(new b(`timeout of ${e}ms exceeded`, b.ETIMEDOUT));
1360
+ }, e);
1361
+ const a = () => {
1362
+ t && (i && clearTimeout(i), i = null, t.forEach((d) => {
1363
+ d.unsubscribe ? d.unsubscribe(o) : d.removeEventListener("abort", o);
1364
+ }), t = null);
1365
+ };
1366
+ t.forEach((d) => d.addEventListener("abort", o));
1367
+ const { signal: u } = r;
1368
+ return u.unsubscribe = () => l.asap(a), u;
1369
+ }
1370
+ }, Kr = function* (t, e) {
1371
+ let n = t.byteLength;
1372
+ if (n < e) {
1373
+ yield t;
1374
+ return;
1375
+ }
1376
+ let r = 0, s;
1377
+ for (; r < n; )
1378
+ s = r + e, yield t.slice(r, s), r = s;
1379
+ }, Xr = async function* (t, e) {
1380
+ for await (const n of Yr(t))
1381
+ yield* Kr(n, e);
1382
+ }, Yr = async function* (t) {
1383
+ if (t[Symbol.asyncIterator]) {
1384
+ yield* t;
1385
+ return;
1386
+ }
1387
+ const e = t.getReader();
1388
+ try {
1389
+ for (; ; ) {
1390
+ const { done: n, value: r } = await e.read();
1391
+ if (n)
1392
+ break;
1393
+ yield r;
1394
+ }
1395
+ } finally {
1396
+ await e.cancel();
1397
+ }
1398
+ }, Ke = (t, e, n, r) => {
1399
+ const s = Xr(t, e);
1400
+ let o = 0, i, a = (u) => {
1401
+ i || (i = !0, r && r(u));
1402
+ };
1403
+ return new ReadableStream({
1404
+ async pull(u) {
1405
+ try {
1406
+ const { done: d, value: f } = await s.next();
1407
+ if (d) {
1408
+ a(), u.close();
1409
+ return;
1410
+ }
1411
+ let p = f.byteLength;
1412
+ if (n) {
1413
+ let S = o += p;
1414
+ n(S);
1415
+ }
1416
+ u.enqueue(new Uint8Array(f));
1417
+ } catch (d) {
1418
+ throw a(d), d;
1419
+ }
1420
+ },
1421
+ cancel(u) {
1422
+ return a(u), s.return();
1423
+ }
1424
+ }, {
1425
+ highWaterMark: 2
1426
+ });
1427
+ }, Xe = 64 * 1024, { isFunction: ce } = l, Qr = (({ Request: t, Response: e }) => ({
1428
+ Request: t,
1429
+ Response: e
1430
+ }))(l.global), {
1431
+ ReadableStream: Ye,
1432
+ TextEncoder: Qe
1433
+ } = l.global, Ze = (t, ...e) => {
1434
+ try {
1435
+ return !!t(...e);
1436
+ } catch {
1437
+ return !1;
1438
+ }
1439
+ }, Zr = (t) => {
1440
+ t = l.merge.call({
1441
+ skipUndefined: !0
1442
+ }, Qr, t);
1443
+ const { fetch: e, Request: n, Response: r } = t, s = e ? ce(e) : typeof fetch == "function", o = ce(n), i = ce(r);
1444
+ if (!s)
1445
+ return !1;
1446
+ const a = s && ce(Ye), u = s && (typeof Qe == "function" ? /* @__PURE__ */ ((c) => (m) => c.encode(m))(new Qe()) : async (c) => new Uint8Array(await new n(c).arrayBuffer())), d = o && a && Ze(() => {
1447
+ let c = !1;
1448
+ const m = new n(O.origin, {
1449
+ body: new Ye(),
1450
+ method: "POST",
1451
+ get duplex() {
1452
+ return c = !0, "half";
1453
+ }
1454
+ }).headers.has("Content-Type");
1455
+ return c && !m;
1456
+ }), f = i && a && Ze(() => l.isReadableStream(new r("").body)), p = {
1457
+ stream: f && ((c) => c.body)
1458
+ };
1459
+ s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((c) => {
1460
+ !p[c] && (p[c] = (m, h) => {
1461
+ let _ = m && m[c];
1462
+ if (_)
1463
+ return _.call(m);
1464
+ throw new b(`Response type '${c}' is not supported`, b.ERR_NOT_SUPPORT, h);
1465
+ });
1466
+ });
1467
+ const S = async (c) => {
1468
+ if (c == null)
1469
+ return 0;
1470
+ if (l.isBlob(c))
1471
+ return c.size;
1472
+ if (l.isSpecCompliantForm(c))
1473
+ return (await new n(O.origin, {
1474
+ method: "POST",
1475
+ body: c
1476
+ }).arrayBuffer()).byteLength;
1477
+ if (l.isArrayBufferView(c) || l.isArrayBuffer(c))
1478
+ return c.byteLength;
1479
+ if (l.isURLSearchParams(c) && (c = c + ""), l.isString(c))
1480
+ return (await u(c)).byteLength;
1481
+ }, y = async (c, m) => {
1482
+ const h = l.toFiniteNumber(c.getContentLength());
1483
+ return h ?? S(m);
1484
+ };
1485
+ return async (c) => {
1486
+ let {
1487
+ url: m,
1488
+ method: h,
1489
+ data: _,
1490
+ signal: g,
1491
+ cancelToken: E,
1492
+ timeout: T,
1493
+ onDownloadProgress: x,
1494
+ onUploadProgress: v,
1495
+ responseType: C,
1496
+ headers: Q,
1497
+ withCredentials: k = "same-origin",
1498
+ fetchOptions: H
1499
+ } = Tt(c), V = e || fetch;
1500
+ C = C ? (C + "").toLowerCase() : "text";
1501
+ let B = Jr([g, E && E.toAbortSignal()], T), M = null;
1502
+ const I = B && B.unsubscribe && (() => {
1503
+ B.unsubscribe();
1504
+ });
1505
+ let ae;
1506
+ try {
1507
+ if (v && d && h !== "get" && h !== "head" && (ae = await y(Q, _)) !== 0) {
1508
+ let q = new n(m, {
1509
+ method: "POST",
1510
+ body: _,
1511
+ duplex: "half"
1512
+ }), J;
1513
+ if (l.isFormData(_) && (J = q.headers.get("content-type")) && Q.setContentType(J), q.body) {
1514
+ const [Ee, le] = Ge(
1515
+ ae,
1516
+ pe(Ve(v))
1517
+ );
1518
+ _ = Ke(q.body, Xe, Ee, le);
1519
+ }
1520
+ }
1521
+ l.isString(k) || (k = k ? "include" : "omit");
1522
+ const D = o && "credentials" in n.prototype, Ue = {
1523
+ ...H,
1524
+ signal: B,
1525
+ method: h.toUpperCase(),
1526
+ headers: Q.normalize().toJSON(),
1527
+ body: _,
1528
+ duplex: "half",
1529
+ credentials: D ? k : void 0
1530
+ };
1531
+ M = o && new n(m, Ue);
1532
+ let $ = await (o ? V(M, H) : V(m, Ue));
1533
+ const ve = f && (C === "stream" || C === "response");
1534
+ if (f && (x || ve && I)) {
1535
+ const q = {};
1536
+ ["status", "statusText", "headers"].forEach((Me) => {
1537
+ q[Me] = $[Me];
1538
+ });
1539
+ const J = l.toFiniteNumber($.headers.get("content-length")), [Ee, le] = x && Ge(
1540
+ J,
1541
+ pe(Ve(x), !0)
1542
+ ) || [];
1543
+ $ = new r(
1544
+ Ke($.body, Xe, Ee, () => {
1545
+ le && le(), I && I();
1546
+ }),
1547
+ q
1548
+ );
1549
+ }
1550
+ C = C || "text";
1551
+ let Dt = await p[l.findKey(p, C) || "text"]($, c);
1552
+ return !ve && I && I(), await new Promise((q, J) => {
1553
+ _t(q, J, {
1554
+ data: Dt,
1555
+ headers: N.from($.headers),
1556
+ status: $.status,
1557
+ statusText: $.statusText,
1558
+ config: c,
1559
+ request: M
1560
+ });
1561
+ });
1562
+ } catch (D) {
1563
+ throw I && I(), D && D.name === "TypeError" && /Load failed|fetch/i.test(D.message) ? Object.assign(
1564
+ new b("Network Error", b.ERR_NETWORK, c, M),
1565
+ {
1566
+ cause: D.cause || D
1567
+ }
1568
+ ) : b.from(D, D && D.code, c, M);
1569
+ }
1570
+ };
1571
+ }, es = /* @__PURE__ */ new Map(), xt = (t) => {
1572
+ let e = t && t.env || {};
1573
+ const { fetch: n, Request: r, Response: s } = e, o = [
1574
+ r,
1575
+ s,
1576
+ n
1577
+ ];
1578
+ let i = o.length, a = i, u, d, f = es;
1579
+ for (; a--; )
1580
+ u = o[a], d = f.get(u), d === void 0 && f.set(u, d = a ? /* @__PURE__ */ new Map() : Zr(e)), f = d;
1581
+ return d;
1582
+ };
1583
+ xt();
1584
+ const Fe = {
1585
+ http: yr,
1586
+ xhr: Vr,
1587
+ fetch: {
1588
+ get: xt
1589
+ }
1590
+ };
1591
+ l.forEach(Fe, (t, e) => {
1592
+ if (t) {
1593
+ try {
1594
+ Object.defineProperty(t, "name", { value: e });
1595
+ } catch {
1596
+ }
1597
+ Object.defineProperty(t, "adapterName", { value: e });
1598
+ }
1599
+ });
1600
+ const et = (t) => `- ${t}`, ts = (t) => l.isFunction(t) || t === null || t === !1;
1601
+ function ns(t, e) {
1602
+ t = l.isArray(t) ? t : [t];
1603
+ const { length: n } = t;
1604
+ let r, s;
1605
+ const o = {};
1606
+ for (let i = 0; i < n; i++) {
1607
+ r = t[i];
1608
+ let a;
1609
+ if (s = r, !ts(r) && (s = Fe[(a = String(r)).toLowerCase()], s === void 0))
1610
+ throw new b(`Unknown adapter '${a}'`);
1611
+ if (s && (l.isFunction(s) || (s = s.get(e))))
1612
+ break;
1613
+ o[a || "#" + i] = s;
1614
+ }
1615
+ if (!s) {
1616
+ const i = Object.entries(o).map(
1617
+ ([u, d]) => `adapter ${u} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
1618
+ );
1619
+ let a = n ? i.length > 1 ? `since :
1620
+ ` + i.map(et).join(`
1621
+ `) : " " + et(i[0]) : "as no adapter specified";
1622
+ throw new b(
1623
+ "There is no suitable adapter to dispatch the request " + a,
1624
+ "ERR_NOT_SUPPORT"
1625
+ );
1626
+ }
1627
+ return s;
1628
+ }
1629
+ const Ot = {
1630
+ /**
1631
+ * Resolve an adapter from a list of adapter names or functions.
1632
+ * @type {Function}
1633
+ */
1634
+ getAdapter: ns,
1635
+ /**
1636
+ * Exposes all known adapters
1637
+ * @type {Object<string, Function|Object>}
1638
+ */
1639
+ adapters: Fe
1640
+ };
1641
+ function Oe(t) {
1642
+ if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
1643
+ throw new ie(null, t);
1644
+ }
1645
+ function tt(t) {
1646
+ return Oe(t), t.headers = N.from(t.headers), t.data = xe.call(
1647
+ t,
1648
+ t.transformRequest
1649
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), Ot.getAdapter(t.adapter || oe.adapter, t)(t).then(function(r) {
1650
+ return Oe(t), r.data = xe.call(
1651
+ t,
1652
+ t.transformResponse,
1653
+ r
1654
+ ), r.headers = N.from(r.headers), r;
1655
+ }, function(r) {
1656
+ return Et(r) || (Oe(t), r && r.response && (r.response.data = xe.call(
1657
+ t,
1658
+ t.transformResponse,
1659
+ r.response
1660
+ ), r.response.headers = N.from(r.response.headers))), Promise.reject(r);
1661
+ });
1662
+ }
1663
+ const Ct = "1.13.4", we = {};
1664
+ ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
1665
+ we[t] = function(r) {
1666
+ return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
1667
+ };
1668
+ });
1669
+ const nt = {};
1670
+ we.transitional = function(e, n, r) {
1671
+ function s(o, i) {
1672
+ return "[Axios v" + Ct + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
1673
+ }
1674
+ return (o, i, a) => {
1675
+ if (e === !1)
1676
+ throw new b(
1677
+ s(i, " has been removed" + (n ? " in " + n : "")),
1678
+ b.ERR_DEPRECATED
1679
+ );
1680
+ return n && !nt[i] && (nt[i] = !0, console.warn(
1681
+ s(
1682
+ i,
1683
+ " has been deprecated since v" + n + " and will be removed in the near future"
1684
+ )
1685
+ )), e ? e(o, i, a) : !0;
1686
+ };
1687
+ };
1688
+ we.spelling = function(e) {
1689
+ return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
1690
+ };
1691
+ function rs(t, e, n) {
1692
+ if (typeof t != "object")
1693
+ throw new b("options must be an object", b.ERR_BAD_OPTION_VALUE);
1694
+ const r = Object.keys(t);
1695
+ let s = r.length;
1696
+ for (; s-- > 0; ) {
1697
+ const o = r[s], i = e[o];
1698
+ if (i) {
1699
+ const a = t[o], u = a === void 0 || i(a, o, t);
1700
+ if (u !== !0)
1701
+ throw new b("option " + o + " must be " + u, b.ERR_BAD_OPTION_VALUE);
1702
+ continue;
1703
+ }
1704
+ if (n !== !0)
1705
+ throw new b("Unknown option " + o, b.ERR_BAD_OPTION);
1706
+ }
1707
+ }
1708
+ const he = {
1709
+ assertOptions: rs,
1710
+ validators: we
1711
+ }, F = he.validators;
1712
+ let W = class {
1713
+ constructor(e) {
1714
+ this.defaults = e || {}, this.interceptors = {
1715
+ request: new ze(),
1716
+ response: new ze()
1717
+ };
1718
+ }
1719
+ /**
1720
+ * Dispatch a request
1721
+ *
1722
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
1723
+ * @param {?Object} config
1724
+ *
1725
+ * @returns {Promise} The Promise to be fulfilled
1726
+ */
1727
+ async request(e, n) {
1728
+ try {
1729
+ return await this._request(e, n);
1730
+ } catch (r) {
1731
+ if (r instanceof Error) {
1732
+ let s = {};
1733
+ Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
1734
+ const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
1735
+ try {
1736
+ r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
1737
+ ` + o) : r.stack = o;
1738
+ } catch {
1739
+ }
1740
+ }
1741
+ throw r;
1742
+ }
1743
+ }
1744
+ _request(e, n) {
1745
+ typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = G(this.defaults, n);
1746
+ const { transitional: r, paramsSerializer: s, headers: o } = n;
1747
+ r !== void 0 && he.assertOptions(r, {
1748
+ silentJSONParsing: F.transitional(F.boolean),
1749
+ forcedJSONParsing: F.transitional(F.boolean),
1750
+ clarifyTimeoutError: F.transitional(F.boolean)
1751
+ }, !1), s != null && (l.isFunction(s) ? n.paramsSerializer = {
1752
+ serialize: s
1753
+ } : he.assertOptions(s, {
1754
+ encode: F.function,
1755
+ serialize: F.function
1756
+ }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), he.assertOptions(n, {
1757
+ baseUrl: F.spelling("baseURL"),
1758
+ withXsrfToken: F.spelling("withXSRFToken")
1759
+ }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
1760
+ let i = o && l.merge(
1761
+ o.common,
1762
+ o[n.method]
1763
+ );
1764
+ o && l.forEach(
1765
+ ["delete", "get", "head", "post", "put", "patch", "common"],
1766
+ (c) => {
1767
+ delete o[c];
1768
+ }
1769
+ ), n.headers = N.concat(i, o);
1770
+ const a = [];
1771
+ let u = !0;
1772
+ this.interceptors.request.forEach(function(m) {
1773
+ typeof m.runWhen == "function" && m.runWhen(n) === !1 || (u = u && m.synchronous, a.unshift(m.fulfilled, m.rejected));
1774
+ });
1775
+ const d = [];
1776
+ this.interceptors.response.forEach(function(m) {
1777
+ d.push(m.fulfilled, m.rejected);
1778
+ });
1779
+ let f, p = 0, S;
1780
+ if (!u) {
1781
+ const c = [tt.bind(this), void 0];
1782
+ for (c.unshift(...a), c.push(...d), S = c.length, f = Promise.resolve(n); p < S; )
1783
+ f = f.then(c[p++], c[p++]);
1784
+ return f;
1785
+ }
1786
+ S = a.length;
1787
+ let y = n;
1788
+ for (; p < S; ) {
1789
+ const c = a[p++], m = a[p++];
1790
+ try {
1791
+ y = c(y);
1792
+ } catch (h) {
1793
+ m.call(this, h);
1794
+ break;
1795
+ }
1796
+ }
1797
+ try {
1798
+ f = tt.call(this, y);
1799
+ } catch (c) {
1800
+ return Promise.reject(c);
1801
+ }
1802
+ for (p = 0, S = d.length; p < S; )
1803
+ f = f.then(d[p++], d[p++]);
1804
+ return f;
1805
+ }
1806
+ getUri(e) {
1807
+ e = G(this.defaults, e);
1808
+ const n = Rt(e.baseURL, e.url, e.allowAbsoluteUrls);
1809
+ return St(n, e.params, e.paramsSerializer);
1810
+ }
1811
+ };
1812
+ l.forEach(["delete", "get", "head", "options"], function(e) {
1813
+ W.prototype[e] = function(n, r) {
1814
+ return this.request(G(r || {}, {
1815
+ method: e,
1816
+ url: n,
1817
+ data: (r || {}).data
1818
+ }));
1819
+ };
1820
+ });
1821
+ l.forEach(["post", "put", "patch"], function(e) {
1822
+ function n(r) {
1823
+ return function(o, i, a) {
1824
+ return this.request(G(a || {}, {
1825
+ method: e,
1826
+ headers: r ? {
1827
+ "Content-Type": "multipart/form-data"
1828
+ } : {},
1829
+ url: o,
1830
+ data: i
1831
+ }));
1832
+ };
1833
+ }
1834
+ W.prototype[e] = n(), W.prototype[e + "Form"] = n(!0);
1835
+ });
1836
+ let ss = class At {
1837
+ constructor(e) {
1838
+ if (typeof e != "function")
1839
+ throw new TypeError("executor must be a function.");
1840
+ let n;
1841
+ this.promise = new Promise(function(o) {
1842
+ n = o;
1843
+ });
1844
+ const r = this;
1845
+ this.promise.then((s) => {
1846
+ if (!r._listeners) return;
1847
+ let o = r._listeners.length;
1848
+ for (; o-- > 0; )
1849
+ r._listeners[o](s);
1850
+ r._listeners = null;
1851
+ }), this.promise.then = (s) => {
1852
+ let o;
1853
+ const i = new Promise((a) => {
1854
+ r.subscribe(a), o = a;
1855
+ }).then(s);
1856
+ return i.cancel = function() {
1857
+ r.unsubscribe(o);
1858
+ }, i;
1859
+ }, e(function(o, i, a) {
1860
+ r.reason || (r.reason = new ie(o, i, a), n(r.reason));
1861
+ });
1862
+ }
1863
+ /**
1864
+ * Throws a `CanceledError` if cancellation has been requested.
1865
+ */
1866
+ throwIfRequested() {
1867
+ if (this.reason)
1868
+ throw this.reason;
1869
+ }
1870
+ /**
1871
+ * Subscribe to the cancel signal
1872
+ */
1873
+ subscribe(e) {
1874
+ if (this.reason) {
1875
+ e(this.reason);
1876
+ return;
1877
+ }
1878
+ this._listeners ? this._listeners.push(e) : this._listeners = [e];
1879
+ }
1880
+ /**
1881
+ * Unsubscribe from the cancel signal
1882
+ */
1883
+ unsubscribe(e) {
1884
+ if (!this._listeners)
1885
+ return;
1886
+ const n = this._listeners.indexOf(e);
1887
+ n !== -1 && this._listeners.splice(n, 1);
1888
+ }
1889
+ toAbortSignal() {
1890
+ const e = new AbortController(), n = (r) => {
1891
+ e.abort(r);
1892
+ };
1893
+ return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
1894
+ }
1895
+ /**
1896
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
1897
+ * cancels the `CancelToken`.
1898
+ */
1899
+ static source() {
1900
+ let e;
1901
+ return {
1902
+ token: new At(function(s) {
1903
+ e = s;
1904
+ }),
1905
+ cancel: e
1906
+ };
1907
+ }
1908
+ };
1909
+ function os(t) {
1910
+ return function(n) {
1911
+ return t.apply(null, n);
1912
+ };
1913
+ }
1914
+ function is(t) {
1915
+ return l.isObject(t) && t.isAxiosError === !0;
1916
+ }
1917
+ const Pe = {
1918
+ Continue: 100,
1919
+ SwitchingProtocols: 101,
1920
+ Processing: 102,
1921
+ EarlyHints: 103,
1922
+ Ok: 200,
1923
+ Created: 201,
1924
+ Accepted: 202,
1925
+ NonAuthoritativeInformation: 203,
1926
+ NoContent: 204,
1927
+ ResetContent: 205,
1928
+ PartialContent: 206,
1929
+ MultiStatus: 207,
1930
+ AlreadyReported: 208,
1931
+ ImUsed: 226,
1932
+ MultipleChoices: 300,
1933
+ MovedPermanently: 301,
1934
+ Found: 302,
1935
+ SeeOther: 303,
1936
+ NotModified: 304,
1937
+ UseProxy: 305,
1938
+ Unused: 306,
1939
+ TemporaryRedirect: 307,
1940
+ PermanentRedirect: 308,
1941
+ BadRequest: 400,
1942
+ Unauthorized: 401,
1943
+ PaymentRequired: 402,
1944
+ Forbidden: 403,
1945
+ NotFound: 404,
1946
+ MethodNotAllowed: 405,
1947
+ NotAcceptable: 406,
1948
+ ProxyAuthenticationRequired: 407,
1949
+ RequestTimeout: 408,
1950
+ Conflict: 409,
1951
+ Gone: 410,
1952
+ LengthRequired: 411,
1953
+ PreconditionFailed: 412,
1954
+ PayloadTooLarge: 413,
1955
+ UriTooLong: 414,
1956
+ UnsupportedMediaType: 415,
1957
+ RangeNotSatisfiable: 416,
1958
+ ExpectationFailed: 417,
1959
+ ImATeapot: 418,
1960
+ MisdirectedRequest: 421,
1961
+ UnprocessableEntity: 422,
1962
+ Locked: 423,
1963
+ FailedDependency: 424,
1964
+ TooEarly: 425,
1965
+ UpgradeRequired: 426,
1966
+ PreconditionRequired: 428,
1967
+ TooManyRequests: 429,
1968
+ RequestHeaderFieldsTooLarge: 431,
1969
+ UnavailableForLegalReasons: 451,
1970
+ InternalServerError: 500,
1971
+ NotImplemented: 501,
1972
+ BadGateway: 502,
1973
+ ServiceUnavailable: 503,
1974
+ GatewayTimeout: 504,
1975
+ HttpVersionNotSupported: 505,
1976
+ VariantAlsoNegotiates: 506,
1977
+ InsufficientStorage: 507,
1978
+ LoopDetected: 508,
1979
+ NotExtended: 510,
1980
+ NetworkAuthenticationRequired: 511,
1981
+ WebServerIsDown: 521,
1982
+ ConnectionTimedOut: 522,
1983
+ OriginIsUnreachable: 523,
1984
+ TimeoutOccurred: 524,
1985
+ SslHandshakeFailed: 525,
1986
+ InvalidSslCertificate: 526
1987
+ };
1988
+ Object.entries(Pe).forEach(([t, e]) => {
1989
+ Pe[e] = t;
1990
+ });
1991
+ function Nt(t) {
1992
+ const e = new W(t), n = at(W.prototype.request, e);
1993
+ return l.extend(n, W.prototype, e, { allOwnKeys: !0 }), l.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
1994
+ return Nt(G(t, s));
1995
+ }, n;
1996
+ }
1997
+ const R = Nt(oe);
1998
+ R.Axios = W;
1999
+ R.CanceledError = ie;
2000
+ R.CancelToken = ss;
2001
+ R.isCancel = Et;
2002
+ R.VERSION = Ct;
2003
+ R.toFormData = ge;
2004
+ R.AxiosError = b;
2005
+ R.Cancel = R.CanceledError;
2006
+ R.all = function(e) {
2007
+ return Promise.all(e);
2008
+ };
2009
+ R.spread = os;
2010
+ R.isAxiosError = is;
2011
+ R.mergeConfig = G;
2012
+ R.AxiosHeaders = N;
2013
+ R.formToJSON = (t) => wt(l.isHTMLForm(t) ? new FormData(t) : t);
2014
+ R.getAdapter = Ot.getAdapter;
2015
+ R.HttpStatusCode = Pe;
2016
+ R.default = R;
2017
+ const {
2018
+ Axios: Os,
2019
+ AxiosError: Cs,
2020
+ CanceledError: As,
2021
+ isCancel: Ns,
2022
+ CancelToken: Ps,
2023
+ VERSION: Ds,
2024
+ all: Ls,
2025
+ Cancel: ks,
2026
+ isAxiosError: Bs,
2027
+ spread: Fs,
2028
+ toFormData: Us,
2029
+ AxiosHeaders: vs,
2030
+ HttpStatusCode: Ms,
2031
+ formToJSON: Is,
2032
+ getAdapter: js,
2033
+ mergeConfig: $s
2034
+ } = R, as = "useDeepSeek";
2035
+ class ls {
2036
+ axios;
2037
+ constructor(e, n) {
2038
+ this.axios = R.create({
2039
+ baseURL: e
2040
+ }), this.axios.interceptors.request.use(n?.interceptorsRequest, n?.interceptorsRequestException), this.axios.interceptors.response.use(n?.interceptorsResponse, n?.interceptorsResponseException);
2041
+ }
2042
+ httpPost(e, n) {
2043
+ return new Promise((r, s) => {
2044
+ this.axios.post(e, n).then((o) => {
2045
+ r(o.data);
2046
+ }).catch((o) => {
2047
+ s({ code: 400, message: "call api failed.", error: o });
2048
+ });
2049
+ });
2050
+ }
2051
+ httpPostSse(e, n, r) {
2052
+ return new Promise((s, o) => {
2053
+ this.axios.post(e, n, {
2054
+ responseType: "stream",
2055
+ adapter: "fetch"
2056
+ }).then(async (i) => {
2057
+ await this.processStreamResponse(i, (a) => r(a)), s(i);
2058
+ }).catch((i) => {
2059
+ o({ code: 400, message: "call api failed.", error: i });
2060
+ });
2061
+ });
2062
+ }
2063
+ parseAndEmit(e, n) {
2064
+ if (e.trim())
2065
+ try {
2066
+ const r = e.startsWith("data:") ? e.substring(5) : e, s = JSON.parse(r.trim());
2067
+ n(s);
2068
+ } catch (r) {
2069
+ console.error("Invalid chunk:", e, r);
2070
+ }
2071
+ }
2072
+ async processStreamResponse(e, n) {
2073
+ const s = e.data.pipeThrough(new TextDecoderStream()).getReader();
2074
+ try {
2075
+ let o = "";
2076
+ for (; ; ) {
2077
+ const { done: i, value: a } = await s.read();
2078
+ if (i) {
2079
+ this.parseAndEmit(o, n);
2080
+ break;
2081
+ }
2082
+ o += a;
2083
+ const u = o.split(/\ndata: /);
2084
+ o = u.pop() || "", u.forEach((d) => this.parseAndEmit(d, n));
2085
+ }
2086
+ } catch (o) {
2087
+ console.error("Stream reading failed:", o);
2088
+ } finally {
2089
+ s.releaseLock();
2090
+ }
2091
+ }
2092
+ }
2093
+ let Pt = "/api";
2094
+ process.env.NODE_ENV === "development" && (Pt = "http://localhost:5000/api");
2095
+ const cs = new ls(Pt);
2096
+ function us(t, e) {
2097
+ var n, r, s, o, i, a, u, d;
2098
+ for (n = t.length & 3, r = t.length - n, s = e, i = 3432918353, a = 461845907, d = 0; d < r; )
2099
+ u = t.charCodeAt(d) & 255 | (t.charCodeAt(++d) & 255) << 8 | (t.charCodeAt(++d) & 255) << 16 | (t.charCodeAt(++d) & 255) << 24, ++d, u = (u & 65535) * i + (((u >>> 16) * i & 65535) << 16) & 4294967295, u = u << 15 | u >>> 17, u = (u & 65535) * a + (((u >>> 16) * a & 65535) << 16) & 4294967295, s ^= u, s = s << 13 | s >>> 19, o = (s & 65535) * 5 + (((s >>> 16) * 5 & 65535) << 16) & 4294967295, s = (o & 65535) + 27492 + (((o >>> 16) + 58964 & 65535) << 16);
2100
+ switch (u = 0, n) {
2101
+ case 3:
2102
+ u ^= (t.charCodeAt(d + 2) & 255) << 16;
2103
+ case 2:
2104
+ u ^= (t.charCodeAt(d + 1) & 255) << 8;
2105
+ case 1:
2106
+ u ^= t.charCodeAt(d) & 255, u = (u & 65535) * i + (((u >>> 16) * i & 65535) << 16) & 4294967295, u = u << 15 | u >>> 17, u = (u & 65535) * a + (((u >>> 16) * a & 65535) << 16) & 4294967295, s ^= u;
2107
+ }
2108
+ return s ^= t.length, s ^= s >>> 16, s = (s & 65535) * 2246822507 + (((s >>> 16) * 2246822507 & 65535) << 16) & 4294967295, s ^= s >>> 13, s = (s & 65535) * 3266489909 + (((s >>> 16) * 3266489909 & 65535) << 16) & 4294967295, s ^= s >>> 16, s >>> 0;
2109
+ }
2110
+ function ue(t) {
2111
+ let e = [];
2112
+ return t.forEach((n, r) => {
2113
+ e.push(r + ":" + n);
2114
+ }), "{" + e.join(";") + "}";
2115
+ }
2116
+ class te {
2117
+ sheet;
2118
+ rules = /* @__PURE__ */ new Map();
2119
+ _hover;
2120
+ _before;
2121
+ _after;
2122
+ constructor(e) {
2123
+ this.sheet = e;
2124
+ }
2125
+ addStyle(e, n) {
2126
+ return n === void 0 ? this : (this.rules.set(e, n), this);
2127
+ }
2128
+ hover() {
2129
+ return this._hover = new te(this.sheet), this._hover;
2130
+ }
2131
+ before() {
2132
+ return this._before = new te(this.sheet), this._before;
2133
+ }
2134
+ after() {
2135
+ return this._after = new te(this.sheet), this._after;
2136
+ }
2137
+ build() {
2138
+ let e = [], n = ue(this.rules);
2139
+ e.push(n);
2140
+ let r = "";
2141
+ this._hover && (r = ue(this._hover.rules), e.push(":hover" + r));
2142
+ let s = "";
2143
+ this._before && (s = ue(this._before.rules), e.push(":before" + s));
2144
+ let o = "";
2145
+ this._after && (o = ue(this._after.rules), e.push(":after" + o));
2146
+ let i = "pano-" + us(e.join(";")).toString(36);
2147
+ return this.sheet.insert("." + i + n), this._hover && this.sheet.insert("." + i + ":hover" + r), this._before && this.sheet.insert("." + i + ":before" + s), this._after && this.sheet.insert("." + i + ":after" + o), i;
2148
+ }
2149
+ // #region style extension
2150
+ content(e) {
2151
+ return this.addStyle("content", e);
2152
+ }
2153
+ margin(e) {
2154
+ return this.addStyle("margin", e);
2155
+ }
2156
+ display(e) {
2157
+ return this.addStyle("display", e);
2158
+ }
2159
+ padding(e) {
2160
+ return this.addStyle("padding", e);
2161
+ }
2162
+ color(e) {
2163
+ return this.addStyle("color", e);
2164
+ }
2165
+ border(e) {
2166
+ return this.addStyle("border", e);
2167
+ }
2168
+ background(e) {
2169
+ return this.addStyle("background", e);
2170
+ }
2171
+ backgroundImage(e) {
2172
+ return this.addStyle("background-image", e);
2173
+ }
2174
+ backgroundSize(e) {
2175
+ return this.addStyle("background-size", e);
2176
+ }
2177
+ backgroundColor(e) {
2178
+ return this.addStyle("background-color", e);
2179
+ }
2180
+ cursor(e) {
2181
+ return this.addStyle("cursor", e);
2182
+ }
2183
+ borderStyle(e) {
2184
+ return this.addStyle("border-style", e);
2185
+ }
2186
+ borderColor(e) {
2187
+ return this.addStyle("border-color", e);
2188
+ }
2189
+ borderWidth(e) {
2190
+ return this.addStyle("border-width", e);
2191
+ }
2192
+ flexDirection(e) {
2193
+ return this.addStyle("flex-direction", e);
2194
+ }
2195
+ justifyContent(e) {
2196
+ return this.addStyle("justify-content", e);
2197
+ }
2198
+ alignItems(e) {
2199
+ return this.addStyle("align-items", e);
2200
+ }
2201
+ flex(e) {
2202
+ return this.addStyle("flex", e);
2203
+ }
2204
+ width(e) {
2205
+ return this.addStyle("width", e);
2206
+ }
2207
+ height(e) {
2208
+ return this.addStyle("height", e);
2209
+ }
2210
+ textAlign(e) {
2211
+ return this.addStyle("text-align", e);
2212
+ }
2213
+ fontSize(e) {
2214
+ return this.addStyle("font-size", e);
2215
+ }
2216
+ lineHeight(e) {
2217
+ return this.addStyle("line-height", e);
2218
+ }
2219
+ overflow(e) {
2220
+ return this.addStyle("overflow", e);
2221
+ }
2222
+ position(e) {
2223
+ return this.addStyle("position", e);
2224
+ }
2225
+ top(e) {
2226
+ return this.addStyle("top", e);
2227
+ }
2228
+ left(e) {
2229
+ return this.addStyle("left", e);
2230
+ }
2231
+ right(e) {
2232
+ return this.addStyle("right", e);
2233
+ }
2234
+ bottom(e) {
2235
+ return this.addStyle("bottom", e);
2236
+ }
2237
+ zIndex(e) {
2238
+ return this.addStyle("z-index", e + "");
2239
+ }
2240
+ boxShadow(e) {
2241
+ return this.addStyle("box-shadow", e);
2242
+ }
2243
+ borderRadius(e) {
2244
+ return this.addStyle("border-radius", e);
2245
+ }
2246
+ opacity(e) {
2247
+ return this.addStyle("opacity", e);
2248
+ }
2249
+ transform(e) {
2250
+ return this.addStyle("transform", e);
2251
+ }
2252
+ transition(e) {
2253
+ return this.addStyle("transition", e);
2254
+ }
2255
+ userSelect(e) {
2256
+ return this.addStyle("user-select", e);
2257
+ }
2258
+ pointerEvents(e) {
2259
+ return this.addStyle("pointer-events", e);
2260
+ }
2261
+ whiteSpace(e) {
2262
+ return this.addStyle("white-space", e);
2263
+ }
2264
+ textDecoration(e) {
2265
+ return this.addStyle("text-decoration", e);
2266
+ }
2267
+ wordBreak(e) {
2268
+ return this.addStyle("word-break", e);
2269
+ }
2270
+ wordWrap(e) {
2271
+ return this.addStyle("word-wrap", e);
2272
+ }
2273
+ inset(e) {
2274
+ return this.addStyle("inset", e);
2275
+ }
2276
+ }
2277
+ class ds {
2278
+ isSpeedy;
2279
+ count;
2280
+ rules;
2281
+ tags;
2282
+ // Using Node instead of HTMLElement since container may be a ShadowRoot
2283
+ container;
2284
+ key;
2285
+ nonce;
2286
+ constructor(e) {
2287
+ this.isSpeedy = e.speedy === void 0 ? process.env.NODE_ENV === "production" : e.speedy, this.rules = [], this.tags = [], this.count = 0, this.nonce = e.nonce, this.key = e.key, this.container = e.container;
2288
+ }
2289
+ insert(e) {
2290
+ if (this.rules.indexOf(e) >= 0)
2291
+ return;
2292
+ if (this.count % (this.isSpeedy ? 65e3 : 1) === 0) {
2293
+ let r = this.createStyleElement(this.key, this.nonce);
2294
+ this.container.appendChild(r), this.tags.push(r);
2295
+ }
2296
+ const n = this.tags[this.tags.length - 1];
2297
+ if (this.isSpeedy) {
2298
+ const r = this.findSheetOfTag(n);
2299
+ if (r) {
2300
+ try {
2301
+ r.insertRule(e, r.cssRules.length);
2302
+ } catch (s) {
2303
+ console.error(`There was a problem inserting the following rule: "${e}"`, s);
2304
+ }
2305
+ console.log(r);
2306
+ } else
2307
+ console.error("sheet is null or undefined.");
2308
+ } else
2309
+ n.appendChild(document.createTextNode(e));
2310
+ this.rules.push(e), this.count++;
2311
+ }
2312
+ clean() {
2313
+ this.tags.forEach((e) => {
2314
+ e.parentNode && e.parentNode.removeChild(e);
2315
+ }), this.tags = [], this.count = 0;
2316
+ }
2317
+ findSheetOfTag(e) {
2318
+ if (e.sheet)
2319
+ return e.sheet;
2320
+ for (let n = 0; n < document.styleSheets.length; n++)
2321
+ if (document.styleSheets[n].ownerNode === e)
2322
+ return document.styleSheets[n];
2323
+ }
2324
+ createStyleElement(e, n) {
2325
+ let r = document.createElement("style");
2326
+ return r.setAttribute("data-panosen", e), n !== void 0 && r.setAttribute("nonce", n), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r;
2327
+ }
2328
+ }
2329
+ let fs = new ds({
2330
+ speedy: !1,
2331
+ key: "pano",
2332
+ container: document.head
2333
+ });
2334
+ function hs() {
2335
+ var t = new te(fs);
2336
+ return t;
2337
+ }
2338
+ const ps = (t, e, n, r) => {
2339
+ const s = t.filter((a) => a.id !== e), o = s.findIndex((a) => a.id === n);
2340
+ if (o !== -1) {
2341
+ const a = [...s], u = a[o];
2342
+ return a[o] = {
2343
+ ...u,
2344
+ content: u.content + r
2345
+ }, a;
2346
+ }
2347
+ const i = {
2348
+ id: n,
2349
+ role: De,
2350
+ type: me,
2351
+ content: r,
2352
+ timestamp: Date.now()
2353
+ };
2354
+ return [...s, i];
2355
+ }, ms = (t, e) => {
2356
+ const n = t.filter((r) => r.id !== e);
2357
+ if (n.length > 0) {
2358
+ const r = n[n.length - 1];
2359
+ if (r.type === me && r.role === De && r.content.trim() === "")
2360
+ return n.slice(0, -1);
2361
+ }
2362
+ return n;
2363
+ }, bs = (t, e, n, r) => {
2364
+ const s = t.filter((i) => i.id !== e), o = s.findIndex((i) => i.id === n);
2365
+ if (o !== -1) {
2366
+ const i = [...s];
2367
+ return i[o] = {
2368
+ ...r
2369
+ }, i;
2370
+ }
2371
+ return [...s, r];
2372
+ }, ys = () => {
2373
+ const { tokens: t } = gn(), [e, n] = K([]), [r, s] = K(!1), [o, i] = K("111"), a = async (d) => {
2374
+ if (!d.trim())
2375
+ return;
2376
+ const f = {
2377
+ id: `user-${Date.now()}`,
2378
+ role: wn,
2379
+ type: me,
2380
+ content: d,
2381
+ timestamp: Date.now()
2382
+ };
2383
+ n((y) => [...y, f]), s(!0), i(null);
2384
+ const p = `loading-${Date.now()}`, S = {
2385
+ id: p,
2386
+ role: De,
2387
+ type: ot,
2388
+ content: "正在思考中...",
2389
+ timestamp: Date.now()
2390
+ };
2391
+ n((y) => [...y, S]);
2392
+ try {
2393
+ let y = 0, c = `assistant-${Date.now()}-${y}`;
2394
+ const m = (g) => {
2395
+ n((E) => ps(E, p, c, g));
2396
+ }, h = async (g) => {
2397
+ if (!g.name || !g.status)
2398
+ return;
2399
+ const E = g.id || `tool-${g.name}-${Date.now()}`;
2400
+ g.status === "preparing" || g.status === "processing" && (n((x) => ms(x, p)), y++, c = `assistant-${Date.now()}-${y}`);
2401
+ const T = {
2402
+ id: E,
2403
+ role: En,
2404
+ type: it,
2405
+ name: g.name,
2406
+ toolStatus: g.status,
2407
+ timestamp: Date.now()
2408
+ };
2409
+ n((x) => bs(x, p, E, T));
2410
+ }, _ = {
2411
+ content: d
2412
+ };
2413
+ cs.httpPostSse(as, _, (g) => {
2414
+ g.content && m(g.content), g.toolUsage && h(g.toolUsage), console.log(JSON.stringify(g));
2415
+ });
2416
+ } catch (y) {
2417
+ i("发送消息失败,请重试"), console.error("Error sending message:", y);
2418
+ } finally {
2419
+ s(!1);
2420
+ }
2421
+ }, u = hs().addStyle("--theme-background-color", t.backgroundColor).addStyle("--theme-text-color", t.textColor).addStyle("--theme-animation-gradient-start", t.animationGradientStart).addStyle("--theme-animation-gradient-mid", t.animationGradientMid).addStyle("--theme-animation-gradient-end", t.animationGradientEnd).addStyle("--theme-error-background", t.errorBackground).addStyle("--theme-error-color", t.errorColor).addStyle("--theme-error-border", t.errorBorder).addStyle("--theme-error-border-left", t.errorBorderLeft).addStyle("--theme-message-loading", t.messageLoading).addStyle("--theme-message-user", t.messageUser).addStyle("--theme-message-assistant", t.messageAssistant).addStyle("--theme-message-tool", t.messageTool).addStyle("--theme-input-border", t.inputBorder).addStyle("--theme-input-color", t.inputColor).addStyle("--theme-input-placeholder-color", t.inputPlaceholderColor).addStyle("--theme-input-shadow", t.inputShadow).addStyle("--theme-input-disabled-background", t.inputDisabledBackground).addStyle("--theme-input-disabled-color", t.inputDisabledColor).addStyle("--theme-input-disabled-border", t.inputDisabledBorder).addStyle("--theme-submit-color", t.submitColor).addStyle("--theme-submit-background", t.submitBackground).addStyle("--theme-submit-border", t.submitBorder).addStyle("--theme-submit-hover-background", t.submitHoverBackground).addStyle("--theme-list-scrollbar-track", t.listScrollbarTrack).addStyle("--theme-list-scrollbar-thumb", t.listScrollbarThumb).addStyle("--theme-list-scrollbar-thumb-hover", t.listScrollbarThumbHover).addStyle("--theme-list-scrollbar-glow", t.listScrollbarGlow).addStyle("--theme-list-welcome-color", t.listWelcomeColor).addStyle("--theme-list-welcome-title-gradient-start", t.listWelcomeTitleGradientStart).addStyle("--theme-list-welcome-title-gradient-mid", t.listWelcomeTitleGradientMid).addStyle("--theme-list-welcome-title-gradient-end", t.listWelcomeTitleGradientEnd).addStyle("--theme-list-welcome-title-text-shadow", t.listWelcomeTitleTextShadow).addStyle("--theme-list-welcome-content-color", t.listWelcomeContentColor).build();
2422
+ return /* @__PURE__ */ U("div", { className: `${Ie.panel} ${u}`, children: [
2423
+ o && /* @__PURE__ */ w("div", { className: Ie.error, children: o }),
2424
+ /* @__PURE__ */ w(
2425
+ Dn,
2426
+ {
2427
+ mode: "vertical",
2428
+ top: /* @__PURE__ */ w(Cn, { messages: e }),
2429
+ bottom: /* @__PURE__ */ w(An, { onSendMessage: a, disabled: r }),
2430
+ bottomHeight: "200px"
2431
+ }
2432
+ )
2433
+ ] });
2434
+ }, qs = ({ theme: t = "light" }) => /* @__PURE__ */ w(Lt, { children: /* @__PURE__ */ w(Sn, { theme: t, children: /* @__PURE__ */ w(ys, {}) }) });
2435
+ export {
2436
+ as as API_USE_DEEP_SEEK,
2437
+ qs as ChatApp,
2438
+ De as MESSAGE_ROLE_ASSISTANT,
2439
+ En as MESSAGE_ROLE_TOOL,
2440
+ wn as MESSAGE_ROLE_USER,
2441
+ ot as MESSAGE_TYPE_LOADING,
2442
+ me as MESSAGE_TYPE_TEXT,
2443
+ it as MESSAGE_TYPE_TOOL,
2444
+ _s as TOOL_STATUS_COMPLETED,
2445
+ ws as TOOL_STATUS_PREPARING,
2446
+ Es as TOOL_STATUS_PROCESSING,
2447
+ rt as computeThemeTokens,
2448
+ cs as simpleSampleService
2449
+ };