@iai-lib/any-chat-widget 0.1.0-alpha.30 → 0.1.0-alpha.32
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 +502 -482
- package/dist/any-chat-widget.umd.js +60 -60
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ 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) => (Ui(i, e, "read from private field"), t ? t.call(i) : e.get(i)),
|
|
5
|
+
var en = (i, e, t) => (Ui(i, e, "read from private field"), t ? t.call(i) : e.get(i)), Xn = (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);
|
|
@@ -14,16 +14,16 @@ var mr = Object.defineProperty, gr = (i, e, t) => e in i ? mr(i, e, { enumerable
|
|
|
14
14
|
if (e.has(i))
|
|
15
15
|
throw TypeError("Cannot add the same private member more than once");
|
|
16
16
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
17
|
-
},
|
|
17
|
+
}, ii = (i, e, t) => (fr(i, e, "access private method"), t);
|
|
18
18
|
/**
|
|
19
19
|
* @license
|
|
20
20
|
* Copyright 2019 Google LLC
|
|
21
21
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
22
22
|
*/
|
|
23
|
-
const sn = globalThis, ui = sn.ShadowRoot && (sn.ShadyCSS === void 0 || sn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype,
|
|
23
|
+
const sn = globalThis, ui = sn.ShadowRoot && (sn.ShadyCSS === void 0 || sn.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, pi = Symbol(), Bi = /* @__PURE__ */ new WeakMap();
|
|
24
24
|
let bs = class {
|
|
25
25
|
constructor(i, e, t) {
|
|
26
|
-
if (this._$cssResult$ = !0, t !==
|
|
26
|
+
if (this._$cssResult$ = !0, t !== pi)
|
|
27
27
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
28
28
|
this.cssText = i, this.t = e;
|
|
29
29
|
}
|
|
@@ -40,7 +40,7 @@ let bs = class {
|
|
|
40
40
|
return this.cssText;
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
const yr = (i) => new bs(typeof i == "string" ? i : i + "", void 0,
|
|
43
|
+
const yr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, pi), nt = (i, ...e) => {
|
|
44
44
|
const t = i.length === 1 ? i[0] : e.reduce((n, s, r) => n + ((a) => {
|
|
45
45
|
if (a._$cssResult$ === !0)
|
|
46
46
|
return a.cssText;
|
|
@@ -48,7 +48,7 @@ const yr = (i) => new bs(typeof i == "string" ? i : i + "", void 0, hi), nt = (i
|
|
|
48
48
|
return a;
|
|
49
49
|
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.");
|
|
50
50
|
})(s) + i[r + 1], i[0]);
|
|
51
|
-
return new bs(t, i,
|
|
51
|
+
return new bs(t, i, pi);
|
|
52
52
|
}, vr = (i, e) => {
|
|
53
53
|
if (ui)
|
|
54
54
|
i.adoptedStyleSheets = e.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
@@ -96,7 +96,7 @@ const { is: br, defineProperty: wr, getOwnPropertyDescriptor: xr, getOwnProperty
|
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
return t;
|
|
99
|
-
} },
|
|
99
|
+
} }, mi = (i, e) => !br(i, e), qi = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: mi };
|
|
100
100
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), ct.litPropertyMetadata ?? (ct.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
101
101
|
class at extends HTMLElement {
|
|
102
102
|
static addInitializer(e) {
|
|
@@ -231,7 +231,7 @@ class at extends HTMLElement {
|
|
|
231
231
|
}
|
|
232
232
|
requestUpdate(e, t, n) {
|
|
233
233
|
if (e !== void 0) {
|
|
234
|
-
if (n ?? (n = this.constructor.getPropertyOptions(e)), !(n.hasChanged ??
|
|
234
|
+
if (n ?? (n = this.constructor.getPropertyOptions(e)), !(n.hasChanged ?? mi)(this[e], t))
|
|
235
235
|
return;
|
|
236
236
|
this.P(e, t, n);
|
|
237
237
|
}
|
|
@@ -315,8 +315,8 @@ at.elementStyles = [], at.shadowRootOptions = { mode: "open" }, at[wt("elementPr
|
|
|
315
315
|
* Copyright 2017 Google LLC
|
|
316
316
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
317
317
|
*/
|
|
318
|
-
const cn = globalThis, dn = cn.trustedTypes, Ki = dn ? dn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0,
|
|
319
|
-
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ji = /-->/g, Qi = />/g, De = RegExp(`>|${
|
|
318
|
+
const cn = globalThis, dn = cn.trustedTypes, Ki = dn ? dn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, gi = "$lit$", ke = `lit$${(Math.random() + "").slice(9)}$`, fi = "?" + ke, Er = `<${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", ei = `[
|
|
319
|
+
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ji = /-->/g, Qi = />/g, De = RegExp(`>|${ei}(?:([^\\s"'>=/]+)(${ei}*=${ei}*(?:[^
|
|
320
320
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), Yi = /'/g, Gi = /"/g, _s = /^(?:script|style|textarea|title)$/i, Sr = (i) => (e, ...t) => ({ _$litType$: i, strings: e, values: t }), z = Sr(1), fe = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), Xi = /* @__PURE__ */ new WeakMap(), Be = Ke.createTreeWalker(Ke, 129);
|
|
321
321
|
function ks(i, e) {
|
|
322
322
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
@@ -328,11 +328,11 @@ const $s = (i, e) => {
|
|
|
328
328
|
let s, r = e === 2 ? "<svg>" : "", a = yt;
|
|
329
329
|
for (let o = 0; o < t; o++) {
|
|
330
330
|
const l = i[o];
|
|
331
|
-
let d,
|
|
332
|
-
for (; c < l.length && (a.lastIndex = c,
|
|
333
|
-
c = a.lastIndex, a === yt ?
|
|
331
|
+
let d, h, p = -1, c = 0;
|
|
332
|
+
for (; c < l.length && (a.lastIndex = c, h = a.exec(l), h !== null); )
|
|
333
|
+
c = a.lastIndex, a === yt ? h[1] === "!--" ? a = Ji : h[1] !== void 0 ? a = Qi : h[2] !== void 0 ? (_s.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] === '"' ? Gi : Yi) : a === Gi || a === Yi ? a = De : a === Ji || a === Qi ? a = yt : (a = De, s = void 0);
|
|
334
334
|
const g = a === De && i[o + 1].startsWith("/>") ? " " : "";
|
|
335
|
-
r += a === yt ? l + Er : p >= 0 ? (n.push(d), l.slice(0, p) +
|
|
335
|
+
r += a === yt ? l + Er : p >= 0 ? (n.push(d), l.slice(0, p) + gi + l.slice(p) + ke + g) : l + ke + (p === -2 ? o : g);
|
|
336
336
|
}
|
|
337
337
|
return [ks(i, r + (i[t] || "<?>") + (e === 2 ? "</svg>" : "")), n];
|
|
338
338
|
};
|
|
@@ -341,7 +341,7 @@ class At {
|
|
|
341
341
|
let s;
|
|
342
342
|
this.parts = [];
|
|
343
343
|
let r = 0, a = 0;
|
|
344
|
-
const o = e.length - 1, l = this.parts, [d,
|
|
344
|
+
const o = e.length - 1, l = this.parts, [d, h] = $s(e, t);
|
|
345
345
|
if (this.el = At.createElement(d, n), Be.currentNode = this.el.content, t === 2) {
|
|
346
346
|
const p = this.el.content.firstChild;
|
|
347
347
|
p.replaceWith(...p.childNodes);
|
|
@@ -350,8 +350,8 @@ class At {
|
|
|
350
350
|
if (s.nodeType === 1) {
|
|
351
351
|
if (s.hasAttributes())
|
|
352
352
|
for (const p of s.getAttributeNames())
|
|
353
|
-
if (p.endsWith(
|
|
354
|
-
const c =
|
|
353
|
+
if (p.endsWith(gi)) {
|
|
354
|
+
const c = h[a++], g = s.getAttribute(p).split(ke), O = /([.?@])?(.*)/.exec(c);
|
|
355
355
|
l.push({ type: 1, index: r, name: O[2], strings: g, ctor: O[1] === "." ? Es : O[1] === "?" ? Ss : O[1] === "@" ? Cs : Wt }), s.removeAttribute(p);
|
|
356
356
|
} else
|
|
357
357
|
p.startsWith(ke) && (l.push({ type: 6, index: r }), s.removeAttribute(p));
|
|
@@ -365,7 +365,7 @@ class At {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
} else if (s.nodeType === 8)
|
|
368
|
-
if (s.data ===
|
|
368
|
+
if (s.data === fi)
|
|
369
369
|
l.push({ type: 2, index: r });
|
|
370
370
|
else {
|
|
371
371
|
let p = -1;
|
|
@@ -551,7 +551,7 @@ class As {
|
|
|
551
551
|
Je(this, e);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
const Cr = { P:
|
|
554
|
+
const Cr = { P: gi, A: ke, C: fi, M: 1, L: $s, R: Ts, D: xs, V: Je, I: mt, H: Wt, N: Ss, U: Cs, B: Es, F: As }, es = cn.litHtmlPolyfillSupport;
|
|
555
555
|
es == null || es(At, mt), (cn.litHtmlVersions ?? (cn.litHtmlVersions = [])).push("3.1.2");
|
|
556
556
|
const Ar = (i, e, t) => {
|
|
557
557
|
const n = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
@@ -612,7 +612,7 @@ const Ee = (i) => (e, t) => {
|
|
|
612
612
|
* Copyright 2017 Google LLC
|
|
613
613
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
614
614
|
*/
|
|
615
|
-
const Ir = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged:
|
|
615
|
+
const Ir = { attribute: !0, type: String, converter: ln, reflect: !1, hasChanged: mi }, Or = (i = Ir, e, t) => {
|
|
616
616
|
const { kind: n, metadata: s } = t;
|
|
617
617
|
let r = globalThis.litPropertyMetadata.get(s);
|
|
618
618
|
if (r === void 0 && globalThis.litPropertyMetadata.set(s, r = /* @__PURE__ */ new Map()), r.set(t.name, i), n === "accessor") {
|
|
@@ -725,13 +725,13 @@ const { I: Mr } = Cr, ss = () => document.createComment(""), vt = (i, e, t) => {
|
|
|
725
725
|
if (a !== r || l) {
|
|
726
726
|
let d = t._$AA;
|
|
727
727
|
for (; d !== a; ) {
|
|
728
|
-
const
|
|
729
|
-
s.insertBefore(d, r), d =
|
|
728
|
+
const h = d.nextSibling;
|
|
729
|
+
s.insertBefore(d, r), d = h;
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
733
|
return t;
|
|
734
|
-
}, Ue = (i, e, t = i) => (i._$AI(e, t), i), Rr = {}, Nr = (i, e = Rr) => i._$AH = e, Pr = (i) => i._$AH,
|
|
734
|
+
}, Ue = (i, e, t = i) => (i._$AI(e, t), i), Rr = {}, Nr = (i, e = Rr) => i._$AH = e, Pr = (i) => i._$AH, ti = (i) => {
|
|
735
735
|
var e;
|
|
736
736
|
(e = i._$AP) == null || e.call(i, !1, !0);
|
|
737
737
|
let t = i._$AA;
|
|
@@ -773,7 +773,7 @@ const rs = (i, e, t) => {
|
|
|
773
773
|
if (!Array.isArray(s))
|
|
774
774
|
return this.ut = a, r;
|
|
775
775
|
const o = this.ut ?? (this.ut = []), l = [];
|
|
776
|
-
let d,
|
|
776
|
+
let d, h, p = 0, c = s.length - 1, g = 0, O = r.length - 1;
|
|
777
777
|
for (; p <= c && g <= O; )
|
|
778
778
|
if (s[p] === null)
|
|
779
779
|
p++;
|
|
@@ -787,30 +787,30 @@ const rs = (i, e, t) => {
|
|
|
787
787
|
l[O] = Ue(s[p], r[O]), vt(i, l[O + 1], s[p]), p++, O--;
|
|
788
788
|
else if (o[c] === a[g])
|
|
789
789
|
l[g] = Ue(s[c], r[g]), vt(i, s[p], s[c]), c--, g++;
|
|
790
|
-
else if (d === void 0 && (d = rs(a, g, O),
|
|
790
|
+
else if (d === void 0 && (d = rs(a, g, O), h = rs(o, p, c)), d.has(o[p]))
|
|
791
791
|
if (d.has(o[c])) {
|
|
792
|
-
const
|
|
792
|
+
const D = h.get(a[g]), J = D !== void 0 ? s[D] : null;
|
|
793
793
|
if (J === null) {
|
|
794
794
|
const Ce = vt(i, s[p]);
|
|
795
795
|
Ue(Ce, r[g]), l[g] = Ce;
|
|
796
796
|
} else
|
|
797
|
-
l[g] = Ue(J, r[g]), vt(i, s[p], J), s[
|
|
797
|
+
l[g] = Ue(J, r[g]), vt(i, s[p], J), s[D] = null;
|
|
798
798
|
g++;
|
|
799
799
|
} else
|
|
800
|
-
|
|
800
|
+
ti(s[c]), c--;
|
|
801
801
|
else
|
|
802
|
-
|
|
802
|
+
ti(s[p]), p++;
|
|
803
803
|
for (; g <= O; ) {
|
|
804
|
-
const
|
|
805
|
-
Ue(
|
|
804
|
+
const D = vt(i, l[O + 1]);
|
|
805
|
+
Ue(D, r[g]), l[g++] = D;
|
|
806
806
|
}
|
|
807
807
|
for (; p <= c; ) {
|
|
808
|
-
const
|
|
809
|
-
|
|
808
|
+
const D = s[p++];
|
|
809
|
+
D !== null && ti(D);
|
|
810
810
|
}
|
|
811
811
|
return this.ut = a, Nr(i, l), fe;
|
|
812
812
|
}
|
|
813
|
-
}), 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}.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-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.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}}`;
|
|
813
|
+
}), 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}.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-6{width:1.5rem}.w-9{width:2.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-2{padding-bottom:.5rem}.pb-8{padding-bottom:2rem}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.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}}`;
|
|
814
814
|
var jr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, Rn = (i, e, t, n) => {
|
|
815
815
|
for (var s = n > 1 ? void 0 : n ? zr(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
816
816
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
@@ -934,20 +934,20 @@ function Zr(i) {
|
|
|
934
934
|
} else
|
|
935
935
|
return Array.from(i);
|
|
936
936
|
}
|
|
937
|
-
var
|
|
937
|
+
var yi = !1;
|
|
938
938
|
if (typeof window < "u") {
|
|
939
939
|
var as = {
|
|
940
940
|
get passive() {
|
|
941
|
-
|
|
941
|
+
yi = !0;
|
|
942
942
|
}
|
|
943
943
|
};
|
|
944
944
|
window.addEventListener("testPassive", null, as), window.removeEventListener("testPassive", null, as);
|
|
945
945
|
}
|
|
946
|
-
var
|
|
946
|
+
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, _t = void 0, Ms = function(i) {
|
|
947
947
|
return Fe.some(function(e) {
|
|
948
948
|
return !!(e.options.allowTouchMove && e.options.allowTouchMove(i));
|
|
949
949
|
});
|
|
950
|
-
},
|
|
950
|
+
}, vi = function(i) {
|
|
951
951
|
var e = i || window.event;
|
|
952
952
|
return Ms(e.target) || e.touches.length > 1 ? !0 : (e.preventDefault && e.preventDefault(), !1);
|
|
953
953
|
}, Lr = function(i) {
|
|
@@ -987,7 +987,7 @@ var un = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
987
987
|
return i ? i.scrollHeight - i.scrollTop <= i.clientHeight : !1;
|
|
988
988
|
}, Wr = function(i, e) {
|
|
989
989
|
var t = i.targetTouches[0].clientY - Os;
|
|
990
|
-
return Ms(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Br(e) && t < 0 ?
|
|
990
|
+
return Ms(i.target) ? !1 : e && e.scrollTop === 0 && t > 0 || Br(e) && t < 0 ? vi(i) : (i.stopPropagation(), !0);
|
|
991
991
|
}, Fr = function(i, e) {
|
|
992
992
|
if (!i) {
|
|
993
993
|
console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");
|
|
@@ -1000,11 +1000,11 @@ var un = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
1000
1000
|
targetElement: i,
|
|
1001
1001
|
options: e || {}
|
|
1002
1002
|
};
|
|
1003
|
-
Fe = [].concat(Zr(Fe), [t]),
|
|
1003
|
+
Fe = [].concat(Zr(Fe), [t]), hn ? Ur() : Lr(e), hn && (i.ontouchstart = function(n) {
|
|
1004
1004
|
n.targetTouches.length === 1 && (Os = n.targetTouches[0].clientY);
|
|
1005
1005
|
}, i.ontouchmove = function(n) {
|
|
1006
1006
|
n.targetTouches.length === 1 && Wr(n, i);
|
|
1007
|
-
},
|
|
1007
|
+
}, un || (document.addEventListener("touchmove", vi, yi ? { passive: !1 } : void 0), un = !0));
|
|
1008
1008
|
}
|
|
1009
1009
|
}, os = function(i) {
|
|
1010
1010
|
if (!i) {
|
|
@@ -1013,7 +1013,7 @@ var un = typeof window < "u" && window.navigator && window.navigator.platform &&
|
|
|
1013
1013
|
}
|
|
1014
1014
|
Fe = Fe.filter(function(e) {
|
|
1015
1015
|
return e.targetElement !== i;
|
|
1016
|
-
}),
|
|
1016
|
+
}), hn && (i.ontouchstart = null, i.ontouchmove = null, un && Fe.length === 0 && (document.removeEventListener("touchmove", vi, yi ? { passive: !1 } : void 0), un = !1)), hn ? Hr() : Dr();
|
|
1017
1017
|
};
|
|
1018
1018
|
/**
|
|
1019
1019
|
* @license
|
|
@@ -1084,36 +1084,36 @@ const Rs = "important", Vr = " !" + Rs, Ve = On(class extends Mn {
|
|
|
1084
1084
|
function qr(i) {
|
|
1085
1085
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
1086
1086
|
}
|
|
1087
|
-
var
|
|
1087
|
+
var bi = {};
|
|
1088
1088
|
(function(i) {
|
|
1089
1089
|
function e(o) {
|
|
1090
1090
|
o && o.options && clearTimeout(o.options.timer);
|
|
1091
1091
|
}
|
|
1092
|
-
function t(o, l, d,
|
|
1092
|
+
function t(o, l, d, h) {
|
|
1093
1093
|
var p = { timer: void 0, lastArgs: [] }, c = function() {
|
|
1094
|
-
for (var g = this, O = [],
|
|
1095
|
-
O[
|
|
1094
|
+
for (var g = this, O = [], D = 0; D < arguments.length; D++)
|
|
1095
|
+
O[D] = arguments[D];
|
|
1096
1096
|
p.lastArgs = O, p.timer ? clearTimeout(p.timer) : l && d.apply(this, p.lastArgs), p.timer = setTimeout(function() {
|
|
1097
1097
|
l || d.apply(g, p.lastArgs), p.timer = void 0;
|
|
1098
1098
|
}, o);
|
|
1099
1099
|
};
|
|
1100
|
-
return
|
|
1100
|
+
return h && (c = c.bind(h)), c.options = p, c;
|
|
1101
1101
|
}
|
|
1102
|
-
function n(o, l, d,
|
|
1102
|
+
function n(o, l, d, h) {
|
|
1103
1103
|
var p;
|
|
1104
|
-
Object.defineProperty(d,
|
|
1104
|
+
Object.defineProperty(d, h, { configurable: !0, enumerable: !1, get: function() {
|
|
1105
1105
|
return p;
|
|
1106
1106
|
}, set: function(c) {
|
|
1107
1107
|
p = t(o, l, c, this);
|
|
1108
1108
|
} });
|
|
1109
1109
|
}
|
|
1110
1110
|
function s(o, l, d) {
|
|
1111
|
-
var
|
|
1112
|
-
return d.value = t(o, l,
|
|
1111
|
+
var h = d.value;
|
|
1112
|
+
return d.value = t(o, l, h), d;
|
|
1113
1113
|
}
|
|
1114
1114
|
function r(o, l) {
|
|
1115
|
-
for (var d = [],
|
|
1116
|
-
d[
|
|
1115
|
+
for (var d = [], h = 2; h < arguments.length; h++)
|
|
1116
|
+
d[h - 2] = arguments[h];
|
|
1117
1117
|
if (d.length === 0)
|
|
1118
1118
|
throw new Error("function applied debounce decorator should be a method");
|
|
1119
1119
|
if (d.length === 1)
|
|
@@ -1126,20 +1126,20 @@ var vi = {};
|
|
|
1126
1126
|
function a() {
|
|
1127
1127
|
for (var o = [], l = 0; l < arguments.length; l++)
|
|
1128
1128
|
o[l] = arguments[l];
|
|
1129
|
-
var d = 500,
|
|
1129
|
+
var d = 500, h = !1;
|
|
1130
1130
|
if (o.length && (typeof o[0] == "number" || typeof o[0] == "object" && o[0].leading !== void 0)) {
|
|
1131
1131
|
typeof o[0] == "number" && (d = o[0]);
|
|
1132
1132
|
var p = void 0;
|
|
1133
|
-
return typeof o[0] == "object" && o[0].leading !== void 0 && (p = o[0]), 1 < o.length && typeof o[1] == "object" && o[1].leading !== void 0 && (p = o[1]), p && (
|
|
1133
|
+
return typeof o[0] == "object" && o[0].leading !== void 0 && (p = o[0]), 1 < o.length && typeof o[1] == "object" && o[1].leading !== void 0 && (p = o[1]), p && (h = p.leading), function() {
|
|
1134
1134
|
for (var c = [], g = 0; g < arguments.length; g++)
|
|
1135
1135
|
c[g] = arguments[g];
|
|
1136
|
-
return r.apply(void 0, [d,
|
|
1136
|
+
return r.apply(void 0, [d, h].concat(c));
|
|
1137
1137
|
};
|
|
1138
1138
|
}
|
|
1139
|
-
return r.apply(void 0, [d,
|
|
1139
|
+
return r.apply(void 0, [d, h].concat(o));
|
|
1140
1140
|
}
|
|
1141
1141
|
Object.defineProperty(i, "__esModule", { value: !0 }), i.cancel = e, i.debounce = a;
|
|
1142
|
-
})(
|
|
1142
|
+
})(bi);
|
|
1143
1143
|
var P;
|
|
1144
1144
|
(function(i) {
|
|
1145
1145
|
i.assertEqual = (s) => s;
|
|
@@ -1176,14 +1176,14 @@ var P;
|
|
|
1176
1176
|
}
|
|
1177
1177
|
i.joinValues = n, i.jsonStringifyReplacer = (s, r) => typeof r == "bigint" ? r.toString() : r;
|
|
1178
1178
|
})(P || (P = {}));
|
|
1179
|
-
var
|
|
1179
|
+
var si;
|
|
1180
1180
|
(function(i) {
|
|
1181
1181
|
i.mergeShapes = (e, t) => ({
|
|
1182
1182
|
...e,
|
|
1183
1183
|
...t
|
|
1184
1184
|
// second overwrites first
|
|
1185
1185
|
});
|
|
1186
|
-
})(
|
|
1186
|
+
})(si || (si = {}));
|
|
1187
1187
|
const f = P.arrayToEnum([
|
|
1188
1188
|
"string",
|
|
1189
1189
|
"nan",
|
|
@@ -1434,7 +1434,7 @@ class G {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
const S = Object.freeze({
|
|
1436
1436
|
status: "aborted"
|
|
1437
|
-
}), Ps = (i) => ({ status: "dirty", value: i }), ee = (i) => ({ status: "valid", value: i }),
|
|
1437
|
+
}), Ps = (i) => ({ status: "dirty", value: i }), ee = (i) => ({ status: "valid", value: i }), ri = (i) => i.status === "aborted", ai = (i) => i.status === "dirty", Ot = (i) => i.status === "valid", gn = (i) => typeof Promise < "u" && i instanceof Promise;
|
|
1438
1438
|
var x;
|
|
1439
1439
|
(function(i) {
|
|
1440
1440
|
i.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, i.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
@@ -1592,7 +1592,7 @@ class I {
|
|
|
1592
1592
|
return ce.create(this, this._def);
|
|
1593
1593
|
}
|
|
1594
1594
|
promise() {
|
|
1595
|
-
return
|
|
1595
|
+
return ut.create(this, this._def);
|
|
1596
1596
|
}
|
|
1597
1597
|
or(e) {
|
|
1598
1598
|
return Pt.create([this, e], this._def);
|
|
@@ -1654,7 +1654,7 @@ class I {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
}
|
|
1656
1656
|
const Yr = /^c[^\s-]{8,}$/i, Gr = /^[a-z][a-z0-9]*$/, Xr = /^[0-9A-HJKMNP-TV-Z]{26}$/, ea = /^[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, ta = /^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, na = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1657
|
-
let
|
|
1657
|
+
let ni;
|
|
1658
1658
|
const ia = /^(((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}))$/, sa = /^(([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})))$/, ra = (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$");
|
|
1659
1659
|
function aa(i, e) {
|
|
1660
1660
|
return !!((e === "v4" || !e) && ia.test(i) || (e === "v6" || !e) && sa.test(i));
|
|
@@ -1718,7 +1718,7 @@ class oe extends I {
|
|
|
1718
1718
|
message: s.message
|
|
1719
1719
|
}), t.dirty());
|
|
1720
1720
|
else if (s.kind === "emoji")
|
|
1721
|
-
|
|
1721
|
+
ni || (ni = new RegExp(na, "u")), ni.test(e.data) || (n = this._getOrReturnCtx(e, n), y(n, {
|
|
1722
1722
|
validation: "emoji",
|
|
1723
1723
|
code: m.invalid_string,
|
|
1724
1724
|
message: s.message
|
|
@@ -2411,7 +2411,7 @@ Nt.create = (i) => new Nt({
|
|
|
2411
2411
|
typeName: T.ZodNull,
|
|
2412
2412
|
...A(i)
|
|
2413
2413
|
});
|
|
2414
|
-
class
|
|
2414
|
+
class ht extends I {
|
|
2415
2415
|
constructor() {
|
|
2416
2416
|
super(...arguments), this._any = !0;
|
|
2417
2417
|
}
|
|
@@ -2419,7 +2419,7 @@ class ut extends I {
|
|
|
2419
2419
|
return ee(e.data);
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
|
-
|
|
2422
|
+
ht.create = (i) => new ht({
|
|
2423
2423
|
typeName: T.ZodAny,
|
|
2424
2424
|
...A(i)
|
|
2425
2425
|
});
|
|
@@ -2581,10 +2581,10 @@ class F extends I {
|
|
|
2581
2581
|
r.includes(l) || a.push(l);
|
|
2582
2582
|
const o = [];
|
|
2583
2583
|
for (const l of r) {
|
|
2584
|
-
const d = s[l],
|
|
2584
|
+
const d = s[l], h = n.data[l];
|
|
2585
2585
|
o.push({
|
|
2586
2586
|
key: { status: "valid", value: l },
|
|
2587
|
-
value: d._parse(new ye(n,
|
|
2587
|
+
value: d._parse(new ye(n, h, n.path, l)),
|
|
2588
2588
|
alwaysSet: l in n.data
|
|
2589
2589
|
});
|
|
2590
2590
|
}
|
|
@@ -2606,11 +2606,11 @@ class F extends I {
|
|
|
2606
2606
|
} else {
|
|
2607
2607
|
const l = this._def.catchall;
|
|
2608
2608
|
for (const d of a) {
|
|
2609
|
-
const
|
|
2609
|
+
const h = n.data[d];
|
|
2610
2610
|
o.push({
|
|
2611
2611
|
key: { status: "valid", value: d },
|
|
2612
2612
|
value: l._parse(
|
|
2613
|
-
new ye(n,
|
|
2613
|
+
new ye(n, h, n.path, d)
|
|
2614
2614
|
//, ctx.child(key), value, getParsedType(value)
|
|
2615
2615
|
),
|
|
2616
2616
|
alwaysSet: d in n.data
|
|
@@ -2620,9 +2620,9 @@ class F extends I {
|
|
|
2620
2620
|
return n.common.async ? Promise.resolve().then(async () => {
|
|
2621
2621
|
const l = [];
|
|
2622
2622
|
for (const d of o) {
|
|
2623
|
-
const
|
|
2623
|
+
const h = await d.key;
|
|
2624
2624
|
l.push({
|
|
2625
|
-
key:
|
|
2625
|
+
key: h,
|
|
2626
2626
|
value: await d.value,
|
|
2627
2627
|
alwaysSet: d.alwaysSet
|
|
2628
2628
|
});
|
|
@@ -2890,14 +2890,14 @@ class Pt extends I {
|
|
|
2890
2890
|
issues: []
|
|
2891
2891
|
},
|
|
2892
2892
|
parent: null
|
|
2893
|
-
},
|
|
2893
|
+
}, h = l._parseSync({
|
|
2894
2894
|
data: t.data,
|
|
2895
2895
|
path: t.path,
|
|
2896
2896
|
parent: d
|
|
2897
2897
|
});
|
|
2898
|
-
if (
|
|
2899
|
-
return
|
|
2900
|
-
|
|
2898
|
+
if (h.status === "valid")
|
|
2899
|
+
return h;
|
|
2900
|
+
h.status === "dirty" && !r && (r = { result: h, ctx: d }), d.common.issues.length && a.push(d.common.issues);
|
|
2901
2901
|
}
|
|
2902
2902
|
if (r)
|
|
2903
2903
|
return t.common.issues.push(...r.ctx.common.issues), r.result;
|
|
@@ -2980,14 +2980,14 @@ class Nn extends I {
|
|
|
2980
2980
|
});
|
|
2981
2981
|
}
|
|
2982
2982
|
}
|
|
2983
|
-
function
|
|
2983
|
+
function oi(i, e) {
|
|
2984
2984
|
const t = Me(i), n = Me(e);
|
|
2985
2985
|
if (i === e)
|
|
2986
2986
|
return { valid: !0, data: i };
|
|
2987
2987
|
if (t === f.object && n === f.object) {
|
|
2988
2988
|
const s = P.objectKeys(e), r = P.objectKeys(i).filter((o) => s.indexOf(o) !== -1), a = { ...i, ...e };
|
|
2989
2989
|
for (const o of r) {
|
|
2990
|
-
const l =
|
|
2990
|
+
const l = oi(i[o], e[o]);
|
|
2991
2991
|
if (!l.valid)
|
|
2992
2992
|
return { valid: !1 };
|
|
2993
2993
|
a[o] = l.data;
|
|
@@ -2998,7 +2998,7 @@ function ai(i, e) {
|
|
|
2998
2998
|
return { valid: !1 };
|
|
2999
2999
|
const s = [];
|
|
3000
3000
|
for (let r = 0; r < i.length; r++) {
|
|
3001
|
-
const a = i[r], o = e[r], l =
|
|
3001
|
+
const a = i[r], o = e[r], l = oi(a, o);
|
|
3002
3002
|
if (!l.valid)
|
|
3003
3003
|
return { valid: !1 };
|
|
3004
3004
|
s.push(l.data);
|
|
@@ -3010,10 +3010,10 @@ function ai(i, e) {
|
|
|
3010
3010
|
class jt extends I {
|
|
3011
3011
|
_parse(e) {
|
|
3012
3012
|
const { status: t, ctx: n } = this._processInputParams(e), s = (r, a) => {
|
|
3013
|
-
if (
|
|
3013
|
+
if (ri(r) || ri(a))
|
|
3014
3014
|
return S;
|
|
3015
|
-
const o =
|
|
3016
|
-
return o.valid ? ((
|
|
3015
|
+
const o = oi(r.value, a.value);
|
|
3016
|
+
return o.valid ? ((ai(r) || ai(a)) && t.dirty(), { status: t.value, value: o.data }) : (y(n, {
|
|
3017
3017
|
code: m.invalid_intersection_types
|
|
3018
3018
|
}), S);
|
|
3019
3019
|
};
|
|
@@ -3158,20 +3158,20 @@ class vn extends I {
|
|
|
3158
3158
|
const o = /* @__PURE__ */ new Map();
|
|
3159
3159
|
return Promise.resolve().then(async () => {
|
|
3160
3160
|
for (const l of a) {
|
|
3161
|
-
const d = await l.key,
|
|
3162
|
-
if (d.status === "aborted" ||
|
|
3161
|
+
const d = await l.key, h = await l.value;
|
|
3162
|
+
if (d.status === "aborted" || h.status === "aborted")
|
|
3163
3163
|
return S;
|
|
3164
|
-
(d.status === "dirty" ||
|
|
3164
|
+
(d.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(d.value, h.value);
|
|
3165
3165
|
}
|
|
3166
3166
|
return { status: t.value, value: o };
|
|
3167
3167
|
});
|
|
3168
3168
|
} else {
|
|
3169
3169
|
const o = /* @__PURE__ */ new Map();
|
|
3170
3170
|
for (const l of a) {
|
|
3171
|
-
const d = l.key,
|
|
3172
|
-
if (d.status === "aborted" ||
|
|
3171
|
+
const d = l.key, h = l.value;
|
|
3172
|
+
if (d.status === "aborted" || h.status === "aborted")
|
|
3173
3173
|
return S;
|
|
3174
|
-
(d.status === "dirty" ||
|
|
3174
|
+
(d.status === "dirty" || h.status === "dirty") && t.dirty(), o.set(d.value, h.value);
|
|
3175
3175
|
}
|
|
3176
3176
|
return { status: t.value, value: o };
|
|
3177
3177
|
}
|
|
@@ -3211,10 +3211,10 @@ class Ye extends I {
|
|
|
3211
3211
|
const r = this._def.valueType;
|
|
3212
3212
|
function a(l) {
|
|
3213
3213
|
const d = /* @__PURE__ */ new Set();
|
|
3214
|
-
for (const
|
|
3215
|
-
if (
|
|
3214
|
+
for (const h of l) {
|
|
3215
|
+
if (h.status === "aborted")
|
|
3216
3216
|
return S;
|
|
3217
|
-
|
|
3217
|
+
h.status === "dirty" && t.dirty(), d.add(h.value);
|
|
3218
3218
|
}
|
|
3219
3219
|
return { status: t.value, value: d };
|
|
3220
3220
|
}
|
|
@@ -3292,12 +3292,12 @@ class lt extends I {
|
|
|
3292
3292
|
});
|
|
3293
3293
|
}
|
|
3294
3294
|
const r = { errorMap: t.common.contextualErrorMap }, a = t.data;
|
|
3295
|
-
if (this._def.returns instanceof
|
|
3295
|
+
if (this._def.returns instanceof ut) {
|
|
3296
3296
|
const o = this;
|
|
3297
3297
|
return ee(async function(...l) {
|
|
3298
|
-
const d = new le([]),
|
|
3298
|
+
const d = new le([]), h = await o._def.args.parseAsync(l, r).catch((c) => {
|
|
3299
3299
|
throw d.addIssue(n(l, c)), d;
|
|
3300
|
-
}), p = await Reflect.apply(a, this,
|
|
3300
|
+
}), p = await Reflect.apply(a, this, h);
|
|
3301
3301
|
return await o._def.returns._def.type.parseAsync(p, r).catch((c) => {
|
|
3302
3302
|
throw d.addIssue(s(p, c)), d;
|
|
3303
3303
|
});
|
|
@@ -3308,9 +3308,9 @@ class lt extends I {
|
|
|
3308
3308
|
const d = o._def.args.safeParse(l, r);
|
|
3309
3309
|
if (!d.success)
|
|
3310
3310
|
throw new le([n(l, d.error)]);
|
|
3311
|
-
const
|
|
3311
|
+
const h = Reflect.apply(a, this, d.data), p = o._def.returns.safeParse(h, r);
|
|
3312
3312
|
if (!p.success)
|
|
3313
|
-
throw new le([s(
|
|
3313
|
+
throw new le([s(h, p.error)]);
|
|
3314
3314
|
return p.data;
|
|
3315
3315
|
});
|
|
3316
3316
|
}
|
|
@@ -3469,7 +3469,7 @@ Dt.create = (i, e) => new Dt({
|
|
|
3469
3469
|
typeName: T.ZodNativeEnum,
|
|
3470
3470
|
...A(e)
|
|
3471
3471
|
});
|
|
3472
|
-
class
|
|
3472
|
+
class ut extends I {
|
|
3473
3473
|
unwrap() {
|
|
3474
3474
|
return this._def.type;
|
|
3475
3475
|
}
|
|
@@ -3488,7 +3488,7 @@ class ht extends I {
|
|
|
3488
3488
|
})));
|
|
3489
3489
|
}
|
|
3490
3490
|
}
|
|
3491
|
-
|
|
3491
|
+
ut.create = (i, e) => new ut({
|
|
3492
3492
|
type: i,
|
|
3493
3493
|
typeName: T.ZodPromise,
|
|
3494
3494
|
...A(e)
|
|
@@ -3744,13 +3744,13 @@ xn.create = (i, e) => new xn({
|
|
|
3744
3744
|
typeName: T.ZodReadonly,
|
|
3745
3745
|
...A(e)
|
|
3746
3746
|
});
|
|
3747
|
-
const Zs = (i, e = {}, t) => i ?
|
|
3747
|
+
const Zs = (i, e = {}, t) => i ? ht.create().superRefine((n, s) => {
|
|
3748
3748
|
var r, a;
|
|
3749
3749
|
if (!i(n)) {
|
|
3750
3750
|
const o = typeof e == "function" ? e(n) : typeof e == "string" ? { message: e } : e, l = (a = (r = o.fatal) !== null && r !== void 0 ? r : t) !== null && a !== void 0 ? a : !0, d = typeof o == "string" ? { message: o } : o;
|
|
3751
3751
|
s.addIssue({ code: "custom", ...d, fatal: l });
|
|
3752
3752
|
}
|
|
3753
|
-
}) :
|
|
3753
|
+
}) : ht.create(), ca = {
|
|
3754
3754
|
object: F.lazycreate
|
|
3755
3755
|
};
|
|
3756
3756
|
var T;
|
|
@@ -3759,7 +3759,7 @@ var T;
|
|
|
3759
3759
|
})(T || (T = {}));
|
|
3760
3760
|
const da = (i, e = {
|
|
3761
3761
|
message: `Input not instance of ${i.name}`
|
|
3762
|
-
}) => Zs((t) => t instanceof i, e), Ls = oe.create, Ds = Ne.create,
|
|
3762
|
+
}) => Zs((t) => t instanceof i, e), Ls = oe.create, Ds = Ne.create, ha = wn.create, ua = Pe.create, Us = Mt.create, pa = Qe.create, ma = fn.create, ga = Rt.create, fa = Nt.create, ya = ht.create, va = qe.create, ba = Te.create, wa = yn.create, xa = ce.create, _a = F.create, ka = F.strictCreate, $a = Pt.create, Ta = Nn.create, Ea = jt.create, Sa = ve.create, Ca = zt.create, Aa = vn.create, Ia = Ye.create, Oa = lt.create, Ma = Zt.create, Ra = Lt.create, Na = je.create, Pa = Dt.create, ja = ut.create, ds = de.create, za = $e.create, Za = Ge.create, La = de.createWithPreprocess, Da = Ft.create, Ua = () => Ls().optional(), Ha = () => Ds().optional(), Ba = () => Us().optional(), Wa = {
|
|
3763
3763
|
string: (i) => oe.create({ ...i, coerce: !0 }),
|
|
3764
3764
|
number: (i) => Ne.create({ ...i, coerce: !0 }),
|
|
3765
3765
|
boolean: (i) => Mt.create({
|
|
@@ -3781,15 +3781,15 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3781
3781
|
INVALID: S,
|
|
3782
3782
|
DIRTY: Ps,
|
|
3783
3783
|
OK: ee,
|
|
3784
|
-
isAborted:
|
|
3785
|
-
isDirty:
|
|
3784
|
+
isAborted: ri,
|
|
3785
|
+
isDirty: ai,
|
|
3786
3786
|
isValid: Ot,
|
|
3787
3787
|
isAsync: gn,
|
|
3788
3788
|
get util() {
|
|
3789
3789
|
return P;
|
|
3790
3790
|
},
|
|
3791
3791
|
get objectUtil() {
|
|
3792
|
-
return
|
|
3792
|
+
return si;
|
|
3793
3793
|
},
|
|
3794
3794
|
ZodParsedType: f,
|
|
3795
3795
|
getParsedType: Me,
|
|
@@ -3802,7 +3802,7 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3802
3802
|
ZodSymbol: fn,
|
|
3803
3803
|
ZodUndefined: Rt,
|
|
3804
3804
|
ZodNull: Nt,
|
|
3805
|
-
ZodAny:
|
|
3805
|
+
ZodAny: ht,
|
|
3806
3806
|
ZodUnknown: qe,
|
|
3807
3807
|
ZodNever: Te,
|
|
3808
3808
|
ZodVoid: yn,
|
|
@@ -3820,7 +3820,7 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3820
3820
|
ZodLiteral: Lt,
|
|
3821
3821
|
ZodEnum: je,
|
|
3822
3822
|
ZodNativeEnum: Dt,
|
|
3823
|
-
ZodPromise:
|
|
3823
|
+
ZodPromise: ut,
|
|
3824
3824
|
ZodEffects: de,
|
|
3825
3825
|
ZodTransformer: de,
|
|
3826
3826
|
ZodOptional: $e,
|
|
@@ -3842,7 +3842,7 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3842
3842
|
coerce: Wa,
|
|
3843
3843
|
any: ya,
|
|
3844
3844
|
array: xa,
|
|
3845
|
-
bigint:
|
|
3845
|
+
bigint: ua,
|
|
3846
3846
|
boolean: Us,
|
|
3847
3847
|
date: pa,
|
|
3848
3848
|
discriminatedUnion: Ta,
|
|
@@ -3854,7 +3854,7 @@ var w = /* @__PURE__ */ Object.freeze({
|
|
|
3854
3854
|
lazy: Ma,
|
|
3855
3855
|
literal: Ra,
|
|
3856
3856
|
map: Aa,
|
|
3857
|
-
nan:
|
|
3857
|
+
nan: ha,
|
|
3858
3858
|
nativeEnum: Pa,
|
|
3859
3859
|
never: ba,
|
|
3860
3860
|
null: fa,
|
|
@@ -4031,14 +4031,14 @@ Vt([
|
|
|
4031
4031
|
An("iai-chat")
|
|
4032
4032
|
], Xe.prototype, "chatWindow", 2);
|
|
4033
4033
|
Vt([
|
|
4034
|
-
|
|
4034
|
+
bi.debounce(250)
|
|
4035
4035
|
], Xe.prototype, "onResizeHandler", 2);
|
|
4036
4036
|
Xe = Vt([
|
|
4037
4037
|
Ee("iai-chat-popup")
|
|
4038
4038
|
], Xe);
|
|
4039
|
-
const
|
|
4039
|
+
const jn = "https://api-dev.ai.inhabit.work";
|
|
4040
4040
|
async function Ka(i, e = {}) {
|
|
4041
|
-
return (await fetch(`${
|
|
4041
|
+
return (await fetch(`${jn}/threads`, {
|
|
4042
4042
|
method: "POST",
|
|
4043
4043
|
headers: {
|
|
4044
4044
|
"Content-Type": "application/json"
|
|
@@ -4046,8 +4046,17 @@ async function Ka(i, e = {}) {
|
|
|
4046
4046
|
body: JSON.stringify({ assistantId: i, params: e })
|
|
4047
4047
|
})).json();
|
|
4048
4048
|
}
|
|
4049
|
-
async function Ja(i, e) {
|
|
4050
|
-
|
|
4049
|
+
async function Ja(i, e = "No reason provided") {
|
|
4050
|
+
await fetch(`${jn}/threads/${i}`, {
|
|
4051
|
+
method: "DELETE",
|
|
4052
|
+
headers: {
|
|
4053
|
+
"Content-Type": "application/json"
|
|
4054
|
+
},
|
|
4055
|
+
body: JSON.stringify({ reason: e })
|
|
4056
|
+
});
|
|
4057
|
+
}
|
|
4058
|
+
async function Qa(i, e) {
|
|
4059
|
+
return (await fetch(`${jn}/threads/${i}/messages`, {
|
|
4051
4060
|
method: "POST",
|
|
4052
4061
|
headers: {
|
|
4053
4062
|
"Content-Type": "application/json"
|
|
@@ -4055,8 +4064,8 @@ async function Ja(i, e) {
|
|
|
4055
4064
|
body: JSON.stringify({ content: e })
|
|
4056
4065
|
})).json();
|
|
4057
4066
|
}
|
|
4058
|
-
async function
|
|
4059
|
-
return (await fetch(`${
|
|
4067
|
+
async function Ya(i, e, t, n = !1) {
|
|
4068
|
+
return (await fetch(`${jn}/threads/${i}/functions/${e}`, {
|
|
4060
4069
|
method: "POST",
|
|
4061
4070
|
headers: {
|
|
4062
4071
|
"Content-Type": "application/json"
|
|
@@ -4064,7 +4073,7 @@ async function Qa(i, e, t, n = !1) {
|
|
|
4064
4073
|
body: JSON.stringify({ params: t, rerunLLM: n })
|
|
4065
4074
|
})).json();
|
|
4066
4075
|
}
|
|
4067
|
-
function
|
|
4076
|
+
function Ga(i) {
|
|
4068
4077
|
return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
4069
4078
|
var n = i.get(e);
|
|
4070
4079
|
n ? n.push(t) : i.set(e, [t]);
|
|
@@ -4080,7 +4089,7 @@ function Ya(i) {
|
|
|
4080
4089
|
});
|
|
4081
4090
|
} };
|
|
4082
4091
|
}
|
|
4083
|
-
class
|
|
4092
|
+
class Xa {
|
|
4084
4093
|
constructor(e, t = {}) {
|
|
4085
4094
|
if (this._assistantId = "", this._conversationDetails = null, this._messages = [], this.isTyping = !1, this.inputDisabled = !1, this.chatEndingWarningSent = !1, this.chatEnded = !1, this.onStorageEvent = (n) => {
|
|
4086
4095
|
var s;
|
|
@@ -4114,7 +4123,7 @@ class Ga {
|
|
|
4114
4123
|
simulateDelays: !1,
|
|
4115
4124
|
historyKey: "main",
|
|
4116
4125
|
...t
|
|
4117
|
-
}, this._emitter =
|
|
4126
|
+
}, this._emitter = Ga(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), t.events && Object.entries(t.events).forEach(([n, s]) => {
|
|
4118
4127
|
this._emitter.on(n, s);
|
|
4119
4128
|
}), t.historyKey) {
|
|
4120
4129
|
this._messages = this.storageGet("messageHistory", []);
|
|
@@ -4144,8 +4153,12 @@ class Ga {
|
|
|
4144
4153
|
n.includes(r.id) || this._emitter.emit("message", r);
|
|
4145
4154
|
}), this._messages = t;
|
|
4146
4155
|
}
|
|
4147
|
-
|
|
4148
|
-
this.
|
|
4156
|
+
async endChat(e, t = !0) {
|
|
4157
|
+
!this.threadId || this.chatEnded || (t && (this._emitter.emit("chatEnded"), this.setChatEnded(!0)), this.stopInactivityTimers(), await Ja(this.threadId, e));
|
|
4158
|
+
}
|
|
4159
|
+
reset(e) {
|
|
4160
|
+
this.endChat(e, !1).then(() => {
|
|
4161
|
+
}), this._messages = [], this.setConversationDetails(null), this.setTyping(!1), this.setInputDisabled(!1), this.setChatEnded(!1), this.stopInactivityTimers(), this.storageRemoveAll(), this._emitter.emit("reset");
|
|
4149
4162
|
}
|
|
4150
4163
|
destroy() {
|
|
4151
4164
|
this._emitter.all.clear(), window.removeEventListener("storage", this.onStorageEvent), this.stopInactivityTimers(), this._emitter.emit("destroy");
|
|
@@ -4195,7 +4208,7 @@ class Ga {
|
|
|
4195
4208
|
const s = this.simulateDelay(2e3);
|
|
4196
4209
|
this.keepAlive(), await this.insertMessagesWithSimulatedDelays(
|
|
4197
4210
|
Promise.all([
|
|
4198
|
-
|
|
4211
|
+
Ya(this.threadId, e, t, n),
|
|
4199
4212
|
s
|
|
4200
4213
|
]).then(([r]) => r)
|
|
4201
4214
|
);
|
|
@@ -4219,7 +4232,7 @@ class Ga {
|
|
|
4219
4232
|
this.keepAlive();
|
|
4220
4233
|
const { messages: n, functions: s } = await this.insertMessagesWithSimulatedDelays(
|
|
4221
4234
|
Promise.all([
|
|
4222
|
-
|
|
4235
|
+
Qa(this.threadId, e),
|
|
4223
4236
|
t
|
|
4224
4237
|
]).then(([r]) => r)
|
|
4225
4238
|
);
|
|
@@ -4310,7 +4323,7 @@ class Ga {
|
|
|
4310
4323
|
function Re(i, e, t) {
|
|
4311
4324
|
return i ? e(i) : t == null ? void 0 : t(i);
|
|
4312
4325
|
}
|
|
4313
|
-
function
|
|
4326
|
+
function eo(i) {
|
|
4314
4327
|
return { all: i = i || /* @__PURE__ */ new Map(), on: function(e, t) {
|
|
4315
4328
|
var n = i.get(e);
|
|
4316
4329
|
n ? n.push(t) : i.set(e, [t]);
|
|
@@ -4338,7 +4351,7 @@ const Ht = z`
|
|
|
4338
4351
|
<path
|
|
4339
4352
|
d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"/>
|
|
4340
4353
|
</svg>
|
|
4341
|
-
`,
|
|
4354
|
+
`, to = z`
|
|
4342
4355
|
<svg
|
|
4343
4356
|
xmlns="http://www.w3.org/2000/svg"
|
|
4344
4357
|
viewBox="0 0 24 24"
|
|
@@ -4350,7 +4363,7 @@ const Ht = z`
|
|
|
4350
4363
|
<path
|
|
4351
4364
|
d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3Z"/>
|
|
4352
4365
|
</svg>
|
|
4353
|
-
`,
|
|
4366
|
+
`, no = z`
|
|
4354
4367
|
<svg
|
|
4355
4368
|
xmlns="http://www.w3.org/2000/svg"
|
|
4356
4369
|
viewBox="0 0 24 24"
|
|
@@ -4361,7 +4374,7 @@ const Ht = z`
|
|
|
4361
4374
|
<title>send</title>
|
|
4362
4375
|
<path d="M2,21L23,12L2,3V10L17,12L2,14V21Z"/>
|
|
4363
4376
|
</svg>
|
|
4364
|
-
`,
|
|
4377
|
+
`, io = z`
|
|
4365
4378
|
<svg
|
|
4366
4379
|
xmlns="http://www.w3.org/2000/svg"
|
|
4367
4380
|
viewBox="0 0 24 24"
|
|
@@ -4373,21 +4386,21 @@ const Ht = z`
|
|
|
4373
4386
|
<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" />
|
|
4374
4387
|
</svg>
|
|
4375
4388
|
`;
|
|
4376
|
-
var
|
|
4377
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
4389
|
+
var so = Object.defineProperty, ro = Object.getOwnPropertyDescriptor, he = (i, e, t, n) => {
|
|
4390
|
+
for (var s = n > 1 ? void 0 : n ? ro(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
4378
4391
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
4379
|
-
return n && s &&
|
|
4392
|
+
return n && s && so(e, t, s), s;
|
|
4380
4393
|
}, Hs = (i, e, t) => {
|
|
4381
4394
|
if (!e.has(i))
|
|
4382
4395
|
throw TypeError("Cannot " + t);
|
|
4383
|
-
}, rt = (i, e, t) => (Hs(i, e, "read from private field"), t ? t.call(i) : e.get(i)),
|
|
4396
|
+
}, rt = (i, e, t) => (Hs(i, e, "read from private field"), t ? t.call(i) : e.get(i)), hs = (i, e, t) => {
|
|
4384
4397
|
if (e.has(i))
|
|
4385
4398
|
throw TypeError("Cannot add the same private member more than once");
|
|
4386
4399
|
e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
4387
|
-
},
|
|
4400
|
+
}, us = (i, e, t, n) => (Hs(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t), Oe, an;
|
|
4388
4401
|
let ie = class extends ne {
|
|
4389
4402
|
constructor() {
|
|
4390
|
-
super(),
|
|
4403
|
+
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 = eo(), this._emitter.on("*", (i, e) => this.dispatchEvent(
|
|
4391
4404
|
new CustomEvent(`iai-chat-${i.toString()}`, {
|
|
4392
4405
|
bubbles: !0,
|
|
4393
4406
|
// Allow events to be reached through other elements
|
|
@@ -4402,7 +4415,7 @@ let ie = class extends ne {
|
|
|
4402
4415
|
connectedCallback() {
|
|
4403
4416
|
super.connectedCallback(), this.cleanOptions = Pn.parse(this.options || {});
|
|
4404
4417
|
const { assistantId: i, params: e, config: t } = this.cleanOptions;
|
|
4405
|
-
|
|
4418
|
+
us(this, Oe, new Xa(i, {
|
|
4406
4419
|
params: e,
|
|
4407
4420
|
simulateDelays: t.simulateDelays,
|
|
4408
4421
|
historyKey: t.historyKey,
|
|
@@ -4467,14 +4480,14 @@ let ie = class extends ne {
|
|
|
4467
4480
|
<div class="flex-grow"></div>
|
|
4468
4481
|
|
|
4469
4482
|
<button
|
|
4470
|
-
class="mr-2 h-6"
|
|
4483
|
+
class="mr-2 h-6 w-6"
|
|
4471
4484
|
@click="${this.resetChat}"
|
|
4472
4485
|
>
|
|
4473
|
-
${
|
|
4486
|
+
${io}
|
|
4474
4487
|
</button>
|
|
4475
4488
|
|
|
4476
4489
|
${Re(n, () => z`
|
|
4477
|
-
<button class="mr-2 h-6" @click="${this.closeChat}">
|
|
4490
|
+
<button class="mr-2 h-6 w-6" @click="${this.closeChat}">
|
|
4478
4491
|
${Ht}
|
|
4479
4492
|
</button>
|
|
4480
4493
|
`)}
|
|
@@ -4512,10 +4525,10 @@ let ie = class extends ne {
|
|
|
4512
4525
|
></textarea>
|
|
4513
4526
|
<button
|
|
4514
4527
|
type="submit"
|
|
4515
|
-
class="button rounded-lg p-2 disabled:opacity-50 h-9"
|
|
4528
|
+
class="button rounded-lg p-2 disabled:opacity-50 h-9 w-9"
|
|
4516
4529
|
.disabled="${this.isSubmitDisabled}"
|
|
4517
4530
|
>
|
|
4518
|
-
${
|
|
4531
|
+
${no}
|
|
4519
4532
|
</button>
|
|
4520
4533
|
</div>
|
|
4521
4534
|
</form>
|
|
@@ -4546,7 +4559,7 @@ let ie = class extends ne {
|
|
|
4546
4559
|
return rt(this, Oe);
|
|
4547
4560
|
}
|
|
4548
4561
|
resetChat() {
|
|
4549
|
-
this.chatManager.reset();
|
|
4562
|
+
this.chatManager.reset("Manually reset by user");
|
|
4550
4563
|
}
|
|
4551
4564
|
// Methods
|
|
4552
4565
|
addMessage(i) {
|
|
@@ -4579,7 +4592,7 @@ let ie = class extends ne {
|
|
|
4579
4592
|
message: this.inputValue
|
|
4580
4593
|
},
|
|
4581
4594
|
cancelable: !0
|
|
4582
|
-
})) && (await rt(this, an),
|
|
4595
|
+
})) && (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(() => {
|
|
4583
4596
|
this.focusOnInput();
|
|
4584
4597
|
}, 0));
|
|
4585
4598
|
}
|
|
@@ -4656,37 +4669,37 @@ ie.styles = [Se, nt`
|
|
|
4656
4669
|
color: #8c8c8c;
|
|
4657
4670
|
}
|
|
4658
4671
|
`];
|
|
4659
|
-
|
|
4672
|
+
he([
|
|
4660
4673
|
V({ type: Object })
|
|
4661
4674
|
], ie.prototype, "options", 2);
|
|
4662
|
-
|
|
4675
|
+
he([
|
|
4663
4676
|
V()
|
|
4664
4677
|
], ie.prototype, "disableInput", 2);
|
|
4665
|
-
|
|
4678
|
+
he([
|
|
4666
4679
|
V()
|
|
4667
4680
|
], ie.prototype, "showTyping", 2);
|
|
4668
|
-
|
|
4681
|
+
he([
|
|
4669
4682
|
gt()
|
|
4670
4683
|
], ie.prototype, "messages", 2);
|
|
4671
|
-
|
|
4684
|
+
he([
|
|
4672
4685
|
gt()
|
|
4673
4686
|
], ie.prototype, "inputValue", 2);
|
|
4674
|
-
|
|
4687
|
+
he([
|
|
4675
4688
|
gt()
|
|
4676
4689
|
], ie.prototype, "internalDisableInput", 2);
|
|
4677
|
-
|
|
4690
|
+
he([
|
|
4678
4691
|
gt()
|
|
4679
4692
|
], ie.prototype, "internalShowTyping", 2);
|
|
4680
|
-
|
|
4693
|
+
he([
|
|
4681
4694
|
An("#chat-container")
|
|
4682
4695
|
], ie.prototype, "chatContainer", 2);
|
|
4683
|
-
|
|
4696
|
+
he([
|
|
4684
4697
|
An("#message-input")
|
|
4685
4698
|
], ie.prototype, "inputElement", 2);
|
|
4686
|
-
|
|
4687
|
-
|
|
4699
|
+
he([
|
|
4700
|
+
bi.debounce(1)
|
|
4688
4701
|
], ie.prototype, "scrollChatToBottom", 1);
|
|
4689
|
-
ie =
|
|
4702
|
+
ie = he([
|
|
4690
4703
|
Ee("iai-chat")
|
|
4691
4704
|
], ie);
|
|
4692
4705
|
var Bs = { exports: {} };
|
|
@@ -4694,7 +4707,7 @@ var Bs = { exports: {} };
|
|
|
4694
4707
|
(function(e) {
|
|
4695
4708
|
if (typeof window > "u")
|
|
4696
4709
|
return;
|
|
4697
|
-
var t = 0, n = !1, s = !1, r = "message", a = r.length, o = "[iFrameSizer]", l = o.length, d = null,
|
|
4710
|
+
var t = 0, n = !1, s = !1, r = "message", a = r.length, o = "[iFrameSizer]", l = o.length, d = null, h = window.requestAnimationFrame, p = Object.freeze({
|
|
4698
4711
|
max: 1,
|
|
4699
4712
|
scroll: 1,
|
|
4700
4713
|
bodyScroll: 1,
|
|
@@ -4744,44 +4757,44 @@ var Bs = { exports: {} };
|
|
|
4744
4757
|
return !0;
|
|
4745
4758
|
}
|
|
4746
4759
|
});
|
|
4747
|
-
function
|
|
4760
|
+
function D() {
|
|
4748
4761
|
return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
|
4749
4762
|
}
|
|
4750
|
-
function J(
|
|
4751
|
-
|
|
4763
|
+
function J(u, v, M) {
|
|
4764
|
+
u.addEventListener(v, M, !1);
|
|
4752
4765
|
}
|
|
4753
|
-
function Ce(
|
|
4754
|
-
|
|
4766
|
+
function Ce(u, v, M) {
|
|
4767
|
+
u.removeEventListener(v, M, !1);
|
|
4755
4768
|
}
|
|
4756
4769
|
function Qt() {
|
|
4757
|
-
var
|
|
4758
|
-
for (v = 0; v <
|
|
4759
|
-
|
|
4760
|
-
|
|
4770
|
+
var u = ["moz", "webkit", "o", "ms"], v;
|
|
4771
|
+
for (v = 0; v < u.length && !h; v += 1)
|
|
4772
|
+
h = window[u[v] + "RequestAnimationFrame"];
|
|
4773
|
+
h ? h = h.bind(window) : N("setup", "RequestAnimationFrame not supported");
|
|
4761
4774
|
}
|
|
4762
|
-
function Yt(
|
|
4763
|
-
var v = "Host page: " +
|
|
4764
|
-
return window.top !== window.self && (v = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " +
|
|
4775
|
+
function Yt(u) {
|
|
4776
|
+
var v = "Host page: " + u;
|
|
4777
|
+
return window.top !== window.self && (v = window.parentIFrame && window.parentIFrame.getId ? window.parentIFrame.getId() + ": " + u : "Nested host page: " + u), v;
|
|
4765
4778
|
}
|
|
4766
|
-
function Gt(
|
|
4767
|
-
return o + "[" + Yt(
|
|
4779
|
+
function Gt(u) {
|
|
4780
|
+
return o + "[" + Yt(u) + "]";
|
|
4768
4781
|
}
|
|
4769
|
-
function st(
|
|
4770
|
-
return c[
|
|
4782
|
+
function st(u) {
|
|
4783
|
+
return c[u] ? c[u].log : n;
|
|
4771
4784
|
}
|
|
4772
|
-
function N(
|
|
4773
|
-
|
|
4785
|
+
function N(u, v) {
|
|
4786
|
+
Ln("log", u, v, st(u));
|
|
4774
4787
|
}
|
|
4775
|
-
function Ci(
|
|
4776
|
-
|
|
4788
|
+
function Ci(u, v) {
|
|
4789
|
+
Ln("info", u, v, st(u));
|
|
4777
4790
|
}
|
|
4778
|
-
function se(
|
|
4779
|
-
|
|
4791
|
+
function se(u, v) {
|
|
4792
|
+
Ln("warn", u, v, !0);
|
|
4780
4793
|
}
|
|
4781
|
-
function
|
|
4782
|
-
_ === !0 && typeof window.console == "object" && console[
|
|
4794
|
+
function Ln(u, v, M, _) {
|
|
4795
|
+
_ === !0 && typeof window.console == "object" && console[u](Gt(v), M);
|
|
4783
4796
|
}
|
|
4784
|
-
function or(
|
|
4797
|
+
function or(u) {
|
|
4785
4798
|
function v() {
|
|
4786
4799
|
function b() {
|
|
4787
4800
|
Ni(j), Oi(E), Le("onResized", j);
|
|
@@ -4789,9 +4802,9 @@ var Bs = { exports: {} };
|
|
|
4789
4802
|
Z("Height"), Z("Width"), Pi(b, j, "init");
|
|
4790
4803
|
}
|
|
4791
4804
|
function M() {
|
|
4792
|
-
var b = ae.slice(l).split(":"), C = b[1] ? parseInt(b[1], 10) : 0,
|
|
4805
|
+
var b = ae.slice(l).split(":"), C = b[1] ? parseInt(b[1], 10) : 0, H = c[b[0]] && c[b[0]].iframe, B = getComputedStyle(H);
|
|
4793
4806
|
return {
|
|
4794
|
-
iframe:
|
|
4807
|
+
iframe: H,
|
|
4795
4808
|
id: b[0],
|
|
4796
4809
|
height: C + _(B) + R(B),
|
|
4797
4810
|
width: b[2],
|
|
@@ -4801,18 +4814,18 @@ var Bs = { exports: {} };
|
|
|
4801
4814
|
function _(b) {
|
|
4802
4815
|
if (b.boxSizing !== "border-box")
|
|
4803
4816
|
return 0;
|
|
4804
|
-
var C = b.paddingTop ? parseInt(b.paddingTop, 10) : 0,
|
|
4805
|
-
return C +
|
|
4817
|
+
var C = b.paddingTop ? parseInt(b.paddingTop, 10) : 0, H = b.paddingBottom ? parseInt(b.paddingBottom, 10) : 0;
|
|
4818
|
+
return C + H;
|
|
4806
4819
|
}
|
|
4807
4820
|
function R(b) {
|
|
4808
4821
|
if (b.boxSizing !== "border-box")
|
|
4809
4822
|
return 0;
|
|
4810
|
-
var C = b.borderTopWidth ? parseInt(b.borderTopWidth, 10) : 0,
|
|
4811
|
-
return C +
|
|
4823
|
+
var C = b.borderTopWidth ? parseInt(b.borderTopWidth, 10) : 0, H = b.borderBottomWidth ? parseInt(b.borderBottomWidth, 10) : 0;
|
|
4824
|
+
return C + H;
|
|
4812
4825
|
}
|
|
4813
4826
|
function Z(b) {
|
|
4814
|
-
var C = Number(c[E]["max" + b]),
|
|
4815
|
-
N(E, "Checking " + B + " is in range " +
|
|
4827
|
+
var C = Number(c[E]["max" + b]), H = Number(c[E]["min" + b]), B = b.toLowerCase(), Q = Number(j[B]);
|
|
4828
|
+
N(E, "Checking " + B + " is in range " + H + "-" + C), Q < H && (Q = H, N(E, "Set " + B + " to min value")), Q > C && (Q = C, N(E, "Set " + B + " to max value")), j[B] = "" + Q;
|
|
4816
4829
|
}
|
|
4817
4830
|
function pe() {
|
|
4818
4831
|
function b() {
|
|
@@ -4820,9 +4833,9 @@ var Bs = { exports: {} };
|
|
|
4820
4833
|
var X = 0, xe = !1;
|
|
4821
4834
|
for (N(
|
|
4822
4835
|
E,
|
|
4823
|
-
"Checking connection is from allowed list of origins: " +
|
|
4824
|
-
); X <
|
|
4825
|
-
if (
|
|
4836
|
+
"Checking connection is from allowed list of origins: " + H
|
|
4837
|
+
); X < H.length; X++)
|
|
4838
|
+
if (H[X] === C) {
|
|
4826
4839
|
xe = !0;
|
|
4827
4840
|
break;
|
|
4828
4841
|
}
|
|
@@ -4832,12 +4845,12 @@ var Bs = { exports: {} };
|
|
|
4832
4845
|
var X = c[E] && c[E].remoteHost;
|
|
4833
4846
|
return N(E, "Checking connection is from: " + X), C === X;
|
|
4834
4847
|
}
|
|
4835
|
-
return
|
|
4848
|
+
return H.constructor === Array ? B() : Q();
|
|
4836
4849
|
}
|
|
4837
|
-
var C =
|
|
4838
|
-
if (
|
|
4850
|
+
var C = u.origin, H = c[E] && c[E].checkOrigin;
|
|
4851
|
+
if (H && "" + C != "null" && !b())
|
|
4839
4852
|
throw new Error(
|
|
4840
|
-
"Unexpected message received from: " + C + " for " + j.iframe.id + ". Message was: " +
|
|
4853
|
+
"Unexpected message received from: " + C + " for " + j.iframe.id + ". Message was: " + u.data + ". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains."
|
|
4841
4854
|
);
|
|
4842
4855
|
return !0;
|
|
4843
4856
|
}
|
|
@@ -4860,7 +4873,7 @@ var Bs = { exports: {} };
|
|
|
4860
4873
|
message: JSON.parse(b)
|
|
4861
4874
|
}), N(E, "--");
|
|
4862
4875
|
}
|
|
4863
|
-
function
|
|
4876
|
+
function Fn() {
|
|
4864
4877
|
var b = document.body.getBoundingClientRect(), C = j.iframe.getBoundingClientRect();
|
|
4865
4878
|
return JSON.stringify({
|
|
4866
4879
|
iframeHeight: C.height,
|
|
@@ -4884,12 +4897,12 @@ var Bs = { exports: {} };
|
|
|
4884
4897
|
});
|
|
4885
4898
|
}
|
|
4886
4899
|
function Xt(b, C) {
|
|
4887
|
-
function
|
|
4888
|
-
|
|
4900
|
+
function H() {
|
|
4901
|
+
ue("Send Page Info", "pageInfo:" + Fn(), b, C);
|
|
4889
4902
|
}
|
|
4890
|
-
cr(
|
|
4903
|
+
cr(H, 32, C);
|
|
4891
4904
|
}
|
|
4892
|
-
function
|
|
4905
|
+
function Vn() {
|
|
4893
4906
|
function b(Q, X) {
|
|
4894
4907
|
function xe() {
|
|
4895
4908
|
c[B] ? Xt(c[B].iframe, B) : C();
|
|
@@ -4901,16 +4914,16 @@ var Bs = { exports: {} };
|
|
|
4901
4914
|
function C() {
|
|
4902
4915
|
b("Remove ", Ce);
|
|
4903
4916
|
}
|
|
4904
|
-
function
|
|
4917
|
+
function H() {
|
|
4905
4918
|
b("Add ", J);
|
|
4906
4919
|
}
|
|
4907
4920
|
var B = E;
|
|
4908
|
-
|
|
4921
|
+
H(), c[B] && (c[B].stopPageInfo = C);
|
|
4909
4922
|
}
|
|
4910
|
-
function
|
|
4923
|
+
function qn() {
|
|
4911
4924
|
c[E] && c[E].stopPageInfo && (c[E].stopPageInfo(), delete c[E].stopPageInfo);
|
|
4912
4925
|
}
|
|
4913
|
-
function
|
|
4926
|
+
function Kn() {
|
|
4914
4927
|
var b = !0;
|
|
4915
4928
|
return j.iframe === null && (se(E, "IFrame (" + j.id + ") not found"), b = !1), b;
|
|
4916
4929
|
}
|
|
@@ -4925,7 +4938,7 @@ var Bs = { exports: {} };
|
|
|
4925
4938
|
function C() {
|
|
4926
4939
|
d = X, K(), N(E, "--");
|
|
4927
4940
|
}
|
|
4928
|
-
function
|
|
4941
|
+
function H() {
|
|
4929
4942
|
return {
|
|
4930
4943
|
x: Number(j.width) + Q.x,
|
|
4931
4944
|
y: Number(j.height) + Q.y
|
|
@@ -4940,7 +4953,7 @@ var Bs = { exports: {} };
|
|
|
4940
4953
|
"Unable to scroll to requested position, window.parentIFrame not found"
|
|
4941
4954
|
);
|
|
4942
4955
|
}
|
|
4943
|
-
var Q = b ? k(j.iframe) : { x: 0, y: 0 }, X =
|
|
4956
|
+
var Q = b ? k(j.iframe) : { x: 0, y: 0 }, X = H();
|
|
4944
4957
|
N(
|
|
4945
4958
|
E,
|
|
4946
4959
|
"Reposition requested from iFrame (offset x:" + Q.x + " y:" + Q.y + ")"
|
|
@@ -4960,22 +4973,22 @@ var Bs = { exports: {} };
|
|
|
4960
4973
|
y: xe.y
|
|
4961
4974
|
}, K(), N(E, "--");
|
|
4962
4975
|
}
|
|
4963
|
-
function
|
|
4976
|
+
function H() {
|
|
4964
4977
|
window.parentIFrame ? window.parentIFrame.moveToAnchor(B) : N(
|
|
4965
4978
|
E,
|
|
4966
4979
|
"In page link #" + B + " not found and window.parentIFrame not found"
|
|
4967
4980
|
);
|
|
4968
4981
|
}
|
|
4969
4982
|
var B = b.split("#")[1] || "", Q = decodeURIComponent(B), X = document.getElementById(Q) || document.getElementsByName(Q)[0];
|
|
4970
|
-
X ? C() : window.top === window.self ? N(E, "In page link #" + B + " not found") :
|
|
4983
|
+
X ? C() : window.top === window.self ? N(E, "In page link #" + B + " not found") : H();
|
|
4971
4984
|
}
|
|
4972
4985
|
function re(b) {
|
|
4973
4986
|
var C = {};
|
|
4974
4987
|
if (Number(j.width) === 0 && Number(j.height) === 0) {
|
|
4975
|
-
var
|
|
4988
|
+
var H = we(9).split(":");
|
|
4976
4989
|
C = {
|
|
4977
|
-
x:
|
|
4978
|
-
y:
|
|
4990
|
+
x: H[1],
|
|
4991
|
+
y: H[0]
|
|
4979
4992
|
};
|
|
4980
4993
|
} else
|
|
4981
4994
|
C = {
|
|
@@ -4990,12 +5003,12 @@ var Bs = { exports: {} };
|
|
|
4990
5003
|
});
|
|
4991
5004
|
}
|
|
4992
5005
|
function Le(b, C) {
|
|
4993
|
-
return
|
|
5006
|
+
return Dn(E, b, C);
|
|
4994
5007
|
}
|
|
4995
|
-
function
|
|
4996
|
-
switch (c[E] && c[E].firstRun &&
|
|
5008
|
+
function Jn() {
|
|
5009
|
+
switch (c[E] && c[E].firstRun && Gn(), j.type) {
|
|
4997
5010
|
case "close": {
|
|
4998
|
-
|
|
5011
|
+
Un(j.iframe);
|
|
4999
5012
|
break;
|
|
5000
5013
|
}
|
|
5001
5014
|
case "message": {
|
|
@@ -5026,11 +5039,11 @@ var Bs = { exports: {} };
|
|
|
5026
5039
|
Xt(
|
|
5027
5040
|
c[E] && c[E].iframe,
|
|
5028
5041
|
E
|
|
5029
|
-
),
|
|
5042
|
+
), Vn();
|
|
5030
5043
|
break;
|
|
5031
5044
|
}
|
|
5032
5045
|
case "pageInfoStop": {
|
|
5033
|
-
|
|
5046
|
+
qn();
|
|
5034
5047
|
break;
|
|
5035
5048
|
}
|
|
5036
5049
|
case "inPageLink": {
|
|
@@ -5051,117 +5064,117 @@ var Bs = { exports: {} };
|
|
|
5051
5064
|
) : v();
|
|
5052
5065
|
}
|
|
5053
5066
|
}
|
|
5054
|
-
function
|
|
5067
|
+
function Qn(b) {
|
|
5055
5068
|
var C = !0;
|
|
5056
5069
|
return c[b] || (C = !1, se(
|
|
5057
5070
|
j.type + " No settings for " + b + ". Message was: " + ae
|
|
5058
5071
|
)), C;
|
|
5059
5072
|
}
|
|
5060
|
-
function
|
|
5073
|
+
function Yn() {
|
|
5061
5074
|
for (var b in c)
|
|
5062
|
-
|
|
5075
|
+
ue(
|
|
5063
5076
|
"iFrame requested init",
|
|
5064
5077
|
ji(b),
|
|
5065
5078
|
c[b].iframe,
|
|
5066
5079
|
b
|
|
5067
5080
|
);
|
|
5068
5081
|
}
|
|
5069
|
-
function
|
|
5082
|
+
function Gn() {
|
|
5070
5083
|
c[E] && (c[E].firstRun = !1);
|
|
5071
5084
|
}
|
|
5072
|
-
var ae =
|
|
5073
|
-
ae === "[iFrameResizerChild]Ready" ?
|
|
5085
|
+
var ae = u.data, j = {}, E = null;
|
|
5086
|
+
ae === "[iFrameResizerChild]Ready" ? Yn() : Ze() ? (j = M(), E = j.id, c[E] && (c[E].loaded = !0), !be() && Qn(E) && (N(E, "Received: " + ae), Kn() && pe() && Jn())) : Ci(E, "Ignored: " + ae);
|
|
5074
5087
|
}
|
|
5075
|
-
function
|
|
5088
|
+
function Dn(u, v, M) {
|
|
5076
5089
|
var _ = null, R = null;
|
|
5077
|
-
if (c[
|
|
5078
|
-
if (_ = c[
|
|
5090
|
+
if (c[u])
|
|
5091
|
+
if (_ = c[u][v], typeof _ == "function")
|
|
5079
5092
|
R = _(M);
|
|
5080
5093
|
else
|
|
5081
5094
|
throw new TypeError(
|
|
5082
|
-
v + " on iFrame[" +
|
|
5095
|
+
v + " on iFrame[" + u + "] is not a function"
|
|
5083
5096
|
);
|
|
5084
5097
|
return R;
|
|
5085
5098
|
}
|
|
5086
|
-
function Ai(
|
|
5087
|
-
var v =
|
|
5099
|
+
function Ai(u) {
|
|
5100
|
+
var v = u.id;
|
|
5088
5101
|
delete c[v];
|
|
5089
5102
|
}
|
|
5090
|
-
function
|
|
5091
|
-
var v =
|
|
5092
|
-
if (
|
|
5103
|
+
function Un(u) {
|
|
5104
|
+
var v = u.id;
|
|
5105
|
+
if (Dn(v, "onClose", v) === !1) {
|
|
5093
5106
|
N(v, "Close iframe cancelled by onClose event");
|
|
5094
5107
|
return;
|
|
5095
5108
|
}
|
|
5096
5109
|
N(v, "Removing iFrame: " + v);
|
|
5097
5110
|
try {
|
|
5098
|
-
|
|
5111
|
+
u.parentNode && u.parentNode.removeChild(u);
|
|
5099
5112
|
} catch (M) {
|
|
5100
5113
|
se(M);
|
|
5101
5114
|
}
|
|
5102
|
-
|
|
5115
|
+
Dn(v, "onClosed", v), N(v, "--"), Ai(u);
|
|
5103
5116
|
}
|
|
5104
|
-
function Ii(
|
|
5117
|
+
function Ii(u) {
|
|
5105
5118
|
d === null && (d = {
|
|
5106
5119
|
x: window.pageXOffset === e ? document.documentElement.scrollLeft : window.pageXOffset,
|
|
5107
5120
|
y: window.pageYOffset === e ? document.documentElement.scrollTop : window.pageYOffset
|
|
5108
5121
|
}, N(
|
|
5109
|
-
|
|
5122
|
+
u,
|
|
5110
5123
|
"Get page position: " + d.x + "," + d.y
|
|
5111
5124
|
));
|
|
5112
5125
|
}
|
|
5113
|
-
function Oi(
|
|
5126
|
+
function Oi(u) {
|
|
5114
5127
|
d !== null && (window.scrollTo(d.x, d.y), N(
|
|
5115
|
-
|
|
5128
|
+
u,
|
|
5116
5129
|
"Set page position: " + d.x + "," + d.y
|
|
5117
5130
|
), Mi());
|
|
5118
5131
|
}
|
|
5119
5132
|
function Mi() {
|
|
5120
5133
|
d = null;
|
|
5121
5134
|
}
|
|
5122
|
-
function Ri(
|
|
5135
|
+
function Ri(u) {
|
|
5123
5136
|
function v() {
|
|
5124
|
-
Ni(
|
|
5137
|
+
Ni(u), ue("reset", "reset", u.iframe, u.id);
|
|
5125
5138
|
}
|
|
5126
5139
|
N(
|
|
5127
|
-
|
|
5128
|
-
"Size reset requested by " + (
|
|
5129
|
-
), Ii(
|
|
5140
|
+
u.id,
|
|
5141
|
+
"Size reset requested by " + (u.type === "init" ? "host page" : "iFrame")
|
|
5142
|
+
), Ii(u.id), Pi(v, u, "reset");
|
|
5130
5143
|
}
|
|
5131
|
-
function Ni(
|
|
5144
|
+
function Ni(u) {
|
|
5132
5145
|
function v(Z) {
|
|
5133
|
-
if (!
|
|
5146
|
+
if (!u.id) {
|
|
5134
5147
|
N("undefined", "messageData id not set");
|
|
5135
5148
|
return;
|
|
5136
5149
|
}
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
"IFrame (" + R + ") " + Z + " set to " +
|
|
5150
|
+
u.iframe.style[Z] = u[Z] + "px", N(
|
|
5151
|
+
u.id,
|
|
5152
|
+
"IFrame (" + R + ") " + Z + " set to " + u[Z] + "px"
|
|
5140
5153
|
);
|
|
5141
5154
|
}
|
|
5142
5155
|
function M(Z) {
|
|
5143
|
-
!s &&
|
|
5156
|
+
!s && u[Z] === "0" && (s = !0, N(R, "Hidden iFrame detected, creating visibility listener"), dr());
|
|
5144
5157
|
}
|
|
5145
5158
|
function _(Z) {
|
|
5146
5159
|
v(Z), M(Z);
|
|
5147
5160
|
}
|
|
5148
|
-
var R =
|
|
5161
|
+
var R = u.iframe.id;
|
|
5149
5162
|
c[R] && (c[R].sizeHeight && _("height"), c[R].sizeWidth && _("width"));
|
|
5150
5163
|
}
|
|
5151
|
-
function Pi(
|
|
5152
|
-
M !== v.type &&
|
|
5153
|
-
!window.jasmine ? (N(v.id, "Requesting animation frame"), u
|
|
5164
|
+
function Pi(u, v, M) {
|
|
5165
|
+
M !== v.type && h && // including check for jasmine because had trouble getting spy to work in unit test using requestAnimationFrame
|
|
5166
|
+
!window.jasmine ? (N(v.id, "Requesting animation frame"), h(u)) : u();
|
|
5154
5167
|
}
|
|
5155
|
-
function
|
|
5168
|
+
function ue(u, v, M, _, R) {
|
|
5156
5169
|
function Z() {
|
|
5157
5170
|
var Ae = c[_] && c[_].targetOrigin;
|
|
5158
5171
|
N(
|
|
5159
5172
|
_,
|
|
5160
|
-
"[" +
|
|
5173
|
+
"[" + u + "] Sending msg to iframe[" + _ + "] (" + v + ") targetOrigin: " + Ae
|
|
5161
5174
|
), M.contentWindow.postMessage(o + v, Ae);
|
|
5162
5175
|
}
|
|
5163
5176
|
function pe() {
|
|
5164
|
-
se(_, "[" +
|
|
5177
|
+
se(_, "[" + u + "] IFrame(" + _ + ") not found");
|
|
5165
5178
|
}
|
|
5166
5179
|
function Ze() {
|
|
5167
5180
|
M && "contentWindow" in M && M.contentWindow !== null ? Z() : pe();
|
|
@@ -5181,17 +5194,17 @@ var Bs = { exports: {} };
|
|
|
5181
5194
|
var we = !1;
|
|
5182
5195
|
_ = _ || M.id, c[_] && (Ze(), be());
|
|
5183
5196
|
}
|
|
5184
|
-
function ji(
|
|
5185
|
-
return
|
|
5197
|
+
function ji(u) {
|
|
5198
|
+
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;
|
|
5186
5199
|
}
|
|
5187
|
-
function lr(
|
|
5188
|
-
return typeof
|
|
5200
|
+
function lr(u) {
|
|
5201
|
+
return typeof u == "number";
|
|
5189
5202
|
}
|
|
5190
|
-
function zi(
|
|
5203
|
+
function zi(u, v) {
|
|
5191
5204
|
function M() {
|
|
5192
5205
|
function $(Y) {
|
|
5193
5206
|
var re = c[k][Y];
|
|
5194
|
-
re !== 1 / 0 && re !== 0 && (
|
|
5207
|
+
re !== 1 / 0 && re !== 0 && (u.style[Y] = lr(re) ? re + "px" : re, N(k, "Set " + Y + " = " + u.style[Y]));
|
|
5195
5208
|
}
|
|
5196
5209
|
function K(Y) {
|
|
5197
5210
|
if (c[k]["min" + Y] > c[k]["max" + Y])
|
|
@@ -5208,28 +5221,28 @@ var Bs = { exports: {} };
|
|
|
5208
5221
|
function R($) {
|
|
5209
5222
|
if (typeof $ != "string")
|
|
5210
5223
|
throw new TypeError("Invaild id for iFrame. Expected String");
|
|
5211
|
-
return $ === "" && (
|
|
5224
|
+
return $ === "" && (u.id = $ = _(), n = (v || {}).log, N(
|
|
5212
5225
|
$,
|
|
5213
|
-
"Added missing iframe ID: " + $ + " (" +
|
|
5226
|
+
"Added missing iframe ID: " + $ + " (" + u.src + ")"
|
|
5214
5227
|
)), $;
|
|
5215
5228
|
}
|
|
5216
5229
|
function Z() {
|
|
5217
5230
|
switch (N(
|
|
5218
5231
|
k,
|
|
5219
5232
|
"IFrame scrolling " + (c[k] && c[k].scrolling ? "enabled" : "disabled") + " for " + k
|
|
5220
|
-
),
|
|
5233
|
+
), u.style.overflow = (c[k] && c[k].scrolling) === !1 ? "hidden" : "auto", c[k] && c[k].scrolling) {
|
|
5221
5234
|
case "omit":
|
|
5222
5235
|
break;
|
|
5223
5236
|
case !0: {
|
|
5224
|
-
|
|
5237
|
+
u.scrolling = "yes";
|
|
5225
5238
|
break;
|
|
5226
5239
|
}
|
|
5227
5240
|
case !1: {
|
|
5228
|
-
|
|
5241
|
+
u.scrolling = "no";
|
|
5229
5242
|
break;
|
|
5230
5243
|
}
|
|
5231
5244
|
default:
|
|
5232
|
-
|
|
5245
|
+
u.scrolling = c[k] ? c[k].scrolling : "no";
|
|
5233
5246
|
}
|
|
5234
5247
|
}
|
|
5235
5248
|
function pe() {
|
|
@@ -5237,23 +5250,23 @@ var Bs = { exports: {} };
|
|
|
5237
5250
|
}
|
|
5238
5251
|
function Ze() {
|
|
5239
5252
|
var $ = c[k] && c[k].firstRun, K = c[k] && c[k].heightCalculationMethod in p;
|
|
5240
|
-
!$ && K && Ri({ iframe:
|
|
5253
|
+
!$ && K && Ri({ iframe: u, height: 0, width: 0, type: "init" });
|
|
5241
5254
|
}
|
|
5242
5255
|
function be() {
|
|
5243
5256
|
c[k] && (c[k].iframe.iFrameResizer = {
|
|
5244
|
-
close:
|
|
5257
|
+
close: Un.bind(null, c[k].iframe),
|
|
5245
5258
|
removeListeners: Ai.bind(
|
|
5246
5259
|
null,
|
|
5247
5260
|
c[k].iframe
|
|
5248
5261
|
),
|
|
5249
|
-
resize:
|
|
5262
|
+
resize: ue.bind(
|
|
5250
5263
|
null,
|
|
5251
5264
|
"Window resize",
|
|
5252
5265
|
"resize",
|
|
5253
5266
|
c[k].iframe
|
|
5254
5267
|
),
|
|
5255
5268
|
moveToAnchor: function($) {
|
|
5256
|
-
|
|
5269
|
+
ue(
|
|
5257
5270
|
"Move to anchor",
|
|
5258
5271
|
"moveToAnchor:" + $,
|
|
5259
5272
|
c[k].iframe,
|
|
@@ -5261,7 +5274,7 @@ var Bs = { exports: {} };
|
|
|
5261
5274
|
);
|
|
5262
5275
|
},
|
|
5263
5276
|
sendMessage: function($) {
|
|
5264
|
-
$ = JSON.stringify($),
|
|
5277
|
+
$ = JSON.stringify($), ue(
|
|
5265
5278
|
"Send Message",
|
|
5266
5279
|
"message:" + $,
|
|
5267
5280
|
c[k].iframe,
|
|
@@ -5272,31 +5285,31 @@ var Bs = { exports: {} };
|
|
|
5272
5285
|
}
|
|
5273
5286
|
function we($) {
|
|
5274
5287
|
function K() {
|
|
5275
|
-
|
|
5288
|
+
ue("iFrame.onload", $, u, e, !0), Ze();
|
|
5276
5289
|
}
|
|
5277
5290
|
function Y(Le) {
|
|
5278
|
-
if (
|
|
5279
|
-
var
|
|
5280
|
-
|
|
5281
|
-
var
|
|
5282
|
-
|
|
5283
|
-
ae ===
|
|
5291
|
+
if (u.parentNode) {
|
|
5292
|
+
var Jn = new Le(function(Qn) {
|
|
5293
|
+
Qn.forEach(function(Yn) {
|
|
5294
|
+
var Gn = Array.prototype.slice.call(Yn.removedNodes);
|
|
5295
|
+
Gn.forEach(function(ae) {
|
|
5296
|
+
ae === u && Un(u);
|
|
5284
5297
|
});
|
|
5285
5298
|
});
|
|
5286
5299
|
});
|
|
5287
|
-
|
|
5300
|
+
Jn.observe(u.parentNode, {
|
|
5288
5301
|
childList: !0
|
|
5289
5302
|
});
|
|
5290
5303
|
}
|
|
5291
5304
|
}
|
|
5292
|
-
var re =
|
|
5293
|
-
re && Y(re), J(
|
|
5305
|
+
var re = D();
|
|
5306
|
+
re && Y(re), J(u, "load", K), ue("init", $, u, e, !0);
|
|
5294
5307
|
}
|
|
5295
5308
|
function Ae($) {
|
|
5296
5309
|
if (typeof $ != "object")
|
|
5297
5310
|
throw new TypeError("Options is not an object");
|
|
5298
5311
|
}
|
|
5299
|
-
function
|
|
5312
|
+
function Fn($) {
|
|
5300
5313
|
for (var K in O)
|
|
5301
5314
|
Object.prototype.hasOwnProperty.call(O, K) && (c[k][K] = Object.prototype.hasOwnProperty.call(
|
|
5302
5315
|
$,
|
|
@@ -5306,7 +5319,7 @@ var Bs = { exports: {} };
|
|
|
5306
5319
|
function Xt($) {
|
|
5307
5320
|
return $ === "" || $.match(/^(about:blank|javascript:|file:\/\/)/) !== null ? "*" : $;
|
|
5308
5321
|
}
|
|
5309
|
-
function
|
|
5322
|
+
function Vn($) {
|
|
5310
5323
|
var K = $.split("Callback");
|
|
5311
5324
|
if (K.length === 2) {
|
|
5312
5325
|
var Y = "on" + K[0].charAt(0).toUpperCase() + K[0].slice(1);
|
|
@@ -5316,28 +5329,28 @@ var Bs = { exports: {} };
|
|
|
5316
5329
|
);
|
|
5317
5330
|
}
|
|
5318
5331
|
}
|
|
5319
|
-
function
|
|
5320
|
-
$ = $ || {}, c[k] = /* @__PURE__ */ Object.create(null), c[k].iframe =
|
|
5332
|
+
function qn($) {
|
|
5333
|
+
$ = $ || {}, c[k] = /* @__PURE__ */ Object.create(null), c[k].iframe = u, c[k].firstRun = !0, c[k].remoteHost = u.src && u.src.split("/").slice(0, 3).join("/"), Ae($), Object.keys($).forEach(Vn, $), Fn($), c[k] && (c[k].targetOrigin = c[k].checkOrigin === !0 ? Xt(c[k].remoteHost) : "*");
|
|
5321
5334
|
}
|
|
5322
|
-
function
|
|
5323
|
-
return k in c && "iFrameResizer" in
|
|
5335
|
+
function Kn() {
|
|
5336
|
+
return k in c && "iFrameResizer" in u;
|
|
5324
5337
|
}
|
|
5325
|
-
var k = R(
|
|
5326
|
-
|
|
5338
|
+
var k = R(u.id);
|
|
5339
|
+
Kn() ? se(k, "Ignored iFrame, already setup.") : (qn(v), Z(), M(), pe(), we(ji(k)), be());
|
|
5327
5340
|
}
|
|
5328
|
-
function
|
|
5341
|
+
function Hn(u, v) {
|
|
5329
5342
|
g === null && (g = setTimeout(function() {
|
|
5330
|
-
g = null,
|
|
5343
|
+
g = null, u();
|
|
5331
5344
|
}, v));
|
|
5332
5345
|
}
|
|
5333
|
-
var
|
|
5334
|
-
function cr(
|
|
5335
|
-
|
|
5336
|
-
|
|
5346
|
+
var Bn = {};
|
|
5347
|
+
function cr(u, v, M) {
|
|
5348
|
+
Bn[M] || (Bn[M] = setTimeout(function() {
|
|
5349
|
+
Bn[M] = null, u();
|
|
5337
5350
|
}, v));
|
|
5338
5351
|
}
|
|
5339
5352
|
function dr() {
|
|
5340
|
-
function
|
|
5353
|
+
function u() {
|
|
5341
5354
|
function R(Z) {
|
|
5342
5355
|
function pe(be) {
|
|
5343
5356
|
return (c[Z] && c[Z].iframe.style[be]) === "0px";
|
|
@@ -5345,7 +5358,7 @@ var Bs = { exports: {} };
|
|
|
5345
5358
|
function Ze(be) {
|
|
5346
5359
|
return be.offsetParent !== null;
|
|
5347
5360
|
}
|
|
5348
|
-
c[Z] && Ze(c[Z].iframe) && (pe("height") || pe("width")) &&
|
|
5361
|
+
c[Z] && Ze(c[Z].iframe) && (pe("height") || pe("width")) && ue(
|
|
5349
5362
|
"Visibility change",
|
|
5350
5363
|
"resize",
|
|
5351
5364
|
c[Z].iframe,
|
|
@@ -5360,7 +5373,7 @@ var Bs = { exports: {} };
|
|
|
5360
5373
|
N(
|
|
5361
5374
|
"window",
|
|
5362
5375
|
"Mutation observed: " + R[0].target + " " + R[0].type
|
|
5363
|
-
),
|
|
5376
|
+
), Hn(u, 16);
|
|
5364
5377
|
}
|
|
5365
5378
|
function M() {
|
|
5366
5379
|
var R = document.querySelector("body"), Z = {
|
|
@@ -5373,36 +5386,36 @@ var Bs = { exports: {} };
|
|
|
5373
5386
|
}, pe = new _(v);
|
|
5374
5387
|
pe.observe(R, Z);
|
|
5375
5388
|
}
|
|
5376
|
-
var _ =
|
|
5389
|
+
var _ = D();
|
|
5377
5390
|
_ && M();
|
|
5378
5391
|
}
|
|
5379
|
-
function
|
|
5392
|
+
function hr(u) {
|
|
5380
5393
|
function v() {
|
|
5381
|
-
Li("Window " +
|
|
5394
|
+
Li("Window " + u, "resize");
|
|
5382
5395
|
}
|
|
5383
|
-
N("window", "Trigger event: " +
|
|
5396
|
+
N("window", "Trigger event: " + u), Hn(v, 16);
|
|
5384
5397
|
}
|
|
5385
5398
|
function Zi() {
|
|
5386
|
-
function
|
|
5399
|
+
function u() {
|
|
5387
5400
|
Li("Tab Visible", "resize");
|
|
5388
5401
|
}
|
|
5389
|
-
document.visibilityState !== "hidden" && (N("document", "Trigger event: Visibility change"),
|
|
5402
|
+
document.visibilityState !== "hidden" && (N("document", "Trigger event: Visibility change"), Hn(u, 16));
|
|
5390
5403
|
}
|
|
5391
|
-
function Li(
|
|
5404
|
+
function Li(u, v) {
|
|
5392
5405
|
function M(_) {
|
|
5393
5406
|
return c[_] && c[_].resizeFrom === "parent" && c[_].autoResize && !c[_].firstRun;
|
|
5394
5407
|
}
|
|
5395
5408
|
Object.keys(c).forEach(function(_) {
|
|
5396
|
-
M(_) &&
|
|
5409
|
+
M(_) && ue(u, v, c[_].iframe, _);
|
|
5397
5410
|
});
|
|
5398
5411
|
}
|
|
5399
|
-
function
|
|
5412
|
+
function ur() {
|
|
5400
5413
|
J(window, "message", or), J(window, "resize", function() {
|
|
5401
|
-
|
|
5414
|
+
hr("resize");
|
|
5402
5415
|
}), J(document, "visibilitychange", Zi), J(document, "-webkit-visibilitychange", Zi);
|
|
5403
5416
|
}
|
|
5404
|
-
function
|
|
5405
|
-
function
|
|
5417
|
+
function Wn() {
|
|
5418
|
+
function u(_, R) {
|
|
5406
5419
|
function Z() {
|
|
5407
5420
|
if (R.tagName) {
|
|
5408
5421
|
if (R.tagName.toUpperCase() !== "IFRAME")
|
|
@@ -5420,18 +5433,18 @@ var Bs = { exports: {} };
|
|
|
5420
5433
|
);
|
|
5421
5434
|
}
|
|
5422
5435
|
var M;
|
|
5423
|
-
return Qt(),
|
|
5436
|
+
return Qt(), ur(), function(_, R) {
|
|
5424
5437
|
switch (M = [], v(_), typeof R) {
|
|
5425
5438
|
case "undefined":
|
|
5426
5439
|
case "string": {
|
|
5427
5440
|
Array.prototype.forEach.call(
|
|
5428
5441
|
document.querySelectorAll(R || "iframe"),
|
|
5429
|
-
|
|
5442
|
+
u.bind(e, _)
|
|
5430
5443
|
);
|
|
5431
5444
|
break;
|
|
5432
5445
|
}
|
|
5433
5446
|
case "object": {
|
|
5434
|
-
|
|
5447
|
+
u(_, R);
|
|
5435
5448
|
break;
|
|
5436
5449
|
}
|
|
5437
5450
|
default:
|
|
@@ -5440,30 +5453,30 @@ var Bs = { exports: {} };
|
|
|
5440
5453
|
return M;
|
|
5441
5454
|
};
|
|
5442
5455
|
}
|
|
5443
|
-
function pr(
|
|
5444
|
-
|
|
5456
|
+
function pr(u) {
|
|
5457
|
+
u.fn ? u.fn.iFrameResize || (u.fn.iFrameResize = function(v) {
|
|
5445
5458
|
function M(_, R) {
|
|
5446
5459
|
zi(R, v);
|
|
5447
5460
|
}
|
|
5448
5461
|
return this.filter("iframe").each(M).end();
|
|
5449
5462
|
}) : Ci("", "Unable to bind to jQuery, it is not fully loaded.");
|
|
5450
5463
|
}
|
|
5451
|
-
window.jQuery !== e && pr(window.jQuery), typeof e == "function" && e.amd ? e([],
|
|
5464
|
+
window.jQuery !== e && pr(window.jQuery), typeof e == "function" && e.amd ? e([], Wn) : i.exports = Wn(), window.iFrameResize = window.iFrameResize || Wn();
|
|
5452
5465
|
})();
|
|
5453
5466
|
})(Bs);
|
|
5454
|
-
var
|
|
5455
|
-
const
|
|
5456
|
-
var
|
|
5457
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
5467
|
+
var ao = Bs.exports;
|
|
5468
|
+
const oo = /* @__PURE__ */ qr(ao);
|
|
5469
|
+
var lo = Object.defineProperty, co = Object.getOwnPropertyDescriptor, wi = (i, e, t, n) => {
|
|
5470
|
+
for (var s = n > 1 ? void 0 : n ? co(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
5458
5471
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
5459
|
-
return n && s &&
|
|
5472
|
+
return n && s && lo(e, t, s), s;
|
|
5460
5473
|
};
|
|
5461
5474
|
let Bt = class extends ne {
|
|
5462
5475
|
constructor() {
|
|
5463
5476
|
super(...arguments), this.src = "", this.showCloseButton = !1;
|
|
5464
5477
|
}
|
|
5465
5478
|
async onLoad(i) {
|
|
5466
|
-
|
|
5479
|
+
oo({
|
|
5467
5480
|
log: !1,
|
|
5468
5481
|
heightCalculationMethod: "max",
|
|
5469
5482
|
onMessage: ({ message: e }) => {
|
|
@@ -5506,10 +5519,10 @@ wi([
|
|
|
5506
5519
|
Bt = wi([
|
|
5507
5520
|
Ee("iai-chat-iframe")
|
|
5508
5521
|
], Bt);
|
|
5509
|
-
var
|
|
5522
|
+
var ho = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, ft = (i, e, t, n) => {
|
|
5510
5523
|
for (var s = n > 1 ? void 0 : n ? uo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
5511
5524
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
5512
|
-
return n && s &&
|
|
5525
|
+
return n && s && ho(e, t, s), s;
|
|
5513
5526
|
};
|
|
5514
5527
|
let ze = class extends ne {
|
|
5515
5528
|
constructor() {
|
|
@@ -5587,7 +5600,7 @@ ze = ft([
|
|
|
5587
5600
|
* Copyright 2017 Google LLC
|
|
5588
5601
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5589
5602
|
*/
|
|
5590
|
-
class
|
|
5603
|
+
class li extends Mn {
|
|
5591
5604
|
constructor(e) {
|
|
5592
5605
|
if (super(e), this.it = q, e.type !== In.CHILD)
|
|
5593
5606
|
throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
@@ -5606,8 +5619,8 @@ class oi extends Mn {
|
|
|
5606
5619
|
return t.raw = t, this._t = { _$litType$: this.constructor.resultType, strings: t, values: [] };
|
|
5607
5620
|
}
|
|
5608
5621
|
}
|
|
5609
|
-
|
|
5610
|
-
const Ws = On(
|
|
5622
|
+
li.directiveName = "unsafeHTML", li.resultType = 1;
|
|
5623
|
+
const Ws = On(li);
|
|
5611
5624
|
function xi() {
|
|
5612
5625
|
return {
|
|
5613
5626
|
async: !1,
|
|
@@ -5626,33 +5639,33 @@ let it = xi();
|
|
|
5626
5639
|
function Fs(i) {
|
|
5627
5640
|
it = i;
|
|
5628
5641
|
}
|
|
5629
|
-
const Vs = /[&<>"']/,
|
|
5642
|
+
const Vs = /[&<>"']/, po = new RegExp(Vs.source, "g"), qs = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, mo = new RegExp(qs.source, "g"), go = {
|
|
5630
5643
|
"&": "&",
|
|
5631
5644
|
"<": "<",
|
|
5632
5645
|
">": ">",
|
|
5633
5646
|
'"': """,
|
|
5634
5647
|
"'": "'"
|
|
5635
|
-
}, ps = (i) =>
|
|
5648
|
+
}, ps = (i) => go[i];
|
|
5636
5649
|
function te(i, e) {
|
|
5637
5650
|
if (e) {
|
|
5638
5651
|
if (Vs.test(i))
|
|
5639
|
-
return i.replace(
|
|
5652
|
+
return i.replace(po, ps);
|
|
5640
5653
|
} else if (qs.test(i))
|
|
5641
|
-
return i.replace(
|
|
5654
|
+
return i.replace(mo, ps);
|
|
5642
5655
|
return i;
|
|
5643
5656
|
}
|
|
5644
|
-
const
|
|
5645
|
-
function
|
|
5646
|
-
return i.replace(
|
|
5657
|
+
const fo = /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;
|
|
5658
|
+
function yo(i) {
|
|
5659
|
+
return i.replace(fo, (e, t) => (t = t.toLowerCase(), t === "colon" ? ":" : t.charAt(0) === "#" ? t.charAt(1) === "x" ? String.fromCharCode(parseInt(t.substring(2), 16)) : String.fromCharCode(+t.substring(1)) : ""));
|
|
5647
5660
|
}
|
|
5648
|
-
const
|
|
5649
|
-
function
|
|
5661
|
+
const vo = /(^|[^\[])\^/g;
|
|
5662
|
+
function U(i, e) {
|
|
5650
5663
|
let t = typeof i == "string" ? i : i.source;
|
|
5651
5664
|
e = e || "";
|
|
5652
5665
|
const n = {
|
|
5653
5666
|
replace: (s, r) => {
|
|
5654
5667
|
let a = typeof r == "string" ? r : r.source;
|
|
5655
|
-
return a = a.replace(
|
|
5668
|
+
return a = a.replace(vo, "$1"), t = t.replace(s, a), n;
|
|
5656
5669
|
},
|
|
5657
5670
|
getRegex: () => new RegExp(t, e)
|
|
5658
5671
|
};
|
|
@@ -5701,7 +5714,7 @@ function tn(i, e, t) {
|
|
|
5701
5714
|
}
|
|
5702
5715
|
return i.slice(0, n - s);
|
|
5703
5716
|
}
|
|
5704
|
-
function
|
|
5717
|
+
function bo(i, e) {
|
|
5705
5718
|
if (i.indexOf(e[1]) === -1)
|
|
5706
5719
|
return -1;
|
|
5707
5720
|
let t = 0;
|
|
@@ -5736,7 +5749,7 @@ function fs(i, e, t, n) {
|
|
|
5736
5749
|
text: te(a)
|
|
5737
5750
|
};
|
|
5738
5751
|
}
|
|
5739
|
-
function
|
|
5752
|
+
function wo(i, e) {
|
|
5740
5753
|
const t = i.match(/^(\s+)(?:```)/);
|
|
5741
5754
|
if (t === null)
|
|
5742
5755
|
return e;
|
|
@@ -5780,7 +5793,7 @@ class _n {
|
|
|
5780
5793
|
fences(e) {
|
|
5781
5794
|
const t = this.rules.block.fences.exec(e);
|
|
5782
5795
|
if (t) {
|
|
5783
|
-
const n = t[0], s =
|
|
5796
|
+
const n = t[0], s = wo(n, t[3] || "");
|
|
5784
5797
|
return {
|
|
5785
5798
|
type: "code",
|
|
5786
5799
|
raw: n,
|
|
@@ -5848,7 +5861,7 @@ class _n {
|
|
|
5848
5861
|
const a = new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`);
|
|
5849
5862
|
let o = "", l = "", d = !1;
|
|
5850
5863
|
for (; e; ) {
|
|
5851
|
-
let
|
|
5864
|
+
let h = !1;
|
|
5852
5865
|
if (!(t = a.exec(e)) || this.rules.block.hr.test(e))
|
|
5853
5866
|
break;
|
|
5854
5867
|
o = t[0], e = e.substring(o.length);
|
|
@@ -5858,7 +5871,7 @@ class _n {
|
|
|
5858
5871
|
this.options.pedantic ? (g = 2, l = p.trimStart()) : (g = t[2].search(/[^ ]/), g = g > 4 ? 1 : g, l = p.slice(g), g += t[1].length);
|
|
5859
5872
|
let O = !1;
|
|
5860
5873
|
if (!p && /^ *$/.test(c) && (o += c + `
|
|
5861
|
-
`, e = e.substring(c.length + 1),
|
|
5874
|
+
`, e = e.substring(c.length + 1), h = !0), !h) {
|
|
5862
5875
|
const Ce = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), Qt = new RegExp(`^ {0,${Math.min(3, g - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), Yt = new RegExp(`^ {0,${Math.min(3, g - 1)}}(?:\`\`\`|~~~)`), Gt = new RegExp(`^ {0,${Math.min(3, g - 1)}}#`);
|
|
5863
5876
|
for (; e; ) {
|
|
5864
5877
|
const st = e.split(`
|
|
@@ -5879,11 +5892,11 @@ class _n {
|
|
|
5879
5892
|
}
|
|
5880
5893
|
}
|
|
5881
5894
|
r.loose || (d ? r.loose = !0 : /\n *\n *$/.test(o) && (d = !0));
|
|
5882
|
-
let
|
|
5883
|
-
this.options.gfm && (
|
|
5895
|
+
let D = null, J;
|
|
5896
|
+
this.options.gfm && (D = /^\[[ xX]\] /.exec(l), D && (J = D[0] !== "[ ] ", l = l.replace(/^\[[ xX]\] +/, ""))), r.items.push({
|
|
5884
5897
|
type: "list_item",
|
|
5885
5898
|
raw: o,
|
|
5886
|
-
task: !!
|
|
5899
|
+
task: !!D,
|
|
5887
5900
|
checked: J,
|
|
5888
5901
|
loose: !1,
|
|
5889
5902
|
text: l,
|
|
@@ -5891,14 +5904,14 @@ class _n {
|
|
|
5891
5904
|
}), r.raw += o;
|
|
5892
5905
|
}
|
|
5893
5906
|
r.items[r.items.length - 1].raw = o.trimEnd(), r.items[r.items.length - 1].text = l.trimEnd(), r.raw = r.raw.trimEnd();
|
|
5894
|
-
for (let
|
|
5895
|
-
if (this.lexer.state.top = !1, r.items[
|
|
5896
|
-
const p = r.items[
|
|
5907
|
+
for (let h = 0; h < r.items.length; h++)
|
|
5908
|
+
if (this.lexer.state.top = !1, r.items[h].tokens = this.lexer.blockTokens(r.items[h].text, []), !r.loose) {
|
|
5909
|
+
const p = r.items[h].tokens.filter((g) => g.type === "space"), c = p.length > 0 && p.some((g) => /\n.*\n/.test(g.raw));
|
|
5897
5910
|
r.loose = c;
|
|
5898
5911
|
}
|
|
5899
5912
|
if (r.loose)
|
|
5900
|
-
for (let
|
|
5901
|
-
r.items[
|
|
5913
|
+
for (let h = 0; h < r.items.length; h++)
|
|
5914
|
+
r.items[h].loose = !0;
|
|
5902
5915
|
return r;
|
|
5903
5916
|
}
|
|
5904
5917
|
}
|
|
@@ -6020,7 +6033,7 @@ class _n {
|
|
|
6020
6033
|
if ((n.length - a.length) % 2 === 0)
|
|
6021
6034
|
return;
|
|
6022
6035
|
} else {
|
|
6023
|
-
const a =
|
|
6036
|
+
const a = bo(t[2], "()");
|
|
6024
6037
|
if (a > -1) {
|
|
6025
6038
|
const o = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + a;
|
|
6026
6039
|
t[2] = t[2].substring(0, a), t[0] = t[0].substring(0, o).trim(), t[3] = "";
|
|
@@ -6058,8 +6071,8 @@ class _n {
|
|
|
6058
6071
|
if (!(!s || s[3] && n.match(/[\p{L}\p{N}]/u)) && (!(s[1] || s[2]) || !n || this.rules.inline.punctuation.exec(n))) {
|
|
6059
6072
|
const r = [...s[0]].length - 1;
|
|
6060
6073
|
let a, o, l = r, d = 0;
|
|
6061
|
-
const
|
|
6062
|
-
for (
|
|
6074
|
+
const h = s[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
6075
|
+
for (h.lastIndex = 0, t = t.slice(-1 * e.length + r); (s = h.exec(t)) != null; ) {
|
|
6063
6076
|
if (a = s[1] || s[2] || s[3] || s[4] || s[5] || s[6], !a)
|
|
6064
6077
|
continue;
|
|
6065
6078
|
if (o = [...a].length, s[3] || s[4]) {
|
|
@@ -6182,79 +6195,79 @@ class _n {
|
|
|
6182
6195
|
}
|
|
6183
6196
|
}
|
|
6184
6197
|
}
|
|
6185
|
-
const
|
|
6186
|
-
blockquote:
|
|
6187
|
-
code:
|
|
6188
|
-
def:
|
|
6189
|
-
fences:
|
|
6190
|
-
heading:
|
|
6198
|
+
const xo = /^(?: *(?:\n|$))+/, _o = /^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/, ko = /^ {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+|$)/, $o = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Ks = /(?:[*+-]|\d{1,9}[.)])/, Js = U(/^(?!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(), _i = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, To = /^[^\n]+/, ki = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Eo = U(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label", ki).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), So = U(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Ks).getRegex(), zn = "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]*?(?:-->|$))/, Co = U("^ {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", zn).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Qs = U(_i).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", zn).getRegex(), Ao = U(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Qs).getRegex(), Ti = {
|
|
6199
|
+
blockquote: Ao,
|
|
6200
|
+
code: _o,
|
|
6201
|
+
def: Eo,
|
|
6202
|
+
fences: ko,
|
|
6203
|
+
heading: $o,
|
|
6191
6204
|
hr: qt,
|
|
6192
|
-
html:
|
|
6205
|
+
html: Co,
|
|
6193
6206
|
lheading: Js,
|
|
6194
|
-
list:
|
|
6195
|
-
newline:
|
|
6207
|
+
list: So,
|
|
6208
|
+
newline: xo,
|
|
6196
6209
|
paragraph: Qs,
|
|
6197
6210
|
table: kt,
|
|
6198
|
-
text:
|
|
6199
|
-
}, ys =
|
|
6211
|
+
text: To
|
|
6212
|
+
}, ys = U("^ *([^\\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", zn).getRegex(), Io = {
|
|
6200
6213
|
...Ti,
|
|
6201
6214
|
table: ys,
|
|
6202
|
-
paragraph:
|
|
6203
|
-
},
|
|
6215
|
+
paragraph: U(_i).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", zn).getRegex()
|
|
6216
|
+
}, Oo = {
|
|
6204
6217
|
...Ti,
|
|
6205
|
-
html:
|
|
6218
|
+
html: U(`^ *(?: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(),
|
|
6206
6219
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
6207
6220
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
6208
6221
|
fences: kt,
|
|
6209
6222
|
// fences not supported
|
|
6210
6223
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
6211
|
-
paragraph:
|
|
6224
|
+
paragraph: U(_i).replace("hr", qt).replace("heading", ` *#{1,6} *[^
|
|
6212
6225
|
]`).replace("lheading", Js).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
6213
|
-
}, Ys = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,
|
|
6226
|
+
}, Ys = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Mo = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Gs = /^( {2,}|\\)\n(?!\s*$)/, Ro = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Kt = "\\p{P}\\p{S}", No = U(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Kt).getRegex(), Po = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g, jo = U(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Kt).getRegex(), zo = U("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Kt).getRegex(), Zo = U("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Kt).getRegex(), Lo = U(/\\([punct])/, "gu").replace(/punct/g, Kt).getRegex(), Do = U(/^<(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(), Uo = U($i).replace("(?:-->|$)", "-->").getRegex(), Ho = U("^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", Uo).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), kn = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Bo = U(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", kn).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Xs = U(/^!?\[(label)\]\[(ref)\]/).replace("label", kn).replace("ref", ki).getRegex(), er = U(/^!?\[(ref)\](?:\[\])?/).replace("ref", ki).getRegex(), Wo = U("reflink|nolink(?!\\()", "g").replace("reflink", Xs).replace("nolink", er).getRegex(), Ei = {
|
|
6214
6227
|
_backpedal: kt,
|
|
6215
6228
|
// only used for GFM url
|
|
6216
|
-
anyPunctuation:
|
|
6217
|
-
autolink:
|
|
6218
|
-
blockSkip:
|
|
6229
|
+
anyPunctuation: Lo,
|
|
6230
|
+
autolink: Do,
|
|
6231
|
+
blockSkip: Po,
|
|
6219
6232
|
br: Gs,
|
|
6220
|
-
code:
|
|
6233
|
+
code: Mo,
|
|
6221
6234
|
del: kt,
|
|
6222
|
-
emStrongLDelim:
|
|
6223
|
-
emStrongRDelimAst:
|
|
6224
|
-
emStrongRDelimUnd:
|
|
6235
|
+
emStrongLDelim: jo,
|
|
6236
|
+
emStrongRDelimAst: zo,
|
|
6237
|
+
emStrongRDelimUnd: Zo,
|
|
6225
6238
|
escape: Ys,
|
|
6226
|
-
link:
|
|
6239
|
+
link: Bo,
|
|
6227
6240
|
nolink: er,
|
|
6228
|
-
punctuation:
|
|
6241
|
+
punctuation: No,
|
|
6229
6242
|
reflink: Xs,
|
|
6230
|
-
reflinkSearch:
|
|
6231
|
-
tag:
|
|
6232
|
-
text:
|
|
6243
|
+
reflinkSearch: Wo,
|
|
6244
|
+
tag: Ho,
|
|
6245
|
+
text: Ro,
|
|
6233
6246
|
url: kt
|
|
6234
|
-
},
|
|
6247
|
+
}, Fo = {
|
|
6235
6248
|
...Ei,
|
|
6236
|
-
link:
|
|
6237
|
-
reflink:
|
|
6238
|
-
},
|
|
6249
|
+
link: U(/^!?\[(label)\]\((.*?)\)/).replace("label", kn).getRegex(),
|
|
6250
|
+
reflink: U(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", kn).getRegex()
|
|
6251
|
+
}, ci = {
|
|
6239
6252
|
...Ei,
|
|
6240
|
-
escape:
|
|
6241
|
-
url:
|
|
6253
|
+
escape: U(Ys).replace("])", "~|])").getRegex(),
|
|
6254
|
+
url: U(/^((?: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(),
|
|
6242
6255
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
6243
6256
|
del: /^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,
|
|
6244
6257
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
6245
|
-
},
|
|
6246
|
-
...
|
|
6247
|
-
br:
|
|
6248
|
-
text:
|
|
6258
|
+
}, Vo = {
|
|
6259
|
+
...ci,
|
|
6260
|
+
br: U(Gs).replace("{2,}", "*").getRegex(),
|
|
6261
|
+
text: U(ci.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
6249
6262
|
}, nn = {
|
|
6250
6263
|
normal: Ti,
|
|
6251
|
-
gfm:
|
|
6252
|
-
pedantic:
|
|
6264
|
+
gfm: Io,
|
|
6265
|
+
pedantic: Oo
|
|
6253
6266
|
}, bt = {
|
|
6254
6267
|
normal: Ei,
|
|
6255
|
-
gfm:
|
|
6256
|
-
breaks:
|
|
6257
|
-
pedantic:
|
|
6268
|
+
gfm: ci,
|
|
6269
|
+
breaks: Vo,
|
|
6270
|
+
pedantic: Fo
|
|
6258
6271
|
};
|
|
6259
6272
|
class me {
|
|
6260
6273
|
constructor(e) {
|
|
@@ -6363,8 +6376,8 @@ class me {
|
|
|
6363
6376
|
let o = 1 / 0;
|
|
6364
6377
|
const l = e.slice(1);
|
|
6365
6378
|
let d;
|
|
6366
|
-
this.options.extensions.startBlock.forEach((
|
|
6367
|
-
d =
|
|
6379
|
+
this.options.extensions.startBlock.forEach((h) => {
|
|
6380
|
+
d = h.call({ lexer: this }, l), typeof d == "number" && d >= 0 && (o = Math.min(o, d));
|
|
6368
6381
|
}), o < 1 / 0 && o >= 0 && (r = e.substring(0, o + 1));
|
|
6369
6382
|
}
|
|
6370
6383
|
if (this.state.top && (n = this.tokenizer.paragraph(r))) {
|
|
@@ -6399,17 +6412,17 @@ class me {
|
|
|
6399
6412
|
inlineTokens(e, t = []) {
|
|
6400
6413
|
let n, s, r, a = e, o, l, d;
|
|
6401
6414
|
if (this.tokens.links) {
|
|
6402
|
-
const
|
|
6403
|
-
if (
|
|
6415
|
+
const h = Object.keys(this.tokens.links);
|
|
6416
|
+
if (h.length > 0)
|
|
6404
6417
|
for (; (o = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; )
|
|
6405
|
-
|
|
6418
|
+
h.includes(o[0].slice(o[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
|
|
6406
6419
|
}
|
|
6407
6420
|
for (; (o = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; )
|
|
6408
6421
|
a = a.slice(0, o.index) + "[" + "a".repeat(o[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
6409
6422
|
for (; (o = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; )
|
|
6410
6423
|
a = a.slice(0, o.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
6411
6424
|
for (; e; )
|
|
6412
|
-
if (l || (d = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((
|
|
6425
|
+
if (l || (d = ""), l = !1, !(this.options.extensions && this.options.extensions.inline && this.options.extensions.inline.some((h) => (n = h.call({ lexer: this }, e, t)) ? (e = e.substring(n.raw.length), t.push(n), !0) : !1))) {
|
|
6413
6426
|
if (n = this.tokenizer.escape(e)) {
|
|
6414
6427
|
e = e.substring(n.raw.length), t.push(n);
|
|
6415
6428
|
continue;
|
|
@@ -6451,24 +6464,24 @@ class me {
|
|
|
6451
6464
|
continue;
|
|
6452
6465
|
}
|
|
6453
6466
|
if (r = e, this.options.extensions && this.options.extensions.startInline) {
|
|
6454
|
-
let
|
|
6467
|
+
let h = 1 / 0;
|
|
6455
6468
|
const p = e.slice(1);
|
|
6456
6469
|
let c;
|
|
6457
6470
|
this.options.extensions.startInline.forEach((g) => {
|
|
6458
|
-
c = g.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (
|
|
6459
|
-
}),
|
|
6471
|
+
c = g.call({ lexer: this }, p), typeof c == "number" && c >= 0 && (h = Math.min(h, c));
|
|
6472
|
+
}), h < 1 / 0 && h >= 0 && (r = e.substring(0, h + 1));
|
|
6460
6473
|
}
|
|
6461
6474
|
if (n = this.tokenizer.inlineText(r)) {
|
|
6462
6475
|
e = e.substring(n.raw.length), n.raw.slice(-1) !== "_" && (d = n.raw.slice(-1)), l = !0, s = t[t.length - 1], s && s.type === "text" ? (s.raw += n.raw, s.text += n.text) : t.push(n);
|
|
6463
6476
|
continue;
|
|
6464
6477
|
}
|
|
6465
6478
|
if (e) {
|
|
6466
|
-
const
|
|
6479
|
+
const h = "Infinite loop on byte: " + e.charCodeAt(0);
|
|
6467
6480
|
if (this.options.silent) {
|
|
6468
|
-
console.error(
|
|
6481
|
+
console.error(h);
|
|
6469
6482
|
break;
|
|
6470
6483
|
} else
|
|
6471
|
-
throw new Error(
|
|
6484
|
+
throw new Error(h);
|
|
6472
6485
|
}
|
|
6473
6486
|
}
|
|
6474
6487
|
return t;
|
|
@@ -6643,7 +6656,7 @@ class ge {
|
|
|
6643
6656
|
}
|
|
6644
6657
|
case "heading": {
|
|
6645
6658
|
const a = r;
|
|
6646
|
-
n += this.renderer.heading(this.parseInline(a.tokens), a.depth,
|
|
6659
|
+
n += this.renderer.heading(this.parseInline(a.tokens), a.depth, yo(this.parseInline(a.tokens, this.textRenderer)));
|
|
6647
6660
|
continue;
|
|
6648
6661
|
}
|
|
6649
6662
|
case "code": {
|
|
@@ -6654,12 +6667,12 @@ class ge {
|
|
|
6654
6667
|
case "table": {
|
|
6655
6668
|
const a = r;
|
|
6656
6669
|
let o = "", l = "";
|
|
6657
|
-
for (let
|
|
6658
|
-
l += this.renderer.tablecell(this.parseInline(a.header[
|
|
6670
|
+
for (let h = 0; h < a.header.length; h++)
|
|
6671
|
+
l += this.renderer.tablecell(this.parseInline(a.header[h].tokens), { header: !0, align: a.align[h] });
|
|
6659
6672
|
o += this.renderer.tablerow(l);
|
|
6660
6673
|
let d = "";
|
|
6661
|
-
for (let
|
|
6662
|
-
const p = a.rows[
|
|
6674
|
+
for (let h = 0; h < a.rows.length; h++) {
|
|
6675
|
+
const p = a.rows[h];
|
|
6663
6676
|
l = "";
|
|
6664
6677
|
for (let c = 0; c < p.length; c++)
|
|
6665
6678
|
l += this.renderer.tablecell(this.parseInline(p[c].tokens), { header: !1, align: a.align[c] });
|
|
@@ -6675,20 +6688,20 @@ class ge {
|
|
|
6675
6688
|
}
|
|
6676
6689
|
case "list": {
|
|
6677
6690
|
const a = r, o = a.ordered, l = a.start, d = a.loose;
|
|
6678
|
-
let
|
|
6691
|
+
let h = "";
|
|
6679
6692
|
for (let p = 0; p < a.items.length; p++) {
|
|
6680
6693
|
const c = a.items[p], g = c.checked, O = c.task;
|
|
6681
|
-
let
|
|
6694
|
+
let D = "";
|
|
6682
6695
|
if (c.task) {
|
|
6683
6696
|
const J = this.renderer.checkbox(!!g);
|
|
6684
6697
|
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({
|
|
6685
6698
|
type: "text",
|
|
6686
6699
|
text: J + " "
|
|
6687
|
-
}) :
|
|
6700
|
+
}) : D += J + " ";
|
|
6688
6701
|
}
|
|
6689
|
-
|
|
6702
|
+
D += this.parse(c.tokens, d), h += this.renderer.listitem(D, O, !!g);
|
|
6690
6703
|
}
|
|
6691
|
-
n += this.renderer.list(
|
|
6704
|
+
n += this.renderer.list(h, o, l);
|
|
6692
6705
|
continue;
|
|
6693
6706
|
}
|
|
6694
6707
|
case "html": {
|
|
@@ -6823,10 +6836,10 @@ W($t, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
|
6823
6836
|
"postprocess",
|
|
6824
6837
|
"processAllTokens"
|
|
6825
6838
|
]));
|
|
6826
|
-
var on,
|
|
6827
|
-
class
|
|
6839
|
+
var on, di, hi, vs;
|
|
6840
|
+
class qo {
|
|
6828
6841
|
constructor(...e) {
|
|
6829
|
-
Hi(this, on), Hi(this,
|
|
6842
|
+
Hi(this, on), Hi(this, hi), W(this, "defaults", xi()), W(this, "options", this.setOptions), W(this, "parse", ii(this, on, di).call(this, me.lex, ge.parse)), W(this, "parseInline", ii(this, on, di).call(this, me.lexInline, ge.parseInline)), W(this, "Parser", ge), W(this, "Renderer", $n), W(this, "TextRenderer", Si), W(this, "Lexer", me), W(this, "Tokenizer", _n), W(this, "Hooks", $t), this.use(...e);
|
|
6830
6843
|
}
|
|
6831
6844
|
/**
|
|
6832
6845
|
* Run callback for every token
|
|
@@ -6889,9 +6902,9 @@ class Vo {
|
|
|
6889
6902
|
if (a === "options")
|
|
6890
6903
|
continue;
|
|
6891
6904
|
const o = a, l = n.renderer[o], d = r[o];
|
|
6892
|
-
r[o] = (...
|
|
6893
|
-
let p = l.apply(r,
|
|
6894
|
-
return p === !1 && (p = d.apply(r,
|
|
6905
|
+
r[o] = (...h) => {
|
|
6906
|
+
let p = l.apply(r, h);
|
|
6907
|
+
return p === !1 && (p = d.apply(r, h)), p || "";
|
|
6895
6908
|
};
|
|
6896
6909
|
}
|
|
6897
6910
|
s.renderer = r;
|
|
@@ -6904,9 +6917,9 @@ class Vo {
|
|
|
6904
6917
|
if (["options", "rules", "lexer"].includes(a))
|
|
6905
6918
|
continue;
|
|
6906
6919
|
const o = a, l = n.tokenizer[o], d = r[o];
|
|
6907
|
-
r[o] = (...
|
|
6908
|
-
let p = l.apply(r,
|
|
6909
|
-
return p === !1 && (p = d.apply(r,
|
|
6920
|
+
r[o] = (...h) => {
|
|
6921
|
+
let p = l.apply(r, h);
|
|
6922
|
+
return p === !1 && (p = d.apply(r, h)), p;
|
|
6910
6923
|
};
|
|
6911
6924
|
}
|
|
6912
6925
|
s.tokenizer = r;
|
|
@@ -6919,14 +6932,14 @@ class Vo {
|
|
|
6919
6932
|
if (a === "options")
|
|
6920
6933
|
continue;
|
|
6921
6934
|
const o = a, l = n.hooks[o], d = r[o];
|
|
6922
|
-
$t.passThroughHooks.has(a) ? r[o] = (
|
|
6935
|
+
$t.passThroughHooks.has(a) ? r[o] = (h) => {
|
|
6923
6936
|
if (this.defaults.async)
|
|
6924
|
-
return Promise.resolve(l.call(r,
|
|
6925
|
-
const p = l.call(r,
|
|
6937
|
+
return Promise.resolve(l.call(r, h)).then((c) => d.call(r, c));
|
|
6938
|
+
const p = l.call(r, h);
|
|
6926
6939
|
return d.call(r, p);
|
|
6927
|
-
} : r[o] = (...
|
|
6928
|
-
let p = l.apply(r,
|
|
6929
|
-
return p === !1 && (p = d.apply(r,
|
|
6940
|
+
} : r[o] = (...h) => {
|
|
6941
|
+
let p = l.apply(r, h);
|
|
6942
|
+
return p === !1 && (p = d.apply(r, h)), p;
|
|
6930
6943
|
};
|
|
6931
6944
|
}
|
|
6932
6945
|
s.hooks = r;
|
|
@@ -6951,11 +6964,11 @@ class Vo {
|
|
|
6951
6964
|
return ge.parse(e, t ?? this.defaults);
|
|
6952
6965
|
}
|
|
6953
6966
|
}
|
|
6954
|
-
on = /* @__PURE__ */ new WeakSet(),
|
|
6967
|
+
on = /* @__PURE__ */ new WeakSet(), di = function(i, e) {
|
|
6955
6968
|
return (t, n) => {
|
|
6956
6969
|
const s = { ...n }, r = { ...this.defaults, ...s };
|
|
6957
6970
|
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);
|
|
6958
|
-
const a =
|
|
6971
|
+
const a = ii(this, hi, vs).call(this, !!r.silent, !!r.async);
|
|
6959
6972
|
if (typeof t > "u" || t === null)
|
|
6960
6973
|
return a(new Error("marked(): input parameter is undefined or null"));
|
|
6961
6974
|
if (typeof t != "string")
|
|
@@ -6972,7 +6985,7 @@ on = /* @__PURE__ */ new WeakSet(), ci = function(i, e) {
|
|
|
6972
6985
|
return a(o);
|
|
6973
6986
|
}
|
|
6974
6987
|
};
|
|
6975
|
-
},
|
|
6988
|
+
}, hi = /* @__PURE__ */ new WeakSet(), vs = function(i, e) {
|
|
6976
6989
|
return (t) => {
|
|
6977
6990
|
if (t.message += `
|
|
6978
6991
|
Please report this to https://github.com/markedjs/marked.`, i) {
|
|
@@ -6984,7 +6997,7 @@ Please report this to https://github.com/markedjs/marked.`, i) {
|
|
|
6984
6997
|
throw t;
|
|
6985
6998
|
};
|
|
6986
6999
|
};
|
|
6987
|
-
const et = new
|
|
7000
|
+
const et = new qo();
|
|
6988
7001
|
function L(i, e) {
|
|
6989
7002
|
return et.parse(i, e);
|
|
6990
7003
|
}
|
|
@@ -7016,16 +7029,16 @@ L.walkTokens;
|
|
|
7016
7029
|
L.parseInline;
|
|
7017
7030
|
ge.parse;
|
|
7018
7031
|
me.lex;
|
|
7019
|
-
function
|
|
7032
|
+
function Ko(i) {
|
|
7020
7033
|
return i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
7021
7034
|
}
|
|
7022
7035
|
function tr(i, e = "") {
|
|
7023
7036
|
return Object.keys(i).reduce((t, n) => {
|
|
7024
|
-
const s =
|
|
7037
|
+
const s = Ko(n), r = e ? `${e}-${s}` : s;
|
|
7025
7038
|
return typeof i[n] == "object" && i[n] !== null ? Object.assign(t, tr(i[n], r)) : t[r] = i[n], t;
|
|
7026
7039
|
}, {});
|
|
7027
7040
|
}
|
|
7028
|
-
function
|
|
7041
|
+
function Jo(i) {
|
|
7029
7042
|
const e = {
|
|
7030
7043
|
"&": "&",
|
|
7031
7044
|
"<": "<",
|
|
@@ -7036,13 +7049,13 @@ function Ko(i) {
|
|
|
7036
7049
|
return i.replace(/[&<>"']/g, (t) => e[t]);
|
|
7037
7050
|
}
|
|
7038
7051
|
function nr(i) {
|
|
7039
|
-
const e =
|
|
7052
|
+
const e = Jo(i);
|
|
7040
7053
|
return L.parse(e);
|
|
7041
7054
|
}
|
|
7042
|
-
var
|
|
7043
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7055
|
+
var Qo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, ir = (i, e, t, n) => {
|
|
7056
|
+
for (var s = n > 1 ? void 0 : n ? Yo(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7044
7057
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7045
|
-
return n && s &&
|
|
7058
|
+
return n && s && Qo(e, t, s), s;
|
|
7046
7059
|
};
|
|
7047
7060
|
let Tn = class extends ne {
|
|
7048
7061
|
constructor() {
|
|
@@ -7073,16 +7086,16 @@ ir([
|
|
|
7073
7086
|
Tn = ir([
|
|
7074
7087
|
Ee("iai-chat-message-assistant")
|
|
7075
7088
|
], Tn);
|
|
7076
|
-
async function
|
|
7089
|
+
async function Go(i, e) {
|
|
7077
7090
|
const { type: t, params: n } = i, s = e[t];
|
|
7078
7091
|
if (!s)
|
|
7079
7092
|
throw new Error(`No handler for enhanced content type ${t}`);
|
|
7080
7093
|
return s({ params: n, html: z });
|
|
7081
7094
|
}
|
|
7082
|
-
var
|
|
7083
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7095
|
+
var Xo = Object.defineProperty, el = Object.getOwnPropertyDescriptor, Jt = (i, e, t, n) => {
|
|
7096
|
+
for (var s = n > 1 ? void 0 : n ? el(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7084
7097
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7085
|
-
return n && s &&
|
|
7098
|
+
return n && s && Xo(e, t, s), s;
|
|
7086
7099
|
};
|
|
7087
7100
|
let tt = class extends ne {
|
|
7088
7101
|
constructor() {
|
|
@@ -7091,7 +7104,7 @@ let tt = class extends ne {
|
|
|
7091
7104
|
async connectedCallback() {
|
|
7092
7105
|
if (super.connectedCallback(), this.enhancedContent)
|
|
7093
7106
|
try {
|
|
7094
|
-
this.contentHtmlTemplate = await
|
|
7107
|
+
this.contentHtmlTemplate = await Go(this.enhancedContent, this.options.handlers.enhancedContent);
|
|
7095
7108
|
} catch (i) {
|
|
7096
7109
|
console.warn("Error processing enhanced content", i);
|
|
7097
7110
|
}
|
|
@@ -7121,10 +7134,10 @@ Jt([
|
|
|
7121
7134
|
tt = Jt([
|
|
7122
7135
|
Ee("iai-chat-message-system")
|
|
7123
7136
|
], tt);
|
|
7124
|
-
var
|
|
7125
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7137
|
+
var tl = Object.defineProperty, nl = Object.getOwnPropertyDescriptor, sr = (i, e, t, n) => {
|
|
7138
|
+
for (var s = n > 1 ? void 0 : n ? nl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7126
7139
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7127
|
-
return n && s &&
|
|
7140
|
+
return n && s && tl(e, t, s), s;
|
|
7128
7141
|
};
|
|
7129
7142
|
let En = class extends ne {
|
|
7130
7143
|
constructor() {
|
|
@@ -7152,10 +7165,10 @@ sr([
|
|
|
7152
7165
|
En = sr([
|
|
7153
7166
|
Ee("iai-chat-message-user")
|
|
7154
7167
|
], En);
|
|
7155
|
-
var
|
|
7156
|
-
for (var s = n > 1 ? void 0 : n ?
|
|
7168
|
+
var il = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, Zn = (i, e, t, n) => {
|
|
7169
|
+
for (var s = n > 1 ? void 0 : n ? sl(e, t) : e, r = i.length - 1, a; r >= 0; r--)
|
|
7157
7170
|
(a = i[r]) && (s = (n ? a(e, t, s) : a(s)) || s);
|
|
7158
|
-
return n && s &&
|
|
7171
|
+
return n && s && il(e, t, s), s;
|
|
7159
7172
|
};
|
|
7160
7173
|
let pt = class extends ne {
|
|
7161
7174
|
constructor() {
|
|
@@ -7196,7 +7209,7 @@ let pt = class extends ne {
|
|
|
7196
7209
|
() => z`
|
|
7197
7210
|
<div class="button rounded-full flex items-center justify-center" style=${a}>
|
|
7198
7211
|
<div class="h-3/5 w-3/5">
|
|
7199
|
-
${Re(this.isChatWindowOpen, () => Ht, () =>
|
|
7212
|
+
${Re(this.isChatWindowOpen, () => Ht, () => to)}
|
|
7200
7213
|
</div>
|
|
7201
7214
|
</div>
|
|
7202
7215
|
`
|
|
@@ -7215,19 +7228,19 @@ pt.styles = [Se, nt`
|
|
|
7215
7228
|
color: var(--iai-chat-i-ocb-fg);
|
|
7216
7229
|
}
|
|
7217
7230
|
`];
|
|
7218
|
-
|
|
7231
|
+
Zn([
|
|
7219
7232
|
V({ type: Object })
|
|
7220
7233
|
], pt.prototype, "options", 2);
|
|
7221
|
-
|
|
7234
|
+
Zn([
|
|
7222
7235
|
V({ type: Boolean })
|
|
7223
7236
|
], pt.prototype, "isChatWindowOpen", 2);
|
|
7224
|
-
|
|
7237
|
+
Zn([
|
|
7225
7238
|
gt()
|
|
7226
7239
|
], pt.prototype, "isCtaOpen", 2);
|
|
7227
|
-
pt =
|
|
7240
|
+
pt = Zn([
|
|
7228
7241
|
Ee("iai-chat-open-chat-button")
|
|
7229
7242
|
], pt);
|
|
7230
|
-
class
|
|
7243
|
+
class rl {
|
|
7231
7244
|
constructor(e) {
|
|
7232
7245
|
this.widget = null, this.options = Pn.parse(e);
|
|
7233
7246
|
const t = document.createElement("iai-chat-popup");
|
|
@@ -7248,7 +7261,7 @@ class sl {
|
|
|
7248
7261
|
(e = this.widget) == null || e.remove(), this.widget = null;
|
|
7249
7262
|
}
|
|
7250
7263
|
}
|
|
7251
|
-
function
|
|
7264
|
+
function al({ html: i, params: e }) {
|
|
7252
7265
|
return i`
|
|
7253
7266
|
<div>
|
|
7254
7267
|
<h2>Unit List</h2>
|
|
@@ -7269,7 +7282,7 @@ function rl({ html: i, params: e }) {
|
|
|
7269
7282
|
</iai-chat-carousel>
|
|
7270
7283
|
`;
|
|
7271
7284
|
}
|
|
7272
|
-
function
|
|
7285
|
+
function ol(i) {
|
|
7273
7286
|
return async function({ id: t, params: n, chatWindow: s }) {
|
|
7274
7287
|
s.setInputDisabled(!0);
|
|
7275
7288
|
const r = {
|
|
@@ -7282,11 +7295,17 @@ function al(i) {
|
|
|
7282
7295
|
}, a = document.createElement("iai-chat-iframe-modal");
|
|
7283
7296
|
a.title = "Schedule a Tour", a.src = `${i}?${new URLSearchParams(r).toString()}`, a.showHeader = !1;
|
|
7284
7297
|
const o = () => {
|
|
7285
|
-
a.remove(), window.removeEventListener("beforeunload",
|
|
7298
|
+
a.remove(), window.removeEventListener("beforeunload", h), s.setInputDisabled(!1);
|
|
7286
7299
|
}, l = async ({ detail: p }) => {
|
|
7287
7300
|
if (p.type !== "tourScheduled")
|
|
7288
7301
|
return;
|
|
7289
|
-
const {
|
|
7302
|
+
const {
|
|
7303
|
+
tourType: c,
|
|
7304
|
+
tourDate: g,
|
|
7305
|
+
tourTime: O,
|
|
7306
|
+
// prospectName,
|
|
7307
|
+
guestCardId: D
|
|
7308
|
+
} = p;
|
|
7290
7309
|
o(), s.addMessage({
|
|
7291
7310
|
role: "system",
|
|
7292
7311
|
content: "Your tour has been scheduled!"
|
|
@@ -7294,7 +7313,8 @@ function al(i) {
|
|
|
7294
7313
|
status: "scheduled",
|
|
7295
7314
|
tourType: c,
|
|
7296
7315
|
tourDate: g,
|
|
7297
|
-
tourTime: O
|
|
7316
|
+
tourTime: O,
|
|
7317
|
+
guestCardId: D
|
|
7298
7318
|
}, !0);
|
|
7299
7319
|
}, d = async () => {
|
|
7300
7320
|
o(), s.addMessage({
|
|
@@ -7303,13 +7323,13 @@ function al(i) {
|
|
|
7303
7323
|
}), await s.sendFunctionCallResponse(t, {
|
|
7304
7324
|
status: "canceled"
|
|
7305
7325
|
}, !0);
|
|
7306
|
-
},
|
|
7326
|
+
}, h = async () => {
|
|
7307
7327
|
o(), s.addMessage({
|
|
7308
7328
|
role: "system",
|
|
7309
7329
|
content: "Tour Scheduler Closed"
|
|
7310
7330
|
});
|
|
7311
7331
|
};
|
|
7312
|
-
a.addEventListener("message-received", l), a.addEventListener("close", d), window.addEventListener("beforeunload",
|
|
7332
|
+
a.addEventListener("message-received", l), a.addEventListener("close", d), window.addEventListener("beforeunload", h), document.body.appendChild(a), s.addMessage({
|
|
7313
7333
|
role: "system",
|
|
7314
7334
|
content: "Tour Scheduler Opened"
|
|
7315
7335
|
});
|
|
@@ -7331,7 +7351,7 @@ function rr(i) {
|
|
|
7331
7351
|
});
|
|
7332
7352
|
} };
|
|
7333
7353
|
}
|
|
7334
|
-
class
|
|
7354
|
+
class ll {
|
|
7335
7355
|
constructor(e) {
|
|
7336
7356
|
this.chatWsUrl = e, this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), this.reconnectCodes = /* @__PURE__ */ new Set([
|
|
7337
7357
|
1006
|
|
@@ -7376,14 +7396,14 @@ var Sn;
|
|
|
7376
7396
|
e.PENDING = "PENDING", e.ACTIVE = "ACTIVE", e.TERMINATED = "TERMINATED";
|
|
7377
7397
|
})(i.ConversationStatus || (i.ConversationStatus = {}));
|
|
7378
7398
|
})(Sn || (Sn = {}));
|
|
7379
|
-
const
|
|
7399
|
+
const cl = Sn.AcknowledgeType, dl = "Anyone Home", hl = "IB Chat Leasing - Development";
|
|
7380
7400
|
let ul = "https://five9.ah.inhabit.work";
|
|
7381
|
-
const
|
|
7401
|
+
const pl = "https://five9.ah.inhabit.work".replace("http", "ws").replace(/\/$/, "");
|
|
7382
7402
|
var _e, We;
|
|
7383
7403
|
const Et = class Et {
|
|
7384
7404
|
constructor() {
|
|
7385
|
-
|
|
7386
|
-
|
|
7405
|
+
Xn(this, _e, void 0);
|
|
7406
|
+
Xn(this, We, void 0);
|
|
7387
7407
|
this._emitter = rr(), this.on = this._emitter.on.bind(this._emitter), this.off = this._emitter.off.bind(this._emitter), Ie(this, _e, null), Ie(this, We, null), this.conversationStarted = !1;
|
|
7388
7408
|
}
|
|
7389
7409
|
serialize() {
|
|
@@ -7407,7 +7427,7 @@ const Et = class Et {
|
|
|
7407
7427
|
"Content-Type": "application/json",
|
|
7408
7428
|
Accept: "application/json"
|
|
7409
7429
|
},
|
|
7410
|
-
body: JSON.stringify({ tenantName:
|
|
7430
|
+
body: JSON.stringify({ tenantName: dl })
|
|
7411
7431
|
});
|
|
7412
7432
|
return Ie(this, _e, await e.json()), en(this, _e);
|
|
7413
7433
|
}
|
|
@@ -7428,7 +7448,7 @@ const Et = class Et {
|
|
|
7428
7448
|
if (!this.conversationId)
|
|
7429
7449
|
throw new Error("Conversation not started");
|
|
7430
7450
|
this.five9WebSocket && this.five9WebSocket.destroy();
|
|
7431
|
-
const e = new
|
|
7451
|
+
const e = new ll(`${pl}/conversations/${this.conversationId}/ws`);
|
|
7432
7452
|
e.on("*", (t, n) => {
|
|
7433
7453
|
this._emitter.emit(t, n);
|
|
7434
7454
|
}), e.on("conversationCreated", (t) => {
|
|
@@ -7450,7 +7470,7 @@ const Et = class Et {
|
|
|
7450
7470
|
messages: [
|
|
7451
7471
|
{
|
|
7452
7472
|
messageId: t.messageId,
|
|
7453
|
-
type:
|
|
7473
|
+
type: cl.READ
|
|
7454
7474
|
}
|
|
7455
7475
|
]
|
|
7456
7476
|
});
|
|
@@ -7494,7 +7514,7 @@ const Et = class Et {
|
|
|
7494
7514
|
});
|
|
7495
7515
|
const n = {
|
|
7496
7516
|
...e,
|
|
7497
|
-
campaignName:
|
|
7517
|
+
campaignName: hl,
|
|
7498
7518
|
tenantId: this.tenantId,
|
|
7499
7519
|
callbackUrl: ul
|
|
7500
7520
|
};
|
|
@@ -7579,7 +7599,7 @@ let Cn = Et;
|
|
|
7579
7599
|
function Tt(i) {
|
|
7580
7600
|
return `any-${i || "main"}-chatSession`;
|
|
7581
7601
|
}
|
|
7582
|
-
async function
|
|
7602
|
+
async function ml({
|
|
7583
7603
|
id: i,
|
|
7584
7604
|
params: e,
|
|
7585
7605
|
chatWindow: t,
|
|
@@ -7592,7 +7612,7 @@ async function pl({
|
|
|
7592
7612
|
t.setInputDisabled(!0), t.removeMessage("transferMessageId"), t.addMessage({
|
|
7593
7613
|
role: "system",
|
|
7594
7614
|
content: "Please wait while we connect you to a live agent"
|
|
7595
|
-
}), t.chatManager.
|
|
7615
|
+
}), t.chatManager.endChat("Transferred to live agent", !1);
|
|
7596
7616
|
const a = new Cn();
|
|
7597
7617
|
await a.createSession();
|
|
7598
7618
|
const { summary: o, subject: l, ...d } = e;
|
|
@@ -7729,7 +7749,7 @@ function ar(i, e) {
|
|
|
7729
7749
|
};
|
|
7730
7750
|
i.cleanOptions.config.disclaimerMessage = "You are chatting with a live agent", i.addEventListener("iai-chat-send-user-message", t), i.addEventListener("iai-chat-reset", s), i.addEventListener("iai-chat-destroy", n);
|
|
7731
7751
|
}
|
|
7732
|
-
class
|
|
7752
|
+
class fl {
|
|
7733
7753
|
constructor(e, t) {
|
|
7734
7754
|
const n = Pn.parse({
|
|
7735
7755
|
assistantId: "7e59c8c1-a4ff-40f1-9a68-86ea294a4e75",
|
|
@@ -7739,7 +7759,7 @@ class gl {
|
|
|
7739
7759
|
styles: e.styles || {}
|
|
7740
7760
|
}
|
|
7741
7761
|
});
|
|
7742
|
-
n.handlers.functionCalls.transferToLiveAgent =
|
|
7762
|
+
n.handlers.functionCalls.transferToLiveAgent = ml, n.handlers.functionCalls.showScheduleTourWidget = ol(t.schedulerUrl), n.handlers.enhancedContent.unitList = al, this.chatWidget = new rl(n);
|
|
7743
7763
|
const s = localStorage.getItem(Tt(n.config.historyKey));
|
|
7744
7764
|
if (s) {
|
|
7745
7765
|
const r = Cn.deserialize(s);
|
|
@@ -7753,5 +7773,5 @@ class gl {
|
|
|
7753
7773
|
}
|
|
7754
7774
|
}
|
|
7755
7775
|
export {
|
|
7756
|
-
|
|
7776
|
+
fl as AnyChatWidget
|
|
7757
7777
|
};
|