@iai-lib/any-chat-widget 0.1.0-alpha.21 → 0.1.0-alpha.22
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/any-chat-widget.es.js +711 -689
- package/dist/any-chat-widget.umd.js +71 -68
- package/package.json +3 -3
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ui = (i, e, t) => {
|
|
2
2
|
if (!e.has(i))
|
|
3
3
|
throw TypeError("Cannot " + t);
|
|
4
4
|
};
|
|
5
|
-
var en = (i, e, t) => (
|
|
5
|
+
var en = (i, e, t) => (Ui(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Yn = (i, e, t) => {
|
|
6
6
|
if (e.has(i))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
9
|
-
}, Ie = (i, e, t, n) => (
|
|
9
|
+
}, Ie = (i, e, t, n) => (Ui(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
10
10
|
/**
|
|
11
11
|
* @license
|
|
12
12
|
* Copyright 2019 Google LLC
|
|
13
13
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
14
14
|
*/
|
|
15
|
-
const sn = globalThis,
|
|
16
|
-
let
|
|
15
|
+
const sn = globalThis, hi = sn.ShadowRoot && (sn.ShadyCSS === void 0 || sn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ui = Symbol(), Hi = /* @__PURE__ */ new WeakMap();
|
|
16
|
+
let bs = class {
|
|
17
17
|
constructor(e, t, n) {
|
|
18
|
-
if (this._$cssResult$ = !0, n !==
|
|
18
|
+
if (this._$cssResult$ = !0, n !== ui)
|
|
19
19
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
20
20
|
this.cssText = e, this.t = t;
|
|
21
21
|
}
|
|
22
22
|
get styleSheet() {
|
|
23
23
|
let e = this.o;
|
|
24
24
|
const t = this.t;
|
|
25
|
-
if (
|
|
25
|
+
if (hi && e === void 0) {
|
|
26
26
|
const n = t !== void 0 && t.length === 1;
|
|
27
|
-
n && (e =
|
|
27
|
+
n && (e = Hi.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && Hi.set(t, e));
|
|
28
28
|
}
|
|
29
29
|
return e;
|
|
30
30
|
}
|
|
@@ -32,7 +32,7 @@ let vs = class {
|
|
|
32
32
|
return this.cssText;
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
const mr = (i) => new
|
|
35
|
+
const mr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, ui), nt = (i, ...e) => {
|
|
36
36
|
const t = i.length === 1 ? i[0] : e.reduce((n, s, r) => n + ((a) => {
|
|
37
37
|
if (a._$cssResult$ === !0)
|
|
38
38
|
return a.cssText;
|
|
@@ -40,16 +40,16 @@ const mr = (i) => new vs(typeof i == "string" ? i : i + "", void 0, hi), tt = (i
|
|
|
40
40
|
return a;
|
|
41
41
|
throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
42
42
|
})(s) + i[r + 1], i[0]);
|
|
43
|
-
return new
|
|
43
|
+
return new bs(t, i, ui);
|
|
44
44
|
}, fr = (i, e) => {
|
|
45
|
-
if (
|
|
45
|
+
if (hi)
|
|
46
46
|
i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
47
47
|
else
|
|
48
48
|
for (const t of e) {
|
|
49
49
|
const n = document.createElement("style"), s = sn.litNonce;
|
|
50
50
|
s !== void 0 && n.setAttribute("nonce", s), n.textContent = t.cssText, i.appendChild(n);
|
|
51
51
|
}
|
|
52
|
-
}, Bi =
|
|
52
|
+
}, Bi = hi ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((e) => {
|
|
53
53
|
let t = "";
|
|
54
54
|
for (const n of e.cssRules)
|
|
55
55
|
t += n.cssText;
|
|
@@ -60,7 +60,7 @@ const mr = (i) => new vs(typeof i == "string" ? i : i + "", void 0, hi), tt = (i
|
|
|
60
60
|
* Copyright 2017 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
62
|
*/
|
|
63
|
-
const { is: gr, defineProperty: yr, getOwnPropertyDescriptor: vr, getOwnPropertyNames: br, getOwnPropertySymbols: wr, getPrototypeOf: xr } = Object, ct = globalThis,
|
|
63
|
+
const { is: gr, defineProperty: yr, getOwnPropertyDescriptor: vr, getOwnPropertyNames: br, getOwnPropertySymbols: wr, getPrototypeOf: xr } = Object, ct = globalThis, Wi = ct.trustedTypes, kr = Wi ? Wi.emptyScript : "", Fi = ct.reactiveElementPolyfillSupport, wt = (i, e) => i, ln = { toAttribute(i, e) {
|
|
64
64
|
switch (e) {
|
|
65
65
|
case Boolean:
|
|
66
66
|
i = i ? kr : null;
|
|
@@ -88,16 +88,16 @@ const { is: gr, defineProperty: yr, getOwnPropertyDescriptor: vr, getOwnProperty
|
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
return t;
|
|
91
|
-
} },
|
|
91
|
+
} }, pi = (i, e) => !gr(i, e), Vi = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi };
|
|
92
92
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), ct.litPropertyMetadata ?? (ct.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
93
|
-
class
|
|
93
|
+
class at extends HTMLElement {
|
|
94
94
|
static addInitializer(e) {
|
|
95
95
|
this._$Ei(), (this.l ?? (this.l = [])).push(e);
|
|
96
96
|
}
|
|
97
97
|
static get observedAttributes() {
|
|
98
98
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
99
99
|
}
|
|
100
|
-
static createProperty(e, t =
|
|
100
|
+
static createProperty(e, t = Vi) {
|
|
101
101
|
if (t.state && (t.attribute = !1), this._$Ei(), this.elementProperties.set(e, t), !t.noAccessor) {
|
|
102
102
|
const n = Symbol(), s = this.getPropertyDescriptor(e, n, t);
|
|
103
103
|
s !== void 0 && yr(this.prototype, e, s);
|
|
@@ -117,7 +117,7 @@ class rt extends HTMLElement {
|
|
|
117
117
|
}, configurable: !0, enumerable: !0 };
|
|
118
118
|
}
|
|
119
119
|
static getPropertyOptions(e) {
|
|
120
|
-
return this.elementProperties.get(e) ??
|
|
120
|
+
return this.elementProperties.get(e) ?? Vi;
|
|
121
121
|
}
|
|
122
122
|
static _$Ei() {
|
|
123
123
|
if (this.hasOwnProperty(wt("elementProperties")))
|
|
@@ -223,7 +223,7 @@ class rt extends HTMLElement {
|
|
|
223
223
|
}
|
|
224
224
|
requestUpdate(e, t, n) {
|
|
225
225
|
if (e !== void 0) {
|
|
226
|
-
if (n ?? (n = this.constructor.getPropertyOptions(e)), !(n.hasChanged ??
|
|
226
|
+
if (n ?? (n = this.constructor.getPropertyOptions(e)), !(n.hasChanged ?? pi)(this[e], t))
|
|
227
227
|
return;
|
|
228
228
|
this.P(e, t, n);
|
|
229
229
|
}
|
|
@@ -301,86 +301,86 @@ class rt extends HTMLElement {
|
|
|
301
301
|
firstUpdated(e) {
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
at.elementStyles = [], at.shadowRootOptions = { mode: "open" }, at[wt("elementProperties")] = /* @__PURE__ */ new Map(), at[wt("finalized")] = /* @__PURE__ */ new Map(), Fi == null || Fi({ ReactiveElement: at }), (ct.reactiveElementVersions ?? (ct.reactiveElementVersions = [])).push("2.0.4");
|
|
305
305
|
/**
|
|
306
306
|
* @license
|
|
307
307
|
* Copyright 2017 Google LLC
|
|
308
308
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
309
309
|
*/
|
|
310
|
-
const cn = globalThis, dn = cn.trustedTypes,
|
|
311
|
-
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
312
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
313
|
-
function
|
|
310
|
+
const cn = globalThis, dn = cn.trustedTypes, qi = dn ? dn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, mi = "$lit$", _e = `lit$${(Math.random() + "").slice(9)}$`, fi = "?" + _e, _r = `<${fi}>`, Ke = document, St = () => Ke.createComment(""), Ct = (i) => i === null || typeof i != "object" && typeof i != "function", ws = Array.isArray, xs = (i) => ws(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Xn = `[
|
|
311
|
+
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ki = /-->/g, Ji = />/g, De = RegExp(`>|${Xn}(?:([^\\s"'>=/]+)(${Xn}*=${Xn}*(?:[^
|
|
312
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Gi = /'/g, Qi = /"/g, ks = /^(?:script|style|textarea|title)$/i, $r = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), z = $r(1), ge = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), Yi = /* @__PURE__ */ new WeakMap(), Be = Ke.createTreeWalker(Ke, 129);
|
|
313
|
+
function _s(i, e) {
|
|
314
314
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
315
315
|
throw Error("invalid template strings array");
|
|
316
|
-
return
|
|
316
|
+
return qi !== void 0 ? qi.createHTML(e) : e;
|
|
317
317
|
}
|
|
318
|
-
const
|
|
318
|
+
const $s = (i, e) => {
|
|
319
319
|
const t = i.length - 1, n = [];
|
|
320
320
|
let s, r = e === 2 ? "<svg>" : "", a = yt;
|
|
321
321
|
for (let o = 0; o < t; o++) {
|
|
322
322
|
const l = i[o];
|
|
323
323
|
let d, h, p = -1, c = 0;
|
|
324
324
|
for (; c < l.length && (a.lastIndex = c, h = a.exec(l), h !== null); )
|
|
325
|
-
c = a.lastIndex, a === yt ? h[1] === "!--" ? a =
|
|
325
|
+
c = a.lastIndex, a === yt ? h[1] === "!--" ? a = Ki : h[1] !== void 0 ? a = Ji : h[2] !== void 0 ? (ks.test(h[2]) && (s = RegExp("</" + h[2], "g")), a = De) : h[3] !== void 0 && (a = De) : a === De ? h[0] === ">" ? (a = s ?? yt, p = -1) : h[1] === void 0 ? p = -2 : (p = a.lastIndex - h[2].length, d = h[1], a = h[3] === void 0 ? De : h[3] === '"' ? Qi : Gi) : a === Qi || a === Gi ? a = De : a === Ki || a === Ji ? a = yt : (a = De, s = void 0);
|
|
326
326
|
const f = a === De && i[o + 1].startsWith("/>") ? " " : "";
|
|
327
|
-
r += a === yt ? l + _r : p >= 0 ? (n.push(d), l.slice(0, p) +
|
|
327
|
+
r += a === yt ? l + _r : p >= 0 ? (n.push(d), l.slice(0, p) + mi + l.slice(p) + _e + f) : l + _e + (p === -2 ? o : f);
|
|
328
328
|
}
|
|
329
|
-
return [
|
|
329
|
+
return [_s(i, r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "")), n];
|
|
330
330
|
};
|
|
331
331
|
class At {
|
|
332
332
|
constructor({ strings: e, _$litType$: t }, n) {
|
|
333
333
|
let s;
|
|
334
334
|
this.parts = [];
|
|
335
335
|
let r = 0, a = 0;
|
|
336
|
-
const o = e.length - 1, l = this.parts, [d, h] =
|
|
337
|
-
if (this.el = At.createElement(d, n),
|
|
336
|
+
const o = e.length - 1, l = this.parts, [d, h] = $s(e, t);
|
|
337
|
+
if (this.el = At.createElement(d, n), Be.currentNode = this.el.content, t === 2) {
|
|
338
338
|
const p = this.el.content.firstChild;
|
|
339
339
|
p.replaceWith(...p.childNodes);
|
|
340
340
|
}
|
|
341
|
-
for (; (s =
|
|
341
|
+
for (; (s = Be.nextNode()) !== null && l.length < o; ) {
|
|
342
342
|
if (s.nodeType === 1) {
|
|
343
343
|
if (s.hasAttributes())
|
|
344
344
|
for (const p of s.getAttributeNames())
|
|
345
|
-
if (p.endsWith(
|
|
346
|
-
const c = h[a++], f = s.getAttribute(p).split(
|
|
347
|
-
l.push({ type: 1, index: r, name: O[2], strings: f, ctor: O[1] === "." ?
|
|
345
|
+
if (p.endsWith(mi)) {
|
|
346
|
+
const c = h[a++], f = s.getAttribute(p).split(_e), O = /([.?@])?(.*)/.exec(c);
|
|
347
|
+
l.push({ type: 1, index: r, name: O[2], strings: f, ctor: O[1] === "." ? Es : O[1] === "?" ? Ss : O[1] === "@" ? Cs : Wt }), s.removeAttribute(p);
|
|
348
348
|
} else
|
|
349
|
-
p.startsWith(
|
|
350
|
-
if (
|
|
351
|
-
const p = s.textContent.split(
|
|
349
|
+
p.startsWith(_e) && (l.push({ type: 6, index: r }), s.removeAttribute(p));
|
|
350
|
+
if (ks.test(s.tagName)) {
|
|
351
|
+
const p = s.textContent.split(_e), c = p.length - 1;
|
|
352
352
|
if (c > 0) {
|
|
353
353
|
s.textContent = dn ? dn.emptyScript : "";
|
|
354
354
|
for (let f = 0; f < c; f++)
|
|
355
|
-
s.append(p[f], St()),
|
|
355
|
+
s.append(p[f], St()), Be.nextNode(), l.push({ type: 2, index: ++r });
|
|
356
356
|
s.append(p[c], St());
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
} else if (s.nodeType === 8)
|
|
360
|
-
if (s.data ===
|
|
360
|
+
if (s.data === fi)
|
|
361
361
|
l.push({ type: 2, index: r });
|
|
362
362
|
else {
|
|
363
363
|
let p = -1;
|
|
364
|
-
for (; (p = s.data.indexOf(
|
|
365
|
-
l.push({ type: 7, index: r }), p +=
|
|
364
|
+
for (; (p = s.data.indexOf(_e, p + 1)) !== -1; )
|
|
365
|
+
l.push({ type: 7, index: r }), p += _e.length - 1;
|
|
366
366
|
}
|
|
367
367
|
r++;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
370
|
static createElement(e, t) {
|
|
371
|
-
const n =
|
|
371
|
+
const n = Ke.createElement("template");
|
|
372
372
|
return n.innerHTML = e, n;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Je(i, e, t = i, n) {
|
|
376
376
|
var s, r;
|
|
377
|
-
if (e ===
|
|
377
|
+
if (e === ge)
|
|
378
378
|
return e;
|
|
379
379
|
let a = n !== void 0 ? (s = t._$Co) == null ? void 0 : s[n] : t._$Cl;
|
|
380
380
|
const o = Ct(e) ? void 0 : e._$litDirective$;
|
|
381
|
-
return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(i), a._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = a : t._$Cl = a), a !== void 0 && (e =
|
|
381
|
+
return (a == null ? void 0 : a.constructor) !== o && ((r = a == null ? void 0 : a._$AO) == null || r.call(a, !1), o === void 0 ? a = void 0 : (a = new o(i), a._$AT(i, t, n)), n !== void 0 ? (t._$Co ?? (t._$Co = []))[n] = a : t._$Cl = a), a !== void 0 && (e = Je(i, a._$AS(i, e.values), a, n)), e;
|
|
382
382
|
}
|
|
383
|
-
let
|
|
383
|
+
let Ts = class {
|
|
384
384
|
constructor(e, t) {
|
|
385
385
|
this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
|
|
386
386
|
}
|
|
@@ -391,17 +391,17 @@ let $s = class {
|
|
|
391
391
|
return this._$AM._$AU;
|
|
392
392
|
}
|
|
393
393
|
u(e) {
|
|
394
|
-
const { el: { content: t }, parts: n } = this._$AD, s = ((e == null ? void 0 : e.creationScope) ??
|
|
395
|
-
|
|
396
|
-
let r =
|
|
394
|
+
const { el: { content: t }, parts: n } = this._$AD, s = ((e == null ? void 0 : e.creationScope) ?? Ke).importNode(t, !0);
|
|
395
|
+
Be.currentNode = s;
|
|
396
|
+
let r = Be.nextNode(), a = 0, o = 0, l = n[0];
|
|
397
397
|
for (; l !== void 0; ) {
|
|
398
398
|
if (a === l.index) {
|
|
399
399
|
let d;
|
|
400
|
-
l.type === 2 ? d = new mt(r, r.nextSibling, this, e) : l.type === 1 ? d = new l.ctor(r, l.name, l.strings, this, e) : l.type === 6 && (d = new
|
|
400
|
+
l.type === 2 ? d = new mt(r, r.nextSibling, this, e) : l.type === 1 ? d = new l.ctor(r, l.name, l.strings, this, e) : l.type === 6 && (d = new As(r, this, e)), this._$AV.push(d), l = n[++o];
|
|
401
401
|
}
|
|
402
|
-
a !== (l == null ? void 0 : l.index) && (r =
|
|
402
|
+
a !== (l == null ? void 0 : l.index) && (r = Be.nextNode(), a++);
|
|
403
403
|
}
|
|
404
|
-
return
|
|
404
|
+
return Be.currentNode = Ke, s;
|
|
405
405
|
}
|
|
406
406
|
p(e) {
|
|
407
407
|
let t = 0;
|
|
@@ -429,7 +429,7 @@ class mt {
|
|
|
429
429
|
return this._$AB;
|
|
430
430
|
}
|
|
431
431
|
_$AI(e, t = this) {
|
|
432
|
-
e =
|
|
432
|
+
e = Je(this, e, t), Ct(e) ? e === q || e == null || e === "" ? (this._$AH !== q && this._$AR(), this._$AH = q) : e !== this._$AH && e !== ge && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : xs(e) ? this.k(e) : this._(e);
|
|
433
433
|
}
|
|
434
434
|
S(e) {
|
|
435
435
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -438,24 +438,24 @@ class mt {
|
|
|
438
438
|
this._$AH !== e && (this._$AR(), this._$AH = this.S(e));
|
|
439
439
|
}
|
|
440
440
|
_(e) {
|
|
441
|
-
this._$AH !== q && Ct(this._$AH) ? this._$AA.nextSibling.data = e : this.T(
|
|
441
|
+
this._$AH !== q && Ct(this._$AH) ? this._$AA.nextSibling.data = e : this.T(Ke.createTextNode(e)), this._$AH = e;
|
|
442
442
|
}
|
|
443
443
|
$(e) {
|
|
444
444
|
var t;
|
|
445
|
-
const { values: n, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = At.createElement(
|
|
445
|
+
const { values: n, _$litType$: s } = e, r = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = At.createElement(_s(s.h, s.h[0]), this.options)), s);
|
|
446
446
|
if (((t = this._$AH) == null ? void 0 : t._$AD) === r)
|
|
447
447
|
this._$AH.p(n);
|
|
448
448
|
else {
|
|
449
|
-
const a = new
|
|
449
|
+
const a = new Ts(r, this), o = a.u(this.options);
|
|
450
450
|
a.p(n), this.T(o), this._$AH = a;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
_$AC(e) {
|
|
454
|
-
let t =
|
|
455
|
-
return t === void 0 &&
|
|
454
|
+
let t = Yi.get(e.strings);
|
|
455
|
+
return t === void 0 && Yi.set(e.strings, t = new At(e)), t;
|
|
456
456
|
}
|
|
457
457
|
k(e) {
|
|
458
|
-
|
|
458
|
+
ws(this._$AH) || (this._$AH = [], this._$AR());
|
|
459
459
|
const t = this._$AH;
|
|
460
460
|
let n, s = 0;
|
|
461
461
|
for (const r of e)
|
|
@@ -488,12 +488,12 @@ class Wt {
|
|
|
488
488
|
const r = this.strings;
|
|
489
489
|
let a = !1;
|
|
490
490
|
if (r === void 0)
|
|
491
|
-
e =
|
|
491
|
+
e = Je(this, e, t, 0), a = !Ct(e) || e !== this._$AH && e !== ge, a && (this._$AH = e);
|
|
492
492
|
else {
|
|
493
493
|
const o = e;
|
|
494
494
|
let l, d;
|
|
495
495
|
for (e = r[0], l = 0; l < r.length - 1; l++)
|
|
496
|
-
d =
|
|
496
|
+
d = Je(this, o[n + l], t, l), d === ge && (d = this._$AH[l]), a || (a = !Ct(d) || d !== this._$AH[l]), d === q ? e = q : e !== q && (e += (d ?? "") + r[l + 1]), this._$AH[l] = d;
|
|
497
497
|
}
|
|
498
498
|
a && !s && this.j(e);
|
|
499
499
|
}
|
|
@@ -501,7 +501,7 @@ class Wt {
|
|
|
501
501
|
e === q ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
let
|
|
504
|
+
let Es = class extends Wt {
|
|
505
505
|
constructor() {
|
|
506
506
|
super(...arguments), this.type = 3;
|
|
507
507
|
}
|
|
@@ -509,7 +509,7 @@ let Ts = class extends Wt {
|
|
|
509
509
|
this.element[this.name] = e === q ? void 0 : e;
|
|
510
510
|
}
|
|
511
511
|
};
|
|
512
|
-
class
|
|
512
|
+
class Ss extends Wt {
|
|
513
513
|
constructor() {
|
|
514
514
|
super(...arguments), this.type = 4;
|
|
515
515
|
}
|
|
@@ -517,12 +517,12 @@ class Es extends Wt {
|
|
|
517
517
|
this.element.toggleAttribute(this.name, !!e && e !== q);
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
-
let
|
|
520
|
+
let Cs = class extends Wt {
|
|
521
521
|
constructor(e, t, n, s, r) {
|
|
522
522
|
super(e, t, n, s, r), this.type = 5;
|
|
523
523
|
}
|
|
524
524
|
_$AI(e, t = this) {
|
|
525
|
-
if ((e =
|
|
525
|
+
if ((e = Je(this, e, t, 0) ?? q) === ge)
|
|
526
526
|
return;
|
|
527
527
|
const n = this._$AH, s = e === q && n !== q || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, r = e !== q && (n === q || s);
|
|
528
528
|
s && this.element.removeEventListener(this.name, this, n), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
@@ -531,7 +531,8 @@ let Ss = class extends Wt {
|
|
|
531
531
|
var t;
|
|
532
532
|
typeof this._$AH == "function" ? this._$AH.call(((t = this.options) == null ? void 0 : t.host) ?? this.element, e) : this._$AH.handleEvent(e);
|
|
533
533
|
}
|
|
534
|
-
}
|
|
534
|
+
};
|
|
535
|
+
class As {
|
|
535
536
|
constructor(e, t, n) {
|
|
536
537
|
this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
|
|
537
538
|
}
|
|
@@ -539,11 +540,11 @@ let Ss = class extends Wt {
|
|
|
539
540
|
return this._$AM._$AU;
|
|
540
541
|
}
|
|
541
542
|
_$AI(e) {
|
|
542
|
-
|
|
543
|
+
Je(this, e);
|
|
543
544
|
}
|
|
544
|
-
}
|
|
545
|
-
const Tr = { P:
|
|
546
|
-
|
|
545
|
+
}
|
|
546
|
+
const Tr = { P: mi, A: _e, C: fi, M: 1, L: $s, R: Ts, D: xs, V: Je, I: mt, H: Wt, N: Ss, U: Cs, B: Es, F: As }, Xi = cn.litHtmlPolyfillSupport;
|
|
547
|
+
Xi == null || Xi(At, mt), (cn.litHtmlVersions ?? (cn.litHtmlVersions = [])).push("3.1.2");
|
|
547
548
|
const Er = (i, e, t) => {
|
|
548
549
|
const n = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
549
550
|
let s = n._$litPart$;
|
|
@@ -558,7 +559,7 @@ const Er = (i, e, t) => {
|
|
|
558
559
|
* Copyright 2017 Google LLC
|
|
559
560
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
560
561
|
*/
|
|
561
|
-
let ne = class extends
|
|
562
|
+
let ne = class extends at {
|
|
562
563
|
constructor() {
|
|
563
564
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
564
565
|
}
|
|
@@ -580,20 +581,20 @@ let ne = class extends rt {
|
|
|
580
581
|
super.disconnectedCallback(), (i = this._$Do) == null || i.setConnected(!1);
|
|
581
582
|
}
|
|
582
583
|
render() {
|
|
583
|
-
return
|
|
584
|
+
return ge;
|
|
584
585
|
}
|
|
585
586
|
};
|
|
586
|
-
var
|
|
587
|
-
ne._$litElement$ = !0, ne.finalized = !0, (
|
|
588
|
-
const
|
|
589
|
-
|
|
587
|
+
var es;
|
|
588
|
+
ne._$litElement$ = !0, ne.finalized = !0, (es = globalThis.litElementHydrateSupport) == null || es.call(globalThis, { LitElement: ne });
|
|
589
|
+
const ts = globalThis.litElementPolyfillSupport;
|
|
590
|
+
ts == null || ts({ LitElement: ne });
|
|
590
591
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.0.4");
|
|
591
592
|
/**
|
|
592
593
|
* @license
|
|
593
594
|
* Copyright 2017 Google LLC
|
|
594
595
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
595
596
|
*/
|
|
596
|
-
const
|
|
597
|
+
const Ee = (i) => (e, t) => {
|
|
597
598
|
t !== void 0 ? t.addInitializer(() => {
|
|
598
599
|
customElements.define(i, e);
|
|
599
600
|
}) : customElements.define(i, e);
|
|
@@ -603,7 +604,7 @@ const Te = (i) => (e, t) => {
|
|
|
603
604
|
* Copyright 2017 Google LLC
|
|
604
605
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
605
606
|
*/
|
|
606
|
-
const Sr = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged:
|
|
607
|
+
const Sr = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: pi }, Cr = (i = Sr, e, t) => {
|
|
607
608
|
const { kind: n, metadata: s } = t;
|
|
608
609
|
let r = globalThis.litPropertyMetadata.get(s);
|
|
609
610
|
if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), r.set(t.name, i), n === "accessor") {
|
|
@@ -635,13 +636,13 @@ function V(i) {
|
|
|
635
636
|
* Copyright 2017 Google LLC
|
|
636
637
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
637
638
|
*/
|
|
638
|
-
const
|
|
639
|
+
const ns = (i, e, t) => (t.configurable = !0, t.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(i, e, t), t);
|
|
639
640
|
/**
|
|
640
641
|
* @license
|
|
641
642
|
* Copyright 2017 Google LLC
|
|
642
643
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
643
644
|
*/
|
|
644
|
-
function
|
|
645
|
+
function An(i, e) {
|
|
645
646
|
return (t, n, s) => {
|
|
646
647
|
const r = (a) => {
|
|
647
648
|
var o;
|
|
@@ -656,12 +657,12 @@ function As(i, e) {
|
|
|
656
657
|
this[l] = d;
|
|
657
658
|
} };
|
|
658
659
|
})();
|
|
659
|
-
return
|
|
660
|
+
return ns(t, n, { get() {
|
|
660
661
|
let l = a.call(this);
|
|
661
662
|
return l === void 0 && (l = r(this), (l !== null || this.hasUpdated) && o.call(this, l)), l;
|
|
662
663
|
} });
|
|
663
664
|
}
|
|
664
|
-
return
|
|
665
|
+
return ns(t, n, { get() {
|
|
665
666
|
return r(this);
|
|
666
667
|
} });
|
|
667
668
|
};
|
|
@@ -671,8 +672,8 @@ function As(i, e) {
|
|
|
671
672
|
* Copyright 2017 Google LLC
|
|
672
673
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
673
674
|
*/
|
|
674
|
-
const
|
|
675
|
-
class
|
|
675
|
+
const In = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, On = (i) => (...e) => ({ _$litDirective$: i, values: e });
|
|
676
|
+
class Mn {
|
|
676
677
|
constructor(e) {
|
|
677
678
|
}
|
|
678
679
|
get _$AU() {
|
|
@@ -688,17 +689,17 @@ class On {
|
|
|
688
689
|
return this.render(...t);
|
|
689
690
|
}
|
|
690
691
|
}
|
|
691
|
-
const Ee = tt`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3\\/5{width:60%}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[90vw\\]{max-width:90vw}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.resize{resize:both}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-0{padding:0}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-8{padding-bottom:2rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #3B82F6);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}h1{font-size:1.5em}h2{font-size:1.17em}h3{font-size:1em}ol,ul{display:flex;flex-direction:column;padding:0;margin-left:20px;gap:8px}ol{list-style-type:decimal}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:bg-gray-200:disabled{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\\:bottom-8{bottom:2rem}.md\\:left-8{left:2rem}.md\\:right-8{right:2rem}.md\\:flex{display:flex}.md\\:h-\\[500px\\]{height:500px}.md\\:h-fit{height:-moz-fit-content;height:fit-content}.md\\:w-\\[350px\\]{width:350px}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:p-0{padding:0}.md\\:px-0{padding-left:0;padding-right:0}.md\\:pb-0{padding-bottom:0}}`;
|
|
692
|
+
const Se = nt`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: \"\"}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol,\"Noto Color Emoji\";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-8{bottom:2rem}.left-0{left:0}.left-8{left:2rem}.right-0{right:0}.right-8{right:2rem}.top-0{top:0}.z-50{z-index:50}.m-0{margin:0}.m-0\\.5{margin:.125rem}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-auto{margin-top:auto;margin-bottom:auto}.mb-1{margin-bottom:.25rem}.mb-\\[-8px\\]{margin-bottom:-8px}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-20{margin-left:5rem}.mr-2{margin-right:.5rem}.mr-20{margin-right:5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.hidden{display:none}.h-0{height:0px}.h-2{height:.5rem}.h-2\\.5{height:.625rem}.h-3\\/5{height:60%}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-9{height:2.25rem}.h-fit{height:-moz-fit-content;height:fit-content}.h-full{height:100%}.max-h-20{max-height:5rem}.max-h-\\[90vh\\]{max-height:90vh}.w-0{width:0px}.w-2{width:.5rem}.w-2\\.5{width:.625rem}.w-3\\/5{width:60%}.w-5{width:1.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-\\[90vw\\]{max-width:90vw}.flex-1{flex:1 1 0%}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-mandatory{--tw-scroll-snap-strictness: mandatory}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-t-lg{border-top-left-radius:.5rem;border-top-right-radius:.5rem}.border{border-width:1px}.border-x-8{border-left-width:8px;border-right-width:8px}.border-t-8{border-top-width:8px}.border-white{--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}.border-x-transparent{border-left-color:transparent;border-right-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.p-0{padding:0}.p-2{padding:.5rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.px-0{padding-left:0;padding-right:0}.px-4{padding-left:1rem;padding-right:1rem}.px-8{padding-left:2rem;padding-right:2rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-0{padding-bottom:0}.pb-8{padding-bottom:2rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}:host{font-size:16px;line-height:1.2;color:#000;text-align:left;--iai-chat-i-primary-color: var(--iai-chat-primary-color, #0B64F4);--iai-chat-i-text-color: var(--iai-chat-text-color, #FFF);--iai-chat-i-header-bg: var(--iai-chat-header-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-header-fg: var(--iai-chat-header-text-color, var(--iai-chat-i-text-color));--iai-chat-i-button-bg: var(--iai-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-button-fg: var(--iai-chat-button-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-user-bg: var(--iai-chat-messages-user-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-message-user-fg: var(--iai-chat-messages-user-text-color, var(--iai-chat-i-text-color));--iai-chat-i-message-assistant-bg: var(--iai-chat-messages-assistant-background-color, #6B7280);--iai-chat-i-message-assistant-fg: var(--iai-chat-messages-assistant-text-color, var(--iai-chat-i-text-color));--iai-chat-i-ocb-bg: var(--iai-chat-open-chat-button-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-ocb-fg: var(--iai-chat-open-chat-button-icon-color, var(--iai-chat-i-text-color));--iai-chat-i-iframe-modal-header-bg: var(--iai-chat-iframe-modal-background-color, var(--iai-chat-i-primary-color));--iai-chat-i-iframe-modal-header-fg: var(--iai-chat-iframe-modal-text-color, var(--iai-chat-i-text-color))}input{background-color:#fff}h1{font-size:1.5em}h2{font-size:1.17em}h3{font-size:1em}ol,ul{display:flex;flex-direction:column;padding:0;margin-left:20px;gap:8px}ol{list-style-type:decimal}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\\:bg-gray-200:disabled{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}@media (min-width: 768px){.md\\:bottom-8{bottom:2rem}.md\\:left-8{left:2rem}.md\\:right-8{right:2rem}.md\\:flex{display:flex}.md\\:h-\\[500px\\]{height:500px}.md\\:h-fit{height:-moz-fit-content;height:fit-content}.md\\:w-\\[350px\\]{width:350px}.md\\:w-fit{width:-moz-fit-content;width:fit-content}.md\\:p-0{padding:0}.md\\:px-0{padding-left:0;padding-right:0}.md\\:pb-0{padding-bottom:0}}`;
|
|
692
693
|
/**
|
|
693
694
|
* @license
|
|
694
695
|
* Copyright 2020 Google LLC
|
|
695
696
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
696
697
|
*/
|
|
697
|
-
const { I: Ar } = Tr,
|
|
698
|
+
const { I: Ar } = Tr, is = () => document.createComment(""), vt = (i, e, t) => {
|
|
698
699
|
var n;
|
|
699
700
|
const s = i._$AA.parentNode, r = e === void 0 ? i._$AB : e._$AA;
|
|
700
701
|
if (t === void 0) {
|
|
701
|
-
const a = s.insertBefore(
|
|
702
|
+
const a = s.insertBefore(is(), r), o = s.insertBefore(is(), r);
|
|
702
703
|
t = new Ar(a, o, i, i.options);
|
|
703
704
|
} else {
|
|
704
705
|
const a = t._$AB.nextSibling, o = t._$AM, l = o !== i;
|
|
@@ -715,7 +716,7 @@ const { I: Ar } = Tr, ns = () => document.createComment(""), vt = (i, e, t) => {
|
|
|
715
716
|
}
|
|
716
717
|
}
|
|
717
718
|
return t;
|
|
718
|
-
}, Ue = (i, e, t = i) => (i._$AI(e, t), i), Ir = {}, Or = (i, e = Ir) => i._$AH = e,
|
|
719
|
+
}, Ue = (i, e, t = i) => (i._$AI(e, t), i), Ir = {}, Or = (i, e = Ir) => i._$AH = e, Mr = (i) => i._$AH, ei = (i) => {
|
|
719
720
|
var e;
|
|
720
721
|
(e = i._$AP) == null || e.call(i, !1, !0);
|
|
721
722
|
let t = i._$AA;
|
|
@@ -730,14 +731,14 @@ const { I: Ar } = Tr, ns = () => document.createComment(""), vt = (i, e, t) => {
|
|
|
730
731
|
* Copyright 2017 Google LLC
|
|
731
732
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
732
733
|
*/
|
|
733
|
-
const
|
|
734
|
+
const ss = (i, e, t) => {
|
|
734
735
|
const n = /* @__PURE__ */ new Map();
|
|
735
736
|
for (let s = e; s <= t; s++)
|
|
736
737
|
n.set(i[s], s);
|
|
737
738
|
return n;
|
|
738
|
-
}, Is =
|
|
739
|
+
}, Is = On(class extends Mn {
|
|
739
740
|
constructor(i) {
|
|
740
|
-
if (super(i), i.type !==
|
|
741
|
+
if (super(i), i.type !== In.CHILD)
|
|
741
742
|
throw Error("repeat() can only be used in text expressions");
|
|
742
743
|
}
|
|
743
744
|
dt(i, e, t) {
|
|
@@ -753,7 +754,7 @@ const is = (i, e, t) => {
|
|
|
753
754
|
return this.dt(i, e, t).values;
|
|
754
755
|
}
|
|
755
756
|
update(i, [e, t, n]) {
|
|
756
|
-
const s =
|
|
757
|
+
const s = Mr(i), { values: r, keys: a } = this.dt(e, t, n);
|
|
757
758
|
if (!Array.isArray(s))
|
|
758
759
|
return this.ut = a, r;
|
|
759
760
|
const o = this.ut ?? (this.ut = []), l = [];
|
|
@@ -771,38 +772,38 @@ const is = (i, e, t) => {
|
|
|
771
772
|
l[O] = Ue(s[p], r[O]), vt(i, l[O + 1], s[p]), p++, O--;
|
|
772
773
|
else if (o[c] === a[f])
|
|
773
774
|
l[f] = Ue(s[c], r[f]), vt(i, s[p], s[c]), c--, f++;
|
|
774
|
-
else if (d === void 0 && (d =
|
|
775
|
+
else if (d === void 0 && (d = ss(a, f, O), h = ss(o, p, c)), d.has(o[p]))
|
|
775
776
|
if (d.has(o[c])) {
|
|
776
|
-
const
|
|
777
|
+
const H = h.get(a[f]), J = H !== void 0 ? s[H] : null;
|
|
777
778
|
if (J === null) {
|
|
778
779
|
const Ce = vt(i, s[p]);
|
|
779
780
|
Ue(Ce, r[f]), l[f] = Ce;
|
|
780
781
|
} else
|
|
781
|
-
l[f] = Ue(J, r[f]), vt(i, s[p], J), s[
|
|
782
|
+
l[f] = Ue(J, r[f]), vt(i, s[p], J), s[H] = null;
|
|
782
783
|
f++;
|
|
783
784
|
} else
|
|
784
|
-
|
|
785
|
+
ei(s[c]), c--;
|
|
785
786
|
else
|
|
786
|
-
|
|
787
|
+
ei(s[p]), p++;
|
|
787
788
|
for (; f <= O; ) {
|
|
788
|
-
const
|
|
789
|
-
Ue(
|
|
789
|
+
const H = vt(i, l[O + 1]);
|
|
790
|
+
Ue(H, r[f]), l[f++] = H;
|
|
790
791
|
}
|
|
791
792
|
for (; p <= c; ) {
|
|
792
|
-
const
|
|
793
|
-
|
|
793
|
+
const H = s[p++];
|
|
794
|
+
H !== null && ei(H);
|
|
794
795
|
}
|
|
795
|
-
return this.ut = a, Or(i, l),
|
|
796
|
+
return this.ut = a, Or(i, l), ge;
|
|
796
797
|
}
|
|
797
798
|
});
|
|
798
|
-
var
|
|
799
|
+
var Rr = Object.defineProperty, Pr = (i, e, t) => e in i ? Rr(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, W = (i, e, t) => (Pr(i, typeof e != "symbol" ? e + "" : e, t), t), Nr = (i, e, t) => {
|
|
799
800
|
if (!e.has(i))
|
|
800
801
|
throw TypeError("Cannot " + t);
|
|
801
|
-
},
|
|
802
|
+
}, rs = (i, e, t) => {
|
|
802
803
|
if (e.has(i))
|
|
803
804
|
throw TypeError("Cannot add the same private member more than once");
|
|
804
805
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
805
|
-
},
|
|
806
|
+
}, ni = (i, e, t) => (Nr(i, e, "access private method"), t);
|
|
806
807
|
function jr(i) {
|
|
807
808
|
if (Array.isArray(i)) {
|
|
808
809
|
for (var e = 0, t = Array(i.length); e < i.length; e++)
|
|
@@ -811,22 +812,22 @@ function jr(i) {
|
|
|
811
812
|
} else
|
|
812
813
|
return Array.from(i);
|
|
813
814
|
}
|
|
814
|
-
var
|
|
815
|
+
var gi = !1;
|
|
815
816
|
if (typeof window < "u") {
|
|
816
|
-
var
|
|
817
|
+
var as = {
|
|
817
818
|
get passive() {
|
|
818
|
-
|
|
819
|
+
gi = !0;
|
|
819
820
|
}
|
|
820
821
|
};
|
|
821
|
-
window.addEventListener("testPassive", null,
|
|
822
|
+
window.addEventListener("testPassive", null, as), window.removeEventListener("testPassive", null, as);
|
|
822
823
|
}
|
|
823
|
-
var hn = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Fe = [], un = !1, Os = -1, xt = void 0,
|
|
824
|
+
var hn = typeof window < "u" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === "MacIntel" && window.navigator.maxTouchPoints > 1), Fe = [], un = !1, Os = -1, xt = void 0, He = void 0, kt = void 0, Ms = function(i) {
|
|
824
825
|
return Fe.some(function(e) {
|
|
825
826
|
return !!(e.options.allowTouchMove && e.options.allowTouchMove(i));
|
|
826
827
|
});
|
|
827
|
-
},
|
|
828
|
+
}, yi = function(i) {
|
|
828
829
|
var e = i || window.event;
|
|
829
|
-
return
|
|
830
|
+
return Ms(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
|
|
830
831
|
}, zr = function(i) {
|
|
831
832
|
if (kt === void 0) {
|
|
832
833
|
var e = !!i && i.reserveScrollBarGap === !0, t = window.innerWidth - document.documentElement.clientWidth;
|
|
@@ -840,8 +841,8 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
840
841
|
kt !== void 0 && (document.body.style.paddingRight = kt, kt = void 0), xt !== void 0 && (document.body.style.overflow = xt, xt = void 0);
|
|
841
842
|
}, Lr = function() {
|
|
842
843
|
return window.requestAnimationFrame(function() {
|
|
843
|
-
if (
|
|
844
|
-
|
|
844
|
+
if (He === void 0) {
|
|
845
|
+
He = {
|
|
845
846
|
position: document.body.style.position,
|
|
846
847
|
top: document.body.style.top,
|
|
847
848
|
left: document.body.style.left
|
|
@@ -856,16 +857,16 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
856
857
|
}
|
|
857
858
|
});
|
|
858
859
|
}, Dr = function() {
|
|
859
|
-
if (
|
|
860
|
+
if (He !== void 0) {
|
|
860
861
|
var i = -parseInt(document.body.style.top, 10), e = -parseInt(document.body.style.left, 10);
|
|
861
|
-
document.body.style.position =
|
|
862
|
+
document.body.style.position = He.position, document.body.style.top = He.top, document.body.style.left = He.left, window.scrollTo(e, i), He = void 0;
|
|
862
863
|
}
|
|
863
864
|
}, Ur = function(i) {
|
|
864
865
|
return i ? i.scrollHeight - i.scrollTop <= i.clientHeight : !1;
|
|
865
|
-
}, Br = function(i, e) {
|
|
866
|
-
var t = i.targetTouches[0].clientY - Os;
|
|
867
|
-
return Rs(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Ur(e) && t < 0 ? gi(i) : (i.stopPropagation(), !0);
|
|
868
866
|
}, Hr = function(i, e) {
|
|
867
|
+
var t = i.targetTouches[0].clientY - Os;
|
|
868
|
+
return Ms(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Ur(e) && t < 0 ? yi(i) : (i.stopPropagation(), !0);
|
|
869
|
+
}, Br = function(i, e) {
|
|
869
870
|
if (!i) {
|
|
870
871
|
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
871
872
|
return;
|
|
@@ -880,17 +881,17 @@ var hn = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
880
881
|
Fe = [].concat(jr(Fe), [t]), hn ? Lr() : zr(e), hn && (i.ontouchstart = function(n) {
|
|
881
882
|
n.targetTouches.length === 1 && (Os = n.targetTouches[0].clientY);
|
|
882
883
|
}, i.ontouchmove = function(n) {
|
|
883
|
-
n.targetTouches.length === 1 &&
|
|
884
|
-
}, un || (document.addEventListener("touchmove",
|
|
884
|
+
n.targetTouches.length === 1 && Hr(n, i);
|
|
885
|
+
}, un || (document.addEventListener("touchmove", yi, gi ? { passive: !1 } : void 0), un = !0));
|
|
885
886
|
}
|
|
886
|
-
},
|
|
887
|
+
}, os = function(i) {
|
|
887
888
|
if (!i) {
|
|
888
889
|
console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");
|
|
889
890
|
return;
|
|
890
891
|
}
|
|
891
892
|
Fe = Fe.filter(function(e) {
|
|
892
893
|
return e.targetElement !== i;
|
|
893
|
-
}), hn && (i.ontouchstart = null, i.ontouchmove = null, un && Fe.length === 0 && (document.removeEventListener("touchmove",
|
|
894
|
+
}), hn && (i.ontouchstart = null, i.ontouchmove = null, un && Fe.length === 0 && (document.removeEventListener("touchmove", yi, gi ? { passive: !1 } : void 0), un = !1)), hn ? Dr() : Zr();
|
|
894
895
|
};
|
|
895
896
|
/**
|
|
896
897
|
* @license
|
|
@@ -905,10 +906,10 @@ function ft(i) {
|
|
|
905
906
|
* Copyright 2018 Google LLC
|
|
906
907
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
907
908
|
*/
|
|
908
|
-
const
|
|
909
|
+
const ls = On(class extends Mn {
|
|
909
910
|
constructor(i) {
|
|
910
911
|
var e;
|
|
911
|
-
if (super(i), i.type !==
|
|
912
|
+
if (super(i), i.type !== In.ATTRIBUTE || i.name !== "class" || ((e = i.strings) == null ? void 0 : e.length) > 2)
|
|
912
913
|
throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
|
|
913
914
|
}
|
|
914
915
|
render(i) {
|
|
@@ -929,7 +930,7 @@ const os = In(class extends On {
|
|
|
929
930
|
const a = !!e[r];
|
|
930
931
|
a === this.st.has(r) || (n = this.nt) != null && n.has(r) || (a ? (s.add(r), this.st.add(r)) : (s.remove(r), this.st.delete(r)));
|
|
931
932
|
}
|
|
932
|
-
return
|
|
933
|
+
return ge;
|
|
933
934
|
}
|
|
934
935
|
});
|
|
935
936
|
/**
|
|
@@ -937,10 +938,10 @@ const os = In(class extends On {
|
|
|
937
938
|
* Copyright 2018 Google LLC
|
|
938
939
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
939
940
|
*/
|
|
940
|
-
const
|
|
941
|
+
const Rs = "important", Wr = " !" + Rs, Ve = On(class extends Mn {
|
|
941
942
|
constructor(i) {
|
|
942
943
|
var e;
|
|
943
|
-
if (super(i), i.type !==
|
|
944
|
+
if (super(i), i.type !== In.ATTRIBUTE || i.name !== "style" || ((e = i.strings) == null ? void 0 : e.length) > 2)
|
|
944
945
|
throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
945
946
|
}
|
|
946
947
|
render(i) {
|
|
@@ -960,24 +961,24 @@ const Ms = "important", Wr = " !" + Ms, ot = In(class extends On {
|
|
|
960
961
|
if (s != null) {
|
|
961
962
|
this.ft.add(n);
|
|
962
963
|
const r = typeof s == "string" && s.endsWith(Wr);
|
|
963
|
-
n.includes("-") || r ? t.setProperty(n, r ? s.slice(0, -11) : s, r ?
|
|
964
|
+
n.includes("-") || r ? t.setProperty(n, r ? s.slice(0, -11) : s, r ? Rs : "") : t[n] = s;
|
|
964
965
|
}
|
|
965
966
|
}
|
|
966
|
-
return
|
|
967
|
+
return ge;
|
|
967
968
|
}
|
|
968
969
|
});
|
|
969
970
|
function Fr(i) {
|
|
970
971
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
971
972
|
}
|
|
972
|
-
var
|
|
973
|
+
var vi = {};
|
|
973
974
|
(function(i) {
|
|
974
975
|
function e(o) {
|
|
975
976
|
o && o.options && clearTimeout(o.options.timer);
|
|
976
977
|
}
|
|
977
978
|
function t(o, l, d, h) {
|
|
978
979
|
var p = { timer: void 0, lastArgs: [] }, c = function() {
|
|
979
|
-
for (var f = this, O = [],
|
|
980
|
-
O[
|
|
980
|
+
for (var f = this, O = [], H = 0; H < arguments.length; H++)
|
|
981
|
+
O[H] = arguments[H];
|
|
981
982
|
p.lastArgs = O, p.timer ? clearTimeout(p.timer) : l && d.apply(this, p.lastArgs), p.timer = setTimeout(function() {
|
|
982
983
|
l || d.apply(f, p.lastArgs), p.timer = void 0;
|
|
983
984
|
}, o);
|
|
@@ -1024,7 +1025,7 @@ var yi = {};
|
|
|
1024
1025
|
return r.apply(void 0, [d, h].concat(o));
|
|
1025
1026
|
}
|
|
1026
1027
|
Object.defineProperty(i, "__esModule", { value: !0 }), i.cancel = e, i.debounce = a;
|
|
1027
|
-
})(
|
|
1028
|
+
})(vi);
|
|
1028
1029
|
var N;
|
|
1029
1030
|
(function(i) {
|
|
1030
1031
|
i.assertEqual = (s) => s;
|
|
@@ -1061,14 +1062,14 @@ var N;
|
|
|
1061
1062
|
}
|
|
1062
1063
|
i.joinValues = n, i.jsonStringifyReplacer = (s, r) => typeof r == "bigint" ? r.toString() : r;
|
|
1063
1064
|
})(N || (N = {}));
|
|
1064
|
-
var
|
|
1065
|
+
var ii;
|
|
1065
1066
|
(function(i) {
|
|
1066
1067
|
i.mergeShapes = (e, t) => ({
|
|
1067
1068
|
...e,
|
|
1068
1069
|
...t
|
|
1069
1070
|
// second overwrites first
|
|
1070
1071
|
});
|
|
1071
|
-
})(
|
|
1072
|
+
})(ii || (ii = {}));
|
|
1072
1073
|
const g = N.arrayToEnum([
|
|
1073
1074
|
"string",
|
|
1074
1075
|
"nan",
|
|
@@ -1090,7 +1091,7 @@ const g = N.arrayToEnum([
|
|
|
1090
1091
|
"never",
|
|
1091
1092
|
"map",
|
|
1092
1093
|
"set"
|
|
1093
|
-
]),
|
|
1094
|
+
]), Me = (i) => {
|
|
1094
1095
|
switch (typeof i) {
|
|
1095
1096
|
case "undefined":
|
|
1096
1097
|
return g.undefined;
|
|
@@ -1129,7 +1130,7 @@ const g = N.arrayToEnum([
|
|
|
1129
1130
|
"not_multiple_of",
|
|
1130
1131
|
"not_finite"
|
|
1131
1132
|
]), Vr = (i) => JSON.stringify(i, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
1132
|
-
class
|
|
1133
|
+
class le extends Error {
|
|
1133
1134
|
constructor(e) {
|
|
1134
1135
|
super(), this.issues = [], this.addIssue = (n) => {
|
|
1135
1136
|
this.issues = [...this.issues, n];
|
|
@@ -1184,7 +1185,7 @@ class oe extends Error {
|
|
|
1184
1185
|
return this.flatten();
|
|
1185
1186
|
}
|
|
1186
1187
|
}
|
|
1187
|
-
|
|
1188
|
+
le.create = (i) => new le(i);
|
|
1188
1189
|
const It = (i, e) => {
|
|
1189
1190
|
let t;
|
|
1190
1191
|
switch (i.code) {
|
|
@@ -1319,12 +1320,12 @@ class Y {
|
|
|
1319
1320
|
}
|
|
1320
1321
|
const S = Object.freeze({
|
|
1321
1322
|
status: "aborted"
|
|
1322
|
-
}), Ns = (i) => ({ status: "dirty", value: i }), ee = (i) => ({ status: "valid", value: i }),
|
|
1323
|
+
}), Ns = (i) => ({ status: "dirty", value: i }), ee = (i) => ({ status: "valid", value: i }), si = (i) => i.status === "aborted", ri = (i) => i.status === "dirty", Ot = (i) => i.status === "valid", fn = (i) => typeof Promise < "u" && i instanceof Promise;
|
|
1323
1324
|
var x;
|
|
1324
1325
|
(function(i) {
|
|
1325
1326
|
i.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, i.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
1326
1327
|
})(x || (x = {}));
|
|
1327
|
-
class
|
|
1328
|
+
class ye {
|
|
1328
1329
|
constructor(e, t, n, s) {
|
|
1329
1330
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = s;
|
|
1330
1331
|
}
|
|
@@ -1332,7 +1333,7 @@ class ge {
|
|
|
1332
1333
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
1333
1334
|
}
|
|
1334
1335
|
}
|
|
1335
|
-
const
|
|
1336
|
+
const cs = (i, e) => {
|
|
1336
1337
|
if (Ot(e))
|
|
1337
1338
|
return { success: !0, data: e.value };
|
|
1338
1339
|
if (!i.common.issues.length)
|
|
@@ -1342,7 +1343,7 @@ const ls = (i, e) => {
|
|
|
1342
1343
|
get error() {
|
|
1343
1344
|
if (this._error)
|
|
1344
1345
|
return this._error;
|
|
1345
|
-
const t = new
|
|
1346
|
+
const t = new le(i.common.issues);
|
|
1346
1347
|
return this._error = t, this._error;
|
|
1347
1348
|
}
|
|
1348
1349
|
};
|
|
@@ -1363,13 +1364,13 @@ class I {
|
|
|
1363
1364
|
return this._def.description;
|
|
1364
1365
|
}
|
|
1365
1366
|
_getType(e) {
|
|
1366
|
-
return
|
|
1367
|
+
return Me(e.data);
|
|
1367
1368
|
}
|
|
1368
1369
|
_getOrReturnCtx(e, t) {
|
|
1369
1370
|
return t || {
|
|
1370
1371
|
common: e.parent.common,
|
|
1371
1372
|
data: e.data,
|
|
1372
|
-
parsedType:
|
|
1373
|
+
parsedType: Me(e.data),
|
|
1373
1374
|
schemaErrorMap: this._def.errorMap,
|
|
1374
1375
|
path: e.path,
|
|
1375
1376
|
parent: e.parent
|
|
@@ -1381,7 +1382,7 @@ class I {
|
|
|
1381
1382
|
ctx: {
|
|
1382
1383
|
common: e.parent.common,
|
|
1383
1384
|
data: e.data,
|
|
1384
|
-
parsedType:
|
|
1385
|
+
parsedType: Me(e.data),
|
|
1385
1386
|
schemaErrorMap: this._def.errorMap,
|
|
1386
1387
|
path: e.path,
|
|
1387
1388
|
parent: e.parent
|
|
@@ -1416,9 +1417,9 @@ class I {
|
|
|
1416
1417
|
schemaErrorMap: this._def.errorMap,
|
|
1417
1418
|
parent: null,
|
|
1418
1419
|
data: e,
|
|
1419
|
-
parsedType:
|
|
1420
|
+
parsedType: Me(e)
|
|
1420
1421
|
}, r = this._parseSync({ data: e, path: s.path, parent: s });
|
|
1421
|
-
return
|
|
1422
|
+
return cs(s, r);
|
|
1422
1423
|
}
|
|
1423
1424
|
async parseAsync(e, t) {
|
|
1424
1425
|
const n = await this.safeParseAsync(e, t);
|
|
@@ -1437,9 +1438,9 @@ class I {
|
|
|
1437
1438
|
schemaErrorMap: this._def.errorMap,
|
|
1438
1439
|
parent: null,
|
|
1439
1440
|
data: e,
|
|
1440
|
-
parsedType:
|
|
1441
|
+
parsedType: Me(e)
|
|
1441
1442
|
}, s = this._parse({ data: e, path: n.path, parent: n }), r = await (fn(s) ? s : Promise.resolve(s));
|
|
1442
|
-
return
|
|
1443
|
+
return cs(n, r);
|
|
1443
1444
|
}
|
|
1444
1445
|
refine(e, t) {
|
|
1445
1446
|
const n = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
|
|
@@ -1455,7 +1456,7 @@ class I {
|
|
|
1455
1456
|
return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof t == "function" ? t(n, s) : t), !1));
|
|
1456
1457
|
}
|
|
1457
1458
|
_refinement(e) {
|
|
1458
|
-
return new
|
|
1459
|
+
return new de({
|
|
1459
1460
|
schema: this,
|
|
1460
1461
|
typeName: T.ZodEffects,
|
|
1461
1462
|
effect: { type: "refinement", refinement: e }
|
|
@@ -1465,16 +1466,16 @@ class I {
|
|
|
1465
1466
|
return this._refinement(e);
|
|
1466
1467
|
}
|
|
1467
1468
|
optional() {
|
|
1468
|
-
return
|
|
1469
|
+
return $e.create(this, this._def);
|
|
1469
1470
|
}
|
|
1470
1471
|
nullable() {
|
|
1471
|
-
return
|
|
1472
|
+
return Ye.create(this, this._def);
|
|
1472
1473
|
}
|
|
1473
1474
|
nullish() {
|
|
1474
1475
|
return this.nullable().optional();
|
|
1475
1476
|
}
|
|
1476
1477
|
array() {
|
|
1477
|
-
return
|
|
1478
|
+
return ce.create(this, this._def);
|
|
1478
1479
|
}
|
|
1479
1480
|
promise() {
|
|
1480
1481
|
return ht.create(this, this._def);
|
|
@@ -1486,7 +1487,7 @@ class I {
|
|
|
1486
1487
|
return jt.create(this, e, this._def);
|
|
1487
1488
|
}
|
|
1488
1489
|
transform(e) {
|
|
1489
|
-
return new
|
|
1490
|
+
return new de({
|
|
1490
1491
|
...A(this._def),
|
|
1491
1492
|
schema: this,
|
|
1492
1493
|
typeName: T.ZodEffects,
|
|
@@ -1539,12 +1540,12 @@ class I {
|
|
|
1539
1540
|
}
|
|
1540
1541
|
}
|
|
1541
1542
|
const Jr = /^c[^\s-]{8,}$/i, Gr = /^[a-z][a-z0-9]*$/, Qr = /^[0-9A-HJKMNP-TV-Z]{26}$/, Yr = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Xr = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ea = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1542
|
-
let
|
|
1543
|
+
let ti;
|
|
1543
1544
|
const ta = /^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/, na = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, ia = (i) => i.precision ? i.offset ? new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`) : new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${i.precision}}Z$`) : i.precision === 0 ? i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$") : i.offset ? new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$") : new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");
|
|
1544
1545
|
function sa(i, e) {
|
|
1545
1546
|
return !!((e === "v4" || !e) && ta.test(i) || (e === "v6" || !e) && na.test(i));
|
|
1546
1547
|
}
|
|
1547
|
-
class
|
|
1548
|
+
class oe extends I {
|
|
1548
1549
|
_parse(e) {
|
|
1549
1550
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== g.string) {
|
|
1550
1551
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1603,7 +1604,7 @@ class ae extends I {
|
|
|
1603
1604
|
message: s.message
|
|
1604
1605
|
}), t.dirty());
|
|
1605
1606
|
else if (s.kind === "emoji")
|
|
1606
|
-
|
|
1607
|
+
ti || (ti = new RegExp(ea, "u")), ti.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1607
1608
|
validation: "emoji",
|
|
1608
1609
|
code: m.invalid_string,
|
|
1609
1610
|
message: s.message
|
|
@@ -1678,7 +1679,7 @@ class ae extends I {
|
|
|
1678
1679
|
});
|
|
1679
1680
|
}
|
|
1680
1681
|
_addCheck(e) {
|
|
1681
|
-
return new
|
|
1682
|
+
return new oe({
|
|
1682
1683
|
...this._def,
|
|
1683
1684
|
checks: [...this._def.checks, e]
|
|
1684
1685
|
});
|
|
@@ -1779,19 +1780,19 @@ class ae extends I {
|
|
|
1779
1780
|
return this.min(1, x.errToObj(e));
|
|
1780
1781
|
}
|
|
1781
1782
|
trim() {
|
|
1782
|
-
return new
|
|
1783
|
+
return new oe({
|
|
1783
1784
|
...this._def,
|
|
1784
1785
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
1785
1786
|
});
|
|
1786
1787
|
}
|
|
1787
1788
|
toLowerCase() {
|
|
1788
|
-
return new
|
|
1789
|
+
return new oe({
|
|
1789
1790
|
...this._def,
|
|
1790
1791
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
1791
1792
|
});
|
|
1792
1793
|
}
|
|
1793
1794
|
toUpperCase() {
|
|
1794
|
-
return new
|
|
1795
|
+
return new oe({
|
|
1795
1796
|
...this._def,
|
|
1796
1797
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
1797
1798
|
});
|
|
@@ -1836,9 +1837,9 @@ class ae extends I {
|
|
|
1836
1837
|
return e;
|
|
1837
1838
|
}
|
|
1838
1839
|
}
|
|
1839
|
-
|
|
1840
|
+
oe.create = (i) => {
|
|
1840
1841
|
var e;
|
|
1841
|
-
return new
|
|
1842
|
+
return new oe({
|
|
1842
1843
|
checks: [],
|
|
1843
1844
|
typeName: T.ZodString,
|
|
1844
1845
|
coerce: (e = i == null ? void 0 : i.coerce) !== null && e !== void 0 ? e : !1,
|
|
@@ -2149,7 +2150,7 @@ Ne.create = (i) => {
|
|
|
2149
2150
|
...A(i)
|
|
2150
2151
|
});
|
|
2151
2152
|
};
|
|
2152
|
-
class
|
|
2153
|
+
class Mt extends I {
|
|
2153
2154
|
_parse(e) {
|
|
2154
2155
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== g.boolean) {
|
|
2155
2156
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2162,12 +2163,12 @@ class Rt extends I {
|
|
|
2162
2163
|
return ee(e.data);
|
|
2163
2164
|
}
|
|
2164
2165
|
}
|
|
2165
|
-
|
|
2166
|
+
Mt.create = (i) => new Mt({
|
|
2166
2167
|
typeName: T.ZodBoolean,
|
|
2167
2168
|
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
2168
2169
|
...A(i)
|
|
2169
2170
|
});
|
|
2170
|
-
class
|
|
2171
|
+
class Ge extends I {
|
|
2171
2172
|
_parse(e) {
|
|
2172
2173
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== g.date) {
|
|
2173
2174
|
const s = this._getOrReturnCtx(e);
|
|
@@ -2207,7 +2208,7 @@ class Je extends I {
|
|
|
2207
2208
|
};
|
|
2208
2209
|
}
|
|
2209
2210
|
_addCheck(e) {
|
|
2210
|
-
return new
|
|
2211
|
+
return new Ge({
|
|
2211
2212
|
...this._def,
|
|
2212
2213
|
checks: [...this._def.checks, e]
|
|
2213
2214
|
});
|
|
@@ -2239,7 +2240,7 @@ class Je extends I {
|
|
|
2239
2240
|
return e != null ? new Date(e) : null;
|
|
2240
2241
|
}
|
|
2241
2242
|
}
|
|
2242
|
-
|
|
2243
|
+
Ge.create = (i) => new Ge({
|
|
2243
2244
|
checks: [],
|
|
2244
2245
|
coerce: (i == null ? void 0 : i.coerce) || !1,
|
|
2245
2246
|
typeName: T.ZodDate,
|
|
@@ -2262,7 +2263,7 @@ gn.create = (i) => new gn({
|
|
|
2262
2263
|
typeName: T.ZodSymbol,
|
|
2263
2264
|
...A(i)
|
|
2264
2265
|
});
|
|
2265
|
-
class
|
|
2266
|
+
class Rt extends I {
|
|
2266
2267
|
_parse(e) {
|
|
2267
2268
|
if (this._getType(e) !== g.undefined) {
|
|
2268
2269
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2275,7 +2276,7 @@ class Mt extends I {
|
|
|
2275
2276
|
return ee(e.data);
|
|
2276
2277
|
}
|
|
2277
2278
|
}
|
|
2278
|
-
|
|
2279
|
+
Rt.create = (i) => new Rt({
|
|
2279
2280
|
typeName: T.ZodUndefined,
|
|
2280
2281
|
...A(i)
|
|
2281
2282
|
});
|
|
@@ -2308,7 +2309,7 @@ dt.create = (i) => new dt({
|
|
|
2308
2309
|
typeName: T.ZodAny,
|
|
2309
2310
|
...A(i)
|
|
2310
2311
|
});
|
|
2311
|
-
class
|
|
2312
|
+
class qe extends I {
|
|
2312
2313
|
constructor() {
|
|
2313
2314
|
super(...arguments), this._unknown = !0;
|
|
2314
2315
|
}
|
|
@@ -2316,11 +2317,11 @@ class Ve extends I {
|
|
|
2316
2317
|
return ee(e.data);
|
|
2317
2318
|
}
|
|
2318
2319
|
}
|
|
2319
|
-
|
|
2320
|
+
qe.create = (i) => new qe({
|
|
2320
2321
|
typeName: T.ZodUnknown,
|
|
2321
2322
|
...A(i)
|
|
2322
2323
|
});
|
|
2323
|
-
class
|
|
2324
|
+
class Te extends I {
|
|
2324
2325
|
_parse(e) {
|
|
2325
2326
|
const t = this._getOrReturnCtx(e);
|
|
2326
2327
|
return y(t, {
|
|
@@ -2330,7 +2331,7 @@ class $e extends I {
|
|
|
2330
2331
|
}), S;
|
|
2331
2332
|
}
|
|
2332
2333
|
}
|
|
2333
|
-
|
|
2334
|
+
Te.create = (i) => new Te({
|
|
2334
2335
|
typeName: T.ZodNever,
|
|
2335
2336
|
...A(i)
|
|
2336
2337
|
});
|
|
@@ -2351,7 +2352,7 @@ yn.create = (i) => new yn({
|
|
|
2351
2352
|
typeName: T.ZodVoid,
|
|
2352
2353
|
...A(i)
|
|
2353
2354
|
});
|
|
2354
|
-
class
|
|
2355
|
+
class ce extends I {
|
|
2355
2356
|
_parse(e) {
|
|
2356
2357
|
const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
|
|
2357
2358
|
if (t.parsedType !== g.array)
|
|
@@ -2387,27 +2388,27 @@ class le extends I {
|
|
|
2387
2388
|
exact: !1,
|
|
2388
2389
|
message: s.maxLength.message
|
|
2389
2390
|
}), n.dirty()), t.common.async)
|
|
2390
|
-
return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new
|
|
2391
|
-
const r = [...t.data].map((a, o) => s.type._parseSync(new
|
|
2391
|
+
return Promise.all([...t.data].map((a, o) => s.type._parseAsync(new ye(t, a, t.path, o)))).then((a) => Y.mergeArray(n, a));
|
|
2392
|
+
const r = [...t.data].map((a, o) => s.type._parseSync(new ye(t, a, t.path, o)));
|
|
2392
2393
|
return Y.mergeArray(n, r);
|
|
2393
2394
|
}
|
|
2394
2395
|
get element() {
|
|
2395
2396
|
return this._def.type;
|
|
2396
2397
|
}
|
|
2397
2398
|
min(e, t) {
|
|
2398
|
-
return new
|
|
2399
|
+
return new ce({
|
|
2399
2400
|
...this._def,
|
|
2400
2401
|
minLength: { value: e, message: x.toString(t) }
|
|
2401
2402
|
});
|
|
2402
2403
|
}
|
|
2403
2404
|
max(e, t) {
|
|
2404
|
-
return new
|
|
2405
|
+
return new ce({
|
|
2405
2406
|
...this._def,
|
|
2406
2407
|
maxLength: { value: e, message: x.toString(t) }
|
|
2407
2408
|
});
|
|
2408
2409
|
}
|
|
2409
2410
|
length(e, t) {
|
|
2410
|
-
return new
|
|
2411
|
+
return new ce({
|
|
2411
2412
|
...this._def,
|
|
2412
2413
|
exactLength: { value: e, message: x.toString(t) }
|
|
2413
2414
|
});
|
|
@@ -2416,7 +2417,7 @@ class le extends I {
|
|
|
2416
2417
|
return this.min(1, e);
|
|
2417
2418
|
}
|
|
2418
2419
|
}
|
|
2419
|
-
|
|
2420
|
+
ce.create = (i, e) => new ce({
|
|
2420
2421
|
type: i,
|
|
2421
2422
|
minLength: null,
|
|
2422
2423
|
maxLength: null,
|
|
@@ -2424,22 +2425,22 @@ le.create = (i, e) => new le({
|
|
|
2424
2425
|
typeName: T.ZodArray,
|
|
2425
2426
|
...A(e)
|
|
2426
2427
|
});
|
|
2427
|
-
function
|
|
2428
|
+
function ot(i) {
|
|
2428
2429
|
if (i instanceof F) {
|
|
2429
2430
|
const e = {};
|
|
2430
2431
|
for (const t in i.shape) {
|
|
2431
2432
|
const n = i.shape[t];
|
|
2432
|
-
e[t] =
|
|
2433
|
+
e[t] = $e.create(ot(n));
|
|
2433
2434
|
}
|
|
2434
2435
|
return new F({
|
|
2435
2436
|
...i._def,
|
|
2436
2437
|
shape: () => e
|
|
2437
2438
|
});
|
|
2438
2439
|
} else
|
|
2439
|
-
return i instanceof
|
|
2440
|
+
return i instanceof ce ? new ce({
|
|
2440
2441
|
...i._def,
|
|
2441
|
-
type:
|
|
2442
|
-
}) : i instanceof
|
|
2442
|
+
type: ot(i.element)
|
|
2443
|
+
}) : i instanceof $e ? $e.create(ot(i.unwrap())) : i instanceof Ye ? Ye.create(ot(i.unwrap())) : i instanceof ve ? ve.create(i.items.map((e) => ot(e))) : i;
|
|
2443
2444
|
}
|
|
2444
2445
|
class F extends I {
|
|
2445
2446
|
constructor() {
|
|
@@ -2461,7 +2462,7 @@ class F extends I {
|
|
|
2461
2462
|
}), S;
|
|
2462
2463
|
}
|
|
2463
2464
|
const { status: t, ctx: n } = this._processInputParams(e), { shape: s, keys: r } = this._getCached(), a = [];
|
|
2464
|
-
if (!(this._def.catchall instanceof
|
|
2465
|
+
if (!(this._def.catchall instanceof Te && this._def.unknownKeys === "strip"))
|
|
2465
2466
|
for (const l in n.data)
|
|
2466
2467
|
r.includes(l) || a.push(l);
|
|
2467
2468
|
const o = [];
|
|
@@ -2469,11 +2470,11 @@ class F extends I {
|
|
|
2469
2470
|
const d = s[l], h = n.data[l];
|
|
2470
2471
|
o.push({
|
|
2471
2472
|
key: { status: "valid", value: l },
|
|
2472
|
-
value: d._parse(new
|
|
2473
|
+
value: d._parse(new ye(n, h, n.path, l)),
|
|
2473
2474
|
alwaysSet: l in n.data
|
|
2474
2475
|
});
|
|
2475
2476
|
}
|
|
2476
|
-
if (this._def.catchall instanceof
|
|
2477
|
+
if (this._def.catchall instanceof Te) {
|
|
2477
2478
|
const l = this._def.unknownKeys;
|
|
2478
2479
|
if (l === "passthrough")
|
|
2479
2480
|
for (const d of a)
|
|
@@ -2495,7 +2496,7 @@ class F extends I {
|
|
|
2495
2496
|
o.push({
|
|
2496
2497
|
key: { status: "valid", value: d },
|
|
2497
2498
|
value: l._parse(
|
|
2498
|
-
new
|
|
2499
|
+
new ye(n, h, n.path, d)
|
|
2499
2500
|
//, ctx.child(key), value, getParsedType(value)
|
|
2500
2501
|
),
|
|
2501
2502
|
alwaysSet: d in n.data
|
|
@@ -2676,7 +2677,7 @@ class F extends I {
|
|
|
2676
2677
|
* @deprecated
|
|
2677
2678
|
*/
|
|
2678
2679
|
deepPartial() {
|
|
2679
|
-
return
|
|
2680
|
+
return ot(this);
|
|
2680
2681
|
}
|
|
2681
2682
|
partial(e) {
|
|
2682
2683
|
const t = {};
|
|
@@ -2695,7 +2696,7 @@ class F extends I {
|
|
|
2695
2696
|
t[n] = this.shape[n];
|
|
2696
2697
|
else {
|
|
2697
2698
|
let s = this.shape[n];
|
|
2698
|
-
for (; s instanceof
|
|
2699
|
+
for (; s instanceof $e; )
|
|
2699
2700
|
s = s._def.innerType;
|
|
2700
2701
|
t[n] = s;
|
|
2701
2702
|
}
|
|
@@ -2711,21 +2712,21 @@ class F extends I {
|
|
|
2711
2712
|
F.create = (i, e) => new F({
|
|
2712
2713
|
shape: () => i,
|
|
2713
2714
|
unknownKeys: "strip",
|
|
2714
|
-
catchall:
|
|
2715
|
+
catchall: Te.create(),
|
|
2715
2716
|
typeName: T.ZodObject,
|
|
2716
2717
|
...A(e)
|
|
2717
2718
|
});
|
|
2718
2719
|
F.strictCreate = (i, e) => new F({
|
|
2719
2720
|
shape: () => i,
|
|
2720
2721
|
unknownKeys: "strict",
|
|
2721
|
-
catchall:
|
|
2722
|
+
catchall: Te.create(),
|
|
2722
2723
|
typeName: T.ZodObject,
|
|
2723
2724
|
...A(e)
|
|
2724
2725
|
});
|
|
2725
2726
|
F.lazycreate = (i, e) => new F({
|
|
2726
2727
|
shape: i,
|
|
2727
2728
|
unknownKeys: "strip",
|
|
2728
|
-
catchall:
|
|
2729
|
+
catchall: Te.create(),
|
|
2729
2730
|
typeName: T.ZodObject,
|
|
2730
2731
|
...A(e)
|
|
2731
2732
|
});
|
|
@@ -2739,7 +2740,7 @@ class Nt extends I {
|
|
|
2739
2740
|
for (const o of r)
|
|
2740
2741
|
if (o.result.status === "dirty")
|
|
2741
2742
|
return t.common.issues.push(...o.ctx.common.issues), o.result;
|
|
2742
|
-
const a = r.map((o) => new
|
|
2743
|
+
const a = r.map((o) => new le(o.ctx.common.issues));
|
|
2743
2744
|
return y(t, {
|
|
2744
2745
|
code: m.invalid_union,
|
|
2745
2746
|
unionErrors: a
|
|
@@ -2786,7 +2787,7 @@ class Nt extends I {
|
|
|
2786
2787
|
}
|
|
2787
2788
|
if (r)
|
|
2788
2789
|
return t.common.issues.push(...r.ctx.common.issues), r.result;
|
|
2789
|
-
const o = a.map((l) => new
|
|
2790
|
+
const o = a.map((l) => new le(l));
|
|
2790
2791
|
return y(t, {
|
|
2791
2792
|
code: m.invalid_union,
|
|
2792
2793
|
unionErrors: o
|
|
@@ -2802,7 +2803,7 @@ Nt.create = (i, e) => new Nt({
|
|
|
2802
2803
|
typeName: T.ZodUnion,
|
|
2803
2804
|
...A(e)
|
|
2804
2805
|
});
|
|
2805
|
-
const rn = (i) => i instanceof Zt ? rn(i.schema) : i instanceof
|
|
2806
|
+
const rn = (i) => i instanceof Zt ? rn(i.schema) : i instanceof de ? rn(i.innerType()) : i instanceof Lt ? [i.value] : i instanceof je ? i.options : i instanceof Dt ? Object.keys(i.enum) : i instanceof Ut ? rn(i._def.innerType) : i instanceof Rt ? [void 0] : i instanceof Pt ? [null] : null;
|
|
2806
2807
|
class Rn extends I {
|
|
2807
2808
|
_parse(e) {
|
|
2808
2809
|
const { ctx: t } = this._processInputParams(e);
|
|
@@ -2865,14 +2866,14 @@ class Rn extends I {
|
|
|
2865
2866
|
});
|
|
2866
2867
|
}
|
|
2867
2868
|
}
|
|
2868
|
-
function
|
|
2869
|
-
const t =
|
|
2869
|
+
function ai(i, e) {
|
|
2870
|
+
const t = Me(i), n = Me(e);
|
|
2870
2871
|
if (i === e)
|
|
2871
2872
|
return { valid: !0, data: i };
|
|
2872
2873
|
if (t === g.object && n === g.object) {
|
|
2873
2874
|
const s = N.objectKeys(e), r = N.objectKeys(i).filter((o) => s.indexOf(o) !== -1), a = { ...i, ...e };
|
|
2874
2875
|
for (const o of r) {
|
|
2875
|
-
const l =
|
|
2876
|
+
const l = ai(i[o], e[o]);
|
|
2876
2877
|
if (!l.valid)
|
|
2877
2878
|
return { valid: !1 };
|
|
2878
2879
|
a[o] = l.data;
|
|
@@ -2883,7 +2884,7 @@ function ri(i, e) {
|
|
|
2883
2884
|
return { valid: !1 };
|
|
2884
2885
|
const s = [];
|
|
2885
2886
|
for (let r = 0; r < i.length; r++) {
|
|
2886
|
-
const a = i[r], o = e[r], l =
|
|
2887
|
+
const a = i[r], o = e[r], l = ai(a, o);
|
|
2887
2888
|
if (!l.valid)
|
|
2888
2889
|
return { valid: !1 };
|
|
2889
2890
|
s.push(l.data);
|
|
@@ -2895,10 +2896,10 @@ function ri(i, e) {
|
|
|
2895
2896
|
class jt extends I {
|
|
2896
2897
|
_parse(e) {
|
|
2897
2898
|
const { status: t, ctx: n } = this._processInputParams(e), s = (r, a) => {
|
|
2898
|
-
if (
|
|
2899
|
+
if (si(r) || si(a))
|
|
2899
2900
|
return S;
|
|
2900
|
-
const o =
|
|
2901
|
-
return o.valid ? ((
|
|
2901
|
+
const o = ai(r.value, a.value);
|
|
2902
|
+
return o.valid ? ((ri(r) || ri(a)) && t.dirty(), { status: t.value, value: o.data }) : (y(n, {
|
|
2902
2903
|
code: m.invalid_intersection_types
|
|
2903
2904
|
}), S);
|
|
2904
2905
|
};
|
|
@@ -2930,7 +2931,7 @@ jt.create = (i, e, t) => new jt({
|
|
|
2930
2931
|
typeName: T.ZodIntersection,
|
|
2931
2932
|
...A(t)
|
|
2932
2933
|
});
|
|
2933
|
-
class
|
|
2934
|
+
class ve extends I {
|
|
2934
2935
|
_parse(e) {
|
|
2935
2936
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2936
2937
|
if (n.parsedType !== g.array)
|
|
@@ -2956,7 +2957,7 @@ class ye extends I {
|
|
|
2956
2957
|
}), t.dirty());
|
|
2957
2958
|
const s = [...n.data].map((r, a) => {
|
|
2958
2959
|
const o = this._def.items[a] || this._def.rest;
|
|
2959
|
-
return o ? o._parse(new
|
|
2960
|
+
return o ? o._parse(new ye(n, r, n.path, a)) : null;
|
|
2960
2961
|
}).filter((r) => !!r);
|
|
2961
2962
|
return n.common.async ? Promise.all(s).then((r) => Y.mergeArray(t, r)) : Y.mergeArray(t, s);
|
|
2962
2963
|
}
|
|
@@ -2964,16 +2965,16 @@ class ye extends I {
|
|
|
2964
2965
|
return this._def.items;
|
|
2965
2966
|
}
|
|
2966
2967
|
rest(e) {
|
|
2967
|
-
return new
|
|
2968
|
+
return new ve({
|
|
2968
2969
|
...this._def,
|
|
2969
2970
|
rest: e
|
|
2970
2971
|
});
|
|
2971
2972
|
}
|
|
2972
2973
|
}
|
|
2973
|
-
|
|
2974
|
+
ve.create = (i, e) => {
|
|
2974
2975
|
if (!Array.isArray(i))
|
|
2975
2976
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2976
|
-
return new
|
|
2977
|
+
return new ve({
|
|
2977
2978
|
items: i,
|
|
2978
2979
|
typeName: T.ZodTuple,
|
|
2979
2980
|
rest: null,
|
|
@@ -2998,8 +2999,8 @@ class zt extends I {
|
|
|
2998
2999
|
const s = [], r = this._def.keyType, a = this._def.valueType;
|
|
2999
3000
|
for (const o in n.data)
|
|
3000
3001
|
s.push({
|
|
3001
|
-
key: r._parse(new
|
|
3002
|
-
value: a._parse(new
|
|
3002
|
+
key: r._parse(new ye(n, o, n.path, o)),
|
|
3003
|
+
value: a._parse(new ye(n, n.data[o], n.path, o))
|
|
3003
3004
|
});
|
|
3004
3005
|
return n.common.async ? Y.mergeObjectAsync(t, s) : Y.mergeObjectSync(t, s);
|
|
3005
3006
|
}
|
|
@@ -3013,7 +3014,7 @@ class zt extends I {
|
|
|
3013
3014
|
typeName: T.ZodRecord,
|
|
3014
3015
|
...A(n)
|
|
3015
3016
|
}) : new zt({
|
|
3016
|
-
keyType:
|
|
3017
|
+
keyType: oe.create(),
|
|
3017
3018
|
valueType: e,
|
|
3018
3019
|
typeName: T.ZodRecord,
|
|
3019
3020
|
...A(t)
|
|
@@ -3036,8 +3037,8 @@ class vn extends I {
|
|
|
3036
3037
|
received: n.parsedType
|
|
3037
3038
|
}), S;
|
|
3038
3039
|
const s = this._def.keyType, r = this._def.valueType, a = [...n.data.entries()].map(([o, l], d) => ({
|
|
3039
|
-
key: s._parse(new
|
|
3040
|
-
value: r._parse(new
|
|
3040
|
+
key: s._parse(new ye(n, o, n.path, [d, "key"])),
|
|
3041
|
+
value: r._parse(new ye(n, l, n.path, [d, "value"]))
|
|
3041
3042
|
}));
|
|
3042
3043
|
if (n.common.async) {
|
|
3043
3044
|
const o = /* @__PURE__ */ new Map();
|
|
@@ -3068,7 +3069,7 @@ vn.create = (i, e, t) => new vn({
|
|
|
3068
3069
|
typeName: T.ZodMap,
|
|
3069
3070
|
...A(t)
|
|
3070
3071
|
});
|
|
3071
|
-
class
|
|
3072
|
+
class Qe extends I {
|
|
3072
3073
|
_parse(e) {
|
|
3073
3074
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
3074
3075
|
if (n.parsedType !== g.set)
|
|
@@ -3103,17 +3104,17 @@ class Ge extends I {
|
|
|
3103
3104
|
}
|
|
3104
3105
|
return { status: t.value, value: d };
|
|
3105
3106
|
}
|
|
3106
|
-
const o = [...n.data.values()].map((l, d) => r._parse(new
|
|
3107
|
+
const o = [...n.data.values()].map((l, d) => r._parse(new ye(n, l, n.path, d)));
|
|
3107
3108
|
return n.common.async ? Promise.all(o).then((l) => a(l)) : a(o);
|
|
3108
3109
|
}
|
|
3109
3110
|
min(e, t) {
|
|
3110
|
-
return new
|
|
3111
|
+
return new Qe({
|
|
3111
3112
|
...this._def,
|
|
3112
3113
|
minSize: { value: e, message: x.toString(t) }
|
|
3113
3114
|
});
|
|
3114
3115
|
}
|
|
3115
3116
|
max(e, t) {
|
|
3116
|
-
return new
|
|
3117
|
+
return new Qe({
|
|
3117
3118
|
...this._def,
|
|
3118
3119
|
maxSize: { value: e, message: x.toString(t) }
|
|
3119
3120
|
});
|
|
@@ -3125,7 +3126,7 @@ class Ge extends I {
|
|
|
3125
3126
|
return this.min(1, e);
|
|
3126
3127
|
}
|
|
3127
3128
|
}
|
|
3128
|
-
|
|
3129
|
+
Qe.create = (i, e) => new Qe({
|
|
3129
3130
|
valueType: i,
|
|
3130
3131
|
minSize: null,
|
|
3131
3132
|
maxSize: null,
|
|
@@ -3180,7 +3181,7 @@ class lt extends I {
|
|
|
3180
3181
|
if (this._def.returns instanceof ht) {
|
|
3181
3182
|
const o = this;
|
|
3182
3183
|
return ee(async function(...l) {
|
|
3183
|
-
const d = new
|
|
3184
|
+
const d = new le([]), h = await o._def.args.parseAsync(l, r).catch((c) => {
|
|
3184
3185
|
throw d.addIssue(n(l, c)), d;
|
|
3185
3186
|
}), p = await Reflect.apply(a, this, h);
|
|
3186
3187
|
return await o._def.returns._def.type.parseAsync(p, r).catch((c) => {
|
|
@@ -3192,10 +3193,10 @@ class lt extends I {
|
|
|
3192
3193
|
return ee(function(...l) {
|
|
3193
3194
|
const d = o._def.args.safeParse(l, r);
|
|
3194
3195
|
if (!d.success)
|
|
3195
|
-
throw new
|
|
3196
|
+
throw new le([n(l, d.error)]);
|
|
3196
3197
|
const h = Reflect.apply(a, this, d.data), p = o._def.returns.safeParse(h, r);
|
|
3197
3198
|
if (!p.success)
|
|
3198
|
-
throw new
|
|
3199
|
+
throw new le([s(h, p.error)]);
|
|
3199
3200
|
return p.data;
|
|
3200
3201
|
});
|
|
3201
3202
|
}
|
|
@@ -3209,7 +3210,7 @@ class lt extends I {
|
|
|
3209
3210
|
args(...e) {
|
|
3210
3211
|
return new lt({
|
|
3211
3212
|
...this._def,
|
|
3212
|
-
args:
|
|
3213
|
+
args: ve.create(e).rest(qe.create())
|
|
3213
3214
|
});
|
|
3214
3215
|
}
|
|
3215
3216
|
returns(e) {
|
|
@@ -3226,8 +3227,8 @@ class lt extends I {
|
|
|
3226
3227
|
}
|
|
3227
3228
|
static create(e, t, n) {
|
|
3228
3229
|
return new lt({
|
|
3229
|
-
args: e ||
|
|
3230
|
-
returns: t ||
|
|
3230
|
+
args: e || ve.create([]).rest(qe.create()),
|
|
3231
|
+
returns: t || qe.create(),
|
|
3231
3232
|
typeName: T.ZodFunction,
|
|
3232
3233
|
...A(n)
|
|
3233
3234
|
});
|
|
@@ -3378,7 +3379,7 @@ ht.create = (i, e) => new ht({
|
|
|
3378
3379
|
typeName: T.ZodPromise,
|
|
3379
3380
|
...A(e)
|
|
3380
3381
|
});
|
|
3381
|
-
class
|
|
3382
|
+
class de extends I {
|
|
3382
3383
|
innerType() {
|
|
3383
3384
|
return this._def.schema;
|
|
3384
3385
|
}
|
|
@@ -3446,19 +3447,19 @@ class ce extends I {
|
|
|
3446
3447
|
N.assertNever(s);
|
|
3447
3448
|
}
|
|
3448
3449
|
}
|
|
3449
|
-
|
|
3450
|
+
de.create = (i, e, t) => new de({
|
|
3450
3451
|
schema: i,
|
|
3451
3452
|
typeName: T.ZodEffects,
|
|
3452
3453
|
effect: e,
|
|
3453
3454
|
...A(t)
|
|
3454
3455
|
});
|
|
3455
|
-
|
|
3456
|
+
de.createWithPreprocess = (i, e, t) => new de({
|
|
3456
3457
|
schema: e,
|
|
3457
3458
|
effect: { type: "preprocess", transform: i },
|
|
3458
3459
|
typeName: T.ZodEffects,
|
|
3459
3460
|
...A(t)
|
|
3460
3461
|
});
|
|
3461
|
-
class
|
|
3462
|
+
class $e extends I {
|
|
3462
3463
|
_parse(e) {
|
|
3463
3464
|
return this._getType(e) === g.undefined ? ee(void 0) : this._def.innerType._parse(e);
|
|
3464
3465
|
}
|
|
@@ -3466,12 +3467,12 @@ class _e extends I {
|
|
|
3466
3467
|
return this._def.innerType;
|
|
3467
3468
|
}
|
|
3468
3469
|
}
|
|
3469
|
-
|
|
3470
|
+
$e.create = (i, e) => new $e({
|
|
3470
3471
|
innerType: i,
|
|
3471
3472
|
typeName: T.ZodOptional,
|
|
3472
3473
|
...A(e)
|
|
3473
3474
|
});
|
|
3474
|
-
class
|
|
3475
|
+
class Ye extends I {
|
|
3475
3476
|
_parse(e) {
|
|
3476
3477
|
return this._getType(e) === g.null ? ee(null) : this._def.innerType._parse(e);
|
|
3477
3478
|
}
|
|
@@ -3479,7 +3480,7 @@ class Qe extends I {
|
|
|
3479
3480
|
return this._def.innerType;
|
|
3480
3481
|
}
|
|
3481
3482
|
}
|
|
3482
|
-
|
|
3483
|
+
Ye.create = (i, e) => new Ye({
|
|
3483
3484
|
innerType: i,
|
|
3484
3485
|
typeName: T.ZodNullable,
|
|
3485
3486
|
...A(e)
|
|
@@ -3523,7 +3524,7 @@ class bn extends I {
|
|
|
3523
3524
|
status: "valid",
|
|
3524
3525
|
value: r.status === "valid" ? r.value : this._def.catchValue({
|
|
3525
3526
|
get error() {
|
|
3526
|
-
return new
|
|
3527
|
+
return new le(n.common.issues);
|
|
3527
3528
|
},
|
|
3528
3529
|
input: n.data
|
|
3529
3530
|
})
|
|
@@ -3531,7 +3532,7 @@ class bn extends I {
|
|
|
3531
3532
|
status: "valid",
|
|
3532
3533
|
value: s.status === "valid" ? s.value : this._def.catchValue({
|
|
3533
3534
|
get error() {
|
|
3534
|
-
return new
|
|
3535
|
+
return new le(n.common.issues);
|
|
3535
3536
|
},
|
|
3536
3537
|
input: n.data
|
|
3537
3538
|
})
|
|
@@ -3644,16 +3645,16 @@ var T;
|
|
|
3644
3645
|
})(T || (T = {}));
|
|
3645
3646
|
const la = (i, e = {
|
|
3646
3647
|
message: `Input not instance of ${i.name}`
|
|
3647
|
-
}) => Zs((t) => t instanceof i, e), Ls =
|
|
3648
|
-
string: (i) =>
|
|
3648
|
+
}) => Zs((t) => t instanceof i, e), Ls = oe.create, Ds = Pe.create, ca = wn.create, da = Ne.create, Us = Mt.create, ha = Ge.create, ua = gn.create, pa = Rt.create, ma = Pt.create, fa = dt.create, ga = qe.create, ya = Te.create, va = yn.create, ba = ce.create, wa = F.create, xa = F.strictCreate, ka = Nt.create, _a = Rn.create, $a = jt.create, Ta = ve.create, Ea = zt.create, Sa = vn.create, Ca = Qe.create, Aa = lt.create, Ia = Zt.create, Oa = Lt.create, Ma = je.create, Ra = Dt.create, Pa = ht.create, ds = de.create, Na = $e.create, ja = Ye.create, za = de.createWithPreprocess, Za = Ft.create, La = () => Ls().optional(), Da = () => Ds().optional(), Ua = () => Us().optional(), Ha = {
|
|
3649
|
+
string: (i) => oe.create({ ...i, coerce: !0 }),
|
|
3649
3650
|
number: (i) => Pe.create({ ...i, coerce: !0 }),
|
|
3650
|
-
boolean: (i) =>
|
|
3651
|
+
boolean: (i) => Mt.create({
|
|
3651
3652
|
...i,
|
|
3652
3653
|
coerce: !0
|
|
3653
3654
|
}),
|
|
3654
3655
|
bigint: (i) => Ne.create({ ...i, coerce: !0 }),
|
|
3655
|
-
date: (i) =>
|
|
3656
|
-
},
|
|
3656
|
+
date: (i) => Ge.create({ ...i, coerce: !0 })
|
|
3657
|
+
}, Ba = S;
|
|
3657
3658
|
var w = /* @__PURE__ */ Object.freeze({
|
|
3658
3659
|
__proto__: null,
|
|
3659
3660
|
defaultErrorMap: It,
|
|
@@ -3666,50 +3667,50 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3666
3667
|
INVALID: S,
|
|
3667
3668
|
DIRTY: Ns,
|
|
3668
3669
|
OK: ee,
|
|
3669
|
-
isAborted:
|
|
3670
|
-
isDirty:
|
|
3670
|
+
isAborted: si,
|
|
3671
|
+
isDirty: ri,
|
|
3671
3672
|
isValid: Ot,
|
|
3672
3673
|
isAsync: fn,
|
|
3673
3674
|
get util() {
|
|
3674
3675
|
return N;
|
|
3675
3676
|
},
|
|
3676
3677
|
get objectUtil() {
|
|
3677
|
-
return
|
|
3678
|
+
return ii;
|
|
3678
3679
|
},
|
|
3679
3680
|
ZodParsedType: g,
|
|
3680
|
-
getParsedType:
|
|
3681
|
+
getParsedType: Me,
|
|
3681
3682
|
ZodType: I,
|
|
3682
|
-
ZodString:
|
|
3683
|
+
ZodString: oe,
|
|
3683
3684
|
ZodNumber: Pe,
|
|
3684
3685
|
ZodBigInt: Ne,
|
|
3685
|
-
ZodBoolean:
|
|
3686
|
-
ZodDate:
|
|
3686
|
+
ZodBoolean: Mt,
|
|
3687
|
+
ZodDate: Ge,
|
|
3687
3688
|
ZodSymbol: gn,
|
|
3688
|
-
ZodUndefined:
|
|
3689
|
+
ZodUndefined: Rt,
|
|
3689
3690
|
ZodNull: Pt,
|
|
3690
3691
|
ZodAny: dt,
|
|
3691
|
-
ZodUnknown:
|
|
3692
|
-
ZodNever:
|
|
3692
|
+
ZodUnknown: qe,
|
|
3693
|
+
ZodNever: Te,
|
|
3693
3694
|
ZodVoid: yn,
|
|
3694
|
-
ZodArray:
|
|
3695
|
+
ZodArray: ce,
|
|
3695
3696
|
ZodObject: F,
|
|
3696
3697
|
ZodUnion: Nt,
|
|
3697
3698
|
ZodDiscriminatedUnion: Rn,
|
|
3698
3699
|
ZodIntersection: jt,
|
|
3699
|
-
ZodTuple:
|
|
3700
|
+
ZodTuple: ve,
|
|
3700
3701
|
ZodRecord: zt,
|
|
3701
3702
|
ZodMap: vn,
|
|
3702
|
-
ZodSet:
|
|
3703
|
+
ZodSet: Qe,
|
|
3703
3704
|
ZodFunction: lt,
|
|
3704
3705
|
ZodLazy: Zt,
|
|
3705
3706
|
ZodLiteral: Lt,
|
|
3706
3707
|
ZodEnum: je,
|
|
3707
3708
|
ZodNativeEnum: Dt,
|
|
3708
3709
|
ZodPromise: ht,
|
|
3709
|
-
ZodEffects:
|
|
3710
|
-
ZodTransformer:
|
|
3711
|
-
ZodOptional:
|
|
3712
|
-
ZodNullable:
|
|
3710
|
+
ZodEffects: de,
|
|
3711
|
+
ZodTransformer: de,
|
|
3712
|
+
ZodOptional: $e,
|
|
3713
|
+
ZodNullable: Ye,
|
|
3713
3714
|
ZodDefault: Ut,
|
|
3714
3715
|
ZodCatch: bn,
|
|
3715
3716
|
ZodNaN: wn,
|
|
@@ -3724,15 +3725,15 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3724
3725
|
get ZodFirstPartyTypeKind() {
|
|
3725
3726
|
return T;
|
|
3726
3727
|
},
|
|
3727
|
-
coerce:
|
|
3728
|
+
coerce: Ha,
|
|
3728
3729
|
any: fa,
|
|
3729
3730
|
array: ba,
|
|
3730
3731
|
bigint: da,
|
|
3731
3732
|
boolean: Us,
|
|
3732
3733
|
date: ha,
|
|
3733
3734
|
discriminatedUnion: _a,
|
|
3734
|
-
effect:
|
|
3735
|
-
enum:
|
|
3735
|
+
effect: ds,
|
|
3736
|
+
enum: Ma,
|
|
3736
3737
|
function: Aa,
|
|
3737
3738
|
instanceof: la,
|
|
3738
3739
|
intersection: $a,
|
|
@@ -3740,7 +3741,7 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3740
3741
|
literal: Oa,
|
|
3741
3742
|
map: Sa,
|
|
3742
3743
|
nan: ca,
|
|
3743
|
-
nativeEnum:
|
|
3744
|
+
nativeEnum: Ra,
|
|
3744
3745
|
never: ya,
|
|
3745
3746
|
null: ma,
|
|
3746
3747
|
nullable: ja,
|
|
@@ -3758,18 +3759,18 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3758
3759
|
strictObject: xa,
|
|
3759
3760
|
string: Ls,
|
|
3760
3761
|
symbol: ua,
|
|
3761
|
-
transformer:
|
|
3762
|
+
transformer: ds,
|
|
3762
3763
|
tuple: Ta,
|
|
3763
3764
|
undefined: pa,
|
|
3764
3765
|
union: ka,
|
|
3765
3766
|
unknown: ga,
|
|
3766
3767
|
void: va,
|
|
3767
|
-
NEVER:
|
|
3768
|
+
NEVER: Ba,
|
|
3768
3769
|
ZodIssueCode: m,
|
|
3769
3770
|
quotelessJson: Vr,
|
|
3770
|
-
ZodError:
|
|
3771
|
+
ZodError: le
|
|
3771
3772
|
});
|
|
3772
|
-
const
|
|
3773
|
+
const Pn = w.object({
|
|
3773
3774
|
assistantId: w.string(),
|
|
3774
3775
|
params: w.record(w.any()).default({}),
|
|
3775
3776
|
config: w.object({
|
|
@@ -3834,20 +3835,20 @@ var Wa = Object.defineProperty, Fa = Object.getOwnPropertyDescriptor, Vt = (i, e
|
|
|
3834
3835
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
3835
3836
|
return n && s && Wa(e, t, s), s;
|
|
3836
3837
|
};
|
|
3837
|
-
let
|
|
3838
|
+
let Xe = class extends ne {
|
|
3838
3839
|
constructor() {
|
|
3839
3840
|
super(...arguments), this.isOpen = !0, this.onResizeHandler = () => {
|
|
3840
|
-
this.isOpen && window.innerWidth < 768 ?
|
|
3841
|
+
this.isOpen && window.innerWidth < 768 ? Br(this) : os(this);
|
|
3841
3842
|
};
|
|
3842
3843
|
}
|
|
3843
3844
|
connectedCallback() {
|
|
3844
|
-
super.connectedCallback(), this.cleanOptions =
|
|
3845
|
+
super.connectedCallback(), this.cleanOptions = Pn.parse(this.options), this.onResizeHandler(), window.addEventListener("resize", this.onResizeHandler, { passive: !0 });
|
|
3845
3846
|
}
|
|
3846
3847
|
disconnectedCallback() {
|
|
3847
|
-
super.disconnectedCallback(),
|
|
3848
|
+
super.disconnectedCallback(), os(this), window.removeEventListener("resize", this.onResizeHandler);
|
|
3848
3849
|
}
|
|
3849
3850
|
render() {
|
|
3850
|
-
const i = this.cleanOptions.config.placement !== "left", e =
|
|
3851
|
+
const i = this.cleanOptions.config.placement !== "left", e = ls({
|
|
3851
3852
|
fixed: !0,
|
|
3852
3853
|
"bottom-0": !0,
|
|
3853
3854
|
"w-full": this.isOpen,
|
|
@@ -3857,7 +3858,7 @@ let Ye = class extends ne {
|
|
|
3857
3858
|
"md:bottom-8": !0,
|
|
3858
3859
|
"md:w-fit": !0,
|
|
3859
3860
|
"md:h-fit": !0
|
|
3860
|
-
}), t =
|
|
3861
|
+
}), t = ls({
|
|
3861
3862
|
"mt-4": !0,
|
|
3862
3863
|
"px-8": !0,
|
|
3863
3864
|
"pb-8": !0,
|
|
@@ -3875,10 +3876,11 @@ let Ye = class extends ne {
|
|
|
3875
3876
|
return z`
|
|
3876
3877
|
<div
|
|
3877
3878
|
class=${e}
|
|
3879
|
+
style=${Ve({ zIndex: "9999", colorScheme: "normal" })}
|
|
3878
3880
|
>
|
|
3879
3881
|
<div
|
|
3880
3882
|
class="w-full h-full p-2 md:w-[350px] md:h-[500px] md:p-0"
|
|
3881
|
-
style=${
|
|
3883
|
+
style=${Ve({ display: this.isOpen ? "block" : "none" })}
|
|
3882
3884
|
>
|
|
3883
3885
|
<iai-chat
|
|
3884
3886
|
.options=${this.options}
|
|
@@ -3888,7 +3890,7 @@ let Ye = class extends ne {
|
|
|
3888
3890
|
|
|
3889
3891
|
<div
|
|
3890
3892
|
class=${t}
|
|
3891
|
-
style=${
|
|
3893
|
+
style=${Ve({ justifyContent: i ? "flex-end" : "flex-start" })}
|
|
3892
3894
|
>
|
|
3893
3895
|
<iai-chat-open-chat-button
|
|
3894
3896
|
.options=${this.cleanOptions}
|
|
@@ -3903,25 +3905,25 @@ let Ye = class extends ne {
|
|
|
3903
3905
|
this.isOpen = !this.isOpen, this.onResizeHandler();
|
|
3904
3906
|
}
|
|
3905
3907
|
};
|
|
3906
|
-
|
|
3908
|
+
Xe.styles = [Se];
|
|
3907
3909
|
Vt([
|
|
3908
3910
|
V({ type: Object })
|
|
3909
|
-
],
|
|
3911
|
+
], Xe.prototype, "options", 2);
|
|
3910
3912
|
Vt([
|
|
3911
3913
|
ft()
|
|
3912
|
-
],
|
|
3914
|
+
], Xe.prototype, "isOpen", 2);
|
|
3913
3915
|
Vt([
|
|
3914
|
-
|
|
3915
|
-
],
|
|
3916
|
+
An("iai-chat")
|
|
3917
|
+
], Xe.prototype, "chatWindow", 2);
|
|
3916
3918
|
Vt([
|
|
3917
|
-
|
|
3918
|
-
],
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
],
|
|
3922
|
-
const
|
|
3919
|
+
vi.debounce(250)
|
|
3920
|
+
], Xe.prototype, "onResizeHandler", 2);
|
|
3921
|
+
Xe = Vt([
|
|
3922
|
+
Ee("iai-chat-popup")
|
|
3923
|
+
], Xe);
|
|
3924
|
+
const bi = "https://ai-dev.anyonehome.xyz";
|
|
3923
3925
|
async function Va(i, e = {}) {
|
|
3924
|
-
return (await fetch(`${
|
|
3926
|
+
return (await fetch(`${bi}/threads`, {
|
|
3925
3927
|
method: "POST",
|
|
3926
3928
|
headers: {
|
|
3927
3929
|
"Content-Type": "application/json"
|
|
@@ -3930,7 +3932,7 @@ async function Va(i, e = {}) {
|
|
|
3930
3932
|
})).json();
|
|
3931
3933
|
}
|
|
3932
3934
|
async function qa(i, e) {
|
|
3933
|
-
return (await fetch(`${
|
|
3935
|
+
return (await fetch(`${bi}/threads/${i}/messages`, {
|
|
3934
3936
|
method: "POST",
|
|
3935
3937
|
headers: {
|
|
3936
3938
|
"Content-Type": "application/json"
|
|
@@ -3939,7 +3941,7 @@ async function qa(i, e) {
|
|
|
3939
3941
|
})).json();
|
|
3940
3942
|
}
|
|
3941
3943
|
async function Ka(i, e, t, n = !1) {
|
|
3942
|
-
return (await fetch(`${
|
|
3944
|
+
return (await fetch(`${bi}/threads/${i}/functions/${e}`, {
|
|
3943
3945
|
method: "POST",
|
|
3944
3946
|
headers: {
|
|
3945
3947
|
"Content-Type": "application/json"
|
|
@@ -4190,7 +4192,7 @@ class Ga {
|
|
|
4190
4192
|
* Copyright 2021 Google LLC
|
|
4191
4193
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
4192
4194
|
*/
|
|
4193
|
-
function
|
|
4195
|
+
function Re(i, e, t) {
|
|
4194
4196
|
return i ? e(i) : t == null ? void 0 : t(i);
|
|
4195
4197
|
}
|
|
4196
4198
|
function Qa(i) {
|
|
@@ -4209,7 +4211,7 @@ function Qa(i) {
|
|
|
4209
4211
|
});
|
|
4210
4212
|
} };
|
|
4211
4213
|
}
|
|
4212
|
-
const
|
|
4214
|
+
const Ht = z`
|
|
4213
4215
|
<svg
|
|
4214
4216
|
xmlns="http://www.w3.org/2000/svg"
|
|
4215
4217
|
viewBox="0 0 24 24"
|
|
@@ -4256,21 +4258,21 @@ const Bt = z`
|
|
|
4256
4258
|
<path d="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z" />
|
|
4257
4259
|
</svg>
|
|
4258
4260
|
`;
|
|
4259
|
-
var to = Object.defineProperty, no = Object.getOwnPropertyDescriptor,
|
|
4261
|
+
var to = Object.defineProperty, no = Object.getOwnPropertyDescriptor, he = (i, e, t, n) => {
|
|
4260
4262
|
for (var s = n > 1 ? void 0 : n ? no(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
4261
4263
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
4262
4264
|
return n && s && to(e, t, s), s;
|
|
4263
|
-
},
|
|
4265
|
+
}, Hs = (i, e, t) => {
|
|
4264
4266
|
if (!e.has(i))
|
|
4265
4267
|
throw TypeError("Cannot " + t);
|
|
4266
|
-
},
|
|
4268
|
+
}, rt = (i, e, t) => (Hs(i, e, "read from private field"), t ? t.call(i) : e.get(i)), hs = (i, e, t) => {
|
|
4267
4269
|
if (e.has(i))
|
|
4268
4270
|
throw TypeError("Cannot add the same private member more than once");
|
|
4269
4271
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
4270
|
-
},
|
|
4271
|
-
let
|
|
4272
|
+
}, us = (i, e, t, n) => (Hs(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), Oe, an;
|
|
4273
|
+
let ie = class extends ne {
|
|
4272
4274
|
constructor() {
|
|
4273
|
-
super(),
|
|
4275
|
+
super(), hs(this, Oe, void 0), hs(this, an, Promise.resolve()), this.disableInput = !1, this.showTyping = !1, this.messages = [], this.inputValue = "", this.internalDisableInput = !1, this.internalShowTyping = !1, this._emitter = Qa(), this._emitter.on("*", (i, e) => this.dispatchEvent(
|
|
4274
4276
|
new CustomEvent(`iai-chat-${i.toString()}`, {
|
|
4275
4277
|
bubbles: !0,
|
|
4276
4278
|
// Allow events to be reached through other elements
|
|
@@ -4283,14 +4285,14 @@ let de = class extends ne {
|
|
|
4283
4285
|
}
|
|
4284
4286
|
// Lifecycle Events
|
|
4285
4287
|
connectedCallback() {
|
|
4286
|
-
super.connectedCallback(), this.cleanOptions =
|
|
4288
|
+
super.connectedCallback(), this.cleanOptions = Pn.parse(this.options || {});
|
|
4287
4289
|
const { assistantId: i, params: e, config: t } = this.cleanOptions;
|
|
4288
|
-
|
|
4290
|
+
us(this, Oe, new Ga(i, {
|
|
4289
4291
|
params: e,
|
|
4290
4292
|
simulateDelays: t.simulateDelays,
|
|
4291
4293
|
historyKey: t.historyKey,
|
|
4292
4294
|
initialReplyMessage: t.initialReplyMessage
|
|
4293
|
-
})), this.updateMessages(
|
|
4295
|
+
})), this.updateMessages(rt(this, Oe).messages), this.showTyping = rt(this, Oe).isTyping, this.disableInput = rt(this, Oe).inputDisabled, this.chatManager.on("functionCall", ({ id: n, name: s, params: r }) => {
|
|
4294
4296
|
const a = this.cleanOptions.handlers.functionCalls[s];
|
|
4295
4297
|
if (!a) {
|
|
4296
4298
|
console.warn(`No function call handler found for ${s}`);
|
|
@@ -4325,7 +4327,7 @@ let de = class extends ne {
|
|
|
4325
4327
|
}), this.chatManager.on("*", this._emitter.emit);
|
|
4326
4328
|
}
|
|
4327
4329
|
disconnectedCallback() {
|
|
4328
|
-
super.disconnectedCallback(), this._emitter.all.clear(),
|
|
4330
|
+
super.disconnectedCallback(), this._emitter.all.clear(), rt(this, Oe).destroy();
|
|
4329
4331
|
}
|
|
4330
4332
|
firstUpdated() {
|
|
4331
4333
|
this.focusOnInput();
|
|
@@ -4339,10 +4341,10 @@ let de = class extends ne {
|
|
|
4339
4341
|
<div class="flex flex-col h-full rounded-lg shadow-lg bg-white">
|
|
4340
4342
|
<div class="header rounded-t-lg text-lg p-2 flex justify-between items-center">
|
|
4341
4343
|
<div class="flex flex-row h-full items-center">
|
|
4342
|
-
${
|
|
4344
|
+
${Re(i.imageSrc, () => z`
|
|
4343
4345
|
<img src="${i.imageSrc}" alt="Logo" style="max-height: 100%" />
|
|
4344
4346
|
`)}
|
|
4345
|
-
${
|
|
4347
|
+
${Re(i.text, () => z`
|
|
4346
4348
|
<span class="text-lg font-semibold ml-2">${i.text}</span>
|
|
4347
4349
|
`)}
|
|
4348
4350
|
</div>
|
|
@@ -4350,15 +4352,15 @@ let de = class extends ne {
|
|
|
4350
4352
|
<div class="flex-grow"></div>
|
|
4351
4353
|
|
|
4352
4354
|
<button
|
|
4353
|
-
class="mr-2 h-6
|
|
4355
|
+
class="mr-2 h-6"
|
|
4354
4356
|
@click="${this.resetChat}"
|
|
4355
4357
|
>
|
|
4356
4358
|
${eo}
|
|
4357
4359
|
</button>
|
|
4358
4360
|
|
|
4359
|
-
${
|
|
4360
|
-
<button class="mr-2 h-6
|
|
4361
|
-
${
|
|
4361
|
+
${Re(e, () => z`
|
|
4362
|
+
<button class="mr-2 h-6" @click="${this.closeChat}">
|
|
4363
|
+
${Ht}
|
|
4362
4364
|
</button>
|
|
4363
4365
|
`)}
|
|
4364
4366
|
</div>
|
|
@@ -4380,21 +4382,23 @@ let de = class extends ne {
|
|
|
4380
4382
|
</div>
|
|
4381
4383
|
|
|
4382
4384
|
<form @submit="${this.sendUserMessage}">
|
|
4383
|
-
<div class="flex items-
|
|
4384
|
-
<
|
|
4385
|
+
<div class="flex items-end space-x-2">
|
|
4386
|
+
<textarea
|
|
4385
4387
|
id="message-input"
|
|
4386
4388
|
type="text"
|
|
4387
|
-
class="flex-1 p-2 border rounded-lg
|
|
4389
|
+
class="flex-1 p-2 border rounded-lg disabled:bg-gray-200 max-h-20 resize-none"
|
|
4390
|
+
rows="1"
|
|
4388
4391
|
placeholder="Type your message..."
|
|
4389
4392
|
autocomplete="off"
|
|
4390
4393
|
.disabled="${this.internalDisableInput || this.disableInput}"
|
|
4391
4394
|
.value="${this.inputValue}"
|
|
4392
|
-
@input="${
|
|
4393
|
-
|
|
4395
|
+
@input="${this.handleInput}"
|
|
4396
|
+
@keydown="${(t) => this.handleKeyDown(t)}"
|
|
4397
|
+
></textarea>
|
|
4394
4398
|
<button
|
|
4395
4399
|
type="submit"
|
|
4396
4400
|
class="button rounded-lg p-2 disabled:opacity-50 h-9"
|
|
4397
|
-
.disabled="${
|
|
4401
|
+
.disabled="${this.isSubmitDisabled}"
|
|
4398
4402
|
>
|
|
4399
4403
|
${Xa}
|
|
4400
4404
|
</button>
|
|
@@ -4404,9 +4408,23 @@ let de = class extends ne {
|
|
|
4404
4408
|
</div>
|
|
4405
4409
|
`;
|
|
4406
4410
|
}
|
|
4411
|
+
get isSubmitDisabled() {
|
|
4412
|
+
return !this.inputValue || this.internalDisableInput || this.disableInput;
|
|
4413
|
+
}
|
|
4414
|
+
handleKeyDown(i) {
|
|
4415
|
+
i.key === "Enter" && !i.shiftKey && (i.preventDefault(), !this.isSubmitDisabled && this.sendUserMessage(i));
|
|
4416
|
+
}
|
|
4417
|
+
handleInput() {
|
|
4418
|
+
const { inputElement: i, chatContainer: e } = this;
|
|
4419
|
+
if (!i || !e)
|
|
4420
|
+
return;
|
|
4421
|
+
this.inputValue = i.value;
|
|
4422
|
+
const { scrollTop: t, clientHeight: n, scrollHeight: s } = e, r = t + n >= s;
|
|
4423
|
+
i.style.height = "auto", i.style.height = `${i.scrollHeight + 2}px`, r && this.scrollChatToBottom();
|
|
4424
|
+
}
|
|
4407
4425
|
// Getters
|
|
4408
4426
|
get chatManager() {
|
|
4409
|
-
return
|
|
4427
|
+
return rt(this, Oe);
|
|
4410
4428
|
}
|
|
4411
4429
|
resetChat() {
|
|
4412
4430
|
this.chatManager.reset();
|
|
@@ -4442,20 +4460,18 @@ let de = class extends ne {
|
|
|
4442
4460
|
message: this.inputValue
|
|
4443
4461
|
},
|
|
4444
4462
|
cancelable: !0
|
|
4445
|
-
})) && (await
|
|
4463
|
+
})) && (await rt(this, an), us(this, an, this.chatManager.sendUserMessage(this.inputValue))), this.inputValue = "", this.inputElement && (this.inputElement.style.height = "auto"), this.internalDisableInput = !1, setTimeout(() => {
|
|
4446
4464
|
this.focusOnInput();
|
|
4447
4465
|
}, 0));
|
|
4448
4466
|
}
|
|
4449
4467
|
focusOnInput() {
|
|
4450
4468
|
var i;
|
|
4451
|
-
|
|
4452
|
-
e == null || e.focus();
|
|
4469
|
+
(i = this.inputElement) == null || i.focus();
|
|
4453
4470
|
}
|
|
4454
4471
|
scrollChatToBottom() {
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
top: e == null ? void 0 : e.scrollHeight,
|
|
4472
|
+
const { chatContainer: i } = this;
|
|
4473
|
+
i == null || i.scrollTo({
|
|
4474
|
+
top: i == null ? void 0 : i.scrollHeight,
|
|
4459
4475
|
behavior: "smooth"
|
|
4460
4476
|
});
|
|
4461
4477
|
}
|
|
@@ -4504,7 +4520,7 @@ let de = class extends ne {
|
|
|
4504
4520
|
};
|
|
4505
4521
|
Oe = /* @__PURE__ */ new WeakMap();
|
|
4506
4522
|
an = /* @__PURE__ */ new WeakMap();
|
|
4507
|
-
|
|
4523
|
+
ie.styles = [Se, nt`
|
|
4508
4524
|
.header {
|
|
4509
4525
|
background-color: var(--iai-chat-i-header-bg);
|
|
4510
4526
|
color: var(--iai-chat-i-header-fg);
|
|
@@ -4521,34 +4537,40 @@ de.styles = [Ee, tt`
|
|
|
4521
4537
|
color: #8c8c8c;
|
|
4522
4538
|
}
|
|
4523
4539
|
`];
|
|
4524
|
-
|
|
4540
|
+
he([
|
|
4525
4541
|
V({ type: Object })
|
|
4526
|
-
],
|
|
4527
|
-
|
|
4542
|
+
], ie.prototype, "options", 2);
|
|
4543
|
+
he([
|
|
4528
4544
|
V()
|
|
4529
|
-
],
|
|
4530
|
-
|
|
4545
|
+
], ie.prototype, "disableInput", 2);
|
|
4546
|
+
he([
|
|
4531
4547
|
V()
|
|
4532
|
-
],
|
|
4533
|
-
|
|
4548
|
+
], ie.prototype, "showTyping", 2);
|
|
4549
|
+
he([
|
|
4534
4550
|
ft()
|
|
4535
|
-
],
|
|
4536
|
-
|
|
4551
|
+
], ie.prototype, "messages", 2);
|
|
4552
|
+
he([
|
|
4537
4553
|
ft()
|
|
4538
|
-
],
|
|
4539
|
-
|
|
4554
|
+
], ie.prototype, "inputValue", 2);
|
|
4555
|
+
he([
|
|
4540
4556
|
ft()
|
|
4541
|
-
],
|
|
4542
|
-
|
|
4557
|
+
], ie.prototype, "internalDisableInput", 2);
|
|
4558
|
+
he([
|
|
4543
4559
|
ft()
|
|
4544
|
-
],
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
],
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
],
|
|
4551
|
-
|
|
4560
|
+
], ie.prototype, "internalShowTyping", 2);
|
|
4561
|
+
he([
|
|
4562
|
+
An("#chat-container")
|
|
4563
|
+
], ie.prototype, "chatContainer", 2);
|
|
4564
|
+
he([
|
|
4565
|
+
An("#message-input")
|
|
4566
|
+
], ie.prototype, "inputElement", 2);
|
|
4567
|
+
he([
|
|
4568
|
+
vi.debounce(1)
|
|
4569
|
+
], ie.prototype, "scrollChatToBottom", 1);
|
|
4570
|
+
ie = he([
|
|
4571
|
+
Ee("iai-chat")
|
|
4572
|
+
], ie);
|
|
4573
|
+
var Bs = { exports: {} };
|
|
4552
4574
|
(function(i) {
|
|
4553
4575
|
(function(e) {
|
|
4554
4576
|
if (typeof window > "u")
|
|
@@ -4591,7 +4613,7 @@ var Hs = { exports: {} };
|
|
|
4591
4613
|
onInit: function() {
|
|
4592
4614
|
},
|
|
4593
4615
|
onMessage: function() {
|
|
4594
|
-
|
|
4616
|
+
se("onMessage function not defined");
|
|
4595
4617
|
},
|
|
4596
4618
|
onMouseEnter: function() {
|
|
4597
4619
|
},
|
|
@@ -4603,14 +4625,14 @@ var Hs = { exports: {} };
|
|
|
4603
4625
|
return !0;
|
|
4604
4626
|
}
|
|
4605
4627
|
});
|
|
4606
|
-
function
|
|
4628
|
+
function H() {
|
|
4607
4629
|
return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
|
4608
4630
|
}
|
|
4609
|
-
function J(u, v,
|
|
4610
|
-
u.addEventListener(v,
|
|
4631
|
+
function J(u, v, M) {
|
|
4632
|
+
u.addEventListener(v, M, !1);
|
|
4611
4633
|
}
|
|
4612
|
-
function Ce(u, v,
|
|
4613
|
-
u.removeEventListener(v,
|
|
4634
|
+
function Ce(u, v, M) {
|
|
4635
|
+
u.removeEventListener(v, M, !1);
|
|
4614
4636
|
}
|
|
4615
4637
|
function Gt() {
|
|
4616
4638
|
var u = ["moz", "webkit", "o", "ms"], v;
|
|
@@ -4625,34 +4647,34 @@ var Hs = { exports: {} };
|
|
|
4625
4647
|
function Yt(u) {
|
|
4626
4648
|
return o + "[" + Qt(u) + "]";
|
|
4627
4649
|
}
|
|
4628
|
-
function
|
|
4650
|
+
function st(u) {
|
|
4629
4651
|
return c[u] ? c[u].log : n;
|
|
4630
4652
|
}
|
|
4631
4653
|
function P(u, v) {
|
|
4632
|
-
|
|
4654
|
+
Zn("log", u, v, st(u));
|
|
4633
4655
|
}
|
|
4634
|
-
function
|
|
4635
|
-
|
|
4656
|
+
function Ci(u, v) {
|
|
4657
|
+
Zn("info", u, v, st(u));
|
|
4636
4658
|
}
|
|
4637
|
-
function
|
|
4638
|
-
|
|
4659
|
+
function se(u, v) {
|
|
4660
|
+
Zn("warn", u, v, !0);
|
|
4639
4661
|
}
|
|
4640
|
-
function
|
|
4641
|
-
k === !0 && typeof window.console == "object" && console[u](Yt(v),
|
|
4662
|
+
function Zn(u, v, M, k) {
|
|
4663
|
+
k === !0 && typeof window.console == "object" && console[u](Yt(v), M);
|
|
4642
4664
|
}
|
|
4643
4665
|
function or(u) {
|
|
4644
4666
|
function v() {
|
|
4645
4667
|
function b() {
|
|
4646
|
-
|
|
4668
|
+
Pi(j), Oi(E), Le("onResized", j);
|
|
4647
4669
|
}
|
|
4648
|
-
Z("Height"), Z("Width"),
|
|
4670
|
+
Z("Height"), Z("Width"), Ni(b, j, "init");
|
|
4649
4671
|
}
|
|
4650
|
-
function
|
|
4651
|
-
var b =
|
|
4672
|
+
function M() {
|
|
4673
|
+
var b = ae.slice(l).split(":"), C = b[1] ? parseInt(b[1], 10) : 0, U = c[b[0]] && c[b[0]].iframe, B = getComputedStyle(U);
|
|
4652
4674
|
return {
|
|
4653
4675
|
iframe: U,
|
|
4654
4676
|
id: b[0],
|
|
4655
|
-
height: C + k(
|
|
4677
|
+
height: C + k(B) + R(B),
|
|
4656
4678
|
width: b[2],
|
|
4657
4679
|
type: b[3]
|
|
4658
4680
|
};
|
|
@@ -4663,35 +4685,35 @@ var Hs = { exports: {} };
|
|
|
4663
4685
|
var C = b.paddingTop ? parseInt(b.paddingTop, 10) : 0, U = b.paddingBottom ? parseInt(b.paddingBottom, 10) : 0;
|
|
4664
4686
|
return C + U;
|
|
4665
4687
|
}
|
|
4666
|
-
function
|
|
4688
|
+
function R(b) {
|
|
4667
4689
|
if (b.boxSizing !== "border-box")
|
|
4668
4690
|
return 0;
|
|
4669
4691
|
var C = b.borderTopWidth ? parseInt(b.borderTopWidth, 10) : 0, U = b.borderBottomWidth ? parseInt(b.borderBottomWidth, 10) : 0;
|
|
4670
4692
|
return C + U;
|
|
4671
4693
|
}
|
|
4672
4694
|
function Z(b) {
|
|
4673
|
-
var C = Number(c[E]["max" + b]), U = Number(c[E]["min" + b]),
|
|
4674
|
-
P(E, "Checking " +
|
|
4695
|
+
var C = Number(c[E]["max" + b]), U = Number(c[E]["min" + b]), B = b.toLowerCase(), G = Number(j[B]);
|
|
4696
|
+
P(E, "Checking " + B + " is in range " + U + "-" + C), G < U && (G = U, P(E, "Set " + B + " to min value")), G > C && (G = C, P(E, "Set " + B + " to max value")), j[B] = "" + G;
|
|
4675
4697
|
}
|
|
4676
|
-
function
|
|
4698
|
+
function pe() {
|
|
4677
4699
|
function b() {
|
|
4678
|
-
function
|
|
4679
|
-
var X = 0,
|
|
4700
|
+
function B() {
|
|
4701
|
+
var X = 0, xe = !1;
|
|
4680
4702
|
for (P(
|
|
4681
4703
|
E,
|
|
4682
4704
|
"Checking connection is from allowed list of origins: " + U
|
|
4683
4705
|
); X < U.length; X++)
|
|
4684
4706
|
if (U[X] === C) {
|
|
4685
|
-
|
|
4707
|
+
xe = !0;
|
|
4686
4708
|
break;
|
|
4687
4709
|
}
|
|
4688
|
-
return
|
|
4710
|
+
return xe;
|
|
4689
4711
|
}
|
|
4690
4712
|
function G() {
|
|
4691
4713
|
var X = c[E] && c[E].remoteHost;
|
|
4692
4714
|
return P(E, "Checking connection is from: " + X), C === X;
|
|
4693
4715
|
}
|
|
4694
|
-
return U.constructor === Array ?
|
|
4716
|
+
return U.constructor === Array ? B() : G();
|
|
4695
4717
|
}
|
|
4696
4718
|
var C = u.origin, U = c[E] && c[E].checkOrigin;
|
|
4697
4719
|
if (U && "" + C != "null" && !b())
|
|
@@ -4701,14 +4723,14 @@ var Hs = { exports: {} };
|
|
|
4701
4723
|
return !0;
|
|
4702
4724
|
}
|
|
4703
4725
|
function Ze() {
|
|
4704
|
-
return o === ("" +
|
|
4726
|
+
return o === ("" + ae).slice(0, l) && ae.slice(l).split(":")[0] in c;
|
|
4705
4727
|
}
|
|
4706
|
-
function
|
|
4728
|
+
function be() {
|
|
4707
4729
|
var b = j.type in { true: 1, false: 1, undefined: 1 };
|
|
4708
4730
|
return b && P(E, "Ignoring init message from meta parent page"), b;
|
|
4709
4731
|
}
|
|
4710
|
-
function
|
|
4711
|
-
return
|
|
4732
|
+
function we(b) {
|
|
4733
|
+
return ae.slice(ae.indexOf(":") + a + b);
|
|
4712
4734
|
}
|
|
4713
4735
|
function Ae(b) {
|
|
4714
4736
|
P(
|
|
@@ -4719,7 +4741,7 @@ var Hs = { exports: {} };
|
|
|
4719
4741
|
message: JSON.parse(b)
|
|
4720
4742
|
}), P(E, "--");
|
|
4721
4743
|
}
|
|
4722
|
-
function
|
|
4744
|
+
function Wn() {
|
|
4723
4745
|
var b = document.body.getBoundingClientRect(), C = j.iframe.getBoundingClientRect();
|
|
4724
4746
|
return JSON.stringify({
|
|
4725
4747
|
iframeHeight: C.height,
|
|
@@ -4744,17 +4766,17 @@ var Hs = { exports: {} };
|
|
|
4744
4766
|
}
|
|
4745
4767
|
function Xt(b, C) {
|
|
4746
4768
|
function U() {
|
|
4747
|
-
|
|
4769
|
+
ue("Send Page Info", "pageInfo:" + Wn(), b, C);
|
|
4748
4770
|
}
|
|
4749
4771
|
cr(U, 32, C);
|
|
4750
4772
|
}
|
|
4751
|
-
function
|
|
4773
|
+
function Fn() {
|
|
4752
4774
|
function b(G, X) {
|
|
4753
|
-
function
|
|
4754
|
-
c[
|
|
4775
|
+
function xe() {
|
|
4776
|
+
c[B] ? Xt(c[B].iframe, B) : C();
|
|
4755
4777
|
}
|
|
4756
|
-
["scroll", "resize"].forEach(function(
|
|
4757
|
-
P(
|
|
4778
|
+
["scroll", "resize"].forEach(function(Di) {
|
|
4779
|
+
P(B, G + Di + " listener for sendPageInfo"), X(window, Di, xe);
|
|
4758
4780
|
});
|
|
4759
4781
|
}
|
|
4760
4782
|
function C() {
|
|
@@ -4763,19 +4785,19 @@ var Hs = { exports: {} };
|
|
|
4763
4785
|
function U() {
|
|
4764
4786
|
b("Add ", J);
|
|
4765
4787
|
}
|
|
4766
|
-
var
|
|
4767
|
-
U(), c[
|
|
4788
|
+
var B = E;
|
|
4789
|
+
U(), c[B] && (c[B].stopPageInfo = C);
|
|
4768
4790
|
}
|
|
4769
|
-
function
|
|
4791
|
+
function Vn() {
|
|
4770
4792
|
c[E] && c[E].stopPageInfo && (c[E].stopPageInfo(), delete c[E].stopPageInfo);
|
|
4771
4793
|
}
|
|
4772
|
-
function
|
|
4794
|
+
function qn() {
|
|
4773
4795
|
var b = !0;
|
|
4774
|
-
return j.iframe === null && (
|
|
4796
|
+
return j.iframe === null && (se(E, "IFrame (" + j.id + ") not found"), b = !1), b;
|
|
4775
4797
|
}
|
|
4776
4798
|
function _(b) {
|
|
4777
4799
|
var C = b.getBoundingClientRect();
|
|
4778
|
-
return
|
|
4800
|
+
return Ii(E), {
|
|
4779
4801
|
x: Math.floor(Number(C.left) + Number(d.x)),
|
|
4780
4802
|
y: Math.floor(Number(C.top) + Number(d.y))
|
|
4781
4803
|
};
|
|
@@ -4790,11 +4812,11 @@ var Hs = { exports: {} };
|
|
|
4790
4812
|
y: Number(j.height) + G.y
|
|
4791
4813
|
};
|
|
4792
4814
|
}
|
|
4793
|
-
function
|
|
4815
|
+
function B() {
|
|
4794
4816
|
window.parentIFrame ? window.parentIFrame["scrollTo" + (b ? "Offset" : "")](
|
|
4795
4817
|
X.x,
|
|
4796
4818
|
X.y
|
|
4797
|
-
) :
|
|
4819
|
+
) : se(
|
|
4798
4820
|
E,
|
|
4799
4821
|
"Unable to scroll to requested position, window.parentIFrame not found"
|
|
4800
4822
|
);
|
|
@@ -4803,35 +4825,35 @@ var Hs = { exports: {} };
|
|
|
4803
4825
|
P(
|
|
4804
4826
|
E,
|
|
4805
4827
|
"Reposition requested from iFrame (offset x:" + G.x + " y:" + G.y + ")"
|
|
4806
|
-
), window.top === window.self ? C() :
|
|
4828
|
+
), window.top === window.self ? C() : B();
|
|
4807
4829
|
}
|
|
4808
4830
|
function K() {
|
|
4809
|
-
Le("onScroll", d) === !1 ?
|
|
4831
|
+
Le("onScroll", d) === !1 ? Mi() : Oi(E);
|
|
4810
4832
|
}
|
|
4811
4833
|
function Q(b) {
|
|
4812
4834
|
function C() {
|
|
4813
|
-
var
|
|
4835
|
+
var xe = _(X);
|
|
4814
4836
|
P(
|
|
4815
4837
|
E,
|
|
4816
|
-
"Moving to in page link (#" +
|
|
4838
|
+
"Moving to in page link (#" + B + ") at x: " + xe.x + " y: " + xe.y
|
|
4817
4839
|
), d = {
|
|
4818
|
-
x:
|
|
4819
|
-
y:
|
|
4840
|
+
x: xe.x,
|
|
4841
|
+
y: xe.y
|
|
4820
4842
|
}, K(), P(E, "--");
|
|
4821
4843
|
}
|
|
4822
4844
|
function U() {
|
|
4823
|
-
window.parentIFrame ? window.parentIFrame.moveToAnchor(
|
|
4845
|
+
window.parentIFrame ? window.parentIFrame.moveToAnchor(B) : P(
|
|
4824
4846
|
E,
|
|
4825
|
-
"In page link #" +
|
|
4847
|
+
"In page link #" + B + " not found and window.parentIFrame not found"
|
|
4826
4848
|
);
|
|
4827
4849
|
}
|
|
4828
|
-
var
|
|
4829
|
-
X ? C() : window.top === window.self ? P(E, "In page link #" +
|
|
4850
|
+
var B = b.split("#")[1] || "", G = decodeURIComponent(B), X = document.getElementById(G) || document.getElementsByName(G)[0];
|
|
4851
|
+
X ? C() : window.top === window.self ? P(E, "In page link #" + B + " not found") : U();
|
|
4830
4852
|
}
|
|
4831
|
-
function
|
|
4853
|
+
function re(b) {
|
|
4832
4854
|
var C = {};
|
|
4833
4855
|
if (Number(j.width) === 0 && Number(j.height) === 0) {
|
|
4834
|
-
var U =
|
|
4856
|
+
var U = we(9).split(":");
|
|
4835
4857
|
C = {
|
|
4836
4858
|
x: U[1],
|
|
4837
4859
|
y: U[0]
|
|
@@ -4849,28 +4871,28 @@ var Hs = { exports: {} };
|
|
|
4849
4871
|
});
|
|
4850
4872
|
}
|
|
4851
4873
|
function Le(b, C) {
|
|
4852
|
-
return
|
|
4874
|
+
return Ln(E, b, C);
|
|
4853
4875
|
}
|
|
4854
|
-
function
|
|
4855
|
-
switch (c[E] && c[E].firstRun &&
|
|
4876
|
+
function Kn() {
|
|
4877
|
+
switch (c[E] && c[E].firstRun && Qn(), j.type) {
|
|
4856
4878
|
case "close": {
|
|
4857
|
-
|
|
4879
|
+
Dn(j.iframe);
|
|
4858
4880
|
break;
|
|
4859
4881
|
}
|
|
4860
4882
|
case "message": {
|
|
4861
|
-
Ae(
|
|
4883
|
+
Ae(we(6));
|
|
4862
4884
|
break;
|
|
4863
4885
|
}
|
|
4864
4886
|
case "mouseenter": {
|
|
4865
|
-
|
|
4887
|
+
re("onMouseEnter");
|
|
4866
4888
|
break;
|
|
4867
4889
|
}
|
|
4868
4890
|
case "mouseleave": {
|
|
4869
|
-
|
|
4891
|
+
re("onMouseLeave");
|
|
4870
4892
|
break;
|
|
4871
4893
|
}
|
|
4872
4894
|
case "autoResize": {
|
|
4873
|
-
c[E].autoResize = JSON.parse(
|
|
4895
|
+
c[E].autoResize = JSON.parse(we(9));
|
|
4874
4896
|
break;
|
|
4875
4897
|
}
|
|
4876
4898
|
case "scrollTo": {
|
|
@@ -4885,15 +4907,15 @@ var Hs = { exports: {} };
|
|
|
4885
4907
|
Xt(
|
|
4886
4908
|
c[E] && c[E].iframe,
|
|
4887
4909
|
E
|
|
4888
|
-
),
|
|
4910
|
+
), Fn();
|
|
4889
4911
|
break;
|
|
4890
4912
|
}
|
|
4891
4913
|
case "pageInfoStop": {
|
|
4892
|
-
|
|
4914
|
+
Vn();
|
|
4893
4915
|
break;
|
|
4894
4916
|
}
|
|
4895
4917
|
case "inPageLink": {
|
|
4896
|
-
Q(
|
|
4918
|
+
Q(we(9));
|
|
4897
4919
|
break;
|
|
4898
4920
|
}
|
|
4899
4921
|
case "reset": {
|
|
@@ -4905,62 +4927,62 @@ var Hs = { exports: {} };
|
|
|
4905
4927
|
break;
|
|
4906
4928
|
}
|
|
4907
4929
|
default:
|
|
4908
|
-
Number(j.width) === 0 && Number(j.height) === 0 ?
|
|
4930
|
+
Number(j.width) === 0 && Number(j.height) === 0 ? se(
|
|
4909
4931
|
"Unsupported message received (" + j.type + "), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"
|
|
4910
4932
|
) : v();
|
|
4911
4933
|
}
|
|
4912
4934
|
}
|
|
4913
|
-
function
|
|
4935
|
+
function Jn(b) {
|
|
4914
4936
|
var C = !0;
|
|
4915
|
-
return c[b] || (C = !1,
|
|
4916
|
-
j.type + " No settings for " + b + ". Message was: " +
|
|
4937
|
+
return c[b] || (C = !1, se(
|
|
4938
|
+
j.type + " No settings for " + b + ". Message was: " + ae
|
|
4917
4939
|
)), C;
|
|
4918
4940
|
}
|
|
4919
|
-
function
|
|
4941
|
+
function Gn() {
|
|
4920
4942
|
for (var b in c)
|
|
4921
|
-
|
|
4943
|
+
ue(
|
|
4922
4944
|
"iFrame requested init",
|
|
4923
|
-
|
|
4945
|
+
ji(b),
|
|
4924
4946
|
c[b].iframe,
|
|
4925
4947
|
b
|
|
4926
4948
|
);
|
|
4927
4949
|
}
|
|
4928
|
-
function
|
|
4950
|
+
function Qn() {
|
|
4929
4951
|
c[E] && (c[E].firstRun = !1);
|
|
4930
4952
|
}
|
|
4931
|
-
var
|
|
4932
|
-
|
|
4953
|
+
var ae = u.data, j = {}, E = null;
|
|
4954
|
+
ae === "[iFrameResizerChild]Ready" ? Gn() : Ze() ? (j = M(), E = j.id, c[E] && (c[E].loaded = !0), !be() && Jn(E) && (P(E, "Received: " + ae), qn() && pe() && Kn())) : Ci(E, "Ignored: " + ae);
|
|
4933
4955
|
}
|
|
4934
|
-
function
|
|
4935
|
-
var k = null,
|
|
4956
|
+
function Ln(u, v, M) {
|
|
4957
|
+
var k = null, R = null;
|
|
4936
4958
|
if (c[u])
|
|
4937
4959
|
if (k = c[u][v], typeof k == "function")
|
|
4938
|
-
|
|
4960
|
+
R = k(M);
|
|
4939
4961
|
else
|
|
4940
4962
|
throw new TypeError(
|
|
4941
4963
|
v + " on iFrame[" + u + "] is not a function"
|
|
4942
4964
|
);
|
|
4943
|
-
return
|
|
4965
|
+
return R;
|
|
4944
4966
|
}
|
|
4945
|
-
function
|
|
4967
|
+
function Ai(u) {
|
|
4946
4968
|
var v = u.id;
|
|
4947
4969
|
delete c[v];
|
|
4948
4970
|
}
|
|
4949
|
-
function
|
|
4971
|
+
function Dn(u) {
|
|
4950
4972
|
var v = u.id;
|
|
4951
|
-
if (
|
|
4973
|
+
if (Ln(v, "onClose", v) === !1) {
|
|
4952
4974
|
P(v, "Close iframe cancelled by onClose event");
|
|
4953
4975
|
return;
|
|
4954
4976
|
}
|
|
4955
4977
|
P(v, "Removing iFrame: " + v);
|
|
4956
4978
|
try {
|
|
4957
4979
|
u.parentNode && u.parentNode.removeChild(u);
|
|
4958
|
-
} catch (
|
|
4959
|
-
|
|
4980
|
+
} catch (M) {
|
|
4981
|
+
se(M);
|
|
4960
4982
|
}
|
|
4961
|
-
|
|
4983
|
+
Ln(v, "onClosed", v), P(v, "--"), Ai(u);
|
|
4962
4984
|
}
|
|
4963
|
-
function
|
|
4985
|
+
function Ii(u) {
|
|
4964
4986
|
d === null && (d = {
|
|
4965
4987
|
x: window.pageXOffset === e ? document.documentElement.scrollLeft : window.pageXOffset,
|
|
4966
4988
|
y: window.pageYOffset === e ? document.documentElement.scrollTop : window.pageYOffset
|
|
@@ -4969,25 +4991,25 @@ var Hs = { exports: {} };
|
|
|
4969
4991
|
"Get page position: " + d.x + "," + d.y
|
|
4970
4992
|
));
|
|
4971
4993
|
}
|
|
4972
|
-
function
|
|
4994
|
+
function Oi(u) {
|
|
4973
4995
|
d !== null && (window.scrollTo(d.x, d.y), P(
|
|
4974
4996
|
u,
|
|
4975
4997
|
"Set page position: " + d.x + "," + d.y
|
|
4976
|
-
),
|
|
4998
|
+
), Mi());
|
|
4977
4999
|
}
|
|
4978
|
-
function
|
|
5000
|
+
function Mi() {
|
|
4979
5001
|
d = null;
|
|
4980
5002
|
}
|
|
4981
5003
|
function Ri(u) {
|
|
4982
5004
|
function v() {
|
|
4983
|
-
|
|
5005
|
+
Pi(u), ue("reset", "reset", u.iframe, u.id);
|
|
4984
5006
|
}
|
|
4985
5007
|
P(
|
|
4986
5008
|
u.id,
|
|
4987
5009
|
"Size reset requested by " + (u.type === "init" ? "host page" : "iFrame")
|
|
4988
|
-
),
|
|
5010
|
+
), Ii(u.id), Ni(v, u, "reset");
|
|
4989
5011
|
}
|
|
4990
|
-
function
|
|
5012
|
+
function Pi(u) {
|
|
4991
5013
|
function v(Z) {
|
|
4992
5014
|
if (!u.id) {
|
|
4993
5015
|
P("undefined", "messageData id not set");
|
|
@@ -4995,62 +5017,62 @@ var Hs = { exports: {} };
|
|
|
4995
5017
|
}
|
|
4996
5018
|
u.iframe.style[Z] = u[Z] + "px", P(
|
|
4997
5019
|
u.id,
|
|
4998
|
-
"IFrame (" +
|
|
5020
|
+
"IFrame (" + R + ") " + Z + " set to " + u[Z] + "px"
|
|
4999
5021
|
);
|
|
5000
5022
|
}
|
|
5001
|
-
function
|
|
5002
|
-
!s && u[Z] === "0" && (s = !0, P(
|
|
5023
|
+
function M(Z) {
|
|
5024
|
+
!s && u[Z] === "0" && (s = !0, P(R, "Hidden iFrame detected, creating visibility listener"), dr());
|
|
5003
5025
|
}
|
|
5004
5026
|
function k(Z) {
|
|
5005
|
-
v(Z),
|
|
5027
|
+
v(Z), M(Z);
|
|
5006
5028
|
}
|
|
5007
|
-
var
|
|
5008
|
-
c[
|
|
5029
|
+
var R = u.iframe.id;
|
|
5030
|
+
c[R] && (c[R].sizeHeight && k("height"), c[R].sizeWidth && k("width"));
|
|
5009
5031
|
}
|
|
5010
|
-
function
|
|
5011
|
-
|
|
5032
|
+
function Ni(u, v, M) {
|
|
5033
|
+
M !== v.type && h && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
|
|
5012
5034
|
!window.jasmine ? (P(v.id, "Requesting animation frame"), h(u)) : u();
|
|
5013
5035
|
}
|
|
5014
|
-
function
|
|
5036
|
+
function ue(u, v, M, k, R) {
|
|
5015
5037
|
function Z() {
|
|
5016
5038
|
var Ae = c[k] && c[k].targetOrigin;
|
|
5017
5039
|
P(
|
|
5018
5040
|
k,
|
|
5019
5041
|
"[" + u + "] Sending msg to iframe[" + k + "] (" + v + ") targetOrigin: " + Ae
|
|
5020
|
-
),
|
|
5042
|
+
), M.contentWindow.postMessage(o + v, Ae);
|
|
5021
5043
|
}
|
|
5022
|
-
function
|
|
5023
|
-
|
|
5044
|
+
function pe() {
|
|
5045
|
+
se(k, "[" + u + "] IFrame(" + k + ") not found");
|
|
5024
5046
|
}
|
|
5025
5047
|
function Ze() {
|
|
5026
|
-
|
|
5048
|
+
M && "contentWindow" in M && M.contentWindow !== null ? Z() : pe();
|
|
5027
5049
|
}
|
|
5028
|
-
function
|
|
5050
|
+
function be() {
|
|
5029
5051
|
function Ae() {
|
|
5030
|
-
c[k] && !c[k].loaded && !
|
|
5052
|
+
c[k] && !c[k].loaded && !we && (we = !0, se(
|
|
5031
5053
|
k,
|
|
5032
5054
|
"IFrame has not responded within " + c[k].warningTimeout / 1e3 + " seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."
|
|
5033
5055
|
));
|
|
5034
5056
|
}
|
|
5035
|
-
|
|
5057
|
+
R && c[k] && c[k].warningTimeout && (c[k].msgTimeout = setTimeout(
|
|
5036
5058
|
Ae,
|
|
5037
5059
|
c[k].warningTimeout
|
|
5038
5060
|
));
|
|
5039
5061
|
}
|
|
5040
|
-
var
|
|
5041
|
-
k = k ||
|
|
5062
|
+
var we = !1;
|
|
5063
|
+
k = k || M.id, c[k] && (Ze(), be());
|
|
5042
5064
|
}
|
|
5043
|
-
function
|
|
5065
|
+
function ji(u) {
|
|
5044
5066
|
return u + ":" + c[u].bodyMarginV1 + ":" + c[u].sizeWidth + ":" + c[u].log + ":" + c[u].interval + ":" + c[u].enablePublicMethods + ":" + c[u].autoResize + ":" + c[u].bodyMargin + ":" + c[u].heightCalculationMethod + ":" + c[u].bodyBackground + ":" + c[u].bodyPadding + ":" + c[u].tolerance + ":" + c[u].inPageLinks + ":" + c[u].resizeFrom + ":" + c[u].widthCalculationMethod + ":" + c[u].mouseEvents;
|
|
5045
5067
|
}
|
|
5046
5068
|
function lr(u) {
|
|
5047
5069
|
return typeof u == "number";
|
|
5048
5070
|
}
|
|
5049
|
-
function
|
|
5050
|
-
function
|
|
5071
|
+
function zi(u, v) {
|
|
5072
|
+
function M() {
|
|
5051
5073
|
function $(Q) {
|
|
5052
|
-
var
|
|
5053
|
-
|
|
5074
|
+
var re = c[_][Q];
|
|
5075
|
+
re !== 1 / 0 && re !== 0 && (u.style[Q] = lr(re) ? re + "px" : re, P(_, "Set " + Q + " = " + u.style[Q]));
|
|
5054
5076
|
}
|
|
5055
5077
|
function K(Q) {
|
|
5056
5078
|
if (c[_]["min" + Q] > c[_]["max" + Q])
|
|
@@ -5064,7 +5086,7 @@ var Hs = { exports: {} };
|
|
|
5064
5086
|
var $ = v && v.id || O.id + t++;
|
|
5065
5087
|
return document.getElementById($) !== null && ($ += t++), $;
|
|
5066
5088
|
}
|
|
5067
|
-
function
|
|
5089
|
+
function R($) {
|
|
5068
5090
|
if (typeof $ != "string")
|
|
5069
5091
|
throw new TypeError("Invaild id for iFrame. Expected String");
|
|
5070
5092
|
return $ === "" && (u.id = $ = k(), n = (v || {}).log, P(
|
|
@@ -5091,28 +5113,28 @@ var Hs = { exports: {} };
|
|
|
5091
5113
|
u.scrolling = c[_] ? c[_].scrolling : "no";
|
|
5092
5114
|
}
|
|
5093
5115
|
}
|
|
5094
|
-
function
|
|
5116
|
+
function pe() {
|
|
5095
5117
|
(typeof (c[_] && c[_].bodyMargin) == "number" || (c[_] && c[_].bodyMargin) === "0") && (c[_].bodyMarginV1 = c[_].bodyMargin, c[_].bodyMargin = "" + c[_].bodyMargin + "px");
|
|
5096
5118
|
}
|
|
5097
5119
|
function Ze() {
|
|
5098
5120
|
var $ = c[_] && c[_].firstRun, K = c[_] && c[_].heightCalculationMethod in p;
|
|
5099
5121
|
!$ && K && Ri({ iframe: u, height: 0, width: 0, type: "init" });
|
|
5100
5122
|
}
|
|
5101
|
-
function
|
|
5123
|
+
function be() {
|
|
5102
5124
|
c[_] && (c[_].iframe.iFrameResizer = {
|
|
5103
|
-
close:
|
|
5104
|
-
removeListeners:
|
|
5125
|
+
close: Dn.bind(null, c[_].iframe),
|
|
5126
|
+
removeListeners: Ai.bind(
|
|
5105
5127
|
null,
|
|
5106
5128
|
c[_].iframe
|
|
5107
5129
|
),
|
|
5108
|
-
resize:
|
|
5130
|
+
resize: ue.bind(
|
|
5109
5131
|
null,
|
|
5110
5132
|
"Window resize",
|
|
5111
5133
|
"resize",
|
|
5112
5134
|
c[_].iframe
|
|
5113
5135
|
),
|
|
5114
5136
|
moveToAnchor: function($) {
|
|
5115
|
-
|
|
5137
|
+
ue(
|
|
5116
5138
|
"Move to anchor",
|
|
5117
5139
|
"moveToAnchor:" + $,
|
|
5118
5140
|
c[_].iframe,
|
|
@@ -5120,7 +5142,7 @@ var Hs = { exports: {} };
|
|
|
5120
5142
|
);
|
|
5121
5143
|
},
|
|
5122
5144
|
sendMessage: function($) {
|
|
5123
|
-
$ = JSON.stringify($),
|
|
5145
|
+
$ = JSON.stringify($), ue(
|
|
5124
5146
|
"Send Message",
|
|
5125
5147
|
"message:" + $,
|
|
5126
5148
|
c[_].iframe,
|
|
@@ -5129,33 +5151,33 @@ var Hs = { exports: {} };
|
|
|
5129
5151
|
}
|
|
5130
5152
|
});
|
|
5131
5153
|
}
|
|
5132
|
-
function
|
|
5154
|
+
function we($) {
|
|
5133
5155
|
function K() {
|
|
5134
|
-
|
|
5156
|
+
ue("iFrame.onload", $, u, e, !0), Ze();
|
|
5135
5157
|
}
|
|
5136
5158
|
function Q(Le) {
|
|
5137
5159
|
if (u.parentNode) {
|
|
5138
|
-
var
|
|
5139
|
-
|
|
5140
|
-
var
|
|
5141
|
-
|
|
5142
|
-
|
|
5160
|
+
var Kn = new Le(function(Jn) {
|
|
5161
|
+
Jn.forEach(function(Gn) {
|
|
5162
|
+
var Qn = Array.prototype.slice.call(Gn.removedNodes);
|
|
5163
|
+
Qn.forEach(function(ae) {
|
|
5164
|
+
ae === u && Dn(u);
|
|
5143
5165
|
});
|
|
5144
5166
|
});
|
|
5145
5167
|
});
|
|
5146
|
-
|
|
5168
|
+
Kn.observe(u.parentNode, {
|
|
5147
5169
|
childList: !0
|
|
5148
5170
|
});
|
|
5149
5171
|
}
|
|
5150
5172
|
}
|
|
5151
|
-
var
|
|
5152
|
-
|
|
5173
|
+
var re = H();
|
|
5174
|
+
re && Q(re), J(u, "load", K), ue("init", $, u, e, !0);
|
|
5153
5175
|
}
|
|
5154
5176
|
function Ae($) {
|
|
5155
5177
|
if (typeof $ != "object")
|
|
5156
5178
|
throw new TypeError("Options is not an object");
|
|
5157
5179
|
}
|
|
5158
|
-
function
|
|
5180
|
+
function Wn($) {
|
|
5159
5181
|
for (var K in O)
|
|
5160
5182
|
Object.prototype.hasOwnProperty.call(O, K) && (c[_][K] = Object.prototype.hasOwnProperty.call(
|
|
5161
5183
|
$,
|
|
@@ -5165,46 +5187,46 @@ var Hs = { exports: {} };
|
|
|
5165
5187
|
function Xt($) {
|
|
5166
5188
|
return $ === "" || $.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : $;
|
|
5167
5189
|
}
|
|
5168
|
-
function
|
|
5190
|
+
function Fn($) {
|
|
5169
5191
|
var K = $.split("Callback");
|
|
5170
5192
|
if (K.length === 2) {
|
|
5171
5193
|
var Q = "on" + K[0].charAt(0).toUpperCase() + K[0].slice(1);
|
|
5172
|
-
this[Q] = this[$], delete this[$],
|
|
5194
|
+
this[Q] = this[$], delete this[$], se(
|
|
5173
5195
|
_,
|
|
5174
5196
|
"Deprecated: '" + $ + "' has been renamed '" + Q + "'. The old method will be removed in the next major version."
|
|
5175
5197
|
);
|
|
5176
5198
|
}
|
|
5177
5199
|
}
|
|
5178
|
-
function
|
|
5179
|
-
$ = $ || {}, c[_] = /* @__PURE__ */ Object.create(null), c[_].iframe = u, c[_].firstRun = !0, c[_].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Ae($), Object.keys($).forEach(
|
|
5200
|
+
function Vn($) {
|
|
5201
|
+
$ = $ || {}, c[_] = /* @__PURE__ */ Object.create(null), c[_].iframe = u, c[_].firstRun = !0, c[_].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Ae($), Object.keys($).forEach(Fn, $), Wn($), c[_] && (c[_].targetOrigin = c[_].checkOrigin === !0 ? Xt(c[_].remoteHost) : "*");
|
|
5180
5202
|
}
|
|
5181
|
-
function
|
|
5203
|
+
function qn() {
|
|
5182
5204
|
return _ in c && "iFrameResizer" in u;
|
|
5183
5205
|
}
|
|
5184
|
-
var _ =
|
|
5185
|
-
|
|
5206
|
+
var _ = R(u.id);
|
|
5207
|
+
qn() ? se(_, "Ignored iFrame, already setup.") : (Vn(v), Z(), M(), pe(), we(ji(_)), be());
|
|
5186
5208
|
}
|
|
5187
|
-
function
|
|
5209
|
+
function Un(u, v) {
|
|
5188
5210
|
f === null && (f = setTimeout(function() {
|
|
5189
5211
|
f = null, u();
|
|
5190
5212
|
}, v));
|
|
5191
5213
|
}
|
|
5192
|
-
var
|
|
5193
|
-
function cr(u, v,
|
|
5194
|
-
|
|
5195
|
-
|
|
5214
|
+
var Hn = {};
|
|
5215
|
+
function cr(u, v, M) {
|
|
5216
|
+
Hn[M] || (Hn[M] = setTimeout(function() {
|
|
5217
|
+
Hn[M] = null, u();
|
|
5196
5218
|
}, v));
|
|
5197
5219
|
}
|
|
5198
5220
|
function dr() {
|
|
5199
5221
|
function u() {
|
|
5200
|
-
function
|
|
5201
|
-
function
|
|
5202
|
-
return (c[Z] && c[Z].iframe.style[
|
|
5222
|
+
function R(Z) {
|
|
5223
|
+
function pe(be) {
|
|
5224
|
+
return (c[Z] && c[Z].iframe.style[be]) === "0px";
|
|
5203
5225
|
}
|
|
5204
|
-
function Ze(
|
|
5205
|
-
return
|
|
5226
|
+
function Ze(be) {
|
|
5227
|
+
return be.offsetParent !== null;
|
|
5206
5228
|
}
|
|
5207
|
-
c[Z] && Ze(c[Z].iframe) && (
|
|
5229
|
+
c[Z] && Ze(c[Z].iframe) && (pe("height") || pe("width")) && ue(
|
|
5208
5230
|
"Visibility change",
|
|
5209
5231
|
"resize",
|
|
5210
5232
|
c[Z].iframe,
|
|
@@ -5212,112 +5234,112 @@ var Hs = { exports: {} };
|
|
|
5212
5234
|
);
|
|
5213
5235
|
}
|
|
5214
5236
|
Object.keys(c).forEach(function(Z) {
|
|
5215
|
-
|
|
5237
|
+
R(Z);
|
|
5216
5238
|
});
|
|
5217
5239
|
}
|
|
5218
|
-
function v(
|
|
5240
|
+
function v(R) {
|
|
5219
5241
|
P(
|
|
5220
5242
|
"window",
|
|
5221
|
-
"Mutation observed: " +
|
|
5222
|
-
),
|
|
5243
|
+
"Mutation observed: " + R[0].target + " " + R[0].type
|
|
5244
|
+
), Un(u, 16);
|
|
5223
5245
|
}
|
|
5224
|
-
function
|
|
5225
|
-
var
|
|
5246
|
+
function M() {
|
|
5247
|
+
var R = document.querySelector("body"), Z = {
|
|
5226
5248
|
attributes: !0,
|
|
5227
5249
|
attributeOldValue: !1,
|
|
5228
5250
|
characterData: !0,
|
|
5229
5251
|
characterDataOldValue: !1,
|
|
5230
5252
|
childList: !0,
|
|
5231
5253
|
subtree: !0
|
|
5232
|
-
},
|
|
5233
|
-
|
|
5254
|
+
}, pe = new k(v);
|
|
5255
|
+
pe.observe(R, Z);
|
|
5234
5256
|
}
|
|
5235
|
-
var k =
|
|
5236
|
-
k &&
|
|
5257
|
+
var k = H();
|
|
5258
|
+
k && M();
|
|
5237
5259
|
}
|
|
5238
5260
|
function hr(u) {
|
|
5239
5261
|
function v() {
|
|
5240
|
-
|
|
5262
|
+
Li("Window " + u, "resize");
|
|
5241
5263
|
}
|
|
5242
|
-
P("window", "Trigger event: " + u),
|
|
5264
|
+
P("window", "Trigger event: " + u), Un(v, 16);
|
|
5243
5265
|
}
|
|
5244
|
-
function
|
|
5266
|
+
function Zi() {
|
|
5245
5267
|
function u() {
|
|
5246
|
-
|
|
5268
|
+
Li("Tab Visible", "resize");
|
|
5247
5269
|
}
|
|
5248
|
-
document.visibilityState !== "hidden" && (P("document", "Trigger event: Visibility change"),
|
|
5270
|
+
document.visibilityState !== "hidden" && (P("document", "Trigger event: Visibility change"), Un(u, 16));
|
|
5249
5271
|
}
|
|
5250
|
-
function
|
|
5251
|
-
function
|
|
5272
|
+
function Li(u, v) {
|
|
5273
|
+
function M(k) {
|
|
5252
5274
|
return c[k] && c[k].resizeFrom === "parent" && c[k].autoResize && !c[k].firstRun;
|
|
5253
5275
|
}
|
|
5254
5276
|
Object.keys(c).forEach(function(k) {
|
|
5255
|
-
|
|
5277
|
+
M(k) && ue(u, v, c[k].iframe, k);
|
|
5256
5278
|
});
|
|
5257
5279
|
}
|
|
5258
5280
|
function ur() {
|
|
5259
5281
|
J(window, "message", or), J(window, "resize", function() {
|
|
5260
5282
|
hr("resize");
|
|
5261
|
-
}), J(document, "visibilitychange",
|
|
5283
|
+
}), J(document, "visibilitychange", Zi), J(document, "-webkit-visibilitychange", Zi);
|
|
5262
5284
|
}
|
|
5263
5285
|
function Bn() {
|
|
5264
|
-
function u(k,
|
|
5286
|
+
function u(k, R) {
|
|
5265
5287
|
function Z() {
|
|
5266
|
-
if (
|
|
5267
|
-
if (
|
|
5288
|
+
if (R.tagName) {
|
|
5289
|
+
if (R.tagName.toUpperCase() !== "IFRAME")
|
|
5268
5290
|
throw new TypeError(
|
|
5269
|
-
"Expected <IFRAME> tag, found <" +
|
|
5291
|
+
"Expected <IFRAME> tag, found <" + R.tagName + ">"
|
|
5270
5292
|
);
|
|
5271
5293
|
} else
|
|
5272
5294
|
throw new TypeError("Object is not a valid DOM element");
|
|
5273
5295
|
}
|
|
5274
|
-
|
|
5296
|
+
R && (Z(), zi(R, k), M.push(R));
|
|
5275
5297
|
}
|
|
5276
5298
|
function v(k) {
|
|
5277
|
-
k && k.enablePublicMethods &&
|
|
5299
|
+
k && k.enablePublicMethods && se(
|
|
5278
5300
|
"enablePublicMethods option has been removed, public methods are now always available in the iFrame"
|
|
5279
5301
|
);
|
|
5280
5302
|
}
|
|
5281
|
-
var
|
|
5282
|
-
return Gt(), ur(), function(k,
|
|
5283
|
-
switch (
|
|
5303
|
+
var M;
|
|
5304
|
+
return Gt(), ur(), function(k, R) {
|
|
5305
|
+
switch (M = [], v(k), typeof R) {
|
|
5284
5306
|
case "undefined":
|
|
5285
5307
|
case "string": {
|
|
5286
5308
|
Array.prototype.forEach.call(
|
|
5287
|
-
document.querySelectorAll(
|
|
5309
|
+
document.querySelectorAll(R || "iframe"),
|
|
5288
5310
|
u.bind(e, k)
|
|
5289
5311
|
);
|
|
5290
5312
|
break;
|
|
5291
5313
|
}
|
|
5292
5314
|
case "object": {
|
|
5293
|
-
u(k,
|
|
5315
|
+
u(k, R);
|
|
5294
5316
|
break;
|
|
5295
5317
|
}
|
|
5296
5318
|
default:
|
|
5297
|
-
throw new TypeError("Unexpected data type (" + typeof
|
|
5319
|
+
throw new TypeError("Unexpected data type (" + typeof R + ")");
|
|
5298
5320
|
}
|
|
5299
|
-
return
|
|
5321
|
+
return M;
|
|
5300
5322
|
};
|
|
5301
5323
|
}
|
|
5302
5324
|
function pr(u) {
|
|
5303
5325
|
u.fn ? u.fn.iFrameResize || (u.fn.iFrameResize = function(v) {
|
|
5304
|
-
function
|
|
5305
|
-
|
|
5326
|
+
function M(k, R) {
|
|
5327
|
+
zi(R, v);
|
|
5306
5328
|
}
|
|
5307
|
-
return this.filter("iframe").each(
|
|
5308
|
-
}) :
|
|
5329
|
+
return this.filter("iframe").each(M).end();
|
|
5330
|
+
}) : Ci("", "Unable to bind to jQuery, it is not fully loaded.");
|
|
5309
5331
|
}
|
|
5310
5332
|
window.jQuery !== e && pr(window.jQuery), typeof e == "function" && e.amd ? e([], Bn) : i.exports = Bn(), window.iFrameResize = window.iFrameResize || Bn();
|
|
5311
5333
|
})();
|
|
5312
|
-
})(
|
|
5313
|
-
var io =
|
|
5334
|
+
})(Bs);
|
|
5335
|
+
var io = Bs.exports;
|
|
5314
5336
|
const so = /* @__PURE__ */ Fr(io);
|
|
5315
|
-
var ro = Object.defineProperty, ao = Object.getOwnPropertyDescriptor,
|
|
5337
|
+
var ro = Object.defineProperty, ao = Object.getOwnPropertyDescriptor, wi = (i, e, t, n) => {
|
|
5316
5338
|
for (var s = n > 1 ? void 0 : n ? ao(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
5317
5339
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
5318
5340
|
return n && s && ro(e, t, s), s;
|
|
5319
5341
|
};
|
|
5320
|
-
let
|
|
5342
|
+
let Bt = class extends ne {
|
|
5321
5343
|
constructor() {
|
|
5322
5344
|
super(...arguments), this.src = "", this.showCloseButton = !1;
|
|
5323
5345
|
}
|
|
@@ -5340,9 +5362,9 @@ let Ht = class extends ne {
|
|
|
5340
5362
|
render() {
|
|
5341
5363
|
return z`
|
|
5342
5364
|
<div class="relative">
|
|
5343
|
-
${
|
|
5365
|
+
${Re(this.showCloseButton, () => z`
|
|
5344
5366
|
<button class="absolute top-0 right-0 m-2 h-6 text-white focus:outline-none" @click="${this.close}">
|
|
5345
|
-
${
|
|
5367
|
+
${Ht}
|
|
5346
5368
|
</button>
|
|
5347
5369
|
`)}
|
|
5348
5370
|
|
|
@@ -5355,16 +5377,16 @@ let Ht = class extends ne {
|
|
|
5355
5377
|
`;
|
|
5356
5378
|
}
|
|
5357
5379
|
};
|
|
5358
|
-
|
|
5359
|
-
|
|
5380
|
+
Bt.styles = [Se];
|
|
5381
|
+
wi([
|
|
5360
5382
|
V({ type: String })
|
|
5361
|
-
],
|
|
5362
|
-
|
|
5383
|
+
], Bt.prototype, "src", 2);
|
|
5384
|
+
wi([
|
|
5363
5385
|
V({ type: Boolean })
|
|
5364
|
-
],
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
],
|
|
5386
|
+
], Bt.prototype, "showCloseButton", 2);
|
|
5387
|
+
Bt = wi([
|
|
5388
|
+
Ee("iai-chat-iframe")
|
|
5389
|
+
], Bt);
|
|
5368
5390
|
var oo = Object.defineProperty, lo = Object.getOwnPropertyDescriptor, gt = (i, e, t, n) => {
|
|
5369
5391
|
for (var s = n > 1 ? void 0 : n ? lo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
5370
5392
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
@@ -5381,7 +5403,7 @@ let ze = class extends ne {
|
|
|
5381
5403
|
this.dispatchEvent(new CustomEvent("close"));
|
|
5382
5404
|
}
|
|
5383
5405
|
render() {
|
|
5384
|
-
const i =
|
|
5406
|
+
const i = Ve({
|
|
5385
5407
|
width: this.width,
|
|
5386
5408
|
height: this.height
|
|
5387
5409
|
});
|
|
@@ -5392,14 +5414,14 @@ let ze = class extends ne {
|
|
|
5392
5414
|
style=${i}
|
|
5393
5415
|
part="modal"
|
|
5394
5416
|
>
|
|
5395
|
-
${
|
|
5417
|
+
${Re(this.showHeader, () => z`
|
|
5396
5418
|
<div class="header text-lg p-2 flex justify-between items-center">
|
|
5397
5419
|
<div class="flex flex-row h-full items-center">
|
|
5398
5420
|
<span class="text-lg font-semibold ml-2">${this.title}</span>
|
|
5399
5421
|
</div>
|
|
5400
5422
|
|
|
5401
5423
|
<button class="mr-2 h-6 text-white focus:outline-none" @click="${this.close}">
|
|
5402
|
-
${
|
|
5424
|
+
${Ht}
|
|
5403
5425
|
</button>
|
|
5404
5426
|
</div>
|
|
5405
5427
|
`)}
|
|
@@ -5416,7 +5438,7 @@ let ze = class extends ne {
|
|
|
5416
5438
|
`;
|
|
5417
5439
|
}
|
|
5418
5440
|
};
|
|
5419
|
-
ze.styles = [
|
|
5441
|
+
ze.styles = [Se, nt`
|
|
5420
5442
|
.header {
|
|
5421
5443
|
background-color: var(--iai-chat-i-iframe-modal-header-bg);
|
|
5422
5444
|
color: var(--iai-chat-i-iframe-modal-header-fg);
|
|
@@ -5439,22 +5461,22 @@ gt([
|
|
|
5439
5461
|
V({ type: Boolean })
|
|
5440
5462
|
], ze.prototype, "showHeader", 2);
|
|
5441
5463
|
ze = gt([
|
|
5442
|
-
|
|
5464
|
+
Ee("iai-chat-iframe-modal")
|
|
5443
5465
|
], ze);
|
|
5444
5466
|
/**
|
|
5445
5467
|
* @license
|
|
5446
5468
|
* Copyright 2017 Google LLC
|
|
5447
5469
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5448
5470
|
*/
|
|
5449
|
-
class
|
|
5471
|
+
class oi extends Mn {
|
|
5450
5472
|
constructor(e) {
|
|
5451
|
-
if (super(e), this.it = q, e.type !==
|
|
5473
|
+
if (super(e), this.it = q, e.type !== In.CHILD)
|
|
5452
5474
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
5453
5475
|
}
|
|
5454
5476
|
render(e) {
|
|
5455
5477
|
if (e === q || e == null)
|
|
5456
5478
|
return this._t = void 0, this.it = e;
|
|
5457
|
-
if (e ===
|
|
5479
|
+
if (e === ge)
|
|
5458
5480
|
return e;
|
|
5459
5481
|
if (typeof e != "string")
|
|
5460
5482
|
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
@@ -5465,9 +5487,9 @@ class ai extends On {
|
|
|
5465
5487
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
5466
5488
|
}
|
|
5467
5489
|
}
|
|
5468
|
-
|
|
5469
|
-
const Ws =
|
|
5470
|
-
function
|
|
5490
|
+
oi.directiveName = "unsafeHTML", oi.resultType = 1;
|
|
5491
|
+
const Ws = On(oi);
|
|
5492
|
+
function xi() {
|
|
5471
5493
|
return {
|
|
5472
5494
|
async: !1,
|
|
5473
5495
|
breaks: !1,
|
|
@@ -5481,9 +5503,9 @@ function wi() {
|
|
|
5481
5503
|
walkTokens: null
|
|
5482
5504
|
};
|
|
5483
5505
|
}
|
|
5484
|
-
let
|
|
5506
|
+
let it = xi();
|
|
5485
5507
|
function Fs(i) {
|
|
5486
|
-
|
|
5508
|
+
it = i;
|
|
5487
5509
|
}
|
|
5488
5510
|
const Vs = /[&<>"']/, co = new RegExp(Vs.source, "g"), qs = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, ho = new RegExp(qs.source, "g"), uo = {
|
|
5489
5511
|
"&": "&",
|
|
@@ -5491,13 +5513,13 @@ const Vs = /[&<>"']/, co = new RegExp(Vs.source, "g"), qs = /[<>"']|&(?!(#\d{1,7
|
|
|
5491
5513
|
">": ">",
|
|
5492
5514
|
'"': """,
|
|
5493
5515
|
"'": "'"
|
|
5494
|
-
},
|
|
5516
|
+
}, ps = (i) => uo[i];
|
|
5495
5517
|
function te(i, e) {
|
|
5496
5518
|
if (e) {
|
|
5497
5519
|
if (Vs.test(i))
|
|
5498
|
-
return i.replace(co,
|
|
5520
|
+
return i.replace(co, ps);
|
|
5499
5521
|
} else if (qs.test(i))
|
|
5500
|
-
return i.replace(ho,
|
|
5522
|
+
return i.replace(ho, ps);
|
|
5501
5523
|
return i;
|
|
5502
5524
|
}
|
|
5503
5525
|
const po = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
|
|
@@ -5517,7 +5539,7 @@ function D(i, e) {
|
|
|
5517
5539
|
};
|
|
5518
5540
|
return n;
|
|
5519
5541
|
}
|
|
5520
|
-
function
|
|
5542
|
+
function ms(i) {
|
|
5521
5543
|
try {
|
|
5522
5544
|
i = encodeURI(i).replace(/%25/g, "%");
|
|
5523
5545
|
} catch {
|
|
@@ -5526,7 +5548,7 @@ function ps(i) {
|
|
|
5526
5548
|
return i;
|
|
5527
5549
|
}
|
|
5528
5550
|
const _t = { exec: () => null };
|
|
5529
|
-
function
|
|
5551
|
+
function fs(i, e) {
|
|
5530
5552
|
const t = i.replace(/\|/g, (r, a, o) => {
|
|
5531
5553
|
let l = !1, d = a;
|
|
5532
5554
|
for (; --d >= 0 && o[d] === "\\"; )
|
|
@@ -5573,7 +5595,7 @@ function go(i, e) {
|
|
|
5573
5595
|
return n;
|
|
5574
5596
|
return -1;
|
|
5575
5597
|
}
|
|
5576
|
-
function
|
|
5598
|
+
function gs(i, e, t, n) {
|
|
5577
5599
|
const s = e.href, r = e.title ? te(e.title) : null, a = i[1].replace(/\\([\[\]])/g, "$1");
|
|
5578
5600
|
if (i[0].charAt(0) !== "!") {
|
|
5579
5601
|
n.state.inLink = !0;
|
|
@@ -5613,7 +5635,7 @@ function yo(i, e) {
|
|
|
5613
5635
|
class kn {
|
|
5614
5636
|
// set by the lexer
|
|
5615
5637
|
constructor(e) {
|
|
5616
|
-
W(this, "options"), W(this, "rules"), W(this, "lexer"), this.options = e ||
|
|
5638
|
+
W(this, "options"), W(this, "rules"), W(this, "lexer"), this.options = e || it;
|
|
5617
5639
|
}
|
|
5618
5640
|
space(e) {
|
|
5619
5641
|
const t = this.rules.block.newline.exec(e);
|
|
@@ -5720,9 +5742,9 @@ class kn {
|
|
|
5720
5742
|
`, e = e.substring(c.length + 1), h = !0), !h) {
|
|
5721
5743
|
const Ce = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), Gt = new RegExp(`^ {0,${Math.min(3, f - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), Qt = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:\`\`\`|~~~)`), Yt = new RegExp(`^ {0,${Math.min(3, f - 1)}}#`);
|
|
5722
5744
|
for (; e; ) {
|
|
5723
|
-
const
|
|
5745
|
+
const st = e.split(`
|
|
5724
5746
|
`, 1)[0];
|
|
5725
|
-
if (c =
|
|
5747
|
+
if (c = st, this.options.pedantic && (c = c.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), Qt.test(c) || Yt.test(c) || Ce.test(c) || Gt.test(e))
|
|
5726
5748
|
break;
|
|
5727
5749
|
if (c.search(/[^ ]/) >= f || !c.trim())
|
|
5728
5750
|
l += `
|
|
@@ -5733,16 +5755,16 @@ class kn {
|
|
|
5733
5755
|
l += `
|
|
5734
5756
|
` + c;
|
|
5735
5757
|
}
|
|
5736
|
-
!O && !c.trim() && (O = !0), o +=
|
|
5737
|
-
`, e = e.substring(
|
|
5758
|
+
!O && !c.trim() && (O = !0), o += st + `
|
|
5759
|
+
`, e = e.substring(st.length + 1), p = c.slice(f);
|
|
5738
5760
|
}
|
|
5739
5761
|
}
|
|
5740
5762
|
r.loose || (d ? r.loose = !0 : /\n *\n *$/.test(o) && (d = !0));
|
|
5741
|
-
let
|
|
5742
|
-
this.options.gfm && (
|
|
5763
|
+
let H = null, J;
|
|
5764
|
+
this.options.gfm && (H = /^\[[ xX]\] /.exec(l), H && (J = H[0] !== "[ ] ", l = l.replace(/^\[[ xX]\] +/, ""))), r.items.push({
|
|
5743
5765
|
type: "list_item",
|
|
5744
5766
|
raw: o,
|
|
5745
|
-
task: !!
|
|
5767
|
+
task: !!H,
|
|
5746
5768
|
checked: J,
|
|
5747
5769
|
loose: !1,
|
|
5748
5770
|
text: l,
|
|
@@ -5789,7 +5811,7 @@ class kn {
|
|
|
5789
5811
|
const t = this.rules.block.table.exec(e);
|
|
5790
5812
|
if (!t || !/[:|]/.test(t[2]))
|
|
5791
5813
|
return;
|
|
5792
|
-
const n =
|
|
5814
|
+
const n = fs(t[1]), s = t[2].replace(/^\||\| *$/g, "").split("|"), r = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
|
|
5793
5815
|
`) : [], a = {
|
|
5794
5816
|
type: "table",
|
|
5795
5817
|
raw: t[0],
|
|
@@ -5806,7 +5828,7 @@ class kn {
|
|
|
5806
5828
|
tokens: this.lexer.inline(o)
|
|
5807
5829
|
});
|
|
5808
5830
|
for (const o of r)
|
|
5809
|
-
a.rows.push(
|
|
5831
|
+
a.rows.push(fs(o, a.header.length).map((l) => ({
|
|
5810
5832
|
text: l,
|
|
5811
5833
|
tokens: this.lexer.inline(l)
|
|
5812
5834
|
})));
|
|
@@ -5891,7 +5913,7 @@ class kn {
|
|
|
5891
5913
|
a && (s = a[1], r = a[3]);
|
|
5892
5914
|
} else
|
|
5893
5915
|
r = t[3] ? t[3].slice(1, -1) : "";
|
|
5894
|
-
return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(n) ? s = s.slice(1) : s = s.slice(1, -1)),
|
|
5916
|
+
return s = s.trim(), /^</.test(s) && (this.options.pedantic && !/>$/.test(n) ? s = s.slice(1) : s = s.slice(1, -1)), gs(t, {
|
|
5895
5917
|
href: s && s.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
5896
5918
|
title: r && r.replace(this.rules.inline.anyPunctuation, "$1")
|
|
5897
5919
|
}, t[0], this.lexer);
|
|
@@ -5909,7 +5931,7 @@ class kn {
|
|
|
5909
5931
|
text: a
|
|
5910
5932
|
};
|
|
5911
5933
|
}
|
|
5912
|
-
return
|
|
5934
|
+
return gs(n, r, n[0], this.lexer);
|
|
5913
5935
|
}
|
|
5914
5936
|
}
|
|
5915
5937
|
emStrong(e, t, n = "") {
|
|
@@ -6041,7 +6063,7 @@ class kn {
|
|
|
6041
6063
|
}
|
|
6042
6064
|
}
|
|
6043
6065
|
}
|
|
6044
|
-
const vo = /^(?: *(?:\n|$))+/, bo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, wo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, qt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, xo = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ks = /(?:[*+-]|\d{1,9}[.)])/, Js = D(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Ks).replace(/blockCode/g, / {4}/).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/).getRegex(),
|
|
6066
|
+
const vo = /^(?: *(?:\n|$))+/, bo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, wo = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, qt = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, xo = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ks = /(?:[*+-]|\d{1,9}[.)])/, Js = D(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Ks).replace(/blockCode/g, / {4}/).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/).getRegex(), ki = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ko = /^[^\n]+/, _i = /(?!\s*\])(?:\\.|[^\[\]\\])+/, _o = D(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", _i).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), $o = D(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ks).getRegex(), Nn = "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", $i = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, To = D("^ {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|$))", "i").replace("comment", $i).replace("tag", Nn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Gs = D(ki).replace("hr", qt).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", Nn).getRegex(), Eo = D(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Gs).getRegex(), Ti = {
|
|
6045
6067
|
blockquote: Eo,
|
|
6046
6068
|
code: bo,
|
|
6047
6069
|
def: _o,
|
|
@@ -6055,30 +6077,30 @@ const vo = /^(?: *(?:\n|$))+/, bo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, wo =
|
|
|
6055
6077
|
paragraph: Gs,
|
|
6056
6078
|
table: _t,
|
|
6057
6079
|
text: ko
|
|
6058
|
-
},
|
|
6059
|
-
|
|
6060
|
-
table:
|
|
6061
|
-
paragraph: D(
|
|
6080
|
+
}, ys = D("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", " {4}[^\\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", Nn).getRegex(), So = {
|
|
6081
|
+
...Ti,
|
|
6082
|
+
table: ys,
|
|
6083
|
+
paragraph: D(ki).replace("hr", qt).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ys).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", Nn).getRegex()
|
|
6062
6084
|
}, Co = {
|
|
6063
|
-
|
|
6064
|
-
html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",
|
|
6085
|
+
...Ti,
|
|
6086
|
+
html: D(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", $i).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
6065
6087
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
6066
6088
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
6067
6089
|
fences: _t,
|
|
6068
6090
|
// fences not supported
|
|
6069
6091
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
6070
|
-
paragraph: D(
|
|
6092
|
+
paragraph: D(ki).replace("hr", qt).replace("heading", ` *#{1,6} *[^
|
|
6071
6093
|
]`).replace("lheading", Js).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
6072
|
-
}, Qs = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ao = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ys = /^( {2,}|\\)\n(?!\s*$)/, Io = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Kt = "\\p{P}\\p{S}", Oo = D(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Kt).getRegex(),
|
|
6094
|
+
}, Qs = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ao = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ys = /^( {2,}|\\)\n(?!\s*$)/, Io = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Kt = "\\p{P}\\p{S}", Oo = D(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Kt).getRegex(), Mo = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, Ro = D(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Kt).getRegex(), Po = D("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Kt).getRegex(), No = D("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Kt).getRegex(), jo = D(/\\([punct])/, "gu").replace(/punct/g, Kt).getRegex(), zo = D(/^<(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(), Zo = D($i).replace("(?:-->|$)", "-->").getRegex(), Lo = D("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Zo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), _n = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Do = D(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", _n).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Xs = D(/^!?\[(label)\]\[(ref)\]/).replace("label", _n).replace("ref", _i).getRegex(), er = D(/^!?\[(ref)\](?:\[\])?/).replace("ref", _i).getRegex(), Uo = D("reflink|nolink(?!\\()", "g").replace("reflink", Xs).replace("nolink", er).getRegex(), Ei = {
|
|
6073
6095
|
_backpedal: _t,
|
|
6074
6096
|
// only used for GFM url
|
|
6075
6097
|
anyPunctuation: jo,
|
|
6076
6098
|
autolink: zo,
|
|
6077
|
-
blockSkip:
|
|
6099
|
+
blockSkip: Mo,
|
|
6078
6100
|
br: Ys,
|
|
6079
6101
|
code: Ao,
|
|
6080
6102
|
del: _t,
|
|
6081
|
-
emStrongLDelim:
|
|
6103
|
+
emStrongLDelim: Ro,
|
|
6082
6104
|
emStrongRDelimAst: Po,
|
|
6083
6105
|
emStrongRDelimUnd: No,
|
|
6084
6106
|
escape: Qs,
|
|
@@ -6090,34 +6112,34 @@ const vo = /^(?: *(?:\n|$))+/, bo = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, wo =
|
|
|
6090
6112
|
tag: Lo,
|
|
6091
6113
|
text: Io,
|
|
6092
6114
|
url: _t
|
|
6093
|
-
},
|
|
6094
|
-
...
|
|
6115
|
+
}, Ho = {
|
|
6116
|
+
...Ei,
|
|
6095
6117
|
link: D(/^!?\[(label)\]\((.*?)\)/).replace("label", _n).getRegex(),
|
|
6096
6118
|
reflink: D(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", _n).getRegex()
|
|
6097
|
-
},
|
|
6098
|
-
...
|
|
6119
|
+
}, li = {
|
|
6120
|
+
...Ei,
|
|
6099
6121
|
escape: D(Qs).replace("])", "~|])").getRegex(),
|
|
6100
6122
|
url: D(/^((?: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(),
|
|
6101
6123
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
6102
6124
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
6103
6125
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
6104
|
-
},
|
|
6105
|
-
...
|
|
6126
|
+
}, Bo = {
|
|
6127
|
+
...li,
|
|
6106
6128
|
br: D(Ys).replace("{2,}", "*").getRegex(),
|
|
6107
|
-
text: D(
|
|
6129
|
+
text: D(li.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
6108
6130
|
}, nn = {
|
|
6109
|
-
normal:
|
|
6131
|
+
normal: Ti,
|
|
6110
6132
|
gfm: So,
|
|
6111
6133
|
pedantic: Co
|
|
6112
6134
|
}, bt = {
|
|
6113
|
-
normal:
|
|
6114
|
-
gfm:
|
|
6115
|
-
breaks:
|
|
6116
|
-
pedantic:
|
|
6135
|
+
normal: Ei,
|
|
6136
|
+
gfm: li,
|
|
6137
|
+
breaks: Bo,
|
|
6138
|
+
pedantic: Ho
|
|
6117
6139
|
};
|
|
6118
|
-
class
|
|
6140
|
+
class me {
|
|
6119
6141
|
constructor(e) {
|
|
6120
|
-
W(this, "tokens"), W(this, "options"), W(this, "state"), W(this, "tokenizer"), W(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
6142
|
+
W(this, "tokens"), W(this, "options"), W(this, "state"), W(this, "tokenizer"), W(this, "inlineQueue"), this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || it, this.options.tokenizer = this.options.tokenizer || new kn(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
6121
6143
|
inLink: !1,
|
|
6122
6144
|
inRawBlock: !1,
|
|
6123
6145
|
top: !0
|
|
@@ -6141,13 +6163,13 @@ class pe {
|
|
|
6141
6163
|
* Static Lex Method
|
|
6142
6164
|
*/
|
|
6143
6165
|
static lex(e, t) {
|
|
6144
|
-
return new
|
|
6166
|
+
return new me(t).lex(e);
|
|
6145
6167
|
}
|
|
6146
6168
|
/**
|
|
6147
6169
|
* Static Lex Inline Method
|
|
6148
6170
|
*/
|
|
6149
6171
|
static lexInline(e, t) {
|
|
6150
|
-
return new
|
|
6172
|
+
return new me(t).inlineTokens(e);
|
|
6151
6173
|
}
|
|
6152
6174
|
/**
|
|
6153
6175
|
* Preprocessing
|
|
@@ -6335,7 +6357,7 @@ class pe {
|
|
|
6335
6357
|
}
|
|
6336
6358
|
class $n {
|
|
6337
6359
|
constructor(e) {
|
|
6338
|
-
W(this, "options"), this.options = e ||
|
|
6360
|
+
W(this, "options"), this.options = e || it;
|
|
6339
6361
|
}
|
|
6340
6362
|
code(e, t, n) {
|
|
6341
6363
|
var s;
|
|
@@ -6414,7 +6436,7 @@ ${e}</tr>
|
|
|
6414
6436
|
return `<del>${e}</del>`;
|
|
6415
6437
|
}
|
|
6416
6438
|
link(e, t, n) {
|
|
6417
|
-
const s =
|
|
6439
|
+
const s = ms(e);
|
|
6418
6440
|
if (s === null)
|
|
6419
6441
|
return n;
|
|
6420
6442
|
e = s;
|
|
@@ -6422,7 +6444,7 @@ ${e}</tr>
|
|
|
6422
6444
|
return t && (r += ' title="' + t + '"'), r += ">" + n + "</a>", r;
|
|
6423
6445
|
}
|
|
6424
6446
|
image(e, t, n) {
|
|
6425
|
-
const s =
|
|
6447
|
+
const s = ms(e);
|
|
6426
6448
|
if (s === null)
|
|
6427
6449
|
return n;
|
|
6428
6450
|
e = s;
|
|
@@ -6433,7 +6455,7 @@ ${e}</tr>
|
|
|
6433
6455
|
return e;
|
|
6434
6456
|
}
|
|
6435
6457
|
}
|
|
6436
|
-
class
|
|
6458
|
+
class Si {
|
|
6437
6459
|
// no need for block level renderers
|
|
6438
6460
|
strong(e) {
|
|
6439
6461
|
return e;
|
|
@@ -6463,21 +6485,21 @@ class Ei {
|
|
|
6463
6485
|
return "";
|
|
6464
6486
|
}
|
|
6465
6487
|
}
|
|
6466
|
-
class
|
|
6488
|
+
class fe {
|
|
6467
6489
|
constructor(e) {
|
|
6468
|
-
W(this, "options"), W(this, "renderer"), W(this, "textRenderer"), this.options = e ||
|
|
6490
|
+
W(this, "options"), W(this, "renderer"), W(this, "textRenderer"), this.options = e || it, this.options.renderer = this.options.renderer || new $n(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new Si();
|
|
6469
6491
|
}
|
|
6470
6492
|
/**
|
|
6471
6493
|
* Static Parse Method
|
|
6472
6494
|
*/
|
|
6473
6495
|
static parse(e, t) {
|
|
6474
|
-
return new
|
|
6496
|
+
return new fe(t).parse(e);
|
|
6475
6497
|
}
|
|
6476
6498
|
/**
|
|
6477
6499
|
* Static Parse Inline Method
|
|
6478
6500
|
*/
|
|
6479
6501
|
static parseInline(e, t) {
|
|
6480
|
-
return new
|
|
6502
|
+
return new fe(t).parseInline(e);
|
|
6481
6503
|
}
|
|
6482
6504
|
/**
|
|
6483
6505
|
* Parse Loop
|
|
@@ -6537,15 +6559,15 @@ class me {
|
|
|
6537
6559
|
let h = "";
|
|
6538
6560
|
for (let p = 0; p < a.items.length; p++) {
|
|
6539
6561
|
const c = a.items[p], f = c.checked, O = c.task;
|
|
6540
|
-
let
|
|
6562
|
+
let H = "";
|
|
6541
6563
|
if (c.task) {
|
|
6542
6564
|
const J = this.renderer.checkbox(!!f);
|
|
6543
6565
|
d ? c.tokens.length > 0 && c.tokens[0].type === "paragraph" ? (c.tokens[0].text = J + " " + c.tokens[0].text, c.tokens[0].tokens && c.tokens[0].tokens.length > 0 && c.tokens[0].tokens[0].type === "text" && (c.tokens[0].tokens[0].text = J + " " + c.tokens[0].tokens[0].text)) : c.tokens.unshift({
|
|
6544
6566
|
type: "text",
|
|
6545
6567
|
text: J + " "
|
|
6546
|
-
}) :
|
|
6568
|
+
}) : H += J + " ";
|
|
6547
6569
|
}
|
|
6548
|
-
|
|
6570
|
+
H += this.parse(c.tokens, d), h += this.renderer.listitem(H, O, !!f);
|
|
6549
6571
|
}
|
|
6550
6572
|
n += this.renderer.list(h, o, l);
|
|
6551
6573
|
continue;
|
|
@@ -6656,7 +6678,7 @@ class me {
|
|
|
6656
6678
|
}
|
|
6657
6679
|
class $t {
|
|
6658
6680
|
constructor(e) {
|
|
6659
|
-
W(this, "options"), this.options = e ||
|
|
6681
|
+
W(this, "options"), this.options = e || it;
|
|
6660
6682
|
}
|
|
6661
6683
|
/**
|
|
6662
6684
|
* Process markdown before marked
|
|
@@ -6682,10 +6704,10 @@ W($t, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
|
6682
6704
|
"postprocess",
|
|
6683
6705
|
"processAllTokens"
|
|
6684
6706
|
]));
|
|
6685
|
-
var on,
|
|
6707
|
+
var on, ci, di, vs;
|
|
6686
6708
|
class Wo {
|
|
6687
6709
|
constructor(...e) {
|
|
6688
|
-
|
|
6710
|
+
rs(this, on), rs(this, di), W(this, "defaults", xi()), W(this, "options", this.setOptions), W(this, "parse", ni(this, on, ci).call(this, me.lex, fe.parse)), W(this, "parseInline", ni(this, on, ci).call(this, me.lexInline, fe.parseInline)), W(this, "Parser", fe), W(this, "Renderer", $n), W(this, "TextRenderer", Si), W(this, "Lexer", me), W(this, "Tokenizer", kn), W(this, "Hooks", $t), this.use(...e);
|
|
6689
6711
|
}
|
|
6690
6712
|
/**
|
|
6691
6713
|
* Run callback for every token
|
|
@@ -6804,17 +6826,17 @@ class Wo {
|
|
|
6804
6826
|
return this.defaults = { ...this.defaults, ...e }, this;
|
|
6805
6827
|
}
|
|
6806
6828
|
lexer(e, t) {
|
|
6807
|
-
return
|
|
6829
|
+
return me.lex(e, t ?? this.defaults);
|
|
6808
6830
|
}
|
|
6809
6831
|
parser(e, t) {
|
|
6810
|
-
return
|
|
6832
|
+
return fe.parse(e, t ?? this.defaults);
|
|
6811
6833
|
}
|
|
6812
6834
|
}
|
|
6813
|
-
on = /* @__PURE__ */ new WeakSet(),
|
|
6835
|
+
on = /* @__PURE__ */ new WeakSet(), ci = function(i, e) {
|
|
6814
6836
|
return (t, n) => {
|
|
6815
6837
|
const s = { ...n }, r = { ...this.defaults, ...s };
|
|
6816
6838
|
this.defaults.async === !0 && s.async === !1 && (r.silent || console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."), r.async = !0);
|
|
6817
|
-
const a =
|
|
6839
|
+
const a = ni(this, di, vs).call(this, !!r.silent, !!r.async);
|
|
6818
6840
|
if (typeof t > "u" || t === null)
|
|
6819
6841
|
return a(new Error("marked(): input parameter is undefined or null"));
|
|
6820
6842
|
if (typeof t != "string")
|
|
@@ -6831,7 +6853,7 @@ on = /* @__PURE__ */ new WeakSet(), li = function(i, e) {
|
|
|
6831
6853
|
return a(o);
|
|
6832
6854
|
}
|
|
6833
6855
|
};
|
|
6834
|
-
},
|
|
6856
|
+
}, di = /* @__PURE__ */ new WeakSet(), vs = function(i, e) {
|
|
6835
6857
|
return (t) => {
|
|
6836
6858
|
if (t.message += `
|
|
6837
6859
|
Please report this to https://github.com/markedjs/marked.`, i) {
|
|
@@ -6843,28 +6865,28 @@ Please report this to https://github.com/markedjs/marked.`, i) {
|
|
|
6843
6865
|
throw t;
|
|
6844
6866
|
};
|
|
6845
6867
|
};
|
|
6846
|
-
const
|
|
6868
|
+
const et = new Wo();
|
|
6847
6869
|
function L(i, e) {
|
|
6848
|
-
return
|
|
6870
|
+
return et.parse(i, e);
|
|
6849
6871
|
}
|
|
6850
6872
|
L.options = L.setOptions = function(i) {
|
|
6851
|
-
return
|
|
6873
|
+
return et.setOptions(i), L.defaults = et.defaults, Fs(L.defaults), L;
|
|
6852
6874
|
};
|
|
6853
|
-
L.getDefaults =
|
|
6854
|
-
L.defaults =
|
|
6875
|
+
L.getDefaults = xi;
|
|
6876
|
+
L.defaults = it;
|
|
6855
6877
|
L.use = function(...i) {
|
|
6856
|
-
return
|
|
6878
|
+
return et.use(...i), L.defaults = et.defaults, Fs(L.defaults), L;
|
|
6857
6879
|
};
|
|
6858
6880
|
L.walkTokens = function(i, e) {
|
|
6859
|
-
return
|
|
6881
|
+
return et.walkTokens(i, e);
|
|
6860
6882
|
};
|
|
6861
|
-
L.parseInline =
|
|
6862
|
-
L.Parser =
|
|
6863
|
-
L.parser =
|
|
6883
|
+
L.parseInline = et.parseInline;
|
|
6884
|
+
L.Parser = fe;
|
|
6885
|
+
L.parser = fe.parse;
|
|
6864
6886
|
L.Renderer = $n;
|
|
6865
|
-
L.TextRenderer =
|
|
6866
|
-
L.Lexer =
|
|
6867
|
-
L.lexer =
|
|
6887
|
+
L.TextRenderer = Si;
|
|
6888
|
+
L.Lexer = me;
|
|
6889
|
+
L.lexer = me.lex;
|
|
6868
6890
|
L.Tokenizer = kn;
|
|
6869
6891
|
L.Hooks = $t;
|
|
6870
6892
|
L.parse = L;
|
|
@@ -6873,8 +6895,8 @@ L.setOptions;
|
|
|
6873
6895
|
L.use;
|
|
6874
6896
|
L.walkTokens;
|
|
6875
6897
|
L.parseInline;
|
|
6876
|
-
|
|
6877
|
-
|
|
6898
|
+
fe.parse;
|
|
6899
|
+
me.lex;
|
|
6878
6900
|
function Fo(i) {
|
|
6879
6901
|
return i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
6880
6902
|
}
|
|
@@ -6920,7 +6942,7 @@ let Tn = class extends ne {
|
|
|
6920
6942
|
`;
|
|
6921
6943
|
}
|
|
6922
6944
|
};
|
|
6923
|
-
Tn.styles = [
|
|
6945
|
+
Tn.styles = [Se, nt`
|
|
6924
6946
|
.message {
|
|
6925
6947
|
background-color: var(--iai-chat-i-message-assistant-bg);
|
|
6926
6948
|
color: var(--iai-chat-i-message-assistant-fg);
|
|
@@ -6930,7 +6952,7 @@ ir([
|
|
|
6930
6952
|
V({ type: String })
|
|
6931
6953
|
], Tn.prototype, "content", 2);
|
|
6932
6954
|
Tn = ir([
|
|
6933
|
-
|
|
6955
|
+
Ee("iai-chat-message-assistant")
|
|
6934
6956
|
], Tn);
|
|
6935
6957
|
async function Jo(i, e) {
|
|
6936
6958
|
const { type: t, params: n } = i, s = e[t];
|
|
@@ -6943,7 +6965,7 @@ var Go = Object.defineProperty, Qo = Object.getOwnPropertyDescriptor, Jt = (i, e
|
|
|
6943
6965
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
6944
6966
|
return n && s && Go(e, t, s), s;
|
|
6945
6967
|
};
|
|
6946
|
-
let
|
|
6968
|
+
let tt = class extends ne {
|
|
6947
6969
|
constructor() {
|
|
6948
6970
|
super(...arguments), this.content = "";
|
|
6949
6971
|
}
|
|
@@ -6964,22 +6986,22 @@ let et = class extends ne {
|
|
|
6964
6986
|
`;
|
|
6965
6987
|
}
|
|
6966
6988
|
};
|
|
6967
|
-
|
|
6989
|
+
tt.styles = [Se];
|
|
6968
6990
|
Jt([
|
|
6969
6991
|
V({ type: Object })
|
|
6970
|
-
],
|
|
6992
|
+
], tt.prototype, "options", 2);
|
|
6971
6993
|
Jt([
|
|
6972
6994
|
V({ type: String })
|
|
6973
|
-
],
|
|
6995
|
+
], tt.prototype, "content", 2);
|
|
6974
6996
|
Jt([
|
|
6975
6997
|
V({ type: Object })
|
|
6976
|
-
],
|
|
6998
|
+
], tt.prototype, "enhancedContent", 2);
|
|
6977
6999
|
Jt([
|
|
6978
7000
|
V()
|
|
6979
|
-
],
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
],
|
|
7001
|
+
], tt.prototype, "contentHtmlTemplate", 2);
|
|
7002
|
+
tt = Jt([
|
|
7003
|
+
Ee("iai-chat-message-system")
|
|
7004
|
+
], tt);
|
|
6983
7005
|
var Yo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, sr = (i, e, t, n) => {
|
|
6984
7006
|
for (var s = n > 1 ? void 0 : n ? Xo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
6985
7007
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
@@ -6993,13 +7015,13 @@ let En = class extends ne {
|
|
|
6993
7015
|
return z`
|
|
6994
7016
|
<div class="flex items-end justify-end ml-20">
|
|
6995
7017
|
<div class="message rounded-lg px-4 py-2 flex gap-2">
|
|
6996
|
-
<p>${this.content}</p>
|
|
7018
|
+
<p class="whitespace-pre-wrap">${this.content}</p>
|
|
6997
7019
|
</div>
|
|
6998
7020
|
</div>
|
|
6999
7021
|
`;
|
|
7000
7022
|
}
|
|
7001
7023
|
};
|
|
7002
|
-
En.styles = [
|
|
7024
|
+
En.styles = [Se, nt`
|
|
7003
7025
|
.message {
|
|
7004
7026
|
background-color: var(--iai-chat-i-message-user-bg);
|
|
7005
7027
|
color: var(--iai-chat-i-message-user-fg);
|
|
@@ -7009,9 +7031,9 @@ sr([
|
|
|
7009
7031
|
V({ type: String })
|
|
7010
7032
|
], En.prototype, "content", 2);
|
|
7011
7033
|
En = sr([
|
|
7012
|
-
|
|
7034
|
+
Ee("iai-chat-message-user")
|
|
7013
7035
|
], En);
|
|
7014
|
-
var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor,
|
|
7036
|
+
var el = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, jn = (i, e, t, n) => {
|
|
7015
7037
|
for (var s = n > 1 ? void 0 : n ? tl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7016
7038
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7017
7039
|
return n && s && el(e, t, s), s;
|
|
@@ -7029,33 +7051,33 @@ let ut = class extends ne {
|
|
|
7029
7051
|
cta: n
|
|
7030
7052
|
},
|
|
7031
7053
|
placement: s
|
|
7032
|
-
} = this.options.config, r =
|
|
7054
|
+
} = this.options.config, r = Ve({ alignItems: s !== "left" ? "end" : "start" }), a = Ve({ width: i, height: e });
|
|
7033
7055
|
return z`
|
|
7034
7056
|
<div class="flex flex-col gap-4" style=${r}>
|
|
7035
|
-
${
|
|
7057
|
+
${Re(n && this.isCtaOpen && !this.isChatWindowOpen, () => z`
|
|
7036
7058
|
<div class="relative rounded-lg p-5 shadow-md bg-white" style="max-width: 350px;">
|
|
7037
7059
|
<button
|
|
7038
7060
|
class="absolute top-0 right-0 w-5 h-5 m-0.5"
|
|
7039
7061
|
@click="${() => this.isCtaOpen = !1}"
|
|
7040
|
-
>${
|
|
7062
|
+
>${Ht}</button>
|
|
7041
7063
|
|
|
7042
7064
|
<span>${n}</span>
|
|
7043
7065
|
|
|
7044
7066
|
<div
|
|
7045
7067
|
class="absolute bottom-0 mx-4 mb-[-8px] w-0 h-0 border-x-8 border-t-8 border-x-transparent border-white"
|
|
7046
|
-
style=${
|
|
7068
|
+
style=${Ve({ [s]: 0 })}
|
|
7047
7069
|
/>
|
|
7048
7070
|
</div>
|
|
7049
7071
|
`)}
|
|
7050
7072
|
|
|
7051
7073
|
<button @click="${this.toggleChat}">
|
|
7052
|
-
${
|
|
7074
|
+
${Re(
|
|
7053
7075
|
t,
|
|
7054
7076
|
() => z`<img src="${t}" alt="Chat Icon" style=${a}/>`,
|
|
7055
7077
|
() => z`
|
|
7056
7078
|
<div class="button rounded-full flex items-center justify-center" style=${a}>
|
|
7057
7079
|
<div class="h-3/5 w-3/5">
|
|
7058
|
-
${
|
|
7080
|
+
${Re(this.isChatWindowOpen, () => Ht, () => Ya)}
|
|
7059
7081
|
</div>
|
|
7060
7082
|
</div>
|
|
7061
7083
|
`
|
|
@@ -7068,27 +7090,27 @@ let ut = class extends ne {
|
|
|
7068
7090
|
this.dispatchEvent(new CustomEvent("toggle-chat"));
|
|
7069
7091
|
}
|
|
7070
7092
|
};
|
|
7071
|
-
ut.styles = [
|
|
7093
|
+
ut.styles = [Se, nt`
|
|
7072
7094
|
.button {
|
|
7073
7095
|
background-color: var(--iai-chat-i-ocb-bg);
|
|
7074
7096
|
color: var(--iai-chat-i-ocb-fg);
|
|
7075
7097
|
}
|
|
7076
7098
|
`];
|
|
7077
|
-
|
|
7099
|
+
jn([
|
|
7078
7100
|
V({ type: Object })
|
|
7079
7101
|
], ut.prototype, "options", 2);
|
|
7080
|
-
|
|
7102
|
+
jn([
|
|
7081
7103
|
V({ type: Boolean })
|
|
7082
7104
|
], ut.prototype, "isChatWindowOpen", 2);
|
|
7083
|
-
|
|
7105
|
+
jn([
|
|
7084
7106
|
ft()
|
|
7085
7107
|
], ut.prototype, "isCtaOpen", 2);
|
|
7086
|
-
ut =
|
|
7087
|
-
|
|
7108
|
+
ut = jn([
|
|
7109
|
+
Ee("iai-chat-open-chat-button")
|
|
7088
7110
|
], ut);
|
|
7089
7111
|
class nl {
|
|
7090
7112
|
constructor(e) {
|
|
7091
|
-
this.widget = null, this.options =
|
|
7113
|
+
this.widget = null, this.options = Pn.parse(e);
|
|
7092
7114
|
const t = document.createElement("iai-chat-popup");
|
|
7093
7115
|
t.options = this.options;
|
|
7094
7116
|
const n = tr(this.options.config.styles);
|
|
@@ -7107,7 +7129,7 @@ class nl {
|
|
|
7107
7129
|
(e = this.widget) == null || e.remove(), this.widget = null;
|
|
7108
7130
|
}
|
|
7109
7131
|
}
|
|
7110
|
-
var il = Object.defineProperty, sl = Object.getOwnPropertyDescriptor,
|
|
7132
|
+
var il = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, zn = (i, e, t, n) => {
|
|
7111
7133
|
for (var s = n > 1 ? void 0 : n ? sl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7112
7134
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7113
7135
|
return n && s && il(e, t, s), s;
|
|
@@ -7198,7 +7220,7 @@ let pt = class extends ne {
|
|
|
7198
7220
|
});
|
|
7199
7221
|
}
|
|
7200
7222
|
};
|
|
7201
|
-
pt.styles = [
|
|
7223
|
+
pt.styles = [Se, nt`
|
|
7202
7224
|
::slotted(div) {
|
|
7203
7225
|
flex: 0 0 auto;
|
|
7204
7226
|
scroll-snap-align: start;
|
|
@@ -7210,17 +7232,17 @@ pt.styles = [Ee, tt`
|
|
|
7210
7232
|
margin-right: 1rem;
|
|
7211
7233
|
}
|
|
7212
7234
|
`];
|
|
7213
|
-
|
|
7235
|
+
zn([
|
|
7214
7236
|
V({ type: Number })
|
|
7215
7237
|
], pt.prototype, "activeIndex", 2);
|
|
7216
|
-
|
|
7238
|
+
zn([
|
|
7217
7239
|
V({ type: Array })
|
|
7218
7240
|
], pt.prototype, "items", 2);
|
|
7219
|
-
|
|
7220
|
-
|
|
7241
|
+
zn([
|
|
7242
|
+
An("#carousel")
|
|
7221
7243
|
], pt.prototype, "carousel", 2);
|
|
7222
|
-
pt =
|
|
7223
|
-
|
|
7244
|
+
pt = zn([
|
|
7245
|
+
Ee("iai-chat-carousel")
|
|
7224
7246
|
], pt);
|
|
7225
7247
|
function rl({ html: i, params: e }) {
|
|
7226
7248
|
return i`
|
|
@@ -7353,12 +7375,12 @@ var Sn;
|
|
|
7353
7375
|
const ll = Sn.AcknowledgeType, cl = "Anyone Home", dl = "IB Chat Leasing - Development";
|
|
7354
7376
|
let hl = "https://five9.ah.inhabit.work";
|
|
7355
7377
|
const ul = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
|
|
7356
|
-
var
|
|
7378
|
+
var ke, We;
|
|
7357
7379
|
const Et = class Et {
|
|
7358
7380
|
constructor() {
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Ie(this,
|
|
7381
|
+
Yn(this, ke, void 0);
|
|
7382
|
+
Yn(this, We, void 0);
|
|
7383
|
+
this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Ie(this, ke, null), Ie(this, We, null), this.conversationStarted = !1;
|
|
7362
7384
|
}
|
|
7363
7385
|
serialize() {
|
|
7364
7386
|
return JSON.stringify({
|
|
@@ -7383,10 +7405,10 @@ const Et = class Et {
|
|
|
7383
7405
|
},
|
|
7384
7406
|
body: JSON.stringify({ tenantName: cl })
|
|
7385
7407
|
});
|
|
7386
|
-
return Ie(this,
|
|
7408
|
+
return Ie(this, ke, await e.json()), en(this, ke);
|
|
7387
7409
|
}
|
|
7388
7410
|
setSession(e) {
|
|
7389
|
-
Ie(this,
|
|
7411
|
+
Ie(this, ke, e);
|
|
7390
7412
|
}
|
|
7391
7413
|
setConversationId(e) {
|
|
7392
7414
|
Ie(this, We, e), this.five9WebSocket && (this.five9WebSocket.destroy(), this.five9WebSocket = void 0, e && this.connectToWebSocket());
|
|
@@ -7518,11 +7540,11 @@ const Et = class Et {
|
|
|
7518
7540
|
}), this.destroy();
|
|
7519
7541
|
}
|
|
7520
7542
|
destroy() {
|
|
7521
|
-
this.five9WebSocket && this.five9WebSocket.destroy(), Ie(this,
|
|
7543
|
+
this.five9WebSocket && this.five9WebSocket.destroy(), Ie(this, ke, null), Ie(this, We, null);
|
|
7522
7544
|
}
|
|
7523
7545
|
// Getters
|
|
7524
7546
|
get sessionToken() {
|
|
7525
|
-
return en(this,
|
|
7547
|
+
return en(this, ke);
|
|
7526
7548
|
}
|
|
7527
7549
|
get conversationId() {
|
|
7528
7550
|
return en(this, We);
|
|
@@ -7548,7 +7570,7 @@ const Et = class Et {
|
|
|
7548
7570
|
return (e = this.sessionToken) == null ? void 0 : e.context.farmId;
|
|
7549
7571
|
}
|
|
7550
7572
|
};
|
|
7551
|
-
|
|
7573
|
+
ke = new WeakMap(), We = new WeakMap();
|
|
7552
7574
|
let Cn = Et;
|
|
7553
7575
|
function Tt(i) {
|
|
7554
7576
|
return `any-${i || "main"}-chatSession`;
|
|
@@ -7702,9 +7724,9 @@ function ar(i, e) {
|
|
|
7702
7724
|
};
|
|
7703
7725
|
i.addEventListener("iai-chat-send-user-message", t), i.addEventListener("iai-chat-reset", s), i.addEventListener("iai-chat-destroy", n);
|
|
7704
7726
|
}
|
|
7705
|
-
class
|
|
7727
|
+
class bl {
|
|
7706
7728
|
constructor(e, t) {
|
|
7707
|
-
const n =
|
|
7729
|
+
const n = Pn.parse({
|
|
7708
7730
|
assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
|
|
7709
7731
|
...e
|
|
7710
7732
|
});
|
|
@@ -7722,5 +7744,5 @@ class wl {
|
|
|
7722
7744
|
}
|
|
7723
7745
|
}
|
|
7724
7746
|
export {
|
|
7725
|
-
|
|
7747
|
+
bl as AnyChatWidget
|
|
7726
7748
|
};
|