ai-chatbot-widget 0.0.4 → 0.0.5
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/chatbot-widget.es.js +320 -320
- package/dist/chatbot-widget.iife.js +21 -21
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var S = (t, e, n) =>
|
|
4
|
-
import
|
|
5
|
-
import { forwardRef as
|
|
1
|
+
var gn = Object.defineProperty;
|
|
2
|
+
var mn = (t, e, n) => e in t ? gn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var S = (t, e, n) => mn(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import bn from "react-dom/client";
|
|
5
|
+
import { forwardRef as vt, createElement as ze, useMemo as xn, useState as K, useRef as wn, useEffect as $e } from "react";
|
|
6
6
|
var Ne = { exports: {} }, ee = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
@@ -14,7 +14,7 @@ var Ne = { exports: {} }, ee = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var ot;
|
|
17
|
-
function
|
|
17
|
+
function kn() {
|
|
18
18
|
if (ot) return ee;
|
|
19
19
|
ot = 1;
|
|
20
20
|
var t = Symbol.for("react.transitional.element"), e = Symbol.for("react.fragment");
|
|
@@ -36,23 +36,23 @@ function wn() {
|
|
|
36
36
|
return ee.Fragment = e, ee.jsx = n, ee.jsxs = n, ee;
|
|
37
37
|
}
|
|
38
38
|
var at;
|
|
39
|
-
function
|
|
40
|
-
return at || (at = 1, Ne.exports =
|
|
39
|
+
function yn() {
|
|
40
|
+
return at || (at = 1, Ne.exports = kn()), Ne.exports;
|
|
41
41
|
}
|
|
42
|
-
var b =
|
|
42
|
+
var b = yn();
|
|
43
43
|
/**
|
|
44
44
|
* @license lucide-react v0.515.0 - ISC
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
const
|
|
49
|
+
const Rn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Sn = (t) => t.replace(
|
|
50
50
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
51
51
|
(e, n, r) => r ? r.toUpperCase() : n.toLowerCase()
|
|
52
52
|
), lt = (t) => {
|
|
53
|
-
const e =
|
|
53
|
+
const e = Sn(t);
|
|
54
54
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
55
|
-
},
|
|
55
|
+
}, Ot = (...t) => t.filter((e, n, r) => !!e && e.trim() !== "" && r.indexOf(e) === n).join(" ").trim(), En = (t) => {
|
|
56
56
|
for (const e in t)
|
|
57
57
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
58
58
|
return !0;
|
|
@@ -63,7 +63,7 @@ const yn = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Rn = (
|
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
65
|
*/
|
|
66
|
-
var
|
|
66
|
+
var Tn = {
|
|
67
67
|
xmlns: "http://www.w3.org/2000/svg",
|
|
68
68
|
width: 24,
|
|
69
69
|
height: 24,
|
|
@@ -80,7 +80,7 @@ var En = {
|
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
82
|
*/
|
|
83
|
-
const
|
|
83
|
+
const An = vt(
|
|
84
84
|
({
|
|
85
85
|
color: t = "currentColor",
|
|
86
86
|
size: e = 24,
|
|
@@ -94,13 +94,13 @@ const Tn = _t(
|
|
|
94
94
|
"svg",
|
|
95
95
|
{
|
|
96
96
|
ref: u,
|
|
97
|
-
...
|
|
97
|
+
...Tn,
|
|
98
98
|
width: e,
|
|
99
99
|
height: e,
|
|
100
100
|
stroke: t,
|
|
101
101
|
strokeWidth: r ? Number(n) * 24 / Number(e) : n,
|
|
102
|
-
className:
|
|
103
|
-
...!i && !
|
|
102
|
+
className: Ot("lucide", s),
|
|
103
|
+
...!i && !En(a) && { "aria-hidden": "true" },
|
|
104
104
|
...a
|
|
105
105
|
},
|
|
106
106
|
[
|
|
@@ -116,12 +116,12 @@ const Tn = _t(
|
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
117
|
*/
|
|
118
118
|
const oe = (t, e) => {
|
|
119
|
-
const n =
|
|
120
|
-
({ className: r, ...s }, i) => ze(
|
|
119
|
+
const n = vt(
|
|
120
|
+
({ className: r, ...s }, i) => ze(An, {
|
|
121
121
|
ref: i,
|
|
122
122
|
iconNode: e,
|
|
123
|
-
className:
|
|
124
|
-
`lucide-${
|
|
123
|
+
className: Ot(
|
|
124
|
+
`lucide-${Rn(lt(t))}`,
|
|
125
125
|
`lucide-${t}`,
|
|
126
126
|
r
|
|
127
127
|
),
|
|
@@ -136,30 +136,30 @@ const oe = (t, e) => {
|
|
|
136
136
|
* This source code is licensed under the ISC license.
|
|
137
137
|
* See the LICENSE file in the root directory of this source tree.
|
|
138
138
|
*/
|
|
139
|
-
const
|
|
139
|
+
const Cn = [
|
|
140
140
|
["path", { d: "M12 8V4H8", key: "hb8ula" }],
|
|
141
141
|
["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
|
|
142
142
|
["path", { d: "M2 14h2", key: "vft8re" }],
|
|
143
143
|
["path", { d: "M20 14h2", key: "4cs60a" }],
|
|
144
144
|
["path", { d: "M15 13v2", key: "1xurst" }],
|
|
145
145
|
["path", { d: "M9 13v2", key: "rq6x2g" }]
|
|
146
|
-
], We = oe("bot",
|
|
146
|
+
], We = oe("bot", Cn);
|
|
147
147
|
/**
|
|
148
148
|
* @license lucide-react v0.515.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
152
|
*/
|
|
153
|
-
const
|
|
153
|
+
const _n = [
|
|
154
154
|
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }]
|
|
155
|
-
],
|
|
155
|
+
], vn = oe("message-circle", _n);
|
|
156
156
|
/**
|
|
157
157
|
* @license lucide-react v0.515.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
161
|
*/
|
|
162
|
-
const
|
|
162
|
+
const On = [
|
|
163
163
|
[
|
|
164
164
|
"path",
|
|
165
165
|
{
|
|
@@ -168,27 +168,27 @@ const vn = [
|
|
|
168
168
|
}
|
|
169
169
|
],
|
|
170
170
|
["path", { d: "m21.854 2.147-10.94 10.939", key: "12cjpa" }]
|
|
171
|
-
],
|
|
171
|
+
], $n = oe("send", On);
|
|
172
172
|
/**
|
|
173
173
|
* @license lucide-react v0.515.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
177
|
*/
|
|
178
|
-
const
|
|
178
|
+
const Nn = [
|
|
179
179
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
180
180
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
181
|
-
],
|
|
181
|
+
], Pn = oe("user", Nn);
|
|
182
182
|
/**
|
|
183
183
|
* @license lucide-react v0.515.0 - ISC
|
|
184
184
|
*
|
|
185
185
|
* This source code is licensed under the ISC license.
|
|
186
186
|
* See the LICENSE file in the root directory of this source tree.
|
|
187
187
|
*/
|
|
188
|
-
const
|
|
188
|
+
const Ln = [
|
|
189
189
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
190
190
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
191
|
-
],
|
|
191
|
+
], $t = oe("x", Ln), jn = {
|
|
192
192
|
futuristic: {
|
|
193
193
|
mainBackground: "bg-gradient-to-br from-slate-900 via-purple-900 to-slate-900",
|
|
194
194
|
header: "from-purple-600 to-blue-600",
|
|
@@ -210,8 +210,8 @@ const Pn = [
|
|
|
210
210
|
sendButton: "text-purple-500",
|
|
211
211
|
prompt: "bg-gradient-to-br from-black/80 to-black/90 text-white"
|
|
212
212
|
}
|
|
213
|
-
}, F = (t, e) =>
|
|
214
|
-
function
|
|
213
|
+
}, F = (t, e) => jn[t][e] ?? "";
|
|
214
|
+
function Bn({ setIsOpen: t, theme: e }) {
|
|
215
215
|
return /* @__PURE__ */ b.jsxs("div", { className: `bg-gradient-to-r ${F(e, "header")} p-4 flex items-center justify-between`, children: [
|
|
216
216
|
/* @__PURE__ */ b.jsxs("div", { className: "flex items-center space-x-3", children: [
|
|
217
217
|
/* @__PURE__ */ b.jsx("div", { className: `w-10 h-10 ${F(e, "headerLogoBg")} rounded-full flex items-center justify-center`, children: /* @__PURE__ */ b.jsx(We, { className: `w-6 h-6 ${F(e, "headerLogoIcon")}` }) }),
|
|
@@ -225,7 +225,7 @@ function jn({ setIsOpen: t, theme: e }) {
|
|
|
225
225
|
{
|
|
226
226
|
onClick: () => t(!1),
|
|
227
227
|
className: "text-white hover:bg-white/20 rounded-full p-1 transition-colors",
|
|
228
|
-
children: /* @__PURE__ */ b.jsx(
|
|
228
|
+
children: /* @__PURE__ */ b.jsx($t, { className: "w-5 h-5" })
|
|
229
229
|
}
|
|
230
230
|
)
|
|
231
231
|
] });
|
|
@@ -245,7 +245,7 @@ function Ve() {
|
|
|
245
245
|
};
|
|
246
246
|
}
|
|
247
247
|
var W = Ve();
|
|
248
|
-
function
|
|
248
|
+
function Nt(t) {
|
|
249
249
|
W = t;
|
|
250
250
|
}
|
|
251
251
|
var se = { exec: () => null };
|
|
@@ -317,31 +317,31 @@ var $ = {
|
|
|
317
317
|
fencesBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}(?:\`\`\`|~~~)`),
|
|
318
318
|
headingBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}#`),
|
|
319
319
|
htmlBeginRegex: (t) => new RegExp(`^ {0,${Math.min(3, t - 1)}}<(?:[a-z].*>|!--)`, "i")
|
|
320
|
-
},
|
|
320
|
+
}, zn = /^(?:[ \t]*(?:\n|$))+/, In = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Dn = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, ae = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, qn = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ge = /(?:[*+-]|\d{1,9}[.)])/, Pt = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Lt = k(Pt).replace(/bull/g, Ge).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Un = k(Pt).replace(/bull/g, Ge).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Ke = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Fn = /^[^\n]+/, Xe = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Mn = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Xe).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Hn = k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ge).getRegex(), ke = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", Qe = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Jn = k(
|
|
321
321
|
"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))",
|
|
322
322
|
"i"
|
|
323
|
-
).replace("comment", Qe).replace("tag", ke).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),
|
|
324
|
-
blockquote:
|
|
325
|
-
code:
|
|
326
|
-
def:
|
|
327
|
-
fences:
|
|
328
|
-
heading:
|
|
323
|
+
).replace("comment", Qe).replace("tag", ke).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), jt = k(Ke).replace("hr", ae).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ke).getRegex(), Zn = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", jt).getRegex(), Ye = {
|
|
324
|
+
blockquote: Zn,
|
|
325
|
+
code: In,
|
|
326
|
+
def: Mn,
|
|
327
|
+
fences: Dn,
|
|
328
|
+
heading: qn,
|
|
329
329
|
hr: ae,
|
|
330
|
-
html:
|
|
331
|
-
lheading:
|
|
332
|
-
list:
|
|
333
|
-
newline:
|
|
334
|
-
paragraph:
|
|
330
|
+
html: Jn,
|
|
331
|
+
lheading: Lt,
|
|
332
|
+
list: Hn,
|
|
333
|
+
newline: zn,
|
|
334
|
+
paragraph: jt,
|
|
335
335
|
table: se,
|
|
336
|
-
text:
|
|
336
|
+
text: Fn
|
|
337
337
|
}, ct = k(
|
|
338
338
|
"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"
|
|
339
|
-
).replace("hr", ae).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ke).getRegex(),
|
|
339
|
+
).replace("hr", ae).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ke).getRegex(), Wn = {
|
|
340
340
|
...Ye,
|
|
341
|
-
lheading:
|
|
341
|
+
lheading: Un,
|
|
342
342
|
table: ct,
|
|
343
343
|
paragraph: k(Ke).replace("hr", ae).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ct).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ke).getRegex()
|
|
344
|
-
},
|
|
344
|
+
}, Vn = {
|
|
345
345
|
...Ye,
|
|
346
346
|
html: k(
|
|
347
347
|
`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`
|
|
@@ -352,65 +352,65 @@ var $ = {
|
|
|
352
352
|
// fences not supported
|
|
353
353
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
354
354
|
paragraph: k(Ke).replace("hr", ae).replace("heading", ` *#{1,6} *[^
|
|
355
|
-
]`).replace("lheading",
|
|
356
|
-
},
|
|
355
|
+
]`).replace("lheading", Lt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
356
|
+
}, Gn = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Kn = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Bt = /^( {2,}|\\)\n(?!\s*$)/, Xn = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, ye = /[\p{P}\p{S}]/u, et = /[\s\p{P}\p{S}]/u, zt = /[^\s\p{P}\p{S}]/u, Qn = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, et).getRegex(), It = /(?!~)[\p{P}\p{S}]/u, Yn = /(?!~)[\s\p{P}\p{S}]/u, er = /(?:[^\s\p{P}\p{S}]|~)/u, tr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Dt = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, nr = k(Dt, "u").replace(/punct/g, ye).getRegex(), rr = k(Dt, "u").replace(/punct/g, It).getRegex(), qt = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", sr = k(qt, "gu").replace(/notPunctSpace/g, zt).replace(/punctSpace/g, et).replace(/punct/g, ye).getRegex(), ir = k(qt, "gu").replace(/notPunctSpace/g, er).replace(/punctSpace/g, Yn).replace(/punct/g, It).getRegex(), or = k(
|
|
357
357
|
"^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)",
|
|
358
358
|
"gu"
|
|
359
|
-
).replace(/notPunctSpace/g,
|
|
359
|
+
).replace(/notPunctSpace/g, zt).replace(/punctSpace/g, et).replace(/punct/g, ye).getRegex(), ar = k(/\\(punct)/, "gu").replace(/punct/g, ye).getRegex(), lr = k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), cr = k(Qe).replace("(?:-->|$)", "-->").getRegex(), ur = k(
|
|
360
360
|
"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>"
|
|
361
|
-
).replace("comment",
|
|
361
|
+
).replace("comment", cr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ge = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, pr = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", ge).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Ut = k(/^!?\[(label)\]\[(ref)\]/).replace("label", ge).replace("ref", Xe).getRegex(), Ft = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", Xe).getRegex(), hr = k("reflink|nolink(?!\\()", "g").replace("reflink", Ut).replace("nolink", Ft).getRegex(), tt = {
|
|
362
362
|
_backpedal: se,
|
|
363
363
|
// only used for GFM url
|
|
364
|
-
anyPunctuation:
|
|
365
|
-
autolink:
|
|
366
|
-
blockSkip:
|
|
367
|
-
br:
|
|
368
|
-
code:
|
|
364
|
+
anyPunctuation: ar,
|
|
365
|
+
autolink: lr,
|
|
366
|
+
blockSkip: tr,
|
|
367
|
+
br: Bt,
|
|
368
|
+
code: Kn,
|
|
369
369
|
del: se,
|
|
370
|
-
emStrongLDelim:
|
|
371
|
-
emStrongRDelimAst:
|
|
372
|
-
emStrongRDelimUnd:
|
|
373
|
-
escape:
|
|
374
|
-
link:
|
|
375
|
-
nolink:
|
|
376
|
-
punctuation:
|
|
377
|
-
reflink:
|
|
378
|
-
reflinkSearch:
|
|
379
|
-
tag:
|
|
380
|
-
text:
|
|
370
|
+
emStrongLDelim: nr,
|
|
371
|
+
emStrongRDelimAst: sr,
|
|
372
|
+
emStrongRDelimUnd: or,
|
|
373
|
+
escape: Gn,
|
|
374
|
+
link: pr,
|
|
375
|
+
nolink: Ft,
|
|
376
|
+
punctuation: Qn,
|
|
377
|
+
reflink: Ut,
|
|
378
|
+
reflinkSearch: hr,
|
|
379
|
+
tag: ur,
|
|
380
|
+
text: Xn,
|
|
381
381
|
url: se
|
|
382
|
-
},
|
|
382
|
+
}, fr = {
|
|
383
383
|
...tt,
|
|
384
384
|
link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", ge).getRegex(),
|
|
385
385
|
reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ge).getRegex()
|
|
386
386
|
}, Ie = {
|
|
387
387
|
...tt,
|
|
388
|
-
emStrongRDelimAst:
|
|
389
|
-
emStrongLDelim:
|
|
388
|
+
emStrongRDelimAst: ir,
|
|
389
|
+
emStrongLDelim: rr,
|
|
390
390
|
url: k(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
391
391
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
392
392
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
393
393
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
394
|
-
},
|
|
394
|
+
}, dr = {
|
|
395
395
|
...Ie,
|
|
396
|
-
br: k(
|
|
396
|
+
br: k(Bt).replace("{2,}", "*").getRegex(),
|
|
397
397
|
text: k(Ie.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
398
398
|
}, ue = {
|
|
399
399
|
normal: Ye,
|
|
400
|
-
gfm:
|
|
401
|
-
pedantic:
|
|
400
|
+
gfm: Wn,
|
|
401
|
+
pedantic: Vn
|
|
402
402
|
}, te = {
|
|
403
403
|
normal: tt,
|
|
404
404
|
gfm: Ie,
|
|
405
|
-
breaks:
|
|
406
|
-
pedantic:
|
|
407
|
-
},
|
|
405
|
+
breaks: dr,
|
|
406
|
+
pedantic: fr
|
|
407
|
+
}, gr = {
|
|
408
408
|
"&": "&",
|
|
409
409
|
"<": "<",
|
|
410
410
|
">": ">",
|
|
411
411
|
'"': """,
|
|
412
412
|
"'": "'"
|
|
413
|
-
}, ut = (t) =>
|
|
413
|
+
}, ut = (t) => gr[t];
|
|
414
414
|
function D(t, e) {
|
|
415
415
|
if (e) {
|
|
416
416
|
if ($.escapeTest.test(t))
|
|
@@ -453,7 +453,7 @@ function ne(t, e, n) {
|
|
|
453
453
|
s++;
|
|
454
454
|
return t.slice(0, r - s);
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function mr(t, e) {
|
|
457
457
|
if (t.indexOf(e[1]) === -1)
|
|
458
458
|
return -1;
|
|
459
459
|
let n = 0;
|
|
@@ -479,7 +479,7 @@ function ft(t, e, n, r, s) {
|
|
|
479
479
|
};
|
|
480
480
|
return r.state.inLink = !1, u;
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function br(t, e, n) {
|
|
483
483
|
const r = t.match(n.other.indentCodeCompensation);
|
|
484
484
|
if (r === null)
|
|
485
485
|
return e;
|
|
@@ -527,7 +527,7 @@ var me = class {
|
|
|
527
527
|
fences(t) {
|
|
528
528
|
const e = this.rules.block.fences.exec(t);
|
|
529
529
|
if (e) {
|
|
530
|
-
const n = e[0], r =
|
|
530
|
+
const n = e[0], r = br(n, e[3] || "", this.rules);
|
|
531
531
|
return {
|
|
532
532
|
type: "code",
|
|
533
533
|
raw: n,
|
|
@@ -813,7 +813,7 @@ ${c}` : c;
|
|
|
813
813
|
if ((n.length - i.length) % 2 === 0)
|
|
814
814
|
return;
|
|
815
815
|
} else {
|
|
816
|
-
const i =
|
|
816
|
+
const i = mr(e[2], "()");
|
|
817
817
|
if (i === -2)
|
|
818
818
|
return;
|
|
819
819
|
if (i > -1) {
|
|
@@ -1586,7 +1586,7 @@ ${t}</tr>
|
|
|
1586
1586
|
"preprocess",
|
|
1587
1587
|
"postprocess",
|
|
1588
1588
|
"processAllTokens"
|
|
1589
|
-
])), Be),
|
|
1589
|
+
])), Be), xr = class {
|
|
1590
1590
|
constructor(...t) {
|
|
1591
1591
|
S(this, "defaults", Ve());
|
|
1592
1592
|
S(this, "options", this.setOptions);
|
|
@@ -1758,17 +1758,17 @@ Please report this to https://github.com/markedjs/marked.`, t) {
|
|
|
1758
1758
|
throw n;
|
|
1759
1759
|
};
|
|
1760
1760
|
}
|
|
1761
|
-
}, J = new
|
|
1761
|
+
}, J = new xr();
|
|
1762
1762
|
function y(t, e) {
|
|
1763
1763
|
return J.parse(t, e);
|
|
1764
1764
|
}
|
|
1765
1765
|
y.options = y.setOptions = function(t) {
|
|
1766
|
-
return J.setOptions(t), y.defaults = J.defaults,
|
|
1766
|
+
return J.setOptions(t), y.defaults = J.defaults, Nt(y.defaults), y;
|
|
1767
1767
|
};
|
|
1768
1768
|
y.getDefaults = Ve;
|
|
1769
1769
|
y.defaults = W;
|
|
1770
1770
|
y.use = function(...t) {
|
|
1771
|
-
return J.use(...t), y.defaults = J.defaults,
|
|
1771
|
+
return J.use(...t), y.defaults = J.defaults, Nt(y.defaults), y;
|
|
1772
1772
|
};
|
|
1773
1773
|
y.walkTokens = function(t, e) {
|
|
1774
1774
|
return J.walkTokens(t, e);
|
|
@@ -1790,8 +1790,8 @@ y.walkTokens;
|
|
|
1790
1790
|
y.parseInline;
|
|
1791
1791
|
U.parse;
|
|
1792
1792
|
q.lex;
|
|
1793
|
-
function
|
|
1794
|
-
const r =
|
|
1793
|
+
function wr({ message: t, index: e, theme: n }) {
|
|
1794
|
+
const r = xn(() => y(t.content.replaceAll("```", ""), {
|
|
1795
1795
|
gfm: !0,
|
|
1796
1796
|
breaks: !0
|
|
1797
1797
|
}), [t.content]);
|
|
@@ -1809,7 +1809,7 @@ function xr({ message: t, index: e, theme: n }) {
|
|
|
1809
1809
|
`,
|
|
1810
1810
|
children: /* @__PURE__ */ b.jsxs("div", { className: "flex items-start space-x-2", children: [
|
|
1811
1811
|
t.sender === "bot" && /* @__PURE__ */ b.jsx(We, { className: "w-4 h-4 mt-0.5 text-pink-200 flex-shrink-0" }),
|
|
1812
|
-
t.sender === "user" && /* @__PURE__ */ b.jsx(
|
|
1812
|
+
t.sender === "user" && /* @__PURE__ */ b.jsx(Pn, { className: "w-4 h-4 mt-0.5 text-pink-200 flex-shrink-0" }),
|
|
1813
1813
|
/* @__PURE__ */ b.jsx("div", { className: "text-sm leading-relaxed message", dangerouslySetInnerHTML: { __html: r } })
|
|
1814
1814
|
] })
|
|
1815
1815
|
}
|
|
@@ -1817,7 +1817,7 @@ function xr({ message: t, index: e, theme: n }) {
|
|
|
1817
1817
|
}
|
|
1818
1818
|
);
|
|
1819
1819
|
}
|
|
1820
|
-
function
|
|
1820
|
+
function kr() {
|
|
1821
1821
|
return /* @__PURE__ */ b.jsx("div", { className: "flex justify-start", children: /* @__PURE__ */ b.jsx("div", { className: "bg-gradient-to-r from-slate-700 to-slate-600 rounded-2xl p-3 mr-4", children: /* @__PURE__ */ b.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1822
1822
|
/* @__PURE__ */ b.jsx(We, { className: "w-4 h-4 text-cyan-400" }),
|
|
1823
1823
|
/* @__PURE__ */ b.jsxs("div", { className: "flex space-x-1", children: [
|
|
@@ -1839,10 +1839,10 @@ function wr() {
|
|
|
1839
1839
|
] })
|
|
1840
1840
|
] }) }) });
|
|
1841
1841
|
}
|
|
1842
|
-
function
|
|
1842
|
+
function yr() {
|
|
1843
1843
|
return /* @__PURE__ */ b.jsx("div", { className: "absolute -top-2 -left-2 w-6 h-6 bg-gradient-to-r from-pink-500 to-red-500 rounded-full flex items-center justify-center animate-pulse", children: /* @__PURE__ */ b.jsx("span", { className: "text-white text-xs font-bold", children: "1" }) });
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1845
|
+
function Rr({ inputValue: t, setInputValue: e, handleSendMessage: n, handleKeyPress: r, theme: s }) {
|
|
1846
1846
|
return /* @__PURE__ */ b.jsx("div", { className: "p-4 border-t border-purple-500/20", children: /* @__PURE__ */ b.jsxs("div", { className: "flex space-x-2", children: [
|
|
1847
1847
|
/* @__PURE__ */ b.jsx(
|
|
1848
1848
|
"textarea",
|
|
@@ -1859,12 +1859,12 @@ function yr({ inputValue: t, setInputValue: e, handleSendMessage: n, handleKeyPr
|
|
|
1859
1859
|
{
|
|
1860
1860
|
onClick: n,
|
|
1861
1861
|
disabled: !t.trim(),
|
|
1862
|
-
children: /* @__PURE__ */ b.jsx(
|
|
1862
|
+
children: /* @__PURE__ */ b.jsx($n, { className: `w-4 h-4 ${F(s, "sendButton")} cursor-pointer` })
|
|
1863
1863
|
}
|
|
1864
1864
|
)
|
|
1865
1865
|
] }) });
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1867
|
+
function Sr({ setIsOpen: t, isOpen: e }) {
|
|
1868
1868
|
return /* @__PURE__ */ b.jsx(
|
|
1869
1869
|
"button",
|
|
1870
1870
|
{
|
|
@@ -1878,47 +1878,47 @@ function Rr({ setIsOpen: t, isOpen: e }) {
|
|
|
1878
1878
|
style: {
|
|
1879
1879
|
boxShadow: "0 0 30px rgba(147, 51, 234, 0.5)"
|
|
1880
1880
|
},
|
|
1881
|
-
children: e ? /* @__PURE__ */ b.jsx(
|
|
1881
|
+
children: e ? /* @__PURE__ */ b.jsx($t, { className: "w-6 h-6" }) : /* @__PURE__ */ b.jsx(vn, { className: "w-6 h-6" })
|
|
1882
1882
|
}
|
|
1883
1883
|
);
|
|
1884
1884
|
}
|
|
1885
|
-
function
|
|
1885
|
+
function Er(t) {
|
|
1886
1886
|
return new Promise((e) => setTimeout(e, t));
|
|
1887
1887
|
}
|
|
1888
|
-
function
|
|
1888
|
+
function Tr({ prompt: t, handleSendMessage: e, theme: n }) {
|
|
1889
1889
|
const r = () => {
|
|
1890
1890
|
e(t);
|
|
1891
1891
|
};
|
|
1892
1892
|
return /* @__PURE__ */ b.jsx("div", { onClick: r, className: `${F(n, "prompt")} text-sm rounded-full transition hover:scale-98 cursor-pointer px-4 py-2`, children: t });
|
|
1893
1893
|
}
|
|
1894
|
-
function
|
|
1894
|
+
function Mt(t, e) {
|
|
1895
1895
|
return function() {
|
|
1896
1896
|
return t.apply(e, arguments);
|
|
1897
1897
|
};
|
|
1898
1898
|
}
|
|
1899
1899
|
var dt = {};
|
|
1900
|
-
const { toString:
|
|
1901
|
-
const n =
|
|
1900
|
+
const { toString: Ar } = Object.prototype, { getPrototypeOf: rt } = Object, { iterator: Re, toStringTag: Ht } = Symbol, Se = /* @__PURE__ */ ((t) => (e) => {
|
|
1901
|
+
const n = Ar.call(e);
|
|
1902
1902
|
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
1903
1903
|
})(/* @__PURE__ */ Object.create(null)), z = (t) => (t = t.toLowerCase(), (e) => Se(e) === t), Ee = (t) => (e) => typeof e === t, { isArray: X } = Array, ie = Ee("undefined");
|
|
1904
|
-
function
|
|
1904
|
+
function Cr(t) {
|
|
1905
1905
|
return t !== null && !ie(t) && t.constructor !== null && !ie(t.constructor) && L(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
1906
1906
|
}
|
|
1907
|
-
const
|
|
1908
|
-
function
|
|
1907
|
+
const Jt = z("ArrayBuffer");
|
|
1908
|
+
function _r(t) {
|
|
1909
1909
|
let e;
|
|
1910
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer &&
|
|
1910
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Jt(t.buffer), e;
|
|
1911
1911
|
}
|
|
1912
|
-
const
|
|
1912
|
+
const vr = Ee("string"), L = Ee("function"), Zt = Ee("number"), Te = (t) => t !== null && typeof t == "object", Or = (t) => t === !0 || t === !1, he = (t) => {
|
|
1913
1913
|
if (Se(t) !== "object")
|
|
1914
1914
|
return !1;
|
|
1915
1915
|
const e = rt(t);
|
|
1916
|
-
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(
|
|
1917
|
-
},
|
|
1916
|
+
return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Ht in t) && !(Re in t);
|
|
1917
|
+
}, $r = z("Date"), Nr = z("File"), Pr = z("Blob"), Lr = z("FileList"), jr = (t) => Te(t) && L(t.pipe), Br = (t) => {
|
|
1918
1918
|
let e;
|
|
1919
1919
|
return t && (typeof FormData == "function" && t instanceof FormData || L(t.append) && ((e = Se(t)) === "formdata" || // detect form-data instance
|
|
1920
1920
|
e === "object" && L(t.toString) && t.toString() === "[object FormData]"));
|
|
1921
|
-
},
|
|
1921
|
+
}, zr = z("URLSearchParams"), [Ir, Dr, qr, Ur] = ["ReadableStream", "Request", "Response", "Headers"].map(z), Fr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1922
1922
|
function le(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
1923
1923
|
if (t === null || typeof t > "u")
|
|
1924
1924
|
return;
|
|
@@ -1933,7 +1933,7 @@ function le(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
|
1933
1933
|
a = i[r], e.call(null, t[a], a, t);
|
|
1934
1934
|
}
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function Wt(t, e) {
|
|
1937
1937
|
e = e.toLowerCase();
|
|
1938
1938
|
const n = Object.keys(t);
|
|
1939
1939
|
let r = n.length, s;
|
|
@@ -1942,23 +1942,23 @@ function Zt(t, e) {
|
|
|
1942
1942
|
return s;
|
|
1943
1943
|
return null;
|
|
1944
1944
|
}
|
|
1945
|
-
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
1945
|
+
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vt = (t) => !ie(t) && t !== M;
|
|
1946
1946
|
function Ue() {
|
|
1947
|
-
const { caseless: t } =
|
|
1948
|
-
const i = t &&
|
|
1947
|
+
const { caseless: t } = Vt(this) && this || {}, e = {}, n = (r, s) => {
|
|
1948
|
+
const i = t && Wt(e, s) || s;
|
|
1949
1949
|
he(e[i]) && he(r) ? e[i] = Ue(e[i], r) : he(r) ? e[i] = Ue({}, r) : X(r) ? e[i] = r.slice() : e[i] = r;
|
|
1950
1950
|
};
|
|
1951
1951
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
1952
1952
|
arguments[r] && le(arguments[r], n);
|
|
1953
1953
|
return e;
|
|
1954
1954
|
}
|
|
1955
|
-
const
|
|
1956
|
-
n && L(s) ? t[i] =
|
|
1957
|
-
}, { allOwnKeys: r }), t),
|
|
1955
|
+
const Mr = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
1956
|
+
n && L(s) ? t[i] = Mt(s, n) : t[i] = s;
|
|
1957
|
+
}, { allOwnKeys: r }), t), Hr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Jr = (t, e, n, r) => {
|
|
1958
1958
|
t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
|
|
1959
1959
|
value: e.prototype
|
|
1960
1960
|
}), n && Object.assign(t.prototype, n);
|
|
1961
|
-
},
|
|
1961
|
+
}, Zr = (t, e, n, r) => {
|
|
1962
1962
|
let s, i, o;
|
|
1963
1963
|
const a = {};
|
|
1964
1964
|
if (e = e || {}, t == null) return e;
|
|
@@ -1968,45 +1968,45 @@ const Fr = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
|
1968
1968
|
t = n !== !1 && rt(t);
|
|
1969
1969
|
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
1970
1970
|
return e;
|
|
1971
|
-
},
|
|
1971
|
+
}, Wr = (t, e, n) => {
|
|
1972
1972
|
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
1973
1973
|
const r = t.indexOf(e, n);
|
|
1974
1974
|
return r !== -1 && r === n;
|
|
1975
|
-
},
|
|
1975
|
+
}, Vr = (t) => {
|
|
1976
1976
|
if (!t) return null;
|
|
1977
1977
|
if (X(t)) return t;
|
|
1978
1978
|
let e = t.length;
|
|
1979
|
-
if (!
|
|
1979
|
+
if (!Zt(e)) return null;
|
|
1980
1980
|
const n = new Array(e);
|
|
1981
1981
|
for (; e-- > 0; )
|
|
1982
1982
|
n[e] = t[e];
|
|
1983
1983
|
return n;
|
|
1984
|
-
},
|
|
1984
|
+
}, Gr = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && rt(Uint8Array)), Kr = (t, e) => {
|
|
1985
1985
|
const r = (t && t[Re]).call(t);
|
|
1986
1986
|
let s;
|
|
1987
1987
|
for (; (s = r.next()) && !s.done; ) {
|
|
1988
1988
|
const i = s.value;
|
|
1989
1989
|
e.call(t, i[0], i[1]);
|
|
1990
1990
|
}
|
|
1991
|
-
},
|
|
1991
|
+
}, Xr = (t, e) => {
|
|
1992
1992
|
let n;
|
|
1993
1993
|
const r = [];
|
|
1994
1994
|
for (; (n = t.exec(e)) !== null; )
|
|
1995
1995
|
r.push(n);
|
|
1996
1996
|
return r;
|
|
1997
|
-
},
|
|
1997
|
+
}, Qr = z("HTMLFormElement"), Yr = (t) => t.toLowerCase().replace(
|
|
1998
1998
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
1999
1999
|
function(n, r, s) {
|
|
2000
2000
|
return r.toUpperCase() + s;
|
|
2001
2001
|
}
|
|
2002
|
-
), gt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype),
|
|
2002
|
+
), gt = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), es = z("RegExp"), Gt = (t, e) => {
|
|
2003
2003
|
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
2004
2004
|
le(n, (s, i) => {
|
|
2005
2005
|
let o;
|
|
2006
2006
|
(o = e(s, i, t)) !== !1 && (r[i] = o || s);
|
|
2007
2007
|
}), Object.defineProperties(t, r);
|
|
2008
|
-
},
|
|
2009
|
-
|
|
2008
|
+
}, ts = (t) => {
|
|
2009
|
+
Gt(t, (e, n) => {
|
|
2010
2010
|
if (L(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
2011
2011
|
return !1;
|
|
2012
2012
|
const r = t[n];
|
|
@@ -2020,19 +2020,19 @@ const Fr = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
|
|
|
2020
2020
|
});
|
|
2021
2021
|
}
|
|
2022
2022
|
});
|
|
2023
|
-
},
|
|
2023
|
+
}, ns = (t, e) => {
|
|
2024
2024
|
const n = {}, r = (s) => {
|
|
2025
2025
|
s.forEach((i) => {
|
|
2026
2026
|
n[i] = !0;
|
|
2027
2027
|
});
|
|
2028
2028
|
};
|
|
2029
2029
|
return X(t) ? r(t) : r(String(t).split(e)), n;
|
|
2030
|
-
},
|
|
2031
|
-
},
|
|
2032
|
-
function
|
|
2033
|
-
return !!(t && L(t.append) && t[
|
|
2030
|
+
}, rs = () => {
|
|
2031
|
+
}, ss = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
2032
|
+
function is(t) {
|
|
2033
|
+
return !!(t && L(t.append) && t[Ht] === "FormData" && t[Re]);
|
|
2034
2034
|
}
|
|
2035
|
-
const
|
|
2035
|
+
const os = (t) => {
|
|
2036
2036
|
const e = new Array(10), n = (r, s) => {
|
|
2037
2037
|
if (Te(r)) {
|
|
2038
2038
|
if (e.indexOf(r) >= 0)
|
|
@@ -2049,71 +2049,71 @@ const is = (t) => {
|
|
|
2049
2049
|
return r;
|
|
2050
2050
|
};
|
|
2051
2051
|
return n(t, 0);
|
|
2052
|
-
},
|
|
2052
|
+
}, as = z("AsyncFunction"), ls = (t) => t && (Te(t) || L(t)) && L(t.then) && L(t.catch), Kt = ((t, e) => t ? setImmediate : e ? ((n, r) => (M.addEventListener("message", ({ source: s, data: i }) => {
|
|
2053
2053
|
s === M && i === n && r.length && r.shift()();
|
|
2054
2054
|
}, !1), (s) => {
|
|
2055
2055
|
r.push(s), M.postMessage(n, "*");
|
|
2056
2056
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
2057
2057
|
typeof setImmediate == "function",
|
|
2058
2058
|
L(M.postMessage)
|
|
2059
|
-
),
|
|
2059
|
+
), cs = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof dt < "u" && dt.nextTick || Kt, us = (t) => t != null && L(t[Re]), p = {
|
|
2060
2060
|
isArray: X,
|
|
2061
|
-
isArrayBuffer:
|
|
2062
|
-
isBuffer:
|
|
2063
|
-
isFormData:
|
|
2064
|
-
isArrayBufferView:
|
|
2065
|
-
isString:
|
|
2066
|
-
isNumber:
|
|
2067
|
-
isBoolean:
|
|
2061
|
+
isArrayBuffer: Jt,
|
|
2062
|
+
isBuffer: Cr,
|
|
2063
|
+
isFormData: Br,
|
|
2064
|
+
isArrayBufferView: _r,
|
|
2065
|
+
isString: vr,
|
|
2066
|
+
isNumber: Zt,
|
|
2067
|
+
isBoolean: Or,
|
|
2068
2068
|
isObject: Te,
|
|
2069
2069
|
isPlainObject: he,
|
|
2070
|
-
isReadableStream:
|
|
2071
|
-
isRequest:
|
|
2072
|
-
isResponse:
|
|
2073
|
-
isHeaders:
|
|
2070
|
+
isReadableStream: Ir,
|
|
2071
|
+
isRequest: Dr,
|
|
2072
|
+
isResponse: qr,
|
|
2073
|
+
isHeaders: Ur,
|
|
2074
2074
|
isUndefined: ie,
|
|
2075
|
-
isDate:
|
|
2076
|
-
isFile:
|
|
2077
|
-
isBlob:
|
|
2078
|
-
isRegExp:
|
|
2075
|
+
isDate: $r,
|
|
2076
|
+
isFile: Nr,
|
|
2077
|
+
isBlob: Pr,
|
|
2078
|
+
isRegExp: es,
|
|
2079
2079
|
isFunction: L,
|
|
2080
|
-
isStream:
|
|
2081
|
-
isURLSearchParams:
|
|
2082
|
-
isTypedArray:
|
|
2083
|
-
isFileList:
|
|
2080
|
+
isStream: jr,
|
|
2081
|
+
isURLSearchParams: zr,
|
|
2082
|
+
isTypedArray: Gr,
|
|
2083
|
+
isFileList: Lr,
|
|
2084
2084
|
forEach: le,
|
|
2085
2085
|
merge: Ue,
|
|
2086
|
-
extend:
|
|
2087
|
-
trim:
|
|
2088
|
-
stripBOM:
|
|
2089
|
-
inherits:
|
|
2090
|
-
toFlatObject:
|
|
2086
|
+
extend: Mr,
|
|
2087
|
+
trim: Fr,
|
|
2088
|
+
stripBOM: Hr,
|
|
2089
|
+
inherits: Jr,
|
|
2090
|
+
toFlatObject: Zr,
|
|
2091
2091
|
kindOf: Se,
|
|
2092
2092
|
kindOfTest: z,
|
|
2093
|
-
endsWith:
|
|
2094
|
-
toArray:
|
|
2095
|
-
forEachEntry:
|
|
2096
|
-
matchAll:
|
|
2097
|
-
isHTMLForm:
|
|
2093
|
+
endsWith: Wr,
|
|
2094
|
+
toArray: Vr,
|
|
2095
|
+
forEachEntry: Kr,
|
|
2096
|
+
matchAll: Xr,
|
|
2097
|
+
isHTMLForm: Qr,
|
|
2098
2098
|
hasOwnProperty: gt,
|
|
2099
2099
|
hasOwnProp: gt,
|
|
2100
2100
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
2101
|
-
reduceDescriptors:
|
|
2102
|
-
freezeMethods:
|
|
2103
|
-
toObjectSet:
|
|
2104
|
-
toCamelCase:
|
|
2105
|
-
noop:
|
|
2106
|
-
toFiniteNumber:
|
|
2107
|
-
findKey:
|
|
2101
|
+
reduceDescriptors: Gt,
|
|
2102
|
+
freezeMethods: ts,
|
|
2103
|
+
toObjectSet: ns,
|
|
2104
|
+
toCamelCase: Yr,
|
|
2105
|
+
noop: rs,
|
|
2106
|
+
toFiniteNumber: ss,
|
|
2107
|
+
findKey: Wt,
|
|
2108
2108
|
global: M,
|
|
2109
|
-
isContextDefined:
|
|
2110
|
-
isSpecCompliantForm:
|
|
2111
|
-
toJSONObject:
|
|
2112
|
-
isAsyncFn:
|
|
2113
|
-
isThenable:
|
|
2114
|
-
setImmediate:
|
|
2115
|
-
asap:
|
|
2116
|
-
isIterable:
|
|
2109
|
+
isContextDefined: Vt,
|
|
2110
|
+
isSpecCompliantForm: is,
|
|
2111
|
+
toJSONObject: os,
|
|
2112
|
+
isAsyncFn: as,
|
|
2113
|
+
isThenable: ls,
|
|
2114
|
+
setImmediate: Kt,
|
|
2115
|
+
asap: cs,
|
|
2116
|
+
isIterable: us
|
|
2117
2117
|
};
|
|
2118
2118
|
function x(t, e, n, r, s) {
|
|
2119
2119
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", e && (this.code = e), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
@@ -2139,7 +2139,7 @@ p.inherits(x, Error, {
|
|
|
2139
2139
|
};
|
|
2140
2140
|
}
|
|
2141
2141
|
});
|
|
2142
|
-
const
|
|
2142
|
+
const Xt = x.prototype, Qt = {};
|
|
2143
2143
|
[
|
|
2144
2144
|
"ERR_BAD_OPTION_VALUE",
|
|
2145
2145
|
"ERR_BAD_OPTION",
|
|
@@ -2155,32 +2155,32 @@ const Kt = x.prototype, Xt = {};
|
|
|
2155
2155
|
"ERR_INVALID_URL"
|
|
2156
2156
|
// eslint-disable-next-line func-names
|
|
2157
2157
|
].forEach((t) => {
|
|
2158
|
-
|
|
2158
|
+
Qt[t] = { value: t };
|
|
2159
2159
|
});
|
|
2160
|
-
Object.defineProperties(x,
|
|
2161
|
-
Object.defineProperty(
|
|
2160
|
+
Object.defineProperties(x, Qt);
|
|
2161
|
+
Object.defineProperty(Xt, "isAxiosError", { value: !0 });
|
|
2162
2162
|
x.from = (t, e, n, r, s, i) => {
|
|
2163
|
-
const o = Object.create(
|
|
2163
|
+
const o = Object.create(Xt);
|
|
2164
2164
|
return p.toFlatObject(t, o, function(u) {
|
|
2165
2165
|
return u !== Error.prototype;
|
|
2166
2166
|
}, (a) => a !== "isAxiosError"), x.call(o, t.message, e, n, r, s), o.cause = t, o.name = t.name, i && Object.assign(o, i), o;
|
|
2167
2167
|
};
|
|
2168
|
-
const
|
|
2168
|
+
const ps = null;
|
|
2169
2169
|
function Fe(t) {
|
|
2170
2170
|
return p.isPlainObject(t) || p.isArray(t);
|
|
2171
2171
|
}
|
|
2172
|
-
function
|
|
2172
|
+
function Yt(t) {
|
|
2173
2173
|
return p.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
2174
2174
|
}
|
|
2175
2175
|
function mt(t, e, n) {
|
|
2176
2176
|
return t ? t.concat(e).map(function(s, i) {
|
|
2177
|
-
return s =
|
|
2177
|
+
return s = Yt(s), !n && i ? "[" + s + "]" : s;
|
|
2178
2178
|
}).join(n ? "." : "") : e;
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2180
|
+
function hs(t) {
|
|
2181
2181
|
return p.isArray(t) && !t.some(Fe);
|
|
2182
2182
|
}
|
|
2183
|
-
const
|
|
2183
|
+
const fs = p.toFlatObject(p, {}, null, function(e) {
|
|
2184
2184
|
return /^is[A-Z]/.test(e);
|
|
2185
2185
|
});
|
|
2186
2186
|
function Ae(t, e, n) {
|
|
@@ -2211,8 +2211,8 @@ function Ae(t, e, n) {
|
|
|
2211
2211
|
if (d && !m && typeof d == "object") {
|
|
2212
2212
|
if (p.endsWith(g, "{}"))
|
|
2213
2213
|
g = r ? g : g.slice(0, -2), d = JSON.stringify(d);
|
|
2214
|
-
else if (p.isArray(d) &&
|
|
2215
|
-
return g =
|
|
2214
|
+
else if (p.isArray(d) && hs(d) || (p.isFileList(d) || p.endsWith(g, "[]")) && (R = p.toArray(d)))
|
|
2215
|
+
return g = Yt(g), R.forEach(function(A, N) {
|
|
2216
2216
|
!(p.isUndefined(A) || A === null) && e.append(
|
|
2217
2217
|
// eslint-disable-next-line no-nested-ternary
|
|
2218
2218
|
o === !0 ? mt([g], N, i) : o === null ? g : g + "[]",
|
|
@@ -2222,7 +2222,7 @@ function Ae(t, e, n) {
|
|
|
2222
2222
|
}
|
|
2223
2223
|
return Fe(d) ? !0 : (e.append(mt(m, g, i), l(d)), !1);
|
|
2224
2224
|
}
|
|
2225
|
-
const f = [], h = Object.assign(
|
|
2225
|
+
const f = [], h = Object.assign(fs, {
|
|
2226
2226
|
defaultVisitor: c,
|
|
2227
2227
|
convertValue: l,
|
|
2228
2228
|
isVisitable: Fe
|
|
@@ -2263,11 +2263,11 @@ function bt(t) {
|
|
|
2263
2263
|
function st(t, e) {
|
|
2264
2264
|
this._pairs = [], t && Ae(t, this, e);
|
|
2265
2265
|
}
|
|
2266
|
-
const
|
|
2267
|
-
|
|
2266
|
+
const en = st.prototype;
|
|
2267
|
+
en.append = function(e, n) {
|
|
2268
2268
|
this._pairs.push([e, n]);
|
|
2269
2269
|
};
|
|
2270
|
-
|
|
2270
|
+
en.toString = function(e) {
|
|
2271
2271
|
const n = e ? function(r) {
|
|
2272
2272
|
return e.call(this, r, bt);
|
|
2273
2273
|
} : bt;
|
|
@@ -2275,13 +2275,13 @@ Yt.toString = function(e) {
|
|
|
2275
2275
|
return n(s[0]) + "=" + n(s[1]);
|
|
2276
2276
|
}, "").join("&");
|
|
2277
2277
|
};
|
|
2278
|
-
function
|
|
2278
|
+
function ds(t) {
|
|
2279
2279
|
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
2280
2280
|
}
|
|
2281
|
-
function
|
|
2281
|
+
function tn(t, e, n) {
|
|
2282
2282
|
if (!e)
|
|
2283
2283
|
return t;
|
|
2284
|
-
const r = n && n.encode ||
|
|
2284
|
+
const r = n && n.encode || ds;
|
|
2285
2285
|
p.isFunction(n) && (n = {
|
|
2286
2286
|
serialize: n
|
|
2287
2287
|
});
|
|
@@ -2347,41 +2347,41 @@ class xt {
|
|
|
2347
2347
|
});
|
|
2348
2348
|
}
|
|
2349
2349
|
}
|
|
2350
|
-
const
|
|
2350
|
+
const nn = {
|
|
2351
2351
|
silentJSONParsing: !0,
|
|
2352
2352
|
forcedJSONParsing: !0,
|
|
2353
2353
|
clarifyTimeoutError: !1
|
|
2354
|
-
},
|
|
2354
|
+
}, gs = typeof URLSearchParams < "u" ? URLSearchParams : st, ms = typeof FormData < "u" ? FormData : null, bs = typeof Blob < "u" ? Blob : null, xs = {
|
|
2355
2355
|
isBrowser: !0,
|
|
2356
2356
|
classes: {
|
|
2357
|
-
URLSearchParams:
|
|
2358
|
-
FormData:
|
|
2359
|
-
Blob:
|
|
2357
|
+
URLSearchParams: gs,
|
|
2358
|
+
FormData: ms,
|
|
2359
|
+
Blob: bs
|
|
2360
2360
|
},
|
|
2361
2361
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
2362
|
-
}, it = typeof window < "u" && typeof document < "u", Me = typeof navigator == "object" && navigator || void 0,
|
|
2363
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
2362
|
+
}, it = typeof window < "u" && typeof document < "u", Me = typeof navigator == "object" && navigator || void 0, ws = it && (!Me || ["ReactNative", "NativeScript", "NS"].indexOf(Me.product) < 0), ks = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
2363
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", ys = it && window.location.href || "http://localhost", Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2364
2364
|
__proto__: null,
|
|
2365
2365
|
hasBrowserEnv: it,
|
|
2366
|
-
hasStandardBrowserEnv:
|
|
2367
|
-
hasStandardBrowserWebWorkerEnv:
|
|
2366
|
+
hasStandardBrowserEnv: ws,
|
|
2367
|
+
hasStandardBrowserWebWorkerEnv: ks,
|
|
2368
2368
|
navigator: Me,
|
|
2369
|
-
origin:
|
|
2369
|
+
origin: ys
|
|
2370
2370
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
2371
|
-
...
|
|
2372
|
-
...
|
|
2371
|
+
...Rs,
|
|
2372
|
+
...xs
|
|
2373
2373
|
};
|
|
2374
|
-
function
|
|
2374
|
+
function Ss(t, e) {
|
|
2375
2375
|
return Ae(t, new O.classes.URLSearchParams(), Object.assign({
|
|
2376
2376
|
visitor: function(n, r, s, i) {
|
|
2377
2377
|
return O.isNode && p.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
2378
2378
|
}
|
|
2379
2379
|
}, e));
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function Es(t) {
|
|
2382
2382
|
return p.matchAll(/\w+|\[(\w*)]/g, t).map((e) => e[0] === "[]" ? "" : e[1] || e[0]);
|
|
2383
2383
|
}
|
|
2384
|
-
function
|
|
2384
|
+
function Ts(t) {
|
|
2385
2385
|
const e = {}, n = Object.keys(t);
|
|
2386
2386
|
let r;
|
|
2387
2387
|
const s = n.length;
|
|
@@ -2390,22 +2390,22 @@ function Es(t) {
|
|
|
2390
2390
|
i = n[r], e[i] = t[i];
|
|
2391
2391
|
return e;
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2393
|
+
function rn(t) {
|
|
2394
2394
|
function e(n, r, s, i) {
|
|
2395
2395
|
let o = n[i++];
|
|
2396
2396
|
if (o === "__proto__") return !0;
|
|
2397
2397
|
const a = Number.isFinite(+o), u = i >= n.length;
|
|
2398
|
-
return o = !o && p.isArray(s) ? s.length : o, u ? (p.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !p.isObject(s[o])) && (s[o] = []), e(n, r, s[o], i) && p.isArray(s[o]) && (s[o] =
|
|
2398
|
+
return o = !o && p.isArray(s) ? s.length : o, u ? (p.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !p.isObject(s[o])) && (s[o] = []), e(n, r, s[o], i) && p.isArray(s[o]) && (s[o] = Ts(s[o])), !a);
|
|
2399
2399
|
}
|
|
2400
2400
|
if (p.isFormData(t) && p.isFunction(t.entries)) {
|
|
2401
2401
|
const n = {};
|
|
2402
2402
|
return p.forEachEntry(t, (r, s) => {
|
|
2403
|
-
e(
|
|
2403
|
+
e(Es(r), s, n, 0);
|
|
2404
2404
|
}), n;
|
|
2405
2405
|
}
|
|
2406
2406
|
return null;
|
|
2407
2407
|
}
|
|
2408
|
-
function
|
|
2408
|
+
function As(t, e, n) {
|
|
2409
2409
|
if (p.isString(t))
|
|
2410
2410
|
try {
|
|
2411
2411
|
return (e || JSON.parse)(t), p.trim(t);
|
|
@@ -2416,12 +2416,12 @@ function Ts(t, e, n) {
|
|
|
2416
2416
|
return (n || JSON.stringify)(t);
|
|
2417
2417
|
}
|
|
2418
2418
|
const ce = {
|
|
2419
|
-
transitional:
|
|
2419
|
+
transitional: nn,
|
|
2420
2420
|
adapter: ["xhr", "http", "fetch"],
|
|
2421
2421
|
transformRequest: [function(e, n) {
|
|
2422
2422
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = p.isObject(e);
|
|
2423
2423
|
if (i && p.isHTMLForm(e) && (e = new FormData(e)), p.isFormData(e))
|
|
2424
|
-
return s ? JSON.stringify(
|
|
2424
|
+
return s ? JSON.stringify(rn(e)) : e;
|
|
2425
2425
|
if (p.isArrayBuffer(e) || p.isBuffer(e) || p.isStream(e) || p.isFile(e) || p.isBlob(e) || p.isReadableStream(e))
|
|
2426
2426
|
return e;
|
|
2427
2427
|
if (p.isArrayBufferView(e))
|
|
@@ -2431,7 +2431,7 @@ const ce = {
|
|
|
2431
2431
|
let a;
|
|
2432
2432
|
if (i) {
|
|
2433
2433
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
2434
|
-
return
|
|
2434
|
+
return Ss(e, this.formSerializer).toString();
|
|
2435
2435
|
if ((a = p.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
2436
2436
|
const u = this.env && this.env.FormData;
|
|
2437
2437
|
return Ae(
|
|
@@ -2441,7 +2441,7 @@ const ce = {
|
|
|
2441
2441
|
);
|
|
2442
2442
|
}
|
|
2443
2443
|
}
|
|
2444
|
-
return i || s ? (n.setContentType("application/json", !1),
|
|
2444
|
+
return i || s ? (n.setContentType("application/json", !1), As(e)) : e;
|
|
2445
2445
|
}],
|
|
2446
2446
|
transformResponse: [function(e) {
|
|
2447
2447
|
const n = this.transitional || ce.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -2484,7 +2484,7 @@ const ce = {
|
|
|
2484
2484
|
p.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
|
|
2485
2485
|
ce.headers[t] = {};
|
|
2486
2486
|
});
|
|
2487
|
-
const
|
|
2487
|
+
const Cs = p.toObjectSet([
|
|
2488
2488
|
"age",
|
|
2489
2489
|
"authorization",
|
|
2490
2490
|
"content-length",
|
|
@@ -2502,12 +2502,12 @@ const As = p.toObjectSet([
|
|
|
2502
2502
|
"referer",
|
|
2503
2503
|
"retry-after",
|
|
2504
2504
|
"user-agent"
|
|
2505
|
-
]),
|
|
2505
|
+
]), _s = (t) => {
|
|
2506
2506
|
const e = {};
|
|
2507
2507
|
let n, r, s;
|
|
2508
2508
|
return t && t.split(`
|
|
2509
2509
|
`).forEach(function(o) {
|
|
2510
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] &&
|
|
2510
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || e[n] && Cs[n]) && (n === "set-cookie" ? e[n] ? e[n].push(r) : e[n] = [r] : e[n] = e[n] ? e[n] + ", " + r : r);
|
|
2511
2511
|
}), e;
|
|
2512
2512
|
}, wt = Symbol("internals");
|
|
2513
2513
|
function re(t) {
|
|
@@ -2516,14 +2516,14 @@ function re(t) {
|
|
|
2516
2516
|
function fe(t) {
|
|
2517
2517
|
return t === !1 || t == null ? t : p.isArray(t) ? t.map(fe) : String(t);
|
|
2518
2518
|
}
|
|
2519
|
-
function
|
|
2519
|
+
function vs(t) {
|
|
2520
2520
|
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
2521
2521
|
let r;
|
|
2522
2522
|
for (; r = n.exec(t); )
|
|
2523
2523
|
e[r[1]] = r[2];
|
|
2524
2524
|
return e;
|
|
2525
2525
|
}
|
|
2526
|
-
const
|
|
2526
|
+
const Os = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
2527
2527
|
function Pe(t, e, n, r, s) {
|
|
2528
2528
|
if (p.isFunction(r))
|
|
2529
2529
|
return r.call(this, e, n);
|
|
@@ -2534,10 +2534,10 @@ function Pe(t, e, n, r, s) {
|
|
|
2534
2534
|
return r.test(e);
|
|
2535
2535
|
}
|
|
2536
2536
|
}
|
|
2537
|
-
function
|
|
2537
|
+
function $s(t) {
|
|
2538
2538
|
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2540
|
+
function Ns(t, e) {
|
|
2541
2541
|
const n = p.toCamelCase(" " + e);
|
|
2542
2542
|
["get", "set", "has"].forEach((r) => {
|
|
2543
2543
|
Object.defineProperty(t, r + n, {
|
|
@@ -2564,8 +2564,8 @@ let j = class {
|
|
|
2564
2564
|
const o = (a, u) => p.forEach(a, (l, c) => i(l, c, u));
|
|
2565
2565
|
if (p.isPlainObject(e) || e instanceof this.constructor)
|
|
2566
2566
|
o(e, n);
|
|
2567
|
-
else if (p.isString(e) && (e = e.trim()) && !
|
|
2568
|
-
o(
|
|
2567
|
+
else if (p.isString(e) && (e = e.trim()) && !Os(e))
|
|
2568
|
+
o(_s(e), n);
|
|
2569
2569
|
else if (p.isObject(e) && p.isIterable(e)) {
|
|
2570
2570
|
let a = {}, u, l;
|
|
2571
2571
|
for (const c of e) {
|
|
@@ -2586,7 +2586,7 @@ let j = class {
|
|
|
2586
2586
|
if (!n)
|
|
2587
2587
|
return s;
|
|
2588
2588
|
if (n === !0)
|
|
2589
|
-
return
|
|
2589
|
+
return vs(s);
|
|
2590
2590
|
if (p.isFunction(n))
|
|
2591
2591
|
return n.call(this, s, r);
|
|
2592
2592
|
if (p.isRegExp(n))
|
|
@@ -2630,7 +2630,7 @@ let j = class {
|
|
|
2630
2630
|
n[o] = fe(s), delete n[i];
|
|
2631
2631
|
return;
|
|
2632
2632
|
}
|
|
2633
|
-
const a = e ?
|
|
2633
|
+
const a = e ? $s(i) : String(i).trim();
|
|
2634
2634
|
a !== i && delete n[i], n[a] = fe(s), r[a] = !0;
|
|
2635
2635
|
}), this;
|
|
2636
2636
|
}
|
|
@@ -2669,7 +2669,7 @@ let j = class {
|
|
|
2669
2669
|
}).accessors, s = this.prototype;
|
|
2670
2670
|
function i(o) {
|
|
2671
2671
|
const a = re(o);
|
|
2672
|
-
r[a] || (
|
|
2672
|
+
r[a] || (Ns(s, o), r[a] = !0);
|
|
2673
2673
|
}
|
|
2674
2674
|
return p.isArray(e) ? e.forEach(i) : i(e), this;
|
|
2675
2675
|
}
|
|
@@ -2692,7 +2692,7 @@ function Le(t, e) {
|
|
|
2692
2692
|
i = a.call(n, i, s.normalize(), e ? e.status : void 0);
|
|
2693
2693
|
}), s.normalize(), i;
|
|
2694
2694
|
}
|
|
2695
|
-
function
|
|
2695
|
+
function sn(t) {
|
|
2696
2696
|
return !!(t && t.__CANCEL__);
|
|
2697
2697
|
}
|
|
2698
2698
|
function Q(t, e, n) {
|
|
@@ -2701,7 +2701,7 @@ function Q(t, e, n) {
|
|
|
2701
2701
|
p.inherits(Q, x, {
|
|
2702
2702
|
__CANCEL__: !0
|
|
2703
2703
|
});
|
|
2704
|
-
function
|
|
2704
|
+
function on(t, e, n) {
|
|
2705
2705
|
const r = n.config.validateStatus;
|
|
2706
2706
|
!n.status || !r || r(n.status) ? t(n) : e(new x(
|
|
2707
2707
|
"Request failed with status code " + n.status,
|
|
@@ -2711,11 +2711,11 @@ function sn(t, e, n) {
|
|
|
2711
2711
|
n
|
|
2712
2712
|
));
|
|
2713
2713
|
}
|
|
2714
|
-
function
|
|
2714
|
+
function Ps(t) {
|
|
2715
2715
|
const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
|
|
2716
2716
|
return e && e[1] || "";
|
|
2717
2717
|
}
|
|
2718
|
-
function
|
|
2718
|
+
function Ls(t, e) {
|
|
2719
2719
|
t = t || 10;
|
|
2720
2720
|
const n = new Array(t), r = new Array(t);
|
|
2721
2721
|
let s = 0, i = 0, o;
|
|
@@ -2731,7 +2731,7 @@ function Ps(t, e) {
|
|
|
2731
2731
|
return w ? Math.round(h * 1e3 / w) : void 0;
|
|
2732
2732
|
};
|
|
2733
2733
|
}
|
|
2734
|
-
function
|
|
2734
|
+
function js(t, e) {
|
|
2735
2735
|
let n = 0, r = 1e3 / e, s, i;
|
|
2736
2736
|
const o = (l, c = Date.now()) => {
|
|
2737
2737
|
n = c, s = null, i && (clearTimeout(i), i = null), t.apply(null, l);
|
|
@@ -2745,8 +2745,8 @@ function Ls(t, e) {
|
|
|
2745
2745
|
}
|
|
2746
2746
|
const xe = (t, e, n = 3) => {
|
|
2747
2747
|
let r = 0;
|
|
2748
|
-
const s =
|
|
2749
|
-
return
|
|
2748
|
+
const s = Ls(50, 250);
|
|
2749
|
+
return js((i) => {
|
|
2750
2750
|
const o = i.loaded, a = i.lengthComputable ? i.total : void 0, u = o - r, l = s(u), c = o <= a;
|
|
2751
2751
|
r = o;
|
|
2752
2752
|
const f = {
|
|
@@ -2769,10 +2769,10 @@ const xe = (t, e, n = 3) => {
|
|
|
2769
2769
|
total: t,
|
|
2770
2770
|
loaded: r
|
|
2771
2771
|
}), e[1]];
|
|
2772
|
-
}, yt = (t) => (...e) => p.asap(() => t(...e)),
|
|
2772
|
+
}, yt = (t) => (...e) => p.asap(() => t(...e)), Bs = 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)))(
|
|
2773
2773
|
new URL(O.origin),
|
|
2774
2774
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
2775
|
-
) : () => !0,
|
|
2775
|
+
) : () => !0, zs = O.hasStandardBrowserEnv ? (
|
|
2776
2776
|
// Standard browser envs support document.cookie
|
|
2777
2777
|
{
|
|
2778
2778
|
write(t, e, n, r, s, i) {
|
|
@@ -2799,15 +2799,15 @@ const xe = (t, e, n = 3) => {
|
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
2801
|
);
|
|
2802
|
-
function
|
|
2802
|
+
function Is(t) {
|
|
2803
2803
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
2804
2804
|
}
|
|
2805
|
-
function
|
|
2805
|
+
function Ds(t, e) {
|
|
2806
2806
|
return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
|
|
2807
2807
|
}
|
|
2808
|
-
function
|
|
2809
|
-
let r = !
|
|
2810
|
-
return t && (r || n == !1) ?
|
|
2808
|
+
function an(t, e, n) {
|
|
2809
|
+
let r = !Is(e);
|
|
2810
|
+
return t && (r || n == !1) ? Ds(t, e) : e;
|
|
2811
2811
|
}
|
|
2812
2812
|
const Rt = (t) => t instanceof j ? { ...t } : t;
|
|
2813
2813
|
function Z(t, e) {
|
|
@@ -2874,10 +2874,10 @@ function Z(t, e) {
|
|
|
2874
2874
|
p.isUndefined(h) && f !== a || (n[c] = h);
|
|
2875
2875
|
}), n;
|
|
2876
2876
|
}
|
|
2877
|
-
const
|
|
2877
|
+
const ln = (t) => {
|
|
2878
2878
|
const e = Z({}, t);
|
|
2879
2879
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: a } = e;
|
|
2880
|
-
e.headers = o = j.from(o), e.url =
|
|
2880
|
+
e.headers = o = j.from(o), e.url = tn(an(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && o.set(
|
|
2881
2881
|
"Authorization",
|
|
2882
2882
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
2883
2883
|
);
|
|
@@ -2890,14 +2890,14 @@ const an = (t) => {
|
|
|
2890
2890
|
o.setContentType([l || "multipart/form-data", ...c].join("; "));
|
|
2891
2891
|
}
|
|
2892
2892
|
}
|
|
2893
|
-
if (O.hasStandardBrowserEnv && (r && p.isFunction(r) && (r = r(e)), r || r !== !1 &&
|
|
2894
|
-
const l = s && i &&
|
|
2893
|
+
if (O.hasStandardBrowserEnv && (r && p.isFunction(r) && (r = r(e)), r || r !== !1 && Bs(e.url))) {
|
|
2894
|
+
const l = s && i && zs.read(i);
|
|
2895
2895
|
l && o.set(s, l);
|
|
2896
2896
|
}
|
|
2897
2897
|
return e;
|
|
2898
|
-
},
|
|
2898
|
+
}, qs = typeof XMLHttpRequest < "u", Us = qs && function(t) {
|
|
2899
2899
|
return new Promise(function(n, r) {
|
|
2900
|
-
const s =
|
|
2900
|
+
const s = ln(t);
|
|
2901
2901
|
let i = s.data;
|
|
2902
2902
|
const o = j.from(s.headers).normalize();
|
|
2903
2903
|
let { responseType: a, onUploadProgress: u, onDownloadProgress: l } = s, c, f, h, w, d;
|
|
@@ -2919,7 +2919,7 @@ const an = (t) => {
|
|
|
2919
2919
|
config: t,
|
|
2920
2920
|
request: m
|
|
2921
2921
|
};
|
|
2922
|
-
|
|
2922
|
+
on(function(v) {
|
|
2923
2923
|
n(v), g();
|
|
2924
2924
|
}, function(v) {
|
|
2925
2925
|
r(v), g();
|
|
@@ -2933,7 +2933,7 @@ const an = (t) => {
|
|
|
2933
2933
|
r(new x("Network Error", x.ERR_NETWORK, t, m)), m = null;
|
|
2934
2934
|
}, m.ontimeout = function() {
|
|
2935
2935
|
let N = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
2936
|
-
const _ = s.transitional ||
|
|
2936
|
+
const _ = s.transitional || nn;
|
|
2937
2937
|
s.timeoutErrorMessage && (N = s.timeoutErrorMessage), r(new x(
|
|
2938
2938
|
N,
|
|
2939
2939
|
_.clarifyTimeoutError ? x.ETIMEDOUT : x.ECONNABORTED,
|
|
@@ -2945,14 +2945,14 @@ const an = (t) => {
|
|
|
2945
2945
|
}), p.isUndefined(s.withCredentials) || (m.withCredentials = !!s.withCredentials), a && a !== "json" && (m.responseType = s.responseType), l && ([h, d] = xe(l, !0), m.addEventListener("progress", h)), u && m.upload && ([f, w] = xe(u), m.upload.addEventListener("progress", f), m.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (c = (A) => {
|
|
2946
2946
|
m && (r(!A || A.type ? new Q(null, t, m) : A), m.abort(), m = null);
|
|
2947
2947
|
}, s.cancelToken && s.cancelToken.subscribe(c), s.signal && (s.signal.aborted ? c() : s.signal.addEventListener("abort", c)));
|
|
2948
|
-
const E =
|
|
2948
|
+
const E = Ps(s.url);
|
|
2949
2949
|
if (E && O.protocols.indexOf(E) === -1) {
|
|
2950
2950
|
r(new x("Unsupported protocol " + E + ":", x.ERR_BAD_REQUEST, t));
|
|
2951
2951
|
return;
|
|
2952
2952
|
}
|
|
2953
2953
|
m.send(i || null);
|
|
2954
2954
|
});
|
|
2955
|
-
},
|
|
2955
|
+
}, Fs = (t, e) => {
|
|
2956
2956
|
const { length: n } = t = t ? t.filter(Boolean) : [];
|
|
2957
2957
|
if (e || n) {
|
|
2958
2958
|
let r = new AbortController(), s;
|
|
@@ -2975,7 +2975,7 @@ const an = (t) => {
|
|
|
2975
2975
|
const { signal: u } = r;
|
|
2976
2976
|
return u.unsubscribe = () => p.asap(a), u;
|
|
2977
2977
|
}
|
|
2978
|
-
},
|
|
2978
|
+
}, Ms = function* (t, e) {
|
|
2979
2979
|
let n = t.byteLength;
|
|
2980
2980
|
if (n < e) {
|
|
2981
2981
|
yield t;
|
|
@@ -2984,10 +2984,10 @@ const an = (t) => {
|
|
|
2984
2984
|
let r = 0, s;
|
|
2985
2985
|
for (; r < n; )
|
|
2986
2986
|
s = r + e, yield t.slice(r, s), r = s;
|
|
2987
|
-
},
|
|
2988
|
-
for await (const n of
|
|
2989
|
-
yield*
|
|
2990
|
-
},
|
|
2987
|
+
}, Hs = async function* (t, e) {
|
|
2988
|
+
for await (const n of Js(t))
|
|
2989
|
+
yield* Ms(n, e);
|
|
2990
|
+
}, Js = async function* (t) {
|
|
2991
2991
|
if (t[Symbol.asyncIterator]) {
|
|
2992
2992
|
yield* t;
|
|
2993
2993
|
return;
|
|
@@ -3004,7 +3004,7 @@ const an = (t) => {
|
|
|
3004
3004
|
await e.cancel();
|
|
3005
3005
|
}
|
|
3006
3006
|
}, St = (t, e, n, r) => {
|
|
3007
|
-
const s =
|
|
3007
|
+
const s = Hs(t, e);
|
|
3008
3008
|
let i = 0, o, a = (u) => {
|
|
3009
3009
|
o || (o = !0, r && r(u));
|
|
3010
3010
|
};
|
|
@@ -3032,13 +3032,13 @@ const an = (t) => {
|
|
|
3032
3032
|
}, {
|
|
3033
3033
|
highWaterMark: 2
|
|
3034
3034
|
});
|
|
3035
|
-
}, Ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
3035
|
+
}, Ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", cn = Ce && typeof ReadableStream == "function", Zs = Ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((t) => (e) => t.encode(e))(new TextEncoder()) : async (t) => new Uint8Array(await new Response(t).arrayBuffer())), un = (t, ...e) => {
|
|
3036
3036
|
try {
|
|
3037
3037
|
return !!t(...e);
|
|
3038
3038
|
} catch {
|
|
3039
3039
|
return !1;
|
|
3040
3040
|
}
|
|
3041
|
-
},
|
|
3041
|
+
}, Ws = cn && un(() => {
|
|
3042
3042
|
let t = !1;
|
|
3043
3043
|
const e = new Request(O.origin, {
|
|
3044
3044
|
body: new ReadableStream(),
|
|
@@ -3048,7 +3048,7 @@ const an = (t) => {
|
|
|
3048
3048
|
}
|
|
3049
3049
|
}).headers.has("Content-Type");
|
|
3050
3050
|
return t && !e;
|
|
3051
|
-
}), Et = 64 * 1024, He =
|
|
3051
|
+
}), Et = 64 * 1024, He = cn && un(() => p.isReadableStream(new Response("").body)), we = {
|
|
3052
3052
|
stream: He && ((t) => t.body)
|
|
3053
3053
|
};
|
|
3054
3054
|
Ce && ((t) => {
|
|
@@ -3058,7 +3058,7 @@ Ce && ((t) => {
|
|
|
3058
3058
|
});
|
|
3059
3059
|
});
|
|
3060
3060
|
})(new Response());
|
|
3061
|
-
const
|
|
3061
|
+
const Vs = async (t) => {
|
|
3062
3062
|
if (t == null)
|
|
3063
3063
|
return 0;
|
|
3064
3064
|
if (p.isBlob(t))
|
|
@@ -3071,11 +3071,11 @@ const Ws = async (t) => {
|
|
|
3071
3071
|
if (p.isArrayBufferView(t) || p.isArrayBuffer(t))
|
|
3072
3072
|
return t.byteLength;
|
|
3073
3073
|
if (p.isURLSearchParams(t) && (t = t + ""), p.isString(t))
|
|
3074
|
-
return (await
|
|
3075
|
-
},
|
|
3074
|
+
return (await Zs(t)).byteLength;
|
|
3075
|
+
}, Gs = async (t, e) => {
|
|
3076
3076
|
const n = p.toFiniteNumber(t.getContentLength());
|
|
3077
|
-
return n ??
|
|
3078
|
-
},
|
|
3077
|
+
return n ?? Vs(e);
|
|
3078
|
+
}, Ks = Ce && (async (t) => {
|
|
3079
3079
|
let {
|
|
3080
3080
|
url: e,
|
|
3081
3081
|
method: n,
|
|
@@ -3089,15 +3089,15 @@ const Ws = async (t) => {
|
|
|
3089
3089
|
headers: c,
|
|
3090
3090
|
withCredentials: f = "same-origin",
|
|
3091
3091
|
fetchOptions: h
|
|
3092
|
-
} =
|
|
3092
|
+
} = ln(t);
|
|
3093
3093
|
l = l ? (l + "").toLowerCase() : "text";
|
|
3094
|
-
let w =
|
|
3094
|
+
let w = Fs([s, i && i.toAbortSignal()], o), d;
|
|
3095
3095
|
const g = w && w.unsubscribe && (() => {
|
|
3096
3096
|
w.unsubscribe();
|
|
3097
3097
|
});
|
|
3098
3098
|
let m;
|
|
3099
3099
|
try {
|
|
3100
|
-
if (u &&
|
|
3100
|
+
if (u && Ws && n !== "get" && n !== "head" && (m = await Gs(c, r)) !== 0) {
|
|
3101
3101
|
let _ = new Request(e, {
|
|
3102
3102
|
method: "POST",
|
|
3103
3103
|
body: r,
|
|
@@ -3143,7 +3143,7 @@ const Ws = async (t) => {
|
|
|
3143
3143
|
l = l || "text";
|
|
3144
3144
|
let N = await we[p.findKey(we, l) || "text"](E, t);
|
|
3145
3145
|
return !A && g && g(), await new Promise((_, P) => {
|
|
3146
|
-
|
|
3146
|
+
on(_, P, {
|
|
3147
3147
|
data: N,
|
|
3148
3148
|
headers: j.from(E.headers),
|
|
3149
3149
|
status: E.status,
|
|
@@ -3161,9 +3161,9 @@ const Ws = async (t) => {
|
|
|
3161
3161
|
) : x.from(R, R && R.code, t, d);
|
|
3162
3162
|
}
|
|
3163
3163
|
}), Je = {
|
|
3164
|
-
http:
|
|
3165
|
-
xhr:
|
|
3166
|
-
fetch:
|
|
3164
|
+
http: ps,
|
|
3165
|
+
xhr: Us,
|
|
3166
|
+
fetch: Ks
|
|
3167
3167
|
};
|
|
3168
3168
|
p.forEach(Je, (t, e) => {
|
|
3169
3169
|
if (t) {
|
|
@@ -3174,7 +3174,7 @@ p.forEach(Je, (t, e) => {
|
|
|
3174
3174
|
Object.defineProperty(t, "adapterName", { value: e });
|
|
3175
3175
|
}
|
|
3176
3176
|
});
|
|
3177
|
-
const Tt = (t) => `- ${t}`,
|
|
3177
|
+
const Tt = (t) => `- ${t}`, Xs = (t) => p.isFunction(t) || t === null || t === !1, pn = {
|
|
3178
3178
|
getAdapter: (t) => {
|
|
3179
3179
|
t = p.isArray(t) ? t : [t];
|
|
3180
3180
|
const { length: e } = t;
|
|
@@ -3183,7 +3183,7 @@ const Tt = (t) => `- ${t}`, Ks = (t) => p.isFunction(t) || t === null || t === !
|
|
|
3183
3183
|
for (let i = 0; i < e; i++) {
|
|
3184
3184
|
n = t[i];
|
|
3185
3185
|
let o;
|
|
3186
|
-
if (r = n, !
|
|
3186
|
+
if (r = n, !Xs(n) && (r = Je[(o = String(n)).toLowerCase()], r === void 0))
|
|
3187
3187
|
throw new x(`Unknown adapter '${o}'`);
|
|
3188
3188
|
if (r)
|
|
3189
3189
|
break;
|
|
@@ -3213,21 +3213,21 @@ function At(t) {
|
|
|
3213
3213
|
return je(t), t.headers = j.from(t.headers), t.data = Le.call(
|
|
3214
3214
|
t,
|
|
3215
3215
|
t.transformRequest
|
|
3216
|
-
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
3216
|
+
), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), pn.getAdapter(t.adapter || ce.adapter)(t).then(function(r) {
|
|
3217
3217
|
return je(t), r.data = Le.call(
|
|
3218
3218
|
t,
|
|
3219
3219
|
t.transformResponse,
|
|
3220
3220
|
r
|
|
3221
3221
|
), r.headers = j.from(r.headers), r;
|
|
3222
3222
|
}, function(r) {
|
|
3223
|
-
return
|
|
3223
|
+
return sn(r) || (je(t), r && r.response && (r.response.data = Le.call(
|
|
3224
3224
|
t,
|
|
3225
3225
|
t.transformResponse,
|
|
3226
3226
|
r.response
|
|
3227
3227
|
), r.response.headers = j.from(r.response.headers))), Promise.reject(r);
|
|
3228
3228
|
});
|
|
3229
3229
|
}
|
|
3230
|
-
const
|
|
3230
|
+
const hn = "1.10.0", _e = {};
|
|
3231
3231
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
3232
3232
|
_e[t] = function(r) {
|
|
3233
3233
|
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
@@ -3236,7 +3236,7 @@ const pn = "1.10.0", _e = {};
|
|
|
3236
3236
|
const Ct = {};
|
|
3237
3237
|
_e.transitional = function(e, n, r) {
|
|
3238
3238
|
function s(i, o) {
|
|
3239
|
-
return "[Axios v" +
|
|
3239
|
+
return "[Axios v" + hn + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
3240
3240
|
}
|
|
3241
3241
|
return (i, o, a) => {
|
|
3242
3242
|
if (e === !1)
|
|
@@ -3255,7 +3255,7 @@ _e.transitional = function(e, n, r) {
|
|
|
3255
3255
|
_e.spelling = function(e) {
|
|
3256
3256
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
3257
3257
|
};
|
|
3258
|
-
function
|
|
3258
|
+
function Qs(t, e, n) {
|
|
3259
3259
|
if (typeof t != "object")
|
|
3260
3260
|
throw new x("options must be an object", x.ERR_BAD_OPTION_VALUE);
|
|
3261
3261
|
const r = Object.keys(t);
|
|
@@ -3273,7 +3273,7 @@ function Xs(t, e, n) {
|
|
|
3273
3273
|
}
|
|
3274
3274
|
}
|
|
3275
3275
|
const de = {
|
|
3276
|
-
assertOptions:
|
|
3276
|
+
assertOptions: Qs,
|
|
3277
3277
|
validators: _e
|
|
3278
3278
|
}, I = de.validators;
|
|
3279
3279
|
let H = class {
|
|
@@ -3372,8 +3372,8 @@ let H = class {
|
|
|
3372
3372
|
}
|
|
3373
3373
|
getUri(e) {
|
|
3374
3374
|
e = Z(this.defaults, e);
|
|
3375
|
-
const n =
|
|
3376
|
-
return
|
|
3375
|
+
const n = an(e.baseURL, e.url, e.allowAbsoluteUrls);
|
|
3376
|
+
return tn(n, e.params, e.paramsSerializer);
|
|
3377
3377
|
}
|
|
3378
3378
|
};
|
|
3379
3379
|
p.forEach(["delete", "get", "head", "options"], function(e) {
|
|
@@ -3400,7 +3400,7 @@ p.forEach(["post", "put", "patch"], function(e) {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
H.prototype[e] = n(), H.prototype[e + "Form"] = n(!0);
|
|
3402
3402
|
});
|
|
3403
|
-
let
|
|
3403
|
+
let Ys = class fn {
|
|
3404
3404
|
constructor(e) {
|
|
3405
3405
|
if (typeof e != "function")
|
|
3406
3406
|
throw new TypeError("executor must be a function.");
|
|
@@ -3466,19 +3466,19 @@ let Qs = class hn {
|
|
|
3466
3466
|
static source() {
|
|
3467
3467
|
let e;
|
|
3468
3468
|
return {
|
|
3469
|
-
token: new
|
|
3469
|
+
token: new fn(function(s) {
|
|
3470
3470
|
e = s;
|
|
3471
3471
|
}),
|
|
3472
3472
|
cancel: e
|
|
3473
3473
|
};
|
|
3474
3474
|
}
|
|
3475
3475
|
};
|
|
3476
|
-
function
|
|
3476
|
+
function ei(t) {
|
|
3477
3477
|
return function(n) {
|
|
3478
3478
|
return t.apply(null, n);
|
|
3479
3479
|
};
|
|
3480
3480
|
}
|
|
3481
|
-
function
|
|
3481
|
+
function ti(t) {
|
|
3482
3482
|
return p.isObject(t) && t.isAxiosError === !0;
|
|
3483
3483
|
}
|
|
3484
3484
|
const Ze = {
|
|
@@ -3549,30 +3549,30 @@ const Ze = {
|
|
|
3549
3549
|
Object.entries(Ze).forEach(([t, e]) => {
|
|
3550
3550
|
Ze[e] = t;
|
|
3551
3551
|
});
|
|
3552
|
-
function
|
|
3553
|
-
const e = new H(t), n =
|
|
3552
|
+
function dn(t) {
|
|
3553
|
+
const e = new H(t), n = Mt(H.prototype.request, e);
|
|
3554
3554
|
return p.extend(n, H.prototype, e, { allOwnKeys: !0 }), p.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
3555
|
-
return
|
|
3555
|
+
return dn(Z(t, s));
|
|
3556
3556
|
}, n;
|
|
3557
3557
|
}
|
|
3558
|
-
const C =
|
|
3558
|
+
const C = dn(ce);
|
|
3559
3559
|
C.Axios = H;
|
|
3560
3560
|
C.CanceledError = Q;
|
|
3561
|
-
C.CancelToken =
|
|
3562
|
-
C.isCancel =
|
|
3563
|
-
C.VERSION =
|
|
3561
|
+
C.CancelToken = Ys;
|
|
3562
|
+
C.isCancel = sn;
|
|
3563
|
+
C.VERSION = hn;
|
|
3564
3564
|
C.toFormData = Ae;
|
|
3565
3565
|
C.AxiosError = x;
|
|
3566
3566
|
C.Cancel = C.CanceledError;
|
|
3567
3567
|
C.all = function(e) {
|
|
3568
3568
|
return Promise.all(e);
|
|
3569
3569
|
};
|
|
3570
|
-
C.spread =
|
|
3571
|
-
C.isAxiosError =
|
|
3570
|
+
C.spread = ei;
|
|
3571
|
+
C.isAxiosError = ti;
|
|
3572
3572
|
C.mergeConfig = Z;
|
|
3573
3573
|
C.AxiosHeaders = j;
|
|
3574
|
-
C.formToJSON = (t) =>
|
|
3575
|
-
C.getAdapter =
|
|
3574
|
+
C.formToJSON = (t) => rn(p.isHTMLForm(t) ? new FormData(t) : t);
|
|
3575
|
+
C.getAdapter = pn.getAdapter;
|
|
3576
3576
|
C.HttpStatusCode = Ze;
|
|
3577
3577
|
C.default = C;
|
|
3578
3578
|
const {
|
|
@@ -3592,13 +3592,13 @@ const {
|
|
|
3592
3592
|
formToJSON: Ri,
|
|
3593
3593
|
getAdapter: Si,
|
|
3594
3594
|
mergeConfig: Ei
|
|
3595
|
-
} = C,
|
|
3595
|
+
} = C, ni = async (t, e) => {
|
|
3596
3596
|
var s;
|
|
3597
3597
|
const n = (s = window.location.search.replace("?", "").split("&").find((i) => i.includes("utm"))) == null ? void 0 : s.split("=")[1];
|
|
3598
3598
|
return (await C.post(e, { message: t }, {
|
|
3599
3599
|
headers: { utm: n }
|
|
3600
3600
|
})).data.output;
|
|
3601
|
-
},
|
|
3601
|
+
}, ri = async (t) => {
|
|
3602
3602
|
const e = await C.get(t), n = [];
|
|
3603
3603
|
for (const r of e.data.propertyName) {
|
|
3604
3604
|
const s = JSON.parse(r);
|
|
@@ -3606,15 +3606,15 @@ const {
|
|
|
3606
3606
|
}
|
|
3607
3607
|
return n.reverse();
|
|
3608
3608
|
};
|
|
3609
|
-
function
|
|
3610
|
-
const a = n ? [{ content: n, sender: "bot" }] : [], [u, l] = K(!1), [c, f] = K(n ? a : []), [h, w] = K(""), [d, g] = K(!1), [m, R] = K(!0), E =
|
|
3609
|
+
function _t({ theme: t = "boring", notificationBadge: e = !0, greeting: n, pageContext: r, chatPrompts: s = [], chatbotUrl: i, dialogeBaseUrl: o }) {
|
|
3610
|
+
const a = n ? [{ content: n, sender: "bot" }] : [], [u, l] = K(!1), [c, f] = K(n ? a : []), [h, w] = K(""), [d, g] = K(!1), [m, R] = K(!0), E = wn(null), [A, N] = K(s), _ = () => {
|
|
3611
3611
|
var T;
|
|
3612
3612
|
(T = E.current) == null || T.scrollIntoView({ behavior: "smooth" });
|
|
3613
3613
|
};
|
|
3614
3614
|
$e(() => {
|
|
3615
3615
|
c.filter((B) => B.sender === "user").length > 0 ? R(!1) : R(!0), _();
|
|
3616
3616
|
}, [c]), $e(() => {
|
|
3617
|
-
c.length <= 1 &&
|
|
3617
|
+
c.length <= 1 && ri(o).then((T) => {
|
|
3618
3618
|
const B = T.map((G) => ({
|
|
3619
3619
|
content: G.data.content,
|
|
3620
3620
|
sender: G.type === "human" ? "user" : "bot"
|
|
@@ -3632,7 +3632,7 @@ function ri({ theme: t = "boring", notificationBadge: e = !0, greeting: n, pageC
|
|
|
3632
3632
|
}
|
|
3633
3633
|
}, [r]);
|
|
3634
3634
|
const P = async (T, B) => {
|
|
3635
|
-
await
|
|
3635
|
+
await Er(T), B({
|
|
3636
3636
|
open: { isOpen: u, setIsOpen: l },
|
|
3637
3637
|
messageOptions: { messages: c, setMessages: f },
|
|
3638
3638
|
input: { inputValue: h, setInputValue: w },
|
|
@@ -3649,7 +3649,7 @@ function ri({ theme: t = "boring", notificationBadge: e = !0, greeting: n, pageC
|
|
|
3649
3649
|
f((Y) => [...Y, G]), w(""), g(!0);
|
|
3650
3650
|
try {
|
|
3651
3651
|
const ve = {
|
|
3652
|
-
content: await
|
|
3652
|
+
content: await ni(B, i),
|
|
3653
3653
|
sender: "bot"
|
|
3654
3654
|
};
|
|
3655
3655
|
f((Oe) => [...Oe, ve]);
|
|
@@ -3675,26 +3675,26 @@ function ri({ theme: t = "boring", notificationBadge: e = !0, greeting: n, pageC
|
|
|
3675
3675
|
${u ? "scale-100 opacity-100" : "scale-0 opacity-0 pointer-events-none"}
|
|
3676
3676
|
`,
|
|
3677
3677
|
children: /* @__PURE__ */ b.jsxs("div", { className: `${F(t, "mainBackground")} rounded-4xl shadow-2xl backdrop-blur-xl h-full flex flex-col overflow-hidden`, children: [
|
|
3678
|
-
/* @__PURE__ */ b.jsx(
|
|
3678
|
+
/* @__PURE__ */ b.jsx(Bn, { setIsOpen: l, theme: t }),
|
|
3679
3679
|
/* @__PURE__ */ b.jsxs("div", { className: "flex-1 flex flex-col h-full justify-between overflow-y-auto p-4 space-y-4 scrollbar-thin scrollbar-thumb-purple-500/50 scrollbar-track-transparent", children: [
|
|
3680
3680
|
/* @__PURE__ */ b.jsxs("div", { className: "space-y-4 ", children: [
|
|
3681
|
-
c.map((T, B) => /* @__PURE__ */ b.jsx(
|
|
3682
|
-
d && /* @__PURE__ */ b.jsx(
|
|
3681
|
+
c.map((T, B) => /* @__PURE__ */ b.jsx(wr, { message: T, index: B, theme: t }, T.content)),
|
|
3682
|
+
d && /* @__PURE__ */ b.jsx(kr, {}),
|
|
3683
3683
|
/* @__PURE__ */ b.jsx("div", { ref: E })
|
|
3684
3684
|
] }),
|
|
3685
|
-
m && /* @__PURE__ */ b.jsx("div", { className: "flex gap-2 flex-wrap", children: A.map((T) => /* @__PURE__ */ b.jsx(
|
|
3685
|
+
m && /* @__PURE__ */ b.jsx("div", { className: "flex gap-2 flex-wrap", children: A.map((T) => /* @__PURE__ */ b.jsx(Tr, { prompt: T, handleSendMessage: v, theme: t }, T)) })
|
|
3686
3686
|
] }),
|
|
3687
|
-
/* @__PURE__ */ b.jsx(
|
|
3687
|
+
/* @__PURE__ */ b.jsx(Rr, { handleKeyPress: V, inputValue: h, setInputValue: w, handleSendMessage: () => v(), theme: t })
|
|
3688
3688
|
] })
|
|
3689
3689
|
}
|
|
3690
3690
|
),
|
|
3691
|
-
/* @__PURE__ */ b.jsx(
|
|
3692
|
-
!u && e && /* @__PURE__ */ b.jsx(
|
|
3691
|
+
/* @__PURE__ */ b.jsx(Sr, { isOpen: u, setIsOpen: l }),
|
|
3692
|
+
!u && e && /* @__PURE__ */ b.jsx(yr, {})
|
|
3693
3693
|
] });
|
|
3694
3694
|
}
|
|
3695
3695
|
function Ti(t, e = {}) {
|
|
3696
3696
|
const n = typeof t == "string" ? document.querySelector(t) : t;
|
|
3697
|
-
|
|
3697
|
+
console.log({ ChatbotWidget: _t, el: n, props: e }), bn.createRoot(n).render(/* @__PURE__ */ b.jsx(_t, { ...e }));
|
|
3698
3698
|
}
|
|
3699
3699
|
export {
|
|
3700
3700
|
Ti as mountChatbotWidget
|